@justin_evo/evo-ui 1.0.1

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.
Files changed (110) hide show
  1. package/dist/Alert/Alert.d.ts +11 -0
  2. package/dist/AutoComplete/AutoComplete.d.ts +95 -0
  3. package/dist/Badge/Badge.d.ts +23 -0
  4. package/dist/Breadcrumb/Breadcrumb.d.ts +16 -0
  5. package/dist/Button/Button.d.ts +54 -0
  6. package/dist/Card/Card.d.ts +60 -0
  7. package/dist/Checkbox/Checkbox.d.ts +16 -0
  8. package/dist/CommandPalette/CommandPalette.d.ts +17 -0
  9. package/dist/Container/Container.d.ts +10 -0
  10. package/dist/Divider/Divider.d.ts +7 -0
  11. package/dist/Form/Form.d.ts +61 -0
  12. package/dist/Grid/Grid.d.ts +23 -0
  13. package/dist/ImageCropper/ImageCropper.d.ts +111 -0
  14. package/dist/Input/Input.d.ts +12 -0
  15. package/dist/Modal/Modal.d.ts +26 -0
  16. package/dist/Nav/Nav.d.ts +63 -0
  17. package/dist/Notification/Notification.d.ts +186 -0
  18. package/dist/Pagination/Pagination.d.ts +10 -0
  19. package/dist/Radio/Radio.d.ts +20 -0
  20. package/dist/RichTextArea/RichTextArea.d.ts +70 -0
  21. package/dist/Select/Select.d.ts +44 -0
  22. package/dist/Skeleton/Skeleton.d.ts +23 -0
  23. package/dist/Stack/Stack.d.ts +16 -0
  24. package/dist/Table/Table.d.ts +77 -0
  25. package/dist/Tabs/Tabs.d.ts +28 -0
  26. package/dist/Theme/ThemeProvider.d.ts +96 -0
  27. package/dist/Theme/ThemeToggle.d.ts +22 -0
  28. package/dist/Toggle/Toggle.d.ts +11 -0
  29. package/dist/Tooltip/Tooltip.d.ts +10 -0
  30. package/dist/TopNav/TopNav.d.ts +76 -0
  31. package/dist/TreeSelect/TreeSelect.d.ts +50 -0
  32. package/dist/declarations.d.ts +6 -0
  33. package/dist/evo-ui.css +1 -0
  34. package/dist/index.cjs.js +1 -0
  35. package/dist/index.d.ts +31 -0
  36. package/dist/index.es.js +5688 -0
  37. package/package.json +52 -0
  38. package/src/Alert/Alert.tsx +49 -0
  39. package/src/AutoComplete/AutoComplete.tsx +810 -0
  40. package/src/Badge/Badge.tsx +53 -0
  41. package/src/Breadcrumb/Breadcrumb.tsx +53 -0
  42. package/src/Button/Button.tsx +125 -0
  43. package/src/Card/Card.tsx +257 -0
  44. package/src/Checkbox/Checkbox.tsx +59 -0
  45. package/src/CommandPalette/CommandPalette.tsx +185 -0
  46. package/src/Container/Container.tsx +31 -0
  47. package/src/Divider/Divider.tsx +31 -0
  48. package/src/Form/Form.tsx +185 -0
  49. package/src/Grid/Grid.tsx +66 -0
  50. package/src/ImageCropper/ImageCropper.tsx +911 -0
  51. package/src/Input/Input.tsx +74 -0
  52. package/src/Modal/Modal.tsx +77 -0
  53. package/src/Nav/Nav.tsx +626 -0
  54. package/src/Notification/Notification.tsx +1503 -0
  55. package/src/Pagination/Pagination.tsx +76 -0
  56. package/src/Radio/Radio.tsx +69 -0
  57. package/src/RichTextArea/RichTextArea.tsx +869 -0
  58. package/src/Select/Select.tsx +515 -0
  59. package/src/Skeleton/Skeleton.tsx +70 -0
  60. package/src/Stack/Stack.tsx +52 -0
  61. package/src/Table/Table.tsx +335 -0
  62. package/src/Tabs/Tabs.tsx +90 -0
  63. package/src/Theme/ThemeProvider.tsx +253 -0
  64. package/src/Theme/ThemeToggle.tsx +79 -0
  65. package/src/Toggle/Toggle.tsx +48 -0
  66. package/src/Tooltip/Tooltip.tsx +38 -0
  67. package/src/TopNav/TopNav.tsx +994 -0
  68. package/src/TreeSelect/TreeSelect.tsx +825 -0
  69. package/src/css/alert.module.scss +93 -0
  70. package/src/css/autocomplete.module.scss +416 -0
  71. package/src/css/badge.module.scss +82 -0
  72. package/src/css/base/_color.scss +159 -0
  73. package/src/css/base/_theme.scss +237 -0
  74. package/src/css/base/_variables.scss +161 -0
  75. package/src/css/breadcrumb.module.scss +50 -0
  76. package/src/css/button.module.scss +385 -0
  77. package/src/css/card.module.scss +217 -0
  78. package/src/css/checkbox.module.scss +120 -0
  79. package/src/css/commandpalette.module.scss +211 -0
  80. package/src/css/container.module.scss +18 -0
  81. package/src/css/divider.module.scss +41 -0
  82. package/src/css/form.module.scss +245 -0
  83. package/src/css/imagecropper.module.scss +397 -0
  84. package/src/css/input.module.scss +89 -0
  85. package/src/css/modal.module.scss +105 -0
  86. package/src/css/nav.module.scss +339 -0
  87. package/src/css/notification.module.scss +691 -0
  88. package/src/css/pagination.module.scss +63 -0
  89. package/src/css/radio.module.scss +89 -0
  90. package/src/css/richtextarea.module.scss +307 -0
  91. package/src/css/select.module.scss +525 -0
  92. package/src/css/skeleton.module.scss +30 -0
  93. package/src/css/table.module.scss +386 -0
  94. package/src/css/tabs.module.scss +63 -0
  95. package/src/css/theme-toggle.module.scss +83 -0
  96. package/src/css/toggle.module.scss +54 -0
  97. package/src/css/tooltip.module.scss +97 -0
  98. package/src/css/topnav.module.scss +396 -0
  99. package/src/css/treeselect.module.scss +558 -0
  100. package/src/css/utilities/_borders.scss +111 -0
  101. package/src/css/utilities/_colors.scss +66 -0
  102. package/src/css/utilities/_effects.scss +216 -0
  103. package/src/css/utilities/_layout.scss +181 -0
  104. package/src/css/utilities/_position.scss +75 -0
  105. package/src/css/utilities/_sizing.scss +138 -0
  106. package/src/css/utilities/_spacing.scss +99 -0
  107. package/src/css/utilities/_typography.scss +121 -0
  108. package/src/css/utilities/index.scss +24 -0
  109. package/src/declarations.d.ts +6 -0
  110. package/src/index.ts +60 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),jn=require("react-dom"),kn=r.createContext(null),Nn="evo-ui-theme";function ln(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function dn(n){if(!n||typeof window>"u")return null;try{const t=window.localStorage.getItem(n);if(t==="light"||t==="dark"||t==="system")return t}catch{}return null}const ss=({children:n,defaultTheme:t="system",storageKey:s=Nn,attribute:o="data-theme",enableTransitions:a=!0,target:i})=>{const[l,c]=r.useState(()=>dn(s)??t),[p,v]=r.useState(()=>{const D=dn(s)??t;return D==="system"?ln():D}),y=r.useRef(!0),_=r.useCallback(D=>{if(typeof document>"u")return;const $=i??document.documentElement;a&&!y.current&&($.setAttribute("data-theme-transition","true"),window.clearTimeout($.__evoThemeTimer),$.__evoThemeTimer=window.setTimeout(()=>{$.removeAttribute("data-theme-transition")},250)),o==="class"&&($.classList.remove("light","dark"),$.classList.add(D)),$.setAttribute("data-theme",D),y.current=!1},[o,a,i]);r.useEffect(()=>{_(p)},[p,_]),r.useEffect(()=>{v(l==="system"?ln():l)},[l]),r.useEffect(()=>{if(l!=="system"||typeof window>"u"||!window.matchMedia)return;const D=window.matchMedia("(prefers-color-scheme: dark)"),$=z=>{v(z.matches?"dark":"light")};return D.addEventListener("change",$),()=>D.removeEventListener("change",$)},[l]);const b=r.useCallback(D=>{if(c(D),s&&typeof window<"u")try{window.localStorage.setItem(s,D)}catch{}},[s]),M=r.useCallback(()=>{b(p==="dark"?"light":"dark")},[p,b]),k=r.useMemo(()=>({theme:l,resolvedTheme:p,setTheme:b,toggleTheme:M}),[l,p,b,M]);return e.jsx(kn.Provider,{value:k,children:n})},En=()=>{const n=r.useContext(kn);if(n)return n;const t=typeof document<"u"&&document.documentElement.getAttribute("data-theme")==="dark"?"dark":"light";return{theme:t,resolvedTheme:t,setTheme:()=>{typeof document<"u"&&console.warn("[evo-ui] useEvoTheme called without <EvoThemeProvider>. Wrap your app in <EvoThemeProvider> to enable setTheme().")},toggleTheme:()=>{}}},os=(n=Nn)=>`(function(){try{var s=localStorage.getItem('${n}');var t=s||'system';var r=t==='system'?(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'):t;document.documentElement.setAttribute('data-theme',r);}catch(e){}})();`,rs="_toggle_1aoav_1",as="_track_1aoav_19",is="_thumb_1aoav_29",cs="_sun_1aoav_49",ls="_moon_1aoav_54",ds="_sm_1aoav_68",us="_md_1aoav_81",hs="_lg_1aoav_94",gt={toggle:rs,track:as,thumb:is,sun:cs,moon:ls,sm:ds,md:us,lg:hs},ps=({size:n="md",ariaLabel:t="Toggle color theme",className:s})=>{const{resolvedTheme:o,toggleTheme:a}=En(),i=o==="dark",l=[gt.toggle,gt[n],s].filter(Boolean).join(" ");return e.jsx("button",{type:"button",role:"switch","aria-checked":i,"aria-label":t,onClick:a,className:l,"data-theme-state":o,children:e.jsx("span",{className:gt.track,children:e.jsxs("span",{className:gt.thumb,children:[e.jsxs("svg",{className:gt.sun,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"4"}),e.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),e.jsx("svg",{className:gt.moon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})]})})})},_s="_button_5wbw9_1",fs="_label_5wbw9_38",ms="_icon_5wbw9_44",vs="_spinner_5wbw9_56",xs="_sm_5wbw9_72",gs="_md_5wbw9_80",bs="_lg_5wbw9_82",ys="_rounded_5wbw9_90",ws="_square_5wbw9_94",js="_iconOnly_5wbw9_106",ks="_fullWidth_5wbw9_119",Ns="_solid_5wbw9_124",Es="_outline_5wbw9_126",Ts="_ghost_5wbw9_130",Is="_soft_5wbw9_135",$s="_primary_5wbw9_139",Cs="_secondary_5wbw9_197",Ms="_danger_5wbw9_257",Ls="_warning_5wbw9_315",Ds="_success_5wbw9_371",Bs="_info_5wbw9_429",Ge={button:_s,label:fs,icon:ms,spinner:vs,"evo-btn-spin":"_evo-btn-spin_5wbw9_1",sm:xs,md:gs,lg:bs,rounded:ys,square:ws,iconOnly:js,fullWidth:ks,solid:Ns,outline:Es,ghost:Ts,soft:Is,primary:$s,secondary:Cs,danger:Ms,warning:Ls,success:Ds,info:Bs},Ss=r.forwardRef(function({label:t,children:s,variant:o="solid",severity:a="primary",size:i="md",shape:l="default",iconLeft:c,iconRight:p,loading:v=!1,loadingText:y,fullWidth:_=!1,disabled:b,type:M="button",className:k,...D},$){const q=v?y:s??t,G=b||v,H=[Ge.button,Ge[o],Ge[a],Ge[i],l!=="default"?Ge[l]:"",_?Ge.fullWidth:"",q?"":Ge.iconOnly,k].filter(Boolean).join(" ");return e.jsxs("button",{ref:$,type:M,className:H,disabled:G,"aria-busy":v||void 0,...D,children:[v?e.jsx("span",{className:Ge.spinner,"aria-hidden":"true"}):c&&e.jsx("span",{className:Ge.icon,children:c}),q!=null&&q!==""&&e.jsx("span",{className:Ge.label,children:q}),!v&&p&&e.jsx("span",{className:Ge.icon,children:p})]})}),Rs="_root_kkcxo_1",As="_elevated_kkcxo_15",zs="_outlined_kkcxo_20",Ps="_ghost_kkcxo_26",Os="_media_kkcxo_40",Ws="_interactive_kkcxo_72",Hs="_mediaImg_kkcxo_112",Fs="_header_kkcxo_119",qs="_body_kkcxo_126",Vs="_footer_kkcxo_132",Us="_title_kkcxo_141",Gs="_description_kkcxo_149",Ke={root:Rs,elevated:As,outlined:zs,ghost:Ps,"orient-vertical":"_orient-vertical_kkcxo_32","orient-horizontal":"_orient-horizontal_kkcxo_36",media:Os,"orient-responsive":"_orient-responsive_kkcxo_51",interactive:Ws,mediaImg:Hs,header:Fs,body:qs,footer:Vs,title:Us,description:Gs};function xt(...n){return n.filter(Boolean).join(" ")}function Ks(n,t,s,o){return xt(Ke.root,Ke[n],Ke[`orient-${t}`],s&&Ke.interactive,o)}const Bt=r.forwardRef(function(t,s){const{variant:o="elevated",orientation:a="vertical",interactive:i,className:l,children:c,...p}=t,v=i===!0,y=Ks(o,a,v,l);if(v&&typeof p.href=="string"){const _=p;return e.jsx("a",{ref:s,className:y,..._,children:c})}if(v){const{type:_="button",...b}=p;return e.jsx("button",{ref:s,type:_,className:y,...b,children:c})}return e.jsx("div",{ref:s,className:y,...p,children:c})});Bt.displayName="EvoCardRoot";const Ut=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.header,t),...s})});Ut.displayName="EvoCardHeader";const Gt=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.body,t),...s})});Gt.displayName="EvoCardBody";const Kt=r.forwardRef(function({className:t,...s},o){return e.jsx("div",{ref:o,className:xt(Ke.footer,t),...s})});Kt.displayName="EvoCardFooter";const Qt=r.forwardRef(function({as:t="h3",className:s,children:o,...a},i){return r.createElement(t,{ref:i,className:xt(Ke.title,s),...a},o)});Qt.displayName="EvoCardTitle";const Yt=r.forwardRef(function({className:t,...s},o){return e.jsx("p",{ref:o,className:xt(Ke.description,t),...s})});Yt.displayName="EvoCardDescription";const Xt=r.forwardRef(function({src:t,alt:s,aspectRatio:o,className:a,style:i,children:l,...c},p){const v=o!=null?{aspectRatio:o,...i}:i;return e.jsx("div",{ref:p,className:xt(Ke.media,a),style:v,...c,children:t?e.jsx("img",{src:t,alt:s??"",className:Ke.mediaImg}):l})});Xt.displayName="EvoCardMedia";const ct=Bt;ct.Root=Bt;ct.Header=Ut;ct.Title=Qt;ct.Description=Yt;ct.Body=Gt;ct.Footer=Kt;ct.Media=Xt;const Qs={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},Ys={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},Xs=({children:n,direction:t="column",gap:s="1rem",align:o="stretch",justify:a="start",wrap:i=!1,className:l="",style:c})=>e.jsx("div",{className:l,style:{display:"flex",flexDirection:t,gap:typeof s=="number"?`${s}px`:s,alignItems:Qs[o],justifyContent:Ys[a],flexWrap:i?"wrap":"nowrap",...c},children:n}),Pt=n=>n===void 0?void 0:typeof n=="number"?`${n}px`:n,Js=({children:n,colSpan:t,rowSpan:s,className:o="",style:a})=>e.jsx("div",{className:o,style:{gridColumn:t?`span ${t}`:void 0,gridRow:s?`span ${s}`:void 0,...a},children:n}),Tn=({children:n,cols:t=3,rows:s,gap:o="1rem",colGap:a,rowGap:i,className:l="",style:c})=>e.jsx("div",{className:l,style:{display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, 1fr)`:t,gridTemplateRows:s?typeof s=="number"?`repeat(${s}, auto)`:s:void 0,gap:Pt(o),columnGap:Pt(a),rowGap:Pt(i),...c},children:n});Tn.Item=Js;const Zs="_divider_rorxd_1",eo="_horizontal_rorxd_6",to="_vertical_rorxd_13",no="_labeled_rorxd_20",so="_line_rorxd_27",oo="_labelText_rorxd_33",ut={divider:Zs,horizontal:eo,vertical:to,labeled:no,line:so,labelText:oo},ro=({orientation:n="horizontal",label:t,className:s=""})=>t?e.jsxs("div",{className:`${ut.labeled} ${s}`,children:[e.jsx("div",{className:ut.line}),e.jsx("span",{className:ut.labelText,children:t}),e.jsx("div",{className:ut.line})]}):e.jsx("div",{className:[ut.divider,n==="vertical"?ut.vertical:ut.horizontal,s].filter(Boolean).join(" ")}),ao="_container_131l9_1",io="_centered_131l9_7",co="_sm_131l9_12",lo="_md_131l9_16",uo="_lg_131l9_20",ho="_xl_131l9_24",po="_full_131l9_28",Ot={container:ao,centered:io,sm:co,md:lo,lg:uo,xl:ho,full:po},_o=({children:n,size:t="lg",centered:s=!0,className:o=""})=>e.jsx("div",{className:[Ot.container,Ot[t],s?Ot.centered:"",o].filter(Boolean).join(" "),children:n}),fo="_tabs_9memw_1",mo="_tabList_9memw_6",vo="_tab_9memw_1",xo="_disabled_9memw_36",go="_active_9memw_36",bo="_tabPanel_9memw_52",wt={tabs:fo,tabList:mo,tab:vo,disabled:xo,active:go,tabPanel:bo},In=r.createContext(null),$n=()=>{const n=r.useContext(In);if(!n)throw new Error("Tab components must be used within EvoTabs");return n},yo=({children:n,className:t=""})=>e.jsx("div",{className:`${wt.tabList} ${t}`,role:"tablist",children:n}),wo=({id:n,children:t,disabled:s=!1,className:o=""})=>{const{active:a,setActive:i}=$n();return e.jsx("button",{role:"tab","aria-selected":a===n,disabled:s,className:[wt.tab,a===n?wt.active:"",s?wt.disabled:"",o].filter(Boolean).join(" "),onClick:()=>i(n),children:t})},jo=({id:n,children:t,className:s=""})=>{const{active:o}=$n();return o!==n?null:e.jsx("div",{role:"tabpanel",className:`${wt.tabPanel} ${s}`,children:t})},St=({children:n,defaultTab:t="",className:s=""})=>{const[o,a]=r.useState(t);return e.jsx(In.Provider,{value:{active:o,setActive:a},children:e.jsx("div",{className:`${wt.tabs} ${s}`,children:n})})};St.List=yo;St.Tab=wo;St.Panel=jo;const ko="_breadcrumb_7jmv3_1",No="_item_7jmv3_12",Eo="_separator_7jmv3_18",To="_link_7jmv3_28",Io="_text_7jmv3_44",$o="_current_7jmv3_49",yt={breadcrumb:ko,item:No,separator:Eo,link:To,text:Io,current:$o},Co=({children:n,href:t,current:s=!1})=>e.jsx("li",{className:yt.item,children:t&&!s?e.jsx("a",{href:t,className:yt.link,children:n}):e.jsx("span",{className:[yt.text,s?yt.current:""].filter(Boolean).join(" "),"aria-current":s?"page":void 0,children:n})}),Cn=({children:n,separator:t="/",className:s=""})=>{const o=r.Children.toArray(n);return e.jsx("nav",{"aria-label":"breadcrumb",className:s,children:e.jsx("ol",{className:yt.breadcrumb,children:o.map((a,i)=>e.jsxs(r.Fragment,{children:[a,i<o.length-1&&e.jsx("li",{className:yt.separator,"aria-hidden":"true",children:t})]},i))})})};Cn.Item=Co;const Mo="_navContainer_petvt_1",Lo="_navList_petvt_7",Do="_navLi_petvt_7",Bo="_navRow_petvt_20",So="_active_petvt_51",Ro="_disabled_petvt_65",Ao="_navRowTop_petvt_71",zo="_navRowSub_petvt_75",Po="_navLabel_petvt_83",Oo="_navIcon_petvt_92",Wo="_chevron_petvt_103",Ho="_chevronOpen_petvt_108",Fo="_navSubList_petvt_112",qo="_navGroup_petvt_124",Vo="_navGroupLabel_petvt_130",Uo="_navSkeletonItem_petvt_140",Go="_navSkeletonIcon_petvt_147",Ko="_navSkeletonText_petvt_156",Qo="_navQuickAction_petvt_172",Yo="_navTrigger_petvt_201",Xo="_navBackdrop_petvt_224",Jo="_navDesktop_petvt_232",Zo="_navMobile_petvt_236",er="_navDrawerOpen_petvt_257",_e={navContainer:Mo,navList:Lo,navLi:Do,navRow:Bo,active:So,disabled:Ro,navRowTop:Ao,navRowSub:zo,navLabel:Po,navIcon:Oo,chevron:Wo,chevronOpen:Ho,navSubList:Fo,navGroup:qo,navGroupLabel:Vo,navSkeletonItem:Uo,navSkeletonIcon:Go,navSkeletonText:Ko,navQuickAction:Qo,navTrigger:Yo,navBackdrop:Xo,navDesktop:Jo,navMobile:Zo,navDrawerOpen:er},Mn=r.createContext(null),un=r.createContext({depth:0});function tr(n){const[t,s]=r.useState(!1);return r.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const o=window.matchMedia(`(max-width: ${n-1}px)`),a=()=>s(o.matches);return a(),o.addEventListener("change",a),()=>o.removeEventListener("change",a)},[n]),t}function Ln(n,t,s){const[o,a]=r.useState(t),i=n!==void 0,l=i?n:o,c=r.useCallback(p=>{i||a(p),s==null||s(p)},[i,s]);return[l,c]}const Ft="data-evo-nav-row";function nr(n){return n?Array.from(n.querySelectorAll(`[${Ft}]:not([data-disabled="true"])`)).filter(t=>t.offsetParent!==null):[]}function $t(n,t,s){var l;const o=nr(n);if(o.length===0)return;const a=o.indexOf(t);let i;s==="first"?i=0:s==="last"?i=o.length-1:i=Math.max(0,Math.min(o.length-1,a+s)),(l=o[i])==null||l.focus()}const sr=({open:n})=>e.jsx("svg",{viewBox:"0 0 16 16",fill:"none",width:"12",height:"12","aria-hidden":"true",className:[_e.chevron,n?_e.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),or=()=>e.jsx("svg",{viewBox:"0 0 16 16",fill:"none",width:"14",height:"14","aria-hidden":"true",children:e.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),rr=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M3 5h14M3 10h14M3 15h14",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),ar=()=>e.jsx("svg",{viewBox:"0 0 20 20",fill:"none",width:"18",height:"18","aria-hidden":"true",children:e.jsx("path",{d:"M5 5l10 10M15 5L5 15",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})});function ir(n){const t=[],s=[],o=a=>{if(Array.isArray(a)){a.forEach(o);return}if(r.isValidElement(a)){const i=a.type;if(typeof i!="string"&&(i==null?void 0:i.displayName)==="EvoNavSubItem"){s.push(a);return}}t.push(a)};return o(n),{label:t,subs:s}}const Dn=r.forwardRef(function({children:t,icon:s,active:o=!1,href:a,onClick:i,open:l,defaultOpen:c=!1,onOpenChange:p,disabled:v=!1,className:y,tier:_},b){const M=r.useContext(Mn),{depth:k}=r.useContext(un),D=r.useRef(null),$=r.useId(),z=`${$}-sub`,{label:q,subs:G}=r.useMemo(()=>ir(t),[t]),H=G.length>0,[w,S]=Ln(H?l:!1,H?c:!1,p),L=r.useCallback(()=>{H&&S(!w)},[H,w,S]),I=r.useCallback(N=>{v||(H&&!a&&L(),i==null||i(N),M!=null&&M.isMobile&&a&&!H&&M.closeDrawer())},[v,H,a,i,M,L]),ee=N=>{var se,J,de;if(v)return;const V=N.currentTarget,Y=V.closest(`.${_e.navContainer}`);switch(N.key){case"ArrowDown":N.preventDefault(),$t(Y,V,1);break;case"ArrowUp":N.preventDefault(),$t(Y,V,-1);break;case"ArrowRight":if(H)if(N.preventDefault(),!w)S(!0);else{const te=V.closest("li"),oe=te==null?void 0:te.querySelector(`ul [${Ft}]`);oe==null||oe.focus()}break;case"ArrowLeft":if(N.preventDefault(),H&&w)S(!1);else if(k>0){const te=(J=(se=V.closest("li"))==null?void 0:se.parentElement)==null?void 0:J.closest("li");(de=te==null?void 0:te.querySelector(`[${Ft}]`))==null||de.focus()}break;case"Home":N.preventDefault(),$t(Y,V,"first");break;case"End":N.preventDefault(),$t(Y,V,"last");break;case"Enter":case" ":{(N.key===" "||a===void 0)&&(N.preventDefault(),I(N));break}}},O=[_e.navRow,_==="subitem"?_e.navRowSub:_e.navRowTop,o?_e.active:"",v?_e.disabled:"",y].filter(Boolean).join(" "),x=_==="subitem"&&k>0?{"--evo-nav-indent":`${k*.875}rem`}:void 0,Q={"data-evo-nav-row":"",id:$,className:O,style:x,"aria-current":o?"page":void 0,"aria-expanded":H?w:void 0,"aria-controls":H?z:void 0,"aria-disabled":v||void 0,"data-disabled":v?"true":void 0,"data-active":o?"true":void 0,tabIndex:v?-1:0,onKeyDown:ee},B=e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:_e.navIcon,children:s}),e.jsx("span",{className:_e.navLabel,children:q}),H&&e.jsx(sr,{open:w})]});let re;if(a&&!v){const N={href:a,onClick:I};re=e.jsx("a",{ref:D,...Q,...N,children:B})}else re=e.jsx("button",{ref:D,type:"button",disabled:v,onClick:I,...Q,children:B});return e.jsxs("li",{ref:b,className:_e.navLi,children:[re,H&&e.jsx(un.Provider,{value:{depth:k+1},children:e.jsx("ul",{id:z,role:"group","aria-labelledby":$,hidden:!w,className:_e.navSubList,children:G})})]})}),Jt=r.forwardRef(function(t,s){return e.jsx(Dn,{ref:s,tier:"item",...t})});Jt.displayName="EvoNavItem";const Zt=r.forwardRef(function(t,s){return e.jsx(Dn,{ref:s,tier:"subitem",...t})});Zt.displayName="EvoNavSubItem";const en=r.forwardRef(function({label:t,children:s,className:o},a){const i=r.useId();return e.jsxs("li",{ref:a,className:[_e.navGroup,o].filter(Boolean).join(" "),children:[e.jsx("div",{id:i,role:"heading","aria-level":3,className:_e.navGroupLabel,children:t}),e.jsx("ul",{role:"group","aria-labelledby":i,className:_e.navList,children:s})]})});en.displayName="EvoNavGroup";const Bn=({count:n=4})=>e.jsx(e.Fragment,{children:Array.from({length:n}).map((t,s)=>e.jsxs("li",{"aria-hidden":"true",className:_e.navSkeletonItem,children:[e.jsx("span",{className:_e.navSkeletonIcon}),e.jsx("span",{className:_e.navSkeletonText,style:{width:`${45+s%4*12}%`}})]},s))}),tn=r.forwardRef(function({label:t="Create New",icon:s,className:o,type:a="button",...i},l){return e.jsx("li",{className:_e.navLi,children:e.jsxs("button",{ref:l,type:a,className:[_e.navQuickAction,o].filter(Boolean).join(" "),...i,children:[e.jsx("span",{className:_e.navIcon,children:s??e.jsx(or,{})}),e.jsx("span",{className:_e.navLabel,children:t})]})})});tn.displayName="EvoNavQuickAction";const Sn=r.forwardRef(function({children:t,breakpoint:s=768,drawerOpen:o,defaultDrawerOpen:a=!1,onDrawerOpenChange:i,hideTrigger:l=!1,className:c,"aria-label":p="Main navigation",...v},y){const _=tr(s),[b,M]=Ln(o,a,i),k=r.useCallback(()=>M(!1),[M]),D=r.useId(),$=r.useRef(null);r.useEffect(()=>{if(!_||!b)return;const H=w=>{w.key==="Escape"&&k()};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[_,b,k]),r.useEffect(()=>{if(!_||!b)return;const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=H}},[_,b]),r.useEffect(()=>{!_&&b&&k()},[_,b,k]);const z=r.useMemo(()=>({isMobile:_,drawerOpen:b,setDrawerOpen:M,closeDrawer:k,rootId:D}),[_,b,M,k,D]),q=[_e.navContainer,_?_e.navMobile:_e.navDesktop,_&&b?_e.navDrawerOpen:"",c].filter(Boolean).join(" "),G=H=>{$.current=H,typeof y=="function"?y(H):y&&(y.current=H)};return e.jsxs(Mn.Provider,{value:z,children:[_&&!l&&e.jsx("button",{type:"button",className:_e.navTrigger,"aria-expanded":b,"aria-controls":D,"aria-label":b?"Close navigation":"Open navigation",onClick:()=>M(!b),children:b?e.jsx(ar,{}):e.jsx(rr,{})}),_&&b&&e.jsx("div",{className:_e.navBackdrop,"aria-hidden":"true",onClick:k}),e.jsx("nav",{ref:G,id:D,role:"navigation","aria-label":p,"aria-hidden":_&&!b?!0:void 0,className:q,...v,children:e.jsx("ul",{className:_e.navList,children:t})})]})});Sn.displayName="EvoNav";const cr=Object.assign(Sn,{Group:en,Item:Jt,SubItem:Zt,Skeleton:Bn,QuickAction:tn}),lr="_topNav_hpesm_27",dr="_topNavInner_hpesm_35",ur="_topNavBrand_hpesm_43",hr="_topNavMenu_hpesm_52",pr="_topNavItemRow_hpesm_63",_r="_topNavMenuScroll_hpesm_68",fr="_topNavItem_hpesm_63",mr="_topNavItemActive_hpesm_108",vr="_topNavItemLabel_hpesm_117",xr="_topNavIcon_hpesm_121",gr="_topNavActions_hpesm_131",br="_topNavToggle_hpesm_139",yr="_toggleIcon_hpesm_163",wr="_topNavDropdown_hpesm_167",jr="_topNavDropdownContent_hpesm_183",kr="_topNavDropdownContentOpen_hpesm_206",Nr="_topNavDropdownItem_hpesm_211",Er="_topNavMenuDrawer_hpesm_247",Tr="_topNavDropdownTrigger_hpesm_265",Ir="_topNavMenuDrawerClosed_hpesm_272",$r="_topNavDropdownInDrawer_hpesm_278",Cr="_topNavBackdrop_hpesm_291",Mr="_topNavReducedMotion_hpesm_301",he={topNav:lr,topNavInner:dr,topNavBrand:ur,topNavMenu:hr,topNavItemRow:pr,topNavMenuScroll:_r,topNavItem:fr,topNavItemActive:mr,topNavItemLabel:vr,topNavIcon:xr,topNavActions:gr,topNavToggle:br,toggleIcon:yr,topNavDropdown:wr,topNavDropdownContent:jr,topNavDropdownContentOpen:kr,topNavDropdownItem:Nr,topNavMenuDrawer:Er,topNavDropdownTrigger:Tr,topNavMenuDrawerClosed:Ir,topNavDropdownInDrawer:$r,topNavBackdrop:Cr,topNavReducedMotion:Mr},Ue=(...n)=>n.filter(Boolean).join(" ");function Lr(n,t){return s=>{n==null||n(s),s.defaultPrevented||t==null||t(s)}}function Rn(n){const{value:t,defaultValue:s,onChange:o}=n,[a,i]=r.useState(s),l=t!==void 0,c=l?t:a,p=r.useCallback(v=>{l||i(v),o==null||o(v)},[l,o]);return[c,p]}const Dr=typeof window<"u"?r.useLayoutEffect:r.useEffect;function nn(n,t=!1){const[s,o]=r.useState(t);return Dr(()=>{var l;if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(n),i=()=>o(a.matches);return i(),(l=a.addEventListener)==null||l.call(a,"change",i),()=>{var c;return(c=a.removeEventListener)==null?void 0:c.call(a,"change",i)}},[n]),s}const Br=n=>nn(`(max-width: ${n-1}px)`),Sr=()=>nn("(hover: hover) and (pointer: fine)",!0),Rr=()=>nn("(prefers-reduced-motion: reduce)");function qt(n){return n?Array.from(n.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])')).filter(t=>!t.hasAttribute("aria-hidden")&&t.offsetParent!==null):[]}const An=r.forwardRef(function({children:t,...s},o){const a=r.Children.only(t),i=a.props??{},l={...s,...i};l.className=Ue(s.className,i.className),(s.style||i.style)&&(l.style={...s.style,...i.style});for(const c of Object.keys(s))if(c.startsWith("on")&&typeof s[c]=="function"){const p=s[c],v=i[c];l[c]=Lr(p,v)}return r.cloneElement(a,l)}),Tt=r.createContext(null);function zn(n){const t=r.useContext(Tt);if(!t)throw new Error(`EvoTopNav.${n} must be rendered inside <EvoTopNav>.`);return t}const Pn=r.createContext(null),Ar=({open:n})=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",className:he.toggleIcon,children:n?e.jsx(e.Fragment,{children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}):e.jsx(e.Fragment,{children:e.jsx("path",{d:"M3 5h12M3 9h12M3 13h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})})}),zr=({open:n})=>e.jsx("svg",{viewBox:"0 0 12 12",width:"10",height:"10",fill:"none","aria-hidden":"true",className:Ue(he.dropdownChevron,n&&he.dropdownChevronOpen),children:e.jsx("path",{d:"M3 4.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),On=r.forwardRef(function({children:t,className:s,...o},a){return e.jsx("div",{ref:a,className:Ue(he.topNavBrand,s),...o,children:t})}),Wn=r.forwardRef(function({children:t,className:s,...o},a){const i=zn("Menu"),l=r.useRef(null),c=_=>{l.current=_,i.menuRef.current=_,typeof a=="function"?a(_):a&&(a.current=_)},p=i.toggleCount>0,v=i.isCollapsed&&p,y=v&&!i.drawerOpen;return e.jsx("ul",{ref:c,id:i.menuId,className:Ue(he.topNavMenu,v&&he.topNavMenuDrawer,y&&he.topNavMenuDrawerClosed,i.isCollapsed&&!p&&he.topNavMenuScroll,s),"data-state":v?i.drawerOpen?"open":"closed":"inline","aria-hidden":y||void 0,...o,children:t})}),Hn=r.forwardRef(function({children:t,active:s,icon:o,href:a,target:i,rel:l,onClick:c,asChild:p,className:v},y){const _=r.useContext(Tt),b=!!_&&_.isCollapsed&&_.drawerOpen,M=z=>{c==null||c(z),!z.defaultPrevented&&b&&_.setDrawerOpen(!1)},k={className:Ue(he.topNavItem,s&&he.topNavItemActive,v),"aria-current":s?"page":void 0,"data-active":s||void 0},D=e.jsxs(e.Fragment,{children:[o&&e.jsx("span",{className:he.topNavIcon,"aria-hidden":"true",children:o}),e.jsx("span",{className:he.topNavItemLabel,children:t})]});let $;return p?$=e.jsx(An,{...k,onClick:M,ref:y,children:t}):a?$=e.jsx("a",{ref:y,href:a,target:i,rel:l??(i==="_blank"?"noopener noreferrer":void 0),onClick:M,...k,children:D}):$=e.jsx("button",{ref:y,type:"button",onClick:M,...k,children:D}),e.jsx("li",{className:he.topNavItemRow,children:$})}),Fn=r.forwardRef(function({children:t,className:s,...o},a){return e.jsx("div",{ref:a,className:Ue(he.topNavActions,s),...o,children:t})}),qn=r.forwardRef(function({icon:t,className:s,onClick:o,"aria-label":a,...i},l){const c=zn("Toggle"),p=r.useRef(null);r.useEffect(()=>c.registerToggle(),[c]);const v=_=>{p.current=_,c.toggleRef.current=_,typeof l=="function"?l(_):l&&(l.current=_)},y=_=>{o==null||o(_),_.defaultPrevented||c.setDrawerOpen(!c.drawerOpen)};return e.jsx("button",{ref:v,id:c.toggleId,type:"button",className:Ue(he.topNavToggle,s),"aria-expanded":c.drawerOpen,"aria-controls":c.menuId,"aria-label":a??(c.drawerOpen?"Close menu":"Open menu"),onClick:y,...i,children:t??e.jsx(Ar,{open:c.drawerOpen})})}),Vn=({label:n,icon:t,active:s,hoverable:o=!0,open:a,defaultOpen:i=!1,onOpenChange:l,children:c,className:p})=>{const v=r.useContext(Tt),y=!!v&&v.isCollapsed&&v.toggleCount>0,[_,b]=Rn({value:a,defaultValue:i,onChange:l}),M=Sr(),k=o&&M&&!y,D=r.useRef(null),$=r.useRef(null),z=r.useRef(null),q=r.useId(),G=r.useRef(null),H=r.useCallback(()=>{var x;b(!1),(x=D.current)==null||x.focus()},[b]);r.useEffect(()=>{if(!_||y)return;const x=Q=>{const B=z.current;B&&Q.target instanceof Node&&!B.contains(Q.target)&&b(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[_,y,b]),r.useEffect(()=>{if(!_||y)return;const x=Q=>{Q.key==="Escape"&&(Q.stopPropagation(),H())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[_,y,H]);const w=r.useCallback(x=>{var V;const Q=qt($.current);if(Q.length===0)return;const B=document.activeElement,re=B?Q.indexOf(B):-1;let N=0;x==="first"?N=0:x==="last"?N=Q.length-1:x===1?N=re<0?0:(re+1)%Q.length:N=re<0?Q.length-1:(re-1+Q.length)%Q.length,(V=Q[N])==null||V.focus()},[]),S=x=>{x.key==="ArrowDown"||x.key==="Enter"||x.key===" "?(x.preventDefault(),b(!0),requestAnimationFrame(()=>w("first"))):x.key==="ArrowUp"&&(x.preventDefault(),b(!0),requestAnimationFrame(()=>w("last")))},L=x=>{x.key==="ArrowDown"?(x.preventDefault(),w(1)):x.key==="ArrowUp"?(x.preventDefault(),w(-1)):x.key==="Home"?(x.preventDefault(),w("first")):x.key==="End"?(x.preventDefault(),w("last")):x.key==="Tab"&&b(!1)},I=()=>{k&&(G.current&&clearTimeout(G.current),b(!0))},ee=()=>{k&&(G.current&&clearTimeout(G.current),G.current=setTimeout(()=>b(!1),120))},O=r.useMemo(()=>({open:_,setOpen:b,triggerRef:D,contentRef:$,contentId:q,focusItem:w,inDrawer:y}),[_,b,q,w,y]);return e.jsx(Pn.Provider,{value:O,children:e.jsxs("li",{ref:z,className:Ue(he.topNavDropdown,y&&he.topNavDropdownInDrawer,_&&he.topNavDropdownOpen,p),onMouseEnter:I,onMouseLeave:ee,children:[e.jsxs("button",{ref:D,type:"button",className:Ue(he.topNavItem,he.topNavDropdownTrigger,s&&he.topNavItemActive),"aria-haspopup":"menu","aria-expanded":_,"aria-controls":q,"aria-current":s?"page":void 0,onClick:()=>b(!_),onKeyDown:S,children:[t&&e.jsx("span",{className:he.topNavIcon,"aria-hidden":"true",children:t}),e.jsx("span",{className:he.topNavItemLabel,children:n}),e.jsx(zr,{open:_})]}),e.jsx("ul",{ref:$,id:q,role:"menu",className:Ue(he.topNavDropdownContent,_&&he.topNavDropdownContentOpen),"aria-hidden":!_||void 0,onKeyDown:L,children:c})]})})},Un=r.forwardRef(function({children:t,icon:s,active:o,href:a,target:i,rel:l,onClick:c,asChild:p,className:v},y){const _=r.useContext(Pn),b=r.useContext(Tt),M=z=>{c==null||c(z),z.defaultPrevented||(_==null||_.setOpen(!1),b&&b.isCollapsed&&b.drawerOpen&&b.setDrawerOpen(!1))},k={className:Ue(he.topNavDropdownItem,o&&he.topNavItemActive,v),role:"menuitem","aria-current":o?"page":void 0},D=e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:he.topNavIcon,"aria-hidden":"true",children:s}),e.jsx("span",{className:he.topNavItemLabel,children:t})]});let $;return p?$=e.jsx(An,{...k,onClick:M,ref:y,children:t}):a?$=e.jsx("a",{ref:y,href:a,target:i,rel:l??(i==="_blank"?"noopener noreferrer":void 0),onClick:M,...k,children:D}):$=e.jsx("button",{ref:y,type:"button",onClick:M,...k,children:D}),e.jsx("li",{children:$})}),tt=r.forwardRef(function({children:t,open:s,defaultOpen:o=!1,onOpenChange:a,collapseBelow:i=768,className:l,...c},p){const[v,y]=Rn({value:s,defaultValue:o,onChange:a}),_=Br(i),b=Rr(),[M,k]=r.useState(0),D=r.useCallback(()=>(k(L=>L+1),()=>k(L=>Math.max(0,L-1))),[]),$=r.useId(),z=r.useId(),q=r.useRef(null),G=r.useRef(null),H=r.useRef(null),w=_&&v&&M>0;r.useEffect(()=>{!_&&v&&y(!1)},[_,v,y]),r.useEffect(()=>{if(!w)return;const L=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=L}},[w]),r.useEffect(()=>{if(!w)return;H.current=document.activeElement??null;const I=requestAnimationFrame(()=>{var x;(x=qt(q.current)[0])==null||x.focus()}),ee=O=>{if(O.key==="Escape"){O.preventDefault(),y(!1);return}if(O.key!=="Tab"||!q.current)return;const x=qt(q.current);if(x.length===0)return;const Q=x[0],B=x[x.length-1],re=document.activeElement;O.shiftKey&&re===Q?(O.preventDefault(),B.focus()):(!O.shiftKey&&re===B||re&&!q.current.contains(re))&&(O.preventDefault(),Q.focus())};return document.addEventListener("keydown",ee),()=>{cancelAnimationFrame(I),document.removeEventListener("keydown",ee)}},[w,y]),r.useEffect(()=>{if(w)return;const L=H.current;if(L&&typeof L.focus=="function"){const I=document.activeElement;(!I||I===document.body||q.current&&q.current.contains(I))&&L.focus(),H.current=null}},[w]);const S=r.useMemo(()=>({drawerOpen:v,setDrawerOpen:y,isCollapsed:_,menuId:$,toggleId:z,registerToggle:D,toggleCount:M,menuRef:q,toggleRef:G}),[v,y,_,$,z,D,M]);return e.jsx(Tt.Provider,{value:S,children:e.jsxs("nav",{ref:p,className:Ue(he.topNav,w&&he.topNavDrawerOpen,b&&he.topNavReducedMotion,l),"data-collapsed":_||void 0,"data-drawer-open":w||void 0,...c,children:[e.jsx("div",{className:he.topNavInner,children:t}),w&&e.jsx("div",{className:he.topNavBackdrop,onClick:()=>y(!1),"aria-hidden":"true"})]})})});On.displayName="EvoTopNav.Brand";Wn.displayName="EvoTopNav.Menu";Hn.displayName="EvoTopNav.Item";Fn.displayName="EvoTopNav.Actions";qn.displayName="EvoTopNav.Toggle";Vn.displayName="EvoTopNav.Dropdown";Un.displayName="EvoTopNav.DropdownItem";tt.displayName="EvoTopNav";tt.Brand=On;tt.Menu=Wn;tt.Item=Hn;tt.Actions=Fn;tt.Toggle=qn;tt.Dropdown=Vn;tt.DropdownItem=Un;const Pr="_pagination_1lhxw_1",Or="_pageBtn_1lhxw_8",Wr="_activePage_1lhxw_34",Hr="_navBtn_1lhxw_45",Fr="_ellipsis_1lhxw_49",ot={pagination:Pr,pageBtn:Or,activePage:Wr,navBtn:Hr,ellipsis:Fr},hn=(n,t)=>Array.from({length:t-n+1},(s,o)=>n+o),qr=({total:n,page:t,pageSize:s=10,siblingCount:o=1,onChange:a,className:i=""})=>{const l=Math.max(1,Math.ceil(n/s)),c=()=>{if(l<=7)return hn(1,l);const p=Math.max(2,t-o),v=Math.min(l-1,t+o),y=[1];return p>2&&y.push("..."),y.push(...hn(p,v)),v<l-1&&y.push("..."),l>1&&y.push(l),y};return e.jsxs("nav",{className:`${ot.pagination} ${i}`,"aria-label":"Pagination",children:[e.jsx("button",{className:`${ot.pageBtn} ${ot.navBtn}`,disabled:t<=1,onClick:()=>a(t-1),"aria-label":"Previous page",children:"‹"}),c().map((p,v)=>p==="..."?e.jsx("span",{className:ot.ellipsis,children:"…"},`ellipsis-${v}`):e.jsx("button",{className:[ot.pageBtn,p===t?ot.activePage:""].filter(Boolean).join(" "),onClick:()=>a(p),"aria-label":`Page ${p}`,"aria-current":p===t?"page":void 0,children:p},p)),e.jsx("button",{className:`${ot.pageBtn} ${ot.navBtn}`,disabled:t>=l,onClick:()=>a(t+1),"aria-label":"Next page",children:"›"})]})},Vr="_overlay_1qpdy_1",Ur="_palette_1qpdy_23",Gr="_searchRow_1qpdy_46",Kr="_searchIconWrap_1qpdy_54",Qr="_searchInput_1qpdy_61",Yr="_escBadge_1qpdy_75",Xr="_results_1qpdy_86",Jr="_empty_1qpdy_102",Zr="_group_1qpdy_109",ea="_groupLabel_1qpdy_113",ta="_resultItem_1qpdy_122",na="_resultActive_1qpdy_135",sa="_resultIcon_1qpdy_139",oa="_resultLabel_1qpdy_149",ra="_resultDesc_1qpdy_157",aa="_resultShortcut_1qpdy_163",ia="_footer_1qpdy_178",ca="_footerRight_1qpdy_202",De={overlay:Vr,palette:Ur,searchRow:Gr,searchIconWrap:Kr,searchInput:Qr,escBadge:Yr,results:Xr,empty:Jr,group:Zr,groupLabel:ea,resultItem:ta,resultActive:na,resultIcon:sa,resultLabel:oa,resultDesc:ra,resultShortcut:aa,footer:ia,footerRight:ca},la=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),da=()=>e.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",width:"16",height:"16",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ua=({items:n,placeholder:t="Search commands…",open:s,onClose:o})=>{const[a,i]=r.useState(!1),[l,c]=r.useState(""),[p,v]=r.useState(0),y=r.useRef(null),_=r.useRef(null),b=s!==void 0,M=b?s:a,k=r.useCallback(()=>{b||i(!1),o==null||o()},[b,o]);r.useEffect(()=>{const w=S=>{(S.ctrlKey||S.metaKey)&&S.key==="k"&&(S.preventDefault(),b||i(L=>!L)),S.key==="Escape"&&M&&k()};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[b,M,k]),r.useEffect(()=>{if(M){c(""),v(0);const w=setTimeout(()=>{var S;return(S=y.current)==null?void 0:S.focus()},30);return()=>clearTimeout(w)}},[M]);const $=(l.trim()?n.filter(w=>{var S,L;return w.label.toLowerCase().includes(l.toLowerCase())||((S=w.description)==null?void 0:S.toLowerCase().includes(l.toLowerCase()))||((L=w.group)==null?void 0:L.toLowerCase().includes(l.toLowerCase()))}):n).reduce((w,S)=>{const L=S.group??"Actions";return w[L]||(w[L]=[]),w[L].push(S),w},{}),z=Object.values($).flat(),q=w=>{var L;const S=(L=_.current)==null?void 0:L.querySelector(`[data-idx="${w}"]`);S==null||S.scrollIntoView({block:"nearest"})},G=w=>{w.key==="ArrowDown"?(w.preventDefault(),v(S=>{const L=Math.min(S+1,z.length-1);return q(L),L})):w.key==="ArrowUp"?(w.preventDefault(),v(S=>{const L=Math.max(S-1,0);return q(L),L})):w.key==="Enter"&&z[p]&&(z[p].onSelect(),k())};if(!M)return null;let H=0;return e.jsx("div",{className:De.overlay,onClick:k,role:"dialog","aria-modal":"true",children:e.jsxs("div",{className:De.palette,onClick:w=>w.stopPropagation(),onKeyDown:G,children:[e.jsxs("div",{className:De.searchRow,children:[e.jsx("span",{className:De.searchIconWrap,children:e.jsx(da,{})}),e.jsx("input",{ref:y,className:De.searchInput,placeholder:t,value:l,onChange:w=>{c(w.target.value),v(0)},"aria-label":"Command search"}),e.jsx("kbd",{className:De.escBadge,children:"Esc"})]}),e.jsxs("div",{className:De.results,ref:_,children:[z.length===0&&e.jsxs("div",{className:De.empty,children:["No results for “",l,"”"]}),Object.entries($).map(([w,S])=>e.jsxs("div",{className:De.group,children:[e.jsx("div",{className:De.groupLabel,children:w}),S.map(L=>{const I=H++;return e.jsxs("button",{"data-idx":I,className:[De.resultItem,I===p?De.resultActive:""].filter(Boolean).join(" "),onClick:()=>{L.onSelect(),k()},onMouseEnter:()=>v(I),children:[L.icon&&e.jsx("span",{className:De.resultIcon,children:L.icon}),e.jsx("span",{className:De.resultLabel,children:L.label}),L.description&&e.jsx("span",{className:De.resultDesc,children:L.description}),L.shortcut&&e.jsx("span",{className:De.resultShortcut,children:L.shortcut.map((ee,O)=>e.jsx("kbd",{children:ee},O))})]},L.label)})]},w))]}),e.jsxs("div",{className:De.footer,children:[e.jsxs("span",{children:[e.jsx("kbd",{children:"↑"}),e.jsx("kbd",{children:"↓"})," navigate"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"↵"})," select"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"Esc"})," close"]}),e.jsxs("span",{className:De.footerRight,children:[e.jsx("kbd",{children:la?"⌘":"Ctrl"}),e.jsx("kbd",{children:"K"})," toggle"]})]})]})})},ha="_field_l0kkf_1",pa="_fullWidth_l0kkf_8",_a="_label_l0kkf_12",fa="_inputWrapper_l0kkf_18",ma="_hasError_l0kkf_30",va="_sm_l0kkf_38",xa="_md_l0kkf_42",ga="_lg_l0kkf_46",ba="_input_l0kkf_18",ya="_adornment_l0kkf_69",wa="_trailingAdornment_l0kkf_78",ja="_errorText_l0kkf_83",ka="_helperText_l0kkf_89",Ve={field:ha,fullWidth:pa,label:_a,inputWrapper:fa,hasError:ma,sm:va,md:xa,lg:ga,input:ba,adornment:ya,trailingAdornment:wa,errorText:ja,helperText:ka},Na=({label:n,helperText:t,error:s,size:o="md",leadingAdornment:a,trailingAdornment:i,fullWidth:l=!1,className:c="",id:p,...v})=>{const y=p??(n==null?void 0:n.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:[Ve.field,l?Ve.fullWidth:"",c].filter(Boolean).join(" "),children:[n&&e.jsx("label",{htmlFor:y,className:Ve.label,children:n}),e.jsxs("div",{className:[Ve.inputWrapper,Ve[o],s?Ve.hasError:""].filter(Boolean).join(" "),children:[a&&e.jsx("span",{className:Ve.adornment,children:a}),e.jsx("input",{id:y,className:Ve.input,"aria-invalid":!!s,"aria-describedby":s?`${y}-error`:t?`${y}-helper`:void 0,...v}),i&&e.jsx("span",{className:`${Ve.adornment} ${Ve.trailingAdornment}`,children:i})]}),s&&e.jsx("p",{id:`${y}-error`,className:Ve.errorText,children:s}),!s&&t&&e.jsx("p",{id:`${y}-helper`,className:Ve.helperText,children:t})]})},Ea="_field_t1e02_1",Ta="_fullWidth_t1e02_9",Ia="_label_t1e02_13",$a="_shell_t1e02_19",Ca="_hasError_t1e02_33",Ma="_disabled_t1e02_39",La="_dragOver_t1e02_43",Da="_toolbar_t1e02_48",Ba="_divider_t1e02_61",Sa="_toolBtn_t1e02_69",Ra="_toolBtnActive_t1e02_101",Aa="_editor_t1e02_110",za="_editorEmpty_t1e02_122",Pa="_dropOverlay_t1e02_186",Oa="_linkPrompt_t1e02_202",Wa="_linkInput_t1e02_211",Ha="_linkBtn_t1e02_228",Fa="_linkBtnGhost_t1e02_229",qa="_helperText_t1e02_256",Va="_errorText_t1e02_262",Ne={field:Ea,fullWidth:Ta,label:Ia,shell:$a,hasError:Ca,disabled:Ma,dragOver:La,toolbar:Da,divider:Ba,toolBtn:Sa,toolBtnActive:Ra,editor:Aa,editorEmpty:za,dropOverlay:Pa,linkPrompt:Oa,linkInput:Wa,linkBtn:Ha,linkBtnGhost:Fa,helperText:qa,errorText:Va},Ce=({children:n})=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n}),Me={bold:e.jsxs(Ce,{children:[e.jsx("path",{d:"M6 4h8a4 4 0 0 1 0 8H6z"}),e.jsx("path",{d:"M6 12h9a4 4 0 0 1 0 8H6z"})]}),italic:e.jsxs(Ce,{children:[e.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),e.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),e.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),underline:e.jsxs(Ce,{children:[e.jsx("path",{d:"M6 3v7a6 6 0 0 0 12 0V3"}),e.jsx("line",{x1:"4",y1:"21",x2:"20",y2:"21"})]}),strike:e.jsxs(Ce,{children:[e.jsx("path",{d:"M16 4H9a3 3 0 0 0-2.83 4"}),e.jsx("path",{d:"M14 12a4 4 0 0 1 0 8H6"}),e.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]}),h1:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M17 10l3-2v10"})]}),h2:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"})]}),h3:e.jsxs(Ce,{children:[e.jsx("path",{d:"M4 12h8"}),e.jsx("path",{d:"M4 18V6"}),e.jsx("path",{d:"M12 18V6"}),e.jsx("path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"}),e.jsx("path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"})]}),paragraph:e.jsxs(Ce,{children:[e.jsx("path",{d:"M13 4v16"}),e.jsx("path",{d:"M17 4v16"}),e.jsx("path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13"})]}),ul:e.jsxs(Ce,{children:[e.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),e.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),e.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),e.jsx("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]}),ol:e.jsxs(Ce,{children:[e.jsx("line",{x1:"10",y1:"6",x2:"21",y2:"6"}),e.jsx("line",{x1:"10",y1:"12",x2:"21",y2:"12"}),e.jsx("line",{x1:"10",y1:"18",x2:"21",y2:"18"}),e.jsx("path",{d:"M4 6h1v4"}),e.jsx("path",{d:"M4 10h2"}),e.jsx("path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1"})]}),quote:e.jsxs(Ce,{children:[e.jsx("path",{d:"M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z"}),e.jsx("path",{d:"M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"})]}),code:e.jsxs(Ce,{children:[e.jsx("polyline",{points:"16 18 22 12 16 6"}),e.jsx("polyline",{points:"8 6 2 12 8 18"})]}),link:e.jsxs(Ce,{children:[e.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),e.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]}),image:e.jsxs(Ce,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),e.jsx("polyline",{points:"21 15 16 10 5 21"})]}),alignLeft:e.jsxs(Ce,{children:[e.jsx("line",{x1:"17",y1:"10",x2:"3",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"17",y1:"18",x2:"3",y2:"18"})]}),alignCenter:e.jsxs(Ce,{children:[e.jsx("line",{x1:"18",y1:"10",x2:"6",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"18",y1:"18",x2:"6",y2:"18"})]}),alignRight:e.jsxs(Ce,{children:[e.jsx("line",{x1:"21",y1:"10",x2:"7",y2:"10"}),e.jsx("line",{x1:"21",y1:"6",x2:"3",y2:"6"}),e.jsx("line",{x1:"21",y1:"14",x2:"3",y2:"14"}),e.jsx("line",{x1:"21",y1:"18",x2:"7",y2:"18"})]}),clear:e.jsx(Ce,{children:e.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),undo:e.jsxs(Ce,{children:[e.jsx("path",{d:"M3 7v6h6"}),e.jsx("path",{d:"M21 17a9 9 0 0 0-15-6.7L3 13"})]}),redo:e.jsxs(Ce,{children:[e.jsx("path",{d:"M21 7v6h-6"}),e.jsx("path",{d:"M3 17a9 9 0 0 1 15-6.7L21 13"})]})},Wt={bold:{label:"Bold",icon:Me.bold,command:"bold",shortcut:"⌘B"},italic:{label:"Italic",icon:Me.italic,command:"italic",shortcut:"⌘I"},underline:{label:"Underline",icon:Me.underline,command:"underline",shortcut:"⌘U"},strike:{label:"Strikethrough",icon:Me.strike,command:"strikeThrough",query:"strikeThrough"},h1:{label:"Heading 1",icon:Me.h1,command:"formatBlock",arg:"H1"},h2:{label:"Heading 2",icon:Me.h2,command:"formatBlock",arg:"H2"},h3:{label:"Heading 3",icon:Me.h3,command:"formatBlock",arg:"H3"},paragraph:{label:"Paragraph",icon:Me.paragraph,command:"formatBlock",arg:"P"},ul:{label:"Bulleted list",icon:Me.ul,command:"insertUnorderedList"},ol:{label:"Numbered list",icon:Me.ol,command:"insertOrderedList"},quote:{label:"Blockquote",icon:Me.quote,command:"formatBlock",arg:"BLOCKQUOTE"},code:{label:"Inline code",icon:Me.code,command:"formatBlock",arg:"PRE"},"align-left":{label:"Align left",icon:Me.alignLeft,command:"justifyLeft"},"align-center":{label:"Align center",icon:Me.alignCenter,command:"justifyCenter"},"align-right":{label:"Align right",icon:Me.alignRight,command:"justifyRight"},clear:{label:"Clear formatting",icon:Me.clear,command:"removeFormat"},undo:{label:"Undo",icon:Me.undo,command:"undo",shortcut:"⌘Z"},redo:{label:"Redo",icon:Me.redo,command:"redo",shortcut:"⇧⌘Z"}},Ua=["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"];function Ga(n){return typeof n=="object"&&n!==null}function Ka(n){return new Promise((t,s)=>{const o=new FileReader;o.onload=()=>t(String(o.result)),o.onerror=()=>s(o.error),o.readAsDataURL(n)})}function ht(n,t){try{document.execCommand(n,!1,t)}catch{}}const Qa=/^(?:P|DIV|H[1-6]|BLOCKQUOTE|PRE|UL|OL|LI|TABLE)$/;function Ct(n,t){const s=window.getSelection();if(!s||s.rangeCount===0)return null;const o=s.getRangeAt(0).startContainer,a=o.nodeType===1?o:o.parentElement;let i=null;try{i=(a==null?void 0:a.closest(t))??null}catch{return null}return i&&n.contains(i)&&i!==n?i:null}function pn(n,t){var y;const s=window.getSelection();if(!s||s.rangeCount===0)return!1;const o=s.getRangeAt(0),a=o.startContainer,i=a.nodeType===1?a:a.parentElement;if(!i)return!1;const l=[];let c=null;try{c=i.closest(t)}catch{return!1}for(;c&&n.contains(c)&&c!==n;)l.push(c),c=((y=c.parentElement)==null?void 0:y.closest(t))??null;if(l.length===0)return!1;const p=document.createElement("span");p.setAttribute("data-evo-caret",""),o.insertNode(p),l.forEach(_=>{if(Array.from(_.children).some(M=>Qa.test(M.tagName)))_.replaceWith(...Array.from(_.childNodes));else{const M=document.createElement("p");for(;_.firstChild;)M.appendChild(_.firstChild);M.childNodes.length||M.appendChild(document.createElement("br")),_.replaceWith(M)}});const v=n.querySelector("span[data-evo-caret]");if(v){const _=v.parentElement,b=document.createRange();b.setStartBefore(v),b.collapse(!0),s.removeAllRanges(),s.addRange(b),v.remove(),_&&!_.childNodes.length&&_.appendChild(document.createElement("br"))}return!0}function Ya(n){const t=/^(?:P|DIV|H[1-6]|UL|OL|PRE|BLOCKQUOTE|TABLE)$/,s=[];let o=[];const a=()=>{if(!o.length)return;const i=document.createElement("p");o.forEach(l=>i.appendChild(l)),o=[],s.push(i)};return Array.from(n.childNodes).forEach(i=>{if(i.nodeType===1&&t.test(i.tagName)){a();let l=i;if(l.tagName==="DIV"){const c=document.createElement("p");for(;l.firstChild;)c.appendChild(l.firstChild);l=c}s.push(l)}else o.push(i)}),a(),s.forEach(i=>{!i.textContent&&!i.querySelector("br,img")&&i.appendChild(document.createElement("br"))}),s}function Xa(n){const t=window.getSelection();if(!t||t.rangeCount===0)return!1;const s=t.getRangeAt(0);if(!s.collapsed)return!1;const o=s.startContainer,a=o.nodeType===1?o:o.parentElement,i=(a==null?void 0:a.closest("pre,blockquote"))??null;if(!i||!n.contains(i)||i===n)return!1;const l=document.createRange();l.setStart(s.startContainer,s.startOffset),l.setEnd(i,i.childNodes.length);const c=Ya(l.extractContents());if(c.length===0){const y=document.createElement("p");y.appendChild(document.createElement("br")),c.push(y)}let p=i;c.forEach(y=>{p.after(y),p=y}),i.firstChild||i.remove();const v=document.createRange();return v.setStart(c[0],0),v.collapse(!0),t.removeAllRanges(),t.addRange(v),!0}const Ja=["bold","italic","underline","divider","h1","h2","divider","ul","ol","divider","link","image"],Za=r.forwardRef(function({value:t,defaultValue:s,onChange:o,tools:a=Ja,placeholder:i="Start writing…",minHeight:l=160,maxHeight:c,disabled:p=!1,readOnly:v=!1,label:y,helperText:_,error:b,fullWidth:M=!1,onImageUpload:k,acceptedImageTypes:D=Ua,maxImageSize:$,onImageError:z,className:q="",id:G},H){const w=r.useRef(null),S=r.useRef(null),L=r.useRef(""),I=t!==void 0,[ee,O]=r.useState({}),[x,Q]=r.useState(!0),[B,re]=r.useState(!1),[N,V]=r.useState(null),Y=G??(y==null?void 0:y.toLowerCase().replace(/\s+/g,"-"))??void 0;r.useEffect(()=>{var u,E;const m=w.current;m&&(I?t!==L.current&&(m.innerHTML=t??"",L.current=t??"",Q(!((u=m.textContent)!=null&&u.trim()))):s&&!L.current&&(m.innerHTML=s,L.current=s,Q(!((E=m.textContent)!=null&&E.trim()))))},[t,s,I]);const se=r.useCallback(()=>{const m=w.current,u={};Object.entries(Wt).forEach(([E,T])=>{try{T.command==="formatBlock"?m?(T.arg??"").toUpperCase()==="P"?u[E]=!!Ct(m,"P,DIV")&&!Ct(m,"BLOCKQUOTE,PRE,H1,H2,H3,H4,H5,H6"):u[E]=!!Ct(m,T.arg??""):u[E]=!1:u[E]=document.queryCommandState(T.query??T.command)}catch{u[E]=!1}}),O(u)},[]),J=r.useCallback(()=>{var E;const m=w.current;if(!m)return;const u=m.innerHTML;L.current=u,Q(!((E=m.textContent)!=null&&E.trim())&&!m.querySelector("img")),o==null||o(u),se()},[o,se]);r.useImperativeHandle(H,()=>({getHTML:()=>{var m;return((m=w.current)==null?void 0:m.innerHTML)??""},setHTML:m=>{const u=w.current;u&&(u.innerHTML=m,J())},getText:()=>{var m;return((m=w.current)==null?void 0:m.textContent)??""},focus:()=>{var m;return(m=w.current)==null?void 0:m.focus()},insertImage:(m,u="")=>de(m,u),insertHTML:m=>{var u;(u=w.current)==null||u.focus(),ht("insertHTML",m),J()},clear:()=>{const m=w.current;m&&(m.innerHTML="",J())}}),[J]);const de=r.useCallback((m,u="")=>{var T;(T=w.current)==null||T.focus();const E=`<img src="${m.replace(/"/g,"&quot;")}" alt="${u.replace(/"/g,"&quot;")}" />`;ht("insertHTML",E),J()},[J]),te=r.useCallback(async m=>{if(!D.includes(m.type)){z==null||z({code:"wrong-type",message:`Unsupported image type: ${m.type}`});return}if($&&m.size>$){z==null||z({code:"too-large",message:`Image exceeds ${($/1024/1024).toFixed(1)} MB`});return}try{const u=k?await k(m):await Ka(m);de(u,m.name)}catch(u){z==null||z({code:"upload-failed",message:u instanceof Error?u.message:"Upload failed"})}},[D,$,k,z,de]),oe=r.useCallback(m=>{const u=w.current;u==null||u.focus();const E=Wt[m];if(E){if(E.command==="formatBlock"&&u){const T=E.arg??"";T.toUpperCase()!=="P"&&Ct(u,T)?pn(u,T):(pn(u,"BLOCKQUOTE,PRE,H1,H2,H3,H4,H5,H6"),ht("formatBlock",T))}else ht(E.command,E.arg);J()}},[J]),ae=r.useCallback(()=>{var m;(m=S.current)==null||m.click()},[]),Ee=r.useCallback(()=>{const m=window.getSelection(),u=m&&m.rangeCount>0?m.getRangeAt(0).cloneRange():null;V({url:"https://",range:u})},[]),Te=r.useCallback(()=>{var E,T;if(!N)return;const{url:m,range:u}=N;if((E=w.current)==null||E.focus(),u){const U=window.getSelection();U==null||U.removeAllRanges(),U==null||U.addRange(u)}if(m&&m!=="https://"){ht("createLink",m);const U=(T=w.current)==null?void 0:T.querySelectorAll('a[href="'+m+'"]');U==null||U.forEach(ge=>ge.setAttribute("target","_blank"))}V(null),J()},[N,J]),be=r.useCallback(()=>{J()},[J]),ce=r.useCallback(m=>{if(m.key==="Enter"&&!m.shiftKey&&!m.metaKey&&!m.ctrlKey&&!m.altKey){const T=w.current;if(T&&Xa(T)){m.preventDefault(),J();return}}if(!(m.metaKey||m.ctrlKey))return;const E=m.key.toLowerCase();E==="b"?(m.preventDefault(),oe("bold")):E==="i"?(m.preventDefault(),oe("italic")):E==="u"&&(m.preventDefault(),oe("underline"))},[oe,J]),Be=r.useCallback(async m=>{var T,U;const u=(T=m.clipboardData)==null?void 0:T.items;if(!u)return;for(let ge=0;ge<u.length;ge++){const ue=u[ge];if(ue.type.startsWith("image/")){m.preventDefault();const Pe=ue.getAsFile();Pe&&await te(Pe);return}}const E=(U=m.clipboardData)==null?void 0:U.getData("text/plain");E!==void 0&&E!==""&&(m.preventDefault(),ht("insertText",E))},[te]),ye=r.useCallback(m=>{m.dataTransfer.types.includes("Files")&&(m.preventDefault(),re(!0))},[]),ve=r.useCallback(()=>re(!1),[]),le=r.useCallback(async m=>{re(!1);const u=Array.from(m.dataTransfer.files??[]).filter(E=>E.type.startsWith("image/"));if(u.length!==0){m.preventDefault();for(const E of u)await te(E)}},[te]),xe=r.useCallback(async m=>{const u=Array.from(m.target.files??[]);m.target.value="";for(const E of u)await te(E)},[te]);r.useEffect(()=>{const m=()=>{const u=w.current;u&&(document.activeElement===u||u.contains(document.activeElement))&&se()};return document.addEventListener("selectionchange",m),()=>document.removeEventListener("selectionchange",m)},[se]);const We=r.useMemo(()=>a.length>0?e.jsx("div",{className:Ne.toolbar,role:"toolbar","aria-label":"Formatting toolbar",children:a.map((u,E)=>{var ge;if(u==="divider")return e.jsx("span",{className:Ne.divider,"aria-hidden":"true"},`d-${E}`);if(Ga(u)){const ue=((ge=u.isActive)==null?void 0:ge.call(u))??!1;return e.jsx("button",{type:"button",className:[Ne.toolBtn,ue?Ne.toolBtnActive:""].filter(Boolean).join(" "),title:u.label,"aria-label":u.label,"aria-pressed":ue,disabled:p||v,onMouseDown:Pe=>Pe.preventDefault(),onClick:()=>u.onAction(we()),children:u.icon},u.key)}if(u==="image")return e.jsx("button",{type:"button",className:Ne.toolBtn,title:"Insert image","aria-label":"Insert image",disabled:p||v,onMouseDown:ue=>ue.preventDefault(),onClick:ae,children:Me.image},"image");if(u==="link")return e.jsx("button",{type:"button",className:Ne.toolBtn,title:"Insert link","aria-label":"Insert link",disabled:p||v,onMouseDown:ue=>ue.preventDefault(),onClick:Ee,children:Me.link},"link");const T=Wt[u];if(!T)return null;const U=!!ee[u];return e.jsx("button",{type:"button",className:[Ne.toolBtn,U?Ne.toolBtnActive:""].filter(Boolean).join(" "),title:`${T.label}${T.shortcut?` (${T.shortcut})`:""}`,"aria-label":T.label,"aria-pressed":U,disabled:p||v,onMouseDown:ue=>ue.preventDefault(),onClick:()=>oe(u),children:T.icon},u)})}):null,[a,ee,p,v,ae,Ee,oe]),we=r.useCallback(()=>({getHTML:()=>{var m;return((m=w.current)==null?void 0:m.innerHTML)??""},setHTML:m=>{const u=w.current;u&&(u.innerHTML=m,J())},getText:()=>{var m;return((m=w.current)==null?void 0:m.textContent)??""},focus:()=>{var m;return(m=w.current)==null?void 0:m.focus()},insertImage:(m,u="")=>de(m,u),insertHTML:m=>{var u;(u=w.current)==null||u.focus(),ht("insertHTML",m),J()},clear:()=>{const m=w.current;m&&(m.innerHTML="",J())}}),[J,de]),ke={minHeight:typeof l=="number"?`${l}px`:l,maxHeight:c!==void 0?typeof c=="number"?`${c}px`:c:void 0};return e.jsxs("div",{className:[Ne.field,M?Ne.fullWidth:"",q].filter(Boolean).join(" "),children:[y&&e.jsx("label",{htmlFor:Y,className:Ne.label,children:y}),e.jsxs("div",{className:[Ne.shell,b?Ne.hasError:"",p?Ne.disabled:"",B?Ne.dragOver:""].filter(Boolean).join(" "),children:[We,e.jsx("div",{ref:w,id:Y,className:[Ne.editor,x?Ne.editorEmpty:""].filter(Boolean).join(" "),contentEditable:!p&&!v,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":y??"Rich text editor","aria-invalid":!!b,"aria-readonly":v,"aria-disabled":p,"data-placeholder":i,style:ke,onInput:be,onKeyDown:ce,onPaste:Be,onDragOver:ye,onDragLeave:ve,onDrop:le,onBlur:se}),B&&e.jsx("div",{className:Ne.dropOverlay,"aria-hidden":"true",children:e.jsx("span",{children:"Drop image to upload"})}),N&&e.jsxs("div",{className:Ne.linkPrompt,role:"dialog","aria-label":"Insert link",children:[e.jsx("input",{type:"url",className:Ne.linkInput,value:N.url,autoFocus:!0,onChange:m=>V({...N,url:m.target.value}),onKeyDown:m=>{m.key==="Enter"?(m.preventDefault(),Te()):m.key==="Escape"&&(m.preventDefault(),V(null))},placeholder:"https://example.com"}),e.jsx("button",{type:"button",className:Ne.linkBtn,onClick:Te,children:"Apply"}),e.jsx("button",{type:"button",className:Ne.linkBtnGhost,onClick:()=>V(null),children:"Cancel"})]}),e.jsx("input",{ref:S,type:"file",accept:D.join(","),multiple:!0,hidden:!0,onChange:xe})]}),b&&e.jsx("p",{className:Ne.errorText,children:b}),!b&&_&&e.jsx("p",{className:Ne.helperText,children:_})]})}),ei="_field_121w6_7",ti="_fullWidth_121w6_15",ni="_disabled_121w6_19",si="_trigger_121w6_19",oi="_label_121w6_25",ri="_selectWrapper_121w6_33",ai="_open_121w6_66",ii="_hasError_121w6_70",ci="_sm_121w6_82",li="_md_121w6_89",di="_lg_121w6_95",ui="_triggerValue_121w6_102",hi="_triggerPlaceholder_121w6_103",pi="_triggerChips_121w6_113",_i="_chipRow_121w6_120",fi="_chip_121w6_120",mi="_chipIcon_121w6_143",vi="_chipLabel_121w6_151",xi="_chipRemove_121w6_158",gi="_countMore_121w6_175",bi="_triggerText_121w6_185",yi="_triggerIcon_121w6_192",wi="_triggerActions_121w6_200",ji="_clearBtn_121w6_208",ki="_chevron_121w6_225",Ni="_chevronOpen_121w6_233",Ei="_menu_121w6_245",Ti="_menuOpen_121w6_1",Ii="_searchRow_121w6_271",$i="_searchIconWrap_121w6_280",Ci="_searchInput_121w6_286",Mi="_bulkRow_121w6_302",Li="_bulkBtn_121w6_311",Di="_bulkCount_121w6_333",Bi="_list_121w6_341",Si="_empty_121w6_367",Ri="_option_121w6_375",Ai="_optionActive_121w6_396",zi="_optionDisabled_121w6_396",Pi="_optionSelected_121w6_401",Oi="_optionTitle_121w6_404",Wi="_optionIcon_121w6_413",Hi="_optionLabel_121w6_424",Fi="_optionDesc_121w6_439",qi="_check_121w6_448",Vi="_checkbox_121w6_459",Ui="_checkboxChecked_121w6_473",Gi="_errorText_121w6_484",Ki="_helperText_121w6_491",K={field:ei,fullWidth:ti,disabled:ni,trigger:si,label:oi,selectWrapper:ri,open:ai,hasError:ii,sm:ci,md:li,lg:di,triggerValue:ui,triggerPlaceholder:hi,triggerChips:pi,chipRow:_i,chip:fi,chipIcon:mi,chipLabel:vi,chipRemove:xi,countMore:gi,triggerText:bi,triggerIcon:yi,triggerActions:wi,clearBtn:ji,chevron:ki,chevronOpen:Ni,menu:Ei,menuOpen:Ti,searchRow:Ii,searchIconWrap:$i,searchInput:Ci,bulkRow:Mi,bulkBtn:Li,bulkCount:Di,list:Bi,empty:Si,option:Ri,optionActive:Ai,optionDisabled:zi,optionSelected:Pi,optionTitle:Oi,optionIcon:Wi,optionLabel:Hi,optionDesc:Fi,check:qi,checkbox:Vi,checkboxChecked:Ui,errorText:Gi,helperText:Ki},Qi=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),_n=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),fn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),Yi=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Xi=n=>{const{label:t,options:s,placeholder:o="Select an option",helperText:a,error:i,size:l="md",fullWidth:c=!1,disabled:p=!1,searchable:v=!1,clearable:y=!1,id:_,name:b,className:M=""}=n,k=n.multiple===!0,D=k?n.multipleDisplay??"chips":"chips",$=k?n.maxSelections:void 0,z=k?n.showSelectAll??!1:!1,q=r.useId(),G=_??`evo-select-${q}`,H=`${G}-listbox`,w=n.value,S=n.defaultValue,L=w!==void 0,I=k?Array.isArray(S)?S:[]:typeof S=="string"?S:"",[ee,O]=r.useState(I),x=L?w:ee,Q=k?Array.isArray(x)?x:[]:typeof x=="string"&&x?[x]:[],[B,re]=r.useState(!1),[N,V]=r.useState(-1),[Y,se]=r.useState(""),J=r.useRef(null),de=r.useRef(null),te=r.useRef(null),oe=r.useRef(null),ae=v&&Y?s.filter(u=>u.label.toLowerCase().includes(Y.toLowerCase())):s,Ee=k?void 0:s.find(u=>u.value===x),Te=k?s.filter(u=>Q.includes(u.value)):[],be=k&&$!==void 0&&Q.length>=$,ce=r.useCallback(u=>{var E,T;L||O(u),k?(E=n.onChange)==null||E.call(n,u):(T=n.onChange)==null||T.call(n,u)},[L,k,n.onChange]),Be=r.useCallback(u=>{if(k){const E=Array.isArray(x)?x:[];if(E.includes(u))ce(E.filter(T=>T!==u));else{if($!==void 0&&E.length>=$)return;ce([...E,u])}}else ce(u)},[ce,k,$,x]);r.useEffect(()=>{if(!B)return;const u=E=>{var T;(T=J.current)!=null&&T.contains(E.target)||(re(!1),se(""))};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[B]),r.useEffect(()=>{if(B){const u=ae.findIndex(E=>Q.includes(E.value));if(V(u>=0?u:ae.findIndex(E=>!E.disabled)),v){const E=setTimeout(()=>{var T;return(T=te.current)==null?void 0:T.focus()},30);return()=>clearTimeout(E)}}else se(""),V(-1)},[B]),r.useEffect(()=>{var E;if(!B||N<0)return;const u=(E=oe.current)==null?void 0:E.querySelector(`[data-idx="${N}"]`);u==null||u.scrollIntoView({block:"nearest"})},[N,B]);const ye=u=>{if(ae.length===0)return;let E=N;for(let T=0;T<ae.length;T++)if(E=(E+u+ae.length)%ae.length,!ae[E].disabled){V(E);return}},ve=u=>{var E,T;if(!p){if(!B){(u.key==="Enter"||u.key===" "||u.key==="ArrowDown"||u.key==="ArrowUp")&&(u.preventDefault(),re(!0));return}if(u.key==="Escape")u.preventDefault(),re(!1),(E=de.current)==null||E.focus();else if(u.key==="ArrowDown")u.preventDefault(),ye(1);else if(u.key==="ArrowUp")u.preventDefault(),ye(-1);else if(u.key==="Enter"){u.preventDefault();const U=ae[N];if(U&&!U.disabled){if(!Q.includes(U.value)&&be)return;Be(U.value),k||(re(!1),(T=de.current)==null||T.focus())}}else if(u.key==="Home"){u.preventDefault();const U=ae.findIndex(ge=>!ge.disabled);U>=0&&V(U)}else if(u.key==="End"){u.preventDefault();for(let U=ae.length-1;U>=0;U--)if(!ae[U].disabled){V(U);break}}else u.key==="Tab"&&re(!1)}},le=u=>{var T;u.disabled||!Q.includes(u.value)&&be||(Be(u.value),k||(re(!1),(T=de.current)==null||T.focus()))},xe=u=>{u.stopPropagation(),ce(k?[]:"")},We=(u,E)=>{if(u.stopPropagation(),!k)return;const T=Array.isArray(x)?x:[];ce(T.filter(U=>U!==E))},we=()=>{if(!k)return;const u=ae.filter(U=>!U.disabled).map(U=>U.value),E=Array.from(new Set([...Array.isArray(x)?x:[],...u])),T=$!==void 0?E.slice(0,$):E;ce(T)},ke=k?Q.length>0:!!x,m=()=>{var u;if(!ke)return e.jsx("span",{className:K.triggerPlaceholder,children:e.jsx("span",{className:K.triggerText,children:o})});if(!k)return e.jsxs("span",{className:K.triggerValue,children:[(Ee==null?void 0:Ee.icon)&&e.jsx("span",{className:K.triggerIcon,children:Ee.icon}),e.jsx("span",{className:K.triggerText,children:Ee==null?void 0:Ee.label})]});if(D==="count"){const E=((u=Te[0])==null?void 0:u.label)??"",T=Te.length-1;return e.jsx("span",{className:K.triggerValue,children:e.jsxs("span",{className:K.triggerText,children:[E,T>0&&e.jsxs("span",{className:K.countMore,children:[", +",T," more"]})]})})}return e.jsx("span",{className:K.chipRow,children:Te.map(E=>e.jsxs("span",{className:K.chip,children:[E.icon&&e.jsx("span",{className:K.chipIcon,children:E.icon}),e.jsx("span",{className:K.chipLabel,children:E.label}),!p&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":`Remove ${E.label}`,className:K.chipRemove,onClick:T=>We(T,E.value),onMouseDown:T=>T.preventDefault(),children:e.jsx(fn,{})})]},E.value))})};return e.jsxs("div",{ref:J,className:[K.field,c?K.fullWidth:"",p?K.disabled:"",M].filter(Boolean).join(" "),children:[t&&e.jsx("label",{htmlFor:G,className:K.label,children:t}),e.jsxs("div",{className:K.selectWrapper,children:[e.jsxs("button",{ref:de,id:G,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":B,"aria-controls":H,"aria-invalid":!!i,"aria-multiselectable":k||void 0,disabled:p,className:[K.trigger,K[l],B?K.open:"",i?K.hasError:"",k&&D==="chips"&&Q.length>0?K.triggerChips:""].filter(Boolean).join(" "),onClick:()=>!p&&re(u=>!u),onKeyDown:ve,children:[m(),e.jsxs("span",{className:K.triggerActions,children:[y&&ke&&!p&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Clear selection",className:K.clearBtn,onClick:xe,onMouseDown:u=>u.preventDefault(),children:e.jsx(fn,{})}),e.jsx("span",{className:[K.chevron,B?K.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(Qi,{})})]})]}),B&&e.jsxs("div",{className:K.menu,role:"listbox",id:H,"aria-labelledby":G,"aria-multiselectable":k||void 0,"aria-activedescendant":N>=0?`${G}-opt-${N}`:void 0,children:[v&&e.jsxs("div",{className:K.searchRow,children:[e.jsx("span",{className:K.searchIconWrap,children:e.jsx(Yi,{})}),e.jsx("input",{ref:te,type:"text",className:K.searchInput,placeholder:"Search...",value:Y,onChange:u=>{se(u.target.value),V(0)},onKeyDown:ve})]}),k&&z&&ae.length>0&&e.jsxs("div",{className:K.bulkRow,children:[e.jsx("button",{type:"button",className:K.bulkBtn,onClick:we,disabled:$!==void 0&&Q.length>=$,children:"Select all"}),e.jsx("button",{type:"button",className:K.bulkBtn,onClick:()=>ce([]),disabled:Q.length===0,children:"Clear all"}),$!==void 0&&e.jsxs("span",{className:K.bulkCount,children:[Q.length," / ",$]})]}),e.jsx("div",{className:K.list,ref:oe,role:"presentation",children:ae.length===0?e.jsx("div",{className:K.empty,children:"No results"}):ae.map((u,E)=>{const T=Q.includes(u.value),U=E===N,ge=!T&&be,ue=u.disabled||ge;return e.jsxs("div",{id:`${G}-opt-${E}`,role:"option","aria-selected":T,"aria-disabled":ue,"data-idx":E,className:[K.option,T?K.optionSelected:"",U?K.optionActive:"",ue?K.optionDisabled:""].filter(Boolean).join(" "),onClick:()=>!ue&&le(u),onMouseEnter:()=>!ue&&V(E),children:[k&&e.jsx("span",{className:[K.checkbox,T?K.checkboxChecked:""].filter(Boolean).join(" "),"aria-hidden":"true",children:T&&e.jsx(_n,{})}),u.icon&&e.jsx("span",{className:K.optionIcon,children:u.icon}),e.jsxs("span",{className:K.optionLabel,children:[e.jsx("span",{className:K.optionTitle,children:u.label}),u.description&&e.jsx("span",{className:K.optionDesc,children:u.description})]}),!k&&e.jsx("span",{className:K.check,"aria-hidden":!0,children:T&&e.jsx(_n,{})})]},u.value)})})]}),b&&!k&&e.jsx("input",{type:"hidden",name:b,value:x}),b&&k&&Q.map(u=>e.jsx("input",{type:"hidden",name:b,value:u},u))]}),i&&e.jsx("p",{className:K.errorText,children:i}),!i&&a&&e.jsx("p",{className:K.helperText,children:a})]})},Ji="_field_sc9v8_16",Zi="_fullWidth_sc9v8_24",ec="_disabled_sc9v8_28",tc="_trigger_sc9v8_28",nc="_label_sc9v8_34",sc="_selectWrapper_sc9v8_41",oc="_open_sc9v8_70",rc="_hasError_sc9v8_74",ac="_sm_sc9v8_86",ic="_md_sc9v8_93",cc="_lg_sc9v8_99",lc="_triggerValue_sc9v8_106",dc="_triggerPlaceholder_sc9v8_107",uc="_triggerText_sc9v8_120",hc="_triggerActions_sc9v8_127",pc="_chip_sc9v8_136",_c="_chipLabel_sc9v8_152",fc="_chipRemove_sc9v8_158",mc="_chipOverflow_sc9v8_174",vc="_clearBtn_sc9v8_188",xc="_chevron_sc9v8_204",gc="_chevronOpen_sc9v8_212",bc="_menu_sc9v8_224",yc="_menuOpen_sc9v8_1",wc="_searchRow_sc9v8_250",jc="_searchIconWrap_sc9v8_259",kc="_searchInput_sc9v8_265",Nc="_tree_sc9v8_281",Ec="_empty_sc9v8_306",Tc="_row_sc9v8_314",Ic="_rowDisabled_sc9v8_331",$c="_rowActive_sc9v8_335",Cc="_rowSelected_sc9v8_340",Mc="_rowLabel_sc9v8_343",Lc="_indent_sc9v8_353",Dc="_indentUnit_sc9v8_359",Bc="_toggle_sc9v8_375",Sc="_toggleOpen_sc9v8_391",Rc="_togglePlaceholder_sc9v8_396",Ac="_spinner_sc9v8_403",zc="_spin_sc9v8_403",Pc="_checkbox_sc9v8_418",Oc="_checkboxChecked_sc9v8_436",Wc="_checkboxMixed_sc9v8_442",Hc="_rowIcon_sc9v8_449",Fc="_rowText_sc9v8_459",qc="_rowDesc_sc9v8_474",Vc="_match_sc9v8_483",Uc="_check_sc9v8_418",Gc="_menuFooter_sc9v8_502",Kc="_footerBtn_sc9v8_513",Qc="_errorText_sc9v8_529",Yc="_helperText_sc9v8_536",F={field:Ji,fullWidth:Zi,disabled:ec,trigger:tc,label:nc,selectWrapper:sc,open:oc,hasError:rc,sm:ac,md:ic,lg:cc,triggerValue:lc,triggerPlaceholder:dc,triggerText:uc,triggerActions:hc,chip:pc,chipLabel:_c,chipRemove:fc,chipOverflow:mc,clearBtn:vc,chevron:xc,chevronOpen:gc,menu:bc,menuOpen:yc,searchRow:wc,searchIconWrap:jc,searchInput:kc,tree:Nc,empty:Ec,row:Tc,rowDisabled:Ic,rowActive:$c,rowSelected:Cc,rowLabel:Mc,indent:Lc,indentUnit:Dc,toggle:Bc,toggleOpen:Sc,togglePlaceholder:Rc,spinner:Ac,spin:zc,checkbox:Pc,checkboxChecked:Oc,checkboxMixed:Wc,rowIcon:Hc,rowText:Fc,rowDesc:qc,match:Vc,check:Uc,menuFooter:Gc,footerBtn:Kc,errorText:Qc,helperText:Yc},Xc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),Jc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),mn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Zc=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"10",height:"10",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 8h8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),vn=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),el=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),tl=n=>{const t=new Map,s=new Map,o=new Set,a=(i,l)=>{for(const c of i)t.set(c.value,c),s.set(c.value,l),!c.children||c.children.length===0?c.isLeaf!==!1&&o.add(c.value):a(c.children,c.value)};return a(n,null),{nodeByValue:t,parentByValue:s,leafValues:o}},bt=(n,t=[])=>{if(!n.children||n.children.length===0)return t.push(n.value),t;for(const s of n.children)bt(s,t);return t},nl=(n,t,s)=>{const o=new Set,a=new Set,i=(l,c)=>{let p=!1;for(const v of l){const y=s(v,t),_=v.children?i(v.children,[...c,v.value]):!1;(y||_)&&(o.add(v.value),c.forEach(b=>o.add(b)),p=!0,y&&a.add(v.value))}return p};return i(n,[]),{visible:o,matched:a}},sl=(n,t)=>n.label.toLowerCase().includes(t.toLowerCase()),ol=(n,t)=>{if(!t)return n;const s=n.toLowerCase().indexOf(t.toLowerCase());return s===-1?n:e.jsxs(e.Fragment,{children:[n.slice(0,s),e.jsx("span",{className:F.match,children:n.slice(s,s+t.length)}),n.slice(s+t.length)]})},rl=({data:n,value:t,defaultValue:s,onChange:o,multiple:a=!1,checkStrictly:i=!1,checkedStrategy:l="leaf",expandedKeys:c,defaultExpandedKeys:p,onExpandedChange:v,defaultExpandAll:y=!1,loadChildren:_,searchable:b=!1,filter:M=sl,maxTagCount:k=3,label:D,placeholder:$=a?"Select items":"Select an item",helperText:z,error:q,size:G="md",fullWidth:H=!1,disabled:w=!1,clearable:S=!1,id:L,name:I,className:ee=""})=>{const O=r.useId(),x=L??`evo-tree-${O}`,Q=`${x}-tree`,B=t!==void 0,re=r.useMemo(()=>{const h=B?t:s;return h==null?[]:Array.isArray(h)?h:[h]},[]),[N,V]=r.useState(re),Y=r.useMemo(()=>B?t==null?[]:Array.isArray(t)?t:[t]:N,[B,t,N]),[se,J]=r.useState({}),[de,te]=r.useState(new Set),oe=r.useMemo(()=>{if(Object.keys(se).length===0)return n;const h=d=>d.map(g=>{const R=se[g.value]??g.children;return R?{...g,children:h(R)}:g});return h(n)},[n,se]),ae=r.useMemo(()=>tl(oe),[oe]),Ee=r.useMemo(()=>{if(c)return c;if(p)return p;if(y){const h=[],d=g=>g.forEach(j=>{j.children&&j.children.length&&(h.push(j.value),d(j.children))});return d(n),h}return[]},[]),[Te,be]=r.useState(Ee),ce=c??Te,Be=r.useMemo(()=>new Set(ce),[ce]),ye=r.useCallback(h=>{c===void 0&&be(h),v==null||v(h)},[c,v]),[ve,le]=r.useState(!1),[xe,We]=r.useState(""),[we,ke]=r.useState(-1),m=r.useRef(null),u=r.useRef(null),E=r.useRef(null),T=r.useRef(null),U=r.useMemo(()=>!b||!xe.trim()?null:nl(oe,xe,M),[oe,xe,b,M]),ge=r.useMemo(()=>U?U.visible:Be,[U,Be]),ue=r.useMemo(()=>{const h=[],d=(g,j)=>{for(const R of g){if(U&&!U.visible.has(R.value))continue;const Z=R.children&&R.children.length>0||R.isLeaf===!1;h.push({node:R,level:j,hasChildren:Z}),Z&&ge.has(R.value)&&R.children&&d(R.children,j+1)}};return d(oe,0),h},[oe,ge,U]),Pe=r.useMemo(()=>new Set(Y),[Y]),ze=r.useCallback(h=>{if(!a||i||!h.children||h.children.length===0)return Pe.has(h.value)?"checked":"unchecked";const d=bt(h);if(d.length===0)return Pe.has(h.value)?"checked":"unchecked";let g=0;for(const j of d)Pe.has(j)&&g++;return g===0?"unchecked":g===d.length?"checked":"mixed"},[a,i,Pe]),He=r.useCallback(h=>{if(!a||i)return Array.from(h);if(l==="leaf")return Array.from(h).filter(j=>ae.leafValues.has(j));if(l==="all"){const j=new Set(h),R=Z=>{for(const pe of Z)pe.children&&pe.children.length&&(R(pe.children),bt(pe).every(je=>h.has(je))&&j.add(pe.value))};return R(oe),Array.from(j)}const d=[],g=j=>{for(const R of j)R.children&&R.children.length?bt(R).every(pe=>h.has(pe))?d.push(R.value):g(R.children):h.has(R.value)&&d.push(R.value)};return g(oe),d},[a,i,l,oe,ae.leafValues]),Le=r.useCallback(h=>{const d=He(h);B||V(d);const g=d.map(j=>ae.nodeByValue.get(j)).filter(Boolean);o==null||o(d,g)},[He,B,ae.nodeByValue,o]),Qe=r.useCallback(h=>{B||V(h?[h]:[]),o==null||o(h,h?ae.nodeByValue.get(h)??null:null)},[B,ae.nodeByValue,o]),Ze=r.useMemo(()=>{if(!a||i)return new Set(Y);const h=new Set;for(const d of Y){const g=ae.nodeByValue.get(d);if(!g){h.add(d);continue}!g.children||g.children.length===0?h.add(d):bt(g).forEach(j=>h.add(j))}return h},[Y,a,i,ae.nodeByValue]),nt=r.useCallback(h=>{if(Be.has(h.value)){ye(ce.filter(j=>j!==h.value));return}ye([...ce,h.value]),_&&!se[h.value]&&(h.isLeaf===!1||!h.children&&h.isLeaf!==!0)&&(te(j=>new Set(j).add(h.value)),_(h).then(j=>{J(R=>({...R,[h.value]:j}))}).finally(()=>{te(j=>{const R=new Set(j);return R.delete(h.value),R})}))},[ce,Be,ye,_,se]),Ye=r.useCallback(h=>{var R;if(h.disabled)return;if(!a){Qe(h.value),le(!1),(R=u.current)==null||R.focus();return}if(i){const Z=new Set(Y);Z.has(h.value)?Z.delete(h.value):Z.add(h.value);const pe=Array.from(Z);B||V(pe);const Se=pe.map(je=>ae.nodeByValue.get(je)).filter(Boolean);o==null||o(pe,Se);return}const d=new Set(Ze),g=ze(h),j=h.children&&h.children.length?bt(h):[h.value];g==="checked"?j.forEach(Z=>d.delete(Z)):j.forEach(Z=>d.add(Z)),Le(d)},[a,i,Y,Ze,ze,Le,Qe,B,ae.nodeByValue,o]);r.useEffect(()=>{if(!ve)return;const h=d=>{var g;(g=m.current)!=null&&g.contains(d.target)||(le(!1),We(""))};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[ve]),r.useEffect(()=>{if(ve){const h=ue.findIndex(d=>Pe.has(d.node.value));if(ke(h>=0?h:ue.findIndex(d=>!d.node.disabled)),b){const d=setTimeout(()=>{var g;return(g=E.current)==null?void 0:g.focus()},30);return()=>clearTimeout(d)}}else We(""),ke(-1)},[ve]),r.useEffect(()=>{var d;if(!ve||we<0)return;const h=(d=T.current)==null?void 0:d.querySelector(`[data-idx="${we}"]`);h==null||h.scrollIntoView({block:"nearest"})},[we,ve]);const lt=h=>{if(ue.length===0)return;let d=we;for(let g=0;g<ue.length;g++)if(d=(d+h+ue.length)%ue.length,!ue[d].node.disabled){ke(d);return}},dt=h=>{var g;if(w)return;if(!ve){(h.key==="Enter"||h.key===" "||h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),le(!0));return}const d=ue[we];if(h.key==="Escape")h.preventDefault(),le(!1),(g=u.current)==null||g.focus();else if(h.key==="ArrowDown")h.preventDefault(),lt(1);else if(h.key==="ArrowUp")h.preventDefault(),lt(-1);else if(h.key==="ArrowRight"){if(!d)return;if(h.preventDefault(),d.hasChildren&&!Be.has(d.node.value))nt(d.node);else if(d.hasChildren){const j=we+1;j<ue.length&&ue[j].level>d.level&&ke(j)}}else if(h.key==="ArrowLeft"){if(!d)return;if(h.preventDefault(),d.hasChildren&&Be.has(d.node.value))nt(d.node);else for(let j=we-1;j>=0;j--)if(ue[j].level<d.level){ke(j);break}}else if(h.key==="Enter")h.preventDefault(),d&&Ye(d.node);else if(h.key===" "&&a)h.preventDefault(),d&&Ye(d.node);else if(h.key==="Home"){h.preventDefault();const j=ue.findIndex(R=>!R.node.disabled);j>=0&&ke(j)}else if(h.key==="End"){h.preventDefault();for(let j=ue.length-1;j>=0;j--)if(!ue[j].node.disabled){ke(j);break}}else h.key==="Tab"&&le(!1)},kt=h=>{h.stopPropagation(),a?Le(new Set):Qe("")},f=()=>{if(a){const d=Y.map(R=>ae.nodeByValue.get(R)).filter(Boolean);if(d.length===0)return e.jsx("span",{className:F.triggerPlaceholder,children:e.jsx("span",{className:F.triggerText,children:$})});const g=d.slice(0,k),j=d.length-g.length;return e.jsxs("span",{className:F.triggerValue,children:[g.map(R=>e.jsxs("span",{className:F.chip,children:[e.jsx("span",{className:F.chipLabel,children:R.label}),e.jsx("span",{role:"button","aria-label":`Remove ${R.label}`,tabIndex:-1,className:F.chipRemove,onMouseDown:Z=>Z.preventDefault(),onClick:Z=>{Z.stopPropagation(),Ye(R)},children:e.jsx(vn,{})})]},R.value)),j>0&&e.jsxs("span",{className:F.chipOverflow,children:["+",j]})]})}const h=Y[0]?ae.nodeByValue.get(Y[0]):void 0;return e.jsxs("span",{className:h?F.triggerValue:F.triggerPlaceholder,children:[(h==null?void 0:h.icon)&&e.jsx("span",{className:F.rowIcon,children:h.icon}),e.jsx("span",{className:F.triggerText,children:(h==null?void 0:h.label)??$})]})},C=(h,d)=>{const{node:g,level:j,hasChildren:R}=h,Z=Be.has(g.value),pe=ze(g),Se=!a&&Pe.has(g.value),je=d===we,Ie=de.has(g.value);return e.jsxs("div",{id:`${x}-row-${d}`,role:"treeitem","aria-level":j+1,"aria-expanded":R?Z:void 0,"aria-selected":a?void 0:Se,"aria-checked":a?pe==="mixed"?"mixed":pe==="checked"?"true":"false":void 0,"aria-disabled":g.disabled,"data-idx":d,className:[F.row,je?F.rowActive:"",Se?F.rowSelected:"",g.disabled?F.rowDisabled:""].filter(Boolean).join(" "),onClick:()=>Ye(g),onMouseEnter:()=>!g.disabled&&ke(d),children:[e.jsx("span",{className:F.indent,"aria-hidden":!0,children:Array.from({length:j}).map(($e,Re)=>e.jsx("span",{className:F.indentUnit},Re))}),R?Ie?e.jsx("span",{className:F.toggle,"aria-hidden":!0,children:e.jsx("span",{className:F.spinner})}):e.jsx("span",{className:[F.toggle,Z?F.toggleOpen:""].filter(Boolean).join(" "),role:"button",tabIndex:-1,"aria-label":Z?"Collapse":"Expand",onClick:$e=>{$e.stopPropagation(),nt(g)},onMouseDown:$e=>$e.preventDefault(),children:e.jsx(Jc,{})}):e.jsx("span",{className:F.togglePlaceholder,"aria-hidden":!0}),a&&e.jsxs("span",{className:[F.checkbox,pe==="checked"?F.checkboxChecked:"",pe==="mixed"?F.checkboxMixed:""].filter(Boolean).join(" "),"aria-hidden":!0,children:[pe==="checked"&&e.jsx(mn,{}),pe==="mixed"&&e.jsx(Zc,{})]}),g.icon&&e.jsx("span",{className:F.rowIcon,children:g.icon}),e.jsxs("span",{className:F.rowText,children:[e.jsx("span",{className:F.rowLabel,children:xe?ol(g.label,xe):g.label}),g.description&&e.jsx("span",{className:F.rowDesc,children:g.description})]}),!a&&Se&&e.jsx("span",{className:F.check,"aria-hidden":!0,children:e.jsx(mn,{})})]},g.value)},W=Y.length>0,X=a?Y.join(","):Y[0]??"";return e.jsxs("div",{ref:m,className:[F.field,H?F.fullWidth:"",w?F.disabled:"",ee].filter(Boolean).join(" "),children:[D&&e.jsx("label",{htmlFor:x,className:F.label,children:D}),e.jsxs("div",{className:F.selectWrapper,children:[e.jsxs("button",{ref:u,id:x,type:"button",role:"combobox","aria-haspopup":"tree","aria-expanded":ve,"aria-controls":Q,"aria-invalid":!!q,disabled:w,className:[F.trigger,F[G],ve?F.open:"",q?F.hasError:""].filter(Boolean).join(" "),onClick:()=>!w&&le(h=>!h),onKeyDown:dt,children:[f(),e.jsxs("span",{className:F.triggerActions,children:[S&&W&&!w&&e.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Clear selection",className:F.clearBtn,onClick:kt,onMouseDown:h=>h.preventDefault(),children:e.jsx(vn,{})}),e.jsx("span",{className:[F.chevron,ve?F.chevronOpen:""].filter(Boolean).join(" "),children:e.jsx(Xc,{})})]})]}),ve&&e.jsxs("div",{className:F.menu,children:[b&&e.jsxs("div",{className:F.searchRow,children:[e.jsx("span",{className:F.searchIconWrap,children:e.jsx(el,{})}),e.jsx("input",{ref:E,type:"text",className:F.searchInput,placeholder:"Search...",value:xe,onChange:h=>{We(h.target.value),ke(0)},onKeyDown:dt})]}),e.jsx("div",{ref:T,className:F.tree,role:"tree",id:Q,"aria-labelledby":x,"aria-multiselectable":a||void 0,"aria-activedescendant":we>=0?`${x}-row-${we}`:void 0,children:ue.length===0?e.jsx("div",{className:F.empty,children:"No results"}):ue.map((h,d)=>C(h,d))}),a&&W&&e.jsxs("div",{className:F.menuFooter,children:[e.jsxs("span",{children:[Y.length," selected"]}),e.jsx("button",{type:"button",className:F.footerBtn,onClick:()=>Le(new Set),children:"Clear all"})]})]}),I&&e.jsx("input",{type:"hidden",name:I,value:X})]}),q&&e.jsx("p",{className:F.errorText,children:q}),!q&&z&&e.jsx("p",{className:F.helperText,children:z})]})},al="_field_1i6oh_7",il="_fullWidth_1i6oh_15",cl="_disabled_1i6oh_19",ll="_inputWrapper_1i6oh_19",dl="_label_1i6oh_25",ul="_acWrapper_1i6oh_33",hl="_open_1i6oh_57",pl="_hasError_1i6oh_61",_l="_sm_1i6oh_69",fl="_md_1i6oh_74",ml="_lg_1i6oh_79",vl="_searchIconWrap_1i6oh_85",xl="_input_1i6oh_19",gl="_actions_1i6oh_119",bl="_statusIcon_1i6oh_126",yl="_clearBtn_1i6oh_132",wl="_spinner_1i6oh_152",jl="_evoAcSpin_1i6oh_1",kl="_menu_1i6oh_169",Nl="_evoAcMenuOpen_1i6oh_1",El="_sectionHeader_1i6oh_200",Tl="_recoveryBox_1i6oh_216",Il="_list_1i6oh_227",$l="_empty_1i6oh_252",Cl="_statusRow_1i6oh_253",Ml="_option_1i6oh_268",Ll="_optionActive_1i6oh_290",Dl="_optionDisabled_1i6oh_290",Bl="_optionSelected_1i6oh_294",Sl="_optionTitle_1i6oh_297",Rl="_optionRecovery_1i6oh_306",Al="_optionIcon_1i6oh_310",zl="_optionLabel_1i6oh_321",Pl="_optionDesc_1i6oh_336",Ol="_mark_1i6oh_346",Wl="_check_1i6oh_353",Hl="_errorText_1i6oh_364",Fl="_helperText_1i6oh_371",ie={field:al,fullWidth:il,disabled:cl,inputWrapper:ll,label:dl,acWrapper:ul,open:hl,hasError:pl,sm:_l,md:fl,lg:ml,searchIconWrap:vl,input:xl,actions:gl,statusIcon:bl,clearBtn:yl,spinner:wl,evoAcSpin:jl,menu:kl,evoAcMenuOpen:Nl,sectionHeader:El,recoveryBox:Tl,list:Il,empty:$l,statusRow:Cl,option:Ml,optionActive:Ll,optionDisabled:Dl,optionSelected:Bl,optionTitle:Sl,optionRecovery:Rl,optionIcon:Al,optionLabel:zl,optionDesc:Pl,mark:Ol,check:Wl,errorText:Hl,helperText:Fl},ql=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M10.5 10.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Vl=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})}),Ul=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M3.5 8.5l3 3 6-7",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),xn=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"none","aria-hidden":"true",children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),e.jsx("path",{d:"M8 4.5V8l2.5 1.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Gl=()=>e.jsx("svg",{viewBox:"0 0 16 16",width:"13",height:"13",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M8 1.5l1.6 4.9 4.9 1.6-4.9 1.6L8 14.5l-1.6-4.9L1.5 8l4.9-1.6L8 1.5z",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})}),gn=()=>e.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",fill:"none","aria-hidden":"true",className:ie.spinner,children:[e.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"2",strokeOpacity:"0.25"}),e.jsx("path",{d:"M14 8a6 6 0 0 0-6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),bn=new Map,Kl=n=>({get:()=>bn.get(n)??[],set:t=>{bn.set(n,t)}}),Ql=n=>({get:()=>{if(typeof window>"u")return[];try{const t=window.localStorage.getItem(`evo-recents:${n}`),s=t?JSON.parse(t):[];return Array.isArray(s)?s.filter(o=>typeof o=="string"):[]}catch{return[]}},set:t=>{if(!(typeof window>"u"))try{window.localStorage.setItem(`evo-recents:${n}`,JSON.stringify(t))}catch{}}});function yn(n,t){const s=n.length,o=t.length;if(s===0)return o;if(o===0)return s;let a=Array.from({length:o+1},(l,c)=>c),i=new Array(o+1);for(let l=1;l<=s;l++){i[0]=l;for(let c=1;c<=o;c++){const p=n[l-1]===t[c-1]?0:1;i[c]=Math.min(a[c]+1,i[c-1]+1,a[c-1]+p)}[a,i]=[i,a]}return a[o]}function Yl(n,t){const s=t.trim().toLowerCase();if(s.length<2)return null;let o=null,a=1/0;for(const l of n){if(l.disabled)continue;const c=l.label.toLowerCase(),p=Math.min(yn(s,c),yn(s,c.slice(0,s.length)));p<a&&(a=p,o=l)}if(!o)return null;const i=Math.max(1,Math.min(3,Math.round(s.length*.4)));return a<=i?{option:o,distance:a}:null}function Xl(n,t){const s=t.trim();if(!s)return n;const o=n.toLowerCase().indexOf(s.toLowerCase());return o<0?n:e.jsxs(e.Fragment,{children:[n.slice(0,o),e.jsx("mark",{className:ie.mark,children:n.slice(o,o+s.length)}),n.slice(o+s.length)]})}const Gn=r.forwardRef(({options:n,value:t,defaultValue:s=null,onChange:o,inputValue:a,onInputChange:i,label:l,placeholder:c="Search…",helperText:p,error:v,size:y="md",fullWidth:_=!1,disabled:b=!1,clearable:M=!0,loading:k=!1,debounce:D=0,minChars:$=0,maxResults:z=50,filter:q,highlightMatch:G=!0,openOnFocus:H=!0,emptyMessage:w="No results",smartRecovery:S=!1,recents:L=!1,renderOption:I,id:ee,name:O,className:x="",...Q},B)=>{const re=r.useId(),N=ee??`evo-autocomplete-${re}`,V=`${N}-listbox`,Y=t!==void 0,[se,J]=r.useState(s),de=Y?t:se,te=r.useMemo(()=>n.find(d=>d.value===de)??null,[n,de]),oe=a!==void 0,[ae,Ee]=r.useState(()=>{var d;return((d=n.find(g=>g.value===s))==null?void 0:d.label)??""}),Te=oe?a:ae,be=r.useMemo(()=>{if(!L)return null;const d={max:5,storage:Kl(O??N),label:"Recent"};return typeof L=="object"?{...d,...L}:d},[L,O,N]),[ce,Be]=r.useState(()=>(be==null?void 0:be.storage.get())??[]),[ye,ve]=r.useState(!1),[le,xe]=r.useState(0),We=r.useRef(null),we=r.useRef(null),ke=r.useRef(null),m=r.useRef(null),u=r.useCallback(d=>{we.current=d,typeof B=="function"?B(d):B&&(B.current=d)},[B]),T=Te.trim(),U=T.length>0&&T.length<$,ge=!!be&&T.length===0&&ce.length>0,ue=r.useMemo(()=>ge?ce.map(d=>n.find(g=>g.value===d)).filter(d=>!!d&&!d.disabled).slice(0,be.max):[],[ge,ce,n,be]),Pe=r.useMemo(()=>{if(U)return[];if(q===!1||T.length===0)return n.slice(0,z);const d=typeof q=="function"?q:(g,j)=>g.label.toLowerCase().includes(j.toLowerCase());return n.filter(g=>d(g,T)).slice(0,z)},[n,q,T,U,z]),ze=ge?ue:Pe,He=r.useMemo(()=>!S||k||U||ge||ze.length>0||T.length===0?null:Yl(n,T),[S,k,U,ge,ze.length,T,n]),Le=He?[He.option]:ze;r.useEffect(()=>{if(!ye)return;const d=g=>{var j;(j=We.current)!=null&&j.contains(g.target)||Ye()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[ye]),r.useEffect(()=>{var g;if(!ye)return;const d=(g=ke.current)==null?void 0:g.querySelector(`[data-idx="${le}"]`);d==null||d.scrollIntoView({block:"nearest"})},[le,ye]),r.useEffect(()=>{ye||oe||Ee((te==null?void 0:te.label)??"")},[de]),r.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const Qe=r.useCallback(d=>{i&&(D>0?(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>i(d),D)):i(d))},[i,D]),Ze=r.useCallback((d,g)=>{Y||J(d),o==null||o(d,g)},[Y,o]),nt=r.useCallback(d=>{be&&Be(g=>{const j=[d,...g.filter(R=>R!==d)].slice(0,be.max);return be.storage.set(j),j})},[be]),Ye=r.useCallback(()=>{ve(!1),xe(0),!oe&&te&&Ee(te.label)},[oe,te]),lt=r.useCallback(d=>{var g;d.disabled||(Ze(d.value,d),oe||Ee(d.label),Qe(d.label),nt(d.value),ve(!1),xe(0),(g=we.current)==null||g.focus())},[Ze,oe,Qe,nt]),dt=d=>{const g=d.target.value;oe||Ee(g),Qe(g),te&&g!==te.label&&Ze(null,null),xe(0),ye||ve(!0)},kt=()=>{var d;oe||Ee(""),Qe(""),Ze(null,null),xe(0),(d=we.current)==null||d.focus(),ve(!0)},f=d=>{if(Le.length===0)return;let g=le;for(let j=0;j<Le.length;j++)if(g=(g+d+Le.length)%Le.length,!Le[g].disabled){xe(g);return}},C=d=>{if(!b){if(!ye){(d.key==="ArrowDown"||d.key==="ArrowUp")&&(d.preventDefault(),ve(!0));return}switch(d.key){case"ArrowDown":d.preventDefault(),f(1);break;case"ArrowUp":d.preventDefault(),f(-1);break;case"Home":d.preventDefault(),xe(Le.findIndex(g=>!g.disabled));break;case"End":d.preventDefault();for(let g=Le.length-1;g>=0;g--)if(!Le[g].disabled){xe(g);break}break;case"Enter":{const g=Le[le];g&&!g.disabled&&(d.preventDefault(),lt(g));break}case"Escape":d.preventDefault(),Ye();break;case"Tab":Ye();break}}},W=ie[y],X=ye&&Le[le]?`${N}-opt-${le}`:void 0,h=(d,g,j)=>{const R=g===le,Z=d.value===de;return e.jsx("div",{id:`${N}-opt-${g}`,role:"option","aria-selected":Z,"aria-disabled":d.disabled||void 0,"data-idx":g,className:[ie.option,R?ie.optionActive:"",Z?ie.optionSelected:"",d.disabled?ie.optionDisabled:"",j==="recovery"?ie.optionRecovery:""].filter(Boolean).join(" "),onClick:()=>lt(d),onMouseEnter:()=>!d.disabled&&xe(g),children:I?I(d,{active:R,query:T}):e.jsxs(e.Fragment,{children:[j==="recent"&&e.jsx("span",{className:ie.optionIcon,"aria-hidden":"true",children:e.jsx(xn,{})}),j!=="recent"&&d.icon&&e.jsx("span",{className:ie.optionIcon,"aria-hidden":"true",children:d.icon}),e.jsxs("span",{className:ie.optionLabel,children:[e.jsx("span",{className:ie.optionTitle,children:G&&j==="option"?Xl(d.label,T):d.label}),d.description&&e.jsx("span",{className:ie.optionDesc,children:d.description})]}),Z&&e.jsx("span",{className:ie.check,"aria-hidden":"true",children:e.jsx(Ul,{})})]})},`${j}-${d.value}`)};return e.jsxs("div",{ref:We,className:[ie.field,_?ie.fullWidth:"",b?ie.disabled:"",x].filter(Boolean).join(" "),children:[l&&e.jsx("label",{htmlFor:N,className:ie.label,children:l}),e.jsxs("div",{className:ie.acWrapper,children:[e.jsxs("div",{className:[ie.inputWrapper,W,ye?ie.open:"",v?ie.hasError:""].filter(Boolean).join(" "),children:[e.jsx("span",{className:ie.searchIconWrap,"aria-hidden":"true",children:e.jsx(ql,{})}),e.jsx("input",{...Q,ref:u,id:N,type:"text",role:"combobox",autoComplete:"off","aria-autocomplete":"list","aria-expanded":ye,"aria-controls":V,"aria-activedescendant":X,"aria-invalid":!!v||void 0,"aria-describedby":v?`${N}-error`:p?`${N}-helper`:void 0,className:ie.input,placeholder:c,value:Te,disabled:b,onChange:dt,onKeyDown:C,onFocus:()=>H&&!b&&ve(!0)}),e.jsxs("span",{className:ie.actions,children:[k&&e.jsx("span",{className:ie.statusIcon,"aria-hidden":"true",children:e.jsx(gn,{})}),M&&!b&&(Te.length>0||de)&&e.jsx("button",{type:"button",tabIndex:-1,"aria-label":"Clear",className:ie.clearBtn,onClick:kt,onMouseDown:d=>d.preventDefault(),children:e.jsx(Vl,{})})]})]}),ye&&e.jsx("div",{className:ie.menu,role:"listbox",id:V,"aria-label":l??"Suggestions",children:k?e.jsxs("div",{className:ie.statusRow,children:[e.jsx(gn,{}),e.jsx("span",{children:"Loading…"})]}):U?e.jsxs("div",{className:ie.empty,children:["Type ",$-T.length," more character",$-T.length===1?"":"s","…"]}):He?e.jsxs("div",{className:ie.recoveryBox,children:[e.jsxs("div",{className:ie.sectionHeader,children:[e.jsx(Gl,{}),e.jsxs("span",{children:["No exact match — did you mean",He.distance===1?" this":"","?"]})]}),e.jsx("div",{className:ie.list,ref:ke,role:"presentation",children:h(He.option,0,"recovery")})]}):Le.length>0?e.jsxs(e.Fragment,{children:[ge&&e.jsxs("div",{className:ie.sectionHeader,children:[e.jsx(xn,{}),e.jsx("span",{children:be.label})]}),e.jsx("div",{className:ie.list,ref:ke,role:"presentation",children:Le.map((d,g)=>h(d,g,ge?"recent":"option"))})]}):T.length===0?e.jsx("div",{className:ie.empty,children:"Type to search…"}):e.jsx("div",{className:ie.empty,children:w})}),O&&e.jsx("input",{type:"hidden",name:O,value:de??""})]}),v&&e.jsx("p",{id:`${N}-error`,className:ie.errorText,children:v}),!v&&p&&e.jsx("p",{id:`${N}-helper`,className:ie.helperText,children:p})]})});Gn.displayName="EvoAutoComplete";const Jl="_group_ufbfw_1",Zl="_groupLabel_ufbfw_10",ed="_checkbox_ufbfw_18",td="_disabled_ufbfw_23",nd="_input_ufbfw_28",sd="_label_ufbfw_35",od="_checkmark_ufbfw_35",rd="_labelText_ufbfw_100",ad="_helperText_ufbfw_105",et={group:Jl,groupLabel:Zl,checkbox:ed,disabled:td,input:nd,label:sd,checkmark:od,labelText:rd,helperText:ad},id=({children:n,label:t,className:s=""})=>e.jsxs("fieldset",{className:`${et.group} ${s}`,children:[t&&e.jsx("legend",{className:et.groupLabel,children:t}),n]}),Kn=({label:n,helperText:t,indeterminate:s=!1,className:o="",disabled:a,id:i,...l})=>{const c=r.useRef(null);r.useEffect(()=>{c.current&&(c.current.indeterminate=s)},[s]);const p=i??(n==null?void 0:n.toLowerCase().replace(/\s+/g,"-"));return e.jsxs("div",{className:[et.checkbox,a?et.disabled:"",o].filter(Boolean).join(" "),children:[e.jsx("input",{type:"checkbox",id:p,ref:c,disabled:a,className:et.input,...l}),e.jsxs("label",{htmlFor:p,className:et.label,children:[e.jsx("span",{className:et.checkmark}),e.jsx("span",{className:et.labelText,children:n})]}),t&&e.jsx("p",{className:et.helperText,children:t})]})};Kn.Group=id;const cd="_group_1oqsu_1",ld="_groupLabel_1oqsu_10",dd="_radio_1oqsu_18",ud="_disabled_1oqsu_22",hd="_input_1oqsu_27",pd="_label_1oqsu_34",_d="_radiomark_1oqsu_34",fd="_labelText_1oqsu_78",at={group:cd,groupLabel:ld,radio:dd,disabled:ud,input:hd,label:pd,radiomark:_d,labelText:fd},Qn=r.createContext(null),md=({children:n,name:t,value:s,onChange:o,label:a,className:i=""})=>e.jsx(Qn.Provider,{value:{name:t,value:s,onChange:o},children:e.jsxs("fieldset",{className:`${at.group} ${i}`,children:[a&&e.jsx("legend",{className:at.groupLabel,children:a}),n]})}),Yn=({value:n,label:t,disabled:s=!1,className:o=""})=>{const a=r.useContext(Qn),i=a?a.value===n:!1,l=`${(a==null?void 0:a.name)??"radio"}-${n}`;return e.jsxs("div",{className:[at.radio,s?at.disabled:"",o].filter(Boolean).join(" "),children:[e.jsx("input",{type:"radio",id:l,name:a==null?void 0:a.name,value:n,checked:i,disabled:s,className:at.input,onChange:()=>a==null?void 0:a.onChange(n)}),e.jsxs("label",{htmlFor:l,className:at.label,children:[e.jsx("span",{className:at.radiomark}),e.jsx("span",{className:at.labelText,children:t})]})]})};Yn.Group=md;const vd="_toggleWrapper_ke3d2_1",xd="_disabled_ke3d2_8",gd="_hiddenInput_ke3d2_14",bd="_track_ke3d2_21",yd="_sm_ke3d2_29",wd="_md_ke3d2_33",jd="_lg_ke3d2_37",kd="_on_ke3d2_41",Nd="_thumb_ke3d2_45",Ed="_label_ke3d2_55",rt={toggleWrapper:vd,disabled:xd,hiddenInput:gd,track:bd,sm:yd,md:wd,lg:jd,on:kd,thumb:Nd,label:Ed},wn={sm:"0.75rem",md:"1rem",lg:"1.25rem"},Td={sm:"0.75rem",md:"1rem",lg:"1.25rem"},Id=({checked:n,onChange:t,label:s,disabled:o=!1,size:a="md",className:i=""})=>e.jsxs("label",{className:[rt.toggleWrapper,o?rt.disabled:"",i].filter(Boolean).join(" "),children:[e.jsx("input",{type:"checkbox",role:"switch",className:rt.hiddenInput,checked:n,disabled:o,onChange:l=>t(l.target.checked)}),e.jsx("span",{className:[rt.track,rt[a],n?rt.on:""].filter(Boolean).join(" "),children:e.jsx("span",{className:rt.thumb,style:{width:wn[a],height:wn[a],transform:n?`translateX(${Td[a]})`:"translateX(0)"}})}),s&&e.jsx("span",{className:rt.label,children:s})]}),$d="_form_1cylw_1",Cd="_form_sm_1cylw_10",Md="_form_md_1cylw_15",Ld="_form_lg_1cylw_20",Dd="_header_1cylw_25",Bd="_headerBadge_1cylw_33",Sd="_headerTitle_1cylw_47",Rd="_headerDesc_1cylw_56",Ad="_section_1cylw_63",zd="_sectionHead_1cylw_74",Pd="_sectionTitle_1cylw_93",Od="_sectionDesc_1cylw_102",Wd="_sectionBody_1cylw_109",Hd="_section_split_1cylw_116",Fd="_row_1cylw_130",qd="_row_sm_1cylw_139",Vd="_row_md_1cylw_143",Ud="_row_lg_1cylw_147",Gd="_row_align_start_1cylw_151",Kd="_row_align_center_1cylw_155",Qd="_row_align_end_1cylw_159",Yd="_field_1cylw_163",Xd="_fieldLabel_1cylw_170",Jd="_fieldRequired_1cylw_180",Zd="_fieldControl_1cylw_186",eu="_fieldDesc_1cylw_191",tu="_fieldError_1cylw_198",nu="_field_error_1cylw_217",su="_actions_1cylw_221",ou="_actions_divider_1cylw_229",ru="_actions_left_1cylw_235",au="_actions_right_1cylw_239",iu="_actions_center_1cylw_243",cu="_actions_between_1cylw_247",me={form:$d,form_sm:Cd,form_md:Md,form_lg:Ld,header:Dd,headerBadge:Bd,headerTitle:Sd,headerDesc:Rd,section:Ad,sectionHead:zd,sectionTitle:Pd,sectionDesc:Od,sectionBody:Wd,section_split:Hd,row:Fd,row_sm:qd,row_md:Vd,row_lg:Ud,row_align_start:Gd,row_align_center:Kd,row_align_end:Qd,field:Yd,fieldLabel:Xd,fieldRequired:Jd,fieldControl:Zd,fieldDesc:eu,fieldError:tu,field_error:nu,actions:su,actions_divider:ou,actions_left:ru,actions_right:au,actions_center:iu,actions_between:cu},Xn=r.createContext({}),lu=()=>r.useContext(Xn),vt=(...n)=>n.filter(Boolean).join(" "),jt=({children:n,disabled:t=!1,size:s="md",layout:o="vertical",maxWidth:a,className:i="",style:l,...c})=>e.jsx(Xn.Provider,{value:{disabled:t,size:s,layout:o},children:e.jsx("form",{className:vt(me.form,me[`form_${s}`],me[`form_${o}`],i),style:a!==void 0?{maxWidth:a,...l}:l,...c,children:n})}),du=({title:n,description:t,badge:s,children:o,className:a=""})=>e.jsxs("header",{className:vt(me.header,a),children:[s&&e.jsx("div",{className:me.headerBadge,children:s}),n&&e.jsx("h2",{className:me.headerTitle,children:n}),t&&e.jsx("p",{className:me.headerDesc,children:t}),o]}),uu=({title:n,description:t,variant:s="stacked",children:o,className:a=""})=>e.jsxs("section",{className:vt(me.section,me[`section_${s}`],a),children:[(n||t)&&e.jsxs("div",{className:me.sectionHead,children:[n&&e.jsx("h3",{className:me.sectionTitle,children:n}),t&&e.jsx("p",{className:me.sectionDesc,children:t})]}),e.jsx("div",{className:me.sectionBody,children:o})]}),hu=({children:n,gap:t="md",align:s="start",className:o=""})=>e.jsx("div",{className:vt(me.row,me[`row_${t}`],me[`row_align_${s}`],o),children:n}),pu=({children:n,label:t,description:s,error:o,required:a,htmlFor:i,className:l=""})=>{const c=r.useId(),p=i??`evo-field-${c}`;return t||s||o?e.jsxs("div",{className:vt(me.field,o?me.field_error:"",l),children:[t&&e.jsxs("label",{htmlFor:p,className:me.fieldLabel,children:[t,a&&e.jsx("span",{className:me.fieldRequired,"aria-hidden":"true",children:"*"})]}),e.jsx("div",{className:me.fieldControl,children:n}),o?e.jsx("p",{className:me.fieldError,role:"alert",children:o}):s?e.jsx("p",{className:me.fieldDesc,children:s}):null]}):e.jsx("div",{className:vt(me.field,l),children:n})},_u=({children:n,align:t="right",divider:s=!0,className:o=""})=>e.jsx("div",{className:vt(me.actions,me[`actions_${t}`],s?me.actions_divider:"",o),children:n});jt.Header=du;jt.Section=uu;jt.Row=hu;jt.Field=pu;jt.Actions=_u;const fu="_overlay_118t4_19",mu="_overlayFadeIn_118t4_1",vu="_dialog_118t4_32",xu="_dialogSlideUp_118t4_1",gu="_sm_118t4_45",bu="_md_118t4_48",yu="_lg_118t4_51",wu="_fullscreen_118t4_54",ju="_header_118t4_60",ku="_headerContent_118t4_70",Nu="_closeBtn_118t4_78",Eu="_body_118t4_98",Tu="_footer_118t4_108",it={overlay:fu,overlayFadeIn:mu,dialog:vu,dialogSlideUp:xu,sm:gu,md:bu,lg:yu,fullscreen:wu,header:ju,headerContent:ku,closeBtn:Nu,body:Eu,footer:Tu},Iu=({children:n,onClose:t})=>e.jsxs("div",{className:it.header,children:[e.jsx("div",{className:it.headerContent,children:n}),t&&e.jsx("button",{className:it.closeBtn,onClick:t,"aria-label":"Close modal",children:"✕"})]}),$u=({children:n})=>e.jsx("div",{className:it.body,children:n}),Cu=({children:n})=>e.jsx("div",{className:it.footer,children:n}),Rt=({open:n,onClose:t,children:s,size:o="md",className:a=""})=>(r.useEffect(()=>{if(n)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[n]),r.useEffect(()=>{if(!n)return;const i=l=>{l.key==="Escape"&&t()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[n,t]),n?jn.createPortal(e.jsx("div",{className:it.overlay,onClick:i=>{i.target===i.currentTarget&&t()},children:e.jsx("div",{className:[it.dialog,it[o],a].filter(Boolean).join(" "),role:"dialog","aria-modal":"true",children:s})}),document.body):null);Rt.Header=Iu;Rt.Body=$u;Rt.Footer=Cu;const Mu="_toasterRoot_izzak_61",Lu="_srOnly_izzak_68",Du="_anchor_izzak_80",Bu="_overflowPill_izzak_145",Su="_toast_izzak_61",Ru="_evoToastEnterRight_izzak_1",Au="_evoToastEnterLeft_izzak_1",zu="_evoToastEnterTop_izzak_1",Pu="_evoToastEnterBottom_izzak_1",Ou="_exiting_izzak_207",Wu="_evoToastExit_izzak_1",Hu="_noMotion_izzak_211",Fu="_toastIcon_izzak_227",qu="_toastBody_izzak_269",Vu="_toastTitle_izzak_274",Uu="_toastDescription_izzak_279",Gu="_toastCount_izzak_285",Ku="_toastProgressTrack_izzak_303",Qu="_toastProgressFill_izzak_315",Yu="_toastAction_izzak_348",Xu="_toastClose_izzak_371",Ju="_bellWrapper_izzak_392",Zu="_bell_izzak_392",eh="_bellOpen_izzak_442",th="_bellBadge_izzak_446",nh="_bellBadgeZero_izzak_465",sh="_bellPanelHost_izzak_470",oh="_panel_izzak_514",rh="_evoPanelEnter_izzak_1",ah="_panelHeader_izzak_532",ih="_panelTitle_izzak_541",ch="_panelHeaderActions_izzak_546",lh="_panelMarkAll_izzak_552",dh="_panelClose_izzak_572",uh="_panelBody_izzak_591",hh="_panelState_izzak_595",ph="_panelStateError_izzak_605",_h="_itemList_izzak_609",fh="_emptyState_izzak_621",mh="_emptyIcon_izzak_630",vh="_emptyTitle_izzak_641",xh="_emptyHint_izzak_647",gh="_item_izzak_609",bh="_itemUnread_izzak_661",yh="_itemInteractive_izzak_665",wh="_itemUnreadDot_izzak_676",jh="_itemMedia_izzak_690",kh="_itemAvatar_izzak_716",Nh="_itemMediaGlyph_izzak_722",Eh="_itemBody_izzak_726",Th="_itemTitle_izzak_731",Ih="_itemDescription_izzak_738",$h="_itemMeta_izzak_749",Ch="_itemTimestamp_izzak_758",Mh="_itemAction_izzak_762",Lh="_itemDismiss_izzak_782",A={toasterRoot:Mu,srOnly:Lu,anchor:Du,"anchor-top-left":"_anchor-top-left_izzak_94","anchor-top-center":"_anchor-top-center_izzak_101","anchor-top-right":"_anchor-top-right_izzak_109","anchor-bottom-left":"_anchor-bottom-left_izzak_116","anchor-bottom-center":"_anchor-bottom-center_izzak_122","anchor-bottom-right":"_anchor-bottom-right_izzak_129",overflowPill:Bu,toast:Su,evoToastEnterRight:Ru,evoToastEnterLeft:Au,evoToastEnterTop:zu,evoToastEnterBottom:Pu,exiting:Ou,evoToastExit:Wu,noMotion:Hu,"sev-success":"_sev-success_izzak_224",toastIcon:Fu,"sev-error":"_sev-error_izzak_232","sev-warning":"_sev-warning_izzak_240","sev-info":"_sev-info_izzak_248",toastBody:qu,toastTitle:Vu,toastDescription:Uu,toastCount:Gu,toastProgressTrack:Ku,toastProgressFill:Qu,toastAction:Yu,toastClose:Xu,bellWrapper:Ju,bell:Zu,"bell-ghost":"_bell-ghost_izzak_418","bell-solid":"_bell-solid_izzak_422","bell-sm":"_bell-sm_izzak_427","bell-md":"_bell-md_izzak_432","bell-lg":"_bell-lg_izzak_437",bellOpen:eh,bellBadge:th,bellBadgeZero:nh,bellPanelHost:sh,"place-bottom-end":"_place-bottom-end_izzak_488","place-bottom-start":"_place-bottom-start_izzak_493","place-bottom":"_place-bottom_izzak_488","place-top-end":"_place-top-end_izzak_504","place-top-start":"_place-top-start_izzak_509",panel:oh,evoPanelEnter:rh,panelHeader:ah,panelTitle:ih,panelHeaderActions:ch,panelMarkAll:lh,panelClose:dh,panelBody:uh,panelState:hh,panelStateError:ph,itemList:_h,emptyState:fh,emptyIcon:mh,emptyTitle:vh,emptyHint:xh,item:gh,itemUnread:bh,itemInteractive:yh,itemUnreadDot:wh,itemMedia:jh,itemAvatar:kh,itemMediaGlyph:Nh,itemBody:Eh,itemTitle:Th,itemDescription:Ih,itemMeta:$h,itemTimestamp:Ch,itemAction:Mh,itemDismiss:Lh},Jn={defaultAnchor:"top-right",defaultDuration:4e3,maxVisible:3,pauseOnFocusLoss:!0,persistErrors:!1},Dh=180,Bh=Object.freeze([]),Sh=Object.freeze({items:Object.freeze([]),unread:0});class Rh{constructor(){this.toasts=[],this.inboxItems=[],this.inboxSnapshot={items:[],unread:0},this.inboxOwnedExternally=!1,this.inboxOnChange=null,this.toastListeners=new Set,this.inboxListeners=new Set,this.configListeners=new Set,this.config=Jn,this.counter=0}setConfig(t){const s={...this.config,...t};Object.keys(s).some(a=>s[a]!==this.config[a])&&(this.config=s,this.notifyConfig())}getConfig(){return this.config}subscribeConfig(t){return this.configListeners.add(t),()=>{this.configListeners.delete(t)}}notifyConfig(){this.configListeners.forEach(t=>t())}resolveDuration(t,s){return t.persistent===!0?1/0:t.duration!=null?t.duration:s==="error"&&this.config.persistErrors&&t.persistent!==!1?1/0:this.config.defaultDuration}bindExternalInbox(t,s){t!==void 0?(this.inboxOwnedExternally=!0,this.inboxItems=t,this.inboxOnChange=s??null,this.refreshInboxSnapshot(),this.notifyInbox()):(this.inboxOwnedExternally=!1,this.inboxOnChange=null)}refreshInboxSnapshot(){let t=0;for(const s of this.inboxItems)s.read||(t+=1);this.inboxSnapshot={items:this.inboxItems,unread:t}}nextId(){return this.counter+=1,`evo-${Date.now().toString(36)}-${this.counter}`}pushToast(t,s={}){const o=s.severity??"info";if(s.groupKey!=null&&s.id==null){const c=this.toasts.find(p=>p.groupKey===s.groupKey&&!p.exiting);if(c)return this.toasts=this.toasts.map(p=>p.id===c.id?{...p,...s,id:c.id,severity:o,duration:this.resolveDuration(s,o),message:t,count:p.count+1,restartKey:p.restartKey+1}:p),this.applyInboxSideEffect(c.id,t,s),this.notifyToasts(),c.id}const a=s.id??this.nextId(),i=this.resolveDuration(s,o);if(this.toasts.find(c=>c.id===a))this.toasts=this.toasts.map(c=>c.id===a?{...c,...s,id:a,severity:o,duration:i,message:t,restartKey:c.restartKey+1,exiting:!1}:c);else{const c={...s,id:a,severity:o,duration:i,message:t,createdAt:Date.now(),count:1,restartKey:0};this.toasts=[...this.toasts,c]}return this.applyInboxSideEffect(a,t,s),this.notifyToasts(),a}applyInboxSideEffect(t,s,o){if(!o.inbox)return;const a={id:`${t}-inbox`,title:o.title??s,description:o.description,severity:o.severity??"info",icon:o.icon,action:o.action,...typeof o.inbox=="object"?o.inbox:{}};this.pushInbox(a)}updateToast(t,s){const o=this.toasts.findIndex(l=>l.id===t);if(o===-1)return;const a=this.toasts[o],i={...a,...s,id:t,severity:s.severity??a.severity,message:"title"in s&&s.title!=null?s.title:a.message,restartKey:a.restartKey+1};s.persistent===!0?i.duration=1/0:s.duration!=null?i.duration=s.duration:s.persistent===!1&&(i.duration=this.resolveDuration({...s,persistent:!1},i.severity)),this.toasts=this.toasts.map(l=>l.id===t?i:l),this.notifyToasts()}dismissToast(t,s="dismiss"){var a,i;if(t==null){const l=this.toasts.filter(c=>!c.exiting);if(l.length===0)return;l.forEach(c=>{var p;return(p=c.onDismiss)==null?void 0:p.call(c,c.id)}),this.toasts=this.toasts.map(c=>c.exiting?c:{...c,exiting:!0}),this.notifyToasts();return}const o=this.toasts.find(l=>l.id===t);!o||o.exiting||(s==="auto"?(a=o.onAutoClose)==null||a.call(o,t):(i=o.onDismiss)==null||i.call(o,t),this.toasts=this.toasts.map(l=>l.id===t?{...l,exiting:!0}:l),this.notifyToasts())}removeToast(t){const s=this.toasts.length;this.toasts=this.toasts.filter(o=>o.id!==t),this.toasts.length!==s&&this.notifyToasts()}getToasts(){return this.toasts}subscribeToasts(t){return this.toastListeners.add(t),()=>{this.toastListeners.delete(t)}}notifyToasts(){this.toastListeners.forEach(t=>t(this.toasts))}pushInbox(t){const s=t.id??this.nextId(),o=t.timestamp instanceof Date?t.timestamp.getTime():t.timestamp??Date.now(),a={id:s,title:t.title,description:t.description,severity:t.severity??"info",icon:t.icon,avatarUrl:t.avatarUrl,timestamp:o,read:t.read??!1,action:t.action,onClick:t.onClick,meta:t.meta},l=this.inboxItems.findIndex(c=>c.id===s)===-1?[a,...this.inboxItems]:this.inboxItems.map(c=>c.id===s?a:c);if(this.commitInbox(l),t.toast){const c={id:`${s}-toast`,title:a.title,description:a.description,severity:a.severity,icon:a.icon,action:a.action,...typeof t.toast=="object"?t.toast:{}};this.pushToast(a.title,c)}return s}markRead(t){this.commitInbox(this.inboxItems.map(s=>s.id===t?{...s,read:!0}:s))}markUnread(t){this.commitInbox(this.inboxItems.map(s=>s.id===t?{...s,read:!1}:s))}markAllRead(){this.commitInbox(this.inboxItems.map(t=>t.read?t:{...t,read:!0}))}removeInbox(t){this.commitInbox(this.inboxItems.filter(s=>s.id!==t))}clearInbox(){this.commitInbox([])}setInboxItems(t){this.commitInbox(t)}getInboxState(){return this.inboxSnapshot}subscribeInbox(t){return this.inboxListeners.add(t),()=>{this.inboxListeners.delete(t)}}commitInbox(t){var s;this.inboxItems=t,this.refreshInboxSnapshot(),this.inboxOwnedExternally&&((s=this.inboxOnChange)==null||s.call(this,t)),this.notifyInbox()}notifyInbox(){const t=this.inboxSnapshot;this.inboxListeners.forEach(s=>s(t))}}const ne=new Rh,Ah=(n,t)=>ne.pushToast(n,t),Je=Ah;Je.success=(n,t)=>ne.pushToast(n,{...t,severity:"success"});Je.error=(n,t)=>ne.pushToast(n,{...t,severity:"error"});Je.warning=(n,t)=>ne.pushToast(n,{...t,severity:"warning"});Je.info=(n,t)=>ne.pushToast(n,{...t,severity:"info"});Je.loading=(n,t)=>ne.pushToast(n,{...t,severity:"info",persistent:!0,dismissible:!1});Je.update=(n,t)=>ne.updateToast(n,t);Je.dismiss=n=>ne.dismissToast(n);Je.promise=(n,t)=>{const s=ne.pushToast(typeof t.loading=="object"&&t.loading!==null&&!Mt(t.loading)?t.loading.title??"":t.loading,{...typeof t.loading=="object"&&!Mt(t.loading)?t.loading:{},severity:"info",persistent:!0,dismissible:!1});return(typeof n=="function"?n():n).then(a=>{const i=typeof t.success=="function"?t.success(a):t.success,l=i!==null&&typeof i=="object"&&!Mt(i),c=l?i:{},p=l?c.title??"":i;ne.updateToast(s,{...c,severity:"success",persistent:!1,dismissible:!0,title:p})},a=>{const i=typeof t.error=="function"?t.error(a):t.error,l=i!==null&&typeof i=="object"&&!Mt(i),c=l?i:{},p=l?c.title??"":i;ne.updateToast(s,{...c,severity:"error",persistent:!1,dismissible:!0,title:p})}),s};Je.progress=(n,t)=>{const s=ne.pushToast(n,{...t,severity:(t==null?void 0:t.severity)??"info",persistent:!0,dismissible:(t==null?void 0:t.dismissible)??!1,progress:Vt((t==null?void 0:t.progress)??0)});return{id:s,setProgress:o=>ne.updateToast(s,{progress:Vt(o)}),update:o=>ne.updateToast(s,o),done:o=>ne.updateToast(s,{...o,severity:(o==null?void 0:o.severity)??"success",progress:1,persistent:!1,dismissible:!0}),fail:o=>ne.updateToast(s,{...o,severity:(o==null?void 0:o.severity)??"error",persistent:!1,dismissible:!0}),dismiss:()=>ne.dismissToast(s)}};function Mt(n){if(n==null)return!0;const t=typeof n;return!!(t==="string"||t==="number"||t==="boolean"||Array.isArray(n)||t==="object"&&n!==null&&"$$typeof"in n)}function Vt(n){return typeof n!="number"||Number.isNaN(n)||n<0?0:n>1?1:n}const zh={toast:Je,push:n=>ne.pushInbox(n),inbox:{markRead:n=>ne.markRead(n),markUnread:n=>ne.markUnread(n),markAllRead:()=>ne.markAllRead(),remove:n=>ne.removeInbox(n),clear:()=>ne.clearInbox(),setItems:n=>ne.setInboxItems(n),getState:()=>ne.getInboxState(),subscribe:n=>ne.subscribeInbox(n)},dismissAll:()=>ne.dismissToast()};function Xe(...n){return n.filter(Boolean).join(" ")}const Zn={success:"✓",error:"✕",warning:"!",info:"i"};function Ph(n,t){const s=Math.max(0,t-n),o=Math.floor(s/1e3);if(o<60)return"just now";const a=Math.floor(o/60);if(a<60)return`${a}m ago`;const i=Math.floor(a/60);if(i<24)return`${i}h ago`;const l=Math.floor(i/24);return l<7?`${l}d ago`:new Date(n).toLocaleDateString()}function es(n){const t=[],s=n.title??n.message;return(typeof s=="string"||typeof s=="number")&&t.push(String(s)),(typeof n.description=="string"||typeof n.description=="number")&&t.push(String(n.description)),t.join(". ")}function Oh(){return r.useSyncExternalStore(n=>ne.subscribeToasts(()=>n()),()=>ne.getToasts(),()=>Bh)}function sn(){return r.useSyncExternalStore(n=>ne.subscribeInbox(()=>n()),()=>ne.getInboxState(),()=>Sh)}function Wh(){return r.useSyncExternalStore(n=>ne.subscribeConfig(n),()=>ne.getConfig(),()=>Jn)}const on=({children:n,defaultAnchor:t="top-right",maxVisible:s=3,defaultDuration:o=4e3,pauseOnFocusLoss:a=!0,persistErrors:i=!1,inboxItems:l,onInboxChange:c})=>(r.useLayoutEffect(()=>{ne.setConfig({defaultAnchor:t,maxVisible:s,defaultDuration:o,pauseOnFocusLoss:a,persistErrors:i})},[t,s,o,a,i]),r.useLayoutEffect(()=>{ne.bindExternalInbox(l,c)},[l,c]),e.jsx(e.Fragment,{children:n}));on.displayName="EvoNotificationProvider";const Hh=({toast:n,anchor:t,index:s,total:o,hovered:a,pausedExternally:i,reducedMotion:l})=>{const c=r.useRef(0),p=r.useRef(null),v=r.useRef(null),y=r.useRef(n.restartKey),_=n.exiting??!1,b=a||i,M=Number.isFinite(n.duration);r.useEffect(()=>{if(!_)return;const x=window.setTimeout(()=>ne.removeToast(n.id),l?0:Dh);return()=>window.clearTimeout(x)},[_,l,n.id]),r.useEffect(()=>{if(y.current!==n.restartKey&&(y.current=n.restartKey,c.current=0),!M||_)return;if(b){p.current!=null&&(c.current+=Date.now()-p.current,p.current=null),v.current!=null&&(window.clearTimeout(v.current),v.current=null);return}const x=Math.max(0,n.duration-c.current);return p.current=Date.now(),v.current=window.setTimeout(()=>ne.dismissToast(n.id,"auto"),x),()=>{v.current!=null&&(window.clearTimeout(v.current),v.current=null),p.current!=null&&(c.current+=Date.now()-p.current,p.current=null)}},[b,M,_,n.duration,n.restartKey,n.id]);const k=o-1-s,D=a?1:Math.max(.94,1-k*.04),$=a?k*8:k*6,z=a?1:Math.max(.7,1-k*.15),q=t.startsWith("bottom")?1:-1,G={transform:`translateY(${$*q}px) scale(${D})`,opacity:z,zIndex:1e3+s},H=n.dismissible??!0,w=n.icon??Zn[n.severity],S=n.title??n.message,L=es(n),I=typeof n.progress=="number",ee=I?Vt(n.progress):0,O=L!=="";return e.jsxs("div",{className:Xe(A.toast,A[`sev-${n.severity}`],_&&A.exiting,l&&A.noMotion,n.className),style:G,role:O?"group":n.severity==="error"?"alert":"status","aria-label":O?L:void 0,children:[e.jsx("span",{className:A.toastIcon,"aria-hidden":"true",children:w}),e.jsxs("div",{className:A.toastBody,children:[S!=null&&e.jsxs("div",{className:A.toastTitle,children:[S,n.count>1&&e.jsxs("span",{className:A.toastCount,"aria-label":`repeated ${n.count} times`,children:["×",n.count]})]}),n.description!=null&&e.jsx("div",{className:A.toastDescription,children:n.description})]}),n.action&&e.jsx("button",{type:"button",className:A.toastAction,onClick:x=>{n.action.onClick(x),ne.dismissToast(n.id)},children:n.action.label}),H&&e.jsx("button",{type:"button",className:A.toastClose,onClick:()=>{ne.dismissToast(n.id)},"aria-label":"Dismiss notification",children:"✕"}),I&&e.jsx("div",{className:A.toastProgressTrack,role:"progressbar","aria-valuemin":0,"aria-valuemax":1,"aria-valuenow":ee,children:e.jsx("div",{className:A.toastProgressFill,style:{transform:`scaleX(${ee})`}})})]})},Fh=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"];let Nt=null;const rn=({anchor:n,className:t})=>{const s=Oh(),{defaultAnchor:o,maxVisible:a,pauseOnFocusLoss:i}=Wh(),l=n??o,[c,p]=r.useState(null),[v,y]=r.useState(!0),[_,b]=r.useState(!1),[M,k]=r.useState(!1),[D,$]=r.useState(!1),[z,q]=r.useState(""),[G,H]=r.useState(""),w=r.useRef(new Set),S=r.useRef(null);if(S.current||(S.current=Symbol("evo-toaster")),r.useEffect(()=>{const I=S.current;return Nt==null?(Nt=I,$(!0)):Nt!==I&&console.warn("[EvoNotification] More than one <EvoNotificationToaster> is mounted; only the first renders. Remove the duplicate(s)."),()=>{Nt===I&&(Nt=null)}},[]),r.useEffect(()=>{var O;if(k(!0),typeof window>"u")return;const I=window.matchMedia("(prefers-reduced-motion: reduce)");b(I.matches);const ee=x=>b(x.matches);return(O=I.addEventListener)==null||O.call(I,"change",ee),()=>{var x;return(x=I.removeEventListener)==null?void 0:x.call(I,"change",ee)}},[]),r.useEffect(()=>{if(!i)return;const I=()=>y(!0),ee=()=>y(!1);return window.addEventListener("focus",I),window.addEventListener("blur",ee),()=>{window.removeEventListener("focus",I),window.removeEventListener("blur",ee)}},[i]),r.useEffect(()=>{const I=w.current,ee=new Set;for(const O of s){if(ee.add(O.id),I.has(O.id)||O.exiting)continue;I.add(O.id);const x=es(O);x&&(O.severity==="error"?H(x):q(x))}for(const O of I)ee.has(O)||I.delete(O)},[s]),r.useEffect(()=>{const I=ee=>{if(ee.key==="Escape"&&c!=null){const O=s.filter(x=>!x.exiting&&(x.anchor??l)===c);O.length>0&&ne.dismissToast(O[O.length-1].id)}};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[s,l,c]),!M||typeof document>"u"||!D)return null;const L={"top-left":[],"top-center":[],"top-right":[],"bottom-left":[],"bottom-center":[],"bottom-right":[]};for(const I of s){const ee=I.anchor??l;L[ee].push(I)}return jn.createPortal(e.jsxs("div",{className:Xe(A.toasterRoot,t),"aria-label":"Notifications",children:[e.jsx("div",{className:A.srOnly,"aria-live":"polite","aria-atomic":"true",children:z}),e.jsx("div",{className:A.srOnly,"aria-live":"assertive","aria-atomic":"true",children:G}),Fh.map(I=>{const ee=L[I];if(ee.length===0)return null;const O=Math.max(0,ee.length-a),x=ee.slice(Math.max(0,ee.length-a)),Q=c===I,B=!v;return e.jsxs("div",{className:Xe(A.anchor,A[`anchor-${I}`]),onMouseEnter:()=>p(I),onMouseLeave:()=>p(null),onFocus:()=>p(I),onBlur:re=>{re.currentTarget.contains(re.relatedTarget)||p(null)},children:[O>0&&e.jsxs("div",{className:A.overflowPill,"aria-hidden":"true",children:["+",O," more"]}),x.map((re,N)=>e.jsx(Hh,{toast:re,anchor:I,index:N,total:x.length,hovered:Q,pausedExternally:B,reducedMotion:_},re.id))]},I)})]}),document.body)};rn.displayName="EvoNotificationToaster";const an=r.forwardRef(function({variant:t="ghost",size:s="md",hideZero:o=!0,maxBadgeCount:a=99,panelPlacement:i="bottom-end",renderPanel:l="popover",panelTitle:c,panelEmptyState:p,className:v,onClick:y,..._},b){const{unread:M}=sn(),[k,D]=r.useState(!1),$=r.useRef(null),z=r.useId();r.useEffect(()=>{if(!k||l!=="popover")return;const H=S=>{var L;(L=$.current)!=null&&L.contains(S.target)||D(!1)},w=S=>{S.key==="Escape"&&D(!1)};return document.addEventListener("mousedown",H),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",H),document.removeEventListener("keydown",w)}},[k,l]);const q=M>a?`${a}+`:String(M),G=M>0||!o;return e.jsxs("div",{ref:$,className:A.bellWrapper,children:[e.jsxs("button",{ref:b,type:"button",className:Xe(A.bell,A[`bell-${t}`],A[`bell-${s}`],k&&A.bellOpen,v),"aria-label":M>0?`Notifications, ${M} unread`:"Notifications","aria-haspopup":l==="popover"?"dialog":void 0,"aria-expanded":l==="popover"?k:void 0,"aria-controls":l==="popover"?z:void 0,onClick:H=>{y==null||y(H),l==="popover"&&D(w=>!w)},..._,children:[e.jsx(ts,{}),G&&e.jsx("span",{className:Xe(A.bellBadge,M===0&&A.bellBadgeZero),children:q})]}),l==="popover"&&k&&e.jsx("div",{id:z,className:Xe(A.bellPanelHost,A[`place-${i}`]),children:e.jsx(At,{open:!0,onClose:()=>D(!1),title:c,emptyState:p})})]})});an.displayName="EvoNotificationBell";const ts=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 8 3 8H3s3-1 3-8"}),e.jsx("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"})]}),At=r.forwardRef(function({open:t=!0,onClose:s,title:o="Notifications",emptyState:a,loading:i=!1,error:l,showMarkAllRead:c=!0,maxHeight:p=480,className:v,style:y,..._},b){const{items:M,unread:k}=sn();return t?e.jsxs("div",{ref:b,className:Xe(A.panel,v),role:"dialog","aria-label":typeof o=="string"?o:"Notifications",style:y,..._,children:[e.jsxs("header",{className:A.panelHeader,children:[e.jsx("div",{className:A.panelTitle,children:o}),e.jsxs("div",{className:A.panelHeaderActions,children:[c&&k>0&&e.jsx("button",{type:"button",className:A.panelMarkAll,onClick:()=>ne.markAllRead(),children:"Mark all read"}),s&&e.jsx("button",{type:"button",className:A.panelClose,onClick:s,"aria-label":"Close notifications",children:"✕"})]})]}),e.jsx("div",{className:A.panelBody,style:{maxHeight:typeof p=="number"?`${p}px`:p},children:i?e.jsx("div",{className:A.panelState,children:"Loading…"}):l?e.jsx("div",{className:Xe(A.panelState,A.panelStateError),children:l}):M.length===0?e.jsx("div",{className:A.panelState,children:a??e.jsx(qh,{})}):e.jsx("ul",{className:A.itemList,children:M.map(D=>e.jsx("li",{children:e.jsx(zt,{item:D})},D.id))})})]}):null});At.displayName="EvoNotificationPanel";const qh=()=>e.jsxs("div",{className:A.emptyState,children:[e.jsx("div",{className:A.emptyIcon,"aria-hidden":"true",children:e.jsx(ts,{})}),e.jsx("div",{className:A.emptyTitle,children:"You're all caught up"}),e.jsx("div",{className:A.emptyHint,children:"New notifications will appear here."})]}),zt=r.forwardRef(function({item:t,onClick:s,className:o,...a},i){const[l,c]=r.useState(t.timestamp);r.useEffect(()=>{c(Date.now());const b=window.setInterval(()=>c(Date.now()),6e4);return()=>window.clearInterval(b)},[]);const p=r.useCallback(()=>{var b;(b=s??t.onClick)==null||b(t),t.read||ne.markRead(t.id)},[t,s]),v=r.useCallback(b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),p())},[p]),y=!!(s??t.onClick),_=t.icon??Zn[t.severity];return e.jsxs("div",{ref:i,className:Xe(A.item,!t.read&&A.itemUnread,y&&A.itemInteractive,o),role:y?"button":"group",tabIndex:y?0:void 0,onClick:y?p:void 0,onKeyDown:y?v:void 0,...a,children:[e.jsx("span",{className:A.itemUnreadDot,"aria-hidden":t.read}),e.jsx("div",{className:Xe(A.itemMedia,A[`sev-${t.severity}`]),"aria-hidden":"true",children:t.avatarUrl?e.jsx("img",{src:t.avatarUrl,alt:"",className:A.itemAvatar}):e.jsx("span",{className:A.itemMediaGlyph,children:_})}),e.jsxs("div",{className:A.itemBody,children:[e.jsx("div",{className:A.itemTitle,children:t.title}),t.description!=null&&e.jsx("div",{className:A.itemDescription,children:t.description}),e.jsxs("div",{className:A.itemMeta,children:[e.jsx("span",{className:A.itemTimestamp,children:Ph(t.timestamp,l)}),t.action&&e.jsx("button",{type:"button",className:A.itemAction,onClick:b=>{b.stopPropagation(),t.action.onClick(b)},children:t.action.label})]})]}),e.jsx("button",{type:"button",className:A.itemDismiss,onClick:b=>{b.stopPropagation(),ne.removeInbox(t.id)},"aria-label":"Remove notification",children:"✕"})]})});zt.displayName="EvoNotificationItem";function Vh(){return sn()}const Uh={Provider:on,Toaster:rn,Bell:an,Panel:At,Item:zt},Gh="_wrapper_1fxx0_11",Kh="_tooltip_1fxx0_17",Qh="_tooltipFadeIn_1fxx0_1",Yh="_top_1fxx0_33",Xh="_bottom_1fxx0_38",Jh="_left_1fxx0_43",Zh="_right_1fxx0_48",ep="_arrow_1fxx0_54",Lt={wrapper:Gh,tooltip:Kh,tooltipFadeIn:Qh,top:Yh,bottom:Xh,left:Jh,right:Zh,arrow:ep},tp=({content:n,children:t,placement:s="top",className:o=""})=>{const[a,i]=r.useState(!1);return e.jsxs("span",{className:`${Lt.wrapper} ${o}`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t,a&&e.jsxs("span",{className:`${Lt.tooltip} ${Lt[s]}`,role:"tooltip",children:[n,e.jsx("span",{className:Lt.arrow})]})]})},np="_alert_slsq7_1",sp="_success_slsq7_10",op="_alertIcon_slsq7_14",rp="_alertTitle_slsq7_17",ap="_error_slsq7_20",ip="_warning_slsq7_30",cp="_info_slsq7_40",lp="_alertContent_slsq7_65",dp="_alertDescription_slsq7_76",up="_dismissBtn_slsq7_83",pt={alert:np,success:sp,alertIcon:op,alertTitle:rp,error:ap,warning:ip,info:cp,alertContent:lp,alertDescription:dp,dismissBtn:up},hp={success:"✓",error:"✕",warning:"⚠",info:"i"},pp=({type:n="info",title:t,children:s,dismissible:o=!1,className:a=""})=>{const[i,l]=r.useState(!1);return i?null:e.jsxs("div",{className:[pt.alert,pt[n],a].filter(Boolean).join(" "),role:"alert",children:[e.jsx("span",{className:pt.alertIcon,children:hp[n]}),e.jsxs("div",{className:pt.alertContent,children:[t&&e.jsx("p",{className:pt.alertTitle,children:t}),e.jsx("div",{className:pt.alertDescription,children:s})]}),o&&e.jsx("button",{className:pt.dismissBtn,onClick:()=>l(!0),"aria-label":"Dismiss alert",children:"✕"})]})},_p="_badge_nypvn_1",fp="_sm_nypvn_12",mp="_md_nypvn_16",vp="_lg_nypvn_20",xp="_solid_nypvn_25",gp="_primary_nypvn_25",bp="_secondary_nypvn_30",yp="_success_nypvn_35",wp="_warning_nypvn_40",jp="_danger_nypvn_45",kp="_info_nypvn_50",Np="_outline_nypvn_56",Ep="_subtle_nypvn_84",Tp="_dot_nypvn_115",Ip="_removeBtn_nypvn_123",$p="_badgeGroup_nypvn_142",ft={badge:_p,sm:fp,md:mp,lg:vp,solid:xp,primary:gp,secondary:bp,success:yp,warning:wp,danger:jp,info:kp,outline:Np,subtle:Ep,dot:Tp,removeBtn:Ip,badgeGroup:$p},Cp=({children:n,className:t=""})=>e.jsx("div",{className:`${ft.badgeGroup} ${t}`,children:n}),ns=({children:n,severity:t="primary",variant:s="solid",size:o="md",dot:a=!1,removable:i=!1,onRemove:l,className:c=""})=>e.jsxs("span",{className:[ft.badge,ft[t],ft[s],ft[o],c].filter(Boolean).join(" "),children:[a&&e.jsx("span",{className:ft.dot}),n,i&&e.jsx("button",{className:ft.removeBtn,onClick:l,"aria-label":"Remove",children:"✕"})]});ns.Group=Cp;const Mp="_skeleton_7wr3a_9",Lp="_animated_7wr3a_14",Dp="_textGroup_7wr3a_20",mt={skeleton:Mp,animated:Lp,textGroup:Dp},Et=n=>typeof n=="number"?`${n}px`:n,Bp=({lines:n=3,className:t="",animated:s=!0})=>e.jsx("div",{className:`${mt.textGroup} ${t}`,children:Array.from({length:n}).map((o,a)=>e.jsx("div",{className:[mt.skeleton,s?mt.animated:""].filter(Boolean).join(" "),style:{width:a===n-1?"65%":"100%",height:"0.875rem",borderRadius:"4px"}},a))}),Sp=({size:n=40,className:t="",animated:s=!0})=>e.jsx("div",{className:[mt.skeleton,s?mt.animated:"",t].filter(Boolean).join(" "),style:{width:Et(n),height:Et(n),borderRadius:"50%"}}),cn=({width:n="100%",height:t="1rem",borderRadius:s="6px",className:o="",animated:a=!0})=>e.jsx("div",{className:[mt.skeleton,a?mt.animated:"",o].filter(Boolean).join(" "),style:{width:Et(n),height:Et(t),borderRadius:Et(s)}});cn.Text=Bp;cn.Circle=Sp;const Rp="_wrapper_69yee_1",Ap="_scroll_69yee_11",zp="_table_69yee_30",Pp="_caption_69yee_38",Op="_thead_69yee_46",Wp="_th_69yee_46",Hp="_sortBtn_69yee_63",Fp="_sortIcon_69yee_85",qp="_sortActive_69yee_92",Vp="_tbody_69yee_99",Up="_tr_69yee_99",Gp="_td_69yee_103",Kp="_hoverable_69yee_167",Qp="_striped_69yee_171",Yp="_bordered_69yee_179",Xp="_stickyHeader_69yee_184",Jp="_clickable_69yee_195",Zp="_empty_69yee_202",e_="_emptyText_69yee_209",t_="_skeleton_69yee_213",n_="_evoTableShimmer_69yee_1",s_="_responsiveStack_69yee_237",o_="_emptyRow_69yee_272",fe={wrapper:Rp,scroll:Ap,table:zp,caption:Pp,thead:Op,th:Wp,sortBtn:Hp,sortIcon:Fp,sortActive:qp,tbody:Vp,tr:Up,td:Gp,"align-left":"_align-left_69yee_115","align-center":"_align-center_69yee_119","align-right":"_align-right_69yee_123","size-sm":"_size-sm_69yee_137","size-md":"_size-md_69yee_147","size-lg":"_size-lg_69yee_157",hoverable:Kp,striped:Qp,bordered:Yp,stickyHeader:Xp,clickable:Jp,empty:Zp,emptyText:e_,skeleton:t_,evoTableShimmer:n_,responsiveStack:s_,emptyRow:o_};function Ht(n,t){return t.split(".").reduce((s,o)=>{if(s!=null&&typeof s=="object")return s[o]},n)}function r_(n,t){return n==null&&t==null?0:n==null?-1:t==null?1:typeof n=="number"&&typeof t=="number"?n-t:String(n).localeCompare(String(t),void 0,{numeric:!0,sensitivity:"base"})}function a_(n,t,s){if(typeof s=="function")return s(n,t);if(s&&n&&typeof n=="object"){const o=n[s];if(typeof o=="string"||typeof o=="number")return o}return t}const i_=({direction:n})=>e.jsxs("svg",{className:fe.sortIcon,width:"8",height:"12",viewBox:"0 0 8 12","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{d:"M4 0 L8 4 H0 Z",fill:"currentColor",opacity:n==="asc"?1:.3}),e.jsx("path",{d:"M4 12 L0 8 H8 Z",fill:"currentColor",opacity:n==="desc"?1:.3})]}),c_=({columns:n,data:t,size:s="md",striped:o=!1,hoverable:a=!0,bordered:i=!1,stickyHeader:l=!1,loading:c=!1,loadingRows:p=5,rowKey:v,emptyState:y,emptyText:_="No data available.",onRowClick:b,onRowDoubleClick:M,getRowClassName:k,responsive:D="scroll",caption:$,sort:z,onSortChange:q,defaultSort:G,className:H})=>{const w=z!==void 0,[S,L]=r.useState(G??null),I=w?z:S,ee=N=>{let V;!I||I.key!==N?V={key:N,direction:"asc"}:I.direction==="asc"?V={key:N,direction:"desc"}:V=null,w||L(V),q==null||q(V)},O=r.useMemo(()=>{if(!I)return t;const N=n.find(se=>se.key===I.key);if(!N)return t;const V=I.direction,Y=[...t];return N.sortFn?Y.sort((se,J)=>N.sortFn(se,J,V)):Y.sort((se,J)=>{const de=Ht(se,N.key),te=Ht(J,N.key),oe=r_(de,te);return V==="asc"?oe:-oe}),Y},[t,n,I]),x=!!(b||M),Q=[fe.wrapper,fe[`size-${s}`],o&&fe.striped,a&&fe.hoverable,i&&fe.bordered,l&&fe.stickyHeader,D==="stack"&&fe.responsiveStack,x&&fe.clickable,H].filter(Boolean).join(" "),B=N=>{const V=N.align??"left",Y=(I==null?void 0:I.key)===N.key,se=Y?I.direction:void 0,J=Y?se==="asc"?"ascending":"descending":N.sortable?"none":void 0,de=[fe.th,fe[`align-${V}`],N.headerClassName].filter(Boolean).join(" ");return e.jsx("th",{scope:"col",className:de,style:N.width?{width:N.width}:void 0,"aria-sort":J,children:N.sortable?e.jsxs("button",{type:"button",className:[fe.sortBtn,Y?fe.sortActive:""].filter(Boolean).join(" "),onClick:()=>ee(N.key),children:[e.jsx("span",{children:N.header}),e.jsx(i_,{direction:se})]}):N.header},N.key)},re=()=>c?Array.from({length:Math.max(1,p)}).map((N,V)=>e.jsx("tr",{className:fe.tr,children:n.map(Y=>e.jsx("td",{className:[fe.td,fe[`align-${Y.align??"left"}`]].filter(Boolean).join(" "),"data-label":typeof Y.header=="string"?Y.header:Y.key,children:e.jsx("span",{className:fe.skeleton})},Y.key))},`evo-skeleton-${V}`)):O.length===0?e.jsx("tr",{className:fe.emptyRow,children:e.jsx("td",{colSpan:n.length,className:fe.empty,children:y??e.jsx("span",{className:fe.emptyText,children:_})})}):O.map((N,V)=>{const Y=[fe.tr,k==null?void 0:k(N,V)].filter(Boolean).join(" ");return e.jsx("tr",{className:Y,onClick:b?()=>b(N,V):void 0,onDoubleClick:M?()=>M(N,V):void 0,children:n.map(se=>{const J=Ht(N,se.key),de=se.align??"left",te=[fe.td,fe[`align-${de}`],se.cellClassName].filter(Boolean).join(" ");return e.jsx("td",{className:te,"data-label":typeof se.header=="string"?se.header:se.key,children:se.render?se.render(J,N,V):J==null?"":String(J)},se.key)})},a_(N,V,v))});return e.jsx("div",{className:Q,children:e.jsx("div",{className:fe.scroll,children:e.jsxs("table",{className:fe.table,children:[$&&e.jsx("caption",{className:fe.caption,children:$}),e.jsx("thead",{className:fe.thead,children:e.jsx("tr",{children:n.map(B)})}),e.jsx("tbody",{className:fe.tbody,children:re()})]})})})},l_="_root_1wpat_1",d_="_fullWidth_1wpat_11",u_="_label_1wpat_15",h_="_stage_1wpat_21",p_="_disabled_1wpat_38",__="_bgChecker_1wpat_43",f_="_imageWrap_1wpat_49",m_="_image_1wpat_49",v_="_overlay_1wpat_68",x_="_overlayCircle_1wpat_77",g_="_circleMask_1wpat_82",b_="_grid_1wpat_89",y_="_gridLine_1wpat_95",w_="_h_1wpat_99",j_="_v_1wpat_104",k_="_handle_1wpat_110",N_="_handleTL_1wpat_128",E_="_handleTR_1wpat_134",T_="_handleBL_1wpat_140",I_="_handleBR_1wpat_146",$_="_handleT_1wpat_128",C_="_handleB_1wpat_140",M_="_handleL_1wpat_166",L_="_handleR_1wpat_166",D_="_controls_1wpat_200",B_="_controlGroup_1wpat_211",S_="_controlLabel_1wpat_218",R_="_iconBtn_1wpat_227",A_="_zoomSlider_1wpat_260",z_="_ratioRow_1wpat_294",P_="_ratioChip_1wpat_300",O_="_active_1wpat_318",W_="_divider_1wpat_333",H_="_helper_1wpat_339",F_="_placeholder_1wpat_344",q_="_spinner_1wpat_356",P={root:l_,fullWidth:d_,label:u_,stage:h_,disabled:p_,bgChecker:__,imageWrap:f_,image:m_,overlay:v_,overlayCircle:x_,circleMask:g_,grid:b_,gridLine:y_,h:w_,v:j_,handle:k_,handleTL:N_,handleTR:E_,handleBL:T_,handleBR:I_,handleT:$_,handleB:C_,handleL:M_,handleR:L_,controls:D_,controlGroup:B_,controlLabel:S_,iconBtn:R_,zoomSlider:A_,ratioRow:z_,ratioChip:P_,active:O_,divider:W_,helper:H_,placeholder:F_,spinner:q_},V_=[{label:"Free",value:null},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:4",value:3/4},{label:"16:9",value:16/9},{label:"9:16",value:9/16}],Dt=24,Fe=(n,t,s)=>Math.min(s,Math.max(t,n)),_t=n=>(Math.round(n/90)*90%360+360)%360,U_=r.forwardRef(function({src:t,aspectRatio:s,circular:o=!1,showGrid:a=!0,showControls:i=!0,ratioPresets:l,minZoom:c=1,maxZoom:p=4,defaultZoom:v=1,defaultRotation:y=0,defaultCrop:_,height:b=360,background:M="checker",label:k,helperText:D,onChange:$,onReady:z,onError:q,disabled:G=!1,fullWidth:H=!0,className:w,ariaLabel:S},L){const I=o?1:s,ee=r.useRef(null),O=r.useRef(null),[x,Q]=r.useState({w:0,h:0}),[B,re]=r.useState(null),[N,V]=r.useState(!1),[Y,se]=r.useState(!1),[J,de]=r.useState(v),[te,oe]=r.useState(_t(y)),[ae,Ee]=r.useState({x:0,y:0}),[Te,be]=r.useState({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80}),[ce,Be]=r.useState(I??null);r.useEffect(()=>{Be(I??null)},[I]),r.useLayoutEffect(()=>{const f=ee.current;if(!f)return;const C=()=>{const X=f.getBoundingClientRect();Q({w:X.width,h:X.height})};C();const W=new ResizeObserver(C);return W.observe(f),()=>W.disconnect()},[]),r.useEffect(()=>{if(V(!1),se(!1),re(null),!t)return;const f=new Image;return f.crossOrigin="anonymous",f.onload=()=>{re({w:f.naturalWidth,h:f.naturalHeight}),V(!0),z==null||z({naturalWidth:f.naturalWidth,naturalHeight:f.naturalHeight})},f.onerror=()=>{se(!0),q==null||q(new Error(`Failed to load image: ${t}`))},f.src=t,()=>{f.onload=null,f.onerror=null}},[t]);const ye=r.useMemo(()=>{if(!B||!x.w||!x.h)return 1;const f=te===90||te===270,C=f?B.h:B.w,W=f?B.w:B.h;return Math.min(x.w/C,x.h/W)},[B,x.w,x.h,te]),ve=r.useMemo(()=>{if(!B)return{w:0,h:0};const f=ye*J;return{w:B.w*f,h:B.h*f}},[B,ye,J]),le=r.useMemo(()=>({left:Te.left/100*x.w,top:Te.top/100*x.h,width:Te.width/100*x.w,height:Te.height/100*x.h}),[Te,x]),xe=r.useCallback(()=>{if(!B||!x.w||!x.h)return null;const f=ye*J,C=x.w/2+ae.x,W=x.h/2+ae.y,X=le.left+le.width/2,h=le.top+le.height/2,d=X-C,g=h-W,j=-te*Math.PI/180,R=d*Math.cos(j)-g*Math.sin(j),Z=d*Math.sin(j)+g*Math.cos(j),pe=te===90||te===270,Se=pe?le.height:le.width,je=pe?le.width:le.height,Ie=(R-Se/2)/f+B.w/2,$e=(Z-je/2)/f+B.h/2,Re=Se/f,Oe=je/f;return{x:Ie,y:$e,width:Re,height:Oe,rotation:te,sourceWidth:B.w,sourceHeight:B.h}},[B,x,ye,J,ae,le,te]),We=r.useRef("");r.useEffect(()=>{if(!N)return;const f=xe();if(!f)return;const C=`${f.x.toFixed(2)},${f.y.toFixed(2)},${f.width.toFixed(2)},${f.height.toFixed(2)},${f.rotation}`;C!==We.current&&(We.current=C,$==null||$(f))},[N,xe,$]),r.useEffect(()=>{ce==null||!x.w||!x.h||be(f=>{const C=f.width/100*x.w,W=f.height/100*x.h,X=C/ce;let h=C,d=X;X>W&&(d=W,h=W*ce);const g=(f.left+f.width/2)/100*x.w,j=(f.top+f.height/2)/100*x.h;let R=g-h/2,Z=j-d/2;return R=Fe(R,0,x.w-h),Z=Fe(Z,0,x.h-d),{left:R/x.w*100,top:Z/x.h*100,width:h/x.w*100,height:d/x.h*100}})},[ce,x.w,x.h]);const we=r.useRef(null),ke=r.useRef(null),m=r.useRef(new Map),u=f=>{var C,W;if(!(G||!N)){if((W=(C=f.target).setPointerCapture)==null||W.call(C,f.pointerId),m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),m.current.size===2){const X=Array.from(m.current.values()),h=Math.hypot(X[0].x-X[1].x,X[0].y-X[1].y);ke.current={startDist:h,startZoom:J},we.current=null;return}we.current={type:"pan",startX:f.clientX,startY:f.clientY,startPan:ae}}},E=f=>{if(!m.current.has(f.pointerId))return;if(m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),ke.current&&m.current.size>=2){const h=Array.from(m.current.values()),d=Math.hypot(h[0].x-h[1].x,h[0].y-h[1].y),g=Fe(ke.current.startZoom*(d/ke.current.startDist),c,p);de(g);return}const C=we.current;if(!C)return;const W=f.clientX-C.startX,X=f.clientY-C.startY;C.type==="pan"?Ee({x:C.startPan.x+W,y:C.startPan.y+X}):C.type==="move"?ge(W,X,C.startCrop):C.type==="resize"&&ue(C.corner,W,X,C.startCrop)},T=f=>{m.current.delete(f.pointerId),m.current.size<2&&(ke.current=null),m.current.size===0&&(we.current=null)},U=f=>{if(G||!N)return;f.preventDefault();const C=-f.deltaY*.0015;de(W=>Fe(W*(1+C),c,p))},ge=(f,C,W)=>{const X=x.w,h=x.h,d=W.left/100*X,g=W.top/100*h,j=W.width/100*X,R=W.height/100*h,Z=Fe(d+f,0,X-j),pe=Fe(g+C,0,h-R);be({left:Z/X*100,top:pe/h*100,width:W.width,height:W.height})},ue=(f,C,W,X)=>{const h=x.w,d=x.h;let g=X.left/100*h,j=X.top/100*d,R=X.width/100*h,Z=X.height/100*d;const pe=g+R,Se=j+Z;let je=g,Ie=j,$e=pe,Re=Se;f.includes("l")&&(je=Fe(g+C,0,pe-Dt)),f.includes("r")&&($e=Fe(pe+C,g+Dt,h)),f.includes("t")&&(Ie=Fe(j+W,0,Se-Dt)),f.includes("b")&&(Re=Fe(Se+W,j+Dt,d));let Oe=$e-je,qe=Re-Ie;if(ce!=null){if(f.length===2){const Ae=Oe,st=Oe/ce;st<=qe||f==="tl"||f==="tr"||f==="bl"||f==="br"?qe=Ae/ce:Oe=st*ce,f.includes("t")&&(Ie=Re-qe),f.includes("b")&&(Re=Ie+qe),f.includes("l")&&(je=$e-Oe),f.includes("r")&&($e=je+Oe)}else if(f==="l"||f==="r"){qe=Oe/ce;const Ae=(j+Se)/2;Ie=Ae-qe/2,Re=Ae+qe/2}else if(f==="t"||f==="b"){Oe=qe*ce;const Ae=(g+pe)/2;je=Ae-Oe/2,$e=Ae+Oe/2}if(je<0&&($e+=-je,je=0),Ie<0&&(Re+=-Ie,Ie=0),$e>h){const Ae=$e-h;$e=h,je-=Ae}if(Re>d){const Ae=Re-d;Re=d,Ie-=Ae}if(Oe=$e-je,qe=Re-Ie,Math.abs(Oe/qe-ce)>.001)if(Oe/qe>ce){const Ae=qe*ce,st=(je+$e)/2;je=st-Ae/2,$e=st+Ae/2}else{const Ae=Oe/ce,st=(Ie+Re)/2;Ie=st-Ae/2,Re=st+Ae/2}}be({left:je/h*100,top:Ie/d*100,width:($e-je)/h*100,height:(Re-Ie)/d*100})},Pe=f=>{var C,W;G||!N||(f.stopPropagation(),(W=(C=f.target).setPointerCapture)==null||W.call(C,f.pointerId),m.current.set(f.pointerId,{x:f.clientX,y:f.clientY}),we.current={type:"move",startX:f.clientX,startY:f.clientY,startCrop:{...Te}})},ze=f=>C=>{var W,X;G||!N||(C.stopPropagation(),(X=(W=C.target).setPointerCapture)==null||X.call(W,C.pointerId),m.current.set(C.pointerId,{x:C.clientX,y:C.clientY}),we.current={type:"resize",corner:f,startX:C.clientX,startY:C.clientY,startCrop:{...Te}})},He=r.useCallback(f=>{const C=xe();if(!C||!O.current)return null;let W=Math.max(1,Math.round(C.width)),X=Math.max(1,Math.round(C.height));const{maxWidth:h,maxHeight:d}=f??{};if(h&&W>h){const Z=h/W;W=h,X=Math.round(X*Z)}if(d&&X>d){const Z=d/X;X=d,W=Math.round(W*Z)}const g=document.createElement("canvas");g.width=W,g.height=X;const j=g.getContext("2d");if(!j)return null;j.imageSmoothingQuality="high";const R=O.current;if(j.save(),C.rotation===0)j.drawImage(R,C.x,C.y,C.width,C.height,0,0,W,X);else{j.translate(W/2,X/2),j.rotate(C.rotation*Math.PI/180);const Z=C.rotation===90||C.rotation===270,pe=Z?X:W,Se=Z?W:X,je=Z?C.height:C.width,Ie=Z?C.width:C.height;j.drawImage(R,C.x,C.y,je,Ie,-pe/2,-Se/2,pe,Se)}return j.restore(),o&&(j.globalCompositeOperation="destination-in",j.beginPath(),j.arc(W/2,X/2,Math.min(W,X)/2,0,Math.PI*2),j.closePath(),j.fill()),g},[xe,o]);r.useImperativeHandle(L,()=>({getCrop:()=>xe(),getCroppedCanvas:f=>He(f),getCroppedBlob:f=>new Promise((C,W)=>{const X=He(f);if(!X)return W(new Error("Cropper not ready"));X.toBlob(h=>h?C(h):W(new Error("Canvas export failed")),(f==null?void 0:f.type)??"image/png",(f==null?void 0:f.quality)??.92)}),getCroppedDataURL:async f=>{const C=He(f);if(!C)throw new Error("Cropper not ready");return C.toDataURL((f==null?void 0:f.type)??"image/png",(f==null?void 0:f.quality)??.92)},reset:()=>{de(v),oe(_t(y)),Ee({x:0,y:0}),be({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80})},rotate:f=>{oe(f===void 0?C=>_t(C+90):_t(f))},setZoom:f=>de(Fe(f,c,p))}),[xe,He,v,y,_,c,p]);const Le={height:typeof b=="number"?`${b}px`:b},Qe=B?{width:ve.w,height:ve.h,transform:`translate(${ae.x}px, ${ae.y}px) rotate(${te}deg)`}:{display:"none"},Ze={left:le.left,top:le.top,width:le.width,height:le.height},nt=o?{"--mask-cx":`${le.left+le.width/2}px`,"--mask-cy":`${le.top+le.height/2}px`,"--mask-r":`${Math.min(le.width,le.height)/2}px`}:{},Ye=[P.stage,M==="checker"?P.bgChecker:"",G?P.disabled:""].filter(Boolean).join(" "),lt=[P.root,H?P.fullWidth:"",w??""].filter(Boolean).join(" "),dt=l??V_,kt=i&&!o&&dt.length>0;return e.jsxs("div",{className:lt,children:[k&&e.jsx("div",{className:P.label,children:k}),kt&&e.jsx("div",{className:P.ratioRow,role:"radiogroup","aria-label":"Aspect ratio",children:dt.map(f=>e.jsx("button",{type:"button",role:"radio","aria-checked":ce===f.value,className:`${P.ratioChip} ${ce===f.value?P.active:""}`,disabled:G,onClick:()=>Be(f.value),children:f.label},f.label))}),e.jsxs("div",{ref:ee,className:Ye,style:Le,role:"application","aria-label":S??"Image cropper","aria-disabled":G,onPointerDown:u,onPointerMove:E,onPointerUp:T,onPointerCancel:T,onWheel:U,children:[!N&&!Y&&e.jsxs("div",{className:P.placeholder,children:[e.jsx("div",{className:P.spinner,"aria-hidden":!0}),e.jsx("div",{children:"Loading image…"})]}),Y&&e.jsx("div",{className:P.placeholder,children:e.jsx("div",{children:"Couldn't load image."})}),e.jsx("div",{className:P.imageWrap,children:e.jsx("img",{ref:O,src:t,alt:"",draggable:!1,className:P.image,style:Qe})}),N&&e.jsxs(e.Fragment,{children:[o&&e.jsx("div",{className:P.circleMask,style:nt}),e.jsxs("div",{className:`${P.overlay} ${o?P.overlayCircle:""}`,style:Ze,onPointerDown:Pe,onPointerMove:E,onPointerUp:T,onPointerCancel:T,children:[a&&!o&&e.jsxs("div",{className:P.grid,"aria-hidden":!0,children:[e.jsx("div",{className:`${P.gridLine} ${P.h}`,style:{top:"33.33%"}}),e.jsx("div",{className:`${P.gridLine} ${P.h}`,style:{top:"66.66%"}}),e.jsx("div",{className:`${P.gridLine} ${P.v}`,style:{left:"33.33%"}}),e.jsx("div",{className:`${P.gridLine} ${P.v}`,style:{left:"66.66%"}})]}),e.jsx("div",{className:`${P.handle} ${P.handleTL}`,onPointerDown:ze("tl")}),e.jsx("div",{className:`${P.handle} ${P.handleTR}`,onPointerDown:ze("tr")}),e.jsx("div",{className:`${P.handle} ${P.handleBL}`,onPointerDown:ze("bl")}),e.jsx("div",{className:`${P.handle} ${P.handleBR}`,onPointerDown:ze("br")}),e.jsx("div",{className:`${P.handle} ${P.handleT}`,onPointerDown:ze("t")}),e.jsx("div",{className:`${P.handle} ${P.handleB}`,onPointerDown:ze("b")}),e.jsx("div",{className:`${P.handle} ${P.handleL}`,onPointerDown:ze("l")}),e.jsx("div",{className:`${P.handle} ${P.handleR}`,onPointerDown:ze("r")})]})]})]}),i&&e.jsxs("div",{className:P.controls,"aria-label":"Cropper controls",children:[e.jsxs("div",{className:P.controlGroup,children:[e.jsx("span",{className:P.controlLabel,children:"Zoom"}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Zoom out",disabled:G||J<=c,onClick:()=>de(f=>Fe(f-.1,c,p)),children:e.jsx(K_,{})}),e.jsx("input",{type:"range",className:P.zoomSlider,min:c,max:p,step:.01,value:J,disabled:G,onChange:f=>de(parseFloat(f.target.value)),"aria-label":"Zoom level"}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Zoom in",disabled:G||J>=p,onClick:()=>de(f=>Fe(f+.1,c,p)),children:e.jsx(G_,{})})]}),e.jsx("div",{className:P.divider,"aria-hidden":!0}),e.jsxs("div",{className:P.controlGroup,children:[e.jsx("span",{className:P.controlLabel,children:"Rotate"}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Rotate left",disabled:G,onClick:()=>oe(f=>_t(f-90)),children:e.jsx(Q_,{})}),e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Rotate right",disabled:G,onClick:()=>oe(f=>_t(f+90)),children:e.jsx(Y_,{})})]}),e.jsx("div",{className:P.divider,"aria-hidden":!0}),e.jsx("div",{className:P.controlGroup,children:e.jsx("button",{type:"button",className:P.iconBtn,"aria-label":"Reset",disabled:G,onClick:()=>{de(v),oe(_t(y)),Ee({x:0,y:0}),be({left:(_==null?void 0:_.x)??10,top:(_==null?void 0:_.y)??10,width:(_==null?void 0:_.width)??80,height:(_==null?void 0:_.height)??80})},children:e.jsx(X_,{})})})]}),D&&e.jsx("div",{className:P.helper,children:D})]})}),It={width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},G_=()=>e.jsxs("svg",{...It,children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),K_=()=>e.jsx("svg",{...It,children:e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),Q_=()=>e.jsxs("svg",{...It,children:[e.jsx("polyline",{points:"1 4 1 10 7 10"}),e.jsx("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]}),Y_=()=>e.jsxs("svg",{...It,children:[e.jsx("polyline",{points:"23 4 23 10 17 10"}),e.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.13-9.36L23 10"})]}),X_=()=>e.jsxs("svg",{...It,children:[e.jsx("path",{d:"M3 12a9 9 0 1 0 3-6.7L3 8"}),e.jsx("polyline",{points:"3 3 3 8 8 8"})]});exports.EvoAlert=pp;exports.EvoAutoComplete=Gn;exports.EvoBadge=ns;exports.EvoBreadcrumb=Cn;exports.EvoButton=Ss;exports.EvoCard=ct;exports.EvoCardBody=Gt;exports.EvoCardDescription=Yt;exports.EvoCardFooter=Kt;exports.EvoCardHeader=Ut;exports.EvoCardMedia=Xt;exports.EvoCardRoot=Bt;exports.EvoCardTitle=Qt;exports.EvoCheckbox=Kn;exports.EvoCommandPalette=ua;exports.EvoContainer=_o;exports.EvoDivider=ro;exports.EvoForm=jt;exports.EvoGrid=Tn;exports.EvoImageCropper=U_;exports.EvoInput=Na;exports.EvoModal=Rt;exports.EvoNav=cr;exports.EvoNavGroup=en;exports.EvoNavItem=Jt;exports.EvoNavQuickAction=tn;exports.EvoNavSkeleton=Bn;exports.EvoNavSubItem=Zt;exports.EvoNotification=Uh;exports.EvoNotificationBell=an;exports.EvoNotificationItem=zt;exports.EvoNotificationPanel=At;exports.EvoNotificationProvider=on;exports.EvoNotificationToaster=rn;exports.EvoPagination=qr;exports.EvoRadio=Yn;exports.EvoRichTextArea=Za;exports.EvoSelect=Xi;exports.EvoSkeleton=cn;exports.EvoStack=Xs;exports.EvoTable=c_;exports.EvoTabs=St;exports.EvoThemeProvider=ss;exports.EvoThemeToggle=ps;exports.EvoToggle=Id;exports.EvoTooltip=tp;exports.EvoTopNav=tt;exports.EvoTreeSelect=rl;exports.evoLocalRecents=Ql;exports.evoNotify=zh;exports.getEvoThemeScript=os;exports.useEvoInbox=Vh;exports.useEvoTheme=En;exports.useFormContext=lu;
@@ -0,0 +1,31 @@
1
+ export * from './Theme/ThemeProvider';
2
+ export * from './Theme/ThemeToggle';
3
+ export * from './Button/Button';
4
+ export * from './Card/Card';
5
+ export * from './Stack/Stack';
6
+ export * from './Grid/Grid';
7
+ export * from './Divider/Divider';
8
+ export * from './Container/Container';
9
+ export * from './Tabs/Tabs';
10
+ export * from './Breadcrumb/Breadcrumb';
11
+ export * from './Nav/Nav';
12
+ export * from './TopNav/TopNav';
13
+ export * from './Pagination/Pagination';
14
+ export * from './CommandPalette/CommandPalette';
15
+ export * from './Input/Input';
16
+ export * from './RichTextArea/RichTextArea';
17
+ export * from './Select/Select';
18
+ export * from './TreeSelect/TreeSelect';
19
+ export * from './AutoComplete/AutoComplete';
20
+ export * from './Checkbox/Checkbox';
21
+ export * from './Radio/Radio';
22
+ export * from './Toggle/Toggle';
23
+ export * from './Form/Form';
24
+ export * from './Modal/Modal';
25
+ export * from './Notification/Notification';
26
+ export * from './Tooltip/Tooltip';
27
+ export * from './Alert/Alert';
28
+ export * from './Badge/Badge';
29
+ export * from './Skeleton/Skeleton';
30
+ export * from './Table/Table';
31
+ export * from './ImageCropper/ImageCropper';