UNPKG

@de-adlock/ui

Version:

Modern React component library for FiveM with built-in theme management

1 lines 191 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("react-dom");function i(e){var r,a,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(r=0;r<l;r++)e[r]&&(a=i(e[r]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}function n(){for(var e,r,a=0,n="",l=arguments.length;a<l;a++)(e=arguments[a])&&(r=i(e))&&(n&&(n+=" "),n+=r);return n}const l={button:"_button_1pom1_2",xs:"_xs_1pom1_45",sm:"_sm_1pom1_52",md:"_md_1pom1_59",lg:"_lg_1pom1_66",xl:"_xl_1pom1_73",iconOnly:"_iconOnly_1pom1_81",icon:"_icon_1pom1_81",iconRight:"_iconRight_1pom1_95",primary:"_primary_1pom1_100",disabled:"_disabled_1pom1_106",secondary:"_secondary_1pom1_116",success:"_success_1pom1_127",warning:"_warning_1pom1_137",error:"_error_1pom1_147",info:"_info_1pom1_157",ghost:"_ghost_1pom1_167",outline:"_outline_1pom1_178",glass:"_glass_1pom1_189",loading:"_loading_1pom1_210",loadingIcon:"_loadingIcon_1pom1_216",spinner:"_spinner_1pom1_226",spin:"_spin_1pom1_226",glow:"_glow_1pom1_237",pulse:"_pulse_1pom1_245",animate:"_animate_1pom1_250",buttonFadeIn:"_buttonFadeIn_1pom1_1"},t=r.forwardRef(({variant:r="primary",size:a="md",loading:i=!1,disabled:t=!1,icon:o,iconPosition:s="left",iconOnly:c=!1,glow:d=!1,pulse:_=!1,customColor:h,children:m,className:u,animate:g=!0,type:p="button",onClick:b,style:v,...f},y)=>{const x=n(l.button,l[r],l[a],{[l.iconOnly]:c,[l.withIcon]:o&&!c,[l.iconRight]:"right"===s,[l.loading]:i,[l.glow]:d,[l.pulse]:_,[l.disabled]:t||i},u),w=h?{"--button-custom-color":h,...v}:v,N=e.jsxs(e.Fragment,{children:[o&&"left"===s&&!i&&e.jsx("span",{className:l.icon,children:o}),!c&&!i&&m,o&&"right"===s&&!i&&e.jsx("span",{className:l.icon,children:o}),i&&e.jsx("span",{className:l.loadingIcon,children:e.jsx("div",{className:l.spinner})})]});return e.jsx("button",{ref:y,type:p,className:n(x,{[l.animate]:g}),style:w,disabled:t||i,onClick:b,...f,children:N})});t.displayName="Button";const o={Eye:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),EyeOff:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"}),e.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"}),e.jsx("path",{d:"M14.12 14.12a3 3 0 1 1-4.24-4.24"}),e.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}),X:()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Search:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("path",{d:"M21 21l-4.35-4.35"})]}),Mail:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),e.jsx("polyline",{points:"22,6 12,13 2,6"})]}),Lock:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),e.jsx("circle",{cx:"12",cy:"16",r:"1"}),e.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),User:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),Phone:()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"})}),Globe:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),e.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),Calendar:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),e.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),e.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),Clock:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("polyline",{points:"12,6 12,12 16,14"})]}),Hash:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("line",{x1:"4",y1:"9",x2:"20",y2:"9"}),e.jsx("line",{x1:"4",y1:"15",x2:"20",y2:"15"}),e.jsx("line",{x1:"10",y1:"3",x2:"8",y2:"21"}),e.jsx("line",{x1:"16",y1:"3",x2:"14",y2:"21"})]}),Edit:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),e.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),Loader:()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"animate-spin",children:e.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),Check:()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:e.jsx("polyline",{points:"20,6 9,17 4,12"})}),AlertCircle:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),Info:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),Minus:()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),ChevronDown:()=>e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("polyline",{points:"6,9 12,15 18,9"})}),Upload:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.jsx("polyline",{points:"7,10 12,5 17,10"}),e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"15"})]}),File:()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14,2 14,8 20,8"}),e.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),e.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),e.jsx("polyline",{points:"10,9 9,9 8,9"})]})},s={wrapper:"_wrapper_9cmep_2",label:"_label_9cmep_12",focused:"_focused_9cmep_21",inputContainer:"_inputContainer_9cmep_26",input:"_input_9cmep_26",sm:"_sm_9cmep_88",lg:"_lg_9cmep_95",filled:"_filled_9cmep_103",outline:"_outline_9cmep_114",glass:"_glass_9cmep_157",glow:"_glow_9cmep_177",leftIcon:"_leftIcon_9cmep_185",rightIcon:"_rightIcon_9cmep_186",withLeftIcon:"_withLeftIcon_9cmep_231",withRightIcon:"_withRightIcon_9cmep_243",rightIcons:"_rightIcons_9cmep_256",clearButton:"_clearButton_9cmep_274",passwordToggle:"_passwordToggle_9cmep_275",loadingIcon:"_loadingIcon_9cmep_346",pulse:"_pulse_9cmep_1",spin:"_spin_9cmep_1",error:"_error_9cmep_369",success:"_success_9cmep_385",required:"_required_9cmep_402",helperText:"_helperText_9cmep_409",helperError:"_helperError_9cmep_417",helperSuccess:"_helperSuccess_9cmep_421",errorMessage:"_errorMessage_9cmep_426",successMessage:"_successMessage_9cmep_427",shake:"_shake_9cmep_1",fadeIn:"_fadeIn_9cmep_1",numberControls:"_numberControls_9cmep_604",numberButton:"_numberButton_9cmep_614",animate:"_animate_9cmep_716",inputFadeIn:"_inputFadeIn_9cmep_1"},c=r.forwardRef(({variant:a="default",size:i="md",type:l="text",error:t=!1,success:c=!1,loading:d=!1,label:_,placeholder:h,helperText:m,errorText:u,leftIcon:g,rightIcon:p,autoIcon:b=!0,glow:v=!1,clearable:f=!1,onClear:y,animate:x=!0,customColor:w,className:N,style:k,value:C,onChange:T,...B},S)=>{const[z,I]=r.useState(!1),[$,M]=r.useState(Boolean(C)),[q,P]=r.useState(!1),j=()=>{if(!b)return null;switch(l){case"email":return e.jsx(o.Mail,{});case"password":return e.jsx(o.Lock,{});case"search":return e.jsx(o.Search,{});case"tel":return e.jsx(o.Phone,{});case"url":return e.jsx(o.Globe,{});case"date":case"datetime-local":case"month":case"week":return e.jsx(o.Calendar,{});case"time":return e.jsx(o.Clock,{});case"number":return e.jsx(o.Hash,{});default:return"text"===l?e.jsx(o.Edit,{}):null}},W=n(s.wrapper,s[a],s[i],{[s.focused]:z,[s.hasValue]:$,[s.error]:t,[s.success]:c,[s.loading]:d,[s.glow]:v,[s.withLeftIcon]:g||b&&j(),[s.withRightIcon]:p||"password"===l||f||d},N),F=w?{"--input-custom-color":w,...k}:k,E="password"===l&&q?"text":l;return e.jsxs("div",{className:n(W,{[s.animate]:x}),style:F,children:[_&&e.jsxs("label",{className:s.label,children:[_,B.required&&e.jsx("span",{className:s.required,children:"*"})]}),e.jsxs("div",{className:s.inputContainer,children:[(g||b&&j())&&e.jsx("span",{className:s.leftIcon,children:g||j()}),e.jsx("input",{ref:S,type:E,className:s.input,placeholder:h,value:C,onChange:e=>{M(Boolean(e.target.value)),null==T||T(e)},onFocus:()=>I(!0),onBlur:()=>I(!1),...B}),(p||"password"===l||f&&$||d)&&e.jsxs("div",{className:s.rightIcons,children:[d&&e.jsx("span",{className:s.loadingIcon,children:e.jsx(o.Loader,{})}),f&&$&&!d&&e.jsx("button",{type:"button",className:s.clearButton,onClick:()=>{M(!1),null==y||y()},tabIndex:-1,"aria-label":"Clear input",children:e.jsx(o.X,{})}),"password"===l&&!d&&e.jsx("button",{type:"button",className:s.passwordToggle,onClick:()=>{P(!q)},tabIndex:-1,"aria-label":q?"Hide password":"Show password",children:q?e.jsx(o.EyeOff,{}):e.jsx(o.Eye,{})}),p&&!d&&e.jsx("span",{className:s.rightIcon,children:p})]})]}),(m||u)&&e.jsx("div",{className:n(s.helperText,{[s.helperError]:t,[s.helperSuccess]:c}),children:t&&u?e.jsxs("span",{className:s.errorMessage,children:[e.jsx(o.AlertCircle,{}),u]}):c?e.jsxs("span",{className:s.successMessage,children:[e.jsx(o.Check,{}),m]}):m})]})});c.displayName="Input";const d={wrapper:"_wrapper_1b895_3",animate:"_animate_1b895_17",slideIn:"_slideIn_1b895_1",default:"_default_1b895_27",filled:"_filled_1b895_45",outline:"_outline_1b895_63",glass:"_glass_1b895_81",sm:"_sm_1b895_103",rightIcons:"_rightIcons_1b895_115",md:"_md_1b895_123",lg:"_lg_1b895_143",label:"_label_1b895_165",required:"_required_1b895_183",selectContainer:"_selectContainer_1b895_195",focused:"_focused_1b895_235",error:"_error_1b895_253",success:"_success_1b895_263",disabled:"_disabled_1b895_273",loading:"_loading_1b895_283",selectButton:"_selectButton_1b895_293",selectValue:"_selectValue_1b895_337",leftIcon:"_leftIcon_1b895_363",rightIcon:"_rightIcon_1b895_115",withLeftIcon:"_withLeftIcon_1b895_409",withRightIcon:"_withRightIcon_1b895_417",loadingIcon:"_loadingIcon_1b895_427",spin:"_spin_1b895_1",clearButton:"_clearButton_1b895_443",dropdownArrow:"_dropdownArrow_1b895_481",rotated:"_rotated_1b895_497",dropdown:"_dropdown_1b895_481",slideDown:"_slideDown_1b895_1",dropdownBottom:"_dropdownBottom_1b895_535",dropdownTop:"_dropdownTop_1b895_545",slideUp:"_slideUp_1b895_1",searchContainer:"_searchContainer_1b895_559",searchInput:"_searchInput_1b895_571",searchIcon:"_searchIcon_1b895_615",optionsList:"_optionsList_1b895_633",option:"_option_1b895_633",selected:"_selected_1b895_719",optionIcon:"_optionIcon_1b895_749",optionLabel:"_optionLabel_1b895_765",checkIcon:"_checkIcon_1b895_773",noOptions:"_noOptions_1b895_791",helperText:"_helperText_1b895_813",helperError:"_helperError_1b895_827",helperSuccess:"_helperSuccess_1b895_835",errorMessage:"_errorMessage_1b895_843",successMessage:"_successMessage_1b895_845",hiddenSelect:"_hiddenSelect_1b895_859",glow:"_glow_1b895_877"},_=r.forwardRef(({variant:i="default",size:l="md",error:t=!1,success:s=!1,loading:c=!1,label:_,placeholder:h="Select an option...",helperText:m,errorText:u,options:g=[],value:p,onChange:b,leftIcon:v,rightIcon:f,glow:y=!1,animate:x=!0,customColor:w,className:N,style:k,searchable:C=!1,multiple:T=!1,clearable:B=!1,onClear:S,disabled:z,...I},$)=>{const[M,q]=r.useState(!1),[P,j]=r.useState(!1),[W,F]=r.useState(""),[E,L]=r.useState([]),[A,H]=r.useState("bottom"),[R,D]=r.useState({}),G=r.useRef(null),O=r.useRef(null),V=r.useRef(null),K=g.find(e=>e.value===p),U=C?g.filter(e=>e.label.toLowerCase().includes(W.toLowerCase())&&!e.disabled):g.filter(e=>!e.disabled),J=()=>{if(!G.current||!V.current)return;const e=G.current.getBoundingClientRect(),r=Math.min(V.current.offsetHeight,300),a=window.innerHeight,i=window.innerWidth,n=window.scrollY,l=window.scrollX,t=a-(e.bottom-n),o=e.top-n,s=t<r+20&&o>r+20?"top":"bottom";H(s);const c={position:"fixed",left:`${e.left+l}px`,width:`${e.width}px`,zIndex:9999};if("bottom"===s?c.top=`${e.bottom+n+4}px`:c.bottom=`${a-e.top+n+4}px`,c.left&&"string"==typeof c.left){const r=parseInt(c.left);r+e.width>i&&(c.left=i-e.width-10+"px"),r<10&&(c.left="10px")}D(c)};r.useEffect(()=>{const e=e=>{var r,a;const i=e.target,n=null==(r=G.current)?void 0:r.contains(i),l=null==(a=V.current)?void 0:a.contains(i);n||l||(q(!1),F(""))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),r.useEffect(()=>{const e=()=>{M&&J()},r=()=>{M&&J()};return window.addEventListener("resize",e),window.addEventListener("scroll",r,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",r,!0)}},[M]);const X=n(d.wrapper,d[i],d[l],{[d.focused]:P,[d.open]:M,[d.error]:t,[d.success]:s,[d.loading]:c,[d.disabled]:z,[d.glow]:y,[d.withLeftIcon]:v,[d.withRightIcon]:f||B||c},N),Z=w?{"--select-custom-color":w,...k}:k,Q=T?E.length>0?`${E.length} selected`:h:(null==K?void 0:K.label)||h;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{ref:G,className:n(X,{[d.animate]:x}),style:Z,onKeyDown:e=>{"Escape"===e.key&&(q(!1),F(""))},children:[_&&e.jsxs("label",{className:d.label,children:[_,I.required&&e.jsx("span",{className:d.required,children:"*"})]}),e.jsxs("div",{className:d.selectContainer,children:[v&&e.jsx("span",{className:d.leftIcon,children:v}),e.jsx("button",{type:"button",className:d.selectButton,onClick:()=>{if(z||c)return;const e=!M;q(e),e&&setTimeout(()=>{var e;J(),C&&(null==(e=O.current)||e.focus())},10)},onFocus:()=>j(!0),onBlur:()=>j(!1),disabled:z||c,"aria-haspopup":"listbox","aria-expanded":M,children:e.jsx("span",{className:d.selectValue,children:Q})}),e.jsxs("div",{className:d.rightIcons,children:[c&&e.jsx("span",{className:d.loadingIcon,children:e.jsx(o.Loader,{})}),B&&(T&&E.length>0||!T&&p)&&!c&&e.jsx("button",{type:"button",className:d.clearButton,onClick:e=>{e.stopPropagation(),T?(L([]),null==b||b([])):null==b||b(""),null==S||S()},tabIndex:-1,"aria-label":"Clear selection",children:e.jsx(o.X,{})}),f&&!c&&e.jsx("span",{className:d.rightIcon,children:f}),e.jsx("span",{className:n(d.dropdownArrow,{[d.rotated]:M}),children:e.jsx(o.ChevronDown,{})})]})]}),(m||u)&&e.jsx("div",{className:n(d.helperText,{[d.helperError]:t,[d.helperSuccess]:s}),children:t&&u?e.jsxs("span",{className:d.errorMessage,children:[e.jsx(o.AlertCircle,{}),u]}):s?e.jsxs("span",{className:d.successMessage,children:[e.jsx(o.Check,{}),m]}):m}),e.jsx("select",{ref:$,className:d.hiddenSelect,value:Array.isArray(p)?p[0]:p,onChange:e=>null==b?void 0:b(e.target.value),disabled:z,...I,children:g.map(r=>e.jsx("option",{value:r.value,disabled:r.disabled,children:r.label},r.value))})]}),M?a.createPortal(e.jsxs("div",{ref:V,className:n(d.dropdown,{[d.dropdownTop]:"top"===A,[d.dropdownBottom]:"bottom"===A}),style:R,children:[C&&e.jsxs("div",{className:d.searchContainer,children:[e.jsx("input",{ref:O,type:"text",className:d.searchInput,placeholder:"Search options...",value:W,onChange:e=>{F(e.target.value)},onKeyDown:e=>e.stopPropagation()}),e.jsx("span",{className:d.searchIcon,children:e.jsx(o.Search,{})})]}),e.jsx("div",{className:d.optionsList,children:U.length>0?U.map(r=>{const a=T?E.some(e=>e.value===r.value):r.value===p;return e.jsxs("button",{type:"button",className:n(d.option,{[d.selected]:a,[d.disabled]:r.disabled}),onClick:()=>(e=>{if(!e.disabled)if(T){const r=E.some(r=>r.value===e.value)?E.filter(r=>r.value!==e.value):[...E,e];L(r),null==b||b(r.map(e=>e.value))}else null==b||b(e.value),q(!1),F("")})(r),disabled:r.disabled,children:[r.icon&&e.jsx("span",{className:d.optionIcon,children:r.icon}),e.jsx("span",{className:d.optionLabel,children:r.label}),a&&e.jsx("span",{className:d.checkIcon,children:e.jsx(o.Check,{})})]},r.value)}):e.jsxs("div",{className:d.noOptions,children:[e.jsx(o.Search,{}),e.jsx("span",{children:"No options found"})]})})]}),document.body):null]})});_.displayName="Select";const h={wrapper:"_wrapper_17npb_3",animate:"_animate_17npb_17",slideIn:"_slideIn_17npb_1",default:"_default_17npb_27",filled:"_filled_17npb_45",outline:"_outline_17npb_63",glass:"_glass_17npb_81",sm:"_sm_17npb_103",md:"_md_17npb_117",lg:"_lg_17npb_131",label:"_label_17npb_147",required:"_required_17npb_165",textareaContainer:"_textareaContainer_17npb_177",focused:"_focused_17npb_209",error:"_error_17npb_219",success:"_success_17npb_229",loading:"_loading_17npb_239",textarea:"_textarea_17npb_177",leftIcon:"_leftIcon_17npb_301",rightIcon:"_rightIcon_17npb_303",rightIcons:"_rightIcons_17npb_331",withLeftIcon:"_withLeftIcon_17npb_349",withRightIcon:"_withRightIcon_17npb_357",loadingIcon:"_loadingIcon_17npb_367",spin:"_spin_17npb_1",clearButton:"_clearButton_17npb_383",helperText:"_helperText_17npb_421",helperError:"_helperError_17npb_435",helperSuccess:"_helperSuccess_17npb_443",errorMessage:"_errorMessage_17npb_451",successMessage:"_successMessage_17npb_453",glow:"_glow_17npb_467"},m=r.forwardRef(({variant:a="default",size:i="md",error:l=!1,success:t=!1,loading:s=!1,label:c,placeholder:d,helperText:_,errorText:m,leftIcon:u,rightIcon:g,glow:p=!1,clearable:b=!1,onClear:v,animate:f=!0,customColor:y,className:x,style:w,value:N,onChange:k,minRows:C=3,maxRows:T=10,autoResize:B=!0,...S},z)=>{const[I,$]=r.useState(!1),[M,q]=r.useState(Boolean(N)),P=n(h.wrapper,h[a],h[i],{[h.focused]:I,[h.hasValue]:M,[h.error]:l,[h.success]:t,[h.loading]:s,[h.glow]:p,[h.withLeftIcon]:u,[h.withRightIcon]:g||b||s},x),j=y?{"--textarea-custom-color":y,...w}:w;return e.jsxs("div",{className:n(P,{[h.animate]:f}),style:j,children:[c&&e.jsxs("label",{className:h.label,children:[c,S.required&&e.jsx("span",{className:h.required,children:"*"})]}),e.jsxs("div",{className:h.textareaContainer,children:[u&&e.jsx("span",{className:h.leftIcon,children:u}),e.jsx("textarea",{ref:z,className:h.textarea,placeholder:d,value:N,onChange:e=>{if(q(Boolean(e.target.value)),null==k||k(e),B){const r=e.target;r.style.height="auto";const a=r.scrollHeight,i=parseInt(getComputedStyle(r).lineHeight),n=i*C,l=i*T,t=Math.min(Math.max(a,n),l);r.style.height=`${t}px`}},onFocus:()=>$(!0),onBlur:()=>$(!1),rows:C,...S}),(g||b||s)&&e.jsxs("div",{className:h.rightIcons,children:[s&&e.jsx("span",{className:h.loadingIcon,children:e.jsx(o.Loader,{})}),b&&M&&!s&&e.jsx("button",{type:"button",className:h.clearButton,onClick:()=>{q(!1),null==v||v()},tabIndex:-1,"aria-label":"Clear textarea",children:e.jsx(o.X,{})}),g&&!s&&e.jsx("span",{className:h.rightIcon,children:g})]})]}),(_||m)&&e.jsx("div",{className:n(h.helperText,{[h.helperError]:l,[h.helperSuccess]:t}),children:l&&m?e.jsxs("span",{className:h.errorMessage,children:[e.jsx(o.AlertCircle,{}),m]}):t?e.jsxs("span",{className:h.successMessage,children:[e.jsx(o.Check,{}),_]}):_})]})});m.displayName="Textarea";const u={wrapper:"_wrapper_d8qw6_3",animate:"_animate_d8qw6_17",slideIn:"_slideIn_d8qw6_1",default:"_default_d8qw6_27",filled:"_filled_d8qw6_45",outline:"_outline_d8qw6_63",glass:"_glass_d8qw6_81",sm:"_sm_d8qw6_103",md:"_md_d8qw6_117",lg:"_lg_d8qw6_131",label:"_label_d8qw6_147",disabled:"_disabled_d8qw6_169",labelText:"_labelText_d8qw6_179",required:"_required_d8qw6_189",labelLeft:"_labelLeft_d8qw6_201",checkboxContainer:"_checkboxContainer_d8qw6_211",checkbox:"_checkbox_d8qw6_211",customCheckbox:"_customCheckbox_d8qw6_251",focused:"_focused_d8qw6_289",checked:"_checked_d8qw6_299",error:"_error_d8qw6_309",success:"_success_d8qw6_319",loading:"_loading_d8qw6_339",checkIcon:"_checkIcon_d8qw6_349",indeterminateIcon:"_indeterminateIcon_d8qw6_351",loadingIcon:"_loadingIcon_d8qw6_369",spin:"_spin_d8qw6_1",helperText:"_helperText_d8qw6_387",helperError:"_helperError_d8qw6_413",helperSuccess:"_helperSuccess_d8qw6_421",errorMessage:"_errorMessage_d8qw6_429",successMessage:"_successMessage_d8qw6_431",glow:"_glow_d8qw6_445"},g=r.forwardRef(({variant:a="default",size:i="md",error:l=!1,success:t=!1,loading:s=!1,label:c,helperText:d,errorText:_,glow:h=!1,animate:m=!0,customColor:g,className:p,style:b,checked:v,onChange:f,indeterminate:y=!1,labelPosition:x="right",disabled:w,...N},k)=>{const[C,T]=r.useState(!1),B=n(u.wrapper,u[a],u[i],{[u.focused]:C,[u.checked]:v,[u.indeterminate]:y,[u.error]:l,[u.success]:t,[u.loading]:s,[u.disabled]:w,[u.glow]:h,[u.labelLeft]:"left"===x},p),S=g?{"--checkbox-custom-color":g,...b}:b;return e.jsxs("div",{className:n(B,{[u.animate]:m}),style:S,children:[e.jsxs("label",{className:u.label,children:[c&&"left"===x&&e.jsxs("span",{className:u.labelText,children:[c,N.required&&e.jsx("span",{className:u.required,children:"*"})]}),e.jsxs("div",{className:u.checkboxContainer,children:[e.jsx("input",{ref:k,type:"checkbox",className:u.checkbox,checked:v,onChange:e=>{null==f||f(e)},onFocus:()=>T(!0),onBlur:()=>T(!1),disabled:w||s,...N}),e.jsxs("div",{className:u.customCheckbox,children:[s&&e.jsx("span",{className:u.loadingIcon,children:e.jsx(o.Loader,{})}),v&&!s&&!y&&e.jsx("span",{className:u.checkIcon,children:e.jsx(o.Check,{})}),y&&!s&&e.jsx("span",{className:u.indeterminateIcon,children:e.jsx(o.Minus,{})})]})]}),c&&"right"===x&&e.jsxs("span",{className:u.labelText,children:[c,N.required&&e.jsx("span",{className:u.required,children:"*"})]})]}),(d||_)&&e.jsx("div",{className:n(u.helperText,{[u.helperError]:l,[u.helperSuccess]:t}),children:l&&_?e.jsxs("span",{className:u.errorMessage,children:[e.jsx(o.AlertCircle,{}),_]}):t?e.jsxs("span",{className:u.successMessage,children:[e.jsx(o.Check,{}),d]}):d})]})});g.displayName="Checkbox";const p={wrapper:"_wrapper_13jy5_3",animate:"_animate_13jy5_17",slideIn:"_slideIn_13jy5_1",default:"_default_13jy5_27",filled:"_filled_13jy5_49",outline:"_outline_13jy5_71",glass:"_glass_13jy5_93",sm:"_sm_13jy5_119",md:"_md_13jy5_133",lg:"_lg_13jy5_147",label:"_label_13jy5_163",required:"_required_13jy5_181",fileInputContainer:"_fileInputContainer_13jy5_193",focused:"_focused_13jy5_227",dragOver:"_dragOver_13jy5_237",error:"_error_13jy5_251",success:"_success_13jy5_261",disabled:"_disabled_13jy5_271",loading:"_loading_13jy5_281",inputArea:"_inputArea_13jy5_291",fileInput:"_fileInput_13jy5_193",placeholder:"_placeholder_13jy5_335",hasFiles:"_hasFiles_13jy5_359",leftIcon:"_leftIcon_13jy5_369",rightIcon:"_rightIcon_13jy5_371",rightIcons:"_rightIcons_13jy5_397",withLeftIcon:"_withLeftIcon_13jy5_413",withRightIcon:"_withRightIcon_13jy5_421",loadingIcon:"_loadingIcon_13jy5_431",spin:"_spin_13jy5_1",filePreview:"_filePreview_13jy5_447",fileItem:"_fileItem_13jy5_461",fileIcon:"_fileIcon_13jy5_491",fileInfo:"_fileInfo_13jy5_507",fileName:"_fileName_13jy5_521",fileSize:"_fileSize_13jy5_539",removeButton:"_removeButton_13jy5_549",helperText:"_helperText_13jy5_589",helperError:"_helperError_13jy5_603",helperSuccess:"_helperSuccess_13jy5_611",errorMessage:"_errorMessage_13jy5_619",successMessage:"_successMessage_13jy5_621",glow:"_glow_13jy5_635"},b=r.forwardRef(({variant:a="default",size:i="md",error:l=!1,success:t=!1,loading:s=!1,label:c,placeholder:d="Choose files or drag and drop...",helperText:_,errorText:h,leftIcon:m,rightIcon:u,glow:g=!1,animate:b=!0,customColor:v,className:f,style:y,accept:x,multiple:w=!1,maxFiles:N=10,maxSize:k,onFileSelect:C,onFileRemove:T,dragAndDrop:B=!0,preview:S=!0,disabled:z,...I},$)=>{const[M,q]=r.useState(!1),[P,j]=r.useState(!1),[W,F]=r.useState([]),[E,L]=r.useState(""),A=r.useRef(null),H=e=>{if(!e)return;const r=Array.from(e),a=[],i=[];if(r.forEach(e=>{k&&e.size>k?i.push(`${e.name} is too large (max ${D(k)})`):!x||R(e,x)?a.push(e):i.push(`${e.name} is not a valid file type`)}),w&&W.length+a.length>N)return void i.push(`Maximum ${N} files allowed`);if(i.length>0)return void L(i.join(", "));L("");const n=w?[...W,...a]:a;F(n),null==C||C(n)},R=(e,r)=>r.split(",").map(e=>e.trim()).some(r=>{if(r.startsWith("."))return e.name.toLowerCase().endsWith(r.toLowerCase());if(r.includes("*")){const a=r.split("*")[0];return e.type.startsWith(a)}return e.type===r}),D=e=>{if(0===e)return"0 Bytes";const r=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,r)).toFixed(2))+" "+["Bytes","KB","MB","GB"][r]},G=n(p.wrapper,p[a],p[i],{[p.focused]:M,[p.dragOver]:P,[p.error]:l||E,[p.success]:t,[p.loading]:s,[p.disabled]:z,[p.glow]:g,[p.withLeftIcon]:m,[p.withRightIcon]:u||s,[p.hasFiles]:W.length>0},f),O=v?{"--fileinput-custom-color":v,...y}:y;return e.jsxs("div",{className:n(G,{[p.animate]:b}),style:O,children:[c&&e.jsxs("label",{className:p.label,children:[c,I.required&&e.jsx("span",{className:p.required,children:"*"})]}),e.jsxs("div",{className:p.fileInputContainer,onDragOver:e=>{e.preventDefault(),!B||z||s||j(!0)},onDragLeave:e=>{e.preventDefault(),j(!1)},onDrop:e=>{e.preventDefault(),j(!1),!B||z||s||H(e.dataTransfer.files)},onClick:()=>{var e;z||s||null==(e=A.current)||e.click()},children:[m&&e.jsx("span",{className:p.leftIcon,children:m}),e.jsxs("div",{className:p.inputArea,children:[e.jsx("input",{ref:e=>{"function"==typeof $?$(e):$&&($.current=e),A.current=e},type:"file",className:p.fileInput,accept:x,multiple:w,onChange:e=>{H(e.target.files)},onFocus:()=>q(!0),onBlur:()=>q(!1),disabled:z||s,...I}),e.jsxs("div",{className:p.placeholder,children:[e.jsx(o.Upload,{}),e.jsx("span",{children:d})]})]}),e.jsxs("div",{className:p.rightIcons,children:[s&&e.jsx("span",{className:p.loadingIcon,children:e.jsx(o.Loader,{})}),u&&!s&&e.jsx("span",{className:p.rightIcon,children:u})]})]}),S&&W.length>0&&e.jsx("div",{className:p.filePreview,children:W.map((r,a)=>e.jsxs("div",{className:p.fileItem,children:[e.jsx("span",{className:p.fileIcon,children:e.jsx(o.File,{})}),e.jsxs("div",{className:p.fileInfo,children:[e.jsx("span",{className:p.fileName,children:r.name}),e.jsx("span",{className:p.fileSize,children:D(r.size)})]}),e.jsx("button",{type:"button",className:p.removeButton,onClick:()=>(e=>{const r=W.filter(r=>r!==e);F(r),null==T||T(e)})(r),"aria-label":"Remove file",children:e.jsx(o.X,{})})]},a))}),(_||h||E)&&e.jsx("div",{className:n(p.helperText,{[p.helperError]:l||E,[p.helperSuccess]:t}),children:l&&h?e.jsxs("span",{className:p.errorMessage,children:[e.jsx(o.AlertCircle,{}),h]}):E?e.jsxs("span",{className:p.errorMessage,children:[e.jsx(o.AlertCircle,{}),E]}):t?e.jsxs("span",{className:p.successMessage,children:[e.jsx(o.Check,{}),_]}):_})]})});b.displayName="FileInput";const v={container:"_container_1yhrq_3",header:"_header_1yhrq_17",label:"_label_1yhrq_31",value:"_value_1yhrq_47",sliderContainer:"_sliderContainer_1yhrq_71",track:"_track_1yhrq_89",progress:"_progress_1yhrq_111",range:"_range_1yhrq_125",helperText:"_helperText_1yhrq_247","variant-default":"_variant-default_1yhrq_261","variant-outline":"_variant-outline_1yhrq_269","variant-glass":"_variant-glass_1yhrq_279","size-sm":"_size-sm_1yhrq_293","size-lg":"_size-lg_1yhrq_313",disabled:"_disabled_1yhrq_335",dragging:"_dragging_1yhrq_353"},f=({label:a,value:i,onChange:l,min:t=0,max:o=100,step:s=1,variant:c="default",size:d="md",disabled:_=!1,showValue:h=!0,valueFormatter:m=e=>`${e}`,helperText:u,className:g,style:p})=>{const[b,f]=r.useState(!1),[y,x]=r.useState(i),w=r.useRef(null),N=r.useRef(null);r.useEffect(()=>{x(i)},[i]),r.useEffect(()=>{if(N.current){const e=(y-t)/(o-t)*100;N.current.style.width=`${e}%`}},[y,t,o]);const k=()=>{f(!0)},C=()=>{f(!1)};r.useEffect(()=>{if(b)return document.addEventListener("mouseup",C),()=>document.removeEventListener("mouseup",C)},[b]);const T=n(v.container,v[`variant-${c}`],v[`size-${d}`],{[v.disabled]:_,[v.dragging]:b},g),B=n(v.range,v[`variant-${c}`],v[`size-${d}`]);return e.jsxs("div",{className:T,style:p,children:[(a||h)&&e.jsxs("div",{className:v.header,children:[a&&e.jsx("label",{className:v.label,children:a}),h&&e.jsx("span",{className:v.value,children:m(y)})]}),e.jsxs("div",{className:v.sliderContainer,children:[e.jsx("div",{className:v.track,children:e.jsx("div",{ref:N,className:v.progress})}),e.jsx("input",{ref:w,type:"range",min:t,max:o,step:s,value:y,onChange:e=>{const r=parseFloat(e.target.value);x(r),l(r)},onMouseDown:k,onTouchStart:k,disabled:_,className:B,style:{"--range-progress":(y-t)/(o-t)*100+"%"}})]}),u&&e.jsx("div",{className:v.helperText,children:u})]})},y={container:"_container_1qspq_3",label:"_label_1qspq_17",pickerContainer:"_pickerContainer_1qspq_33",colorPicker:"_colorPicker_1qspq_43",colorPreview:"_colorPreview_1qspq_89",hexValue:"_hexValue_1qspq_107",dropdownArrow:"_dropdownArrow_1qspq_125",open:"_open_1qspq_137",hiddenInput:"_hiddenInput_1qspq_145",dropdown:"_dropdown_1qspq_125",dropdownSlide:"_dropdownSlide_1qspq_1",presetColors:"_presetColors_1qspq_191",presetColor:"_presetColor_1qspq_191",customColor:"_customColor_1qspq_245",customLabel:"_customLabel_1qspq_257",hexInput:"_hexInput_1qspq_271",helperText:"_helperText_1qspq_313","variant-default":"_variant-default_1qspq_327","variant-outline":"_variant-outline_1qspq_335","variant-glass":"_variant-glass_1qspq_353","size-sm":"_size-sm_1qspq_367","size-lg":"_size-lg_1qspq_395",disabled:"_disabled_1qspq_425"},x=({label:i,value:l,onChange:t,variant:o="default",size:s="md",disabled:c=!1,showPreview:d=!0,showHexValue:_=!0,presetColors:h=["#3b82f6","#ef4444","#10b981","#f59e0b","#8b5cf6","#06b6d4","#84cc16","#f97316","#ec4899","#6366f1"],helperText:m,className:u,style:g})=>{var p;const[b,v]=r.useState(!1),[f,x]=r.useState(l||"#000000"),[w,N]=r.useState({top:0,left:0}),k=r.useRef(null),C=r.useRef(null),T=r.useRef(null);r.useEffect(()=>{x(l||"#000000")},[l]),r.useEffect(()=>{if(b&&k.current){const e=k.current.getBoundingClientRect(),r=window.innerHeight-e.bottom,a=e.top,i=300;N({top:r<i&&a>i?e.top-i-8:e.bottom+4,left:e.left})}},[b]),r.useEffect(()=>{const e=e=>{k.current&&!k.current.contains(e.target)&&C.current&&!C.current.contains(e.target)&&v(!1)};if(b)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[b]);const B=n(y.container,y[`variant-${o}`],y[`size-${s}`],{[y.disabled]:c,[y.open]:b},u),S=n(y.colorPicker,y[`variant-${o}`],y[`size-${s}`]);return e.jsxs("div",{className:B,style:g,children:[i&&e.jsx("label",{className:y.label,children:i}),e.jsxs("div",{className:y.pickerContainer,ref:k,children:[e.jsxs("div",{className:S,onClick:()=>!c&&v(!b),children:[d&&e.jsx("div",{className:y.colorPreview,style:{backgroundColor:f}}),_&&e.jsx("span",{className:y.hexValue,children:(f||"#000000").toUpperCase()}),e.jsx("div",{className:y.dropdownArrow,children:e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:e.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsx("input",{ref:T,type:"color",value:f,onChange:e=>{const r=e.target.value;x(r),t(r)},className:y.hiddenInput,disabled:c}),b&&a.createPortal(e.jsxs("div",{ref:C,className:y.dropdown,style:{top:`${w.top}px`,left:`${w.left}px`,width:(null==(p=k.current)?void 0:p.offsetWidth)||280},children:[e.jsx("div",{className:y.presetColors,children:h.map((r,a)=>e.jsx("button",{className:y.presetColor,style:{backgroundColor:r},onClick:()=>(e=>{x(e),t(e),v(!1)})(r),title:r},a))}),e.jsxs("div",{className:y.customColor,children:[e.jsx("label",{className:y.customLabel,children:"Custom Color:"}),e.jsx("input",{type:"text",value:f,onChange:e=>{const r=e.target.value;/^#[0-9A-Fa-f]{6}$/.test(r)&&(x(r),t(r))},placeholder:"#000000",className:y.hexInput,maxLength:7})]})]}),document.body)]}),m&&e.jsx("div",{className:y.helperText,children:m})]})},w={card:"_card_1f22k_3",sm:"_sm_1f22k_77",md:"_md_1f22k_85",lg:"_lg_1f22k_93",xl:"_xl_1f22k_101",full:"_full_1f22k_109","padding-none":"_padding-none_1f22k_121","padding-sm":"_padding-sm_1f22k_129","padding-md":"_padding-md_1f22k_137","padding-lg":"_padding-lg_1f22k_145","padding-xl":"_padding-xl_1f22k_153",default:"_default_1f22k_163",glass:"_glass_1f22k_175",outlined:"_outlined_1f22k_191",elevated:"_elevated_1f22k_203",flat:"_flat_1f22k_215",hoverable:"_hoverable_1f22k_229",clickable:"_clickable_1f22k_239",glow:"_glow_1f22k_271",blur:"_blur_1f22k_287",header:"_header_1f22k_299",content:"_content_1f22k_351",footer:"_footer_1f22k_367",animate:"_animate_1f22k_567",cardEnter:"_cardEnter_1f22k_1",interactive:"_interactive_1f22k_579"},N=r.forwardRef(({variant:r="default",size:a="md",hoverable:i=!1,clickable:l=!1,glow:t=!1,blur:o=!1,padding:s="md",header:c,footer:d,children:_,animate:h=!0,customColor:m,className:u,style:g,onClick:p,...b},v)=>{const f=n(w.card,w[r],w[a],w[`padding-${s}`],{[w.hoverable]:i,[w.clickable]:l||p,[w.glow]:t,[w.blur]:o},u),y=m?{"--card-custom-color":m,...g}:g;return e.jsxs("div",{ref:v,className:n(f,{[w.animate]:h}),style:y,onClick:p,...b,children:[c&&e.jsx("div",{className:w.header,children:c}),e.jsx("div",{className:w.content,children:_}),d&&e.jsx("div",{className:w.footer,children:d})]})});N.displayName="Card";const k={icon:"_icon_dh5c3_1",xs:"_xs_dh5c3_11",sm:"_sm_dh5c3_17",md:"_md_dh5c3_23",lg:"_lg_dh5c3_29",xl:"_xl_dh5c3_35",circle:"_circle_dh5c3_42",square:"_square_dh5c3_46",rounded:"_rounded_dh5c3_50","bg-solid":"_bg-solid_dh5c3_55","bg-gradient":"_bg-gradient_dh5c3_59","bg-glass":"_bg-glass_dh5c3_63","bg-outline":"_bg-outline_dh5c3_70",primary:"_primary_dh5c3_76",secondary:"_secondary_dh5c3_83",success:"_success_dh5c3_90",error:"_error_dh5c3_97",warning:"_warning_dh5c3_104",info:"_info_dh5c3_111",custom:"_custom_dh5c3_118",glow:"_glow_dh5c3_126",pulse:"_pulse_dh5c3_130",spin:"_spin_dh5c3_134"},C=r.forwardRef(({variant:r="primary",size:a="md",shape:i="rounded",glow:l=!1,pulse:t=!1,spin:o=!1,background:s="gradient",color:c,children:d,className:_,style:h,...m},u)=>{const g=n(k.icon,k[r],k[a],k[i],k[`bg-${s}`],{[k.glow]:l,[k.pulse]:t,[k.spin]:o},_),p=c?{"--icon-color":c,...h}:h;return e.jsx("div",{ref:u,className:g,style:p,...m,children:d})});C.displayName="Icon";const T={container:"_container_1fkrw_2",header:"_header_1fkrw_9",labelContainer:"_labelContainer_1fkrw_16",icon:"_icon_1fkrw_22",label:"_label_1fkrw_16",value:"_value_1fkrw_35",bar:"_bar_1fkrw_43","bar--default":"_bar--default_1fkrw_53","bar--rounded":"_bar--rounded_1fkrw_58","bar--glow":"_bar--glow_1fkrw_63","bar--health":"_bar--health_1fkrw_69","bar--armor":"_bar--armor_1fkrw_75","bar--loading":"_bar--loading_1fkrw_81","bar--progress":"_bar--progress_1fkrw_87","bar--xp":"_bar--xp_1fkrw_93","bar--energy":"_bar--energy_1fkrw_99","bar--pulse":"_bar--pulse_1fkrw_106",pulse:"_pulse_1fkrw_1","bar--striped":"_bar--striped_1fkrw_122",fill:"_fill_1fkrw_122",stripes:"_stripes_1fkrw_1","fill--no-animation":"_fill--no-animation_1fkrw_156",shine:"_shine_1fkrw_1",moveStripes:"_moveStripes_1fkrw_1",circularContainer:"_circularContainer_1fkrw_367",circularHeader:"_circularHeader_1fkrw_374",circularBar:"_circularBar_1fkrw_381",circularSvg:"_circularSvg_1fkrw_388",circularProgress:"_circularProgress_1fkrw_393",circularCenter:"_circularCenter_1fkrw_398",circularIcon:"_circularIcon_1fkrw_410",circularPercentage:"_circularPercentage_1fkrw_418","circular--glow":"_circular--glow_1fkrw_426","circular--pulse":"_circular--pulse_1fkrw_430",circularPulse:"_circularPulse_1fkrw_1",iconContainer:"_iconContainer_1fkrw_446",iconHeader:"_iconHeader_1fkrw_453",iconBar:"_iconBar_1fkrw_460",iconFill:"_iconFill_1fkrw_476",iconContent:"_iconContent_1fkrw_487",iconSymbol:"_iconSymbol_1fkrw_500",iconPercentage:"_iconPercentage_1fkrw_509","icon--glow":"_icon--glow_1fkrw_517","icon--pulse":"_icon--pulse_1fkrw_525",iconPulse:"_iconPulse_1fkrw_1","circular--health":"_circular--health_1fkrw_543","icon--health":"_icon--health_1fkrw_544","circular--armor":"_circular--armor_1fkrw_551","icon--armor":"_icon--armor_1fkrw_552","circular--loading":"_circular--loading_1fkrw_559","icon--loading":"_icon--loading_1fkrw_560","circular--progress":"_circular--progress_1fkrw_567","icon--progress":"_icon--progress_1fkrw_568","circular--xp":"_circular--xp_1fkrw_575","icon--xp":"_icon--xp_1fkrw_576","circular--energy":"_circular--energy_1fkrw_583","icon--energy":"_icon--energy_1fkrw_584",error:"_error_1fkrw_612",info:"_info_1fkrw_617",primary:"_primary_1fkrw_622",success:"_success_1fkrw_627",warning:"_warning_1fkrw_632"},B=({value:r,max:a=100,height:i=8,backgroundColor:n,fillColor:l,gradient:t,showValue:o=!1,label:s,variant:c="default",type:d="horizontal",size:_=64,strokeWidth:h=4,icon:m,animationDuration:u=300,className:g="",noAnimation:p=!1,pulseOnLow:b=!1,pulseThreshold:v=20,rounded:f=!0,glow:y=!1,striped:x=!1,showPercentage:w=!1})=>{const N=Math.min(Math.max(r,0),a),k=N/a*100,C=(()=>{switch(c){case"health":return{fillColor:l||"#ef4444",gradient:t||"linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #f87171 100%)",glow:y||!0};case"armor":return{fillColor:l||"#3b82f6",gradient:t||"linear-gradient(90deg, #1d4ed8 0%, #3b82f6 50%, #60a5fa 100%)",glow:y||!0};case"loading":return{fillColor:l||"var(--color-primary, #00D9FF)",gradient:t||"linear-gradient(90deg, var(--color-primary, #00D9FF) 0%, var(--color-secondary, #0099CC) 100%)",striped:x||!0,glow:y||!0};case"progress":return{fillColor:l||"#10b981",gradient:t||"linear-gradient(90deg, #059669 0%, #10b981 50%, #34d399 100%)"};case"xp":return{fillColor:l||"#f59e0b",gradient:t||"linear-gradient(90deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%)",glow:y||!0};case"energy":return{fillColor:l||"#8b5cf6",gradient:t||"linear-gradient(90deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%)",glow:y||!0};default:return{fillColor:l||"var(--color-primary, #00D9FF)",gradient:t}}})(),B=b&&k<=v;if("circular"===d){const r=(_-h)/2,i=2*r*Math.PI,l=i,t=i-k/100*i,d=[T.circularBar,c&&T[`circular--${c}`],C.glow&&T["circular--glow"],B&&T["circular--pulse"],g].filter(Boolean).join(" ");return e.jsxs("div",{className:T.circularContainer,children:[(s||o)&&e.jsxs("div",{className:T.circularHeader,children:[s&&e.jsx("span",{className:T.label,children:s}),o&&e.jsxs("span",{className:T.value,children:[Math.round(N),"/",a]})]}),e.jsxs("div",{className:d,style:{width:_,height:_},children:[e.jsxs("svg",{width:_,height:_,className:T.circularSvg,children:[e.jsx("circle",{cx:_/2,cy:_/2,r:r,fill:"none",stroke:n||"rgba(255, 255, 255, 0.1)",strokeWidth:h}),e.jsx("circle",{cx:_/2,cy:_/2,r:r,fill:"none",stroke:C.fillColor,strokeWidth:h,strokeLinecap:"round",strokeDasharray:l,strokeDashoffset:t,className:T.circularProgress,style:{transitionDuration:p?"0ms":`${u}ms`,filter:C.glow?`drop-shadow(0 0 8px ${C.fillColor})`:"none"}})]}),e.jsxs("div",{className:T.circularCenter,children:[m&&e.jsx("div",{className:T.circularIcon,children:m}),w&&e.jsxs("div",{className:T.circularPercentage,children:[Math.round(k),"%"]})]})]})]})}if("icon"===d){const r=[T.iconBar,c&&T[`icon--${c}`],C.glow&&T["icon--glow"],B&&T["icon--pulse"],g].filter(Boolean).join(" ");return e.jsxs("div",{className:T.iconContainer,children:[(s||o)&&e.jsxs("div",{className:T.iconHeader,children:[s&&e.jsx("span",{className:T.label,children:s}),o&&e.jsxs("span",{className:T.value,children:[Math.round(N),"/",a]})]}),e.jsxs("div",{className:r,style:{width:_,height:_,backgroundColor:n||"rgba(255, 255, 255, 0.1)"},children:[e.jsx("div",{className:T.iconFill,style:{height:`${k}%`,background:C.gradient||C.fillColor,transitionDuration:p?"0ms":`${u}ms`,filter:C.glow?`drop-shadow(0 0 6px ${C.fillColor})`:"none"}}),e.jsxs("div",{className:T.iconContent,children:[m&&e.jsx("div",{className:T.iconSymbol,children:m}),w&&e.jsxs("div",{className:T.iconPercentage,children:[Math.round(k),"%"]})]})]})]})}const S=[T.bar,c&&T[`bar--${c}`],f&&T["bar--rounded"],C.glow&&T["bar--glow"],B&&T["bar--pulse"],C.striped&&T["bar--striped"],g].filter(Boolean).join(" "),z=[T.fill,p&&T["fill--no-animation"]].filter(Boolean).join(" ");return e.jsxs("div",{className:T.container,children:[(s||m||o)&&e.jsxs("div",{className:T.header,children:[e.jsxs("div",{className:T.labelContainer,children:[m&&e.jsx("span",{className:T.icon,children:m}),s&&e.jsx("span",{className:T.label,children:s})]}),o&&e.jsxs("span",{className:T.value,children:[Math.round(N),"/",a]})]}),e.jsx("div",{className:S,style:{height:`${i}px`,backgroundColor:n||"rgba(255, 255, 255, 0.1)"},children:e.jsx("div",{className:z,style:{width:`${k}%`,background:C.gradient||C.fillColor,transitionDuration:p?"0ms":`${u}ms`}})})]})},S={toggle:"_toggle_1byr0_2",container:"_container_1byr0_9",input:"_input_1byr0_16",track:"_track_1byr0_23","track--checked":"_track--checked_1byr0_34",thumb:"_thumb_1byr0_41","thumb--checked":"_thumb--checked_1byr0_53",icon:"_icon_1byr0_60","toggle--sm":"_toggle--sm_1byr0_70","toggle--md":"_toggle--md_1byr0_86","toggle--lg":"_toggle--lg_1byr0_102","toggle--primary":"_toggle--primary_1byr0_119","toggle--success":"_toggle--success_1byr0_125","toggle--warning":"_toggle--warning_1byr0_131","toggle--error":"_toggle--error_1byr0_137",content:"_content_1byr0_144",label:"_label_1byr0_151",description:"_description_1byr0_160","toggle--disabled":"_toggle--disabled_1byr0_168"},z=({checked:r,onChange:a,label:i,description:n,disabled:l=!1,size:t="md",variant:o="primary",className:s="",iconActive:c,iconInactive:d,id:_,name:h})=>{const m=[S.toggle,S[`toggle--${t}`],S[`toggle--${o}`],r&&S["toggle--checked"],l&&S["toggle--disabled"],s].filter(Boolean).join(" "),u=[S.track,r&&S["track--checked"]].filter(Boolean).join(" "),g=[S.thumb,r&&S["thumb--checked"]].filter(Boolean).join(" ");return e.jsx("div",{className:m,children:e.jsxs("div",{className:S.container,children:[e.jsx("input",{type:"checkbox",id:_,name:h,checked:r,onChange:e=>{l||a(e.target.checked)},disabled:l,className:S.input,"aria-describedby":n?`${_}-description`:void 0}),e.jsx("div",{className:u,onClick:()=>!l&&a(!r),children:e.jsx("div",{className:g,children:c&&d&&e.jsx("span",{className:S.icon,children:r?c:d})})}),(i||n)&&e.jsxs("div",{className:S.content,children:[i&&e.jsx("label",{htmlFor:_,className:S.label,children:i}),n&&e.jsx("p",{className:S.description,id:_?`${_}-description`:void 0,children:n})]})]})})},I={radioGroup:"_radioGroup_6utmf_3","radioGroup--disabled":"_radioGroup--disabled_6utmf_17","radioGroup--error":"_radioGroup--error_6utmf_27",header:"_header_6utmf_37",labelContainer:"_labelContainer_6utmf_51",groupLabel:"_groupLabel_6utmf_63",required:"_required_6utmf_77",groupDescription:"_groupDescription_6utmf_89",options:"_options_6utmf_105","radioGroup--horizontal":"_radioGroup--horizontal_6utmf_117",option:"_option_6utmf_105","option--disabled":"_option--disabled_6utmf_159","option--selected":"_option--selected_6utmf_169",input:"_input_6utmf_191",radio:"_radio_6utmf_3","radio--selected":"_radio--selected_6utmf_243",indicator:"_indicator_6utmf_257","radioGroup--sm":"_radioGroup--sm_6utmf_285","radioGroup--lg":"_radioGroup--lg_6utmf_305",content:"_content_6utmf_327",labelRow:"_labelRow_6utmf_349",icon:"_icon_6utmf_361",optionLabel:"_optionLabel_6utmf_377",optionDescription:"_optionDescription_6utmf_405","option--primary":"_option--primary_6utmf_427","option--success":"_option--success_6utmf_453","option--warning":"_option--warning_6utmf_479","option--error":"_option--error_6utmf_505",errorMessage:"_errorMessage_6utmf_533",radioRipple:"_radioRipple_6utmf_1",item:"_item_6utmf_693",wrapper:"_wrapper_6utmf_711",error:"_error_6utmf_533"},$=({name:a,options:i,value:n,onChange:l,label:t,description:o,disabled:s=!1,direction:c="vertical",size:d="md",variant:_="primary",className:h="",required:m=!1,error:u=!1,errorMessage:g})=>{const p=r.useId(),b=[I.radioGroup,I[`radioGroup--${c}`],I[`radioGroup--${d}`],u&&I["radioGroup--error"],s&&I["radioGroup--disabled"],h].filter(Boolean).join(" "),v=r.useCallback(e=>{s||e===n||l(e)},[s,n,l]);return e.jsxs("div",{className:b,children:[(t||o)&&e.jsxs("div",{className:I.header,children:[t&&e.jsx("div",{className:I.labelContainer,children:e.jsxs("span",{className:I.groupLabel,children:[t,m&&e.jsx("span",{className:I.required,children:"*"})]})}),o&&e.jsx("p",{className:I.groupDescription,children:o})]}),e.jsx("div",{className:I.options,children:i.map(r=>{const i=n===r.value,l=s||r.disabled,t=[I.option,I[`option--${_}`],i&&I["option--selected"],l&&I["option--disabled"]].filter(Boolean).join(" "),o=[I.radio,i&&I["radio--selected"]].filter(Boolean).join(" "),c=`${p}-${a}-${r.value}`,d=`${p}-${a}-${r.value}-description`;return e.jsxs("div",{className:t,onClick:e=>{e.stopPropagation(),e.preventDefault(),l||v(r.value)},children:[e.jsx("input",{type:"radio",id:c,name:`${p}-${a}`,value:r.value,checked:i,onChange:e=>{e.stopPropagation(),v(r.value)},disabled:l,className:I.input,"aria-describedby":r.description?d:void 0}),e.jsx("div",{className:o,children:e.jsx("div",{className:I.indicator})}),e.jsxs("div",{className:I.content,onClick:e=>{e.stopPropagation(),e.preventDefault(),l||v(r.value)},children:[e.jsxs("div",{className:I.labelRow,children:[r.icon&&e.jsx("span",{className:I.icon,children:r.icon}),e.jsx("label",{htmlFor:c,className:I.optionLabel,children:r.label})]}),r.description&&e.jsx("p",{className:I.optionDescription,id:d,children:r.description})]})]},`${a}-${r.value}`)})}),u&&g&&e.jsx("div",{className:I.errorMessage,children:g})]})},M={container:"_container_1mc7r_3",horizontal:"_horizontal_1mc7r_13",vertical:"_vertical_1mc7r_21",tabs:"_tabs_1mc7r_31",fullWidth:"_fullWidth_1mc7r_63",tab:"_tab_1mc7r_31",disabled:"_disabled_1mc7r_103",active:"_active_1mc7r_113",sm:"_sm_1mc7r_133",md:"_md_1mc7r_143",lg:"_lg_1mc7r_153",default:"_default_1mc7r_165",pills:"_pills_1mc7r_173",underline:"_underline_1mc7r_203",minimal:"_minimal_1mc7r_211",activeIndicator:"_activeIndicator_1mc7r_223",tabContent:"_tabContent_1mc7r_309",tabIcon:"_tabIcon_1mc7r_325",tabLabel:"_tabLabel_1mc7r_337",tabBadge:"_tabBadge_1mc7r_345",content:"_content_1mc7r_369",panel:"_panel_1mc7r_379",fadeInUp:"_fadeInUp_1mc7r_1"},q=({items:a,defaultActiveTab:i,activeTab:l,onTabChange:t,variant:o="default",size:s="md",orientation:c="horizontal",fullWidth:d=!1,className:_,tabsClassName:h,contentClassName:m})=>{var u;const[g,p]=r.useState(i||(null==(u=null==a?void 0:a[0])?void 0:u.id)||""),b=l??g,v=void 0!==l,f=null==a?void 0:a.find(e=>e.id===b),y=n(M.tabs,M[o],M[s],M[c],{[M.fullWidth]:d},h),x=n(M.container,M[c],_);return e.jsxs("div",{className:x,children:[e.jsx("div",{className:y,role:"tablist",children:null==a?void 0:a.map(r=>{const a=r.id===b;return e.jsxs("button",{className:n(M.tab,{[M.active]:a,[M.disabled]:r.disabled}),onClick:()=>{return!r.disabled&&(e=r.id,v||p(e),void(null==t||t(e)));var e},disabled:r.disabled,role:"tab","aria-selected":a,"aria-controls":`panel-${r.id}`,id:`tab-${r.id}`,children:[a&&e.jsx("div",{className:M.activeIndicator}),e.jsxs("div",{className:M.tabContent,children:[r.icon&&e.jsx("span",{className:M.tabIcon,children:r.icon}),e.jsx("span",{className:M.tabLabel,children:r.label}),r.badge&&e.jsx("span",{className:M.tabBadge,children:r.badge})]})]},r.id)})}),e.jsx("div",{className:n(M.content,m),children:f&&e.jsx("div",{className:M.panel,role:"tabpanel","aria-labelledby":`tab-${b}`,id:`panel-${b}`,children:f.content},b)})]})},P={accordion:"_accordion_1qt5t_3",default:"_default_1qt5t_15",bordered:"_bordered_1qt5t_27",item:"_item_1qt5t_27",separated:"_separated_1qt5t_49",minimal:"_minimal_1qt5t_71",disabled:"_disabled_1qt5t_101",open:"_open_1qt5t_117",header:"_header_1qt5t_137",sm:"_sm_1qt5t_193",md:"_md_1qt5t_203",lg:"_lg_1qt5t_213",headerContent:"_headerContent_1qt5t_225",headerIcon:"_headerIcon_1qt5t_239",headerTitle:"_headerTitle_1qt5t_253",chevron:"_chevron_1qt5t_265",contentWrapper:"_contentWrapper_1qt5t_295",content:"_content_1qt5t_295",first:"_first_1qt5t_411",last:"_last_1qt5t_421"},j=({items:a,multiple:i=!1,variant:l="default",size:t="md",className:o,itemClassName:s,headerClassName:c,contentClassName:d,allowToggle:_=!0,defaultOpenItems:h=[],openItems:m,onItemToggle:u})=>{const[g,p]=r.useState(()=>{var e;const r=(null==(e=null==a?void 0:a.filter(e=>e.defaultOpen))?void 0:e.map(e=>e.id))||[];return[...h,...r]}),b=m??g,v=void 0!==m,f=n(P.accordion,P[l],P[t],o);return e.jsx("div",{className:f,children:null==a?void 0:a.map((r,l)=>{const t=b.includes(r.id),o=r.disabled;return e.jsxs("div",{className:n(P.item,{[P.open]:t,[P.disabled]:o,[P.first]:0===l,[P.last]:l===((null==a?void 0:a.length)||0)-1},s),children:[e.jsxs("button",{className:n(P.header,c),onClick:()=>!o&&(e=>{const r=b.includes(e);!_&&r||(v||p(a=>i?r?a.filter(r=>r!==e):[...a,e]:r?[]:[e]),null==u|