mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[304],{38188:(e,t,r)=>{r.d(t,{cn:()=>l});var s=r(5435),a=r(99039);function l(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,a.QP)((0,s.$)(t))}},42304:(e,t,r)=>{r.d(t,{A:()=>j});var s=r(54568),a=r(99680),l=r(87350),n=r(63499),o=r(43404),c=r(49355),i=r(85850),d=r(88732),m=r(33986),h=r(10937),f=r(11849),x=r.n(f),b=r(7620),p=r(97090),u=r(38188),g=r(86204);function j(){let e,t,r,f,j,w,_,N,k,S,C,M,A,z,H,B,F,E,V,D,R,Z,P,T,G,L,U,q,I,O,Q,Y,$=(0,a.c)(45),[J,K]=(0,b.useState)(!1),[W,X]=(0,b.useState)(!1);$[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{let e=()=>{K(window.scrollY>10)};return window.addEventListener("scroll",e),e(),()=>window.removeEventListener("scroll",e)},t=[],$[0]=e,$[1]=t):(e=$[0],t=$[1]),(0,b.useEffect)(e,t),$[2]!==W?(r=()=>(W?document.body.style.overflow="hidden":document.body.style.overflow="",v),f=[W],$[2]=W,$[3]=r,$[4]=f):(r=$[3],f=$[4]),(0,b.useEffect)(r,f),$[5]===Symbol.for("react.memo_cache_sentinel")?(j=()=>X(!1),$[5]=j):j=$[5];let ee=j;$[6]===Symbol.for("react.memo_cache_sentinel")?(w={href:"/",label:"Home",icon:(0,s.jsx)("span",{className:"text-primary",children:"~/"})},_={href:"https://my-better-t-app-client.pages.dev/",label:"Demo",target:"_blank"},N={href:"/showcase",label:"Showcase"},k={href:"/analytics",label:"Analytics"},S={href:"/docs",label:"Docs"},$[6]=w,$[7]=_,$[8]=N,$[9]=k,$[10]=S):(w=$[6],_=$[7],N=$[8],k=$[9],S=$[10]),$[11]===Symbol.for("react.memo_cache_sentinel")?(C=[w,_,N,k,S,{href:"https://www.npmjs.com/package/create-better-t-stack",label:"NPM",icon:(0,s.jsx)(g.A,{pm:"npm",className:"h-4 w-4"}),target:"_blank"}],$[11]=C):C=$[11];let et=C;$[12]===Symbol.for("react.memo_cache_sentinel")?(M={href:"/",label:"Home",icon:(0,s.jsx)("span",{className:"text-primary",children:"~/"})},A={href:"https://my-better-t-app-client.pages.dev/",label:"Demo",target:"_blank"},z={href:"/showcase",label:"Showcase"},H={href:"/analytics",label:"Analytics"},B={href:"/docs",label:"Docs"},$[12]=M,$[13]=A,$[14]=z,$[15]=H,$[16]=B):(M=$[12],A=$[13],z=$[14],H=$[15],B=$[16]),$[17]===Symbol.for("react.memo_cache_sentinel")?(F={href:"https://www.npmjs.com/package/create-better-t-stack",label:"NPM",icon:(0,s.jsx)(g.A,{pm:"npm",className:"h-4 w-4"}),target:"_blank"},$[17]=F):F=$[17],$[18]===Symbol.for("react.memo_cache_sentinel")?(E=[M,A,z,H,B,F,{href:"https://www.github.com/better-t-stack/create-better-t-stack",label:"GitHub",icon:(0,s.jsx)(l.A,{className:"size-4"}),target:"_blank"}],$[18]=E):E=$[18];let er=E,es=J?"border-border border-b bg-background/80 shadow-sm backdrop-blur-md":"border-transparent border-b bg-transparent";return $[19]!==es?(V=(0,u.cn)("fixed top-0 z-[100] w-full transition-all duration-300 ease-in-out",es),$[19]=es,$[20]=V):V=$[20],$[21]===Symbol.for("react.memo_cache_sentinel")?(D=(0,s.jsxs)(x(),{href:"/",className:"flex flex-shrink-0 items-center gap-2",children:[(0,s.jsx)(h.default,{src:"/logo.svg",alt:"Better-T Stack",width:32,height:32,unoptimized:!0}),(0,s.jsx)("span",{className:"hidden font-semibold text-foreground text-md sm:inline-block",children:"Better-T Stack"})]}),$[21]=D):D=$[21],$[22]===Symbol.for("react.memo_cache_sentinel")?(R=(0,s.jsx)("div",{className:"flex items-center gap-1",children:et.map(y)}),Z=(0,s.jsx)("div",{className:"h-5 w-px bg-border"}),$[22]=R,$[23]=Z):(R=$[22],Z=$[23]),$[24]===Symbol.for("react.memo_cache_sentinel")?(P=(0,s.jsxs)(x(),{href:"https://github.com/sponsors/AmanVarshney01",target:"_blank",className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-muted/90 px-3 py-1.5 font-mono text-muted-foreground text-xs backdrop-blur-sm transition-colors hover:bg-muted hover:text-foreground",title:"Sponsor on GitHub",children:[(0,s.jsx)(n.A,{className:"size-3.5"}),"Sponsor"]}),$[24]=P):P=$[24],$[25]===Symbol.for("react.memo_cache_sentinel")?(T=(0,s.jsxs)("div",{className:"hidden items-center gap-4 md:flex",children:[R,Z,(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[P,(0,s.jsxs)(x(),{href:"/new",className:"inline-flex items-center gap-1.5 rounded-md border border-primary/50 bg-primary/10 px-3 py-1.5 font-mono text-primary text-xs transition-colors hover:bg-primary/20",title:"Stack Builder",children:[(0,s.jsx)(o.A,{className:"size-3.5"}),"Builder"]})]}),(0,s.jsx)(p.U,{})]}),$[25]=T):T=$[25],$[26]===Symbol.for("react.memo_cache_sentinel")?(G=(0,s.jsx)(p.U,{}),$[26]=G):G=$[26],$[27]!==W?(L=()=>X(!W),$[27]=W,$[28]=L):L=$[28],$[29]!==W?(U=W?(0,s.jsx)(c.A,{className:"size-5"}):(0,s.jsx)(i.A,{className:"size-5"}),$[29]=W,$[30]=U):U=$[30],$[31]!==W||$[32]!==L||$[33]!==U?(q=(0,s.jsxs)("div",{className:"mx-auto flex h-16 max-w-7xl items-center justify-between px-4 sm:px-6 lg:px-8",children:[D,T,(0,s.jsxs)("div",{className:"flex items-center gap-2 md:hidden",children:[G,(0,s.jsx)("button",{type:"button",onClick:L,className:"flex items-center justify-center rounded-md p-1.5 text-foreground transition-colors hover:bg-muted","aria-expanded":W,"aria-label":"Toggle menu",children:U})]})]}),$[31]=W,$[32]=L,$[33]=U,$[34]=q):q=$[34],$[35]!==V||$[36]!==q?(I=(0,s.jsx)("nav",{className:V,children:q}),$[35]=V,$[36]=q,$[37]=I):I=$[37],$[38]!==W?(O=W&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.P.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:"easeInOut"},className:"fixed inset-0 z-[98] bg-background/50 backdrop-blur-sm md:hidden",onClick:ee,"aria-hidden":"true"}),(0,s.jsxs)(d.P.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",stiffness:300,damping:30},className:"fixed top-0 right-0 bottom-0 z-[99] h-full w-full max-w-xs overflow-y-auto border-border border-l bg-background shadow-lg md:hidden","aria-modal":"true",children:[(0,s.jsxs)("div",{className:"flex h-16 items-center justify-between border-border border-b px-4",children:[(0,s.jsx)("span",{className:"font-semibold text-foreground text-md",children:"Navigation"}),(0,s.jsx)("button",{type:"button",onClick:ee,className:"rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground","aria-label":"Close menu",children:(0,s.jsx)(c.A,{className:"size-5"})})]}),(0,s.jsxs)("div",{className:"flex flex-col p-4",children:[(0,s.jsx)("nav",{className:"flex flex-col space-y-1",children:er.map(e=>(0,s.jsxs)(x(),{href:e.href,target:e.target,onClick:ee,className:"flex items-center gap-3 rounded-md px-3 py-3 font-mono text-base text-muted-foreground transition-colors hover:bg-muted hover:text-primary",children:[e.icon?(0,s.jsx)("span",{className:"flex w-5 items-center justify-center",children:e.icon}):(0,s.jsx)("span",{className:"w-5"}),(0,s.jsx)("span",{children:e.label})]},e.href))}),(0,s.jsxs)("div",{className:"mt-6 space-y-3 border-border border-t pt-6",children:[(0,s.jsxs)(x(),{href:"/new",onClick:ee,className:"flex w-full items-center justify-center gap-2 rounded-md border border-primary/50 bg-primary/10 px-4 py-2.5 font-mono text-primary text-sm transition-colors hover:bg-primary/20",children:[(0,s.jsx)(o.A,{className:"size-4"}),"Stack Builder"]}),(0,s.jsxs)(x(),{href:"https://github.com/sponsors/AmanVarshney01",target:"_blank",onClick:ee,className:"flex w-full items-center justify-center gap-2 rounded-md border border-border bg-muted/90 px-4 py-2.5 font-mono text-muted-foreground text-sm backdrop-blur-sm transition-colors hover:bg-muted hover:text-foreground",children:[(0,s.jsx)(n.A,{className:"size-4"}),"Sponsor on GitHub"]})]})]})]})]}),$[38]=W,$[39]=O):O=$[39],$[40]!==O?(Q=(0,s.jsx)(m.N,{children:O}),$[40]=O,$[41]=Q):Q=$[41],$[42]!==I||$[43]!==Q?(Y=(0,s.jsxs)(s.Fragment,{children:[I,Q]}),$[42]=I,$[43]=Q,$[44]=Y):Y=$[44],Y}function y(e){return(0,s.jsxs)(x(),{href:e.href,target:e.target,className:"relative flex items-center gap-1.5 rounded-md px-3 py-1.5 font-mono text-muted-foreground text-sm transition-colors hover:bg-muted hover:text-primary",children:[e.icon,(0,s.jsx)("span",{children:e.label})]},e.href)}function v(){document.body.style.overflow=""}},86204:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(54568),a=r(99680);let l=e=>{let t=(0,a.c)(35),{pm:r,className:l}=e;switch(r){case"npm":{let e,r,a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("title",{children:"npm"}),r=(0,s.jsx)("path",{d:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"}),t[0]=e,t[1]=r):(e=t[0],r=t[1]),t[2]!==l?(a=(0,s.jsxs)("svg",{className:l,viewBox:"0 0 24 24",fill:"currentColor",children:[e,r]}),t[2]=l,t[3]=a):a=t[3],a}case"pnpm":{let e,r,a,n,o,c,i,d,m,h;return t[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("title",{children:"pnpm"}),t[4]=e):e=t[4],t[5]===Symbol.for("react.memo_cache_sentinel")?(r=(0,s.jsx)("path",{d:"M30,10.75H21.251V2H30Z",style:{fill:"#f9ad00"}}),t[5]=r):r=t[5],t[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)("path",{d:"M20.374,10.75h-8.75V2h8.75Z",style:{fill:"#f9ad00"}}),t[6]=a):a=t[6],t[7]===Symbol.for("react.memo_cache_sentinel")?(n=(0,s.jsx)("path",{d:"M10.749,10.75H2V2h8.749Z",style:{fill:"#f9ad00"}}),t[7]=n):n=t[7],t[8]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("path",{d:"M30,20.375H21.251v-8.75H30Z",style:{fill:"#f9ad00"}}),t[8]=o):o=t[8],t[9]===Symbol.for("react.memo_cache_sentinel")?(c=(0,s.jsx)("path",{d:"M20.374,20.375h-8.75v-8.75h8.75Z",style:{fill:"#fff"}}),t[9]=c):c=t[9],t[10]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)("path",{d:"M20.374, 30h - 8.75V21.25h8.75Z",style:{fill:"#fff"}}),t[10]=i):i=t[10],t[11]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsx)("path",{d:"M30,30H21.251V21.25H30Z",style:{fill:"#fff"}}),t[11]=d):d=t[11],t[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,s.jsx)("path",{d:"M10.749,30H2V21.25h8.749Z",style:{fill:"#fff"}}),t[12]=m):m=t[12],t[13]!==l?(h=(0,s.jsxs)("svg",{className:l,width:"800px",height:"800px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:[e,r,a,n,o,c,i,d,m]}),t[13]=l,t[14]=h):h=t[14],h}case"bun":{let e,r,a,n,o,c,i,d,m,h,f,x,b,p,u;return t[15]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("title",{children:"bun"}),i=(0,s.jsx)("path",{fill:"#000",d:"M89.237 32.3c-.2-.213-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625-.212-.2-.412-.425-.625-.625A33.08 33.08 0 0 1 94.75 51c0 20.712-21.025 37.562-46.875 37.562-14.475 0-27.425-5.287-36.038-13.575l.625.625.625.625.625.625.625.625.625.625.625.625.625.625c8.6 8.638 21.838 14.2 36.663 14.2 25.85 0 46.875-16.85 46.875-37.5 0-8.825-3.8-17.187-10.513-23.762"}),d=(0,s.jsx)("path",{fill:"#FBF0DF",d:"M91.625 51c0 19.012-19.588 34.425-43.75 34.425S4.125 70.012 4.125 51c0-11.788 7.5-22.2 19.025-28.375s18.7-12.5 24.725-12.5 11.175 5.162 24.725 12.5C84.125 28.8 91.625 39.212 91.625 51"}),m=(0,s.jsx)("path",{fill:"#F6DECE",d:"M91.625 51a27 27 0 0 0-1-7.225C87.213 85.4 36.438 87.4 16.475 74.95a50 50 0 0 0 31.4 10.475C72 85.425 91.625 69.987 91.625 51"}),h=(0,s.jsx)("path",{fill:"#FFFEFC",d:"M31.038 20.337c5.587-3.35 13.012-9.637 20.312-9.65a11.6 11.6 0 0 0-3.475-.562c-3.025 0-6.25 1.562-10.312 3.912-1.413.825-2.876 1.738-4.425 2.688-2.913 1.8-6.25 3.837-10 5.875C11.237 29.037 4.124 39.65 4.124 51v1.487c7.575-26.762 21.338-28.8 26.913-32.15"}),f=(0,s.jsx)("path",{fill:"#CCBEA7",fillRule:"evenodd",d:"M44.275 13.287a20.51 20.51 0 0 1-7.037 15.588c-.35.312-.075.912.375.737 4.212-1.637 9.9-6.537 7.5-16.425-.1-.562-.838-.412-.838.1m2.838 0a20.3 20.3 0 0 1 2.012 16.838c-.15.437.388.812.688.45 2.737-3.5 5.125-10.45-2.025-17.95-.363-.325-.925.175-.675.612zm3.45-.212a20.52 20.52 0 0 1 8.562 14.7.412.412 0 0 0 .813.137c1.15-4.362.5-11.8-8.963-15.662-.5-.2-.825.475-.412.775zm-23.075 13a21.18 21.18 0 0 0 13.087-11.25c.225-.45.938-.275.825.225-2.162 10-9.4 12.087-13.9 11.812-.475.013-.462-.65-.012-.787",clipRule:"evenodd"}),x=(0,s.jsx)("path",{fill:"#000",d:"M47.875 88.562C22.025 88.562 1 71.712 1 51c0-12.5 7.725-24.163 20.663-31.15 3.75-2 6.962-4.013 9.825-5.775a262 262 0 0 1 4.5-2.738C40.375 8.737 44.125 7 47.875 7S54.9 8.5 59 10.925c1.25.712 2.5 1.487 3.837 2.337 3.113 1.925 6.626 4.1 11.25 6.588C87.026 26.837 94.75 38.487 94.75 51c0 20.712-21.025 37.562-46.875 37.562m0-78.437c-3.025 0-6.25 1.562-10.312 3.912-1.413.825-2.876 1.738-4.425 2.688-2.913 1.8-6.25 3.837-10 5.875C11.237 29.037 4.124 39.65 4.124 51c0 18.987 19.625 34.437 43.75 34.437S91.625 69.987 91.625 51c0-11.35-7.112-21.963-19.025-28.375-4.725-2.5-8.412-4.85-11.4-6.7-1.363-.838-2.613-1.613-3.75-2.3-3.788-2.25-6.55-3.5-9.575-3.5"}),b=(0,s.jsx)("path",{fill:"#B71422",d:"M56.688 60.125a11.16 11.16 0 0 1-3.65 5.887 8.5 8.5 0 0 1-5 2.35 8.55 8.55 0 0 1-5.163-2.35 11.16 11.16 0 0 1-3.6-5.887.9.9 0 0 1 1-1.013H55.7a.9.9 0 0 1 .987 1.013"}),p=(0,s.jsx)("path",{fill:"#FF6164",d:"M42.875 66.112a8.64 8.64 0 0 0 5.15 2.375 8.64 8.64 0 0 0 5.137-2.375q.672-.625 1.25-1.337a8.54 8.54 0 0 0-6.125-2.888 7.69 7.69 0 0 0-6.25 3.475c.288.263.538.513.838.75"}),r=(0,s.jsx)("path",{fill:"#000",d:"M43.075 65.125a6.7 6.7 0 0 1 5.237-2.6 7.5 7.5 0 0 1 5 2.112c.288-.312.563-.637.825-.962a8.75 8.75 0 0 0-5.887-2.413 7.95 7.95 0 0 0-6.112 2.95q.443.482.937.913"}),a=(0,s.jsx)("path",{fill:"#000",d:"M47.987 69.112a9.28 9.28 0 0 1-5.562-2.5 11.9 11.9 0 0 1-3.888-6.312 1.5 1.5 0 0 1 .325-1.25 1.76 1.76 0 0 1 1.413-.638H55.7a1.8 1.8 0 0 1 1.412.638 1.49 1.49 0 0 1 .313 1.25 11.9 11.9 0 0 1-3.888 6.312 9.27 9.27 0 0 1-5.55 2.5m-7.712-9.25c-.2 0-.25.088-.263.113a10.36 10.36 0 0 0 3.413 5.462 7.8 7.8 0 0 0 4.562 2.188 7.85 7.85 0 0 0 4.563-2.163A10.38 10.38 0 0 0 55.95 60a.26.26 0 0 0-.25-.113z"}),n=(0,s.jsx)("path",{fill:"#FEBBD0",d:"M66.9 60.9c4.038 0 7.312-1.926 7.312-4.3 0-2.375-3.273-4.3-7.312-4.3s-7.313 1.925-7.313 4.3 3.274 4.3 7.313 4.3m-37.837 0c4.038 0 7.312-1.926 7.312-4.3 0-2.375-3.274-4.3-7.312-4.3-4.04 0-7.313 1.925-7.313 4.3s3.274 4.3 7.313 4.3"}),o=(0,s.jsx)("path",{fill:"#000",fillRule:"evenodd",d:"M32.5 54.875a6.888 6.888 0 1 0 .025-13.775 6.888 6.888 0 0 0-.025 13.775m30.963 0a6.887 6.887 0 1 0-6.838-6.888 6.875 6.875 0 0 0 6.837 6.888",clipRule:"evenodd"}),c=(0,s.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M30.375 48.425a2.588 2.588 0 1 0 .025-5.176 2.588 2.588 0 0 0-.025 5.176m30.963 0a2.588 2.588 0 1 0-.026 0z",clipRule:"evenodd"}),t[15]=e,t[16]=r,t[17]=a,t[18]=n,t[19]=o,t[20]=c,t[21]=i,t[22]=d,t[23]=m,t[24]=h,t[25]=f,t[26]=x,t[27]=b,t[28]=p):(e=t[15],r=t[16],a=t[17],n=t[18],o=t[19],c=t[20],i=t[21],d=t[22],m=t[23],h=t[24],f=t[25],x=t[26],b=t[27],p=t[28]),t[29]!==l?(u=(0,s.jsxs)("svg",{className:l,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 100 100",children:[e,i,d,m,h,f,x,b,p,r,a,n,o,c]}),t[29]=l,t[30]=u):u=t[30],u}case"github":{let e,r,a;return t[31]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)("title",{children:"Github"}),r=(0,s.jsx)("path",{fill:"#f0f6fc",fillRule:"evenodd",d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a47 47 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0",clipRule:"evenodd"}),t[31]=e,t[32]=r):(e=t[31],r=t[32]),t[33]!==l?(a=(0,s.jsxs)("svg",{className:l,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 97.63 96.03",children:[e,r]}),t[33]=l,t[34]=a):a=t[34],a}default:return null}}},97090:(e,t,r)=>{r.d(t,{U:()=>m});var s=r(54568),a=r(99680),l=r(17159),n=r(9996),o=r(35049),c=r(56821),i=r(7620),d=r(38188);function m(e){let t,r,m,h,f,x,b,p=(0,a.c)(19),{className:u}=e,{setTheme:g,resolvedTheme:j}=(0,c.D)(),[y,v]=i.useState(!1);p[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{v(!0)},r=[],p[0]=t,p[1]=r):(t=p[0],r=p[1]),i.useEffect(t,r);let w=!!y&&"dark"===j;p[2]!==g?(m=e=>{g(e?"dark":"light")},p[2]=g,p[3]=m):m=p[3];let _=m;if(!y){let e,t,r;return p[4]!==u?(e=(0,d.cn)("inline-flex h-4 w-9 shrink-0 cursor-not-allowed items-center rounded-full border-2 border-transparent bg-input opacity-50",u),p[4]=u,p[5]=e):e=p[5],p[6]===Symbol.for("react.memo_cache_sentinel")?(t=(0,s.jsx)("span",{className:"block h-3 w-3 rounded-full bg-background shadow-lg ring-0"}),p[6]=t):t=p[6],p[7]!==e?(r=(0,s.jsx)("button",{type:"button",className:e,disabled:!0,"aria-label":"Toggle theme (loading)",children:t}),p[7]=e,p[8]=r):r=p[8],r}return p[9]!==u?(h=(0,d.cn)("peer inline-flex h-4 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",u),p[9]=u,p[10]=h):h=p[10],p[11]===Symbol.for("react.memo_cache_sentinel")?(f=(0,d.cn)("pointer-events-none flex h-3 w-3 items-center justify-center rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"),p[11]=f):f=p[11],p[12]!==w?(x=(0,s.jsx)(l.zi,{className:f,children:w?(0,s.jsx)(n.A,{className:"size-2 text-foreground"}):(0,s.jsx)(o.A,{className:"size-2 text-foreground"})}),p[12]=w,p[13]=x):x=p[13],p[14]!==_||p[15]!==w||p[16]!==h||p[17]!==x?(b=(0,s.jsx)(l.bL,{checked:w,onCheckedChange:_,className:h,"aria-label":"Toggle theme between light and dark",children:x}),p[14]=_,p[15]=w,p[16]=h,p[17]=x,p[18]=b):b=p[18],b}}}]); |