@nice2dev/ui-core 1.3.12 → 1.3.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 l=require("react"),x=require("react/jsx-runtime"),N=require("./input-layer-C7TEW5HS.cjs"),j=require("@nice2dev/i18n"),Hi={small:"sm",medium:"md",large:"lg"};function _i(e,t){return e?Hi[e]??e:"md"}function Oi(e){return e==="danger"?"error":e}/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),x=require("react/jsx-runtime"),N=require("./input-layer-C7TEW5HS.cjs"),j=require("@nice2dev/i18n"),Oi={small:"sm",medium:"md",large:"lg"};function Bi(e,t){return e?Oi[e]??e:"md"}function ji(e){return e==="danger"?"error":e}/**
2
2
  * @file themeVariants.ts
3
3
  * @description Extended theme variants - radius, shadows, fills, gradients, effects
4
4
  *
@@ -7,15 +7,15 @@
7
7
  * @version 1.0.0
8
8
  * @since 2026-03
9
9
  * @license MIT
10
- */const ve={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"}},ze={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))"},sr={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))"},we={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"}},Be={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 Bi(e,t,r){switch(e){case"solid":return{background:t};case"gradient-linear":return{background:`linear-gradient(135deg, ${t} 0%, ${r||ee(t,-20)} 100%)`};case"gradient-radial":return{background:`radial-gradient(circle at top left, ${t} 0%, ${r||ee(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||ee(t,-20)}, ${t})`};case"mesh":return{background:`radial-gradient(at 40% 20%, ${t} 0%, transparent 50%), radial-gradient(at 80% 0%, ${r||ee(t,30)} 0%, transparent 50%), radial-gradient(at 0% 50%, ${ee(t,-20)} 0%, transparent 50%)`,backgroundColor:"var(--ntd-bg-surface, #fff)"};default:return{background:t}}}function mt(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%, ${ee(t,-20)} 100%)`,border:"none",boxShadow:`0 4px 14px ${t}40`};case"3d":return{...r,background:t,border:"none",boxShadow:`0 4px 0 ${ee(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-border-color, #000)",boxShadow:"4px 4px 0 var(--nice-text, #000)",borderRadius:"0"};default:return r}}function pt(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(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",borderRadius:"var(--ntd-radius-md, 8px)"};case"filled":return{...t,background:"var(--ntd-bg-input-filled, var(--nice-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(--nice-border-color, #3a3a3a))",borderRadius:"0",paddingLeft:"0",paddingRight:"0"};case"floating":return{...t,background:"var(--ntd-bg-input, var(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-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(--nice-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(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-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 gt(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(--nice-bg-secondary, transparent))",border:"none",boxShadow:"none"};case"elevated":return{...t,background:"var(--ntd-bg-surface, var(--nice-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(--nice-bg-secondary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-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(--nice-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(--nice-border-color, #3a3a3a))",boxShadow:"none"};case"paper":return{...t,background:"var(--ntd-bg-surface, var(--nice-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 cr(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-color-white, #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-color-white, #fff)",padding:"2px 12px",borderRadius:"9999px"};case"gradient":return{...r,background:`linear-gradient(135deg, ${t}, ${ee(t,-20)})`,color:"var(--nice-text-primary, #fff)",padding:"2px 8px",borderRadius:"4px"};default:return r}}function lr(e,t){switch(e){case"underline":return{borderBottom:`2px solid ${t}`,background:"transparent",color:t};case"pills":return{background:t,color:"var(--nice-color-white, #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 dr(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 ur(e){switch(e){case"dark":return{background:"var(--nice-bg-secondary, #1f2937)",color:"var(--nice-text-primary, #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(--nice-color-primary,#6366f1)",color:"var(--nice-text-on-primary, #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-color-white, #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(--nice-color-primary,#6366f1)"};default:return{}}}function fr(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 Y={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"},je={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 yt(e,t=":root"){const r=ve[e.radius],a=e.shadow,n=we[e.density],o=Be[e.animation],s=[`${t} {`];for(const[i,c]of Object.entries(r))s.push(` --ntd-radius-${i}: ${c};`);s.push(` --ntd-shadow: ${ze[a]};`),s.push(` --ntd-shadow-dark: ${sr[a]};`);for(const[i,c]of Object.entries(n)){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase();s.push(` --ntd-${d}: ${c};`)}for(const[i,c]of Object.entries(o)){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase();s.push(` --ntd-animation-${d}: ${c};`)}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 ht(e,t=document.documentElement,r){const a=r?`[data-ntd-provider="${r}"]`:":root",n=r?`ntd-variant-styles-${r}`:"ntd-variant-styles",o=yt(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 mr(e,t){const r=document.getElementById(`ntd-variant-styles-${e}`);r&&r.remove(),t&&t.removeAttribute("data-ntd-provider")}function ee(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 ji(e,t){const r={...Y,...t};return{...e,variantConfig:r}}const Wi=["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 xe(e){return e==="default"?Y:je[e]??Y}const We=l.createContext({displayStyle:"default",variantConfig:Y,setDisplayStyle:()=>{}});function Vi(){return l.useContext(We)}function ke(e){const t=l.useContext(We),r=e??t.displayStyle??"default",a=xe(r);return{style:r,config:a}}function Ki(e,t,r="var(--nice-color-primary, #6366f1)"){const{config:a}=ke(t);return pr(e,a,r)}function Ui(e,t){const{config:r}=ke(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 Xi(e){const{config:t}=ke(e),r=we[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 Gi(e){const{config:t}=ke(e),r=Be[t.animation];return{"--ntd-anim-duration":r.duration,"--ntd-anim-easing":r.easing,"--ntd-hover-scale":r.hoverScale,"--ntd-click-scale":r.clickScale}}function pr(e,t,r="var(--nice-info, #6366f1)"){switch(e){case"button":return mt(t.buttonStyle,r);case"input":return pt(t.inputStyle);case"card":return gt(t.cardStyle);case"badge":return cr(t.badgeStyle??"solid",r);case"tab":return lr(t.tabStyle??"underline",r);case"toggle":return dr(t.toggleStyle??"default");case"tooltip":return ur(t.tooltipStyle??"dark");case"table":return fr(t.tableStyle??"default");case"menu":return{};case"modal":return{};default:return{}}}function gr(e){const t=xe(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 qi=[{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 Yi({enabled:e,readOnly:t,disabled:r}){const[a,n]=l.useState(!1),o=l.useRef(!1),s=l.useCallback(()=>{t||r||!e||(o.current=!0,n(!0))},[t,r,e]),i=l.useCallback(()=>{n(!1)},[]),c=l.useCallback(d=>{d&&o.current&&(o.current=!1,requestAnimationFrame(()=>{if(d.focus(),d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)try{d.select()}catch{}}))},[]);return l.useEffect(()=>{(t||r)&&a&&n(!1)},[t,r,a]),{isDisplay:!!e&&!a,enterEdit:s,exitEdit:i,autoFocusRef:c}}const Ji=({value:e,placeholder:t,disabled:r,readOnly:a,onActivate:n,className:o,ariaLabel:s})=>{const i=e==null||e==="",c=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:c,"aria-label":s,"aria-disabled":r||void 0,children:i?t??"—":e})};function Qi(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 Zi(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 es=({style:e})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.3em",height:"0.6em",margin:"0 0.35em 0.15em 0.1em",borderRight:"0.12em solid currentColor",borderBottom:"0.12em solid currentColor",transform:"rotate(45deg)",...e}}),ts=({style:e})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.85em",height:"0.85em",borderRadius:"50%",border:"0.12em solid currentColor",borderTopColor:"transparent",transform:"rotate(-45deg)",...e}}),jt={down:{transform:"rotate(45deg)",margin:"0 0 0.2em"},up:{transform:"rotate(-135deg)",margin:"0.2em 0 0"},left:{transform:"rotate(135deg)",margin:"0 0 0 0.2em"},right:{transform:"rotate(-45deg)",margin:"0 0.2em 0 0"}},rs=({direction:e,style:t})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.45em",height:"0.45em",margin:jt[e].margin,borderRight:"0.12em solid currentColor",borderBottom:"0.12em solid currentColor",transform:jt[e].transform,...t}}),as=({style:e})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.5em",height:"0.5em",borderRadius:"50%",background:"currentColor",...e}}),ns=({style:e})=>x.jsxs("span",{"aria-hidden":"true",style:{display:"inline-block",position:"relative",width:"0.7em",height:"0.7em",...e},children:[x.jsx("span",{style:{position:"absolute",top:"50%",left:0,width:"100%",height:"0.12em",background:"currentColor",transform:"translateY(-50%) rotate(45deg)"}}),x.jsx("span",{style:{position:"absolute",top:"50%",left:0,width:"100%",height:"0.12em",background:"currentColor",transform:"translateY(-50%) rotate(-45deg)"}})]});function os(){const[e,t]=l.useState(()=>typeof window<"u"?window.matchMedia("(pointer: coarse)").matches:!1);return l.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 is(){const[e,t]=l.useState(()=>typeof window<"u"&&window.matchMedia("(pointer: coarse)").matches?"touch":"mouse");return l.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 ss(e,t=500){const r=l.useRef(null),a=l.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]);return{onPointerDown:l.useCallback(o=>{o.pointerType==="touch"&&(a(),r.current=setTimeout(e,t))},[e,t,a]),onPointerUp:a,onPointerCancel:a}}function cs(){const e=l.useRef(null),t=l.useCallback(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),r=l.useCallback(a=>{t();let n=300;const o=()=>{a(),n=Math.max(30,n*.82),e.current=setTimeout(o,n)};e.current=setTimeout(o,400)},[t]);return l.useEffect(()=>t,[t]),{start:r,stop:t}}function ls(e){const t=l.useId();return e||t}function ds(e,t){const[r,a]=l.useState(e);return l.useEffect(()=>{const n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}function us(e,t){l.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 fs(e,t){N.useOverlayFocus(e,{open:t,modal:!0})}function ms(e={}){const{defaultMode:t="system",storageKey:r="nice-color-mode",darkClass:a="nice-dark",lightClass:n="nice-light"}=e,[o,s]=l.useState(()=>typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[i,c]=l.useState(()=>{if(typeof window>"u")return t;const p=localStorage.getItem(r);return p==="light"||p==="dark"||p==="system"?p:t});l.useEffect(()=>{const p=window.matchMedia("(prefers-color-scheme: dark)"),m=g=>s(g.matches?"dark":"light");return p.addEventListener("change",m),()=>p.removeEventListener("change",m)},[]);const d=i==="system"?o==="dark":i==="dark";l.useEffect(()=>{const p=document.documentElement;return d?(p.classList.add(a),p.classList.remove(n)):(p.classList.add(n),p.classList.remove(a)),()=>{p.classList.remove(a,n)}},[d,a,n]),l.useEffect(()=>{localStorage.setItem(r,i)},[i,r]);const u=l.useCallback(()=>c("light"),[]),f=l.useCallback(()=>c("dark"),[]),h=l.useCallback(()=>c("system"),[]),b=l.useCallback(()=>c(p=>p==="system"?o==="dark"?"light":"dark":p==="dark"?"light":"dark"),[o]);return{isDark:d,mode:i,systemPreference:o,setLight:u,setDark:f,setSystem:h,toggle:b}}function ps(e,t={}){const{t:r}=j.useNiceTranslation(),{colorCount:a=5,quality:n=5}=t,[o,s]=l.useState(null),[i,c]=l.useState(!1),[d,u]=l.useState(null);return l.useEffect(()=>{if(!e){s(null);return}(async()=>{c(!0),u(null);try{let h;typeof e=="string"?(h=new Image,h.crossOrigin="anonymous",await new Promise((M,I)=>{h.onload=()=>M(),h.onerror=()=>I(new Error("Failed to load image")),h.src=e})):h=e;const b=document.createElement("canvas"),p=100,m=Math.min(p/h.width,p/h.height,1);b.width=h.width*m,b.height=h.height*m;const g=b.getContext("2d");if(!g)throw new Error("Canvas context unavailable");g.drawImage(h,0,0,b.width,b.height);const S=g.getImageData(0,0,b.width,b.height),y=[],v=Math.max(1,Math.floor(11-n));for(let M=0;M<S.data.length;M+=4*v){const I=S.data[M],$=S.data[M+1],T=S.data[M+2];if(S.data[M+3]>200){const F=(I+$+T)/3;F>20&&F<235&&y.push([I,$,T])}}if(y.length===0)throw new Error("No valid colors found in image");const E=gs(y,a).sort((M,I)=>{const $=Math.max(...M)-Math.min(...M);return Math.max(...I)-Math.min(...I)-$}),w=M=>"#"+M.map(I=>Math.round(I).toString(16).padStart(2,"0")).join(""),C=M=>(.299*M[0]+.587*M[1]+.114*M[2])/255>.5?"#000000":"#ffffff",A=E.slice();s({primary:w(A[0]||[100,100,100]),secondary:w(A[1]||A[0]||[150,150,150]),accent:w(E[0]||[100,100,100]),palette:A.map(w),primaryText:C(A[0]||[100,100,100]),secondaryText:C(A[1]||A[0]||[150,150,150])})}catch(h){u(h instanceof Error?h.message:r("brandColors.unknownError","Unknown error")),s(null)}finally{c(!1)}})()},[e,a,n,r]),{colors:o,loading:i,error:d}}function gs(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 c of e){let d=1/0,u=0;for(let f=0;f<t;f++){const h=Math.sqrt((c[0]-a[f][0])**2+(c[1]-a[f][1])**2+(c[2]-a[f][2])**2);h<d&&(d=h,u=f)}s[u].push(c)}let i=!1;for(let c=0;c<t;c++){if(s[c].length===0)continue;const d=[0,0,0];for(const u of s[c])d[0]+=u[0],d[1]+=u[1],d[2]+=u[2];d[0]/=s[c].length,d[1]/=s[c].length,d[2]/=s[c].length,(Math.abs(d[0]-a[c][0])>1||Math.abs(d[1]-a[c][1])>1||Math.abs(d[2]-a[c][2])>1)&&(i=!0),a[c]=d}if(!i)break}return a}function ys(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,c=0;const d=(o+s)/2;if(o!==s){const f=o-s;switch(c=d>.5?f/(2-o-s):f/(o+s),o){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,h,b)=>{const p=(k,E,w)=>(w<0&&(w+=1),w>1&&(w-=1),w<.16666666666666666?k+(E-k)*6*w:w<.5?E:w<.6666666666666666?k+(E-k)*(.6666666666666666-w)*6:k),m=b<.5?b*(1+h):b+h-b*h,g=2*b-m,S=Math.round(p(g,m,f+1/3)*255),y=Math.round(p(g,m,f)*255),v=Math.round(p(g,m,f-1/3)*255);return"#"+[S,y,v].map(k=>k.toString(16).padStart(2,"0")).join("")};return{lightest:u(i,Math.min(c*.3,1),.97),lighter:u(i,Math.min(c*.5,1),.9),light:u(i,Math.min(c*.7,1),.8),base:e,dark:u(i,Math.min(c*1.1,1),Math.max(d-.15,.1)),darker:u(i,Math.min(c*1.2,1),Math.max(d-.25,.05)),darkest:u(i,Math.min(c*1.3,1),Math.max(d-.35,.02)),text:d>.5?"#000000":"#ffffff",textInverse:d>.5?"#ffffff":"#000000"}}const me={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},se=["xs","sm","md","lg","xl","xxl"];function Ce(e=me){const[t,r]=l.useState(()=>typeof window<"u"?window.innerWidth:e.lg);l.useEffect(()=>{let i;const c=()=>{i&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>r(window.innerWidth))};return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),i&&cancelAnimationFrame(i)}},[]);const a=l.useMemo(()=>{for(let i=se.length-1;i>=0;i--)if(t>=e[se[i]])return se[i];return"xs"},[t,e]),n=l.useCallback(i=>t>=e[i],[t,e]),o=l.useCallback(i=>t<e[i],[t,e]),s=l.useCallback((i,c)=>t>=e[i]&&t<e[c],[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 $e(e){const[t,r]=l.useState(()=>typeof window>"u"?!1:window.matchMedia(e).matches);return l.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 hs(e,t=me){const{current:r}=Ce(t);return l.useMemo(()=>{if(e==null||typeof e!="object"||Array.isArray(e))return e;const a=e,n=se.indexOf(r);for(let o=n;o>=0;o--){const s=a[se[o]];if(s!==void 0)return s}for(let o=n+1;o<se.length;o++){const s=a[se[o]];if(s!==void 0)return s}},[e,r])}function bs(e){const[t,r]=l.useState({width:0,height:0});return l.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 yr(){const{width:e,isMobile:t}=Ce(),r=l.useMemo(()=>typeof window>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0,[]),a=$e("(prefers-reduced-motion: reduce)"),n=$e("(orientation: portrait)"),o=l.useMemo(()=>typeof window>"u"?1:window.devicePixelRatio||1,[]),s=t&&r,i=!t&&e<me.lg&&r,c=!r||e>=me.lg;return{isMobile:s||i,isTouch:r,isPhone:s,isTablet:i,isDesktop:c,prefersReducedMotion:a,isPortrait:n,pixelRatio:o}}function Ss(e={}){const{forceVariant:t,breakpoints:r=me}=e,{isMobile:a,isTablet:n,isDesktop:o}=Ce(r),s=yr();return t||(s.isPhone?"mobile":s.isTablet?"tablet":s.isDesktop?"desktop":a?"mobile":n?"tablet":"desktop")}function vs(e={}){const{showAt:t,hideAt:r,mobileOnly:a,desktopOnly:n,tabletOnly:o}=e,{current:s,isMobile:i,isTablet:c,isDesktop:d}=Ce();return a?i:n?d:o?c:r&&r.includes(s)?!1:t?t.includes(s):!0}function xs(){return $e("(orientation: portrait)")?"portrait":"landscape"}function ws(){const[e,t]=l.useState({top:0,right:0,bottom:0,left:0});return l.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 ve={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"}},ze={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))"},sr={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))"},we={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"}},Be={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 Wi(e,t,r){switch(e){case"solid":return{background:t};case"gradient-linear":return{background:`linear-gradient(135deg, ${t} 0%, ${r||ee(t,-20)} 100%)`};case"gradient-radial":return{background:`radial-gradient(circle at top left, ${t} 0%, ${r||ee(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||ee(t,-20)}, ${t})`};case"mesh":return{background:`radial-gradient(at 40% 20%, ${t} 0%, transparent 50%), radial-gradient(at 80% 0%, ${r||ee(t,30)} 0%, transparent 50%), radial-gradient(at 0% 50%, ${ee(t,-20)} 0%, transparent 50%)`,backgroundColor:"var(--ntd-bg-surface, #fff)"};default:return{background:t}}}function mt(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%, ${ee(t,-20)} 100%)`,border:"none",boxShadow:`0 4px 14px ${t}40`};case"3d":return{...r,background:t,border:"none",boxShadow:`0 4px 0 ${ee(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-border-color, #000)",boxShadow:"4px 4px 0 var(--nice-text, #000)",borderRadius:"0"};default:return r}}function pt(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(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-border-color, #3a3a3a))",borderRadius:"var(--ntd-radius-md, 8px)"};case"filled":return{...t,background:"var(--ntd-bg-input-filled, var(--nice-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(--nice-border-color, #3a3a3a))",borderRadius:"0",paddingLeft:"0",paddingRight:"0"};case"floating":return{...t,background:"var(--ntd-bg-input, var(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-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(--nice-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(--nice-bg-primary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-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 gt(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(--nice-bg-secondary, transparent))",border:"none",boxShadow:"none"};case"elevated":return{...t,background:"var(--ntd-bg-surface, var(--nice-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(--nice-bg-secondary, transparent))",border:"1px solid var(--ntd-border-color, var(--nice-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(--nice-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(--nice-border-color, #3a3a3a))",boxShadow:"none"};case"paper":return{...t,background:"var(--ntd-bg-surface, var(--nice-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 cr(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-color-white, #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-color-white, #fff)",padding:"2px 12px",borderRadius:"9999px"};case"gradient":return{...r,background:`linear-gradient(135deg, ${t}, ${ee(t,-20)})`,color:"var(--nice-text-primary, #fff)",padding:"2px 8px",borderRadius:"4px"};default:return r}}function lr(e,t){switch(e){case"underline":return{borderBottom:`2px solid ${t}`,background:"transparent",color:t};case"pills":return{background:t,color:"var(--nice-color-white, #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 dr(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 ur(e){switch(e){case"dark":return{background:"var(--nice-bg-secondary, #1f2937)",color:"var(--nice-text-primary, #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(--nice-color-primary,#6366f1)",color:"var(--nice-text-on-primary, #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-color-white, #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(--nice-color-primary,#6366f1)"};default:return{}}}function fr(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 Y={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"},je={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 yt(e,t=":root"){const r=ve[e.radius],a=e.shadow,n=we[e.density],o=Be[e.animation],s=[`${t} {`];for(const[i,c]of Object.entries(r))s.push(` --ntd-radius-${i}: ${c};`);s.push(` --ntd-shadow: ${ze[a]};`),s.push(` --ntd-shadow-dark: ${sr[a]};`);for(const[i,c]of Object.entries(n)){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase();s.push(` --ntd-${d}: ${c};`)}for(const[i,c]of Object.entries(o)){const d=i.replace(/([A-Z])/g,"-$1").toLowerCase();s.push(` --ntd-animation-${d}: ${c};`)}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 ht(e,t=document.documentElement,r){const a=r?`[data-ntd-provider="${r}"]`:":root",n=r?`ntd-variant-styles-${r}`:"ntd-variant-styles",o=yt(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 mr(e,t){const r=document.getElementById(`ntd-variant-styles-${e}`);r&&r.remove(),t&&t.removeAttribute("data-ntd-provider")}function ee(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 Vi(e,t){const r={...Y,...t};return{...e,variantConfig:r}}const Ki=["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 xe(e){return e==="default"?Y:je[e]??Y}const We=l.createContext({displayStyle:"default",variantConfig:Y,setDisplayStyle:()=>{}});function Ui(){return l.useContext(We)}function ke(e){const t=l.useContext(We),r=e??t.displayStyle??"default",a=xe(r);return{style:r,config:a}}function Xi(e,t,r="var(--nice-color-primary, #6366f1)"){const{config:a}=ke(t);return pr(e,a,r)}function Gi(e,t){const{config:r}=ke(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 qi(e){const{config:t}=ke(e),r=we[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 Yi(e){const{config:t}=ke(e),r=Be[t.animation];return{"--ntd-anim-duration":r.duration,"--ntd-anim-easing":r.easing,"--ntd-hover-scale":r.hoverScale,"--ntd-click-scale":r.clickScale}}function pr(e,t,r="var(--nice-info, #6366f1)"){switch(e){case"button":return mt(t.buttonStyle,r);case"input":return pt(t.inputStyle);case"card":return gt(t.cardStyle);case"badge":return cr(t.badgeStyle??"solid",r);case"tab":return lr(t.tabStyle??"underline",r);case"toggle":return dr(t.toggleStyle??"default");case"tooltip":return ur(t.tooltipStyle??"dark");case"table":return fr(t.tableStyle??"default");case"menu":return{};case"modal":return{};default:return{}}}function gr(e){const t=xe(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 Ji=[{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 Qi({enabled:e,readOnly:t,disabled:r}){const[a,n]=l.useState(!1),o=l.useRef(!1),s=l.useCallback(()=>{t||r||!e||(o.current=!0,n(!0))},[t,r,e]),i=l.useCallback(()=>{n(!1)},[]),c=l.useCallback(d=>{d&&o.current&&(o.current=!1,requestAnimationFrame(()=>{if(d.focus(),d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)try{d.select()}catch{}}))},[]);return l.useEffect(()=>{(t||r)&&a&&n(!1)},[t,r,a]),{isDisplay:!!e&&!a,enterEdit:s,exitEdit:i,autoFocusRef:c}}const Zi=({value:e,placeholder:t,disabled:r,readOnly:a,onActivate:n,className:o,ariaLabel:s})=>{const i=e==null||e==="",c=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:c,"aria-label":s,"aria-disabled":r||void 0,children:i?t??"—":e})};function es(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 ts(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 rs=({style:e})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.3em",height:"0.6em",margin:"0 0.35em 0.15em 0.1em",borderRight:"0.12em solid currentColor",borderBottom:"0.12em solid currentColor",transform:"rotate(45deg)",...e}}),as=({style:e})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.85em",height:"0.85em",borderRadius:"50%",border:"0.12em solid currentColor",borderTopColor:"transparent",transform:"rotate(-45deg)",...e}}),jt={down:{transform:"rotate(45deg)",margin:"0 0 0.2em"},up:{transform:"rotate(-135deg)",margin:"0.2em 0 0"},left:{transform:"rotate(135deg)",margin:"0 0 0 0.2em"},right:{transform:"rotate(-45deg)",margin:"0 0.2em 0 0"}},ns=({direction:e,style:t})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.45em",height:"0.45em",margin:jt[e].margin,borderRight:"0.12em solid currentColor",borderBottom:"0.12em solid currentColor",transform:jt[e].transform,...t}}),os=({style:e})=>x.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.5em",height:"0.5em",borderRadius:"50%",background:"currentColor",...e}}),is=({style:e})=>x.jsxs("span",{"aria-hidden":"true",style:{display:"inline-block",position:"relative",width:"0.7em",height:"0.7em",...e},children:[x.jsx("span",{style:{position:"absolute",top:"50%",left:0,width:"100%",height:"0.12em",background:"currentColor",transform:"translateY(-50%) rotate(45deg)"}}),x.jsx("span",{style:{position:"absolute",top:"50%",left:0,width:"100%",height:"0.12em",background:"currentColor",transform:"translateY(-50%) rotate(-45deg)"}})]});function ss(){const[e,t]=l.useState(()=>typeof window<"u"?window.matchMedia("(pointer: coarse)").matches:!1);return l.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 cs(){const[e,t]=l.useState(()=>typeof window<"u"&&window.matchMedia("(pointer: coarse)").matches?"touch":"mouse");return l.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 ls(e,t=500){const r=l.useRef(null),a=l.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]);return{onPointerDown:l.useCallback(o=>{o.pointerType==="touch"&&(a(),r.current=setTimeout(e,t))},[e,t,a]),onPointerUp:a,onPointerCancel:a}}function ds(){const e=l.useRef(null),t=l.useCallback(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),r=l.useCallback(a=>{t();let n=300;const o=()=>{a(),n=Math.max(30,n*.82),e.current=setTimeout(o,n)};e.current=setTimeout(o,400)},[t]);return l.useEffect(()=>t,[t]),{start:r,stop:t}}function us(e){const t=l.useId();return e||t}function fs(e,t){const[r,a]=l.useState(e);return l.useEffect(()=>{const n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}function ms(e,t){l.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 ps(e,t){N.useOverlayFocus(e,{open:t,modal:!0})}function gs(e={}){const{defaultMode:t="system",storageKey:r="nice-color-mode",darkClass:a="nice-dark",lightClass:n="nice-light"}=e,[o,s]=l.useState(()=>typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[i,c]=l.useState(()=>{if(typeof window>"u")return t;const p=localStorage.getItem(r);return p==="light"||p==="dark"||p==="system"?p:t});l.useEffect(()=>{const p=window.matchMedia("(prefers-color-scheme: dark)"),m=g=>s(g.matches?"dark":"light");return p.addEventListener("change",m),()=>p.removeEventListener("change",m)},[]);const d=i==="system"?o==="dark":i==="dark";l.useEffect(()=>{const p=document.documentElement;return d?(p.classList.add(a),p.classList.remove(n)):(p.classList.add(n),p.classList.remove(a)),()=>{p.classList.remove(a,n)}},[d,a,n]),l.useEffect(()=>{localStorage.setItem(r,i)},[i,r]);const u=l.useCallback(()=>c("light"),[]),f=l.useCallback(()=>c("dark"),[]),h=l.useCallback(()=>c("system"),[]),b=l.useCallback(()=>c(p=>p==="system"?o==="dark"?"light":"dark":p==="dark"?"light":"dark"),[o]);return{isDark:d,mode:i,systemPreference:o,setLight:u,setDark:f,setSystem:h,toggle:b}}function ys(e,t={}){const{t:r}=j.useNiceTranslation(),{colorCount:a=5,quality:n=5}=t,[o,s]=l.useState(null),[i,c]=l.useState(!1),[d,u]=l.useState(null);return l.useEffect(()=>{if(!e){s(null);return}(async()=>{c(!0),u(null);try{let h;typeof e=="string"?(h=new Image,h.crossOrigin="anonymous",await new Promise((M,I)=>{h.onload=()=>M(),h.onerror=()=>I(new Error("Failed to load image")),h.src=e})):h=e;const b=document.createElement("canvas"),p=100,m=Math.min(p/h.width,p/h.height,1);b.width=h.width*m,b.height=h.height*m;const g=b.getContext("2d");if(!g)throw new Error("Canvas context unavailable");g.drawImage(h,0,0,b.width,b.height);const S=g.getImageData(0,0,b.width,b.height),y=[],v=Math.max(1,Math.floor(11-n));for(let M=0;M<S.data.length;M+=4*v){const I=S.data[M],$=S.data[M+1],T=S.data[M+2];if(S.data[M+3]>200){const F=(I+$+T)/3;F>20&&F<235&&y.push([I,$,T])}}if(y.length===0)throw new Error("No valid colors found in image");const E=hs(y,a).sort((M,I)=>{const $=Math.max(...M)-Math.min(...M);return Math.max(...I)-Math.min(...I)-$}),w=M=>"#"+M.map(I=>Math.round(I).toString(16).padStart(2,"0")).join(""),C=M=>(.299*M[0]+.587*M[1]+.114*M[2])/255>.5?"#000000":"#ffffff",A=E.slice();s({primary:w(A[0]||[100,100,100]),secondary:w(A[1]||A[0]||[150,150,150]),accent:w(E[0]||[100,100,100]),palette:A.map(w),primaryText:C(A[0]||[100,100,100]),secondaryText:C(A[1]||A[0]||[150,150,150])})}catch(h){u(h instanceof Error?h.message:r("brandColors.unknownError","Unknown error")),s(null)}finally{c(!1)}})()},[e,a,n,r]),{colors:o,loading:i,error:d}}function hs(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 c of e){let d=1/0,u=0;for(let f=0;f<t;f++){const h=Math.sqrt((c[0]-a[f][0])**2+(c[1]-a[f][1])**2+(c[2]-a[f][2])**2);h<d&&(d=h,u=f)}s[u].push(c)}let i=!1;for(let c=0;c<t;c++){if(s[c].length===0)continue;const d=[0,0,0];for(const u of s[c])d[0]+=u[0],d[1]+=u[1],d[2]+=u[2];d[0]/=s[c].length,d[1]/=s[c].length,d[2]/=s[c].length,(Math.abs(d[0]-a[c][0])>1||Math.abs(d[1]-a[c][1])>1||Math.abs(d[2]-a[c][2])>1)&&(i=!0),a[c]=d}if(!i)break}return a}function bs(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,c=0;const d=(o+s)/2;if(o!==s){const f=o-s;switch(c=d>.5?f/(2-o-s):f/(o+s),o){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,h,b)=>{const p=(k,E,w)=>(w<0&&(w+=1),w>1&&(w-=1),w<.16666666666666666?k+(E-k)*6*w:w<.5?E:w<.6666666666666666?k+(E-k)*(.6666666666666666-w)*6:k),m=b<.5?b*(1+h):b+h-b*h,g=2*b-m,S=Math.round(p(g,m,f+1/3)*255),y=Math.round(p(g,m,f)*255),v=Math.round(p(g,m,f-1/3)*255);return"#"+[S,y,v].map(k=>k.toString(16).padStart(2,"0")).join("")};return{lightest:u(i,Math.min(c*.3,1),.97),lighter:u(i,Math.min(c*.5,1),.9),light:u(i,Math.min(c*.7,1),.8),base:e,dark:u(i,Math.min(c*1.1,1),Math.max(d-.15,.1)),darker:u(i,Math.min(c*1.2,1),Math.max(d-.25,.05)),darkest:u(i,Math.min(c*1.3,1),Math.max(d-.35,.02)),text:d>.5?"#000000":"#ffffff",textInverse:d>.5?"#ffffff":"#000000"}}const me={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},se=["xs","sm","md","lg","xl","xxl"];function Ce(e=me){const[t,r]=l.useState(()=>typeof window<"u"?window.innerWidth:e.lg);l.useEffect(()=>{let i;const c=()=>{i&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>r(window.innerWidth))};return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),i&&cancelAnimationFrame(i)}},[]);const a=l.useMemo(()=>{for(let i=se.length-1;i>=0;i--)if(t>=e[se[i]])return se[i];return"xs"},[t,e]),n=l.useCallback(i=>t>=e[i],[t,e]),o=l.useCallback(i=>t<e[i],[t,e]),s=l.useCallback((i,c)=>t>=e[i]&&t<e[c],[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 $e(e){const[t,r]=l.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(e).matches);return l.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;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 Ss(e,t=me){const{current:r}=Ce(t);return l.useMemo(()=>{if(e==null||typeof e!="object"||Array.isArray(e))return e;const a=e,n=se.indexOf(r);for(let o=n;o>=0;o--){const s=a[se[o]];if(s!==void 0)return s}for(let o=n+1;o<se.length;o++){const s=a[se[o]];if(s!==void 0)return s}},[e,r])}function vs(e){const[t,r]=l.useState({width:0,height:0});return l.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 yr(){const{width:e,isMobile:t}=Ce(),r=l.useMemo(()=>typeof window>"u"?!1:"ontouchstart"in window||navigator.maxTouchPoints>0,[]),a=$e("(prefers-reduced-motion: reduce)"),n=$e("(orientation: portrait)"),o=l.useMemo(()=>typeof window>"u"?1:window.devicePixelRatio||1,[]),s=t&&r,i=!t&&e<me.lg&&r,c=!r||e>=me.lg;return{isMobile:s||i,isTouch:r,isPhone:s,isTablet:i,isDesktop:c,prefersReducedMotion:a,isPortrait:n,pixelRatio:o}}function xs(e={}){const{forceVariant:t,breakpoints:r=me}=e,{isMobile:a,isTablet:n,isDesktop:o}=Ce(r),s=yr();return t||(s.isPhone?"mobile":s.isTablet?"tablet":s.isDesktop?"desktop":a?"mobile":n?"tablet":"desktop")}function ws(e={}){const{showAt:t,hideAt:r,mobileOnly:a,desktopOnly:n,tabletOnly:o}=e,{current:s,isMobile:i,isTablet:c,isDesktop:d}=Ce();return a?i:n?d:o?c:r&&r.includes(s)?!1:t?t.includes(s):!0}function ks(){return $e("(orientation: portrait)")?"portrait":"landscape"}function Cs(){const[e,t]=l.useState({top:0,right:0,bottom:0,left:0});return l.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 hr(e="normal"){return typeof e=="number"?e:e==="fast"?120:e==="slow"?300:200}const nt={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:""},br={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 ks(e){const{visible:t,animation:r="fade",duration:a="normal",onEntered:n,onExited:o}=e,[s,i]=l.useState(t?"entered":"exited"),[c,d]=l.useState(t),u=l.useRef(void 0),f=hr(a),h=l.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]),b=h||r==="none"?0:f;l.useEffect(()=>(u.current&&clearTimeout(u.current),t?(d(!0),i("entering"),u.current=setTimeout(()=>{i("entered"),n==null||n()},b)):(i("exiting"),u.current=setTimeout(()=>{i("exited"),d(!1),o==null||o()},b)),()=>{u.current&&clearTimeout(u.current)}),[t,b]);const p=l.useMemo(()=>r==="none"||h?"":s==="entering"?nt[r]:s==="exiting"?br[r]:s==="entered"?`${nt[r]} nice-anim-active`:"",[r,s,h]),m=l.useMemo(()=>({animationDuration:`${b}ms`,transitionDuration:`${b}ms`}),[b]);return{state:s,shouldRender:c,className:p,style:m}}function Cs(e,t){const{expanded:r,duration:a="normal"}=t,[n,o]=l.useState(r?"auto":0),s=hr(a);return l.useEffect(()=>{const i=e.current;if(i)if(r){const c=i.scrollHeight;o(c);const d=setTimeout(()=>o("auto"),s);return()=>clearTimeout(d)}else{const c=i.scrollHeight;o(c),requestAnimationFrame(()=>{requestAnimationFrame(()=>o(0))})}},[r,s,e]),{overflow:"hidden",height:typeof n=="number"?`${n}px`:n,transition:`height ${s}ms ease`}}function Es(e,t=50){return`${e*t}ms`}function Ns(e,t){return t==="enter"?nt[e]:br[e]}const Sr=l.createContext({direction:"ltr",isRTL:!1,flip:e=>e,flipStyle:(e,t)=>({[e]:t})}),vr=({direction:e,children:t})=>{const r=l.useMemo(()=>e!=="auto"?e:typeof document<"u"&&document.documentElement.getAttribute("dir")==="rtl"?"rtl":"ltr",[e]),a=r==="rtl";l.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=l.useCallback(i=>a?{left:"right",right:"left",start:"end",end:"start"}[i]??i:i,[a]),o=l.useCallback((i,c)=>a?{[{paddingLeft:"paddingRight",paddingRight:"paddingLeft",marginLeft:"marginRight",marginRight:"marginLeft"}[i]||i]:c}:{[i]:c},[a]),s=l.useMemo(()=>({direction:r,isRTL:a,flip:n,flipStyle:o}),[r,a,n,o]);return x.jsx(Sr.Provider,{value:s,children:x.jsx("div",{dir:r,style:{direction:r,display:"contents"},children:t})})};process.env.NODE_ENV!=="production"&&(vr.displayName="NiceRTLProvider");function As(){return l.useContext(Sr)}const Ms={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"}},xr=l.createContext({permissions:{},getAccessMode:()=>"full"}),wr=({permissions:e,children:t})=>{const r=l.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(xr.Provider,{value:r,children:t})};process.env.NODE_ENV!=="production"&&(wr.displayName="NiceAccessControl");function Ts(e,t,r){const a=l.useContext(xr);return e||a.getAccessMode(t,r)}function Is(e){switch(e){case"disabled":return{disabled:!0,"aria-disabled":!0,tabIndex:-1};case"readOnly":return{readOnly:!0};default:return{}}}function Rs(e={}){const{threshold:t=50,maxDuration:r=300,onSwipe:a,onSwipeLeft:n,onSwipeRight:o,onSwipeUp:s,onSwipeDown:i,enabled:c=!0}=e,d=l.useRef(null),[u,f]=l.useState(!1),[h,b]=l.useState(null),p=l.useRef(null);return l.useEffect(()=>{const m=d.current;if(!m||!c)return;const g=k=>{if(k.touches.length!==1)return;const E=k.touches[0];p.current={x:E.clientX,y:E.clientY,timestamp:Date.now()},f(!0),b(null)},S=k=>{if(!p.current||k.touches.length!==1)return;const E=k.touches[0],w=E.clientX-p.current.x,C=E.clientY-p.current.y;Math.abs(w)>Math.abs(C)?b(w>0?"right":"left"):b(C>0?"down":"up")},y=k=>{if(!p.current)return;const E=k.changedTouches[0],w={x:E.clientX,y:E.clientY,timestamp:Date.now()},C=w.x-p.current.x,A=w.y-p.current.y,M=w.timestamp-p.current.timestamp,I=Math.sqrt(C*C+A*A),$=I/M;if(f(!1),M<=r&&I>=t){let T;Math.abs(C)>Math.abs(A)?T=C>0?"right":"left":T=A>0?"down":"up";const D={direction:T,distance:I,velocity:$,duration:M};switch(a==null||a(D),T){case"left":n==null||n(D);break;case"right":o==null||o(D);break;case"up":s==null||s(D);break;case"down":i==null||i(D);break}}p.current=null,b(null)},v=()=>{p.current=null,f(!1),b(null)};return m.addEventListener("touchstart",g,{passive:!0}),m.addEventListener("touchmove",S,{passive:!0}),m.addEventListener("touchend",y,{passive:!0}),m.addEventListener("touchcancel",v,{passive:!0}),()=>{m.removeEventListener("touchstart",g),m.removeEventListener("touchmove",S),m.removeEventListener("touchend",y),m.removeEventListener("touchcancel",v)}},[c,t,r,a,n,o,s,i]),{ref:d,isSwiping:u,swipeDirection:h}}function Ls(e={}){const{onPinch:t,onPinchStart:r,onPinchEnd:a,minScale:n=.5,maxScale:o=3,enabled:s=!0}=e,i=l.useRef(null),[c,d]=l.useState(1),[u,f]=l.useState(!1),h=l.useRef(null),b=l.useRef(1);return l.useEffect(()=>{const p=i.current;if(!p||!s)return;const m=(k,E)=>{const w=k.clientX-E.clientX,C=k.clientY-E.clientY;return Math.sqrt(w*w+C*C)},g=(k,E)=>({x:(k.clientX+E.clientX)/2,y:(k.clientY+E.clientY)/2}),S=k=>{k.touches.length===2&&(h.current=m(k.touches[0],k.touches[1]),b.current=c,f(!0),r==null||r())},y=k=>{if(k.touches.length!==2||!h.current)return;const E=m(k.touches[0],k.touches[1]),w=Math.min(o,Math.max(n,b.current*(E/h.current)));d(w),t==null||t({scale:w,center:g(k.touches[0],k.touches[1])})},v=()=>{u&&(f(!1),a==null||a(c),h.current=null)};return p.addEventListener("touchstart",S,{passive:!0}),p.addEventListener("touchmove",y,{passive:!0}),p.addEventListener("touchend",v,{passive:!0}),p.addEventListener("touchcancel",v,{passive:!0}),()=>{p.removeEventListener("touchstart",S),p.removeEventListener("touchmove",y),p.removeEventListener("touchend",v),p.removeEventListener("touchcancel",v)}},[s,c,u,n,o,t,r,a]),{ref:i,scale:c,isPinching:u}}function Fs(e={}){const{onPan:t,onPanStart:r,onPanEnd:a,enabled:n=!0}=e,o=l.useRef(null),[s,i]=l.useState(!1),[c,d]=l.useState(0),[u,f]=l.useState(0),h=l.useRef(null),b=l.useRef(null);return l.useEffect(()=>{const p=o.current;if(!p||!n)return;const m=y=>{if(y.touches.length!==1)return;const v=y.touches[0],k={x:v.clientX,y:v.clientY,timestamp:Date.now()};h.current=k,b.current=k,i(!0),d(0),f(0),r==null||r()},g=y=>{if(!h.current||!b.current||y.touches.length!==1)return;const v=y.touches[0],k=Date.now(),E={x:v.clientX,y:v.clientY,timestamp:k},w=E.x-h.current.x,C=E.y-h.current.y,A=E.timestamp-b.current.timestamp||1,M=(E.x-b.current.x)/A,I=(E.y-b.current.y)/A;d(w),f(C),t==null||t({deltaX:w,deltaY:C,velocityX:M,velocityY:I}),b.current=E},S=()=>{if(!s||!h.current||!b.current)return;const y=c,v=u,k=b.current.timestamp-h.current.timestamp||1;a==null||a({deltaX:y,deltaY:v,velocityX:y/k,velocityY:v/k}),i(!1),h.current=null,b.current=null};return p.addEventListener("touchstart",m,{passive:!0}),p.addEventListener("touchmove",g,{passive:!0}),p.addEventListener("touchend",S,{passive:!0}),p.addEventListener("touchcancel",S,{passive:!0}),()=>{p.removeEventListener("touchstart",m),p.removeEventListener("touchmove",g),p.removeEventListener("touchend",S),p.removeEventListener("touchcancel",S)}},[n,s,c,u,t,r,a]),{ref:o,isPanning:s,deltaX:c,deltaY:u}}function kr(e){const{onRefresh:t,threshold:r=80,maxPull:a=120,enabled:n=!0}=e,o=l.useRef(null),[s,i]=l.useState(!1),[c,d]=l.useState(!1),[u,f]=l.useState(0),h=l.useRef(null),b=Math.min(1,u/r);return l.useEffect(()=>{const p=o.current;if(!p||!n||c)return;const m=y=>{p.scrollTop>0||y.touches.length===1&&(h.current=y.touches[0].clientY)},g=y=>{if(h.current===null||y.touches.length!==1)return;const k=y.touches[0].clientY-h.current;if(k<=0){f(0),i(!1);return}const w=Math.min(a,k*.5);f(w),i(w>0),w>0&&y.preventDefault()},S=async()=>{if(u>=r&&!c){d(!0),f(r);try{await t()}finally{d(!1),f(0)}}else f(0);i(!1),h.current=null};return p.addEventListener("touchstart",m,{passive:!0}),p.addEventListener("touchmove",g,{passive:!1}),p.addEventListener("touchend",S,{passive:!0}),p.addEventListener("touchcancel",S,{passive:!0}),()=>{p.removeEventListener("touchstart",m),p.removeEventListener("touchmove",g),p.removeEventListener("touchend",S),p.removeEventListener("touchcancel",S)}},[n,c,u,r,a,t]),{ref:o,isPulling:s,isRefreshing:c,pullDistance:u,pullProgress:b}}const Ds=({children:e,leftActions:t=[],rightActions:r=[],actionWidth:a=80,maxSwipe:n=1.5,threshold:o=.5,className:s,style:i})=>{const c=l.useRef(null),d=l.useRef(null),[u,f]=l.useState(0),[h,b]=l.useState(!1),p=l.useRef(0),m=l.useRef(0),g=t.length*a,S=r.length*a,y=g*n,v=S*n,k=l.useCallback(M=>{b(!1),p.current=M.touches[0].clientX,m.current=u},[u]),E=l.useCallback(M=>{const I=M.touches[0].clientX-p.current;let $=m.current+I;$>y?$=y+($-y)*.2:$<-v&&($=-v+($+v)*.2),!($>0&&t.length===0)&&($<0&&r.length===0||f($))},[y,v,t.length,r.length]),w=l.useCallback(()=>{b(!0),u>g*o?f(g):u<-S*o?f(-S):f(0)},[u,g,S,o]),C=l.useCallback(M=>{b(!0),f(0),M.onAction()},[]),A=l.useCallback(()=>{b(!0),f(0)},[]);return x.jsxs("div",{ref:c,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:g},children:t.map(M=>x.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:M.color,border:"none",color:"var(--nice-color-white, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>C(M),children:M.content},M.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(M=>x.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:M.color,border:"none",color:"var(--nice-color-white, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>C(M),children:M.content},M.key))}),x.jsx("div",{role:"presentation",ref:d,className:"nice-swipeable__content",style:{transform:`translateX(${u}px)`,transition:h?"transform 0.3s ease-out":"none",background:"var(--nice-bg-primary, #fff)",position:"relative",zIndex:1},onTouchStart:k,onTouchMove:E,onTouchEnd:w,onClick:u!==0?A:void 0,children:e})]})},Ps=({children:e,onRefresh:t,threshold:r=80,pullingContent:a,refreshingContent:n,enabled:o=!0,className:s,style:i})=>{const{ref:c,isPulling:d,isRefreshing:u,pullDistance:f,pullProgress:h}=kr({onRefresh:t,threshold:r,enabled:o});return x.jsxs("div",{ref:c,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: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(${h>=1?180:0}deg)`,transition:"transform 0.2s ease",opacity:h},children:x.jsx(N.NiceIcon,{name:"arrow-up",size:24})})}),x.jsx("div",{className:"nice-pull-refresh__content",style:{transform:`translateY(${f}px)`,transition:d?"none":"transform 0.2s ease-out"},children:e})]})};function Cr(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 zs(){return l.useCallback((e="light")=>{Cr(e)},[])}const $s=({minSize:e=44,children:t,className:r,style:a,onClick:n})=>x.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onKeyDown:n?N.clickOnActivationKey:void 0,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 Hs(){const[e,t]=l.useState(!1),[r,a]=l.useState(0),n=l.useRef(typeof window<"u"?window.innerHeight:0);return l.useEffect(()=>{if(typeof window>"u")return;if("visualViewport"in window&&window.visualViewport){const s=window.visualViewport,i=()=>{const c=n.current-s.height,d=150;t(c>d),a(c>d?c: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 _s=[],Er={announceChanges:!0,reduceMotion:"auto",highContrast:"auto",focusStyle:"auto",keyboardShortcuts:!0,minTouchTarget:44},Nr=l.createContext(null),Ar=({config:e,children:t})=>{const r=l.useMemo(()=>({...Er,...e}),[e]),a=l.useRef(null),n=l.useRef(null),[o,s]=l.useState(!1);l.useEffect(()=>{const b=window.matchMedia("(prefers-reduced-motion: reduce)");s(b.matches);const p=m=>s(m.matches);return b.addEventListener("change",p),()=>b.removeEventListener("change",p)},[]);const[i,c]=l.useState(!1);l.useEffect(()=>{const b=window.matchMedia("(prefers-contrast: more)");c(b.matches);const p=m=>c(m.matches);return b.addEventListener("change",p),()=>b.removeEventListener("change",p)},[]);const d=r.reduceMotion==="always"?!0:r.reduceMotion==="never"?!1:o,u=r.highContrast==="always"?!0:r.highContrast==="never"?!1:i,f=l.useCallback((b,p="polite")=>{if(!r.announceChanges)return;const m=p==="assertive"?n.current:a.current;m&&(m.textContent="",requestAnimationFrame(()=>{m.textContent=b}))},[r.announceChanges]),h=l.useMemo(()=>({config:r,announce:f,prefersReducedMotion:d,prefersHighContrast:u}),[r,f,d,u]);return x.jsxs(Nr.Provider,{value:h,children:[t,x.jsx("div",{ref:a,role:"status","aria-live":"polite","aria-atomic":"true",style:ot}),x.jsx("div",{ref:n,role:"alert","aria-live":"assertive","aria-atomic":"true",style:ot})]})};process.env.NODE_ENV!=="production"&&(Ar.displayName="NiceA11yProvider");function Os(){const e=l.useContext(Nr);return e||{config:Er,announce:()=>{},prefersReducedMotion:!1,prefersHighContrast:!1}}const ot={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0};function Mr(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function Bs(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":Mr(t,r),"aria-errormessage":t}}function js(e,t){const{direction:r,wrap:a=!0,itemSelector:n='[role="option"], [role="tab"], [role="menuitem"], [role="radio"], button, a, [tabindex]'}=t;N.useRovingFocus(e,{orientation:r,wrap:a,itemSelector:n})}function Ws(e){const t=l.useRef(null);l.useEffect(()=>(e&&(t.current=document.activeElement),()=>{e&&t.current&&typeof t.current.focus=="function"&&t.current.focus()}),[e])}const Tr=({children:e,as:t="span"})=>l.createElement(t,{style:ot},e);process.env.NODE_ENV!=="production"&&(Tr.displayName="NiceVisuallyHidden");const Ir=({targetId:e,children:t})=>{const{t:r}=j.useNiceTranslation();return x.jsx("a",{href:`#${e}`,className:"nice-skip-link",onClick:a=>{a.preventDefault();const n=document.getElementById(e);n&&(n.tabIndex=-1,n.focus())},children:t??r("a11y.skipToMain","Skip to main content")})};process.env.NODE_ENV!=="production"&&(Ir.displayName="NiceSkipLink");const Vs={submit:{intent:"activate",key:"Enter",description:"Submit / Confirm",descriptionKey:"shortcuts.submit"},cancel:{intent:"back",key:"Escape",description:"Cancel / Close",descriptionKey:"shortcuts.cancel"},clear:{key:"Delete",description:"Clear value",descriptionKey:"shortcuts.clear",modifiers:["ctrl"]},moveUp:{intent:"navigate",direction:"up",key:"ArrowUp",description:"Move up",descriptionKey:"shortcuts.moveUp"},moveDown:{intent:"navigate",direction:"down",key:"ArrowDown",description:"Move down",descriptionKey:"shortcuts.moveDown"},moveLeft:{intent:"navigate",direction:"left",key:"ArrowLeft",description:"Move left",descriptionKey:"shortcuts.moveLeft"},moveRight:{intent:"navigate",direction:"right",key:"ArrowRight",description:"Move right",descriptionKey:"shortcuts.moveRight"},first:{intent:"first",key:"Home",description:"Go to first",descriptionKey:"shortcuts.first"},last:{intent:"last",key:"End",description:"Go to last",descriptionKey:"shortcuts.last"},pageUp:{intent:"pagePrev",key:"PageUp",description:"Page up",descriptionKey:"shortcuts.pageUp"},pageDown:{intent:"pageNext",key:"PageDown",description:"Page down",descriptionKey:"shortcuts.pageDown"},selectAll:{key:"A",description:"Select all",descriptionKey:"shortcuts.selectAll",modifiers:["ctrl"]},toggleSelect:{intent:"activate",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:{intent:"activate",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:{intent:"activate",key:"ArrowDown",description:"Open dropdown",descriptionKey:"shortcuts.open"},close:{intent:"back",key:"Escape",description:"Close popup",descriptionKey:"shortcuts.close"},increment:{intent:"navigate",direction:"up",key:"ArrowUp",description:"Increase value",descriptionKey:"shortcuts.increment"},decrement:{intent:"navigate",direction:"down",key:"ArrowDown",description:"Decrease value",descriptionKey:"shortcuts.decrement"},incrementBig:{intent:"sectionNext",key:"PageUp",description:"Increase by 10",descriptionKey:"shortcuts.incrementBig"},decrementBig:{intent:"sectionPrev",key:"PageDown",description:"Decrease by 10",descriptionKey:"shortcuts.decrementBig"}};function Ks(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 Us(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)}function Xs(e){return[...(e.modifiers??[]).map(r=>r.charAt(0).toUpperCase()+r.slice(1)),e.key].join("+")}const Rr=({shortcuts:e=_s,position:t="top",icon:r,size:a="sm",className:n})=>{const{t:o}=j.useNiceTranslation(),s=N.useInputMethod(),i=s==="gamepad"||s==="remote",[c,d]=l.useState(!1),u=l.useRef(null),[f,h]=l.useState({top:0,left:0}),b=l.useCallback(()=>{if(!u.current)return;const g=u.current.getBoundingClientRect(),S=8;let y=0,v=0;switch(t){case"top":y=g.top-S,v=g.left+g.width/2;break;case"bottom":y=g.bottom+S,v=g.left+g.width/2;break;case"left":y=g.top+g.height/2,v=g.left-S;break;case"right":y=g.top+g.height/2,v=g.right+S;break}h({top:y,left:v})},[t]),p=l.useCallback(()=>{b(),d(!0)},[b]),m=l.useCallback(()=>{b(),d(!0)},[b]);return e.length===0?null:x.jsxs(x.Fragment,{children:[x.jsx("button",{ref:u,type:"button",className:`nice-keyboard-hint nice-keyboard-hint--${a} ${n||""}`,onMouseEnter:p,onMouseLeave:()=>d(!1),onFocus:m,onBlur:()=>d(!1),"aria-label":o("a11y.keyboardShortcuts","Keyboard shortcuts"),children:r??x.jsx(N.NiceIcon,{name:"keyboard",size:a==="sm"?14:18})}),c&&x.jsxs("div",{className:`nice-keyboard-hint__tooltip nice-keyboard-hint__tooltip--${t}`,style:{position:"fixed",top:f.top,left:f.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:o("a11y.keyboardShortcuts2","Keyboard Shortcuts")}),x.jsx("ul",{className:"nice-keyboard-hint__list",children:e.map((g,S)=>x.jsxs("li",{className:"nice-keyboard-hint__item",children:[i&&g.intent?x.jsx(N.NiceButtonPrompt,{intent:g.intent,direction:g.direction,size:"sm"}):x.jsx(N.NiceKeyCap,{keys:Xs(g),size:"sm"}),x.jsx("span",{className:"nice-keyboard-hint__desc",children:g.descriptionKey?o(g.descriptionKey,g.description):g.description})]},S))})]})]})};process.env.NODE_ENV!=="production"&&(Rr.displayName="NiceKeyboardHint");function Gs(e={}){const{enabled:t=!1,onSubmit:r,preventDefault:a=!0,requireCtrl:n=!1,skipTextarea:o=!0}=e;return l.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 qs(e={}){const{onClick:t,disabled:r=!1,role:a,tabIndex:n,triggerOnSpace:o=!0,as:s,selected:i}=e,c=a??s??"button",d=l.useCallback(h=>{r||t==null||t(h)},[r,t]),u=l.useCallback(h=>{if(r)return;const b=o&&(h.key===" "||h.key==="Spacebar");(h.key==="Enter"||b)&&(h.preventDefault(),t==null||t(h))},[r,t,o]),f={role:c,tabIndex:n??(r?-1:0),onClick:d,onKeyDown:u};return r&&(f["aria-disabled"]=!0),i!==void 0&&(c==="option"||c==="tab"||c==="row")&&(f["aria-selected"]=i),f}function Ys(e={}){const[t,r]=l.useState(!1),[a,n]=l.useState(""),o=l.useRef(null),s=typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window),i=l.useCallback(b=>{if(!e.commands)return;const p=b.toLowerCase().trim();for(const m of e.commands)if(typeof m.phrase=="string"){if(p===m.phrase.toLowerCase()){m.action([],b);return}}else{const g=b.match(m.phrase);if(g){m.action(Array.from(g),b);return}}},[e.commands]),c=l.useRef(e);c.current=e;const d=l.useRef(i);d.current=i;const u=l.useRef(!1),f=l.useCallback(()=>{if(!s||u.current)return;const b=window.SpeechRecognition??window.webkitSpeechRecognition,p=c.current,m=new b;m.lang=p.language??"en-US",m.continuous=p.continuous??!0,m.interimResults=p.interimResults??!1,m.onresult=g=>{var k,E;const S=g.results[g.results.length-1],y=S[0].transcript,v=S.isFinal;n(y),(E=(k=c.current).onTranscript)==null||E.call(k,y,v),v&&d.current(y)},m.onerror=g=>{var S,y;(y=(S=c.current).onError)==null||y.call(S,g.error),g.error==="not-allowed"&&(u.current=!1,r(!1))},m.onend=()=>{if(u.current&&c.current.continuous)try{m.start()}catch{u.current=!1,r(!1)}else u.current=!1,r(!1)},o.current=m,m.start(),u.current=!0,r(!0)},[s]),h=l.useCallback(()=>{var b;u.current=!1,(b=o.current)==null||b.stop(),o.current=null,r(!1)},[]);return l.useEffect(()=>()=>h(),[h]),{isListening:t,isSupported:s,start:f,stop:h,transcript:a}}function Lr(e={}){const[t,r]=l.useState(""),a=l.useRef(void 0),n=l.useCallback(s=>{r(""),requestAnimationFrame(()=>{r(s),e.clearAfterMs&&(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r(""),e.clearAfterMs))})},[e.clearAfterMs]);l.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 Js(){const{t:e}=j.useNiceTranslation(),{announce:t,regionProps:r,message:a}=Lr({politeness:"assertive",clearAfterMs:3e3});return{announcePageChange:l.useCallback(o=>{t(e("a11y.navigatedTo","Navigated to: {pageTitle}").replace("{pageTitle}",String(o))),typeof document<"u"&&(document.title=o)},[t,e]),regionProps:r,message:a}}function Qs(){const e=l.useRef(null),t=l.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=l.useCallback(n=>{var o,s;(s=(o=e.current)==null?void 0:o.querySelector(n))==null||s.focus()},[]),a=l.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 Wt={simplifiedMode:!1,increasedSpacing:!1,readingGuide:!1,enhancedFocus:!1,reduceMotion:!1,iconLabels:!1,largeTargets:!1,dyslexiaFont:!1,lineSpacing:1.5,wordSpacing:1};function Zs(e=Wt){const[t,r]=l.useState({...Wt,...e}),a=l.useCallback((i,c)=>{r(d=>({...d,[i]:c}))},[]),n=ec(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 ec(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}const Es=/(auto|scroll|overlay)/;function hr(e){var a;const t=((a=e==null?void 0:e.ownerDocument)==null?void 0:a.defaultView)??(typeof window<"u"?window:null);let r=(e==null?void 0:e.parentElement)??null;for(;r&&t;){if(Es.test(t.getComputedStyle(r).overflowY))return r;r=r.parentElement}return t??globalThis}function Ns(e,t){return e==="nearest"?hr(t):(typeof e=="function"?e():e)??(typeof window<"u"?window:globalThis)}const br=e=>e.window===e;function As(e){return br(e)?e.scrollY:e.scrollTop}function Ms(e,t,r=0){const a=t.getBoundingClientRect().top;return br(e)?a+e.scrollY-r:a-e.getBoundingClientRect().top+e.scrollTop-r}function Sr(e="normal"){return typeof e=="number"?e:e==="fast"?120:e==="slow"?300:200}const nt={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:""},vr={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 Ts(e){const{visible:t,animation:r="fade",duration:a="normal",onEntered:n,onExited:o}=e,[s,i]=l.useState(t?"entered":"exited"),[c,d]=l.useState(t),u=l.useRef(void 0),f=Sr(a),h=l.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]),b=h||r==="none"?0:f;l.useEffect(()=>(u.current&&clearTimeout(u.current),t?(d(!0),i("entering"),u.current=setTimeout(()=>{i("entered"),n==null||n()},b)):(i("exiting"),u.current=setTimeout(()=>{i("exited"),d(!1),o==null||o()},b)),()=>{u.current&&clearTimeout(u.current)}),[t,b]);const p=l.useMemo(()=>r==="none"||h?"":s==="entering"?nt[r]:s==="exiting"?vr[r]:s==="entered"?`${nt[r]} nice-anim-active`:"",[r,s,h]),m=l.useMemo(()=>({animationDuration:`${b}ms`,transitionDuration:`${b}ms`}),[b]);return{state:s,shouldRender:c,className:p,style:m}}function Is(e,t){const{expanded:r,duration:a="normal"}=t,[n,o]=l.useState(r?"auto":0),s=Sr(a);return l.useEffect(()=>{const i=e.current;if(i)if(r){const c=i.scrollHeight;o(c);const d=setTimeout(()=>o("auto"),s);return()=>clearTimeout(d)}else{const c=i.scrollHeight;o(c),requestAnimationFrame(()=>{requestAnimationFrame(()=>o(0))})}},[r,s,e]),{overflow:"hidden",height:typeof n=="number"?`${n}px`:n,transition:`height ${s}ms ease`}}function Rs(e,t=50){return`${e*t}ms`}function Ls(e,t){return t==="enter"?nt[e]:vr[e]}const xr=l.createContext({direction:"ltr",isRTL:!1,flip:e=>e,flipStyle:(e,t)=>({[e]:t})}),wr=({direction:e,children:t})=>{const r=l.useMemo(()=>e!=="auto"?e:typeof document<"u"&&document.documentElement.getAttribute("dir")==="rtl"?"rtl":"ltr",[e]),a=r==="rtl";l.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=l.useCallback(i=>a?{left:"right",right:"left",start:"end",end:"start"}[i]??i:i,[a]),o=l.useCallback((i,c)=>a?{[{paddingLeft:"paddingRight",paddingRight:"paddingLeft",marginLeft:"marginRight",marginRight:"marginLeft"}[i]||i]:c}:{[i]:c},[a]),s=l.useMemo(()=>({direction:r,isRTL:a,flip:n,flipStyle:o}),[r,a,n,o]);return x.jsx(xr.Provider,{value:s,children:x.jsx("div",{dir:r,style:{direction:r,display:"contents"},children:t})})};process.env.NODE_ENV!=="production"&&(wr.displayName="NiceRTLProvider");function Fs(){return l.useContext(xr)}const Ds={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"}},kr=l.createContext({permissions:{},getAccessMode:()=>"full"}),Cr=({permissions:e,children:t})=>{const r=l.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(kr.Provider,{value:r,children:t})};process.env.NODE_ENV!=="production"&&(Cr.displayName="NiceAccessControl");function Ps(e,t,r){const a=l.useContext(kr);return e||a.getAccessMode(t,r)}function zs(e){switch(e){case"disabled":return{disabled:!0,"aria-disabled":!0,tabIndex:-1};case"readOnly":return{readOnly:!0};default:return{}}}function $s(e={}){const{threshold:t=50,maxDuration:r=300,onSwipe:a,onSwipeLeft:n,onSwipeRight:o,onSwipeUp:s,onSwipeDown:i,enabled:c=!0}=e,d=l.useRef(null),[u,f]=l.useState(!1),[h,b]=l.useState(null),p=l.useRef(null);return l.useEffect(()=>{const m=d.current;if(!m||!c)return;const g=k=>{if(k.touches.length!==1)return;const E=k.touches[0];p.current={x:E.clientX,y:E.clientY,timestamp:Date.now()},f(!0),b(null)},S=k=>{if(!p.current||k.touches.length!==1)return;const E=k.touches[0],w=E.clientX-p.current.x,C=E.clientY-p.current.y;Math.abs(w)>Math.abs(C)?b(w>0?"right":"left"):b(C>0?"down":"up")},y=k=>{if(!p.current)return;const E=k.changedTouches[0],w={x:E.clientX,y:E.clientY,timestamp:Date.now()},C=w.x-p.current.x,A=w.y-p.current.y,M=w.timestamp-p.current.timestamp,I=Math.sqrt(C*C+A*A),$=I/M;if(f(!1),M<=r&&I>=t){let T;Math.abs(C)>Math.abs(A)?T=C>0?"right":"left":T=A>0?"down":"up";const D={direction:T,distance:I,velocity:$,duration:M};switch(a==null||a(D),T){case"left":n==null||n(D);break;case"right":o==null||o(D);break;case"up":s==null||s(D);break;case"down":i==null||i(D);break}}p.current=null,b(null)},v=()=>{p.current=null,f(!1),b(null)};return m.addEventListener("touchstart",g,{passive:!0}),m.addEventListener("touchmove",S,{passive:!0}),m.addEventListener("touchend",y,{passive:!0}),m.addEventListener("touchcancel",v,{passive:!0}),()=>{m.removeEventListener("touchstart",g),m.removeEventListener("touchmove",S),m.removeEventListener("touchend",y),m.removeEventListener("touchcancel",v)}},[c,t,r,a,n,o,s,i]),{ref:d,isSwiping:u,swipeDirection:h}}function Hs(e={}){const{onPinch:t,onPinchStart:r,onPinchEnd:a,minScale:n=.5,maxScale:o=3,enabled:s=!0}=e,i=l.useRef(null),[c,d]=l.useState(1),[u,f]=l.useState(!1),h=l.useRef(null),b=l.useRef(1);return l.useEffect(()=>{const p=i.current;if(!p||!s)return;const m=(k,E)=>{const w=k.clientX-E.clientX,C=k.clientY-E.clientY;return Math.sqrt(w*w+C*C)},g=(k,E)=>({x:(k.clientX+E.clientX)/2,y:(k.clientY+E.clientY)/2}),S=k=>{k.touches.length===2&&(h.current=m(k.touches[0],k.touches[1]),b.current=c,f(!0),r==null||r())},y=k=>{if(k.touches.length!==2||!h.current)return;const E=m(k.touches[0],k.touches[1]),w=Math.min(o,Math.max(n,b.current*(E/h.current)));d(w),t==null||t({scale:w,center:g(k.touches[0],k.touches[1])})},v=()=>{u&&(f(!1),a==null||a(c),h.current=null)};return p.addEventListener("touchstart",S,{passive:!0}),p.addEventListener("touchmove",y,{passive:!0}),p.addEventListener("touchend",v,{passive:!0}),p.addEventListener("touchcancel",v,{passive:!0}),()=>{p.removeEventListener("touchstart",S),p.removeEventListener("touchmove",y),p.removeEventListener("touchend",v),p.removeEventListener("touchcancel",v)}},[s,c,u,n,o,t,r,a]),{ref:i,scale:c,isPinching:u}}function _s(e={}){const{onPan:t,onPanStart:r,onPanEnd:a,enabled:n=!0}=e,o=l.useRef(null),[s,i]=l.useState(!1),[c,d]=l.useState(0),[u,f]=l.useState(0),h=l.useRef(null),b=l.useRef(null);return l.useEffect(()=>{const p=o.current;if(!p||!n)return;const m=y=>{if(y.touches.length!==1)return;const v=y.touches[0],k={x:v.clientX,y:v.clientY,timestamp:Date.now()};h.current=k,b.current=k,i(!0),d(0),f(0),r==null||r()},g=y=>{if(!h.current||!b.current||y.touches.length!==1)return;const v=y.touches[0],k=Date.now(),E={x:v.clientX,y:v.clientY,timestamp:k},w=E.x-h.current.x,C=E.y-h.current.y,A=E.timestamp-b.current.timestamp||1,M=(E.x-b.current.x)/A,I=(E.y-b.current.y)/A;d(w),f(C),t==null||t({deltaX:w,deltaY:C,velocityX:M,velocityY:I}),b.current=E},S=()=>{if(!s||!h.current||!b.current)return;const y=c,v=u,k=b.current.timestamp-h.current.timestamp||1;a==null||a({deltaX:y,deltaY:v,velocityX:y/k,velocityY:v/k}),i(!1),h.current=null,b.current=null};return p.addEventListener("touchstart",m,{passive:!0}),p.addEventListener("touchmove",g,{passive:!0}),p.addEventListener("touchend",S,{passive:!0}),p.addEventListener("touchcancel",S,{passive:!0}),()=>{p.removeEventListener("touchstart",m),p.removeEventListener("touchmove",g),p.removeEventListener("touchend",S),p.removeEventListener("touchcancel",S)}},[n,s,c,u,t,r,a]),{ref:o,isPanning:s,deltaX:c,deltaY:u}}function Er(e){const{onRefresh:t,threshold:r=80,maxPull:a=120,enabled:n=!0}=e,o=l.useRef(null),[s,i]=l.useState(!1),[c,d]=l.useState(!1),[u,f]=l.useState(0),h=l.useRef(null),b=Math.min(1,u/r);return l.useEffect(()=>{const p=o.current;if(!p||!n||c)return;const m=y=>{p.scrollTop>0||y.touches.length===1&&(h.current=y.touches[0].clientY)},g=y=>{if(h.current===null||y.touches.length!==1)return;const k=y.touches[0].clientY-h.current;if(k<=0){f(0),i(!1);return}const w=Math.min(a,k*.5);f(w),i(w>0),w>0&&y.preventDefault()},S=async()=>{if(u>=r&&!c){d(!0),f(r);try{await t()}finally{d(!1),f(0)}}else f(0);i(!1),h.current=null};return p.addEventListener("touchstart",m,{passive:!0}),p.addEventListener("touchmove",g,{passive:!1}),p.addEventListener("touchend",S,{passive:!0}),p.addEventListener("touchcancel",S,{passive:!0}),()=>{p.removeEventListener("touchstart",m),p.removeEventListener("touchmove",g),p.removeEventListener("touchend",S),p.removeEventListener("touchcancel",S)}},[n,c,u,r,a,t]),{ref:o,isPulling:s,isRefreshing:c,pullDistance:u,pullProgress:b}}const Os=({children:e,leftActions:t=[],rightActions:r=[],actionWidth:a=80,maxSwipe:n=1.5,threshold:o=.5,className:s,style:i})=>{const c=l.useRef(null),d=l.useRef(null),[u,f]=l.useState(0),[h,b]=l.useState(!1),p=l.useRef(0),m=l.useRef(0),g=t.length*a,S=r.length*a,y=g*n,v=S*n,k=l.useCallback(M=>{b(!1),p.current=M.touches[0].clientX,m.current=u},[u]),E=l.useCallback(M=>{const I=M.touches[0].clientX-p.current;let $=m.current+I;$>y?$=y+($-y)*.2:$<-v&&($=-v+($+v)*.2),!($>0&&t.length===0)&&($<0&&r.length===0||f($))},[y,v,t.length,r.length]),w=l.useCallback(()=>{b(!0),u>g*o?f(g):u<-S*o?f(-S):f(0)},[u,g,S,o]),C=l.useCallback(M=>{b(!0),f(0),M.onAction()},[]),A=l.useCallback(()=>{b(!0),f(0)},[]);return x.jsxs("div",{ref:c,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:g},children:t.map(M=>x.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:M.color,border:"none",color:"var(--nice-color-white, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>C(M),children:M.content},M.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(M=>x.jsx("button",{className:"nice-swipeable__action",style:{width:a,background:M.color,border:"none",color:"var(--nice-color-white, #fff)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>C(M),children:M.content},M.key))}),x.jsx("div",{role:"presentation",ref:d,className:"nice-swipeable__content",style:{transform:`translateX(${u}px)`,transition:h?"transform 0.3s ease-out":"none",background:"var(--nice-bg-primary, #fff)",position:"relative",zIndex:1},onTouchStart:k,onTouchMove:E,onTouchEnd:w,onClick:u!==0?A:void 0,children:e})]})},Bs=({children:e,onRefresh:t,threshold:r=80,pullingContent:a,refreshingContent:n,enabled:o=!0,className:s,style:i})=>{const{ref:c,isPulling:d,isRefreshing:u,pullDistance:f,pullProgress:h}=Er({onRefresh:t,threshold:r,enabled:o});return x.jsxs("div",{ref:c,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: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(${h>=1?180:0}deg)`,transition:"transform 0.2s ease",opacity:h},children:x.jsx(N.NiceIcon,{name:"arrow-up",size:24})})}),x.jsx("div",{className:"nice-pull-refresh__content",style:{transform:`translateY(${f}px)`,transition:d?"none":"transform 0.2s ease-out"},children:e})]})};function Nr(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 l.useCallback((e="light")=>{Nr(e)},[])}const Ws=({minSize:e=44,children:t,className:r,style:a,onClick:n})=>x.jsx("div",{role:n?"button":void 0,tabIndex:n?0:void 0,onKeyDown:n?N.clickOnActivationKey:void 0,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 Vs(){const[e,t]=l.useState(!1),[r,a]=l.useState(0),n=l.useRef(typeof window<"u"?window.innerHeight:0);return l.useEffect(()=>{if(typeof window>"u")return;if("visualViewport"in window&&window.visualViewport){const s=window.visualViewport,i=()=>{const c=n.current-s.height,d=150;t(c>d),a(c>d?c: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 Ks=[],Ar={announceChanges:!0,reduceMotion:"auto",highContrast:"auto",focusStyle:"auto",keyboardShortcuts:!0,minTouchTarget:44},Mr=l.createContext(null),Tr=({config:e,children:t})=>{const r=l.useMemo(()=>({...Ar,...e}),[e]),a=l.useRef(null),n=l.useRef(null),[o,s]=l.useState(!1);l.useEffect(()=>{const b=window.matchMedia("(prefers-reduced-motion: reduce)");s(b.matches);const p=m=>s(m.matches);return b.addEventListener("change",p),()=>b.removeEventListener("change",p)},[]);const[i,c]=l.useState(!1);l.useEffect(()=>{const b=window.matchMedia("(prefers-contrast: more)");c(b.matches);const p=m=>c(m.matches);return b.addEventListener("change",p),()=>b.removeEventListener("change",p)},[]);const d=r.reduceMotion==="always"?!0:r.reduceMotion==="never"?!1:o,u=r.highContrast==="always"?!0:r.highContrast==="never"?!1:i,f=l.useCallback((b,p="polite")=>{if(!r.announceChanges)return;const m=p==="assertive"?n.current:a.current;m&&(m.textContent="",requestAnimationFrame(()=>{m.textContent=b}))},[r.announceChanges]),h=l.useMemo(()=>({config:r,announce:f,prefersReducedMotion:d,prefersHighContrast:u}),[r,f,d,u]);return x.jsxs(Mr.Provider,{value:h,children:[t,x.jsx("div",{ref:a,role:"status","aria-live":"polite","aria-atomic":"true",style:ot}),x.jsx("div",{ref:n,role:"alert","aria-live":"assertive","aria-atomic":"true",style:ot})]})};process.env.NODE_ENV!=="production"&&(Tr.displayName="NiceA11yProvider");function Us(){const e=l.useContext(Mr);return e||{config:Ar,announce:()=>{},prefersReducedMotion:!1,prefersHighContrast:!1}}const ot={position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"nowrap",border:0};function Ir(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function Xs(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":Ir(t,r),"aria-errormessage":t}}function Gs(e,t){const{direction:r,wrap:a=!0,itemSelector:n='[role="option"], [role="tab"], [role="menuitem"], [role="radio"], button, a, [tabindex]'}=t;N.useRovingFocus(e,{orientation:r,wrap:a,itemSelector:n})}function qs(e){const t=l.useRef(null);l.useEffect(()=>(e&&(t.current=document.activeElement),()=>{e&&t.current&&typeof t.current.focus=="function"&&t.current.focus()}),[e])}const Rr=({children:e,as:t="span"})=>l.createElement(t,{style:ot},e);process.env.NODE_ENV!=="production"&&(Rr.displayName="NiceVisuallyHidden");const Lr=({targetId:e,children:t})=>{const{t:r}=j.useNiceTranslation();return x.jsx("a",{href:`#${e}`,className:"nice-skip-link",onClick:a=>{a.preventDefault();const n=document.getElementById(e);n&&(n.tabIndex=-1,n.focus())},children:t??r("a11y.skipToMain","Skip to main content")})};process.env.NODE_ENV!=="production"&&(Lr.displayName="NiceSkipLink");const Ys={submit:{intent:"activate",key:"Enter",description:"Submit / Confirm",descriptionKey:"shortcuts.submit"},cancel:{intent:"back",key:"Escape",description:"Cancel / Close",descriptionKey:"shortcuts.cancel"},clear:{key:"Delete",description:"Clear value",descriptionKey:"shortcuts.clear",modifiers:["ctrl"]},moveUp:{intent:"navigate",direction:"up",key:"ArrowUp",description:"Move up",descriptionKey:"shortcuts.moveUp"},moveDown:{intent:"navigate",direction:"down",key:"ArrowDown",description:"Move down",descriptionKey:"shortcuts.moveDown"},moveLeft:{intent:"navigate",direction:"left",key:"ArrowLeft",description:"Move left",descriptionKey:"shortcuts.moveLeft"},moveRight:{intent:"navigate",direction:"right",key:"ArrowRight",description:"Move right",descriptionKey:"shortcuts.moveRight"},first:{intent:"first",key:"Home",description:"Go to first",descriptionKey:"shortcuts.first"},last:{intent:"last",key:"End",description:"Go to last",descriptionKey:"shortcuts.last"},pageUp:{intent:"pagePrev",key:"PageUp",description:"Page up",descriptionKey:"shortcuts.pageUp"},pageDown:{intent:"pageNext",key:"PageDown",description:"Page down",descriptionKey:"shortcuts.pageDown"},selectAll:{key:"A",description:"Select all",descriptionKey:"shortcuts.selectAll",modifiers:["ctrl"]},toggleSelect:{intent:"activate",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:{intent:"activate",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:{intent:"activate",key:"ArrowDown",description:"Open dropdown",descriptionKey:"shortcuts.open"},close:{intent:"back",key:"Escape",description:"Close popup",descriptionKey:"shortcuts.close"},increment:{intent:"navigate",direction:"up",key:"ArrowUp",description:"Increase value",descriptionKey:"shortcuts.increment"},decrement:{intent:"navigate",direction:"down",key:"ArrowDown",description:"Decrease value",descriptionKey:"shortcuts.decrement"},incrementBig:{intent:"sectionNext",key:"PageUp",description:"Increase by 10",descriptionKey:"shortcuts.incrementBig"},decrementBig:{intent:"sectionPrev",key:"PageDown",description:"Decrease by 10",descriptionKey:"shortcuts.decrementBig"}};function Js(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 Qs(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)}function Zs(e){return[...(e.modifiers??[]).map(r=>r.charAt(0).toUpperCase()+r.slice(1)),e.key].join("+")}const Fr=({shortcuts:e=Ks,position:t="top",icon:r,size:a="sm",className:n})=>{const{t:o}=j.useNiceTranslation(),s=N.useInputMethod(),i=s==="gamepad"||s==="remote",[c,d]=l.useState(!1),u=l.useRef(null),[f,h]=l.useState({top:0,left:0}),b=l.useCallback(()=>{if(!u.current)return;const g=u.current.getBoundingClientRect(),S=8;let y=0,v=0;switch(t){case"top":y=g.top-S,v=g.left+g.width/2;break;case"bottom":y=g.bottom+S,v=g.left+g.width/2;break;case"left":y=g.top+g.height/2,v=g.left-S;break;case"right":y=g.top+g.height/2,v=g.right+S;break}h({top:y,left:v})},[t]),p=l.useCallback(()=>{b(),d(!0)},[b]),m=l.useCallback(()=>{b(),d(!0)},[b]);return e.length===0?null:x.jsxs(x.Fragment,{children:[x.jsx("button",{ref:u,type:"button",className:`nice-keyboard-hint nice-keyboard-hint--${a} ${n||""}`,onMouseEnter:p,onMouseLeave:()=>d(!1),onFocus:m,onBlur:()=>d(!1),"aria-label":o("a11y.keyboardShortcuts","Keyboard shortcuts"),children:r??x.jsx(N.NiceIcon,{name:"keyboard",size:a==="sm"?14:18})}),c&&x.jsxs("div",{className:`nice-keyboard-hint__tooltip nice-keyboard-hint__tooltip--${t}`,style:{position:"fixed",top:f.top,left:f.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:o("a11y.keyboardShortcuts2","Keyboard Shortcuts")}),x.jsx("ul",{className:"nice-keyboard-hint__list",children:e.map((g,S)=>x.jsxs("li",{className:"nice-keyboard-hint__item",children:[i&&g.intent?x.jsx(N.NiceButtonPrompt,{intent:g.intent,direction:g.direction,size:"sm"}):x.jsx(N.NiceKeyCap,{keys:Zs(g),size:"sm"}),x.jsx("span",{className:"nice-keyboard-hint__desc",children:g.descriptionKey?o(g.descriptionKey,g.description):g.description})]},S))})]})]})};process.env.NODE_ENV!=="production"&&(Fr.displayName="NiceKeyboardHint");function ec(e={}){const{enabled:t=!1,onSubmit:r,preventDefault:a=!0,requireCtrl:n=!1,skipTextarea:o=!0}=e;return l.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 tc(e={}){const{onClick:t,disabled:r=!1,role:a,tabIndex:n,triggerOnSpace:o=!0,as:s,selected:i}=e,c=a??s??"button",d=l.useCallback(h=>{r||t==null||t(h)},[r,t]),u=l.useCallback(h=>{if(r)return;const b=o&&(h.key===" "||h.key==="Spacebar");(h.key==="Enter"||b)&&(h.preventDefault(),t==null||t(h))},[r,t,o]),f={role:c,tabIndex:n??(r?-1:0),onClick:d,onKeyDown:u};return r&&(f["aria-disabled"]=!0),i!==void 0&&(c==="option"||c==="tab"||c==="row")&&(f["aria-selected"]=i),f}function rc(e={}){const[t,r]=l.useState(!1),[a,n]=l.useState(""),o=l.useRef(null),s=typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window),i=l.useCallback(b=>{if(!e.commands)return;const p=b.toLowerCase().trim();for(const m of e.commands)if(typeof m.phrase=="string"){if(p===m.phrase.toLowerCase()){m.action([],b);return}}else{const g=b.match(m.phrase);if(g){m.action(Array.from(g),b);return}}},[e.commands]),c=l.useRef(e);c.current=e;const d=l.useRef(i);d.current=i;const u=l.useRef(!1),f=l.useCallback(()=>{if(!s||u.current)return;const b=window.SpeechRecognition??window.webkitSpeechRecognition,p=c.current,m=new b;m.lang=p.language??"en-US",m.continuous=p.continuous??!0,m.interimResults=p.interimResults??!1,m.onresult=g=>{var k,E;const S=g.results[g.results.length-1],y=S[0].transcript,v=S.isFinal;n(y),(E=(k=c.current).onTranscript)==null||E.call(k,y,v),v&&d.current(y)},m.onerror=g=>{var S,y;(y=(S=c.current).onError)==null||y.call(S,g.error),g.error==="not-allowed"&&(u.current=!1,r(!1))},m.onend=()=>{if(u.current&&c.current.continuous)try{m.start()}catch{u.current=!1,r(!1)}else u.current=!1,r(!1)},o.current=m,m.start(),u.current=!0,r(!0)},[s]),h=l.useCallback(()=>{var b;u.current=!1,(b=o.current)==null||b.stop(),o.current=null,r(!1)},[]);return l.useEffect(()=>()=>h(),[h]),{isListening:t,isSupported:s,start:f,stop:h,transcript:a}}function Dr(e={}){const[t,r]=l.useState(""),a=l.useRef(void 0),n=l.useCallback(s=>{r(""),requestAnimationFrame(()=>{r(s),e.clearAfterMs&&(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r(""),e.clearAfterMs))})},[e.clearAfterMs]);l.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 ac(){const{t:e}=j.useNiceTranslation(),{announce:t,regionProps:r,message:a}=Dr({politeness:"assertive",clearAfterMs:3e3});return{announcePageChange:l.useCallback(o=>{t(e("a11y.navigatedTo","Navigated to: {pageTitle}").replace("{pageTitle}",String(o))),typeof document<"u"&&(document.title=o)},[t,e]),regionProps:r,message:a}}function nc(){const e=l.useRef(null),t=l.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=l.useCallback(n=>{var o,s;(s=(o=e.current)==null?void 0:o.querySelector(n))==null||s.focus()},[]),a=l.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 Wt={simplifiedMode:!1,increasedSpacing:!1,readingGuide:!1,enhancedFocus:!1,reduceMotion:!1,iconLabels:!1,largeTargets:!1,dyslexiaFont:!1,lineSpacing:1.5,wordSpacing:1};function oc(e=Wt){const[t,r]=l.useState({...Wt,...e}),a=l.useCallback((i,c)=>{r(d=>({...d,[i]:c}))},[]),n=ic(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 ic(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; }
@@ -35,9 +35,9 @@
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 tc(e,t,r=!1){const a=Kt(Vt(e)),n=Kt(Vt(t)),o=ac(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 rc(){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 Vt(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 Kt([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 ac(e,t){const r=Math.max(e,t),a=Math.min(e,t);return(r+.05)/(a+.05)}const nc=["none","protanopia","protanomaly","deuteranopia","deuteranomaly","tritanopia","tritanomaly","achromatopsia","achromatomaly"],Ut="nice2dev-color-blind-filters",Xt="nice2dev-color-blind-styles",it={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 oc(){if(typeof document>"u"||document.getElementById(Ut))return;const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.id=Ut,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(it)){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(it).map(n=>`.nice-color-blind-${n}{filter:url(#nice-cb-${n})!important;}`).join(""),document.head.appendChild(a)}}function bt(e){for(const t of Object.keys(it))e.classList.remove(`nice-color-blind-${t}`)}function St(e,t=typeof document<"u"?document.documentElement:null){t&&(oc(),bt(t),e!=="none"&&t.classList.add(`nice-color-blind-${e}`))}function Fr(e,t={}){const{target:r}=t,a=l.useRef(null);l.useEffect(()=>{const n=r??(typeof document<"u"?document.documentElement:null);return a.current=n,St(e,n),()=>{const o=a.current;o&&bt(o)}},[e,r])}function ic(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 sc(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 cc(e={}){const{storageKey:t="nice2dev.a11y.cvd",storage:r="localStorage",defaultMode:a="none",target:n,cookieMaxAgeSeconds:o=3600*24*60}=e,s=l.useCallback(b=>{if(typeof window>"u"||r==="cookie")return()=>{};const p=m=>{m.key===t&&b()};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[r,t]),i=l.useCallback(()=>ic(t,r)??a,[r,t,a]),c=l.useCallback(()=>a,[a]),d=l.useSyncExternalStore(s,i,c),[u,f]=l.useState(d);l.useEffect(()=>{d!==u&&f(d)},[d]),Fr(u,{target:n});const h=l.useCallback(b=>{f(b),sc(t,b,r,o)},[r,t,o]);return[u,h]}function lc(e=typeof document<"u"?document.documentElement:null){return{set:t=>St(t,e),clear:()=>{e&&bt(e)}}}function Dr(e,t){var s;if(typeof document>"u"||typeof getComputedStyle>"u")return Pr(e);const r=e.trim().match(/^var\(\s*([^,\s)]+)\s*(?:,\s*(.+))?\)$/);if(!r)return e;const a=typeof Element<"u"&&t instanceof Element&&t.isConnected?t:document.documentElement,n=getComputedStyle(a).getPropertyValue(r[1]).trim();if(n)return n;const o=(s=r[2])==null?void 0:s.trim();return o?Dr(o,t):e}function Pr(e){const t=e.trim().match(/^var\(\s*[^,\s)]+\s*(?:,\s*(.+))?\)$/);return t!=null&&t[1]?Pr(t[1]):e}function dc(){const e=globalThis.crypto;if(typeof(e==null?void 0:e.randomUUID)=="function")return e.randomUUID();const t=new Uint8Array(16);if(typeof(e==null?void 0:e.getRandomValues)=="function")e.getRandomValues(t);else for(let a=0;a<t.length;a++)t[a]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;const r=Array.from(t,a=>a.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}const uc=e=>[...e],fc=()=>{const e=new Map;return{getItem:t=>Promise.resolve(e.get(t)),setItem:(t,r)=>(e.set(t,r),Promise.resolve())}};function mc(e={}){var h,b;const t=e.permissionPolicy??uc,r=e.storage;let a;r&&typeof r.getItem=="function"&&typeof r.setItem=="function"?a={getItem:r.getItem,setItem:r.setItem}:a=fc();const n=(h=e.permissions)==null?void 0:h.canActivate,o={user:(b=e.permissions)==null?void 0:b.user},s=e.logger,i=new Map,c=new Map,d=new Map,u=(p,m)=>{const g=d.get(p);if(g)for(const S of g)try{S(m)}catch{}},f=(p,m,g)=>{const S=new Set(m);return{permissions:S,log:(y,...v)=>{s&&s(p.id,y,v)},on:(y,v)=>{let k=c.get(y);k||(k=new Set,c.set(y,k)),k.add(v);const E=()=>{k.delete(v)};return g.push(E),E},emit:(y,v)=>{if(!S.has("events:emit"))return;const k=c.get(y);if(k)for(const E of k)try{E(v)}catch{}},setItem:async(y,v)=>{S.has("storage:write")&&await a.setItem(`${p.id}:${y}`,v)},getItem:async y=>{if(S.has("storage:read"))return await a.getItem(`${p.id}:${y}`)}}};return{register(p){const m=p.manifest.id;if(i.has(m))throw new Error(`Plugin "${m}" already registered`);const g={manifest:p.manifest,status:"registered"};return i.set(m,{plugin:p,record:g,cleanups:[]}),u("register",g),g},unregister(p){return i.get(p)?(i.delete(p),!0):!1},async activate(p){const m=i.get(p);if(!m)throw new Error(`Unknown plugin "${p}"`);if(m.record.status==="active")return m.record;for(const g of m.plugin.manifest.dependsOn??[]){const S=i.get(g);if(!S)throw m.record.status="error",m.record.error=`Missing dependency: ${g}`,u("error",m.record),new Error(m.record.error);S.record.status!=="active"&&await this.activate(g)}m.record.status="activating";try{if(n&&!n(m.plugin.manifest,o))throw m.record.status="error",m.record.error="permission-denied",u("error",m.record),new Error(m.record.error);const g=t(m.plugin.manifest.permissions??[],m.plugin.manifest),S=f(m.plugin.manifest,g,m.cleanups);await m.plugin.activate(S),m.record.status="active",m.record.activatedAt=Date.now(),m.record.error=void 0,u("activate",m.record)}catch(g){throw m.record.status="error",m.record.error=g instanceof Error?g.message:String(g),u("error",m.record),g}return m.record},async deactivate(p){var g,S;const m=i.get(p);if(!m)throw new Error(`Unknown plugin "${p}"`);if(m.record.status!=="active")return m.record;m.record.status="deactivating";try{await((S=(g=m.plugin).deactivate)==null?void 0:S.call(g));for(const y of m.cleanups.splice(0))await y();m.record.status="inactive",u("deactivate",m.record)}catch(y){throw m.record.status="error",m.record.error=y instanceof Error?y.message:String(y),u("error",m.record),y}return m.record},list(){return[...i.values()].map(p=>({...p.record}))},get(p){const m=i.get(p);return m?{...m.record}:void 0},on(p,m){let g=d.get(p);return g||(g=new Set,d.set(p,g)),g.add(m),()=>{g.delete(m)}},events:{on(p,m){const S={"plugin:registered":"register","plugin:activated":"activate","plugin:deactivated":"deactivate","plugin:error":"error"}[p];let y=d.get(S);return y||(y=new Set,d.set(S,y)),y.add(m),()=>{y.delete(m)}},emit(p,m){const g=c.get(p);if(g)for(const S of g)try{S(m)}catch{}}}}}const zr={"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","text.onSuccess":"--text-on-success","text.onError":"--text-on-error","text.onInfo":"--text-on-info","text.onWarning":"--text-on-warning","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 pc(e,t){return t.split(".").reduce((r,a)=>{if(r&&typeof r=="object")return r[a]},e)}function $r(e){return e.startsWith("--nice-")?null:`--nice-${e.slice(2)}`}function He(e){var r;const t={};for(const[a,n]of Object.entries(zr)){const o=pc(e,a);if(o!==void 0){t[n]=String(o);const s=$r(n);s&&(t[s]=String(o))}}if(e.nesting)for(const a of["sidebar","menu","tree"]){const n=e.nesting[a];if(!n)continue;const o=e.backgrounds.secondary||e.backgrounds.primary||"#ffffff",s=((r=e.text)==null?void 0:r.primary)||"#111111";Object.assign(t,Ac(a,n,o,s))}return t}function gc(e,t){const r=t??document.documentElement,a=He(e);for(const[n,o]of Object.entries(a))r.style.setProperty(n,o);hc(e.backgroundImage,r),e.darkMode&&(r.dataset.ntdColorScheme=e.darkMode)}const yc={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 hc(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=yc[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 Hr(e){const t=e??document.documentElement;for(const r of Object.values(zr)){t.style.removeProperty(r);const a=$r(r);a&&t.style.removeProperty(a)}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");for(const r of["sidebar","menu","tree"]){t.style.removeProperty(`--nice-${r}-levels`);for(let a=1;a<=10;a++)t.style.removeProperty(`--nice-${r}-level-${a}-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-text`),t.style.removeProperty(`--nice-${r}-level-${a}-hover-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-active-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-border`)}}function bc(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"),onSuccess:o("--text-on-success"),onError:o("--text-on-error"),onInfo:o("--text-on-info"),onWarning:o("--text-on-warning")},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 Sc(e){return JSON.stringify(e,null,2)}function vc(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 xc=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,wc=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;function ce(e){if(!e)return null;const t=e.trim();let r=t.match(wc);if(r)return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)};if(r=t.match(xc),r)return{r:parseInt(r[1]+r[1],16),g:parseInt(r[2]+r[2],16),b:parseInt(r[3]+r[3],16)};const a=t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);return a?{r:+a[1],g:+a[2],b:+a[3]}:null}function kc({r:e,g:t,b:r}){const a=n=>Math.max(0,Math.min(255,Math.round(n))).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(r)}`}function vt(e,t,r){const a=ce(e),n=ce(t);return!a||!n?e:kc({r:a.r+(n.r-a.r)*r,g:a.g+(n.g-a.g)*r,b:a.b+(n.b-a.b)*r})}function st(e,t){return vt(e,"#ffffff",t)}function ct(e,t){return vt(e,"#000000",t)}function Se(e){const t=ce(e);if(!t)return 1;const r=a=>{const n=a/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)};return .2126*r(t.r)+.7152*r(t.g)+.0722*r(t.b)}function Gt(e,t){return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}function Cc(e,t,r){if(!ce(e))return r;const a=Se(e),n=ce(t)?Se(t):1,o=ce(r)?Se(r):0;return Gt(a,n)>=Gt(a,o)?t:r}function Ec(e,t,r){const a=t.palette??[],n=t.bgStep??.06,o=a[0]??r;switch(t.bgDerivation??"tint"){case"palette":return a.length===0?r:a[(e-1)%a.length];case"shade":return ct(o,Math.min(.9,n*(e-1)));case"mix-surface":return vt(o,r,Math.min(1,n*(e-1)));case"tint":default:return st(o,Math.min(.9,n*(e-1)))}}function Nc(e){return ce(e)!=null}function _r(e,t,r,a){var o;const n=[];for(let s=1;s<=e;s++){const i=(o=t.overrides)==null?void 0:o[s],c=(i==null?void 0:i.background)??Ec(s,t,r);n.push({bg:c,text:(i==null?void 0:i.text)??Cc(c,"#ffffff",a),hoverBg:(i==null?void 0:i.hoverBackground)??(Se(c)>.5?ct(c,.06):st(c,.08)),activeBg:(i==null?void 0:i.activeBackground)??(Se(c)>.5?ct(c,.12):st(c,.16)),border:i==null?void 0:i.border})}return n}function Ac(e,t,r,a){const n={},o=Math.max(1,Math.min(10,t.levels??5));return _r(o,t,r,a).forEach((s,i)=>{const c=i+1;n[`--nice-${e}-level-${c}-bg`]=s.bg,n[`--nice-${e}-level-${c}-text`]=s.text,n[`--nice-${e}-level-${c}-hover-bg`]=s.hoverBg,n[`--nice-${e}-level-${c}-active-bg`]=s.activeBg,s.border&&(n[`--nice-${e}-level-${c}-border`]=s.border)}),n[`--nice-${e}-levels`]=String(o),n}const xt=l.createContext(null);function Mc(){const e=l.useContext(xt);if(!e)throw new Error("useNiceTheme must be used within a NiceThemeProvider");return e}const Ee={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Ne={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},Ae={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},wt=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)"},Tc={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 R(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:wt(n),shadows:Or,spacing:Ee,typography:Ne,transitions:Ae}}function W(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:wt(n),shadows:Tc,spacing:Ee,typography:Ne,transitions:Ae}}const Br=R("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"),jr=R("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=R("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=R("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"),Kr=R("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"),Ur=R("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"),Xr=R("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=R("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"),qr=R("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"),Yr=R("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"),Jr=R("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=R("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=R("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=R("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=R("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=R("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=R("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=R("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"),oa=R("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"),ia=R("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"),sa=R("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=R("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=W("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=W("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=W("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=W("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=W("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=W("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",onPrimary:"#ffffff"},"#374151"),ga=W("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=W("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=W("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=W("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=R("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"),va=R("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"),xa=R("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=R("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=R("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=R("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"),Ea=R("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"),Na=R("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"),Aa=R("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"),Ma=R("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=R("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"),Ia=R("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"),Ra=R("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"),La=R("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"),Fa=R("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"),Da=R("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=R("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"),za=R("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"),$a=R("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"),Ha=R("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"),_a=R("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=R("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=R("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"),ja=R("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=R("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=R("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"),Ka=R("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"),Ua=W("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"),Xa=R("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=W("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",onError:"#ffffff"},"#073642"),qa=W("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"),Ya=W("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"),Ja=W("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=R("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=W("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=R("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=R("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=W("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",onInfo:"#ffffff"},"#1c3a44"),an=W("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=W("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"),on=R("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"),sn=W("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",onInfo:"#ffffff"},"#5c3400"),cn=R("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=R("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=R("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=R("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=R("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=R("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=R("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=R("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=R("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=R("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=R("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=R("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"),vn=R("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"),xn=R("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=W("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=R("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=R("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"),En={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:wt("#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:Ae},Nn={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:Ee,typography:Ne,transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},An={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:Ee,typography:Ne,transitions:Ae},Mn={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:Ee,typography:Ne,transitions:Ae},Tn=R("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"),In=W("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"),Rn=W("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"),Ln=R("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"),Fn=R("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"),Dn=[Br,jr,Wr,Vr,Kr,Ur,Xr,Gr,qr,Yr,Jr,Qr,Zr,ea,ta,ra,aa,na,oa,ia,sa,ca,la,da,ua,fa,ma,pa,ga,ya,ha,ba,Sa,va,xa,wa,ka,Ca,Ea,Na,Aa,Ma,Ta,Ia,Ra,La,Fa,Da,Pa,za,$a,Ha,_a,Oa,Ba,ja,Wa,Va,Ka,Ua,Xa,Ga,qa,Ya,Ja,Qa,Za,en,tn,rn,an,nn,on,sn,cn,ln,dn,un,fn,mn,pn,gn,yn,hn,bn,Sn,vn,xn,wn,kn,Cn,En,Nn,An,Mn,Tn,In,Rn,Ln,Fn],le={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Ve={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},Me={color:"#e2e8f0",radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},Te={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},kt={name:"Light",darkMode:"light",colors:{primary:"#2563eb",primaryHover:"#1d4ed8",success:"#047857",warning:"#f59e0b",error:"#dc2626",info:"#0e7490",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:"#64748b",inverse:"#ffffff"},borders:Me,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:le,typography:Ve,transitions:Te},Pn=(function(){return{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:"#858585",inverse:"#0f172a"},borders:{...Me,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:le,typography:Ve,transitions:Te}})(),zn=(function(){return{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:{...Me,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:le,typography:Ve,transitions:Te}})(),$n=(function(){return{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:{...Me,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:le,typography:Ve,transitions:Te}})(),Hn=(function(){return{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:{...Me,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:le,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)"}}})(),_n={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:le,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:Te},On={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:le,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)"}},lt=(function(){return[kt,Pn,zn,$n,Hn,_n,On,...Dn]})(),Ic=["primary","primary-hover","primary-light","primary-bg","success","warning","error","info","accent","surface","surface-hover"];function Rc(e,t){return e??t.recommendedDisplayStyle??"default"}function qt(e){return e.toLowerCase().replace(/[\s_-]+/g,"")}function Yt(e){if(e&&typeof e=="object")return e;if(typeof e=="string"){const t=qt(e),r=lt.find(a=>qt(a.name)===t);if(r)return r;process.env.NODE_ENV!=="production"&&console.warn(`[@nice2dev/ui] <NiceThemeProvider theme="${e}"> — unknown preset name. Falling back to 'Light'. Available: ${lt.map(a=>a.name).join(", ")}.`)}return kt}const Ct=({theme:e,darkTheme:t,variantConfig:r,darkMode:a,displayStyle:n,animateTransitions:o=!0,children:s})=>{const i=l.useMemo(()=>Yt(e),[e]),c=l.useMemo(()=>t===void 0?void 0:Yt(t),[t]),d=l.useId(),u=l.useMemo(()=>`p${d.replace(/:/g,"")}`,[d]),f=l.useRef(null),h=l.useRef(null),[b,p]=l.useState(null),[m,g]=l.useState(i),[S,y]=l.useState(!1),[v,k]=l.useState(()=>Rc(n,i));l.useEffect(()=>{n!==void 0?k(n):i.recommendedDisplayStyle&&k(i.recommendedDisplayStyle)},[n,i.recommendedDisplayStyle]),l.useEffect(()=>{const T=window.matchMedia("(prefers-color-scheme: dark)");y(T.matches);const D=F=>y(F.matches);return T.addEventListener("change",D),()=>T.removeEventListener("change",D)},[]);const E=a??i.darkMode??"light",w=E==="dark"||E==="auto"&&S;l.useEffect(()=>{g(w&&c?c:i)},[i,c,w]),l.useEffect(()=>{if(typeof document>"u")return;const T=document.createElement("div");return T.className="nice-theme-scope nice-theme-portal-host",T.dataset.ntdProvider=u,T.style.display="contents",document.body.appendChild(T),h.current=T,p(T),()=>{T.parentNode&&T.parentNode.removeChild(T),h.current=null,p(null)}},[u]),l.useEffect(()=>{const T=f.current;if(!T)return;o&&(T.style.transition="background-color 300ms ease, color 300ms ease");const D=He(m);for(const[L,O]of Object.entries(D))T.style.setProperty(L,O);const F=h.current;if(F)for(const[L,O]of Object.entries(D))F.style.setProperty(L,O);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"),F&&(F.style.colorScheme=w?"dark":"light",F.dataset.ntdColorScheme=w?"dark":"light",F.dataset.theme=w?"dark":"light",w?F.classList.add("nice-dark"):F.classList.remove("nice-dark"));const P=m.backgroundImage;return P&&P.type!=="none"&&P.type==="gradient"&&P.gradient&&T.style.setProperty("--ntd-bg-image",P.gradient),()=>{T&&Hr(T)}},[m,w,o,b]);const C=l.useRef(new Set);l.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof window>"u"||typeof document>"u")return;const T=window.setTimeout(()=>{const D=He(m),F=["--color-primary","--nice-primary","--bg-primary","--text-primary"].find(V=>D[V])??Object.keys(D)[0];if(!F)return;const P=String(D[F]??"").trim();if(!P)return;const L=getComputedStyle(document.documentElement).getPropertyValue(F).trim();if(!L||L===P)return;const O=`${u}::${m.name??"unnamed"}::${F}`;C.current.has(O)||(C.current.add(O),console.warn(`[NiceThemeProvider] CSS var "${F}" on documentElement (${L}) does not match the active provider pack "${m.name??"unnamed"}" (${P}). 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(T)},[m,u]);const A=l.useRef(!1);l.useEffect(()=>{if(process.env.NODE_ENV==="production"||A.current||typeof window>"u"||typeof document>"u")return;const T=window.setTimeout(()=>{const D=getComputedStyle(document.documentElement);if(!D.getPropertyValue("--nice-overlay-8").trim())return;const F=Ic.filter(P=>!D.getPropertyValue(`--nice-${P}`).trim()&&!D.getPropertyValue(`--nice-color-${P}`).trim());F.length!==0&&(A.current=!0,console.warn(`[NiceThemeProvider] ${F.map(P=>`--nice-${P} / --nice-color-${P}`).join(", ")} resolve to nothing on :root, so dropdowns, dialogs and anything else outside this provider fall back to their built-in colours. Usually an alias cycle in your CSS: the stylesheet already points each --nice-<name> at --nice-color-<name>, so declaring --nice-color-<name> in terms of --nice-<name> closes a loop. Set the --nice-color-* tokens to real values (or use the theme) instead.`))},0);return()=>window.clearTimeout(T)},[m]),l.useEffect(()=>{const T=f.current;if(!T)return;const D=r?{...Y,...r}:xe(v);ht(D,T,u);const F=gr(v);for(const[P,L]of Object.entries(F))T.setAttribute(P,L);return()=>{mr(u,T)}},[r,v,u]);const M=l.useCallback(T=>{g(T)},[]),I=l.useMemo(()=>({theme:m,setTheme:M,portalTarget:b}),[m,M,b]),$=l.useMemo(()=>({displayStyle:v,variantConfig:xe(v),setDisplayStyle:k}),[v]);return x.jsx(xt.Provider,{value:I,children:x.jsx(We.Provider,{value:$,children:x.jsx("div",{ref:f,className:"nice-theme-scope","data-ntd-provider":u,style:{display:"contents"},children:s})})})};process.env.NODE_ENV!=="production"&&(Ct.displayName="NiceThemeProvider");function Lc(...e){return e.join("-")}const Fc={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"},Bn=({children:e,theme:t,direction:r="ltr",t:a})=>{let n=l.createElement("div",{dir:r,"data-testid":"nice-test-root",style:{direction:r}},e);return a&&(n=l.createElement(j.NiceI18nLazyProvider,{t:a,children:n})),t&&(n=l.createElement(Ct,{theme:t,children:n})),n};process.env.NODE_ENV!=="production"&&(Bn.displayName="NiceTestWrapper");function Dc(e,t,r){const a=new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0,...r});e.dispatchEvent(a)}function Pc(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 zc(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(c=>c[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 $c(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 jn=process.env.NODE_ENV==="development";let H={enabled:jn,logToConsole:!1,slowRenderThreshold:16,samplingRate:1,enableUserTiming:!0,trackPropsChanges:!1};const Ke=[],J=new Map,Ue=new Map;let Hc=1;function Wn(e){H={...H,...e}}function Vn(){return new Map(J)}function Kn(e){return J.get(e)}function _c(e=100){return Ke.slice(-e)}function Et(){Ke.length=0,J.clear(),Ue.clear()}function Nt(e){const t=e??H.slowRenderThreshold??16;return Ke.filter(r=>r.actualDuration>t)}function Oc(){return Math.random()<(H.samplingRate??1)}function Bc(e){const t=J.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>(H.slowRenderThreshold??16)&&t.slowRenderCount++):J.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>(H.slowRenderThreshold??16)?1:0})}function q(e){return e<1?`${(e*1e3).toFixed(0)}μs`:e<1e3?`${e.toFixed(2)}ms`:`${(e/1e3).toFixed(2)}s`}const jc=({id:e,children:t,onRender:r,onSlowRender:a,slowThreshold:n,logToConsole:o})=>{const s=l.useCallback((i,c,d,u,f,h)=>{var g,S,y;if(!H.enabled||!Oc()||(g=H.ignoreComponents)!=null&&g.includes(i))return;const b={componentName:i,renderId:`render-${Hc++}`,phase:c,actualDuration:d,baseDuration:u,startTime:f,commitTime:h,interactions:new Set,timestamp:Date.now()};if(Ke.push(b),Bc(b),H.enableUserTiming)try{performance.measure(`Nice:${i}:${c}`,{start:f,duration:d})}catch{}if(o??H.logToConsole){const v=n??H.slowRenderThreshold??16,k=d>v;console.log(`%c[Profile] ${i} ${c}`,`color: ${k?"var(--nice-color-error, #dc2626)":"var(--nice-color-success, #22c55e)"}; font-weight: ${k?"bold":"normal"}`,{actual:q(d),base:q(u),savings:`${((1-d/u)*100).toFixed(1)}%`})}r==null||r(b),(S=H.onRender)==null||S.call(H,b);const m=n??H.slowRenderThreshold??16;d>m&&(a==null||a(b),(y=H.onSlowRender)==null||y.call(H,b))},[r,a,n,o]);return H.enabled?x.jsx(l.Profiler,{id:e,onRender:s,children:t}):x.jsx(x.Fragment,{children:t})};function Un(e,t){const r=l.useRef(void 0),a=l.useRef(0);l.useEffect(()=>{if(!H.enabled||!H.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 c=n==null?void 0:n[i],d=t[i];Object.is(c,d)||o.push({propName:i,oldValue:c,newValue:d,timestamp:Date.now()})}o.length>0&&H.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 Wc(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>(Un(r,n),x.jsx(e,{...n}));return a.displayName=`WhyDidYouRender(${r})`,a}function Vc(e){const t=l.useRef(0);return t.current++,l.useEffect(()=>{H.enabled&&H.logToConsole&&e&&console.log(`%c[Render count] ${e}: ${t.current}`,`color: ${t.current>10?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"}`)}),t.current}function Xe(e,t){if(!H.enabled)return;const r={name:e,startTime:performance.now(),detail:t};if(Ue.set(e,r),H.enableUserTiming)try{performance.mark(`Nice:${e}:start`,{detail:t})}catch{}}function Ge(e){if(!H.enabled)return 0;const t=Ue.get(e);if(!t)return console.warn(`[Profile] No mark found for: ${e}`),0;const r=performance.now()-t.startTime;if(t.duration=r,H.enableUserTiming)try{performance.mark(`Nice:${e}:end`),performance.measure(`Nice:${e}`,`Nice:${e}:start`,`Nice:${e}:end`)}catch{}return H.logToConsole&&console.log(`%c[Measure] ${e}: ${q(r)}`,`color: ${r>100?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"}`),r}async function Kc(e,t,r){Xe(e,r);try{return await t()}finally{Ge(e)}}function Uc(e,t,r){Xe(e,r);try{return t()}finally{Ge(e)}}function Xc(e,t,r){l.useEffect(()=>{Xe(e);const a=t();return Ge(e),a},r)}function Xn(){const e=Array.from(J.values()),t=Nt(),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(Ue.values());return{stats:e,slowRenders:t,totalRenders:r,avgRenderTime:a,marks:n}}function At(){const e=Xn();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: ${q(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":q(t.avgRenderTime),"Max Time":q(t.maxRenderTime),"Total Time":q(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:q(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:q(t.duration)}))),console.groupEnd()),console.groupEnd()}const Gn=new Map;function qn(){for(const[e,t]of J)Gn.set(e,{...t});console.log("[Profile] Baseline saved")}function Yn(e=20){const t=[];for(const[r,a]of J){const n=Gn.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&&H.logToConsole&&console.warn("%c[Regression] Performance regressions detected!","color: var(--nice-danger-dark, #dc2626); font-weight: bold",t),t}const Gc=Object.assign(l.memo(({position:e="bottom-right",defaultCollapsed:t=!0})=>{const{t:r}=j.useNiceTranslation(),[a,n]=l.useState(t),[o,s]=l.useState([]),[i,c]=l.useState({used:0,total:0});if(l.useEffect(()=>{const u=()=>{const h=Array.from(J.values());s(h.sort((p,m)=>m.totalRenderTime-p.totalRenderTime).slice(0,10));const b=window.performance;b.memory&&c({used:b.memory.usedJSHeapSize/1024/1024,total:b.memory.totalJSHeapSize/1024/1024})};u();const f=setInterval(u,2e3);return()=>clearInterval(f)},[]),!H.enabled)return null;const d={position:"fixed",zIndex:99999,...e.includes("top")?{top:8}:{bottom:8},...e.includes("left")?{left:8}:{right:8}};return x.jsxs("div",{style:{...d,background:"var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",color:"var(--nice-color-white, #fff)",borderRadius:8,fontSize:11,fontFamily:"Monaco, Consolas, monospace",padding:a?"4px 8px":8,maxWidth:a?"auto":300,maxHeight:a?"auto":400,overflow:"auto"},children:[x.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":!a,onKeyDown:N.clickOnActivationKey,style:{cursor:"pointer",display:"flex",alignItems:"center",gap:8},onClick:()=>n(u=>!u),children:[x.jsx("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:"50%",background:"var(--nice-color-success, #22c55e)"}}),x.jsx("span",{children:r("profiling.profiler","Profiler")}),i.used>0&&x.jsxs("span",{style:{color:i.used>100?"var(--nice-color-warning, #f59e0b)":"var(--nice-text-muted, #64748b)"},children:[i.used.toFixed(0),"MB"]}),x.jsx("span",{style:{marginLeft:"auto",opacity:.5,display:"inline-flex"},children:x.jsx(N.NiceIcon,{name:a?"chevron-down":"chevron-up",size:12})})]}),!a&&x.jsxs("div",{style:{marginTop:8},children:[x.jsx("div",{style:{borderBottom:"1px solid var(--nice-border-color, #333)",paddingBottom:4,marginBottom:8},children:x.jsx("strong",{children:r("profiling.topComponents","Top Components")})}),o.map(u=>x.jsxs("div",{style:{marginBottom:4,display:"flex",gap:8},children:[x.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:u.componentName}),x.jsx("span",{style:{color:u.avgRenderTime>16?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"},children:q(u.avgRenderTime)}),x.jsxs("span",{style:{color:"var(--nice-text-muted, #64748b)",minWidth:30,textAlign:"right"},children:["x",u.renderCount]})]},u.componentName)),x.jsxs("div",{style:{marginTop:8,display:"flex",gap:8},children:[x.jsx("button",{onClick:At,style:{flex:1,padding:"4px 8px",background:"var(--nice-bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--nice-text-primary, #fff)",cursor:"pointer",fontSize:10},children:r("profiling.printReport","Print Report")}),x.jsx("button",{onClick:Et,style:{flex:1,padding:"4px 8px",background:"var(--nice-bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--nice-text-primary, #fff)",cursor:"pointer",fontSize:10},children:r("profiling.clear","Clear")})]})]})]})}),{displayName:"ProfilerOverlay"});function qc(){jn&&(window.__NICE2DEV_PROFILER__={getStats:Vn,getComponentStats:Kn,getSlowRenders:Nt,printReport:At,clear:Et,saveBaseline:qn,checkRegression:Yn,configure:Wn},console.log("%c[Nice2Dev Profiler] DevTools integration ready. Use __NICE2DEV_PROFILER__ in console.","color: var(--nice-info, #6366f1)"))}const Mt=process.env.NODE_ENV==="development";let _={enabled:Mt,logToConsole:!0,samplingRate:1,trackDetachedNodes:!1,closureSizeThreshold:1024*1024};const qe=[],_e=new Map,et=new Map,Jt=new WeakMap;let Yc=1;function Jc(){return Math.random()<(_.samplingRate??1)}function Ye(){var e;try{throw new Error}catch(t){return((e=t.stack)==null?void 0:e.split(`
38
+ `)}function sc(e,t,r=!1){const a=Kt(Vt(e)),n=Kt(Vt(t)),o=lc(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 cc(){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 Vt(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 Kt([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 lc(e,t){const r=Math.max(e,t),a=Math.min(e,t);return(r+.05)/(a+.05)}const dc=["none","protanopia","protanomaly","deuteranopia","deuteranomaly","tritanopia","tritanomaly","achromatopsia","achromatomaly"],Ut="nice2dev-color-blind-filters",Xt="nice2dev-color-blind-styles",it={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 uc(){if(typeof document>"u"||document.getElementById(Ut))return;const e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");t.id=Ut,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(it)){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(it).map(n=>`.nice-color-blind-${n}{filter:url(#nice-cb-${n})!important;}`).join(""),document.head.appendChild(a)}}function bt(e){for(const t of Object.keys(it))e.classList.remove(`nice-color-blind-${t}`)}function St(e,t=typeof document<"u"?document.documentElement:null){t&&(uc(),bt(t),e!=="none"&&t.classList.add(`nice-color-blind-${e}`))}function Pr(e,t={}){const{target:r}=t,a=l.useRef(null);l.useEffect(()=>{const n=r??(typeof document<"u"?document.documentElement:null);return a.current=n,St(e,n),()=>{const o=a.current;o&&bt(o)}},[e,r])}function fc(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 mc(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 pc(e={}){const{storageKey:t="nice2dev.a11y.cvd",storage:r="localStorage",defaultMode:a="none",target:n,cookieMaxAgeSeconds:o=3600*24*60}=e,s=l.useCallback(b=>{if(typeof window>"u"||r==="cookie")return()=>{};const p=m=>{m.key===t&&b()};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[r,t]),i=l.useCallback(()=>fc(t,r)??a,[r,t,a]),c=l.useCallback(()=>a,[a]),d=l.useSyncExternalStore(s,i,c),[u,f]=l.useState(d);l.useEffect(()=>{d!==u&&f(d)},[d]),Pr(u,{target:n});const h=l.useCallback(b=>{f(b),mc(t,b,r,o)},[r,t,o]);return[u,h]}function gc(e=typeof document<"u"?document.documentElement:null){return{set:t=>St(t,e),clear:()=>{e&&bt(e)}}}function zr(e,t){var s;if(typeof document>"u"||typeof getComputedStyle>"u")return $r(e);const r=e.trim().match(/^var\(\s*([^,\s)]+)\s*(?:,\s*(.+))?\)$/);if(!r)return e;const a=typeof Element<"u"&&t instanceof Element&&t.isConnected?t:document.documentElement,n=getComputedStyle(a).getPropertyValue(r[1]).trim();if(n)return n;const o=(s=r[2])==null?void 0:s.trim();return o?zr(o,t):e}function $r(e){const t=e.trim().match(/^var\(\s*[^,\s)]+\s*(?:,\s*(.+))?\)$/);return t!=null&&t[1]?$r(t[1]):e}function yc(){const e=globalThis.crypto;if(typeof(e==null?void 0:e.randomUUID)=="function")return e.randomUUID();const t=new Uint8Array(16);if(typeof(e==null?void 0:e.getRandomValues)=="function")e.getRandomValues(t);else for(let a=0;a<t.length;a++)t[a]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;const r=Array.from(t,a=>a.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}const hc=e=>[...e],bc=()=>{const e=new Map;return{getItem:t=>Promise.resolve(e.get(t)),setItem:(t,r)=>(e.set(t,r),Promise.resolve())}};function Sc(e={}){var h,b;const t=e.permissionPolicy??hc,r=e.storage;let a;r&&typeof r.getItem=="function"&&typeof r.setItem=="function"?a={getItem:r.getItem,setItem:r.setItem}:a=bc();const n=(h=e.permissions)==null?void 0:h.canActivate,o={user:(b=e.permissions)==null?void 0:b.user},s=e.logger,i=new Map,c=new Map,d=new Map,u=(p,m)=>{const g=d.get(p);if(g)for(const S of g)try{S(m)}catch{}},f=(p,m,g)=>{const S=new Set(m);return{permissions:S,log:(y,...v)=>{s&&s(p.id,y,v)},on:(y,v)=>{let k=c.get(y);k||(k=new Set,c.set(y,k)),k.add(v);const E=()=>{k.delete(v)};return g.push(E),E},emit:(y,v)=>{if(!S.has("events:emit"))return;const k=c.get(y);if(k)for(const E of k)try{E(v)}catch{}},setItem:async(y,v)=>{S.has("storage:write")&&await a.setItem(`${p.id}:${y}`,v)},getItem:async y=>{if(S.has("storage:read"))return await a.getItem(`${p.id}:${y}`)}}};return{register(p){const m=p.manifest.id;if(i.has(m))throw new Error(`Plugin "${m}" already registered`);const g={manifest:p.manifest,status:"registered"};return i.set(m,{plugin:p,record:g,cleanups:[]}),u("register",g),g},unregister(p){return i.get(p)?(i.delete(p),!0):!1},async activate(p){const m=i.get(p);if(!m)throw new Error(`Unknown plugin "${p}"`);if(m.record.status==="active")return m.record;for(const g of m.plugin.manifest.dependsOn??[]){const S=i.get(g);if(!S)throw m.record.status="error",m.record.error=`Missing dependency: ${g}`,u("error",m.record),new Error(m.record.error);S.record.status!=="active"&&await this.activate(g)}m.record.status="activating";try{if(n&&!n(m.plugin.manifest,o))throw m.record.status="error",m.record.error="permission-denied",u("error",m.record),new Error(m.record.error);const g=t(m.plugin.manifest.permissions??[],m.plugin.manifest),S=f(m.plugin.manifest,g,m.cleanups);await m.plugin.activate(S),m.record.status="active",m.record.activatedAt=Date.now(),m.record.error=void 0,u("activate",m.record)}catch(g){throw m.record.status="error",m.record.error=g instanceof Error?g.message:String(g),u("error",m.record),g}return m.record},async deactivate(p){var g,S;const m=i.get(p);if(!m)throw new Error(`Unknown plugin "${p}"`);if(m.record.status!=="active")return m.record;m.record.status="deactivating";try{await((S=(g=m.plugin).deactivate)==null?void 0:S.call(g));for(const y of m.cleanups.splice(0))await y();m.record.status="inactive",u("deactivate",m.record)}catch(y){throw m.record.status="error",m.record.error=y instanceof Error?y.message:String(y),u("error",m.record),y}return m.record},list(){return[...i.values()].map(p=>({...p.record}))},get(p){const m=i.get(p);return m?{...m.record}:void 0},on(p,m){let g=d.get(p);return g||(g=new Set,d.set(p,g)),g.add(m),()=>{g.delete(m)}},events:{on(p,m){const S={"plugin:registered":"register","plugin:activated":"activate","plugin:deactivated":"deactivate","plugin:error":"error"}[p];let y=d.get(S);return y||(y=new Set,d.set(S,y)),y.add(m),()=>{y.delete(m)}},emit(p,m){const g=c.get(p);if(g)for(const S of g)try{S(m)}catch{}}}}}const Hr={"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","text.onSuccess":"--text-on-success","text.onError":"--text-on-error","text.onInfo":"--text-on-info","text.onWarning":"--text-on-warning","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 vc(e,t){return t.split(".").reduce((r,a)=>{if(r&&typeof r=="object")return r[a]},e)}function _r(e){return e.startsWith("--nice-")?null:`--nice-${e.slice(2)}`}function He(e){var r;const t={};for(const[a,n]of Object.entries(Hr)){const o=vc(e,a);if(o!==void 0){t[n]=String(o);const s=_r(n);s&&(t[s]=String(o))}}if(e.nesting)for(const a of["sidebar","menu","tree"]){const n=e.nesting[a];if(!n)continue;const o=e.backgrounds.secondary||e.backgrounds.primary||"#ffffff",s=((r=e.text)==null?void 0:r.primary)||"#111111";Object.assign(t,Fc(a,n,o,s))}return t}function xc(e,t){const r=t??document.documentElement,a=He(e);for(const[n,o]of Object.entries(a))r.style.setProperty(n,o);kc(e.backgroundImage,r),e.darkMode&&(r.dataset.ntdColorScheme=e.darkMode)}const wc={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 kc(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=wc[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 Or(e){const t=e??document.documentElement;for(const r of Object.values(Hr)){t.style.removeProperty(r);const a=_r(r);a&&t.style.removeProperty(a)}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");for(const r of["sidebar","menu","tree"]){t.style.removeProperty(`--nice-${r}-levels`);for(let a=1;a<=10;a++)t.style.removeProperty(`--nice-${r}-level-${a}-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-text`),t.style.removeProperty(`--nice-${r}-level-${a}-hover-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-active-bg`),t.style.removeProperty(`--nice-${r}-level-${a}-border`)}}function Cc(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"),onSuccess:o("--text-on-success"),onError:o("--text-on-error"),onInfo:o("--text-on-info"),onWarning:o("--text-on-warning")},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 Ec(e){return JSON.stringify(e,null,2)}function Nc(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 Ac=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,Mc=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;function ce(e){if(!e)return null;const t=e.trim();let r=t.match(Mc);if(r)return{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)};if(r=t.match(Ac),r)return{r:parseInt(r[1]+r[1],16),g:parseInt(r[2]+r[2],16),b:parseInt(r[3]+r[3],16)};const a=t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);return a?{r:+a[1],g:+a[2],b:+a[3]}:null}function Tc({r:e,g:t,b:r}){const a=n=>Math.max(0,Math.min(255,Math.round(n))).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(r)}`}function vt(e,t,r){const a=ce(e),n=ce(t);return!a||!n?e:Tc({r:a.r+(n.r-a.r)*r,g:a.g+(n.g-a.g)*r,b:a.b+(n.b-a.b)*r})}function st(e,t){return vt(e,"#ffffff",t)}function ct(e,t){return vt(e,"#000000",t)}function Se(e){const t=ce(e);if(!t)return 1;const r=a=>{const n=a/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)};return .2126*r(t.r)+.7152*r(t.g)+.0722*r(t.b)}function Gt(e,t){return(Math.max(e,t)+.05)/(Math.min(e,t)+.05)}function Ic(e,t,r){if(!ce(e))return r;const a=Se(e),n=ce(t)?Se(t):1,o=ce(r)?Se(r):0;return Gt(a,n)>=Gt(a,o)?t:r}function Rc(e,t,r){const a=t.palette??[],n=t.bgStep??.06,o=a[0]??r;switch(t.bgDerivation??"tint"){case"palette":return a.length===0?r:a[(e-1)%a.length];case"shade":return ct(o,Math.min(.9,n*(e-1)));case"mix-surface":return vt(o,r,Math.min(1,n*(e-1)));case"tint":default:return st(o,Math.min(.9,n*(e-1)))}}function Lc(e){return ce(e)!=null}function Br(e,t,r,a){var o;const n=[];for(let s=1;s<=e;s++){const i=(o=t.overrides)==null?void 0:o[s],c=(i==null?void 0:i.background)??Rc(s,t,r);n.push({bg:c,text:(i==null?void 0:i.text)??Ic(c,"#ffffff",a),hoverBg:(i==null?void 0:i.hoverBackground)??(Se(c)>.5?ct(c,.06):st(c,.08)),activeBg:(i==null?void 0:i.activeBackground)??(Se(c)>.5?ct(c,.12):st(c,.16)),border:i==null?void 0:i.border})}return n}function Fc(e,t,r,a){const n={},o=Math.max(1,Math.min(10,t.levels??5));return Br(o,t,r,a).forEach((s,i)=>{const c=i+1;n[`--nice-${e}-level-${c}-bg`]=s.bg,n[`--nice-${e}-level-${c}-text`]=s.text,n[`--nice-${e}-level-${c}-hover-bg`]=s.hoverBg,n[`--nice-${e}-level-${c}-active-bg`]=s.activeBg,s.border&&(n[`--nice-${e}-level-${c}-border`]=s.border)}),n[`--nice-${e}-levels`]=String(o),n}const xt=l.createContext(null);function Dc(){const e=l.useContext(xt);if(!e)throw new Error("useNiceTheme must be used within a NiceThemeProvider");return e}const Ee={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Ne={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},Ae={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},wt=e=>({color:e,radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"}),jr={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)"},Pc={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 R(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:wt(n),shadows:jr,spacing:Ee,typography:Ne,transitions:Ae}}function W(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:wt(n),shadows:Pc,spacing:Ee,typography:Ne,transitions:Ae}}const Wr=R("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"),Vr=R("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"),Kr=R("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"),Ur=R("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=R("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"),Gr=R("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=R("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"),Yr=R("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"),Jr=R("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"),Qr=R("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"),Zr=R("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"),ea=R("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"),ta=R("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"),ra=R("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"),aa=R("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"),na=R("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"),oa=R("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"),ia=R("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=R("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"),ca=R("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"),la=R("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"),da=R("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"),ua=W("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"),fa=W("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"),ma=W("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"),pa=W("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"),ga=W("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"),ya=W("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",onPrimary:"#ffffff"},"#374151"),ha=W("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"),ba=W("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"),Sa=W("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"),va=W("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"),xa=R("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"),wa=R("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"),ka=R("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"),Ca=R("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"),Ea=R("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"),Na=R("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"),Aa=R("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"),Ma=R("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"),Ta=R("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"),Ia=R("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"),Ra=R("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=R("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"),Fa=R("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"),Da=R("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"),Pa=R("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"),za=R("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"),$a=R("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=R("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"),_a=R("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"),Oa=R("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"),Ba=R("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"),ja=R("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"),Wa=R("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"),Va=R("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"),Ka=R("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"),Ua=R("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=R("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"),Ga=W("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=R("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"),Ya=W("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",onError:"#ffffff"},"#073642"),Ja=W("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"),Qa=W("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"),Za=W("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"),en=R("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"),tn=W("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"),rn=R("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"),an=R("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"),nn=W("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",onInfo:"#ffffff"},"#1c3a44"),on=W("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"),sn=W("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"),cn=R("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"),ln=W("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",onInfo:"#ffffff"},"#5c3400"),dn=R("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"),un=R("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"),fn=R("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"),mn=R("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"),pn=R("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"),gn=R("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"),yn=R("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"),hn=R("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"),bn=R("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"),Sn=R("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"),vn=R("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"),xn=R("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"),wn=R("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"),kn=R("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"),Cn=W("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"),En=R("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"),Nn=R("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"),An={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:wt("#e2e8f0"),shadows:jr,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:Ae},Mn={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:Ee,typography:Ne,transitions:{fast:"150ms ease",normal:"250ms ease",slow:"350ms ease"}},Tn={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:Ee,typography:Ne,transitions:Ae},In={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:Ee,typography:Ne,transitions:Ae},Rn=R("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=W("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"),Fn=W("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"),Dn=R("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"),Pn=R("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"),zn=[Wr,Vr,Kr,Ur,Xr,Gr,qr,Yr,Jr,Qr,Zr,ea,ta,ra,aa,na,oa,ia,sa,ca,la,da,ua,fa,ma,pa,ga,ya,ha,ba,Sa,va,xa,wa,ka,Ca,Ea,Na,Aa,Ma,Ta,Ia,Ra,La,Fa,Da,Pa,za,$a,Ha,_a,Oa,Ba,ja,Wa,Va,Ka,Ua,Xa,Ga,qa,Ya,Ja,Qa,Za,en,tn,rn,an,nn,on,sn,cn,ln,dn,un,fn,mn,pn,gn,yn,hn,bn,Sn,vn,xn,wn,kn,Cn,En,Nn,An,Mn,Tn,In,Rn,Ln,Fn,Dn,Pn],le={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Ve={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},Me={color:"#e2e8f0",radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"},Te={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},kt={name:"Light",darkMode:"light",colors:{primary:"#2563eb",primaryHover:"#1d4ed8",success:"#047857",warning:"#f59e0b",error:"#dc2626",info:"#0e7490",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:"#64748b",inverse:"#ffffff"},borders:Me,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:le,typography:Ve,transitions:Te},$n=(function(){return{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:"#858585",inverse:"#0f172a"},borders:{...Me,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:le,typography:Ve,transitions:Te}})(),Hn=(function(){return{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:{...Me,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:le,typography:Ve,transitions:Te}})(),_n=(function(){return{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:{...Me,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:le,typography:Ve,transitions:Te}})(),On=(function(){return{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:{...Me,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:le,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)"}}})(),Bn={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:le,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:Te},jn={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:le,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)"}},lt=(function(){return[kt,$n,Hn,_n,On,Bn,jn,...zn]})(),zc=["primary","primary-hover","primary-light","primary-bg","success","warning","error","info","accent","surface","surface-hover"];function $c(e,t){return e??t.recommendedDisplayStyle??"default"}function qt(e){return e.toLowerCase().replace(/[\s_-]+/g,"")}function Yt(e){if(e&&typeof e=="object")return e;if(typeof e=="string"){const t=qt(e),r=lt.find(a=>qt(a.name)===t);if(r)return r;process.env.NODE_ENV!=="production"&&console.warn(`[@nice2dev/ui] <NiceThemeProvider theme="${e}"> — unknown preset name. Falling back to 'Light'. Available: ${lt.map(a=>a.name).join(", ")}.`)}return kt}const Ct=({theme:e,darkTheme:t,variantConfig:r,darkMode:a,displayStyle:n,animateTransitions:o=!0,children:s})=>{const i=l.useMemo(()=>Yt(e),[e]),c=l.useMemo(()=>t===void 0?void 0:Yt(t),[t]),d=l.useId(),u=l.useMemo(()=>`p${d.replace(/:/g,"")}`,[d]),f=l.useRef(null),h=l.useRef(null),[b,p]=l.useState(null),[m,g]=l.useState(i),[S,y]=l.useState(!1),[v,k]=l.useState(()=>$c(n,i));l.useEffect(()=>{n!==void 0?k(n):i.recommendedDisplayStyle&&k(i.recommendedDisplayStyle)},[n,i.recommendedDisplayStyle]),l.useEffect(()=>{const T=window.matchMedia("(prefers-color-scheme: dark)");y(T.matches);const D=F=>y(F.matches);return T.addEventListener("change",D),()=>T.removeEventListener("change",D)},[]);const E=a??i.darkMode??"light",w=E==="dark"||E==="auto"&&S;l.useEffect(()=>{g(w&&c?c:i)},[i,c,w]),l.useEffect(()=>{if(typeof document>"u")return;const T=document.createElement("div");return T.className="nice-theme-scope nice-theme-portal-host",T.dataset.ntdProvider=u,T.style.display="contents",document.body.appendChild(T),h.current=T,p(T),()=>{T.parentNode&&T.parentNode.removeChild(T),h.current=null,p(null)}},[u]),l.useEffect(()=>{const T=f.current;if(!T)return;o&&(T.style.transition="background-color 300ms ease, color 300ms ease");const D=He(m);for(const[L,O]of Object.entries(D))T.style.setProperty(L,O);const F=h.current;if(F)for(const[L,O]of Object.entries(D))F.style.setProperty(L,O);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"),F&&(F.style.colorScheme=w?"dark":"light",F.dataset.ntdColorScheme=w?"dark":"light",F.dataset.theme=w?"dark":"light",w?F.classList.add("nice-dark"):F.classList.remove("nice-dark"));const P=m.backgroundImage;return P&&P.type!=="none"&&P.type==="gradient"&&P.gradient&&T.style.setProperty("--ntd-bg-image",P.gradient),()=>{T&&Or(T)}},[m,w,o,b]);const C=l.useRef(new Set);l.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof window>"u"||typeof document>"u")return;const T=window.setTimeout(()=>{const D=He(m),F=["--color-primary","--nice-primary","--bg-primary","--text-primary"].find(V=>D[V])??Object.keys(D)[0];if(!F)return;const P=String(D[F]??"").trim();if(!P)return;const L=getComputedStyle(document.documentElement).getPropertyValue(F).trim();if(!L||L===P)return;const O=`${u}::${m.name??"unnamed"}::${F}`;C.current.has(O)||(C.current.add(O),console.warn(`[NiceThemeProvider] CSS var "${F}" on documentElement (${L}) does not match the active provider pack "${m.name??"unnamed"}" (${P}). 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(T)},[m,u]);const A=l.useRef(!1);l.useEffect(()=>{if(process.env.NODE_ENV==="production"||A.current||typeof window>"u"||typeof document>"u")return;const T=window.setTimeout(()=>{const D=getComputedStyle(document.documentElement);if(!D.getPropertyValue("--nice-overlay-8").trim())return;const F=zc.filter(P=>!D.getPropertyValue(`--nice-${P}`).trim()&&!D.getPropertyValue(`--nice-color-${P}`).trim());F.length!==0&&(A.current=!0,console.warn(`[NiceThemeProvider] ${F.map(P=>`--nice-${P} / --nice-color-${P}`).join(", ")} resolve to nothing on :root, so dropdowns, dialogs and anything else outside this provider fall back to their built-in colours. Usually an alias cycle in your CSS: the stylesheet already points each --nice-<name> at --nice-color-<name>, so declaring --nice-color-<name> in terms of --nice-<name> closes a loop. Set the --nice-color-* tokens to real values (or use the theme) instead.`))},0);return()=>window.clearTimeout(T)},[m]),l.useEffect(()=>{const T=f.current;if(!T)return;const D=r?{...Y,...r}:xe(v);ht(D,T,u);const F=gr(v);for(const[P,L]of Object.entries(F))T.setAttribute(P,L);return()=>{mr(u,T)}},[r,v,u]);const M=l.useCallback(T=>{g(T)},[]),I=l.useMemo(()=>({theme:m,setTheme:M,portalTarget:b}),[m,M,b]),$=l.useMemo(()=>({displayStyle:v,variantConfig:xe(v),setDisplayStyle:k}),[v]);return x.jsx(xt.Provider,{value:I,children:x.jsx(We.Provider,{value:$,children:x.jsx("div",{ref:f,className:"nice-theme-scope","data-ntd-provider":u,style:{display:"contents"},children:s})})})};process.env.NODE_ENV!=="production"&&(Ct.displayName="NiceThemeProvider");function Hc(...e){return e.join("-")}const _c={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"},Wn=({children:e,theme:t,direction:r="ltr",t:a})=>{let n=l.createElement("div",{dir:r,"data-testid":"nice-test-root",style:{direction:r}},e);return a&&(n=l.createElement(j.NiceI18nLazyProvider,{t:a,children:n})),t&&(n=l.createElement(Ct,{theme:t,children:n})),n};process.env.NODE_ENV!=="production"&&(Wn.displayName="NiceTestWrapper");function Oc(e,t,r){const a=new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0,...r});e.dispatchEvent(a)}function Bc(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 jc(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(c=>c[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 Wc(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 Vn=process.env.NODE_ENV==="development";let H={enabled:Vn,logToConsole:!1,slowRenderThreshold:16,samplingRate:1,enableUserTiming:!0,trackPropsChanges:!1};const Ke=[],J=new Map,Ue=new Map;let Vc=1;function Kn(e){H={...H,...e}}function Un(){return new Map(J)}function Xn(e){return J.get(e)}function Kc(e=100){return Ke.slice(-e)}function Et(){Ke.length=0,J.clear(),Ue.clear()}function Nt(e){const t=e??H.slowRenderThreshold??16;return Ke.filter(r=>r.actualDuration>t)}function Uc(){return Math.random()<(H.samplingRate??1)}function Xc(e){const t=J.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>(H.slowRenderThreshold??16)&&t.slowRenderCount++):J.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>(H.slowRenderThreshold??16)?1:0})}function q(e){return e<1?`${(e*1e3).toFixed(0)}μs`:e<1e3?`${e.toFixed(2)}ms`:`${(e/1e3).toFixed(2)}s`}const Gc=({id:e,children:t,onRender:r,onSlowRender:a,slowThreshold:n,logToConsole:o})=>{const s=l.useCallback((i,c,d,u,f,h)=>{var g,S,y;if(!H.enabled||!Uc()||(g=H.ignoreComponents)!=null&&g.includes(i))return;const b={componentName:i,renderId:`render-${Vc++}`,phase:c,actualDuration:d,baseDuration:u,startTime:f,commitTime:h,interactions:new Set,timestamp:Date.now()};if(Ke.push(b),Xc(b),H.enableUserTiming)try{performance.measure(`Nice:${i}:${c}`,{start:f,duration:d})}catch{}if(o??H.logToConsole){const v=n??H.slowRenderThreshold??16,k=d>v;console.log(`%c[Profile] ${i} ${c}`,`color: ${k?"var(--nice-color-error, #dc2626)":"var(--nice-color-success, #22c55e)"}; font-weight: ${k?"bold":"normal"}`,{actual:q(d),base:q(u),savings:`${((1-d/u)*100).toFixed(1)}%`})}r==null||r(b),(S=H.onRender)==null||S.call(H,b);const m=n??H.slowRenderThreshold??16;d>m&&(a==null||a(b),(y=H.onSlowRender)==null||y.call(H,b))},[r,a,n,o]);return H.enabled?x.jsx(l.Profiler,{id:e,onRender:s,children:t}):x.jsx(x.Fragment,{children:t})};function Gn(e,t){const r=l.useRef(void 0),a=l.useRef(0);l.useEffect(()=>{if(!H.enabled||!H.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 c=n==null?void 0:n[i],d=t[i];Object.is(c,d)||o.push({propName:i,oldValue:c,newValue:d,timestamp:Date.now()})}o.length>0&&H.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 qc(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>(Gn(r,n),x.jsx(e,{...n}));return a.displayName=`WhyDidYouRender(${r})`,a}function Yc(e){const t=l.useRef(0);return t.current++,l.useEffect(()=>{H.enabled&&H.logToConsole&&e&&console.log(`%c[Render count] ${e}: ${t.current}`,`color: ${t.current>10?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"}`)}),t.current}function Xe(e,t){if(!H.enabled)return;const r={name:e,startTime:performance.now(),detail:t};if(Ue.set(e,r),H.enableUserTiming)try{performance.mark(`Nice:${e}:start`,{detail:t})}catch{}}function Ge(e){if(!H.enabled)return 0;const t=Ue.get(e);if(!t)return console.warn(`[Profile] No mark found for: ${e}`),0;const r=performance.now()-t.startTime;if(t.duration=r,H.enableUserTiming)try{performance.mark(`Nice:${e}:end`),performance.measure(`Nice:${e}`,`Nice:${e}:start`,`Nice:${e}:end`)}catch{}return H.logToConsole&&console.log(`%c[Measure] ${e}: ${q(r)}`,`color: ${r>100?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"}`),r}async function Jc(e,t,r){Xe(e,r);try{return await t()}finally{Ge(e)}}function Qc(e,t,r){Xe(e,r);try{return t()}finally{Ge(e)}}function Zc(e,t,r){l.useEffect(()=>{Xe(e);const a=t();return Ge(e),a},r)}function qn(){const e=Array.from(J.values()),t=Nt(),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(Ue.values());return{stats:e,slowRenders:t,totalRenders:r,avgRenderTime:a,marks:n}}function At(){const e=qn();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: ${q(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":q(t.avgRenderTime),"Max Time":q(t.maxRenderTime),"Total Time":q(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:q(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:q(t.duration)}))),console.groupEnd()),console.groupEnd()}const Yn=new Map;function Jn(){for(const[e,t]of J)Yn.set(e,{...t});console.log("[Profile] Baseline saved")}function Qn(e=20){const t=[];for(const[r,a]of J){const n=Yn.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&&H.logToConsole&&console.warn("%c[Regression] Performance regressions detected!","color: var(--nice-danger-dark, #dc2626); font-weight: bold",t),t}const el=Object.assign(l.memo(({position:e="bottom-right",defaultCollapsed:t=!0})=>{const{t:r}=j.useNiceTranslation(),[a,n]=l.useState(t),[o,s]=l.useState([]),[i,c]=l.useState({used:0,total:0});if(l.useEffect(()=>{const u=()=>{const h=Array.from(J.values());s(h.sort((p,m)=>m.totalRenderTime-p.totalRenderTime).slice(0,10));const b=window.performance;b.memory&&c({used:b.memory.usedJSHeapSize/1024/1024,total:b.memory.totalJSHeapSize/1024/1024})};u();const f=setInterval(u,2e3);return()=>clearInterval(f)},[]),!H.enabled)return null;const d={position:"fixed",zIndex:99999,...e.includes("top")?{top:8}:{bottom:8},...e.includes("left")?{left:8}:{right:8}};return x.jsxs("div",{style:{...d,background:"var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",color:"var(--nice-color-white, #fff)",borderRadius:8,fontSize:11,fontFamily:"Monaco, Consolas, monospace",padding:a?"4px 8px":8,maxWidth:a?"auto":300,maxHeight:a?"auto":400,overflow:"auto"},children:[x.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":!a,onKeyDown:N.clickOnActivationKey,style:{cursor:"pointer",display:"flex",alignItems:"center",gap:8},onClick:()=>n(u=>!u),children:[x.jsx("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:"50%",background:"var(--nice-color-success, #22c55e)"}}),x.jsx("span",{children:r("profiling.profiler","Profiler")}),i.used>0&&x.jsxs("span",{style:{color:i.used>100?"var(--nice-color-warning, #f59e0b)":"var(--nice-text-muted, #64748b)"},children:[i.used.toFixed(0),"MB"]}),x.jsx("span",{style:{marginLeft:"auto",opacity:.5,display:"inline-flex"},children:x.jsx(N.NiceIcon,{name:a?"chevron-down":"chevron-up",size:12})})]}),!a&&x.jsxs("div",{style:{marginTop:8},children:[x.jsx("div",{style:{borderBottom:"1px solid var(--nice-border-color, #333)",paddingBottom:4,marginBottom:8},children:x.jsx("strong",{children:r("profiling.topComponents","Top Components")})}),o.map(u=>x.jsxs("div",{style:{marginBottom:4,display:"flex",gap:8},children:[x.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:u.componentName}),x.jsx("span",{style:{color:u.avgRenderTime>16?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"},children:q(u.avgRenderTime)}),x.jsxs("span",{style:{color:"var(--nice-text-muted, #64748b)",minWidth:30,textAlign:"right"},children:["x",u.renderCount]})]},u.componentName)),x.jsxs("div",{style:{marginTop:8,display:"flex",gap:8},children:[x.jsx("button",{onClick:At,style:{flex:1,padding:"4px 8px",background:"var(--nice-bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--nice-text-primary, #fff)",cursor:"pointer",fontSize:10},children:r("profiling.printReport","Print Report")}),x.jsx("button",{onClick:Et,style:{flex:1,padding:"4px 8px",background:"var(--nice-bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--nice-text-primary, #fff)",cursor:"pointer",fontSize:10},children:r("profiling.clear","Clear")})]})]})]})}),{displayName:"ProfilerOverlay"});function tl(){Vn&&(window.__NICE2DEV_PROFILER__={getStats:Un,getComponentStats:Xn,getSlowRenders:Nt,printReport:At,clear:Et,saveBaseline:Jn,checkRegression:Qn,configure:Kn},console.log("%c[Nice2Dev Profiler] DevTools integration ready. Use __NICE2DEV_PROFILER__ in console.","color: var(--nice-info, #6366f1)"))}const Mt=process.env.NODE_ENV==="development";let _={enabled:Mt,logToConsole:!0,samplingRate:1,trackDetachedNodes:!1,closureSizeThreshold:1024*1024};const qe=[],_e=new Map,et=new Map,Jt=new WeakMap;let rl=1;function al(){return Math.random()<(_.samplingRate??1)}function Ye(){var e;try{throw new Error}catch(t){return((e=t.stack)==null?void 0:e.split(`
39
39
  `).slice(3).join(`
40
- `))??""}}function tt(e,t,r){return`${e.__ntd_id??Math.random()}-${t}-${r.toString().slice(0,50)}`}function re(e,t,r="warning",a,n){var s,i;if(!_.enabled||!Jc()||a&&((s=_.ignoreComponents)!=null&&s.includes(a)))return;const o={id:`leak-${Yc++}`,type:e,severity:r,componentName:a,message:t,stack:Ye(),timestamp:Date.now(),data:n};qe.push(o),_.logToConsole&&console[r==="critical"?"error":r==="warning"?"warn":"info"](`%c[NTD Leak Detector] ${e}`,`color: ${r==="critical"?"var(--nice-color-error, #dc2626)":r==="warning"?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-primary, #3b82f6)"}; font-weight: bold`,t,a?`(${a})`:"",""),(i=_.onLeak)==null||i.call(_,o)}function Qc(e){_={..._,...e}}function Zc(){return[...qe]}function el(){qe.length=0}function Jn(){return qe.reduce((e,t)=>(e[t.type]=(e[t.type]||0)+1,e),{})}function tl(e,t){const[r,a]=l.useState(e),n=l.useRef(!0),o=l.useRef(t);l.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]);const s=l.useCallback(i=>{n.current?a(i):_.enabled&&re("setState-after-unmount","setState called on unmounted component","warning",o.current)},[]);return[r,s]}function rl(e){const t=l.useRef(null),r=l.useRef(e),a=l.useCallback(()=>{t.current&&(clearTimeout(t.current),_.enabled&&_e.delete(t.current),t.current=null)},[]),n=l.useCallback((o,s)=>{a(),t.current=setTimeout(o,s),_.enabled&&_e.set(t.current,{id:t.current,type:"timeout",componentName:r.current,stack:Ye(),createdAt:Date.now()})},[a]);return l.useEffect(()=>{const o=r.current;return()=>{t.current&&(_.enabled&&re("timer-not-cleared","Timeout would have leaked without cleanup","info",o),a())}},[a]),[n,a]}function al(e){const t=l.useRef(null),r=l.useRef(e),a=l.useCallback(()=>{t.current&&(clearInterval(t.current),_.enabled&&_e.delete(t.current),t.current=null)},[]),n=l.useCallback((o,s)=>{a(),t.current=setInterval(o,s),_.enabled&&_e.set(t.current,{id:t.current,type:"interval",componentName:r.current,stack:Ye(),createdAt:Date.now()})},[a]);return l.useEffect(()=>{const o=r.current;return()=>{t.current&&(_.enabled&&re("timer-not-cleared","Interval would have leaked without cleanup","warning",o),a())}},[a]),[n,a]}function nl(e){const t=l.useRef([]),r=l.useRef(e);return l.useEffect(()=>{const a=t.current,n=r.current;return()=>{for(const{target:o,type:s,listener:i,options:c}of a)if(o.removeEventListener(s,i,c),_.enabled){const d=tt(o,s,i);et.delete(d)}a.length>0&&_.enabled&&re("listener-not-removed",`${a.length} event listener(s) would have leaked without cleanup`,"info",n),t.current=[]}},[]),l.useCallback((a,n,o,s)=>{if(a.addEventListener(n,o,s),t.current.push({target:a,type:n,listener:o,options:s}),_.enabled){const i=tt(a,n,o);et.set(i,{target:a,type:n,listener:o,componentName:r.current,stack:Ye(),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),_.enabled){const i=tt(a,n,o);et.delete(i)}}},[])}function Qn(e){const t=l.useRef(null),r=l.useRef(e);return l.useEffect(()=>{const a=r.current;return()=>{t.current&&!t.current.signal.aborted&&(t.current.abort(),_.enabled&&re("abort-controller-not-aborted","AbortController was auto-aborted on unmount (fetch may have leaked)","info",a))}},[]),l.useCallback(()=>(t.current&&t.current.abort(),t.current=new AbortController,t.current.signal),[])}function ol(e){const t=Qn(e);return l.useCallback((r,a)=>{const n=t();return fetch(r,{...a,signal:n})},[t])}function il(e){const t=l.useRef([]),r=l.useRef(e);return l.useEffect(()=>{const a=t.current,n=r.current;return()=>{for(const o of a)try{o()}catch(s){console.error("Error during subscription cleanup:",s)}a.length>0&&_.enabled&&re("subscription-not-unsubscribed",`${a.length} subscription(s) would have leaked without cleanup`,"info",n),t.current=[]}},[]),l.useCallback(a=>{typeof a=="function"?t.current.push(a):a&&typeof a.unsubscribe=="function"&&t.current.push(()=>a.unsubscribe())},[])}function sl(e,t,r){const[a,n]=l.useState(null),[o,s]=l.useState(WebSocket.CLOSED),i=l.useRef(r);l.useEffect(()=>{if(!e)return;const u=new WebSocket(e,t);n(u);const f=i.current;return 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(),_.enabled&&re("websocket-not-closed","WebSocket was auto-closed on unmount","info",f))}},[e,t]);const c=l.useCallback(u=>{(a==null?void 0:a.readyState)===WebSocket.OPEN&&a.send(u)},[a]),d=l.useCallback((u,f)=>{a==null||a.close(u,f)},[a]);return{socket:a,readyState:o,send:c,close:d}}function cl(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>{const o=l.useRef({});return l.useEffect(()=>{if(!_.enabled)return;const s=o.current;return Jt.set(s,{name:r,mountedAt:Date.now()}),()=>{Jt.delete(s)}},[]),x.jsx(e,{...n})};return a.displayName=`LeakTracked(${r})`,a}function ll(e){const t=l.useRef(Date.now());l.useEffect(()=>{_.enabled&&_.logToConsole&&console.log(`%c[NTD] ${e} mounted`,"color: var(--nice-success, #22c55e)");const r=t.current;return()=>{if(_.enabled&&_.logToConsole){const a=Date.now()-r;console.log(`%c[NTD] ${e} unmounted (lifetime: ${a}ms)`,"color: var(--nice-warning, #f59e0b)")}}},[e])}async function dl(e){if(!Mt)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 ul(){Mt&&(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 fl(e=5e3,t=100){const[r,a]=l.useState({usedMB:0,totalMB:0,limitMB:0,isWarning:!1});return l.useEffect(()=>{const n=window.performance;if(!n.memory)return;const o=()=>{const i=n.memory;if(!i)return;const c=i.usedJSHeapSize/1024/1024,d=i.totalJSHeapSize/1024/1024,u=i.jsHeapSizeLimit/1024/1024,f=c>t;a({usedMB:c,totalMB:d,limitMB:u,isWarning:f}),f&&_.enabled&&re("large-closure",`Memory usage exceeded ${t}MB (${c.toFixed(2)}MB)`,"warning")};o();const s=setInterval(o,e);return()=>clearInterval(s)},[e,t]),r}const ml=Object.assign(()=>{const e=l.useMemo(()=>Jn(),[]),t=Object.values(e).reduce((r,a)=>r+a,0);return!_.enabled||t===0,null},{displayName:"NiceLeakDetectorStatus"});function pl(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 gl(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 yl(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 hl(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 bl(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 Sl(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 c=JSON.parse(o.data);c.type==="data"&&((s=c.payload)!=null&&s.data)&&(r=(e.extractData??(u=>{const f=u,h=Object.keys(f)[0];return h?f[h]:[]}))(c.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 vl(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=[],c=[];for(const[u,f]of Object.entries(o.properties??{})){const h=Tt(f),b=f.title??It(u);i.push({dataField:u,caption:b,dataType:h,allowEditing:!f.readOnly,visible:!u.toLowerCase().endsWith("id")||u==="id",...f.enum?{lookup:{dataSource:f.enum,valueExpr:"this",displayExpr:"this"}}:{}}),c.push({dataField:u,label:b,editorType:Zn(f,h),isRequired:s.has(u),editorOptions:eo(f),...s.has(u)?{validationRules:[{type:"required",message:`${b} jest wymagane`}]}:{}})}return{columns:i,formFields:c,schema:o}}function xl(e){const t=[];for(const[r,a]of Object.entries(e.properties??{}))t.push({dataField:r,caption:a.title??It(r),dataType:Tt(a),allowEditing:!a.readOnly});return t}function wl(e){const t=new Set(e.required??[]),r=[];for(const[a,n]of Object.entries(e.properties??{})){const o=Tt(n);r.push({dataField:a,label:n.title??It(a),editorType:Zn(n,o),isRequired:t.has(a),editorOptions:eo(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 Zn(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"||t==="datetime"?"NiceDateTimePicker":e.maxLength&&e.maxLength>200?"NiceTextArea":"NiceTextInput"}function eo(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 It(e){return e.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim()}const to={enabled:!0,defaultExpanded:!1,showHelpIcon:!0,position:"tooltip",locale:"en"},kl=async(e,t)=>{try{return null}catch{return null}},ro=l.createContext(null),ao=({children:e,config:t,helpContent:r})=>{const[a,n]=l.useState({...to,...t}),[o,s]=l.useState(new Set),[i,c]=l.useState(()=>new Map(Object.entries(r||{}))),d=l.useCallback(g=>{n(S=>({...S,...g}))},[]),u=l.useCallback(()=>{n(g=>({...g,enabled:!g.enabled}))},[]),f=l.useCallback(g=>{s(S=>new Set(S).add(g))},[]),h=l.useCallback(g=>{s(S=>{const y=new Set(S);return y.delete(g),y})},[]),b=l.useCallback(g=>a.enabled&&!o.has(g),[a.enabled,o]),p=l.useCallback(async g=>{if(i.has(g))return i.get(g)||null;const y=await(a.contentLoader||kl)(g,a.locale);return y&&c(v=>new Map(v).set(g,y)),y},[i,a.contentLoader,a.locale]),m=l.useMemo(()=>({config:a,setConfig:d,toggleGlobalHelp:u,disabledComponents:o,disableComponentHelp:f,enableComponentHelp:h,isHelpEnabled:b,getHelpContent:p,helpCache:i}),[a,d,u,o,f,h,b,p,i]);return x.jsx(ro.Provider,{value:m,children:e})};process.env.NODE_ENV!=="production"&&(ao.displayName="NiceHelpProvider");function no(){const e=l.useContext(ro);return e||{config:to,setConfig:()=>{},toggleGlobalHelp:()=>{},disabledComponents:new Set,disableComponentHelp:()=>{},enableComponentHelp:()=>{},isHelpEnabled:()=>!0,getHelpContent:async()=>null,helpCache:new Map}}function oo(e){const{isHelpEnabled:t,getHelpContent:r,helpCache:a,config:n}=no(),[o,s]=l.useState(a.get(e)||null),[i,c]=l.useState(!1),d=t(e),u=l.useCallback(async()=>{if(!d)return;c(!0);const f=await r(e);s(f),c(!1)},[d,e,r]);return{content:o,loading:i,enabled:d,loadContent:u,position:n.position,defaultExpanded:n.defaultExpanded,showHelpIcon:n.showHelpIcon}}const io=({props:e,compact:t})=>{const{t:r}=j.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))})]})]})},dt=({tips:e})=>{const{t}=j.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:x.jsx(N.NiceIcon,{name:"lightbulb",size:14})}),r]},a))})]})},Cl=({examples:e})=>{var n,o;const{t}=j.useNiceTranslation(),[r,a]=l.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})})]})},so=({componentName:e,content:t,children:r,position:a,defaultExpanded:n,disabled:o=!1,className:s,icon:i,title:c,showProps:d=!0,showExamples:u=!1,showTips:f=!0,compact:h=!1})=>{const{t:b}=j.useNiceTranslation(),{content:p,loading:m,enabled:g,loadContent:S,position:y,defaultExpanded:v,showHelpIcon:k}=oo(e),E=t||p,w=a||y,C=n??v,[A,M]=l.useState(C);return l.useEffect(()=>{g&&!t&&!p&&S()},[g,t,p,S]),o||!g?x.jsx(x.Fragment,{children:r}):w==="tooltip"?x.jsxs("div",{className:`nice-help-tooltip-wrapper ${s||""}`,children:[r,k&&E&&x.jsx("button",{className:"nice-help__trigger",onClick:()=>M(!A),"aria-label":b("help.toggle","Toggle help"),"aria-expanded":A,children:i||x.jsx(N.NiceIcon,{name:"help",size:16})}),A&&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:c||E.name}),x.jsx("p",{className:"nice-help__description",children:E.description}),f&&E.tips&&x.jsx(dt,{tips:E.tips}),d&&E.props&&x.jsx(io,{props:E.props,compact:!0})]})})]}):x.jsxs("div",{className:`nice-help ${w==="bottom"?"nice-help--bottom":""} ${s||""}`,children:[w==="top"&&E&&x.jsx(Qt,{content:E,expanded:A,onToggle:()=>M(!A),loading:m,title:c,showProps:d,showExamples:u,showTips:f,compact:h}),r,w==="bottom"&&E&&x.jsx(Qt,{content:E,expanded:A,onToggle:()=>M(!A),loading:m,title:c,showProps:d,showExamples:u,showTips:f,compact:h}),w==="inline"&&E&&A&&x.jsxs("div",{className:"nice-help__inline",children:[x.jsx("p",{className:"nice-help__description",children:E.description}),f&&E.tips&&x.jsx(dt,{tips:E.tips})]})]})};process.env.NODE_ENV!=="production"&&(so.displayName="NiceInlineHelp");const Qt=({content:e,expanded:t,onToggle:r,loading:a,title:n,showProps:o,showExamples:s,showTips:i,compact:c})=>{const{t:d}=j.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:x.jsx(N.NiceIcon,{name:t?"chevron-down":"chevron-right",size:14})}),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(dt,{tips:e.tips}),o&&e.props&&x.jsx(io,{props:e.props,compact:c}),s&&e.examples&&x.jsx(Cl,{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))})]})]})]})},co=({text:e,position:t="top",className:r,children:a})=>{const[n,o]=l.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})]})};process.env.NODE_ENV!=="production"&&(co.displayName="NiceQuickHelp");const lo=({content:e,size:t="sm",className:r,onOpen:a})=>{const{t:n}=j.useNiceTranslation(),[o,s]=l.useState(!1),i=l.useCallback(()=>{s(!o),!o&&a&&a()},[o,a]),c=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(N.NiceIcon,{name:"help",size:16})}),o&&x.jsxs("div",{className:"nice-help-icon__popup",children:[d&&x.jsx("strong",{children:d}),x.jsx("p",{children:c}),x.jsx("button",{"aria-label":n("help.close","Close"),className:"nice-help-icon__close",onClick:()=>s(!1),children:x.jsx(N.NiceIcon,{name:"close",size:14})})]})]})};process.env.NODE_ENV!=="production"&&(lo.displayName="NiceHelpIcon");const Rt=l.createContext({enabled:!0,active:!1,run:()=>{}}),El=({enabled:e=!0,active:t=!1,onRun:r,children:a})=>{const n=l.useMemo(()=>({enabled:e,active:t,run:r??(()=>{})}),[e,t,r]);return x.jsx(Rt.Provider,{value:n,children:a})};function uo(){return l.useContext(Rt)}function Nl(){return l.useContext(Rt).enabled}function Al(e,t){if(!e)return null;if(e===!0)return t&&t.length>0?t:null;if(Array.isArray(e))return e.length>0?e:null;const r=e.steps??t;return r&&r.length>0?r:null}function fo(e,t){return e.map(r=>({target:r.target,title:r.titleKey?t(r.titleKey,r.title??""):r.title??"",content:r.contentKey?t(r.contentKey,r.content??""):r.content??"",placement:r.placement,highlightPadding:r.highlightPadding,showArrow:r.showArrow,scrollIntoView:r.scrollIntoView,disableInteraction:r.disableInteraction}))}const Ml=({steps:e,autoStart:t,label:r,size:a="md",className:n,style:o,"data-testid":s})=>{Tl();const{enabled:i,run:c}=uo(),{t:d}=j.useNiceTranslation();if(!i||!e||e.length===0)return null;const u=r??d("tutorial.startAria","Start tutorial");return x.jsx("button",{type:"button",className:`nice-tutorial-button nice-tutorial-button--${a}`+(n?` ${n}`:""),style:o,"data-testid":s,"aria-label":u,title:u,onClick:()=>c(fo(e,d),{autoStart:t}),children:"?"})},Zt="nice-tutorial-button-styles";function Tl(){if(typeof document>"u"||document.getElementById(Zt))return;const e=document.createElement("style");e.id=Zt,e.textContent=`
40
+ `))??""}}function tt(e,t,r){return`${e.__ntd_id??Math.random()}-${t}-${r.toString().slice(0,50)}`}function re(e,t,r="warning",a,n){var s,i;if(!_.enabled||!al()||a&&((s=_.ignoreComponents)!=null&&s.includes(a)))return;const o={id:`leak-${rl++}`,type:e,severity:r,componentName:a,message:t,stack:Ye(),timestamp:Date.now(),data:n};qe.push(o),_.logToConsole&&console[r==="critical"?"error":r==="warning"?"warn":"info"](`%c[NTD Leak Detector] ${e}`,`color: ${r==="critical"?"var(--nice-color-error, #dc2626)":r==="warning"?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-primary, #3b82f6)"}; font-weight: bold`,t,a?`(${a})`:"",""),(i=_.onLeak)==null||i.call(_,o)}function nl(e){_={..._,...e}}function ol(){return[...qe]}function il(){qe.length=0}function Zn(){return qe.reduce((e,t)=>(e[t.type]=(e[t.type]||0)+1,e),{})}function sl(e,t){const[r,a]=l.useState(e),n=l.useRef(!0),o=l.useRef(t);l.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]);const s=l.useCallback(i=>{n.current?a(i):_.enabled&&re("setState-after-unmount","setState called on unmounted component","warning",o.current)},[]);return[r,s]}function cl(e){const t=l.useRef(null),r=l.useRef(e),a=l.useCallback(()=>{t.current&&(clearTimeout(t.current),_.enabled&&_e.delete(t.current),t.current=null)},[]),n=l.useCallback((o,s)=>{a(),t.current=setTimeout(o,s),_.enabled&&_e.set(t.current,{id:t.current,type:"timeout",componentName:r.current,stack:Ye(),createdAt:Date.now()})},[a]);return l.useEffect(()=>{const o=r.current;return()=>{t.current&&(_.enabled&&re("timer-not-cleared","Timeout would have leaked without cleanup","info",o),a())}},[a]),[n,a]}function ll(e){const t=l.useRef(null),r=l.useRef(e),a=l.useCallback(()=>{t.current&&(clearInterval(t.current),_.enabled&&_e.delete(t.current),t.current=null)},[]),n=l.useCallback((o,s)=>{a(),t.current=setInterval(o,s),_.enabled&&_e.set(t.current,{id:t.current,type:"interval",componentName:r.current,stack:Ye(),createdAt:Date.now()})},[a]);return l.useEffect(()=>{const o=r.current;return()=>{t.current&&(_.enabled&&re("timer-not-cleared","Interval would have leaked without cleanup","warning",o),a())}},[a]),[n,a]}function dl(e){const t=l.useRef([]),r=l.useRef(e);return l.useEffect(()=>{const a=t.current,n=r.current;return()=>{for(const{target:o,type:s,listener:i,options:c}of a)if(o.removeEventListener(s,i,c),_.enabled){const d=tt(o,s,i);et.delete(d)}a.length>0&&_.enabled&&re("listener-not-removed",`${a.length} event listener(s) would have leaked without cleanup`,"info",n),t.current=[]}},[]),l.useCallback((a,n,o,s)=>{if(a.addEventListener(n,o,s),t.current.push({target:a,type:n,listener:o,options:s}),_.enabled){const i=tt(a,n,o);et.set(i,{target:a,type:n,listener:o,componentName:r.current,stack:Ye(),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),_.enabled){const i=tt(a,n,o);et.delete(i)}}},[])}function eo(e){const t=l.useRef(null),r=l.useRef(e);return l.useEffect(()=>{const a=r.current;return()=>{t.current&&!t.current.signal.aborted&&(t.current.abort(),_.enabled&&re("abort-controller-not-aborted","AbortController was auto-aborted on unmount (fetch may have leaked)","info",a))}},[]),l.useCallback(()=>(t.current&&t.current.abort(),t.current=new AbortController,t.current.signal),[])}function ul(e){const t=eo(e);return l.useCallback((r,a)=>{const n=t();return fetch(r,{...a,signal:n})},[t])}function fl(e){const t=l.useRef([]),r=l.useRef(e);return l.useEffect(()=>{const a=t.current,n=r.current;return()=>{for(const o of a)try{o()}catch(s){console.error("Error during subscription cleanup:",s)}a.length>0&&_.enabled&&re("subscription-not-unsubscribed",`${a.length} subscription(s) would have leaked without cleanup`,"info",n),t.current=[]}},[]),l.useCallback(a=>{typeof a=="function"?t.current.push(a):a&&typeof a.unsubscribe=="function"&&t.current.push(()=>a.unsubscribe())},[])}function ml(e,t,r){const[a,n]=l.useState(null),[o,s]=l.useState(WebSocket.CLOSED),i=l.useRef(r);l.useEffect(()=>{if(!e)return;const u=new WebSocket(e,t);n(u);const f=i.current;return 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(),_.enabled&&re("websocket-not-closed","WebSocket was auto-closed on unmount","info",f))}},[e,t]);const c=l.useCallback(u=>{(a==null?void 0:a.readyState)===WebSocket.OPEN&&a.send(u)},[a]),d=l.useCallback((u,f)=>{a==null||a.close(u,f)},[a]);return{socket:a,readyState:o,send:c,close:d}}function pl(e,t){const r=t||e.displayName||e.name||"Unknown",a=n=>{const o=l.useRef({});return l.useEffect(()=>{if(!_.enabled)return;const s=o.current;return Jt.set(s,{name:r,mountedAt:Date.now()}),()=>{Jt.delete(s)}},[]),x.jsx(e,{...n})};return a.displayName=`LeakTracked(${r})`,a}function gl(e){const t=l.useRef(Date.now());l.useEffect(()=>{_.enabled&&_.logToConsole&&console.log(`%c[NTD] ${e} mounted`,"color: var(--nice-success, #22c55e)");const r=t.current;return()=>{if(_.enabled&&_.logToConsole){const a=Date.now()-r;console.log(`%c[NTD] ${e} unmounted (lifetime: ${a}ms)`,"color: var(--nice-warning, #f59e0b)")}}},[e])}async function yl(e){if(!Mt)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 hl(){Mt&&(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 bl(e=5e3,t=100){const[r,a]=l.useState({usedMB:0,totalMB:0,limitMB:0,isWarning:!1});return l.useEffect(()=>{const n=window.performance;if(!n.memory)return;const o=()=>{const i=n.memory;if(!i)return;const c=i.usedJSHeapSize/1024/1024,d=i.totalJSHeapSize/1024/1024,u=i.jsHeapSizeLimit/1024/1024,f=c>t;a({usedMB:c,totalMB:d,limitMB:u,isWarning:f}),f&&_.enabled&&re("large-closure",`Memory usage exceeded ${t}MB (${c.toFixed(2)}MB)`,"warning")};o();const s=setInterval(o,e);return()=>clearInterval(s)},[e,t]),r}const Sl=Object.assign(()=>{const e=l.useMemo(()=>Zn(),[]),t=Object.values(e).reduce((r,a)=>r+a,0);return!_.enabled||t===0,null},{displayName:"NiceLeakDetectorStatus"});function vl(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 xl(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 wl(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 kl(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 Cl(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 El(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 c=JSON.parse(o.data);c.type==="data"&&((s=c.payload)!=null&&s.data)&&(r=(e.extractData??(u=>{const f=u,h=Object.keys(f)[0];return h?f[h]:[]}))(c.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 Nl(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=[],c=[];for(const[u,f]of Object.entries(o.properties??{})){const h=Tt(f),b=f.title??It(u);i.push({dataField:u,caption:b,dataType:h,allowEditing:!f.readOnly,visible:!u.toLowerCase().endsWith("id")||u==="id",...f.enum?{lookup:{dataSource:f.enum,valueExpr:"this",displayExpr:"this"}}:{}}),c.push({dataField:u,label:b,editorType:to(f,h),isRequired:s.has(u),editorOptions:ro(f),...s.has(u)?{validationRules:[{type:"required",message:`${b} jest wymagane`}]}:{}})}return{columns:i,formFields:c,schema:o}}function Al(e){const t=[];for(const[r,a]of Object.entries(e.properties??{}))t.push({dataField:r,caption:a.title??It(r),dataType:Tt(a),allowEditing:!a.readOnly});return t}function Ml(e){const t=new Set(e.required??[]),r=[];for(const[a,n]of Object.entries(e.properties??{})){const o=Tt(n);r.push({dataField:a,label:n.title??It(a),editorType:to(n,o),isRequired:t.has(a),editorOptions:ro(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 to(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"||t==="datetime"?"NiceDateTimePicker":e.maxLength&&e.maxLength>200?"NiceTextArea":"NiceTextInput"}function ro(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 It(e){return e.replace(/([A-Z])/g," $1").replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase()).trim()}const ao={enabled:!0,defaultExpanded:!1,showHelpIcon:!0,position:"tooltip",locale:"en"},Tl=async(e,t)=>{try{return null}catch{return null}},no=l.createContext(null),oo=({children:e,config:t,helpContent:r})=>{const[a,n]=l.useState({...ao,...t}),[o,s]=l.useState(new Set),[i,c]=l.useState(()=>new Map(Object.entries(r||{}))),d=l.useCallback(g=>{n(S=>({...S,...g}))},[]),u=l.useCallback(()=>{n(g=>({...g,enabled:!g.enabled}))},[]),f=l.useCallback(g=>{s(S=>new Set(S).add(g))},[]),h=l.useCallback(g=>{s(S=>{const y=new Set(S);return y.delete(g),y})},[]),b=l.useCallback(g=>a.enabled&&!o.has(g),[a.enabled,o]),p=l.useCallback(async g=>{if(i.has(g))return i.get(g)||null;const y=await(a.contentLoader||Tl)(g,a.locale);return y&&c(v=>new Map(v).set(g,y)),y},[i,a.contentLoader,a.locale]),m=l.useMemo(()=>({config:a,setConfig:d,toggleGlobalHelp:u,disabledComponents:o,disableComponentHelp:f,enableComponentHelp:h,isHelpEnabled:b,getHelpContent:p,helpCache:i}),[a,d,u,o,f,h,b,p,i]);return x.jsx(no.Provider,{value:m,children:e})};process.env.NODE_ENV!=="production"&&(oo.displayName="NiceHelpProvider");function io(){const e=l.useContext(no);return e||{config:ao,setConfig:()=>{},toggleGlobalHelp:()=>{},disabledComponents:new Set,disableComponentHelp:()=>{},enableComponentHelp:()=>{},isHelpEnabled:()=>!0,getHelpContent:async()=>null,helpCache:new Map}}function so(e){const{isHelpEnabled:t,getHelpContent:r,helpCache:a,config:n}=io(),[o,s]=l.useState(a.get(e)||null),[i,c]=l.useState(!1),d=t(e),u=l.useCallback(async()=>{if(!d)return;c(!0);const f=await r(e);s(f),c(!1)},[d,e,r]);return{content:o,loading:i,enabled:d,loadContent:u,position:n.position,defaultExpanded:n.defaultExpanded,showHelpIcon:n.showHelpIcon}}const co=({props:e,compact:t})=>{const{t:r}=j.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))})]})]})},dt=({tips:e})=>{const{t}=j.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:x.jsx(N.NiceIcon,{name:"lightbulb",size:14})}),r]},a))})]})},Il=({examples:e})=>{var n,o;const{t}=j.useNiceTranslation(),[r,a]=l.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})})]})},lo=({componentName:e,content:t,children:r,position:a,defaultExpanded:n,disabled:o=!1,className:s,icon:i,title:c,showProps:d=!0,showExamples:u=!1,showTips:f=!0,compact:h=!1})=>{const{t:b}=j.useNiceTranslation(),{content:p,loading:m,enabled:g,loadContent:S,position:y,defaultExpanded:v,showHelpIcon:k}=so(e),E=t||p,w=a||y,C=n??v,[A,M]=l.useState(C);return l.useEffect(()=>{g&&!t&&!p&&S()},[g,t,p,S]),o||!g?x.jsx(x.Fragment,{children:r}):w==="tooltip"?x.jsxs("div",{className:`nice-help-tooltip-wrapper ${s||""}`,children:[r,k&&E&&x.jsx("button",{className:"nice-help__trigger",onClick:()=>M(!A),"aria-label":b("help.toggle","Toggle help"),"aria-expanded":A,children:i||x.jsx(N.NiceIcon,{name:"help",size:16})}),A&&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:c||E.name}),x.jsx("p",{className:"nice-help__description",children:E.description}),f&&E.tips&&x.jsx(dt,{tips:E.tips}),d&&E.props&&x.jsx(co,{props:E.props,compact:!0})]})})]}):x.jsxs("div",{className:`nice-help ${w==="bottom"?"nice-help--bottom":""} ${s||""}`,children:[w==="top"&&E&&x.jsx(Qt,{content:E,expanded:A,onToggle:()=>M(!A),loading:m,title:c,showProps:d,showExamples:u,showTips:f,compact:h}),r,w==="bottom"&&E&&x.jsx(Qt,{content:E,expanded:A,onToggle:()=>M(!A),loading:m,title:c,showProps:d,showExamples:u,showTips:f,compact:h}),w==="inline"&&E&&A&&x.jsxs("div",{className:"nice-help__inline",children:[x.jsx("p",{className:"nice-help__description",children:E.description}),f&&E.tips&&x.jsx(dt,{tips:E.tips})]})]})};process.env.NODE_ENV!=="production"&&(lo.displayName="NiceInlineHelp");const Qt=({content:e,expanded:t,onToggle:r,loading:a,title:n,showProps:o,showExamples:s,showTips:i,compact:c})=>{const{t:d}=j.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:x.jsx(N.NiceIcon,{name:t?"chevron-down":"chevron-right",size:14})}),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(dt,{tips:e.tips}),o&&e.props&&x.jsx(co,{props:e.props,compact:c}),s&&e.examples&&x.jsx(Il,{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))})]})]})]})},uo=({text:e,position:t="top",className:r,children:a})=>{const[n,o]=l.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})]})};process.env.NODE_ENV!=="production"&&(uo.displayName="NiceQuickHelp");const fo=({content:e,size:t="sm",className:r,onOpen:a})=>{const{t:n}=j.useNiceTranslation(),[o,s]=l.useState(!1),i=l.useCallback(()=>{s(!o),!o&&a&&a()},[o,a]),c=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(N.NiceIcon,{name:"help",size:16})}),o&&x.jsxs("div",{className:"nice-help-icon__popup",children:[d&&x.jsx("strong",{children:d}),x.jsx("p",{children:c}),x.jsx("button",{"aria-label":n("help.close","Close"),className:"nice-help-icon__close",onClick:()=>s(!1),children:x.jsx(N.NiceIcon,{name:"close",size:14})})]})]})};process.env.NODE_ENV!=="production"&&(fo.displayName="NiceHelpIcon");const Rt=l.createContext({enabled:!0,active:!1,run:()=>{}}),Rl=({enabled:e=!0,active:t=!1,onRun:r,children:a})=>{const n=l.useMemo(()=>({enabled:e,active:t,run:r??(()=>{})}),[e,t,r]);return x.jsx(Rt.Provider,{value:n,children:a})};function mo(){return l.useContext(Rt)}function Ll(){return l.useContext(Rt).enabled}function Fl(e,t){if(!e)return null;if(e===!0)return t&&t.length>0?t:null;if(Array.isArray(e))return e.length>0?e:null;const r=e.steps??t;return r&&r.length>0?r:null}function po(e,t){return e.map(r=>({target:r.target,title:r.titleKey?t(r.titleKey,r.title??""):r.title??"",content:r.contentKey?t(r.contentKey,r.content??""):r.content??"",placement:r.placement,highlightPadding:r.highlightPadding,showArrow:r.showArrow,scrollIntoView:r.scrollIntoView,disableInteraction:r.disableInteraction}))}const Dl=({steps:e,autoStart:t,label:r,size:a="md",className:n,style:o,"data-testid":s})=>{Pl();const{enabled:i,run:c}=mo(),{t:d}=j.useNiceTranslation();if(!i||!e||e.length===0)return null;const u=r??d("tutorial.startAria","Start tutorial");return x.jsx("button",{type:"button",className:`nice-tutorial-button nice-tutorial-button--${a}`+(n?` ${n}`:""),style:o,"data-testid":s,"aria-label":u,title:u,onClick:()=>c(po(e,d),{autoStart:t}),children:"?"})},Zt="nice-tutorial-button-styles";function Pl(){if(typeof document>"u"||document.getElementById(Zt))return;const e=document.createElement("style");e.id=Zt,e.textContent=`
41
41
  .nice-tutorial-button {
42
42
  display: inline-flex;
43
43
  align-items: center;
@@ -63,8 +63,8 @@
63
63
  }
64
64
  .nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
65
65
  .nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
66
- `,document.head.appendChild(e)}const Il={cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"traceless",source:"default",requiresConsentBanner:!1,resolvedAt:Date.now(),version:"1.0.0"},mo={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}},pe=["traceless","ephemeral","private","balanced","full","custom"];function Rl(e,t){const r=pe.indexOf(e),a=pe.indexOf(t);return r<=a?e:t}function De(e,t){const r=pe.indexOf(e),a=pe.indexOf(t);return r<=a}function Ll(e,t,r,a){let n=e.defaultMode,o="instance";t&&e.allowTenantOverride&&De(t.mode,n)&&(n=t.mode,o="tenant"),r&&(t!=null&&t.allowGroupOverride)&&De(r.mode,n)&&(n=r.mode,o="group"),a&&(t!=null&&t.allowUserOverride||r!=null&&r.allowUserLockdown)&&De(a.preferredMode,n)&&(n=a.preferredMode,o="user");const s=mo[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=Lt(i),i.requiresConsentBanner=po(i),i}function Lt(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 po(e){return!e.cookiesAllowed&&!e.localStorageAllowed?!1:e.effectiveMode==="full"||e.effectiveMode==="balanced"}const go=new Map;class yo{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 go}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 Fl(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=Lt(o),o.source="control",o}function Dl(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:Pl(e)}}function Pl(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 zl(e){const{effectiveMode:t}=e;switch(t){case"traceless":return{mode:"traceless",icon:"eye-off",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:"clock",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:"lock",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:"scale",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:"database",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:"settings",color:"var(--nice-text-secondary, #6b7280)",label:"Custom",tooltip:"Custom storage configuration.",cssClass:"nice-traceless-badge--custom"}}}function $l(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 Hl="X-OmniVerk-Storage-Policy";function _l(e){const t=e.toLowerCase().trim();return pe.includes(t)?t:null}function Ol(e){return e.effectiveMode}function Bl(e,t){return new yo(e,t)}function jl(e){return{maxCookies:!1,maxLocalStorage:!1,maxSessionStorage:!0,defaultMode:"ephemeral",allowTenantOverride:!1,instanceId:e}}function Wl(e){return{maxCookies:!0,maxLocalStorage:!0,maxSessionStorage:!0,defaultMode:"balanced",allowTenantOverride:!0,instanceId:e}}function Vl(){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{}go.clear()}function Kl(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 ho=l.createContext(null),Ul=({config:e,children:t})=>{const[r,a]=l.useState(!1),[n,o]=l.useState(null),s=l.useRef(null);l.useEffect(()=>()=>{var p;(p=s.current)==null||p.abort()},[]);const i=l.useCallback(()=>{var p;(p=s.current)==null||p.abort(),s.current=null,a(!1)},[]),c=async(p,m,g)=>{var v,k,E,w,C,A;const S=new TextDecoder;let y="";for(;;){const{done:M,value:I}=await p.read();if(M)break;y+=S.decode(I,{stream:!0});const $=y.split(`
67
- `);y=$.pop()||"";for(const T of $)if(T.startsWith("data: ")){const D=T.slice(6).trim();if(D==="[DONE]"){m({content:"",done:!0});return}try{const F=JSON.parse(D);let P="",L=!1;g==="openai"||g==="azure-openai"?(P=((E=(k=(v=F.choices)==null?void 0:v[0])==null?void 0:k.delta)==null?void 0:E.content)||"",L=((C=(w=F.choices)==null?void 0:w[0])==null?void 0:C.finish_reason)==="stop"):g==="anthropic"&&(F.type==="content_block_delta"?P=((A=F.delta)==null?void 0:A.text)||"":F.type==="message_stop"&&(L=!0)),(P||L)&&m({content:P,done:L})}catch{}}}m({content:"",done:!0})},d=l.useCallback((p,m)=>{var g;return{model:m.model||e.defaultModel||"gpt-4",messages:m.systemPrompt?[{role:"system",content:m.systemPrompt},...p]:p,temperature:m.temperature??.7,max_tokens:m.maxTokens,stop:m.stop,stream:m.stream??!1,tools:(g=m.tools)==null?void 0:g.map(S=>({type:"function",function:{name:S.name,description:S.description,parameters:S.parameters}}))}},[e.defaultModel]),u=l.useCallback((p,m)=>{var y;const g=m.systemPrompt||((y=p.find(v=>v.role==="system"))==null?void 0:y.content),S=p.filter(v=>v.role!=="system");return{model:m.model||e.defaultModel||"claude-3-opus-20240229",max_tokens:m.maxTokens||4096,system:g,messages:S.map(v=>({role:v.role==="assistant"?"assistant":"user",content:v.content})),temperature:m.temperature??.7,stop_sequences:m.stop,stream:m.stream??!1}},[e.defaultModel]),f=l.useCallback(async(p,m={})=>{var g,S,y,v,k,E;if(e.provider==="custom"&&e.customHandler)return e.customHandler(p,m);a(!0),o(null),s.current=new AbortController;try{let w,C,A;if(e.provider==="openai")w=e.endpoint||"https://api.openai.com/v1/chat/completions",C={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},A=d(p,{...m,stream:!1});else if(e.provider==="azure-openai")w=e.endpoint||"",C={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},A=d(p,{...m,stream:!1});else if(e.provider==="anthropic")w=e.endpoint||"https://api.anthropic.com/v1/messages",C={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},A=u(p,{...m,stream:!1});else throw new Error(`Unsupported provider: ${e.provider}`);const M=await fetch(w,{method:"POST",headers:C,body:JSON.stringify(A),signal:s.current.signal});if(!M.ok){const T=await M.text();throw new Error(`AI request failed: ${M.status} ${T}`)}const I=await M.json();let $;if(e.provider==="openai"||e.provider==="azure-openai"){const T=(g=I.choices)==null?void 0:g[0];$={content:((S=T==null?void 0:T.message)==null?void 0:S.content)||"",finishReason:(T==null?void 0:T.finish_reason)||"stop",toolCalls:(v=(y=T==null?void 0:T.message)==null?void 0:y.tool_calls)==null?void 0:v.map(D=>({id:D.id,name:D.function.name,arguments:JSON.parse(D.function.arguments)})),usage:I.usage&&{promptTokens:I.usage.prompt_tokens,completionTokens:I.usage.completion_tokens,totalTokens:I.usage.total_tokens}}}else e.provider==="anthropic"?$={content:((E=(k=I.content)==null?void 0:k[0])==null?void 0:E.text)||"",finishReason:I.stop_reason||"stop",usage:I.usage&&{promptTokens:I.usage.input_tokens,completionTokens:I.usage.output_tokens,totalTokens:I.usage.input_tokens+I.usage.output_tokens}}:$={content:"",finishReason:"stop"};return $}catch(w){throw w.name==="AbortError"?new Error("Request cancelled"):(o(w),w)}finally{a(!1)}},[e,d,u]),h=l.useCallback(async(p,m,g={})=>{if(e.provider==="custom"&&e.customStreamHandler)return e.customStreamHandler(p,g,m);a(!0),o(null),s.current=new AbortController;try{let S,y,v;if(e.provider==="openai")S=e.endpoint||"https://api.openai.com/v1/chat/completions",y={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},v=d(p,{...g,stream:!0});else if(e.provider==="azure-openai")S=e.endpoint||"",y={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},v=d(p,{...g,stream:!0});else if(e.provider==="anthropic")S=e.endpoint||"https://api.anthropic.com/v1/messages",y={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},v=u(p,{...g,stream:!0});else throw new Error(`Unsupported provider: ${e.provider}`);const k=await fetch(S,{method:"POST",headers:y,body:JSON.stringify(v),signal:s.current.signal});if(!k.ok){const w=await k.text();throw new Error(`AI request failed: ${k.status} ${w}`)}if(!k.body)throw new Error("Response body is null");const E=k.body.getReader();await c(E,m,e.provider)}catch(S){if(S.name==="AbortError"){m({content:"",done:!0});return}throw o(S),S}finally{a(!1)}},[e,d,u]),b={isConfigured:!!e.apiKey||e.provider==="custom"||e.provider==="local",provider:e.provider,defaultModel:e.defaultModel||null,complete:f,stream:h,cancel:i,isLoading:r,error:n};return x.jsx(ho.Provider,{value:b,children:t})};function de(){const e=l.useContext(ho);if(!e)throw new Error("useNiceAI must be used within a NiceAIProvider");return e}function Xl(e={}){const t=de(),[r,a]=l.useState(""),[n,o]=l.useState([]),[s,i]=l.useState(!1),[c,d]=l.useState(null),u=l.useCallback(async m=>{i(!0),d(null),a("");const g=[...n,{role:"user",content:m}];try{const S=await t.complete(g,{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature});return o([...g,{role:"assistant",content:S.content}]),a(S.content),S.content}catch(S){throw d(S),S}finally{i(!1)}},[t,n,e]),f=l.useCallback(async(m,g)=>{i(!0),d(null),a("");const S=[...n,{role:"user",content:m}];try{let y="";return await t.stream(S,v=>{v.done||(y+=v.content,a(y),g==null||g(v.content))},{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature}),o([...S,{role:"assistant",content:y}]),y}catch(y){throw d(y),y}finally{i(!1)}},[t,n,e]),h=l.useCallback(()=>{a(""),d(null)},[]),b=l.useCallback(()=>{o([]),a(""),d(null)},[]),p=l.useCallback(()=>{t.cancel(),i(!1)},[t]);return{response:r,isLoading:s,error:c,send:u,sendStreaming:f,clear:h,cancel:p,history:n,clearHistory:b}}function Gl(e={}){const t=de(),[r,a]=l.useState(""),[n,o]=l.useState(!1),s=l.useCallback(async(u,f="")=>{o(!0),a("");try{const b=(await t.complete([{role:"user",content:`Complete the following ${e.language||""} code. Return ONLY the completion text, no explanation.
66
+ `,document.head.appendChild(e)}const zl={cookiesAllowed:!1,localStorageAllowed:!1,sessionStorageAllowed:!1,strictAuthCookieOnly:!1,effectiveMode:"traceless",source:"default",requiresConsentBanner:!1,resolvedAt:Date.now(),version:"1.0.0"},go={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}},pe=["traceless","ephemeral","private","balanced","full","custom"];function $l(e,t){const r=pe.indexOf(e),a=pe.indexOf(t);return r<=a?e:t}function De(e,t){const r=pe.indexOf(e),a=pe.indexOf(t);return r<=a}function Hl(e,t,r,a){let n=e.defaultMode,o="instance";t&&e.allowTenantOverride&&De(t.mode,n)&&(n=t.mode,o="tenant"),r&&(t!=null&&t.allowGroupOverride)&&De(r.mode,n)&&(n=r.mode,o="group"),a&&(t!=null&&t.allowUserOverride||r!=null&&r.allowUserLockdown)&&De(a.preferredMode,n)&&(n=a.preferredMode,o="user");const s=go[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=Lt(i),i.requiresConsentBanner=yo(i),i}function Lt(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 yo(e){return!e.cookiesAllowed&&!e.localStorageAllowed?!1:e.effectiveMode==="full"||e.effectiveMode==="balanced"}const ho=new Map;class bo{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 ho}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 _l(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=Lt(o),o.source="control",o}function Ol(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:Bl(e)}}function Bl(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 jl(e){const{effectiveMode:t}=e;switch(t){case"traceless":return{mode:"traceless",icon:"eye-off",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:"clock",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:"lock",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:"scale",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:"database",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:"settings",color:"var(--nice-text-secondary, #6b7280)",label:"Custom",tooltip:"Custom storage configuration.",cssClass:"nice-traceless-badge--custom"}}}function Wl(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 Vl="X-OmniVerk-Storage-Policy";function Kl(e){const t=e.toLowerCase().trim();return pe.includes(t)?t:null}function Ul(e){return e.effectiveMode}function Xl(e,t){return new bo(e,t)}function Gl(e){return{maxCookies:!1,maxLocalStorage:!1,maxSessionStorage:!0,defaultMode:"ephemeral",allowTenantOverride:!1,instanceId:e}}function ql(e){return{maxCookies:!0,maxLocalStorage:!0,maxSessionStorage:!0,defaultMode:"balanced",allowTenantOverride:!0,instanceId:e}}function Yl(){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{}ho.clear()}function Jl(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 So=l.createContext(null),Ql=({config:e,children:t})=>{const[r,a]=l.useState(!1),[n,o]=l.useState(null),s=l.useRef(null);l.useEffect(()=>()=>{var p;(p=s.current)==null||p.abort()},[]);const i=l.useCallback(()=>{var p;(p=s.current)==null||p.abort(),s.current=null,a(!1)},[]),c=async(p,m,g)=>{var v,k,E,w,C,A;const S=new TextDecoder;let y="";for(;;){const{done:M,value:I}=await p.read();if(M)break;y+=S.decode(I,{stream:!0});const $=y.split(`
67
+ `);y=$.pop()||"";for(const T of $)if(T.startsWith("data: ")){const D=T.slice(6).trim();if(D==="[DONE]"){m({content:"",done:!0});return}try{const F=JSON.parse(D);let P="",L=!1;g==="openai"||g==="azure-openai"?(P=((E=(k=(v=F.choices)==null?void 0:v[0])==null?void 0:k.delta)==null?void 0:E.content)||"",L=((C=(w=F.choices)==null?void 0:w[0])==null?void 0:C.finish_reason)==="stop"):g==="anthropic"&&(F.type==="content_block_delta"?P=((A=F.delta)==null?void 0:A.text)||"":F.type==="message_stop"&&(L=!0)),(P||L)&&m({content:P,done:L})}catch{}}}m({content:"",done:!0})},d=l.useCallback((p,m)=>{var g;return{model:m.model||e.defaultModel||"gpt-4",messages:m.systemPrompt?[{role:"system",content:m.systemPrompt},...p]:p,temperature:m.temperature??.7,max_tokens:m.maxTokens,stop:m.stop,stream:m.stream??!1,tools:(g=m.tools)==null?void 0:g.map(S=>({type:"function",function:{name:S.name,description:S.description,parameters:S.parameters}}))}},[e.defaultModel]),u=l.useCallback((p,m)=>{var y;const g=m.systemPrompt||((y=p.find(v=>v.role==="system"))==null?void 0:y.content),S=p.filter(v=>v.role!=="system");return{model:m.model||e.defaultModel||"claude-3-opus-20240229",max_tokens:m.maxTokens||4096,system:g,messages:S.map(v=>({role:v.role==="assistant"?"assistant":"user",content:v.content})),temperature:m.temperature??.7,stop_sequences:m.stop,stream:m.stream??!1}},[e.defaultModel]),f=l.useCallback(async(p,m={})=>{var g,S,y,v,k,E;if(e.provider==="custom"&&e.customHandler)return e.customHandler(p,m);a(!0),o(null),s.current=new AbortController;try{let w,C,A;if(e.provider==="openai")w=e.endpoint||"https://api.openai.com/v1/chat/completions",C={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},A=d(p,{...m,stream:!1});else if(e.provider==="azure-openai")w=e.endpoint||"",C={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},A=d(p,{...m,stream:!1});else if(e.provider==="anthropic")w=e.endpoint||"https://api.anthropic.com/v1/messages",C={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},A=u(p,{...m,stream:!1});else throw new Error(`Unsupported provider: ${e.provider}`);const M=await fetch(w,{method:"POST",headers:C,body:JSON.stringify(A),signal:s.current.signal});if(!M.ok){const T=await M.text();throw new Error(`AI request failed: ${M.status} ${T}`)}const I=await M.json();let $;if(e.provider==="openai"||e.provider==="azure-openai"){const T=(g=I.choices)==null?void 0:g[0];$={content:((S=T==null?void 0:T.message)==null?void 0:S.content)||"",finishReason:(T==null?void 0:T.finish_reason)||"stop",toolCalls:(v=(y=T==null?void 0:T.message)==null?void 0:y.tool_calls)==null?void 0:v.map(D=>({id:D.id,name:D.function.name,arguments:JSON.parse(D.function.arguments)})),usage:I.usage&&{promptTokens:I.usage.prompt_tokens,completionTokens:I.usage.completion_tokens,totalTokens:I.usage.total_tokens}}}else e.provider==="anthropic"?$={content:((E=(k=I.content)==null?void 0:k[0])==null?void 0:E.text)||"",finishReason:I.stop_reason||"stop",usage:I.usage&&{promptTokens:I.usage.input_tokens,completionTokens:I.usage.output_tokens,totalTokens:I.usage.input_tokens+I.usage.output_tokens}}:$={content:"",finishReason:"stop"};return $}catch(w){throw w.name==="AbortError"?new Error("Request cancelled"):(o(w),w)}finally{a(!1)}},[e,d,u]),h=l.useCallback(async(p,m,g={})=>{if(e.provider==="custom"&&e.customStreamHandler)return e.customStreamHandler(p,g,m);a(!0),o(null),s.current=new AbortController;try{let S,y,v;if(e.provider==="openai")S=e.endpoint||"https://api.openai.com/v1/chat/completions",y={"Content-Type":"application/json",Authorization:`Bearer ${e.apiKey}`,...e.organizationId&&{"OpenAI-Organization":e.organizationId},...e.headers},v=d(p,{...g,stream:!0});else if(e.provider==="azure-openai")S=e.endpoint||"",y={"Content-Type":"application/json","api-key":e.apiKey||"",...e.headers},v=d(p,{...g,stream:!0});else if(e.provider==="anthropic")S=e.endpoint||"https://api.anthropic.com/v1/messages",y={"Content-Type":"application/json","x-api-key":e.apiKey||"","anthropic-version":"2023-06-01",...e.headers},v=u(p,{...g,stream:!0});else throw new Error(`Unsupported provider: ${e.provider}`);const k=await fetch(S,{method:"POST",headers:y,body:JSON.stringify(v),signal:s.current.signal});if(!k.ok){const w=await k.text();throw new Error(`AI request failed: ${k.status} ${w}`)}if(!k.body)throw new Error("Response body is null");const E=k.body.getReader();await c(E,m,e.provider)}catch(S){if(S.name==="AbortError"){m({content:"",done:!0});return}throw o(S),S}finally{a(!1)}},[e,d,u]),b={isConfigured:!!e.apiKey||e.provider==="custom"||e.provider==="local",provider:e.provider,defaultModel:e.defaultModel||null,complete:f,stream:h,cancel:i,isLoading:r,error:n};return x.jsx(So.Provider,{value:b,children:t})};function de(){const e=l.useContext(So);if(!e)throw new Error("useNiceAI must be used within a NiceAIProvider");return e}function Zl(e={}){const t=de(),[r,a]=l.useState(""),[n,o]=l.useState([]),[s,i]=l.useState(!1),[c,d]=l.useState(null),u=l.useCallback(async m=>{i(!0),d(null),a("");const g=[...n,{role:"user",content:m}];try{const S=await t.complete(g,{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature});return o([...g,{role:"assistant",content:S.content}]),a(S.content),S.content}catch(S){throw d(S),S}finally{i(!1)}},[t,n,e]),f=l.useCallback(async(m,g)=>{i(!0),d(null),a("");const S=[...n,{role:"user",content:m}];try{let y="";return await t.stream(S,v=>{v.done||(y+=v.content,a(y),g==null||g(v.content))},{systemPrompt:e.systemPrompt,model:e.model,temperature:e.temperature}),o([...S,{role:"assistant",content:y}]),y}catch(y){throw d(y),y}finally{i(!1)}},[t,n,e]),h=l.useCallback(()=>{a(""),d(null)},[]),b=l.useCallback(()=>{o([]),a(""),d(null)},[]),p=l.useCallback(()=>{t.cancel(),i(!1)},[t]);return{response:r,isLoading:s,error:c,send:u,sendStreaming:f,clear:h,cancel:p,history:n,clearHistory:b}}function ed(e={}){const t=de(),[r,a]=l.useState(""),[n,o]=l.useState(!1),s=l.useCallback(async(u,f="")=>{o(!0),a("");try{const b=(await t.complete([{role:"user",content:`Complete the following ${e.language||""} code. Return ONLY the completion text, no explanation.
68
68
 
69
69
  Code before cursor:
70
70
  \`\`\`
@@ -93,21 +93,21 @@ Refactored code:`}],{model:e.model,temperature:.2}),b=h.content.match(/```[\w]*\
93
93
 
94
94
  Description: ${u}
95
95
 
96
- Code:`}],{model:e.model,temperature:.3}),h=f.content.match(/```[\w]*\n?([\s\S]*?)```/);return h?h[1].trim():f.content.trim()}finally{o(!1)}},[t,e]);return{suggestion:r,isLoading:n,complete:s,explain:i,refactor:c,generateFromComment:d}}function ql(){const e=de(),[t,r]=l.useState(!1);return{parseFilter:l.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)}
96
+ Code:`}],{model:e.model,temperature:.3}),h=f.content.match(/```[\w]*\n?([\s\S]*?)```/);return h?h[1].trim():f.content.trim()}finally{o(!1)}},[t,e]);return{suggestion:r,isLoading:n,complete:s,explain:i,refactor:c,generateFromComment:d}}function td(){const e=de(),[t,r]=l.useState(!1);return{parseFilter:l.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)}
97
97
 
98
98
  Query: "${n}"
99
99
 
100
100
  Return a JSON array of filter objects with: field, operator (eq, ne, gt, gte, lt, lte, contains, startsWith, endsWith), value.
101
- 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 Yl(){const e=de(),[t,r]=l.useState(!1),a=l.useCallback(async(o,s)=>{r(!0);try{const i=o.slice(0,5),c=await e.complete([{role:"user",content:`Analyze this data and suggest the best chart type. Data sample: ${JSON.stringify(i)}
101
+ 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 rd(){const e=de(),[t,r]=l.useState(!1),a=l.useCallback(async(o,s)=>{r(!0);try{const i=o.slice(0,5),c=await e.complete([{role:"user",content:`Analyze this data and suggest the best chart type. Data sample: ${JSON.stringify(i)}
102
102
  ${s?`Context: ${s}`:""}
103
103
 
104
104
  Return JSON with: type (line, bar, pie, scatter, area, donut), reason (brief explanation), config (suggested chart configuration like xField, yField, etc.)
105
105
  Only return JSON.`}],{temperature:.2,maxTokens:500});try{return JSON.parse(c.content)}catch{return{type:"bar",reason:"Default chart type",config:{}}}}finally{r(!1)}},[e]),n=l.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))}
106
106
 
107
- 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 Jl(){const e=de(),[t,r]=l.useState(!1);return{generateForm:l.useCallback(async n=>{r(!0);try{const o=await e.complete([{role:"user",content:`Generate a form definition from this description: "${n}"
107
+ 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 ad(){const e=de(),[t,r]=l.useState(!1);return{generateForm:l.useCallback(async n=>{r(!0);try{const o=await e.complete([{role:"user",content:`Generate a form definition from this description: "${n}"
108
108
 
109
109
  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).
110
- Only return JSON.`}],{temperature:.3,maxTokens:1e3});try{return JSON.parse(o.content)}catch{return[]}}finally{r(!1)}},[e]),isLoading:t}}function Ql(){const e=de(),[t,r]=l.useState(!1),a=l.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.
110
+ Only return JSON.`}],{temperature:.3,maxTokens:1e3});try{return JSON.parse(o.content)}catch{return[]}}finally{r(!1)}},[e]),isLoading:t}}function nd(){const e=de(),[t,r]=l.useState(!1),a=l.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.
111
111
 
112
112
  Text: ${s}
113
113
 
@@ -119,7 +119,7 @@ Translation:`}],{temperature:.2})).content.trim()}finally{r(!1)}},[e]),o=l.useCa
119
119
 
120
120
  Prompt: ${s}
121
121
 
122
- HTML:`}],{temperature:.3}),c=i.content.match(/```html?\n?([\s\S]*?)```/);return c?c[1].trim():i.content.trim()}finally{r(!1)}},[e]);return{improveText:a,translate:n,generateHtml:o,isLoading:t}}class Je{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 Zl(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 bo(e,t){if(t.items.length===0)return!0;const r=a=>a.type==="condition"?Zl(e,a):bo(e,a);return t.logic==="and"?t.items.every(r):t.items.some(r)}function ed(e,t){var n;let r=[...e];if(t.filter&&(r=r.filter(o=>bo(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 c=o[i.field]??"",d=s[i.field]??"",u=typeof c=="number"&&typeof d=="number"?c-d:String(c).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 td(e){const t=e.keyField??"id";let r=[...e.data];const a=new Je;return{keyField:t,writable:!0,async load(o={}){a.emit("loading",!0);try{const s=ed(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 c={...r[i],...s};return r=r.map((d,u)=>u===i?c:d),a.emit("changed"),c},async remove(o){r=r.filter(s=>s[t]!==o),a.emit("changed")},on:a.on.bind(a)}}async function rd(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 rt(e,t,r){return typeof e=="function"?e(r):e||`${t}/${encodeURIComponent(String(r))}`}function ad(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 nd(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 So(e){const t=e.keyField??"id",r=new Je;async function a(o,s){const i=await rd(e),c=await fetch(o,{...e.fetchOptions,...s,headers:{...i,...s==null?void 0:s.headers}});if(!c.ok){const u=await c.text().catch(()=>c.statusText);throw new Error(`HTTP ${c.status}: ${u}`)}return(c.headers.get("content-type")??"").includes("json")?c.json():c.text()}return{keyField:t,writable:!0,async load(o={}){var s;r.emit("loading",!0);try{const i=e.loadUrl??e.url,c=e.mapLoadParams?e.mapLoadParams(o):ad(o),d=new URLSearchParams(c).toString(),u=d?`${i}?${d}`:i,f=await a(u),h=e.extractLoadResult?e.extractLoadResult(f):nd(f);return r.emit("loaded",h),r.emit("loading",!1),h}catch(i){const c=i instanceof Error?i:new Error(String(i));throw r.emit("error",c),r.emit("loading",!1),(s=e.onError)==null||s.call(e,c,"load"),c}},async byKey(o){const s=rt(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,c=await a(s,{method:"POST",body:JSON.stringify(i)}),d=e.extractItem?e.extractItem(c):c;return r.emit("changed"),d},async update(o,s){const i=rt(e.updateUrl,e.url,o),c=e.prepareUpdateBody?e.prepareUpdateBody(o,s):s,d=await a(i,{method:e.updateMethod??"PUT",body:JSON.stringify(c)}),u=e.extractItem?e.extractItem(d):d;return r.emit("changed"),u},async remove(o){const s=rt(e.deleteUrl,e.url,o);await a(s,{method:"DELETE"}),r.emit("changed")},on:r.on.bind(r)}}function od(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 vo(e,t){return e.items.length===0?"":e.items.map(a=>a.type==="condition"?od(a,t):`(${vo(a,t)})`).join(e.logic==="and"?" and ":" or ")}function id(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(c=>`${c.field} ${c.direction}`).join(",")),a.filter){const c=vo(a.filter,t);c&&(n.$filter=c)}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,c;const n=a,o=n.value??((i=n.d)==null?void 0:i.results)??[],s=n["@odata.count"]??((c=n.d)==null?void 0:c.__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 So(r)}function sd(e){const t=e.keyField??"id",r=new Je;async function a(c,d){var p;const u={"Content-Type":"application/json"},f=e.headers?typeof e.headers=="function"?await e.headers():e.headers:{},h=await fetch(e.url,{method:"POST",headers:{...u,...f},body:JSON.stringify({query:c,variables:d})});if(!h.ok){const m=await h.text().catch(()=>h.statusText);throw new Error(`GraphQL HTTP ${h.status}: ${m}`)}const b=await h.json();if((p=b.errors)!=null&&p.length)throw new Error(b.errors.map(m=>m.message).join("; "));return b.data}function n(c){var u;const d={};return c.skip!=null&&(d.skip=c.skip),c.take!=null&&(d.take=c.take),c.search&&(d.search=c.search),(u=c.sort)!=null&&u.length&&(d.sort=c.sort),c.filter&&(d.filter=c.filter),d}function o(c){if(!c||typeof c!="object")return{data:[],totalCount:0};const d=Object.values(c)[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 s(c){return!c||typeof c!="object"?c:Object.values(c)[0]}return{keyField:t,writable:!!(e.queries.insert||e.queries.update||e.queries.remove),async load(c={}){var d;r.emit("loading",!0);try{const u=e.mapVariables?e.mapVariables(c):n(c),f=await a(e.queries.load,u),h=e.extractLoadResult?e.extractLoadResult(f):o(f);return r.emit("loaded",h),r.emit("loading",!1),h}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(c){if(!e.queries.byKey)throw new Error("byKey query not configured");const d=await a(e.queries.byKey,{[t]:c});return e.extractItem?e.extractItem(d):s(d)},insert:e.queries.insert?async c=>{const d=await a(e.queries.insert,{input:c}),u=e.extractItem?e.extractItem(d):s(d);return r.emit("changed"),u}:void 0,update:e.queries.update?async(c,d)=>{const u=await a(e.queries.update,{[t]:c,input:d}),f=e.extractItem?e.extractItem(u):s(u);return r.emit("changed"),f}:void 0,remove:e.queries.remove?async c=>{await a(e.queries.remove,{[t]:c}),r.emit("changed")}:void 0,on:r.on.bind(r)}}function cd(e){const t=e.keyField??"id",r=new Je;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)}}function xo(e){return/^[A-Za-z_][A-Za-z0-9_.]*$/.test(e)?e:`"${e.replace(/"/g,'""')}"`}function ld(e,t={}){const r=[],a=t.placeholder??(()=>"?"),n=t.quoteField??xo,o=c=>(r.push(c),a(r.length-1)),s=c=>{const d=n(c.field);switch(c.operator){case"=":case"<>":case"<":case"<=":case">":case">=":return`${d} ${c.operator} ${o(c.value)}`;case"contains":return`${d} LIKE ${o(`%${String(c.value)}%`)}`;case"notcontains":return`${d} NOT LIKE ${o(`%${String(c.value)}%`)}`;case"startswith":return`${d} LIKE ${o(`${String(c.value)}%`)}`;case"endswith":return`${d} LIKE ${o(`%${String(c.value)}`)}`;case"between":{const u=Array.isArray(c.value)?c.value:[c.value,c.value];return`${d} BETWEEN ${o(u[0])} AND ${o(u[1])}`}case"isblank":return`(${d} IS NULL OR ${d} = ${o("")})`;case"isnotblank":return`(${d} IS NOT NULL AND ${d} <> ${o("")})`;case"in":{const u=Array.isArray(c.value)?c.value:[c.value];return u.length?`${d} IN (${u.map(o).join(", ")})`:"1 = 0"}default:return`${d} = ${o(c.value)}`}},i=c=>{const d=[];for(const u of c.items)if(u.type==="group"){const f=i(u);f&&d.push(`(${f})`)}else d.push(s(u));return d.join(c.logic==="or"?" OR ":" AND ")};return{sql:i(e),params:r}}function dd(e,t={}){const r=t.quoteField??xo;return e.filter(a=>a.field).map(a=>`${r(a.field)} ${a.direction==="desc"?"DESC":"ASC"}`).join(", ")}function Z(e){return String(e??"").toLowerCase()}function wo(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 Z(r).includes(Z(a));case"notcontains":return!Z(r).includes(Z(a));case"startswith":return Z(r).startsWith(Z(a));case"endswith":return Z(r).endsWith(Z(a));case"between":{const n=Array.isArray(a)?a:[a,a];return r>=n[0]&&r<=n[1]}case"isblank":return r==null||r==="";case"isnotblank":return r!=null&&r!=="";case"in":return(Array.isArray(a)?a:[a]).some(o=>r==o);default:return!0}}function Ft(e,t){if(!t.items.length)return!0;const r=a=>a.type==="condition"?wo(e,a):Ft(e,a);return t.logic==="or"?t.items.some(r):t.items.every(r)}function er(e){return e==null||e===""}const ud=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function fd(e){const t=String(e);try{return new URL(t),!0}catch{return/^https?:\/\/[^\s]+$/.test(t)}}function K(e){return typeof e=="number"?e:parseFloat(String(e))}function ko(e){const t=e.field;switch(e.op){case"required":return`${t} is required`;case"minLength":return`${t} must be at least ${e.value} characters`;case"maxLength":return`${t} must be at most ${e.value} characters`;case"min":return`${t} must be ≥ ${e.value}`;case"max":return`${t} must be ≤ ${e.value}`;case"pattern":return`${t} has an invalid format`;case"email":return`${t} must be a valid email`;case"url":return`${t} must be a valid URL`;case"equals":return`${t} must equal ${e.value}`;case"notEquals":return`${t} must not equal ${e.value}`;case"greaterThan":return`${t} must be greater than ${e.value}`;case"lessThan":return`${t} must be less than ${e.value}`;case"matchesField":return`${t} must match ${e.compareField}`;case"greaterThanField":return`${t} must be greater than ${e.compareField}`;case"lessThanField":return`${t} must be less than ${e.compareField}`;default:return`${t} is invalid`}}function Co(e,t){const r=t[e.field];if(e.op==="required")return!er(r);if(er(r))return!0;const a=e.compareField!=null?t[e.compareField]:void 0;switch(e.op){case"minLength":return String(r).length>=K(e.value);case"maxLength":return String(r).length<=K(e.value);case"min":return K(r)>=K(e.value);case"max":return K(r)<=K(e.value);case"pattern":try{return new RegExp(String(e.value)).test(String(r))}catch{return!0}case"email":return ud.test(String(r));case"url":return fd(r);case"equals":return r===e.value;case"notEquals":return r!==e.value;case"greaterThan":return K(r)>K(e.value);case"lessThan":return K(r)<K(e.value);case"matchesField":return r===a;case"greaterThanField":return K(r)>K(a);case"lessThanField":return K(r)<K(a);case"custom":return e.validate?e.validate(r,t):!0;default:return!0}}function Eo(e,t){const r=[];for(const a of e??[])a.when&&!Ft(t,a.when)||Co(a,t)||r.push({field:a.field,message:a.message??ko(a),severity:a.severity??"error",ruleId:a.id});return r}function md(e,t){return Eo(e,t).every(r=>r.severity!=="error")}class ut{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 No{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 pd(e,t={}){const r=new ut(t),a=new ut(t),n=new No,o=t.generateKey??(c=>JSON.stringify(c)),s=t.cacheLoads!==!1,i=t.cacheByKey!==!1;return{...e,cache:r,async load(c={}){const d=`load:${o(c)}`;if(s){const u=r.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.load(c);return s&&r.set(d,u),u})},async byKey(c){const d=`byKey:${String(c)}`;if(i){const u=a.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.byKey(c);return i&&u&&a.set(d,u),u})},async insert(c){const d=await e.insert(c);return r.invalidateAll(),d},async update(c,d){const u=await e.update(c,d);return r.invalidateAll(),a.invalidate(`byKey:${String(c)}`),u},async remove(c){await e.remove(c),r.invalidateAll(),a.invalidate(`byKey:${String(c)}`)},invalidateCache(){r.invalidateAll(),a.invalidateAll()}}}function gd(e,t){const{cursorField:r,pageSize:a=20,direction:n="asc"}=t;return{async loadPage(o={}){var g;const s=o.pageSize??a,i=o.direction??"forward",c=o.cursor?{type:"condition",field:r,operator:i==="forward"?n==="asc"?">":"<":n==="asc"?"<":">",value:yd(o.cursor)}:null,d=c?{type:"group",logic:"and",items:[...((g=o.filter)==null?void 0:g.items)??[],c]}:o.filter,u=[{field:r,direction:i==="forward"?n:n==="asc"?"desc":"asc"},...o.sort??[]],f=await e.load({...o,filter:d,sort:u,take:s+1}),h=f.data.length>s,b=h?f.data.slice(0,s):f.data;i==="backward"&&b.reverse();const p=b[b.length-1],m=b[0];return{data:b,nextCursor:h&&p?at(p[r]):null,prevCursor:m&&o.cursor?at(m[r]):null,hasMore:h}},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 c=i.data[i.data.length-1];s=c?at(c[r]):null}while(s)}}}function at(e){return btoa(JSON.stringify(e))}function yd(e){try{return JSON.parse(atob(e))}catch{return e}}function hd(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(b=>b(o))}function c(b){o={...o,...b},i()}let d={};async function u(){if(!(o.isLoading||!o.hasMore)){c({isLoading:!0,error:null});try{const b=await e.load({...d,skip:o.page*r,take:r}),p=[...o.items,...b.data],m=p.length<b.totalCount;c({items:p,page:o.page+1,totalCount:b.totalCount,hasMore:m,isLoading:!1})}catch(b){c({error:b instanceof Error?b:new Error(String(b)),isLoading:!1})}}}function f(b={}){d=b,o={items:[],isLoading:!1,hasMore:!0,error:null,page:0,totalCount:0},i()}function h(b){const p=b.target;if(!p)return;p.scrollHeight-p.scrollTop-p.clientHeight<a&&u()}return{get state(){return o},loadMore:u,reset:f,handleScroll:h,subscribe(b){return s.add(b),()=>s.delete(b)},setOptions(b){d=b}}}function bd(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:o=10,heartbeatInterval:s=3e4}=e;let i=null,c=0,d=null,u=[];const f=new Map;function h(w,...C){var A;(A=f.get(w))==null||A.forEach(M=>M(...C))}function b(w){if(e.parseMessage)return e.parseMessage(w);try{return JSON.parse(w.data)}catch{return null}}function p(w){return e.serializeMessage?e.serializeMessage(w):JSON.stringify(w)}function m(w){switch(w.type){case"insert":w.data&&(u=[...u,w.data],h("changed"));break;case"update":w.key&&w.changes&&(u=u.map(C=>C[a]===w.key?{...C,...w.changes}:C),h("changed"));break;case"remove":w.key&&(u=u.filter(C=>C[a]!==w.key),h("changed"));break;case"refresh":case"sync":E.load().catch(()=>{});break}}function g(){(i==null?void 0:i.readyState)!==WebSocket.OPEN&&(i=new WebSocket(t),i.onopen=()=>{c=0,h("connected"),y()},i.onmessage=w=>{const C=b(w);C&&(m(C),h("message",C))},i.onerror=w=>{h("error",new Error("WebSocket error"))},i.onclose=()=>{v(),h("disconnected"),c<o&&(c++,setTimeout(g,n*Math.min(c,5)))})}function S(){v(),i&&(i.close(),i=null)}function y(){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 k(w){(i==null?void 0:i.readyState)===WebSocket.OPEN&&i.send(p(w))}const E={keyField:a,writable:r.writable,async load(w={}){h("loading",!0);try{const C=await r.load(w);return u=C.data,h("loaded",C),h("loading",!1),C}catch(C){throw h("error",C),h("loading",!1),C}},async byKey(w){const C=u.find(A=>A[a]===w);return C||r.byKey(w)},async insert(w){const C=await r.insert(w);return k({type:"insert",data:C}),C},async update(w,C){const A=await r.update(w,C);return k({type:"update",key:w,changes:C}),A},async remove(w){await r.remove(w),k({type:"remove",key:w})},on(w,C){return f.has(w)||f.set(w,new Set),f.get(w).add(C),()=>{var A;return(A=f.get(w))==null?void 0:A.delete(C)}},connect:g,disconnect:S,isConnected:()=>(i==null?void 0:i.readyState)===WebSocket.OPEN,sendMessage:k};return E}function Sd(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(f,...h){var b;(b=s.get(f))==null||b.forEach(p=>p(...h))}const c=f=>{o=[...o,f],i("changed")},d=(f,h)=>{o=o.map(b=>b[n]===f?{...b,...h}:b),i("changed")},u=f=>{o=o.filter(h=>h[n]!==f),i("changed")};return{keyField:n,writable:r.writable,async load(f={}){i("loading",!0);try{const h=await r.load(f);return o=h.data,i("loaded",h),i("loading",!1),h}catch(h){throw i("error",h),i("loading",!1),h}},async byKey(f){const h=o.find(b=>b[n]===f);return h||r.byKey(f)},async insert(f){return await t.invoke(a.insert,f)},async update(f,h){return await t.invoke(a.update,f,h)},async remove(f){await t.invoke(a.remove,f)},on(f,h){return s.has(f)||s.set(f,new Set),s.get(f).add(h),()=>{var b;return(b=s.get(f))==null?void 0:b.delete(h)}},async connect(){t.on(a.onInsert,c),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,c),t.off(a.onUpdate,d),t.off(a.onRemove,u),t.off(a.onRefresh,()=>{}),await t.stop()}}}function vd(e,t={}){const r=e.keyField;let a=[];const n=new Map;let o=0;const s=new Map;function i(d,...u){var f;(f=s.get(d))==null||f.forEach(h=>h(...u))}function c(){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 h,b,p;const u=c(),f={...d};a=[...a,f],n.set(u,{id:u,action:"insert",item:f}),(h=t.onOptimisticApply)==null||h.call(t,f,"insert"),i("changed");try{const m=await e.insert(d);return a=a.map(g=>g===f?m:g),n.delete(u),(b=t.onConfirm)==null||b.call(t,m,"insert"),i("changed"),m}catch(m){throw a=a.filter(g=>g!==f),n.delete(u),(p=t.onRollback)==null||p.call(t,f,"insert",m instanceof Error?m:new Error(String(m))),i("changed"),m}},async update(d,u){var m,g,S;const f=c(),h=a.findIndex(y=>y[r]===d);if(h===-1)return e.update(d,u);const b=a[h],p={...b,...u};a=a.map((y,v)=>v===h?p:y),n.set(f,{id:f,action:"update",key:d,originalItem:b}),(m=t.onOptimisticApply)==null||m.call(t,p,"update"),i("changed");try{const y=await e.update(d,u);return a=a.map((v,k)=>k===h?y:v),n.delete(f),(g=t.onConfirm)==null||g.call(t,y,"update"),i("changed"),y}catch(y){throw a=a.map((v,k)=>k===h?b:v),n.delete(f),(S=t.onRollback)==null||S.call(t,b,"update",y instanceof Error?y:new Error(String(y))),i("changed"),y}},async remove(d){var h,b,p;const u=c(),f=a.find(m=>m[r]===d);if(!f)return e.remove(d);a=a.filter(m=>m!==f),n.set(u,{id:u,action:"remove",key:d,originalItem:f}),(h=t.onOptimisticApply)==null||h.call(t,f,"remove"),i("changed");try{await e.remove(d),n.delete(u),(b=t.onConfirm)==null||b.call(t,f,"remove")}catch(m){throw a=[...a,f],n.delete(u),(p=t.onRollback)==null||p.call(t,f,"remove",m instanceof Error?m:new Error(String(m))),i("changed"),m}},on(d,u){return s.has(d)||s.set(d,new Set),s.get(d).add(u),()=>{var f;return(f=s.get(d))==null?void 0:f.delete(u)}},hasPendingChanges:()=>n.size>0,getPendingCount:()=>n.size}}function Ao(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=[],c=[];for(const[d,u]of n){const f=a.get(d);if(!f)o.push(u);else if(Mo(f,u))c.push(u);else{const h={};for(const b of Object.keys(u))f[b]!==u[b]&&(h[b]=u[b]);s.push({key:d,changes:h,oldItem:f,newItem:u})}}for(const[d,u]of a)n.has(d)||i.push(u);return{inserted:o,updated:s,removed:i,unchanged:c}}function Mo(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(!Mo(r[o],a[o]))return!1;return!0}function xd(e,t={}){const{interval:r=5e3,autoStart:a=!1,pauseWhenHidden:n=!0,onDataChange:o}=t;let s=r,i=null,c=[],d={};const u=new Map;function f(g,...S){var y;(y=u.get(g))==null||y.forEach(v=>v(...S))}async function h(){if(!(n&&document.hidden))try{const g=await e.load(d),S=Ao(c,g.data,e.keyField);(S.inserted.length||S.updated.length||S.removed.length)&&(c=g.data,f("changed"),o==null||o(S))}catch{}}function b(){i||(i=window.setInterval(h,s))}function p(){i&&(clearInterval(i),i=null)}n&&document.addEventListener("visibilitychange",()=>{document.hidden||i&&h()});const m={...e,async load(g={}){d=g;const S=await e.load(g);return c=S.data,S},on(g,S){u.has(g)||u.set(g,new Set),u.get(g).add(S);const y=e.on(g,S);return()=>{var v;(v=u.get(g))==null||v.delete(S),y()}},startPolling:b,stopPolling:p,isPolling:()=>i!==null,setInterval(g){s=g,i&&(p(),b())}};return a&&b(),m}function wd(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:o=10,withCredentials:s=!1}=e;let i=null,c=0,d=null,u=[];const f=new Map;function h(y,...v){var k;(k=f.get(y))==null||k.forEach(E=>E(...v))}function b(y){if(e.parseEvent)return e.parseEvent(y);try{return JSON.parse(y.data)}catch{return null}}function p(y){switch(y.type){case"insert":y.data&&(u=[...u,y.data],h("changed"));break;case"update":y.key&&y.changes&&(u=u.map(v=>v[a]===y.key?{...v,...y.changes}:v),h("changed"));break;case"remove":y.key&&(u=u.filter(v=>v[a]!==y.key),h("changed"));break;case"snapshot":Array.isArray(y.data)&&(u=y.data,h("changed"));break;case"refresh":S.load().catch(()=>{});break}}function m(){(i==null?void 0:i.readyState)!==EventSource.OPEN&&(g(),i=new EventSource(t,{withCredentials:s}),i.onopen=()=>{c=0,h("connected")},i.onmessage=y=>{const v=b(y);v&&(p(v),h("message",v))},i.onerror=()=>{if(h("error",new Error("SSE connection error")),(i==null?void 0:i.readyState)===EventSource.CLOSED&&(h("disconnected"),i=null,c<o)){c++;const y=n*Math.min(c,5);d=setTimeout(m,y)}})}function g(){d&&(clearTimeout(d),d=null),i&&(i.close(),i=null)}const S={keyField:a,writable:r.writable,async load(y={}){h("loading",!0);try{const v=await r.load(y);return u=v.data,h("loaded",v),h("loading",!1),v}catch(v){throw h("error",v),h("loading",!1),v}},async byKey(y){const v=u.find(k=>k[a]===y);return v||r.byKey(y)},async insert(y){return r.insert(y)},async update(y,v){return r.update(y,v)},async remove(y){return r.remove(y)},on(y,v){return f.has(y)||f.set(y,new Set),f.get(y).add(v),()=>{var k;return(k=f.get(y))==null?void 0:k.delete(v)}},connect:m,disconnect:g,isConnected:()=>(i==null?void 0:i.readyState)===EventSource.OPEN};return S}function te(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 Dt(e,t){const{groupBy:r,aggregates:a=[],includeItems:n=!1,sortGroups:o}=t;if(r.length===0)return[{key:{},count:e.length,aggregates:te(e,a),items:n?e:void 0}];const s=new Map;for(const c of e){const d={};for(const f of r)d[f]=c[f];const u=JSON.stringify(d);s.has(u)||s.set(u,{key:d,items:[]}),s.get(u).items.push(c)}const i=[];for(const[,c]of s)i.push({key:c.key,count:c.items.length,aggregates:te(c.items,a),items:n?c.items:void 0});return o!=null&&o.length&&i.sort((c,d)=>{for(const u of o){const f=c.key[u.field]??c.aggregates[u.field],h=d.key[u.field]??d.aggregates[u.field],b=typeof f=="number"&&typeof h=="number"?f-h:String(f??"").localeCompare(String(h??""));if(b!==0)return u.direction==="desc"?-b:b}return 0}),i}function To(e,t,r=[]){if(t.length===0)return[{key:{},count:e.length,aggregates:te(e,r),items:e}];const[a,...n]=t,o=Dt(e,{groupBy:[a],aggregates:r,includeItems:!0});if(n.length>0)for(const s of o)s.groups=To(s.items,n,r),delete s.items;return o}function kd(e,t){const{rows:r,columns:a,values:n,aggregateFunction:o="sum",rowTotals:s=!0,columnTotals:i=!0,grandTotal:c=!0}=t,d=[...new Set(e.map(p=>String(p[a])))].sort(),u=Dt(e,{groupBy:r,includeItems:!0}),f=[];for(const p of u){const m={rowKey:p.key,values:{}};for(const g of d){const S=p.items.filter(v=>String(v[a])===g),y=te(S,[{field:n,fn:o}]);m.values[g]=y[`${o}_${n}`]??null}if(s){const g=te(p.items,[{field:n,fn:o}]);m.rowTotal=g[`${o}_${n}`]}f.push(m)}let h;if(i){h={};for(const p of d){const m=e.filter(S=>String(S[a])===p),g=te(m,[{field:n,fn:o}]);h[p]=g[`${o}_${n}`]}}let b;return c&&(b=te(e,[{field:n,fn:o}])[`${o}_${n}`]),{columnHeaders:d,rows:f,columnTotals:h,grandTotal:b}}function Cd(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 Ed={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 c=Number(s[e]??0)-Number(i[e]??0);return t==="desc"?-c:c}).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,c)=>i+Number(c[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 Nd(e,t){const r=[],a=new Map,n=new Map;for(let i=0;i<e.length;i++){const c=e[i];for(const d of t)if(!d.validate(c,i,e)){const u=typeof d.message=="function"?d.message(c):d.message,f={index:i,rule:d.name,message:u,severity:d.severity??"error",fields:d.fields??[],item:c};r.push(f),a.has(i)||a.set(i,[]),a.get(i).push(f);for(const h of f.fields)n.has(h)||n.set(h,[]),n.get(h).push(f)}}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 Ad={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})},Md=(function(){return{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 c=0;c<e.length;c+=n){const d=e.slice(c,c+n),u=await Promise.allSettled(d.map((f,h)=>t(f,c+h)));for(let f=0;f<u.length;f++){const h=u[f];h.status==="fulfilled"?(o.push(h.value),i++):s.push({index:c+f,item:d[f],error:h.reason})}}else for(let c=0;c<e.length;c++)try{const d=await t(e[c],c);o.push(d),i++}catch(d){s.push({index:c,item:e[c],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(c=>[c[r],c])),i=[...e];for(const c of t){const d=c[r],u=s.get(d);if(u){if(n){const f=i.indexOf(u);i[f]={...u,...c}}}else o&&i.push(c)}return i}}})();function Td(e,t){const r=(t==null?void 0:t.autoLoad)??!0,a=(t==null?void 0:t.defaultPageSize)??20,[n,o]=l.useState([]),[s,i]=l.useState(0),[c,d]=l.useState(!1),[u,f]=l.useState(null),[h,b]=l.useState(1),[p,m]=l.useState(a),[g,S]=l.useState((t==null?void 0:t.defaultSort)??[]),[y,v]=l.useState(t==null?void 0:t.defaultFilter),[k,E]=l.useState((t==null?void 0:t.defaultSearch)??""),w=l.useRef(0),C=t==null?void 0:t.loadOptions,A=l.useCallback(async()=>{if(!e)return;const L=++w.current;d(!0),f(null);try{const O=await e.load({skip:(h-1)*p,take:p,sort:g.length?g:void 0,filter:y,search:k||void 0,...C});if(L!==w.current)return;o(O.data),i(O.totalCount)}catch(O){if(L!==w.current)return;f(O instanceof Error?O.message:String(O))}finally{L===w.current&&d(!1)}},[e,h,p,g,y,k,C]);l.useEffect(()=>{r&&A()},[A,r]),l.useEffect(()=>{if(e)return e.on("changed",()=>{A()})},[e,A]);const M=l.useCallback((L,O)=>{S([{field:L,direction:O}]),b(1)},[]),I=l.useCallback(L=>{v(L),b(1)},[]),$=l.useCallback(L=>{E(L),b(1)},[]),T=l.useCallback(L=>{m(L),b(1)},[]),D=l.useCallback(async L=>{if(!(e!=null&&e.insert))throw new Error("DataSource is not writable");await e.insert(L)},[e]),F=l.useCallback(async(L,O)=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");await e.update(L,O)},[e]),P=l.useCallback(async L=>{if(!(e!=null&&e.remove))throw new Error("DataSource is not writable");await e.remove(L)},[e]);return{data:n,totalCount:s,loading:c,error:u,page:h,pageSize:p,sort:g,filter:y,search:k,setPage:b,setPageSize:T,setSort:S,setSortField:M,setFilter:I,setSearch:$,reload:A,insert:D,update:F,remove:P}}function Io(e,t){const[r,a]=l.useState(void 0),[n,o]=l.useState({}),[s,i]=l.useState(!1),[c,d]=l.useState(null),u=l.useRef(0),f=l.useCallback(async()=>{if(!e||t==null){a(void 0);return}const y=++u.current;i(!0),d(null);try{const v=await e.byKey(t);if(y!==u.current)return;a(v),o({})}catch(v){if(y!==u.current)return;d(v instanceof Error?v.message:String(v))}finally{y===u.current&&i(!1)}},[e,t]);l.useEffect(()=>{f()},[f]),l.useEffect(()=>{if(e)return e.on("changed",()=>{f()})},[e,f]);const h=l.useMemo(()=>({...r??{},...n}),[r,n]),b=Object.keys(n).length>0,p=l.useCallback((y,v)=>{o(k=>({...k,[y]:v}))},[]),m=l.useCallback(y=>{o(v=>({...v,...y}))},[]),g=l.useCallback(async()=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");b&&await e.update(t,n)},[e,t,n,b]),S=l.useCallback(()=>{o({})},[]);return{data:r,editData:h,loading:s,error:c,changes:n,isDirty:b,set:p,setMany:m,save:g,reload:f,reset:S}}function Id(e,t,r){const a=Io(e,t),n=a.editData[r],o=l.useCallback(i=>{a.set(r,i)},[a,r]),s=l.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 Rd(e,t,r,a){const n=(a==null?void 0:a.autoLoad)??!0,o=(a==null?void 0:a.take)??200,[s,i]=l.useState([]),[c,d]=l.useState(!1),[u,f]=l.useState(null),h=l.useRef(0),b=l.useCallback(async g=>{if(!e)return;const S=++h.current;d(!0),f(null);try{const y=await e.load({take:o,search:g||void 0,searchFields:a==null?void 0:a.searchFields});if(S!==h.current)return;i(y.data)}catch(y){if(S!==h.current)return;f(y instanceof Error?y.message:String(y))}finally{S===h.current&&d(!1)}},[e,o,a==null?void 0:a.searchFields]);l.useEffect(()=>{n&&b()},[b,n]);const p=l.useMemo(()=>s.map(g=>{const S=g,y={value:String(S[t]??""),label:String(S[r]??"")};return a!=null&&a.iconField&&S[a.iconField]!=null&&(y.icon=S[a.iconField]),a!=null&&a.descriptionField&&S[a.descriptionField]!=null&&(y.description=String(S[a.descriptionField])),a!=null&&a.groupField&&S[a.groupField]!=null&&(y.group=String(S[a.groupField])),y}),[s,t,r,a==null?void 0:a.iconField,a==null?void 0:a.descriptionField,a==null?void 0:a.groupField]),m=l.useCallback(g=>{b(g)},[b]);return{options:p,loading:c,error:u,search:m,reload:()=>b()}}function ft(e){const{dbName:t,storeName:r,keyField:a="id",version:n=1,indexes:o=[]}=e;let s=null;const i=new Map;function c(p,...m){var g;(g=i.get(p))==null||g.forEach(S=>S(...m))}async function d(){return s||new Promise((p,m)=>{const g=indexedDB.open(t,n);g.onerror=()=>m(g.error),g.onsuccess=()=>{s=g.result,p(s)},g.onupgradeneeded=S=>{const y=S.target.result;if(!y.objectStoreNames.contains(r)){const v=y.createObjectStore(r,{keyPath:a});for(const k of o)v.createIndex(k.name,k.keyPath,{unique:k.unique??!1})}}})}async function u(p,m){const g=await d();return new Promise((S,y)=>{const k=g.transaction(r,p).objectStore(r),E=m(k);E.onsuccess=()=>S(E.result),E.onerror=()=>y(E.error)})}async function f(p,m,g){const S=await d();return new Promise((y,v)=>{var F;const E=S.transaction(r,p).objectStore(r),w=[];let C=E,A="next";if((F=m.sort)!=null&&F.length){const P=m.sort[0].field,L=m.sort[0].direction;E.indexNames.contains(P)&&(C=E.index(P)),A=L==="desc"?"prev":"next"}const M=C.openCursor(null,A);let I=0,$=0;const T=m.skip??0,D=m.take??1/0;M.onsuccess=()=>{const P=M.result;if(!P||$>=D){y(w);return}const L=P.value;if(m.filter&&!h(L,m.filter)){P.continue();return}if(m.search&&!b(L,m.search,m.searchFields)){P.continue();return}if(I<T){I++,P.continue();return}w.push(L),$++,P.continue()},M.onerror=()=>v(M.error)})}function h(p,m){if(!m.items.length)return!0;const g=S=>{if(S.type==="group")return h(p,S);const y=p[S.field],v=S.value;switch(S.operator){case"=":return y==v;case"<>":return y!=v;case"<":return y<v;case"<=":return y<=v;case">":return y>v;case">=":return y>=v;case"contains":return String(y??"").toLowerCase().includes(String(v??"").toLowerCase());case"notcontains":return!String(y??"").toLowerCase().includes(String(v??"").toLowerCase());case"startswith":return String(y??"").toLowerCase().startsWith(String(v??"").toLowerCase());case"endswith":return String(y??"").toLowerCase().endsWith(String(v??"").toLowerCase());case"isblank":return y==null||y==="";case"isnotblank":return y!=null&&y!=="";default:return!0}};return m.logic==="and"?m.items.every(g):m.items.some(g)}function b(p,m,g){const S=m.toLowerCase();return(g?g.map(v=>p[v]):Object.values(p)).some(v=>String(v??"").toLowerCase().includes(S))}return{keyField:a,writable:!0,async load(p={}){var m;c("loading",!0);try{const g=await f("readonly",p,()=>{});(m=p.sort)!=null&&m.length&&g.sort((v,k)=>{for(const E of p.sort){const w=v[E.field]??"",C=k[E.field]??"",A=typeof w=="number"&&typeof C=="number"?w-C:String(w).localeCompare(String(C));if(A!==0)return E.direction==="desc"?-A:A}return 0});const S=await this.count(),y={data:g,totalCount:S};return c("loaded",y),c("loading",!1),y}catch(g){throw c("error",g),c("loading",!1),g}},async byKey(p){return u("readonly",m=>m.get(p))},async insert(p){return await u("readwrite",m=>m.add(p)),c("changed"),p},async update(p,m){const g=await this.byKey(p);if(!g)throw new Error(`Record not found: ${p}`);const S={...g,...m};return await u("readwrite",y=>y.put(S)),c("changed"),S},async remove(p){await u("readwrite",m=>m.delete(p)),c("changed")},on(p,m){return i.has(p)||i.set(p,new Set),i.get(p).add(m),()=>{var g;return(g=i.get(p))==null?void 0:g.delete(m)}},async clear(){await u("readwrite",p=>p.clear()),c("changed")},async count(){return u("readonly",p=>p.count())},async getAll(){return u("readonly",p=>p.getAll())},async bulkInsert(p){const m=await d();return new Promise((g,S)=>{const y=m.transaction(r,"readwrite"),v=y.objectStore(r);for(const k of p)v.put(k);y.oncomplete=()=>{c("changed"),g()},y.onerror=()=>S(y.error)})},async bulkDelete(p){const m=await d();return new Promise((g,S)=>{const y=m.transaction(r,"readwrite"),v=y.objectStore(r);for(const k of p)v.delete(k);y.oncomplete=()=>{c("changed"),g()},y.onerror=()=>S(y.error)})},async exportData(){return this.getAll()},async importData(p){await this.clear(),await this.bulkInsert(p)}}}function Ld(e){const{remoteSource:t,offlineConfig:r,syncStrategy:a="remote-first",onConflict:n,onSync:o,autoSyncInterval:s=0}=e,i=r.keyField??t.keyField,c=ft({...r,keyField:i}),d=ft({dbName:r.dbName,storeName:`${r.storeName}_pending`,keyField:"id"});let u=navigator.onLine,f=0;const h=new Map;function b(g,...S){var y;(y=h.get(g))==null||y.forEach(v=>v(...S))}window.addEventListener("online",()=>{u=!0,b("online"),m()}),window.addEventListener("offline",()=>{u=!1,b("offline")});async function p(g,S,y){const v={id:`pending_${++f}_${Date.now()}`,action:g,key:S,data:y,timestamp:Date.now(),retries:0};await d.insert(v)}async function m(){if(u){b("syncing",!0);try{let g=0,S=0,y=0;const v=await d.load();for(const k of v.data)try{switch(k.action){case"insert":await t.insert(k.data),g++;break;case"update":await t.update(k.key,k.data),S++;break;case"remove":await t.remove(k.key),y++;break}await d.remove(k.id)}catch{k.retries<3&&await d.update(k.id,{retries:k.retries+1})}if(a!=="local-first"){const k=await t.load();if(a==="remote-first")await c.importData(k.data);else if(a==="merge"&&n){const E=await c.load(),w=new Map(E.data.map(A=>[A[i],A])),C=[];for(const A of k.data){const M=w.get(A[i]);M?C.push(n(M,A)):C.push(A)}await c.importData(C)}}b("synced",{added:g,updated:S,removed:y}),o==null||o({added:g,updated:S,removed:y})}catch(g){b("syncError",g)}finally{b("syncing",!1)}}}return s>0&&window.setInterval(m,s),{keyField:i,writable:!0,async load(g={}){if(u&&a==="remote-first")try{const S=await t.load(g);return await c.bulkInsert(S.data),S}catch{}return c.load(g)},async byKey(g){if(u)try{const S=await t.byKey(g);return S&&await c.update(g,S).catch(()=>c.insert(S)),S}catch{}return c.byKey(g)},async insert(g){const S=await c.insert(g);if(u)try{return await t.insert(g)}catch{await p("insert",void 0,g)}else await p("insert",void 0,g);return b("changed"),S},async update(g,S){const y=await c.update(g,S);if(u)try{return await t.update(g,S)}catch{await p("update",g,S)}else await p("update",g,S);return b("changed"),y},async remove(g){if(await c.remove(g),u)try{await t.remove(g)}catch{await p("remove",g)}else await p("remove",g);b("changed")},on(g,S){return h.has(g)||h.set(g,new Set),h.get(g).add(S),()=>{var y;return(y=h.get(g))==null?void 0:y.delete(S)}},sync:m,isOnline:()=>u,async getPendingChanges(){return(await d.load()).data},async clearPendingChanges(){await d.clear()}}}function Fd(e){const{channelName:t,source:r}=e,a=new BroadcastChannel(t),n=new Map;function o(i,...c){var d;(d=n.get(i))==null||d.forEach(u=>u(...c))}a.onmessage=i=>{const c=i.data;switch(c.type){case"insert":case"update":case"remove":o("changed"),o("crossTabChange",c);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 c=await r.insert(i);return s({type:"insert",data:c}),c},async update(i,c){const d=await r.update(i,c);return s({type:"update",key:i,changes:c}),d},async remove(i){await r.remove(i),s({type:"remove",key:i})},on(i,c){n.has(i)||n.set(i,new Set),n.get(i).add(c);const d=r.on(i,c);return()=>{var u;(u=n.get(i))==null||u.delete(c),d()}},broadcast:s,requestSync(){s({type:"request-sync"})}}}function Dd(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 c=new URL(window.location.href);c.search=i.toString(),window.history.replaceState({},"",c.toString())}}function s(i){return t?`${t}_${i}`:i}return{read(){const i=n(),c={};if(r.filter){const d=i.get(s("filter"));if(d)try{c.filter=JSON.parse(d)}catch{}}if(r.sort){const d=i.get(s("sort"));if(d)try{c.sort=JSON.parse(d)}catch{}}if(r.page){const d=i.get(s("skip")),u=i.get(s("take"));d&&(c.skip=parseInt(d,10)),u&&(c.take=parseInt(u,10))}if(r.search){const d=i.get(s("search"));d&&(c.search=d)}return c},write(i){const c=n();r.filter&&(i.filter&&i.filter.items.length>0?c.set(s("filter"),JSON.stringify(i.filter)):c.delete(s("filter"))),r.sort&&(i.sort&&i.sort.length>0?c.set(s("sort"),JSON.stringify(i.sort)):c.delete(s("sort"))),r.page&&(i.skip?c.set(s("skip"),String(i.skip)):c.delete(s("skip")),i.take?c.set(s("take"),String(i.take)):c.delete(s("take"))),r.search&&(i.search?c.set(s("search"),i.search):c.delete(s("search"))),o(c)},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 Pd={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 zd(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 $d=["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"],Hd={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},ae={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Pt={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},Ro={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:Pt,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"}},Lo={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:ae,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"}},Fo={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:Pt,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"}},Do={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:ae,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"}},Po={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:ae,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"}},zo={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:ae,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"}},$o={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:ae,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"}},Ho={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:ae,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"}},_o={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:Pt,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"}},Oo={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:ae,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"}},Bo={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:ae,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"}},jo={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:Hd,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"}},zt={obsidianEditorial:Ro,neonArcade:Lo,hyggeScandinavian:Fo,brutalistRaw:Do,glassAurora:Po,candyPop:zo,newspaperBroadsheet:$o,synthwave84:Ho,zenMinimal:_o,claymorphism:Oo,bauhaus:Bo,bankVault:jo},Wo=Object.values(zt);function _d(e){return zt[e]}function Od(e){return Wo.filter(t=>t.meta.tags.includes(e))}const Bd=["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"],Vo={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},U={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Ie={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},Qe={space1:"8px",space2:"16px",space3:"24px",space4:"32px",space5:"44px",space6:"56px",space8:"80px"},Ko={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:Ie,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"}},Uo={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:Ie,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"}},Xo={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:Qe,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"}},Go={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:U,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"}},qo={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:Qe,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"}},Yo={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:U,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"}},Jo={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:Ie,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"}},Qo={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:U,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"}},Zo={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:U,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"}},ei={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:U,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"}},ti={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:U,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"}},ri={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:U,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"}},ai={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:U,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"}},ni={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:U,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"}},oi={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:U,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"}},ii={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:Qe,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"}},si={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:U,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"}},ci={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:U,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"}},li={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:Ie,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"}},di={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:U,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"}},ui={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:Qe,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"}},fi={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:Vo,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"}},mi={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:Ie,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"}},pi={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:Vo,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"}},$t={forestCanopy:Ko,desertDune:Uo,arcticCrystal:Xo,autumnFoliage:Go,japaneseWashi:qo,moroccanMosaic:Yo,artDecoGatsby:Jo,sovietConstructivist:Qo,blueprint:Zo,hologramUI:ei,deepSea:ti,analog70s:ri,vhsTracking:ai,typewriterPress:ni,y2kAqua:oi,vogueDidone:ii,comicHalftone:si,zinePunk:ci,watercolorWash:li,memphis80s:di,inkSumie:ui,dieterRams:fi,blackTieGala:mi,swissGrid:pi},gi=Object.values($t);function jd(e){return $t[e]}function Wd(e){return gi.filter(t=>t.meta.tags.includes(e))}const yi=l.createContext(null);function hi(){const e=l.useContext(yi);if(!e)throw new Error("useThemeVariants must be used within NiceThemeVariantProvider");return e}function Vd({initialConfig:e,storageKey:t="ntd-variant-config",autoApply:r=!0,children:a}){const[n,o]=l.useState(()=>{if(typeof window<"u"&&t){const d=localStorage.getItem(t);if(d)try{return{...Y,...JSON.parse(d)}}catch{}}return{...Y,...e}});l.useEffect(()=>{r&&typeof window<"u"&&ht(n)},[n,r]),l.useEffect(()=>{typeof window<"u"&&t&&localStorage.setItem(t,JSON.stringify(n))},[n,t]);const s=l.useCallback(d=>{o(u=>({...u,...d}))},[]),i=l.useCallback(d=>{const u=je[d];u&&o(u)},[]),c=l.useCallback(()=>{o(Y)},[]);return x.jsx(yi.Provider,{value:{config:n,setConfig:s,applyPreset:i,reset:c},children:a})}function Kd({showPresets:e=!0,showPreview:t=!0,showCSS:r=!1,collapsible:a=!0,className:n,style:o}){const{t:s}=j.useNiceTranslation(),{config:i,setConfig:c,applyPreset:d,reset:u}=hi(),[f,h]=l.useState(new Set(["presets","radius","shadow"])),b=m=>{a&&h(g=>{const S=new Set(g);return S.has(m)?S.delete(m):S.add(m),S})},p=m=>!a||f.has(m);return x.jsxs("div",{className:`ntd-theme-variant-configurator ${n||""}`,style:{fontFamily:"system-ui, sans-serif",fontSize:"14px",...o},children:[e&&x.jsx(G,{title:s("themeVariants.presets","Presets"),expanded:p("presets"),onToggle:()=>b("presets"),children:x.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:[Object.keys(je).map(m=>x.jsx("button",{onClick:()=>d(m),style:{padding:"6px 12px",border:"1px solid var(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:"var(--nice-bg-secondary, #f9fafb)",cursor:"pointer",textTransform:"capitalize"},children:m},m)),x.jsx("button",{onClick:u,style:{padding:"6px 12px",border:"1px solid var(--nice-danger-dark, #dc2626)",borderRadius:"6px",background:"var(--nice-danger-bg, #fef2f2)",color:"var(--nice-color-error, #dc2626)",cursor:"pointer"},children:s("themeVariants.reset","Reset")})]})}),x.jsx(G,{title:s("themeVariants.borderRadius","Border Radius"),expanded:p("radius"),onToggle:()=>b("radius"),children:x.jsx(ie,{options:Object.keys(ve),value:i.radius,onChange:m=>c({radius:m}),renderPreview:m=>x.jsx("div",{style:{width:"24px",height:"24px",background:"var(--nice-color-accent, #6366f1)",borderRadius:ve[m].md}})})}),x.jsx(G,{title:s("themeVariants.shadows","Shadows"),expanded:p("shadow"),onToggle:()=>b("shadow"),children:x.jsx(ie,{options:Object.keys(ze),value:i.shadow,onChange:m=>c({shadow:m}),renderPreview:m=>x.jsx("div",{style:{width:"24px",height:"24px",background:"var(--nice-bg-primary, #fff)",borderRadius:"4px",boxShadow:ze[m]}})})}),x.jsx(G,{title:s("themeVariants.buttonStyle","Button Style"),expanded:p("button"),onToggle:()=>b("button"),children:x.jsx(ie,{options:["flat","raised","outlined","ghost","soft","gradient","3d","neumorphic"],value:i.buttonStyle,onChange:m=>c({buttonStyle:m})})}),x.jsx(G,{title:s("themeVariants.inputStyle","Input Style"),expanded:p("input"),onToggle:()=>b("input"),children:x.jsx(ie,{options:["bordered","filled","underlined","floating","soft","neumorphic"],value:i.inputStyle,onChange:m=>c({inputStyle:m})})}),x.jsx(G,{title:s("themeVariants.cardStyle","Card Style"),expanded:p("card"),onToggle:()=>b("card"),children:x.jsx(ie,{options:["flat","elevated","bordered","glass","gradient","neumorphic"],value:i.cardStyle,onChange:m=>c({cardStyle:m})})}),x.jsx(G,{title:s("themeVariants.animation","Animation"),expanded:p("animation"),onToggle:()=>b("animation"),children:x.jsx(ie,{options:Object.keys(Be),value:i.animation,onChange:m=>c({animation:m})})}),x.jsx(G,{title:s("themeVariants.density","Density"),expanded:p("density"),onToggle:()=>b("density"),children:x.jsx(ie,{options:Object.keys(we),value:i.density,onChange:m=>c({density:m})})}),t&&x.jsx(G,{title:s("themeVariants.preview","Preview"),expanded:p("preview"),onToggle:()=>b("preview"),children:x.jsx(Ud,{config:i})}),r&&x.jsx(G,{title:s("themeVariants.generatedCss","Generated CSS"),expanded:p("css"),onToggle:()=>b("css"),children:x.jsx("pre",{style:{background:"var(--nice-text-primary, #1f2937)",color:"var(--nice-text-inverse, #e5e7eb)",padding:"12px",borderRadius:"6px",fontSize:"12px",overflow:"auto",maxHeight:"200px"},children:yt(i)})})]})}function G({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(--nice-text-secondary, #374151)",textAlign:"left"},children:[x.jsx("span",{style:{display:"inline-flex",transform:t?"rotate(90deg)":"none",transition:"transform 150ms"},children:x.jsx(N.NiceIcon,{name:"chevron-right",size:14})}),e]}),t&&x.jsx("div",{style:{paddingLeft:"20px",paddingTop:"8px"},children:a})]})}function ie({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(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:t===n?"var(--nice-primary-bg, #eef2ff)":"var(--nice-bg-primary, #fff)",cursor:"pointer",textTransform:"capitalize",fontSize:"13px"},children:[a&&a(n),n]},n))})}function Ud({config:e}){const{t}=j.useNiceTranslation(),r=mt(e.buttonStyle,"var(--nice-color-accent, #6366f1)"),a=pt(e.inputStyle),n=gt(e.cardStyle),o=ve[e.radius],s=we[e.density];return x.jsxs("div",{style:{padding:"20px",background:"var(--nice-bg-secondary, #f9fafb)",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:[x.jsxs("div",{style:{padding:s.paddingX,borderRadius:o.lg,...n},children:[x.jsx("h4",{style:{margin:"0 0 12px",fontSize:s.fontSize},children:t("themeVariants.cardPreview","Card Preview")}),x.jsxs("div",{style:{display:"flex",gap:s.gap,marginBottom:"12px"},children:[x.jsx("button",{style:{padding:`${s.paddingY} ${s.paddingX}`,borderRadius:o.md,color:"var(--nice-text-primary, #fff)",fontSize:s.fontSize,cursor:"pointer",...r},children:t("themeVariants.primary","Primary")}),x.jsx("button",{style:{padding:`${s.paddingY} ${s.paddingX}`,borderRadius:o.md,background:"var(--nice-border-color, #e5e7eb)",border:"none",fontSize:s.fontSize,cursor:"pointer"},children:t("themeVariants.secondary","Secondary")})]}),x.jsx("input",{type:"text",placeholder:t("themeVariants.inputPreview","Input preview..."),style:{width:"100%",height:s.inputHeight,padding:`0 ${s.paddingX}`,fontSize:s.fontSize,outline:"none",boxSizing:"border-box",...a}})]}),x.jsx("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:["Info","Success","Warning","Error"].map(i=>x.jsx("span",{style:{padding:"4px 10px",borderRadius:o.full,background:"var(--nice-border-color, #e5e7eb)",fontSize:"12px"},children:i},i))})]})}function Xd(e){const[t,r]=l.useState(()=>typeof window>"u"?!1:tr());return l.useEffect(()=>{var d,u,f;if(typeof window>"u")return;const a=()=>(e==null?void 0:e.current)??document.documentElement,n=()=>r(tr(a()));n();const o=new MutationObserver(n),s={attributes:!0,attributeFilter:["data-theme","class","style"]};o.observe(document.documentElement,s);const i=(u=(d=e==null?void 0:e.current)==null?void 0:d.closest)==null?void 0:u.call(d,"[data-theme], .nice-dark, .nice-light, .dark");i&&i!==document.documentElement&&o.observe(i,s);const c=window.matchMedia("(prefers-color-scheme: dark)");return(f=c.addEventListener)==null||f.call(c,"change",n),()=>{var h;o.disconnect(),(h=c.removeEventListener)==null||h.call(c,"change",n)}},[e]),t}function tr(e=document.documentElement){var t,r;try{const a=((t=e.closest)==null?void 0:t.call(e,"[data-theme], .nice-dark, .nice-light, .dark"))??document.documentElement,n=a.getAttribute("data-theme");if(n==="dark")return!0;if(n==="light")return!1;if(a.classList.contains("nice-dark")||a.classList.contains("dark"))return!0;if(a.classList.contains("nice-light"))return!1;const o=getComputedStyle(e),s=o.getPropertyValue("--text-primary").trim()||o.color;if(s){const i=s.match(/rgba?\(([^)]+)\)/);if(i){const[c,d,u]=i[1].split(",").map(f=>parseFloat(f.trim()));return(.299*c+.587*d+.114*u)/255>.5}if(/^#([0-9a-f]{3,8})$/i.test(s)){const c=s.replace("#",""),d=c.length===3?c.split("").map(b=>b+b).join(""):c.slice(0,6),u=parseInt(d.slice(0,2),16),f=parseInt(d.slice(2,4),16),h=parseInt(d.slice(4,6),16);return(.299*u+.587*f+.114*h)/255>.5}}return((r=window.matchMedia)==null?void 0:r.call(window,"(prefers-color-scheme: dark)").matches)??!1}catch{return!1}}const Gd=["NiceTextInput","NiceTextArea","NiceNumberInput","NiceDateTimePicker","NiceSelect","NiceCheckbox","NiceToggle","NiceRadioGroup","NiceSlider","NiceColorPicker","NiceAutocomplete","NiceLookup","NiceCalendar","NiceDateRangeBox","NiceTagBox","NiceRangeSlider","NiceDropDownBox","NiceHtmlEditor","NiceForm","NiceRating","NiceOtpInput","NiceMentionInput","NiceTreeSelect","NiceMaskedInput","NiceKnob","NicePickList","NiceInlineEdit","NiceButton","NiceButtonGroup","NiceDropDownButton","NiceSpeedDialAction","NiceTable","NiceDataGrid","NiceList","NiceTreeView","NiceTreeList","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","NiceSplitter","NiceAppLayout","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","NiceUpload","NiceFileManager","NiceFilterBuilder","NiceGallery","NiceMap","div","span","row","column","stack","container"];function qd(e){const t=[];bi(e.root,t,"root");const r=new Set((e.dataSources??[]).map(a=>a.id));return Si(e.root,r,t),t}function bi(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++)bi(e.children[a],t,`${r}.children[${a}]`)}function Si(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)Si(a,t,r)}function Yd(e,t){const r=Jd(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 Jd(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 vi(e){const{itemCount:t,itemHeight:r,containerHeight:a,overscan:n=3,initialScrollTop:o=0}=e,[s,i]=l.useState(o),[c,d]=l.useState(!1),u=l.useRef(void 0),f=l.useMemo(()=>{if(typeof r=="number")return null;const w=new Array(t+1);w[0]=0;for(let C=0;C<t;C++)w[C+1]=w[C]+r(C);return w},[t,r]),h=l.useMemo(()=>typeof r=="number"?t*r:f?f[t]:0,[t,r,f]),b=l.useCallback(w=>typeof r=="number"?r:r(w),[r]),p=l.useCallback(w=>typeof r=="number"?w*r:f?f[w]:0,[r,f]),m=l.useCallback(w=>{if(typeof r=="number")return Math.floor(w/r);if(!f)return 0;let C=0,A=t-1;for(;C<=A;){const M=Math.floor((C+A)/2),I=f[M];if(I===w)return M;I<w?C=M+1:A=M-1}return Math.max(0,C-1)},[t,r,f]),{startIndex:g,endIndex:S,visibleItems:y}=l.useMemo(()=>{const w=Math.max(0,m(s)-n);let C=w,A=p(w);for(;C<t&&A<s+a;)A+=b(C),C++;C=Math.min(t,C+n);const M=[];for(let I=w;I<C;I++)M.push({index:I,offset:p(I),height:b(I),key:I});return{startIndex:w,endIndex:C,visibleItems:M}},[s,a,t,n,m,p,b]),v=l.useCallback(w=>{const C=w.currentTarget;i(C.scrollTop),d(!0),u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{d(!1)},150)},[]),k=l.useCallback((w,C="start")=>{const A=p(w),M=b(w);let I;switch(C){case"center":I=A-a/2+M/2;break;case"end":I=A-a+M;break;default:I=A}i(Math.max(0,Math.min(I,h-a)))},[p,b,a,h]),E=l.useCallback(w=>{i(Math.max(0,Math.min(w,h-a)))},[h,a]);return l.useEffect(()=>()=>{u.current&&window.clearTimeout(u.current)},[]),{visibleItems:y,totalHeight:h,scrollTop:s,scrollToIndex:k,scrollTo:E,onScroll:v,startIndex:g,endIndex:S,isScrolling:c}}function Qd(e){const{rowCount:t,columnCount:r,rowHeight:a,columnWidth:n,containerHeight:o,containerWidth:s,overscan:i=2}=e,[c,d]=l.useState(0),[u,f]=l.useState(0),[h,b]=l.useState(!1),p=l.useRef(void 0),m=l.useMemo(()=>{if(typeof a=="number")return t*a;let v=0;for(let k=0;k<t;k++)v+=a(k);return v},[t,a]),g=l.useMemo(()=>{if(typeof n=="number")return r*n;let v=0;for(let k=0;k<r;k++)v+=n(k);return v},[r,n]),S=l.useMemo(()=>{const v=[];let k=0,E=0;if(typeof a=="number")k=Math.floor(c/a),E=k*a;else for(;k<t&&E+a(k)<c;)E+=a(k),k++;k=Math.max(0,k-i);let w=k,C=typeof a=="number"?k*a:E;for(;w<t&&C<c+o;)C+=typeof a=="number"?a:a(w),w++;w=Math.min(t,w+i);let A=0,M=0;if(typeof n=="number")A=Math.floor(u/n),M=A*n;else for(;A<r&&M+n(A)<u;)M+=n(A),A++;A=Math.max(0,A-i);let I=A,$=typeof n=="number"?A*n:M;for(;I<r&&$<u+s;)$+=typeof n=="number"?n:n(I),I++;I=Math.min(r,I+i);let T=typeof a=="number"?k*a:(()=>{let D=0;for(let F=0;F<k;F++)D+=a(F);return D})();for(let D=k;D<w;D++){const F=typeof a=="number"?a:a(D);let P=typeof n=="number"?A*n:(()=>{let L=0;for(let O=0;O<A;O++)L+=n(O);return L})();for(let L=A;L<I;L++){const O=typeof n=="number"?n:n(L);v.push({rowIndex:D,columnIndex:L,top:T,left:P,width:O,height:F,key:`${D}:${L}`}),P+=O}T+=F}return v},[c,u,t,r,a,n,o,s,i]),y=l.useCallback(v=>{const k=v.currentTarget;d(k.scrollTop),f(k.scrollLeft),b(!0),p.current&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b(!1)},150)},[]);return l.useEffect(()=>()=>{p.current&&window.clearTimeout(p.current)},[]),{visibleCells:S,totalWidth:g,totalHeight:m,onScroll:y,scrollTop:c,scrollLeft:u,isScrolling:h}}function Zd(e,t,r,a=3){const n=vi({itemCount:e.length,itemHeight:r,containerHeight:t,overscan:a}),o=l.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 eu(e){const{items:t,searchFn:r,debounce:a=0,minLength:n=0}=e,[o,s]=l.useState(""),i=l.useDeferredValue(o),[c,d]=l.useState(""),u=l.useRef(void 0);l.useEffect(()=>{if(a>0)return u.current=window.setTimeout(()=>{d(o)},a),()=>{u.current&&window.clearTimeout(u.current)};d(o)},[o,a]);const f=l.useDeferredValue(c),h=l.useMemo(()=>f.length<n?t:t.filter(p=>r(p,f)),[t,f,r,n]);return{query:o,setQuery:s,results:h,isStale:f!==i,deferredQuery:f}}function tu(e){const[t,r]=l.useState(e),[a,n]=l.useState(e),[o,s]=l.useTransition(),i=l.useCallback(d=>{const u=typeof d=="function"?d(t):d;n(u),s(()=>{r(u)})},[t]),c=l.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:c}}function ru(e){const{data:t,processFn:r,chunkSize:a=1e3,priority:n="user-visible"}=e,[o,s]=l.useState(null),[i,c]=l.useState(0),[d,u]=l.useState(!1),f=l.useRef(!1),h=l.useCallback(async()=>{if(t.length===0){s([]);return}u(!0),c(0),f.current=!1;const p=[],m=t.length;for(let g=0;g<m&&!f.current;g+=a){const S=t.slice(g,g+a),y=S.map((k,E)=>r(k,g+E));p.push(...y);const v=Math.min(100,(g+S.length)/m*100);n==="background"?await new Promise(k=>{"requestIdleCallback"in window?window.requestIdleCallback(k):setTimeout(k,0)}):n==="user-visible"&&await new Promise(k=>requestAnimationFrame(k)),l.startTransition(()=>{c(v)})}s(p),u(!1),c(100)},[t,r,a,n]),b=l.useCallback(()=>{f.current=!0},[]);return l.useEffect(()=>(h(),()=>{f.current=!0}),[h]),{result:o,progress:i,isProcessing:d,process:h,cancel:b}}function au(e,t={}){const{initialCount:r=20,batchSize:a=50,batchDelay:n=16}=t,[o,s]=l.useState(Math.min(r,e.length)),[i,c]=l.useState(e.length<=r);return l.useEffect(()=>{if(o>=e.length){c(!0);return}const u=setTimeout(()=>{l.startTransition(()=>{s(f=>Math.min(f+a,e.length))})},n);return()=>clearTimeout(u)},[o,e.length,a,n]),l.useEffect(()=>{s(Math.min(r,e.length)),c(e.length<=r)},[e,r]),{visibleItems:l.useMemo(()=>e.slice(0,o),[e,o]),visibleCount:o,totalCount:e.length,isComplete:i,progress:o/e.length*100}}function nu(e){const{initial:t,mutate:r,rollbackOnError:a=!0}=e,[n,o]=l.useState(t),[s,i]=l.useState(!1),[c,d]=l.useState(null),u=l.useRef(t),f=l.useCallback(async b=>{u.current=n,d(null),o(b),i(!0);try{const p=await r(b);o(p)}catch(p){d(p instanceof Error?p:new Error(String(p))),a&&o(u.current)}finally{i(!1)}},[n,r,a]),h=l.useCallback(()=>{o(t),d(null),i(!1)},[t]);return{value:n,update:f,isPending:s,error:c,reset:h}}function ou(e){const{workerScript:t,idleTimeout:r=3e4}=e,[a,n]=l.useState(null),[o,s]=l.useState(!1),[i,c]=l.useState(null),d=l.useRef(null),u=l.useRef(0),f=l.useRef(null),h=l.useRef(void 0),b=l.useRef(()=>{}),p=l.useCallback(()=>{if(!d.current){if(typeof t=="function"){const v=new Blob([`(${t.toString()})()`],{type:"application/javascript"});d.current=new Worker(URL.createObjectURL(v))}else d.current=new Worker(t,{type:"module"});d.current.onmessage=v=>{const k=v.data;k.id===f.current&&(k.type==="result"?(n(k.result??null),s(!1),f.current=null,b.current()):k.type==="error"&&(c(new Error(k.error)),s(!1),f.current=null,b.current()))},d.current.onerror=v=>{c(new Error(v.message)),s(!1),f.current=null}}return d.current},[t]),m=l.useCallback(()=>{h.current&&window.clearTimeout(h.current),r>0&&(h.current=window.setTimeout(()=>{d.current&&!f.current&&(d.current.terminate(),d.current=null)},r))},[r]);b.current=m;const g=l.useCallback(v=>new Promise((k,E)=>{const w=p(),C=`task-${++u.current}`;f.current=C,s(!0),c(null);const A=w.onmessage;w.onmessage=M=>{A==null||A.call(w,M),M.data.id===C&&(M.data.type==="result"?k(M.data.result):M.data.type==="error"&&E(new Error(M.data.error)))},w.postMessage({type:"task",id:C,data:v})}),[p]),S=l.useCallback(()=>{d.current&&f.current&&(d.current.postMessage({type:"cancel",id:f.current}),f.current=null,s(!1))},[]),y=l.useCallback(()=>{d.current&&(d.current.terminate(),d.current=null),h.current&&window.clearTimeout(h.current),f.current=null,s(!1)},[]);return l.useEffect(()=>()=>{y()},[y]),{result:a,isProcessing:o,error:i,execute:g,cancel:S,terminate:y}}function iu(e){const{workerScript:t,poolSize:r=navigator.hardwareConcurrency||4,idleTimeout:a=6e4}=e,n=l.useRef([]),o=l.useRef([]),s=l.useRef(0),i=l.useRef(void 0),c=l.useCallback(()=>{if(typeof t=="function"){const S=new Blob([`(${t.toString()})()`],{type:"application/javascript"});return new Worker(URL.createObjectURL(S))}return new Worker(t,{type:"module"})},[t]),d=l.useCallback(()=>{const S=n.current.find(y=>!y.busy);if(S)return S;if(n.current.length<r){const v={worker:c(),busy:!1,taskId:null};return n.current.push(v),v}return null},[c,r]),u=l.useRef(()=>{}),f=l.useCallback(()=>{for(;o.current.length>0;){const S=d();if(!S)break;const y=o.current.shift();S.busy=!0,S.taskId=y.id,S.worker.onmessage=v=>{const k=v.data;k.id===y.id&&(S.busy=!1,S.taskId=null,k.type==="result"?y.resolve(k.result):k.type==="error"&&y.reject(new Error(k.error)),f(),u.current())},S.worker.onerror=v=>{S.busy=!1,S.taskId=null,y.reject(new Error(v.message)),f()},S.worker.postMessage({type:"task",id:y.id,data:y.data})}},[d]),h=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),a>0&&(i.current=window.setTimeout(()=>{n.current.filter(y=>!y.busy).forEach(y=>{y.worker.terminate(),n.current=n.current.filter(v=>v!==y)})},a))},[a]);u.current=h;const b=l.useCallback(S=>new Promise((y,v)=>{const k=`pool-task-${++s.current}`;o.current.push({id:k,data:S,resolve:y,reject:v}),f()}),[f]),p=l.useCallback(S=>Promise.all(S.map(y=>b(y))),[b]),m=l.useCallback(()=>{n.current.forEach(S=>S.worker.terminate()),n.current=[],o.current=[],i.current&&window.clearTimeout(i.current)},[]),g=l.useCallback(()=>({total:n.current.length,busy:n.current.filter(S=>S.busy).length,idle:n.current.filter(S=>!S.busy).length,queued:o.current.length}),[]);return l.useEffect(()=>()=>{m()},[m]),{execute:b,executeAll:p,terminateAll:m,getStats:g}}function su(e){const t=`
122
+ HTML:`}],{temperature:.3}),c=i.content.match(/```html?\n?([\s\S]*?)```/);return c?c[1].trim():i.content.trim()}finally{r(!1)}},[e]);return{improveText:a,translate:n,generateHtml:o,isLoading:t}}class Je{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 od(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 vo(e,t){if(t.items.length===0)return!0;const r=a=>a.type==="condition"?od(e,a):vo(e,a);return t.logic==="and"?t.items.every(r):t.items.some(r)}function id(e,t){var n;let r=[...e];if(t.filter&&(r=r.filter(o=>vo(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 c=o[i.field]??"",d=s[i.field]??"",u=typeof c=="number"&&typeof d=="number"?c-d:String(c).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 sd(e){const t=e.keyField??"id";let r=[...e.data];const a=new Je;return{keyField:t,writable:!0,async load(o={}){a.emit("loading",!0);try{const s=id(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 c={...r[i],...s};return r=r.map((d,u)=>u===i?c:d),a.emit("changed"),c},async remove(o){r=r.filter(s=>s[t]!==o),a.emit("changed")},on:a.on.bind(a)}}async function cd(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 rt(e,t,r){return typeof e=="function"?e(r):e||`${t}/${encodeURIComponent(String(r))}`}function ld(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 dd(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 xo(e){const t=e.keyField??"id",r=new Je;async function a(o,s){const i=await cd(e),c=await fetch(o,{...e.fetchOptions,...s,headers:{...i,...s==null?void 0:s.headers}});if(!c.ok){const u=await c.text().catch(()=>c.statusText);throw new Error(`HTTP ${c.status}: ${u}`)}return(c.headers.get("content-type")??"").includes("json")?c.json():c.text()}return{keyField:t,writable:!0,async load(o={}){var s;r.emit("loading",!0);try{const i=e.loadUrl??e.url,c=e.mapLoadParams?e.mapLoadParams(o):ld(o),d=new URLSearchParams(c).toString(),u=d?`${i}?${d}`:i,f=await a(u),h=e.extractLoadResult?e.extractLoadResult(f):dd(f);return r.emit("loaded",h),r.emit("loading",!1),h}catch(i){const c=i instanceof Error?i:new Error(String(i));throw r.emit("error",c),r.emit("loading",!1),(s=e.onError)==null||s.call(e,c,"load"),c}},async byKey(o){const s=rt(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,c=await a(s,{method:"POST",body:JSON.stringify(i)}),d=e.extractItem?e.extractItem(c):c;return r.emit("changed"),d},async update(o,s){const i=rt(e.updateUrl,e.url,o),c=e.prepareUpdateBody?e.prepareUpdateBody(o,s):s,d=await a(i,{method:e.updateMethod??"PUT",body:JSON.stringify(c)}),u=e.extractItem?e.extractItem(d):d;return r.emit("changed"),u},async remove(o){const s=rt(e.deleteUrl,e.url,o);await a(s,{method:"DELETE"}),r.emit("changed")},on:r.on.bind(r)}}function ud(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 wo(e,t){return e.items.length===0?"":e.items.map(a=>a.type==="condition"?ud(a,t):`(${wo(a,t)})`).join(e.logic==="and"?" and ":" or ")}function fd(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(c=>`${c.field} ${c.direction}`).join(",")),a.filter){const c=wo(a.filter,t);c&&(n.$filter=c)}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,c;const n=a,o=n.value??((i=n.d)==null?void 0:i.results)??[],s=n["@odata.count"]??((c=n.d)==null?void 0:c.__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 xo(r)}function md(e){const t=e.keyField??"id",r=new Je;async function a(c,d){var p;const u={"Content-Type":"application/json"},f=e.headers?typeof e.headers=="function"?await e.headers():e.headers:{},h=await fetch(e.url,{method:"POST",headers:{...u,...f},body:JSON.stringify({query:c,variables:d})});if(!h.ok){const m=await h.text().catch(()=>h.statusText);throw new Error(`GraphQL HTTP ${h.status}: ${m}`)}const b=await h.json();if((p=b.errors)!=null&&p.length)throw new Error(b.errors.map(m=>m.message).join("; "));return b.data}function n(c){var u;const d={};return c.skip!=null&&(d.skip=c.skip),c.take!=null&&(d.take=c.take),c.search&&(d.search=c.search),(u=c.sort)!=null&&u.length&&(d.sort=c.sort),c.filter&&(d.filter=c.filter),d}function o(c){if(!c||typeof c!="object")return{data:[],totalCount:0};const d=Object.values(c)[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 s(c){return!c||typeof c!="object"?c:Object.values(c)[0]}return{keyField:t,writable:!!(e.queries.insert||e.queries.update||e.queries.remove),async load(c={}){var d;r.emit("loading",!0);try{const u=e.mapVariables?e.mapVariables(c):n(c),f=await a(e.queries.load,u),h=e.extractLoadResult?e.extractLoadResult(f):o(f);return r.emit("loaded",h),r.emit("loading",!1),h}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(c){if(!e.queries.byKey)throw new Error("byKey query not configured");const d=await a(e.queries.byKey,{[t]:c});return e.extractItem?e.extractItem(d):s(d)},insert:e.queries.insert?async c=>{const d=await a(e.queries.insert,{input:c}),u=e.extractItem?e.extractItem(d):s(d);return r.emit("changed"),u}:void 0,update:e.queries.update?async(c,d)=>{const u=await a(e.queries.update,{[t]:c,input:d}),f=e.extractItem?e.extractItem(u):s(u);return r.emit("changed"),f}:void 0,remove:e.queries.remove?async c=>{await a(e.queries.remove,{[t]:c}),r.emit("changed")}:void 0,on:r.on.bind(r)}}function pd(e){const t=e.keyField??"id",r=new Je;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)}}function ko(e){return/^[A-Za-z_][A-Za-z0-9_.]*$/.test(e)?e:`"${e.replace(/"/g,'""')}"`}function gd(e,t={}){const r=[],a=t.placeholder??(()=>"?"),n=t.quoteField??ko,o=c=>(r.push(c),a(r.length-1)),s=c=>{const d=n(c.field);switch(c.operator){case"=":case"<>":case"<":case"<=":case">":case">=":return`${d} ${c.operator} ${o(c.value)}`;case"contains":return`${d} LIKE ${o(`%${String(c.value)}%`)}`;case"notcontains":return`${d} NOT LIKE ${o(`%${String(c.value)}%`)}`;case"startswith":return`${d} LIKE ${o(`${String(c.value)}%`)}`;case"endswith":return`${d} LIKE ${o(`%${String(c.value)}`)}`;case"between":{const u=Array.isArray(c.value)?c.value:[c.value,c.value];return`${d} BETWEEN ${o(u[0])} AND ${o(u[1])}`}case"isblank":return`(${d} IS NULL OR ${d} = ${o("")})`;case"isnotblank":return`(${d} IS NOT NULL AND ${d} <> ${o("")})`;case"in":{const u=Array.isArray(c.value)?c.value:[c.value];return u.length?`${d} IN (${u.map(o).join(", ")})`:"1 = 0"}default:return`${d} = ${o(c.value)}`}},i=c=>{const d=[];for(const u of c.items)if(u.type==="group"){const f=i(u);f&&d.push(`(${f})`)}else d.push(s(u));return d.join(c.logic==="or"?" OR ":" AND ")};return{sql:i(e),params:r}}function yd(e,t={}){const r=t.quoteField??ko;return e.filter(a=>a.field).map(a=>`${r(a.field)} ${a.direction==="desc"?"DESC":"ASC"}`).join(", ")}function Z(e){return String(e??"").toLowerCase()}function Co(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 Z(r).includes(Z(a));case"notcontains":return!Z(r).includes(Z(a));case"startswith":return Z(r).startsWith(Z(a));case"endswith":return Z(r).endsWith(Z(a));case"between":{const n=Array.isArray(a)?a:[a,a];return r>=n[0]&&r<=n[1]}case"isblank":return r==null||r==="";case"isnotblank":return r!=null&&r!=="";case"in":return(Array.isArray(a)?a:[a]).some(o=>r==o);default:return!0}}function Ft(e,t){if(!t.items.length)return!0;const r=a=>a.type==="condition"?Co(e,a):Ft(e,a);return t.logic==="or"?t.items.some(r):t.items.every(r)}function er(e){return e==null||e===""}const hd=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function bd(e){const t=String(e);try{return new URL(t),!0}catch{return/^https?:\/\/[^\s]+$/.test(t)}}function K(e){return typeof e=="number"?e:parseFloat(String(e))}function Eo(e){const t=e.field;switch(e.op){case"required":return`${t} is required`;case"minLength":return`${t} must be at least ${e.value} characters`;case"maxLength":return`${t} must be at most ${e.value} characters`;case"min":return`${t} must be ≥ ${e.value}`;case"max":return`${t} must be ≤ ${e.value}`;case"pattern":return`${t} has an invalid format`;case"email":return`${t} must be a valid email`;case"url":return`${t} must be a valid URL`;case"equals":return`${t} must equal ${e.value}`;case"notEquals":return`${t} must not equal ${e.value}`;case"greaterThan":return`${t} must be greater than ${e.value}`;case"lessThan":return`${t} must be less than ${e.value}`;case"matchesField":return`${t} must match ${e.compareField}`;case"greaterThanField":return`${t} must be greater than ${e.compareField}`;case"lessThanField":return`${t} must be less than ${e.compareField}`;default:return`${t} is invalid`}}function No(e,t){const r=t[e.field];if(e.op==="required")return!er(r);if(er(r))return!0;const a=e.compareField!=null?t[e.compareField]:void 0;switch(e.op){case"minLength":return String(r).length>=K(e.value);case"maxLength":return String(r).length<=K(e.value);case"min":return K(r)>=K(e.value);case"max":return K(r)<=K(e.value);case"pattern":try{return new RegExp(String(e.value)).test(String(r))}catch{return!0}case"email":return hd.test(String(r));case"url":return bd(r);case"equals":return r===e.value;case"notEquals":return r!==e.value;case"greaterThan":return K(r)>K(e.value);case"lessThan":return K(r)<K(e.value);case"matchesField":return r===a;case"greaterThanField":return K(r)>K(a);case"lessThanField":return K(r)<K(a);case"custom":return e.validate?e.validate(r,t):!0;default:return!0}}function Ao(e,t){const r=[];for(const a of e??[])a.when&&!Ft(t,a.when)||No(a,t)||r.push({field:a.field,message:a.message??Eo(a),severity:a.severity??"error",ruleId:a.id});return r}function Sd(e,t){return Ao(e,t).every(r=>r.severity!=="error")}class ut{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 Mo{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 vd(e,t={}){const r=new ut(t),a=new ut(t),n=new Mo,o=t.generateKey??(c=>JSON.stringify(c)),s=t.cacheLoads!==!1,i=t.cacheByKey!==!1;return{...e,cache:r,async load(c={}){const d=`load:${o(c)}`;if(s){const u=r.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.load(c);return s&&r.set(d,u),u})},async byKey(c){const d=`byKey:${String(c)}`;if(i){const u=a.get(d);if(u)return u}return n.dedupe(d,async()=>{const u=await e.byKey(c);return i&&u&&a.set(d,u),u})},async insert(c){const d=await e.insert(c);return r.invalidateAll(),d},async update(c,d){const u=await e.update(c,d);return r.invalidateAll(),a.invalidate(`byKey:${String(c)}`),u},async remove(c){await e.remove(c),r.invalidateAll(),a.invalidate(`byKey:${String(c)}`)},invalidateCache(){r.invalidateAll(),a.invalidateAll()}}}function xd(e,t){const{cursorField:r,pageSize:a=20,direction:n="asc"}=t;return{async loadPage(o={}){var g;const s=o.pageSize??a,i=o.direction??"forward",c=o.cursor?{type:"condition",field:r,operator:i==="forward"?n==="asc"?">":"<":n==="asc"?"<":">",value:wd(o.cursor)}:null,d=c?{type:"group",logic:"and",items:[...((g=o.filter)==null?void 0:g.items)??[],c]}:o.filter,u=[{field:r,direction:i==="forward"?n:n==="asc"?"desc":"asc"},...o.sort??[]],f=await e.load({...o,filter:d,sort:u,take:s+1}),h=f.data.length>s,b=h?f.data.slice(0,s):f.data;i==="backward"&&b.reverse();const p=b[b.length-1],m=b[0];return{data:b,nextCursor:h&&p?at(p[r]):null,prevCursor:m&&o.cursor?at(m[r]):null,hasMore:h}},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 c=i.data[i.data.length-1];s=c?at(c[r]):null}while(s)}}}function at(e){return btoa(JSON.stringify(e))}function wd(e){try{return JSON.parse(atob(e))}catch{return e}}function kd(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(b=>b(o))}function c(b){o={...o,...b},i()}let d={};async function u(){if(!(o.isLoading||!o.hasMore)){c({isLoading:!0,error:null});try{const b=await e.load({...d,skip:o.page*r,take:r}),p=[...o.items,...b.data],m=p.length<b.totalCount;c({items:p,page:o.page+1,totalCount:b.totalCount,hasMore:m,isLoading:!1})}catch(b){c({error:b instanceof Error?b:new Error(String(b)),isLoading:!1})}}}function f(b={}){d=b,o={items:[],isLoading:!1,hasMore:!0,error:null,page:0,totalCount:0},i()}function h(b){const p=b.target;if(!p)return;p.scrollHeight-p.scrollTop-p.clientHeight<a&&u()}return{get state(){return o},loadMore:u,reset:f,handleScroll:h,subscribe(b){return s.add(b),()=>s.delete(b)},setOptions(b){d=b}}}function Cd(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:o=10,heartbeatInterval:s=3e4}=e;let i=null,c=0,d=null,u=[];const f=new Map;function h(w,...C){var A;(A=f.get(w))==null||A.forEach(M=>M(...C))}function b(w){if(e.parseMessage)return e.parseMessage(w);try{return JSON.parse(w.data)}catch{return null}}function p(w){return e.serializeMessage?e.serializeMessage(w):JSON.stringify(w)}function m(w){switch(w.type){case"insert":w.data&&(u=[...u,w.data],h("changed"));break;case"update":w.key&&w.changes&&(u=u.map(C=>C[a]===w.key?{...C,...w.changes}:C),h("changed"));break;case"remove":w.key&&(u=u.filter(C=>C[a]!==w.key),h("changed"));break;case"refresh":case"sync":E.load().catch(()=>{});break}}function g(){(i==null?void 0:i.readyState)!==WebSocket.OPEN&&(i=new WebSocket(t),i.onopen=()=>{c=0,h("connected"),y()},i.onmessage=w=>{const C=b(w);C&&(m(C),h("message",C))},i.onerror=w=>{h("error",new Error("WebSocket error"))},i.onclose=()=>{v(),h("disconnected"),c<o&&(c++,setTimeout(g,n*Math.min(c,5)))})}function S(){v(),i&&(i.close(),i=null)}function y(){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 k(w){(i==null?void 0:i.readyState)===WebSocket.OPEN&&i.send(p(w))}const E={keyField:a,writable:r.writable,async load(w={}){h("loading",!0);try{const C=await r.load(w);return u=C.data,h("loaded",C),h("loading",!1),C}catch(C){throw h("error",C),h("loading",!1),C}},async byKey(w){const C=u.find(A=>A[a]===w);return C||r.byKey(w)},async insert(w){const C=await r.insert(w);return k({type:"insert",data:C}),C},async update(w,C){const A=await r.update(w,C);return k({type:"update",key:w,changes:C}),A},async remove(w){await r.remove(w),k({type:"remove",key:w})},on(w,C){return f.has(w)||f.set(w,new Set),f.get(w).add(C),()=>{var A;return(A=f.get(w))==null?void 0:A.delete(C)}},connect:g,disconnect:S,isConnected:()=>(i==null?void 0:i.readyState)===WebSocket.OPEN,sendMessage:k};return E}function Ed(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(f,...h){var b;(b=s.get(f))==null||b.forEach(p=>p(...h))}const c=f=>{o=[...o,f],i("changed")},d=(f,h)=>{o=o.map(b=>b[n]===f?{...b,...h}:b),i("changed")},u=f=>{o=o.filter(h=>h[n]!==f),i("changed")};return{keyField:n,writable:r.writable,async load(f={}){i("loading",!0);try{const h=await r.load(f);return o=h.data,i("loaded",h),i("loading",!1),h}catch(h){throw i("error",h),i("loading",!1),h}},async byKey(f){const h=o.find(b=>b[n]===f);return h||r.byKey(f)},async insert(f){return await t.invoke(a.insert,f)},async update(f,h){return await t.invoke(a.update,f,h)},async remove(f){await t.invoke(a.remove,f)},on(f,h){return s.has(f)||s.set(f,new Set),s.get(f).add(h),()=>{var b;return(b=s.get(f))==null?void 0:b.delete(h)}},async connect(){t.on(a.onInsert,c),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,c),t.off(a.onUpdate,d),t.off(a.onRemove,u),t.off(a.onRefresh,()=>{}),await t.stop()}}}function Nd(e,t={}){const r=e.keyField;let a=[];const n=new Map;let o=0;const s=new Map;function i(d,...u){var f;(f=s.get(d))==null||f.forEach(h=>h(...u))}function c(){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 h,b,p;const u=c(),f={...d};a=[...a,f],n.set(u,{id:u,action:"insert",item:f}),(h=t.onOptimisticApply)==null||h.call(t,f,"insert"),i("changed");try{const m=await e.insert(d);return a=a.map(g=>g===f?m:g),n.delete(u),(b=t.onConfirm)==null||b.call(t,m,"insert"),i("changed"),m}catch(m){throw a=a.filter(g=>g!==f),n.delete(u),(p=t.onRollback)==null||p.call(t,f,"insert",m instanceof Error?m:new Error(String(m))),i("changed"),m}},async update(d,u){var m,g,S;const f=c(),h=a.findIndex(y=>y[r]===d);if(h===-1)return e.update(d,u);const b=a[h],p={...b,...u};a=a.map((y,v)=>v===h?p:y),n.set(f,{id:f,action:"update",key:d,originalItem:b}),(m=t.onOptimisticApply)==null||m.call(t,p,"update"),i("changed");try{const y=await e.update(d,u);return a=a.map((v,k)=>k===h?y:v),n.delete(f),(g=t.onConfirm)==null||g.call(t,y,"update"),i("changed"),y}catch(y){throw a=a.map((v,k)=>k===h?b:v),n.delete(f),(S=t.onRollback)==null||S.call(t,b,"update",y instanceof Error?y:new Error(String(y))),i("changed"),y}},async remove(d){var h,b,p;const u=c(),f=a.find(m=>m[r]===d);if(!f)return e.remove(d);a=a.filter(m=>m!==f),n.set(u,{id:u,action:"remove",key:d,originalItem:f}),(h=t.onOptimisticApply)==null||h.call(t,f,"remove"),i("changed");try{await e.remove(d),n.delete(u),(b=t.onConfirm)==null||b.call(t,f,"remove")}catch(m){throw a=[...a,f],n.delete(u),(p=t.onRollback)==null||p.call(t,f,"remove",m instanceof Error?m:new Error(String(m))),i("changed"),m}},on(d,u){return s.has(d)||s.set(d,new Set),s.get(d).add(u),()=>{var f;return(f=s.get(d))==null?void 0:f.delete(u)}},hasPendingChanges:()=>n.size>0,getPendingCount:()=>n.size}}function To(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=[],c=[];for(const[d,u]of n){const f=a.get(d);if(!f)o.push(u);else if(Io(f,u))c.push(u);else{const h={};for(const b of Object.keys(u))f[b]!==u[b]&&(h[b]=u[b]);s.push({key:d,changes:h,oldItem:f,newItem:u})}}for(const[d,u]of a)n.has(d)||i.push(u);return{inserted:o,updated:s,removed:i,unchanged:c}}function Io(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(!Io(r[o],a[o]))return!1;return!0}function Ad(e,t={}){const{interval:r=5e3,autoStart:a=!1,pauseWhenHidden:n=!0,onDataChange:o}=t;let s=r,i=null,c=[],d={};const u=new Map;function f(g,...S){var y;(y=u.get(g))==null||y.forEach(v=>v(...S))}async function h(){if(!(n&&document.hidden))try{const g=await e.load(d),S=To(c,g.data,e.keyField);(S.inserted.length||S.updated.length||S.removed.length)&&(c=g.data,f("changed"),o==null||o(S))}catch{}}function b(){i||(i=window.setInterval(h,s))}function p(){i&&(clearInterval(i),i=null)}n&&document.addEventListener("visibilitychange",()=>{document.hidden||i&&h()});const m={...e,async load(g={}){d=g;const S=await e.load(g);return c=S.data,S},on(g,S){u.has(g)||u.set(g,new Set),u.get(g).add(S);const y=e.on(g,S);return()=>{var v;(v=u.get(g))==null||v.delete(S),y()}},startPolling:b,stopPolling:p,isPolling:()=>i!==null,setInterval(g){s=g,i&&(p(),b())}};return a&&b(),m}function Md(e){const{url:t,baseSource:r,keyField:a=r.keyField,reconnectDelay:n=3e3,maxReconnects:o=10,withCredentials:s=!1}=e;let i=null,c=0,d=null,u=[];const f=new Map;function h(y,...v){var k;(k=f.get(y))==null||k.forEach(E=>E(...v))}function b(y){if(e.parseEvent)return e.parseEvent(y);try{return JSON.parse(y.data)}catch{return null}}function p(y){switch(y.type){case"insert":y.data&&(u=[...u,y.data],h("changed"));break;case"update":y.key&&y.changes&&(u=u.map(v=>v[a]===y.key?{...v,...y.changes}:v),h("changed"));break;case"remove":y.key&&(u=u.filter(v=>v[a]!==y.key),h("changed"));break;case"snapshot":Array.isArray(y.data)&&(u=y.data,h("changed"));break;case"refresh":S.load().catch(()=>{});break}}function m(){(i==null?void 0:i.readyState)!==EventSource.OPEN&&(g(),i=new EventSource(t,{withCredentials:s}),i.onopen=()=>{c=0,h("connected")},i.onmessage=y=>{const v=b(y);v&&(p(v),h("message",v))},i.onerror=()=>{if(h("error",new Error("SSE connection error")),(i==null?void 0:i.readyState)===EventSource.CLOSED&&(h("disconnected"),i=null,c<o)){c++;const y=n*Math.min(c,5);d=setTimeout(m,y)}})}function g(){d&&(clearTimeout(d),d=null),i&&(i.close(),i=null)}const S={keyField:a,writable:r.writable,async load(y={}){h("loading",!0);try{const v=await r.load(y);return u=v.data,h("loaded",v),h("loading",!1),v}catch(v){throw h("error",v),h("loading",!1),v}},async byKey(y){const v=u.find(k=>k[a]===y);return v||r.byKey(y)},async insert(y){return r.insert(y)},async update(y,v){return r.update(y,v)},async remove(y){return r.remove(y)},on(y,v){return f.has(y)||f.set(y,new Set),f.get(y).add(v),()=>{var k;return(k=f.get(y))==null?void 0:k.delete(v)}},connect:m,disconnect:g,isConnected:()=>(i==null?void 0:i.readyState)===EventSource.OPEN};return S}function te(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 Dt(e,t){const{groupBy:r,aggregates:a=[],includeItems:n=!1,sortGroups:o}=t;if(r.length===0)return[{key:{},count:e.length,aggregates:te(e,a),items:n?e:void 0}];const s=new Map;for(const c of e){const d={};for(const f of r)d[f]=c[f];const u=JSON.stringify(d);s.has(u)||s.set(u,{key:d,items:[]}),s.get(u).items.push(c)}const i=[];for(const[,c]of s)i.push({key:c.key,count:c.items.length,aggregates:te(c.items,a),items:n?c.items:void 0});return o!=null&&o.length&&i.sort((c,d)=>{for(const u of o){const f=c.key[u.field]??c.aggregates[u.field],h=d.key[u.field]??d.aggregates[u.field],b=typeof f=="number"&&typeof h=="number"?f-h:String(f??"").localeCompare(String(h??""));if(b!==0)return u.direction==="desc"?-b:b}return 0}),i}function Ro(e,t,r=[]){if(t.length===0)return[{key:{},count:e.length,aggregates:te(e,r),items:e}];const[a,...n]=t,o=Dt(e,{groupBy:[a],aggregates:r,includeItems:!0});if(n.length>0)for(const s of o)s.groups=Ro(s.items,n,r),delete s.items;return o}function Td(e,t){const{rows:r,columns:a,values:n,aggregateFunction:o="sum",rowTotals:s=!0,columnTotals:i=!0,grandTotal:c=!0}=t,d=[...new Set(e.map(p=>String(p[a])))].sort(),u=Dt(e,{groupBy:r,includeItems:!0}),f=[];for(const p of u){const m={rowKey:p.key,values:{}};for(const g of d){const S=p.items.filter(v=>String(v[a])===g),y=te(S,[{field:n,fn:o}]);m.values[g]=y[`${o}_${n}`]??null}if(s){const g=te(p.items,[{field:n,fn:o}]);m.rowTotal=g[`${o}_${n}`]}f.push(m)}let h;if(i){h={};for(const p of d){const m=e.filter(S=>String(S[a])===p),g=te(m,[{field:n,fn:o}]);h[p]=g[`${o}_${n}`]}}let b;return c&&(b=te(e,[{field:n,fn:o}])[`${o}_${n}`]),{columnHeaders:d,rows:f,columnTotals:h,grandTotal:b}}function Id(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 Rd={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 c=Number(s[e]??0)-Number(i[e]??0);return t==="desc"?-c:c}).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,c)=>i+Number(c[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 Ld(e,t){const r=[],a=new Map,n=new Map;for(let i=0;i<e.length;i++){const c=e[i];for(const d of t)if(!d.validate(c,i,e)){const u=typeof d.message=="function"?d.message(c):d.message,f={index:i,rule:d.name,message:u,severity:d.severity??"error",fields:d.fields??[],item:c};r.push(f),a.has(i)||a.set(i,[]),a.get(i).push(f);for(const h of f.fields)n.has(h)||n.set(h,[]),n.get(h).push(f)}}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 Fd={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})},Dd=(function(){return{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 c=0;c<e.length;c+=n){const d=e.slice(c,c+n),u=await Promise.allSettled(d.map((f,h)=>t(f,c+h)));for(let f=0;f<u.length;f++){const h=u[f];h.status==="fulfilled"?(o.push(h.value),i++):s.push({index:c+f,item:d[f],error:h.reason})}}else for(let c=0;c<e.length;c++)try{const d=await t(e[c],c);o.push(d),i++}catch(d){s.push({index:c,item:e[c],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(c=>[c[r],c])),i=[...e];for(const c of t){const d=c[r],u=s.get(d);if(u){if(n){const f=i.indexOf(u);i[f]={...u,...c}}}else o&&i.push(c)}return i}}})();function Pd(e,t){const r=(t==null?void 0:t.autoLoad)??!0,a=(t==null?void 0:t.defaultPageSize)??20,[n,o]=l.useState([]),[s,i]=l.useState(0),[c,d]=l.useState(!1),[u,f]=l.useState(null),[h,b]=l.useState(1),[p,m]=l.useState(a),[g,S]=l.useState((t==null?void 0:t.defaultSort)??[]),[y,v]=l.useState(t==null?void 0:t.defaultFilter),[k,E]=l.useState((t==null?void 0:t.defaultSearch)??""),w=l.useRef(0),C=t==null?void 0:t.loadOptions,A=l.useCallback(async()=>{if(!e)return;const L=++w.current;d(!0),f(null);try{const O=await e.load({skip:(h-1)*p,take:p,sort:g.length?g:void 0,filter:y,search:k||void 0,...C});if(L!==w.current)return;o(O.data),i(O.totalCount)}catch(O){if(L!==w.current)return;f(O instanceof Error?O.message:String(O))}finally{L===w.current&&d(!1)}},[e,h,p,g,y,k,C]);l.useEffect(()=>{r&&A()},[A,r]),l.useEffect(()=>{if(e)return e.on("changed",()=>{A()})},[e,A]);const M=l.useCallback((L,O)=>{S([{field:L,direction:O}]),b(1)},[]),I=l.useCallback(L=>{v(L),b(1)},[]),$=l.useCallback(L=>{E(L),b(1)},[]),T=l.useCallback(L=>{m(L),b(1)},[]),D=l.useCallback(async L=>{if(!(e!=null&&e.insert))throw new Error("DataSource is not writable");await e.insert(L)},[e]),F=l.useCallback(async(L,O)=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");await e.update(L,O)},[e]),P=l.useCallback(async L=>{if(!(e!=null&&e.remove))throw new Error("DataSource is not writable");await e.remove(L)},[e]);return{data:n,totalCount:s,loading:c,error:u,page:h,pageSize:p,sort:g,filter:y,search:k,setPage:b,setPageSize:T,setSort:S,setSortField:M,setFilter:I,setSearch:$,reload:A,insert:D,update:F,remove:P}}function Lo(e,t){const[r,a]=l.useState(void 0),[n,o]=l.useState({}),[s,i]=l.useState(!1),[c,d]=l.useState(null),u=l.useRef(0),f=l.useCallback(async()=>{if(!e||t==null){a(void 0);return}const y=++u.current;i(!0),d(null);try{const v=await e.byKey(t);if(y!==u.current)return;a(v),o({})}catch(v){if(y!==u.current)return;d(v instanceof Error?v.message:String(v))}finally{y===u.current&&i(!1)}},[e,t]);l.useEffect(()=>{f()},[f]),l.useEffect(()=>{if(e)return e.on("changed",()=>{f()})},[e,f]);const h=l.useMemo(()=>({...r??{},...n}),[r,n]),b=Object.keys(n).length>0,p=l.useCallback((y,v)=>{o(k=>({...k,[y]:v}))},[]),m=l.useCallback(y=>{o(v=>({...v,...y}))},[]),g=l.useCallback(async()=>{if(!(e!=null&&e.update))throw new Error("DataSource is not writable");b&&await e.update(t,n)},[e,t,n,b]),S=l.useCallback(()=>{o({})},[]);return{data:r,editData:h,loading:s,error:c,changes:n,isDirty:b,set:p,setMany:m,save:g,reload:f,reset:S}}function zd(e,t,r){const a=Lo(e,t),n=a.editData[r],o=l.useCallback(i=>{a.set(r,i)},[a,r]),s=l.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 $d(e,t,r,a){const n=(a==null?void 0:a.autoLoad)??!0,o=(a==null?void 0:a.take)??200,[s,i]=l.useState([]),[c,d]=l.useState(!1),[u,f]=l.useState(null),h=l.useRef(0),b=l.useCallback(async g=>{if(!e)return;const S=++h.current;d(!0),f(null);try{const y=await e.load({take:o,search:g||void 0,searchFields:a==null?void 0:a.searchFields});if(S!==h.current)return;i(y.data)}catch(y){if(S!==h.current)return;f(y instanceof Error?y.message:String(y))}finally{S===h.current&&d(!1)}},[e,o,a==null?void 0:a.searchFields]);l.useEffect(()=>{n&&b()},[b,n]);const p=l.useMemo(()=>s.map(g=>{const S=g,y={value:String(S[t]??""),label:String(S[r]??"")};return a!=null&&a.iconField&&S[a.iconField]!=null&&(y.icon=S[a.iconField]),a!=null&&a.descriptionField&&S[a.descriptionField]!=null&&(y.description=String(S[a.descriptionField])),a!=null&&a.groupField&&S[a.groupField]!=null&&(y.group=String(S[a.groupField])),y}),[s,t,r,a==null?void 0:a.iconField,a==null?void 0:a.descriptionField,a==null?void 0:a.groupField]),m=l.useCallback(g=>{b(g)},[b]);return{options:p,loading:c,error:u,search:m,reload:()=>b()}}function ft(e){const{dbName:t,storeName:r,keyField:a="id",version:n=1,indexes:o=[]}=e;let s=null;const i=new Map;function c(p,...m){var g;(g=i.get(p))==null||g.forEach(S=>S(...m))}async function d(){return s||new Promise((p,m)=>{const g=indexedDB.open(t,n);g.onerror=()=>m(g.error),g.onsuccess=()=>{s=g.result,p(s)},g.onupgradeneeded=S=>{const y=S.target.result;if(!y.objectStoreNames.contains(r)){const v=y.createObjectStore(r,{keyPath:a});for(const k of o)v.createIndex(k.name,k.keyPath,{unique:k.unique??!1})}}})}async function u(p,m){const g=await d();return new Promise((S,y)=>{const k=g.transaction(r,p).objectStore(r),E=m(k);E.onsuccess=()=>S(E.result),E.onerror=()=>y(E.error)})}async function f(p,m,g){const S=await d();return new Promise((y,v)=>{var F;const E=S.transaction(r,p).objectStore(r),w=[];let C=E,A="next";if((F=m.sort)!=null&&F.length){const P=m.sort[0].field,L=m.sort[0].direction;E.indexNames.contains(P)&&(C=E.index(P)),A=L==="desc"?"prev":"next"}const M=C.openCursor(null,A);let I=0,$=0;const T=m.skip??0,D=m.take??1/0;M.onsuccess=()=>{const P=M.result;if(!P||$>=D){y(w);return}const L=P.value;if(m.filter&&!h(L,m.filter)){P.continue();return}if(m.search&&!b(L,m.search,m.searchFields)){P.continue();return}if(I<T){I++,P.continue();return}w.push(L),$++,P.continue()},M.onerror=()=>v(M.error)})}function h(p,m){if(!m.items.length)return!0;const g=S=>{if(S.type==="group")return h(p,S);const y=p[S.field],v=S.value;switch(S.operator){case"=":return y==v;case"<>":return y!=v;case"<":return y<v;case"<=":return y<=v;case">":return y>v;case">=":return y>=v;case"contains":return String(y??"").toLowerCase().includes(String(v??"").toLowerCase());case"notcontains":return!String(y??"").toLowerCase().includes(String(v??"").toLowerCase());case"startswith":return String(y??"").toLowerCase().startsWith(String(v??"").toLowerCase());case"endswith":return String(y??"").toLowerCase().endsWith(String(v??"").toLowerCase());case"isblank":return y==null||y==="";case"isnotblank":return y!=null&&y!=="";default:return!0}};return m.logic==="and"?m.items.every(g):m.items.some(g)}function b(p,m,g){const S=m.toLowerCase();return(g?g.map(v=>p[v]):Object.values(p)).some(v=>String(v??"").toLowerCase().includes(S))}return{keyField:a,writable:!0,async load(p={}){var m;c("loading",!0);try{const g=await f("readonly",p,()=>{});(m=p.sort)!=null&&m.length&&g.sort((v,k)=>{for(const E of p.sort){const w=v[E.field]??"",C=k[E.field]??"",A=typeof w=="number"&&typeof C=="number"?w-C:String(w).localeCompare(String(C));if(A!==0)return E.direction==="desc"?-A:A}return 0});const S=await this.count(),y={data:g,totalCount:S};return c("loaded",y),c("loading",!1),y}catch(g){throw c("error",g),c("loading",!1),g}},async byKey(p){return u("readonly",m=>m.get(p))},async insert(p){return await u("readwrite",m=>m.add(p)),c("changed"),p},async update(p,m){const g=await this.byKey(p);if(!g)throw new Error(`Record not found: ${p}`);const S={...g,...m};return await u("readwrite",y=>y.put(S)),c("changed"),S},async remove(p){await u("readwrite",m=>m.delete(p)),c("changed")},on(p,m){return i.has(p)||i.set(p,new Set),i.get(p).add(m),()=>{var g;return(g=i.get(p))==null?void 0:g.delete(m)}},async clear(){await u("readwrite",p=>p.clear()),c("changed")},async count(){return u("readonly",p=>p.count())},async getAll(){return u("readonly",p=>p.getAll())},async bulkInsert(p){const m=await d();return new Promise((g,S)=>{const y=m.transaction(r,"readwrite"),v=y.objectStore(r);for(const k of p)v.put(k);y.oncomplete=()=>{c("changed"),g()},y.onerror=()=>S(y.error)})},async bulkDelete(p){const m=await d();return new Promise((g,S)=>{const y=m.transaction(r,"readwrite"),v=y.objectStore(r);for(const k of p)v.delete(k);y.oncomplete=()=>{c("changed"),g()},y.onerror=()=>S(y.error)})},async exportData(){return this.getAll()},async importData(p){await this.clear(),await this.bulkInsert(p)}}}function Hd(e){const{remoteSource:t,offlineConfig:r,syncStrategy:a="remote-first",onConflict:n,onSync:o,autoSyncInterval:s=0}=e,i=r.keyField??t.keyField,c=ft({...r,keyField:i}),d=ft({dbName:r.dbName,storeName:`${r.storeName}_pending`,keyField:"id"});let u=navigator.onLine,f=0;const h=new Map;function b(g,...S){var y;(y=h.get(g))==null||y.forEach(v=>v(...S))}window.addEventListener("online",()=>{u=!0,b("online"),m()}),window.addEventListener("offline",()=>{u=!1,b("offline")});async function p(g,S,y){const v={id:`pending_${++f}_${Date.now()}`,action:g,key:S,data:y,timestamp:Date.now(),retries:0};await d.insert(v)}async function m(){if(u){b("syncing",!0);try{let g=0,S=0,y=0;const v=await d.load();for(const k of v.data)try{switch(k.action){case"insert":await t.insert(k.data),g++;break;case"update":await t.update(k.key,k.data),S++;break;case"remove":await t.remove(k.key),y++;break}await d.remove(k.id)}catch{k.retries<3&&await d.update(k.id,{retries:k.retries+1})}if(a!=="local-first"){const k=await t.load();if(a==="remote-first")await c.importData(k.data);else if(a==="merge"&&n){const E=await c.load(),w=new Map(E.data.map(A=>[A[i],A])),C=[];for(const A of k.data){const M=w.get(A[i]);M?C.push(n(M,A)):C.push(A)}await c.importData(C)}}b("synced",{added:g,updated:S,removed:y}),o==null||o({added:g,updated:S,removed:y})}catch(g){b("syncError",g)}finally{b("syncing",!1)}}}return s>0&&window.setInterval(m,s),{keyField:i,writable:!0,async load(g={}){if(u&&a==="remote-first")try{const S=await t.load(g);return await c.bulkInsert(S.data),S}catch{}return c.load(g)},async byKey(g){if(u)try{const S=await t.byKey(g);return S&&await c.update(g,S).catch(()=>c.insert(S)),S}catch{}return c.byKey(g)},async insert(g){const S=await c.insert(g);if(u)try{return await t.insert(g)}catch{await p("insert",void 0,g)}else await p("insert",void 0,g);return b("changed"),S},async update(g,S){const y=await c.update(g,S);if(u)try{return await t.update(g,S)}catch{await p("update",g,S)}else await p("update",g,S);return b("changed"),y},async remove(g){if(await c.remove(g),u)try{await t.remove(g)}catch{await p("remove",g)}else await p("remove",g);b("changed")},on(g,S){return h.has(g)||h.set(g,new Set),h.get(g).add(S),()=>{var y;return(y=h.get(g))==null?void 0:y.delete(S)}},sync:m,isOnline:()=>u,async getPendingChanges(){return(await d.load()).data},async clearPendingChanges(){await d.clear()}}}function _d(e){const{channelName:t,source:r}=e,a=new BroadcastChannel(t),n=new Map;function o(i,...c){var d;(d=n.get(i))==null||d.forEach(u=>u(...c))}a.onmessage=i=>{const c=i.data;switch(c.type){case"insert":case"update":case"remove":o("changed"),o("crossTabChange",c);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 c=await r.insert(i);return s({type:"insert",data:c}),c},async update(i,c){const d=await r.update(i,c);return s({type:"update",key:i,changes:c}),d},async remove(i){await r.remove(i),s({type:"remove",key:i})},on(i,c){n.has(i)||n.set(i,new Set),n.get(i).add(c);const d=r.on(i,c);return()=>{var u;(u=n.get(i))==null||u.delete(c),d()}},broadcast:s,requestSync(){s({type:"request-sync"})}}}function Od(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 c=new URL(window.location.href);c.search=i.toString(),window.history.replaceState({},"",c.toString())}}function s(i){return t?`${t}_${i}`:i}return{read(){const i=n(),c={};if(r.filter){const d=i.get(s("filter"));if(d)try{c.filter=JSON.parse(d)}catch{}}if(r.sort){const d=i.get(s("sort"));if(d)try{c.sort=JSON.parse(d)}catch{}}if(r.page){const d=i.get(s("skip")),u=i.get(s("take"));d&&(c.skip=parseInt(d,10)),u&&(c.take=parseInt(u,10))}if(r.search){const d=i.get(s("search"));d&&(c.search=d)}return c},write(i){const c=n();r.filter&&(i.filter&&i.filter.items.length>0?c.set(s("filter"),JSON.stringify(i.filter)):c.delete(s("filter"))),r.sort&&(i.sort&&i.sort.length>0?c.set(s("sort"),JSON.stringify(i.sort)):c.delete(s("sort"))),r.page&&(i.skip?c.set(s("skip"),String(i.skip)):c.delete(s("skip")),i.take?c.set(s("take"),String(i.take)):c.delete(s("take"))),r.search&&(i.search?c.set(s("search"),i.search):c.delete(s("search"))),o(c)},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 Bd={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 jd(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 Wd=["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"],Vd={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},ae={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Pt={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},Fo={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:Pt,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"}},Do={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:ae,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"}},Po={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:Pt,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"}},zo={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:ae,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"}},$o={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:ae,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"}},Ho={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:ae,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"}},_o={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:ae,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"}},Oo={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:ae,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"}},Bo={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:Pt,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"}},jo={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:ae,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"}},Wo={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:ae,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"}},Vo={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:Vd,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"}},zt={obsidianEditorial:Fo,neonArcade:Do,hyggeScandinavian:Po,brutalistRaw:zo,glassAurora:$o,candyPop:Ho,newspaperBroadsheet:_o,synthwave84:Oo,zenMinimal:Bo,claymorphism:jo,bauhaus:Wo,bankVault:Vo},Ko=Object.values(zt);function Kd(e){return zt[e]}function Ud(e){return Ko.filter(t=>t.meta.tags.includes(e))}const Xd=["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"],Uo={space1:"2px",space2:"4px",space3:"8px",space4:"12px",space5:"16px",space6:"20px",space8:"28px"},U={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Ie={space1:"6px",space2:"12px",space3:"16px",space4:"24px",space5:"32px",space6:"40px",space8:"56px"},Qe={space1:"8px",space2:"16px",space3:"24px",space4:"32px",space5:"44px",space6:"56px",space8:"80px"},Xo={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:Ie,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"}},Go={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:Ie,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"}},qo={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:Qe,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"}},Yo={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:U,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"}},Jo={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:Qe,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"}},Qo={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:U,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"}},Zo={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:Ie,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"}},ei={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:U,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"}},ti={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:U,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"}},ri={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:U,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"}},ai={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:U,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"}},ni={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:U,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"}},oi={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:U,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"}},ii={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:U,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"}},si={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:U,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"}},ci={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:Qe,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"}},li={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:U,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"}},di={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:U,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"}},ui={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:Ie,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"}},fi={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:U,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"}},mi={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:Qe,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"}},pi={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:Uo,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"}},gi={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:Ie,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"}},yi={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:Uo,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"}},$t={forestCanopy:Xo,desertDune:Go,arcticCrystal:qo,autumnFoliage:Yo,japaneseWashi:Jo,moroccanMosaic:Qo,artDecoGatsby:Zo,sovietConstructivist:ei,blueprint:ti,hologramUI:ri,deepSea:ai,analog70s:ni,vhsTracking:oi,typewriterPress:ii,y2kAqua:si,vogueDidone:ci,comicHalftone:li,zinePunk:di,watercolorWash:ui,memphis80s:fi,inkSumie:mi,dieterRams:pi,blackTieGala:gi,swissGrid:yi},hi=Object.values($t);function Gd(e){return $t[e]}function qd(e){return hi.filter(t=>t.meta.tags.includes(e))}const bi=l.createContext(null);function Si(){const e=l.useContext(bi);if(!e)throw new Error("useThemeVariants must be used within NiceThemeVariantProvider");return e}function Yd({initialConfig:e,storageKey:t="ntd-variant-config",autoApply:r=!0,children:a}){const[n,o]=l.useState(()=>{if(typeof window<"u"&&t){const d=localStorage.getItem(t);if(d)try{return{...Y,...JSON.parse(d)}}catch{}}return{...Y,...e}});l.useEffect(()=>{r&&typeof window<"u"&&ht(n)},[n,r]),l.useEffect(()=>{typeof window<"u"&&t&&localStorage.setItem(t,JSON.stringify(n))},[n,t]);const s=l.useCallback(d=>{o(u=>({...u,...d}))},[]),i=l.useCallback(d=>{const u=je[d];u&&o(u)},[]),c=l.useCallback(()=>{o(Y)},[]);return x.jsx(bi.Provider,{value:{config:n,setConfig:s,applyPreset:i,reset:c},children:a})}function Jd({showPresets:e=!0,showPreview:t=!0,showCSS:r=!1,collapsible:a=!0,className:n,style:o}){const{t:s}=j.useNiceTranslation(),{config:i,setConfig:c,applyPreset:d,reset:u}=Si(),[f,h]=l.useState(new Set(["presets","radius","shadow"])),b=m=>{a&&h(g=>{const S=new Set(g);return S.has(m)?S.delete(m):S.add(m),S})},p=m=>!a||f.has(m);return x.jsxs("div",{className:`ntd-theme-variant-configurator ${n||""}`,style:{fontFamily:"system-ui, sans-serif",fontSize:"14px",...o},children:[e&&x.jsx(G,{title:s("themeVariants.presets","Presets"),expanded:p("presets"),onToggle:()=>b("presets"),children:x.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:[Object.keys(je).map(m=>x.jsx("button",{onClick:()=>d(m),style:{padding:"6px 12px",border:"1px solid var(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:"var(--nice-bg-secondary, #f9fafb)",cursor:"pointer",textTransform:"capitalize"},children:m},m)),x.jsx("button",{onClick:u,style:{padding:"6px 12px",border:"1px solid var(--nice-danger-dark, #dc2626)",borderRadius:"6px",background:"var(--nice-danger-bg, #fef2f2)",color:"var(--nice-color-error, #dc2626)",cursor:"pointer"},children:s("themeVariants.reset","Reset")})]})}),x.jsx(G,{title:s("themeVariants.borderRadius","Border Radius"),expanded:p("radius"),onToggle:()=>b("radius"),children:x.jsx(ie,{options:Object.keys(ve),value:i.radius,onChange:m=>c({radius:m}),renderPreview:m=>x.jsx("div",{style:{width:"24px",height:"24px",background:"var(--nice-color-accent, #6366f1)",borderRadius:ve[m].md}})})}),x.jsx(G,{title:s("themeVariants.shadows","Shadows"),expanded:p("shadow"),onToggle:()=>b("shadow"),children:x.jsx(ie,{options:Object.keys(ze),value:i.shadow,onChange:m=>c({shadow:m}),renderPreview:m=>x.jsx("div",{style:{width:"24px",height:"24px",background:"var(--nice-bg-primary, #fff)",borderRadius:"4px",boxShadow:ze[m]}})})}),x.jsx(G,{title:s("themeVariants.buttonStyle","Button Style"),expanded:p("button"),onToggle:()=>b("button"),children:x.jsx(ie,{options:["flat","raised","outlined","ghost","soft","gradient","3d","neumorphic"],value:i.buttonStyle,onChange:m=>c({buttonStyle:m})})}),x.jsx(G,{title:s("themeVariants.inputStyle","Input Style"),expanded:p("input"),onToggle:()=>b("input"),children:x.jsx(ie,{options:["bordered","filled","underlined","floating","soft","neumorphic"],value:i.inputStyle,onChange:m=>c({inputStyle:m})})}),x.jsx(G,{title:s("themeVariants.cardStyle","Card Style"),expanded:p("card"),onToggle:()=>b("card"),children:x.jsx(ie,{options:["flat","elevated","bordered","glass","gradient","neumorphic"],value:i.cardStyle,onChange:m=>c({cardStyle:m})})}),x.jsx(G,{title:s("themeVariants.animation","Animation"),expanded:p("animation"),onToggle:()=>b("animation"),children:x.jsx(ie,{options:Object.keys(Be),value:i.animation,onChange:m=>c({animation:m})})}),x.jsx(G,{title:s("themeVariants.density","Density"),expanded:p("density"),onToggle:()=>b("density"),children:x.jsx(ie,{options:Object.keys(we),value:i.density,onChange:m=>c({density:m})})}),t&&x.jsx(G,{title:s("themeVariants.preview","Preview"),expanded:p("preview"),onToggle:()=>b("preview"),children:x.jsx(Qd,{config:i})}),r&&x.jsx(G,{title:s("themeVariants.generatedCss","Generated CSS"),expanded:p("css"),onToggle:()=>b("css"),children:x.jsx("pre",{style:{background:"var(--nice-text-primary, #1f2937)",color:"var(--nice-text-inverse, #e5e7eb)",padding:"12px",borderRadius:"6px",fontSize:"12px",overflow:"auto",maxHeight:"200px"},children:yt(i)})})]})}function G({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(--nice-text-secondary, #374151)",textAlign:"left"},children:[x.jsx("span",{style:{display:"inline-flex",transform:t?"rotate(90deg)":"none",transition:"transform 150ms"},children:x.jsx(N.NiceIcon,{name:"chevron-right",size:14})}),e]}),t&&x.jsx("div",{style:{paddingLeft:"20px",paddingTop:"8px"},children:a})]})}function ie({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(--nice-border-color, #e5e7eb)",borderRadius:"6px",background:t===n?"var(--nice-primary-bg, #eef2ff)":"var(--nice-bg-primary, #fff)",cursor:"pointer",textTransform:"capitalize",fontSize:"13px"},children:[a&&a(n),n]},n))})}function Qd({config:e}){const{t}=j.useNiceTranslation(),r=mt(e.buttonStyle,"var(--nice-color-accent, #6366f1)"),a=pt(e.inputStyle),n=gt(e.cardStyle),o=ve[e.radius],s=we[e.density];return x.jsxs("div",{style:{padding:"20px",background:"var(--nice-bg-secondary, #f9fafb)",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"16px"},children:[x.jsxs("div",{style:{padding:s.paddingX,borderRadius:o.lg,...n},children:[x.jsx("h4",{style:{margin:"0 0 12px",fontSize:s.fontSize},children:t("themeVariants.cardPreview","Card Preview")}),x.jsxs("div",{style:{display:"flex",gap:s.gap,marginBottom:"12px"},children:[x.jsx("button",{style:{padding:`${s.paddingY} ${s.paddingX}`,borderRadius:o.md,color:"var(--nice-text-primary, #fff)",fontSize:s.fontSize,cursor:"pointer",...r},children:t("themeVariants.primary","Primary")}),x.jsx("button",{style:{padding:`${s.paddingY} ${s.paddingX}`,borderRadius:o.md,background:"var(--nice-border-color, #e5e7eb)",border:"none",fontSize:s.fontSize,cursor:"pointer"},children:t("themeVariants.secondary","Secondary")})]}),x.jsx("input",{type:"text",placeholder:t("themeVariants.inputPreview","Input preview..."),style:{width:"100%",height:s.inputHeight,padding:`0 ${s.paddingX}`,fontSize:s.fontSize,outline:"none",boxSizing:"border-box",...a}})]}),x.jsx("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:["Info","Success","Warning","Error"].map(i=>x.jsx("span",{style:{padding:"4px 10px",borderRadius:o.full,background:"var(--nice-border-color, #e5e7eb)",fontSize:"12px"},children:i},i))})]})}function Zd(e){const[t,r]=l.useState(()=>typeof window>"u"?!1:tr());return l.useEffect(()=>{var d,u,f;if(typeof window>"u")return;const a=()=>(e==null?void 0:e.current)??document.documentElement,n=()=>r(tr(a()));n();const o=new MutationObserver(n),s={attributes:!0,attributeFilter:["data-theme","class","style"]};o.observe(document.documentElement,s);const i=(u=(d=e==null?void 0:e.current)==null?void 0:d.closest)==null?void 0:u.call(d,"[data-theme], .nice-dark, .nice-light, .dark");i&&i!==document.documentElement&&o.observe(i,s);const c=window.matchMedia("(prefers-color-scheme: dark)");return(f=c.addEventListener)==null||f.call(c,"change",n),()=>{var h;o.disconnect(),(h=c.removeEventListener)==null||h.call(c,"change",n)}},[e]),t}function tr(e=document.documentElement){var t,r;try{const a=((t=e.closest)==null?void 0:t.call(e,"[data-theme], .nice-dark, .nice-light, .dark"))??document.documentElement,n=a.getAttribute("data-theme");if(n==="dark")return!0;if(n==="light")return!1;if(a.classList.contains("nice-dark")||a.classList.contains("dark"))return!0;if(a.classList.contains("nice-light"))return!1;const o=getComputedStyle(e),s=o.getPropertyValue("--text-primary").trim()||o.color;if(s){const i=s.match(/rgba?\(([^)]+)\)/);if(i){const[c,d,u]=i[1].split(",").map(f=>parseFloat(f.trim()));return(.299*c+.587*d+.114*u)/255>.5}if(/^#([0-9a-f]{3,8})$/i.test(s)){const c=s.replace("#",""),d=c.length===3?c.split("").map(b=>b+b).join(""):c.slice(0,6),u=parseInt(d.slice(0,2),16),f=parseInt(d.slice(2,4),16),h=parseInt(d.slice(4,6),16);return(.299*u+.587*f+.114*h)/255>.5}}return((r=window.matchMedia)==null?void 0:r.call(window,"(prefers-color-scheme: dark)").matches)??!1}catch{return!1}}const eu=["NiceTextInput","NiceTextArea","NiceNumberInput","NiceDateTimePicker","NiceSelect","NiceCheckbox","NiceToggle","NiceRadioGroup","NiceSlider","NiceColorPicker","NiceAutocomplete","NiceLookup","NiceCalendar","NiceDateRangeBox","NiceTagBox","NiceRangeSlider","NiceDropDownBox","NiceHtmlEditor","NiceForm","NiceRating","NiceOtpInput","NiceMentionInput","NiceTreeSelect","NiceMaskedInput","NiceKnob","NicePickList","NiceInlineEdit","NiceButton","NiceButtonGroup","NiceDropDownButton","NiceSpeedDialAction","NiceTable","NiceDataGrid","NiceList","NiceTreeView","NiceTreeList","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","NiceSplitter","NiceAppLayout","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","NiceUpload","NiceFileManager","NiceFilterBuilder","NiceGallery","NiceMap","div","span","row","column","stack","container"];function tu(e){const t=[];vi(e.root,t,"root");const r=new Set((e.dataSources??[]).map(a=>a.id));return xi(e.root,r,t),t}function vi(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++)vi(e.children[a],t,`${r}.children[${a}]`)}function xi(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)xi(a,t,r)}function ru(e,t){const r=au(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 au(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 wi(e){const{itemCount:t,itemHeight:r,containerHeight:a,overscan:n=3,initialScrollTop:o=0}=e,[s,i]=l.useState(o),[c,d]=l.useState(!1),u=l.useRef(void 0),f=l.useMemo(()=>{if(typeof r=="number")return null;const w=new Array(t+1);w[0]=0;for(let C=0;C<t;C++)w[C+1]=w[C]+r(C);return w},[t,r]),h=l.useMemo(()=>typeof r=="number"?t*r:f?f[t]:0,[t,r,f]),b=l.useCallback(w=>typeof r=="number"?r:r(w),[r]),p=l.useCallback(w=>typeof r=="number"?w*r:f?f[w]:0,[r,f]),m=l.useCallback(w=>{if(typeof r=="number")return Math.floor(w/r);if(!f)return 0;let C=0,A=t-1;for(;C<=A;){const M=Math.floor((C+A)/2),I=f[M];if(I===w)return M;I<w?C=M+1:A=M-1}return Math.max(0,C-1)},[t,r,f]),{startIndex:g,endIndex:S,visibleItems:y}=l.useMemo(()=>{const w=Math.max(0,m(s)-n);let C=w,A=p(w);for(;C<t&&A<s+a;)A+=b(C),C++;C=Math.min(t,C+n);const M=[];for(let I=w;I<C;I++)M.push({index:I,offset:p(I),height:b(I),key:I});return{startIndex:w,endIndex:C,visibleItems:M}},[s,a,t,n,m,p,b]),v=l.useCallback(w=>{const C=w.currentTarget;i(C.scrollTop),d(!0),u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{d(!1)},150)},[]),k=l.useCallback((w,C="start")=>{const A=p(w),M=b(w);let I;switch(C){case"center":I=A-a/2+M/2;break;case"end":I=A-a+M;break;default:I=A}i(Math.max(0,Math.min(I,h-a)))},[p,b,a,h]),E=l.useCallback(w=>{i(Math.max(0,Math.min(w,h-a)))},[h,a]);return l.useEffect(()=>()=>{u.current&&window.clearTimeout(u.current)},[]),{visibleItems:y,totalHeight:h,scrollTop:s,scrollToIndex:k,scrollTo:E,onScroll:v,startIndex:g,endIndex:S,isScrolling:c}}function nu(e){const{rowCount:t,columnCount:r,rowHeight:a,columnWidth:n,containerHeight:o,containerWidth:s,overscan:i=2}=e,[c,d]=l.useState(0),[u,f]=l.useState(0),[h,b]=l.useState(!1),p=l.useRef(void 0),m=l.useMemo(()=>{if(typeof a=="number")return t*a;let v=0;for(let k=0;k<t;k++)v+=a(k);return v},[t,a]),g=l.useMemo(()=>{if(typeof n=="number")return r*n;let v=0;for(let k=0;k<r;k++)v+=n(k);return v},[r,n]),S=l.useMemo(()=>{const v=[];let k=0,E=0;if(typeof a=="number")k=Math.floor(c/a),E=k*a;else for(;k<t&&E+a(k)<c;)E+=a(k),k++;k=Math.max(0,k-i);let w=k,C=typeof a=="number"?k*a:E;for(;w<t&&C<c+o;)C+=typeof a=="number"?a:a(w),w++;w=Math.min(t,w+i);let A=0,M=0;if(typeof n=="number")A=Math.floor(u/n),M=A*n;else for(;A<r&&M+n(A)<u;)M+=n(A),A++;A=Math.max(0,A-i);let I=A,$=typeof n=="number"?A*n:M;for(;I<r&&$<u+s;)$+=typeof n=="number"?n:n(I),I++;I=Math.min(r,I+i);let T=typeof a=="number"?k*a:(()=>{let D=0;for(let F=0;F<k;F++)D+=a(F);return D})();for(let D=k;D<w;D++){const F=typeof a=="number"?a:a(D);let P=typeof n=="number"?A*n:(()=>{let L=0;for(let O=0;O<A;O++)L+=n(O);return L})();for(let L=A;L<I;L++){const O=typeof n=="number"?n:n(L);v.push({rowIndex:D,columnIndex:L,top:T,left:P,width:O,height:F,key:`${D}:${L}`}),P+=O}T+=F}return v},[c,u,t,r,a,n,o,s,i]),y=l.useCallback(v=>{const k=v.currentTarget;d(k.scrollTop),f(k.scrollLeft),b(!0),p.current&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b(!1)},150)},[]);return l.useEffect(()=>()=>{p.current&&window.clearTimeout(p.current)},[]),{visibleCells:S,totalWidth:g,totalHeight:m,onScroll:y,scrollTop:c,scrollLeft:u,isScrolling:h}}function ou(e,t,r,a=3){const n=wi({itemCount:e.length,itemHeight:r,containerHeight:t,overscan:a}),o=l.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 iu(e){const{items:t,searchFn:r,debounce:a=0,minLength:n=0}=e,[o,s]=l.useState(""),i=l.useDeferredValue(o),[c,d]=l.useState(""),u=l.useRef(void 0);l.useEffect(()=>{if(a>0)return u.current=window.setTimeout(()=>{d(o)},a),()=>{u.current&&window.clearTimeout(u.current)};d(o)},[o,a]);const f=l.useDeferredValue(c),h=l.useMemo(()=>f.length<n?t:t.filter(p=>r(p,f)),[t,f,r,n]);return{query:o,setQuery:s,results:h,isStale:f!==i,deferredQuery:f}}function su(e){const[t,r]=l.useState(e),[a,n]=l.useState(e),[o,s]=l.useTransition(),i=l.useCallback(d=>{const u=typeof d=="function"?d(t):d;n(u),s(()=>{r(u)})},[t]),c=l.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:c}}function cu(e){const{data:t,processFn:r,chunkSize:a=1e3,priority:n="user-visible"}=e,[o,s]=l.useState(null),[i,c]=l.useState(0),[d,u]=l.useState(!1),f=l.useRef(!1),h=l.useCallback(async()=>{if(t.length===0){s([]);return}u(!0),c(0),f.current=!1;const p=[],m=t.length;for(let g=0;g<m&&!f.current;g+=a){const S=t.slice(g,g+a),y=S.map((k,E)=>r(k,g+E));p.push(...y);const v=Math.min(100,(g+S.length)/m*100);n==="background"?await new Promise(k=>{"requestIdleCallback"in window?window.requestIdleCallback(k):setTimeout(k,0)}):n==="user-visible"&&await new Promise(k=>requestAnimationFrame(k)),l.startTransition(()=>{c(v)})}s(p),u(!1),c(100)},[t,r,a,n]),b=l.useCallback(()=>{f.current=!0},[]);return l.useEffect(()=>(h(),()=>{f.current=!0}),[h]),{result:o,progress:i,isProcessing:d,process:h,cancel:b}}function lu(e,t={}){const{initialCount:r=20,batchSize:a=50,batchDelay:n=16}=t,[o,s]=l.useState(Math.min(r,e.length)),[i,c]=l.useState(e.length<=r);return l.useEffect(()=>{if(o>=e.length){c(!0);return}const u=setTimeout(()=>{l.startTransition(()=>{s(f=>Math.min(f+a,e.length))})},n);return()=>clearTimeout(u)},[o,e.length,a,n]),l.useEffect(()=>{s(Math.min(r,e.length)),c(e.length<=r)},[e,r]),{visibleItems:l.useMemo(()=>e.slice(0,o),[e,o]),visibleCount:o,totalCount:e.length,isComplete:i,progress:o/e.length*100}}function du(e){const{initial:t,mutate:r,rollbackOnError:a=!0}=e,[n,o]=l.useState(t),[s,i]=l.useState(!1),[c,d]=l.useState(null),u=l.useRef(t),f=l.useCallback(async b=>{u.current=n,d(null),o(b),i(!0);try{const p=await r(b);o(p)}catch(p){d(p instanceof Error?p:new Error(String(p))),a&&o(u.current)}finally{i(!1)}},[n,r,a]),h=l.useCallback(()=>{o(t),d(null),i(!1)},[t]);return{value:n,update:f,isPending:s,error:c,reset:h}}function uu(e){const{workerScript:t,idleTimeout:r=3e4}=e,[a,n]=l.useState(null),[o,s]=l.useState(!1),[i,c]=l.useState(null),d=l.useRef(null),u=l.useRef(0),f=l.useRef(null),h=l.useRef(void 0),b=l.useRef(()=>{}),p=l.useCallback(()=>{if(!d.current){if(typeof t=="function"){const v=new Blob([`(${t.toString()})()`],{type:"application/javascript"});d.current=new Worker(URL.createObjectURL(v))}else d.current=new Worker(t,{type:"module"});d.current.onmessage=v=>{const k=v.data;k.id===f.current&&(k.type==="result"?(n(k.result??null),s(!1),f.current=null,b.current()):k.type==="error"&&(c(new Error(k.error)),s(!1),f.current=null,b.current()))},d.current.onerror=v=>{c(new Error(v.message)),s(!1),f.current=null}}return d.current},[t]),m=l.useCallback(()=>{h.current&&window.clearTimeout(h.current),r>0&&(h.current=window.setTimeout(()=>{d.current&&!f.current&&(d.current.terminate(),d.current=null)},r))},[r]);b.current=m;const g=l.useCallback(v=>new Promise((k,E)=>{const w=p(),C=`task-${++u.current}`;f.current=C,s(!0),c(null);const A=w.onmessage;w.onmessage=M=>{A==null||A.call(w,M),M.data.id===C&&(M.data.type==="result"?k(M.data.result):M.data.type==="error"&&E(new Error(M.data.error)))},w.postMessage({type:"task",id:C,data:v})}),[p]),S=l.useCallback(()=>{d.current&&f.current&&(d.current.postMessage({type:"cancel",id:f.current}),f.current=null,s(!1))},[]),y=l.useCallback(()=>{d.current&&(d.current.terminate(),d.current=null),h.current&&window.clearTimeout(h.current),f.current=null,s(!1)},[]);return l.useEffect(()=>()=>{y()},[y]),{result:a,isProcessing:o,error:i,execute:g,cancel:S,terminate:y}}function fu(e){const{workerScript:t,poolSize:r=navigator.hardwareConcurrency||4,idleTimeout:a=6e4}=e,n=l.useRef([]),o=l.useRef([]),s=l.useRef(0),i=l.useRef(void 0),c=l.useCallback(()=>{if(typeof t=="function"){const S=new Blob([`(${t.toString()})()`],{type:"application/javascript"});return new Worker(URL.createObjectURL(S))}return new Worker(t,{type:"module"})},[t]),d=l.useCallback(()=>{const S=n.current.find(y=>!y.busy);if(S)return S;if(n.current.length<r){const v={worker:c(),busy:!1,taskId:null};return n.current.push(v),v}return null},[c,r]),u=l.useRef(()=>{}),f=l.useCallback(()=>{for(;o.current.length>0;){const S=d();if(!S)break;const y=o.current.shift();S.busy=!0,S.taskId=y.id,S.worker.onmessage=v=>{const k=v.data;k.id===y.id&&(S.busy=!1,S.taskId=null,k.type==="result"?y.resolve(k.result):k.type==="error"&&y.reject(new Error(k.error)),f(),u.current())},S.worker.onerror=v=>{S.busy=!1,S.taskId=null,y.reject(new Error(v.message)),f()},S.worker.postMessage({type:"task",id:y.id,data:y.data})}},[d]),h=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),a>0&&(i.current=window.setTimeout(()=>{n.current.filter(y=>!y.busy).forEach(y=>{y.worker.terminate(),n.current=n.current.filter(v=>v!==y)})},a))},[a]);u.current=h;const b=l.useCallback(S=>new Promise((y,v)=>{const k=`pool-task-${++s.current}`;o.current.push({id:k,data:S,resolve:y,reject:v}),f()}),[f]),p=l.useCallback(S=>Promise.all(S.map(y=>b(y))),[b]),m=l.useCallback(()=>{n.current.forEach(S=>S.worker.terminate()),n.current=[],o.current=[],i.current&&window.clearTimeout(i.current)},[]),g=l.useCallback(()=>({total:n.current.length,busy:n.current.filter(S=>S.busy).length,idle:n.current.filter(S=>!S.busy).length,queued:o.current.length}),[]);return l.useEffect(()=>()=>{m()},[m]),{execute:b,executeAll:p,terminateAll:m,getStats:g}}function mu(e){const t=`
123
123
  self.onmessage = function(e) {
124
124
  const msg = e.data;
125
125
 
@@ -142,7 +142,7 @@ HTML:`}],{temperature:.3}),c=i.content.match(/```html?\n?([\s\S]*?)```/);return
142
142
  }
143
143
  }
144
144
  };
145
- `,r=new Blob([t],{type:"application/javascript"});return new URL(URL.createObjectURL(r))}function cu(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 lu(){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 du(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,c]of a.entries())if((n(c)||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 uu(){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 fu(){const e=l.useRef([]),t=l.useCallback((n,o,s,i)=>{n.addEventListener(o,s,i),e.current.push({target:n,event:o,handler:s,options:i})},[]),r=l.useCallback(()=>{e.current.forEach(({target:n,event:o,handler:s,options:i})=>{n.removeEventListener(o,s,i)}),e.current=[]},[]),a=l.useCallback(()=>e.current.length,[]);return l.useEffect(()=>()=>{r()},[r]),{add:t,removeAll:r,count:a}}function mu(){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 Pe(){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 pu(e={}){const{warningThreshold:t=75,pollInterval:r=1e4,onHighUsage:a}=e,[n,o]=l.useState(Pe),[s,i]=l.useState(!1);return l.useEffect(()=>{if(!Pe().isSupported)return;const d=setInterval(()=>{const u=Pe();o(u);const f=u.usedPercent>t;i(f),f&&a&&a(u)},r);return()=>clearInterval(d)},[t,r,a]),{stats:n,isHighUsage:s}}function gu(e){const{src:t,rootMargin:r="200px",threshold:a=0,placeholder:n,progressive:o}=e,s=l.useRef(null),[i,c]=l.useState(!1),[d,u]=l.useState(!1),[f,h]=l.useState(n||"");return l.useEffect(()=>{const b=s.current;if(!b)return;const p=new IntersectionObserver(([m])=>{m.isIntersecting&&(c(!0),p.disconnect())},{rootMargin:r,threshold:a});return p.observe(b),()=>p.disconnect()},[r,a]),l.useEffect(()=>{if(!i)return;const b=new Image;return b.onload=()=>{h(t),u(!0)},b.src=t,()=>{b.onload=null}},[i,t,o]),{ref:s,isInView:i,isLoaded:d,currentSrc:f}}function yu(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 be={avif:null,webp:null};async function Oe(e){if(be[e]!==null)return be[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=()=>{be[e]=a.width>0&&a.height>0,r(be[e])},a.onerror=()=>{be[e]=!1,r(!1)},a.src=t[e]})}function xi(){const[e,t]=l.useState({avif:!1,webp:!1,jpg:!0,png:!0,gif:!0}),[r,a]=l.useState(!0);return l.useEffect(()=>{Promise.all([Oe("avif"),Oe("webp")]).then(([n,o])=>{t(s=>({...s,avif:n,webp:o})),a(!1)})},[]),{formats:e,isChecking:r}}function wi(e){return e.map(t=>`${t.src} ${t.width}w`).join(", ")}function ki(e,t){const r=e.map(a=>`(max-width: ${a.maxWidth}px) ${a.size}`);return r.push(t),r.join(", ")}function Ci(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 Ei(e){const{src:t,lqip:r,rootMargin:a="200px",threshold:n=0,blurRadius:o=20,delay:s=0,priority:i="auto",onLoad:c,onError:d}=e,u=l.useRef(null),[f,h]=l.useState({currentSrc:r||null,thumbnailSrc:r||null,fullSrc:t,stage:"idle",isLoaded:!1,isInView:!1,error:null});l.useEffect(()=>{if(i==="high"){h(g=>({...g,isInView:!0}));return}const p=u.current;if(!p)return;const m=new IntersectionObserver(([g])=>{g.isIntersecting&&(h(S=>({...S,isInView:!0})),m.disconnect())},{rootMargin:a,threshold:n});return m.observe(p),()=>m.disconnect()},[a,n,i]),l.useEffect(()=>{if(!f.isInView||f.isLoaded)return;h(g=>({...g,stage:r?"thumbnail":"loading"}));const p=s>0?setTimeout(m,s):null;p||m();function m(){const g=new Image;g.onload=()=>{h(S=>({...S,currentSrc:t,stage:"loaded",isLoaded:!0})),c==null||c()},g.onerror=()=>{const S=new Error(`Failed to load image: ${t}`);h(y=>({...y,stage:"error",error:S})),d==null||d(S)},g.src=t}return()=>{p&&clearTimeout(p)}},[f.isInView,f.isLoaded,t,r,s,c,d]);const b={filter:f.stage==="thumbnail"?`blur(${o}px)`:"none",transition:"filter 0.3s ease-out",...f.stage==="thumbnail"&&{transform:"scale(1.05)"}};return{ref:u,...f,style:b}}function Ni(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 Ai(e){const[t,r]=l.useState({loaded:0,total:e.length,isComplete:!1,errors:[]});return l.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 Ht(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 Mi(e){const[t,r]=l.useState(null),[a,n]=l.useState(!1),[o,s]=l.useState(null);return l.useEffect(()=>{if(!e){r(null);return}let i=!1;return n(!0),s(null),Ht(e).then(c=>{i||(r(c),n(!1))}).catch(c=>{i||(s(c),n(!1))}),()=>{i=!0}},[e]),{image:t,isLoading:a,error:o}}function Ti(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 Ii(e,t){const r=l.useRef(null),[a,n]=l.useState(!1);return l.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 Ri(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 Li(e,t="vertical",r=10,a=10){const i=`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${a}">
145
+ `,r=new Blob([t],{type:"application/javascript"});return new URL(URL.createObjectURL(r))}function pu(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 gu(){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 yu(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,c]of a.entries())if((n(c)||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 hu(){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 bu(){const e=l.useRef([]),t=l.useCallback((n,o,s,i)=>{n.addEventListener(o,s,i),e.current.push({target:n,event:o,handler:s,options:i})},[]),r=l.useCallback(()=>{e.current.forEach(({target:n,event:o,handler:s,options:i})=>{n.removeEventListener(o,s,i)}),e.current=[]},[]),a=l.useCallback(()=>e.current.length,[]);return l.useEffect(()=>()=>{r()},[r]),{add:t,removeAll:r,count:a}}function Su(){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 Pe(){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 vu(e={}){const{warningThreshold:t=75,pollInterval:r=1e4,onHighUsage:a}=e,[n,o]=l.useState(Pe),[s,i]=l.useState(!1);return l.useEffect(()=>{if(!Pe().isSupported)return;const d=setInterval(()=>{const u=Pe();o(u);const f=u.usedPercent>t;i(f),f&&a&&a(u)},r);return()=>clearInterval(d)},[t,r,a]),{stats:n,isHighUsage:s}}function xu(e){const{src:t,rootMargin:r="200px",threshold:a=0,placeholder:n,progressive:o}=e,s=l.useRef(null),[i,c]=l.useState(!1),[d,u]=l.useState(!1),[f,h]=l.useState(n||"");return l.useEffect(()=>{const b=s.current;if(!b)return;const p=new IntersectionObserver(([m])=>{m.isIntersecting&&(c(!0),p.disconnect())},{rootMargin:r,threshold:a});return p.observe(b),()=>p.disconnect()},[r,a]),l.useEffect(()=>{if(!i)return;const b=new Image;return b.onload=()=>{h(t),u(!0)},b.src=t,()=>{b.onload=null}},[i,t,o]),{ref:s,isInView:i,isLoaded:d,currentSrc:f}}function wu(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 be={avif:null,webp:null};async function Oe(e){if(be[e]!==null)return be[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=()=>{be[e]=a.width>0&&a.height>0,r(be[e])},a.onerror=()=>{be[e]=!1,r(!1)},a.src=t[e]})}function ki(){const[e,t]=l.useState({avif:!1,webp:!1,jpg:!0,png:!0,gif:!0}),[r,a]=l.useState(!0);return l.useEffect(()=>{Promise.all([Oe("avif"),Oe("webp")]).then(([n,o])=>{t(s=>({...s,avif:n,webp:o})),a(!1)})},[]),{formats:e,isChecking:r}}function Ci(e){return e.map(t=>`${t.src} ${t.width}w`).join(", ")}function Ei(e,t){const r=e.map(a=>`(max-width: ${a.maxWidth}px) ${a.size}`);return r.push(t),r.join(", ")}function Ni(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 Ai(e){const{src:t,lqip:r,rootMargin:a="200px",threshold:n=0,blurRadius:o=20,delay:s=0,priority:i="auto",onLoad:c,onError:d}=e,u=l.useRef(null),[f,h]=l.useState({currentSrc:r||null,thumbnailSrc:r||null,fullSrc:t,stage:"idle",isLoaded:!1,isInView:!1,error:null});l.useEffect(()=>{if(i==="high"){h(g=>({...g,isInView:!0}));return}const p=u.current;if(!p)return;const m=new IntersectionObserver(([g])=>{g.isIntersecting&&(h(S=>({...S,isInView:!0})),m.disconnect())},{rootMargin:a,threshold:n});return m.observe(p),()=>m.disconnect()},[a,n,i]),l.useEffect(()=>{if(!f.isInView||f.isLoaded)return;h(g=>({...g,stage:r?"thumbnail":"loading"}));const p=s>0?setTimeout(m,s):null;p||m();function m(){const g=new Image;g.onload=()=>{h(S=>({...S,currentSrc:t,stage:"loaded",isLoaded:!0})),c==null||c()},g.onerror=()=>{const S=new Error(`Failed to load image: ${t}`);h(y=>({...y,stage:"error",error:S})),d==null||d(S)},g.src=t}return()=>{p&&clearTimeout(p)}},[f.isInView,f.isLoaded,t,r,s,c,d]);const b={filter:f.stage==="thumbnail"?`blur(${o}px)`:"none",transition:"filter 0.3s ease-out",...f.stage==="thumbnail"&&{transform:"scale(1.05)"}};return{ref:u,...f,style:b}}function Mi(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 Ti(e){const[t,r]=l.useState({loaded:0,total:e.length,isComplete:!1,errors:[]});return l.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 Ht(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 Ii(e){const[t,r]=l.useState(null),[a,n]=l.useState(!1),[o,s]=l.useState(null);return l.useEffect(()=>{if(!e){r(null);return}let i=!1;return n(!0),s(null),Ht(e).then(c=>{i||(r(c),n(!1))}).catch(c=>{i||(s(c),n(!1))}),()=>{i=!0}},[e]),{image:t,isLoading:a,error:o}}function Ri(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 Li(e,t){const r=l.useRef(null),[a,n]=l.useState(!1);return l.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 Fi(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 Di(e,t="vertical",r=10,a=10){const i=`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${a}">
146
146
  <defs>
147
147
  <linearGradient id="g" x1="0%" y1="0%" x2="${t==="horizontal"?"100%":"0%"}" y2="${t==="vertical"?"100%":"0%"}">
148
148
  <stop offset="0%" style="stop-color:${e[0]}"/>
@@ -150,4 +150,4 @@ HTML:`}],{temperature:.3}),c=i.content.match(/```html?\n?([\s\S]*?)```/);return
150
150
  </linearGradient>
151
151
  </defs>
152
152
  <rect width="100%" height="100%" fill="url(#g)"/>
153
- </svg>`;return`data:image/svg+xml,${encodeURIComponent(i)}`}const hu={checkFormatSupport:Oe,useImageFormats:xi,generateSrcset:wi,generateSizes:ki,selectOptimalSource:Ci,useProgressiveImage:Ei,preloadImages:Ni,useImagePreload:Ai,loadAndDecodeImage:Ht,useDecodedImage:Mi,createImageObserver:Ti,useSharedImageObserver:Ii,generateColorPlaceholder:Ri,generateGradientPlaceholder:Li};function bu(e){return e["data-testid"]??e.testId}function _t(e){return e.error||e.status==="error"?"error":e.warning||e.status==="warning"?"warning":e.success||e.status==="success"?"success":e.status??"idle"}function Su(e){const t=_t(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 rr=new Set;function Fi(e,t,r){process.env.NODE_ENV!=="production"&&t!==void 0&&r!==void 0&&!rr.has(e)&&(rr.add(e),console.warn(`[Nice2Dev] <${e}> received both \`value\` and \`defaultValue\`. Use one or the other (controlled XOR uncontrolled).`))}const ar=new Set;function Di(e,t){process.env.NODE_ENV!=="production"&&(ar.has(e)||(ar.add(e),t()))}function Pi(e){const{componentName:t,prop:r,replacement:a,removeIn:n,reason:o}=e;Di(`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 vu(e){const{symbol:t,replacement:r,removeIn:a,reason:n}=e;Di(`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 xu(e){return e.value!==void 0&&e.newValue===void 0&&Pi({componentName:e.componentName,prop:e.prop,replacement:e.replacement,removeIn:e.removeIn}),e.newValue??e.value}const nr=new Set;function wu(e){const{value:t,defaultValue:r,fallbackValue:a,onChange:n,componentName:o="Component"}=e,s=t!==void 0,[i,c]=l.useState(()=>r!==void 0?r:a),d=l.useRef(s);process.env.NODE_ENV!=="production"&&(d.current!==s&&!nr.has(o)&&(nr.add(o),console.warn(`[Nice2Dev] <${o}> switched between controlled and uncontrolled. A component should not change between the two over its lifetime.`)),d.current=s,Fi(o,t,r));const u=s?t:i,f=l.useRef(u);f.current=u;const h=l.useCallback((b,p)=>{const m=typeof b=="function"?b(f.current):b;f.current=m,s||c(m),p===void 0?n==null||n(m):n==null||n(m,p)},[s,n]);return[u,h,s]}const ku={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 Cu(e){const t=_t(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:[ku[t],e.className].filter(Boolean).join(" "),children:r}):null}const zi={0:"A",1:"B",2:"X",3:"Y",4:"LB",5:"RB",6:"LT",7:"RT",8:"Back",9:"Start",10:"LS",11:"RS",12:"DpadUp",13:"DpadDown",14:"DpadLeft",15:"DpadRight",16:"Home"},Eu={0:"LeftX",1:"LeftY",2:"RightX",3:"RightY"},Nu={Cross:"A",Circle:"B",Square:"X",Triangle:"Y",L1:"LB",R1:"RB",L2:"LT",R2:"RT",Share:"Back",Options:"Start",L3:"LS",R3:"RS",PS:"Home"},Ot=Object.values(zi);function Au(e,t){if(e.connected!==t.connected||e.id!==t.id||e.leftTrigger!==t.leftTrigger||e.rightTrigger!==t.rightTrigger)return!1;for(const r of Ot)if(e.buttons[r]!==t.buttons[r])return!1;return Object.keys(e.axes).every(r=>e.axes[r]===t.axes[r])}function Mu(e={}){const{index:t=0,deadzone:r=.15,pollRate:a=16,actions:n={},enabled:o=!0,onButtonDown:s,onButtonUp:i}=e,[c,d]=l.useState({connected:!1,id:"",buttons:Fe(),axes:{LeftX:0,LeftY:0,RightX:0,RightY:0},leftTrigger:0,rightTrigger:0,vibrate:()=>{}}),u=l.useRef(Fe()),f=l.useRef(new Map),h=l.useRef(n);h.current=n;const b=l.useRef({onButtonDown:s,onButtonUp:i});b.current={onButtonDown:s,onButtonUp:i};const p=l.useRef({left:0,right:0}),m=l.useCallback((S,y=.5,v=.5)=>{typeof window<"u"&&N.getInputEngine().rumble(t,S,y,v)},[t]),g=l.useCallback(S=>{if(Math.abs(S)<r)return 0;const y=S>0?1:-1,v=(Math.abs(S)-r)/(1-r);return y*v},[r]);return l.useEffect(()=>{if(!o||typeof window>"u")return;const S=N.getInputEngine();let y=-1/0;const v=(C,A)=>{var ue,ne,oe,ge,Re,Le,ye,Bt;if(A-y<a)return;y=A;const M=C.find(B=>B.index===t);if(!M)return;const I=Fe();for(let B=0;B<M.buttons.length;B++){const z=zi[B];z&&(I[z]=M.buttons[B].pressed)}const $={LeftX:0,LeftY:0,RightX:0,RightY:0};for(let B=0;B<Math.min(M.axes.length,4);B++){const z=Eu[B];z&&($[z]=g(M.axes[B]))}const T=((ue=M.buttons[6])==null?void 0:ue.value)??0,D=((ne=M.buttons[7])==null?void 0:ne.value)??0,{onButtonDown:F,onButtonUp:P}=b.current;if(F||P)for(const B of Ot)I[B]&&!u.current[B]?F==null||F(B):!I[B]&&u.current[B]&&(P==null||P(B));const L=Date.now(),O=h.current;for(const[B,z]of Object.entries(O)){if(z.button||z.buttons){const X=z.buttons||[z.button],fe=X.every(Q=>I[Q]),he=X.every(Q=>u.current[Q]);if(fe&&!he)(oe=z.onPress)==null||oe.call(z),f.current.set(B,{startTime:L,lastRepeat:L});else if(!fe&&he)(ge=z.onRelease)==null||ge.call(z),f.current.delete(B);else if(fe&&((Re=z.onHold)==null||Re.call(z),z.repeatDelay!==void 0&&z.repeatRate!==void 0)){const Q=f.current.get(B);Q&&L-Q.startTime>z.repeatDelay&&L-Q.lastRepeat>=z.repeatRate&&((Le=z.onPress)==null||Le.call(z),Q.lastRepeat=L)}}if(z.axis&&z.onAxisChange){const X=$[z.axis];z.axisDirection?z.axisDirection==="positive"&&X>0?z.onAxisChange(X):z.axisDirection==="negative"&&X<0&&z.onAxisChange(Math.abs(X)):z.onAxisChange(X)}if(z.trigger){const X=z.trigger==="LT"?T:D,fe=z.trigger==="LT"?p.current.left>.5:p.current.right>.5,he=X>.5;he&&!fe?(ye=z.onPress)==null||ye.call(z):!he&&fe&&((Bt=z.onRelease)==null||Bt.call(z))}}u.current=I,p.current={left:T,right:D};const V={connected:!0,id:M.id,buttons:I,axes:$,leftTrigger:T,rightTrigger:D,vibrate:m};d(B=>Au(B,V)&&B.vibrate===m?B:V)},k=()=>{const C=S.getState().pads.find(A=>A.index===t);C||(u.current=Fe()),d(A=>A.connected===!!C&&A.id===((C==null?void 0:C.id)??"")?A:{...A,connected:!!C,id:(C==null?void 0:C.id)??"",vibrate:m})},E=S.subscribeGamepadFrames(v),w=S.subscribe(k);return k(),()=>{E(),w()}},[o,t,a,g,m]),c}function Fe(){return{A:!1,B:!1,X:!1,Y:!1,LB:!1,RB:!1,LT:!1,RT:!1,Back:!1,Start:!1,LS:!1,RS:!1,DpadUp:!1,DpadDown:!1,DpadLeft:!1,DpadRight:!1,Home:!1}}function or(e){let t=!0;return r=>{r>.8&&t?(t=!1,e()):r<.3&&(t=!0)}}function Tu(e){const t={};return e.onNavigateUp&&(t.navUp={button:"DpadUp",onPress:e.onNavigateUp,repeatDelay:400,repeatRate:100},t.navUpStick={axis:"LeftY",axisDirection:"negative",onAxisChange:or(()=>{var r;return(r=e.onNavigateUp)==null?void 0:r.call(e)})}),e.onNavigateDown&&(t.navDown={button:"DpadDown",onPress:e.onNavigateDown,repeatDelay:400,repeatRate:100},t.navDownStick={axis:"LeftY",axisDirection:"positive",onAxisChange:or(()=>{var r;return(r=e.onNavigateDown)==null?void 0:r.call(e)})}),e.onNavigateLeft&&(t.navLeft={button:"DpadLeft",onPress:e.onNavigateLeft,repeatDelay:400,repeatRate:100}),e.onNavigateRight&&(t.navRight={button:"DpadRight",onPress:e.onNavigateRight,repeatDelay:400,repeatRate:100}),e.onConfirm&&(t.confirm={button:"A",onPress:e.onConfirm}),e.onCancel&&(t.cancel={button:"B",onPress:e.onCancel}),e.onTabNext&&(t.tabNext={button:"RB",onPress:e.onTabNext}),e.onTabPrev&&(t.tabPrev={button:"LB",onPress:e.onTabPrev}),e.onMenu&&(t.menu={button:"Start",onPress:e.onMenu}),t}const Ze=l.createContext(null);function ir(e){if(!e)return null;const t=e.getBoundingClientRect();return t.width===0&&t.height===0?null:{x:t.left+t.width/2,y:t.top+t.height/2}}const Iu={up:[0,-1],down:[0,1],left:[-1,0],right:[1,0]},Ru=({keyboard:e=!0,gamepad:t=!0,children:r})=>{const[a,n]=l.useState([]),[o,s]=l.useState(null),i=l.useRef([]),c=l.useRef(null),d=l.useRef([]),u=l.useRef(0);l.useEffect(()=>{i.current=a},[a]),l.useEffect(()=>{c.current=o},[o]);const f=l.useCallback(()=>{u.current+=1},[]),h=l.useCallback(()=>{u.current=Math.max(0,u.current-1)},[]),b=l.useCallback((E,w)=>{d.current=[...d.current,{prefix:E,onDismiss:w}]},[]),p=l.useCallback(()=>{var C;const E=d.current;if(E.length===0)return;const w=E[E.length-1];d.current=E.slice(0,-1),(C=w.onDismiss)==null||C.call(w)},[]),m=l.useCallback(E=>{n(w=>w.some(C=>C.id===E.id)?w:[...w,E])},[]),g=l.useCallback(E=>{n(w=>{var A;const C=w.filter(M=>M.id!==E);if(c.current===E){const M=((A=C[0])==null?void 0:A.id)??null;s(M),c.current=M}return C})},[]),S=l.useCallback(E=>{s(E),c.current=E},[]),y=l.useCallback((E,w)=>{var L,O;if(u.current>0)return;const C=i.current.filter(V=>!V.disabled);if(C.length===0)return;const A=c.current,M=A?C.find(V=>V.id===A):void 0;if(!M){const V=C[0];S(V.id),(L=V.ref.current)==null||L.focus();return}const I=d.current,$=I.length>0?I[I.length-1]:void 0,T=C.filter(V=>V.id!==A&&(!$||V.id.startsWith($.prefix))),D=ir(M.ref.current);if(!D||T.length===0)return;let F=null,P=1/0;for(const V of T){const ue=ir(V.ref.current);if(!ue)continue;const ne=ue.x-D.x,oe=ue.y-D.y,ge=E*ne+w*oe;if(ge<=0)continue;const Re=ge,Le=Math.abs(E*oe-w*ne),ye=Math.sqrt(ne*ne+oe*oe)+Le*2-Re*.001;ye<P&&(P=ye,F=V)}F&&(S(F.id),(O=F.ref.current)==null||O.focus())},[S]),v=l.useCallback(E=>{var A;if(u.current>0)return;const w=E??c.current;if(!w)return;const C=i.current.find(M=>M.id===w);C&&(C.onActivate?C.onActivate():(A=C.ref.current)==null||A.click())},[]);N.useIntent(["navigate","activate","back"],E=>{if(u.current>0)return!1;const w=E.source==="keyboard";if(w&&!e||!w&&!t)return!1;if(E.intent==="navigate"){if(i.current.length===0||!E.direction)return!1;const[C,A]=Iu[E.direction];return y(C,A),!0}return E.intent==="activate"?c.current?(v(),!0):!1:d.current.length===0?!1:(p(),!0)});const k=l.useMemo(()=>({register:m,unregister:g,moveFocus:y,activate:v,setActive:S,activeId:o,focusables:a,pushFocusTrap:b,popFocusTrap:p,pauseNavigation:f,resumeNavigation:h}),[m,g,y,v,S,o,a,b,p,f,h]);return x.jsx(Ze.Provider,{value:k,children:r})};function Lu(){return l.useContext(Ze)}function Fu(){const e=l.useContext(Ze);if(!e)throw new Error("useSpatialNav must be used inside a NiceSpatialNavProvider");return e}function $i(e,t){const r=l.useContext(Ze),{id:a,onActivate:n,disabled:o}=t,s=l.useRef(n);s.current=n;const i=r==null?void 0:r.register,c=r==null?void 0:r.unregister,d=r==null?void 0:r.setActive;l.useEffect(()=>{if(!(!i||!c||o))return i({id:a,ref:e,onActivate:()=>{var f;return(f=s.current)==null?void 0:f.call(s)},disabled:o}),()=>c(a)},[i,c,a,o,e]),l.useEffect(()=>{const f=e.current;if(!f||!d||o)return;const h=()=>d(a);return f.addEventListener("focus",h),()=>f.removeEventListener("focus",h)},[d,a,o,e]);const u=(r==null?void 0:r.activeId)===a;return l.useEffect(()=>{const f=e.current;f&&(u?f.dataset.active="true":delete f.dataset.active)},[u,e]),{active:u}}const Du=({focusId:e,onActivate:t,disabled:r,as:a="div",className:n,style:o,children:s,...i})=>{const c=l.useRef(null),{active:d}=$i(c,{id:e,onActivate:t,disabled:r});return x.jsx(a,{ref:c,tabIndex:r?-1:0,className:`nice-focusable${d?" nice-focusable--active":""}${n?` ${n}`:""}`,style:o,onClick:t,...i,children:s})};exports.IndexedDBAdapter=N.IndexedDBAdapter;exports.LocalStorageAdapter=N.LocalStorageAdapter;exports.NICE_BUILTIN_ICONS=N.NICE_BUILTIN_ICONS;exports.NICE_DEFAULT_GAMEPAD_BINDINGS=N.NICE_DEFAULT_GAMEPAD_BINDINGS;exports.NICE_DEFAULT_KEYBOARD_BINDINGS=N.NICE_DEFAULT_KEYBOARD_BINDINGS;exports.NICE_ENGAGE_EVENT=N.NICE_ENGAGE_EVENT;exports.NICE_GAMEPAD_BUTTONS=N.NICE_GAMEPAD_BUTTONS;exports.NICE_INPUT_DEFAULTS=N.NICE_INPUT_DEFAULTS;exports.NICE_INTENTS=N.NICE_INTENTS;exports.NICE_INTENT_EVENT=N.NICE_INTENT_EVENT;exports.NICE_KEYBOARD_LAYOUTS=N.NICE_KEYBOARD_LAYOUTS;exports.NICE_KEYBOARD_NUMERIC=N.NICE_KEYBOARD_NUMERIC;exports.NICE_KEYBOARD_NUMPAD=N.NICE_KEYBOARD_NUMPAD;exports.NICE_KEYBOARD_PHONE=N.NICE_KEYBOARD_PHONE;exports.NICE_KEYBOARD_PIN=N.NICE_KEYBOARD_PIN;exports.NICE_KEY_BACKSPACE=N.NICE_KEY_BACKSPACE;exports.NICE_KEY_CAPS=N.NICE_KEY_CAPS;exports.NICE_KEY_ENTER=N.NICE_KEY_ENTER;exports.NICE_KEY_SHIFT=N.NICE_KEY_SHIFT;exports.NICE_KEY_SPACE=N.NICE_KEY_SPACE;exports.NICE_KEY_TAB=N.NICE_KEY_TAB;exports.NICE_ROVING_ITEMS=N.NICE_ROVING_ITEMS;exports.NiceButtonPrompt=N.NiceButtonPrompt;exports.NiceControlHint=N.NiceControlHint;exports.NiceFocusScope=N.NiceFocusScope;exports.NiceGamepadPoller=N.NiceGamepadPoller;exports.NiceIcon=N.NiceIcon;exports.NiceIconProvider=N.NiceIconProvider;exports.NiceInputEngine=N.NiceInputEngine;exports.NiceInputHintBar=N.NiceInputHintBar;exports.NiceInputProvider=N.NiceInputProvider;exports.NiceKeyCap=N.NiceKeyCap;exports.NicePreferencesPanel=N.NicePreferencesPanel;exports.NiceUserPreferencesProvider=N.NiceUserPreferencesProvider;exports.RestAPISyncAdapter=N.RestAPISyncAdapter;exports.applyFocusScope=N.applyFocusScope;exports.buildKeyboardRows=N.buildKeyboardRows;exports.chordMatches=N.chordMatches;exports.chordToString=N.chordToString;exports.clickElement=N.clickElement;exports.clickOnActivationKey=N.clickOnActivationKey;exports.confirmButtonFor=N.confirmButtonFor;exports.createTabEscape=N.createTabEscape;exports.deleteBeforeCaret=N.deleteBeforeCaret;exports.detectGamepadFamily=N.detectGamepadFamily;exports.engageKindOf=N.engageKindOf;exports.findFocusTarget=N.findFocusTarget;exports.findRegionTarget=N.findRegionTarget;exports.focusCandidates=N.focusCandidates;exports.gamepadButtonLabel=N.gamepadButtonLabel;exports.gamepadGlyphName=N.gamepadGlyphName;exports.gamepadIntentMap=N.gamepadIntentMap;exports.getInputEngine=N.getInputEngine;exports.hintsForFocus=N.hintsForFocus;exports.insertAtCaret=N.insertAtCaret;exports.intentFromKey=N.intentFromKey;exports.isClickActivatable=N.isClickActivatable;exports.isEngaged=N.isEngaged;exports.isFocusCandidate=N.isFocusCandidate;exports.isMacPlatform=N.isMacPlatform;exports.isRtlKeyboardLanguage=N.isRtlKeyboardLanguage;exports.isTextInput=N.isTextInput;exports.keyFace=N.keyFace;exports.moveTextCaret=N.moveTextCaret;exports.normalizeKey=N.normalizeKey;exports.parseKeyChord=N.parseKeyChord;exports.pickInDirection=N.pickInDirection;exports.readScope=N.readScope;exports.rectOf=N.rectOf;exports.remoteIntent=N.remoteIntent;exports.resolveGamepadBindings=N.resolveGamepadBindings;exports.resolveKeyboardBindings=N.resolveKeyboardBindings;exports.restoresOnCancel=N.restoresOnCancel;exports.setFieldText=N.setFieldText;exports.setInputHints=N.setInputHints;exports.spatialScore=N.spatialScore;exports.splitChord=N.splitChord;exports.toAriaKeyShortcuts=N.toAriaKeyShortcuts;exports.toGamepadButton=N.toGamepadButton;exports.triggerNiceAction=N.triggerNiceAction;exports.useChartPreferences=N.useChartPreferences;exports.useConnectedGamepads=N.useConnectedGamepads;exports.useControlPreferences=N.useControlPreferences;exports.useEngage=N.useEngage;exports.useFocusScope=N.useFocusScope;exports.useFocusedElement=N.useFocusedElement;exports.useGamepadFamily=N.useGamepadFamily;exports.useGridFocus=N.useGridFocus;exports.useGridPreferences=N.useGridPreferences;exports.useHintsVisible=N.useHintsVisible;exports.useInputEngine=N.useInputEngine;exports.useInputHints=N.useInputHints;exports.useInputMethod=N.useInputMethod;exports.useInputPreferences=N.useInputPreferences;exports.useInputState=N.useInputState;exports.useIntent=N.useIntent;exports.useMenuButton=N.useMenuButton;exports.useNiceAction=N.useNiceAction;exports.useNiceActions=N.useNiceActions;exports.useNiceIcon=N.useNiceIcon;exports.useOverlayFocus=N.useOverlayFocus;exports.useRovingFocus=N.useRovingFocus;exports.useTreeFocus=N.useTreeFocus;exports.useUserPreferences=N.useUserPreferences;exports.useUserPreferencesOptional=N.useUserPreferencesOptional;Object.defineProperty(exports,"NICE_SUPPORTED_LANGS",{enumerable:!0,get:()=>j.NICE_SUPPORTED_LANGS});Object.defineProperty(exports,"NiceI18nLazyProvider",{enumerable:!0,get:()=>j.NiceI18nLazyProvider});Object.defineProperty(exports,"NiceI18nProvider",{enumerable:!0,get:()=>j.NiceI18nProvider});Object.defineProperty(exports,"createICUTranslator",{enumerable:!0,get:()=>j.createICUTranslator});Object.defineProperty(exports,"formatICU",{enumerable:!0,get:()=>j.formatICU});Object.defineProperty(exports,"getLoadedNiceDictionary",{enumerable:!0,get:()=>j.getLoadedNiceDictionary});Object.defineProperty(exports,"loadNiceDictionary",{enumerable:!0,get:()=>j.loadNiceDictionary});Object.defineProperty(exports,"useNiceTranslation",{enumerable:!0,get:()=>j.useNiceTranslation});exports.ANIMATION_VALUES=Be;exports.BatchOperations=Md;exports.COMMON_SHORTCUTS=Vs;exports.CheckMark=es;exports.ChevronMark=rs;exports.CloseMark=ns;exports.ColumnFormulas=Ed;exports.DEFAULT_TRACELESS_POLICY=Il;exports.DEFAULT_VARIANT_CONFIG=Y;exports.DENSITY_VALUES=we;exports.DisplayModeView=Ji;exports.DotMark=as;exports.GAMEPAD_BUTTONS=Ot;exports.ImageOptimization=hu;exports.LeakDetectorStatus=ml;exports.NICE_BREAKPOINTS=me;exports.NICE_COLOR_BLIND_MODES=nc;exports.NICE_DISPLAY_STYLES=Wi;exports.NICE_DISPLAY_STYLE_INFO=qi;exports.NICE_THEME_GALLERY=Dn;exports.NICE_THEME_PACKS=zt;exports.NICE_THEME_PACKS_EXTENDED=$t;exports.NICE_THEME_PACK_FONT_LINKS=$d;exports.NICE_THEME_PACK_FONT_LINKS_EXTENDED=Bd;exports.NICE_THEME_PACK_LIST=Wo;exports.NICE_THEME_PACK_LIST_EXTENDED=gi;exports.NICE_THEME_PRESETS=lt;exports.NICE_VIEW_COMPONENT_TYPES=Gd;exports.NiceA11yProvider=Ar;exports.NiceAIProvider=Ul;exports.NiceAccessControl=wr;exports.NiceDataCache=ut;exports.NiceDisplayStyleContext=We;exports.NiceFieldStatus=Cu;exports.NiceFocusable=Du;exports.NiceHelpIcon=lo;exports.NiceHelpProvider=ao;exports.NiceInlineHelp=so;exports.NiceKeyboardHint=Rr;exports.NiceProfiler=jc;exports.NicePullToRefresh=Ps;exports.NiceQuickHelp=co;exports.NiceRTLProvider=vr;exports.NiceRequestDeduplicator=No;exports.NiceSkipLink=Ir;exports.NiceSpatialNavProvider=Ru;exports.NiceStateIO=Pd;exports.NiceSwipeableListItem=Ds;exports.NiceTestWrapper=Bn;exports.NiceThemeContext=xt;exports.NiceThemeProvider=Ct;exports.NiceThemeVariantConfigurator=Kd;exports.NiceThemeVariantProvider=Vd;exports.NiceTouchTarget=$s;exports.NiceTutorialButton=Ml;exports.NiceTutorialsProvider=El;exports.NiceVisuallyHidden=Tr;exports.PRIVACY_LEVEL_ORDER=pe;exports.PS_BUTTON_ALIASES=Nu;exports.ProfilerOverlay=Gc;exports.RADIUS_VALUES=ve;exports.RefreshMark=ts;exports.SHADOW_DARK_MODE_VALUES=sr;exports.SHADOW_VALUES=ze;exports.StorageAdapter=yo;exports.TRACELESS_MODE_PRESETS=mo;exports.TRACELESS_POLICY_HEADER=Hl;exports.VARIANT_PRESETS=je;exports.ValidationRules=Ad;exports.accessModeAttrs=Is;exports.aggregate=te;exports.analog70s=ri;exports.applyColorBlindMode=St;exports.applyTheme=gc;exports.applyVariantConfig=ht;exports.applyVariantsToTheme=ji;exports.arcticCrystal=Xo;exports.artDecoGatsby=Jo;exports.auditStorageCompliance=Kl;exports.auditWCAG22AAA=rc;exports.autumnFoliage=Go;exports.bankVault=jo;exports.bauhaus=Bo;exports.blackTieGala=mi;exports.blueprint=Zo;exports.brutalistRaw=Do;exports.buildAriaDescribedBy=Mr;exports.buildFieldA11y=Su;exports.buildFormFieldAria=Bs;exports.calculateDataDiff=Ao;exports.candyPop=zo;exports.checkAriaCompliance=$c;exports.checkContrastAAA=tc;exports.checkFormatSupport=Oe;exports.checkRegression=Yn;exports.claymorphism=Oo;exports.clearAllClientStorage=Vl;exports.clearLeakReports=el;exports.clearProfilingData=Et;exports.comicHalftone=si;exports.configureLeakDetector=Qc;exports.configureProfiler=Wn;exports.createArrayDataSource=td;exports.createColorBlindController=lc;exports.createCustomDataSource=cd;exports.createEventCleanup=mu;exports.createGraphQLDataSource=sd;exports.createGraphQLSubscriptionSource=Sl;exports.createId=dc;exports.createImageObserver=Ti;exports.createIndexedDBDataSource=ft;exports.createInfiniteScroll=hd;exports.createInlineWorker=su;exports.createLRUCache=du;exports.createMockDataSource=zc;exports.createNavigationActions=Tu;exports.createNicePluginSystem=mc;exports.createNiceReduxMiddleware=yl;exports.createODataDataSource=id;exports.createObjectPool=yu;exports.createOfflineFirstDataSource=Ld;exports.createPermissiveInstanceCeiling=Wl;exports.createPolicyHeader=Ol;exports.createReactQueryAdapter=pl;exports.createRestDataSource=So;exports.createRestrictiveInstanceCeiling=jl;exports.createSSEDataSource=wd;exports.createSignalRDataSource=Sd;exports.createStorageAdapter=Bl;exports.createURLStateManager=Dd;exports.createUserPreferencesStore=zd;exports.createWeakCache=lu;exports.createWeakRefCache=uu;exports.createWebSocketDataSource=bd;exports.createZustandAdapter=gl;exports.deepSea=ti;exports.defaultValidationMessage=ko;exports.deprecateProp=Pi;exports.deprecateSymbol=vu;exports.deriveMode=Lt;exports.deserializeTheme=vc;exports.desertDune=Uo;exports.dieterRams=fi;exports.endMark=Ge;exports.evaluateCondition=Yd;exports.evaluateValidation=Eo;exports.evaluateValidationRule=Co;exports.filterGroupToWhere=ld;exports.filterNiceThemePacksByTag=Od;exports.filterNiceThemePacksExtendedByTag=Wd;exports.forceGC=ul;exports.forestCanopy=Ko;exports.formatShortcut=Ks;exports.forwardDeprecated=xu;exports.generateBadgeStyles=cr;exports.generateButtonStyles=mt;exports.generateCardStyles=gt;exports.generateColorPlaceholder=Ri;exports.generateColumnsFromSchema=xl;exports.generateFillStyles=Bi;exports.generateFormFieldsFromSchema=wl;exports.generateFromOpenAPI=vl;exports.generateGradientPlaceholder=Li;exports.generateInputStyles=pt;exports.generatePaletteFromColor=ys;exports.generateSizes=ki;exports.generateSrcset=wi;exports.generateTabStyles=lr;exports.generateTableStyles=fr;exports.generateToggleStyles=dr;exports.generateTooltipStyles=ur;exports.generateTracelessComplianceReport=Dl;exports.generateVariantCSS=yt;exports.getComponentStats=Kn;exports.getComponentStyleFromConfig=pr;exports.getComputedTheme=bc;exports.getDisplayStyleDataAttrs=gr;exports.getGracefulDegradationInfo=$l;exports.getLeakReports=Zc;exports.getLeakSummary=Jn;exports.getMemoryStats=Pe;exports.getMorePrivateMode=Rl;exports.getNiceAnimationClass=Ns;exports.getNiceThemePack=_d;exports.getNiceThemePackExtended=jd;exports.getPerformanceReport=Xn;exports.getProfilingStats=Vn;exports.getRecentTimings=_c;exports.getSlowRenders=Nt;exports.getTracelessBadgeInfo=zl;exports.getTransferables=cu;exports.glassAurora=Po;exports.groupBy=Dt;exports.groupByHierarchical=To;exports.hologramUI=ei;exports.hyggeScandinavian=Fo;exports.inkSumie=ui;exports.isAtLeastAsPrivate=De;exports.isDerivableColor=Nc;exports.isRecordValid=md;exports.isSafeUrl=Zi;exports.japaneseWashi=qo;exports.loadAndDecodeImage=Ht;exports.logicalProps=Ms;exports.matchesFilterCondition=wo;exports.matchesFilterGroup=Ft;exports.matchesShortcut=Us;exports.measureAsync=Kc;exports.measureSync=Uc;exports.memphis80s=di;exports.moroccanMosaic=Yo;exports.neonArcade=Lo;exports.nestingLevelColors=_r;exports.newspaperBroadsheet=$o;exports.niceReduxActions=hl;exports.niceReduxReducer=bl;exports.niceSelectors=Fc;exports.niceStaggerDelay=Es;exports.niceThemeBlue=zn;exports.niceThemeBootstrap=_n;exports.niceThemeDark=Pn;exports.niceThemeFluent=On;exports.niceThemeHighContrast=$n;exports.niceThemeLight=kt;exports.niceThemeMaterial=Hn;exports.normalizeSize=_i;exports.normalizeVariant=Oi;exports.obsidianEditorial=Ro;exports.parsePolicyFromHeader=_l;exports.pivot=kd;exports.preloadImages=Ni;exports.printPerformanceReport=At;exports.removeTheme=Hr;exports.removeVariantConfig=mr;exports.resolveControlStoragePermissions=Fl;exports.resolveCssColor=Dr;exports.resolveDisplayStyleConfig=xe;exports.resolveStatus=_t;exports.resolveStepsI18n=fo;exports.resolveTestId=bu;exports.resolveTracelessPolicy=Ll;exports.resolveTutorial=Al;exports.sanitizeHtml=Qi;exports.saveBaseline=qn;exports.selectOptimalSource=Ci;exports.serializeTheme=Sc;exports.setupReactDevToolsIntegration=qc;exports.shouldShowConsentBanner=po;exports.simulateKeyboard=Dc;exports.simulateType=Pc;exports.sortModelToOrderBy=dd;exports.sovietConstructivist=Qo;exports.startMark=Xe;exports.swissGrid=pi;exports.synthwave84=Ho;exports.takeMemorySnapshot=dl;exports.testId=Lc;exports.themeAbyss=ya;exports.themeAfricanEarth=xn;exports.themeAmber=Jr;exports.themeArctic=Aa;exports.themeAurora=ka;exports.themeAutumn=Ea;exports.themeBanking=$a;exports.themeBrazilianCarnival=vn;exports.themeCarbon=ma;exports.themeCharcoal=Xr;exports.themeCherryBlossom=fn;exports.themeChineseNewYear=bn;exports.themeChristmas=on;exports.themeCoffee=Ln;exports.themeCoolGray=Vr;exports.themeCoral=ca;exports.themeCosmos=pa;exports.themeCyan=ta;exports.themeCyberpunk=rn;exports.themeDesert=xa;exports.themeDracula=Ua;exports.themeEaster=ln;exports.themeEclipse=ua;exports.themeEducation=Wa;exports.themeEmerald=Yr;exports.themeEmeraldDark=ba;exports.themeEnhancedContrast=Cn;exports.themeEnterprise=Ba;exports.themeForest=Sa;exports.themeFuchsia=oa;exports.themeGlassmorphism=Nn;exports.themeGovernment=ja;exports.themeHalloween=sn;exports.themeHarvest=mn;exports.themeHealthcare=Ha;exports.themeHighContrastDark=wn;exports.themeIndianFestive=Sn;exports.themeIndigo=ea;exports.themeIvory=Gr;exports.themeJapaneseZen=pn;exports.themeLargeText=En;exports.themeLavender=Ca;exports.themeLegal=_a;exports.themeLime=ra;exports.themeMediterranean=hn;exports.themeMidnight=la;exports.themeMinimalist=Tn;exports.themeMonochrome=kn;exports.themeMonokai=qa;exports.themeMoroccan=gn;exports.themeNebula=ga;exports.themeNeon=an;exports.themeNeumorphismDark=Mn;exports.themeNeumorphismLight=An;exports.themeNord=Ka;exports.themeObsidian=da;exports.themeOcean=va;exports.themeOneDark=Ya;exports.themeOnyx=fa;exports.themeOrange=na;exports.themePastelCoral=za;exports.themePastelLavender=Fa;exports.themePastelLemon=Da;exports.themePastelMint=Ra;exports.themePastelPeach=La;exports.themePastelRose=Ta;exports.themePastelSage=Pa;exports.themePastelSky=Ia;exports.themePink=aa;exports.themeRealEstate=Va;exports.themeRetrowave=nn;exports.themeRose=qr;exports.themeRuby=sa;exports.themeScandinavian=yn;exports.themeSepia=en;exports.themeShadow=ha;exports.themeSilver=Ur;exports.themeSky=ia;exports.themeSlate=Br;exports.themeSoftDark=Rn;exports.themeSolarizedDark=Ga;exports.themeSolarizedLight=Xa;exports.themeSpring=Na;exports.themeStone=Wr;exports.themeSummerBeach=dn;exports.themeSunset=wa;exports.themeSynthwave=Ja;exports.themeTeal=Zr;exports.themeTechStartup=Oa;exports.themeTerminalGreen=Za;exports.themeToCssVars=He;exports.themeTropical=Ma;exports.themeValentine=cn;exports.themeVaporwave=Qa;exports.themeVintage=tn;exports.themeViolet=Qr;exports.themeWarmDark=In;exports.themeWarmGray=Kr;exports.themeWine=Fn;exports.themeWinterFrost=un;exports.themeZinc=jr;exports.triggerHaptic=Cr;exports.typewriterPress=ni;exports.useAICompletion=Xl;exports.useAccessibleClick=qs;exports.useAdaptiveVariant=Ss;exports.useBrandColors=ps;exports.useBreakpoint=Ce;exports.useChartSuggestion=Yl;exports.useChunkedProcessor=ru;exports.useClickOutside=us;exports.useCodeCompletion=Gl;exports.useCognitiveAccessibility=Zs;exports.useColorBlindMode=Fr;exports.useColorBlindModePersisted=cc;exports.useComponentDisplayClass=Ui;exports.useComponentDisplayStyle=Ki;exports.useComponentHelp=oo;exports.useContainerSize=bs;exports.useControlId=ls;exports.useControllableState=wu;exports.useDarkMode=ms;exports.useDebouncedValue=ds;exports.useDecodedImage=Mi;exports.useDeferredList=au;exports.useDeferredSearch=eu;exports.useDevice=yr;exports.useDisplayAnimation=Gi;exports.useDisplayDensity=Xi;exports.useDisplayModeEdit=Yi;exports.useEventCleanup=fu;exports.useFocusManagement=Qs;exports.useFocusTrap=fs;exports.useFormGeneration=Jl;exports.useGamepad=Mu;exports.useHaptic=zs;exports.useHoldRepeat=cs;exports.useImageFormats=xi;exports.useImagePreload=Ai;exports.useInputMode=is;exports.useIsTouchDevice=os;exports.useLazyImage=gu;exports.useLiveAnnouncement=Lr;exports.useLongPress=ss;exports.useMeasureEffect=Xc;exports.useMediaQuery=$e;exports.useMemoryMonitor=fl;exports.useMemoryMonitorPerf=pu;exports.useNaturalLanguageFilter=ql;exports.useNiceA11y=Os;exports.useNiceAI=de;exports.useNiceAccessMode=Ts;exports.useNiceCollapse=Cs;exports.useNiceDataSource=Td;exports.useNiceDisplayStyle=Vi;exports.useNiceField=Id;exports.useNiceHelp=no;exports.useNiceLookupSource=Rd;exports.useNiceRTL=As;exports.useNiceRecord=Io;exports.useNiceTheme=Mc;exports.useNiceTransition=ks;exports.useNiceTutorials=uo;exports.useNiceTutorialsEnabled=Nl;exports.useOptimistic=nu;exports.useOrientation=xs;exports.usePan=Fs;exports.usePinch=Ls;exports.useProgressiveImage=Ei;exports.usePullToRefresh=kr;exports.useRenderCount=Vc;exports.useResolvedDisplayStyle=ke;exports.useResponsiveValue=hs;exports.useRestoreFocus=Ws;exports.useRouteAnnouncement=Js;exports.useRovingTabIndex=js;exports.useSafeAbortController=Qn;exports.useSafeAreaInsets=ws;exports.useSafeEventListener=nl;exports.useSafeFetch=ol;exports.useSafeInterval=al;exports.useSafeState=tl;exports.useSafeSubscription=il;exports.useSafeTimeout=rl;exports.useSafeWebSocket=sl;exports.useSharedImageObserver=Ii;exports.useShowAt=vs;exports.useSpatialFocusable=$i;exports.useSpatialNav=Fu;exports.useSpatialNavOptional=Lu;exports.useSubmitOnEnter=Gs;exports.useSwipe=Rs;exports.useTextImprovement=Ql;exports.useThemeIsDark=Xd;exports.useThemeVariants=hi;exports.useTransitionState=tu;exports.useUnmountLog=ll;exports.useVirtualGrid=Qd;exports.useVirtualKeyboard=Hs;exports.useVirtualScroll=vi;exports.useVoiceControl=Ys;exports.useWhyDidYouRender=Un;exports.useWindowedList=Zd;exports.useWorker=ou;exports.useWorkerPool=iu;exports.validateData=Nd;exports.validateViewDocument=qd;exports.vhsTracking=ai;exports.vogueDidone=ii;exports.warnControlledClash=Fi;exports.watercolorWash=li;exports.withCaching=pd;exports.withCalculatedColumns=Cd;exports.withCrossTabSync=Fd;exports.withCursorPagination=gd;exports.withLeakTracking=cl;exports.withOptimisticUpdates=vd;exports.withPolling=xd;exports.withWhyDidYouRender=Wc;exports.y2kAqua=oi;exports.zenMinimal=_o;exports.zinePunk=ci;
153
+ </svg>`;return`data:image/svg+xml,${encodeURIComponent(i)}`}const ku={checkFormatSupport:Oe,useImageFormats:ki,generateSrcset:Ci,generateSizes:Ei,selectOptimalSource:Ni,useProgressiveImage:Ai,preloadImages:Mi,useImagePreload:Ti,loadAndDecodeImage:Ht,useDecodedImage:Ii,createImageObserver:Ri,useSharedImageObserver:Li,generateColorPlaceholder:Fi,generateGradientPlaceholder:Di};function Cu(e){return e["data-testid"]??e.testId}function _t(e){return e.error||e.status==="error"?"error":e.warning||e.status==="warning"?"warning":e.success||e.status==="success"?"success":e.status??"idle"}function Eu(e){const t=_t(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 rr=new Set;function Pi(e,t,r){process.env.NODE_ENV!=="production"&&t!==void 0&&r!==void 0&&!rr.has(e)&&(rr.add(e),console.warn(`[Nice2Dev] <${e}> received both \`value\` and \`defaultValue\`. Use one or the other (controlled XOR uncontrolled).`))}const ar=new Set;function zi(e,t){process.env.NODE_ENV!=="production"&&(ar.has(e)||(ar.add(e),t()))}function $i(e){const{componentName:t,prop:r,replacement:a,removeIn:n,reason:o}=e;zi(`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 Nu(e){const{symbol:t,replacement:r,removeIn:a,reason:n}=e;zi(`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 Au(e){return e.value!==void 0&&e.newValue===void 0&&$i({componentName:e.componentName,prop:e.prop,replacement:e.replacement,removeIn:e.removeIn}),e.newValue??e.value}const nr=new Set;function Mu(e){const{value:t,defaultValue:r,fallbackValue:a,onChange:n,componentName:o="Component"}=e,s=t!==void 0,[i,c]=l.useState(()=>r!==void 0?r:a),d=l.useRef(s);process.env.NODE_ENV!=="production"&&(d.current!==s&&!nr.has(o)&&(nr.add(o),console.warn(`[Nice2Dev] <${o}> switched between controlled and uncontrolled. A component should not change between the two over its lifetime.`)),d.current=s,Pi(o,t,r));const u=s?t:i,f=l.useRef(u);f.current=u;const h=l.useCallback((b,p)=>{const m=typeof b=="function"?b(f.current):b;f.current=m,s||c(m),p===void 0?n==null||n(m):n==null||n(m,p)},[s,n]);return[u,h,s]}const Tu={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 Iu(e){const t=_t(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:[Tu[t],e.className].filter(Boolean).join(" "),children:r}):null}const Hi={0:"A",1:"B",2:"X",3:"Y",4:"LB",5:"RB",6:"LT",7:"RT",8:"Back",9:"Start",10:"LS",11:"RS",12:"DpadUp",13:"DpadDown",14:"DpadLeft",15:"DpadRight",16:"Home"},Ru={0:"LeftX",1:"LeftY",2:"RightX",3:"RightY"},Lu={Cross:"A",Circle:"B",Square:"X",Triangle:"Y",L1:"LB",R1:"RB",L2:"LT",R2:"RT",Share:"Back",Options:"Start",L3:"LS",R3:"RS",PS:"Home"},Ot=Object.values(Hi);function Fu(e,t){if(e.connected!==t.connected||e.id!==t.id||e.leftTrigger!==t.leftTrigger||e.rightTrigger!==t.rightTrigger)return!1;for(const r of Ot)if(e.buttons[r]!==t.buttons[r])return!1;return Object.keys(e.axes).every(r=>e.axes[r]===t.axes[r])}function Du(e={}){const{index:t=0,deadzone:r=.15,pollRate:a=16,actions:n={},enabled:o=!0,onButtonDown:s,onButtonUp:i}=e,[c,d]=l.useState({connected:!1,id:"",buttons:Fe(),axes:{LeftX:0,LeftY:0,RightX:0,RightY:0},leftTrigger:0,rightTrigger:0,vibrate:()=>{}}),u=l.useRef(Fe()),f=l.useRef(new Map),h=l.useRef(n);h.current=n;const b=l.useRef({onButtonDown:s,onButtonUp:i});b.current={onButtonDown:s,onButtonUp:i};const p=l.useRef({left:0,right:0}),m=l.useCallback((S,y=.5,v=.5)=>{typeof window<"u"&&N.getInputEngine().rumble(t,S,y,v)},[t]),g=l.useCallback(S=>{if(Math.abs(S)<r)return 0;const y=S>0?1:-1,v=(Math.abs(S)-r)/(1-r);return y*v},[r]);return l.useEffect(()=>{if(!o||typeof window>"u")return;const S=N.getInputEngine();let y=-1/0;const v=(C,A)=>{var ue,ne,oe,ge,Re,Le,ye,Bt;if(A-y<a)return;y=A;const M=C.find(B=>B.index===t);if(!M)return;const I=Fe();for(let B=0;B<M.buttons.length;B++){const z=Hi[B];z&&(I[z]=M.buttons[B].pressed)}const $={LeftX:0,LeftY:0,RightX:0,RightY:0};for(let B=0;B<Math.min(M.axes.length,4);B++){const z=Ru[B];z&&($[z]=g(M.axes[B]))}const T=((ue=M.buttons[6])==null?void 0:ue.value)??0,D=((ne=M.buttons[7])==null?void 0:ne.value)??0,{onButtonDown:F,onButtonUp:P}=b.current;if(F||P)for(const B of Ot)I[B]&&!u.current[B]?F==null||F(B):!I[B]&&u.current[B]&&(P==null||P(B));const L=Date.now(),O=h.current;for(const[B,z]of Object.entries(O)){if(z.button||z.buttons){const X=z.buttons||[z.button],fe=X.every(Q=>I[Q]),he=X.every(Q=>u.current[Q]);if(fe&&!he)(oe=z.onPress)==null||oe.call(z),f.current.set(B,{startTime:L,lastRepeat:L});else if(!fe&&he)(ge=z.onRelease)==null||ge.call(z),f.current.delete(B);else if(fe&&((Re=z.onHold)==null||Re.call(z),z.repeatDelay!==void 0&&z.repeatRate!==void 0)){const Q=f.current.get(B);Q&&L-Q.startTime>z.repeatDelay&&L-Q.lastRepeat>=z.repeatRate&&((Le=z.onPress)==null||Le.call(z),Q.lastRepeat=L)}}if(z.axis&&z.onAxisChange){const X=$[z.axis];z.axisDirection?z.axisDirection==="positive"&&X>0?z.onAxisChange(X):z.axisDirection==="negative"&&X<0&&z.onAxisChange(Math.abs(X)):z.onAxisChange(X)}if(z.trigger){const X=z.trigger==="LT"?T:D,fe=z.trigger==="LT"?p.current.left>.5:p.current.right>.5,he=X>.5;he&&!fe?(ye=z.onPress)==null||ye.call(z):!he&&fe&&((Bt=z.onRelease)==null||Bt.call(z))}}u.current=I,p.current={left:T,right:D};const V={connected:!0,id:M.id,buttons:I,axes:$,leftTrigger:T,rightTrigger:D,vibrate:m};d(B=>Fu(B,V)&&B.vibrate===m?B:V)},k=()=>{const C=S.getState().pads.find(A=>A.index===t);C||(u.current=Fe()),d(A=>A.connected===!!C&&A.id===((C==null?void 0:C.id)??"")?A:{...A,connected:!!C,id:(C==null?void 0:C.id)??"",vibrate:m})},E=S.subscribeGamepadFrames(v),w=S.subscribe(k);return k(),()=>{E(),w()}},[o,t,a,g,m]),c}function Fe(){return{A:!1,B:!1,X:!1,Y:!1,LB:!1,RB:!1,LT:!1,RT:!1,Back:!1,Start:!1,LS:!1,RS:!1,DpadUp:!1,DpadDown:!1,DpadLeft:!1,DpadRight:!1,Home:!1}}function or(e){let t=!0;return r=>{r>.8&&t?(t=!1,e()):r<.3&&(t=!0)}}function Pu(e){const t={};return e.onNavigateUp&&(t.navUp={button:"DpadUp",onPress:e.onNavigateUp,repeatDelay:400,repeatRate:100},t.navUpStick={axis:"LeftY",axisDirection:"negative",onAxisChange:or(()=>{var r;return(r=e.onNavigateUp)==null?void 0:r.call(e)})}),e.onNavigateDown&&(t.navDown={button:"DpadDown",onPress:e.onNavigateDown,repeatDelay:400,repeatRate:100},t.navDownStick={axis:"LeftY",axisDirection:"positive",onAxisChange:or(()=>{var r;return(r=e.onNavigateDown)==null?void 0:r.call(e)})}),e.onNavigateLeft&&(t.navLeft={button:"DpadLeft",onPress:e.onNavigateLeft,repeatDelay:400,repeatRate:100}),e.onNavigateRight&&(t.navRight={button:"DpadRight",onPress:e.onNavigateRight,repeatDelay:400,repeatRate:100}),e.onConfirm&&(t.confirm={button:"A",onPress:e.onConfirm}),e.onCancel&&(t.cancel={button:"B",onPress:e.onCancel}),e.onTabNext&&(t.tabNext={button:"RB",onPress:e.onTabNext}),e.onTabPrev&&(t.tabPrev={button:"LB",onPress:e.onTabPrev}),e.onMenu&&(t.menu={button:"Start",onPress:e.onMenu}),t}const Ze=l.createContext(null);function ir(e){if(!e)return null;const t=e.getBoundingClientRect();return t.width===0&&t.height===0?null:{x:t.left+t.width/2,y:t.top+t.height/2}}const zu={up:[0,-1],down:[0,1],left:[-1,0],right:[1,0]},$u=({keyboard:e=!0,gamepad:t=!0,children:r})=>{const[a,n]=l.useState([]),[o,s]=l.useState(null),i=l.useRef([]),c=l.useRef(null),d=l.useRef([]),u=l.useRef(0);l.useEffect(()=>{i.current=a},[a]),l.useEffect(()=>{c.current=o},[o]);const f=l.useCallback(()=>{u.current+=1},[]),h=l.useCallback(()=>{u.current=Math.max(0,u.current-1)},[]),b=l.useCallback((E,w)=>{d.current=[...d.current,{prefix:E,onDismiss:w}]},[]),p=l.useCallback(()=>{var C;const E=d.current;if(E.length===0)return;const w=E[E.length-1];d.current=E.slice(0,-1),(C=w.onDismiss)==null||C.call(w)},[]),m=l.useCallback(E=>{n(w=>w.some(C=>C.id===E.id)?w:[...w,E])},[]),g=l.useCallback(E=>{n(w=>{var A;const C=w.filter(M=>M.id!==E);if(c.current===E){const M=((A=C[0])==null?void 0:A.id)??null;s(M),c.current=M}return C})},[]),S=l.useCallback(E=>{s(E),c.current=E},[]),y=l.useCallback((E,w)=>{var L,O;if(u.current>0)return;const C=i.current.filter(V=>!V.disabled);if(C.length===0)return;const A=c.current,M=A?C.find(V=>V.id===A):void 0;if(!M){const V=C[0];S(V.id),(L=V.ref.current)==null||L.focus();return}const I=d.current,$=I.length>0?I[I.length-1]:void 0,T=C.filter(V=>V.id!==A&&(!$||V.id.startsWith($.prefix))),D=ir(M.ref.current);if(!D||T.length===0)return;let F=null,P=1/0;for(const V of T){const ue=ir(V.ref.current);if(!ue)continue;const ne=ue.x-D.x,oe=ue.y-D.y,ge=E*ne+w*oe;if(ge<=0)continue;const Re=ge,Le=Math.abs(E*oe-w*ne),ye=Math.sqrt(ne*ne+oe*oe)+Le*2-Re*.001;ye<P&&(P=ye,F=V)}F&&(S(F.id),(O=F.ref.current)==null||O.focus())},[S]),v=l.useCallback(E=>{var A;if(u.current>0)return;const w=E??c.current;if(!w)return;const C=i.current.find(M=>M.id===w);C&&(C.onActivate?C.onActivate():(A=C.ref.current)==null||A.click())},[]);N.useIntent(["navigate","activate","back"],E=>{if(u.current>0)return!1;const w=E.source==="keyboard";if(w&&!e||!w&&!t)return!1;if(E.intent==="navigate"){if(i.current.length===0||!E.direction)return!1;const[C,A]=zu[E.direction];return y(C,A),!0}return E.intent==="activate"?c.current?(v(),!0):!1:d.current.length===0?!1:(p(),!0)});const k=l.useMemo(()=>({register:m,unregister:g,moveFocus:y,activate:v,setActive:S,activeId:o,focusables:a,pushFocusTrap:b,popFocusTrap:p,pauseNavigation:f,resumeNavigation:h}),[m,g,y,v,S,o,a,b,p,f,h]);return x.jsx(Ze.Provider,{value:k,children:r})};function Hu(){return l.useContext(Ze)}function _u(){const e=l.useContext(Ze);if(!e)throw new Error("useSpatialNav must be used inside a NiceSpatialNavProvider");return e}function _i(e,t){const r=l.useContext(Ze),{id:a,onActivate:n,disabled:o}=t,s=l.useRef(n);s.current=n;const i=r==null?void 0:r.register,c=r==null?void 0:r.unregister,d=r==null?void 0:r.setActive;l.useEffect(()=>{if(!(!i||!c||o))return i({id:a,ref:e,onActivate:()=>{var f;return(f=s.current)==null?void 0:f.call(s)},disabled:o}),()=>c(a)},[i,c,a,o,e]),l.useEffect(()=>{const f=e.current;if(!f||!d||o)return;const h=()=>d(a);return f.addEventListener("focus",h),()=>f.removeEventListener("focus",h)},[d,a,o,e]);const u=(r==null?void 0:r.activeId)===a;return l.useEffect(()=>{const f=e.current;f&&(u?f.dataset.active="true":delete f.dataset.active)},[u,e]),{active:u}}const Ou=({focusId:e,onActivate:t,disabled:r,as:a="div",className:n,style:o,children:s,...i})=>{const c=l.useRef(null),{active:d}=_i(c,{id:e,onActivate:t,disabled:r});return x.jsx(a,{ref:c,tabIndex:r?-1:0,className:`nice-focusable${d?" nice-focusable--active":""}${n?` ${n}`:""}`,style:o,onClick:t,...i,children:s})};exports.IndexedDBAdapter=N.IndexedDBAdapter;exports.LocalStorageAdapter=N.LocalStorageAdapter;exports.NICE_BUILTIN_ICONS=N.NICE_BUILTIN_ICONS;exports.NICE_DEFAULT_GAMEPAD_BINDINGS=N.NICE_DEFAULT_GAMEPAD_BINDINGS;exports.NICE_DEFAULT_KEYBOARD_BINDINGS=N.NICE_DEFAULT_KEYBOARD_BINDINGS;exports.NICE_ENGAGE_EVENT=N.NICE_ENGAGE_EVENT;exports.NICE_GAMEPAD_BUTTONS=N.NICE_GAMEPAD_BUTTONS;exports.NICE_INPUT_DEFAULTS=N.NICE_INPUT_DEFAULTS;exports.NICE_INTENTS=N.NICE_INTENTS;exports.NICE_INTENT_EVENT=N.NICE_INTENT_EVENT;exports.NICE_KEYBOARD_LAYOUTS=N.NICE_KEYBOARD_LAYOUTS;exports.NICE_KEYBOARD_NUMERIC=N.NICE_KEYBOARD_NUMERIC;exports.NICE_KEYBOARD_NUMPAD=N.NICE_KEYBOARD_NUMPAD;exports.NICE_KEYBOARD_PHONE=N.NICE_KEYBOARD_PHONE;exports.NICE_KEYBOARD_PIN=N.NICE_KEYBOARD_PIN;exports.NICE_KEY_BACKSPACE=N.NICE_KEY_BACKSPACE;exports.NICE_KEY_CAPS=N.NICE_KEY_CAPS;exports.NICE_KEY_ENTER=N.NICE_KEY_ENTER;exports.NICE_KEY_SHIFT=N.NICE_KEY_SHIFT;exports.NICE_KEY_SPACE=N.NICE_KEY_SPACE;exports.NICE_KEY_TAB=N.NICE_KEY_TAB;exports.NICE_ROVING_ITEMS=N.NICE_ROVING_ITEMS;exports.NiceButtonPrompt=N.NiceButtonPrompt;exports.NiceControlHint=N.NiceControlHint;exports.NiceFocusScope=N.NiceFocusScope;exports.NiceGamepadPoller=N.NiceGamepadPoller;exports.NiceIcon=N.NiceIcon;exports.NiceIconProvider=N.NiceIconProvider;exports.NiceInputEngine=N.NiceInputEngine;exports.NiceInputHintBar=N.NiceInputHintBar;exports.NiceInputProvider=N.NiceInputProvider;exports.NiceKeyCap=N.NiceKeyCap;exports.NicePreferencesPanel=N.NicePreferencesPanel;exports.NiceUserPreferencesProvider=N.NiceUserPreferencesProvider;exports.RestAPISyncAdapter=N.RestAPISyncAdapter;exports.applyFocusScope=N.applyFocusScope;exports.buildKeyboardRows=N.buildKeyboardRows;exports.chordMatches=N.chordMatches;exports.chordToString=N.chordToString;exports.clickElement=N.clickElement;exports.clickOnActivationKey=N.clickOnActivationKey;exports.confirmButtonFor=N.confirmButtonFor;exports.createTabEscape=N.createTabEscape;exports.deleteBeforeCaret=N.deleteBeforeCaret;exports.detectGamepadFamily=N.detectGamepadFamily;exports.engageKindOf=N.engageKindOf;exports.findFocusTarget=N.findFocusTarget;exports.findRegionTarget=N.findRegionTarget;exports.focusCandidates=N.focusCandidates;exports.gamepadButtonLabel=N.gamepadButtonLabel;exports.gamepadGlyphName=N.gamepadGlyphName;exports.gamepadIntentMap=N.gamepadIntentMap;exports.getInputEngine=N.getInputEngine;exports.hintsForFocus=N.hintsForFocus;exports.insertAtCaret=N.insertAtCaret;exports.intentFromKey=N.intentFromKey;exports.isClickActivatable=N.isClickActivatable;exports.isEngaged=N.isEngaged;exports.isFocusCandidate=N.isFocusCandidate;exports.isMacPlatform=N.isMacPlatform;exports.isRtlKeyboardLanguage=N.isRtlKeyboardLanguage;exports.isTextInput=N.isTextInput;exports.keyFace=N.keyFace;exports.moveTextCaret=N.moveTextCaret;exports.normalizeKey=N.normalizeKey;exports.parseKeyChord=N.parseKeyChord;exports.pickInDirection=N.pickInDirection;exports.readScope=N.readScope;exports.rectOf=N.rectOf;exports.remoteIntent=N.remoteIntent;exports.resolveGamepadBindings=N.resolveGamepadBindings;exports.resolveKeyboardBindings=N.resolveKeyboardBindings;exports.restoresOnCancel=N.restoresOnCancel;exports.setFieldText=N.setFieldText;exports.setInputHints=N.setInputHints;exports.spatialScore=N.spatialScore;exports.splitChord=N.splitChord;exports.toAriaKeyShortcuts=N.toAriaKeyShortcuts;exports.toGamepadButton=N.toGamepadButton;exports.triggerNiceAction=N.triggerNiceAction;exports.useChartPreferences=N.useChartPreferences;exports.useConnectedGamepads=N.useConnectedGamepads;exports.useControlPreferences=N.useControlPreferences;exports.useEngage=N.useEngage;exports.useFocusScope=N.useFocusScope;exports.useFocusedElement=N.useFocusedElement;exports.useGamepadFamily=N.useGamepadFamily;exports.useGridFocus=N.useGridFocus;exports.useGridPreferences=N.useGridPreferences;exports.useHintsVisible=N.useHintsVisible;exports.useInputEngine=N.useInputEngine;exports.useInputHints=N.useInputHints;exports.useInputMethod=N.useInputMethod;exports.useInputPreferences=N.useInputPreferences;exports.useInputState=N.useInputState;exports.useIntent=N.useIntent;exports.useMenuButton=N.useMenuButton;exports.useNiceAction=N.useNiceAction;exports.useNiceActions=N.useNiceActions;exports.useNiceIcon=N.useNiceIcon;exports.useOverlayFocus=N.useOverlayFocus;exports.useRovingFocus=N.useRovingFocus;exports.useTreeFocus=N.useTreeFocus;exports.useUserPreferences=N.useUserPreferences;exports.useUserPreferencesOptional=N.useUserPreferencesOptional;Object.defineProperty(exports,"NICE_SUPPORTED_LANGS",{enumerable:!0,get:()=>j.NICE_SUPPORTED_LANGS});Object.defineProperty(exports,"NiceI18nLazyProvider",{enumerable:!0,get:()=>j.NiceI18nLazyProvider});Object.defineProperty(exports,"NiceI18nProvider",{enumerable:!0,get:()=>j.NiceI18nProvider});Object.defineProperty(exports,"createICUTranslator",{enumerable:!0,get:()=>j.createICUTranslator});Object.defineProperty(exports,"formatICU",{enumerable:!0,get:()=>j.formatICU});Object.defineProperty(exports,"getLoadedNiceDictionary",{enumerable:!0,get:()=>j.getLoadedNiceDictionary});Object.defineProperty(exports,"loadNiceDictionary",{enumerable:!0,get:()=>j.loadNiceDictionary});Object.defineProperty(exports,"useNiceTranslation",{enumerable:!0,get:()=>j.useNiceTranslation});exports.ANIMATION_VALUES=Be;exports.BatchOperations=Dd;exports.COMMON_SHORTCUTS=Ys;exports.CheckMark=rs;exports.ChevronMark=ns;exports.CloseMark=is;exports.ColumnFormulas=Rd;exports.DEFAULT_TRACELESS_POLICY=zl;exports.DEFAULT_VARIANT_CONFIG=Y;exports.DENSITY_VALUES=we;exports.DisplayModeView=Zi;exports.DotMark=os;exports.GAMEPAD_BUTTONS=Ot;exports.ImageOptimization=ku;exports.LeakDetectorStatus=Sl;exports.NICE_BREAKPOINTS=me;exports.NICE_COLOR_BLIND_MODES=dc;exports.NICE_DISPLAY_STYLES=Ki;exports.NICE_DISPLAY_STYLE_INFO=Ji;exports.NICE_THEME_GALLERY=zn;exports.NICE_THEME_PACKS=zt;exports.NICE_THEME_PACKS_EXTENDED=$t;exports.NICE_THEME_PACK_FONT_LINKS=Wd;exports.NICE_THEME_PACK_FONT_LINKS_EXTENDED=Xd;exports.NICE_THEME_PACK_LIST=Ko;exports.NICE_THEME_PACK_LIST_EXTENDED=hi;exports.NICE_THEME_PRESETS=lt;exports.NICE_VIEW_COMPONENT_TYPES=eu;exports.NiceA11yProvider=Tr;exports.NiceAIProvider=Ql;exports.NiceAccessControl=Cr;exports.NiceDataCache=ut;exports.NiceDisplayStyleContext=We;exports.NiceFieldStatus=Iu;exports.NiceFocusable=Ou;exports.NiceHelpIcon=fo;exports.NiceHelpProvider=oo;exports.NiceInlineHelp=lo;exports.NiceKeyboardHint=Fr;exports.NiceProfiler=Gc;exports.NicePullToRefresh=Bs;exports.NiceQuickHelp=uo;exports.NiceRTLProvider=wr;exports.NiceRequestDeduplicator=Mo;exports.NiceSkipLink=Lr;exports.NiceSpatialNavProvider=$u;exports.NiceStateIO=Bd;exports.NiceSwipeableListItem=Os;exports.NiceTestWrapper=Wn;exports.NiceThemeContext=xt;exports.NiceThemeProvider=Ct;exports.NiceThemeVariantConfigurator=Jd;exports.NiceThemeVariantProvider=Yd;exports.NiceTouchTarget=Ws;exports.NiceTutorialButton=Dl;exports.NiceTutorialsProvider=Rl;exports.NiceVisuallyHidden=Rr;exports.PRIVACY_LEVEL_ORDER=pe;exports.PS_BUTTON_ALIASES=Lu;exports.ProfilerOverlay=el;exports.RADIUS_VALUES=ve;exports.RefreshMark=as;exports.SHADOW_DARK_MODE_VALUES=sr;exports.SHADOW_VALUES=ze;exports.StorageAdapter=bo;exports.TRACELESS_MODE_PRESETS=go;exports.TRACELESS_POLICY_HEADER=Vl;exports.VARIANT_PRESETS=je;exports.ValidationRules=Fd;exports.accessModeAttrs=zs;exports.aggregate=te;exports.analog70s=ni;exports.applyColorBlindMode=St;exports.applyTheme=xc;exports.applyVariantConfig=ht;exports.applyVariantsToTheme=Vi;exports.arcticCrystal=qo;exports.artDecoGatsby=Zo;exports.auditStorageCompliance=Jl;exports.auditWCAG22AAA=cc;exports.autumnFoliage=Yo;exports.bankVault=Vo;exports.bauhaus=Wo;exports.blackTieGala=gi;exports.blueprint=ti;exports.brutalistRaw=zo;exports.buildAriaDescribedBy=Ir;exports.buildFieldA11y=Eu;exports.buildFormFieldAria=Xs;exports.calculateDataDiff=To;exports.candyPop=Ho;exports.checkAriaCompliance=Wc;exports.checkContrastAAA=sc;exports.checkFormatSupport=Oe;exports.checkRegression=Qn;exports.claymorphism=jo;exports.clearAllClientStorage=Yl;exports.clearLeakReports=il;exports.clearProfilingData=Et;exports.comicHalftone=li;exports.configureLeakDetector=nl;exports.configureProfiler=Kn;exports.createArrayDataSource=sd;exports.createColorBlindController=gc;exports.createCustomDataSource=pd;exports.createEventCleanup=Su;exports.createGraphQLDataSource=md;exports.createGraphQLSubscriptionSource=El;exports.createId=yc;exports.createImageObserver=Ri;exports.createIndexedDBDataSource=ft;exports.createInfiniteScroll=kd;exports.createInlineWorker=mu;exports.createLRUCache=yu;exports.createMockDataSource=jc;exports.createNavigationActions=Pu;exports.createNicePluginSystem=Sc;exports.createNiceReduxMiddleware=wl;exports.createODataDataSource=fd;exports.createObjectPool=wu;exports.createOfflineFirstDataSource=Hd;exports.createPermissiveInstanceCeiling=ql;exports.createPolicyHeader=Ul;exports.createReactQueryAdapter=vl;exports.createRestDataSource=xo;exports.createRestrictiveInstanceCeiling=Gl;exports.createSSEDataSource=Md;exports.createSignalRDataSource=Ed;exports.createStorageAdapter=Xl;exports.createURLStateManager=Od;exports.createUserPreferencesStore=jd;exports.createWeakCache=gu;exports.createWeakRefCache=hu;exports.createWebSocketDataSource=Cd;exports.createZustandAdapter=xl;exports.deepSea=ai;exports.defaultValidationMessage=Eo;exports.deprecateProp=$i;exports.deprecateSymbol=Nu;exports.deriveMode=Lt;exports.deserializeTheme=Nc;exports.desertDune=Go;exports.dieterRams=pi;exports.endMark=Ge;exports.evaluateCondition=ru;exports.evaluateValidation=Ao;exports.evaluateValidationRule=No;exports.filterGroupToWhere=gd;exports.filterNiceThemePacksByTag=Ud;exports.filterNiceThemePacksExtendedByTag=qd;exports.forceGC=hl;exports.forestCanopy=Xo;exports.formatShortcut=Js;exports.forwardDeprecated=Au;exports.generateBadgeStyles=cr;exports.generateButtonStyles=mt;exports.generateCardStyles=gt;exports.generateColorPlaceholder=Fi;exports.generateColumnsFromSchema=Al;exports.generateFillStyles=Wi;exports.generateFormFieldsFromSchema=Ml;exports.generateFromOpenAPI=Nl;exports.generateGradientPlaceholder=Di;exports.generateInputStyles=pt;exports.generatePaletteFromColor=bs;exports.generateSizes=Ei;exports.generateSrcset=Ci;exports.generateTabStyles=lr;exports.generateTableStyles=fr;exports.generateToggleStyles=dr;exports.generateTooltipStyles=ur;exports.generateTracelessComplianceReport=Ol;exports.generateVariantCSS=yt;exports.getComponentStats=Xn;exports.getComponentStyleFromConfig=pr;exports.getComputedTheme=Cc;exports.getDisplayStyleDataAttrs=gr;exports.getGracefulDegradationInfo=Wl;exports.getLeakReports=ol;exports.getLeakSummary=Zn;exports.getMemoryStats=Pe;exports.getMorePrivateMode=$l;exports.getNiceAnimationClass=Ls;exports.getNiceThemePack=Kd;exports.getNiceThemePackExtended=Gd;exports.getPerformanceReport=qn;exports.getProfilingStats=Un;exports.getRecentTimings=Kc;exports.getScrollParent=hr;exports.getSlowRenders=Nt;exports.getTracelessBadgeInfo=jl;exports.getTransferables=pu;exports.glassAurora=$o;exports.groupBy=Dt;exports.groupByHierarchical=Ro;exports.hologramUI=ri;exports.hyggeScandinavian=Po;exports.inkSumie=mi;exports.isAtLeastAsPrivate=De;exports.isDerivableColor=Lc;exports.isRecordValid=Sd;exports.isSafeUrl=ts;exports.japaneseWashi=Jo;exports.loadAndDecodeImage=Ht;exports.logicalProps=Ds;exports.matchesFilterCondition=Co;exports.matchesFilterGroup=Ft;exports.matchesShortcut=Qs;exports.measureAsync=Jc;exports.measureSync=Qc;exports.memphis80s=fi;exports.moroccanMosaic=Qo;exports.neonArcade=Do;exports.nestingLevelColors=Br;exports.newspaperBroadsheet=_o;exports.niceReduxActions=kl;exports.niceReduxReducer=Cl;exports.niceSelectors=_c;exports.niceStaggerDelay=Rs;exports.niceThemeBlue=Hn;exports.niceThemeBootstrap=Bn;exports.niceThemeDark=$n;exports.niceThemeFluent=jn;exports.niceThemeHighContrast=_n;exports.niceThemeLight=kt;exports.niceThemeMaterial=On;exports.normalizeSize=Bi;exports.normalizeVariant=ji;exports.obsidianEditorial=Fo;exports.parsePolicyFromHeader=Kl;exports.pivot=Td;exports.preloadImages=Mi;exports.printPerformanceReport=At;exports.removeTheme=Or;exports.removeVariantConfig=mr;exports.resolveControlStoragePermissions=_l;exports.resolveCssColor=zr;exports.resolveDisplayStyleConfig=xe;exports.resolveScrollContainer=Ns;exports.resolveStatus=_t;exports.resolveStepsI18n=po;exports.resolveTestId=Cu;exports.resolveTracelessPolicy=Hl;exports.resolveTutorial=Fl;exports.sanitizeHtml=es;exports.saveBaseline=Jn;exports.scrollTopFor=Ms;exports.scrollTopOf=As;exports.selectOptimalSource=Ni;exports.serializeTheme=Ec;exports.setupReactDevToolsIntegration=tl;exports.shouldShowConsentBanner=yo;exports.simulateKeyboard=Oc;exports.simulateType=Bc;exports.sortModelToOrderBy=yd;exports.sovietConstructivist=ei;exports.startMark=Xe;exports.swissGrid=yi;exports.synthwave84=Oo;exports.takeMemorySnapshot=yl;exports.testId=Hc;exports.themeAbyss=ba;exports.themeAfricanEarth=kn;exports.themeAmber=Zr;exports.themeArctic=Ta;exports.themeAurora=Ea;exports.themeAutumn=Aa;exports.themeBanking=_a;exports.themeBrazilianCarnival=wn;exports.themeCarbon=ga;exports.themeCharcoal=qr;exports.themeCherryBlossom=pn;exports.themeChineseNewYear=vn;exports.themeChristmas=cn;exports.themeCoffee=Dn;exports.themeCoolGray=Ur;exports.themeCoral=da;exports.themeCosmos=ya;exports.themeCyan=aa;exports.themeCyberpunk=nn;exports.themeDesert=ka;exports.themeDracula=Ga;exports.themeEaster=un;exports.themeEclipse=ma;exports.themeEducation=Ka;exports.themeEmerald=Qr;exports.themeEmeraldDark=va;exports.themeEnhancedContrast=Nn;exports.themeEnterprise=Wa;exports.themeForest=xa;exports.themeFuchsia=sa;exports.themeGlassmorphism=Mn;exports.themeGovernment=Va;exports.themeHalloween=ln;exports.themeHarvest=gn;exports.themeHealthcare=Oa;exports.themeHighContrastDark=Cn;exports.themeIndianFestive=xn;exports.themeIndigo=ra;exports.themeIvory=Yr;exports.themeJapaneseZen=yn;exports.themeLargeText=An;exports.themeLavender=Na;exports.themeLegal=Ba;exports.themeLime=na;exports.themeMediterranean=Sn;exports.themeMidnight=ua;exports.themeMinimalist=Rn;exports.themeMonochrome=En;exports.themeMonokai=Ja;exports.themeMoroccan=hn;exports.themeNebula=ha;exports.themeNeon=on;exports.themeNeumorphismDark=In;exports.themeNeumorphismLight=Tn;exports.themeNord=Xa;exports.themeObsidian=fa;exports.themeOcean=wa;exports.themeOneDark=Qa;exports.themeOnyx=pa;exports.themeOrange=ia;exports.themePastelCoral=Ha;exports.themePastelLavender=Pa;exports.themePastelLemon=za;exports.themePastelMint=Fa;exports.themePastelPeach=Da;exports.themePastelRose=Ra;exports.themePastelSage=$a;exports.themePastelSky=La;exports.themePink=oa;exports.themeRealEstate=Ua;exports.themeRetrowave=sn;exports.themeRose=Jr;exports.themeRuby=la;exports.themeScandinavian=bn;exports.themeSepia=rn;exports.themeShadow=Sa;exports.themeSilver=Gr;exports.themeSky=ca;exports.themeSlate=Wr;exports.themeSoftDark=Fn;exports.themeSolarizedDark=Ya;exports.themeSolarizedLight=qa;exports.themeSpring=Ma;exports.themeStone=Kr;exports.themeSummerBeach=fn;exports.themeSunset=Ca;exports.themeSynthwave=Za;exports.themeTeal=ta;exports.themeTechStartup=ja;exports.themeTerminalGreen=tn;exports.themeToCssVars=He;exports.themeTropical=Ia;exports.themeValentine=dn;exports.themeVaporwave=en;exports.themeVintage=an;exports.themeViolet=ea;exports.themeWarmDark=Ln;exports.themeWarmGray=Xr;exports.themeWine=Pn;exports.themeWinterFrost=mn;exports.themeZinc=Vr;exports.triggerHaptic=Nr;exports.typewriterPress=ii;exports.useAICompletion=Zl;exports.useAccessibleClick=tc;exports.useAdaptiveVariant=xs;exports.useBrandColors=ys;exports.useBreakpoint=Ce;exports.useChartSuggestion=rd;exports.useChunkedProcessor=cu;exports.useClickOutside=ms;exports.useCodeCompletion=ed;exports.useCognitiveAccessibility=oc;exports.useColorBlindMode=Pr;exports.useColorBlindModePersisted=pc;exports.useComponentDisplayClass=Gi;exports.useComponentDisplayStyle=Xi;exports.useComponentHelp=so;exports.useContainerSize=vs;exports.useControlId=us;exports.useControllableState=Mu;exports.useDarkMode=gs;exports.useDebouncedValue=fs;exports.useDecodedImage=Ii;exports.useDeferredList=lu;exports.useDeferredSearch=iu;exports.useDevice=yr;exports.useDisplayAnimation=Yi;exports.useDisplayDensity=qi;exports.useDisplayModeEdit=Qi;exports.useEventCleanup=bu;exports.useFocusManagement=nc;exports.useFocusTrap=ps;exports.useFormGeneration=ad;exports.useGamepad=Du;exports.useHaptic=js;exports.useHoldRepeat=ds;exports.useImageFormats=ki;exports.useImagePreload=Ti;exports.useInputMode=cs;exports.useIsTouchDevice=ss;exports.useLazyImage=xu;exports.useLiveAnnouncement=Dr;exports.useLongPress=ls;exports.useMeasureEffect=Zc;exports.useMediaQuery=$e;exports.useMemoryMonitor=bl;exports.useMemoryMonitorPerf=vu;exports.useNaturalLanguageFilter=td;exports.useNiceA11y=Us;exports.useNiceAI=de;exports.useNiceAccessMode=Ps;exports.useNiceCollapse=Is;exports.useNiceDataSource=Pd;exports.useNiceDisplayStyle=Ui;exports.useNiceField=zd;exports.useNiceHelp=io;exports.useNiceLookupSource=$d;exports.useNiceRTL=Fs;exports.useNiceRecord=Lo;exports.useNiceTheme=Dc;exports.useNiceTransition=Ts;exports.useNiceTutorials=mo;exports.useNiceTutorialsEnabled=Ll;exports.useOptimistic=du;exports.useOrientation=ks;exports.usePan=_s;exports.usePinch=Hs;exports.useProgressiveImage=Ai;exports.usePullToRefresh=Er;exports.useRenderCount=Yc;exports.useResolvedDisplayStyle=ke;exports.useResponsiveValue=Ss;exports.useRestoreFocus=qs;exports.useRouteAnnouncement=ac;exports.useRovingTabIndex=Gs;exports.useSafeAbortController=eo;exports.useSafeAreaInsets=Cs;exports.useSafeEventListener=dl;exports.useSafeFetch=ul;exports.useSafeInterval=ll;exports.useSafeState=sl;exports.useSafeSubscription=fl;exports.useSafeTimeout=cl;exports.useSafeWebSocket=ml;exports.useSharedImageObserver=Li;exports.useShowAt=ws;exports.useSpatialFocusable=_i;exports.useSpatialNav=_u;exports.useSpatialNavOptional=Hu;exports.useSubmitOnEnter=ec;exports.useSwipe=$s;exports.useTextImprovement=nd;exports.useThemeIsDark=Zd;exports.useThemeVariants=Si;exports.useTransitionState=su;exports.useUnmountLog=gl;exports.useVirtualGrid=nu;exports.useVirtualKeyboard=Vs;exports.useVirtualScroll=wi;exports.useVoiceControl=rc;exports.useWhyDidYouRender=Gn;exports.useWindowedList=ou;exports.useWorker=uu;exports.useWorkerPool=fu;exports.validateData=Ld;exports.validateViewDocument=tu;exports.vhsTracking=oi;exports.vogueDidone=ci;exports.warnControlledClash=Pi;exports.watercolorWash=ui;exports.withCaching=vd;exports.withCalculatedColumns=Id;exports.withCrossTabSync=_d;exports.withCursorPagination=xd;exports.withLeakTracking=pl;exports.withOptimisticUpdates=Nd;exports.withPolling=Ad;exports.withWhyDidYouRender=qc;exports.y2kAqua=si;exports.zenMinimal=Bo;exports.zinePunk=di;