@donotdev/ui 0.0.27 → 0.0.29
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/crud/components/EntityRecommendations.d.ts +1 -1
- package/dist/crud/components/EntityRecommendations.d.ts.map +1 -1
- package/dist/crud/components/EntityRecommendations.js +4 -4
- package/dist/data/techLogos.d.ts +1 -1
- package/dist/data/techLogos.d.ts.map +1 -1
- package/dist/data/techLogos.js +7 -0
- package/dist/index.js +4 -4
- package/dist/routing/Link.d.ts +2 -0
- package/dist/routing/Link.d.ts.map +1 -1
- package/dist/routing/Link.js +9 -9
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityRecommendations.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityRecommendations.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAKjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"EntityRecommendations.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityRecommendations.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAKjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,IAAgB,EAChB,SAAS,GACV,EAAE,0BAA0B,kDA0D5B"}
|
|
@@ -50,11 +50,11 @@ import { CrudCard } from './CrudCardLink';
|
|
|
50
50
|
* />
|
|
51
51
|
* ```
|
|
52
52
|
*
|
|
53
|
-
* @version 0.0.
|
|
53
|
+
* @version 0.0.3
|
|
54
54
|
* @since 0.0.15
|
|
55
55
|
* @author AMBROISE PARK Consulting
|
|
56
56
|
*/
|
|
57
|
-
export function EntityRecommendations({ entity, queryOptions, title, basePath, cols = 3, className, }) {
|
|
57
|
+
export function EntityRecommendations({ entity, queryOptions, title, basePath, cols = [1, 1, 3, 3], className, }) {
|
|
58
58
|
// Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
|
|
59
59
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
60
60
|
if (!isCrudModuleAvailable)
|
|
@@ -76,8 +76,8 @@ export function EntityRecommendations({ entity, queryOptions, title, basePath, c
|
|
|
76
76
|
laptop: 2,
|
|
77
77
|
desktop: 3,
|
|
78
78
|
};
|
|
79
|
-
const currentCols = (Array.isArray(cols) ? cols[bpIndex[bp] ?? 3] : cols) ?? 1;
|
|
80
|
-
const skeletonCount = currentCols * 3;
|
|
79
|
+
const currentCols = (Array.isArray(cols) ? cols[bpIndex[bp] ?? 3] : typeof cols === 'number' ? cols : 3) ?? 1;
|
|
80
|
+
const skeletonCount = (typeof currentCols === 'number' ? currentCols : 3) * 3;
|
|
81
81
|
return (_jsx(Section, { title: resolvedTitle, gridCols: cols, className: className, children: loading
|
|
82
82
|
? Array.from({ length: skeletonCount }, (_, i) => (_jsx(Card, { title: _jsx(Skeleton, { width: "60%" }), subtitle: _jsx(Skeleton, { width: "40%" }), content: _jsxs(Stack, { direction: "column", gap: "tight", children: [_jsx(Skeleton, { width: "80%" }), _jsx(Skeleton, { width: "50%" })] }), elevated: true }, i)))
|
|
83
83
|
: items.map((item) => (_jsx(CrudCard, { item: item, entity: entity, detailHref: `${resolvedBasePath}/${item.id}` }, item.id))) }));
|
package/dist/data/techLogos.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type TechLogo = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Available tech logo keys
|
|
22
22
|
*/
|
|
23
|
-
export type TechKey = 'bun' | 'typescript' | 'react' | 'vite' | 'nextjs' | 'nodejs' | 'firebase' | 'vercel' | 'stripe' | 'valibot';
|
|
23
|
+
export type TechKey = 'bun' | 'typescript' | 'react' | 'vite' | 'nextjs' | 'nodejs' | 'firebase' | 'supabase' | 'vercel' | 'stripe' | 'valibot';
|
|
24
24
|
/**
|
|
25
25
|
* Tech logos collection with data URIs and brand colors
|
|
26
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"techLogos.d.ts","sourceRoot":"","sources":["../../src/data/techLogos.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"techLogos.d.ts","sourceRoot":"","sources":["../../src/data/techLogos.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAmCH;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,OAAO,GACf,KAAK,GACL,YAAY,GACZ,OAAO,GACP,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,QAAQ,CAwD/C,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/dist/data/techLogos.js
CHANGED
|
@@ -25,6 +25,8 @@ const vercelSvg = `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/
|
|
|
25
25
|
const stripeSvg = `<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>`;
|
|
26
26
|
// Valibot - Multi-color (uses embedded gradients)
|
|
27
27
|
const valibotSvg = `<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>`;
|
|
28
|
+
// Supabase - #3FCF8E
|
|
29
|
+
const supabaseSvg = `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#3FCF8E" d="M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z"/></svg>`;
|
|
28
30
|
// Bun - #FBF0DF
|
|
29
31
|
const bunSvg = `<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>`;
|
|
30
32
|
/**
|
|
@@ -73,6 +75,11 @@ export const techLogos = {
|
|
|
73
75
|
color: '#DD2C00',
|
|
74
76
|
name: 'Firebase',
|
|
75
77
|
},
|
|
78
|
+
supabase: {
|
|
79
|
+
svg: `data:image/svg+xml,${encodeURIComponent(supabaseSvg)}`,
|
|
80
|
+
color: '#3FCF8E',
|
|
81
|
+
name: 'Supabase',
|
|
82
|
+
},
|
|
76
83
|
vercel: {
|
|
77
84
|
svg: `data:image/svg+xml,${encodeURIComponent(vercelSvg)}`,
|
|
78
85
|
color: 'var(--foreground, #000000)',
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use client";import{a as
|
|
1
|
+
"use client";import{a as H,b as kn,c as P,d as gu,e as Z,f as xo,g as vu}from"./chunk-XHGRMKOY.js";import{a as Ge}from"./chunk-O2XFH626.js";import{User as Ki}from"lucide-react";import{Suspense as Ot,lazy as Zo,useState as Yi}from"react";import{Button as qi,BUTTON_VARIANT as Zi,DropdownMenu as Ji,Dialog as Qi,DISPLAY as Xi}from"@donotdev/components";import{useTranslation as ji}from"@donotdev/core";import{useAuthConfig as es}from"@donotdev/core";import{getEnabledAuthPartners as ts}from"@donotdev/core";import{User as ki,LogOut as Ti,Settings as Be,UserCheck as Ei,Trash2 as Ai}from"lucide-react";import*as Ii from"lucide-react";import je,{useMemo as Ni,lazy as $o,Suspense as Wo}from"react";import{Avatar as Pi,Button as Ri,BUTTON_VARIANT as Li,DropdownMenu as Di,Text as Fi,DISPLAY as Bi}from"@donotdev/components";import{useTranslation as Mi}from"@donotdev/core";import{getEnabledAuthPartners as zi,useAuthConfig as Oi,isClient as Vi}from"@donotdev/core";import{useBreakpoint as Ui}from"@donotdev/core";import{useNavigate as _i}from"@donotdev/ui/routing/hooks";import{Link as We}from"lucide-react";import"react";import"@donotdev/components";import{useConsent as Tn}from"@donotdev/core";import{useNavigate as En}from"@donotdev/ui/routing/hooks";import{Fragment as An,jsx as ie,jsxs as wo}from"react/jsx-runtime";var T=({path:e,replace:t,prefetch:o=!0,children:r,icon:n,iconEnd:a=!1,label:i,onClick:s,className:c,"aria-label":d,"aria-describedby":l,target:u,rel:f,...p})=>{let m=En(),v=Tn("showCookieBanner");if(e==="#cookie-settings")return wo("a",{href:"#cookie-settings",onClick:A=>{A.preventDefault(),A.stopPropagation();try{v()}catch{}s&&s(A)},className:c,style:{display:n&&(i||r)?"flex":void 0,alignItems:n&&(i||r)?"center":void 0,gap:n&&(i||r)?"var(--gap-sm)":void 0,...p.style},"aria-label":d||i||"Cookie Settings","aria-describedby":l,...p,children:[n&&!a&&ie(H,{icon:n,fallback:We}),i&&ie("span",{children:i}),r,n&&a&&ie(H,{icon:n,fallback:We})]});let y=e.startsWith("http://")||e.startsWith("https://")||e.startsWith("mailto:")||e.startsWith("tel:"),g=b=>{if(y){s&&s(b);return}b.preventDefault(),s&&s(b);let A=e.startsWith("/")||e.startsWith(".")?e:`/${e}`;m(A,{replace:t})},S={"aria-label":d||i,"aria-describedby":l},x=wo(An,{children:[n&&!a&&ie(H,{icon:n,fallback:We}),i&&ie("span",{children:i}),r,n&&a&&ie(H,{icon:n,fallback:We})]});return y?ie("a",{href:e,onClick:g,target:u||"_blank",rel:f||"noopener noreferrer",className:c,style:{display:n&&(i||r)?"flex":void 0,alignItems:n&&(i||r)?"center":void 0,gap:n&&(i||r)?"var(--gap-sm)":void 0},...S,...p,children:x}):ie("a",{href:e,onClick:g,className:c,style:{display:n&&i?"flex":void 0,alignItems:n&&i?"center":void 0,gap:n&&i?"var(--gap-sm)":void 0},...S,...p,children:x})};import{useEffect as ko,useState as In,lazy as Nn,Suspense as Pn}from"react";import{Spinner as To,Stack as Eo}from"@donotdev/components";import{FEATURE_STATUS as kt,USER_ROLES as $e,SUBSCRIPTION_TIERS as Tt}from"@donotdev/core";import{useRedirectGuard as Rn,useNavigate as Ln}from"@donotdev/ui/routing/hooks";import{Fragment as Ao,jsx as z,jsxs as Io}from"react/jsx-runtime";var Dn=Nn(()=>import("./CookieConsent-UVTR7CWW.js"));function Fn({auth:e,children:t,fallback:o=()=>z(To,{overlay:!0})}){let r=Ln(),n=P("user"),a=P("can"),i=P("status"),[s,c]=In(!1),{shouldRedirect:d,redirectTo:l,isChecking:u}=Rn({auth:e});return ko(()=>{let f=setTimeout(()=>{i===kt.INITIALIZING&&c(!0)},5e3);return()=>clearTimeout(f)},[i]),ko(()=>{d&&l&&r(l,{replace:!0})},[d,l,r]),e===!1?z(Ao,{children:t}):d||u?z(To,{overlay:!0}):i===kt.INITIALIZING&&s?z(Eo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Io("div",{className:"dndev-w-full",style:{maxWidth:"28rem",textAlign:"center"},children:[z("h2",{style:{marginBottom:"var(--gap-md)"},children:"Loading is taking longer than usual"}),z("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."}),z("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===kt.INITIALIZING?z(o,{}):e&&typeof e=="object"&&e.required&&!n&&a&&!a.navigate(e)?z(Eo,{align:"center",justify:"center",style:{padding:"var(--gap-md)",minHeight:"100vh"},children:Io("div",{className:"dndev-w-full",style:{maxWidth:"28rem"},children:[z("h2",{style:{marginBottom:"var(--gap-md)"},children:"Authentication Required"}),z("p",{style:{marginBottom:"var(--gap-md)"},children:"This page requires authentication. Please accept functional cookies to continue."}),z(Pn,{fallback:z("div",{children:"Loading consent..."}),children:z(Dn,{})})]})}):z(Ao,{children:t})}function Bn(e){return P("can")?.navigate(e)??!1}var Lu=Bn;function Du(){return P("user")?.role||$e.GUEST}function Fu(e){return P("user")?.role===e}function Bu(){let e=P("user"),t=P("userSubscription"),o=P("loading");return{authenticated:!!e,role:e?.role,tier:t?.tier||"free",loading:o,userId:e?.id}}function Mu(e,t){return r=>z(Fn,{auth:t,children:z(e,{...r})})}var zu={public:()=>!1,required:()=>({required:!0}),user:()=>({required:!0,role:$e.USER}),admin:()=>({required:!0,role:$e.ADMIN}),tier:e=>({required:!0,tier:e}),pro:()=>({required:!0,tier:Tt.PRO}),premium:()=>({required:!0,tier:Tt.PREMIUM}),adminPro:()=>({required:!0,role:$e.ADMIN,tier:Tt.PRO}),custom:e=>({required:!0,validate:e})};import{ArrowLeft as oa,Lock as ra}from"lucide-react";import{Suspense as na,lazy as aa}from"react";import{Card as ia,Button as sa,Separator as la,Stack as Se,cn as ca}from"@donotdev/components";import{useTranslation as da}from"@donotdev/core";import"@donotdev/core";import{useLocation as ua,useBack as pa}from"@donotdev/ui/routing/hooks";import{Suspense as jn}from"react";import{cn as ea}from"@donotdev/components";import{Component as Mn}from"react";import{handleError as zn}from"@donotdev/core";var Et=class extends Mn{constructor(o){super(o);Ge(this,"resetError",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(o){return{hasError:!0,error:o}}componentDidCatch(o,r){zn(o,{userMessage:`A ${this.props.level||"component"} error occurred`,context:{errorInfo:r,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}},No=Et;import{AlertTriangle as On,Home as Vn,ArrowLeft as Un,RotateCw as _n,Copy as Hn,Check as Gn}from"lucide-react";import{useEffect as Wn,useState as $n}from"react";import{Button as Ke,BUTTON_VARIANT as Ye,Card as Po,CARD_VARIANT as Ro,Alert as Kn,ALERT_VARIANT as Yn,Stack as be}from"@donotdev/components";import{handleError as qn,useTranslation as Zn}from"@donotdev/core";import{useLocation as Jn,useBack as Qn}from"@donotdev/ui/routing/hooks";import{jsx as U,jsxs as ue}from"react/jsx-runtime";var Xn=({error:e,resetError:t,componentStack:o,eventId:r})=>{let{t:n}=Zn("dndev"),[a,i]=$n(!1),s=Qn(),d=Jn()?.pathname||(typeof window<"u"?window.location.pathname:"/"),l=e instanceof Error?e.message:"Unknown error",u=e instanceof Error?e.stack:void 0,f=!1;Wn(()=>{try{qn(e,{userMessage:"Page encountered an error",context:{component:"RouteErrorFallback",location:d}})}catch{}},[e,d]);let p=async()=>{if(!u)return;let y=[`Error: ${l}`,`Timestamp: ${new Date().toISOString()}`,`User Agent: ${navigator.userAgent}`,r?`Event ID: ${r}`:null,`Path: ${d}`,"","Stack Trace:",u,o?`
|
|
2
2
|
Component Stack:`:null,o||null].filter(Boolean).join(`
|
|
3
|
-
`);try{await navigator.clipboard.writeText(y),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},p=()=>{try{t()}catch{typeof window<"u"&&window.location.reload()}},v=()=>{try{s()}catch{typeof window<"u"&&window.history.back()}};return U("div",{className:"dndev-container","data-variant":"standard","data-centered":"true",children:U(Po,{variant:Ro.DEFAULT,elevated:!0,className:"dndev-w-full",style:{maxWidth:"65ch",margin:"0 auto"},children:de(be,{gap:"large",align:"center",className:"dndev-text-center",children:[U(be,{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(On,{style:{width:"2.5rem",height:"2.5rem",color:"var(--destructive)"},"aria-hidden":"true"})}),de(be,{children:[U("h1",{className:"dndev-text-base","data-level":"h1",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-bold)",margin:0},children:n("routeError.title","Something went wrong")}),U("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:n("routeError.description","We encountered an error while loading this page.")}),U(Kn,{variant:Yn.INFO,hideIcon:!0,children:U("div",{style:{fontSize:"var(--font-size-sm)",textAlign:"center"},children:n("routeError.dataSafe","Don't worry, your data is safe.")})})]}),r&&de("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:[n("routeError.errorId","Error ID"),": ",r]}),f&&l&&de(Po,{variant:Ro.MUTED,className:"dndev-w-full",children:[de(be,{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($e,{variant:Ke.GHOST,icon:a?Gn:Hn,onClick:m,disabled:a,children:a?n("routeError.copied","Copied"):n("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:l})]}),de(be,{className:"dndev-w-full",children:[U($e,{variant:Ke.DESTRUCTIVE,icon:_n,onClick:p,fullWidth:!0,children:n("routeError.tryAgain","Try Again")}),de(be,{direction:"row",justify:"center",children:[U(T,{path:"/",children:U($e,{variant:Ke.DEFAULT,icon:Vn,fullWidth:!0,children:n("routeError.goHome","Go Home")})}),U($e,{variant:Ke.OUTLINE,icon:Un,onClick:v,fullWidth:!0,children:n("routeError.goBack","Go Back")})]})]}),U("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",margin:0},children:n("routeError.contactSupport","If the problem persists, please contact support.")})]})})})},Lo=Xn;import{jsx as Le}from"react/jsx-runtime";function ta(e){return Le(jn,{fallback:Le("div",{children:"Loading error fallback..."}),children:Le(Lo,{...e})})}var Ye=({variant:e="standard",density:t,className:o,children:r,centered:n=!0,gapFirst:a=!1})=>Le(No,{level:"route",fallback:ta,children:Le("div",{className:ea("dndev-container",o),"data-variant":e,"data-density":t,"data-centered":n?"true":"false","data-gap-first":a?"true":void 0,children:r})});import{Fragment as fa,jsx as M,jsxs as De}from"react/jsx-runtime";var ma=aa(()=>import("@donotdev/auth").then(e=>({default:e.MultipleAuthProviders})));function fp({title:e,description:t,showBackButton:o=!0,onBack:r,className:n=""}){let{t:a}=da(["auth","common"]),i=ua(),s=pa(),c=()=>{r?r():s()};return M(Ye,{variant:"docs",children:M(Se,{align:"center",justify:"center",className:ca("dndev-min-h-60",n),style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:M(ia,{className:"dndev-w-full",style:{maxWidth:"28rem",border:"none",boxShadow:"var(--shadow-xl)"},title:De(Se,{children:[M(Se,{justify:"center",children:M("div",{style:{borderRadius:"9999px",backgroundColor:"color-mix(in oklab, var(--primary) 10%, transparent)",padding:"var(--gap-md)"},children:M(ra,{className:"dndev-size-touch",style:{color:"var(--primary)"}})})}),M("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700},children:a("auth.fallback.title","Authentication Required")}),M("p",{style:{color:"var(--muted-foreground)"},children:a("auth.fallback.description","Please sign in to access this page")})]}),children:De(Se,{children:[De(Se,{gap:"large",children:[M("div",{children:M("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:a("auth.fallback.chooseProvider")})}),M(na,{fallback:M("div",{children:"Loading providers..."}),children:M(ma,{layout:"vertical",spacing:"tight",fullWidth:!0,ariaLabel:a("auth.fallback.authOptions")})})]}),o&&De(fa,{children:[M(la,{}),M("div",{children:M(sa,{onClick:c,className:"dndev-gap-sm",icon:oa,children:a("common.back")})})]}),De(Se,{gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:[M("p",{children:a("auth.fallback.secure")}),M("p",{children:a("auth.fallback.terms")})]})]})})})})}import{Search as ga}from"lucide-react";import{Button as va,BUTTON_VARIANT as ha,DISPLAY as ya}from"@donotdev/components";import{useOverlayStore as ba,useTranslation as Sa}from"@donotdev/core";import{jsx as Ca,jsxs as xa}from"react/jsx-runtime";var Sp=({display:e=ya.AUTO,className:t,onOpen:o})=>{let{t:r}=Sa("dndev"),n=ba(c=>c.openCommandDialog),i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgentData?.platform??navigator.platform)?"\u2318K":"Ctrl+K",s=()=>{n(),o?.()};return xa(va,{variant:ha.OUTLINE,display:e,icon:ga,onClick:s,className:t,"aria-label":r("goTo.ariaLabel","Go to page"),children:[r("goTo.label","Go to"),Ca("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 wa,lazy as ka}from"react";import{useEventListener as Ta,useOverlayStore as Ea}from"@donotdev/core";import{jsx as Do}from"react/jsx-runtime";var Aa=ka(()=>import("./GoToDialog-CR4VOVXT.js")),Ia=()=>{let e=Ea(t=>t.openCommandDialog);return Ta("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}}),Do(wa,{fallback:null,children:Do(Aa,{})})},Na=Ia;import{Search as Pa}from"lucide-react";import{useCallback as Fo,useEffect as Ra,useState as La,useRef as Da}from"react";import{Stack as Fa}from"@donotdev/components";import{useOverlayStore as Et}from"@donotdev/core";import{useTranslation as Ba}from"@donotdev/core";import{jsx as qe,jsxs as Va}from"react/jsx-runtime";var Ma=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),za=()=>{let{t:e}=Ba("dndev"),[t,o]=La(""),r=Da(null),n=Et(s=>s.isCommandDialogOpen);Ra(()=>{n||o("")},[n]);let a=Fo(()=>{Et.getState().openCommandDialog(t)},[t]),i=Fo(s=>{s.key==="Enter"&&(s.preventDefault(),Et.getState().openCommandDialog(t))},[t]);return Va(Fa,{direction:"row",align:"center",className:"dndev-relative dndev-w-full dndev-max-w-sm",role:"search",children:[qe(Pa,{className:"dndev-absolute dndev-size-md",style:{insetInlineStart:"0.75rem",opacity:.5},"aria-hidden":"true"}),qe("input",{ref:r,type:"text",value:t,onChange:s=>o(s.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")}),qe("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:qe("kbd",{style:{padding:"0.25rem 0.5rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",borderRadius:"var(--radius-sm)"},children:Ma?"\u2318K":"Ctrl+K"})})]})},Oa=za;import{MoreHorizontal as Ua,Link as Bo}from"lucide-react";import{useState as _a,useEffect as Mo,useRef as Ha,useMemo as Ga}from"react";import{NavigationMenu as zo,NavigationMenuListPrimitive as Wa,NavigationMenuItemPrimitive as Oo,Button as $a,DropdownMenu as Ka,cn as Ze,DISPLAY as Ya}from"@donotdev/components";import{useTranslation as qa}from"@donotdev/core";import{jsx as q,jsxs as At}from"react/jsx-runtime";var Vo=({routes:e,vertical:t=!1,display:o=Ya.AUTO,overflowDetection:r=!1,showIcons:n=!0,className:a,style:i})=>{let{t:s}=qa("dndev"),c=Z(),d=e??c,l=Ha(null),[u,f]=_a(d.length),m=Ga(()=>d.map(p=>({label:p.label,path:p.path,icon:q(K,{icon:p.icon,fallback:Bo}),children:p.children?p.children.map(v=>({label:v.label,path:v.path,icon:q(K,{icon:v.icon,fallback:Bo})})):void 0})),[d]);if(Mo(()=>{if(!r||d.length===0||t)return;let p=()=>{let y=l.current;if(!y)return;let g=y.getBoundingClientRect(),S=y.querySelectorAll("[data-nav-item]"),x=y.querySelector("[data-more-button]"),b=0,R=x?.offsetWidth||0;for(let E=0;E<S.length;E++){let A=S[E];if(!A)break;if(A.getBoundingClientRect().right-g.left+(E===S.length-1&&x?R:0)<=g.width)b=E+1;else break}f(Math.max(0,b))},v=new ResizeObserver(p);return l.current&&v.observe(l.current),setTimeout(p,0),()=>v.disconnect()},[r,d.length,t]),Mo(()=>{r&&!t&&f(d.length)},[d.length,r,t]),d.length===0)return null;if(r&&!t){let p=Math.min(u,m.length),v=m.slice(0,p),y=m.slice(p);return q(zo,{className:Ze(a),style:i||{flex:1},children:At(Wa,{ref:l,"data-vertical":"false",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",flexWrap:"nowrap",overflow:"hidden"},children:[v.filter(g=>g.path).map((g,S)=>q(Oo,{"data-nav-item":!0,children:At(T,{path:g.path,className:Ze("dndev-interactive"),"data-role":"nav-trigger",children:[n&&g.icon,q("span",{className:"dndev-interactive-label",children:g.label})]})},g.path||S)),y.length>0&&q(Oo,{"data-more-button":!0,children:q(Ka,{trigger:q($a,{className:"dndev-size-touch",style:{flexShrink:0},"aria-label":s("navigation.more","More"),children:q(Ua,{className:"dndev-size-md"})}),items:y.filter(g=>g.path).map(g=>({label:g.label,children:At(T,{path:g.path,className:Ze("dndev-interactive"),"data-role":"menu-item",children:[n&&g.icon,q("span",{className:"dndev-interactive-label",children:g.label})]}),asChild:!0})),contentWidth:"14rem",contentAlign:"end"})})]})})}return q(zo,{items:m,vertical:t,display:o,className:Ze(a,t&&"dndev-sidebar-nav-menu"),LinkComponent:T})};import{Home as Za,ArrowLeft as Ja,Link as Qa}from"lucide-react";import{useMemo as Xa}from"react";import{Button as It,BUTTON_VARIANT as Nt,Stack as Fe,Text as Pt}from"@donotdev/components";import{useTranslation as ja}from"@donotdev/core";import{useLocation as ei,useNavigate as ti}from"@donotdev/ui/routing/hooks";import{jsx as W,jsxs as Je}from"react/jsx-runtime";function Uo(){let{t:e}=ja("dndev"),t=ei(),o=ti(),r=Z(),n=Xa(()=>r.filter(i=>!i.path.includes(":")&&i.path!=="/").slice(0,4),[r]),a=()=>{o("back")};return W(Ye,{variant:"docs",centered:!0,children:Je(Fe,{gap:"large",align:"center",justify:"center",children:[Je(Fe,{align:"center",children:[W(Pt,{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"}),W(Pt,{level:"h2",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)",margin:0},children:e("errors.notFound.title","Page Not Found")}),W(Pt,{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&&W("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})]}),n.length>0&&Je(Fe,{align:"center",children:[W("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:")}),W(Fe,{direction:"row",wrap:"wrap",justify:"center",gap:"tight",children:n.map(i=>W(T,{path:i.path,replace:!0,children:W(It,{variant:Nt.OUTLINE,icon:W(K,{icon:i.icon,fallback:Qa}),"aria-label":e("errors.notFound.navigateTo",`Navigate to ${i.label}`,{label:i.label}),children:i.label})},i.path))})]}),Je(Fe,{direction:"row",wrap:"wrap",justify:"center",children:[W(T,{path:"/",replace:!0,children:W(It,{variant:Nt.DEFAULT,icon:Za,"aria-label":e("errors.notFound.goHome","Go to home page"),children:e("errors.notFound.goHome","Go Home")})}),W(It,{variant:Nt.OUTLINE,icon:Ja,onClick:a,"aria-label":e("errors.notFound.goBack","Go back to previous page"),children:e("errors.notFound.goBack","Go Back")})]})]})})}import{useNavigate as Ce,useBack as d1,useRefresh as u1,usePrefetch as p1,useLocation as m1,useParams as f1,useRouteParam as g1,useSearchParams as v1,useMatch as h1,useQueryParams as y1,useRedirectGuard as b1}from"@donotdev/ui/routing/hooks";import{getDndevConfig as Rt,isClient as ue,isDev as _o}from"@donotdev/core";var H=class{static getBrowserSupport(){if(!ue())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 r=document.createElement("canvas");r.width=1,r.height=1,o.webp=r.toDataURL("image/webp").indexOf("data:image/webp")===0}catch{o.webp=!1}try{let r=document.createElement("canvas");r.width=1,r.height=1,o.avif=r.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 r of t)o.push(...this.extractStringValues(r));else if(typeof t=="object")for(let r of Object.values(t))o.push(...this.extractStringValues(r));return o}static assetExists(t){if(!ue())return!1;let o=this.getAssetManifest();return o?this.extractStringValues(o).includes(t):!1}static getAssetManifest(){return ue()&&Rt()?.assets?.mapping||null}static getLogoSvgContent(){return Rt()?.assets?.logoSvgContent||null}static resolveLogo(t){if(t)return t;let o="logo";if(this.cache.has(o))return this.cache.get(o);let n=this.getAssetManifest()?.logo?.optimal||"/logo.svg";return this.cache.set(o,n),n}static directAssetCheck(t){if(!ue())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",s={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,s),s}let r=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",n={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":r,png32:this.assetExists("/favicon-32x32.png")?"/favicon-32x32.png":r,apple180:this.assetExists("/apple-touch-icon.png")?"/apple-touch-icon.png":r,android192:this.assetExists("/icon-192x192.png")?"/icon-192x192.png":r,android512:this.assetExists("/icon-512x512.png")?"/icon-512x512.png":r};return this.cache.set(t,n),n}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 r of o)if(this.assetExists(r))return r;return"/favicon.svg"}static clearCache(){this.cache.clear(),_o()&&ue()}static getDebugInfo(){return{browserSupport:this.getBrowserSupport(),detectedAssets:ue()?Rt()?.assets?.mapping:null,assetManifest:this.getAssetManifest(),cache:Object.fromEntries(this.cache)}}};Ge(H,"cache",new Map);function w1(e){return H.resolveLogo(e)}function k1(){return H.resolveFaviconSet()}_o()&&(H.clearCache(),ue()&&window.addEventListener("DOMContentLoaded",()=>{H.clearCache()}));import*as oi from"@donotdev/crud";var Ho={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},xe=oi?.useFormStore,A1=typeof xe=="function";function ri(e){return xe?xe(e):e(Ho)}ri.getState=()=>xe&&typeof xe.getState=="function"?xe.getState():Ho;import{useMemo as ni}from"react";function Qe(){let e=N("status"),t=N("isAvailable"),o=N("user");return ni(()=>({shouldHide:e!=="ready"||!t,isLoading:e==="initializing",isReady:e==="ready"&&t,isAuthenticated:!!o}),[e,t,o])}import*as ai from"@donotdev/billing";import{DEGRADED_BILLING_API as ii}from"@donotdev/core";var Lt=ai?.useStripeBilling;function si(e){return ii[e]}function Dt(e,t){return Lt?Lt(e,t):si(e)}var D1=typeof Lt=="function";function z1(){let e=N("user"),t=N("status"),o={user:e,status:t},r=Dt("status",o),n=Dt("isAvailable",o);return{shouldHide:!n,isLoading:r==="initializing",isReady:n&&r==="ready"}}import{DEGRADED_CRUD_API as li}from"@donotdev/core";import*as ci from"@donotdev/crud";var Ft=ci?.useCrud;function di(){return li}function U1(e,t={}){return Ft?Ft(e,t):di()}var _1=typeof Ft=="function";import{DEGRADED_OAUTH_API as ui}from"@donotdev/core";import*as pi from"@donotdev/oauth";var Bt=pi?.useOAuth;function mi(e){return ui[e]}function W1(e){return Bt?Bt(e):mi(e)}var $1=typeof Bt=="function";import{CheckCircle as fi}from"lucide-react";import{List as gi}from"@donotdev/components";import{translateArray as vi}from"@donotdev/core";import{jsx as Go}from"react/jsx-runtime";var hi=fi,yi=16;function J1(e,t,o,r=hi,n=yi){let a=r;return Go(gi,{icon:a?Go(a,{size:n}):void 0,items:vi(e,t,o),style:{listStyle:"none",paddingInlineStart:0}})}var bi=/<script[\s\S]*?<\/script>/gi,Si=/<foreignObject[\s\S]*?<\/foreignObject>/gi,Ci=/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,xi=/\s+(?:xlink:)?href\s*=\s*["']\s*javascript:[^"']*["']/gi,wi=/\s+(?:xlink:)?href\s*=\s*["']\s*data:(?!image\/(?:png|jpe?g|gif|webp|svg\+xml))[^"']*["']/gi;function we(e){return e.replace(bi,"").replace(Si,"").replace(Ci,"").replace(xi,"").replace(wi,"")}import{Fragment as Wi,jsx as ie,jsxs as $i}from"react/jsx-runtime";var Ko=()=>null,Hi=$o(async()=>{try{return{default:(await import("@donotdev/auth")).ReauthDialog}}catch{return{default:Ko}}}),Gi=$o(async()=>{try{return{default:(await import("@donotdev/auth")).ConfirmDeleteDialog}}catch{return{default:Ko}}}),Yo=()=>{let[e]=Xe.useState(!1),[t]=Xe.useState(!1),[o]=Xe.useState(!1),[r]=Xe.useState(null);return{showConfirmDialog:e,showPasswordDialog:t,isDeleting:o,error:r,startDeleteFlow:()=>{},confirmDelete:async()=>{},cancel:()=>{}}};Vi()&&import("@donotdev/auth").then(e=>{Yo=e.useDeleteAccount}).catch(e=>{});var je=e=>{if(!e)return Be;if(typeof e=="function")return e;let t=e.replace(/['"]/g,""),o=Ii[t];return o||Be},Mt=({loginPath:e,display:t=Bi.AUTO,"no-tooltip":o=!1,customItems:r=[],className:n,style:a})=>{let{t:i}=Mi("dndev"),{shouldHide:s,isReady:c,isAuthenticated:d}=Qe(),l=Oi(),u=N("user"),f=N("signOut"),m=Ui("isLaptop"),p=Z(),v=_i(),y=l.profilePath,g=l.authMenuItems||[],S=u?.role,x=Yo(),b=()=>u&&(u.displayName||u.email?.split("@")[0])||"User",R=()=>b().split(" ").map(h=>h.charAt(0)).slice(0,2).join("").toUpperCase(),E=()=>{if(!u)return i("auth.userMenu",{defaultValue:"User menu"});let C=[b()];return u.email&&C.push(u.email),S&&S!=="guest"&&C.push(`Role: ${S}`),C.join(`
|
|
4
|
-
`)},
|
|
5
|
-
${u.email}`:""}`}),disabled:!0}),y&&C.push({label:i("auth.profile",{defaultValue:"Profile"}),icon:ki,onClick:()=>v(y)}),g.forEach(h=>{let k=p.find(F=>F.path===h.path),L=h.label||k?.label||h.path.split("/").pop()||"Menu",D=h.icon?je(h.icon):k?.icon&&(typeof k.icon=="string"||typeof k.icon=="function")?je(k.icon):Be;C.push({label:L,icon:D,onClick:()=>v(h.path)})}),r.forEach(h=>{if(h.path){let k=p.find(F=>F.path===h.path),L=h.label||k?.label||h.path.split("/").pop()||"Menu",D=h.icon?je(h.icon):Be;C.push({label:L,icon:D,onClick:()=>v(h.path),disabled:h.disabled,style:h.style})}else if(h.onClick){let k=h.icon?je(h.icon):Be;C.push({label:h.label,icon:k,onClick:h.onClick,disabled:h.disabled,style:h.style})}}),C.push({label:i("auth.deleteAccount.label",{defaultValue:"Delete Account"}),icon:Ai,onClick:x.startDeleteFlow,variant:"destructive"}),C.push({label:i("auth.signOut",{defaultValue:"Sign Out"}),icon:Ti,onClick:()=>f(),variant:"destructive"}),C},[y,g,r,f,x,i,p,m,u,S,b,v]);return zi().length===0||s||!c||!d?null:$i(Wi,{children:[ie(Wo,{fallback:null,children:ie(Hi,{open:x.showPasswordDialog,isLoading:x.isDeleting,error:x.error,onReauth:C=>x.confirmDelete(C),onCancel:x.cancel})}),ie(Wo,{fallback:null,children:ie(Gi,{open:x.showConfirmDialog,isLoading:x.isDeleting,error:x.error,onConfirm:()=>x.confirmDelete(),onCancel:x.cancel})}),ie(Di,{trigger:ie(Ri,{variant:Li.OUTLINE,icon:u?ie(Pi,{src:u.photoURL??void 0,fallback:R(),alt:b(),style:{margin:"-4px 0"}}):Ei,display:t,"aria-label":i("auth.userMenu",{defaultValue:"User menu"}),tooltip:!o&&m&&u?E():o?void 0:i("auth.userMenu",{defaultValue:"User menu"}),className:n,style:a,children:b()}),items:A,contentAlign:"end"})]})};import{jsx as O}from"react/jsx-runtime";var Jo=()=>null;function et({display:e,signInLabel:t,className:o,style:r,children:n,...a}){return O(qi,{variant:Zi.OUTLINE,icon:Ki,display:e,tooltip:t,className:o,style:r,...a,children:n??t})}var os=Zo(async()=>{try{return{default:(await import("@donotdev/auth")).AuthPartnerButton}}catch{return{default:Jo}}}),qo=Zo(async()=>{try{return{default:(await import("@donotdev/auth")).MultipleAuthProviders}}catch{return{default:Jo}}}),Ot=({display:e=Xi.AUTO,className:t,style:o})=>{let{t:r}=ji("dndev"),{shouldHide:n,isLoading:a,isReady:i,isAuthenticated:s}=Qe(),c=es(),d=ts(),[l,u]=Yi(!1),f=c.loginPath,m=r("auth.signIn",{defaultValue:"Sign In"}),p=r("auth.loading",{defaultValue:"Loading..."}),v=d.includes("password")||d.includes("emailLink");if(n||!i)return null;if(!s){if(f!==void 0)return O(T,{path:f,prefetch:!0,children:O(et,{display:e,signInLabel:m,className:t,style:o})});let y=d[0];return v?O(Qi,{trigger:O(et,{display:e,signInLabel:m,className:t,style:o}),title:m,open:l,onOpenChange:u,"data-content-size":"form",children:O(zt,{fallback:O("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:p}),children:O(qo,{spacing:"medium",onSuccess:()=>u(!1)})})}):d.length>1?O(Ji,{trigger:O(et,{display:e,signInLabel:m,className:t,style:o}),children:O(zt,{fallback:O("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:p}),children:O(qo,{spacing:"tight"})})}):O(zt,{fallback:O(et,{display:e,signInLabel:m,className:t,style:o,disabled:a,tooltip:a?p:m,children:a?p:m}),children:O(os,{partnerId:y,display:e,className:t,style:o})})}return O(Mt,{display:e,loginPath:f,className:t,style:o})};import{AlertCircle as rs,RefreshCw as ns,Mail as as,Cookie as is}from"lucide-react";import{Card as ss,Button as Vt,BUTTON_VARIANT as Ut,Stack as Qo}from"@donotdev/components";import{useTranslation as ls}from"@donotdev/core";import{jsx as Me,jsxs as tt}from"react/jsx-runtime";function cs({featureName:e,title:t,description:o,showReviewCookies:r=!1,showContactSupport:n=!0,showRetry:a=!1,supportEmail:i="support@example.com",onRetry:s,onReviewCookies:c,customActions:d,className:l=""}){let{t:u}=ls("ui"),f=o||u("featureDisabled.description","{featureName} is not available. This may be due to missing configuration or disabled features.",{featureName:e}),m=()=>{if(c)c();else{let v=new CustomEvent("openCookieConsent");window.dispatchEvent(v)}},p=()=>{window.location.href=`mailto:${i}?subject=${encodeURIComponent(`Feature Unavailable: ${e}`)}&body=${encodeURIComponent(`I'm experiencing an issue with ${e} not being available.`)}`};return tt(ss,{className:l,title:tt(Qo,{direction:"row",align:"center",gap:"tight",children:[Me(rs,{className:"dndev-size-md",style:{color:"var(--destructive)"}}),t||e]}),subtitle:f,children:[" ",tt("div",{style:{display:"grid",gap:"var(--gap-md)"},children:[(r||n||a||d)&&tt(Qo,{direction:"row",wrap:"wrap",gap:"tight",children:[r&&Me(Vt,{variant:Ut.OUTLINE,onClick:m,icon:is,children:u("featureDisabled.reviewCookies","Review Cookies")}),n&&Me(Vt,{variant:Ut.OUTLINE,onClick:p,icon:as,children:u("featureDisabled.contactSupport","Contact Support")}),a&&Me(Vt,{variant:Ut.OUTLINE,onClick:s,icon:ns,children:u("featureDisabled.retry","Retry")}),d]}),Me("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:u("featureDisabled.helpText","If you believe this is an error, please contact support or try refreshing the page.")})]})]})}var ds=cs;import{Lock as ot,Shield as Xo}from"lucide-react";import{useEffect as _t,useRef as jo,useCallback as us}from"react";import{Portal as ps,Spinner as ms,Stack as fs,Text as ze,Button as gs}from"@donotdev/components";import{useTranslation as vs,useOverlay as oe}from"@donotdev/core";import{jsx as J,jsxs as tr}from"react/jsx-runtime";var er={connecting:0,preparing:2e3,redirecting:5e3},hs=1e4;function ys(e,t){return t==="none"?null:t==="shield"?Xo:t==="lock"?ot:e?e.startsWith("stripe-")||e.includes("payment")||e.includes("checkout")?ot:e.startsWith("oauth-")||e.startsWith("auth-")?Xo:ot:ot}function bs(e){return e||"default"}function Ss(){let{t:e}=vs("dndev"),t=oe("isRedirectOverlayOpen"),o=oe("redirectOperation"),r=oe("redirectPhase"),n=oe("showCancelButton"),a=oe("redirectConfig"),i=oe("redirectStartTime"),s=oe("setRedirectPhase"),c=oe("setShowCancelButton"),d=oe("hideRedirectOverlay"),l=jo([]),u=jo(null),f=us(()=>{d()},[d]);if(_t(()=>{if(!t||!i)return;let b=a?.cancelTimeout??hs,R=Date.now()-i;l.current.forEach(clearTimeout),l.current=[],u.current&&(clearTimeout(u.current),u.current=null);let E=(w,C)=>{let h=Math.max(0,C-R);if(h>0){let k=setTimeout(()=>{s(w)},h);l.current.push(k)}else s(w)};E("preparing",er.preparing),E("redirecting",er.redirecting);let A=Math.max(0,b-R);return u.current=setTimeout(()=>{c(!0),s("timeout")},A),()=>{l.current.forEach(clearTimeout),l.current=[],u.current&&(clearTimeout(u.current),u.current=null)}},[t,i,a?.cancelTimeout,s,c]),_t(()=>{if(!t)return;let b=()=>{d()};return window.addEventListener("popstate",b),()=>window.removeEventListener("popstate",b)},[t,d]),_t(()=>{if(!t)return;let b=()=>{};return document.addEventListener("visibilitychange",b),()=>document.removeEventListener("visibilitychange",b)},[t]),!t)return null;let m=bs(o),p=a?.title??e(`redirectOverlay.${m}.title`,{defaultValue:e("redirectOverlay.default.title")}),v=a?.message??e(`redirectOverlay.${m}.message`,{defaultValue:e("redirectOverlay.default.message")}),y=a?.subtitle??e(`redirectOverlay.${m}.subtitle`,{defaultValue:e("redirectOverlay.default.subtitle")}),g=e(`redirectOverlay.${m}.ariaLabel`,{defaultValue:e("redirectOverlay.default.ariaLabel")}),S=e(`redirectOverlay.phases.${r}`),x=ys(o,a?.icon);return J(ps,{children:J("div",{className:"dndev-spinner-overlay",role:"status","aria-busy":"true","aria-label":g,style:{zIndex:"var(--z-overlay, 9999)"},children:tr("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--gap-md)",textAlign:"center",maxWidth:"400px",padding:"var(--gap-lg)"},children:[tr(fs,{direction:"row",align:"center",children:[x&&J(x,{style:{width:"1.5rem",height:"1.5rem",color:"var(--primary)"},"aria-hidden":"true"}),J(ms,{variant:"primary"})]}),J(ze,{as:"h3",style:{color:"var(--foreground)",margin:0},children:p}),J(ze,{variant:"muted",style:{color:"var(--foreground)",minHeight:"1.5em"},children:S}),J(ze,{variant:"muted",level:"small",style:{opacity:.8},children:v}),J(ze,{variant:"muted",level:"small",style:{opacity:.6},children:y}),J(ze,{variant:"muted",level:"small",style:{opacity:.5,marginTop:"var(--gap-sm)"},children:e("redirectOverlay.doNotRefresh")}),n&&J(gs,{variant:"ghost",onClick:f,style:{marginTop:"var(--gap-md)"},children:e("redirectOverlay.cancel")})]})})})}import{useEffect as Ht,useState as or}from"react";import{cn as Cs}from"@donotdev/components";import{jsx as rr}from"react/jsx-runtime";var xs=({isActive:e=!1,progress:t,useFakeProgress:o=!0,duration:r=2e3,className:n,show:a=!0})=>{let[i,s]=or(0),[c,d]=or(!1);Ht(()=>{if(!e||!o||t!==void 0)return;d(!0),s(0);let u=Date.now(),f=setInterval(()=>{let m=Date.now()-u,p=Math.min(m/r*90,90);s(p)},16);return()=>{clearInterval(f)}},[e,o,t,r]),Ht(()=>{t!==void 0&&d(t>0&&t<100)},[t]),Ht(()=>{if(!e){let u=setTimeout(()=>{d(!1),s(0)},300);return()=>clearTimeout(u)}},[e]);let l=t??i;return!a||!c?null:rr("div",{className:Cs(n),style:{position:"fixed",insetInlineStart:0,insetInlineEnd:0,zIndex:9999,height:"4px",backgroundColor:"transparent",top:"var(--header-height, 0px)"},role:"progressbar","aria-valuenow":Math.round(l),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Page loading progress",children:rr("div",{style:{height:"100%",width:`${l}%`,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)"}})})},ws=xs;import{cn as rt,Stack as ks}from"@donotdev/components";import{jsx as Oe,jsxs as Wm}from"react/jsx-runtime";var Ts=({variant:e="text",width:t,height:o,lines:r=1,show:n=!0,className:a,animation:i="pulse",style:s})=>{if(!n)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 l={};return t&&(l.width=typeof t=="number"?`${t}px`:t),o&&(l.height=typeof o=="number"?`${o}px`:o),l};return e==="text"?Oe(ks,{gap:"tight",children:Array.from({length:r}).map((l,u)=>Oe("div",{className:rt("dndev-skeleton",a),style:{...c,height:"var(--gap-md)",width:u===r-1?"75%":"100%",...d(),...s}},u))}):e==="circular"?Oe("div",{className:rt("dndev-skeleton",a),style:{...c,borderRadius:"var(--radius-full)",width:t||o||"40px",height:o||t||"40px",...d(),...s}}):e==="rectangular"?Oe("div",{className:rt("dndev-skeleton",a),style:{...c,width:t||"100%",height:o||"200px",...d(),...s}}):Oe("div",{className:rt("dndev-skeleton",a),style:{...c,borderRadius:"var(--radius-lg)",width:t||"100%",height:o||"20px",...d(),...s}})};var Es=Ts;import{Card as As,IconBox as Is,Stack as Ns,Text as Gt,renderCardContent as Ps}from"@donotdev/components";import{jsx as Q,jsxs as nr}from"react/jsx-runtime";var Rs=({icon:e,title:t,subtitle:o,content:r,href:n,variant:a,elevated:i,onClick:s,className:c,footer:d,style:l,clickable:u,...f})=>{let m=Ps(r),y=`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":""}`,g={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"var(--line-height)"},S={...g,fontSize:"var(--font-size-lg)",fontWeight:600,color:"inherit",margin:0,textAlign:"start",flex:1,minWidth:0},x={...g,fontSize:"var(--font-size-base)",fontWeight:600,color:"var(--muted-foreground)",margin:0},b=e?nr(Ns,{direction:"row",align:"center",style:{width:"100%"},children:[Q(Is,{icon:e}),Q(Gt,{as:"div",level:"h3",style:S,children:t})]}):Q(Gt,{as:"div",level:"h3",style:S,children:t}),R=Q(As,{variant:a,elevated:i,onClick:s,className:c,"data-clickable":n||s||u?"true":void 0,style:{paddingInlineStart:"var(--gap-md)",paddingInlineEnd:"var(--gap-md)",gap:"var(--gap-md)",height:"100%",textAlign:"start",...l},...f,children:nr("div",{style:{display:"grid",gridTemplateRows:y,gap:"var(--gap-md)",width:"100%"},children:[Q("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:b}),Q("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start"},children:Q(Gt,{as:"div",level:"body",style:x,children:o})}),Q("div",{children:m}),d&&Q("div",{children:d})]})});return n&&!s?Q(T,{path:n,style:{display:"block",textDecoration:"none",height:"100%"},"aria-label":t?`Learn more about ${t}`:void 0,children:R}):R},Ls=Rs;import{useState as Gs}from"react";import{Bento as Ws,Card as $s,Section as Ks,Stack as Ys,Text as qs,TONE as Zs,cn as Js}from"@donotdev/components";var Ds='<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>',Fs='<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>',Bs='<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>',Ms='<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>',zs='<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>',Os='<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>',Vs='<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>',Us='<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>',_s='<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>',Hs='<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>',Wt={bun:{svg:`data:image/svg+xml,${encodeURIComponent(Hs)}`,color:"#FBF0DF",name:"Bun"},typescript:{svg:`data:image/svg+xml,${encodeURIComponent(Ds)}`,color:"#3178C6",name:"TypeScript"},react:{svg:`data:image/svg+xml,${encodeURIComponent(Fs)}`,color:"#61DAFB",name:"React"},vite:{svg:`data:image/svg+xml,${encodeURIComponent(Bs)}`,color:"#BD34FE",name:"Vite"},nextjs:{svg:`data:image/svg+xml,${encodeURIComponent(Ms)}`,color:"var(--foreground, #000000)",name:"Next.js"},nodejs:{svg:`data:image/svg+xml,${encodeURIComponent(zs)}`,color:"#339933",name:"Node.js"},firebase:{svg:`data:image/svg+xml,${encodeURIComponent(Os)}`,color:"#DD2C00",name:"Firebase"},vercel:{svg:`data:image/svg+xml,${encodeURIComponent(Vs)}`,color:"var(--foreground, #000000)",name:"Vercel"},stripe:{svg:`data:image/svg+xml,${encodeURIComponent(Us)}`,color:"#635BFF",name:"Stripe"},valibot:{svg:`data:image/svg+xml,${encodeURIComponent(_s)}`,color:"#FBBF24",name:"Valibot"}};import{jsx as pe,jsxs as el}from"react/jsx-runtime";function Qs({techKey:e,variant:t}){let o=Wt[e],[r,n]=Gs(!1);if(!o)return null;let a=decodeURIComponent(o.svg.replace("data:image/svg+xml,","")),i=we(a);return pe($s,{variant:t,className:"dndev-tech-card",style:{"--tech-color":o.color},"data-hover":r,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:el(Ys,{direction:"column",align:"center",gap:"tight",children:[pe("div",{className:"dndev-tech-card-logo","data-tech":e,dangerouslySetInnerHTML:{__html:i}}),pe(qs,{as:"span",level:"small",children:o.name})]})})}function Xs({title:e,techs:t,cols:o=3,columns:r,gap:n="medium",separator:a=!1,tone:i=Zs.GHOST,align:s,collapsible:c,open:d,onOpenChange:l,defaultOpen:u,className:f}){let m=r||(typeof o=="number"?{mobile:o,tablet:o,desktop:o,wide:o}:{mobile:o[0],tablet:o[1],desktop:o[2],wide:o[3]}),p=g=>{if(g==="long")return{cols:2,rows:1};if(g==="high")return{cols:1,rows:2};if(g==="huge")return{cols:2,rows:2}},v=t.filter(g=>Wt[g.name]).map(g=>({id:g.name,content:pe(Qs,{techKey:g.name,variant:g.variant}),span:p(g.size)})),y=pe(Ws,{items:v,columns:m,gap:n,ariaLabel:"Technology stack"});return pe(Ks,{title:e,separator:a,tone:i,align:s,collapsible:c,open:d,onOpenChange:l,defaultOpen:u,className:Js("dndev-tech-bento",f),children:pe("div",{className:"dndev-tech-bento-grid",children:y})})}var js=Xs;import{Suspense as tl,lazy as ol}from"react";import{useConsent as ar}from"@donotdev/core";import{jsx as ir}from"react/jsx-runtime";var rl=ol(()=>import("./CookieConsent-UVTR7CWW.js"));function ff(){let e=ar("hasConsented"),t=ar("showBanner");return e&&!t?null:ir(tl,{fallback:null,children:ir(rl,{})})}import{Button as sr,ScrollArea as nl}from"@donotdev/components";import{cn as lr}from"@donotdev/components";import{jsx as re,jsxs as al}from"react/jsx-runtime";function bf({content:e,cta:t,align:o="center",justify:r="center",disableScrollArea:n=!1,contentVariant:a="narrow",contentClassName:i,ctaClassName:s}){let d=a==="narrow"?a==="narrow"&&re("div",{className:"dndev-game-container__content-narrow",children:e}):e,l=n?re("div",{style:{overflow:"auto",overscrollBehavior:"contain",height:"100%"},children:d}):re(nl,{className:"dndev-game-container__scroll",children:d});return al("div",{className:"dndev-game-container",children:[re("div",{className:lr("dndev-game-container__content",i),"data-align":o,"data-justify":r,"data-content-variant":a,children:re("div",{className:"dndev-game-container__scroll-wrapper",children:l})}),t&&re("div",{className:lr("dndev-game-container__cta",s),children:Array.isArray(t)?re("div",{className:"dndev-game-container__cta-buttons",children:t.map((u,f)=>re(sr,{onClick:u.onClick,disabled:u.disabled??!1,variant:u.variant??"default",className:"dndev-game-container__cta-button",fullWidth:!0,children:u.label},f))}):re(sr,{onClick:t.onClick,disabled:t.disabled??!1,variant:t.variant??"default",className:"dndev-game-container__cta-button",children:t.label})})]})}import{useEffect as il,Suspense as sl,lazy as ll}from"react";import{jsx as $t}from"react/jsx-runtime";var cr=new Set,dr=new Map;function cl(e,t){let o=dr.get(e);if(o)return o;let r=t[e];if(!r)return null;let n=ll(r);return dr.set(e,n),n}function wf({screenRegistry:e,currentScreen:t,nextScreen:o,fallback:r=null}){il(()=>{if(o&&!cr.has(o)){cr.add(o);let a=e[o];a&&a().catch(()=>{})}},[o,e]);let n=t?cl(t,e):null;return!t||!n?null:$t("div",{style:{height:"100%"},children:$t(sl,{fallback:r,children:$t(n,{})})})}import{cn as dl,DISPLAY as Kt}from"@donotdev/components";import{useAppConfig as ur}from"@donotdev/core";import{jsx as nt,jsxs as ml}from"react/jsx-runtime";var ul=({display:e=Kt.AUTO,linkToHome:t=!0,className:o})=>{let r=ur("name"),a=ur("shortName")||r||"App",i=H.getLogoSvgContent(),s=H.resolveLogo(),c=e===Kt.FULL||e===Kt.AUTO,d=i?nt("div",{className:"app-branding-logo",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:we(i)}}):H.assetExists(s)?nt("img",{src:s,alt:a,className:"app-branding-logo"}):null,l=c&&nt("span",{className:"app-branding-title","data-display":e,children:a}),u=ml("div",{className:dl("app-branding",o),"data-display":e,children:[d,l]});return t?nt(T,{path:"/",className:"app-branding-link",children:u}):u},pl=ul;import{cn as pr}from"@donotdev/components";import{useAppConfig as mr}from"@donotdev/core";import{jsx as gr}from"react/jsx-runtime";var fr={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"}},fl=({alt:e,size:t="header",className:o})=>{let r=mr("name"),n=mr("shortName"),a=e||r||n||"App",i=H.getLogoSvgContent(),s=H.resolveLogo(),c=typeof t=="string"&&t in fr?fr[t]:typeof t=="string"?{}:{width:t,height:t};return i?gr("div",{className:pr("app-icon-header",o),style:{display:"inline-flex",...c},role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:we(i)}}):gr("img",{src:s,alt:a,className:pr(o),style:{objectFit:"contain",...c}})},gl=fl;import{cn as vr}from"@donotdev/components";import{useAppConfig as hr,useBreakpoint as vl}from"@donotdev/core";import{jsx as yr}from"react/jsx-runtime";var hl=({title:e,className:t,linkToHome:o=!0})=>{let r=vl("isMobileOrTablet"),n=hr("name"),a=hr("shortName"),i=e||r&&a||n||"App",s=yr("div",{className:vr("dndev-text-base",t),style:{fontSize:"var(--font-size-xl)",fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:i});return o?yr(T,{path:"/",className:vr("dndev-inline-block",t),children:s}):s},yl=hl;import{ChevronRight as kl}from"lucide-react";import{useMemo as Tl}from"react";import{cn as El}from"@donotdev/components";import{useTranslation as Al}from"@donotdev/core";import{useLocation as Il}from"@donotdev/ui/routing/hooks";import{useMemo as br}from"react";import{useNavigationStore as Kf,getRoutes as bl,getRouteManifest as Yf}from"@donotdev/core";function Sl(){return br(()=>{try{let e=bl();return!e||e.length===0?[]:Cl(e)}catch{return[]}},[])}function Sr(){let e=Sl();return br(()=>e.flatMap(t=>t.routes),[e])}function Cl(e){let t=new Map;return e.forEach(o=>{let r=typeof o.path=="string"?o.path:String(o.path);if(!r||r==="undefined"||r==="null")return;let n=o.meta?.entity||xl(r)||"other",a={path:r,label:o.meta?.title||wl(r),icon:o.meta?.icon,component:o.component,importPath:o.importPath,exportName:o.exportName,auth:o.auth,meta:o.meta};t.has(n)||t.set(n,{label:n.charAt(0).toUpperCase()+n.slice(1),routes:[]}),t.get(n)?.routes.push(a)}),Array.from(t.values())}function xl(e){return e.split("/").filter(Boolean)[0]||null}function wl(e){let t=e.split("/").filter(Boolean),o=t[t.length-1];return o?o.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):"Home"}import{jsx as Ve,jsxs as Rl}from"react/jsx-runtime";var Nl=({items:e,separator:t=kl,showHome:o=!0,homeHref:r="/",variant:n="default",className:a})=>{let{t:i}=Al("dndev"),s=Il(),c=Sr(),d=Tl(()=>new Set(c.map(f=>f.path)),[c]),l=e||(()=>{let f=s.pathname.split("/").filter(Boolean),m=[],p="";return f.forEach(v=>{p+=`/${v}`;let y=v.split("-").map(S=>S.charAt(0).toUpperCase()+S.slice(1)).join(" "),g=d.has(p)?p:void 0;m.push({label:y,href:g})}),m})(),u=o?[{label:i("navigation.home","Home"),href:r},...l]:l;return n==="smart"&&s.pathname.split("/").filter(Boolean).length<2?null:Ve("nav",{role:"navigation","aria-label":"Breadcrumb navigation",className:El("breadcrumbs",a),children:u.map((f,m)=>{let v=m===u.length-1||!f.href;return Rl("span",{className:"breadcrumb-item",children:[m>0&&Ve(t,{className:"dndev-size-md separator"}),f.icon&&Ve(f.icon,{className:"dndev-size-md icon"}),f.href&&!v?Ve(T,{path:f.href,className:"breadcrumb-link",children:f.label}):Ve("span",{className:"breadcrumb-label",children:f.label})]},m)})})},Pl=Nl;import{useTranslation as Ll,maybeTranslate as Cr,useLayout as Yt,useAppConfig as Dl}from"@donotdev/core";import{jsx as ke,jsxs as Bl}from"react/jsx-runtime";var Fl=({asLink:e=!1,className:t})=>{let o=Dl("app"),r=Yt("gameTitle"),n=Yt("gameSubtitle"),a=Yt("gameNamespace"),{t:i}=Ll(a||"dndev"),s=Cr(i,r??void 0),c=Cr(i,n??void 0),d=o?.name||"Game";if(s)return ke("div",{className:t,children:Bl("div",{style:{textAlign:"center"},children:[ke("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}),c&&ke("p",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c})]})});let l=ke("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d});return e?ke(T,{path:"/",className:t,style:{fontSize:"var(--font-size-2xl)",fontWeight:700,transition:"color var(--dur-fast) ease-out"},onMouseEnter:u=>u.currentTarget.style.color="var(--primary)",onMouseLeave:u=>u.currentTarget.style.color="var(--foreground)",children:d}):ke("div",{className:t,children:l})};import{Trash2 as Ml}from"lucide-react";import{useState as xr}from"react";import{Button as zl,BUTTON_VARIANT as Ol,Checkbox as Vl,Stack as qt,useToast as Ul}from"@donotdev/components";import{useTranslation as _l}from"@donotdev/core";import{useRefresh as Hl}from"@donotdev/ui/routing/hooks";import{jsx as at,jsxs as wr}from"react/jsx-runtime";function Gl(){let{t:e}=_l("dndev"),{toast:t}=Ul(),[o,r]=xr(!1),n=Hl(),[a,i]=xr({localStorage:!0,sessionStorage:!0,applicationCache:!0,serviceWorker:!0,cookies:!0,indexedDB:!0,webSQL:!0,memoryCache:!0}),s=async()=>{try{r(!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 l=await indexedDB.databases();await Promise.all(l.map(async u=>{if(u.name){let f=indexedDB.deleteDatabase(u.name);await new Promise((m,p)=>{f.onsuccess=()=>m(void 0),f.onerror=()=>p(f.error)})}}))}c.push("IndexedDB")}catch{}if(a.webSQL&&"openDatabase"in window)try{let l=globalThis.openDatabase("","","","");l&&l.transaction&&l.transaction(u=>{u.executeSql('SELECT name FROM sqlite_master WHERE type="table"',[],(f,m)=>{for(let p=0;p<m.rows.length;p++){let v=m.rows.item(p).name;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(v)&&f.executeSql(`DROP TABLE IF EXISTS ${v}`)}})}),c.push("WebSQL")}catch{}if(a.applicationCache&&"caches"in window)try{let l=await caches.keys();await Promise.all(l.map(async u=>{try{await caches.delete(u)}catch{}})),c.push("Application Cache")}catch{}if(a.serviceWorker&&"serviceWorker"in navigator)try{let l=await navigator.serviceWorker.getRegistrations();await Promise.all(l.map(async u=>{try{await u.unregister()}catch{}})),c.push("Service Workers")}catch{}if(a.cookies)try{document.cookie.split(";").forEach(l=>{let u=l.indexOf("="),f=u>-1?l.substr(0,u):l;document.cookie=`${f.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${f.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${window.location.hostname}`,document.cookie=`${f.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:n()},1e3)}catch{t("error",e("settings.clearCache.error","Error clearing cache"))}finally{r(!1)}};return wr(qt,{children:[at(qt,{children:Object.entries(a).map(([c,d])=>wr(qt,{direction:"row",align:"center",gap:"tight",children:[at(Vl,{id:c,checked:d,onCheckedChange:l=>i(u=>({...u,[c]:!!l}))}),at("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))}),at(zl,{variant:Ol.DESTRUCTIVE,style:{margin:"0 auto"},disabled:o||!Object.values(a).some(Boolean),onClick:s,icon:Ml,children:o?e("settings.clearCache.clearing","Clearing..."):e("settings.clearCache.button","Clear Cache")})]})}var Zt=Gl;import{DropdownMenu as Yl,Button as Jt,Stack as ql}from"@donotdev/components";import{Link as Wl}from"lucide-react";import{navigationMenuTriggerStylePrimitive as $l}from"@donotdev/components";import{jsx as kr,jsxs as Kl}from"react/jsx-runtime";var it=({path:e,route:t,showIcons:o=!0})=>{let r=Z(),n=t??r.find(s=>s.path===e);if(!n)return null;let a=o&&!!n.icon,i=!!n.label;return Kl(T,{path:n.path,className:$l(),...a&&!i&&{"data-display":"compact"},children:[o&&kr(K,{icon:n.icon,fallback:Wl}),kr("span",{children:n.label})]})};import{jsx as me}from"react/jsx-runtime";var Zl=({navigation:e,className:t})=>me(ql,{role:"navigation",direction:"row",align:"center",className:t,style:{gap:"var(--gap-sm)"},children:e.map((o,r)=>o.routes&&o.routes.length>0?me(Yl,{trigger:me(Jt,{icon:o.icon,children:o.label}),items:o.routes.map(n=>({label:n.label,children:me(it,{route:n}),asChild:!!n.path})),contentAlign:"start"},o.label+r):o.path?me(Jt,{icon:o.icon,"aria-label":o.label,render:({children:n,...a})=>me(T,{path:o.path,...a,children:n}),children:o.label},o.label+r):me(Jt,{icon:o.icon,disabled:!0,"aria-label":o.label,children:o.label},o.label+r))}),Jl=Zl;import{Card as Ql,cn as Xl}from"@donotdev/components";import{jsx as Qt}from"react/jsx-runtime";var jl=({languages:e,currentLanguage:t,onLanguageChange:o,className:r})=>Qt(Ql,{className:Xl("dndev-z-modal",r),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:Qt("select",{style:{backgroundColor:"transparent",outline:"none",fontSize:"var(--font-size-base)",cursor:"pointer"},value:t,onChange:n=>o?.(n.target.value),"aria-label":"Select language",children:e.map(n=>Qt("option",{value:n,children:n},n))})}),ec=jl;import{MoreHorizontal as tc}from"lucide-react";import{Button as oc,BUTTON_VARIANT as rc,DropdownMenu as nc}from"@donotdev/components";import{jsx as Tr}from"react/jsx-runtime";var ac=({children:e,className:t})=>Tr(nc,{trigger:Tr(oc,{variant:rc.GHOST,icon:tc,"aria-label":"Menu",className:t}),contentAlign:"end",children:e}),ic=ac;import{MoreHorizontal as sc}from"lucide-react";import{Link as lc}from"lucide-react";import{DISPLAY as Ue,DropdownMenu as cc,Button as Er}from"@donotdev/components";import{cn as dc}from"@donotdev/components";import{useBreakpoint as Ar,useTranslation as uc}from"@donotdev/core";import{jsx as fe}from"react/jsx-runtime";var pc=({className:e="",showIcons:t=!0,display:o=Ue.AUTO,path:r})=>{let{t:n}=uc("dndev"),a=Ar("isMobile"),i=Ar("isTablet"),s=Z(),c=Co(r??"");return r?c?fe(Er,{variant:"ghost",display:o,icon:t?fe(K,{icon:c.icon,fallback:lc}):void 0,className:e,render:({children:l,...u})=>fe(T,{path:c.path,...u,children:l}),children:c.label}):null:(o===Ue.AUTO?a||i?Ue.COMPACT:Ue.FULL:o)===Ue.COMPACT?fe(cc,{trigger:fe(Er,{variant:"ghost",icon:sc,"aria-label":n("navigation.menu","Navigation"),className:e}),contentAlign:"end",items:s.map(l=>({label:l.label,children:fe(it,{route:l,showIcons:t}),asChild:!0}))}):fe(Vo,{overflowDetection:!0,showIcons:t,className:dc(e),style:{flex:1}})},mc=pc;import{Bell as fc}from"lucide-react";import{useMemo as gc,useEffect as vc,useRef as hc}from"react";import{Button as yc,cn as bc,toast as Sc,Stack as Cc}from"@donotdev/components";import{jsx as Xt}from"react/jsx-runtime";var xc={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)"}}},wc=({notifications:e=[],count:t=0,loading:o=!1,onNotificationClick:r,onDropdownOpen:n,className:a,maxVisible:i=10,alwaysShow:s=!1,size:c="md",disabled:d=!1})=>{let l=xc[c],u=hc(new Set),f=gc(()=>t===0?null:t>99?"99+":t.toString(),[t]),m=t>0||s;return vc(()=>{e.forEach(p=>{if(!u.current.has(p.id)){u.current.add(p.id);let v=p.type==="error"?"error":p.type==="warning"?"warning":p.type==="success"?"success":"info";Sc({title:p.title,description:p.message,toastType:v,duration:0,onDismiss:()=>{u.current.delete(p.id),r&&r(p)}})}})},[e,r]),m?Xt("div",{className:bc(a),style:{position:"relative"},children:Xt(yc,{disabled:d,style:{...l.button,position:"relative"},onClick:()=>{n?.()},onFocus:p=>{p.currentTarget.style.outline="2px solid var(--ring)",p.currentTarget.style.outlineOffset="2px"},onBlur:p=>{p.currentTarget.style.outline="none"},"aria-label":`${t} notification${t!==1?"s":""}`,icon:fc,children:f&&Xt(Cc,{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,...l.badge},"aria-hidden":"true",children:f})})}):null},kc=wc;import{Settings as Tc,Check as Ec}from"lucide-react";import*as st from"lucide-react";import{Button as Ac,BUTTON_VARIANT as Ic,DropdownMenu as Nc,Stack as Pc,DISPLAY as Rc}from"@donotdev/components";import{useTranslation as Lc}from"@donotdev/core";import{useLanguageSelector as Dc,useTheme as jt,Flag as Fc}from"@donotdev/core";import{jsx as se,jsxs as zc}from"react/jsx-runtime";function Bc({variant:e=Ic.OUTLINE}={}){let{t}=Lc("dndev"),{languages:o,currentLanguage:r,changeLanguage:n,isLoading:a}=Dc(),i=jt("availableThemes"),s=jt("currentTheme"),c=jt("setTheme"),d=m=>{if(!m)return st.Palette;let p=m.replace(/['"]/g,"");return st[p]||st.Palette},l=i.map(m=>{let p=d(m.meta?.icon),v=m.name===s;return{label:m.displayName||m.name,icon:p,onClick:()=>c(m.name),checked:v}}),u=o.map(m=>{let p=m.id===r;return{label:m.name,onClick:()=>n(m.id),disabled:a,checked:p,className:p?"bg-accent":void 0,iconEnd:p&&!a?Ec:void 0,children:zc(Pc,{direction:"row",align:"center",gap:"tight",children:[se(Fc,{code:m.flagCode||m.id,title:`${m.name} flag`}),se("span",{children:m.name}),a&&p&&se("div",{style:{marginInlineStart:"auto"},children:se("div",{style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:"var(--primary)"}})})]})}}),f=[{label:t("auth.title","Authentication"),subContent:se(Ot,{display:Rc.COMPACT})},{label:t("settings.theme","Theme"),subItems:l},{label:t("settings.language","Language"),subItems:u},{label:t("settings.clearCache.title","Clear Cache"),subContent:se(Zt,{})}];return se(Nc,{trigger:se(Ac,{variant:e,"aria-label":t("settings.title","Settings"),icon:Tc}),items:f,contentWidth:"14rem",contentAlign:"end"})}var Mc=Bc;import*as lt from"lucide-react";import{Button as Ir,BUTTON_VARIANT as Oc,DropdownMenu as Vc,DISPLAY as Uc}from"@donotdev/components";import{useTranslation as _c}from"@donotdev/core";import{useTheme as eo}from"@donotdev/core";import{jsx as oo}from"react/jsx-runtime";var to=e=>{if(!e)return lt.Palette;let t=e.replace(/['"]/g,"");return lt[t]||lt.Palette},Hc=({display:e=Uc.AUTO,"no-tooltip":t=!1})=>{let{t:o}=_c("dndev"),r=eo("availableThemes"),n=eo("currentTheme"),a=eo("setTheme");if(r.length<=1)return null;let i=r.find(g=>g.name===n)||r[0],s=r.length===2?r.find(g=>g.name!==i?.name)||r[0]:null,c=i?to(i.meta?.icon):null,d=s?to(s.meta?.icon):null,l=i?.displayName||i?.name||"Theme",u=s?.displayName||s?.name||"Theme",f=r.length===2&&s&&d,m=f?d:c,p=f?t?void 0:o("common.themeSelector.tooltipWithNext","Change Theme: Switch to {{next}}",{next:s?.displayName||s?.name}):t?void 0:o("common.themeSelector.changeTheme","Change Theme"),v={variant:Oc.OUTLINE,"aria-label":o("common.themeSelector.changeTheme","Change Theme"),tooltip:p,icon:m,display:e};if(f&&s)return oo(Ir,{...v,onClick:()=>a(s.name),children:u});if(!i||!c)return null;let y=r.map(g=>{let S=to(g.meta?.icon),x=g.name===n;return{label:g.displayName||g.name,icon:S,onClick:()=>a(g.name),checked:x}});return oo(Vc,{trigger:oo(Ir,{...v,children:l}),items:y,contentWidth:"10rem"})},Gc=Hc;import{ExternalLink as Wc}from"lucide-react";import{getPlatformEnvVar as $c}from"@donotdev/core";import{jsx as Kc,jsxs as Yc}from"react/jsx-runtime";var ro=({className:e})=>{let o=$c("APP_URL")==="https://donotdev.com";return Yc("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",Kc(Wc,{style:{width:"12px",height:"12px"},"aria-hidden":"true"})]})};import{cn as qc}from"@donotdev/components";import{useTranslation as Zc,useAppConfig as Jc}from"@donotdev/core";import{jsxs as Xc}from"react/jsx-runtime";var Qc=({appName:e,year:t=new Date().getFullYear(),className:o})=>{let{t:r}=Zc("dndev"),n=Jc("app"),a=e||n?.name||"App";return Xc("span",{className:qc(o),style:{flexShrink:0,color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"},children:["\xA9 ",t," ",a,". ",r("footer.legal.allRightsReserved")]})};import{Stack as td}from"@donotdev/components";import{useTranslation as od,maybeTranslate as rd,useAppConfig as nd}from"@donotdev/core";var jc=[{path:"#cookie-settings",label:"footer.legal.cookieSettings"},{label:"footer.legal.privacyPolicy",path:"/privacy"},{label:"footer.legal.termsOfService",path:"/terms"}],ed=e=>e?.legalLinks===null?[]:e?.legalLinks??jc,Nr=ed;import{jsx as Pr,jsxs as id}from"react/jsx-runtime";var ad=({app:e,direction:t="column",gap:o="tight",align:r="stretch"})=>{let{t:n}=od("dndev"),a=nd("app"),s=Nr((e||a||{}).footer),c={transition:"color var(--dur-fast) ease-out",textDecoration:"underline",textUnderlineOffset:"2px",color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"};return s.length===0?null:id(td,{direction:t,gap:o,align:r,children:[s.map(d=>Pr(T,{path:d.path,style:c,onMouseEnter:l=>l.currentTarget.style.color="var(--primary)",onMouseLeave:l=>l.currentTarget.style.color="var(--muted-foreground)",children:rd(n,d.label)},d.path)),Pr(ro,{})]})};import{useEffect as ld}from"react";import{checkLicense as cd}from"@donotdev/core";var sd='<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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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>',Rr=`data:image/svg+xml,${encodeURIComponent(sd)}`;import{jsx as no,jsxs as Lr}from"react/jsx-runtime";function Zg(){let e=cd();return ld(()=>{e.isValid},[e.isValid]),e.isValid?null:Lr("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:Rr,alt:"DoNotDev Logo",style:{width:"48px",height:"48px",flexShrink:0}}),Lr("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"})]})]})}import{useEffect as dd,useState as ao,useMemo as ud}from"react";import{Stack as io,Spinner as pd}from"@donotdev/components";import{useTranslation as Yr,isFieldVisible as md}from"@donotdev/core";import*as B from"@donotdev/crud";var G=typeof B?.useCrud=="function",Dr=B?.useEntityForm,Fr=B?.useUnsavedChangesWarning,Br=B?.useFormStore,Mr=B?.useFieldConditions,ct=B?.useCrud,zr=B?.useCrudList,dt=B?.useCrudCardList,Or=B?.useEntityFavorites,Vr=B?.useCrudFilters,Ur=B?.useEntityWorkflow,_r=B?.useReferenceResolver,ut=B?.DisplayFieldRenderer,Hr=B?.FormFieldRenderer,Gr=B?.UploadProvider,pt=B?.EntityFilters,Wr=B?.CrudCard,$r=B?.translateFieldLabel,Kr=B?.formatValue;import{jsx as ge,jsxs as gd}from"react/jsx-runtime";function fd({entity:e,id:t,t:o,className:r="",loadingMessage:n,notFoundMessage:a,viewerRole:i,excludeFields:s}){if(!G)return null;let c=N("userRole"),d=i??c,{get:l,loading:u,data:f,error:m,isAvailable:p}=ct(e),[v,y]=ao(!1),[g,S]=ao(null),[x,b]=ao(null),{t:R}=Yr([e.namespace,"crud"]),{t:E}=Yr("crud"),A=o||R;dd(()=>{if(!t){b(null),S(null),y(!1);return}if(!p||!l)return;let L=!1;return y(!0),S(null),l(t).then(D=>{L||(y(!1),D?(b(D),S(null)):(b(null),S(new Error("Entity not found"))))}).catch(D=>{L||(y(!1),S(D instanceof Error?D:new Error(String(D))),b(null))}),()=>{L=!0}},[t,l,p]);let w=f||x,C=m||g,h=u||v||!t,k=ud(()=>w?Object.entries(e.fields).filter(([L,D])=>{if(s?.includes(L)||!md(D.visibility,d)||D.visibility==="hidden")return!1;let F=w[L];return!(F==null||typeof F=="string"&&F.trim()===""||Array.isArray(F)&&F.length===0||typeof F=="object"&&!Array.isArray(F)&&F!==null&&Object.keys(F).length===0)}):[],[e.fields,d,w,s]);return h?ge("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},className:r,children:ge(pd,{overlay:!0,"aria-label":n||E("form.loading",{defaultValue:"Loading..."})})}):C||!w?ge(io,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},className:r,children:gd(io,{direction:"column",gap:"tight",children:[ge("h3",{style:{color:"var(--muted-foreground)"},children:a||E("errors.notFound",{defaultValue:`${e.name} not found`})}),C&&ge("p",{style:{color:"var(--destructive)",fontSize:"var(--font-size-sm)"},children:C instanceof Error?C.message:String(C)})]})}):ge(io,{direction:"column",className:r,children:k.map(([L,D])=>ge(ut,{name:L,config:D,value:w[L],t:A},L))})}import{RefreshCw as vd,Plus as hd,Trash2 as yd,Edit as bd,Search as Sd}from"lucide-react";import{useMemo as Cd,useCallback as _e,useState as so}from"react";import{DataTable as xd,Button as lo,Stack as co,ActionButton as wd,Section as qr,Input as kd}from"@donotdev/components";import{useTranslation as Zr}from"@donotdev/core";import{Fragment as Ed,jsx as ne,jsxs as mt}from"react/jsx-runtime";function Td({entity:e,basePath:t,onClick:o,hideFilters:r=!1,pagination:n="auto",pageSize:a,queryOptions:i,exportable:s=!0}){if(!G)return null;let c=Ce(),d=t??`/${e.collection}`,l=_r(e),[u,f]=so(1),[m,p]=so(a),[v,y]=so(""),{data:g,items:S,processed:x,loading:b,mutate:R,effectiveMode:E}=zr(e,{pagination:n,searchQuery:v,...i&&{queryOptions:i},...(n==="server"||n==="auto")&&{page:u,pageSize:m}}),{delete:A}=ct(e),{t:w}=Zr("crud"),{t:C}=Zr([e.namespace,"crud"]),h=_e(async()=>{await R()},[R]),k=_e(_=>{c(`${d}/${_}`)},[d,c]),L=_e(_=>{o?o(_):c(`${d}/${_}`)},[d,c,o]),D=_e(()=>{c(`${d}/new`)},[d,c]),F=_e(async _=>{await A(_)},[A]),Ee=Cd(()=>{let he=(e.listFields||Object.keys(e.fields)).map(j=>{let ee=e.fields[j];if(!ee)return null;let ce=$r(j,ee,C),Ie=ee.type||"text";return{key:j,title:ce,dataIndex:j,sortable:!0,filterable:!0,align:Ie==="number"||Ie==="range"?"end":"start",render:(Ne,Pe)=>Kr(Ne,ee,C,{compact:!0,referenceData:l})}}).filter(Boolean);return he.unshift({key:"_actions",title:w("actions.label",{defaultValue:"Actions"}),dataIndex:void 0,sortable:!1,width:120,align:"center",render:(j,ee)=>mt(co,{direction:"row",gap:"tight",align:"center",justify:"center",children:[ne(lo,{variant:"outline",icon:bd,onClick:ce=>{ce.stopPropagation(),k(ee.id)},"aria-label":w("edit",{defaultValue:"Edit"})}),ne(wd,{action:async()=>{await F(ee.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:yd,"aria-label":w("delete",{defaultValue:"Delete"}),children:w("delete",{defaultValue:"Delete"})})]})}),he},[e,C,w,k,F]),X=C("name",{defaultValue:e.name}),Ae=x.length;return mt(Ed,{children:[ne(qr,{title:w("filters.title",{entity:X,defaultValue:`Browse ${X} - Filters`}),collapsible:!0,defaultOpen:!0,children:mt(co,{children:[mt(co,{direction:"row",gap:"tight",align:"center",className:"dndev-w-full",style:{display:"grid",gridTemplateColumns:"1fr auto auto"},children:[ne(kd,{placeholder:w("search.placeholder",{defaultValue:"Search..."}),value:v,onChange:_=>y(_.target.value),icon:Sd,className:"dndev-w-full"}),ne(lo,{icon:vd,variant:"outline",onClick:h,disabled:b,display:"compact","aria-label":w("refresh",{defaultValue:"Refresh"})}),ne(lo,{icon:hd,onClick:D,display:"compact",children:w("addNew",{defaultValue:"Add New"})})]}),!r&&ne(pt,{entity:e,data:S,fieldsToFilter:e.listFields})]})}),ne(qr,{title:b?w("results.title.fetching",{defaultValue:"Fetching..."}):w("results.title.count",{count:Ae,defaultValue:Ae===1?"Found 1 occurrence":`Found ${Ae} occurrences`}),collapsible:!0,defaultOpen:!0,children:ne(xd,{data:x,columns:Ee,sortable:!0,searchable:!1,pagination:!0,loading:b,onRowClick:_=>L(_.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},...E==="server"&&{currentPage:u,pageSize:m,total:g?.total,onPageChange:f,onPageSizeChange:p},exportable:s,exportFilename:`${e.collection}-export`,exportLabel:w("export",{defaultValue:"Export"})})})]})}import{Heart as Qr}from"lucide-react";import{useMemo as Xr,useCallback as Ad}from"react";import{Card as tn,Grid as on,Stack as uo,Text as He,Skeleton as Te,Section as jr,Button as Id}from"@donotdev/components";import{useTranslation as en,getListCardFieldNames as rn,useBreakpoint as Nd}from"@donotdev/core";import{jsx as Jr}from"react/jsx-runtime";function ft({detailHref:e,onClick:t,...o}){if(!G)return null;let r=Jr(Wr,{...o,onClick:e?void 0:t});return e?Jr(T,{path:e,"aria-label":o.item?.id?`View ${o.item.id}`:void 0,children:r}):r}import{Fragment as Fd,jsx as P,jsxs as gt}from"react/jsx-runtime";function Pd(e){let t=e.listCardFields;if(t&&!Array.isArray(t)){let i=t;return{titleFields:i.title??[],subtitleFields:i.subtitle??[],contentFields:i.content??[],footerFields:i.footer??[]}}let o=rn(e),r=i=>{let s=e.fields[i]?.type;return s==="image"||s==="images"},n=o.filter(i=>!r(i)),a=o.filter(r);return{titleFields:n.length>0?[n[0]]:[],subtitleFields:[],contentFields:[...n.slice(1,4),...a],footerFields:[]}}var Rd={mobile:0,tablet:1,laptop:2,desktop:3};function Ld({cols:e,entity:t}){let o=Pd(t),r=Nd("current"),a=((Array.isArray(e)?e[Rd[r]??3]:e)??1)*3,i=d=>{let l=t.fields[d]?.type;return l==="image"||l==="images"},s=o.contentFields.length>0?P(uo,{direction:"column",gap:"tight",children:o.contentFields.map(d=>i(d)?P(Te,{height:120},d):gt("div",{children:[P(He,{level:"small",variant:"muted",children:P(Te,{})}),P(He,{children:P(Te,{})})]},d))}):void 0,c=o.footerFields.length>0?P(He,{level:"small",children:P(Te,{})}):void 0;return P(on,{cols:e,children:Array.from({length:a},(d,l)=>P(tn,{title:P(Te,{}),subtitle:o.subtitleFields.length>0?P(Te,{}):void 0,content:s,footer:c,elevated:!0},l))})}function Dd({entity:e,basePath:t,onClick:o,cols:r=[1,2,3,4],staleTime:n=1e3*60*30,queryOptions:a,filter:i,hideFilters:s=!1,resultLabel:c,tone:d}){if(!G)return null;let l=Ce(),u=t??`/${e.collection}`,{items:f,processed:m,loading:p}=dt(e,{staleTime:n,queryOptions:a}),{isFavorite:v,toggleFavorite:y,favoritesFilter:g}=Or({collection:e.collection}),{showFavoritesOnly:S,setShowFavoritesOnly:x}=Vr({collection:e.collection}),b=Xr(()=>{let h=m;return S&&(h=h.filter(g)),i&&(h=h.filter(i)),h},[m,S,g,i]),{t:R}=en([e.namespace,"crud"]),{t:E}=en("crud"),A=Ad(h=>{o?o(h):l(`${u}/${h}`)},[u,l,o]),w=Xr(()=>rn(e),[e]),C=R("name",{defaultValue:e.name});return gt(Fd,{children:[!s&&P(jr,{title:E("filters.title",{entity:C,defaultValue:`Browse ${C} - Filters`}),collapsible:!0,defaultOpen:!0,tone:d,children:P(tn,{children:gt(uo,{direction:"column",children:[P(Id,{variant:S?"primary":"outline",icon:P(Qr,{size:18}),onClick:()=>x(!S),children:S?E("favorites.showAll",{defaultValue:"Show All"}):E("favorites.showFavorites",{defaultValue:"Show Favorites"})}),P(pt,{entity:e,data:f,fieldsToFilter:w})]})})}),P(jr,{title:p?E("results.title.fetching",{defaultValue:"Fetching..."}):c?c(b.length):E("results.title.count",{count:b.length,defaultValue:b.length===1?"Found 1 occurrence":`Found ${b.length} occurrences`}),collapsible:!0,defaultOpen:!0,tone:d,children:p?P(Ld,{cols:r,entity:e}):b.length===0?gt(uo,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[P(He,{level:"h3",style:{color:"var(--muted-foreground)"},children:E("emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),P(He,{style:{color:"var(--muted-foreground)"},children:E("emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):P(on,{cols:r,children:b.map(h=>{let k=v(h.id),L=o?void 0:`${u}/${h.id}`;return P(ft,{item:h,entity:e,detailHref:L,onClick:o?()=>A(h.id):void 0,renderActions:P(Qr,{fill:k?"#ef4444":"#ffffff",stroke:k?"#ef4444":"var(--muted-foreground)",onClick:D=>{D.preventDefault(),D.stopPropagation(),y(h.id)},style:{cursor:"pointer",width:"var(--icon-md)",height:"var(--icon-md)",transition:"fill 0.2s, stroke 0.2s"},"aria-label":k?E("favorites.remove",{defaultValue:"Remove from favorites"}):E("favorites.add",{defaultValue:"Add to favorites"})})},h.id)})})})]})}import{useEffect as nn,useId as Bd,useMemo as vt,useState as Md}from"react";import{FormProvider as zd}from"react-hook-form";import{Badge as Od,Button as ht,DropdownMenu as Vd,Grid as Ud,Stack as _d,Spinner as Hd}from"@donotdev/components";import{hasRoleAccess as Gd,useTranslation as an}from"@donotdev/core";import{jsx as Y,jsxs as yt}from"react/jsx-runtime";function po({entity:e,onSubmit:t,t:o,className:r="",submitText:n,loading:a=!1,defaultValues:i,submitVariant:s="primary",secondaryButtonText:c,secondaryButtonVariant:d="outline",onSecondarySubmit:l,viewerRole:u,operation:f=i?"edit":"create",formId:m,cancelText:p,cancelPath:v,successPath:y,onCancel:g,warnOnUnsavedChanges:S=!0,unsavedChangesMessage:x,hideVisibilityInfo:b=!1}){if(!G)return null;let R=Ce(),E=N("userRole"),A=u??E,w=Bd(),C=m??`entity-form-${e.name}-${w}`,{t:h}=an([e.namespace,"crud"]),{t:k}=an("crud"),L=o||h,F=!b&&(A==="admin"||A==="super"),Ee=A==="user"||A==="admin"||A==="super",[X,Ae]=Md(A==="admin"||A==="super"||A==="user"?A:"guest"),_={guest:"muted",user:"secondary",admin:"warning",super:"destructive",technical:"accent",owner:"secondary"},he=["guest","user","admin","super"],j={guest:"Guest",user:"User",admin:"Admin",super:"Super",technical:"System"},ee=vt(()=>he.filter(I=>Gd(A,I)).map(I=>({label:j[I],checked:X===I,onClick:()=>Ae(I)})),[X,A]),ce=Dr(e,{formId:C,operation:f,defaultValues:i,viewerRole:A,t:L}),{control:Ie,handleSubmit:mo,formState:{errors:fo},fields:Ne,formStatus:Pe,uploadProgress:Re,cleanup:go,isDirty:un,hasUserInteracted:pn,resetForm:mn}=ce,xt=un&&pn,vo=vt(()=>{if(!Ee)return Ne;let I=he.indexOf(X);return Ne.filter(({config:V})=>{let te=V.visibility;return te==="hidden"?!1:te==="technical"?!0:he.indexOf(te)<=I})},[Ne,Ee,X]),fn=Mr(vo,Ie);nn(()=>{C&&Br.getState().setIsDirty(C,xt)},[C,xt]),nn(()=>go,[go]);let gn=vt(()=>x||k("messages.unsavedChangesLeave",{defaultValue:"You have unsaved changes. Are you sure you want to leave?"}),[x,k]);Fr({isDirty:xt,enabled:S,message:gn});let vn=()=>{mn(),g?g():R(v||"back")},hn=async I=>{try{await t(I),R(y||"back")}catch{}},yn=p!==null,ho=p??k("form.cancel",{defaultValue:"Cancel"}),yo={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)"},bn=a||f==="edit"&&!i,ae=vt(()=>Pe==="uploading"?{loading:!0,loadingText:Re<100?k("form.uploading",{progress:Math.round(Re),defaultValue:`Uploading ${Math.round(Re)}%...`}):k("form.processing",{defaultValue:"Processing..."}),progress:Re}:Pe==="validating"?{loading:!0,loadingText:k("form.validating",{defaultValue:"Validating..."})}:Pe==="submitting"?{loading:!0,loadingText:k("form.saving",{defaultValue:"Saving..."})}:{loading:!1},[Pe,Re,k]);return Y(zd,{...ce,children:Y(Gr,{formId:C,children:yt("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},children:[bn&&Y(Hd,{overlay:!0}),yt("form",{onSubmit:mo(hn),noValidate:!0,className:r,style:{width:"100%",gridColumn:"1 / -1",display:"contents"},children:[vo.map(({name:I,config:V,editable:te})=>{let $=fn[I];if($&&!$.visible)return null;let bo=$?{...V,...$.required&&V.validation?{validation:{...V.validation,required:!0}}:$.required?{validation:{required:!0}}:{}}:V,Sn=te&&!$?.disabled&&!$?.readonly,Cn=F&&V.visibility!=="guest",xn=V.visibility!=="hidden"?_[V.visibility]:void 0,wn=j[V.visibility]??V.visibility,So=Sn?Y(Hr,{name:I,config:bo,control:Ie,errors:fo,t:L},I):Y(ut,{name:I,config:bo,value:i?.[I],t:L},I);return Cn?yt("div",{style:{position:"relative"},children:[Y(Od,{as:"span",variant:xn,style:{position:"absolute",top:0,insetInlineEnd:0,fontSize:"var(--font-size-xs)",zIndex:1},children:wn}),So]},I):So}),(()=>{let I=[];if(yn&&ho&&I.push(Y(ht,{type:"button",onClick:vn,disabled:ae.loading,variant:"outline",className:"dndev-w-full",children:ho},"cancel")),Ee){let $=_[X]||"muted";I.push(Y(Vd,{trigger:yt(ht,{type:"button",variant:$,disabled:ae.loading,className:"dndev-w-full",children:[k("visibility.preview",{defaultValue:"Preview"}),": ",j[X]]}),items:ee},"preview"))}c&&I.push(Y(ht,{type:"button",onClick:()=>{if(l){let $=ce.getValues();l($)}},loading:ae.loading,loadingText:ae.loadingText,progress:ae.progress,variant:d,className:"dndev-w-full",children:c},"secondary")),I.push(Y(ht,{type:"submit",loading:ae.loading,loadingText:ae.loadingText,progress:ae.progress,variant:s,className:"dndev-w-full",children:n||k("form.submit",{defaultValue:"Submit"})},"submit"));let V=I.length;if(V===1)return Y(_d,{direction:"column",gap:"tight",style:yo,children:I[0]});let te=V===2?"1fr 2fr":V===3?"1fr 1fr 2fr":"1fr 1fr 1fr 2fr";return Y(Ud,{cols:["1fr",te,te,te],gap:"tight",style:yo,children:I})})()]})]})})})}import{Card as Wd,Section as $d,Skeleton as bt,Stack as Kd}from"@donotdev/components";import{useTranslation as Yd,useBreakpoint as qd}from"@donotdev/core";import{jsx as ve,jsxs as Jd}from"react/jsx-runtime";function Zd({entity:e,queryOptions:t,title:o,basePath:r,cols:n=3,className:a}){if(!G)return null;let{t:i}=Yd([e.namespace,"crud"]),{items:s,loading:c}=dt(e,{queryOptions:t});if(!c&&s.length===0)return null;let d=r??`/${e.collection}`,l=o??i("recommendations.title",{defaultValue:"You may also like"}),u=qd("current"),f={mobile:0,tablet:1,laptop:2,desktop:3},p=((Array.isArray(n)?n[f[u]??3]:n)??1)*3;return ve($d,{title:l,gridCols:n,className:a,children:c?Array.from({length:p},(v,y)=>ve(Wd,{title:ve(bt,{width:"60%"}),subtitle:ve(bt,{width:"40%"}),content:Jd(Kd,{direction:"column",gap:"tight",children:[ve(bt,{width:"80%"}),ve(bt,{width:"50%"})]}),elevated:!0},y)):s.map(v=>ve(ft,{item:v,entity:e,detailHref:`${d}/${v.id}`},v.id))})}import{Button as Qd,Stack as Xd,Stepper as jd}from"@donotdev/components";import{useTranslation as eu}from"@donotdev/core";import{Fragment as ou,jsx as St,jsxs as ru}from"react/jsx-runtime";function tu({workflow:e,onComplete:t,onStepChange:o,defaultValues:r,viewerRole:n,children:a,className:i}){if(!G)return null;let{t:s}=eu("crud"),c=Ur(e,{onComplete:t,onStepChange:o,defaultValues:r});if(a)return St(ou,{children:a(c)});let{currentStep:d,currentStepIndex:l,visibleSteps:u,isFirst:f,isLast:m,isSubmitting:p,stepData:v}=c,y=u.map((g,S)=>({number:S+1,title:g.title,content:null}));return ru(Xd,{className:i,gap:"large",children:[St(jd,{steps:y,activeStep:l,showStepNumbers:!0,onStepChange:g=>{g<=l&&c.goToStep(g)}}),d.custom?d.custom(c.allData):d.entity?St(po,{entity:d.entity,operation:"create",viewerRole:n,defaultValues:{...v[d.id],...!m&&{status:"draft"}},onSubmit:async g=>{await c.goNext(g)},submitText:m?s("workflow.submit",{defaultValue:"Submit"}):s("workflow.next",{defaultValue:"Next"}),cancelText:f?null:s("workflow.previous",{defaultValue:"Previous"}),onCancel:f?void 0:c.goPrevious,loading:p,warnOnUnsavedChanges:!1,hideVisibilityInfo:!0}):null,d.allowSkip&&!m&&St(Qd,{variant:"ghost",onClick:c.skipStep,className:"dndev-w-full",children:s("workflow.skip",{defaultValue:"Skip this step"})})]})}import{createContext as ln,useId as nu,use as sn}from"react";import{Controller as au,FormProvider as iu,useFormContext as su}from"react-hook-form";import{Label as lu,Slot as cu,cn as du,Stack as uu}from"@donotdev/components";import{jsx as le}from"react/jsx-runtime";var Q0=iu,cn=ln({}),X0=({...e})=>le(cn.Provider,{value:{name:e.name},children:le(au,{...e})}),dn=ln({}),j0=({className:e,...t})=>{let o=nu();return le(dn.Provider,{value:{id:o},children:le(uu,{className:e,...t})})},Ct=()=>{let e=sn(cn);if(!e||!e.name)return null;let t=sn(dn);if(!t)return null;let{getFieldState:o,formState:r}=su(),n=o(e.name,r),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...n}},e3=({className:e,...t})=>{let o=Ct();if(!o)return null;let{error:r,formItemId:n}=o;return le(lu,{className:du(r&&"text-destructive",e),htmlFor:n,...t})},t3=({...e})=>{let t=Ct();if(!t)return null;let{error:o,formItemId:r,formDescriptionId:n,formMessageId:a}=t;return le(cu,{id:r,"aria-describedby":o?`${n} ${a}`:`${n}`,"aria-invalid":!!o,...e})},o3=({className:e,...t})=>{let o=Ct();if(!o)return null;let{formDescriptionId:r}=o;return le("p",{id:r,className:e,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},...t})},r3=({className:e,children:t,...o})=>{let r=Ct();if(!r)return null;let{error:n,formMessageId:a}=r,i=n?String(n?.message):t;return i?le("p",{id:a,className:e,style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:"var(--destructive)"},...o,children:i}):null};var pu={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"},mu={zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zOverlay:"dndev-z-overlay",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},f3={...pu,...mu},g3={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"},v3={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{pl as AppBranding,gl as AppIcon,yl as AppTitle,H as AssetResolver,Fn as AuthGuard,fp as AuthGuardFallback,Ot as AuthHeader,Mt as AuthMenu,Pl as Breadcrumbs,Zt as CacheSettings,ff as ConsentBanner,Vo as DnDevNavigationMenu,Jl as DropdownNavigation,Dd as EntityCardList,fd as EntityDisplayRenderer,po as EntityFormRenderer,Td as EntityList,Zd as EntityRecommendations,tu as EntityWorkflow,Ls as FeatureCard,ds as FeatureDisabled,ec as FloatingLanguageSwitcher,ro as FooterBranding,Qc as FooterCopyright,ad as FooterLegalLinks,Q0 as Form,t3 as FormControl,o3 as FormDescription,X0 as FormField,j0 as FormItem,e3 as FormLabel,r3 as FormMessage,bf as GameContainer,wf as GameFlow,Fl as GameTitle,Sp as GoTo,Oa as GoToInput,Na as GoToWrapper,ic as HeaderMenu,mc as HeaderNavigation,kn as Icon,Zg as LicenseWatermark,T as Link,Uo as NotFoundPage,kc as Notifications,Ye as PageContainer,ws as ProgressBar,Ss as RedirectOverlay,Mc as SettingsMenu,Es as Skeleton,js as TechBento,Gc as ThemeToggle,f3 as allLayoutClasses,Mu as createAuthConfig,v3 as cssVariables,fu as isAuthAvailable,D1 as isBillingAvailable,_1 as isCrudAvailable,A1 as isFormStoreAvailable,$1 as isOAuthAvailable,pu as layoutClasses,mu as layoutUtilities,g3 as layoutVariables,k1 as resolveFaviconSet,w1 as resolveLogo,we as sanitizeSvg,J1 as tList,Wt as techLogos,N as useAuthSafe,Fu as useAuthState,Qe as useAuthVisibility,d1 as useBack,z1 as useBillingVisibility,Ru as useCanAccess,Bn as useCanNavigate,U1 as useCrudSafe,Ct as useFormField,ri as useFormStoreSafe,gu as useGoTo,Du as useHasRole,m1 as useLocation,h1 as useMatch,Ce as useNavigate,Z as useNavigationItems,Co as useNavigationRoute,W1 as useOAuthSafe,f1 as useParams,p1 as usePrefetch,y1 as useQueryParams,b1 as useRedirectGuard,u1 as useRefresh,g1 as useRouteParam,v1 as useSearchParams,Dt as useStripeBillingSafe,Lu as useUserRole,Bu as withAuth};
|
|
3
|
+
`);try{await navigator.clipboard.writeText(y),i(!0),setTimeout(()=>i(!1),2e3)}catch{}},m=()=>{try{t()}catch{typeof window<"u"&&window.location.reload()}},v=()=>{try{s()}catch{typeof window<"u"&&window.history.back()}};return U("div",{className:"dndev-container","data-variant":"standard","data-centered":"true",children:U(Po,{variant:Ro.DEFAULT,elevated:!0,className:"dndev-w-full",style:{maxWidth:"65ch",margin:"0 auto"},children:ue(be,{gap:"large",align:"center",className:"dndev-text-center",children:[U(be,{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(On,{style:{width:"2.5rem",height:"2.5rem",color:"var(--destructive)"},"aria-hidden":"true"})}),ue(be,{children:[U("h1",{className:"dndev-text-base","data-level":"h1",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-bold)",margin:0},children:n("routeError.title","Something went wrong")}),U("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-lg)",color:"var(--muted-foreground)",margin:0},children:n("routeError.description","We encountered an error while loading this page.")}),U(Kn,{variant:Yn.INFO,hideIcon:!0,children:U("div",{style:{fontSize:"var(--font-size-sm)",textAlign:"center"},children:n("routeError.dataSafe","Don't worry, your data is safe.")})})]}),r&&ue("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:[n("routeError.errorId","Error ID"),": ",r]}),f&&l&&ue(Po,{variant:Ro.MUTED,className:"dndev-w-full",children:[ue(be,{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(Ke,{variant:Ye.GHOST,icon:a?Gn:Hn,onClick:p,disabled:a,children:a?n("routeError.copied","Copied"):n("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:l})]}),ue(be,{className:"dndev-w-full",children:[U(Ke,{variant:Ye.DESTRUCTIVE,icon:_n,onClick:m,fullWidth:!0,children:n("routeError.tryAgain","Try Again")}),ue(be,{direction:"row",justify:"center",children:[U(T,{path:"/",children:U(Ke,{variant:Ye.DEFAULT,icon:Vn,fullWidth:!0,children:n("routeError.goHome","Go Home")})}),U(Ke,{variant:Ye.OUTLINE,icon:Un,onClick:v,fullWidth:!0,children:n("routeError.goBack","Go Back")})]})]}),U("p",{className:"dndev-text-base",style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)",margin:0},children:n("routeError.contactSupport","If the problem persists, please contact support.")})]})})})},Lo=Xn;import{jsx as Le}from"react/jsx-runtime";function ta(e){return Le(jn,{fallback:Le("div",{children:"Loading error fallback..."}),children:Le(Lo,{...e})})}var qe=({variant:e="standard",density:t,className:o,children:r,centered:n=!0,gapFirst:a=!1})=>Le(No,{level:"route",fallback:ta,children:Le("div",{className:ea("dndev-container",o),"data-variant":e,"data-density":t,"data-centered":n?"true":"false","data-gap-first":a?"true":void 0,children:r})});import{Fragment as fa,jsx as M,jsxs as De}from"react/jsx-runtime";var ma=aa(()=>import("@donotdev/auth").then(e=>({default:e.MultipleAuthProviders})));function gp({title:e,description:t,showBackButton:o=!0,onBack:r,className:n=""}){let{t:a}=da(["auth","common"]),i=ua(),s=pa(),c=()=>{r?r():s()};return M(qe,{variant:"docs",children:M(Se,{align:"center",justify:"center",className:ca("dndev-min-h-60",n),style:{paddingTop:"var(--gap-lg)",paddingBottom:"var(--gap-lg)"},children:M(ia,{className:"dndev-w-full",style:{maxWidth:"28rem",border:"none",boxShadow:"var(--shadow-xl)"},title:De(Se,{children:[M(Se,{justify:"center",children:M("div",{style:{borderRadius:"9999px",backgroundColor:"color-mix(in oklab, var(--primary) 10%, transparent)",padding:"var(--gap-md)"},children:M(ra,{className:"dndev-size-touch",style:{color:"var(--primary)"}})})}),M("div",{style:{fontSize:"var(--font-size-2xl)",fontWeight:700},children:a("auth.fallback.title","Authentication Required")}),M("p",{style:{color:"var(--muted-foreground)"},children:a("auth.fallback.description","Please sign in to access this page")})]}),children:De(Se,{children:[De(Se,{gap:"large",children:[M("div",{children:M("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:a("auth.fallback.chooseProvider")})}),M(na,{fallback:M("div",{children:"Loading providers..."}),children:M(ma,{layout:"vertical",spacing:"tight",fullWidth:!0,ariaLabel:a("auth.fallback.authOptions")})})]}),o&&De(fa,{children:[M(la,{}),M("div",{children:M(sa,{onClick:c,className:"dndev-gap-sm",icon:oa,children:a("common.back")})})]}),De(Se,{gap:"tight",style:{fontSize:"var(--font-size-xs)",color:"var(--muted-foreground)"},children:[M("p",{children:a("auth.fallback.secure")}),M("p",{children:a("auth.fallback.terms")})]})]})})})})}import{Search as ga}from"lucide-react";import{Button as va,BUTTON_VARIANT as ha,DISPLAY as ya}from"@donotdev/components";import{useOverlayStore as ba,useTranslation as Sa}from"@donotdev/core";import{jsx as Ca,jsxs as xa}from"react/jsx-runtime";var Cp=({display:e=ya.AUTO,className:t,onOpen:o})=>{let{t:r}=Sa("dndev"),n=ba(c=>c.openCommandDialog),i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgentData?.platform??navigator.platform)?"\u2318K":"Ctrl+K",s=()=>{n(),o?.()};return xa(va,{variant:ha.OUTLINE,display:e,icon:ga,onClick:s,className:t,"aria-label":r("goTo.ariaLabel","Go to page"),children:[r("goTo.label","Go to"),Ca("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 wa,lazy as ka}from"react";import{useEventListener as Ta,useOverlayStore as Ea}from"@donotdev/core";import{jsx as Do}from"react/jsx-runtime";var Aa=ka(()=>import("./GoToDialog-CR4VOVXT.js")),Ia=()=>{let e=Ea(t=>t.openCommandDialog);return Ta("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}}),Do(wa,{fallback:null,children:Do(Aa,{})})},Na=Ia;import{Search as Pa}from"lucide-react";import{useCallback as Fo,useEffect as Ra,useState as La,useRef as Da}from"react";import{Stack as Fa}from"@donotdev/components";import{useOverlayStore as At}from"@donotdev/core";import{useTranslation as Ba}from"@donotdev/core";import{jsx as Ze,jsxs as Va}from"react/jsx-runtime";var Ma=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.userAgent),za=()=>{let{t:e}=Ba("dndev"),[t,o]=La(""),r=Da(null),n=At(s=>s.isCommandDialogOpen);Ra(()=>{n||o("")},[n]);let a=Fo(()=>{At.getState().openCommandDialog(t)},[t]),i=Fo(s=>{s.key==="Enter"&&(s.preventDefault(),At.getState().openCommandDialog(t))},[t]);return Va(Fa,{direction:"row",align:"center",className:"dndev-relative dndev-w-full dndev-max-w-sm",role:"search",children:[Ze(Pa,{className:"dndev-absolute dndev-size-md",style:{insetInlineStart:"0.75rem",opacity:.5},"aria-hidden":"true"}),Ze("input",{ref:r,type:"text",value:t,onChange:s=>o(s.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")}),Ze("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:Ze("kbd",{style:{padding:"0.25rem 0.5rem",fontSize:"var(--font-size-xs)",fontFamily:"var(--font-mono)",borderRadius:"var(--radius-sm)"},children:Ma?"\u2318K":"Ctrl+K"})})]})},Oa=za;import{MoreHorizontal as Ua,Link as Bo}from"lucide-react";import{useState as _a,useEffect as Mo,useRef as Ha,useMemo as Ga}from"react";import{NavigationMenu as zo,NavigationMenuListPrimitive as Wa,NavigationMenuItemPrimitive as Oo,Button as $a,DropdownMenu as Ka,cn as Je,DISPLAY as Ya}from"@donotdev/components";import{useTranslation as qa}from"@donotdev/core";import{jsx as q,jsxs as It}from"react/jsx-runtime";var Vo=({routes:e,vertical:t=!1,display:o=Ya.AUTO,overflowDetection:r=!1,showIcons:n=!0,className:a,style:i})=>{let{t:s}=qa("dndev"),c=Z(),d=e??c,l=Ha(null),[u,f]=_a(d.length),p=Ga(()=>d.map(m=>({label:m.label,path:m.path,icon:q(H,{icon:m.icon,fallback:Bo}),children:m.children?m.children.map(v=>({label:v.label,path:v.path,icon:q(H,{icon:v.icon,fallback:Bo})})):void 0})),[d]);if(Mo(()=>{if(!r||d.length===0||t)return;let m=()=>{let y=l.current;if(!y)return;let g=y.getBoundingClientRect(),S=y.querySelectorAll("[data-nav-item]"),x=y.querySelector("[data-more-button]"),b=0,A=x?.offsetWidth||0;for(let E=0;E<S.length;E++){let I=S[E];if(!I)break;if(I.getBoundingClientRect().right-g.left+(E===S.length-1&&x?A:0)<=g.width)b=E+1;else break}f(Math.max(0,b))},v=new ResizeObserver(m);return l.current&&v.observe(l.current),setTimeout(m,0),()=>v.disconnect()},[r,d.length,t]),Mo(()=>{r&&!t&&f(d.length)},[d.length,r,t]),d.length===0)return null;if(r&&!t){let m=Math.min(u,p.length),v=p.slice(0,m),y=p.slice(m);return q(zo,{className:Je(a),style:i||{flex:1},children:It(Wa,{ref:l,"data-vertical":"false",style:{display:"flex",alignItems:"center",gap:"var(--gap-sm)",flexWrap:"nowrap",overflow:"hidden"},children:[v.filter(g=>g.path).map((g,S)=>q(Oo,{"data-nav-item":!0,children:It(T,{path:g.path,className:Je("dndev-interactive"),"data-role":"nav-trigger",children:[n&&g.icon,q("span",{className:"dndev-interactive-label",children:g.label})]})},g.path||S)),y.length>0&&q(Oo,{"data-more-button":!0,children:q(Ka,{trigger:q($a,{className:"dndev-size-touch",style:{flexShrink:0},"aria-label":s("navigation.more","More"),children:q(Ua,{className:"dndev-size-md"})}),items:y.filter(g=>g.path).map(g=>({label:g.label,children:It(T,{path:g.path,className:Je("dndev-interactive"),"data-role":"menu-item",children:[n&&g.icon,q("span",{className:"dndev-interactive-label",children:g.label})]}),asChild:!0})),contentWidth:"14rem",contentAlign:"end"})})]})})}return q(zo,{items:p,vertical:t,display:o,className:Je(a,t&&"dndev-sidebar-nav-menu"),LinkComponent:T})};import{Home as Za,ArrowLeft as Ja,Link as Qa}from"lucide-react";import{useMemo as Xa}from"react";import{Button as Nt,BUTTON_VARIANT as Pt,Stack as Fe,Text as Rt}from"@donotdev/components";import{useTranslation as ja}from"@donotdev/core";import{useLocation as ei,useNavigate as ti}from"@donotdev/ui/routing/hooks";import{jsx as $,jsxs as Qe}from"react/jsx-runtime";function Uo(){let{t:e}=ja("dndev"),t=ei(),o=ti(),r=Z(),n=Xa(()=>r.filter(i=>!i.path.includes(":")&&i.path!=="/").slice(0,4),[r]),a=()=>{o("back")};return $(qe,{variant:"docs",centered:!0,children:Qe(Fe,{gap:"large",align:"center",justify:"center",children:[Qe(Fe,{align:"center",children:[$(Rt,{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"}),$(Rt,{level:"h2",style:{fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-semibold)",margin:0},children:e("errors.notFound.title","Page Not Found")}),$(Rt,{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})]}),n.length>0&&Qe(Fe,{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:")}),$(Fe,{direction:"row",wrap:"wrap",justify:"center",gap:"tight",children:n.map(i=>$(T,{path:i.path,replace:!0,children:$(Nt,{variant:Pt.OUTLINE,icon:$(H,{icon:i.icon,fallback:Qa}),"aria-label":e("errors.notFound.navigateTo",`Navigate to ${i.label}`,{label:i.label}),children:i.label})},i.path))})]}),Qe(Fe,{direction:"row",wrap:"wrap",justify:"center",children:[$(T,{path:"/",replace:!0,children:$(Nt,{variant:Pt.DEFAULT,icon:Za,"aria-label":e("errors.notFound.goHome","Go to home page"),children:e("errors.notFound.goHome","Go Home")})}),$(Nt,{variant:Pt.OUTLINE,icon:Ja,onClick:a,"aria-label":e("errors.notFound.goBack","Go back to previous page"),children:e("errors.notFound.goBack","Go Back")})]})]})})}import{useNavigate as Ce,useBack as u1,useRefresh as p1,usePrefetch as m1,useLocation as f1,useParams as g1,useRouteParam as v1,useSearchParams as h1,useMatch as y1,useQueryParams as b1,useRedirectGuard as S1}from"@donotdev/ui/routing/hooks";import{getDndevConfig as Lt,isClient as pe,isDev as _o}from"@donotdev/core";var G=class{static getBrowserSupport(){if(!pe())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 r=document.createElement("canvas");r.width=1,r.height=1,o.webp=r.toDataURL("image/webp").indexOf("data:image/webp")===0}catch{o.webp=!1}try{let r=document.createElement("canvas");r.width=1,r.height=1,o.avif=r.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 r of t)o.push(...this.extractStringValues(r));else if(typeof t=="object")for(let r of Object.values(t))o.push(...this.extractStringValues(r));return o}static assetExists(t){if(!pe())return!1;let o=this.getAssetManifest();return o?this.extractStringValues(o).includes(t):!1}static getAssetManifest(){return pe()&&Lt()?.assets?.mapping||null}static getLogoSvgContent(){return Lt()?.assets?.logoSvgContent||null}static resolveLogo(t){if(t)return t;let o="logo";if(this.cache.has(o))return this.cache.get(o);let n=this.getAssetManifest()?.logo?.optimal||"/logo.svg";return this.cache.set(o,n),n}static directAssetCheck(t){if(!pe())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",s={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,s),s}let r=this.assetExists("/icon-512x512.png")?"/icon-512x512.png":this.assetExists("/icon-192x192.png")?"/icon-192x192.png":"/logo.svg",n={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":r,png32:this.assetExists("/favicon-32x32.png")?"/favicon-32x32.png":r,apple180:this.assetExists("/apple-touch-icon.png")?"/apple-touch-icon.png":r,android192:this.assetExists("/icon-192x192.png")?"/icon-192x192.png":r,android512:this.assetExists("/icon-512x512.png")?"/icon-512x512.png":r};return this.cache.set(t,n),n}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 r of o)if(this.assetExists(r))return r;return"/favicon.svg"}static clearCache(){this.cache.clear(),_o()&&pe()}static getDebugInfo(){return{browserSupport:this.getBrowserSupport(),detectedAssets:pe()?Lt()?.assets?.mapping:null,assetManifest:this.getAssetManifest(),cache:Object.fromEntries(this.cache)}}};Ge(G,"cache",new Map);function k1(e){return G.resolveLogo(e)}function T1(){return G.resolveFaviconSet()}_o()&&(G.clearCache(),pe()&&window.addEventListener("DOMContentLoaded",()=>{G.clearCache()}));import*as oi from"@donotdev/crud";var Ho={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},xe=oi?.useFormStore,I1=typeof xe=="function";function ri(e){return xe?xe(e):e(Ho)}ri.getState=()=>xe&&typeof xe.getState=="function"?xe.getState():Ho;import{useMemo as ni}from"react";function Xe(){let e=P("status"),t=P("isAvailable"),o=P("user");return ni(()=>({shouldHide:e!=="ready"||!t,isLoading:e==="initializing",isReady:e==="ready"&&t,isAuthenticated:!!o}),[e,t,o])}import*as ai from"@donotdev/billing";import{DEGRADED_BILLING_API as ii}from"@donotdev/core";var Dt=ai?.useStripeBilling;function si(e){return ii[e]}function Ft(e,t){return Dt?Dt(e,t):si(e)}var F1=typeof Dt=="function";function O1(){let e=P("user"),t=P("status"),o={user:e,status:t},r=Ft("status",o),n=Ft("isAvailable",o);return{shouldHide:!n,isLoading:r==="initializing",isReady:n&&r==="ready"}}import{DEGRADED_CRUD_API as li}from"@donotdev/core";import*as ci from"@donotdev/crud";var Bt=ci?.useCrud;function di(){return li}function _1(e,t={}){return Bt?Bt(e,t):di()}var H1=typeof Bt=="function";import{DEGRADED_OAUTH_API as ui}from"@donotdev/core";import*as pi from"@donotdev/oauth";var Mt=pi?.useOAuth;function mi(e){return ui[e]}function $1(e){return Mt?Mt(e):mi(e)}var K1=typeof Mt=="function";import{CheckCircle as fi}from"lucide-react";import{List as gi}from"@donotdev/components";import{translateArray as vi}from"@donotdev/core";import{jsx as Go}from"react/jsx-runtime";var hi=fi,yi=16;function Q1(e,t,o,r=hi,n=yi){let a=r;return Go(gi,{icon:a?Go(a,{size:n}):void 0,items:vi(e,t,o),style:{listStyle:"none",paddingInlineStart:0}})}var bi=/<script[\s\S]*?<\/script>/gi,Si=/<foreignObject[\s\S]*?<\/foreignObject>/gi,Ci=/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,xi=/\s+(?:xlink:)?href\s*=\s*["']\s*javascript:[^"']*["']/gi,wi=/\s+(?:xlink:)?href\s*=\s*["']\s*data:(?!image\/(?:png|jpe?g|gif|webp|svg\+xml))[^"']*["']/gi;function we(e){return e.replace(bi,"").replace(Si,"").replace(Ci,"").replace(xi,"").replace(wi,"")}import{Fragment as Wi,jsx as se,jsxs as $i}from"react/jsx-runtime";var Ko=()=>null,Hi=$o(async()=>{try{return{default:(await import("@donotdev/auth")).ReauthDialog}}catch{return{default:Ko}}}),Gi=$o(async()=>{try{return{default:(await import("@donotdev/auth")).ConfirmDeleteDialog}}catch{return{default:Ko}}}),Yo=()=>{let[e]=je.useState(!1),[t]=je.useState(!1),[o]=je.useState(!1),[r]=je.useState(null);return{showConfirmDialog:e,showPasswordDialog:t,isDeleting:o,error:r,startDeleteFlow:()=>{},confirmDelete:async()=>{},cancel:()=>{}}};Vi()&&import("@donotdev/auth").then(e=>{Yo=e.useDeleteAccount}).catch(e=>{});var et=e=>{if(!e)return Be;if(typeof e=="function")return e;let t=e.replace(/['"]/g,""),o=Ii[t];return o||Be},zt=({loginPath:e,display:t=Bi.AUTO,"no-tooltip":o=!1,customItems:r=[],className:n,style:a})=>{let{t:i}=Mi("dndev"),{shouldHide:s,isReady:c,isAuthenticated:d}=Xe(),l=Oi(),u=P("user"),f=P("signOut"),p=Ui("isLaptop"),m=Z(),v=_i(),y=l.profilePath,g=l.authMenuItems||[],S=u?.role,x=Yo(),b=()=>u&&(u.displayName||u.email?.split("@")[0])||"User",A=()=>b().split(" ").map(h=>h.charAt(0)).slice(0,2).join("").toUpperCase(),E=()=>{if(!u)return i("auth.userMenu",{defaultValue:"User menu"});let C=[b()];return u.email&&C.push(u.email),S&&S!=="guest"&&C.push(`Role: ${S}`),C.join(`
|
|
4
|
+
`)},I=Ni(()=>{let C=[];return!p&&u&&C.push({children:se(Fi,{variant:"muted",as:"span",children:`${b()}${u.email?`
|
|
5
|
+
${u.email}`:""}`}),disabled:!0}),y&&C.push({label:i("auth.profile",{defaultValue:"Profile"}),icon:ki,onClick:()=>v(y)}),g.forEach(h=>{let k=m.find(F=>F.path===h.path),L=h.label||k?.label||h.path.split("/").pop()||"Menu",D=h.icon?et(h.icon):k?.icon&&(typeof k.icon=="string"||typeof k.icon=="function")?et(k.icon):Be;C.push({label:L,icon:D,onClick:()=>v(h.path)})}),r.forEach(h=>{if(h.path){let k=m.find(F=>F.path===h.path),L=h.label||k?.label||h.path.split("/").pop()||"Menu",D=h.icon?et(h.icon):Be;C.push({label:L,icon:D,onClick:()=>v(h.path),disabled:h.disabled,style:h.style})}else if(h.onClick){let k=h.icon?et(h.icon):Be;C.push({label:h.label,icon:k,onClick:h.onClick,disabled:h.disabled,style:h.style})}}),C.push({label:i("auth.deleteAccount.label",{defaultValue:"Delete Account"}),icon:Ai,onClick:x.startDeleteFlow,variant:"destructive"}),C.push({label:i("auth.signOut",{defaultValue:"Sign Out"}),icon:Ti,onClick:()=>f(),variant:"destructive"}),C},[y,g,r,f,x,i,m,p,u,S,b,v]);return zi().length===0||s||!c||!d?null:$i(Wi,{children:[se(Wo,{fallback:null,children:se(Hi,{open:x.showPasswordDialog,isLoading:x.isDeleting,error:x.error,onReauth:C=>x.confirmDelete(C),onCancel:x.cancel})}),se(Wo,{fallback:null,children:se(Gi,{open:x.showConfirmDialog,isLoading:x.isDeleting,error:x.error,onConfirm:()=>x.confirmDelete(),onCancel:x.cancel})}),se(Di,{trigger:se(Ri,{variant:Li.OUTLINE,icon:u?se(Pi,{src:u.photoURL??void 0,fallback:A(),alt:b(),style:{margin:"-4px 0"}}):Ei,display:t,"aria-label":i("auth.userMenu",{defaultValue:"User menu"}),tooltip:!o&&p&&u?E():o?void 0:i("auth.userMenu",{defaultValue:"User menu"}),className:n,style:a,children:b()}),items:I,contentAlign:"end"})]})};import{jsx as O}from"react/jsx-runtime";var Jo=()=>null;function tt({display:e,signInLabel:t,className:o,style:r,children:n,...a}){return O(qi,{variant:Zi.OUTLINE,icon:Ki,display:e,tooltip:t,className:o,style:r,...a,children:n??t})}var os=Zo(async()=>{try{return{default:(await import("@donotdev/auth")).AuthPartnerButton}}catch{return{default:Jo}}}),qo=Zo(async()=>{try{return{default:(await import("@donotdev/auth")).MultipleAuthProviders}}catch{return{default:Jo}}}),Vt=({display:e=Xi.AUTO,className:t,style:o})=>{let{t:r}=ji("dndev"),{shouldHide:n,isLoading:a,isReady:i,isAuthenticated:s}=Xe(),c=es(),d=ts(),[l,u]=Yi(!1),f=c.loginPath,p=r("auth.signIn",{defaultValue:"Sign In"}),m=r("auth.loading",{defaultValue:"Loading..."}),v=d.includes("password")||d.includes("emailLink");if(n||!i)return null;if(!s){if(f!==void 0)return O(T,{path:f,prefetch:!0,children:O(tt,{display:e,signInLabel:p,className:t,style:o})});let y=d[0];return v?O(Qi,{trigger:O(tt,{display:e,signInLabel:p,className:t,style:o}),title:p,open:l,onOpenChange:u,"data-content-size":"form",children:O(Ot,{fallback:O("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m}),children:O(qo,{spacing:"medium",onSuccess:()=>u(!1)})})}):d.length>1?O(Ji,{trigger:O(tt,{display:e,signInLabel:p,className:t,style:o}),children:O(Ot,{fallback:O("div",{style:{padding:"var(--gap-md)",fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:m}),children:O(qo,{spacing:"tight"})})}):O(Ot,{fallback:O(tt,{display:e,signInLabel:p,className:t,style:o,disabled:a,tooltip:a?m:p,children:a?m:p}),children:O(os,{partnerId:y,display:e,className:t,style:o})})}return O(zt,{display:e,loginPath:f,className:t,style:o})};import{AlertCircle as rs,RefreshCw as ns,Mail as as,Cookie as is}from"lucide-react";import{Card as ss,Button as Ut,BUTTON_VARIANT as _t,Stack as Qo}from"@donotdev/components";import{useTranslation as ls}from"@donotdev/core";import{jsx as Me,jsxs as ot}from"react/jsx-runtime";function cs({featureName:e,title:t,description:o,showReviewCookies:r=!1,showContactSupport:n=!0,showRetry:a=!1,supportEmail:i="support@example.com",onRetry:s,onReviewCookies:c,customActions:d,className:l=""}){let{t:u}=ls("ui"),f=o||u("featureDisabled.description","{featureName} is not available. This may be due to missing configuration or disabled features.",{featureName:e}),p=()=>{if(c)c();else{let v=new CustomEvent("openCookieConsent");window.dispatchEvent(v)}},m=()=>{window.location.href=`mailto:${i}?subject=${encodeURIComponent(`Feature Unavailable: ${e}`)}&body=${encodeURIComponent(`I'm experiencing an issue with ${e} not being available.`)}`};return ot(ss,{className:l,title:ot(Qo,{direction:"row",align:"center",gap:"tight",children:[Me(rs,{className:"dndev-size-md",style:{color:"var(--destructive)"}}),t||e]}),subtitle:f,children:[" ",ot("div",{style:{display:"grid",gap:"var(--gap-md)"},children:[(r||n||a||d)&&ot(Qo,{direction:"row",wrap:"wrap",gap:"tight",children:[r&&Me(Ut,{variant:_t.OUTLINE,onClick:p,icon:is,children:u("featureDisabled.reviewCookies","Review Cookies")}),n&&Me(Ut,{variant:_t.OUTLINE,onClick:m,icon:as,children:u("featureDisabled.contactSupport","Contact Support")}),a&&Me(Ut,{variant:_t.OUTLINE,onClick:s,icon:ns,children:u("featureDisabled.retry","Retry")}),d]}),Me("p",{style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},children:u("featureDisabled.helpText","If you believe this is an error, please contact support or try refreshing the page.")})]})]})}var ds=cs;import{Lock as rt,Shield as Xo}from"lucide-react";import{useEffect as Ht,useRef as jo,useCallback as us}from"react";import{Portal as ps,Spinner as ms,Stack as fs,Text as ze,Button as gs}from"@donotdev/components";import{useTranslation as vs,useOverlay as oe}from"@donotdev/core";import{jsx as J,jsxs as tr}from"react/jsx-runtime";var er={connecting:0,preparing:2e3,redirecting:5e3},hs=1e4;function ys(e,t){return t==="none"?null:t==="shield"?Xo:t==="lock"?rt:e?e.startsWith("stripe-")||e.includes("payment")||e.includes("checkout")?rt:e.startsWith("oauth-")||e.startsWith("auth-")?Xo:rt:rt}function bs(e){return e||"default"}function Ss(){let{t:e}=vs("dndev"),t=oe("isRedirectOverlayOpen"),o=oe("redirectOperation"),r=oe("redirectPhase"),n=oe("showCancelButton"),a=oe("redirectConfig"),i=oe("redirectStartTime"),s=oe("setRedirectPhase"),c=oe("setShowCancelButton"),d=oe("hideRedirectOverlay"),l=jo([]),u=jo(null),f=us(()=>{d()},[d]);if(Ht(()=>{if(!t||!i)return;let b=a?.cancelTimeout??hs,A=Date.now()-i;l.current.forEach(clearTimeout),l.current=[],u.current&&(clearTimeout(u.current),u.current=null);let E=(w,C)=>{let h=Math.max(0,C-A);if(h>0){let k=setTimeout(()=>{s(w)},h);l.current.push(k)}else s(w)};E("preparing",er.preparing),E("redirecting",er.redirecting);let I=Math.max(0,b-A);return u.current=setTimeout(()=>{c(!0),s("timeout")},I),()=>{l.current.forEach(clearTimeout),l.current=[],u.current&&(clearTimeout(u.current),u.current=null)}},[t,i,a?.cancelTimeout,s,c]),Ht(()=>{if(!t)return;let b=()=>{d()};return window.addEventListener("popstate",b),()=>window.removeEventListener("popstate",b)},[t,d]),Ht(()=>{if(!t)return;let b=()=>{};return document.addEventListener("visibilitychange",b),()=>document.removeEventListener("visibilitychange",b)},[t]),!t)return null;let p=bs(o),m=a?.title??e(`redirectOverlay.${p}.title`,{defaultValue:e("redirectOverlay.default.title")}),v=a?.message??e(`redirectOverlay.${p}.message`,{defaultValue:e("redirectOverlay.default.message")}),y=a?.subtitle??e(`redirectOverlay.${p}.subtitle`,{defaultValue:e("redirectOverlay.default.subtitle")}),g=e(`redirectOverlay.${p}.ariaLabel`,{defaultValue:e("redirectOverlay.default.ariaLabel")}),S=e(`redirectOverlay.phases.${r}`),x=ys(o,a?.icon);return J(ps,{children:J("div",{className:"dndev-spinner-overlay",role:"status","aria-busy":"true","aria-label":g,style:{zIndex:"var(--z-overlay, 9999)"},children:tr("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--gap-md)",textAlign:"center",maxWidth:"400px",padding:"var(--gap-lg)"},children:[tr(fs,{direction:"row",align:"center",children:[x&&J(x,{style:{width:"1.5rem",height:"1.5rem",color:"var(--primary)"},"aria-hidden":"true"}),J(ms,{variant:"primary"})]}),J(ze,{as:"h3",style:{color:"var(--foreground)",margin:0},children:m}),J(ze,{variant:"muted",style:{color:"var(--foreground)",minHeight:"1.5em"},children:S}),J(ze,{variant:"muted",level:"small",style:{opacity:.8},children:v}),J(ze,{variant:"muted",level:"small",style:{opacity:.6},children:y}),J(ze,{variant:"muted",level:"small",style:{opacity:.5,marginTop:"var(--gap-sm)"},children:e("redirectOverlay.doNotRefresh")}),n&&J(gs,{variant:"ghost",onClick:f,style:{marginTop:"var(--gap-md)"},children:e("redirectOverlay.cancel")})]})})})}import{useEffect as Gt,useState as or}from"react";import{cn as Cs}from"@donotdev/components";import{jsx as rr}from"react/jsx-runtime";var xs=({isActive:e=!1,progress:t,useFakeProgress:o=!0,duration:r=2e3,className:n,show:a=!0})=>{let[i,s]=or(0),[c,d]=or(!1);Gt(()=>{if(!e||!o||t!==void 0)return;d(!0),s(0);let u=Date.now(),f=setInterval(()=>{let p=Date.now()-u,m=Math.min(p/r*90,90);s(m)},16);return()=>{clearInterval(f)}},[e,o,t,r]),Gt(()=>{t!==void 0&&d(t>0&&t<100)},[t]),Gt(()=>{if(!e){let u=setTimeout(()=>{d(!1),s(0)},300);return()=>clearTimeout(u)}},[e]);let l=t??i;return!a||!c?null:rr("div",{className:Cs(n),style:{position:"fixed",insetInlineStart:0,insetInlineEnd:0,zIndex:9999,height:"4px",backgroundColor:"transparent",top:"var(--header-height, 0px)"},role:"progressbar","aria-valuenow":Math.round(l),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Page loading progress",children:rr("div",{style:{height:"100%",width:`${l}%`,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)"}})})},ws=xs;import{cn as nt,Stack as ks}from"@donotdev/components";import{jsx as Oe,jsxs as $m}from"react/jsx-runtime";var Ts=({variant:e="text",width:t,height:o,lines:r=1,show:n=!0,className:a,animation:i="pulse",style:s})=>{if(!n)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 l={};return t&&(l.width=typeof t=="number"?`${t}px`:t),o&&(l.height=typeof o=="number"?`${o}px`:o),l};return e==="text"?Oe(ks,{gap:"tight",children:Array.from({length:r}).map((l,u)=>Oe("div",{className:nt("dndev-skeleton",a),style:{...c,height:"var(--gap-md)",width:u===r-1?"75%":"100%",...d(),...s}},u))}):e==="circular"?Oe("div",{className:nt("dndev-skeleton",a),style:{...c,borderRadius:"var(--radius-full)",width:t||o||"40px",height:o||t||"40px",...d(),...s}}):e==="rectangular"?Oe("div",{className:nt("dndev-skeleton",a),style:{...c,width:t||"100%",height:o||"200px",...d(),...s}}):Oe("div",{className:nt("dndev-skeleton",a),style:{...c,borderRadius:"var(--radius-lg)",width:t||"100%",height:o||"20px",...d(),...s}})};var Es=Ts;import{Card as As,IconBox as Is,Stack as Ns,Text as Wt,renderCardContent as Ps}from"@donotdev/components";import{jsx as Q,jsxs as nr}from"react/jsx-runtime";var Rs=({icon:e,title:t,subtitle:o,content:r,href:n,variant:a,elevated:i,onClick:s,className:c,footer:d,style:l,clickable:u,...f})=>{let p=Ps(r),y=`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":""}`,g={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"var(--line-height)"},S={...g,fontSize:"var(--font-size-lg)",fontWeight:600,color:"inherit",margin:0,textAlign:"start",flex:1,minWidth:0},x={...g,fontSize:"var(--font-size-base)",fontWeight:600,color:"var(--muted-foreground)",margin:0},b=e?nr(Ns,{direction:"row",align:"center",style:{width:"100%"},children:[Q(Is,{icon:e}),Q(Wt,{as:"div",level:"h3",style:S,children:t})]}):Q(Wt,{as:"div",level:"h3",style:S,children:t}),A=Q(As,{variant:a,elevated:i,onClick:s,className:c,"data-clickable":n||s||u?"true":void 0,style:{paddingInlineStart:"var(--gap-md)",paddingInlineEnd:"var(--gap-md)",gap:"var(--gap-md)",height:"100%",textAlign:"start",...l},...f,children:nr("div",{style:{display:"grid",gridTemplateRows:y,gap:"var(--gap-md)",width:"100%"},children:[Q("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start"},children:b}),Q("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"flex-start"},children:Q(Wt,{as:"div",level:"body",style:x,children:o})}),Q("div",{children:p}),d&&Q("div",{children:d})]})});return n&&!s?Q(T,{path:n,style:{display:"block",textDecoration:"none",height:"100%"},"aria-label":t?`Learn more about ${t}`:void 0,children:A}):A},Ls=Rs;import{useState as Ws}from"react";import{Bento as $s,Card as Ks,Section as Ys,Stack as qs,Text as Zs,TONE as Js,cn as Qs}from"@donotdev/components";var Ds='<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>',Fs='<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>',Bs='<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>',Ms='<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>',zs='<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>',Os='<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>',Vs='<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>',Us='<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>',_s='<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>',Hs='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="#3FCF8E" d="M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z"/></svg>',Gs='<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>',$t={bun:{svg:`data:image/svg+xml,${encodeURIComponent(Gs)}`,color:"#FBF0DF",name:"Bun"},typescript:{svg:`data:image/svg+xml,${encodeURIComponent(Ds)}`,color:"#3178C6",name:"TypeScript"},react:{svg:`data:image/svg+xml,${encodeURIComponent(Fs)}`,color:"#61DAFB",name:"React"},vite:{svg:`data:image/svg+xml,${encodeURIComponent(Bs)}`,color:"#BD34FE",name:"Vite"},nextjs:{svg:`data:image/svg+xml,${encodeURIComponent(Ms)}`,color:"var(--foreground, #000000)",name:"Next.js"},nodejs:{svg:`data:image/svg+xml,${encodeURIComponent(zs)}`,color:"#339933",name:"Node.js"},firebase:{svg:`data:image/svg+xml,${encodeURIComponent(Os)}`,color:"#DD2C00",name:"Firebase"},supabase:{svg:`data:image/svg+xml,${encodeURIComponent(Hs)}`,color:"#3FCF8E",name:"Supabase"},vercel:{svg:`data:image/svg+xml,${encodeURIComponent(Vs)}`,color:"var(--foreground, #000000)",name:"Vercel"},stripe:{svg:`data:image/svg+xml,${encodeURIComponent(Us)}`,color:"#635BFF",name:"Stripe"},valibot:{svg:`data:image/svg+xml,${encodeURIComponent(_s)}`,color:"#FBBF24",name:"Valibot"}};import{jsx as me,jsxs as tl}from"react/jsx-runtime";function Xs({techKey:e,variant:t}){let o=$t[e],[r,n]=Ws(!1);if(!o)return null;let a=decodeURIComponent(o.svg.replace("data:image/svg+xml,","")),i=we(a);return me(Ks,{variant:t,className:"dndev-tech-card",style:{"--tech-color":o.color},"data-hover":r,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:tl(qs,{direction:"column",align:"center",gap:"tight",children:[me("div",{className:"dndev-tech-card-logo","data-tech":e,dangerouslySetInnerHTML:{__html:i}}),me(Zs,{as:"span",level:"small",children:o.name})]})})}function js({title:e,techs:t,cols:o=3,columns:r,gap:n="medium",separator:a=!1,tone:i=Js.GHOST,align:s,collapsible:c,open:d,onOpenChange:l,defaultOpen:u,className:f}){let p=r||(typeof o=="number"?{mobile:o,tablet:o,desktop:o,wide:o}:{mobile:o[0],tablet:o[1],desktop:o[2],wide:o[3]}),m=g=>{if(g==="long")return{cols:2,rows:1};if(g==="high")return{cols:1,rows:2};if(g==="huge")return{cols:2,rows:2}},v=t.filter(g=>$t[g.name]).map(g=>({id:g.name,content:me(Xs,{techKey:g.name,variant:g.variant}),span:m(g.size)})),y=me($s,{items:v,columns:p,gap:n,ariaLabel:"Technology stack"});return me(Ys,{title:e,separator:a,tone:i,align:s,collapsible:c,open:d,onOpenChange:l,defaultOpen:u,className:Qs("dndev-tech-bento",f),children:me("div",{className:"dndev-tech-bento-grid",children:y})})}var el=js;import{Suspense as ol,lazy as rl}from"react";import{useConsent as ar}from"@donotdev/core";import{jsx as ir}from"react/jsx-runtime";var nl=rl(()=>import("./CookieConsent-UVTR7CWW.js"));function gf(){let e=ar("hasConsented"),t=ar("showBanner");return e&&!t?null:ir(ol,{fallback:null,children:ir(nl,{})})}import{Button as sr,ScrollArea as al}from"@donotdev/components";import{cn as lr}from"@donotdev/components";import{jsx as re,jsxs as il}from"react/jsx-runtime";function Sf({content:e,cta:t,align:o="center",justify:r="center",disableScrollArea:n=!1,contentVariant:a="narrow",contentClassName:i,ctaClassName:s}){let d=a==="narrow"?a==="narrow"&&re("div",{className:"dndev-game-container__content-narrow",children:e}):e,l=n?re("div",{style:{overflow:"auto",overscrollBehavior:"contain",height:"100%"},children:d}):re(al,{className:"dndev-game-container__scroll",children:d});return il("div",{className:"dndev-game-container",children:[re("div",{className:lr("dndev-game-container__content",i),"data-align":o,"data-justify":r,"data-content-variant":a,children:re("div",{className:"dndev-game-container__scroll-wrapper",children:l})}),t&&re("div",{className:lr("dndev-game-container__cta",s),children:Array.isArray(t)?re("div",{className:"dndev-game-container__cta-buttons",children:t.map((u,f)=>re(sr,{onClick:u.onClick,disabled:u.disabled??!1,variant:u.variant??"default",className:"dndev-game-container__cta-button",fullWidth:!0,children:u.label},f))}):re(sr,{onClick:t.onClick,disabled:t.disabled??!1,variant:t.variant??"default",className:"dndev-game-container__cta-button",children:t.label})})]})}import{useEffect as sl,Suspense as ll,lazy as cl}from"react";import{jsx as Kt}from"react/jsx-runtime";var cr=new Set,dr=new Map;function dl(e,t){let o=dr.get(e);if(o)return o;let r=t[e];if(!r)return null;let n=cl(r);return dr.set(e,n),n}function kf({screenRegistry:e,currentScreen:t,nextScreen:o,fallback:r=null}){sl(()=>{if(o&&!cr.has(o)){cr.add(o);let a=e[o];a&&a().catch(()=>{})}},[o,e]);let n=t?dl(t,e):null;return!t||!n?null:Kt("div",{style:{height:"100%"},children:Kt(ll,{fallback:r,children:Kt(n,{})})})}import{cn as ul,DISPLAY as Yt}from"@donotdev/components";import{useAppConfig as ur}from"@donotdev/core";import{jsx as at,jsxs as fl}from"react/jsx-runtime";var pl=({display:e=Yt.AUTO,linkToHome:t=!0,className:o})=>{let r=ur("name"),a=ur("shortName")||r||"App",i=G.getLogoSvgContent(),s=G.resolveLogo(),c=e===Yt.FULL||e===Yt.AUTO,d=i?at("div",{className:"app-branding-logo",role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:we(i)}}):G.assetExists(s)?at("img",{src:s,alt:a,className:"app-branding-logo"}):null,l=c&&at("span",{className:"app-branding-title","data-display":e,children:a}),u=fl("div",{className:ul("app-branding",o),"data-display":e,children:[d,l]});return t?at(T,{path:"/",className:"app-branding-link",children:u}):u},ml=pl;import{cn as pr}from"@donotdev/components";import{useAppConfig as mr}from"@donotdev/core";import{jsx as gr}from"react/jsx-runtime";var fr={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"}},gl=({alt:e,size:t="header",className:o})=>{let r=mr("name"),n=mr("shortName"),a=e||r||n||"App",i=G.getLogoSvgContent(),s=G.resolveLogo(),c=typeof t=="string"&&t in fr?fr[t]:typeof t=="string"?{}:{width:t,height:t};return i?gr("div",{className:pr("app-icon-header",o),style:{display:"inline-flex",...c},role:"img","aria-label":a,dangerouslySetInnerHTML:{__html:we(i)}}):gr("img",{src:s,alt:a,className:pr(o),style:{objectFit:"contain",...c}})},vl=gl;import{cn as vr}from"@donotdev/components";import{useAppConfig as hr,useBreakpoint as hl}from"@donotdev/core";import{jsx as yr}from"react/jsx-runtime";var yl=({title:e,className:t,linkToHome:o=!0})=>{let r=hl("isMobileOrTablet"),n=hr("name"),a=hr("shortName"),i=e||r&&a||n||"App",s=yr("div",{className:vr("dndev-text-base",t),style:{fontSize:"var(--font-size-xl)",fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"},children:i});return o?yr(T,{path:"/",className:vr("dndev-inline-block",t),children:s}):s},bl=yl;import{ChevronRight as Tl}from"lucide-react";import{useMemo as El}from"react";import{cn as Al}from"@donotdev/components";import{useTranslation as Il}from"@donotdev/core";import{useLocation as Nl}from"@donotdev/ui/routing/hooks";import{useMemo as br}from"react";import{useNavigationStore as Yf,getRoutes as Sl,getRouteManifest as qf}from"@donotdev/core";function Cl(){return br(()=>{try{let e=Sl();return!e||e.length===0?[]:xl(e)}catch{return[]}},[])}function Sr(){let e=Cl();return br(()=>e.flatMap(t=>t.routes),[e])}function xl(e){let t=new Map;return e.forEach(o=>{let r=typeof o.path=="string"?o.path:String(o.path);if(!r||r==="undefined"||r==="null")return;let n=o.meta?.entity||wl(r)||"other",a={path:r,label:o.meta?.title||kl(r),icon:o.meta?.icon,component:o.component,importPath:o.importPath,exportName:o.exportName,auth:o.auth,meta:o.meta};t.has(n)||t.set(n,{label:n.charAt(0).toUpperCase()+n.slice(1),routes:[]}),t.get(n)?.routes.push(a)}),Array.from(t.values())}function wl(e){return e.split("/").filter(Boolean)[0]||null}function kl(e){let t=e.split("/").filter(Boolean),o=t[t.length-1];return o?o.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):"Home"}import{jsx as Ve,jsxs as Ll}from"react/jsx-runtime";var Pl=({items:e,separator:t=Tl,showHome:o=!0,homeHref:r="/",variant:n="default",className:a})=>{let{t:i}=Il("dndev"),s=Nl(),c=Sr(),d=El(()=>new Set(c.map(f=>f.path)),[c]),l=e||(()=>{let f=s.pathname.split("/").filter(Boolean),p=[],m="";return f.forEach(v=>{m+=`/${v}`;let y=v.split("-").map(S=>S.charAt(0).toUpperCase()+S.slice(1)).join(" "),g=d.has(m)?m:void 0;p.push({label:y,href:g})}),p})(),u=o?[{label:i("navigation.home","Home"),href:r},...l]:l;return n==="smart"&&s.pathname.split("/").filter(Boolean).length<2?null:Ve("nav",{role:"navigation","aria-label":"Breadcrumb navigation",className:Al("breadcrumbs",a),children:u.map((f,p)=>{let v=p===u.length-1||!f.href;return Ll("span",{className:"breadcrumb-item",children:[p>0&&Ve(t,{className:"dndev-size-md separator"}),f.icon&&Ve(f.icon,{className:"dndev-size-md icon"}),f.href&&!v?Ve(T,{path:f.href,className:"breadcrumb-link",children:f.label}):Ve("span",{className:"breadcrumb-label",children:f.label})]},p)})})},Rl=Pl;import{useTranslation as Dl,maybeTranslate as Cr,useLayout as qt,useAppConfig as Fl}from"@donotdev/core";import{jsx as ke,jsxs as Ml}from"react/jsx-runtime";var Bl=({asLink:e=!1,className:t})=>{let o=Fl("app"),r=qt("gameTitle"),n=qt("gameSubtitle"),a=qt("gameNamespace"),{t:i}=Dl(a||"dndev"),s=Cr(i,r??void 0),c=Cr(i,n??void 0),d=o?.name||"Game";if(s)return ke("div",{className:t,children:Ml("div",{style:{textAlign:"center"},children:[ke("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}),c&&ke("p",{style:{color:"var(--muted-foreground)",fontSize:"var(--font-size-sm)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c})]})});let l=ke("h2",{style:{fontSize:"var(--font-size-lg)",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d});return e?ke(T,{path:"/",className:t,style:{fontSize:"var(--font-size-2xl)",fontWeight:700,transition:"color var(--dur-fast) ease-out"},onMouseEnter:u=>u.currentTarget.style.color="var(--primary)",onMouseLeave:u=>u.currentTarget.style.color="var(--foreground)",children:d}):ke("div",{className:t,children:l})};import{Trash2 as zl}from"lucide-react";import{useState as xr}from"react";import{Button as Ol,BUTTON_VARIANT as Vl,Checkbox as Ul,Stack as Zt,useToast as _l}from"@donotdev/components";import{useTranslation as Hl}from"@donotdev/core";import{useRefresh as Gl}from"@donotdev/ui/routing/hooks";import{jsx as it,jsxs as wr}from"react/jsx-runtime";function Wl(){let{t:e}=Hl("dndev"),{toast:t}=_l(),[o,r]=xr(!1),n=Gl(),[a,i]=xr({localStorage:!0,sessionStorage:!0,applicationCache:!0,serviceWorker:!0,cookies:!0,indexedDB:!0,webSQL:!0,memoryCache:!0}),s=async()=>{try{r(!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 l=await indexedDB.databases();await Promise.all(l.map(async u=>{if(u.name){let f=indexedDB.deleteDatabase(u.name);await new Promise((p,m)=>{f.onsuccess=()=>p(void 0),f.onerror=()=>m(f.error)})}}))}c.push("IndexedDB")}catch{}if(a.webSQL&&"openDatabase"in window)try{let l=globalThis.openDatabase("","","","");l&&l.transaction&&l.transaction(u=>{u.executeSql('SELECT name FROM sqlite_master WHERE type="table"',[],(f,p)=>{for(let m=0;m<p.rows.length;m++){let v=p.rows.item(m).name;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(v)&&f.executeSql(`DROP TABLE IF EXISTS ${v}`)}})}),c.push("WebSQL")}catch{}if(a.applicationCache&&"caches"in window)try{let l=await caches.keys();await Promise.all(l.map(async u=>{try{await caches.delete(u)}catch{}})),c.push("Application Cache")}catch{}if(a.serviceWorker&&"serviceWorker"in navigator)try{let l=await navigator.serviceWorker.getRegistrations();await Promise.all(l.map(async u=>{try{await u.unregister()}catch{}})),c.push("Service Workers")}catch{}if(a.cookies)try{document.cookie.split(";").forEach(l=>{let u=l.indexOf("="),f=u>-1?l.substr(0,u):l;document.cookie=`${f.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`,document.cookie=`${f.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;domain=${window.location.hostname}`,document.cookie=`${f.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:n()},1e3)}catch{t("error",e("settings.clearCache.error","Error clearing cache"))}finally{r(!1)}};return wr(Zt,{children:[it(Zt,{children:Object.entries(a).map(([c,d])=>wr(Zt,{direction:"row",align:"center",gap:"tight",children:[it(Ul,{id:c,checked:d,onCheckedChange:l=>i(u=>({...u,[c]:!!l}))}),it("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))}),it(Ol,{variant:Vl.DESTRUCTIVE,style:{margin:"0 auto"},disabled:o||!Object.values(a).some(Boolean),onClick:s,icon:zl,children:o?e("settings.clearCache.clearing","Clearing..."):e("settings.clearCache.button","Clear Cache")})]})}var Jt=Wl;import{DropdownMenu as ql,Button as Qt,Stack as Zl}from"@donotdev/components";import{Link as $l}from"lucide-react";import{navigationMenuTriggerStylePrimitive as Kl}from"@donotdev/components";import{jsx as kr,jsxs as Yl}from"react/jsx-runtime";var st=({path:e,route:t,showIcons:o=!0})=>{let r=Z(),n=t??r.find(s=>s.path===e);if(!n)return null;let a=o&&!!n.icon,i=!!n.label;return Yl(T,{path:n.path,className:Kl(),...a&&!i&&{"data-display":"compact"},children:[o&&kr(H,{icon:n.icon,fallback:$l}),kr("span",{children:n.label})]})};import{jsx as fe}from"react/jsx-runtime";var Jl=({navigation:e,className:t})=>fe(Zl,{role:"navigation",direction:"row",align:"center",className:t,style:{gap:"var(--gap-sm)"},children:e.map((o,r)=>o.routes&&o.routes.length>0?fe(ql,{trigger:fe(Qt,{icon:o.icon,children:o.label}),items:o.routes.map(n=>({label:n.label,children:fe(st,{route:n}),asChild:!!n.path})),contentAlign:"start"},o.label+r):o.path?fe(Qt,{icon:o.icon,"aria-label":o.label,render:({children:n,...a})=>fe(T,{path:o.path,...a,children:n}),children:o.label},o.label+r):fe(Qt,{icon:o.icon,disabled:!0,"aria-label":o.label,children:o.label},o.label+r))}),Ql=Jl;import{Card as Xl,cn as jl}from"@donotdev/components";import{jsx as Xt}from"react/jsx-runtime";var ec=({languages:e,currentLanguage:t,onLanguageChange:o,className:r})=>Xt(Xl,{className:jl("dndev-z-modal",r),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:Xt("select",{style:{backgroundColor:"transparent",outline:"none",fontSize:"var(--font-size-base)",cursor:"pointer"},value:t,onChange:n=>o?.(n.target.value),"aria-label":"Select language",children:e.map(n=>Xt("option",{value:n,children:n},n))})}),tc=ec;import{MoreHorizontal as oc}from"lucide-react";import{Button as rc,BUTTON_VARIANT as nc,DropdownMenu as ac}from"@donotdev/components";import{jsx as Tr}from"react/jsx-runtime";var ic=({children:e,className:t})=>Tr(ac,{trigger:Tr(rc,{variant:nc.GHOST,icon:oc,"aria-label":"Menu",className:t}),contentAlign:"end",children:e}),sc=ic;import{MoreHorizontal as lc}from"lucide-react";import{Link as cc}from"lucide-react";import{DISPLAY as Ue,DropdownMenu as dc,Button as Er}from"@donotdev/components";import{cn as uc}from"@donotdev/components";import{useBreakpoint as Ar,useTranslation as pc}from"@donotdev/core";import{jsx as ge}from"react/jsx-runtime";var mc=({className:e="",showIcons:t=!0,display:o=Ue.AUTO,path:r})=>{let{t:n}=pc("dndev"),a=Ar("isMobile"),i=Ar("isTablet"),s=Z(),c=xo(r??"");return r?c?ge(Er,{variant:"ghost",display:o,icon:t?ge(H,{icon:c.icon,fallback:cc}):void 0,className:e,render:({children:l,...u})=>ge(T,{path:c.path,...u,children:l}),children:c.label}):null:(o===Ue.AUTO?a||i?Ue.COMPACT:Ue.FULL:o)===Ue.COMPACT?ge(dc,{trigger:ge(Er,{variant:"ghost",icon:lc,"aria-label":n("navigation.menu","Navigation"),className:e}),contentAlign:"end",items:s.map(l=>({label:l.label,children:ge(st,{route:l,showIcons:t}),asChild:!0}))}):ge(Vo,{overflowDetection:!0,showIcons:t,className:uc(e),style:{flex:1}})},fc=mc;import{Bell as gc}from"lucide-react";import{useMemo as vc,useEffect as hc,useRef as yc}from"react";import{Button as bc,cn as Sc,toast as Cc,Stack as xc}from"@donotdev/components";import{jsx as jt}from"react/jsx-runtime";var wc={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)"}}},kc=({notifications:e=[],count:t=0,loading:o=!1,onNotificationClick:r,onDropdownOpen:n,className:a,maxVisible:i=10,alwaysShow:s=!1,size:c="md",disabled:d=!1})=>{let l=wc[c],u=yc(new Set),f=vc(()=>t===0?null:t>99?"99+":t.toString(),[t]),p=t>0||s;return hc(()=>{e.forEach(m=>{if(!u.current.has(m.id)){u.current.add(m.id);let v=m.type==="error"?"error":m.type==="warning"?"warning":m.type==="success"?"success":"info";Cc({title:m.title,description:m.message,toastType:v,duration:0,onDismiss:()=>{u.current.delete(m.id),r&&r(m)}})}})},[e,r]),p?jt("div",{className:Sc(a),style:{position:"relative"},children:jt(bc,{disabled:d,style:{...l.button,position:"relative"},onClick:()=>{n?.()},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:gc,children:f&&jt(xc,{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,...l.badge},"aria-hidden":"true",children:f})})}):null},Tc=kc;import{Settings as Ec,Check as Ac}from"lucide-react";import*as lt from"lucide-react";import{Button as Ic,BUTTON_VARIANT as Nc,DropdownMenu as Pc,Stack as Rc,DISPLAY as Lc}from"@donotdev/components";import{useTranslation as Dc}from"@donotdev/core";import{useLanguageSelector as Fc,useTheme as eo,Flag as Bc}from"@donotdev/core";import{jsx as le,jsxs as Oc}from"react/jsx-runtime";function Mc({variant:e=Nc.OUTLINE}={}){let{t}=Dc("dndev"),{languages:o,currentLanguage:r,changeLanguage:n,isLoading:a}=Fc(),i=eo("availableThemes"),s=eo("currentTheme"),c=eo("setTheme"),d=p=>{if(!p)return lt.Palette;let m=p.replace(/['"]/g,"");return lt[m]||lt.Palette},l=i.map(p=>{let m=d(p.meta?.icon),v=p.name===s;return{label:p.displayName||p.name,icon:m,onClick:()=>c(p.name),checked:v}}),u=o.map(p=>{let m=p.id===r;return{label:p.name,onClick:()=>n(p.id),disabled:a,checked:m,className:m?"bg-accent":void 0,iconEnd:m&&!a?Ac:void 0,children:Oc(Rc,{direction:"row",align:"center",gap:"tight",children:[le(Bc,{code:p.flagCode||p.id,title:`${p.name} flag`}),le("span",{children:p.name}),a&&m&&le("div",{style:{marginInlineStart:"auto"},children:le("div",{style:{width:"0.5rem",height:"0.5rem",borderRadius:"50%",backgroundColor:"var(--primary)"}})})]})}}),f=[{label:t("auth.title","Authentication"),subContent:le(Vt,{display:Lc.COMPACT})},{label:t("settings.theme","Theme"),subItems:l},{label:t("settings.language","Language"),subItems:u},{label:t("settings.clearCache.title","Clear Cache"),subContent:le(Jt,{})}];return le(Pc,{trigger:le(Ic,{variant:e,"aria-label":t("settings.title","Settings"),icon:Ec}),items:f,contentWidth:"14rem",contentAlign:"end"})}var zc=Mc;import*as ct from"lucide-react";import{Button as Ir,BUTTON_VARIANT as Vc,DropdownMenu as Uc,DISPLAY as _c}from"@donotdev/components";import{useTranslation as Hc}from"@donotdev/core";import{useTheme as to}from"@donotdev/core";import{jsx as ro}from"react/jsx-runtime";var oo=e=>{if(!e)return ct.Palette;let t=e.replace(/['"]/g,"");return ct[t]||ct.Palette},Gc=({display:e=_c.AUTO,"no-tooltip":t=!1})=>{let{t:o}=Hc("dndev"),r=to("availableThemes"),n=to("currentTheme"),a=to("setTheme");if(r.length<=1)return null;let i=r.find(g=>g.name===n)||r[0],s=r.length===2?r.find(g=>g.name!==i?.name)||r[0]:null,c=i?oo(i.meta?.icon):null,d=s?oo(s.meta?.icon):null,l=i?.displayName||i?.name||"Theme",u=s?.displayName||s?.name||"Theme",f=r.length===2&&s&&d,p=f?d:c,m=f?t?void 0:o("common.themeSelector.tooltipWithNext","Change Theme: Switch to {{next}}",{next:s?.displayName||s?.name}):t?void 0:o("common.themeSelector.changeTheme","Change Theme"),v={variant:Vc.OUTLINE,"aria-label":o("common.themeSelector.changeTheme","Change Theme"),tooltip:m,icon:p,display:e};if(f&&s)return ro(Ir,{...v,onClick:()=>a(s.name),children:u});if(!i||!c)return null;let y=r.map(g=>{let S=oo(g.meta?.icon),x=g.name===n;return{label:g.displayName||g.name,icon:S,onClick:()=>a(g.name),checked:x}});return ro(Uc,{trigger:ro(Ir,{...v,children:l}),items:y,contentWidth:"10rem"})},Wc=Gc;import{ExternalLink as $c}from"lucide-react";import{getPlatformEnvVar as Kc}from"@donotdev/core";import{jsx as Yc,jsxs as qc}from"react/jsx-runtime";var no=({className:e})=>{let o=Kc("APP_URL")==="https://donotdev.com";return qc("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",Yc($c,{style:{width:"12px",height:"12px"},"aria-hidden":"true"})]})};import{cn as Zc}from"@donotdev/components";import{useTranslation as Jc,useAppConfig as Qc}from"@donotdev/core";import{jsxs as jc}from"react/jsx-runtime";var Xc=({appName:e,year:t=new Date().getFullYear(),className:o})=>{let{t:r}=Jc("dndev"),n=Qc("app"),a=e||n?.name||"App";return jc("span",{className:Zc(o),style:{flexShrink:0,color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"},children:["\xA9 ",t," ",a,". ",r("footer.legal.allRightsReserved")]})};import{Stack as od}from"@donotdev/components";import{useTranslation as rd,maybeTranslate as nd,useAppConfig as ad}from"@donotdev/core";var ed=[{path:"#cookie-settings",label:"footer.legal.cookieSettings"},{label:"footer.legal.privacyPolicy",path:"/privacy"},{label:"footer.legal.termsOfService",path:"/terms"}],td=e=>e?.legalLinks===null?[]:e?.legalLinks??ed,Nr=td;import{jsx as Pr,jsxs as sd}from"react/jsx-runtime";var id=({app:e,direction:t="column",gap:o="tight",align:r="stretch"})=>{let{t:n}=rd("dndev"),a=ad("app"),s=Nr((e||a||{}).footer),c={transition:"color var(--dur-fast) ease-out",textDecoration:"underline",textUnderlineOffset:"2px",color:"var(--muted-foreground)",fontSize:"var(--font-size-xs)"};return s.length===0?null:sd(od,{direction:t,gap:o,align:r,children:[s.map(d=>Pr(T,{path:d.path,style:c,onMouseEnter:l=>l.currentTarget.style.color="var(--primary)",onMouseLeave:l=>l.currentTarget.style.color="var(--muted-foreground)",children:nd(n,d.label)},d.path)),Pr(no,{})]})};import{useEffect as cd}from"react";import{checkLicense as dd}from"@donotdev/core";var ld='<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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=`data:image/svg+xml,${encodeURIComponent(ld)}`;import{jsx as ao,jsxs as Lr}from"react/jsx-runtime";function Jg(){let e=dd();return cd(()=>{e.isValid},[e.isValid]),e.isValid?null:Lr("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:[ao("img",{src:Rr,alt:"DoNotDev Logo",style:{width:"48px",height:"48px",flexShrink:0}}),Lr("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[ao("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"13px",fontWeight:"600",color:"#27494a",lineHeight:"1.2"},children:"DoNotDev"}),ao("div",{style:{fontFamily:"system-ui, sans-serif",fontSize:"11px",fontWeight:"500",color:"#f23d29",lineHeight:"1.2"},children:"Get License"})]})]})}import{useEffect as ud,useState as io,useMemo as pd}from"react";import{Stack as so,Spinner as md}from"@donotdev/components";import{useTranslation as Yr,isFieldVisible as fd}from"@donotdev/core";import*as B from"@donotdev/crud";var W=typeof B?.useCrud=="function",Dr=B?.useEntityForm,Fr=B?.useUnsavedChangesWarning,Br=B?.useFormStore,Mr=B?.useFieldConditions,dt=B?.useCrud,zr=B?.useCrudList,ut=B?.useCrudCardList,Or=B?.useEntityFavorites,Vr=B?.useCrudFilters,Ur=B?.useEntityWorkflow,_r=B?.useReferenceResolver,pt=B?.DisplayFieldRenderer,Hr=B?.FormFieldRenderer,Gr=B?.UploadProvider,mt=B?.EntityFilters,Wr=B?.CrudCard,$r=B?.translateFieldLabel,Kr=B?.formatValue;import{jsx as ve,jsxs as vd}from"react/jsx-runtime";function gd({entity:e,id:t,t:o,className:r="",loadingMessage:n,notFoundMessage:a,viewerRole:i,excludeFields:s}){if(!W)return null;let c=P("userRole"),d=i??c,{get:l,loading:u,data:f,error:p,isAvailable:m}=dt(e),[v,y]=io(!1),[g,S]=io(null),[x,b]=io(null),{t:A}=Yr([e.namespace,"crud"]),{t:E}=Yr("crud"),I=o||A;ud(()=>{if(!t){b(null),S(null),y(!1);return}if(!m||!l)return;let L=!1;return y(!0),S(null),l(t).then(D=>{L||(y(!1),D?(b(D),S(null)):(b(null),S(new Error("Entity not found"))))}).catch(D=>{L||(y(!1),S(D instanceof Error?D:new Error(String(D))),b(null))}),()=>{L=!0}},[t,l,m]);let w=f||x,C=p||g,h=u||v||!t,k=pd(()=>w?Object.entries(e.fields).filter(([L,D])=>{if(s?.includes(L)||!fd(D.visibility,d)||D.visibility==="hidden")return!1;let F=w[L];return!(F==null||typeof F=="string"&&F.trim()===""||Array.isArray(F)&&F.length===0||typeof F=="object"&&!Array.isArray(F)&&F!==null&&Object.keys(F).length===0)}):[],[e.fields,d,w,s]);return h?ve("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},className:r,children:ve(md,{overlay:!0,"aria-label":n||E("form.loading",{defaultValue:"Loading..."})})}):C||!w?ve(so,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},className:r,children:vd(so,{direction:"column",gap:"tight",children:[ve("h3",{style:{color:"var(--muted-foreground)"},children:a||E("errors.notFound",{defaultValue:`${e.name} not found`})}),C&&ve("p",{style:{color:"var(--destructive)",fontSize:"var(--font-size-sm)"},children:C instanceof Error?C.message:String(C)})]})}):ve(so,{direction:"column",className:r,children:k.map(([L,D])=>ve(pt,{name:L,config:D,value:w[L],t:I},L))})}import{RefreshCw as hd,Plus as yd,Trash2 as bd,Edit as Sd,Search as Cd}from"lucide-react";import{useMemo as xd,useCallback as _e,useState as lo}from"react";import{DataTable as wd,Button as co,Stack as uo,ActionButton as kd,Section as qr,Input as Td}from"@donotdev/components";import{useTranslation as Zr}from"@donotdev/core";import{Fragment as Ad,jsx as ne,jsxs as ft}from"react/jsx-runtime";function Ed({entity:e,basePath:t,onClick:o,hideFilters:r=!1,pagination:n="auto",pageSize:a,queryOptions:i,exportable:s=!0}){if(!W)return null;let c=Ce(),d=t??`/${e.collection}`,l=_r(e),[u,f]=lo(1),[p,m]=lo(a),[v,y]=lo(""),{data:g,items:S,processed:x,loading:b,mutate:A,effectiveMode:E}=zr(e,{pagination:n,searchQuery:v,...i&&{queryOptions:i},...(n==="server"||n==="auto")&&{page:u,pageSize:p}}),{delete:I}=dt(e),{t:w}=Zr("crud"),{t:C}=Zr([e.namespace,"crud"]),h=_e(async()=>{await A()},[A]),k=_e(_=>{c(`${d}/${_}`)},[d,c]),L=_e(_=>{o?o(_):c(`${d}/${_}`)},[d,c,o]),D=_e(()=>{c(`${d}/new`)},[d,c]),F=_e(async _=>{await I(_)},[I]),Ee=xd(()=>{let ye=(e.listFields||Object.keys(e.fields)).map(j=>{let ee=e.fields[j];if(!ee)return null;let de=$r(j,ee,C),Ie=ee.type||"text";return{key:j,title:de,dataIndex:j,sortable:!0,filterable:!0,align:Ie==="number"||Ie==="range"?"end":"start",render:(Ne,Pe)=>Kr(Ne,ee,C,{compact:!0,referenceData:l})}}).filter(Boolean);return ye.unshift({key:"_actions",title:w("actions.label",{defaultValue:"Actions"}),dataIndex:void 0,sortable:!1,width:120,align:"center",render:(j,ee)=>ft(uo,{direction:"row",gap:"tight",align:"center",justify:"center",children:[ne(co,{variant:"outline",icon:Sd,onClick:de=>{de.stopPropagation(),k(ee.id)},"aria-label":w("edit",{defaultValue:"Edit"})}),ne(kd,{action:async()=>{await F(ee.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:bd,"aria-label":w("delete",{defaultValue:"Delete"}),children:w("delete",{defaultValue:"Delete"})})]})}),ye},[e,C,w,k,F]),X=C("name",{defaultValue:e.name}),Ae=x.length;return ft(Ad,{children:[ne(qr,{title:w("filters.title",{entity:X,defaultValue:`Browse ${X} - Filters`}),collapsible:!0,defaultOpen:!0,children:ft(uo,{children:[ft(uo,{direction:"row",gap:"tight",align:"center",className:"dndev-w-full",style:{display:"grid",gridTemplateColumns:"1fr auto auto"},children:[ne(Td,{placeholder:w("search.placeholder",{defaultValue:"Search..."}),value:v,onChange:_=>y(_.target.value),icon:Cd,className:"dndev-w-full"}),ne(co,{icon:hd,variant:"outline",onClick:h,disabled:b,display:"compact","aria-label":w("refresh",{defaultValue:"Refresh"})}),ne(co,{icon:yd,onClick:D,display:"compact",children:w("addNew",{defaultValue:"Add New"})})]}),!r&&ne(mt,{entity:e,data:S,fieldsToFilter:e.listFields})]})}),ne(qr,{title:b?w("results.title.fetching",{defaultValue:"Fetching..."}):w("results.title.count",{count:Ae,defaultValue:Ae===1?"Found 1 occurrence":`Found ${Ae} occurrences`}),collapsible:!0,defaultOpen:!0,children:ne(wd,{data:x,columns:Ee,sortable:!0,searchable:!1,pagination:!0,loading:b,onRowClick:_=>L(_.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},...E==="server"&&{currentPage:u,pageSize:p,total:g?.total,onPageChange:f,onPageSizeChange:m},exportable:s,exportFilename:`${e.collection}-export`,exportLabel:w("export",{defaultValue:"Export"})})})]})}import{Heart as Qr}from"lucide-react";import{useMemo as Xr,useCallback as Id}from"react";import{Card as tn,Grid as on,Stack as po,Text as He,Skeleton as Te,Section as jr,Button as Nd}from"@donotdev/components";import{useTranslation as en,getListCardFieldNames as rn,useBreakpoint as Pd}from"@donotdev/core";import{jsx as Jr}from"react/jsx-runtime";function gt({detailHref:e,onClick:t,...o}){if(!W)return null;let r=Jr(Wr,{...o,onClick:e?void 0:t});return e?Jr(T,{path:e,"aria-label":o.item?.id?`View ${o.item.id}`:void 0,children:r}):r}import{Fragment as Bd,jsx as R,jsxs as vt}from"react/jsx-runtime";function Rd(e){let t=e.listCardFields;if(t&&!Array.isArray(t)){let i=t;return{titleFields:i.title??[],subtitleFields:i.subtitle??[],contentFields:i.content??[],footerFields:i.footer??[]}}let o=rn(e),r=i=>{let s=e.fields[i]?.type;return s==="image"||s==="images"},n=o.filter(i=>!r(i)),a=o.filter(r);return{titleFields:n.length>0?[n[0]]:[],subtitleFields:[],contentFields:[...n.slice(1,4),...a],footerFields:[]}}var Ld={mobile:0,tablet:1,laptop:2,desktop:3};function Dd({cols:e,entity:t}){let o=Rd(t),r=Pd("current"),a=((Array.isArray(e)?e[Ld[r]??3]:e)??1)*3,i=d=>{let l=t.fields[d]?.type;return l==="image"||l==="images"},s=o.contentFields.length>0?R(po,{direction:"column",gap:"tight",children:o.contentFields.map(d=>i(d)?R(Te,{height:120},d):vt("div",{children:[R(He,{level:"small",variant:"muted",children:R(Te,{})}),R(He,{children:R(Te,{})})]},d))}):void 0,c=o.footerFields.length>0?R(He,{level:"small",children:R(Te,{})}):void 0;return R(on,{cols:e,children:Array.from({length:a},(d,l)=>R(tn,{title:R(Te,{}),subtitle:o.subtitleFields.length>0?R(Te,{}):void 0,content:s,footer:c,elevated:!0},l))})}function Fd({entity:e,basePath:t,onClick:o,cols:r=[1,2,3,4],staleTime:n=1e3*60*30,queryOptions:a,filter:i,hideFilters:s=!1,resultLabel:c,tone:d}){if(!W)return null;let l=Ce(),u=t??`/${e.collection}`,{items:f,processed:p,loading:m}=ut(e,{staleTime:n,queryOptions:a}),{isFavorite:v,toggleFavorite:y,favoritesFilter:g}=Or({collection:e.collection}),{showFavoritesOnly:S,setShowFavoritesOnly:x}=Vr({collection:e.collection}),b=Xr(()=>{let h=p;return S&&(h=h.filter(g)),i&&(h=h.filter(i)),h},[p,S,g,i]),{t:A}=en([e.namespace,"crud"]),{t:E}=en("crud"),I=Id(h=>{o?o(h):l(`${u}/${h}`)},[u,l,o]),w=Xr(()=>rn(e),[e]),C=A("name",{defaultValue:e.name});return vt(Bd,{children:[!s&&R(jr,{title:E("filters.title",{entity:C,defaultValue:`Browse ${C} - Filters`}),collapsible:!0,defaultOpen:!0,tone:d,children:R(tn,{children:vt(po,{direction:"column",children:[R(Nd,{variant:S?"primary":"outline",icon:R(Qr,{size:18}),onClick:()=>x(!S),children:S?E("favorites.showAll",{defaultValue:"Show All"}):E("favorites.showFavorites",{defaultValue:"Show Favorites"})}),R(mt,{entity:e,data:f,fieldsToFilter:w})]})})}),R(jr,{title:m?E("results.title.fetching",{defaultValue:"Fetching..."}):c?c(b.length):E("results.title.count",{count:b.length,defaultValue:b.length===1?"Found 1 occurrence":`Found ${b.length} occurrences`}),collapsible:!0,defaultOpen:!0,tone:d,children:m?R(Dd,{cols:r,entity:e}):b.length===0?vt(po,{align:"center",justify:"center",style:{padding:"var(--gap-3xl)",textAlign:"center"},children:[R(He,{level:"h3",style:{color:"var(--muted-foreground)"},children:E("emptyState.title",{defaultValue:`No ${e.name.toLowerCase()} found`})}),R(He,{style:{color:"var(--muted-foreground)"},children:E("emptyState.description",{defaultValue:`No ${e.name.toLowerCase()} available at this time.`})})]}):R(on,{cols:r,children:b.map(h=>{let k=v(h.id),L=o?void 0:`${u}/${h.id}`;return R(gt,{item:h,entity:e,detailHref:L,onClick:o?()=>I(h.id):void 0,renderActions:R(Qr,{fill:k?"#ef4444":"#ffffff",stroke:k?"#ef4444":"var(--muted-foreground)",onClick:D=>{D.preventDefault(),D.stopPropagation(),y(h.id)},style:{cursor:"pointer",width:"var(--icon-md)",height:"var(--icon-md)",transition:"fill 0.2s, stroke 0.2s"},"aria-label":k?E("favorites.remove",{defaultValue:"Remove from favorites"}):E("favorites.add",{defaultValue:"Add to favorites"})})},h.id)})})})]})}import{useEffect as nn,useId as Md,useMemo as ht,useState as zd}from"react";import{FormProvider as Od}from"react-hook-form";import{Badge as Vd,Button as yt,DropdownMenu as Ud,Grid as _d,Stack as Hd,Spinner as Gd}from"@donotdev/components";import{hasRoleAccess as Wd,useTranslation as an}from"@donotdev/core";import{jsx as Y,jsxs as bt}from"react/jsx-runtime";function mo({entity:e,onSubmit:t,t:o,className:r="",submitText:n,loading:a=!1,defaultValues:i,submitVariant:s="primary",secondaryButtonText:c,secondaryButtonVariant:d="outline",onSecondarySubmit:l,viewerRole:u,operation:f=i?"edit":"create",formId:p,cancelText:m,cancelPath:v,successPath:y,onCancel:g,warnOnUnsavedChanges:S=!0,unsavedChangesMessage:x,hideVisibilityInfo:b=!1}){if(!W)return null;let A=Ce(),E=P("userRole"),I=u??E,w=Md(),C=p??`entity-form-${e.name}-${w}`,{t:h}=an([e.namespace,"crud"]),{t:k}=an("crud"),L=o||h,F=!b&&(I==="admin"||I==="super"),Ee=I==="user"||I==="admin"||I==="super",[X,Ae]=zd(I==="admin"||I==="super"||I==="user"?I:"guest"),_={guest:"muted",user:"secondary",admin:"warning",super:"destructive",technical:"accent",owner:"secondary"},ye=["guest","user","admin","super"],j={guest:"Guest",user:"User",admin:"Admin",super:"Super",technical:"System"},ee=ht(()=>ye.filter(N=>Wd(I,N)).map(N=>({label:j[N],checked:X===N,onClick:()=>Ae(N)})),[X,I]),de=Dr(e,{formId:C,operation:f,defaultValues:i,viewerRole:I,t:L}),{control:Ie,handleSubmit:fo,formState:{errors:go},fields:Ne,formStatus:Pe,uploadProgress:Re,cleanup:vo,isDirty:un,hasUserInteracted:pn,resetForm:mn}=de,wt=un&&pn,ho=ht(()=>{if(!Ee)return Ne;let N=ye.indexOf(X);return Ne.filter(({config:V})=>{let te=V.visibility;return te==="hidden"?!1:te==="technical"?!0:ye.indexOf(te)<=N})},[Ne,Ee,X]),fn=Mr(ho,Ie);nn(()=>{C&&Br.getState().setIsDirty(C,wt)},[C,wt]),nn(()=>vo,[vo]);let gn=ht(()=>x||k("messages.unsavedChangesLeave",{defaultValue:"You have unsaved changes. Are you sure you want to leave?"}),[x,k]);Fr({isDirty:wt,enabled:S,message:gn});let vn=()=>{mn(),g?g():A(v||"back")},hn=async N=>{try{await t(N),A(y||"back")}catch{}},yn=m!==null,yo=m??k("form.cancel",{defaultValue:"Cancel"}),bo={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)"},bn=a||f==="edit"&&!i,ae=ht(()=>Pe==="uploading"?{loading:!0,loadingText:Re<100?k("form.uploading",{progress:Math.round(Re),defaultValue:`Uploading ${Math.round(Re)}%...`}):k("form.processing",{defaultValue:"Processing..."}),progress:Re}:Pe==="validating"?{loading:!0,loadingText:k("form.validating",{defaultValue:"Validating..."})}:Pe==="submitting"?{loading:!0,loadingText:k("form.saving",{defaultValue:"Saving..."})}:{loading:!1},[Pe,Re,k]);return Y(Od,{...de,children:Y(Gr,{formId:C,children:bt("div",{style:{position:"relative",width:"100%",gridColumn:"1 / -1",display:"contents"},children:[bn&&Y(Gd,{overlay:!0}),bt("form",{onSubmit:fo(hn),noValidate:!0,className:r,style:{width:"100%",gridColumn:"1 / -1",display:"contents"},children:[ho.map(({name:N,config:V,editable:te})=>{let K=fn[N];if(K&&!K.visible)return null;let So=K?{...V,...K.required&&V.validation?{validation:{...V.validation,required:!0}}:K.required?{validation:{required:!0}}:{}}:V,Sn=te&&!K?.disabled&&!K?.readonly,Cn=F&&V.visibility!=="guest",xn=V.visibility!=="hidden"?_[V.visibility]:void 0,wn=j[V.visibility]??V.visibility,Co=Sn?Y(Hr,{name:N,config:So,control:Ie,errors:go,t:L},N):Y(pt,{name:N,config:So,value:i?.[N],t:L},N);return Cn?bt("div",{style:{position:"relative"},children:[Y(Vd,{as:"span",variant:xn,style:{position:"absolute",top:0,insetInlineEnd:0,fontSize:"var(--font-size-xs)",zIndex:1},children:wn}),Co]},N):Co}),(()=>{let N=[];if(yn&&yo&&N.push(Y(yt,{type:"button",onClick:vn,disabled:ae.loading,variant:"outline",className:"dndev-w-full",children:yo},"cancel")),Ee){let K=_[X]||"muted";N.push(Y(Ud,{trigger:bt(yt,{type:"button",variant:K,disabled:ae.loading,className:"dndev-w-full",children:[k("visibility.preview",{defaultValue:"Preview"}),": ",j[X]]}),items:ee},"preview"))}c&&N.push(Y(yt,{type:"button",onClick:()=>{if(l){let K=de.getValues();l(K)}},loading:ae.loading,loadingText:ae.loadingText,progress:ae.progress,variant:d,className:"dndev-w-full",children:c},"secondary")),N.push(Y(yt,{type:"submit",loading:ae.loading,loadingText:ae.loadingText,progress:ae.progress,variant:s,className:"dndev-w-full",children:n||k("form.submit",{defaultValue:"Submit"})},"submit"));let V=N.length;if(V===1)return Y(Hd,{direction:"column",gap:"tight",style:bo,children:N[0]});let te=V===2?"1fr 2fr":V===3?"1fr 1fr 2fr":"1fr 1fr 1fr 2fr";return Y(_d,{cols:["1fr",te,te,te],gap:"tight",style:bo,children:N})})()]})]})})})}import{Card as $d,Section as Kd,Skeleton as St,Stack as Yd}from"@donotdev/components";import{useTranslation as qd,useBreakpoint as Zd}from"@donotdev/core";import{jsx as he,jsxs as Qd}from"react/jsx-runtime";function Jd({entity:e,queryOptions:t,title:o,basePath:r,cols:n=[1,1,3,3],className:a}){if(!W)return null;let{t:i}=qd([e.namespace,"crud"]),{items:s,loading:c}=ut(e,{queryOptions:t});if(!c&&s.length===0)return null;let d=r??`/${e.collection}`,l=o??i("recommendations.title",{defaultValue:"You may also like"}),u=Zd("current"),f={mobile:0,tablet:1,laptop:2,desktop:3},p=(Array.isArray(n)?n[f[u]??3]:typeof n=="number"?n:3)??1,m=(typeof p=="number"?p:3)*3;return he(Kd,{title:l,gridCols:n,className:a,children:c?Array.from({length:m},(v,y)=>he($d,{title:he(St,{width:"60%"}),subtitle:he(St,{width:"40%"}),content:Qd(Yd,{direction:"column",gap:"tight",children:[he(St,{width:"80%"}),he(St,{width:"50%"})]}),elevated:!0},y)):s.map(v=>he(gt,{item:v,entity:e,detailHref:`${d}/${v.id}`},v.id))})}import{Button as Xd,Stack as jd,Stepper as eu}from"@donotdev/components";import{useTranslation as tu}from"@donotdev/core";import{Fragment as ru,jsx as Ct,jsxs as nu}from"react/jsx-runtime";function ou({workflow:e,onComplete:t,onStepChange:o,defaultValues:r,viewerRole:n,children:a,className:i}){if(!W)return null;let{t:s}=tu("crud"),c=Ur(e,{onComplete:t,onStepChange:o,defaultValues:r});if(a)return Ct(ru,{children:a(c)});let{currentStep:d,currentStepIndex:l,visibleSteps:u,isFirst:f,isLast:p,isSubmitting:m,stepData:v}=c,y=u.map((g,S)=>({number:S+1,title:g.title,content:null}));return nu(jd,{className:i,gap:"large",children:[Ct(eu,{steps:y,activeStep:l,showStepNumbers:!0,onStepChange:g=>{g<=l&&c.goToStep(g)}}),d.custom?d.custom(c.allData):d.entity?Ct(mo,{entity:d.entity,operation:"create",viewerRole:n,defaultValues:{...v[d.id],...!p&&{status:"draft"}},onSubmit:async g=>{await c.goNext(g)},submitText:p?s("workflow.submit",{defaultValue:"Submit"}):s("workflow.next",{defaultValue:"Next"}),cancelText:f?null:s("workflow.previous",{defaultValue:"Previous"}),onCancel:f?void 0:c.goPrevious,loading:m,warnOnUnsavedChanges:!1,hideVisibilityInfo:!0}):null,d.allowSkip&&!p&&Ct(Xd,{variant:"ghost",onClick:c.skipStep,className:"dndev-w-full",children:s("workflow.skip",{defaultValue:"Skip this step"})})]})}import{createContext as ln,useId as au,use as sn}from"react";import{Controller as iu,FormProvider as su,useFormContext as lu}from"react-hook-form";import{Label as cu,Slot as du,cn as uu,Stack as pu}from"@donotdev/components";import{jsx as ce}from"react/jsx-runtime";var X0=su,cn=ln({}),j0=({...e})=>ce(cn.Provider,{value:{name:e.name},children:ce(iu,{...e})}),dn=ln({}),e3=({className:e,...t})=>{let o=au();return ce(dn.Provider,{value:{id:o},children:ce(pu,{className:e,...t})})},xt=()=>{let e=sn(cn);if(!e||!e.name)return null;let t=sn(dn);if(!t)return null;let{getFieldState:o,formState:r}=lu(),n=o(e.name,r),{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...n}},t3=({className:e,...t})=>{let o=xt();if(!o)return null;let{error:r,formItemId:n}=o;return ce(cu,{className:uu(r&&"text-destructive",e),htmlFor:n,...t})},o3=({...e})=>{let t=xt();if(!t)return null;let{error:o,formItemId:r,formDescriptionId:n,formMessageId:a}=t;return ce(du,{id:r,"aria-describedby":o?`${n} ${a}`:`${n}`,"aria-invalid":!!o,...e})},r3=({className:e,...t})=>{let o=xt();if(!o)return null;let{formDescriptionId:r}=o;return ce("p",{id:r,className:e,style:{fontSize:"var(--font-size-sm)",color:"var(--muted-foreground)"},...t})},n3=({className:e,children:t,...o})=>{let r=xt();if(!r)return null;let{error:n,formMessageId:a}=r,i=n?String(n?.message):t;return i?ce("p",{id:a,className:e,style:{fontSize:"var(--font-size-sm)",fontWeight:500,color:"var(--destructive)"},...o,children:i}):null};var mu={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"},fu={zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zOverlay:"dndev-z-overlay",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},g3={...mu,...fu},v3={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"},h3={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{ml as AppBranding,vl as AppIcon,bl as AppTitle,G as AssetResolver,Fn as AuthGuard,gp as AuthGuardFallback,Vt as AuthHeader,zt as AuthMenu,Rl as Breadcrumbs,Jt as CacheSettings,gf as ConsentBanner,Vo as DnDevNavigationMenu,Ql as DropdownNavigation,Fd as EntityCardList,gd as EntityDisplayRenderer,mo as EntityFormRenderer,Ed as EntityList,Jd as EntityRecommendations,ou as EntityWorkflow,Ls as FeatureCard,ds as FeatureDisabled,tc as FloatingLanguageSwitcher,no as FooterBranding,Xc as FooterCopyright,id as FooterLegalLinks,X0 as Form,o3 as FormControl,r3 as FormDescription,j0 as FormField,e3 as FormItem,t3 as FormLabel,n3 as FormMessage,Sf as GameContainer,kf as GameFlow,Bl as GameTitle,Cp as GoTo,Oa as GoToInput,Na as GoToWrapper,sc as HeaderMenu,fc as HeaderNavigation,kn as Icon,Jg as LicenseWatermark,T as Link,Uo as NotFoundPage,Tc as Notifications,qe as PageContainer,ws as ProgressBar,Ss as RedirectOverlay,zc as SettingsMenu,Es as Skeleton,el as TechBento,Wc as ThemeToggle,g3 as allLayoutClasses,zu as createAuthConfig,h3 as cssVariables,gu as isAuthAvailable,F1 as isBillingAvailable,H1 as isCrudAvailable,I1 as isFormStoreAvailable,K1 as isOAuthAvailable,mu as layoutClasses,fu as layoutUtilities,v3 as layoutVariables,T1 as resolveFaviconSet,k1 as resolveLogo,we as sanitizeSvg,Q1 as tList,$t as techLogos,P as useAuthSafe,Bu as useAuthState,Xe as useAuthVisibility,u1 as useBack,O1 as useBillingVisibility,Lu as useCanAccess,Bn as useCanNavigate,_1 as useCrudSafe,xt as useFormField,ri as useFormStoreSafe,vu as useGoTo,Fu as useHasRole,f1 as useLocation,y1 as useMatch,Ce as useNavigate,Z as useNavigationItems,xo as useNavigationRoute,$1 as useOAuthSafe,g1 as useParams,m1 as usePrefetch,b1 as useQueryParams,S1 as useRedirectGuard,p1 as useRefresh,v1 as useRouteParam,h1 as useSearchParams,Ft as useStripeBillingSafe,Du as useUserRole,Mu as withAuth};
|
package/dist/routing/Link.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
13
13
|
children?: ReactNode;
|
|
14
14
|
/** Icon component or string name */
|
|
15
15
|
icon?: string | ReactNode;
|
|
16
|
+
/** Place icon after content instead of before */
|
|
17
|
+
iconEnd?: boolean;
|
|
16
18
|
/** Label text (rendered as span if provided) */
|
|
17
19
|
label?: string;
|
|
18
20
|
'aria-label'?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/routing/Link.tsx"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAC1B,MAAM,OAAO,CAAC;AASf;;;;;;GAMG;AACH,MAAM,WAAW,SAAU,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE,aAAa,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/routing/Link.tsx"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAC1B,MAAM,OAAO,CAAC;AASf;;;;;;GAMG;AACH,MAAM,WAAW,SAAU,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE,aAAa,CAAC,SAAS,CA4IzC,CAAC"}
|
package/dist/routing/Link.js
CHANGED
|
@@ -23,7 +23,7 @@ import { Icon } from '../components/common/icon';
|
|
|
23
23
|
* @since 0.0.1
|
|
24
24
|
* @author AMBROISE PARK Consulting
|
|
25
25
|
*/
|
|
26
|
-
export const Link = ({ path, replace, prefetch = true, children, icon, label, onClick, className, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, target, rel, ...rest }) => {
|
|
26
|
+
export const Link = ({ path, replace, prefetch = true, children, icon, iconEnd = false, label, onClick, className, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, target, rel, ...rest }) => {
|
|
27
27
|
const navigate = useNavigate();
|
|
28
28
|
const showCookieBanner = useConsent('showCookieBanner');
|
|
29
29
|
// Special framework trigger: #cookie-settings
|
|
@@ -42,11 +42,11 @@ export const Link = ({ path, replace, prefetch = true, children, icon, label, on
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
return (_jsxs("a", { href: "#cookie-settings", onClick: handleCookieSettings, className: className, style: {
|
|
45
|
-
display: icon && label ? 'flex' : undefined,
|
|
46
|
-
alignItems: icon && label ? 'center' : undefined,
|
|
47
|
-
gap: icon && label ? 'var(--gap-sm)' : undefined,
|
|
45
|
+
display: icon && (label || children) ? 'flex' : undefined,
|
|
46
|
+
alignItems: icon && (label || children) ? 'center' : undefined,
|
|
47
|
+
gap: icon && (label || children) ? 'var(--gap-sm)' : undefined,
|
|
48
48
|
...rest.style,
|
|
49
|
-
}, "aria-label": ariaLabel || label || 'Cookie Settings', "aria-describedby": ariaDescribedBy, ...rest, children: [icon && _jsx(Icon, { icon: icon, fallback: LinkIcon }), label && _jsx("span", { children: label }), children] }));
|
|
49
|
+
}, "aria-label": ariaLabel || label || 'Cookie Settings', "aria-describedby": ariaDescribedBy, ...rest, children: [icon && !iconEnd && _jsx(Icon, { icon: icon, fallback: LinkIcon }), label && _jsx("span", { children: label }), children, icon && iconEnd && _jsx(Icon, { icon: icon, fallback: LinkIcon })] }));
|
|
50
50
|
}
|
|
51
51
|
// Auto-detect external URLs
|
|
52
52
|
const isExternal = path.startsWith('http://') ||
|
|
@@ -75,13 +75,13 @@ export const Link = ({ path, replace, prefetch = true, children, icon, label, on
|
|
|
75
75
|
'aria-label': ariaLabel || label,
|
|
76
76
|
'aria-describedby': ariaDescribedBy,
|
|
77
77
|
};
|
|
78
|
-
const linkContent = (_jsxs(_Fragment, { children: [icon && _jsx(Icon, { icon: icon, fallback: LinkIcon }), label && _jsx("span", { children: label }), children] }));
|
|
78
|
+
const linkContent = (_jsxs(_Fragment, { children: [icon && !iconEnd && _jsx(Icon, { icon: icon, fallback: LinkIcon }), label && _jsx("span", { children: label }), children, icon && iconEnd && _jsx(Icon, { icon: icon, fallback: LinkIcon })] }));
|
|
79
79
|
// External links: use regular <a> with target/rel
|
|
80
80
|
if (isExternal) {
|
|
81
81
|
return (_jsx("a", { href: path, onClick: handleClick, target: target || '_blank', rel: rel || 'noopener noreferrer', className: className, style: {
|
|
82
|
-
display: icon && label ? 'flex' : undefined,
|
|
83
|
-
alignItems: icon && label ? 'center' : undefined,
|
|
84
|
-
gap: icon && label ? 'var(--gap-sm)' : undefined,
|
|
82
|
+
display: icon && (label || children) ? 'flex' : undefined,
|
|
83
|
+
alignItems: icon && (label || children) ? 'center' : undefined,
|
|
84
|
+
gap: icon && (label || children) ? 'var(--gap-sm)' : undefined,
|
|
85
85
|
}, ...accessibilityProps, ...rest, children: linkContent }));
|
|
86
86
|
}
|
|
87
87
|
// Internal links: use framework Link
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@donotdev/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"react-hook-form": "^7.71.2"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@donotdev/auth": "^0.0.
|
|
61
|
+
"@donotdev/auth": "^0.0.21",
|
|
62
62
|
"@donotdev/billing": "^0.0.17",
|
|
63
|
-
"@donotdev/components": "^0.0.
|
|
64
|
-
"@donotdev/core": "^0.0.
|
|
65
|
-
"@donotdev/crud": "^0.0.
|
|
63
|
+
"@donotdev/components": "^0.0.30",
|
|
64
|
+
"@donotdev/core": "^0.0.43",
|
|
65
|
+
"@donotdev/crud": "^0.0.29",
|
|
66
66
|
"@donotdev/oauth": "^0.0.17",
|
|
67
67
|
"lucide-react": "^0.575.0",
|
|
68
68
|
"react": "^19.2.4",
|