https://www.deta.studio/_next/static/chunks/b164d72ff1eeb2ae.js?dpl=dpl_EBz3iCRsxjbAeLauK5Za4AbCpRSo
1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,160643,e=>{"use strict";let t=(0,e.i(607655).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",()=>t])},954937,e=>{"use strict";var t=e.i(160643);e.s(["ArrowLeft",()=>t.default])},482500,(e,t,n)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return a}})},498970,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return r}});let a=e.r(9021);function r({reason:e,children:t}){if("undefined"==typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},622526,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return o}});let a=e.r(391610),r=e.r(11437),i=e.r(656651),s=e.r(482500);function o({moduleIds:e}){if("undefined"!=typeof window)return null;let t=i.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;n.push(...e)}}return 0===n.length?null:(0,a.jsx)(a.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,s.encodeURIPath)(e)}?dpl=dpl_EBz3iCRsxjbAeLauK5Za4AbCpRSo`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,r.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},165425,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return c}});let a=e.r(391610),r=e.r(138415),i=e.r(498970),s=e.r(622526);function o(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},c=function(e){let t={...l,...e},n=(0,r.lazy)(()=>t.loader().then(o)),c=t.loading;function u(e){let o=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,u=l?r.Suspense:r.Fragment,d=t.ssr?(0,a.jsxs)(a.Fragment,{children:["undefined"==typeof window?(0,a.jsx)(s.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(n,{...e})]}):(0,a.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(n,{...e})});return(0,a.jsx)(u,{...l?{fallback:o}:{},children:d})}return u.displayName="LoadableComponent",u}},389210,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r}});let a=e.r(481258)._(e.r(165425));function r(e,t){let n={};"function"==typeof e&&(n.loader=e);let r={...n,...t};return(0,a.default)({...r,modules:r.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},482994,e=>{"use strict";var t=e.i(391610);e.i(53759);var n=e.i(541048);function a({level:e,children:r,className:i}){switch(e){case 1:return(0,t.jsx)("h1",{className:(0,n.cn)("font-heading scroll-m-20 text-3xl font-bold tracking-tight lg:text-4xl dark:text-white",i),children:r});case 2:return(0,t.jsx)("h2",{className:(0,n.cn)("font-heading scroll-m-20 pb-2 text-2xl font-semibold tracking-tight transition-colors first:mt-0 lg:text-3xl",i),children:r});case 3:return(0,t.jsx)("h3",{className:(0,n.cn)("font-heading scroll-m-20 text-xl font-semibold tracking-tight lg:text-2xl",i),children:r});case 4:return(0,t.jsx)("h4",{className:(0,n.cn)("font-heading scroll-m-20 text-lg font-semibold tracking-tight lg:text-xl",i),children:r});case 5:return(0,t.jsx)("h5",{className:(0,n.cn)("font-heading scroll-m-20 text-base font-medium lg:text-lg",i),children:r});case 6:return(0,t.jsx)("h6",{className:(0,n.cn)("font-heading scroll-m-2
10 text-base font-medium",i),children:r});default:return(0,t.jsx)(a,{level:1,children:r})}}e.s(["Heading",()=>a])},555284,e=>{"use strict";let t=(0,e.i(607655).default)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);e.s(["MessageCircle",()=>t],555284)},398332,e=>{"use strict";var t=e.i(272875);async function n(e){e.auth.suppressGetSessionWarning=!0;let t=await e.auth.mfa.getAuthenticatorAssuranceLevel();if(e.auth.suppressGetSessionWarning=!1,t.error)throw Error(t.error.message);let{nextLevel:n,currentLevel:a}=t.data;return"aal2"===n&&n!==a}async function a(e,t){let{data:a,error:o}=await e.auth.getClaims();if(!a?.claims||o)return{data:null,error:new r,redirectTo:s("/auth/sign-in",t?.next)};let{verifyMfa:l=!0}=t??{};if(l&&await n(e))return{data:null,error:new i,redirectTo:s("/auth/verify",t?.next)};let c=a.claims;return{error:null,data:{is_anonymous:c.is_anonymous,aal:c.aal,email:c.email,phone:c.phone,app_metadata:c.app_metadata,user_metadata:c.user_metadata,id:c.sub,amr:c.amr}}}class r extends Error{constructor(){super("Authentication required")}}class i extends Error{constructor(){super("Multi-factor authentication required")}}function s(e,t){return e+(t?`?next=${t}`:"")}var o=e.i(502916);let l=["supabase:user"];function c(e){let n=(0,o.useSupabase)(),r=async()=>{let e=await a(n);if(!e.error)return e.data};return(0,t.useQuery)({queryFn:r,queryKey:l,initialData:e,refetchInterval:!1,refetchOnMount:!1,refetchOnWindowFocus:!1})}e.s(["useUser",()=>c],398332)},914460,e=>{"use strict";var t=e.i(138415),n=e.i(272875),a=e.i(735924),r=e.i(502916);function i(e,t){let a=(0,r.useSupabase)(),i=["account:data",e],s=async()=>{if(!e)return null;let t=await a.from("accounts").select(` 2 id, 3 name, 4 picture_url, 5 public_data 6 `).eq("primary_owner_user_id",e).eq("is_personal_account",!0).single();if(t.error)throw t.error;return t.data};return(0,n.useQuery)({queryKey:i,queryFn:s,enabled:!!e,refetchOnWindowFocus:!1,refetchOnMount:!1,initialData:t?.id?{id:t.id,name:t.name,picture_url:t.picture_url,public_data:t.public_data}:void 0})}function s(){let e=(0,a.useQueryClient)();return(0,t.useCallback)(t=>e.invalidateQueries({queryKey:["account:data",t]}),[e])}e.s(["usePersonalAccountData",()=>i,"useRevalidatePersonalAccountDataQuery",()=>s])},931578,e=>{"use strict";var t=e.i(391610);e.i(53759);var n=e.i(541048),a=e.i(623905);function r(e){let r=(0,n.cn)("mx-auto h-9 w-9 group-focus:ring-2",e.className);if("text"in e)return(0,t.jsx)(a.Avatar,{className:r,children:(0,t.jsx)(a.AvatarFallback,{className:(0,n.cn)(e.fallbackClassName,"uppercase",e.backgroundColor&&"text-white"),style:e.backgroundColor?{backgroundColor:e.backgroundColor}:void 0,children:e.text.slice(0,1)})});let i=e.displayName?.slice(0,1);return(0,t.jsxs)(a.Avatar,{className:r,children:[(0,t.jsx)(a.AvatarImage,{src:e.pictureUrl??void 0}),(0,t.jsx)(a.AvatarFallback,{className:(0,n.cn)(e.fallbackClassName,e.backgroundColor&&"text-white"),style:e.backgroundColor?{backgroundColor:e.backgroundColor}:void 0,children:(0,t.jsx)("span",{suppressHydrationWarning:!0,className:"uppercase",children:i})})]})}e.s(["ProfileAvatar",()=>r])},617760,e=>{"use strict";var t=e.i(805995),n=e.i(502916);function a(){let e=(0,n.useSupabase)();return(0,t.useMutation)({mutationFn:async()=>{try{await e.auth.signOut({scope:"local"})}catch{}"undefined"!=typeof document&&document.cookie.split(";").some(e=>/^sb-.*-auth-token/.test(e.trim()))&&(function(){if("undefined"==typeof document)return;let e=document.cookie.split(";").map(e=>e.split("=")[0]?.trim()).filter(e=>!!e&&e.startsWith("sb-")),t=window.location.hostname,n=t.split(".").slice(-2).join("."),a=["",t,`.${n}`];for(let t of e)for(let e of a){let n=e?`; domain=${e}`:"";document.cookie=`${t}=; path=/; max-age=0; SameSite=Lax${n}`}}(),window.location.assign("/"))}})}e.s(["useSignOut",()=>a])},614454,e=>{"use strict";var t=e.i(393998);let n=t.z.object({auth:t.z.object({signIn:t.z.string().min(1),signUp:t.z.string().min(1),verifyMfa:t.z.string().min(1),callback:t.z.string().min(1),passwordReset:t.z.string().min(1),passwordUpdate:t.z.string().min(1)}),app:t.z.object({home:t.z.string().min(1),chat:t.z.string().min(1),chatConversation:t.z.string().min(1),personalAccountSettings:t.z.string().min(1),personalAccountBilling:t.z.string().min(1),personalAccountBillingReturn:t.z.string().min(1),accountHome:t.z.string().min(1),accountDrawings:t.z.string().min(1),accountLibrary:t.z.string().min(1),accountSettings:t.z.string().min(1),accountBilling:t.z.string().min(1),accountMembers:t.z.string().min(1),accountBillingReturn:t.z.string().min(1),joinTeam:t.z.string().min(1),sharedWithMe:t.z.string().min(1)})}).parse({auth:{signIn:"/auth/sign-in",signUp:"/auth/sign-up",verifyMfa:"/auth/verify",callback:"/auth/callback",passwordReset:"/auth/password-reset",passwordUpdate:"/update-password"},app:{home:"/home",chat:"/home/chat",chatConversation:"/home/chat/[id]",personalAccountSettings:"/home/settings",personalAccountBilling:"/home/account-settings",personalAccountBillingReturn:"/home/account-settings/return",accountHome:"/home/[account]",accountDrawings:"/home/[account]/drawings",accountLibrary:"/home/[account]/library",accountSettings:"/home/[account]/settings",accountBilling:"/home/[account]/settings/billing",accountMembers:"/home/[account]/members",accountBillingReturn:"/home/[account]/settings/billing/return",joinTeam:"/join",sharedWithMe:"/home/shared"}});e.s(["default",0,n])},290126,e=>{"use strict";let t=(0,e.i(607655).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",()=>t],290126)},845899,e=>{"use strict";let t=(0,e.i(607655).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>t],845899)},619051,e=>{"use strict";var t=e.i(391610),n=e.i(138415),a=e.i(607655);let r=(0,a.default)("computer",[["rect",{width:"14",height:"8",x:"5",y:"2",rx:"2",key:"wc9tft"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",key:"w68u3i"}],["path",{d:"M6 18h2",key:"rwmk9e"}],["path",{d:"M12 18h6",key:"aqd8w3"}]]),i=(0,a.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),s=(0,a.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var o=e.i(408430);e.i(53759);var l=e.i(541048),c=e.i(7205),u=e.i(236610),d=e.i(297255),m=e.i(687123);let f=["light","dark","system"];function h(e){let{setTheme:a,theme:r}=(0,o.useTheme)(),d=(0,n.useMemo)(()=>f.map(e=>{let n=r===e;return(0,t.jsxs)(u.DropdownMenuItem,{className:(0,l.cn)("space-x-2",{"bg-muted":n}),onClick:()=>{a(e),g(e)},children:[(0,t.jsx)(v,{theme:e}),(0,t.jsx)("span",{children:(0,t.jsx)(m.Trans,{i18nKey:`common:${e}Theme`})})]},e)}),[a,r]);return(0,t.jsxs)(u.DropdownMenu,{children:[(0,t.jsx)(u.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(c.Button,{variant:"ghost",size:"icon",className:e.className,children:[(0,t.jsx)(s,{className:"h-[0.9rem] w-[0.9rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),(0,t.jsx)(i,{className:"absolute h-[0.9rem] w-[0.9rem] scale-0 rotate-90 transition-all dark:scale-100 dar
6k:rotate-0"}),(0,t.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,t.jsx)(u.DropdownMenuContent,{align:"end",children:d})]})}function p(){let{setTheme:e,theme:a,resolvedTheme:r}=(0,o.useTheme)(),i=(0,n.useMemo)(()=>f.map(n=>{let r=a===n;return(0,t.jsxs)(u.DropdownMenuItem,{className:(0,l.cn)("flex cursor-pointer items-center space-x-2",{"bg-muted":r}),onClick:()=>{e(n),g(n)},children:[(0,t.jsx)(v,{theme:n}),(0,t.jsx)("span",{children:(0,t.jsx)(m.Trans,{i18nKey:`common:${n}Theme`})})]},n)}),[e,a]);return(0,t.jsxs)(u.DropdownMenuSub,{children:[(0,t.jsx)(u.DropdownMenuSubTrigger,{className:"w-full items-center justify-between gap-x-3",children:(0,t.jsxs)("span",{className:"flex space-x-2",children:[(0,t.jsx)(v,{theme:r}),(0,t.jsx)("span",{children:(0,t.jsx)(m.Trans,{i18nKey:"common:theme"})})]})}),(0,t.jsx)(u.DropdownMenuSubContent,{children:i})]})}function x(){let{setTheme:e,theme:a,resolvedTheme:r}=(0,o.useTheme)(),[i,s]=(0,n.useState)(!1);return(0,t.jsxs)(d.Sheet,{open:i,onOpenChange:s,children:[(0,t.jsx)(d.SheetTrigger,{asChild:!0,children:(0,t.jsxs)(u.DropdownMenuItem,{className:"flex h-12 w-full items-center gap-x-3 px-3",onSelect:e=>e.preventDefault(),children:[(0,t.jsx)(v,{theme:r}),(0,t.jsx)("span",{children:(0,t.jsx)(m.Trans,{i18nKey:"common:theme"})})]})}),(0,t.jsxs)(d.SheetContent,{side:"bottom",children:[(0,t.jsx)(d.SheetHeader,{children:(0,t.jsx)(d.SheetTitle,{children:(0,t.jsx)(m.Trans,{i18nKey:"common:theme"})})}),(0,t.jsx)("div",{className:"flex flex-col gap-2 py-4",children:f.map(n=>{let r=a===n;return(0,t.jsxs)(c.Button,{variant:r?"secondary":"ghost",className:"justify-start gap-3",onClick:()=>{e(n),g(n),s(!1)},children:[(0,t.jsx)(v,{theme:n}),(0,t.jsx)("span",{children:(0,t.jsx)(m.Trans,{i18nKey:`common:${n}Theme`})})]},n)})})]})]})}function g(e){document.cookie=`theme=${e}; path=/; max-age=31536000`}function v({theme:e}){switch(e){case"light":return(0,t.jsx)(s,{className:"h-4"});case"dark":return(0,t.jsx)(i,{className:"h-4"});case"system":return(0,t.jsx)(r,{className:"h-4"})}}e.s(["MobileThemeToggle",()=>x,"ModeToggle",()=>h,"SubMenuModeToggle",()=>p],619051)},553238,e=>{"use strict";let t=(0,e.i(607655).default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);e.s(["Home",()=>t],553238)},598159,e=>{"use strict";let t=(0,e.i(607655).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["LogOut",()=>t],598159)},267112,e=>{"use strict";var t=e.i(391610),n=e.i(138415),a=e.i(666482),r=e.i(633129),i=e.i(845899),s=e.i(885129),o=e.i(553238),l=e.i(598159);let c=(0,e.i(607655).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var u=e.i(290126),d=e.i(129850),m=e.i(236610),f=e.i(355953),h=e.i(619051),p=e.i(931578),x=e.i(728090),g=e.i(687123);e.i(53759);var v=e.i(541048),j=e.i(914460);function w({className:e,user:w,signOutRequested:y,showProfileName:b=!0,paths:N,features:C,account:k,homeLink:M,nameLayout:T="stacked",children:R}){let{data:E,isPending:S}=(0,j.usePersonalAccountData)(w.id,k),P="stacked"===T,D=!(E?.name||k?.name)&&S,_=(0,n.useMemo)(()=>{let e=w?.email??void 0,t=w?.phone??void 0;return e??t},[w]),I=E?.name||k?.name||w?.email||"",A=(0,n.useMemo)(()=>{let e=E?.public_data,t=e?.role;return t?t.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):null},[E]),L=(0,n.useMemo)(()=>{let e=w?.app_metadata.role==="super-admin",t=w?.aal==="aal2";return e&&t},[w]),z=(0,n.useMemo)(()=>"undefined"!=typeof navigator&&navigator.userAgent.includes("DetaDesktop/"),[]);return(0,t.jsxs)(m.DropdownMenu,{children:[(0,t.jsxs)(m.DropdownMenuTrigger,{"aria-label":"Open your profile menu","data-test":"account-dropdown-trigger",className:(0,v.cn)("group/trigger fade-in focus:outline-primary flex cursor-pointer items-center group-data-[minimized=true]/sidebar:px-0",e??"",{"active:bg-secondary/50 items-center gap-4 roun
6ded-md hover:bg-secondary border border-dashed p-2 transition-colors":b&&P}),children:[(0,t.jsx)(p.ProfileAvatar,{className:(0,v.cn)("group-hover/trigger:border-background/50 rounded-full border border-transparent transition-colors",!P&&"h-7 w-7"),fallbackClassName:"rounded-full border",displayName:I??w?.email??"",pictureUrl:E?.picture_url,backgroundColor:(0,d.getUserColor)(w.id)}),(0,t.jsxs)(f.If,{condition:b&&P,children:[(0,t.jsxs)("div",{className:"fade-in flex w-full flex-col truncate text-left group-data-[minimized=true]/sidebar:hidden",children:[(0,t.jsx)("span",{"data-test":"account-dropdown-display-name",className:"truncate text-sm",children:I}),A?(0,t.jsx)("span",{"data-test":"account-dropdown-role",className:"text-muted-foreground truncate text-xs",children:A}):(0,t.jsx)("span",{"data-test":"account-dropdown-email",className:"text-muted-foreground truncate text-xs",children:_})]}),(0,t.jsx)(i.ChevronsUpDown,{className:"text-muted-foreground mr-1 h-8 group-data-[minimized=true]/sidebar:hidden"})]}),(0,t.jsxs)(f.If,{condition:b&&!P,children:[D?(0,t.jsx)(x.Skeleton,{className:"h-4 w-16 shrink-0 rounded"}):(0,t.jsx)("span",{"data-test":"account-dropdown-display-name",className:"fade-in min-w-0 truncate text-sm",children:I}),(0,t.jsx)(r.ChevronDown,{className:"text-muted-foreground h-4 w-4 shrink-0","aria-hidden":!0})]})]}),(0,t.jsxs)(m.DropdownMenuContent,{className:"xl:min-w-[15rem]!",children:[(0,t.jsx)(m.DropdownMenuItem,{className:"h-10! rounded-none",children:(0,t.jsxs)("div",{className:"flex flex-col justify-start truncate text-left text-xs",children:[(0,t.jsx)("div",{className:"text-muted-foreground",children:(0,t.jsx)(g.Trans,{i18nKey:"common:signedInAs"})}),(0,t.jsx)("div",{children:(0,t.jsx)("span",{className:"block truncate",children:_})})]})}),(0,t.jsx)(m.DropdownMenuSeparator,{}),(0,t.jsx)(f.If,{condition:null!==M,children:(0,t.jsx)(m.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(a.default,{className:"s-full flex cursor-pointer items-center space-x-2",href:M?.href??N.home,children:[M?.icon??(0,t.jsx)(o.Home,{className:"h-5"}),(0,t.jsx)("span",{className:"truncate",children:M?.label??(0,t.jsx)(g.Trans,{i18nKey:"common:routes.home"})})]})})}),(0,t.jsxs)(f.If,{condition:L,children:[(0,t.jsx)(m.DropdownMenuSeparator,{}),(0,t.jsx)(m.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(a.default,{className:"s-full flex cursor-pointer items-center space-x-2 text-yellow-700 dark:text-yellow-500",href:"/admin",children:[(0,t.jsx)(c,{className:"h-5"}),(0,t.jsx)("span",{children:"Super Admin"})]})})]}),(0,t.jsx)(m.DropdownMenuSeparator,{}),(0,t.jsx)(f.If,{condition:C.enableThemeToggle,children:(0,t.jsx)(h.SubMenuModeToggle,{})}),N.profile&&(0,t.jsx)(m.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(a.default,{className:"s-full flex cursor-pointer items-center space-x-2",href:N.profile,children:[(0,t.jsx)(u.User,{className:"h-5"}),(0,t.jsx)("span",{children:(0,t.jsx)(g.Trans,{i18nKey:"common:routes.profile"})})]})}),R,(0,t.jsx)(f.If,{condition:!z,children:(0,t.jsx)(m.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(a.default,{className:"s-full flex cursor-pointer items-center space-x-2",href:"/download",children:[(0,t.jsx)(s.Download,{className:"h-5"}),(0,t.jsx)("span",{children:(0,t.jsx)(g.Trans,{i18nKey:"common:routes.download"})})]})})}),(0,t.jsx)(m.DropdownMenuSeparator,{}),(0,t.jsx)(m.DropdownMenuItem,{"data-test":"account-dropdown-sign-out",role:"button",className:"cursor-pointer",onClick:y,children:(0,t.jsxs)("span",{className:"flex w-full items-center space-x-2",children:[(0,t.jsx)(l.LogOut,{className:"h-5"}),(0,t.jsx)("span",{children:(0,t.jsx)(g.Trans,{i18nKey:"auth:signOut"})})]})})]})]})}e.s(["PersonalAccountDropdown",()=>w],267112)},910344,e=>{"use strict";let t=(0,e.i(607655).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);e.s(["Menu",()=>t],910344)},270834,e=>{"use strict";var t=e.i(391610),n=e.i(323748),a=e.i(294237),r=e.i(138415),i=e.i(11437),s=e.i(194185),o=e.i(291967),l=e.i(492480),c=e.i(270672),u=e.i(789268),d=e.i(267500),m=e.i(520092),f=e.i(220344),h=e.i(344533),p=e.i(195895),x=e.i(707313),g=e.i(737471),v=e.i(767768),j=e.i(690563),w="NavigationMenu",[y,b,N]=(0,h.createCollection)(w),[C,k,M]=(0,h.createCollection)(w),[T,R]=(0,s.createContextScope)(w,[N,M]),[E,S]=T(w),[P,D]=T(w),_=r.forwardRef((e,n
6)=>{let{__scopeNavigationMenu:a,value:i,onValueChange:s,defaultValue:o,delayDuration:m=200,skipDelayDuration:f=300,orientation:h="horizontal",dir:p,...x}=e,[g,v]=r.useState(null),j=(0,u.useComposedRefs)(n,e=>v(e)),y=(0,d.useDirection)(p),b=r.useRef(0),N=r.useRef(0),C=r.useRef(0),[k,M]=r.useState(!0),[T,R]=(0,c.useControllableState)({prop:i,onChange:e=>{let t=f>0;""!==e?(window.clearTimeout(C.current),t&&M(!1)):(window.clearTimeout(C.current),C.current=window.setTimeout(()=>M(!0),f)),s?.(e)},defaultProp:o??"",caller:w}),E=r.useCallback(()=>{window.clearTimeout(N.current),N.current=window.setTimeout(()=>R(""),150)},[R]),S=r.useCallback(e=>{window.clearTimeout(N.current),R(e)},[R]),P=r.useCallback(e=>{T===e?window.clearTimeout(N.current):b.current=window.setTimeout(()=>{window.clearTimeout(N.current),R(e)},m)},[T,R,m]);return r.useEffect(()=>()=>{window.clearTimeout(b.current),window.clearTimeout(N.current),window.clearTimeout(C.current)},[]),(0,t.jsx)(L,{scope:a,isRootMenu:!0,value:T,dir:y,orientation:h,rootNavigationMenu:g,onTriggerEnter:e=>{window.clearTimeout(b.current),k?P(e):S(e)},onTriggerLeave:()=>{window.clearTimeout(b.current),E()},onContentEnter:()=>window.clearTimeout(N.current),onContentLeave:E,onItemSelect:e=>{R(t=>t===e?"":e)},onItemDismiss:()=>R(""),children:(0,t.jsx)(l.Primitive.nav,{"aria-label":"Main","data-orientation":h,dir:y,...x,ref:j})})});_.displayName=w;var I="NavigationMenuSub",A=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,value:r,onValueChange:i,defaultValue:s,orientation:o="horizontal",...u}=e,d=S(I,a),[m,f]=(0,c.useControllableState)({prop:r,onChange:i,defaultProp:s??"",caller:I});return(0,t.jsx)(L,{scope:a,isRootMenu:!1,value:m,dir:d.dir,orientation:o,rootNavigationMenu:d.rootNavigationMenu,onTriggerEnter:e=>f(e),onItemSelect:e=>f(e),onItemDismiss:()=>f(""),children:(0,t.jsx)(l.Primitive.div,{"data-orientation":o,...u,ref:n})})});A.displayName=I;var L=e=>{let{scope:n,isRootMenu:a,rootNavigationMenu:i,dir:s,orientation:o,children:l,value:c,onItemSelect:u,onItemDismiss:d,onTriggerEnter:m,onTriggerLeave:h,onContentEnter:p,onContentLeave:g}=e,[j,w]=r.useState(null),[b,N]=r.useState(new Map),[C,k]=r.useState(null);return(0,t.jsx)(E,{scope:n,isRootMenu:a,rootNavigationMenu:i,value:c,previousValue:(0,x.usePrevious)(c),baseId:(0,f.useId)(),dir:s,orientation:o,viewport:j,onViewportChange:w,indicatorTrack:C,onIndicatorTrackChange:k,onTriggerEnter:(0,v.useCallbackRef)(m),onTriggerLeave:(0,v.useCallbackRef)(h),onContentEnter:(0,v.useCallbackRef)(p),onContentLeave:(0,v.useCallbackRef)(g),onItemSelect:(0,v.useCallbackRef)(u),onItemDismiss:(0,v.useCallbackRef)(d),onViewportContentChange:r.useCallback((e,t)=>{N(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:r.useCallback(e=>{N(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,t.jsx)(y.Provider,{scope:n,children:(0,t.jsx)(P,{scope:n,items:b,children:l})})})},z="NavigationMenuList",O=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,...r}=e,i=S(z,a),s=(0,t.jsx)(l.Primitive.ul,{"data-orientation":i.orientation,...r,ref:n});return(0,t.jsx)(l.Primitive.div,{style:{position:"relative"},ref:i.onIndicatorTrackChange,children:(0,t.jsx)(y.Slot,{scope:a,children:i.isRootMenu?(0,t.jsx)(er,{asChild:!0,children:s}):s})})});O.displayName=z;var H="NavigationMenuItem",[K,F]=T(H),U=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,value:i,...s}=e,o=(0,f.useId)(),c=r.useRef(null),u=r.useRef(null),d=r.useRef(null),m=r.useRef(()=>{}),h=r.useRef(!1),p=r.useCallback((e="start")=>{if(c.current){m.current();let t=eo(c.current);t.length&&el("start"===e?t:t.reverse())}},[]),x=r.useCallback(()=>{if(c.current){var e;let t=eo(c.current);t.length&&((e=t).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),m.current=()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute("tabindex",t)})})}},[]);return(0,t.jsx)(K,{scope:a,value:i||o||"LEGACY_REACT_AUTO_VALUE",triggerRef:u,contentRef:c,focusProxyRef:d,wasEscapeCloseRef:h,onEntryKeyDown:p,onFocusProxyEnter:p,onRootContentClose:x,onContentFocusOutside:x,children:(0,t.jsx)(l.Primitive.li,{...s,ref:n})})});U.displayName=H;
6var B="NavigationMenuTrigger",V=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,disabled:i,...s}=e,c=S(B,e.__scopeNavigationMenu),d=F(B,e.__scopeNavigationMenu),m=r.useRef(null),f=(0,u.useComposedRefs)(m,d.triggerRef,n),h=ed(c.baseId,d.value),p=em(c.baseId,d.value),x=r.useRef(!1),g=r.useRef(!1),v=d.value===c.value;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.ItemSlot,{scope:a,value:d.value,children:(0,t.jsx)(es,{asChild:!0,children:(0,t.jsx)(l.Primitive.button,{id:h,disabled:i,"data-disabled":i?"":void 0,"data-state":eu(v),"aria-expanded":v,"aria-controls":p,...s,ref:f,onPointerEnter:(0,o.composeEventHandlers)(e.onPointerEnter,()=>{g.current=!1,d.wasEscapeCloseRef.current=!1}),onPointerMove:(0,o.composeEventHandlers)(e.onPointerMove,ef(()=>{i||g.current||d.wasEscapeCloseRef.current||x.current||(c.onTriggerEnter(d.value),x.current=!0)})),onPointerLeave:(0,o.composeEventHandlers)(e.onPointerLeave,ef(()=>{i||(c.onTriggerLeave(),x.current=!1)})),onClick:(0,o.composeEventHandlers)(e.onClick,()=>{c.onItemSelect(d.value),g.current=v}),onKeyDown:(0,o.composeEventHandlers)(e.onKeyDown,e=>{let t={horizontal:"ArrowDown",vertical:"rtl"===c.dir?"ArrowLeft":"ArrowRight"}[c.orientation];v&&e.key===t&&(d.onEntryKeyDown(),e.preventDefault())})})})}),v&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.Root,{"aria-hidden":!0,tabIndex:0,ref:d.focusProxyRef,onFocus:e=>{let t=d.contentRef.current,n=e.relatedTarget,a=n===m.current,r=t?.contains(n);(a||!r)&&d.onFocusProxyEnter(a?"start":"end")}}),c.viewport&&(0,t.jsx)("span",{"aria-owns":p})]})]})});V.displayName=B;var $="navigationMenu.linkSelect",W=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,active:r,onSelect:i,...s}=e;return(0,t.jsx)(es,{asChild:!0,children:(0,t.jsx)(l.Primitive.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...s,ref:n,onClick:(0,o.composeEventHandlers)(e.onClick,e=>{let t=e.target,n=new CustomEvent($,{bubbles:!0,cancelable:!0});if(t.addEventListener($,e=>i?.(e),{once:!0}),(0,l.dispatchDiscreteCustomEvent)(t,n),!n.defaultPrevented&&!e.metaKey){let e=new CustomEvent(J,{bubbles:!0,cancelable:!0});(0,l.dispatchDiscreteCustomEvent)(t,e)}},{checkForDefaultPrevented:!1})})})});W.displayName="NavigationMenuLink";var G="NavigationMenuIndicator",q=r.forwardRef((e,n)=>{let{forceMount:a,...r}=e,s=S(G,e.__scopeNavigationMenu),o=!!s.value;return s.indicatorTrack?i.default.createPortal((0,t.jsx)(m.Presence,{present:a||o,children:(0,t.jsx)(Q,{...r,ref:n})}),s.indicatorTrack):null});q.displayName=G;var Q=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,...i}=e,s=S(G,a),o=b(a),[c,u]=r.useState(null),[d,m]=r.useState(null),f="horizontal"===s.orientation,h=!!s.value;r.useEffect(()=>{let e=o(),t=e.find(e=>e.value===s.value)?.ref.current;t&&u(t)},[o,s.value]);let p=()=>{c&&m({size:f?c.offsetWidth:c.offsetHeight,offset:f?c.offsetLeft:c.offsetTop})};return ec(c,p),ec(s.indicatorTrack,p),d?(0,t.jsx)(l.Primitive.div,{"aria-hidden":!0,"data-state":h?"visible":"hidden","data-orientation":s.orientation,...i,ref:n,style:{position:"absolute",...f?{left:0,width:d.size+"px",transform:`translateX(${d.offset}px)`}:{top:0,height:d.size+"px",transform:`translateY(${d.offset}px)`},...i.style}}):null}),X="NavigationMenuContent",Y=r.forwardRef((e,n)=>{let{forceMount:a,...r}=e,i=S(X,e.__scopeNavigationMenu),s=F(X,e.__scopeNavigationMenu),l=(0,u.useComposedRefs)(s.contentRef,n),c=s.value===i.value,d={value:s.value,triggerRef:s.triggerRef,focusProxyRef:s.focusProxyRef,wasEscapeCloseRef:s.wasEscapeCloseRef,onContentFocusOutside:s.onContentFocusOutside,onRootContentClose:s.onRootContentClose,...r};return i.viewport?(0,t.jsx)(Z,{forceMount:a,...d,ref:l}):(0,t.jsx)(m.Presence,{present:a||c,children:(0,t.jsx)(ee,{"data-state":eu(c),...d,ref:l,onPointerEnter:(0,o.composeEventHandlers)(e.onPointerEnter,i.onContentEnter),onPointerLeave:(0,o.composeEventHandlers)(e.onPointerLeave,ef(i.onContentLeave)),style:{pointerEvents:!c&&i.isRootMenu?"none":void 0,...d.style}})})});Y.displayName=X;var Z=r.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:a}=S(X,e.__scopeNavigationMenu);return(0,g.useLayoutEffect)(()=>{n(e.value,{ref:t,...e})},[e,t,n]),(0,g.useLayoutEffect)(()=>()=>a(e.value),[e.value,a]),null}
6),J="navigationMenu.rootContentDismiss",ee=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,value:i,triggerRef:s,focusProxyRef:l,wasEscapeCloseRef:c,onRootContentClose:d,onContentFocusOutside:m,...f}=e,h=S(X,a),x=r.useRef(null),g=(0,u.useComposedRefs)(x,n),v=ed(h.baseId,i),j=em(h.baseId,i),w=b(a),y=r.useRef(null),{onItemDismiss:N}=h;r.useEffect(()=>{let e=x.current;if(h.isRootMenu&&e){let t=()=>{N(),d(),e.contains(document.activeElement)&&s.current?.focus()};return e.addEventListener(J,t),()=>e.removeEventListener(J,t)}},[h.isRootMenu,e.value,s,N,d]);let C=r.useMemo(()=>{let e=w().map(e=>e.value);"rtl"===h.dir&&e.reverse();let t=e.indexOf(h.value),n=e.indexOf(h.previousValue),a=i===h.value,r=n===e.indexOf(i);if(!a&&!r)return y.current;let s=(()=>{if(t!==n){if(a&&-1!==n)return t>n?"from-end":"from-start";if(r&&-1!==t)return t>n?"to-start":"to-end"}return null})();return y.current=s,s},[h.previousValue,h.value,h.dir,w,i]);return(0,t.jsx)(er,{asChild:!0,children:(0,t.jsx)(p.DismissableLayer,{id:j,"aria-labelledby":v,"data-motion":C,"data-orientation":h.orientation,...f,ref:g,disableOutsidePointerEvents:!1,onDismiss:()=>{let e=new Event(J,{bubbles:!0,cancelable:!0});x.current?.dispatchEvent(e)},onFocusOutside:(0,o.composeEventHandlers)(e.onFocusOutside,e=>{m();let t=e.target;h.rootNavigationMenu?.contains(t)&&e.preventDefault()}),onPointerDownOutside:(0,o.composeEventHandlers)(e.onPointerDownOutside,e=>{let t=e.target,n=w().some(e=>e.ref.current?.contains(t)),a=h.isRootMenu&&h.viewport?.contains(t);(n||a||!h.isRootMenu)&&e.preventDefault()}),onKeyDown:(0,o.composeEventHandlers)(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){let t=eo(e.currentTarget),n=document.activeElement,a=t.findIndex(e=>e===n);el(e.shiftKey?t.slice(0,a).reverse():t.slice(a+1,t.length))?e.preventDefault():l.current?.focus()}}),onEscapeKeyDown:(0,o.composeEventHandlers)(e.onEscapeKeyDown,e=>{c.current=!0})})})}),et="NavigationMenuViewport",en=r.forwardRef((e,n)=>{let{forceMount:a,...r}=e,i=!!S(et,e.__scopeNavigationMenu).value;return(0,t.jsx)(m.Presence,{present:a||i,children:(0,t.jsx)(ea,{...r,ref:n})})});en.displayName=et;var ea=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,children:i,...s}=e,c=S(et,a),d=(0,u.useComposedRefs)(n,c.onViewportChange),f=D(X,e.__scopeNavigationMenu),[h,p]=r.useState(null),[x,g]=r.useState(null),v=h?h?.width+"px":void 0,j=h?h?.height+"px":void 0,w=!!c.value,y=w?c.value:c.previousValue;return ec(x,()=>{x&&p({width:x.offsetWidth,height:x.offsetHeight})}),(0,t.jsx)(l.Primitive.div,{"data-state":eu(w),"data-orientation":c.orientation,...s,ref:d,style:{pointerEvents:!w&&c.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":v,"--radix-navigation-menu-viewport-height":j,...s.style},onPointerEnter:(0,o.composeEventHandlers)(e.onPointerEnter,c.onContentEnter),onPointerLeave:(0,o.composeEventHandlers)(e.onPointerLeave,ef(c.onContentLeave)),children:Array.from(f.items).map(([e,{ref:n,forceMount:a,...r}])=>{let i=y===e;return(0,t.jsx)(m.Presence,{present:a||i,children:(0,t.jsx)(ee,{...r,ref:(0,u.composeRefs)(n,e=>{i&&e&&g(e)})})},e)})})}),er=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,...r}=e,i=S("FocusGroup",a);return(0,t.jsx)(C.Provider,{scope:a,children:(0,t.jsx)(C.Slot,{scope:a,children:(0,t.jsx)(l.Primitive.div,{dir:i.dir,...r,ref:n})})})}),ei=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],es=r.forwardRef((e,n)=>{let{__scopeNavigationMenu:a,...r}=e,i=k(a),s=S("FocusGroupItem",a);return(0,t.jsx)(C.ItemSlot,{scope:a,children:(0,t.jsx)(l.Primitive.button,{...r,ref:n,onKeyDown:(0,o.composeEventHandlers)(e.onKeyDown,e=>{if(["Home","End",...ei].includes(e.key)){let t=i().map(e=>e.ref.current);if(["rtl"===s.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),ei.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>el(t)),e.preventDefault()}})})})});function eo(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function el(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function ec(e,t){let n=(0,v.useCallbackRef)(t);(0,g.useLayoutEffect)(()=>{let t=0;if(e){let a=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(t),a.unobserve(e)}}},[e,n])}function eu(e){return e?"open":"closed"}function ed(e,t){return`${e}-trigger-${t}`}function em(e,t){return`${e}-content-${t}`}function ef(e){return t=>
6"mouse"===t.pointerType?e(t):void 0}e.s(["Content",()=>Y,"Indicator",()=>q,"Item",()=>U,"Link",()=>W,"List",()=>O,"NavigationMenu",()=>_,"NavigationMenuContent",()=>Y,"NavigationMenuIndicator",()=>q,"NavigationMenuItem",()=>U,"NavigationMenuLink",()=>W,"NavigationMenuList",()=>O,"NavigationMenuSub",()=>A,"NavigationMenuTrigger",()=>V,"NavigationMenuViewport",()=>en,"Root",()=>_,"Sub",()=>A,"Trigger",()=>V,"Viewport",()=>en,"createNavigationMenuScope",()=>R],325394);var eh=e.i(325394),eh=eh;e.i(53759);var ep=e.i(541048);let ex=({className:e,children:n,...a})=>(0,t.jsxs)(eh.Root,{className:(0,ep.cn)("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...a,children:[n,(0,t.jsx)(eN,{})]});ex.displayName=eh.Root.displayName;let eg=({className:e,...n})=>(0,t.jsx)(eh.List,{className:(0,ep.cn)("group flex flex-1 list-none items-center justify-center space-x-1",e),...n});eg.displayName=eh.List.displayName;let ev=eh.Item,ej=(0,a.cva)("group bg-background hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-active:bg-accent/50 data-[state=open]:bg-accent/50 inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-sm font-medium transition-colors focus:outline-hidden disabled:pointer-events-none disabled:opacity-50"),ew=({className:e,children:a,...r})=>(0,t.jsxs)(eh.Trigger,{className:(0,ep.cn)(ej(),"group",e),...r,children:[a," ",(0,t.jsx)(n.ChevronDownIcon,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]});ew.displayName=eh.Trigger.displayName;let ey=({className:e,...n})=>(0,t.jsx)(eh.Content,{className:(0,ep.cn)("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full md:absolute md:w-auto",e),...n});ey.displayName=eh.Content.displayName;let eb=eh.Link,eN=({className:e,...n})=>(0,t.jsx)("div",{className:(0,ep.cn)("absolute top-full left-0 flex justify-center"),children:(0,t.jsx)(eh.Viewport,{className:(0,ep.cn)("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow-xs md:w-[var(--radix-navigation-menu-viewport-width)]",e),...n})});eN.displayName=eh.Viewport.displayName;let eC=({className:e,...n})=>(0,t.jsx)(eh.Indicator,{className:(0,ep.cn)("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-1 flex h-1.5 items-end justify-center overflow-hidden",e),...n,children:(0,t.jsx)("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})});eC.displayName=eh.Indicator.displayName,e.s(["NavigationMenu",()=>ex,"NavigationMenuContent",()=>ey,"NavigationMenuIndicator",()=>eC,"NavigationMenuItem",()=>ev,"NavigationMenuLink",()=>eb,"NavigationMenuList",()=>eg,"NavigationMenuTrigger",()=>ew,"NavigationMenuViewport",()=>eN,"navigationMenuTriggerStyle",()=>ej],270834)},17421,e=>{"use strict";var t=e.i(391610),n=e.i(389210),a=e.i(638437),r=e.i(267112),i=e.i(617760),s=e.i(502916),o=e.i(7205),l=e.i(355953),c=e.i(687123),u=e.i(917397),d=e.i(614454);let m=(0,n.default)(()=>e.A(800909).then(e=>({default:e.ModeToggle})),{loadableGenerated:{modules:[659066]},ssr:!1}),f={enableThemeToggle:u.default.enableThemeToggle};function h({user:e,teamSlug:n}){let a=(0,i.useSignOut)(),s={home:n?`/home/${n}`:d.default.app.home};return e?(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsx)(l.If,{condition:f.enableThemeToggle,children:(0,t.jsx)(m,{})}),(0,t.jsx)(r.PersonalAccountDropdown,{showProfileName:!1,paths:s,features:f,user:e,signOutRequested:()=>a.mutateAsync()})]}):(0,t.jsx)(p,{})}
6function p(){let e=(0,s.useSupabase)(),n=(0,a.useRouter)(),r=async t=>{t.preventDefault();let{data:{user:a}}=await e.auth.getUser();a?.is_anonymous&&await e.auth.signOut(),n.push(d.default.auth.signUp)},i=async t=>{t.preventDefault();let{data:{user:a}}=await e.auth.getUser();a?.is_anonymous&&await e.auth.signOut(),n.push(d.default.auth.signIn)};return(0,t.jsxs)("div",{className:"animate-in fade-in flex items-center gap-x-2 duration-500",children:[(0,t.jsx)(m,{}),(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsx)(o.Button,{className:"text-xs md:text-sm",variant:"outline",size:"sm",onClick:i,children:(0,t.jsx)(c.Trans,{i18nKey:"auth:signIn"})}),(0,t.jsx)(o.Button,{className:"text-xs md:text-sm",variant:"default",size:"sm",onClick:r,children:(0,t.jsx)(c.Trans,{i18nKey:"auth:signUp"})})]})]})}e.s(["SiteHeaderAccountSection",()=>h])},641208,e=>{"use strict";var t=e.i(391610),n=e.i(666482),a=e.i(638437),r=e.i(270834);e.i(53759);var i=e.i(541048),s=e.i(475246);function o({path:e,children:o}){let l,c=(0,a.usePathname)(),u=(l=(0,s.isRouteActive)(e,c),(0,i.cn)("inline-flex w-max text-base font-medium transition-colors duration-300",{"dark:text-neutral-300 dark:hover:text-white":!l,"text-current dark:text-white":l}));return(0,t.jsx)(r.NavigationMenuItem,{children:(0,t.jsx)(n.default,{className:u,href:e,as:e,prefetch:!0,children:o})},e)}e.s(["SiteNavigationItem",()=>o])},593758,e=>{"use strict";var t=e.i(391610),n=e.i(666482);e.i(53759);var a=e.i(541048);function r({className:e}){return(0,t.jsxs)("div",{className:(0,a.cn)("flex items-center gap-2",e),children:[(0,t.jsxs)("svg",{className:"text-primary h-8 w-8 flex-shrink-0 drop-shadow-[0_1px_2px_rgba(0,0,0,0.1)]",viewBox:"0 0 120 120",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsxs)("defs",{children:[(0,t.jsxs)("linearGradient",{id:"logo-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[(0,t.jsx)("stop",{offset:"0%",style:{stopColor:"#FD6411"}}),(0,t.jsx)("stop",{offset:"100%",style:{stopColor:"#FFCC57"}})]}),(0,t.jsxs)("filter",{id:"logo-d-inner",x:"-20%",y:"-20%",width:"140%",height:"140%",children:[(0,t.jsx)("feComponentTransfer",{in:"SourceAlpha",children:(0,t.jsx)("feFuncA",{type:"table",tableValues:"1 0"})}),(0,t.jsx)("feGaussianBlur",{stdDeviation:"1.4"}),(0,t.jsx)("feOffset",{dx:"0",dy:"2",result:"inner-offset"}),(0,t.jsx)("feFlood",{floodColor:"#5a2400",floodOpacity:"0.55"}),(0,t.jsx)("feComposite",{in2:"inner-offset",operator:"in"}),(0,t.jsx)("feComposite",{in2:"SourceAlpha",operator:"in"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"SourceGraphic"}),(0,t.jsx)("feMergeNode",{})]})]})]}),(0,t.jsx)("rect",{width:"120",height:"120",rx:"20",fill:"url(#logo-gradient)"}),(0,t.jsx)("path",{d:"M40 30h25c15 0 25 10 25 30s-10 30-25 30H40V30z",fill:"var(--primary-foreground)",filter:"url(#logo-d-inner)"})]}),(0,t.jsx)("span",{className:"font-sans text-base font-bold tracking-tight whitespace-nowrap md:text-2xl",children:"Deta Studio"})]})}function i({href:e,label:a,className:i}){return null===e?(0,t.jsx)(r,{className:i}):(0,t.jsx)(n.default,{"aria-label":a??"Home Page",href:e??"/",prefetch:!0,children:(0,t.jsx)(r,{className:i})})}e.s(["AppLogo",()=>i])},871686,e=>{"use strict";var t=e.i(138415),n=e.i(18278);function a(e){let a=(0,n.useMonitoring)();(0,t.useEffect)(()=>{a.captureException(e)},[e,a])}e.s(["useCaptureException",()=>a])},470692,e=>{"use strict";var t=e.i(391610),n=e.i(593758),a=e.i(17421);e.i(666482),e.i(910344),e.i(236610);var r=e.i(270834),i=e.i(687123),s=e.i(641208);let o={docs:{label:"common:documentation",path:"/docs"},changelog:{label:"marketing:changelog",path:"/changelog"}};function l(){return(0,t.jsx)("a",{href:"https://www.deta.studio/download",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground text-base font-medium transition-colors",children:"Download"})}function c(){let e=Object.values(o).map(e=>(0,t.jsx)(s.SiteNavigationItem,{path:e.path,children:(0,t.jsx)(i.Trans,{i18nKey:e.label})},e.path));return(0,t.jsxs)("div",{className:"hidden items-center gap-x-5 lg:flex",children:[(0,t.jsx)(r.NavigationMenu,{children:(0,t.jsx)(r.NavigationMenuList,{className:"gap-x-5",children:e})}),(0,t.jsx)(l,{})]})}function u(e){return(0,t.jsx)("div",{className:"site-header bg-background/80 dark:bg-background/80 sticky top-0 z-10 w-full backdrop-blur-lg",children:(0,t.jsx)("div",{className:"relative container",children:(0,t.jsxs)("div",{className:"flex h-20 items-center justify-between",children:[(0,t.jsx)(n.AppLogo,{}),(0,t.jsxs)("div",{className:"flex items-center gap-x-6 lg:gap-x-8",children:[(0,t.jsx)(c,{}),(0,t.jsx)(a.SiteHeaderAccountSection,{user:e.user??null,teamSlug:e.teamSlug??null})]})]})})})}e.s(["SiteHeader",()=>u],470692)},836,e=>{"use strict";var t=e.i(391610),n=e.i(666482),a=e.i(638437),r=e.i(954937),i=e.i(555284),s=e.i(871686),o=e.i(398332),l=e.i(7205),c=e.i(482994),u=e.i(687123),d=e.i(470692);e.s(["default",0,({error:e})=>{(0,s.useCaptureException)(e);let m=(0,o.useUser)(),f=(0,a.useRouter)();return(0,t.jsxs)("div",{className:"flex h-screen flex-1 flex-col",children:[(0,t.jsx)(d.SiteHeader,{user:m.data}),(0,t.jsx)("div",{className:"container m-auto flex w-full flex-1 flex-col items-center justify-center",children:(0,t.jsxs)("div",{className:"flex flex-col items-center space-y-8",children:[(0,t.jsx)("div",{children:(0,t.jsx)("h1",{className:"font-heading text-9xl font-semibold",children:(0,t.jsx)(u.Trans,{i18nKey:"common:errorPageHeading"})})}),(0,t.jsxs)("div",{className:"flex flex-col items-center space-y-8",children:[(0,t.jsxs)("div",{className:"flex max-w-xl flex-col items-center gap-y-2 text-center",children:[(0,t.jsx)("div",{children:(0,t.jsx)(c.Heading,{level:2,children:(0,t.jsx)(u.Trans,{i18nKey:"common:genericError"})})}),(0,t.jsx)("p",{className:"text-muted-foreground text-lg",children:(0,t.jsx)(u.Trans,{i18nKey:"common:genericErrorSubHeading"})})]}),(0,t.jsxs)("div",{className:"flex space-x-4",children:[(0,t.jsxs)(l.Button,{className:"w-full",variant:"default",onClick:()=>{let e;
6(e=window.navigation,e?.canGoBack??!0)?f.back():f.push(m.data?"/home":"/")},children:[(0,t.jsx)(r.ArrowLeft,{className:"mr-2 h-4"}),(0,t.jsx)(u.Trans,{i18nKey:"common:goBack"})]}),(0,t.jsx)(l.Button,{className:"w-full",variant:"outline",asChild:!0,children:(0,t.jsxs)(n.default,{href:"/contact",children:[(0,t.jsx)(i.MessageCircle,{className:"mr-2 h-4"}),(0,t.jsx)(u.Trans,{i18nKey:"common:contactUs"})]})})]})]})]})})]})}])},800909,e=>{e.v(t=>Promise.all(["static/chunks/bef3f0e316b7a4f2.js"].map(t=>e.l(t))).then(()=>t(659066)))}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.