@nice2dev/ui-core 1.0.11 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),x=require("react/jsx-runtime"),B=require("@nice2dev/i18n"),Xs={small:"sm",medium:"md",large:"lg"},pt=new Set;function qs(e,t){if(!e)return"md";const r=Xs[e];if(r){if(process.env.NODE_ENV!=="production"){const a=`${t??""}:${e}`;pt.has(a)||(pt.add(a),console.warn(`[Nice2Dev] Deprecated size "${e}"${t?` in <${t}>`:""}. Use "${r}" instead. Legacy size names will be removed in v2.0.`))}return r}return e}/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),x=require("react/jsx-runtime"),_=require("@nice2dev/i18n"),es={small:"sm",medium:"md",large:"lg"},gt=new Set;function ts(e,t){if(!e)return"md";const r=es[e];if(r){if(process.env.NODE_ENV!=="production"){const a=`${t??""}:${e}`;gt.has(a)||(gt.add(a),console.warn(`[Nice2Dev] Deprecated size "${e}"${t?` in <${t}>`:""}. Use "${r}" instead. Legacy size names will be removed in v2.0.`))}return r}return e}/**
2
2
  * @file themeVariants.ts
3
3
  * @description Extended theme variants - radius, shadows, fills, gradients, effects
4
4
  *
@@ -7,24 +7,24 @@
7
7
  * @version 1.0.0
8
8
  * @since 2026-03
9
9
  * @license MIT
10
- */const ae={none:{xs:"0",sm:"0",md:"0",lg:"0",xl:"0",full:"0"},sm:{xs:"2px",sm:"3px",md:"4px",lg:"6px",xl:"8px",full:"9999px"},md:{xs:"4px",sm:"6px",md:"8px",lg:"12px",xl:"16px",full:"9999px"},lg:{xs:"6px",sm:"10px",md:"14px",lg:"20px",xl:"28px",full:"9999px"},xl:{xs:"10px",sm:"16px",md:"24px",lg:"32px",xl:"48px",full:"9999px"},"2xl":{xs:"16px",sm:"24px",md:"32px",lg:"48px",xl:"64px",full:"9999px"},full:{xs:"9999px",sm:"9999px",md:"9999px",lg:"9999px",xl:"9999px",full:"9999px"}},he={none:"none",subtle:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",inner:"inset 0 2px 4px 0 rgba(0, 0, 0, 0.05)",colored:"0 4px 14px 0 var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.4))",glow:"0 0 20px var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.5))"},kt={none:"none",subtle:"0 1px 2px 0 rgba(0, 0, 0, 0.2)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4)",inner:"inset 0 2px 4px 0 rgba(0, 0, 0, 0.3)",colored:"0 4px 14px 0 var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.5))",glow:"0 0 30px var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.6))"},se={compact:{paddingX:"8px",paddingY:"4px",gap:"4px",fontSize:"13px",lineHeight:"1.3",inputHeight:"28px",buttonHeight:"28px"},normal:{paddingX:"12px",paddingY:"8px",gap:"8px",fontSize:"14px",lineHeight:"1.5",inputHeight:"36px",buttonHeight:"36px"},comfortable:{paddingX:"16px",paddingY:"12px",gap:"12px",fontSize:"15px",lineHeight:"1.6",inputHeight:"44px",buttonHeight:"44px"},spacious:{paddingX:"24px",paddingY:"16px",gap:"16px",fontSize:"16px",lineHeight:"1.7",inputHeight:"52px",buttonHeight:"52px"}},ve={none:{duration:"0ms",easing:"linear",hoverScale:"1",clickScale:"1",enterAnimation:"none",exitAnimation:"none"},subtle:{duration:"150ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)",hoverScale:"1.01",clickScale:"0.99",enterAnimation:"ntd-fade-in 150ms ease-out",exitAnimation:"ntd-fade-out 100ms ease-in"},normal:{duration:"200ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)",hoverScale:"1.02",clickScale:"0.98",enterAnimation:"ntd-slide-up 200ms ease-out",exitAnimation:"ntd-slide-down 150ms ease-in"},playful:{duration:"300ms",easing:"cubic-bezier(0.34, 1.56, 0.64, 1)",hoverScale:"1.05",clickScale:"0.95",enterAnimation:"ntd-bounce-in 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",exitAnimation:"ntd-bounce-out 200ms ease-in"},dramatic:{duration:"400ms",easing:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",hoverScale:"1.08",clickScale:"0.92",enterAnimation:"ntd-zoom-in 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55)",exitAnimation:"ntd-zoom-out 250ms ease-in"}};function Us(e,t,r){switch(e){case"solid":return{background:t};case"gradient-linear":return{background:`linear-gradient(135deg, ${t} 0%, ${r||q(t,-20)} 100%)`};case"gradient-radial":return{background:`radial-gradient(circle at top left, ${t} 0%, ${r||q(t,-30)} 100%)`};case"glass":return{background:"rgba(255, 255, 255, 0.1)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",border:"1px solid rgba(255, 255, 255, 0.2)"};case"frosted":return{background:"rgba(255, 255, 255, 0.7)",backdropFilter:"blur(20px) saturate(180%)",WebkitBackdropFilter:"blur(20px) saturate(180%)",border:"1px solid rgba(255, 255, 255, 0.3)"};case"pattern":return{backgroundImage:`url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='${encodeURIComponent(t)}' fill-opacity='0.05'%3E%3Cpath d='M0 0h20L10 10z'/%3E%3C/g%3E%3C/svg%3E")`,backgroundColor:"var(--ntd-bg-surface)"};case"texture":return{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`,backgroundBlendMode:"overlay",backgroundColor:t};case"gradient-conic":return{background:`conic-gradient(from 180deg, ${t}, ${r||q(t,-20)}, ${t})`};case"mesh":return{background:`radial-gradient(at 40% 20%, ${t} 0%, transparent 50%), radial-gradient(at 80% 0%, ${r||q(t,30)} 0%, transparent 50%), radial-gradient(at 0% 50%, ${q(t,-20)} 0%, transparent 50%)`,backgroundColor:"var(--ntd-bg-surface, #fff)"};default:return{background:t}}}function We(e,t){const r={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"flat":return{...r,background:t,boxShadow:"none",border:"none"};case"raised":return{...r,background:t,boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",border:"none"};case"outlined":return{...r,background:"transparent",border:`2px solid ${t}`,color:t};case"ghost":return{...r,background:"transparent",border:"none",color:t};case"soft":return{...r,background:`${t}20`,border:"none",color:t};case"gradient":return{...r,background:`linear-gradient(135deg, ${t} 0%, ${q(t,-20)} 100%)`,border:"none",boxShadow:`0 4px 14px ${t}40`};case"3d":return{...r,background:t,border:"none",boxShadow:`0 4px 0 ${q(t,-30)}, 0 6px 10px rgba(0, 0, 0, 0.2)`,transform:"translateY(-2px)"};case"neumorphic":return{...r,background:"var(--ntd-bg-surface)",border:"none",boxShadow:"5px 5px 10px rgba(0, 0, 0, 0.1), -5px -5px 10px rgba(255, 255, 255, 0.8)",color:t};case"pill":return{...r,background:t,border:"none",borderRadius:"9999px",paddingLeft:"24px",paddingRight:"24px"};case"link":return{...r,background:"transparent",border:"none",color:t,textDecoration:"underline",padding:"0"};case"brutal":return{...r,background:t,border:"3px solid #000",boxShadow:"4px 4px 0 #000",borderRadius:"0"};default:return r}}function Ve(e){const t={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"bordered":return{...t,background:"var(--ntd-bg-input, var(--bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",borderRadius:"var(--ntd-radius-md, 8px)"};case"filled":return{...t,background:"var(--ntd-bg-input-filled, var(--bg-secondary, rgba(255,255,255,0.06)))",border:"2px solid transparent",borderRadius:"var(--ntd-radius-md, 8px)"};case"underlined":return{...t,background:"transparent",border:"none",borderBottom:"2px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",borderRadius:"0",paddingLeft:"0",paddingRight:"0"};case"floating":return{...t,background:"var(--ntd-bg-input, var(--bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",borderRadius:"var(--ntd-radius-md, 8px)",paddingTop:"20px"};case"soft":return{...t,background:"var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.1))",border:"none",borderRadius:"var(--ntd-radius-md, 8px)"};case"neumorphic":return{...t,background:"var(--ntd-bg-surface, var(--bg-primary, transparent))",border:"none",borderRadius:"var(--ntd-radius-md, 8px)",boxShadow:"inset 3px 3px 6px rgba(0, 0, 0, 0.2), inset -3px -3px 6px rgba(255, 255, 255, 0.05)"};case"pill":return{...t,background:"var(--ntd-bg-input, var(--bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",borderRadius:"9999px",paddingLeft:"20px",paddingRight:"20px"};case"flush":return{...t,background:"transparent",border:"none",borderRadius:"0",padding:"0",outline:"none"};default:return t}}function Xe(e){const t={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"flat":return{...t,background:"var(--ntd-bg-surface, var(--bg-secondary, transparent))",border:"none",boxShadow:"none"};case"elevated":return{...t,background:"var(--ntd-bg-surface, var(--bg-secondary, transparent))",border:"none",boxShadow:"var(--ntd-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1))"};case"bordered":return{...t,background:"var(--ntd-bg-surface, var(--bg-secondary, transparent))",border:"1px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",boxShadow:"none"};case"glass":return{...t,background:"rgba(255, 255, 255, 0.1)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",border:"1px solid rgba(255, 255, 255, 0.2)",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.1)"};case"gradient":return{...t,background:"linear-gradient(135deg, var(--ntd-bg-surface) 0%, var(--ntd-bg-elevated) 100%)",border:"none",boxShadow:"var(--ntd-shadow-md)"};case"neumorphic":return{...t,background:"var(--ntd-bg-surface, var(--bg-secondary, transparent))",border:"none",boxShadow:"8px 8px 16px rgba(0, 0, 0, 0.2), -8px -8px 16px rgba(255, 255, 255, 0.05)"};case"outlined":return{...t,background:"transparent",border:"2px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",boxShadow:"none"};case"paper":return{...t,background:"var(--ntd-bg-surface, var(--bg-secondary, transparent))",border:"none",boxShadow:"2px 3px 8px rgba(0,0,0,0.06)",borderRadius:"2px"};default:return t}}function Ct(e,t){const r={display:"inline-flex",alignItems:"center",fontSize:"0.75rem",fontWeight:"600",lineHeight:"1"};switch(e){case"solid":return{...r,background:t,color:"#fff",padding:"2px 8px",borderRadius:"4px"};case"soft":return{...r,background:`${t}20`,color:t,padding:"2px 8px",borderRadius:"4px"};case"outlined":return{...r,background:"transparent",border:`1px solid ${t}`,color:t,padding:"2px 8px",borderRadius:"4px"};case"dot":return{...r,background:t,width:"8px",height:"8px",borderRadius:"50%",padding:"0"};case"pill":return{...r,background:t,color:"#fff",padding:"2px 12px",borderRadius:"9999px"};case"gradient":return{...r,background:`linear-gradient(135deg, ${t}, ${q(t,-20)})`,color:"#fff",padding:"2px 8px",borderRadius:"4px"};default:return r}}function Mt(e,t){switch(e){case"underline":return{borderBottom:`2px solid ${t}`,background:"transparent",color:t};case"pills":return{background:t,color:"#fff",borderRadius:"9999px",padding:"6px 16px"};case"enclosed":return{background:"var(--ntd-bg-surface,#fff)",border:"1px solid var(--ntd-border-color,#e5e7eb)",borderBottom:"none",borderRadius:"8px 8px 0 0"};case"soft":return{background:`${t}15`,color:t,borderRadius:"6px",padding:"6px 16px"};case"lifted":return{background:"var(--ntd-bg-surface,#fff)",boxShadow:"0 -2px 8px rgba(0,0,0,0.06)",borderRadius:"8px 8px 0 0",transform:"translateY(-2px)"};case"bordered":return{border:`2px solid ${t}`,borderBottom:"none",background:"transparent",borderRadius:"8px 8px 0 0"};default:return{}}}function At(e){switch(e){case"default":return{borderRadius:"12px",width:"44px",height:"24px"};case"ios":return{borderRadius:"16px",width:"51px",height:"31px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"};case"flat":return{borderRadius:"4px",width:"40px",height:"22px"};case"pill":return{borderRadius:"9999px",width:"48px",height:"24px"};case"square":return{borderRadius:"0",width:"40px",height:"22px"};default:return{}}}function Et(e){switch(e){case"dark":return{background:"#1f2937",color:"#f9fafb",borderRadius:"6px",padding:"6px 12px",boxShadow:"0 4px 12px rgba(0,0,0,0.3)"};case"light":return{background:"#fff",color:"#374151",borderRadius:"6px",padding:"6px 12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",border:"1px solid #e5e7eb"};case"primary":return{background:"var(--color-primary,#6366f1)",color:"#fff",borderRadius:"6px",padding:"6px 12px"};case"glass":return{background:"rgba(255,255,255,0.15)",backdropFilter:"blur(12px)",color:"#fff",borderRadius:"8px",padding:"8px 14px"};case"bordered":return{background:"#fff",color:"#374151",borderRadius:"6px",padding:"6px 12px",border:"2px solid var(--color-primary,#6366f1)"};default:return{}}}function Nt(e){switch(e){case"default":return{borderCollapse:"collapse"};case"striped":return{borderCollapse:"collapse"};case"bordered":return{border:"1px solid var(--ntd-border-color,#e5e7eb)",borderCollapse:"collapse"};case"compact":return{borderCollapse:"collapse",fontSize:"0.8125rem"};case"hoverable":return{borderCollapse:"collapse"};case"minimal":return{borderCollapse:"collapse",borderBottom:"1px solid var(--ntd-border-color,#e5e7eb)"};default:return{}}}const V={radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",modalStyle:"default",tableStyle:"default",menuStyle:"default",animation:"normal",density:"normal"},we={minimal:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"flat",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},rounded:{radius:"xl",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"comfortable"},sharp:{radius:"none",shadow:"lg",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"subtle",density:"compact"},glass:{radius:"lg",shadow:"none",fill:"glass",buttonStyle:"ghost",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"normal"},neumorphic:{radius:"lg",shadow:"none",fill:"solid",buttonStyle:"neumorphic",inputStyle:"neumorphic",cardStyle:"neumorphic",badgeStyle:"soft",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"default",animation:"subtle",density:"comfortable"},playful:{radius:"2xl",shadow:"colored",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"comfortable"},enterprise:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"compact"},modern3d:{radius:"lg",shadow:"xl",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"gradient",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},brutalist:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},luxe:{radius:"sm",shadow:"lg",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"floating",cardStyle:"elevated",badgeStyle:"gradient",tabStyle:"underline",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"hoverable",animation:"normal",density:"comfortable"},pill:{radius:"full",shadow:"md",fill:"solid",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},flat:{radius:"md",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"filled",cardStyle:"flat",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},editorial:{radius:"none",shadow:"subtle",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},dashboard:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"compact"},softCloud:{radius:"xl",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"normal",density:"comfortable"},cosmic:{radius:"lg",shadow:"glow",fill:"mesh",buttonStyle:"gradient",inputStyle:"soft",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"comfortable"},corporate:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"none",density:"compact"},bank:{radius:"none",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"none",density:"compact"},government:{radius:"sm",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"flat",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"none",density:"normal"},military:{radius:"none",shadow:"lg",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"none",density:"compact"},legal:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"none",density:"comfortable"},medical:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"enclosed",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"striped",animation:"subtle",density:"normal"},swiss:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},scandinavian:{radius:"lg",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"filled",cardStyle:"flat",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"spacious"},bauhaus:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},notebook:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},terminal:{radius:"none",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"compact"},hacker:{radius:"none",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"subtle",density:"compact"},retro8bit:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},vapor:{radius:"lg",shadow:"glow",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"soft",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"hoverable",animation:"playful",density:"comfortable"},synthwave:{radius:"md",shadow:"glow",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"filled",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"normal"},cyberpunk:{radius:"none",shadow:"glow",fill:"gradient-linear",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"compact"},steampunk:{radius:"sm",shadow:"inner",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"bordered",tableStyle:"bordered",animation:"subtle",density:"normal"},origami:{radius:"none",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"lifted",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"default",animation:"normal",density:"normal"},watercolor:{radius:"2xl",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"comfortable"},neon:{radius:"md",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"default",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"normal"},candy:{radius:"2xl",shadow:"colored",fill:"gradient-linear",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"comfortable"},bubblegum:{radius:"full",shadow:"colored",fill:"gradient-radial",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"spacious"},cartoon:{radius:"xl",shadow:"colored",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"pill",tooltipStyle:"bordered",tableStyle:"bordered",animation:"playful",density:"comfortable"},kawaii:{radius:"full",shadow:"colored",fill:"gradient-linear",buttonStyle:"pill",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"dramatic",density:"spacious"},circus:{radius:"full",shadow:"colored",fill:"gradient-conic",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"striped",animation:"dramatic",density:"spacious"},paper:{radius:"sm",shadow:"md",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},zen:{radius:"md",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"spacious"},monochrome:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},windows95:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"compact"},material:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},fluent:{radius:"md",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"filled",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"subtle",density:"normal"},cupertino:{radius:"xl",shadow:"md",fill:"frosted",buttonStyle:"soft",inputStyle:"filled",cardStyle:"glass",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"comfortable"},ant:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"subtle",density:"normal"},bootstrap:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"normal"},chakra:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},notion:{radius:"sm",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"flush",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},linear:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"hoverable",animation:"subtle",density:"compact"},vercel:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"minimal",animation:"subtle",density:"normal"},gaming:{radius:"none",shadow:"glow",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"gradient",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"normal"},kiddo:{radius:"2xl",shadow:"colored",fill:"gradient-radial",buttonStyle:"pill",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"spacious"},disco:{radius:"full",shadow:"glow",fill:"gradient-conic",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"comfortable"},clown:{radius:"full",shadow:"colored",fill:"gradient-conic",buttonStyle:"brutal",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"striped",animation:"dramatic",density:"spacious"}};function qe(e,t=":root"){const r=ae[e.radius],a=e.shadow,n=se[e.density],s=ve[e.animation],o=[`${t} {`];for(const[i,l]of Object.entries(r))o.push(` --ntd-radius-${i}: ${l};`);o.push(` --ntd-shadow: ${he[a]};`),o.push(` --ntd-shadow-dark: ${kt[a]};`);for(const[i,l]of Object.entries(n)){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase();o.push(` --ntd-${d}: ${l};`)}for(const[i,l]of Object.entries(s)){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase();o.push(` --ntd-animation-${d}: ${l};`)}return e.backgroundImage&&o.push(` --ntd-bg-image: url('${e.backgroundImage}');`),e.backgroundOverlay&&o.push(` --ntd-bg-overlay: ${e.backgroundOverlay};`),o.push("}"),o.join(`
11
- `)}function Ue(e,t=document.documentElement,r){const a=r?`[data-ntd-provider="${r}"]`:":root",n=r?`ntd-variant-styles-${r}`:"ntd-variant-styles",s=qe(e,a);let o=document.getElementById(n);o||(o=document.createElement("style"),o.id=n,document.head.appendChild(o)),o.textContent=s,r&&t.setAttribute("data-ntd-provider",r),t.dataset.ntdRadius=e.radius,t.dataset.ntdShadow=e.shadow,t.dataset.ntdFill=e.fill,t.dataset.ntdButton=e.buttonStyle,t.dataset.ntdInput=e.inputStyle,t.dataset.ntdCard=e.cardStyle,t.dataset.ntdAnimation=e.animation,t.dataset.ntdDensity=e.density,e.badgeStyle&&(t.dataset.ntdBadge=e.badgeStyle),e.tabStyle&&(t.dataset.ntdTab=e.tabStyle),e.toggleStyle&&(t.dataset.ntdToggle=e.toggleStyle),e.tooltipStyle&&(t.dataset.ntdTooltip=e.tooltipStyle),e.modalStyle&&(t.dataset.ntdModal=e.modalStyle),e.tableStyle&&(t.dataset.ntdTable=e.tableStyle),e.menuStyle&&(t.dataset.ntdMenu=e.menuStyle)}function Tt(e,t){const r=document.getElementById(`ntd-variant-styles-${e}`);r&&r.remove(),t&&t.removeAttribute("data-ntd-provider")}function q(e,t){if(e.startsWith("#")){const r=e.slice(1),a=parseInt(r,16),n=Math.max(0,Math.min(255,(a>>16&255)+t)),s=Math.max(0,Math.min(255,(a>>8&255)+t)),o=Math.max(0,Math.min(255,(a&255)+t));return`#${(n<<16|s<<8|o).toString(16).padStart(6,"0")}`}return e}function Gs(e,t){const r={...V,...t};return{...e,variantConfig:r}}const Ks=["default","minimal","rounded","sharp","glass","neumorphic","playful","enterprise","modern3d","brutalist","luxe","pill","flat","editorial","dashboard","softCloud","cosmic","corporate","bank","government","military","legal","medical","swiss","scandinavian","bauhaus","notebook","origami","watercolor","monochrome","paper","zen","terminal","hacker","retro8bit","synthwave","cyberpunk","steampunk","vapor","neon","windows95","material","fluent","cupertino","ant","bootstrap","chakra","notion","linear","vercel","candy","bubblegum","cartoon","kawaii","circus","gaming","kiddo","disco","clown"];function ne(e){return e==="default"?V:we[e]??V}const ke=c.createContext({displayStyle:"default",variantConfig:V,setDisplayStyle:()=>{}});function Js(){return c.useContext(ke)}function oe(e){const t=c.useContext(ke),r=e??t.displayStyle??"default",a=ne(r);return{style:r,config:a}}function Ys(e,t,r="var(--color-primary, #6366f1)"){const{config:a}=oe(t);return Lt(e,a,r)}function Qs(e,t){const{config:r}=oe(t);switch(e){case"button":return r.buttonStyle;case"input":return r.inputStyle;case"card":return r.cardStyle;case"badge":return r.badgeStyle??"solid";case"tab":return r.tabStyle??"underline";case"toggle":return r.toggleStyle??"default";case"tooltip":return r.tooltipStyle??"dark";case"modal":return r.modalStyle??"default";case"table":return r.tableStyle??"default";case"menu":return r.menuStyle??"default";default:return"default"}}function Zs(e){const{config:t}=oe(e),r=se[t.density];return{"--ntd-padding-x":r.paddingX,"--ntd-padding-y":r.paddingY,"--ntd-gap":r.gap,"--ntd-font-size":r.fontSize,"--ntd-line-height":r.lineHeight,"--ntd-input-height":r.inputHeight,"--ntd-button-height":r.buttonHeight}}function eo(e){const{config:t}=oe(e),r=ve[t.animation];return{"--ntd-anim-duration":r.duration,"--ntd-anim-easing":r.easing,"--ntd-hover-scale":r.hoverScale,"--ntd-click-scale":r.clickScale}}function Lt(e,t,r="#6366f1"){switch(e){case"button":return We(t.buttonStyle,r);case"input":return Ve(t.inputStyle);case"card":return Xe(t.cardStyle);case"badge":return Ct(t.badgeStyle??"solid",r);case"tab":return Mt(t.tabStyle??"underline",r);case"toggle":return At(t.toggleStyle??"default");case"tooltip":return Et(t.tooltipStyle??"dark");case"table":return Nt(t.tableStyle??"default");case"menu":return{};case"modal":return{};default:return{}}}function It(e){const t=ne(e);return{"data-ntd-display-style":e,"data-ntd-density":t.density,"data-ntd-animation":t.animation,"data-ntd-radius":t.radius,"data-ntd-button":t.buttonStyle,"data-ntd-input":t.inputStyle,"data-ntd-card":t.cardStyle}}const to=[{name:"default",label:"Default",description:"Standard balanced look",density:"normal",animation:"normal"},{name:"minimal",label:"Minimal",description:"Subtle shadows, underlined inputs",density:"normal",animation:"subtle"},{name:"rounded",label:"Rounded",description:"Large radii, pill tabs, filled inputs",density:"comfortable",animation:"normal"},{name:"sharp",label:"Sharp",description:"Zero radius, bordered cards, compact",density:"compact",animation:"subtle"},{name:"glass",label:"Glass",description:"Glassmorphism with frosted backdrops",density:"normal",animation:"normal"},{name:"neumorphic",label:"Neumorphic",description:"Soft raised and sunken surfaces",density:"comfortable",animation:"subtle"},{name:"playful",label:"Playful",description:"Gradients, bouncy animations, colorful",density:"comfortable",animation:"playful"},{name:"enterprise",label:"Enterprise",description:"Conservative, outlined, striped tables",density:"compact",animation:"subtle"},{name:"modern3d",label:"Modern 3D",description:"Deep shadows, 3D buttons, elevated",density:"normal",animation:"normal"},{name:"brutalist",label:"Brutalist",description:"Raw bold borders, no radius, no shadow",density:"normal",animation:"none"},{name:"luxe",label:"Luxe",description:"Premium feel with gradients and depth",density:"comfortable",animation:"normal"},{name:"pill",label:"Pill",description:"Full-radius pill shapes everywhere",density:"normal",animation:"normal"},{name:"flat",label:"Flat",description:"No shadows, filled inputs, soft badges",density:"normal",animation:"subtle"},{name:"editorial",label:"Editorial",description:"Clean typographic, paper cards",density:"comfortable",animation:"subtle"},{name:"dashboard",label:"Dashboard",description:"Data-dense, enclosed tabs, striped",density:"compact",animation:"subtle"},{name:"softCloud",label:"Soft Cloud",description:"Frosted glass, soft iOS-style toggles",density:"comfortable",animation:"normal"},{name:"cosmic",label:"Cosmic",description:"Mesh backgrounds, glowing shadows",density:"comfortable",animation:"dramatic"},{name:"corporate",label:"Corporate",description:"Safe, grey, no flair — boardroom ready",density:"compact",animation:"none"},{name:"bank",label:"Bank",description:"Ultra-conservative, heavy borders",density:"compact",animation:"none"},{name:"government",label:"Government",description:"Accessible, high-contrast, minimal",density:"normal",animation:"none"},{name:"military",label:"Military",description:"Dark, angular, no-nonsense tactical",density:"compact",animation:"none"},{name:"legal",label:"Legal",description:"Typographic, paper-like, document feel",density:"comfortable",animation:"none"},{name:"medical",label:"Medical",description:"Clean clinical, professional blue-toned",density:"normal",animation:"subtle"},{name:"swiss",label:"Swiss",description:"Grid-based, Helvetica spirit, precision",density:"normal",animation:"subtle"},{name:"scandinavian",label:"Scandinavian",description:"Warm, spacious, hygge-inspired calm",density:"spacious",animation:"subtle"},{name:"bauhaus",label:"Bauhaus",description:"Geometric, primary colours, strong lines",density:"normal",animation:"none"},{name:"notebook",label:"Notebook",description:"Handwritten feel, paper textures, ruled",density:"comfortable",animation:"subtle"},{name:"origami",label:"Origami",description:"Folded paper, subtle shadows, layered",density:"normal",animation:"normal"},{name:"watercolor",label:"Watercolor",description:"Soft bleeding edges, artistic, dreamy",density:"comfortable",animation:"normal"},{name:"monochrome",label:"Monochrome",description:"Pure black & white, typography focus",density:"normal",animation:"none"},{name:"paper",label:"Paper",description:"Minimal white, subtle shadows, like stationery",density:"comfortable",animation:"subtle"},{name:"zen",label:"Zen",description:"Ultra-minimal, whitespace, meditative calm",density:"spacious",animation:"subtle"},{name:"terminal",label:"Terminal",description:"Monospace, dark, retro-computing green",density:"compact",animation:"none"},{name:"hacker",label:"Hacker",description:"Matrix-style, neon green on black",density:"compact",animation:"subtle"},{name:"retro8bit",label:"8-bit Retro",description:"Pixel art, chunky borders, game boy era",density:"normal",animation:"none"},{name:"synthwave",label:"Synthwave",description:"80s synth, neon grids, chrome gradients",density:"normal",animation:"dramatic"},{name:"cyberpunk",label:"Cyberpunk",description:"Angular, neon, glitch aesthetics, dark",density:"compact",animation:"dramatic"},{name:"steampunk",label:"Steampunk",description:"Brass, gears, Victorian-era technology",density:"normal",animation:"subtle"},{name:"vapor",label:"Vaporwave",description:"80s/90s aesthetics, pink/teal gradients",density:"comfortable",animation:"playful"},{name:"neon",label:"Neon",description:"Bright glowing outlines on dark surfaces",density:"normal",animation:"dramatic"},{name:"windows95",label:"Windows 95",description:"Chunky beveled 3D, classic OS nostalgia",density:"compact",animation:"none"},{name:"material",label:"Material",description:"Google Material Design — depth & motion",density:"normal",animation:"normal"},{name:"fluent",label:"Fluent",description:"Microsoft Fluent — acrylic, reveal, depth",density:"normal",animation:"subtle"},{name:"cupertino",label:"Cupertino",description:"Apple iOS/macOS style — frosted, rounded",density:"comfortable",animation:"normal"},{name:"ant",label:"Ant Design",description:"Ant Design — clean, reliable, professional",density:"normal",animation:"subtle"},{name:"bootstrap",label:"Bootstrap",description:"Bootstrap-like — rounded, striped tables",density:"normal",animation:"subtle"},{name:"chakra",label:"Chakra",description:"Chakra UI — accessible, clean, modern",density:"normal",animation:"normal"},{name:"notion",label:"Notion",description:"Notion-like — text-focused, minimal chrome",density:"normal",animation:"subtle"},{name:"linear",label:"Linear",description:"Linear app — sleek, dark, polished",density:"compact",animation:"subtle"},{name:"vercel",label:"Vercel",description:"Vercel/Next.js — black/white, sharp, modern",density:"normal",animation:"subtle"},{name:"candy",label:"Candy",description:"Sweet pastels, rounded, sugar rush!",density:"comfortable",animation:"playful"},{name:"bubblegum",label:"Bubblegum",description:"Pink puffy bubbles, extremely round",density:"spacious",animation:"playful"},{name:"cartoon",label:"Cartoon",description:"Thick outlines, bold colours, exaggerated",density:"comfortable",animation:"playful"},{name:"kawaii",label:"Kawaii",description:"Cute, pastel, sparkly, UwU aesthetic",density:"spacious",animation:"dramatic"},{name:"circus",label:"Circus",description:"Bold stripes, loud, step right up!",density:"spacious",animation:"dramatic"},{name:"gaming",label:"Gaming",description:"Dark, neon accents, angular, RGB everything",density:"normal",animation:"dramatic"},{name:"kiddo",label:"Kiddo",description:"Colourful, puffy, child-friendly, big touch",density:"spacious",animation:"playful"},{name:"disco",label:"Disco",description:"Flashing, spinning, Saturday night fever 🕺",density:"comfortable",animation:"dramatic"},{name:"clown",label:"Clown",description:"Maximum chaos, honk honk, pure madness 🤡",density:"spacious",animation:"dramatic"}];function ro({enabled:e,readOnly:t,disabled:r}){const[a,n]=c.useState(!1),s=c.useRef(!1),o=c.useCallback(()=>{t||r||!e||(s.current=!0,n(!0))},[t,r,e]),i=c.useCallback(()=>{n(!1)},[]),l=c.useCallback(d=>{d&&s.current&&(s.current=!1,requestAnimationFrame(()=>{if(d.focus(),d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)try{d.select()}catch{}}))},[]);return c.useEffect(()=>{(t||r)&&a&&n(!1)},[t,r,a]),{isDisplay:!!e&&!a,enterEdit:o,exitEdit:i,autoFocusRef:l}}const ao=({value:e,placeholder:t,disabled:r,readOnly:a,onActivate:n,className:s,ariaLabel:o})=>{const i=e==null||e==="",l=d=>{r||a||(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),n())};return x.jsx("span",{role:"button",tabIndex:r?-1:0,className:`nice-display-value ${i?"nice-display-value--empty":""} ${r?"nice-display-value--disabled":""} ${a?"nice-display-value--readonly":""} ${s||""}`.trim(),onClick:()=>{!r&&!a&&n()},onKeyDown:l,"aria-label":o,"aria-disabled":r||void 0,children:i?t??"—":e})};function no(e){if(!e)return"";let t=e;return t=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),t=t.replace(/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,""),t=t.replace(/(href|src|action)\s*=\s*(?:"javascript:[^"]*"|'javascript:[^']*')/gi,'$1=""'),t=t.replace(/(href|src|action)\s*=\s*(?:"vbscript:[^"]*"|'vbscript:[^']*')/gi,'$1=""'),t=t.replace(/<\/?(iframe|object|embed|form)\b[^>]*>/gi,""),t}function so(e){const t=e.trim().toLowerCase();return!!(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("blob:")||t.startsWith("data:image/")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../"))}const Rt={"chevron-down":"M6 9l6 6 6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","chevron-right":"M9 6l6 6-6 6","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7",close:"M18 6L6 18M6 6l12 12",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",check:"M5 13l4 4L19 7",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 113 3L12 15l-4 1 1-4 9.5-9.5z",trash:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h5M20 20v-5h-5M20.49 9A9 9 0 005.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 013.51 15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z","sort-asc":"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12","sort-desc":"M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4",menu:"M4 6h16M4 12h16M4 18h16","more-vertical":"M12 5v.01M12 12v.01M12 19v.01","more-horizontal":"M5 12h.01M12 12h.01M19 12h.01",settings:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",eye:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M15 12a3 3 0 11-6 0 3 3 0 016 0z","eye-off":"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24 M1 1l22 22",lock:"M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2zm-3-4a4 4 0 10-8 0v4h8V7z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",help:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",users:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",grip:"M4 6h2m4 0h2m4 0h2M4 12h2m4 0h2m4 0h2M4 18h2m4 0h2m4 0h2",play:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z M21 12a9 9 0 11-18 0 9 9 0 0118 0z",pause:"M10 9v6m4-6v6m7-3a9 9 0 11-18 0 9 9 0 0118 0z",stop:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z",expand:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4",collapse:"M9 9V5m0 4H5m4 0L4 4m11 5h4m-4 0V5m0 4l5-5M9 15v4m0-4H5m4 0l-5 5m15-5h-4m4 0v4m0-4l-5 5","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},oo={xs:12,sm:16,md:20,lg:24,xl:32},Ge=c.createContext({}),io=({resolver:e,children:t})=>c.createElement(Ge.Provider,{value:{resolver:e}},t);function co({path:e,size:t,className:r,style:a,color:n,title:s,onClick:o}){return x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:n||"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:`nice-icon ${r||""}`,style:a,role:s?"img":"presentation","aria-label":s,"aria-hidden":!s,onClick:o,children:[s&&x.jsx("title",{children:s}),x.jsx("path",{d:e})]})}const zt=({name:e,size:t="md",className:r,style:a,color:n,title:s,onClick:o})=>{const{resolver:i}=c.useContext(Ge),l=typeof t=="number"?t:oo[t];if(i){const u=i(e,l);if(u)return x.jsx("span",{className:`nice-icon-wrap ${r||""}`,style:a,onClick:o,children:u})}const d=Rt[e];return d?x.jsx(co,{path:d,size:l,className:r,style:a,color:n,title:s,onClick:o}):null};function lo(){const{resolver:e}=c.useContext(Ge);return{renderIcon:c.useCallback((r,a="md")=>r==null?null:typeof r!="string"?r:c.createElement(zt,{name:r,size:a}),[e])}}const uo=Object.keys(Rt);function fo(){const[e,t]=c.useState(()=>typeof window<"u"?window.matchMedia("(pointer: coarse)").matches:!1);return c.useEffect(()=>{const r=window.matchMedia("(pointer: coarse)");t(r.matches);const a=n=>t(n.matches);return r.addEventListener("change",a),()=>r.removeEventListener("change",a)},[]),e}function mo(){const[e,t]=c.useState(()=>typeof window<"u"&&window.matchMedia("(pointer: coarse)").matches?"touch":"mouse");return c.useEffect(()=>{const r=()=>t("touch"),a=n=>{n.pointerType==="mouse"&&t("mouse")};return window.addEventListener("touchstart",r,{passive:!0,capture:!0}),window.addEventListener("pointerdown",a,{capture:!0}),()=>{window.removeEventListener("touchstart",r,{capture:!0}),window.removeEventListener("pointerdown",a,{capture:!0})}},[]),e}function po(e,t=500){const r=c.useRef(null),a=c.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]);return{onPointerDown:c.useCallback(s=>{s.pointerType==="touch"&&(a(),r.current=setTimeout(e,t))},[e,t,a]),onPointerUp:a,onPointerCancel:a}}function go(e){const t=c.useId();return e||t}function yo(e,t){const[r,a]=c.useState(e);return c.useEffect(()=>{const n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}function ho(e,t){c.useEffect(()=>{const r=a=>{!e.current||e.current.contains(a.target)||t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}function bo(e,t){c.useEffect(()=>{if(!t||!e.current)return;const r=e.current,a=document.activeElement,n=r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),s=n[0],o=n[n.length-1],i=l=>{l.key==="Tab"&&(l.shiftKey?document.activeElement===s&&(l.preventDefault(),o==null||o.focus()):document.activeElement===o&&(l.preventDefault(),s==null||s.focus()))};return s==null||s.focus(),r.addEventListener("keydown",i),()=>{var l;r.removeEventListener("keydown",i),(l=a==null?void 0:a.focus)==null||l.call(a)}},[e,t])}function So(e={}){const{defaultMode:t="system",storageKey:r="nice-color-mode",darkClass:a="nice-dark",lightClass:n="nice-light"}=e,[s,o]=c.useState(()=>typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[i,l]=c.useState(()=>{if(typeof window>"u")return t;const m=localStorage.getItem(r);return m==="light"||m==="dark"||m==="system"?m:t});c.useEffect(()=>{const m=window.matchMedia("(prefers-color-scheme: dark)"),b=y=>o(y.matches?"dark":"light");return m.addEventListener("change",b),()=>m.removeEventListener("change",b)},[]);const d=i==="system"?s==="dark":i==="dark";c.useEffect(()=>{const m=document.documentElement;return d?(m.classList.add(a),m.classList.remove(n)):(m.classList.add(n),m.classList.remove(a)),()=>{m.classList.remove(a,n)}},[d,a,n]),c.useEffect(()=>{localStorage.setItem(r,i)},[i,r]);const u=c.useCallback(()=>l("light"),[]),f=c.useCallback(()=>l("dark"),[]),p=c.useCallback(()=>l("system"),[]),g=c.useCallback(()=>l(m=>m==="system"?s==="dark"?"light":"dark":m==="dark"?"light":"dark"),[s]);return{isDark:d,mode:i,systemPreference:s,setLight:u,setDark:f,setSystem:p,toggle:g}}function xo(e,t={}){const{colorCount:r=5,quality:a=5}=t,[n,s]=c.useState(null),[o,i]=c.useState(!1),[l,d]=c.useState(null);return c.useEffect(()=>{if(!e){s(null);return}(async()=>{i(!0),d(null);try{let f;typeof e=="string"?(f=new Image,f.crossOrigin="anonymous",await new Promise((k,E)=>{f.onload=()=>k(),f.onerror=()=>E(new Error("Failed to load image")),f.src=e})):f=e;const p=document.createElement("canvas"),g=100,m=Math.min(g/f.width,g/f.height,1);p.width=f.width*m,p.height=f.height*m;const b=p.getContext("2d");if(!b)throw new Error("Canvas context unavailable");b.drawImage(f,0,0,p.width,p.height);const y=b.getImageData(0,0,p.width,p.height),S=[],h=Math.max(1,Math.floor(11-a));for(let k=0;k<y.data.length;k+=4*h){const E=y.data[k],T=y.data[k+1],N=y.data[k+2];if(y.data[k+3]>200){const I=(E+T+N)/3;I>20&&I<235&&S.push([E,T,N])}}if(S.length===0)throw new Error("No valid colors found in image");const w=vo(S,r).sort((k,E)=>{const T=Math.max(...k)-Math.min(...k);return Math.max(...E)-Math.min(...E)-T}),A=k=>"#"+k.map(E=>Math.round(E).toString(16).padStart(2,"0")).join(""),C=k=>(.299*k[0]+.587*k[1]+.114*k[2])/255>.5?"#000000":"#ffffff",M=w.slice();s({primary:A(M[0]||[100,100,100]),secondary:A(M[1]||M[0]||[150,150,150]),accent:A(w[0]||[100,100,100]),palette:M.map(A),primaryText:C(M[0]||[100,100,100]),secondaryText:C(M[1]||M[0]||[150,150,150])})}catch(f){d(f instanceof Error?f.message:"Unknown error"),s(null)}finally{i(!1)}})()},[e,r,a]),{colors:n,loading:o,error:l}}function vo(e,t,r=20){if(e.length<=t)return e;const a=[],n=new Set;for(;a.length<t;){const s=Math.floor(Math.random()*e.length);n.has(s)||(n.add(s),a.push([...e[s]]))}for(let s=0;s<r;s++){const o=Array.from({length:t},()=>[]);for(const l of e){let d=1/0,u=0;for(let f=0;f<t;f++){const p=Math.sqrt((l[0]-a[f][0])**2+(l[1]-a[f][1])**2+(l[2]-a[f][2])**2);p<d&&(d=p,u=f)}o[u].push(l)}let i=!1;for(let l=0;l<t;l++){if(o[l].length===0)continue;const d=[0,0,0];for(const u of o[l])d[0]+=u[0],d[1]+=u[1],d[2]+=u[2];d[0]/=o[l].length,d[1]/=o[l].length,d[2]/=o[l].length,(Math.abs(d[0]-a[l][0])>1||Math.abs(d[1]-a[l][1])>1||Math.abs(d[2]-a[l][2])>1)&&(i=!0),a[l]=d}if(!i)break}return a}function wo(e){const t=e.replace("#",""),r=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16),s=Math.max(r,a,n)/255,o=Math.min(r,a,n)/255;let i=0,l=0;const d=(s+o)/2;if(s!==o){const f=s-o;switch(l=d>.5?f/(2-s-o):f/(s+o),s){case r/255:i=((a/255-n/255)/f+(a<n?6:0))/6;break;case a/255:i=((n/255-r/255)/f+2)/6;break;case n/255:i=((r/255-a/255)/f+4)/6;break}}const u=(f,p,g)=>{const m=(w,A,C)=>(C<0&&(C+=1),C>1&&(C-=1),C<.16666666666666666?w+(A-w)*6*C:C<.5?A:C<.6666666666666666?w+(A-w)*(.6666666666666666-C)*6:w),b=g<.5?g*(1+p):g+p-g*p,y=2*g-b,S=Math.round(m(y,b,f+1/3)*255),h=Math.round(m(y,b,f)*255),v=Math.round(m(y,b,f-1/3)*255);return"#"+[S,h,v].map(w=>w.toString(16).padStart(2,"0")).join("")};return{lightest:u(i,Math.min(l*.3,1),.97),lighter:u(i,Math.min(l*.5,1),.9),light:u(i,Math.min(l*.7,1),.8),base:e,dark:u(i,Math.min(l*1.1,1),Math.max(d-.15,.1)),darker:u(i,Math.min(l*1.2,1),Math.max(d-.25,.05)),darkest:u(i,Math.min(l*1.3,1),Math.max(d-.35,.02)),text:d>.5?"#000000":"#ffffff",textInverse:d>.5?"#ffffff":"#000000"}}const ee={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},Y=["xs","sm","md","lg","xl","xxl"];function ie(e=ee){const[t,r]=c.useState(()=>typeof window<"u"?window.innerWidth:e.lg);c.useEffect(()=>{let i;const l=()=>{i&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>r(window.innerWidth))};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i&&cancelAnimationFrame(i)}},[]);const a=c.useMemo(()=>{for(let i=Y.length-1;i>=0;i--)if(t>=e[Y[i]])return Y[i];return"xs"},[t,e]),n=c.useCallback(i=>t>=e[i],[t,e]),s=c.useCallback(i=>t<e[i],[t,e]),o=c.useCallback((i,l)=>t>=e[i]&&t<e[l],[t,e]);return{current:a,width:t,isAbove:n,isBelow:s,isBetween:o,isMobile:t<e.md,isTablet:t>=e.md&&t<e.lg,isDesktop:t>=e.lg}}function be(e){const[t,r]=c.useState(()=>typeof window>"u"?!1:window.matchMedia(e).matches);return c.useEffect(()=>{const a=window.matchMedia(e);r(a.matches);const n=s=>r(s.matches);return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},[e]),t}function ko(e,t=ee){const{current:r}=ie(t);return c.useMemo(()=>{if(e==null||typeof e!="object"||Array.isArray(e))return e;const a=e,n=Y.indexOf(r);for(let s=n;s>=0;s--){const o=a[Y[s]];if(o!==void 0)return o}for(let s=n+1;s<Y.length;s++){const o=a[Y[s]];if(o!==void 0)return o}},[e,r])}function Co(e){const[t,r]=c.useState({width:0,height:0});return c.useEffect(()=>{const a=e.current;if(!a)return;const n=new ResizeObserver(([s])=>{const{width:o,height:i}=s.contentRect;r({width:o,height:i})});return n.observe(a),()=>n.disconnect()},[e]),t}function Ft(){const{width:e,isMobile:t}=ie(),r=c.useMemo(()=>typeof window>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0,[]),a=be("(prefers-reduced-motion: reduce)"),n=be("(orientation: portrait)"),s=c.useMemo(()=>typeof window>"u"?1:window.devicePixelRatio||1,[]),o=t&&r,i=!t&&e<ee.lg&&r,l=!r||e>=ee.lg;return{isMobile:o||i,isTouch:r,isPhone:o,isTablet:i,isDesktop:l,prefersReducedMotion:a,isPortrait:n,pixelRatio:s}}function Mo(e={}){const{forceVariant:t,breakpoints:r=ee}=e,{isMobile:a,isTablet:n,isDesktop:s}=ie(r),o=Ft();return t||(o.isPhone?"mobile":o.isTablet?"tablet":o.isDesktop?"desktop":a?"mobile":n?"tablet":"desktop")}function Ao(e={}){const{showAt:t,hideAt:r,mobileOnly:a,desktopOnly:n,tabletOnly:s}=e,{current:o,isMobile:i,isTablet:l,isDesktop:d}=ie();return a?i:n?d:s?l:r&&r.includes(o)?!1:t?t.includes(o):!0}function Eo(){return be("(orientation: portrait)")?"portrait":"landscape"}function No(){const[e,t]=c.useState({top:0,right:0,bottom:0,left:0});return c.useEffect(()=>{if(typeof window>"u"||!CSS.supports("padding-top","env(safe-area-inset-top)"))return;const r=()=>{getComputedStyle(document.documentElement);const a=document.createElement("div");a.style.cssText=`
10
+ */const ae={none:{xs:"0",sm:"0",md:"0",lg:"0",xl:"0",full:"0"},sm:{xs:"2px",sm:"3px",md:"4px",lg:"6px",xl:"8px",full:"9999px"},md:{xs:"4px",sm:"6px",md:"8px",lg:"12px",xl:"16px",full:"9999px"},lg:{xs:"6px",sm:"10px",md:"14px",lg:"20px",xl:"28px",full:"9999px"},xl:{xs:"10px",sm:"16px",md:"24px",lg:"32px",xl:"48px",full:"9999px"},"2xl":{xs:"16px",sm:"24px",md:"32px",lg:"48px",xl:"64px",full:"9999px"},full:{xs:"9999px",sm:"9999px",md:"9999px",lg:"9999px",xl:"9999px",full:"9999px"}},he={none:"none",subtle:"0 1px 2px 0 var(--nice-overlay-5, rgba(0, 0, 0, 0.05))",md:"0 4px 6px -1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), 0 2px 4px -2px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",lg:"0 10px 15px -3px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), 0 4px 6px -4px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",xl:"0 20px 25px -5px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), 0 8px 10px -6px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",inner:"inset 0 2px 4px 0 var(--nice-overlay-5, rgba(0, 0, 0, 0.05))",colored:"0 4px 14px 0 var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.4))",glow:"0 0 20px var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.5))"},Et={none:"none",subtle:"0 1px 2px 0 var(--nice-overlay-20, rgba(0, 0, 0, 0.2))",md:"0 4px 6px -1px var(--nice-overlay-30, rgba(0, 0, 0, 0.3)), 0 2px 4px -2px var(--nice-overlay-20, rgba(0, 0, 0, 0.2))",lg:"0 10px 15px -3px var(--nice-overlay-40, rgba(0, 0, 0, 0.4)), 0 4px 6px -4px var(--nice-overlay-30, rgba(0, 0, 0, 0.3))",xl:"0 20px 25px -5px var(--nice-overlay-50, rgba(0, 0, 0, 0.5)), 0 8px 10px -6px var(--nice-overlay-40, rgba(0, 0, 0, 0.4))",inner:"inset 0 2px 4px 0 var(--nice-overlay-30, rgba(0, 0, 0, 0.3))",colored:"0 4px 14px 0 var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.5))",glow:"0 0 30px var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.6))"},oe={compact:{paddingX:"8px",paddingY:"4px",gap:"4px",fontSize:"13px",lineHeight:"1.3",inputHeight:"28px",buttonHeight:"28px"},normal:{paddingX:"12px",paddingY:"8px",gap:"8px",fontSize:"14px",lineHeight:"1.5",inputHeight:"36px",buttonHeight:"36px"},comfortable:{paddingX:"16px",paddingY:"12px",gap:"12px",fontSize:"15px",lineHeight:"1.6",inputHeight:"44px",buttonHeight:"44px"},spacious:{paddingX:"24px",paddingY:"16px",gap:"16px",fontSize:"16px",lineHeight:"1.7",inputHeight:"52px",buttonHeight:"52px"}},we={none:{duration:"0ms",easing:"linear",hoverScale:"1",clickScale:"1",enterAnimation:"none",exitAnimation:"none"},subtle:{duration:"150ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)",hoverScale:"1.01",clickScale:"0.99",enterAnimation:"ntd-fade-in 150ms ease-out",exitAnimation:"ntd-fade-out 100ms ease-in"},normal:{duration:"200ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)",hoverScale:"1.02",clickScale:"0.98",enterAnimation:"ntd-slide-up 200ms ease-out",exitAnimation:"ntd-slide-down 150ms ease-in"},playful:{duration:"300ms",easing:"cubic-bezier(0.34, 1.56, 0.64, 1)",hoverScale:"1.05",clickScale:"0.95",enterAnimation:"ntd-bounce-in 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",exitAnimation:"ntd-bounce-out 200ms ease-in"},dramatic:{duration:"400ms",easing:"cubic-bezier(0.68, -0.55, 0.265, 1.55)",hoverScale:"1.08",clickScale:"0.92",enterAnimation:"ntd-zoom-in 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55)",exitAnimation:"ntd-zoom-out 250ms ease-in"}};function rs(e,t,r){switch(e){case"solid":return{background:t};case"gradient-linear":return{background:`linear-gradient(135deg, ${t} 0%, ${r||U(t,-20)} 100%)`};case"gradient-radial":return{background:`radial-gradient(circle at top left, ${t} 0%, ${r||U(t,-30)} 100%)`};case"glass":return{background:"var(--nice-overlay-light-10, rgba(255, 255, 255, 0.1))",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",border:"1px solid var(--nice-overlay-light-20, rgba(255, 255, 255, 0.2))"};case"frosted":return{background:"var(--nice-overlay-light-70, rgba(255, 255, 255, 0.7))",backdropFilter:"blur(20px) saturate(180%)",WebkitBackdropFilter:"blur(20px) saturate(180%)",border:"1px solid var(--nice-overlay-light-30, rgba(255, 255, 255, 0.3))"};case"pattern":return{backgroundImage:`url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='${encodeURIComponent(t)}' fill-opacity='0.05'%3E%3Cpath d='M0 0h20L10 10z'/%3E%3C/g%3E%3C/svg%3E")`,backgroundColor:"var(--ntd-bg-surface)"};case"texture":return{backgroundImage:`url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E")`,backgroundBlendMode:"overlay",backgroundColor:t};case"gradient-conic":return{background:`conic-gradient(from 180deg, ${t}, ${r||U(t,-20)}, ${t})`};case"mesh":return{background:`radial-gradient(at 40% 20%, ${t} 0%, transparent 50%), radial-gradient(at 80% 0%, ${r||U(t,30)} 0%, transparent 50%), radial-gradient(at 0% 50%, ${U(t,-20)} 0%, transparent 50%)`,backgroundColor:"var(--ntd-bg-surface, #fff)"};default:return{background:t}}}function Ve(e,t){const r={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"flat":return{...r,background:t,boxShadow:"none",border:"none"};case"raised":return{...r,background:t,boxShadow:"0 2px 4px var(--nice-overlay-20, rgba(0, 0, 0, 0.2))",border:"none"};case"outlined":return{...r,background:"transparent",border:`2px solid ${t}`,color:t};case"ghost":return{...r,background:"transparent",border:"none",color:t};case"soft":return{...r,background:`${t}20`,border:"none",color:t};case"gradient":return{...r,background:`linear-gradient(135deg, ${t} 0%, ${U(t,-20)} 100%)`,border:"none",boxShadow:`0 4px 14px ${t}40`};case"3d":return{...r,background:t,border:"none",boxShadow:`0 4px 0 ${U(t,-30)}, 0 6px 10px var(--nice-overlay-20, rgba(0, 0, 0, 0.2))`,transform:"translateY(-2px)"};case"neumorphic":return{...r,background:"var(--ntd-bg-surface)",border:"none",boxShadow:"5px 5px 10px var(--nice-overlay-10, rgba(0, 0, 0, 0.1)), -5px -5px 10px var(--nice-overlay-light-80, rgba(255, 255, 255, 0.8))",color:t};case"pill":return{...r,background:t,border:"none",borderRadius:"9999px",paddingLeft:"24px",paddingRight:"24px"};case"link":return{...r,background:"transparent",border:"none",color:t,textDecoration:"underline",padding:"0"};case"brutal":return{...r,background:t,border:"3px solid var(--nice-text, #000)",boxShadow:"4px 4px 0 var(--nice-text, #000)",borderRadius:"0"};default:return r}}function Xe(e){const t={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"bordered":return{...t,background:"var(--ntd-bg-input, var(--bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",borderRadius:"var(--ntd-radius-md, 8px)"};case"filled":return{...t,background:"var(--ntd-bg-input-filled, var(--bg-secondary, rgba(255,255,255,0.06)))",border:"2px solid transparent",borderRadius:"var(--ntd-radius-md, 8px)"};case"underlined":return{...t,background:"transparent",border:"none",borderBottom:"2px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",borderRadius:"0",paddingLeft:"0",paddingRight:"0"};case"floating":return{...t,background:"var(--ntd-bg-input, var(--bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",borderRadius:"var(--ntd-radius-md, 8px)",paddingTop:"20px"};case"soft":return{...t,background:"var(--ntd-color-primary-alpha, rgba(99, 102, 241, 0.1))",border:"none",borderRadius:"var(--ntd-radius-md, 8px)"};case"neumorphic":return{...t,background:"var(--ntd-bg-surface, var(--bg-primary, transparent))",border:"none",borderRadius:"var(--ntd-radius-md, 8px)",boxShadow:"inset 3px 3px 6px var(--nice-overlay-20, rgba(0, 0, 0, 0.2)), inset -3px -3px 6px var(--nice-overlay-light-5, rgba(255, 255, 255, 0.05))"};case"pill":return{...t,background:"var(--ntd-bg-input, var(--bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",borderRadius:"9999px",paddingLeft:"20px",paddingRight:"20px"};case"flush":return{...t,background:"transparent",border:"none",borderRadius:"0",padding:"0",outline:"none"};default:return t}}function Ue(e){const t={transition:"all var(--ntd-transition-duration, 200ms) var(--ntd-transition-easing, ease)"};switch(e){case"flat":return{...t,background:"var(--ntd-bg-surface, var(--bg-secondary, transparent))",border:"none",boxShadow:"none"};case"elevated":return{...t,background:"var(--ntd-bg-surface, var(--bg-secondary, transparent))",border:"none",boxShadow:"var(--ntd-shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1))"};case"bordered":return{...t,background:"var(--ntd-bg-surface, var(--bg-secondary, transparent))",border:"1px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",boxShadow:"none"};case"glass":return{...t,background:"var(--nice-overlay-light-10, rgba(255, 255, 255, 0.1))",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",border:"1px solid var(--nice-overlay-light-20, rgba(255, 255, 255, 0.2))",boxShadow:"0 8px 32px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))"};case"gradient":return{...t,background:"linear-gradient(135deg, var(--ntd-bg-surface) 0%, var(--ntd-bg-elevated) 100%)",border:"none",boxShadow:"var(--ntd-shadow-md)"};case"neumorphic":return{...t,background:"var(--ntd-bg-surface, var(--bg-secondary, transparent))",border:"none",boxShadow:"8px 8px 16px var(--nice-overlay-20, rgba(0, 0, 0, 0.2)), -8px -8px 16px var(--nice-overlay-light-5, rgba(255, 255, 255, 0.05))"};case"outlined":return{...t,background:"transparent",border:"2px solid var(--ntd-border-color, var(--border-color, #3a3a3a))",boxShadow:"none"};case"paper":return{...t,background:"var(--ntd-bg-surface, var(--bg-secondary, transparent))",border:"none",boxShadow:"2px 3px 8px var(--nice-overlay-6, rgba(0, 0, 0, 0.06))",borderRadius:"2px"};default:return t}}function Nt(e,t){const r={display:"inline-flex",alignItems:"center",fontSize:"0.75rem",fontWeight:"600",lineHeight:"1"};switch(e){case"solid":return{...r,background:t,color:"var(--nice-bg, #fff)",padding:"2px 8px",borderRadius:"4px"};case"soft":return{...r,background:`${t}20`,color:t,padding:"2px 8px",borderRadius:"4px"};case"outlined":return{...r,background:"transparent",border:`1px solid ${t}`,color:t,padding:"2px 8px",borderRadius:"4px"};case"dot":return{...r,background:t,width:"8px",height:"8px",borderRadius:"50%",padding:"0"};case"pill":return{...r,background:t,color:"var(--nice-bg, #fff)",padding:"2px 12px",borderRadius:"9999px"};case"gradient":return{...r,background:`linear-gradient(135deg, ${t}, ${U(t,-20)})`,color:"var(--nice-bg, #fff)",padding:"2px 8px",borderRadius:"4px"};default:return r}}function Tt(e,t){switch(e){case"underline":return{borderBottom:`2px solid ${t}`,background:"transparent",color:t};case"pills":return{background:t,color:"var(--nice-bg, #fff)",borderRadius:"9999px",padding:"6px 16px"};case"enclosed":return{background:"var(--ntd-bg-surface,#fff)",border:"1px solid var(--ntd-border-color,#e5e7eb)",borderBottom:"none",borderRadius:"8px 8px 0 0"};case"soft":return{background:`${t}15`,color:t,borderRadius:"6px",padding:"6px 16px"};case"lifted":return{background:"var(--ntd-bg-surface,#fff)",boxShadow:"0 -2px 8px var(--nice-overlay-6, rgba(0, 0, 0, 0.06))",borderRadius:"8px 8px 0 0",transform:"translateY(-2px)"};case"bordered":return{border:`2px solid ${t}`,borderBottom:"none",background:"transparent",borderRadius:"8px 8px 0 0"};default:return{}}}function Lt(e){switch(e){case"default":return{borderRadius:"12px",width:"44px",height:"24px"};case"ios":return{borderRadius:"16px",width:"51px",height:"31px",boxShadow:"inset 0 0 0 1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))"};case"flat":return{borderRadius:"4px",width:"40px",height:"22px"};case"pill":return{borderRadius:"9999px",width:"48px",height:"24px"};case"square":return{borderRadius:"0",width:"40px",height:"22px"};default:return{}}}function It(e){switch(e){case"dark":return{background:"var(--nice-text, #1f2937)",color:"var(--nice-bg-secondary, #f9fafb)",borderRadius:"6px",padding:"6px 12px",boxShadow:"0 4px 12px var(--nice-overlay-30, rgba(0, 0, 0, 0.3))"};case"light":return{background:"var(--nice-bg, #fff)",color:"var(--nice-text, #374151)",borderRadius:"6px",padding:"6px 12px",boxShadow:"0 4px 12px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",border:"1px solid var(--nice-border, #e5e7eb)"};case"primary":return{background:"var(--color-primary,#6366f1)",color:"var(--nice-bg, #fff)",borderRadius:"6px",padding:"6px 12px"};case"glass":return{background:"var(--nice-overlay-light-15, rgba(255, 255, 255, 0.15))",backdropFilter:"blur(12px)",color:"var(--nice-bg, #fff)",borderRadius:"8px",padding:"8px 14px"};case"bordered":return{background:"var(--nice-bg, #fff)",color:"var(--nice-text, #374151)",borderRadius:"6px",padding:"6px 12px",border:"2px solid var(--color-primary,#6366f1)"};default:return{}}}function Rt(e){switch(e){case"default":return{borderCollapse:"collapse"};case"striped":return{borderCollapse:"collapse"};case"bordered":return{border:"1px solid var(--ntd-border-color,#e5e7eb)",borderCollapse:"collapse"};case"compact":return{borderCollapse:"collapse",fontSize:"0.8125rem"};case"hoverable":return{borderCollapse:"collapse"};case"minimal":return{borderCollapse:"collapse",borderBottom:"1px solid var(--ntd-border-color,#e5e7eb)"};default:return{}}}const V={radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",modalStyle:"default",tableStyle:"default",menuStyle:"default",animation:"normal",density:"normal"},ke={minimal:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"flat",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},rounded:{radius:"xl",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"comfortable"},sharp:{radius:"none",shadow:"lg",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"subtle",density:"compact"},glass:{radius:"lg",shadow:"none",fill:"glass",buttonStyle:"ghost",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"normal"},neumorphic:{radius:"lg",shadow:"none",fill:"solid",buttonStyle:"neumorphic",inputStyle:"neumorphic",cardStyle:"neumorphic",badgeStyle:"soft",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"default",animation:"subtle",density:"comfortable"},playful:{radius:"2xl",shadow:"colored",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"comfortable"},enterprise:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"compact"},modern3d:{radius:"lg",shadow:"xl",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"gradient",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},brutalist:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},luxe:{radius:"sm",shadow:"lg",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"floating",cardStyle:"elevated",badgeStyle:"gradient",tabStyle:"underline",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"hoverable",animation:"normal",density:"comfortable"},pill:{radius:"full",shadow:"md",fill:"solid",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},flat:{radius:"md",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"filled",cardStyle:"flat",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},editorial:{radius:"none",shadow:"subtle",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},dashboard:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"compact"},softCloud:{radius:"xl",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"normal",density:"comfortable"},cosmic:{radius:"lg",shadow:"glow",fill:"mesh",buttonStyle:"gradient",inputStyle:"soft",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"comfortable"},corporate:{radius:"sm",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"none",density:"compact"},bank:{radius:"none",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"none",density:"compact"},government:{radius:"sm",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"flat",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"none",density:"normal"},military:{radius:"none",shadow:"lg",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"dark",tableStyle:"bordered",animation:"none",density:"compact"},legal:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"none",density:"comfortable"},medical:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"enclosed",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"striped",animation:"subtle",density:"normal"},swiss:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},scandinavian:{radius:"lg",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"filled",cardStyle:"flat",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"spacious"},bauhaus:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},notebook:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},terminal:{radius:"none",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"compact"},hacker:{radius:"none",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"subtle",density:"compact"},retro8bit:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},vapor:{radius:"lg",shadow:"glow",fill:"gradient-linear",buttonStyle:"gradient",inputStyle:"soft",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"hoverable",animation:"playful",density:"comfortable"},synthwave:{radius:"md",shadow:"glow",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"filled",cardStyle:"glass",badgeStyle:"gradient",tabStyle:"lifted",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"normal"},cyberpunk:{radius:"none",shadow:"glow",fill:"gradient-linear",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"compact"},steampunk:{radius:"sm",shadow:"inner",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"bordered",tableStyle:"bordered",animation:"subtle",density:"normal"},origami:{radius:"none",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"lifted",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"default",animation:"normal",density:"normal"},watercolor:{radius:"2xl",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"soft",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"comfortable"},neon:{radius:"md",shadow:"glow",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"default",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"normal"},candy:{radius:"2xl",shadow:"colored",fill:"gradient-linear",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"comfortable"},bubblegum:{radius:"full",shadow:"colored",fill:"gradient-radial",buttonStyle:"pill",inputStyle:"pill",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"spacious"},cartoon:{radius:"xl",shadow:"colored",fill:"solid",buttonStyle:"brutal",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"pill",tooltipStyle:"bordered",tableStyle:"bordered",animation:"playful",density:"comfortable"},kawaii:{radius:"full",shadow:"colored",fill:"gradient-linear",buttonStyle:"pill",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"dramatic",density:"spacious"},circus:{radius:"full",shadow:"colored",fill:"gradient-conic",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"striped",animation:"dramatic",density:"spacious"},paper:{radius:"sm",shadow:"md",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"paper",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"comfortable"},zen:{radius:"md",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"underlined",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"spacious"},monochrome:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"outlined",badgeStyle:"outlined",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"normal"},windows95:{radius:"none",shadow:"none",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"solid",tabStyle:"enclosed",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"none",density:"compact"},material:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},fluent:{radius:"md",shadow:"subtle",fill:"frosted",buttonStyle:"soft",inputStyle:"filled",cardStyle:"glass",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"hoverable",animation:"subtle",density:"normal"},cupertino:{radius:"xl",shadow:"md",fill:"frosted",buttonStyle:"soft",inputStyle:"filled",cardStyle:"glass",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"ios",tooltipStyle:"glass",tableStyle:"minimal",animation:"normal",density:"comfortable"},ant:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"subtle",density:"normal"},bootstrap:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"pill",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"striped",animation:"subtle",density:"normal"},chakra:{radius:"md",shadow:"md",fill:"solid",buttonStyle:"raised",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"enclosed",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"default",animation:"normal",density:"normal"},notion:{radius:"sm",shadow:"none",fill:"solid",buttonStyle:"ghost",inputStyle:"flush",cardStyle:"flat",badgeStyle:"soft",tabStyle:"underline",toggleStyle:"flat",tooltipStyle:"light",tableStyle:"minimal",animation:"subtle",density:"normal"},linear:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"soft",inputStyle:"filled",cardStyle:"elevated",badgeStyle:"soft",tabStyle:"soft",toggleStyle:"ios",tooltipStyle:"dark",tableStyle:"hoverable",animation:"subtle",density:"compact"},vercel:{radius:"md",shadow:"subtle",fill:"solid",buttonStyle:"outlined",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"outlined",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",tableStyle:"minimal",animation:"subtle",density:"normal"},gaming:{radius:"none",shadow:"glow",fill:"gradient-linear",buttonStyle:"3d",inputStyle:"bordered",cardStyle:"bordered",badgeStyle:"gradient",tabStyle:"bordered",toggleStyle:"square",tooltipStyle:"bordered",tableStyle:"bordered",animation:"dramatic",density:"normal"},kiddo:{radius:"2xl",shadow:"colored",fill:"gradient-radial",buttonStyle:"pill",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"pill",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"hoverable",animation:"playful",density:"spacious"},disco:{radius:"full",shadow:"glow",fill:"gradient-conic",buttonStyle:"gradient",inputStyle:"filled",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"glass",tableStyle:"hoverable",animation:"dramatic",density:"comfortable"},clown:{radius:"full",shadow:"colored",fill:"gradient-conic",buttonStyle:"brutal",inputStyle:"pill",cardStyle:"gradient",badgeStyle:"gradient",tabStyle:"pills",toggleStyle:"pill",tooltipStyle:"primary",tableStyle:"striped",animation:"dramatic",density:"spacious"}};function qe(e,t=":root"){const r=ae[e.radius],a=e.shadow,n=oe[e.density],o=we[e.animation],s=[`${t} {`];for(const[i,l]of Object.entries(r))s.push(` --ntd-radius-${i}: ${l};`);s.push(` --ntd-shadow: ${he[a]};`),s.push(` --ntd-shadow-dark: ${Et[a]};`);for(const[i,l]of Object.entries(n)){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase();s.push(` --ntd-${d}: ${l};`)}for(const[i,l]of Object.entries(o)){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase();s.push(` --ntd-animation-${d}: ${l};`)}return e.backgroundImage&&s.push(` --ntd-bg-image: url('${e.backgroundImage}');`),e.backgroundOverlay&&s.push(` --ntd-bg-overlay: ${e.backgroundOverlay};`),s.push("}"),s.join(`
11
+ `)}function Ge(e,t=document.documentElement,r){const a=r?`[data-ntd-provider="${r}"]`:":root",n=r?`ntd-variant-styles-${r}`:"ntd-variant-styles",o=qe(e,a);let s=document.getElementById(n);s||(s=document.createElement("style"),s.id=n,document.head.appendChild(s)),s.textContent=o,r&&t.setAttribute("data-ntd-provider",r),t.dataset.ntdRadius=e.radius,t.dataset.ntdShadow=e.shadow,t.dataset.ntdFill=e.fill,t.dataset.ntdButton=e.buttonStyle,t.dataset.ntdInput=e.inputStyle,t.dataset.ntdCard=e.cardStyle,t.dataset.ntdAnimation=e.animation,t.dataset.ntdDensity=e.density,e.badgeStyle&&(t.dataset.ntdBadge=e.badgeStyle),e.tabStyle&&(t.dataset.ntdTab=e.tabStyle),e.toggleStyle&&(t.dataset.ntdToggle=e.toggleStyle),e.tooltipStyle&&(t.dataset.ntdTooltip=e.tooltipStyle),e.modalStyle&&(t.dataset.ntdModal=e.modalStyle),e.tableStyle&&(t.dataset.ntdTable=e.tableStyle),e.menuStyle&&(t.dataset.ntdMenu=e.menuStyle)}function zt(e,t){const r=document.getElementById(`ntd-variant-styles-${e}`);r&&r.remove(),t&&t.removeAttribute("data-ntd-provider")}function U(e,t){if(e.startsWith("#")){const r=e.slice(1),a=parseInt(r,16),n=Math.max(0,Math.min(255,(a>>16&255)+t)),o=Math.max(0,Math.min(255,(a>>8&255)+t)),s=Math.max(0,Math.min(255,(a&255)+t));return`#${(n<<16|o<<8|s).toString(16).padStart(6,"0")}`}return e}function as(e,t){const r={...V,...t};return{...e,variantConfig:r}}const ns=["default","minimal","rounded","sharp","glass","neumorphic","playful","enterprise","modern3d","brutalist","luxe","pill","flat","editorial","dashboard","softCloud","cosmic","corporate","bank","government","military","legal","medical","swiss","scandinavian","bauhaus","notebook","origami","watercolor","monochrome","paper","zen","terminal","hacker","retro8bit","synthwave","cyberpunk","steampunk","vapor","neon","windows95","material","fluent","cupertino","ant","bootstrap","chakra","notion","linear","vercel","candy","bubblegum","cartoon","kawaii","circus","gaming","kiddo","disco","clown"];function ne(e){return e==="default"?V:ke[e]??V}const Ce=c.createContext({displayStyle:"default",variantConfig:V,setDisplayStyle:()=>{}});function os(){return c.useContext(Ce)}function se(e){const t=c.useContext(Ce),r=e??t.displayStyle??"default",a=ne(r);return{style:r,config:a}}function ss(e,t,r="var(--color-primary, #6366f1)"){const{config:a}=se(t);return Ft(e,a,r)}function is(e,t){const{config:r}=se(t);switch(e){case"button":return r.buttonStyle;case"input":return r.inputStyle;case"card":return r.cardStyle;case"badge":return r.badgeStyle??"solid";case"tab":return r.tabStyle??"underline";case"toggle":return r.toggleStyle??"default";case"tooltip":return r.tooltipStyle??"dark";case"modal":return r.modalStyle??"default";case"table":return r.tableStyle??"default";case"menu":return r.menuStyle??"default";default:return"default"}}function cs(e){const{config:t}=se(e),r=oe[t.density];return{"--ntd-padding-x":r.paddingX,"--ntd-padding-y":r.paddingY,"--ntd-gap":r.gap,"--ntd-font-size":r.fontSize,"--ntd-line-height":r.lineHeight,"--ntd-input-height":r.inputHeight,"--ntd-button-height":r.buttonHeight}}function ls(e){const{config:t}=se(e),r=we[t.animation];return{"--ntd-anim-duration":r.duration,"--ntd-anim-easing":r.easing,"--ntd-hover-scale":r.hoverScale,"--ntd-click-scale":r.clickScale}}function Ft(e,t,r="var(--nice-info, #6366f1)"){switch(e){case"button":return Ve(t.buttonStyle,r);case"input":return Xe(t.inputStyle);case"card":return Ue(t.cardStyle);case"badge":return Nt(t.badgeStyle??"solid",r);case"tab":return Tt(t.tabStyle??"underline",r);case"toggle":return Lt(t.toggleStyle??"default");case"tooltip":return It(t.tooltipStyle??"dark");case"table":return Rt(t.tableStyle??"default");case"menu":return{};case"modal":return{};default:return{}}}function Pt(e){const t=ne(e);return{"data-ntd-display-style":e,"data-ntd-density":t.density,"data-ntd-animation":t.animation,"data-ntd-radius":t.radius,"data-ntd-button":t.buttonStyle,"data-ntd-input":t.inputStyle,"data-ntd-card":t.cardStyle}}const ds=[{name:"default",label:"Default",description:"Standard balanced look",density:"normal",animation:"normal"},{name:"minimal",label:"Minimal",description:"Subtle shadows, underlined inputs",density:"normal",animation:"subtle"},{name:"rounded",label:"Rounded",description:"Large radii, pill tabs, filled inputs",density:"comfortable",animation:"normal"},{name:"sharp",label:"Sharp",description:"Zero radius, bordered cards, compact",density:"compact",animation:"subtle"},{name:"glass",label:"Glass",description:"Glassmorphism with frosted backdrops",density:"normal",animation:"normal"},{name:"neumorphic",label:"Neumorphic",description:"Soft raised and sunken surfaces",density:"comfortable",animation:"subtle"},{name:"playful",label:"Playful",description:"Gradients, bouncy animations, colorful",density:"comfortable",animation:"playful"},{name:"enterprise",label:"Enterprise",description:"Conservative, outlined, striped tables",density:"compact",animation:"subtle"},{name:"modern3d",label:"Modern 3D",description:"Deep shadows, 3D buttons, elevated",density:"normal",animation:"normal"},{name:"brutalist",label:"Brutalist",description:"Raw bold borders, no radius, no shadow",density:"normal",animation:"none"},{name:"luxe",label:"Luxe",description:"Premium feel with gradients and depth",density:"comfortable",animation:"normal"},{name:"pill",label:"Pill",description:"Full-radius pill shapes everywhere",density:"normal",animation:"normal"},{name:"flat",label:"Flat",description:"No shadows, filled inputs, soft badges",density:"normal",animation:"subtle"},{name:"editorial",label:"Editorial",description:"Clean typographic, paper cards",density:"comfortable",animation:"subtle"},{name:"dashboard",label:"Dashboard",description:"Data-dense, enclosed tabs, striped",density:"compact",animation:"subtle"},{name:"softCloud",label:"Soft Cloud",description:"Frosted glass, soft iOS-style toggles",density:"comfortable",animation:"normal"},{name:"cosmic",label:"Cosmic",description:"Mesh backgrounds, glowing shadows",density:"comfortable",animation:"dramatic"},{name:"corporate",label:"Corporate",description:"Safe, grey, no flair — boardroom ready",density:"compact",animation:"none"},{name:"bank",label:"Bank",description:"Ultra-conservative, heavy borders",density:"compact",animation:"none"},{name:"government",label:"Government",description:"Accessible, high-contrast, minimal",density:"normal",animation:"none"},{name:"military",label:"Military",description:"Dark, angular, no-nonsense tactical",density:"compact",animation:"none"},{name:"legal",label:"Legal",description:"Typographic, paper-like, document feel",density:"comfortable",animation:"none"},{name:"medical",label:"Medical",description:"Clean clinical, professional blue-toned",density:"normal",animation:"subtle"},{name:"swiss",label:"Swiss",description:"Grid-based, Helvetica spirit, precision",density:"normal",animation:"subtle"},{name:"scandinavian",label:"Scandinavian",description:"Warm, spacious, hygge-inspired calm",density:"spacious",animation:"subtle"},{name:"bauhaus",label:"Bauhaus",description:"Geometric, primary colours, strong lines",density:"normal",animation:"none"},{name:"notebook",label:"Notebook",description:"Handwritten feel, paper textures, ruled",density:"comfortable",animation:"subtle"},{name:"origami",label:"Origami",description:"Folded paper, subtle shadows, layered",density:"normal",animation:"normal"},{name:"watercolor",label:"Watercolor",description:"Soft bleeding edges, artistic, dreamy",density:"comfortable",animation:"normal"},{name:"monochrome",label:"Monochrome",description:"Pure black & white, typography focus",density:"normal",animation:"none"},{name:"paper",label:"Paper",description:"Minimal white, subtle shadows, like stationery",density:"comfortable",animation:"subtle"},{name:"zen",label:"Zen",description:"Ultra-minimal, whitespace, meditative calm",density:"spacious",animation:"subtle"},{name:"terminal",label:"Terminal",description:"Monospace, dark, retro-computing green",density:"compact",animation:"none"},{name:"hacker",label:"Hacker",description:"Matrix-style, neon green on black",density:"compact",animation:"subtle"},{name:"retro8bit",label:"8-bit Retro",description:"Pixel art, chunky borders, game boy era",density:"normal",animation:"none"},{name:"synthwave",label:"Synthwave",description:"80s synth, neon grids, chrome gradients",density:"normal",animation:"dramatic"},{name:"cyberpunk",label:"Cyberpunk",description:"Angular, neon, glitch aesthetics, dark",density:"compact",animation:"dramatic"},{name:"steampunk",label:"Steampunk",description:"Brass, gears, Victorian-era technology",density:"normal",animation:"subtle"},{name:"vapor",label:"Vaporwave",description:"80s/90s aesthetics, pink/teal gradients",density:"comfortable",animation:"playful"},{name:"neon",label:"Neon",description:"Bright glowing outlines on dark surfaces",density:"normal",animation:"dramatic"},{name:"windows95",label:"Windows 95",description:"Chunky beveled 3D, classic OS nostalgia",density:"compact",animation:"none"},{name:"material",label:"Material",description:"Google Material Design — depth & motion",density:"normal",animation:"normal"},{name:"fluent",label:"Fluent",description:"Microsoft Fluent — acrylic, reveal, depth",density:"normal",animation:"subtle"},{name:"cupertino",label:"Cupertino",description:"Apple iOS/macOS style — frosted, rounded",density:"comfortable",animation:"normal"},{name:"ant",label:"Ant Design",description:"Ant Design — clean, reliable, professional",density:"normal",animation:"subtle"},{name:"bootstrap",label:"Bootstrap",description:"Bootstrap-like — rounded, striped tables",density:"normal",animation:"subtle"},{name:"chakra",label:"Chakra",description:"Chakra UI — accessible, clean, modern",density:"normal",animation:"normal"},{name:"notion",label:"Notion",description:"Notion-like — text-focused, minimal chrome",density:"normal",animation:"subtle"},{name:"linear",label:"Linear",description:"Linear app — sleek, dark, polished",density:"compact",animation:"subtle"},{name:"vercel",label:"Vercel",description:"Vercel/Next.js — black/white, sharp, modern",density:"normal",animation:"subtle"},{name:"candy",label:"Candy",description:"Sweet pastels, rounded, sugar rush!",density:"comfortable",animation:"playful"},{name:"bubblegum",label:"Bubblegum",description:"Pink puffy bubbles, extremely round",density:"spacious",animation:"playful"},{name:"cartoon",label:"Cartoon",description:"Thick outlines, bold colours, exaggerated",density:"comfortable",animation:"playful"},{name:"kawaii",label:"Kawaii",description:"Cute, pastel, sparkly, UwU aesthetic",density:"spacious",animation:"dramatic"},{name:"circus",label:"Circus",description:"Bold stripes, loud, step right up!",density:"spacious",animation:"dramatic"},{name:"gaming",label:"Gaming",description:"Dark, neon accents, angular, RGB everything",density:"normal",animation:"dramatic"},{name:"kiddo",label:"Kiddo",description:"Colourful, puffy, child-friendly, big touch",density:"spacious",animation:"playful"},{name:"disco",label:"Disco",description:"Flashing, spinning, Saturday night fever 🕺",density:"comfortable",animation:"dramatic"},{name:"clown",label:"Clown",description:"Maximum chaos, honk honk, pure madness 🤡",density:"spacious",animation:"dramatic"}];function us({enabled:e,readOnly:t,disabled:r}){const[a,n]=c.useState(!1),o=c.useRef(!1),s=c.useCallback(()=>{t||r||!e||(o.current=!0,n(!0))},[t,r,e]),i=c.useCallback(()=>{n(!1)},[]),l=c.useCallback(d=>{d&&o.current&&(o.current=!1,requestAnimationFrame(()=>{if(d.focus(),d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)try{d.select()}catch{}}))},[]);return c.useEffect(()=>{(t||r)&&a&&n(!1)},[t,r,a]),{isDisplay:!!e&&!a,enterEdit:s,exitEdit:i,autoFocusRef:l}}const fs=({value:e,placeholder:t,disabled:r,readOnly:a,onActivate:n,className:o,ariaLabel:s})=>{const i=e==null||e==="",l=d=>{r||a||(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),n())};return x.jsx("span",{role:"button",tabIndex:r?-1:0,className:`nice-display-value ${i?"nice-display-value--empty":""} ${r?"nice-display-value--disabled":""} ${a?"nice-display-value--readonly":""} ${o||""}`.trim(),onClick:()=>{!r&&!a&&n()},onKeyDown:l,"aria-label":s,"aria-disabled":r||void 0,children:i?t??"—":e})};function ms(e){if(!e)return"";let t=e;return t=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),t=t.replace(/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,""),t=t.replace(/(href|src|action)\s*=\s*(?:"javascript:[^"]*"|'javascript:[^']*')/gi,'$1=""'),t=t.replace(/(href|src|action)\s*=\s*(?:"vbscript:[^"]*"|'vbscript:[^']*')/gi,'$1=""'),t=t.replace(/<\/?(iframe|object|embed|form)\b[^>]*>/gi,""),t}function ps(e){const t=e.trim().toLowerCase();return!!(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("blob:")||t.startsWith("data:image/")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../"))}const Dt={"chevron-down":"M6 9l6 6 6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","chevron-right":"M9 6l6 6-6 6","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7",close:"M18 6L6 18M6 6l12 12",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",check:"M5 13l4 4L19 7",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 113 3L12 15l-4 1 1-4 9.5-9.5z",trash:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h5M20 20v-5h-5M20.49 9A9 9 0 005.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 013.51 15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z","sort-asc":"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12","sort-desc":"M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4",menu:"M4 6h16M4 12h16M4 18h16","more-vertical":"M12 5v.01M12 12v.01M12 19v.01","more-horizontal":"M5 12h.01M12 12h.01M19 12h.01",settings:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",eye:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M15 12a3 3 0 11-6 0 3 3 0 016 0z","eye-off":"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24 M1 1l22 22",lock:"M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2zm-3-4a4 4 0 10-8 0v4h8V7z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",help:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",users:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",grip:"M4 6h2m4 0h2m4 0h2M4 12h2m4 0h2m4 0h2M4 18h2m4 0h2m4 0h2",play:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z M21 12a9 9 0 11-18 0 9 9 0 0118 0z",pause:"M10 9v6m4-6v6m7-3a9 9 0 11-18 0 9 9 0 0118 0z",stop:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z",expand:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4",collapse:"M9 9V5m0 4H5m4 0L4 4m11 5h4m-4 0V5m0 4l5-5M9 15v4m0-4H5m4 0l-5 5m15-5h-4m4 0v4m0-4l-5 5","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"},gs={xs:12,sm:16,md:20,lg:24,xl:32},Ke=c.createContext({}),ys=({resolver:e,children:t})=>c.createElement(Ke.Provider,{value:{resolver:e}},t);function hs({path:e,size:t,className:r,style:a,color:n,title:o,onClick:s}){return x.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:n||"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:`nice-icon ${r||""}`,style:a,role:o?"img":"presentation","aria-label":o,"aria-hidden":!o,onClick:s,children:[o&&x.jsx("title",{children:o}),x.jsx("path",{d:e})]})}const Ht=({name:e,size:t="md",className:r,style:a,color:n,title:o,onClick:s})=>{const{resolver:i}=c.useContext(Ke),l=typeof t=="number"?t:gs[t];if(i){const u=i(e,l);if(u)return x.jsx("span",{className:`nice-icon-wrap ${r||""}`,style:a,onClick:s,children:u})}const d=Dt[e];return d?x.jsx(hs,{path:d,size:l,className:r,style:a,color:n,title:o,onClick:s}):null};function bs(){const{resolver:e}=c.useContext(Ke);return{renderIcon:c.useCallback((r,a="md")=>r==null?null:typeof r!="string"?r:c.createElement(Ht,{name:r,size:a}),[e])}}const Ss=Object.keys(Dt);function xs(){const[e,t]=c.useState(()=>typeof window<"u"?window.matchMedia("(pointer: coarse)").matches:!1);return c.useEffect(()=>{const r=window.matchMedia("(pointer: coarse)");t(r.matches);const a=n=>t(n.matches);return r.addEventListener("change",a),()=>r.removeEventListener("change",a)},[]),e}function vs(){const[e,t]=c.useState(()=>typeof window<"u"&&window.matchMedia("(pointer: coarse)").matches?"touch":"mouse");return c.useEffect(()=>{const r=()=>t("touch"),a=n=>{n.pointerType==="mouse"&&t("mouse")};return window.addEventListener("touchstart",r,{passive:!0,capture:!0}),window.addEventListener("pointerdown",a,{capture:!0}),()=>{window.removeEventListener("touchstart",r,{capture:!0}),window.removeEventListener("pointerdown",a,{capture:!0})}},[]),e}function ws(e,t=500){const r=c.useRef(null),a=c.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]);return{onPointerDown:c.useCallback(o=>{o.pointerType==="touch"&&(a(),r.current=setTimeout(e,t))},[e,t,a]),onPointerUp:a,onPointerCancel:a}}function ks(e){const t=c.useId();return e||t}function Cs(e,t){const[r,a]=c.useState(e);return c.useEffect(()=>{const n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}function Ms(e,t){c.useEffect(()=>{const r=a=>{!e.current||e.current.contains(a.target)||t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}function As(e,t){c.useEffect(()=>{if(!t||!e.current)return;const r=e.current,a=document.activeElement,n=r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),o=n[0],s=n[n.length-1],i=l=>{l.key==="Tab"&&(l.shiftKey?document.activeElement===o&&(l.preventDefault(),s==null||s.focus()):document.activeElement===s&&(l.preventDefault(),o==null||o.focus()))};return o==null||o.focus(),r.addEventListener("keydown",i),()=>{var l;r.removeEventListener("keydown",i),(l=a==null?void 0:a.focus)==null||l.call(a)}},[e,t])}function Es(e={}){const{defaultMode:t="system",storageKey:r="nice-color-mode",darkClass:a="nice-dark",lightClass:n="nice-light"}=e,[o,s]=c.useState(()=>typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[i,l]=c.useState(()=>{if(typeof window>"u")return t;const f=localStorage.getItem(r);return f==="light"||f==="dark"||f==="system"?f:t});c.useEffect(()=>{const f=window.matchMedia("(prefers-color-scheme: dark)"),y=p=>s(p.matches?"dark":"light");return f.addEventListener("change",y),()=>f.removeEventListener("change",y)},[]);const d=i==="system"?o==="dark":i==="dark";c.useEffect(()=>{const f=document.documentElement;return d?(f.classList.add(a),f.classList.remove(n)):(f.classList.add(n),f.classList.remove(a)),()=>{f.classList.remove(a,n)}},[d,a,n]),c.useEffect(()=>{localStorage.setItem(r,i)},[i,r]);const u=c.useCallback(()=>l("light"),[]),m=c.useCallback(()=>l("dark"),[]),g=c.useCallback(()=>l("system"),[]),h=c.useCallback(()=>l(f=>f==="system"?o==="dark"?"light":"dark":f==="dark"?"light":"dark"),[o]);return{isDark:d,mode:i,systemPreference:o,setLight:u,setDark:m,setSystem:g,toggle:h}}function Ns(e,t={}){const{colorCount:r=5,quality:a=5}=t,[n,o]=c.useState(null),[s,i]=c.useState(!1),[l,d]=c.useState(null);return c.useEffect(()=>{if(!e){o(null);return}(async()=>{i(!0),d(null);try{let m;typeof e=="string"?(m=new Image,m.crossOrigin="anonymous",await new Promise((C,A)=>{m.onload=()=>C(),m.onerror=()=>A(new Error("Failed to load image")),m.src=e})):m=e;const g=document.createElement("canvas"),h=100,f=Math.min(h/m.width,h/m.height,1);g.width=m.width*f,g.height=m.height*f;const y=g.getContext("2d");if(!y)throw new Error("Canvas context unavailable");y.drawImage(m,0,0,g.width,g.height);const p=y.getImageData(0,0,g.width,g.height),S=[],b=Math.max(1,Math.floor(11-a));for(let C=0;C<p.data.length;C+=4*b){const A=p.data[C],T=p.data[C+1],N=p.data[C+2];if(p.data[C+3]>200){const I=(A+T+N)/3;I>20&&I<235&&S.push([A,T,N])}}if(S.length===0)throw new Error("No valid colors found in image");const w=Ts(S,r).sort((C,A)=>{const T=Math.max(...C)-Math.min(...C);return Math.max(...A)-Math.min(...A)-T}),E=C=>"#"+C.map(A=>Math.round(A).toString(16).padStart(2,"0")).join(""),k=C=>(.299*C[0]+.587*C[1]+.114*C[2])/255>.5?"var(--nice-text, #000000)":"var(--nice-bg, #fff)",M=w.slice();o({primary:E(M[0]||[100,100,100]),secondary:E(M[1]||M[0]||[150,150,150]),accent:E(w[0]||[100,100,100]),palette:M.map(E),primaryText:k(M[0]||[100,100,100]),secondaryText:k(M[1]||M[0]||[150,150,150])})}catch(m){d(m instanceof Error?m.message:"Unknown error"),o(null)}finally{i(!1)}})()},[e,r,a]),{colors:n,loading:s,error:l}}function Ts(e,t,r=20){if(e.length<=t)return e;const a=[],n=new Set;for(;a.length<t;){const o=Math.floor(Math.random()*e.length);n.has(o)||(n.add(o),a.push([...e[o]]))}for(let o=0;o<r;o++){const s=Array.from({length:t},()=>[]);for(const l of e){let d=1/0,u=0;for(let m=0;m<t;m++){const g=Math.sqrt((l[0]-a[m][0])**2+(l[1]-a[m][1])**2+(l[2]-a[m][2])**2);g<d&&(d=g,u=m)}s[u].push(l)}let i=!1;for(let l=0;l<t;l++){if(s[l].length===0)continue;const d=[0,0,0];for(const u of s[l])d[0]+=u[0],d[1]+=u[1],d[2]+=u[2];d[0]/=s[l].length,d[1]/=s[l].length,d[2]/=s[l].length,(Math.abs(d[0]-a[l][0])>1||Math.abs(d[1]-a[l][1])>1||Math.abs(d[2]-a[l][2])>1)&&(i=!0),a[l]=d}if(!i)break}return a}function Ls(e){const t=e.replace("#",""),r=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),n=parseInt(t.slice(4,6),16),o=Math.max(r,a,n)/255,s=Math.min(r,a,n)/255;let i=0,l=0;const d=(o+s)/2;if(o!==s){const m=o-s;switch(l=d>.5?m/(2-o-s):m/(o+s),o){case r/255:i=((a/255-n/255)/m+(a<n?6:0))/6;break;case a/255:i=((n/255-r/255)/m+2)/6;break;case n/255:i=((r/255-a/255)/m+4)/6;break}}const u=(m,g,h)=>{const f=(w,E,k)=>(k<0&&(k+=1),k>1&&(k-=1),k<.16666666666666666?w+(E-w)*6*k:k<.5?E:k<.6666666666666666?w+(E-w)*(.6666666666666666-k)*6:w),y=h<.5?h*(1+g):h+g-h*g,p=2*h-y,S=Math.round(f(p,y,m+1/3)*255),b=Math.round(f(p,y,m)*255),v=Math.round(f(p,y,m-1/3)*255);return"#"+[S,b,v].map(w=>w.toString(16).padStart(2,"0")).join("")};return{lightest:u(i,Math.min(l*.3,1),.97),lighter:u(i,Math.min(l*.5,1),.9),light:u(i,Math.min(l*.7,1),.8),base:e,dark:u(i,Math.min(l*1.1,1),Math.max(d-.15,.1)),darker:u(i,Math.min(l*1.2,1),Math.max(d-.25,.05)),darkest:u(i,Math.min(l*1.3,1),Math.max(d-.35,.02)),text:d>.5?"var(--nice-text, #000000)":"var(--nice-bg, #fff)",textInverse:d>.5?"var(--nice-bg, #fff)":"var(--nice-text, #000000)"}}const ee={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},Y=["xs","sm","md","lg","xl","xxl"];function ie(e=ee){const[t,r]=c.useState(()=>typeof window<"u"?window.innerWidth:e.lg);c.useEffect(()=>{let i;const l=()=>{i&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>r(window.innerWidth))};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l),i&&cancelAnimationFrame(i)}},[]);const a=c.useMemo(()=>{for(let i=Y.length-1;i>=0;i--)if(t>=e[Y[i]])return Y[i];return"xs"},[t,e]),n=c.useCallback(i=>t>=e[i],[t,e]),o=c.useCallback(i=>t<e[i],[t,e]),s=c.useCallback((i,l)=>t>=e[i]&&t<e[l],[t,e]);return{current:a,width:t,isAbove:n,isBelow:o,isBetween:s,isMobile:t<e.md,isTablet:t>=e.md&&t<e.lg,isDesktop:t>=e.lg}}function be(e){const[t,r]=c.useState(()=>typeof window>"u"?!1:window.matchMedia(e).matches);return c.useEffect(()=>{const a=window.matchMedia(e);r(a.matches);const n=o=>r(o.matches);return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},[e]),t}function Is(e,t=ee){const{current:r}=ie(t);return c.useMemo(()=>{if(e==null||typeof e!="object"||Array.isArray(e))return e;const a=e,n=Y.indexOf(r);for(let o=n;o>=0;o--){const s=a[Y[o]];if(s!==void 0)return s}for(let o=n+1;o<Y.length;o++){const s=a[Y[o]];if(s!==void 0)return s}},[e,r])}function Rs(e){const[t,r]=c.useState({width:0,height:0});return c.useEffect(()=>{const a=e.current;if(!a)return;const n=new ResizeObserver(([o])=>{const{width:s,height:i}=o.contentRect;r({width:s,height:i})});return n.observe(a),()=>n.disconnect()},[e]),t}function $t(){const{width:e,isMobile:t}=ie(),r=c.useMemo(()=>typeof window>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0,[]),a=be("(prefers-reduced-motion: reduce)"),n=be("(orientation: portrait)"),o=c.useMemo(()=>typeof window>"u"?1:window.devicePixelRatio||1,[]),s=t&&r,i=!t&&e<ee.lg&&r,l=!r||e>=ee.lg;return{isMobile:s||i,isTouch:r,isPhone:s,isTablet:i,isDesktop:l,prefersReducedMotion:a,isPortrait:n,pixelRatio:o}}function zs(e={}){const{forceVariant:t,breakpoints:r=ee}=e,{isMobile:a,isTablet:n,isDesktop:o}=ie(r),s=$t();return t||(s.isPhone?"mobile":s.isTablet?"tablet":s.isDesktop?"desktop":a?"mobile":n?"tablet":"desktop")}function Fs(e={}){const{showAt:t,hideAt:r,mobileOnly:a,desktopOnly:n,tabletOnly:o}=e,{current:s,isMobile:i,isTablet:l,isDesktop:d}=ie();return a?i:n?d:o?l:r&&r.includes(s)?!1:t?t.includes(s):!0}function Ps(){return be("(orientation: portrait)")?"portrait":"landscape"}function Ds(){const[e,t]=c.useState({top:0,right:0,bottom:0,left:0});return c.useEffect(()=>{if(typeof window>"u"||!CSS.supports("padding-top","env(safe-area-inset-top)"))return;const r=()=>{getComputedStyle(document.documentElement);const a=document.createElement("div");a.style.cssText=`
12
12
  position: fixed;
13
13
  top: 0;
14
14
  left: 0;
15
15
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
16
16
  visibility: hidden;
17
17
  pointer-events: none;
18
- `,document.body.appendChild(a);const n=getComputedStyle(a);t({top:parseInt(n.paddingTop,10)||0,right:parseInt(n.paddingRight,10)||0,bottom:parseInt(n.paddingBottom,10)||0,left:parseInt(n.paddingLeft,10)||0}),document.body.removeChild(a)};return r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),()=>{window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r)}},[]),e}function Pt(e="normal"){return typeof e=="number"?e:e==="fast"?120:e==="slow"?300:200}const De={fade:"nice-anim-fade-enter",slideUp:"nice-anim-slide-up-enter",slideDown:"nice-anim-slide-down-enter",slideLeft:"nice-anim-slide-left-enter",slideRight:"nice-anim-slide-right-enter",scaleUp:"nice-anim-scale-up-enter",scaleDown:"nice-anim-scale-down-enter",zoom:"nice-anim-zoom-enter",flip:"nice-anim-flip-enter",none:""},Ht={fade:"nice-anim-fade-exit",slideUp:"nice-anim-slide-up-exit",slideDown:"nice-anim-slide-down-exit",slideLeft:"nice-anim-slide-left-exit",slideRight:"nice-anim-slide-right-exit",scaleUp:"nice-anim-scale-up-exit",scaleDown:"nice-anim-scale-down-exit",zoom:"nice-anim-zoom-exit",flip:"nice-anim-flip-exit",none:""};function To(e){const{visible:t,animation:r="fade",duration:a="normal",onEntered:n,onExited:s}=e,[o,i]=c.useState(t?"entered":"exited"),[l,d]=c.useState(t),u=c.useRef(),f=Pt(a),p=c.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]),g=p||r==="none"?0:f;c.useEffect(()=>(u.current&&clearTimeout(u.current),t?(d(!0),i("entering"),u.current=setTimeout(()=>{i("entered"),n==null||n()},g)):(i("exiting"),u.current=setTimeout(()=>{i("exited"),d(!1),s==null||s()},g)),()=>{u.current&&clearTimeout(u.current)}),[t,g]);const m=c.useMemo(()=>r==="none"||p?"":o==="entering"?De[r]:o==="exiting"?Ht[r]:o==="entered"?`${De[r]} nice-anim-active`:"",[r,o,p]),b=c.useMemo(()=>({animationDuration:`${g}ms`,transitionDuration:`${g}ms`}),[g]);return{state:o,shouldRender:l,className:m,style:b}}function Lo(e,t){const{expanded:r,duration:a="normal"}=t,[n,s]=c.useState(r?"auto":0),o=Pt(a);return c.useEffect(()=>{const i=e.current;if(i)if(r){const l=i.scrollHeight;s(l);const d=setTimeout(()=>s("auto"),o);return()=>clearTimeout(d)}else{const l=i.scrollHeight;s(l),requestAnimationFrame(()=>{requestAnimationFrame(()=>s(0))})}},[r,o,e]),{overflow:"hidden",height:typeof n=="number"?`${n}px`:n,transition:`height ${o}ms ease`}}function Io(e,t=50){return`${e*t}ms`}function Ro(e,t){return t==="enter"?De[e]:Ht[e]}const Dt=c.createContext({direction:"ltr",isRTL:!1,flip:e=>e,flipStyle:(e,t)=>({[e]:t})}),$t=({direction:e,children:t})=>{const r=c.useMemo(()=>e!=="auto"?e:typeof document<"u"&&document.documentElement.getAttribute("dir")==="rtl"?"rtl":"ltr",[e]),a=r==="rtl";c.useEffect(()=>(e!=="auto"&&(document.documentElement.setAttribute("dir",r),document.documentElement.style.direction=r),()=>{e!=="auto"&&(document.documentElement.removeAttribute("dir"),document.documentElement.style.direction="")}),[e,r]);const n=c.useCallback(i=>a?{left:"right",right:"left",start:"end",end:"start"}[i]??i:i,[a]),s=c.useCallback((i,l)=>a?{[{paddingLeft:"paddingRight",paddingRight:"paddingLeft",marginLeft:"marginRight",marginRight:"marginLeft"}[i]||i]:l}:{[i]:l},[a]),o=c.useMemo(()=>({direction:r,isRTL:a,flip:n,flipStyle:s}),[r,a,n,s]);return x.jsx(Dt.Provider,{value:o,children:x.jsx("div",{dir:r,style:{direction:r,display:"contents"},children:t})})};$t.displayName="NiceRTLProvider";function zo(){return c.useContext(Dt)}const Fo={marginStart:"marginInlineStart",marginEnd:"marginInlineEnd",paddingStart:"paddingInlineStart",paddingEnd:"paddingInlineEnd",borderStart:"borderInlineStart",borderEnd:"borderInlineEnd",insetStart:"insetInlineStart",insetEnd:"insetInlineEnd",start:"insetInlineStart",end:"insetInlineEnd",textAlign:{start:"start",end:"end"}},jt=c.createContext({permissions:{},getAccessMode:()=>"full"}),Ot=({permissions:e,children:t})=>{const r=c.useMemo(()=>({permissions:e,getAccessMode:(a,n)=>{var s,o;return n&&a&&((s=e.fields)!=null&&s[`${a}.${n}`])?e.fields[`${a}.${n}`]:a&&((o=e.components)!=null&&o[a])?e.components[a]:e.defaultMode??"full"}}),[e]);return x.jsx(jt.Provider,{value:r,children:t})};Ot.displayName="NiceAccessControl";function Po(e,t,r){const a=c.useContext(jt);return e||a.getAccessMode(t,r)}function Ho(e){switch(e){case"disabled":return{disabled:!0,"aria-disabled":!0,tabIndex:-1};case"readOnly":return{readOnly:!0};default:return{}}}function Do(e={}){const{threshold:t=50,maxDuration:r=300,onSwipe:a,onSwipeLeft:n,onSwipeRight:s,onSwipeUp:o,onSwipeDown:i,enabled:l=!0}=e,d=c.useRef(null),[u,f]=c.useState(!1),[p,g]=c.useState(null),m=c.useRef(null);return c.useEffect(()=>{const b=d.current;if(!b||!l)return;const y=w=>{if(w.touches.length!==1)return;const A=w.touches[0];m.current={x:A.clientX,y:A.clientY,timestamp:Date.now()},f(!0),g(null)},S=w=>{if(!m.current||w.touches.length!==1)return;const A=w.touches[0],C=A.clientX-m.current.x,M=A.clientY-m.current.y;Math.abs(C)>Math.abs(M)?g(C>0?"right":"left"):g(M>0?"down":"up")},h=w=>{if(!m.current)return;const A=w.changedTouches[0],C={x:A.clientX,y:A.clientY,timestamp:Date.now()},M=C.x-m.current.x,k=C.y-m.current.y,E=C.timestamp-m.current.timestamp,T=Math.sqrt(M*M+k*k),N=T/E;if(f(!1),E<=r&&T>=t){let R;Math.abs(M)>Math.abs(k)?R=M>0?"right":"left":R=k>0?"down":"up";const I={direction:R,distance:T,velocity:N,duration:E};switch(a==null||a(I),R){case"left":n==null||n(I);break;case"right":s==null||s(I);break;case"up":o==null||o(I);break;case"down":i==null||i(I);break}}m.current=null,g(null)},v=()=>{m.current=null,f(!1),g(null)};return b.addEventListener("touchstart",y,{passive:!0}),b.addEventListener("touchmove",S,{passive:!0}),b.addEventListener("touchend",h,{passive:!0}),b.addEventListener("touchcancel",v,{passive:!0}),()=>{b.removeEventListener("touchstart",y),b.removeEventListener("touchmove",S),b.removeEventListener("touchend",h),b.removeEventListener("touchcancel",v)}},[l,t,r,a,n,s,o,i]),{ref:d,isSwiping:u,swipeDirection:p}}function $o(e={}){const{onPinch:t,onPinchStart:r,onPinchEnd:a,minScale:n=.5,maxScale:s=3,enabled:o=!0}=e,i=c.useRef(null),[l,d]=c.useState(1),[u,f]=c.useState(!1),p=c.useRef(null),g=c.useRef(1);return c.useEffect(()=>{const m=i.current;if(!m||!o)return;const b=(w,A)=>{const C=w.clientX-A.clientX,M=w.clientY-A.clientY;return Math.sqrt(C*C+M*M)},y=(w,A)=>({x:(w.clientX+A.clientX)/2,y:(w.clientY+A.clientY)/2}),S=w=>{w.touches.length===2&&(p.current=b(w.touches[0],w.touches[1]),g.current=l,f(!0),r==null||r())},h=w=>{if(w.touches.length!==2||!p.current)return;const A=b(w.touches[0],w.touches[1]),C=Math.min(s,Math.max(n,g.current*(A/p.current)));d(C),t==null||t({scale:C,center:y(w.touches[0],w.touches[1])})},v=()=>{u&&(f(!1),a==null||a(l),p.current=null)};return m.addEventListener("touchstart",S,{passive:!0}),m.addEventListener("touchmove",h,{passive:!0}),m.addEventListener("touchend",v,{passive:!0}),m.addEventListener("touchcancel",v,{passive:!0}),()=>{m.removeEventListener("touchstart",S),m.removeEventListener("touchmove",h),m.removeEventListener("touchend",v),m.removeEventListener("touchcancel",v)}},[o,l,u,n,s,t,r,a]),{ref:i,scale:l,isPinching:u}}function jo(e={}){const{onPan:t,onPanStart:r,onPanEnd:a,enabled:n=!0}=e,s=c.useRef(null),[o,i]=c.useState(!1),[l,d]=c.useState(0),[u,f]=c.useState(0),p=c.useRef(null),g=c.useRef(null);return c.useEffect(()=>{const m=s.current;if(!m||!n)return;const b=h=>{if(h.touches.length!==1)return;const v=h.touches[0],w={x:v.clientX,y:v.clientY,timestamp:Date.now()};p.current=w,g.current=w,i(!0),d(0),f(0),r==null||r()},y=h=>{if(!p.current||!g.current||h.touches.length!==1)return;const v=h.touches[0],w=Date.now(),A={x:v.clientX,y:v.clientY,timestamp:w},C=A.x-p.current.x,M=A.y-p.current.y,k=A.timestamp-g.current.timestamp||1,E=(A.x-g.current.x)/k,T=(A.y-g.current.y)/k;d(C),f(M),t==null||t({deltaX:C,deltaY:M,velocityX:E,velocityY:T}),g.current=A},S=()=>{if(!o||!p.current||!g.current)return;const h=l,v=u,w=g.current.timestamp-p.current.timestamp||1;a==null||a({deltaX:h,deltaY:v,velocityX:h/w,velocityY:v/w}),i(!1),p.current=null,g.current=null};return m.addEventListener("touchstart",b,{passive:!0}),m.addEventListener("touchmove",y,{passive:!0}),m.addEventListener("touchend",S,{passive:!0}),m.addEventListener("touchcancel",S,{passive:!0}),()=>{m.removeEventListener("touchstart",b),m.removeEventListener("touchmove",y),m.removeEventListener("touchend",S),m.removeEventListener("touchcancel",S)}},[n,o,l,u,t,r,a]),{ref:s,isPanning:o,deltaX:l,deltaY:u}}function Bt(e){const{onRefresh:t,threshold:r=80,maxPull:a=120,enabled:n=!0}=e,s=c.useRef(null),[o,i]=c.useState(!1),[l,d]=c.useState(!1),[u,f]=c.useState(0),p=c.useRef(null),g=Math.min(1,u/r);return c.useEffect(()=>{const m=s.current;if(!m||!n||l)return;const b=h=>{m.scrollTop>0||h.touches.length===1&&(p.current=h.touches[0].clientY)},y=h=>{if(p.current===null||h.touches.length!==1)return;const w=h.touches[0].clientY-p.current;if(w<=0){f(0),i(!1);return}const C=Math.min(a,w*.5);f(C),i(C>0),C>0&&h.preventDefault()},S=async()=>{if(u>=r&&!l){d(!0),f(r);try{await t()}finally{d(!1),f(0)}}else f(0);i(!1),p.current=null};return m.addEventListener("touchstart",b,{passive:!0}),m.addEventListener("touchmove",y,{passive:!1}),m.addEventListener("touchend",S,{passive:!0}),m.addEventListener("touchcancel",S,{passive:!0}),()=>{m.removeEventListener("touchstart",b),m.removeEventListener("touchmove",y),m.removeEventListener("touchend",S),m.removeEventListener("touchcancel",S)}},[n,l,u,r,a,t]),{ref:s,isPulling:o,isRefreshing:l,pullDistance:u,pullProgress:g}}const Oo=({children:e,leftActions:t=[],rightActions:r=[],actionWidth:a=80,maxSwipe:n=1.5,threshold:s=.5,className:o,style:i})=>{const l=c.useRef(null),d=c.useRef(null),[u,f]=c.useState(0),[p,g]=c.useState(!1),m=c.useRef(0),b=c.useRef(0),y=t.length*a,S=r.length*a,h=y*n,v=S*n,w=c.useCallback(E=>{g(!1),m.current=E.touches[0].clientX,b.current=u},[u]),A=c.useCallback(E=>{const T=E.touches[0].clientX-m.current;let N=b.current+T;N>h?N=h+(N-h)*.2:N<-v&&(N=-v+(N+v)*.2),!(N>0&&t.length===0)&&(N<0&&r.length===0||f(N))},[h,v,t.length,r.length]),C=c.useCallback(()=>{g(!0),u>y*s?f(y):u<-S*s?f(-S):f(0)},[u,y,S,s]),M=c.useCallback(E=>{g(!0),f(0),E.onAction()},[]),k=c.useCallback(()=>{g(!0),f(0)},[]);return x.jsxs("div",{ref:l,className:`nice-swipeable ${o||""}`,style:{...i,position:"relative",overflow:"hidden"},children:[x.jsx("div",{className:"nice-swipeable__actions nice-swipeable__actions--left",style:{position:"absolute",left:0,top:0,bottom:0,display:"flex",width:y},children:t.map(E=>x.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:E.color,border:"none",color:"var(--bg-primary, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>M(E),children:E.content},E.key))}),x.jsx("div",{className:"nice-swipeable__actions nice-swipeable__actions--right",style:{position:"absolute",right:0,top:0,bottom:0,display:"flex",width:S},children:r.map(E=>x.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:E.color,border:"none",color:"var(--bg-primary, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>M(E),children:E.content},E.key))}),x.jsx("div",{ref:d,className:"nice-swipeable__content",style:{transform:`translateX(${u}px)`,transition:p?"transform 0.3s ease-out":"none",background:"var(--bg-primary, #fff)",position:"relative",zIndex:1},onTouchStart:w,onTouchMove:A,onTouchEnd:C,onClick:u!==0?k:void 0,children:e})]})},Bo=({children:e,onRefresh:t,threshold:r=80,pullingContent:a,refreshingContent:n,enabled:s=!0,className:o,style:i})=>{const{ref:l,isPulling:d,isRefreshing:u,pullDistance:f,pullProgress:p}=Bt({onRefresh:t,threshold:r,enabled:s});return x.jsxs("div",{ref:l,className:`nice-pull-refresh ${o||""}`,style:{...i,position:"relative",overflow:"auto",overscrollBehavior:"contain"},children:[x.jsx("div",{className:"nice-pull-refresh__indicator",style:{position:"absolute",top:0,left:0,right:0,display:"flex",justifyContent:"center",alignItems:"center",height:f,overflow:"hidden",transition:d?"none":"height 0.2s ease-out"},children:u?n||x.jsx("div",{className:"nice-pull-refresh__spinner",children:x.jsx("div",{className:"nice-spinner nice-spinner--sm"})}):a||x.jsx("div",{className:"nice-pull-refresh__arrow",style:{transform:`rotate(${p>=1?180:0}deg)`,transition:"transform 0.2s ease",opacity:p},children:x.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})})}),x.jsx("div",{className:"nice-pull-refresh__content",style:{transform:`translateY(${f}px)`,transition:d?"none":"transform 0.2s ease-out"},children:e})]})};function _t(e="light"){if(!("vibrate"in navigator))return;const t={light:10,medium:20,heavy:30,selection:5,success:[10,30,10],warning:[20,20,20],error:[30,30,30,30]};try{navigator.vibrate(t[e])}catch{}}function _o(){return c.useCallback((e="light")=>{_t(e)},[])}const Wo=({minSize:e=44,children:t,className:r,style:a,onClick:n})=>x.jsx("div",{className:`nice-touch-target ${r||""}`,style:{...a,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:e,minHeight:e,cursor:n?"pointer":void 0},onClick:n,children:t});function Vo(){const[e,t]=c.useState(!1),[r,a]=c.useState(0),n=c.useRef(typeof window<"u"?window.innerHeight:0);return c.useEffect(()=>{if(typeof window>"u")return;if("visualViewport"in window&&window.visualViewport){const o=window.visualViewport,i=()=>{const l=n.current-o.height,d=150;t(l>d),a(l>d?l:0)};return o.addEventListener("resize",i),()=>o.removeEventListener("resize",i)}const s=()=>{const o=n.current-window.innerHeight,i=150;t(o>i),a(o>i?o:0)};return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),{isKeyboardVisible:e,keyboardHeight:r}}const Wt={announceChanges:!0,reduceMotion:"auto",highContrast:"auto",focusStyle:"auto",keyboardShortcuts:!0,minTouchTarget:44},Vt=c.createContext(null),Xt=({config:e,children:t})=>{const r=c.useMemo(()=>({...Wt,...e}),[e]),a=c.useRef(null),n=c.useRef(null),[s,o]=c.useState(!1);c.useEffect(()=>{const g=window.matchMedia("(prefers-reduced-motion: reduce)");o(g.matches);const m=b=>o(b.matches);return g.addEventListener("change",m),()=>g.removeEventListener("change",m)},[]);const[i,l]=c.useState(!1);c.useEffect(()=>{const g=window.matchMedia("(prefers-contrast: more)");l(g.matches);const m=b=>l(b.matches);return g.addEventListener("change",m),()=>g.removeEventListener("change",m)},[]);const d=r.reduceMotion==="always"?!0:r.reduceMotion==="never"?!1:s,u=r.highContrast==="always"?!0:r.highContrast==="never"?!1:i,f=c.useCallback((g,m="polite")=>{if(!r.announceChanges)return;const b=m==="assertive"?n.current:a.current;b&&(b.textContent="",requestAnimationFrame(()=>{b.textContent=g}))},[r.announceChanges]),p=c.useMemo(()=>({config:r,announce:f,prefersReducedMotion:d,prefersHighContrast:u}),[r,f,d,u]);return x.jsxs(Vt.Provider,{value:p,children:[t,x.jsx("div",{ref:a,role:"status","aria-live":"polite","aria-atomic":"true",style:$e}),x.jsx("div",{ref:n,role:"alert","aria-live":"assertive","aria-atomic":"true",style:$e})]})};Xt.displayName="NiceA11yProvider";function Xo(){const e=c.useContext(Vt);return e||{config:Wt,announce:()=>{},prefersReducedMotion:!1,prefersHighContrast:!1}}const $e={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0};function qt(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function qo(e){const t=e.error?`${e.id}-error`:void 0,r=e.helperText?`${e.id}-helper`:void 0;return{"aria-invalid":e.error?!0:void 0,"aria-required":e.required||void 0,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readOnly||void 0,"aria-describedby":qt(t,r),"aria-errormessage":t}}function Uo(e,t){const{direction:r,wrap:a=!0,itemSelector:n='[role="option"], [role="tab"], [role="menuitem"], [role="radio"], button, a, [tabindex]'}=t;c.useEffect(()=>{const s=e.current;if(!s)return;const o=()=>Array.from(s.querySelectorAll(n)).filter(l=>!l.hasAttribute("disabled")&&l.getAttribute("aria-disabled")!=="true"),i=l=>{var b;const d=o();if(d.length===0)return;const u=document.activeElement,f=d.indexOf(u);if(f===-1)return;let p=-1;const g=r==="horizontal"||r==="both"||r==="grid",m=r==="vertical"||r==="both"||r==="grid";if(g&&l.key==="ArrowRight")p=f+1;else if(g&&l.key==="ArrowLeft")p=f-1;else if(m&&l.key==="ArrowDown")p=f+1;else if(m&&l.key==="ArrowUp")p=f-1;else if(l.key==="Home")p=0;else if(l.key==="End")p=d.length-1;else return;l.preventDefault(),a?p=(p%d.length+d.length)%d.length:p=Math.max(0,Math.min(d.length-1,p)),d.forEach((y,S)=>{y.tabIndex=S===p?0:-1}),(b=d[p])==null||b.focus()};return s.addEventListener("keydown",i),()=>s.removeEventListener("keydown",i)},[e,r,a,n])}function Go(e){const t=c.useRef(null);c.useEffect(()=>(e&&(t.current=document.activeElement),()=>{e&&t.current&&typeof t.current.focus=="function"&&t.current.focus()}),[e])}const Ut=({children:e,as:t="span"})=>c.createElement(t,{style:$e},e);Ut.displayName="NiceVisuallyHidden";const Gt=({targetId:e,children:t="Skip to main content"})=>x.jsx("a",{href:`#${e}`,className:"nice-skip-link",onClick:r=>{r.preventDefault();const a=document.getElementById(e);a&&(a.tabIndex=-1,a.focus())},children:t});Gt.displayName="NiceSkipLink";const Ko={submit:{key:"Enter",description:"Submit / Confirm",descriptionKey:"shortcuts.submit"},cancel:{key:"Escape",description:"Cancel / Close",descriptionKey:"shortcuts.cancel"},clear:{key:"Delete",description:"Clear value",descriptionKey:"shortcuts.clear",modifiers:["ctrl"]},moveUp:{key:"ArrowUp",description:"Move up",descriptionKey:"shortcuts.moveUp"},moveDown:{key:"ArrowDown",description:"Move down",descriptionKey:"shortcuts.moveDown"},moveLeft:{key:"ArrowLeft",description:"Move left",descriptionKey:"shortcuts.moveLeft"},moveRight:{key:"ArrowRight",description:"Move right",descriptionKey:"shortcuts.moveRight"},first:{key:"Home",description:"Go to first",descriptionKey:"shortcuts.first"},last:{key:"End",description:"Go to last",descriptionKey:"shortcuts.last"},pageUp:{key:"PageUp",description:"Page up",descriptionKey:"shortcuts.pageUp"},pageDown:{key:"PageDown",description:"Page down",descriptionKey:"shortcuts.pageDown"},selectAll:{key:"A",description:"Select all",descriptionKey:"shortcuts.selectAll",modifiers:["ctrl"]},toggleSelect:{key:"Space",description:"Toggle selection",descriptionKey:"shortcuts.toggleSelect"},undo:{key:"Z",description:"Undo",descriptionKey:"shortcuts.undo",modifiers:["ctrl"]},redo:{key:"Y",description:"Redo",descriptionKey:"shortcuts.redo",modifiers:["ctrl"]},copy:{key:"C",description:"Copy",descriptionKey:"shortcuts.copy",modifiers:["ctrl"]},paste:{key:"V",description:"Paste",descriptionKey:"shortcuts.paste",modifiers:["ctrl"]},cut:{key:"X",description:"Cut",descriptionKey:"shortcuts.cut",modifiers:["ctrl"]},edit:{key:"Enter",description:"Edit cell",descriptionKey:"shortcuts.edit"},tab:{key:"Tab",description:"Next cell",descriptionKey:"shortcuts.tab"},shiftTab:{key:"Tab",description:"Previous cell",descriptionKey:"shortcuts.shiftTab",modifiers:["shift"]},open:{key:"ArrowDown",description:"Open dropdown",descriptionKey:"shortcuts.open"},close:{key:"Escape",description:"Close popup",descriptionKey:"shortcuts.close"},increment:{key:"ArrowUp",description:"Increase value",descriptionKey:"shortcuts.increment"},decrement:{key:"ArrowDown",description:"Decrease value",descriptionKey:"shortcuts.decrement"},incrementBig:{key:"PageUp",description:"Increase by 10",descriptionKey:"shortcuts.incrementBig"},decrementBig:{key:"PageDown",description:"Decrease by 10",descriptionKey:"shortcuts.decrementBig"}};function Kt(e){var r,a,n,s;const t=[];return(r=e.modifiers)!=null&&r.includes("ctrl")&&t.push("Ctrl"),(a=e.modifiers)!=null&&a.includes("alt")&&t.push("Alt"),(n=e.modifiers)!=null&&n.includes("shift")&&t.push("Shift"),(s=e.modifiers)!=null&&s.includes("meta")&&t.push("⌘"),t.push(e.key),t.join("+")}function Jo(e,t){if(!(e.key===t.key||e.key.toLowerCase()===t.key.toLowerCase()))return!1;const a=t.modifiers??[];return!(a.includes("ctrl")!==(e.ctrlKey||e.metaKey)||a.includes("alt")!==e.altKey||a.includes("shift")!==e.shiftKey)}const Jt=({shortcuts:e,position:t="top",icon:r,size:a="sm",className:n})=>{const[s,o]=c.useState(!1),i=c.useRef(null),[l,d]=c.useState({top:0,left:0}),u=c.useCallback(()=>{if(!i.current)return;const g=i.current.getBoundingClientRect(),m=8;let b=0,y=0;switch(t){case"top":b=g.top-m,y=g.left+g.width/2;break;case"bottom":b=g.bottom+m,y=g.left+g.width/2;break;case"left":b=g.top+g.height/2,y=g.left-m;break;case"right":b=g.top+g.height/2,y=g.right+m;break}d({top:b,left:y})},[t]),f=c.useCallback(()=>{u(),o(!0)},[u]),p=c.useCallback(()=>{u(),o(!0)},[u]);return e.length===0?null:x.jsxs(x.Fragment,{children:[x.jsx("button",{ref:i,type:"button",className:`nice-keyboard-hint nice-keyboard-hint--${a} ${n||""}`,onMouseEnter:f,onMouseLeave:()=>o(!1),onFocus:p,onBlur:()=>o(!1),"aria-label":"Keyboard shortcuts",tabIndex:-1,children:r||"?"}),s&&x.jsxs("div",{className:`nice-keyboard-hint__tooltip nice-keyboard-hint__tooltip--${t}`,style:{position:"fixed",top:l.top,left:l.left,transform:t==="top"?"translate(-50%, -100%)":t==="bottom"?"translate(-50%, 0)":t==="left"?"translate(-100%, -50%)":"translate(0, -50%)"},role:"tooltip",children:[x.jsx("div",{className:"nice-keyboard-hint__title",children:"Keyboard Shortcuts"}),x.jsx("ul",{className:"nice-keyboard-hint__list",children:e.map((g,m)=>x.jsxs("li",{className:"nice-keyboard-hint__item",children:[x.jsx("kbd",{className:"nice-keyboard-hint__key",children:Kt(g)}),x.jsx("span",{className:"nice-keyboard-hint__desc",children:g.description})]},m))})]})]})};Jt.displayName="NiceKeyboardHint";function Yo(e={}){const{enabled:t=!1,onSubmit:r,preventDefault:a=!0,requireCtrl:n=!1,skipTextarea:s=!0}=e;return c.useCallback(o=>{!t||!r||o.key==="Enter"&&(n&&!o.ctrlKey&&!o.metaKey||s&&o.target.tagName==="TEXTAREA"||(a&&o.preventDefault(),r()))},[t,r,a,n,s])}function Qo(e={}){const{onClick:t,disabled:r=!1,role:a="button",tabIndex:n,triggerOnSpace:s=!0}=e,o=c.useCallback(d=>{r||t==null||t(d)},[r,t]),i=c.useCallback(d=>{if(r)return;const u=s&&(d.key===" "||d.key==="Spacebar");(d.key==="Enter"||u)&&(d.preventDefault(),t==null||t(d))},[r,t,s]),l={role:a,tabIndex:n??(r?-1:0),onClick:o,onKeyDown:i};return r&&(l["aria-disabled"]=!0),l}function Zo(e={}){const[t,r]=c.useState(!1),[a,n]=c.useState(""),s=c.useRef(null),o=typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window),i=c.useCallback(u=>{if(!e.commands)return;const f=u.toLowerCase().trim();for(const p of e.commands)if(typeof p.phrase=="string"){if(f===p.phrase.toLowerCase()){p.action([],u);return}}else{const g=u.match(p.phrase);if(g){p.action(Array.from(g),u);return}}},[e.commands]),l=c.useCallback(()=>{if(!o||t)return;const u=window.SpeechRecognition??window.webkitSpeechRecognition,f=new u;f.lang=e.language??"en-US",f.continuous=e.continuous??!0,f.interimResults=e.interimResults??!1,f.onresult=p=>{var y;const g=p.results[p.results.length-1],m=g[0].transcript,b=g.isFinal;n(m),(y=e.onTranscript)==null||y.call(e,m,b),b&&i(m)},f.onerror=p=>{var g;(g=e.onError)==null||g.call(e,p.error),p.error==="not-allowed"&&r(!1)},f.onend=()=>{if(t&&e.continuous)try{f.start()}catch{r(!1)}else r(!1)},s.current=f,f.start(),r(!0)},[o,t,e.language,e.continuous]),d=c.useCallback(()=>{var u;(u=s.current)==null||u.stop(),s.current=null,r(!1)},[]);return c.useEffect(()=>()=>d(),[]),{isListening:t,isSupported:o,start:l,stop:d,transcript:a}}function Yt(e={}){const[t,r]=c.useState(""),a=c.useRef(),n=c.useCallback(o=>{r(""),requestAnimationFrame(()=>{r(o),e.clearAfterMs&&(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r(""),e.clearAfterMs))})},[e.clearAfterMs]);c.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]);const s={role:"status","aria-live":e.politeness??"polite","aria-atomic":e.atomic??!0,"aria-relevant":e.relevant??"additions text",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap"}};return{message:t,announce:n,regionProps:s}}function ei(){const{announce:e,regionProps:t,message:r}=Yt({politeness:"assertive",clearAfterMs:3e3});return{announcePageChange:c.useCallback(n=>{e(`Nawigacja do: ${n}`),typeof document<"u"&&(document.title=n)},[e]),regionProps:t,message:r}}function ti(){const e=c.useRef(null),t=c.useCallback(()=>{var s;const n=(s=e.current)==null?void 0:s.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');n==null||n.focus()},[]),r=c.useCallback(n=>{var s,o;(o=(s=e.current)==null?void 0:s.querySelector(n))==null||o.focus()},[]),a=c.useCallback(()=>e.current?Array.from(e.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')):[],[]);return{containerRef:e,focusFirst:t,focusElement:r,getFocusableElements:a}}const gt={simplifiedMode:!1,increasedSpacing:!1,readingGuide:!1,enhancedFocus:!1,reduceMotion:!1,iconLabels:!1,largeTargets:!1,dyslexiaFont:!1,lineSpacing:1.5,wordSpacing:1};function ri(e=gt){const[t,r]=c.useState({...gt,...e}),a=c.useCallback((i,l)=>{r(d=>({...d,[i]:l}))},[]),n=ai(t),s=[t.simplifiedMode&&"nice-a11y-simplified",t.increasedSpacing&&"nice-a11y-spacing",t.enhancedFocus&&"nice-a11y-enhanced-focus",t.reduceMotion&&"nice-a11y-reduce-motion",t.iconLabels&&"nice-a11y-icon-labels",t.largeTargets&&"nice-a11y-large-targets",t.dyslexiaFont&&"nice-a11y-dyslexia"].filter(Boolean).join(" "),o={};return t.lineSpacing&&t.lineSpacing!==1.5&&(o.lineHeight=String(t.lineSpacing)),t.wordSpacing&&t.wordSpacing!==1&&(o.wordSpacing=`${(t.wordSpacing-1)*.25}em`),{settings:t,updateSetting:a,css:n,rootClasses:s,rootStyle:o}}function ai(e){const t=[];return e.simplifiedMode&&t.push(`
18
+ `,document.body.appendChild(a);const n=getComputedStyle(a);t({top:parseInt(n.paddingTop,10)||0,right:parseInt(n.paddingRight,10)||0,bottom:parseInt(n.paddingBottom,10)||0,left:parseInt(n.paddingLeft,10)||0}),document.body.removeChild(a)};return r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),()=>{window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r)}},[]),e}function jt(e="normal"){return typeof e=="number"?e:e==="fast"?120:e==="slow"?300:200}const $e={fade:"nice-anim-fade-enter",slideUp:"nice-anim-slide-up-enter",slideDown:"nice-anim-slide-down-enter",slideLeft:"nice-anim-slide-left-enter",slideRight:"nice-anim-slide-right-enter",scaleUp:"nice-anim-scale-up-enter",scaleDown:"nice-anim-scale-down-enter",zoom:"nice-anim-zoom-enter",flip:"nice-anim-flip-enter",none:""},Ot={fade:"nice-anim-fade-exit",slideUp:"nice-anim-slide-up-exit",slideDown:"nice-anim-slide-down-exit",slideLeft:"nice-anim-slide-left-exit",slideRight:"nice-anim-slide-right-exit",scaleUp:"nice-anim-scale-up-exit",scaleDown:"nice-anim-scale-down-exit",zoom:"nice-anim-zoom-exit",flip:"nice-anim-flip-exit",none:""};function Hs(e){const{visible:t,animation:r="fade",duration:a="normal",onEntered:n,onExited:o}=e,[s,i]=c.useState(t?"entered":"exited"),[l,d]=c.useState(t),u=c.useRef(),m=jt(a),g=c.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]),h=g||r==="none"?0:m;c.useEffect(()=>(u.current&&clearTimeout(u.current),t?(d(!0),i("entering"),u.current=setTimeout(()=>{i("entered"),n==null||n()},h)):(i("exiting"),u.current=setTimeout(()=>{i("exited"),d(!1),o==null||o()},h)),()=>{u.current&&clearTimeout(u.current)}),[t,h]);const f=c.useMemo(()=>r==="none"||g?"":s==="entering"?$e[r]:s==="exiting"?Ot[r]:s==="entered"?`${$e[r]} nice-anim-active`:"",[r,s,g]),y=c.useMemo(()=>({animationDuration:`${h}ms`,transitionDuration:`${h}ms`}),[h]);return{state:s,shouldRender:l,className:f,style:y}}function $s(e,t){const{expanded:r,duration:a="normal"}=t,[n,o]=c.useState(r?"auto":0),s=jt(a);return c.useEffect(()=>{const i=e.current;if(i)if(r){const l=i.scrollHeight;o(l);const d=setTimeout(()=>o("auto"),s);return()=>clearTimeout(d)}else{const l=i.scrollHeight;o(l),requestAnimationFrame(()=>{requestAnimationFrame(()=>o(0))})}},[r,s,e]),{overflow:"hidden",height:typeof n=="number"?`${n}px`:n,transition:`height ${s}ms ease`}}function js(e,t=50){return`${e*t}ms`}function Os(e,t){return t==="enter"?$e[e]:Ot[e]}const _t=c.createContext({direction:"ltr",isRTL:!1,flip:e=>e,flipStyle:(e,t)=>({[e]:t})}),Bt=({direction:e,children:t})=>{const r=c.useMemo(()=>e!=="auto"?e:typeof document<"u"&&document.documentElement.getAttribute("dir")==="rtl"?"rtl":"ltr",[e]),a=r==="rtl";c.useEffect(()=>(e!=="auto"&&(document.documentElement.setAttribute("dir",r),document.documentElement.style.direction=r),()=>{e!=="auto"&&(document.documentElement.removeAttribute("dir"),document.documentElement.style.direction="")}),[e,r]);const n=c.useCallback(i=>a?{left:"right",right:"left",start:"end",end:"start"}[i]??i:i,[a]),o=c.useCallback((i,l)=>a?{[{paddingLeft:"paddingRight",paddingRight:"paddingLeft",marginLeft:"marginRight",marginRight:"marginLeft"}[i]||i]:l}:{[i]:l},[a]),s=c.useMemo(()=>({direction:r,isRTL:a,flip:n,flipStyle:o}),[r,a,n,o]);return x.jsx(_t.Provider,{value:s,children:x.jsx("div",{dir:r,style:{direction:r,display:"contents"},children:t})})};Bt.displayName="NiceRTLProvider";function _s(){return c.useContext(_t)}const Bs={marginStart:"marginInlineStart",marginEnd:"marginInlineEnd",paddingStart:"paddingInlineStart",paddingEnd:"paddingInlineEnd",borderStart:"borderInlineStart",borderEnd:"borderInlineEnd",insetStart:"insetInlineStart",insetEnd:"insetInlineEnd",start:"insetInlineStart",end:"insetInlineEnd",textAlign:{start:"start",end:"end"}},Wt=c.createContext({permissions:{},getAccessMode:()=>"full"}),Vt=({permissions:e,children:t})=>{const r=c.useMemo(()=>({permissions:e,getAccessMode:(a,n)=>{var o,s;return n&&a&&((o=e.fields)!=null&&o[`${a}.${n}`])?e.fields[`${a}.${n}`]:a&&((s=e.components)!=null&&s[a])?e.components[a]:e.defaultMode??"full"}}),[e]);return x.jsx(Wt.Provider,{value:r,children:t})};Vt.displayName="NiceAccessControl";function Ws(e,t,r){const a=c.useContext(Wt);return e||a.getAccessMode(t,r)}function Vs(e){switch(e){case"disabled":return{disabled:!0,"aria-disabled":!0,tabIndex:-1};case"readOnly":return{readOnly:!0};default:return{}}}function Xs(e={}){const{threshold:t=50,maxDuration:r=300,onSwipe:a,onSwipeLeft:n,onSwipeRight:o,onSwipeUp:s,onSwipeDown:i,enabled:l=!0}=e,d=c.useRef(null),[u,m]=c.useState(!1),[g,h]=c.useState(null),f=c.useRef(null);return c.useEffect(()=>{const y=d.current;if(!y||!l)return;const p=w=>{if(w.touches.length!==1)return;const E=w.touches[0];f.current={x:E.clientX,y:E.clientY,timestamp:Date.now()},m(!0),h(null)},S=w=>{if(!f.current||w.touches.length!==1)return;const E=w.touches[0],k=E.clientX-f.current.x,M=E.clientY-f.current.y;Math.abs(k)>Math.abs(M)?h(k>0?"right":"left"):h(M>0?"down":"up")},b=w=>{if(!f.current)return;const E=w.changedTouches[0],k={x:E.clientX,y:E.clientY,timestamp:Date.now()},M=k.x-f.current.x,C=k.y-f.current.y,A=k.timestamp-f.current.timestamp,T=Math.sqrt(M*M+C*C),N=T/A;if(m(!1),A<=r&&T>=t){let R;Math.abs(M)>Math.abs(C)?R=M>0?"right":"left":R=C>0?"down":"up";const I={direction:R,distance:T,velocity:N,duration:A};switch(a==null||a(I),R){case"left":n==null||n(I);break;case"right":o==null||o(I);break;case"up":s==null||s(I);break;case"down":i==null||i(I);break}}f.current=null,h(null)},v=()=>{f.current=null,m(!1),h(null)};return y.addEventListener("touchstart",p,{passive:!0}),y.addEventListener("touchmove",S,{passive:!0}),y.addEventListener("touchend",b,{passive:!0}),y.addEventListener("touchcancel",v,{passive:!0}),()=>{y.removeEventListener("touchstart",p),y.removeEventListener("touchmove",S),y.removeEventListener("touchend",b),y.removeEventListener("touchcancel",v)}},[l,t,r,a,n,o,s,i]),{ref:d,isSwiping:u,swipeDirection:g}}function Us(e={}){const{onPinch:t,onPinchStart:r,onPinchEnd:a,minScale:n=.5,maxScale:o=3,enabled:s=!0}=e,i=c.useRef(null),[l,d]=c.useState(1),[u,m]=c.useState(!1),g=c.useRef(null),h=c.useRef(1);return c.useEffect(()=>{const f=i.current;if(!f||!s)return;const y=(w,E)=>{const k=w.clientX-E.clientX,M=w.clientY-E.clientY;return Math.sqrt(k*k+M*M)},p=(w,E)=>({x:(w.clientX+E.clientX)/2,y:(w.clientY+E.clientY)/2}),S=w=>{w.touches.length===2&&(g.current=y(w.touches[0],w.touches[1]),h.current=l,m(!0),r==null||r())},b=w=>{if(w.touches.length!==2||!g.current)return;const E=y(w.touches[0],w.touches[1]),k=Math.min(o,Math.max(n,h.current*(E/g.current)));d(k),t==null||t({scale:k,center:p(w.touches[0],w.touches[1])})},v=()=>{u&&(m(!1),a==null||a(l),g.current=null)};return f.addEventListener("touchstart",S,{passive:!0}),f.addEventListener("touchmove",b,{passive:!0}),f.addEventListener("touchend",v,{passive:!0}),f.addEventListener("touchcancel",v,{passive:!0}),()=>{f.removeEventListener("touchstart",S),f.removeEventListener("touchmove",b),f.removeEventListener("touchend",v),f.removeEventListener("touchcancel",v)}},[s,l,u,n,o,t,r,a]),{ref:i,scale:l,isPinching:u}}function qs(e={}){const{onPan:t,onPanStart:r,onPanEnd:a,enabled:n=!0}=e,o=c.useRef(null),[s,i]=c.useState(!1),[l,d]=c.useState(0),[u,m]=c.useState(0),g=c.useRef(null),h=c.useRef(null);return c.useEffect(()=>{const f=o.current;if(!f||!n)return;const y=b=>{if(b.touches.length!==1)return;const v=b.touches[0],w={x:v.clientX,y:v.clientY,timestamp:Date.now()};g.current=w,h.current=w,i(!0),d(0),m(0),r==null||r()},p=b=>{if(!g.current||!h.current||b.touches.length!==1)return;const v=b.touches[0],w=Date.now(),E={x:v.clientX,y:v.clientY,timestamp:w},k=E.x-g.current.x,M=E.y-g.current.y,C=E.timestamp-h.current.timestamp||1,A=(E.x-h.current.x)/C,T=(E.y-h.current.y)/C;d(k),m(M),t==null||t({deltaX:k,deltaY:M,velocityX:A,velocityY:T}),h.current=E},S=()=>{if(!s||!g.current||!h.current)return;const b=l,v=u,w=h.current.timestamp-g.current.timestamp||1;a==null||a({deltaX:b,deltaY:v,velocityX:b/w,velocityY:v/w}),i(!1),g.current=null,h.current=null};return f.addEventListener("touchstart",y,{passive:!0}),f.addEventListener("touchmove",p,{passive:!0}),f.addEventListener("touchend",S,{passive:!0}),f.addEventListener("touchcancel",S,{passive:!0}),()=>{f.removeEventListener("touchstart",y),f.removeEventListener("touchmove",p),f.removeEventListener("touchend",S),f.removeEventListener("touchcancel",S)}},[n,s,l,u,t,r,a]),{ref:o,isPanning:s,deltaX:l,deltaY:u}}function Xt(e){const{onRefresh:t,threshold:r=80,maxPull:a=120,enabled:n=!0}=e,o=c.useRef(null),[s,i]=c.useState(!1),[l,d]=c.useState(!1),[u,m]=c.useState(0),g=c.useRef(null),h=Math.min(1,u/r);return c.useEffect(()=>{const f=o.current;if(!f||!n||l)return;const y=b=>{f.scrollTop>0||b.touches.length===1&&(g.current=b.touches[0].clientY)},p=b=>{if(g.current===null||b.touches.length!==1)return;const w=b.touches[0].clientY-g.current;if(w<=0){m(0),i(!1);return}const k=Math.min(a,w*.5);m(k),i(k>0),k>0&&b.preventDefault()},S=async()=>{if(u>=r&&!l){d(!0),m(r);try{await t()}finally{d(!1),m(0)}}else m(0);i(!1),g.current=null};return f.addEventListener("touchstart",y,{passive:!0}),f.addEventListener("touchmove",p,{passive:!1}),f.addEventListener("touchend",S,{passive:!0}),f.addEventListener("touchcancel",S,{passive:!0}),()=>{f.removeEventListener("touchstart",y),f.removeEventListener("touchmove",p),f.removeEventListener("touchend",S),f.removeEventListener("touchcancel",S)}},[n,l,u,r,a,t]),{ref:o,isPulling:s,isRefreshing:l,pullDistance:u,pullProgress:h}}const Gs=({children:e,leftActions:t=[],rightActions:r=[],actionWidth:a=80,maxSwipe:n=1.5,threshold:o=.5,className:s,style:i})=>{const l=c.useRef(null),d=c.useRef(null),[u,m]=c.useState(0),[g,h]=c.useState(!1),f=c.useRef(0),y=c.useRef(0),p=t.length*a,S=r.length*a,b=p*n,v=S*n,w=c.useCallback(A=>{h(!1),f.current=A.touches[0].clientX,y.current=u},[u]),E=c.useCallback(A=>{const T=A.touches[0].clientX-f.current;let N=y.current+T;N>b?N=b+(N-b)*.2:N<-v&&(N=-v+(N+v)*.2),!(N>0&&t.length===0)&&(N<0&&r.length===0||m(N))},[b,v,t.length,r.length]),k=c.useCallback(()=>{h(!0),u>p*o?m(p):u<-S*o?m(-S):m(0)},[u,p,S,o]),M=c.useCallback(A=>{h(!0),m(0),A.onAction()},[]),C=c.useCallback(()=>{h(!0),m(0)},[]);return x.jsxs("div",{ref:l,className:`nice-swipeable ${s||""}`,style:{...i,position:"relative",overflow:"hidden"},children:[x.jsx("div",{className:"nice-swipeable__actions nice-swipeable__actions--left",style:{position:"absolute",left:0,top:0,bottom:0,display:"flex",width:p},children:t.map(A=>x.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:A.color,border:"none",color:"var(--bg-primary, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>M(A),children:A.content},A.key))}),x.jsx("div",{className:"nice-swipeable__actions nice-swipeable__actions--right",style:{position:"absolute",right:0,top:0,bottom:0,display:"flex",width:S},children:r.map(A=>x.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:A.color,border:"none",color:"var(--bg-primary, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>M(A),children:A.content},A.key))}),x.jsx("div",{ref:d,className:"nice-swipeable__content",style:{transform:`translateX(${u}px)`,transition:g?"transform 0.3s ease-out":"none",background:"var(--bg-primary, #fff)",position:"relative",zIndex:1},onTouchStart:w,onTouchMove:E,onTouchEnd:k,onClick:u!==0?C:void 0,children:e})]})},Ks=({children:e,onRefresh:t,threshold:r=80,pullingContent:a,refreshingContent:n,enabled:o=!0,className:s,style:i})=>{const{ref:l,isPulling:d,isRefreshing:u,pullDistance:m,pullProgress:g}=Xt({onRefresh:t,threshold:r,enabled:o});return x.jsxs("div",{ref:l,className:`nice-pull-refresh ${s||""}`,style:{...i,position:"relative",overflow:"auto",overscrollBehavior:"contain"},children:[x.jsx("div",{className:"nice-pull-refresh__indicator",style:{position:"absolute",top:0,left:0,right:0,display:"flex",justifyContent:"center",alignItems:"center",height:m,overflow:"hidden",transition:d?"none":"height 0.2s ease-out"},children:u?n||x.jsx("div",{className:"nice-pull-refresh__spinner",children:x.jsx("div",{className:"nice-spinner nice-spinner--sm"})}):a||x.jsx("div",{className:"nice-pull-refresh__arrow",style:{transform:`rotate(${g>=1?180:0}deg)`,transition:"transform 0.2s ease",opacity:g},children:x.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})})})}),x.jsx("div",{className:"nice-pull-refresh__content",style:{transform:`translateY(${m}px)`,transition:d?"none":"transform 0.2s ease-out"},children:e})]})};function Ut(e="light"){if(!("vibrate"in navigator))return;const t={light:10,medium:20,heavy:30,selection:5,success:[10,30,10],warning:[20,20,20],error:[30,30,30,30]};try{navigator.vibrate(t[e])}catch{}}function Js(){return c.useCallback((e="light")=>{Ut(e)},[])}const Ys=({minSize:e=44,children:t,className:r,style:a,onClick:n})=>x.jsx("div",{className:`nice-touch-target ${r||""}`,style:{...a,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:e,minHeight:e,cursor:n?"pointer":void 0},onClick:n,children:t});function Qs(){const[e,t]=c.useState(!1),[r,a]=c.useState(0),n=c.useRef(typeof window<"u"?window.innerHeight:0);return c.useEffect(()=>{if(typeof window>"u")return;if("visualViewport"in window&&window.visualViewport){const s=window.visualViewport,i=()=>{const l=n.current-s.height,d=150;t(l>d),a(l>d?l:0)};return s.addEventListener("resize",i),()=>s.removeEventListener("resize",i)}const o=()=>{const s=n.current-window.innerHeight,i=150;t(s>i),a(s>i?s:0)};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[]),{isKeyboardVisible:e,keyboardHeight:r}}const qt={announceChanges:!0,reduceMotion:"auto",highContrast:"auto",focusStyle:"auto",keyboardShortcuts:!0,minTouchTarget:44},Gt=c.createContext(null),Kt=({config:e,children:t})=>{const r=c.useMemo(()=>({...qt,...e}),[e]),a=c.useRef(null),n=c.useRef(null),[o,s]=c.useState(!1);c.useEffect(()=>{const h=window.matchMedia("(prefers-reduced-motion: reduce)");s(h.matches);const f=y=>s(y.matches);return h.addEventListener("change",f),()=>h.removeEventListener("change",f)},[]);const[i,l]=c.useState(!1);c.useEffect(()=>{const h=window.matchMedia("(prefers-contrast: more)");l(h.matches);const f=y=>l(y.matches);return h.addEventListener("change",f),()=>h.removeEventListener("change",f)},[]);const d=r.reduceMotion==="always"?!0:r.reduceMotion==="never"?!1:o,u=r.highContrast==="always"?!0:r.highContrast==="never"?!1:i,m=c.useCallback((h,f="polite")=>{if(!r.announceChanges)return;const y=f==="assertive"?n.current:a.current;y&&(y.textContent="",requestAnimationFrame(()=>{y.textContent=h}))},[r.announceChanges]),g=c.useMemo(()=>({config:r,announce:m,prefersReducedMotion:d,prefersHighContrast:u}),[r,m,d,u]);return x.jsxs(Gt.Provider,{value:g,children:[t,x.jsx("div",{ref:a,role:"status","aria-live":"polite","aria-atomic":"true",style:je}),x.jsx("div",{ref:n,role:"alert","aria-live":"assertive","aria-atomic":"true",style:je})]})};Kt.displayName="NiceA11yProvider";function Zs(){const e=c.useContext(Gt);return e||{config:qt,announce:()=>{},prefersReducedMotion:!1,prefersHighContrast:!1}}const je={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0};function Jt(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function ei(e){const t=e.error?`${e.id}-error`:void 0,r=e.helperText?`${e.id}-helper`:void 0;return{"aria-invalid":e.error?!0:void 0,"aria-required":e.required||void 0,"aria-disabled":e.disabled||void 0,"aria-readonly":e.readOnly||void 0,"aria-describedby":Jt(t,r),"aria-errormessage":t}}function ti(e,t){const{direction:r,wrap:a=!0,itemSelector:n='[role="option"], [role="tab"], [role="menuitem"], [role="radio"], button, a, [tabindex]'}=t;c.useEffect(()=>{const o=e.current;if(!o)return;const s=()=>Array.from(o.querySelectorAll(n)).filter(l=>!l.hasAttribute("disabled")&&l.getAttribute("aria-disabled")!=="true"),i=l=>{var y;const d=s();if(d.length===0)return;const u=document.activeElement,m=d.indexOf(u);if(m===-1)return;let g=-1;const h=r==="horizontal"||r==="both"||r==="grid",f=r==="vertical"||r==="both"||r==="grid";if(h&&l.key==="ArrowRight")g=m+1;else if(h&&l.key==="ArrowLeft")g=m-1;else if(f&&l.key==="ArrowDown")g=m+1;else if(f&&l.key==="ArrowUp")g=m-1;else if(l.key==="Home")g=0;else if(l.key==="End")g=d.length-1;else return;l.preventDefault(),a?g=(g%d.length+d.length)%d.length:g=Math.max(0,Math.min(d.length-1,g)),d.forEach((p,S)=>{p.tabIndex=S===g?0:-1}),(y=d[g])==null||y.focus()};return o.addEventListener("keydown",i),()=>o.removeEventListener("keydown",i)},[e,r,a,n])}function ri(e){const t=c.useRef(null);c.useEffect(()=>(e&&(t.current=document.activeElement),()=>{e&&t.current&&typeof t.current.focus=="function"&&t.current.focus()}),[e])}const Yt=({children:e,as:t="span"})=>c.createElement(t,{style:je},e);Yt.displayName="NiceVisuallyHidden";const Qt=({targetId:e,children:t="Skip to main content"})=>x.jsx("a",{href:`#${e}`,className:"nice-skip-link",onClick:r=>{r.preventDefault();const a=document.getElementById(e);a&&(a.tabIndex=-1,a.focus())},children:t});Qt.displayName="NiceSkipLink";const ai={submit:{key:"Enter",description:"Submit / Confirm",descriptionKey:"shortcuts.submit"},cancel:{key:"Escape",description:"Cancel / Close",descriptionKey:"shortcuts.cancel"},clear:{key:"Delete",description:"Clear value",descriptionKey:"shortcuts.clear",modifiers:["ctrl"]},moveUp:{key:"ArrowUp",description:"Move up",descriptionKey:"shortcuts.moveUp"},moveDown:{key:"ArrowDown",description:"Move down",descriptionKey:"shortcuts.moveDown"},moveLeft:{key:"ArrowLeft",description:"Move left",descriptionKey:"shortcuts.moveLeft"},moveRight:{key:"ArrowRight",description:"Move right",descriptionKey:"shortcuts.moveRight"},first:{key:"Home",description:"Go to first",descriptionKey:"shortcuts.first"},last:{key:"End",description:"Go to last",descriptionKey:"shortcuts.last"},pageUp:{key:"PageUp",description:"Page up",descriptionKey:"shortcuts.pageUp"},pageDown:{key:"PageDown",description:"Page down",descriptionKey:"shortcuts.pageDown"},selectAll:{key:"A",description:"Select all",descriptionKey:"shortcuts.selectAll",modifiers:["ctrl"]},toggleSelect:{key:"Space",description:"Toggle selection",descriptionKey:"shortcuts.toggleSelect"},undo:{key:"Z",description:"Undo",descriptionKey:"shortcuts.undo",modifiers:["ctrl"]},redo:{key:"Y",description:"Redo",descriptionKey:"shortcuts.redo",modifiers:["ctrl"]},copy:{key:"C",description:"Copy",descriptionKey:"shortcuts.copy",modifiers:["ctrl"]},paste:{key:"V",description:"Paste",descriptionKey:"shortcuts.paste",modifiers:["ctrl"]},cut:{key:"X",description:"Cut",descriptionKey:"shortcuts.cut",modifiers:["ctrl"]},edit:{key:"Enter",description:"Edit cell",descriptionKey:"shortcuts.edit"},tab:{key:"Tab",description:"Next cell",descriptionKey:"shortcuts.tab"},shiftTab:{key:"Tab",description:"Previous cell",descriptionKey:"shortcuts.shiftTab",modifiers:["shift"]},open:{key:"ArrowDown",description:"Open dropdown",descriptionKey:"shortcuts.open"},close:{key:"Escape",description:"Close popup",descriptionKey:"shortcuts.close"},increment:{key:"ArrowUp",description:"Increase value",descriptionKey:"shortcuts.increment"},decrement:{key:"ArrowDown",description:"Decrease value",descriptionKey:"shortcuts.decrement"},incrementBig:{key:"PageUp",description:"Increase by 10",descriptionKey:"shortcuts.incrementBig"},decrementBig:{key:"PageDown",description:"Decrease by 10",descriptionKey:"shortcuts.decrementBig"}};function Zt(e){var r,a,n,o;const t=[];return(r=e.modifiers)!=null&&r.includes("ctrl")&&t.push("Ctrl"),(a=e.modifiers)!=null&&a.includes("alt")&&t.push("Alt"),(n=e.modifiers)!=null&&n.includes("shift")&&t.push("Shift"),(o=e.modifiers)!=null&&o.includes("meta")&&t.push("⌘"),t.push(e.key),t.join("+")}function ni(e,t){if(!(e.key===t.key||e.key.toLowerCase()===t.key.toLowerCase()))return!1;const a=t.modifiers??[];return!(a.includes("ctrl")!==(e.ctrlKey||e.metaKey)||a.includes("alt")!==e.altKey||a.includes("shift")!==e.shiftKey)}const er=({shortcuts:e,position:t="top",icon:r,size:a="sm",className:n})=>{const[o,s]=c.useState(!1),i=c.useRef(null),[l,d]=c.useState({top:0,left:0}),u=c.useCallback(()=>{if(!i.current)return;const h=i.current.getBoundingClientRect(),f=8;let y=0,p=0;switch(t){case"top":y=h.top-f,p=h.left+h.width/2;break;case"bottom":y=h.bottom+f,p=h.left+h.width/2;break;case"left":y=h.top+h.height/2,p=h.left-f;break;case"right":y=h.top+h.height/2,p=h.right+f;break}d({top:y,left:p})},[t]),m=c.useCallback(()=>{u(),s(!0)},[u]),g=c.useCallback(()=>{u(),s(!0)},[u]);return e.length===0?null:x.jsxs(x.Fragment,{children:[x.jsx("button",{ref:i,type:"button",className:`nice-keyboard-hint nice-keyboard-hint--${a} ${n||""}`,onMouseEnter:m,onMouseLeave:()=>s(!1),onFocus:g,onBlur:()=>s(!1),"aria-label":"Keyboard shortcuts",tabIndex:-1,children:r||"?"}),o&&x.jsxs("div",{className:`nice-keyboard-hint__tooltip nice-keyboard-hint__tooltip--${t}`,style:{position:"fixed",top:l.top,left:l.left,transform:t==="top"?"translate(-50%, -100%)":t==="bottom"?"translate(-50%, 0)":t==="left"?"translate(-100%, -50%)":"translate(0, -50%)"},role:"tooltip",children:[x.jsx("div",{className:"nice-keyboard-hint__title",children:"Keyboard Shortcuts"}),x.jsx("ul",{className:"nice-keyboard-hint__list",children:e.map((h,f)=>x.jsxs("li",{className:"nice-keyboard-hint__item",children:[x.jsx("kbd",{className:"nice-keyboard-hint__key",children:Zt(h)}),x.jsx("span",{className:"nice-keyboard-hint__desc",children:h.description})]},f))})]})]})};er.displayName="NiceKeyboardHint";function oi(e={}){const{enabled:t=!1,onSubmit:r,preventDefault:a=!0,requireCtrl:n=!1,skipTextarea:o=!0}=e;return c.useCallback(s=>{!t||!r||s.key==="Enter"&&(n&&!s.ctrlKey&&!s.metaKey||o&&s.target.tagName==="TEXTAREA"||(a&&s.preventDefault(),r()))},[t,r,a,n,o])}function si(e={}){const{onClick:t,disabled:r=!1,role:a,tabIndex:n,triggerOnSpace:o=!0,as:s,selected:i}=e,l=a??s??"button",d=c.useCallback(g=>{r||t==null||t(g)},[r,t]),u=c.useCallback(g=>{if(r)return;const h=o&&(g.key===" "||g.key==="Spacebar");(g.key==="Enter"||h)&&(g.preventDefault(),t==null||t(g))},[r,t,o]),m={role:l,tabIndex:n??(r?-1:0),onClick:d,onKeyDown:u};return r&&(m["aria-disabled"]=!0),i!==void 0&&(l==="option"||l==="tab"||l==="row")&&(m["aria-selected"]=i),m}function ii(e={}){const[t,r]=c.useState(!1),[a,n]=c.useState(""),o=c.useRef(null),s=typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window),i=c.useCallback(u=>{if(!e.commands)return;const m=u.toLowerCase().trim();for(const g of e.commands)if(typeof g.phrase=="string"){if(m===g.phrase.toLowerCase()){g.action([],u);return}}else{const h=u.match(g.phrase);if(h){g.action(Array.from(h),u);return}}},[e.commands]),l=c.useCallback(()=>{if(!s||t)return;const u=window.SpeechRecognition??window.webkitSpeechRecognition,m=new u;m.lang=e.language??"en-US",m.continuous=e.continuous??!0,m.interimResults=e.interimResults??!1,m.onresult=g=>{var p;const h=g.results[g.results.length-1],f=h[0].transcript,y=h.isFinal;n(f),(p=e.onTranscript)==null||p.call(e,f,y),y&&i(f)},m.onerror=g=>{var h;(h=e.onError)==null||h.call(e,g.error),g.error==="not-allowed"&&r(!1)},m.onend=()=>{if(t&&e.continuous)try{m.start()}catch{r(!1)}else r(!1)},o.current=m,m.start(),r(!0)},[s,t,e.language,e.continuous]),d=c.useCallback(()=>{var u;(u=o.current)==null||u.stop(),o.current=null,r(!1)},[]);return c.useEffect(()=>()=>d(),[]),{isListening:t,isSupported:s,start:l,stop:d,transcript:a}}function tr(e={}){const[t,r]=c.useState(""),a=c.useRef(),n=c.useCallback(s=>{r(""),requestAnimationFrame(()=>{r(s),e.clearAfterMs&&(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r(""),e.clearAfterMs))})},[e.clearAfterMs]);c.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]);const o={role:"status","aria-live":e.politeness??"polite","aria-atomic":e.atomic??!0,"aria-relevant":e.relevant??"additions text",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap"}};return{message:t,announce:n,regionProps:o}}function ci(){const{announce:e,regionProps:t,message:r}=tr({politeness:"assertive",clearAfterMs:3e3});return{announcePageChange:c.useCallback(n=>{e(`Nawigacja do: ${n}`),typeof document<"u"&&(document.title=n)},[e]),regionProps:t,message:r}}function li(){const e=c.useRef(null),t=c.useCallback(()=>{var o;const n=(o=e.current)==null?void 0:o.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');n==null||n.focus()},[]),r=c.useCallback(n=>{var o,s;(s=(o=e.current)==null?void 0:o.querySelector(n))==null||s.focus()},[]),a=c.useCallback(()=>e.current?Array.from(e.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')):[],[]);return{containerRef:e,focusFirst:t,focusElement:r,getFocusableElements:a}}const yt={simplifiedMode:!1,increasedSpacing:!1,readingGuide:!1,enhancedFocus:!1,reduceMotion:!1,iconLabels:!1,largeTargets:!1,dyslexiaFont:!1,lineSpacing:1.5,wordSpacing:1};function di(e=yt){const[t,r]=c.useState({...yt,...e}),a=c.useCallback((i,l)=>{r(d=>({...d,[i]:l}))},[]),n=ui(t),o=[t.simplifiedMode&&"nice-a11y-simplified",t.increasedSpacing&&"nice-a11y-spacing",t.enhancedFocus&&"nice-a11y-enhanced-focus",t.reduceMotion&&"nice-a11y-reduce-motion",t.iconLabels&&"nice-a11y-icon-labels",t.largeTargets&&"nice-a11y-large-targets",t.dyslexiaFont&&"nice-a11y-dyslexia"].filter(Boolean).join(" "),s={};return t.lineSpacing&&t.lineSpacing!==1.5&&(s.lineHeight=String(t.lineSpacing)),t.wordSpacing&&t.wordSpacing!==1&&(s.wordSpacing=`${(t.wordSpacing-1)*.25}em`),{settings:t,updateSetting:a,css:n,rootClasses:o,rootStyle:s}}function ui(e){const t=[];return e.simplifiedMode&&t.push(`
19
19
  .nice-a11y-simplified .nice-secondary,
20
20
  .nice-a11y-simplified .nice-decorative,
21
21
  .nice-a11y-simplified [role="presentation"] { display: none !important; }
22
- .nice-a11y-simplified .nice-card { box-shadow: none !important; border: 2px solid #333 !important; }`),e.increasedSpacing&&t.push(`
22
+ .nice-a11y-simplified .nice-card { box-shadow: none !important; border: 2px solid var(--nice-text, #333) !important; }`),e.increasedSpacing&&t.push(`
23
23
  .nice-a11y-spacing button,
24
24
  .nice-a11y-spacing input,
25
25
  .nice-a11y-spacing select,
26
- .nice-a11y-spacing [role="button"] { margin: 8px !important; }`),e.enhancedFocus&&t.push(`
27
- .nice-a11y-enhanced-focus *:focus { outline: 4px solid #0066ff !important; outline-offset: 4px !important; }
26
+ .nice-a11y-spacing [role="button"] { margin: var(--nice-space-2, 8px) !important; }`),e.enhancedFocus&&t.push(`
27
+ .nice-a11y-enhanced-focus *:focus { outline: 4px solid var(--nice-primary, #0066ff) !important; outline-offset: 4px !important; }
28
28
  .nice-a11y-enhanced-focus *:focus-visible { box-shadow: 0 0 0 6px rgba(0,102,255,0.3) !important; }`),e.reduceMotion&&t.push(`
29
29
  .nice-a11y-reduce-motion *, .nice-a11y-reduce-motion *::before, .nice-a11y-reduce-motion *::after {
30
30
  animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
@@ -35,10 +35,10 @@
35
35
  min-height: 56px !important; min-width: 56px !important; font-size: 18px !important;
36
36
  }`),e.dyslexiaFont&&t.push(`
37
37
  .nice-a11y-dyslexia { font-family: 'OpenDyslexic', 'Comic Sans MS', sans-serif !important; letter-spacing: 0.05em !important; }`),t.join(`
38
- `)}function ni(e,t,r=!1){const a=ht(yt(e)),n=ht(yt(t)),s=oi(a,n),o=r?4.5:7;return{rule:"1.4.6",level:"AAA",passed:s>=o,message:`Contrast ratio ${s.toFixed(2)}:1 (requires ${o}:1 for AAA${r?" large text":""})`}}function si(){if(typeof document>"u")return[];const e=[];return document.querySelectorAll("a").forEach(r=>{var o;const a=((o=r.textContent)==null?void 0:o.trim())??"",n=!!r.getAttribute("aria-label");["click here","read more","learn more","here","link"].includes(a.toLowerCase())&&!n&&e.push({rule:"2.4.9",level:"AAA",passed:!1,message:`Link with generic text "${a}" lacks descriptive label`,element:r.outerHTML.slice(0,100)})}),document.querySelectorAll("h1, h2, h3, h4, h5, h6"),document.querySelectorAll("section, article, main, aside").forEach(r=>{r.querySelector("h1, h2, h3, h4, h5, h6")||e.push({rule:"2.4.10",level:"AAA",passed:!1,message:`<${r.tagName.toLowerCase()}> lacks a heading element`,element:r.tagName.toLowerCase()})}),document.querySelectorAll("p, li, td, span").forEach(r=>{const a=window.getComputedStyle(r),n=parseFloat(a.width),s=parseFloat(a.fontSize);s>0&&n/s>80&&e.push({rule:"1.4.8",level:"AAA",passed:!1,message:`Text block exceeds 80 character width (${Math.round(n/s)} chars)`,element:r.tagName.toLowerCase()})}),document.querySelectorAll('input[type="checkbox"], input[type="radio"], select').forEach(r=>{r.hasAttribute("onchange")&&e.push({rule:"3.2.5",level:"AAA",passed:!1,message:"Form control has inline onchange handler — may cause unexpected context change",element:r.tagName.toLowerCase()})}),document.querySelectorAll("video[autoplay], audio[autoplay]").forEach(r=>{e.push({rule:"2.2.3",level:"AAA",passed:!1,message:"Auto-playing media found — user should control timing",element:r.tagName.toLowerCase()})}),e}function yt(e){if(e.startsWith("#")){const t=e.slice(1),r=parseInt(t.slice(0,2),16)/255,a=parseInt(t.slice(2,4),16)/255,n=parseInt(t.slice(4,6),16)/255;return[r,a,n]}return[0,0,0]}function ht([e,t,r]){const a=n=>n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4);return .2126*a(e)+.7152*a(t)+.0722*a(r)}function oi(e,t){const r=Math.max(e,t),a=Math.min(e,t);return(r+.05)/(a+.05)}const ii=["none","protanopia","protanomaly","deuteranopia","deuteranomaly","tritanopia","tritanomaly","achromatopsia","achromatomaly"],bt="nice2dev-color-blind-filters",St="nice2dev-color-blind-styles",je={protanopia:"0.567 0.433 0 0 0 0.558 0.442 0 0 0 0 0.242 0.758 0 0 0 0 0 1 0",protanomaly:"0.817 0.183 0 0 0 0.333 0.667 0 0 0 0 0.125 0.875 0 0 0 0 0 1 0",deuteranopia:"0.625 0.375 0 0 0 0.7 0.3 0 0 0 0 0.3 0.7 0 0 0 0 0 1 0",deuteranomaly:"0.8 0.2 0 0 0 0.258 0.742 0 0 0 0 0.142 0.858 0 0 0 0 0 1 0",tritanopia:"0.95 0.05 0 0 0 0 0.433 0.567 0 0 0 0.475 0.525 0 0 0 0 0 1 0",tritanomaly:"0.967 0.033 0 0 0 0 0.733 0.267 0 0 0 0.183 0.817 0 0 0 0 0 1 0",achromatopsia:"0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0 0 0 1 0",achromatomaly:"0.618 0.320 0.062 0 0 0.163 0.775 0.062 0 0 0.163 0.320 0.516 0 0 0 0 0 1 0"};function ci(){if(typeof document>"u"||document.getElementById(bt))return;const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.id=bt,t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false"),t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.overflow="hidden";const r=document.createElementNS(e,"defs");for(const[a,n]of Object.entries(je)){const s=document.createElementNS(e,"filter");s.id=`nice-cb-${a}`,s.setAttribute("color-interpolation-filters","sRGB");const o=document.createElementNS(e,"feColorMatrix");o.setAttribute("type","matrix"),o.setAttribute("values",n),s.appendChild(o),r.appendChild(s)}if(t.appendChild(r),document.body.appendChild(t),!document.getElementById(St)){const a=document.createElement("style");a.id=St,a.textContent=Object.keys(je).map(n=>`.nice-color-blind-${n}{filter:url(#nice-cb-${n})!important;}`).join(""),document.head.appendChild(a)}}function Ke(e){for(const t of Object.keys(je))e.classList.remove(`nice-color-blind-${t}`)}function Je(e,t=typeof document<"u"?document.documentElement:null){t&&(ci(),Ke(t),e!=="none"&&t.classList.add(`nice-color-blind-${e}`))}function li(e,t={}){const{target:r}=t,a=c.useRef(null);c.useEffect(()=>{const n=r??(typeof document<"u"?document.documentElement:null);return a.current=n,Je(e,n),()=>{const s=a.current;s&&Ke(s)}},[e,r])}function di(e=typeof document<"u"?document.documentElement:null){return{set:t=>Je(t,e),clear:()=>{e&&Ke(e)}}}const ui=e=>[...e],fi=()=>{const e=new Map;return{getItem:t=>Promise.resolve(e.get(t)),setItem:(t,r)=>(e.set(t,r),Promise.resolve())}};function mi(e={}){const t=e.permissionPolicy??ui,r=e.storage??fi(),a=e.logger,n=new Map,s=new Map,o=new Map,i=(d,u)=>{const f=o.get(d);if(f)for(const p of f)try{p(u)}catch{}},l=(d,u,f)=>{const p=new Set(u);return{permissions:p,log:(g,...m)=>{a&&a(d.id,g,m)},on:(g,m)=>{let b=s.get(g);b||(b=new Set,s.set(g,b)),b.add(m);const y=()=>{b.delete(m)};return f.push(y),y},emit:(g,m)=>{if(!p.has("events:emit"))return;const b=s.get(g);if(b)for(const y of b)try{y(m)}catch{}},setItem:async(g,m)=>{p.has("storage:write")&&await r.setItem(`${d.id}:${g}`,m)},getItem:async g=>{if(p.has("storage:read"))return await r.getItem(`${d.id}:${g}`)}}};return{register(d){const u=d.manifest.id;if(n.has(u))throw new Error(`Plugin "${u}" already registered`);const f={manifest:d.manifest,status:"registered"};return n.set(u,{plugin:d,record:f,cleanups:[]}),i("register",f),f},unregister(d){return n.get(d)?(n.delete(d),!0):!1},async activate(d){const u=n.get(d);if(!u)throw new Error(`Unknown plugin "${d}"`);if(u.record.status==="active")return u.record;for(const f of u.plugin.manifest.dependsOn??[]){const p=n.get(f);if(!p)throw u.record.status="error",u.record.error=`Missing dependency: ${f}`,i("error",u.record),new Error(u.record.error);p.record.status!=="active"&&await this.activate(f)}u.record.status="activating";try{const f=t(u.plugin.manifest.permissions??[],u.plugin.manifest),p=l(u.plugin.manifest,f,u.cleanups);await u.plugin.activate(p),u.record.status="active",u.record.activatedAt=Date.now(),u.record.error=void 0,i("activate",u.record)}catch(f){throw u.record.status="error",u.record.error=f instanceof Error?f.message:String(f),i("error",u.record),f}return u.record},async deactivate(d){var f,p;const u=n.get(d);if(!u)throw new Error(`Unknown plugin "${d}"`);if(u.record.status!=="active")return u.record;u.record.status="deactivating";try{await((p=(f=u.plugin).deactivate)==null?void 0:p.call(f));for(const g of u.cleanups.splice(0))await g();u.record.status="inactive",i("deactivate",u.record)}catch(g){throw u.record.status="error",u.record.error=g instanceof Error?g.message:String(g),i("error",u.record),g}return u.record},list(){return[...n.values()].map(d=>({...d.record}))},get(d){const u=n.get(d);return u?{...u.record}:void 0},on(d,u){let f=o.get(d);return f||(f=new Set,o.set(d,f)),f.add(u),()=>{f.delete(u)}}}}function pi(...e){return e.join("-")}const gi={button:e=>e?`nice-button-${e}`:"nice-button",textInput:e=>e?`nice-text-input-${e}`:"nice-text-input",numberInput:e=>e?`nice-number-input-${e}`:"nice-number-input",select:e=>e?`nice-select-${e}`:"nice-select",checkbox:e=>e?`nice-checkbox-${e}`:"nice-checkbox",toggle:e=>e?`nice-toggle-${e}`:"nice-toggle",datePicker:e=>e?`nice-date-picker-${e}`:"nice-date-picker",dataGrid:e=>e?`nice-datagrid-${e}`:"nice-datagrid",table:e=>e?`nice-table-${e}`:"nice-table",list:e=>e?`nice-list-${e}`:"nice-list",treeView:e=>e?`nice-tree-${e}`:"nice-tree",modal:e=>e?`nice-modal-${e}`:"nice-modal",drawer:e=>e?`nice-drawer-${e}`:"nice-drawer",form:e=>e?`nice-form-${e}`:"nice-form",tabs:e=>e?`nice-tabs-${e}`:"nice-tabs",menu:e=>e?`nice-menu-${e}`:"nice-menu",chart:e=>e?`nice-chart-${e}`:"nice-chart",scheduler:e=>e?`nice-scheduler-${e}`:"nice-scheduler"},Qt=({children:e,direction:t="ltr"})=>c.createElement("div",{dir:t,"data-testid":"nice-test-root",style:{direction:t}},e);Qt.displayName="NiceTestWrapper";function yi(e,t,r){const a=new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0,...r});e.dispatchEvent(a)}function hi(e,t){var a,n;const r=((a=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:a.set)||((n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value"))==null?void 0:n.set);r&&r.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}function bi(e){const{data:t,delay:r=0,keyField:a="id"}=e;let n=[...t];return{key:a,load:async()=>(r>0&&await new Promise(s=>setTimeout(s,r)),{data:[...n],totalCount:n.length}),insert:async s=>(n.push(s),s),update:async(s,o)=>{const i=n.findIndex(l=>l[a]===s);i>=0&&(n[i]={...n[i],...o})},remove:async s=>{n=n.filter(o=>o[a]!==s)},getData:()=>[...n],reset:()=>{n=[...t]}}}function Si(e){const t=[];return e.querySelectorAll('button, input, select, textarea, [role="button"], [role="link"], [role="checkbox"], [role="radio"]').forEach(s=>{var i;s.getAttribute("aria-label")||s.getAttribute("aria-labelledby")||((i=s.textContent)==null?void 0:i.trim())||s.getAttribute("title")||t.push(`${s.tagName.toLowerCase()}${s.id?"#"+s.id:""} missing accessible name`)}),e.querySelectorAll("img").forEach(s=>{!s.alt&&s.getAttribute("role")!=="presentation"&&t.push(`img${s.src?'[src="'+s.src.substring(0,40)+'..."]':""} missing alt text`)}),e.querySelectorAll('input:not([type="hidden"]), select, textarea').forEach(s=>{const o=s.id&&e.querySelector(`label[for="${s.id}"]`),i=s.getAttribute("aria-label")||s.getAttribute("aria-labelledby");!o&&!i&&t.push(`${s.tagName.toLowerCase()}${s.name?'[name="'+s.name+'"]':""} missing label`)}),t}const Zt=process.env.NODE_ENV==="development";let F={enabled:Zt,logToConsole:!1,slowRenderThreshold:16,samplingRate:1,enableUserTiming:!0,trackPropsChanges:!1};const Ce=[],X=new Map,Me=new Map;let xi=1;function er(e){F={...F,...e}}function tr(){return new Map(X)}function rr(e){return X.get(e)}function vi(e=100){return Ce.slice(-e)}function Ye(){Ce.length=0,X.clear(),Me.clear()}function Qe(e){const t=e??F.slowRenderThreshold??16;return Ce.filter(r=>r.actualDuration>t)}function wi(){return Math.random()<(F.samplingRate??1)}function ki(e){const t=X.get(e.componentName);t?(t.renderCount++,e.phase==="mount"?t.mountCount++:t.updateCount++,t.totalRenderTime+=e.actualDuration,t.avgRenderTime=t.totalRenderTime/t.renderCount,t.maxRenderTime=Math.max(t.maxRenderTime,e.actualDuration),t.minRenderTime=Math.min(t.minRenderTime,e.actualDuration),t.lastRenderAt=e.timestamp,e.actualDuration>(F.slowRenderThreshold??16)&&t.slowRenderCount++):X.set(e.componentName,{componentName:e.componentName,renderCount:1,mountCount:e.phase==="mount"?1:0,updateCount:e.phase==="mount"?0:1,avgRenderTime:e.actualDuration,maxRenderTime:e.actualDuration,minRenderTime:e.actualDuration,totalRenderTime:e.actualDuration,lastRenderAt:e.timestamp,slowRenderCount:e.actualDuration>(F.slowRenderThreshold??16)?1:0})}function W(e){return e<1?`${(e*1e3).toFixed(0)}μs`:e<1e3?`${e.toFixed(2)}ms`:`${(e/1e3).toFixed(2)}s`}const Ci=({id:e,children:t,onRender:r,onSlowRender:a,slowThreshold:n,logToConsole:s})=>{const o=c.useCallback((i,l,d,u,f,p)=>{var y,S,h;if(!F.enabled||!wi()||(y=F.ignoreComponents)!=null&&y.includes(i))return;const g={componentName:i,renderId:`render-${xi++}`,phase:l,actualDuration:d,baseDuration:u,startTime:f,commitTime:p,interactions:new Set,timestamp:Date.now()};if(Ce.push(g),ki(g),F.enableUserTiming)try{performance.measure(`Nice:${i}:${l}`,{start:f,duration:d})}catch{}if(s??F.logToConsole){const v=n??F.slowRenderThreshold??16,w=d>v;console.log(`%c[Profile] ${i} ${l}`,`color: ${w?"var(--color-error, #dc2626)":"var(--color-success, #22c55e)"}; font-weight: ${w?"bold":"normal"}`,{actual:W(d),base:W(u),savings:`${((1-d/u)*100).toFixed(1)}%`})}r==null||r(g),(S=F.onRender)==null||S.call(F,g);const b=n??F.slowRenderThreshold??16;d>b&&(a==null||a(g),(h=F.onSlowRender)==null||h.call(F,g))},[e,r,a,n,s]);return F.enabled?x.jsx(c.Profiler,{id:e,onRender:o,children:t}):x.jsx(x.Fragment,{children:t})};function ar(e,t){const r=c.useRef(),a=c.useRef(0);c.useEffect(()=>{if(!F.enabled||!F.trackPropsChanges)return;if(a.current++,a.current===1){r.current=t;return}const n=r.current,s=[],o=new Set([...Object.keys(n||{}),...Object.keys(t)]);for(const i of o){const l=n==null?void 0:n[i],d=t[i];Object.is(l,d)||s.push({propName:i,oldValue:l,newValue:d,timestamp:Date.now()})}s.length>0&&F.logToConsole&&console.log(`%c[Why render?] ${e}`,"color: #6366f1; font-weight: bold",`Render #${a.current}`,s.map(i=>({prop:i.propName,from:i.oldValue,to:i.newValue,type:typeof i.newValue}))),r.current=t})}function Mi(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>(ar(r,n),x.jsx(e,{...n}));return a.displayName=`WhyDidYouRender(${r})`,a}function Ai(e){const t=c.useRef(0);return t.current++,c.useEffect(()=>{F.enabled&&F.logToConsole&&e&&console.log(`%c[Render count] ${e}: ${t.current}`,`color: ${t.current>10?"var(--color-warning, #f59e0b)":"var(--color-success, #22c55e)"}`)}),t.current}function Ae(e,t){if(!F.enabled)return;const r={name:e,startTime:performance.now(),detail:t};if(Me.set(e,r),F.enableUserTiming)try{performance.mark(`Nice:${e}:start`,{detail:t})}catch{}}function Ee(e){if(!F.enabled)return 0;const t=Me.get(e);if(!t)return console.warn(`[Profile] No mark found for: ${e}`),0;const r=performance.now()-t.startTime;if(t.duration=r,F.enableUserTiming)try{performance.mark(`Nice:${e}:end`),performance.measure(`Nice:${e}`,`Nice:${e}:start`,`Nice:${e}:end`)}catch{}return F.logToConsole&&console.log(`%c[Measure] ${e}: ${W(r)}`,`color: ${r>100?"var(--color-warning, #f59e0b)":"var(--color-success, #22c55e)"}`),r}async function Ei(e,t,r){Ae(e,r);try{return await t()}finally{Ee(e)}}function Ni(e,t,r){Ae(e,r);try{return t()}finally{Ee(e)}}function Ti(e,t,r){c.useEffect(()=>{Ae(e);const a=t();return Ee(e),a},r)}function nr(){const e=Array.from(X.values()),t=Qe(),r=e.reduce((s,o)=>s+o.renderCount,0),a=e.length>0?e.reduce((s,o)=>s+o.avgRenderTime,0)/e.length:0,n=Array.from(Me.values());return{stats:e,slowRenders:t,totalRenders:r,avgRenderTime:a,marks:n}}function Ze(){const e=nr();console.group("%c[Nice2Dev Performance Report]","color: #6366f1; font-weight: bold; font-size: 14px"),console.log(`Total renders: ${e.totalRenders}`),console.log(`Average render time: ${W(e.avgRenderTime)}`),console.log(`Slow renders: ${e.slowRenders.length}`),console.group("Component Stats"),console.table(e.stats.sort((t,r)=>r.totalRenderTime-t.totalRenderTime).map(t=>({Name:t.componentName,Renders:t.renderCount,"Avg Time":W(t.avgRenderTime),"Max Time":W(t.maxRenderTime),"Total Time":W(t.totalRenderTime),"Slow Renders":t.slowRenderCount}))),console.groupEnd(),e.slowRenders.length>0&&(console.group("Slow Renders (last 10)"),console.table(e.slowRenders.slice(-10).map(t=>({Component:t.componentName,Phase:t.phase,Duration:W(t.actualDuration),Time:new Date(t.timestamp).toLocaleTimeString()}))),console.groupEnd()),e.marks.length>0&&(console.group("Custom Marks"),console.table(e.marks.filter(t=>t.duration).map(t=>({Name:t.name,Duration:W(t.duration)}))),console.groupEnd()),console.groupEnd()}const sr=new Map;function or(){for(const[e,t]of X)sr.set(e,{...t});console.log("[Profile] Baseline saved")}function ir(e=20){const t=[];for(const[r,a]of X){const n=sr.get(r);if(!n)continue;const s=(a.avgRenderTime-n.avgRenderTime)/n.avgRenderTime*100;s>e&&t.push({componentName:r,metric:"avgRenderTime",baseline:n.avgRenderTime,current:a.avgRenderTime,changePercent:s});const o=(a.maxRenderTime-n.maxRenderTime)/n.maxRenderTime*100;o>e&&t.push({componentName:r,metric:"maxRenderTime",baseline:n.maxRenderTime,current:a.maxRenderTime,changePercent:o})}return t.length>0&&F.logToConsole&&console.warn("%c[Regression] Performance regressions detected!","color: #dc2626; font-weight: bold",t),t}const cr=c.memo(({position:e="bottom-right",defaultCollapsed:t=!0})=>{const[r,a]=c.useState(t),[n,s]=c.useState([]),[o,i]=c.useState({used:0,total:0});if(c.useEffect(()=>{const d=()=>{const f=Array.from(X.values());s(f.sort((g,m)=>m.totalRenderTime-g.totalRenderTime).slice(0,10));const p=window.performance;p.memory&&i({used:p.memory.usedJSHeapSize/1024/1024,total:p.memory.totalJSHeapSize/1024/1024})};d();const u=setInterval(d,2e3);return()=>clearInterval(u)},[]),!F.enabled)return null;const l={position:"fixed",zIndex:99999,...e.includes("top")?{top:8}:{bottom:8},...e.includes("left")?{left:8}:{right:8}};return x.jsxs("div",{style:{...l,background:"rgba(0, 0, 0, 0.85)",color:"var(--bg-primary, #fff)",borderRadius:8,fontSize:11,fontFamily:"Monaco, Consolas, monospace",padding:r?"4px 8px":8,maxWidth:r?"auto":300,maxHeight:r?"auto":400,overflow:"auto"},children:[x.jsxs("div",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:8},onClick:()=>a(d=>!d),children:[x.jsx("span",{style:{color:"var(--color-success, #22c55e)"},children:"●"}),x.jsx("span",{children:"Profiler"}),o.used>0&&x.jsxs("span",{style:{color:o.used>100?"var(--color-warning, #f59e0b)":"var(--text-muted, #64748b)"},children:[o.used.toFixed(0),"MB"]}),x.jsx("span",{style:{marginLeft:"auto",opacity:.5},children:r?"▼":"▲"})]}),!r&&x.jsxs("div",{style:{marginTop:8},children:[x.jsx("div",{style:{borderBottom:"1px solid var(--border-color, #333)",paddingBottom:4,marginBottom:8},children:x.jsx("strong",{children:"Top Components"})}),n.map(d=>x.jsxs("div",{style:{marginBottom:4,display:"flex",gap:8},children:[x.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:d.componentName}),x.jsx("span",{style:{color:d.avgRenderTime>16?"var(--color-warning, #f59e0b)":"var(--color-success, #22c55e)"},children:W(d.avgRenderTime)}),x.jsxs("span",{style:{color:"var(--text-muted, #64748b)",minWidth:30,textAlign:"right"},children:["x",d.renderCount]})]},d.componentName)),x.jsxs("div",{style:{marginTop:8,display:"flex",gap:8},children:[x.jsx("button",{onClick:Ze,style:{flex:1,padding:"4px 8px",background:"var(--bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--bg-primary, #fff)",cursor:"pointer",fontSize:10},children:"Print Report"}),x.jsx("button",{onClick:Ye,style:{flex:1,padding:"4px 8px",background:"var(--bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--bg-primary, #fff)",cursor:"pointer",fontSize:10},children:"Clear"})]})]})]})});cr.displayName="ProfilerOverlay";function Li(){Zt&&(window.__NICE2DEV_PROFILER__={getStats:tr,getComponentStats:rr,getSlowRenders:Qe,printReport:Ze,clear:Ye,saveBaseline:or,checkRegression:ir,configure:er},console.log("%c[Nice2Dev Profiler] DevTools integration ready. Use __NICE2DEV_PROFILER__ in console.","color: #6366f1"))}const et=process.env.NODE_ENV==="development";let P={enabled:et,logToConsole:!0,samplingRate:1,trackDetachedNodes:!1,closureSizeThreshold:1024*1024};const Ne=[],Se=new Map,ze=new Map,xt=new WeakMap;let Ii=1;function Ri(){return Math.random()<(P.samplingRate??1)}function Te(){var e;try{throw new Error}catch(t){return((e=t.stack)==null?void 0:e.split(`
38
+ `)}function fi(e,t,r=!1){const a=bt(ht(e)),n=bt(ht(t)),o=pi(a,n),s=r?4.5:7;return{rule:"1.4.6",level:"AAA",passed:o>=s,message:`Contrast ratio ${o.toFixed(2)}:1 (requires ${s}:1 for AAA${r?" large text":""})`}}function mi(){if(typeof document>"u")return[];const e=[];return document.querySelectorAll("a").forEach(r=>{var s;const a=((s=r.textContent)==null?void 0:s.trim())??"",n=!!r.getAttribute("aria-label");["click here","read more","learn more","here","link"].includes(a.toLowerCase())&&!n&&e.push({rule:"2.4.9",level:"AAA",passed:!1,message:`Link with generic text "${a}" lacks descriptive label`,element:r.outerHTML.slice(0,100)})}),document.querySelectorAll("h1, h2, h3, h4, h5, h6"),document.querySelectorAll("section, article, main, aside").forEach(r=>{r.querySelector("h1, h2, h3, h4, h5, h6")||e.push({rule:"2.4.10",level:"AAA",passed:!1,message:`<${r.tagName.toLowerCase()}> lacks a heading element`,element:r.tagName.toLowerCase()})}),document.querySelectorAll("p, li, td, span").forEach(r=>{const a=window.getComputedStyle(r),n=parseFloat(a.width),o=parseFloat(a.fontSize);o>0&&n/o>80&&e.push({rule:"1.4.8",level:"AAA",passed:!1,message:`Text block exceeds 80 character width (${Math.round(n/o)} chars)`,element:r.tagName.toLowerCase()})}),document.querySelectorAll('input[type="checkbox"], input[type="radio"], select').forEach(r=>{r.hasAttribute("onchange")&&e.push({rule:"3.2.5",level:"AAA",passed:!1,message:"Form control has inline onchange handler — may cause unexpected context change",element:r.tagName.toLowerCase()})}),document.querySelectorAll("video[autoplay], audio[autoplay]").forEach(r=>{e.push({rule:"2.2.3",level:"AAA",passed:!1,message:"Auto-playing media found — user should control timing",element:r.tagName.toLowerCase()})}),e}function ht(e){if(e.startsWith("#")){const t=e.slice(1),r=parseInt(t.slice(0,2),16)/255,a=parseInt(t.slice(2,4),16)/255,n=parseInt(t.slice(4,6),16)/255;return[r,a,n]}return[0,0,0]}function bt([e,t,r]){const a=n=>n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4);return .2126*a(e)+.7152*a(t)+.0722*a(r)}function pi(e,t){const r=Math.max(e,t),a=Math.min(e,t);return(r+.05)/(a+.05)}const gi=["none","protanopia","protanomaly","deuteranopia","deuteranomaly","tritanopia","tritanomaly","achromatopsia","achromatomaly"],St="nice2dev-color-blind-filters",xt="nice2dev-color-blind-styles",Oe={protanopia:"0.567 0.433 0 0 0 0.558 0.442 0 0 0 0 0.242 0.758 0 0 0 0 0 1 0",protanomaly:"0.817 0.183 0 0 0 0.333 0.667 0 0 0 0 0.125 0.875 0 0 0 0 0 1 0",deuteranopia:"0.625 0.375 0 0 0 0.7 0.3 0 0 0 0 0.3 0.7 0 0 0 0 0 1 0",deuteranomaly:"0.8 0.2 0 0 0 0.258 0.742 0 0 0 0 0.142 0.858 0 0 0 0 0 1 0",tritanopia:"0.95 0.05 0 0 0 0 0.433 0.567 0 0 0 0.475 0.525 0 0 0 0 0 1 0",tritanomaly:"0.967 0.033 0 0 0 0 0.733 0.267 0 0 0 0.183 0.817 0 0 0 0 0 1 0",achromatopsia:"0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0 0 0 1 0",achromatomaly:"0.618 0.320 0.062 0 0 0.163 0.775 0.062 0 0 0.163 0.320 0.516 0 0 0 0 0 1 0"};function yi(){if(typeof document>"u"||document.getElementById(St))return;const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.id=St,t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false"),t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.overflow="hidden";const r=document.createElementNS(e,"defs");for(const[a,n]of Object.entries(Oe)){const o=document.createElementNS(e,"filter");o.id=`nice-cb-${a}`,o.setAttribute("color-interpolation-filters","sRGB");const s=document.createElementNS(e,"feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("values",n),o.appendChild(s),r.appendChild(o)}if(t.appendChild(r),document.body.appendChild(t),!document.getElementById(xt)){const a=document.createElement("style");a.id=xt,a.textContent=Object.keys(Oe).map(n=>`.nice-color-blind-${n}{filter:url(#nice-cb-${n})!important;}`).join(""),document.head.appendChild(a)}}function Je(e){for(const t of Object.keys(Oe))e.classList.remove(`nice-color-blind-${t}`)}function Ye(e,t=typeof document<"u"?document.documentElement:null){t&&(yi(),Je(t),e!=="none"&&t.classList.add(`nice-color-blind-${e}`))}function rr(e,t={}){const{target:r}=t,a=c.useRef(null);c.useEffect(()=>{const n=r??(typeof document<"u"?document.documentElement:null);return a.current=n,Ye(e,n),()=>{const o=a.current;o&&Je(o)}},[e,r])}function hi(e,t){if(typeof window>"u")return null;try{if(t==="cookie"){const a=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"=([^;]*)"));return a?decodeURIComponent(a[1]):null}const r=window[t].getItem(e);return r||null}catch{return null}}function bi(e,t,r,a){if(!(typeof window>"u"))try{if(r==="cookie"){document.cookie=`${e}=${encodeURIComponent(t)};path=/;max-age=${a};SameSite=Lax`;return}window[r].setItem(e,t)}catch{}}function Si(e={}){const{storageKey:t="nice2dev.a11y.cvd",storage:r="localStorage",defaultMode:a="none",target:n,cookieMaxAgeSeconds:o=3600*24*60}=e,s=c.useCallback(h=>{if(typeof window>"u"||r==="cookie")return()=>{};const f=y=>{y.key===t&&h()};return window.addEventListener("storage",f),()=>window.removeEventListener("storage",f)},[r,t]),i=c.useCallback(()=>hi(t,r)??a,[r,t,a]),l=c.useCallback(()=>a,[a]),d=c.useSyncExternalStore(s,i,l),[u,m]=c.useState(d);c.useEffect(()=>{d!==u&&m(d)},[d]),rr(u,{target:n});const g=c.useCallback(h=>{m(h),bi(t,h,r,o)},[r,t,o]);return[u,g]}function xi(e=typeof document<"u"?document.documentElement:null){return{set:t=>Ye(t,e),clear:()=>{e&&Je(e)}}}const vi=e=>[...e],wi=()=>{const e=new Map;return{getItem:t=>Promise.resolve(e.get(t)),setItem:(t,r)=>(e.set(t,r),Promise.resolve())}};function ki(e={}){var g,h;const t=e.permissionPolicy??vi,r=e.storage;let a;r&&typeof r.getItem=="function"&&typeof r.setItem=="function"?a={getItem:r.getItem,setItem:r.setItem}:a=wi();const n=(g=e.permissions)==null?void 0:g.canActivate,o={user:(h=e.permissions)==null?void 0:h.user},s=e.logger,i=new Map,l=new Map,d=new Map,u=(f,y)=>{const p=d.get(f);if(p)for(const S of p)try{S(y)}catch{}},m=(f,y,p)=>{const S=new Set(y);return{permissions:S,log:(b,...v)=>{s&&s(f.id,b,v)},on:(b,v)=>{let w=l.get(b);w||(w=new Set,l.set(b,w)),w.add(v);const E=()=>{w.delete(v)};return p.push(E),E},emit:(b,v)=>{if(!S.has("events:emit"))return;const w=l.get(b);if(w)for(const E of w)try{E(v)}catch{}},setItem:async(b,v)=>{S.has("storage:write")&&await a.setItem(`${f.id}:${b}`,v)},getItem:async b=>{if(S.has("storage:read"))return await a.getItem(`${f.id}:${b}`)}}};return{register(f){const y=f.manifest.id;if(i.has(y))throw new Error(`Plugin "${y}" already registered`);const p={manifest:f.manifest,status:"registered"};return i.set(y,{plugin:f,record:p,cleanups:[]}),u("register",p),p},unregister(f){return i.get(f)?(i.delete(f),!0):!1},async activate(f){const y=i.get(f);if(!y)throw new Error(`Unknown plugin "${f}"`);if(y.record.status==="active")return y.record;for(const p of y.plugin.manifest.dependsOn??[]){const S=i.get(p);if(!S)throw y.record.status="error",y.record.error=`Missing dependency: ${p}`,u("error",y.record),new Error(y.record.error);S.record.status!=="active"&&await this.activate(p)}y.record.status="activating";try{if(n&&!n(y.plugin.manifest,o))throw y.record.status="error",y.record.error="permission-denied",u("error",y.record),new Error(y.record.error);const p=t(y.plugin.manifest.permissions??[],y.plugin.manifest),S=m(y.plugin.manifest,p,y.cleanups);await y.plugin.activate(S),y.record.status="active",y.record.activatedAt=Date.now(),y.record.error=void 0,u("activate",y.record)}catch(p){throw y.record.status="error",y.record.error=p instanceof Error?p.message:String(p),u("error",y.record),p}return y.record},async deactivate(f){var p,S;const y=i.get(f);if(!y)throw new Error(`Unknown plugin "${f}"`);if(y.record.status!=="active")return y.record;y.record.status="deactivating";try{await((S=(p=y.plugin).deactivate)==null?void 0:S.call(p));for(const b of y.cleanups.splice(0))await b();y.record.status="inactive",u("deactivate",y.record)}catch(b){throw y.record.status="error",y.record.error=b instanceof Error?b.message:String(b),u("error",y.record),b}return y.record},list(){return[...i.values()].map(f=>({...f.record}))},get(f){const y=i.get(f);return y?{...y.record}:void 0},on(f,y){let p=d.get(f);return p||(p=new Set,d.set(f,p)),p.add(y),()=>{p.delete(y)}},events:{on(f,y){const S={"plugin:registered":"register","plugin:activated":"activate","plugin:deactivated":"deactivate","plugin:error":"error"}[f];let b=d.get(S);return b||(b=new Set,d.set(S,b)),b.add(y),()=>{b.delete(y)}},emit(f,y){const p=l.get(f);if(p)for(const S of p)try{S(y)}catch{}}}}}function Ci(...e){return e.join("-")}const Mi={button:e=>e?`nice-button-${e}`:"nice-button",textInput:e=>e?`nice-text-input-${e}`:"nice-text-input",numberInput:e=>e?`nice-number-input-${e}`:"nice-number-input",select:e=>e?`nice-select-${e}`:"nice-select",checkbox:e=>e?`nice-checkbox-${e}`:"nice-checkbox",toggle:e=>e?`nice-toggle-${e}`:"nice-toggle",datePicker:e=>e?`nice-date-picker-${e}`:"nice-date-picker",dataGrid:e=>e?`nice-datagrid-${e}`:"nice-datagrid",table:e=>e?`nice-table-${e}`:"nice-table",list:e=>e?`nice-list-${e}`:"nice-list",treeView:e=>e?`nice-tree-${e}`:"nice-tree",modal:e=>e?`nice-modal-${e}`:"nice-modal",drawer:e=>e?`nice-drawer-${e}`:"nice-drawer",form:e=>e?`nice-form-${e}`:"nice-form",tabs:e=>e?`nice-tabs-${e}`:"nice-tabs",menu:e=>e?`nice-menu-${e}`:"nice-menu",chart:e=>e?`nice-chart-${e}`:"nice-chart",scheduler:e=>e?`nice-scheduler-${e}`:"nice-scheduler"},ar=({children:e,direction:t="ltr"})=>c.createElement("div",{dir:t,"data-testid":"nice-test-root",style:{direction:t}},e);ar.displayName="NiceTestWrapper";function Ai(e,t,r){const a=new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0,...r});e.dispatchEvent(a)}function Ei(e,t){var a,n;const r=((a=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:a.set)||((n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value"))==null?void 0:n.set);r&&r.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}function Ni(e){const{data:t,delay:r=0,keyField:a="id"}=e;let n=[...t];return{key:a,load:async()=>(r>0&&await new Promise(o=>setTimeout(o,r)),{data:[...n],totalCount:n.length}),insert:async o=>(n.push(o),o),update:async(o,s)=>{const i=n.findIndex(l=>l[a]===o);i>=0&&(n[i]={...n[i],...s})},remove:async o=>{n=n.filter(s=>s[a]!==o)},getData:()=>[...n],reset:()=>{n=[...t]}}}function Ti(e){const t=[];return e.querySelectorAll('button, input, select, textarea, [role="button"], [role="link"], [role="checkbox"], [role="radio"]').forEach(o=>{var i;o.getAttribute("aria-label")||o.getAttribute("aria-labelledby")||((i=o.textContent)==null?void 0:i.trim())||o.getAttribute("title")||t.push(`${o.tagName.toLowerCase()}${o.id?"#"+o.id:""} missing accessible name`)}),e.querySelectorAll("img").forEach(o=>{!o.alt&&o.getAttribute("role")!=="presentation"&&t.push(`img${o.src?'[src="'+o.src.substring(0,40)+'..."]':""} missing alt text`)}),e.querySelectorAll('input:not([type="hidden"]), select, textarea').forEach(o=>{const s=o.id&&e.querySelector(`label[for="${o.id}"]`),i=o.getAttribute("aria-label")||o.getAttribute("aria-labelledby");!s&&!i&&t.push(`${o.tagName.toLowerCase()}${o.name?'[name="'+o.name+'"]':""} missing label`)}),t}const nr=process.env.NODE_ENV==="development";let P={enabled:nr,logToConsole:!1,slowRenderThreshold:16,samplingRate:1,enableUserTiming:!0,trackPropsChanges:!1};const Me=[],X=new Map,Ae=new Map;let Li=1;function or(e){P={...P,...e}}function sr(){return new Map(X)}function ir(e){return X.get(e)}function Ii(e=100){return Me.slice(-e)}function Qe(){Me.length=0,X.clear(),Ae.clear()}function Ze(e){const t=e??P.slowRenderThreshold??16;return Me.filter(r=>r.actualDuration>t)}function Ri(){return Math.random()<(P.samplingRate??1)}function zi(e){const t=X.get(e.componentName);t?(t.renderCount++,e.phase==="mount"?t.mountCount++:t.updateCount++,t.totalRenderTime+=e.actualDuration,t.avgRenderTime=t.totalRenderTime/t.renderCount,t.maxRenderTime=Math.max(t.maxRenderTime,e.actualDuration),t.minRenderTime=Math.min(t.minRenderTime,e.actualDuration),t.lastRenderAt=e.timestamp,e.actualDuration>(P.slowRenderThreshold??16)&&t.slowRenderCount++):X.set(e.componentName,{componentName:e.componentName,renderCount:1,mountCount:e.phase==="mount"?1:0,updateCount:e.phase==="mount"?0:1,avgRenderTime:e.actualDuration,maxRenderTime:e.actualDuration,minRenderTime:e.actualDuration,totalRenderTime:e.actualDuration,lastRenderAt:e.timestamp,slowRenderCount:e.actualDuration>(P.slowRenderThreshold??16)?1:0})}function W(e){return e<1?`${(e*1e3).toFixed(0)}μs`:e<1e3?`${e.toFixed(2)}ms`:`${(e/1e3).toFixed(2)}s`}const Fi=({id:e,children:t,onRender:r,onSlowRender:a,slowThreshold:n,logToConsole:o})=>{const s=c.useCallback((i,l,d,u,m,g)=>{var p,S,b;if(!P.enabled||!Ri()||(p=P.ignoreComponents)!=null&&p.includes(i))return;const h={componentName:i,renderId:`render-${Li++}`,phase:l,actualDuration:d,baseDuration:u,startTime:m,commitTime:g,interactions:new Set,timestamp:Date.now()};if(Me.push(h),zi(h),P.enableUserTiming)try{performance.measure(`Nice:${i}:${l}`,{start:m,duration:d})}catch{}if(o??P.logToConsole){const v=n??P.slowRenderThreshold??16,w=d>v;console.log(`%c[Profile] ${i} ${l}`,`color: ${w?"var(--color-error, #dc2626)":"var(--color-success, #22c55e)"}; font-weight: ${w?"bold":"normal"}`,{actual:W(d),base:W(u),savings:`${((1-d/u)*100).toFixed(1)}%`})}r==null||r(h),(S=P.onRender)==null||S.call(P,h);const y=n??P.slowRenderThreshold??16;d>y&&(a==null||a(h),(b=P.onSlowRender)==null||b.call(P,h))},[e,r,a,n,o]);return P.enabled?x.jsx(c.Profiler,{id:e,onRender:s,children:t}):x.jsx(x.Fragment,{children:t})};function cr(e,t){const r=c.useRef(),a=c.useRef(0);c.useEffect(()=>{if(!P.enabled||!P.trackPropsChanges)return;if(a.current++,a.current===1){r.current=t;return}const n=r.current,o=[],s=new Set([...Object.keys(n||{}),...Object.keys(t)]);for(const i of s){const l=n==null?void 0:n[i],d=t[i];Object.is(l,d)||o.push({propName:i,oldValue:l,newValue:d,timestamp:Date.now()})}o.length>0&&P.logToConsole&&console.log(`%c[Why render?] ${e}`,"color: var(--nice-info, #6366f1); font-weight: bold",`Render #${a.current}`,o.map(i=>({prop:i.propName,from:i.oldValue,to:i.newValue,type:typeof i.newValue}))),r.current=t})}function Pi(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>(cr(r,n),x.jsx(e,{...n}));return a.displayName=`WhyDidYouRender(${r})`,a}function Di(e){const t=c.useRef(0);return t.current++,c.useEffect(()=>{P.enabled&&P.logToConsole&&e&&console.log(`%c[Render count] ${e}: ${t.current}`,`color: ${t.current>10?"var(--color-warning, #f59e0b)":"var(--color-success, #22c55e)"}`)}),t.current}function Ee(e,t){if(!P.enabled)return;const r={name:e,startTime:performance.now(),detail:t};if(Ae.set(e,r),P.enableUserTiming)try{performance.mark(`Nice:${e}:start`,{detail:t})}catch{}}function Ne(e){if(!P.enabled)return 0;const t=Ae.get(e);if(!t)return console.warn(`[Profile] No mark found for: ${e}`),0;const r=performance.now()-t.startTime;if(t.duration=r,P.enableUserTiming)try{performance.mark(`Nice:${e}:end`),performance.measure(`Nice:${e}`,`Nice:${e}:start`,`Nice:${e}:end`)}catch{}return P.logToConsole&&console.log(`%c[Measure] ${e}: ${W(r)}`,`color: ${r>100?"var(--color-warning, #f59e0b)":"var(--color-success, #22c55e)"}`),r}async function Hi(e,t,r){Ee(e,r);try{return await t()}finally{Ne(e)}}function $i(e,t,r){Ee(e,r);try{return t()}finally{Ne(e)}}function ji(e,t,r){c.useEffect(()=>{Ee(e);const a=t();return Ne(e),a},r)}function lr(){const e=Array.from(X.values()),t=Ze(),r=e.reduce((o,s)=>o+s.renderCount,0),a=e.length>0?e.reduce((o,s)=>o+s.avgRenderTime,0)/e.length:0,n=Array.from(Ae.values());return{stats:e,slowRenders:t,totalRenders:r,avgRenderTime:a,marks:n}}function et(){const e=lr();console.group("%c[Nice2Dev Performance Report]","color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"),console.log(`Total renders: ${e.totalRenders}`),console.log(`Average render time: ${W(e.avgRenderTime)}`),console.log(`Slow renders: ${e.slowRenders.length}`),console.group("Component Stats"),console.table(e.stats.sort((t,r)=>r.totalRenderTime-t.totalRenderTime).map(t=>({Name:t.componentName,Renders:t.renderCount,"Avg Time":W(t.avgRenderTime),"Max Time":W(t.maxRenderTime),"Total Time":W(t.totalRenderTime),"Slow Renders":t.slowRenderCount}))),console.groupEnd(),e.slowRenders.length>0&&(console.group("Slow Renders (last 10)"),console.table(e.slowRenders.slice(-10).map(t=>({Component:t.componentName,Phase:t.phase,Duration:W(t.actualDuration),Time:new Date(t.timestamp).toLocaleTimeString()}))),console.groupEnd()),e.marks.length>0&&(console.group("Custom Marks"),console.table(e.marks.filter(t=>t.duration).map(t=>({Name:t.name,Duration:W(t.duration)}))),console.groupEnd()),console.groupEnd()}const dr=new Map;function ur(){for(const[e,t]of X)dr.set(e,{...t});console.log("[Profile] Baseline saved")}function fr(e=20){const t=[];for(const[r,a]of X){const n=dr.get(r);if(!n)continue;const o=(a.avgRenderTime-n.avgRenderTime)/n.avgRenderTime*100;o>e&&t.push({componentName:r,metric:"avgRenderTime",baseline:n.avgRenderTime,current:a.avgRenderTime,changePercent:o});const s=(a.maxRenderTime-n.maxRenderTime)/n.maxRenderTime*100;s>e&&t.push({componentName:r,metric:"maxRenderTime",baseline:n.maxRenderTime,current:a.maxRenderTime,changePercent:s})}return t.length>0&&P.logToConsole&&console.warn("%c[Regression] Performance regressions detected!","color: var(--nice-danger-dark, #dc2626); font-weight: bold",t),t}const mr=c.memo(({position:e="bottom-right",defaultCollapsed:t=!0})=>{const[r,a]=c.useState(t),[n,o]=c.useState([]),[s,i]=c.useState({used:0,total:0});if(c.useEffect(()=>{const d=()=>{const m=Array.from(X.values());o(m.sort((h,f)=>f.totalRenderTime-h.totalRenderTime).slice(0,10));const g=window.performance;g.memory&&i({used:g.memory.usedJSHeapSize/1024/1024,total:g.memory.totalJSHeapSize/1024/1024})};d();const u=setInterval(d,2e3);return()=>clearInterval(u)},[]),!P.enabled)return null;const l={position:"fixed",zIndex:99999,...e.includes("top")?{top:8}:{bottom:8},...e.includes("left")?{left:8}:{right:8}};return x.jsxs("div",{style:{...l,background:"var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",color:"var(--bg-primary, #fff)",borderRadius:8,fontSize:11,fontFamily:"Monaco, Consolas, monospace",padding:r?"4px 8px":8,maxWidth:r?"auto":300,maxHeight:r?"auto":400,overflow:"auto"},children:[x.jsxs("div",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:8},onClick:()=>a(d=>!d),children:[x.jsx("span",{style:{color:"var(--color-success, #22c55e)"},children:"●"}),x.jsx("span",{children:"Profiler"}),s.used>0&&x.jsxs("span",{style:{color:s.used>100?"var(--color-warning, #f59e0b)":"var(--text-muted, #64748b)"},children:[s.used.toFixed(0),"MB"]}),x.jsx("span",{style:{marginLeft:"auto",opacity:.5},children:r?"▼":"▲"})]}),!r&&x.jsxs("div",{style:{marginTop:8},children:[x.jsx("div",{style:{borderBottom:"1px solid var(--border-color, #333)",paddingBottom:4,marginBottom:8},children:x.jsx("strong",{children:"Top Components"})}),n.map(d=>x.jsxs("div",{style:{marginBottom:4,display:"flex",gap:8},children:[x.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:d.componentName}),x.jsx("span",{style:{color:d.avgRenderTime>16?"var(--color-warning, #f59e0b)":"var(--color-success, #22c55e)"},children:W(d.avgRenderTime)}),x.jsxs("span",{style:{color:"var(--text-muted, #64748b)",minWidth:30,textAlign:"right"},children:["x",d.renderCount]})]},d.componentName)),x.jsxs("div",{style:{marginTop:8,display:"flex",gap:8},children:[x.jsx("button",{onClick:et,style:{flex:1,padding:"4px 8px",background:"var(--bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--bg-primary, #fff)",cursor:"pointer",fontSize:10},children:"Print Report"}),x.jsx("button",{onClick:Qe,style:{flex:1,padding:"4px 8px",background:"var(--bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--bg-primary, #fff)",cursor:"pointer",fontSize:10},children:"Clear"})]})]})]})});mr.displayName="ProfilerOverlay";function Oi(){nr&&(window.__NICE2DEV_PROFILER__={getStats:sr,getComponentStats:ir,getSlowRenders:Ze,printReport:et,clear:Qe,saveBaseline:ur,checkRegression:fr,configure:or},console.log("%c[Nice2Dev Profiler] DevTools integration ready. Use __NICE2DEV_PROFILER__ in console.","color: var(--nice-info, #6366f1)"))}const tt=process.env.NODE_ENV==="development";let D={enabled:tt,logToConsole:!0,samplingRate:1,trackDetachedNodes:!1,closureSizeThreshold:1024*1024};const Te=[],Se=new Map,Fe=new Map,vt=new WeakMap;let _i=1;function Bi(){return Math.random()<(D.samplingRate??1)}function Le(){var e;try{throw new Error}catch(t){return((e=t.stack)==null?void 0:e.split(`
39
39
  `).slice(3).join(`
40
- `))??""}}function Fe(e,t,r){return`${e.__ntd_id??Math.random()}-${t}-${r.toString().slice(0,50)}`}function G(e,t,r="warning",a,n){var o,i;if(!P.enabled||!Ri()||a&&((o=P.ignoreComponents)!=null&&o.includes(a)))return;const s={id:`leak-${Ii++}`,type:e,severity:r,componentName:a,message:t,stack:Te(),timestamp:Date.now(),data:n};Ne.push(s),P.logToConsole&&console[r==="critical"?"error":r==="warning"?"warn":"info"](`%c[NTD Leak Detector] ${e}`,`color: ${r==="critical"?"var(--color-error, #dc2626)":r==="warning"?"var(--color-warning, #f59e0b)":"var(--color-primary, #3b82f6)"}; font-weight: bold`,t,a?`(${a})`:"",""),(i=P.onLeak)==null||i.call(P,s)}function zi(e){P={...P,...e}}function Fi(){return[...Ne]}function Pi(){Ne.length=0}function lr(){return Ne.reduce((e,t)=>(e[t.type]=(e[t.type]||0)+1,e),{})}function Hi(e,t){const[r,a]=c.useState(e),n=c.useRef(!0),s=c.useRef(t);c.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]);const o=c.useCallback(i=>{n.current?a(i):P.enabled&&G("setState-after-unmount","setState called on unmounted component","warning",s.current)},[]);return[r,o]}function Di(e){const t=c.useRef(null),r=c.useRef(e),a=c.useCallback(()=>{t.current&&(clearTimeout(t.current),P.enabled&&Se.delete(t.current),t.current=null)},[]),n=c.useCallback((s,o)=>{a(),t.current=setTimeout(s,o),P.enabled&&Se.set(t.current,{id:t.current,type:"timeout",componentName:r.current,stack:Te(),createdAt:Date.now()})},[a]);return c.useEffect(()=>()=>{t.current&&(P.enabled&&G("timer-not-cleared","Timeout would have leaked without cleanup","info",r.current),a())},[a]),[n,a]}function $i(e){const t=c.useRef(null),r=c.useRef(e),a=c.useCallback(()=>{t.current&&(clearInterval(t.current),P.enabled&&Se.delete(t.current),t.current=null)},[]),n=c.useCallback((s,o)=>{a(),t.current=setInterval(s,o),P.enabled&&Se.set(t.current,{id:t.current,type:"interval",componentName:r.current,stack:Te(),createdAt:Date.now()})},[a]);return c.useEffect(()=>()=>{t.current&&(P.enabled&&G("timer-not-cleared","Interval would have leaked without cleanup","warning",r.current),a())},[a]),[n,a]}function ji(e){const t=c.useRef([]),r=c.useRef(e);return c.useEffect(()=>()=>{for(const{target:a,type:n,listener:s,options:o}of t.current)if(a.removeEventListener(n,s,o),P.enabled){const i=Fe(a,n,s);ze.delete(i)}t.current.length>0&&P.enabled&&G("listener-not-removed",`${t.current.length} event listener(s) would have leaked without cleanup`,"info",r.current),t.current=[]},[]),c.useCallback((a,n,s,o)=>{if(a.addEventListener(n,s,o),t.current.push({target:a,type:n,listener:s,options:o}),P.enabled){const i=Fe(a,n,s);ze.set(i,{target:a,type:n,listener:s,componentName:r.current,stack:Te(),createdAt:Date.now()})}return()=>{if(a.removeEventListener(n,s,o),t.current=t.current.filter(i=>i.target!==a||i.type!==n||i.listener!==s),P.enabled){const i=Fe(a,n,s);ze.delete(i)}}},[])}function dr(e){const t=c.useRef(null),r=c.useRef(e);return c.useEffect(()=>()=>{t.current&&!t.current.signal.aborted&&(t.current.abort(),P.enabled&&G("abort-controller-not-aborted","AbortController was auto-aborted on unmount (fetch may have leaked)","info",r.current))},[]),c.useCallback(()=>(t.current&&t.current.abort(),t.current=new AbortController,t.current.signal),[])}function Oi(e){const t=dr(e);return c.useCallback((r,a)=>{const n=t();return fetch(r,{...a,signal:n})},[t])}function Bi(e){const t=c.useRef([]),r=c.useRef(e);return c.useEffect(()=>()=>{for(const a of t.current)try{a()}catch(n){console.error("Error during subscription cleanup:",n)}t.current.length>0&&P.enabled&&G("subscription-not-unsubscribed",`${t.current.length} subscription(s) would have leaked without cleanup`,"info",r.current),t.current=[]},[]),c.useCallback(a=>{typeof a=="function"?t.current.push(a):a&&typeof a.unsubscribe=="function"&&t.current.push(()=>a.unsubscribe())},[])}function _i(e,t,r){const[a,n]=c.useState(null),[s,o]=c.useState(WebSocket.CLOSED),i=c.useRef(r);c.useEffect(()=>{if(!e)return;const u=new WebSocket(e,t);return n(u),u.onopen=()=>o(u.readyState),u.onclose=()=>o(u.readyState),u.onerror=()=>o(u.readyState),()=>{(u.readyState===WebSocket.OPEN||u.readyState===WebSocket.CONNECTING)&&(u.close(),P.enabled&&G("websocket-not-closed","WebSocket was auto-closed on unmount","info",i.current))}},[e,t]);const l=c.useCallback(u=>{(a==null?void 0:a.readyState)===WebSocket.OPEN&&a.send(u)},[a]),d=c.useCallback((u,f)=>{a==null||a.close(u,f)},[a]);return{socket:a,readyState:s,send:l,close:d}}function Wi(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>{const s=c.useRef({});return c.useEffect(()=>{if(P.enabled)return xt.set(s.current,{name:r,mountedAt:Date.now()}),()=>{xt.delete(s.current)}},[]),x.jsx(e,{...n})};return a.displayName=`LeakTracked(${r})`,a}function Vi(e){const t=c.useRef(Date.now());c.useEffect(()=>(P.enabled&&P.logToConsole&&console.log(`%c[NTD] ${e} mounted`,"color: #22c55e"),()=>{if(P.enabled&&P.logToConsole){const r=Date.now()-t.current;console.log(`%c[NTD] ${e} unmounted (lifetime: ${r}ms)`,"color: #f59e0b")}}),[e])}async function Xi(e){if(!et)return;const t=window.performance;if(t.memory){const r=t.memory;console.log(`%c[Memory Snapshot${e?`: ${e}`:""}]`,"color: #6366f1; font-weight: bold",{usedJSHeapSize:`${(r.usedJSHeapSize/1024/1024).toFixed(2)} MB`,totalJSHeapSize:`${(r.totalJSHeapSize/1024/1024).toFixed(2)} MB`,jsHeapSizeLimit:`${(r.jsHeapSizeLimit/1024/1024).toFixed(2)} MB`})}console.log("%cTip: Use Chrome DevTools Memory tab for detailed heap snapshots","color: #64748b; font-style: italic")}function qi(){et&&(window.gc?(window.gc(),console.log("%c[GC] Forced garbage collection","color: #22c55e")):console.log("%c[GC] gc() not available. Run Chrome with --expose-gc flag","color: #f59e0b"))}function Ui(e=5e3,t=100){const[r,a]=c.useState({usedMB:0,totalMB:0,limitMB:0,isWarning:!1});return c.useEffect(()=>{const n=window.performance;if(!n.memory)return;const s=()=>{const i=n.memory;if(!i)return;const l=i.usedJSHeapSize/1024/1024,d=i.totalJSHeapSize/1024/1024,u=i.jsHeapSizeLimit/1024/1024,f=l>t;a({usedMB:l,totalMB:d,limitMB:u,isWarning:f}),f&&P.enabled&&G("large-closure",`Memory usage exceeded ${t}MB (${l.toFixed(2)}MB)`,"warning")};s();const o=setInterval(s,e);return()=>clearInterval(o)},[e,t]),r}const ur=()=>{const e=c.useMemo(()=>lr(),[]),t=Object.values(e).reduce((r,a)=>r+a,0);return!P.enabled||t===0,null};ur.displayName="NiceLeakDetectorStatus";function Gi(e){const t=()=>{var r;(r=e.queryClient)==null||r.invalidateQueries({queryKey:e.queryKey})};return{load:r=>e.queryFn(r),insert:e.mutationFn?async r=>{const a=await e.mutationFn(r);return t(),a}:void 0,update:e.updateMutationFn?async(r,a)=>{const n=await e.updateMutationFn({key:r,values:a});return t(),n}:void 0,remove:e.deleteMutationFn?async r=>{await e.deleteMutationFn(r),t()}:void 0}}function Ki(e,t){return{load:async()=>t.getData(e.getState()),insert:t.addItem?async r=>{const a=e.getState();return t.addItem(a)(r),r}:void 0,update:t.updateItem?async(r,a)=>{const n=e.getState();return t.updateItem(n)(r,a),{...a}}:void 0,remove:t.removeItem?async r=>{const a=e.getState();t.removeItem(a)(r)}:void 0}}function Ji(e={}){const t=e.actionPrefix??"nice";return r=>a=>n=>{const s=a(n);if(n.type.startsWith(`${t}/grid/`)){const i=n.type.split("/")[2];i&&e.onGridStateChange&&e.onGridStateChange(i,n.payload)}if(n.type.startsWith(`${t}/form/`)){const i=n.type.split("/")[2];i&&e.onFormStateChange&&e.onFormStateChange(i,n.payload)}return s}}function Yi(e="nice"){return{setGridState:(t,r)=>({type:`${e}/grid/${t}/setState`,payload:r}),setGridFilter:(t,r)=>({type:`${e}/grid/${t}/setFilter`,payload:r}),setGridSort:(t,r)=>({type:`${e}/grid/${t}/setSort`,payload:r}),setFormValues:(t,r)=>({type:`${e}/form/${t}/setValues`,payload:r}),resetForm:t=>({type:`${e}/form/${t}/reset`})}}function Qi(e="nice"){return(t={},r)=>{if(!r.type.startsWith(`${e}/`))return t;const a=r.type.split("/"),[,n,s,o]=a;if(!n||!s)return t;const i=`${n}/${s}`;switch(o){case"setState":return{...t,[i]:{...t[i]??{},...r.payload}};case"setFilter":case"setSort":case"setValues":return{...t,[i]:{...t[i]??{},[o]:r.payload}};case"reset":return{...t,[i]:{}};default:return t}}}function Zi(e){let t=null,r=[];return{load:async()=>{if(r.length>0)return r;const s=await e.queryFn();return r=s,s},subscribe:()=>(t=new WebSocket(e.url,"graphql-ws"),t.onopen=()=>{t.send(JSON.stringify({type:"connection_init",payload:e.connectionParams??{}})),t.send(JSON.stringify({type:"start",id:"1",payload:{query:e.query,variables:e.variables}}))},t.onmessage=s=>{var o,i;try{const l=JSON.parse(s.data);l.type==="data"&&((o=l.payload)!=null&&o.data)&&(r=(e.extractData??(u=>{const f=u,p=Object.keys(f)[0];return p?f[p]:[]}))(l.payload.data),(i=e.onData)==null||i.call(e,r))}catch{}},()=>{t==null||t.close(),t=null}),unsubscribe:()=>{t==null||t.close(),t=null}}}async function ec(e,t){var d;const r=await fetch(e);if(!r.ok)throw new Error(`OpenAPI fetch failed: ${r.status}`);const a=await r.json(),s=(((d=a.components)==null?void 0:d.schemas)??a.definitions??{})[t];if(!s)throw new Error(`Schema "${t}" not found in OpenAPI spec`);const o=new Set(s.required??[]),i=[],l=[];for(const[u,f]of Object.entries(s.properties??{})){const p=tt(f),g=f.title??rt(u);i.push({dataField:u,caption:g,dataType:p,allowEditing:!f.readOnly,visible:!u.toLowerCase().endsWith("id")||u==="id",...f.enum?{lookup:{dataSource:f.enum,valueExpr:"this",displayExpr:"this"}}:{}}),l.push({dataField:u,label:g,editorType:fr(f,p),isRequired:o.has(u),editorOptions:mr(f),...o.has(u)?{validationRules:[{type:"required",message:`${g} jest wymagane`}]}:{}})}return{columns:i,formFields:l,schema:s}}function tc(e){const t=[];for(const[r,a]of Object.entries(e.properties??{}))t.push({dataField:r,caption:a.title??rt(r),dataType:tt(a),allowEditing:!a.readOnly});return t}function rc(e){const t=new Set(e.required??[]),r=[];for(const[a,n]of Object.entries(e.properties??{})){const s=tt(n);r.push({dataField:a,label:n.title??rt(a),editorType:fr(n,s),isRequired:t.has(a),editorOptions:mr(n)})}return r}function tt(e){return e.type==="integer"||e.type==="number"?"number":e.type==="boolean"?"boolean":e.format==="date"?"date":e.format==="date-time"?"datetime":e.type==="object"||e.type==="array"?"object":"string"}function fr(e,t){return e.enum?"NiceSelect":e.format==="email"||e.format==="uri"||e.format==="url"?"NiceTextInput":e.format==="password"?"NicePasswordInput":t==="number"?"NiceNumberInput":t==="boolean"?"NiceToggle":t==="date"?"NiceDatePicker":t==="datetime"?"NiceDateTimePicker":e.maxLength&&e.maxLength>200?"NiceTextArea":"NiceTextInput"}function mr(e){const t={};return e.minimum!==void 0&&(t.min=e.minimum),e.maximum!==void 0&&(t.max=e.maximum),e.minLength!==void 0&&(t.minLength=e.minLength),e.maxLength!==void 0&&(t.maxLength=e.maxLength),e.pattern&&(t.pattern=e.pattern),e.enum&&(t.items=e.enum.map(r=>({label:r,value:r}))),e.description&&(t.hint=e.description),Object.keys(t).length>0?t:{}}function rt(e){return e.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim()}const pr={enabled:!0,defaultExpanded:!1,showHelpIcon:!0,position:"tooltip",locale:"en"},ac=async(e,t)=>{try{return null}catch{return null}},gr=c.createContext(null),yr=({children:e,config:t,helpContent:r})=>{const[a,n]=c.useState({...pr,...t}),[s,o]=c.useState(new Set),[i,l]=c.useState(()=>new Map(Object.entries(r||{}))),d=c.useCallback(y=>{n(S=>({...S,...y}))},[]),u=c.useCallback(()=>{n(y=>({...y,enabled:!y.enabled}))},[]),f=c.useCallback(y=>{o(S=>new Set(S).add(y))},[]),p=c.useCallback(y=>{o(S=>{const h=new Set(S);return h.delete(y),h})},[]),g=c.useCallback(y=>a.enabled&&!s.has(y),[a.enabled,s]),m=c.useCallback(async y=>{if(i.has(y))return i.get(y)||null;const h=await(a.contentLoader||ac)(y,a.locale);return h&&l(v=>new Map(v).set(y,h)),h},[i,a.contentLoader,a.locale]),b=c.useMemo(()=>({config:a,setConfig:d,toggleGlobalHelp:u,disabledComponents:s,disableComponentHelp:f,enableComponentHelp:p,isHelpEnabled:g,getHelpContent:m,helpCache:i}),[a,d,u,s,f,p,g,m,i]);return x.jsx(gr.Provider,{value:b,children:e})};yr.displayName="NiceHelpProvider";function hr(){const e=c.useContext(gr);return e||{config:pr,setConfig:()=>{},toggleGlobalHelp:()=>{},disabledComponents:new Set,disableComponentHelp:()=>{},enableComponentHelp:()=>{},isHelpEnabled:()=>!0,getHelpContent:async()=>null,helpCache:new Map}}function br(e){const{isHelpEnabled:t,getHelpContent:r,helpCache:a,config:n}=hr(),[s,o]=c.useState(a.get(e)||null),[i,l]=c.useState(!1),d=t(e),u=c.useCallback(async()=>{if(!d)return;l(!0);const f=await r(e);o(f),l(!1)},[d,e,r]);return{content:s,loading:i,enabled:d,loadContent:u,position:n.position,defaultExpanded:n.defaultExpanded,showHelpIcon:n.showHelpIcon}}const Sr=({props:e,compact:t})=>{const{t:r}=B.useNiceTranslation();return!e||e.length===0?null:t?x.jsxs("div",{className:"nice-help__props-compact",children:[e.slice(0,5).map(a=>x.jsxs("div",{className:"nice-help__prop-chip",children:[x.jsx("code",{children:a.name}),a.required&&x.jsx("span",{className:"nice-help__required",children:"*"})]},a.name)),e.length>5&&x.jsxs("span",{className:"nice-help__more",children:["+",e.length-5," ",r("help.moreProps","more")]})]}):x.jsxs("div",{className:"nice-help__props",children:[x.jsx("h4",{className:"nice-help__section-title",children:r("help.props","Properties")}),x.jsxs("table",{className:"nice-help__props-table",children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("th",{children:r("help.propName","Name")}),x.jsx("th",{children:r("help.propType","Type")}),x.jsx("th",{children:r("help.propDefault","Default")}),x.jsx("th",{children:r("help.propDescription","Description")})]})}),x.jsx("tbody",{children:e.map(a=>x.jsxs("tr",{children:[x.jsxs("td",{children:[x.jsx("code",{children:a.name}),a.required&&x.jsx("span",{className:"nice-help__required",title:r("help.required","Required"),children:"*"})]}),x.jsx("td",{children:x.jsx("code",{className:"nice-help__type",children:a.type})}),x.jsx("td",{children:a.default!==void 0?x.jsx("code",{children:String(a.default)}):"—"}),x.jsx("td",{children:a.description})]},a.name))})]})]})},Oe=({tips:e})=>{const{t}=B.useNiceTranslation();return!e||e.length===0?null:x.jsxs("div",{className:"nice-help__tips",children:[x.jsx("h4",{className:"nice-help__section-title",children:t("help.tips","Tips")}),x.jsx("ul",{children:e.map((r,a)=>x.jsxs("li",{children:[x.jsx("span",{className:"nice-help__tip-icon",children:"💡"}),r]},a))})]})},nc=({examples:e})=>{var n,s;const{t}=B.useNiceTranslation(),[r,a]=c.useState(0);return!e||e.length===0?null:x.jsxs("div",{className:"nice-help__examples",children:[x.jsx("h4",{className:"nice-help__section-title",children:t("help.examples","Examples")}),e.length>1&&x.jsx("div",{className:"nice-help__example-tabs",children:e.map((o,i)=>x.jsx("button",{className:`nice-help__example-tab ${r===i?"nice-help__example-tab--active":""}`,onClick:()=>a(i),children:o.title},i))}),x.jsx("pre",{className:"nice-help__code",children:x.jsx("code",{className:`language-${((n=e[r])==null?void 0:n.language)||"tsx"}`,children:(s=e[r])==null?void 0:s.code})})]})},xr=({componentName:e,content:t,children:r,position:a,defaultExpanded:n,disabled:s=!1,className:o,icon:i,title:l,showProps:d=!0,showExamples:u=!1,showTips:f=!0,compact:p=!1})=>{const{t:g}=B.useNiceTranslation(),{content:m,loading:b,enabled:y,loadContent:S,position:h,defaultExpanded:v,showHelpIcon:w}=br(e),A=t||m,C=a||h,M=n??v,[k,E]=c.useState(M);return c.useEffect(()=>{y&&!t&&!m&&S()},[y,t,m,S]),s||!y?x.jsx(x.Fragment,{children:r}):C==="tooltip"?x.jsxs("div",{className:`nice-help-tooltip-wrapper ${o||""}`,children:[r,w&&A&&x.jsx("button",{className:"nice-help__trigger",onClick:()=>E(!k),"aria-label":g("help.toggle","Toggle help"),"aria-expanded":k,children:i||x.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:x.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"})})}),k&&A&&x.jsx("div",{className:"nice-help__tooltip",children:x.jsxs("div",{className:"nice-help__tooltip-content",children:[x.jsx("h3",{className:"nice-help__title",children:l||A.name}),x.jsx("p",{className:"nice-help__description",children:A.description}),f&&A.tips&&x.jsx(Oe,{tips:A.tips}),d&&A.props&&x.jsx(Sr,{props:A.props,compact:!0})]})})]}):x.jsxs("div",{className:`nice-help ${C==="bottom"?"nice-help--bottom":""} ${o||""}`,children:[C==="top"&&A&&x.jsx(vt,{content:A,expanded:k,onToggle:()=>E(!k),loading:b,title:l,showProps:d,showExamples:u,showTips:f,compact:p}),r,C==="bottom"&&A&&x.jsx(vt,{content:A,expanded:k,onToggle:()=>E(!k),loading:b,title:l,showProps:d,showExamples:u,showTips:f,compact:p}),C==="inline"&&A&&k&&x.jsxs("div",{className:"nice-help__inline",children:[x.jsx("p",{className:"nice-help__description",children:A.description}),f&&A.tips&&x.jsx(Oe,{tips:A.tips})]})]})};xr.displayName="NiceInlineHelp";const vt=({content:e,expanded:t,onToggle:r,loading:a,title:n,showProps:s,showExamples:o,showTips:i,compact:l})=>{const{t:d}=B.useNiceTranslation();return a?x.jsx("div",{className:"nice-help__panel nice-help__panel--loading",children:x.jsx("div",{className:"nice-spinner nice-spinner--sm"})}):x.jsxs("div",{className:`nice-help__panel ${t?"nice-help__panel--expanded":""}`,children:[x.jsxs("button",{className:"nice-help__panel-header",onClick:r,"aria-expanded":t,children:[x.jsx("span",{className:"nice-help__panel-icon",children:t?"▾":"▸"}),x.jsxs("span",{className:"nice-help__panel-title",children:[n||d("help.about","About")," ",e.name]}),e.status&&x.jsx("span",{className:`nice-help__status nice-help__status--${e.status}`,children:e.status})]}),t&&x.jsxs("div",{className:"nice-help__panel-content",children:[x.jsx("p",{className:"nice-help__description",children:e.description}),i&&e.tips&&x.jsx(Oe,{tips:e.tips}),s&&e.props&&x.jsx(Sr,{props:e.props,compact:l}),o&&e.examples&&x.jsx(nc,{examples:e.examples}),e.seeAlso&&e.seeAlso.length>0&&x.jsxs("div",{className:"nice-help__see-also",children:[x.jsx("h4",{className:"nice-help__section-title",children:d("help.seeAlso","See Also")}),x.jsx("ul",{children:e.seeAlso.map((u,f)=>x.jsx("li",{children:x.jsx("code",{children:u})},f))})]})]})]})},vr=({text:e,position:t="top",className:r,children:a})=>{const[n,s]=c.useState(!1);return x.jsxs("span",{className:`nice-quick-help nice-quick-help--${t} ${r||""}`,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:()=>s(!1),children:[a,n&&x.jsx("span",{className:"nice-quick-help__popup",role:"tooltip",children:e})]})};vr.displayName="NiceQuickHelp";const wr=({content:e,size:t="sm",className:r,onOpen:a})=>{const{t:n}=B.useNiceTranslation(),[s,o]=c.useState(!1),i=c.useCallback(()=>{o(!s),!s&&a&&a()},[s,a]),l=typeof e=="string"?e:e.description,d=typeof e=="string"?void 0:e.name;return x.jsxs("span",{className:`nice-help-icon nice-help-icon--${t} ${r||""}`,children:[x.jsx("button",{className:"nice-help-icon__btn",onClick:i,"aria-label":n("help.showHelp","Show help"),"aria-expanded":s,children:x.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:x.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"})})}),s&&x.jsxs("div",{className:"nice-help-icon__popup",children:[d&&x.jsx("strong",{children:d}),x.jsx("p",{children:l}),x.jsx("button",{className:"nice-help-icon__close",onClick:()=>o(!1),children:"×"})]})]})};wr.displayName="NiceHelpIcon";class kr{constructor(t="ntd-user-preferences"){this.key=t}async load(){try{const t=localStorage.getItem(this.key);return t?JSON.parse(t):null}catch{return null}}async save(t){localStorage.setItem(this.key,JSON.stringify(t))}async clear(){localStorage.removeItem(this.key)}}class sc{constructor(t="ntd-preferences",r="preferences"){this.db=null,this.dbName=t,this.storeName=r}async getDB(){return this.db?this.db:new Promise((t,r)=>{const a=indexedDB.open(this.dbName,1);a.onerror=()=>r(a.error),a.onsuccess=()=>{this.db=a.result,t(this.db)},a.onupgradeneeded=n=>{const s=n.target.result;s.objectStoreNames.contains(this.storeName)||s.createObjectStore(this.storeName,{keyPath:"id"})}})}async load(){const t=await this.getDB();return new Promise((r,a)=>{const o=t.transaction(this.storeName,"readonly").objectStore(this.storeName).get("user-preferences");o.onerror=()=>a(o.error),o.onsuccess=()=>{var i;return r(((i=o.result)==null?void 0:i.data)||null)}})}async save(t){const r=await this.getDB();return new Promise((a,n)=>{const i=r.transaction(this.storeName,"readwrite").objectStore(this.storeName).put({id:"user-preferences",data:t});i.onerror=()=>n(i.error),i.onsuccess=()=>a()})}async clear(){const t=await this.getDB();return new Promise((r,a)=>{const o=t.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete("user-preferences");o.onerror=()=>a(o.error),o.onsuccess=()=>r()})}}class oc{constructor(t,r){this.baseUrl=t,this.getAuthHeaders=r}getHeaders(){var t;return{"Content-Type":"application/json",...((t=this.getAuthHeaders)==null?void 0:t.call(this))||{}}}async fetch(){const t=await fetch(`${this.baseUrl}/preferences`,{method:"GET",headers:this.getHeaders()});if(!t.ok){if(t.status===404)return null;throw new Error(`Failed to fetch preferences: ${t.statusText}`)}return t.json()}async push(t){const r=await fetch(`${this.baseUrl}/preferences`,{method:"PUT",headers:this.getHeaders(),body:JSON.stringify(t)});if(!r.ok)throw new Error(`Failed to save preferences: ${r.statusText}`)}async getServerTimestamp(){const t=await fetch(`${this.baseUrl}/preferences/timestamp`,{method:"GET",headers:this.getHeaders()});return t.ok&&(await t.json()).timestamp||0}}const Cr=c.createContext(null);function at(){const e=c.useContext(Cr);if(!e)throw new Error("useUserPreferences must be used within NiceUserPreferencesProvider");return e}function nt(e,t){const{getControlPreferences:r,setControlPreferences:a,updateControlPreferences:n}=at(),s=r(e,t),o=c.useCallback(l=>a(e,t,l),[e,t,a]),i=c.useCallback(l=>n(e,t,l),[e,t,n]);return[s,o,i]}function ic(e){return nt(e,"grid")}function cc(e){return nt(e,"chart")}const wt={version:1,global:{},controls:{}};function lc({storage:e=new kr,syncAdapter:t,autoSyncInterval:r=0,saveDebounce:a=500,children:n}){const[s,o]=c.useState(wt),[i,l]=c.useState(!0),[d,u]=c.useState(!1),[f,p]=c.useState(null),g=c.useRef(),m=c.useRef();c.useEffect(()=>{let N=!0;return(async()=>{try{const I=await e.load();N&&I&&o(I)}catch(I){N&&p(I instanceof Error?I:new Error("Failed to load preferences"))}finally{N&&l(!1)}})(),()=>{N=!1}},[e]);const b=c.useCallback(N=>{g.current&&clearTimeout(g.current),g.current=setTimeout(async()=>{try{await e.save(N)}catch(R){p(R instanceof Error?R:new Error("Failed to save preferences"))}},a)},[e,a]);c.useEffect(()=>{i||b(s)},[s,i,b]),c.useEffect(()=>{if(t&&r>0)return m.current=setInterval(()=>{C()},r),()=>{m.current&&clearInterval(m.current)}},[t,r]),c.useEffect(()=>()=>{g.current&&clearTimeout(g.current),m.current&&clearInterval(m.current)},[]);const y=c.useCallback((N,R)=>{var I;return(I=s.controls[N])==null?void 0:I[R]},[s]),S=c.useCallback((N,R,I)=>{o(H=>({...H,controls:{...H.controls,[N]:{...H.controls[N],[R]:I,lastModified:Date.now()}}}))},[]),h=c.useCallback((N,R,I)=>{o(H=>{var j;const D=(j=H.controls[N])==null?void 0:j[R],z=typeof D=="object"&&D!==null?{...D,...I}:I;return{...H,controls:{...H.controls,[N]:{...H.controls[N],[R]:z,lastModified:Date.now()}}}})},[]),v=c.useCallback((N,R)=>{o(I=>{if(R){const{[R]:z,...j}=I.controls[N]||{};return{...I,controls:{...I.controls,[N]:j}}}const{[N]:H,...D}=I.controls;return{...I,controls:D}})},[]),w=c.useCallback(N=>s.global[N],[s]),A=c.useCallback((N,R)=>{o(I=>({...I,global:{...I.global,[N]:R}}))},[]),C=c.useCallback(async()=>{if(t){u(!0),p(null);try{const N=await t.getServerTimestamp(),R=s.lastSync||0;if(N>R){const I=await t.fetch();I&&(o({...I,lastSync:Date.now()}),await e.save(I))}else{const I={...s,lastSync:Date.now()};await t.push(I),o(I)}}catch(N){p(N instanceof Error?N:new Error("Sync failed"))}finally{u(!1)}}},[t,s,e]),M=c.useCallback(()=>JSON.stringify(s,null,2),[s]),k=c.useCallback(N=>{try{const R=JSON.parse(N);if(typeof R.version!="number"||!R.controls)throw new Error("Invalid preferences format");o(R)}catch(R){p(R instanceof Error?R:new Error("Import failed"))}},[]),E=c.useCallback(()=>{o(wt),e.clear()},[e]),T=c.useMemo(()=>({preferences:s,isLoading:i,isSyncing:d,error:f,getControlPreferences:y,setControlPreferences:S,updateControlPreferences:h,clearControlPreferences:v,getGlobalPreferences:w,setGlobalPreferences:A,sync:C,exportPreferences:M,importPreferences:k,resetAllPreferences:E}),[s,i,d,f,y,S,h,v,w,A,C,M,k,E]);return x.jsx(Cr.Provider,{value:T,children:n})}function dc({showGlobal:e=!0,showControls:t=!0,showExportImport:r=!0,showSync:a=!0,className:n,style:s}){var w,A,C,M;const{preferences:o,isLoading:i,isSyncing:l,error:d,sync:u,exportPreferences:f,importPreferences:p,resetAllPreferences:g,setGlobalPreferences:m,clearControlPreferences:b}=at(),y=c.useRef(null),S=()=>{const k=f(),E=new Blob([k],{type:"application/json"}),T=URL.createObjectURL(E),N=document.createElement("a");N.href=T,N.download="nice2dev-preferences.json",N.click(),URL.revokeObjectURL(T)},h=k=>{var N;const E=(N=k.target.files)==null?void 0:N[0];if(!E)return;const T=new FileReader;T.onload=()=>{p(T.result)},T.readAsText(E)};if(i)return x.jsx("div",{className:n,style:s,children:"Loading preferences..."});const v=Object.keys(o.controls);return x.jsxs("div",{className:`ntd-preferences-panel ${n||""}`,style:{fontFamily:"system-ui, sans-serif",fontSize:"14px",padding:"16px",...s},children:[d&&x.jsx("div",{style:{padding:"12px",marginBottom:"16px",background:"var(--danger-bg, #fef2f2)",border:"1px solid #fecaca",borderRadius:"6px",color:"var(--color-error, #dc2626)"},children:d.message}),x.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"20px",flexWrap:"wrap"},children:[a&&x.jsx("button",{onClick:u,disabled:l,style:{padding:"8px 16px",border:"1px solid var(--border-color, #e5e7eb)",borderRadius:"6px",background:"var(--bg-primary, #fff)",cursor:l?"wait":"pointer"},children:l?"Syncing...":"Sync"}),r&&x.jsxs(x.Fragment,{children:[x.jsx("button",{onClick:S,style:{padding:"8px 16px",border:"1px solid var(--border-color, #e5e7eb)",borderRadius:"6px",background:"var(--bg-primary, #fff)",cursor:"pointer"},children:"Export"}),x.jsx("button",{onClick:()=>{var k;return(k=y.current)==null?void 0:k.click()},style:{padding:"8px 16px",border:"1px solid var(--border-color, #e5e7eb)",borderRadius:"6px",background:"var(--bg-primary, #fff)",cursor:"pointer"},children:"Import"}),x.jsx("input",{ref:y,type:"file",accept:".json",onChange:h,style:{display:"none"}})]}),x.jsx("button",{onClick:g,style:{padding:"8px 16px",border:"1px solid #dc2626",borderRadius:"6px",background:"var(--danger-bg, #fef2f2)",color:"var(--color-error, #dc2626)",cursor:"pointer",marginLeft:"auto"},children:"Reset All"})]}),e&&x.jsxs("div",{style:{marginBottom:"24px"},children:[x.jsx("h3",{style:{margin:"0 0 12px",fontSize:"16px",fontWeight:600},children:"Global Preferences"}),x.jsxs("div",{style:{display:"grid",gap:"12px"},children:[x.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[x.jsx("input",{type:"checkbox",checked:((w=o.global.display)==null?void 0:w.reducedMotion)||!1,onChange:k=>m("display",{...o.global.display,reducedMotion:k.target.checked})}),"Reduced motion"]}),x.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[x.jsx("input",{type:"checkbox",checked:((A=o.global.display)==null?void 0:A.highContrast)||!1,onChange:k=>m("display",{...o.global.display,highContrast:k.target.checked})}),"High contrast"]}),x.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:["Font scale:",x.jsx("input",{type:"range",min:"0.8",max:"1.5",step:"0.1",value:((C=o.global.display)==null?void 0:C.fontScale)||1,onChange:k=>m("display",{...o.global.display,fontScale:parseFloat(k.target.value)}),style:{flex:1}}),x.jsxs("span",{children:[((((M=o.global.display)==null?void 0:M.fontScale)||1)*100).toFixed(0),"%"]})]})]})]}),t&&v.length>0&&x.jsxs("div",{children:[x.jsxs("h3",{style:{margin:"0 0 12px",fontSize:"16px",fontWeight:600},children:["Control Preferences (",v.length,")"]}),x.jsx("div",{style:{display:"grid",gap:"8px"},children:v.map(k=>{const E=o.controls[k],T=Object.keys(E).filter(N=>N!=="lastModified");return x.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",background:"var(--bg-secondary, #f9fafb)",borderRadius:"6px"},children:[x.jsxs("div",{children:[x.jsx("div",{style:{fontWeight:500},children:k}),x.jsx("div",{style:{fontSize:"12px",color:"var(--text-muted, #6b7280)"},children:T.join(", ")})]}),x.jsx("button",{onClick:()=>b(k),style:{padding:"4px 8px",border:"none",borderRadius:"4px",background:"var(--border-color, #e5e7eb)",cursor:"pointer",fontSize:"12px"},children:"Clear"})]},k)})})]}),t&&v.length===0&&x.jsx("div",{style:{color:"var(--text-muted, #6b7280)",fontStyle:"italic"},children:"No control preferences saved yet."})]})}const uc={cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"traceless",source:"default",requiresConsentBanner:!1,resolvedAt:Date.now(),version:"1.0.0"},Mr={traceless:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"traceless",requiresConsentBanner:!1},ephemeral:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"ephemeral",requiresConsentBanner:!1},private:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!0,strictAuthCookieOnly:!0,effectiveMode:"private",requiresConsentBanner:!1},balanced:{cookiesAllowed:!1,localStorageAllowed:!0,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"balanced",requiresConsentBanner:!0},full:{cookiesAllowed:!0,localStorageAllowed:!0,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"full",requiresConsentBanner:!0},custom:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"custom",requiresConsentBanner:!1}},te=["traceless","ephemeral","private","balanced","full","custom"];function fc(e,t){const r=te.indexOf(e),a=te.indexOf(t);return r<=a?e:t}function ge(e,t){const r=te.indexOf(e),a=te.indexOf(t);return r<=a}function mc(e,t,r,a){let n=e.defaultMode,s="instance";t&&e.allowTenantOverride&&ge(t.mode,n)&&(n=t.mode,s="tenant"),r&&(t!=null&&t.allowGroupOverride)&&ge(r.mode,n)&&(n=r.mode,s="group"),a&&(t!=null&&t.allowUserOverride||r!=null&&r.allowUserLockdown)&&ge(a.preferredMode,n)&&(n=a.preferredMode,s="user");const o=Mr[n],i={...o,cookiesAllowed:o.cookiesAllowed&&e.maxCookies,localStorageAllowed:o.localStorageAllowed&&e.maxLocalStorage,sessionStorageAllowed:o.sessionStorageAllowed&&e.maxSessionStorage,source:s,resolvedAt:Date.now(),version:"1.0.0"};return a&&(a.restrictCookies&&(i.cookiesAllowed=!1),a.restrictLocalStorage&&(i.localStorageAllowed=!1),a.restrictSessionStorage&&(i.sessionStorageAllowed=!1)),i.effectiveMode=st(i),i.requiresConsentBanner=Ar(i),i}function st(e){const{cookiesAllowed:t,localStorageAllowed:r,sessionStorageAllowed:a,strictAuthCookieOnly:n}=e;return!t&&!r&&!a?"traceless":!t&&!r&&a&&!n?"ephemeral":!t&&!r&&a&&n?"private":!t&&r&&a?"balanced":t&&r&&a?"full":"custom"}function Ar(e){return!e.cookiesAllowed&&!e.localStorageAllowed?!1:e.effectiveMode==="full"||e.effectiveMode==="balanced"}const Er=new Map;class Nr{constructor(t,r="nice2dev",a="local"){this.policy=t,this.namespace=r,this.defaultBackend=a}getBackend(t){const r=t||this.defaultBackend;if(r==="local"&&this.policy.localStorageAllowed)try{if(typeof localStorage<"u")return localStorage}catch{}if((r==="session"||r==="local")&&this.policy.sessionStorageAllowed)try{if(typeof sessionStorage<"u")return sessionStorage}catch{}return Er}getKey(t){return`${this.namespace}:${t}`}get(t,r){const a=this.getBackend(r),n=this.getKey(t);try{const s=a instanceof Map?a.get(n):a.getItem(n);if(s==null)return null;try{return JSON.parse(s)}catch{return s}}catch{return null}}set(t,r,a){const n=this.getBackend(a),s=this.getKey(t);try{const o=typeof r=="string"?r:JSON.stringify(r);return n instanceof Map?n.set(s,o):n.setItem(s,o),!0}catch{return!1}}remove(t,r){const a=this.getBackend(r),n=this.getKey(t);try{return a instanceof Map?a.delete(n):(a.removeItem(n),!0)}catch{return!1}}clear(t){const r=this.getBackend(t),a=`${this.namespace}:`;try{if(r instanceof Map)for(const n of r.keys())n.startsWith(a)&&r.delete(n);else{const n=[];for(let s=0;s<r.length;s++){const o=r.key(s);o&&o.startsWith(a)&&n.push(o)}n.forEach(s=>r.removeItem(s))}}catch{}}keys(t){const r=this.getBackend(t),a=`${this.namespace}:`,n=[];try{if(r instanceof Map)for(const s of r.keys())s.startsWith(a)&&n.push(s.slice(a.length));else for(let s=0;s<r.length;s++){const o=r.key(s);o&&o.startsWith(a)&&n.push(o.slice(a.length))}}catch{}return n}has(t,r){return this.get(t,r)!==null}getCapabilities(){return{canUseCookies:this.policy.cookiesAllowed,canUseLocalStorage:this.policy.localStorageAllowed,canUseSessionStorage:this.policy.sessionStorageAllowed,canPersist:this.policy.localStorageAllowed,effectiveMode:this.policy.effectiveMode,actualBackend:this.getActualBackendType()}}getActualBackendType(){const t=this.getBackend();return t instanceof Map?"memory":t===sessionStorage?"session":"local"}updatePolicy(t){this.policy=t}}function pc(e,t){const{cookies:r,localStorage:a,storageMode:n}=t,s={...e};if(n&&n!=="auto")switch(n){case"traceless":s.cookiesAllowed=!1,s.localStorageAllowed=!1,s.sessionStorageAllowed=!1;break;case"ephemeral":s.cookiesAllowed=!1,s.localStorageAllowed=!1;break}return r===!1&&(s.cookiesAllowed=!1),a===!1&&(s.localStorageAllowed=!1),s.effectiveMode=st(s),s.source="control",s}function gc(e,t,r){return{generatedAt:new Date().toISOString(),instanceId:t,tenantId:r,effectiveMode:e.effectiveMode,cookies:{count:0,allowed:e.cookiesAllowed,strictAuthOnly:e.strictAuthCookieOnly,thirdParty:!1,tracking:!1},localStorage:{bytesUsed:0,allowed:e.localStorageAllowed,keysCount:0},sessionStorage:{bytesUsed:0,allowed:e.sessionStorageAllowed,keysCount:0},consentBanner:{required:e.requiresConsentBanner,shown:e.requiresConsentBanner},compliance:{ePrivacyCompliant:!e.cookiesAllowed||e.requiresConsentBanner,gdprCompliant:!0,pecrCompliant:!e.cookiesAllowed||e.requiresConsentBanner},statement:yc(e)}}function yc(e){return e.effectiveMode==="traceless"?"This OmniVerk instance operates in Traceless™ mode. No cookies are set (0), no data is saved to localStorage (0), and no sessionStorage is used (0). No cookie consent banner is required under ePrivacy Directive Art. 5(3) as no similar technologies are employed.":e.effectiveMode==="ephemeral"?"This OmniVerk instance operates in Ephemeral mode. No cookies are set, no localStorage is used. sessionStorage is used for session-only data that is automatically cleared when the browser tab is closed. No cookie consent banner is required.":e.effectiveMode==="private"?"This OmniVerk instance operates in Private mode. One strictly necessary httpOnly authentication cookie may be set. sessionStorage is used for session preferences. No consent banner is required as only strictly necessary technologies are used.":e.effectiveMode==="balanced"?"This OmniVerk instance operates in Balanced mode. localStorage is used for user preferences. sessionStorage is used for session data. No cookies are set. Depending on jurisdiction, a consent banner may be shown.":"This OmniVerk instance operates in Full mode. Cookies, localStorage, and sessionStorage are enabled. A consent banner is displayed to users before any non-essential storage is used."}function hc(e){const{effectiveMode:t}=e;switch(t){case"traceless":return{mode:"traceless",icon:"🟢",color:"#10b981",label:"Traceless™",tooltip:"Your data is not stored on this device. Zero cookies, zero localStorage, zero traces.",cssClass:"nice-traceless-badge--traceless"};case"ephemeral":return{mode:"ephemeral",icon:"🔵",color:"#3b82f6",label:"Ephemeral",tooltip:"Session-only storage. Data is cleared when you close this tab.",cssClass:"nice-traceless-badge--ephemeral"};case"private":return{mode:"private",icon:"🟡",color:"#eab308",label:"Private",tooltip:"Minimal storage with one secure authentication cookie.",cssClass:"nice-traceless-badge--private"};case"balanced":return{mode:"balanced",icon:"🟠",color:"#f97316",label:"Balanced",tooltip:"Preferences are saved locally. No tracking cookies.",cssClass:"nice-traceless-badge--balanced"};case"full":return{mode:"full",icon:"🔴",color:"#ef4444",label:"Full",tooltip:"All storage enabled including analytics. You control what is stored via consent.",cssClass:"nice-traceless-badge--full"};case"custom":default:return{mode:"custom",icon:"⚪",color:"#6b7280",label:"Custom",tooltip:"Custom storage configuration.",cssClass:"nice-traceless-badge--custom"}}}function bc(e,t){const r=e.localStorageAllowed,a=e.sessionStorageAllowed,s={preferences:{message:"Your preferences will reset when you close this tab.",key:"traceless.warning.preferences"},draft:{message:"Unsaved draft will be lost if you close or refresh this page.",key:"traceless.warning.draft"},history:{message:"Search history is not saved in this privacy mode.",key:"traceless.warning.history"},auth:{message:"You will need to log in again each time you visit.",key:"traceless.warning.auth"},"grid-state":{message:"Table settings (sorting, filtering, columns) will reset on page refresh.",key:"traceless.warning.gridState"}}[t];return!r&&!a?{canPersist:!1,canSession:!1,warningMessage:s.message,warningKey:s.key}:!r&&a?{canPersist:!1,canSession:!0,warningMessage:t!=="auth"?s.message:void 0,warningKey:t!=="auth"?s.key:void 0}:{canPersist:!0,canSession:!0}}const Sc="X-OmniVerk-Storage-Policy";function xc(e){const t=e.toLowerCase().trim();return te.includes(t)?t:null}function vc(e){return e.effectiveMode}function wc(e,t){return new Nr(e,t)}function kc(e){return{maxCookies:!1,maxLocalStorage:!1,maxSessionStorage:!0,defaultMode:"ephemeral",allowTenantOverride:!1,instanceId:e}}function Cc(e){return{maxCookies:!0,maxLocalStorage:!0,maxSessionStorage:!0,defaultMode:"balanced",allowTenantOverride:!0,instanceId:e}}function Mc(){if(typeof document<"u"){const e=document.cookie.split(";");for(const t of e){const r=t.split("=")[0].trim();document.cookie=`${r}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}}try{typeof localStorage<"u"&&localStorage.clear()}catch{}try{typeof sessionStorage<"u"&&sessionStorage.clear()}catch{}Er.clear()}function Ac(e){const t=[];if(!e.cookiesAllowed&&typeof document<"u"){const r=document.cookie;r&&r.length>0&&t.push({type:"cookie",severity:"high",message:`Cookies found but not allowed: ${r.split(";").length} cookie(s)`,data:r})}if(!e.localStorageAllowed)try{typeof localStorage<"u"&&localStorage.length>0&&t.push({type:"localStorage",severity:"high",message:`localStorage has ${localStorage.length} item(s) but not allowed`})}catch{}if(!e.sessionStorageAllowed)try{typeof sessionStorage<"u"&&sessionStorage.length>0&&t.push({type:"sessionStorage",severity:"medium",message:`sessionStorage has ${sessionStorage.length} item(s) but not allowed`})}catch{}return{compliant:t.length===0,violations:t,auditedAt:Date.now(),policy:e.effectiveMode}}const Tr=c.createContext(null),Ec=({config:e,children:t})=>{const[r,a]=c.useState(!1),[n,s]=c.useState(null),o=c.useRef(null);c.useEffect(()=>()=>{var m;(m=o.current)==null||m.abort()},[]);const i=c.useCallback(()=>{var m;(m=o.current)==null||m.abort(),o.current=null,a(!1)},[]),l=async(m,b,y)=>{var v,w,A,C,M,k;const S=new TextDecoder;let h="";for(;;){const{done:E,value:T}=await m.read();if(E)break;h+=S.decode(T,{stream:!0});const N=h.split(`
41
- `);h=N.pop()||"";for(const R of N)if(R.startsWith("data: ")){const I=R.slice(6).trim();if(I==="[DONE]"){b({content:"",done:!0});return}try{const H=JSON.parse(I);let D="",z=!1;y==="openai"||y==="azure-openai"?(D=((A=(w=(v=H.choices)==null?void 0:v[0])==null?void 0:w.delta)==null?void 0:A.content)||"",z=((M=(C=H.choices)==null?void 0:C[0])==null?void 0:M.finish_reason)==="stop"):y==="anthropic"&&(H.type==="content_block_delta"?D=((k=H.delta)==null?void 0:k.text)||"":H.type==="message_stop"&&(z=!0)),(D||z)&&b({content:D,done:z})}catch{}}}b({content:"",done:!0})},d=(m,b)=>{var y;return{model:b.model||e.defaultModel||"gpt-4",messages:b.systemPrompt?[{role:"system",content:b.systemPrompt},...m]:m,temperature:b.temperature??.7,max_tokens:b.maxTokens,stop:b.stop,stream:b.stream??!1,tools:(y=b.tools)==null?void 0:y.map(S=>({type:"function",function:{name:S.name,description:S.description,parameters:S.parameters}}))}},u=(m,b)=>{var h;const y=b.systemPrompt||((h=m.find(v=>v.role==="system"))==null?void 0:h.content),S=m.filter(v=>v.role!=="system");return{model:b.model||e.defaultModel||"claude-3-opus-20240229",max_tokens:b.maxTokens||4096,system:y,messages:S.map(v=>({role:v.role==="assistant"?"assistant":"user",content:v.content})),temperature:b.temperature??.7,stop_sequences:b.stop,stream:b.stream??!1}},f=c.useCallback(async(m,b={})=>{var y,S,h,v,w,A;if(e.provider==="custom"&&e.customHandler)return e.customHandler(m,b);a(!0),s(null),o.current=new AbortController;try{let C,M,k;if(e.provider==="openai")C=e.endpoint||"https://api.openai.com/v1/chat/completions",M={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},k=d(m,{...b,stream:!1});else if(e.provider==="azure-openai")C=e.endpoint||"",M={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},k=d(m,{...b,stream:!1});else if(e.provider==="anthropic")C=e.endpoint||"https://api.anthropic.com/v1/messages",M={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},k=u(m,{...b,stream:!1});else throw new Error(`Unsupported provider: ${e.provider}`);const E=await fetch(C,{method:"POST",headers:M,body:JSON.stringify(k),signal:o.current.signal});if(!E.ok){const R=await E.text();throw new Error(`AI request failed: ${E.status} ${R}`)}const T=await E.json();let N;if(e.provider==="openai"||e.provider==="azure-openai"){const R=(y=T.choices)==null?void 0:y[0];N={content:((S=R==null?void 0:R.message)==null?void 0:S.content)||"",finishReason:(R==null?void 0:R.finish_reason)||"stop",toolCalls:(v=(h=R==null?void 0:R.message)==null?void 0:h.tool_calls)==null?void 0:v.map(I=>({id:I.id,name:I.function.name,arguments:JSON.parse(I.function.arguments)})),usage:T.usage&&{promptTokens:T.usage.prompt_tokens,completionTokens:T.usage.completion_tokens,totalTokens:T.usage.total_tokens}}}else e.provider==="anthropic"?N={content:((A=(w=T.content)==null?void 0:w[0])==null?void 0:A.text)||"",finishReason:T.stop_reason||"stop",usage:T.usage&&{promptTokens:T.usage.input_tokens,completionTokens:T.usage.output_tokens,totalTokens:T.usage.input_tokens+T.usage.output_tokens}}:N={content:"",finishReason:"stop"};return N}catch(C){throw C.name==="AbortError"?new Error("Request cancelled"):(s(C),C)}finally{a(!1)}},[e]),p=c.useCallback(async(m,b,y={})=>{if(e.provider==="custom"&&e.customStreamHandler)return e.customStreamHandler(m,y,b);a(!0),s(null),o.current=new AbortController;try{let S,h,v;if(e.provider==="openai")S=e.endpoint||"https://api.openai.com/v1/chat/completions",h={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},v=d(m,{...y,stream:!0});else if(e.provider==="azure-openai")S=e.endpoint||"",h={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},v=d(m,{...y,stream:!0});else if(e.provider==="anthropic")S=e.endpoint||"https://api.anthropic.com/v1/messages",h={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},v=u(m,{...y,stream:!0});else throw new Error(`Unsupported provider: ${e.provider}`);const w=await fetch(S,{method:"POST",headers:h,body:JSON.stringify(v),signal:o.current.signal});if(!w.ok){const C=await w.text();throw new Error(`AI request failed: ${w.status} ${C}`)}if(!w.body)throw new Error("Response body is null");const A=w.body.getReader();await l(A,b,e.provider)}catch(S){if(S.name==="AbortError"){b({content:"",done:!0});return}throw s(S),S}finally{a(!1)}},[e]),g={isConfigured:!!e.apiKey||e.provider==="custom"||e.provider==="local",provider:e.provider,defaultModel:e.defaultModel||null,complete:f,stream:p,cancel:i,isLoading:r,error:n};return x.jsx(Tr.Provider,{value:g,children:t})};function Q(){const e=c.useContext(Tr);if(!e)throw new Error("useNiceAI must be used within a NiceAIProvider");return e}function Nc(e={}){const t=Q(),[r,a]=c.useState(""),[n,s]=c.useState([]),[o,i]=c.useState(!1),[l,d]=c.useState(null),u=c.useCallback(async b=>{i(!0),d(null),a("");const y=[...n,{role:"user",content:b}];try{const S=await t.complete(y,{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature});return s([...y,{role:"assistant",content:S.content}]),a(S.content),S.content}catch(S){throw d(S),S}finally{i(!1)}},[t,n,e]),f=c.useCallback(async(b,y)=>{i(!0),d(null),a("");const S=[...n,{role:"user",content:b}];try{let h="";return await t.stream(S,v=>{v.done||(h+=v.content,a(h),y==null||y(v.content))},{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature}),s([...S,{role:"assistant",content:h}]),h}catch(h){throw d(h),h}finally{i(!1)}},[t,n,e]),p=c.useCallback(()=>{a(""),d(null)},[]),g=c.useCallback(()=>{s([]),a(""),d(null)},[]),m=c.useCallback(()=>{t.cancel(),i(!1)},[t]);return{response:r,isLoading:o,error:l,send:u,sendStreaming:f,clear:p,cancel:m,history:n,clearHistory:g}}function Tc(e={}){const t=Q(),[r,a]=c.useState(""),[n,s]=c.useState(!1),o=c.useCallback(async(u,f="")=>{s(!0),a("");try{const g=(await t.complete([{role:"user",content:`Complete the following ${e.language||""} code. Return ONLY the completion text, no explanation.
40
+ `))??""}}function Pe(e,t,r){return`${e.__ntd_id??Math.random()}-${t}-${r.toString().slice(0,50)}`}function G(e,t,r="warning",a,n){var s,i;if(!D.enabled||!Bi()||a&&((s=D.ignoreComponents)!=null&&s.includes(a)))return;const o={id:`leak-${_i++}`,type:e,severity:r,componentName:a,message:t,stack:Le(),timestamp:Date.now(),data:n};Te.push(o),D.logToConsole&&console[r==="critical"?"error":r==="warning"?"warn":"info"](`%c[NTD Leak Detector] ${e}`,`color: ${r==="critical"?"var(--color-error, #dc2626)":r==="warning"?"var(--color-warning, #f59e0b)":"var(--color-primary, #3b82f6)"}; font-weight: bold`,t,a?`(${a})`:"",""),(i=D.onLeak)==null||i.call(D,o)}function Wi(e){D={...D,...e}}function Vi(){return[...Te]}function Xi(){Te.length=0}function pr(){return Te.reduce((e,t)=>(e[t.type]=(e[t.type]||0)+1,e),{})}function Ui(e,t){const[r,a]=c.useState(e),n=c.useRef(!0),o=c.useRef(t);c.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]);const s=c.useCallback(i=>{n.current?a(i):D.enabled&&G("setState-after-unmount","setState called on unmounted component","warning",o.current)},[]);return[r,s]}function qi(e){const t=c.useRef(null),r=c.useRef(e),a=c.useCallback(()=>{t.current&&(clearTimeout(t.current),D.enabled&&Se.delete(t.current),t.current=null)},[]),n=c.useCallback((o,s)=>{a(),t.current=setTimeout(o,s),D.enabled&&Se.set(t.current,{id:t.current,type:"timeout",componentName:r.current,stack:Le(),createdAt:Date.now()})},[a]);return c.useEffect(()=>()=>{t.current&&(D.enabled&&G("timer-not-cleared","Timeout would have leaked without cleanup","info",r.current),a())},[a]),[n,a]}function Gi(e){const t=c.useRef(null),r=c.useRef(e),a=c.useCallback(()=>{t.current&&(clearInterval(t.current),D.enabled&&Se.delete(t.current),t.current=null)},[]),n=c.useCallback((o,s)=>{a(),t.current=setInterval(o,s),D.enabled&&Se.set(t.current,{id:t.current,type:"interval",componentName:r.current,stack:Le(),createdAt:Date.now()})},[a]);return c.useEffect(()=>()=>{t.current&&(D.enabled&&G("timer-not-cleared","Interval would have leaked without cleanup","warning",r.current),a())},[a]),[n,a]}function Ki(e){const t=c.useRef([]),r=c.useRef(e);return c.useEffect(()=>()=>{for(const{target:a,type:n,listener:o,options:s}of t.current)if(a.removeEventListener(n,o,s),D.enabled){const i=Pe(a,n,o);Fe.delete(i)}t.current.length>0&&D.enabled&&G("listener-not-removed",`${t.current.length} event listener(s) would have leaked without cleanup`,"info",r.current),t.current=[]},[]),c.useCallback((a,n,o,s)=>{if(a.addEventListener(n,o,s),t.current.push({target:a,type:n,listener:o,options:s}),D.enabled){const i=Pe(a,n,o);Fe.set(i,{target:a,type:n,listener:o,componentName:r.current,stack:Le(),createdAt:Date.now()})}return()=>{if(a.removeEventListener(n,o,s),t.current=t.current.filter(i=>i.target!==a||i.type!==n||i.listener!==o),D.enabled){const i=Pe(a,n,o);Fe.delete(i)}}},[])}function gr(e){const t=c.useRef(null),r=c.useRef(e);return c.useEffect(()=>()=>{t.current&&!t.current.signal.aborted&&(t.current.abort(),D.enabled&&G("abort-controller-not-aborted","AbortController was auto-aborted on unmount (fetch may have leaked)","info",r.current))},[]),c.useCallback(()=>(t.current&&t.current.abort(),t.current=new AbortController,t.current.signal),[])}function Ji(e){const t=gr(e);return c.useCallback((r,a)=>{const n=t();return fetch(r,{...a,signal:n})},[t])}function Yi(e){const t=c.useRef([]),r=c.useRef(e);return c.useEffect(()=>()=>{for(const a of t.current)try{a()}catch(n){console.error("Error during subscription cleanup:",n)}t.current.length>0&&D.enabled&&G("subscription-not-unsubscribed",`${t.current.length} subscription(s) would have leaked without cleanup`,"info",r.current),t.current=[]},[]),c.useCallback(a=>{typeof a=="function"?t.current.push(a):a&&typeof a.unsubscribe=="function"&&t.current.push(()=>a.unsubscribe())},[])}function Qi(e,t,r){const[a,n]=c.useState(null),[o,s]=c.useState(WebSocket.CLOSED),i=c.useRef(r);c.useEffect(()=>{if(!e)return;const u=new WebSocket(e,t);return n(u),u.onopen=()=>s(u.readyState),u.onclose=()=>s(u.readyState),u.onerror=()=>s(u.readyState),()=>{(u.readyState===WebSocket.OPEN||u.readyState===WebSocket.CONNECTING)&&(u.close(),D.enabled&&G("websocket-not-closed","WebSocket was auto-closed on unmount","info",i.current))}},[e,t]);const l=c.useCallback(u=>{(a==null?void 0:a.readyState)===WebSocket.OPEN&&a.send(u)},[a]),d=c.useCallback((u,m)=>{a==null||a.close(u,m)},[a]);return{socket:a,readyState:o,send:l,close:d}}function Zi(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>{const o=c.useRef({});return c.useEffect(()=>{if(D.enabled)return vt.set(o.current,{name:r,mountedAt:Date.now()}),()=>{vt.delete(o.current)}},[]),x.jsx(e,{...n})};return a.displayName=`LeakTracked(${r})`,a}function ec(e){const t=c.useRef(Date.now());c.useEffect(()=>(D.enabled&&D.logToConsole&&console.log(`%c[NTD] ${e} mounted`,"color: var(--nice-success, #22c55e)"),()=>{if(D.enabled&&D.logToConsole){const r=Date.now()-t.current;console.log(`%c[NTD] ${e} unmounted (lifetime: ${r}ms)`,"color: var(--nice-warning, #f59e0b)")}}),[e])}async function tc(e){if(!tt)return;const t=window.performance;if(t.memory){const r=t.memory;console.log(`%c[Memory Snapshot${e?`: ${e}`:""}]`,"color: var(--nice-info, #6366f1); font-weight: bold",{usedJSHeapSize:`${(r.usedJSHeapSize/1024/1024).toFixed(2)} MB`,totalJSHeapSize:`${(r.totalJSHeapSize/1024/1024).toFixed(2)} MB`,jsHeapSizeLimit:`${(r.jsHeapSizeLimit/1024/1024).toFixed(2)} MB`})}console.log("%cTip: Use Chrome DevTools Memory tab for detailed heap snapshots","color: var(--nice-text-secondary, #64748b); font-style: italic")}function rc(){tt&&(window.gc?(window.gc(),console.log("%c[GC] Forced garbage collection","color: var(--nice-success, #22c55e)")):console.log("%c[GC] gc() not available. Run Chrome with --expose-gc flag","color: var(--nice-warning, #f59e0b)"))}function ac(e=5e3,t=100){const[r,a]=c.useState({usedMB:0,totalMB:0,limitMB:0,isWarning:!1});return c.useEffect(()=>{const n=window.performance;if(!n.memory)return;const o=()=>{const i=n.memory;if(!i)return;const l=i.usedJSHeapSize/1024/1024,d=i.totalJSHeapSize/1024/1024,u=i.jsHeapSizeLimit/1024/1024,m=l>t;a({usedMB:l,totalMB:d,limitMB:u,isWarning:m}),m&&D.enabled&&G("large-closure",`Memory usage exceeded ${t}MB (${l.toFixed(2)}MB)`,"warning")};o();const s=setInterval(o,e);return()=>clearInterval(s)},[e,t]),r}const yr=()=>{const e=c.useMemo(()=>pr(),[]),t=Object.values(e).reduce((r,a)=>r+a,0);return!D.enabled||t===0,null};yr.displayName="NiceLeakDetectorStatus";function nc(e){const t=()=>{var r;(r=e.queryClient)==null||r.invalidateQueries({queryKey:e.queryKey})};return{load:r=>e.queryFn(r),insert:e.mutationFn?async r=>{const a=await e.mutationFn(r);return t(),a}:void 0,update:e.updateMutationFn?async(r,a)=>{const n=await e.updateMutationFn({key:r,values:a});return t(),n}:void 0,remove:e.deleteMutationFn?async r=>{await e.deleteMutationFn(r),t()}:void 0}}function oc(e,t){return{load:async()=>t.getData(e.getState()),insert:t.addItem?async r=>{const a=e.getState();return t.addItem(a)(r),r}:void 0,update:t.updateItem?async(r,a)=>{const n=e.getState();return t.updateItem(n)(r,a),{...a}}:void 0,remove:t.removeItem?async r=>{const a=e.getState();t.removeItem(a)(r)}:void 0}}function sc(e={}){const t=e.actionPrefix??"nice";return r=>a=>n=>{const o=a(n);if(n.type.startsWith(`${t}/grid/`)){const i=n.type.split("/")[2];i&&e.onGridStateChange&&e.onGridStateChange(i,n.payload)}if(n.type.startsWith(`${t}/form/`)){const i=n.type.split("/")[2];i&&e.onFormStateChange&&e.onFormStateChange(i,n.payload)}return o}}function ic(e="nice"){return{setGridState:(t,r)=>({type:`${e}/grid/${t}/setState`,payload:r}),setGridFilter:(t,r)=>({type:`${e}/grid/${t}/setFilter`,payload:r}),setGridSort:(t,r)=>({type:`${e}/grid/${t}/setSort`,payload:r}),setFormValues:(t,r)=>({type:`${e}/form/${t}/setValues`,payload:r}),resetForm:t=>({type:`${e}/form/${t}/reset`})}}function cc(e="nice"){return(t={},r)=>{if(!r.type.startsWith(`${e}/`))return t;const a=r.type.split("/"),[,n,o,s]=a;if(!n||!o)return t;const i=`${n}/${o}`;switch(s){case"setState":return{...t,[i]:{...t[i]??{},...r.payload}};case"setFilter":case"setSort":case"setValues":return{...t,[i]:{...t[i]??{},[s]:r.payload}};case"reset":return{...t,[i]:{}};default:return t}}}function lc(e){let t=null,r=[];return{load:async()=>{if(r.length>0)return r;const o=await e.queryFn();return r=o,o},subscribe:()=>(t=new WebSocket(e.url,"graphql-ws"),t.onopen=()=>{t.send(JSON.stringify({type:"connection_init",payload:e.connectionParams??{}})),t.send(JSON.stringify({type:"start",id:"1",payload:{query:e.query,variables:e.variables}}))},t.onmessage=o=>{var s,i;try{const l=JSON.parse(o.data);l.type==="data"&&((s=l.payload)!=null&&s.data)&&(r=(e.extractData??(u=>{const m=u,g=Object.keys(m)[0];return g?m[g]:[]}))(l.payload.data),(i=e.onData)==null||i.call(e,r))}catch{}},()=>{t==null||t.close(),t=null}),unsubscribe:()=>{t==null||t.close(),t=null}}}async function dc(e,t){var d;const r=await fetch(e);if(!r.ok)throw new Error(`OpenAPI fetch failed: ${r.status}`);const a=await r.json(),o=(((d=a.components)==null?void 0:d.schemas)??a.definitions??{})[t];if(!o)throw new Error(`Schema "${t}" not found in OpenAPI spec`);const s=new Set(o.required??[]),i=[],l=[];for(const[u,m]of Object.entries(o.properties??{})){const g=rt(m),h=m.title??at(u);i.push({dataField:u,caption:h,dataType:g,allowEditing:!m.readOnly,visible:!u.toLowerCase().endsWith("id")||u==="id",...m.enum?{lookup:{dataSource:m.enum,valueExpr:"this",displayExpr:"this"}}:{}}),l.push({dataField:u,label:h,editorType:hr(m,g),isRequired:s.has(u),editorOptions:br(m),...s.has(u)?{validationRules:[{type:"required",message:`${h} jest wymagane`}]}:{}})}return{columns:i,formFields:l,schema:o}}function uc(e){const t=[];for(const[r,a]of Object.entries(e.properties??{}))t.push({dataField:r,caption:a.title??at(r),dataType:rt(a),allowEditing:!a.readOnly});return t}function fc(e){const t=new Set(e.required??[]),r=[];for(const[a,n]of Object.entries(e.properties??{})){const o=rt(n);r.push({dataField:a,label:n.title??at(a),editorType:hr(n,o),isRequired:t.has(a),editorOptions:br(n)})}return r}function rt(e){return e.type==="integer"||e.type==="number"?"number":e.type==="boolean"?"boolean":e.format==="date"?"date":e.format==="date-time"?"datetime":e.type==="object"||e.type==="array"?"object":"string"}function hr(e,t){return e.enum?"NiceSelect":e.format==="email"||e.format==="uri"||e.format==="url"?"NiceTextInput":e.format==="password"?"NicePasswordInput":t==="number"?"NiceNumberInput":t==="boolean"?"NiceToggle":t==="date"?"NiceDatePicker":t==="datetime"?"NiceDateTimePicker":e.maxLength&&e.maxLength>200?"NiceTextArea":"NiceTextInput"}function br(e){const t={};return e.minimum!==void 0&&(t.min=e.minimum),e.maximum!==void 0&&(t.max=e.maximum),e.minLength!==void 0&&(t.minLength=e.minLength),e.maxLength!==void 0&&(t.maxLength=e.maxLength),e.pattern&&(t.pattern=e.pattern),e.enum&&(t.items=e.enum.map(r=>({label:r,value:r}))),e.description&&(t.hint=e.description),Object.keys(t).length>0?t:{}}function at(e){return e.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim()}const Sr={enabled:!0,defaultExpanded:!1,showHelpIcon:!0,position:"tooltip",locale:"en"},mc=async(e,t)=>{try{return null}catch{return null}},xr=c.createContext(null),vr=({children:e,config:t,helpContent:r})=>{const[a,n]=c.useState({...Sr,...t}),[o,s]=c.useState(new Set),[i,l]=c.useState(()=>new Map(Object.entries(r||{}))),d=c.useCallback(p=>{n(S=>({...S,...p}))},[]),u=c.useCallback(()=>{n(p=>({...p,enabled:!p.enabled}))},[]),m=c.useCallback(p=>{s(S=>new Set(S).add(p))},[]),g=c.useCallback(p=>{s(S=>{const b=new Set(S);return b.delete(p),b})},[]),h=c.useCallback(p=>a.enabled&&!o.has(p),[a.enabled,o]),f=c.useCallback(async p=>{if(i.has(p))return i.get(p)||null;const b=await(a.contentLoader||mc)(p,a.locale);return b&&l(v=>new Map(v).set(p,b)),b},[i,a.contentLoader,a.locale]),y=c.useMemo(()=>({config:a,setConfig:d,toggleGlobalHelp:u,disabledComponents:o,disableComponentHelp:m,enableComponentHelp:g,isHelpEnabled:h,getHelpContent:f,helpCache:i}),[a,d,u,o,m,g,h,f,i]);return x.jsx(xr.Provider,{value:y,children:e})};vr.displayName="NiceHelpProvider";function wr(){const e=c.useContext(xr);return e||{config:Sr,setConfig:()=>{},toggleGlobalHelp:()=>{},disabledComponents:new Set,disableComponentHelp:()=>{},enableComponentHelp:()=>{},isHelpEnabled:()=>!0,getHelpContent:async()=>null,helpCache:new Map}}function kr(e){const{isHelpEnabled:t,getHelpContent:r,helpCache:a,config:n}=wr(),[o,s]=c.useState(a.get(e)||null),[i,l]=c.useState(!1),d=t(e),u=c.useCallback(async()=>{if(!d)return;l(!0);const m=await r(e);s(m),l(!1)},[d,e,r]);return{content:o,loading:i,enabled:d,loadContent:u,position:n.position,defaultExpanded:n.defaultExpanded,showHelpIcon:n.showHelpIcon}}const Cr=({props:e,compact:t})=>{const{t:r}=_.useNiceTranslation();return!e||e.length===0?null:t?x.jsxs("div",{className:"nice-help__props-compact",children:[e.slice(0,5).map(a=>x.jsxs("div",{className:"nice-help__prop-chip",children:[x.jsx("code",{children:a.name}),a.required&&x.jsx("span",{className:"nice-help__required",children:"*"})]},a.name)),e.length>5&&x.jsxs("span",{className:"nice-help__more",children:["+",e.length-5," ",r("help.moreProps","more")]})]}):x.jsxs("div",{className:"nice-help__props",children:[x.jsx("h4",{className:"nice-help__section-title",children:r("help.props","Properties")}),x.jsxs("table",{className:"nice-help__props-table",children:[x.jsx("thead",{children:x.jsxs("tr",{children:[x.jsx("th",{children:r("help.propName","Name")}),x.jsx("th",{children:r("help.propType","Type")}),x.jsx("th",{children:r("help.propDefault","Default")}),x.jsx("th",{children:r("help.propDescription","Description")})]})}),x.jsx("tbody",{children:e.map(a=>x.jsxs("tr",{children:[x.jsxs("td",{children:[x.jsx("code",{children:a.name}),a.required&&x.jsx("span",{className:"nice-help__required",title:r("help.required","Required"),children:"*"})]}),x.jsx("td",{children:x.jsx("code",{className:"nice-help__type",children:a.type})}),x.jsx("td",{children:a.default!==void 0?x.jsx("code",{children:String(a.default)}):"—"}),x.jsx("td",{children:a.description})]},a.name))})]})]})},_e=({tips:e})=>{const{t}=_.useNiceTranslation();return!e||e.length===0?null:x.jsxs("div",{className:"nice-help__tips",children:[x.jsx("h4",{className:"nice-help__section-title",children:t("help.tips","Tips")}),x.jsx("ul",{children:e.map((r,a)=>x.jsxs("li",{children:[x.jsx("span",{className:"nice-help__tip-icon",children:"💡"}),r]},a))})]})},pc=({examples:e})=>{var n,o;const{t}=_.useNiceTranslation(),[r,a]=c.useState(0);return!e||e.length===0?null:x.jsxs("div",{className:"nice-help__examples",children:[x.jsx("h4",{className:"nice-help__section-title",children:t("help.examples","Examples")}),e.length>1&&x.jsx("div",{className:"nice-help__example-tabs",children:e.map((s,i)=>x.jsx("button",{className:`nice-help__example-tab ${r===i?"nice-help__example-tab--active":""}`,onClick:()=>a(i),children:s.title},i))}),x.jsx("pre",{className:"nice-help__code",children:x.jsx("code",{className:`language-${((n=e[r])==null?void 0:n.language)||"tsx"}`,children:(o=e[r])==null?void 0:o.code})})]})},Mr=({componentName:e,content:t,children:r,position:a,defaultExpanded:n,disabled:o=!1,className:s,icon:i,title:l,showProps:d=!0,showExamples:u=!1,showTips:m=!0,compact:g=!1})=>{const{t:h}=_.useNiceTranslation(),{content:f,loading:y,enabled:p,loadContent:S,position:b,defaultExpanded:v,showHelpIcon:w}=kr(e),E=t||f,k=a||b,M=n??v,[C,A]=c.useState(M);return c.useEffect(()=>{p&&!t&&!f&&S()},[p,t,f,S]),o||!p?x.jsx(x.Fragment,{children:r}):k==="tooltip"?x.jsxs("div",{className:`nice-help-tooltip-wrapper ${s||""}`,children:[r,w&&E&&x.jsx("button",{className:"nice-help__trigger",onClick:()=>A(!C),"aria-label":h("help.toggle","Toggle help"),"aria-expanded":C,children:i||x.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:x.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"})})}),C&&E&&x.jsx("div",{className:"nice-help__tooltip",children:x.jsxs("div",{className:"nice-help__tooltip-content",children:[x.jsx("h3",{className:"nice-help__title",children:l||E.name}),x.jsx("p",{className:"nice-help__description",children:E.description}),m&&E.tips&&x.jsx(_e,{tips:E.tips}),d&&E.props&&x.jsx(Cr,{props:E.props,compact:!0})]})})]}):x.jsxs("div",{className:`nice-help ${k==="bottom"?"nice-help--bottom":""} ${s||""}`,children:[k==="top"&&E&&x.jsx(wt,{content:E,expanded:C,onToggle:()=>A(!C),loading:y,title:l,showProps:d,showExamples:u,showTips:m,compact:g}),r,k==="bottom"&&E&&x.jsx(wt,{content:E,expanded:C,onToggle:()=>A(!C),loading:y,title:l,showProps:d,showExamples:u,showTips:m,compact:g}),k==="inline"&&E&&C&&x.jsxs("div",{className:"nice-help__inline",children:[x.jsx("p",{className:"nice-help__description",children:E.description}),m&&E.tips&&x.jsx(_e,{tips:E.tips})]})]})};Mr.displayName="NiceInlineHelp";const wt=({content:e,expanded:t,onToggle:r,loading:a,title:n,showProps:o,showExamples:s,showTips:i,compact:l})=>{const{t:d}=_.useNiceTranslation();return a?x.jsx("div",{className:"nice-help__panel nice-help__panel--loading",children:x.jsx("div",{className:"nice-spinner nice-spinner--sm"})}):x.jsxs("div",{className:`nice-help__panel ${t?"nice-help__panel--expanded":""}`,children:[x.jsxs("button",{className:"nice-help__panel-header",onClick:r,"aria-expanded":t,children:[x.jsx("span",{className:"nice-help__panel-icon",children:t?"▾":"▸"}),x.jsxs("span",{className:"nice-help__panel-title",children:[n||d("help.about","About")," ",e.name]}),e.status&&x.jsx("span",{className:`nice-help__status nice-help__status--${e.status}`,children:e.status})]}),t&&x.jsxs("div",{className:"nice-help__panel-content",children:[x.jsx("p",{className:"nice-help__description",children:e.description}),i&&e.tips&&x.jsx(_e,{tips:e.tips}),o&&e.props&&x.jsx(Cr,{props:e.props,compact:l}),s&&e.examples&&x.jsx(pc,{examples:e.examples}),e.seeAlso&&e.seeAlso.length>0&&x.jsxs("div",{className:"nice-help__see-also",children:[x.jsx("h4",{className:"nice-help__section-title",children:d("help.seeAlso","See Also")}),x.jsx("ul",{children:e.seeAlso.map((u,m)=>x.jsx("li",{children:x.jsx("code",{children:u})},m))})]})]})]})},Ar=({text:e,position:t="top",className:r,children:a})=>{const[n,o]=c.useState(!1);return x.jsxs("span",{className:`nice-quick-help nice-quick-help--${t} ${r||""}`,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onFocus:()=>o(!0),onBlur:()=>o(!1),children:[a,n&&x.jsx("span",{className:"nice-quick-help__popup",role:"tooltip",children:e})]})};Ar.displayName="NiceQuickHelp";const Er=({content:e,size:t="sm",className:r,onOpen:a})=>{const{t:n}=_.useNiceTranslation(),[o,s]=c.useState(!1),i=c.useCallback(()=>{s(!o),!o&&a&&a()},[o,a]),l=typeof e=="string"?e:e.description,d=typeof e=="string"?void 0:e.name;return x.jsxs("span",{className:`nice-help-icon nice-help-icon--${t} ${r||""}`,children:[x.jsx("button",{className:"nice-help-icon__btn",onClick:i,"aria-label":n("help.showHelp","Show help"),"aria-expanded":o,children:x.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:x.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"})})}),o&&x.jsxs("div",{className:"nice-help-icon__popup",children:[d&&x.jsx("strong",{children:d}),x.jsx("p",{children:l}),x.jsx("button",{className:"nice-help-icon__close",onClick:()=>s(!1),children:"×"})]})]})};Er.displayName="NiceHelpIcon";class Nr{constructor(t="ntd-user-preferences"){this.key=t}async load(){try{const t=localStorage.getItem(this.key);return t?JSON.parse(t):null}catch{return null}}async save(t){localStorage.setItem(this.key,JSON.stringify(t))}async clear(){localStorage.removeItem(this.key)}}class gc{constructor(t="ntd-preferences",r="preferences"){this.db=null,this.dbName=t,this.storeName=r}async getDB(){return this.db?this.db:new Promise((t,r)=>{const a=indexedDB.open(this.dbName,1);a.onerror=()=>r(a.error),a.onsuccess=()=>{this.db=a.result,t(this.db)},a.onupgradeneeded=n=>{const o=n.target.result;o.objectStoreNames.contains(this.storeName)||o.createObjectStore(this.storeName,{keyPath:"id"})}})}async load(){const t=await this.getDB();return new Promise((r,a)=>{const s=t.transaction(this.storeName,"readonly").objectStore(this.storeName).get("user-preferences");s.onerror=()=>a(s.error),s.onsuccess=()=>{var i;return r(((i=s.result)==null?void 0:i.data)||null)}})}async save(t){const r=await this.getDB();return new Promise((a,n)=>{const i=r.transaction(this.storeName,"readwrite").objectStore(this.storeName).put({id:"user-preferences",data:t});i.onerror=()=>n(i.error),i.onsuccess=()=>a()})}async clear(){const t=await this.getDB();return new Promise((r,a)=>{const s=t.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete("user-preferences");s.onerror=()=>a(s.error),s.onsuccess=()=>r()})}}class yc{constructor(t,r){this.baseUrl=t,this.getAuthHeaders=r}getHeaders(){var t;return{"Content-Type":"application/json",...((t=this.getAuthHeaders)==null?void 0:t.call(this))||{}}}async fetch(){const t=await fetch(`${this.baseUrl}/preferences`,{method:"GET",headers:this.getHeaders()});if(!t.ok){if(t.status===404)return null;throw new Error(`Failed to fetch preferences: ${t.statusText}`)}return t.json()}async push(t){const r=await fetch(`${this.baseUrl}/preferences`,{method:"PUT",headers:this.getHeaders(),body:JSON.stringify(t)});if(!r.ok)throw new Error(`Failed to save preferences: ${r.statusText}`)}async getServerTimestamp(){const t=await fetch(`${this.baseUrl}/preferences/timestamp`,{method:"GET",headers:this.getHeaders()});return t.ok&&(await t.json()).timestamp||0}}const Tr=c.createContext(null);function nt(){const e=c.useContext(Tr);if(!e)throw new Error("useUserPreferences must be used within NiceUserPreferencesProvider");return e}function ot(e,t){const{getControlPreferences:r,setControlPreferences:a,updateControlPreferences:n}=nt(),o=r(e,t),s=c.useCallback(l=>a(e,t,l),[e,t,a]),i=c.useCallback(l=>n(e,t,l),[e,t,n]);return[o,s,i]}function hc(e){return ot(e,"grid")}function bc(e){return ot(e,"chart")}const kt={version:1,global:{},controls:{}};function Sc({storage:e=new Nr,syncAdapter:t,autoSyncInterval:r=0,saveDebounce:a=500,children:n}){const[o,s]=c.useState(kt),[i,l]=c.useState(!0),[d,u]=c.useState(!1),[m,g]=c.useState(null),h=c.useRef(),f=c.useRef();c.useEffect(()=>{let N=!0;return(async()=>{try{const I=await e.load();N&&I&&s(I)}catch(I){N&&g(I instanceof Error?I:new Error("Failed to load preferences"))}finally{N&&l(!1)}})(),()=>{N=!1}},[e]);const y=c.useCallback(N=>{h.current&&clearTimeout(h.current),h.current=setTimeout(async()=>{try{await e.save(N)}catch(R){g(R instanceof Error?R:new Error("Failed to save preferences"))}},a)},[e,a]);c.useEffect(()=>{i||y(o)},[o,i,y]),c.useEffect(()=>{if(t&&r>0)return f.current=setInterval(()=>{k()},r),()=>{f.current&&clearInterval(f.current)}},[t,r]),c.useEffect(()=>()=>{h.current&&clearTimeout(h.current),f.current&&clearInterval(f.current)},[]);const p=c.useCallback((N,R)=>{var I;return(I=o.controls[N])==null?void 0:I[R]},[o]),S=c.useCallback((N,R,I)=>{s(F=>({...F,controls:{...F.controls,[N]:{...F.controls[N],[R]:I,lastModified:Date.now()}}}))},[]),b=c.useCallback((N,R,I)=>{s(F=>{var j;const H=(j=F.controls[N])==null?void 0:j[R],z=typeof H=="object"&&H!==null?{...H,...I}:I;return{...F,controls:{...F.controls,[N]:{...F.controls[N],[R]:z,lastModified:Date.now()}}}})},[]),v=c.useCallback((N,R)=>{s(I=>{if(R){const{[R]:z,...j}=I.controls[N]||{};return{...I,controls:{...I.controls,[N]:j}}}const{[N]:F,...H}=I.controls;return{...I,controls:H}})},[]),w=c.useCallback(N=>o.global[N],[o]),E=c.useCallback((N,R)=>{s(I=>({...I,global:{...I.global,[N]:R}}))},[]),k=c.useCallback(async()=>{if(t){u(!0),g(null);try{const N=await t.getServerTimestamp(),R=o.lastSync||0;if(N>R){const I=await t.fetch();I&&(s({...I,lastSync:Date.now()}),await e.save(I))}else{const I={...o,lastSync:Date.now()};await t.push(I),s(I)}}catch(N){g(N instanceof Error?N:new Error("Sync failed"))}finally{u(!1)}}},[t,o,e]),M=c.useCallback(()=>JSON.stringify(o,null,2),[o]),C=c.useCallback(N=>{try{const R=JSON.parse(N);if(typeof R.version!="number"||!R.controls)throw new Error("Invalid preferences format");s(R)}catch(R){g(R instanceof Error?R:new Error("Import failed"))}},[]),A=c.useCallback(()=>{s(kt),e.clear()},[e]),T=c.useMemo(()=>({preferences:o,isLoading:i,isSyncing:d,error:m,getControlPreferences:p,setControlPreferences:S,updateControlPreferences:b,clearControlPreferences:v,getGlobalPreferences:w,setGlobalPreferences:E,sync:k,exportPreferences:M,importPreferences:C,resetAllPreferences:A}),[o,i,d,m,p,S,b,v,w,E,k,M,C,A]);return x.jsx(Tr.Provider,{value:T,children:n})}function xc({showGlobal:e=!0,showControls:t=!0,showExportImport:r=!0,showSync:a=!0,className:n,style:o}){var w,E,k,M;const{preferences:s,isLoading:i,isSyncing:l,error:d,sync:u,exportPreferences:m,importPreferences:g,resetAllPreferences:h,setGlobalPreferences:f,clearControlPreferences:y}=nt(),p=c.useRef(null),S=()=>{const C=m(),A=new Blob([C],{type:"application/json"}),T=URL.createObjectURL(A),N=document.createElement("a");N.href=T,N.download="nice2dev-preferences.json",N.click(),URL.revokeObjectURL(T)},b=C=>{var N;const A=(N=C.target.files)==null?void 0:N[0];if(!A)return;const T=new FileReader;T.onload=()=>{g(T.result)},T.readAsText(A)};if(i)return x.jsx("div",{className:n,style:o,children:"Loading preferences..."});const v=Object.keys(s.controls);return x.jsxs("div",{className:`ntd-preferences-panel ${n||""}`,style:{fontFamily:"system-ui, sans-serif",fontSize:"14px",padding:"16px",...o},children:[d&&x.jsx("div",{style:{padding:"12px",marginBottom:"16px",background:"var(--danger-bg, #fef2f2)",border:"1px solid var(--nice-danger-bg, #fecaca)",borderRadius:"6px",color:"var(--color-error, #dc2626)"},children:d.message}),x.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"20px",flexWrap:"wrap"},children:[a&&x.jsx("button",{onClick:u,disabled:l,style:{padding:"8px 16px",border:"1px solid var(--border-color, #e5e7eb)",borderRadius:"6px",background:"var(--bg-primary, #fff)",cursor:l?"wait":"pointer"},children:l?"Syncing...":"Sync"}),r&&x.jsxs(x.Fragment,{children:[x.jsx("button",{onClick:S,style:{padding:"8px 16px",border:"1px solid var(--border-color, #e5e7eb)",borderRadius:"6px",background:"var(--bg-primary, #fff)",cursor:"pointer"},children:"Export"}),x.jsx("button",{onClick:()=>{var C;return(C=p.current)==null?void 0:C.click()},style:{padding:"8px 16px",border:"1px solid var(--border-color, #e5e7eb)",borderRadius:"6px",background:"var(--bg-primary, #fff)",cursor:"pointer"},children:"Import"}),x.jsx("input",{ref:p,type:"file",accept:".json",onChange:b,style:{display:"none"}})]}),x.jsx("button",{onClick:h,style:{padding:"8px 16px",border:"1px solid var(--nice-danger-dark, #dc2626)",borderRadius:"6px",background:"var(--danger-bg, #fef2f2)",color:"var(--color-error, #dc2626)",cursor:"pointer",marginLeft:"auto"},children:"Reset All"})]}),e&&x.jsxs("div",{style:{marginBottom:"24px"},children:[x.jsx("h3",{style:{margin:"0 0 12px",fontSize:"16px",fontWeight:600},children:"Global Preferences"}),x.jsxs("div",{style:{display:"grid",gap:"12px"},children:[x.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[x.jsx("input",{type:"checkbox",checked:((w=s.global.display)==null?void 0:w.reducedMotion)||!1,onChange:C=>f("display",{...s.global.display,reducedMotion:C.target.checked})}),"Reduced motion"]}),x.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[x.jsx("input",{type:"checkbox",checked:((E=s.global.display)==null?void 0:E.highContrast)||!1,onChange:C=>f("display",{...s.global.display,highContrast:C.target.checked})}),"High contrast"]}),x.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:["Font scale:",x.jsx("input",{type:"range",min:"0.8",max:"1.5",step:"0.1",value:((k=s.global.display)==null?void 0:k.fontScale)||1,onChange:C=>f("display",{...s.global.display,fontScale:parseFloat(C.target.value)}),style:{flex:1}}),x.jsxs("span",{children:[((((M=s.global.display)==null?void 0:M.fontScale)||1)*100).toFixed(0),"%"]})]})]})]}),t&&v.length>0&&x.jsxs("div",{children:[x.jsxs("h3",{style:{margin:"0 0 12px",fontSize:"16px",fontWeight:600},children:["Control Preferences (",v.length,")"]}),x.jsx("div",{style:{display:"grid",gap:"8px"},children:v.map(C=>{const A=s.controls[C],T=Object.keys(A).filter(N=>N!=="lastModified");return x.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",background:"var(--bg-secondary, #f9fafb)",borderRadius:"6px"},children:[x.jsxs("div",{children:[x.jsx("div",{style:{fontWeight:500},children:C}),x.jsx("div",{style:{fontSize:"12px",color:"var(--text-muted, #6b7280)"},children:T.join(", ")})]}),x.jsx("button",{onClick:()=>y(C),style:{padding:"4px 8px",border:"none",borderRadius:"4px",background:"var(--border-color, #e5e7eb)",cursor:"pointer",fontSize:"12px"},children:"Clear"})]},C)})})]}),t&&v.length===0&&x.jsx("div",{style:{color:"var(--text-muted, #6b7280)",fontStyle:"italic"},children:"No control preferences saved yet."})]})}const vc={cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"traceless",source:"default",requiresConsentBanner:!1,resolvedAt:Date.now(),version:"1.0.0"},Lr={traceless:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"traceless",requiresConsentBanner:!1},ephemeral:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"ephemeral",requiresConsentBanner:!1},private:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!0,strictAuthCookieOnly:!0,effectiveMode:"private",requiresConsentBanner:!1},balanced:{cookiesAllowed:!1,localStorageAllowed:!0,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"balanced",requiresConsentBanner:!0},full:{cookiesAllowed:!0,localStorageAllowed:!0,sessionStorageAllowed:!0,strictAuthCookieOnly:!1,effectiveMode:"full",requiresConsentBanner:!0},custom:{cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"custom",requiresConsentBanner:!1}},te=["traceless","ephemeral","private","balanced","full","custom"];function wc(e,t){const r=te.indexOf(e),a=te.indexOf(t);return r<=a?e:t}function ge(e,t){const r=te.indexOf(e),a=te.indexOf(t);return r<=a}function kc(e,t,r,a){let n=e.defaultMode,o="instance";t&&e.allowTenantOverride&&ge(t.mode,n)&&(n=t.mode,o="tenant"),r&&(t!=null&&t.allowGroupOverride)&&ge(r.mode,n)&&(n=r.mode,o="group"),a&&(t!=null&&t.allowUserOverride||r!=null&&r.allowUserLockdown)&&ge(a.preferredMode,n)&&(n=a.preferredMode,o="user");const s=Lr[n],i={...s,cookiesAllowed:s.cookiesAllowed&&e.maxCookies,localStorageAllowed:s.localStorageAllowed&&e.maxLocalStorage,sessionStorageAllowed:s.sessionStorageAllowed&&e.maxSessionStorage,source:o,resolvedAt:Date.now(),version:"1.0.0"};return a&&(a.restrictCookies&&(i.cookiesAllowed=!1),a.restrictLocalStorage&&(i.localStorageAllowed=!1),a.restrictSessionStorage&&(i.sessionStorageAllowed=!1)),i.effectiveMode=st(i),i.requiresConsentBanner=Ir(i),i}function st(e){const{cookiesAllowed:t,localStorageAllowed:r,sessionStorageAllowed:a,strictAuthCookieOnly:n}=e;return!t&&!r&&!a?"traceless":!t&&!r&&a&&!n?"ephemeral":!t&&!r&&a&&n?"private":!t&&r&&a?"balanced":t&&r&&a?"full":"custom"}function Ir(e){return!e.cookiesAllowed&&!e.localStorageAllowed?!1:e.effectiveMode==="full"||e.effectiveMode==="balanced"}const Rr=new Map;class zr{constructor(t,r="nice2dev",a="local"){this.policy=t,this.namespace=r,this.defaultBackend=a}getBackend(t){const r=t||this.defaultBackend;if(r==="local"&&this.policy.localStorageAllowed)try{if(typeof localStorage<"u")return localStorage}catch{}if((r==="session"||r==="local")&&this.policy.sessionStorageAllowed)try{if(typeof sessionStorage<"u")return sessionStorage}catch{}return Rr}getKey(t){return`${this.namespace}:${t}`}get(t,r){const a=this.getBackend(r),n=this.getKey(t);try{const o=a instanceof Map?a.get(n):a.getItem(n);if(o==null)return null;try{return JSON.parse(o)}catch{return o}}catch{return null}}set(t,r,a){const n=this.getBackend(a),o=this.getKey(t);try{const s=typeof r=="string"?r:JSON.stringify(r);return n instanceof Map?n.set(o,s):n.setItem(o,s),!0}catch{return!1}}remove(t,r){const a=this.getBackend(r),n=this.getKey(t);try{return a instanceof Map?a.delete(n):(a.removeItem(n),!0)}catch{return!1}}clear(t){const r=this.getBackend(t),a=`${this.namespace}:`;try{if(r instanceof Map)for(const n of r.keys())n.startsWith(a)&&r.delete(n);else{const n=[];for(let o=0;o<r.length;o++){const s=r.key(o);s&&s.startsWith(a)&&n.push(s)}n.forEach(o=>r.removeItem(o))}}catch{}}keys(t){const r=this.getBackend(t),a=`${this.namespace}:`,n=[];try{if(r instanceof Map)for(const o of r.keys())o.startsWith(a)&&n.push(o.slice(a.length));else for(let o=0;o<r.length;o++){const s=r.key(o);s&&s.startsWith(a)&&n.push(s.slice(a.length))}}catch{}return n}has(t,r){return this.get(t,r)!==null}getCapabilities(){return{canUseCookies:this.policy.cookiesAllowed,canUseLocalStorage:this.policy.localStorageAllowed,canUseSessionStorage:this.policy.sessionStorageAllowed,canPersist:this.policy.localStorageAllowed,effectiveMode:this.policy.effectiveMode,actualBackend:this.getActualBackendType()}}getActualBackendType(){const t=this.getBackend();return t instanceof Map?"memory":t===sessionStorage?"session":"local"}updatePolicy(t){this.policy=t}}function Cc(e,t){const{cookies:r,localStorage:a,storageMode:n}=t,o={...e};if(n&&n!=="auto")switch(n){case"traceless":o.cookiesAllowed=!1,o.localStorageAllowed=!1,o.sessionStorageAllowed=!1;break;case"ephemeral":o.cookiesAllowed=!1,o.localStorageAllowed=!1;break}return r===!1&&(o.cookiesAllowed=!1),a===!1&&(o.localStorageAllowed=!1),o.effectiveMode=st(o),o.source="control",o}function Mc(e,t,r){return{generatedAt:new Date().toISOString(),instanceId:t,tenantId:r,effectiveMode:e.effectiveMode,cookies:{count:0,allowed:e.cookiesAllowed,strictAuthOnly:e.strictAuthCookieOnly,thirdParty:!1,tracking:!1},localStorage:{bytesUsed:0,allowed:e.localStorageAllowed,keysCount:0},sessionStorage:{bytesUsed:0,allowed:e.sessionStorageAllowed,keysCount:0},consentBanner:{required:e.requiresConsentBanner,shown:e.requiresConsentBanner},compliance:{ePrivacyCompliant:!e.cookiesAllowed||e.requiresConsentBanner,gdprCompliant:!0,pecrCompliant:!e.cookiesAllowed||e.requiresConsentBanner},statement:Ac(e)}}function Ac(e){return e.effectiveMode==="traceless"?"This OmniVerk instance operates in Traceless™ mode. No cookies are set (0), no data is saved to localStorage (0), and no sessionStorage is used (0). No cookie consent banner is required under ePrivacy Directive Art. 5(3) as no similar technologies are employed.":e.effectiveMode==="ephemeral"?"This OmniVerk instance operates in Ephemeral mode. No cookies are set, no localStorage is used. sessionStorage is used for session-only data that is automatically cleared when the browser tab is closed. No cookie consent banner is required.":e.effectiveMode==="private"?"This OmniVerk instance operates in Private mode. One strictly necessary httpOnly authentication cookie may be set. sessionStorage is used for session preferences. No consent banner is required as only strictly necessary technologies are used.":e.effectiveMode==="balanced"?"This OmniVerk instance operates in Balanced mode. localStorage is used for user preferences. sessionStorage is used for session data. No cookies are set. Depending on jurisdiction, a consent banner may be shown.":"This OmniVerk instance operates in Full mode. Cookies, localStorage, and sessionStorage are enabled. A consent banner is displayed to users before any non-essential storage is used."}function Ec(e){const{effectiveMode:t}=e;switch(t){case"traceless":return{mode:"traceless",icon:"🟢",color:"var(--nice-success, #10b981)",label:"Traceless™",tooltip:"Your data is not stored on this device. Zero cookies, zero localStorage, zero traces.",cssClass:"nice-traceless-badge--traceless"};case"ephemeral":return{mode:"ephemeral",icon:"🔵",color:"var(--nice-primary, #3b82f6)",label:"Ephemeral",tooltip:"Session-only storage. Data is cleared when you close this tab.",cssClass:"nice-traceless-badge--ephemeral"};case"private":return{mode:"private",icon:"🟡",color:"var(--nice-warning, #eab308)",label:"Private",tooltip:"Minimal storage with one secure authentication cookie.",cssClass:"nice-traceless-badge--private"};case"balanced":return{mode:"balanced",icon:"🟠",color:"var(--nice-warning, #f97316)",label:"Balanced",tooltip:"Preferences are saved locally. No tracking cookies.",cssClass:"nice-traceless-badge--balanced"};case"full":return{mode:"full",icon:"🔴",color:"var(--nice-danger, #ef4444)",label:"Full",tooltip:"All storage enabled including analytics. You control what is stored via consent.",cssClass:"nice-traceless-badge--full"};case"custom":default:return{mode:"custom",icon:"⚪",color:"var(--nice-text-secondary, #6b7280)",label:"Custom",tooltip:"Custom storage configuration.",cssClass:"nice-traceless-badge--custom"}}}function Nc(e,t){const r=e.localStorageAllowed,a=e.sessionStorageAllowed,o={preferences:{message:"Your preferences will reset when you close this tab.",key:"traceless.warning.preferences"},draft:{message:"Unsaved draft will be lost if you close or refresh this page.",key:"traceless.warning.draft"},history:{message:"Search history is not saved in this privacy mode.",key:"traceless.warning.history"},auth:{message:"You will need to log in again each time you visit.",key:"traceless.warning.auth"},"grid-state":{message:"Table settings (sorting, filtering, columns) will reset on page refresh.",key:"traceless.warning.gridState"}}[t];return!r&&!a?{canPersist:!1,canSession:!1,warningMessage:o.message,warningKey:o.key}:!r&&a?{canPersist:!1,canSession:!0,warningMessage:t!=="auth"?o.message:void 0,warningKey:t!=="auth"?o.key:void 0}:{canPersist:!0,canSession:!0}}const Tc="X-OmniVerk-Storage-Policy";function Lc(e){const t=e.toLowerCase().trim();return te.includes(t)?t:null}function Ic(e){return e.effectiveMode}function Rc(e,t){return new zr(e,t)}function zc(e){return{maxCookies:!1,maxLocalStorage:!1,maxSessionStorage:!0,defaultMode:"ephemeral",allowTenantOverride:!1,instanceId:e}}function Fc(e){return{maxCookies:!0,maxLocalStorage:!0,maxSessionStorage:!0,defaultMode:"balanced",allowTenantOverride:!0,instanceId:e}}function Pc(){if(typeof document<"u"){const e=document.cookie.split(";");for(const t of e){const r=t.split("=")[0].trim();document.cookie=`${r}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}}try{typeof localStorage<"u"&&localStorage.clear()}catch{}try{typeof sessionStorage<"u"&&sessionStorage.clear()}catch{}Rr.clear()}function Dc(e){const t=[];if(!e.cookiesAllowed&&typeof document<"u"){const r=document.cookie;r&&r.length>0&&t.push({type:"cookie",severity:"high",message:`Cookies found but not allowed: ${r.split(";").length} cookie(s)`,data:r})}if(!e.localStorageAllowed)try{typeof localStorage<"u"&&localStorage.length>0&&t.push({type:"localStorage",severity:"high",message:`localStorage has ${localStorage.length} item(s) but not allowed`})}catch{}if(!e.sessionStorageAllowed)try{typeof sessionStorage<"u"&&sessionStorage.length>0&&t.push({type:"sessionStorage",severity:"medium",message:`sessionStorage has ${sessionStorage.length} item(s) but not allowed`})}catch{}return{compliant:t.length===0,violations:t,auditedAt:Date.now(),policy:e.effectiveMode}}const Fr=c.createContext(null),Hc=({config:e,children:t})=>{const[r,a]=c.useState(!1),[n,o]=c.useState(null),s=c.useRef(null);c.useEffect(()=>()=>{var f;(f=s.current)==null||f.abort()},[]);const i=c.useCallback(()=>{var f;(f=s.current)==null||f.abort(),s.current=null,a(!1)},[]),l=async(f,y,p)=>{var v,w,E,k,M,C;const S=new TextDecoder;let b="";for(;;){const{done:A,value:T}=await f.read();if(A)break;b+=S.decode(T,{stream:!0});const N=b.split(`
41
+ `);b=N.pop()||"";for(const R of N)if(R.startsWith("data: ")){const I=R.slice(6).trim();if(I==="[DONE]"){y({content:"",done:!0});return}try{const F=JSON.parse(I);let H="",z=!1;p==="openai"||p==="azure-openai"?(H=((E=(w=(v=F.choices)==null?void 0:v[0])==null?void 0:w.delta)==null?void 0:E.content)||"",z=((M=(k=F.choices)==null?void 0:k[0])==null?void 0:M.finish_reason)==="stop"):p==="anthropic"&&(F.type==="content_block_delta"?H=((C=F.delta)==null?void 0:C.text)||"":F.type==="message_stop"&&(z=!0)),(H||z)&&y({content:H,done:z})}catch{}}}y({content:"",done:!0})},d=(f,y)=>{var p;return{model:y.model||e.defaultModel||"gpt-4",messages:y.systemPrompt?[{role:"system",content:y.systemPrompt},...f]:f,temperature:y.temperature??.7,max_tokens:y.maxTokens,stop:y.stop,stream:y.stream??!1,tools:(p=y.tools)==null?void 0:p.map(S=>({type:"function",function:{name:S.name,description:S.description,parameters:S.parameters}}))}},u=(f,y)=>{var b;const p=y.systemPrompt||((b=f.find(v=>v.role==="system"))==null?void 0:b.content),S=f.filter(v=>v.role!=="system");return{model:y.model||e.defaultModel||"claude-3-opus-20240229",max_tokens:y.maxTokens||4096,system:p,messages:S.map(v=>({role:v.role==="assistant"?"assistant":"user",content:v.content})),temperature:y.temperature??.7,stop_sequences:y.stop,stream:y.stream??!1}},m=c.useCallback(async(f,y={})=>{var p,S,b,v,w,E;if(e.provider==="custom"&&e.customHandler)return e.customHandler(f,y);a(!0),o(null),s.current=new AbortController;try{let k,M,C;if(e.provider==="openai")k=e.endpoint||"https://api.openai.com/v1/chat/completions",M={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},C=d(f,{...y,stream:!1});else if(e.provider==="azure-openai")k=e.endpoint||"",M={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},C=d(f,{...y,stream:!1});else if(e.provider==="anthropic")k=e.endpoint||"https://api.anthropic.com/v1/messages",M={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},C=u(f,{...y,stream:!1});else throw new Error(`Unsupported provider: ${e.provider}`);const A=await fetch(k,{method:"POST",headers:M,body:JSON.stringify(C),signal:s.current.signal});if(!A.ok){const R=await A.text();throw new Error(`AI request failed: ${A.status} ${R}`)}const T=await A.json();let N;if(e.provider==="openai"||e.provider==="azure-openai"){const R=(p=T.choices)==null?void 0:p[0];N={content:((S=R==null?void 0:R.message)==null?void 0:S.content)||"",finishReason:(R==null?void 0:R.finish_reason)||"stop",toolCalls:(v=(b=R==null?void 0:R.message)==null?void 0:b.tool_calls)==null?void 0:v.map(I=>({id:I.id,name:I.function.name,arguments:JSON.parse(I.function.arguments)})),usage:T.usage&&{promptTokens:T.usage.prompt_tokens,completionTokens:T.usage.completion_tokens,totalTokens:T.usage.total_tokens}}}else e.provider==="anthropic"?N={content:((E=(w=T.content)==null?void 0:w[0])==null?void 0:E.text)||"",finishReason:T.stop_reason||"stop",usage:T.usage&&{promptTokens:T.usage.input_tokens,completionTokens:T.usage.output_tokens,totalTokens:T.usage.input_tokens+T.usage.output_tokens}}:N={content:"",finishReason:"stop"};return N}catch(k){throw k.name==="AbortError"?new Error("Request cancelled"):(o(k),k)}finally{a(!1)}},[e]),g=c.useCallback(async(f,y,p={})=>{if(e.provider==="custom"&&e.customStreamHandler)return e.customStreamHandler(f,p,y);a(!0),o(null),s.current=new AbortController;try{let S,b,v;if(e.provider==="openai")S=e.endpoint||"https://api.openai.com/v1/chat/completions",b={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},v=d(f,{...p,stream:!0});else if(e.provider==="azure-openai")S=e.endpoint||"",b={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},v=d(f,{...p,stream:!0});else if(e.provider==="anthropic")S=e.endpoint||"https://api.anthropic.com/v1/messages",b={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},v=u(f,{...p,stream:!0});else throw new Error(`Unsupported provider: ${e.provider}`);const w=await fetch(S,{method:"POST",headers:b,body:JSON.stringify(v),signal:s.current.signal});if(!w.ok){const k=await w.text();throw new Error(`AI request failed: ${w.status} ${k}`)}if(!w.body)throw new Error("Response body is null");const E=w.body.getReader();await l(E,y,e.provider)}catch(S){if(S.name==="AbortError"){y({content:"",done:!0});return}throw o(S),S}finally{a(!1)}},[e]),h={isConfigured:!!e.apiKey||e.provider==="custom"||e.provider==="local",provider:e.provider,defaultModel:e.defaultModel||null,complete:m,stream:g,cancel:i,isLoading:r,error:n};return x.jsx(Fr.Provider,{value:h,children:t})};function Q(){const e=c.useContext(Fr);if(!e)throw new Error("useNiceAI must be used within a NiceAIProvider");return e}function $c(e={}){const t=Q(),[r,a]=c.useState(""),[n,o]=c.useState([]),[s,i]=c.useState(!1),[l,d]=c.useState(null),u=c.useCallback(async y=>{i(!0),d(null),a("");const p=[...n,{role:"user",content:y}];try{const S=await t.complete(p,{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature});return o([...p,{role:"assistant",content:S.content}]),a(S.content),S.content}catch(S){throw d(S),S}finally{i(!1)}},[t,n,e]),m=c.useCallback(async(y,p)=>{i(!0),d(null),a("");const S=[...n,{role:"user",content:y}];try{let b="";return await t.stream(S,v=>{v.done||(b+=v.content,a(b),p==null||p(v.content))},{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature}),o([...S,{role:"assistant",content:b}]),b}catch(b){throw d(b),b}finally{i(!1)}},[t,n,e]),g=c.useCallback(()=>{a(""),d(null)},[]),h=c.useCallback(()=>{o([]),a(""),d(null)},[]),f=c.useCallback(()=>{t.cancel(),i(!1)},[t]);return{response:r,isLoading:s,error:l,send:u,sendStreaming:m,clear:g,cancel:f,history:n,clearHistory:h}}function jc(e={}){const t=Q(),[r,a]=c.useState(""),[n,o]=c.useState(!1),s=c.useCallback(async(u,m="")=>{o(!0),a("");try{const h=(await t.complete([{role:"user",content:`Complete the following ${e.language||""} code. Return ONLY the completion text, no explanation.
42
42
 
43
43
  Code before cursor:
44
44
  \`\`\`
@@ -47,53 +47,53 @@ ${u}
47
47
 
48
48
  Code after cursor:
49
49
  \`\`\`
50
- ${f}
50
+ ${m}
51
51
  \`\`\`
52
52
 
53
- Completion:`}],{model:e.model,temperature:.2,maxTokens:200})).content.trim();return a(g),g}catch{return""}finally{s(!1)}},[t,e]),i=c.useCallback(async u=>{s(!0);try{return(await t.complete([{role:"user",content:`Explain the following ${e.language||""} code concisely:
53
+ Completion:`}],{model:e.model,temperature:.2,maxTokens:200})).content.trim();return a(h),h}catch{return""}finally{o(!1)}},[t,e]),i=c.useCallback(async u=>{o(!0);try{return(await t.complete([{role:"user",content:`Explain the following ${e.language||""} code concisely:
54
54
 
55
55
  \`\`\`
56
56
  ${u}
57
- \`\`\``}],{model:e.model,temperature:.3})).content}finally{s(!1)}},[t,e]),l=c.useCallback(async(u,f)=>{s(!0);try{const p=await t.complete([{role:"user",content:`Refactor the following ${e.language||""} code according to the instruction. Return ONLY the refactored code.
57
+ \`\`\``}],{model:e.model,temperature:.3})).content}finally{o(!1)}},[t,e]),l=c.useCallback(async(u,m)=>{o(!0);try{const g=await t.complete([{role:"user",content:`Refactor the following ${e.language||""} code according to the instruction. Return ONLY the refactored code.
58
58
 
59
59
  Code:
60
60
  \`\`\`
61
61
  ${u}
62
62
  \`\`\`
63
63
 
64
- Instruction: ${f}
64
+ Instruction: ${m}
65
65
 
66
- Refactored code:`}],{model:e.model,temperature:.2}),g=p.content.match(/```[\w]*\n?([\s\S]*?)```/);return g?g[1].trim():p.content.trim()}finally{s(!1)}},[t,e]),d=c.useCallback(async u=>{s(!0);try{const f=await t.complete([{role:"user",content:`Generate ${e.language||""} code from this comment/description. Return ONLY the code.
66
+ Refactored code:`}],{model:e.model,temperature:.2}),h=g.content.match(/```[\w]*\n?([\s\S]*?)```/);return h?h[1].trim():g.content.trim()}finally{o(!1)}},[t,e]),d=c.useCallback(async u=>{o(!0);try{const m=await t.complete([{role:"user",content:`Generate ${e.language||""} code from this comment/description. Return ONLY the code.
67
67
 
68
68
  Description: ${u}
69
69
 
70
- Code:`}],{model:e.model,temperature:.3}),p=f.content.match(/```[\w]*\n?([\s\S]*?)```/);return p?p[1].trim():f.content.trim()}finally{s(!1)}},[t,e]);return{suggestion:r,isLoading:n,complete:o,explain:i,refactor:l,generateFromComment:d}}function Lc(){const e=Q(),[t,r]=c.useState(!1);return{parseFilter:c.useCallback(async(n,s)=>{r(!0);try{const o=await e.complete([{role:"user",content:`Convert this natural language query to filter conditions. Available columns: ${JSON.stringify(s)}
70
+ Code:`}],{model:e.model,temperature:.3}),g=m.content.match(/```[\w]*\n?([\s\S]*?)```/);return g?g[1].trim():m.content.trim()}finally{o(!1)}},[t,e]);return{suggestion:r,isLoading:n,complete:s,explain:i,refactor:l,generateFromComment:d}}function Oc(){const e=Q(),[t,r]=c.useState(!1);return{parseFilter:c.useCallback(async(n,o)=>{r(!0);try{const s=await e.complete([{role:"user",content:`Convert this natural language query to filter conditions. Available columns: ${JSON.stringify(o)}
71
71
 
72
72
  Query: "${n}"
73
73
 
74
74
  Return a JSON array of filter objects with: field, operator (eq, ne, gt, gte, lt, lte, contains, startsWith, endsWith), value.
75
- Only return the JSON array, no explanation.`}],{temperature:.1,maxTokens:500});try{const i=JSON.parse(o.content);return Array.isArray(i)?i:[]}catch{return[]}}finally{r(!1)}},[e]),isLoading:t}}function Ic(){const e=Q(),[t,r]=c.useState(!1),a=c.useCallback(async(s,o)=>{r(!0);try{const i=s.slice(0,5),l=await e.complete([{role:"user",content:`Analyze this data and suggest the best chart type. Data sample: ${JSON.stringify(i)}
76
- ${o?`Context: ${o}`:""}
75
+ Only return the JSON array, no explanation.`}],{temperature:.1,maxTokens:500});try{const i=JSON.parse(s.content);return Array.isArray(i)?i:[]}catch{return[]}}finally{r(!1)}},[e]),isLoading:t}}function _c(){const e=Q(),[t,r]=c.useState(!1),a=c.useCallback(async(o,s)=>{r(!0);try{const i=o.slice(0,5),l=await e.complete([{role:"user",content:`Analyze this data and suggest the best chart type. Data sample: ${JSON.stringify(i)}
76
+ ${s?`Context: ${s}`:""}
77
77
 
78
78
  Return JSON with: type (line, bar, pie, scatter, area, donut), reason (brief explanation), config (suggested chart configuration like xField, yField, etc.)
79
- Only return JSON.`}],{temperature:.2,maxTokens:500});try{return JSON.parse(l.content)}catch{return{type:"bar",reason:"Default chart type",config:{}}}}finally{r(!1)}},[e]),n=c.useCallback(async(s,o)=>{r(!0);try{const i=await e.complete([{role:"user",content:`Analyze this ${o} chart data and provide 3-5 key insights. Data: ${JSON.stringify(s.slice(0,20))}
79
+ Only return JSON.`}],{temperature:.2,maxTokens:500});try{return JSON.parse(l.content)}catch{return{type:"bar",reason:"Default chart type",config:{}}}}finally{r(!1)}},[e]),n=c.useCallback(async(o,s)=>{r(!0);try{const i=await e.complete([{role:"user",content:`Analyze this ${s} chart data and provide 3-5 key insights. Data: ${JSON.stringify(o.slice(0,20))}
80
80
 
81
- Return a JSON array of insight strings.`}],{temperature:.3,maxTokens:500});try{return JSON.parse(i.content)}catch{return[]}}finally{r(!1)}},[e]);return{suggestChartType:a,generateInsights:n,isLoading:t}}function Rc(){const e=Q(),[t,r]=c.useState(!1);return{generateForm:c.useCallback(async n=>{r(!0);try{const s=await e.complete([{role:"user",content:`Generate a form definition from this description: "${n}"
81
+ Return a JSON array of insight strings.`}],{temperature:.3,maxTokens:500});try{return JSON.parse(i.content)}catch{return[]}}finally{r(!1)}},[e]);return{suggestChartType:a,generateInsights:n,isLoading:t}}function Bc(){const e=Q(),[t,r]=c.useState(!1);return{generateForm:c.useCallback(async n=>{r(!0);try{const o=await e.complete([{role:"user",content:`Generate a form definition from this description: "${n}"
82
82
 
83
83
  Return a JSON array of field objects with: label, field (camelCase), type (text, number, email, date, select, checkbox, textarea), required (boolean), options (for select type).
84
- Only return JSON.`}],{temperature:.3,maxTokens:1e3});try{return JSON.parse(s.content)}catch{return[]}}finally{r(!1)}},[e]),isLoading:t}}function zc(){const e=Q(),[t,r]=c.useState(!1),a=c.useCallback(async(o,i)=>{r(!0);try{return(await e.complete([{role:"user",content:`Improve this text to be more ${i||"professional"}. Keep the same meaning. Return only the improved text.
84
+ Only return JSON.`}],{temperature:.3,maxTokens:1e3});try{return JSON.parse(o.content)}catch{return[]}}finally{r(!1)}},[e]),isLoading:t}}function Wc(){const e=Q(),[t,r]=c.useState(!1),a=c.useCallback(async(s,i)=>{r(!0);try{return(await e.complete([{role:"user",content:`Improve this text to be more ${i||"professional"}. Keep the same meaning. Return only the improved text.
85
85
 
86
- Text: ${o}
86
+ Text: ${s}
87
87
 
88
- Improved:`}],{temperature:.4})).content.trim()}finally{r(!1)}},[e]),n=c.useCallback(async(o,i)=>{r(!0);try{return(await e.complete([{role:"user",content:`Translate this text to ${i}. Return only the translation.
88
+ Improved:`}],{temperature:.4})).content.trim()}finally{r(!1)}},[e]),n=c.useCallback(async(s,i)=>{r(!0);try{return(await e.complete([{role:"user",content:`Translate this text to ${i}. Return only the translation.
89
89
 
90
- Text: ${o}
90
+ Text: ${s}
91
91
 
92
- Translation:`}],{temperature:.2})).content.trim()}finally{r(!1)}},[e]),s=c.useCallback(async o=>{r(!0);try{const i=await e.complete([{role:"user",content:`Generate clean semantic HTML from this prompt. Use proper tags (h1-h6, p, ul, ol, table, etc.). Return only HTML.
92
+ Translation:`}],{temperature:.2})).content.trim()}finally{r(!1)}},[e]),o=c.useCallback(async s=>{r(!0);try{const i=await e.complete([{role:"user",content:`Generate clean semantic HTML from this prompt. Use proper tags (h1-h6, p, ul, ol, table, etc.). Return only HTML.
93
93
 
94
- Prompt: ${o}
94
+ Prompt: ${s}
95
95
 
96
- HTML:`}],{temperature:.3}),l=i.content.match(/```html?\n?([\s\S]*?)```/);return l?l[1].trim():i.content.trim()}finally{r(!1)}},[e]);return{improveText:a,translate:n,generateHtml:s,isLoading:t}}class Le{constructor(){this._listeners=new Map}on(t,r){return this._listeners.has(t)||this._listeners.set(t,new Set),this._listeners.get(t).add(r),()=>{var a;(a=this._listeners.get(t))==null||a.delete(r)}}emit(t,...r){var a;(a=this._listeners.get(t))==null||a.forEach(n=>{try{n(...r)}catch{}})}}function Fc(e,t){const r=e[t.field],a=t.value;switch(t.operator){case"=":return r==a;case"<>":return r!=a;case"<":return r<a;case"<=":return r<=a;case">":return r>a;case">=":return r>=a;case"contains":return String(r??"").toLowerCase().includes(String(a??"").toLowerCase());case"notcontains":return!String(r??"").toLowerCase().includes(String(a??"").toLowerCase());case"startswith":return String(r??"").toLowerCase().startsWith(String(a??"").toLowerCase());case"endswith":return String(r??"").toLowerCase().endsWith(String(a??"").toLowerCase());case"isblank":return r==null||r==="";case"isnotblank":return r!=null&&r!=="";default:return!0}}function Lr(e,t){if(t.items.length===0)return!0;const r=a=>a.type==="condition"?Fc(e,a):Lr(e,a);return t.logic==="and"?t.items.every(r):t.items.some(r)}function Pc(e,t){var n;let r=[...e];if(t.filter&&(r=r.filter(s=>Lr(s,t.filter))),t.search){const s=t.search.toLowerCase(),o=t.searchFields;r=r.filter(i=>(o?o.map(d=>i[d]):Object.values(i)).some(d=>String(d??"").toLowerCase().includes(s)))}const a=r.length;if((n=t.sort)!=null&&n.length&&r.sort((s,o)=>{for(const i of t.sort){const l=s[i.field]??"",d=o[i.field]??"",u=typeof l=="number"&&typeof d=="number"?l-d:String(l).localeCompare(String(d));if(u!==0)return i.direction==="desc"?-u:u}return 0}),t.skip!=null||t.take!=null){const s=t.skip??0,o=t.take??r.length;r=r.slice(s,s+o)}return{data:r,totalCount:a}}function Hc(e){const t=e.keyField??"id";let r=[...e.data];const a=new Le;return{keyField:t,writable:!0,async load(s={}){a.emit("loading",!0);try{const o=Pc(r,s);return a.emit("loaded",o),a.emit("loading",!1),o}catch(o){throw a.emit("error",o instanceof Error?o:new Error(String(o))),a.emit("loading",!1),o}},async byKey(s){return r.find(o=>o[t]===s)},async insert(s){const o={...s};return r=[...r,o],a.emit("changed"),o},async update(s,o){const i=r.findIndex(d=>d[t]===s);if(i===-1)throw new Error(`Record not found: ${s}`);const l={...r[i],...o};return r=r.map((d,u)=>u===i?l:d),a.emit("changed"),l},async remove(s){r=r.filter(o=>o[t]!==s),a.emit("changed")},on:a.on.bind(a)}}async function Dc(e){const t={"Content-Type":"application/json"};if(!e.headers)return t;const r=typeof e.headers=="function"?await e.headers():e.headers;return{...t,...r}}function Pe(e,t,r){return typeof e=="function"?e(r):e||`${t}/${encodeURIComponent(String(r))}`}function $c(e){var r,a,n;const t={};return e.skip!=null&&(t.skip=String(e.skip)),e.take!=null&&(t.take=String(e.take)),e.search&&(t.search=e.search),(r=e.sort)!=null&&r.length&&(t.sort=e.sort.map(s=>`${s.field} ${s.direction}`).join(",")),e.filter&&(t.filter=JSON.stringify(e.filter)),(a=e.select)!=null&&a.length&&(t.select=e.select.join(",")),(n=e.expand)!=null&&n.length&&(t.expand=e.expand.join(",")),t}function jc(e){if(Array.isArray(e))return{data:e,totalCount:e.length};const t=e,r=t.data??t.items??t.value??t.results??[],a=t.totalCount??t.total??t.count??t["@odata.count"]??r.length;return{data:r,totalCount:a}}function Ir(e){const t=e.keyField??"id",r=new Le;async function a(s,o){const i=await Dc(e),l=await fetch(s,{...e.fetchOptions,...o,headers:{...i,...o==null?void 0:o.headers}});if(!l.ok){const u=await l.text().catch(()=>l.statusText);throw new Error(`HTTP ${l.status}: ${u}`)}return(l.headers.get("content-type")??"").includes("json")?l.json():l.text()}return{keyField:t,writable:!0,async load(s={}){var o;r.emit("loading",!0);try{const i=e.loadUrl??e.url,l=e.mapLoadParams?e.mapLoadParams(s):$c(s),d=new URLSearchParams(l).toString(),u=d?`${i}?${d}`:i,f=await a(u),p=e.extractLoadResult?e.extractLoadResult(f):jc(f);return r.emit("loaded",p),r.emit("loading",!1),p}catch(i){const l=i instanceof Error?i:new Error(String(i));throw r.emit("error",l),r.emit("loading",!1),(o=e.onError)==null||o.call(e,l,"load"),l}},async byKey(s){const o=Pe(e.byKeyUrl,e.url,s),i=await a(o);return e.extractItem?e.extractItem(i):i},async insert(s){const o=e.insertUrl??e.url,i=e.prepareInsertBody?e.prepareInsertBody(s):s,l=await a(o,{method:"POST",body:JSON.stringify(i)}),d=e.extractItem?e.extractItem(l):l;return r.emit("changed"),d},async update(s,o){const i=Pe(e.updateUrl,e.url,s),l=e.prepareUpdateBody?e.prepareUpdateBody(s,o):o,d=await a(i,{method:e.updateMethod??"PUT",body:JSON.stringify(l)}),u=e.extractItem?e.extractItem(d):d;return r.emit("changed"),u},async remove(s){const o=Pe(e.deleteUrl,e.url,s);await a(o,{method:"DELETE"}),r.emit("changed")},on:r.on.bind(r)}}function Oc(e,t){const r=e.field,a=typeof e.value=="string"?`'${e.value.replace(/'/g,"''")}'`:String(e.value??"null");switch(e.operator){case"=":return`${r} eq ${a}`;case"<>":return`${r} ne ${a}`;case"<":return`${r} lt ${a}`;case"<=":return`${r} le ${a}`;case">":return`${r} gt ${a}`;case">=":return`${r} ge ${a}`;case"contains":return t>=4?`contains(${r},${a})`:`substringof(${a},${r})`;case"notcontains":return t>=4?`not contains(${r},${a})`:`not substringof(${a},${r})`;case"startswith":return`startswith(${r},${a})`;case"endswith":return`endswith(${r},${a})`;case"isblank":return`${r} eq null`;case"isnotblank":return`${r} ne null`;default:return"true"}}function Rr(e,t){return e.items.length===0?"":e.items.map(a=>a.type==="condition"?Oc(a,t):`(${Rr(a,t)})`).join(e.logic==="and"?" and ":" or ")}function Bc(e){const t=e.version??4,r={url:e.url,keyField:e.keyField,headers:e.headers,fetchOptions:e.fetchOptions,onError:e.onError,updateMethod:"PATCH",mapLoadParams(a){var s,o,i;const n={};if(t>=4&&(n.$count="true"),a.skip!=null&&(n.$skip=String(a.skip)),a.take!=null&&(n.$top=String(a.take)),(s=a.sort)!=null&&s.length&&(n.$orderby=a.sort.map(l=>`${l.field} ${l.direction}`).join(",")),a.filter){const l=Rr(a.filter,t);l&&(n.$filter=l)}return a.search&&(n.$search=`"${a.search}"`),(o=a.select)!=null&&o.length&&(n.$select=a.select.join(",")),(i=a.expand)!=null&&i.length&&(n.$expand=a.expand.join(",")),n},extractLoadResult(a){var i,l;const n=a,s=n.value??((i=n.d)==null?void 0:i.results)??[],o=n["@odata.count"]??((l=n.d)==null?void 0:l.__count)??s.length;return{data:s,totalCount:o}},byKeyUrl:a=>{const n=typeof a=="number"?a:`'${String(a).replace(/'/g,"''")}'`;return`${e.url}(${n})`}};return Ir(r)}function _c(e){const t=e.keyField??"id",r=new Le;async function a(l,d){var m;const u={"Content-Type":"application/json"},f=e.headers?typeof e.headers=="function"?await e.headers():e.headers:{},p=await fetch(e.url,{method:"POST",headers:{...u,...f},body:JSON.stringify({query:l,variables:d})});if(!p.ok){const b=await p.text().catch(()=>p.statusText);throw new Error(`GraphQL HTTP ${p.status}: ${b}`)}const g=await p.json();if((m=g.errors)!=null&&m.length)throw new Error(g.errors.map(b=>b.message).join("; "));return g.data}function n(l){var u;const d={};return l.skip!=null&&(d.skip=l.skip),l.take!=null&&(d.take=l.take),l.search&&(d.search=l.search),(u=l.sort)!=null&&u.length&&(d.sort=l.sort),l.filter&&(d.filter=l.filter),d}function s(l){if(!l||typeof l!="object")return{data:[],totalCount:0};const d=Object.values(l)[0];if(!d)return{data:[],totalCount:0};if(Array.isArray(d))return{data:d,totalCount:d.length};const u=d.items??d.nodes??d.edges??d.data??[],f=d.totalCount??d.total??d.count??u.length;return{data:u,totalCount:f}}function o(l){return!l||typeof l!="object"?l:Object.values(l)[0]}return{keyField:t,writable:!!(e.queries.insert||e.queries.update||e.queries.remove),async load(l={}){var d;r.emit("loading",!0);try{const u=e.mapVariables?e.mapVariables(l):n(l),f=await a(e.queries.load,u),p=e.extractLoadResult?e.extractLoadResult(f):s(f);return r.emit("loaded",p),r.emit("loading",!1),p}catch(u){const f=u instanceof Error?u:new Error(String(u));throw r.emit("error",f),r.emit("loading",!1),(d=e.onError)==null||d.call(e,f,"load"),f}},async byKey(l){if(!e.queries.byKey)throw new Error("byKey query not configured");const d=await a(e.queries.byKey,{[t]:l});return e.extractItem?e.extractItem(d):o(d)},insert:e.queries.insert?async l=>{const d=await a(e.queries.insert,{input:l}),u=e.extractItem?e.extractItem(d):o(d);return r.emit("changed"),u}:void 0,update:e.queries.update?async(l,d)=>{const u=await a(e.queries.update,{[t]:l,input:d}),f=e.extractItem?e.extractItem(u):o(u);return r.emit("changed"),f}:void 0,remove:e.queries.remove?async l=>{await a(e.queries.remove,{[t]:l}),r.emit("changed")}:void 0,on:r.on.bind(r)}}function Wc(e){const t=e.keyField??"id",r=new Le;return{keyField:t,writable:!!(e.insert||e.update||e.remove),async load(n={}){r.emit("loading",!0);try{const s=await e.load(n);return r.emit("loaded",s),r.emit("loading",!1),s}catch(s){const o=s instanceof Error?s:new Error(String(s));throw r.emit("error",o),r.emit("loading",!1),o}},async byKey(n){if(!e.byKey)throw new Error("byKey handler not configured");return e.byKey(n)},insert:e.insert?async n=>{const s=await e.insert(n);return r.emit("changed"),s}:void 0,update:e.update?async(n,s)=>{const o=await e.update(n,s);return r.emit("changed"),o}:void 0,remove:e.remove?async n=>{await e.remove(n),r.emit("changed")}:void 0,on:r.on.bind(r)}}class Be{constructor(t={}){this.cache=new Map,this.ttl=t.ttl??6e4,this.maxSize=t.maxSize??100}get(t){const r=this.cache.get(t);if(r){if(Date.now()>r.expiresAt){this.cache.delete(t);return}return this.cache.delete(t),this.cache.set(t,r),r.data}}set(t,r,a){if(this.cache.size>=this.maxSize){const n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(t,{data:r,timestamp:Date.now(),expiresAt:Date.now()+(a??this.ttl)})}has(t){return this.get(t)!==void 0}invalidate(t){this.cache.delete(t)}invalidateAll(){this.cache.clear()}invalidateMatching(t){for(const r of this.cache.keys())t.test(r)&&this.cache.delete(r)}}class zr{constructor(){this.pending=new Map}async dedupe(t,r){const a=this.pending.get(t);if(a)return a;const n=r().finally(()=>{this.pending.delete(t)});return this.pending.set(t,n),n}hasPending(t){return this.pending.has(t)}cancelAll(){this.pending.clear()}}function Vc(e,t={}){const r=new Be(t),a=new Be(t),n=new zr,s=t.generateKey??(l=>JSON.stringify(l)),o=t.cacheLoads!==!1,i=t.cacheByKey!==!1;return{...e,cache:r,async load(l={}){const d=`load:${s(l)}`;if(o){const u=r.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.load(l);return o&&r.set(d,u),u})},async byKey(l){const d=`byKey:${String(l)}`;if(i){const u=a.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.byKey(l);return i&&u&&a.set(d,u),u})},async insert(l){const d=await e.insert(l);return r.invalidateAll(),d},async update(l,d){const u=await e.update(l,d);return r.invalidateAll(),a.invalidate(`byKey:${String(l)}`),u},async remove(l){await e.remove(l),r.invalidateAll(),a.invalidate(`byKey:${String(l)}`)},invalidateCache(){r.invalidateAll(),a.invalidateAll()}}}function Xc(e,t){const{cursorField:r,pageSize:a=20,direction:n="asc"}=t;return{async loadPage(s={}){var y;const o=s.pageSize??a,i=s.direction??"forward",l=s.cursor?{type:"condition",field:r,operator:i==="forward"?n==="asc"?">":"<":n==="asc"?"<":">",value:qc(s.cursor)}:null,d=l?{type:"group",logic:"and",items:[...((y=s.filter)==null?void 0:y.items)??[],l]}:s.filter,u=[{field:r,direction:i==="forward"?n:n==="asc"?"desc":"asc"},...s.sort??[]],f=await e.load({...s,filter:d,sort:u,take:o+1}),p=f.data.length>o,g=p?f.data.slice(0,o):f.data;i==="backward"&&g.reverse();const m=g[g.length-1],b=g[0];return{data:g,nextCursor:p&&m?He(m[r]):null,prevCursor:b&&s.cursor?He(b[r]):null,hasMore:p}},async*loadAll(s={}){let o=null;do{const i=await e.load({...s,...o?{cursor:o}:{}});if(i.data.length===0)break;yield i.data;const l=i.data[i.data.length-1];o=l?He(l[r]):null}while(o)}}}function He(e){return btoa(JSON.stringify(e))}function qc(e){try{return JSON.parse(atob(e))}catch{return e}}function Uc(e,t={}){const{pageSize:r=50,threshold:a=200,initialPage:n=0}=t;let s={items:[],isLoading:!1,hasMore:!0,error:null,page:n,totalCount:0};const o=new Set;function i(){o.forEach(g=>g(s))}function l(g){s={...s,...g},i()}let d={};async function u(){if(!(s.isLoading||!s.hasMore)){l({isLoading:!0,error:null});try{const g=await e.load({...d,skip:s.page*r,take:r}),m=[...s.items,...g.data],b=m.length<g.totalCount;l({items:m,page:s.page+1,totalCount:g.totalCount,hasMore:b,isLoading:!1})}catch(g){l({error:g instanceof Error?g:new Error(String(g)),isLoading:!1})}}}function f(g={}){d=g,s={items:[],isLoading:!1,hasMore:!0,error:null,page:0,totalCount:0},i()}function p(g){const m=g.target;if(!m)return;m.scrollHeight-m.scrollTop-m.clientHeight<a&&u()}return{get state(){return s},loadMore:u,reset:f,handleScroll:p,subscribe(g){return o.add(g),()=>o.delete(g)},setOptions(g){d=g}}}function Gc(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:s=10,heartbeatInterval:o=3e4}=e;let i=null,l=0,d=null,u=[];const f=new Map;function p(C,...M){var k;(k=f.get(C))==null||k.forEach(E=>E(...M))}function g(C){if(e.parseMessage)return e.parseMessage(C);try{return JSON.parse(C.data)}catch{return null}}function m(C){return e.serializeMessage?e.serializeMessage(C):JSON.stringify(C)}function b(C){switch(C.type){case"insert":C.data&&(u=[...u,C.data],p("changed"));break;case"update":C.key&&C.changes&&(u=u.map(M=>M[a]===C.key?{...M,...C.changes}:M),p("changed"));break;case"remove":C.key&&(u=u.filter(M=>M[a]!==C.key),p("changed"));break;case"refresh":case"sync":A.load().catch(()=>{});break}}function y(){(i==null?void 0:i.readyState)!==WebSocket.OPEN&&(i=new WebSocket(t),i.onopen=()=>{l=0,p("connected"),h()},i.onmessage=C=>{const M=g(C);M&&(b(M),p("message",M))},i.onerror=C=>{p("error",new Error("WebSocket error"))},i.onclose=()=>{v(),p("disconnected"),l<s&&(l++,setTimeout(y,n*Math.min(l,5)))})}function S(){v(),i&&(i.close(),i=null)}function h(){v(),d=window.setInterval(()=>{(i==null?void 0:i.readyState)===WebSocket.OPEN&&i.send(JSON.stringify({type:"ping"}))},o)}function v(){d&&(clearInterval(d),d=null)}function w(C){(i==null?void 0:i.readyState)===WebSocket.OPEN&&i.send(m(C))}const A={keyField:a,writable:r.writable,async load(C={}){p("loading",!0);try{const M=await r.load(C);return u=M.data,p("loaded",M),p("loading",!1),M}catch(M){throw p("error",M),p("loading",!1),M}},async byKey(C){const M=u.find(k=>k[a]===C);return M||r.byKey(C)},async insert(C){const M=await r.insert(C);return w({type:"insert",data:M}),M},async update(C,M){const k=await r.update(C,M);return w({type:"update",key:C,changes:M}),k},async remove(C){await r.remove(C),w({type:"remove",key:C})},on(C,M){return f.has(C)||f.set(C,new Set),f.get(C).add(M),()=>{var k;return(k=f.get(C))==null?void 0:k.delete(M)}},connect:y,disconnect:S,isConnected:()=>(i==null?void 0:i.readyState)===WebSocket.OPEN,sendMessage:w};return A}function Kc(e){const{connection:t,baseSource:r}=e,a={onInsert:"OnInsert",onUpdate:"OnUpdate",onRemove:"OnRemove",onRefresh:"OnRefresh",insert:"Insert",update:"Update",remove:"Remove",...e.methods},n=r.keyField;let s=[];const o=new Map;function i(f,...p){var g;(g=o.get(f))==null||g.forEach(m=>m(...p))}const l=f=>{s=[...s,f],i("changed")},d=(f,p)=>{s=s.map(g=>g[n]===f?{...g,...p}:g),i("changed")},u=f=>{s=s.filter(p=>p[n]!==f),i("changed")};return{keyField:n,writable:r.writable,async load(f={}){i("loading",!0);try{const p=await r.load(f);return s=p.data,i("loaded",p),i("loading",!1),p}catch(p){throw i("error",p),i("loading",!1),p}},async byKey(f){const p=s.find(g=>g[n]===f);return p||r.byKey(f)},async insert(f){return await t.invoke(a.insert,f)},async update(f,p){return await t.invoke(a.update,f,p)},async remove(f){await t.invoke(a.remove,f)},on(f,p){return o.has(f)||o.set(f,new Set),o.get(f).add(p),()=>{var g;return(g=o.get(f))==null?void 0:g.delete(p)}},async connect(){t.on(a.onInsert,l),t.on(a.onUpdate,d),t.on(a.onRemove,u),t.on(a.onRefresh,()=>this.load()),await t.start()},async disconnect(){t.off(a.onInsert,l),t.off(a.onUpdate,d),t.off(a.onRemove,u),t.off(a.onRefresh,()=>{}),await t.stop()}}}function Jc(e,t={}){const r=e.keyField;let a=[];const n=new Map;let s=0;const o=new Map;function i(d,...u){var f;(f=o.get(d))==null||f.forEach(p=>p(...u))}function l(){return`op_${++s}_${Date.now()}`}return{keyField:r,writable:!0,async load(d={}){const u=await e.load(d);return a=u.data,u},async byKey(d){return a.find(u=>u[r]===d)??e.byKey(d)},async insert(d){var p,g,m;const u=l(),f={...d};a=[...a,f],n.set(u,{id:u,action:"insert",item:f}),(p=t.onOptimisticApply)==null||p.call(t,f,"insert"),i("changed");try{const b=await e.insert(d);return a=a.map(y=>y===f?b:y),n.delete(u),(g=t.onConfirm)==null||g.call(t,b,"insert"),i("changed"),b}catch(b){throw a=a.filter(y=>y!==f),n.delete(u),(m=t.onRollback)==null||m.call(t,f,"insert",b instanceof Error?b:new Error(String(b))),i("changed"),b}},async update(d,u){var b,y,S;const f=l(),p=a.findIndex(h=>h[r]===d);if(p===-1)return e.update(d,u);const g=a[p],m={...g,...u};a=a.map((h,v)=>v===p?m:h),n.set(f,{id:f,action:"update",key:d,originalItem:g}),(b=t.onOptimisticApply)==null||b.call(t,m,"update"),i("changed");try{const h=await e.update(d,u);return a=a.map((v,w)=>w===p?h:v),n.delete(f),(y=t.onConfirm)==null||y.call(t,h,"update"),i("changed"),h}catch(h){throw a=a.map((v,w)=>w===p?g:v),n.delete(f),(S=t.onRollback)==null||S.call(t,g,"update",h instanceof Error?h:new Error(String(h))),i("changed"),h}},async remove(d){var p,g,m;const u=l(),f=a.find(b=>b[r]===d);if(!f)return e.remove(d);a=a.filter(b=>b!==f),n.set(u,{id:u,action:"remove",key:d,originalItem:f}),(p=t.onOptimisticApply)==null||p.call(t,f,"remove"),i("changed");try{await e.remove(d),n.delete(u),(g=t.onConfirm)==null||g.call(t,f,"remove")}catch(b){throw a=[...a,f],n.delete(u),(m=t.onRollback)==null||m.call(t,f,"remove",b instanceof Error?b:new Error(String(b))),i("changed"),b}},on(d,u){return o.has(d)||o.set(d,new Set),o.get(d).add(u),()=>{var f;return(f=o.get(d))==null?void 0:f.delete(u)}},hasPendingChanges:()=>n.size>0,getPendingCount:()=>n.size}}function Fr(e,t,r){const a=new Map(e.map(d=>[d[r],d])),n=new Map(t.map(d=>[d[r],d])),s=[],o=[],i=[],l=[];for(const[d,u]of n){const f=a.get(d);if(!f)s.push(u);else if(Pr(f,u))l.push(u);else{const p={};for(const g of Object.keys(u))f[g]!==u[g]&&(p[g]=u[g]);o.push({key:d,changes:p,oldItem:f,newItem:u})}}for(const[d,u]of a)n.has(d)||i.push(u);return{inserted:s,updated:o,removed:i,unchanged:l}}function Pr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e===null||t===null||typeof e!="object")return e===t;const r=e,a=t,n=new Set([...Object.keys(r),...Object.keys(a)]);for(const s of n)if(!Pr(r[s],a[s]))return!1;return!0}function Yc(e,t={}){const{interval:r=5e3,autoStart:a=!1,pauseWhenHidden:n=!0,onDataChange:s}=t;let o=r,i=null,l=[],d={};const u=new Map;function f(y,...S){var h;(h=u.get(y))==null||h.forEach(v=>v(...S))}async function p(){if(!(n&&document.hidden))try{const y=await e.load(d),S=Fr(l,y.data,e.keyField);(S.inserted.length||S.updated.length||S.removed.length)&&(l=y.data,f("changed"),s==null||s(S))}catch{}}function g(){i||(i=window.setInterval(p,o))}function m(){i&&(clearInterval(i),i=null)}n&&document.addEventListener("visibilitychange",()=>{document.hidden||i&&p()});const b={...e,async load(y={}){d=y;const S=await e.load(y);return l=S.data,S},on(y,S){u.has(y)||u.set(y,new Set),u.get(y).add(S);const h=e.on(y,S);return()=>{var v;(v=u.get(y))==null||v.delete(S),h()}},startPolling:g,stopPolling:m,isPolling:()=>i!==null,setInterval(y){o=y,i&&(m(),g())}};return a&&g(),b}function Qc(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:s=10,withCredentials:o=!1}=e;let i=null,l=0,d=null,u=[];const f=new Map;function p(h,...v){var w;(w=f.get(h))==null||w.forEach(A=>A(...v))}function g(h){if(e.parseEvent)return e.parseEvent(h);try{return JSON.parse(h.data)}catch{return null}}function m(h){switch(h.type){case"insert":h.data&&(u=[...u,h.data],p("changed"));break;case"update":h.key&&h.changes&&(u=u.map(v=>v[a]===h.key?{...v,...h.changes}:v),p("changed"));break;case"remove":h.key&&(u=u.filter(v=>v[a]!==h.key),p("changed"));break;case"snapshot":Array.isArray(h.data)&&(u=h.data,p("changed"));break;case"refresh":S.load().catch(()=>{});break}}function b(){(i==null?void 0:i.readyState)!==EventSource.OPEN&&(y(),i=new EventSource(t,{withCredentials:o}),i.onopen=()=>{l=0,p("connected")},i.onmessage=h=>{const v=g(h);v&&(m(v),p("message",v))},i.onerror=()=>{if(p("error",new Error("SSE connection error")),(i==null?void 0:i.readyState)===EventSource.CLOSED&&(p("disconnected"),i=null,l<s)){l++;const h=n*Math.min(l,5);d=setTimeout(b,h)}})}function y(){d&&(clearTimeout(d),d=null),i&&(i.close(),i=null)}const S={keyField:a,writable:r.writable,async load(h={}){p("loading",!0);try{const v=await r.load(h);return u=v.data,p("loaded",v),p("loading",!1),v}catch(v){throw p("error",v),p("loading",!1),v}},async byKey(h){const v=u.find(w=>w[a]===h);return v||r.byKey(h)},async insert(h){return r.insert(h)},async update(h,v){return r.update(h,v)},async remove(h){return r.remove(h)},on(h,v){return f.has(h)||f.set(h,new Set),f.get(h).add(v),()=>{var w;return(w=f.get(h))==null?void 0:w.delete(v)}},connect:b,disconnect:y,isConnected:()=>(i==null?void 0:i.readyState)===EventSource.OPEN};return S}function U(e,t){const r={};for(const a of t){const n=e.map(o=>o[a.field]).filter(o=>o!=null),s=a.alias??`${a.fn}_${a.field}`;switch(a.fn){case"sum":r[s]=n.reduce((o,i)=>Number(o)+Number(i),0);break;case"avg":r[s]=n.length?n.reduce((o,i)=>Number(o)+Number(i),0)/n.length:0;break;case"min":r[s]=n.length?Math.min(...n.map(Number)):null;break;case"max":r[s]=n.length?Math.max(...n.map(Number)):null;break;case"count":r[s]=n.length;break;case"first":r[s]=n[0]??null;break;case"last":r[s]=n[n.length-1]??null;break;case"distinct":r[s]=[...new Set(n)];break}}return r}function ot(e,t){const{groupBy:r,aggregates:a=[],includeItems:n=!1,sortGroups:s}=t;if(r.length===0)return[{key:{},count:e.length,aggregates:U(e,a),items:n?e:void 0}];const o=new Map;for(const l of e){const d={};for(const f of r)d[f]=l[f];const u=JSON.stringify(d);o.has(u)||o.set(u,{key:d,items:[]}),o.get(u).items.push(l)}const i=[];for(const[,l]of o)i.push({key:l.key,count:l.items.length,aggregates:U(l.items,a),items:n?l.items:void 0});return s!=null&&s.length&&i.sort((l,d)=>{for(const u of s){const f=l.key[u.field]??l.aggregates[u.field],p=d.key[u.field]??d.aggregates[u.field],g=typeof f=="number"&&typeof p=="number"?f-p:String(f??"").localeCompare(String(p??""));if(g!==0)return u.direction==="desc"?-g:g}return 0}),i}function Hr(e,t,r=[]){if(t.length===0)return[{key:{},count:e.length,aggregates:U(e,r),items:e}];const[a,...n]=t,s=ot(e,{groupBy:[a],aggregates:r,includeItems:!0});if(n.length>0)for(const o of s)o.groups=Hr(o.items,n,r),delete o.items;return s}function Zc(e,t){const{rows:r,columns:a,values:n,aggregateFunction:s="sum",rowTotals:o=!0,columnTotals:i=!0,grandTotal:l=!0}=t,d=[...new Set(e.map(m=>String(m[a])))].sort(),u=ot(e,{groupBy:r,includeItems:!0}),f=[];for(const m of u){const b={rowKey:m.key,values:{}};for(const y of d){const S=m.items.filter(v=>String(v[a])===y),h=U(S,[{field:n,fn:s}]);b.values[y]=h[`${s}_${n}`]??null}if(o){const y=U(m.items,[{field:n,fn:s}]);b.rowTotal=y[`${s}_${n}`]}f.push(b)}let p;if(i){p={};for(const m of d){const b=e.filter(S=>String(S[a])===m),y=U(b,[{field:n,fn:s}]);p[m]=y[`${s}_${n}`]}}let g;return l&&(g=U(e,[{field:n,fn:s}])[`${s}_${n}`]),{columnHeaders:d,rows:f,columnTotals:p,grandTotal:g}}function el(e,t){return e.map((r,a)=>{const n={...r};for(const s of t)n[s.name]=s.formula(r,a,e);return n})}const tl={runningSum:e=>(t,r,a)=>a.slice(0,r+1).reduce((n,s)=>n+Number(s[e]??0),0),runningAvg:e=>(t,r,a)=>{const n=a.slice(0,r+1);return n.reduce((s,o)=>s+Number(o[e]??0),0)/n.length},percentOfTotal:e=>(t,r,a)=>{const n=a.reduce((s,o)=>s+Number(o[e]??0),0);return n?Number(t[e]??0)/n*100:0},rank:(e,t="desc")=>(r,a,n)=>[...n].sort((o,i)=>{const l=Number(o[e]??0)-Number(i[e]??0);return t==="desc"?-l:l}).findIndex(o=>o===r)+1,diffFromPrevious:e=>(t,r,a)=>r===0?null:Number(t[e]??0)-Number(a[r-1][e]??0),percentChange:e=>(t,r,a)=>{if(r===0)return null;const n=Number(a[r-1][e]??0);return n===0?null:(Number(t[e]??0)-n)/n*100},movingAverage:(e,t)=>(r,a,n)=>{const s=Math.max(0,a-t+1),o=n.slice(s,a+1);return o.reduce((i,l)=>i+Number(l[e]??0),0)/o.length},conditional:(e,t,r)=>a=>e(a)?t:r,concat:(...e)=>t=>e.map(r=>t[r]??"").join(" "),formatDate:(e,t="medium")=>r=>{const a=r[e];return a?new Date(a).toLocaleDateString(void 0,{dateStyle:t}):""}};function rl(e,t){const r=[],a=new Map,n=new Map;for(let i=0;i<e.length;i++){const l=e[i];for(const d of t)if(!d.validate(l,i,e)){const u=typeof d.message=="function"?d.message(l):d.message,f={index:i,rule:d.name,message:u,severity:d.severity??"error",fields:d.fields??[],item:l};r.push(f),a.has(i)||a.set(i,[]),a.get(i).push(f);for(const p of f.fields)n.has(p)||n.set(p,[]),n.get(p).push(f)}}const s=r.filter(i=>i.severity==="error").length,o=r.filter(i=>i.severity==="warning").length;return{isValid:s===0,errorCount:s,warningCount:o,errors:r,byIndex:a,byField:n}}const al={required:e=>({name:`required_${String(e)}`,validate:t=>t[e]!=null&&t[e]!=="",message:`${String(e)} is required`,fields:[String(e)]}),minLength:(e,t)=>({name:`minLength_${String(e)}`,validate:r=>String(r[e]??"").length>=t,message:`${String(e)} must be at least ${t} characters`,fields:[String(e)]}),maxLength:(e,t)=>({name:`maxLength_${String(e)}`,validate:r=>String(r[e]??"").length<=t,message:`${String(e)} must be at most ${t} characters`,fields:[String(e)]}),min:(e,t)=>({name:`min_${String(e)}`,validate:r=>Number(r[e])>=t,message:`${String(e)} must be at least ${t}`,fields:[String(e)]}),max:(e,t)=>({name:`max_${String(e)}`,validate:r=>Number(r[e])<=t,message:`${String(e)} must be at most ${t}`,fields:[String(e)]}),email:e=>({name:`email_${String(e)}`,validate:t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t[e]??"")),message:`${String(e)} must be a valid email`,fields:[String(e)]}),pattern:(e,t,r)=>({name:`pattern_${String(e)}`,validate:a=>t.test(String(a[e]??"")),message:r??`${String(e)} has invalid format`,fields:[String(e)]}),unique:e=>({name:`unique_${String(e)}`,validate:(t,r,a)=>{const n=t[e];return a.findIndex(s=>s[e]===n)===r},message:`${String(e)} must be unique`,fields:[String(e)]}),custom:(e,t,r,a)=>({name:e,validate:t,message:r,fields:a})},nl={async updateWhere(e,t,r){return e.map(a=>{if(!t(a))return a;const n=typeof r=="function"?r(a):r;return{...a,...n}})},async removeWhere(e,t){const r=[],a=[];for(const n of e)t(n)?a.push(n):r.push(n);return{remaining:r,removed:a}},async transform(e,t,r={}){const{parallel:a=!1,batchSize:n=10}=r,s=[],o=[];let i=0;if(a)for(let l=0;l<e.length;l+=n){const d=e.slice(l,l+n),u=await Promise.allSettled(d.map((f,p)=>t(f,l+p)));for(let f=0;f<u.length;f++){const p=u[f];p.status==="fulfilled"?(s.push(p.value),i++):o.push({index:l+f,item:d[f],error:p.reason})}}else for(let l=0;l<e.length;l++)try{const d=await t(e[l],l);s.push(d),i++}catch(d){o.push({index:l,item:e[l],error:d instanceof Error?d:new Error(String(d))})}return{succeeded:i,failed:o.length,errors:o,results:s}},deduplicate(e,t){const r=new Set;return e.filter(a=>{const n=a[t];return r.has(n)?!1:(r.add(n),!0)})},merge(e,t,r,a={}){const{updateExisting:n=!0,addNew:s=!0}=a,o=new Map(e.map(l=>[l[r],l])),i=[...e];for(const l of t){const d=l[r],u=o.get(d);if(u){if(n){const f=i.indexOf(u);i[f]={...u,...l}}}else s&&i.push(l)}return i}};function sl(e,t){const r=(t==null?void 0:t.autoLoad)??!0,a=(t==null?void 0:t.defaultPageSize)??20,[n,s]=c.useState([]),[o,i]=c.useState(0),[l,d]=c.useState(!1),[u,f]=c.useState(null),[p,g]=c.useState(1),[m,b]=c.useState(a),[y,S]=c.useState((t==null?void 0:t.defaultSort)??[]),[h,v]=c.useState(t==null?void 0:t.defaultFilter),[w,A]=c.useState((t==null?void 0:t.defaultSearch)??""),C=c.useRef(0),M=t==null?void 0:t.loadOptions,k=c.useCallback(async()=>{if(!e)return;const z=++C.current;d(!0),f(null);try{const j=await e.load({skip:(p-1)*m,take:m,sort:y.length?y:void 0,filter:h,search:w||void 0,...M});if(z!==C.current)return;s(j.data),i(j.totalCount)}catch(j){if(z!==C.current)return;f(j instanceof Error?j.message:String(j))}finally{z===C.current&&d(!1)}},[e,p,m,y,h,w,M]);c.useEffect(()=>{r&&k()},[k,r]),c.useEffect(()=>{if(e)return e.on("changed",()=>{k()})},[e,k]);const E=c.useCallback((z,j)=>{S([{field:z,direction:j}]),g(1)},[]),T=c.useCallback(z=>{v(z),g(1)},[]),N=c.useCallback(z=>{A(z),g(1)},[]),R=c.useCallback(z=>{b(z),g(1)},[]),I=c.useCallback(async z=>{if(!(e!=null&&e.insert))throw new Error("DataSource is not writable");await e.insert(z)},[e]),H=c.useCallback(async(z,j)=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");await e.update(z,j)},[e]),D=c.useCallback(async z=>{if(!(e!=null&&e.remove))throw new Error("DataSource is not writable");await e.remove(z)},[e]);return{data:n,totalCount:o,loading:l,error:u,page:p,pageSize:m,sort:y,filter:h,search:w,setPage:g,setPageSize:R,setSort:S,setSortField:E,setFilter:T,setSearch:N,reload:k,insert:I,update:H,remove:D}}function Dr(e,t){const[r,a]=c.useState(void 0),[n,s]=c.useState({}),[o,i]=c.useState(!1),[l,d]=c.useState(null),u=c.useRef(0),f=c.useCallback(async()=>{if(!e||t==null){a(void 0);return}const h=++u.current;i(!0),d(null);try{const v=await e.byKey(t);if(h!==u.current)return;a(v),s({})}catch(v){if(h!==u.current)return;d(v instanceof Error?v.message:String(v))}finally{h===u.current&&i(!1)}},[e,t]);c.useEffect(()=>{f()},[f]),c.useEffect(()=>{if(e)return e.on("changed",()=>{f()})},[e,f]);const p=c.useMemo(()=>({...r??{},...n}),[r,n]),g=Object.keys(n).length>0,m=c.useCallback((h,v)=>{s(w=>({...w,[h]:v}))},[]),b=c.useCallback(h=>{s(v=>({...v,...h}))},[]),y=c.useCallback(async()=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");g&&await e.update(t,n)},[e,t,n,g]),S=c.useCallback(()=>{s({})},[]);return{data:r,editData:p,loading:o,error:l,changes:n,isDirty:g,set:m,setMany:b,save:y,reload:f,reset:S}}function ol(e,t,r){const a=Dr(e,t),n=a.editData[r],s=c.useCallback(i=>{a.set(r,i)},[a,r]),o=c.useCallback(async()=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");const i={[r]:a.editData[r]};await e.update(t,i)},[e,t,r,a.editData]);return{value:n,setValue:s,loading:a.loading,error:a.error,isDirty:r in a.changes,save:o}}function il(e,t,r,a){const n=(a==null?void 0:a.autoLoad)??!0,s=(a==null?void 0:a.take)??200,[o,i]=c.useState([]),[l,d]=c.useState(!1),[u,f]=c.useState(null),p=c.useRef(0),g=c.useCallback(async y=>{if(!e)return;const S=++p.current;d(!0),f(null);try{const h=await e.load({take:s,search:y||void 0,searchFields:a==null?void 0:a.searchFields});if(S!==p.current)return;i(h.data)}catch(h){if(S!==p.current)return;f(h instanceof Error?h.message:String(h))}finally{S===p.current&&d(!1)}},[e,s,a==null?void 0:a.searchFields]);c.useEffect(()=>{n&&g()},[g,n]);const m=c.useMemo(()=>o.map(y=>{const S=y,h={value:String(S[t]??""),label:String(S[r]??"")};return a!=null&&a.iconField&&S[a.iconField]!=null&&(h.icon=S[a.iconField]),a!=null&&a.descriptionField&&S[a.descriptionField]!=null&&(h.description=String(S[a.descriptionField])),a!=null&&a.groupField&&S[a.groupField]!=null&&(h.group=String(S[a.groupField])),h}),[o,t,r,a==null?void 0:a.iconField,a==null?void 0:a.descriptionField,a==null?void 0:a.groupField]),b=c.useCallback(y=>{g(y)},[g]);return{options:m,loading:l,error:u,search:b,reload:()=>g()}}function _e(e){const{dbName:t,storeName:r,keyField:a="id",version:n=1,indexes:s=[]}=e;let o=null;const i=new Map;function l(m,...b){var y;(y=i.get(m))==null||y.forEach(S=>S(...b))}async function d(){return o||new Promise((m,b)=>{const y=indexedDB.open(t,n);y.onerror=()=>b(y.error),y.onsuccess=()=>{o=y.result,m(o)},y.onupgradeneeded=S=>{const h=S.target.result;if(!h.objectStoreNames.contains(r)){const v=h.createObjectStore(r,{keyPath:a});for(const w of s)v.createIndex(w.name,w.keyPath,{unique:w.unique??!1})}}})}async function u(m,b){const y=await d();return new Promise((S,h)=>{const w=y.transaction(r,m).objectStore(r),A=b(w);A.onsuccess=()=>S(A.result),A.onerror=()=>h(A.error)})}async function f(m,b,y){const S=await d();return new Promise((h,v)=>{var H;const A=S.transaction(r,m).objectStore(r),C=[];let M=A,k="next";if((H=b.sort)!=null&&H.length){const D=b.sort[0].field,z=b.sort[0].direction;A.indexNames.contains(D)&&(M=A.index(D)),k=z==="desc"?"prev":"next"}const E=M.openCursor(null,k);let T=0,N=0;const R=b.skip??0,I=b.take??1/0;E.onsuccess=()=>{const D=E.result;if(!D||N>=I){h(C);return}const z=D.value;if(b.filter&&!p(z,b.filter)){D.continue();return}if(b.search&&!g(z,b.search,b.searchFields)){D.continue();return}if(T<R){T++,D.continue();return}C.push(z),N++,D.continue()},E.onerror=()=>v(E.error)})}function p(m,b){if(!b.items.length)return!0;const y=S=>{if(S.type==="group")return p(m,S);const h=m[S.field],v=S.value;switch(S.operator){case"=":return h==v;case"<>":return h!=v;case"<":return h<v;case"<=":return h<=v;case">":return h>v;case">=":return h>=v;case"contains":return String(h??"").toLowerCase().includes(String(v??"").toLowerCase());case"notcontains":return!String(h??"").toLowerCase().includes(String(v??"").toLowerCase());case"startswith":return String(h??"").toLowerCase().startsWith(String(v??"").toLowerCase());case"endswith":return String(h??"").toLowerCase().endsWith(String(v??"").toLowerCase());case"isblank":return h==null||h==="";case"isnotblank":return h!=null&&h!=="";default:return!0}};return b.logic==="and"?b.items.every(y):b.items.some(y)}function g(m,b,y){const S=b.toLowerCase();return(y?y.map(v=>m[v]):Object.values(m)).some(v=>String(v??"").toLowerCase().includes(S))}return{keyField:a,writable:!0,async load(m={}){var b;l("loading",!0);try{const y=await f("readonly",m,()=>{});(b=m.sort)!=null&&b.length&&y.sort((v,w)=>{for(const A of m.sort){const C=v[A.field]??"",M=w[A.field]??"",k=typeof C=="number"&&typeof M=="number"?C-M:String(C).localeCompare(String(M));if(k!==0)return A.direction==="desc"?-k:k}return 0});const S=await this.count(),h={data:y,totalCount:S};return l("loaded",h),l("loading",!1),h}catch(y){throw l("error",y),l("loading",!1),y}},async byKey(m){return u("readonly",b=>b.get(m))},async insert(m){return await u("readwrite",b=>b.add(m)),l("changed"),m},async update(m,b){const y=await this.byKey(m);if(!y)throw new Error(`Record not found: ${m}`);const S={...y,...b};return await u("readwrite",h=>h.put(S)),l("changed"),S},async remove(m){await u("readwrite",b=>b.delete(m)),l("changed")},on(m,b){return i.has(m)||i.set(m,new Set),i.get(m).add(b),()=>{var y;return(y=i.get(m))==null?void 0:y.delete(b)}},async clear(){await u("readwrite",m=>m.clear()),l("changed")},async count(){return u("readonly",m=>m.count())},async getAll(){return u("readonly",m=>m.getAll())},async bulkInsert(m){const b=await d();return new Promise((y,S)=>{const h=b.transaction(r,"readwrite"),v=h.objectStore(r);for(const w of m)v.put(w);h.oncomplete=()=>{l("changed"),y()},h.onerror=()=>S(h.error)})},async bulkDelete(m){const b=await d();return new Promise((y,S)=>{const h=b.transaction(r,"readwrite"),v=h.objectStore(r);for(const w of m)v.delete(w);h.oncomplete=()=>{l("changed"),y()},h.onerror=()=>S(h.error)})},async exportData(){return this.getAll()},async importData(m){await this.clear(),await this.bulkInsert(m)}}}function cl(e){const{remoteSource:t,offlineConfig:r,syncStrategy:a="remote-first",onConflict:n,onSync:s,autoSyncInterval:o=0}=e,i=r.keyField??t.keyField,l=_e({...r,keyField:i}),d=_e({dbName:r.dbName,storeName:`${r.storeName}_pending`,keyField:"id"});let u=navigator.onLine,f=0;const p=new Map;function g(y,...S){var h;(h=p.get(y))==null||h.forEach(v=>v(...S))}window.addEventListener("online",()=>{u=!0,g("online"),b()}),window.addEventListener("offline",()=>{u=!1,g("offline")});async function m(y,S,h){const v={id:`pending_${++f}_${Date.now()}`,action:y,key:S,data:h,timestamp:Date.now(),retries:0};await d.insert(v)}async function b(){if(u){g("syncing",!0);try{let y=0,S=0,h=0;const v=await d.load();for(const w of v.data)try{switch(w.action){case"insert":await t.insert(w.data),y++;break;case"update":await t.update(w.key,w.data),S++;break;case"remove":await t.remove(w.key),h++;break}await d.remove(w.id)}catch{w.retries<3&&await d.update(w.id,{retries:w.retries+1})}if(a!=="local-first"){const w=await t.load();if(a==="remote-first")await l.importData(w.data);else if(a==="merge"&&n){const A=await l.load(),C=new Map(A.data.map(k=>[k[i],k])),M=[];for(const k of w.data){const E=C.get(k[i]);E?M.push(n(E,k)):M.push(k)}await l.importData(M)}}g("synced",{added:y,updated:S,removed:h}),s==null||s({added:y,updated:S,removed:h})}catch(y){g("syncError",y)}finally{g("syncing",!1)}}}return o>0&&window.setInterval(b,o),{keyField:i,writable:!0,async load(y={}){if(u&&a==="remote-first")try{const S=await t.load(y);return await l.bulkInsert(S.data),S}catch{}return l.load(y)},async byKey(y){if(u)try{const S=await t.byKey(y);return S&&await l.update(y,S).catch(()=>l.insert(S)),S}catch{}return l.byKey(y)},async insert(y){const S=await l.insert(y);if(u)try{return await t.insert(y)}catch{await m("insert",void 0,y)}else await m("insert",void 0,y);return g("changed"),S},async update(y,S){const h=await l.update(y,S);if(u)try{return await t.update(y,S)}catch{await m("update",y,S)}else await m("update",y,S);return g("changed"),h},async remove(y){if(await l.remove(y),u)try{await t.remove(y)}catch{await m("remove",y)}else await m("remove",y);g("changed")},on(y,S){return p.has(y)||p.set(y,new Set),p.get(y).add(S),()=>{var h;return(h=p.get(y))==null?void 0:h.delete(S)}},sync:b,isOnline:()=>u,async getPendingChanges(){return(await d.load()).data},async clearPendingChanges(){await d.clear()}}}function ll(e){const{channelName:t,source:r}=e,a=new BroadcastChannel(t),n=new Map;function s(i,...l){var d;(d=n.get(i))==null||d.forEach(u=>u(...l))}a.onmessage=i=>{const l=i.data;switch(l.type){case"insert":case"update":case"remove":s("changed"),s("crossTabChange",l);break;case"refresh":s("refresh");break;case"request-sync":r.load().then(d=>{a.postMessage({type:"sync-data",data:d.data})});break}};function o(i){a.postMessage(i)}return{...r,async insert(i){const l=await r.insert(i);return o({type:"insert",data:l}),l},async update(i,l){const d=await r.update(i,l);return o({type:"update",key:i,changes:l}),d},async remove(i){await r.remove(i),o({type:"remove",key:i})},on(i,l){n.has(i)||n.set(i,new Set),n.get(i).add(l);const d=r.on(i,l);return()=>{var u;(u=n.get(i))==null||u.delete(l),d()}},broadcast:o,requestSync(){o({type:"request-sync"})}}}function dl(e={}){const{prefix:t="",persist:r={filter:!0,sort:!0,page:!0,search:!0},useHash:a=!1}=e;function n(){return a?new URLSearchParams(window.location.hash.slice(1)):new URLSearchParams(window.location.search)}function s(i){if(a)window.location.hash=i.toString();else{const l=new URL(window.location.href);l.search=i.toString(),window.history.replaceState({},"",l.toString())}}function o(i){return t?`${t}_${i}`:i}return{read(){const i=n(),l={};if(r.filter){const d=i.get(o("filter"));if(d)try{l.filter=JSON.parse(d)}catch{}}if(r.sort){const d=i.get(o("sort"));if(d)try{l.sort=JSON.parse(d)}catch{}}if(r.page){const d=i.get(o("skip")),u=i.get(o("take"));d&&(l.skip=parseInt(d,10)),u&&(l.take=parseInt(u,10))}if(r.search){const d=i.get(o("search"));d&&(l.search=d)}return l},write(i){const l=n();r.filter&&(i.filter&&i.filter.items.length>0?l.set(o("filter"),JSON.stringify(i.filter)):l.delete(o("filter"))),r.sort&&(i.sort&&i.sort.length>0?l.set(o("sort"),JSON.stringify(i.sort)):l.delete(o("sort"))),r.page&&(i.skip?l.set(o("skip"),String(i.skip)):l.delete(o("skip")),i.take?l.set(o("take"),String(i.take)):l.delete(o("take"))),r.search&&(i.search?l.set(o("search"),i.search):l.delete(o("search"))),s(l)},clear(){const i=n();i.delete(o("filter")),i.delete(o("sort")),i.delete(o("skip")),i.delete(o("take")),i.delete(o("search")),s(i)},toLoadOptions(){const i=this.read();return{filter:i.filter,sort:i.sort,skip:i.skip,take:i.take,search:i.search}}}}const ul={async exportToJSON(e,t){const r=await e.load(),a={version:"1.0",timestamp:Date.now(),data:r.data,metadata:t};return JSON.stringify(a,null,2)},async importFromJSON(e,t,r={}){const n=JSON.parse(t).data;let s=0,o=0;r.replace&&"clear"in e&&await e.clear();for(const i of n){if(r.validate&&!r.validate(i)){o++;continue}try{await e.insert(i),s++}catch{o++}}return{imported:s,skipped:o}},async downloadAsJSON(e,t="export.json"){const r=await this.exportToJSON(e),a=new Blob([r],{type:"application/json"}),n=URL.createObjectURL(a),s=document.createElement("a");s.href=n,s.download=t,s.click(),URL.revokeObjectURL(n)},async importFromFile(e,t,r){const a=await t.text();return this.importFromJSON(e,a,r)}};function fl(e="nice_user_prefs"){let t=null;function r(){if(t)return t;try{const n=localStorage.getItem(e);t=n?JSON.parse(n):{}}catch{t={}}return t}function a(n){t=n,localStorage.setItem(e,JSON.stringify(n))}return{get(n,s){return r()[n]??s},set(n,s){const o=r();o[n]=s,a(o)},remove(n){const s=r();delete s[n],a(s)},getAll(){return{...r()}},setAll(n){a(n)},clear(){t={},localStorage.removeItem(e)},merge(n){a({...r(),...n})}}}const $r={"colors.primary":"--color-primary","colors.primaryHover":"--color-primary-hover","colors.success":"--color-success","colors.warning":"--color-warning","colors.error":"--color-error","colors.info":"--color-info","colors.accent":"--color-accent","colors.accentHover":"--color-accent-hover","colors.link":"--color-link","colors.linkHover":"--color-link-hover","colors.focus":"--color-focus","colors.overlay":"--color-overlay","colors.surface":"--color-surface","colors.surfaceHover":"--color-surface-hover","colors.disabled":"--color-disabled","colors.disabledText":"--color-disabled-text","backgrounds.primary":"--bg-primary","backgrounds.secondary":"--bg-secondary","backgrounds.tertiary":"--bg-tertiary","backgrounds.hover":"--hover-bg","backgrounds.elevated":"--bg-elevated","backgrounds.inset":"--bg-inset","backgrounds.canvas":"--bg-canvas","text.primary":"--text-primary","text.secondary":"--text-secondary","text.muted":"--text-muted","text.inverse":"--text-inverse","text.onPrimary":"--text-on-primary","text.onAccent":"--text-on-accent","borders.color":"--border-color","borders.radiusSm":"--nice-radius-sm","borders.radiusMd":"--nice-radius-md","borders.radiusLg":"--nice-radius-lg","borders.radiusXl":"--nice-radius-xl","borders.radiusFull":"--nice-radius-full","borders.width":"--border-width","borders.focusColor":"--border-focus-color","borders.divider":"--border-divider","shadows.sm":"--shadow-sm","shadows.md":"--shadow-md","shadows.lg":"--shadow-lg","shadows.xl":"--shadow-xl","shadows.inner":"--shadow-inner","shadows.glow":"--shadow-glow","spacing.space1":"--nice-space-1","spacing.space2":"--nice-space-2","spacing.space3":"--nice-space-3","spacing.space4":"--nice-space-4","spacing.space5":"--nice-space-5","spacing.space6":"--nice-space-6","spacing.space8":"--nice-space-8","spacing.space10":"--nice-space-10","spacing.space12":"--nice-space-12","spacing.space16":"--nice-space-16","typography.fontFamily":"--nice-font-family","typography.fontSizeXs":"--nice-font-size-xs","typography.fontSizeSm":"--nice-font-size-sm","typography.fontSizeMd":"--nice-font-size-md","typography.fontSizeLg":"--nice-font-size-lg","typography.fontSizeXl":"--nice-font-size-xl","typography.fontSize2xl":"--nice-font-size-2xl","typography.fontSize3xl":"--nice-font-size-3xl","typography.fontWeightNormal":"--nice-font-weight-normal","typography.fontWeightMedium":"--nice-font-weight-medium","typography.fontWeightSemibold":"--nice-font-weight-semibold","typography.fontWeightBold":"--nice-font-weight-bold","typography.lineHeight":"--nice-line-height","typography.headingFontFamily":"--nice-heading-font-family","typography.monoFontFamily":"--nice-mono-font-family","typography.letterSpacing":"--nice-letter-spacing","typography.headingLetterSpacing":"--nice-heading-letter-spacing","transitions.fast":"--nice-transition-fast","transitions.normal":"--nice-transition","transitions.slow":"--nice-transition-slow"};function ml(e,t){return t.split(".").reduce((r,a)=>{if(r&&typeof r=="object")return r[a]},e)}function it(e){const t={};for(const[r,a]of Object.entries($r)){const n=ml(e,r);n!==void 0&&(t[a]=String(n))}return t}function pl(e,t){const r=t??document.documentElement,a=it(e);for(const[n,s]of Object.entries(a))r.style.setProperty(n,s);yl(e.backgroundImage,r),e.darkMode&&(r.dataset.ntdColorScheme=e.darkMode)}const gl={dots:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="currentColor" opacity="0.15"/></svg>',grid:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M20 0H0v20" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',diagonal:'<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M0 10L10 0" stroke="currentColor" stroke-opacity="0.08"/></svg>',"cross-hatch":'<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M0 10L10 0M-1 1L1 -1M9 11L11 9" stroke="currentColor" stroke-opacity="0.06"/></svg>',waves:'<svg width="40" height="12" xmlns="http://www.w3.org/2000/svg"><path d="M0 6c5 0 5-6 10-6s5 6 10 6 5-6 10-6 5 6 10 6" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',hexagons:'<svg width="28" height="49" xmlns="http://www.w3.org/2000/svg"><path d="M14 0l14 8.5v16L14 33 0 24.5v-16z" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',triangles:'<svg width="20" height="17" xmlns="http://www.w3.org/2000/svg"><path d="M0 17L10 0l10 17z" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',circles:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="6" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',zigzag:'<svg width="20" height="12" xmlns="http://www.w3.org/2000/svg"><path d="M0 6l5-6 5 6 5-6 5 6" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',noise:'<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency=".9" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(#n)"/></svg>'};function yl(e,t){if(t.style.removeProperty("--ntd-bg-image"),t.style.removeProperty("--ntd-bg-image-size"),t.style.removeProperty("--ntd-bg-image-position"),t.style.removeProperty("--ntd-bg-image-attachment"),t.style.removeProperty("--ntd-bg-image-repeat"),t.style.removeProperty("--ntd-bg-image-opacity"),t.style.removeProperty("--ntd-bg-image-blend"),!(!e||e.type==="none")){if(e.type==="gradient"&&e.gradient)t.style.setProperty("--ntd-bg-image",e.gradient);else if(e.type==="image"&&e.imageUrl)t.style.setProperty("--ntd-bg-image",`url("${e.imageUrl}")`),e.imageSize&&t.style.setProperty("--ntd-bg-image-size",e.imageSize),e.imagePosition&&t.style.setProperty("--ntd-bg-image-position",e.imagePosition),e.imageAttachment&&t.style.setProperty("--ntd-bg-image-attachment",e.imageAttachment),e.imageRepeat&&t.style.setProperty("--ntd-bg-image-repeat",e.imageRepeat);else if(e.type==="pattern"&&e.pattern){const r=gl[e.pattern];if(r){const a=`url("data:image/svg+xml,${encodeURIComponent(r)}")`;t.style.setProperty("--ntd-bg-image",a),t.style.setProperty("--ntd-bg-image-repeat","repeat")}}e.opacity!==void 0&&t.style.setProperty("--ntd-bg-image-opacity",String(e.opacity)),e.blendMode&&t.style.setProperty("--ntd-bg-image-blend",e.blendMode)}}function jr(e){const t=e??document.documentElement;for(const r of Object.values($r))t.style.removeProperty(r);for(const r of["--ntd-bg-image","--ntd-bg-image-size","--ntd-bg-image-position","--ntd-bg-image-attachment","--ntd-bg-image-repeat","--ntd-bg-image-opacity","--ntd-bg-image-blend"])t.style.removeProperty(r);delete t.dataset.ntdColorScheme,delete t.dataset.theme,t.classList.remove("nice-dark")}function hl(e){const t=e??document.documentElement,r=getComputedStyle(t),a=o=>r.getPropertyValue(o).trim(),n=o=>parseFloat(r.getPropertyValue(o))||0,s=o=>a(o)||void 0;return{name:"Current",colors:{primary:a("--color-primary"),primaryHover:a("--color-primary-hover"),success:a("--color-success"),warning:a("--color-warning"),error:a("--color-error"),info:a("--color-info"),accent:s("--color-accent"),accentHover:s("--color-accent-hover"),link:s("--color-link"),linkHover:s("--color-link-hover"),focus:s("--color-focus"),overlay:s("--color-overlay"),surface:s("--color-surface"),surfaceHover:s("--color-surface-hover"),disabled:s("--color-disabled"),disabledText:s("--color-disabled-text")},backgrounds:{primary:a("--bg-primary"),secondary:a("--bg-secondary"),tertiary:a("--bg-tertiary"),hover:a("--hover-bg"),elevated:s("--bg-elevated"),inset:s("--bg-inset"),canvas:s("--bg-canvas")},text:{primary:a("--text-primary"),secondary:a("--text-secondary"),muted:a("--text-muted"),inverse:s("--text-inverse"),onPrimary:s("--text-on-primary"),onAccent:s("--text-on-accent")},borders:{color:a("--border-color"),radiusSm:a("--nice-radius-sm"),radiusMd:a("--nice-radius-md"),radiusLg:a("--nice-radius-lg"),radiusXl:a("--nice-radius-xl"),radiusFull:a("--nice-radius-full"),width:s("--border-width"),focusColor:s("--border-focus-color"),divider:s("--border-divider")},shadows:{sm:a("--shadow-sm"),md:a("--shadow-md"),lg:a("--shadow-lg"),xl:a("--shadow-xl"),inner:s("--shadow-inner"),glow:s("--shadow-glow")},spacing:{space1:a("--nice-space-1"),space2:a("--nice-space-2"),space3:a("--nice-space-3"),space4:a("--nice-space-4"),space5:a("--nice-space-5"),space6:a("--nice-space-6"),space8:a("--nice-space-8"),space10:s("--nice-space-10"),space12:s("--nice-space-12"),space16:s("--nice-space-16")},typography:{fontFamily:a("--nice-font-family"),fontSizeXs:a("--nice-font-size-xs"),fontSizeSm:a("--nice-font-size-sm"),fontSizeMd:a("--nice-font-size-md"),fontSizeLg:a("--nice-font-size-lg"),fontSizeXl:a("--nice-font-size-xl"),fontWeightNormal:n("--nice-font-weight-normal"),fontWeightMedium:n("--nice-font-weight-medium"),fontWeightSemibold:n("--nice-font-weight-semibold"),fontWeightBold:n("--nice-font-weight-bold"),lineHeight:n("--nice-line-height"),headingFontFamily:s("--nice-heading-font-family"),monoFontFamily:s("--nice-mono-font-family"),fontSize2xl:s("--nice-font-size-2xl"),fontSize3xl:s("--nice-font-size-3xl"),letterSpacing:s("--nice-letter-spacing"),headingLetterSpacing:s("--nice-heading-letter-spacing")},transitions:{fast:a("--nice-transition-fast"),normal:a("--nice-transition"),slow:a("--nice-transition-slow")},darkMode:t.dataset.ntdColorScheme??void 0}}function bl(e){return JSON.stringify(e,null,2)}function Sl(e){const t=JSON.parse(e);if(!t||typeof t!="object"||!t.name||!t.colors||!t.backgrounds)throw new Error("Invalid theme format: missing required fields (name, colors, backgrounds)");return t}const ct=c.createContext(null);function xl(){const e=c.useContext(ct);if(!e)throw new Error("useNiceTheme must be used within a NiceThemeProvider");return e}const ce={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},le={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},de={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},lt=e=>({color:e,radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"}),Or={sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},vl={sm:"0 1px 2px rgba(0,0,0,0.3)",md:"0 4px 6px -1px rgba(0,0,0,0.4)",lg:"0 10px 15px -3px rgba(0,0,0,0.4)",xl:"0 20px 25px -5px rgba(0,0,0,0.4)"};function L(e,t,r,a,n){return{name:e,darkMode:"light",colors:{...t,surface:t.surface??r.primary,surfaceHover:t.surfaceHover??r.secondary},backgrounds:{...r,elevated:r.elevated??r.primary,inset:r.inset??r.tertiary,canvas:r.canvas??r.primary},text:{...a,inverse:a.inverse??"#ffffff"},borders:lt(n),shadows:Or,spacing:ce,typography:le,transitions:de}}function $(e,t,r,a,n){return{name:e,darkMode:"dark",colors:{...t,surface:t.surface??r.secondary,surfaceHover:t.surfaceHover??r.tertiary},backgrounds:{...r,elevated:r.elevated??r.secondary,inset:r.inset??r.primary,canvas:r.canvas??r.primary},text:{...a,inverse:a.inverse??"#0f172a"},borders:lt(n),shadows:vl,spacing:ce,typography:le,transitions:de}}const Br=L("Slate",{primary:"#64748b",primaryHover:"#475569",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8"},"#cbd5e1"),_r=L("Zinc",{primary:"#71717a",primaryHover:"#52525b",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fafafa",secondary:"#f4f4f5",tertiary:"#e4e4e7",hover:"#e4e4e7"},{primary:"#18181b",secondary:"#3f3f46",muted:"#a1a1aa"},"#d4d4d8"),Wr=L("Stone",{primary:"#78716c",primaryHover:"#57534e",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#1c1917",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1"),Vr=L("Cool Gray",{primary:"#6b7280",primaryHover:"#4b5563",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#d1d5db"),Xr=L("Warm Gray",{primary:"#7c7568",primaryHover:"#5c564c",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf9f7",secondary:"#f5f4f0",tertiary:"#e8e6e1",hover:"#e8e6e1"},{primary:"#1f1d19",secondary:"#4a463d",muted:"#a09888"},"#d4d0c8"),qr=L("Silver",{primary:"#94a3b8",primaryHover:"#64748b",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#38bdf8"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#334155",secondary:"#64748b",muted:"#94a3b8"},"#cbd5e1"),Ur=L("Charcoal",{primary:"#374151",primaryHover:"#1f2937",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#6b7280"},"#d1d5db"),Gr=L("Ivory",{primary:"#92876d",primaryHover:"#7a6f55",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffef7",secondary:"#faf6eb",tertiary:"#f0ead6",hover:"#f0ead6"},{primary:"#2b2517",secondary:"#5c5340",muted:"#9c9280"},"#ddd8c4"),Kr=L("Rose",{primary:"#e11d48",primaryHover:"#be123c",success:"#16a34a",warning:"#ea580c",error:"#dc2626",info:"#0891b2"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f43f5e"},"#fda4af"),Jr=L("Emerald",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#34d399"},"#6ee7b7"),Yr=L("Amber",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0284c7"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#f59e0b"},"#fcd34d"),Qr=L("Violet",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#2e1065",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd"),Zr=L("Teal",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4"),ea=L("Indigo",{primary:"#4f46e5",primaryHover:"#4338ca",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#eef2ff",secondary:"#e0e7ff",tertiary:"#c7d2fe",hover:"#e0e7ff"},{primary:"#1e1b4b",secondary:"#312e81",muted:"#818cf8"},"#a5b4fc"),ta=L("Cyan",{primary:"#0891b2",primaryHover:"#0e7490",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#0284c7"},{primary:"#ecfeff",secondary:"#cffafe",tertiary:"#a5f3fc",hover:"#cffafe"},{primary:"#164e63",secondary:"#155e75",muted:"#22d3ee"},"#67e8f9"),ra=L("Lime",{primary:"#65a30d",primaryHover:"#4d7c0f",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f7fee7",secondary:"#ecfccb",tertiary:"#d9f99d",hover:"#ecfccb"},{primary:"#1a2e05",secondary:"#365314",muted:"#84cc16"},"#bef264"),aa=L("Pink",{primary:"#db2777",primaryHover:"#be185d",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#500724",secondary:"#831843",muted:"#f472b6"},"#f9a8d4"),na=L("Orange",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#7c2d12",muted:"#fb923c"},"#fdba74"),sa=L("Fuchsia",{primary:"#c026d3",primaryHover:"#a21caf",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf4ff",secondary:"#fae8ff",tertiary:"#f5d0fe",hover:"#fae8ff"},{primary:"#4a044e",secondary:"#701a75",muted:"#d946ef"},"#e879f9"),oa=L("Sky",{primary:"#0284c7",primaryHover:"#0369a1",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#075985",muted:"#38bdf8"},"#7dd3fc"),ia=L("Ruby",{primary:"#be123c",primaryHover:"#9f1239",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#fb7185"},"#fda4af"),ca=L("Coral",{primary:"#f97316",primaryHover:"#ea580c",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#fb923c"},"#fdba74"),la=$("Midnight",{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#020617",secondary:"#0f172a",tertiary:"#1e293b",hover:"#1e293b"},{primary:"#f1f5f9",secondary:"#94a3b8",muted:"#475569"},"#1e293b"),da=$("Obsidian",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#facc15",error:"#fb7185",info:"#38bdf8"},{primary:"#09090b",secondary:"#18181b",tertiary:"#27272a",hover:"#27272a"},{primary:"#fafafa",secondary:"#a1a1aa",muted:"#52525b"},"#3f3f46"),ua=$("Eclipse",{primary:"#c084fc",primaryHover:"#a855f7",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#67e8f9"},{primary:"#0c0a1d",secondary:"#1a1533",tertiary:"#2a2248",hover:"#2a2248"},{primary:"#f5f3ff",secondary:"#a78bfa",muted:"#6d5eac"},"#3b3266"),fa=$("Onyx",{primary:"#60a5fa",primaryHover:"#3b82f6",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#000000",secondary:"#0a0a0a",tertiary:"#171717",hover:"#171717"},{primary:"#ffffff",secondary:"#a3a3a3",muted:"#525252"},"#262626"),ma=$("Carbon",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#67e8f9"},{primary:"#161616",secondary:"#262626",tertiary:"#393939",hover:"#393939"},{primary:"#f4f4f4",secondary:"#c6c6c6",muted:"#6f6f6f"},"#525252"),pa=$("Cosmos",{primary:"#6366f1",primaryHover:"#4f46e5",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#030712",secondary:"#111827",tertiary:"#1f2937",hover:"#1f2937"},{primary:"#e5e7eb",secondary:"#9ca3af",muted:"#4b5563"},"#374151"),ga=$("Nebula",{primary:"#e879f9",primaryHover:"#d946ef",success:"#4ade80",warning:"#fbbf24",error:"#fb7185",info:"#67e8f9"},{primary:"#0d0117",secondary:"#1a0533",tertiary:"#2d0a52",hover:"#2d0a52"},{primary:"#fae8ff",secondary:"#d8b4fe",muted:"#7c3aed"},"#581c87"),ya=$("Abyss",{primary:"#22d3ee",primaryHover:"#06b6d4",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#001219",secondary:"#002a3a",tertiary:"#003e54",hover:"#003e54"},{primary:"#e0f2fe",secondary:"#7dd3fc",muted:"#0369a1"},"#075985"),ha=$("Shadow",{primary:"#a3a3a3",primaryHover:"#737373",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#38bdf8"},{primary:"#171717",secondary:"#1f1f1f",tertiary:"#2a2a2a",hover:"#2a2a2a"},{primary:"#e5e5e5",secondary:"#a3a3a3",muted:"#525252"},"#404040"),ba=$("Emerald Dark",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#022c22",secondary:"#064e3b",tertiary:"#065f46",hover:"#065f46"},{primary:"#ecfdf5",secondary:"#6ee7b7",muted:"#047857"},"#047857"),Sa=L("Forest",{primary:"#166534",primaryHover:"#14532d",success:"#22c55e",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac"),xa=L("Ocean",{primary:"#0369a1",primaryHover:"#075985",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#38bdf8"},"#7dd3fc"),va=L("Desert",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#422006",secondary:"#713f12",muted:"#ca8a04"},"#fde047"),wa=L("Sunset",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#f97316"},"#fdba74"),ka=L("Aurora",{primary:"#0d9488",primaryHover:"#0f766e",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4"),Ca=L("Lavender",{primary:"#7e22ce",primaryHover:"#6b21a8",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#3b0764",secondary:"#581c87",muted:"#a855f7"},"#d8b4fe"),Ma=L("Autumn",{primary:"#c2410c",primaryHover:"#9a3412",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#7f1d1d",muted:"#f87171"},"#fca5a5"),Aa=L("Spring",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#14532d",secondary:"#166534",muted:"#4ade80"},"#86efac"),Ea=L("Arctic",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd"),Na=L("Tropical",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0"),Ta=L("Pastel Rose",{primary:"#f472b6",primaryHover:"#ec4899",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#f9a8d4"),La=L("Pastel Sky",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#075985",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd"),Ia=L("Pastel Mint",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#065f46",secondary:"#047857",muted:"#6ee7b7"},"#a7f3d0"),Ra=L("Pastel Peach",{primary:"#fb923c",primaryHover:"#f97316",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#7c2d12",secondary:"#9a3412",muted:"#fdba74"},"#fed7aa"),za=L("Pastel Lavender",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#4c1d95",secondary:"#5b21b6",muted:"#c4b5fd"},"#ddd6fe"),Fa=L("Pastel Lemon",{primary:"#facc15",primaryHover:"#eab308",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#713f12",secondary:"#854d0e",muted:"#fde047"},"#fef08a"),Pa=L("Pastel Sage",{primary:"#86efac",primaryHover:"#4ade80",success:"#22c55e",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#166534",secondary:"#15803d",muted:"#86efac"},"#bbf7d0"),Ha=L("Pastel Coral",{primary:"#fb7185",primaryHover:"#f43f5e",success:"#4ade80",warning:"#fcd34d",error:"#ef4444",info:"#67e8f9"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#881337",secondary:"#9f1239",muted:"#fda4af"},"#fecdd3"),Da=L("Banking",{primary:"#1e3a5f",primaryHover:"#152c4a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#334155",muted:"#94a3b8"},"#cbd5e1"),$a=L("Healthcare",{primary:"#0891b2",primaryHover:"#0e7490",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#e0f7fa",tertiary:"#b2ebf2",hover:"#e0f7fa"},{primary:"#134e4a",secondary:"#1a6b6a",muted:"#80cbc4"},"#b2dfdb"),ja=L("Legal",{primary:"#1e293b",primaryHover:"#0f172a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#0f172a",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1"),Oa=L("Tech Startup",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#1e1b4b",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd"),Ba=L("Enterprise",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#60a5fa"},"#93c5fd"),_a=L("Government",{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#1e293b",muted:"#64748b"},"#cbd5e1"),Wa=L("Education",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#0891b2"},{primary:"#f0fdf9",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0"),Va=L("Real Estate",{primary:"#92400e",primaryHover:"#78350f",success:"#059669",warning:"#b45309",error:"#dc2626",info:"#0891b2"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#422006",secondary:"#713f12",muted:"#d97706"},"#fcd34d"),Xa=L("Nord",{primary:"#5e81ac",primaryHover:"#4c6b90",success:"#a3be8c",warning:"#ebcb8b",error:"#bf616a",info:"#88c0d0"},{primary:"#eceff4",secondary:"#e5e9f0",tertiary:"#d8dee9",hover:"#d8dee9"},{primary:"#2e3440",secondary:"#3b4252",muted:"#4c566a"},"#d8dee9"),qa=$("Dracula",{primary:"#bd93f9",primaryHover:"#9d79d9",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#8be9fd"},{primary:"#282a36",secondary:"#343746",tertiary:"#44475a",hover:"#44475a"},{primary:"#f8f8f2",secondary:"#c0c0c0",muted:"#6272a4"},"#44475a"),Ua=L("Solarized Light",{primary:"#268bd2",primaryHover:"#1a6da0",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#fdf6e3",secondary:"#eee8d5",tertiary:"#e0dbc7",hover:"#eee8d5"},{primary:"#073642",secondary:"#586e75",muted:"#93a1a1"},"#eee8d5"),Ga=$("Solarized Dark",{primary:"#268bd2",primaryHover:"#3d98db",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#002b36",secondary:"#073642",tertiary:"#0a4858",hover:"#073642"},{primary:"#eee8d5",secondary:"#93a1a1",muted:"#586e75"},"#073642"),Ka=$("Monokai",{primary:"#66d9ef",primaryHover:"#45c0d6",success:"#a6e22e",warning:"#e6db74",error:"#f92672",info:"#66d9ef"},{primary:"#272822",secondary:"#34352e",tertiary:"#3e3d32",hover:"#3e3d32"},{primary:"#f8f8f2",secondary:"#cfcfc2",muted:"#75715e"},"#3e3d32"),Ja=$("One Dark",{primary:"#61afef",primaryHover:"#4b9ee0",success:"#98c379",warning:"#e5c07b",error:"#e06c75",info:"#56b6c2"},{primary:"#282c34",secondary:"#2c313a",tertiary:"#353b45",hover:"#353b45"},{primary:"#abb2bf",secondary:"#828997",muted:"#545862"},"#3e4452"),Ya=$("Synthwave",{primary:"#ff7edb",primaryHover:"#e660c2",success:"#72f1b8",warning:"#fede5d",error:"#fe4450",info:"#36f9f6"},{primary:"#241b2f",secondary:"#2d2140",tertiary:"#362a50",hover:"#362a50"},{primary:"#f0e4fc",secondary:"#b4a0cc",muted:"#6c5c84"},"#4a3866"),Qa=L("Vaporwave",{primary:"#ff71ce",primaryHover:"#e655b5",success:"#78dcca",warning:"#ffb86c",error:"#ff5555",info:"#76e8fc"},{primary:"#fce4f7",secondary:"#e8d0f4",tertiary:"#d4bcf0",hover:"#e8d0f4"},{primary:"#4a1a4e",secondary:"#7b3f7d",muted:"#c080c0"},"#d8a8e8"),Za=$("Terminal Green",{primary:"#00ff41",primaryHover:"#00cc34",success:"#00ff41",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0a0a0a",secondary:"#0d1a0d",tertiary:"#1a2e1a",hover:"#1a2e1a"},{primary:"#00ff41",secondary:"#00cc33",muted:"#008822"},"#003300"),en=L("Sepia",{primary:"#8b6914",primaryHover:"#704f10",success:"#6b8e23",warning:"#cd853f",error:"#b22222",info:"#5f9ea0"},{primary:"#faf0e6",secondary:"#f5e6d3",tertiary:"#eddcc7",hover:"#f5e6d3"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#d7ccc8"),tn=L("Vintage",{primary:"#8d6e63",primaryHover:"#6d4c41",success:"#66bb6a",warning:"#ffb300",error:"#e53935",info:"#29b6f6"},{primary:"#efebe9",secondary:"#d7ccc8",tertiary:"#bcaaa4",hover:"#d7ccc8"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#bcaaa4"),rn=$("Cyberpunk",{primary:"#00f0ff",primaryHover:"#00c8d4",success:"#39ff14",warning:"#ffff00",error:"#ff003c",info:"#bf00ff"},{primary:"#0a0e17",secondary:"#131824",tertiary:"#1c2333",hover:"#1c2333"},{primary:"#e0fbfc",secondary:"#80d4dd",muted:"#3a6b72"},"#1c3a44"),an=$("Neon",{primary:"#ff00ff",primaryHover:"#cc00cc",success:"#00ff00",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0d0d0d",secondary:"#1a1a1a",tertiary:"#262626",hover:"#262626"},{primary:"#ffffff",secondary:"#cccccc",muted:"#666666"},"#333333"),nn=$("Retrowave",{primary:"#f77fbe",primaryHover:"#e462a3",success:"#72f1b8",warning:"#ffe261",error:"#ff4444",info:"#79e8fb"},{primary:"#1b0a2e",secondary:"#261440",tertiary:"#321e52",hover:"#321e52"},{primary:"#ffe6f7",secondary:"#c9a0c9",muted:"#6b4c7a"},"#4a2d66"),sn=L("Christmas",{primary:"#c41e3a",primaryHover:"#a01830",success:"#228b22",warning:"#ffd700",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0"),on=$("Halloween",{primary:"#ff6600",primaryHover:"#e05500",success:"#4ade80",warning:"#fbbf24",error:"#ff0000",info:"#9333ea"},{primary:"#1a0a00",secondary:"#2d1500",tertiary:"#402000",hover:"#402000"},{primary:"#ffedd5",secondary:"#fdba74",muted:"#9a5c28"},"#5c3400"),cn=L("Valentine",{primary:"#e11d48",primaryHover:"#be123c",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#ec4899"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f9a8d4"},"#fda4af"),ln=L("Easter",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fef9ff",secondary:"#f3e8ff",tertiary:"#e8d5ff",hover:"#f3e8ff"},{primary:"#581c87",secondary:"#6d28d9",muted:"#c4b5fd"},"#ddd6fe"),dn=L("Summer Beach",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#fcd34d"),un=L("Winter Frost",{primary:"#3b82f6",primaryHover:"#2563eb",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#93c5fd"},"#bfdbfe"),fn=L("Cherry Blossom",{primary:"#ec4899",primaryHover:"#db2777",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#fbcfe8"),mn=L("Harvest",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#d97706"},"#fcd34d"),pn=L("Japanese Zen",{primary:"#6b7280",primaryHover:"#4b5563",success:"#6b8e23",warning:"#d4a017",error:"#c0392b",info:"#5f9ea0"},{primary:"#faf9f6",secondary:"#f0ece3",tertiary:"#e6e0d4",hover:"#f0ece3"},{primary:"#2c2c2c",secondary:"#5c5c5c",muted:"#a0998a"},"#d5cec0"),gn=L("Moroccan",{primary:"#c2410c",primaryHover:"#9a3412",success:"#15803d",warning:"#ca8a04",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbf0",secondary:"#fef3e0",tertiary:"#fde6c4",hover:"#fef3e0"},{primary:"#3a1a00",secondary:"#7c2d12",muted:"#d97706"},"#f5d0a0"),yn=L("Scandinavian",{primary:"#4b5563",primaryHover:"#374151",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ffffff",secondary:"#f9fafb",tertiary:"#f3f4f6",hover:"#f3f4f6"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#e5e7eb"),hn=L("Mediterranean",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#2563eb",muted:"#93c5fd"},"#bfdbfe"),bn=L("Chinese New Year",{primary:"#dc2626",primaryHover:"#b91c1c",success:"#16a34a",warning:"#d4a017",error:"#ef4444",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#991b1b",muted:"#f87171"},"#fca5a5"),Sn=L("Indian Festive",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#7c3aed"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#92400e",muted:"#f59e0b"},"#fcd34d"),xn=L("Brazilian Carnival",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#facc15",error:"#ef4444",info:"#0ea5e9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac"),vn=L("African Earth",{primary:"#92400e",primaryHover:"#78350f",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf5f0",secondary:"#f0e6d6",tertiary:"#e6d5bb",hover:"#f0e6d6"},{primary:"#2b1a0e",secondary:"#5c3d1e",muted:"#a08060"},"#d4b896"),wn=$("High Contrast Dark",{primary:"#ffff00",primaryHover:"#cccc00",success:"#00ff00",warning:"#ff8c00",error:"#ff0000",info:"#00ffff"},{primary:"#000000",secondary:"#1a1a1a",tertiary:"#333333",hover:"#333333"},{primary:"#ffffff",secondary:"#ffffff",muted:"#cccccc"},"#ffffff"),kn=L("Monochrome",{primary:"#404040",primaryHover:"#262626",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fafafa",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0"},{primary:"#1a1a1a",secondary:"#404040",muted:"#808080"},"#c0c0c0"),Cn=L("Enhanced Contrast",{primary:"#0050b3",primaryHover:"#003d8c",success:"#006400",warning:"#cc7000",error:"#cc0000",info:"#006680"},{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#ebebeb"},{primary:"#000000",secondary:"#1a1a1a",muted:"#595959"},"#8c8c8c"),Mn={name:"Large Text",darkMode:"light",colors:{primary:"#2563eb",primaryHover:"#1d4ed8",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2",surface:"#ffffff",surfaceHover:"#f8fafc"},backgrounds:{primary:"#ffffff",secondary:"#f8fafc",tertiary:"#f1f5f9",hover:"#f1f5f9",elevated:"#ffffff",inset:"#f1f5f9",canvas:"#ffffff"},text:{primary:"#0f172a",secondary:"#475569",muted:"#94a3b8",inverse:"#ffffff"},borders:lt("#e2e8f0"),shadows:Or,spacing:{space1:"6px",space2:"12px",space3:"16px",space4:"20px",space5:"24px",space6:"32px",space8:"40px"},typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.875rem",fontSizeSm:"1rem",fontSizeMd:"1.125rem",fontSizeLg:"1.25rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6},transitions:de},An={name:"Glassmorphism",darkMode:"light",colors:{primary:"#6366f1",primaryHover:"#4f46e5",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",surface:"rgba(255,255,255,0.7)",surfaceHover:"rgba(255,255,255,0.5)"},backgrounds:{primary:"rgba(255,255,255,0.7)",secondary:"rgba(255,255,255,0.5)",tertiary:"rgba(255,255,255,0.3)",hover:"rgba(255,255,255,0.5)",elevated:"rgba(255,255,255,0.8)",inset:"rgba(255,255,255,0.3)",canvas:"rgba(255,255,255,0.7)"},text:{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8",inverse:"#ffffff"},borders:{color:"rgba(255,255,255,0.3)",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"24px",radiusFull:"9999px"},shadows:{sm:"0 2px 8px rgba(0,0,0,0.04)",md:"0 4px 16px rgba(0,0,0,0.08)",lg:"0 8px 32px rgba(0,0,0,0.12)",xl:"0 16px 48px rgba(0,0,0,0.16)"},spacing:ce,typography:le,transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},En={name:"Neumorphism Light",darkMode:"light",colors:{primary:"#6366f1",primaryHover:"#4f46e5",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",surface:"#e0e5ec",surfaceHover:"#d5dae2"},backgrounds:{primary:"#e0e5ec",secondary:"#d5dae2",tertiary:"#ccd1d9",hover:"#d5dae2",elevated:"#e0e5ec",inset:"#ccd1d9",canvas:"#e0e5ec"},text:{primary:"#2d3748",secondary:"#4a5568",muted:"#718096",inverse:"#ffffff"},borders:{color:"#d0d5dd",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"3px 3px 6px #b8bec7, -3px -3px 6px #ffffff",md:"5px 5px 10px #b8bec7, -5px -5px 10px #ffffff",lg:"8px 8px 16px #b8bec7, -8px -8px 16px #ffffff",xl:"12px 12px 24px #b8bec7, -12px -12px 24px #ffffff"},spacing:ce,typography:le,transitions:de},Nn={name:"Neumorphism Dark",darkMode:"dark",colors:{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee",surface:"#283141",surfaceHover:"#232b3a"},backgrounds:{primary:"#2d3748",secondary:"#283141",tertiary:"#232b3a",hover:"#283141",elevated:"#283141",inset:"#2d3748",canvas:"#2d3748"},text:{primary:"#e2e8f0",secondary:"#a0aec0",muted:"#718096",inverse:"#0f172a"},borders:{color:"#3a4556",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"3px 3px 6px #1a202c, -3px -3px 6px #404d64",md:"5px 5px 10px #1a202c, -5px -5px 10px #404d64",lg:"8px 8px 16px #1a202c, -8px -8px 16px #404d64",xl:"12px 12px 24px #1a202c, -12px -12px 24px #404d64"},spacing:ce,typography:le,transitions:de},Tn=L("Minimalist",{primary:"#18181b",primaryHover:"#27272a",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#3b82f6"},{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f5f5f5"},{primary:"#0a0a0a",secondary:"#404040",muted:"#a3a3a3"},"#e5e5e5"),Ln=$("Warm Dark",{primary:"#f59e0b",primaryHover:"#d97706",success:"#10b981",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#1c1917",secondary:"#292524",tertiary:"#44403c",hover:"#44403c"},{primary:"#fafaf9",secondary:"#d6d3d1",muted:"#78716c"},"#57534e"),In=$("Soft Dark",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#34d399",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#1e1e2e",secondary:"#262637",tertiary:"#313147",hover:"#313147"},{primary:"#e8e8f0",secondary:"#a0a0b8",muted:"#5c5c74"},"#3e3e58"),Rn=L("Coffee",{primary:"#6f4e37",primaryHover:"#5c3d28",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf6f1",secondary:"#f0e8dc",tertiary:"#e6d8c6",hover:"#f0e8dc"},{primary:"#2c1a0e",secondary:"#5c3d28",muted:"#a08868"},"#d4c4a8"),zn=L("Wine",{primary:"#7f1d1d",primaryHover:"#641717",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0"),Fn=[Br,_r,Wr,Vr,Xr,qr,Ur,Gr,Kr,Jr,Yr,Qr,Zr,ea,ta,ra,aa,na,sa,oa,ia,ca,la,da,ua,fa,ma,pa,ga,ya,ha,ba,Sa,xa,va,wa,ka,Ca,Ma,Aa,Ea,Na,Ta,La,Ia,Ra,za,Fa,Pa,Ha,Da,$a,ja,Oa,Ba,_a,Wa,Va,Xa,qa,Ua,Ga,Ka,Ja,Ya,Qa,Za,en,tn,rn,an,nn,sn,on,cn,ln,dn,un,fn,mn,pn,gn,yn,hn,bn,Sn,xn,vn,wn,kn,Cn,Mn,An,En,Nn,Tn,Ln,In,Rn,zn],Z={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Ie={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},ue={color:"#e2e8f0",radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},fe={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},Pn={name:"Light",darkMode:"light",colors:{primary:"#3b82f6",primaryHover:"#2563eb",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",surface:"#ffffff",surfaceHover:"#f8fafc"},backgrounds:{primary:"#ffffff",secondary:"#f8fafc",tertiary:"#f1f5f9",hover:"#f1f5f9",elevated:"#ffffff",inset:"#f1f5f9",canvas:"#f8fafc"},text:{primary:"#0f172a",secondary:"#475569",muted:"#94a3b8",inverse:"#ffffff"},borders:ue,shadows:{sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},spacing:Z,typography:Ie,transitions:fe},Hn={name:"Dark",darkMode:"dark",colors:{primary:"#3b82f6",primaryHover:"#60a5fa",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4",surface:"#141414",surfaceHover:"#1e1e1e"},backgrounds:{primary:"#0a0a0a",secondary:"#141414",tertiary:"#1e1e1e",hover:"#1a1a1a",elevated:"#141414",inset:"#0a0a0a",canvas:"#0a0a0a"},text:{primary:"#ffffff",secondary:"#a1a1a1",muted:"#6b6b6b",inverse:"#0f172a"},borders:{...ue,color:"#2a2a2a"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.5)",md:"0 4px 6px -1px rgba(0,0,0,0.6)",lg:"0 10px 15px -3px rgba(0,0,0,0.6)",xl:"0 20px 25px -5px rgba(0,0,0,0.6)"},spacing:Z,typography:Ie,transitions:fe},Dn={name:"Blue",colors:{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2",surface:"#eff6ff",surfaceHover:"#dbeafe"},backgrounds:{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe",elevated:"#ffffff",inset:"#dbeafe",canvas:"#eff6ff"},text:{primary:"#1e3a5f",secondary:"#3b628a",muted:"#7da0c4",inverse:"#ffffff"},borders:{...ue,color:"#93c5fd"},shadows:{sm:"0 1px 2px rgba(29,78,216,0.08)",md:"0 4px 6px -1px rgba(29,78,216,0.12)",lg:"0 10px 15px -3px rgba(29,78,216,0.15)",xl:"0 20px 25px -5px rgba(29,78,216,0.18)"},spacing:Z,typography:Ie,transitions:fe},$n={name:"High Contrast",colors:{primary:"#0000ff",primaryHover:"#0000cc",success:"#008000",warning:"#ff8c00",error:"#ff0000",info:"#008b8b",surface:"#ffffff",surfaceHover:"#f0f0f0"},backgrounds:{primary:"#ffffff",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0",elevated:"#ffffff",inset:"#e0e0e0",canvas:"#ffffff"},text:{primary:"#000000",secondary:"#1a1a1a",muted:"#4d4d4d",inverse:"#ffffff"},borders:{...ue,color:"#000000"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.15)",md:"0 4px 6px rgba(0,0,0,0.2)",lg:"0 10px 15px rgba(0,0,0,0.25)",xl:"0 20px 25px rgba(0,0,0,0.3)"},spacing:Z,typography:Ie,transitions:fe},jn={name:"Material",colors:{primary:"#6750a4",primaryHover:"#4f378b",success:"#386a20",warning:"#7c5800",error:"#ba1a1a",info:"#00629e",surface:"#fffbfe",surfaceHover:"#f6edff"},backgrounds:{primary:"#fffbfe",secondary:"#f6edff",tertiary:"#ece6f0",hover:"#eaddff",elevated:"#ffffff",inset:"#ece6f0",canvas:"#fffbfe"},text:{primary:"#1c1b1f",secondary:"#49454f",muted:"#79747e",inverse:"#ffffff"},borders:{...ue,color:"#cac4d0",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"28px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.15)",md:"0 1px 2px rgba(0,0,0,0.3), 0 2px 6px 2px rgba(0,0,0,0.15)",lg:"0 4px 8px 3px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.3)",xl:"0 6px 10px 4px rgba(0,0,0,0.15), 0 2px 3px rgba(0,0,0,0.3)"},spacing:Z,typography:{fontFamily:"'Roboto', 'Noto Sans', system-ui, sans-serif",fontSizeXs:"0.6875rem",fontSizeSm:"0.75rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},transitions:{fast:"100ms cubic-bezier(0.2,0,0,1)",normal:"200ms cubic-bezier(0.2,0,0,1)",slow:"300ms cubic-bezier(0.2,0,0,1)"}},On={name:"Bootstrap",colors:{primary:"#0d6efd",primaryHover:"#0b5ed7",success:"#198754",warning:"#ffc107",error:"#dc3545",info:"#0dcaf0",surface:"#ffffff",surfaceHover:"#f8f9fa"},backgrounds:{primary:"#ffffff",secondary:"#f8f9fa",tertiary:"#e9ecef",hover:"#e9ecef",elevated:"#ffffff",inset:"#e9ecef",canvas:"#f8f9fa"},text:{primary:"#212529",secondary:"#6c757d",muted:"#adb5bd",inverse:"#ffffff"},borders:{color:"#dee2e6",radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"16px",radiusFull:"50rem"},shadows:{sm:"0 0.125rem 0.25rem rgba(0,0,0,0.075)",md:"0 0.5rem 1rem rgba(0,0,0,0.15)",lg:"0 1rem 3rem rgba(0,0,0,0.175)",xl:"0 1rem 3rem rgba(0,0,0,0.25)"},spacing:Z,typography:{fontFamily:"system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.25rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},transitions:fe},Bn={name:"Fluent",colors:{primary:"#0078d4",primaryHover:"#106ebe",success:"#107c10",warning:"#fce100",error:"#d13438",info:"#00b7c3",surface:"#ffffff",surfaceHover:"#faf9f8"},backgrounds:{primary:"#ffffff",secondary:"#faf9f8",tertiary:"#f3f2f1",hover:"#edebe9",elevated:"#ffffff",inset:"#f3f2f1",canvas:"#faf9f8"},text:{primary:"#323130",secondary:"#605e5c",muted:"#a19f9d",inverse:"#ffffff"},borders:{color:"#e1dfdd",radiusSm:"2px",radiusMd:"4px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},shadows:{sm:"0 1.6px 3.6px 0 rgba(0,0,0,0.132), 0 0.3px 0.9px 0 rgba(0,0,0,0.108)",md:"0 3.2px 7.2px 0 rgba(0,0,0,0.132), 0 0.6px 1.8px 0 rgba(0,0,0,0.108)",lg:"0 6.4px 14.4px 0 rgba(0,0,0,0.132), 0 1.2px 3.6px 0 rgba(0,0,0,0.108)",xl:"0 25.6px 57.6px 0 rgba(0,0,0,0.22), 0 4.8px 14.4px 0 rgba(0,0,0,0.18)"},spacing:Z,typography:{fontFamily:"'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, sans-serif",fontSizeXs:"10px",fontSizeSm:"12px",fontSizeMd:"14px",fontSizeLg:"16px",fontSizeXl:"20px",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.42857},transitions:{fast:"100ms cubic-bezier(0.1,0.9,0.2,1)",normal:"200ms cubic-bezier(0.1,0.9,0.2,1)",slow:"300ms cubic-bezier(0.1,0.9,0.2,1)"}},wl=[Pn,Hn,Dn,$n,jn,On,Bn,...Fn],kl=["https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Work+Sans:wght@400;500;600&display=swap","https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap","https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;600&display=swap","https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:wght@400;700&family=DM+Sans:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap"],Cl={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},K={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},dt={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},_n={meta:{id:"obsidianEditorial",name:"Obsidian Editorial",tagline:"Dark-mode magazine — serif display, razor borders, grain.",tags:["dark","editorial","serif"]},theme:{name:"Obsidian Editorial",darkMode:"dark",colors:{primary:"#e8dcc4",primaryHover:"#d4c29c",success:"#7fb069",warning:"#e6aa68",error:"#d65a5a",info:"#88aabb",accent:"#c98a5b",focus:"#e8dcc4",surface:"#1a1715",surfaceHover:"#221e1b"},backgrounds:{primary:"#0e0c0b",secondary:"#1a1715",tertiary:"#221e1b",hover:"#2a2522",elevated:"#1a1715",inset:"#0b0908",canvas:"#0e0c0b"},text:{primary:"#ede4d1",secondary:"#a39787",muted:"#6b6055",inverse:"#0e0c0b"},borders:{color:"#332d28",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px",width:"1px",divider:"#28231f"},shadows:{sm:"none",md:"0 1px 0 0 rgba(232,220,196,0.04)",lg:"0 2px 0 0 rgba(232,220,196,0.06)",xl:"0 4px 0 0 rgba(232,220,196,0.08)"},spacing:dt,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Fraunces', 'Playfair Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', ui-monospace, monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.005em",headingLetterSpacing:"-0.02em"},transitions:{fast:"80ms cubic-bezier(0.4,0,0.2,1)",normal:"140ms cubic-bezier(0.4,0,0.2,1)",slow:"220ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.35,blendMode:"overlay"}},displayStyle:"editorial",variantConfig:{density:"comfortable",animation:"subtle"}},Wn={meta:{id:"neonArcade",name:"Neon Arcade",tagline:"Phosphor-green terminal glow on absolute black.",tags:["dark","retro","mono","terminal"]},theme:{name:"Neon Arcade",darkMode:"dark",colors:{primary:"#39ff14",primaryHover:"#50ff35",success:"#39ff14",warning:"#ffcc00",error:"#ff3355",info:"#00e5ff",accent:"#ff00aa",focus:"#39ff14",surface:"#060a06",surfaceHover:"#0b140b"},backgrounds:{primary:"#000000",secondary:"#060a06",tertiary:"#0b140b",hover:"#12241a",elevated:"#060a06",inset:"#000000",canvas:"#000000"},text:{primary:"#c8ffb8",secondary:"#7be368",muted:"#3e7a39",inverse:"#000000"},borders:{color:"#1d3a1d",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0",width:"1px",divider:"#143014",focusColor:"#39ff14"},shadows:{sm:"0 0 4px rgba(57,255,20,0.3)",md:"0 0 10px rgba(57,255,20,0.35), 0 0 2px rgba(57,255,20,0.6)",lg:"0 0 22px rgba(57,255,20,0.4), 0 0 4px rgba(57,255,20,0.7)",xl:"0 0 40px rgba(57,255,20,0.5), 0 0 8px rgba(57,255,20,0.8)",glow:"0 0 30px #39ff14, 0 0 60px rgba(57,255,20,0.4)"},spacing:K,typography:{fontFamily:"'JetBrains Mono', 'Fira Code', ui-monospace, monospace",headingFontFamily:"'JetBrains Mono', monospace",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.08em"},transitions:{fast:"60ms steps(4, end)",normal:"120ms steps(6, end)",slow:"200ms steps(8, end)"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.25}},displayStyle:"terminal",variantConfig:{radius:"none",shadow:"glow",density:"compact",animation:"subtle"}},Vn={meta:{id:"hyggeScandinavian",name:"Hygge Scandinavian",tagline:"Warm cream, generous breathing room, soft serif display.",tags:["light","warm","serif","spacious"]},theme:{name:"Hygge Scandinavian",darkMode:"light",colors:{primary:"#8b6f47",primaryHover:"#6f5738",success:"#6b8e4e",warning:"#d49a3e",error:"#b84c4c",info:"#6a8aad",accent:"#c98754",focus:"#8b6f47",surface:"#fbf6ed",surfaceHover:"#f3ecdf"},backgrounds:{primary:"#fdf9f1",secondary:"#f5eee0",tertiary:"#ede3d0",hover:"#e8ddc8",elevated:"#ffffff",inset:"#f0e7d4",canvas:"#fdf9f1"},text:{primary:"#3a2f22",secondary:"#6a5845",muted:"#9c8c76",inverse:"#fdf9f1"},borders:{color:"#d9cbb0",radiusSm:"8px",radiusMd:"14px",radiusLg:"22px",radiusXl:"32px",radiusFull:"9999px",width:"1px",divider:"#e8ddc8"},shadows:{sm:"0 1px 2px rgba(122,92,58,0.05)",md:"0 6px 16px -4px rgba(122,92,58,0.08)",lg:"0 16px 32px -10px rgba(122,92,58,0.10)",xl:"0 28px 56px -18px rgba(122,92,58,0.14)"},spacing:dt,typography:{fontFamily:"'Work Sans', -apple-system, sans-serif",headingFontFamily:"'Cormorant Garamond', Georgia, serif",monoFontFamily:"ui-monospace, 'SF Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.7,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"160ms cubic-bezier(0.16,1,0.3,1)",normal:"260ms cubic-bezier(0.16,1,0.3,1)",slow:"400ms cubic-bezier(0.16,1,0.3,1)"}},displayStyle:"scandinavian",variantConfig:{density:"spacious",animation:"normal"}},Xn={meta:{id:"brutalistRaw",name:"Brutalist Raw",tagline:"Paper + ink + hard shadows — zero blur, zero mercy.",tags:["light","brutalist","experimental"]},theme:{name:"Brutalist Raw",darkMode:"light",colors:{primary:"#ff3b30",primaryHover:"#000000",success:"#00aa55",warning:"#ffcc00",error:"#ff0000",info:"#0066ff",accent:"#ffcc00",focus:"#ff3b30",surface:"#ffffff",surfaceHover:"#f5f3ee"},backgrounds:{primary:"#f5f3ee",secondary:"#ffffff",tertiary:"#e8e4d8",hover:"#e0dcd0",elevated:"#ffffff",inset:"#e8e4d8",canvas:"#f5f3ee"},text:{primary:"#000000",secondary:"#1a1a1a",muted:"#555555",inverse:"#ffffff"},borders:{color:"#000000",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0",width:"2px",divider:"#000000"},shadows:{sm:"3px 3px 0 0 #000000",md:"6px 6px 0 0 #000000",lg:"10px 10px 0 0 #000000",xl:"14px 14px 0 0 #000000"},spacing:K,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Archivo Black', 'Archivo', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:500,fontWeightMedium:700,fontWeightSemibold:700,fontWeightBold:900,lineHeight:1.4,letterSpacing:"-0.01em",headingLetterSpacing:"-0.04em"},transitions:{fast:"0ms linear",normal:"80ms cubic-bezier(0.2,0,0,1)",slow:"140ms cubic-bezier(0.2,0,0,1)"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"subtle"}},qn={meta:{id:"glassAurora",name:"Glass Aurora",tagline:"Frosted translucency floating over aurora light.",tags:["light","glass","modern","gradient"]},theme:{name:"Glass Aurora",darkMode:"light",colors:{primary:"#5b5bff",primaryHover:"#4343e8",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",accent:"#ec4899",focus:"#5b5bff",surface:"rgba(255,255,255,0.55)",surfaceHover:"rgba(255,255,255,0.75)"},backgrounds:{primary:"rgba(255,255,255,0.55)",secondary:"rgba(255,255,255,0.35)",tertiary:"rgba(255,255,255,0.22)",hover:"rgba(255,255,255,0.7)",elevated:"rgba(255,255,255,0.8)",inset:"rgba(255,255,255,0.3)",canvas:"#e8d6ff"},text:{primary:"#1a1440",secondary:"#443c78",muted:"#8b83b8",inverse:"#ffffff"},borders:{color:"rgba(255,255,255,0.6)",radiusSm:"10px",radiusMd:"16px",radiusLg:"24px",radiusXl:"36px",radiusFull:"9999px",width:"1px",divider:"rgba(255,255,255,0.4)"},shadows:{sm:"0 2px 12px rgba(91,91,255,0.08)",md:"0 8px 32px rgba(91,91,255,0.12)",lg:"0 18px 56px rgba(236,72,153,0.18)",xl:"0 32px 80px rgba(91,91,255,0.22)"},spacing:K,typography:{fontFamily:"'Outfit', -apple-system, sans-serif",headingFontFamily:"'Outfit', sans-serif",monoFontFamily:"ui-monospace, monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"-0.005em",headingLetterSpacing:"-0.025em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"400ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 12% 18%, #ffd6e8 0%, transparent 48%), radial-gradient(at 88% 22%, #c8d8ff 0%, transparent 52%), radial-gradient(at 42% 86%, #d8ffe8 0%, transparent 50%), linear-gradient(180deg, #eee4ff 0%, #ffe8f2 100%)"}},displayStyle:"glass",variantConfig:{density:"normal",animation:"normal"}},Un={meta:{id:"candyPop",name:"Candy Pop",tagline:"Bubblegum pastels, pill shapes, bouncy easing.",tags:["light","playful","pastel","pill"]},theme:{name:"Candy Pop",darkMode:"light",colors:{primary:"#ff4fa3",primaryHover:"#ff2d8e",success:"#3dd68c",warning:"#ffd63d",error:"#ff5577",info:"#4ec8ff",accent:"#b85bff",focus:"#ff4fa3",surface:"#ffffff",surfaceHover:"#fff5fa"},backgrounds:{primary:"#fff5fa",secondary:"#ffeaf3",tertiary:"#ffd8e9",hover:"#ffc4dc",elevated:"#ffffff",inset:"#ffeaf3",canvas:"#fff8f5"},text:{primary:"#531645",secondary:"#8b3a70",muted:"#c678a8",inverse:"#ffffff"},borders:{color:"#ffc4dc",radiusSm:"9999px",radiusMd:"9999px",radiusLg:"9999px",radiusXl:"9999px",radiusFull:"9999px",width:"2px",divider:"#ffd8e9"},shadows:{sm:"0 2px 0 0 #ffc4dc",md:"0 4px 0 0 #ffa3c7",lg:"0 6px 16px rgba(255,79,163,0.2), 0 3px 0 0 #ff4fa3",xl:"0 12px 28px rgba(255,79,163,0.25)"},spacing:K,typography:{fontFamily:"'Quicksand', -apple-system, sans-serif",headingFontFamily:"'Nunito', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"140ms cubic-bezier(0.34,1.56,0.64,1)",normal:"240ms cubic-bezier(0.34,1.56,0.64,1)",slow:"380ms cubic-bezier(0.34,1.56,0.64,1)"}},displayStyle:"pill",variantConfig:{radius:"full",density:"comfortable",animation:"playful"}},Gn={meta:{id:"newspaperBroadsheet",name:"Newspaper Broadsheet",tagline:"Ivory paper, hairline rules, serif gravity.",tags:["light","editorial","serif","print"]},theme:{name:"Newspaper Broadsheet",darkMode:"light",colors:{primary:"#1a1a1a",primaryHover:"#000000",success:"#2d5016",warning:"#8b6914",error:"#8b0000",info:"#1d3a5f",accent:"#8b0000",focus:"#1a1a1a",surface:"#fbf7ee",surfaceHover:"#f3ecdd"},backgrounds:{primary:"#fbf7ee",secondary:"#f5eedb",tertiary:"#ede4cc",hover:"#e8ddbe",elevated:"#fbf7ee",inset:"#f0e7d0",canvas:"#fbf7ee"},text:{primary:"#14110c",secondary:"#3d362a",muted:"#7a6f58",inverse:"#fbf7ee"},borders:{color:"#14110c",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px",width:"1px",divider:"#14110c"},shadows:{sm:"none",md:"none",lg:"none",xl:"none"},spacing:K,typography:{fontFamily:"'Fraunces', 'Source Serif Pro', Georgia, serif",headingFontFamily:"'Fraunces', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.01em",headingLetterSpacing:"-0.025em"},transitions:{fast:"0ms",normal:"100ms linear",slow:"180ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.18,blendMode:"multiply"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"none",density:"normal"}},Kn={meta:{id:"synthwave84",name:"Synthwave 84",tagline:"Magenta & cyan pulse over deep navy — 1984 forever.",tags:["dark","retro","neon","80s"]},theme:{name:"Synthwave 84",darkMode:"dark",colors:{primary:"#ff3ca8",primaryHover:"#ff6bc1",success:"#72f1b8",warning:"#ffcc33",error:"#fe4450",info:"#36f9f6",accent:"#36f9f6",focus:"#ff3ca8",surface:"#2a1a4f",surfaceHover:"#332260"},backgrounds:{primary:"#1a0933",secondary:"#241443",tertiary:"#2d1a52",hover:"#382266",elevated:"#2a1a4f",inset:"#120626",canvas:"#0e0524"},text:{primary:"#f5e8ff",secondary:"#c9a7ff",muted:"#8063b0",inverse:"#0e0524"},borders:{color:"#553388",radiusSm:"2px",radiusMd:"4px",radiusLg:"6px",radiusXl:"8px",radiusFull:"9999px",width:"1px",divider:"#3d2270",focusColor:"#36f9f6"},shadows:{sm:"0 0 8px rgba(255,60,168,0.4)",md:"0 0 18px rgba(255,60,168,0.45), 0 2px 0 0 #36f9f6",lg:"0 0 36px rgba(255,60,168,0.55), 0 4px 0 0 #36f9f6",xl:"0 0 60px rgba(255,60,168,0.6), 0 6px 0 0 #36f9f6",glow:"0 0 28px #ff3ca8, 0 0 56px rgba(255,60,168,0.5)"},spacing:K,typography:{fontFamily:"'Rajdhani', -apple-system, sans-serif",headingFontFamily:"'Orbitron', 'Rajdhani', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:900,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.08em"},transitions:{fast:"120ms cubic-bezier(0.23,1,0.32,1)",normal:"200ms cubic-bezier(0.23,1,0.32,1)",slow:"360ms cubic-bezier(0.23,1,0.32,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #0e0524 0%, #1a0933 55%, #2d1a52 100%), repeating-linear-gradient(0deg, rgba(54,249,246,0.04) 0 1px, transparent 1px 3px)"}},displayStyle:"synthwave",variantConfig:{shadow:"glow",animation:"dramatic",density:"normal"}},Jn={meta:{id:"zenMinimal",name:"Zen Minimal",tagline:"Whisper-light type, hairlines, oceans of whitespace.",tags:["light","minimal","airy"]},theme:{name:"Zen Minimal",darkMode:"light",colors:{primary:"#0a0a0a",primaryHover:"#262626",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#2563eb",accent:"#737373",focus:"#0a0a0a",surface:"#ffffff",surfaceHover:"#fafafa"},backgrounds:{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f0f0f0",elevated:"#ffffff",inset:"#fafafa",canvas:"#ffffff"},text:{primary:"#171717",secondary:"#525252",muted:"#a3a3a3",inverse:"#ffffff"},borders:{color:"#ededed",radiusSm:"2px",radiusMd:"3px",radiusLg:"4px",radiusXl:"6px",radiusFull:"9999px",width:"1px",divider:"#f0f0f0"},shadows:{sm:"none",md:"0 0 0 1px rgba(0,0,0,0.04)",lg:"0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.05)",xl:"0 4px 8px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.06)"},spacing:dt,typography:{fontFamily:"'Manrope', -apple-system, sans-serif",headingFontFamily:"'Manrope', sans-serif",monoFontFamily:"ui-monospace, monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.6,letterSpacing:"-0.005em",headingLetterSpacing:"-0.03em"},transitions:{fast:"100ms ease",normal:"180ms ease",slow:"280ms ease"}},displayStyle:"minimal",variantConfig:{density:"spacious",animation:"subtle"}},Yn={meta:{id:"claymorphism",name:"Claymorphism",tagline:"Soft-clay 3D surfaces — pressable, friendly, tactile.",tags:["light","playful","neumorphic","3d"]},theme:{name:"Claymorphism",darkMode:"light",colors:{primary:"#8b7ef5",primaryHover:"#7469ec",success:"#6ed6a5",warning:"#ffc771",error:"#ff8b8b",info:"#7ec4f5",accent:"#ffb3d9",focus:"#8b7ef5",surface:"#f3efff",surfaceHover:"#ebe4ff"},backgrounds:{primary:"#f6f0ff",secondary:"#ede4ff",tertiary:"#dfd3fc",hover:"#d3c5fa",elevated:"#ffffff",inset:"#e5daff",canvas:"#f6f0ff"},text:{primary:"#2a1f5e",secondary:"#584a8e",muted:"#9388bd",inverse:"#ffffff"},borders:{color:"rgba(139,126,245,0.15)",radiusSm:"14px",radiusMd:"22px",radiusLg:"32px",radiusXl:"48px",radiusFull:"9999px",width:"0px",divider:"rgba(139,126,245,0.12)"},shadows:{sm:"-3px -3px 6px rgba(255,255,255,0.8), 3px 3px 8px rgba(139,126,245,0.18), inset 0 0 0 rgba(255,255,255,0)",md:"-5px -5px 12px rgba(255,255,255,0.9), 6px 6px 18px rgba(139,126,245,0.22), inset 1px 1px 1px rgba(255,255,255,0.6)",lg:"-8px -8px 20px rgba(255,255,255,0.95), 10px 10px 32px rgba(139,126,245,0.28), inset 2px 2px 2px rgba(255,255,255,0.7)",xl:"-14px -14px 32px rgba(255,255,255,1), 16px 16px 48px rgba(139,126,245,0.34), inset 3px 3px 4px rgba(255,255,255,0.8)",inner:"inset 4px 4px 10px rgba(139,126,245,0.2), inset -4px -4px 10px rgba(255,255,255,0.9)"},spacing:K,typography:{fontFamily:"'Nunito', -apple-system, sans-serif",headingFontFamily:"'Nunito', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.015em"},transitions:{fast:"160ms cubic-bezier(0.4,0,0.2,1.4)",normal:"260ms cubic-bezier(0.4,0,0.2,1.4)",slow:"400ms cubic-bezier(0.4,0,0.2,1.4)"}},displayStyle:"neumorphic",variantConfig:{radius:"2xl",density:"comfortable",animation:"normal"}},Qn={meta:{id:"bauhaus",name:"Bauhaus",tagline:"Primary palette, geometric rigour, grid as foundation.",tags:["light","geometric","primary","design"]},theme:{name:"Bauhaus",darkMode:"light",colors:{primary:"#d62828",primaryHover:"#a81e1e",success:"#2a9d8f",warning:"#fcbf49",error:"#d62828",info:"#1d4e89",accent:"#fcbf49",focus:"#1d4e89",surface:"#faf5e8",surfaceHover:"#f2ead3"},backgrounds:{primary:"#faf5e8",secondary:"#f5ecd3",tertiary:"#ede0be",hover:"#e5d5a8",elevated:"#ffffff",inset:"#f0e3c0",canvas:"#faf5e8"},text:{primary:"#1a1a1a",secondary:"#3d3d3d",muted:"#7a7a7a",inverse:"#faf5e8"},borders:{color:"#1a1a1a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px",width:"3px",divider:"#1a1a1a"},shadows:{sm:"0 2px 0 0 #1a1a1a",md:"4px 4px 0 0 #1a1a1a",lg:"6px 6px 0 0 #1d4e89",xl:"8px 8px 0 0 #d62828"},spacing:K,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Archivo Black', 'Archivo', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:500,fontWeightMedium:700,fontWeightSemibold:800,fontWeightBold:900,lineHeight:1.4,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"60ms linear",normal:"120ms linear",slow:"200ms linear"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.35}},displayStyle:"bauhaus",variantConfig:{radius:"none",shadow:"md",density:"normal",animation:"subtle"}},Zn={meta:{id:"bankVault",name:"Bank Vault",tagline:"Navy, gilt accents, serif gravitas — trusted by institutions.",tags:["light","corporate","serif","conservative"]},theme:{name:"Bank Vault",darkMode:"light",colors:{primary:"#0b2545",primaryHover:"#163969",success:"#2d6a4f",warning:"#b08d2e",error:"#8b1a1a",info:"#1d4e89",accent:"#b08d2e",focus:"#0b2545",surface:"#ffffff",surfaceHover:"#f7f4ec"},backgrounds:{primary:"#fbfaf6",secondary:"#f4f0e4",tertiary:"#ebe5d2",hover:"#e3dcc4",elevated:"#ffffff",inset:"#efeadb",canvas:"#fbfaf6"},text:{primary:"#0b2545",secondary:"#3a4b65",muted:"#7a8399",inverse:"#fbfaf6"},borders:{color:"#c9bfa3",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px",width:"1px",divider:"#d4c9a8"},shadows:{sm:"0 1px 0 0 rgba(11,37,69,0.08)",md:"0 1px 3px rgba(11,37,69,0.08), 0 0 0 1px rgba(176,141,46,0.12)",lg:"0 4px 10px rgba(11,37,69,0.1)",xl:"0 12px 24px rgba(11,37,69,0.12)"},spacing:Cl,typography:{fontFamily:"'DM Sans', -apple-system, sans-serif",headingFontFamily:"'Libre Caslon Text', 'DM Serif Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0.005em",headingLetterSpacing:"-0.01em"},transitions:{fast:"90ms cubic-bezier(0.4,0,0.2,1)",normal:"160ms cubic-bezier(0.4,0,0.2,1)",slow:"260ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"bank",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"none"}},ut={obsidianEditorial:_n,neonArcade:Wn,hyggeScandinavian:Vn,brutalistRaw:Xn,glassAurora:qn,candyPop:Un,newspaperBroadsheet:Gn,synthwave84:Kn,zenMinimal:Jn,claymorphism:Yn,bauhaus:Qn,bankVault:Zn},es=Object.values(ut);function Ml(e){return ut[e]}function Al(e){return es.filter(t=>t.meta.tags.includes(e))}const El=["https://fonts.googleapis.com/css2?family=Spectral:wght@300;400;500;600;700&family=Lora:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Poiret+One&family=Cormorant+Garamond:wght@300;400;500;600&display=swap","https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Roboto+Condensed:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Space+Mono:wght@400;700&display=swap","https://fonts.googleapis.com/css2?family=VT323&display=swap","https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Special+Elite&display=swap","https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&display=swap","https://fonts.googleapis.com/css2?family=Bangers&display=swap","https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap","https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Rubik+Mono+One&family=Rubik:wght@400;500;700;800&display=swap"],ts={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},O={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},me={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},Re={space1:"8px",space2:"16px",space3:"24px",space4:"32px",space5:"44px",space6:"56px",space8:"80px"},rs={meta:{id:"forestCanopy",name:"Forest Canopy",tagline:"Moss on bark, dappled light — organic radii, earth serif.",tags:["light","nature","serif","organic"]},theme:{name:"Forest Canopy",darkMode:"light",recommendedDisplayStyle:"scandinavian",colors:{primary:"#3d5a40",primaryHover:"#2d4430",success:"#4a7c3a",warning:"#c88d3e",error:"#a63c3c",info:"#5a7c8a",accent:"#8ba878",focus:"#3d5a40",surface:"#f4f1e8",surfaceHover:"#ebe7d5"},backgrounds:{primary:"#f7f4e9",secondary:"#ede8d4",tertiary:"#dfd8be",hover:"#d5cdae",elevated:"#fcfaf1",inset:"#e5ddc5",canvas:"#f0ece0"},text:{primary:"#1e2a1c",secondary:"#3d4a36",muted:"#7a8570",inverse:"#f7f4e9"},borders:{color:"#c4bda0",width:"1px",divider:"#d8d0b5",radiusSm:"3px",radiusMd:"7px",radiusLg:"14px",radiusXl:"22px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(61,90,64,0.06)",md:"0 4px 12px -2px rgba(61,90,64,0.12), 0 2px 4px rgba(61,90,64,0.05)",lg:"0 10px 24px -6px rgba(61,90,64,0.16)",xl:"0 20px 40px -12px rgba(61,90,64,0.22)"},spacing:me,typography:{fontFamily:"'Lora', Georgia, serif",headingFontFamily:"'Spectral', 'Lora', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.7,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"180ms cubic-bezier(0.16,1,0.3,1)",normal:"280ms cubic-bezier(0.16,1,0.3,1)",slow:"420ms cubic-bezier(0.16,1,0.3,1)"},backgroundImage:{type:"pattern",pattern:"dots",opacity:.25}},displayStyle:"scandinavian",variantConfig:{density:"spacious",animation:"normal"}},as={meta:{id:"desertDune",name:"Desert Dune",tagline:"Ochre horizons, warm grain, serif that suns itself.",tags:["light","nature","serif","warm"]},theme:{name:"Desert Dune",darkMode:"light",recommendedDisplayStyle:"softCloud",colors:{primary:"#c8732f",primaryHover:"#a65a1c",success:"#7a8c3a",warning:"#e0a83a",error:"#b34747",info:"#7a8fa6",accent:"#e8a863",focus:"#c8732f",surface:"#fbf3e5",surfaceHover:"#f4e8d0"},backgrounds:{primary:"#fdf7ea",secondary:"#f6ebd3",tertiary:"#eeddb6",hover:"#e5cfa0",elevated:"#ffffff",inset:"#f0dfb8",canvas:"#fdf5e6"},text:{primary:"#3a2413",secondary:"#6b4823",muted:"#a88860",inverse:"#fdf7ea"},borders:{color:"#dcc08c",width:"1px",divider:"#e8d0a5",radiusSm:"12px",radiusMd:"18px",radiusLg:"28px",radiusXl:"40px",radiusFull:"9999px"},shadows:{sm:"0 2px 6px -2px rgba(200,115,47,0.1)",md:"0 8px 20px -6px rgba(200,115,47,0.15)",lg:"0 18px 36px -10px rgba(200,115,47,0.2)",xl:"0 32px 56px -18px rgba(200,115,47,0.28)"},spacing:me,typography:{fontFamily:"'DM Sans', -apple-system, sans-serif",headingFontFamily:"'DM Serif Display', Georgia, serif",monoFontFamily:"'Space Mono', ui-monospace, monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0",headingLetterSpacing:"-0.025em"},transitions:{fast:"160ms ease-out",normal:"280ms cubic-bezier(0.22,1,0.36,1)",slow:"460ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(175deg, #fbecc5 0%, #f6ddaf 40%, #eec28a 100%), radial-gradient(ellipse at 80% 10%, #fff4d9 0%, transparent 60%)"}},displayStyle:"softCloud",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},ns={meta:{id:"arcticCrystal",name:"Arctic Crystal",tagline:"Facets of ice, lean typography, surgical whitespace.",tags:["light","nature","minimal","cold"]},theme:{name:"Arctic Crystal",darkMode:"light",recommendedDisplayStyle:"minimal",colors:{primary:"#2a6a8c",primaryHover:"#1e5374",success:"#4a8a6a",warning:"#d0a040",error:"#c24848",info:"#5a9fc0",accent:"#a8d4e8",focus:"#2a6a8c",surface:"#ffffff",surfaceHover:"#f0f6fa"},backgrounds:{primary:"#f5fafd",secondary:"#eaf2f7",tertiary:"#d8e5ed",hover:"#cfdce6",elevated:"#ffffff",inset:"#e3eef5",canvas:"#f0f7fb"},text:{primary:"#0a2030",secondary:"#3a5468",muted:"#7a95a8",inverse:"#ffffff"},borders:{color:"#cfdde8",width:"1px",divider:"#e0ebf3",radiusSm:"2px",radiusMd:"3px",radiusLg:"4px",radiusXl:"6px",radiusFull:"9999px"},shadows:{sm:"1px 1px 0 rgba(42,106,140,0.06), -1px 0 0 rgba(42,106,140,0.04)",md:"2px 2px 0 rgba(42,106,140,0.08), -2px 0 0 rgba(42,106,140,0.04), 0 4px 8px -2px rgba(42,106,140,0.1)",lg:"4px 4px 0 rgba(42,106,140,0.1), 0 10px 16px -4px rgba(42,106,140,0.14)",xl:"0 24px 40px -12px rgba(42,106,140,0.2)"},spacing:Re,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Inter', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:200,fontWeightMedium:300,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.6,letterSpacing:"0.01em",headingLetterSpacing:"-0.02em"},transitions:{fast:"90ms ease",normal:"160ms ease",slow:"260ms ease"}},displayStyle:"minimal",variantConfig:{radius:"sm",shadow:"subtle",density:"spacious",animation:"subtle"}},ss={meta:{id:"autumnFoliage",name:"Autumn Foliage",tagline:"Ember glow, Fraunces serif, woodsmoke warmth.",tags:["light","nature","serif","warm"]},theme:{name:"Autumn Foliage",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#a83828",primaryHover:"#842818",success:"#6b7c2c",warning:"#c48020",error:"#8a2020",info:"#7a5a3a",accent:"#d89040",focus:"#a83828",surface:"#fbf1e3",surfaceHover:"#f2e4ce"},backgrounds:{primary:"#fdf5e8",secondary:"#f4e5cc",tertiary:"#e8d2aa",hover:"#dec295",elevated:"#fff9ee",inset:"#eedab5",canvas:"#faeed6"},text:{primary:"#2a140a",secondary:"#5a3020",muted:"#997860",inverse:"#fdf5e8"},borders:{color:"#d4b890",width:"1px",divider:"#e0c8a0",radiusSm:"4px",radiusMd:"8px",radiusLg:"14px",radiusXl:"22px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(168,56,40,0.08)",md:"0 4px 10px -2px rgba(168,56,40,0.12), 0 2px 4px rgba(168,56,40,0.08)",lg:"0 12px 24px -6px rgba(168,56,40,0.18)",xl:"0 24px 48px -16px rgba(168,56,40,0.24)"},spacing:O,typography:{fontFamily:"'Work Sans', sans-serif",headingFontFamily:"'Fraunces', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.005em",headingLetterSpacing:"-0.02em"},transitions:{fast:"140ms ease",normal:"220ms ease",slow:"360ms ease"}},displayStyle:"editorial",variantConfig:{density:"comfortable",animation:"normal"}},os={meta:{id:"japaneseWashi",name:"Japanese Washi",tagline:"Sumi ink on cream — quiet serif, paper grain, zero excess.",tags:["light","cultural","serif","minimal"]},theme:{name:"Japanese Washi",darkMode:"light",recommendedDisplayStyle:"zen",colors:{primary:"#1d3557",primaryHover:"#0d2545",success:"#4a7042",warning:"#a8803e",error:"#8b2a2a",info:"#3a5a78",accent:"#c83a3a",focus:"#1d3557",surface:"#faf6ea",surfaceHover:"#f2ebd7"},backgrounds:{primary:"#fdf9ee",secondary:"#f5ecd5",tertiary:"#ecdfbd",hover:"#e4d5aa",elevated:"#ffffff",inset:"#f0e5c8",canvas:"#fbf6e7"},text:{primary:"#1a1610",secondary:"#3d352a",muted:"#8a7f64",inverse:"#fdf9ee"},borders:{color:"#1a1610",width:"1px",divider:"#d4c89e",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px"},shadows:{sm:"none",md:"0 1px 0 0 rgba(26,22,16,0.08)",lg:"0 2px 0 0 rgba(26,22,16,0.1)",xl:"0 4px 12px rgba(26,22,16,0.08)"},spacing:Re,typography:{fontFamily:"'Noto Sans JP', 'Inter', sans-serif",headingFontFamily:"'Noto Serif JP', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:700,lineHeight:1.75,letterSpacing:"0.02em",headingLetterSpacing:"0.01em"},transitions:{fast:"120ms ease",normal:"220ms ease",slow:"340ms ease"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.22,blendMode:"multiply"}},displayStyle:"zen",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},is={meta:{id:"moroccanMosaic",name:"Moroccan Mosaic",tagline:"Zellige geometry — terracotta, teal, saffron in tiled rhythm.",tags:["light","cultural","geometric","warm"]},theme:{name:"Moroccan Mosaic",darkMode:"light",recommendedDisplayStyle:"bauhaus",colors:{primary:"#0f6b5c",primaryHover:"#0a5246",success:"#5a8a3a",warning:"#e0a03a",error:"#c2522a",info:"#3a7090",accent:"#e8a840",focus:"#0f6b5c",surface:"#f9f1dc",surfaceHover:"#f0e5c2"},backgrounds:{primary:"#fbf3e0",secondary:"#f2e4c2",tertiary:"#e6d2a0",hover:"#dac38a",elevated:"#fdf7e8",inset:"#ecd8b2",canvas:"#f8edd3"},text:{primary:"#2a1608",secondary:"#5a3a20",muted:"#a08860",inverse:"#fbf3e0"},borders:{color:"#2a1608",width:"2px",divider:"#b89868",radiusSm:"3px",radiusMd:"6px",radiusLg:"10px",radiusXl:"14px",radiusFull:"9999px"},shadows:{sm:"2px 2px 0 rgba(42,22,8,0.12)",md:"3px 3px 0 #0f6b5c, 6px 6px 0 rgba(42,22,8,0.08)",lg:"4px 4px 0 #0f6b5c, 8px 8px 0 #e8a840",xl:"6px 6px 0 #c2522a, 12px 12px 0 rgba(42,22,8,0.1)"},spacing:O,typography:{fontFamily:"'Cairo', 'Inter', sans-serif",headingFontFamily:"'Amiri', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"120ms linear",normal:"200ms linear",slow:"320ms linear"},backgroundImage:{type:"pattern",pattern:"hexagons",opacity:.2}},displayStyle:"bauhaus",variantConfig:{radius:"sm",shadow:"md",density:"normal",animation:"subtle"}},cs={meta:{id:"artDecoGatsby",name:"Art Deco Gatsby",tagline:"Gold, emerald, onyx — geometric glamour, thin gilt lines.",tags:["dark","cultural","luxury","geometric"]},theme:{name:"Art Deco Gatsby",darkMode:"dark",recommendedDisplayStyle:"luxe",colors:{primary:"#d4af37",primaryHover:"#e8c850",success:"#4a9c7a",warning:"#e8c850",error:"#c24040",info:"#70a8c0",accent:"#1e5c4a",focus:"#d4af37",surface:"#0f1a16",surfaceHover:"#16251e"},backgrounds:{primary:"#0a0f0c",secondary:"#0f1a16",tertiary:"#16251e",hover:"#1c3028",elevated:"#0f1a16",inset:"#050908",canvas:"#080c0a"},text:{primary:"#f0e4c2",secondary:"#c0b080",muted:"#706448",inverse:"#0a0f0c"},borders:{color:"#6b5828",width:"1px",divider:"#4a3c18",focusColor:"#d4af37",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(212,175,55,0.15)",md:"0 2px 8px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.2)",lg:"0 8px 24px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,175,55,0.3), inset 0 1px 0 rgba(212,175,55,0.1)",xl:"0 20px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(212,175,55,0.4)",glow:"0 0 16px rgba(212,175,55,0.3)"},spacing:me,typography:{fontFamily:"'Cormorant Garamond', Georgia, serif",headingFontFamily:"'Poiret One', 'Cormorant Garamond', serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0.04em",headingLetterSpacing:"0.12em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"380ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"luxe",variantConfig:{radius:"none",shadow:"lg",density:"comfortable",animation:"subtle"}},ls={meta:{id:"sovietConstructivist",name:"Soviet Constructivist",tagline:"Rodchenko red — slab type, hard angles, propaganda poise.",tags:["light","cultural","brutalist","geometric"]},theme:{name:"Soviet Constructivist",darkMode:"light",recommendedDisplayStyle:"brutalist",colors:{primary:"#c41e1e",primaryHover:"#8a1414",success:"#3a6a3a",warning:"#d08028",error:"#8a1414",info:"#2a4060",accent:"#1a1a1a",focus:"#c41e1e",surface:"#f0ead8",surfaceHover:"#e5dcc0"},backgrounds:{primary:"#f4efde",secondary:"#e8dec4",tertiary:"#d8c9a4",hover:"#ccbb90",elevated:"#faf5e5",inset:"#dccda8",canvas:"#f0ead5"},text:{primary:"#1a1a1a",secondary:"#3d3d3d",muted:"#706d5a",inverse:"#f4efde"},borders:{color:"#1a1a1a",width:"3px",divider:"#1a1a1a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"4px 0 0 0 #c41e1e",md:"6px 6px 0 0 #1a1a1a, 8px 8px 0 0 #c41e1e",lg:"10px 10px 0 0 #c41e1e",xl:"12px -4px 0 0 #1a1a1a, 16px 0 0 0 #c41e1e"},spacing:O,typography:{fontFamily:"'Roboto Condensed', 'Archivo', sans-serif",headingFontFamily:"'Alfa Slab One', 'Archivo Black', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.35,letterSpacing:"0.02em",headingLetterSpacing:"-0.005em"},transitions:{fast:"0ms linear",normal:"80ms linear",slow:"160ms linear"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"subtle"}},ds={meta:{id:"blueprint",name:"Blueprint",tagline:"Cyanotype drafting — white lines, grid paper, technical mono.",tags:["dark","tech","technical","mono"]},theme:{name:"Blueprint",darkMode:"dark",recommendedDisplayStyle:"dashboard",colors:{primary:"#f0f4f8",primaryHover:"#ffffff",success:"#88e0b8",warning:"#ffcc66",error:"#ff8888",info:"#88c8ff",accent:"#6eb0e0",focus:"#ffffff",surface:"#18456a",surfaceHover:"#1f527e"},backgrounds:{primary:"#0e3356",secondary:"#124066",tertiary:"#184d79",hover:"#1e5a8c",elevated:"#18456a",inset:"#082540",canvas:"#0a2d4a"},text:{primary:"#f0f4f8",secondary:"#b5c8da",muted:"#6e8aa4",inverse:"#0e3356"},borders:{color:"#3870a0",width:"1px",divider:"#2a5680",focusColor:"#ffffff",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(240,244,248,0.05)",md:"0 1px 0 0 rgba(240,244,248,0.1), 0 4px 8px rgba(0,0,0,0.3)",lg:"0 1px 0 0 rgba(240,244,248,0.14), 0 10px 20px rgba(0,0,0,0.4)",xl:"0 20px 40px rgba(0,0,0,0.5)"},spacing:O,typography:{fontFamily:"'IBM Plex Mono', ui-monospace, monospace",headingFontFamily:"'Space Grotesk', 'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"-0.01em"},transitions:{fast:"80ms linear",normal:"140ms linear",slow:"220ms linear"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.4}},displayStyle:"dashboard",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"subtle"}},us={meta:{id:"hologramUI",name:"Hologram UI",tagline:"Iridescent light-leaks, translucent layers, futurist geometry.",tags:["dark","tech","glass","neon"]},theme:{name:"Hologram UI",darkMode:"dark",recommendedDisplayStyle:"cosmic",colors:{primary:"#8be9fd",primaryHover:"#a8f0ff",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#bd93f9",accent:"#ff79c6",focus:"#8be9fd",surface:"rgba(40,30,70,0.5)",surfaceHover:"rgba(50,40,85,0.6)"},backgrounds:{primary:"rgba(30,20,55,0.6)",secondary:"rgba(40,30,70,0.5)",tertiary:"rgba(55,40,90,0.4)",hover:"rgba(65,50,105,0.55)",elevated:"rgba(50,38,82,0.7)",inset:"rgba(25,18,45,0.6)",canvas:"#0a0618"},text:{primary:"#f0e8ff",secondary:"#b0a0e0",muted:"#6a5a94",inverse:"#0a0618"},borders:{color:"rgba(139,233,253,0.25)",width:"1px",divider:"rgba(139,233,253,0.15)",focusColor:"#8be9fd",radiusSm:"4px",radiusMd:"8px",radiusLg:"14px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"0 0 12px rgba(139,233,253,0.2)",md:"0 4px 20px rgba(189,147,249,0.3), 0 0 1px rgba(139,233,253,0.4)",lg:"0 8px 40px rgba(255,121,198,0.35), 0 0 2px rgba(139,233,253,0.5), inset 0 1px 0 rgba(255,255,255,0.08)",xl:"0 20px 60px rgba(139,233,253,0.4), inset 0 1px 0 rgba(255,255,255,0.1)",glow:"0 0 32px rgba(139,233,253,0.6), 0 0 64px rgba(255,121,198,0.3)"},spacing:O,typography:{fontFamily:"'Rajdhani', -apple-system, sans-serif",headingFontFamily:"'Orbitron', 'Rajdhani', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.06em"},transitions:{fast:"160ms cubic-bezier(0.4,0,0.2,1)",normal:"280ms cubic-bezier(0.4,0,0.2,1)",slow:"440ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 15% 20%, rgba(139,233,253,0.25) 0%, transparent 50%), radial-gradient(at 85% 25%, rgba(255,121,198,0.25) 0%, transparent 50%), radial-gradient(at 50% 90%, rgba(189,147,249,0.3) 0%, transparent 55%), linear-gradient(135deg, #0a0618 0%, #1a0e38 100%)"}},displayStyle:"cosmic",variantConfig:{shadow:"glow",density:"normal",animation:"normal"}},fs={meta:{id:"deepSea",name:"Deep Sea",tagline:"Midnight blue abyss, bioluminescent accents in the dark.",tags:["dark","tech","organic"]},theme:{name:"Deep Sea",darkMode:"dark",recommendedDisplayStyle:"modern3d",colors:{primary:"#00d9c4",primaryHover:"#2feedc",success:"#5af0b0",warning:"#f0c858",error:"#ff6a82",info:"#60c0ff",accent:"#a878f0",focus:"#00d9c4",surface:"#0a1524",surfaceHover:"#0e1c30"},backgrounds:{primary:"#05101c",secondary:"#0a1524",tertiary:"#0f1f34",hover:"#163044",elevated:"#0e1c30",inset:"#030810",canvas:"#030810"},text:{primary:"#d8f0f5",secondary:"#88b8c8",muted:"#4a7080",inverse:"#030810"},borders:{color:"#183548",width:"1px",divider:"#0f2638",focusColor:"#00d9c4",radiusSm:"8px",radiusMd:"14px",radiusLg:"22px",radiusXl:"32px",radiusFull:"9999px"},shadows:{sm:"0 2px 8px rgba(0,217,196,0.08)",md:"0 6px 20px rgba(0,217,196,0.12), 0 2px 4px rgba(0,0,0,0.5)",lg:"0 14px 40px rgba(0,217,196,0.18), 0 4px 8px rgba(0,0,0,0.6)",xl:"0 28px 64px rgba(0,217,196,0.22), 0 8px 16px rgba(0,0,0,0.7)",glow:"0 0 24px rgba(0,217,196,0.5)"},spacing:O,typography:{fontFamily:"'IBM Plex Sans', -apple-system, sans-serif",headingFontFamily:"'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"160ms cubic-bezier(0.22,1,0.36,1)",normal:"280ms cubic-bezier(0.22,1,0.36,1)",slow:"440ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 20% 30%, rgba(0,217,196,0.08) 0%, transparent 60%), radial-gradient(at 80% 80%, rgba(168,120,240,0.06) 0%, transparent 55%), linear-gradient(180deg, #030810 0%, #05101c 100%)"}},displayStyle:"modern3d",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},ms={meta:{id:"analog70s",name:"Analog 70s",tagline:"Mustard, rust, walnut — chunky, warm, turntable energy.",tags:["light","retro","warm","serif"]},theme:{name:"Analog 70s",darkMode:"light",recommendedDisplayStyle:"rounded",colors:{primary:"#c8621e",primaryHover:"#a04d14",success:"#7a8a2a",warning:"#d8a030",error:"#a03030",info:"#6a7a8a",accent:"#d8a830",focus:"#c8621e",surface:"#f5ead2",surfaceHover:"#ecdfc0"},backgrounds:{primary:"#f7ecd6",secondary:"#eeddb8",tertiary:"#e2c998",hover:"#d8bc80",elevated:"#fbf2de",inset:"#e8cfa5",canvas:"#f2e4c8"},text:{primary:"#2a1608",secondary:"#5a2e14",muted:"#a07852",inverse:"#f7ecd6"},borders:{color:"#b89868",width:"2px",divider:"#ccb285",radiusSm:"10px",radiusMd:"16px",radiusLg:"24px",radiusXl:"34px",radiusFull:"9999px"},shadows:{sm:"0 2px 0 0 rgba(42,22,8,0.12)",md:"0 4px 0 0 rgba(42,22,8,0.15), 0 6px 10px rgba(200,98,30,0.12)",lg:"0 6px 0 0 rgba(42,22,8,0.18), 0 10px 20px rgba(200,98,30,0.2)",xl:"0 8px 0 0 rgba(42,22,8,0.22), 0 20px 40px rgba(200,98,30,0.28)"},spacing:O,typography:{fontFamily:"'Work Sans', sans-serif",headingFontFamily:"'Abril Fatface', Georgia, serif",monoFontFamily:"'Space Mono', ui-monospace, monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"180ms cubic-bezier(0.34,1.56,0.64,1)",normal:"280ms cubic-bezier(0.34,1.56,0.64,1)",slow:"440ms cubic-bezier(0.34,1.56,0.64,1)"}},displayStyle:"rounded",variantConfig:{radius:"xl",shadow:"md",density:"comfortable",animation:"playful"}},ps={meta:{id:"vhsTracking",name:"VHS Tracking",tagline:"Chromatic smear, scan-line haze, pixel type from another decade.",tags:["dark","retro","pixel","experimental"]},theme:{name:"VHS Tracking",darkMode:"dark",recommendedDisplayStyle:"retro8bit",colors:{primary:"#ff3eb5",primaryHover:"#ff5fc5",success:"#3eff90",warning:"#ffe83e",error:"#ff3e3e",info:"#3ee0ff",accent:"#3eff90",focus:"#ff3eb5",surface:"#120818",surfaceHover:"#1a0c24"},backgrounds:{primary:"#0a0412",secondary:"#120818",tertiary:"#1a0c24",hover:"#241230",elevated:"#120818",inset:"#050208",canvas:"#0a0412"},text:{primary:"#f8e8ff",secondary:"#c888d8",muted:"#605070",inverse:"#0a0412"},borders:{color:"#4a2864",width:"1px",divider:"#2a1840",focusColor:"#ff3eb5",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0"},shadows:{sm:"-2px 0 0 rgba(255,62,181,0.5), 2px 0 0 rgba(62,224,255,0.5)",md:"-3px 0 0 rgba(255,62,181,0.6), 3px 0 0 rgba(62,224,255,0.6), 0 4px 12px rgba(0,0,0,0.6)",lg:"-4px 0 0 rgba(255,62,181,0.7), 4px 0 0 rgba(62,224,255,0.7), 0 8px 24px rgba(0,0,0,0.7)",xl:"-6px 0 0 rgba(255,62,181,0.8), 6px 0 0 rgba(62,224,255,0.8)",glow:"0 0 20px rgba(255,62,181,0.6)"},spacing:O,typography:{fontFamily:"'VT323', 'JetBrains Mono', monospace",headingFontFamily:"'VT323', monospace",monoFontFamily:"'VT323', monospace",fontSizeXs:"0.9375rem",fontSizeSm:"1rem",fontSizeMd:"1.125rem",fontSizeLg:"1.375rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:400,fontWeightBold:400,lineHeight:1.35,letterSpacing:"0.01em",headingLetterSpacing:"0.04em"},transitions:{fast:"40ms steps(3)",normal:"100ms steps(5)",slow:"180ms steps(8)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #0a0412 0%, #120818 100%), repeating-linear-gradient(0deg, rgba(255,62,181,0.03) 0 2px, transparent 2px 4px)"}},displayStyle:"retro8bit",variantConfig:{radius:"none",shadow:"md",density:"normal",animation:"subtle"}},gs={meta:{id:"typewriterPress",name:"Typewriter Press",tagline:"Ribbon red on cream — Courier bones, stamped display.",tags:["light","retro","mono","editorial"]},theme:{name:"Typewriter Press",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#b02020",primaryHover:"#8a1818",success:"#4a7038",warning:"#b08018",error:"#8a1818",info:"#3a5068",accent:"#1a1a1a",focus:"#b02020",surface:"#faf3df",surfaceHover:"#f0e7c6"},backgrounds:{primary:"#fbf5e3",secondary:"#f3e9c8",tertiary:"#ebdcab",hover:"#e2cf8f",elevated:"#fffae7",inset:"#efe0b0",canvas:"#fbf5e3"},text:{primary:"#1a1a1a",secondary:"#3d3428",muted:"#7a6f4a",inverse:"#fbf5e3"},borders:{color:"#1a1a1a",width:"1px",divider:"#c8b880",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"0 0 0 rgba(26,26,26,0), 1px 1px 0 rgba(26,26,26,0.12)",md:"1px 1px 0 rgba(26,26,26,0.15), 2px 2px 0 rgba(176,32,32,0.1)",lg:"2px 2px 0 rgba(26,26,26,0.2), 4px 4px 0 rgba(176,32,32,0.12)",xl:"3px 3px 0 rgba(26,26,26,0.25)"},spacing:O,typography:{fontFamily:"'Courier Prime', 'Courier New', monospace",headingFontFamily:"'Special Elite', 'Courier Prime', monospace",monoFontFamily:"'Courier Prime', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0.01em",headingLetterSpacing:"0.04em"},transitions:{fast:"40ms linear",normal:"80ms linear",slow:"140ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.2,blendMode:"multiply"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"subtle",density:"normal",animation:"none"}},ys={meta:{id:"y2kAqua",name:"Y2K Aqua",tagline:"Chrome and aqua — iMac blue, optimistic futurism, 2001 energy.",tags:["light","retro","glass"]},theme:{name:"Y2K Aqua",darkMode:"light",recommendedDisplayStyle:"modern3d",colors:{primary:"#0a84ff",primaryHover:"#0066cc",success:"#34c759",warning:"#ff9500",error:"#ff3b30",info:"#5ac8fa",accent:"#5ac8fa",focus:"#0a84ff",surface:"#f0f5fc",surfaceHover:"#e0ecfa"},backgrounds:{primary:"#e8f2fc",secondary:"#d8e8f8",tertiary:"#c0d8f0",hover:"#a8c8e8",elevated:"#ffffff",inset:"#c8dcf4",canvas:"#dce8f4"},text:{primary:"#0a1a30",secondary:"#304868",muted:"#6a88a8",inverse:"#ffffff"},borders:{color:"#a0c0e0",width:"1px",divider:"#c0d8f0",radiusSm:"6px",radiusMd:"10px",radiusLg:"16px",radiusXl:"24px",radiusFull:"9999px"},shadows:{sm:"inset 0 1px 0 rgba(255,255,255,0.8), 0 1px 2px rgba(10,132,255,0.15)",md:"inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -1px 2px rgba(10,132,255,0.2), 0 2px 6px rgba(10,132,255,0.25), 0 4px 12px rgba(10,132,255,0.15)",lg:"inset 0 1px 0 rgba(255,255,255,0.95), 0 4px 12px rgba(10,132,255,0.3), 0 10px 24px rgba(90,200,250,0.25)",xl:"inset 0 2px 0 rgba(255,255,255,1), 0 8px 24px rgba(10,132,255,0.35), 0 20px 48px rgba(90,200,250,0.3)"},spacing:O,typography:{fontFamily:"'Chakra Petch', -apple-system, sans-serif",headingFontFamily:"'Chakra Petch', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.01em",headingLetterSpacing:"-0.005em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"380ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #f0f7ff 0%, #d8e8f8 60%, #bcd6f0 100%)"}},displayStyle:"modern3d",variantConfig:{radius:"lg",shadow:"lg",density:"normal",animation:"normal"}},hs={meta:{id:"vogueDidone",name:"Vogue Didone",tagline:"Didone serif, arctic whitespace, one red heartbeat.",tags:["light","editorial","serif","luxury"]},theme:{name:"Vogue Didone",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#000000",primaryHover:"#1a1a1a",success:"#1f6a3a",warning:"#8a6a1a",error:"#c40018",info:"#2a4068",accent:"#c40018",focus:"#c40018",surface:"#ffffff",surfaceHover:"#f7f7f7"},backgrounds:{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f2f2f2",hover:"#ededed",elevated:"#ffffff",inset:"#f5f5f5",canvas:"#ffffff"},text:{primary:"#000000",secondary:"#2a2a2a",muted:"#808080",inverse:"#ffffff"},borders:{color:"#000000",width:"1px",divider:"#dcdcdc",radiusSm:"0",radiusMd:"0",radiusLg:"1px",radiusXl:"2px",radiusFull:"9999px"},shadows:{sm:"none",md:"none",lg:"0 1px 0 0 #000000",xl:"0 2px 0 0 #000000"},spacing:Re,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Playfair Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:900,lineHeight:1.7,letterSpacing:"0.02em",headingLetterSpacing:"-0.03em"},transitions:{fast:"120ms ease",normal:"220ms ease",slow:"360ms ease"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},bs={meta:{id:"comicHalftone",name:"Comic Halftone",tagline:"CMYK pop — halftone dots, action type, offset ink shadows.",tags:["light","editorial","playful"]},theme:{name:"Comic Halftone",darkMode:"light",recommendedDisplayStyle:"playful",colors:{primary:"#e8182c",primaryHover:"#c01020",success:"#1ea862",warning:"#f0c820",error:"#e8182c",info:"#1878c8",accent:"#1878c8",focus:"#e8182c",surface:"#fffdf4",surfaceHover:"#fff8d8"},backgrounds:{primary:"#fffef0",secondary:"#fff6b8",tertiary:"#ffe870",hover:"#ffd838",elevated:"#ffffff",inset:"#fff090",canvas:"#fffdec"},text:{primary:"#0a0a0a",secondary:"#2a2a2a",muted:"#707070",inverse:"#fffef0"},borders:{color:"#0a0a0a",width:"3px",divider:"#0a0a0a",radiusSm:"2px",radiusMd:"4px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},shadows:{sm:"3px 3px 0 0 #0a0a0a",md:"5px 5px 0 0 #0a0a0a",lg:"6px 6px 0 0 #e8182c, 10px 10px 0 0 #0a0a0a",xl:"8px 8px 0 0 #1878c8, 12px 12px 0 0 #0a0a0a"},spacing:O,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Bangers', 'Archivo Black', cursive",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2.125rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.45,letterSpacing:"0",headingLetterSpacing:"0.03em"},transitions:{fast:"100ms cubic-bezier(0.34,1.56,0.64,1)",normal:"200ms cubic-bezier(0.34,1.56,0.64,1)",slow:"320ms cubic-bezier(0.34,1.56,0.64,1)"},backgroundImage:{type:"pattern",pattern:"dots",opacity:.5}},displayStyle:"playful",variantConfig:{radius:"sm",shadow:"lg",density:"normal",animation:"playful"}},Ss={meta:{id:"zinePunk",name:"Zine Punk",tagline:"Photocopier grain, marker headlines, cut-and-paste attitude.",tags:["light","editorial","experimental","brutalist"]},theme:{name:"Zine Punk",darkMode:"light",recommendedDisplayStyle:"brutalist",colors:{primary:"#0a0a0a",primaryHover:"#000000",success:"#1a1a1a",warning:"#2a2a2a",error:"#0a0a0a",info:"#1a1a1a",accent:"#0a0a0a",focus:"#0a0a0a",surface:"#f5f3ee",surfaceHover:"#e8e4d8"},backgrounds:{primary:"#efece0",secondary:"#e3dfd0",tertiary:"#d4d0c0",hover:"#c8c4b4",elevated:"#f5f3ee",inset:"#e0dcc8",canvas:"#ede8d8"},text:{primary:"#0a0a0a",secondary:"#1a1a1a",muted:"#505050",inverse:"#efece0"},borders:{color:"#0a0a0a",width:"2px",divider:"#0a0a0a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"2px 3px 0 rgba(10,10,10,0.9)",md:"4px 6px 0 rgba(10,10,10,0.9), -2px 2px 0 rgba(10,10,10,0.3)",lg:"6px 10px 0 rgba(10,10,10,1), -4px 2px 0 rgba(10,10,10,0.4)",xl:"10px 14px 0 rgba(10,10,10,1)"},spacing:O,typography:{fontFamily:"'Special Elite', 'Courier Prime', monospace",headingFontFamily:"'Permanent Marker', 'Special Elite', cursive",monoFontFamily:"'Courier Prime', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:400,fontWeightBold:400,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.01em"},transitions:{fast:"20ms linear",normal:"60ms linear",slow:"120ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.3,blendMode:"multiply"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"none"}},xs={meta:{id:"watercolorWash",name:"Watercolor Wash",tagline:"Soft pastel bleeds, handwritten headings, paper gentleness.",tags:["light","artistic","pastel","organic"]},theme:{name:"Watercolor Wash",darkMode:"light",recommendedDisplayStyle:"softCloud",colors:{primary:"#9d7bc4",primaryHover:"#8262ab",success:"#7bb88a",warning:"#e0a868",error:"#d47878",info:"#7ba8c4",accent:"#e0a0c0",focus:"#9d7bc4",surface:"rgba(255,250,245,0.8)",surfaceHover:"rgba(250,240,238,0.9)"},backgrounds:{primary:"#fdf8f4",secondary:"#f8eee6",tertiary:"#f0e0d4",hover:"#e8d2c0",elevated:"#ffffff",inset:"#f4e4d8",canvas:"#fdf8f4"},text:{primary:"#3a2845",secondary:"#6a5868",muted:"#a89ca4",inverse:"#fdf8f4"},borders:{color:"#e8d4c8",width:"1px",divider:"#f0e0d4",radiusSm:"10px",radiusMd:"18px",radiusLg:"30px",radiusXl:"44px",radiusFull:"9999px"},shadows:{sm:"0 2px 10px rgba(157,123,196,0.08)",md:"0 6px 24px rgba(157,123,196,0.12), 0 2px 4px rgba(224,160,192,0.06)",lg:"0 16px 40px rgba(157,123,196,0.18), 0 6px 12px rgba(224,160,192,0.1)",xl:"0 30px 64px rgba(157,123,196,0.22)"},spacing:me,typography:{fontFamily:"'Quicksand', -apple-system, sans-serif",headingFontFamily:"'Caveat', 'Quicksand', cursive",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0",headingLetterSpacing:"-0.005em"},transitions:{fast:"220ms cubic-bezier(0.22,1,0.36,1)",normal:"380ms cubic-bezier(0.22,1,0.36,1)",slow:"600ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 18% 22%, rgba(232,208,220,0.5) 0%, transparent 40%), radial-gradient(at 82% 28%, rgba(200,220,240,0.45) 0%, transparent 45%), radial-gradient(at 35% 80%, rgba(232,228,200,0.4) 0%, transparent 50%), linear-gradient(180deg, #fdf8f4 0%, #f8eee6 100%)"}},displayStyle:"softCloud",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},vs={meta:{id:"memphis80s",name:"Memphis 80s",tagline:"Squiggle chaos — cyan, pink, yellow, serious typography, no.",tags:["light","artistic","playful"]},theme:{name:"Memphis 80s",darkMode:"light",recommendedDisplayStyle:"playful",colors:{primary:"#f02080",primaryHover:"#c81868",success:"#28c868",warning:"#f8d820",error:"#f02040",info:"#20b8e8",accent:"#f8d820",focus:"#20b8e8",surface:"#fffffa",surfaceHover:"#fff7d0"},backgrounds:{primary:"#fffceb",secondary:"#fff2d0",tertiary:"#ffe8b4",hover:"#ffdd98",elevated:"#ffffff",inset:"#fff0c0",canvas:"#fffbe0"},text:{primary:"#0a0a1a",secondary:"#2a2a3a",muted:"#6a6a7a",inverse:"#fffceb"},borders:{color:"#0a0a1a",width:"2px",divider:"#0a0a1a",radiusSm:"4px",radiusMd:"6px",radiusLg:"10px",radiusXl:"14px",radiusFull:"9999px"},shadows:{sm:"3px 3px 0 0 #20b8e8",md:"4px 4px 0 0 #f02080, 8px 8px 0 0 #f8d820",lg:"5px 5px 0 0 #28c868, 10px 10px 0 0 #20b8e8, 15px 15px 0 0 #f02080",xl:"6px 6px 0 0 #f8d820, 12px 12px 0 0 #f02080, 18px 18px 0 0 #20b8e8"},spacing:O,typography:{fontFamily:"'Rubik', -apple-system, sans-serif",headingFontFamily:"'Rubik Mono One', 'Rubik', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.4,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"120ms cubic-bezier(0.68,-0.55,0.27,1.55)",normal:"220ms cubic-bezier(0.68,-0.55,0.27,1.55)",slow:"360ms cubic-bezier(0.68,-0.55,0.27,1.55)"},backgroundImage:{type:"pattern",pattern:"zigzag",opacity:.3}},displayStyle:"playful",variantConfig:{radius:"sm",shadow:"lg",density:"normal",animation:"playful"}},ws={meta:{id:"inkSumie",name:"Ink Sumi-e",tagline:"Charcoal brush on rice paper — vast silence, one red seal.",tags:["light","artistic","serif","minimal"]},theme:{name:"Ink Sumi-e",darkMode:"light",recommendedDisplayStyle:"zen",colors:{primary:"#1a1a1a",primaryHover:"#000000",success:"#2a4a2a",warning:"#705820",error:"#b82020",info:"#2a4060",accent:"#b82020",focus:"#1a1a1a",surface:"#ffffff",surfaceHover:"#f8f7f3"},backgrounds:{primary:"#fdfcf7",secondary:"#f5f3eb",tertiary:"#ebe8dc",hover:"#dfdbcc",elevated:"#ffffff",inset:"#f0edde",canvas:"#fdfcf7"},text:{primary:"#1a1a1a",secondary:"#3a3a3a",muted:"#888482",inverse:"#fdfcf7"},borders:{color:"#1a1a1a",width:"1px",divider:"#d8d4c4",radiusSm:"0",radiusMd:"0",radiusLg:"1px",radiusXl:"2px",radiusFull:"9999px"},shadows:{sm:"none",md:"none",lg:"none",xl:"0 0 0 1px #1a1a1a"},spacing:Re,typography:{fontFamily:"'Noto Sans JP', -apple-system, sans-serif",headingFontFamily:"'Noto Serif JP', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.625rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:700,lineHeight:1.85,letterSpacing:"0.04em",headingLetterSpacing:"0"},transitions:{fast:"200ms ease",normal:"340ms ease",slow:"520ms ease"}},displayStyle:"zen",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},ks={meta:{id:"dieterRams",name:"Dieter Rams",tagline:"Less-but-better — warm gray, single yellow dot, measured everything.",tags:["light","minimal","industrial"]},theme:{name:"Dieter Rams",darkMode:"light",recommendedDisplayStyle:"swiss",colors:{primary:"#1a1a1a",primaryHover:"#0a0a0a",success:"#3a7840",warning:"#e8c020",error:"#c83028",info:"#3868a0",accent:"#e8c020",focus:"#1a1a1a",surface:"#ffffff",surfaceHover:"#f8f8f8"},backgrounds:{primary:"#fbfbf9",secondary:"#f2f2ee",tertiary:"#e8e8e2",hover:"#dedeD6",elevated:"#ffffff",inset:"#ededE7",canvas:"#f5f5f1"},text:{primary:"#0a0a0a",secondary:"#3a3a38",muted:"#888880",inverse:"#fbfbf9"},borders:{color:"#d4d4ce",width:"1px",divider:"#e0e0da",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 1px 0 0 rgba(0,0,0,0.04)",md:"0 1px 0 0 rgba(0,0,0,0.06), 0 4px 8px -2px rgba(0,0,0,0.06)",lg:"0 2px 0 0 rgba(0,0,0,0.08), 0 10px 20px -6px rgba(0,0,0,0.1)",xl:"0 20px 40px -12px rgba(0,0,0,0.14)"},spacing:ts,typography:{fontFamily:"'IBM Plex Sans', -apple-system, sans-serif",headingFontFamily:"'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.015em"},transitions:{fast:"100ms cubic-bezier(0.4,0,0.2,1)",normal:"180ms cubic-bezier(0.4,0,0.2,1)",slow:"280ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"swiss",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"subtle"}},Cs={meta:{id:"blackTieGala",name:"Black Tie Gala",tagline:"Absolute black, hand-gilded detail, whispered serif elegance.",tags:["dark","luxury","serif"]},theme:{name:"Black Tie Gala",darkMode:"dark",recommendedDisplayStyle:"luxe",colors:{primary:"#c89848",primaryHover:"#e0b868",success:"#68a878",warning:"#e0b050",error:"#c85858",info:"#8aa8d0",accent:"#e8d0a0",focus:"#c89848",surface:"#0e0e0e",surfaceHover:"#161616"},backgrounds:{primary:"#050505",secondary:"#0e0e0e",tertiary:"#161616",hover:"#1e1e1e",elevated:"#0e0e0e",inset:"#020202",canvas:"#030303"},text:{primary:"#f0ead8",secondary:"#a89870",muted:"#605848",inverse:"#050505"},borders:{color:"#3a2e18",width:"1px",divider:"#241a0c",focusColor:"#c89848",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(200,152,72,0.1)",md:"0 4px 16px rgba(0,0,0,0.8), 0 0 0 1px rgba(200,152,72,0.15)",lg:"0 10px 32px rgba(0,0,0,0.9), 0 0 0 1px rgba(200,152,72,0.25), inset 0 1px 0 rgba(232,208,160,0.08)",xl:"0 24px 56px rgba(0,0,0,1), 0 0 0 1px rgba(200,152,72,0.35)",glow:"0 0 24px rgba(200,152,72,0.25)"},spacing:me,typography:{fontFamily:"'Cormorant Garamond', Georgia, serif",headingFontFamily:"'Cormorant Garamond', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.65,letterSpacing:"0.05em",headingLetterSpacing:"0.08em"},transitions:{fast:"180ms cubic-bezier(0.4,0,0.2,1)",normal:"320ms cubic-bezier(0.4,0,0.2,1)",slow:"500ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"luxe",variantConfig:{radius:"sm",shadow:"lg",density:"spacious",animation:"subtle"}},Ms={meta:{id:"swissGrid",name:"Swiss Grid",tagline:"Akzidenz rigor — white, black, one red, grid discipline.",tags:["light","minimal","editorial"]},theme:{name:"Swiss Grid",darkMode:"light",recommendedDisplayStyle:"swiss",colors:{primary:"#e30613",primaryHover:"#b8040f",success:"#00683d",warning:"#b8700a",error:"#e30613",info:"#004c98",accent:"#e30613",focus:"#e30613",surface:"#ffffff",surfaceHover:"#f5f5f5"},backgrounds:{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#e0e0e0",elevated:"#ffffff",inset:"#f0f0f0",canvas:"#ffffff"},text:{primary:"#0a0a0a",secondary:"#2a2a2a",muted:"#707070",inverse:"#ffffff"},borders:{color:"#0a0a0a",width:"1px",divider:"#d0d0d0",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"none",md:"0 1px 0 0 rgba(10,10,10,0.1)",lg:"0 2px 0 0 rgba(10,10,10,0.12)",xl:"0 4px 0 0 rgba(10,10,10,0.15)"},spacing:ts,typography:{fontFamily:"'Inter', 'Helvetica Neue', sans-serif",headingFontFamily:"'Inter', 'Helvetica Neue', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.45,letterSpacing:"0",headingLetterSpacing:"-0.03em"},transitions:{fast:"60ms linear",normal:"120ms linear",slow:"200ms linear"}},displayStyle:"swiss",variantConfig:{radius:"none",shadow:"none",density:"compact",animation:"subtle"}},ft={forestCanopy:rs,desertDune:as,arcticCrystal:ns,autumnFoliage:ss,japaneseWashi:os,moroccanMosaic:is,artDecoGatsby:cs,sovietConstructivist:ls,blueprint:ds,hologramUI:us,deepSea:fs,analog70s:ms,vhsTracking:ps,typewriterPress:gs,y2kAqua:ys,vogueDidone:hs,comicHalftone:bs,zinePunk:Ss,watercolorWash:xs,memphis80s:vs,inkSumie:ws,dieterRams:ks,blackTieGala:Cs,swissGrid:Ms},As=Object.values(ft);function Nl(e){return ft[e]}function Tl(e){return As.filter(t=>t.meta.tags.includes(e))}function Ll(e,t){return e??t.recommendedDisplayStyle??"default"}const Es=({theme:e,darkTheme:t,variantConfig:r,darkMode:a,displayStyle:n,animateTransitions:s=!0,children:o})=>{const i=c.useId(),l=c.useMemo(()=>`p${i.replace(/:/g,"")}`,[i]),d=c.useRef(null),u=c.useRef(null),[f,p]=c.useState(null),[g,m]=c.useState(e),[b,y]=c.useState(!1),[S,h]=c.useState(()=>Ll(n,e));c.useEffect(()=>{n!==void 0?h(n):e.recommendedDisplayStyle&&h(e.recommendedDisplayStyle)},[n,e.recommendedDisplayStyle]),c.useEffect(()=>{const k=window.matchMedia("(prefers-color-scheme: dark)");y(k.matches);const E=T=>y(T.matches);return k.addEventListener("change",E),()=>k.removeEventListener("change",E)},[]);const v=a??e.darkMode??"light",w=v==="dark"||v==="auto"&&b;c.useEffect(()=>{m(w&&t?t:e)},[e,t,w]),c.useEffect(()=>{if(typeof document>"u")return;const k=document.createElement("div");return k.className="nice-theme-scope nice-theme-portal-host",k.dataset.ntdProvider=l,k.style.display="contents",document.body.appendChild(k),u.current=k,p(k),()=>{k.parentNode&&k.parentNode.removeChild(k),u.current=null,p(null)}},[l]),c.useEffect(()=>{const k=d.current;if(!k)return;s&&(k.style.transition="background-color 300ms ease, color 300ms ease");const E=it(g);for(const[R,I]of Object.entries(E))k.style.setProperty(R,I);const T=u.current;if(T)for(const[R,I]of Object.entries(E))T.style.setProperty(R,I);k.style.colorScheme=w?"dark":"light",k.dataset.ntdColorScheme=w?"dark":"light",k.dataset.theme=w?"dark":"light",w?k.classList.add("nice-dark"):k.classList.remove("nice-dark"),T&&(T.style.colorScheme=w?"dark":"light",T.dataset.ntdColorScheme=w?"dark":"light",T.dataset.theme=w?"dark":"light",w?T.classList.add("nice-dark"):T.classList.remove("nice-dark"));const N=g.backgroundImage;return N&&N.type!=="none"&&N.type==="gradient"&&N.gradient&&k.style.setProperty("--ntd-bg-image",N.gradient),()=>{k&&jr(k)}},[g,w,s,f]),c.useEffect(()=>{const k=d.current;if(!k)return;const E=r?{...V,...r}:ne(S);Ue(E,k,l);const T=It(S);for(const[N,R]of Object.entries(T))k.setAttribute(N,R);return()=>{Tt(l,k)}},[r,S,l]);const A=c.useCallback(k=>{m(k)},[]),C=c.useMemo(()=>({theme:g,setTheme:A,portalTarget:f}),[g,A,f]),M=c.useMemo(()=>({displayStyle:S,variantConfig:ne(S),setDisplayStyle:h}),[S]);return x.jsx(ct.Provider,{value:C,children:x.jsx(ke.Provider,{value:M,children:x.jsx("div",{ref:d,className:"nice-theme-scope","data-ntd-provider":l,style:{display:"contents"},children:o})})})};Es.displayName="NiceThemeProvider";const Ns=c.createContext(null);function Ts(){const e=c.useContext(Ns);if(!e)throw new Error("useThemeVariants must be used within NiceThemeVariantProvider");return e}function Il({initialConfig:e,storageKey:t="ntd-variant-config",autoApply:r=!0,children:a}){const[n,s]=c.useState(()=>{if(typeof window<"u"&&t){const d=localStorage.getItem(t);if(d)try{return{...V,...JSON.parse(d)}}catch{}}return{...V,...e}});c.useEffect(()=>{r&&typeof window<"u"&&Ue(n)},[n,r]),c.useEffect(()=>{typeof window<"u"&&t&&localStorage.setItem(t,JSON.stringify(n))},[n,t]);const o=c.useCallback(d=>{s(u=>({...u,...d}))},[]),i=c.useCallback(d=>{const u=we[d];u&&s(u)},[]),l=c.useCallback(()=>{s(V)},[]);return x.jsx(Ns.Provider,{value:{config:n,setConfig:o,applyPreset:i,reset:l},children:a})}function Rl({showPresets:e=!0,showPreview:t=!0,showCSS:r=!1,collapsible:a=!0,className:n,style:s}){const{config:o,setConfig:i,applyPreset:l,reset:d}=Ts(),[u,f]=c.useState(new Set(["presets","radius","shadow"])),p=m=>{a&&f(b=>{const y=new Set(b);return y.has(m)?y.delete(m):y.add(m),y})},g=m=>!a||u.has(m);return x.jsxs("div",{className:`ntd-theme-variant-configurator ${n||""}`,style:{fontFamily:"system-ui, sans-serif",fontSize:"14px",...s},children:[e&&x.jsx(_,{title:"Presets",expanded:g("presets"),onToggle:()=>p("presets"),children:x.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:[Object.keys(we).map(m=>x.jsx("button",{onClick:()=>l(m),style:{padding:"6px 12px",border:"1px solid var(--border-color, #e5e7eb)",borderRadius:"6px",background:"var(--bg-secondary, #f9fafb)",cursor:"pointer",textTransform:"capitalize"},children:m},m)),x.jsx("button",{onClick:d,style:{padding:"6px 12px",border:"1px solid #dc2626",borderRadius:"6px",background:"var(--danger-bg, #fef2f2)",color:"var(--color-error, #dc2626)",cursor:"pointer"},children:"Reset"})]})}),x.jsx(_,{title:"Border Radius",expanded:g("radius"),onToggle:()=>p("radius"),children:x.jsx(J,{options:Object.keys(ae),value:o.radius,onChange:m=>i({radius:m}),renderPreview:m=>x.jsx("div",{style:{width:"24px",height:"24px",background:"var(--color-accent, #6366f1)",borderRadius:ae[m].md}})})}),x.jsx(_,{title:"Shadows",expanded:g("shadow"),onToggle:()=>p("shadow"),children:x.jsx(J,{options:Object.keys(he),value:o.shadow,onChange:m=>i({shadow:m}),renderPreview:m=>x.jsx("div",{style:{width:"24px",height:"24px",background:"var(--bg-primary, #fff)",borderRadius:"4px",boxShadow:he[m]}})})}),x.jsx(_,{title:"Button Style",expanded:g("button"),onToggle:()=>p("button"),children:x.jsx(J,{options:["flat","raised","outlined","ghost","soft","gradient","3d","neumorphic"],value:o.buttonStyle,onChange:m=>i({buttonStyle:m})})}),x.jsx(_,{title:"Input Style",expanded:g("input"),onToggle:()=>p("input"),children:x.jsx(J,{options:["bordered","filled","underlined","floating","soft","neumorphic"],value:o.inputStyle,onChange:m=>i({inputStyle:m})})}),x.jsx(_,{title:"Card Style",expanded:g("card"),onToggle:()=>p("card"),children:x.jsx(J,{options:["flat","elevated","bordered","glass","gradient","neumorphic"],value:o.cardStyle,onChange:m=>i({cardStyle:m})})}),x.jsx(_,{title:"Animation",expanded:g("animation"),onToggle:()=>p("animation"),children:x.jsx(J,{options:Object.keys(ve),value:o.animation,onChange:m=>i({animation:m})})}),x.jsx(_,{title:"Density",expanded:g("density"),onToggle:()=>p("density"),children:x.jsx(J,{options:Object.keys(se),value:o.density,onChange:m=>i({density:m})})}),t&&x.jsx(_,{title:"Preview",expanded:g("preview"),onToggle:()=>p("preview"),children:x.jsx(zl,{config:o})}),r&&x.jsx(_,{title:"Generated CSS",expanded:g("css"),onToggle:()=>p("css"),children:x.jsx("pre",{style:{background:"var(--text-primary, #1f2937)",color:"var(--border-color, #e5e7eb)",padding:"12px",borderRadius:"6px",fontSize:"12px",overflow:"auto",maxHeight:"200px"},children:qe(o)})})]})}function _({title:e,expanded:t,onToggle:r,children:a}){return x.jsxs("div",{style:{marginBottom:"16px"},children:[x.jsxs("button",{onClick:r,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 0",border:"none",background:"transparent",cursor:"pointer",fontSize:"14px",fontWeight:600,color:"var(--text-secondary, #374151)",textAlign:"left"},children:[x.jsx("span",{style:{transform:t?"rotate(90deg)":"none",transition:"transform 150ms"},children:"▶"}),e]}),t&&x.jsx("div",{style:{paddingLeft:"20px",paddingTop:"8px"},children:a})]})}function J({options:e,value:t,onChange:r,renderPreview:a}){return x.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:e.map(n=>x.jsxs("button",{onClick:()=>r(n),style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",border:t===n?"2px solid #6366f1":"1px solid var(--border-color, #e5e7eb)",borderRadius:"6px",background:t===n?"#eef2ff":"var(--bg-primary, #fff)",cursor:"pointer",textTransform:"capitalize",fontSize:"13px"},children:[a&&a(n),n]},n))})}function zl({config:e}){const t=We(e.buttonStyle,"var(--color-accent, #6366f1)"),r=Ve(e.inputStyle),a=Xe(e.cardStyle),n=ae[e.radius],s=se[e.density];return x.jsxs("div",{style:{padding:"20px",background:"var(--bg-secondary, #f9fafb)",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:[x.jsxs("div",{style:{padding:s.paddingX,borderRadius:n.lg,...a},children:[x.jsx("h4",{style:{margin:"0 0 12px",fontSize:s.fontSize},children:"Card Preview"}),x.jsxs("div",{style:{display:"flex",gap:s.gap,marginBottom:"12px"},children:[x.jsx("button",{style:{padding:`${s.paddingY} ${s.paddingX}`,borderRadius:n.md,color:"var(--bg-primary, #fff)",fontSize:s.fontSize,cursor:"pointer",...t},children:"Primary"}),x.jsx("button",{style:{padding:`${s.paddingY} ${s.paddingX}`,borderRadius:n.md,background:"var(--border-color, #e5e7eb)",border:"none",fontSize:s.fontSize,cursor:"pointer"},children:"Secondary"})]}),x.jsx("input",{type:"text",placeholder:"Input preview...",style:{width:"100%",height:s.inputHeight,padding:`0 ${s.paddingX}`,fontSize:s.fontSize,outline:"none",boxSizing:"border-box",...r}})]}),x.jsx("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:["Info","Success","Warning","Error"].map(o=>x.jsx("span",{style:{padding:"4px 10px",borderRadius:n.full,background:"var(--border-color, #e5e7eb)",fontSize:"12px"},children:o},o))})]})}function Fl(){const[e,t]=c.useState(()=>typeof window>"u"?!1:pe());return c.useEffect(()=>{var s;if(typeof window>"u")return;t(pe());const r=new MutationObserver(()=>t(pe()));r.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class","style"]});const a=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>t(pe());return(s=a.addEventListener)==null||s.call(a,"change",n),()=>{var o;r.disconnect(),(o=a.removeEventListener)==null||o.call(a,"change",n)}},[]),e}function pe(){var e;try{const t=document.documentElement,r=t.getAttribute("data-theme");if(r==="dark")return!0;if(r==="light")return!1;if(t.classList.contains("nice-dark")||t.classList.contains("dark"))return!0;if(t.classList.contains("nice-light"))return!1;const a=getComputedStyle(t),n=a.getPropertyValue("--text-primary").trim()||a.color;if(n){const s=n.match(/rgba?\(([^)]+)\)/);if(s){const[o,i,l]=s[1].split(",").map(d=>parseFloat(d.trim()));return(.299*o+.587*i+.114*l)/255>.5}if(/^#([0-9a-f]{3,8})$/i.test(n)){const o=n.replace("#",""),i=o.length===3?o.split("").map(f=>f+f).join(""):o.slice(0,6),l=parseInt(i.slice(0,2),16),d=parseInt(i.slice(2,4),16),u=parseInt(i.slice(4,6),16);return(.299*l+.587*d+.114*u)/255>.5}}return((e=window.matchMedia)==null?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)??!1}catch{return!1}}const Pl=["NiceTextInput","NiceTextArea","NiceNumberInput","NiceDatePicker","NiceSelect","NiceCheckbox","NiceToggle","NiceRadioGroup","NiceSlider","NiceColorPicker","NiceAutocomplete","NiceLookup","NiceCalendar","NiceDateRangeBox","NiceTagBox","NiceRangeSlider","NiceDropDownBox","NiceHtmlEditor","NiceForm","NiceRating","NiceOtpInput","NiceSignaturePad","NiceMentionInput","NiceTreeSelect","NiceMaskedInput","NiceKnob","NicePickList","NiceInlineEdit","NiceButton","NiceButtonGroup","NiceIconButton","NiceDropDownButton","NiceSpeedDialAction","NiceTable","NiceDataGrid","NiceList","NiceTreeView","NiceTreeList","NiceCardView","NiceTileView","NicePivotGrid","NiceKanbanBoard","NiceSpreadsheet","NiceBadge","NiceTag","NiceAvatar","NiceAvatarGroup","NiceProgress","NiceDivider","NiceTooltip","NiceSkeleton","NiceSpinner","NiceEmpty","NiceTimeline","NiceCarousel","NiceVirtualScroller","NiceAlert","NiceModal","NiceDrawer","NiceToastContainer","NiceConfirmDialog","NiceCookieConsent","NiceTabs","NiceAccordion","NiceBreadcrumb","NicePagination","NiceCard","NiceMenu","NiceContextMenu","NiceMultiView","NiceSplitter","NiceToolbar","NiceAppLayout","NiceBottomNavigation","NiceDashboardLayout","NiceDesktop","NiceConsole","NiceChart","NicePieChart","NicePolarChart","NiceCircularGauge","NiceLinearGauge","NiceBarGauge","NiceSparkline","NiceBullet","NiceFunnel","NiceSankey","NiceRangeSelector","NiceVectorMap","NiceHeatMap","NiceTreeMap","NiceStockChart","NiceOrganizationChart","NiceActionSheet","NicePopover","NiceLoadPanel","NiceWindow","NiceBlockUI","NiceScheduler","NiceGantt","NiceDiagram","NiceStepper","NiceBox","NiceResponsiveBox","NiceResizable","NiceScrollView","NiceChat","NiceFileUploader","NiceFileManager","NiceFilterBuilder","NiceGallery","NiceMap","div","span","row","column","stack","container"];function Hl(e){const t=[];Ls(e.root,t,"root");const r=new Set((e.dataSources??[]).map(a=>a.id));return Is(e.root,r,t),t}function Ls(e,t,r){if((!e.type||e.type.trim()==="")&&t.push(`${r}: type is empty`),e.children)for(let a=0;a<e.children.length;a++)Ls(e.children[a],t,`${r}.children[${a}]`)}function Is(e,t,r){if(e.bindings)for(const[a,n]of Object.entries(e.bindings)){const s=n.split(".")[0];!t.has(s)&&s!=="form"&&s!=="route"&&r.push(`Binding "${a}" references unknown data source "${s}"`)}if(e.children)for(const a of e.children)Is(a,t,r)}function Dl(e,t){const r=$l(t,e.field);switch(e.operator){case"eq":return r===e.value;case"neq":return r!==e.value;case"gt":return r>e.value;case"gte":return r>=e.value;case"lt":return r<e.value;case"lte":return r<=e.value;case"contains":return String(r).includes(String(e.value));case"empty":return r==null||String(r)==="";case"notEmpty":return r!=null&&String(r)!=="";default:return!0}}function $l(e,t){const r=t.split(".");let a=e;for(const n of r)if(a&&typeof a=="object"&&n in a)a=a[n];else return;return a}function Rs(e){const{itemCount:t,itemHeight:r,containerHeight:a,overscan:n=3,initialScrollTop:s=0}=e,[o,i]=c.useState(s),[l,d]=c.useState(!1),u=c.useRef(),f=c.useMemo(()=>{if(typeof r=="number")return null;const C=new Array(t+1);C[0]=0;for(let M=0;M<t;M++)C[M+1]=C[M]+r(M);return C},[t,r]),p=c.useMemo(()=>typeof r=="number"?t*r:f?f[t]:0,[t,r,f]),g=c.useCallback(C=>typeof r=="number"?r:r(C),[r]),m=c.useCallback(C=>typeof r=="number"?C*r:f?f[C]:0,[r,f]),b=c.useCallback(C=>{if(typeof r=="number")return Math.floor(C/r);if(!f)return 0;let M=0,k=t-1;for(;M<=k;){const E=Math.floor((M+k)/2),T=f[E];if(T===C)return E;T<C?M=E+1:k=E-1}return Math.max(0,M-1)},[t,r,f]),{startIndex:y,endIndex:S,visibleItems:h}=c.useMemo(()=>{const C=Math.max(0,b(o)-n);let M=C,k=m(C);for(;M<t&&k<o+a;)k+=g(M),M++;M=Math.min(t,M+n);const E=[];for(let T=C;T<M;T++)E.push({index:T,offset:m(T),height:g(T),key:T});return{startIndex:C,endIndex:M,visibleItems:E}},[o,a,t,n,b,m,g]),v=c.useCallback(C=>{const M=C.currentTarget;i(M.scrollTop),d(!0),u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{d(!1)},150)},[]),w=c.useCallback((C,M="start")=>{const k=m(C),E=g(C);let T;switch(M){case"center":T=k-a/2+E/2;break;case"end":T=k-a+E;break;default:T=k}i(Math.max(0,Math.min(T,p-a)))},[m,g,a,p]),A=c.useCallback(C=>{i(Math.max(0,Math.min(C,p-a)))},[p,a]);return c.useEffect(()=>()=>{u.current&&window.clearTimeout(u.current)},[]),{visibleItems:h,totalHeight:p,scrollTop:o,scrollToIndex:w,scrollTo:A,onScroll:v,startIndex:y,endIndex:S,isScrolling:l}}function jl(e){const{rowCount:t,columnCount:r,rowHeight:a,columnWidth:n,containerHeight:s,containerWidth:o,overscan:i=2}=e,[l,d]=c.useState(0),[u,f]=c.useState(0),[p,g]=c.useState(!1),m=c.useRef(),b=c.useMemo(()=>{if(typeof a=="number")return t*a;let v=0;for(let w=0;w<t;w++)v+=a(w);return v},[t,a]),y=c.useMemo(()=>{if(typeof n=="number")return r*n;let v=0;for(let w=0;w<r;w++)v+=n(w);return v},[r,n]),S=c.useMemo(()=>{const v=[];let w=0,A=0;if(typeof a=="number")w=Math.floor(l/a),A=w*a;else for(;w<t&&A+a(w)<l;)A+=a(w),w++;w=Math.max(0,w-i);let C=w,M=typeof a=="number"?w*a:A;for(;C<t&&M<l+s;)M+=typeof a=="number"?a:a(C),C++;C=Math.min(t,C+i);let k=0,E=0;if(typeof n=="number")k=Math.floor(u/n),E=k*n;else for(;k<r&&E+n(k)<u;)E+=n(k),k++;k=Math.max(0,k-i);let T=k,N=typeof n=="number"?k*n:E;for(;T<r&&N<u+o;)N+=typeof n=="number"?n:n(T),T++;T=Math.min(r,T+i);let R=typeof a=="number"?w*a:(()=>{let I=0;for(let H=0;H<w;H++)I+=a(H);return I})();for(let I=w;I<C;I++){const H=typeof a=="number"?a:a(I);let D=typeof n=="number"?k*n:(()=>{let z=0;for(let j=0;j<k;j++)z+=n(j);return z})();for(let z=k;z<T;z++){const j=typeof n=="number"?n:n(z);v.push({rowIndex:I,columnIndex:z,top:R,left:D,width:j,height:H,key:`${I}:${z}`}),D+=j}R+=H}return v},[l,u,t,r,a,n,s,o,i]),h=c.useCallback(v=>{const w=v.currentTarget;d(w.scrollTop),f(w.scrollLeft),g(!0),m.current&&window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g(!1)},150)},[]);return c.useEffect(()=>()=>{m.current&&window.clearTimeout(m.current)},[]),{visibleCells:S,totalWidth:y,totalHeight:b,onScroll:h,scrollTop:l,scrollLeft:u,isScrolling:p}}function Ol(e,t,r,a=3){const n=Rs({itemCount:e.length,itemHeight:r,containerHeight:t,overscan:a}),s=c.useCallback(o=>e[o.index],[e]);return{...n,getItemData:s,containerStyle:{height:t,overflow:"auto"},innerStyle:{height:n.totalHeight,position:"relative"},getItemStyle:o=>({position:"absolute",top:o.offset,left:0,right:0,height:o.height})}}function Bl(e){const{items:t,searchFn:r,debounce:a=0,minLength:n=0}=e,[s,o]=c.useState(""),i=c.useDeferredValue(s),[l,d]=c.useState(""),u=c.useRef();c.useEffect(()=>{if(a>0)return u.current=window.setTimeout(()=>{d(s)},a),()=>{u.current&&window.clearTimeout(u.current)};d(s)},[s,a]);const f=c.useDeferredValue(l),p=c.useMemo(()=>f.length<n?t:t.filter(m=>r(m,f)),[t,f,r,n]);return{query:s,setQuery:o,results:p,isStale:f!==i,deferredQuery:f}}function _l(e){const[t,r]=c.useState(e),[a,n]=c.useState(e),[s,o]=c.useTransition(),i=c.useCallback(d=>{const u=typeof d=="function"?d(t):d;n(u),o(()=>{r(u)})},[t]),l=c.useCallback(d=>{const u=typeof d=="function"?d(t):d;n(u),r(u)},[t]);return{value:t,pendingValue:a,isPending:s,setValue:i,setValueImmediate:l}}function Wl(e){const{data:t,processFn:r,chunkSize:a=1e3,priority:n="user-visible"}=e,[s,o]=c.useState(null),[i,l]=c.useState(0),[d,u]=c.useState(!1),f=c.useRef(!1),p=c.useCallback(async()=>{if(t.length===0){o([]);return}u(!0),l(0),f.current=!1;const m=[],b=t.length;for(let y=0;y<b&&!f.current;y+=a){const S=t.slice(y,y+a),h=S.map((w,A)=>r(w,y+A));m.push(...h);const v=Math.min(100,(y+S.length)/b*100);n==="background"?await new Promise(w=>{"requestIdleCallback"in window?window.requestIdleCallback(w):setTimeout(w,0)}):n==="user-visible"&&await new Promise(w=>requestAnimationFrame(w)),c.startTransition(()=>{l(v)})}o(m),u(!1),l(100)},[t,r,a,n]),g=c.useCallback(()=>{f.current=!0},[]);return c.useEffect(()=>(p(),()=>{f.current=!0}),[p]),{result:s,progress:i,isProcessing:d,process:p,cancel:g}}function Vl(e,t={}){const{initialCount:r=20,batchSize:a=50,batchDelay:n=16}=t,[s,o]=c.useState(Math.min(r,e.length)),[i,l]=c.useState(e.length<=r);return c.useEffect(()=>{if(s>=e.length){l(!0);return}const u=setTimeout(()=>{c.startTransition(()=>{o(f=>Math.min(f+a,e.length))})},n);return()=>clearTimeout(u)},[s,e.length,a,n]),c.useEffect(()=>{o(Math.min(r,e.length)),l(e.length<=r)},[e,r]),{visibleItems:c.useMemo(()=>e.slice(0,s),[e,s]),visibleCount:s,totalCount:e.length,isComplete:i,progress:s/e.length*100}}function Xl(e){const{initial:t,mutate:r,rollbackOnError:a=!0}=e,[n,s]=c.useState(t),[o,i]=c.useState(!1),[l,d]=c.useState(null),u=c.useRef(t),f=c.useCallback(async g=>{u.current=n,d(null),s(g),i(!0);try{const m=await r(g);s(m)}catch(m){d(m instanceof Error?m:new Error(String(m))),a&&s(u.current)}finally{i(!1)}},[n,r,a]),p=c.useCallback(()=>{s(t),d(null),i(!1)},[t]);return{value:n,update:f,isPending:o,error:l,reset:p}}function ql(e){const{workerScript:t,idleTimeout:r=3e4}=e,[a,n]=c.useState(null),[s,o]=c.useState(!1),[i,l]=c.useState(null),d=c.useRef(null),u=c.useRef(0),f=c.useRef(null),p=c.useRef(),g=c.useCallback(()=>{if(!d.current){if(typeof t=="function"){const h=new Blob([`(${t.toString()})()`],{type:"application/javascript"});d.current=new Worker(URL.createObjectURL(h))}else d.current=new Worker(t,{type:"module"});d.current.onmessage=h=>{const v=h.data;v.id===f.current&&(v.type==="result"?(n(v.result??null),o(!1),f.current=null,m()):v.type==="error"&&(l(new Error(v.error)),o(!1),f.current=null,m()))},d.current.onerror=h=>{l(new Error(h.message)),o(!1),f.current=null}}return d.current},[t]),m=c.useCallback(()=>{p.current&&window.clearTimeout(p.current),r>0&&(p.current=window.setTimeout(()=>{d.current&&!f.current&&(d.current.terminate(),d.current=null)},r))},[r]),b=c.useCallback(h=>new Promise((v,w)=>{const A=g(),C=`task-${++u.current}`;f.current=C,o(!0),l(null);const M=A.onmessage;A.onmessage=k=>{M==null||M.call(A,k),k.data.id===C&&(k.data.type==="result"?v(k.data.result):k.data.type==="error"&&w(new Error(k.data.error)))},A.postMessage({type:"task",id:C,data:h})}),[g]),y=c.useCallback(()=>{d.current&&f.current&&(d.current.postMessage({type:"cancel",id:f.current}),f.current=null,o(!1))},[]),S=c.useCallback(()=>{d.current&&(d.current.terminate(),d.current=null),p.current&&window.clearTimeout(p.current),f.current=null,o(!1)},[]);return c.useEffect(()=>()=>{S()},[S]),{result:a,isProcessing:s,error:i,execute:b,cancel:y,terminate:S}}function Ul(e){const{workerScript:t,poolSize:r=navigator.hardwareConcurrency||4,idleTimeout:a=6e4}=e,n=c.useRef([]),s=c.useRef([]),o=c.useRef(0),i=c.useRef(),l=c.useCallback(()=>{if(typeof t=="function"){const y=new Blob([`(${t.toString()})()`],{type:"application/javascript"});return new Worker(URL.createObjectURL(y))}return new Worker(t,{type:"module"})},[t]),d=c.useCallback(()=>{const y=n.current.find(S=>!S.busy);if(y)return y;if(n.current.length<r){const h={worker:l(),busy:!1,taskId:null};return n.current.push(h),h}return null},[l,r]),u=c.useCallback(()=>{for(;s.current.length>0;){const y=d();if(!y)break;const S=s.current.shift();y.busy=!0,y.taskId=S.id,y.worker.onmessage=h=>{const v=h.data;v.id===S.id&&(y.busy=!1,y.taskId=null,v.type==="result"?S.resolve(v.result):v.type==="error"&&S.reject(new Error(v.error)),u(),f())},y.worker.onerror=h=>{y.busy=!1,y.taskId=null,S.reject(new Error(h.message)),u()},y.worker.postMessage({type:"task",id:S.id,data:S.data})}},[d]),f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),a>0&&(i.current=window.setTimeout(()=>{n.current.filter(S=>!S.busy).forEach(S=>{S.worker.terminate(),n.current=n.current.filter(h=>h!==S)})},a))},[a]),p=c.useCallback(y=>new Promise((S,h)=>{const v=`pool-task-${++o.current}`;s.current.push({id:v,data:y,resolve:S,reject:h}),u()}),[u]),g=c.useCallback(y=>Promise.all(y.map(S=>p(S))),[p]),m=c.useCallback(()=>{n.current.forEach(y=>y.worker.terminate()),n.current=[],s.current=[],i.current&&window.clearTimeout(i.current)},[]),b=c.useCallback(()=>({total:n.current.length,busy:n.current.filter(y=>y.busy).length,idle:n.current.filter(y=>!y.busy).length,queued:s.current.length}),[]);return c.useEffect(()=>()=>{m()},[m]),{execute:p,executeAll:g,terminateAll:m,getStats:b}}function Gl(e){const t=`
96
+ HTML:`}],{temperature:.3}),l=i.content.match(/```html?\n?([\s\S]*?)```/);return l?l[1].trim():i.content.trim()}finally{r(!1)}},[e]);return{improveText:a,translate:n,generateHtml:o,isLoading:t}}class Ie{constructor(){this._listeners=new Map}on(t,r){return this._listeners.has(t)||this._listeners.set(t,new Set),this._listeners.get(t).add(r),()=>{var a;(a=this._listeners.get(t))==null||a.delete(r)}}emit(t,...r){var a;(a=this._listeners.get(t))==null||a.forEach(n=>{try{n(...r)}catch{}})}}function Vc(e,t){const r=e[t.field],a=t.value;switch(t.operator){case"=":return r==a;case"<>":return r!=a;case"<":return r<a;case"<=":return r<=a;case">":return r>a;case">=":return r>=a;case"contains":return String(r??"").toLowerCase().includes(String(a??"").toLowerCase());case"notcontains":return!String(r??"").toLowerCase().includes(String(a??"").toLowerCase());case"startswith":return String(r??"").toLowerCase().startsWith(String(a??"").toLowerCase());case"endswith":return String(r??"").toLowerCase().endsWith(String(a??"").toLowerCase());case"isblank":return r==null||r==="";case"isnotblank":return r!=null&&r!=="";default:return!0}}function Pr(e,t){if(t.items.length===0)return!0;const r=a=>a.type==="condition"?Vc(e,a):Pr(e,a);return t.logic==="and"?t.items.every(r):t.items.some(r)}function Xc(e,t){var n;let r=[...e];if(t.filter&&(r=r.filter(o=>Pr(o,t.filter))),t.search){const o=t.search.toLowerCase(),s=t.searchFields;r=r.filter(i=>(s?s.map(d=>i[d]):Object.values(i)).some(d=>String(d??"").toLowerCase().includes(o)))}const a=r.length;if((n=t.sort)!=null&&n.length&&r.sort((o,s)=>{for(const i of t.sort){const l=o[i.field]??"",d=s[i.field]??"",u=typeof l=="number"&&typeof d=="number"?l-d:String(l).localeCompare(String(d));if(u!==0)return i.direction==="desc"?-u:u}return 0}),t.skip!=null||t.take!=null){const o=t.skip??0,s=t.take??r.length;r=r.slice(o,o+s)}return{data:r,totalCount:a}}function Uc(e){const t=e.keyField??"id";let r=[...e.data];const a=new Ie;return{keyField:t,writable:!0,async load(o={}){a.emit("loading",!0);try{const s=Xc(r,o);return a.emit("loaded",s),a.emit("loading",!1),s}catch(s){throw a.emit("error",s instanceof Error?s:new Error(String(s))),a.emit("loading",!1),s}},async byKey(o){return r.find(s=>s[t]===o)},async insert(o){const s={...o};return r=[...r,s],a.emit("changed"),s},async update(o,s){const i=r.findIndex(d=>d[t]===o);if(i===-1)throw new Error(`Record not found: ${o}`);const l={...r[i],...s};return r=r.map((d,u)=>u===i?l:d),a.emit("changed"),l},async remove(o){r=r.filter(s=>s[t]!==o),a.emit("changed")},on:a.on.bind(a)}}async function qc(e){const t={"Content-Type":"application/json"};if(!e.headers)return t;const r=typeof e.headers=="function"?await e.headers():e.headers;return{...t,...r}}function De(e,t,r){return typeof e=="function"?e(r):e||`${t}/${encodeURIComponent(String(r))}`}function Gc(e){var r,a,n;const t={};return e.skip!=null&&(t.skip=String(e.skip)),e.take!=null&&(t.take=String(e.take)),e.search&&(t.search=e.search),(r=e.sort)!=null&&r.length&&(t.sort=e.sort.map(o=>`${o.field} ${o.direction}`).join(",")),e.filter&&(t.filter=JSON.stringify(e.filter)),(a=e.select)!=null&&a.length&&(t.select=e.select.join(",")),(n=e.expand)!=null&&n.length&&(t.expand=e.expand.join(",")),t}function Kc(e){if(Array.isArray(e))return{data:e,totalCount:e.length};const t=e,r=t.data??t.items??t.value??t.results??[],a=t.totalCount??t.total??t.count??t["@odata.count"]??r.length;return{data:r,totalCount:a}}function Dr(e){const t=e.keyField??"id",r=new Ie;async function a(o,s){const i=await qc(e),l=await fetch(o,{...e.fetchOptions,...s,headers:{...i,...s==null?void 0:s.headers}});if(!l.ok){const u=await l.text().catch(()=>l.statusText);throw new Error(`HTTP ${l.status}: ${u}`)}return(l.headers.get("content-type")??"").includes("json")?l.json():l.text()}return{keyField:t,writable:!0,async load(o={}){var s;r.emit("loading",!0);try{const i=e.loadUrl??e.url,l=e.mapLoadParams?e.mapLoadParams(o):Gc(o),d=new URLSearchParams(l).toString(),u=d?`${i}?${d}`:i,m=await a(u),g=e.extractLoadResult?e.extractLoadResult(m):Kc(m);return r.emit("loaded",g),r.emit("loading",!1),g}catch(i){const l=i instanceof Error?i:new Error(String(i));throw r.emit("error",l),r.emit("loading",!1),(s=e.onError)==null||s.call(e,l,"load"),l}},async byKey(o){const s=De(e.byKeyUrl,e.url,o),i=await a(s);return e.extractItem?e.extractItem(i):i},async insert(o){const s=e.insertUrl??e.url,i=e.prepareInsertBody?e.prepareInsertBody(o):o,l=await a(s,{method:"POST",body:JSON.stringify(i)}),d=e.extractItem?e.extractItem(l):l;return r.emit("changed"),d},async update(o,s){const i=De(e.updateUrl,e.url,o),l=e.prepareUpdateBody?e.prepareUpdateBody(o,s):s,d=await a(i,{method:e.updateMethod??"PUT",body:JSON.stringify(l)}),u=e.extractItem?e.extractItem(d):d;return r.emit("changed"),u},async remove(o){const s=De(e.deleteUrl,e.url,o);await a(s,{method:"DELETE"}),r.emit("changed")},on:r.on.bind(r)}}function Jc(e,t){const r=e.field,a=typeof e.value=="string"?`'${e.value.replace(/'/g,"''")}'`:String(e.value??"null");switch(e.operator){case"=":return`${r} eq ${a}`;case"<>":return`${r} ne ${a}`;case"<":return`${r} lt ${a}`;case"<=":return`${r} le ${a}`;case">":return`${r} gt ${a}`;case">=":return`${r} ge ${a}`;case"contains":return t>=4?`contains(${r},${a})`:`substringof(${a},${r})`;case"notcontains":return t>=4?`not contains(${r},${a})`:`not substringof(${a},${r})`;case"startswith":return`startswith(${r},${a})`;case"endswith":return`endswith(${r},${a})`;case"isblank":return`${r} eq null`;case"isnotblank":return`${r} ne null`;default:return"true"}}function Hr(e,t){return e.items.length===0?"":e.items.map(a=>a.type==="condition"?Jc(a,t):`(${Hr(a,t)})`).join(e.logic==="and"?" and ":" or ")}function Yc(e){const t=e.version??4,r={url:e.url,keyField:e.keyField,headers:e.headers,fetchOptions:e.fetchOptions,onError:e.onError,updateMethod:"PATCH",mapLoadParams(a){var o,s,i;const n={};if(t>=4&&(n.$count="true"),a.skip!=null&&(n.$skip=String(a.skip)),a.take!=null&&(n.$top=String(a.take)),(o=a.sort)!=null&&o.length&&(n.$orderby=a.sort.map(l=>`${l.field} ${l.direction}`).join(",")),a.filter){const l=Hr(a.filter,t);l&&(n.$filter=l)}return a.search&&(n.$search=`"${a.search}"`),(s=a.select)!=null&&s.length&&(n.$select=a.select.join(",")),(i=a.expand)!=null&&i.length&&(n.$expand=a.expand.join(",")),n},extractLoadResult(a){var i,l;const n=a,o=n.value??((i=n.d)==null?void 0:i.results)??[],s=n["@odata.count"]??((l=n.d)==null?void 0:l.__count)??o.length;return{data:o,totalCount:s}},byKeyUrl:a=>{const n=typeof a=="number"?a:`'${String(a).replace(/'/g,"''")}'`;return`${e.url}(${n})`}};return Dr(r)}function Qc(e){const t=e.keyField??"id",r=new Ie;async function a(l,d){var f;const u={"Content-Type":"application/json"},m=e.headers?typeof e.headers=="function"?await e.headers():e.headers:{},g=await fetch(e.url,{method:"POST",headers:{...u,...m},body:JSON.stringify({query:l,variables:d})});if(!g.ok){const y=await g.text().catch(()=>g.statusText);throw new Error(`GraphQL HTTP ${g.status}: ${y}`)}const h=await g.json();if((f=h.errors)!=null&&f.length)throw new Error(h.errors.map(y=>y.message).join("; "));return h.data}function n(l){var u;const d={};return l.skip!=null&&(d.skip=l.skip),l.take!=null&&(d.take=l.take),l.search&&(d.search=l.search),(u=l.sort)!=null&&u.length&&(d.sort=l.sort),l.filter&&(d.filter=l.filter),d}function o(l){if(!l||typeof l!="object")return{data:[],totalCount:0};const d=Object.values(l)[0];if(!d)return{data:[],totalCount:0};if(Array.isArray(d))return{data:d,totalCount:d.length};const u=d.items??d.nodes??d.edges??d.data??[],m=d.totalCount??d.total??d.count??u.length;return{data:u,totalCount:m}}function s(l){return!l||typeof l!="object"?l:Object.values(l)[0]}return{keyField:t,writable:!!(e.queries.insert||e.queries.update||e.queries.remove),async load(l={}){var d;r.emit("loading",!0);try{const u=e.mapVariables?e.mapVariables(l):n(l),m=await a(e.queries.load,u),g=e.extractLoadResult?e.extractLoadResult(m):o(m);return r.emit("loaded",g),r.emit("loading",!1),g}catch(u){const m=u instanceof Error?u:new Error(String(u));throw r.emit("error",m),r.emit("loading",!1),(d=e.onError)==null||d.call(e,m,"load"),m}},async byKey(l){if(!e.queries.byKey)throw new Error("byKey query not configured");const d=await a(e.queries.byKey,{[t]:l});return e.extractItem?e.extractItem(d):s(d)},insert:e.queries.insert?async l=>{const d=await a(e.queries.insert,{input:l}),u=e.extractItem?e.extractItem(d):s(d);return r.emit("changed"),u}:void 0,update:e.queries.update?async(l,d)=>{const u=await a(e.queries.update,{[t]:l,input:d}),m=e.extractItem?e.extractItem(u):s(u);return r.emit("changed"),m}:void 0,remove:e.queries.remove?async l=>{await a(e.queries.remove,{[t]:l}),r.emit("changed")}:void 0,on:r.on.bind(r)}}function Zc(e){const t=e.keyField??"id",r=new Ie;return{keyField:t,writable:!!(e.insert||e.update||e.remove),async load(n={}){r.emit("loading",!0);try{const o=await e.load(n);return r.emit("loaded",o),r.emit("loading",!1),o}catch(o){const s=o instanceof Error?o:new Error(String(o));throw r.emit("error",s),r.emit("loading",!1),s}},async byKey(n){if(!e.byKey)throw new Error("byKey handler not configured");return e.byKey(n)},insert:e.insert?async n=>{const o=await e.insert(n);return r.emit("changed"),o}:void 0,update:e.update?async(n,o)=>{const s=await e.update(n,o);return r.emit("changed"),s}:void 0,remove:e.remove?async n=>{await e.remove(n),r.emit("changed")}:void 0,on:r.on.bind(r)}}class Be{constructor(t={}){this.cache=new Map,this.ttl=t.ttl??6e4,this.maxSize=t.maxSize??100}get(t){const r=this.cache.get(t);if(r){if(Date.now()>r.expiresAt){this.cache.delete(t);return}return this.cache.delete(t),this.cache.set(t,r),r.data}}set(t,r,a){if(this.cache.size>=this.maxSize){const n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(t,{data:r,timestamp:Date.now(),expiresAt:Date.now()+(a??this.ttl)})}has(t){return this.get(t)!==void 0}invalidate(t){this.cache.delete(t)}invalidateAll(){this.cache.clear()}invalidateMatching(t){for(const r of this.cache.keys())t.test(r)&&this.cache.delete(r)}}class $r{constructor(){this.pending=new Map}async dedupe(t,r){const a=this.pending.get(t);if(a)return a;const n=r().finally(()=>{this.pending.delete(t)});return this.pending.set(t,n),n}hasPending(t){return this.pending.has(t)}cancelAll(){this.pending.clear()}}function el(e,t={}){const r=new Be(t),a=new Be(t),n=new $r,o=t.generateKey??(l=>JSON.stringify(l)),s=t.cacheLoads!==!1,i=t.cacheByKey!==!1;return{...e,cache:r,async load(l={}){const d=`load:${o(l)}`;if(s){const u=r.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.load(l);return s&&r.set(d,u),u})},async byKey(l){const d=`byKey:${String(l)}`;if(i){const u=a.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.byKey(l);return i&&u&&a.set(d,u),u})},async insert(l){const d=await e.insert(l);return r.invalidateAll(),d},async update(l,d){const u=await e.update(l,d);return r.invalidateAll(),a.invalidate(`byKey:${String(l)}`),u},async remove(l){await e.remove(l),r.invalidateAll(),a.invalidate(`byKey:${String(l)}`)},invalidateCache(){r.invalidateAll(),a.invalidateAll()}}}function tl(e,t){const{cursorField:r,pageSize:a=20,direction:n="asc"}=t;return{async loadPage(o={}){var p;const s=o.pageSize??a,i=o.direction??"forward",l=o.cursor?{type:"condition",field:r,operator:i==="forward"?n==="asc"?">":"<":n==="asc"?"<":">",value:rl(o.cursor)}:null,d=l?{type:"group",logic:"and",items:[...((p=o.filter)==null?void 0:p.items)??[],l]}:o.filter,u=[{field:r,direction:i==="forward"?n:n==="asc"?"desc":"asc"},...o.sort??[]],m=await e.load({...o,filter:d,sort:u,take:s+1}),g=m.data.length>s,h=g?m.data.slice(0,s):m.data;i==="backward"&&h.reverse();const f=h[h.length-1],y=h[0];return{data:h,nextCursor:g&&f?He(f[r]):null,prevCursor:y&&o.cursor?He(y[r]):null,hasMore:g}},async*loadAll(o={}){let s=null;do{const i=await e.load({...o,...s?{cursor:s}:{}});if(i.data.length===0)break;yield i.data;const l=i.data[i.data.length-1];s=l?He(l[r]):null}while(s)}}}function He(e){return btoa(JSON.stringify(e))}function rl(e){try{return JSON.parse(atob(e))}catch{return e}}function al(e,t={}){const{pageSize:r=50,threshold:a=200,initialPage:n=0}=t;let o={items:[],isLoading:!1,hasMore:!0,error:null,page:n,totalCount:0};const s=new Set;function i(){s.forEach(h=>h(o))}function l(h){o={...o,...h},i()}let d={};async function u(){if(!(o.isLoading||!o.hasMore)){l({isLoading:!0,error:null});try{const h=await e.load({...d,skip:o.page*r,take:r}),f=[...o.items,...h.data],y=f.length<h.totalCount;l({items:f,page:o.page+1,totalCount:h.totalCount,hasMore:y,isLoading:!1})}catch(h){l({error:h instanceof Error?h:new Error(String(h)),isLoading:!1})}}}function m(h={}){d=h,o={items:[],isLoading:!1,hasMore:!0,error:null,page:0,totalCount:0},i()}function g(h){const f=h.target;if(!f)return;f.scrollHeight-f.scrollTop-f.clientHeight<a&&u()}return{get state(){return o},loadMore:u,reset:m,handleScroll:g,subscribe(h){return s.add(h),()=>s.delete(h)},setOptions(h){d=h}}}function nl(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:o=10,heartbeatInterval:s=3e4}=e;let i=null,l=0,d=null,u=[];const m=new Map;function g(k,...M){var C;(C=m.get(k))==null||C.forEach(A=>A(...M))}function h(k){if(e.parseMessage)return e.parseMessage(k);try{return JSON.parse(k.data)}catch{return null}}function f(k){return e.serializeMessage?e.serializeMessage(k):JSON.stringify(k)}function y(k){switch(k.type){case"insert":k.data&&(u=[...u,k.data],g("changed"));break;case"update":k.key&&k.changes&&(u=u.map(M=>M[a]===k.key?{...M,...k.changes}:M),g("changed"));break;case"remove":k.key&&(u=u.filter(M=>M[a]!==k.key),g("changed"));break;case"refresh":case"sync":E.load().catch(()=>{});break}}function p(){(i==null?void 0:i.readyState)!==WebSocket.OPEN&&(i=new WebSocket(t),i.onopen=()=>{l=0,g("connected"),b()},i.onmessage=k=>{const M=h(k);M&&(y(M),g("message",M))},i.onerror=k=>{g("error",new Error("WebSocket error"))},i.onclose=()=>{v(),g("disconnected"),l<o&&(l++,setTimeout(p,n*Math.min(l,5)))})}function S(){v(),i&&(i.close(),i=null)}function b(){v(),d=window.setInterval(()=>{(i==null?void 0:i.readyState)===WebSocket.OPEN&&i.send(JSON.stringify({type:"ping"}))},s)}function v(){d&&(clearInterval(d),d=null)}function w(k){(i==null?void 0:i.readyState)===WebSocket.OPEN&&i.send(f(k))}const E={keyField:a,writable:r.writable,async load(k={}){g("loading",!0);try{const M=await r.load(k);return u=M.data,g("loaded",M),g("loading",!1),M}catch(M){throw g("error",M),g("loading",!1),M}},async byKey(k){const M=u.find(C=>C[a]===k);return M||r.byKey(k)},async insert(k){const M=await r.insert(k);return w({type:"insert",data:M}),M},async update(k,M){const C=await r.update(k,M);return w({type:"update",key:k,changes:M}),C},async remove(k){await r.remove(k),w({type:"remove",key:k})},on(k,M){return m.has(k)||m.set(k,new Set),m.get(k).add(M),()=>{var C;return(C=m.get(k))==null?void 0:C.delete(M)}},connect:p,disconnect:S,isConnected:()=>(i==null?void 0:i.readyState)===WebSocket.OPEN,sendMessage:w};return E}function ol(e){const{connection:t,baseSource:r}=e,a={onInsert:"OnInsert",onUpdate:"OnUpdate",onRemove:"OnRemove",onRefresh:"OnRefresh",insert:"Insert",update:"Update",remove:"Remove",...e.methods},n=r.keyField;let o=[];const s=new Map;function i(m,...g){var h;(h=s.get(m))==null||h.forEach(f=>f(...g))}const l=m=>{o=[...o,m],i("changed")},d=(m,g)=>{o=o.map(h=>h[n]===m?{...h,...g}:h),i("changed")},u=m=>{o=o.filter(g=>g[n]!==m),i("changed")};return{keyField:n,writable:r.writable,async load(m={}){i("loading",!0);try{const g=await r.load(m);return o=g.data,i("loaded",g),i("loading",!1),g}catch(g){throw i("error",g),i("loading",!1),g}},async byKey(m){const g=o.find(h=>h[n]===m);return g||r.byKey(m)},async insert(m){return await t.invoke(a.insert,m)},async update(m,g){return await t.invoke(a.update,m,g)},async remove(m){await t.invoke(a.remove,m)},on(m,g){return s.has(m)||s.set(m,new Set),s.get(m).add(g),()=>{var h;return(h=s.get(m))==null?void 0:h.delete(g)}},async connect(){t.on(a.onInsert,l),t.on(a.onUpdate,d),t.on(a.onRemove,u),t.on(a.onRefresh,()=>this.load()),await t.start()},async disconnect(){t.off(a.onInsert,l),t.off(a.onUpdate,d),t.off(a.onRemove,u),t.off(a.onRefresh,()=>{}),await t.stop()}}}function sl(e,t={}){const r=e.keyField;let a=[];const n=new Map;let o=0;const s=new Map;function i(d,...u){var m;(m=s.get(d))==null||m.forEach(g=>g(...u))}function l(){return`op_${++o}_${Date.now()}`}return{keyField:r,writable:!0,async load(d={}){const u=await e.load(d);return a=u.data,u},async byKey(d){return a.find(u=>u[r]===d)??e.byKey(d)},async insert(d){var g,h,f;const u=l(),m={...d};a=[...a,m],n.set(u,{id:u,action:"insert",item:m}),(g=t.onOptimisticApply)==null||g.call(t,m,"insert"),i("changed");try{const y=await e.insert(d);return a=a.map(p=>p===m?y:p),n.delete(u),(h=t.onConfirm)==null||h.call(t,y,"insert"),i("changed"),y}catch(y){throw a=a.filter(p=>p!==m),n.delete(u),(f=t.onRollback)==null||f.call(t,m,"insert",y instanceof Error?y:new Error(String(y))),i("changed"),y}},async update(d,u){var y,p,S;const m=l(),g=a.findIndex(b=>b[r]===d);if(g===-1)return e.update(d,u);const h=a[g],f={...h,...u};a=a.map((b,v)=>v===g?f:b),n.set(m,{id:m,action:"update",key:d,originalItem:h}),(y=t.onOptimisticApply)==null||y.call(t,f,"update"),i("changed");try{const b=await e.update(d,u);return a=a.map((v,w)=>w===g?b:v),n.delete(m),(p=t.onConfirm)==null||p.call(t,b,"update"),i("changed"),b}catch(b){throw a=a.map((v,w)=>w===g?h:v),n.delete(m),(S=t.onRollback)==null||S.call(t,h,"update",b instanceof Error?b:new Error(String(b))),i("changed"),b}},async remove(d){var g,h,f;const u=l(),m=a.find(y=>y[r]===d);if(!m)return e.remove(d);a=a.filter(y=>y!==m),n.set(u,{id:u,action:"remove",key:d,originalItem:m}),(g=t.onOptimisticApply)==null||g.call(t,m,"remove"),i("changed");try{await e.remove(d),n.delete(u),(h=t.onConfirm)==null||h.call(t,m,"remove")}catch(y){throw a=[...a,m],n.delete(u),(f=t.onRollback)==null||f.call(t,m,"remove",y instanceof Error?y:new Error(String(y))),i("changed"),y}},on(d,u){return s.has(d)||s.set(d,new Set),s.get(d).add(u),()=>{var m;return(m=s.get(d))==null?void 0:m.delete(u)}},hasPendingChanges:()=>n.size>0,getPendingCount:()=>n.size}}function jr(e,t,r){const a=new Map(e.map(d=>[d[r],d])),n=new Map(t.map(d=>[d[r],d])),o=[],s=[],i=[],l=[];for(const[d,u]of n){const m=a.get(d);if(!m)o.push(u);else if(Or(m,u))l.push(u);else{const g={};for(const h of Object.keys(u))m[h]!==u[h]&&(g[h]=u[h]);s.push({key:d,changes:g,oldItem:m,newItem:u})}}for(const[d,u]of a)n.has(d)||i.push(u);return{inserted:o,updated:s,removed:i,unchanged:l}}function Or(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e===null||t===null||typeof e!="object")return e===t;const r=e,a=t,n=new Set([...Object.keys(r),...Object.keys(a)]);for(const o of n)if(!Or(r[o],a[o]))return!1;return!0}function il(e,t={}){const{interval:r=5e3,autoStart:a=!1,pauseWhenHidden:n=!0,onDataChange:o}=t;let s=r,i=null,l=[],d={};const u=new Map;function m(p,...S){var b;(b=u.get(p))==null||b.forEach(v=>v(...S))}async function g(){if(!(n&&document.hidden))try{const p=await e.load(d),S=jr(l,p.data,e.keyField);(S.inserted.length||S.updated.length||S.removed.length)&&(l=p.data,m("changed"),o==null||o(S))}catch{}}function h(){i||(i=window.setInterval(g,s))}function f(){i&&(clearInterval(i),i=null)}n&&document.addEventListener("visibilitychange",()=>{document.hidden||i&&g()});const y={...e,async load(p={}){d=p;const S=await e.load(p);return l=S.data,S},on(p,S){u.has(p)||u.set(p,new Set),u.get(p).add(S);const b=e.on(p,S);return()=>{var v;(v=u.get(p))==null||v.delete(S),b()}},startPolling:h,stopPolling:f,isPolling:()=>i!==null,setInterval(p){s=p,i&&(f(),h())}};return a&&h(),y}function cl(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:o=10,withCredentials:s=!1}=e;let i=null,l=0,d=null,u=[];const m=new Map;function g(b,...v){var w;(w=m.get(b))==null||w.forEach(E=>E(...v))}function h(b){if(e.parseEvent)return e.parseEvent(b);try{return JSON.parse(b.data)}catch{return null}}function f(b){switch(b.type){case"insert":b.data&&(u=[...u,b.data],g("changed"));break;case"update":b.key&&b.changes&&(u=u.map(v=>v[a]===b.key?{...v,...b.changes}:v),g("changed"));break;case"remove":b.key&&(u=u.filter(v=>v[a]!==b.key),g("changed"));break;case"snapshot":Array.isArray(b.data)&&(u=b.data,g("changed"));break;case"refresh":S.load().catch(()=>{});break}}function y(){(i==null?void 0:i.readyState)!==EventSource.OPEN&&(p(),i=new EventSource(t,{withCredentials:s}),i.onopen=()=>{l=0,g("connected")},i.onmessage=b=>{const v=h(b);v&&(f(v),g("message",v))},i.onerror=()=>{if(g("error",new Error("SSE connection error")),(i==null?void 0:i.readyState)===EventSource.CLOSED&&(g("disconnected"),i=null,l<o)){l++;const b=n*Math.min(l,5);d=setTimeout(y,b)}})}function p(){d&&(clearTimeout(d),d=null),i&&(i.close(),i=null)}const S={keyField:a,writable:r.writable,async load(b={}){g("loading",!0);try{const v=await r.load(b);return u=v.data,g("loaded",v),g("loading",!1),v}catch(v){throw g("error",v),g("loading",!1),v}},async byKey(b){const v=u.find(w=>w[a]===b);return v||r.byKey(b)},async insert(b){return r.insert(b)},async update(b,v){return r.update(b,v)},async remove(b){return r.remove(b)},on(b,v){return m.has(b)||m.set(b,new Set),m.get(b).add(v),()=>{var w;return(w=m.get(b))==null?void 0:w.delete(v)}},connect:y,disconnect:p,isConnected:()=>(i==null?void 0:i.readyState)===EventSource.OPEN};return S}function q(e,t){const r={};for(const a of t){const n=e.map(s=>s[a.field]).filter(s=>s!=null),o=a.alias??`${a.fn}_${a.field}`;switch(a.fn){case"sum":r[o]=n.reduce((s,i)=>Number(s)+Number(i),0);break;case"avg":r[o]=n.length?n.reduce((s,i)=>Number(s)+Number(i),0)/n.length:0;break;case"min":r[o]=n.length?Math.min(...n.map(Number)):null;break;case"max":r[o]=n.length?Math.max(...n.map(Number)):null;break;case"count":r[o]=n.length;break;case"first":r[o]=n[0]??null;break;case"last":r[o]=n[n.length-1]??null;break;case"distinct":r[o]=[...new Set(n)];break}}return r}function it(e,t){const{groupBy:r,aggregates:a=[],includeItems:n=!1,sortGroups:o}=t;if(r.length===0)return[{key:{},count:e.length,aggregates:q(e,a),items:n?e:void 0}];const s=new Map;for(const l of e){const d={};for(const m of r)d[m]=l[m];const u=JSON.stringify(d);s.has(u)||s.set(u,{key:d,items:[]}),s.get(u).items.push(l)}const i=[];for(const[,l]of s)i.push({key:l.key,count:l.items.length,aggregates:q(l.items,a),items:n?l.items:void 0});return o!=null&&o.length&&i.sort((l,d)=>{for(const u of o){const m=l.key[u.field]??l.aggregates[u.field],g=d.key[u.field]??d.aggregates[u.field],h=typeof m=="number"&&typeof g=="number"?m-g:String(m??"").localeCompare(String(g??""));if(h!==0)return u.direction==="desc"?-h:h}return 0}),i}function _r(e,t,r=[]){if(t.length===0)return[{key:{},count:e.length,aggregates:q(e,r),items:e}];const[a,...n]=t,o=it(e,{groupBy:[a],aggregates:r,includeItems:!0});if(n.length>0)for(const s of o)s.groups=_r(s.items,n,r),delete s.items;return o}function ll(e,t){const{rows:r,columns:a,values:n,aggregateFunction:o="sum",rowTotals:s=!0,columnTotals:i=!0,grandTotal:l=!0}=t,d=[...new Set(e.map(f=>String(f[a])))].sort(),u=it(e,{groupBy:r,includeItems:!0}),m=[];for(const f of u){const y={rowKey:f.key,values:{}};for(const p of d){const S=f.items.filter(v=>String(v[a])===p),b=q(S,[{field:n,fn:o}]);y.values[p]=b[`${o}_${n}`]??null}if(s){const p=q(f.items,[{field:n,fn:o}]);y.rowTotal=p[`${o}_${n}`]}m.push(y)}let g;if(i){g={};for(const f of d){const y=e.filter(S=>String(S[a])===f),p=q(y,[{field:n,fn:o}]);g[f]=p[`${o}_${n}`]}}let h;return l&&(h=q(e,[{field:n,fn:o}])[`${o}_${n}`]),{columnHeaders:d,rows:m,columnTotals:g,grandTotal:h}}function dl(e,t){return e.map((r,a)=>{const n={...r};for(const o of t)n[o.name]=o.formula(r,a,e);return n})}const ul={runningSum:e=>(t,r,a)=>a.slice(0,r+1).reduce((n,o)=>n+Number(o[e]??0),0),runningAvg:e=>(t,r,a)=>{const n=a.slice(0,r+1);return n.reduce((o,s)=>o+Number(s[e]??0),0)/n.length},percentOfTotal:e=>(t,r,a)=>{const n=a.reduce((o,s)=>o+Number(s[e]??0),0);return n?Number(t[e]??0)/n*100:0},rank:(e,t="desc")=>(r,a,n)=>[...n].sort((s,i)=>{const l=Number(s[e]??0)-Number(i[e]??0);return t==="desc"?-l:l}).findIndex(s=>s===r)+1,diffFromPrevious:e=>(t,r,a)=>r===0?null:Number(t[e]??0)-Number(a[r-1][e]??0),percentChange:e=>(t,r,a)=>{if(r===0)return null;const n=Number(a[r-1][e]??0);return n===0?null:(Number(t[e]??0)-n)/n*100},movingAverage:(e,t)=>(r,a,n)=>{const o=Math.max(0,a-t+1),s=n.slice(o,a+1);return s.reduce((i,l)=>i+Number(l[e]??0),0)/s.length},conditional:(e,t,r)=>a=>e(a)?t:r,concat:(...e)=>t=>e.map(r=>t[r]??"").join(" "),formatDate:(e,t="medium")=>r=>{const a=r[e];return a?new Date(a).toLocaleDateString(void 0,{dateStyle:t}):""}};function fl(e,t){const r=[],a=new Map,n=new Map;for(let i=0;i<e.length;i++){const l=e[i];for(const d of t)if(!d.validate(l,i,e)){const u=typeof d.message=="function"?d.message(l):d.message,m={index:i,rule:d.name,message:u,severity:d.severity??"error",fields:d.fields??[],item:l};r.push(m),a.has(i)||a.set(i,[]),a.get(i).push(m);for(const g of m.fields)n.has(g)||n.set(g,[]),n.get(g).push(m)}}const o=r.filter(i=>i.severity==="error").length,s=r.filter(i=>i.severity==="warning").length;return{isValid:o===0,errorCount:o,warningCount:s,errors:r,byIndex:a,byField:n}}const ml={required:e=>({name:`required_${String(e)}`,validate:t=>t[e]!=null&&t[e]!=="",message:`${String(e)} is required`,fields:[String(e)]}),minLength:(e,t)=>({name:`minLength_${String(e)}`,validate:r=>String(r[e]??"").length>=t,message:`${String(e)} must be at least ${t} characters`,fields:[String(e)]}),maxLength:(e,t)=>({name:`maxLength_${String(e)}`,validate:r=>String(r[e]??"").length<=t,message:`${String(e)} must be at most ${t} characters`,fields:[String(e)]}),min:(e,t)=>({name:`min_${String(e)}`,validate:r=>Number(r[e])>=t,message:`${String(e)} must be at least ${t}`,fields:[String(e)]}),max:(e,t)=>({name:`max_${String(e)}`,validate:r=>Number(r[e])<=t,message:`${String(e)} must be at most ${t}`,fields:[String(e)]}),email:e=>({name:`email_${String(e)}`,validate:t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t[e]??"")),message:`${String(e)} must be a valid email`,fields:[String(e)]}),pattern:(e,t,r)=>({name:`pattern_${String(e)}`,validate:a=>t.test(String(a[e]??"")),message:r??`${String(e)} has invalid format`,fields:[String(e)]}),unique:e=>({name:`unique_${String(e)}`,validate:(t,r,a)=>{const n=t[e];return a.findIndex(o=>o[e]===n)===r},message:`${String(e)} must be unique`,fields:[String(e)]}),custom:(e,t,r,a)=>({name:e,validate:t,message:r,fields:a})},pl={async updateWhere(e,t,r){return e.map(a=>{if(!t(a))return a;const n=typeof r=="function"?r(a):r;return{...a,...n}})},async removeWhere(e,t){const r=[],a=[];for(const n of e)t(n)?a.push(n):r.push(n);return{remaining:r,removed:a}},async transform(e,t,r={}){const{parallel:a=!1,batchSize:n=10}=r,o=[],s=[];let i=0;if(a)for(let l=0;l<e.length;l+=n){const d=e.slice(l,l+n),u=await Promise.allSettled(d.map((m,g)=>t(m,l+g)));for(let m=0;m<u.length;m++){const g=u[m];g.status==="fulfilled"?(o.push(g.value),i++):s.push({index:l+m,item:d[m],error:g.reason})}}else for(let l=0;l<e.length;l++)try{const d=await t(e[l],l);o.push(d),i++}catch(d){s.push({index:l,item:e[l],error:d instanceof Error?d:new Error(String(d))})}return{succeeded:i,failed:s.length,errors:s,results:o}},deduplicate(e,t){const r=new Set;return e.filter(a=>{const n=a[t];return r.has(n)?!1:(r.add(n),!0)})},merge(e,t,r,a={}){const{updateExisting:n=!0,addNew:o=!0}=a,s=new Map(e.map(l=>[l[r],l])),i=[...e];for(const l of t){const d=l[r],u=s.get(d);if(u){if(n){const m=i.indexOf(u);i[m]={...u,...l}}}else o&&i.push(l)}return i}};function gl(e,t){const r=(t==null?void 0:t.autoLoad)??!0,a=(t==null?void 0:t.defaultPageSize)??20,[n,o]=c.useState([]),[s,i]=c.useState(0),[l,d]=c.useState(!1),[u,m]=c.useState(null),[g,h]=c.useState(1),[f,y]=c.useState(a),[p,S]=c.useState((t==null?void 0:t.defaultSort)??[]),[b,v]=c.useState(t==null?void 0:t.defaultFilter),[w,E]=c.useState((t==null?void 0:t.defaultSearch)??""),k=c.useRef(0),M=t==null?void 0:t.loadOptions,C=c.useCallback(async()=>{if(!e)return;const z=++k.current;d(!0),m(null);try{const j=await e.load({skip:(g-1)*f,take:f,sort:p.length?p:void 0,filter:b,search:w||void 0,...M});if(z!==k.current)return;o(j.data),i(j.totalCount)}catch(j){if(z!==k.current)return;m(j instanceof Error?j.message:String(j))}finally{z===k.current&&d(!1)}},[e,g,f,p,b,w,M]);c.useEffect(()=>{r&&C()},[C,r]),c.useEffect(()=>{if(e)return e.on("changed",()=>{C()})},[e,C]);const A=c.useCallback((z,j)=>{S([{field:z,direction:j}]),h(1)},[]),T=c.useCallback(z=>{v(z),h(1)},[]),N=c.useCallback(z=>{E(z),h(1)},[]),R=c.useCallback(z=>{y(z),h(1)},[]),I=c.useCallback(async z=>{if(!(e!=null&&e.insert))throw new Error("DataSource is not writable");await e.insert(z)},[e]),F=c.useCallback(async(z,j)=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");await e.update(z,j)},[e]),H=c.useCallback(async z=>{if(!(e!=null&&e.remove))throw new Error("DataSource is not writable");await e.remove(z)},[e]);return{data:n,totalCount:s,loading:l,error:u,page:g,pageSize:f,sort:p,filter:b,search:w,setPage:h,setPageSize:R,setSort:S,setSortField:A,setFilter:T,setSearch:N,reload:C,insert:I,update:F,remove:H}}function Br(e,t){const[r,a]=c.useState(void 0),[n,o]=c.useState({}),[s,i]=c.useState(!1),[l,d]=c.useState(null),u=c.useRef(0),m=c.useCallback(async()=>{if(!e||t==null){a(void 0);return}const b=++u.current;i(!0),d(null);try{const v=await e.byKey(t);if(b!==u.current)return;a(v),o({})}catch(v){if(b!==u.current)return;d(v instanceof Error?v.message:String(v))}finally{b===u.current&&i(!1)}},[e,t]);c.useEffect(()=>{m()},[m]),c.useEffect(()=>{if(e)return e.on("changed",()=>{m()})},[e,m]);const g=c.useMemo(()=>({...r??{},...n}),[r,n]),h=Object.keys(n).length>0,f=c.useCallback((b,v)=>{o(w=>({...w,[b]:v}))},[]),y=c.useCallback(b=>{o(v=>({...v,...b}))},[]),p=c.useCallback(async()=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");h&&await e.update(t,n)},[e,t,n,h]),S=c.useCallback(()=>{o({})},[]);return{data:r,editData:g,loading:s,error:l,changes:n,isDirty:h,set:f,setMany:y,save:p,reload:m,reset:S}}function yl(e,t,r){const a=Br(e,t),n=a.editData[r],o=c.useCallback(i=>{a.set(r,i)},[a,r]),s=c.useCallback(async()=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");const i={[r]:a.editData[r]};await e.update(t,i)},[e,t,r,a.editData]);return{value:n,setValue:o,loading:a.loading,error:a.error,isDirty:r in a.changes,save:s}}function hl(e,t,r,a){const n=(a==null?void 0:a.autoLoad)??!0,o=(a==null?void 0:a.take)??200,[s,i]=c.useState([]),[l,d]=c.useState(!1),[u,m]=c.useState(null),g=c.useRef(0),h=c.useCallback(async p=>{if(!e)return;const S=++g.current;d(!0),m(null);try{const b=await e.load({take:o,search:p||void 0,searchFields:a==null?void 0:a.searchFields});if(S!==g.current)return;i(b.data)}catch(b){if(S!==g.current)return;m(b instanceof Error?b.message:String(b))}finally{S===g.current&&d(!1)}},[e,o,a==null?void 0:a.searchFields]);c.useEffect(()=>{n&&h()},[h,n]);const f=c.useMemo(()=>s.map(p=>{const S=p,b={value:String(S[t]??""),label:String(S[r]??"")};return a!=null&&a.iconField&&S[a.iconField]!=null&&(b.icon=S[a.iconField]),a!=null&&a.descriptionField&&S[a.descriptionField]!=null&&(b.description=String(S[a.descriptionField])),a!=null&&a.groupField&&S[a.groupField]!=null&&(b.group=String(S[a.groupField])),b}),[s,t,r,a==null?void 0:a.iconField,a==null?void 0:a.descriptionField,a==null?void 0:a.groupField]),y=c.useCallback(p=>{h(p)},[h]);return{options:f,loading:l,error:u,search:y,reload:()=>h()}}function We(e){const{dbName:t,storeName:r,keyField:a="id",version:n=1,indexes:o=[]}=e;let s=null;const i=new Map;function l(f,...y){var p;(p=i.get(f))==null||p.forEach(S=>S(...y))}async function d(){return s||new Promise((f,y)=>{const p=indexedDB.open(t,n);p.onerror=()=>y(p.error),p.onsuccess=()=>{s=p.result,f(s)},p.onupgradeneeded=S=>{const b=S.target.result;if(!b.objectStoreNames.contains(r)){const v=b.createObjectStore(r,{keyPath:a});for(const w of o)v.createIndex(w.name,w.keyPath,{unique:w.unique??!1})}}})}async function u(f,y){const p=await d();return new Promise((S,b)=>{const w=p.transaction(r,f).objectStore(r),E=y(w);E.onsuccess=()=>S(E.result),E.onerror=()=>b(E.error)})}async function m(f,y,p){const S=await d();return new Promise((b,v)=>{var F;const E=S.transaction(r,f).objectStore(r),k=[];let M=E,C="next";if((F=y.sort)!=null&&F.length){const H=y.sort[0].field,z=y.sort[0].direction;E.indexNames.contains(H)&&(M=E.index(H)),C=z==="desc"?"prev":"next"}const A=M.openCursor(null,C);let T=0,N=0;const R=y.skip??0,I=y.take??1/0;A.onsuccess=()=>{const H=A.result;if(!H||N>=I){b(k);return}const z=H.value;if(y.filter&&!g(z,y.filter)){H.continue();return}if(y.search&&!h(z,y.search,y.searchFields)){H.continue();return}if(T<R){T++,H.continue();return}k.push(z),N++,H.continue()},A.onerror=()=>v(A.error)})}function g(f,y){if(!y.items.length)return!0;const p=S=>{if(S.type==="group")return g(f,S);const b=f[S.field],v=S.value;switch(S.operator){case"=":return b==v;case"<>":return b!=v;case"<":return b<v;case"<=":return b<=v;case">":return b>v;case">=":return b>=v;case"contains":return String(b??"").toLowerCase().includes(String(v??"").toLowerCase());case"notcontains":return!String(b??"").toLowerCase().includes(String(v??"").toLowerCase());case"startswith":return String(b??"").toLowerCase().startsWith(String(v??"").toLowerCase());case"endswith":return String(b??"").toLowerCase().endsWith(String(v??"").toLowerCase());case"isblank":return b==null||b==="";case"isnotblank":return b!=null&&b!=="";default:return!0}};return y.logic==="and"?y.items.every(p):y.items.some(p)}function h(f,y,p){const S=y.toLowerCase();return(p?p.map(v=>f[v]):Object.values(f)).some(v=>String(v??"").toLowerCase().includes(S))}return{keyField:a,writable:!0,async load(f={}){var y;l("loading",!0);try{const p=await m("readonly",f,()=>{});(y=f.sort)!=null&&y.length&&p.sort((v,w)=>{for(const E of f.sort){const k=v[E.field]??"",M=w[E.field]??"",C=typeof k=="number"&&typeof M=="number"?k-M:String(k).localeCompare(String(M));if(C!==0)return E.direction==="desc"?-C:C}return 0});const S=await this.count(),b={data:p,totalCount:S};return l("loaded",b),l("loading",!1),b}catch(p){throw l("error",p),l("loading",!1),p}},async byKey(f){return u("readonly",y=>y.get(f))},async insert(f){return await u("readwrite",y=>y.add(f)),l("changed"),f},async update(f,y){const p=await this.byKey(f);if(!p)throw new Error(`Record not found: ${f}`);const S={...p,...y};return await u("readwrite",b=>b.put(S)),l("changed"),S},async remove(f){await u("readwrite",y=>y.delete(f)),l("changed")},on(f,y){return i.has(f)||i.set(f,new Set),i.get(f).add(y),()=>{var p;return(p=i.get(f))==null?void 0:p.delete(y)}},async clear(){await u("readwrite",f=>f.clear()),l("changed")},async count(){return u("readonly",f=>f.count())},async getAll(){return u("readonly",f=>f.getAll())},async bulkInsert(f){const y=await d();return new Promise((p,S)=>{const b=y.transaction(r,"readwrite"),v=b.objectStore(r);for(const w of f)v.put(w);b.oncomplete=()=>{l("changed"),p()},b.onerror=()=>S(b.error)})},async bulkDelete(f){const y=await d();return new Promise((p,S)=>{const b=y.transaction(r,"readwrite"),v=b.objectStore(r);for(const w of f)v.delete(w);b.oncomplete=()=>{l("changed"),p()},b.onerror=()=>S(b.error)})},async exportData(){return this.getAll()},async importData(f){await this.clear(),await this.bulkInsert(f)}}}function bl(e){const{remoteSource:t,offlineConfig:r,syncStrategy:a="remote-first",onConflict:n,onSync:o,autoSyncInterval:s=0}=e,i=r.keyField??t.keyField,l=We({...r,keyField:i}),d=We({dbName:r.dbName,storeName:`${r.storeName}_pending`,keyField:"id"});let u=navigator.onLine,m=0;const g=new Map;function h(p,...S){var b;(b=g.get(p))==null||b.forEach(v=>v(...S))}window.addEventListener("online",()=>{u=!0,h("online"),y()}),window.addEventListener("offline",()=>{u=!1,h("offline")});async function f(p,S,b){const v={id:`pending_${++m}_${Date.now()}`,action:p,key:S,data:b,timestamp:Date.now(),retries:0};await d.insert(v)}async function y(){if(u){h("syncing",!0);try{let p=0,S=0,b=0;const v=await d.load();for(const w of v.data)try{switch(w.action){case"insert":await t.insert(w.data),p++;break;case"update":await t.update(w.key,w.data),S++;break;case"remove":await t.remove(w.key),b++;break}await d.remove(w.id)}catch{w.retries<3&&await d.update(w.id,{retries:w.retries+1})}if(a!=="local-first"){const w=await t.load();if(a==="remote-first")await l.importData(w.data);else if(a==="merge"&&n){const E=await l.load(),k=new Map(E.data.map(C=>[C[i],C])),M=[];for(const C of w.data){const A=k.get(C[i]);A?M.push(n(A,C)):M.push(C)}await l.importData(M)}}h("synced",{added:p,updated:S,removed:b}),o==null||o({added:p,updated:S,removed:b})}catch(p){h("syncError",p)}finally{h("syncing",!1)}}}return s>0&&window.setInterval(y,s),{keyField:i,writable:!0,async load(p={}){if(u&&a==="remote-first")try{const S=await t.load(p);return await l.bulkInsert(S.data),S}catch{}return l.load(p)},async byKey(p){if(u)try{const S=await t.byKey(p);return S&&await l.update(p,S).catch(()=>l.insert(S)),S}catch{}return l.byKey(p)},async insert(p){const S=await l.insert(p);if(u)try{return await t.insert(p)}catch{await f("insert",void 0,p)}else await f("insert",void 0,p);return h("changed"),S},async update(p,S){const b=await l.update(p,S);if(u)try{return await t.update(p,S)}catch{await f("update",p,S)}else await f("update",p,S);return h("changed"),b},async remove(p){if(await l.remove(p),u)try{await t.remove(p)}catch{await f("remove",p)}else await f("remove",p);h("changed")},on(p,S){return g.has(p)||g.set(p,new Set),g.get(p).add(S),()=>{var b;return(b=g.get(p))==null?void 0:b.delete(S)}},sync:y,isOnline:()=>u,async getPendingChanges(){return(await d.load()).data},async clearPendingChanges(){await d.clear()}}}function Sl(e){const{channelName:t,source:r}=e,a=new BroadcastChannel(t),n=new Map;function o(i,...l){var d;(d=n.get(i))==null||d.forEach(u=>u(...l))}a.onmessage=i=>{const l=i.data;switch(l.type){case"insert":case"update":case"remove":o("changed"),o("crossTabChange",l);break;case"refresh":o("refresh");break;case"request-sync":r.load().then(d=>{a.postMessage({type:"sync-data",data:d.data})});break}};function s(i){a.postMessage(i)}return{...r,async insert(i){const l=await r.insert(i);return s({type:"insert",data:l}),l},async update(i,l){const d=await r.update(i,l);return s({type:"update",key:i,changes:l}),d},async remove(i){await r.remove(i),s({type:"remove",key:i})},on(i,l){n.has(i)||n.set(i,new Set),n.get(i).add(l);const d=r.on(i,l);return()=>{var u;(u=n.get(i))==null||u.delete(l),d()}},broadcast:s,requestSync(){s({type:"request-sync"})}}}function xl(e={}){const{prefix:t="",persist:r={filter:!0,sort:!0,page:!0,search:!0},useHash:a=!1}=e;function n(){return a?new URLSearchParams(window.location.hash.slice(1)):new URLSearchParams(window.location.search)}function o(i){if(a)window.location.hash=i.toString();else{const l=new URL(window.location.href);l.search=i.toString(),window.history.replaceState({},"",l.toString())}}function s(i){return t?`${t}_${i}`:i}return{read(){const i=n(),l={};if(r.filter){const d=i.get(s("filter"));if(d)try{l.filter=JSON.parse(d)}catch{}}if(r.sort){const d=i.get(s("sort"));if(d)try{l.sort=JSON.parse(d)}catch{}}if(r.page){const d=i.get(s("skip")),u=i.get(s("take"));d&&(l.skip=parseInt(d,10)),u&&(l.take=parseInt(u,10))}if(r.search){const d=i.get(s("search"));d&&(l.search=d)}return l},write(i){const l=n();r.filter&&(i.filter&&i.filter.items.length>0?l.set(s("filter"),JSON.stringify(i.filter)):l.delete(s("filter"))),r.sort&&(i.sort&&i.sort.length>0?l.set(s("sort"),JSON.stringify(i.sort)):l.delete(s("sort"))),r.page&&(i.skip?l.set(s("skip"),String(i.skip)):l.delete(s("skip")),i.take?l.set(s("take"),String(i.take)):l.delete(s("take"))),r.search&&(i.search?l.set(s("search"),i.search):l.delete(s("search"))),o(l)},clear(){const i=n();i.delete(s("filter")),i.delete(s("sort")),i.delete(s("skip")),i.delete(s("take")),i.delete(s("search")),o(i)},toLoadOptions(){const i=this.read();return{filter:i.filter,sort:i.sort,skip:i.skip,take:i.take,search:i.search}}}}const vl={async exportToJSON(e,t){const r=await e.load(),a={version:"1.0",timestamp:Date.now(),data:r.data,metadata:t};return JSON.stringify(a,null,2)},async importFromJSON(e,t,r={}){const n=JSON.parse(t).data;let o=0,s=0;r.replace&&"clear"in e&&await e.clear();for(const i of n){if(r.validate&&!r.validate(i)){s++;continue}try{await e.insert(i),o++}catch{s++}}return{imported:o,skipped:s}},async downloadAsJSON(e,t="export.json"){const r=await this.exportToJSON(e),a=new Blob([r],{type:"application/json"}),n=URL.createObjectURL(a),o=document.createElement("a");o.href=n,o.download=t,o.click(),URL.revokeObjectURL(n)},async importFromFile(e,t,r){const a=await t.text();return this.importFromJSON(e,a,r)}};function wl(e="nice_user_prefs"){let t=null;function r(){if(t)return t;try{const n=localStorage.getItem(e);t=n?JSON.parse(n):{}}catch{t={}}return t}function a(n){t=n,localStorage.setItem(e,JSON.stringify(n))}return{get(n,o){return r()[n]??o},set(n,o){const s=r();s[n]=o,a(s)},remove(n){const o=r();delete o[n],a(o)},getAll(){return{...r()}},setAll(n){a(n)},clear(){t={},localStorage.removeItem(e)},merge(n){a({...r(),...n})}}}const Wr={"colors.primary":"--color-primary","colors.primaryHover":"--color-primary-hover","colors.success":"--color-success","colors.warning":"--color-warning","colors.error":"--color-error","colors.info":"--color-info","colors.accent":"--color-accent","colors.accentHover":"--color-accent-hover","colors.link":"--color-link","colors.linkHover":"--color-link-hover","colors.focus":"--color-focus","colors.overlay":"--color-overlay","colors.surface":"--color-surface","colors.surfaceHover":"--color-surface-hover","colors.disabled":"--color-disabled","colors.disabledText":"--color-disabled-text","backgrounds.primary":"--bg-primary","backgrounds.secondary":"--bg-secondary","backgrounds.tertiary":"--bg-tertiary","backgrounds.hover":"--hover-bg","backgrounds.elevated":"--bg-elevated","backgrounds.inset":"--bg-inset","backgrounds.canvas":"--bg-canvas","text.primary":"--text-primary","text.secondary":"--text-secondary","text.muted":"--text-muted","text.inverse":"--text-inverse","text.onPrimary":"--text-on-primary","text.onAccent":"--text-on-accent","borders.color":"--border-color","borders.radiusSm":"--nice-radius-sm","borders.radiusMd":"--nice-radius-md","borders.radiusLg":"--nice-radius-lg","borders.radiusXl":"--nice-radius-xl","borders.radiusFull":"--nice-radius-full","borders.width":"--border-width","borders.focusColor":"--border-focus-color","borders.divider":"--border-divider","shadows.sm":"--shadow-sm","shadows.md":"--shadow-md","shadows.lg":"--shadow-lg","shadows.xl":"--shadow-xl","shadows.inner":"--shadow-inner","shadows.glow":"--shadow-glow","spacing.space1":"--nice-space-1","spacing.space2":"--nice-space-2","spacing.space3":"--nice-space-3","spacing.space4":"--nice-space-4","spacing.space5":"--nice-space-5","spacing.space6":"--nice-space-6","spacing.space8":"--nice-space-8","spacing.space10":"--nice-space-10","spacing.space12":"--nice-space-12","spacing.space16":"--nice-space-16","typography.fontFamily":"--nice-font-family","typography.fontSizeXs":"--nice-font-size-xs","typography.fontSizeSm":"--nice-font-size-sm","typography.fontSizeMd":"--nice-font-size-md","typography.fontSizeLg":"--nice-font-size-lg","typography.fontSizeXl":"--nice-font-size-xl","typography.fontSize2xl":"--nice-font-size-2xl","typography.fontSize3xl":"--nice-font-size-3xl","typography.fontWeightNormal":"--nice-font-weight-normal","typography.fontWeightMedium":"--nice-font-weight-medium","typography.fontWeightSemibold":"--nice-font-weight-semibold","typography.fontWeightBold":"--nice-font-weight-bold","typography.lineHeight":"--nice-line-height","typography.headingFontFamily":"--nice-heading-font-family","typography.monoFontFamily":"--nice-mono-font-family","typography.letterSpacing":"--nice-letter-spacing","typography.headingLetterSpacing":"--nice-heading-letter-spacing","transitions.fast":"--nice-transition-fast","transitions.normal":"--nice-transition","transitions.slow":"--nice-transition-slow"};function kl(e,t){return t.split(".").reduce((r,a)=>{if(r&&typeof r=="object")return r[a]},e)}function xe(e){const t={};for(const[r,a]of Object.entries(Wr)){const n=kl(e,r);n!==void 0&&(t[a]=String(n))}return t}function Cl(e,t){const r=t??document.documentElement,a=xe(e);for(const[n,o]of Object.entries(a))r.style.setProperty(n,o);Al(e.backgroundImage,r),e.darkMode&&(r.dataset.ntdColorScheme=e.darkMode)}const Ml={dots:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="currentColor" opacity="0.15"/></svg>',grid:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M20 0H0v20" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',diagonal:'<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M0 10L10 0" stroke="currentColor" stroke-opacity="0.08"/></svg>',"cross-hatch":'<svg width="10" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M0 10L10 0M-1 1L1 -1M9 11L11 9" stroke="currentColor" stroke-opacity="0.06"/></svg>',waves:'<svg width="40" height="12" xmlns="http://www.w3.org/2000/svg"><path d="M0 6c5 0 5-6 10-6s5 6 10 6 5-6 10-6 5 6 10 6" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',hexagons:'<svg width="28" height="49" xmlns="http://www.w3.org/2000/svg"><path d="M14 0l14 8.5v16L14 33 0 24.5v-16z" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',triangles:'<svg width="20" height="17" xmlns="http://www.w3.org/2000/svg"><path d="M0 17L10 0l10 17z" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',circles:'<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="6" fill="none" stroke="currentColor" stroke-opacity="0.06"/></svg>',zigzag:'<svg width="20" height="12" xmlns="http://www.w3.org/2000/svg"><path d="M0 6l5-6 5 6 5-6 5 6" fill="none" stroke="currentColor" stroke-opacity="0.08"/></svg>',noise:'<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency=".9" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(#n)"/></svg>'};function Al(e,t){if(t.style.removeProperty("--ntd-bg-image"),t.style.removeProperty("--ntd-bg-image-size"),t.style.removeProperty("--ntd-bg-image-position"),t.style.removeProperty("--ntd-bg-image-attachment"),t.style.removeProperty("--ntd-bg-image-repeat"),t.style.removeProperty("--ntd-bg-image-opacity"),t.style.removeProperty("--ntd-bg-image-blend"),!(!e||e.type==="none")){if(e.type==="gradient"&&e.gradient)t.style.setProperty("--ntd-bg-image",e.gradient);else if(e.type==="image"&&e.imageUrl)t.style.setProperty("--ntd-bg-image",`url("${e.imageUrl}")`),e.imageSize&&t.style.setProperty("--ntd-bg-image-size",e.imageSize),e.imagePosition&&t.style.setProperty("--ntd-bg-image-position",e.imagePosition),e.imageAttachment&&t.style.setProperty("--ntd-bg-image-attachment",e.imageAttachment),e.imageRepeat&&t.style.setProperty("--ntd-bg-image-repeat",e.imageRepeat);else if(e.type==="pattern"&&e.pattern){const r=Ml[e.pattern];if(r){const a=`url("data:image/svg+xml,${encodeURIComponent(r)}")`;t.style.setProperty("--ntd-bg-image",a),t.style.setProperty("--ntd-bg-image-repeat","repeat")}}e.opacity!==void 0&&t.style.setProperty("--ntd-bg-image-opacity",String(e.opacity)),e.blendMode&&t.style.setProperty("--ntd-bg-image-blend",e.blendMode)}}function Vr(e){const t=e??document.documentElement;for(const r of Object.values(Wr))t.style.removeProperty(r);for(const r of["--ntd-bg-image","--ntd-bg-image-size","--ntd-bg-image-position","--ntd-bg-image-attachment","--ntd-bg-image-repeat","--ntd-bg-image-opacity","--ntd-bg-image-blend"])t.style.removeProperty(r);delete t.dataset.ntdColorScheme,delete t.dataset.theme,t.classList.remove("nice-dark")}function El(e){const t=e??document.documentElement,r=getComputedStyle(t),a=s=>r.getPropertyValue(s).trim(),n=s=>parseFloat(r.getPropertyValue(s))||0,o=s=>a(s)||void 0;return{name:"Current",colors:{primary:a("--color-primary"),primaryHover:a("--color-primary-hover"),success:a("--color-success"),warning:a("--color-warning"),error:a("--color-error"),info:a("--color-info"),accent:o("--color-accent"),accentHover:o("--color-accent-hover"),link:o("--color-link"),linkHover:o("--color-link-hover"),focus:o("--color-focus"),overlay:o("--color-overlay"),surface:o("--color-surface"),surfaceHover:o("--color-surface-hover"),disabled:o("--color-disabled"),disabledText:o("--color-disabled-text")},backgrounds:{primary:a("--bg-primary"),secondary:a("--bg-secondary"),tertiary:a("--bg-tertiary"),hover:a("--hover-bg"),elevated:o("--bg-elevated"),inset:o("--bg-inset"),canvas:o("--bg-canvas")},text:{primary:a("--text-primary"),secondary:a("--text-secondary"),muted:a("--text-muted"),inverse:o("--text-inverse"),onPrimary:o("--text-on-primary"),onAccent:o("--text-on-accent")},borders:{color:a("--border-color"),radiusSm:a("--nice-radius-sm"),radiusMd:a("--nice-radius-md"),radiusLg:a("--nice-radius-lg"),radiusXl:a("--nice-radius-xl"),radiusFull:a("--nice-radius-full"),width:o("--border-width"),focusColor:o("--border-focus-color"),divider:o("--border-divider")},shadows:{sm:a("--shadow-sm"),md:a("--shadow-md"),lg:a("--shadow-lg"),xl:a("--shadow-xl"),inner:o("--shadow-inner"),glow:o("--shadow-glow")},spacing:{space1:a("--nice-space-1"),space2:a("--nice-space-2"),space3:a("--nice-space-3"),space4:a("--nice-space-4"),space5:a("--nice-space-5"),space6:a("--nice-space-6"),space8:a("--nice-space-8"),space10:o("--nice-space-10"),space12:o("--nice-space-12"),space16:o("--nice-space-16")},typography:{fontFamily:a("--nice-font-family"),fontSizeXs:a("--nice-font-size-xs"),fontSizeSm:a("--nice-font-size-sm"),fontSizeMd:a("--nice-font-size-md"),fontSizeLg:a("--nice-font-size-lg"),fontSizeXl:a("--nice-font-size-xl"),fontWeightNormal:n("--nice-font-weight-normal"),fontWeightMedium:n("--nice-font-weight-medium"),fontWeightSemibold:n("--nice-font-weight-semibold"),fontWeightBold:n("--nice-font-weight-bold"),lineHeight:n("--nice-line-height"),headingFontFamily:o("--nice-heading-font-family"),monoFontFamily:o("--nice-mono-font-family"),fontSize2xl:o("--nice-font-size-2xl"),fontSize3xl:o("--nice-font-size-3xl"),letterSpacing:o("--nice-letter-spacing"),headingLetterSpacing:o("--nice-heading-letter-spacing")},transitions:{fast:a("--nice-transition-fast"),normal:a("--nice-transition"),slow:a("--nice-transition-slow")},darkMode:t.dataset.ntdColorScheme??void 0}}function Nl(e){return JSON.stringify(e,null,2)}function Tl(e){const t=JSON.parse(e);if(!t||typeof t!="object"||!t.name||!t.colors||!t.backgrounds)throw new Error("Invalid theme format: missing required fields (name, colors, backgrounds)");return t}const ct=c.createContext(null);function Ll(){const e=c.useContext(ct);if(!e)throw new Error("useNiceTheme must be used within a NiceThemeProvider");return e}const ce={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},le={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},de={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},lt=e=>({color:e,radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"}),Xr={sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},Il={sm:"0 1px 2px rgba(0,0,0,0.3)",md:"0 4px 6px -1px rgba(0,0,0,0.4)",lg:"0 10px 15px -3px rgba(0,0,0,0.4)",xl:"0 20px 25px -5px rgba(0,0,0,0.4)"};function L(e,t,r,a,n){return{name:e,darkMode:"light",colors:{...t,surface:t.surface??r.primary,surfaceHover:t.surfaceHover??r.secondary},backgrounds:{...r,elevated:r.elevated??r.primary,inset:r.inset??r.tertiary,canvas:r.canvas??r.primary},text:{...a,inverse:a.inverse??"#ffffff"},borders:lt(n),shadows:Xr,spacing:ce,typography:le,transitions:de}}function $(e,t,r,a,n){return{name:e,darkMode:"dark",colors:{...t,surface:t.surface??r.secondary,surfaceHover:t.surfaceHover??r.tertiary},backgrounds:{...r,elevated:r.elevated??r.secondary,inset:r.inset??r.primary,canvas:r.canvas??r.primary},text:{...a,inverse:a.inverse??"#0f172a"},borders:lt(n),shadows:Il,spacing:ce,typography:le,transitions:de}}const Ur=L("Slate",{primary:"#64748b",primaryHover:"#475569",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8"},"#cbd5e1"),qr=L("Zinc",{primary:"#71717a",primaryHover:"#52525b",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fafafa",secondary:"#f4f4f5",tertiary:"#e4e4e7",hover:"#e4e4e7"},{primary:"#18181b",secondary:"#3f3f46",muted:"#a1a1aa"},"#d4d4d8"),Gr=L("Stone",{primary:"#78716c",primaryHover:"#57534e",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#1c1917",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1"),Kr=L("Cool Gray",{primary:"#6b7280",primaryHover:"#4b5563",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#d1d5db"),Jr=L("Warm Gray",{primary:"#7c7568",primaryHover:"#5c564c",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf9f7",secondary:"#f5f4f0",tertiary:"#e8e6e1",hover:"#e8e6e1"},{primary:"#1f1d19",secondary:"#4a463d",muted:"#a09888"},"#d4d0c8"),Yr=L("Silver",{primary:"#94a3b8",primaryHover:"#64748b",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#38bdf8"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#334155",secondary:"#64748b",muted:"#94a3b8"},"#cbd5e1"),Qr=L("Charcoal",{primary:"#374151",primaryHover:"#1f2937",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#6b7280"},"#d1d5db"),Zr=L("Ivory",{primary:"#92876d",primaryHover:"#7a6f55",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffef7",secondary:"#faf6eb",tertiary:"#f0ead6",hover:"#f0ead6"},{primary:"#2b2517",secondary:"#5c5340",muted:"#9c9280"},"#ddd8c4"),ea=L("Rose",{primary:"#e11d48",primaryHover:"#be123c",success:"#16a34a",warning:"#ea580c",error:"#dc2626",info:"#0891b2"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f43f5e"},"#fda4af"),ta=L("Emerald",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#34d399"},"#6ee7b7"),ra=L("Amber",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0284c7"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#f59e0b"},"#fcd34d"),aa=L("Violet",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#2e1065",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd"),na=L("Teal",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4"),oa=L("Indigo",{primary:"#4f46e5",primaryHover:"#4338ca",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#eef2ff",secondary:"#e0e7ff",tertiary:"#c7d2fe",hover:"#e0e7ff"},{primary:"#1e1b4b",secondary:"#312e81",muted:"#818cf8"},"#a5b4fc"),sa=L("Cyan",{primary:"#0891b2",primaryHover:"#0e7490",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#0284c7"},{primary:"#ecfeff",secondary:"#cffafe",tertiary:"#a5f3fc",hover:"#cffafe"},{primary:"#164e63",secondary:"#155e75",muted:"#22d3ee"},"#67e8f9"),ia=L("Lime",{primary:"#65a30d",primaryHover:"#4d7c0f",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f7fee7",secondary:"#ecfccb",tertiary:"#d9f99d",hover:"#ecfccb"},{primary:"#1a2e05",secondary:"#365314",muted:"#84cc16"},"#bef264"),ca=L("Pink",{primary:"#db2777",primaryHover:"#be185d",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#500724",secondary:"#831843",muted:"#f472b6"},"#f9a8d4"),la=L("Orange",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#7c2d12",muted:"#fb923c"},"#fdba74"),da=L("Fuchsia",{primary:"#c026d3",primaryHover:"#a21caf",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf4ff",secondary:"#fae8ff",tertiary:"#f5d0fe",hover:"#fae8ff"},{primary:"#4a044e",secondary:"#701a75",muted:"#d946ef"},"#e879f9"),ua=L("Sky",{primary:"#0284c7",primaryHover:"#0369a1",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#075985",muted:"#38bdf8"},"#7dd3fc"),fa=L("Ruby",{primary:"#be123c",primaryHover:"#9f1239",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#fb7185"},"#fda4af"),ma=L("Coral",{primary:"#f97316",primaryHover:"#ea580c",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#fb923c"},"#fdba74"),pa=$("Midnight",{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#020617",secondary:"#0f172a",tertiary:"#1e293b",hover:"#1e293b"},{primary:"#f1f5f9",secondary:"#94a3b8",muted:"#475569"},"#1e293b"),ga=$("Obsidian",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#facc15",error:"#fb7185",info:"#38bdf8"},{primary:"#09090b",secondary:"#18181b",tertiary:"#27272a",hover:"#27272a"},{primary:"#fafafa",secondary:"#a1a1aa",muted:"#52525b"},"#3f3f46"),ya=$("Eclipse",{primary:"#c084fc",primaryHover:"#a855f7",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#67e8f9"},{primary:"#0c0a1d",secondary:"#1a1533",tertiary:"#2a2248",hover:"#2a2248"},{primary:"#f5f3ff",secondary:"#a78bfa",muted:"#6d5eac"},"#3b3266"),ha=$("Onyx",{primary:"#60a5fa",primaryHover:"#3b82f6",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#000000",secondary:"#0a0a0a",tertiary:"#171717",hover:"#171717"},{primary:"#ffffff",secondary:"#a3a3a3",muted:"#525252"},"#262626"),ba=$("Carbon",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#67e8f9"},{primary:"#161616",secondary:"#262626",tertiary:"#393939",hover:"#393939"},{primary:"#f4f4f4",secondary:"#c6c6c6",muted:"#6f6f6f"},"#525252"),Sa=$("Cosmos",{primary:"#6366f1",primaryHover:"#4f46e5",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#030712",secondary:"#111827",tertiary:"#1f2937",hover:"#1f2937"},{primary:"#e5e7eb",secondary:"#9ca3af",muted:"#4b5563"},"#374151"),xa=$("Nebula",{primary:"#e879f9",primaryHover:"#d946ef",success:"#4ade80",warning:"#fbbf24",error:"#fb7185",info:"#67e8f9"},{primary:"#0d0117",secondary:"#1a0533",tertiary:"#2d0a52",hover:"#2d0a52"},{primary:"#fae8ff",secondary:"#d8b4fe",muted:"#7c3aed"},"#581c87"),va=$("Abyss",{primary:"#22d3ee",primaryHover:"#06b6d4",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#001219",secondary:"#002a3a",tertiary:"#003e54",hover:"#003e54"},{primary:"#e0f2fe",secondary:"#7dd3fc",muted:"#0369a1"},"#075985"),wa=$("Shadow",{primary:"#a3a3a3",primaryHover:"#737373",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#38bdf8"},{primary:"#171717",secondary:"#1f1f1f",tertiary:"#2a2a2a",hover:"#2a2a2a"},{primary:"#e5e5e5",secondary:"#a3a3a3",muted:"#525252"},"#404040"),ka=$("Emerald Dark",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#022c22",secondary:"#064e3b",tertiary:"#065f46",hover:"#065f46"},{primary:"#ecfdf5",secondary:"#6ee7b7",muted:"#047857"},"#047857"),Ca=L("Forest",{primary:"#166534",primaryHover:"#14532d",success:"#22c55e",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac"),Ma=L("Ocean",{primary:"#0369a1",primaryHover:"#075985",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#38bdf8"},"#7dd3fc"),Aa=L("Desert",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#422006",secondary:"#713f12",muted:"#ca8a04"},"#fde047"),Ea=L("Sunset",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#f97316"},"#fdba74"),Na=L("Aurora",{primary:"#0d9488",primaryHover:"#0f766e",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4"),Ta=L("Lavender",{primary:"#7e22ce",primaryHover:"#6b21a8",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#3b0764",secondary:"#581c87",muted:"#a855f7"},"#d8b4fe"),La=L("Autumn",{primary:"#c2410c",primaryHover:"#9a3412",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#7f1d1d",muted:"#f87171"},"#fca5a5"),Ia=L("Spring",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#14532d",secondary:"#166534",muted:"#4ade80"},"#86efac"),Ra=L("Arctic",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd"),za=L("Tropical",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0"),Fa=L("Pastel Rose",{primary:"#f472b6",primaryHover:"#ec4899",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#f9a8d4"),Pa=L("Pastel Sky",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#075985",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd"),Da=L("Pastel Mint",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#065f46",secondary:"#047857",muted:"#6ee7b7"},"#a7f3d0"),Ha=L("Pastel Peach",{primary:"#fb923c",primaryHover:"#f97316",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#7c2d12",secondary:"#9a3412",muted:"#fdba74"},"#fed7aa"),$a=L("Pastel Lavender",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#4c1d95",secondary:"#5b21b6",muted:"#c4b5fd"},"#ddd6fe"),ja=L("Pastel Lemon",{primary:"#facc15",primaryHover:"#eab308",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#713f12",secondary:"#854d0e",muted:"#fde047"},"#fef08a"),Oa=L("Pastel Sage",{primary:"#86efac",primaryHover:"#4ade80",success:"#22c55e",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#166534",secondary:"#15803d",muted:"#86efac"},"#bbf7d0"),_a=L("Pastel Coral",{primary:"#fb7185",primaryHover:"#f43f5e",success:"#4ade80",warning:"#fcd34d",error:"#ef4444",info:"#67e8f9"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#881337",secondary:"#9f1239",muted:"#fda4af"},"#fecdd3"),Ba=L("Banking",{primary:"#1e3a5f",primaryHover:"#152c4a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#334155",muted:"#94a3b8"},"#cbd5e1"),Wa=L("Healthcare",{primary:"#0891b2",primaryHover:"#0e7490",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#e0f7fa",tertiary:"#b2ebf2",hover:"#e0f7fa"},{primary:"#134e4a",secondary:"#1a6b6a",muted:"#80cbc4"},"#b2dfdb"),Va=L("Legal",{primary:"#1e293b",primaryHover:"#0f172a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#0f172a",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1"),Xa=L("Tech Startup",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#1e1b4b",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd"),Ua=L("Enterprise",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#60a5fa"},"#93c5fd"),qa=L("Government",{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#1e293b",muted:"#64748b"},"#cbd5e1"),Ga=L("Education",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#0891b2"},{primary:"#f0fdf9",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0"),Ka=L("Real Estate",{primary:"#92400e",primaryHover:"#78350f",success:"#059669",warning:"#b45309",error:"#dc2626",info:"#0891b2"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#422006",secondary:"#713f12",muted:"#d97706"},"#fcd34d"),Ja=L("Nord",{primary:"#5e81ac",primaryHover:"#4c6b90",success:"#a3be8c",warning:"#ebcb8b",error:"#bf616a",info:"#88c0d0"},{primary:"#eceff4",secondary:"#e5e9f0",tertiary:"#d8dee9",hover:"#d8dee9"},{primary:"#2e3440",secondary:"#3b4252",muted:"#4c566a"},"#d8dee9"),Ya=$("Dracula",{primary:"#bd93f9",primaryHover:"#9d79d9",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#8be9fd"},{primary:"#282a36",secondary:"#343746",tertiary:"#44475a",hover:"#44475a"},{primary:"#f8f8f2",secondary:"#c0c0c0",muted:"#6272a4"},"#44475a"),Qa=L("Solarized Light",{primary:"#268bd2",primaryHover:"#1a6da0",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#fdf6e3",secondary:"#eee8d5",tertiary:"#e0dbc7",hover:"#eee8d5"},{primary:"#073642",secondary:"#586e75",muted:"#93a1a1"},"#eee8d5"),Za=$("Solarized Dark",{primary:"#268bd2",primaryHover:"#3d98db",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#002b36",secondary:"#073642",tertiary:"#0a4858",hover:"#073642"},{primary:"#eee8d5",secondary:"#93a1a1",muted:"#586e75"},"#073642"),en=$("Monokai",{primary:"#66d9ef",primaryHover:"#45c0d6",success:"#a6e22e",warning:"#e6db74",error:"#f92672",info:"#66d9ef"},{primary:"#272822",secondary:"#34352e",tertiary:"#3e3d32",hover:"#3e3d32"},{primary:"#f8f8f2",secondary:"#cfcfc2",muted:"#75715e"},"#3e3d32"),tn=$("One Dark",{primary:"#61afef",primaryHover:"#4b9ee0",success:"#98c379",warning:"#e5c07b",error:"#e06c75",info:"#56b6c2"},{primary:"#282c34",secondary:"#2c313a",tertiary:"#353b45",hover:"#353b45"},{primary:"#abb2bf",secondary:"#828997",muted:"#545862"},"#3e4452"),rn=$("Synthwave",{primary:"#ff7edb",primaryHover:"#e660c2",success:"#72f1b8",warning:"#fede5d",error:"#fe4450",info:"#36f9f6"},{primary:"#241b2f",secondary:"#2d2140",tertiary:"#362a50",hover:"#362a50"},{primary:"#f0e4fc",secondary:"#b4a0cc",muted:"#6c5c84"},"#4a3866"),an=L("Vaporwave",{primary:"#ff71ce",primaryHover:"#e655b5",success:"#78dcca",warning:"#ffb86c",error:"#ff5555",info:"#76e8fc"},{primary:"#fce4f7",secondary:"#e8d0f4",tertiary:"#d4bcf0",hover:"#e8d0f4"},{primary:"#4a1a4e",secondary:"#7b3f7d",muted:"#c080c0"},"#d8a8e8"),nn=$("Terminal Green",{primary:"#00ff41",primaryHover:"#00cc34",success:"#00ff41",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0a0a0a",secondary:"#0d1a0d",tertiary:"#1a2e1a",hover:"#1a2e1a"},{primary:"#00ff41",secondary:"#00cc33",muted:"#008822"},"#003300"),on=L("Sepia",{primary:"#8b6914",primaryHover:"#704f10",success:"#6b8e23",warning:"#cd853f",error:"#b22222",info:"#5f9ea0"},{primary:"#faf0e6",secondary:"#f5e6d3",tertiary:"#eddcc7",hover:"#f5e6d3"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#d7ccc8"),sn=L("Vintage",{primary:"#8d6e63",primaryHover:"#6d4c41",success:"#66bb6a",warning:"#ffb300",error:"#e53935",info:"#29b6f6"},{primary:"#efebe9",secondary:"#d7ccc8",tertiary:"#bcaaa4",hover:"#d7ccc8"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#bcaaa4"),cn=$("Cyberpunk",{primary:"#00f0ff",primaryHover:"#00c8d4",success:"#39ff14",warning:"#ffff00",error:"#ff003c",info:"#bf00ff"},{primary:"#0a0e17",secondary:"#131824",tertiary:"#1c2333",hover:"#1c2333"},{primary:"#e0fbfc",secondary:"#80d4dd",muted:"#3a6b72"},"#1c3a44"),ln=$("Neon",{primary:"#ff00ff",primaryHover:"#cc00cc",success:"#00ff00",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0d0d0d",secondary:"#1a1a1a",tertiary:"#262626",hover:"#262626"},{primary:"#ffffff",secondary:"#cccccc",muted:"#666666"},"#333333"),dn=$("Retrowave",{primary:"#f77fbe",primaryHover:"#e462a3",success:"#72f1b8",warning:"#ffe261",error:"#ff4444",info:"#79e8fb"},{primary:"#1b0a2e",secondary:"#261440",tertiary:"#321e52",hover:"#321e52"},{primary:"#ffe6f7",secondary:"#c9a0c9",muted:"#6b4c7a"},"#4a2d66"),un=L("Christmas",{primary:"#c41e3a",primaryHover:"#a01830",success:"#228b22",warning:"#ffd700",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0"),fn=$("Halloween",{primary:"#ff6600",primaryHover:"#e05500",success:"#4ade80",warning:"#fbbf24",error:"#ff0000",info:"#9333ea"},{primary:"#1a0a00",secondary:"#2d1500",tertiary:"#402000",hover:"#402000"},{primary:"#ffedd5",secondary:"#fdba74",muted:"#9a5c28"},"#5c3400"),mn=L("Valentine",{primary:"#e11d48",primaryHover:"#be123c",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#ec4899"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f9a8d4"},"#fda4af"),pn=L("Easter",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fef9ff",secondary:"#f3e8ff",tertiary:"#e8d5ff",hover:"#f3e8ff"},{primary:"#581c87",secondary:"#6d28d9",muted:"#c4b5fd"},"#ddd6fe"),gn=L("Summer Beach",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#fcd34d"),yn=L("Winter Frost",{primary:"#3b82f6",primaryHover:"#2563eb",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#93c5fd"},"#bfdbfe"),hn=L("Cherry Blossom",{primary:"#ec4899",primaryHover:"#db2777",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#fbcfe8"),bn=L("Harvest",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#d97706"},"#fcd34d"),Sn=L("Japanese Zen",{primary:"#6b7280",primaryHover:"#4b5563",success:"#6b8e23",warning:"#d4a017",error:"#c0392b",info:"#5f9ea0"},{primary:"#faf9f6",secondary:"#f0ece3",tertiary:"#e6e0d4",hover:"#f0ece3"},{primary:"#2c2c2c",secondary:"#5c5c5c",muted:"#a0998a"},"#d5cec0"),xn=L("Moroccan",{primary:"#c2410c",primaryHover:"#9a3412",success:"#15803d",warning:"#ca8a04",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbf0",secondary:"#fef3e0",tertiary:"#fde6c4",hover:"#fef3e0"},{primary:"#3a1a00",secondary:"#7c2d12",muted:"#d97706"},"#f5d0a0"),vn=L("Scandinavian",{primary:"#4b5563",primaryHover:"#374151",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ffffff",secondary:"#f9fafb",tertiary:"#f3f4f6",hover:"#f3f4f6"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#e5e7eb"),wn=L("Mediterranean",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#2563eb",muted:"#93c5fd"},"#bfdbfe"),kn=L("Chinese New Year",{primary:"#dc2626",primaryHover:"#b91c1c",success:"#16a34a",warning:"#d4a017",error:"#ef4444",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#991b1b",muted:"#f87171"},"#fca5a5"),Cn=L("Indian Festive",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#7c3aed"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#92400e",muted:"#f59e0b"},"#fcd34d"),Mn=L("Brazilian Carnival",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#facc15",error:"#ef4444",info:"#0ea5e9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac"),An=L("African Earth",{primary:"#92400e",primaryHover:"#78350f",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf5f0",secondary:"#f0e6d6",tertiary:"#e6d5bb",hover:"#f0e6d6"},{primary:"#2b1a0e",secondary:"#5c3d1e",muted:"#a08060"},"#d4b896"),En=$("High Contrast Dark",{primary:"#ffff00",primaryHover:"#cccc00",success:"#00ff00",warning:"#ff8c00",error:"#ff0000",info:"#00ffff"},{primary:"#000000",secondary:"#1a1a1a",tertiary:"#333333",hover:"#333333"},{primary:"#ffffff",secondary:"#ffffff",muted:"#cccccc"},"#ffffff"),Nn=L("Monochrome",{primary:"#404040",primaryHover:"#262626",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fafafa",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0"},{primary:"#1a1a1a",secondary:"#404040",muted:"#808080"},"#c0c0c0"),Tn=L("Enhanced Contrast",{primary:"#0050b3",primaryHover:"#003d8c",success:"#006400",warning:"#cc7000",error:"#cc0000",info:"#006680"},{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#ebebeb"},{primary:"#000000",secondary:"#1a1a1a",muted:"#595959"},"#8c8c8c"),Ln={name:"Large Text",darkMode:"light",colors:{primary:"#2563eb",primaryHover:"#1d4ed8",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2",surface:"#ffffff",surfaceHover:"#f8fafc"},backgrounds:{primary:"#ffffff",secondary:"#f8fafc",tertiary:"#f1f5f9",hover:"#f1f5f9",elevated:"#ffffff",inset:"#f1f5f9",canvas:"#ffffff"},text:{primary:"#0f172a",secondary:"#475569",muted:"#94a3b8",inverse:"#ffffff"},borders:lt("#e2e8f0"),shadows:Xr,spacing:{space1:"6px",space2:"12px",space3:"16px",space4:"20px",space5:"24px",space6:"32px",space8:"40px"},typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.875rem",fontSizeSm:"1rem",fontSizeMd:"1.125rem",fontSizeLg:"1.25rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6},transitions:de},In={name:"Glassmorphism",darkMode:"light",colors:{primary:"#6366f1",primaryHover:"#4f46e5",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",surface:"rgba(255,255,255,0.7)",surfaceHover:"rgba(255,255,255,0.5)"},backgrounds:{primary:"rgba(255,255,255,0.7)",secondary:"rgba(255,255,255,0.5)",tertiary:"rgba(255,255,255,0.3)",hover:"rgba(255,255,255,0.5)",elevated:"rgba(255,255,255,0.8)",inset:"rgba(255,255,255,0.3)",canvas:"rgba(255,255,255,0.7)"},text:{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8",inverse:"#ffffff"},borders:{color:"rgba(255,255,255,0.3)",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"24px",radiusFull:"9999px"},shadows:{sm:"0 2px 8px rgba(0,0,0,0.04)",md:"0 4px 16px rgba(0,0,0,0.08)",lg:"0 8px 32px rgba(0,0,0,0.12)",xl:"0 16px 48px rgba(0,0,0,0.16)"},spacing:ce,typography:le,transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},Rn={name:"Neumorphism Light",darkMode:"light",colors:{primary:"#6366f1",primaryHover:"#4f46e5",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",surface:"#e0e5ec",surfaceHover:"#d5dae2"},backgrounds:{primary:"#e0e5ec",secondary:"#d5dae2",tertiary:"#ccd1d9",hover:"#d5dae2",elevated:"#e0e5ec",inset:"#ccd1d9",canvas:"#e0e5ec"},text:{primary:"#2d3748",secondary:"#4a5568",muted:"#718096",inverse:"#ffffff"},borders:{color:"#d0d5dd",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"3px 3px 6px #b8bec7, -3px -3px 6px #ffffff",md:"5px 5px 10px #b8bec7, -5px -5px 10px #ffffff",lg:"8px 8px 16px #b8bec7, -8px -8px 16px #ffffff",xl:"12px 12px 24px #b8bec7, -12px -12px 24px #ffffff"},spacing:ce,typography:le,transitions:de},zn={name:"Neumorphism Dark",darkMode:"dark",colors:{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee",surface:"#283141",surfaceHover:"#232b3a"},backgrounds:{primary:"#2d3748",secondary:"#283141",tertiary:"#232b3a",hover:"#283141",elevated:"#283141",inset:"#2d3748",canvas:"#2d3748"},text:{primary:"#e2e8f0",secondary:"#a0aec0",muted:"#718096",inverse:"#0f172a"},borders:{color:"#3a4556",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"3px 3px 6px #1a202c, -3px -3px 6px #404d64",md:"5px 5px 10px #1a202c, -5px -5px 10px #404d64",lg:"8px 8px 16px #1a202c, -8px -8px 16px #404d64",xl:"12px 12px 24px #1a202c, -12px -12px 24px #404d64"},spacing:ce,typography:le,transitions:de},Fn=L("Minimalist",{primary:"#18181b",primaryHover:"#27272a",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#3b82f6"},{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f5f5f5"},{primary:"#0a0a0a",secondary:"#404040",muted:"#a3a3a3"},"#e5e5e5"),Pn=$("Warm Dark",{primary:"#f59e0b",primaryHover:"#d97706",success:"#10b981",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#1c1917",secondary:"#292524",tertiary:"#44403c",hover:"#44403c"},{primary:"#fafaf9",secondary:"#d6d3d1",muted:"#78716c"},"#57534e"),Dn=$("Soft Dark",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#34d399",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#1e1e2e",secondary:"#262637",tertiary:"#313147",hover:"#313147"},{primary:"#e8e8f0",secondary:"#a0a0b8",muted:"#5c5c74"},"#3e3e58"),Hn=L("Coffee",{primary:"#6f4e37",primaryHover:"#5c3d28",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf6f1",secondary:"#f0e8dc",tertiary:"#e6d8c6",hover:"#f0e8dc"},{primary:"#2c1a0e",secondary:"#5c3d28",muted:"#a08868"},"#d4c4a8"),$n=L("Wine",{primary:"#7f1d1d",primaryHover:"#641717",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0"),jn=[Ur,qr,Gr,Kr,Jr,Yr,Qr,Zr,ea,ta,ra,aa,na,oa,sa,ia,ca,la,da,ua,fa,ma,pa,ga,ya,ha,ba,Sa,xa,va,wa,ka,Ca,Ma,Aa,Ea,Na,Ta,La,Ia,Ra,za,Fa,Pa,Da,Ha,$a,ja,Oa,_a,Ba,Wa,Va,Xa,Ua,qa,Ga,Ka,Ja,Ya,Qa,Za,en,tn,rn,an,nn,on,sn,cn,ln,dn,un,fn,mn,pn,gn,yn,hn,bn,Sn,xn,vn,wn,kn,Cn,Mn,An,En,Nn,Tn,Ln,In,Rn,zn,Fn,Pn,Dn,Hn,$n],Z={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Re={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},ue={color:"#e2e8f0",radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},fe={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},On={name:"Light",darkMode:"light",colors:{primary:"#3b82f6",primaryHover:"#2563eb",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",surface:"#ffffff",surfaceHover:"#f8fafc"},backgrounds:{primary:"#ffffff",secondary:"#f8fafc",tertiary:"#f1f5f9",hover:"#f1f5f9",elevated:"#ffffff",inset:"#f1f5f9",canvas:"#f8fafc"},text:{primary:"#0f172a",secondary:"#475569",muted:"#94a3b8",inverse:"#ffffff"},borders:ue,shadows:{sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},spacing:Z,typography:Re,transitions:fe},_n={name:"Dark",darkMode:"dark",colors:{primary:"#3b82f6",primaryHover:"#60a5fa",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4",surface:"#141414",surfaceHover:"#1e1e1e"},backgrounds:{primary:"#0a0a0a",secondary:"#141414",tertiary:"#1e1e1e",hover:"#1a1a1a",elevated:"#141414",inset:"#0a0a0a",canvas:"#0a0a0a"},text:{primary:"#ffffff",secondary:"#a1a1a1",muted:"#6b6b6b",inverse:"#0f172a"},borders:{...ue,color:"#2a2a2a"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.5)",md:"0 4px 6px -1px rgba(0,0,0,0.6)",lg:"0 10px 15px -3px rgba(0,0,0,0.6)",xl:"0 20px 25px -5px rgba(0,0,0,0.6)"},spacing:Z,typography:Re,transitions:fe},Bn={name:"Blue",colors:{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2",surface:"#eff6ff",surfaceHover:"#dbeafe"},backgrounds:{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe",elevated:"#ffffff",inset:"#dbeafe",canvas:"#eff6ff"},text:{primary:"#1e3a5f",secondary:"#3b628a",muted:"#7da0c4",inverse:"#ffffff"},borders:{...ue,color:"#93c5fd"},shadows:{sm:"0 1px 2px rgba(29,78,216,0.08)",md:"0 4px 6px -1px rgba(29,78,216,0.12)",lg:"0 10px 15px -3px rgba(29,78,216,0.15)",xl:"0 20px 25px -5px rgba(29,78,216,0.18)"},spacing:Z,typography:Re,transitions:fe},Wn={name:"High Contrast",colors:{primary:"#0000ff",primaryHover:"#0000cc",success:"#008000",warning:"#ff8c00",error:"#ff0000",info:"#008b8b",surface:"#ffffff",surfaceHover:"#f0f0f0"},backgrounds:{primary:"#ffffff",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0",elevated:"#ffffff",inset:"#e0e0e0",canvas:"#ffffff"},text:{primary:"#000000",secondary:"#1a1a1a",muted:"#4d4d4d",inverse:"#ffffff"},borders:{...ue,color:"#000000"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.15)",md:"0 4px 6px rgba(0,0,0,0.2)",lg:"0 10px 15px rgba(0,0,0,0.25)",xl:"0 20px 25px rgba(0,0,0,0.3)"},spacing:Z,typography:Re,transitions:fe},Vn={name:"Material",colors:{primary:"#6750a4",primaryHover:"#4f378b",success:"#386a20",warning:"#7c5800",error:"#ba1a1a",info:"#00629e",surface:"#fffbfe",surfaceHover:"#f6edff"},backgrounds:{primary:"#fffbfe",secondary:"#f6edff",tertiary:"#ece6f0",hover:"#eaddff",elevated:"#ffffff",inset:"#ece6f0",canvas:"#fffbfe"},text:{primary:"#1c1b1f",secondary:"#49454f",muted:"#79747e",inverse:"#ffffff"},borders:{...ue,color:"#cac4d0",radiusSm:"8px",radiusMd:"12px",radiusLg:"16px",radiusXl:"28px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.15)",md:"0 1px 2px rgba(0,0,0,0.3), 0 2px 6px 2px rgba(0,0,0,0.15)",lg:"0 4px 8px 3px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.3)",xl:"0 6px 10px 4px rgba(0,0,0,0.15), 0 2px 3px rgba(0,0,0,0.3)"},spacing:Z,typography:{fontFamily:"'Roboto', 'Noto Sans', system-ui, sans-serif",fontSizeXs:"0.6875rem",fontSizeSm:"0.75rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},transitions:{fast:"100ms cubic-bezier(0.2,0,0,1)",normal:"200ms cubic-bezier(0.2,0,0,1)",slow:"300ms cubic-bezier(0.2,0,0,1)"}},Xn={name:"Bootstrap",colors:{primary:"#0d6efd",primaryHover:"#0b5ed7",success:"#198754",warning:"#ffc107",error:"#dc3545",info:"#0dcaf0",surface:"#ffffff",surfaceHover:"#f8f9fa"},backgrounds:{primary:"#ffffff",secondary:"#f8f9fa",tertiary:"#e9ecef",hover:"#e9ecef",elevated:"#ffffff",inset:"#e9ecef",canvas:"#f8f9fa"},text:{primary:"#212529",secondary:"#6c757d",muted:"#adb5bd",inverse:"#ffffff"},borders:{color:"#dee2e6",radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"16px",radiusFull:"50rem"},shadows:{sm:"0 0.125rem 0.25rem rgba(0,0,0,0.075)",md:"0 0.5rem 1rem rgba(0,0,0,0.15)",lg:"0 1rem 3rem rgba(0,0,0,0.175)",xl:"0 1rem 3rem rgba(0,0,0,0.25)"},spacing:Z,typography:{fontFamily:"system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.25rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},transitions:fe},Un={name:"Fluent",colors:{primary:"#0078d4",primaryHover:"#106ebe",success:"#107c10",warning:"#fce100",error:"#d13438",info:"#00b7c3",surface:"#ffffff",surfaceHover:"#faf9f8"},backgrounds:{primary:"#ffffff",secondary:"#faf9f8",tertiary:"#f3f2f1",hover:"#edebe9",elevated:"#ffffff",inset:"#f3f2f1",canvas:"#faf9f8"},text:{primary:"#323130",secondary:"#605e5c",muted:"#a19f9d",inverse:"#ffffff"},borders:{color:"#e1dfdd",radiusSm:"2px",radiusMd:"4px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},shadows:{sm:"0 1.6px 3.6px 0 rgba(0,0,0,0.132), 0 0.3px 0.9px 0 rgba(0,0,0,0.108)",md:"0 3.2px 7.2px 0 rgba(0,0,0,0.132), 0 0.6px 1.8px 0 rgba(0,0,0,0.108)",lg:"0 6.4px 14.4px 0 rgba(0,0,0,0.132), 0 1.2px 3.6px 0 rgba(0,0,0,0.108)",xl:"0 25.6px 57.6px 0 rgba(0,0,0,0.22), 0 4.8px 14.4px 0 rgba(0,0,0,0.18)"},spacing:Z,typography:{fontFamily:"'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, sans-serif",fontSizeXs:"10px",fontSizeSm:"12px",fontSizeMd:"14px",fontSizeLg:"16px",fontSizeXl:"20px",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.42857},transitions:{fast:"100ms cubic-bezier(0.1,0.9,0.2,1)",normal:"200ms cubic-bezier(0.1,0.9,0.2,1)",slow:"300ms cubic-bezier(0.1,0.9,0.2,1)"}},Rl=[On,_n,Bn,Wn,Vn,Xn,Un,...jn],zl=["https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap","https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Archivo+Black&family=Archivo:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Work+Sans:wght@400;500;600&display=swap","https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap","https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;600&display=swap","https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:wght@400;700&family=DM+Sans:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap"],Fl={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},K={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},dt={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},qn={meta:{id:"obsidianEditorial",name:"Obsidian Editorial",tagline:"Dark-mode magazine — serif display, razor borders, grain.",tags:["dark","editorial","serif"]},theme:{name:"Obsidian Editorial",darkMode:"dark",colors:{primary:"#e8dcc4",primaryHover:"#d4c29c",success:"#7fb069",warning:"#e6aa68",error:"#d65a5a",info:"#88aabb",accent:"#c98a5b",focus:"#e8dcc4",surface:"#1a1715",surfaceHover:"#221e1b"},backgrounds:{primary:"#0e0c0b",secondary:"#1a1715",tertiary:"#221e1b",hover:"#2a2522",elevated:"#1a1715",inset:"#0b0908",canvas:"#0e0c0b"},text:{primary:"#ede4d1",secondary:"#a39787",muted:"#6b6055",inverse:"#0e0c0b"},borders:{color:"#332d28",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px",width:"1px",divider:"#28231f"},shadows:{sm:"none",md:"0 1px 0 0 rgba(232,220,196,0.04)",lg:"0 2px 0 0 rgba(232,220,196,0.06)",xl:"0 4px 0 0 rgba(232,220,196,0.08)"},spacing:dt,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Fraunces', 'Playfair Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', ui-monospace, monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.005em",headingLetterSpacing:"-0.02em"},transitions:{fast:"80ms cubic-bezier(0.4,0,0.2,1)",normal:"140ms cubic-bezier(0.4,0,0.2,1)",slow:"220ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.35,blendMode:"overlay"}},displayStyle:"editorial",variantConfig:{density:"comfortable",animation:"subtle"}},Gn={meta:{id:"neonArcade",name:"Neon Arcade",tagline:"Phosphor-green terminal glow on absolute black.",tags:["dark","retro","mono","terminal"]},theme:{name:"Neon Arcade",darkMode:"dark",colors:{primary:"#39ff14",primaryHover:"#50ff35",success:"#39ff14",warning:"#ffcc00",error:"#ff3355",info:"#00e5ff",accent:"#ff00aa",focus:"#39ff14",surface:"#060a06",surfaceHover:"#0b140b"},backgrounds:{primary:"#000000",secondary:"#060a06",tertiary:"#0b140b",hover:"#12241a",elevated:"#060a06",inset:"#000000",canvas:"#000000"},text:{primary:"#c8ffb8",secondary:"#7be368",muted:"#3e7a39",inverse:"#000000"},borders:{color:"#1d3a1d",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0",width:"1px",divider:"#143014",focusColor:"#39ff14"},shadows:{sm:"0 0 4px rgba(57,255,20,0.3)",md:"0 0 10px rgba(57,255,20,0.35), 0 0 2px rgba(57,255,20,0.6)",lg:"0 0 22px rgba(57,255,20,0.4), 0 0 4px rgba(57,255,20,0.7)",xl:"0 0 40px rgba(57,255,20,0.5), 0 0 8px rgba(57,255,20,0.8)",glow:"0 0 30px #39ff14, 0 0 60px rgba(57,255,20,0.4)"},spacing:K,typography:{fontFamily:"'JetBrains Mono', 'Fira Code', ui-monospace, monospace",headingFontFamily:"'JetBrains Mono', monospace",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.08em"},transitions:{fast:"60ms steps(4, end)",normal:"120ms steps(6, end)",slow:"200ms steps(8, end)"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.25}},displayStyle:"terminal",variantConfig:{radius:"none",shadow:"glow",density:"compact",animation:"subtle"}},Kn={meta:{id:"hyggeScandinavian",name:"Hygge Scandinavian",tagline:"Warm cream, generous breathing room, soft serif display.",tags:["light","warm","serif","spacious"]},theme:{name:"Hygge Scandinavian",darkMode:"light",colors:{primary:"#8b6f47",primaryHover:"#6f5738",success:"#6b8e4e",warning:"#d49a3e",error:"#b84c4c",info:"#6a8aad",accent:"#c98754",focus:"#8b6f47",surface:"#fbf6ed",surfaceHover:"#f3ecdf"},backgrounds:{primary:"#fdf9f1",secondary:"#f5eee0",tertiary:"#ede3d0",hover:"#e8ddc8",elevated:"#ffffff",inset:"#f0e7d4",canvas:"#fdf9f1"},text:{primary:"#3a2f22",secondary:"#6a5845",muted:"#9c8c76",inverse:"#fdf9f1"},borders:{color:"#d9cbb0",radiusSm:"8px",radiusMd:"14px",radiusLg:"22px",radiusXl:"32px",radiusFull:"9999px",width:"1px",divider:"#e8ddc8"},shadows:{sm:"0 1px 2px rgba(122,92,58,0.05)",md:"0 6px 16px -4px rgba(122,92,58,0.08)",lg:"0 16px 32px -10px rgba(122,92,58,0.10)",xl:"0 28px 56px -18px rgba(122,92,58,0.14)"},spacing:dt,typography:{fontFamily:"'Work Sans', -apple-system, sans-serif",headingFontFamily:"'Cormorant Garamond', Georgia, serif",monoFontFamily:"ui-monospace, 'SF Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.7,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"160ms cubic-bezier(0.16,1,0.3,1)",normal:"260ms cubic-bezier(0.16,1,0.3,1)",slow:"400ms cubic-bezier(0.16,1,0.3,1)"}},displayStyle:"scandinavian",variantConfig:{density:"spacious",animation:"normal"}},Jn={meta:{id:"brutalistRaw",name:"Brutalist Raw",tagline:"Paper + ink + hard shadows — zero blur, zero mercy.",tags:["light","brutalist","experimental"]},theme:{name:"Brutalist Raw",darkMode:"light",colors:{primary:"#ff3b30",primaryHover:"#000000",success:"#00aa55",warning:"#ffcc00",error:"#ff0000",info:"#0066ff",accent:"#ffcc00",focus:"#ff3b30",surface:"#ffffff",surfaceHover:"#f5f3ee"},backgrounds:{primary:"#f5f3ee",secondary:"#ffffff",tertiary:"#e8e4d8",hover:"#e0dcd0",elevated:"#ffffff",inset:"#e8e4d8",canvas:"#f5f3ee"},text:{primary:"#000000",secondary:"#1a1a1a",muted:"#555555",inverse:"#ffffff"},borders:{color:"#000000",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0",width:"2px",divider:"#000000"},shadows:{sm:"3px 3px 0 0 #000000",md:"6px 6px 0 0 #000000",lg:"10px 10px 0 0 #000000",xl:"14px 14px 0 0 #000000"},spacing:K,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Archivo Black', 'Archivo', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:500,fontWeightMedium:700,fontWeightSemibold:700,fontWeightBold:900,lineHeight:1.4,letterSpacing:"-0.01em",headingLetterSpacing:"-0.04em"},transitions:{fast:"0ms linear",normal:"80ms cubic-bezier(0.2,0,0,1)",slow:"140ms cubic-bezier(0.2,0,0,1)"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"subtle"}},Yn={meta:{id:"glassAurora",name:"Glass Aurora",tagline:"Frosted translucency floating over aurora light.",tags:["light","glass","modern","gradient"]},theme:{name:"Glass Aurora",darkMode:"light",colors:{primary:"#5b5bff",primaryHover:"#4343e8",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4",accent:"#ec4899",focus:"#5b5bff",surface:"rgba(255,255,255,0.55)",surfaceHover:"rgba(255,255,255,0.75)"},backgrounds:{primary:"rgba(255,255,255,0.55)",secondary:"rgba(255,255,255,0.35)",tertiary:"rgba(255,255,255,0.22)",hover:"rgba(255,255,255,0.7)",elevated:"rgba(255,255,255,0.8)",inset:"rgba(255,255,255,0.3)",canvas:"#e8d6ff"},text:{primary:"#1a1440",secondary:"#443c78",muted:"#8b83b8",inverse:"#ffffff"},borders:{color:"rgba(255,255,255,0.6)",radiusSm:"10px",radiusMd:"16px",radiusLg:"24px",radiusXl:"36px",radiusFull:"9999px",width:"1px",divider:"rgba(255,255,255,0.4)"},shadows:{sm:"0 2px 12px rgba(91,91,255,0.08)",md:"0 8px 32px rgba(91,91,255,0.12)",lg:"0 18px 56px rgba(236,72,153,0.18)",xl:"0 32px 80px rgba(91,91,255,0.22)"},spacing:K,typography:{fontFamily:"'Outfit', -apple-system, sans-serif",headingFontFamily:"'Outfit', sans-serif",monoFontFamily:"ui-monospace, monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"-0.005em",headingLetterSpacing:"-0.025em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"400ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 12% 18%, #ffd6e8 0%, transparent 48%), radial-gradient(at 88% 22%, #c8d8ff 0%, transparent 52%), radial-gradient(at 42% 86%, #d8ffe8 0%, transparent 50%), linear-gradient(180deg, #eee4ff 0%, #ffe8f2 100%)"}},displayStyle:"glass",variantConfig:{density:"normal",animation:"normal"}},Qn={meta:{id:"candyPop",name:"Candy Pop",tagline:"Bubblegum pastels, pill shapes, bouncy easing.",tags:["light","playful","pastel","pill"]},theme:{name:"Candy Pop",darkMode:"light",colors:{primary:"#ff4fa3",primaryHover:"#ff2d8e",success:"#3dd68c",warning:"#ffd63d",error:"#ff5577",info:"#4ec8ff",accent:"#b85bff",focus:"#ff4fa3",surface:"#ffffff",surfaceHover:"#fff5fa"},backgrounds:{primary:"#fff5fa",secondary:"#ffeaf3",tertiary:"#ffd8e9",hover:"#ffc4dc",elevated:"#ffffff",inset:"#ffeaf3",canvas:"#fff8f5"},text:{primary:"#531645",secondary:"#8b3a70",muted:"#c678a8",inverse:"#ffffff"},borders:{color:"#ffc4dc",radiusSm:"9999px",radiusMd:"9999px",radiusLg:"9999px",radiusXl:"9999px",radiusFull:"9999px",width:"2px",divider:"#ffd8e9"},shadows:{sm:"0 2px 0 0 #ffc4dc",md:"0 4px 0 0 #ffa3c7",lg:"0 6px 16px rgba(255,79,163,0.2), 0 3px 0 0 #ff4fa3",xl:"0 12px 28px rgba(255,79,163,0.25)"},spacing:K,typography:{fontFamily:"'Quicksand', -apple-system, sans-serif",headingFontFamily:"'Nunito', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"140ms cubic-bezier(0.34,1.56,0.64,1)",normal:"240ms cubic-bezier(0.34,1.56,0.64,1)",slow:"380ms cubic-bezier(0.34,1.56,0.64,1)"}},displayStyle:"pill",variantConfig:{radius:"full",density:"comfortable",animation:"playful"}},Zn={meta:{id:"newspaperBroadsheet",name:"Newspaper Broadsheet",tagline:"Ivory paper, hairline rules, serif gravity.",tags:["light","editorial","serif","print"]},theme:{name:"Newspaper Broadsheet",darkMode:"light",colors:{primary:"#1a1a1a",primaryHover:"#000000",success:"#2d5016",warning:"#8b6914",error:"#8b0000",info:"#1d3a5f",accent:"#8b0000",focus:"#1a1a1a",surface:"#fbf7ee",surfaceHover:"#f3ecdd"},backgrounds:{primary:"#fbf7ee",secondary:"#f5eedb",tertiary:"#ede4cc",hover:"#e8ddbe",elevated:"#fbf7ee",inset:"#f0e7d0",canvas:"#fbf7ee"},text:{primary:"#14110c",secondary:"#3d362a",muted:"#7a6f58",inverse:"#fbf7ee"},borders:{color:"#14110c",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px",width:"1px",divider:"#14110c"},shadows:{sm:"none",md:"none",lg:"none",xl:"none"},spacing:K,typography:{fontFamily:"'Fraunces', 'Source Serif Pro', Georgia, serif",headingFontFamily:"'Fraunces', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.01em",headingLetterSpacing:"-0.025em"},transitions:{fast:"0ms",normal:"100ms linear",slow:"180ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.18,blendMode:"multiply"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"none",density:"normal"}},eo={meta:{id:"synthwave84",name:"Synthwave 84",tagline:"Magenta & cyan pulse over deep navy — 1984 forever.",tags:["dark","retro","neon","80s"]},theme:{name:"Synthwave 84",darkMode:"dark",colors:{primary:"#ff3ca8",primaryHover:"#ff6bc1",success:"#72f1b8",warning:"#ffcc33",error:"#fe4450",info:"#36f9f6",accent:"#36f9f6",focus:"#ff3ca8",surface:"#2a1a4f",surfaceHover:"#332260"},backgrounds:{primary:"#1a0933",secondary:"#241443",tertiary:"#2d1a52",hover:"#382266",elevated:"#2a1a4f",inset:"#120626",canvas:"#0e0524"},text:{primary:"#f5e8ff",secondary:"#c9a7ff",muted:"#8063b0",inverse:"#0e0524"},borders:{color:"#553388",radiusSm:"2px",radiusMd:"4px",radiusLg:"6px",radiusXl:"8px",radiusFull:"9999px",width:"1px",divider:"#3d2270",focusColor:"#36f9f6"},shadows:{sm:"0 0 8px rgba(255,60,168,0.4)",md:"0 0 18px rgba(255,60,168,0.45), 0 2px 0 0 #36f9f6",lg:"0 0 36px rgba(255,60,168,0.55), 0 4px 0 0 #36f9f6",xl:"0 0 60px rgba(255,60,168,0.6), 0 6px 0 0 #36f9f6",glow:"0 0 28px #ff3ca8, 0 0 56px rgba(255,60,168,0.5)"},spacing:K,typography:{fontFamily:"'Rajdhani', -apple-system, sans-serif",headingFontFamily:"'Orbitron', 'Rajdhani', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:900,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.08em"},transitions:{fast:"120ms cubic-bezier(0.23,1,0.32,1)",normal:"200ms cubic-bezier(0.23,1,0.32,1)",slow:"360ms cubic-bezier(0.23,1,0.32,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #0e0524 0%, #1a0933 55%, #2d1a52 100%), repeating-linear-gradient(0deg, rgba(54,249,246,0.04) 0 1px, transparent 1px 3px)"}},displayStyle:"synthwave",variantConfig:{shadow:"glow",animation:"dramatic",density:"normal"}},to={meta:{id:"zenMinimal",name:"Zen Minimal",tagline:"Whisper-light type, hairlines, oceans of whitespace.",tags:["light","minimal","airy"]},theme:{name:"Zen Minimal",darkMode:"light",colors:{primary:"#0a0a0a",primaryHover:"#262626",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#2563eb",accent:"#737373",focus:"#0a0a0a",surface:"#ffffff",surfaceHover:"#fafafa"},backgrounds:{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f0f0f0",elevated:"#ffffff",inset:"#fafafa",canvas:"#ffffff"},text:{primary:"#171717",secondary:"#525252",muted:"#a3a3a3",inverse:"#ffffff"},borders:{color:"#ededed",radiusSm:"2px",radiusMd:"3px",radiusLg:"4px",radiusXl:"6px",radiusFull:"9999px",width:"1px",divider:"#f0f0f0"},shadows:{sm:"none",md:"0 0 0 1px rgba(0,0,0,0.04)",lg:"0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.05)",xl:"0 4px 8px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.06)"},spacing:dt,typography:{fontFamily:"'Manrope', -apple-system, sans-serif",headingFontFamily:"'Manrope', sans-serif",monoFontFamily:"ui-monospace, monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.6,letterSpacing:"-0.005em",headingLetterSpacing:"-0.03em"},transitions:{fast:"100ms ease",normal:"180ms ease",slow:"280ms ease"}},displayStyle:"minimal",variantConfig:{density:"spacious",animation:"subtle"}},ro={meta:{id:"claymorphism",name:"Claymorphism",tagline:"Soft-clay 3D surfaces — pressable, friendly, tactile.",tags:["light","playful","neumorphic","3d"]},theme:{name:"Claymorphism",darkMode:"light",colors:{primary:"#8b7ef5",primaryHover:"#7469ec",success:"#6ed6a5",warning:"#ffc771",error:"#ff8b8b",info:"#7ec4f5",accent:"#ffb3d9",focus:"#8b7ef5",surface:"#f3efff",surfaceHover:"#ebe4ff"},backgrounds:{primary:"#f6f0ff",secondary:"#ede4ff",tertiary:"#dfd3fc",hover:"#d3c5fa",elevated:"#ffffff",inset:"#e5daff",canvas:"#f6f0ff"},text:{primary:"#2a1f5e",secondary:"#584a8e",muted:"#9388bd",inverse:"#ffffff"},borders:{color:"rgba(139,126,245,0.15)",radiusSm:"14px",radiusMd:"22px",radiusLg:"32px",radiusXl:"48px",radiusFull:"9999px",width:"0px",divider:"rgba(139,126,245,0.12)"},shadows:{sm:"-3px -3px 6px rgba(255,255,255,0.8), 3px 3px 8px rgba(139,126,245,0.18), inset 0 0 0 rgba(255,255,255,0)",md:"-5px -5px 12px rgba(255,255,255,0.9), 6px 6px 18px rgba(139,126,245,0.22), inset 1px 1px 1px rgba(255,255,255,0.6)",lg:"-8px -8px 20px rgba(255,255,255,0.95), 10px 10px 32px rgba(139,126,245,0.28), inset 2px 2px 2px rgba(255,255,255,0.7)",xl:"-14px -14px 32px rgba(255,255,255,1), 16px 16px 48px rgba(139,126,245,0.34), inset 3px 3px 4px rgba(255,255,255,0.8)",inner:"inset 4px 4px 10px rgba(139,126,245,0.2), inset -4px -4px 10px rgba(255,255,255,0.9)"},spacing:K,typography:{fontFamily:"'Nunito', -apple-system, sans-serif",headingFontFamily:"'Nunito', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.015em"},transitions:{fast:"160ms cubic-bezier(0.4,0,0.2,1.4)",normal:"260ms cubic-bezier(0.4,0,0.2,1.4)",slow:"400ms cubic-bezier(0.4,0,0.2,1.4)"}},displayStyle:"neumorphic",variantConfig:{radius:"2xl",density:"comfortable",animation:"normal"}},ao={meta:{id:"bauhaus",name:"Bauhaus",tagline:"Primary palette, geometric rigour, grid as foundation.",tags:["light","geometric","primary","design"]},theme:{name:"Bauhaus",darkMode:"light",colors:{primary:"#d62828",primaryHover:"#a81e1e",success:"#2a9d8f",warning:"#fcbf49",error:"#d62828",info:"#1d4e89",accent:"#fcbf49",focus:"#1d4e89",surface:"#faf5e8",surfaceHover:"#f2ead3"},backgrounds:{primary:"#faf5e8",secondary:"#f5ecd3",tertiary:"#ede0be",hover:"#e5d5a8",elevated:"#ffffff",inset:"#f0e3c0",canvas:"#faf5e8"},text:{primary:"#1a1a1a",secondary:"#3d3d3d",muted:"#7a7a7a",inverse:"#faf5e8"},borders:{color:"#1a1a1a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px",width:"3px",divider:"#1a1a1a"},shadows:{sm:"0 2px 0 0 #1a1a1a",md:"4px 4px 0 0 #1a1a1a",lg:"6px 6px 0 0 #1d4e89",xl:"8px 8px 0 0 #d62828"},spacing:K,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Archivo Black', 'Archivo', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:500,fontWeightMedium:700,fontWeightSemibold:800,fontWeightBold:900,lineHeight:1.4,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"60ms linear",normal:"120ms linear",slow:"200ms linear"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.35}},displayStyle:"bauhaus",variantConfig:{radius:"none",shadow:"md",density:"normal",animation:"subtle"}},no={meta:{id:"bankVault",name:"Bank Vault",tagline:"Navy, gilt accents, serif gravitas — trusted by institutions.",tags:["light","corporate","serif","conservative"]},theme:{name:"Bank Vault",darkMode:"light",colors:{primary:"#0b2545",primaryHover:"#163969",success:"#2d6a4f",warning:"#b08d2e",error:"#8b1a1a",info:"#1d4e89",accent:"#b08d2e",focus:"#0b2545",surface:"#ffffff",surfaceHover:"#f7f4ec"},backgrounds:{primary:"#fbfaf6",secondary:"#f4f0e4",tertiary:"#ebe5d2",hover:"#e3dcc4",elevated:"#ffffff",inset:"#efeadb",canvas:"#fbfaf6"},text:{primary:"#0b2545",secondary:"#3a4b65",muted:"#7a8399",inverse:"#fbfaf6"},borders:{color:"#c9bfa3",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px",width:"1px",divider:"#d4c9a8"},shadows:{sm:"0 1px 0 0 rgba(11,37,69,0.08)",md:"0 1px 3px rgba(11,37,69,0.08), 0 0 0 1px rgba(176,141,46,0.12)",lg:"0 4px 10px rgba(11,37,69,0.1)",xl:"0 12px 24px rgba(11,37,69,0.12)"},spacing:Fl,typography:{fontFamily:"'DM Sans', -apple-system, sans-serif",headingFontFamily:"'Libre Caslon Text', 'DM Serif Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0.005em",headingLetterSpacing:"-0.01em"},transitions:{fast:"90ms cubic-bezier(0.4,0,0.2,1)",normal:"160ms cubic-bezier(0.4,0,0.2,1)",slow:"260ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"bank",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"none"}},ut={obsidianEditorial:qn,neonArcade:Gn,hyggeScandinavian:Kn,brutalistRaw:Jn,glassAurora:Yn,candyPop:Qn,newspaperBroadsheet:Zn,synthwave84:eo,zenMinimal:to,claymorphism:ro,bauhaus:ao,bankVault:no},oo=Object.values(ut);function Pl(e){return ut[e]}function Dl(e){return oo.filter(t=>t.meta.tags.includes(e))}const Hl=["https://fonts.googleapis.com/css2?family=Spectral:wght@300;400;500;600;700&family=Lora:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Poiret+One&family=Cormorant+Garamond:wght@300;400;500;600&display=swap","https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Roboto+Condensed:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Space+Mono:wght@400;700&display=swap","https://fonts.googleapis.com/css2?family=VT323&display=swap","https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Special+Elite&display=swap","https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&display=swap","https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&display=swap","https://fonts.googleapis.com/css2?family=Bangers&display=swap","https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap","https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;700&display=swap","https://fonts.googleapis.com/css2?family=Rubik+Mono+One&family=Rubik:wght@400;500;700;800&display=swap"],so={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},O={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},me={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},ze={space1:"8px",space2:"16px",space3:"24px",space4:"32px",space5:"44px",space6:"56px",space8:"80px"},io={meta:{id:"forestCanopy",name:"Forest Canopy",tagline:"Moss on bark, dappled light — organic radii, earth serif.",tags:["light","nature","serif","organic"]},theme:{name:"Forest Canopy",darkMode:"light",recommendedDisplayStyle:"scandinavian",colors:{primary:"#3d5a40",primaryHover:"#2d4430",success:"#4a7c3a",warning:"#c88d3e",error:"#a63c3c",info:"#5a7c8a",accent:"#8ba878",focus:"#3d5a40",surface:"#f4f1e8",surfaceHover:"#ebe7d5"},backgrounds:{primary:"#f7f4e9",secondary:"#ede8d4",tertiary:"#dfd8be",hover:"#d5cdae",elevated:"#fcfaf1",inset:"#e5ddc5",canvas:"#f0ece0"},text:{primary:"#1e2a1c",secondary:"#3d4a36",muted:"#7a8570",inverse:"#f7f4e9"},borders:{color:"#c4bda0",width:"1px",divider:"#d8d0b5",radiusSm:"3px",radiusMd:"7px",radiusLg:"14px",radiusXl:"22px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(61,90,64,0.06)",md:"0 4px 12px -2px rgba(61,90,64,0.12), 0 2px 4px rgba(61,90,64,0.05)",lg:"0 10px 24px -6px rgba(61,90,64,0.16)",xl:"0 20px 40px -12px rgba(61,90,64,0.22)"},spacing:me,typography:{fontFamily:"'Lora', Georgia, serif",headingFontFamily:"'Spectral', 'Lora', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.7,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"180ms cubic-bezier(0.16,1,0.3,1)",normal:"280ms cubic-bezier(0.16,1,0.3,1)",slow:"420ms cubic-bezier(0.16,1,0.3,1)"},backgroundImage:{type:"pattern",pattern:"dots",opacity:.25}},displayStyle:"scandinavian",variantConfig:{density:"spacious",animation:"normal"}},co={meta:{id:"desertDune",name:"Desert Dune",tagline:"Ochre horizons, warm grain, serif that suns itself.",tags:["light","nature","serif","warm"]},theme:{name:"Desert Dune",darkMode:"light",recommendedDisplayStyle:"softCloud",colors:{primary:"#c8732f",primaryHover:"#a65a1c",success:"#7a8c3a",warning:"#e0a83a",error:"#b34747",info:"#7a8fa6",accent:"#e8a863",focus:"#c8732f",surface:"#fbf3e5",surfaceHover:"#f4e8d0"},backgrounds:{primary:"#fdf7ea",secondary:"#f6ebd3",tertiary:"#eeddb6",hover:"#e5cfa0",elevated:"#ffffff",inset:"#f0dfb8",canvas:"#fdf5e6"},text:{primary:"#3a2413",secondary:"#6b4823",muted:"#a88860",inverse:"#fdf7ea"},borders:{color:"#dcc08c",width:"1px",divider:"#e8d0a5",radiusSm:"12px",radiusMd:"18px",radiusLg:"28px",radiusXl:"40px",radiusFull:"9999px"},shadows:{sm:"0 2px 6px -2px rgba(200,115,47,0.1)",md:"0 8px 20px -6px rgba(200,115,47,0.15)",lg:"0 18px 36px -10px rgba(200,115,47,0.2)",xl:"0 32px 56px -18px rgba(200,115,47,0.28)"},spacing:me,typography:{fontFamily:"'DM Sans', -apple-system, sans-serif",headingFontFamily:"'DM Serif Display', Georgia, serif",monoFontFamily:"'Space Mono', ui-monospace, monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0",headingLetterSpacing:"-0.025em"},transitions:{fast:"160ms ease-out",normal:"280ms cubic-bezier(0.22,1,0.36,1)",slow:"460ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(175deg, #fbecc5 0%, #f6ddaf 40%, #eec28a 100%), radial-gradient(ellipse at 80% 10%, #fff4d9 0%, transparent 60%)"}},displayStyle:"softCloud",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},lo={meta:{id:"arcticCrystal",name:"Arctic Crystal",tagline:"Facets of ice, lean typography, surgical whitespace.",tags:["light","nature","minimal","cold"]},theme:{name:"Arctic Crystal",darkMode:"light",recommendedDisplayStyle:"minimal",colors:{primary:"#2a6a8c",primaryHover:"#1e5374",success:"#4a8a6a",warning:"#d0a040",error:"#c24848",info:"#5a9fc0",accent:"#a8d4e8",focus:"#2a6a8c",surface:"#ffffff",surfaceHover:"#f0f6fa"},backgrounds:{primary:"#f5fafd",secondary:"#eaf2f7",tertiary:"#d8e5ed",hover:"#cfdce6",elevated:"#ffffff",inset:"#e3eef5",canvas:"#f0f7fb"},text:{primary:"#0a2030",secondary:"#3a5468",muted:"#7a95a8",inverse:"#ffffff"},borders:{color:"#cfdde8",width:"1px",divider:"#e0ebf3",radiusSm:"2px",radiusMd:"3px",radiusLg:"4px",radiusXl:"6px",radiusFull:"9999px"},shadows:{sm:"1px 1px 0 rgba(42,106,140,0.06), -1px 0 0 rgba(42,106,140,0.04)",md:"2px 2px 0 rgba(42,106,140,0.08), -2px 0 0 rgba(42,106,140,0.04), 0 4px 8px -2px rgba(42,106,140,0.1)",lg:"4px 4px 0 rgba(42,106,140,0.1), 0 10px 16px -4px rgba(42,106,140,0.14)",xl:"0 24px 40px -12px rgba(42,106,140,0.2)"},spacing:ze,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Inter', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:200,fontWeightMedium:300,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.6,letterSpacing:"0.01em",headingLetterSpacing:"-0.02em"},transitions:{fast:"90ms ease",normal:"160ms ease",slow:"260ms ease"}},displayStyle:"minimal",variantConfig:{radius:"sm",shadow:"subtle",density:"spacious",animation:"subtle"}},uo={meta:{id:"autumnFoliage",name:"Autumn Foliage",tagline:"Ember glow, Fraunces serif, woodsmoke warmth.",tags:["light","nature","serif","warm"]},theme:{name:"Autumn Foliage",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#a83828",primaryHover:"#842818",success:"#6b7c2c",warning:"#c48020",error:"#8a2020",info:"#7a5a3a",accent:"#d89040",focus:"#a83828",surface:"#fbf1e3",surfaceHover:"#f2e4ce"},backgrounds:{primary:"#fdf5e8",secondary:"#f4e5cc",tertiary:"#e8d2aa",hover:"#dec295",elevated:"#fff9ee",inset:"#eedab5",canvas:"#faeed6"},text:{primary:"#2a140a",secondary:"#5a3020",muted:"#997860",inverse:"#fdf5e8"},borders:{color:"#d4b890",width:"1px",divider:"#e0c8a0",radiusSm:"4px",radiusMd:"8px",radiusLg:"14px",radiusXl:"22px",radiusFull:"9999px"},shadows:{sm:"0 1px 2px rgba(168,56,40,0.08)",md:"0 4px 10px -2px rgba(168,56,40,0.12), 0 2px 4px rgba(168,56,40,0.08)",lg:"0 12px 24px -6px rgba(168,56,40,0.18)",xl:"0 24px 48px -16px rgba(168,56,40,0.24)"},spacing:O,typography:{fontFamily:"'Work Sans', sans-serif",headingFontFamily:"'Fraunces', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0.005em",headingLetterSpacing:"-0.02em"},transitions:{fast:"140ms ease",normal:"220ms ease",slow:"360ms ease"}},displayStyle:"editorial",variantConfig:{density:"comfortable",animation:"normal"}},fo={meta:{id:"japaneseWashi",name:"Japanese Washi",tagline:"Sumi ink on cream — quiet serif, paper grain, zero excess.",tags:["light","cultural","serif","minimal"]},theme:{name:"Japanese Washi",darkMode:"light",recommendedDisplayStyle:"zen",colors:{primary:"#1d3557",primaryHover:"#0d2545",success:"#4a7042",warning:"#a8803e",error:"#8b2a2a",info:"#3a5a78",accent:"#c83a3a",focus:"#1d3557",surface:"#faf6ea",surfaceHover:"#f2ebd7"},backgrounds:{primary:"#fdf9ee",secondary:"#f5ecd5",tertiary:"#ecdfbd",hover:"#e4d5aa",elevated:"#ffffff",inset:"#f0e5c8",canvas:"#fbf6e7"},text:{primary:"#1a1610",secondary:"#3d352a",muted:"#8a7f64",inverse:"#fdf9ee"},borders:{color:"#1a1610",width:"1px",divider:"#d4c89e",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px"},shadows:{sm:"none",md:"0 1px 0 0 rgba(26,22,16,0.08)",lg:"0 2px 0 0 rgba(26,22,16,0.1)",xl:"0 4px 12px rgba(26,22,16,0.08)"},spacing:ze,typography:{fontFamily:"'Noto Sans JP', 'Inter', sans-serif",headingFontFamily:"'Noto Serif JP', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:700,lineHeight:1.75,letterSpacing:"0.02em",headingLetterSpacing:"0.01em"},transitions:{fast:"120ms ease",normal:"220ms ease",slow:"340ms ease"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.22,blendMode:"multiply"}},displayStyle:"zen",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},mo={meta:{id:"moroccanMosaic",name:"Moroccan Mosaic",tagline:"Zellige geometry — terracotta, teal, saffron in tiled rhythm.",tags:["light","cultural","geometric","warm"]},theme:{name:"Moroccan Mosaic",darkMode:"light",recommendedDisplayStyle:"bauhaus",colors:{primary:"#0f6b5c",primaryHover:"#0a5246",success:"#5a8a3a",warning:"#e0a03a",error:"#c2522a",info:"#3a7090",accent:"#e8a840",focus:"#0f6b5c",surface:"#f9f1dc",surfaceHover:"#f0e5c2"},backgrounds:{primary:"#fbf3e0",secondary:"#f2e4c2",tertiary:"#e6d2a0",hover:"#dac38a",elevated:"#fdf7e8",inset:"#ecd8b2",canvas:"#f8edd3"},text:{primary:"#2a1608",secondary:"#5a3a20",muted:"#a08860",inverse:"#fbf3e0"},borders:{color:"#2a1608",width:"2px",divider:"#b89868",radiusSm:"3px",radiusMd:"6px",radiusLg:"10px",radiusXl:"14px",radiusFull:"9999px"},shadows:{sm:"2px 2px 0 rgba(42,22,8,0.12)",md:"3px 3px 0 #0f6b5c, 6px 6px 0 rgba(42,22,8,0.08)",lg:"4px 4px 0 #0f6b5c, 8px 8px 0 #e8a840",xl:"6px 6px 0 #c2522a, 12px 12px 0 rgba(42,22,8,0.1)"},spacing:O,typography:{fontFamily:"'Cairo', 'Inter', sans-serif",headingFontFamily:"'Amiri', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.625rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"120ms linear",normal:"200ms linear",slow:"320ms linear"},backgroundImage:{type:"pattern",pattern:"hexagons",opacity:.2}},displayStyle:"bauhaus",variantConfig:{radius:"sm",shadow:"md",density:"normal",animation:"subtle"}},po={meta:{id:"artDecoGatsby",name:"Art Deco Gatsby",tagline:"Gold, emerald, onyx — geometric glamour, thin gilt lines.",tags:["dark","cultural","luxury","geometric"]},theme:{name:"Art Deco Gatsby",darkMode:"dark",recommendedDisplayStyle:"luxe",colors:{primary:"#d4af37",primaryHover:"#e8c850",success:"#4a9c7a",warning:"#e8c850",error:"#c24040",info:"#70a8c0",accent:"#1e5c4a",focus:"#d4af37",surface:"#0f1a16",surfaceHover:"#16251e"},backgrounds:{primary:"#0a0f0c",secondary:"#0f1a16",tertiary:"#16251e",hover:"#1c3028",elevated:"#0f1a16",inset:"#050908",canvas:"#080c0a"},text:{primary:"#f0e4c2",secondary:"#c0b080",muted:"#706448",inverse:"#0a0f0c"},borders:{color:"#6b5828",width:"1px",divider:"#4a3c18",focusColor:"#d4af37",radiusSm:"0",radiusMd:"1px",radiusLg:"2px",radiusXl:"3px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(212,175,55,0.15)",md:"0 2px 8px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.2)",lg:"0 8px 24px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,175,55,0.3), inset 0 1px 0 rgba(212,175,55,0.1)",xl:"0 20px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(212,175,55,0.4)",glow:"0 0 16px rgba(212,175,55,0.3)"},spacing:me,typography:{fontFamily:"'Cormorant Garamond', Georgia, serif",headingFontFamily:"'Poiret One', 'Cormorant Garamond', serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0.04em",headingLetterSpacing:"0.12em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"380ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"luxe",variantConfig:{radius:"none",shadow:"lg",density:"comfortable",animation:"subtle"}},go={meta:{id:"sovietConstructivist",name:"Soviet Constructivist",tagline:"Rodchenko red — slab type, hard angles, propaganda poise.",tags:["light","cultural","brutalist","geometric"]},theme:{name:"Soviet Constructivist",darkMode:"light",recommendedDisplayStyle:"brutalist",colors:{primary:"#c41e1e",primaryHover:"#8a1414",success:"#3a6a3a",warning:"#d08028",error:"#8a1414",info:"#2a4060",accent:"#1a1a1a",focus:"#c41e1e",surface:"#f0ead8",surfaceHover:"#e5dcc0"},backgrounds:{primary:"#f4efde",secondary:"#e8dec4",tertiary:"#d8c9a4",hover:"#ccbb90",elevated:"#faf5e5",inset:"#dccda8",canvas:"#f0ead5"},text:{primary:"#1a1a1a",secondary:"#3d3d3d",muted:"#706d5a",inverse:"#f4efde"},borders:{color:"#1a1a1a",width:"3px",divider:"#1a1a1a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"4px 0 0 0 #c41e1e",md:"6px 6px 0 0 #1a1a1a, 8px 8px 0 0 #c41e1e",lg:"10px 10px 0 0 #c41e1e",xl:"12px -4px 0 0 #1a1a1a, 16px 0 0 0 #c41e1e"},spacing:O,typography:{fontFamily:"'Roboto Condensed', 'Archivo', sans-serif",headingFontFamily:"'Alfa Slab One', 'Archivo Black', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.35,letterSpacing:"0.02em",headingLetterSpacing:"-0.005em"},transitions:{fast:"0ms linear",normal:"80ms linear",slow:"160ms linear"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"subtle"}},yo={meta:{id:"blueprint",name:"Blueprint",tagline:"Cyanotype drafting — white lines, grid paper, technical mono.",tags:["dark","tech","technical","mono"]},theme:{name:"Blueprint",darkMode:"dark",recommendedDisplayStyle:"dashboard",colors:{primary:"#f0f4f8",primaryHover:"#ffffff",success:"#88e0b8",warning:"#ffcc66",error:"#ff8888",info:"#88c8ff",accent:"#6eb0e0",focus:"#ffffff",surface:"#18456a",surfaceHover:"#1f527e"},backgrounds:{primary:"#0e3356",secondary:"#124066",tertiary:"#184d79",hover:"#1e5a8c",elevated:"#18456a",inset:"#082540",canvas:"#0a2d4a"},text:{primary:"#f0f4f8",secondary:"#b5c8da",muted:"#6e8aa4",inverse:"#0e3356"},borders:{color:"#3870a0",width:"1px",divider:"#2a5680",focusColor:"#ffffff",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(240,244,248,0.05)",md:"0 1px 0 0 rgba(240,244,248,0.1), 0 4px 8px rgba(0,0,0,0.3)",lg:"0 1px 0 0 rgba(240,244,248,0.14), 0 10px 20px rgba(0,0,0,0.4)",xl:"0 20px 40px rgba(0,0,0,0.5)"},spacing:O,typography:{fontFamily:"'IBM Plex Mono', ui-monospace, monospace",headingFontFamily:"'Space Grotesk', 'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.25rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"-0.01em"},transitions:{fast:"80ms linear",normal:"140ms linear",slow:"220ms linear"},backgroundImage:{type:"pattern",pattern:"grid",opacity:.4}},displayStyle:"dashboard",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"subtle"}},ho={meta:{id:"hologramUI",name:"Hologram UI",tagline:"Iridescent light-leaks, translucent layers, futurist geometry.",tags:["dark","tech","glass","neon"]},theme:{name:"Hologram UI",darkMode:"dark",recommendedDisplayStyle:"cosmic",colors:{primary:"#8be9fd",primaryHover:"#a8f0ff",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#bd93f9",accent:"#ff79c6",focus:"#8be9fd",surface:"rgba(40,30,70,0.5)",surfaceHover:"rgba(50,40,85,0.6)"},backgrounds:{primary:"rgba(30,20,55,0.6)",secondary:"rgba(40,30,70,0.5)",tertiary:"rgba(55,40,90,0.4)",hover:"rgba(65,50,105,0.55)",elevated:"rgba(50,38,82,0.7)",inset:"rgba(25,18,45,0.6)",canvas:"#0a0618"},text:{primary:"#f0e8ff",secondary:"#b0a0e0",muted:"#6a5a94",inverse:"#0a0618"},borders:{color:"rgba(139,233,253,0.25)",width:"1px",divider:"rgba(139,233,253,0.15)",focusColor:"#8be9fd",radiusSm:"4px",radiusMd:"8px",radiusLg:"14px",radiusXl:"20px",radiusFull:"9999px"},shadows:{sm:"0 0 12px rgba(139,233,253,0.2)",md:"0 4px 20px rgba(189,147,249,0.3), 0 0 1px rgba(139,233,253,0.4)",lg:"0 8px 40px rgba(255,121,198,0.35), 0 0 2px rgba(139,233,253,0.5), inset 0 1px 0 rgba(255,255,255,0.08)",xl:"0 20px 60px rgba(139,233,253,0.4), inset 0 1px 0 rgba(255,255,255,0.1)",glow:"0 0 32px rgba(139,233,253,0.6), 0 0 64px rgba(255,121,198,0.3)"},spacing:O,typography:{fontFamily:"'Rajdhani', -apple-system, sans-serif",headingFontFamily:"'Orbitron', 'Rajdhani', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.06em"},transitions:{fast:"160ms cubic-bezier(0.4,0,0.2,1)",normal:"280ms cubic-bezier(0.4,0,0.2,1)",slow:"440ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 15% 20%, rgba(139,233,253,0.25) 0%, transparent 50%), radial-gradient(at 85% 25%, rgba(255,121,198,0.25) 0%, transparent 50%), radial-gradient(at 50% 90%, rgba(189,147,249,0.3) 0%, transparent 55%), linear-gradient(135deg, #0a0618 0%, #1a0e38 100%)"}},displayStyle:"cosmic",variantConfig:{shadow:"glow",density:"normal",animation:"normal"}},bo={meta:{id:"deepSea",name:"Deep Sea",tagline:"Midnight blue abyss, bioluminescent accents in the dark.",tags:["dark","tech","organic"]},theme:{name:"Deep Sea",darkMode:"dark",recommendedDisplayStyle:"modern3d",colors:{primary:"#00d9c4",primaryHover:"#2feedc",success:"#5af0b0",warning:"#f0c858",error:"#ff6a82",info:"#60c0ff",accent:"#a878f0",focus:"#00d9c4",surface:"#0a1524",surfaceHover:"#0e1c30"},backgrounds:{primary:"#05101c",secondary:"#0a1524",tertiary:"#0f1f34",hover:"#163044",elevated:"#0e1c30",inset:"#030810",canvas:"#030810"},text:{primary:"#d8f0f5",secondary:"#88b8c8",muted:"#4a7080",inverse:"#030810"},borders:{color:"#183548",width:"1px",divider:"#0f2638",focusColor:"#00d9c4",radiusSm:"8px",radiusMd:"14px",radiusLg:"22px",radiusXl:"32px",radiusFull:"9999px"},shadows:{sm:"0 2px 8px rgba(0,217,196,0.08)",md:"0 6px 20px rgba(0,217,196,0.12), 0 2px 4px rgba(0,0,0,0.5)",lg:"0 14px 40px rgba(0,217,196,0.18), 0 4px 8px rgba(0,0,0,0.6)",xl:"0 28px 64px rgba(0,217,196,0.22), 0 8px 16px rgba(0,0,0,0.7)",glow:"0 0 24px rgba(0,217,196,0.5)"},spacing:O,typography:{fontFamily:"'IBM Plex Sans', -apple-system, sans-serif",headingFontFamily:"'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"160ms cubic-bezier(0.22,1,0.36,1)",normal:"280ms cubic-bezier(0.22,1,0.36,1)",slow:"440ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 20% 30%, rgba(0,217,196,0.08) 0%, transparent 60%), radial-gradient(at 80% 80%, rgba(168,120,240,0.06) 0%, transparent 55%), linear-gradient(180deg, #030810 0%, #05101c 100%)"}},displayStyle:"modern3d",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},So={meta:{id:"analog70s",name:"Analog 70s",tagline:"Mustard, rust, walnut — chunky, warm, turntable energy.",tags:["light","retro","warm","serif"]},theme:{name:"Analog 70s",darkMode:"light",recommendedDisplayStyle:"rounded",colors:{primary:"#c8621e",primaryHover:"#a04d14",success:"#7a8a2a",warning:"#d8a030",error:"#a03030",info:"#6a7a8a",accent:"#d8a830",focus:"#c8621e",surface:"#f5ead2",surfaceHover:"#ecdfc0"},backgrounds:{primary:"#f7ecd6",secondary:"#eeddb8",tertiary:"#e2c998",hover:"#d8bc80",elevated:"#fbf2de",inset:"#e8cfa5",canvas:"#f2e4c8"},text:{primary:"#2a1608",secondary:"#5a2e14",muted:"#a07852",inverse:"#f7ecd6"},borders:{color:"#b89868",width:"2px",divider:"#ccb285",radiusSm:"10px",radiusMd:"16px",radiusLg:"24px",radiusXl:"34px",radiusFull:"9999px"},shadows:{sm:"0 2px 0 0 rgba(42,22,8,0.12)",md:"0 4px 0 0 rgba(42,22,8,0.15), 0 6px 10px rgba(200,98,30,0.12)",lg:"0 6px 0 0 rgba(42,22,8,0.18), 0 10px 20px rgba(200,98,30,0.2)",xl:"0 8px 0 0 rgba(42,22,8,0.22), 0 20px 40px rgba(200,98,30,0.28)"},spacing:O,typography:{fontFamily:"'Work Sans', sans-serif",headingFontFamily:"'Abril Fatface', Georgia, serif",monoFontFamily:"'Space Mono', ui-monospace, monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.02em"},transitions:{fast:"180ms cubic-bezier(0.34,1.56,0.64,1)",normal:"280ms cubic-bezier(0.34,1.56,0.64,1)",slow:"440ms cubic-bezier(0.34,1.56,0.64,1)"}},displayStyle:"rounded",variantConfig:{radius:"xl",shadow:"md",density:"comfortable",animation:"playful"}},xo={meta:{id:"vhsTracking",name:"VHS Tracking",tagline:"Chromatic smear, scan-line haze, pixel type from another decade.",tags:["dark","retro","pixel","experimental"]},theme:{name:"VHS Tracking",darkMode:"dark",recommendedDisplayStyle:"retro8bit",colors:{primary:"#ff3eb5",primaryHover:"#ff5fc5",success:"#3eff90",warning:"#ffe83e",error:"#ff3e3e",info:"#3ee0ff",accent:"#3eff90",focus:"#ff3eb5",surface:"#120818",surfaceHover:"#1a0c24"},backgrounds:{primary:"#0a0412",secondary:"#120818",tertiary:"#1a0c24",hover:"#241230",elevated:"#120818",inset:"#050208",canvas:"#0a0412"},text:{primary:"#f8e8ff",secondary:"#c888d8",muted:"#605070",inverse:"#0a0412"},borders:{color:"#4a2864",width:"1px",divider:"#2a1840",focusColor:"#ff3eb5",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"0"},shadows:{sm:"-2px 0 0 rgba(255,62,181,0.5), 2px 0 0 rgba(62,224,255,0.5)",md:"-3px 0 0 rgba(255,62,181,0.6), 3px 0 0 rgba(62,224,255,0.6), 0 4px 12px rgba(0,0,0,0.6)",lg:"-4px 0 0 rgba(255,62,181,0.7), 4px 0 0 rgba(62,224,255,0.7), 0 8px 24px rgba(0,0,0,0.7)",xl:"-6px 0 0 rgba(255,62,181,0.8), 6px 0 0 rgba(62,224,255,0.8)",glow:"0 0 20px rgba(255,62,181,0.6)"},spacing:O,typography:{fontFamily:"'VT323', 'JetBrains Mono', monospace",headingFontFamily:"'VT323', monospace",monoFontFamily:"'VT323', monospace",fontSizeXs:"0.9375rem",fontSizeSm:"1rem",fontSizeMd:"1.125rem",fontSizeLg:"1.375rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:400,fontWeightBold:400,lineHeight:1.35,letterSpacing:"0.01em",headingLetterSpacing:"0.04em"},transitions:{fast:"40ms steps(3)",normal:"100ms steps(5)",slow:"180ms steps(8)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #0a0412 0%, #120818 100%), repeating-linear-gradient(0deg, rgba(255,62,181,0.03) 0 2px, transparent 2px 4px)"}},displayStyle:"retro8bit",variantConfig:{radius:"none",shadow:"md",density:"normal",animation:"subtle"}},vo={meta:{id:"typewriterPress",name:"Typewriter Press",tagline:"Ribbon red on cream — Courier bones, stamped display.",tags:["light","retro","mono","editorial"]},theme:{name:"Typewriter Press",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#b02020",primaryHover:"#8a1818",success:"#4a7038",warning:"#b08018",error:"#8a1818",info:"#3a5068",accent:"#1a1a1a",focus:"#b02020",surface:"#faf3df",surfaceHover:"#f0e7c6"},backgrounds:{primary:"#fbf5e3",secondary:"#f3e9c8",tertiary:"#ebdcab",hover:"#e2cf8f",elevated:"#fffae7",inset:"#efe0b0",canvas:"#fbf5e3"},text:{primary:"#1a1a1a",secondary:"#3d3428",muted:"#7a6f4a",inverse:"#fbf5e3"},borders:{color:"#1a1a1a",width:"1px",divider:"#c8b880",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"0 0 0 rgba(26,26,26,0), 1px 1px 0 rgba(26,26,26,0.12)",md:"1px 1px 0 rgba(26,26,26,0.15), 2px 2px 0 rgba(176,32,32,0.1)",lg:"2px 2px 0 rgba(26,26,26,0.2), 4px 4px 0 rgba(176,32,32,0.12)",xl:"3px 3px 0 rgba(26,26,26,0.25)"},spacing:O,typography:{fontFamily:"'Courier Prime', 'Courier New', monospace",headingFontFamily:"'Special Elite', 'Courier Prime', monospace",monoFontFamily:"'Courier Prime', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.6,letterSpacing:"0.01em",headingLetterSpacing:"0.04em"},transitions:{fast:"40ms linear",normal:"80ms linear",slow:"140ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.2,blendMode:"multiply"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"subtle",density:"normal",animation:"none"}},wo={meta:{id:"y2kAqua",name:"Y2K Aqua",tagline:"Chrome and aqua — iMac blue, optimistic futurism, 2001 energy.",tags:["light","retro","glass"]},theme:{name:"Y2K Aqua",darkMode:"light",recommendedDisplayStyle:"modern3d",colors:{primary:"#0a84ff",primaryHover:"#0066cc",success:"#34c759",warning:"#ff9500",error:"#ff3b30",info:"#5ac8fa",accent:"#5ac8fa",focus:"#0a84ff",surface:"#f0f5fc",surfaceHover:"#e0ecfa"},backgrounds:{primary:"#e8f2fc",secondary:"#d8e8f8",tertiary:"#c0d8f0",hover:"#a8c8e8",elevated:"#ffffff",inset:"#c8dcf4",canvas:"#dce8f4"},text:{primary:"#0a1a30",secondary:"#304868",muted:"#6a88a8",inverse:"#ffffff"},borders:{color:"#a0c0e0",width:"1px",divider:"#c0d8f0",radiusSm:"6px",radiusMd:"10px",radiusLg:"16px",radiusXl:"24px",radiusFull:"9999px"},shadows:{sm:"inset 0 1px 0 rgba(255,255,255,0.8), 0 1px 2px rgba(10,132,255,0.15)",md:"inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -1px 2px rgba(10,132,255,0.2), 0 2px 6px rgba(10,132,255,0.25), 0 4px 12px rgba(10,132,255,0.15)",lg:"inset 0 1px 0 rgba(255,255,255,0.95), 0 4px 12px rgba(10,132,255,0.3), 0 10px 24px rgba(90,200,250,0.25)",xl:"inset 0 2px 0 rgba(255,255,255,1), 0 8px 24px rgba(10,132,255,0.35), 0 20px 48px rgba(90,200,250,0.3)"},spacing:O,typography:{fontFamily:"'Chakra Petch', -apple-system, sans-serif",headingFontFamily:"'Chakra Petch', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5,letterSpacing:"0.01em",headingLetterSpacing:"-0.005em"},transitions:{fast:"140ms cubic-bezier(0.4,0,0.2,1)",normal:"240ms cubic-bezier(0.4,0,0.2,1)",slow:"380ms cubic-bezier(0.4,0,0.2,1)"},backgroundImage:{type:"gradient",gradient:"linear-gradient(180deg, #f0f7ff 0%, #d8e8f8 60%, #bcd6f0 100%)"}},displayStyle:"modern3d",variantConfig:{radius:"lg",shadow:"lg",density:"normal",animation:"normal"}},ko={meta:{id:"vogueDidone",name:"Vogue Didone",tagline:"Didone serif, arctic whitespace, one red heartbeat.",tags:["light","editorial","serif","luxury"]},theme:{name:"Vogue Didone",darkMode:"light",recommendedDisplayStyle:"editorial",colors:{primary:"#000000",primaryHover:"#1a1a1a",success:"#1f6a3a",warning:"#8a6a1a",error:"#c40018",info:"#2a4068",accent:"#c40018",focus:"#c40018",surface:"#ffffff",surfaceHover:"#f7f7f7"},backgrounds:{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f2f2f2",hover:"#ededed",elevated:"#ffffff",inset:"#f5f5f5",canvas:"#ffffff"},text:{primary:"#000000",secondary:"#2a2a2a",muted:"#808080",inverse:"#ffffff"},borders:{color:"#000000",width:"1px",divider:"#dcdcdc",radiusSm:"0",radiusMd:"0",radiusLg:"1px",radiusXl:"2px",radiusFull:"9999px"},shadows:{sm:"none",md:"none",lg:"0 1px 0 0 #000000",xl:"0 2px 0 0 #000000"},spacing:ze,typography:{fontFamily:"'Inter', -apple-system, sans-serif",headingFontFamily:"'Playfair Display', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:900,lineHeight:1.7,letterSpacing:"0.02em",headingLetterSpacing:"-0.03em"},transitions:{fast:"120ms ease",normal:"220ms ease",slow:"360ms ease"}},displayStyle:"editorial",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},Co={meta:{id:"comicHalftone",name:"Comic Halftone",tagline:"CMYK pop — halftone dots, action type, offset ink shadows.",tags:["light","editorial","playful"]},theme:{name:"Comic Halftone",darkMode:"light",recommendedDisplayStyle:"playful",colors:{primary:"#e8182c",primaryHover:"#c01020",success:"#1ea862",warning:"#f0c820",error:"#e8182c",info:"#1878c8",accent:"#1878c8",focus:"#e8182c",surface:"#fffdf4",surfaceHover:"#fff8d8"},backgrounds:{primary:"#fffef0",secondary:"#fff6b8",tertiary:"#ffe870",hover:"#ffd838",elevated:"#ffffff",inset:"#fff090",canvas:"#fffdec"},text:{primary:"#0a0a0a",secondary:"#2a2a2a",muted:"#707070",inverse:"#fffef0"},borders:{color:"#0a0a0a",width:"3px",divider:"#0a0a0a",radiusSm:"2px",radiusMd:"4px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},shadows:{sm:"3px 3px 0 0 #0a0a0a",md:"5px 5px 0 0 #0a0a0a",lg:"6px 6px 0 0 #e8182c, 10px 10px 0 0 #0a0a0a",xl:"8px 8px 0 0 #1878c8, 12px 12px 0 0 #0a0a0a"},spacing:O,typography:{fontFamily:"'Archivo', -apple-system, sans-serif",headingFontFamily:"'Bangers', 'Archivo Black', cursive",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2.125rem",fontWeightNormal:500,fontWeightMedium:600,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.45,letterSpacing:"0",headingLetterSpacing:"0.03em"},transitions:{fast:"100ms cubic-bezier(0.34,1.56,0.64,1)",normal:"200ms cubic-bezier(0.34,1.56,0.64,1)",slow:"320ms cubic-bezier(0.34,1.56,0.64,1)"},backgroundImage:{type:"pattern",pattern:"dots",opacity:.5}},displayStyle:"playful",variantConfig:{radius:"sm",shadow:"lg",density:"normal",animation:"playful"}},Mo={meta:{id:"zinePunk",name:"Zine Punk",tagline:"Photocopier grain, marker headlines, cut-and-paste attitude.",tags:["light","editorial","experimental","brutalist"]},theme:{name:"Zine Punk",darkMode:"light",recommendedDisplayStyle:"brutalist",colors:{primary:"#0a0a0a",primaryHover:"#000000",success:"#1a1a1a",warning:"#2a2a2a",error:"#0a0a0a",info:"#1a1a1a",accent:"#0a0a0a",focus:"#0a0a0a",surface:"#f5f3ee",surfaceHover:"#e8e4d8"},backgrounds:{primary:"#efece0",secondary:"#e3dfd0",tertiary:"#d4d0c0",hover:"#c8c4b4",elevated:"#f5f3ee",inset:"#e0dcc8",canvas:"#ede8d8"},text:{primary:"#0a0a0a",secondary:"#1a1a1a",muted:"#505050",inverse:"#efece0"},borders:{color:"#0a0a0a",width:"2px",divider:"#0a0a0a",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"2px 3px 0 rgba(10,10,10,0.9)",md:"4px 6px 0 rgba(10,10,10,0.9), -2px 2px 0 rgba(10,10,10,0.3)",lg:"6px 10px 0 rgba(10,10,10,1), -4px 2px 0 rgba(10,10,10,0.4)",xl:"10px 14px 0 rgba(10,10,10,1)"},spacing:O,typography:{fontFamily:"'Special Elite', 'Courier Prime', monospace",headingFontFamily:"'Permanent Marker', 'Special Elite', cursive",monoFontFamily:"'Courier Prime', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:400,fontWeightSemibold:400,fontWeightBold:400,lineHeight:1.5,letterSpacing:"0.02em",headingLetterSpacing:"0.01em"},transitions:{fast:"20ms linear",normal:"60ms linear",slow:"120ms linear"},backgroundImage:{type:"pattern",pattern:"noise",opacity:.3,blendMode:"multiply"}},displayStyle:"brutalist",variantConfig:{radius:"none",shadow:"lg",density:"normal",animation:"none"}},Ao={meta:{id:"watercolorWash",name:"Watercolor Wash",tagline:"Soft pastel bleeds, handwritten headings, paper gentleness.",tags:["light","artistic","pastel","organic"]},theme:{name:"Watercolor Wash",darkMode:"light",recommendedDisplayStyle:"softCloud",colors:{primary:"#9d7bc4",primaryHover:"#8262ab",success:"#7bb88a",warning:"#e0a868",error:"#d47878",info:"#7ba8c4",accent:"#e0a0c0",focus:"#9d7bc4",surface:"rgba(255,250,245,0.8)",surfaceHover:"rgba(250,240,238,0.9)"},backgrounds:{primary:"#fdf8f4",secondary:"#f8eee6",tertiary:"#f0e0d4",hover:"#e8d2c0",elevated:"#ffffff",inset:"#f4e4d8",canvas:"#fdf8f4"},text:{primary:"#3a2845",secondary:"#6a5868",muted:"#a89ca4",inverse:"#fdf8f4"},borders:{color:"#e8d4c8",width:"1px",divider:"#f0e0d4",radiusSm:"10px",radiusMd:"18px",radiusLg:"30px",radiusXl:"44px",radiusFull:"9999px"},shadows:{sm:"0 2px 10px rgba(157,123,196,0.08)",md:"0 6px 24px rgba(157,123,196,0.12), 0 2px 4px rgba(224,160,192,0.06)",lg:"0 16px 40px rgba(157,123,196,0.18), 0 6px 12px rgba(224,160,192,0.1)",xl:"0 30px 64px rgba(157,123,196,0.22)"},spacing:me,typography:{fontFamily:"'Quicksand', -apple-system, sans-serif",headingFontFamily:"'Caveat', 'Quicksand', cursive",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"2rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.65,letterSpacing:"0",headingLetterSpacing:"-0.005em"},transitions:{fast:"220ms cubic-bezier(0.22,1,0.36,1)",normal:"380ms cubic-bezier(0.22,1,0.36,1)",slow:"600ms cubic-bezier(0.22,1,0.36,1)"},backgroundImage:{type:"gradient",gradient:"radial-gradient(at 18% 22%, rgba(232,208,220,0.5) 0%, transparent 40%), radial-gradient(at 82% 28%, rgba(200,220,240,0.45) 0%, transparent 45%), radial-gradient(at 35% 80%, rgba(232,228,200,0.4) 0%, transparent 50%), linear-gradient(180deg, #fdf8f4 0%, #f8eee6 100%)"}},displayStyle:"softCloud",variantConfig:{radius:"xl",density:"comfortable",animation:"normal"}},Eo={meta:{id:"memphis80s",name:"Memphis 80s",tagline:"Squiggle chaos — cyan, pink, yellow, serious typography, no.",tags:["light","artistic","playful"]},theme:{name:"Memphis 80s",darkMode:"light",recommendedDisplayStyle:"playful",colors:{primary:"#f02080",primaryHover:"#c81868",success:"#28c868",warning:"#f8d820",error:"#f02040",info:"#20b8e8",accent:"#f8d820",focus:"#20b8e8",surface:"#fffffa",surfaceHover:"#fff7d0"},backgrounds:{primary:"#fffceb",secondary:"#fff2d0",tertiary:"#ffe8b4",hover:"#ffdd98",elevated:"#ffffff",inset:"#fff0c0",canvas:"#fffbe0"},text:{primary:"#0a0a1a",secondary:"#2a2a3a",muted:"#6a6a7a",inverse:"#fffceb"},borders:{color:"#0a0a1a",width:"2px",divider:"#0a0a1a",radiusSm:"4px",radiusMd:"6px",radiusLg:"10px",radiusXl:"14px",radiusFull:"9999px"},shadows:{sm:"3px 3px 0 0 #20b8e8",md:"4px 4px 0 0 #f02080, 8px 8px 0 0 #f8d820",lg:"5px 5px 0 0 #28c868, 10px 10px 0 0 #20b8e8, 15px 15px 0 0 #f02080",xl:"6px 6px 0 0 #f8d820, 12px 12px 0 0 #f02080, 18px 18px 0 0 #20b8e8"},spacing:O,typography:{fontFamily:"'Rubik', -apple-system, sans-serif",headingFontFamily:"'Rubik Mono One', 'Rubik', sans-serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.8125rem",fontSizeSm:"0.9375rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.875rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:800,lineHeight:1.4,letterSpacing:"0",headingLetterSpacing:"-0.01em"},transitions:{fast:"120ms cubic-bezier(0.68,-0.55,0.27,1.55)",normal:"220ms cubic-bezier(0.68,-0.55,0.27,1.55)",slow:"360ms cubic-bezier(0.68,-0.55,0.27,1.55)"},backgroundImage:{type:"pattern",pattern:"zigzag",opacity:.3}},displayStyle:"playful",variantConfig:{radius:"sm",shadow:"lg",density:"normal",animation:"playful"}},No={meta:{id:"inkSumie",name:"Ink Sumi-e",tagline:"Charcoal brush on rice paper — vast silence, one red seal.",tags:["light","artistic","serif","minimal"]},theme:{name:"Ink Sumi-e",darkMode:"light",recommendedDisplayStyle:"zen",colors:{primary:"#1a1a1a",primaryHover:"#000000",success:"#2a4a2a",warning:"#705820",error:"#b82020",info:"#2a4060",accent:"#b82020",focus:"#1a1a1a",surface:"#ffffff",surfaceHover:"#f8f7f3"},backgrounds:{primary:"#fdfcf7",secondary:"#f5f3eb",tertiary:"#ebe8dc",hover:"#dfdbcc",elevated:"#ffffff",inset:"#f0edde",canvas:"#fdfcf7"},text:{primary:"#1a1a1a",secondary:"#3a3a3a",muted:"#888482",inverse:"#fdfcf7"},borders:{color:"#1a1a1a",width:"1px",divider:"#d8d4c4",radiusSm:"0",radiusMd:"0",radiusLg:"1px",radiusXl:"2px",radiusFull:"9999px"},shadows:{sm:"none",md:"none",lg:"none",xl:"0 0 0 1px #1a1a1a"},spacing:ze,typography:{fontFamily:"'Noto Sans JP', -apple-system, sans-serif",headingFontFamily:"'Noto Serif JP', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.9375rem",fontSizeLg:"1.0625rem",fontSizeXl:"1.625rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:700,lineHeight:1.85,letterSpacing:"0.04em",headingLetterSpacing:"0"},transitions:{fast:"200ms ease",normal:"340ms ease",slow:"520ms ease"}},displayStyle:"zen",variantConfig:{radius:"none",shadow:"none",density:"spacious",animation:"subtle"}},To={meta:{id:"dieterRams",name:"Dieter Rams",tagline:"Less-but-better — warm gray, single yellow dot, measured everything.",tags:["light","minimal","industrial"]},theme:{name:"Dieter Rams",darkMode:"light",recommendedDisplayStyle:"swiss",colors:{primary:"#1a1a1a",primaryHover:"#0a0a0a",success:"#3a7840",warning:"#e8c020",error:"#c83028",info:"#3868a0",accent:"#e8c020",focus:"#1a1a1a",surface:"#ffffff",surfaceHover:"#f8f8f8"},backgrounds:{primary:"#fbfbf9",secondary:"#f2f2ee",tertiary:"#e8e8e2",hover:"#dedeD6",elevated:"#ffffff",inset:"#ededE7",canvas:"#f5f5f1"},text:{primary:"#0a0a0a",secondary:"#3a3a38",muted:"#888880",inverse:"#fbfbf9"},borders:{color:"#d4d4ce",width:"1px",divider:"#e0e0da",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 1px 0 0 rgba(0,0,0,0.04)",md:"0 1px 0 0 rgba(0,0,0,0.06), 0 4px 8px -2px rgba(0,0,0,0.06)",lg:"0 2px 0 0 rgba(0,0,0,0.08), 0 10px 20px -6px rgba(0,0,0,0.1)",xl:"0 20px 40px -12px rgba(0,0,0,0.14)"},spacing:so,typography:{fontFamily:"'IBM Plex Sans', -apple-system, sans-serif",headingFontFamily:"'IBM Plex Sans', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.375rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.55,letterSpacing:"0",headingLetterSpacing:"-0.015em"},transitions:{fast:"100ms cubic-bezier(0.4,0,0.2,1)",normal:"180ms cubic-bezier(0.4,0,0.2,1)",slow:"280ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"swiss",variantConfig:{radius:"sm",shadow:"subtle",density:"compact",animation:"subtle"}},Lo={meta:{id:"blackTieGala",name:"Black Tie Gala",tagline:"Absolute black, hand-gilded detail, whispered serif elegance.",tags:["dark","luxury","serif"]},theme:{name:"Black Tie Gala",darkMode:"dark",recommendedDisplayStyle:"luxe",colors:{primary:"#c89848",primaryHover:"#e0b868",success:"#68a878",warning:"#e0b050",error:"#c85858",info:"#8aa8d0",accent:"#e8d0a0",focus:"#c89848",surface:"#0e0e0e",surfaceHover:"#161616"},backgrounds:{primary:"#050505",secondary:"#0e0e0e",tertiary:"#161616",hover:"#1e1e1e",elevated:"#0e0e0e",inset:"#020202",canvas:"#030303"},text:{primary:"#f0ead8",secondary:"#a89870",muted:"#605848",inverse:"#050505"},borders:{color:"#3a2e18",width:"1px",divider:"#241a0c",focusColor:"#c89848",radiusSm:"1px",radiusMd:"2px",radiusLg:"3px",radiusXl:"4px",radiusFull:"9999px"},shadows:{sm:"0 0 0 1px rgba(200,152,72,0.1)",md:"0 4px 16px rgba(0,0,0,0.8), 0 0 0 1px rgba(200,152,72,0.15)",lg:"0 10px 32px rgba(0,0,0,0.9), 0 0 0 1px rgba(200,152,72,0.25), inset 0 1px 0 rgba(232,208,160,0.08)",xl:"0 24px 56px rgba(0,0,0,1), 0 0 0 1px rgba(200,152,72,0.35)",glow:"0 0 24px rgba(200,152,72,0.25)"},spacing:me,typography:{fontFamily:"'Cormorant Garamond', Georgia, serif",headingFontFamily:"'Cormorant Garamond', Georgia, serif",monoFontFamily:"'JetBrains Mono', monospace",fontSizeXs:"0.75rem",fontSizeSm:"0.875rem",fontSizeMd:"1rem",fontSizeLg:"1.125rem",fontSizeXl:"1.75rem",fontWeightNormal:300,fontWeightMedium:400,fontWeightSemibold:500,fontWeightBold:600,lineHeight:1.65,letterSpacing:"0.05em",headingLetterSpacing:"0.08em"},transitions:{fast:"180ms cubic-bezier(0.4,0,0.2,1)",normal:"320ms cubic-bezier(0.4,0,0.2,1)",slow:"500ms cubic-bezier(0.4,0,0.2,1)"}},displayStyle:"luxe",variantConfig:{radius:"sm",shadow:"lg",density:"spacious",animation:"subtle"}},Io={meta:{id:"swissGrid",name:"Swiss Grid",tagline:"Akzidenz rigor — white, black, one red, grid discipline.",tags:["light","minimal","editorial"]},theme:{name:"Swiss Grid",darkMode:"light",recommendedDisplayStyle:"swiss",colors:{primary:"#e30613",primaryHover:"#b8040f",success:"#00683d",warning:"#b8700a",error:"#e30613",info:"#004c98",accent:"#e30613",focus:"#e30613",surface:"#ffffff",surfaceHover:"#f5f5f5"},backgrounds:{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#e0e0e0",elevated:"#ffffff",inset:"#f0f0f0",canvas:"#ffffff"},text:{primary:"#0a0a0a",secondary:"#2a2a2a",muted:"#707070",inverse:"#ffffff"},borders:{color:"#0a0a0a",width:"1px",divider:"#d0d0d0",radiusSm:"0",radiusMd:"0",radiusLg:"0",radiusXl:"0",radiusFull:"9999px"},shadows:{sm:"none",md:"0 1px 0 0 rgba(10,10,10,0.1)",lg:"0 2px 0 0 rgba(10,10,10,0.12)",xl:"0 4px 0 0 rgba(10,10,10,0.15)"},spacing:so,typography:{fontFamily:"'Inter', 'Helvetica Neue', sans-serif",headingFontFamily:"'Inter', 'Helvetica Neue', sans-serif",monoFontFamily:"'IBM Plex Mono', monospace",fontSizeXs:"0.6875rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.5rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:700,fontWeightBold:700,lineHeight:1.45,letterSpacing:"0",headingLetterSpacing:"-0.03em"},transitions:{fast:"60ms linear",normal:"120ms linear",slow:"200ms linear"}},displayStyle:"swiss",variantConfig:{radius:"none",shadow:"none",density:"compact",animation:"subtle"}},ft={forestCanopy:io,desertDune:co,arcticCrystal:lo,autumnFoliage:uo,japaneseWashi:fo,moroccanMosaic:mo,artDecoGatsby:po,sovietConstructivist:go,blueprint:yo,hologramUI:ho,deepSea:bo,analog70s:So,vhsTracking:xo,typewriterPress:vo,y2kAqua:wo,vogueDidone:ko,comicHalftone:Co,zinePunk:Mo,watercolorWash:Ao,memphis80s:Eo,inkSumie:No,dieterRams:To,blackTieGala:Lo,swissGrid:Io},Ro=Object.values(ft);function $l(e){return ft[e]}function jl(e){return Ro.filter(t=>t.meta.tags.includes(e))}function Ol(e,t){return e??t.recommendedDisplayStyle??"default"}const zo=({theme:e,darkTheme:t,variantConfig:r,darkMode:a,displayStyle:n,animateTransitions:o=!0,children:s})=>{const i=c.useId(),l=c.useMemo(()=>`p${i.replace(/:/g,"")}`,[i]),d=c.useRef(null),u=c.useRef(null),[m,g]=c.useState(null),[h,f]=c.useState(e),[y,p]=c.useState(!1),[S,b]=c.useState(()=>Ol(n,e));c.useEffect(()=>{n!==void 0?b(n):e.recommendedDisplayStyle&&b(e.recommendedDisplayStyle)},[n,e.recommendedDisplayStyle]),c.useEffect(()=>{const A=window.matchMedia("(prefers-color-scheme: dark)");p(A.matches);const T=N=>p(N.matches);return A.addEventListener("change",T),()=>A.removeEventListener("change",T)},[]);const v=a??e.darkMode??"light",w=v==="dark"||v==="auto"&&y;c.useEffect(()=>{f(w&&t?t:e)},[e,t,w]),c.useEffect(()=>{if(typeof document>"u")return;const A=document.createElement("div");return A.className="nice-theme-scope nice-theme-portal-host",A.dataset.ntdProvider=l,A.style.display="contents",document.body.appendChild(A),u.current=A,g(A),()=>{A.parentNode&&A.parentNode.removeChild(A),u.current=null,g(null)}},[l]),c.useEffect(()=>{const A=d.current;if(!A)return;o&&(A.style.transition="background-color 300ms ease, color 300ms ease");const T=xe(h);for(const[I,F]of Object.entries(T))A.style.setProperty(I,F);const N=u.current;if(N)for(const[I,F]of Object.entries(T))N.style.setProperty(I,F);A.style.colorScheme=w?"dark":"light",A.dataset.ntdColorScheme=w?"dark":"light",A.dataset.theme=w?"dark":"light",w?A.classList.add("nice-dark"):A.classList.remove("nice-dark"),N&&(N.style.colorScheme=w?"dark":"light",N.dataset.ntdColorScheme=w?"dark":"light",N.dataset.theme=w?"dark":"light",w?N.classList.add("nice-dark"):N.classList.remove("nice-dark"));const R=h.backgroundImage;return R&&R.type!=="none"&&R.type==="gradient"&&R.gradient&&A.style.setProperty("--ntd-bg-image",R.gradient),()=>{A&&Vr(A)}},[h,w,o,m]);const E=c.useRef(new Set);c.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof window>"u"||typeof document>"u")return;const A=window.setTimeout(()=>{const T=xe(h),N=["--color-primary","--nice-primary","--bg-primary","--text-primary"].find(H=>T[H])??Object.keys(T)[0];if(!N)return;const R=String(T[N]??"").trim();if(!R)return;const I=getComputedStyle(document.documentElement).getPropertyValue(N).trim();if(!I||I===R)return;const F=`${l}::${h.name??"unnamed"}::${N}`;E.current.has(F)||(E.current.add(F),console.warn(`[NiceThemeProvider] CSS var "${N}" on documentElement (${I}) does not match the active provider pack "${h.name??"unnamed"}" (${R}). An external applyTheme(...) call (or other code) is overriding the provider — portaled overlays and components reading from :root will look inconsistent. Either remove the external applyTheme call or wrap your app entirely in a single NiceThemeProvider.`))},0);return()=>window.clearTimeout(A)},[h,l]),c.useEffect(()=>{const A=d.current;if(!A)return;const T=r?{...V,...r}:ne(S);Ge(T,A,l);const N=Pt(S);for(const[R,I]of Object.entries(N))A.setAttribute(R,I);return()=>{zt(l,A)}},[r,S,l]);const k=c.useCallback(A=>{f(A)},[]),M=c.useMemo(()=>({theme:h,setTheme:k,portalTarget:m}),[h,k,m]),C=c.useMemo(()=>({displayStyle:S,variantConfig:ne(S),setDisplayStyle:b}),[S]);return x.jsx(ct.Provider,{value:M,children:x.jsx(Ce.Provider,{value:C,children:x.jsx("div",{ref:d,className:"nice-theme-scope","data-ntd-provider":l,style:{display:"contents"},children:s})})})};zo.displayName="NiceThemeProvider";const Fo=c.createContext(null);function Po(){const e=c.useContext(Fo);if(!e)throw new Error("useThemeVariants must be used within NiceThemeVariantProvider");return e}function _l({initialConfig:e,storageKey:t="ntd-variant-config",autoApply:r=!0,children:a}){const[n,o]=c.useState(()=>{if(typeof window<"u"&&t){const d=localStorage.getItem(t);if(d)try{return{...V,...JSON.parse(d)}}catch{}}return{...V,...e}});c.useEffect(()=>{r&&typeof window<"u"&&Ge(n)},[n,r]),c.useEffect(()=>{typeof window<"u"&&t&&localStorage.setItem(t,JSON.stringify(n))},[n,t]);const s=c.useCallback(d=>{o(u=>({...u,...d}))},[]),i=c.useCallback(d=>{const u=ke[d];u&&o(u)},[]),l=c.useCallback(()=>{o(V)},[]);return x.jsx(Fo.Provider,{value:{config:n,setConfig:s,applyPreset:i,reset:l},children:a})}function Bl({showPresets:e=!0,showPreview:t=!0,showCSS:r=!1,collapsible:a=!0,className:n,style:o}){const{config:s,setConfig:i,applyPreset:l,reset:d}=Po(),[u,m]=c.useState(new Set(["presets","radius","shadow"])),g=f=>{a&&m(y=>{const p=new Set(y);return p.has(f)?p.delete(f):p.add(f),p})},h=f=>!a||u.has(f);return x.jsxs("div",{className:`ntd-theme-variant-configurator ${n||""}`,style:{fontFamily:"system-ui, sans-serif",fontSize:"14px",...o},children:[e&&x.jsx(B,{title:"Presets",expanded:h("presets"),onToggle:()=>g("presets"),children:x.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:[Object.keys(ke).map(f=>x.jsx("button",{onClick:()=>l(f),style:{padding:"6px 12px",border:"1px solid var(--border-color, #e5e7eb)",borderRadius:"6px",background:"var(--bg-secondary, #f9fafb)",cursor:"pointer",textTransform:"capitalize"},children:f},f)),x.jsx("button",{onClick:d,style:{padding:"6px 12px",border:"1px solid var(--nice-danger-dark, #dc2626)",borderRadius:"6px",background:"var(--danger-bg, #fef2f2)",color:"var(--color-error, #dc2626)",cursor:"pointer"},children:"Reset"})]})}),x.jsx(B,{title:"Border Radius",expanded:h("radius"),onToggle:()=>g("radius"),children:x.jsx(J,{options:Object.keys(ae),value:s.radius,onChange:f=>i({radius:f}),renderPreview:f=>x.jsx("div",{style:{width:"24px",height:"24px",background:"var(--color-accent, #6366f1)",borderRadius:ae[f].md}})})}),x.jsx(B,{title:"Shadows",expanded:h("shadow"),onToggle:()=>g("shadow"),children:x.jsx(J,{options:Object.keys(he),value:s.shadow,onChange:f=>i({shadow:f}),renderPreview:f=>x.jsx("div",{style:{width:"24px",height:"24px",background:"var(--bg-primary, #fff)",borderRadius:"4px",boxShadow:he[f]}})})}),x.jsx(B,{title:"Button Style",expanded:h("button"),onToggle:()=>g("button"),children:x.jsx(J,{options:["flat","raised","outlined","ghost","soft","gradient","3d","neumorphic"],value:s.buttonStyle,onChange:f=>i({buttonStyle:f})})}),x.jsx(B,{title:"Input Style",expanded:h("input"),onToggle:()=>g("input"),children:x.jsx(J,{options:["bordered","filled","underlined","floating","soft","neumorphic"],value:s.inputStyle,onChange:f=>i({inputStyle:f})})}),x.jsx(B,{title:"Card Style",expanded:h("card"),onToggle:()=>g("card"),children:x.jsx(J,{options:["flat","elevated","bordered","glass","gradient","neumorphic"],value:s.cardStyle,onChange:f=>i({cardStyle:f})})}),x.jsx(B,{title:"Animation",expanded:h("animation"),onToggle:()=>g("animation"),children:x.jsx(J,{options:Object.keys(we),value:s.animation,onChange:f=>i({animation:f})})}),x.jsx(B,{title:"Density",expanded:h("density"),onToggle:()=>g("density"),children:x.jsx(J,{options:Object.keys(oe),value:s.density,onChange:f=>i({density:f})})}),t&&x.jsx(B,{title:"Preview",expanded:h("preview"),onToggle:()=>g("preview"),children:x.jsx(Wl,{config:s})}),r&&x.jsx(B,{title:"Generated CSS",expanded:h("css"),onToggle:()=>g("css"),children:x.jsx("pre",{style:{background:"var(--text-primary, #1f2937)",color:"var(--border-color, #e5e7eb)",padding:"12px",borderRadius:"6px",fontSize:"12px",overflow:"auto",maxHeight:"200px"},children:qe(s)})})]})}function B({title:e,expanded:t,onToggle:r,children:a}){return x.jsxs("div",{style:{marginBottom:"16px"},children:[x.jsxs("button",{onClick:r,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 0",border:"none",background:"transparent",cursor:"pointer",fontSize:"14px",fontWeight:600,color:"var(--text-secondary, #374151)",textAlign:"left"},children:[x.jsx("span",{style:{transform:t?"rotate(90deg)":"none",transition:"transform 150ms"},children:"▶"}),e]}),t&&x.jsx("div",{style:{paddingLeft:"20px",paddingTop:"8px"},children:a})]})}function J({options:e,value:t,onChange:r,renderPreview:a}){return x.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:e.map(n=>x.jsxs("button",{onClick:()=>r(n),style:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",border:t===n?"2px solid var(--nice-info, #6366f1)":"1px solid var(--border-color, #e5e7eb)",borderRadius:"6px",background:t===n?"var(--nice-primary-bg, #eef2ff)":"var(--bg-primary, #fff)",cursor:"pointer",textTransform:"capitalize",fontSize:"13px"},children:[a&&a(n),n]},n))})}function Wl({config:e}){const t=Ve(e.buttonStyle,"var(--color-accent, #6366f1)"),r=Xe(e.inputStyle),a=Ue(e.cardStyle),n=ae[e.radius],o=oe[e.density];return x.jsxs("div",{style:{padding:"20px",background:"var(--bg-secondary, #f9fafb)",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:[x.jsxs("div",{style:{padding:o.paddingX,borderRadius:n.lg,...a},children:[x.jsx("h4",{style:{margin:"0 0 12px",fontSize:o.fontSize},children:"Card Preview"}),x.jsxs("div",{style:{display:"flex",gap:o.gap,marginBottom:"12px"},children:[x.jsx("button",{style:{padding:`${o.paddingY} ${o.paddingX}`,borderRadius:n.md,color:"var(--bg-primary, #fff)",fontSize:o.fontSize,cursor:"pointer",...t},children:"Primary"}),x.jsx("button",{style:{padding:`${o.paddingY} ${o.paddingX}`,borderRadius:n.md,background:"var(--border-color, #e5e7eb)",border:"none",fontSize:o.fontSize,cursor:"pointer"},children:"Secondary"})]}),x.jsx("input",{type:"text",placeholder:"Input preview...",style:{width:"100%",height:o.inputHeight,padding:`0 ${o.paddingX}`,fontSize:o.fontSize,outline:"none",boxSizing:"border-box",...r}})]}),x.jsx("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:["Info","Success","Warning","Error"].map(s=>x.jsx("span",{style:{padding:"4px 10px",borderRadius:n.full,background:"var(--border-color, #e5e7eb)",fontSize:"12px"},children:s},s))})]})}function Vl(){const[e,t]=c.useState(()=>typeof window>"u"?!1:pe());return c.useEffect(()=>{var o;if(typeof window>"u")return;t(pe());const r=new MutationObserver(()=>t(pe()));r.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class","style"]});const a=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>t(pe());return(o=a.addEventListener)==null||o.call(a,"change",n),()=>{var s;r.disconnect(),(s=a.removeEventListener)==null||s.call(a,"change",n)}},[]),e}function pe(){var e;try{const t=document.documentElement,r=t.getAttribute("data-theme");if(r==="dark")return!0;if(r==="light")return!1;if(t.classList.contains("nice-dark")||t.classList.contains("dark"))return!0;if(t.classList.contains("nice-light"))return!1;const a=getComputedStyle(t),n=a.getPropertyValue("--text-primary").trim()||a.color;if(n){const o=n.match(/rgba?\(([^)]+)\)/);if(o){const[s,i,l]=o[1].split(",").map(d=>parseFloat(d.trim()));return(.299*s+.587*i+.114*l)/255>.5}if(/^#([0-9a-f]{3,8})$/i.test(n)){const s=n.replace("#",""),i=s.length===3?s.split("").map(m=>m+m).join(""):s.slice(0,6),l=parseInt(i.slice(0,2),16),d=parseInt(i.slice(2,4),16),u=parseInt(i.slice(4,6),16);return(.299*l+.587*d+.114*u)/255>.5}}return((e=window.matchMedia)==null?void 0:e.call(window,"(prefers-color-scheme: dark)").matches)??!1}catch{return!1}}const Xl=["NiceTextInput","NiceTextArea","NiceNumberInput","NiceDatePicker","NiceSelect","NiceCheckbox","NiceToggle","NiceRadioGroup","NiceSlider","NiceColorPicker","NiceAutocomplete","NiceLookup","NiceCalendar","NiceDateRangeBox","NiceTagBox","NiceRangeSlider","NiceDropDownBox","NiceHtmlEditor","NiceForm","NiceRating","NiceOtpInput","NiceSignaturePad","NiceMentionInput","NiceTreeSelect","NiceMaskedInput","NiceKnob","NicePickList","NiceInlineEdit","NiceButton","NiceButtonGroup","NiceIconButton","NiceDropDownButton","NiceSpeedDialAction","NiceTable","NiceDataGrid","NiceList","NiceTreeView","NiceTreeList","NiceCardView","NiceTileView","NicePivotGrid","NiceKanbanBoard","NiceSpreadsheet","NiceBadge","NiceTag","NiceAvatar","NiceAvatarGroup","NiceProgress","NiceDivider","NiceTooltip","NiceSkeleton","NiceSpinner","NiceEmpty","NiceTimeline","NiceCarousel","NiceVirtualScroller","NiceAlert","NiceModal","NiceDrawer","NiceToastContainer","NiceConfirmDialog","NiceCookieConsent","NiceTabs","NiceAccordion","NiceBreadcrumb","NicePagination","NiceCard","NiceMenu","NiceContextMenu","NiceMultiView","NiceSplitter","NiceToolbar","NiceAppLayout","NiceBottomNavigation","NiceDashboardLayout","NiceDesktop","NiceConsole","NiceChart","NicePieChart","NicePolarChart","NiceCircularGauge","NiceLinearGauge","NiceBarGauge","NiceSparkline","NiceBullet","NiceFunnel","NiceSankey","NiceRangeSelector","NiceVectorMap","NiceHeatMap","NiceTreeMap","NiceStockChart","NiceOrganizationChart","NiceActionSheet","NicePopover","NiceLoadPanel","NiceWindow","NiceBlockUI","NiceScheduler","NiceGantt","NiceDiagram","NiceStepper","NiceBox","NiceResponsiveBox","NiceResizable","NiceScrollView","NiceChat","NiceFileUploader","NiceFileManager","NiceFilterBuilder","NiceGallery","NiceMap","div","span","row","column","stack","container"];function Ul(e){const t=[];Do(e.root,t,"root");const r=new Set((e.dataSources??[]).map(a=>a.id));return Ho(e.root,r,t),t}function Do(e,t,r){if((!e.type||e.type.trim()==="")&&t.push(`${r}: type is empty`),e.children)for(let a=0;a<e.children.length;a++)Do(e.children[a],t,`${r}.children[${a}]`)}function Ho(e,t,r){if(e.bindings)for(const[a,n]of Object.entries(e.bindings)){const o=n.split(".")[0];!t.has(o)&&o!=="form"&&o!=="route"&&r.push(`Binding "${a}" references unknown data source "${o}"`)}if(e.children)for(const a of e.children)Ho(a,t,r)}function ql(e,t){const r=Gl(t,e.field);switch(e.operator){case"eq":return r===e.value;case"neq":return r!==e.value;case"gt":return r>e.value;case"gte":return r>=e.value;case"lt":return r<e.value;case"lte":return r<=e.value;case"contains":return String(r).includes(String(e.value));case"empty":return r==null||String(r)==="";case"notEmpty":return r!=null&&String(r)!=="";default:return!0}}function Gl(e,t){const r=t.split(".");let a=e;for(const n of r)if(a&&typeof a=="object"&&n in a)a=a[n];else return;return a}function $o(e){const{itemCount:t,itemHeight:r,containerHeight:a,overscan:n=3,initialScrollTop:o=0}=e,[s,i]=c.useState(o),[l,d]=c.useState(!1),u=c.useRef(),m=c.useMemo(()=>{if(typeof r=="number")return null;const k=new Array(t+1);k[0]=0;for(let M=0;M<t;M++)k[M+1]=k[M]+r(M);return k},[t,r]),g=c.useMemo(()=>typeof r=="number"?t*r:m?m[t]:0,[t,r,m]),h=c.useCallback(k=>typeof r=="number"?r:r(k),[r]),f=c.useCallback(k=>typeof r=="number"?k*r:m?m[k]:0,[r,m]),y=c.useCallback(k=>{if(typeof r=="number")return Math.floor(k/r);if(!m)return 0;let M=0,C=t-1;for(;M<=C;){const A=Math.floor((M+C)/2),T=m[A];if(T===k)return A;T<k?M=A+1:C=A-1}return Math.max(0,M-1)},[t,r,m]),{startIndex:p,endIndex:S,visibleItems:b}=c.useMemo(()=>{const k=Math.max(0,y(s)-n);let M=k,C=f(k);for(;M<t&&C<s+a;)C+=h(M),M++;M=Math.min(t,M+n);const A=[];for(let T=k;T<M;T++)A.push({index:T,offset:f(T),height:h(T),key:T});return{startIndex:k,endIndex:M,visibleItems:A}},[s,a,t,n,y,f,h]),v=c.useCallback(k=>{const M=k.currentTarget;i(M.scrollTop),d(!0),u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{d(!1)},150)},[]),w=c.useCallback((k,M="start")=>{const C=f(k),A=h(k);let T;switch(M){case"center":T=C-a/2+A/2;break;case"end":T=C-a+A;break;default:T=C}i(Math.max(0,Math.min(T,g-a)))},[f,h,a,g]),E=c.useCallback(k=>{i(Math.max(0,Math.min(k,g-a)))},[g,a]);return c.useEffect(()=>()=>{u.current&&window.clearTimeout(u.current)},[]),{visibleItems:b,totalHeight:g,scrollTop:s,scrollToIndex:w,scrollTo:E,onScroll:v,startIndex:p,endIndex:S,isScrolling:l}}function Kl(e){const{rowCount:t,columnCount:r,rowHeight:a,columnWidth:n,containerHeight:o,containerWidth:s,overscan:i=2}=e,[l,d]=c.useState(0),[u,m]=c.useState(0),[g,h]=c.useState(!1),f=c.useRef(),y=c.useMemo(()=>{if(typeof a=="number")return t*a;let v=0;for(let w=0;w<t;w++)v+=a(w);return v},[t,a]),p=c.useMemo(()=>{if(typeof n=="number")return r*n;let v=0;for(let w=0;w<r;w++)v+=n(w);return v},[r,n]),S=c.useMemo(()=>{const v=[];let w=0,E=0;if(typeof a=="number")w=Math.floor(l/a),E=w*a;else for(;w<t&&E+a(w)<l;)E+=a(w),w++;w=Math.max(0,w-i);let k=w,M=typeof a=="number"?w*a:E;for(;k<t&&M<l+o;)M+=typeof a=="number"?a:a(k),k++;k=Math.min(t,k+i);let C=0,A=0;if(typeof n=="number")C=Math.floor(u/n),A=C*n;else for(;C<r&&A+n(C)<u;)A+=n(C),C++;C=Math.max(0,C-i);let T=C,N=typeof n=="number"?C*n:A;for(;T<r&&N<u+s;)N+=typeof n=="number"?n:n(T),T++;T=Math.min(r,T+i);let R=typeof a=="number"?w*a:(()=>{let I=0;for(let F=0;F<w;F++)I+=a(F);return I})();for(let I=w;I<k;I++){const F=typeof a=="number"?a:a(I);let H=typeof n=="number"?C*n:(()=>{let z=0;for(let j=0;j<C;j++)z+=n(j);return z})();for(let z=C;z<T;z++){const j=typeof n=="number"?n:n(z);v.push({rowIndex:I,columnIndex:z,top:R,left:H,width:j,height:F,key:`${I}:${z}`}),H+=j}R+=F}return v},[l,u,t,r,a,n,o,s,i]),b=c.useCallback(v=>{const w=v.currentTarget;d(w.scrollTop),m(w.scrollLeft),h(!0),f.current&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>{h(!1)},150)},[]);return c.useEffect(()=>()=>{f.current&&window.clearTimeout(f.current)},[]),{visibleCells:S,totalWidth:p,totalHeight:y,onScroll:b,scrollTop:l,scrollLeft:u,isScrolling:g}}function Jl(e,t,r,a=3){const n=$o({itemCount:e.length,itemHeight:r,containerHeight:t,overscan:a}),o=c.useCallback(s=>e[s.index],[e]);return{...n,getItemData:o,containerStyle:{height:t,overflow:"auto"},innerStyle:{height:n.totalHeight,position:"relative"},getItemStyle:s=>({position:"absolute",top:s.offset,left:0,right:0,height:s.height})}}function Yl(e){const{items:t,searchFn:r,debounce:a=0,minLength:n=0}=e,[o,s]=c.useState(""),i=c.useDeferredValue(o),[l,d]=c.useState(""),u=c.useRef();c.useEffect(()=>{if(a>0)return u.current=window.setTimeout(()=>{d(o)},a),()=>{u.current&&window.clearTimeout(u.current)};d(o)},[o,a]);const m=c.useDeferredValue(l),g=c.useMemo(()=>m.length<n?t:t.filter(f=>r(f,m)),[t,m,r,n]);return{query:o,setQuery:s,results:g,isStale:m!==i,deferredQuery:m}}function Ql(e){const[t,r]=c.useState(e),[a,n]=c.useState(e),[o,s]=c.useTransition(),i=c.useCallback(d=>{const u=typeof d=="function"?d(t):d;n(u),s(()=>{r(u)})},[t]),l=c.useCallback(d=>{const u=typeof d=="function"?d(t):d;n(u),r(u)},[t]);return{value:t,pendingValue:a,isPending:o,setValue:i,setValueImmediate:l}}function Zl(e){const{data:t,processFn:r,chunkSize:a=1e3,priority:n="user-visible"}=e,[o,s]=c.useState(null),[i,l]=c.useState(0),[d,u]=c.useState(!1),m=c.useRef(!1),g=c.useCallback(async()=>{if(t.length===0){s([]);return}u(!0),l(0),m.current=!1;const f=[],y=t.length;for(let p=0;p<y&&!m.current;p+=a){const S=t.slice(p,p+a),b=S.map((w,E)=>r(w,p+E));f.push(...b);const v=Math.min(100,(p+S.length)/y*100);n==="background"?await new Promise(w=>{"requestIdleCallback"in window?window.requestIdleCallback(w):setTimeout(w,0)}):n==="user-visible"&&await new Promise(w=>requestAnimationFrame(w)),c.startTransition(()=>{l(v)})}s(f),u(!1),l(100)},[t,r,a,n]),h=c.useCallback(()=>{m.current=!0},[]);return c.useEffect(()=>(g(),()=>{m.current=!0}),[g]),{result:o,progress:i,isProcessing:d,process:g,cancel:h}}function ed(e,t={}){const{initialCount:r=20,batchSize:a=50,batchDelay:n=16}=t,[o,s]=c.useState(Math.min(r,e.length)),[i,l]=c.useState(e.length<=r);return c.useEffect(()=>{if(o>=e.length){l(!0);return}const u=setTimeout(()=>{c.startTransition(()=>{s(m=>Math.min(m+a,e.length))})},n);return()=>clearTimeout(u)},[o,e.length,a,n]),c.useEffect(()=>{s(Math.min(r,e.length)),l(e.length<=r)},[e,r]),{visibleItems:c.useMemo(()=>e.slice(0,o),[e,o]),visibleCount:o,totalCount:e.length,isComplete:i,progress:o/e.length*100}}function td(e){const{initial:t,mutate:r,rollbackOnError:a=!0}=e,[n,o]=c.useState(t),[s,i]=c.useState(!1),[l,d]=c.useState(null),u=c.useRef(t),m=c.useCallback(async h=>{u.current=n,d(null),o(h),i(!0);try{const f=await r(h);o(f)}catch(f){d(f instanceof Error?f:new Error(String(f))),a&&o(u.current)}finally{i(!1)}},[n,r,a]),g=c.useCallback(()=>{o(t),d(null),i(!1)},[t]);return{value:n,update:m,isPending:s,error:l,reset:g}}function rd(e){const{workerScript:t,idleTimeout:r=3e4}=e,[a,n]=c.useState(null),[o,s]=c.useState(!1),[i,l]=c.useState(null),d=c.useRef(null),u=c.useRef(0),m=c.useRef(null),g=c.useRef(),h=c.useCallback(()=>{if(!d.current){if(typeof t=="function"){const b=new Blob([`(${t.toString()})()`],{type:"application/javascript"});d.current=new Worker(URL.createObjectURL(b))}else d.current=new Worker(t,{type:"module"});d.current.onmessage=b=>{const v=b.data;v.id===m.current&&(v.type==="result"?(n(v.result??null),s(!1),m.current=null,f()):v.type==="error"&&(l(new Error(v.error)),s(!1),m.current=null,f()))},d.current.onerror=b=>{l(new Error(b.message)),s(!1),m.current=null}}return d.current},[t]),f=c.useCallback(()=>{g.current&&window.clearTimeout(g.current),r>0&&(g.current=window.setTimeout(()=>{d.current&&!m.current&&(d.current.terminate(),d.current=null)},r))},[r]),y=c.useCallback(b=>new Promise((v,w)=>{const E=h(),k=`task-${++u.current}`;m.current=k,s(!0),l(null);const M=E.onmessage;E.onmessage=C=>{M==null||M.call(E,C),C.data.id===k&&(C.data.type==="result"?v(C.data.result):C.data.type==="error"&&w(new Error(C.data.error)))},E.postMessage({type:"task",id:k,data:b})}),[h]),p=c.useCallback(()=>{d.current&&m.current&&(d.current.postMessage({type:"cancel",id:m.current}),m.current=null,s(!1))},[]),S=c.useCallback(()=>{d.current&&(d.current.terminate(),d.current=null),g.current&&window.clearTimeout(g.current),m.current=null,s(!1)},[]);return c.useEffect(()=>()=>{S()},[S]),{result:a,isProcessing:o,error:i,execute:y,cancel:p,terminate:S}}function ad(e){const{workerScript:t,poolSize:r=navigator.hardwareConcurrency||4,idleTimeout:a=6e4}=e,n=c.useRef([]),o=c.useRef([]),s=c.useRef(0),i=c.useRef(),l=c.useCallback(()=>{if(typeof t=="function"){const p=new Blob([`(${t.toString()})()`],{type:"application/javascript"});return new Worker(URL.createObjectURL(p))}return new Worker(t,{type:"module"})},[t]),d=c.useCallback(()=>{const p=n.current.find(S=>!S.busy);if(p)return p;if(n.current.length<r){const b={worker:l(),busy:!1,taskId:null};return n.current.push(b),b}return null},[l,r]),u=c.useCallback(()=>{for(;o.current.length>0;){const p=d();if(!p)break;const S=o.current.shift();p.busy=!0,p.taskId=S.id,p.worker.onmessage=b=>{const v=b.data;v.id===S.id&&(p.busy=!1,p.taskId=null,v.type==="result"?S.resolve(v.result):v.type==="error"&&S.reject(new Error(v.error)),u(),m())},p.worker.onerror=b=>{p.busy=!1,p.taskId=null,S.reject(new Error(b.message)),u()},p.worker.postMessage({type:"task",id:S.id,data:S.data})}},[d]),m=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),a>0&&(i.current=window.setTimeout(()=>{n.current.filter(S=>!S.busy).forEach(S=>{S.worker.terminate(),n.current=n.current.filter(b=>b!==S)})},a))},[a]),g=c.useCallback(p=>new Promise((S,b)=>{const v=`pool-task-${++s.current}`;o.current.push({id:v,data:p,resolve:S,reject:b}),u()}),[u]),h=c.useCallback(p=>Promise.all(p.map(S=>g(S))),[g]),f=c.useCallback(()=>{n.current.forEach(p=>p.worker.terminate()),n.current=[],o.current=[],i.current&&window.clearTimeout(i.current)},[]),y=c.useCallback(()=>({total:n.current.length,busy:n.current.filter(p=>p.busy).length,idle:n.current.filter(p=>!p.busy).length,queued:o.current.length}),[]);return c.useEffect(()=>()=>{f()},[f]),{execute:g,executeAll:h,terminateAll:f,getStats:y}}function nd(e){const t=`
97
97
  self.onmessage = function(e) {
98
98
  const msg = e.data;
99
99
 
@@ -116,7 +116,7 @@ HTML:`}],{temperature:.3}),l=i.content.match(/```html?\n?([\s\S]*?)```/);return
116
116
  }
117
117
  }
118
118
  };
119
- `,r=new Blob([t],{type:"application/javascript"});return new URL(URL.createObjectURL(r))}function Kl(e){const t=[],r=a=>{a instanceof ArrayBuffer||a instanceof MessagePort?t.push(a):"buffer"in a&&a.buffer instanceof ArrayBuffer?t.push(a.buffer):a instanceof ImageBitmap?t.push(a):Array.isArray(a)?a.forEach(r):a&&typeof a=="object"&&Object.values(a).forEach(r)};return r(e),t}function Jl(){const e=new WeakMap;return{get:t=>e.get(t),set:(t,r)=>{e.set(t,r)},has:t=>e.has(t),delete:t=>e.delete(t)}}function Yl(e={}){const{maxSize:t=1e3,ttl:r}=e,a=new Map,n=o=>r?Date.now()-o.timestamp>r:!1,s=()=>{if(a.size<=t)return;const o=[];for(const[i,l]of a.entries())if((n(l)||a.size-o.length>t)&&o.push(i),a.size-o.length<=t)break;o.forEach(i=>a.delete(i))};return{get:o=>{const i=a.get(o);if(i){if(n(i)){a.delete(o);return}return a.delete(o),a.set(o,{...i,timestamp:Date.now()}),i.value}},set:(o,i)=>{a.delete(o),a.set(o,{value:i,timestamp:Date.now()}),s()},has:o=>{const i=a.get(o);return i?n(i)?(a.delete(o),!1):!0:!1},delete:o=>a.delete(o),clear:()=>a.clear(),size:()=>a.size,keys:()=>Array.from(a.keys())}}function Ql(){const e=new Map,t=new FinalizationRegistry(r=>{e.delete(r)});return{get:r=>{const a=e.get(r);if(!a)return;const n=a.deref();return n===void 0&&e.delete(r),n},set:(r,a)=>{const n=e.get(r);if(n){const s=n.deref();s&&t.unregister(s)}e.set(r,new WeakRef(a)),t.register(a,r,a)},has:r=>{const a=e.get(r);return a?a.deref()!==void 0:!1},delete:r=>{const a=e.get(r);if(a){const n=a.deref();n&&t.unregister(n)}return e.delete(r)},clear:()=>e.clear(),size:()=>{let r=0;for(const a of e.values())a.deref()!==void 0&&r++;return r}}}function Zl(){const e=c.useRef([]),t=c.useCallback((n,s,o,i)=>{n.addEventListener(s,o,i),e.current.push({target:n,event:s,handler:o,options:i})},[]),r=c.useCallback(()=>{e.current.forEach(({target:n,event:s,handler:o,options:i})=>{n.removeEventListener(s,o,i)}),e.current=[]},[]),a=c.useCallback(()=>e.current.length,[]);return c.useEffect(()=>()=>{r()},[r]),{add:t,removeAll:r,count:a}}function ed(){const e=[];return{add:(t,r,a,n)=>{t.addEventListener(r,a,n),e.push({target:t,event:r,handler:a,options:n})},removeAll:()=>{e.forEach(({target:t,event:r,handler:a,options:n})=>{t.removeEventListener(r,a,n)}),e.length=0},count:()=>e.length,dispose:()=>{e.forEach(({target:t,event:r,handler:a,options:n})=>{t.removeEventListener(r,a,n)}),e.length=0}}}function ye(){const e=window.performance;if(!e.memory)return{jsHeapSizeLimit:0,totalJSHeapSize:0,usedJSHeapSize:0,usedPercent:0,isSupported:!1};const{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:a}=e.memory;return{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:a,usedPercent:a/t*100,isSupported:!0}}function td(e={}){const{warningThreshold:t=75,pollInterval:r=1e4,onHighUsage:a}=e,[n,s]=c.useState(ye),[o,i]=c.useState(!1);return c.useEffect(()=>{if(!ye().isSupported)return;const d=setInterval(()=>{const u=ye();s(u);const f=u.usedPercent>t;i(f),f&&a&&a(u)},r);return()=>clearInterval(d)},[t,r,a]),{stats:n,isHighUsage:o}}function rd(e){const{src:t,rootMargin:r="200px",threshold:a=0,placeholder:n,progressive:s}=e,o=c.useRef(null),[i,l]=c.useState(!1),[d,u]=c.useState(!1),[f,p]=c.useState(n||"");return c.useEffect(()=>{const g=o.current;if(!g)return;const m=new IntersectionObserver(([b])=>{b.isIntersecting&&(l(!0),m.disconnect())},{rootMargin:r,threshold:a});return m.observe(g),()=>m.disconnect()},[r,a]),c.useEffect(()=>{if(!i)return;const g=new Image;return g.onload=()=>{p(t),u(!0)},g.src=t,()=>{g.onload=null}},[i,t,s]),{ref:o,isInView:i,isLoaded:d,currentSrc:f}}function ad(e){const{create:t,reset:r,maxSize:a=100}=e,n=[];return{acquire:()=>n.length>0?n.pop():t(),release:s=>{n.length<a&&(r&&r(s),n.push(s))},preallocate:s=>{const o=Math.min(s,a-n.length);for(let i=0;i<o;i++)n.push(t())},clear:()=>{n.length=0},size:()=>n.length}}const re={avif:null,webp:null};async function xe(e){if(re[e]!==null)return re[e];const t={avif:"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKBzgABhAQ0AIy0IEAAAAAAAAAAMHN",webp:"data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"};return new Promise(r=>{const a=new Image;a.onload=()=>{re[e]=a.width>0&&a.height>0,r(re[e])},a.onerror=()=>{re[e]=!1,r(!1)},a.src=t[e]})}function zs(){const[e,t]=c.useState({avif:!1,webp:!1,jpg:!0,png:!0,gif:!0}),[r,a]=c.useState(!0);return c.useEffect(()=>{Promise.all([xe("avif"),xe("webp")]).then(([n,s])=>{t(o=>({...o,avif:n,webp:s})),a(!1)})},[]),{formats:e,isChecking:r}}function Fs(e){return e.map(t=>`${t.src} ${t.width}w`).join(", ")}function Ps(e,t){const r=e.map(a=>`(max-width: ${a.maxWidth}px) ${a.size}`);return r.push(t),r.join(", ")}function Hs(e,t,r=window.devicePixelRatio){const a=t*r,n=[...e].sort((s,o)=>s.width-o.width);for(const s of n)if(s.width>=a)return s;return n[n.length-1]}function Ds(e){const{src:t,lqip:r,rootMargin:a="200px",threshold:n=0,blurRadius:s=20,delay:o=0,priority:i="auto",onLoad:l,onError:d}=e,u=c.useRef(null),[f,p]=c.useState({currentSrc:r||null,thumbnailSrc:r||null,fullSrc:t,stage:"idle",isLoaded:!1,isInView:!1,error:null});c.useEffect(()=>{if(i==="high"){p(y=>({...y,isInView:!0}));return}const m=u.current;if(!m)return;const b=new IntersectionObserver(([y])=>{y.isIntersecting&&(p(S=>({...S,isInView:!0})),b.disconnect())},{rootMargin:a,threshold:n});return b.observe(m),()=>b.disconnect()},[a,n,i]),c.useEffect(()=>{if(!f.isInView||f.isLoaded)return;p(y=>({...y,stage:r?"thumbnail":"loading"}));const m=o>0?setTimeout(b,o):null;m||b();function b(){const y=new Image;y.onload=()=>{p(S=>({...S,currentSrc:t,stage:"loaded",isLoaded:!0})),l==null||l()},y.onerror=()=>{const S=new Error(`Failed to load image: ${t}`);p(h=>({...h,stage:"error",error:S})),d==null||d(S)},y.src=t}return()=>{m&&clearTimeout(m)}},[f.isInView,f.isLoaded,t,r,o,l,d]);const g={filter:f.stage==="thumbnail"?`blur(${s}px)`:"none",transition:"filter 0.3s ease-out",...f.stage==="thumbnail"&&{transform:"scale(1.05)"}};return{ref:u,...f,style:g}}function $s(e){return Promise.all(e.map(t=>new Promise((r,a)=>{const n=new Image;n.onload=()=>r(),n.onerror=()=>a(new Error(`Failed to preload: ${t}`)),n.src=t})))}function js(e){const[t,r]=c.useState({loaded:0,total:e.length,isComplete:!1,errors:[]});return c.useEffect(()=>{if(e.length===0){r({loaded:0,total:0,isComplete:!0,errors:[]});return}let a=0;const n=[];e.forEach(o=>{const i=new Image;i.onload=()=>{a++,s()},i.onerror=()=>{a++,n.push(o),s()},i.src=o});function s(){r({loaded:a,total:e.length,isComplete:a===e.length,errors:n})}},[e]),t}async function mt(e){const t=new Image;return t.src=e,typeof t.decode=="function"?await t.decode():await new Promise((r,a)=>{t.onload=()=>r(),t.onerror=()=>a(new Error(`Failed to load: ${e}`))}),t}function Os(e){const[t,r]=c.useState(null),[a,n]=c.useState(!1),[s,o]=c.useState(null);return c.useEffect(()=>{if(!e){r(null);return}let i=!1;return n(!0),o(null),mt(e).then(l=>{i||(r(l),n(!1))}).catch(l=>{i||(o(l),n(!1))}),()=>{i=!0}},[e]),{image:t,isLoading:a,error:s}}function Bs(e={}){const t=new Map,r=new IntersectionObserver(a=>{a.forEach(n=>{const s=t.get(n.target);s&&n.isIntersecting&&s(n)})},e);return{observe:(a,n)=>{t.set(a,n),r.observe(a)},unobserve:a=>{t.delete(a),r.unobserve(a)},disconnect:()=>{t.clear(),r.disconnect()}}}function _s(e,t){const r=c.useRef(null),[a,n]=c.useState(!1);return c.useEffect(()=>{const s=r.current;if(s)return e.observe(s,()=>{n(!0),t(),e.unobserve(s)}),()=>{e.unobserve(s)}},[e,t]),{ref:r,isInView:a}}function Ws(e,t=10,r=10){const a=`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${r}"><rect width="100%" height="100%" fill="${e}"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(a)}`}function Vs(e,t="vertical",r=10,a=10){const i=`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${a}">
119
+ `,r=new Blob([t],{type:"application/javascript"});return new URL(URL.createObjectURL(r))}function od(e){const t=[],r=a=>{a instanceof ArrayBuffer||a instanceof MessagePort?t.push(a):"buffer"in a&&a.buffer instanceof ArrayBuffer?t.push(a.buffer):a instanceof ImageBitmap?t.push(a):Array.isArray(a)?a.forEach(r):a&&typeof a=="object"&&Object.values(a).forEach(r)};return r(e),t}function sd(){const e=new WeakMap;return{get:t=>e.get(t),set:(t,r)=>{e.set(t,r)},has:t=>e.has(t),delete:t=>e.delete(t)}}function id(e={}){const{maxSize:t=1e3,ttl:r}=e,a=new Map,n=s=>r?Date.now()-s.timestamp>r:!1,o=()=>{if(a.size<=t)return;const s=[];for(const[i,l]of a.entries())if((n(l)||a.size-s.length>t)&&s.push(i),a.size-s.length<=t)break;s.forEach(i=>a.delete(i))};return{get:s=>{const i=a.get(s);if(i){if(n(i)){a.delete(s);return}return a.delete(s),a.set(s,{...i,timestamp:Date.now()}),i.value}},set:(s,i)=>{a.delete(s),a.set(s,{value:i,timestamp:Date.now()}),o()},has:s=>{const i=a.get(s);return i?n(i)?(a.delete(s),!1):!0:!1},delete:s=>a.delete(s),clear:()=>a.clear(),size:()=>a.size,keys:()=>Array.from(a.keys())}}function cd(){const e=new Map,t=new FinalizationRegistry(r=>{e.delete(r)});return{get:r=>{const a=e.get(r);if(!a)return;const n=a.deref();return n===void 0&&e.delete(r),n},set:(r,a)=>{const n=e.get(r);if(n){const o=n.deref();o&&t.unregister(o)}e.set(r,new WeakRef(a)),t.register(a,r,a)},has:r=>{const a=e.get(r);return a?a.deref()!==void 0:!1},delete:r=>{const a=e.get(r);if(a){const n=a.deref();n&&t.unregister(n)}return e.delete(r)},clear:()=>e.clear(),size:()=>{let r=0;for(const a of e.values())a.deref()!==void 0&&r++;return r}}}function ld(){const e=c.useRef([]),t=c.useCallback((n,o,s,i)=>{n.addEventListener(o,s,i),e.current.push({target:n,event:o,handler:s,options:i})},[]),r=c.useCallback(()=>{e.current.forEach(({target:n,event:o,handler:s,options:i})=>{n.removeEventListener(o,s,i)}),e.current=[]},[]),a=c.useCallback(()=>e.current.length,[]);return c.useEffect(()=>()=>{r()},[r]),{add:t,removeAll:r,count:a}}function dd(){const e=[];return{add:(t,r,a,n)=>{t.addEventListener(r,a,n),e.push({target:t,event:r,handler:a,options:n})},removeAll:()=>{e.forEach(({target:t,event:r,handler:a,options:n})=>{t.removeEventListener(r,a,n)}),e.length=0},count:()=>e.length,dispose:()=>{e.forEach(({target:t,event:r,handler:a,options:n})=>{t.removeEventListener(r,a,n)}),e.length=0}}}function ye(){const e=window.performance;if(!e.memory)return{jsHeapSizeLimit:0,totalJSHeapSize:0,usedJSHeapSize:0,usedPercent:0,isSupported:!1};const{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:a}=e.memory;return{jsHeapSizeLimit:t,totalJSHeapSize:r,usedJSHeapSize:a,usedPercent:a/t*100,isSupported:!0}}function ud(e={}){const{warningThreshold:t=75,pollInterval:r=1e4,onHighUsage:a}=e,[n,o]=c.useState(ye),[s,i]=c.useState(!1);return c.useEffect(()=>{if(!ye().isSupported)return;const d=setInterval(()=>{const u=ye();o(u);const m=u.usedPercent>t;i(m),m&&a&&a(u)},r);return()=>clearInterval(d)},[t,r,a]),{stats:n,isHighUsage:s}}function fd(e){const{src:t,rootMargin:r="200px",threshold:a=0,placeholder:n,progressive:o}=e,s=c.useRef(null),[i,l]=c.useState(!1),[d,u]=c.useState(!1),[m,g]=c.useState(n||"");return c.useEffect(()=>{const h=s.current;if(!h)return;const f=new IntersectionObserver(([y])=>{y.isIntersecting&&(l(!0),f.disconnect())},{rootMargin:r,threshold:a});return f.observe(h),()=>f.disconnect()},[r,a]),c.useEffect(()=>{if(!i)return;const h=new Image;return h.onload=()=>{g(t),u(!0)},h.src=t,()=>{h.onload=null}},[i,t,o]),{ref:s,isInView:i,isLoaded:d,currentSrc:m}}function md(e){const{create:t,reset:r,maxSize:a=100}=e,n=[];return{acquire:()=>n.length>0?n.pop():t(),release:o=>{n.length<a&&(r&&r(o),n.push(o))},preallocate:o=>{const s=Math.min(o,a-n.length);for(let i=0;i<s;i++)n.push(t())},clear:()=>{n.length=0},size:()=>n.length}}const re={avif:null,webp:null};async function ve(e){if(re[e]!==null)return re[e];const t={avif:"data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKBzgABhAQ0AIy0IEAAAAAAAAAAMHN",webp:"data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"};return new Promise(r=>{const a=new Image;a.onload=()=>{re[e]=a.width>0&&a.height>0,r(re[e])},a.onerror=()=>{re[e]=!1,r(!1)},a.src=t[e]})}function jo(){const[e,t]=c.useState({avif:!1,webp:!1,jpg:!0,png:!0,gif:!0}),[r,a]=c.useState(!0);return c.useEffect(()=>{Promise.all([ve("avif"),ve("webp")]).then(([n,o])=>{t(s=>({...s,avif:n,webp:o})),a(!1)})},[]),{formats:e,isChecking:r}}function Oo(e){return e.map(t=>`${t.src} ${t.width}w`).join(", ")}function _o(e,t){const r=e.map(a=>`(max-width: ${a.maxWidth}px) ${a.size}`);return r.push(t),r.join(", ")}function Bo(e,t,r=window.devicePixelRatio){const a=t*r,n=[...e].sort((o,s)=>o.width-s.width);for(const o of n)if(o.width>=a)return o;return n[n.length-1]}function Wo(e){const{src:t,lqip:r,rootMargin:a="200px",threshold:n=0,blurRadius:o=20,delay:s=0,priority:i="auto",onLoad:l,onError:d}=e,u=c.useRef(null),[m,g]=c.useState({currentSrc:r||null,thumbnailSrc:r||null,fullSrc:t,stage:"idle",isLoaded:!1,isInView:!1,error:null});c.useEffect(()=>{if(i==="high"){g(p=>({...p,isInView:!0}));return}const f=u.current;if(!f)return;const y=new IntersectionObserver(([p])=>{p.isIntersecting&&(g(S=>({...S,isInView:!0})),y.disconnect())},{rootMargin:a,threshold:n});return y.observe(f),()=>y.disconnect()},[a,n,i]),c.useEffect(()=>{if(!m.isInView||m.isLoaded)return;g(p=>({...p,stage:r?"thumbnail":"loading"}));const f=s>0?setTimeout(y,s):null;f||y();function y(){const p=new Image;p.onload=()=>{g(S=>({...S,currentSrc:t,stage:"loaded",isLoaded:!0})),l==null||l()},p.onerror=()=>{const S=new Error(`Failed to load image: ${t}`);g(b=>({...b,stage:"error",error:S})),d==null||d(S)},p.src=t}return()=>{f&&clearTimeout(f)}},[m.isInView,m.isLoaded,t,r,s,l,d]);const h={filter:m.stage==="thumbnail"?`blur(${o}px)`:"none",transition:"filter 0.3s ease-out",...m.stage==="thumbnail"&&{transform:"scale(1.05)"}};return{ref:u,...m,style:h}}function Vo(e){return Promise.all(e.map(t=>new Promise((r,a)=>{const n=new Image;n.onload=()=>r(),n.onerror=()=>a(new Error(`Failed to preload: ${t}`)),n.src=t})))}function Xo(e){const[t,r]=c.useState({loaded:0,total:e.length,isComplete:!1,errors:[]});return c.useEffect(()=>{if(e.length===0){r({loaded:0,total:0,isComplete:!0,errors:[]});return}let a=0;const n=[];e.forEach(s=>{const i=new Image;i.onload=()=>{a++,o()},i.onerror=()=>{a++,n.push(s),o()},i.src=s});function o(){r({loaded:a,total:e.length,isComplete:a===e.length,errors:n})}},[e]),t}async function mt(e){const t=new Image;return t.src=e,typeof t.decode=="function"?await t.decode():await new Promise((r,a)=>{t.onload=()=>r(),t.onerror=()=>a(new Error(`Failed to load: ${e}`))}),t}function Uo(e){const[t,r]=c.useState(null),[a,n]=c.useState(!1),[o,s]=c.useState(null);return c.useEffect(()=>{if(!e){r(null);return}let i=!1;return n(!0),s(null),mt(e).then(l=>{i||(r(l),n(!1))}).catch(l=>{i||(s(l),n(!1))}),()=>{i=!0}},[e]),{image:t,isLoading:a,error:o}}function qo(e={}){const t=new Map,r=new IntersectionObserver(a=>{a.forEach(n=>{const o=t.get(n.target);o&&n.isIntersecting&&o(n)})},e);return{observe:(a,n)=>{t.set(a,n),r.observe(a)},unobserve:a=>{t.delete(a),r.unobserve(a)},disconnect:()=>{t.clear(),r.disconnect()}}}function Go(e,t){const r=c.useRef(null),[a,n]=c.useState(!1);return c.useEffect(()=>{const o=r.current;if(o)return e.observe(o,()=>{n(!0),t(),e.unobserve(o)}),()=>{e.unobserve(o)}},[e,t]),{ref:r,isInView:a}}function Ko(e,t=10,r=10){const a=`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${r}"><rect width="100%" height="100%" fill="${e}"/></svg>`;return`data:image/svg+xml,${encodeURIComponent(a)}`}function Jo(e,t="vertical",r=10,a=10){const i=`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${a}">
120
120
  <defs>
121
121
  <linearGradient id="g" x1="0%" y1="0%" x2="${t==="horizontal"?"100%":"0%"}" y2="${t==="vertical"?"100%":"0%"}">
122
122
  <stop offset="0%" style="stop-color:${e[0]}"/>
@@ -124,5 +124,5 @@ HTML:`}],{temperature:.3}),l=i.content.match(/```html?\n?([\s\S]*?)```/);return
124
124
  </linearGradient>
125
125
  </defs>
126
126
  <rect width="100%" height="100%" fill="url(#g)"/>
127
- </svg>`;return`data:image/svg+xml,${encodeURIComponent(i)}`}const nd={checkFormatSupport:xe,useImageFormats:zs,generateSrcset:Fs,generateSizes:Ps,selectOptimalSource:Hs,useProgressiveImage:Ds,preloadImages:$s,useImagePreload:js,loadAndDecodeImage:mt,useDecodedImage:Os,createImageObserver:Bs,useSharedImageObserver:_s,generateColorPlaceholder:Ws,generateGradientPlaceholder:Vs};Object.defineProperty(exports,"NICE_I18N_DICTIONARIES",{enumerable:!0,get:()=>B.NICE_I18N_DICTIONARIES});Object.defineProperty(exports,"NICE_SUPPORTED_LANGS",{enumerable:!0,get:()=>B.NICE_SUPPORTED_LANGS});Object.defineProperty(exports,"NiceI18nProvider",{enumerable:!0,get:()=>B.NiceI18nProvider});Object.defineProperty(exports,"createICUTranslator",{enumerable:!0,get:()=>B.createICUTranslator});Object.defineProperty(exports,"formatICU",{enumerable:!0,get:()=>B.formatICU});Object.defineProperty(exports,"useNiceTranslation",{enumerable:!0,get:()=>B.useNiceTranslation});exports.ANIMATION_VALUES=ve;exports.BatchOperations=nl;exports.COMMON_SHORTCUTS=Ko;exports.ColumnFormulas=tl;exports.DEFAULT_TRACELESS_POLICY=uc;exports.DEFAULT_VARIANT_CONFIG=V;exports.DENSITY_VALUES=se;exports.DisplayModeView=ao;exports.ImageOptimization=nd;exports.IndexedDBAdapter=sc;exports.LeakDetectorStatus=ur;exports.LocalStorageAdapter=kr;exports.NICE_BREAKPOINTS=ee;exports.NICE_BUILTIN_ICONS=uo;exports.NICE_COLOR_BLIND_MODES=ii;exports.NICE_DISPLAY_STYLES=Ks;exports.NICE_DISPLAY_STYLE_INFO=to;exports.NICE_THEME_GALLERY=Fn;exports.NICE_THEME_PACKS=ut;exports.NICE_THEME_PACKS_EXTENDED=ft;exports.NICE_THEME_PACK_FONT_LINKS=kl;exports.NICE_THEME_PACK_FONT_LINKS_EXTENDED=El;exports.NICE_THEME_PACK_LIST=es;exports.NICE_THEME_PACK_LIST_EXTENDED=As;exports.NICE_THEME_PRESETS=wl;exports.NICE_VIEW_COMPONENT_TYPES=Pl;exports.NiceA11yProvider=Xt;exports.NiceAIProvider=Ec;exports.NiceAccessControl=Ot;exports.NiceDataCache=Be;exports.NiceDisplayStyleContext=ke;exports.NiceHelpIcon=wr;exports.NiceHelpProvider=yr;exports.NiceIcon=zt;exports.NiceIconProvider=io;exports.NiceInlineHelp=xr;exports.NiceKeyboardHint=Jt;exports.NicePreferencesPanel=dc;exports.NiceProfiler=Ci;exports.NicePullToRefresh=Bo;exports.NiceQuickHelp=vr;exports.NiceRTLProvider=$t;exports.NiceRequestDeduplicator=zr;exports.NiceSkipLink=Gt;exports.NiceStateIO=ul;exports.NiceSwipeableListItem=Oo;exports.NiceTestWrapper=Qt;exports.NiceThemeContext=ct;exports.NiceThemeProvider=Es;exports.NiceThemeVariantConfigurator=Rl;exports.NiceThemeVariantProvider=Il;exports.NiceTouchTarget=Wo;exports.NiceUserPreferencesProvider=lc;exports.NiceVisuallyHidden=Ut;exports.PRIVACY_LEVEL_ORDER=te;exports.ProfilerOverlay=cr;exports.RADIUS_VALUES=ae;exports.RestAPISyncAdapter=oc;exports.SHADOW_DARK_MODE_VALUES=kt;exports.SHADOW_VALUES=he;exports.StorageAdapter=Nr;exports.TRACELESS_MODE_PRESETS=Mr;exports.TRACELESS_POLICY_HEADER=Sc;exports.VARIANT_PRESETS=we;exports.ValidationRules=al;exports.accessModeAttrs=Ho;exports.aggregate=U;exports.analog70s=ms;exports.applyColorBlindMode=Je;exports.applyTheme=pl;exports.applyVariantConfig=Ue;exports.applyVariantsToTheme=Gs;exports.arcticCrystal=ns;exports.artDecoGatsby=cs;exports.auditStorageCompliance=Ac;exports.auditWCAG22AAA=si;exports.autumnFoliage=ss;exports.bankVault=Zn;exports.bauhaus=Qn;exports.blackTieGala=Cs;exports.blueprint=ds;exports.brutalistRaw=Xn;exports.buildAriaDescribedBy=qt;exports.buildFormFieldAria=qo;exports.calculateDataDiff=Fr;exports.candyPop=Un;exports.checkAriaCompliance=Si;exports.checkContrastAAA=ni;exports.checkFormatSupport=xe;exports.checkRegression=ir;exports.claymorphism=Yn;exports.clearAllClientStorage=Mc;exports.clearLeakReports=Pi;exports.clearProfilingData=Ye;exports.comicHalftone=bs;exports.configureLeakDetector=zi;exports.configureProfiler=er;exports.createArrayDataSource=Hc;exports.createColorBlindController=di;exports.createCustomDataSource=Wc;exports.createEventCleanup=ed;exports.createGraphQLDataSource=_c;exports.createGraphQLSubscriptionSource=Zi;exports.createImageObserver=Bs;exports.createIndexedDBDataSource=_e;exports.createInfiniteScroll=Uc;exports.createInlineWorker=Gl;exports.createLRUCache=Yl;exports.createMockDataSource=bi;exports.createNicePluginSystem=mi;exports.createNiceReduxMiddleware=Ji;exports.createODataDataSource=Bc;exports.createObjectPool=ad;exports.createOfflineFirstDataSource=cl;exports.createPermissiveInstanceCeiling=Cc;exports.createPolicyHeader=vc;exports.createReactQueryAdapter=Gi;exports.createRestDataSource=Ir;exports.createRestrictiveInstanceCeiling=kc;exports.createSSEDataSource=Qc;exports.createSignalRDataSource=Kc;exports.createStorageAdapter=wc;exports.createURLStateManager=dl;exports.createUserPreferencesStore=fl;exports.createWeakCache=Jl;exports.createWeakRefCache=Ql;exports.createWebSocketDataSource=Gc;exports.createZustandAdapter=Ki;exports.deepSea=fs;exports.deriveMode=st;exports.deserializeTheme=Sl;exports.desertDune=as;exports.dieterRams=ks;exports.endMark=Ee;exports.evaluateCondition=Dl;exports.filterNiceThemePacksByTag=Al;exports.filterNiceThemePacksExtendedByTag=Tl;exports.forceGC=qi;exports.forestCanopy=rs;exports.formatShortcut=Kt;exports.generateBadgeStyles=Ct;exports.generateButtonStyles=We;exports.generateCardStyles=Xe;exports.generateColorPlaceholder=Ws;exports.generateColumnsFromSchema=tc;exports.generateFillStyles=Us;exports.generateFormFieldsFromSchema=rc;exports.generateFromOpenAPI=ec;exports.generateGradientPlaceholder=Vs;exports.generateInputStyles=Ve;exports.generatePaletteFromColor=wo;exports.generateSizes=Ps;exports.generateSrcset=Fs;exports.generateTabStyles=Mt;exports.generateTableStyles=Nt;exports.generateToggleStyles=At;exports.generateTooltipStyles=Et;exports.generateTracelessComplianceReport=gc;exports.generateVariantCSS=qe;exports.getComponentStats=rr;exports.getComponentStyleFromConfig=Lt;exports.getComputedTheme=hl;exports.getDisplayStyleDataAttrs=It;exports.getGracefulDegradationInfo=bc;exports.getLeakReports=Fi;exports.getLeakSummary=lr;exports.getMemoryStats=ye;exports.getMorePrivateMode=fc;exports.getNiceAnimationClass=Ro;exports.getNiceThemePack=Ml;exports.getNiceThemePackExtended=Nl;exports.getPerformanceReport=nr;exports.getProfilingStats=tr;exports.getRecentTimings=vi;exports.getSlowRenders=Qe;exports.getTracelessBadgeInfo=hc;exports.getTransferables=Kl;exports.glassAurora=qn;exports.groupBy=ot;exports.groupByHierarchical=Hr;exports.hologramUI=us;exports.hyggeScandinavian=Vn;exports.inkSumie=ws;exports.isAtLeastAsPrivate=ge;exports.isSafeUrl=so;exports.japaneseWashi=os;exports.loadAndDecodeImage=mt;exports.logicalProps=Fo;exports.matchesShortcut=Jo;exports.measureAsync=Ei;exports.measureSync=Ni;exports.memphis80s=vs;exports.moroccanMosaic=is;exports.neonArcade=Wn;exports.newspaperBroadsheet=Gn;exports.niceReduxActions=Yi;exports.niceReduxReducer=Qi;exports.niceSelectors=gi;exports.niceStaggerDelay=Io;exports.niceThemeBlue=Dn;exports.niceThemeBootstrap=On;exports.niceThemeDark=Hn;exports.niceThemeFluent=Bn;exports.niceThemeHighContrast=$n;exports.niceThemeLight=Pn;exports.niceThemeMaterial=jn;exports.normalizeSize=qs;exports.obsidianEditorial=_n;exports.parsePolicyFromHeader=xc;exports.pivot=Zc;exports.preloadImages=$s;exports.printPerformanceReport=Ze;exports.removeTheme=jr;exports.removeVariantConfig=Tt;exports.resolveControlStoragePermissions=pc;exports.resolveDisplayStyleConfig=ne;exports.resolveTracelessPolicy=mc;exports.sanitizeHtml=no;exports.saveBaseline=or;exports.selectOptimalSource=Hs;exports.serializeTheme=bl;exports.setupReactDevToolsIntegration=Li;exports.shouldShowConsentBanner=Ar;exports.simulateKeyboard=yi;exports.simulateType=hi;exports.sovietConstructivist=ls;exports.startMark=Ae;exports.swissGrid=Ms;exports.synthwave84=Kn;exports.takeMemorySnapshot=Xi;exports.testId=pi;exports.themeAbyss=ya;exports.themeAfricanEarth=vn;exports.themeAmber=Yr;exports.themeArctic=Ea;exports.themeAurora=ka;exports.themeAutumn=Ma;exports.themeBanking=Da;exports.themeBrazilianCarnival=xn;exports.themeCarbon=ma;exports.themeCharcoal=Ur;exports.themeCherryBlossom=fn;exports.themeChineseNewYear=bn;exports.themeChristmas=sn;exports.themeCoffee=Rn;exports.themeCoolGray=Vr;exports.themeCoral=ca;exports.themeCosmos=pa;exports.themeCyan=ta;exports.themeCyberpunk=rn;exports.themeDesert=va;exports.themeDracula=qa;exports.themeEaster=ln;exports.themeEclipse=ua;exports.themeEducation=Wa;exports.themeEmerald=Jr;exports.themeEmeraldDark=ba;exports.themeEnhancedContrast=Cn;exports.themeEnterprise=Ba;exports.themeForest=Sa;exports.themeFuchsia=sa;exports.themeGlassmorphism=An;exports.themeGovernment=_a;exports.themeHalloween=on;exports.themeHarvest=mn;exports.themeHealthcare=$a;exports.themeHighContrastDark=wn;exports.themeIndianFestive=Sn;exports.themeIndigo=ea;exports.themeIvory=Gr;exports.themeJapaneseZen=pn;exports.themeLargeText=Mn;exports.themeLavender=Ca;exports.themeLegal=ja;exports.themeLime=ra;exports.themeMediterranean=hn;exports.themeMidnight=la;exports.themeMinimalist=Tn;exports.themeMonochrome=kn;exports.themeMonokai=Ka;exports.themeMoroccan=gn;exports.themeNebula=ga;exports.themeNeon=an;exports.themeNeumorphismDark=Nn;exports.themeNeumorphismLight=En;exports.themeNord=Xa;exports.themeObsidian=da;exports.themeOcean=xa;exports.themeOneDark=Ja;exports.themeOnyx=fa;exports.themeOrange=na;exports.themePastelCoral=Ha;exports.themePastelLavender=za;exports.themePastelLemon=Fa;exports.themePastelMint=Ia;exports.themePastelPeach=Ra;exports.themePastelRose=Ta;exports.themePastelSage=Pa;exports.themePastelSky=La;exports.themePink=aa;exports.themeRealEstate=Va;exports.themeRetrowave=nn;exports.themeRose=Kr;exports.themeRuby=ia;exports.themeScandinavian=yn;exports.themeSepia=en;exports.themeShadow=ha;exports.themeSilver=qr;exports.themeSky=oa;exports.themeSlate=Br;exports.themeSoftDark=In;exports.themeSolarizedDark=Ga;exports.themeSolarizedLight=Ua;exports.themeSpring=Aa;exports.themeStone=Wr;exports.themeSummerBeach=dn;exports.themeSunset=wa;exports.themeSynthwave=Ya;exports.themeTeal=Zr;exports.themeTechStartup=Oa;exports.themeTerminalGreen=Za;exports.themeToCssVars=it;exports.themeTropical=Na;exports.themeValentine=cn;exports.themeVaporwave=Qa;exports.themeVintage=tn;exports.themeViolet=Qr;exports.themeWarmDark=Ln;exports.themeWarmGray=Xr;exports.themeWine=zn;exports.themeWinterFrost=un;exports.themeZinc=_r;exports.triggerHaptic=_t;exports.typewriterPress=gs;exports.useAICompletion=Nc;exports.useAccessibleClick=Qo;exports.useAdaptiveVariant=Mo;exports.useBrandColors=xo;exports.useBreakpoint=ie;exports.useChartPreferences=cc;exports.useChartSuggestion=Ic;exports.useChunkedProcessor=Wl;exports.useClickOutside=ho;exports.useCodeCompletion=Tc;exports.useCognitiveAccessibility=ri;exports.useColorBlindMode=li;exports.useComponentDisplayClass=Qs;exports.useComponentDisplayStyle=Ys;exports.useComponentHelp=br;exports.useContainerSize=Co;exports.useControlId=go;exports.useControlPreferences=nt;exports.useDarkMode=So;exports.useDebouncedValue=yo;exports.useDecodedImage=Os;exports.useDeferredList=Vl;exports.useDeferredSearch=Bl;exports.useDevice=Ft;exports.useDisplayAnimation=eo;exports.useDisplayDensity=Zs;exports.useDisplayModeEdit=ro;exports.useEventCleanup=Zl;exports.useFocusManagement=ti;exports.useFocusTrap=bo;exports.useFormGeneration=Rc;exports.useGridPreferences=ic;exports.useHaptic=_o;exports.useImageFormats=zs;exports.useImagePreload=js;exports.useInputMode=mo;exports.useIsTouchDevice=fo;exports.useLazyImage=rd;exports.useLiveAnnouncement=Yt;exports.useLongPress=po;exports.useMeasureEffect=Ti;exports.useMediaQuery=be;exports.useMemoryMonitor=Ui;exports.useMemoryMonitorPerf=td;exports.useNaturalLanguageFilter=Lc;exports.useNiceA11y=Xo;exports.useNiceAI=Q;exports.useNiceAccessMode=Po;exports.useNiceCollapse=Lo;exports.useNiceDataSource=sl;exports.useNiceDisplayStyle=Js;exports.useNiceField=ol;exports.useNiceHelp=hr;exports.useNiceIcon=lo;exports.useNiceLookupSource=il;exports.useNiceRTL=zo;exports.useNiceRecord=Dr;exports.useNiceTheme=xl;exports.useNiceTransition=To;exports.useOptimistic=Xl;exports.useOrientation=Eo;exports.usePan=jo;exports.usePinch=$o;exports.useProgressiveImage=Ds;exports.usePullToRefresh=Bt;exports.useRenderCount=Ai;exports.useResolvedDisplayStyle=oe;exports.useResponsiveValue=ko;exports.useRestoreFocus=Go;exports.useRouteAnnouncement=ei;exports.useRovingTabIndex=Uo;exports.useSafeAbortController=dr;exports.useSafeAreaInsets=No;exports.useSafeEventListener=ji;exports.useSafeFetch=Oi;exports.useSafeInterval=$i;exports.useSafeState=Hi;exports.useSafeSubscription=Bi;exports.useSafeTimeout=Di;exports.useSafeWebSocket=_i;exports.useSharedImageObserver=_s;exports.useShowAt=Ao;exports.useSubmitOnEnter=Yo;exports.useSwipe=Do;exports.useTextImprovement=zc;exports.useThemeIsDark=Fl;exports.useThemeVariants=Ts;exports.useTransitionState=_l;exports.useUnmountLog=Vi;exports.useUserPreferences=at;exports.useVirtualGrid=jl;exports.useVirtualKeyboard=Vo;exports.useVirtualScroll=Rs;exports.useVoiceControl=Zo;exports.useWhyDidYouRender=ar;exports.useWindowedList=Ol;exports.useWorker=ql;exports.useWorkerPool=Ul;exports.validateData=rl;exports.validateViewDocument=Hl;exports.vhsTracking=ps;exports.vogueDidone=hs;exports.watercolorWash=xs;exports.withCaching=Vc;exports.withCalculatedColumns=el;exports.withCrossTabSync=ll;exports.withCursorPagination=Xc;exports.withLeakTracking=Wi;exports.withOptimisticUpdates=Jc;exports.withPolling=Yc;exports.withWhyDidYouRender=Mi;exports.y2kAqua=ys;exports.zenMinimal=Jn;exports.zinePunk=Ss;
127
+ </svg>`;return`data:image/svg+xml,${encodeURIComponent(i)}`}const pd={checkFormatSupport:ve,useImageFormats:jo,generateSrcset:Oo,generateSizes:_o,selectOptimalSource:Bo,useProgressiveImage:Wo,preloadImages:Vo,useImagePreload:Xo,loadAndDecodeImage:mt,useDecodedImage:Uo,createImageObserver:qo,useSharedImageObserver:Go,generateColorPlaceholder:Ko,generateGradientPlaceholder:Jo};function gd(e){return e["data-testid"]??e.testId}function pt(e){return e.error||e.status==="error"?"error":e.warning||e.status==="warning"?"warning":e.success||e.status==="success"?"success":e.status??"idle"}function yd(e){const t=pt(e),r={};return t==="error"&&(r["aria-invalid"]=!0),e.required&&(r["aria-required"]=!0),e.disabled&&(r["aria-disabled"]=!0),e.readOnly&&(r["aria-readonly"]=!0),e.describedById&&(r["aria-describedby"]=e.describedById),r}const Ct=new Set;function Yo(e,t,r){process.env.NODE_ENV!=="production"&&t!==void 0&&r!==void 0&&!Ct.has(e)&&(Ct.add(e),console.warn(`[Nice2Dev] <${e}> received both \`value\` and \`defaultValue\`. Use one or the other (controlled XOR uncontrolled).`))}const Mt=new Set;function Qo(e,t){process.env.NODE_ENV!=="production"&&(Mt.has(e)||(Mt.add(e),t()))}function Zo(e){const{componentName:t,prop:r,replacement:a,removeIn:n,reason:o}=e;Qo(`prop:${t}.${r}`,()=>{const s=[`[Nice2Dev] Prop \`${r}\` on <${t}> is deprecated.`,a?`Use \`${a}\` instead.`:"",n?`Will be removed in ${n}.`:"",o?`Reason: ${o}`:""].filter(Boolean);console.warn(s.join(" "))})}function hd(e){const{symbol:t,replacement:r,removeIn:a,reason:n}=e;Qo(`symbol:${t}`,()=>{const o=[`[Nice2Dev] \`${t}\` is deprecated.`,r?`Use \`${r}\` instead.`:"",a?`Will be removed in ${a}.`:"",n?`Reason: ${n}`:""].filter(Boolean);console.warn(o.join(" "))})}function bd(e){return e.value!==void 0&&e.newValue===void 0&&Zo({componentName:e.componentName,prop:e.prop,replacement:e.replacement,removeIn:e.removeIn}),e.newValue??e.value}const At=new Set;function Sd(e){const{value:t,defaultValue:r,onChange:a,componentName:n="Component"}=e,o=t!==void 0,[s,i]=c.useState(r),l=c.useRef(o);process.env.NODE_ENV!=="production"&&(l.current!==o&&!At.has(n)&&(At.add(n),console.warn(`[Nice2Dev] <${n}> switched between controlled and uncontrolled. A component should not change between the two over its lifetime.`)),l.current=o,Yo(n,t,e.defaultValue!==void 0?r:void 0));const d=o?t:s,u=c.useCallback((m,g)=>{const h=typeof m=="function"?m(d):m;o||i(h),a==null||a(h,g)},[d,o,a]);return[d,u,o]}const xd={idle:"nice-field-status nice-field-status--idle",success:"nice-field-status nice-field-status--success",warning:"nice-field-status nice-field-status--warning",error:"nice-field-status nice-field-status--error"};function vd(e){const t=pt(e),r=t==="error"&&(typeof e.error=="string"?e.error:void 0)||t==="warning"&&e.warning||t==="success"&&e.success||e.helperText||null;return r?x.jsx("div",{id:e.id,role:t==="error"?"alert":void 0,"aria-live":t==="error"?"assertive":"polite","data-testid":e.testId,className:[xd[t],e.className].filter(Boolean).join(" "),children:r}):null}Object.defineProperty(exports,"NICE_I18N_DICTIONARIES",{enumerable:!0,get:()=>_.NICE_I18N_DICTIONARIES});Object.defineProperty(exports,"NICE_SUPPORTED_LANGS",{enumerable:!0,get:()=>_.NICE_SUPPORTED_LANGS});Object.defineProperty(exports,"NiceI18nProvider",{enumerable:!0,get:()=>_.NiceI18nProvider});Object.defineProperty(exports,"createICUTranslator",{enumerable:!0,get:()=>_.createICUTranslator});Object.defineProperty(exports,"formatICU",{enumerable:!0,get:()=>_.formatICU});Object.defineProperty(exports,"useNiceTranslation",{enumerable:!0,get:()=>_.useNiceTranslation});exports.ANIMATION_VALUES=we;exports.BatchOperations=pl;exports.COMMON_SHORTCUTS=ai;exports.ColumnFormulas=ul;exports.DEFAULT_TRACELESS_POLICY=vc;exports.DEFAULT_VARIANT_CONFIG=V;exports.DENSITY_VALUES=oe;exports.DisplayModeView=fs;exports.ImageOptimization=pd;exports.IndexedDBAdapter=gc;exports.LeakDetectorStatus=yr;exports.LocalStorageAdapter=Nr;exports.NICE_BREAKPOINTS=ee;exports.NICE_BUILTIN_ICONS=Ss;exports.NICE_COLOR_BLIND_MODES=gi;exports.NICE_DISPLAY_STYLES=ns;exports.NICE_DISPLAY_STYLE_INFO=ds;exports.NICE_THEME_GALLERY=jn;exports.NICE_THEME_PACKS=ut;exports.NICE_THEME_PACKS_EXTENDED=ft;exports.NICE_THEME_PACK_FONT_LINKS=zl;exports.NICE_THEME_PACK_FONT_LINKS_EXTENDED=Hl;exports.NICE_THEME_PACK_LIST=oo;exports.NICE_THEME_PACK_LIST_EXTENDED=Ro;exports.NICE_THEME_PRESETS=Rl;exports.NICE_VIEW_COMPONENT_TYPES=Xl;exports.NiceA11yProvider=Kt;exports.NiceAIProvider=Hc;exports.NiceAccessControl=Vt;exports.NiceDataCache=Be;exports.NiceDisplayStyleContext=Ce;exports.NiceFieldStatus=vd;exports.NiceHelpIcon=Er;exports.NiceHelpProvider=vr;exports.NiceIcon=Ht;exports.NiceIconProvider=ys;exports.NiceInlineHelp=Mr;exports.NiceKeyboardHint=er;exports.NicePreferencesPanel=xc;exports.NiceProfiler=Fi;exports.NicePullToRefresh=Ks;exports.NiceQuickHelp=Ar;exports.NiceRTLProvider=Bt;exports.NiceRequestDeduplicator=$r;exports.NiceSkipLink=Qt;exports.NiceStateIO=vl;exports.NiceSwipeableListItem=Gs;exports.NiceTestWrapper=ar;exports.NiceThemeContext=ct;exports.NiceThemeProvider=zo;exports.NiceThemeVariantConfigurator=Bl;exports.NiceThemeVariantProvider=_l;exports.NiceTouchTarget=Ys;exports.NiceUserPreferencesProvider=Sc;exports.NiceVisuallyHidden=Yt;exports.PRIVACY_LEVEL_ORDER=te;exports.ProfilerOverlay=mr;exports.RADIUS_VALUES=ae;exports.RestAPISyncAdapter=yc;exports.SHADOW_DARK_MODE_VALUES=Et;exports.SHADOW_VALUES=he;exports.StorageAdapter=zr;exports.TRACELESS_MODE_PRESETS=Lr;exports.TRACELESS_POLICY_HEADER=Tc;exports.VARIANT_PRESETS=ke;exports.ValidationRules=ml;exports.accessModeAttrs=Vs;exports.aggregate=q;exports.analog70s=So;exports.applyColorBlindMode=Ye;exports.applyTheme=Cl;exports.applyVariantConfig=Ge;exports.applyVariantsToTheme=as;exports.arcticCrystal=lo;exports.artDecoGatsby=po;exports.auditStorageCompliance=Dc;exports.auditWCAG22AAA=mi;exports.autumnFoliage=uo;exports.bankVault=no;exports.bauhaus=ao;exports.blackTieGala=Lo;exports.blueprint=yo;exports.brutalistRaw=Jn;exports.buildAriaDescribedBy=Jt;exports.buildFieldA11y=yd;exports.buildFormFieldAria=ei;exports.calculateDataDiff=jr;exports.candyPop=Qn;exports.checkAriaCompliance=Ti;exports.checkContrastAAA=fi;exports.checkFormatSupport=ve;exports.checkRegression=fr;exports.claymorphism=ro;exports.clearAllClientStorage=Pc;exports.clearLeakReports=Xi;exports.clearProfilingData=Qe;exports.comicHalftone=Co;exports.configureLeakDetector=Wi;exports.configureProfiler=or;exports.createArrayDataSource=Uc;exports.createColorBlindController=xi;exports.createCustomDataSource=Zc;exports.createEventCleanup=dd;exports.createGraphQLDataSource=Qc;exports.createGraphQLSubscriptionSource=lc;exports.createImageObserver=qo;exports.createIndexedDBDataSource=We;exports.createInfiniteScroll=al;exports.createInlineWorker=nd;exports.createLRUCache=id;exports.createMockDataSource=Ni;exports.createNicePluginSystem=ki;exports.createNiceReduxMiddleware=sc;exports.createODataDataSource=Yc;exports.createObjectPool=md;exports.createOfflineFirstDataSource=bl;exports.createPermissiveInstanceCeiling=Fc;exports.createPolicyHeader=Ic;exports.createReactQueryAdapter=nc;exports.createRestDataSource=Dr;exports.createRestrictiveInstanceCeiling=zc;exports.createSSEDataSource=cl;exports.createSignalRDataSource=ol;exports.createStorageAdapter=Rc;exports.createURLStateManager=xl;exports.createUserPreferencesStore=wl;exports.createWeakCache=sd;exports.createWeakRefCache=cd;exports.createWebSocketDataSource=nl;exports.createZustandAdapter=oc;exports.deepSea=bo;exports.deprecateProp=Zo;exports.deprecateSymbol=hd;exports.deriveMode=st;exports.deserializeTheme=Tl;exports.desertDune=co;exports.dieterRams=To;exports.endMark=Ne;exports.evaluateCondition=ql;exports.filterNiceThemePacksByTag=Dl;exports.filterNiceThemePacksExtendedByTag=jl;exports.forceGC=rc;exports.forestCanopy=io;exports.formatShortcut=Zt;exports.forwardDeprecated=bd;exports.generateBadgeStyles=Nt;exports.generateButtonStyles=Ve;exports.generateCardStyles=Ue;exports.generateColorPlaceholder=Ko;exports.generateColumnsFromSchema=uc;exports.generateFillStyles=rs;exports.generateFormFieldsFromSchema=fc;exports.generateFromOpenAPI=dc;exports.generateGradientPlaceholder=Jo;exports.generateInputStyles=Xe;exports.generatePaletteFromColor=Ls;exports.generateSizes=_o;exports.generateSrcset=Oo;exports.generateTabStyles=Tt;exports.generateTableStyles=Rt;exports.generateToggleStyles=Lt;exports.generateTooltipStyles=It;exports.generateTracelessComplianceReport=Mc;exports.generateVariantCSS=qe;exports.getComponentStats=ir;exports.getComponentStyleFromConfig=Ft;exports.getComputedTheme=El;exports.getDisplayStyleDataAttrs=Pt;exports.getGracefulDegradationInfo=Nc;exports.getLeakReports=Vi;exports.getLeakSummary=pr;exports.getMemoryStats=ye;exports.getMorePrivateMode=wc;exports.getNiceAnimationClass=Os;exports.getNiceThemePack=Pl;exports.getNiceThemePackExtended=$l;exports.getPerformanceReport=lr;exports.getProfilingStats=sr;exports.getRecentTimings=Ii;exports.getSlowRenders=Ze;exports.getTracelessBadgeInfo=Ec;exports.getTransferables=od;exports.glassAurora=Yn;exports.groupBy=it;exports.groupByHierarchical=_r;exports.hologramUI=ho;exports.hyggeScandinavian=Kn;exports.inkSumie=No;exports.isAtLeastAsPrivate=ge;exports.isSafeUrl=ps;exports.japaneseWashi=fo;exports.loadAndDecodeImage=mt;exports.logicalProps=Bs;exports.matchesShortcut=ni;exports.measureAsync=Hi;exports.measureSync=$i;exports.memphis80s=Eo;exports.moroccanMosaic=mo;exports.neonArcade=Gn;exports.newspaperBroadsheet=Zn;exports.niceReduxActions=ic;exports.niceReduxReducer=cc;exports.niceSelectors=Mi;exports.niceStaggerDelay=js;exports.niceThemeBlue=Bn;exports.niceThemeBootstrap=Xn;exports.niceThemeDark=_n;exports.niceThemeFluent=Un;exports.niceThemeHighContrast=Wn;exports.niceThemeLight=On;exports.niceThemeMaterial=Vn;exports.normalizeSize=ts;exports.obsidianEditorial=qn;exports.parsePolicyFromHeader=Lc;exports.pivot=ll;exports.preloadImages=Vo;exports.printPerformanceReport=et;exports.removeTheme=Vr;exports.removeVariantConfig=zt;exports.resolveControlStoragePermissions=Cc;exports.resolveDisplayStyleConfig=ne;exports.resolveStatus=pt;exports.resolveTestId=gd;exports.resolveTracelessPolicy=kc;exports.sanitizeHtml=ms;exports.saveBaseline=ur;exports.selectOptimalSource=Bo;exports.serializeTheme=Nl;exports.setupReactDevToolsIntegration=Oi;exports.shouldShowConsentBanner=Ir;exports.simulateKeyboard=Ai;exports.simulateType=Ei;exports.sovietConstructivist=go;exports.startMark=Ee;exports.swissGrid=Io;exports.synthwave84=eo;exports.takeMemorySnapshot=tc;exports.testId=Ci;exports.themeAbyss=va;exports.themeAfricanEarth=An;exports.themeAmber=ra;exports.themeArctic=Ra;exports.themeAurora=Na;exports.themeAutumn=La;exports.themeBanking=Ba;exports.themeBrazilianCarnival=Mn;exports.themeCarbon=ba;exports.themeCharcoal=Qr;exports.themeCherryBlossom=hn;exports.themeChineseNewYear=kn;exports.themeChristmas=un;exports.themeCoffee=Hn;exports.themeCoolGray=Kr;exports.themeCoral=ma;exports.themeCosmos=Sa;exports.themeCyan=sa;exports.themeCyberpunk=cn;exports.themeDesert=Aa;exports.themeDracula=Ya;exports.themeEaster=pn;exports.themeEclipse=ya;exports.themeEducation=Ga;exports.themeEmerald=ta;exports.themeEmeraldDark=ka;exports.themeEnhancedContrast=Tn;exports.themeEnterprise=Ua;exports.themeForest=Ca;exports.themeFuchsia=da;exports.themeGlassmorphism=In;exports.themeGovernment=qa;exports.themeHalloween=fn;exports.themeHarvest=bn;exports.themeHealthcare=Wa;exports.themeHighContrastDark=En;exports.themeIndianFestive=Cn;exports.themeIndigo=oa;exports.themeIvory=Zr;exports.themeJapaneseZen=Sn;exports.themeLargeText=Ln;exports.themeLavender=Ta;exports.themeLegal=Va;exports.themeLime=ia;exports.themeMediterranean=wn;exports.themeMidnight=pa;exports.themeMinimalist=Fn;exports.themeMonochrome=Nn;exports.themeMonokai=en;exports.themeMoroccan=xn;exports.themeNebula=xa;exports.themeNeon=ln;exports.themeNeumorphismDark=zn;exports.themeNeumorphismLight=Rn;exports.themeNord=Ja;exports.themeObsidian=ga;exports.themeOcean=Ma;exports.themeOneDark=tn;exports.themeOnyx=ha;exports.themeOrange=la;exports.themePastelCoral=_a;exports.themePastelLavender=$a;exports.themePastelLemon=ja;exports.themePastelMint=Da;exports.themePastelPeach=Ha;exports.themePastelRose=Fa;exports.themePastelSage=Oa;exports.themePastelSky=Pa;exports.themePink=ca;exports.themeRealEstate=Ka;exports.themeRetrowave=dn;exports.themeRose=ea;exports.themeRuby=fa;exports.themeScandinavian=vn;exports.themeSepia=on;exports.themeShadow=wa;exports.themeSilver=Yr;exports.themeSky=ua;exports.themeSlate=Ur;exports.themeSoftDark=Dn;exports.themeSolarizedDark=Za;exports.themeSolarizedLight=Qa;exports.themeSpring=Ia;exports.themeStone=Gr;exports.themeSummerBeach=gn;exports.themeSunset=Ea;exports.themeSynthwave=rn;exports.themeTeal=na;exports.themeTechStartup=Xa;exports.themeTerminalGreen=nn;exports.themeToCssVars=xe;exports.themeTropical=za;exports.themeValentine=mn;exports.themeVaporwave=an;exports.themeVintage=sn;exports.themeViolet=aa;exports.themeWarmDark=Pn;exports.themeWarmGray=Jr;exports.themeWine=$n;exports.themeWinterFrost=yn;exports.themeZinc=qr;exports.triggerHaptic=Ut;exports.typewriterPress=vo;exports.useAICompletion=$c;exports.useAccessibleClick=si;exports.useAdaptiveVariant=zs;exports.useBrandColors=Ns;exports.useBreakpoint=ie;exports.useChartPreferences=bc;exports.useChartSuggestion=_c;exports.useChunkedProcessor=Zl;exports.useClickOutside=Ms;exports.useCodeCompletion=jc;exports.useCognitiveAccessibility=di;exports.useColorBlindMode=rr;exports.useColorBlindModePersisted=Si;exports.useComponentDisplayClass=is;exports.useComponentDisplayStyle=ss;exports.useComponentHelp=kr;exports.useContainerSize=Rs;exports.useControlId=ks;exports.useControlPreferences=ot;exports.useControllableState=Sd;exports.useDarkMode=Es;exports.useDebouncedValue=Cs;exports.useDecodedImage=Uo;exports.useDeferredList=ed;exports.useDeferredSearch=Yl;exports.useDevice=$t;exports.useDisplayAnimation=ls;exports.useDisplayDensity=cs;exports.useDisplayModeEdit=us;exports.useEventCleanup=ld;exports.useFocusManagement=li;exports.useFocusTrap=As;exports.useFormGeneration=Bc;exports.useGridPreferences=hc;exports.useHaptic=Js;exports.useImageFormats=jo;exports.useImagePreload=Xo;exports.useInputMode=vs;exports.useIsTouchDevice=xs;exports.useLazyImage=fd;exports.useLiveAnnouncement=tr;exports.useLongPress=ws;exports.useMeasureEffect=ji;exports.useMediaQuery=be;exports.useMemoryMonitor=ac;exports.useMemoryMonitorPerf=ud;exports.useNaturalLanguageFilter=Oc;exports.useNiceA11y=Zs;exports.useNiceAI=Q;exports.useNiceAccessMode=Ws;exports.useNiceCollapse=$s;exports.useNiceDataSource=gl;exports.useNiceDisplayStyle=os;exports.useNiceField=yl;exports.useNiceHelp=wr;exports.useNiceIcon=bs;exports.useNiceLookupSource=hl;exports.useNiceRTL=_s;exports.useNiceRecord=Br;exports.useNiceTheme=Ll;exports.useNiceTransition=Hs;exports.useOptimistic=td;exports.useOrientation=Ps;exports.usePan=qs;exports.usePinch=Us;exports.useProgressiveImage=Wo;exports.usePullToRefresh=Xt;exports.useRenderCount=Di;exports.useResolvedDisplayStyle=se;exports.useResponsiveValue=Is;exports.useRestoreFocus=ri;exports.useRouteAnnouncement=ci;exports.useRovingTabIndex=ti;exports.useSafeAbortController=gr;exports.useSafeAreaInsets=Ds;exports.useSafeEventListener=Ki;exports.useSafeFetch=Ji;exports.useSafeInterval=Gi;exports.useSafeState=Ui;exports.useSafeSubscription=Yi;exports.useSafeTimeout=qi;exports.useSafeWebSocket=Qi;exports.useSharedImageObserver=Go;exports.useShowAt=Fs;exports.useSubmitOnEnter=oi;exports.useSwipe=Xs;exports.useTextImprovement=Wc;exports.useThemeIsDark=Vl;exports.useThemeVariants=Po;exports.useTransitionState=Ql;exports.useUnmountLog=ec;exports.useUserPreferences=nt;exports.useVirtualGrid=Kl;exports.useVirtualKeyboard=Qs;exports.useVirtualScroll=$o;exports.useVoiceControl=ii;exports.useWhyDidYouRender=cr;exports.useWindowedList=Jl;exports.useWorker=rd;exports.useWorkerPool=ad;exports.validateData=fl;exports.validateViewDocument=Ul;exports.vhsTracking=xo;exports.vogueDidone=ko;exports.warnControlledClash=Yo;exports.watercolorWash=Ao;exports.withCaching=el;exports.withCalculatedColumns=dl;exports.withCrossTabSync=Sl;exports.withCursorPagination=tl;exports.withLeakTracking=Zi;exports.withOptimisticUpdates=sl;exports.withPolling=il;exports.withWhyDidYouRender=Pi;exports.y2kAqua=wo;exports.zenMinimal=to;exports.zinePunk=Mo;
128
128
  //# sourceMappingURL=index.cjs.map