master-components-react 3.5.15 → 3.5.17
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.
|
@@ -35,7 +35,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
35
35
|
${a?br.loading:""}
|
|
36
36
|
${n?br[n]:""}
|
|
37
37
|
${y&&m&&!c&&!r?br.active:""}
|
|
38
|
-
${r?br.disabled:""}`,onMouseDown:()=>b(!0),onMouseUp:()=>b(!1),onMouseLeave:()=>b(!1),onClick:()=>{!r&&i&&typeof i=="function"&&i()},children:T.jsxs("div",{className:br.buttonSlot,style:!r&&p?p:{},children:[u||o&&s?s:"",!u&&T.jsx(T.Fragment,{children:a?T.jsx("div",{style:{display:"grid",placeItems:"center"},children:T.jsx(nB,{})}):T.jsx("span",{style:!r&&h?h:{},className:br.buttonLabel,children:e??"Button"})}),o&&l?l:""]})})},mB="FormInput-module__inputWrapper",gB="FormInput-module__inputLabel",CB="FormInput-module__required",yB="FormInput-module__inputContainer",xB="FormInput-module__inputContent",bB="FormInput-module__inputTags",SB="FormInput-module__focused",EB="FormInput-module__error",wB="FormInput-module__rightIcon",IB="FormInput-module__leftIcon",TB="FormInput-module__inputDropDown",AB="FormInput-module__http",DB="FormInput-module__disabled",OB="FormInput-module__sm",RB="FormInput-module__md",kB="FormInput-module__withCopy",BB="FormInput-module__inputHelperText",LB="FormInput-module__dark",fi={inputWrapper:mB,inputLabel:gB,required:CB,inputContainer:yB,inputContent:xB,inputTags:bB,focused:SB,error:EB,rightIcon:wB,leftIcon:IB,inputDropDown:TB,http:AB,disabled:DB,sm:OB,md:RB,withCopy:kB,inputHelperText:BB,dark:LB},Du=({width:e,height:t,color:i})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:T.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),PB=({width:e,height:t,color:i})=>T.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[T.jsx("g",{clipPath:"url(#clip0_444_26)",children:T.jsx("path",{d:"M4.1665 12.5C3.38993 12.5 3.00165 12.5 2.69536 12.3732C2.28698 12.204 1.96253 11.8795 1.79337 11.4712C1.6665 11.1649 1.6665 10.7766 1.6665 10V4.33335C1.6665 3.39993 1.6665 2.93322 1.84816 2.5767C2.00795 2.2631 2.26292 2.00813 2.57652 1.84834C2.93304 1.66669 3.39975 1.66669 4.33317 1.66669H9.99984C10.7764 1.66669 11.1647 1.66669 11.471 1.79355C11.8794 1.96271 12.2038 2.28717 12.373 2.69555C12.4998 3.00183 12.4998 3.39012 12.4998 4.16669M10.1665 18.3334H15.6665C16.5999 18.3334 17.0666 18.3334 17.4232 18.1517C17.7368 17.9919 17.9917 17.7369 18.1515 17.4233C18.3332 17.0668 18.3332 16.6001 18.3332 15.6667V10.1667C18.3332 9.23327 18.3332 8.76656 18.1515 8.41004C17.9917 8.09643 17.7368 7.84147 17.4232 7.68168C17.0666 7.50002 16.5999 7.50002 15.6665 7.50002H10.1665C9.23308 7.50002 8.76637 7.50002 8.40985 7.68168C8.09625 7.84147 7.84128 8.09643 7.68149 8.41004C7.49984 8.76656 7.49984 9.23327 7.49984 10.1667V15.6667C7.49984 16.6001 7.49984 17.0668 7.68149 17.4233C7.84128 17.7369 8.09625 17.9919 8.40985 18.1517C8.76637 18.3334 9.23308 18.3334 10.1665 18.3334Z",stroke:i??"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),T.jsx("defs",{children:T.jsx("clipPath",{id:"clip0_444_26",children:T.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),Ou=e=>T.jsx("svg",{xmlns:e.xmlns??"http://www.w3.org/2000/svg",width:e.width??"14",height:e.height??"14",viewBox:e.viewBox??"0 0 14 14",fill:e.fill??"none",children:T.jsx("path",{d:e.d??"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:e.stroke??"#A4A7AE",strokeWidth:e.strokeWidth??"1.66667",strokeLinecap:e.strokeLinecap??"round",strokeLinejoin:e.strokeLinejoin??"round"})}),FB="Checkbox-module__checkboxWrapper",MB="Checkbox-module__sm",VB="Checkbox-module__md",NB="Checkbox-module__checkMark",$B="Checkbox-module__checked",HB="Checkbox-module__disabled",WB="Checkbox-module__dark",qo={checkboxWrapper:FB,sm:MB,md:VB,checkMark:NB,checked:$B,disabled:HB,dark:WB},xI=({color:e,width:t,height:i})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:T.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),zB=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:T.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),Ru=({checked:e,change:t,disabled:i=!1,required:n=!1,multipleChecked:r=!1,size:a="md",activeStyle:o,checkBoxStyle:s,withActive:l=!0,theme:u="light"})=>{const d=le.useRef(null),[c,h]=le.useState(!1),f=()=>{i||t&&typeof t=="function"&&t(!e)},p=()=>c?!l||i?{boxShadow:"none",...o}:o??{}:s??{};return T.jsxs("div",{style:p(),className:` ${u==="dark"?qo.dark:""} ${qo.checkboxWrapper} ${qo[a]} ${e?qo.checked:qo.unChecked} ${i?qo.disabled:""}`,onMouseDown:()=>h(!0),onMouseUp:()=>h(!1),onMouseLeave:()=>h(!1),onClick:f,children:[T.jsx("input",{ref:d,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?T.jsx(zB,{}):T.jsx(xI,{}):""]})},GB="Tag-module__tagContainer",UB="Tag-module__onlyLabel",KB="Tag-module__sm",jB="Tag-module__md",qB="Tag-module__lg",YB="Tag-module__tagLabel",XB="Tag-module__tagNumber",ZB="Tag-module__tagClose",JB="Tag-module__dark",$a={tagContainer:GB,onlyLabel:UB,sm:KB,md:jB,lg:qB,tagLabel:YB,tagNumber:XB,tagClose:ZB,dark:JB},Wm=({id:e,label:t,icon:i,withClose:n,withCheckbox:r,withNumber:a,number:o,checkboxProps:s,disable:l,size:u,onClose:d,tagContainerStyle:c,tagLabelStyle:h,tagNumberStyle:f,tagCloseStlye:p,theme:m})=>{const g=()=>!r&&!i&&!n&&!a,y=()=>i,b=()=>{d&&typeof d=="function"&&d(e??null)};return T.jsxs("div",{style:c??{},className:`${m==="dark"?$a.dark:""} ${$a.tagContainer} ${g()?$a.onlyLabel:""} ${$a[u??"md"]}`,children:[r&&T.jsx(Ru,{...s}),i&&y(),t&&T.jsx("p",{style:h??{},className:$a.tagLabel,children:t??""}),a&&T.jsx("div",{style:f??{},className:$a.tagNumber,children:o??""}),n&&T.jsx("div",{style:p??{},className:$a.tagClose,onClick:b,children:T.jsx(Ou,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},bc=({value:e,label:t,placeholder:i,required:n,disabled:r,type:a,size:o,onChange:s,onFocus:l,onBlur:u,msg:d,readOnly:c,maxLength:h,onlyText:f,tagValues:p,onRightIconIconClick:m,onRightIconIconMouseEnter:g,onRightIconIconMouseLeave:y,onLeftIconIconClick:b,onLeftIconIconMouseEnter:A,onLeftIconIconMouseLeave:k,onPressEnter:D,rightIcon:K,leftIcon:N,fixedDropdown:W=!0,withDropDown:G,dropdownData:j,dropDownPosition:Q="left",onSelectData:$,withTags:Y,tagProps:x,withLink:z,withCopy:ie,onCopy:te,inputWrapperStyle:fe,inputLabelStyle:de,requiredStyle:J,inputContainerStyle:V,leftIconStyle:C,inputDropDownStyle:E,ulStyle:S,liStyle:B,httpStyle:F,inputStyle:U,rightIconStyle:H,withCopyStyle:ee,inputHelperTextStyle:ce,theme:ge="light"})=>{const[ne,Se]=le.useState(!1),I=le.useRef(null),[re,oe]=le.useState(!1),[P,L]=le.useState(!1),Z=le.useRef(null),ve=le.useRef(null),me=le.useRef(null),[ue,we]=le.useState(!1),[ke,Ae]=le.useState(1),Ne=je=>{let ct=je.target.value;ct.length===1&&(ct=ct.trim()),s&&typeof s=="function"&&s(f?ct.replace(/\d/g,""):ct)},ut=()=>{oe(!0),l&&typeof l=="function"&&l()},et=()=>{oe(!1),u&&typeof u=="function"&&u()},Ze=je=>{const ct=je.target.value,mi=ct.length===0;a==="number"&&(je.keyCode===69||!mi&&(je.keyCode===187||je.keyCode===107||je.keyCode===189||je.keyCode===109))&&je.preventDefault(),je.key==="Enter"&&ct&&ct.length>0&&D&&typeof D=="function"&&D(ct)},li=()=>{te&&typeof te=="function"&&te(e)},jt=je=>je,Ht=()=>{let je={};return ie&&(je.borderTopRightRadius=0,je.borderBottomRightRadius=0,je.borderRight=0),G&&(Q==="right"?je.flexDirection="row-reverse":G&&(je.paddingLeft=0)),{...je,...V??{}}},_t=je=>{!je.composedPath().includes(ve.current)&&je.composedPath().includes(Z.current)||we(!1)},Bi=je=>{Ae(je.id),we(!1),$&&typeof $=="function"&&$(je)},Vi=()=>{const je=me.current,ct=ve.current;if(!ct||!je)return;const mi=je.getBoundingClientRect(),Li=window.innerHeight,We=80;W&&(ct.style.position="fixed",ct.style.width=We+"px",Q==="right"?ct.style.left=`${mi.right-We/2}px`:ct.style.left=`${mi.left+We/2}px`,mi.bottom+ct.offsetHeight>Li?(ct.style.top=`${window.scrollY+mi.top-ct.offsetHeight}px`,ct.style.bottom="unset"):(ct.style.top=`${window.scrollY+mi.bottom}px`,ct.style.bottom="unset"))};le.useEffect(()=>{Vi()},[ve,ue]),le.useEffect(()=>{e&&e.length===0&&calculateWidth()},[e]),le.useEffect(()=>(document.addEventListener("click",_t),()=>{document.removeEventListener("click",_t)}),[]);const wt=le.useRef(!1);return le.useEffect(()=>{wt.current?setTimeout(()=>{Se(je=>!je)},0):wt.current=!0},[]),T.jsxs("div",{className:`${ge==="dark"?fi.dark:""} ${fi.inputWrapper}`,style:fe??{},children:[t&&T.jsxs("label",{className:fi.inputLabel,style:de??{},children:[t," ",T.jsx("span",{className:fi.required,style:J??{},children:n&&"*"})]}),T.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[T.jsxs("div",{style:Ht(),ref:me,className:`${fi.inputContainer} ${re&&!c?fi.focused:""} ${r?fi.disabled:""} ${d!=null&&d.error?fi.error:""} ${fi[o??"sm"]}`,children:[!G&&!z&&N&&T.jsx("div",{className:fi.leftIcon,style:C??{},onClick:()=>{b&&typeof b=="function"&&b()},onMouseEnter:()=>{A&&typeof A=="function"&&A()},onMouseLeave:()=>{k&&typeof k=="function"&&k()},children:jt(N)}),!z&&G&&T.jsxs("div",{className:fi.inputDropDown,style:E??{},onClick:()=>(we(!0),Vi()),ref:Z,children:[j.find(je=>je.id===ke).label,ue&&T.jsx("ul",{ref:ve,style:S??{},children:j&&j.length&&j.map((je,ct)=>T.jsx("li",{style:B??{},onClick:()=>Bi(je),children:(je==null?void 0:je.label)??"-"},je.id))}),T.jsx(Du,{})]}),z&&T.jsx("div",{className:`${fi.inputDropDown} ${fi.http}`,style:F??{},onClick:()=>we(!0),ref:Z,children:"http://"}),T.jsxs("div",{className:fi.inputContent,children:[Y&&p&&p.length>0&&T.jsx("div",{className:fi.inputTags,children:p.map((je,ct)=>T.jsx("div",{className:fi.inputSingleTags,children:T.jsx(Wm,{...x,id:je,label:je,withClose:!0})},ct))}),T.jsx("input",{ref:I,style:U??{},type:a??"text",value:e,onChange:je=>Ne(je),onFocus:ut,onBlur:et,disabled:r,required:n,onKeyDown:Ze,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),K&&T.jsx("div",{className:fi.rightIcon,style:H??{},onClick:()=>{m&&typeof m=="function"&&m()},onMouseEnter:()=>{g&&typeof g=="function"&&g()},onMouseLeave:()=>{y&&typeof y=="function"&&y()},children:jt(K)})]}),ie&&T.jsxs("div",{style:ee??{},onClick:li,className:fi.withCopy,children:[T.jsx(PB,{}),T.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&T.jsx("div",{style:ce??{},className:`${fi.inputHelperText} ${d!=null&&d.error?fi.error:""}`,children:T.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},QB="Textarea-module__textareaContainer",eL="Textarea-module__textAreaLabel",tL="Textarea-module__required",iL="Textarea-module__wrap",nL="Textarea-module__resize",rL="Textarea-module__textarea",aL="Textarea-module__focused",oL="Textarea-module__disabled",sL="Textarea-module__error",lL="Textarea-module__popupEmojiContainer",uL="Textarea-module__popupEmojiIcon",dL="Textarea-module__popupEmojiList",cL="Textarea-module__popupEmojiItem",hL="Textarea-module__helperTextStyle",fL="Textarea-module__dark",Ai={textareaContainer:QB,textAreaLabel:eL,required:tL,wrap:iL,resize:nL,textarea:rL,focused:aL,disabled:oL,error:sL,popupEmojiContainer:lL,popupEmojiIcon:uL,popupEmojiList:dL,popupEmojiItem:cL,helperTextStyle:hL,dark:fL},pL=()=>T.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[T.jsx("g",{clipPath:"url(#clip0_23326_3835)",children:T.jsx("path",{d:"M6.66699 11.6667C6.66699 11.6667 7.91699 13.3334 10.0003 13.3334C12.0837 13.3334 13.3337 11.6667 13.3337 11.6667M12.5003 7.50008H12.5087M7.50033 7.50008H7.50866M18.3337 10.0001C18.3337 14.6025 14.6027 18.3334 10.0003 18.3334C5.39795 18.3334 1.66699 14.6025 1.66699 10.0001C1.66699 5.39771 5.39795 1.66675 10.0003 1.66675C14.6027 1.66675 18.3337 5.39771 18.3337 10.0001ZM12.917 7.50008C12.917 7.7302 12.7304 7.91675 12.5003 7.91675C12.2702 7.91675 12.0837 7.7302 12.0837 7.50008C12.0837 7.26996 12.2702 7.08341 12.5003 7.08341C12.7304 7.08341 12.917 7.26996 12.917 7.50008ZM7.91699 7.50008C7.91699 7.7302 7.73044 7.91675 7.50033 7.91675C7.27021 7.91675 7.08366 7.7302 7.08366 7.50008C7.08366 7.26996 7.27021 7.08341 7.50033 7.08341C7.73044 7.08341 7.91699 7.26996 7.91699 7.50008Z",stroke:"#535862",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),T.jsx("defs",{children:T.jsx("clipPath",{id:"clip0_23326_3835",children:T.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),vL=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😙 ","😚","😋","😛","😎","🥳","😢","😭","😤","😠","😡","🤬","🤯","👋"],_L=({placeholder:e,label:t,msg:i,cols:n,rows:r,value:a,withEmoji:o=!1,maxLength:s,withResize:l=!0,onChange:u,onFocus:d,onBlur:c,disabled:h,required:f,textareaContainerStyle:p,textareaLabelStyle:m,requiredStyle:g,textareaStyle:y,textareaHelperTextStyle:b,labelIcon:A,theme:k})=>{const[D,K]=le.useState(!1),[N,W]=le.useState(!1),G=le.useRef(null),j=le.useRef(null),Q=le.useRef(null),$=C=>{let E=C.target.value;u&&typeof u=="function"&&u(E)},Y=C=>C,x=()=>{K(!0),d&&typeof d=="function"&&d()},z=()=>{K(!1),c&&typeof c=="function"&&c()},ie=C=>{const E=G.current.querySelector("textarea");if(!E)return;const S=E.selectionStart,B=E.selectionEnd,F=a.slice(0,S)+C+a.slice(B);u&&typeof u=="function"&&u(F),setTimeout(()=>{E.focus();const U=S+C.length;E.setSelectionRange(U,U)},0)},te=()=>{const C=G.current,E=Q.current;if(!E||!C)return;const S=C.getBoundingClientRect(),B=220,F=window.innerHeight-S.bottom;S.top,F>=B?(E.style.top="calc(100% + 8px)",E.style.bottom="unset"):(E.style.bottom="calc(100% + 8px)",E.style.top="unset"),S.right>window.innerWidth?E.style.left=`calc(100% - ${S.width}px)`:S.left<0?E.style.left="0px":E.style.left=""};le.useEffect(()=>(N&&(te(),document.addEventListener("mousedown",fe)),()=>{document.removeEventListener("mousedown",fe)}),[N]);const fe=C=>{j.current&&!j.current.contains(C.target)&&W(!1)};le.useEffect(()=>(N&&document.addEventListener("mousedown",fe),()=>{document.removeEventListener("mousedown",fe)}),[N]),le.useEffect(()=>{const C=G.current.querySelector("textarea"),E=G.current;if(!C||!E)return;const S=new ResizeObserver(()=>{E.style.width=`${C.offsetWidth}px`,E.style.height=`${C.offsetHeight}px`});return S.observe(C),()=>S.disconnect()},[]);let de=!1;const J=()=>{const C=G.current.querySelector("textarea");!C||de||(C.style.height="auto",C.style.height=`${C.scrollHeight}px`)};le.useEffect(()=>{const C=G.current.querySelector("textarea"),E=new ResizeObserver(()=>{de=C.offsetHeight<C.scrollHeight});return E.observe(C),()=>E.disconnect()},[]);const V=C=>{de=!1,u==null||u(C.target.value),J()};return T.jsxs("div",{style:p??{},className:`${k==="dark"?Ai.dark:""} ${Ai.textareaContainer} ${i!=null&&i.type&&(i!=null&&i.visible)?Ai[i==null?void 0:i.type]:""} ${h?Ai.disabled:null}`,children:[t&&T.jsxs("div",{style:m,className:Ai.textAreaLabel,children:[T.jsx("p",{children:t}),T.jsx("span",{style:g??{},className:Ai.required,children:f&&"*"}),A&&Y(A)]}),T.jsxs("div",{className:`${Ai.wrap} ${l?Ai.resize:""}`,ref:G,children:[T.jsx("textarea",{style:y??{},className:`${Ai.textarea} ${D?Ai.focused:""} ${h?Ai.disabled:""} ${i!=null&&i.error?Ai.error:""}`,value:a,placeholder:e??"",cols:n??"30",rows:r??"5",maxLength:s??null,onInput:V,onFocus:x,disabled:h,onBlur:N?()=>{}:z,onChange:$,onResize:()=>{console.log("resize")}}),o&&T.jsxs("div",{ref:j,className:Ai.popupEmojiContainer,children:[T.jsx("div",{className:Ai.popupEmojiIcon,onClick:C=>{C.preventDefault(),K(!0),W(E=>!E)},children:T.jsx(pL,{})}),N&&T.jsx("div",{ref:Q,className:Ai.popupEmojiList,children:vL.map((C,E)=>T.jsx("div",{onClick:S=>{S.preventDefault(),ie(C)},className:Ai.popupEmojiItem,children:C},E))})]})]}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&T.jsx("div",{style:b??{},className:`${Ai.helperTextStyle} ${i!=null&&i.error?Ai.error:""}`,children:T.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},mL="Toggle-module__toggleWrapper",gL="Toggle-module__toggleState",CL="Toggle-module__checked",yL="Toggle-module__disabled",xL="Toggle-module__dark",al={toggleWrapper:mL,toggleState:gL,checked:CL,disabled:yL,dark:xL},bL=({checked:e,change:t,disabled:i=!1,required:n,withActive:r=!0,activeStyle:a,bgStyle:o,checkedBgStyle:s,disabledBgStyle:l,circleStyle:u,checkedCircleStyle:d,disabledCircleStyle:c,theme:h="light"})=>{const[f,p]=le.useState(!1),m=()=>{!i&&t&&typeof t=="function"&&t(!e)},g=()=>{if(f)return!r||i?{boxShadow:"none",...a}:a??{};if(e){if(s)return s}else if(e){if(i&&l)return l}else if(o)return o;return{}},y=()=>{if(e){if(d)return d}else if(e){if(i&&c)return c}else if(u)return u;return{}};return T.jsx("div",{style:g(),onMouseDown:()=>p(!0),onMouseUp:()=>p(!1),onMouseLeave:()=>p(!1),onClick:m,className:`${h==="dark"?al.dark:""} ${al.toggleWrapper} ${e?al.checked:""} ${i?al.disabled:""}`,children:T.jsx("div",{style:y(),className:al.toggleState,children:T.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},SL="Radio-module__radioWrapper",EL="Radio-module__sm",wL="Radio-module__md",IL="Radio-module__checked",TL="Radio-module__innerCircle",AL="Radio-module__radioState",DL="Radio-module__disabled",OL="Radio-module__dark",ea={radioWrapper:SL,sm:EL,md:wL,checked:IL,innerCircle:TL,radioState:AL,disabled:DL,dark:OL},bI=({checked:e,change:t,disabled:i,required:n,withUncheckState:r=!1,size:a,radioWrapperStyle:o,radioStateStyle:s,innerCircleStyle:l,theme:u="light"})=>{const[d,c]=le.useState(!1),h=()=>{t&&typeof t=="function"&&(console.log(e),t(r?!e:!0))};return T.jsxs("div",{className:`${u==="dark"?ea.dark:""} ${ea.radioWrapper} ${ea[a]??ea.md} ${e?ea.checked:""} ${i?ea.disabled:""}`,style:o??{},onClick:h,children:[T.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),T.jsx("div",{style:s??{},className:ea.radioState,children:T.jsx("div",{style:l??{},className:ea.innerCircle})})]})},RL="Dropdown-module__dropdownWrapper",kL="Dropdown-module__placeHolder",BL="Dropdown-module__dropdownLabel",LL="Dropdown-module__required",PL="Dropdown-module__dropdownContainer",FL="Dropdown-module__sm",ML="Dropdown-module__md",VL="Dropdown-module__selectedTags",NL="Dropdown-module__selectedList",$L="Dropdown-module__additional",HL="Dropdown-module__dropdownListContainer",WL="Dropdown-module__dropdownList",zL="Dropdown-module__hidden",GL="Dropdown-module__visible",UL="Dropdown-module__checkIcon",KL="Dropdown-module__disabled",jL="Dropdown-module__selected",qL="Dropdown-module__dropdownListFooter",YL="Dropdown-module__focused",XL="Dropdown-module__error",ZL="Dropdown-module__dropdownHelperText",JL="Dropdown-module__dark",ii={dropdownWrapper:RL,placeHolder:kL,dropdownLabel:BL,required:LL,dropdownContainer:PL,sm:FL,md:ML,selectedTags:VL,selectedList:NL,additional:$L,dropdownListContainer:HL,dropdownList:WL,hidden:zL,visible:GL,checkIcon:UL,disabled:KL,selected:jL,dropdownListFooter:qL,focused:YL,error:XL,dropdownHelperText:ZL,dark:JL},QL=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:T.jsx("path",{stroke:"#10B77F",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10 18.333c4.584 0 8.334-3.75 8.334-8.334 0-4.583-3.75-8.333-8.334-8.333-4.583 0-8.333 3.75-8.333 8.333 0 4.584 3.75 8.334 8.333 8.334zM6.667 10h6.667M10 13.333V6.666"})}),eP=e=>T.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M12 22C6.48571 22 2 17.5143 2 12C2 6.48571 6.48571 2 12 2C17.5143 2 22 6.48571 22 12C22 17.5143 17.5143 22 12 22ZM12 3.66679C7.405 3.66679 3.66679 7.405 3.66679 12C3.66679 16.595 7.405 20.3332 12 20.3332C16.595 20.3332 20.3332 16.595 20.3332 12C20.3332 7.405 16.595 3.66679 12 3.66679ZM15.3333 12.8332H8.6665C8.20654 12.8332 7.83321 12.4599 7.83321 11.9999C7.83321 11.54 8.20654 11.1666 8.6665 11.1666H15.3333C15.7941 11.1666 16.1666 11.54 16.1666 11.9999C16.1666 12.4599 15.7941 12.8332 15.3333 12.8332Z",fill:e.color?e.color:"#EF4343"})}),tP=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:T.jsx("path",{d:"M16.5 16.5L13.5834 13.5833M15.6667 8.58333C15.6667 12.4954 12.4954 15.6667 8.58333 15.6667C4.67132 15.6667 1.5 12.4954 1.5 8.58333C1.5 4.67132 4.67132 1.5 8.58333 1.5C12.4954 1.5 15.6667 4.67132 15.6667 8.58333Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),v_=({label:e,disabled:t,required:i,size:n="md",placeholder:r,msg:a,readOnly:o,searchValue:s,onClearAll:l,onSelectAll:u,onBottomScroll:d,withSearch:c=!1,withTree:h=!1,defaultCollapsed:f=!0,checkboxProps:p,onCollapse:m,onFocus:g,onBlur:y,withClearAll:b=!0,withSelectAll:A=!0,withPlus:k=!1,searchComponent:D=!1,withFooter:K=!0,data:N,onSelect:W,selectedOptionID:G,withFilter:j=!0,withClose:Q=!0,fixedDropdown:$=!1,onSearch:Y,pagination:x,withMultiSelect:z=!1,skipSelected:ie,closeOnSelect:te=!0,labelIcon:fe,closeIcon:de,dropdownIcon:J,iconDown:V,onLabelIconClick:C,onLabelIconMouseEnter:E,onLabelIconMouseLeave:S,dropdownWrapperStyle:B,dropdownLabelStyle:F,requiredStyle:U,labelIconStyle:H,dropdownContainerStyle:ee,placeHolderStyle:ce,selectedTagsStyle:ge,selectedListStyle:ne,additionalStyle:Se,additionalSpanStyle:I,dropdownListStyle:re,listStyle:oe,treeProps:P,theme:L="light"})=>{const[Z,ve]=le.useState(!1),[me,ue]=le.useState(!1),[we,ke]=le.useState([]),[Ae,Ne]=le.useState(""),[ut,et]=le.useState(""),Ze=le.useRef([]),li=le.useRef(null),jt=le.useRef(null),Ht=le.useRef({}),_t=le.useRef([]),Bi=(q,Te)=>{const X=new Set;return q.filter(Ee=>X.has(Ee[Te])?!1:(X.add(Ee[Te]),!0))},Vi=q=>{var Te;Ht.current=q,Ne((Te=Ht.current)==null?void 0:Te.label),W&&typeof W=="function"&&W(Ht.current),ue(!1)},wt=q=>{Ze.current=[...Ze.current,...N.filter(Te=>Te.selected==!0),...N.filter(Te=>Te.id===q.id)],q.selected=!q.selected,Ze.current=Bi(Ze.current,"id").filter(Te=>Te.selected),W&&typeof W=="function"&&W(Ze.current),D||Ne(Ze.current.map(Te=>Te.label).join(", ")),ve(Te=>!Te)},je=q=>{q.stopPropagation(),z||h?c&&(et(""),_t.current=N,ve(Te=>!Te)):(Ze.current=[],G=null,N&&N.length>0&&N.forEach(Te=>Te.selected=!1),ct(""),Ht.current={},W({}),Ne("")),Y&&typeof Y=="function"&&Y("")},ct=q=>{if(Y&&typeof Y=="function"&&Y(q),z&&c){let Te=N,X=Te.filter(Ee=>{var Pe;return(Pe=Ee==null?void 0:Ee.label)==null?void 0:Pe.toLowerCase().includes((q==null?void 0:q.toLowerCase())||"")});_t.current=(q==null?void 0:q.length)>0?X:Te,et(q),ve(Ee=>!Ee)}else et(q),Ne(q)},mi=()=>{if(G||G===0){let q=N.filter(Te=>Number(Te.id)===Number(G));q&&q[0]&&(Ht.current=q[0],ie?(Y&&typeof Y=="function"&&Y(Ht.current.label),Ne(Ht.current.label),te&&ue(Te=>!1)):Vi(q[0]))}},[Li,We]=le.useState(!1),ht=q=>{let Te=li.current.querySelector("ul"),Ee=Math.abs(Te.scrollTop+Te.clientHeight-Te.scrollHeight)<=2;x&&Ee&&!Li&&(d&&typeof d=="function"&&d(!0),We(!0)),Ee||We(!1)},Zt=()=>{N.forEach(q=>{q.selected=!1}),Ze.current=[],x||W([]),Ne(""),l&&typeof l=="function"&&l(),ve(q=>!q)},mt=()=>{N.forEach(q=>{q!=null&&q.id&&(q==null?void 0:q.id)!==null&&(q!=null&&q.label)&&(q==null?void 0:q.label)!==""&&(q==null?void 0:q.label)!=="-"&&!q.disabled&&(q.selected=!0)}),Ze.current=N,Ze.current=Bi(Ze.current,"id").filter(q=>q.selected),Ne(Ze.current.map(q=>q.label).join(", ")),u&&typeof u=="function"&&u(),x||W(Ze.current),ve(q=>!q)},Wt=le.useRef(!0);le.useEffect(()=>{if(Wt.current){Wt.current=!1;return}me||y&&typeof y=="function"&&y()},[me]);const yr=()=>{g&&typeof g=="function"&&g()},xr=q=>q,zo=q=>{let Te=!0,X=Ae;return j&&q&&!q.toLowerCase().split(" ").join("").trim().includes(X.toLowerCase().split(" ").join("").trim())&&X.trim()!==""&&(Te=!1),ut.length>0&&q==="-"?"hidden":Te?"visible":"hidden"},Go=q=>{q.composedPath().includes(li.current)||ue(!1)},Uo=q=>{if($){if(q.composedPath().includes(li.current))return;ue(!1)}},Ma=()=>{const q=li.current,Te=jt.current;if(!Te||!q)return;const X=q.getBoundingClientRect(),Ee=window.innerHeight;$?(Te.style.position="fixed",Te.style.width=X.width+"px",Te.style.left=`${X.left+window.pageXOffset}px`,X.bottom+Te.offsetHeight>Ee?(Te.style.top=`${window.scrollY+X.top-Te.offsetHeight-8}px`,Te.style.bottom="unset"):(Te.style.top=`${window.scrollY+X.bottom}px`,Te.style.bottom="unset")):X.bottom>Ee?(Te.style.top="unset",Te.style.bottom="calc(100% + 8px)"):(Te.style.bottom="unset",Te.style.top="calc(100% + 8px)")},Ko=q=>{Ze.current=q,W&&typeof W=="function"&&W(q)},il=(q,Te)=>{m&&typeof m=="function"&&m(q,Te)},Va=le.useRef(null);return le.useEffect(()=>{me&&Va.current&&Va.current.focus()},[me]),le.useEffect(()=>{z&&(Ze.current=N.filter(q=>q.selected),Ne(N.filter(q=>q.selected).map(q=>q.label).join(", ")))},[]),le.useEffect(()=>{D&&s&&s.length>0&&et(s),_t.current=N},[]),le.useEffect(()=>{Ma()},[jt,me]),le.useEffect(()=>{z||mi()},[G]),le.useEffect(()=>(document.addEventListener("click",Go),document.addEventListener("wheel",Uo),()=>{document.removeEventListener("click",Go),document.removeEventListener("wheel",Uo)}),[]),T.jsxs("div",{className:`${L==="dark"?ii.dark:""} ${ii.dropdownWrapper}`,style:B??{},children:[e&&T.jsxs("label",{className:ii.dropdownLabel,style:F??{},children:[e," ",T.jsx("span",{className:ii.required,style:U??{},children:i&&"*"}),T.jsxs("span",{style:{...H??{},display:"grid",placeItems:"center"},onClick:()=>{C&&typeof C=="function"&&C()},onMouseEnter:()=>{E&&typeof E=="function"&&E()},onMouseLeave:()=>{S&&typeof S=="function"&&S()},children:[" ",xr(fe)]})]}),T.jsxs("div",{onFocus:yr,ref:li,onClick:()=>(ue(q=>!q),Ma()),className:`${ii.dropdownContainer} ${me&&!o?ii.focused:""} ${t?ii.disabled:""} ${a!=null&&a.error?ii.error:""} ${ii[n]}`,style:ee??{},children:[D?T.jsxs("div",{children:[" ",T.jsx(tP,{})]}):T.jsx(T.Fragment,{children:J&&T.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:xr(J)})}),!D&&(h||z)&&r&&!me&&Ze.current.length===0&&T.jsx("span",{className:ii.placeHolder,style:ce??{},children:r??""}),(z||h)&&T.jsx("div",{className:ii.selectedTags,style:ge??{},children:!D&&!me?T.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[Ze.current.slice(0,3).map((q,Te)=>{let X=Ze.current[Ze.current.length-1];return T.jsxs("span",{className:ii.selectedList,style:ne??{},children:[q.label,q.id!==X.id&&Te!==2?",":""," "]},q==null?void 0:q.id)}),Ze.current.length>3&&T.jsxs("div",{className:ii.additional,style:I??{},children:["+",Ze.current.length-3]})]}):T.jsx("input",{ref:Va,onClick:q=>(q.stopPropagation(),ue(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...D||c?{value:ut}:{},onChange:q=>ct(q.target.value)},G)}),T.jsx("input",{autoCorrect:"off",hidden:z||h,placeholder:r,readOnly:!j||!me||z||h,type:"text",value:(z||h)&&!D&&me?"":Ae,onChange:q=>ct(q.target.value)},G),N&&N.length>0&&me&&T.jsxs("div",{ref:jt,onClick:q=>q.stopPropagation(),className:ii.dropdownListContainer,children:[h?T.jsx(Zk,{SearchValue:ut,expandedNodes:we,setExpandedNodes:ke,checkboxProps:p,onSelect:Ko,withClearAll:b,withSelectAll:A,SelectedData:Ze.current,fromDropdown:!0,onCollapse:il,defaultCollapsed:f,data:N,theme:L,treeProps:P}):T.jsx("ul",{onScroll:q=>ht(),onClick:q=>q.stopPropagation(),className:ii.dropdownList,style:re??{},children:(z&&j?_t.current:N).map(q=>{var Te,X,Ee,Pe;return T.jsxs("li",{style:oe??{},className:`${!z&&c?ii[zo((q==null?void 0:q.label)??"-")]:""} ${!(q!=null&&q.label)||q.label===void 0||q!=null&&q.disabled?ii.disabled:""} ${(z?q.selected:(Te=Ht.current)!=null&&Te.id&&((X=Ht.current)==null?void 0:X.id)===q.id)?ii.selected:""}`,onClick:()=>{z?wt(q):Vi(q)},children:[T.jsxs("p",{children:[" ",q!=null&&q.customLabel?q.customLabel():(q==null?void 0:q.label)??"-"]}),k?T.jsx(T.Fragment,{children:q.selected?T.jsx(eP,{}):T.jsx(QL,{})}):(z?q.selected:((Ee=Ht.current)==null?void 0:Ee.id)&&((Pe=Ht.current)==null?void 0:Pe.id)===q.id)&&T.jsx("span",{className:ii.checkIcon,children:T.jsx(xI,{color:"#7F56D9",width:20,height:20})})]},q==null?void 0:q.id)})}),z&&K&&T.jsxs("div",{className:ii.dropdownListFooter,children:[b&&T.jsx("span",{onClick:Zt,children:"Clear All"}),A&&ut===""&&T.jsx("span",{onClick:mt,children:"Select All"})]})]}),Q&&(!c&&Ae.length>0||ut.length>0)&&T.jsx("div",{onClick:q=>je(q),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:de?xr(de):T.jsx(Ou,{width:16,height:16})}),V?xr(V):T.jsx("div",{style:{display:"grid",placeItems:"center",transform:me?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!D&&T.jsx(Du,{})})]}),a&&(a==null?void 0:a.visible)&&T.jsx("div",{className:`${ii.dropdownHelperText} ${a!=null&&a.error?ii.error:""}`,children:!me&&T.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},iP="Tooltip-module__tooltipContainer",nP="Tooltip-module__tooltipContent",rP="Tooltip-module__withoutPointer",aP="Tooltip-module__top",oP="Tooltip-module__right",sP="Tooltip-module__bottom",lP="Tooltip-module__left",uP="Tooltip-module__tooltipTitle",dP="Tooltip-module__tooltipText",cP="Tooltip-module__dark",Nn={tooltipContainer:iP,tooltipContent:nP,withoutPointer:rP,top:aP,right:oP,bottom:sP,left:lP,tooltipTitle:uP,tooltipText:dP,dark:cP},__=({children:e,tooltipSlot:t,delay:i=400,placement:n="top",trigger:r="hover",title:a,text:o,customText:s,tooltipContentStyle:l,tooltipTitlestyle:u,tooltipTextStyle:d,pointerPosition:c="10%",withPointer:h=!0,theme:f})=>{const p=le.useRef(null),m=le.useRef(null);let g;const[y,b]=le.useState(!1),A=()=>{r==="hover"&&(g=setTimeout(()=>{b(!0)},i))},k=()=>{r==="hover"&&(clearTimeout(g),setTimeout(()=>{b(!1)},i))},D=()=>{r==="click"&&b(G=>!G)},K=()=>{const G=p.current,j=m.current;if(!j||!G)return;const Q=G.getBoundingClientRect();switch(j.style.position="fixed",n){case"top":j.style.top=`${Q.top-j.offsetHeight-8}px`;break;case"bottom":j.style.top=`${Q.bottom+8}px`;break;case"left":j.style.top=`${Q.top+Q.height/2-j.offsetHeight/2}px`,j.style.left=`${Q.left-j.offsetWidth-8}px`;break;case"right":j.style.top=`${Q.top+Q.height/2-j.offsetHeight/2}px`,j.style.left=`${Q.right+8}px`;break}},N=G=>{G.composedPath().includes(p.current)||b(!1)},W=()=>{b(!1)};return le.useEffect(()=>{K()},[p,y]),le.useEffect(()=>(document.addEventListener("click",N),window.addEventListener("scroll",W,!0),()=>{window.removeEventListener("scroll",W,!0),document.removeEventListener("click",N)}),[]),le.useEffect(()=>{const G=m.current;G&&(G.style.setProperty("--pointer-position",`${c}`),h||G.classList.add(Nn.withoutPointer))},[y]),T.jsxs("div",{ref:p,className:`${f==="dark"?Nn.dark:""} ${Nn.tooltipContainer}`,onClick:D,onMouseEnter:A,onMouseLeave:k,children:[e,y&&t?T.jsx("div",{style:l??{},onClick:G=>G.stopPropagation(),ref:m,className:`${Nn.tooltipContent} ${n?Nn[n]:Nn.bottom}`,children:t()}):y&&T.jsxs("div",{style:l??{},onClick:G=>G.stopPropagation(),ref:m,className:`${Nn.tooltipContent} ${n?Nn[n]:Nn.bottom}`,children:[s&&typeof s=="function"&&s(),a&&a.length>0&&T.jsx("h2",{className:Nn.tooltipTitle,style:u??{},children:a}),o&&o.length>0&&T.jsx("p",{className:Nn.tooltipText,style:d??{},children:o})]})]})},hP="Popup-module__modalOverlay",fP="Popup-module__popupDrawerMode",pP="Popup-module__popupContainer",vP="Popup-module__closeButton",_P="Popup-module__withOptions",mP="Popup-module__horizontal",gP="Popup-module__popupHeader",CP="Popup-module__popupTitle",yP="Popup-module__popupDescription",xP="Popup-module__typeIcon",bP="Popup-module__icon",SP="Popup-module__templateWrapper",EP="Popup-module__dark",un={modalOverlay:hP,popupDrawerMode:fP,popupContainer:pP,closeButton:vP,withOptions:_P,horizontal:mP,popupHeader:gP,popupTitle:CP,popupDescription:yP,typeIcon:xP,icon:bP,templateWrapper:SP,dark:EP},wP=e=>{const t=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];let i=0,n=parseInt(e,10)||0;for(;n>=1024&&++i;)n=n/1024;return n.toFixed(n<10&&i>0?1:0)+" "+t[i]},IP=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),TP=e=>new Promise((t,i)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result.split(",")[1]),n.onerror=r=>i(r)});location.href.indexOf(".upgaming.dev")>0||location.href.indexOf(".upgaming.com")>0;const SI=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},AP=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:T.jsx("path",{d:"M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#079455",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),DP=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:T.jsx("path",{d:"M7 3V6.4C7 6.96005 7 7.24008 7.10899 7.45399C7.20487 7.64215 7.35785 7.79513 7.54601 7.89101C7.75992 8 8.03995 8 8.6 8H15.4C15.9601 8 16.2401 8 16.454 7.89101C16.6422 7.79513 16.7951 7.64215 16.891 7.45399C17 7.24008 17 6.96005 17 6.4V4M17 21V14.6C17 14.0399 17 13.7599 16.891 13.546C16.7951 13.3578 16.6422 13.2049 16.454 13.109C16.2401 13 15.9601 13 15.4 13H8.6C8.03995 13 7.75992 13 7.54601 13.109C7.35785 13.2049 7.20487 13.3578 7.10899 13.546C7 13.7599 7 14.0399 7 14.6V21M21 9.32548V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H14.6745C15.1637 3 15.4083 3 15.6385 3.05526C15.8425 3.10425 16.0376 3.18506 16.2166 3.29472C16.4184 3.4184 16.5914 3.59135 16.9373 3.93726L20.0627 7.06274C20.4086 7.40865 20.5816 7.5816 20.7053 7.78343C20.8149 7.96237 20.8957 8.15746 20.9447 8.36154C21 8.59171 21 8.8363 21 9.32548Z",stroke:"#DC6803",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),zm=({width:e,color:t})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:T.jsx("path",{d:"M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6",stroke:t??"#D92D20",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),EI=({visible:e,template:t,options:i,children:n,onClickOutside:r,onClose:a,widthType:o,modalOverlayStyle:s,popupContainerStyle:l,templateWrapperStyle:u,popupHeaderStyle:d,popupTitleStyle:c,closeButtonStyle:h,theme:f})=>{const p=()=>{if(!(!i||!(i!=null&&i.type)))switch(String(i==null?void 0:i.type)){case"delete":return T.jsx(zm,{});case"unsaved":return T.jsx(DP,{});case"success":return T.jsx(AP,{})}},m=()=>{a&&typeof a=="function"&&a(!1)},g=le.useRef(null),y=b=>{b.target===g.current&&r&&typeof r=="function"&&r(!1)};return le.useEffect(()=>(document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}),[]),e&&T.jsx("div",{ref:g,style:s??{},className:`
|
|
38
|
+
${r?br.disabled:""}`,onMouseDown:()=>b(!0),onMouseUp:()=>b(!1),onMouseLeave:()=>b(!1),onClick:()=>{!r&&i&&typeof i=="function"&&i()},children:T.jsxs("div",{className:br.buttonSlot,style:!r&&p?p:{},children:[u||o&&s?s:"",!u&&T.jsx(T.Fragment,{children:a?T.jsx("div",{style:{display:"grid",placeItems:"center"},children:T.jsx(nB,{})}):T.jsx("span",{style:!r&&h?h:{},className:br.buttonLabel,children:e??"Button"})}),o&&l?l:""]})})},mB="FormInput-module__inputWrapper",gB="FormInput-module__inputLabel",CB="FormInput-module__required",yB="FormInput-module__inputContainer",xB="FormInput-module__inputContent",bB="FormInput-module__inputTags",SB="FormInput-module__focused",EB="FormInput-module__error",wB="FormInput-module__rightIcon",IB="FormInput-module__leftIcon",TB="FormInput-module__inputDropDown",AB="FormInput-module__http",DB="FormInput-module__disabled",OB="FormInput-module__sm",RB="FormInput-module__md",kB="FormInput-module__withCopy",BB="FormInput-module__inputHelperText",LB="FormInput-module__dark",fi={inputWrapper:mB,inputLabel:gB,required:CB,inputContainer:yB,inputContent:xB,inputTags:bB,focused:SB,error:EB,rightIcon:wB,leftIcon:IB,inputDropDown:TB,http:AB,disabled:DB,sm:OB,md:RB,withCopy:kB,inputHelperText:BB,dark:LB},Du=({width:e,height:t,color:i})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:T.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),PB=({width:e,height:t,color:i})=>T.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[T.jsx("g",{clipPath:"url(#clip0_444_26)",children:T.jsx("path",{d:"M4.1665 12.5C3.38993 12.5 3.00165 12.5 2.69536 12.3732C2.28698 12.204 1.96253 11.8795 1.79337 11.4712C1.6665 11.1649 1.6665 10.7766 1.6665 10V4.33335C1.6665 3.39993 1.6665 2.93322 1.84816 2.5767C2.00795 2.2631 2.26292 2.00813 2.57652 1.84834C2.93304 1.66669 3.39975 1.66669 4.33317 1.66669H9.99984C10.7764 1.66669 11.1647 1.66669 11.471 1.79355C11.8794 1.96271 12.2038 2.28717 12.373 2.69555C12.4998 3.00183 12.4998 3.39012 12.4998 4.16669M10.1665 18.3334H15.6665C16.5999 18.3334 17.0666 18.3334 17.4232 18.1517C17.7368 17.9919 17.9917 17.7369 18.1515 17.4233C18.3332 17.0668 18.3332 16.6001 18.3332 15.6667V10.1667C18.3332 9.23327 18.3332 8.76656 18.1515 8.41004C17.9917 8.09643 17.7368 7.84147 17.4232 7.68168C17.0666 7.50002 16.5999 7.50002 15.6665 7.50002H10.1665C9.23308 7.50002 8.76637 7.50002 8.40985 7.68168C8.09625 7.84147 7.84128 8.09643 7.68149 8.41004C7.49984 8.76656 7.49984 9.23327 7.49984 10.1667V15.6667C7.49984 16.6001 7.49984 17.0668 7.68149 17.4233C7.84128 17.7369 8.09625 17.9919 8.40985 18.1517C8.76637 18.3334 9.23308 18.3334 10.1665 18.3334Z",stroke:i??"#414651",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),T.jsx("defs",{children:T.jsx("clipPath",{id:"clip0_444_26",children:T.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),Ou=e=>T.jsx("svg",{xmlns:e.xmlns??"http://www.w3.org/2000/svg",width:e.width??"14",height:e.height??"14",viewBox:e.viewBox??"0 0 14 14",fill:e.fill??"none",children:T.jsx("path",{d:e.d??"M10.5 3.5L3.5 10.5M3.5 3.5L10.5 10.5",stroke:e.stroke??"#A4A7AE",strokeWidth:e.strokeWidth??"1.66667",strokeLinecap:e.strokeLinecap??"round",strokeLinejoin:e.strokeLinejoin??"round"})}),FB="Checkbox-module__checkboxWrapper",MB="Checkbox-module__sm",VB="Checkbox-module__md",NB="Checkbox-module__checkMark",$B="Checkbox-module__checked",HB="Checkbox-module__disabled",WB="Checkbox-module__dark",qo={checkboxWrapper:FB,sm:MB,md:VB,checkMark:NB,checked:$B,disabled:HB,dark:WB},xI=({color:e,width:t,height:i})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:T.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),zB=e=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:T.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),Ru=({checked:e,change:t,disabled:i=!1,required:n=!1,multipleChecked:r=!1,size:a="md",activeStyle:o,checkBoxStyle:s,withActive:l=!0,theme:u="light"})=>{const d=le.useRef(null),[c,h]=le.useState(!1),f=()=>{i||t&&typeof t=="function"&&t(!e)},p=()=>c?!l||i?{boxShadow:"none",...o}:o??{}:s??{};return T.jsxs("div",{style:p(),className:` ${u==="dark"?qo.dark:""} ${qo.checkboxWrapper} ${qo[a]} ${e?qo.checked:qo.unChecked} ${i?qo.disabled:""}`,onMouseDown:()=>h(!0),onMouseUp:()=>h(!1),onMouseLeave:()=>h(!1),onClick:f,children:[T.jsx("input",{ref:d,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?T.jsx(zB,{}):T.jsx(xI,{}):""]})},GB="Tag-module__tagContainer",UB="Tag-module__onlyLabel",KB="Tag-module__sm",jB="Tag-module__md",qB="Tag-module__lg",YB="Tag-module__tagLabel",XB="Tag-module__tagNumber",ZB="Tag-module__tagClose",JB="Tag-module__dark",$a={tagContainer:GB,onlyLabel:UB,sm:KB,md:jB,lg:qB,tagLabel:YB,tagNumber:XB,tagClose:ZB,dark:JB},Wm=({id:e,label:t,icon:i,withClose:n,withCheckbox:r,withNumber:a,number:o,checkboxProps:s,disable:l,size:u,onClose:d,tagContainerStyle:c,tagLabelStyle:h,tagNumberStyle:f,tagCloseStlye:p,theme:m})=>{const g=()=>!r&&!i&&!n&&!a,y=()=>i,b=()=>{d&&typeof d=="function"&&d(e??null)};return T.jsxs("div",{style:c??{},className:`${m==="dark"?$a.dark:""} ${$a.tagContainer} ${g()?$a.onlyLabel:""} ${$a[u??"md"]}`,children:[r&&T.jsx(Ru,{...s}),i&&y(),t&&T.jsx("p",{style:h??{},className:$a.tagLabel,children:t??""}),a&&T.jsx("div",{style:f??{},className:$a.tagNumber,children:o??""}),n&&T.jsx("div",{style:p??{},className:$a.tagClose,onClick:b,children:T.jsx(Ou,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},bc=({value:e,label:t,placeholder:i,required:n,disabled:r,type:a,size:o,onChange:s,onFocus:l,onBlur:u,msg:d,readOnly:c,maxLength:h,onlyText:f,tagValues:p,onRightIconIconClick:m,onRightIconIconMouseEnter:g,onRightIconIconMouseLeave:y,onLeftIconIconClick:b,onLeftIconIconMouseEnter:A,onLeftIconIconMouseLeave:k,onPressEnter:D,rightIcon:K,leftIcon:N,fixedDropdown:W=!0,withDropDown:G,dropdownData:j,dropDownPosition:Q="left",onSelectData:$,withTags:Y,tagProps:x,withLink:z,withCopy:ie,onCopy:te,inputWrapperStyle:fe,inputLabelStyle:de,requiredStyle:J,inputContainerStyle:V,leftIconStyle:C,inputDropDownStyle:E,ulStyle:S,liStyle:B,httpStyle:F,inputStyle:U,rightIconStyle:H,withCopyStyle:ee,inputHelperTextStyle:ce,theme:ge="light"})=>{const[ne,Se]=le.useState(!1),I=le.useRef(null),[re,oe]=le.useState(!1),[P,L]=le.useState(!1),Z=le.useRef(null),ve=le.useRef(null),me=le.useRef(null),[ue,we]=le.useState(!1),[ke,Ae]=le.useState(1),Ne=je=>{let ct=je.target.value;ct.length===1&&(ct=ct.trim()),s&&typeof s=="function"&&s(f?ct.replace(/\d/g,""):ct)},ut=()=>{oe(!0),l&&typeof l=="function"&&l()},et=()=>{oe(!1),u&&typeof u=="function"&&u()},Ze=je=>{const ct=je.target.value,mi=ct.length===0;a==="number"&&(je.keyCode===69||!mi&&(je.keyCode===187||je.keyCode===107||je.keyCode===189||je.keyCode===109))&&je.preventDefault(),je.key==="Enter"&&ct&&ct.length>0&&D&&typeof D=="function"&&D(ct)},li=()=>{te&&typeof te=="function"&&te(e)},jt=je=>je,Ht=()=>{let je={};return ie&&(je.borderTopRightRadius=0,je.borderBottomRightRadius=0,je.borderRight=0),G&&(Q==="right"?je.flexDirection="row-reverse":G&&(je.paddingLeft=0)),{...je,...V??{}}},_t=je=>{!je.composedPath().includes(ve.current)&&je.composedPath().includes(Z.current)||we(!1)},Bi=je=>{Ae(je.id),we(!1),$&&typeof $=="function"&&$(je)},Vi=()=>{const je=me.current,ct=ve.current;if(!ct||!je)return;const mi=je.getBoundingClientRect(),Li=window.innerHeight,We=80;W&&(ct.style.position="fixed",ct.style.width=We+"px",Q==="right"?ct.style.left=`${mi.right-We/2}px`:ct.style.left=`${mi.left+We/2}px`,mi.bottom+ct.offsetHeight>Li?(ct.style.top=`${window.scrollY+mi.top-ct.offsetHeight}px`,ct.style.bottom="unset"):(ct.style.top=`${window.scrollY+mi.bottom}px`,ct.style.bottom="unset"))};le.useEffect(()=>{Vi()},[ve,ue]),le.useEffect(()=>{e&&e.length===0&&calculateWidth()},[e]),le.useEffect(()=>(document.addEventListener("click",_t),()=>{document.removeEventListener("click",_t)}),[]);const wt=le.useRef(!1);return le.useEffect(()=>{wt.current?setTimeout(()=>{Se(je=>!je)},0):wt.current=!0},[]),T.jsxs("div",{className:`${ge==="dark"?fi.dark:""} ${fi.inputWrapper}`,style:fe??{},children:[t&&T.jsxs("label",{className:fi.inputLabel,style:de??{},children:[t," ",T.jsx("span",{className:fi.required,style:J??{},children:n&&"*"})]}),T.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[T.jsxs("div",{style:Ht(),ref:me,className:`${fi.inputContainer} ${re&&!c?fi.focused:""} ${r?fi.disabled:""} ${d!=null&&d.error?fi.error:""} ${fi[o??"sm"]}`,children:[!G&&!z&&N&&T.jsx("div",{className:fi.leftIcon,style:C??{},onClick:()=>{b&&typeof b=="function"&&b()},onMouseEnter:()=>{A&&typeof A=="function"&&A()},onMouseLeave:()=>{k&&typeof k=="function"&&k()},children:jt(N)}),!z&&G&&T.jsxs("div",{className:fi.inputDropDown,style:E??{},onClick:()=>(we(!0),Vi()),ref:Z,children:[j.find(je=>je.id===ke).label,ue&&T.jsx("ul",{ref:ve,style:S??{},children:j&&j.length&&j.map((je,ct)=>T.jsx("li",{style:B??{},onClick:()=>Bi(je),children:(je==null?void 0:je.label)??"-"},je.id))}),T.jsx(Du,{})]}),z&&T.jsx("div",{className:`${fi.inputDropDown} ${fi.http}`,style:F??{},onClick:()=>we(!0),ref:Z,children:"http://"}),T.jsxs("div",{className:fi.inputContent,children:[Y&&p&&p.length>0&&T.jsx("div",{className:fi.inputTags,children:p.map((je,ct)=>T.jsx("div",{className:fi.inputSingleTags,children:T.jsx(Wm,{...x,id:je,label:je,withClose:!0})},ct))}),T.jsx("input",{ref:I,style:U??{},type:a??"text",value:e,onChange:je=>Ne(je),onFocus:ut,onBlur:et,disabled:r,required:n,onKeyDown:Ze,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),K&&T.jsx("div",{className:fi.rightIcon,style:H??{},onClick:()=>{m&&typeof m=="function"&&m()},onMouseEnter:()=>{g&&typeof g=="function"&&g()},onMouseLeave:()=>{y&&typeof y=="function"&&y()},children:jt(K)})]}),ie&&T.jsxs("div",{style:ee??{},onClick:li,className:fi.withCopy,children:[T.jsx(PB,{}),T.jsx("span",{children:"Copy"})]})]}),d&&(d==null?void 0:d.visible)&&T.jsx("div",{style:ce??{},className:`${fi.inputHelperText} ${d!=null&&d.error?fi.error:""}`,children:T.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},QB="Textarea-module__textareaContainer",eL="Textarea-module__textAreaLabel",tL="Textarea-module__required",iL="Textarea-module__wrap",nL="Textarea-module__resize",rL="Textarea-module__textarea",aL="Textarea-module__focused",oL="Textarea-module__disabled",sL="Textarea-module__error",lL="Textarea-module__popupEmojiContainer",uL="Textarea-module__popupEmojiIcon",dL="Textarea-module__popupEmojiList",cL="Textarea-module__popupEmojiItem",hL="Textarea-module__helperTextStyle",fL="Textarea-module__dark",Ai={textareaContainer:QB,textAreaLabel:eL,required:tL,wrap:iL,resize:nL,textarea:rL,focused:aL,disabled:oL,error:sL,popupEmojiContainer:lL,popupEmojiIcon:uL,popupEmojiList:dL,popupEmojiItem:cL,helperTextStyle:hL,dark:fL},pL=()=>T.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[T.jsx("g",{clipPath:"url(#clip0_23326_3835)",children:T.jsx("path",{d:"M6.66699 11.6667C6.66699 11.6667 7.91699 13.3334 10.0003 13.3334C12.0837 13.3334 13.3337 11.6667 13.3337 11.6667M12.5003 7.50008H12.5087M7.50033 7.50008H7.50866M18.3337 10.0001C18.3337 14.6025 14.6027 18.3334 10.0003 18.3334C5.39795 18.3334 1.66699 14.6025 1.66699 10.0001C1.66699 5.39771 5.39795 1.66675 10.0003 1.66675C14.6027 1.66675 18.3337 5.39771 18.3337 10.0001ZM12.917 7.50008C12.917 7.7302 12.7304 7.91675 12.5003 7.91675C12.2702 7.91675 12.0837 7.7302 12.0837 7.50008C12.0837 7.26996 12.2702 7.08341 12.5003 7.08341C12.7304 7.08341 12.917 7.26996 12.917 7.50008ZM7.91699 7.50008C7.91699 7.7302 7.73044 7.91675 7.50033 7.91675C7.27021 7.91675 7.08366 7.7302 7.08366 7.50008C7.08366 7.26996 7.27021 7.08341 7.50033 7.08341C7.73044 7.08341 7.91699 7.26996 7.91699 7.50008Z",stroke:"#535862",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),T.jsx("defs",{children:T.jsx("clipPath",{id:"clip0_23326_3835",children:T.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),vL=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😙 ","😚","😋","😛","😎","🥳","😢","😭","😤","😠","😡","🤬","🤯","👋"],_L=({placeholder:e,label:t,msg:i,cols:n,rows:r,value:a,withEmoji:o=!1,maxLength:s,withResize:l=!0,onChange:u,onFocus:d,onBlur:c,disabled:h,required:f,textareaContainerStyle:p,textareaLabelStyle:m,requiredStyle:g,textareaStyle:y,textareaHelperTextStyle:b,labelIcon:A,theme:k})=>{const[D,K]=le.useState(!1),[N,W]=le.useState(!1),G=le.useRef(null),j=le.useRef(null),Q=le.useRef(null),$=C=>{let E=C.target.value;u&&typeof u=="function"&&u(E)},Y=C=>C,x=()=>{K(!0),d&&typeof d=="function"&&d()},z=()=>{K(!1),c&&typeof c=="function"&&c()},ie=C=>{const E=G.current.querySelector("textarea");if(!E)return;const S=E.selectionStart,B=E.selectionEnd,F=a.slice(0,S)+C+a.slice(B);u&&typeof u=="function"&&u(F),setTimeout(()=>{E.focus();const U=S+C.length;E.setSelectionRange(U,U)},0)},te=()=>{const C=G.current,E=Q.current;if(!E||!C)return;const S=C.getBoundingClientRect(),B=220,F=window.innerHeight-S.bottom;S.top,F>=B?(E.style.top="calc(100% + 8px)",E.style.bottom="unset"):(E.style.bottom="calc(100% + 8px)",E.style.top="unset"),S.right>window.innerWidth?E.style.left=`calc(100% - ${S.width}px)`:S.left<0?E.style.left="0px":E.style.left=""};le.useEffect(()=>(N&&(te(),document.addEventListener("mousedown",fe)),()=>{document.removeEventListener("mousedown",fe)}),[N]);const fe=C=>{j.current&&!j.current.contains(C.target)&&W(!1)};le.useEffect(()=>(N&&document.addEventListener("mousedown",fe),()=>{document.removeEventListener("mousedown",fe)}),[N]),le.useEffect(()=>{const C=G.current.querySelector("textarea"),E=G.current;if(!C||!E)return;const S=new ResizeObserver(()=>{E.style.width=`${C.offsetWidth}px`,E.style.height=`${C.offsetHeight}px`});return S.observe(C),()=>S.disconnect()},[]);let de=!1;const J=()=>{const C=G.current.querySelector("textarea");!C||de||(C.style.height="auto",C.style.height=`${C.scrollHeight}px`)};le.useEffect(()=>{const C=G.current.querySelector("textarea"),E=new ResizeObserver(()=>{de=C.offsetHeight<C.scrollHeight});return E.observe(C),()=>E.disconnect()},[]);const V=C=>{de=!1,u==null||u(C.target.value),J()};return T.jsxs("div",{style:p??{},className:`${k==="dark"?Ai.dark:""} ${Ai.textareaContainer} ${i!=null&&i.type&&(i!=null&&i.visible)?Ai[i==null?void 0:i.type]:""} ${h?Ai.disabled:null}`,children:[t&&T.jsxs("div",{style:m,className:Ai.textAreaLabel,children:[T.jsx("p",{children:t}),T.jsx("span",{style:g??{},className:Ai.required,children:f&&"*"}),A&&Y(A)]}),T.jsxs("div",{className:`${Ai.wrap} ${l?Ai.resize:""}`,ref:G,children:[T.jsx("textarea",{style:y??{},className:`${Ai.textarea} ${D?Ai.focused:""} ${h?Ai.disabled:""} ${i!=null&&i.error?Ai.error:""}`,value:a,placeholder:e??"",cols:n??"30",rows:r??"5",maxLength:s??null,onInput:V,onFocus:x,disabled:h,onBlur:N?()=>{}:z,onChange:$,onResize:()=>{console.log("resize")}}),o&&T.jsxs("div",{ref:j,className:Ai.popupEmojiContainer,children:[T.jsx("div",{className:Ai.popupEmojiIcon,onClick:C=>{C.preventDefault(),K(!0),W(E=>!E)},children:T.jsx(pL,{})}),N&&T.jsx("div",{ref:Q,className:Ai.popupEmojiList,children:vL.map((C,E)=>T.jsx("div",{onClick:S=>{S.preventDefault(),ie(C)},className:Ai.popupEmojiItem,children:C},E))})]})]}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&T.jsx("div",{style:b??{},className:`${Ai.helperTextStyle} ${i!=null&&i.error?Ai.error:""}`,children:T.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},mL="Toggle-module__toggleWrapper",gL="Toggle-module__toggleState",CL="Toggle-module__checked",yL="Toggle-module__disabled",xL="Toggle-module__dark",al={toggleWrapper:mL,toggleState:gL,checked:CL,disabled:yL,dark:xL},bL=({checked:e,change:t,disabled:i=!1,required:n,withActive:r=!0,activeStyle:a,bgStyle:o,checkedBgStyle:s,disabledBgStyle:l,circleStyle:u,checkedCircleStyle:d,disabledCircleStyle:c,theme:h="light"})=>{const[f,p]=le.useState(!1),m=()=>{!i&&t&&typeof t=="function"&&t(!e)},g=()=>{if(f)return!r||i?{boxShadow:"none",...a}:a??{};if(e){if(s)return s}else if(e){if(i&&l)return l}else if(o)return o;return{}},y=()=>{if(e){if(d)return d}else if(e){if(i&&c)return c}else if(u)return u;return{}};return T.jsx("div",{style:g(),onMouseDown:()=>p(!0),onMouseUp:()=>p(!1),onMouseLeave:()=>p(!1),onClick:m,className:`${h==="dark"?al.dark:""} ${al.toggleWrapper} ${e?al.checked:""} ${i?al.disabled:""}`,children:T.jsx("div",{style:y(),className:al.toggleState,children:T.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},SL="Radio-module__radioWrapper",EL="Radio-module__sm",wL="Radio-module__md",IL="Radio-module__checked",TL="Radio-module__innerCircle",AL="Radio-module__radioState",DL="Radio-module__disabled",OL="Radio-module__dark",ea={radioWrapper:SL,sm:EL,md:wL,checked:IL,innerCircle:TL,radioState:AL,disabled:DL,dark:OL},bI=({checked:e,change:t,disabled:i,required:n,withUncheckState:r=!1,size:a,radioWrapperStyle:o,radioStateStyle:s,innerCircleStyle:l,theme:u="light"})=>{const[d,c]=le.useState(!1),h=()=>{t&&typeof t=="function"&&(console.log(e),t(r?!e:!0))};return T.jsxs("div",{className:`${u==="dark"?ea.dark:""} ${ea.radioWrapper} ${ea[a]??ea.md} ${e?ea.checked:""} ${i?ea.disabled:""}`,style:o??{},onClick:h,children:[T.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),T.jsx("div",{style:s??{},className:ea.radioState,children:T.jsx("div",{style:l??{},className:ea.innerCircle})})]})},RL="Dropdown-module__dropdownWrapper",kL="Dropdown-module__placeHolder",BL="Dropdown-module__dropdownLabel",LL="Dropdown-module__required",PL="Dropdown-module__dropdownContainer",FL="Dropdown-module__sm",ML="Dropdown-module__md",VL="Dropdown-module__selectedTags",NL="Dropdown-module__selectedList",$L="Dropdown-module__additional",HL="Dropdown-module__dropdownListContainer",WL="Dropdown-module__dropdownList",zL="Dropdown-module__hidden",GL="Dropdown-module__visible",UL="Dropdown-module__checkIcon",KL="Dropdown-module__disabled",jL="Dropdown-module__selected",qL="Dropdown-module__dropdownListFooter",YL="Dropdown-module__focused",XL="Dropdown-module__error",ZL="Dropdown-module__dropdownHelperText",JL="Dropdown-module__dark",ii={dropdownWrapper:RL,placeHolder:kL,dropdownLabel:BL,required:LL,dropdownContainer:PL,sm:FL,md:ML,selectedTags:VL,selectedList:NL,additional:$L,dropdownListContainer:HL,dropdownList:WL,hidden:zL,visible:GL,checkIcon:UL,disabled:KL,selected:jL,dropdownListFooter:qL,focused:YL,error:XL,dropdownHelperText:ZL,dark:JL},QL=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:T.jsx("path",{stroke:"#10B77F",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10 18.333c4.584 0 8.334-3.75 8.334-8.334 0-4.583-3.75-8.333-8.334-8.333-4.583 0-8.333 3.75-8.333 8.333 0 4.584 3.75 8.334 8.333 8.334zM6.667 10h6.667M10 13.333V6.666"})}),eP=e=>T.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T.jsx("path",{d:"M12 22C6.48571 22 2 17.5143 2 12C2 6.48571 6.48571 2 12 2C17.5143 2 22 6.48571 22 12C22 17.5143 17.5143 22 12 22ZM12 3.66679C7.405 3.66679 3.66679 7.405 3.66679 12C3.66679 16.595 7.405 20.3332 12 20.3332C16.595 20.3332 20.3332 16.595 20.3332 12C20.3332 7.405 16.595 3.66679 12 3.66679ZM15.3333 12.8332H8.6665C8.20654 12.8332 7.83321 12.4599 7.83321 11.9999C7.83321 11.54 8.20654 11.1666 8.6665 11.1666H15.3333C15.7941 11.1666 16.1666 11.54 16.1666 11.9999C16.1666 12.4599 15.7941 12.8332 15.3333 12.8332Z",fill:e.color?e.color:"#EF4343"})}),tP=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:T.jsx("path",{d:"M16.5 16.5L13.5834 13.5833M15.6667 8.58333C15.6667 12.4954 12.4954 15.6667 8.58333 15.6667C4.67132 15.6667 1.5 12.4954 1.5 8.58333C1.5 4.67132 4.67132 1.5 8.58333 1.5C12.4954 1.5 15.6667 4.67132 15.6667 8.58333Z",stroke:"#717680",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),v_=({label:e,disabled:t,required:i,size:n="md",placeholder:r,msg:a,readOnly:o,searchValue:s,onClearAll:l,onSelectAll:u,onBottomScroll:d,withSearch:c=!1,withTree:h=!1,defaultCollapsed:f=!0,checkboxProps:p,onCollapse:m,onFocus:g,onBlur:y,withClearAll:b=!0,withSelectAll:A=!0,withPlus:k=!1,searchComponent:D=!1,withFooter:K=!0,data:N,onSelect:W,selectedOptionID:G,withFilter:j=!0,withClose:Q=!0,fixedDropdown:$=!1,onSearch:Y,pagination:x,withMultiSelect:z=!1,skipSelected:ie,closeOnSelect:te=!0,labelIcon:fe,closeIcon:de,dropdownIcon:J,iconDown:V,onLabelIconClick:C,onLabelIconMouseEnter:E,onLabelIconMouseLeave:S,dropdownWrapperStyle:B,dropdownLabelStyle:F,requiredStyle:U,labelIconStyle:H,dropdownContainerStyle:ee,placeHolderStyle:ce,selectedTagsStyle:ge,selectedListStyle:ne,additionalStyle:Se,additionalSpanStyle:I,dropdownListStyle:re,listStyle:oe,treeProps:P,theme:L="light"})=>{const[Z,ve]=le.useState(!1),[me,ue]=le.useState(!1),[we,ke]=le.useState([]),[Ae,Ne]=le.useState(""),[ut,et]=le.useState(""),Ze=le.useRef([]),li=le.useRef(null),jt=le.useRef(null),Ht=le.useRef({}),_t=le.useRef([]),Bi=(q,Te)=>{const X=new Set;return q.filter(Ee=>X.has(Ee[Te])?!1:(X.add(Ee[Te]),!0))},Vi=q=>{var Te;Ht.current=q,Ne((Te=Ht.current)==null?void 0:Te.label),W&&typeof W=="function"&&W(Ht.current),ue(!1)},wt=q=>{Ze.current=[...Ze.current,...N.filter(Te=>Te.selected==!0),...N.filter(Te=>Te.id===q.id)],q.selected=!q.selected,Ze.current=Bi(Ze.current,"id").filter(Te=>Te.selected),W&&typeof W=="function"&&W(Ze.current),D||Ne(Ze.current.map(Te=>Te.label).join(", ")),ve(Te=>!Te)},je=q=>{q.stopPropagation(),z||h?c&&(et(""),_t.current=N,ve(Te=>!Te)):(Ze.current=[],G=null,N&&N.length>0&&N.forEach(Te=>Te.selected=!1),ct(""),Ht.current={},W({}),Ne("")),Y&&typeof Y=="function"&&Y("")},ct=q=>{if(Y&&typeof Y=="function"&&Y(q),z&&c){let Te=N,X=Te.filter(Ee=>{var Pe;return(Pe=Ee==null?void 0:Ee.label)==null?void 0:Pe.toLowerCase().includes((q==null?void 0:q.toLowerCase())||"")});_t.current=(q==null?void 0:q.length)>0?X:Te,et(q),ve(Ee=>!Ee)}else et(q),Ne(q)},mi=()=>{if(G||G===0){let q=N.filter(Te=>Number(Te.id)===Number(G));q&&q[0]&&(Ht.current=q[0],ie?(Y&&typeof Y=="function"&&Y(Ht.current.label),Ne(Ht.current.label),te&&ue(Te=>!1)):Vi(q[0]))}},[Li,We]=le.useState(!1),ht=q=>{let Te=li.current.querySelector("ul"),Ee=Math.abs(Te.scrollTop+Te.clientHeight-Te.scrollHeight)<=2;x&&Ee&&!Li&&(d&&typeof d=="function"&&d(!0),We(!0)),Ee||We(!1)},Zt=()=>{N.forEach(q=>{q.selected=!1}),Ze.current=[],W([],!0),Ne(""),l&&typeof l=="function"&&l(),ve(q=>!q)},mt=()=>{N.forEach(q=>{q!=null&&q.id&&(q==null?void 0:q.id)!==null&&(q!=null&&q.label)&&(q==null?void 0:q.label)!==""&&(q==null?void 0:q.label)!=="-"&&!q.disabled&&(q.selected=!0)}),Ze.current=N,Ze.current=Bi(Ze.current,"id").filter(q=>q.selected),Ne(Ze.current.map(q=>q.label).join(", ")),u&&typeof u=="function"&&u(),W(Ze.current,!0),ve(q=>!q)},Wt=le.useRef(!0);le.useEffect(()=>{if(Wt.current){Wt.current=!1;return}me||y&&typeof y=="function"&&y()},[me]);const yr=()=>{g&&typeof g=="function"&&g()},xr=q=>q,zo=q=>{let Te=!0,X=Ae;return j&&q&&!q.toLowerCase().split(" ").join("").trim().includes(X.toLowerCase().split(" ").join("").trim())&&X.trim()!==""&&(Te=!1),ut.length>0&&q==="-"?"hidden":Te?"visible":"hidden"},Go=q=>{q.composedPath().includes(li.current)||ue(!1)},Uo=q=>{if($){if(q.composedPath().includes(li.current))return;ue(!1)}},Ma=()=>{const q=li.current,Te=jt.current;if(!Te||!q)return;const X=q.getBoundingClientRect(),Ee=window.innerHeight;$?(Te.style.position="fixed",Te.style.width=X.width+"px",Te.style.left=`${X.left+window.pageXOffset}px`,X.bottom+Te.offsetHeight>Ee?(Te.style.top=`${window.scrollY+X.top-Te.offsetHeight-8}px`,Te.style.bottom="unset"):(Te.style.top=`${window.scrollY+X.bottom}px`,Te.style.bottom="unset")):X.bottom>Ee?(Te.style.top="unset",Te.style.bottom="calc(100% + 8px)"):(Te.style.bottom="unset",Te.style.top="calc(100% + 8px)")},Ko=q=>{Ze.current=q,W&&typeof W=="function"&&W(q)},il=(q,Te)=>{m&&typeof m=="function"&&m(q,Te)},Va=le.useRef(null);return le.useEffect(()=>{me&&Va.current&&Va.current.focus()},[me]),le.useEffect(()=>{z&&(Ze.current=N.filter(q=>q.selected),Ne(N.filter(q=>q.selected).map(q=>q.label).join(", ")))},[]),le.useEffect(()=>{D&&s&&s.length>0&&et(s),_t.current=N},[]),le.useEffect(()=>{Ma()},[jt,me]),le.useEffect(()=>{z||mi()},[G]),le.useEffect(()=>(document.addEventListener("click",Go),document.addEventListener("wheel",Uo),()=>{document.removeEventListener("click",Go),document.removeEventListener("wheel",Uo)}),[]),T.jsxs("div",{className:`${L==="dark"?ii.dark:""} ${ii.dropdownWrapper}`,style:B??{},children:[e&&T.jsxs("label",{className:ii.dropdownLabel,style:F??{},children:[e," ",T.jsx("span",{className:ii.required,style:U??{},children:i&&"*"}),T.jsxs("span",{style:{...H??{},display:"grid",placeItems:"center"},onClick:()=>{C&&typeof C=="function"&&C()},onMouseEnter:()=>{E&&typeof E=="function"&&E()},onMouseLeave:()=>{S&&typeof S=="function"&&S()},children:[" ",xr(fe)]})]}),T.jsxs("div",{onFocus:yr,ref:li,onClick:()=>(ue(q=>!q),Ma()),className:`${ii.dropdownContainer} ${me&&!o?ii.focused:""} ${t?ii.disabled:""} ${a!=null&&a.error?ii.error:""} ${ii[n]}`,style:ee??{},children:[D?T.jsxs("div",{children:[" ",T.jsx(tP,{})]}):T.jsx(T.Fragment,{children:J&&T.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:xr(J)})}),!D&&(h||z)&&r&&!me&&Ze.current.length===0&&T.jsx("span",{className:ii.placeHolder,style:ce??{},children:r??""}),(z||h)&&T.jsx("div",{className:ii.selectedTags,style:ge??{},children:!D&&!me?T.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[Ze.current.slice(0,3).map((q,Te)=>{let X=Ze.current[Ze.current.length-1];return T.jsxs("span",{className:ii.selectedList,style:ne??{},children:[q.label,q.id!==X.id&&Te!==2?",":""," "]},q==null?void 0:q.id)}),Ze.current.length>3&&T.jsxs("div",{className:ii.additional,style:I??{},children:["+",Ze.current.length-3]})]}):T.jsx("input",{ref:Va,onClick:q=>(q.stopPropagation(),ue(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...D||c?{value:ut}:{},onChange:q=>ct(q.target.value)},G)}),T.jsx("input",{autoCorrect:"off",hidden:z||h,placeholder:r,readOnly:!j||!me||z||h,type:"text",value:(z||h)&&!D&&me?"":Ae,onChange:q=>ct(q.target.value)},G),N&&N.length>0&&me&&T.jsxs("div",{ref:jt,onClick:q=>q.stopPropagation(),className:ii.dropdownListContainer,children:[h?T.jsx(Zk,{SearchValue:ut,expandedNodes:we,setExpandedNodes:ke,checkboxProps:p,onSelect:Ko,withClearAll:b,withSelectAll:A,SelectedData:Ze.current,fromDropdown:!0,onCollapse:il,defaultCollapsed:f,data:N,theme:L,treeProps:P}):T.jsx("ul",{onScroll:q=>ht(),onClick:q=>q.stopPropagation(),className:ii.dropdownList,style:re??{},children:(z&&j?_t.current:N).map(q=>{var Te,X,Ee,Pe;return T.jsxs("li",{style:oe??{},className:`${!z&&c?ii[zo((q==null?void 0:q.label)??"-")]:""} ${!(q!=null&&q.label)||q.label===void 0||q!=null&&q.disabled?ii.disabled:""} ${(z?q.selected:(Te=Ht.current)!=null&&Te.id&&((X=Ht.current)==null?void 0:X.id)===q.id)?ii.selected:""}`,onClick:()=>{z?wt(q):Vi(q)},children:[T.jsxs("p",{children:[" ",q!=null&&q.customLabel?q.customLabel():(q==null?void 0:q.label)??"-"]}),k?T.jsx(T.Fragment,{children:q.selected?T.jsx(eP,{}):T.jsx(QL,{})}):(z?q.selected:((Ee=Ht.current)==null?void 0:Ee.id)&&((Pe=Ht.current)==null?void 0:Pe.id)===q.id)&&T.jsx("span",{className:ii.checkIcon,children:T.jsx(xI,{color:"#7F56D9",width:20,height:20})})]},q==null?void 0:q.id)})}),z&&K&&T.jsxs("div",{className:ii.dropdownListFooter,children:[b&&T.jsx("span",{onClick:Zt,children:"Clear All"}),A&&ut===""&&T.jsx("span",{onClick:mt,children:"Select All"})]})]}),Q&&(!c&&Ae.length>0||ut.length>0)&&T.jsx("div",{onClick:q=>je(q),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:de?xr(de):T.jsx(Ou,{width:16,height:16})}),V?xr(V):T.jsx("div",{style:{display:"grid",placeItems:"center",transform:me?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!D&&T.jsx(Du,{})})]}),a&&(a==null?void 0:a.visible)&&T.jsx("div",{className:`${ii.dropdownHelperText} ${a!=null&&a.error?ii.error:""}`,children:!me&&T.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},iP="Tooltip-module__tooltipContainer",nP="Tooltip-module__tooltipContent",rP="Tooltip-module__withoutPointer",aP="Tooltip-module__top",oP="Tooltip-module__right",sP="Tooltip-module__bottom",lP="Tooltip-module__left",uP="Tooltip-module__tooltipTitle",dP="Tooltip-module__tooltipText",cP="Tooltip-module__dark",Nn={tooltipContainer:iP,tooltipContent:nP,withoutPointer:rP,top:aP,right:oP,bottom:sP,left:lP,tooltipTitle:uP,tooltipText:dP,dark:cP},__=({children:e,tooltipSlot:t,delay:i=400,placement:n="top",trigger:r="hover",title:a,text:o,customText:s,tooltipContentStyle:l,tooltipTitlestyle:u,tooltipTextStyle:d,pointerPosition:c="10%",withPointer:h=!0,theme:f})=>{const p=le.useRef(null),m=le.useRef(null);let g;const[y,b]=le.useState(!1),A=()=>{r==="hover"&&(g=setTimeout(()=>{b(!0)},i))},k=()=>{r==="hover"&&(clearTimeout(g),setTimeout(()=>{b(!1)},i))},D=()=>{r==="click"&&b(G=>!G)},K=()=>{const G=p.current,j=m.current;if(!j||!G)return;const Q=G.getBoundingClientRect();switch(j.style.position="fixed",n){case"top":j.style.top=`${Q.top-j.offsetHeight-8}px`;break;case"bottom":j.style.top=`${Q.bottom+8}px`;break;case"left":j.style.top=`${Q.top+Q.height/2-j.offsetHeight/2}px`,j.style.left=`${Q.left-j.offsetWidth-8}px`;break;case"right":j.style.top=`${Q.top+Q.height/2-j.offsetHeight/2}px`,j.style.left=`${Q.right+8}px`;break}},N=G=>{G.composedPath().includes(p.current)||b(!1)},W=()=>{b(!1)};return le.useEffect(()=>{K()},[p,y]),le.useEffect(()=>(document.addEventListener("click",N),window.addEventListener("scroll",W,!0),()=>{window.removeEventListener("scroll",W,!0),document.removeEventListener("click",N)}),[]),le.useEffect(()=>{const G=m.current;G&&(G.style.setProperty("--pointer-position",`${c}`),h||G.classList.add(Nn.withoutPointer))},[y]),T.jsxs("div",{ref:p,className:`${f==="dark"?Nn.dark:""} ${Nn.tooltipContainer}`,onClick:D,onMouseEnter:A,onMouseLeave:k,children:[e,y&&t?T.jsx("div",{style:l??{},onClick:G=>G.stopPropagation(),ref:m,className:`${Nn.tooltipContent} ${n?Nn[n]:Nn.bottom}`,children:t()}):y&&T.jsxs("div",{style:l??{},onClick:G=>G.stopPropagation(),ref:m,className:`${Nn.tooltipContent} ${n?Nn[n]:Nn.bottom}`,children:[s&&typeof s=="function"&&s(),a&&a.length>0&&T.jsx("h2",{className:Nn.tooltipTitle,style:u??{},children:a}),o&&o.length>0&&T.jsx("p",{className:Nn.tooltipText,style:d??{},children:o})]})]})},hP="Popup-module__modalOverlay",fP="Popup-module__popupDrawerMode",pP="Popup-module__popupContainer",vP="Popup-module__closeButton",_P="Popup-module__withOptions",mP="Popup-module__horizontal",gP="Popup-module__popupHeader",CP="Popup-module__popupTitle",yP="Popup-module__popupDescription",xP="Popup-module__typeIcon",bP="Popup-module__icon",SP="Popup-module__templateWrapper",EP="Popup-module__dark",un={modalOverlay:hP,popupDrawerMode:fP,popupContainer:pP,closeButton:vP,withOptions:_P,horizontal:mP,popupHeader:gP,popupTitle:CP,popupDescription:yP,typeIcon:xP,icon:bP,templateWrapper:SP,dark:EP},wP=e=>{const t=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];let i=0,n=parseInt(e,10)||0;for(;n>=1024&&++i;)n=n/1024;return n.toFixed(n<10&&i>0?1:0)+" "+t[i]},IP=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),TP=e=>new Promise((t,i)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result.split(",")[1]),n.onerror=r=>i(r)});location.href.indexOf(".upgaming.dev")>0||location.href.indexOf(".upgaming.com")>0;const SI=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},AP=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:T.jsx("path",{d:"M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#079455",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),DP=()=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:T.jsx("path",{d:"M7 3V6.4C7 6.96005 7 7.24008 7.10899 7.45399C7.20487 7.64215 7.35785 7.79513 7.54601 7.89101C7.75992 8 8.03995 8 8.6 8H15.4C15.9601 8 16.2401 8 16.454 7.89101C16.6422 7.79513 16.7951 7.64215 16.891 7.45399C17 7.24008 17 6.96005 17 6.4V4M17 21V14.6C17 14.0399 17 13.7599 16.891 13.546C16.7951 13.3578 16.6422 13.2049 16.454 13.109C16.2401 13 15.9601 13 15.4 13H8.6C8.03995 13 7.75992 13 7.54601 13.109C7.35785 13.2049 7.20487 13.3578 7.10899 13.546C7 13.7599 7 14.0399 7 14.6V21M21 9.32548V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3H14.6745C15.1637 3 15.4083 3 15.6385 3.05526C15.8425 3.10425 16.0376 3.18506 16.2166 3.29472C16.4184 3.4184 16.5914 3.59135 16.9373 3.93726L20.0627 7.06274C20.4086 7.40865 20.5816 7.5816 20.7053 7.78343C20.8149 7.96237 20.8957 8.15746 20.9447 8.36154C21 8.59171 21 8.8363 21 9.32548Z",stroke:"#DC6803",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),zm=({width:e,color:t})=>T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:T.jsx("path",{d:"M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6",stroke:t??"#D92D20",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),EI=({visible:e,template:t,options:i,children:n,onClickOutside:r,onClose:a,widthType:o,modalOverlayStyle:s,popupContainerStyle:l,templateWrapperStyle:u,popupHeaderStyle:d,popupTitleStyle:c,closeButtonStyle:h,theme:f})=>{const p=()=>{if(!(!i||!(i!=null&&i.type)))switch(String(i==null?void 0:i.type)){case"delete":return T.jsx(zm,{});case"unsaved":return T.jsx(DP,{});case"success":return T.jsx(AP,{})}},m=()=>{a&&typeof a=="function"&&a(!1)},g=le.useRef(null),y=b=>{b.target===g.current&&r&&typeof r=="function"&&r(!1)};return le.useEffect(()=>(document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}),[]),e&&T.jsx("div",{ref:g,style:s??{},className:`
|
|
39
39
|
${f==="dark"?un.dark:""}
|
|
40
40
|
${un.modalOverlay}
|
|
41
41
|
${i&&(i==null?void 0:i.mode)==="drawer"?un.popupDrawerMode:""}
|
|
@@ -1469,11 +1469,11 @@ const rB = ({ loadingColor: e }) => /* @__PURE__ */ T.jsxs(
|
|
|
1469
1469
|
}, Qt = () => {
|
|
1470
1470
|
N.forEach((q) => {
|
|
1471
1471
|
q.selected = !1;
|
|
1472
|
-
}), Je.current = [],
|
|
1472
|
+
}), Je.current = [], W([], !0), Ve(""), l && typeof l == "function" && l(), pe((q) => !q);
|
|
1473
1473
|
}, Ct = () => {
|
|
1474
1474
|
N.forEach((q) => {
|
|
1475
1475
|
q != null && q.id && (q == null ? void 0 : q.id) !== null && (q != null && q.label) && (q == null ? void 0 : q.label) !== "" && (q == null ? void 0 : q.label) !== "-" && !q.disabled && (q.selected = !0);
|
|
1476
|
-
}), Je.current = N, Je.current = Pi(Je.current, "id").filter((q) => q.selected), Ve(Je.current.map((q) => q.label).join(", ")), u && typeof u == "function" && u(),
|
|
1476
|
+
}), Je.current = N, Je.current = Pi(Je.current, "id").filter((q) => q.selected), Ve(Je.current.map((q) => q.label).join(", ")), u && typeof u == "function" && u(), W(Je.current, !0), pe((q) => !q);
|
|
1477
1477
|
}, Gt = qe(!0);
|
|
1478
1478
|
it(() => {
|
|
1479
1479
|
if (Gt.current) {
|