boltdocs 2.6.1 → 2.7.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.
Files changed (177) hide show
  1. package/bin/boltdocs.js +0 -1
  2. package/dist/cache-CQKlT4fI.mjs +6 -0
  3. package/dist/cache-DorPMFgW.cjs +6 -0
  4. package/dist/cards-BLoSiRuL.d.ts +30 -0
  5. package/dist/cards-CQn9mXZS.d.cts +30 -0
  6. package/dist/chunk-Ds5LZdWN.cjs +6 -0
  7. package/dist/client/index.cjs +1 -1
  8. package/dist/client/index.d.cts +173 -1328
  9. package/dist/client/index.d.ts +172 -1327
  10. package/dist/client/index.js +1 -1
  11. package/dist/{package-c99Cs7mD.cjs → client/mdx.cjs} +1 -1
  12. package/dist/client/mdx.d.cts +128 -0
  13. package/dist/client/mdx.d.ts +129 -0
  14. package/dist/client/mdx.js +6 -0
  15. package/dist/client/primitives.cjs +6 -0
  16. package/dist/client/primitives.d.cts +818 -0
  17. package/dist/client/primitives.d.ts +818 -0
  18. package/dist/client/primitives.js +6 -0
  19. package/dist/client/theme/neutral.css +74 -361
  20. package/dist/client/theme/reset.css +189 -0
  21. package/dist/docs-layout-BlDhcQRv.cjs +6 -0
  22. package/dist/docs-layout-BvAOWEJw.js +6 -0
  23. package/dist/doctor-BQiQhCTl.cjs +6 -0
  24. package/dist/doctor-COpf35L2.cjs +20 -0
  25. package/dist/doctor-Dh1XP7Pz.mjs +20 -0
  26. package/dist/generator-DGW6pkCC.cjs +22 -0
  27. package/dist/generator-Dv3wEmhZ.mjs +22 -0
  28. package/dist/icons-dev-CrQLjoQp.js +6 -0
  29. package/dist/icons-dev-rzdz6Lf3.cjs +6 -0
  30. package/dist/image-BkIfa9oo.js +6 -0
  31. package/dist/image-DIGjCPe6.cjs +6 -0
  32. package/dist/mdx-K0WYBAJ3.js +7 -0
  33. package/dist/mdx-hpErbRUe.cjs +7 -0
  34. package/dist/meta-loader-0gJ4PtBC.cjs +6 -0
  35. package/dist/meta-loader-9IpAHWDS.mjs +6 -0
  36. package/dist/node/cli-entry.cjs +1 -2
  37. package/dist/node/cli-entry.mjs +1 -2
  38. package/dist/node/index.cjs +1 -1
  39. package/dist/node/index.d.cts +66 -13
  40. package/dist/node/index.d.mts +66 -14
  41. package/dist/node/index.mjs +1 -1
  42. package/dist/node/routes/worker.cjs +6 -0
  43. package/dist/node/routes/worker.d.cts +2 -0
  44. package/dist/node/routes/worker.d.mts +2 -0
  45. package/dist/node/routes/worker.mjs +6 -0
  46. package/dist/node-C2nWXElP.mjs +112 -0
  47. package/dist/node-CinkUtxV.cjs +112 -0
  48. package/dist/package-BMYLDBBP.cjs +6 -0
  49. package/dist/{package-DukYeKmD.mjs → package-HegMOTL_.mjs} +1 -1
  50. package/dist/parser-Bh11BsdA.cjs +6 -0
  51. package/dist/parser-D8eQvE7N.mjs +6 -0
  52. package/dist/parser-DYRzXWmA.cjs +6 -0
  53. package/dist/routes-CHf76Ye4.cjs +6 -0
  54. package/dist/routes-CMUZGI6T.mjs +6 -0
  55. package/dist/routes-Co1mRM58.cjs +6 -0
  56. package/dist/search-dialog-BACuzoVX.cjs +6 -0
  57. package/dist/search-dialog-BKagVT17.js +6 -0
  58. package/dist/search-dialog-C8w12eUx.js +6 -0
  59. package/dist/search-dialog-CGyrozZE.cjs +6 -0
  60. package/dist/search-dialog-D26rUnJ_.cjs +6 -0
  61. package/dist/sidebar-DKvg6KOc.d.cts +491 -0
  62. package/dist/sidebar-Dr1TiRIy.d.ts +491 -0
  63. package/dist/utils-BxNAXhZZ.mjs +7 -0
  64. package/dist/utils-Clzu7jvb.cjs +7 -0
  65. package/dist/worker-pool-Bd8Y9KDv.mjs +6 -0
  66. package/dist/worker-pool-BwU8ckrg.cjs +6 -0
  67. package/package.json +27 -8
  68. package/src/client/app/doc-page.tsx +9 -5
  69. package/src/client/app/docs-layout.tsx +17 -3
  70. package/src/client/app/head.tsx +122 -0
  71. package/src/client/app/helmet-compat.tsx +36 -0
  72. package/src/client/app/mdx-component.tsx +5 -52
  73. package/src/client/app/mdx-components-context.tsx +32 -8
  74. package/src/client/app/routes-context.tsx +2 -2
  75. package/src/client/app/scroll-handler.tsx +1 -1
  76. package/src/client/app/theme-context.tsx +5 -5
  77. package/src/client/app/ui-context.tsx +42 -0
  78. package/src/client/components/docs-layout-default.tsx +85 -0
  79. package/src/client/components/icons-dev.tsx +38 -15
  80. package/src/client/components/mdx/callout.tsx +97 -0
  81. package/src/client/components/mdx/card.tsx +73 -98
  82. package/src/client/components/mdx/cards.tsx +27 -0
  83. package/src/client/components/mdx/code-block.tsx +37 -17
  84. package/src/client/components/mdx/field.tsx +24 -56
  85. package/src/client/components/mdx/image.tsx +36 -15
  86. package/src/client/components/mdx/index.ts +19 -53
  87. package/src/client/components/mdx/table.tsx +46 -148
  88. package/src/client/components/mdx/typographics.tsx +120 -0
  89. package/src/client/components/mdx/{hooks/use-code-block.ts → use-code-block.ts} +5 -7
  90. package/src/client/components/primitives/breadcrumbs.tsx +5 -24
  91. package/src/client/components/primitives/button.tsx +3 -142
  92. package/src/client/components/primitives/code-block.tsx +104 -97
  93. package/src/client/components/{docs-layout.tsx → primitives/docs-layout.tsx} +15 -24
  94. package/src/client/components/primitives/error-boundary.tsx +107 -0
  95. package/src/client/components/primitives/heading.tsx +128 -0
  96. package/src/client/components/primitives/helpers/observer.ts +62 -32
  97. package/src/client/components/primitives/image.tsx +26 -0
  98. package/src/client/components/primitives/link.tsx +50 -52
  99. package/src/client/components/primitives/menu.tsx +25 -49
  100. package/src/client/components/primitives/navbar.tsx +234 -59
  101. package/src/client/components/primitives/on-this-page.tsx +169 -40
  102. package/src/client/components/primitives/page-nav.tsx +11 -39
  103. package/src/client/components/primitives/popover.tsx +12 -30
  104. package/src/client/components/primitives/search-dialog.tsx +77 -71
  105. package/src/client/components/primitives/sidebar.tsx +312 -119
  106. package/src/client/components/primitives/skeleton.tsx +1 -1
  107. package/src/client/components/primitives/tabs.tsx +5 -16
  108. package/src/client/components/primitives/tooltip.tsx +1 -1
  109. package/src/client/components/ui-base/banner.tsx +66 -0
  110. package/src/client/components/ui-base/breadcrumbs.tsx +26 -20
  111. package/src/client/components/ui-base/copy-markdown.tsx +43 -35
  112. package/src/client/components/ui-base/error-boundary.tsx +9 -46
  113. package/src/client/components/ui-base/github-stars.tsx +5 -3
  114. package/src/client/components/ui-base/index.ts +3 -3
  115. package/src/client/components/ui-base/last-updated.tsx +27 -0
  116. package/src/client/components/ui-base/navbar.tsx +183 -89
  117. package/src/client/components/ui-base/not-found.tsx +11 -9
  118. package/src/client/components/ui-base/on-this-page.tsx +8 -104
  119. package/src/client/components/ui-base/page-nav.tsx +23 -9
  120. package/src/client/components/ui-base/search-dialog.tsx +111 -36
  121. package/src/client/components/ui-base/search-highlight.tsx +10 -0
  122. package/src/client/components/ui-base/sidebar.tsx +77 -154
  123. package/src/client/components/ui-base/tabs.tsx +20 -7
  124. package/src/client/components/ui-base/theme-toggle.tsx +88 -10
  125. package/src/client/components/ui-base/version-i18n.tsx +80 -0
  126. package/src/client/hooks/index.ts +2 -1
  127. package/src/client/hooks/use-analytics.ts +272 -0
  128. package/src/client/hooks/use-i18n.ts +120 -53
  129. package/src/client/hooks/use-localized-to.ts +70 -30
  130. package/src/client/hooks/use-navbar.ts +69 -39
  131. package/src/client/hooks/use-page-nav.ts +28 -25
  132. package/src/client/hooks/use-routes.ts +64 -81
  133. package/src/client/hooks/use-search-highlight.ts +185 -0
  134. package/src/client/hooks/use-search.ts +12 -3
  135. package/src/client/hooks/use-sidebar.ts +183 -77
  136. package/src/client/hooks/use-tabs.ts +3 -4
  137. package/src/client/hooks/use-version.ts +46 -18
  138. package/src/client/index.ts +13 -86
  139. package/src/client/mdx.ts +2 -0
  140. package/src/client/primitives.ts +19 -0
  141. package/src/client/ssg/boltdocs-shell.tsx +78 -57
  142. package/src/client/ssg/create-routes.tsx +290 -50
  143. package/src/client/ssg/mdx-page.tsx +2 -1
  144. package/src/client/store/boltdocs-context.tsx +83 -12
  145. package/src/client/theme/neutral.css +74 -361
  146. package/src/client/theme/reset.css +189 -0
  147. package/src/client/types.ts +10 -2
  148. package/src/client/utils/path.ts +9 -0
  149. package/src/client/utils/react-to-text.ts +24 -24
  150. package/src/client/virtual.d.ts +1 -1
  151. package/src/shared/types.ts +97 -21
  152. package/dist/node-CWN8U_p8.mjs +0 -88
  153. package/dist/node-D5iosYXv.cjs +0 -88
  154. package/dist/search-dialog-3lvKsbVG.js +0 -6
  155. package/dist/search-dialog-DMK5OpgH.cjs +0 -6
  156. package/dist/use-search-C9bxCqfF.js +0 -6
  157. package/dist/use-search-DcfZSunO.cjs +0 -6
  158. package/src/client/components/mdx/admonition.tsx +0 -91
  159. package/src/client/components/mdx/badge.tsx +0 -41
  160. package/src/client/components/mdx/button.tsx +0 -35
  161. package/src/client/components/mdx/component-preview.tsx +0 -37
  162. package/src/client/components/mdx/component-props.tsx +0 -83
  163. package/src/client/components/mdx/file-tree.tsx +0 -325
  164. package/src/client/components/mdx/hooks/use-component-preview.ts +0 -16
  165. package/src/client/components/mdx/hooks/useTable.ts +0 -74
  166. package/src/client/components/mdx/hooks/useTabs.ts +0 -68
  167. package/src/client/components/mdx/link.tsx +0 -38
  168. package/src/client/components/mdx/list.tsx +0 -192
  169. package/src/client/components/mdx/tabs.tsx +0 -135
  170. package/src/client/components/mdx/video.tsx +0 -68
  171. package/src/client/components/primitives/index.ts +0 -19
  172. package/src/client/components/primitives/navigation-menu.tsx +0 -114
  173. package/src/client/components/ui-base/head.tsx +0 -76
  174. package/src/client/components/ui-base/loading.tsx +0 -57
  175. package/src/client/components/ui-base/powered-by.tsx +0 -25
  176. package/src/client/hooks/use-onthispage.ts +0 -23
  177. package/src/client/utils/use-on-change.ts +0 -15
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./icons-dev-rzdz6Lf3.cjs`);let t=require(`react-router-dom`),n=require(`react`);n=e.O(n);let r=require(`react/jsx-runtime`),i=require(`lucide-react`);i=e.O(i);let a=require(`react-aria-components`);a=e.O(a);let o=require(`scroll-into-view-if-needed`);o=e.O(o);let s=require(`virtual:boltdocs-icons`);s=e.O(s);const c=({children:t,className:n,...i})=>(0,r.jsx)(a.Breadcrumbs,{className:e.y(`flex flex-wrap items-center`,n),...i,children:t});c.Root=c,c.Item=({children:t,className:n,...i})=>(0,r.jsx)(a.Breadcrumb,{className:e.y(`flex items-center`,n),...i,children:t}),c.Link=({children:t,href:n,className:i,...a})=>(0,r.jsx)(e._,{href:n,className:e.y(`cursor-pointer`,i),...a,children:t}),c.Separator=({className:t})=>(0,r.jsx)(i.ChevronRight,{size:14,className:e.y(`shrink-0`,t)});const l=({...e})=>(0,r.jsx)(a.Button,{...e}),u=({children:t,className:n,vertical:i=!1})=>(0,r.jsx)(`div`,{className:e.y(`inline-flex`,i?`flex-col`:`flex-row`,!i&&[`[&>*:not(:first-child)]:-ml-px`,`[&>*:first-child]:rounded-r-none`,`[&>*:last-child]:rounded-l-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,n?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-l-full`,`[&>*:last-child]:rounded-r-full`],n?.includes(`rounded-xl`)&&[`[&>*:first-child]:rounded-l-xl`,`[&>*:last-child]:rounded-r-xl`],n?.includes(`rounded-lg`)&&[`[&>*:first-child]:rounded-l-lg`,`[&>*:last-child]:rounded-r-lg`]],i&&[`[&>*:not(:first-child)]:-mt-px`,`[&>*:first-child]:rounded-b-none`,`[&>*:last-child]:rounded-t-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,n?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-t-full`,`[&>*:last-child]:rounded-b-full`]],n),children:t}),d=({children:t,className:n,...i})=>(0,r.jsx)(a.Popover,{offset:8,className:e.y(`z-50 overflow-auto outline-none transition-none`,n),...i,children:t});function f({placement:e,className:t,...i}){let[o,s]=n.Children.toArray(i.children).slice(0,2);return(0,r.jsxs)(a.MenuTrigger,{...i,children:[o,(0,r.jsx)(d,{placement:e,className:t,children:s})]})}function p({className:e,...t}){let[i,o]=n.Children.toArray(t.children).slice(0,2);return(0,r.jsxs)(a.SubmenuTrigger,{...t,children:[i,(0,r.jsx)(d,{offset:-4,crossOffset:-4,className:e,children:o})]})}function m(t){return(0,r.jsx)(a.Menu,{...t,className:a.composeRenderProps(t.className,t=>e.y(`outline-none overflow-auto`,t))})}function ee(t){let n=t.textValue||(typeof t.children==`string`?t.children:void 0);return(0,r.jsx)(a.MenuItem,{...t,textValue:n,className:a.composeRenderProps(t.className,t=>e.y(`group relative flex flex-row items-center cursor-default outline-none`,t)),children:a.composeRenderProps(t.children,(e,{selectionMode:t,isSelected:n,hasSubmenu:a})=>(0,r.jsxs)(r.Fragment,{children:[t===`multiple`&&(0,r.jsx)(`span`,{className:`flex items-center shrink-0 justify-center`,children:n&&(0,r.jsx)(i.Check,{className:`size-3.5`})}),(0,r.jsx)(`div`,{className:`flex flex-row w-full items-center`,children:e}),a&&(0,r.jsx)(i.ChevronRight,{className:`size-4 ml-auto`})]}))})}function h({title:t,...n}){return(0,r.jsxs)(a.MenuSection,{...n,className:e.y(`flex flex-col`,n.className),children:[t&&(0,r.jsx)(a.Header,{className:`select-none`,children:t}),(0,r.jsx)(a.Collection,{items:n.items,children:n.children})]})}function te(t){return(0,r.jsx)(a.Separator,{...t,className:e.y(`border-t`,t.className)})}m.Root=m,m.Item=ee,m.Trigger=f,m.SubTrigger=p,m.Section=h,m.Separator=te;var g=class extends n.Component{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`ErrorBoundary caught an unhandled error:`,e,t)}resetErrorBoundary=()=>{this.props.onReset&&this.props.onReset(),this.setState({hasError:!1,error:null})};render(){let{hasError:e,error:t}=this.state,{children:n,fallback:i,FallbackComponent:a}=this.props;return e&&t?a?(0,r.jsx)(a,{error:t,resetErrorBoundary:this.resetErrorBoundary}):i||(0,r.jsx)(_,{error:t,resetErrorBoundary:this.resetErrorBoundary}):n}};function _({error:e,resetErrorBoundary:t}){return(0,r.jsxs)(`div`,{className:`flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-6 py-8 border border-subtle bg-surface rounded-2xl max-w-lg mx-auto shadow-xs`,children:[(0,r.jsx)(`div`,{className:`text-lg font-bold text-rose-600 dark:text-rose-400`,children:`Something went wrong`}),(0,r.jsx)(`p`,{className:`text-sm text-muted max-w-sm leading-relaxed`,children:e?.message||`An unexpected error occurred while rendering this page.`}),(0,r.jsx)(l,{className:`rounded-xl border border-subtle bg-main px-6 py-2.5 text-xs font-semibold text-body hover:bg-primary-50/50 hover:border-primary-500/50 transition-all duration-300 cursor-pointer outline-none select-none`,onPress:t,children:`Try again`})]})}const v=({children:t,className:n=``,...i})=>(0,r.jsx)(`div`,{className:e.y(`w-full`,n),...i,children:t});v.Root=v,v.List=({children:t,className:n=``})=>(0,r.jsx)(`div`,{role:`tablist`,className:e.y(`relative flex flex-row items-center`,n),children:t}),v.Item=({children:t,id:n,selected:i,className:a=``,...o})=>(0,r.jsx)(`button`,{role:`tab`,"aria-selected":i,"data-selected":i,className:e.y(`outline-none cursor-pointer bg-transparent border-none`,a),...o,children:t}),v.Content=({children:t,className:n=``})=>(0,r.jsx)(`div`,{className:e.y(`outline-none`,n),children:t}),v.Indicator=({className:t=``,style:n})=>(0,r.jsx)(`div`,{className:e.y(`absolute bottom-0`,t),style:n});const y=(0,n.createContext)(void 0);function ne({children:e}){let[i,a]=(0,n.useState)(!1),o=(0,t.useLocation)();return(0,n.useEffect)(()=>{a(!1)},[o.pathname]),(0,r.jsx)(y.Provider,{value:{isSidebarOpen:i,toggleSidebar:()=>a(e=>!e),closeSidebar:()=>a(!1)},children:e})}function b(){let e=(0,n.useContext)(y);return e===void 0?{isSidebarOpen:!1,toggleSidebar:()=>{},closeSidebar:()=>{}}:e}function x(e){return e.startsWith(`#`)?e.slice(1):null}var S=class{items=[];single=!1;observer=null;onChange;callback(e){for(let e of this.items){let t=document.getElementById(e.id);if(!t){e.active=!1,e.fallback=!1;continue}let n=t.getBoundingClientRect(),r=typeof window<`u`?window.innerHeight:1e3,i=n.bottom>0&&n.top<r;e.active=i,e.fallback=!i&&n.top>0&&n.top<r*2}if(this.single){let e=-1,t=this.items.map((e,t)=>({item:e,idx:t})).filter(({item:e})=>e.active);if(t.length>0)e=t[0].idx;else{let t=this.items.map((e,t)=>({item:e,idx:t})).filter(({item:e})=>e.fallback);t.length>0?e=t[0].idx:this.items.length>0&&(e=0)}this.items=this.items.map((t,n)=>({...t,active:n===e,t:n===e?Date.now():t.t}))}else this.items=this.items.map((e,t)=>({...e,active:e.active,t:e.active?Date.now():e.t}));this.onChange?.()}setItems(e){let t=this.observer;if(t)for(let e of this.items){let n=document.getElementById(e.id);n&&t.unobserve(n)}this.items=[];for(let t of e){let e=x(t.url);e&&this.items.push({id:e,active:!1,fallback:!1,t:0,original:t})}this.watchItems(),typeof window<`u`&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(e){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),e),this.watchItems())}watchItems(){if(this.observer)for(let e of this.items){let t=document.getElementById(e.id);t&&this.observer.observe(t)}}unwatch(){this.observer?.disconnect(),this.observer=null}};const C=(0,n.createContext)(null),w=(0,n.createContext)(null);function T(){let e=(0,n.use)(C);if(!e)throw Error(`Component must be used under the <AnchorProvider /> component.`);return e}function re(){let e=T();return(0,n.useMemo)(()=>{let t;for(let n of e)n.active&&(!t||n.t>t.t)&&(t=n);return t?.id},[e])}function E(){let e=T();return(0,n.useMemo)(()=>{let t=[];for(let n of e)n.active&&t.push(n.id);return t},[e])}function D({containerRef:e,children:t}){return(0,r.jsx)(w.Provider,{value:e,children:t})}function O({toc:e,single:t=!1,observerOptions:i,children:a}){let o=(0,n.useMemo)(()=>new S,[]),[s,c]=(0,n.useState)(o.items);return o.single=t,(0,n.useEffect)(()=>{o.setItems(e)},[o,e]),(0,n.useEffect)(()=>{let e={rootMargin:`-80px 0% -60% 0%`,threshold:0},t=i?{...e,...i}:e;return o.watch(t),o.onChange=()=>c([...o.items]),()=>{o.unwatch()}},[o]),(0,r.jsx)(C.Provider,{value:s,children:a})}const k=({children:t,className:n})=>(0,r.jsx)(`nav`,{className:e.y(`sticky top-navbar hidden xl:flex flex-col shrink-0`,`w-toc`,`py-4 pl-6 pr-4`,n),children:t}),ie=({children:t,className:n,...i})=>(0,r.jsx)(`div`,{className:e.y(`mb-4 text-xs font-bold text-body`,n),...i,children:t}),A=({children:t,className:i,ref:a,...o})=>{let s=(0,n.useRef)(null);return(0,n.useImperativeHandle)(a,()=>s.current),(0,r.jsx)(`div`,{ref:s,className:e.y(`relative overflow-y-auto boltdocs-otp-content pb-12`,`max-h-[70%]`,i),style:{maskImage:`linear-gradient(to bottom, black 90%, transparent 100%)`,WebkitMaskImage:`linear-gradient(to bottom, black 90%, transparent 100%)`},...o,children:t})};A.displayName=`OnThisPageContent`;const j=({children:t,className:n})=>(0,r.jsx)(`ul`,{className:e.y(`relative space-y-0.5 text-sm border-l border-subtle`,n),children:t}),M=({level:t,children:n,className:i})=>(0,r.jsx)(`li`,{className:e.y(t===3&&`pl-3`,i),children:n}),N=({children:t,href:i,active:a,onClick:s,className:c})=>{let l=(0,n.use)(C),u=(0,n.use)(w),d=i?x(i):null,f=(0,n.useRef)(null),p=a===void 0?d&&l?!!l.find(e=>e.id===d)?.active:!1:a;return(0,n.useEffect)(()=>{p&&f.current&&u?.current&&(0,o.default)(f.current,{behavior:`smooth`,block:`center`,inline:`center`,scrollMode:`if-needed`,boundary:u.current})},[p,u]),(0,r.jsx)(`a`,{ref:f,href:i,onClick:e=>{if(s)s(e);else if(i&&i.startsWith(`#`)){e.preventDefault();let t=i.slice(1),n=document.getElementById(t);n&&(n.scrollIntoView({behavior:`smooth`}),window.history.pushState(null,``,i))}},"data-active":p,className:e.y(`block py-0.5 pl-4 text-[13px] outline-none transition-colors`,p?`text-primary-500`:`text-muted hover:text-body`,c),children:t})},P=({style:t,className:i})=>{let a=(0,n.useRef)(null),[o,s]=(0,n.useState)({opacity:0,...t});return(0,n.useEffect)(()=>{let e=a.current?.parentElement;if(!e)return;let n=e.querySelectorAll(`a[data-active="true"]`);if(n.length>0){let r=n[0],i=n[n.length-1],a=r.getBoundingClientRect(),o=i.getBoundingClientRect(),c=e.getBoundingClientRect(),l=a.top-c.top,u=o.bottom-a.top;s({transform:`translateY(${l}px)`,height:`${u}px`,opacity:1,...t})}else s({opacity:0,...t})},[T(),t]),(0,r.jsx)(`div`,{ref:a,className:e.y(`absolute -left-px w-0.5 rounded-full bg-primary-500`,i),style:{transition:`transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), height 180ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 150ms`,...o}})};function F({headings:e=[],className:t}){let n=E();return e.length===0?null:(0,r.jsxs)(j,{className:t,children:[(0,r.jsx)(P,{}),e.map(e=>(0,r.jsx)(M,{level:e.level,children:(0,r.jsx)(N,{href:`#${e.id}`,active:n.includes(e.id),children:e.text})},e.id))]})}function I({headings:e=[],className:t}){let i=(0,n.useMemo)(()=>e.map(e=>({title:e.text,url:`#${e.id}`,depth:e.level})),[e]),a=(0,n.useRef)(null);return e.length===0?null:(0,r.jsx)(O,{toc:i,single:!1,children:(0,r.jsx)(D,{containerRef:a,children:(0,r.jsx)(A,{ref:a,children:(0,r.jsx)(F,{headings:e,className:t})})})})}k.Root=k,k.Header=ie,k.Content=A,k.List=j,k.Item=M,k.Link=N,k.Indicator=P,k.Items=F,k.Tree=I;const L=({children:t,className:n})=>(0,r.jsx)(`nav`,{className:e.y(`grid sm:grid-cols-2 gap-4`,n),children:t});L.Root=L,L.Link=({children:t,to:n,direction:a,className:o})=>{let s=a===`next`;return(0,r.jsxs)(e._,{href:n,className:e.y(`flex items-center outline-none no-underline`,s?`justify-end`:`justify-start`,o),children:[!s&&(0,r.jsx)(i.ChevronLeft,{className:`shrink-0`}),(0,r.jsx)(`div`,{className:`flex flex-col flex-1`,children:t}),s&&(0,r.jsx)(i.ChevronRight,{className:`shrink-0`})]})},L.Title=({children:t,className:n})=>(0,r.jsx)(`span`,{className:e.y(n),children:t}),L.Description=({children:t,className:n})=>(0,r.jsx)(`span`,{className:e.y(`truncate`,n),children:t}),L.Icon=({children:e})=>(0,r.jsx)(r.Fragment,{children:e});function R(r){let i=e.D(),a=e.S((0,t.useLocation)().pathname);return(0,n.useMemo)(()=>{let t=r.find(t=>e.S(t.path)===a),n=t?.tab?.toLowerCase(),o=n?r.filter(e=>!e.tab||e.tab.toLowerCase()===n):r,s={};if(i.directoryMeta)for(let[e,t]of Object.entries(i.directoryMeta)){let n=e.split(`/`).filter(e=>!e.startsWith(`(`)||!e.endsWith(`)`)).map(e=>e.replace(/^\d+-/,``)).join(`/`);s[n===``?`.`:n]=t}let c=e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g,` `),l=new Map,u=[],d=(e,t)=>{let n=t,r=``,i=null;for(let t=0;t<e.length;t++){let a=e[t],o=r?`${r}/${a}`:a;if(!n.has(a)){let e=s[o]||{},t={path:`#`,title:e.title||c(a),componentPath:``,filePath:``,icon:e.icon,groupPosition:typeof e.order==`number`?e.order:999,subRoutes:[]};n.set(a,t)}i=n.get(a),i._subMap||=new Map,n=i._subMap,r=o}return i},f=[...o].sort((e,t)=>(e.sidebarPosition??e.order??999)-(t.sidebarPosition??t.order??999));for(let e of f){if(e.sidebarHidden)continue;let t=e.slugParts||[],n=e.filePath.split(`/`).pop()||``,r=/^index\.mdx?$/.test(n);if(t.length===0){e.filePath&&u.push(e);continue}if(r){let n=d(t,l);n&&(n.path=e.path,n.title=e.title||n.title,n.icon=e.icon||n.icon,n.badge=e.badge,n.sidebarPosition=e.sidebarPosition,n.frontmatter=e.frontmatter)}else{let n=d(t,l);n&&n.subRoutes.push(e)}}let p=(e,t=``)=>(e.forEach(e=>{if(e._subMap){let t=Array.from(e._subMap.values());e.subRoutes=[...e.subRoutes||[],...t],delete e._subMap}e.subRoutes&&e.subRoutes.length>0&&(e.subRoutes=p(e.subRoutes))}),e.sort((e,t)=>{let n=e.sidebarPosition??e.groupPosition??999,r=t.sidebarPosition??t.groupPosition??999;return n===r?e.title.localeCompare(t.title):n-r})),m=p(Array.from(l.values()));return m.map(e=>({slug:e.title.toLowerCase().replace(/\s+/g,`-`),title:e.title,icon:e.icon,routes:[e]})),{groups:m.map(e=>e.subRoutes&&e.subRoutes.length>0?{slug:e.title.toLowerCase().replace(/\s+/g,`-`),title:e.title,icon:e.icon,routes:e.subRoutes}:(u.push(e),null)).filter(Boolean),ungrouped:p(u),activeRoute:t,activePath:a,config:i}},[r,i,a])}let z=0;function B(e){if(!e)return;let t={...i,...s.default};return t[e]||t[e+`Icon`]||void 0}const V=({badge:t})=>{let n={new:`bg-primary-500/10 text-primary-500 border border-primary-500/20`,updated:`bg-emerald-500/10 text-emerald-500 border border-emerald-500/20`,deprecated:`bg-danger-500/10 text-danger-500 border border-danger-500/20`},i=typeof t==`string`?t:t?.text;return i?(0,r.jsx)(`span`,{className:e.y(`ml-auto flex h-5 items-center rounded-md text-[10px] font-bold px-1.5 py-0.5 uppercase tracking-wider`,n[i]||n.new),children:i}):null};function H({children:t,className:n}){return(0,r.jsx)(`aside`,{className:e.y(`hidden lg:flex flex-col w-sidebar sticky top-navbar h-[calc(100vh-var(--spacing-navbar))] border-r border-subtle bg-main`,n),children:t})}function U({children:t,className:n}){let{isSidebarOpen:i,closeSidebar:o}=b();return(0,r.jsx)(a.ModalOverlay,{isOpen:i,onOpenChange:e=>!e&&o(),isDismissable:!0,className:e.y(`fixed inset-0 z-50 bg-black/20 backdrop-blur-sm lg:hidden`,`entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out duration-300`),children:(0,r.jsx)(a.Modal,{className:e.y(`fixed top-0 left-0 bottom-0 w-80 bg-main border-r border-subtle shadow-2xl outline-none`,`entering:animate-in entering:slide-in-from-left exiting:animate-out exiting:slide-out-to-left duration-300`,n),children:(0,r.jsx)(a.Dialog,{className:`h-full focus:outline-none outline-none flex flex-col`,children:t})})})}function W({children:t,className:n}){return(0,r.jsx)(`div`,{className:e.y(`flex items-center justify-between p-4 border-b border-subtle`,n),children:t})}function G({children:t,className:i}){let a=(0,n.useRef)(null);return(0,n.useLayoutEffect)(()=>{a.current&&(a.current.scrollTop=z)},[]),(0,n.useEffect)(()=>{let e=a.current;if(!e)return;let t=()=>{z=e.scrollTop};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[]),(0,r.jsx)(`div`,{ref:a,className:e.y(`flex-1 overflow-y-auto p-4 pb-16 custom-scrollbar`,i),children:(0,r.jsx)(`nav`,{className:`flex flex-col gap-6`,children:t})})}const K=({title:e,icon:t,children:n,className:i})=>(0,r.jsxs)(`div`,{className:i,children:[e&&(0,r.jsxs)(`h4`,{className:`px-2 mb-2 flex items-center gap-2 text-[11px] font-bold uppercase tracking-widest text-muted/50`,children:[t&&(0,r.jsx)(t,{size:12}),e]}),(0,r.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:n})]}),q=({label:t,href:n,active:i,icon:a,badge:o,className:s})=>(0,r.jsxs)(e._,{href:n,className:e.y(`group flex items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-sm transition-all outline-none`,i?`bg-primary-500/10 text-primary-500 font-medium shadow-sm`:`text-muted hover:bg-surface hover:text-body`,s),children:[a&&(0,r.jsx)(a,{size:16,className:e.y(i?`text-primary-500`:`text-muted group-hover:text-body`)}),(0,r.jsx)(`span`,{className:`truncate`,children:t}),o&&(0,r.jsx)(V,{badge:o})]}),J=({label:t,href:n,active:a,icon:o,badge:s,isOpen:c,onToggle:l,children:u,className:d})=>(0,r.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,r.jsxs)(`div`,{className:`group relative flex items-center`,children:[(0,r.jsx)(q,{label:t,href:n,active:a,icon:o,badge:s,className:e.y(`flex-1 pr-8`,d)}),(0,r.jsx)(`button`,{onClick:e=>{e.preventDefault(),e.stopPropagation(),l()},className:`absolute right-1 p-1.5 text-muted hover:text-body transition-colors outline-none cursor-pointer`,children:(0,r.jsx)(i.ChevronRight,{size:14,className:e.y(`transition-transform duration-200`,c&&`rotate-90`)})})]}),c&&(0,r.jsx)(`div`,{className:`ml-4 pl-3 border-l border-subtle/50 mt-0.5 flex flex-col gap-0.5`,children:u})]});function Y({route:t,activePath:i,className:a}){let o=e.b(t.path),s=i===(o.endsWith(`/`)?o.slice(0,-1):o),c=!!t.routes?.length||!!t.subRoutes?.length,l=t.routes||t.subRoutes,[u,d]=(0,n.useState)(()=>i.startsWith(o)),[f,p]=(0,n.useState)(i);return i!==f&&(p(i),i.startsWith(o)&&d(!0)),c?(0,r.jsx)(J,{label:t.title,href:t.path,active:s,icon:B(t.icon),badge:t.badge,isOpen:u,onToggle:()=>d(!u),className:a,children:l?.map(e=>(0,r.jsx)(Y,{route:e,activePath:i},e.path))}):(0,r.jsx)(q,{label:t.title,href:t.path,active:s,icon:B(t.icon),badge:t.badge,className:a})}function X({routes:t,className:n}){let{groups:i,ungrouped:a,activePath:o}=R(t);return(0,r.jsxs)(`div`,{className:e.y(`flex flex-col gap-6`,n),children:[a.length>0&&(0,r.jsx)(K,{children:a.map(e=>(0,r.jsx)(Y,{route:e,activePath:o},e.path))}),i.map(e=>(0,r.jsx)(K,{title:e.title,icon:B(e.icon),children:e.routes.map(e=>(0,r.jsx)(Y,{route:e,activePath:o},e.path))},e.title))]})}const ae=Object.assign(H,{Root:H,Mobile:U,Header:W,Content:G,Group:K,Link:q,SubGroup:J,Item:Y,Items:X}),Z=()=>(0,t.useLocation)();function Q(e=`.boltdocs-page`){let{search:t}=Z(),r=new URLSearchParams(t).get(`hl`);(0,n.useEffect)(()=>{if(!r){$(e);return}let t=document.querySelector(e);if(!t)return;let n,i=new MutationObserver(e=>{e.some(e=>{let t=Array.from(e.addedNodes),n=Array.from(e.removedNodes);return t.some(e=>!(e instanceof HTMLElement&&e.hasAttribute(`data-search-highlight`)))||n.some(e=>!(e instanceof HTMLElement&&e.hasAttribute(`data-search-highlight`)))})&&a()});function a(){cancelAnimationFrame(n),n=requestAnimationFrame(()=>{i.disconnect(),$(e);let n=r.split(/\s+/).map(e=>e.trim()).filter(e=>e.length>=2);n.length>0&&oe(t,n),i.observe(t,{childList:!0,subtree:!0})})}return a(),()=>{cancelAnimationFrame(n),i.disconnect(),$(e)}},[r,t,e])}function $(e){document.querySelectorAll(`${e} mark[data-search-highlight]`).forEach(e=>{try{let t=e.parentNode;if(t&&t.contains(e)){let n=e.textContent||``;t.replaceChild(document.createTextNode(n),e)}}catch{}})}function oe(e,t){let n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>{let t=e.parentElement;return t&&(t.tagName===`SCRIPT`||t.tagName===`STYLE`||t.tagName===`MARK`||t.closest(`pre`)||t.closest(`code`))?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=[],i;for(;i=n.nextNode();)r.push(i);let a={a:`[aáàäâã]`,e:`[eéèëê]`,i:`[iíìïî]`,o:`[oóòöôõ]`,u:`[uúùüû]`,n:`[nñ]`,c:`[cç]`},o=e=>{let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return t=t.split(``).map(e=>a[e.toLowerCase()]||e).join(``),t},s=t.map(o).join(`|`),c=RegExp(`(${s})`,`gi`),l=t.map(e=>{let t=o(e);return RegExp(`^${t}$`,`i`)});r.forEach(e=>{let t=e.textContent;if(t&&c.test(t)){let n=document.createDocumentFragment();t.split(c).forEach(e=>{if(l.some(t=>t.test(e))){let t=document.createElement(`mark`);t.textContent=e,t.setAttribute(`data-search-highlight`,`true`),n.appendChild(t)}else e&&n.appendChild(document.createTextNode(e))}),e.parentNode&&e.parentNode.replaceChild(n,e)}})}function se(){return Q(`.boltdocs-page`),null}function ce({children:t,className:n,style:i}){return(0,r.jsx)(`div`,{className:e.y(`h-screen flex flex-col overflow-hidden bg-main text-body`,n),style:i,children:t})}function le({children:t,className:n,style:i}){return(0,r.jsx)(`div`,{className:e.y(`mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-main overflow-hidden`,n),style:i,children:t})}function ue({children:t,className:n,style:i}){return(0,r.jsx)(`main`,{className:e.y(`boltdocs-content flex-1 min-w-0 overflow-y-auto`,`contain-layout`,n),style:i,children:t})}function de({children:t,className:n,style:i}){return(0,r.jsxs)(`div`,{className:e.y(`boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8`,n),style:i,children:[(0,r.jsx)(se,{}),t]})}function fe({children:t,className:n,style:i}){return(0,r.jsx)(`header`,{className:e.y(`mb-10`,n),style:i,children:t})}function pe({children:t,className:n,style:i}){return(0,r.jsx)(`div`,{className:e.y(`mt-20`,n),style:i,children:t})}const me=Object.assign(ce,{Body:le,Content:ue,ContentMdx:de,Header:fe,Footer:pe});Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return I}});
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{D as e,S as t,_ as n,b as r,y as i}from"./icons-dev-CrQLjoQp.js";import{useLocation as a}from"react-router-dom";import{Children as o,Component as s,createContext as c,use as l,useContext as u,useEffect as d,useImperativeHandle as f,useLayoutEffect as p,useMemo as m,useRef as h,useState as g}from"react";import{Fragment as ee,jsx as _,jsxs as v}from"react/jsx-runtime";import*as te from"lucide-react";import{Check as ne,ChevronLeft as re,ChevronRight as y}from"lucide-react";import*as b from"react-aria-components";import{Breadcrumb as ie,Breadcrumbs as ae,Popover as oe}from"react-aria-components";import se from"scroll-into-view-if-needed";import ce from"virtual:boltdocs-icons";const x=({children:e,className:t,...n})=>_(ae,{className:i(`flex flex-wrap items-center`,t),...n,children:e});x.Root=x,x.Item=({children:e,className:t,...n})=>_(ie,{className:i(`flex items-center`,t),...n,children:e}),x.Link=({children:e,href:t,className:r,...a})=>_(n,{href:t,className:i(`cursor-pointer`,r),...a,children:e}),x.Separator=({className:e})=>_(y,{size:14,className:i(`shrink-0`,e)});const le=({...e})=>_(b.Button,{...e}),ue=({children:e,className:t,vertical:n=!1})=>_(`div`,{className:i(`inline-flex`,n?`flex-col`:`flex-row`,!n&&[`[&>*: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`]],n&&[`[&>*: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}),S=({children:e,className:t,...n})=>_(oe,{offset:8,className:i(`z-50 overflow-auto outline-none transition-none`,t),...n,children:e});function de({placement:e,className:t,...n}){let[r,i]=o.toArray(n.children).slice(0,2);return v(b.MenuTrigger,{...n,children:[r,_(S,{placement:e,className:t,children:i})]})}function fe({className:e,...t}){let[n,r]=o.toArray(t.children).slice(0,2);return v(b.SubmenuTrigger,{...t,children:[n,_(S,{offset:-4,crossOffset:-4,className:e,children:r})]})}function C(e){return _(b.Menu,{...e,className:b.composeRenderProps(e.className,e=>i(`outline-none overflow-auto`,e))})}function pe(e){let t=e.textValue||(typeof e.children==`string`?e.children:void 0);return _(b.MenuItem,{...e,textValue:t,className:b.composeRenderProps(e.className,e=>i(`group relative flex flex-row items-center cursor-default outline-none`,e)),children:b.composeRenderProps(e.children,(e,{selectionMode:t,isSelected:n,hasSubmenu:r})=>v(ee,{children:[t===`multiple`&&_(`span`,{className:`flex items-center shrink-0 justify-center`,children:n&&_(ne,{className:`size-3.5`})}),_(`div`,{className:`flex flex-row w-full items-center`,children:e}),r&&_(y,{className:`size-4 ml-auto`})]}))})}function me({title:e,...t}){return v(b.MenuSection,{...t,className:i(`flex flex-col`,t.className),children:[e&&_(b.Header,{className:`select-none`,children:e}),_(b.Collection,{items:t.items,children:t.children})]})}function he(e){return _(b.Separator,{...e,className:i(`border-t`,e.className)})}C.Root=C,C.Item=pe,C.Trigger=de,C.SubTrigger=fe,C.Section=me,C.Separator=he;var ge=class extends s{state={hasError:!1,error:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`ErrorBoundary caught an unhandled error:`,e,t)}resetErrorBoundary=()=>{this.props.onReset&&this.props.onReset(),this.setState({hasError:!1,error:null})};render(){let{hasError:e,error:t}=this.state,{children:n,fallback:r,FallbackComponent:i}=this.props;return e&&t?i?_(i,{error:t,resetErrorBoundary:this.resetErrorBoundary}):r||_(w,{error:t,resetErrorBoundary:this.resetErrorBoundary}):n}};function w({error:e,resetErrorBoundary:t}){return v(`div`,{className:`flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-6 py-8 border border-subtle bg-surface rounded-2xl max-w-lg mx-auto shadow-xs`,children:[_(`div`,{className:`text-lg font-bold text-rose-600 dark:text-rose-400`,children:`Something went wrong`}),_(`p`,{className:`text-sm text-muted max-w-sm leading-relaxed`,children:e?.message||`An unexpected error occurred while rendering this page.`}),_(le,{className:`rounded-xl border border-subtle bg-main px-6 py-2.5 text-xs font-semibold text-body hover:bg-primary-50/50 hover:border-primary-500/50 transition-all duration-300 cursor-pointer outline-none select-none`,onPress:t,children:`Try again`})]})}const T=({children:e,className:t=``,...n})=>_(`div`,{className:i(`w-full`,t),...n,children:e});T.Root=T,T.List=({children:e,className:t=``})=>_(`div`,{role:`tablist`,className:i(`relative flex flex-row items-center`,t),children:e}),T.Item=({children:e,id:t,selected:n,className:r=``,...a})=>_(`button`,{role:`tab`,"aria-selected":n,"data-selected":n,className:i(`outline-none cursor-pointer bg-transparent border-none`,r),...a,children:e}),T.Content=({children:e,className:t=``})=>_(`div`,{className:i(`outline-none`,t),children:e}),T.Indicator=({className:e=``,style:t})=>_(`div`,{className:i(`absolute bottom-0`,e),style:t});const E=c(void 0);function _e({children:e}){let[t,n]=g(!1);return d(()=>{n(!1)},[a().pathname]),_(E.Provider,{value:{isSidebarOpen:t,toggleSidebar:()=>n(e=>!e),closeSidebar:()=>n(!1)},children:e})}function D(){let e=u(E);return e===void 0?{isSidebarOpen:!1,toggleSidebar:()=>{},closeSidebar:()=>{}}:e}function O(e){return e.startsWith(`#`)?e.slice(1):null}var ve=class{items=[];single=!1;observer=null;onChange;callback(e){for(let e of this.items){let t=document.getElementById(e.id);if(!t){e.active=!1,e.fallback=!1;continue}let n=t.getBoundingClientRect(),r=typeof window<`u`?window.innerHeight:1e3,i=n.bottom>0&&n.top<r;e.active=i,e.fallback=!i&&n.top>0&&n.top<r*2}if(this.single){let e=-1,t=this.items.map((e,t)=>({item:e,idx:t})).filter(({item:e})=>e.active);if(t.length>0)e=t[0].idx;else{let t=this.items.map((e,t)=>({item:e,idx:t})).filter(({item:e})=>e.fallback);t.length>0?e=t[0].idx:this.items.length>0&&(e=0)}this.items=this.items.map((t,n)=>({...t,active:n===e,t:n===e?Date.now():t.t}))}else this.items=this.items.map((e,t)=>({...e,active:e.active,t:e.active?Date.now():e.t}));this.onChange?.()}setItems(e){let t=this.observer;if(t)for(let e of this.items){let n=document.getElementById(e.id);n&&t.unobserve(n)}this.items=[];for(let t of e){let e=O(t.url);e&&this.items.push({id:e,active:!1,fallback:!1,t:0,original:t})}this.watchItems(),typeof window<`u`&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(e){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),e),this.watchItems())}watchItems(){if(this.observer)for(let e of this.items){let t=document.getElementById(e.id);t&&this.observer.observe(t)}}unwatch(){this.observer?.disconnect(),this.observer=null}};const k=c(null),A=c(null);function j(){let e=l(k);if(!e)throw Error(`Component must be used under the <AnchorProvider /> component.`);return e}function ye(){let e=j();return m(()=>{let t;for(let n of e)n.active&&(!t||n.t>t.t)&&(t=n);return t?.id},[e])}function M(){let e=j();return m(()=>{let t=[];for(let n of e)n.active&&t.push(n.id);return t},[e])}function N({containerRef:e,children:t}){return _(A.Provider,{value:e,children:t})}function P({toc:e,single:t=!1,observerOptions:n,children:r}){let i=m(()=>new ve,[]),[a,o]=g(i.items);return i.single=t,d(()=>{i.setItems(e)},[i,e]),d(()=>{let e={rootMargin:`-80px 0% -60% 0%`,threshold:0},t=n?{...e,...n}:e;return i.watch(t),i.onChange=()=>o([...i.items]),()=>{i.unwatch()}},[i]),_(k.Provider,{value:a,children:r})}const F=({children:e,className:t})=>_(`nav`,{className:i(`sticky top-navbar hidden xl:flex flex-col shrink-0`,`w-toc`,`py-4 pl-6 pr-4`,t),children:e}),be=({children:e,className:t,...n})=>_(`div`,{className:i(`mb-4 text-xs font-bold text-body`,t),...n,children:e}),I=({children:e,className:t,ref:n,...r})=>{let a=h(null);return f(n,()=>a.current),_(`div`,{ref:a,className:i(`relative overflow-y-auto boltdocs-otp-content pb-12`,`max-h-[70%]`,t),style:{maskImage:`linear-gradient(to bottom, black 90%, transparent 100%)`,WebkitMaskImage:`linear-gradient(to bottom, black 90%, transparent 100%)`},...r,children:e})};I.displayName=`OnThisPageContent`;const L=({children:e,className:t})=>_(`ul`,{className:i(`relative space-y-0.5 text-sm border-l border-subtle`,t),children:e}),R=({level:e,children:t,className:n})=>_(`li`,{className:i(e===3&&`pl-3`,n),children:t}),z=({children:e,href:t,active:n,onClick:r,className:a})=>{let o=l(k),s=l(A),c=t?O(t):null,u=h(null),f=n===void 0?c&&o?!!o.find(e=>e.id===c)?.active:!1:n;return d(()=>{f&&u.current&&s?.current&&se(u.current,{behavior:`smooth`,block:`center`,inline:`center`,scrollMode:`if-needed`,boundary:s.current})},[f,s]),_(`a`,{ref:u,href:t,onClick:e=>{if(r)r(e);else if(t&&t.startsWith(`#`)){e.preventDefault();let n=t.slice(1),r=document.getElementById(n);r&&(r.scrollIntoView({behavior:`smooth`}),window.history.pushState(null,``,t))}},"data-active":f,className:i(`block py-0.5 pl-4 text-[13px] outline-none transition-colors`,f?`text-primary-500`:`text-muted hover:text-body`,a),children:e})},B=({style:e,className:t})=>{let n=h(null),[r,a]=g({opacity:0,...e});return d(()=>{let t=n.current?.parentElement;if(!t)return;let r=t.querySelectorAll(`a[data-active="true"]`);if(r.length>0){let n=r[0],i=r[r.length-1],o=n.getBoundingClientRect(),s=i.getBoundingClientRect(),c=t.getBoundingClientRect(),l=o.top-c.top,u=s.bottom-o.top;a({transform:`translateY(${l}px)`,height:`${u}px`,opacity:1,...e})}else a({opacity:0,...e})},[j(),e]),_(`div`,{ref:n,className:i(`absolute -left-px w-0.5 rounded-full bg-primary-500`,t),style:{transition:`transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), height 180ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 150ms`,...r}})};function V({headings:e=[],className:t}){let n=M();return e.length===0?null:v(L,{className:t,children:[_(B,{}),e.map(e=>_(R,{level:e.level,children:_(z,{href:`#${e.id}`,active:n.includes(e.id),children:e.text})},e.id))]})}function H({headings:e=[],className:t}){let n=m(()=>e.map(e=>({title:e.text,url:`#${e.id}`,depth:e.level})),[e]),r=h(null);return e.length===0?null:_(P,{toc:n,single:!1,children:_(N,{containerRef:r,children:_(I,{ref:r,children:_(V,{headings:e,className:t})})})})}F.Root=F,F.Header=be,F.Content=I,F.List=L,F.Item=R,F.Link=z,F.Indicator=B,F.Items=V,F.Tree=H;const U=({children:e,className:t})=>_(`nav`,{className:i(`grid sm:grid-cols-2 gap-4`,t),children:e});U.Root=U,U.Link=({children:e,to:t,direction:r,className:a})=>{let o=r===`next`;return v(n,{href:t,className:i(`flex items-center outline-none no-underline`,o?`justify-end`:`justify-start`,a),children:[!o&&_(re,{className:`shrink-0`}),_(`div`,{className:`flex flex-col flex-1`,children:e}),o&&_(y,{className:`shrink-0`})]})},U.Title=({children:e,className:t})=>_(`span`,{className:i(t),children:e}),U.Description=({children:e,className:t})=>_(`span`,{className:i(`truncate`,t),children:e}),U.Icon=({children:e})=>_(ee,{children:e});function W(n){let r=e(),i=t(a().pathname);return m(()=>{let e=n.find(e=>t(e.path)===i),a=e?.tab?.toLowerCase(),o=a?n.filter(e=>!e.tab||e.tab.toLowerCase()===a):n,s={};if(r.directoryMeta)for(let[e,t]of Object.entries(r.directoryMeta)){let n=e.split(`/`).filter(e=>!e.startsWith(`(`)||!e.endsWith(`)`)).map(e=>e.replace(/^\d+-/,``)).join(`/`);s[n===``?`.`:n]=t}let c=e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/-/g,` `),l=new Map,u=[],d=(e,t)=>{let n=t,r=``,i=null;for(let t=0;t<e.length;t++){let a=e[t],o=r?`${r}/${a}`:a;if(!n.has(a)){let e=s[o]||{},t={path:`#`,title:e.title||c(a),componentPath:``,filePath:``,icon:e.icon,groupPosition:typeof e.order==`number`?e.order:999,subRoutes:[]};n.set(a,t)}i=n.get(a),i._subMap||=new Map,n=i._subMap,r=o}return i},f=[...o].sort((e,t)=>(e.sidebarPosition??e.order??999)-(t.sidebarPosition??t.order??999));for(let e of f){if(e.sidebarHidden)continue;let t=e.slugParts||[],n=e.filePath.split(`/`).pop()||``,r=/^index\.mdx?$/.test(n);if(t.length===0){e.filePath&&u.push(e);continue}if(r){let n=d(t,l);n&&(n.path=e.path,n.title=e.title||n.title,n.icon=e.icon||n.icon,n.badge=e.badge,n.sidebarPosition=e.sidebarPosition,n.frontmatter=e.frontmatter)}else{let n=d(t,l);n&&n.subRoutes.push(e)}}let p=(e,t=``)=>(e.forEach(e=>{if(e._subMap){let t=Array.from(e._subMap.values());e.subRoutes=[...e.subRoutes||[],...t],delete e._subMap}e.subRoutes&&e.subRoutes.length>0&&(e.subRoutes=p(e.subRoutes))}),e.sort((e,t)=>{let n=e.sidebarPosition??e.groupPosition??999,r=t.sidebarPosition??t.groupPosition??999;return n===r?e.title.localeCompare(t.title):n-r})),m=p(Array.from(l.values()));return m.map(e=>({slug:e.title.toLowerCase().replace(/\s+/g,`-`),title:e.title,icon:e.icon,routes:[e]})),{groups:m.map(e=>e.subRoutes&&e.subRoutes.length>0?{slug:e.title.toLowerCase().replace(/\s+/g,`-`),title:e.title,icon:e.icon,routes:e.subRoutes}:(u.push(e),null)).filter(Boolean),ungrouped:p(u),activeRoute:e,activePath:i,config:r}},[n,r,i])}let xe=0;function G(e){if(!e)return;let t={...te,...ce};return t[e]||t[e+`Icon`]||void 0}const Se=({badge:e})=>{let t={new:`bg-primary-500/10 text-primary-500 border border-primary-500/20`,updated:`bg-emerald-500/10 text-emerald-500 border border-emerald-500/20`,deprecated:`bg-danger-500/10 text-danger-500 border border-danger-500/20`},n=typeof e==`string`?e:e?.text;return n?_(`span`,{className:i(`ml-auto flex h-5 items-center rounded-md text-[10px] font-bold px-1.5 py-0.5 uppercase tracking-wider`,t[n]||t.new),children:n}):null};function K({children:e,className:t}){return _(`aside`,{className:i(`hidden lg:flex flex-col w-sidebar sticky top-navbar h-[calc(100vh-var(--spacing-navbar))] border-r border-subtle bg-main`,t),children:e})}function Ce({children:e,className:t}){let{isSidebarOpen:n,closeSidebar:r}=D();return _(b.ModalOverlay,{isOpen:n,onOpenChange:e=>!e&&r(),isDismissable:!0,className:i(`fixed inset-0 z-50 bg-black/20 backdrop-blur-sm lg:hidden`,`entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out duration-300`),children:_(b.Modal,{className:i(`fixed top-0 left-0 bottom-0 w-80 bg-main border-r border-subtle shadow-2xl outline-none`,`entering:animate-in entering:slide-in-from-left exiting:animate-out exiting:slide-out-to-left duration-300`,t),children:_(b.Dialog,{className:`h-full focus:outline-none outline-none flex flex-col`,children:e})})})}function we({children:e,className:t}){return _(`div`,{className:i(`flex items-center justify-between p-4 border-b border-subtle`,t),children:e})}function Te({children:e,className:t}){let n=h(null);return p(()=>{n.current&&(n.current.scrollTop=xe)},[]),d(()=>{let e=n.current;if(!e)return;let t=()=>{xe=e.scrollTop};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[]),_(`div`,{ref:n,className:i(`flex-1 overflow-y-auto p-4 pb-16 custom-scrollbar`,t),children:_(`nav`,{className:`flex flex-col gap-6`,children:e})})}const q=({title:e,icon:t,children:n,className:r})=>v(`div`,{className:r,children:[e&&v(`h4`,{className:`px-2 mb-2 flex items-center gap-2 text-[11px] font-bold uppercase tracking-widest text-muted/50`,children:[t&&_(t,{size:12}),e]}),_(`div`,{className:`flex flex-col gap-0.5`,children:n})]}),J=({label:e,href:t,active:r,icon:a,badge:o,className:s})=>v(n,{href:t,className:i(`group flex items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-sm transition-all outline-none`,r?`bg-primary-500/10 text-primary-500 font-medium shadow-sm`:`text-muted hover:bg-surface hover:text-body`,s),children:[a&&_(a,{size:16,className:i(r?`text-primary-500`:`text-muted group-hover:text-body`)}),_(`span`,{className:`truncate`,children:e}),o&&_(Se,{badge:o})]}),Y=({label:e,href:t,active:n,icon:r,badge:a,isOpen:o,onToggle:s,children:c,className:l})=>v(`div`,{className:`flex flex-col gap-0.5`,children:[v(`div`,{className:`group relative flex items-center`,children:[_(J,{label:e,href:t,active:n,icon:r,badge:a,className:i(`flex-1 pr-8`,l)}),_(`button`,{onClick:e=>{e.preventDefault(),e.stopPropagation(),s()},className:`absolute right-1 p-1.5 text-muted hover:text-body transition-colors outline-none cursor-pointer`,children:_(y,{size:14,className:i(`transition-transform duration-200`,o&&`rotate-90`)})})]}),o&&_(`div`,{className:`ml-4 pl-3 border-l border-subtle/50 mt-0.5 flex flex-col gap-0.5`,children:c})]});function X({route:e,activePath:t,className:n}){let i=r(e.path),a=t===(i.endsWith(`/`)?i.slice(0,-1):i),o=!!e.routes?.length||!!e.subRoutes?.length,s=e.routes||e.subRoutes,[c,l]=g(()=>t.startsWith(i)),[u,d]=g(t);return t!==u&&(d(t),t.startsWith(i)&&l(!0)),o?_(Y,{label:e.title,href:e.path,active:a,icon:G(e.icon),badge:e.badge,isOpen:c,onToggle:()=>l(!c),className:n,children:s?.map(e=>_(X,{route:e,activePath:t},e.path))}):_(J,{label:e.title,href:e.path,active:a,icon:G(e.icon),badge:e.badge,className:n})}function Z({routes:e,className:t}){let{groups:n,ungrouped:r,activePath:a}=W(e);return v(`div`,{className:i(`flex flex-col gap-6`,t),children:[r.length>0&&_(q,{children:r.map(e=>_(X,{route:e,activePath:a},e.path))}),n.map(e=>_(q,{title:e.title,icon:G(e.icon),children:e.routes.map(e=>_(X,{route:e,activePath:a},e.path))},e.title))]})}const Ee=Object.assign(K,{Root:K,Mobile:Ce,Header:we,Content:Te,Group:q,Link:J,SubGroup:Y,Item:X,Items:Z}),De=()=>a();function Q(e=`.boltdocs-page`){let{search:t}=De(),n=new URLSearchParams(t).get(`hl`);d(()=>{if(!n){$(e);return}let t=document.querySelector(e);if(!t)return;let r,i=new MutationObserver(e=>{e.some(e=>{let t=Array.from(e.addedNodes),n=Array.from(e.removedNodes);return t.some(e=>!(e instanceof HTMLElement&&e.hasAttribute(`data-search-highlight`)))||n.some(e=>!(e instanceof HTMLElement&&e.hasAttribute(`data-search-highlight`)))})&&a()});function a(){cancelAnimationFrame(r),r=requestAnimationFrame(()=>{i.disconnect(),$(e);let r=n.split(/\s+/).map(e=>e.trim()).filter(e=>e.length>=2);r.length>0&&Oe(t,r),i.observe(t,{childList:!0,subtree:!0})})}return a(),()=>{cancelAnimationFrame(r),i.disconnect(),$(e)}},[n,t,e])}function $(e){document.querySelectorAll(`${e} mark[data-search-highlight]`).forEach(e=>{try{let t=e.parentNode;if(t&&t.contains(e)){let n=e.textContent||``;t.replaceChild(document.createTextNode(n),e)}}catch{}})}function Oe(e,t){let n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>{let t=e.parentElement;return t&&(t.tagName===`SCRIPT`||t.tagName===`STYLE`||t.tagName===`MARK`||t.closest(`pre`)||t.closest(`code`))?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),r=[],i;for(;i=n.nextNode();)r.push(i);let a={a:`[aáàäâã]`,e:`[eéèëê]`,i:`[iíìïî]`,o:`[oóòöôõ]`,u:`[uúùüû]`,n:`[nñ]`,c:`[cç]`},o=e=>{let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return t=t.split(``).map(e=>a[e.toLowerCase()]||e).join(``),t},s=t.map(o).join(`|`),c=RegExp(`(${s})`,`gi`),l=t.map(e=>{let t=o(e);return RegExp(`^${t}$`,`i`)});r.forEach(e=>{let t=e.textContent;if(t&&c.test(t)){let n=document.createDocumentFragment();t.split(c).forEach(e=>{if(l.some(t=>t.test(e))){let t=document.createElement(`mark`);t.textContent=e,t.setAttribute(`data-search-highlight`,`true`),n.appendChild(t)}else e&&n.appendChild(document.createTextNode(e))}),e.parentNode&&e.parentNode.replaceChild(n,e)}})}function ke(){return Q(`.boltdocs-page`),null}function Ae({children:e,className:t,style:n}){return _(`div`,{className:i(`h-screen flex flex-col overflow-hidden bg-main text-body`,t),style:n,children:e})}function je({children:e,className:t,style:n}){return _(`div`,{className:i(`mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-main overflow-hidden`,t),style:n,children:e})}function Me({children:e,className:t,style:n}){return _(`main`,{className:i(`boltdocs-content flex-1 min-w-0 overflow-y-auto`,`contain-layout`,t),style:n,children:e})}function Ne({children:e,className:t,style:n}){return v(`div`,{className:i(`boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8`,t),style:n,children:[_(ke,{}),e]})}function Pe({children:e,className:t,style:n}){return _(`header`,{className:i(`mb-10`,t),style:n,children:e})}function Fe({children:e,className:t,style:n}){return _(`div`,{className:i(`mt-20`,t),style:n,children:e})}const Ie=Object.assign(Ae,{Body:je,Content:Me,ContentMdx:Ne,Header:Pe,Footer:Fe});export{S as A,j as C,ge as D,T as E,le as M,x as N,w as O,M as S,D as T,F as _,Te as a,N as b,X as c,Ce as d,K as f,P as g,U as h,Ee as i,ue as j,C as k,Z as l,W as m,Q as n,q as o,Y as p,De as r,we as s,Ie as t,J as u,V as v,_e as w,ye as x,H as y};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./doctor-COpf35L2.cjs`);exports.doctorAction=e.t;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./chunk-Ds5LZdWN.cjs`),t=require(`./utils-Clzu7jvb.cjs`);let n=require(`vite`),r=require(`node:path`);r=e.n(r);let i=require(`fdir`),a=require(`fs`);a=e.n(a);let o=require(`zod`),s=require(`node:fs`);s=e.n(s);let c=require(`path`);c=e.n(c);let l=require(`picomatch`);l=e.n(l);let u=require(`node:readline`);u=e.n(u);let d=require(`fastest-levenshtein`);const f=o.z.object({icon:o.z.string().max(50),link:o.z.string().url()});o.z.object({text:o.z.string().max(2e3).optional()});const p=o.z.enum([`fs:read`,`fs:write`,`vite:config`,`mdx:remark`,`mdx:rehype`,`components`,`hooks:build`,`hooks:dev`]),m=o.z.object({name:o.z.string(),enforce:o.z.enum([`pre`,`post`]).optional(),version:o.z.string().optional(),boltdocsVersion:o.z.string().optional(),permissions:o.z.array(p).optional(),remarkPlugins:o.z.array(o.z.any()).optional(),rehypePlugins:o.z.array(o.z.any()).optional(),vitePlugins:o.z.array(o.z.any()).optional(),components:o.z.record(o.z.string(),o.z.string()).optional(),hooks:o.z.record(o.z.string(),o.z.any()).optional()}),h=o.z.object({title:o.z.union([o.z.string(),o.z.record(o.z.string(),o.z.string())]).optional(),description:o.z.union([o.z.string(),o.z.record(o.z.string(),o.z.string())]).optional(),logo:o.z.union([o.z.string(),o.z.object({dark:o.z.string(),light:o.z.string(),alt:o.z.string().optional(),width:o.z.number().optional(),height:o.z.number().optional()})]).optional(),navbar:o.z.array(o.z.object({label:o.z.union([o.z.string(),o.z.record(o.z.string(),o.z.string())]),href:o.z.string(),items:o.z.array(o.z.object({label:o.z.union([o.z.string(),o.z.record(o.z.string(),o.z.string())]),href:o.z.string()})).optional()})).optional(),sidebar:o.z.record(o.z.string(),o.z.array(o.z.object({text:o.z.string(),link:o.z.string()}))).optional(),sidebarGroups:o.z.record(o.z.string(),o.z.object({title:o.z.union([o.z.string(),o.z.record(o.z.string(),o.z.string())]).optional(),icon:o.z.string().optional()})).optional(),socialLinks:o.z.array(f).optional(),editLink:o.z.string().refine(e=>!e||e.includes(`:path`),{message:`editLink must contain ':path' placeholder if specified`}).optional(),communityHelp:o.z.string().url().optional(),version:o.z.string().max(50).optional(),githubRepo:o.z.string().max(100).optional(),favicon:o.z.string().optional(),tabs:o.z.array(o.z.object({id:o.z.string(),text:o.z.union([o.z.string(),o.z.record(o.z.string(),o.z.string())]),icon:o.z.string().optional()})).optional(),codeTheme:o.z.union([o.z.string(),o.z.object({light:o.z.string(),dark:o.z.string()})]).optional()}),g=o.z.union([o.z.string(),o.z.object({rules:o.z.array(o.z.object({userAgent:o.z.string(),allow:o.z.union([o.z.string(),o.z.array(o.z.string())]).optional(),disallow:o.z.union([o.z.string(),o.z.array(o.z.string())]).optional()})).optional(),sitemaps:o.z.array(o.z.string().url()).optional()})]),_=o.z.object({defaultLocale:o.z.string(),locales:o.z.union([o.z.record(o.z.string(),o.z.string()),o.z.array(o.z.string())]).transform(e=>Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e),localeConfigs:o.z.record(o.z.string(),o.z.object({label:o.z.string().optional(),direction:o.z.enum([`ltr`,`rtl`]).optional(),htmlLang:o.z.string().optional(),calendar:o.z.string().optional()})).optional()}),v=o.z.object({defaultVersion:o.z.string(),prefix:o.z.string().optional(),versions:o.z.array(o.z.object({label:o.z.string(),path:o.z.string()}))}),y=o.z.object({headers:o.z.record(o.z.string(),o.z.string()).optional(),enableCSP:o.z.boolean().optional(),customHeaders:o.z.record(o.z.string(),o.z.string()).optional()}),b=o.z.object({metatags:o.z.record(o.z.string(),o.z.string()).optional(),indexing:o.z.enum([`all`,`public`]).optional(),thumbnails:o.z.object({background:o.z.string().optional()}).optional()}),x=o.z.object({measurementId:o.z.string().min(1,`Measurement ID is required for GA4`),debug:o.z.boolean().optional(),anonymizeIp:o.z.boolean().optional(),sendPageView:o.z.boolean().optional(),cookieFlags:o.z.string().optional(),autoTrack:o.z.object({pageViews:o.z.boolean().optional(),downloads:o.z.boolean().optional(),externalLinks:o.z.boolean().optional(),search:o.z.boolean().optional()}).optional()}),S=o.z.object({tagId:o.z.string().min(1,`Tag ID is required for GTM`),dataLayerName:o.z.string().optional(),preview:o.z.string().optional()}),C=o.z.object({ga4:x.optional(),gtm:S.optional()}),w=o.z.object({siteUrl:o.z.string().url().optional(),docsDir:o.z.string().optional(),base:o.z.string().optional(),theme:h.optional(),i18n:_.optional(),versions:v.optional(),plugins:o.z.array(m).optional(),robots:g.optional(),security:y.optional(),seo:b.optional(),integrations:C.optional(),vite:o.z.record(o.z.string(),o.z.unknown()).optional()});function T(e,t,n=process.cwd()){let i=r.default.resolve(n,`.boltdocs`);s.default.existsSync(i)||s.default.mkdirSync(i,{recursive:!0});let a=e.i18n?Object.keys(e.i18n.locales):[],o=e.versions?e.versions.versions.map(e=>e.path):[],c=a.length>0?a.map(e=>`'${e}'`).join(` | `):`string`,l=o.length>0?o.map(e=>`'${e}'`).join(` | `):`string`,u=[`tsx`,`ts`,`jsx`,`js`],d=``,f=``;for(let e of u){let a=r.default.resolve(n,t,`mdx-components.${e}`);if(s.default.existsSync(a)){let e=r.default.join(n,t,`mdx-components`),a=r.default.relative(i,e).replace(/\\/g,`/`);d=`import type * as MdxComponentsModule from '${a.startsWith(`.`)?a:`./${a}`}'\n`,f=` MdxComponents: typeof MdxComponentsModule`;break}}let p=`// This file is automatically generated by Boltdocs.
7
+ // Do not edit this file manually.
8
+
9
+ ${d}declare global {
10
+ namespace Boltdocs {
11
+ interface Types {
12
+ Locale: ${c}
13
+ Version: ${l}${f?`\n${f}`:``}
14
+ }
15
+ }
16
+ }
17
+
18
+ export {}
19
+ `;s.default.writeFileSync(r.default.resolve(i,`types.d.ts`),p)}function E(e){return e}const D=[`boltdocs.config.js`,`boltdocs.config.mjs`,`boltdocs.config.ts`];async function O(e,i=process.cwd()){let a=i,o={docsDir:r.default.resolve(e),theme:{title:`Boltdocs`,description:`A Vite documentation framework`,navbar:[{label:`Home`,href:`/`},{label:`Documentation`,href:`/docs`}],codeTheme:{light:`github-light`,dark:`github-dark`}}},c={};for(let e of D){let t=r.default.resolve(a,e);if(s.default.existsSync(t))try{let e=await(0,n.loadConfigFromFile)({command:`serve`,mode:`development`},t,a);if(e){c=e.config;break}}catch(t){console.warn(`[boltdocs] Failed to load config from ${e}:`,t)}}let l={title:c.title,description:c.description,logo:c.logo,favicon:c.favicon,navbar:c.navbar,sidebar:c.sidebar,sidebarGroups:c.theme?.sidebarGroups,socialLinks:c.socialLinks,githubRepo:c.githubRepo,tabs:c.tabs,codeTheme:c.codeTheme,communityHelp:c.communityHelp,version:c.version,editLink:c.editLink,...c.theme||{}},u=Object.fromEntries(Object.entries(l).filter(([e,t])=>t!==void 0));u.navbar&&=u.navbar.map(e=>({label:e.label||e.text||``,href:e.href||e.link||e.to||``,items:e.items}));let d={docsDir:r.default.resolve(e),theme:{...o.theme,...u},i18n:c.i18n?{...c.i18n,locales:Array.isArray(c.i18n.locales)?Object.fromEntries(c.i18n.locales.map(e=>[e,e])):c.i18n.locales}:void 0,versions:c.versions,siteUrl:c.siteUrl,base:c.base,seo:c.seo,plugins:c.plugins||[],robots:c.robots,security:c.security,integrations:c.integrations,vite:c.vite},f=w.safeParse(d);if(!f.success)throw new t._(`Invalid Boltdocs configuration:\n${f.error.issues.map(e=>` - ${e.path.join(`.`)}: ${e.message}`).join(`
20
+ `)}`);return f.data}async function k(e,t=process.cwd()){let n=await O(e,t);return T(n,e,t),n}var ee=e.t({box:()=>R,colors:()=>A,confirm:()=>j,divider:()=>L,error:()=>F,formatLog:()=>M,info:()=>N,success:()=>I,warn:()=>P});const A={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`,dim:`\x1B[2m`,magenta:`\x1B[35m`};function j(e){let t=u.default.createInterface({input:process.stdin,output:process.stdout});return new Promise(n=>{t.question(`${M(e,A.yellow)} (y/N): `,e=>{t.close(),n(e.toLowerCase()===`y`||e.toLowerCase()===`yes`)})})}function M(e,t=``){return`${t}${A.bold}[boltdocs]${A.reset} ${e}${A.reset}`}function N(e){console.log(M(e))}function P(e){console.log(M(e,A.yellow))}function F(e,t){console.error(M(e,A.red)),t&&console.error(t)}function I(e){console.log(M(e,A.green))}function L(){console.log(A.gray+`─`.repeat(50)+A.reset)}function R(e){let t=`━`.repeat(e.length+4);console.log(`\n${A.cyan}┏${t}┓`),console.log(`┃ ${A.bold}${e}${A.reset}${A.cyan} ┃`),console.log(`┗${t}┛${A.reset}\n`)}const z={$schema:`https://boltdocs.vercel.app/schemas/doctor-config.schema.json`,checks:{metadata:{enabled:!0,titleMin:10,titleMax:60,descriptionMin:50,required:[`title`,`description`],optional:[],validateDates:!1},links:{internal:!0,external:!1,timeout:1e4,concurrency:10,ignore:[]},i18n:{enabled:!0}},fix:{confirmChanges:!1,backupFiles:!1,backupPath:`.boltdocs/backups`},reporting:{format:`pretty`,outputFile:`.boltdocs/doctor-report.json`,failOnError:!1,maxWarnings:-1},severity:{missingTranslation:`warning`,brokenLink:`high`,brokenAnchor:`warning`,largeFile:`warning`,orphanedPage:`low`,duplicateTitle:`low`,shortMetadata:`low`,missingMetadata:`warning`,malformedFrontmatter:`high`,invalidFrontmatter:`high`},exclude:[]};function B(e,t,n){return e.doctorConfig.severity[t]||n}async function te(e,t){s.default.existsSync(t)||s.default.mkdirSync(t,{recursive:!0});let n=r.default.basename(e),i=new Date().toISOString().replace(/[:.]/g,`-`),a=r.default.join(t,`${n}.${i}.bak`);s.default.copyFileSync(e,a)}const V=new Map;function H(e){let n=V.get(e);if(n)return n;let r=(async()=>{let n=await t.u(e,!1);return{raw:n.raw,data:n.data,content:n.content}})();return V.set(e,r),r}const U=new Map;function W(e){if(U.has(e))return U.get(e);let t=!1;try{t=s.default.existsSync(e)&&s.default.statSync(e).isFile()}catch{t=!1}return U.set(e,t),t}async function G(e){let t=r.default.resolve(e,`doctor.json`);if(s.default.existsSync(t))try{let e=JSON.parse(s.default.readFileSync(t,`utf-8`));return{...z,...e,checks:{...z.checks,...e.checks,metadata:{...z.checks.metadata,...e.checks?.metadata},links:{...z.checks.links,...e.checks?.links},i18n:{...z.checks.i18n,...e.checks?.i18n}},fix:{...z.fix,...e.fix},reporting:{...z.reporting,...e.reporting},severity:{...z.severity,...e.severity},exclude:[...z.exclude,...e.exclude||[]]}}catch(e){P(`Failed to parse doctor.json: ${e}`)}return z}async function K(e,n=process.cwd(),a,o){let c=r.default.resolve(n,`.boltdocs`);s.default.existsSync(c)||s.default.mkdirSync(c,{recursive:!0});let l=o;l||=await new i.fdir().withFullPaths().filter(e=>e.endsWith(`.md`)||e.endsWith(`.mdx`)).crawl(e).withPromise();let u=a?.base||`/docs`,d=[];for(let n=0;n<l.length;n+=100){let i=l.slice(n,n+100),a=await Promise.all(i.map(async n=>{let i=r.default.isAbsolute(n)?n:r.default.resolve(e,n),a=r.default.relative(e,i),{data:o}=await H(i),s;return s=o.permalink?o.permalink.startsWith(`/`)?o.permalink:`/${o.permalink}`:t.i(a),u===`/`?s:(u.endsWith(`/`)?u:u+`/`)+(s.startsWith(`/`)?s.substring(1):s)}));d.push(...a)}d.includes(u)||d.push(u);let f={routes:Array.from(new Set(d)).sort(),timestamp:Date.now()};return s.default.writeFileSync(r.default.resolve(c,`link-tree.json`),JSON.stringify(f,null,2)),f}function ne(e,t){if(e===t)return 1;if(!e||!t)return 0;let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean),i=n[n.length-1]||``,a=r[r.length-1]||``;if(i===a){let e=0;for(let t of n)r.includes(t)&&e++;return e>=2?.99:.9}if(i.length>3&&a.length>3&&(a.startsWith(i)||i.startsWith(a))&&Math.min(i.length,a.length)/Math.max(i.length,a.length)>.5)return .88;let o=1-(0,d.distance)(i,a)/Math.max(i.length,a.length);return o>.8?o*.95:1-(0,d.distance)(e,t)/Math.max(e.length,t.length)}const q=new Map;function J(e,t){if(q.has(e))return q.get(e);let n=e.length,r=``,i=0;for(let a of t){if(a===e)continue;let t=a.length,o=Math.max(n,t);if(o===0)continue;let s=1-Math.abs(n-t)/o;if(s<=.8&&s<=i)continue;let c=ne(e,a);c>i&&(i=c,r=a)}let a={bestMatch:r,similarity:i};return q.set(e,a),a}async function Y(e){let n=[];if(!e.doctorConfig.checks.metadata.enabled)return n;let{titleMin:r,titleMax:i,descriptionMin:a}=e.doctorConfig.checks.metadata,o=new Map;for(let s of e.files){let l=t.l(c.default.relative(e.docsDir,s));try{let{raw:c,data:u}=await H(s);if(c.trim().startsWith(`---`)&&c.split(`---`).length>=3&&Object.keys(u).length===0){let t=B(e,`malformedFrontmatter`,`high`);t!==`off`&&n.push({file:l,level:t,message:`Malformed frontmatter (YAML parsing failed).`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}let d=t.v.safeParse(u);if(!d.success){let t=B(e,`invalidFrontmatter`,`high`);if(t!==`off`)for(let e of d.error.issues)n.push({file:l,level:t,message:`Invalid frontmatter field "${e.path.join(`.`)}": ${e.message}`,suggestion:`Ensure the field follows the correct type.`})}let f=Array.from(new Set([`title`,...e.doctorConfig.checks.metadata.required]));for(let t of f)if(u[t]===void 0){let r=B(e,`missingMetadata`,`warning`);r!==`off`&&n.push({file:l,level:r,message:`Missing required frontmatter field: "${t}".`,suggestion:`Add the "${t}" field to your frontmatter.`})}if(e.doctorConfig.checks.metadata.validateDates){let t=[`date`,`lastUpdated`,...e.doctorConfig.checks.metadata.optional.filter(e=>e.toLowerCase().includes(`date`))];for(let r of t)if(u[r]&&isNaN(Date.parse(String(u[r])))){let t=B(e,`invalidFrontmatter`,`high`);t!==`off`&&n.push({file:l,level:t,message:`Invalid date format in field "${r}": "${u[r]}".`,suggestion:`Use a valid ISO date format (e.g., YYYY-MM-DD).`})}}if(u.title){let t=String(u.title);if(t.length<r){let i=B(e,`shortMetadata`,`low`);i!==`off`&&n.push({file:l,level:i,message:`Title is too short (${t.length} chars).`,suggestion:`Titles should be at least ${r} characters for better SEO.`})}else if(t.length>i){let r=B(e,`shortMetadata`,`low`);r!==`off`&&n.push({file:l,level:r,message:`Title is too long (${t.length} chars).`,suggestion:`Titles should be under ${i} characters.`})}let a=o.get(t)||[];a.push(l),o.set(t,a)}if(u.description&&String(u.description).length<a){let t=B(e,`shortMetadata`,`low`);t!==`off`&&n.push({file:l,level:t,message:`Description is very short.`,suggestion:`Descriptions should ideally be at least ${a} characters.`})}}catch(t){let r=B(e,`malformedFrontmatter`,`high`);r!==`off`&&n.push({file:l,level:r,message:`Malformed frontmatter (YAML error): ${t.message}`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}}for(let[t,r]of o.entries())if(r.length>1){let i=B(e,`duplicateTitle`,`low`);if(i!==`off`)for(let e of r)n.push({file:e,level:i,message:`Duplicate title found: "${t}"`,suggestion:`Ensure each page has a unique title. Also used in: ${r.filter(t=>t!==e).join(`, `)}`})}return n}async function X(e){let n=[],{internal:r,external:i,ignore:o,timeout:s,concurrency:l}=e.doctorConfig.checks.links;if(!r&&!i&&!e.options.checkExternal)return n;let u=/(?:\[.*?\]\((.*?)\))|(?:href=["']([^"']+)["'])/g,d=new Set,f=5e5;for(let s of e.files){let l=t.l(c.default.relative(e.docsDir,s)),{content:p}=await H(s),m=[...(p.length>f?p.slice(0,f):p).matchAll(u)];for(let t of m){let u=t[1]||t[2],f=!!t[1];if(!u||o.some(e=>u.includes(e)))continue;if(/^https?:\/\//i.test(u)){(i||e.options.checkExternal)&&d.add({url:u,file:s});continue}if(!r||/^(mailto|tel|#)/i.test(u))continue;let p;try{p=decodeURIComponent(u.split(`#`)[0].split(`?`)[0])}catch{p=u.split(`#`)[0].split(`?`)[0]}if(!p)continue;let m=!1,h=``;if(p.startsWith(`/`))if(e.routeIndex.has(p)||e.routeIndexWithSlash.has(p)||e.routeIndexWithoutSlash.has(p))m=!0;else{let t=e.basePrefix+(p.startsWith(`/`)?p:`/`+p);if(e.routeIndex.has(t)||e.routeIndexWithSlash.has(t))m=!1,h=t;else{let t=e.config.base!==`/`&&p.startsWith(e.config.base||`/`)?p.substring((e.config.base||`/`).length):p,n=t.startsWith(`/`)?t.substring(1):t;h=c.default.join(e.docsDir,n),m=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>W(h+e))}}else h=c.default.resolve(c.default.dirname(s),p),m=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>W(h+e));if(!m){let{bestMatch:t,similarity:r}=J(p,e.linkTree.routes),i=!1,o=e.basePrefix+(p.startsWith(`/`)?p:`/`+p);(e.routeIndex.has(o)||e.routeIndexWithSlash.has(o))&&(t=o,r=1,i=!0);let c=r>.6||i,d=r>.75&&t!==p||i,m=B(e,`brokenLink`,`high`);m!==`off`&&n.push({file:l,level:m,message:`Broken internal link: "${u}"`,suggestion:c?`Did you mean "${t}"?`:`Ensure the target exists or check for typos.`,fix:d?async()=>{let e=u.includes(`#`)?`#`+u.split(`#`)[1]:``,n=f?`(${u})`:`href="${u}"`,r=f?`(${t}${e})`:`href="${t}${e}"`,i=a.default.readFileSync(s,`utf-8`).replace(n,r);a.default.writeFileSync(s,i),V.delete(s)}:void 0})}}}if(d.size>0){N(`${A.gray}Verifying ${d.size} external links...${A.reset}`);let r=new Map;for(let e of d)r.has(e.url)||r.set(e.url,[]),r.get(e.url).push(e.file);let i=async e=>{try{let t=new AbortController,n=setTimeout(()=>t.abort(),s),r=await fetch(e,{method:`HEAD`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}});return clearTimeout(n),!r.ok&&r.status!==404?{url:e,ok:(await fetch(e,{method:`GET`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}})).ok}:{url:e,ok:r.ok}}catch(t){return{url:e,ok:!1,error:t.message}}},a=Array.from(r.keys()),o=[];for(let e=0;e<a.length;e+=l){let t=a.slice(e,e+l),n=await Promise.allSettled(t.map(i));o.push(...n.map(e=>e.status===`fulfilled`?e.value:{url:`unknown`,ok:!1,error:e.reason}))}for(let i of o)if(!i.ok){let a=B(e,`brokenLink`,`warning`);if(a!==`off`){let o=r.get(i.url)||[];for(let r of o)n.push({file:t.l(c.default.relative(e.docsDir,r)),level:a,message:`Broken external link: "${i.url}"`,suggestion:`Verify the URL or update it if it's permanently down. Error: ${i.error||`Status >= 400`}`})}}}return n}async function Z(e){let n=[];if(!e.doctorConfig.checks.i18n.enabled||!e.config.i18n)return n;let{defaultLocale:r,locales:i}=e.config.i18n,o=Object.keys(i),s=o.filter(e=>e!==r);for(let i of e.files){let l=t.l(c.default.relative(e.docsDir,i)),u=l.split(`/`),d=u[0];if(d===r){let t=u.slice(1).join(`/`);for(let r of s){let o=c.default.join(e.docsDir,r,t);if(!W(o)){let s=B(e,`missingTranslation`,`warning`);s!==`off`&&n.push({file:l,level:s,message:`Missing translation for locale "${r}"`,suggestion:`Create a version at "${r}/${t}".`,fix:async()=>{let e=c.default.dirname(o);a.default.existsSync(e)||a.default.mkdirSync(e,{recursive:!0}),a.default.copyFileSync(i,o)}})}}}else if(o.includes(d)){let t=u.slice(1).join(`/`);if(!W(c.default.join(e.docsDir,r,t))){let o=B(e,`missingTranslation`,`low`);o!==`off`&&n.push({file:l,level:o,message:`Orphaned translation (source missing in "${r}")`,suggestion:`Remove this file or create the source at "${r}/${t}".`,fix:async()=>{a.default.unlinkSync(i)}})}}}return n}async function Q(e){let t=[];if(!e.config.theme.sidebar)return t;let n=new Set,r=e.config.theme.sidebar;for(let[i,a]of Object.entries(r))for(let r of a){if(!r.text){let n=B(e,`invalidFrontmatter`,`warning`);n!==`off`&&t.push({file:`boltdocs.config.ts`,level:n,message:`Sidebar item in group "${i}" is missing a label.`,suggestion:`Add a "text" property to the sidebar item.`})}if(r.link&&(n.add(r.link),!e.routeIndex.has(r.link))){let{bestMatch:n,similarity:i}=J(r.link,e.linkTree.routes),a=i>.6,o=B(e,`brokenLink`,`high`);o!==`off`&&t.push({file:`boltdocs.config.ts`,level:o,message:`Broken sidebar link: "${r.link}"`,suggestion:a?`Did you mean "${n}"?`:`Ensure the route exists and is correctly formatted.`})}}for(let r of e.linkTree.routes)if(!(r===`/`||r===``)&&!n.has(r)){let n=B(e,`orphanedPage`,`low`);n!==`off`&&t.push({file:`Sidebar`,level:n,message:`Orphaned page found: "${r}" is not linked in the sidebar.`,suggestion:`Consider adding it to the sidebar for better discoverability.`})}return t}async function $(e){let t=c.default.resolve(e,`doctor.json`);if(a.default.existsSync(t)){P(`"doctor.json" already exists at ${e}.`);return}try{a.default.writeFileSync(t,JSON.stringify(z,null,2)),I(`Created "doctor.json" with default configuration.`)}catch(e){F(`Failed to create "doctor.json": ${e}`)}}async function re(e=process.cwd(),t={}){if(t.init){await $(e);return}try{let n=await G(e),{format:r}=n.reporting,{colors:o}=ee;r===`pretty`&&R(`DOCTOR - Documentation Health Check`);let s=performance.now(),u=await O(`docs`,e),d=c.default.resolve(e,`docs`);a.default.existsSync(d)||(r===`pretty`&&F(`Docs dir not found at ${d}`),process.exit(1)),r===`pretty`&&N(`${A.dim}🔍 Discovering files and routes...${A.reset}`);let f=(0,l.default)(n.exclude||[]),p=await new i.fdir().withFullPaths().filter(e=>{if(!(e.endsWith(`.md`)||e.endsWith(`.mdx`)))return!1;let t=c.default.relative(d,e).replace(/\\/g,`/`),n=t.split(`/`).some(e=>e.startsWith(`_`)&&e!==`_index.md`&&e!==`_index.mdx`);return!f(t)&&!n}).crawl(d).withPromise();for(let e of p)U.set(e,!0);let m=await K(d,e,u,p),h=u.base||`/`,g=h===`/`?``:h.endsWith(`/`)?h.slice(0,-1):h,_={root:e,docsDir:d,config:u,doctorConfig:n,linkTree:m,files:p,options:t,routeIndex:new Set(m.routes),routeIndexWithSlash:new Set(m.routes.map(e=>e.endsWith(`/`)?e:e+`/`)),routeIndexWithoutSlash:new Set(m.routes.map(e=>e.endsWith(`/`)?e.slice(0,-1):e)),basePrefix:g};r===`pretty`&&N(`${A.dim}🧪 Running diagnostic checks in parallel...${A.reset}`);let[v,y,b,x]=await Promise.all([Y(_),X(_),Z(_),Q(_)]),S=[...v,...y,...b,...x],C=0;if(t.fix){for(let e of S)if(e.fix){if(_.doctorConfig.fix.confirmChanges&&!await j(`Fix issue in "${e.file}": ${e.message}?`))continue;if(_.doctorConfig.fix.backupFiles){let t=c.default.resolve(_.docsDir,e.file);a.default.existsSync(t)&&await te(t,c.default.resolve(_.root,_.doctorConfig.fix.backupPath))}await e.fix(),C++}}let w=((performance.now()-s)/1e3).toFixed(2),T=S.filter(e=>e.level===`high`).length,E=S.filter(e=>e.level===`warning`).length,D=S.filter(e=>e.level===`low`).length,k={summary:{total:S.length,high:T,warning:E,low:D,fixed:C,duration:w},issues:S.map(e=>({...e,fix:void 0}))};if(n.reporting.outputFile){let t=c.default.resolve(e,n.reporting.outputFile);a.default.existsSync(c.default.dirname(t))||a.default.mkdirSync(c.default.dirname(t),{recursive:!0}),a.default.writeFileSync(t,JSON.stringify(k,null,2))}if(r===`json`)console.log(JSON.stringify(k,null,2));else if(r===`pretty`){let e=S.reduce((e,t)=>(e[t.file]||(e[t.file]=[]),e[t.file].push(t),e),{});if(S.length>0){L();for(let[n,r]of Object.entries(e)){console.log(`\n${o.bold}${o.cyan}📄 ${n}${o.reset}`);for(let e of r){let n=e.level===`high`?`❌`:e.level===`warning`?`⚠️`:`ℹ️`,r=e.level===`high`?o.red:e.level===`warning`?o.yellow:o.blue;console.log(` ${n} ${r}${e.level.toUpperCase()}${o.reset}: ${e.message}`),e.suggestion&&console.log(` ${o.dim}💡 Suggestion: ${e.suggestion}${o.reset}`),t.fix&&e.fix&&console.log(` ${o.green}✅ Fixed automatically${o.reset}`)}}L()}S.length===0?I(`Everything looks perfect! Your documentation is in great shape. ✨`):(console.log(`\n${o.bold}Diagnosis Results (${w}s):${o.reset}`),T>0&&console.log(` ${o.red}● ${T} Critical Errors${o.reset}`),E>0&&console.log(` ${o.yellow}● ${E} Warnings${o.reset}`),D>0&&console.log(` ${o.blue}● ${D} Improvements${o.reset}`),C>0&&I(`Successfully fixed ${C} issues automatically!`),T>0?console.log(`\n${o.red}${o.bold}[boltdocs] Please fix the critical errors before building for production.${o.reset}`):I(`[boltdocs] No critical issues found. You are ready to go!`))}n.reporting.failOnError&&T>0&&process.exit(1),n.reporting.maxWarnings!==-1&&E>n.reporting.maxWarnings&&(r===`pretty`&&F(`Failed: Too many warnings (${E} > ${n.reporting.maxWarnings})`),process.exit(1))}catch(e){F(`Doctor failed: ${e}`),process.exit(1)}}Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return F}});
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{_ as e,i as t,l as n,u as r,v as i}from"./utils-BxNAXhZZ.mjs";import{loadConfigFromFile as a}from"vite";import o from"node:path";import{fdir as s}from"fdir";import c from"fs";import{z as l}from"zod";import u from"node:fs";import d from"path";import f from"picomatch";import p from"node:readline";import{distance as m}from"fastest-levenshtein";var h=Object.defineProperty,g=(e,t)=>{let n={};for(var r in e)h(n,r,{get:e[r],enumerable:!0});return t||h(n,Symbol.toStringTag,{value:`Module`}),n};const _=l.object({icon:l.string().max(50),link:l.string().url()});l.object({text:l.string().max(2e3).optional()});const v=l.enum([`fs:read`,`fs:write`,`vite:config`,`mdx:remark`,`mdx:rehype`,`components`,`hooks:build`,`hooks:dev`]),y=l.object({name:l.string(),enforce:l.enum([`pre`,`post`]).optional(),version:l.string().optional(),boltdocsVersion:l.string().optional(),permissions:l.array(v).optional(),remarkPlugins:l.array(l.any()).optional(),rehypePlugins:l.array(l.any()).optional(),vitePlugins:l.array(l.any()).optional(),components:l.record(l.string(),l.string()).optional(),hooks:l.record(l.string(),l.any()).optional()}),b=l.object({title:l.union([l.string(),l.record(l.string(),l.string())]).optional(),description:l.union([l.string(),l.record(l.string(),l.string())]).optional(),logo:l.union([l.string(),l.object({dark:l.string(),light:l.string(),alt:l.string().optional(),width:l.number().optional(),height:l.number().optional()})]).optional(),navbar:l.array(l.object({label:l.union([l.string(),l.record(l.string(),l.string())]),href:l.string(),items:l.array(l.object({label:l.union([l.string(),l.record(l.string(),l.string())]),href:l.string()})).optional()})).optional(),sidebar:l.record(l.string(),l.array(l.object({text:l.string(),link:l.string()}))).optional(),sidebarGroups:l.record(l.string(),l.object({title:l.union([l.string(),l.record(l.string(),l.string())]).optional(),icon:l.string().optional()})).optional(),socialLinks:l.array(_).optional(),editLink:l.string().refine(e=>!e||e.includes(`:path`),{message:`editLink must contain ':path' placeholder if specified`}).optional(),communityHelp:l.string().url().optional(),version:l.string().max(50).optional(),githubRepo:l.string().max(100).optional(),favicon:l.string().optional(),tabs:l.array(l.object({id:l.string(),text:l.union([l.string(),l.record(l.string(),l.string())]),icon:l.string().optional()})).optional(),codeTheme:l.union([l.string(),l.object({light:l.string(),dark:l.string()})]).optional()}),x=l.union([l.string(),l.object({rules:l.array(l.object({userAgent:l.string(),allow:l.union([l.string(),l.array(l.string())]).optional(),disallow:l.union([l.string(),l.array(l.string())]).optional()})).optional(),sitemaps:l.array(l.string().url()).optional()})]),S=l.object({defaultLocale:l.string(),locales:l.union([l.record(l.string(),l.string()),l.array(l.string())]).transform(e=>Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e),localeConfigs:l.record(l.string(),l.object({label:l.string().optional(),direction:l.enum([`ltr`,`rtl`]).optional(),htmlLang:l.string().optional(),calendar:l.string().optional()})).optional()}),C=l.object({defaultVersion:l.string(),prefix:l.string().optional(),versions:l.array(l.object({label:l.string(),path:l.string()}))}),w=l.object({headers:l.record(l.string(),l.string()).optional(),enableCSP:l.boolean().optional(),customHeaders:l.record(l.string(),l.string()).optional()}),T=l.object({metatags:l.record(l.string(),l.string()).optional(),indexing:l.enum([`all`,`public`]).optional(),thumbnails:l.object({background:l.string().optional()}).optional()}),E=l.object({measurementId:l.string().min(1,`Measurement ID is required for GA4`),debug:l.boolean().optional(),anonymizeIp:l.boolean().optional(),sendPageView:l.boolean().optional(),cookieFlags:l.string().optional(),autoTrack:l.object({pageViews:l.boolean().optional(),downloads:l.boolean().optional(),externalLinks:l.boolean().optional(),search:l.boolean().optional()}).optional()}),D=l.object({tagId:l.string().min(1,`Tag ID is required for GTM`),dataLayerName:l.string().optional(),preview:l.string().optional()}),O=l.object({ga4:E.optional(),gtm:D.optional()}),ee=l.object({siteUrl:l.string().url().optional(),docsDir:l.string().optional(),base:l.string().optional(),theme:b.optional(),i18n:S.optional(),versions:C.optional(),plugins:l.array(y).optional(),robots:x.optional(),security:w.optional(),seo:T.optional(),integrations:O.optional(),vite:l.record(l.string(),l.unknown()).optional()});function k(e,t,n=process.cwd()){let r=o.resolve(n,`.boltdocs`);u.existsSync(r)||u.mkdirSync(r,{recursive:!0});let i=e.i18n?Object.keys(e.i18n.locales):[],a=e.versions?e.versions.versions.map(e=>e.path):[],s=i.length>0?i.map(e=>`'${e}'`).join(` | `):`string`,c=a.length>0?a.map(e=>`'${e}'`).join(` | `):`string`,l=[`tsx`,`ts`,`jsx`,`js`],d=``,f=``;for(let e of l){let i=o.resolve(n,t,`mdx-components.${e}`);if(u.existsSync(i)){let e=o.join(n,t,`mdx-components`),i=o.relative(r,e).replace(/\\/g,`/`);d=`import type * as MdxComponentsModule from '${i.startsWith(`.`)?i:`./${i}`}'\n`,f=` MdxComponents: typeof MdxComponentsModule`;break}}let p=`// This file is automatically generated by Boltdocs.
7
+ // Do not edit this file manually.
8
+
9
+ ${d}declare global {
10
+ namespace Boltdocs {
11
+ interface Types {
12
+ Locale: ${s}
13
+ Version: ${c}${f?`\n${f}`:``}
14
+ }
15
+ }
16
+ }
17
+
18
+ export {}
19
+ `;u.writeFileSync(o.resolve(r,`types.d.ts`),p)}function te(e){return e}const A=[`boltdocs.config.js`,`boltdocs.config.mjs`,`boltdocs.config.ts`];async function j(t,n=process.cwd()){let r=n,i={docsDir:o.resolve(t),theme:{title:`Boltdocs`,description:`A Vite documentation framework`,navbar:[{label:`Home`,href:`/`},{label:`Documentation`,href:`/docs`}],codeTheme:{light:`github-light`,dark:`github-dark`}}},s={};for(let e of A){let t=o.resolve(r,e);if(u.existsSync(t))try{let e=await a({command:`serve`,mode:`development`},t,r);if(e){s=e.config;break}}catch(t){console.warn(`[boltdocs] Failed to load config from ${e}:`,t)}}let c={title:s.title,description:s.description,logo:s.logo,favicon:s.favicon,navbar:s.navbar,sidebar:s.sidebar,sidebarGroups:s.theme?.sidebarGroups,socialLinks:s.socialLinks,githubRepo:s.githubRepo,tabs:s.tabs,codeTheme:s.codeTheme,communityHelp:s.communityHelp,version:s.version,editLink:s.editLink,...s.theme||{}},l=Object.fromEntries(Object.entries(c).filter(([e,t])=>t!==void 0));l.navbar&&=l.navbar.map(e=>({label:e.label||e.text||``,href:e.href||e.link||e.to||``,items:e.items}));let d={docsDir:o.resolve(t),theme:{...i.theme,...l},i18n:s.i18n?{...s.i18n,locales:Array.isArray(s.i18n.locales)?Object.fromEntries(s.i18n.locales.map(e=>[e,e])):s.i18n.locales}:void 0,versions:s.versions,siteUrl:s.siteUrl,base:s.base,seo:s.seo,plugins:s.plugins||[],robots:s.robots,security:s.security,integrations:s.integrations,vite:s.vite},f=ee.safeParse(d);if(!f.success)throw new e(`Invalid Boltdocs configuration:\n${f.error.issues.map(e=>` - ${e.path.join(`.`)}: ${e.message}`).join(`
20
+ `)}`);return f.data}async function ne(e,t=process.cwd()){let n=await j(e,t);return k(n,e,t),n}var re=g({box:()=>B,colors:()=>M,confirm:()=>N,divider:()=>z,error:()=>L,formatLog:()=>P,info:()=>F,success:()=>R,warn:()=>I});const M={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`,dim:`\x1B[2m`,magenta:`\x1B[35m`};function N(e){let t=p.createInterface({input:process.stdin,output:process.stdout});return new Promise(n=>{t.question(`${P(e,M.yellow)} (y/N): `,e=>{t.close(),n(e.toLowerCase()===`y`||e.toLowerCase()===`yes`)})})}function P(e,t=``){return`${t}${M.bold}[boltdocs]${M.reset} ${e}${M.reset}`}function F(e){console.log(P(e))}function I(e){console.log(P(e,M.yellow))}function L(e,t){console.error(P(e,M.red)),t&&console.error(t)}function R(e){console.log(P(e,M.green))}function z(){console.log(M.gray+`─`.repeat(50)+M.reset)}function B(e){let t=`━`.repeat(e.length+4);console.log(`\n${M.cyan}┏${t}┓`),console.log(`┃ ${M.bold}${e}${M.reset}${M.cyan} ┃`),console.log(`┗${t}┛${M.reset}\n`)}const V={$schema:`https://boltdocs.vercel.app/schemas/doctor-config.schema.json`,checks:{metadata:{enabled:!0,titleMin:10,titleMax:60,descriptionMin:50,required:[`title`,`description`],optional:[],validateDates:!1},links:{internal:!0,external:!1,timeout:1e4,concurrency:10,ignore:[]},i18n:{enabled:!0}},fix:{confirmChanges:!1,backupFiles:!1,backupPath:`.boltdocs/backups`},reporting:{format:`pretty`,outputFile:`.boltdocs/doctor-report.json`,failOnError:!1,maxWarnings:-1},severity:{missingTranslation:`warning`,brokenLink:`high`,brokenAnchor:`warning`,largeFile:`warning`,orphanedPage:`low`,duplicateTitle:`low`,shortMetadata:`low`,missingMetadata:`warning`,malformedFrontmatter:`high`,invalidFrontmatter:`high`},exclude:[]};function H(e,t,n){return e.doctorConfig.severity[t]||n}async function ie(e,t){u.existsSync(t)||u.mkdirSync(t,{recursive:!0});let n=o.basename(e),r=new Date().toISOString().replace(/[:.]/g,`-`),i=o.join(t,`${n}.${r}.bak`);u.copyFileSync(e,i)}const U=new Map;function W(e){let t=U.get(e);if(t)return t;let n=(async()=>{let t=await r(e,!1);return{raw:t.raw,data:t.data,content:t.content}})();return U.set(e,n),n}const G=new Map;function K(e){if(G.has(e))return G.get(e);let t=!1;try{t=u.existsSync(e)&&u.statSync(e).isFile()}catch{t=!1}return G.set(e,t),t}async function q(e){let t=o.resolve(e,`doctor.json`);if(u.existsSync(t))try{let e=JSON.parse(u.readFileSync(t,`utf-8`));return{...V,...e,checks:{...V.checks,...e.checks,metadata:{...V.checks.metadata,...e.checks?.metadata},links:{...V.checks.links,...e.checks?.links},i18n:{...V.checks.i18n,...e.checks?.i18n}},fix:{...V.fix,...e.fix},reporting:{...V.reporting,...e.reporting},severity:{...V.severity,...e.severity},exclude:[...V.exclude,...e.exclude||[]]}}catch(e){I(`Failed to parse doctor.json: ${e}`)}return V}async function J(e,n=process.cwd(),r,i){let a=o.resolve(n,`.boltdocs`);u.existsSync(a)||u.mkdirSync(a,{recursive:!0});let c=i;c||=await new s().withFullPaths().filter(e=>e.endsWith(`.md`)||e.endsWith(`.mdx`)).crawl(e).withPromise();let l=r?.base||`/docs`,d=[];for(let n=0;n<c.length;n+=100){let r=c.slice(n,n+100),i=await Promise.all(r.map(async n=>{let r=o.isAbsolute(n)?n:o.resolve(e,n),i=o.relative(e,r),{data:a}=await W(r),s;return s=a.permalink?a.permalink.startsWith(`/`)?a.permalink:`/${a.permalink}`:t(i),l===`/`?s:(l.endsWith(`/`)?l:l+`/`)+(s.startsWith(`/`)?s.substring(1):s)}));d.push(...i)}d.includes(l)||d.push(l);let f={routes:Array.from(new Set(d)).sort(),timestamp:Date.now()};return u.writeFileSync(o.resolve(a,`link-tree.json`),JSON.stringify(f,null,2)),f}function ae(e,t){if(e===t)return 1;if(!e||!t)return 0;let n=e.split(`/`).filter(Boolean),r=t.split(`/`).filter(Boolean),i=n[n.length-1]||``,a=r[r.length-1]||``;if(i===a){let e=0;for(let t of n)r.includes(t)&&e++;return e>=2?.99:.9}if(i.length>3&&a.length>3&&(a.startsWith(i)||i.startsWith(a))&&Math.min(i.length,a.length)/Math.max(i.length,a.length)>.5)return .88;let o=1-m(i,a)/Math.max(i.length,a.length);return o>.8?o*.95:1-m(e,t)/Math.max(e.length,t.length)}const Y=new Map;function X(e,t){if(Y.has(e))return Y.get(e);let n=e.length,r=``,i=0;for(let a of t){if(a===e)continue;let t=a.length,o=Math.max(n,t);if(o===0)continue;let s=1-Math.abs(n-t)/o;if(s<=.8&&s<=i)continue;let c=ae(e,a);c>i&&(i=c,r=a)}let a={bestMatch:r,similarity:i};return Y.set(e,a),a}async function Z(e){let t=[];if(!e.doctorConfig.checks.metadata.enabled)return t;let{titleMin:r,titleMax:a,descriptionMin:o}=e.doctorConfig.checks.metadata,s=new Map;for(let c of e.files){let l=n(d.relative(e.docsDir,c));try{let{raw:n,data:u}=await W(c);if(n.trim().startsWith(`---`)&&n.split(`---`).length>=3&&Object.keys(u).length===0){let n=H(e,`malformedFrontmatter`,`high`);n!==`off`&&t.push({file:l,level:n,message:`Malformed frontmatter (YAML parsing failed).`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}let d=i.safeParse(u);if(!d.success){let n=H(e,`invalidFrontmatter`,`high`);if(n!==`off`)for(let e of d.error.issues)t.push({file:l,level:n,message:`Invalid frontmatter field "${e.path.join(`.`)}": ${e.message}`,suggestion:`Ensure the field follows the correct type.`})}let f=Array.from(new Set([`title`,...e.doctorConfig.checks.metadata.required]));for(let n of f)if(u[n]===void 0){let r=H(e,`missingMetadata`,`warning`);r!==`off`&&t.push({file:l,level:r,message:`Missing required frontmatter field: "${n}".`,suggestion:`Add the "${n}" field to your frontmatter.`})}if(e.doctorConfig.checks.metadata.validateDates){let n=[`date`,`lastUpdated`,...e.doctorConfig.checks.metadata.optional.filter(e=>e.toLowerCase().includes(`date`))];for(let r of n)if(u[r]&&isNaN(Date.parse(String(u[r])))){let n=H(e,`invalidFrontmatter`,`high`);n!==`off`&&t.push({file:l,level:n,message:`Invalid date format in field "${r}": "${u[r]}".`,suggestion:`Use a valid ISO date format (e.g., YYYY-MM-DD).`})}}if(u.title){let n=String(u.title);if(n.length<r){let i=H(e,`shortMetadata`,`low`);i!==`off`&&t.push({file:l,level:i,message:`Title is too short (${n.length} chars).`,suggestion:`Titles should be at least ${r} characters for better SEO.`})}else if(n.length>a){let r=H(e,`shortMetadata`,`low`);r!==`off`&&t.push({file:l,level:r,message:`Title is too long (${n.length} chars).`,suggestion:`Titles should be under ${a} characters.`})}let i=s.get(n)||[];i.push(l),s.set(n,i)}if(u.description&&String(u.description).length<o){let n=H(e,`shortMetadata`,`low`);n!==`off`&&t.push({file:l,level:n,message:`Description is very short.`,suggestion:`Descriptions should ideally be at least ${o} characters.`})}}catch(n){let r=H(e,`malformedFrontmatter`,`high`);r!==`off`&&t.push({file:l,level:r,message:`Malformed frontmatter (YAML error): ${n.message}`,suggestion:`Check your YAML syntax for indentation or unquoted special characters.`})}}for(let[n,r]of s.entries())if(r.length>1){let i=H(e,`duplicateTitle`,`low`);if(i!==`off`)for(let e of r)t.push({file:e,level:i,message:`Duplicate title found: "${n}"`,suggestion:`Ensure each page has a unique title. Also used in: ${r.filter(t=>t!==e).join(`, `)}`})}return t}async function Q(e){let t=[],{internal:r,external:i,ignore:a,timeout:o,concurrency:s}=e.doctorConfig.checks.links;if(!r&&!i&&!e.options.checkExternal)return t;let l=/(?:\[.*?\]\((.*?)\))|(?:href=["']([^"']+)["'])/g,u=new Set,f=5e5;for(let o of e.files){let s=n(d.relative(e.docsDir,o)),{content:p}=await W(o),m=[...(p.length>f?p.slice(0,f):p).matchAll(l)];for(let n of m){let l=n[1]||n[2],f=!!n[1];if(!l||a.some(e=>l.includes(e)))continue;if(/^https?:\/\//i.test(l)){(i||e.options.checkExternal)&&u.add({url:l,file:o});continue}if(!r||/^(mailto|tel|#)/i.test(l))continue;let p;try{p=decodeURIComponent(l.split(`#`)[0].split(`?`)[0])}catch{p=l.split(`#`)[0].split(`?`)[0]}if(!p)continue;let m=!1,h=``;if(p.startsWith(`/`))if(e.routeIndex.has(p)||e.routeIndexWithSlash.has(p)||e.routeIndexWithoutSlash.has(p))m=!0;else{let t=e.basePrefix+(p.startsWith(`/`)?p:`/`+p);if(e.routeIndex.has(t)||e.routeIndexWithSlash.has(t))m=!1,h=t;else{let t=e.config.base!==`/`&&p.startsWith(e.config.base||`/`)?p.substring((e.config.base||`/`).length):p,n=t.startsWith(`/`)?t.substring(1):t;h=d.join(e.docsDir,n),m=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>K(h+e))}}else h=d.resolve(d.dirname(o),p),m=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`].some(e=>K(h+e));if(!m){let{bestMatch:n,similarity:r}=X(p,e.linkTree.routes),i=!1,a=e.basePrefix+(p.startsWith(`/`)?p:`/`+p);(e.routeIndex.has(a)||e.routeIndexWithSlash.has(a))&&(n=a,r=1,i=!0);let u=r>.6||i,d=r>.75&&n!==p||i,m=H(e,`brokenLink`,`high`);m!==`off`&&t.push({file:s,level:m,message:`Broken internal link: "${l}"`,suggestion:u?`Did you mean "${n}"?`:`Ensure the target exists or check for typos.`,fix:d?async()=>{let e=l.includes(`#`)?`#`+l.split(`#`)[1]:``,t=f?`(${l})`:`href="${l}"`,r=f?`(${n}${e})`:`href="${n}${e}"`,i=c.readFileSync(o,`utf-8`).replace(t,r);c.writeFileSync(o,i),U.delete(o)}:void 0})}}}if(u.size>0){F(`${M.gray}Verifying ${u.size} external links...${M.reset}`);let r=new Map;for(let e of u)r.has(e.url)||r.set(e.url,[]),r.get(e.url).push(e.file);let i=async e=>{try{let t=new AbortController,n=setTimeout(()=>t.abort(),o),r=await fetch(e,{method:`HEAD`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}});return clearTimeout(n),!r.ok&&r.status!==404?{url:e,ok:(await fetch(e,{method:`GET`,signal:t.signal,headers:{"User-Agent":`boltdocs-doctor/1.0`}})).ok}:{url:e,ok:r.ok}}catch(t){return{url:e,ok:!1,error:t.message}}},a=Array.from(r.keys()),c=[];for(let e=0;e<a.length;e+=s){let t=a.slice(e,e+s),n=await Promise.allSettled(t.map(i));c.push(...n.map(e=>e.status===`fulfilled`?e.value:{url:`unknown`,ok:!1,error:e.reason}))}for(let i of c)if(!i.ok){let a=H(e,`brokenLink`,`warning`);if(a!==`off`){let o=r.get(i.url)||[];for(let r of o)t.push({file:n(d.relative(e.docsDir,r)),level:a,message:`Broken external link: "${i.url}"`,suggestion:`Verify the URL or update it if it's permanently down. Error: ${i.error||`Status >= 400`}`})}}}return t}async function $(e){let t=[];if(!e.doctorConfig.checks.i18n.enabled||!e.config.i18n)return t;let{defaultLocale:r,locales:i}=e.config.i18n,a=Object.keys(i),o=a.filter(e=>e!==r);for(let i of e.files){let s=n(d.relative(e.docsDir,i)),l=s.split(`/`),u=l[0];if(u===r){let n=l.slice(1).join(`/`);for(let r of o){let a=d.join(e.docsDir,r,n);if(!K(a)){let o=H(e,`missingTranslation`,`warning`);o!==`off`&&t.push({file:s,level:o,message:`Missing translation for locale "${r}"`,suggestion:`Create a version at "${r}/${n}".`,fix:async()=>{let e=d.dirname(a);c.existsSync(e)||c.mkdirSync(e,{recursive:!0}),c.copyFileSync(i,a)}})}}}else if(a.includes(u)){let n=l.slice(1).join(`/`);if(!K(d.join(e.docsDir,r,n))){let a=H(e,`missingTranslation`,`low`);a!==`off`&&t.push({file:s,level:a,message:`Orphaned translation (source missing in "${r}")`,suggestion:`Remove this file or create the source at "${r}/${n}".`,fix:async()=>{c.unlinkSync(i)}})}}}return t}async function oe(e){let t=[];if(!e.config.theme.sidebar)return t;let n=new Set,r=e.config.theme.sidebar;for(let[i,a]of Object.entries(r))for(let r of a){if(!r.text){let n=H(e,`invalidFrontmatter`,`warning`);n!==`off`&&t.push({file:`boltdocs.config.ts`,level:n,message:`Sidebar item in group "${i}" is missing a label.`,suggestion:`Add a "text" property to the sidebar item.`})}if(r.link&&(n.add(r.link),!e.routeIndex.has(r.link))){let{bestMatch:n,similarity:i}=X(r.link,e.linkTree.routes),a=i>.6,o=H(e,`brokenLink`,`high`);o!==`off`&&t.push({file:`boltdocs.config.ts`,level:o,message:`Broken sidebar link: "${r.link}"`,suggestion:a?`Did you mean "${n}"?`:`Ensure the route exists and is correctly formatted.`})}}for(let r of e.linkTree.routes)if(!(r===`/`||r===``)&&!n.has(r)){let n=H(e,`orphanedPage`,`low`);n!==`off`&&t.push({file:`Sidebar`,level:n,message:`Orphaned page found: "${r}" is not linked in the sidebar.`,suggestion:`Consider adding it to the sidebar for better discoverability.`})}return t}var se=g({DEFAULT_DOCTOR_CONFIG:()=>V,checkI18n:()=>$,checkLinks:()=>Q,checkMetadata:()=>Z,checkSidebar:()=>oe,doctorAction:()=>le,doctorInit:()=>ce,generateLinkTree:()=>J,loadDoctorConfig:()=>q});async function ce(e){let t=d.resolve(e,`doctor.json`);if(c.existsSync(t)){I(`"doctor.json" already exists at ${e}.`);return}try{c.writeFileSync(t,JSON.stringify(V,null,2)),R(`Created "doctor.json" with default configuration.`)}catch(e){L(`Failed to create "doctor.json": ${e}`)}}async function le(e=process.cwd(),t={}){if(t.init){await ce(e);return}try{let n=await q(e),{format:r}=n.reporting,{colors:i}=re;r===`pretty`&&B(`DOCTOR - Documentation Health Check`);let a=performance.now(),o=await j(`docs`,e),l=d.resolve(e,`docs`);c.existsSync(l)||(r===`pretty`&&L(`Docs dir not found at ${l}`),process.exit(1)),r===`pretty`&&F(`${M.dim}🔍 Discovering files and routes...${M.reset}`);let u=f(n.exclude||[]),p=await new s().withFullPaths().filter(e=>{if(!(e.endsWith(`.md`)||e.endsWith(`.mdx`)))return!1;let t=d.relative(l,e).replace(/\\/g,`/`),n=t.split(`/`).some(e=>e.startsWith(`_`)&&e!==`_index.md`&&e!==`_index.mdx`);return!u(t)&&!n}).crawl(l).withPromise();for(let e of p)G.set(e,!0);let m=await J(l,e,o,p),h=o.base||`/`,g=h===`/`?``:h.endsWith(`/`)?h.slice(0,-1):h,_={root:e,docsDir:l,config:o,doctorConfig:n,linkTree:m,files:p,options:t,routeIndex:new Set(m.routes),routeIndexWithSlash:new Set(m.routes.map(e=>e.endsWith(`/`)?e:e+`/`)),routeIndexWithoutSlash:new Set(m.routes.map(e=>e.endsWith(`/`)?e.slice(0,-1):e)),basePrefix:g};r===`pretty`&&F(`${M.dim}🧪 Running diagnostic checks in parallel...${M.reset}`);let[v,y,b,x]=await Promise.all([Z(_),Q(_),$(_),oe(_)]),S=[...v,...y,...b,...x],C=0;if(t.fix){for(let e of S)if(e.fix){if(_.doctorConfig.fix.confirmChanges&&!await N(`Fix issue in "${e.file}": ${e.message}?`))continue;if(_.doctorConfig.fix.backupFiles){let t=d.resolve(_.docsDir,e.file);c.existsSync(t)&&await ie(t,d.resolve(_.root,_.doctorConfig.fix.backupPath))}await e.fix(),C++}}let w=((performance.now()-a)/1e3).toFixed(2),T=S.filter(e=>e.level===`high`).length,E=S.filter(e=>e.level===`warning`).length,D=S.filter(e=>e.level===`low`).length,O={summary:{total:S.length,high:T,warning:E,low:D,fixed:C,duration:w},issues:S.map(e=>({...e,fix:void 0}))};if(n.reporting.outputFile){let t=d.resolve(e,n.reporting.outputFile);c.existsSync(d.dirname(t))||c.mkdirSync(d.dirname(t),{recursive:!0}),c.writeFileSync(t,JSON.stringify(O,null,2))}if(r===`json`)console.log(JSON.stringify(O,null,2));else if(r===`pretty`){let e=S.reduce((e,t)=>(e[t.file]||(e[t.file]=[]),e[t.file].push(t),e),{});if(S.length>0){z();for(let[n,r]of Object.entries(e)){console.log(`\n${i.bold}${i.cyan}📄 ${n}${i.reset}`);for(let e of r){let n=e.level===`high`?`❌`:e.level===`warning`?`⚠️`:`ℹ️`,r=e.level===`high`?i.red:e.level===`warning`?i.yellow:i.blue;console.log(` ${n} ${r}${e.level.toUpperCase()}${i.reset}: ${e.message}`),e.suggestion&&console.log(` ${i.dim}💡 Suggestion: ${e.suggestion}${i.reset}`),t.fix&&e.fix&&console.log(` ${i.green}✅ Fixed automatically${i.reset}`)}}z()}S.length===0?R(`Everything looks perfect! Your documentation is in great shape. ✨`):(console.log(`\n${i.bold}Diagnosis Results (${w}s):${i.reset}`),T>0&&console.log(` ${i.red}● ${T} Critical Errors${i.reset}`),E>0&&console.log(` ${i.yellow}● ${E} Warnings${i.reset}`),D>0&&console.log(` ${i.blue}● ${D} Improvements${i.reset}`),C>0&&R(`Successfully fixed ${C} issues automatically!`),T>0?console.log(`\n${i.red}${i.bold}[boltdocs] Please fix the critical errors before building for production.${i.reset}`):R(`[boltdocs] No critical issues found. You are ready to go!`))}n.reporting.failOnError&&T>0&&process.exit(1),n.reporting.maxWarnings!==-1&&E>n.reporting.maxWarnings&&(r===`pretty`&&L(`Failed: Too many warnings (${E} > ${n.reporting.maxWarnings})`),process.exit(1))}catch(e){L(`Doctor failed: ${e}`),process.exit(1)}}export{A as a,te as c,g as d,R as i,k as l,J as n,j as o,L as r,ne as s,se as t,y as u};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./chunk-Ds5LZdWN.cjs`);let t=require(`node:path`);t=e.n(t);let n=require(`node:fs`);n=e.n(n);function r(e){return e.replace(/^v/,``).replace(/^\[|\]$/g,``)}function i(e){let t=e.match(/Thanks \[@(\w+)\]/);return t?t[1]:void 0}function a(e){let t=e.match(/Thanks \[@[^\]]+\]\(([^)]+)\)/);return t?t[1]:void 0}function o(e){let t=e.match(/\[`([a-f0-9]+)`\]/);return t?t[1]:void 0}function s(e){let t=e.match(/\[`[a-f0-9]+`\]\(([^)]+)\)/);return t?t[1]:void 0}function c(e,t){let n=e;return n=n.replace(/Thanks \[@[^\]]+\]\([^)]+\)/g,``),n=n.replace(/\[`[a-f0-9]+`\]\([^)]+\)/g,``),n=n.replace(/!\s*-/g,``),n=n.replace(/^-\s*/,``),n=n.replace(/^feat:\s*/i,``),n=n.replace(/^fix:\s*/i,``),n=n.replace(/^perf:\s*/i,``),n=n.replace(/^refactor:\s*/i,``),n=n.replace(/^docs:\s*/i,``),n=n.replace(/^chore:\s*/i,``),n=n.replace(/^\*\*[a-z]+(\([^)]+\))?:\*\*/gi,``),n.trim()}function l(e){let t=/^###\s+(Minor Changes|Major Changes|Patch Changes)/m.test(e),n=/^##\s+v?(\d+\.\d+\.\d+)/m.test(e);return t&&n}function u(e,t){for(let n=t+1;n<Math.min(t+10,e.length);n++){let t=e[n].trim().toLowerCase();if(t.startsWith(`### major`))return`major`;if(t.startsWith(`### minor`))return`minor`;if(t.startsWith(`### patch`))return`patch`}return null}function d(e){let t=e.split(`
7
+ `),n=[],l=null,d=``;for(let e=0;e<t.length;e++){let f=t[e].trim(),p=f.match(/^##\s+v?(\d+\.\d+\.\d+)/);if(p){l&&n.push(l);let i=r(p[1]),a=`patch`,o,s=f.match(/\((\d{4}-\d{2}-\d{2})\)/);s&&(o=s[1]);let c=u(t,e);c&&(a=c),l={version:i,type:a,date:o,changes:[]},d=``;continue}let m=f.match(/^###\s+(.+)$/i);if(m){d=m[1].toLowerCase();continue}if(f.startsWith(`- `)&&l){let e=f.slice(2).trim(),t=`other`;d.includes(`feat`)||d.includes(`minor`)?t=`feat`:d.includes(`fix`)||d.includes(`patch`)?t=`fix`:d.includes(`perf`)?t=`perf`:d.includes(`refactor`)?t=`refactor`:d.includes(`docs`)||d.includes(`documentation`)?t=`docs`:d.includes(`chore`)&&(t=`chore`);let n={type:t,message:c(e,t),author:i(e),authorUrl:a(e),commit:o(e),commitUrl:s(e)};l.changes.push(n)}}return l&&n.push(l),n}const f={name:`changesets`,detect:l,parse:d},p={added:`feat`,changed:`refactor`,deprecated:`fix`,removed:`fix`,fixed:`fix`,security:`fix`};function m(e){let t=/^#\s+Changelog/i.test(e),n=/^##\s*\[[\d.]+\]\s*-\s*\d{4}-\d{2}-\d{2}/m.test(e),r=/^###\s+(Added|Changed|Deprecated|Removed|Fixed|Security)$/m.test(e);return t&&n&&r}function h(e){let t=e.split(`
8
+ `),n=[],l=null,u=``;for(let e=0;e<t.length;e++){let d=t[e].trim(),f=d.match(/^##\s*\[(\d+\.\d+\.\d+[^\]]*)\]\s*-\s*(\d{4}-\d{2}-\d{2})/);if(f){l&&n.push(l),l={version:r(f[1]),type:`patch`,date:f[2],changes:[]},u=``;continue}if(d.match(/^##\s*\[Unreleased\]/i)){l&&n.push(l),l={version:`unreleased`,type:`patch`,date:void 0,changes:[]},u=``;continue}let m=d.match(/^###\s+(Added|Changed|Deprecated|Removed|Fixed|Security)$/i);if(m){u=m[1].toLowerCase();continue}if((d.startsWith(`- `)||d.startsWith(`* `))&&l){let e=d.slice(2).trim(),t=p[u]||`other`,n={type:t,message:c(e,t),author:i(e),authorUrl:a(e),commit:o(e),commitUrl:s(e)};l.changes.push(n)}}return l&&n.push(l),n}const g={name:`keep-a-changelog`,detect:m,parse:h},_={features:`feat`,"breaking changes":`feat`,breaking:`feat`,"bug fixes":`fix`,bugfixes:`fix`,fixes:`fix`,performance:`perf`,"build system":`chore`,builds:`chore`,tests:`chore`,chores:`chore`,documentation:`docs`,docs:`docs`,revert:`fix`,reverts:`fix`,refactor:`refactor`,"code refactoring":`refactor`};function v(e){let t=/^###\s+(Features|Bug Fixes|BREAKING CHANGES|Build System|Tests|Chores|Documentation|Reverts)/m.test(e),n=/^\*\*[a-z]+(\([^)]+\))?:\*\*/m.test(e),r=/^##\s*\[[\d.]+\]\([^)]+\)\s*\(\d{4}-\d{2}-\d{2}\)/m.test(e);return t&&(n||r)}function y(e){let t=e.split(`
9
+ `),n=[],l=null,u=``;for(let e=0;e<t.length;e++){let d=t[e].trim(),f=d.match(/^##\s*\[(\d+\.\d+\.\d+[^\]]*)\]\([^)]+\)\s*\((\d{4}-\d{2}-\d{2})\)/);if(f){l&&n.push(l);let i=r(f[1]),a=`patch`;for(let n=e+1;n<Math.min(e+20,t.length);n++){let e=t[n].toLowerCase();if(e.includes(`major`)||e.includes(`breaking`)){a=`major`;break}(e.includes(`minor`)||e.includes(`feat`))&&(a=`minor`)}l={version:i,type:a,date:f[2],changes:[]},u=``;continue}let p=d.match(/^###\s+(.+)$/i);if(p){u=p[1].toLowerCase();continue}if((d.startsWith(`- `)||d.startsWith(`* `))&&l){let e=d.slice(2).trim(),t=_[u]||`other`,n={type:t,message:c(e,t),author:i(e),authorUrl:a(e),commit:o(e),commitUrl:s(e)};l.changes.push(n)}}return l&&n.push(l),n}const b={name:`semantic-release`,detect:v,parse:y},x={features:`feat`,"breaking changes":`feat`,breaking:`feat`,"bug fixes":`fix`,fixes:`fix`,performance:`perf`,"build system":`chore`,builds:`chore`,tests:`chore`,chores:`chore`,documentation:`docs`,docs:`docs`,revert:`fix`,reverts:`fix`,refactor:`refactor`,"code refactoring":`refactor`};function S(e){let t=/^##\s+(\d+\.\d+\.\d+)\s*\((\d{4}-\d{2}-\d{2})\)/m.test(e),n=/^###\s+(Features|Bug Fixes|BREAKING CHANGES|Build System|Tests|Chores|Documentation)/m.test(e),r=/^[*-]\s+/m.test(e);return t&&n&&r}function C(e){let t=e.split(`
10
+ `),n=[],l=null,u=``;for(let e=0;e<t.length;e++){let d=t[e].trim(),f=d.match(/^##\s+(\d+\.\d+\.\d+)\s*\((\d{4}-\d{2}-\d{2})\)/);if(f){l&&n.push(l);let i=r(f[1]),a=`patch`;for(let n=e+1;n<Math.min(e+20,t.length);n++){let e=t[n].toLowerCase();if(e.includes(`major`)||e.includes(`breaking`)){a=`major`;break}(e.includes(`minor`)||e.includes(`feat`))&&(a=`minor`)}l={version:i,type:a,date:f[2],changes:[]},u=``;continue}let p=d.match(/^###\s+(.+)$/i);if(p){u=p[1].toLowerCase();continue}if((d.startsWith(`- `)||d.startsWith(`* `))&&l){let e=d.slice(2).trim(),t=x[u]||`other`,n={type:t,message:c(e,t),author:i(e),authorUrl:a(e),commit:o(e),commitUrl:s(e)};l.changes.push(n)}}return l&&n.push(l),n}const w=[g,b,{name:`standard-version`,detect:S,parse:C},f];function T(e){for(let t of w)if(t.detect(e))return{parser:t,name:t.name};return{parser:f,name:`changesets (fallback)`}}function E(e){let{parser:t}=T(e);return t?.parse(e)||[]}function D(e){return E(e)}function O(e){let r=t.default.resolve(e);if(!n.default.existsSync(r))throw Error(`Changelog file not found: ${r}`);return n.default.readFileSync(r,`utf-8`)}const k={feat:`Feature`,fix:`Bug Fix`,perf:`Performance`,refactor:`Refactor`,docs:`Documentation`,chore:`Chore`,other:`Other`};async function A(e,r={}){let i=t.default.resolve(r.output||`docs/changelog`),a=r.title||`Changelog`,o=r.inferTab!==!1,s=r.limit?Math.max(1,r.limit):void 0;console.log(`📄 Reading changelog from: ${e}`);let c=D(O(e));if(c.length===0){console.warn(`⚠️ No versions found in changelog`);return}let l=s?c.slice(0,s):c;n.default.existsSync(i)||(n.default.mkdirSync(i,{recursive:!0}),console.log(`📁 Created directory: ${i}`));for(let[e,r]of l.entries()){let s=j(r,a,o),c=`${e+1}.v${r.version}.md`,l=t.default.join(i,c);n.default.writeFileSync(l,s,`utf-8`),console.log(`✅ Generated: ${c}`)}let u=s&&s<c.length?`${s} of ${c.length} versions`:`${c.length} versions`;console.log(`\n✨ Generated ${u} changelog pages in ${i}`),console.log(`
11
+ 📝 Add this to your navbar in boltdocs.config.ts:`),console.log(` { label: '${a}', href: '/changelog' }`)}function j(e,t,n){let r=e.type.charAt(0).toUpperCase()+e.type.slice(1),i=M(e.changes),a=`---
12
+ title: v${e.version}
13
+ badge: "${r}"
14
+ description: Changelog version ${e.version}${e.date?` (${e.date})`:``}
15
+ ---
16
+
17
+ # ${t} v${e.version}
18
+
19
+ ${e.date?`**Released:** ${e.date}`:``}
20
+
21
+ `;for(let[e,t]of Object.entries(i)){if(t.length===0)continue;let n=k[e]||e;a+=`## ${n}\n\n`;for(let e of t)a+=`- ${e.message}\n`,e.author&&(e.authorUrl?a+=` - **Author:** [@${e.author}](${e.authorUrl})\n`:a+=` - **Author:** @${e.author}\n`),e.commit&&(e.commitUrl?a+=` - **Commit:** [\`${e.commit.slice(0,7)}\`](${e.commitUrl})\n`:a+=` - **Commit:** \`${e.commit.slice(0,7)}\`\n`);a+=`
22
+ `}return a}function M(e){let t={feat:[],fix:[],perf:[],refactor:[],docs:[],chore:[],other:[]};for(let n of e)t[t[n.type]?n.type:`other`].push(n);return t}exports.generateChangelog=A;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import e from"node:path";import t from"node:fs";function n(e){return e.replace(/^v/,``).replace(/^\[|\]$/g,``)}function r(e){let t=e.match(/Thanks \[@(\w+)\]/);return t?t[1]:void 0}function i(e){let t=e.match(/Thanks \[@[^\]]+\]\(([^)]+)\)/);return t?t[1]:void 0}function a(e){let t=e.match(/\[`([a-f0-9]+)`\]/);return t?t[1]:void 0}function o(e){let t=e.match(/\[`[a-f0-9]+`\]\(([^)]+)\)/);return t?t[1]:void 0}function s(e,t){let n=e;return n=n.replace(/Thanks \[@[^\]]+\]\([^)]+\)/g,``),n=n.replace(/\[`[a-f0-9]+`\]\([^)]+\)/g,``),n=n.replace(/!\s*-/g,``),n=n.replace(/^-\s*/,``),n=n.replace(/^feat:\s*/i,``),n=n.replace(/^fix:\s*/i,``),n=n.replace(/^perf:\s*/i,``),n=n.replace(/^refactor:\s*/i,``),n=n.replace(/^docs:\s*/i,``),n=n.replace(/^chore:\s*/i,``),n=n.replace(/^\*\*[a-z]+(\([^)]+\))?:\*\*/gi,``),n.trim()}function c(e){let t=/^###\s+(Minor Changes|Major Changes|Patch Changes)/m.test(e),n=/^##\s+v?(\d+\.\d+\.\d+)/m.test(e);return t&&n}function l(e,t){for(let n=t+1;n<Math.min(t+10,e.length);n++){let t=e[n].trim().toLowerCase();if(t.startsWith(`### major`))return`major`;if(t.startsWith(`### minor`))return`minor`;if(t.startsWith(`### patch`))return`patch`}return null}function u(e){let t=e.split(`
7
+ `),c=[],u=null,d=``;for(let e=0;e<t.length;e++){let f=t[e].trim(),p=f.match(/^##\s+v?(\d+\.\d+\.\d+)/);if(p){u&&c.push(u);let r=n(p[1]),i=`patch`,a,o=f.match(/\((\d{4}-\d{2}-\d{2})\)/);o&&(a=o[1]);let s=l(t,e);s&&(i=s),u={version:r,type:i,date:a,changes:[]},d=``;continue}let m=f.match(/^###\s+(.+)$/i);if(m){d=m[1].toLowerCase();continue}if(f.startsWith(`- `)&&u){let e=f.slice(2).trim(),t=`other`;d.includes(`feat`)||d.includes(`minor`)?t=`feat`:d.includes(`fix`)||d.includes(`patch`)?t=`fix`:d.includes(`perf`)?t=`perf`:d.includes(`refactor`)?t=`refactor`:d.includes(`docs`)||d.includes(`documentation`)?t=`docs`:d.includes(`chore`)&&(t=`chore`);let n={type:t,message:s(e,t),author:r(e),authorUrl:i(e),commit:a(e),commitUrl:o(e)};u.changes.push(n)}}return u&&c.push(u),c}const d={name:`changesets`,detect:c,parse:u},f={added:`feat`,changed:`refactor`,deprecated:`fix`,removed:`fix`,fixed:`fix`,security:`fix`};function p(e){let t=/^#\s+Changelog/i.test(e),n=/^##\s*\[[\d.]+\]\s*-\s*\d{4}-\d{2}-\d{2}/m.test(e),r=/^###\s+(Added|Changed|Deprecated|Removed|Fixed|Security)$/m.test(e);return t&&n&&r}function m(e){let t=e.split(`
8
+ `),c=[],l=null,u=``;for(let e=0;e<t.length;e++){let d=t[e].trim(),p=d.match(/^##\s*\[(\d+\.\d+\.\d+[^\]]*)\]\s*-\s*(\d{4}-\d{2}-\d{2})/);if(p){l&&c.push(l),l={version:n(p[1]),type:`patch`,date:p[2],changes:[]},u=``;continue}if(d.match(/^##\s*\[Unreleased\]/i)){l&&c.push(l),l={version:`unreleased`,type:`patch`,date:void 0,changes:[]},u=``;continue}let m=d.match(/^###\s+(Added|Changed|Deprecated|Removed|Fixed|Security)$/i);if(m){u=m[1].toLowerCase();continue}if((d.startsWith(`- `)||d.startsWith(`* `))&&l){let e=d.slice(2).trim(),t=f[u]||`other`,n={type:t,message:s(e,t),author:r(e),authorUrl:i(e),commit:a(e),commitUrl:o(e)};l.changes.push(n)}}return l&&c.push(l),c}const h={name:`keep-a-changelog`,detect:p,parse:m},g={features:`feat`,"breaking changes":`feat`,breaking:`feat`,"bug fixes":`fix`,bugfixes:`fix`,fixes:`fix`,performance:`perf`,"build system":`chore`,builds:`chore`,tests:`chore`,chores:`chore`,documentation:`docs`,docs:`docs`,revert:`fix`,reverts:`fix`,refactor:`refactor`,"code refactoring":`refactor`};function _(e){let t=/^###\s+(Features|Bug Fixes|BREAKING CHANGES|Build System|Tests|Chores|Documentation|Reverts)/m.test(e),n=/^\*\*[a-z]+(\([^)]+\))?:\*\*/m.test(e),r=/^##\s*\[[\d.]+\]\([^)]+\)\s*\(\d{4}-\d{2}-\d{2}\)/m.test(e);return t&&(n||r)}function v(e){let t=e.split(`
9
+ `),c=[],l=null,u=``;for(let e=0;e<t.length;e++){let d=t[e].trim(),f=d.match(/^##\s*\[(\d+\.\d+\.\d+[^\]]*)\]\([^)]+\)\s*\((\d{4}-\d{2}-\d{2})\)/);if(f){l&&c.push(l);let r=n(f[1]),i=`patch`;for(let n=e+1;n<Math.min(e+20,t.length);n++){let e=t[n].toLowerCase();if(e.includes(`major`)||e.includes(`breaking`)){i=`major`;break}(e.includes(`minor`)||e.includes(`feat`))&&(i=`minor`)}l={version:r,type:i,date:f[2],changes:[]},u=``;continue}let p=d.match(/^###\s+(.+)$/i);if(p){u=p[1].toLowerCase();continue}if((d.startsWith(`- `)||d.startsWith(`* `))&&l){let e=d.slice(2).trim(),t=g[u]||`other`,n={type:t,message:s(e,t),author:r(e),authorUrl:i(e),commit:a(e),commitUrl:o(e)};l.changes.push(n)}}return l&&c.push(l),c}const y={name:`semantic-release`,detect:_,parse:v},b={features:`feat`,"breaking changes":`feat`,breaking:`feat`,"bug fixes":`fix`,fixes:`fix`,performance:`perf`,"build system":`chore`,builds:`chore`,tests:`chore`,chores:`chore`,documentation:`docs`,docs:`docs`,revert:`fix`,reverts:`fix`,refactor:`refactor`,"code refactoring":`refactor`};function x(e){let t=/^##\s+(\d+\.\d+\.\d+)\s*\((\d{4}-\d{2}-\d{2})\)/m.test(e),n=/^###\s+(Features|Bug Fixes|BREAKING CHANGES|Build System|Tests|Chores|Documentation)/m.test(e),r=/^[*-]\s+/m.test(e);return t&&n&&r}function S(e){let t=e.split(`
10
+ `),c=[],l=null,u=``;for(let e=0;e<t.length;e++){let d=t[e].trim(),f=d.match(/^##\s+(\d+\.\d+\.\d+)\s*\((\d{4}-\d{2}-\d{2})\)/);if(f){l&&c.push(l);let r=n(f[1]),i=`patch`;for(let n=e+1;n<Math.min(e+20,t.length);n++){let e=t[n].toLowerCase();if(e.includes(`major`)||e.includes(`breaking`)){i=`major`;break}(e.includes(`minor`)||e.includes(`feat`))&&(i=`minor`)}l={version:r,type:i,date:f[2],changes:[]},u=``;continue}let p=d.match(/^###\s+(.+)$/i);if(p){u=p[1].toLowerCase();continue}if((d.startsWith(`- `)||d.startsWith(`* `))&&l){let e=d.slice(2).trim(),t=b[u]||`other`,n={type:t,message:s(e,t),author:r(e),authorUrl:i(e),commit:a(e),commitUrl:o(e)};l.changes.push(n)}}return l&&c.push(l),c}const C=[h,y,{name:`standard-version`,detect:x,parse:S},d];function w(e){for(let t of C)if(t.detect(e))return{parser:t,name:t.name};return{parser:d,name:`changesets (fallback)`}}function T(e){let{parser:t}=w(e);return t?.parse(e)||[]}function E(e){return T(e)}function D(n){let r=e.resolve(n);if(!t.existsSync(r))throw Error(`Changelog file not found: ${r}`);return t.readFileSync(r,`utf-8`)}const O={feat:`Feature`,fix:`Bug Fix`,perf:`Performance`,refactor:`Refactor`,docs:`Documentation`,chore:`Chore`,other:`Other`};async function k(n,r={}){let i=e.resolve(r.output||`docs/changelog`),a=r.title||`Changelog`,o=r.inferTab!==!1,s=r.limit?Math.max(1,r.limit):void 0;console.log(`📄 Reading changelog from: ${n}`);let c=E(D(n));if(c.length===0){console.warn(`⚠️ No versions found in changelog`);return}let l=s?c.slice(0,s):c;t.existsSync(i)||(t.mkdirSync(i,{recursive:!0}),console.log(`📁 Created directory: ${i}`));for(let[n,r]of l.entries()){let s=A(r,a,o),c=`${n+1}.v${r.version}.md`,l=e.join(i,c);t.writeFileSync(l,s,`utf-8`),console.log(`✅ Generated: ${c}`)}let u=s&&s<c.length?`${s} of ${c.length} versions`:`${c.length} versions`;console.log(`\n✨ Generated ${u} changelog pages in ${i}`),console.log(`
11
+ 📝 Add this to your navbar in boltdocs.config.ts:`),console.log(` { label: '${a}', href: '/changelog' }`)}function A(e,t,n){let r=e.type.charAt(0).toUpperCase()+e.type.slice(1),i=j(e.changes),a=`---
12
+ title: v${e.version}
13
+ badge: "${r}"
14
+ description: Changelog version ${e.version}${e.date?` (${e.date})`:``}
15
+ ---
16
+
17
+ # ${t} v${e.version}
18
+
19
+ ${e.date?`**Released:** ${e.date}`:``}
20
+
21
+ `;for(let[e,t]of Object.entries(i)){if(t.length===0)continue;let n=O[e]||e;a+=`## ${n}\n\n`;for(let e of t)a+=`- ${e.message}\n`,e.author&&(e.authorUrl?a+=` - **Author:** [@${e.author}](${e.authorUrl})\n`:a+=` - **Author:** @${e.author}\n`),e.commit&&(e.commitUrl?a+=` - **Commit:** [\`${e.commit.slice(0,7)}\`](${e.commitUrl})\n`:a+=` - **Commit:** \`${e.commit.slice(0,7)}\`\n`);a+=`
22
+ `}return a}function j(e){let t={feat:[],fix:[],perf:[],refactor:[],docs:[],chore:[],other:[]};for(let n of e)t[t[n.type]?n.type:`other`].push(n);return t}export{k as generateChangelog};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{useLocation as e,useNavigate as t}from"react-router-dom";import{createContext as n,use as r,useEffect as i,useMemo as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{clsx as l}from"clsx";import{twMerge as u}from"tailwind-merge";const d=Symbol.for(`__BDOCS_CONFIG_CONTEXT__`),f=Symbol.for(`__BDOCS_CONFIG_INSTANCE__`),p=globalThis[d]||(globalThis[d]=n(null));function m(){let e=r(p);if(!e&&typeof globalThis<`u`&&globalThis[f])return globalThis[f];if(!e)throw Error(`useConfig must be used within a ConfigProvider`);return e}const h=n({routes:[]});function g(){return r(h)}function _({routes:e,children:t}){return s(h.Provider,{value:{routes:e},children:t})}const v=`boltdocs-user-preferences`,y=Symbol.for(`__BDOCS_BOLTDOCS_CONTEXT__`),b=Symbol.for(`__BDOCS_BOLTDOCS_INSTANCE__`),x=globalThis[y]||(globalThis[y]=n(void 0));function S({children:e,initialLocale:t=``,initialVersion:n=``}){let r=()=>{if(typeof window>`u`)return{};try{let e=localStorage.getItem(v);return e?JSON.parse(e):{}}catch{return{}}},[c,l]=o(()=>t||r().locale||``),[u,d]=o(()=>n||r().version||``),[f,p]=o(()=>typeof window<`u`);i(()=>{p(!0)},[]);let m=a(()=>({currentLocale:c,currentVersion:u,setLocale:e=>{let t=e||``;if(l(t),typeof window<`u`)try{let e=r();localStorage.setItem(v,JSON.stringify({...e,locale:t}))}catch{}},setVersion:e=>{let t=e||``;if(d(t),typeof window<`u`)try{let e=r();localStorage.setItem(v,JSON.stringify({...e,version:t}))}catch{}},hasHydrated:f,setHasHydrated:p}),[c,u,f]);return typeof globalThis<`u`&&(globalThis[b]=m),s(x.Provider,{value:m,children:e})}function C(){let e=r(x);if(!e&&typeof globalThis<`u`&&globalThis[b])return globalThis[b];if(!e)throw Error(`useBoltdocsContext must be used within a BoltdocsProvider`);return e}function w(e){return e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e}function T(){let{routes:t}=g(),n=m(),r=e(),{hasHydrated:i,currentLocale:o,currentVersion:s}=C(),c=w(r.pathname),l=t?.find?.(e=>w(e.path)===c),u=n.i18n?o||n.i18n.defaultLocale:void 0,d=n.versions?s||n.versions.defaultVersion:void 0;return{routes:a(()=>{if(!t)return[];let e=new Map,r=n.i18n?.defaultLocale||``,i=n.versions?.defaultVersion||``;for(let n of t){let t=n.locale||r,a=n.version||i,o=`${n.filePath}::${t}::${a}`;e.set(o,(e.get(o)||0)+1)}return t.filter(t=>{let a=n.i18n?(t.locale||n.i18n.defaultLocale)===u:!0,o=n.versions?(t.version||n.versions.defaultVersion)===d:!0;if(!(a&&o))return!1;let s=!!l?.locale,c=!!l?.version,f=!!t.locale,p=!!t.version,m=t.locale||r,h=t.version||i,g=`${t.filePath}::${m}::${h}`;if((e.get(g)||0)>1){let e=n.i18n&&s!==f,t=n.versions&&c!==p;if(e||t)return!1}return!0})},[t,n,u,d,l]),allRoutes:t,currentRoute:l,currentLocale:u,currentVersion:d}}function E(e){let t=m(),{currentLocale:n,currentVersion:r,allRoutes:i}=T();if(!t||typeof e!=`string`)return e;if(e.startsWith(`http`)||e.startsWith(`//`)||e.startsWith(`#`)||e.startsWith(`site:`))return e.replace(`site:`,``);let[a,o]=e.split(/([?#].*)/s),s=a.endsWith(`/`)&&a.length>1?a.slice(0,-1):a,c=i?.some(e=>(e.path.endsWith(`/`)&&e.path.length>1?e.path.slice(0,-1):e.path)===(s||`/`)),l=t.i18n,u=t.versions,d=(t.base||`/docs`).replace(/\/$/,``),f=d.startsWith(`/`)?d.substring(1):d,p=a.split(`/`).filter(Boolean),h=f&&p.length>0&&p[0]===f||!c&&p.length>0,g=[...p],_=0;f&&g[_]===f&&_++,u&&g.length>_&&u.versions.find(e=>e.path===g[_])&&_++,l&&g.length>_&&(Array.isArray(l.locales)?l.locales.includes(g[_]):g[_]in l.locales)&&_++;let v=g.slice(_),y=[];h?(f&&y.push(f),u&&r&&y.push(r),l&&n&&y.push(n)):l&&n&&y.push(n),y.push(...v);let b=`/${y.join(`/`)}`;return a.endsWith(`/`)&&a.length>1&&!b.endsWith(`/`)&&(b+=`/`),(b||`/`)+(o||``)}function D(...e){return u(l(e))}const O=e=>{let{href:n,onMouseEnter:r,onFocus:i,onClick:a,...o}=e,c=t(),l=E(n??``),u=e=>{a?.(e),!e.defaultPrevented&&(l&&(l.startsWith(`http://`)||l.startsWith(`https://`)||l.startsWith(`//`))||(e.preventDefault(),c(l)))},d=e=>{r?.(e)},f=e=>{i?.(e)};return s(`a`,{...o,href:l,onClick:u,onMouseEnter:d,onFocus:f})},k=t=>{let{href:n,end:r=!1,className:i,children:a,...o}=t,c=e(),l=E(n??``),u=r?c.pathname===l:c.pathname.startsWith(l),d=typeof i==`function`?i({isActive:u}):D(i,u&&`active`),f=typeof a==`function`?a({isActive:u}):a;return s(O,{...o,href:n,className:d,children:f})};function A(e){let{size:t=20,...n}=e;return{...n,width:t,height:t}}const j=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...A(e),children:[s(`title`,{children:`GitHub`}),s(`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`})]}),M=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[s(`title`,{children:`CSV`}),c(`mask`,{id:`a`,maskUnits:`userSpaceOnUse`,x:`3`,y:`3`,width:`18`,height:`18`,fill:`#000`,children:[s(`path`,{fill:`#fff`,d:`M3 3h18v18H3z`}),s(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.8889 5H8.11111C6.39289 5 5 6.39289 5 8.11111v7.77779C5 17.6071 6.39289 19 8.11111 19h7.77779C17.6071 19 19 17.6071 19 15.8889V8.11111C19 6.39289 17.6071 5 15.8889 5Zm0 12.4444H8.1111c-.05369 0-.10674-.0027-.15904-.008.0523.0053.10536.008.15905.008h7.77779Zm1.5555-1.5555c0 .8054-.6121 1.4679-1.3965 1.5475.7844-.0797 1.3965-.7421 1.3965-1.5475V8.11111v7.77779Z`})]}),s(`path`,{d:`M15.8889 19.4444c1.1046 0 2-.8954 2-2 0-1.1045-.8954-2-2-2v4Zm-7.7778-2 .00001-2H8.1111v2Zm-.15904-.008.20206-1.9898c-1.09891-.1115-2.08022.6888-2.19182 1.7877-.1116 1.099.68877 2.0803 1.78768 2.1919l.20208-1.9898Zm8.09584 0-.2021-1.9897c-1.0989.1116-1.8992 1.0929-1.7876 2.1918.1116 1.0989 1.0929 1.8993 2.1918 1.7877l-.2021-1.9898Zm3.3965-9.32529c0-1.10457-.8954-2-2-2-1.1045 0-2 .89543-2 2h4ZM8.11111 7h7.77779V3H8.11111v4ZM7 8.11111C7 7.49746 7.49746 7 8.11111 7V3C5.28832 3 3 5.28832 3 8.11111h4Zm0 7.77779V8.11111H3v7.77779h4ZM8.11111 17C7.49746 17 7 16.5025 7 15.8889H3C3 18.7117 5.28832 21 8.11111 21v-4Zm7.77779 0H8.11111v4h7.77779v-4ZM17 15.8889C17 16.5025 16.5025 17 15.8889 17v4C18.7117 21 21 18.7117 21 15.8889h-4Zm0-7.77779v7.77779h4V8.11111h-4ZM15.8889 7C16.5025 7 17 7.49746 17 8.11111h4C21 5.28832 18.7117 3 15.8889 3v4Zm0 8.4444H8.11111l-.00001 4h7.7778v-4Zm-7.7778 0c.01378 0 .02816.0007.04302.0022l-.40411 3.9796c.11944.0121.23994.0182.36109.0182v-4Zm-.36112 3.9818c.11935.0121.23985.0182.36113.0182v-4c.01389 0 .02828.0008.04304.0022l-.40417 3.9796Zm.36113.0182h7.77779v-4H8.11111v4Zm8.13889-.0182c1.7951-.1823 3.1944-1.6951 3.1944-3.5373h-4c0-.2314.1752-.4193.4015-.4423l.4041 3.9796Zm-.8056-3.5373c0-.2314.1752-.4193.4014-.4422l.4042 3.9795c1.795-.1823 3.1944-1.6951 3.1944-3.5373h-4Zm0-7.77779v7.77779h4V8.11111h-4Zm4 0c0-.07155-.0038-.14596-.0124-.22267-.0086-.07678-.0218-.15478-.0403-.23343-.0184-.07869-.0416-.15651-.0697-.233-.0281-.07648-.0604-.15005-.0963-.22045-.036-.07036-.0749-.13629-.1158-.1978-.0408-.06145-.0832-.11775-.1258-.16912-.085-.10251-.1704-.18478-.2468-.2495-.0383-.03245-.0749-.061-.1089-.08594-.034-.02494-.0659-.04672-.0949-.06556-.029-.01883-.0558-.03518-.0797-.04914-.0239-.01396-.0456-.02598-.0644-.03606-.0188-.01008-.0355-.01864-.0493-.02558-.0139-.00694-.0257-.01268-.0348-.01701-.009-.00429-.0163-.00769-.0207-.00971-.0022-.00104-.004-.00187-.0051-.00238-.0006-.00025-.001-.00046-.0013-.00059-.0002-.00006-.0003-.00011-.0003-.00014-.0001-.00001-.0001-.00003-.0001-.00004v-.00001c-.0006-.00027.0028.00131.0068.00316.0044.00202.0117.00541.0207.00971.0091.00433.0209.01007.0348.01701.0138.00694.0305.0155.0493.02558.0188.01008.0405.0221.0644.03606.0239.01396.0507.03031.0797.04914.029.01883.0609.04062.0949.06556.0339.02494.0706.05349.1089.08594.0764.06472.1618.14698.2468.24949.0426.05138.085.10768.1258.16913.0409.06151.0798.12744.1157.19779.036.07041.0683.14397.0964.22046.028.07648.0513.15431.0697.23299.0185.07865.0317.15665.0403.23344.0086.07671.0124.15112.0124.22267h-4c0 .07154.0039.14595.0125.22267.0086.07678.0218.15478.0402.23343.0185.07868.0417.15651.0698.233.0281.07648.0604.15005.0963.22045.036.07036.0749.13629.1158.1978.0408.06144.0832.11775.1258.16912.0849.10251.1704.18478.2468.2495.0383.03244.0749.061.1089.08594.0339.02493.0658.04672.0949.06556.029.01883.0558.03517.0797.04914.0239.01396.0456.02598.0644.03606.0188.01007.0354.01864.0493.02558.0139.00693.0257.01268.0348.01701.009.00429.0163.00769.0207.00971.0022.00104.004.00187.0051.00237.0006.00026.001.00047.0013.00059.0001.00007.0003.00012.0003.00015.0001.00001.0001.00003.0001.00004v.00001c.0006.00026-.0028-.00131-.0068-.00316-.0044-.00202-.0117-.00542-.0207-.00971-.0091-.00433-.0209-.01008-.0348-.01701-.0139-.00694-.0305-.01551-.0493-.02558-.0188-.01008-.0405-.0221-.0644-.03606-.0239-.01396-.0507-.03031-.0797-.04914-.029-.01884-.061-.04062-.0949-.06556-.034-.02494-.0706-.0535-.1089-.08594-.0764-.06472-.1619-.14699-.2468-.2495-.0426-.05137-.085-.10767-.1258-.16912-.0409-.06151-.0798-.12744-.1158-.1978-.0359-.0704-.0682-.14397-.0963-.22045-.0281-.07649-.0513-.15431-.0698-.233-.0184-.07865-.0316-.15665-.0402-.23343-.0086-.07671-.0125-.15112-.0125-.22267h4Zm0 7.77779V8.11111h-4v7.77779h4Z`,fill:`#14B8A6`,mask:`url(#a)`}),s(`rect`,{x:`7`,y:`7`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),s(`rect`,{x:`7`,y:`11`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),s(`rect`,{x:`7`,y:`15`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),s(`rect`,{x:`13`,y:`7`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),s(`rect`,{x:`13`,y:`11`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),s(`rect`,{x:`13`,y:`15`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`})]}),N=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...A(e),children:[s(`title`,{children:`Discord`}),s(`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`})]}),P=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...A(e),children:[s(`title`,{children:`X`}),s(`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`})]}),F=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...A(e),children:[s(`title`,{children:`Bluesky`}),s(`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`})]}),I=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[s(`title`,{children:`TypeScript`}),s(`path`,{fill:`#2563EB`,d:`M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z`})]}),L=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[s(`title`,{children:`JavaScript`}),s(`path`,{fill:`#F59E0B`,d:`M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z`})]}),R=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[s(`title`,{children:`JSON`}),s(`path`,{fill:`#F59E0B`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),z=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[s(`title`,{children:`CSS`}),s(`path`,{fill:`#0EA5E9`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),B=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[s(`title`,{children:`HTML`}),s(`path`,{fill:`#EA580C`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),V=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[s(`title`,{children:`React`}),s(`path`,{fill:`#0E8ADC`,d:`M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z`}),s(`path`,{stroke:`#0E8ADC`,d:`M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z`}),s(`path`,{stroke:`#0E8ADC`,d:`M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z`}),s(`path`,{stroke:`#0E8ADC`,d:`M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z`})]}),H=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[s(`title`,{children:`Markdown`}),s(`path`,{fill:`#60A5FA`,d:`M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z`})]}),U=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...A(e),children:[s(`title`,{children:`Shell`}),s(`path`,{stroke:`#14B8A6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M4.336 17l6-6-6-6M12.336 19h8`})]}),W=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[s(`title`,{children:`YAML`}),s(`path`,{fill:`#A78BFA`,d:`M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z`})]}),G=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...A(e),children:[s(`title`,{children:`Rust`}),s(`path`,{fill:`#EA580C`,fillRule:`evenodd`,d:`M12.58 2.136a.287.287 0 00-.488 0l-.526.85a8.974 8.974 0 00-.232.022l-.683-.73a.287.287 0 00-.478.096l-.35.935c-.075.021-.15.044-.224.067l-.812-.583a.287.287 0 00-.45.187l-.162.989a9.088 9.088 0 00-.204.11l-.913-.417a.287.287 0 00-.406.272l.036 1.005a9.099 9.099 0 00-.175.144l-.98-.231a.287.287 0 00-.345.345l.231.98a9.125 9.125 0 00-.144.175L4.27 6.316a.287.287 0 00-.271.406l.416.913a9.036 9.036 0 00-.11.203L3.317 8a.287.287 0 00-.187.45l.584.813a8.953 8.953 0 00-.068.223l-.935.35a.287.287 0 00-.095.479l.73.682a8.966 8.966 0 00-.023.233l-.85.526a.287.287 0 000 .488l.85.526c.007.078.014.156.023.233l-.73.682a.287.287 0 00.095.479l.935.35.068.223-.584.812a.287.287 0 00.187.451l.99.162c.035.068.072.135.109.203l-.416.913a.287.287 0 00.271.406l1.006-.036c.047.059.095.117.143.174l-.23.981a.287.287 0 00.344.345l.981-.23c.057.048.115.095.174.142l-.036 1.006a.287.287 0 00.406.272l.914-.417c.067.038.135.074.203.11l.161.99a.287.287 0 00.451.186l.813-.584c.074.024.148.046.223.068l.35.935a.287.287 0 00.478.095l.683-.73c.077.01.154.017.232.023l.526.85a.287.287 0 00.489 0l.526-.85c.078-.006.155-.014.232-.023l.682.73a.287.287 0 00.479-.095l.35-.935c.075-.022.15-.044.223-.068l.813.584a.287.287 0 00.45-.187l.162-.99a8.77 8.77 0 00.203-.109l.913.417a.287.287 0 00.406-.272l-.035-1.006c.058-.047.116-.094.174-.143l.98.231a.287.287 0 00.346-.345l-.231-.98.143-.175 1.006.036a.287.287 0 00.271-.406l-.416-.913a9.4 9.4 0 00.109-.203l.99-.162a.287.287 0 00.187-.45l-.584-.813a8.43 8.43 0 00.067-.223l.935-.35a.287.287 0 00.096-.479l-.73-.682c.009-.077.016-.155.023-.233l.85-.526a.287.287 0 000-.488l-.85-.526a8.844 8.844 0 00-.023-.233l.73-.682a.287.287 0 00-.096-.479l-.934-.35a9.246 9.246 0 00-.068-.223l.584-.812A.287.287 0 0021.357 8l-.99-.162a8.92 8.92 0 00-.11-.203l.417-.913a.287.287 0 00-.271-.406l-1.006.036a9.178 9.178 0 00-.143-.174l.23-.981a.287.287 0 00-.345-.345l-.98.23a9.43 9.43 0 00-.174-.142l.035-1.006a.287.287 0 00-.405-.272l-.914.417a9.11 9.11 0 00-.203-.11l-.162-.99a.287.287 0 00-.45-.186l-.813.584a9.088 9.088 0 00-.223-.068l-.35-.935a.287.287 0 00-.479-.095l-.682.73a9.062 9.062 0 00-.232-.023l-.526-.85zm-.257 1.62a.592.592 0 01.578.596.595.595 0 11-.578-.595zm1.363.98A7.324 7.324 0 0118.7 8.309l-.702 1.585a.547.547 0 00.275.717l1.352.6c.041.422.047.847.015 1.27h-.752c-.075 0-.106.05-.106.123v.344c0 .812-.457.99-.859 1.034-.383.044-.806-.161-.86-.394-.22-1.24-.583-1.526-1.152-1.975l-.041-.033c.736-.467 1.502-1.158 1.502-2.08 0-.998-.683-1.625-1.148-1.934-.655-.43-1.379-.516-1.574-.516H6.88a7.324 7.324 0 014.098-2.312l.916.96a.54.54 0 00.766.018l1.026-.978zm-8.46 4.407a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm14.192.026a.595.595 0 11-.035 1.19.595.595 0 01.035-1.19zm-13.07.096h1.037v4.678H5.291a7.324 7.324 0 01-.237-2.797l1.282-.57a.542.542 0 00.276-.716l-.264-.595zm4.33.05h2.47c.128 0 .901.147.901.727 0 .48-.593.653-1.081.653h-2.293l.002-1.38zm0 3.36h1.892c.172 0 .924.05 1.164 1.011.026.104.064.291.107.503.078.389.174.861.247 1.06.113.345.57 1.034 1.058 1.034h3.089c-.207.277-.433.54-.677.785l-1.258-.27a.544.544 0 00-.645.417l-.298 1.394a7.323 7.323 0 01-6.108-.03l-.298-1.392a.542.542 0 00-.643-.418l-1.23.264a7.32 7.32 0 01-.636-.75h5.984c.067 0 .113-.011.113-.074v-2.117c0-.061-.046-.075-.113-.075h-1.75l.001-1.341zm-2.763 4.848a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm8.814.027a.596.596 0 11-.035 1.19.596.596 0 01.035-1.19z`,clipRule:`evenodd`})]}),K=e=>c(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...A(e),children:[s(`title`,{children:`Rust`}),s(`path`,{fill:`#F87171`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]});export{S as C,m as D,p as E,w as S,_ as T,O as _,M as a,E as b,L as c,V as d,G as f,W as g,P as h,z as i,R as l,I as m,B as n,N as o,U as p,K as r,j as s,F as t,H as u,k as v,C as w,T as x,D as y};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`react-router-dom`),l=require(`react`),u=require(`react/jsx-runtime`),d=require(`clsx`),f=require(`tailwind-merge`);const p=Symbol.for(`__BDOCS_CONFIG_CONTEXT__`),m=Symbol.for(`__BDOCS_CONFIG_INSTANCE__`),h=globalThis[p]||(globalThis[p]=(0,l.createContext)(null));function g(){let e=(0,l.use)(h);if(!e&&typeof globalThis<`u`&&globalThis[m])return globalThis[m];if(!e)throw Error(`useConfig must be used within a ConfigProvider`);return e}const _=(0,l.createContext)({routes:[]});function v(){return(0,l.use)(_)}function y({routes:e,children:t}){return(0,u.jsx)(_.Provider,{value:{routes:e},children:t})}const b=`boltdocs-user-preferences`,x=Symbol.for(`__BDOCS_BOLTDOCS_CONTEXT__`),S=Symbol.for(`__BDOCS_BOLTDOCS_INSTANCE__`),C=globalThis[x]||(globalThis[x]=(0,l.createContext)(void 0));function w({children:e,initialLocale:t=``,initialVersion:n=``}){let r=()=>{if(typeof window>`u`)return{};try{let e=localStorage.getItem(b);return e?JSON.parse(e):{}}catch{return{}}},[i,a]=(0,l.useState)(()=>t||r().locale||``),[o,s]=(0,l.useState)(()=>n||r().version||``),[c,d]=(0,l.useState)(()=>typeof window<`u`);(0,l.useEffect)(()=>{d(!0)},[]);let f=(0,l.useMemo)(()=>({currentLocale:i,currentVersion:o,setLocale:e=>{let t=e||``;if(a(t),typeof window<`u`)try{let e=r();localStorage.setItem(b,JSON.stringify({...e,locale:t}))}catch{}},setVersion:e=>{let t=e||``;if(s(t),typeof window<`u`)try{let e=r();localStorage.setItem(b,JSON.stringify({...e,version:t}))}catch{}},hasHydrated:c,setHasHydrated:d}),[i,o,c]);return typeof globalThis<`u`&&(globalThis[S]=f),(0,u.jsx)(C.Provider,{value:f,children:e})}function T(){let e=(0,l.use)(C);if(!e&&typeof globalThis<`u`&&globalThis[S])return globalThis[S];if(!e)throw Error(`useBoltdocsContext must be used within a BoltdocsProvider`);return e}function E(e){return e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e}function D(){let{routes:e}=v(),t=g(),n=(0,c.useLocation)(),{hasHydrated:r,currentLocale:i,currentVersion:a}=T(),o=E(n.pathname),s=e?.find?.(e=>E(e.path)===o),u=t.i18n?i||t.i18n.defaultLocale:void 0,d=t.versions?a||t.versions.defaultVersion:void 0;return{routes:(0,l.useMemo)(()=>{if(!e)return[];let n=new Map,r=t.i18n?.defaultLocale||``,i=t.versions?.defaultVersion||``;for(let t of e){let e=t.locale||r,a=t.version||i,o=`${t.filePath}::${e}::${a}`;n.set(o,(n.get(o)||0)+1)}return e.filter(e=>{let a=t.i18n?(e.locale||t.i18n.defaultLocale)===u:!0,o=t.versions?(e.version||t.versions.defaultVersion)===d:!0;if(!(a&&o))return!1;let c=!!s?.locale,l=!!s?.version,f=!!e.locale,p=!!e.version,m=e.locale||r,h=e.version||i,g=`${e.filePath}::${m}::${h}`;if((n.get(g)||0)>1){let e=t.i18n&&c!==f,n=t.versions&&l!==p;if(e||n)return!1}return!0})},[e,t,u,d,s]),allRoutes:e,currentRoute:s,currentLocale:u,currentVersion:d}}function O(e){let t=g(),{currentLocale:n,currentVersion:r,allRoutes:i}=D();if(!t||typeof e!=`string`)return e;if(e.startsWith(`http`)||e.startsWith(`//`)||e.startsWith(`#`)||e.startsWith(`site:`))return e.replace(`site:`,``);let[a,o]=e.split(/([?#].*)/s),s=a.endsWith(`/`)&&a.length>1?a.slice(0,-1):a,c=i?.some(e=>(e.path.endsWith(`/`)&&e.path.length>1?e.path.slice(0,-1):e.path)===(s||`/`)),l=t.i18n,u=t.versions,d=(t.base||`/docs`).replace(/\/$/,``),f=d.startsWith(`/`)?d.substring(1):d,p=a.split(`/`).filter(Boolean),m=f&&p.length>0&&p[0]===f||!c&&p.length>0,h=[...p],_=0;f&&h[_]===f&&_++,u&&h.length>_&&u.versions.find(e=>e.path===h[_])&&_++,l&&h.length>_&&(Array.isArray(l.locales)?l.locales.includes(h[_]):h[_]in l.locales)&&_++;let v=h.slice(_),y=[];m?(f&&y.push(f),u&&r&&y.push(r),l&&n&&y.push(n)):l&&n&&y.push(n),y.push(...v);let b=`/${y.join(`/`)}`;return a.endsWith(`/`)&&a.length>1&&!b.endsWith(`/`)&&(b+=`/`),(b||`/`)+(o||``)}function k(...e){return(0,f.twMerge)((0,d.clsx)(e))}const A=e=>{let{href:t,onMouseEnter:n,onFocus:r,onClick:i,...a}=e,o=(0,c.useNavigate)(),s=O(t??``),l=e=>{i?.(e),!e.defaultPrevented&&(s&&(s.startsWith(`http://`)||s.startsWith(`https://`)||s.startsWith(`//`))||(e.preventDefault(),o(s)))},d=e=>{n?.(e)},f=e=>{r?.(e)};return(0,u.jsx)(`a`,{...a,href:s,onClick:l,onMouseEnter:d,onFocus:f})},j=e=>{let{href:t,end:n=!1,className:r,children:i,...a}=e,o=(0,c.useLocation)(),s=O(t??``),l=n?o.pathname===s:o.pathname.startsWith(s),d=typeof r==`function`?r({isActive:l}):k(r,l&&`active`),f=typeof i==`function`?i({isActive:l}):i;return(0,u.jsx)(A,{...a,href:t,className:d,children:f})};function M(e){let{size:t=20,...n}=e;return{...n,width:t,height:t}}const N=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...M(e),children:[(0,u.jsx)(`title`,{children:`GitHub`}),(0,u.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`})]}),P=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`CSV`}),(0,u.jsxs)(`mask`,{id:`a`,maskUnits:`userSpaceOnUse`,x:`3`,y:`3`,width:`18`,height:`18`,fill:`#000`,children:[(0,u.jsx)(`path`,{fill:`#fff`,d:`M3 3h18v18H3z`}),(0,u.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M15.8889 5H8.11111C6.39289 5 5 6.39289 5 8.11111v7.77779C5 17.6071 6.39289 19 8.11111 19h7.77779C17.6071 19 19 17.6071 19 15.8889V8.11111C19 6.39289 17.6071 5 15.8889 5Zm0 12.4444H8.1111c-.05369 0-.10674-.0027-.15904-.008.0523.0053.10536.008.15905.008h7.77779Zm1.5555-1.5555c0 .8054-.6121 1.4679-1.3965 1.5475.7844-.0797 1.3965-.7421 1.3965-1.5475V8.11111v7.77779Z`})]}),(0,u.jsx)(`path`,{d:`M15.8889 19.4444c1.1046 0 2-.8954 2-2 0-1.1045-.8954-2-2-2v4Zm-7.7778-2 .00001-2H8.1111v2Zm-.15904-.008.20206-1.9898c-1.09891-.1115-2.08022.6888-2.19182 1.7877-.1116 1.099.68877 2.0803 1.78768 2.1919l.20208-1.9898Zm8.09584 0-.2021-1.9897c-1.0989.1116-1.8992 1.0929-1.7876 2.1918.1116 1.0989 1.0929 1.8993 2.1918 1.7877l-.2021-1.9898Zm3.3965-9.32529c0-1.10457-.8954-2-2-2-1.1045 0-2 .89543-2 2h4ZM8.11111 7h7.77779V3H8.11111v4ZM7 8.11111C7 7.49746 7.49746 7 8.11111 7V3C5.28832 3 3 5.28832 3 8.11111h4Zm0 7.77779V8.11111H3v7.77779h4ZM8.11111 17C7.49746 17 7 16.5025 7 15.8889H3C3 18.7117 5.28832 21 8.11111 21v-4Zm7.77779 0H8.11111v4h7.77779v-4ZM17 15.8889C17 16.5025 16.5025 17 15.8889 17v4C18.7117 21 21 18.7117 21 15.8889h-4Zm0-7.77779v7.77779h4V8.11111h-4ZM15.8889 7C16.5025 7 17 7.49746 17 8.11111h4C21 5.28832 18.7117 3 15.8889 3v4Zm0 8.4444H8.11111l-.00001 4h7.7778v-4Zm-7.7778 0c.01378 0 .02816.0007.04302.0022l-.40411 3.9796c.11944.0121.23994.0182.36109.0182v-4Zm-.36112 3.9818c.11935.0121.23985.0182.36113.0182v-4c.01389 0 .02828.0008.04304.0022l-.40417 3.9796Zm.36113.0182h7.77779v-4H8.11111v4Zm8.13889-.0182c1.7951-.1823 3.1944-1.6951 3.1944-3.5373h-4c0-.2314.1752-.4193.4015-.4423l.4041 3.9796Zm-.8056-3.5373c0-.2314.1752-.4193.4014-.4422l.4042 3.9795c1.795-.1823 3.1944-1.6951 3.1944-3.5373h-4Zm0-7.77779v7.77779h4V8.11111h-4Zm4 0c0-.07155-.0038-.14596-.0124-.22267-.0086-.07678-.0218-.15478-.0403-.23343-.0184-.07869-.0416-.15651-.0697-.233-.0281-.07648-.0604-.15005-.0963-.22045-.036-.07036-.0749-.13629-.1158-.1978-.0408-.06145-.0832-.11775-.1258-.16912-.085-.10251-.1704-.18478-.2468-.2495-.0383-.03245-.0749-.061-.1089-.08594-.034-.02494-.0659-.04672-.0949-.06556-.029-.01883-.0558-.03518-.0797-.04914-.0239-.01396-.0456-.02598-.0644-.03606-.0188-.01008-.0355-.01864-.0493-.02558-.0139-.00694-.0257-.01268-.0348-.01701-.009-.00429-.0163-.00769-.0207-.00971-.0022-.00104-.004-.00187-.0051-.00238-.0006-.00025-.001-.00046-.0013-.00059-.0002-.00006-.0003-.00011-.0003-.00014-.0001-.00001-.0001-.00003-.0001-.00004v-.00001c-.0006-.00027.0028.00131.0068.00316.0044.00202.0117.00541.0207.00971.0091.00433.0209.01007.0348.01701.0138.00694.0305.0155.0493.02558.0188.01008.0405.0221.0644.03606.0239.01396.0507.03031.0797.04914.029.01883.0609.04062.0949.06556.0339.02494.0706.05349.1089.08594.0764.06472.1618.14698.2468.24949.0426.05138.085.10768.1258.16913.0409.06151.0798.12744.1157.19779.036.07041.0683.14397.0964.22046.028.07648.0513.15431.0697.23299.0185.07865.0317.15665.0403.23344.0086.07671.0124.15112.0124.22267h-4c0 .07154.0039.14595.0125.22267.0086.07678.0218.15478.0402.23343.0185.07868.0417.15651.0698.233.0281.07648.0604.15005.0963.22045.036.07036.0749.13629.1158.1978.0408.06144.0832.11775.1258.16912.0849.10251.1704.18478.2468.2495.0383.03244.0749.061.1089.08594.0339.02493.0658.04672.0949.06556.029.01883.0558.03517.0797.04914.0239.01396.0456.02598.0644.03606.0188.01007.0354.01864.0493.02558.0139.00693.0257.01268.0348.01701.009.00429.0163.00769.0207.00971.0022.00104.004.00187.0051.00237.0006.00026.001.00047.0013.00059.0001.00007.0003.00012.0003.00015.0001.00001.0001.00003.0001.00004v.00001c.0006.00026-.0028-.00131-.0068-.00316-.0044-.00202-.0117-.00542-.0207-.00971-.0091-.00433-.0209-.01008-.0348-.01701-.0139-.00694-.0305-.01551-.0493-.02558-.0188-.01008-.0405-.0221-.0644-.03606-.0239-.01396-.0507-.03031-.0797-.04914-.029-.01884-.061-.04062-.0949-.06556-.034-.02494-.0706-.0535-.1089-.08594-.0764-.06472-.1619-.14699-.2468-.2495-.0426-.05137-.085-.10767-.1258-.16912-.0409-.06151-.0798-.12744-.1158-.1978-.0359-.0704-.0682-.14397-.0963-.22045-.0281-.07649-.0513-.15431-.0698-.233-.0184-.07865-.0316-.15665-.0402-.23343-.0086-.07671-.0125-.15112-.0125-.22267h4Zm0 7.77779V8.11111h-4v7.77779h4Z`,fill:`#14B8A6`,mask:`url(#a)`}),(0,u.jsx)(`rect`,{x:`7`,y:`7`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),(0,u.jsx)(`rect`,{x:`7`,y:`11`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),(0,u.jsx)(`rect`,{x:`7`,y:`15`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),(0,u.jsx)(`rect`,{x:`13`,y:`7`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),(0,u.jsx)(`rect`,{x:`13`,y:`11`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`}),(0,u.jsx)(`rect`,{x:`13`,y:`15`,width:`4`,height:`2`,rx:`1`,fill:`#14B8A6`})]}),F=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...M(e),children:[(0,u.jsx)(`title`,{children:`Discord`}),(0,u.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`})]}),I=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...M(e),children:[(0,u.jsx)(`title`,{children:`X`}),(0,u.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`})]}),L=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,...M(e),children:[(0,u.jsx)(`title`,{children:`Bluesky`}),(0,u.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`})]}),R=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`TypeScript`}),(0,u.jsx)(`path`,{fill:`#2563EB`,d:`M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z`})]}),z=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`JavaScript`}),(0,u.jsx)(`path`,{fill:`#F59E0B`,d:`M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z`})]}),B=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`JSON`}),(0,u.jsx)(`path`,{fill:`#F59E0B`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),V=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`CSS`}),(0,u.jsx)(`path`,{fill:`#0EA5E9`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),H=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`HTML`}),(0,u.jsx)(`path`,{fill:`#EA580C`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),U=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`React`}),(0,u.jsx)(`path`,{fill:`#0E8ADC`,d:`M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z`}),(0,u.jsx)(`path`,{stroke:`#0E8ADC`,d:`M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z`}),(0,u.jsx)(`path`,{stroke:`#0E8ADC`,d:`M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z`}),(0,u.jsx)(`path`,{stroke:`#0E8ADC`,d:`M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z`})]}),W=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`Markdown`}),(0,u.jsx)(`path`,{fill:`#60A5FA`,d:`M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z`})]}),G=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`Shell`}),(0,u.jsx)(`path`,{stroke:`#14B8A6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M4.336 17l6-6-6-6M12.336 19h8`})]}),K=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`YAML`}),(0,u.jsx)(`path`,{fill:`#A78BFA`,d:`M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z`})]}),q=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`Rust`}),(0,u.jsx)(`path`,{fill:`#EA580C`,fillRule:`evenodd`,d:`M12.58 2.136a.287.287 0 00-.488 0l-.526.85a8.974 8.974 0 00-.232.022l-.683-.73a.287.287 0 00-.478.096l-.35.935c-.075.021-.15.044-.224.067l-.812-.583a.287.287 0 00-.45.187l-.162.989a9.088 9.088 0 00-.204.11l-.913-.417a.287.287 0 00-.406.272l.036 1.005a9.099 9.099 0 00-.175.144l-.98-.231a.287.287 0 00-.345.345l.231.98a9.125 9.125 0 00-.144.175L4.27 6.316a.287.287 0 00-.271.406l.416.913a9.036 9.036 0 00-.11.203L3.317 8a.287.287 0 00-.187.45l.584.813a8.953 8.953 0 00-.068.223l-.935.35a.287.287 0 00-.095.479l.73.682a8.966 8.966 0 00-.023.233l-.85.526a.287.287 0 000 .488l.85.526c.007.078.014.156.023.233l-.73.682a.287.287 0 00.095.479l.935.35.068.223-.584.812a.287.287 0 00.187.451l.99.162c.035.068.072.135.109.203l-.416.913a.287.287 0 00.271.406l1.006-.036c.047.059.095.117.143.174l-.23.981a.287.287 0 00.344.345l.981-.23c.057.048.115.095.174.142l-.036 1.006a.287.287 0 00.406.272l.914-.417c.067.038.135.074.203.11l.161.99a.287.287 0 00.451.186l.813-.584c.074.024.148.046.223.068l.35.935a.287.287 0 00.478.095l.683-.73c.077.01.154.017.232.023l.526.85a.287.287 0 00.489 0l.526-.85c.078-.006.155-.014.232-.023l.682.73a.287.287 0 00.479-.095l.35-.935c.075-.022.15-.044.223-.068l.813.584a.287.287 0 00.45-.187l.162-.99a8.77 8.77 0 00.203-.109l.913.417a.287.287 0 00.406-.272l-.035-1.006c.058-.047.116-.094.174-.143l.98.231a.287.287 0 00.346-.345l-.231-.98.143-.175 1.006.036a.287.287 0 00.271-.406l-.416-.913a9.4 9.4 0 00.109-.203l.99-.162a.287.287 0 00.187-.45l-.584-.813a8.43 8.43 0 00.067-.223l.935-.35a.287.287 0 00.096-.479l-.73-.682c.009-.077.016-.155.023-.233l.85-.526a.287.287 0 000-.488l-.85-.526a8.844 8.844 0 00-.023-.233l.73-.682a.287.287 0 00-.096-.479l-.934-.35a9.246 9.246 0 00-.068-.223l.584-.812A.287.287 0 0021.357 8l-.99-.162a8.92 8.92 0 00-.11-.203l.417-.913a.287.287 0 00-.271-.406l-1.006.036a9.178 9.178 0 00-.143-.174l.23-.981a.287.287 0 00-.345-.345l-.98.23a9.43 9.43 0 00-.174-.142l.035-1.006a.287.287 0 00-.405-.272l-.914.417a9.11 9.11 0 00-.203-.11l-.162-.99a.287.287 0 00-.45-.186l-.813.584a9.088 9.088 0 00-.223-.068l-.35-.935a.287.287 0 00-.479-.095l-.682.73a9.062 9.062 0 00-.232-.023l-.526-.85zm-.257 1.62a.592.592 0 01.578.596.595.595 0 11-.578-.595zm1.363.98A7.324 7.324 0 0118.7 8.309l-.702 1.585a.547.547 0 00.275.717l1.352.6c.041.422.047.847.015 1.27h-.752c-.075 0-.106.05-.106.123v.344c0 .812-.457.99-.859 1.034-.383.044-.806-.161-.86-.394-.22-1.24-.583-1.526-1.152-1.975l-.041-.033c.736-.467 1.502-1.158 1.502-2.08 0-.998-.683-1.625-1.148-1.934-.655-.43-1.379-.516-1.574-.516H6.88a7.324 7.324 0 014.098-2.312l.916.96a.54.54 0 00.766.018l1.026-.978zm-8.46 4.407a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm14.192.026a.595.595 0 11-.035 1.19.595.595 0 01.035-1.19zm-13.07.096h1.037v4.678H5.291a7.324 7.324 0 01-.237-2.797l1.282-.57a.542.542 0 00.276-.716l-.264-.595zm4.33.05h2.47c.128 0 .901.147.901.727 0 .48-.593.653-1.081.653h-2.293l.002-1.38zm0 3.36h1.892c.172 0 .924.05 1.164 1.011.026.104.064.291.107.503.078.389.174.861.247 1.06.113.345.57 1.034 1.058 1.034h3.089c-.207.277-.433.54-.677.785l-1.258-.27a.544.544 0 00-.645.417l-.298 1.394a7.323 7.323 0 01-6.108-.03l-.298-1.392a.542.542 0 00-.643-.418l-1.23.264a7.32 7.32 0 01-.636-.75h5.984c.067 0 .113-.011.113-.074v-2.117c0-.061-.046-.075-.113-.075h-1.75l.001-1.341zm-2.763 4.848a.595.595 0 11-.034 1.19.595.595 0 01.034-1.19zm8.814.027a.596.596 0 11-.035 1.19.596.596 0 01.035-1.19z`,clipRule:`evenodd`})]}),J=e=>(0,u.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...M(e),children:[(0,u.jsx)(`title`,{children:`Rust`}),(0,u.jsx)(`path`,{fill:`#F87171`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]});Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return k}});
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{_ as e,y as t}from"./icons-dev-CrQLjoQp.js";import*as n from"react";import{createContext as r,use as i,useEffect as a,useState as o}from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import{Link as u}from"lucide-react";import*as d from"react-aria-components";const f=Symbol.for(`__BDOCS_THEME_CONTEXT__`),p=Symbol.for(`__BDOCS_THEME_INSTANCE__`),m=`boltdocs-theme-change`,h=globalThis[f]||(globalThis[f]=r(void 0));function g({children:e}){let[t,n]=o(`system`),[r,i]=o(`dark`),s=e=>{let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=e===`dark`||e===`system`&&t.matches,r=window.document.documentElement;r.classList.toggle(`dark`,n),r.dataset.theme=n?`dark`:`light`,i(n?`dark`:`light`)};a(()=>{let e=localStorage.getItem(`boltdocs-theme`);e?(n(e),s(e)):s(`system`);let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>{(localStorage.getItem(`boltdocs-theme`)||`system`)===`system`&&s(`system`)};return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[]);let l={theme:t,resolvedTheme:r,setTheme:e=>{n(e),localStorage.setItem(`boltdocs-theme`,e),s(e),typeof window<`u`&&window.dispatchEvent(new CustomEvent(m,{detail:e}))}};return typeof globalThis<`u`&&(globalThis[p]=l),c(h.Provider,{value:l,children:e})}function _(){let e=i(h),[,t]=o({});if(a(()=>{if(e)return;let n=()=>t({});return window.addEventListener(m,n),()=>window.removeEventListener(m,n)},[e]),!e&&typeof globalThis<`u`&&globalThis[p])return globalThis[p];if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}const v=n.forwardRef(({level:n,id:r,children:i,className:a,showAnchor:o=!0,anchorPosition:d=`wrap`,anchorIcon:f,anchorClassName:p,...m},h)=>{let g=`h${Math.min(Math.max(Math.floor(n),1),6)}`,_=!!(r&&o),v=c(u,{className:t(`transition-all duration-200`,d===`wrap`?`opacity-0 ml-2 text-muted/50 group-hover:text-primary-500 group-hover:opacity-100`:`text-muted/50 hover:text-primary-500`),size:16}),y=f??v,b=()=>_?d===`wrap`?l(e,{href:`#${r}`,className:t(`header-anchor flex flex-row items-center no-underline text-inherit`,p),"aria-label":`Anchor`,children:[i,y]}):l(s,{children:[d===`before`&&c(e,{href:`#${r}`,className:t(`header-anchor mr-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,p),"aria-label":`Anchor`,children:y}),i,d===`after`&&c(e,{href:`#${r}`,className:t(`header-anchor ml-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,p),"aria-label":`Anchor`,children:y})]}):i;return c(g,{ref:h,id:r,className:t(`boltdocs-heading relative group flex items-center scroll-mt-24`,a),...m,children:b()})});v.displayName=`Heading`;const y=({children:e,className:n,plain:r=!1,...i})=>c(`div`,{className:t(`not-prose boltdocs-code-block`,`group relative overflow-hidden bg-(--color-code-bg)`,`contain-layout contain-paint`,{"my-6 rounded-xl border border-subtle":!r},n),...i,children:e}),b=({children:e,className:n,...r})=>c(`div`,{className:t(`flex h-9 items-center justify-between px-4 py-1.5`,`text-[13px] font-medium text-muted`,n),...r,children:e}),x=({children:e,className:n,...r})=>c(`div`,{className:t(`flex items-center space-x-2`,n),...r,children:e}),S=({className:e,children:n,shouldTruncate:r=!1,...i})=>c(`div`,{className:t(`relative`,{"[&>pre]:max-h-[300px] [&>pre]:overflow-hidden [&>div>pre]:max-h-[300px] [&>div>pre]:overflow-hidden":r},e),...i,children:n});y.Header=b,y.Group=x,y.Content=S;const C=({className:e,children:n,...r})=>c(d.Tooltip,{...r,offset:8,className:n=>t(`group z-50 overflow-visible rounded-md bg-surface px-2.5 py-1.5 text-xs font-medium text-body ring-1 ring-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(n):e),children:e=>l(s,{children:[c(d.OverlayArrow,{children:l(`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:[c(`title`,{children:`Arrow`}),c(`path`,{d:`M0 0 L4 4 L8 0`})]})}),typeof n==`function`?n(e):n]})}),w=({content:e,children:t,delay:n=500,closeDelay:r=0,...i})=>l(d.TooltipTrigger,{delay:n,closeDelay:r,children:[t,c(C,{...i,children:e})]});w.Root=w,w.Content=C;function T({theme:e,className:n,...r}){let{resolvedTheme:i}=_();return e&&e!==i?null:c(`img`,{className:t(`max-w-full h-auto rounded-lg my-8`,n),...r})}export{x as a,g as c,S as i,_ as l,w as n,b as o,y as r,v as s,T as t};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./icons-dev-rzdz6Lf3.cjs`);let t=require(`react`);t=e.O(t);let n=require(`react/jsx-runtime`),r=require(`lucide-react`),i=require(`react-aria-components`);i=e.O(i);const a=Symbol.for(`__BDOCS_THEME_CONTEXT__`),o=Symbol.for(`__BDOCS_THEME_INSTANCE__`),s=`boltdocs-theme-change`,c=globalThis[a]||(globalThis[a]=(0,t.createContext)(void 0));function l({children:e}){let[r,i]=(0,t.useState)(`system`),[a,l]=(0,t.useState)(`dark`),u=e=>{let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=e===`dark`||e===`system`&&t.matches,r=window.document.documentElement;r.classList.toggle(`dark`,n),r.dataset.theme=n?`dark`:`light`,l(n?`dark`:`light`)};(0,t.useEffect)(()=>{let e=localStorage.getItem(`boltdocs-theme`);e?(i(e),u(e)):u(`system`);let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>{(localStorage.getItem(`boltdocs-theme`)||`system`)===`system`&&u(`system`)};return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)},[]);let d={theme:r,resolvedTheme:a,setTheme:e=>{i(e),localStorage.setItem(`boltdocs-theme`,e),u(e),typeof window<`u`&&window.dispatchEvent(new CustomEvent(s,{detail:e}))}};return typeof globalThis<`u`&&(globalThis[o]=d),(0,n.jsx)(c.Provider,{value:d,children:e})}function u(){let e=(0,t.use)(c),[,n]=(0,t.useState)({});if((0,t.useEffect)(()=>{if(e)return;let t=()=>n({});return window.addEventListener(s,t),()=>window.removeEventListener(s,t)},[e]),!e&&typeof globalThis<`u`&&globalThis[o])return globalThis[o];if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}const d=t.forwardRef(({level:t,id:i,children:a,className:o,showAnchor:s=!0,anchorPosition:c=`wrap`,anchorIcon:l,anchorClassName:u,...d},f)=>{let p=`h${Math.min(Math.max(Math.floor(t),1),6)}`,m=!!(i&&s),h=(0,n.jsx)(r.Link,{className:e.y(`transition-all duration-200`,c===`wrap`?`opacity-0 ml-2 text-muted/50 group-hover:text-primary-500 group-hover:opacity-100`:`text-muted/50 hover:text-primary-500`),size:16}),g=l??h,_=()=>m?c===`wrap`?(0,n.jsxs)(e._,{href:`#${i}`,className:e.y(`header-anchor flex flex-row items-center no-underline text-inherit`,u),"aria-label":`Anchor`,children:[a,g]}):(0,n.jsxs)(n.Fragment,{children:[c===`before`&&(0,n.jsx)(e._,{href:`#${i}`,className:e.y(`header-anchor mr-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,u),"aria-label":`Anchor`,children:g}),a,c===`after`&&(0,n.jsx)(e._,{href:`#${i}`,className:e.y(`header-anchor ml-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200`,u),"aria-label":`Anchor`,children:g})]}):a;return(0,n.jsx)(p,{ref:f,id:i,className:e.y(`boltdocs-heading relative group flex items-center scroll-mt-24`,o),...d,children:_()})});d.displayName=`Heading`;const f=({children:t,className:r,plain:i=!1,...a})=>(0,n.jsx)(`div`,{className:e.y(`not-prose boltdocs-code-block`,`group relative overflow-hidden bg-(--color-code-bg)`,`contain-layout contain-paint`,{"my-6 rounded-xl border border-subtle":!i},r),...a,children:t}),p=({children:t,className:r,...i})=>(0,n.jsx)(`div`,{className:e.y(`flex h-9 items-center justify-between px-4 py-1.5`,`text-[13px] font-medium text-muted`,r),...i,children:t}),m=({children:t,className:r,...i})=>(0,n.jsx)(`div`,{className:e.y(`flex items-center space-x-2`,r),...i,children:t}),h=({className:t,children:r,shouldTruncate:i=!1,...a})=>(0,n.jsx)(`div`,{className:e.y(`relative`,{"[&>pre]:max-h-[300px] [&>pre]:overflow-hidden [&>div>pre]:max-h-[300px] [&>div>pre]:overflow-hidden":i},t),...a,children:r});f.Header=p,f.Group=m,f.Content=h;const g=({className:t,children:r,...a})=>(0,n.jsx)(i.Tooltip,{...a,offset:8,className:n=>e.y(`group z-50 overflow-visible rounded-md bg-surface px-2.5 py-1.5 text-xs font-medium text-body ring-1 ring-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 t==`function`?t(n):t),children:e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.OverlayArrow,{children:(0,n.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,n.jsx)(`title`,{children:`Arrow`}),(0,n.jsx)(`path`,{d:`M0 0 L4 4 L8 0`})]})}),typeof r==`function`?r(e):r]})}),_=({content:e,children:t,delay:r=500,closeDelay:a=0,...o})=>(0,n.jsxs)(i.TooltipTrigger,{delay:r,closeDelay:a,children:[t,(0,n.jsx)(g,{...o,children:e})]});_.Root=_,_.Content=g;function v({theme:t,className:r,...i}){let{resolvedTheme:a}=u();return t&&t!==a?null:(0,n.jsx)(`img`,{className:e.y(`max-w-full h-auto rounded-lg my-8`,r),...i})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return v}});
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{_ as e,a as t,c as n,d as r,f as i,g as a,i as o,l as s,m as c,n as l,p as u,r as d,u as f,y as p}from"./icons-dev-CrQLjoQp.js";import{a as m,i as h,l as g,n as _,o as v,r as y,s as b,t as x}from"./image-BkIfa9oo.js";import{isValidElement as S,useCallback as C,useEffect as w,useRef as T,useState as E}from"react";import{Fragment as ee,jsx as D,jsxs as O}from"react/jsx-runtime";import{AlertCircle as k,AlertTriangle as A,Check as j,Copy as M,File as N,Info as P,Lightbulb as te}from"lucide-react";import{Button as F}from"react-aria-components";const I={note:{container:`bg-slate-500/5 dark:bg-slate-500/10 border-slate-500/40 text-slate-800 dark:text-slate-200`,titleText:`text-slate-900 dark:text-slate-100`,iconColor:`text-slate-500`,icon:P,defaultTitle:`Note`},info:{container:`bg-indigo-500/5 dark:bg-indigo-500/10 border-indigo-500/40 text-indigo-800 dark:text-indigo-200`,titleText:`text-indigo-900 dark:text-indigo-100`,iconColor:`text-indigo-500`,icon:P,defaultTitle:`Info`},tip:{container:`bg-green-500/5 dark:bg-green-500/10 border-green-500/40 text-green-800 dark:text-green-200`,titleText:`text-green-900 dark:text-green-100`,iconColor:`text-green-500`,icon:te,defaultTitle:`Tip`},warning:{container:`bg-amber-500/5 dark:bg-amber-500/10 border-amber-500/40 text-amber-800 dark:text-amber-200`,titleText:`text-amber-900 dark:text-amber-100`,iconColor:`text-amber-500`,icon:A,defaultTitle:`Warning`},danger:{container:`bg-rose-500/5 dark:bg-rose-500/10 border-rose-500/40 text-rose-800 dark:text-rose-200`,titleText:`text-rose-900 dark:text-rose-100`,iconColor:`text-rose-500`,icon:k,defaultTitle:`Danger`}};function L({children:e,className:t=``,variant:n=`note`,title:r,...i}){let a=I[n]||I.note,o=a.icon;return O(`div`,{className:p(`my-6 flex gap-4 p-4 rounded-xl border-2`,a.container,t),...i,children:[D(`div`,{className:p(`shrink-0 pt-0.5`,a.iconColor),children:D(o,{className:`w-5 h-5 stroke-[2]`})}),O(`div`,{className:`flex-1 text-[0.875rem] leading-[1.6]`,children:[D(`div`,{className:p(`font-bold text-sm mb-1`,a.titleText),children:r||a.defaultTitle}),D(`div`,{className:`prose prose-neutral dark:prose-invert max-w-none [&>p]:m-0 [&>p+p]:mt-2`,children:e})]})]})}const R=({children:e,name:t,type:n,description:r,required:i})=>O(`div`,{className:`my-4 border border-subtle bg-surface/50 p-4 rounded-xl flex flex-col gap-1 text-sm select-none`,children:[O(`div`,{className:`flex items-center gap-2`,children:[D(`span`,{className:`font-mono font-bold text-primary-500`,children:t}),n&&D(`span`,{className:`text-xs text-muted font-mono bg-soft px-1.5 py-0.5 rounded-md`,children:n}),i&&D(`span`,{className:`text-xs text-rose-500 font-semibold`,children:`required`})]}),r&&D(`div`,{className:`text-muted text-xs mt-1`,children:r}),e&&D(`div`,{className:`mt-2`,children:e})]}),z=({href:t,children:n,className:r,...i})=>D(e,{href:t||``,className:p(`text-primary-500 hover:text-primary-400 dark:text-primary-500 hover:underline font-medium transition-colors duration-200`,r),...i,children:n}),B={1:`text-3xl sm:text-[2.5rem] font-extrabold tracking-tight text-body mb-4 leading-tight`,2:`text-2xl sm:text-[1.75rem] font-bold tracking-tight text-body mt-14 mb-5 pb-2 border-b border-subtle scroll-mt-24`,3:`text-lg sm:text-[1.4rem] font-semibold tracking-tight text-body mt-10 mb-4 scroll-mt-24`,4:`text-base sm:text-[1.1rem] font-semibold tracking-tight text-body mt-8 mb-3 scroll-mt-24`,5:`text-sm sm:text-[0.9rem] font-semibold tracking-tight text-body mt-6 mb-2 scroll-mt-24`,6:`text-xs sm:text-[0.75rem] font-semibold tracking-tight text-body mt-6 mb-2 scroll-mt-24`},V=({level:e,className:t,...n})=>D(b,{level:e,className:p(B[e]||``,t),...n}),H={a:z,h1:e=>D(V,{level:1,...e}),h2:e=>D(V,{level:2,...e}),h3:e=>D(V,{level:3,...e}),h4:e=>D(V,{level:4,...e}),h5:e=>D(V,{level:5,...e}),h6:e=>D(V,{level:6,...e}),p:({className:e,...t})=>D(`p`,{className:p(`text-paragraph leading-relaxed my-5`,e),...t}),strong:({className:e,...t})=>D(`strong`,{className:p(`font-semibold text-body`,e),...t}),mark:({className:e,...t})=>D(`mark`,{className:p(`bg-primary-500/10 text-primary-500 font-semibold px-1.5 py-0.5 rounded-md`,e),...t}),blockquote:({className:e,...t})=>D(`blockquote`,{className:p(`border-l-4 border-primary-500 bg-soft/30 pl-4 py-2 my-6 italic text-muted rounded-r-lg`,e),...t}),hr:({className:e,...t})=>D(`hr`,{className:p(`my-8 border-t border-subtle`,e),...t}),ul:({className:e,...t})=>D(`ul`,{className:p(`list-disc pl-6 my-5 space-y-2 text-paragraph`,e),...t}),ol:({className:e,...t})=>D(`ol`,{className:p(`list-decimal pl-6 my-5 space-y-2 text-paragraph`,e),...t}),li:({className:e,...t})=>D(`li`,{className:p(`pl-1`,e),...t})},U={table:e=>D(`div`,{className:`my-6 w-full overflow-x-auto rounded-xl border border-subtle bg-surface/30`,children:D(`table`,{className:`w-full border-collapse text-left text-sm`,...e})}),thead:e=>D(`thead`,{className:p(`border-b border-subtle bg-soft/50`,e.className),...e}),tbody:e=>D(`tbody`,{...e}),tr:e=>D(`tr`,{className:p(`border-b border-subtle last:border-0 even:bg-soft/10 hover:bg-soft/20 transition-colors`,e.className),...e}),th:e=>D(`th`,{className:p(`px-4 py-3 font-semibold text-body text-xs font-mono`,e.className),...e}),td:e=>D(`td`,{className:p(`px-4 py-3 text-paragraph leading-relaxed`,e.className),...e})},W=(e,t)=>{if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(e=>W(e,t)).join(``);if(S(e)){let n=t?.get(e.type);return n?n(e.props):W(e.props.children,t)}return``},G=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}};function K(e){let[t,n]=E(!1),[r,i]=E(!1),[a,o]=E(!1),s=T(null),c=C(async()=>{G(s.current?.textContent??``),n(!0),setTimeout(()=>n(!1),2e3)},[]);return w(()=>{let e=(s.current?.textContent??``).trim().split(`
7
+ `).length;o(e>6)},[e.children,e.highlightedHtml]),{copied:t,isExpanded:r,setIsExpanded:i,isExpandable:a,preRef:s,handleCopy:c,shouldTruncate:a&&!r}}const q={ts:c,tsx:r,js:n,jsx:r,json:s,css:o,html:l,md:f,mdx:f,bash:u,sh:u,yaml:a,yml:a,rs:i,rust:i,toml:d,csv:t},J=({copied:e,handleCopy:t})=>D(_,{content:e?`Copied!`:`Copy code`,children:D(F,{onPress:t,className:p(`grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2 z-10`,e?`text-emerald-400`:`text-muted hover:text-body`),"aria-label":`Copy code`,children:D(e?j:M,{size:20})})});function Y(e){let{children:t,hideCopy:n=!1,highlightedHtml:r,"data-highlighted-html":i,title:a,"data-title":o,"data-lang":s,plain:c=!1,...l}=e,u=r||i,d=typeof u==`string`?u.replace(/<span class="line">\s*(?:<span[^>]*>\s*<\/span>)?\s*<\/span>\s*(<\/code>\s*<\/pre>)/g,`$1`):u,f=a||o,g=e.lang||s||``,{copied:_,isExpanded:b,setIsExpanded:x,isExpandable:S,preRef:C,handleCopy:w,shouldTruncate:T}=K(e),E=q[g];return O(y,{plain:c,className:e.className,children:[(f||!n)&&O(v,{className:p({"absolute top-2 left-0 w-full":!f}),children:[D(m,{children:f&&O(ee,{children:[E?D(E,{size:14}):D(N,{size:14,className:`opacity-60`}),D(`span`,{children:f})]})}),D(`div`,{className:`flex items-center gap-1`,children:!n&&D(J,{copied:_,handleCopy:w})})]}),O(h,{shouldTruncate:T,children:[d?D(`div`,{ref:C,className:`shiki-wrapper overflow-x-auto [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>pre>code]:text-[0.875rem]! [&>pre>code]:leading-[1.6]! [&>.shiki.shiki-themes]:bg-transparent!`,dangerouslySetInnerHTML:{__html:d}}):D(`pre`,{ref:C,className:`m-0! p-5! rounded-none! border-none! bg-inherit! font-mono text-[0.875rem] leading-[1.6] overflow-x-auto`,...l,children:W(t).trimEnd()}),S&&D(`div`,{className:p(T?`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 pb-4 pt-1 -mt-4`),children:D(F,{onPress:()=>x(!b),className:`rounded-full bg-surface border border-subtle px-5 py-2 text-[0.8125rem] font-medium text-body outline-none cursor-pointer transition-all hover:bg-soft hover:-translate-y-px backdrop-blur-md`,children:b?`Show less`:`Expand code`})})]})]})}const X=({src:e,alt:t,title:n,theme:r,className:i,...a})=>{let{theme:o}=g();if(!e||r!==o)return null;let s=n||t;return O(`figure`,{className:`my-6 sm:my-8 flex flex-col items-center justify-center group not-prose`,children:[D(`div`,{className:`relative w-full overflow-hidden rounded-lg sm:rounded-2xl border border-subtle bg-soft/30 transition-all duration-300 sm:max-w-[85%] lg:max-w-full`,children:D(x,{src:e,alt:t||``,theme:r,loading:`lazy`,decoding:`async`,className:p(`w-full h-auto object-contain transition-transform duration-500 group-hover:scale-[1.01] my-0 rounded-md sm:rounded-xl block`,i),...a})}),s&&D(`figcaption`,{className:`mt-2 sm:mt-3 text-center text-xs sm:text-sm text-muted font-medium select-none tracking-wide opacity-90 sm:opacity-80 group-hover:opacity-100 transition-opacity duration-300 px-2`,children:s})]})},Z={img:X,Image:X};function Q({className:e,title:t,icon:n,href:r,children:i,...a}){let[o,s]=E({x:0,y:0}),[c,l]=E(0),u=T(null),d=e=>{if(!u.current)return;let t=u.current.getBoundingClientRect();s({x:e.clientX-t.left,y:e.clientY-t.top})},f=()=>l(1),m=()=>l(0),h=r?`a`:`div`,g=`var(--color-primary-500, #eb5828)`;return O(h,{ref:u,href:r,onMouseMove:d,onMouseEnter:f,onMouseLeave:m,className:p(`group relative flex flex-col gap-3 rounded-2xl border p-6 overflow-hidden transition-all duration-300`,`hover:shadow-lg dark:hover:shadow-none hover:-translate-y-0.5`,`bg-surface border-subtle text-paragraph`,r&&`cursor-pointer`,e),...a,children:[D(`div`,{className:`pointer-events-none absolute inset-0 transition-opacity duration-300`,style:{opacity:c,background:`radial-gradient(600px circle at ${o.x}px ${o.y}px, color-mix(in srgb, ${g} 8%, transparent), transparent 40%)`}}),D(`div`,{className:`pointer-events-none absolute inset-0 rounded-2xl transition-opacity duration-300`,style:{opacity:c,padding:`1px`,background:`radial-gradient(400px circle at ${o.x}px ${o.y}px, color-mix(in srgb, ${g} 50%, transparent), transparent 40%)`,WebkitMask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,WebkitMaskComposite:`xor`,maskComposite:`exclude`}}),O(`div`,{className:`relative z-10 flex items-center gap-3`,children:[n&&D(`div`,{className:p(`shrink-0 transition-transform duration-500 group-hover:rotate-[15deg] group-hover:scale-110 flex items-center justify-center text-muted group-hover:text-primary-500`,`[&>svg]:w-6 [&>svg]:h-6 [&>svg]:stroke-[1.5]`),children:n}),t&&D(`h3`,{className:`font-semibold text-base m-0 leading-none text-body`,children:t})]}),D(`div`,{className:`relative z-10 text-[0.875rem] leading-[1.6] opacity-90 prose prose-neutral dark:prose-invert max-w-none [&>p]:m-0 [&>p+p]:mt-2`,children:i})]})}function $({children:e,className:t,cols:n=2,...r}){return D(`div`,{className:p(`grid gap-4 my-6`,{"grid-cols-1":n===1,"grid-cols-1 sm:grid-cols-2":n===2,"grid-cols-1 sm:grid-cols-2 md:grid-cols-3":n===3,"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4":n===4},t),...r,children:e})}const ne={...H,...U,...Z,pre:Y,Field:R,Callout:L,Card:Q,Cards:$};export{W as a,G as i,$ as n,Q as r,ne as t};