master-components-react 4.2.37 → 4.2.38

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.
@@ -36,7 +36,7 @@ React keys must be passed directly to JSX without using spread:
36
36
  ${d?nr.onlyIcon:""}
37
37
  ${o?nr.loading:""}
38
38
  ${r?nr[r]:""}
39
- `,onClick:()=>{!a&&n&&typeof n=="function"&&n()},children:w.jsxs("div",{className:nr.buttonSlot,style:!a&&p?p:{},children:[d||s&&l?l:"",!d&&w.jsx(w.Fragment,{children:o?w.jsx("div",{style:{display:"grid",placeItems:"center"},children:w.jsx(lB,{loadingColor:v})}):w.jsx("span",{style:!a&&h?h:{},className:nr.buttonLabel,children:e??"Button"})}),s&&u?u:""]})})},AB="FormInput-module__inputWrapper",DB="FormInput-module__inputLabel",OB="FormInput-module__required",RB="FormInput-module__inputContainer",kB="FormInput-module__inputContent",BB="FormInput-module__inputTags",PB="FormInput-module__focused",LB="FormInput-module__error",FB="FormInput-module__rightIcon",MB="FormInput-module__leftIcon",VB="FormInput-module__inputDropDown",NB="FormInput-module__http",$B="FormInput-module__disabled",HB="FormInput-module__sm",WB="FormInput-module__md",zB="FormInput-module__withCopy",GB="FormInput-module__inputHelperText",UB="FormInput-module__Namespace_Hr",KB="FormInput-module__dark",Yt={inputWrapper:AB,inputLabel:DB,required:OB,inputContainer:RB,inputContent:kB,inputTags:BB,focused:PB,error:LB,rightIcon:FB,leftIcon:MB,inputDropDown:VB,http:NB,disabled:$B,sm:HB,md:WB,withCopy:zB,inputHelperText:GB,namespaceHr:UB,dark:KB},Ru=({width:e,height:t,color:i})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:w.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),jB=({width:e,height:t,color:i})=>w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[w.jsx("g",{clipPath:"url(#clip0_444_26)",children:w.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"})}),w.jsx("defs",{children:w.jsx("clipPath",{id:"clip0_444_26",children:w.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),ku=e=>w.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:w.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"})}),qB="Checkbox-module__checkboxWrapper",YB="Checkbox-module__sm",XB="Checkbox-module__md",ZB="Checkbox-module__checkMark",JB="Checkbox-module__checked",QB="Checkbox-module__disabled",eP="Checkbox-module__Namespace_Hr",tP="Checkbox-module__dark",za={checkboxWrapper:qB,sm:YB,md:XB,checkMark:ZB,checked:JB,disabled:QB,namespaceHr:eP,dark:tP},wI=({color:e,width:t,height:i})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:w.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),iP=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:w.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),Bu=({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=tr(),c=le.useRef(null),[h,f]=le.useState(!1),p=()=>{i||t&&typeof t=="function"&&t(!e)},v=()=>h?i?{boxShadow:"none"}:o??{}:s??{};return w.jsxs("div",{style:v(),className:` ${u==="dark"?za.dark:""} ${za[d]} ${za.checkboxWrapper} ${za[a]} ${e?za.checked:za.unChecked} ${i?za.disabled:""}`,onMouseDown:()=>f(!0),onMouseUp:()=>f(!1),onMouseLeave:()=>f(!1),onClick:p,children:[w.jsx("input",{ref:c,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?w.jsx(iP,{}):w.jsx(wI,{}):""]})},nP="Tag-module__tagContainer",rP="Tag-module__onlyLabel",aP="Tag-module__sm",oP="Tag-module__md",sP="Tag-module__lg",lP="Tag-module__tagLabel",uP="Tag-module__tagNumber",dP="Tag-module__tagClose",cP="Tag-module__dark",Ga={tagContainer:nP,onlyLabel:rP,sm:aP,md:oP,lg:sP,tagLabel:lP,tagNumber:uP,tagClose:dP,dark:cP},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:v})=>{const g=()=>!r&&!i&&!n&&!a,C=()=>i,x=()=>{d&&typeof d=="function"&&d(e??null)};return w.jsxs("div",{style:c??{},className:`${v==="dark"?Ga.dark:""} ${Ga.tagContainer} ${g()?Ga.onlyLabel:""} ${Ga[u??"md"]}`,children:[r&&w.jsx(Bu,{...s}),i&&C(),t&&w.jsx("p",{style:h??{},className:Ga.tagLabel,children:t??""}),a&&w.jsx("div",{style:f??{},className:Ga.tagNumber,children:o??""}),n&&w.jsx("div",{style:p??{},className:Ga.tagClose,onClick:x,children:w.jsx(ku,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},Jl=({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,customAction:v,onRightIconIconClick:g,onRightIconIconMouseEnter:C,onRightIconIconMouseLeave:x,onLeftIconIconClick:S,onLeftIconIconMouseEnter:P,onLeftIconIconMouseLeave:D,onPressEnter:$,rightIcon:G,leftIcon:z,fixedDropdown:q=!0,withDropDown:ie,dropdownData:Z,dropDownPosition:H="left",onSelectData:ee,withTags:I,tagProps:U,withLink:L,withCopy:Y,onCopy:se,inputWrapperStyle:te,inputLabelStyle:X,requiredStyle:j,inputContainerStyle:y,leftIconStyle:T,customActionStyle:A,inputDropDownStyle:B,ulStyle:R,liStyle:M,httpStyle:V,inputStyle:J,rightIconStyle:re,withCopyStyle:pe,inputHelperTextStyle:ce,theme:Ae="light"})=>{const b=tr(),[ae,ue]=le.useState(!1),F=le.useRef(null),[N,Q]=le.useState(!1),[me,he]=le.useState(!1),ne=le.useRef(null),be=le.useRef(null),De=le.useRef(null),[Ie,Ne]=le.useState(!1),[rt,Je]=le.useState(1),wt=Ge=>{let ft=Ge.target.value;ft.length===1&&(ft=ft.trim()),s&&typeof s=="function"&&s(f?ft.replace(/\d/g,""):ft)},ht=()=>{Q(!0),l&&typeof l=="function"&&l()},Gt=()=>{Q(!1),u&&typeof u=="function"&&u()},mi=Ge=>{const ft=Ge.target.value,qt=ft.length===0;a==="number"&&(Ge.keyCode===69||!qt&&(Ge.keyCode===187||Ge.keyCode===107||Ge.keyCode===189||Ge.keyCode===109))&&Ge.preventDefault(),Ge.key==="Enter"&&ft&&ft.length>0&&$&&typeof $=="function"&&$(ft)},st=()=>{se&&typeof se=="function"&&se(e)},fi=Ge=>Ge,Mi=()=>{let Ge={};return(Y||v)&&(Ge.borderTopRightRadius=0,Ge.borderBottomRightRadius=0,Ge.borderRight=0),ie&&(H==="right"?Ge.flexDirection="row-reverse":ie&&(Ge.paddingLeft=0)),{...Ge,...y??{}}},bt=Ge=>{!Ge.composedPath().includes(be.current)&&Ge.composedPath().includes(ne.current)||Ne(!1)},fn=Ge=>{Je(Ge.id),Ne(!1),ee&&typeof ee=="function"&&ee(Ge)},Ki=()=>{const Ge=De.current,ft=be.current;if(!ft||!Ge)return;const qt=Ge.getBoundingClientRect(),Ni=window.innerHeight,We=80;q&&(ft.style.position="fixed",ft.style.width=We+"px",H==="right"?ft.style.left=`${qt.right-We/2}px`:ft.style.left=`${qt.left+We/2}px`,qt.bottom+ft.offsetHeight>Ni?(ft.style.top=`${window.scrollY+qt.top-ft.offsetHeight}px`,ft.style.bottom="unset"):(ft.style.top=`${window.scrollY+qt.bottom}px`,ft.style.bottom="unset"))};le.useEffect(()=>{Ki()},[be,Ie]),le.useEffect(()=>(document.addEventListener("click",bt),()=>{document.removeEventListener("click",bt)}),[]);const Vi=le.useRef(!1);return le.useEffect(()=>{Vi.current?setTimeout(()=>{ue(Ge=>!Ge)},0):Vi.current=!0},[]),w.jsxs("div",{className:`${Ae==="dark"?Yt.dark:""} ${Yt[b]} ${Yt.inputWrapper}`,style:te??{},children:[t&&w.jsxs("label",{className:Yt.inputLabel,style:X??{},children:[typeof t=="function"?t():t,w.jsx("span",{className:Yt.required,style:j??{},children:n&&"*"})]}),w.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[w.jsxs("div",{style:Mi(),ref:De,className:`${Yt.inputContainer} ${N&&!c?Yt.focused:""} ${r?Yt.disabled:""} ${d!=null&&d.error?Yt.error:""} ${Yt[o??"sm"]}`,children:[!ie&&!L&&z&&w.jsx("div",{className:Yt.leftIcon,style:T??{},onClick:()=>{S&&typeof S=="function"&&S()},onMouseEnter:()=>{P&&typeof P=="function"&&P()},onMouseLeave:()=>{D&&typeof D=="function"&&D()},children:fi(z)}),!L&&ie&&w.jsxs("div",{className:Yt.inputDropDown,style:B??{},onClick:()=>(Ne(!0),Ki()),ref:ne,children:[Z.find(Ge=>Ge.id===rt).label,Ie&&w.jsx("ul",{ref:be,style:R??{},children:Z&&Z.length&&Z.map((Ge,ft)=>w.jsx("li",{style:M??{},onClick:()=>fn(Ge),children:(Ge==null?void 0:Ge.label)??"-"},Ge.id))}),w.jsx(Ru,{})]}),L&&w.jsx("div",{className:`${Yt.inputDropDown} ${Yt.http}`,style:V??{},onClick:()=>Ne(!0),ref:ne,children:"http://"}),w.jsxs("div",{className:Yt.inputContent,children:[I&&p&&p.length>0&&w.jsx("div",{className:Yt.inputTags,children:p.map((Ge,ft)=>w.jsx("div",{className:Yt.inputSingleTags,children:w.jsx(Wm,{...U,id:Ge,label:Ge,withClose:!0})},ft))}),w.jsx("input",{ref:F,style:J??{},type:a??"text",value:e,onChange:Ge=>wt(Ge),onFocus:ht,onBlur:Gt,disabled:r,required:n,onKeyDown:mi,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),G&&w.jsx("div",{className:Yt.rightIcon,style:re??{},onClick:()=>{g&&typeof g=="function"&&g()},onMouseEnter:()=>{C&&typeof C=="function"&&C()},onMouseLeave:()=>{x&&typeof x=="function"&&x()},children:fi(G)})]}),Y&&w.jsxs("div",{style:pe??{},onClick:st,className:`${Yt.withCopy} ${N?Yt.focused:""}`,children:[w.jsx(jB,{}),w.jsx("span",{children:"Copy"})]}),v&&w.jsx("div",{style:A??{},className:`${Yt.withCopy} ${N?Yt.focused:""}`,children:v()})]}),d&&(d==null?void 0:d.visible)&&w.jsx("div",{style:ce??{},className:`${Yt.inputHelperText} ${d!=null&&d.error?Yt.error:""}`,children:w.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},hP="Textarea-module__textareaContainer",fP="Textarea-module__textAreaLabel",pP="Textarea-module__required",vP="Textarea-module__wrap",_P="Textarea-module__resize",mP="Textarea-module__textarea",gP="Textarea-module__focused",CP="Textarea-module__disabled",yP="Textarea-module__error",xP="Textarea-module__popupEmojiContainer",bP="Textarea-module__popupEmojiIcon",SP="Textarea-module__popupEmojiList",EP="Textarea-module__popupEmojiItem",wP="Textarea-module__helperTextStyle",IP="Textarea-module__namespaceHr",TP="Textarea-module__dark",gi={textareaContainer:hP,textAreaLabel:fP,required:pP,wrap:vP,resize:_P,textarea:mP,focused:gP,disabled:CP,error:yP,popupEmojiContainer:xP,popupEmojiIcon:bP,popupEmojiList:SP,popupEmojiItem:EP,helperTextStyle:wP,namespaceHr:IP,dark:TP},AP=()=>w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[w.jsx("g",{clipPath:"url(#clip0_23326_3835)",children:w.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"})}),w.jsx("defs",{children:w.jsx("clipPath",{id:"clip0_23326_3835",children:w.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),DP=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😙 ","😚","😋","😛","😎","🥳","😢","😭","😤","😠","😡","🤬","🤯","👋"],OP=({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:v,requiredStyle:g,textareaStyle:C,focusStyle:x,textareaHelperTextStyle:S,labelIcon:P,theme:D})=>{const $=tr(),[G,z]=le.useState(!1),[q,ie]=le.useState(!1),Z=le.useRef(null),H=le.useRef(null),ee=le.useRef(null),I=B=>{let R=B.target.value;u&&typeof u=="function"&&u(R)},U=B=>B,L=()=>{z(!0),d&&typeof d=="function"&&d()},Y=()=>{z(!1),c&&typeof c=="function"&&c()},se=B=>{const R=Z.current.querySelector("textarea");if(!R)return;const M=R.selectionStart,V=R.selectionEnd,J=R.scrollTop,re=a.slice(0,M)+B+a.slice(V);u&&typeof u=="function"&&u(re),setTimeout(()=>{R.focus(),R.setSelectionRange(M+B.length,M+B.length),R.scrollTop=J},0)},te=()=>{const B=Z.current,R=ee.current;if(!R||!B)return;const M=B.getBoundingClientRect(),V=220,J=window.innerHeight-M.bottom;M.top,J>=V?(R.style.top="calc(100% + 8px)",R.style.bottom="unset"):(R.style.bottom="calc(100% + 8px)",R.style.top="unset"),M.right>window.innerWidth?R.style.left=`calc(100% - ${M.width}px)`:M.left<0?R.style.left="0px":R.style.left=""};le.useEffect(()=>(q&&(te(),document.addEventListener("mousedown",X)),()=>{document.removeEventListener("mousedown",X)}),[q]);const X=B=>{H.current&&!H.current.contains(B.target)&&ie(!1)};le.useEffect(()=>(q&&document.addEventListener("mousedown",X),()=>{document.removeEventListener("mousedown",X)}),[q]);let j=!1;le.useEffect(()=>{var J;const B=(J=Z.current)==null?void 0:J.querySelector("textarea");if(!B)return;let R=!1;const M=re=>{const pe=B.getBoundingClientRect();re.clientX>pe.right-20&&re.clientY>pe.bottom-20&&(R=!0)},V=new ResizeObserver(()=>{R&&(j=!0,R=!1)});return B.addEventListener("mousedown",M),V.observe(B),()=>{B.removeEventListener("mousedown",M),V.disconnect()}},[]);const y=()=>{const B=Z.current.querySelector("textarea");!B||j||(B.style.height="auto",B.style.height=`${B.scrollHeight}px`)};le.useEffect(()=>{const B=Z.current.querySelector("textarea"),R=new ResizeObserver(()=>{j=B.offsetHeight<B.scrollHeight});return R.observe(B),()=>R.disconnect()},[]);const T=B=>{j=!1,u==null||u(B.target.value),y()},A=()=>{let B=C??{};return x&&(B={...B,...x??{}}),B};return w.jsxs("div",{style:p??{},className:`${D==="dark"?gi.dark:""} ${$==="namespaceHr"?gi.namespaceHr:""} ${gi.textareaContainer} ${i!=null&&i.type&&(i!=null&&i.visible)?gi[i==null?void 0:i.type]:""} ${h?gi.disabled:null}`,children:[t&&w.jsxs("div",{style:v,className:gi.textAreaLabel,children:[w.jsx("p",{children:t}),w.jsx("span",{style:g??{},className:gi.required,children:f&&"*"}),P&&U(P)]}),w.jsxs("div",{className:`${gi.wrap} ${l?gi.resize:""}`,ref:Z,children:[w.jsx("textarea",{style:A(),className:`${gi.textarea} ${G?gi.focused:""} ${h?gi.disabled:""} ${i!=null&&i.error?gi.error:""} `,value:a,placeholder:e??"",cols:n??"30",rows:r??"5",maxLength:s??null,onInput:T,onFocus:L,disabled:h,onBlur:q?()=>{}:Y,onChange:I,onResize:()=>{console.log("resize")}}),o&&w.jsxs("div",{ref:H,className:gi.popupEmojiContainer,children:[w.jsx("div",{className:gi.popupEmojiIcon,onClick:B=>{B.preventDefault(),z(!0),ie(R=>!R)},children:w.jsx(AP,{})}),q&&w.jsx("div",{ref:ee,className:gi.popupEmojiList,children:DP.map((B,R)=>w.jsx("div",{onClick:M=>{M.preventDefault(),se(B)},className:gi.popupEmojiItem,children:B},R))})]})]}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&w.jsx("div",{style:S??{},className:`${gi.helperTextStyle} ${i!=null&&i.error?gi.error:""}`,children:w.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},RP="Toggle-module__toggleWrapper",kP="Toggle-module__toggleState",BP="Toggle-module__checked",PP="Toggle-module__disabled",LP="Toggle-module__Namespace_Hr",FP="Toggle-module__dark",Xo={toggleWrapper:RP,toggleState:kP,checked:BP,disabled:PP,namespaceHr:LP,dark:FP},MP=({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=tr(),[p,v]=le.useState(!1),g=()=>{!i&&t&&typeof t=="function"&&t(!e)},C=()=>{if(p)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{}},x=()=>{if(e){if(d)return d}else if(e){if(i&&c)return c}else if(u)return u;return{}};return w.jsx("div",{style:C(),onMouseDown:()=>v(!0),onMouseUp:()=>v(!1),onMouseLeave:()=>v(!1),onClick:g,className:`${h==="dark"?Xo.dark:""} ${Xo[f]} ${Xo.toggleWrapper} ${e?Xo.checked:""} ${i?Xo.disabled:""}`,children:w.jsx("div",{style:x(),className:Xo.toggleState,children:w.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},VP="Radio-module__radioWrapper",NP="Radio-module__sm",$P="Radio-module__md",HP="Radio-module__checked",WP="Radio-module__innerCircle",zP="Radio-module__radioState",GP="Radio-module__disabled",UP="Radio-module__Namespace_Hr",KP="Radio-module__dark",Tr={radioWrapper:VP,sm:NP,md:$P,checked:HP,innerCircle:WP,radioState:zP,disabled:GP,namespaceHr:UP,dark:KP},II=({checked:e,change:t,disabled:i,required:n,withUncheckState:r=!1,size:a,radioWrapperStyle:o,radioStateStyle:s,innerCircleStyle:l,theme:u="light"})=>{const d=tr(),[c,h]=le.useState(!1),f=()=>{t&&typeof t=="function"&&t(r?!e:!0)};return w.jsxs("div",{className:`${u==="dark"?Tr.dark:""} ${Tr[d]} ${Tr.radioWrapper} ${Tr[a]??Tr.md} ${e?Tr.checked:""} ${i?Tr.disabled:""}`,style:o??{},onClick:f,children:[w.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),w.jsx("div",{style:s??{},className:Tr.radioState,children:w.jsx("div",{style:l??{},className:Tr.innerCircle})})]})},jP="Dropdown-module__dropdownWrapper",qP="Dropdown-module__placeHolder",YP="Dropdown-module__dropdownLabel",XP="Dropdown-module__required",ZP="Dropdown-module__dropdownContainer",JP="Dropdown-module__sm",QP="Dropdown-module__md",eL="Dropdown-module__selectedTags",tL="Dropdown-module__selectedList",iL="Dropdown-module__additional",nL="Dropdown-module__dropdownListContainer",rL="Dropdown-module__dropdownList",aL="Dropdown-module__hidden",oL="Dropdown-module__visible",sL="Dropdown-module__checkIcon",lL="Dropdown-module__disabled",uL="Dropdown-module__selected",dL="Dropdown-module__dropdownListFooter",cL="Dropdown-module__focused",hL="Dropdown-module__error",fL="Dropdown-module__dropdownHelperText",pL="Dropdown-module__Namespace_Hr",vL="Dropdown-module__dark",ei={dropdownWrapper:jP,placeHolder:qP,dropdownLabel:YP,required:XP,dropdownContainer:ZP,sm:JP,md:QP,selectedTags:eL,selectedList:tL,additional:iL,dropdownListContainer:nL,dropdownList:rL,hidden:aL,visible:oL,checkIcon:sL,disabled:lL,selected:uL,dropdownListFooter:dL,focused:cL,error:hL,dropdownHelperText:fL,namespaceHr:pL,dark:vL},_L=()=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:w.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"})}),mL=e=>w.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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"})}),TI=()=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:w.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"})}),__=({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:v,onFocus:g,onBlur:C,withClearAll:x=!0,withSelectAll:S=!0,withPlus:P=!1,searchComponent:D=!1,withFooter:$=!0,data:G,onSelect:z,selectedOptionID:q,withFilter:ie=!0,withClose:Z=!0,fixedDropdown:H=!0,onSearch:ee,pagination:I,withMultiSelect:U=!1,skipSelected:L,closeOnSelect:Y=!0,labelIcon:se,closeIcon:te,dropdownIcon:X,iconDown:j,onLabelIconClick:y,onLabelIconMouseEnter:T,onLabelIconMouseLeave:A,dropdownWrapperStyle:B,dropdownLabelStyle:R,requiredStyle:M,labelIconStyle:V,dropdownContainerStyle:J,placeHolderStyle:re,selectedTagsStyle:pe,selectedListStyle:ce,additionalStyle:Ae,additionalSpanStyle:b,dropdownListStyle:ae,listStyle:ue,treeProps:F,theme:N="light"})=>{const Q=tr(),[me,he]=le.useState(!1),[ne,be]=le.useState(!1),[De,Ie]=le.useState([]),[Ne,rt]=le.useState(""),[Je,wt]=le.useState(""),ht=le.useRef([]),Gt=le.useRef(null),mi=le.useRef(null),st=le.useRef({}),fi=le.useRef([]),Mi=(fe,K)=>{const we=new Set;return fe.filter(Re=>we.has(Re[K])?!1:(we.add(Re[K]),!0))},bt=fe=>{var K;st.current=fe,rt((K=st.current)==null?void 0:K.label),z&&typeof z=="function"&&z(st.current),be(!1)},fn=fe=>{ht.current=[...ht.current,...G.filter(K=>K.selected==!0),...G.filter(K=>K.id===fe.id)],fe.selected=!fe.selected,ht.current=Mi(ht.current,"id").filter(K=>K.selected),z&&typeof z=="function"&&z(ht.current),D||rt(ht.current.map(K=>K.label).join(", ")),he(K=>!K)},Ki=fe=>{fe.stopPropagation(),U||h?c&&(wt(""),fi.current=G,he(K=>!K)):(ht.current=[],q=null,G&&G.length>0&&G.forEach(K=>K.selected=!1),Vi(""),st.current={},z({}),rt("")),ee&&typeof ee=="function"&&ee("")},Vi=fe=>{if(ee&&typeof ee=="function"&&ee(fe),U&&c){let K=G,we=K.filter(Re=>{var qe;return(qe=Re==null?void 0:Re.label)==null?void 0:qe.toLowerCase().includes((fe==null?void 0:fe.toLowerCase())||"")});fi.current=(fe==null?void 0:fe.length)>0?we:K,wt(fe),he(Re=>!Re)}else wt(fe),rt(fe)},Ge=()=>{if(q||q===0){let fe=G.filter(K=>Number(K.id)===Number(q));fe&&fe[0]&&(st.current=fe[0],L?(ee&&typeof ee=="function"&&ee(st.current.label),rt(st.current.label),Y&&be(K=>!1)):bt(fe[0]))}},[ft,qt]=le.useState(!1),Ni=fe=>{let K=Gt.current.querySelector("ul"),Re=Math.abs(K.scrollTop+K.clientHeight-K.scrollHeight)<=2;I&&Re&&!ft&&(d&&typeof d=="function"&&d(!0),qt(!0)),Re||qt(!1)},We=()=>{G.forEach(fe=>{fe.selected=!1}),ht.current=[],z([],!0),rt(""),l&&typeof l=="function"&&l(),he(fe=>!fe)},It=()=>{G.forEach(fe=>{fe!=null&&fe.id&&(fe==null?void 0:fe.id)!==null&&(fe!=null&&fe.label)&&(fe==null?void 0:fe.label)!==""&&(fe==null?void 0:fe.label)!=="-"&&!fe.disabled&&(fe.selected=!0)}),ht.current=G,ht.current=Mi(ht.current,"id").filter(fe=>fe.selected),rt(ht.current.map(fe=>fe.label).join(", ")),u&&typeof u=="function"&&u(),z(ht.current,!0),he(fe=>!fe)},Di=le.useRef(!0);le.useEffect(()=>{if(Di.current){Di.current=!1;return}ne||C&&typeof C=="function"&&C()},[ne]);const _t=()=>{g&&typeof g=="function"&&g()},Mt=fe=>fe,Ir=fe=>{let K=!0,we=Ne;return ie&&fe&&!fe.toLowerCase().split(" ").join("").trim().includes(we.toLowerCase().split(" ").join("").trim())&&we.trim()!==""&&(K=!1),Je.length>0&&fe==="-"?"hidden":K?"visible":"hidden"},qo=fe=>{fe.composedPath().includes(Gt.current)||be(!1)},$a=fe=>{if(H){if(fe.composedPath().includes(Gt.current))return;be(!1)}},Ha=()=>{const fe=Gt.current,K=mi.current;if(!K||!fe)return;const we=fe.getBoundingClientRect(),Re=window.innerHeight;H?(K.style.position="fixed",K.style.width=we.width+"px",K.style.left=`${we.left+window.pageXOffset}px`,we.bottom+K.offsetHeight>Re?(K.style.top=`${window.scrollY+we.top-K.offsetHeight-8}px`,K.style.bottom="unset"):(K.style.top=`${window.scrollY+we.bottom}px`,K.style.bottom="unset")):we.bottom>Re?(K.style.top="unset",K.style.bottom="calc(100% + 8px)"):(K.style.bottom="unset",K.style.top="calc(100% + 8px)")},nl=fe=>{ht.current=fe,z&&typeof z=="function"&&z(fe)},rl=(fe,K)=>{v&&typeof v=="function"&&v(fe,K)},Ce=le.useRef(null);return le.useEffect(()=>{ne&&Ce.current&&Ce.current.focus()},[ne]),le.useEffect(()=>{U&&(ht.current=G.filter(fe=>fe.selected),rt(G.filter(fe=>fe.selected).map(fe=>fe.label).join(", ")))},[]),le.useEffect(()=>{D&&s&&s.length>0&&wt(s),fi.current=G},[]),le.useEffect(()=>{Ha()},[mi,ne]),le.useEffect(()=>{U||Ge()},[q]),le.useEffect(()=>(document.addEventListener("click",qo),document.addEventListener("wheel",$a),()=>{document.removeEventListener("click",qo),document.removeEventListener("wheel",$a)}),[]),w.jsxs("div",{className:`${N==="dark"?ei.dark:""} ${ei[Q]} ${ei.dropdownWrapper}`,style:B??{},children:[e&&w.jsxs("label",{className:ei.dropdownLabel,style:R??{},children:[typeof e=="function"?e():e," ",w.jsx("span",{className:ei.required,style:M??{},children:i&&"*"}),w.jsxs("span",{style:{...V??{},display:"grid",placeItems:"center"},onClick:()=>{y&&typeof y=="function"&&y()},onMouseEnter:()=>{T&&typeof T=="function"&&T()},onMouseLeave:()=>{A&&typeof A=="function"&&A()},children:[" ",Mt(se)]})]}),w.jsxs("div",{onFocus:_t,ref:Gt,onClick:()=>(be(fe=>!fe),Ha()),className:`${ei.dropdownContainer} ${ne&&!o?ei.focused:""} ${t?ei.disabled:""} ${a!=null&&a.error?ei.error:""} ${ei[n]}`,style:J??{},children:[D?w.jsxs("div",{children:[" ",w.jsx(TI,{})]}):w.jsx(w.Fragment,{children:X&&w.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:Mt(X)})}),!D&&(h||U)&&r&&!ne&&ht.current.length===0&&w.jsx("span",{className:ei.placeHolder,style:re??{},children:r??""}),(U||h)&&w.jsx("div",{className:ei.selectedTags,style:{width:!ne&&ht.current.length===0?0:"calc(100% - 2.25rem)",...pe??{}},children:!D&&!ne?w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[ht.current.slice(0,3).map((fe,K)=>{let we=ht.current[ht.current.length-1];return w.jsxs("span",{className:ei.selectedList,style:ce??{},children:[fe.label,fe.id!==we.id&&K!==2?",":"","  "]},fe==null?void 0:fe.id)}),ht.current.length>3&&w.jsxs("div",{className:ei.additional,style:b??{},children:["+",ht.current.length-3]})]}):w.jsx("input",{ref:Ce,onClick:fe=>(fe.stopPropagation(),be(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...D||c?{value:Je}:{},onChange:fe=>Vi(fe.target.value)},q)}),w.jsx("input",{autoCorrect:"off",hidden:U||h,placeholder:r,readOnly:!ie||!ne||U||h,type:"text",value:(U||h)&&!D&&ne?"":Ne,onChange:fe=>Vi(fe.target.value)},q),G&&G.length>0&&ne&&w.jsxs("div",{ref:mi,onClick:fe=>fe.stopPropagation(),className:ei.dropdownListContainer,children:[h?w.jsx(iB,{SearchValue:Je,expandedNodes:De,setExpandedNodes:Ie,checkboxProps:p,onSelect:nl,withClearAll:x,withSelectAll:S,SelectedData:ht.current,fromDropdown:!0,onCollapse:rl,defaultCollapsed:f,data:G,theme:N,treeProps:F}):w.jsx("ul",{onScroll:fe=>Ni(),onClick:fe=>fe.stopPropagation(),className:ei.dropdownList,style:ae??{},children:(U&&ie?fi.current:G).map(fe=>{var K,we,Re,qe;return w.jsxs("li",{style:ue??{},className:`${!U&&c?ei[Ir((fe==null?void 0:fe.label)??"-")]:""} ${!(fe!=null&&fe.label)||fe.label===void 0||fe!=null&&fe.disabled?ei.disabled:""} ${(U?fe.selected:(K=st.current)!=null&&K.id&&((we=st.current)==null?void 0:we.id)===fe.id)?ei.selected:""}`,onClick:()=>{U?fn(fe):bt(fe)},children:[w.jsxs("p",{children:[" ",fe!=null&&fe.customLabel?fe.customLabel():(fe==null?void 0:fe.label)??"-"]}),P?w.jsx(w.Fragment,{children:fe.selected?w.jsx(mL,{}):w.jsx(_L,{})}):(U?fe.selected:((Re=st.current)==null?void 0:Re.id)&&((qe=st.current)==null?void 0:qe.id)===fe.id)&&w.jsx("span",{className:ei.checkIcon,children:w.jsx(wI,{color:Q==="namespaceHr"?"#32B45F":"#7F56D9",width:20,height:20})})]},fe==null?void 0:fe.id)})}),U&&$&&w.jsxs("div",{className:ei.dropdownListFooter,children:[S&&Je===""&&w.jsx("span",{onClick:It,children:"Select All"}),x&&w.jsx("span",{onClick:We,children:"Clear All"})]})]}),Z&&(U?ne?Je.length>0:!1:Ne.length>0||Je.length>0)&&w.jsx("div",{onClick:fe=>Ki(fe),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:te?Mt(te):w.jsx(ku,{width:16,height:16})}),j?Mt(j):w.jsx("div",{style:{display:"grid",placeItems:"center",transform:ne?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!D&&w.jsx(Ru,{})})]}),a&&(a==null?void 0:a.visible)&&w.jsx("div",{className:`${ei.dropdownHelperText} ${a!=null&&a.error?ei.error:""}`,children:!ne&&w.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},gL="Tooltip-module__tooltipContainer",CL="Tooltip-module__tooltipContent",yL="Tooltip-module__withoutPointer",xL="Tooltip-module__top",bL="Tooltip-module__right",SL="Tooltip-module__bottom",EL="Tooltip-module__left",wL="Tooltip-module__tooltipTitle",IL="Tooltip-module__tooltipText",TL="Tooltip-module__dark",Gn={tooltipContainer:gL,tooltipContent:CL,withoutPointer:yL,top:xL,right:bL,bottom:SL,left:EL,tooltipTitle:wL,tooltipText:IL,dark:TL},qc=({children:e,tooltipSlot:t,delay:i=400,triggerClear:n=!1,placement:r="top",trigger:a="hover",title:o,text:s,customText:l,tooltipContentStyle:u,tooltipTitlestyle:d,tooltipTextStyle:c,tooltipContainerStyle:h,pointerPosition:f="10%",withPointer:p=!1,theme:v,topCustomOffset:g=0,bottomCustomOffset:C=0,leftCustomOffset:x=0,rightCustomOffset:S=0,forceClose:P=!1,openTooltip:D=!0,onClick:$,onVisibilityChange:G})=>{const z=le.useRef(null),q=le.useRef(null);let ie;const[Z,H]=le.useState(!1),ee=t||o||s||l,I=()=>{a==="hover"&&ee&&(ie=setTimeout(()=>{H(!0)},i))},U=()=>{a==="hover"&&(clearTimeout(ie),setTimeout(()=>{H(!1)},i))},L=()=>{a==="click"&&($&&typeof $=="function"&&$(),H(se=>!se))},Y=()=>{const se=z.current,te=q.current;if(!te||!se)return;const X=se.getBoundingClientRect();switch(te.style.position="fixed",r){case"top":te.style.top=`${X.top-te.offsetHeight-8}px`,te.style.left=`${X.left+g}px`;break;case"bottom":te.style.top=`${X.bottom+8}px`,te.style.left=`${X.left+C}px`;break;case"left":te.style.top=`${X.top+X.height/2-te.offsetHeight/2}px`,te.style.left=`${X.left-te.offsetWidth-8+x}px`;break;case"right":te.style.top=`${X.top+X.height/2-te.offsetHeight/2}px`,te.style.left=`${X.right+8+S}px`;break}};return le.useEffect(()=>{Y()},[z,Z,e,r,t,l,o,s]),le.useEffect(()=>{const se=X=>{var y;((y=z.current)==null?void 0:y.contains(X.target))||H(!1)},te=X=>{X.composedPath().includes(z.current)||H(!1)};return document.addEventListener("click",te),document.addEventListener("scroll",se,!0),()=>{document.removeEventListener("scroll",se,!0),document.removeEventListener("click",te)}},[]),le.useEffect(()=>{P&&H(!1)},[P]),le.useEffect(()=>{const se=q.current;se&&(se.style.setProperty("--pointer-position",`${f}`),p||se.classList.add(Gn.withoutPointer))},[Z]),le.useEffect(()=>{G&&typeof G=="function"&&G(Z)},[Z,G]),w.jsxs("div",{ref:z,className:`${v==="dark"?Gn.dark:""} ${Gn.tooltipContainer}`,onClick:L,onMouseEnter:I,onMouseLeave:U,style:h??{},children:[e,Z&&t?w.jsx("div",{style:u??{},onClick:se=>se.stopPropagation(),ref:q,className:`${Gn.tooltipContent} ${r?Gn[r]:Gn.bottom}`,children:t()}):Z&&w.jsxs("div",{style:u??{},onClick:se=>se.stopPropagation(),ref:q,className:`${Gn.tooltipContent} ${r?Gn[r]:Gn.bottom}`,children:[l&&typeof l=="function"&&l(),o&&o.length>0&&w.jsx("h2",{className:Gn.tooltipTitle,style:d??{},children:o}),s&&s.length>0&&w.jsx("p",{className:Gn.tooltipText,style:c??{},children:s})]})]})},AL="Popup-module__modalOverlay",DL="Popup-module__popupDrawerMode",OL="Popup-module__popupContainer",RL="Popup-module__closeButton",kL="Popup-module__withOptions",BL="Popup-module__horizontal",PL="Popup-module__popupHeader",LL="Popup-module__popupTitle",FL="Popup-module__popupDescription",ML="Popup-module__typeIcon",VL="Popup-module__icon",NL="Popup-module__templateWrapper",$L="Popup-module__dark",pn={modalOverlay:AL,popupDrawerMode:DL,popupContainer:OL,closeButton:RL,withOptions:kL,horizontal:BL,popupHeader:PL,popupTitle:LL,popupDescription:FL,typeIcon:ML,icon:VL,templateWrapper:NL,dark:$L},HL=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]},WL=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),zL=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 AI=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},GL=()=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:w.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"})}),UL=()=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:w.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})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:w.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"})}),DI=({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 w.jsx(zm,{});case"unsaved":return w.jsx(UL,{});case"success":return w.jsx(GL,{})}},v=()=>{a&&typeof a=="function"&&a(!1)},g=le.useRef(null),C=x=>{x.target===g.current&&r&&typeof r=="function"&&r(!1)};return le.useEffect(()=>(document.addEventListener("click",C),()=>{document.removeEventListener("click",C)}),[]),e&&w.jsx("div",{ref:g,style:s??{},className:`
39
+ `,onClick:()=>{!a&&n&&typeof n=="function"&&n()},children:w.jsxs("div",{className:nr.buttonSlot,style:!a&&p?p:{},children:[d||s&&l?l:"",!d&&w.jsx(w.Fragment,{children:o?w.jsx("div",{style:{display:"grid",placeItems:"center"},children:w.jsx(lB,{loadingColor:v})}):w.jsx("span",{style:!a&&h?h:{},className:nr.buttonLabel,children:e??"Button"})}),s&&u?u:""]})})},AB="FormInput-module__inputWrapper",DB="FormInput-module__inputLabel",OB="FormInput-module__required",RB="FormInput-module__inputContainer",kB="FormInput-module__inputContent",BB="FormInput-module__inputTags",PB="FormInput-module__focused",LB="FormInput-module__error",FB="FormInput-module__rightIcon",MB="FormInput-module__leftIcon",VB="FormInput-module__inputDropDown",NB="FormInput-module__http",$B="FormInput-module__disabled",HB="FormInput-module__sm",WB="FormInput-module__md",zB="FormInput-module__withCopy",GB="FormInput-module__inputHelperText",UB="FormInput-module__Namespace_Hr",KB="FormInput-module__dark",Yt={inputWrapper:AB,inputLabel:DB,required:OB,inputContainer:RB,inputContent:kB,inputTags:BB,focused:PB,error:LB,rightIcon:FB,leftIcon:MB,inputDropDown:VB,http:NB,disabled:$B,sm:HB,md:WB,withCopy:zB,inputHelperText:GB,namespaceHr:UB,dark:KB},Ru=({width:e,height:t,color:i})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"12",height:t??"8",viewBox:"0 0 12 8",fill:"none",children:w.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:i??"#A4A7AE",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),jB=({width:e,height:t,color:i})=>w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"20",height:t??"20",viewBox:"0 0 20 20",fill:"none",children:[w.jsx("g",{clipPath:"url(#clip0_444_26)",children:w.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"})}),w.jsx("defs",{children:w.jsx("clipPath",{id:"clip0_444_26",children:w.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),ku=e=>w.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:w.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"})}),qB="Checkbox-module__checkboxWrapper",YB="Checkbox-module__sm",XB="Checkbox-module__md",ZB="Checkbox-module__checkMark",JB="Checkbox-module__checked",QB="Checkbox-module__disabled",eP="Checkbox-module__Namespace_Hr",tP="Checkbox-module__dark",za={checkboxWrapper:qB,sm:YB,md:XB,checkMark:ZB,checked:JB,disabled:QB,namespaceHr:eP,dark:tP},wI=({color:e,width:t,height:i})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t??"12",height:i??"12",viewBox:"0 0 12 12",fill:"none",children:w.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:e??"white",strokeWidth:"1.6666",strokeLinecap:"round",strokeLinejoin:"round"})}),iP=e=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",...e,width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:w.jsx("path",{d:"M1.5 1H8.5",stroke:"white",strokeWidth:"1.66666",strokeLinecap:"round",strokeLinejoin:"round"})}),Bu=({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=tr(),c=le.useRef(null),[h,f]=le.useState(!1),p=()=>{i||t&&typeof t=="function"&&t(!e)},v=()=>h?i?{boxShadow:"none"}:o??{}:s??{};return w.jsxs("div",{style:v(),className:` ${u==="dark"?za.dark:""} ${za[d]} ${za.checkboxWrapper} ${za[a]} ${e?za.checked:za.unChecked} ${i?za.disabled:""}`,onMouseDown:()=>f(!0),onMouseUp:()=>f(!1),onMouseLeave:()=>f(!1),onClick:p,children:[w.jsx("input",{ref:c,type:"checkbox",disabled:i,checked:e,hidden:!0,readOnly:!0,required:n??!1}),e?r?w.jsx(iP,{}):w.jsx(wI,{}):""]})},nP="Tag-module__tagContainer",rP="Tag-module__onlyLabel",aP="Tag-module__sm",oP="Tag-module__md",sP="Tag-module__lg",lP="Tag-module__tagLabel",uP="Tag-module__tagNumber",dP="Tag-module__tagClose",cP="Tag-module__dark",Ga={tagContainer:nP,onlyLabel:rP,sm:aP,md:oP,lg:sP,tagLabel:lP,tagNumber:uP,tagClose:dP,dark:cP},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:v})=>{const g=()=>!r&&!i&&!n&&!a,C=()=>i,x=()=>{d&&typeof d=="function"&&d(e??null)};return w.jsxs("div",{style:c??{},className:`${v==="dark"?Ga.dark:""} ${Ga.tagContainer} ${g()?Ga.onlyLabel:""} ${Ga[u??"md"]}`,children:[r&&w.jsx(Bu,{...s}),i&&C(),t&&w.jsx("p",{style:h??{},className:Ga.tagLabel,children:t??""}),a&&w.jsx("div",{style:f??{},className:Ga.tagNumber,children:o??""}),n&&w.jsx("div",{style:p??{},className:Ga.tagClose,onClick:x,children:w.jsx(ku,{width:(p==null?void 0:p.width)??"14",height:(p==null?void 0:p.height)??"14",color:(p==null?void 0:p.color)??"#A4A7AE"})})]})},Jl=({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,customAction:v,onRightIconIconClick:g,onRightIconIconMouseEnter:C,onRightIconIconMouseLeave:x,onLeftIconIconClick:S,onLeftIconIconMouseEnter:P,onLeftIconIconMouseLeave:D,onPressEnter:$,rightIcon:G,leftIcon:z,fixedDropdown:q=!0,withDropDown:ie,dropdownData:Z,dropDownPosition:H="left",onSelectData:ee,withTags:I,tagProps:U,withLink:L,withCopy:Y,onCopy:se,inputWrapperStyle:te,inputLabelStyle:X,requiredStyle:j,inputContainerStyle:y,leftIconStyle:T,customActionStyle:A,inputDropDownStyle:B,ulStyle:R,liStyle:M,httpStyle:V,inputStyle:J,rightIconStyle:re,withCopyStyle:pe,inputHelperTextStyle:ce,theme:Ae="light"})=>{const b=tr(),[ae,ue]=le.useState(!1),F=le.useRef(null),[N,Q]=le.useState(!1),[me,he]=le.useState(!1),ne=le.useRef(null),be=le.useRef(null),De=le.useRef(null),[Ie,Ne]=le.useState(!1),[rt,Je]=le.useState(1),wt=Ge=>{let ft=Ge.target.value;ft.length===1&&(ft=ft.trim()),s&&typeof s=="function"&&s(f?ft.replace(/\d/g,""):ft)},ht=()=>{Q(!0),l&&typeof l=="function"&&l()},Gt=()=>{Q(!1),u&&typeof u=="function"&&u()},mi=Ge=>{const ft=Ge.target.value,qt=ft.length===0;a==="number"&&(Ge.keyCode===69||!qt&&(Ge.keyCode===187||Ge.keyCode===107||Ge.keyCode===189||Ge.keyCode===109))&&Ge.preventDefault(),Ge.key==="Enter"&&ft&&ft.length>0&&$&&typeof $=="function"&&$(ft)},st=()=>{se&&typeof se=="function"&&se(e)},fi=Ge=>Ge,Mi=()=>{let Ge={};return(Y||v)&&(Ge.borderTopRightRadius=0,Ge.borderBottomRightRadius=0,Ge.borderRight=0),ie&&(H==="right"?Ge.flexDirection="row-reverse":ie&&(Ge.paddingLeft=0)),{...Ge,...y??{}}},bt=Ge=>{!Ge.composedPath().includes(be.current)&&Ge.composedPath().includes(ne.current)||Ne(!1)},fn=Ge=>{Je(Ge.id),Ne(!1),ee&&typeof ee=="function"&&ee(Ge)},Ki=()=>{const Ge=De.current,ft=be.current;if(!ft||!Ge)return;const qt=Ge.getBoundingClientRect(),Ni=window.innerHeight,We=80;q&&(ft.style.position="fixed",ft.style.width=We+"px",H==="right"?ft.style.left=`${qt.right-We/2}px`:ft.style.left=`${qt.left+We/2}px`,qt.bottom+ft.offsetHeight>Ni?(ft.style.top=`${window.scrollY+qt.top-ft.offsetHeight}px`,ft.style.bottom="unset"):(ft.style.top=`${window.scrollY+qt.bottom}px`,ft.style.bottom="unset"))};le.useEffect(()=>{Ki()},[be,Ie]),le.useEffect(()=>(document.addEventListener("click",bt),()=>{document.removeEventListener("click",bt)}),[]);const Vi=le.useRef(!1);return le.useEffect(()=>{Vi.current?setTimeout(()=>{ue(Ge=>!Ge)},0):Vi.current=!0},[]),w.jsxs("div",{className:`${Ae==="dark"?Yt.dark:""} ${Yt[b]} ${Yt.inputWrapper}`,style:te??{},children:[t&&w.jsxs("label",{className:Yt.inputLabel,style:X??{},children:[typeof t=="function"?t():t,w.jsx("span",{className:Yt.required,style:j??{},children:n&&"*"})]}),w.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[w.jsxs("div",{style:Mi(),ref:De,className:`${Yt.inputContainer} ${N&&!c?Yt.focused:""} ${r?Yt.disabled:""} ${d!=null&&d.error?Yt.error:""} ${Yt[o??"sm"]}`,children:[!ie&&!L&&z&&w.jsx("div",{className:Yt.leftIcon,style:T??{},onClick:()=>{S&&typeof S=="function"&&S()},onMouseEnter:()=>{P&&typeof P=="function"&&P()},onMouseLeave:()=>{D&&typeof D=="function"&&D()},children:fi(z)}),!L&&ie&&w.jsxs("div",{className:Yt.inputDropDown,style:B??{},onClick:()=>(Ne(!0),Ki()),ref:ne,children:[Z.find(Ge=>Ge.id===rt).label,Ie&&w.jsx("ul",{ref:be,style:R??{},children:Z&&Z.length&&Z.map((Ge,ft)=>w.jsx("li",{style:M??{},onClick:()=>fn(Ge),children:(Ge==null?void 0:Ge.label)??"-"},Ge.id))}),w.jsx(Ru,{})]}),L&&w.jsx("div",{className:`${Yt.inputDropDown} ${Yt.http}`,style:V??{},onClick:()=>Ne(!0),ref:ne,children:"http://"}),w.jsxs("div",{className:Yt.inputContent,children:[I&&p&&p.length>0&&w.jsx("div",{className:Yt.inputTags,children:p.map((Ge,ft)=>w.jsx("div",{className:Yt.inputSingleTags,children:w.jsx(Wm,{...U,id:Ge,label:Ge,withClose:!0})},ft))}),w.jsx("input",{ref:F,style:J??{},type:a??"text",value:e,onChange:Ge=>wt(Ge),onFocus:ht,onBlur:Gt,disabled:r,required:n,onKeyDown:mi,readOnly:c,spellCheck:!1,placeholder:i??"",autoComplete:"off",maxLength:h})]}),G&&w.jsx("div",{className:Yt.rightIcon,style:re??{},onClick:()=>{g&&typeof g=="function"&&g()},onMouseEnter:()=>{C&&typeof C=="function"&&C()},onMouseLeave:()=>{x&&typeof x=="function"&&x()},children:fi(G)})]}),Y&&w.jsxs("div",{style:pe??{},onClick:st,className:`${Yt.withCopy} ${N?Yt.focused:""}`,children:[w.jsx(jB,{}),w.jsx("span",{children:"Copy"})]}),v&&w.jsx("div",{style:A??{},className:`${Yt.withCopy} ${N?Yt.focused:""}`,children:v()})]}),d&&(d==null?void 0:d.visible)&&w.jsx("div",{style:ce??{},className:`${Yt.inputHelperText} ${d!=null&&d.error?Yt.error:""}`,children:w.jsx("p",{style:(d==null?void 0:d.style)??{},children:d.text})})]})},hP="Textarea-module__textareaContainer",fP="Textarea-module__textAreaLabel",pP="Textarea-module__required",vP="Textarea-module__wrap",_P="Textarea-module__resize",mP="Textarea-module__textarea",gP="Textarea-module__focused",CP="Textarea-module__disabled",yP="Textarea-module__error",xP="Textarea-module__popupEmojiContainer",bP="Textarea-module__popupEmojiIcon",SP="Textarea-module__popupEmojiList",EP="Textarea-module__popupEmojiItem",wP="Textarea-module__helperTextStyle",IP="Textarea-module__namespaceHr",TP="Textarea-module__dark",gi={textareaContainer:hP,textAreaLabel:fP,required:pP,wrap:vP,resize:_P,textarea:mP,focused:gP,disabled:CP,error:yP,popupEmojiContainer:xP,popupEmojiIcon:bP,popupEmojiList:SP,popupEmojiItem:EP,helperTextStyle:wP,namespaceHr:IP,dark:TP},AP=()=>w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[w.jsx("g",{clipPath:"url(#clip0_23326_3835)",children:w.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"})}),w.jsx("defs",{children:w.jsx("clipPath",{id:"clip0_23326_3835",children:w.jsx("rect",{width:"20",height:"20",fill:"white"})})})]}),DP=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😙 ","😚","😋","😛","😎","🥳","😢","😭","😤","😠","😡","🤬","🤯","👋"],OP=({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:v,requiredStyle:g,textareaStyle:C,focusStyle:x,textareaHelperTextStyle:S,labelIcon:P,theme:D})=>{const $=tr(),[G,z]=le.useState(!1),[q,ie]=le.useState(!1),Z=le.useRef(null),H=le.useRef(null),ee=le.useRef(null),I=B=>{let R=B.target.value;u&&typeof u=="function"&&u(R)},U=B=>B,L=()=>{z(!0),d&&typeof d=="function"&&d()},Y=()=>{z(!1),c&&typeof c=="function"&&c()},se=B=>{const R=Z.current.querySelector("textarea");if(!R)return;const M=R.selectionStart,V=R.selectionEnd,J=R.scrollTop,re=a.slice(0,M)+B+a.slice(V);u&&typeof u=="function"&&u(re),setTimeout(()=>{R.focus(),R.setSelectionRange(M+B.length,M+B.length),R.scrollTop=J},0)},te=()=>{const B=Z.current,R=ee.current;if(!R||!B)return;const M=B.getBoundingClientRect(),V=220,J=window.innerHeight-M.bottom;M.top,J>=V?(R.style.top="calc(100% + 8px)",R.style.bottom="unset"):(R.style.bottom="calc(100% + 8px)",R.style.top="unset"),M.right>window.innerWidth?R.style.left=`calc(100% - ${M.width}px)`:M.left<0?R.style.left="0px":R.style.left=""};le.useEffect(()=>(q&&(te(),document.addEventListener("mousedown",X)),()=>{document.removeEventListener("mousedown",X)}),[q]);const X=B=>{H.current&&!H.current.contains(B.target)&&ie(!1)};le.useEffect(()=>(q&&document.addEventListener("mousedown",X),()=>{document.removeEventListener("mousedown",X)}),[q]);let j=!1;le.useEffect(()=>{var J;const B=(J=Z.current)==null?void 0:J.querySelector("textarea");if(!B)return;let R=!1;const M=re=>{const pe=B.getBoundingClientRect();re.clientX>pe.right-20&&re.clientY>pe.bottom-20&&(R=!0)},V=new ResizeObserver(()=>{R&&(j=!0,R=!1)});return B.addEventListener("mousedown",M),V.observe(B),()=>{B.removeEventListener("mousedown",M),V.disconnect()}},[]);const y=()=>{const B=Z.current.querySelector("textarea");!B||j||(B.style.height="auto",B.style.height=`${B.scrollHeight}px`)};le.useEffect(()=>{const B=Z.current.querySelector("textarea"),R=new ResizeObserver(()=>{j=B.offsetHeight<B.scrollHeight});return R.observe(B),()=>R.disconnect()},[]);const T=B=>{j=!1,u==null||u(B.target.value),y()},A=()=>{let B=C??{};return x&&(B={...B,...x??{}}),B};return w.jsxs("div",{style:p??{},className:`${D==="dark"?gi.dark:""} ${$==="namespaceHr"?gi.namespaceHr:""} ${gi.textareaContainer} ${i!=null&&i.type&&(i!=null&&i.visible)?gi[i==null?void 0:i.type]:""} ${h?gi.disabled:null}`,children:[t&&w.jsxs("div",{style:v,className:gi.textAreaLabel,children:[w.jsx("p",{children:t}),w.jsx("span",{style:g??{},className:gi.required,children:f&&"*"}),P&&U(P)]}),w.jsxs("div",{className:`${gi.wrap} ${l?gi.resize:""}`,ref:Z,children:[w.jsx("textarea",{style:A(),className:`${gi.textarea} ${G?gi.focused:""} ${h?gi.disabled:""} ${i!=null&&i.error?gi.error:""} `,value:a,placeholder:e??"",cols:n??"30",rows:r??"5",maxLength:s??null,onInput:T,onFocus:L,disabled:h,onBlur:q?()=>{}:Y,onChange:I,onResize:()=>{console.log("resize")}}),o&&w.jsxs("div",{ref:H,className:gi.popupEmojiContainer,children:[w.jsx("div",{className:gi.popupEmojiIcon,onClick:B=>{B.preventDefault(),z(!0),ie(R=>!R)},children:w.jsx(AP,{})}),q&&w.jsx("div",{ref:ee,className:gi.popupEmojiList,children:DP.map((B,R)=>w.jsx("div",{onClick:M=>{M.preventDefault(),se(B)},className:gi.popupEmojiItem,children:B},R))})]})]}),i&&(i==null?void 0:i.text)&&(i==null?void 0:i.text.length)>0&&w.jsx("div",{style:S??{},className:`${gi.helperTextStyle} ${i!=null&&i.error?gi.error:""}`,children:w.jsx("p",{style:(i==null?void 0:i.style)??{},children:i.text})})]})},RP="Toggle-module__toggleWrapper",kP="Toggle-module__toggleState",BP="Toggle-module__checked",PP="Toggle-module__disabled",LP="Toggle-module__Namespace_Hr",FP="Toggle-module__dark",Xo={toggleWrapper:RP,toggleState:kP,checked:BP,disabled:PP,namespaceHr:LP,dark:FP},MP=({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=tr(),[p,v]=le.useState(!1),g=()=>{!i&&t&&typeof t=="function"&&t(!e)},C=()=>{if(p)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{}},x=()=>{if(e){if(d)return d}else if(e){if(i&&c)return c}else if(u)return u;return{}};return w.jsx("div",{style:C(),onMouseDown:()=>v(!0),onMouseUp:()=>v(!1),onMouseLeave:()=>v(!1),onClick:g,className:`${h==="dark"?Xo.dark:""} ${Xo[f]} ${Xo.toggleWrapper} ${e?Xo.checked:""} ${i?Xo.disabled:""}`,children:w.jsx("div",{style:x(),className:Xo.toggleState,children:w.jsx("input",{type:"checkbox",checked:e,readOnly:!0,disabled:i??!1,hidden:!0,required:n??!1})})})},VP="Radio-module__radioWrapper",NP="Radio-module__sm",$P="Radio-module__md",HP="Radio-module__checked",WP="Radio-module__innerCircle",zP="Radio-module__radioState",GP="Radio-module__disabled",UP="Radio-module__Namespace_Hr",KP="Radio-module__dark",Tr={radioWrapper:VP,sm:NP,md:$P,checked:HP,innerCircle:WP,radioState:zP,disabled:GP,namespaceHr:UP,dark:KP},II=({checked:e,change:t,disabled:i,required:n,withUncheckState:r=!1,size:a,radioWrapperStyle:o,radioStateStyle:s,innerCircleStyle:l,theme:u="light"})=>{const d=tr(),[c,h]=le.useState(!1),f=()=>{t&&typeof t=="function"&&t(r?!e:!0)};return w.jsxs("div",{className:`${u==="dark"?Tr.dark:""} ${Tr[d]} ${Tr.radioWrapper} ${Tr[a]??Tr.md} ${e?Tr.checked:""} ${i?Tr.disabled:""}`,style:o??{},onClick:f,children:[w.jsx("input",{type:"radio",checked:!0,readOnly:!0,hidden:!0,disabled:i??!1,required:n}),w.jsx("div",{style:s??{},className:Tr.radioState,children:w.jsx("div",{style:l??{},className:Tr.innerCircle})})]})},jP="Dropdown-module__dropdownWrapper",qP="Dropdown-module__placeHolder",YP="Dropdown-module__dropdownLabel",XP="Dropdown-module__required",ZP="Dropdown-module__dropdownContainer",JP="Dropdown-module__sm",QP="Dropdown-module__md",eL="Dropdown-module__selectedTags",tL="Dropdown-module__selectedList",iL="Dropdown-module__additional",nL="Dropdown-module__dropdownListContainer",rL="Dropdown-module__dropdownList",aL="Dropdown-module__hidden",oL="Dropdown-module__visible",sL="Dropdown-module__checkIcon",lL="Dropdown-module__disabled",uL="Dropdown-module__selected",dL="Dropdown-module__dropdownListFooter",cL="Dropdown-module__focused",hL="Dropdown-module__error",fL="Dropdown-module__dropdownHelperText",pL="Dropdown-module__Namespace_Hr",vL="Dropdown-module__dark",ei={dropdownWrapper:jP,placeHolder:qP,dropdownLabel:YP,required:XP,dropdownContainer:ZP,sm:JP,md:QP,selectedTags:eL,selectedList:tL,additional:iL,dropdownListContainer:nL,dropdownList:rL,hidden:aL,visible:oL,checkIcon:sL,disabled:lL,selected:uL,dropdownListFooter:dL,focused:cL,error:hL,dropdownHelperText:fL,namespaceHr:pL,dark:vL},_L=()=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.5rem",height:"1.5rem",fill:"none",viewBox:"0 0 20 20",children:w.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"})}),mL=e=>w.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.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"})}),TI=()=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:w.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"})}),__=({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:v,onFocus:g,onBlur:C,withClearAll:x=!0,withSelectAll:S=!0,withPlus:P=!1,searchComponent:D=!1,withFooter:$=!0,data:G,onSelect:z,selectedOptionID:q,withFilter:ie=!0,withClose:Z=!0,fixedDropdown:H=!0,onSearch:ee,pagination:I,withMultiSelect:U=!1,skipSelected:L,closeOnSelect:Y=!0,labelIcon:se,closeIcon:te,dropdownIcon:X,iconDown:j,onLabelIconClick:y,onLabelIconMouseEnter:T,onLabelIconMouseLeave:A,dropdownWrapperStyle:B,dropdownLabelStyle:R,requiredStyle:M,labelIconStyle:V,dropdownContainerStyle:J,placeHolderStyle:re,selectedTagsStyle:pe,selectedListStyle:ce,additionalStyle:Ae,additionalSpanStyle:b,dropdownListStyle:ae,listStyle:ue,treeProps:F,theme:N="light"})=>{const Q=tr(),[me,he]=le.useState(!1),[ne,be]=le.useState(!1),[De,Ie]=le.useState([]),[Ne,rt]=le.useState(""),[Je,wt]=le.useState(""),ht=le.useRef([]),Gt=le.useRef(null),mi=le.useRef(null),st=le.useRef({}),fi=le.useRef([]),Mi=(fe,K)=>{const we=new Set;return fe.filter(Re=>we.has(Re[K])?!1:(we.add(Re[K]),!0))},bt=fe=>{var K;st.current=fe,rt((K=st.current)==null?void 0:K.label),z&&typeof z=="function"&&z(st.current),be(!1)},fn=fe=>{ht.current=[...ht.current,...G.filter(K=>K.selected==!0),...G.filter(K=>K.id===fe.id)],fe.selected=!fe.selected,ht.current=Mi(ht.current,"id").filter(K=>K.selected),z&&typeof z=="function"&&z(ht.current),D||rt(ht.current.map(K=>K.label).join(", ")),he(K=>!K)},Ki=fe=>{fe.stopPropagation(),U||h?c&&(wt(""),fi.current=G,he(K=>!K)):(ht.current=[],q=null,G&&G.length>0&&G.forEach(K=>K.selected=!1),Vi(""),st.current={},z({}),rt("")),ee&&typeof ee=="function"&&ee("")},Vi=fe=>{if(ee&&typeof ee=="function"&&ee(fe),U&&c){let K=G,we=K.filter(Re=>{var qe;return(qe=Re==null?void 0:Re.label)==null?void 0:qe.toLowerCase().includes((fe==null?void 0:fe.toLowerCase())||"")});fi.current=(fe==null?void 0:fe.length)>0?we:K,wt(fe),he(Re=>!Re)}else wt(fe),rt(fe)},Ge=()=>{if(q||q===0){let fe=G.filter(K=>Number(K.id)===Number(q));fe&&fe[0]&&(st.current=fe[0],L?(ee&&typeof ee=="function"&&ee(st.current.label),rt(st.current.label),Y&&be(K=>!1)):bt(fe[0]))}},[ft,qt]=le.useState(!1),Ni=fe=>{let K=Gt.current.querySelector("ul"),Re=Math.abs(K.scrollTop+K.clientHeight-K.scrollHeight)<=2;I&&Re&&!ft&&(d&&typeof d=="function"&&d(!0),qt(!0)),Re||qt(!1)},We=()=>{G.forEach(fe=>{fe.selected=!1}),ht.current=[],z([],!0),rt(""),l&&typeof l=="function"&&l(),he(fe=>!fe)},It=()=>{G.forEach(fe=>{fe!=null&&fe.id&&(fe==null?void 0:fe.id)!==null&&(fe!=null&&fe.label)&&(fe==null?void 0:fe.label)!==""&&(fe==null?void 0:fe.label)!=="-"&&!fe.disabled&&(fe.selected=!0)}),ht.current=G,ht.current=Mi(ht.current,"id").filter(fe=>fe.selected),rt(ht.current.map(fe=>fe.label).join(", ")),u&&typeof u=="function"&&u(),z(ht.current,!0),he(fe=>!fe)},Di=le.useRef(!0);le.useEffect(()=>{if(Di.current){Di.current=!1;return}ne||C&&typeof C=="function"&&C()},[ne]);const _t=()=>{g&&typeof g=="function"&&g()},Mt=fe=>fe,Ir=fe=>{let K=!0,we=Ne;return ie&&fe&&!fe.toLowerCase().split(" ").join("").trim().includes(we.toLowerCase().split(" ").join("").trim())&&we.trim()!==""&&(K=!1),Je.length>0&&fe==="-"?"hidden":K?"visible":"hidden"},qo=fe=>{fe.composedPath().includes(Gt.current)||be(!1)},$a=fe=>{if(H){if(fe.composedPath().includes(Gt.current))return;be(!1)}},Ha=()=>{const fe=Gt.current,K=mi.current;if(!K||!fe)return;const we=fe.getBoundingClientRect(),Re=window.innerHeight;H?(K.style.position="fixed",K.style.width=we.width+"px",K.style.left=`${we.left+window.pageXOffset}px`,we.bottom+K.offsetHeight>Re?(K.style.top=`${window.scrollY+we.top-K.offsetHeight-8}px`,K.style.bottom="unset"):(K.style.top=`${window.scrollY+we.bottom}px`,K.style.bottom="unset")):we.bottom>Re?(K.style.top="unset",K.style.bottom="calc(100% + 8px)"):(K.style.bottom="unset",K.style.top="calc(100% + 8px)")},nl=fe=>{ht.current=fe,z&&typeof z=="function"&&z(fe)},rl=(fe,K)=>{v&&typeof v=="function"&&v(fe,K)},Ce=le.useRef(null);return le.useEffect(()=>{ne&&Ce.current&&Ce.current.focus()},[ne]),le.useEffect(()=>{U&&(ht.current=G.filter(fe=>fe.selected),rt(G.filter(fe=>fe.selected).map(fe=>fe.label).join(", ")))},[]),le.useEffect(()=>{D&&s&&s.length>0&&wt(s),fi.current=G},[]),le.useEffect(()=>{Ha()},[mi,ne]),le.useEffect(()=>{U||Ge()},[q]),le.useEffect(()=>(document.addEventListener("click",qo),document.addEventListener("wheel",$a),()=>{document.removeEventListener("click",qo),document.removeEventListener("wheel",$a)}),[]),w.jsxs("div",{className:`${N==="dark"?ei.dark:""} ${ei[Q]} ${ei.dropdownWrapper}`,style:B??{},children:[e&&w.jsxs("label",{className:ei.dropdownLabel,style:R??{},children:[typeof e=="function"?e():e," ",w.jsx("span",{className:ei.required,style:M??{},children:i&&"*"}),w.jsxs("span",{style:{...V??{},display:"grid",placeItems:"center"},onClick:()=>{y&&typeof y=="function"&&y()},onMouseEnter:()=>{T&&typeof T=="function"&&T()},onMouseLeave:()=>{A&&typeof A=="function"&&A()},children:[" ",Mt(se)]})]}),w.jsxs("div",{onFocus:_t,ref:Gt,onClick:()=>(be(fe=>!fe),Ha()),className:`${ei.dropdownContainer} ${ne&&!o?ei.focused:""} ${t?ei.disabled:""} ${a!=null&&a.error?ei.error:""} ${ei[n]}`,style:J??{},children:[D?w.jsxs("div",{children:[" ",w.jsx(TI,{})]}):w.jsx(w.Fragment,{children:X&&w.jsx("div",{style:{display:"grid",alignItems:"center",marginRight:"0.5rem"},children:Mt(X)})}),!D&&(h||U)&&r&&!ne&&ht.current.length===0&&w.jsx("span",{className:ei.placeHolder,style:re??{},children:r??""}),(U||h)&&w.jsx("div",{className:ei.selectedTags,style:{width:!ne&&ht.current.length===0?0:"calc(100% - 2.25rem)",...pe??{}},children:!D&&!ne?w.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:"100%"},children:[ht.current.slice(0,3).map((fe,K)=>{let we=ht.current[ht.current.length-1];return w.jsxs("span",{className:ei.selectedList,style:ce??{},children:[fe.label,fe.id!==we.id&&K!==2?",":"","  "]},fe==null?void 0:fe.id)}),ht.current.length>3&&w.jsxs("div",{className:ei.additional,style:b??{},children:["+",ht.current.length-3]})]}):w.jsx("input",{ref:Ce,onClick:fe=>(fe.stopPropagation(),be(!0)),autoCorrect:"off",placeholder:"Search...",type:"text",...D||c?{value:Je}:{},onChange:fe=>Vi(fe.target.value)},q)}),w.jsx("input",{autoCorrect:"off",hidden:U||h,placeholder:r,readOnly:!ie||!ne||U||h,type:"text",value:(U||h)&&!D&&ne?"":Ne,onChange:fe=>Vi(fe.target.value)},q),G&&G.length>0&&ne&&w.jsxs("div",{ref:mi,onClick:fe=>fe.stopPropagation(),className:ei.dropdownListContainer,children:[h?w.jsx(iB,{SearchValue:Je,expandedNodes:De,setExpandedNodes:Ie,checkboxProps:p,onSelect:nl,withClearAll:x,withSelectAll:S,SelectedData:ht.current,fromDropdown:!0,onCollapse:rl,defaultCollapsed:f,data:G,theme:N,...F}):w.jsx("ul",{onScroll:fe=>Ni(),onClick:fe=>fe.stopPropagation(),className:ei.dropdownList,style:ae??{},children:(U&&ie?fi.current:G).map(fe=>{var K,we,Re,qe;return w.jsxs("li",{style:ue??{},className:`${!U&&c?ei[Ir((fe==null?void 0:fe.label)??"-")]:""} ${!(fe!=null&&fe.label)||fe.label===void 0||fe!=null&&fe.disabled?ei.disabled:""} ${(U?fe.selected:(K=st.current)!=null&&K.id&&((we=st.current)==null?void 0:we.id)===fe.id)?ei.selected:""}`,onClick:()=>{U?fn(fe):bt(fe)},children:[w.jsxs("p",{children:[" ",fe!=null&&fe.customLabel?fe.customLabel():(fe==null?void 0:fe.label)??"-"]}),P?w.jsx(w.Fragment,{children:fe.selected?w.jsx(mL,{}):w.jsx(_L,{})}):(U?fe.selected:((Re=st.current)==null?void 0:Re.id)&&((qe=st.current)==null?void 0:qe.id)===fe.id)&&w.jsx("span",{className:ei.checkIcon,children:w.jsx(wI,{color:Q==="namespaceHr"?"#32B45F":"#7F56D9",width:20,height:20})})]},fe==null?void 0:fe.id)})}),U&&$&&w.jsxs("div",{className:ei.dropdownListFooter,children:[S&&Je===""&&w.jsx("span",{onClick:It,children:"Select All"}),x&&w.jsx("span",{onClick:We,children:"Clear All"})]})]}),Z&&(U?ne?Je.length>0:!1:Ne.length>0||Je.length>0)&&w.jsx("div",{onClick:fe=>Ki(fe),style:{display:"grid",placeItems:"center",cursor:"pointer"},children:te?Mt(te):w.jsx(ku,{width:16,height:16})}),j?Mt(j):w.jsx("div",{style:{display:"grid",placeItems:"center",transform:ne?"rotate(180deg)":"",transition:"transform 0.2s ease-in-out",cursor:"pointer",marginLeft:"10px"},children:!D&&w.jsx(Ru,{})})]}),a&&(a==null?void 0:a.visible)&&w.jsx("div",{className:`${ei.dropdownHelperText} ${a!=null&&a.error?ei.error:""}`,children:!ne&&w.jsx("p",{style:(a==null?void 0:a.style)??{},children:a.text})})]})},gL="Tooltip-module__tooltipContainer",CL="Tooltip-module__tooltipContent",yL="Tooltip-module__withoutPointer",xL="Tooltip-module__top",bL="Tooltip-module__right",SL="Tooltip-module__bottom",EL="Tooltip-module__left",wL="Tooltip-module__tooltipTitle",IL="Tooltip-module__tooltipText",TL="Tooltip-module__dark",Gn={tooltipContainer:gL,tooltipContent:CL,withoutPointer:yL,top:xL,right:bL,bottom:SL,left:EL,tooltipTitle:wL,tooltipText:IL,dark:TL},qc=({children:e,tooltipSlot:t,delay:i=400,triggerClear:n=!1,placement:r="top",trigger:a="hover",title:o,text:s,customText:l,tooltipContentStyle:u,tooltipTitlestyle:d,tooltipTextStyle:c,tooltipContainerStyle:h,pointerPosition:f="10%",withPointer:p=!1,theme:v,topCustomOffset:g=0,bottomCustomOffset:C=0,leftCustomOffset:x=0,rightCustomOffset:S=0,forceClose:P=!1,openTooltip:D=!0,onClick:$,onVisibilityChange:G})=>{const z=le.useRef(null),q=le.useRef(null);let ie;const[Z,H]=le.useState(!1),ee=t||o||s||l,I=()=>{a==="hover"&&ee&&(ie=setTimeout(()=>{H(!0)},i))},U=()=>{a==="hover"&&(clearTimeout(ie),setTimeout(()=>{H(!1)},i))},L=()=>{a==="click"&&($&&typeof $=="function"&&$(),H(se=>!se))},Y=()=>{const se=z.current,te=q.current;if(!te||!se)return;const X=se.getBoundingClientRect();switch(te.style.position="fixed",r){case"top":te.style.top=`${X.top-te.offsetHeight-8}px`,te.style.left=`${X.left+g}px`;break;case"bottom":te.style.top=`${X.bottom+8}px`,te.style.left=`${X.left+C}px`;break;case"left":te.style.top=`${X.top+X.height/2-te.offsetHeight/2}px`,te.style.left=`${X.left-te.offsetWidth-8+x}px`;break;case"right":te.style.top=`${X.top+X.height/2-te.offsetHeight/2}px`,te.style.left=`${X.right+8+S}px`;break}};return le.useEffect(()=>{Y()},[z,Z,e,r,t,l,o,s]),le.useEffect(()=>{const se=X=>{var y;((y=z.current)==null?void 0:y.contains(X.target))||H(!1)},te=X=>{X.composedPath().includes(z.current)||H(!1)};return document.addEventListener("click",te),document.addEventListener("scroll",se,!0),()=>{document.removeEventListener("scroll",se,!0),document.removeEventListener("click",te)}},[]),le.useEffect(()=>{P&&H(!1)},[P]),le.useEffect(()=>{const se=q.current;se&&(se.style.setProperty("--pointer-position",`${f}`),p||se.classList.add(Gn.withoutPointer))},[Z]),le.useEffect(()=>{G&&typeof G=="function"&&G(Z)},[Z,G]),w.jsxs("div",{ref:z,className:`${v==="dark"?Gn.dark:""} ${Gn.tooltipContainer}`,onClick:L,onMouseEnter:I,onMouseLeave:U,style:h??{},children:[e,Z&&t?w.jsx("div",{style:u??{},onClick:se=>se.stopPropagation(),ref:q,className:`${Gn.tooltipContent} ${r?Gn[r]:Gn.bottom}`,children:t()}):Z&&w.jsxs("div",{style:u??{},onClick:se=>se.stopPropagation(),ref:q,className:`${Gn.tooltipContent} ${r?Gn[r]:Gn.bottom}`,children:[l&&typeof l=="function"&&l(),o&&o.length>0&&w.jsx("h2",{className:Gn.tooltipTitle,style:d??{},children:o}),s&&s.length>0&&w.jsx("p",{className:Gn.tooltipText,style:c??{},children:s})]})]})},AL="Popup-module__modalOverlay",DL="Popup-module__popupDrawerMode",OL="Popup-module__popupContainer",RL="Popup-module__closeButton",kL="Popup-module__withOptions",BL="Popup-module__horizontal",PL="Popup-module__popupHeader",LL="Popup-module__popupTitle",FL="Popup-module__popupDescription",ML="Popup-module__typeIcon",VL="Popup-module__icon",NL="Popup-module__templateWrapper",$L="Popup-module__dark",pn={modalOverlay:AL,popupDrawerMode:DL,popupContainer:OL,closeButton:RL,withOptions:kL,horizontal:BL,popupHeader:PL,popupTitle:LL,popupDescription:FL,typeIcon:ML,icon:VL,templateWrapper:NL,dark:$L},HL=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]},WL=e=>e.slice((e.lastIndexOf(".")-1>>>0)+2),zL=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 AI=(e,t)=>{const i=new Set;return e.filter(n=>i.has(n[t])?!1:(i.add(n[t]),!0))},GL=()=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:w.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"})}),UL=()=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:w.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})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e??"24",height:e??"24",viewBox:"0 0 24 24",fill:"none",children:w.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"})}),DI=({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 w.jsx(zm,{});case"unsaved":return w.jsx(UL,{});case"success":return w.jsx(GL,{})}},v=()=>{a&&typeof a=="function"&&a(!1)},g=le.useRef(null),C=x=>{x.target===g.current&&r&&typeof r=="function"&&r(!1)};return le.useEffect(()=>(document.addEventListener("click",C),()=>{document.removeEventListener("click",C)}),[]),e&&w.jsx("div",{ref:g,style:s??{},className:`
40
40
  ${f==="dark"?pn.dark:""}
41
41
  ${pn.modalOverlay}
42
42
  ${i&&(i==null?void 0:i.mode)==="drawer"?pn.popupDrawerMode:""}
@@ -1642,7 +1642,7 @@ const uB = ({ loadingColor: e }) => /* @__PURE__ */ E.jsxs(
1642
1642
  defaultCollapsed: f,
1643
1643
  data: G,
1644
1644
  theme: N,
1645
- treeProps: F
1645
+ ...F
1646
1646
  }
1647
1647
  ) : /* @__PURE__ */ E.jsx("ul", { onScroll: (he) => Hi(), onClick: (he) => he.stopPropagation(), className: ii.dropdownList, style: ae ?? {}, children: (U && ie ? vi.current : G).map((he) => {
1648
1648
  var K, we, Oe, qe;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "master-components-react",
3
3
  "private": false,
4
- "version": "4.2.37",
4
+ "version": "4.2.38",
5
5
  "type": "module",
6
6
  "main": "dist/master-components-react.cjs.js",
7
7
  "module": "dist/master-components-react.es.js",