@donotdev/ui 0.0.19 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- "use client";var Ho=Object.defineProperty;var Wr=(e,t,o)=>t in e?Ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Ne=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wo=(e,t)=>{for(var o in t)Ho(e,o,{get:t[o],enumerable:!0})};var ot=(e,t,o)=>Wr(e,typeof t!="symbol"?t+"":t,o);import*as nt from"lucide-react";import{isValidElement as $r}from"react";import{cn as zt}from"@donotdev/components";import{jsx as Ue}from"react/jsx-runtime";function Kr(e){if(!e)return nt.Palette;let t=e.replace(/['"]/g,"");return nt[t]||nt.Palette}var z,Yr,le=Ne(()=>{"use strict";z=({icon:e,fallback:t,className:o,ariaHidden:n=!1})=>{let r=e||t;if(!r)return null;let a="dndev-size-md";if(typeof r=="function"||typeof r=="object"&&r!==null&&"render"in r)return Ue(r,{className:zt(a,o),style:{flexShrink:0},"aria-hidden":n});if(typeof r=="string"){if(!/^[a-zA-Z0-9_-]+$/.test(r))return Ue("span",{className:zt(a,o),style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r});let c=Kr(r);return Ue(c,{className:zt(a,o),style:{flexShrink:0},"aria-hidden":n})}return $r(r)?Ue("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r}):Ue("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r})},Yr=z});import*as ta from"@donotdev/auth";import{DEGRADED_AUTH_API as oa}from"@donotdev/core";function na(e){return oa[e]}function A(e){return Vt?Vt(e):na(e)}var Vt,km,fe=Ne(()=>{"use strict";Vt=ta?.useAuth;km=typeof Vt=="function"});var Gt={};Wo(Gt,{default:()=>ha});import{Cookie as Ut,Settings as ra,Shield as aa,BarChart3 as ia,Target as sa}from"lucide-react";import{useState as _t,useEffect as at,useRef as la}from"react";import{Accordion as ca,Button as _e,BUTTON_VARIANT as it,Card as qo,Switch as da,Text as Ge,cn as pa,Stack as ce}from"@donotdev/components";import{handleError as ua,useConsent as Ee,getCookieExamples as st,hasOptionalCookies as ma}from"@donotdev/core";import{CONSENT_CATEGORY as ve}from"@donotdev/core";import{useTranslation as ga}from"@donotdev/core";import{isClient as fa}from"@donotdev/core";import{Fragment as ya,jsx as B,jsxs as de}from"react/jsx-runtime";function va({position:e="bottom",showBranding:t=!0,brandingText:o="Powered by DoNotDev Framework",className:n=""}){let r=Ee("hasConsented"),a=Ee("categories"),i=Ee("acceptAll"),l=Ee("declineAll"),c=Ee("updateCategory"),d=Ee("showBanner"),{t:s}=ga("cookies"),[p,g]=_t(!1),[u,m]=_t(!r||d),[y,h]=_t(a),f=la(null);at(()=>{d&&m(!0)},[d]);let k=Object.keys(a),C=[{id:ve.NECESSARY,icon:aa,title:s("essentialCookies"),description:s("essentialDescription"),examples:st("necessary")||s("essentialExamples"),locked:!0},{id:ve.FUNCTIONAL,icon:Ut,title:s("functionalCookies"),description:s("functionalDescription"),examples:st("functional")||s("functionalExamples"),legalNotice:s("functionalLegalNotice"),locked:!1},{id:ve.ANALYTICS,icon:ia,title:s("analyticsCookies"),description:s("analyticsDescription"),examples:st("analytics")||s("analyticsExamples"),locked:!1},{id:ve.MARKETING,icon:sa,title:s("marketingCookies"),description:s("marketingDescription"),examples:st("marketing")||s("marketingExamples"),locked:!1}].filter(v=>k.includes(v.id)),x=ma();if(at(()=>{!r&&!x&&i()},[r,x,i]),at(()=>{let v={...a};if(p){let w=v;Object.keys(w).forEach(T=>{T!==ve.NECESSARY&&w[T]===!1&&(w[T]=!0)})}h(v)},[a,p]),at(()=>{if(!fa()||r||!u)return;let v=T=>{f.current&&!f.current.contains(T.target)&&m(!1)},w=setTimeout(()=>{document.addEventListener("mousedown",v)},100);return()=>{clearTimeout(w),document.removeEventListener("mousedown",v)}},[r,u]),r&&!d)return null;let N=()=>{try{Object.entries(y).forEach(([v,w])=>{if(v!==ve.NECESSARY&&w!==void 0){let T=v;Object.values(ve).includes(T)&&c(T,!!w)}}),g(!1),m(!1)}catch(v){ua(v,{userMessage:"Error saving preferences",context:{operation:"save_preferences"},severity:"warning",log:!0,reportToSentry:!1,showNotification:!1})}},L=()=>{i(),m(!1)},S=()=>{l(),m(!1)},P=de(ce,{children:[B(Ge,{as:"p",variant:"muted",level:"small",children:s("cookieBannerDescription")}),x&&B(ca,{type:"single",collapsible:!0,value:p?"preferences":"",onValueChange:v=>g(v==="preferences"),items:[{value:"preferences",trigger:de(ce,{direction:"row",align:"center",gap:"tight",children:[B(ra,{className:"dndev-size-md"}),s("customize")]}),content:B(ce,{children:C.map(v=>{let w=v.icon,T=y[v.id]??!1;return B(qo,{content:de(ce,{direction:"row",align:"center",justify:"between",children:[de(ce,{direction:"row",align:"start",gap:"tight",style:{flex:1},children:[B(w,{className:"dndev-size-md",style:{color:"var(--primary)",marginTop:"0.125rem"}}),de(ce,{gap:"tight",children:[B(Ge,{as:"span",level:"body",style:{fontWeight:600},children:v.title}),B(Ge,{as:"span",variant:"muted",level:"small",children:v.description}),v.examples&&B(Ge,{as:"span",variant:"muted",level:"small",style:{fontStyle:"italic"},children:v.examples})]})]}),v.locked?B(Ge,{as:"span",variant:"muted",level:"small",children:s("alwaysOn")}):B(da,{checked:T,onCheckedChange:R=>h(D=>({...D,[v.id]:R}))})]})},v.id)})})}]})]}),b=p?de(ce,{direction:"row",gap:"tight",style:{width:"100%"},children:[B(_e,{onClick:N,variant:it.DEFAULT,style:{flex:1},children:s("savePreferences","Save Preferences")}),B(_e,{onClick:()=>g(!1),variant:it.OUTLINE,style:{flex:1},children:s("form.cancel","Cancel")})]}):de(ce,{direction:"row",gap:"tight",style:{width:"100%"},children:[B(_e,{onClick:L,variant:it.DEFAULT,style:{flex:1},children:s("acceptAll")}),x&&B(_e,{onClick:S,variant:it.OUTLINE,style:{flex:1},children:s("declineOptional")})]});return de(ya,{children:[u&&B(qo,{ref:f,className:pa("dndev-fixed dndev-z-modal",n),icon:Ut,title:s("cookiePreferences"),content:P,footer:b,style:{[e==="top"?"top":"bottom"]:"var(--gap-md)",insetInlineStart:"var(--gap-md)",insetInlineEnd:"var(--gap-md)",maxWidth:"100%",width:"calc(100% - var(--gap-md) * 2)"}}),!u&&!r&&B(_e,{onClick:()=>m(!0),className:"dndev-fixed dndev-z-toast",style:{bottom:"var(--gap-md)",insetInlineStart:"var(--gap-md)"},icon:Ut,title:s("cookiePreferences")})]})}var ha,Ht=Ne(()=>{"use strict";ha=va});import{useMemo as nn}from"react";import{useNavigationStore as mi}from"@donotdev/core";import{USER_ROLES as gi}from"@donotdev/core";import{useLocation as fi}from"@donotdev/ui/routing/hooks";function W(){let e=fi(),t=A("user"),o=!!t,n=t?.role||gi.GUEST,r=mi(a=>!a||typeof a.getFilteredRoutes!="function"?[]:a.getFilteredRoutes({authenticated:o,role:n}));return nn(()=>Array.isArray(r)?r.map(a=>({...a,isActive:vi(a.path,e.pathname),hasChildren:!1,children:void 0})).sort((a,i)=>a.label.localeCompare(i.label,void 0,{sensitivity:"base"})):[],[r,e.pathname])}function rn(e){let t=W();return nn(()=>t.find(o=>o.path===e),[t,e])}function vi(e,t){return e==="/"?t==="/":t===e?!0:t.startsWith(e+"/")}var ye=Ne(()=>{"use strict";fe()});import{useCallback as ut,useMemo as an}from"react";import{useNavigationStore as $e}from"@donotdev/core";import{useNavigate as hi}from"@donotdev/ui/routing/hooks";var sn,Yt=Ne(()=>{"use strict";ye();sn=()=>{let e=hi(),t=W()??[],o=$e(u=>u.favorites),n=$e(u=>u.recent),r=$e(u=>u.toggleFavorite),a=$e(u=>u.isFavorite),i=$e(u=>u.addRecent),l=an(()=>t.length?t.filter(u=>o.includes(u.path)):[],[o,t]),c=an(()=>t.length?t.filter(m=>n.includes(m.path)).slice(0,5):[],[n,t]),d=ut(u=>{r(u)},[r]),s=ut(u=>a(u),[a]),p=ut(u=>{i(u)},[i]),g=ut(u=>{p(u),e(u)},[e,p]);return{navigationItems:t,favoriteItems:l,recentItems:c,toggleFavorite:d,isFavorite:s,navigateToItem:g}}});var cn={};Wo(cn,{default:()=>Ai});import{Link as yi,Star as bi}from"lucide-react";import{useCallback as ln,useEffect as Si,useRef as Ci}from"react";import{Badge as xi,Command as ki,CommandDialog as wi}from"@donotdev/components";import{useOverlayStore as qt,useTranslation as Ti}from"@donotdev/core";import{jsx as _,jsxs as Re}from"react/jsx-runtime";var Ni,Ii,Ai,dn=Ne(()=>{"use strict";Yt();le();Ni=()=>{let{t:e}=Ti("dndev"),t=Ci(null),o=qt(m=>m.isCommandDialogOpen),n=qt(m=>m.closeCommandDialog),{navigationItems:r,favoriteItems:a,recentItems:i,toggleFavorite:l,isFavorite:c,navigateToItem:d}=sn();Si(()=>{o&&requestAnimationFrame(()=>{t.current?.focus()})},[o]);let s=ln(m=>{d(m),n()},[d,n]),p=ln((m,y=!0)=>m.map(h=>({label:h.label,value:h.path,description:h.path!==h.label?h.path:void 0,icon:_(z,{icon:h.icon,fallback:yi}),badge:h.badge?_(xi,{children:h.badge}):void 0,onSelect:()=>s(h.path),rightSlot:y?_("button",{type:"button",onClick:f=>{f.stopPropagation(),l(h.path)},className:"dndev-command-favorite-button","data-favorited":c(h.path),"aria-label":c(h.path)?e("globalGoTo.unfavorite","Remove from favorites"):e("globalGoTo.favorite","Add to favorites"),children:_(z,{icon:bi,className:"dndev-size-sm"})}):void 0})),[s,l,c,e]),g=[];if(a.length>0&&g.push({heading:e("globalGoTo.favorites","Favorites"),items:p(a,!1)}),i.length>0){let m=i.flatMap(y=>p([y],!0));m.length>0&&g.push({heading:e("globalGoTo.recent","Recent"),separator:a.length>0,items:m})}g.push({heading:e("globalGoTo.allPages","All Pages"),separator:a.length>0||i.length>0,items:p(r)});let u=r.length>0;return Re(wi,{open:o,onOpenChange:m=>m?null:n(),children:[_(ki,{placeholder:e("globalGoTo.placeholder","Search pages..."),emptyMessage:u?e("globalGoTo.noResults","No results found."):e("globalGoTo.empty","No pages available."),groups:g}),_("div",{className:"dndev-command-footer",children:Re("div",{className:"dndev-command-footer-shortcuts",children:[Re("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"\u2318K"}),_("span",{children:e("globalGoTo.shortcutOpen","Open")})]}),Re("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"\u2191"}),_("kbd",{className:"dndev-command-footer-key",children:"\u2193"}),_("span",{children:e("globalGoTo.shortcutNavigate","Navigate")})]}),Re("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"\u21B5"}),_("span",{children:e("globalGoTo.shortcutSelect","Select")})]}),Re("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"Esc"}),_("span",{children:e("globalGoTo.shortcutClose","Close")})]})]})})]})},Ii=()=>qt(t=>t.isCommandDialogOpen)?_(Ni,{}):null,Ai=Ii});import{User as Zs}from"lucide-react";import{Suspense as ao,lazy as In,useState as js}from"react";import{Button as Js,BUTTON_VARIANT as Qs,DropdownMenu as Xs,Dialog as el,DISPLAY as tl}from"@donotdev/components";import{useTranslation as ol}from"@donotdev/core";import{useAuthConfig as nl}from"@donotdev/core";import{getEnabledAuthPartners as rl}from"@donotdev/core";import{User as Is,LogOut as As,Settings as Ye,UserCheck as Es,Trash2 as Ls}from"lucide-react";import*as Ps from"lucide-react";import ht,{useMemo as Rs,lazy as kn,Suspense as xn}from"react";import{Avatar as Ds,Button as Fs,BUTTON_VARIANT as Bs,DropdownMenu as Ms,Text as Os,DISPLAY as zs}from"@donotdev/components";import{useTranslation as Vs}from"@donotdev/core";import{getEnabledAuthPartners as Us,useAuthConfig as _s,isClient as Gs}from"@donotdev/core";import{useBreakpoint as Hs}from"@donotdev/core";import{useNavigate as Ws}from"@donotdev/ui/routing/hooks";le();import{Link as $o}from"lucide-react";import"react";import"@donotdev/components";import{useConsent as qr}from"@donotdev/core";import{useNavigate as Zr}from"@donotdev/ui/routing/hooks";import{Fragment as jr,jsx as Ie,jsxs as Ko}from"react/jsx-runtime";var I=({path:e,replace:t,prefetch:o=!0,children:n,icon:r,label:a,onClick:i,className:l,"aria-label":c,"aria-describedby":d,target:s,rel:p,...g})=>{let u=Zr(),m=qr("showCookieBanner");if(e==="#cookie-settings")return Ko("a",{href:"#cookie-settings",onClick:x=>{x.preventDefault(),x.stopPropagation();try{m()}catch{}i&&i(x)},className:l,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0,...g.style},"aria-label":c||a||"Cookie Settings","aria-describedby":d,...g,children:[r&&Ie(z,{icon:r,fallback:$o}),a&&Ie("span",{children:a}),n]});let y=e.startsWith("http://")||e.startsWith("https://")||e.startsWith("mailto:")||e.startsWith("tel:"),h=C=>{if(y){i&&i(C);return}C.preventDefault(),i&&i(C);let x=e.startsWith("/")||e.startsWith(".")?e:`/${e}`;u(x,{replace:t})},f={"aria-label":c||a,"aria-describedby":d},k=Ko(jr,{children:[r&&Ie(z,{icon:r,fallback:$o}),a&&Ie("span",{children:a}),n]});return y?Ie("a",{href:e,onClick:h,target:s||"_blank",rel:p||"noopener noreferrer",className:l,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...f,...g,children:k}):Ie("a",{href:e,onClick:h,className:l,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...f,...g,children:k})};import{useEffect as Zo,useState as ba,lazy as Sa,Suspense as Ca}from"react";import{Stack as jo}from"@donotdev/components";import{FEATURE_STATUS as Wt,USER_ROLES as lt,SUBSCRIPTION_TIERS as $t}from"@donotdev/core";import{useRedirectGuard as xa,useNavigate as ka}from"@donotdev/ui/routing/hooks";import{RefreshCw as Yo}from"lucide-react";import"react";import{cn as Jr}from"@donotdev/components";import{jsx as Ae}from"react/jsx-runtime";var Qr=({variant:e="fullPage",className:t})=>e==="inline"?Ae("div",{className:t,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:Ae(Yo,{className:"dndev-size-md",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}):Ae("div",{className:Jr("dndev-loading-overlay",t),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:Ae(Yo,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}),Xr=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:Ae(Qr,{variant:e,className:t}),ea=e=>Ae(Xr,{...e}),rt=ea;fe();import{Fragment as Jo,jsx as V,jsxs as Qo}from"react/jsx-runtime";var wa=Sa(()=>Promise.resolve().then(()=>(Ht(),Gt)));function Ta({auth:e,children:t,fallback:o=rt}){let n=ka(),r=A("user"),a=A("can"),i=A("status"),[l,c]=ba(!1),{shouldRedirect:d,redirectTo:s,isChecking:p}=xa({auth:e});return Zo(()=>{let g=setTimeout(()=>{i===Wt.INITIALIZING&&c(!0)},5e3);return()=>clearTimeout(g)},[i]),Zo(()=>{d&&s&&n(s,{replace:!0})},[d,s,n]),e===!1?V(Jo,{children:t}):d||p?V(rt,{}):i===Wt.INITIALIZING&&l?V(jo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Qo("div",{className:"dndev-w-full",style:{maxWidth:"28rem",textAlign:"center"},children:[V("h2",{style:{marginBottom:"var(--gap-md)"},children:"Loading is taking longer than usual"}),V("p",{style:{marginBottom:"var(--gap-md)",color:"var(--muted-foreground)"},children:"This might be due to a slow connection. Please wait or try refreshing the page."}),V("button",{onClick:()=>window.location.reload(),style:{padding:"var(--gap-sm) var(--gap-md)",backgroundColor:"var(--primary)",color:"var(--primary-foreground)",border:"none",borderRadius:"var(--radius)",cursor:"pointer"},children:"Refresh Page"})]})}):i===Wt.INITIALIZING?V(o,{}):e&&typeof e=="object"&&e.required&&!r&&a&&!a.navigate(e)?V(jo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Qo("div",{className:"dndev-w-full",style:{maxWidth:"28rem"},children:[V("h2",{style:{marginBottom:"var(--gap-md)"},children:"Authentication Required"}),V("p",{style:{marginBottom:"var(--gap-md)"},children:"This page requires authentication. Please accept functional cookies to continue."}),V(Ca,{fallback:V("div",{children:"Loading consent..."}),children:V(wa,{})})]})}):V(Jo,{children:t})}function Na(e){return A("can")?.navigate(e)??!1}var Um=Na;function _m(){return A("user")?.role||lt.GUEST}function Gm(e){return A("user")?.role===e}function Hm(){let e=A("user"),t=A("userSubscription"),o=A("loading");return{authenticated:!!e,role:e?.role,tier:t?.tier||"free",loading:o,userId:e?.id}}function Wm(e,t){return n=>V(Ta,{auth:t,children:V(e,{...n})})}var $m={public:()=>!1,required:()=>({required:!0}),user:()=>({required:!0,role:lt.USER}),admin:()=>({required:!0,role:lt.ADMIN}),tier:e=>({required:!0,tier:e}),pro:()=>({required:!0,tier:$t.PRO}),premium:()=>({required:!0,tier:$t.PREMIUM}),adminPro:()=>({required:!0,role:lt.ADMIN,tier:$t.PRO}),custom:e=>({required:!0,validate:e})};import{ArrowLeft as Ka,Lock as Ya}from"lucide-react";import{Suspense as qa,lazy as Za}from"react";import{Card as ja,Button as Ja,Separator as Qa,Stack as Pe,cn as Xa}from"@donotdev/components";import{useTranslation as ei}from"@donotdev/core";import"@donotdev/core";import{useLocation as ti,useBack as oi}from"@donotdev/ui/routing/hooks";import{Suspense as Wa}from"react";import{cn as $a}from"@donotdev/components";import{Component as Ia}from"react";import{handleError as Aa}from"@donotdev/core";var Kt=class extends Ia{constructor(o){super(o);ot(this,"resetError",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,n){Aa(o,{userMessage:`A ${this.props.level||"component"} error occurred`,context:{errorInfo:n,component:"DnDevErrorBoundary",level:this.props.level||"component"},showNotification:!1})}render(){return this.state.hasError?this.props.fallback({error:this.state.error,resetError:this.resetError,componentStack:null,eventId:null}):this.props.children}},Xo=Kt;import{AlertTriangle as Ea,Home as La,ArrowLeft as Pa,RotateCw as Ra,Copy as Da,Check as Fa}from"lucide-react";import{useEffect as Ba,useState as Ma}from"react";import{Button as ct,BUTTON_VARIANT as dt,Card as en,CARD_VARIANT as tn,Alert as Oa,ALERT_VARIANT as za,Stack as Le}from"@donotdev/components";import{handleError as Va,useTranslation as Ua}from"@donotdev/core";import{useLocation as _a,useBack as Ga}from"@donotdev/ui/routing/hooks";import{jsx as U,jsxs as he}from"react/jsx-runtime";var Ha=({error:e,resetError:t,componentStack:o,eventId:n})=>{let{t:r}=Ua("dndev"),[a,i]=Ma(!1),l=Ga(),d=_a()?.pathname||(typeof window<"u"?window.location.pathname:"/"),s=e instanceof Error?e.message:"Unknown error",p=e instanceof Error?e.stack:void 0,g=!1;Ba(()=>{try{Va(e,{userMessage:"Page encountered an error",context:{component:"RouteErrorFallback",location:d}})}catch{}},[e,d]);let u=async()=>{if(!p)return;let h=[`Error: ${s}`,`Timestamp: ${new Date().toISOString()}`,`User Agent: ${navigator.userAgent}`,n?`Event ID: ${n}`:null,`Path: ${d}`,"","Stack Trace:",p,o?`
1
+ "use client";var Ho=Object.defineProperty;var Wr=(e,t,o)=>t in e?Ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Ne=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wo=(e,t)=>{for(var o in t)Ho(e,o,{get:t[o],enumerable:!0})};var nt=(e,t,o)=>Wr(e,typeof t!="symbol"?t+"":t,o);import*as rt from"lucide-react";import{isValidElement as $r}from"react";import{cn as Ot}from"@donotdev/components";import{jsx as He}from"react/jsx-runtime";function Kr(e){if(!e)return rt.Palette;let t=e.replace(/['"]/g,"");return rt[t]||rt.Palette}var z,Yr,le=Ne(()=>{"use strict";z=({icon:e,fallback:t,className:o,ariaHidden:n=!1})=>{let r=e||t;if(!r)return null;let a="dndev-size-md";if(typeof r=="function"||typeof r=="object"&&r!==null&&"render"in r)return He(r,{className:Ot(a,o),style:{flexShrink:0},"aria-hidden":n});if(typeof r=="string"){if(!/^[a-zA-Z0-9_-]+$/.test(r))return He("span",{className:Ot(a,o),style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r});let c=Kr(r);return He(c,{className:Ot(a,o),style:{flexShrink:0},"aria-hidden":n})}return $r(r)?He("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r}):He("span",{className:o,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":n,children:r})},Yr=z});import*as ta from"@donotdev/auth";import{DEGRADED_AUTH_API as oa}from"@donotdev/core";function na(e){return oa[e]}function E(e){return zt?zt(e):na(e)}var zt,km,ve=Ne(()=>{"use strict";zt=ta?.useAuth;km=typeof zt=="function"});var _t={};Wo(_t,{default:()=>ha});import{Cookie as Vt,Settings as ra,Shield as aa,BarChart3 as ia,Target as sa}from"lucide-react";import{useState as Ut,useEffect as it,useRef as la}from"react";import{Accordion as ca,Button as We,BUTTON_VARIANT as st,Card as qo,Switch as da,Text as $e,cn as pa,Stack as ce}from"@donotdev/components";import{handleError as ua,useConsent as Ee,getCookieExamples as lt,hasOptionalCookies as ma}from"@donotdev/core";import{CONSENT_CATEGORY as he}from"@donotdev/core";import{useTranslation as ga}from"@donotdev/core";import{isClient as fa}from"@donotdev/core";import{Fragment as ya,jsx as B,jsxs as de}from"react/jsx-runtime";function va({position:e="bottom",showBranding:t=!0,brandingText:o="Powered by DoNotDev Framework",className:n=""}){let r=Ee("hasConsented"),a=Ee("categories"),i=Ee("acceptAll"),l=Ee("declineAll"),c=Ee("updateCategory"),d=Ee("showBanner"),{t:s}=ga("cookies"),[p,g]=Ut(!1),[u,m]=Ut(!r||d),[y,v]=Ut(a),f=la(null);it(()=>{d&&m(!0)},[d]);let x=Object.keys(a),S=[{id:he.NECESSARY,icon:aa,title:s("essentialCookies"),description:s("essentialDescription"),examples:lt("necessary")||s("essentialExamples"),locked:!0},{id:he.FUNCTIONAL,icon:Vt,title:s("functionalCookies"),description:s("functionalDescription"),examples:lt("functional")||s("functionalExamples"),legalNotice:s("functionalLegalNotice"),locked:!1},{id:he.ANALYTICS,icon:ia,title:s("analyticsCookies"),description:s("analyticsDescription"),examples:lt("analytics")||s("analyticsExamples"),locked:!1},{id:he.MARKETING,icon:sa,title:s("marketingCookies"),description:s("marketingDescription"),examples:lt("marketing")||s("marketingExamples"),locked:!1}].filter(h=>x.includes(h.id)),C=ma();if(it(()=>{!r&&!C&&i()},[r,C,i]),it(()=>{let h={...a};if(p){let k=h;Object.keys(k).forEach(T=>{T!==he.NECESSARY&&k[T]===!1&&(k[T]=!0)})}v(h)},[a,p]),it(()=>{if(!fa()||r||!u)return;let h=T=>{f.current&&!f.current.contains(T.target)&&m(!1)},k=setTimeout(()=>{document.addEventListener("mousedown",h)},100);return()=>{clearTimeout(k),document.removeEventListener("mousedown",h)}},[r,u]),r&&!d)return null;let N=()=>{try{Object.entries(y).forEach(([h,k])=>{if(h!==he.NECESSARY&&k!==void 0){let T=h;Object.values(he).includes(T)&&c(T,!!k)}}),g(!1),m(!1)}catch(h){ua(h,{userMessage:"Error saving preferences",context:{operation:"save_preferences"},severity:"warning",log:!0,reportToSentry:!1,showNotification:!1})}},P=()=>{i(),m(!1)},A=()=>{l(),m(!1)},w=de(ce,{children:[B($e,{as:"p",variant:"muted",level:"small",children:s("cookieBannerDescription")}),C&&B(ca,{type:"single",collapsible:!0,value:p?"preferences":"",onValueChange:h=>g(h==="preferences"),items:[{value:"preferences",trigger:de(ce,{direction:"row",align:"center",gap:"tight",children:[B(ra,{className:"dndev-size-md"}),s("customize")]}),content:B(ce,{children:S.map(h=>{let k=h.icon,T=y[h.id]??!1;return B(qo,{content:de(ce,{direction:"row",align:"center",justify:"between",children:[de(ce,{direction:"row",align:"start",gap:"tight",style:{flex:1},children:[B(k,{className:"dndev-size-md",style:{color:"var(--primary)",marginTop:"0.125rem"}}),de(ce,{gap:"tight",children:[B($e,{as:"span",level:"body",style:{fontWeight:600},children:h.title}),B($e,{as:"span",variant:"muted",level:"small",children:h.description}),h.examples&&B($e,{as:"span",variant:"muted",level:"small",style:{fontStyle:"italic"},children:h.examples})]})]}),h.locked?B($e,{as:"span",variant:"muted",level:"small",children:s("alwaysOn")}):B(da,{checked:T,onCheckedChange:D=>v(R=>({...R,[h.id]:D}))})]})},h.id)})})}]})]}),b=p?de(ce,{direction:"row",gap:"tight",style:{width:"100%"},children:[B(We,{onClick:N,variant:st.DEFAULT,style:{flex:1},children:s("savePreferences","Save Preferences")}),B(We,{onClick:()=>g(!1),variant:st.OUTLINE,style:{flex:1},children:s("form.cancel","Cancel")})]}):de(ce,{direction:"row",gap:"tight",style:{width:"100%"},children:[B(We,{onClick:P,variant:st.DEFAULT,style:{flex:1},children:s("acceptAll")}),C&&B(We,{onClick:A,variant:st.OUTLINE,style:{flex:1},children:s("declineOptional")})]});return de(ya,{children:[u&&B(qo,{ref:f,className:pa("dndev-fixed dndev-z-modal",n),icon:Vt,title:s("cookiePreferences"),content:w,footer:b,style:{[e==="top"?"top":"bottom"]:"var(--gap-md)",insetInlineStart:"var(--gap-md)",insetInlineEnd:"var(--gap-md)",maxWidth:"100%",width:"calc(100% - var(--gap-md) * 2)"}}),!u&&!r&&B(We,{onClick:()=>m(!0),className:"dndev-fixed dndev-z-toast",style:{bottom:"var(--gap-md)",insetInlineStart:"var(--gap-md)"},icon:Vt,title:s("cookiePreferences")})]})}var ha,Gt=Ne(()=>{"use strict";ha=va});import{useMemo as nn}from"react";import{useNavigationStore as mi}from"@donotdev/core";import{USER_ROLES as gi}from"@donotdev/core";import{useLocation as fi}from"@donotdev/ui/routing/hooks";function W(){let e=fi(),t=E("user"),o=!!t,n=t?.role||gi.GUEST,r=mi(a=>!a||typeof a.getFilteredRoutes!="function"?[]:a.getFilteredRoutes({authenticated:o,role:n}));return nn(()=>Array.isArray(r)?r.map(a=>({...a,isActive:vi(a.path,e.pathname),hasChildren:!1,children:void 0})).sort((a,i)=>a.label.localeCompare(i.label,void 0,{sensitivity:"base"})):[],[r,e.pathname])}function rn(e){let t=W();return nn(()=>t.find(o=>o.path===e),[t,e])}function vi(e,t){return e==="/"?t==="/":t===e?!0:t.startsWith(e+"/")}var be=Ne(()=>{"use strict";ve()});import{useCallback as mt,useMemo as an}from"react";import{useNavigationStore as qe}from"@donotdev/core";import{useNavigate as hi}from"@donotdev/ui/routing/hooks";var sn,Kt=Ne(()=>{"use strict";be();sn=()=>{let e=hi(),t=W()??[],o=qe(u=>u.favorites),n=qe(u=>u.recent),r=qe(u=>u.toggleFavorite),a=qe(u=>u.isFavorite),i=qe(u=>u.addRecent),l=an(()=>t.length?t.filter(u=>o.includes(u.path)):[],[o,t]),c=an(()=>t.length?t.filter(m=>n.includes(m.path)).slice(0,5):[],[n,t]),d=mt(u=>{r(u)},[r]),s=mt(u=>a(u),[a]),p=mt(u=>{i(u)},[i]),g=mt(u=>{p(u),e(u)},[e,p]);return{navigationItems:t,favoriteItems:l,recentItems:c,toggleFavorite:d,isFavorite:s,navigateToItem:g}}});var cn={};Wo(cn,{default:()=>Ai});import{Link as yi,Star as bi}from"lucide-react";import{useCallback as ln,useEffect as Si,useRef as Ci}from"react";import{Badge as xi,Command as ki,CommandDialog as wi}from"@donotdev/components";import{useOverlayStore as Yt,useTranslation as Ti}from"@donotdev/core";import{jsx as _,jsxs as Re}from"react/jsx-runtime";var Ni,Ii,Ai,dn=Ne(()=>{"use strict";Kt();le();Ni=()=>{let{t:e}=Ti("dndev"),t=Ci(null),o=Yt(m=>m.isCommandDialogOpen),n=Yt(m=>m.closeCommandDialog),{navigationItems:r,favoriteItems:a,recentItems:i,toggleFavorite:l,isFavorite:c,navigateToItem:d}=sn();Si(()=>{o&&requestAnimationFrame(()=>{t.current?.focus()})},[o]);let s=ln(m=>{d(m),n()},[d,n]),p=ln((m,y=!0)=>m.map(v=>({label:v.label,value:v.path,description:v.path!==v.label?v.path:void 0,icon:_(z,{icon:v.icon,fallback:yi}),badge:v.badge?_(xi,{children:v.badge}):void 0,onSelect:()=>s(v.path),rightSlot:y?_("button",{type:"button",onClick:f=>{f.stopPropagation(),l(v.path)},className:"dndev-command-favorite-button","data-favorited":c(v.path),"aria-label":c(v.path)?e("globalGoTo.unfavorite","Remove from favorites"):e("globalGoTo.favorite","Add to favorites"),children:_(z,{icon:bi,className:"dndev-size-sm"})}):void 0})),[s,l,c,e]),g=[];if(a.length>0&&g.push({heading:e("globalGoTo.favorites","Favorites"),items:p(a,!1)}),i.length>0){let m=i.flatMap(y=>p([y],!0));m.length>0&&g.push({heading:e("globalGoTo.recent","Recent"),separator:a.length>0,items:m})}g.push({heading:e("globalGoTo.allPages","All Pages"),separator:a.length>0||i.length>0,items:p(r)});let u=r.length>0;return Re(wi,{open:o,onOpenChange:m=>m?null:n(),children:[_(ki,{placeholder:e("globalGoTo.placeholder","Search pages..."),emptyMessage:u?e("globalGoTo.noResults","No results found."):e("globalGoTo.empty","No pages available."),groups:g}),_("div",{className:"dndev-command-footer",children:Re("div",{className:"dndev-command-footer-shortcuts",children:[Re("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"\u2318K"}),_("span",{children:e("globalGoTo.shortcutOpen","Open")})]}),Re("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"\u2191"}),_("kbd",{className:"dndev-command-footer-key",children:"\u2193"}),_("span",{children:e("globalGoTo.shortcutNavigate","Navigate")})]}),Re("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"\u21B5"}),_("span",{children:e("globalGoTo.shortcutSelect","Select")})]}),Re("div",{className:"dndev-command-footer-shortcut",children:[_("kbd",{className:"dndev-command-footer-key",children:"Esc"}),_("span",{children:e("globalGoTo.shortcutClose","Close")})]})]})})]})},Ii=()=>Yt(t=>t.isCommandDialogOpen)?_(Ni,{}):null,Ai=Ii});import{User as Zs}from"lucide-react";import{Suspense as ro,lazy as In,useState as js}from"react";import{Button as Js,BUTTON_VARIANT as Qs,DropdownMenu as Xs,Dialog as el,DISPLAY as tl}from"@donotdev/components";import{useTranslation as ol}from"@donotdev/core";import{useAuthConfig as nl}from"@donotdev/core";import{getEnabledAuthPartners as rl}from"@donotdev/core";import{User as Is,LogOut as As,Settings as je,UserCheck as Es,Trash2 as Ls}from"lucide-react";import*as Ps from"lucide-react";import yt,{useMemo as Rs,lazy as kn,Suspense as xn}from"react";import{Avatar as Ds,Button as Fs,BUTTON_VARIANT as Bs,DropdownMenu as Ms,Text as Os,DISPLAY as zs}from"@donotdev/components";import{useTranslation as Vs}from"@donotdev/core";import{getEnabledAuthPartners as Us,useAuthConfig as _s,isClient as Gs}from"@donotdev/core";import{useBreakpoint as Hs}from"@donotdev/core";import{useNavigate as Ws}from"@donotdev/ui/routing/hooks";le();import{Link as $o}from"lucide-react";import"react";import"@donotdev/components";import{useConsent as qr}from"@donotdev/core";import{useNavigate as Zr}from"@donotdev/ui/routing/hooks";import{Fragment as jr,jsx as Ie,jsxs as Ko}from"react/jsx-runtime";var I=({path:e,replace:t,prefetch:o=!0,children:n,icon:r,label:a,onClick:i,className:l,"aria-label":c,"aria-describedby":d,target:s,rel:p,...g})=>{let u=Zr(),m=qr("showCookieBanner");if(e==="#cookie-settings")return Ko("a",{href:"#cookie-settings",onClick:C=>{C.preventDefault(),C.stopPropagation();try{m()}catch{}i&&i(C)},className:l,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0,...g.style},"aria-label":c||a||"Cookie Settings","aria-describedby":d,...g,children:[r&&Ie(z,{icon:r,fallback:$o}),a&&Ie("span",{children:a}),n]});let y=e.startsWith("http://")||e.startsWith("https://")||e.startsWith("mailto:")||e.startsWith("tel:"),v=S=>{if(y){i&&i(S);return}S.preventDefault(),i&&i(S);let C=e.startsWith("/")||e.startsWith(".")?e:`/${e}`;u(C,{replace:t})},f={"aria-label":c||a,"aria-describedby":d},x=Ko(jr,{children:[r&&Ie(z,{icon:r,fallback:$o}),a&&Ie("span",{children:a}),n]});return y?Ie("a",{href:e,onClick:v,target:s||"_blank",rel:p||"noopener noreferrer",className:l,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...f,...g,children:x}):Ie("a",{href:e,onClick:v,className:l,style:{display:r&&a?"flex":void 0,alignItems:r&&a?"center":void 0,gap:r&&a?"var(--gap-sm)":void 0},...f,...g,children:x})};import{useEffect as Zo,useState as ba,lazy as Sa,Suspense as Ca}from"react";import{Stack as jo}from"@donotdev/components";import{FEATURE_STATUS as Ht,USER_ROLES as ct,SUBSCRIPTION_TIERS as Wt}from"@donotdev/core";import{useRedirectGuard as xa,useNavigate as ka}from"@donotdev/ui/routing/hooks";import{RefreshCw as Yo}from"lucide-react";import"react";import{cn as Jr}from"@donotdev/components";import{jsx as Ae}from"react/jsx-runtime";var Qr=({variant:e="fullPage",className:t})=>e==="inline"?Ae("div",{className:t,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:Ae(Yo,{className:"dndev-size-md",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}):Ae("div",{className:Jr("dndev-loading-overlay",t),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:Ae(Yo,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}})}),Xr=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:Ae(Qr,{variant:e,className:t}),ea=e=>Ae(Xr,{...e}),at=ea;ve();import{Fragment as Jo,jsx as V,jsxs as Qo}from"react/jsx-runtime";var wa=Sa(()=>Promise.resolve().then(()=>(Gt(),_t)));function Ta({auth:e,children:t,fallback:o=at}){let n=ka(),r=E("user"),a=E("can"),i=E("status"),[l,c]=ba(!1),{shouldRedirect:d,redirectTo:s,isChecking:p}=xa({auth:e});return Zo(()=>{let g=setTimeout(()=>{i===Ht.INITIALIZING&&c(!0)},5e3);return()=>clearTimeout(g)},[i]),Zo(()=>{d&&s&&n(s,{replace:!0})},[d,s,n]),e===!1?V(Jo,{children:t}):d||p?V(at,{}):i===Ht.INITIALIZING&&l?V(jo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Qo("div",{className:"dndev-w-full",style:{maxWidth:"28rem",textAlign:"center"},children:[V("h2",{style:{marginBottom:"var(--gap-md)"},children:"Loading is taking longer than usual"}),V("p",{style:{marginBottom:"var(--gap-md)",color:"var(--muted-foreground)"},children:"This might be due to a slow connection. Please wait or try refreshing the page."}),V("button",{onClick:()=>window.location.reload(),style:{padding:"var(--gap-sm) var(--gap-md)",backgroundColor:"var(--primary)",color:"var(--primary-foreground)",border:"none",borderRadius:"var(--radius)",cursor:"pointer"},children:"Refresh Page"})]})}):i===Ht.INITIALIZING?V(o,{}):e&&typeof e=="object"&&e.required&&!r&&a&&!a.navigate(e)?V(jo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Qo("div",{className:"dndev-w-full",style:{maxWidth:"28rem"},children:[V("h2",{style:{marginBottom:"var(--gap-md)"},children:"Authentication Required"}),V("p",{style:{marginBottom:"var(--gap-md)"},children:"This page requires authentication. Please accept functional cookies to continue."}),V(Ca,{fallback:V("div",{children:"Loading consent..."}),children:V(wa,{})})]})}):V(Jo,{children:t})}function Na(e){return E("can")?.navigate(e)??!1}var Um=Na;function _m(){return E("user")?.role||ct.GUEST}function Gm(e){return E("user")?.role===e}function Hm(){let e=E("user"),t=E("userSubscription"),o=E("loading");return{authenticated:!!e,role:e?.role,tier:t?.tier||"free",loading:o,userId:e?.id}}function Wm(e,t){return n=>V(Ta,{auth:t,children:V(e,{...n})})}var $m={public:()=>!1,required:()=>({required:!0}),user:()=>({required:!0,role:ct.USER}),admin:()=>({required:!0,role:ct.ADMIN}),tier:e=>({required:!0,tier:e}),pro:()=>({required:!0,tier:Wt.PRO}),premium:()=>({required:!0,tier:Wt.PREMIUM}),adminPro:()=>({required:!0,role:ct.ADMIN,tier:Wt.PRO}),custom:e=>({required:!0,validate:e})};import{ArrowLeft as Ka,Lock as Ya}from"lucide-react";import{Suspense as qa,lazy as Za}from"react";import{Card as ja,Button as Ja,Separator as Qa,Stack as Pe,cn as Xa}from"@donotdev/components";import{useTranslation as ei}from"@donotdev/core";import"@donotdev/core";import{useLocation as ti,useBack as oi}from"@donotdev/ui/routing/hooks";import{Suspense as Wa}from"react";import{cn as $a}from"@donotdev/components";import{Component as Ia}from"react";import{handleError as Aa}from"@donotdev/core";var $t=class extends Ia{constructor(o){super(o);nt(this,"resetError",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,n){Aa(o,{userMessage:`A ${this.props.level||"component"} error occurred`,context:{errorInfo:n,component:"DnDevErrorBoundary",level:this.props.level||"component"},showNotification:!1})}render(){return this.state.hasError?this.props.fallback({error:this.state.error,resetError:this.resetError,componentStack:null,eventId:null}):this.props.children}},Xo=$t;import{AlertTriangle as Ea,Home as La,ArrowLeft as Pa,RotateCw as Ra,Copy as Da,Check as Fa}from"lucide-react";import{useEffect as Ba,useState as Ma}from"react";import{Button as dt,BUTTON_VARIANT as pt,Card as en,CARD_VARIANT as tn,Alert as Oa,ALERT_VARIANT as za,Stack as Le}from"@donotdev/components";import{handleError as Va,useTranslation as Ua}from"@donotdev/core";import{useLocation as _a,useBack as Ga}from"@donotdev/ui/routing/hooks";import{jsx as U,jsxs as ye}from"react/jsx-runtime";var Ha=({error:e,resetError:t,componentStack:o,eventId:n})=>{let{t:r}=Ua("dndev"),[a,i]=Ma(!1),l=Ga(),d=_a()?.pathname||(typeof window<"u"?window.location.pathname:"/"),s=e instanceof Error?e.message:"Unknown error",p=e instanceof Error?e.stack:void 0,g=!1;Ba(()=>{try{Va(e,{userMessage:"Page encountered an error",context:{component:"RouteErrorFallback",location:d}})}catch{}},[e,d]);let u=async()=>{if(!p)return;let v=[`Error: ${s}`,`Timestamp: ${new Date().toISOString()}`,`User Agent: ${navigator.userAgent}`,n?`Event ID: ${n}`:null,`Path: ${d}`,"","Stack Trace:",p,o?`
2
2
  Component Stack:`:null,o||null].filter(Boolean).join(`
3
- `);try{await navigator.clipboard.writeText(h),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},m=()=>{try{t()}catch{typeof window<"u"&&window.location.reload()}},y=()=>{try{l()}catch{typeof window<"u"&&window.history.back()}};return U("div",{className:"dndev-container","data-variant":"standard","data-centered":"true",children:U(en,{variant:tn.DEFAULT,elevated:!0,className:"dndev-w-full",style:{maxWidth:"65ch",margin:"0 auto"},children:he(Le,{gap:"large",align:"center",className:"dndev-text-center",children:[U(Le,{align:"center",justify:"center",style:{width:"5rem",height:"5rem",backgroundColor:"rgba(220, 38, 38, 0.1)",borderRadius:"50%",border:"1px solid var(--destructive)"},children:U(Ea,{style:{width:"2.5rem",height:"2.5rem",color:"var(--destructive)"},"aria-hidden":"true"})}),he(Le,{children:[U("h1",{className:"dndev-text-base","data-level":"h1",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-bold)",margin:0},children:r("routeError.title","Something went wrong")}),U("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:r("routeError.description","We encountered an error while loading this page.")}),U(Oa,{variant:za.INFO,hideIcon:!0,children:U("div",{style:{fontSize:"var(--font-size-sm)",textAlign:"center"},children:r("routeError.dataSafe","Don't worry, your data is safe.")})})]}),n&&he("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-full)",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",color:"var(--foreground)"},children:[r("routeError.errorId","Error ID"),": ",n]}),g&&s&&he(en,{variant:tn.MUTED,className:"dndev-w-full",children:[he(Le,{direction:"row",align:"center",justify:"between",children:[U("span",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-semibold)",color:"var(--destructive)"},children:"Error Message:"}),U(ct,{variant:dt.GHOST,icon:a?Fa:Da,onClick:u,disabled:a,children:a?r("routeError.copied","Copied"):r("routeError.copyDetails","Copy Details")})]}),U("pre",{style:{fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",wordBreak:"break-word",whiteSpace:"pre-wrap",color:"var(--foreground)",margin:0,marginTop:"var(--gap-sm)"},children:s})]}),he(Le,{className:"dndev-w-full",children:[U(ct,{variant:dt.DESTRUCTIVE,icon:Ra,onClick:m,fullWidth:!0,children:r("routeError.tryAgain","Try Again")}),he(Le,{direction:"row",justify:"center",children:[U(I,{path:"/",children:U(ct,{variant:dt.DEFAULT,icon:La,fullWidth:!0,children:r("routeError.goHome","Go Home")})}),U(ct,{variant:dt.OUTLINE,icon:Pa,onClick:y,fullWidth:!0,children:r("routeError.goBack","Go Back")})]})]}),U("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",margin:0},children:r("routeError.contactSupport","If the problem persists, please contact support.")})]})})})},on=Ha;import{jsx as He}from"react/jsx-runtime";var pt=({variant:e="standard",density:t,className:o,children:n,centered:r=!0,gapFirst:a=!1})=>He(Xo,{level:"route",fallback:i=>He(Wa,{fallback:He("div",{children:"Loading error fallback..."}),children:He(on,{...i})}),children:He("div",{className:$a("dndev-container",o),"data-variant":e,"data-density":t,"data-centered":r?"true":"false","data-gap-first":a?"true":void 0,children:n})});import{Fragment as ri,jsx as F,jsxs as We}from"react/jsx-runtime";var ni=Za(()=>import("@donotdev/auth").then(e=>({default:e.MultipleAuthProviders})));function k1({title:e,description:t,showBackButton:o=!0,onBack:n,className:r=""}){let{t:a}=ei(["auth","common"]),i=ti(),l=oi(),c=()=>{n?n():l()};return F(pt,{variant:"docs",children:F(Pe,{align:"center",justify:"center",className:Xa("dndev-min-h-60",r),style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:F(ja,{className:"dndev-w-full",style:{maxWidth:"28rem",border:"none",boxShadow:"var(--shadow-xl)"},title:We(Pe,{children:[F(Pe,{justify:"center",children:F("div",{style:{borderRadius:"9999px",backgroundColor:"color-mix(in oklab, var(--primary) 10%, transparent)",padding:"var(--gap-md)"},children:F(Ya,{className:"dndev-size-touch",style:{color:"var(--primary)"}})})}),F("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700},children:a("auth.fallback.title","Authentication Required")}),F("p",{style:{color:"var(--muted-foreground)"},children:a("auth.fallback.description","Please sign in to access this page")})]}),children:We(Pe,{children:[We(Pe,{gap:"large",children:[F("div",{children:F("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:a("auth.fallback.chooseProvider")})}),F(qa,{fallback:F("div",{children:"Loading providers..."}),children:F(ni,{layout:"vertical",spacing:"tight",fullWidth:!0,ariaLabel:a("auth.fallback.authOptions")})})]}),o&&We(ri,{children:[F(Qa,{}),F("div",{children:F(Ja,{onClick:c,className:"dndev-gap-sm",icon:Ka,children:a("common.back")})})]}),We(Pe,{gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:[F("p",{children:a("auth.fallback.secure")}),F("p",{children:a("auth.fallback.terms")})]})]})})})})}import{Search as ai}from"lucide-react";import{Button as ii,BUTTON_VARIANT as si,DISPLAY as li}from"@donotdev/components";import{useOverlayStore as ci,useTranslation as di}from"@donotdev/core";import{jsx as pi,jsxs as ui}from"react/jsx-runtime";var E1=({display:e=li.AUTO,className:t,onOpen:o})=>{let{t:n}=di("dndev"),r=ci(c=>c.openCommandDialog),i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgentData?.platform??navigator.platform)?"\u2318K":"Ctrl+K",l=()=>{r(),o?.()};return ui(ii,{variant:si.OUTLINE,display:e,icon:ai,onClick:l,className:t,"aria-label":n("goTo.ariaLabel","Go to page"),children:[n("goTo.label","Go to"),pi("kbd",{style:{marginInlineStart:"var(--gap-sm)",padding:"0.125rem 0.375rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",opacity:.5},children:i})]})};import{Suspense as Ei,lazy as Li}from"react";import{useEventListener as Pi,useOverlayStore as Ri}from"@donotdev/core";import{jsx as pn}from"react/jsx-runtime";var Di=Li(()=>Promise.resolve().then(()=>(dn(),cn))),Fi=()=>{let e=Ri(t=>t.openCommandDialog);return Pi("keydown",t=>{if((t.metaKey||t.ctrlKey)&&t.key==="k"){let o=t.target;if(o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable)return;t.preventDefault(),e()}},{target:document,options:{passive:!1,capture:!1}}),pn(Ei,{fallback:null,children:pn(Di,{})})},Bi=Fi;import{Search as Mi}from"lucide-react";import{useCallback as un,useEffect as Oi,useState as zi,useRef as Vi}from"react";import{Stack as Ui}from"@donotdev/components";import{useOverlayStore as Zt}from"@donotdev/core";import{useTranslation as _i}from"@donotdev/core";import{jsx as mt,jsxs as $i}from"react/jsx-runtime";var Gi=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),Hi=()=>{let{t:e}=_i("dndev"),[t,o]=zi(""),n=Vi(null),r=Zt(l=>l.isCommandDialogOpen);Oi(()=>{r||o("")},[r]);let a=un(()=>{Zt.getState().openCommandDialog(t)},[t]),i=un(l=>{l.key==="Enter"&&(l.preventDefault(),Zt.getState().openCommandDialog(t))},[t]);return $i(Ui,{direction:"row",align:"center",className:"dndev-relative dndev-w-full dndev-max-w-sm",role:"search",children:[mt(Mi,{className:"dndev-absolute dndev-size-md",style:{insetInlineStart:"0.75rem",opacity:.5},"aria-hidden":"true"}),mt("input",{ref:n,type:"text",value:t,onChange:l=>o(l.target.value),onFocus:a,onKeyDown:i,placeholder:e("globalGoTo.searchPlaceholder","Search pages..."),className:"dndev-input dndev-w-full",style:{paddingInlineStart:"2.5rem",paddingInlineEnd:"5rem"},"aria-label":e("globalGoTo.ariaLabel","Search navigation")}),mt("div",{className:"dndev-absolute dndev-flex dndev-items-center dndev-text-sm",style:{insetInlineEnd:"0.75rem",gap:"0.25rem",opacity:.5},"aria-hidden":"true",children:mt("kbd",{style:{padding:"0.25rem 0.5rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",borderRadius:"var(--radius-sm)"},children:Gi?"\u2318K":"Ctrl+K"})})]})},Wi=Hi;import{MoreHorizontal as Ki,Link as mn}from"lucide-react";import{useState as Yi,useEffect as gn,useRef as qi,useMemo as Zi}from"react";import{NavigationMenu as fn,NavigationMenuListPrimitive as ji,NavigationMenuItemPrimitive as vn,Button as Ji,DropdownMenu as Qi,cn as gt,DISPLAY as Xi}from"@donotdev/components";import{useTranslation as es}from"@donotdev/core";ye();le();import{jsx as j,jsxs as jt}from"react/jsx-runtime";var hn=({routes:e,vertical:t=!1,display:o=Xi.AUTO,overflowDetection:n=!1,showIcons:r=!0,className:a,style:i})=>{let{t:l}=es("dndev"),c=W(),d=e??c,s=qi(null),[p,g]=Yi(d.length),u=Zi(()=>d.map(m=>({label:m.label,path:m.path,icon:j(z,{icon:m.icon,fallback:mn}),children:m.children?m.children.map(y=>({label:y.label,path:y.path,icon:j(z,{icon:y.icon,fallback:mn})})):void 0})),[d]);if(gn(()=>{if(!n||d.length===0||t)return;let m=()=>{let h=s.current;if(!h)return;let f=h.getBoundingClientRect(),k=h.querySelectorAll("[data-nav-item]"),C=h.querySelector("[data-more-button]"),x=0,N=C?.offsetWidth||0;for(let L=0;L<k.length;L++){let S=k[L];if(!S)break;if(S.getBoundingClientRect().right-f.left+(L===k.length-1&&C?N:0)<=f.width)x=L+1;else break}g(Math.max(0,x))},y=new ResizeObserver(m);return s.current&&y.observe(s.current),setTimeout(m,0),()=>y.disconnect()},[n,d.length,t]),gn(()=>{n&&!t&&g(d.length)},[d.length,n,t]),d.length===0)return null;if(n&&!t){let m=Math.min(p,u.length),y=u.slice(0,m),h=u.slice(m);return j(fn,{className:gt(a),style:i||{flex:1},children:jt(ji,{ref:s,"data-vertical":"false",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",flexWrap:"nowrap",overflow:"hidden"},children:[y.filter(f=>f.path).map((f,k)=>j(vn,{"data-nav-item":!0,children:jt(I,{path:f.path,className:gt("dndev-interactive"),"data-role":"nav-trigger",children:[r&&f.icon,j("span",{className:"dndev-interactive-label",children:f.label})]})},f.path||k)),h.length>0&&j(vn,{"data-more-button":!0,children:j(Qi,{trigger:j(Ji,{className:"dndev-size-touch",style:{flexShrink:0},"aria-label":l("navigation.more","More"),children:j(Ki,{className:"dndev-size-md"})}),items:h.filter(f=>f.path).map(f=>({label:f.label,children:jt(I,{path:f.path,className:gt("dndev-interactive"),"data-role":"menu-item",children:[r&&f.icon,j("span",{className:"dndev-interactive-label",children:f.label})]}),asChild:!0})),contentWidth:"14rem",contentAlign:"end"})})]})})}return j(fn,{items:u,vertical:t,display:o,className:gt(a,t&&"dndev-sidebar-nav-menu"),LinkComponent:I})};import{Home as ts,ArrowLeft as os,Link as ns}from"lucide-react";import{useMemo as rs}from"react";import{Button as Jt,BUTTON_VARIANT as Qt,Stack as Ke,Text as Xt}from"@donotdev/components";import{useTranslation as as}from"@donotdev/core";import{useLocation as is,useNavigate as ss}from"@donotdev/ui/routing/hooks";ye();le();import{jsx as $,jsxs as ft}from"react/jsx-runtime";function yn(){let{t:e}=as("dndev"),t=is(),o=ss(),n=W(),r=rs(()=>n.filter(i=>!i.path.includes(":")&&i.path!=="/").slice(0,4),[n]),a=()=>{o("back")};return $(pt,{variant:"docs",centered:!0,children:ft(Ke,{gap:"large",align:"center",justify:"center",children:[ft(Ke,{align:"center",children:[$(Xt,{level:"h1",style:{fontSize:"clamp(4rem, 12vw, 8rem)",fontWeight:"var(--font-weight-bold)",lineHeight:1,letterSpacing:"-0.02em",background:"linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",margin:0},children:"404"}),$(Xt,{level:"h2",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)",margin:0},children:e("errors.notFound.title","Page Not Found")}),$(Xt,{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",textAlign:"center",margin:0},children:e("errors.notFound.description","The page you're looking for doesn't exist or has been moved.")}),t.pathname&&$("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-md)",fontSize:"var(--font-size-sm)",fontFamily:"var(--font-mono)",color:"var(--foreground)",wordBreak:"break-all",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",border:"1px solid var(--border-hairline)"},children:t.pathname})]}),r.length>0&&ft(Ke,{align:"center",children:[$("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-semibold)",margin:0,color:"var(--muted-foreground)"},children:e("errors.notFound.suggestions","You might be looking for:")}),$(Ke,{direction:"row",wrap:"wrap",justify:"center",gap:"tight",children:r.map(i=>$(I,{path:i.path,replace:!0,children:$(Jt,{variant:Qt.OUTLINE,icon:$(z,{icon:i.icon,fallback:ns}),"aria-label":e("errors.notFound.navigateTo",`Navigate to ${i.label}`,{label:i.label}),children:i.label})},i.path))})]}),ft(Ke,{direction:"row",wrap:"wrap",justify:"center",children:[$(I,{path:"/",replace:!0,children:$(Jt,{variant:Qt.DEFAULT,icon:ts,"aria-label":e("errors.notFound.goHome","Go to home page"),children:e("errors.notFound.goHome","Go Home")})}),$(Jt,{variant:Qt.OUTLINE,icon:os,onClick:a,"aria-label":e("errors.notFound.goBack","Go back to previous page"),children:e("errors.notFound.goBack","Go Back")})]})]})})}ye();Yt();import{useNavigate as De,useBack as Og,useRefresh as zg,usePrefetch as Vg,useLocation as Ug,useParams as _g,useRouteParam as Gg,useSearchParams as Hg,useMatch as Wg,useQueryParams as $g,useRedirectGuard as Kg}from"@donotdev/ui/routing/hooks";import{getDndevConfig as eo,isClient as be,isDev as bn}from"@donotdev/core";var G=class{static getBrowserSupport(){if(!be())return{svg:!0,webp:!1,avif:!1};let t=this.cache.get("browser-support");if(t)return t;let o={svg:!0,webp:!1,avif:!1};try{let n=document.createElement("canvas");n.width=1,n.height=1,o.webp=n.toDataURL("image/webp").indexOf("data:image/webp")===0}catch{o.webp=!1}try{let n=document.createElement("canvas");n.width=1,n.height=1,o.avif=n.toDataURL("image/avif").indexOf("data:image/avif")===0}catch{o.avif=!1}return this.cache.set("browser-support",o),o}static extractStringValues(t){let o=[];if(t==null)return o;if(typeof t=="string")o.push(t);else if(Array.isArray(t))for(let n of t)o.push(...this.extractStringValues(n));else if(typeof t=="object")for(let n of Object.values(t))o.push(...this.extractStringValues(n));return o}static assetExists(t){if(!be())return!1;let o=this.getAssetManifest();return o?this.extractStringValues(o).includes(t):!1}static getAssetManifest(){return be()&&eo()?.assets?.mapping||null}static getLogoSvgContent(){return eo()?.assets?.logoSvgContent||null}static resolveLogo(t){if(t)return t;let o="logo";if(this.cache.has(o))return this.cache.get(o);let r=this.getAssetManifest()?.logo?.optimal||"/logo.svg";return this.cache.set(o,r),r}static directAssetCheck(t){if(!be())return!1;try{let o=new Image;return o.src=t,!0}catch{return!1}}static resolveFaviconSet(){let t="favicon-set";if(this.cache.has(t))return this.cache.get(t);let o=this.getAssetManifest();if(o?.favicon?.set){let a=o.favicon.set,i=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",l={svg:a.svg||"/favicon.svg",ico:a.ico||"/favicon.ico",png16:a.png16||i,png32:a.png32||i,apple180:a.apple180||i,android192:a.android192||i,android512:a.android512||i};return this.cache.set(t,l),l}let n=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",r={svg:this.assetExists("/favicon.svg")?"/favicon.svg":"/logo.svg",ico:this.assetExists("/favicon.ico")?"/favicon.ico":"/favicon.svg",png16:this.assetExists("/favicon-16x16.png")?"/favicon-16x16.png":n,png32:this.assetExists("/favicon-32x32.png")?"/favicon-32x32.png":n,apple180:this.assetExists("/apple-touch-icon.png")?"/apple-touch-icon.png":n,android192:this.assetExists("/icon-192x192.png")?"/icon-192x192.png":n,android512:this.assetExists("/icon-512x512.png")?"/icon-512x512.png":n};return this.cache.set(t,r),r}static resolveFavicon(){let t=this.getAssetManifest();if(t?.favicon?.optimal)return t.favicon.optimal;let o=["/favicon.svg","/favicon.ico","/favicon.png","/logo.svg"];for(let n of o)if(this.assetExists(n))return n;return"/favicon.svg"}static clearCache(){this.cache.clear(),bn()&&be()}static getDebugInfo(){return{browserSupport:this.getBrowserSupport(),detectedAssets:be()?eo()?.assets?.mapping:null,assetManifest:this.getAssetManifest(),cache:Object.fromEntries(this.cache)}}};ot(G,"cache",new Map);function jg(e){return G.resolveLogo(e)}function Jg(){return G.resolveFaviconSet()}bn()&&(G.clearCache(),be()&&window.addEventListener("DOMContentLoaded",()=>{G.clearCache()}));import*as ls from"@donotdev/crud";var Sn={forms:{},startSubmit:()=>{},setUploading:()=>{},setValidating:()=>{},setSubmitting:()=>{},setSuccess:()=>{},setError:()=>{},reset:()=>{},cleanup:()=>{},setIsDirty:(e,t)=>{},hasDirtyForms:()=>!1,getDirtyFormIds:()=>[],getStatus:()=>"idle",isLoading:()=>!1,getUploadProgress:()=>0,getError:()=>null,getIsDirty:()=>!1},Fe=ls?.useFormStore,ef=typeof Fe=="function";function cs(e){return Fe?Fe(e):e(Sn)}cs.getState=()=>Fe&&typeof Fe.getState=="function"?Fe.getState():Sn;fe();import{useMemo as ds}from"react";function vt(){let e=A("status"),t=A("isAvailable"),o=A("user");return ds(()=>({shouldHide:e!=="ready"||!t,isLoading:e==="initializing",isReady:e==="ready"&&t,isAuthenticated:!!o}),[e,t,o])}import*as ps from"@donotdev/billing";import{DEGRADED_BILLING_API as us}from"@donotdev/core";var to=ps?.useStripeBilling;function ms(e){return us[e]}function oo(e,t){return to?to(e,t):ms(e)}var sf=typeof to=="function";fe();function pf(){let e=A("user"),t=A("status"),o={user:e,status:t},n=oo("status",o),r=oo("isAvailable",o);return{shouldHide:!r,isLoading:n==="initializing",isReady:r&&n==="ready"}}import{DEGRADED_OAUTH_API as gs}from"@donotdev/core";import*as fs from"@donotdev/oauth";var no=fs?.useOAuth;function vs(e){return gs[e]}function gf(e){return no?no(e):vs(e)}var ff=typeof no=="function";import{CheckCircle as hs}from"lucide-react";import{List as ys}from"@donotdev/components";import{translateArray as bs}from"@donotdev/core";import{jsx as Cn}from"react/jsx-runtime";var Ss=hs,Cs=16;function Sf(e,t,o,n=Ss,r=Cs){let a=n;return Cn(ys,{icon:a?Cn(a,{size:r}):void 0,items:bs(e,t,o),style:{listStyle:"none",paddingInlineStart:0}})}var xs=/<script[\s\S]*?<\/script>/gi,ks=/<foreignObject[\s\S]*?<\/foreignObject>/gi,ws=/\s+on\w+\s*=\s*["'][^"']*["']/gi,Ts=/\s+(?:xlink:)?href\s*=\s*["']\s*javascript:[^"']*["']/gi,Ns=/\s+(?:xlink:)?href\s*=\s*["']\s*data:(?!image\/(?:png|jpe?g|gif|webp|svg\+xml))[^"']*["']/gi;function Be(e){return e.replace(xs,"").replace(ks,"").replace(ws,"").replace(Ts,"").replace(Ns,"")}import{Fragment as Ys,jsx as pe,jsxs as qs}from"react/jsx-runtime";var wn=()=>null,$s=kn(async()=>{try{return{default:(await import("@donotdev/auth")).ReauthDialog}}catch{return{default:wn}}}),Ks=kn(async()=>{try{return{default:(await import("@donotdev/auth")).ConfirmDeleteDialog}}catch{return{default:wn}}}),Tn=()=>{let[e]=ht.useState(!1),[t]=ht.useState(!1),[o]=ht.useState(!1),[n]=ht.useState(null);return{showConfirmDialog:e,showPasswordDialog:t,isDeleting:o,error:n,startDeleteFlow:()=>{},confirmDelete:async()=>{},cancel:()=>{}}};Gs()&&import("@donotdev/auth").then(e=>{Tn=e.useDeleteAccount}).catch(e=>{});var yt=e=>{if(!e)return Ye;if(typeof e=="function")return e;let t=e.replace(/['"]/g,""),o=Ps[t];return o||Ye},ro=({loginPath:e,display:t=zs.AUTO,"no-tooltip":o=!1,customItems:n=[],className:r,style:a})=>{let{t:i}=Vs("dndev"),{shouldHide:l,isReady:c,isAuthenticated:d}=vt(),s=_s(),p=A("user"),g=A("signOut"),u=Hs("isLaptop"),m=W(),y=Ws(),h=s.profilePath,f=s.authMenuItems||[],k=p?.role,C=Tn(),x=()=>p&&(p.displayName||p.email?.split("@")[0])||"User",N=()=>x().split(" ").map(v=>v.charAt(0)).slice(0,2).join("").toUpperCase(),L=()=>{if(!p)return i("auth.userMenu",{defaultValue:"User menu"});let b=[x()];return p.email&&b.push(p.email),k&&k!=="guest"&&b.push(`Role: ${k}`),b.join(`
4
- `)},S=Rs(()=>{let b=[];return!u&&p&&b.push({children:pe(Os,{variant:"muted",as:"span",children:`${x()}${p.email?`
5
- ${p.email}`:""}`}),disabled:!0}),h&&b.push({label:i("auth.profile",{defaultValue:"Profile"}),icon:Is,onClick:()=>y(h)}),f.forEach(v=>{let w=m.find(D=>D.path===v.path),T=v.label||w?.label||v.path.split("/").pop()||"Menu",R=v.icon?yt(v.icon):w?.icon&&(typeof w.icon=="string"||typeof w.icon=="function")?yt(w.icon):Ye;b.push({label:T,icon:R,onClick:()=>y(v.path)})}),n.forEach(v=>{if(v.path){let w=m.find(D=>D.path===v.path),T=v.label||w?.label||v.path.split("/").pop()||"Menu",R=v.icon?yt(v.icon):Ye;b.push({label:T,icon:R,onClick:()=>y(v.path),disabled:v.disabled,style:v.style})}else if(v.onClick){let w=v.icon?yt(v.icon):Ye;b.push({label:v.label,icon:w,onClick:v.onClick,disabled:v.disabled,style:v.style})}}),b.push({label:i("auth.deleteAccount.label",{defaultValue:"Delete Account"}),icon:Ls,onClick:C.startDeleteFlow,variant:"destructive"}),b.push({label:i("auth.signOut",{defaultValue:"Sign Out"}),icon:As,onClick:()=>g(),variant:"destructive"}),b},[h,f,n,g,C,i,m,u,p,k,x,y]);return Us().length===0||l||!c||!d?null:qs(Ys,{children:[pe(xn,{fallback:null,children:pe($s,{open:C.showPasswordDialog,isLoading:C.isDeleting,error:C.error,onReauth:b=>C.confirmDelete(b),onCancel:C.cancel})}),pe(xn,{fallback:null,children:pe(Ks,{open:C.showConfirmDialog,isLoading:C.isDeleting,error:C.error,onConfirm:()=>C.confirmDelete(),onCancel:C.cancel})}),pe(Ms,{trigger:pe(Fs,{variant:Bs.OUTLINE,icon:p?pe(Ds,{src:p.photoURL??void 0,fallback:N(),alt:x(),style:{margin:"-4px 0"}}):Es,display:t,"aria-label":i("auth.userMenu",{defaultValue:"User menu"}),tooltip:!o&&u&&p?L():o?void 0:i("auth.userMenu",{defaultValue:"User menu"}),className:r,style:a,children:x()}),items:S,contentAlign:"end"})]})};import{jsx as M}from"react/jsx-runtime";var An=()=>null,al=In(async()=>{try{return{default:(await import("@donotdev/auth")).AuthPartnerButton}}catch{return{default:An}}}),Nn=In(async()=>{try{return{default:(await import("@donotdev/auth")).MultipleAuthProviders}}catch{return{default:An}}}),io=({display:e=tl.AUTO,className:t,style:o})=>{let{t:n}=ol("dndev"),{shouldHide:r,isLoading:a,isReady:i,isAuthenticated:l}=vt(),c=nl(),d=rl(),[s,p]=js(!1),g=c.loginPath,u=n("auth.signIn",{defaultValue:"Sign In"}),m=n("auth.loading",{defaultValue:"Loading..."}),y=d.includes("password")||d.includes("emailLink");if(r||!i)return null;let h=({children:f,...k})=>M(Js,{variant:Qs.OUTLINE,icon:Zs,display:e,tooltip:u,className:t,style:o,...k,children:f??u});if(!l){if(g!==void 0)return M(I,{path:g,prefetch:!0,children:M(h,{})});let f=d[0];return y?M(el,{trigger:M(h,{}),title:u,open:s,onOpenChange:p,"data-content-size":"form",children:M(ao,{fallback:M("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m}),children:M(Nn,{spacing:"medium",onSuccess:()=>p(!1)})})}):d.length>1?M(Xs,{trigger:M(h,{}),children:M(ao,{fallback:M("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m}),children:M(Nn,{spacing:"tight"})})}):M(ao,{fallback:M(h,{disabled:a,tooltip:a?m:u,children:a?m:u}),children:M(al,{partnerId:f,display:e,className:t,style:o})})}return M(ro,{display:e,loginPath:g,className:t,style:o})};import{RefreshCw as il}from"lucide-react";import{cn as sl}from"@donotdev/components";import{jsx as En,jsxs as dl}from"react/jsx-runtime";var ll=({className:e})=>dl("div",{className:sl("dndev-loading-overlay",e),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",opacity:"var(--opacity-muted)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:[En(il,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}}),En("span",{className:"dndev-sr-only",children:"Loading..."})]}),cl=ll;import{AlertCircle as pl,RefreshCw as ul,Mail as ml,Cookie as gl}from"lucide-react";import{Card as fl,Button as so,BUTTON_VARIANT as lo,Stack as Ln}from"@donotdev/components";import{useTranslation as vl}from"@donotdev/core";import{jsx as qe,jsxs as bt}from"react/jsx-runtime";function hl({featureName:e,title:t,description:o,showReviewCookies:n=!1,showContactSupport:r=!0,showRetry:a=!1,supportEmail:i="support@example.com",onRetry:l,onReviewCookies:c,customActions:d,className:s=""}){let{t:p}=vl("ui"),g=o||p("featureDisabled.description","{featureName} is not available. This may be due to missing configuration or disabled features.",{featureName:e}),u=()=>{if(c)c();else{let y=new CustomEvent("openCookieConsent");window.dispatchEvent(y)}},m=()=>{window.location.href=`mailto:${i}?subject=${encodeURIComponent(`Feature Unavailable: ${e}`)}&body=${encodeURIComponent(`I'm experiencing an issue with ${e} not being available.`)}`};return bt(fl,{className:s,title:bt(Ln,{direction:"row",align:"center",gap:"tight",children:[qe(pl,{className:"dndev-size-md",style:{color:"var(--destructive)"}}),t||e]}),subtitle:g,children:[" ",bt("div",{style:{display:"grid",gap:"var(--gap-md)"},children:[(n||r||a||d)&&bt(Ln,{direction:"row",wrap:"wrap",gap:"tight",children:[n&&qe(so,{variant:lo.OUTLINE,onClick:u,icon:gl,children:p("featureDisabled.reviewCookies","Review Cookies")}),r&&qe(so,{variant:lo.OUTLINE,onClick:m,icon:ml,children:p("featureDisabled.contactSupport","Contact Support")}),a&&qe(so,{variant:lo.OUTLINE,onClick:l,icon:ul,children:p("featureDisabled.retry","Retry")}),d]}),qe("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:p("featureDisabled.helpText","If you believe this is an error, please contact support or try refreshing the page.")})]})]})}var yl=hl;le();import{cn as bl}from"@donotdev/components";import{jsx as Q,jsxs as Al}from"react/jsx-runtime";var ne=({state:e="loading",message:t,show:o=!0,className:n,showSpinner:r=!1,spinnerSize:a="md"})=>{if(!o)return null;let l=t||(d=>({initial:"Preparing...",loading:"Loading...",processing:"Processing your request...","almost-done":"Almost there...",complete:"Complete!"})[d]||"Loading...")(e),c={sm:{width:"0.75rem",height:"0.75rem"},md:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}};return Al("div",{className:bl(n),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"var(--gap-sm)",color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",transition:"opacity var(--dur-fast) ease-out"},role:"status","aria-live":"polite","aria-label":l,children:[r&&Q("div",{style:{...c[a],animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid currentColor",borderTopColor:"transparent"},role:"status","aria-hidden":"true"}),Q("span",{style:{fontWeight:500},children:l})]})},Sl=({message:e="Loading...",...t})=>Q(ne,{state:"loading",message:e,...t}),Cl=({message:e="Processing your request...",...t})=>Q(ne,{state:"processing",message:e,...t}),xl=({message:e="Almost there...",...t})=>Q(ne,{state:"almost-done",message:e,...t}),kl=({message:e="Complete!",...t})=>Q(ne,{state:"complete",message:e,...t}),wl=({showSpinner:e=!0,...t})=>Q(ne,{state:"processing",message:"Saving your changes...",showSpinner:e,...t}),Tl=({showSpinner:e=!0,fileName:t,...o})=>Q(ne,{state:"processing",message:t?`Uploading ${t}...`:"Uploading file...",showSpinner:e,...o}),Nl=({showSpinner:e=!0,query:t,...o})=>Q(ne,{state:"processing",message:t?`Searching for "${t}"...`:"Searching...",showSpinner:e,...o}),Il=({showSpinner:e=!0,...t})=>Q(ne,{state:"loading",message:"Connecting to server...",showSpinner:e,...t}),St=ne;import{cn as El}from"@donotdev/components";import{Fragment as Pn,jsx as ue,jsxs as Rn}from"react/jsx-runtime";var Ll=({show:e=!1,backdrop:t=!0,backdropBlur:o=!0,className:n,children:r,message:a,showSpinner:i=!0,spinnerSize:l="lg",preventClicks:c=!0,zIndex:d="var(--z-modal)"})=>{if(!e)return null;let s=d==="var(--z-modal)"||!d?"dndev-z-modal":d==="var(--z-toast)"?"dndev-z-toast":d==="var(--z-tooltip)"?"dndev-z-tooltip":d==="var(--z-overlay)"?"dndev-z-overlay":null;return ue("div",{className:El("dndev-loading-overlay",s,n),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none",pointerEvents:c?"auto":"none",...s?{}:{zIndex:d}},role:"dialog","aria-modal":"true","aria-busy":"true","aria-label":"Loading overlay",children:ue("div",{className:"dndev-surface",style:{display:"grid",placeItems:"center",gap:"var(--gap-md)",borderRadius:"var(--radius-lg)",padding:"var(--gap-lg)",backgroundColor:"var(--background)",opacity:"var(--opacity-strong)",border:"1px solid var(--border)",boxShadow:"var(--shadow-xl)",maxWidth:"var(--content-text)",width:"100%",margin:"0 var(--gap-md)"},children:r||Rn(Pn,{children:[i&&ue("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:l==="sm"?"2rem":l==="md"?"3rem":"4rem",height:l==="sm"?"2rem":l==="md"?"3rem":"4rem"},role:"status","aria-hidden":"true"}),a&&ue(St,{...a})]})})})};var Pl=({show:e=!1,backdrop:t=!1,backdropBlur:o=!1,className:n,...r})=>ue("div",{className:n,style:{position:"absolute",inset:0,display:e?"flex":"none",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none"},role:"status","aria-busy":"true","aria-label":"Loading content",children:ue("div",{style:{display:"grid",placeItems:"center",gap:"var(--gap-sm)"},children:r.children||Rn(Pn,{children:[ue("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:"1.5rem",height:"1.5rem"},role:"status","aria-hidden":"true"}),r.message&&ue(St,{...r.message})]})})}),Rl=Ll;import{cn as Dl}from"@donotdev/components";import{jsx as Dn}from"react/jsx-runtime";var Fl=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:Dn("div",{className:Dl(t),style:{display:"flex",alignItems:"center",justifyContent:"center",...e==="fullPage"&&{position:"fixed",inset:0,backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50}},role:"status","aria-busy":"true","aria-label":"Loading",children:Dn("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--muted)",borderTopColor:"var(--primary)",...e==="fullPage"?{width:"5rem",height:"5rem"}:{width:"var(--icon-md)",height:"var(--icon-md)"}},role:"status","aria-busy":"true","aria-label":"Loading"})}),Bl=Fl;import{Lock as Ct,Shield as Fn}from"lucide-react";import{useEffect as co,useRef as Bn,useCallback as Ml}from"react";import{Portal as Ol,Spinner as zl,Stack as Vl,Text as Ze,Button as Ul}from"@donotdev/components";import{useTranslation as _l,useOverlay as re}from"@donotdev/core";import{jsx as X,jsxs as On}from"react/jsx-runtime";var Mn={connecting:0,preparing:2e3,redirecting:5e3},Gl=1e4;function Hl(e,t){return t==="none"?null:t==="shield"?Fn:t==="lock"?Ct:e?e.startsWith("stripe-")||e.includes("payment")||e.includes("checkout")?Ct:e.startsWith("oauth-")||e.startsWith("auth-")?Fn:Ct:Ct}function Wl(e){return e||"default"}function $l(){let{t:e}=_l("dndev"),t=re("isRedirectOverlayOpen"),o=re("redirectOperation"),n=re("redirectPhase"),r=re("showCancelButton"),a=re("redirectConfig"),i=re("redirectStartTime"),l=re("setRedirectPhase"),c=re("setShowCancelButton"),d=re("hideRedirectOverlay"),s=Bn([]),p=Bn(null),g=Ml(()=>{d()},[d]);if(co(()=>{if(!t||!i)return;let x=a?.cancelTimeout??Gl,N=Date.now()-i;s.current.forEach(clearTimeout),s.current=[],p.current&&(clearTimeout(p.current),p.current=null);let L=(P,b)=>{let v=Math.max(0,b-N);if(v>0){let w=setTimeout(()=>{l(P)},v);s.current.push(w)}else l(P)};L("preparing",Mn.preparing),L("redirecting",Mn.redirecting);let S=Math.max(0,x-N);return p.current=setTimeout(()=>{c(!0),l("timeout")},S),()=>{s.current.forEach(clearTimeout),s.current=[],p.current&&(clearTimeout(p.current),p.current=null)}},[t,i,a?.cancelTimeout,l,c]),co(()=>{if(!t)return;let x=()=>{d()};return window.addEventListener("popstate",x),()=>window.removeEventListener("popstate",x)},[t,d]),co(()=>{if(!t)return;let x=()=>{};return document.addEventListener("visibilitychange",x),()=>document.removeEventListener("visibilitychange",x)},[t]),!t)return null;let u=Wl(o),m=a?.title??e(`redirectOverlay.${u}.title`,{defaultValue:e("redirectOverlay.default.title")}),y=a?.message??e(`redirectOverlay.${u}.message`,{defaultValue:e("redirectOverlay.default.message")}),h=a?.subtitle??e(`redirectOverlay.${u}.subtitle`,{defaultValue:e("redirectOverlay.default.subtitle")}),f=e(`redirectOverlay.${u}.ariaLabel`,{defaultValue:e("redirectOverlay.default.ariaLabel")}),k=e(`redirectOverlay.phases.${n}`),C=Hl(o,a?.icon);return X(Ol,{children:X("div",{className:"dndev-spinner-overlay",role:"status","aria-busy":"true","aria-label":f,style:{zIndex:"var(--z-overlay, 9999)"},children:On("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--gap-md)",textAlign:"center",maxWidth:"400px",padding:"var(--gap-lg)"},children:[On(Vl,{direction:"row",align:"center",children:[C&&X(C,{style:{width:"1.5rem",height:"1.5rem",color:"var(--primary)"},"aria-hidden":"true"}),X(zl,{variant:"primary"})]}),X(Ze,{as:"h3",style:{color:"var(--foreground)",margin:0},children:m}),X(Ze,{variant:"muted",style:{color:"var(--foreground)",minHeight:"1.5em"},children:k}),X(Ze,{variant:"muted",level:"small",style:{opacity:.8},children:y}),X(Ze,{variant:"muted",level:"small",style:{opacity:.6},children:h}),X(Ze,{variant:"muted",level:"small",style:{opacity:.5,marginTop:"var(--gap-sm)"},children:e("redirectOverlay.doNotRefresh")}),r&&X(Ul,{variant:"ghost",onClick:g,style:{marginTop:"var(--gap-md)"},children:e("redirectOverlay.cancel")})]})})})}import{useEffect as po,useState as zn}from"react";import{cn as Kl}from"@donotdev/components";import{jsx as Vn}from"react/jsx-runtime";var Yl=({isActive:e=!1,progress:t,useFakeProgress:o=!0,duration:n=2e3,className:r,show:a=!0})=>{let[i,l]=zn(0),[c,d]=zn(!1);po(()=>{if(!e||!o||t!==void 0)return;d(!0),l(0);let p=Date.now(),g=setInterval(()=>{let u=Date.now()-p,m=Math.min(u/n*90,90);l(m)},16);return()=>{clearInterval(g)}},[e,o,t,n]),po(()=>{t!==void 0&&d(t>0&&t<100)},[t]),po(()=>{if(!e){let p=setTimeout(()=>{d(!1),l(0)},300);return()=>clearTimeout(p)}},[e]);let s=t??i;return!a||!c?null:Vn("div",{className:Kl(r),style:{position:"fixed",insetInlineStart:0,insetInlineEnd:0,zIndex:9999,height:"4px",backgroundColor:"transparent",top:"var(--header-height, 0px)"},role:"progressbar","aria-valuenow":Math.round(s),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Page loading progress",children:Vn("div",{style:{height:"100%",width:`${s}%`,background:"linear-gradient(to right, var(--primary), color-mix(in srgb, var(--primary) 80%, transparent), color-mix(in srgb, var(--primary) 60%, transparent))",transition:e?"width 0.3s ease-out":"width 0.2s ease-in",boxShadow:"var(--shadow-sm)"}})})},ql=Yl;import{cn as xt,Stack as Zl}from"@donotdev/components";import{jsx as je,jsxs as A2}from"react/jsx-runtime";var jl=({variant:e="text",width:t,height:o,lines:n=1,show:r=!0,className:a,animation:i="pulse",style:l})=>{if(!r)return null;let c={backgroundColor:"var(--muted)",opacity:"var(--opacity-muted)",borderRadius:"var(--radius)",animation:i==="pulse"||i==="wave"?"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite":"none",...i==="wave"&&{background:"linear-gradient(to right, color-mix(in srgb, var(--muted) 50%, transparent), color-mix(in srgb, var(--muted) 30%, transparent), color-mix(in srgb, var(--muted) 50%, transparent))"}},d=()=>{let s={};return t&&(s.width=typeof t=="number"?`${t}px`:t),o&&(s.height=typeof o=="number"?`${o}px`:o),s};return e==="text"?je(Zl,{gap:"tight",children:Array.from({length:n}).map((s,p)=>je("div",{className:xt("dndev-skeleton",a),style:{...c,height:"var(--gap-md)",width:p===n-1?"75%":"100%",...d(),...l}},p))}):e==="circular"?je("div",{className:xt("dndev-skeleton",a),style:{...c,borderRadius:"var(--radius-full)",width:t||o||"40px",height:o||t||"40px",...d(),...l}}):e==="rectangular"?je("div",{className:xt("dndev-skeleton",a),style:{...c,width:t||"100%",height:o||"200px",...d(),...l}}):je("div",{className:xt("dndev-skeleton",a),style:{...c,borderRadius:"var(--radius-lg)",width:t||"100%",height:o||"20px",...d(),...l}})};var Jl=jl;import{Card as Ql,IconBox as Xl,Stack as ec,Text as uo,renderCardContent as tc}from"@donotdev/components";import{jsx as ee,jsxs as Un}from"react/jsx-runtime";var oc=({icon:e,title:t,subtitle:o,content:n,href:r,variant:a,elevated:i,onClick:l,className:c,footer:d,style:s,clickable:p,...g})=>{let u=tc(n),h=`calc(var(--font-size-lg) * var(--line-height) * 2 + var(--gap-md)) calc(var(--font-size-base) * var(--line-height) * 2 + var(--gap-md)) 1fr${d?" auto":""}`,f={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"var(--line-height)"},k={...f,fontSize:"var(--font-size-lg)",fontWeight:600,color:"inherit",margin:0,textAlign:"start",flex:1,minWidth:0},C={...f,fontSize:"var(--font-size-base)",fontWeight:600,color:"var(--muted-foreground)",margin:0},x=e?Un(ec,{direction:"row",align:"center",style:{width:"100%"},children:[ee(Xl,{icon:e}),ee(uo,{as:"div",level:"h3",style:k,children:t})]}):ee(uo,{as:"div",level:"h3",style:k,children:t}),N=ee(Ql,{variant:a,elevated:i,onClick:l,className:c,"data-clickable":r||l||p?"true":void 0,style:{paddingInlineStart:"var(--gap-md)",paddingInlineEnd:"var(--gap-md)",gap:"var(--gap-md)",height:"100%",textAlign:"start",...s},...g,children:Un("div",{style:{display:"grid",gridTemplateRows:h,gap:"var(--gap-md)",width:"100%"},children:[ee("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:x}),ee("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start"},children:ee(uo,{as:"div",level:"body",style:C,children:o})}),ee("div",{children:u}),d&&ee("div",{children:d})]})});return r&&!l?ee(I,{path:r,style:{display:"block",textDecoration:"none",height:"100%"},"aria-label":t?`Learn more about ${t}`:void 0,children:N}):N},nc=oc;import{useState as gc}from"react";import{Bento as fc,Card as vc,Section as hc,Stack as yc,Text as bc,TONE as Sc,cn as Cc}from"@donotdev/components";var rc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#3178C6" d="M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"/></svg>',ac='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#61DAFB" d="M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"/></svg>',ic='<svg role="img" viewBox="0 0 410 404" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="vite-a" x1="6" y1="33" x2="235" y2="344" gradientUnits="userSpaceOnUse"><stop stop-color="#41D1FF"/><stop offset="1" stop-color="#BD34FE"/></linearGradient><linearGradient id="vite-b" x1="195" y1="9" x2="236" y2="293" gradientUnits="userSpaceOnUse"><stop stop-color="#FFEA83"/><stop offset=".08" stop-color="#FFDD35"/><stop offset="1" stop-color="#FFA800"/></linearGradient></defs><path fill="url(#vite-a)" d="M399.641 59.525 215.643 388.545c-3.799 6.793-13.559 6.833-17.415.073L10.582 59.556c-4.201-7.366 2.098-16.29 10.446-14.797l184.195 32.923c1.175.21 2.378.208 3.553-.006l180.343-32.87c8.32-1.517 14.649 7.337 10.522 14.72z"/><path fill="url(#vite-b)" d="M292.965 1.574 156.801 28.255c-2.238.439-3.895 2.335-4.03 4.611l-8.376 141.465c-.197 3.332 2.863 5.918 6.115 5.168l37.91-8.749c3.547-.818 6.752 2.306 6.023 5.873l-11.263 55.153c-.758 3.712 2.727 6.886 6.352 5.785l23.415-7.114c3.63-1.102 7.118 2.081 6.35 5.796l-17.899 86.633c-1.12 5.42 6.088 8.374 9.094 3.728l2.008-3.103 110.954-221.428c1.858-3.707-1.346-7.935-5.418-7.15l-39.022 7.532c-3.667.707-6.787-2.708-5.752-6.296l25.469-88.291c1.036-3.594-2.095-6.612-5.764-5.891z"/></svg>',sc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"/></svg>',lc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#339933" d="M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"/></svg>',cc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#DD2C00" d="M19.455 8.369c-.538-.748-1.778-2.285-3.681-4.569-.826-.991-1.535-1.832-1.884-2.245a146 146 0 0 0-.488-.576l-.207-.245-.113-.133-.022-.032-.01-.005L12.57 0l-.609.488c-1.555 1.246-2.828 2.851-3.681 4.64-.523 1.064-.864 2.105-1.043 3.176-.047.241-.088.489-.121.738-.209-.017-.421-.028-.632-.033-.018-.001-.035-.002-.059-.003a7.46 7.46 0 0 0-2.28.274l-.317.089-.163.286c-.765 1.342-1.198 2.869-1.252 4.416-.07 2.01.477 3.954 1.583 5.625 1.082 1.633 2.61 2.882 4.42 3.611l.236.095.071.025.003-.001a9.59 9.59 0 0 0 2.941.568q.171.006.342.006c1.273 0 2.513-.249 3.69-.742l.008.004.313-.145a9.63 9.63 0 0 0 3.927-3.335c1.01-1.49 1.577-3.234 1.641-5.042.075-2.161-.643-4.304-2.133-6.371m-7.083 6.695c.328 1.244.264 2.44-.191 3.558-1.135-1.12-1.967-2.352-2.475-3.665-.543-1.404-.87-2.74-.974-3.975.48.157.922.366 1.315.622 1.132.737 1.914 1.902 2.325 3.461zm.207 6.022c.482.368.99.712 1.513 1.028-.771.21-1.565.302-2.369.273a8 8 0 0 1-.373-.022c.458-.394.869-.823 1.228-1.279zm1.347-6.431c-.516-1.957-1.527-3.437-3.002-4.398-.647-.421-1.385-.741-2.194-.95.011-.134.026-.268.043-.4.014-.113.03-.216.046-.313.133-.689.332-1.37.589-2.025.099-.25.206-.499.321-.74l.004-.008c.177-.358.376-.719.61-1.105l.092-.152-.003-.001c.544-.851 1.197-1.627 1.942-2.311l.288.341c.672.796 1.304 1.548 1.878 2.237 1.291 1.549 2.966 3.583 3.612 4.48 1.277 1.771 1.893 3.579 1.83 5.375-.049 1.395-.461 2.755-1.195 3.933-.694 1.116-1.661 2.05-2.8 2.708-.636-.318-1.559-.839-2.539-1.599.79-1.575.952-3.28.479-5.072zm-2.575 5.397c-.725.939-1.587 1.55-2.09 1.856-.081-.029-.163-.06-.243-.093l-.065-.026c-1.49-.616-2.747-1.656-3.635-3.01-.907-1.384-1.356-2.993-1.298-4.653.041-1.19.338-2.327.882-3.379.316-.07.638-.114.96-.131l.084-.002c.162-.003.324-.003.478 0 .227.011.454.035.677.07.073 1.513.445 3.145 1.105 4.852.637 1.644 1.694 3.162 3.144 4.515z"/></svg>',dc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="m12 1.608 12 20.784H0Z"/></svg>',pc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#635BFF" d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"/></svg>',uc='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><linearGradient id="vb-a" x1="0.414" y1="0.255" x2="0" y2="0.932" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#eab308"/><stop offset="1" stop-color="#ca8a04"/></linearGradient><linearGradient id="vb-b" x1="0.338" y1="0.02" x2="0.664" y2="0.966" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#fde68a"/><stop offset="1" stop-color="#fbbf24"/></linearGradient><linearGradient id="vb-c" y1="0.5" x2="1" y2="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#7dd3fc"/><stop offset="1" stop-color="#0ea5e9"/></linearGradient></defs><g transform="translate(-2056 -1899)"><path d="M742.271,987.024c-66.706,0-119.121,54.673-121.874,126.408l-2.551,95.471c-3.967,78.653,71.961,105.52,126.936,105.52Z" transform="translate(1463.458 1004.277)" fill="url(#vb-a)"/><path d="M92.616.01H319.894c54.53-.8,95.624,40.1,98.381,93.335l6.144,135.76c.732,67.368-48.116,94.95-104.525,95.335L92.616,327.374C34.061,327.8-1.063,283.663.022,229.105l3.8-135.76C7.41,33.54,33.3,1.093,92.616.01Z" transform="translate(2118.42 1991.302)" fill="url(#vb-b)"/><path d="M86.844.009H299.958c51.132-.746,89.665,37.307,92.25,86.824l5.761,126.29c.686,62.669-45.117,88.326-98.011,88.685L86.844,304.537C31.938,304.933-1,263.875.02,213.123L3.58,86.834C6.948,31.2,31.222,1.016,86.844.009Z" transform="translate(2136.977 2001.737)" fill="#111827"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2421.148 2104.357)" fill="url(#vb-c)"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2208.034 2104.357)" fill="url(#vb-c)"/></g></svg>',mc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#FBF0DF" d="M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083a5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z"/></svg>',mo={bun:{svg:`data:image/svg+xml,${encodeURIComponent(mc)}`,color:"#FBF0DF",name:"Bun"},typescript:{svg:`data:image/svg+xml,${encodeURIComponent(rc)}`,color:"#3178C6",name:"TypeScript"},react:{svg:`data:image/svg+xml,${encodeURIComponent(ac)}`,color:"#61DAFB",name:"React"},vite:{svg:`data:image/svg+xml,${encodeURIComponent(ic)}`,color:"#BD34FE",name:"Vite"},nextjs:{svg:`data:image/svg+xml,${encodeURIComponent(sc)}`,color:"var(--foreground, #000000)",name:"Next.js"},nodejs:{svg:`data:image/svg+xml,${encodeURIComponent(lc)}`,color:"#339933",name:"Node.js"},firebase:{svg:`data:image/svg+xml,${encodeURIComponent(cc)}`,color:"#DD2C00",name:"Firebase"},vercel:{svg:`data:image/svg+xml,${encodeURIComponent(dc)}`,color:"var(--foreground, #000000)",name:"Vercel"},stripe:{svg:`data:image/svg+xml,${encodeURIComponent(pc)}`,color:"#635BFF",name:"Stripe"},valibot:{svg:`data:image/svg+xml,${encodeURIComponent(uc)}`,color:"#FBBF24",name:"Valibot"}};import{jsx as Se,jsxs as Tc}from"react/jsx-runtime";function xc({techKey:e,variant:t}){let o=mo[e],[n,r]=gc(!1);if(!o)return null;let a=decodeURIComponent(o.svg.replace("data:image/svg+xml,","")),i=Be(a);return Se(vc,{variant:t,className:"dndev-tech-card",style:{"--tech-color":o.color},"data-hover":n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:Tc(yc,{direction:"column",align:"center",gap:"tight",children:[Se("div",{className:"dndev-tech-card-logo","data-tech":e,dangerouslySetInnerHTML:{__html:i}}),Se(bc,{as:"span",level:"small",children:o.name})]})})}function kc({title:e,techs:t,cols:o=3,columns:n,gap:r="medium",separator:a=!1,tone:i=Sc.GHOST,align:l,collapsible:c,open:d,onOpenChange:s,defaultOpen:p,className:g}){let u=n||(typeof o=="number"?{mobile:o,tablet:o,desktop:o,wide:o}:{mobile:o[0],tablet:o[1],desktop:o[2],wide:o[3]}),m=f=>{if(f==="long")return{cols:2,rows:1};if(f==="high")return{cols:1,rows:2};if(f==="huge")return{cols:2,rows:2}},y=t.filter(f=>mo[f.name]).map(f=>({id:f.name,content:Se(xc,{techKey:f.name,variant:f.variant}),span:m(f.size)})),h=Se(fc,{items:y,columns:u,gap:r,ariaLabel:"Technology stack"});return Se(hc,{title:e,separator:a,tone:i,align:l,collapsible:c,open:d,onOpenChange:s,defaultOpen:p,className:Cc("dndev-tech-bento",g),children:Se("div",{className:"dndev-tech-bento-grid",children:h})})}var wc=kc;import{Suspense as Nc,lazy as Ic}from"react";import{useConsent as _n}from"@donotdev/core";import{jsx as Gn}from"react/jsx-runtime";var Ac=Ic(()=>Promise.resolve().then(()=>(Ht(),Gt)));function o0(){let e=_n("hasConsented"),t=_n("showBanner");return e&&!t?null:Gn(Nc,{fallback:null,children:Gn(Ac,{})})}import{Button as Hn,ScrollArea as Ec}from"@donotdev/components";import{cn as Wn}from"@donotdev/components";import{jsx as ae,jsxs as Lc}from"react/jsx-runtime";function s0({content:e,cta:t,align:o="center",justify:n="center",disableScrollArea:r=!1,contentVariant:a="narrow",contentClassName:i,ctaClassName:l}){let d=a==="narrow"?a==="narrow"&&ae("div",{className:"dndev-game-container__content-narrow",children:e}):e,s=r?ae("div",{style:{overflow:"auto",overscrollBehavior:"contain",height:"100%"},children:d}):ae(Ec,{className:"dndev-game-container__scroll",children:d});return Lc("div",{className:"dndev-game-container",children:[ae("div",{className:Wn("dndev-game-container__content",i),"data-align":o,"data-justify":n,"data-content-variant":a,children:ae("div",{className:"dndev-game-container__scroll-wrapper",children:s})}),t&&ae("div",{className:Wn("dndev-game-container__cta",l),children:Array.isArray(t)?ae("div",{className:"dndev-game-container__cta-buttons",children:t.map((p,g)=>ae(Hn,{onClick:p.onClick,disabled:p.disabled??!1,variant:p.variant??"default",className:"dndev-game-container__cta-button",fullWidth:!0,children:p.label},g))}):ae(Hn,{onClick:t.onClick,disabled:t.disabled??!1,variant:t.variant??"default",className:"dndev-game-container__cta-button",children:t.label})})]})}import{useEffect as Pc,Suspense as Rc,lazy as Dc}from"react";import{jsx as go}from"react/jsx-runtime";var $n=new Set,Kn=new Map;function Fc(e,t){let o=Kn.get(e);if(o)return o;let n=t[e];if(!n)return null;let r=Dc(n);return Kn.set(e,r),r}function p0({screenRegistry:e,currentScreen:t,nextScreen:o,fallback:n=null}){Pc(()=>{if(o&&!$n.has(o)){$n.add(o);let a=e[o];a&&a().catch(()=>{})}},[o,e]);let r=t?Fc(t,e):null;return!t||!r?null:go("div",{style:{height:"100%"},children:go(Rc,{fallback:n,children:go(r,{})})})}import{cn as Bc,DISPLAY as fo}from"@donotdev/components";import{useAppConfig as Yn}from"@donotdev/core";import{jsx as kt,jsxs as zc}from"react/jsx-runtime";var Mc=({display:e=fo.AUTO,linkToHome:t=!0,className:o})=>{let n=Yn("name"),a=Yn("shortName")||n||"App",i=G.getLogoSvgContent(),l=G.resolveLogo(),c=e===fo.FULL||e===fo.AUTO,d=i?kt("div",{className:"app-branding-logo",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Be(i)}}):G.assetExists(l)?kt("img",{src:l,alt:a,className:"app-branding-logo"}):null,s=c&&kt("span",{className:"app-branding-title","data-display":e,children:a}),p=zc("div",{className:Bc("app-branding",o),"data-display":e,children:[d,s]});return t?kt(I,{path:"/",className:"app-branding-link",children:p}):p},Oc=Mc;import{cn as qn}from"@donotdev/components";import{useAppConfig as Zn}from"@donotdev/core";import{jsx as Jn}from"react/jsx-runtime";var jn={sm:{width:"var(--icon-md)",height:"var(--icon-md)"},md:{width:"var(--icon-touch)",height:"var(--icon-touch)"},lg:{width:"var(--icon-touch)",height:"var(--icon-touch)"},xl:{width:"var(--touch-target)",height:"var(--touch-target)"},header:{height:"var(--icon-touch)",width:"auto"}},Vc=({alt:e,size:t="header",className:o})=>{let n=Zn("name"),r=Zn("shortName"),a=e||n||r||"App",i=G.getLogoSvgContent(),l=G.resolveLogo(),c=typeof t=="string"&&t in jn?jn[t]:typeof t=="string"?{}:{width:t,height:t};return i?Jn("div",{className:qn("app-icon-header",o),style:{display:"inline-flex",...c},role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Be(i)}}):Jn("img",{src:l,alt:a,className:qn(o),style:{objectFit:"contain",...c}})},Uc=Vc;import{cn as Qn}from"@donotdev/components";import{useAppConfig as Xn,useBreakpoint as _c}from"@donotdev/core";import{jsx as er}from"react/jsx-runtime";var Gc=({title:e,className:t,linkToHome:o=!0})=>{let n=_c("isMobileOrTablet"),r=Xn("name"),a=Xn("shortName"),i=e||n&&a||r||"App",l=er("div",{className:Qn("dndev-text-base",t),style:{fontSize:"var(--font-size-xl)",fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:i});return o?er(I,{path:"/",className:Qn("dndev-inline-block",t),children:l}):l},Hc=Gc;import{ChevronRight as Zc}from"lucide-react";import{useMemo as jc}from"react";import{cn as Jc}from"@donotdev/components";import{useTranslation as Qc}from"@donotdev/core";import{useLocation as Xc}from"@donotdev/ui/routing/hooks";import{useMemo as tr}from"react";import{useNavigationStore as F0,getRoutes as Wc,getRouteManifest as B0}from"@donotdev/core";function $c(){return tr(()=>{try{let e=Wc();return!e||e.length===0?[]:Kc(e)}catch{return[]}},[])}function or(){let e=$c();return tr(()=>e.flatMap(t=>t.routes),[e])}function Kc(e){let t=new Map;return e.forEach(o=>{let n=typeof o.path=="string"?o.path:String(o.path);if(!n||n==="undefined"||n==="null")return;let r=o.meta?.entity||Yc(n)||"other",a={path:n,label:o.meta?.title||qc(n),icon:o.meta?.icon,component:o.component,importPath:o.importPath,exportName:o.exportName,auth:o.auth,meta:o.meta};t.has(r)||t.set(r,{label:r.charAt(0).toUpperCase()+r.slice(1),routes:[]}),t.get(r)?.routes.push(a)}),Array.from(t.values())}function Yc(e){return e.split("/").filter(Boolean)[0]||null}function qc(e){let t=e.split("/").filter(Boolean),o=t[t.length-1];return o?o.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "):"Home"}import{jsx as Je,jsxs as od}from"react/jsx-runtime";var ed=({items:e,separator:t=Zc,showHome:o=!0,homeHref:n="/",variant:r="default",className:a})=>{let{t:i}=Qc("dndev"),l=Xc(),c=or(),d=jc(()=>new Set(c.map(g=>g.path)),[c]),s=e||(()=>{let g=l.pathname.split("/").filter(Boolean),u=[],m="";return g.forEach(y=>{m+=`/${y}`;let h=y.split("-").map(k=>k.charAt(0).toUpperCase()+k.slice(1)).join(" "),f=d.has(m)?m:void 0;u.push({label:h,href:f})}),u})(),p=o?[{label:i("navigation.home","Home"),href:n},...s]:s;return r==="smart"&&l.pathname.split("/").filter(Boolean).length<2?null:Je("nav",{role:"navigation","aria-label":"Breadcrumb navigation",className:Jc("breadcrumbs",a),children:p.map((g,u)=>{let y=u===p.length-1||!g.href;return od("span",{className:"breadcrumb-item",children:[u>0&&Je(t,{className:"dndev-size-md separator"}),g.icon&&Je(g.icon,{className:"dndev-size-md icon"}),g.href&&!y?Je(I,{path:g.href,className:"breadcrumb-link",children:g.label}):Je("span",{className:"breadcrumb-label",children:g.label})]},u)})})},td=ed;import{useTranslation as nd,maybeTranslate as nr,useLayout as vo,useAppConfig as rd}from"@donotdev/core";import{jsx as Me,jsxs as id}from"react/jsx-runtime";var ad=({asLink:e=!1,className:t})=>{let o=rd("app"),n=vo("gameTitle"),r=vo("gameSubtitle"),a=vo("gameNamespace"),{t:i}=nd(a||"dndev"),l=nr(i,n??void 0),c=nr(i,r??void 0),d=o?.name||"Game";if(l)return Me("div",{className:t,children:id("div",{style:{textAlign:"center"},children:[Me("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}),c&&Me("p",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c})]})});let s=Me("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d});return e?Me(I,{path:"/",className:t,style:{fontSize:"var(--font-size-2xl)",fontWeight:700,transition:"color var(--dur-fast) ease-out"},onMouseEnter:p=>p.currentTarget.style.color="var(--primary)",onMouseLeave:p=>p.currentTarget.style.color="var(--foreground)",children:d}):Me("div",{className:t,children:s})};import{Trash2 as sd}from"lucide-react";import{useState as rr}from"react";import{Button as ld,BUTTON_VARIANT as cd,Checkbox as dd,Stack as ho,useToast as pd}from"@donotdev/components";import{useTranslation as ud}from"@donotdev/core";import{useRefresh as md}from"@donotdev/ui/routing/hooks";import{jsx as wt,jsxs as ar}from"react/jsx-runtime";function gd(){let{t:e}=ud("dndev"),{toast:t}=pd(),[o,n]=rr(!1),r=md(),[a,i]=rr({localStorage:!0,sessionStorage:!0,applicationCache:!0,serviceWorker:!0,cookies:!0,indexedDB:!0,webSQL:!0,memoryCache:!0}),l=async()=>{try{n(!0);let c=[];if(a.localStorage&&typeof window<"u")try{localStorage.clear(),c.push("localStorage")}catch{}if(a.sessionStorage&&typeof window<"u")try{sessionStorage.clear(),c.push("sessionStorage")}catch{}if(a.indexedDB&&typeof window<"u"&&"indexedDB"in window)try{if("databases"in indexedDB){let s=await indexedDB.databases();await Promise.all(s.map(async p=>{if(p.name){let g=indexedDB.deleteDatabase(p.name);await new Promise((u,m)=>{g.onsuccess=()=>u(void 0),g.onerror=()=>m(g.error)})}}))}c.push("IndexedDB")}catch{}if(a.webSQL&&"openDatabase"in window)try{let s=globalThis.openDatabase("","","","");s&&s.transaction&&s.transaction(p=>{p.executeSql('SELECT name FROM sqlite_master WHERE type="table"',[],(g,u)=>{for(let m=0;m<u.rows.length;m++){let y=u.rows.item(m).name;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(y)&&g.executeSql(`DROP TABLE IF EXISTS ${y}`)}})}),c.push("WebSQL")}catch{}if(a.applicationCache&&"caches"in window)try{let s=await caches.keys();await Promise.all(s.map(async p=>{try{await caches.delete(p)}catch{}})),c.push("Application Cache")}catch{}if(a.serviceWorker&&"serviceWorker"in navigator)try{let s=await navigator.serviceWorker.getRegistrations();await Promise.all(s.map(async p=>{try{await p.unregister()}catch{}})),c.push("Service Workers")}catch{}if(a.cookies)try{document.cookie.split(";").forEach(s=>{let p=s.indexOf("="),g=p>-1?s.substr(0,p):s;document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${window.location.hostname}`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=.${window.location.hostname}`}),c.push("Cookies")}catch{}if(a.memoryCache)try{"gc"in window&&typeof globalThis.gc=="function"&&globalThis.gc(),c.push("Memory Cache")}catch{}let d=c.length>0?e("settings.clearCache.success","Cache cleared successfully: {{items}}",{items:c.join(", ")}):e("settings.clearCache.noItemsCleared","No cache items were cleared");t("success",d),c.length>0&&setTimeout(()=>{typeof globalThis<"u"&&globalThis._DNDEV_STORES_&&(globalThis._DNDEV_STORES_={}),typeof window<"u"?window.location.href=window.location.href:r()},1e3)}catch{t("error",e("settings.clearCache.error","Error clearing cache"))}finally{n(!1)}};return ar(ho,{children:[wt(ho,{children:Object.entries(a).map(([c,d])=>ar(ho,{direction:"row",align:"center",gap:"tight",children:[wt(dd,{id:c,checked:d,onCheckedChange:s=>i(p=>({...p,[c]:!!s}))}),wt("label",{htmlFor:c,style:{fontSize:"var(--font-size-sm)",fontWeight:500,lineHeight:1,cursor:"pointer"},children:e(`settings.clearCache.${c}`,c.charAt(0).toUpperCase()+c.slice(1))})]},c))}),wt(ld,{variant:cd.DESTRUCTIVE,style:{margin:"0 auto"},disabled:o||!Object.values(a).some(Boolean),onClick:l,icon:sd,children:o?e("settings.clearCache.clearing","Clearing..."):e("settings.clearCache.button","Clear Cache")})]})}var yo=gd;import{DropdownMenu as yd,Button as bo,Stack as bd}from"@donotdev/components";import{Link as fd}from"lucide-react";import{navigationMenuTriggerStylePrimitive as vd}from"@donotdev/components";le();ye();import{jsx as ir,jsxs as hd}from"react/jsx-runtime";var Tt=({path:e,route:t,showIcons:o=!0})=>{let n=W(),r=t??n.find(l=>l.path===e);if(!r)return null;let a=o&&!!r.icon,i=!!r.label;return hd(I,{path:r.path,className:vd(),...a&&!i&&{"data-display":"compact"},children:[o&&ir(z,{icon:r.icon,fallback:fd}),ir("span",{children:r.label})]})};import{jsx as Ce}from"react/jsx-runtime";var Sd=({navigation:e,className:t})=>Ce(bd,{role:"navigation",direction:"row",align:"center",className:t,style:{gap:"var(--gap-sm)"},children:e.map((o,n)=>o.routes&&o.routes.length>0?Ce(yd,{trigger:Ce(bo,{icon:o.icon,children:o.label}),items:o.routes.map(r=>({label:r.label,children:Ce(Tt,{route:r}),asChild:!!r.path})),contentAlign:"start"},o.label+n):o.path?Ce(bo,{icon:o.icon,"aria-label":o.label,render:({children:r,...a})=>Ce(I,{path:o.path,...a,children:r}),children:o.label},o.label+n):Ce(bo,{icon:o.icon,disabled:!0,"aria-label":o.label,children:o.label},o.label+n))}),Cd=Sd;import{Card as xd,cn as kd}from"@donotdev/components";import{jsx as So}from"react/jsx-runtime";var wd=({languages:e,currentLanguage:t,onLanguageChange:o,className:n})=>So(xd,{className:kd("dndev-z-modal",n),style:{position:"fixed",bottom:"var(--gap-md)",insetInlineEnd:"var(--gap-md)",display:"flex",alignItems:"center",gap:"var(--gap-sm)",transition:"var(--dur-fast) ease-out"},role:"region","aria-label":"Language selector","data-role":"floating",children:So("select",{style:{backgroundColor:"transparent",outline:"none",fontSize:"var(--font-size-base)",cursor:"pointer"},value:t,onChange:r=>o?.(r.target.value),"aria-label":"Select language",children:e.map(r=>So("option",{value:r,children:r},r))})}),Td=wd;import{MoreHorizontal as Nd}from"lucide-react";import{Button as Id,BUTTON_VARIANT as Ad,DropdownMenu as Ed}from"@donotdev/components";import{jsx as sr}from"react/jsx-runtime";var Ld=({children:e,className:t})=>sr(Ed,{trigger:sr(Id,{variant:Ad.GHOST,icon:Nd,"aria-label":"Menu",className:t}),contentAlign:"end",children:e}),Pd=Ld;import{MoreHorizontal as Rd}from"lucide-react";import{Link as Dd}from"lucide-react";import{DISPLAY as Qe,DropdownMenu as Fd,Button as lr}from"@donotdev/components";import{cn as Bd}from"@donotdev/components";import{useBreakpoint as cr,useTranslation as Md}from"@donotdev/core";le();ye();import{jsx as xe}from"react/jsx-runtime";var Od=({className:e="",showIcons:t=!0,display:o=Qe.AUTO,path:n})=>{let{t:r}=Md("dndev"),a=cr("isMobile"),i=cr("isTablet"),l=W(),c=rn(n??"");return n?c?xe(lr,{variant:"ghost",display:o,icon:t?xe(z,{icon:c.icon,fallback:Dd}):void 0,className:e,render:({children:s,...p})=>xe(I,{path:c.path,...p,children:s}),children:c.label}):null:(o===Qe.AUTO?a||i?Qe.COMPACT:Qe.FULL:o)===Qe.COMPACT?xe(Fd,{trigger:xe(lr,{variant:"ghost",icon:Rd,"aria-label":r("navigation.menu","Navigation"),className:e}),contentAlign:"end",items:l.map(s=>({label:s.label,children:xe(Tt,{route:s,showIcons:t}),asChild:!0}))}):xe(hn,{overflowDetection:!0,showIcons:t,className:Bd(e),style:{flex:1}})},zd=Od;import{Bell as Vd}from"lucide-react";import{useMemo as Ud,useEffect as _d,useRef as Gd}from"react";import{Button as Hd,cn as Wd,toast as $d,Stack as Kd}from"@donotdev/components";import{jsx as Co}from"react/jsx-runtime";var Yd={sm:{button:{width:"var(--icon-md)",height:"var(--icon-md)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},md:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},lg:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-touch)",height:"var(--icon-touch)"},badge:{width:"var(--icon-touch)",height:"var(--icon-touch)",fontSize:"var(--font-size-sm)"}}},qd=({notifications:e=[],count:t=0,loading:o=!1,onNotificationClick:n,onDropdownOpen:r,className:a,maxVisible:i=10,alwaysShow:l=!1,size:c="md",disabled:d=!1})=>{let s=Yd[c],p=Gd(new Set),g=Ud(()=>t===0?null:t>99?"99+":t.toString(),[t]),u=t>0||l;return _d(()=>{e.forEach(m=>{if(!p.current.has(m.id)){p.current.add(m.id);let y=m.type==="error"?"error":m.type==="warning"?"warning":m.type==="success"?"success":"info";$d({title:m.title,description:m.message,toastType:y,duration:0,onDismiss:()=>{p.current.delete(m.id),n&&n(m)}})}})},[e,n]),u?Co("div",{className:Wd(a),style:{position:"relative"},children:Co(Hd,{disabled:d,style:{...s.button,position:"relative"},onClick:()=>{r?.()},onFocus:m=>{m.currentTarget.style.outline="2px solid var(--ring)",m.currentTarget.style.outlineOffset="2px"},onBlur:m=>{m.currentTarget.style.outline="none"},"aria-label":`${t} notification${t!==1?"s":""}`,icon:Vd,children:g&&Co(Kd,{align:"center",justify:"center",style:{position:"absolute",top:"-0.25rem",insetInlineEnd:"-0.25rem",backgroundColor:"var(--destructive)",color:"var(--destructive-foreground)",borderRadius:"var(--radius-full)",fontWeight:600,lineHeight:1,minWidth:0,...s.badge},"aria-hidden":"true",children:g})})}):null},Zd=qd;import{Settings as jd,Check as Jd}from"lucide-react";import*as Nt from"lucide-react";import{Button as Qd,BUTTON_VARIANT as Xd,DropdownMenu as ep,Stack as tp,DISPLAY as op}from"@donotdev/components";import{useTranslation as np}from"@donotdev/core";import{useLanguageSelector as rp,useTheme as xo,Flag as ap}from"@donotdev/core";import{jsx as me,jsxs as lp}from"react/jsx-runtime";function ip({variant:e=Xd.OUTLINE}={}){let{t}=np("dndev"),{languages:o,currentLanguage:n,changeLanguage:r,isLoading:a}=rp(),i=xo("availableThemes"),l=xo("currentTheme"),c=xo("setTheme"),d=u=>{if(!u)return Nt.Palette;let m=u.replace(/['"]/g,"");return Nt[m]||Nt.Palette},s=i.map(u=>{let m=d(u.meta?.icon),y=u.name===l;return{label:u.displayName||u.name,icon:m,onClick:()=>c(u.name),checked:y}}),p=o.map(u=>{let m=u.id===n;return{label:u.name,onClick:()=>r(u.id),disabled:a,checked:m,className:m?"bg-accent":void 0,iconEnd:m&&!a?Jd:void 0,children:lp(tp,{direction:"row",align:"center",gap:"tight",children:[me(ap,{code:u.flagCode||u.id,title:`${u.name} flag`}),me("span",{children:u.name}),a&&m&&me("div",{style:{marginInlineStart:"auto"},children:me("div",{style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:"var(--primary)"}})})]})}}),g=[{label:t("auth.title","Authentication"),subContent:me(io,{display:op.COMPACT})},{label:t("settings.theme","Theme"),subItems:s},{label:t("settings.language","Language"),subItems:p},{label:t("settings.clearCache.title","Clear Cache"),subContent:me(yo,{})}];return me(ep,{trigger:me(Qd,{variant:e,"aria-label":t("settings.title","Settings"),icon:jd}),items:g,contentWidth:"14rem",contentAlign:"end"})}var sp=ip;import*as It from"lucide-react";import{Button as dr,BUTTON_VARIANT as cp,DropdownMenu as dp,DISPLAY as pp}from"@donotdev/components";import{useTranslation as up}from"@donotdev/core";import{useTheme as ko}from"@donotdev/core";import{jsx as To}from"react/jsx-runtime";var wo=e=>{if(!e)return It.Palette;let t=e.replace(/['"]/g,"");return It[t]||It.Palette},mp=({display:e=pp.AUTO,"no-tooltip":t=!1})=>{let{t:o}=up("dndev"),n=ko("availableThemes"),r=ko("currentTheme"),a=ko("setTheme");if(n.length<=1)return null;let i=n.find(f=>f.name===r)||n[0],l=n.length===2?n.find(f=>f.name!==i?.name)||n[0]:null,c=i?wo(i.meta?.icon):null,d=l?wo(l.meta?.icon):null,s=i?.displayName||i?.name||"Theme",p=l?.displayName||l?.name||"Theme",g=n.length===2&&l&&d,u=g?d:c,m=g?t?void 0:o("common.themeSelector.tooltipWithNext","Change Theme: Switch to {{next}}",{next:l?.displayName||l?.name}):t?void 0:o("common.themeSelector.changeTheme","Change Theme"),y={variant:cp.OUTLINE,"aria-label":o("common.themeSelector.changeTheme","Change Theme"),tooltip:m,icon:u,display:e};if(g&&l)return To(dr,{...y,onClick:()=>a(l.name),children:p});if(!i||!c)return null;let h=n.map(f=>{let k=wo(f.meta?.icon),C=f.name===r;return{label:f.displayName||f.name,icon:k,onClick:()=>a(f.name),checked:C}});return To(dp,{trigger:To(dr,{...y,children:s}),items:h,contentWidth:"10rem"})},gp=mp;import{ExternalLink as fp}from"lucide-react";import{getPlatformEnvVar as vp}from"@donotdev/core";import{jsx as hp,jsxs as yp}from"react/jsx-runtime";var No=({className:e})=>{let o=vp("APP_URL")==="https://donotdev.com";return yp("a",{href:o?"https://www.ambroise-park.com":"https://donotdev.com",target:"_blank",rel:"noopener noreferrer",className:e,style:{display:"inline-flex",alignItems:"center",gap:"var(--gap-sm)",fontSize:"var(--font-size-xs)"},children:[o?"AMBROISE-PARK":"DoNotDev",hp(fp,{style:{width:"12px",height:"12px"},"aria-hidden":"true"})]})};import{cn as bp}from"@donotdev/components";import{useTranslation as Sp,useAppConfig as Cp}from"@donotdev/core";import{jsxs as kp}from"react/jsx-runtime";var xp=({appName:e,year:t=new Date().getFullYear(),className:o})=>{let{t:n}=Sp("dndev"),r=Cp("app"),a=e||r?.name||"App";return kp("span",{className:bp(o),style:{flexShrink:0,color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"},children:["\xA9 ",t," ",a,". ",n("footer.legal.allRightsReserved")]})};import{Stack as Np}from"@donotdev/components";import{useTranslation as Ip,maybeTranslate as Ap,useAppConfig as Ep}from"@donotdev/core";var wp=[{path:"#cookie-settings",label:"footer.legal.cookieSettings"},{label:"footer.legal.privacyPolicy",path:"/privacy"},{label:"footer.legal.termsOfService",path:"/terms"}],Tp=e=>e?.legalLinks===null?[]:e?.legalLinks??wp,pr=Tp;import{jsx as ur,jsxs as Pp}from"react/jsx-runtime";var Lp=({app:e,direction:t="column",gap:o="tight"})=>{let{t:n}=Ip("dndev"),r=Ep("app"),i=pr((e||r||{}).footer),l={transition:"color var(--dur-fast) ease-out",textDecoration:"underline",textUnderlineOffset:"2px",color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"};return i.length===0?null:Pp(Np,{direction:t,gap:o,align:"stretch",children:[i.map(c=>ur(I,{path:c.path,style:l,onMouseEnter:d=>d.currentTarget.style.color="var(--primary)",onMouseLeave:d=>d.currentTarget.style.color="var(--muted-foreground)",children:Ap(n,c.label)},c.path)),ur(No,{})]})};import{useEffect as Dp}from"react";import{checkLicense as Fp}from"@donotdev/core";var Rp='<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512"><title>logo</title><style>.s0{opacity:.98;fill:#f23d29}.s1{opacity:.99;fill:#03bec4}.s2{opacity:.97;fill:#27494a}</style><g id="Background"><path id="Path 0" fill-rule="evenodd" class="s0" d="m254 41.1c5.8-0.1 15.2 0.4 21 0.9 5.8 0.6 16 2.2 22.8 3.5 6.7 1.4 17.5 4.2 23.9 6.4 6.5 2.1 16.7 6.1 22.8 8.8 6.1 2.7 15.5 7.6 21 10.8 5.5 3.3 14.3 9.2 19.5 13 5.2 3.9 13.8 11.2 19 16.2 5.2 5 12.2 12.3 15.5 16.2 3.3 4 8.8 11.1 12.2 15.9 3.4 4.8 8.7 13.2 11.7 18.7 3 5.5 6.9 13.4 8.7 17.5 1.7 4.1 4.7 12 6.6 17.5 1.9 5.5 4.5 14.5 5.8 20 1.3 5.5 3.1 15.3 3.9 21.8 0.9 6.6 1.6 19 1.6 28.7 0 9.4-0.7 22.1-1.5 28.3-0.8 6.1-3 17.3-4.8 24.7-1.9 7.4-5.5 18.9-8.2 25.5-2.6 6.6-7 16.3-9.8 21.5-2.8 5.2-8 13.8-11.5 19-3.6 5.2-9.3 12.9-12.7 17-3.5 4.1-10.7 11.8-16.2 17-5.4 5.3-12.7 11.9-16.3 14.7-3.6 2.8-11.4 8.3-17.5 12.2-6.1 4-16.4 9.8-23 13.1-6.6 3.2-17.4 7.6-24 9.8-6.6 2.3-17.2 5.2-23.5 6.6-6.3 1.4-16.2 3-22 3.7-6.4 0.7-17.5 1-28.5 0.6-11.9-0.3-21.7-1.2-29-2.6-6.1-1.1-15.9-3.4-22-5.1-6.1-1.7-15.9-5.2-22-7.6-6.1-2.5-15.5-6.9-21-9.8-5.5-2.9-14.1-8-19-11.3-4.9-3.3-12.4-8.7-16.5-12-4.1-3.4-12.5-11.2-18.6-17.4-6.1-6.3-13.9-15.2-17.3-19.9-3.5-4.7-8.8-12.6-11.9-17.5-3-4.9-7.9-13.9-10.8-20-2.9-6.1-7.1-16.4-9.3-23-2.2-6.6-5.1-17.6-6.5-24.5-1.4-6.9-3-17.4-3.7-23.5-0.7-6.7-0.9-17.2-0.6-27 0.4-8.8 1.3-20.5 2.2-26 0.8-5.5 2.7-14.5 4.1-20 1.4-5.5 3.9-14.1 5.5-19 1.7-4.9 6.3-15.8 10.4-24 4-8.3 10-19.1 13.3-24 3.3-4.9 9-12.6 12.5-17 3.6-4.4 11.4-12.8 17.3-18.6 6-5.8 15.4-13.9 20.9-18 5.5-4.1 14.5-10 20-13.2 5.5-3.1 14.5-7.6 20-10.1 5.5-2.4 15.1-6 21.3-8 6.1-2 16.7-4.7 23.5-6.1 6.7-1.3 16.3-2.8 21.2-3.3 4.9-0.5 13.7-1 19.5-1.1zm-21 38c-4.7 0.5-12.1 1.9-16.5 3-4.4 1.1-11.6 3.1-16 4.5-4.4 1.5-13.8 5.4-21 8.9-7.2 3.5-16.1 8.5-20 11.1-3.8 2.6-10 7.2-13.8 10.3-3.7 3.1-6.7 5.9-6.7 6.3 0 0.5 9.3 10.3 20.8 21.9l20.7 21c5.5-10.5 9-16.5 11.5-20.1 2.4-3.6 7.2-9.6 10.5-13.5 3.3-3.8 9.4-9.6 13.5-12.9 4.1-3.2 10.7-7.4 14.5-9.2 3.9-1.8 9.7-4 13-4.9 3.3-0.8 9.6-1.5 14-1.5 4.4 0 10.7 0.7 14 1.6 3.3 0.9 9.1 3.2 13 5.1 3.9 2 9.3 5.2 12 7.3 2.8 2 8.5 7.5 12.9 12.1 4.3 4.6 10.2 11.8 13.1 15.9 2.9 4.1 7.8 12.2 10.8 18 3 5.8 7.1 14.8 9 20 2 5.2 4.2 13 5.1 17.3 0.9 4.2 1.6 11.4 1.6 15.9 0 5.6-0.6 10.6-2.1 15.3-1.1 3.8-3.8 9.9-5.9 13.5-2.1 3.6-5.8 8.9-8.4 11.7-2.5 2.9-4.6 5.6-4.6 6 0 0.5 1.4 1.2 3.2 1.6 1.8 0.4 6.4 2.4 10.3 4.4 3.9 1.9 9 4.9 11.5 6.6 2.5 1.8 7.1 5.9 10.4 9.2 4.2 4.3 7.1 8.6 10.1 15 2.4 4.9 5 11.9 5.9 15.5 0.9 3.6 2.3 11.9 3.2 18.5 1.1 8 1.4 15.9 1.1 23.5l-0.5 11.5 6.3 6.4c6.3-8.1 10.4-13.8 13.1-17.9 2.8-4.1 6.4-10 8.1-13 1.7-3 5.1-10.2 7.6-16 2.5-5.8 5.8-15.2 7.5-21 1.7-5.8 3.7-13.9 4.6-18 0.8-4.1 2-11.9 2.5-17.3 0.6-5.3 1.1-13.5 1.1-18.2 0-4.7-0.5-12.9-1.1-18.3-0.6-5.3-1.9-13.5-2.9-18.2-1-4.7-3.1-12.3-4.5-17-1.5-4.7-5.1-13.4-7.9-19.5-2.9-6.1-7.6-14.8-10.6-19.5-2.9-4.7-7.2-11-9.5-14-2.3-3-7.8-9.3-12.1-13.9-4.3-4.6-12-11.6-16.9-15.6-4.9-4.1-13.1-9.9-18-13-4.9-3.1-13.3-7.7-18.5-10.2-5.2-2.5-13.6-6.1-18.5-7.8-4.9-1.8-14.2-4.5-20.5-5.9-6.3-1.4-17.1-3-24-3.6-6.9-0.5-13.4-0.9-14.5-0.8-1.1 0.1-4.5 0.3-7.5 0.5-3 0.2-9.3 0.8-14 1.4zm-125.4 79.6c-4.3 6.5-9.8 15.9-12.1 20.8-2.4 4.9-5.9 13.7-7.9 19.5-1.9 5.8-4.4 15-5.5 20.5-1.1 5.5-2.5 15.8-3.1 23-0.6 7.2-0.8 16.8-0.5 21.5 0.4 4.7 1.5 13.9 2.5 20.5 1.1 6.6 3.5 17.3 5.4 23.8 2 6.4 5.5 16.1 7.9 21.5 2.3 5.3 6.7 13.8 9.7 18.7 3 4.9 8.1 12.4 11.4 16.5 3.3 4.1 9.8 11.5 14.5 16.3 4.7 4.9 11.8 11.2 15.6 14.2 3.9 2.9 11.1 7.9 16 11 4.9 3.1 13.1 7.6 18 10 4.9 2.4 13.7 5.9 19.5 7.9 5.8 1.9 14.6 4.4 19.5 5.5 4.9 1.1 13.7 2.5 19.5 3.2 6.6 0.7 16.1 0.9 25.5 0.6 9.8-0.4 19.1-1.5 27-3.1 6.6-1.4 16.7-4.1 22.5-6.1 5.8-2 15-5.8 20.5-8.5 5.5-2.7 13.8-7.4 18.5-10.5 4.7-3.2 9.3-6.5 10.3-7.4 1.6-1.5 1.6-1.7-0.5-3.9-1.3-1.2-2.6-2.2-3-2.2-0.5 0-3.4 2-6.5 4.4-3.2 2.4-9.4 6.4-13.8 8.9-4.4 2.6-12.7 6.4-18.5 8.6-5.8 2.2-15.2 5.1-21 6.5-5.8 1.4-14.6 3-19.5 3.7-4.9 0.6-15.7 1.1-24 1.1-8.2 0-19.5-0.7-25-1.6-5.5-0.8-14.7-2.7-20.5-4.1-5.8-1.5-15-4.5-20.5-6.6-5.5-2.2-12.9-5.6-16.5-7.5-3.6-2-10.3-6.1-15-9.2-4.7-3.1-12.7-9.7-17.8-14.7-7.5-7.2-9.5-9.8-10.2-13-0.5-2.2-1-9.9-1-17 0-7.1 0.7-17.3 1.5-22.5 0.8-5.2 2.3-12.8 3.5-16.8 1.1-3.9 3.3-9.8 4.9-12.9 1.6-3.2 4.5-7.8 6.5-10.3 1.9-2.5 6.1-6.6 9.3-9.3 3.2-2.6 9.2-6.5 13.3-8.6 4.1-2.1 9.3-4.4 11.5-5.1 2.2-0.7 4.3-1.5 4.7-1.9 0.4-0.3-1.3-3.1-3.8-6.1-2.5-3-6.1-8.4-8.2-12-2-3.6-4.7-9.9-6-14-1.8-5.6-2.5-10-2.6-17 0-5.2 0.2-11.7 0.5-14.5l0.6-5-49.2-48.5zm117.6 8.2c-4 1.1-9.8 3.1-13 4.3-3.2 1.3-8.4 4.1-11.6 6.3l-5.8 3.9 6.7 6.5c7.5-3.7 9.9-4 24.2-4 13.2 0 17 0.4 20.4 1.8 2.3 0.9 4.5 2.5 5 3.5 0.6 1.2 2 1.7 4.9 1.7 2.8 0 4.2-0.5 4.8-1.7 0.5-1 2.5-2.6 4.5-3.5 3.1-1.5 6.6-1.8 21.7-1.8 9.9 0 19.1 0.5 20.5 1 1.3 0.6 3.1 2 4 3.3 1.1 1.6 1.5 4.8 1.5 11.7 0 7.9-0.4 10.3-2.3 14-1.2 2.4-3.4 5.3-4.7 6.3-1.4 1-4.3 2.2-6.5 2.7-2.2 0.6-7.9 1-12.5 1-4.7 0-10.3-0.4-12.5-1-2.2-0.5-5.2-1.8-6.5-2.8-1.4-1-3.6-3.6-4.8-5.8-1.2-2.1-2.6-6-3-8.6-0.7-4.6-0.9-4.8-4-4.8-3.2 0-3.3 0.2-4.4 5.8-0.6 3.1-1.7 6.9-2.4 8.2-0.7 1.4-2.5 3.7-4.1 5.2-1.6 1.4-4 2.9-5.3 3.3-2.4 0.7-1 2.2 20.5 23.6 12.6 12.6 23.3 22.9 23.7 22.9 0.4 0 4.4-3.5 8.9-7.7 4.5-4.3 10-10.5 12.2-13.8 2.2-3.3 5.5-9.1 7.3-13 1.8-3.8 4.5-11 5.9-16 1.5-4.9 2.9-12.8 3.2-17.5 0.5-6.5 0.2-9.5-1-13-1-2.6-3.5-6.2-5.9-8.5-2.4-2.3-7.7-5.8-11.8-7.8-4.2-2-10.9-4.5-15-5.5-4.2-1.1-11.6-2.5-16.5-3.1-5-0.6-12.6-1-17-0.9-4.4 0-11.2 0.5-15 1-3.9 0.5-10.3 1.8-14.3 2.8zm-13.7 29.2c-0.5 0.9 2 4.1 8.1 10.1 7.5 7.4 9.4 8.7 12.1 8.7 1.8 0 4.2-0.4 5.3-1 1.1-0.5 2.8-2.9 3.9-5.2 1.1-2.4 2-5.8 2-7.8 0.1-1.9-0.6-4.4-1.3-5.5-1.3-1.8-2.8-2-13.3-2.2-6.5-0.1-12.8 0.2-13.9 0.7-1.2 0.5-2.5 1.5-2.9 2.2zm58.5 1.1c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.6 1.7 3.9 2.6 8.3 3.1 3.3 0.4 8.2 0.5 11 0.1 2.7-0.4 5.7-1.1 6.7-1.7 1-0.5 2.4-2.4 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.5-2.2-2.1-2.3-15.3-2.2-7.6 0.1-14.3 0.3-14.9 0.6-0.7 0.2-1.7 1.9-2.3 3.6zm-71.9 38c1.7 3.4 5 8.9 7.4 12.2 2.3 3.3 6.9 8.5 10.1 11.6 3.2 3.1 7.9 6.8 10.4 8.2 2.4 1.4 6.5 3.3 9 4.2 2.4 0.8 4.5 1.4 4.7 1.3 0.1-0.2-9.9-10.4-22.3-22.8-12.3-12.3-22.5-22.1-22.5-21.7 0.1 0.4 1.5 3.5 3.2 7z"/><path id="Path 1" class="s1" d="m243 105.6c-3 0.8-8.7 2.9-12.5 4.8-3.8 1.8-10.4 6-14.5 9.2-4.1 3.3-10.2 9.1-13.5 12.9-3.4 3.9-8.4 10.4-11.1 14.5-2.8 4.1-6.5 10.2-8.2 13.5l-3.1 6 14.8 15c9-6.2 15.4-9.4 20.1-11.1 4.7-1.8 12-3.9 16.2-4.8 4.3-0.9 12.4-1.9 18-2.2 6.2-0.4 14.5-0.2 20.8 0.6 5.8 0.6 13.9 2.1 18 3.1 4.1 1.1 10.9 3.6 15 5.6 4.1 2 9.4 5.5 11.8 7.7 2.5 2.4 5 6 5.9 8.6 1.3 3.4 1.5 6.5 1.1 13-0.4 4.7-1.8 12.6-3.2 17.5-1.5 4.9-4.2 12.2-6 16-1.8 3.9-5 9.7-7.3 13-2.2 3.3-8 9.7-12.9 14.3l-8.9 8.3c76.3 76.3 98.8 98 99.2 97.6 0.4-0.5 1-5.7 1.2-11.5 0.2-6.2-0.4-15.7-1.3-22.7-0.9-6.6-2.3-14.9-3.2-18.5-0.9-3.6-3.5-10.6-5.9-15.5-3-6.4-5.9-10.7-10.1-15-3.3-3.3-7.9-7.4-10.4-9.2-2.5-1.7-7.6-4.7-11.5-6.6-3.9-2-8.5-4-10.3-4.4-1.8-0.4-3.2-1.1-3.2-1.5 0-0.5 2.1-3.2 4.6-6 2.6-2.9 6.3-8.2 8.4-11.8 2.1-3.6 4.8-9.6 5.9-13.5 1.5-4.7 2.1-9.7 2.1-15.2 0-4.6-0.7-11.8-1.6-16-0.9-4.3-3.1-12.1-5.1-17.3-1.9-5.2-6-14.2-9-20-3-5.8-7.9-13.9-10.8-18-2.9-4.1-8.8-11.3-13.1-15.9-4.4-4.6-10.2-10.1-12.9-12.1-2.8-2.1-8.1-5.3-12-7.3-3.9-1.9-9.7-4.2-13-5.1-3.3-0.9-9.8-1.5-14.5-1.5-4.7 0-11 0.7-14 1.5zm-78.7 93.9c-0.4 2.2-0.8 8.7-0.7 14.5 0.1 8.3 0.6 12.1 2.5 18 1.4 4.1 4.1 10.4 6.1 14 2.1 3.6 5.7 9 8.2 12 2.5 3 4.2 5.8 3.8 6.1-0.4 0.4-2.5 1.2-4.7 1.9-2.2 0.7-7.4 3-11.5 5.1-4.1 2.1-10.1 6-13.3 8.6-3.2 2.7-7.4 6.8-9.3 9.3-2 2.5-4.9 7.1-6.5 10.3-1.6 3.1-3.8 9-4.9 13-1.2 3.9-2.7 11.5-3.5 16.7-0.8 5.2-1.5 15.4-1.5 22.5 0 7.1 0.5 14.8 1 17 0.7 3.2 2.7 5.8 10.2 13 5.1 5 13.1 11.6 17.8 14.7 4.7 3.1 11.4 7.2 15 9.2 3.6 1.9 11 5.3 16.5 7.5 5.5 2.1 14.7 5.1 20.5 6.6 5.8 1.4 15 3.3 20.5 4.1 5.5 0.9 16.8 1.6 25 1.6 8.3 0 19.1-0.5 24-1.1 4.9-0.7 13.7-2.3 19.5-3.7 5.8-1.4 15.2-4.3 21-6.5 5.8-2.2 14.1-6 18.5-8.6 4.4-2.5 10.8-6.7 14.2-9.2 3.5-2.5 6.3-4.9 6.3-5.3 0-0.5-26.5-27-58.8-59-54.3-53.8-59.2-58.4-63.8-59.8-2.7-0.8-7.4-3-10.4-4.8-3-1.8-7.9-5.7-10.8-8.5-3-2.9-7.3-7.9-9.7-11.2-2.4-3.3-6.4-10.3-8.9-15.5-4.2-8.7-5.6-10.6-18-23l-13.5-13.5z"/><path id="Path 2" fill-rule="evenodd" class="s2" d="m225.8 184c13.2 0 17 0.3 20.3 1.8 2.3 0.9 4.6 2.5 5 3.5 0.6 1.2 2.1 1.7 4.9 1.7 2.8 0 4.3-0.5 4.9-1.8 0.4-0.9 2.5-2.5 4.5-3.5 3-1.4 6.5-1.7 21.6-1.7 9.9 0 19.1 0.4 20.5 1 1.4 0.6 3.2 2 4 3.3 1.2 1.6 1.6 4.8 1.6 11.7-0.1 7.9-0.4 10.3-2.3 13.9-1.3 2.5-3.4 5.3-4.8 6.3-1.4 1-4.3 2.3-6.5 2.8-2.2 0.5-7.8 1-12.5 1-4.7 0-10.3-0.5-12.5-1-2.2-0.5-5.1-1.8-6.5-2.8-1.4-1-3.5-3.6-4.7-5.8-1.3-2.1-2.6-6-3-8.7-0.8-4.5-0.9-4.7-4.1-4.7-3.1 0-3.2 0.2-4.3 5.8-0.6 3.1-1.7 6.8-2.4 8.2-0.7 1.4-2.6 3.7-4.2 5.2-1.5 1.5-3.9 3-5.3 3.3-2 0.6-3.3 0-6.8-3.1-2.4-2.2-4.3-4.2-4.2-4.6 0-0.5 1.3-0.8 3-0.8 1.6 0 3.9-0.4 5-1 1.1-0.6 2.9-2.9 4-5.2 1.1-2.4 2-5.9 2-7.8 0-1.9-0.6-4.4-1.4-5.5-1.3-1.8-2.6-2-14.4-2-11.6 0-13.2 0.2-17.1 4l-4-4.5c-2.1-2.5-3.7-4.8-3.5-5.2 0.2-0.5 1.9-1.5 3.6-2.3 2.5-1 7.5-1.4 19.5-1.5zm44.3 13.3c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.7 1.7 3.9 2.5 8.3 3.1 3.3 0.4 8.2 0.4 11 0 2.7-0.3 5.8-1.1 6.7-1.6 1-0.5 2.5-2.5 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.4-2.2-2.1-2.3-15.3-2.2-7.5 0-14.2 0.3-14.9 0.5-0.6 0.3-1.7 2-2.3 3.7zm-40 126.7c0.3-0.1 2.2 2 8 9l-23.5 22.7 22.4 23.8-7.8 8-16.1-15.5c-8.8-8.5-16.2-15.8-16.3-16.2-0.1-0.3 7.3-7.6 16.3-16.2 9.1-8.6 16.7-15.6 17-15.6zm33.5 0l4 0.1c2.2 0.1 5 0.4 6.1 0.7 2.1 0.7 1.8 1.7-19.4 62.7l-5.3-0.3c-3-0.2-5.6-0.5-5.9-0.7-0.3-0.2 4.2-14.4 10-31.4zm20.7 3.9l2.7 1.9c1.4 1.1 8.2 7.3 27.6 26l-15.5 15.6c-8.5 8.6-16 15.6-16.7 15.6-0.7 0-2.9-2-8.3-8.5l23.2-22-6.8-6.7c-3.8-3.7-8.1-7.6-9.6-8.8-1.5-1.1-2.8-2.5-2.9-3.1 0-0.6 1.4-3.1 3.1-5.5z"/></g></svg>',mr=`data:image/svg+xml,${encodeURIComponent(Rp)}`;import{jsx as Io,jsxs as gr}from"react/jsx-runtime";function Oh(){let e=Fp();return Dp(()=>{e.isValid},[e.isValid]),e.isValid?null:gr("a",{href:"https://donotdev.com/pricing",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",insetInlineEnd:"20px",top:"50%",transform:"translateY(-50%)",zIndex:9999,display:"flex",alignItems:"center",gap:"12px",padding:"12px 16px",backgroundColor:"rgba(255, 255, 255, 0.95)",border:"2px solid rgba(242, 61, 41, 0.3)",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",textDecoration:"none",transition:"all 0.2s ease",cursor:"pointer",opacity:.9},onMouseEnter:t=>{t.currentTarget.style.opacity="1",t.currentTarget.style.transform="translateY(-50%) scale(1.05)"},onMouseLeave:t=>{t.currentTarget.style.opacity="0.9",t.currentTarget.style.transform="translateY(-50%) scale(1)"},children:[Io("img",{src:mr,alt:"DoNotDev Logo",style:{width:"48px",height:"48px",flexShrink:0}}),gr("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[Io("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"13px",fontWeight:"600",color:"#27494a",lineHeight:"1.2"},children:"DoNotDev"}),Io("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"11px",fontWeight:"500",color:"#f23d29",lineHeight:"1.2"},children:"Get License"})]})]})}fe();import{useEffect as Bp,useState as Ao,useMemo as Mp}from"react";import{Stack as Eo,Spinner as Op}from"@donotdev/components";import{useTranslation as fr,isFieldVisible as zp}from"@donotdev/core";import{useCrud as Vp,DisplayFieldRenderer as Up}from"@donotdev/crud";import{jsx as ke,jsxs as Gp}from"react/jsx-runtime";function _p({entity:e,id:t,t:o,className:n="",loadingMessage:r,notFoundMessage:a,viewerRole:i,excludeFields:l}){let c=A("userRole"),d=i??c,{get:s,loading:p,data:g,error:u,isAvailable:m}=Vp(e),[y,h]=Ao(!1),[f,k]=Ao(null),[C,x]=Ao(null),{t:N}=fr([e.namespace,"crud"]),{t:L}=fr("crud"),S=o||N;Bp(()=>{if(!t){x(null),k(null),h(!1);return}if(!m||!s)return;let T=!1;return h(!0),k(null),s(t).then(R=>{T||(h(!1),R?(x(R),k(null)):(x(null),k(new Error("Entity not found"))))}).catch(R=>{T||(h(!1),k(R instanceof Error?R:new Error(String(R))),x(null))}),()=>{T=!0}},[t,s,m]);let P=g||C,b=u||f,v=p||y||!t,w=Mp(()=>P?Object.entries(e.fields).filter(([T,R])=>{if(l?.includes(T)||!zp(R.visibility,d)||R.visibility==="hidden")return!1;let D=P[T];return!(D==null||typeof D=="string"&&D.trim()===""||Array.isArray(D)&&D.length===0||typeof D=="object"&&!Array.isArray(D)&&D!==null&&Object.keys(D).length===0)}):[],[e.fields,d,P,l]);return v?ke("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},className:n,children:ke(Op,{overlay:!0,"aria-label":r||L("form.loading",{defaultValue:"Loading..."})})}):b||!P?ke(Eo,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},className:n,children:Gp(Eo,{direction:"column",gap:"tight",children:[ke("h3",{style:{color:"var(--muted-foreground)"},children:a||L("errors.notFound",{defaultValue:`${e.name} not found`})}),b&&ke("p",{style:{color:"var(--destructive)",fontSize:"var(--font-size-sm)"},children:b instanceof Error?b.message:String(b)})]})}):ke(Eo,{direction:"column",className:n,children:w.map(([T,R])=>ke(Up,{name:T,config:R,value:P[T],t:S},T))})}import{RefreshCw as Hp,Plus as Wp,Trash2 as $p,Edit as Kp,Search as Yp}from"lucide-react";import{useMemo as qp,useCallback as Xe,useState as Lo}from"react";import{DataTable as Zp,Button as Po,Stack as Ro,ActionButton as jp,Section as vr,Input as Jp}from"@donotdev/components";import{useTranslation as hr}from"@donotdev/core";import{translateFieldLabel as Qp,useCrud as Xp,useCrudList as eu,EntityFilters as tu,formatValue as ou,useReferenceResolver as nu}from"@donotdev/crud";import{Fragment as au,jsx as ie,jsxs as At}from"react/jsx-runtime";function ru({entity:e,basePath:t,onClick:o,hideFilters:n=!1,pagination:r="client",pageSize:a,queryOptions:i,exportable:l=!0}){let c=De(),d=t??`/${e.collection}`,s=nu(e),[p,g]=Lo(1),[u,m]=Lo(a),[y,h]=Lo(""),{data:f,items:k,processed:C,loading:x,mutate:N}=eu(e,{pagination:r,searchQuery:y,...i&&{queryOptions:i},...r==="server"&&{page:p,pageSize:u}}),{delete:L}=Xp(e),{t:S}=hr("crud"),{t:P}=hr([e.namespace,"crud"]),b=Xe(async()=>{await N()},[N]),v=Xe(H=>{c(`${d}/${H}`)},[d,c]),w=Xe(H=>{o?o(H):c(`${d}/${H}`)},[d,c,o]),T=Xe(()=>{c(`${d}/new`)},[d,c]),R=Xe(async H=>{await L(H)},[L]),D=qp(()=>{let Oe=(e.listFields||Object.keys(e.fields)).map(te=>{let Z=e.fields[te];if(!Z)return null;let ze=Qp(te,Z,P),Te=Z.type||"text";return{key:te,title:ze,dataIndex:te,sortable:!0,filterable:!0,align:Te==="number"||Te==="range"?"end":"start",render:(Mt,et)=>ou(Mt,Z,P,{compact:!0,referenceData:s})}}).filter(Boolean);return Oe.unshift({key:"_actions",title:S("actions.label",{defaultValue:"Actions"}),dataIndex:void 0,sortable:!1,width:120,align:"center",render:(te,Z)=>At(Ro,{direction:"row",gap:"tight",align:"center",justify:"center",children:[ie(Po,{variant:"outline",icon:Kp,onClick:ze=>{ze.stopPropagation(),v(Z.id)},"aria-label":S("edit",{defaultValue:"Edit"})}),ie(jp,{action:async()=>{await R(Z.id)},confirmText:S("delete.confirm",{defaultValue:"Are you sure you want to delete this item?"}),confirmTitle:S("delete.title",{defaultValue:"Delete Item"}),loadingText:S("delete.loading",{defaultValue:"Deleting..."}),variant:"destructive",icon:$p,"aria-label":S("delete",{defaultValue:"Delete"}),children:S("delete",{defaultValue:"Delete"})})]})}),Oe},[e,P,S,v,R]),we=P("name",{defaultValue:e.name}),J=C.length;return At(au,{children:[ie(vr,{title:S("filters.title",{entity:we,defaultValue:`Browse ${we} - Filters`}),collapsible:!0,defaultOpen:!0,children:At(Ro,{children:[At(Ro,{direction:"row",gap:"tight",align:"center",className:"dndev-w-full",style:{display:"grid",gridTemplateColumns:"1fr auto auto"},children:[ie(Jp,{placeholder:S("search.placeholder",{defaultValue:"Search..."}),value:y,onChange:H=>h(H.target.value),icon:Yp,className:"dndev-w-full"}),ie(Po,{icon:Hp,variant:"outline",onClick:b,disabled:x,display:"compact","aria-label":S("refresh",{defaultValue:"Refresh"})}),ie(Po,{icon:Wp,onClick:T,display:"compact",children:S("addNew",{defaultValue:"Add New"})})]}),!n&&ie(tu,{entity:e,data:k,fieldsToFilter:e.listFields})]})}),ie(vr,{title:x?S("results.title.fetching",{defaultValue:"Fetching..."}):S("results.title.count",{count:J,defaultValue:J===1?"Found 1 occurrence":`Found ${J} occurrences`}),collapsible:!0,defaultOpen:!0,children:ie(Zp,{data:C,columns:D,sortable:!0,searchable:!1,pagination:!0,loading:x,onRowClick:H=>w(H.id),showingLabel:S("pagination.showing",{defaultValue:"Showing {{from}} to {{to}} of {{total}} entries"}),paginationPreviousLabel:S("pagination.previous",{defaultValue:"Previous"}),paginationNextLabel:S("pagination.next",{defaultValue:"Next"}),paginationItemsPerPagePlaceholder:S("pagination.itemsPerPagePlaceholder",{defaultValue:"Items per page"}),...a&&{pageSize:a},...r==="server"&&{currentPage:p,pageSize:u,total:f?.total,onPageChange:g,onPageSizeChange:m},exportable:l,exportFilename:`${e.collection}-export`,exportLabel:S("export",{defaultValue:"Export"})})})]})}import{useMemo as br,useCallback as su}from"react";import{Heart as Sr}from"lucide-react";import{Card as lu,Grid as cu,Stack as Do,Text as Cr,Spinner as du,Section as xr,Button as pu}from"@donotdev/components";import{useTranslation as kr,getListCardFieldNames as uu}from"@donotdev/core";import{useCrudCardList as mu,EntityFilters as gu,useEntityFavorites as fu,useCrudFilters as vu}from"@donotdev/crud";import{CrudCard as iu}from"@donotdev/crud";import{jsx as yr}from"react/jsx-runtime";function Et({detailHref:e,onClick:t,...o}){let n=yr(iu,{...o,onClick:e?void 0:t});return e?yr(I,{path:e,"aria-label":o.item?.id?`View ${o.item.id}`:void 0,children:n}):n}import{Fragment as yu,jsx as K,jsxs as Fo}from"react/jsx-runtime";function hu({entity:e,basePath:t,onClick:o,cols:n=[1,2,3,4],staleTime:r=1e3*60*30,filter:a,hideFilters:i=!1,resultLabel:l,tone:c}){let d=De(),s=t??`/${e.collection}`,{items:p,processed:g,loading:u}=mu(e,{staleTime:r}),{isFavorite:m,toggleFavorite:y,favoritesFilter:h}=fu({collection:e.collection}),{showFavoritesOnly:f,setShowFavoritesOnly:k}=vu({collection:e.collection}),C=br(()=>{let b=g;return f&&(b=b.filter(h)),a&&(b=b.filter(a)),b},[g,f,h,a]),{t:x}=kr([e.namespace,"crud"]),{t:N}=kr("crud"),L=su(b=>{o?o(b):d(`${s}/${b}`)},[s,d,o]),S=br(()=>uu(e),[e]),P=x("name",{defaultValue:e.name});return Fo(yu,{children:[!i&&K(xr,{title:N("filters.title",{entity:P,defaultValue:`Browse ${P} - Filters`}),collapsible:!0,defaultOpen:!0,tone:c,children:K(lu,{children:Fo(Do,{direction:"column",children:[K(pu,{variant:f?"primary":"outline",icon:K(Sr,{size:18}),onClick:()=>k(!f),children:f?N("favorites.showAll",{defaultValue:"Show All"}):N("favorites.showFavorites",{defaultValue:"Show Favorites"})}),K(gu,{entity:e,data:p,fieldsToFilter:S})]})})}),K(xr,{title:u?N("results.title.fetching",{defaultValue:"Fetching..."}):l?l(C.length):N("results.title.count",{count:C.length,defaultValue:C.length===1?"Found 1 occurrence":`Found ${C.length} occurrences`}),collapsible:!0,defaultOpen:!0,tone:c,children:u?K(Do,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)"},children:K(du,{})}):C.length===0?Fo(Do,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[K(Cr,{level:"h3",style:{color:"var(--muted-foreground)"},children:N("emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),K(Cr,{style:{color:"var(--muted-foreground)"},children:N("emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):K(cu,{cols:n,children:C.map(b=>{let v=m(b.id),w=o?void 0:`${s}/${b.id}`;return K(Et,{item:b,entity:e,detailHref:w,onClick:o?()=>L(b.id):void 0,renderActions:K(Sr,{fill:v?"#ef4444":"#ffffff",stroke:v?"#ef4444":"var(--muted-foreground)",onClick:T=>{T.preventDefault(),T.stopPropagation(),y(b.id)},style:{cursor:"pointer",width:"var(--icon-md)",height:"var(--icon-md)",transition:"fill 0.2s, stroke 0.2s"},"aria-label":v?N("favorites.remove",{defaultValue:"Remove from favorites"}):N("favorites.add",{defaultValue:"Add to favorites"})})},b.id)})})})]})}import{useEffect as wr,useId as bu,useMemo as Lt,useState as Su}from"react";import{FormProvider as Cu}from"react-hook-form";import{Badge as xu,Button as Pt,DropdownMenu as ku,Grid as wu,Stack as Tu,Spinner as Nu}from"@donotdev/components";import{hasRoleAccess as Iu,useTranslation as Tr}from"@donotdev/core";fe();import{DisplayFieldRenderer as Au,FormFieldRenderer as Eu,UploadProvider as Lu,useEntityForm as Pu,useUnsavedChangesWarning as Ru,useFormStore as Du,useFieldConditions as Fu}from"@donotdev/crud";import{jsx as q,jsxs as Rt}from"react/jsx-runtime";function Bo({entity:e,onSubmit:t,t:o,className:n="",submitText:r,loading:a=!1,defaultValues:i,submitVariant:l="primary",secondaryButtonText:c,secondaryButtonVariant:d="outline",onSecondarySubmit:s,viewerRole:p,operation:g=i?"edit":"create",formId:u,cancelText:m,cancelPath:y,successPath:h,onCancel:f,warnOnUnsavedChanges:k=!0,unsavedChangesMessage:C,hideVisibilityInfo:x=!1}){let N=De(),L=A("userRole"),S=p??L,P=bu(),b=u??`entity-form-${e.name}-${P}`,{t:v}=Tr([e.namespace,"crud"]),{t:w}=Tr("crud"),T=o||v,D=!x&&(S==="admin"||S==="super"),we=S==="user"||S==="admin"||S==="super",[J,H]=Su(S==="admin"||S==="super"||S==="user"?S:"guest"),Oe={guest:"muted",user:"secondary",admin:"warning",super:"destructive",technical:"accent",owner:"secondary"},te=["guest","user","admin","super"],Z={guest:"Guest",user:"User",admin:"Admin",super:"Super",technical:"System"},ze=Lt(()=>te.filter(E=>Iu(S,E)).map(E=>({label:Z[E],checked:J===E,onClick:()=>H(E)})),[J,S]),Te=Pu(e,{formId:b,operation:g,defaultValues:i,viewerRole:S,t:T}),{control:Bt,handleSubmit:Mo,formState:{errors:Mt},fields:et,formStatus:tt,uploadProgress:Ve,cleanup:Oo,isDirty:Pr,hasUserInteracted:Rr,resetForm:Dr}=Te,Ot=Pr&&Rr,zo=Lt(()=>{if(!we)return et;let E=te.indexOf(J);return et.filter(({config:O})=>{let oe=O.visibility;return oe==="hidden"?!1:oe==="technical"?!0:te.indexOf(oe)<=E})},[et,we,J]),Fr=Fu(zo,Bt);wr(()=>{b&&Du.getState().setIsDirty(b,Ot)},[b,Ot]),wr(()=>Oo,[Oo]);let Br=Lt(()=>C||w("messages.unsavedChangesLeave",{defaultValue:"You have unsaved changes. Are you sure you want to leave?"}),[C,w]);Ru({isDirty:Ot,enabled:k,message:Br});let Mr=()=>{Dr(),f?f():N(y||"back")},Or=async E=>{try{await t(E),N(h||"back")}catch{}},zr=m!==null,Vo=m??w("form.cancel",{defaultValue:"Cancel"}),Uo={gridColumn:"1 / -1",position:"sticky",bottom:0,backgroundColor:"var(--background)",borderTop:"1px solid var(--border)",paddingTop:"var(--gap-md)",paddingBottom:"var(--gap-md)",zIndex:10,marginTop:"var(--gap-lg)"},Vr=a||g==="edit"&&!i,se=Lt(()=>tt==="uploading"?{loading:!0,loadingText:Ve<100?w("form.uploading",{progress:Math.round(Ve),defaultValue:`Uploading ${Math.round(Ve)}%...`}):w("form.processing",{defaultValue:"Processing..."}),progress:Ve}:tt==="validating"?{loading:!0,loadingText:w("form.validating",{defaultValue:"Validating..."})}:tt==="submitting"?{loading:!0,loadingText:w("form.saving",{defaultValue:"Saving..."})}:{loading:!1},[tt,Ve,w]);return q(Cu,{...Te,children:q(Lu,{formId:b,children:Rt("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},children:[Vr&&q(Nu,{overlay:!0}),Rt("form",{onSubmit:Mo(Or),noValidate:!0,className:n,style:{width:"100%",gridColumn:"1 / -1",display:"contents"},children:[zo.map(({name:E,config:O,editable:oe})=>{let Y=Fr[E];if(Y&&!Y.visible)return null;let _o=Y?{...O,...Y.required&&O.validation?{validation:{...O.validation,required:!0}}:Y.required?{validation:{required:!0}}:{}}:O,Ur=oe&&!Y?.disabled&&!Y?.readonly,_r=D&&O.visibility!=="guest",Gr=O.visibility!=="hidden"?Oe[O.visibility]:void 0,Hr=Z[O.visibility]??O.visibility,Go=Ur?q(Eu,{name:E,config:_o,control:Bt,errors:Mt,t:T},E):q(Au,{name:E,config:_o,value:i?.[E],t:T},E);return _r?Rt("div",{style:{position:"relative"},children:[q(xu,{as:"span",variant:Gr,style:{position:"absolute",top:0,insetInlineEnd:0,fontSize:"var(--font-size-xs)",zIndex:1},children:Hr}),Go]},E):Go}),(()=>{let E=[];if(zr&&Vo&&E.push(q(Pt,{type:"button",onClick:Mr,disabled:se.loading,variant:"outline",className:"dndev-w-full",children:Vo},"cancel")),we){let Y=Oe[J]||"muted";E.push(q(ku,{trigger:Rt(Pt,{type:"button",variant:Y,disabled:se.loading,className:"dndev-w-full",children:[w("visibility.preview",{defaultValue:"Preview"}),": ",Z[J]]}),items:ze},"preview"))}c&&E.push(q(Pt,{type:"button",onClick:()=>{if(s){let Y=Te.getValues();s(Y)}},loading:se.loading,loadingText:se.loadingText,progress:se.progress,variant:d,className:"dndev-w-full",children:c},"secondary")),E.push(q(Pt,{type:"submit",loading:se.loading,loadingText:se.loadingText,progress:se.progress,variant:l,className:"dndev-w-full",children:r||w("form.submit",{defaultValue:"Submit"})},"submit"));let O=E.length;if(O===1)return q(Tu,{direction:"column",gap:"tight",style:Uo,children:E[0]});let oe=O===2?"1fr 2fr":O===3?"1fr 1fr 2fr":"1fr 1fr 1fr 2fr";return q(wu,{cols:["1fr",oe,oe,oe],gap:"tight",style:Uo,children:E})})()]})]})})})}import{Section as Bu}from"@donotdev/components";import{useCrudCardList as Mu}from"@donotdev/crud";import{jsx as Nr}from"react/jsx-runtime";function Ou({entity:e,queryOptions:t,title:o,basePath:n,cols:r=3,className:a}){let{items:i,loading:l}=Mu(e,{queryOptions:t});if(!l&&i.length===0)return null;let c=n??`/${e.collection}`;return Nr(Bu,{title:o,gridCols:r,className:a,children:i.map(d=>Nr(Et,{item:d,entity:e,detailHref:`${c}/${d.id}`},d.id))})}import{Button as zu,Stack as Vu,Stepper as Uu}from"@donotdev/components";import{useTranslation as _u}from"@donotdev/core";import{useEntityWorkflow as Gu}from"@donotdev/crud";import{Fragment as Wu,jsx as Dt,jsxs as $u}from"react/jsx-runtime";function Hu({workflow:e,onComplete:t,onStepChange:o,defaultValues:n,viewerRole:r,children:a,className:i}){let{t:l}=_u("crud"),c=Gu(e,{onComplete:t,onStepChange:o,defaultValues:n});if(a)return Dt(Wu,{children:a(c)});let{currentStep:d,currentStepIndex:s,visibleSteps:p,isFirst:g,isLast:u,isSubmitting:m,stepData:y}=c,h=p.map((f,k)=>({number:k+1,title:f.title,content:null}));return $u(Vu,{className:i,gap:"large",children:[Dt(Uu,{steps:h,activeStep:s,showStepNumbers:!0,onStepChange:f=>{f<=s&&c.goToStep(f)}}),d.custom?d.custom(c.allData):d.entity?Dt(Bo,{entity:d.entity,operation:"create",viewerRole:r,defaultValues:{...y[d.id],...!u&&{status:"draft"}},onSubmit:async f=>{await c.goNext(f)},submitText:u?l("workflow.submit",{defaultValue:"Submit"}):l("workflow.next",{defaultValue:"Next"}),cancelText:g?null:l("workflow.previous",{defaultValue:"Previous"}),onCancel:g?void 0:c.goPrevious,loading:m,warnOnUnsavedChanges:!1,hideVisibilityInfo:!0}):null,d.allowSkip&&!u&&Dt(zu,{variant:"ghost",onClick:c.skipStep,className:"dndev-w-full",children:l("workflow.skip",{defaultValue:"Skip this step"})})]})}import{createContext as Ar,useId as Ku,use as Ir}from"react";import{Controller as Yu,FormProvider as qu,useFormContext as Zu}from"react-hook-form";import{Label as ju,Slot as Ju,cn as Qu,Stack as Xu}from"@donotdev/components";import{jsx as ge}from"react/jsx-runtime";var O3=qu,Er=Ar({}),z3=({...e})=>ge(Er.Provider,{value:{name:e.name},children:ge(Yu,{...e})}),Lr=Ar({}),V3=({className:e,...t})=>{let o=Ku();return ge(Lr.Provider,{value:{id:o},children:ge(Xu,{className:e,...t})})},Ft=()=>{let e=Ir(Er);if(!e||!e.name)return null;let t=Ir(Lr);if(!t)return null;let{getFieldState:o,formState:n}=Zu(),r=o(e.name,n),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},U3=({className:e,...t})=>{let o=Ft();if(!o)return null;let{error:n,formItemId:r}=o;return ge(ju,{className:Qu(n&&"text-destructive",e),htmlFor:r,...t})},_3=({...e})=>{let t=Ft();if(!t)return null;let{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=t;return ge(Ju,{id:n,"aria-describedby":o?`${r} ${a}`:`${r}`,"aria-invalid":!!o,...e})},G3=({className:e,...t})=>{let o=Ft();if(!o)return null;let{formDescriptionId:n}=o;return ge("p",{id:n,className:e,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},...t})},H3=({className:e,children:t,...o})=>{let n=Ft();if(!n)return null;let{error:r,formMessageId:a}=n,i=r?String(r?.message):t;return i?ge("p",{id:a,className:e,style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:"var(--destructive)"},...o,children:i}):null};var em={layoutContainer:"dndev-layout",sidebar:"sidebar",sidebarTop:"sidebar-top",sidebarContent:"sidebar-content",sidebarBottom:"sidebar-bottom",sidebarResizeHandle:"dndev-sidebar-resize-handle",header:"header",main:"main",footer:"footer",container:"dndev-container",pageContainer:"dndev-container",breadcrumbsContainer:"breadcrumbs-container"},tm={zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zOverlay:"dndev-z-overlay",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},e5={...em,...tm},t5={headerHeight:"--header-height",headerPadding:"--header-padding",headerIconSize:"--header-icon-size",headerLogoMaxHeight:"--header-logo-max-height",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",mainPadding:"--main-padding",mainMaxWidth:"--main-max-width",contentWidth:"--content-width",contentPadding:"--content-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zOverlay:"--z-overlay",zModal:"--z-modal",zTooltip:"--z-tooltip",zToast:"--z-toast"},o5={headerHeight:"--header-height",headerPadding:"--header-padding",logoSize:"--logo-size",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",layoutGap:"--layout-gap",sectionGap:"--gap-lg",contentGap:"--content-gap",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zModal:"--z-modal",zTooltip:"--z-tooltip"};export{Oc as AppBranding,Uc as AppIcon,cl as AppLoading,Hc as AppTitle,G as AssetResolver,Ta as AuthGuard,k1 as AuthGuardFallback,io as AuthHeader,ro as AuthMenu,td as Breadcrumbs,yo as CacheSettings,o0 as ConsentBanner,hn as DnDevNavigationMenu,Cd as DropdownNavigation,hu as EntityCardList,_p as EntityDisplayRenderer,Bo as EntityFormRenderer,ru as EntityList,Ou as EntityRecommendations,Hu as EntityWorkflow,nc as FeatureCard,yl as FeatureDisabled,Td as FloatingLanguageSwitcher,No as FooterBranding,xp as FooterCopyright,Lp as FooterLegalLinks,O3 as Form,_3 as FormControl,G3 as FormDescription,z3 as FormField,V3 as FormItem,U3 as FormLabel,H3 as FormMessage,s0 as GameContainer,p0 as GameFlow,ad as GameTitle,E1 as GoTo,Wi as GoToInput,Bi as GoToWrapper,Pd as HeaderMenu,zd as HeaderNavigation,Yr as Icon,Oh as LicenseWatermark,I as Link,rt as Loader,Pl as LoadingContainerOverlay,St as LoadingMessage,xl as LoadingMessageAlmostDone,kl as LoadingMessageComplete,Il as LoadingMessageConnecting,Cl as LoadingMessageProcessing,wl as LoadingMessageSaving,Nl as LoadingMessageSearching,Sl as LoadingMessageSimple,Tl as LoadingMessageUploading,Rl as LoadingOverlay,Bl as LoadingScreen,yn as NotFoundPage,Zd as Notifications,pt as PageContainer,ql as ProgressBar,$l as RedirectOverlay,sp as SettingsMenu,Jl as Skeleton,wc as TechBento,gp as ThemeToggle,e5 as allLayoutClasses,$m as createAuthConfig,o5 as cssVariables,km as isAuthAvailable,sf as isBillingAvailable,ef as isFormStoreAvailable,ff as isOAuthAvailable,em as layoutClasses,tm as layoutUtilities,t5 as layoutVariables,Jg as resolveFaviconSet,jg as resolveLogo,Be as sanitizeSvg,Sf as tList,mo as techLogos,A as useAuthSafe,Hm as useAuthState,vt as useAuthVisibility,Og as useBack,pf as useBillingVisibility,Um as useCanAccess,Na as useCanNavigate,Ft as useFormField,cs as useFormStoreSafe,sn as useGoTo,Gm as useHasRole,Ug as useLocation,Wg as useMatch,De as useNavigate,W as useNavigationItems,rn as useNavigationRoute,gf as useOAuthSafe,_g as useParams,Vg as usePrefetch,$g as useQueryParams,Kg as useRedirectGuard,zg as useRefresh,Gg as useRouteParam,Hg as useSearchParams,oo as useStripeBillingSafe,_m as useUserRole,Wm as withAuth};
3
+ `);try{await navigator.clipboard.writeText(v),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},m=()=>{try{t()}catch{typeof window<"u"&&window.location.reload()}},y=()=>{try{l()}catch{typeof window<"u"&&window.history.back()}};return U("div",{className:"dndev-container","data-variant":"standard","data-centered":"true",children:U(en,{variant:tn.DEFAULT,elevated:!0,className:"dndev-w-full",style:{maxWidth:"65ch",margin:"0 auto"},children:ye(Le,{gap:"large",align:"center",className:"dndev-text-center",children:[U(Le,{align:"center",justify:"center",style:{width:"5rem",height:"5rem",backgroundColor:"rgba(220, 38, 38, 0.1)",borderRadius:"50%",border:"1px solid var(--destructive)"},children:U(Ea,{style:{width:"2.5rem",height:"2.5rem",color:"var(--destructive)"},"aria-hidden":"true"})}),ye(Le,{children:[U("h1",{className:"dndev-text-base","data-level":"h1",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-bold)",margin:0},children:r("routeError.title","Something went wrong")}),U("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:r("routeError.description","We encountered an error while loading this page.")}),U(Oa,{variant:za.INFO,hideIcon:!0,children:U("div",{style:{fontSize:"var(--font-size-sm)",textAlign:"center"},children:r("routeError.dataSafe","Don't worry, your data is safe.")})})]}),n&&ye("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-full)",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",color:"var(--foreground)"},children:[r("routeError.errorId","Error ID"),": ",n]}),g&&s&&ye(en,{variant:tn.MUTED,className:"dndev-w-full",children:[ye(Le,{direction:"row",align:"center",justify:"between",children:[U("span",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-semibold)",color:"var(--destructive)"},children:"Error Message:"}),U(dt,{variant:pt.GHOST,icon:a?Fa:Da,onClick:u,disabled:a,children:a?r("routeError.copied","Copied"):r("routeError.copyDetails","Copy Details")})]}),U("pre",{style:{fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",wordBreak:"break-word",whiteSpace:"pre-wrap",color:"var(--foreground)",margin:0,marginTop:"var(--gap-sm)"},children:s})]}),ye(Le,{className:"dndev-w-full",children:[U(dt,{variant:pt.DESTRUCTIVE,icon:Ra,onClick:m,fullWidth:!0,children:r("routeError.tryAgain","Try Again")}),ye(Le,{direction:"row",justify:"center",children:[U(I,{path:"/",children:U(dt,{variant:pt.DEFAULT,icon:La,fullWidth:!0,children:r("routeError.goHome","Go Home")})}),U(dt,{variant:pt.OUTLINE,icon:Pa,onClick:y,fullWidth:!0,children:r("routeError.goBack","Go Back")})]})]}),U("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",margin:0},children:r("routeError.contactSupport","If the problem persists, please contact support.")})]})})})},on=Ha;import{jsx as Ke}from"react/jsx-runtime";var ut=({variant:e="standard",density:t,className:o,children:n,centered:r=!0,gapFirst:a=!1})=>Ke(Xo,{level:"route",fallback:i=>Ke(Wa,{fallback:Ke("div",{children:"Loading error fallback..."}),children:Ke(on,{...i})}),children:Ke("div",{className:$a("dndev-container",o),"data-variant":e,"data-density":t,"data-centered":r?"true":"false","data-gap-first":a?"true":void 0,children:n})});import{Fragment as ri,jsx as F,jsxs as Ye}from"react/jsx-runtime";var ni=Za(()=>import("@donotdev/auth").then(e=>({default:e.MultipleAuthProviders})));function k1({title:e,description:t,showBackButton:o=!0,onBack:n,className:r=""}){let{t:a}=ei(["auth","common"]),i=ti(),l=oi(),c=()=>{n?n():l()};return F(ut,{variant:"docs",children:F(Pe,{align:"center",justify:"center",className:Xa("dndev-min-h-60",r),style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:F(ja,{className:"dndev-w-full",style:{maxWidth:"28rem",border:"none",boxShadow:"var(--shadow-xl)"},title:Ye(Pe,{children:[F(Pe,{justify:"center",children:F("div",{style:{borderRadius:"9999px",backgroundColor:"color-mix(in oklab, var(--primary) 10%, transparent)",padding:"var(--gap-md)"},children:F(Ya,{className:"dndev-size-touch",style:{color:"var(--primary)"}})})}),F("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700},children:a("auth.fallback.title","Authentication Required")}),F("p",{style:{color:"var(--muted-foreground)"},children:a("auth.fallback.description","Please sign in to access this page")})]}),children:Ye(Pe,{children:[Ye(Pe,{gap:"large",children:[F("div",{children:F("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:a("auth.fallback.chooseProvider")})}),F(qa,{fallback:F("div",{children:"Loading providers..."}),children:F(ni,{layout:"vertical",spacing:"tight",fullWidth:!0,ariaLabel:a("auth.fallback.authOptions")})})]}),o&&Ye(ri,{children:[F(Qa,{}),F("div",{children:F(Ja,{onClick:c,className:"dndev-gap-sm",icon:Ka,children:a("common.back")})})]}),Ye(Pe,{gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:[F("p",{children:a("auth.fallback.secure")}),F("p",{children:a("auth.fallback.terms")})]})]})})})})}import{Search as ai}from"lucide-react";import{Button as ii,BUTTON_VARIANT as si,DISPLAY as li}from"@donotdev/components";import{useOverlayStore as ci,useTranslation as di}from"@donotdev/core";import{jsx as pi,jsxs as ui}from"react/jsx-runtime";var E1=({display:e=li.AUTO,className:t,onOpen:o})=>{let{t:n}=di("dndev"),r=ci(c=>c.openCommandDialog),i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgentData?.platform??navigator.platform)?"\u2318K":"Ctrl+K",l=()=>{r(),o?.()};return ui(ii,{variant:si.OUTLINE,display:e,icon:ai,onClick:l,className:t,"aria-label":n("goTo.ariaLabel","Go to page"),children:[n("goTo.label","Go to"),pi("kbd",{style:{marginInlineStart:"var(--gap-sm)",padding:"0.125rem 0.375rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",opacity:.5},children:i})]})};import{Suspense as Ei,lazy as Li}from"react";import{useEventListener as Pi,useOverlayStore as Ri}from"@donotdev/core";import{jsx as pn}from"react/jsx-runtime";var Di=Li(()=>Promise.resolve().then(()=>(dn(),cn))),Fi=()=>{let e=Ri(t=>t.openCommandDialog);return Pi("keydown",t=>{if((t.metaKey||t.ctrlKey)&&t.key==="k"){let o=t.target;if(o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable)return;t.preventDefault(),e()}},{target:document,options:{passive:!1,capture:!1}}),pn(Ei,{fallback:null,children:pn(Di,{})})},Bi=Fi;import{Search as Mi}from"lucide-react";import{useCallback as un,useEffect as Oi,useState as zi,useRef as Vi}from"react";import{Stack as Ui}from"@donotdev/components";import{useOverlayStore as qt}from"@donotdev/core";import{useTranslation as _i}from"@donotdev/core";import{jsx as gt,jsxs as $i}from"react/jsx-runtime";var Gi=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),Hi=()=>{let{t:e}=_i("dndev"),[t,o]=zi(""),n=Vi(null),r=qt(l=>l.isCommandDialogOpen);Oi(()=>{r||o("")},[r]);let a=un(()=>{qt.getState().openCommandDialog(t)},[t]),i=un(l=>{l.key==="Enter"&&(l.preventDefault(),qt.getState().openCommandDialog(t))},[t]);return $i(Ui,{direction:"row",align:"center",className:"dndev-relative dndev-w-full dndev-max-w-sm",role:"search",children:[gt(Mi,{className:"dndev-absolute dndev-size-md",style:{insetInlineStart:"0.75rem",opacity:.5},"aria-hidden":"true"}),gt("input",{ref:n,type:"text",value:t,onChange:l=>o(l.target.value),onFocus:a,onKeyDown:i,placeholder:e("globalGoTo.searchPlaceholder","Search pages..."),className:"dndev-input dndev-w-full",style:{paddingInlineStart:"2.5rem",paddingInlineEnd:"5rem"},"aria-label":e("globalGoTo.ariaLabel","Search navigation")}),gt("div",{className:"dndev-absolute dndev-flex dndev-items-center dndev-text-sm",style:{insetInlineEnd:"0.75rem",gap:"0.25rem",opacity:.5},"aria-hidden":"true",children:gt("kbd",{style:{padding:"0.25rem 0.5rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",borderRadius:"var(--radius-sm)"},children:Gi?"\u2318K":"Ctrl+K"})})]})},Wi=Hi;import{MoreHorizontal as Ki,Link as mn}from"lucide-react";import{useState as Yi,useEffect as gn,useRef as qi,useMemo as Zi}from"react";import{NavigationMenu as fn,NavigationMenuListPrimitive as ji,NavigationMenuItemPrimitive as vn,Button as Ji,DropdownMenu as Qi,cn as ft,DISPLAY as Xi}from"@donotdev/components";import{useTranslation as es}from"@donotdev/core";be();le();import{jsx as Z,jsxs as Zt}from"react/jsx-runtime";var hn=({routes:e,vertical:t=!1,display:o=Xi.AUTO,overflowDetection:n=!1,showIcons:r=!0,className:a,style:i})=>{let{t:l}=es("dndev"),c=W(),d=e??c,s=qi(null),[p,g]=Yi(d.length),u=Zi(()=>d.map(m=>({label:m.label,path:m.path,icon:Z(z,{icon:m.icon,fallback:mn}),children:m.children?m.children.map(y=>({label:y.label,path:y.path,icon:Z(z,{icon:y.icon,fallback:mn})})):void 0})),[d]);if(gn(()=>{if(!n||d.length===0||t)return;let m=()=>{let v=s.current;if(!v)return;let f=v.getBoundingClientRect(),x=v.querySelectorAll("[data-nav-item]"),S=v.querySelector("[data-more-button]"),C=0,N=S?.offsetWidth||0;for(let P=0;P<x.length;P++){let A=x[P];if(!A)break;if(A.getBoundingClientRect().right-f.left+(P===x.length-1&&S?N:0)<=f.width)C=P+1;else break}g(Math.max(0,C))},y=new ResizeObserver(m);return s.current&&y.observe(s.current),setTimeout(m,0),()=>y.disconnect()},[n,d.length,t]),gn(()=>{n&&!t&&g(d.length)},[d.length,n,t]),d.length===0)return null;if(n&&!t){let m=Math.min(p,u.length),y=u.slice(0,m),v=u.slice(m);return Z(fn,{className:ft(a),style:i||{flex:1},children:Zt(ji,{ref:s,"data-vertical":"false",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",flexWrap:"nowrap",overflow:"hidden"},children:[y.filter(f=>f.path).map((f,x)=>Z(vn,{"data-nav-item":!0,children:Zt(I,{path:f.path,className:ft("dndev-interactive"),"data-role":"nav-trigger",children:[r&&f.icon,Z("span",{className:"dndev-interactive-label",children:f.label})]})},f.path||x)),v.length>0&&Z(vn,{"data-more-button":!0,children:Z(Qi,{trigger:Z(Ji,{className:"dndev-size-touch",style:{flexShrink:0},"aria-label":l("navigation.more","More"),children:Z(Ki,{className:"dndev-size-md"})}),items:v.filter(f=>f.path).map(f=>({label:f.label,children:Zt(I,{path:f.path,className:ft("dndev-interactive"),"data-role":"menu-item",children:[r&&f.icon,Z("span",{className:"dndev-interactive-label",children:f.label})]}),asChild:!0})),contentWidth:"14rem",contentAlign:"end"})})]})})}return Z(fn,{items:u,vertical:t,display:o,className:ft(a,t&&"dndev-sidebar-nav-menu"),LinkComponent:I})};import{Home as ts,ArrowLeft as os,Link as ns}from"lucide-react";import{useMemo as rs}from"react";import{Button as jt,BUTTON_VARIANT as Jt,Stack as Ze,Text as Qt}from"@donotdev/components";import{useTranslation as as}from"@donotdev/core";import{useLocation as is,useNavigate as ss}from"@donotdev/ui/routing/hooks";be();le();import{jsx as $,jsxs as vt}from"react/jsx-runtime";function yn(){let{t:e}=as("dndev"),t=is(),o=ss(),n=W(),r=rs(()=>n.filter(i=>!i.path.includes(":")&&i.path!=="/").slice(0,4),[n]),a=()=>{o("back")};return $(ut,{variant:"docs",centered:!0,children:vt(Ze,{gap:"large",align:"center",justify:"center",children:[vt(Ze,{align:"center",children:[$(Qt,{level:"h1",style:{fontSize:"clamp(4rem, 12vw, 8rem)",fontWeight:"var(--font-weight-bold)",lineHeight:1,letterSpacing:"-0.02em",background:"linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",margin:0},children:"404"}),$(Qt,{level:"h2",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)",margin:0},children:e("errors.notFound.title","Page Not Found")}),$(Qt,{style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",textAlign:"center",margin:0},children:e("errors.notFound.description","The page you're looking for doesn't exist or has been moved.")}),t.pathname&&$("code",{style:{padding:"var(--gap-sm) var(--gap-md)",background:"var(--muted)",borderRadius:"var(--radius-md)",fontSize:"var(--font-size-sm)",fontFamily:"var(--font-mono)",color:"var(--foreground)",wordBreak:"break-all",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",border:"1px solid var(--border-hairline)"},children:t.pathname})]}),r.length>0&&vt(Ze,{align:"center",children:[$("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-semibold)",margin:0,color:"var(--muted-foreground)"},children:e("errors.notFound.suggestions","You might be looking for:")}),$(Ze,{direction:"row",wrap:"wrap",justify:"center",gap:"tight",children:r.map(i=>$(I,{path:i.path,replace:!0,children:$(jt,{variant:Jt.OUTLINE,icon:$(z,{icon:i.icon,fallback:ns}),"aria-label":e("errors.notFound.navigateTo",`Navigate to ${i.label}`,{label:i.label}),children:i.label})},i.path))})]}),vt(Ze,{direction:"row",wrap:"wrap",justify:"center",children:[$(I,{path:"/",replace:!0,children:$(jt,{variant:Jt.DEFAULT,icon:ts,"aria-label":e("errors.notFound.goHome","Go to home page"),children:e("errors.notFound.goHome","Go Home")})}),$(jt,{variant:Jt.OUTLINE,icon:os,onClick:a,"aria-label":e("errors.notFound.goBack","Go back to previous page"),children:e("errors.notFound.goBack","Go Back")})]})]})})}be();Kt();import{useNavigate as De,useBack as Og,useRefresh as zg,usePrefetch as Vg,useLocation as Ug,useParams as _g,useRouteParam as Gg,useSearchParams as Hg,useMatch as Wg,useQueryParams as $g,useRedirectGuard as Kg}from"@donotdev/ui/routing/hooks";import{getDndevConfig as Xt,isClient as Se,isDev as bn}from"@donotdev/core";var H=class{static getBrowserSupport(){if(!Se())return{svg:!0,webp:!1,avif:!1};let t=this.cache.get("browser-support");if(t)return t;let o={svg:!0,webp:!1,avif:!1};try{let n=document.createElement("canvas");n.width=1,n.height=1,o.webp=n.toDataURL("image/webp").indexOf("data:image/webp")===0}catch{o.webp=!1}try{let n=document.createElement("canvas");n.width=1,n.height=1,o.avif=n.toDataURL("image/avif").indexOf("data:image/avif")===0}catch{o.avif=!1}return this.cache.set("browser-support",o),o}static extractStringValues(t){let o=[];if(t==null)return o;if(typeof t=="string")o.push(t);else if(Array.isArray(t))for(let n of t)o.push(...this.extractStringValues(n));else if(typeof t=="object")for(let n of Object.values(t))o.push(...this.extractStringValues(n));return o}static assetExists(t){if(!Se())return!1;let o=this.getAssetManifest();return o?this.extractStringValues(o).includes(t):!1}static getAssetManifest(){return Se()&&Xt()?.assets?.mapping||null}static getLogoSvgContent(){return Xt()?.assets?.logoSvgContent||null}static resolveLogo(t){if(t)return t;let o="logo";if(this.cache.has(o))return this.cache.get(o);let r=this.getAssetManifest()?.logo?.optimal||"/logo.svg";return this.cache.set(o,r),r}static directAssetCheck(t){if(!Se())return!1;try{let o=new Image;return o.src=t,!0}catch{return!1}}static resolveFaviconSet(){let t="favicon-set";if(this.cache.has(t))return this.cache.get(t);let o=this.getAssetManifest();if(o?.favicon?.set){let a=o.favicon.set,i=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",l={svg:a.svg||"/favicon.svg",ico:a.ico||"/favicon.ico",png16:a.png16||i,png32:a.png32||i,apple180:a.apple180||i,android192:a.android192||i,android512:a.android512||i};return this.cache.set(t,l),l}let n=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",r={svg:this.assetExists("/favicon.svg")?"/favicon.svg":"/logo.svg",ico:this.assetExists("/favicon.ico")?"/favicon.ico":"/favicon.svg",png16:this.assetExists("/favicon-16x16.png")?"/favicon-16x16.png":n,png32:this.assetExists("/favicon-32x32.png")?"/favicon-32x32.png":n,apple180:this.assetExists("/apple-touch-icon.png")?"/apple-touch-icon.png":n,android192:this.assetExists("/icon-192x192.png")?"/icon-192x192.png":n,android512:this.assetExists("/icon-512x512.png")?"/icon-512x512.png":n};return this.cache.set(t,r),r}static resolveFavicon(){let t=this.getAssetManifest();if(t?.favicon?.optimal)return t.favicon.optimal;let o=["/favicon.svg","/favicon.ico","/favicon.png","/logo.svg"];for(let n of o)if(this.assetExists(n))return n;return"/favicon.svg"}static clearCache(){this.cache.clear(),bn()&&Se()}static getDebugInfo(){return{browserSupport:this.getBrowserSupport(),detectedAssets:Se()?Xt()?.assets?.mapping:null,assetManifest:this.getAssetManifest(),cache:Object.fromEntries(this.cache)}}};nt(H,"cache",new Map);function jg(e){return H.resolveLogo(e)}function Jg(){return H.resolveFaviconSet()}bn()&&(H.clearCache(),Se()&&window.addEventListener("DOMContentLoaded",()=>{H.clearCache()}));import*as ls from"@donotdev/crud";var Sn={forms:{},startSubmit:()=>{},setUploading:()=>{},setValidating:()=>{},setSubmitting:()=>{},setSuccess:()=>{},setError:()=>{},reset:()=>{},cleanup:()=>{},setIsDirty:(e,t)=>{},hasDirtyForms:()=>!1,getDirtyFormIds:()=>[],getStatus:()=>"idle",isLoading:()=>!1,getUploadProgress:()=>0,getError:()=>null,getIsDirty:()=>!1},Fe=ls?.useFormStore,ef=typeof Fe=="function";function cs(e){return Fe?Fe(e):e(Sn)}cs.getState=()=>Fe&&typeof Fe.getState=="function"?Fe.getState():Sn;ve();import{useMemo as ds}from"react";function ht(){let e=E("status"),t=E("isAvailable"),o=E("user");return ds(()=>({shouldHide:e!=="ready"||!t,isLoading:e==="initializing",isReady:e==="ready"&&t,isAuthenticated:!!o}),[e,t,o])}import*as ps from"@donotdev/billing";import{DEGRADED_BILLING_API as us}from"@donotdev/core";var eo=ps?.useStripeBilling;function ms(e){return us[e]}function to(e,t){return eo?eo(e,t):ms(e)}var sf=typeof eo=="function";ve();function pf(){let e=E("user"),t=E("status"),o={user:e,status:t},n=to("status",o),r=to("isAvailable",o);return{shouldHide:!r,isLoading:n==="initializing",isReady:r&&n==="ready"}}import{DEGRADED_OAUTH_API as gs}from"@donotdev/core";import*as fs from"@donotdev/oauth";var oo=fs?.useOAuth;function vs(e){return gs[e]}function gf(e){return oo?oo(e):vs(e)}var ff=typeof oo=="function";import{CheckCircle as hs}from"lucide-react";import{List as ys}from"@donotdev/components";import{translateArray as bs}from"@donotdev/core";import{jsx as Cn}from"react/jsx-runtime";var Ss=hs,Cs=16;function Sf(e,t,o,n=Ss,r=Cs){let a=n;return Cn(ys,{icon:a?Cn(a,{size:r}):void 0,items:bs(e,t,o),style:{listStyle:"none",paddingInlineStart:0}})}var xs=/<script[\s\S]*?<\/script>/gi,ks=/<foreignObject[\s\S]*?<\/foreignObject>/gi,ws=/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,Ts=/\s+(?:xlink:)?href\s*=\s*["']\s*javascript:[^"']*["']/gi,Ns=/\s+(?:xlink:)?href\s*=\s*["']\s*data:(?!image\/(?:png|jpe?g|gif|webp|svg\+xml))[^"']*["']/gi;function Be(e){return e.replace(xs,"").replace(ks,"").replace(ws,"").replace(Ts,"").replace(Ns,"")}import{Fragment as Ys,jsx as pe,jsxs as qs}from"react/jsx-runtime";var wn=()=>null,$s=kn(async()=>{try{return{default:(await import("@donotdev/auth")).ReauthDialog}}catch{return{default:wn}}}),Ks=kn(async()=>{try{return{default:(await import("@donotdev/auth")).ConfirmDeleteDialog}}catch{return{default:wn}}}),Tn=()=>{let[e]=yt.useState(!1),[t]=yt.useState(!1),[o]=yt.useState(!1),[n]=yt.useState(null);return{showConfirmDialog:e,showPasswordDialog:t,isDeleting:o,error:n,startDeleteFlow:()=>{},confirmDelete:async()=>{},cancel:()=>{}}};Gs()&&import("@donotdev/auth").then(e=>{Tn=e.useDeleteAccount}).catch(e=>{});var bt=e=>{if(!e)return je;if(typeof e=="function")return e;let t=e.replace(/['"]/g,""),o=Ps[t];return o||je},no=({loginPath:e,display:t=zs.AUTO,"no-tooltip":o=!1,customItems:n=[],className:r,style:a})=>{let{t:i}=Vs("dndev"),{shouldHide:l,isReady:c,isAuthenticated:d}=ht(),s=_s(),p=E("user"),g=E("signOut"),u=Hs("isLaptop"),m=W(),y=Ws(),v=s.profilePath,f=s.authMenuItems||[],x=p?.role,S=Tn(),C=()=>p&&(p.displayName||p.email?.split("@")[0])||"User",N=()=>C().split(" ").map(h=>h.charAt(0)).slice(0,2).join("").toUpperCase(),P=()=>{if(!p)return i("auth.userMenu",{defaultValue:"User menu"});let b=[C()];return p.email&&b.push(p.email),x&&x!=="guest"&&b.push(`Role: ${x}`),b.join(`
4
+ `)},A=Rs(()=>{let b=[];return!u&&p&&b.push({children:pe(Os,{variant:"muted",as:"span",children:`${C()}${p.email?`
5
+ ${p.email}`:""}`}),disabled:!0}),v&&b.push({label:i("auth.profile",{defaultValue:"Profile"}),icon:Is,onClick:()=>y(v)}),f.forEach(h=>{let k=m.find(R=>R.path===h.path),T=h.label||k?.label||h.path.split("/").pop()||"Menu",D=h.icon?bt(h.icon):k?.icon&&(typeof k.icon=="string"||typeof k.icon=="function")?bt(k.icon):je;b.push({label:T,icon:D,onClick:()=>y(h.path)})}),n.forEach(h=>{if(h.path){let k=m.find(R=>R.path===h.path),T=h.label||k?.label||h.path.split("/").pop()||"Menu",D=h.icon?bt(h.icon):je;b.push({label:T,icon:D,onClick:()=>y(h.path),disabled:h.disabled,style:h.style})}else if(h.onClick){let k=h.icon?bt(h.icon):je;b.push({label:h.label,icon:k,onClick:h.onClick,disabled:h.disabled,style:h.style})}}),b.push({label:i("auth.deleteAccount.label",{defaultValue:"Delete Account"}),icon:Ls,onClick:S.startDeleteFlow,variant:"destructive"}),b.push({label:i("auth.signOut",{defaultValue:"Sign Out"}),icon:As,onClick:()=>g(),variant:"destructive"}),b},[v,f,n,g,S,i,m,u,p,x,C,y]);return Us().length===0||l||!c||!d?null:qs(Ys,{children:[pe(xn,{fallback:null,children:pe($s,{open:S.showPasswordDialog,isLoading:S.isDeleting,error:S.error,onReauth:b=>S.confirmDelete(b),onCancel:S.cancel})}),pe(xn,{fallback:null,children:pe(Ks,{open:S.showConfirmDialog,isLoading:S.isDeleting,error:S.error,onConfirm:()=>S.confirmDelete(),onCancel:S.cancel})}),pe(Ms,{trigger:pe(Fs,{variant:Bs.OUTLINE,icon:p?pe(Ds,{src:p.photoURL??void 0,fallback:N(),alt:C(),style:{margin:"-4px 0"}}):Es,display:t,"aria-label":i("auth.userMenu",{defaultValue:"User menu"}),tooltip:!o&&u&&p?P():o?void 0:i("auth.userMenu",{defaultValue:"User menu"}),className:r,style:a,children:C()}),items:A,contentAlign:"end"})]})};import{jsx as M}from"react/jsx-runtime";var An=()=>null,al=In(async()=>{try{return{default:(await import("@donotdev/auth")).AuthPartnerButton}}catch{return{default:An}}}),Nn=In(async()=>{try{return{default:(await import("@donotdev/auth")).MultipleAuthProviders}}catch{return{default:An}}}),ao=({display:e=tl.AUTO,className:t,style:o})=>{let{t:n}=ol("dndev"),{shouldHide:r,isLoading:a,isReady:i,isAuthenticated:l}=ht(),c=nl(),d=rl(),[s,p]=js(!1),g=c.loginPath,u=n("auth.signIn",{defaultValue:"Sign In"}),m=n("auth.loading",{defaultValue:"Loading..."}),y=d.includes("password")||d.includes("emailLink");if(r||!i)return null;let v=({children:f,...x})=>M(Js,{variant:Qs.OUTLINE,icon:Zs,display:e,tooltip:u,className:t,style:o,...x,children:f??u});if(!l){if(g!==void 0)return M(I,{path:g,prefetch:!0,children:M(v,{})});let f=d[0];return y?M(el,{trigger:M(v,{}),title:u,open:s,onOpenChange:p,"data-content-size":"form",children:M(ro,{fallback:M("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m}),children:M(Nn,{spacing:"medium",onSuccess:()=>p(!1)})})}):d.length>1?M(Xs,{trigger:M(v,{}),children:M(ro,{fallback:M("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m}),children:M(Nn,{spacing:"tight"})})}):M(ro,{fallback:M(v,{disabled:a,tooltip:a?m:u,children:a?m:u}),children:M(al,{partnerId:f,display:e,className:t,style:o})})}return M(no,{display:e,loginPath:g,className:t,style:o})};import{RefreshCw as il}from"lucide-react";import{cn as sl}from"@donotdev/components";import{jsx as En,jsxs as dl}from"react/jsx-runtime";var ll=({className:e})=>dl("div",{className:sl("dndev-loading-overlay",e),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--background)",opacity:"var(--opacity-muted)",backdropFilter:"blur(4px)",zIndex:50},role:"status","aria-busy":"true","aria-label":"Loading",children:[En(il,{className:"dndev-size-touch",style:{color:"var(--primary)",animation:"spin 1s linear infinite"}}),En("span",{className:"dndev-sr-only",children:"Loading..."})]}),cl=ll;import{AlertCircle as pl,RefreshCw as ul,Mail as ml,Cookie as gl}from"lucide-react";import{Card as fl,Button as io,BUTTON_VARIANT as so,Stack as Ln}from"@donotdev/components";import{useTranslation as vl}from"@donotdev/core";import{jsx as Je,jsxs as St}from"react/jsx-runtime";function hl({featureName:e,title:t,description:o,showReviewCookies:n=!1,showContactSupport:r=!0,showRetry:a=!1,supportEmail:i="support@example.com",onRetry:l,onReviewCookies:c,customActions:d,className:s=""}){let{t:p}=vl("ui"),g=o||p("featureDisabled.description","{featureName} is not available. This may be due to missing configuration or disabled features.",{featureName:e}),u=()=>{if(c)c();else{let y=new CustomEvent("openCookieConsent");window.dispatchEvent(y)}},m=()=>{window.location.href=`mailto:${i}?subject=${encodeURIComponent(`Feature Unavailable: ${e}`)}&body=${encodeURIComponent(`I'm experiencing an issue with ${e} not being available.`)}`};return St(fl,{className:s,title:St(Ln,{direction:"row",align:"center",gap:"tight",children:[Je(pl,{className:"dndev-size-md",style:{color:"var(--destructive)"}}),t||e]}),subtitle:g,children:[" ",St("div",{style:{display:"grid",gap:"var(--gap-md)"},children:[(n||r||a||d)&&St(Ln,{direction:"row",wrap:"wrap",gap:"tight",children:[n&&Je(io,{variant:so.OUTLINE,onClick:u,icon:gl,children:p("featureDisabled.reviewCookies","Review Cookies")}),r&&Je(io,{variant:so.OUTLINE,onClick:m,icon:ml,children:p("featureDisabled.contactSupport","Contact Support")}),a&&Je(io,{variant:so.OUTLINE,onClick:l,icon:ul,children:p("featureDisabled.retry","Retry")}),d]}),Je("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:p("featureDisabled.helpText","If you believe this is an error, please contact support or try refreshing the page.")})]})]})}var yl=hl;le();import{cn as bl}from"@donotdev/components";import{jsx as j,jsxs as Al}from"react/jsx-runtime";var ne=({state:e="loading",message:t,show:o=!0,className:n,showSpinner:r=!1,spinnerSize:a="md"})=>{if(!o)return null;let l=t||(d=>({initial:"Preparing...",loading:"Loading...",processing:"Processing your request...","almost-done":"Almost there...",complete:"Complete!"})[d]||"Loading...")(e),c={sm:{width:"0.75rem",height:"0.75rem"},md:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}};return Al("div",{className:bl(n),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"var(--gap-sm)",color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",transition:"opacity var(--dur-fast) ease-out"},role:"status","aria-live":"polite","aria-label":l,children:[r&&j("div",{style:{...c[a],animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid currentColor",borderTopColor:"transparent"},role:"status","aria-hidden":"true"}),j("span",{style:{fontWeight:500},children:l})]})},Sl=({message:e="Loading...",...t})=>j(ne,{state:"loading",message:e,...t}),Cl=({message:e="Processing your request...",...t})=>j(ne,{state:"processing",message:e,...t}),xl=({message:e="Almost there...",...t})=>j(ne,{state:"almost-done",message:e,...t}),kl=({message:e="Complete!",...t})=>j(ne,{state:"complete",message:e,...t}),wl=({showSpinner:e=!0,...t})=>j(ne,{state:"processing",message:"Saving your changes...",showSpinner:e,...t}),Tl=({showSpinner:e=!0,fileName:t,...o})=>j(ne,{state:"processing",message:t?`Uploading ${t}...`:"Uploading file...",showSpinner:e,...o}),Nl=({showSpinner:e=!0,query:t,...o})=>j(ne,{state:"processing",message:t?`Searching for "${t}"...`:"Searching...",showSpinner:e,...o}),Il=({showSpinner:e=!0,...t})=>j(ne,{state:"loading",message:"Connecting to server...",showSpinner:e,...t}),Ct=ne;import{cn as El}from"@donotdev/components";import{Fragment as Pn,jsx as ue,jsxs as Rn}from"react/jsx-runtime";var Ll=({show:e=!1,backdrop:t=!0,backdropBlur:o=!0,className:n,children:r,message:a,showSpinner:i=!0,spinnerSize:l="lg",preventClicks:c=!0,zIndex:d="var(--z-modal)"})=>{if(!e)return null;let s=d==="var(--z-modal)"||!d?"dndev-z-modal":d==="var(--z-toast)"?"dndev-z-toast":d==="var(--z-tooltip)"?"dndev-z-tooltip":d==="var(--z-overlay)"?"dndev-z-overlay":null;return ue("div",{className:El("dndev-loading-overlay",s,n),style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none",pointerEvents:c?"auto":"none",...s?{}:{zIndex:d}},role:"dialog","aria-modal":"true","aria-busy":"true","aria-label":"Loading overlay",children:ue("div",{className:"dndev-surface",style:{display:"grid",placeItems:"center",gap:"var(--gap-md)",borderRadius:"var(--radius-lg)",padding:"var(--gap-lg)",backgroundColor:"var(--background)",opacity:"var(--opacity-strong)",border:"1px solid var(--border)",boxShadow:"var(--shadow-xl)",maxWidth:"var(--content-text)",width:"100%",margin:"0 var(--gap-md)"},children:r||Rn(Pn,{children:[i&&ue("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:l==="sm"?"2rem":l==="md"?"3rem":"4rem",height:l==="sm"?"2rem":l==="md"?"3rem":"4rem"},role:"status","aria-hidden":"true"}),a&&ue(Ct,{...a})]})})})};var Pl=({show:e=!1,backdrop:t=!1,backdropBlur:o=!1,className:n,...r})=>ue("div",{className:n,style:{position:"absolute",inset:0,display:e?"flex":"none",alignItems:"center",justifyContent:"center",transition:"opacity var(--dur-fast) ease-out",backgroundColor:t?"var(--background)":"transparent",opacity:t?"var(--opacity-muted)":1,backdropFilter:o?"blur(4px)":"none"},role:"status","aria-busy":"true","aria-label":"Loading content",children:ue("div",{style:{display:"grid",placeItems:"center",gap:"var(--gap-sm)"},children:r.children||Rn(Pn,{children:[ue("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--primary)",borderTopColor:"transparent",width:"1.5rem",height:"1.5rem"},role:"status","aria-hidden":"true"}),r.message&&ue(Ct,{...r.message})]})})}),Rl=Ll;import{cn as Dl}from"@donotdev/components";import{jsx as Dn}from"react/jsx-runtime";var Fl=({variant:e="fullPage",className:t,isLoading:o})=>o===!1?null:Dn("div",{className:Dl(t),style:{display:"flex",alignItems:"center",justifyContent:"center",...e==="fullPage"&&{position:"fixed",inset:0,backgroundColor:"var(--background)",backdropFilter:"blur(4px)",zIndex:50}},role:"status","aria-busy":"true","aria-label":"Loading",children:Dn("div",{style:{animation:"spin 1s linear infinite",borderRadius:"var(--radius-full)",border:"2px solid var(--muted)",borderTopColor:"var(--primary)",...e==="fullPage"?{width:"5rem",height:"5rem"}:{width:"var(--icon-md)",height:"var(--icon-md)"}},role:"status","aria-busy":"true","aria-label":"Loading"})}),Bl=Fl;import{Lock as xt,Shield as Fn}from"lucide-react";import{useEffect as lo,useRef as Bn,useCallback as Ml}from"react";import{Portal as Ol,Spinner as zl,Stack as Vl,Text as Qe,Button as Ul}from"@donotdev/components";import{useTranslation as _l,useOverlay as re}from"@donotdev/core";import{jsx as J,jsxs as On}from"react/jsx-runtime";var Mn={connecting:0,preparing:2e3,redirecting:5e3},Gl=1e4;function Hl(e,t){return t==="none"?null:t==="shield"?Fn:t==="lock"?xt:e?e.startsWith("stripe-")||e.includes("payment")||e.includes("checkout")?xt:e.startsWith("oauth-")||e.startsWith("auth-")?Fn:xt:xt}function Wl(e){return e||"default"}function $l(){let{t:e}=_l("dndev"),t=re("isRedirectOverlayOpen"),o=re("redirectOperation"),n=re("redirectPhase"),r=re("showCancelButton"),a=re("redirectConfig"),i=re("redirectStartTime"),l=re("setRedirectPhase"),c=re("setShowCancelButton"),d=re("hideRedirectOverlay"),s=Bn([]),p=Bn(null),g=Ml(()=>{d()},[d]);if(lo(()=>{if(!t||!i)return;let C=a?.cancelTimeout??Gl,N=Date.now()-i;s.current.forEach(clearTimeout),s.current=[],p.current&&(clearTimeout(p.current),p.current=null);let P=(w,b)=>{let h=Math.max(0,b-N);if(h>0){let k=setTimeout(()=>{l(w)},h);s.current.push(k)}else l(w)};P("preparing",Mn.preparing),P("redirecting",Mn.redirecting);let A=Math.max(0,C-N);return p.current=setTimeout(()=>{c(!0),l("timeout")},A),()=>{s.current.forEach(clearTimeout),s.current=[],p.current&&(clearTimeout(p.current),p.current=null)}},[t,i,a?.cancelTimeout,l,c]),lo(()=>{if(!t)return;let C=()=>{d()};return window.addEventListener("popstate",C),()=>window.removeEventListener("popstate",C)},[t,d]),lo(()=>{if(!t)return;let C=()=>{};return document.addEventListener("visibilitychange",C),()=>document.removeEventListener("visibilitychange",C)},[t]),!t)return null;let u=Wl(o),m=a?.title??e(`redirectOverlay.${u}.title`,{defaultValue:e("redirectOverlay.default.title")}),y=a?.message??e(`redirectOverlay.${u}.message`,{defaultValue:e("redirectOverlay.default.message")}),v=a?.subtitle??e(`redirectOverlay.${u}.subtitle`,{defaultValue:e("redirectOverlay.default.subtitle")}),f=e(`redirectOverlay.${u}.ariaLabel`,{defaultValue:e("redirectOverlay.default.ariaLabel")}),x=e(`redirectOverlay.phases.${n}`),S=Hl(o,a?.icon);return J(Ol,{children:J("div",{className:"dndev-spinner-overlay",role:"status","aria-busy":"true","aria-label":f,style:{zIndex:"var(--z-overlay, 9999)"},children:On("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--gap-md)",textAlign:"center",maxWidth:"400px",padding:"var(--gap-lg)"},children:[On(Vl,{direction:"row",align:"center",children:[S&&J(S,{style:{width:"1.5rem",height:"1.5rem",color:"var(--primary)"},"aria-hidden":"true"}),J(zl,{variant:"primary"})]}),J(Qe,{as:"h3",style:{color:"var(--foreground)",margin:0},children:m}),J(Qe,{variant:"muted",style:{color:"var(--foreground)",minHeight:"1.5em"},children:x}),J(Qe,{variant:"muted",level:"small",style:{opacity:.8},children:y}),J(Qe,{variant:"muted",level:"small",style:{opacity:.6},children:v}),J(Qe,{variant:"muted",level:"small",style:{opacity:.5,marginTop:"var(--gap-sm)"},children:e("redirectOverlay.doNotRefresh")}),r&&J(Ul,{variant:"ghost",onClick:g,style:{marginTop:"var(--gap-md)"},children:e("redirectOverlay.cancel")})]})})})}import{useEffect as co,useState as zn}from"react";import{cn as Kl}from"@donotdev/components";import{jsx as Vn}from"react/jsx-runtime";var Yl=({isActive:e=!1,progress:t,useFakeProgress:o=!0,duration:n=2e3,className:r,show:a=!0})=>{let[i,l]=zn(0),[c,d]=zn(!1);co(()=>{if(!e||!o||t!==void 0)return;d(!0),l(0);let p=Date.now(),g=setInterval(()=>{let u=Date.now()-p,m=Math.min(u/n*90,90);l(m)},16);return()=>{clearInterval(g)}},[e,o,t,n]),co(()=>{t!==void 0&&d(t>0&&t<100)},[t]),co(()=>{if(!e){let p=setTimeout(()=>{d(!1),l(0)},300);return()=>clearTimeout(p)}},[e]);let s=t??i;return!a||!c?null:Vn("div",{className:Kl(r),style:{position:"fixed",insetInlineStart:0,insetInlineEnd:0,zIndex:9999,height:"4px",backgroundColor:"transparent",top:"var(--header-height, 0px)"},role:"progressbar","aria-valuenow":Math.round(s),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Page loading progress",children:Vn("div",{style:{height:"100%",width:`${s}%`,background:"linear-gradient(to right, var(--primary), color-mix(in srgb, var(--primary) 80%, transparent), color-mix(in srgb, var(--primary) 60%, transparent))",transition:e?"width 0.3s ease-out":"width 0.2s ease-in",boxShadow:"var(--shadow-sm)"}})})},ql=Yl;import{cn as kt,Stack as Zl}from"@donotdev/components";import{jsx as Xe,jsxs as A2}from"react/jsx-runtime";var jl=({variant:e="text",width:t,height:o,lines:n=1,show:r=!0,className:a,animation:i="pulse",style:l})=>{if(!r)return null;let c={backgroundColor:"var(--muted)",opacity:"var(--opacity-muted)",borderRadius:"var(--radius)",animation:i==="pulse"||i==="wave"?"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite":"none",...i==="wave"&&{background:"linear-gradient(to right, color-mix(in srgb, var(--muted) 50%, transparent), color-mix(in srgb, var(--muted) 30%, transparent), color-mix(in srgb, var(--muted) 50%, transparent))"}},d=()=>{let s={};return t&&(s.width=typeof t=="number"?`${t}px`:t),o&&(s.height=typeof o=="number"?`${o}px`:o),s};return e==="text"?Xe(Zl,{gap:"tight",children:Array.from({length:n}).map((s,p)=>Xe("div",{className:kt("dndev-skeleton",a),style:{...c,height:"var(--gap-md)",width:p===n-1?"75%":"100%",...d(),...l}},p))}):e==="circular"?Xe("div",{className:kt("dndev-skeleton",a),style:{...c,borderRadius:"var(--radius-full)",width:t||o||"40px",height:o||t||"40px",...d(),...l}}):e==="rectangular"?Xe("div",{className:kt("dndev-skeleton",a),style:{...c,width:t||"100%",height:o||"200px",...d(),...l}}):Xe("div",{className:kt("dndev-skeleton",a),style:{...c,borderRadius:"var(--radius-lg)",width:t||"100%",height:o||"20px",...d(),...l}})};var Jl=jl;import{Card as Ql,IconBox as Xl,Stack as ec,Text as po,renderCardContent as tc}from"@donotdev/components";import{jsx as Q,jsxs as Un}from"react/jsx-runtime";var oc=({icon:e,title:t,subtitle:o,content:n,href:r,variant:a,elevated:i,onClick:l,className:c,footer:d,style:s,clickable:p,...g})=>{let u=tc(n),v=`calc(var(--font-size-lg) * var(--line-height) * 2 + var(--gap-md)) calc(var(--font-size-base) * var(--line-height) * 2 + var(--gap-md)) 1fr${d?" auto":""}`,f={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"var(--line-height)"},x={...f,fontSize:"var(--font-size-lg)",fontWeight:600,color:"inherit",margin:0,textAlign:"start",flex:1,minWidth:0},S={...f,fontSize:"var(--font-size-base)",fontWeight:600,color:"var(--muted-foreground)",margin:0},C=e?Un(ec,{direction:"row",align:"center",style:{width:"100%"},children:[Q(Xl,{icon:e}),Q(po,{as:"div",level:"h3",style:x,children:t})]}):Q(po,{as:"div",level:"h3",style:x,children:t}),N=Q(Ql,{variant:a,elevated:i,onClick:l,className:c,"data-clickable":r||l||p?"true":void 0,style:{paddingInlineStart:"var(--gap-md)",paddingInlineEnd:"var(--gap-md)",gap:"var(--gap-md)",height:"100%",textAlign:"start",...s},...g,children:Un("div",{style:{display:"grid",gridTemplateRows:v,gap:"var(--gap-md)",width:"100%"},children:[Q("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:C}),Q("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start"},children:Q(po,{as:"div",level:"body",style:S,children:o})}),Q("div",{children:u}),d&&Q("div",{children:d})]})});return r&&!l?Q(I,{path:r,style:{display:"block",textDecoration:"none",height:"100%"},"aria-label":t?`Learn more about ${t}`:void 0,children:N}):N},nc=oc;import{useState as gc}from"react";import{Bento as fc,Card as vc,Section as hc,Stack as yc,Text as bc,TONE as Sc,cn as Cc}from"@donotdev/components";var rc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#3178C6" d="M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"/></svg>',ac='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#61DAFB" d="M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"/></svg>',ic='<svg role="img" viewBox="0 0 410 404" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="vite-a" x1="6" y1="33" x2="235" y2="344" gradientUnits="userSpaceOnUse"><stop stop-color="#41D1FF"/><stop offset="1" stop-color="#BD34FE"/></linearGradient><linearGradient id="vite-b" x1="195" y1="9" x2="236" y2="293" gradientUnits="userSpaceOnUse"><stop stop-color="#FFEA83"/><stop offset=".08" stop-color="#FFDD35"/><stop offset="1" stop-color="#FFA800"/></linearGradient></defs><path fill="url(#vite-a)" d="M399.641 59.525 215.643 388.545c-3.799 6.793-13.559 6.833-17.415.073L10.582 59.556c-4.201-7.366 2.098-16.29 10.446-14.797l184.195 32.923c1.175.21 2.378.208 3.553-.006l180.343-32.87c8.32-1.517 14.649 7.337 10.522 14.72z"/><path fill="url(#vite-b)" d="M292.965 1.574 156.801 28.255c-2.238.439-3.895 2.335-4.03 4.611l-8.376 141.465c-.197 3.332 2.863 5.918 6.115 5.168l37.91-8.749c3.547-.818 6.752 2.306 6.023 5.873l-11.263 55.153c-.758 3.712 2.727 6.886 6.352 5.785l23.415-7.114c3.63-1.102 7.118 2.081 6.35 5.796l-17.899 86.633c-1.12 5.42 6.088 8.374 9.094 3.728l2.008-3.103 110.954-221.428c1.858-3.707-1.346-7.935-5.418-7.15l-39.022 7.532c-3.667.707-6.787-2.708-5.752-6.296l25.469-88.291c1.036-3.594-2.095-6.612-5.764-5.891z"/></svg>',sc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"/></svg>',lc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#339933" d="M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"/></svg>',cc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#DD2C00" d="M19.455 8.369c-.538-.748-1.778-2.285-3.681-4.569-.826-.991-1.535-1.832-1.884-2.245a146 146 0 0 0-.488-.576l-.207-.245-.113-.133-.022-.032-.01-.005L12.57 0l-.609.488c-1.555 1.246-2.828 2.851-3.681 4.64-.523 1.064-.864 2.105-1.043 3.176-.047.241-.088.489-.121.738-.209-.017-.421-.028-.632-.033-.018-.001-.035-.002-.059-.003a7.46 7.46 0 0 0-2.28.274l-.317.089-.163.286c-.765 1.342-1.198 2.869-1.252 4.416-.07 2.01.477 3.954 1.583 5.625 1.082 1.633 2.61 2.882 4.42 3.611l.236.095.071.025.003-.001a9.59 9.59 0 0 0 2.941.568q.171.006.342.006c1.273 0 2.513-.249 3.69-.742l.008.004.313-.145a9.63 9.63 0 0 0 3.927-3.335c1.01-1.49 1.577-3.234 1.641-5.042.075-2.161-.643-4.304-2.133-6.371m-7.083 6.695c.328 1.244.264 2.44-.191 3.558-1.135-1.12-1.967-2.352-2.475-3.665-.543-1.404-.87-2.74-.974-3.975.48.157.922.366 1.315.622 1.132.737 1.914 1.902 2.325 3.461zm.207 6.022c.482.368.99.712 1.513 1.028-.771.21-1.565.302-2.369.273a8 8 0 0 1-.373-.022c.458-.394.869-.823 1.228-1.279zm1.347-6.431c-.516-1.957-1.527-3.437-3.002-4.398-.647-.421-1.385-.741-2.194-.95.011-.134.026-.268.043-.4.014-.113.03-.216.046-.313.133-.689.332-1.37.589-2.025.099-.25.206-.499.321-.74l.004-.008c.177-.358.376-.719.61-1.105l.092-.152-.003-.001c.544-.851 1.197-1.627 1.942-2.311l.288.341c.672.796 1.304 1.548 1.878 2.237 1.291 1.549 2.966 3.583 3.612 4.48 1.277 1.771 1.893 3.579 1.83 5.375-.049 1.395-.461 2.755-1.195 3.933-.694 1.116-1.661 2.05-2.8 2.708-.636-.318-1.559-.839-2.539-1.599.79-1.575.952-3.28.479-5.072zm-2.575 5.397c-.725.939-1.587 1.55-2.09 1.856-.081-.029-.163-.06-.243-.093l-.065-.026c-1.49-.616-2.747-1.656-3.635-3.01-.907-1.384-1.356-2.993-1.298-4.653.041-1.19.338-2.327.882-3.379.316-.07.638-.114.96-.131l.084-.002c.162-.003.324-.003.478 0 .227.011.454.035.677.07.073 1.513.445 3.145 1.105 4.852.637 1.644 1.694 3.162 3.144 4.515z"/></svg>',dc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="m12 1.608 12 20.784H0Z"/></svg>',pc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#635BFF" d="M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"/></svg>',uc='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><defs><linearGradient id="vb-a" x1="0.414" y1="0.255" x2="0" y2="0.932" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#eab308"/><stop offset="1" stop-color="#ca8a04"/></linearGradient><linearGradient id="vb-b" x1="0.338" y1="0.02" x2="0.664" y2="0.966" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#fde68a"/><stop offset="1" stop-color="#fbbf24"/></linearGradient><linearGradient id="vb-c" y1="0.5" x2="1" y2="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#7dd3fc"/><stop offset="1" stop-color="#0ea5e9"/></linearGradient></defs><g transform="translate(-2056 -1899)"><path d="M742.271,987.024c-66.706,0-119.121,54.673-121.874,126.408l-2.551,95.471c-3.967,78.653,71.961,105.52,126.936,105.52Z" transform="translate(1463.458 1004.277)" fill="url(#vb-a)"/><path d="M92.616.01H319.894c54.53-.8,95.624,40.1,98.381,93.335l6.144,135.76c.732,67.368-48.116,94.95-104.525,95.335L92.616,327.374C34.061,327.8-1.063,283.663.022,229.105l3.8-135.76C7.41,33.54,33.3,1.093,92.616.01Z" transform="translate(2118.42 1991.302)" fill="url(#vb-b)"/><path d="M86.844.009H299.958c51.132-.746,89.665,37.307,92.25,86.824l5.761,126.29c.686,62.669-45.117,88.326-98.011,88.685L86.844,304.537C31.938,304.933-1,263.875.02,213.123L3.58,86.834C6.948,31.2,31.222,1.016,86.844.009Z" transform="translate(2136.977 2001.737)" fill="#111827"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2421.148 2104.357)" fill="url(#vb-c)"/><circle cx="27.626" cy="27.626" r="27.626" transform="translate(2208.034 2104.357)" fill="url(#vb-c)"/></g></svg>',mc='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#FBF0DF" d="M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083a5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z"/></svg>',uo={bun:{svg:`data:image/svg+xml,${encodeURIComponent(mc)}`,color:"#FBF0DF",name:"Bun"},typescript:{svg:`data:image/svg+xml,${encodeURIComponent(rc)}`,color:"#3178C6",name:"TypeScript"},react:{svg:`data:image/svg+xml,${encodeURIComponent(ac)}`,color:"#61DAFB",name:"React"},vite:{svg:`data:image/svg+xml,${encodeURIComponent(ic)}`,color:"#BD34FE",name:"Vite"},nextjs:{svg:`data:image/svg+xml,${encodeURIComponent(sc)}`,color:"var(--foreground, #000000)",name:"Next.js"},nodejs:{svg:`data:image/svg+xml,${encodeURIComponent(lc)}`,color:"#339933",name:"Node.js"},firebase:{svg:`data:image/svg+xml,${encodeURIComponent(cc)}`,color:"#DD2C00",name:"Firebase"},vercel:{svg:`data:image/svg+xml,${encodeURIComponent(dc)}`,color:"var(--foreground, #000000)",name:"Vercel"},stripe:{svg:`data:image/svg+xml,${encodeURIComponent(pc)}`,color:"#635BFF",name:"Stripe"},valibot:{svg:`data:image/svg+xml,${encodeURIComponent(uc)}`,color:"#FBBF24",name:"Valibot"}};import{jsx as Ce,jsxs as Tc}from"react/jsx-runtime";function xc({techKey:e,variant:t}){let o=uo[e],[n,r]=gc(!1);if(!o)return null;let a=decodeURIComponent(o.svg.replace("data:image/svg+xml,","")),i=Be(a);return Ce(vc,{variant:t,className:"dndev-tech-card",style:{"--tech-color":o.color},"data-hover":n,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:Tc(yc,{direction:"column",align:"center",gap:"tight",children:[Ce("div",{className:"dndev-tech-card-logo","data-tech":e,dangerouslySetInnerHTML:{__html:i}}),Ce(bc,{as:"span",level:"small",children:o.name})]})})}function kc({title:e,techs:t,cols:o=3,columns:n,gap:r="medium",separator:a=!1,tone:i=Sc.GHOST,align:l,collapsible:c,open:d,onOpenChange:s,defaultOpen:p,className:g}){let u=n||(typeof o=="number"?{mobile:o,tablet:o,desktop:o,wide:o}:{mobile:o[0],tablet:o[1],desktop:o[2],wide:o[3]}),m=f=>{if(f==="long")return{cols:2,rows:1};if(f==="high")return{cols:1,rows:2};if(f==="huge")return{cols:2,rows:2}},y=t.filter(f=>uo[f.name]).map(f=>({id:f.name,content:Ce(xc,{techKey:f.name,variant:f.variant}),span:m(f.size)})),v=Ce(fc,{items:y,columns:u,gap:r,ariaLabel:"Technology stack"});return Ce(hc,{title:e,separator:a,tone:i,align:l,collapsible:c,open:d,onOpenChange:s,defaultOpen:p,className:Cc("dndev-tech-bento",g),children:Ce("div",{className:"dndev-tech-bento-grid",children:v})})}var wc=kc;import{Suspense as Nc,lazy as Ic}from"react";import{useConsent as _n}from"@donotdev/core";import{jsx as Gn}from"react/jsx-runtime";var Ac=Ic(()=>Promise.resolve().then(()=>(Gt(),_t)));function o0(){let e=_n("hasConsented"),t=_n("showBanner");return e&&!t?null:Gn(Nc,{fallback:null,children:Gn(Ac,{})})}import{Button as Hn,ScrollArea as Ec}from"@donotdev/components";import{cn as Wn}from"@donotdev/components";import{jsx as ae,jsxs as Lc}from"react/jsx-runtime";function s0({content:e,cta:t,align:o="center",justify:n="center",disableScrollArea:r=!1,contentVariant:a="narrow",contentClassName:i,ctaClassName:l}){let d=a==="narrow"?a==="narrow"&&ae("div",{className:"dndev-game-container__content-narrow",children:e}):e,s=r?ae("div",{style:{overflow:"auto",overscrollBehavior:"contain",height:"100%"},children:d}):ae(Ec,{className:"dndev-game-container__scroll",children:d});return Lc("div",{className:"dndev-game-container",children:[ae("div",{className:Wn("dndev-game-container__content",i),"data-align":o,"data-justify":n,"data-content-variant":a,children:ae("div",{className:"dndev-game-container__scroll-wrapper",children:s})}),t&&ae("div",{className:Wn("dndev-game-container__cta",l),children:Array.isArray(t)?ae("div",{className:"dndev-game-container__cta-buttons",children:t.map((p,g)=>ae(Hn,{onClick:p.onClick,disabled:p.disabled??!1,variant:p.variant??"default",className:"dndev-game-container__cta-button",fullWidth:!0,children:p.label},g))}):ae(Hn,{onClick:t.onClick,disabled:t.disabled??!1,variant:t.variant??"default",className:"dndev-game-container__cta-button",children:t.label})})]})}import{useEffect as Pc,Suspense as Rc,lazy as Dc}from"react";import{jsx as mo}from"react/jsx-runtime";var $n=new Set,Kn=new Map;function Fc(e,t){let o=Kn.get(e);if(o)return o;let n=t[e];if(!n)return null;let r=Dc(n);return Kn.set(e,r),r}function p0({screenRegistry:e,currentScreen:t,nextScreen:o,fallback:n=null}){Pc(()=>{if(o&&!$n.has(o)){$n.add(o);let a=e[o];a&&a().catch(()=>{})}},[o,e]);let r=t?Fc(t,e):null;return!t||!r?null:mo("div",{style:{height:"100%"},children:mo(Rc,{fallback:n,children:mo(r,{})})})}import{cn as Bc,DISPLAY as go}from"@donotdev/components";import{useAppConfig as Yn}from"@donotdev/core";import{jsx as wt,jsxs as zc}from"react/jsx-runtime";var Mc=({display:e=go.AUTO,linkToHome:t=!0,className:o})=>{let n=Yn("name"),a=Yn("shortName")||n||"App",i=H.getLogoSvgContent(),l=H.resolveLogo(),c=e===go.FULL||e===go.AUTO,d=i?wt("div",{className:"app-branding-logo",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Be(i)}}):H.assetExists(l)?wt("img",{src:l,alt:a,className:"app-branding-logo"}):null,s=c&&wt("span",{className:"app-branding-title","data-display":e,children:a}),p=zc("div",{className:Bc("app-branding",o),"data-display":e,children:[d,s]});return t?wt(I,{path:"/",className:"app-branding-link",children:p}):p},Oc=Mc;import{cn as qn}from"@donotdev/components";import{useAppConfig as Zn}from"@donotdev/core";import{jsx as Jn}from"react/jsx-runtime";var jn={sm:{width:"var(--icon-md)",height:"var(--icon-md)"},md:{width:"var(--icon-touch)",height:"var(--icon-touch)"},lg:{width:"var(--icon-touch)",height:"var(--icon-touch)"},xl:{width:"var(--touch-target)",height:"var(--touch-target)"},header:{height:"var(--icon-touch)",width:"auto"}},Vc=({alt:e,size:t="header",className:o})=>{let n=Zn("name"),r=Zn("shortName"),a=e||n||r||"App",i=H.getLogoSvgContent(),l=H.resolveLogo(),c=typeof t=="string"&&t in jn?jn[t]:typeof t=="string"?{}:{width:t,height:t};return i?Jn("div",{className:qn("app-icon-header",o),style:{display:"inline-flex",...c},role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:Be(i)}}):Jn("img",{src:l,alt:a,className:qn(o),style:{objectFit:"contain",...c}})},Uc=Vc;import{cn as Qn}from"@donotdev/components";import{useAppConfig as Xn,useBreakpoint as _c}from"@donotdev/core";import{jsx as er}from"react/jsx-runtime";var Gc=({title:e,className:t,linkToHome:o=!0})=>{let n=_c("isMobileOrTablet"),r=Xn("name"),a=Xn("shortName"),i=e||n&&a||r||"App",l=er("div",{className:Qn("dndev-text-base",t),style:{fontSize:"var(--font-size-xl)",fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:i});return o?er(I,{path:"/",className:Qn("dndev-inline-block",t),children:l}):l},Hc=Gc;import{ChevronRight as Zc}from"lucide-react";import{useMemo as jc}from"react";import{cn as Jc}from"@donotdev/components";import{useTranslation as Qc}from"@donotdev/core";import{useLocation as Xc}from"@donotdev/ui/routing/hooks";import{useMemo as tr}from"react";import{useNavigationStore as F0,getRoutes as Wc,getRouteManifest as B0}from"@donotdev/core";function $c(){return tr(()=>{try{let e=Wc();return!e||e.length===0?[]:Kc(e)}catch{return[]}},[])}function or(){let e=$c();return tr(()=>e.flatMap(t=>t.routes),[e])}function Kc(e){let t=new Map;return e.forEach(o=>{let n=typeof o.path=="string"?o.path:String(o.path);if(!n||n==="undefined"||n==="null")return;let r=o.meta?.entity||Yc(n)||"other",a={path:n,label:o.meta?.title||qc(n),icon:o.meta?.icon,component:o.component,importPath:o.importPath,exportName:o.exportName,auth:o.auth,meta:o.meta};t.has(r)||t.set(r,{label:r.charAt(0).toUpperCase()+r.slice(1),routes:[]}),t.get(r)?.routes.push(a)}),Array.from(t.values())}function Yc(e){return e.split("/").filter(Boolean)[0]||null}function qc(e){let t=e.split("/").filter(Boolean),o=t[t.length-1];return o?o.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" "):"Home"}import{jsx as et,jsxs as od}from"react/jsx-runtime";var ed=({items:e,separator:t=Zc,showHome:o=!0,homeHref:n="/",variant:r="default",className:a})=>{let{t:i}=Qc("dndev"),l=Xc(),c=or(),d=jc(()=>new Set(c.map(g=>g.path)),[c]),s=e||(()=>{let g=l.pathname.split("/").filter(Boolean),u=[],m="";return g.forEach(y=>{m+=`/${y}`;let v=y.split("-").map(x=>x.charAt(0).toUpperCase()+x.slice(1)).join(" "),f=d.has(m)?m:void 0;u.push({label:v,href:f})}),u})(),p=o?[{label:i("navigation.home","Home"),href:n},...s]:s;return r==="smart"&&l.pathname.split("/").filter(Boolean).length<2?null:et("nav",{role:"navigation","aria-label":"Breadcrumb navigation",className:Jc("breadcrumbs",a),children:p.map((g,u)=>{let y=u===p.length-1||!g.href;return od("span",{className:"breadcrumb-item",children:[u>0&&et(t,{className:"dndev-size-md separator"}),g.icon&&et(g.icon,{className:"dndev-size-md icon"}),g.href&&!y?et(I,{path:g.href,className:"breadcrumb-link",children:g.label}):et("span",{className:"breadcrumb-label",children:g.label})]},u)})})},td=ed;import{useTranslation as nd,maybeTranslate as nr,useLayout as fo,useAppConfig as rd}from"@donotdev/core";import{jsx as Me,jsxs as id}from"react/jsx-runtime";var ad=({asLink:e=!1,className:t})=>{let o=rd("app"),n=fo("gameTitle"),r=fo("gameSubtitle"),a=fo("gameNamespace"),{t:i}=nd(a||"dndev"),l=nr(i,n??void 0),c=nr(i,r??void 0),d=o?.name||"Game";if(l)return Me("div",{className:t,children:id("div",{style:{textAlign:"center"},children:[Me("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}),c&&Me("p",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c})]})});let s=Me("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d});return e?Me(I,{path:"/",className:t,style:{fontSize:"var(--font-size-2xl)",fontWeight:700,transition:"color var(--dur-fast) ease-out"},onMouseEnter:p=>p.currentTarget.style.color="var(--primary)",onMouseLeave:p=>p.currentTarget.style.color="var(--foreground)",children:d}):Me("div",{className:t,children:s})};import{Trash2 as sd}from"lucide-react";import{useState as rr}from"react";import{Button as ld,BUTTON_VARIANT as cd,Checkbox as dd,Stack as vo,useToast as pd}from"@donotdev/components";import{useTranslation as ud}from"@donotdev/core";import{useRefresh as md}from"@donotdev/ui/routing/hooks";import{jsx as Tt,jsxs as ar}from"react/jsx-runtime";function gd(){let{t:e}=ud("dndev"),{toast:t}=pd(),[o,n]=rr(!1),r=md(),[a,i]=rr({localStorage:!0,sessionStorage:!0,applicationCache:!0,serviceWorker:!0,cookies:!0,indexedDB:!0,webSQL:!0,memoryCache:!0}),l=async()=>{try{n(!0);let c=[];if(a.localStorage&&typeof window<"u")try{localStorage.clear(),c.push("localStorage")}catch{}if(a.sessionStorage&&typeof window<"u")try{sessionStorage.clear(),c.push("sessionStorage")}catch{}if(a.indexedDB&&typeof window<"u"&&"indexedDB"in window)try{if("databases"in indexedDB){let s=await indexedDB.databases();await Promise.all(s.map(async p=>{if(p.name){let g=indexedDB.deleteDatabase(p.name);await new Promise((u,m)=>{g.onsuccess=()=>u(void 0),g.onerror=()=>m(g.error)})}}))}c.push("IndexedDB")}catch{}if(a.webSQL&&"openDatabase"in window)try{let s=globalThis.openDatabase("","","","");s&&s.transaction&&s.transaction(p=>{p.executeSql('SELECT name FROM sqlite_master WHERE type="table"',[],(g,u)=>{for(let m=0;m<u.rows.length;m++){let y=u.rows.item(m).name;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(y)&&g.executeSql(`DROP TABLE IF EXISTS ${y}`)}})}),c.push("WebSQL")}catch{}if(a.applicationCache&&"caches"in window)try{let s=await caches.keys();await Promise.all(s.map(async p=>{try{await caches.delete(p)}catch{}})),c.push("Application Cache")}catch{}if(a.serviceWorker&&"serviceWorker"in navigator)try{let s=await navigator.serviceWorker.getRegistrations();await Promise.all(s.map(async p=>{try{await p.unregister()}catch{}})),c.push("Service Workers")}catch{}if(a.cookies)try{document.cookie.split(";").forEach(s=>{let p=s.indexOf("="),g=p>-1?s.substr(0,p):s;document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${window.location.hostname}`,document.cookie=`${g.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=.${window.location.hostname}`}),c.push("Cookies")}catch{}if(a.memoryCache)try{"gc"in window&&typeof globalThis.gc=="function"&&globalThis.gc(),c.push("Memory Cache")}catch{}let d=c.length>0?e("settings.clearCache.success","Cache cleared successfully: {{items}}",{items:c.join(", ")}):e("settings.clearCache.noItemsCleared","No cache items were cleared");t("success",d),c.length>0&&setTimeout(()=>{typeof globalThis<"u"&&globalThis._DNDEV_STORES_&&(globalThis._DNDEV_STORES_={}),typeof window<"u"?window.location.href=window.location.href:r()},1e3)}catch{t("error",e("settings.clearCache.error","Error clearing cache"))}finally{n(!1)}};return ar(vo,{children:[Tt(vo,{children:Object.entries(a).map(([c,d])=>ar(vo,{direction:"row",align:"center",gap:"tight",children:[Tt(dd,{id:c,checked:d,onCheckedChange:s=>i(p=>({...p,[c]:!!s}))}),Tt("label",{htmlFor:c,style:{fontSize:"var(--font-size-sm)",fontWeight:500,lineHeight:1,cursor:"pointer"},children:e(`settings.clearCache.${c}`,c.charAt(0).toUpperCase()+c.slice(1))})]},c))}),Tt(ld,{variant:cd.DESTRUCTIVE,style:{margin:"0 auto"},disabled:o||!Object.values(a).some(Boolean),onClick:l,icon:sd,children:o?e("settings.clearCache.clearing","Clearing..."):e("settings.clearCache.button","Clear Cache")})]})}var ho=gd;import{DropdownMenu as yd,Button as yo,Stack as bd}from"@donotdev/components";import{Link as fd}from"lucide-react";import{navigationMenuTriggerStylePrimitive as vd}from"@donotdev/components";le();be();import{jsx as ir,jsxs as hd}from"react/jsx-runtime";var Nt=({path:e,route:t,showIcons:o=!0})=>{let n=W(),r=t??n.find(l=>l.path===e);if(!r)return null;let a=o&&!!r.icon,i=!!r.label;return hd(I,{path:r.path,className:vd(),...a&&!i&&{"data-display":"compact"},children:[o&&ir(z,{icon:r.icon,fallback:fd}),ir("span",{children:r.label})]})};import{jsx as xe}from"react/jsx-runtime";var Sd=({navigation:e,className:t})=>xe(bd,{role:"navigation",direction:"row",align:"center",className:t,style:{gap:"var(--gap-sm)"},children:e.map((o,n)=>o.routes&&o.routes.length>0?xe(yd,{trigger:xe(yo,{icon:o.icon,children:o.label}),items:o.routes.map(r=>({label:r.label,children:xe(Nt,{route:r}),asChild:!!r.path})),contentAlign:"start"},o.label+n):o.path?xe(yo,{icon:o.icon,"aria-label":o.label,render:({children:r,...a})=>xe(I,{path:o.path,...a,children:r}),children:o.label},o.label+n):xe(yo,{icon:o.icon,disabled:!0,"aria-label":o.label,children:o.label},o.label+n))}),Cd=Sd;import{Card as xd,cn as kd}from"@donotdev/components";import{jsx as bo}from"react/jsx-runtime";var wd=({languages:e,currentLanguage:t,onLanguageChange:o,className:n})=>bo(xd,{className:kd("dndev-z-modal",n),style:{position:"fixed",bottom:"var(--gap-md)",insetInlineEnd:"var(--gap-md)",display:"flex",alignItems:"center",gap:"var(--gap-sm)",transition:"var(--dur-fast) ease-out"},role:"region","aria-label":"Language selector","data-role":"floating",children:bo("select",{style:{backgroundColor:"transparent",outline:"none",fontSize:"var(--font-size-base)",cursor:"pointer"},value:t,onChange:r=>o?.(r.target.value),"aria-label":"Select language",children:e.map(r=>bo("option",{value:r,children:r},r))})}),Td=wd;import{MoreHorizontal as Nd}from"lucide-react";import{Button as Id,BUTTON_VARIANT as Ad,DropdownMenu as Ed}from"@donotdev/components";import{jsx as sr}from"react/jsx-runtime";var Ld=({children:e,className:t})=>sr(Ed,{trigger:sr(Id,{variant:Ad.GHOST,icon:Nd,"aria-label":"Menu",className:t}),contentAlign:"end",children:e}),Pd=Ld;import{MoreHorizontal as Rd}from"lucide-react";import{Link as Dd}from"lucide-react";import{DISPLAY as tt,DropdownMenu as Fd,Button as lr}from"@donotdev/components";import{cn as Bd}from"@donotdev/components";import{useBreakpoint as cr,useTranslation as Md}from"@donotdev/core";le();be();import{jsx as ke}from"react/jsx-runtime";var Od=({className:e="",showIcons:t=!0,display:o=tt.AUTO,path:n})=>{let{t:r}=Md("dndev"),a=cr("isMobile"),i=cr("isTablet"),l=W(),c=rn(n??"");return n?c?ke(lr,{variant:"ghost",display:o,icon:t?ke(z,{icon:c.icon,fallback:Dd}):void 0,className:e,render:({children:s,...p})=>ke(I,{path:c.path,...p,children:s}),children:c.label}):null:(o===tt.AUTO?a||i?tt.COMPACT:tt.FULL:o)===tt.COMPACT?ke(Fd,{trigger:ke(lr,{variant:"ghost",icon:Rd,"aria-label":r("navigation.menu","Navigation"),className:e}),contentAlign:"end",items:l.map(s=>({label:s.label,children:ke(Nt,{route:s,showIcons:t}),asChild:!0}))}):ke(hn,{overflowDetection:!0,showIcons:t,className:Bd(e),style:{flex:1}})},zd=Od;import{Bell as Vd}from"lucide-react";import{useMemo as Ud,useEffect as _d,useRef as Gd}from"react";import{Button as Hd,cn as Wd,toast as $d,Stack as Kd}from"@donotdev/components";import{jsx as So}from"react/jsx-runtime";var Yd={sm:{button:{width:"var(--icon-md)",height:"var(--icon-md)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},md:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-md)",height:"var(--icon-md)"},badge:{width:"var(--icon-md)",height:"var(--icon-md)",fontSize:"var(--font-size-xs)"}},lg:{button:{width:"var(--touch-target)",height:"var(--touch-target)"},icon:{width:"var(--icon-touch)",height:"var(--icon-touch)"},badge:{width:"var(--icon-touch)",height:"var(--icon-touch)",fontSize:"var(--font-size-sm)"}}},qd=({notifications:e=[],count:t=0,loading:o=!1,onNotificationClick:n,onDropdownOpen:r,className:a,maxVisible:i=10,alwaysShow:l=!1,size:c="md",disabled:d=!1})=>{let s=Yd[c],p=Gd(new Set),g=Ud(()=>t===0?null:t>99?"99+":t.toString(),[t]),u=t>0||l;return _d(()=>{e.forEach(m=>{if(!p.current.has(m.id)){p.current.add(m.id);let y=m.type==="error"?"error":m.type==="warning"?"warning":m.type==="success"?"success":"info";$d({title:m.title,description:m.message,toastType:y,duration:0,onDismiss:()=>{p.current.delete(m.id),n&&n(m)}})}})},[e,n]),u?So("div",{className:Wd(a),style:{position:"relative"},children:So(Hd,{disabled:d,style:{...s.button,position:"relative"},onClick:()=>{r?.()},onFocus:m=>{m.currentTarget.style.outline="2px solid var(--ring)",m.currentTarget.style.outlineOffset="2px"},onBlur:m=>{m.currentTarget.style.outline="none"},"aria-label":`${t} notification${t!==1?"s":""}`,icon:Vd,children:g&&So(Kd,{align:"center",justify:"center",style:{position:"absolute",top:"-0.25rem",insetInlineEnd:"-0.25rem",backgroundColor:"var(--destructive)",color:"var(--destructive-foreground)",borderRadius:"var(--radius-full)",fontWeight:600,lineHeight:1,minWidth:0,...s.badge},"aria-hidden":"true",children:g})})}):null},Zd=qd;import{Settings as jd,Check as Jd}from"lucide-react";import*as It from"lucide-react";import{Button as Qd,BUTTON_VARIANT as Xd,DropdownMenu as ep,Stack as tp,DISPLAY as op}from"@donotdev/components";import{useTranslation as np}from"@donotdev/core";import{useLanguageSelector as rp,useTheme as Co,Flag as ap}from"@donotdev/core";import{jsx as me,jsxs as lp}from"react/jsx-runtime";function ip({variant:e=Xd.OUTLINE}={}){let{t}=np("dndev"),{languages:o,currentLanguage:n,changeLanguage:r,isLoading:a}=rp(),i=Co("availableThemes"),l=Co("currentTheme"),c=Co("setTheme"),d=u=>{if(!u)return It.Palette;let m=u.replace(/['"]/g,"");return It[m]||It.Palette},s=i.map(u=>{let m=d(u.meta?.icon),y=u.name===l;return{label:u.displayName||u.name,icon:m,onClick:()=>c(u.name),checked:y}}),p=o.map(u=>{let m=u.id===n;return{label:u.name,onClick:()=>r(u.id),disabled:a,checked:m,className:m?"bg-accent":void 0,iconEnd:m&&!a?Jd:void 0,children:lp(tp,{direction:"row",align:"center",gap:"tight",children:[me(ap,{code:u.flagCode||u.id,title:`${u.name} flag`}),me("span",{children:u.name}),a&&m&&me("div",{style:{marginInlineStart:"auto"},children:me("div",{style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:"var(--primary)"}})})]})}}),g=[{label:t("auth.title","Authentication"),subContent:me(ao,{display:op.COMPACT})},{label:t("settings.theme","Theme"),subItems:s},{label:t("settings.language","Language"),subItems:p},{label:t("settings.clearCache.title","Clear Cache"),subContent:me(ho,{})}];return me(ep,{trigger:me(Qd,{variant:e,"aria-label":t("settings.title","Settings"),icon:jd}),items:g,contentWidth:"14rem",contentAlign:"end"})}var sp=ip;import*as At from"lucide-react";import{Button as dr,BUTTON_VARIANT as cp,DropdownMenu as dp,DISPLAY as pp}from"@donotdev/components";import{useTranslation as up}from"@donotdev/core";import{useTheme as xo}from"@donotdev/core";import{jsx as wo}from"react/jsx-runtime";var ko=e=>{if(!e)return At.Palette;let t=e.replace(/['"]/g,"");return At[t]||At.Palette},mp=({display:e=pp.AUTO,"no-tooltip":t=!1})=>{let{t:o}=up("dndev"),n=xo("availableThemes"),r=xo("currentTheme"),a=xo("setTheme");if(n.length<=1)return null;let i=n.find(f=>f.name===r)||n[0],l=n.length===2?n.find(f=>f.name!==i?.name)||n[0]:null,c=i?ko(i.meta?.icon):null,d=l?ko(l.meta?.icon):null,s=i?.displayName||i?.name||"Theme",p=l?.displayName||l?.name||"Theme",g=n.length===2&&l&&d,u=g?d:c,m=g?t?void 0:o("common.themeSelector.tooltipWithNext","Change Theme: Switch to {{next}}",{next:l?.displayName||l?.name}):t?void 0:o("common.themeSelector.changeTheme","Change Theme"),y={variant:cp.OUTLINE,"aria-label":o("common.themeSelector.changeTheme","Change Theme"),tooltip:m,icon:u,display:e};if(g&&l)return wo(dr,{...y,onClick:()=>a(l.name),children:p});if(!i||!c)return null;let v=n.map(f=>{let x=ko(f.meta?.icon),S=f.name===r;return{label:f.displayName||f.name,icon:x,onClick:()=>a(f.name),checked:S}});return wo(dp,{trigger:wo(dr,{...y,children:s}),items:v,contentWidth:"10rem"})},gp=mp;import{ExternalLink as fp}from"lucide-react";import{getPlatformEnvVar as vp}from"@donotdev/core";import{jsx as hp,jsxs as yp}from"react/jsx-runtime";var To=({className:e})=>{let o=vp("APP_URL")==="https://donotdev.com";return yp("a",{href:o?"https://www.ambroise-park.com":"https://donotdev.com",target:"_blank",rel:"noopener noreferrer",className:e,style:{display:"inline-flex",alignItems:"center",gap:"var(--gap-sm)",fontSize:"var(--font-size-xs)"},children:[o?"AMBROISE-PARK":"DoNotDev",hp(fp,{style:{width:"12px",height:"12px"},"aria-hidden":"true"})]})};import{cn as bp}from"@donotdev/components";import{useTranslation as Sp,useAppConfig as Cp}from"@donotdev/core";import{jsxs as kp}from"react/jsx-runtime";var xp=({appName:e,year:t=new Date().getFullYear(),className:o})=>{let{t:n}=Sp("dndev"),r=Cp("app"),a=e||r?.name||"App";return kp("span",{className:bp(o),style:{flexShrink:0,color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"},children:["\xA9 ",t," ",a,". ",n("footer.legal.allRightsReserved")]})};import{Stack as Np}from"@donotdev/components";import{useTranslation as Ip,maybeTranslate as Ap,useAppConfig as Ep}from"@donotdev/core";var wp=[{path:"#cookie-settings",label:"footer.legal.cookieSettings"},{label:"footer.legal.privacyPolicy",path:"/privacy"},{label:"footer.legal.termsOfService",path:"/terms"}],Tp=e=>e?.legalLinks===null?[]:e?.legalLinks??wp,pr=Tp;import{jsx as ur,jsxs as Pp}from"react/jsx-runtime";var Lp=({app:e,direction:t="column",gap:o="tight"})=>{let{t:n}=Ip("dndev"),r=Ep("app"),i=pr((e||r||{}).footer),l={transition:"color var(--dur-fast) ease-out",textDecoration:"underline",textUnderlineOffset:"2px",color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"};return i.length===0?null:Pp(Np,{direction:t,gap:o,align:"stretch",children:[i.map(c=>ur(I,{path:c.path,style:l,onMouseEnter:d=>d.currentTarget.style.color="var(--primary)",onMouseLeave:d=>d.currentTarget.style.color="var(--muted-foreground)",children:Ap(n,c.label)},c.path)),ur(To,{})]})};import{useEffect as Dp}from"react";import{checkLicense as Fp}from"@donotdev/core";var Rp='<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512"><title>logo</title><style>.s0{opacity:.98;fill:#f23d29}.s1{opacity:.99;fill:#03bec4}.s2{opacity:.97;fill:#27494a}</style><g id="Background"><path id="Path 0" fill-rule="evenodd" class="s0" d="m254 41.1c5.8-0.1 15.2 0.4 21 0.9 5.8 0.6 16 2.2 22.8 3.5 6.7 1.4 17.5 4.2 23.9 6.4 6.5 2.1 16.7 6.1 22.8 8.8 6.1 2.7 15.5 7.6 21 10.8 5.5 3.3 14.3 9.2 19.5 13 5.2 3.9 13.8 11.2 19 16.2 5.2 5 12.2 12.3 15.5 16.2 3.3 4 8.8 11.1 12.2 15.9 3.4 4.8 8.7 13.2 11.7 18.7 3 5.5 6.9 13.4 8.7 17.5 1.7 4.1 4.7 12 6.6 17.5 1.9 5.5 4.5 14.5 5.8 20 1.3 5.5 3.1 15.3 3.9 21.8 0.9 6.6 1.6 19 1.6 28.7 0 9.4-0.7 22.1-1.5 28.3-0.8 6.1-3 17.3-4.8 24.7-1.9 7.4-5.5 18.9-8.2 25.5-2.6 6.6-7 16.3-9.8 21.5-2.8 5.2-8 13.8-11.5 19-3.6 5.2-9.3 12.9-12.7 17-3.5 4.1-10.7 11.8-16.2 17-5.4 5.3-12.7 11.9-16.3 14.7-3.6 2.8-11.4 8.3-17.5 12.2-6.1 4-16.4 9.8-23 13.1-6.6 3.2-17.4 7.6-24 9.8-6.6 2.3-17.2 5.2-23.5 6.6-6.3 1.4-16.2 3-22 3.7-6.4 0.7-17.5 1-28.5 0.6-11.9-0.3-21.7-1.2-29-2.6-6.1-1.1-15.9-3.4-22-5.1-6.1-1.7-15.9-5.2-22-7.6-6.1-2.5-15.5-6.9-21-9.8-5.5-2.9-14.1-8-19-11.3-4.9-3.3-12.4-8.7-16.5-12-4.1-3.4-12.5-11.2-18.6-17.4-6.1-6.3-13.9-15.2-17.3-19.9-3.5-4.7-8.8-12.6-11.9-17.5-3-4.9-7.9-13.9-10.8-20-2.9-6.1-7.1-16.4-9.3-23-2.2-6.6-5.1-17.6-6.5-24.5-1.4-6.9-3-17.4-3.7-23.5-0.7-6.7-0.9-17.2-0.6-27 0.4-8.8 1.3-20.5 2.2-26 0.8-5.5 2.7-14.5 4.1-20 1.4-5.5 3.9-14.1 5.5-19 1.7-4.9 6.3-15.8 10.4-24 4-8.3 10-19.1 13.3-24 3.3-4.9 9-12.6 12.5-17 3.6-4.4 11.4-12.8 17.3-18.6 6-5.8 15.4-13.9 20.9-18 5.5-4.1 14.5-10 20-13.2 5.5-3.1 14.5-7.6 20-10.1 5.5-2.4 15.1-6 21.3-8 6.1-2 16.7-4.7 23.5-6.1 6.7-1.3 16.3-2.8 21.2-3.3 4.9-0.5 13.7-1 19.5-1.1zm-21 38c-4.7 0.5-12.1 1.9-16.5 3-4.4 1.1-11.6 3.1-16 4.5-4.4 1.5-13.8 5.4-21 8.9-7.2 3.5-16.1 8.5-20 11.1-3.8 2.6-10 7.2-13.8 10.3-3.7 3.1-6.7 5.9-6.7 6.3 0 0.5 9.3 10.3 20.8 21.9l20.7 21c5.5-10.5 9-16.5 11.5-20.1 2.4-3.6 7.2-9.6 10.5-13.5 3.3-3.8 9.4-9.6 13.5-12.9 4.1-3.2 10.7-7.4 14.5-9.2 3.9-1.8 9.7-4 13-4.9 3.3-0.8 9.6-1.5 14-1.5 4.4 0 10.7 0.7 14 1.6 3.3 0.9 9.1 3.2 13 5.1 3.9 2 9.3 5.2 12 7.3 2.8 2 8.5 7.5 12.9 12.1 4.3 4.6 10.2 11.8 13.1 15.9 2.9 4.1 7.8 12.2 10.8 18 3 5.8 7.1 14.8 9 20 2 5.2 4.2 13 5.1 17.3 0.9 4.2 1.6 11.4 1.6 15.9 0 5.6-0.6 10.6-2.1 15.3-1.1 3.8-3.8 9.9-5.9 13.5-2.1 3.6-5.8 8.9-8.4 11.7-2.5 2.9-4.6 5.6-4.6 6 0 0.5 1.4 1.2 3.2 1.6 1.8 0.4 6.4 2.4 10.3 4.4 3.9 1.9 9 4.9 11.5 6.6 2.5 1.8 7.1 5.9 10.4 9.2 4.2 4.3 7.1 8.6 10.1 15 2.4 4.9 5 11.9 5.9 15.5 0.9 3.6 2.3 11.9 3.2 18.5 1.1 8 1.4 15.9 1.1 23.5l-0.5 11.5 6.3 6.4c6.3-8.1 10.4-13.8 13.1-17.9 2.8-4.1 6.4-10 8.1-13 1.7-3 5.1-10.2 7.6-16 2.5-5.8 5.8-15.2 7.5-21 1.7-5.8 3.7-13.9 4.6-18 0.8-4.1 2-11.9 2.5-17.3 0.6-5.3 1.1-13.5 1.1-18.2 0-4.7-0.5-12.9-1.1-18.3-0.6-5.3-1.9-13.5-2.9-18.2-1-4.7-3.1-12.3-4.5-17-1.5-4.7-5.1-13.4-7.9-19.5-2.9-6.1-7.6-14.8-10.6-19.5-2.9-4.7-7.2-11-9.5-14-2.3-3-7.8-9.3-12.1-13.9-4.3-4.6-12-11.6-16.9-15.6-4.9-4.1-13.1-9.9-18-13-4.9-3.1-13.3-7.7-18.5-10.2-5.2-2.5-13.6-6.1-18.5-7.8-4.9-1.8-14.2-4.5-20.5-5.9-6.3-1.4-17.1-3-24-3.6-6.9-0.5-13.4-0.9-14.5-0.8-1.1 0.1-4.5 0.3-7.5 0.5-3 0.2-9.3 0.8-14 1.4zm-125.4 79.6c-4.3 6.5-9.8 15.9-12.1 20.8-2.4 4.9-5.9 13.7-7.9 19.5-1.9 5.8-4.4 15-5.5 20.5-1.1 5.5-2.5 15.8-3.1 23-0.6 7.2-0.8 16.8-0.5 21.5 0.4 4.7 1.5 13.9 2.5 20.5 1.1 6.6 3.5 17.3 5.4 23.8 2 6.4 5.5 16.1 7.9 21.5 2.3 5.3 6.7 13.8 9.7 18.7 3 4.9 8.1 12.4 11.4 16.5 3.3 4.1 9.8 11.5 14.5 16.3 4.7 4.9 11.8 11.2 15.6 14.2 3.9 2.9 11.1 7.9 16 11 4.9 3.1 13.1 7.6 18 10 4.9 2.4 13.7 5.9 19.5 7.9 5.8 1.9 14.6 4.4 19.5 5.5 4.9 1.1 13.7 2.5 19.5 3.2 6.6 0.7 16.1 0.9 25.5 0.6 9.8-0.4 19.1-1.5 27-3.1 6.6-1.4 16.7-4.1 22.5-6.1 5.8-2 15-5.8 20.5-8.5 5.5-2.7 13.8-7.4 18.5-10.5 4.7-3.2 9.3-6.5 10.3-7.4 1.6-1.5 1.6-1.7-0.5-3.9-1.3-1.2-2.6-2.2-3-2.2-0.5 0-3.4 2-6.5 4.4-3.2 2.4-9.4 6.4-13.8 8.9-4.4 2.6-12.7 6.4-18.5 8.6-5.8 2.2-15.2 5.1-21 6.5-5.8 1.4-14.6 3-19.5 3.7-4.9 0.6-15.7 1.1-24 1.1-8.2 0-19.5-0.7-25-1.6-5.5-0.8-14.7-2.7-20.5-4.1-5.8-1.5-15-4.5-20.5-6.6-5.5-2.2-12.9-5.6-16.5-7.5-3.6-2-10.3-6.1-15-9.2-4.7-3.1-12.7-9.7-17.8-14.7-7.5-7.2-9.5-9.8-10.2-13-0.5-2.2-1-9.9-1-17 0-7.1 0.7-17.3 1.5-22.5 0.8-5.2 2.3-12.8 3.5-16.8 1.1-3.9 3.3-9.8 4.9-12.9 1.6-3.2 4.5-7.8 6.5-10.3 1.9-2.5 6.1-6.6 9.3-9.3 3.2-2.6 9.2-6.5 13.3-8.6 4.1-2.1 9.3-4.4 11.5-5.1 2.2-0.7 4.3-1.5 4.7-1.9 0.4-0.3-1.3-3.1-3.8-6.1-2.5-3-6.1-8.4-8.2-12-2-3.6-4.7-9.9-6-14-1.8-5.6-2.5-10-2.6-17 0-5.2 0.2-11.7 0.5-14.5l0.6-5-49.2-48.5zm117.6 8.2c-4 1.1-9.8 3.1-13 4.3-3.2 1.3-8.4 4.1-11.6 6.3l-5.8 3.9 6.7 6.5c7.5-3.7 9.9-4 24.2-4 13.2 0 17 0.4 20.4 1.8 2.3 0.9 4.5 2.5 5 3.5 0.6 1.2 2 1.7 4.9 1.7 2.8 0 4.2-0.5 4.8-1.7 0.5-1 2.5-2.6 4.5-3.5 3.1-1.5 6.6-1.8 21.7-1.8 9.9 0 19.1 0.5 20.5 1 1.3 0.6 3.1 2 4 3.3 1.1 1.6 1.5 4.8 1.5 11.7 0 7.9-0.4 10.3-2.3 14-1.2 2.4-3.4 5.3-4.7 6.3-1.4 1-4.3 2.2-6.5 2.7-2.2 0.6-7.9 1-12.5 1-4.7 0-10.3-0.4-12.5-1-2.2-0.5-5.2-1.8-6.5-2.8-1.4-1-3.6-3.6-4.8-5.8-1.2-2.1-2.6-6-3-8.6-0.7-4.6-0.9-4.8-4-4.8-3.2 0-3.3 0.2-4.4 5.8-0.6 3.1-1.7 6.9-2.4 8.2-0.7 1.4-2.5 3.7-4.1 5.2-1.6 1.4-4 2.9-5.3 3.3-2.4 0.7-1 2.2 20.5 23.6 12.6 12.6 23.3 22.9 23.7 22.9 0.4 0 4.4-3.5 8.9-7.7 4.5-4.3 10-10.5 12.2-13.8 2.2-3.3 5.5-9.1 7.3-13 1.8-3.8 4.5-11 5.9-16 1.5-4.9 2.9-12.8 3.2-17.5 0.5-6.5 0.2-9.5-1-13-1-2.6-3.5-6.2-5.9-8.5-2.4-2.3-7.7-5.8-11.8-7.8-4.2-2-10.9-4.5-15-5.5-4.2-1.1-11.6-2.5-16.5-3.1-5-0.6-12.6-1-17-0.9-4.4 0-11.2 0.5-15 1-3.9 0.5-10.3 1.8-14.3 2.8zm-13.7 29.2c-0.5 0.9 2 4.1 8.1 10.1 7.5 7.4 9.4 8.7 12.1 8.7 1.8 0 4.2-0.4 5.3-1 1.1-0.5 2.8-2.9 3.9-5.2 1.1-2.4 2-5.8 2-7.8 0.1-1.9-0.6-4.4-1.3-5.5-1.3-1.8-2.8-2-13.3-2.2-6.5-0.1-12.8 0.2-13.9 0.7-1.2 0.5-2.5 1.5-2.9 2.2zm58.5 1.1c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.6 1.7 3.9 2.6 8.3 3.1 3.3 0.4 8.2 0.5 11 0.1 2.7-0.4 5.7-1.1 6.7-1.7 1-0.5 2.4-2.4 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.5-2.2-2.1-2.3-15.3-2.2-7.6 0.1-14.3 0.3-14.9 0.6-0.7 0.2-1.7 1.9-2.3 3.6zm-71.9 38c1.7 3.4 5 8.9 7.4 12.2 2.3 3.3 6.9 8.5 10.1 11.6 3.2 3.1 7.9 6.8 10.4 8.2 2.4 1.4 6.5 3.3 9 4.2 2.4 0.8 4.5 1.4 4.7 1.3 0.1-0.2-9.9-10.4-22.3-22.8-12.3-12.3-22.5-22.1-22.5-21.7 0.1 0.4 1.5 3.5 3.2 7z"/><path id="Path 1" class="s1" d="m243 105.6c-3 0.8-8.7 2.9-12.5 4.8-3.8 1.8-10.4 6-14.5 9.2-4.1 3.3-10.2 9.1-13.5 12.9-3.4 3.9-8.4 10.4-11.1 14.5-2.8 4.1-6.5 10.2-8.2 13.5l-3.1 6 14.8 15c9-6.2 15.4-9.4 20.1-11.1 4.7-1.8 12-3.9 16.2-4.8 4.3-0.9 12.4-1.9 18-2.2 6.2-0.4 14.5-0.2 20.8 0.6 5.8 0.6 13.9 2.1 18 3.1 4.1 1.1 10.9 3.6 15 5.6 4.1 2 9.4 5.5 11.8 7.7 2.5 2.4 5 6 5.9 8.6 1.3 3.4 1.5 6.5 1.1 13-0.4 4.7-1.8 12.6-3.2 17.5-1.5 4.9-4.2 12.2-6 16-1.8 3.9-5 9.7-7.3 13-2.2 3.3-8 9.7-12.9 14.3l-8.9 8.3c76.3 76.3 98.8 98 99.2 97.6 0.4-0.5 1-5.7 1.2-11.5 0.2-6.2-0.4-15.7-1.3-22.7-0.9-6.6-2.3-14.9-3.2-18.5-0.9-3.6-3.5-10.6-5.9-15.5-3-6.4-5.9-10.7-10.1-15-3.3-3.3-7.9-7.4-10.4-9.2-2.5-1.7-7.6-4.7-11.5-6.6-3.9-2-8.5-4-10.3-4.4-1.8-0.4-3.2-1.1-3.2-1.5 0-0.5 2.1-3.2 4.6-6 2.6-2.9 6.3-8.2 8.4-11.8 2.1-3.6 4.8-9.6 5.9-13.5 1.5-4.7 2.1-9.7 2.1-15.2 0-4.6-0.7-11.8-1.6-16-0.9-4.3-3.1-12.1-5.1-17.3-1.9-5.2-6-14.2-9-20-3-5.8-7.9-13.9-10.8-18-2.9-4.1-8.8-11.3-13.1-15.9-4.4-4.6-10.2-10.1-12.9-12.1-2.8-2.1-8.1-5.3-12-7.3-3.9-1.9-9.7-4.2-13-5.1-3.3-0.9-9.8-1.5-14.5-1.5-4.7 0-11 0.7-14 1.5zm-78.7 93.9c-0.4 2.2-0.8 8.7-0.7 14.5 0.1 8.3 0.6 12.1 2.5 18 1.4 4.1 4.1 10.4 6.1 14 2.1 3.6 5.7 9 8.2 12 2.5 3 4.2 5.8 3.8 6.1-0.4 0.4-2.5 1.2-4.7 1.9-2.2 0.7-7.4 3-11.5 5.1-4.1 2.1-10.1 6-13.3 8.6-3.2 2.7-7.4 6.8-9.3 9.3-2 2.5-4.9 7.1-6.5 10.3-1.6 3.1-3.8 9-4.9 13-1.2 3.9-2.7 11.5-3.5 16.7-0.8 5.2-1.5 15.4-1.5 22.5 0 7.1 0.5 14.8 1 17 0.7 3.2 2.7 5.8 10.2 13 5.1 5 13.1 11.6 17.8 14.7 4.7 3.1 11.4 7.2 15 9.2 3.6 1.9 11 5.3 16.5 7.5 5.5 2.1 14.7 5.1 20.5 6.6 5.8 1.4 15 3.3 20.5 4.1 5.5 0.9 16.8 1.6 25 1.6 8.3 0 19.1-0.5 24-1.1 4.9-0.7 13.7-2.3 19.5-3.7 5.8-1.4 15.2-4.3 21-6.5 5.8-2.2 14.1-6 18.5-8.6 4.4-2.5 10.8-6.7 14.2-9.2 3.5-2.5 6.3-4.9 6.3-5.3 0-0.5-26.5-27-58.8-59-54.3-53.8-59.2-58.4-63.8-59.8-2.7-0.8-7.4-3-10.4-4.8-3-1.8-7.9-5.7-10.8-8.5-3-2.9-7.3-7.9-9.7-11.2-2.4-3.3-6.4-10.3-8.9-15.5-4.2-8.7-5.6-10.6-18-23l-13.5-13.5z"/><path id="Path 2" fill-rule="evenodd" class="s2" d="m225.8 184c13.2 0 17 0.3 20.3 1.8 2.3 0.9 4.6 2.5 5 3.5 0.6 1.2 2.1 1.7 4.9 1.7 2.8 0 4.3-0.5 4.9-1.8 0.4-0.9 2.5-2.5 4.5-3.5 3-1.4 6.5-1.7 21.6-1.7 9.9 0 19.1 0.4 20.5 1 1.4 0.6 3.2 2 4 3.3 1.2 1.6 1.6 4.8 1.6 11.7-0.1 7.9-0.4 10.3-2.3 13.9-1.3 2.5-3.4 5.3-4.8 6.3-1.4 1-4.3 2.3-6.5 2.8-2.2 0.5-7.8 1-12.5 1-4.7 0-10.3-0.5-12.5-1-2.2-0.5-5.1-1.8-6.5-2.8-1.4-1-3.5-3.6-4.7-5.8-1.3-2.1-2.6-6-3-8.7-0.8-4.5-0.9-4.7-4.1-4.7-3.1 0-3.2 0.2-4.3 5.8-0.6 3.1-1.7 6.8-2.4 8.2-0.7 1.4-2.6 3.7-4.2 5.2-1.5 1.5-3.9 3-5.3 3.3-2 0.6-3.3 0-6.8-3.1-2.4-2.2-4.3-4.2-4.2-4.6 0-0.5 1.3-0.8 3-0.8 1.6 0 3.9-0.4 5-1 1.1-0.6 2.9-2.9 4-5.2 1.1-2.4 2-5.9 2-7.8 0-1.9-0.6-4.4-1.4-5.5-1.3-1.8-2.6-2-14.4-2-11.6 0-13.2 0.2-17.1 4l-4-4.5c-2.1-2.5-3.7-4.8-3.5-5.2 0.2-0.5 1.9-1.5 3.6-2.3 2.5-1 7.5-1.4 19.5-1.5zm44.3 13.3c-0.8 2.3-0.8 4.4-0.1 7.5 0.6 2.3 2.1 5.3 3.3 6.6 1.7 1.7 3.9 2.5 8.3 3.1 3.3 0.4 8.2 0.4 11 0 2.7-0.3 5.8-1.1 6.7-1.6 1-0.5 2.5-2.5 3.3-4.4 0.8-1.9 1.5-5.2 1.5-7.2 0-2.1-0.7-4.8-1.5-6-1.4-2.2-2.1-2.3-15.3-2.2-7.5 0-14.2 0.3-14.9 0.5-0.6 0.3-1.7 2-2.3 3.7zm-40 126.7c0.3-0.1 2.2 2 8 9l-23.5 22.7 22.4 23.8-7.8 8-16.1-15.5c-8.8-8.5-16.2-15.8-16.3-16.2-0.1-0.3 7.3-7.6 16.3-16.2 9.1-8.6 16.7-15.6 17-15.6zm33.5 0l4 0.1c2.2 0.1 5 0.4 6.1 0.7 2.1 0.7 1.8 1.7-19.4 62.7l-5.3-0.3c-3-0.2-5.6-0.5-5.9-0.7-0.3-0.2 4.2-14.4 10-31.4zm20.7 3.9l2.7 1.9c1.4 1.1 8.2 7.3 27.6 26l-15.5 15.6c-8.5 8.6-16 15.6-16.7 15.6-0.7 0-2.9-2-8.3-8.5l23.2-22-6.8-6.7c-3.8-3.7-8.1-7.6-9.6-8.8-1.5-1.1-2.8-2.5-2.9-3.1 0-0.6 1.4-3.1 3.1-5.5z"/></g></svg>',mr=`data:image/svg+xml,${encodeURIComponent(Rp)}`;import{jsx as No,jsxs as gr}from"react/jsx-runtime";function Oh(){let e=Fp();return Dp(()=>{e.isValid},[e.isValid]),e.isValid?null:gr("a",{href:"https://donotdev.com/pricing",target:"_blank",rel:"noopener noreferrer",style:{position:"fixed",insetInlineEnd:"20px",top:"50%",transform:"translateY(-50%)",zIndex:9999,display:"flex",alignItems:"center",gap:"12px",padding:"12px 16px",backgroundColor:"rgba(255, 255, 255, 0.95)",border:"2px solid rgba(242, 61, 41, 0.3)",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",textDecoration:"none",transition:"all 0.2s ease",cursor:"pointer",opacity:.9},onMouseEnter:t=>{t.currentTarget.style.opacity="1",t.currentTarget.style.transform="translateY(-50%) scale(1.05)"},onMouseLeave:t=>{t.currentTarget.style.opacity="0.9",t.currentTarget.style.transform="translateY(-50%) scale(1)"},children:[No("img",{src:mr,alt:"DoNotDev Logo",style:{width:"48px",height:"48px",flexShrink:0}}),gr("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[No("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"13px",fontWeight:"600",color:"#27494a",lineHeight:"1.2"},children:"DoNotDev"}),No("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"11px",fontWeight:"500",color:"#f23d29",lineHeight:"1.2"},children:"Get License"})]})]})}ve();import{useEffect as Bp,useState as Io,useMemo as Mp}from"react";import{Stack as Ao,Spinner as Op}from"@donotdev/components";import{useTranslation as fr,isFieldVisible as zp}from"@donotdev/core";import{useCrud as Vp,DisplayFieldRenderer as Up}from"@donotdev/crud";import{jsx as we,jsxs as Gp}from"react/jsx-runtime";function _p({entity:e,id:t,t:o,className:n="",loadingMessage:r,notFoundMessage:a,viewerRole:i,excludeFields:l}){let c=E("userRole"),d=i??c,{get:s,loading:p,data:g,error:u,isAvailable:m}=Vp(e),[y,v]=Io(!1),[f,x]=Io(null),[S,C]=Io(null),{t:N}=fr([e.namespace,"crud"]),{t:P}=fr("crud"),A=o||N;Bp(()=>{if(!t){C(null),x(null),v(!1);return}if(!m||!s)return;let T=!1;return v(!0),x(null),s(t).then(D=>{T||(v(!1),D?(C(D),x(null)):(C(null),x(new Error("Entity not found"))))}).catch(D=>{T||(v(!1),x(D instanceof Error?D:new Error(String(D))),C(null))}),()=>{T=!0}},[t,s,m]);let w=g||S,b=u||f,h=p||y||!t,k=Mp(()=>w?Object.entries(e.fields).filter(([T,D])=>{if(l?.includes(T)||!zp(D.visibility,d)||D.visibility==="hidden")return!1;let R=w[T];return!(R==null||typeof R=="string"&&R.trim()===""||Array.isArray(R)&&R.length===0||typeof R=="object"&&!Array.isArray(R)&&R!==null&&Object.keys(R).length===0)}):[],[e.fields,d,w,l]);return h?we("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},className:n,children:we(Op,{overlay:!0,"aria-label":r||P("form.loading",{defaultValue:"Loading..."})})}):b||!w?we(Ao,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},className:n,children:Gp(Ao,{direction:"column",gap:"tight",children:[we("h3",{style:{color:"var(--muted-foreground)"},children:a||P("errors.notFound",{defaultValue:`${e.name} not found`})}),b&&we("p",{style:{color:"var(--destructive)",fontSize:"var(--font-size-sm)"},children:b instanceof Error?b.message:String(b)})]})}):we(Ao,{direction:"column",className:n,children:k.map(([T,D])=>we(Up,{name:T,config:D,value:w[T],t:A},T))})}import{RefreshCw as Hp,Plus as Wp,Trash2 as $p,Edit as Kp,Search as Yp}from"lucide-react";import{useMemo as qp,useCallback as ot,useState as Eo}from"react";import{DataTable as Zp,Button as Lo,Stack as Po,ActionButton as jp,Section as vr,Input as Jp}from"@donotdev/components";import{useTranslation as hr}from"@donotdev/core";import{translateFieldLabel as Qp,useCrud as Xp,useCrudList as eu,EntityFilters as tu,formatValue as ou,useReferenceResolver as nu}from"@donotdev/crud";import{Fragment as au,jsx as ie,jsxs as Et}from"react/jsx-runtime";function ru({entity:e,basePath:t,onClick:o,hideFilters:n=!1,pagination:r="auto",pageSize:a,queryOptions:i,exportable:l=!0}){let c=De(),d=t??`/${e.collection}`,s=nu(e),[p,g]=Eo(1),[u,m]=Eo(a),[y,v]=Eo(""),{data:f,items:x,processed:S,loading:C,mutate:N,effectiveMode:P}=eu(e,{pagination:r,searchQuery:y,...i&&{queryOptions:i},...(r==="server"||r==="auto")&&{page:p,pageSize:u}}),{delete:A}=Xp(e),{t:w}=hr("crud"),{t:b}=hr([e.namespace,"crud"]),h=ot(async()=>{await N()},[N]),k=ot(G=>{c(`${d}/${G}`)},[d,c]),T=ot(G=>{o?o(G):c(`${d}/${G}`)},[d,c,o]),D=ot(()=>{c(`${d}/new`)},[d,c]),R=ot(async G=>{await A(G)},[A]),Oe=qp(()=>{let Te=(e.listFields||Object.keys(e.fields)).map(ee=>{let te=e.fields[ee];if(!te)return null;let fe=Qp(ee,te,b),Ve=te.type||"text";return{key:ee,title:fe,dataIndex:ee,sortable:!0,filterable:!0,align:Ve==="number"||Ve==="range"?"end":"start",render:(Ue,_e)=>ou(Ue,te,b,{compact:!0,referenceData:s})}}).filter(Boolean);return Te.unshift({key:"_actions",title:w("actions.label",{defaultValue:"Actions"}),dataIndex:void 0,sortable:!1,width:120,align:"center",render:(ee,te)=>Et(Po,{direction:"row",gap:"tight",align:"center",justify:"center",children:[ie(Lo,{variant:"outline",icon:Kp,onClick:fe=>{fe.stopPropagation(),k(te.id)},"aria-label":w("edit",{defaultValue:"Edit"})}),ie(jp,{action:async()=>{await R(te.id)},confirmText:w("delete.confirm",{defaultValue:"Are you sure you want to delete this item?"}),confirmTitle:w("delete.title",{defaultValue:"Delete Item"}),loadingText:w("delete.loading",{defaultValue:"Deleting..."}),variant:"destructive",icon:$p,"aria-label":w("delete",{defaultValue:"Delete"}),children:w("delete",{defaultValue:"Delete"})})]})}),Te},[e,b,w,k,R]),X=b("name",{defaultValue:e.name}),ze=S.length;return Et(au,{children:[ie(vr,{title:w("filters.title",{entity:X,defaultValue:`Browse ${X} - Filters`}),collapsible:!0,defaultOpen:!0,children:Et(Po,{children:[Et(Po,{direction:"row",gap:"tight",align:"center",className:"dndev-w-full",style:{display:"grid",gridTemplateColumns:"1fr auto auto"},children:[ie(Jp,{placeholder:w("search.placeholder",{defaultValue:"Search..."}),value:y,onChange:G=>v(G.target.value),icon:Yp,className:"dndev-w-full"}),ie(Lo,{icon:Hp,variant:"outline",onClick:h,disabled:C,display:"compact","aria-label":w("refresh",{defaultValue:"Refresh"})}),ie(Lo,{icon:Wp,onClick:D,display:"compact",children:w("addNew",{defaultValue:"Add New"})})]}),!n&&ie(tu,{entity:e,data:x,fieldsToFilter:e.listFields})]})}),ie(vr,{title:C?w("results.title.fetching",{defaultValue:"Fetching..."}):w("results.title.count",{count:ze,defaultValue:ze===1?"Found 1 occurrence":`Found ${ze} occurrences`}),collapsible:!0,defaultOpen:!0,children:ie(Zp,{data:S,columns:Oe,sortable:!0,searchable:!1,pagination:!0,loading:C,onRowClick:G=>T(G.id),showingLabel:w("pagination.showing",{defaultValue:"Showing {{from}} to {{to}} of {{total}} entries"}),paginationPreviousLabel:w("pagination.previous",{defaultValue:"Previous"}),paginationNextLabel:w("pagination.next",{defaultValue:"Next"}),paginationItemsPerPagePlaceholder:w("pagination.itemsPerPagePlaceholder",{defaultValue:"Items per page"}),...a&&{pageSize:a},...P==="server"&&{currentPage:p,pageSize:u,total:f?.total,onPageChange:g,onPageSizeChange:m},exportable:l,exportFilename:`${e.collection}-export`,exportLabel:w("export",{defaultValue:"Export"})})})]})}import{useMemo as br,useCallback as su}from"react";import{Heart as Sr}from"lucide-react";import{Card as lu,Grid as cu,Stack as Ro,Text as Cr,Spinner as du,Section as xr,Button as pu}from"@donotdev/components";import{useTranslation as kr,getListCardFieldNames as uu}from"@donotdev/core";import{useCrudCardList as mu,EntityFilters as gu,useEntityFavorites as fu,useCrudFilters as vu}from"@donotdev/crud";import{CrudCard as iu}from"@donotdev/crud";import{jsx as yr}from"react/jsx-runtime";function Lt({detailHref:e,onClick:t,...o}){let n=yr(iu,{...o,onClick:e?void 0:t});return e?yr(I,{path:e,"aria-label":o.item?.id?`View ${o.item.id}`:void 0,children:n}):n}import{Fragment as yu,jsx as K,jsxs as Do}from"react/jsx-runtime";function hu({entity:e,basePath:t,onClick:o,cols:n=[1,2,3,4],staleTime:r=1e3*60*30,filter:a,hideFilters:i=!1,resultLabel:l,tone:c}){let d=De(),s=t??`/${e.collection}`,{items:p,processed:g,loading:u}=mu(e,{staleTime:r}),{isFavorite:m,toggleFavorite:y,favoritesFilter:v}=fu({collection:e.collection}),{showFavoritesOnly:f,setShowFavoritesOnly:x}=vu({collection:e.collection}),S=br(()=>{let b=g;return f&&(b=b.filter(v)),a&&(b=b.filter(a)),b},[g,f,v,a]),{t:C}=kr([e.namespace,"crud"]),{t:N}=kr("crud"),P=su(b=>{o?o(b):d(`${s}/${b}`)},[s,d,o]),A=br(()=>uu(e),[e]),w=C("name",{defaultValue:e.name});return Do(yu,{children:[!i&&K(xr,{title:N("filters.title",{entity:w,defaultValue:`Browse ${w} - Filters`}),collapsible:!0,defaultOpen:!0,tone:c,children:K(lu,{children:Do(Ro,{direction:"column",children:[K(pu,{variant:f?"primary":"outline",icon:K(Sr,{size:18}),onClick:()=>x(!f),children:f?N("favorites.showAll",{defaultValue:"Show All"}):N("favorites.showFavorites",{defaultValue:"Show Favorites"})}),K(gu,{entity:e,data:p,fieldsToFilter:A})]})})}),K(xr,{title:u?N("results.title.fetching",{defaultValue:"Fetching..."}):l?l(S.length):N("results.title.count",{count:S.length,defaultValue:S.length===1?"Found 1 occurrence":`Found ${S.length} occurrences`}),collapsible:!0,defaultOpen:!0,tone:c,children:u?K(Ro,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)"},children:K(du,{})}):S.length===0?Do(Ro,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[K(Cr,{level:"h3",style:{color:"var(--muted-foreground)"},children:N("emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),K(Cr,{style:{color:"var(--muted-foreground)"},children:N("emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):K(cu,{cols:n,children:S.map(b=>{let h=m(b.id),k=o?void 0:`${s}/${b.id}`;return K(Lt,{item:b,entity:e,detailHref:k,onClick:o?()=>P(b.id):void 0,renderActions:K(Sr,{fill:h?"#ef4444":"#ffffff",stroke:h?"#ef4444":"var(--muted-foreground)",onClick:T=>{T.preventDefault(),T.stopPropagation(),y(b.id)},style:{cursor:"pointer",width:"var(--icon-md)",height:"var(--icon-md)",transition:"fill 0.2s, stroke 0.2s"},"aria-label":h?N("favorites.remove",{defaultValue:"Remove from favorites"}):N("favorites.add",{defaultValue:"Add to favorites"})})},b.id)})})})]})}import{useEffect as wr,useId as bu,useMemo as Pt,useState as Su}from"react";import{FormProvider as Cu}from"react-hook-form";import{Badge as xu,Button as Rt,DropdownMenu as ku,Grid as wu,Stack as Tu,Spinner as Nu}from"@donotdev/components";import{hasRoleAccess as Iu,useTranslation as Tr}from"@donotdev/core";ve();import{DisplayFieldRenderer as Au,FormFieldRenderer as Eu,UploadProvider as Lu,useEntityForm as Pu,useUnsavedChangesWarning as Ru,useFormStore as Du,useFieldConditions as Fu}from"@donotdev/crud";import{jsx as q,jsxs as Dt}from"react/jsx-runtime";function Fo({entity:e,onSubmit:t,t:o,className:n="",submitText:r,loading:a=!1,defaultValues:i,submitVariant:l="primary",secondaryButtonText:c,secondaryButtonVariant:d="outline",onSecondarySubmit:s,viewerRole:p,operation:g=i?"edit":"create",formId:u,cancelText:m,cancelPath:y,successPath:v,onCancel:f,warnOnUnsavedChanges:x=!0,unsavedChangesMessage:S,hideVisibilityInfo:C=!1}){let N=De(),P=E("userRole"),A=p??P,w=bu(),b=u??`entity-form-${e.name}-${w}`,{t:h}=Tr([e.namespace,"crud"]),{t:k}=Tr("crud"),T=o||h,R=!C&&(A==="admin"||A==="super"),Oe=A==="user"||A==="admin"||A==="super",[X,ze]=Su(A==="admin"||A==="super"||A==="user"?A:"guest"),G={guest:"muted",user:"secondary",admin:"warning",super:"destructive",technical:"accent",owner:"secondary"},Te=["guest","user","admin","super"],ee={guest:"Guest",user:"User",admin:"Admin",super:"Super",technical:"System"},te=Pt(()=>Te.filter(L=>Iu(A,L)).map(L=>({label:ee[L],checked:X===L,onClick:()=>ze(L)})),[X,A]),fe=Pu(e,{formId:b,operation:g,defaultValues:i,viewerRole:A,t:T}),{control:Ve,handleSubmit:Bo,formState:{errors:Mo},fields:Ue,formStatus:_e,uploadProgress:Ge,cleanup:Oo,isDirty:Pr,hasUserInteracted:Rr,resetForm:Dr}=fe,Mt=Pr&&Rr,zo=Pt(()=>{if(!Oe)return Ue;let L=Te.indexOf(X);return Ue.filter(({config:O})=>{let oe=O.visibility;return oe==="hidden"?!1:oe==="technical"?!0:Te.indexOf(oe)<=L})},[Ue,Oe,X]),Fr=Fu(zo,Ve);wr(()=>{b&&Du.getState().setIsDirty(b,Mt)},[b,Mt]),wr(()=>Oo,[Oo]);let Br=Pt(()=>S||k("messages.unsavedChangesLeave",{defaultValue:"You have unsaved changes. Are you sure you want to leave?"}),[S,k]);Ru({isDirty:Mt,enabled:x,message:Br});let Mr=()=>{Dr(),f?f():N(y||"back")},Or=async L=>{try{await t(L),N(v||"back")}catch{}},zr=m!==null,Vo=m??k("form.cancel",{defaultValue:"Cancel"}),Uo={gridColumn:"1 / -1",position:"sticky",bottom:0,backgroundColor:"var(--background)",borderTop:"1px solid var(--border)",paddingTop:"var(--gap-md)",paddingBottom:"var(--gap-md)",zIndex:10,marginTop:"var(--gap-lg)"},Vr=a||g==="edit"&&!i,se=Pt(()=>_e==="uploading"?{loading:!0,loadingText:Ge<100?k("form.uploading",{progress:Math.round(Ge),defaultValue:`Uploading ${Math.round(Ge)}%...`}):k("form.processing",{defaultValue:"Processing..."}),progress:Ge}:_e==="validating"?{loading:!0,loadingText:k("form.validating",{defaultValue:"Validating..."})}:_e==="submitting"?{loading:!0,loadingText:k("form.saving",{defaultValue:"Saving..."})}:{loading:!1},[_e,Ge,k]);return q(Cu,{...fe,children:q(Lu,{formId:b,children:Dt("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},children:[Vr&&q(Nu,{overlay:!0}),Dt("form",{onSubmit:Bo(Or),noValidate:!0,className:n,style:{width:"100%",gridColumn:"1 / -1",display:"contents"},children:[zo.map(({name:L,config:O,editable:oe})=>{let Y=Fr[L];if(Y&&!Y.visible)return null;let _o=Y?{...O,...Y.required&&O.validation?{validation:{...O.validation,required:!0}}:Y.required?{validation:{required:!0}}:{}}:O,Ur=oe&&!Y?.disabled&&!Y?.readonly,_r=R&&O.visibility!=="guest",Gr=O.visibility!=="hidden"?G[O.visibility]:void 0,Hr=ee[O.visibility]??O.visibility,Go=Ur?q(Eu,{name:L,config:_o,control:Ve,errors:Mo,t:T},L):q(Au,{name:L,config:_o,value:i?.[L],t:T},L);return _r?Dt("div",{style:{position:"relative"},children:[q(xu,{as:"span",variant:Gr,style:{position:"absolute",top:0,insetInlineEnd:0,fontSize:"var(--font-size-xs)",zIndex:1},children:Hr}),Go]},L):Go}),(()=>{let L=[];if(zr&&Vo&&L.push(q(Rt,{type:"button",onClick:Mr,disabled:se.loading,variant:"outline",className:"dndev-w-full",children:Vo},"cancel")),Oe){let Y=G[X]||"muted";L.push(q(ku,{trigger:Dt(Rt,{type:"button",variant:Y,disabled:se.loading,className:"dndev-w-full",children:[k("visibility.preview",{defaultValue:"Preview"}),": ",ee[X]]}),items:te},"preview"))}c&&L.push(q(Rt,{type:"button",onClick:()=>{if(s){let Y=fe.getValues();s(Y)}},loading:se.loading,loadingText:se.loadingText,progress:se.progress,variant:d,className:"dndev-w-full",children:c},"secondary")),L.push(q(Rt,{type:"submit",loading:se.loading,loadingText:se.loadingText,progress:se.progress,variant:l,className:"dndev-w-full",children:r||k("form.submit",{defaultValue:"Submit"})},"submit"));let O=L.length;if(O===1)return q(Tu,{direction:"column",gap:"tight",style:Uo,children:L[0]});let oe=O===2?"1fr 2fr":O===3?"1fr 1fr 2fr":"1fr 1fr 1fr 2fr";return q(wu,{cols:["1fr",oe,oe,oe],gap:"tight",style:Uo,children:L})})()]})]})})})}import{Section as Bu}from"@donotdev/components";import{useCrudCardList as Mu}from"@donotdev/crud";import{jsx as Nr}from"react/jsx-runtime";function Ou({entity:e,queryOptions:t,title:o,basePath:n,cols:r=3,className:a}){let{items:i,loading:l}=Mu(e,{queryOptions:t});if(!l&&i.length===0)return null;let c=n??`/${e.collection}`;return Nr(Bu,{title:o,gridCols:r,className:a,children:i.map(d=>Nr(Lt,{item:d,entity:e,detailHref:`${c}/${d.id}`},d.id))})}import{Button as zu,Stack as Vu,Stepper as Uu}from"@donotdev/components";import{useTranslation as _u}from"@donotdev/core";import{useEntityWorkflow as Gu}from"@donotdev/crud";import{Fragment as Wu,jsx as Ft,jsxs as $u}from"react/jsx-runtime";function Hu({workflow:e,onComplete:t,onStepChange:o,defaultValues:n,viewerRole:r,children:a,className:i}){let{t:l}=_u("crud"),c=Gu(e,{onComplete:t,onStepChange:o,defaultValues:n});if(a)return Ft(Wu,{children:a(c)});let{currentStep:d,currentStepIndex:s,visibleSteps:p,isFirst:g,isLast:u,isSubmitting:m,stepData:y}=c,v=p.map((f,x)=>({number:x+1,title:f.title,content:null}));return $u(Vu,{className:i,gap:"large",children:[Ft(Uu,{steps:v,activeStep:s,showStepNumbers:!0,onStepChange:f=>{f<=s&&c.goToStep(f)}}),d.custom?d.custom(c.allData):d.entity?Ft(Fo,{entity:d.entity,operation:"create",viewerRole:r,defaultValues:{...y[d.id],...!u&&{status:"draft"}},onSubmit:async f=>{await c.goNext(f)},submitText:u?l("workflow.submit",{defaultValue:"Submit"}):l("workflow.next",{defaultValue:"Next"}),cancelText:g?null:l("workflow.previous",{defaultValue:"Previous"}),onCancel:g?void 0:c.goPrevious,loading:m,warnOnUnsavedChanges:!1,hideVisibilityInfo:!0}):null,d.allowSkip&&!u&&Ft(zu,{variant:"ghost",onClick:c.skipStep,className:"dndev-w-full",children:l("workflow.skip",{defaultValue:"Skip this step"})})]})}import{createContext as Ar,useId as Ku,use as Ir}from"react";import{Controller as Yu,FormProvider as qu,useFormContext as Zu}from"react-hook-form";import{Label as ju,Slot as Ju,cn as Qu,Stack as Xu}from"@donotdev/components";import{jsx as ge}from"react/jsx-runtime";var O3=qu,Er=Ar({}),z3=({...e})=>ge(Er.Provider,{value:{name:e.name},children:ge(Yu,{...e})}),Lr=Ar({}),V3=({className:e,...t})=>{let o=Ku();return ge(Lr.Provider,{value:{id:o},children:ge(Xu,{className:e,...t})})},Bt=()=>{let e=Ir(Er);if(!e||!e.name)return null;let t=Ir(Lr);if(!t)return null;let{getFieldState:o,formState:n}=Zu(),r=o(e.name,n),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...r}},U3=({className:e,...t})=>{let o=Bt();if(!o)return null;let{error:n,formItemId:r}=o;return ge(ju,{className:Qu(n&&"text-destructive",e),htmlFor:r,...t})},_3=({...e})=>{let t=Bt();if(!t)return null;let{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=t;return ge(Ju,{id:n,"aria-describedby":o?`${r} ${a}`:`${r}`,"aria-invalid":!!o,...e})},G3=({className:e,...t})=>{let o=Bt();if(!o)return null;let{formDescriptionId:n}=o;return ge("p",{id:n,className:e,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},...t})},H3=({className:e,children:t,...o})=>{let n=Bt();if(!n)return null;let{error:r,formMessageId:a}=n,i=r?String(r?.message):t;return i?ge("p",{id:a,className:e,style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:"var(--destructive)"},...o,children:i}):null};var em={layoutContainer:"dndev-layout",sidebar:"sidebar",sidebarTop:"sidebar-top",sidebarContent:"sidebar-content",sidebarBottom:"sidebar-bottom",sidebarResizeHandle:"dndev-sidebar-resize-handle",header:"header",main:"main",footer:"footer",container:"dndev-container",pageContainer:"dndev-container",breadcrumbsContainer:"breadcrumbs-container"},tm={zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zOverlay:"dndev-z-overlay",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},e5={...em,...tm},t5={headerHeight:"--header-height",headerPadding:"--header-padding",headerIconSize:"--header-icon-size",headerLogoMaxHeight:"--header-logo-max-height",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",mainPadding:"--main-padding",mainMaxWidth:"--main-max-width",contentWidth:"--content-width",contentPadding:"--content-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zOverlay:"--z-overlay",zModal:"--z-modal",zTooltip:"--z-tooltip",zToast:"--z-toast"},o5={headerHeight:"--header-height",headerPadding:"--header-padding",logoSize:"--logo-size",sidebarWidth:"--sidebar-width",sidebarPadding:"--sidebar-padding",footerHeight:"--footer-height",footerPadding:"--footer-padding",layoutGap:"--layout-gap",sectionGap:"--gap-lg",contentGap:"--content-gap",zHeader:"--z-header",zSidebar:"--z-sidebar",zFooter:"--z-footer",zModal:"--z-modal",zTooltip:"--z-tooltip"};export{Oc as AppBranding,Uc as AppIcon,cl as AppLoading,Hc as AppTitle,H as AssetResolver,Ta as AuthGuard,k1 as AuthGuardFallback,ao as AuthHeader,no as AuthMenu,td as Breadcrumbs,ho as CacheSettings,o0 as ConsentBanner,hn as DnDevNavigationMenu,Cd as DropdownNavigation,hu as EntityCardList,_p as EntityDisplayRenderer,Fo as EntityFormRenderer,ru as EntityList,Ou as EntityRecommendations,Hu as EntityWorkflow,nc as FeatureCard,yl as FeatureDisabled,Td as FloatingLanguageSwitcher,To as FooterBranding,xp as FooterCopyright,Lp as FooterLegalLinks,O3 as Form,_3 as FormControl,G3 as FormDescription,z3 as FormField,V3 as FormItem,U3 as FormLabel,H3 as FormMessage,s0 as GameContainer,p0 as GameFlow,ad as GameTitle,E1 as GoTo,Wi as GoToInput,Bi as GoToWrapper,Pd as HeaderMenu,zd as HeaderNavigation,Yr as Icon,Oh as LicenseWatermark,I as Link,at as Loader,Pl as LoadingContainerOverlay,Ct as LoadingMessage,xl as LoadingMessageAlmostDone,kl as LoadingMessageComplete,Il as LoadingMessageConnecting,Cl as LoadingMessageProcessing,wl as LoadingMessageSaving,Nl as LoadingMessageSearching,Sl as LoadingMessageSimple,Tl as LoadingMessageUploading,Rl as LoadingOverlay,Bl as LoadingScreen,yn as NotFoundPage,Zd as Notifications,ut as PageContainer,ql as ProgressBar,$l as RedirectOverlay,sp as SettingsMenu,Jl as Skeleton,wc as TechBento,gp as ThemeToggle,e5 as allLayoutClasses,$m as createAuthConfig,o5 as cssVariables,km as isAuthAvailable,sf as isBillingAvailable,ef as isFormStoreAvailable,ff as isOAuthAvailable,em as layoutClasses,tm as layoutUtilities,t5 as layoutVariables,Jg as resolveFaviconSet,jg as resolveLogo,Be as sanitizeSvg,Sf as tList,uo as techLogos,E as useAuthSafe,Hm as useAuthState,ht as useAuthVisibility,Og as useBack,pf as useBillingVisibility,Um as useCanAccess,Na as useCanNavigate,Bt as useFormField,cs as useFormStoreSafe,sn as useGoTo,Gm as useHasRole,Ug as useLocation,Wg as useMatch,De as useNavigate,W as useNavigationItems,rn as useNavigationRoute,gf as useOAuthSafe,_g as useParams,Vg as usePrefetch,$g as useQueryParams,Kg as useRedirectGuard,zg as useRefresh,Gg as useRouteParam,Hg as useSearchParams,to as useStripeBillingSafe,_m as useUserRole,Wm as withAuth};