@athosws/react-components
Version:
This is a set of useful ReactJS components developed by Athos.\n Email:ladiesman217.as@gmail.com
1 lines • 193 kB
JavaScript
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("motion/react"),o=require("chroma-js"),n=require("uuid"),s=require("react-dom"),i=require("@dnd-kit/core"),a=require("@dnd-kit/sortable"),l=require("@dnd-kit/utilities"),c=require("react-redux"),d=require("@reduxjs/toolkit"),u=require("react-dom/client");!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===r&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}('@import "tailwindcss";@plugin "daisyui";@custom-variant dark (&:where(.dark, .dark *));input[type=password]::-ms-clear,input[type=password]::-ms-reveal{display:none}');var p={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},h=t.createContext&&t.createContext(p),m=["attr","size","title"];function f(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},C.apply(this,arguments)}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function b(e,t,r){var o;return(t="symbol"==typeof(o=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?o:o+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e){return e&&e.map((e,r)=>t.createElement(e.tag,x({key:r},e.attr),y(e.child)))}function v(e){return r=>t.createElement(S,C({attr:x({},e.attr)},r),y(e.child))}function S(e){var r=r=>{var o,{attr:n,size:s,title:i}=e,a=f(e,m),l=s||r.size||"1em";return r.className&&(o=r.className),e.className&&(o=(o?o+" ":"")+e.className),t.createElement("svg",C({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,a,{className:o,style:x(x({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&t.createElement("title",null,i),e.children)};return void 0!==h?t.createElement(h.Consumer,null,e=>r(e)):r(p)}function w(e){return v({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}const j=t.createContext(void 0),N=t.createContext({}),k=({children:t,props:r})=>e.jsx(N.Provider,{value:r,children:t}),T=()=>{const e=t.useContext(N);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e};function R(e){return v({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(e)}function A(e){return v({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"},child:[]}]})(e)}function D(e){return v({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z"},child:[]}]})(e)}function P(e){return v({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"},child:[]}]})(e)}const $=e=>{const{callback:r}=e;let o=[];o="refs"in e?e.refs:e.ids.map(e=>({current:document.getElementById(e)}));const n=e=>{o.some(t=>t.current?.contains(e.target))||r()};t.useEffect(()=>(document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)),[])},M={duration:.35,ease:"circInOut"},O={topandbottom:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},topandbottomWithFade:{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0}},leftandright:{initial:{width:0},animate:{width:"auto"},exit:{width:0}},leftandrightWithFade:{initial:{width:0,opacity:0},animate:{width:"auto",opacity:1},exit:{width:0,opacity:0}}},z=({children:o,collpasedComponent:n,spacing:s,position:i="bottom",onToggle:a,initialOpen:l,collapsedClassName:c,wrapperClassName:d,buttonClassName:u,toggleOnWrapperClick:p,fade:h,hideOnClickOutside:m,extraButton:f,open:C,buttonContainerClassName:g})=>{const[x,b]=t.useState(l||!1),y=t.useRef(null),v=t.useRef(null),S=t.useRef(null),w="top"===i?"flex-col-reverse":"bottom"===i?"flex-col":"left"===i?"flex-row-reverse":"flex-row";m&&$({callback:()=>{b(!1),a&&a(void 0)},refs:[v,v,y]});return t.useEffect(()=>()=>{b(!1)},[]),t.useEffect(()=>{void 0!==C&&b(C)},[C]),e.jsxs(r.motion.div,{ref:y,animate:{gap:x?`${s}px`:0},onClick:()=>{p&&(b(!x),a&&a(!x))},className:`flex ${w} ${d}`,children:[e.jsxs("div",{ref:v,className:g,children:[e.jsx("div",{className:u,onClick:()=>{p||(b(!x),a&&a(!x))},children:o}),f]}),e.jsx(r.motion.div,{ref:S,initial:"initial",animate:x?"animate":"initial",variants:"top"===i||"bottom"===i?h?O.topandbottomWithFade:O.topandbottom:h?O.leftandrightWithFade:O.leftandright,style:"top"===i||"bottom"===i?{minWidth:"fit-content"}:{minHeight:"fit-content"},className:"flex overflow-hidden",transition:M,children:e.jsx("div",{className:`min-w-max min-h-max ${c}`,children:n})})]})},E=({index:e})=>{const{styles:r,levelIndicator:n}=T(),s=0+e/10*4;return{bgColor:t.useMemo(()=>{if(r?.selected?.bgcolorIndex)return r.selected.bgcolorIndex(s);const e=o(r?.selected?.bgColor||"#d6b2d1");return"brighten"===n?e.brighten(s).hex():e.darken(s).hex()},[s,r]),color:t.useMemo(()=>{if(r?.selected?.colorIndex)return r.selected.colorIndex(s);const e=o(r?.selected?.color||"#5c126b");return"brighten"===n?e.brighten(s).hex():e.darken(s).hex()},[s,r])}},I=({index:r,parentId:o})=>{const[n,s]=t.useState(),[i,a]=t.useState(!1),[l,c]=t.useState(!1),{onAdd:d,selected:u}=T(),{color:p}=E({index:r}),h=t.useMemo(()=>u?.some(e=>e===o),[u,o]);return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{style:{marginLeft:10*r+"px",color:h?p:"inherit"},type:"text",value:n,placeholder:"Adicionar",onChange:e=>{s(e.target.value),e.target.value&&a(!0)},className:"cursor-pointer py-1 px-2 outline-none focus:outline-none rounded-md text-zinc-400",onFocus:()=>{n&&a(!0)},onBlur:()=>{n||(a(!1),c(!1))}}),e.jsx(z,{wrapperClassName:"items-center flex",spacing:6,position:"left",open:l,onToggle:e=>c(!!e),collpasedComponent:e.jsx("p",{onClick:()=>{n&&(d(n,o),s(""),a(!1),c(!1))},className:"text-green-600 select-none cursor-pointer",children:"Confirmar"}),children:e.jsx("div",{className:`p-1 ${l?"bg-black":"bg-green-500"} rounded-full flex items-center gap-1 w-fit ${i?"":"hidden pointer-events-none"}`,children:l?e.jsx(P,{className:"cursor-pointer text-white text-xs",onClick:()=>{n&&(s(""),a(!1),c(!1))}}):e.jsx(R,{className:"cursor-pointer text-white text-xs"})})})]})},L=t.createContext(void 0),B=()=>{const e=t.useContext(L);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e};function F(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M217.9 256L345 129c9.4-9.4 9.4-24.6 0-33.9-9.4-9.4-24.6-9.3-34 0L167 239c-9.1 9.1-9.3 23.7-.7 33.1L310.9 417c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-33.9L217.9 256z"},child:[]}]})(e)}function H(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z"},child:[]}]})(e)}function Z(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 136c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40zm0 240c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40zm0-120c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40z"},child:[]}]})(e)}function W(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M480 256l-96-96v64h-96v-96h64l-96-96-96 96h64v96h-96v-64l-96 96 96 96v-64h96v96h-64l96 96 96-96h-64v-96h96v64z"},child:[]}]})(e)}function _(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 3a2 2 0 0 0-2 2"},child:[]},{tag:"path",attr:{d:"M19 3a2 2 0 0 1 2 2"},child:[]},{tag:"path",attr:{d:"M21 19a2 2 0 0 1-2 2"},child:[]},{tag:"path",attr:{d:"M5 21a2 2 0 0 1-2-2"},child:[]},{tag:"path",attr:{d:"M9 3h1"},child:[]},{tag:"path",attr:{d:"M9 21h1"},child:[]},{tag:"path",attr:{d:"M14 3h1"},child:[]},{tag:"path",attr:{d:"M14 21h1"},child:[]},{tag:"path",attr:{d:"M3 9v1"},child:[]},{tag:"path",attr:{d:"M21 9v1"},child:[]},{tag:"path",attr:{d:"M3 14v1"},child:[]},{tag:"path",attr:{d:"M21 14v1"},child:[]}]})(e)}const V=t.createContext(void 0),q=({isMoving:r,isMovingThisTree:n,tree:s,index:i})=>{const{onDelete:a,onMove:l,onAdd:c,levelIndicator:d}=T(),{setFuncOpenId:u,funcOpenId:p}=(()=>{const e=t.useContext(V);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e})(),{setMovingId:h,movingId:m}=B(),[f,C]=t.useState(!1),g=t.useMemo(()=>p===s.id,[p,s.id]),{color:x}=E({index:i});return n?e.jsx(W,{className:"opacity-60 hover:opacity-100 hover:text-red-400 transition-all duration-200 cursor-pointer",onClick:()=>{m===s.id?h(null):h(s.id)}}):r&&m?e.jsx(z,{spacing:6,wrapperClassName:"items-center",position:"left",open:f,collpasedComponent:e.jsx("p",{children:"Confirmar"}),children:e.jsx(_,{onClick:()=>{l?.(m,s.id),h(null),C(!1)},className:"cursor-pointer",onMouseOver:()=>C(!0),onMouseOut:()=>C(!1)})}):e.jsx(z,{open:g,onToggle:e=>{u(e?s.id:null)},spacing:6,position:"right",wrapperClassName:"text-sm",collapsedClassName:"flex items-center",collpasedComponent:e.jsxs("div",{style:{borderLeftColor:o(x).alpha(.3).hex()},className:"cursor-pointer border-l-1 px-1 flex gap-1 transition-opacity duration-200",children:[c&&e.jsx(A,{className:"opacity-60 hover:opacity-100 transition-opacity duration-200",onClick:()=>c(s.name,s.id)}),l&&e.jsx(W,{className:"opacity-60 hover:opacity-100 transition-opacity duration-200",onClick:()=>{m===s.id?h(null):h(s.id)}}),a&&e.jsx(D,{className:"opacity-60 hover:opacity-100 transition-opacity duration-200",onClick:()=>a(s.id)})]}),children:e.jsx(Z,{className:"cursor-pointer rounded-full text-xl transition-colors duration-200 "+(g?"brighten"===d?"bg-white/5":"bg-black/5":"")})})},G=({tree:r,id:o,index:n})=>{const{fillWidth:s,onSelect:i}=T(),{movingId:a}=B(),[l,c]=t.useState(!1),d=t.useMemo(()=>!!r.sub&&Object.keys(r.sub).length>0,[r.sub]),{hasSelectedSubcategory:u,isSelected:p}=(({tree:e,id:r})=>{const{selected:o}=T(),n=t.useCallback((e,t)=>!!o?.some(t=>t===e.id)||!!e.sub&&Object.values(e.sub).some(e=>n(e,t)),[o]),s=t.useMemo(()=>n(e,r),[e,n,r]);return{isSelected:t.useMemo(()=>o?.some(t=>t===e.id)||s,[o,e.id,s]),hasSelectedSubcategory:s}})({tree:r,id:o}),{bgColor:h,color:m}=E({index:n}),f=`rounded-md ${d?"pb-2 ":""} py-1 px-2 gap-2 transition-colors duration-200 flex justify-between ${s?"":"w-fit"}`;t.useEffect(()=>c(u),[u]);const C=t.useMemo(()=>a===r.id,[a,r.id]),g=t.useMemo(()=>null!==a,[a]);return e.jsx("div",{style:{marginLeft:10*n+"px",backgroundColor:p?h:"transparent",color:p?m:"inherit",borderColor:C?m:"transparent"},className:`border border-dashed ${f} transition-[border] `,children:r.sub&&Object.keys(r.sub).length>0?e.jsxs(z,{open:u,onToggle:e=>c(!!e),collapsedClassName:`flex flex-col ${s?"w-full":""} gap-1`,wrapperClassName:""+(s?"w-full":""),spacing:6,collpasedComponent:e.jsx(Y,{data:r.sub,index:n+1,parentId:r.id}),buttonClassName:"cursor-pointer flex items-center gap-2 w-full",buttonContainerClassName:"w-full flex items-center justify-between",extraButton:e.jsx(q,{index:n,isMoving:g,isMovingThisTree:C,tree:r}),children:[l?"-":"+"," ",r.icon," ",r.component||r.name]}):e.jsxs("span",{className:(g?"":"cursor-pointer")+" w-full flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 w-full",onClick:()=>{g||(i?.(r.id),r.onClick?.(r.id))},children:[r.icon," ",r.component||r.name]}),e.jsx(q,{index:n,isMoving:g,isMovingThisTree:C,tree:r})]})},o)},Y=({data:r,index:o=0,parentId:n})=>{const{onAdd:s,isLoading:i}=T(),{addingToParent:a}=(()=>{const e=t.useContext(j);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e})();return e.jsxs("div",{className:""+(i&&0===o?"blur-[2px]":""),children:[r.map(t=>e.jsx(G,{tree:t,id:t.id,index:o})),s&&a===n&&e.jsx(I,{index:o,parentId:n})]})},U=[({children:r})=>{const[o,n]=t.useState(null);return e.jsx(j.Provider,{value:{addingToParent:o,setAddingToParent:n},children:r})},({children:r})=>{const[o,n]=t.useState(null);return e.jsx(L.Provider,{value:{movingId:o,setMovingId:n},children:r})},({children:r})=>{const[o,n]=t.useState(null);return e.jsx(V.Provider,{value:{funcOpenId:o,setFuncOpenId:n},children:r})}];const X=({position:e="top",matchChildrenWidth:r=!1,spacing:o=6,onToggle:s})=>{const i=t.useMemo(()=>n.v4(),[]),[a,l]=t.useState(!1),c="top"===e?"dropdown-top dropdown-center":"top-left"===e?"dropdown-top":"top-right"===e?"dropdown-top dropdown-end":"bottom"===e?"dropdown-bottom dropdown-center":"bottom-left"===e?"dropdown-bottom":"bottom-right"===e?"dropdown-bottom dropdown-end":"left"===e?"dropdown-left dropdown-center":"left-top"===e?"dropdown-left":"left-bottom"===e?"dropdown-left dropdown-end":"right"===e?"dropdown-right dropdown-center":"right-top"===e?"dropdown-right":"right-bottom"===e?"dropdown-right dropdown-end":"dropdown-top dropdown-center",d=t.useMemo(()=>e.startsWith("top")?{marginBottom:`${o}px`}:e.startsWith("bottom")?{marginTop:`${o}px`}:e.startsWith("left")?{marginRight:`${o}px`}:{marginLeft:`${o}px`},[o,e]),u=t.useRef(null),p=t.useRef(null);return t.useLayoutEffect(()=>{if(u.current&&r){const e=u.current.getBoundingClientRect().width,t=document.getElementById(i);t&&(t.style.width=`${e}px`)}},[u.current,r,a]),$({callback:()=>{l(!1)},refs:[u,p]}),t.useEffect(()=>{s&&s(a)},[a]),{id:i,pos:c,gap:d,childRef:u,contentRef:p,setIsOpened:l,isOpened:a}},K=t.createContext(null),J=r=>{const{multiSelect:o=!1,onToggle:n,position:s,spacing:i,matchLabelWidth:a,multiSelectLabelClassName:l}=r,c=X({onToggle:n,matchChildrenWidth:a,position:s,spacing:i}),[d,u]=t.useState(!1),[p,h]=t.useState(""),[m,f]=t.useState([]),[C,g]=t.useState(),x=t.useMemo(()=>(e=>"labels"in e&&Array.isArray(e.labels))(r)?r.labels:null,[r]),b=t.useMemo(()=>(e=>"cols"in e&&Array.isArray(e.cols))(r)?r.cols:null,[r]);t.useEffect(()=>(r.selected&&f(Array.isArray(r.selected)?r.selected:void 0!==r.selected&&null!==r.selected?[r.selected]:[]),()=>{f([]),g(void 0)}),[r.selected]);const y=t.useMemo(()=>x?.filter(e=>e.label?e.label.toString().toLowerCase().includes(p.toLowerCase()):e.value.toString().toLowerCase().includes(p.toLowerCase()))||null,[x,p]),v=t.useMemo(()=>b?.map(e=>e.filter(e=>e.label?e.label.toString().toLowerCase().includes(p.toLowerCase()):e.value.toString().toLowerCase().includes(p.toLowerCase())))||null,[b,p]);return e.jsx(K.Provider,{value:{props:r,selectedItems:m,select:function(e){if(d)return;const t=(()=>{const t=m;return o?t.includes(e)?t.filter(t=>t!==e):[...t,e]:t.includes(e)?t.filter(t=>t!==e):[e]})();if(f(t),r.onChange){const e=r.onChange(t);e&&"function"==typeof e.then?(u(!0),e.then(()=>{u(!1)}).catch(()=>{u(!1)})):u(!1)}},labels:y,cols:v,updating:d,setLastSelected:g,lastSelected:C,multiSelectLabelClassName:l,searchValue:p,setSearchValue:h,...c,originalCols:b,originalLabels:x},children:r.children})},Q=()=>{const e=t.useContext(K);if(!e)throw new Error("useATHOSSelectContext must be used within a ATHOSSelectProvider");return e};function ee(e){return v({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M13.917 7A6.002 6.002 0 0 0 2.083 7H1.071a7.002 7.002 0 0 1 13.858 0h-1.012z"},child:[]}]})(e)}const te=({option:t,onClick:o,isOpened:n,isLastSelected:s,className:i,style:a,selectedClassName:l,selectedStyle:c,isSelected:d})=>{const{updating:u}=Q();return e.jsxs(r.motion.li,{animate:{opacity:n?1:0},style:{...a,...t.style,...d?c:{}},onClick:o,className:`flex pr-3 justify-between items-center transform-gpu cursor-pointer select-none ${i} ${t.className} ${d?l:""}`,children:[t.component||t.label,e.jsx(r.AnimatePresence,{children:d?u&&s?e.jsx(ee,{className:"animate-spin"}):e.jsx(r.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},children:e.jsx(R,{size:12})}):null})]})},re=t=>{const{colClassName:r,optionClassName:o,labelsStyle:n}=t,{cols:s,select:i,selectedItems:a,isOpened:l,lastSelected:c}=Q();return e.jsx(e.Fragment,{children:s?.map((s,d)=>e.jsx("div",{className:`flex ${r}`,style:t.colStyle,children:s.map(r=>e.jsx(te,{isLastSelected:c===r.value,isOpened:l,selectedClassName:t.selectedLabelClassName,selectedStyle:t.selectedLabelStyle,style:n,className:o,option:r,onClick:()=>i(r.value),isSelected:a.includes(r.value)},r.value))},d))})};function oe(e){return v({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9A7.902 7.902 0 0 1 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1A7.902 7.902 0 0 1 20 12c0 4.42-3.58 8-8 8z"},child:[]}]})(e)}function ne(e){return v({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function se(e){return v({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"},child:[]}]})(e)}function ie(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64V160h160v256zm224 0H288V160h160v256z"},child:[]}]})(e)}function ae(e){return v({attr:{viewBox:"0 0 288 512"},child:[{tag:"path",attr:{d:"M209.2 233.4l-108-31.6C88.7 198.2 80 186.5 80 173.5c0-16.3 13.2-29.5 29.5-29.5h66.3c12.2 0 24.2 3.7 34.2 10.5 6.1 4.1 14.3 3.1 19.5-2l34.8-34c7.1-6.9 6.1-18.4-1.8-24.5C238 74.8 207.4 64.1 176 64V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48h-2.5C45.8 64-5.4 118.7.5 183.6c4.2 46.1 39.4 83.6 83.8 96.6l102.5 30c12.5 3.7 21.2 15.3 21.2 28.3 0 16.3-13.2 29.5-29.5 29.5h-66.3C100 368 88 364.3 78 357.5c-6.1-4.1-14.3-3.1-19.5 2l-34.8 34c-7.1 6.9-6.1 18.4 1.8 24.5 24.5 19.2 55.1 29.9 86.5 30v48c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-48.2c46.6-.9 90.3-28.6 105.7-72.7 21.5-61.6-14.6-124.8-72.5-141.7z"},child:[]}]})(e)}function le(e){return v({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"},child:[]}]})(e)}function ce(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function de(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"},child:[]}]})(e)}function ue(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function pe(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(e)}function he(e){return v({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"48",d:"M88 152h336M88 256h336M88 360h336"},child:[]}]})(e)}var me=function(){return me=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},me.apply(this,arguments)};function fe(e,t,r){if(r||2===arguments.length)for(var o,n=0,s=t.length;n<s;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function Ce(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}"function"==typeof SuppressedError&&SuppressedError;var ge=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,xe=Ce(function(e){return ge.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),be="-ms-",ye="-moz-",ve="-webkit-",Se="comm",we="rule",je="decl",Ne="@keyframes",ke=Math.abs,Te=String.fromCharCode,Re=Object.assign;function Ae(e){return e.trim()}function De(e,t){return(e=t.exec(e))?e[0]:e}function Pe(e,t,r){return e.replace(t,r)}function $e(e,t,r){return e.indexOf(t,r)}function Me(e,t){return 0|e.charCodeAt(t)}function Oe(e,t,r){return e.slice(t,r)}function ze(e){return e.length}function Ee(e){return e.length}function Ie(e,t){return t.push(e),e}function Le(e,t){return e.filter(function(e){return!De(e,t)})}var Be=1,Fe=1,He=0,Ze=0,We=0,_e="";function Ve(e,t,r,o,n,s,i,a){return{value:e,root:t,parent:r,type:o,props:n,children:s,line:Be,column:Fe,length:i,return:"",siblings:a}}function qe(e,t){return Re(Ve("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Ge(e){for(;e.root;)e=qe(e.root,{children:[e]});Ie(e,e.siblings)}function Ye(){return We=Ze>0?Me(_e,--Ze):0,Fe--,10===We&&(Fe=1,Be--),We}function Ue(){return We=Ze<He?Me(_e,Ze++):0,Fe++,10===We&&(Fe=1,Be++),We}function Xe(){return Me(_e,Ze)}function Ke(){return Ze}function Je(e,t){return Oe(_e,e,t)}function Qe(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function et(e){return Ae(Je(Ze-1,ot(91===e?e+2:40===e?e+1:e)))}function tt(e){for(;(We=Xe())&&We<33;)Ue();return Qe(e)>2||Qe(We)>3?"":" "}function rt(e,t){for(;--t&&Ue()&&!(We<48||We>102||We>57&&We<65||We>70&&We<97););return Je(e,Ke()+(t<6&&32==Xe()&&32==Ue()))}function ot(e){for(;Ue();)switch(We){case e:return Ze;case 34:case 39:34!==e&&39!==e&&ot(We);break;case 40:41===e&&ot(e);break;case 92:Ue()}return Ze}function nt(e,t){for(;Ue()&&e+We!==57&&(e+We!==84||47!==Xe()););return"/*"+Je(t,Ze-1)+"*"+Te(47===e?e:Ue())}function st(e){for(;!Qe(Xe());)Ue();return Je(e,Ze)}function it(e){return function(e){return _e="",e}(at("",null,null,null,[""],e=function(e){return Be=Fe=1,He=ze(_e=e),Ze=0,[]}(e),0,[0],e))}function at(e,t,r,o,n,s,i,a,l){for(var c=0,d=0,u=i,p=0,h=0,m=0,f=1,C=1,g=1,x=0,b="",y=n,v=s,S=o,w=b;C;)switch(m=x,x=Ue()){case 40:if(108!=m&&58==Me(w,u-1)){-1!=$e(w+=Pe(et(x),"&","&\f"),"&\f",ke(c?a[c-1]:0))&&(g=-1);break}case 34:case 39:case 91:w+=et(x);break;case 9:case 10:case 13:case 32:w+=tt(m);break;case 92:w+=rt(Ke()-1,7);continue;case 47:switch(Xe()){case 42:case 47:Ie(ct(nt(Ue(),Ke()),t,r,l),l);break;default:w+="/"}break;case 123*f:a[c++]=ze(w)*g;case 125*f:case 59:case 0:switch(x){case 0:case 125:C=0;case 59+d:-1==g&&(w=Pe(w,/\f/g,"")),h>0&&ze(w)-u&&Ie(h>32?dt(w+";",o,r,u-1,l):dt(Pe(w," ","")+";",o,r,u-2,l),l);break;case 59:w+=";";default:if(Ie(S=lt(w,t,r,c,d,n,a,b,y=[],v=[],u,s),s),123===x)if(0===d)at(w,t,S,S,y,s,u,a,v);else switch(99===p&&110===Me(w,3)?100:p){case 100:case 108:case 109:case 115:at(e,S,S,o&&Ie(lt(e,S,S,0,0,n,a,b,n,y=[],u,v),v),n,v,u,a,o?y:v);break;default:at(w,S,S,S,[""],v,0,a,v)}}c=d=h=0,f=g=1,b=w="",u=i;break;case 58:u=1+ze(w),h=m;default:if(f<1)if(123==x)--f;else if(125==x&&0==f++&&125==Ye())continue;switch(w+=Te(x),x*f){case 38:g=d>0?1:(w+="\f",-1);break;case 44:a[c++]=(ze(w)-1)*g,g=1;break;case 64:45===Xe()&&(w+=et(Ue())),p=Xe(),d=u=ze(b=w+=st(Ke())),x++;break;case 45:45===m&&2==ze(w)&&(f=0)}}return s}function lt(e,t,r,o,n,s,i,a,l,c,d,u){for(var p=n-1,h=0===n?s:[""],m=Ee(h),f=0,C=0,g=0;f<o;++f)for(var x=0,b=Oe(e,p+1,p=ke(C=i[f])),y=e;x<m;++x)(y=Ae(C>0?h[x]+" "+b:Pe(b,/&\f/g,h[x])))&&(l[g++]=y);return Ve(e,t,r,0===n?we:a,l,c,d,u)}function ct(e,t,r,o){return Ve(e,t,r,Se,Te(We),Oe(e,2,-2),0,o)}function dt(e,t,r,o,n){return Ve(e,t,r,je,Oe(e,0,o),Oe(e,o+1,-1),o,n)}function ut(e,t,r){switch(function(e,t){return 45^Me(e,0)?(((t<<2^Me(e,0))<<2^Me(e,1))<<2^Me(e,2))<<2^Me(e,3):0}(e,t)){case 5103:return ve+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ve+e+e;case 4789:return ye+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ve+e+ye+e+be+e+e;case 5936:switch(Me(e,t+11)){case 114:return ve+e+be+Pe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ve+e+be+Pe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ve+e+be+Pe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return ve+e+be+e+e;case 6165:return ve+e+be+"flex-"+e+e;case 5187:return ve+e+Pe(e,/(\w+).+(:[^]+)/,ve+"box-$1$2"+be+"flex-$1$2")+e;case 5443:return ve+e+be+"flex-item-"+Pe(e,/flex-|-self/g,"")+(De(e,/flex-|baseline/)?"":be+"grid-row-"+Pe(e,/flex-|-self/g,""))+e;case 4675:return ve+e+be+"flex-line-pack"+Pe(e,/align-content|flex-|-self/g,"")+e;case 5548:return ve+e+be+Pe(e,"shrink","negative")+e;case 5292:return ve+e+be+Pe(e,"basis","preferred-size")+e;case 6060:return ve+"box-"+Pe(e,"-grow","")+ve+e+be+Pe(e,"grow","positive")+e;case 4554:return ve+Pe(e,/([^-])(transform)/g,"$1"+ve+"$2")+e;case 6187:return Pe(Pe(Pe(e,/(zoom-|grab)/,ve+"$1"),/(image-set)/,ve+"$1"),e,"")+e;case 5495:case 3959:return Pe(e,/(image-set\([^]*)/,ve+"$1$`$1");case 4968:return Pe(Pe(e,/(.+:)(flex-)?(.*)/,ve+"box-pack:$3"+be+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ve+e+e;case 4200:if(!De(e,/flex-|baseline/))return be+"grid-column-align"+Oe(e,t)+e;break;case 2592:case 3360:return be+Pe(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,De(e.props,/grid-\w+-end/)})?~$e(e+(r=r[t].value),"span",0)?e:be+Pe(e,"-start","")+e+be+"grid-row-span:"+(~$e(r,"span",0)?De(r,/\d+/):+De(r,/\d+/)-+De(e,/\d+/))+";":be+Pe(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return De(e.props,/grid-\w+-start/)})?e:be+Pe(Pe(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Pe(e,/(.+)-inline(.+)/,ve+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ze(e)-1-t>6)switch(Me(e,t+1)){case 109:if(45!==Me(e,t+4))break;case 102:return Pe(e,/(.+:)(.+)-([^]+)/,"$1"+ve+"$2-$3$1"+ye+(108==Me(e,t+3)?"$3":"$2-$3"))+e;case 115:return~$e(e,"stretch",0)?ut(Pe(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Pe(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,o,n,s,i,a){return be+r+":"+o+a+(n?be+r+"-span:"+(s?i:+i-+o)+a:"")+e});case 4949:if(121===Me(e,t+6))return Pe(e,":",":"+ve)+e;break;case 6444:switch(Me(e,45===Me(e,14)?18:11)){case 120:return Pe(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+ve+(45===Me(e,14)?"inline-":"")+"box$3$1"+ve+"$2$3$1"+be+"$2box$3")+e;case 100:return Pe(e,":",":"+be)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Pe(e,"scroll-","scroll-snap-")+e}return e}function pt(e,t){for(var r="",o=0;o<e.length;o++)r+=t(e[o],o,e,t)||"";return r}function ht(e,t,r,o){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case je:return e.return=e.return||e.value;case Se:return"";case Ne:return e.return=e.value+"{"+pt(e.children,o)+"}";case we:if(!ze(e.value=e.props.join(",")))return""}return ze(r=pt(e.children,o))?e.return=e.value+"{"+r+"}":""}function mt(e,t,r,o){if(e.length>-1&&!e.return)switch(e.type){case je:return void(e.return=ut(e.value,e.length,r));case Ne:return pt([qe(e,{value:Pe(e.value,"@","@"+ve)})],o);case we:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,function(t){switch(De(t,o=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Ge(qe(e,{props:[Pe(t,/:(read-\w+)/,":-moz-$1")]})),Ge(qe(e,{props:[t]})),Re(e,{props:Le(r,o)});break;case"::placeholder":Ge(qe(e,{props:[Pe(t,/:(plac\w+)/,":"+ve+"input-$1")]})),Ge(qe(e,{props:[Pe(t,/:(plac\w+)/,":-moz-$1")]})),Ge(qe(e,{props:[Pe(t,/:(plac\w+)/,be+"input-$1")]})),Ge(qe(e,{props:[t]})),Re(e,{props:Le(r,o)})}return""})}}var ft={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ct="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",gt="active",xt="data-styled-version",bt="6.1.18",yt="/*!sc*/\n",vt="undefined"!=typeof window&&"undefined"!=typeof document,St=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),wt=/invalid hook call/i,jt=new Set,Nt=function(e,r){if("production"!==process.env.NODE_ENV){var o=r?' with the id of "'.concat(r,'"'):"",n="The component ".concat(e).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n",s=console.error;try{var i=!0;console.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];wt.test(e)?(i=!1,jt.delete(n)):s.apply(void 0,fe([e],t,!1))},t.useRef(),i&&!jt.has(n)&&(console.warn(n),jt.add(n))}catch(e){wt.test(e.message)&&jt.delete(n)}finally{console.error=s}}},kt=Object.freeze([]),Tt=Object.freeze({});var Rt=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),At=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Dt=/(^-|-$)/g;function Pt(e){return e.replace(At,"-").replace(Dt,"")}var $t=/(a)(d)/gi,Mt=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ot(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=Mt(t%52)+r;return(Mt(t%52)+r).replace($t,"$1-$2")}var zt,Et=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},It=function(e){return Et(5381,e)};function Lt(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function Bt(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var Ft="function"==typeof Symbol&&Symbol.for,Ht=Ft?Symbol.for("react.memo"):60115,Zt=Ft?Symbol.for("react.forward_ref"):60112,Wt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},_t={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vt={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},qt=((zt={})[Zt]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},zt[Ht]=Vt,zt);function Gt(e){return("type"in(t=e)&&t.type.$$typeof)===Ht?Vt:"$$typeof"in e?qt[e.$$typeof]:Wt;var t}var Yt=Object.defineProperty,Ut=Object.getOwnPropertyNames,Xt=Object.getOwnPropertySymbols,Kt=Object.getOwnPropertyDescriptor,Jt=Object.getPrototypeOf,Qt=Object.prototype;function er(e,t,r){if("string"!=typeof t){if(Qt){var o=Jt(t);o&&o!==Qt&&er(e,o,r)}var n=Ut(t);Xt&&(n=n.concat(Xt(t)));for(var s=Gt(e),i=Gt(t),a=0;a<n.length;++a){var l=n[a];if(!(l in _t||r&&r[l]||i&&l in i||s&&l in s)){var c=Kt(t,l);try{Yt(e,l,c)}catch(e){}}}}return e}function tr(e){return"function"==typeof e}function rr(e){return"object"==typeof e&&"styledComponentId"in e}function or(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function nr(e,t){if(0===e.length)return"";for(var r=e[0],o=1;o<e.length;o++)r+=e[o];return r}function sr(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function ir(e,t,r){if(void 0===r&&(r=!1),!r&&!sr(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var o=0;o<t.length;o++)e[o]=ir(e[o],t[o]);else if(sr(t))for(var o in t)e[o]=ir(e[o],t[o]);return e}function ar(e,t){Object.defineProperty(e,"toString",{value:t})}var lr="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function cr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e[0],o=[],n=1,s=e.length;n<s;n+=1)o.push(e[n]);return o.forEach(function(e){r=r.replace(/%[a-z]/,e)}),r}function dr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(cr.apply(void 0,fe([lr[e]],t,!1)).trim())}var ur=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,o=r.length,n=o;e>=n;)if((n<<=1)<0)throw dr(16,"".concat(e));this.groupSizes=new Uint32Array(n),this.groupSizes.set(r),this.length=n;for(var s=o;s<n;s++)this.groupSizes[s]=0}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),o=r+t;this.groupSizes[e]=0;for(var n=r;n<o;n++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],o=this.indexOfGroup(e),n=o+r,s=o;s<n;s++)t+="".concat(this.tag.getRule(s)).concat(yt);return t},e}(),pr=1<<30,hr=new Map,mr=new Map,fr=1,Cr=function(e){if(hr.has(e))return hr.get(e);for(;mr.has(fr);)fr++;var t=fr++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>pr))throw dr(16,"".concat(t));return hr.set(e,t),mr.set(t,e),t},gr=function(e,t){fr=t+1,hr.set(e,t),mr.set(t,e)},xr="style[".concat(Ct,"][").concat(xt,'="').concat(bt,'"]'),br=new RegExp("^".concat(Ct,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),yr=function(e,t,r){for(var o,n=r.split(","),s=0,i=n.length;s<i;s++)(o=n[s])&&e.registerName(t,o)},vr=function(e,t){for(var r,o=(null!==(r=t.textContent)&&void 0!==r?r:"").split(yt),n=[],s=0,i=o.length;s<i;s++){var a=o[s].trim();if(a){var l=a.match(br);if(l){var c=0|parseInt(l[1],10),d=l[2];0!==c&&(gr(d,c),yr(e,d,l[3]),e.getTag().insertRules(c,n)),n.length=0}else n.push(a)}}},Sr=function(e){for(var t=document.querySelectorAll(xr),r=0,o=t.length;r<o;r++){var n=t[r];n&&n.getAttribute(Ct)!==gt&&(vr(e,n),n.parentNode&&n.parentNode.removeChild(n))}};var wr=function(e){var t=document.head,r=e||t,o=document.createElement("style"),n=function(e){var t=Array.from(e.querySelectorAll("style[".concat(Ct,"]")));return t[t.length-1]}(r),s=void 0!==n?n.nextSibling:null;o.setAttribute(Ct,gt),o.setAttribute(xt,bt);var i="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return i&&o.setAttribute("nonce",i),r.insertBefore(o,s),o},jr=function(){function e(e){this.element=wr(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,o=t.length;r<o;r++){var n=t[r];if(n.ownerNode===e)return n}throw dr(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Nr=function(){function e(e){this.element=wr(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),kr=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Tr=vt,Rr={isServer:!vt,useCSSOMInjection:!St},Ar=function(){function e(e,t,r){void 0===e&&(e=Tt),void 0===t&&(t={});var o=this;this.options=me(me({},Rr),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&vt&&Tr&&(Tr=!1,Sr(this)),ar(this,function(){return function(e){for(var t=e.getTag(),r=t.length,o="",n=function(r){var n=function(e){return mr.get(e)}(r);if(void 0===n)return"continue";var s=e.names.get(n),i=t.getGroup(r);if(void 0===s||!s.size||0===i.length)return"continue";var a="".concat(Ct,".g").concat(r,'[id="').concat(n,'"]'),l="";void 0!==s&&s.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),o+="".concat(i).concat(a,'{content:"').concat(l,'"}').concat(yt)},s=0;s<r;s++)n(s);return o}(o)})}return e.registerId=function(e){return Cr(e)},e.prototype.rehydrate=function(){!this.