@simpoobusiness/sdk 2.0.83 → 2.0.85
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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/simpoo-sdk.js +2 -2
- package/dist/simpoo-sdk.js.map +1 -1
- package/package.json +1 -1
package/dist/simpoo-sdk.js
CHANGED
|
@@ -138,7 +138,7 @@ function(e,t){return Zm(e,t)}(e,{shouldForwardProp:h,label:fg(),...c}),g=e=>{if(
|
|
|
138
138
|
}
|
|
139
139
|
`,xv=D.forwardRef(function(e,t){const n=Jy({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:a,...i}=n,[s,l]=D.useState([]),u=D.useRef(0),c=D.useRef(null);D.useEffect(()=>{c.current&&(c.current(),c.current=null)},[s]);const d=D.useRef(!1),f=hv(),p=D.useRef(null),h=D.useRef(null),g=D.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:a,cb:i}=e;l(e=>[...e,m.jsx(wv,{classes:{ripple:To(o.ripple,mv.ripple),rippleVisible:To(o.rippleVisible,mv.rippleVisible),ripplePulsate:To(o.ripplePulsate,mv.ripplePulsate),child:To(o.child,mv.child),childLeaving:To(o.childLeaving,mv.childLeaving),childPulsate:To(o.childPulsate,mv.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:a},u.current)]),u.current+=1,c.current=i},[o]),y=D.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:a=r||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===e?.type&&d.current)return void(d.current=!1);"touchstart"===e?.type&&(d.current=!0);const s=i?null:h.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,m;if(a||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),c=Math.round(n-l.top)}if(a)m=Math.sqrt((2*l.width**2+l.height**2)/3),m%2==0&&(m+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-c),c)+2;m=Math.sqrt(e**2+t**2)}e?.touches?null===p.current&&(p.current=()=>{g({pulsate:o,rippleX:u,rippleY:c,rippleSize:m,cb:n})},f.start(80,()=>{p.current&&(p.current(),p.current=null)})):g({pulsate:o,rippleX:u,rippleY:c,rippleSize:m,cb:n})},[r,g,f]),v=D.useCallback(()=>{y({},{pulsate:!0})},[y]),b=D.useCallback((e,t)=>{if(f.clear(),"touchend"===e?.type&&p.current)return p.current(),p.current=null,void f.start(0,()=>{b(e,t)});p.current=null,l(e=>e.length>0?e.slice(1):e),c.current=t},[f]);return D.useImperativeHandle(t,()=>({pulsate:v,start:y,stop:b}),[v,y,b]),m.jsx(bv,{className:To(mv.root,o.root,a),ref:h,...i,children:m.jsx(dv,{component:null,exit:!0,children:s})})});function Cv(e){return Yf("MuiButtonBase",e)}const Sv=Gf("MuiButtonBase",["root","disabled","focusVisible"]),kv=Xy("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Sv.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),_v=D.forwardRef(function(e,t){const n=Jy({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:a,className:i,component:s="button",disabled:l=!1,disableRipple:u=!1,disableTouchRipple:c=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p="a",onBlur:h,onClick:g,onContextMenu:y,onDragLeave:v,onFocus:b,onFocusVisible:w,onKeyDown:x,onKeyUp:C,onMouseDown:S,onMouseLeave:k,onMouseUp:_,onTouchEnd:E,onTouchMove:j,onTouchStart:N,tabIndex:R=0,TouchRippleProps:O,touchRippleRef:P,type:T,...M}=n,I=D.useRef(null),A=ov.use(),L=ev(A.ref,P),[F,z]=D.useState(!1);l&&F&&z(!1),D.useImperativeHandle(r,()=>({focusVisible:()=>{z(!0),I.current.focus()}}),[]);const $=A.shouldMount&&!u&&!l;D.useEffect(()=>{F&&d&&!u&&A.pulsate()},[u,d,F,A]);const H=Ev(A,"start",S,c),B=Ev(A,"stop",y,c),V=Ev(A,"stop",v,c),U=Ev(A,"stop",_,c),q=Ev(A,"stop",e=>{F&&e.preventDefault(),k&&k(e)},c),W=Ev(A,"start",N,c),Y=Ev(A,"stop",E,c),G=Ev(A,"stop",j,c),K=Ev(A,"stop",e=>{ep(e.target)||z(!1),h&&h(e)},!1),Q=tv(e=>{I.current||(I.current=e.currentTarget),ep(e.target)&&(z(!0),w&&w(e)),b&&b(e)}),Z=()=>{const e=I.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},X=tv(e=>{d&&!e.repeat&&F&&" "===e.key&&A.stop(e,()=>{A.start(e)}),e.target===e.currentTarget&&Z()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&Z()&&"Enter"===e.key&&!l&&(e.preventDefault(),g&&g(e))}),J=tv(e=>{d&&" "===e.key&&F&&!e.defaultPrevented&&A.stop(e,()=>{A.pulsate(e)}),C&&C(e),g&&e.target===e.currentTarget&&Z()&&" "===e.key&&!e.defaultPrevented&&g(e)});let ee=s;"button"===ee&&(M.href||M.to)&&(ee=p);const te={};if("button"===ee){const e=!!M.formAction;te.type=void 0!==T||e?T:"button",te.disabled=l}else M.href||M.to||(te.role="button"),l&&(te["aria-disabled"]=l);const ne=ev(t,I),re={...n,centerRipple:o,component:s,disabled:l,disableRipple:u,disableTouchRipple:c,focusRipple:d,tabIndex:R,focusVisible:F},oe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Vf({root:["root",t&&"disabled",n&&"focusVisible"]},Cv,o);return n&&r&&(a.root+=` ${r}`),a})(re);return m.jsxs(kv,{as:ee,className:To(oe.root,i),ownerState:re,onBlur:K,onClick:g,onContextMenu:B,onFocus:Q,onKeyDown:X,onKeyUp:J,onMouseDown:H,onMouseLeave:q,onMouseUp:U,onDragLeave:V,onTouchEnd:Y,onTouchMove:G,onTouchStart:W,ref:ne,tabIndex:l?-1:R,type:T,...te,...M,children:[a,$?m.jsx(xv,{ref:L,center:o,...O}):null]})});function Ev(e,t,n,r=!1){return tv(o=>(n&&n(o),r||e[t](o),!0))}function jv(e=[]){return([,t])=>t&&function(e,t=[]){if(!function(e){return"string"==typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(t,e)}const Nv=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(Pg.theme=r.theme,o=ag(e(Pg)),t=o,n=r.theme),o}};function Rv(e){return Yf("MuiSvgIcon",e)}Gf("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ov=Xy("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${np(n.color)}`],t[`fontSize${np(n.fontSize)}`]]}})(Nv(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Pv=D.forwardRef(function(e,t){const n=Jy({props:e,name:"MuiSvgIcon"}),{children:r,className:o,color:a="inherit",component:i="svg",fontSize:s="medium",htmlColor:l,inheritViewBox:u=!1,titleAccess:c,viewBox:d="0 0 24 24",...f}=n,p=D.isValidElement(r)&&"svg"===r.type,h={...n,color:a,component:i,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:d,hasSvgAsChild:p},g={};u||(g.viewBox=d);const y=(e=>{const{color:t,fontSize:n,classes:r}=e;return Vf({root:["root","inherit"!==t&&`color${np(t)}`,`fontSize${np(n)}`]},Rv,r)})(h);return m.jsxs(Ov,{as:i,className:To(y.root,o),focusable:"false",color:l,"aria-hidden":!c||void 0,role:c?"img":void 0,ref:t,...g,...f,...p&&r.props,ownerState:h,children:[p?r.props.children:r,c?m.jsx("title",{children:c}):null]})});function Tv(e,t){function n(t,n){return m.jsx(Pv,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=Pv.muiName,D.memo(D.forwardRef(n))}Pv.muiName="SvgIcon";var Dv=Tv(m.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"})),Mv=Tv(m.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"})),Iv=Tv(m.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),Av=Tv(m.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}));function Lv(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t}function Fv(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:a}=e;if(!t){const e=To(n?.className,a,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},i={...n,...o,...r};return e.length>0&&(i.className=e),Object.keys(t).length>0&&(i.style=t),{props:i,internalRef:void 0}}const i=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...o,...r}),s=Lv(r),l=Lv(o),u=t(i),c=To(u?.className,n?.className,a,o?.className,r?.className),d={...u?.style,...n?.style,...o?.style,...r?.style},f={...u,...n,...l,...s};return c.length>0&&(f.className=c),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:u.ref}}function zv(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:a,internalForwardedProps:i,shouldForwardComponentProp:s=!1,...l}=t,{component:u,slots:c={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=c[e]||r,h=function(e,t,n){return"function"==typeof e?e(t,n):e}(d[e],o),{props:{component:m,...g},internalRef:y}=Fv({className:n,...l,externalForwardedProps:"root"===e?f:void 0,externalSlotProps:h}),v=ev(y,h?.ref,t.ref),b="root"===e?m||u:m,w=function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(p,{..."root"===e&&!u&&!c[e]&&i,..."root"!==e&&!c[e]&&i,...g,...b&&!s&&{as:b},...b&&s&&{component:b},ref:v},o);return[p,w]}const $v=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${np(n.size)}`],"text"===n.variant&&t[`text${np(n.color)}`],"outlined"===n.variant&&t[`outlined${np(n.color)}`],"rounded"===n.shape&&t.rounded,"page"===n.type&&t.page,("start-ellipsis"===n.type||"end-ellipsis"===n.type)&&t.ellipsis,("previous"===n.type||"next"===n.type)&&t.previousNext,("first"===n.type||"last"===n.type)&&t.firstLast]},Hv=Xy("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:$v})(Nv(({theme:e})=>({...e.typography.body2,borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Jf.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),Bv=Xy(_v,{name:"MuiPaginationItem",slot:"Root",overridesResolver:$v})(Nv(({theme:e})=>({...e.typography.body2,borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Jf.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Jf.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Jf.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Jf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},[`&.${Jf.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid ${e.alpha(e.vars.palette.common.onBackground,.23)}`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${Jf.selected}`]:{[`&.${Jf.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Jf.selected}`]:{[`&.${Jf.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(jv(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Jf.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${Jf.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Jf.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(jv(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Jf.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.5)}`,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.activatedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.activatedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Jf.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.activatedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))]}))),Vv=Xy("div",{name:"MuiPaginationItem",slot:"Icon"})(Nv(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),Uv=D.forwardRef(function(e,t){const n=Jy({props:e,name:"MuiPaginationItem"}),{className:r,color:o="standard",component:a,components:i={},disabled:s=!1,page:l,selected:u=!1,shape:c="circular",size:d="medium",slots:f={},slotProps:p={},type:h="page",variant:g="text",...y}=n,v={...n,color:o,disabled:s,selected:u,shape:c,size:d,type:h,variant:g},b=D.useContext(Zf)??!1,w=(e=>{const{classes:t,color:n,disabled:r,selected:o,size:a,shape:i,type:s,variant:l}=e;return Vf({root:["root",`size${np(a)}`,l,i,"standard"!==n&&`color${np(n)}`,"standard"!==n&&`${l}${np(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]},Xf,t)})(v),x={slots:{previous:f.previous??i.previous,next:f.next??i.next,first:f.first??i.first,last:f.last??i.last},slotProps:p},[C,S]=zv("previous",{elementType:Iv,externalForwardedProps:x,ownerState:v}),[k,_]=zv("next",{elementType:Av,externalForwardedProps:x,ownerState:v}),[E,j]=zv("first",{elementType:Dv,externalForwardedProps:x,ownerState:v}),[N,R]=zv("last",{elementType:Mv,externalForwardedProps:x,ownerState:v}),O=b?{previous:"next",next:"previous",first:"last",last:"first"}[h]:h,P={previous:C,next:k,first:E,last:N}[O],T={previous:S,next:_,first:j,last:R}[O];return"start-ellipsis"===h||"end-ellipsis"===h?m.jsx(Hv,{ref:t,ownerState:v,className:To(w.root,r),children:"…"}):m.jsxs(Bv,{ref:t,ownerState:v,component:a,disabled:s,className:To(w.root,r),...y,children:["page"===h&&l,P?m.jsx(Vv,{...T,className:w.icon,as:P}):null]})}),qv=Xy("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),Wv=Xy("ul",{name:"MuiPagination",slot:"Ul"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function Yv(e,t,n){return"page"===e?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const Gv=D.forwardRef(function(e,t){const n=Jy({props:e,name:"MuiPagination"}),{boundaryCount:r=1,className:o,color:a="standard",count:i=1,defaultPage:s=1,disabled:l=!1,getItemAriaLabel:u=Yv,hideNextButton:c=!1,hidePrevButton:d=!1,onChange:f,page:p,renderItem:h=e=>m.jsx(Uv,{...e}),shape:g="circular",showFirstButton:y=!1,showLastButton:v=!1,siblingCount:b=1,size:w="medium",variant:x="text",...C}=n,{items:S}=Qf({...n,componentName:"Pagination"}),k={...n,boundaryCount:r,color:a,count:i,defaultPage:s,disabled:l,getItemAriaLabel:u,hideNextButton:c,hidePrevButton:d,renderItem:h,shape:g,showFirstButton:y,showLastButton:v,siblingCount:b,size:w,variant:x},_=(e=>{const{classes:t,variant:n}=e;return Vf({root:["root",n],ul:["ul"]},Kf,t)})(k);return m.jsx(qv,{"aria-label":"pagination navigation",className:To(_.root,o),ownerState:k,ref:t,...C,children:m.jsx(Wv,{className:_.ul,ownerState:k,children:S.map((e,t)=>m.jsx("li",{children:h({...e,color:a,"aria-label":u(e.type,e.page,e.selected),shape:g,size:w,variant:x})},t))})})}),Kv={arrow:m.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M8.65833 15.7667C8.54866 15.7673 8.43994 15.7463 8.33841 15.7048C8.23688 15.6634 8.14453 15.6023 8.06667 15.525C7.91146 15.3689 7.82434 15.1577 7.82434 14.9375C7.82434 14.7174 7.91146 14.5062 8.06667 14.35L12.4083 10L8.06667 5.65004C7.93014 5.49062 7.85881 5.28556 7.86691 5.07583C7.87501 4.8661 7.96195 4.66715 8.11036 4.51874C8.25878 4.37032 8.45773 4.28338 8.66746 4.27528C8.87719 4.26718 9.08225 4.33852 9.24167 4.47504L14.1667 9.40837C14.2439 9.48624 14.305 9.57859 14.3465 9.68012C14.3879 9.78165 14.409 9.89037 14.4083 10C14.4053 10.2207 14.3189 10.432 14.1667 10.5917L9.225 15.525C9.07391 15.675 8.87116 15.7615 8.65833 15.7667Z",fill:"#A1A5B7"})}),info_input:m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M10 18.3332C14.6024 18.3332 18.3333 14.6022 18.3333 9.99984C18.3333 5.39746 14.6024 1.6665 10 1.6665C5.39763 1.6665 1.66667 5.39746 1.66667 9.99984C1.66667 14.6022 5.39763 18.3332 10 18.3332Z",fill:"#1868DB"}),m.jsx("path",{d:"M10 8.83301C10.221 8.83301 10.433 8.9208 10.5893 9.07708C10.7455 9.23337 10.8333 9.44533 10.8333 9.66634V13.5497C10.8333 13.7707 10.7455 13.9826 10.5893 14.1389C10.433 14.2952 10.221 14.383 10 14.383C9.77899 14.383 9.56703 14.2952 9.41075 14.1389C9.25447 13.9826 9.16667 13.7707 9.16667 13.5497V9.66634C9.16667 9.44533 9.25447 9.23337 9.41075 9.07708C9.56703 8.9208 9.77899 8.83301 10 8.83301Z",fill:"#1868DB"}),m.jsx("path",{d:"M10 7.70003C10.5753 7.70003 11.0417 7.23366 11.0417 6.65837C11.0417 6.08307 10.5753 5.6167 10 5.6167C9.42471 5.6167 8.95834 6.08307 8.95834 6.65837C8.95834 7.23366 9.42471 7.70003 10 7.70003Z",fill:"#1868DB"})]}),cube:m.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M9.90996 21.67L4.66996 18.67C4.02642 18.2997 3.4934 17.7643 3.12598 17.1192C2.75856 16.474 2.57006 15.7424 2.57996 15V9C2.57541 8.26267 2.76644 7.53731 3.13359 6.89787C3.50075 6.25843 4.03088 5.72778 4.66996 5.36L9.90996 2.36C10.5447 1.99116 11.2658 1.79688 12 1.79688C12.7341 1.79688 13.4552 1.99116 14.09 2.36L19.33 5.36C19.969 5.72778 20.4992 6.25843 20.8663 6.89787C21.2335 7.53731 21.4245 8.26267 21.42 9V15C21.4192 15.7323 21.2257 16.4514 20.8588 17.0851C20.4919 17.7188 19.9646 18.2448 19.33 18.61L14.09 21.61C13.4605 21.988 12.7422 22.1927 12.008 22.2032C11.2739 22.2137 10.55 22.0298 9.90996 21.67Z",fill:"#1868DB"}),m.jsx("path",{opacity:"0.3",d:"M20.8599 6.89C20.4965 6.2519 19.968 5.7234 19.3299 5.36L14.0899 2.36C13.4551 1.99116 12.734 1.79688 11.9999 1.79688C11.2657 1.79688 10.5447 1.99116 9.90989 2.36L4.66989 5.36C4.03179 5.7234 3.5033 6.2519 3.13989 6.89L11.9999 12L20.8599 6.89Z",fill:"#1868DB"}),m.jsx("path",{d:"M20.85 6.89014L12 12.0001L12.13 22.2201C12.8324 22.2082 13.5203 22.019 14.13 21.6701L19.37 18.6701C20.0061 18.2948 20.5311 17.7572 20.8913 17.1124C21.2515 16.4675 21.4339 15.7386 21.42 15.0001V9.00014C21.4215 8.25857 21.2247 7.53009 20.85 6.89014Z",fill:"#1868DB"})]}),magnifier:m.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M19.7083 17.8015L16.8025 15.0515C16.25 15.7628 15.5878 16.3817 14.8408 16.8848L17.8292 19.7265C17.9548 19.8733 18.1102 19.9917 18.285 20.074C18.4598 20.1563 18.6501 20.2005 18.8432 20.2038C19.0364 20.2071 19.2281 20.1694 19.4056 20.0932C19.5832 20.017 19.7425 19.9039 19.8731 19.7615C20.0037 19.6192 20.1026 19.4507 20.1633 19.2673C20.224 19.0839 20.2451 18.8897 20.2252 18.6975C20.2053 18.5053 20.1449 18.3195 20.0479 18.1525C19.9509 17.9854 19.8195 17.8408 19.6625 17.7282L19.7083 17.8015Z",fill:"#7E8299"}),m.jsx("path",{d:"M10.2117 1.83325C8.57998 1.83325 6.98492 2.31711 5.62822 3.22363C4.27151 4.13015 3.21409 5.41862 2.58967 6.92611C1.96524 8.4336 1.80187 10.0924 2.1202 11.6927C2.43852 13.2931 3.22426 14.7631 4.37804 15.9169C5.53183 17.0707 7.00183 17.8564 8.60218 18.1747C10.2025 18.4931 11.8613 18.3297 13.3688 17.7053C14.8763 17.0808 16.1648 16.0234 17.0713 14.6667C17.9778 13.31 18.4617 11.7149 18.4617 10.0833C18.4617 7.89522 17.5925 5.7968 16.0453 4.24962C14.4981 2.70245 12.3997 1.83325 10.2117 1.83325ZM10.2117 15.9133C9.06081 15.9132 7.93578 15.5721 6.97875 14.9329C6.02172 14.2937 5.27564 13.3851 4.83481 12.3221C4.39397 11.259 4.27817 10.0891 4.50202 8.9602C4.72588 7.83132 5.27935 6.79413 6.09249 5.97971C6.90563 5.16529 7.94195 4.61018 9.07048 4.38455C10.199 4.15892 11.3691 4.27288 12.4329 4.71204C13.4966 5.1512 14.4064 5.89585 15.0471 6.85187C15.6878 7.8079 16.0307 8.93239 16.0325 10.0833C16.0349 10.8488 15.8861 11.6072 15.5945 12.315C15.303 13.0229 14.8744 13.6661 14.3336 14.2078C13.7927 14.7496 13.1501 15.1791 12.4428 15.4718C11.7354 15.7644 10.9772 15.9145 10.2117 15.9133Z",fill:"#7E8299"})]}),filter_edit:m.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M17.3083 3.4917V5.4917C17.3065 5.84118 17.2313 6.18639 17.0878 6.50504C16.9443 6.82369 16.7355 7.10871 16.475 7.3417L15.5167 8.17503C15.3929 8.28554 15.2303 8.34235 15.0646 8.33298C14.899 8.3236 14.7438 8.2488 14.6333 8.12503C14.5228 8.00126 14.466 7.83867 14.4754 7.67301C14.4848 7.50735 14.5596 7.35221 14.6833 7.2417L15.6333 6.40837C15.7618 6.29272 15.8646 6.15136 15.9349 5.99344C16.0053 5.83552 16.0416 5.66458 16.0417 5.4917V3.4917C16.0417 3.16902 15.9135 2.85956 15.6853 2.63139C15.4571 2.40322 15.1477 2.27503 14.825 2.27503H4.21667C3.89399 2.27503 3.58452 2.40322 3.35635 2.63139C3.12818 2.85956 3 3.16902 3 3.4917V5.5667C3.00618 5.87894 3.13137 6.17702 3.35 6.40003L6.48333 9.57503C7.19463 10.2901 7.59322 11.2581 7.59167 12.2667V16.6667C7.59567 16.8589 7.65113 17.0465 7.75227 17.2099C7.85341 17.3734 7.99654 17.5068 8.16674 17.5961C8.33694 17.6855 8.52798 17.7276 8.71997 17.718C8.91196 17.7084 9.09787 17.6475 9.25833 17.5417L10.3917 16.7084C10.459 16.6608 10.535 16.6269 10.6154 16.6087C10.6958 16.5904 10.779 16.5882 10.8602 16.6021C10.9415 16.6161 11.0192 16.6459 11.0889 16.6898C11.1587 16.7338 11.2191 16.7911 11.2667 16.8584C11.3143 16.9257 11.3482 17.0017 11.3664 17.0821C11.3846 17.1625 11.3868 17.2457 11.3729 17.3269C11.359 17.4082 11.3292 17.4859 11.2852 17.5556C11.2412 17.6254 11.184 17.6858 11.1167 17.7334L9.975 18.5667C9.62709 18.8036 9.22141 18.9415 8.80123 18.9659C8.38105 18.9903 7.96213 18.9002 7.58916 18.7051C7.21619 18.5101 6.90316 18.2175 6.68346 17.8585C6.46376 17.4995 6.34563 17.0876 6.34167 16.6667V12.2917C6.34169 11.6108 6.07202 10.9576 5.59167 10.475L2.5 7.30003C2.03298 6.84254 1.76375 6.22032 1.75 5.5667V3.4917C1.75 2.82866 2.01339 2.19277 2.48223 1.72393C2.95107 1.25509 3.58696 0.991699 4.25 0.991699H14.8417C15.4989 1.00046 16.1263 1.26772 16.5879 1.73561C17.0496 2.20351 17.3084 2.83439 17.3083 3.4917ZM16.3583 12.1584L15.7167 12.8084L13.5583 15C13.3939 15.1657 13.1858 15.2813 12.9583 15.3334L12.075 15.5167C11.9919 15.5249 11.9081 15.5249 11.825 15.5167C11.5126 15.5114 11.2142 15.386 10.9917 15.1667C10.849 15.0271 10.7431 14.8544 10.6835 14.6639C10.6239 14.4734 10.6124 14.2711 10.65 14.075L10.8167 13.1917C10.8569 12.9611 10.9675 12.7486 11.1333 12.5834L13.925 9.72503C14.0459 9.60279 14.19 9.50591 14.3488 9.44009C14.5077 9.37426 14.6781 9.34081 14.85 9.3417C15.1962 9.34532 15.5277 9.48268 15.775 9.72503L16.3167 10.2584C16.4464 10.379 16.5506 10.5245 16.6232 10.6862C16.6957 10.8478 16.7351 11.0224 16.739 11.1996C16.7429 11.3767 16.7112 11.5528 16.6458 11.7175C16.5804 11.8822 16.4827 12.0321 16.3583 12.1584ZM14.8 10.6334L14.3167 11.1334C14.3687 11.2877 14.4624 11.4247 14.5874 11.5291C14.7124 11.6335 14.8639 11.7013 15.025 11.725L15.4583 11.2834C15.4583 11.2834 15.4583 11.2167 15.4583 11.1834L14.9167 10.65C14.8947 10.6453 14.872 10.6453 14.85 10.65L14.8 10.6334ZM14.075 12.7C13.8068 12.5397 13.5787 12.3203 13.4083 12.0584L12.0083 13.4917L11.8583 14.325L12.6917 14.1084L14.075 12.7Z",fill:"inherit"})}),notepad_edit:m.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M10.74 15.1668H5.25999C4.09532 15.1757 2.97464 14.7224 2.1436 13.9064C1.31256 13.0904 0.838979 11.9781 0.82666 10.8135V5.70681C0.830149 5.12843 0.947639 4.5564 1.17241 4.02347C1.39718 3.49054 1.72482 3.00715 2.13658 2.60096C2.54834 2.19476 3.03615 1.87374 3.5721 1.65626C4.10805 1.43877 4.68162 1.32908 5.25999 1.33348H7.61999C7.68566 1.33348 7.75067 1.34641 7.81134 1.37154C7.872 1.39666 7.92712 1.43349 7.97355 1.47992C8.01998 1.52635 8.05681 1.58147 8.08193 1.64213C8.10706 1.7028 8.11999 1.76782 8.11999 1.83348C8.11999 1.89914 8.10706 1.96416 8.08193 2.02482C8.05681 2.08548 8.01998 2.1406 7.97355 2.18703C7.92712 2.23346 7.872 2.27029 7.81134 2.29542C7.75067 2.32054 7.68566 2.33348 7.61999 2.33348H5.25999C4.36687 2.32807 3.50762 2.675 2.86863 3.29902C2.22964 3.92303 1.86244 4.77381 1.84666 5.66681V10.7735C1.86244 11.6665 2.22964 12.5173 2.86863 13.1413C3.50762 13.7653 4.36687 14.1122 5.25999 14.1068H10.74C11.6331 14.1122 12.4924 13.7653 13.1314 13.1413C13.7703 12.5173 14.1376 11.6665 14.1533 10.7735V7.42681C14.1677 7.3016 14.2276 7.18603 14.3216 7.10214C14.4157 7.01825 14.5373 6.97188 14.6633 6.97188C14.7894 6.97188 14.911 7.01825 15.005 7.10214C15.0991 7.18603 15.159 7.3016 15.1733 7.42681V10.8135C15.161 11.9781 14.6874 13.0904 13.8564 13.9064C13.0254 14.7224 11.9047 15.1757 10.74 15.1668ZM11.7867 1.83348C11.6897 1.83162 11.5936 1.85305 11.5066 1.89597C11.4196 1.93889 11.3442 2.00205 11.2867 2.08014L10.8933 2.58681C11.0259 3.12561 11.3477 3.59881 11.8 3.92014C12.2185 4.23706 12.7283 4.41012 13.2533 4.41348H13.3333L13.7267 3.90681C13.7757 3.84299 13.8116 3.77004 13.8322 3.69221C13.8528 3.61438 13.8577 3.53322 13.8467 3.45348C13.8369 3.37371 13.8105 3.29687 13.7692 3.22796C13.7278 3.15905 13.6725 3.09961 13.6067 3.05348L12.16 1.96014C12.0531 1.87754 11.9217 1.83296 11.7867 1.83348ZM11.7867 0.833477C12.1421 0.833472 12.4881 0.948023 12.7733 1.16014L14.2333 2.24014C14.405 2.36577 14.5498 2.5245 14.6592 2.70698C14.7685 2.88947 14.8402 3.092 14.8701 3.30264C14.8999 3.51328 14.8872 3.72776 14.8328 3.93343C14.7784 4.1391 14.6834 4.33179 14.5533 4.50014L14.1133 5.07348C14.0487 5.15896 13.9676 5.2307 13.8749 5.2845C13.7822 5.3383 13.6796 5.37308 13.5733 5.38681H13.2533C12.509 5.39027 11.7828 5.15679 11.18 4.72014C10.4908 4.22405 10.0146 3.48586 9.84666 2.65348C9.83083 2.54784 9.83686 2.44008 9.86438 2.33687C9.8919 2.23366 9.94033 2.1372 10.0067 2.05348L10.4467 1.48014C10.6019 1.27315 10.8032 1.10514 11.0346 0.989431C11.2661 0.873718 11.5213 0.813477 11.78 0.813477L11.7867 0.833477ZM8.74666 5.36681L7.25333 7.33348C7.18789 7.41509 7.15048 7.51561 7.14666 7.62014V9.72681C7.14345 9.75273 7.14663 9.77903 7.15593 9.80344C7.16523 9.82784 7.18035 9.8496 7.19999 9.86681C7.24074 9.90776 7.29559 9.93161 7.35333 9.93348H7.41333L9.45333 9.33348C9.55396 9.30032 9.64224 9.23759 9.70666 9.15348L11.2 7.22014C10.7255 7.0291 10.2775 6.77818 9.86666 6.47348C9.45395 6.16614 9.08403 5.80519 8.76666 5.40014M8.79999 3.96014C8.87566 3.95836 8.95029 3.97809 9.01519 4.01704C9.0801 4.05598 9.13262 4.11254 9.16666 4.18014C9.50121 4.7661 9.95553 5.27494 10.5 5.67348C11.0418 6.07813 11.6651 6.36019 12.3267 6.50014C12.3983 6.5112 12.4657 6.54121 12.5219 6.58706C12.578 6.63291 12.6209 6.69294 12.646 6.76094C12.6712 6.82893 12.6777 6.90241 12.6649 6.97377C12.6522 7.04514 12.6205 7.11178 12.5733 7.16681L10.5733 9.78014C10.3776 10.0359 10.1037 10.2208 9.79333 10.3068L7.73333 10.9068C7.62084 10.9407 7.50414 10.9587 7.38666 10.9601C7.2254 10.9628 7.06523 10.9332 6.91563 10.8729C6.76603 10.8126 6.63003 10.7229 6.51567 10.6092C6.40131 10.4955 6.31092 10.36 6.24983 10.2107C6.18874 10.0614 6.15819 9.90142 6.15999 9.74014V7.63348C6.16525 7.31374 6.27533 7.00458 6.47333 6.75348L8.47333 4.14014C8.51365 4.09054 8.56444 4.05047 8.62207 4.02281C8.6797 3.99514 8.74274 3.98058 8.80666 3.98014L8.79999 3.96014Z",fill:"inherit"}),m.jsx("path",{d:"M10.74 15.1668H5.25999C4.09532 15.1757 2.97464 14.7224 2.1436 13.9064C1.31256 13.0904 0.838979 11.9781 0.82666 10.8135V5.70681C0.830149 5.12843 0.947639 4.5564 1.17241 4.02347C1.39718 3.49054 1.72482 3.00715 2.13658 2.60096C2.54834 2.19476 3.03615 1.87374 3.5721 1.65626C4.10805 1.43877 4.68162 1.32908 5.25999 1.33348H7.61999C7.68566 1.33348 7.75067 1.34641 7.81134 1.37154C7.872 1.39666 7.92712 1.43349 7.97355 1.47992C8.01998 1.52635 8.05681 1.58147 8.08193 1.64213C8.10706 1.7028 8.11999 1.76782 8.11999 1.83348C8.11999 1.89914 8.10706 1.96416 8.08193 2.02482C8.05681 2.08548 8.01998 2.1406 7.97355 2.18703C7.92712 2.23346 7.872 2.27029 7.81134 2.29542C7.75067 2.32054 7.68566 2.33348 7.61999 2.33348H5.25999C4.36687 2.32807 3.50762 2.675 2.86863 3.29902C2.22964 3.92303 1.86244 4.77381 1.84666 5.66681V10.7735C1.86244 11.6665 2.22964 12.5173 2.86863 13.1413C3.50762 13.7653 4.36687 14.1122 5.25999 14.1068H10.74C11.6331 14.1122 12.4924 13.7653 13.1314 13.1413C13.7703 12.5173 14.1376 11.6665 14.1533 10.7735V7.42681C14.1677 7.3016 14.2276 7.18603 14.3216 7.10214C14.4157 7.01825 14.5373 6.97188 14.6633 6.97188C14.7894 6.97188 14.911 7.01825 15.005 7.10214C15.0991 7.18603 15.159 7.3016 15.1733 7.42681V10.8135C15.161 11.9781 14.6874 13.0904 13.8564 13.9064C13.0254 14.7224 11.9047 15.1757 10.74 15.1668ZM11.7867 1.83348C11.6897 1.83162 11.5936 1.85305 11.5066 1.89597C11.4196 1.93889 11.3442 2.00205 11.2867 2.08014L10.8933 2.58681C11.0259 3.12561 11.3477 3.59881 11.8 3.92014C12.2185 4.23706 12.7283 4.41012 13.2533 4.41348H13.3333L13.7267 3.90681C13.7757 3.84299 13.8116 3.77004 13.8322 3.69221C13.8528 3.61438 13.8577 3.53322 13.8467 3.45348C13.8369 3.37371 13.8105 3.29687 13.7692 3.22796C13.7278 3.15905 13.6725 3.09961 13.6067 3.05348L12.16 1.96014C12.0531 1.87754 11.9217 1.83296 11.7867 1.83348ZM11.7867 0.833477C12.1421 0.833472 12.4881 0.948023 12.7733 1.16014L14.2333 2.24014C14.405 2.36577 14.5498 2.5245 14.6592 2.70698C14.7685 2.88947 14.8402 3.092 14.8701 3.30264C14.8999 3.51328 14.8872 3.72776 14.8328 3.93343C14.7784 4.1391 14.6834 4.33179 14.5533 4.50014L14.1133 5.07348C14.0487 5.15896 13.9676 5.2307 13.8749 5.2845C13.7822 5.3383 13.6796 5.37308 13.5733 5.38681H13.2533C12.509 5.39027 11.7828 5.15679 11.18 4.72014C10.4908 4.22405 10.0146 3.48586 9.84666 2.65348C9.83083 2.54784 9.83686 2.44008 9.86438 2.33687C9.8919 2.23366 9.94033 2.1372 10.0067 2.05348L10.4467 1.48014C10.6019 1.27315 10.8032 1.10514 11.0346 0.989431C11.2661 0.873718 11.5213 0.813477 11.78 0.813477L11.7867 0.833477ZM8.74666 5.36681L7.25333 7.33348C7.18789 7.41509 7.15048 7.51561 7.14666 7.62014V9.72681C7.14345 9.75273 7.14663 9.77903 7.15593 9.80344C7.16523 9.82784 7.18035 9.8496 7.19999 9.86681C7.24074 9.90776 7.29559 9.93161 7.35333 9.93348H7.41333L9.45333 9.33348C9.55396 9.30032 9.64224 9.23759 9.70666 9.15348L11.2 7.22014C10.7255 7.0291 10.2775 6.77818 9.86666 6.47348C9.45395 6.16614 9.08403 5.80519 8.76666 5.40014M8.79999 3.96014C8.87566 3.95836 8.95029 3.97809 9.01519 4.01704C9.0801 4.05598 9.13262 4.11254 9.16666 4.18014C9.50121 4.7661 9.95553 5.27494 10.5 5.67348C11.0418 6.07813 11.6651 6.36019 12.3267 6.50014C12.3983 6.5112 12.4657 6.54121 12.5219 6.58706C12.578 6.63291 12.6209 6.69294 12.646 6.76094C12.6712 6.82893 12.6777 6.90241 12.6649 6.97377C12.6522 7.04514 12.6205 7.11178 12.5733 7.16681L10.5733 9.78014C10.3776 10.0359 10.1037 10.2208 9.79333 10.3068L7.73333 10.9068C7.62084 10.9407 7.50414 10.9587 7.38666 10.9601C7.2254 10.9628 7.06523 10.9332 6.91563 10.8729C6.76603 10.8126 6.63003 10.7229 6.51567 10.6092C6.40131 10.4955 6.31092 10.36 6.24983 10.2107C6.18874 10.0614 6.15819 9.90142 6.15999 9.74014V7.63348C6.16525 7.31374 6.27533 7.00458 6.47333 6.75348L8.47333 4.14014C8.51365 4.09054 8.56444 4.05047 8.62207 4.02281C8.6797 3.99514 8.74274 3.98058 8.80666 3.98014L8.79999 3.96014Z",fill:"black",fillOpacity:"0.2"})]}),price_tag:m.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("g",{opacity:"0.3",children:m.jsx("path",{d:"M3.55997 6.65016L3.41997 11.7402C3.39903 12.4124 3.517 13.0818 3.76649 13.7063C4.01598 14.3309 4.39164 14.8973 4.86997 15.3702L9.42997 19.9402C9.84795 20.3589 10.3444 20.6912 10.8909 20.9178C11.4374 21.1445 12.0233 21.2612 12.615 21.2612C13.2066 21.2612 13.7925 21.1445 14.339 20.9178C14.8855 20.6912 15.382 20.3589 15.8 19.9402L20.57 15.1702C20.9887 14.7522 21.321 14.2557 21.5477 13.7092C21.7743 13.1627 21.891 12.5768 21.891 11.9852C21.891 11.3935 21.7743 10.8076 21.5477 10.2611C21.321 9.71459 20.9887 9.21814 20.57 8.80016L15.96 4.19016C15.4798 3.71338 14.9078 3.33903 14.2787 3.08979C13.6496 2.84055 12.9764 2.72161 12.3 2.74016L7.29997 2.91016C6.31604 2.93547 5.37939 3.33763 4.68341 4.0336C3.98744 4.72958 3.58528 5.66623 3.55997 6.65016Z",fill:"inherit"})}),m.jsx("path",{d:"M10.23 12.2304C11.7764 12.2304 13.03 10.9768 13.03 9.43037C13.03 7.88397 11.7764 6.63037 10.23 6.63037C8.6836 6.63037 7.42999 7.88397 7.42999 9.43037C7.42999 10.9768 8.6836 12.2304 10.23 12.2304Z",fill:"inherit"}),m.jsx("path",{d:"M13.1 17.0003C12.9509 17.0022 12.8046 16.9596 12.6799 16.8779C12.5551 16.7963 12.4575 16.6793 12.3996 16.5419C12.3416 16.4045 12.3259 16.253 12.3545 16.1066C12.3831 15.9603 12.4546 15.8258 12.56 15.7203L16.56 11.7203C16.7006 11.5799 16.8912 11.501 17.09 11.501C17.2887 11.501 17.4794 11.5799 17.62 11.7203C17.6907 11.7893 17.747 11.8717 17.7854 11.9627C17.8238 12.0537 17.8435 12.1515 17.8435 12.2503C17.8435 12.3491 17.8238 12.4469 17.7854 12.5379C17.747 12.629 17.6907 12.7114 17.62 12.7803L13.67 16.7803C13.5961 16.8555 13.507 16.914 13.4087 16.9519C13.3104 16.9898 13.2052 17.0063 13.1 17.0003Z",fill:"inherit"})]}),eyeslash:m.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M2.88008 22.3404C2.67861 22.3386 2.48544 22.2599 2.34008 22.1204C2.19902 21.978 2.11987 21.7858 2.11987 21.5854C2.11987 21.385 2.19902 21.1927 2.34008 21.0504L20.6001 2.88037C20.6636 2.7878 20.7471 2.71068 20.8444 2.65467C20.9417 2.59867 21.0503 2.56523 21.1622 2.5568C21.2742 2.54838 21.3866 2.56519 21.4911 2.606C21.5957 2.64681 21.6898 2.71057 21.7665 2.79258C21.8431 2.8746 21.9004 2.97278 21.934 3.07987C21.9677 3.18697 21.9769 3.30025 21.9609 3.41137C21.9449 3.52249 21.9042 3.6286 21.8418 3.72189C21.7793 3.81518 21.6967 3.89325 21.6001 3.95037L3.40008 22.1204C3.26264 22.2595 3.07568 22.3386 2.88008 22.3404Z",fill:"black"}),m.jsx("path",{d:"M9.14993 13.1107C9.15256 12.3557 9.45368 11.6323 9.98758 11.0984C10.5215 10.5645 11.2449 10.2634 11.9999 10.2607C12.4251 10.2609 12.8448 10.3573 13.2275 10.5426C13.6102 10.7279 13.9461 10.9973 14.2099 11.3307L10.2099 15.3307C9.87756 15.0643 9.60962 14.7263 9.42608 14.3419C9.24255 13.9576 9.14815 13.5367 9.14993 13.1107ZM11.7099 15.9307C11.8065 15.9357 11.9033 15.9357 11.9999 15.9307C12.7558 15.9307 13.4807 15.6305 14.0152 15.096C14.5497 14.5615 14.8499 13.8366 14.8499 13.0807C14.8548 12.9908 14.8548 12.9007 14.8499 12.8107L11.7099 15.9307Z",fill:"black"}),m.jsx("path",{opacity:"0.3",d:"M6.05 19.5008L9.15 16.4108C8.70449 16.0196 8.34405 15.5411 8.09102 15.005C7.838 14.4688 7.69777 13.8864 7.67903 13.2938C7.66029 12.7013 7.76343 12.1112 7.98208 11.5601C8.20072 11.009 8.5302 10.5087 8.95011 10.0902C9.37001 9.67167 9.87139 9.34383 10.4232 9.12699C10.975 8.91015 11.5654 8.80893 12.1579 8.82961C12.7504 8.85029 13.3323 8.99243 13.8677 9.24721C14.403 9.50199 14.8803 9.86399 15.27 10.3108L18.43 7.16078C16.6374 5.59863 14.3743 4.68002 12 4.55078C7.27 4.55078 2 9.17078 2 13.1108C2 15.2508 3.71 17.7208 6.05 19.5008Z",fill:"black"}),m.jsx("path",{opacity:"0.3",d:"M16.0601 11.6004C16.2484 12.0817 16.3467 12.5935 16.3501 13.1104C16.3552 13.8149 16.1879 14.5101 15.8628 15.1352C15.5377 15.7604 15.0646 16.2965 14.4848 16.6968C13.905 17.0972 13.236 17.3496 12.5362 17.4322C11.8365 17.5147 11.1271 17.4248 10.4701 17.1704L7.33008 20.2904C8.74153 21.1458 10.3504 21.6212 12.0001 21.6704C17.0001 21.6704 22.0001 17.0804 22.0001 13.1104C21.8378 11.1937 20.9595 9.40848 19.5401 8.11035L16.0601 11.6004Z",fill:"black"})]}),eye_outline:m.jsx("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M7.99998 9.39988C7.5253 9.39988 7.06129 9.25912 6.66661 8.99541C6.27193 8.73169 5.96432 8.35686 5.78267 7.91832C5.60102 7.47978 5.55349 6.99722 5.6461 6.53166C5.7387 6.06611 5.96728 5.63847 6.30292 5.30282C6.63857 4.96718 7.06621 4.7386 7.53176 4.646C7.99732 4.55339 8.47988 4.60092 8.91842 4.78257C9.35696 4.96422 9.73179 5.27183 9.99551 5.66651C10.2592 6.06119 10.4 6.5252 10.4 6.99988C10.3982 7.63586 10.1448 8.24529 9.69509 8.69499C9.24539 9.1447 8.63596 9.39812 7.99998 9.39988ZM7.99998 5.59988C7.72309 5.59988 7.45241 5.68199 7.22218 5.83582C6.99195 5.98966 6.81251 6.20831 6.70655 6.46412C6.60059 6.71994 6.57286 7.00143 6.62688 7.27301C6.6809 7.54458 6.81424 7.79404 7.01003 7.98983C7.20582 8.18562 7.45528 8.31896 7.72685 8.37298C7.99843 8.427 8.27992 8.39927 8.53574 8.29331C8.79155 8.18735 9.0102 8.00791 9.16404 7.77768C9.31787 7.54745 9.39998 7.27677 9.39998 6.99988C9.39998 6.62858 9.25248 6.27248 8.98993 6.00993C8.72738 5.74738 8.37128 5.59988 7.99998 5.59988ZM7.99998 13.2065C6.19341 13.1238 4.4753 12.4006 3.15331 11.1665C1.69998 9.89321 0.833313 8.33321 0.833313 6.99988C0.833313 4.03988 4.58665 0.793213 7.99998 0.793213C11.4133 0.793213 15.1666 4.12655 15.1666 6.99988C15.1666 10.0132 11.48 13.2065 7.99998 13.2065ZM7.99998 1.79321C5.17998 1.79321 1.83331 4.61321 1.83331 6.99988C1.83331 8.03988 2.59331 9.34655 3.83331 10.4132C4.97144 11.4773 6.44482 12.1114 7.99998 12.2065C11.1733 12.2065 14.1666 9.27321 14.1666 6.99988C14.1666 4.84655 10.98 1.79321 7.99998 1.79321Z",fill:"inherit"})}),eye:m.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M11.9999 15.3504C13.5739 15.3504 14.8499 14.0744 14.8499 12.5004C14.8499 10.9264 13.5739 9.65039 11.9999 9.65039C10.4259 9.65039 9.1499 10.9264 9.1499 12.5004C9.1499 14.0744 10.4259 15.3504 11.9999 15.3504Z",fill:"black"}),m.jsx("path",{opacity:"0.3",d:"M11.9999 15.3504C13.5739 15.3504 14.8499 14.0744 14.8499 12.5004C14.8499 10.9264 13.5739 9.65039 11.9999 9.65039C10.4259 9.65039 9.1499 10.9264 9.1499 12.5004C9.1499 14.0744 10.4259 15.3504 11.9999 15.3504Z",fill:"black"}),m.jsx("path",{opacity:"0.3",d:"M12 3.94043C7.27 3.94043 2 8.56043 2 12.5004C2 16.2604 7.27 21.0604 12 21.0604C17 21.0604 22 16.4704 22 12.5004C22 8.68043 16.73 3.94043 12 3.94043ZM12 16.8504C11.1397 16.8504 10.2986 16.5953 9.58327 16.1173C8.86792 15.6393 8.31037 14.96 7.98112 14.1651C7.65188 13.3702 7.56574 12.4956 7.73358 11.6518C7.90143 10.808 8.31573 10.0329 8.92409 9.42452C9.53244 8.81616 10.3075 8.40186 11.1514 8.23401C11.9952 8.06617 12.8698 8.15231 13.6647 8.48155C14.4595 8.81079 15.1389 9.36834 15.6169 10.0837C16.0949 10.7991 16.35 11.6401 16.35 12.5004C16.35 13.6541 15.8917 14.7606 15.0759 15.5763C14.2601 16.3921 13.1537 16.8504 12 16.8504Z",fill:"black"})]}),trash:m.jsx("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M3.51994 15.1668C2.96424 15.1616 2.43084 14.9475 2.02573 14.5671C1.62061 14.1867 1.37343 13.6678 1.33328 13.1135L0.846611 6.15352C0.842233 6.08785 0.850832 6.02197 0.871915 5.95964C0.892998 5.8973 0.926153 5.83972 0.969487 5.7902C1.01282 5.74067 1.06549 5.70017 1.12447 5.671C1.18346 5.64183 1.24762 5.62456 1.31328 5.62018C1.37894 5.61581 1.44482 5.6244 1.50716 5.64549C1.56949 5.66657 1.62707 5.69973 1.67659 5.74306C1.72612 5.78639 1.76662 5.83906 1.79579 5.89804C1.82497 5.95703 1.84223 6.02119 1.84661 6.08685L2.31994 13.0468C2.34358 13.3534 2.48268 13.6395 2.70914 13.8474C2.9356 14.0553 3.23254 14.1694 3.53994 14.1668L8.57328 14.1068C8.8791 14.1038 9.17223 13.9842 9.39278 13.7723C9.61334 13.5604 9.74467 13.2723 9.75994 12.9668L10.1533 6.08685C10.1635 5.95423 10.2249 5.83076 10.3243 5.74246C10.4238 5.65417 10.5537 5.60794 10.6866 5.61352C10.8181 5.6221 10.9409 5.68224 11.0283 5.78086C11.1157 5.87948 11.1606 6.00862 11.1533 6.14018L10.7599 13.0268C10.7264 13.5836 10.4839 14.1072 10.081 14.4928C9.67801 14.8785 9.1443 15.0978 8.58661 15.1068L3.55328 15.1668H3.51994ZM7.98661 8.56685C7.98488 8.43478 7.93165 8.3086 7.83825 8.2152C7.74486 8.12181 7.61868 8.06858 7.48661 8.06685H4.51328C4.38067 8.06685 4.25349 8.11953 4.15972 8.21329C4.06596 8.30706 4.01328 8.43424 4.01328 8.56685C4.01328 8.69946 4.06596 8.82663 4.15972 8.9204C4.25349 9.01417 4.38067 9.06685 4.51328 9.06685H7.48661C7.55338 9.06863 7.61984 9.05701 7.68205 9.03268C7.74426 9.00836 7.80096 8.97181 7.84881 8.9252C7.89667 8.87859 7.93469 8.82287 7.96065 8.76132C7.98661 8.69977 7.99997 8.63365 7.99994 8.56685H7.98661ZM7.46661 11.0335C7.46661 10.9009 7.41393 10.7737 7.32016 10.68C7.2264 10.5862 7.09922 10.5335 6.96661 10.5335H5.03328C4.90067 10.5335 4.77349 10.5862 4.67972 10.68C4.58596 10.7737 4.53328 10.9009 4.53328 11.0335C4.53328 11.1661 4.58596 11.2933 4.67972 11.3871C4.77349 11.4808 4.90067 11.5335 5.03328 11.5335H6.96661C7.09868 11.5318 7.22486 11.4786 7.31825 11.3852C7.41165 11.2918 7.46488 11.1656 7.46661 11.0335ZM11.9999 4.34685C11.9837 4.46582 11.9247 4.5748 11.8338 4.65334C11.743 4.73189 11.6267 4.77462 11.5066 4.77352H11.4333C7.83463 4.27895 4.18525 4.27895 0.586611 4.77352C0.52046 4.78494 0.452697 4.78311 0.387261 4.76812C0.321825 4.75314 0.260019 4.7253 0.205434 4.68622C0.15085 4.64714 0.104575 4.5976 0.0692985 4.54049C0.0340221 4.48338 0.0104474 4.41982 -5.58854e-05 4.35352C-0.0212122 4.22268 0.0104398 4.08881 0.0879442 3.9813C0.165449 3.87379 0.282465 3.80146 0.413277 3.78018C0.499944 3.78018 1.41994 3.62018 2.86661 3.50685L3.10661 2.25352C3.18278 1.85342 3.39637 1.49252 3.71044 1.23323C4.02452 0.973936 4.41933 0.832548 4.82661 0.833516H7.17994C7.59027 0.831559 7.98819 0.974125 8.30391 1.23621C8.61963 1.4983 8.83301 1.86317 8.90661 2.26685L9.13328 3.50685C9.92661 3.57352 10.7399 3.65352 11.5733 3.78018C11.6386 3.78918 11.7015 3.811 11.7583 3.84439C11.8152 3.87778 11.8648 3.92209 11.9045 3.97476C11.9441 4.02742 11.973 4.08741 11.9894 4.15127C12.0058 4.21513 12.0093 4.2816 11.9999 4.34685ZM5.70661 3.39352H8.09328L7.91994 2.44685C7.88875 2.27498 7.79829 2.11949 7.66431 2.00743C7.53032 1.89537 7.36128 1.83383 7.18661 1.83352H4.83328C4.65875 1.83327 4.48955 1.89362 4.35458 2.00427C4.21962 2.11492 4.12726 2.269 4.09328 2.44018L3.91328 3.39352H5.70661Z",fill:"#F1416C"})}),trash2:m.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M10 2.25C9.58579 2.25 9.25 2.58579 9.25 3V3.75H5C4.58579 3.75 4.25 4.08579 4.25 4.5C4.25 4.91421 4.58579 5.25 5 5.25H19C19.4142 5.25 19.75 4.91421 19.75 4.5C19.75 4.08579 19.4142 3.75 19 3.75H14.75V3C14.75 2.58579 14.4142 2.25 14 2.25H10Z",fill:"#F1416C"}),m.jsx("path",{d:"M10 10.65C10.4142 10.65 10.75 10.9858 10.75 11.4L10.75 18.4C10.75 18.8142 10.4142 19.15 10 19.15C9.58579 19.15 9.25 18.8142 9.25 18.4L9.25 11.4C9.25 10.9858 9.58579 10.65 10 10.65Z",fill:"#F1416C"}),m.jsx("path",{d:"M14.75 11.4C14.75 10.9858 14.4142 10.65 14 10.65C13.5858 10.65 13.25 10.9858 13.25 11.4V18.4C13.25 18.8142 13.5858 19.15 14 19.15C14.4142 19.15 14.75 18.8142 14.75 18.4V11.4Z",fill:"#F1416C"}),m.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99142 7.91718C6.03363 7.53735 6.35468 7.25 6.73684 7.25H17.2632C17.6453 7.25 17.9664 7.53735 18.0086 7.91718L18.2087 9.71852C18.5715 12.9838 18.5715 16.2793 18.2087 19.5446L18.189 19.722C18.045 21.0181 17.0404 22.0517 15.7489 22.2325C13.2618 22.5807 10.7382 22.5807 8.25108 22.2325C6.95954 22.0517 5.955 21.0181 5.81098 19.722L5.79128 19.5446C5.42846 16.2793 5.42846 12.9838 5.79128 9.71852L5.99142 7.91718ZM7.40812 8.75L7.2821 9.88417C6.93152 13.0394 6.93152 16.2238 7.2821 19.379L7.3018 19.5563C7.37011 20.171 7.84652 20.6612 8.45905 20.747C10.8082 21.0758 13.1918 21.0758 15.5409 20.747C16.1535 20.6612 16.6299 20.171 16.6982 19.5563L16.7179 19.379C17.0685 16.2238 17.0685 13.0394 16.7179 9.88417L16.5919 8.75H7.40812Z",fill:"#F1416C"})]}),trash_outline:m.jsx("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M3.51994 15.1668C2.96424 15.1616 2.43084 14.9475 2.02573 14.5671C1.62061 14.1867 1.37343 13.6678 1.33328 13.1135L0.846611 6.15352C0.842233 6.08785 0.850832 6.02197 0.871915 5.95964C0.892998 5.8973 0.926153 5.83972 0.969487 5.7902C1.01282 5.74067 1.06549 5.70017 1.12447 5.671C1.18346 5.64183 1.24762 5.62456 1.31328 5.62018C1.37894 5.61581 1.44482 5.6244 1.50716 5.64549C1.56949 5.66657 1.62707 5.69973 1.67659 5.74306C1.72612 5.78639 1.76662 5.83906 1.79579 5.89804C1.82497 5.95703 1.84223 6.02119 1.84661 6.08685L2.31994 13.0468C2.34358 13.3534 2.48268 13.6395 2.70914 13.8474C2.9356 14.0553 3.23254 14.1694 3.53994 14.1668L8.57328 14.1068C8.8791 14.1038 9.17223 13.9842 9.39278 13.7723C9.61334 13.5604 9.74467 13.2723 9.75994 12.9668L10.1533 6.08685C10.1635 5.95423 10.2249 5.83076 10.3243 5.74246C10.4238 5.65417 10.5537 5.60794 10.6866 5.61352C10.8181 5.6221 10.9409 5.68224 11.0283 5.78086C11.1157 5.87948 11.1606 6.00862 11.1533 6.14018L10.7599 13.0268C10.7264 13.5836 10.4839 14.1072 10.081 14.4928C9.67801 14.8785 9.1443 15.0978 8.58661 15.1068L3.55328 15.1668H3.51994ZM7.98661 8.56685C7.98488 8.43478 7.93165 8.3086 7.83825 8.2152C7.74486 8.12181 7.61868 8.06858 7.48661 8.06685H4.51328C4.38067 8.06685 4.25349 8.11953 4.15972 8.21329C4.06596 8.30706 4.01328 8.43424 4.01328 8.56685C4.01328 8.69946 4.06596 8.82663 4.15972 8.9204C4.25349 9.01417 4.38067 9.06685 4.51328 9.06685H7.48661C7.55338 9.06863 7.61984 9.05701 7.68205 9.03268C7.74426 9.00836 7.80096 8.97181 7.84881 8.9252C7.89667 8.87859 7.93469 8.82287 7.96065 8.76132C7.98661 8.69977 7.99997 8.63365 7.99994 8.56685H7.98661ZM7.46661 11.0335C7.46661 10.9009 7.41393 10.7737 7.32016 10.68C7.2264 10.5862 7.09922 10.5335 6.96661 10.5335H5.03328C4.90067 10.5335 4.77349 10.5862 4.67972 10.68C4.58596 10.7737 4.53328 10.9009 4.53328 11.0335C4.53328 11.1661 4.58596 11.2933 4.67972 11.3871C4.77349 11.4808 4.90067 11.5335 5.03328 11.5335H6.96661C7.09868 11.5318 7.22486 11.4786 7.31825 11.3852C7.41165 11.2918 7.46488 11.1656 7.46661 11.0335ZM11.9999 4.34685C11.9837 4.46582 11.9247 4.5748 11.8338 4.65334C11.743 4.73189 11.6267 4.77462 11.5066 4.77352H11.4333C7.83463 4.27895 4.18525 4.27895 0.586611 4.77352C0.52046 4.78494 0.452697 4.78311 0.387261 4.76812C0.321825 4.75314 0.260019 4.7253 0.205434 4.68622C0.15085 4.64714 0.104575 4.5976 0.0692985 4.54049C0.0340221 4.48338 0.0104474 4.41982 -5.58854e-05 4.35352C-0.0212122 4.22268 0.0104398 4.08881 0.0879442 3.9813C0.165449 3.87379 0.282465 3.80146 0.413277 3.78018C0.499944 3.78018 1.41994 3.62018 2.86661 3.50685L3.10661 2.25352C3.18278 1.85342 3.39637 1.49252 3.71044 1.23323C4.02452 0.973936 4.41933 0.832548 4.82661 0.833516H7.17994C7.59027 0.831559 7.98819 0.974125 8.30391 1.23621C8.61963 1.4983 8.83301 1.86317 8.90661 2.26685L9.13328 3.50685C9.92661 3.57352 10.7399 3.65352 11.5733 3.78018C11.6386 3.78918 11.7015 3.811 11.7583 3.84439C11.8152 3.87778 11.8648 3.92209 11.9045 3.97476C11.9441 4.02742 11.973 4.08741 11.9894 4.15127C12.0058 4.21513 12.0093 4.2816 11.9999 4.34685ZM5.70661 3.39352H8.09328L7.91994 2.44685C7.88875 2.27498 7.79829 2.11949 7.66431 2.00743C7.53032 1.89537 7.36128 1.83383 7.18661 1.83352H4.83328C4.65875 1.83327 4.48955 1.89362 4.35458 2.00427C4.21962 2.11492 4.12726 2.269 4.09328 2.44018L3.91328 3.39352H5.70661Z",fill:"inherit"})}),plus_squared:m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M9.16667 10.8333H5.83333C5.61232 10.8333 5.40036 10.7455 5.24408 10.5893C5.0878 10.433 5 10.221 5 10C5 9.77899 5.0878 9.56703 5.24408 9.41075C5.40036 9.25447 5.61232 9.16667 5.83333 9.16667H9.16667V10.8333ZM14.1667 9.16667H10.8333V10.8333H14.1667C14.3877 10.8333 14.5996 10.7455 14.7559 10.5893C14.9122 10.433 15 10.221 15 10C15 9.77899 14.9122 9.56703 14.7559 9.41075C14.5996 9.25447 14.3877 9.16667 14.1667 9.16667Z",fill:"white"}),m.jsx("path",{opacity:"0.3",d:"M13.4915 1.66667H6.50817C3.83419 1.66667 1.6665 3.83436 1.6665 6.50834V13.4917C1.6665 16.1657 3.83419 18.3333 6.50817 18.3333H13.4915C16.1655 18.3333 18.3332 16.1657 18.3332 13.4917V6.50834C18.3332 3.83436 16.1655 1.66667 13.4915 1.66667Z",fill:"white"}),m.jsx("path",{d:"M14.1667 9.16667H10.8333V5.83333C10.8333 5.61232 10.7455 5.40036 10.5893 5.24408C10.433 5.0878 10.221 5 10 5C9.77899 5 9.56702 5.0878 9.41074 5.24408C9.25446 5.40036 9.16667 5.61232 9.16667 5.83333V9.16667H5.83333C5.61232 9.16667 5.40036 9.25446 5.24408 9.41074C5.0878 9.56702 5 9.77899 5 10C5 10.221 5.0878 10.433 5.24408 10.5893C5.40036 10.7455 5.61232 10.8333 5.83333 10.8333H9.16667V14.1667C9.16667 14.3877 9.25446 14.5996 9.41074 14.7559C9.56702 14.9122 9.77899 15 10 15C10.221 15 10.433 14.9122 10.5893 14.7559C10.7455 14.5996 10.8333 14.3877 10.8333 14.1667V10.8333H14.1667C14.3877 10.8333 14.5996 10.7455 14.7559 10.5893C14.9122 10.433 15 10.221 15 10C15 9.77899 14.9122 9.56702 14.7559 9.41074C14.5996 9.25446 14.3877 9.16667 14.1667 9.16667Z",fill:"white"})]}),plus_squared2:m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M9.16667 10.8332H5.83333C5.61232 10.8332 5.40036 10.7454 5.24408 10.5891C5.0878 10.4328 5 10.2209 5 9.99984C5 9.77882 5.0878 9.56686 5.24408 9.41058C5.40036 9.2543 5.61232 9.1665 5.83333 9.1665H9.16667V10.8332ZM14.1667 9.1665H10.8333V10.8332H14.1667C14.3877 10.8332 14.5996 10.7454 14.7559 10.5891C14.9122 10.4328 15 10.2209 15 9.99984C15 9.77882 14.9122 9.56686 14.7559 9.41058C14.5996 9.2543 14.3877 9.1665 14.1667 9.1665Z",fill:"#1868DB"}),m.jsx("path",{opacity:"0.3",d:"M13.4917 1.6665H6.50832C3.83434 1.6665 1.66666 3.83419 1.66666 6.50817V13.4915C1.66666 16.1655 3.83434 18.3332 6.50832 18.3332H13.4917C16.1656 18.3332 18.3333 16.1655 18.3333 13.4915V6.50817C18.3333 3.83419 16.1656 1.6665 13.4917 1.6665Z",fill:"#1868DB"}),m.jsx("path",{d:"M14.1667 9.16667H10.8333V5.83333C10.8333 5.61232 10.7455 5.40036 10.5893 5.24408C10.433 5.0878 10.221 5 10 5C9.77899 5 9.56702 5.0878 9.41074 5.24408C9.25446 5.40036 9.16667 5.61232 9.16667 5.83333V9.16667H5.83333C5.61232 9.16667 5.40036 9.25446 5.24408 9.41074C5.0878 9.56702 5 9.77899 5 10C5 10.221 5.0878 10.433 5.24408 10.5893C5.40036 10.7455 5.61232 10.8333 5.83333 10.8333H9.16667V14.1667C9.16667 14.3877 9.25446 14.5996 9.41074 14.7559C9.56702 14.9122 9.77899 15 10 15C10.221 15 10.433 14.9122 10.5893 14.7559C10.7455 14.5996 10.8333 14.3877 10.8333 14.1667V10.8333H14.1667C14.3877 10.8333 14.5996 10.7455 14.7559 10.5893C14.9122 10.433 15 10.221 15 10C15 9.77899 14.9122 9.56702 14.7559 9.41074C14.5996 9.25446 14.3877 9.16667 14.1667 9.16667Z",fill:"#1868DB"})]}),plus_circle:m.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M9.00008 0.666992C7.35191 0.666992 5.74074 1.15573 4.37033 2.07141C2.99992 2.98709 1.93182 4.28858 1.30109 5.8113C0.670359 7.33401 0.505331 9.00957 0.826874 10.6261C1.14842 12.2426 1.94209 13.7274 3.10753 14.8929C4.27297 16.0583 5.75782 16.852 7.37433 17.1735C8.99084 17.4951 10.6664 17.3301 12.1891 16.6993C13.7118 16.0686 15.0133 15.0005 15.929 13.6301C16.8447 12.2597 17.3334 10.6485 17.3334 9.00033C17.3334 7.90598 17.1179 6.82234 16.6991 5.8113C16.2803 4.80025 15.6665 3.88159 14.8926 3.10777C14.1188 2.33395 13.2002 1.72012 12.1891 1.30133C11.1781 0.88254 10.0944 0.666992 9.00008 0.666992ZM13.1668 9.83366H9.83342V13.167C9.83342 13.388 9.74562 13.6 9.58934 13.7562C9.43306 13.9125 9.2211 14.0003 9.00008 14.0003C8.77907 14.0003 8.56711 13.9125 8.41083 13.7562C8.25455 13.6 8.16675 13.388 8.16675 13.167V9.83366H4.83342C4.6124 9.83366 4.40044 9.74586 4.24416 9.58958C4.08788 9.4333 4.00008 9.22134 4.00008 9.00033C4.00008 8.77931 4.08788 8.56735 4.24416 8.41107C4.40044 8.25479 4.6124 8.16699 4.83342 8.16699H8.16675V4.83366C8.16675 4.61265 8.25455 4.40068 8.41083 4.2444C8.56711 4.08812 8.77907 4.00033 9.00008 4.00033C9.2211 4.00033 9.43306 4.08812 9.58934 4.2444C9.74562 4.40068 9.83342 4.61265 9.83342 4.83366V8.16699H13.1668C13.3878 8.16699 13.5997 8.25479 13.756 8.41107C13.9123 8.56735 14.0001 8.77931 14.0001 9.00033C14.0001 9.22134 13.9123 9.4333 13.756 9.58958C13.5997 9.74586 13.3878 9.83366 13.1668 9.83366Z",fill:"black"})}),close:m.jsx("svg",{width:"27",height:"27",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M15.0862 13.5L19.125 9.49499C19.3398 9.27718 19.4593 8.98295 19.4572 8.67703C19.4551 8.37112 19.3315 8.07856 19.1137 7.86374C18.8959 7.64891 18.6017 7.52941 18.2958 7.53152C17.9898 7.53363 17.6973 7.65718 17.4825 7.87499L13.5 11.9137L9.51747 7.95374C9.30669 7.74421 9.02155 7.6266 8.72435 7.6266C8.42714 7.6266 8.142 7.74421 7.93122 7.95374C7.82578 8.05832 7.74208 8.18275 7.68497 8.31984C7.62785 8.45693 7.59845 8.60398 7.59845 8.75249C7.59845 8.901 7.62785 9.04805 7.68497 9.18514C7.74208 9.32223 7.82578 9.44666 7.93122 9.55124L11.9137 13.5L7.87497 17.505C7.66014 17.7228 7.54064 18.017 7.54275 18.3229C7.54486 18.6289 7.66841 18.9214 7.88622 19.1362C8.10403 19.3511 8.39826 19.4706 8.70417 19.4685C9.01009 19.4663 9.30264 19.3428 9.51747 19.125L13.5 15.0862L17.4825 19.0462C17.6933 19.2558 17.9784 19.3734 18.2756 19.3734C18.5728 19.3734 18.8579 19.2558 19.0687 19.0462C19.1742 18.9417 19.2579 18.8172 19.315 18.6801C19.3721 18.543 19.4015 18.396 19.4015 18.2475C19.4015 18.099 19.3721 17.9519 19.315 17.8148C19.2579 17.6777 19.1742 17.5533 19.0687 17.4487L15.0862 13.5Z",fill:"#1868DB"})}),close2:m.jsx("svg",{width:"27",height:"27",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M15.0862 13.5L19.125 9.49499C19.3398 9.27718 19.4593 8.98295 19.4572 8.67703C19.4551 8.37112 19.3315 8.07856 19.1137 7.86374C18.8959 7.64891 18.6017 7.52941 18.2958 7.53152C17.9898 7.53363 17.6973 7.65718 17.4825 7.87499L13.5 11.9137L9.51747 7.95374C9.30669 7.74421 9.02155 7.6266 8.72435 7.6266C8.42714 7.6266 8.142 7.74421 7.93122 7.95374C7.82578 8.05832 7.74208 8.18275 7.68497 8.31984C7.62785 8.45693 7.59845 8.60398 7.59845 8.75249C7.59845 8.901 7.62785 9.04805 7.68497 9.18514C7.74208 9.32223 7.82578 9.44666 7.93122 9.55124L11.9137 13.5L7.87497 17.505C7.66014 17.7228 7.54064 18.017 7.54275 18.3229C7.54486 18.6289 7.66841 18.9214 7.88622 19.1362C8.10403 19.3511 8.39826 19.4706 8.70417 19.4685C9.01009 19.4663 9.30264 19.3428 9.51747 19.125L13.5 15.0862L17.4825 19.0462C17.6933 19.2558 17.9784 19.3734 18.2756 19.3734C18.5728 19.3734 18.8579 19.2558 19.0687 19.0462C19.1742 18.9417 19.2579 18.8172 19.315 18.6801C19.3721 18.543 19.4015 18.396 19.4015 18.2475C19.4015 18.099 19.3721 17.9519 19.315 17.8148C19.2579 17.6777 19.1742 17.5533 19.0687 17.4487L15.0862 13.5Z",fill:"inherit"})}),close_custom:m.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M17.0001 16.9298C16.8127 17.1161 16.5593 17.2206 16.2951 17.2206C16.0309 17.2206 15.7774 17.1161 15.5901 16.9298L7.05007 8.48985C6.95634 8.39688 6.88195 8.28628 6.83118 8.16442C6.78041 8.04256 6.75427 7.91186 6.75427 7.77985C6.75427 7.64783 6.78041 7.51713 6.83118 7.39527C6.88195 7.27341 6.95634 7.16281 7.05007 7.06985C7.23743 6.88359 7.49088 6.77905 7.75507 6.77905C8.01926 6.77905 8.27271 6.88359 8.46007 7.06985L17.0001 15.5098C17.0938 15.6028 17.1682 15.7134 17.219 15.8353C17.2697 15.9571 17.2959 16.0878 17.2959 16.2198C17.2959 16.3519 17.2697 16.4826 17.219 16.6044C17.1682 16.7263 17.0938 16.8369 17.0001 16.9298Z",fill:"#202125"}),m.jsx("path",{opacity:"0.3",d:"M8.46004 16.9999C8.26909 17.1935 8.00904 17.3033 7.73711 17.3052C7.46518 17.3071 7.20365 17.2009 7.01004 17.0099C6.81643 16.819 6.70661 16.5589 6.70474 16.287C6.70286 16.0151 6.80909 15.7535 7.00004 15.5599L15.54 6.99991C15.731 6.8063 15.991 6.69648 16.263 6.6946C16.5349 6.69273 16.7964 6.79895 16.99 6.98991C17.1836 7.18087 17.2935 7.44091 17.2953 7.71284C17.2972 7.98477 17.191 8.2463 17 8.43991L8.46004 16.9999Z",fill:"#202125"})]}),expand:m.jsx("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M14.1667 29.75V26.9167H9.08083L15.4558 20.5417L13.4583 18.5442L7.08333 24.9192V19.8333H4.25V29.75H14.1667ZM20.5417 15.4558L26.9167 9.08083V14.1667H29.75V4.25H19.8333V7.08333H24.9192L18.5442 13.4583L20.5417 15.4558Z",fill:"#5E6278"})}),error:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M12 21C7.0293 21 3 16.9707 3 12C3 7.0293 7.0293 3 12 3C16.9707 3 21 7.0293 21 12C21 16.9707 16.9707 21 12 21ZM11.1 14.7V16.5H12.9V14.7H11.1ZM11.1 7.5V12.9H12.9V7.5H11.1Z",fill:"inherit"})}),printer_blue:m.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M12.1333 4.66602H3.86667C2.83574 4.66602 2 5.50175 2 6.53268V10.1327C2 11.1636 2.83574 11.9993 3.86667 11.9993H12.1333C13.1643 11.9993 14 11.1636 14 10.1327V6.53268C14 5.50175 13.1643 4.66602 12.1333 4.66602Z",fill:"#1868DB"}),m.jsx("path",{d:"M6.83366 1.33301H9.17366C9.74714 1.33477 10.2965 1.56382 10.7014 1.96996C11.1063 2.3761 11.3337 2.92619 11.3337 3.49967V4.66634H4.66699V3.49967C4.66699 2.92504 4.89527 2.37394 5.30159 1.96761C5.70792 1.56128 6.25902 1.33301 6.83366 1.33301Z",fill:"#1868DB"}),m.jsx("path",{d:"M5.33301 10H10.6663V12.6133C10.6663 13.1579 10.45 13.6802 10.0649 14.0653C9.67986 14.4503 9.15759 14.6667 8.61301 14.6667H7.38634C6.84176 14.6667 6.31949 14.4503 5.93442 14.0653C5.54934 13.6802 5.33301 13.1579 5.33301 12.6133V10Z",fill:"#1868DB"}),m.jsx("path",{d:"M6.66699 7.83301H4.66699C4.53438 7.83301 4.40721 7.78033 4.31344 7.68656C4.21967 7.59279 4.16699 7.46562 4.16699 7.33301C4.16699 7.2004 4.21967 7.07322 4.31344 6.97945C4.40721 6.88569 4.53438 6.83301 4.66699 6.83301H6.66699C6.7996 6.83301 6.92678 6.88569 7.02055 6.97945C7.11431 7.07322 7.16699 7.2004 7.16699 7.33301C7.16699 7.46562 7.11431 7.59279 7.02055 7.68656C6.92678 7.78033 6.7996 7.83301 6.66699 7.83301Z",fill:"black"}),m.jsx("path",{d:"M11.3337 10.5H4.66699C4.53438 10.5 4.40721 10.4473 4.31344 10.3536C4.21967 10.2598 4.16699 10.1326 4.16699 10C4.16699 9.86739 4.21967 9.74022 4.31344 9.64645C4.40721 9.55268 4.53438 9.5 4.66699 9.5H11.3337C11.4663 9.5 11.5934 9.55268 11.6872 9.64645C11.781 9.74022 11.8337 9.86739 11.8337 10C11.8337 10.1326 11.781 10.2598 11.6872 10.3536C11.5934 10.4473 11.4663 10.5 11.3337 10.5Z",fill:"black"})]})};function Qv({showBulkActions:e=!0,meta:t}){const n=J(),{currentPage:r,perview:o}=ne(e=>e.app);return D.useEffect(()=>{t&&r>t?.last_page&&n(Ht(1))},[t?.per_page]),m.jsxs("div",{className:Ya("flex items-center justify-between gap-4 flex-wrap",t&&t?.total>0?null:"hidden"),children:[e?m.jsxs("div",{className:"flex items-center gap-2.5 shrink-0",children:[m.jsxs(Mf,{children:[m.jsx(If,{asChild:!0,children:m.jsxs("button",{className:"rounded-md h-9 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 ",children:[o,m.jsx("span",{className:"rotate-90",children:Kv.arrow})]})}),m.jsx(Af,{align:"center",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5",children:[7,10,20].map((e,t)=>m.jsx(Lf,{className:`capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] ${o===e?"bg-primary_light text-primary":"text-gray-700"} `,onClick:()=>n(Bt(e)),children:e},t))})]}),m.jsxs("p",{className:"font-normal text-gray-600 text-[15px]",children:["Showing ",t?.from," - ",t?.to," of ",t?.total]})]}):null,m.jsx(Gv,{count:t?.last_page||1,page:t?.current_page??1,shape:"rounded",color:"primary",onChange:(e,t)=>{n(Ht(t))}})]})}function Zv({props:e={}}){return m.jsxs("div",{className:"flex flex-col gap-3 items-center py-24",children:[m.jsx("p",{className:"font-bold text-sm",children:e.header??"No item attached"}),m.jsx("p",{className:"font-bold text-[13px] text-gray-700",children:e.subText??"Add a new item to start managing your orders."})]})}function Xv({columns:e,data:t,tbhRowClass:n,tHeadClass:r,tbCellClass:o,meta:a,showBulkActions:i,showPaginate:s=!0,emptyData:l,emptyProps:u,loading:c,accordionData:d,hasAccordion:f,bodyRowClass:p,tableContainerClass:h,firstCellClass:g,lastCellClass:y,showAccordionDropdown:v=!0,onToggleAccordion:b}){const[w,x]=D.useState(null),C=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=D.useState(()=>({current:Ro(t)})),[r,o]=D.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{o(t),null==e.onStateChange||e.onStateChange(t)}})),n.current}({data:t,columns:e,getCoreRowModel:e=>Ar(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,a){void 0===o&&(o=0);const i=[];for(let l=0;l<t.length;l++){const u=Br(e,e._getRowId(t[l],l,a),t[l],l,o,0,null==a?void 0:a.id);var s;n.flatRows.push(u),n.rowsById[u.id]=u,i.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[l],l),null!=(s=u.originalSubRows)&&s.length&&(u.subRows=r(u.originalSubRows,o+1,u)))}return i};return n.rows=r(t),n},Lr(e.options,"debugTable",0,()=>e._autoResetPageIndex()))});return m.jsxs("div",{className:"flex flex-col gap-[30px]",children:[m.jsx("div",{className:`shadow-[0_3px_4px_0_#00000008] ${h}`,children:m.jsxs(Ga,{children:[m.jsx(Ka,{children:C.getHeaderGroups().map(e=>m.jsx(Za,{className:Ya("border-gray-300 bg-gray-100 hover:!bg-gray-100 rounded-xl",n),children:e.headers.map(e=>m.jsx(Xa,{className:Ya("text-dark text-sm capitalize font-bold",r),children:e.isPlaceholder?null:Oo(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),m.jsx(Qa,{children:c?Array(5).fill(null).map((e,t)=>m.jsx(M.Fragment,{children:C.getHeaderGroups().map(e=>m.jsx(Za,{className:Ya("border-gray-300 hover:!bg-gray-100 rounded-xl"),children:e.headers.map(e=>m.jsx(Ja,{children:m.jsx(ei,{className:"w-full h-6 rounded-lg"})},e.id))},e.id))},t)):C?.getRowModel().rows?.length?C?.getRowModel().rows.map((e,t)=>m.jsx(M.Fragment,{children:m.jsx(Za,{onClick:()=>((e,t)=>{x(t=>t===e?null:e),b?.(e,t)})(t,e.original),"data-state":e.getIsSelected()&&"selected",className:`border-gray-300 hover:!bg-gray-100 data-[state=selected]:bg-gray-100 ${p} `,children:e.getVisibleCells().map((n,r)=>m.jsx(Ja,{className:Ya("text-gray-500 text-sm font-bold",o,0===r&&g,r===e.getVisibleCells().length-1&&y),children:m.jsxs("div",{className:"flex",children:[f&&v&&0===r&&m.jsx("div",{className:"cursor-pointer inline",children:m.jsx("div",{className:"transform transition-transform duration-200 "+(w===t?"-rotate-90":"rotate-90"),children:Kv.arrow})})," ",m.jsx("div",{children:Oo(n.column.columnDef.cell,n.getContext())})]})},n.id))},e.id)},e.id)):m.jsx(Za,{children:m.jsx(Ja,{colSpan:e.length,className:"h-24 text-center hover:bg-gray-100",children:l?m.jsx(Zv,{props:u}):"No results found."})})})]})}),s&&m.jsx(Qv,{showBulkActions:i,meta:a})]})}function Jv(e,t="NGN",n="en-NG"){isNaN(e)&&(e=0);return new Intl.NumberFormat(n,{style:"currency",currency:t,minimumFractionDigits:2,maximumFractionDigits:6}).format(e)}function eb(e=0){if(null==e)return"0";if(isNaN(e))return"0";{const[t,n]=e.toString().split("."),r=t.replace(/\B(?=(\d{3})+(?!\d))/g,",");return n?`${r}.${n}`:r}}function tb(){const e="undefined"!=typeof window?sessionStorage.getItem("login_data"):null,t=e?JSON.parse(e).current_location:null,n=t?.country?.currency||"NGN",r=t?`en-${t?.country?.iso2}`:"en-NG",o=new Intl.NumberFormat(r,{style:"currency",currency:n});return o.formatToParts(0).find(e=>"currency"===e.type)?.value||n}var nb,rb="HoverCard",[ob]=ai(rb,[zl]),ab=zl(),[ib,sb]=ob(rb),lb=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:s=300}=e,l=ab(t),u=D.useRef(0),c=D.useRef(0),d=D.useRef(!1),f=D.useRef(!1),[p,h]=ui({prop:r,defaultProp:o??!1,onChange:a,caller:rb}),g=D.useCallback(()=>{clearTimeout(c.current),u.current=window.setTimeout(()=>h(!0),i)},[i,h]),y=D.useCallback(()=>{clearTimeout(u.current),d.current||f.current||(c.current=window.setTimeout(()=>h(!1),s))},[s,h]),v=D.useCallback(()=>h(!1),[h]);return D.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(c.current)},[]),m.jsx(ib,{scope:t,open:p,onOpenChange:h,onOpen:g,onClose:y,onDismiss:v,hasSelectionRef:d,isPointerDownOnContentRef:f,children:m.jsx(tu,{...l,children:n})})};lb.displayName=rb;var ub="HoverCardTrigger",cb=D.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=sb(ub,n),a=ab(n);return m.jsx(nu,{asChild:!0,...a,children:m.jsx(hi.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:ti(e.onPointerEnter,vb(o.onOpen)),onPointerLeave:ti(e.onPointerLeave,vb(o.onClose)),onFocus:ti(e.onFocus,o.onOpen),onBlur:ti(e.onBlur,o.onClose),onTouchStart:ti(e.onTouchStart,e=>e.preventDefault())})})});cb.displayName=ub;var db="HoverCardPortal",[fb,pb]=ob(db,{forceMount:void 0}),hb=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=sb(db,t);return m.jsx(fb,{scope:t,forceMount:n,children:m.jsx(iu,{present:n||a.open,children:m.jsx(au,{asChild:!0,container:o,children:r})})})};hb.displayName=db;var mb="HoverCardContent",gb=D.forwardRef((e,t)=>{const n=pb(mb,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=sb(mb,e.__scopeHoverCard);return m.jsx(iu,{present:r||a.open,children:m.jsx(yb,{"data-state":a.open?"open":"closed",...o,onPointerEnter:ti(e.onPointerEnter,vb(a.onOpen)),onPointerLeave:ti(e.onPointerLeave,vb(a.onClose)),ref:t})})});gb.displayName=mb;var yb=D.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...s}=e,l=sb(mb,n),u=ab(n),c=D.useRef(null),d=oi(t,c),[f,p]=D.useState(!1);return D.useEffect(()=>{if(f){const e=document.body;return nb=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=nb,e.style.webkitUserSelect=nb}}},[f]),D.useEffect(()=>{if(c.current){const e=()=>{p(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),D.useEffect(()=>{if(c.current){const e=function(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}(c.current);e.forEach(e=>e.setAttribute("tabindex","-1"))}}),m.jsx(_i,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:ti(a,e=>{e.preventDefault()}),onDismiss:l.onDismiss,children:m.jsx(ru,{...u,...s,onPointerDown:ti(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&p(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:d,style:{...s.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function vb(e){return t=>"touch"===t.pointerType?void 0:e()}D.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=ab(n);return m.jsx(ou,{...o,...r,ref:t})}).displayName="HoverCardArrow";var bb=hb,wb=gb;const xb=lb,Cb=cb,Sb=D.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>{const{portalRef:a}=Pr();return m.jsx(bb,{container:a.current,children:m.jsx(wb,{ref:o,align:t,sideOffset:n,className:Ya("z-50 w-64 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...r})})});function kb({children:e,trigger:t,fieldName:n,align:r="start"}){return m.jsxs(xb,{children:[m.jsx(Cb,{className:"cursor-pointer",children:t??Kv.info_input}),m.jsxs(Sb,{align:r,className:"bg-[#0A0D14] text-[#CDD0D5] text-xs font-normal border-none",children:[n?m.jsx("p",{className:"text-sm font-medium text-white first-letter:uppercase",children:n}):null,e]})]})}function _b({status:e}){return m.jsx("span",{className:Ya("font-semibold text-xs rounded p-[7px] capitalize text-center min-w-[70px] bg-gray-300 text-gray-700",["active","approved","published","received","returned","completed","reconciled","credit"].includes(e)?"text-success bg-success-light":null,["inactive","pending","expired","expiring","rejected","voided","cancelled","debit","out of stock"].includes(e)?"text-danger bg-danger_light":null,["pending","paylater","suspended","awaiting_approval"].includes(e)?"text-warning bg-warning-light":null,["draft","in_transit"].includes(e)?"text-black bg-[#E1E3EA]":null,["ongoing"].includes(e)?"text-[#7239EA] bg-[#f5edff]":null),children:e?.replace("_"," ")})}function Eb(e,t){return function(){return e.apply(t,arguments)}}Sb.displayName=wb.displayName;const{toString:jb}=Object.prototype,{getPrototypeOf:Nb}=Object,{iterator:Rb,toStringTag:Ob}=Symbol,Pb=(Tb=Object.create(null),e=>{const t=jb.call(e);return Tb[t]||(Tb[t]=t.slice(8,-1).toLowerCase())});var Tb;const Db=e=>(e=e.toLowerCase(),t=>Pb(t)===e),Mb=e=>t=>typeof t===e,{isArray:Ib}=Array,Ab=Mb("undefined");function Lb(e){return null!==e&&!Ab(e)&&null!==e.constructor&&!Ab(e.constructor)&&$b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fb=Db("ArrayBuffer");const zb=Mb("string"),$b=Mb("function"),Hb=Mb("number"),Bb=e=>null!==e&&"object"==typeof e,Vb=e=>{if("object"!==Pb(e))return!1;const t=Nb(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Ob in e||Rb in e)},Ub=Db("Date"),qb=Db("File"),Wb=Db("Blob"),Yb=Db("FileList"),Gb=Db("URLSearchParams"),[Kb,Qb,Zb,Xb]=["ReadableStream","Request","Response","Headers"].map(Db);function Jb(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Ib(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Lb(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let i;for(r=0;r<a;r++)i=o[r],t.call(null,e[i],i,e)}}function ew(e,t){if(Lb(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const tw="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,nw=e=>!Ab(e)&&e!==tw;const rw=(ow="undefined"!=typeof Uint8Array&&Nb(Uint8Array),e=>ow&&e instanceof ow);var ow;const aw=Db("HTMLFormElement"),iw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sw=Db("RegExp"),lw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Jb(n,(n,o)=>{let a;!1!==(a=t(n,o,e))&&(r[o]=a||n)}),Object.defineProperties(e,r)};const uw=Db("AsyncFunction"),cw=(dw="function"==typeof setImmediate,fw=$b(tw.postMessage),dw?setImmediate:fw?((e,t)=>(tw.addEventListener("message",({source:n,data:r})=>{n===tw&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),tw.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var dw,fw;const pw="undefined"!=typeof queueMicrotask?queueMicrotask.bind(tw):"undefined"!=typeof process&&process.nextTick||cw;var hw={isArray:Ib,isArrayBuffer:Fb,isBuffer:Lb,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||$b(e.append)&&("formdata"===(t=Pb(e))||"object"===t&&$b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Fb(e.buffer),t},isString:zb,isNumber:Hb,isBoolean:e=>!0===e||!1===e,isObject:Bb,isPlainObject:Vb,isEmptyObject:e=>{if(!Bb(e)||Lb(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Kb,isRequest:Qb,isResponse:Zb,isHeaders:Xb,isUndefined:Ab,isDate:Ub,isFile:qb,isBlob:Wb,isRegExp:sw,isFunction:$b,isStream:e=>Bb(e)&&$b(e.pipe),isURLSearchParams:Gb,isTypedArray:rw,isFileList:Yb,forEach:Jb,merge:function e(){const{caseless:t,skipUndefined:n}=nw(this)&&this||{},r={},o=(o,a)=>{const i=t&&ew(r,a)||a;Vb(r[i])&&Vb(o)?r[i]=e(r[i],o):Vb(o)?r[i]=e({},o):Ib(o)?r[i]=o.slice():n&&Ab(o)||(r[i]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Jb(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(Jb(t,(t,r)=>{n&&$b(t)?Object.defineProperty(e,r,{value:Eb(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],r&&!r(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&Nb(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Pb,kindOfTest:Db,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Ib(e))return e;let t=e.length;if(!Hb(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Rb]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:aw,hasOwnProperty:iw,hasOwnProp:iw,reduceDescriptors:lw,freezeMethods:e=>{lw(e,(t,n)=>{if($b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];$b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Ib(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ew,global:tw,isContextDefined:nw,isSpecCompliantForm:function(e){return!!(e&&$b(e.append)&&"FormData"===e[Ob]&&e[Rb])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Bb(e)){if(t.indexOf(e)>=0)return;if(Lb(e))return e;if(!("toJSON"in e)){t[r]=e;const o=Ib(e)?[]:{};return Jb(e,(e,t)=>{const a=n(e,r+1);!Ab(a)&&(o[t]=a)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:uw,isThenable:e=>e&&(Bb(e)||$b(e))&&$b(e.then)&&$b(e.catch),setImmediate:cw,asap:pw,isIterable:e=>null!=e&&$b(e[Rb])};let mw=class e extends Error{static from(t,n,r,o,a,i){const s=new e(t.message,n||t.code,r,o,a);return s.cause=t,s.name=t.name,i&&Object.assign(s,i),s}constructor(e,t,n,r,o){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:hw.toJSONObject(this.config),code:this.code,status:this.status}}};mw.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",mw.ERR_BAD_OPTION="ERR_BAD_OPTION",mw.ECONNABORTED="ECONNABORTED",mw.ETIMEDOUT="ETIMEDOUT",mw.ERR_NETWORK="ERR_NETWORK",mw.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",mw.ERR_DEPRECATED="ERR_DEPRECATED",mw.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",mw.ERR_BAD_REQUEST="ERR_BAD_REQUEST",mw.ERR_CANCELED="ERR_CANCELED",mw.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",mw.ERR_INVALID_URL="ERR_INVALID_URL";function gw(e){return hw.isPlainObject(e)||hw.isArray(e)}function yw(e){return hw.endsWith(e,"[]")?e.slice(0,-2):e}function vw(e,t,n){return e?e.concat(t).map(function(e,t){return e=yw(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const bw=hw.toFlatObject(hw,{},null,function(e){return/^is[A-Z]/.test(e)});function ww(e,t,n){if(!hw.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=hw.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!hw.isUndefined(t[e])})).metaTokens,o=n.visitor||u,a=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&hw.isSpecCompliantForm(t);if(!hw.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(hw.isDate(e))return e.toISOString();if(hw.isBoolean(e))return e.toString();if(!s&&hw.isBlob(e))throw new mw("Blob is not supported. Use a Buffer instead.");return hw.isArrayBuffer(e)||hw.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(hw.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(hw.isArray(e)&&function(e){return hw.isArray(e)&&!e.some(gw)}(e)||(hw.isFileList(e)||hw.endsWith(n,"[]"))&&(s=hw.toArray(e)))return n=yw(n),s.forEach(function(e,r){!hw.isUndefined(e)&&null!==e&&t.append(!0===i?vw([n],r,a):null===i?n:n+"[]",l(e))}),!1;return!!gw(e)||(t.append(vw(o,n,a),l(e)),!1)}const c=[],d=Object.assign(bw,{defaultVisitor:u,convertValue:l,isVisitable:gw});if(!hw.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!hw.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),hw.forEach(n,function(n,a){!0===(!(hw.isUndefined(n)||null===n)&&o.call(t,n,hw.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])}),c.pop()}}(e),t}function xw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Cw(e,t){this._pairs=[],e&&ww(e,this,t)}const Sw=Cw.prototype;function kw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function _w(e,t,n){if(!t)return e;const r=n&&n.encode||kw,o=hw.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let i;if(i=a?a(t,o):hw.isURLSearchParams(t)?t.toString():new Cw(t,o).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Sw.append=function(e,t){this._pairs.push([e,t])},Sw.toString=function(e){const t=e?function(t){return e.call(this,t,xw)}:xw;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Ew{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){hw.forEach(this.handlers,function(t){null!==t&&e(t)})}}var jw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nw={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Cw,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Rw="undefined"!=typeof window&&"undefined"!=typeof document,Ow="object"==typeof navigator&&navigator||void 0,Pw=Rw&&(!Ow||["ReactNative","NativeScript","NS"].indexOf(Ow.product)<0),Tw="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Dw=Rw&&window.location.href||"http://localhost";var Mw={...Object.freeze({__proto__:null,hasBrowserEnv:Rw,hasStandardBrowserEnv:Pw,hasStandardBrowserWebWorkerEnv:Tw,navigator:Ow,origin:Dw}),...Nw};function Iw(e){function t(e,n,r,o){let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),s=o>=e.length;if(a=!a&&hw.isArray(r)?r.length:a,s)return hw.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!i;r[a]&&hw.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],o)&&hw.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}(r[a])),!i}if(hw.isFormData(e)&&hw.isFunction(e.entries)){const n={};return hw.forEachEntry(e,(e,r)=>{t(function(e){return hw.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const Aw={transitional:jw,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=hw.isObject(e);o&&hw.isHTMLForm(e)&&(e=new FormData(e));if(hw.isFormData(e))return r?JSON.stringify(Iw(e)):e;if(hw.isArrayBuffer(e)||hw.isBuffer(e)||hw.isStream(e)||hw.isFile(e)||hw.isBlob(e)||hw.isReadableStream(e))return e;if(hw.isArrayBufferView(e))return e.buffer;if(hw.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ww(e,new Mw.classes.URLSearchParams,{visitor:function(e,t,n,r){return Mw.isNode&&hw.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=hw.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ww(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(hw.isString(e))try{return(t||JSON.parse)(e),hw.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Aw.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(hw.isResponse(e)||hw.isReadableStream(e))return e;if(e&&hw.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw mw.from(e,mw.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mw.classes.FormData,Blob:Mw.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};hw.forEach(["delete","get","head","post","put","patch"],e=>{Aw.headers[e]={}});const Lw=hw.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Fw=Symbol("internals");function zw(e){return e&&String(e).trim().toLowerCase()}function $w(e){return!1===e||null==e?e:hw.isArray(e)?e.map($w):String(e)}function Hw(e,t,n,r,o){return hw.isFunction(r)?r.call(this,t,n):(o&&(t=n),hw.isString(t)?hw.isString(r)?-1!==t.indexOf(r):hw.isRegExp(r)?r.test(t):void 0:void 0)}let Bw=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=zw(t);if(!o)throw new Error("header name must be a non-empty string");const a=hw.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=$w(e))}const a=(e,t)=>hw.forEach(e,(e,n)=>o(e,n,t));if(hw.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(hw.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Lw[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(hw.isObject(e)&&hw.isIterable(e)){let n,r,o={};for(const t of e){if(!hw.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?hw.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=zw(e)){const n=hw.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(hw.isFunction(t))return t.call(this,e,n);if(hw.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=zw(e)){const n=hw.findKey(this,e);return!(!n||void 0===this[n]||t&&!Hw(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=zw(e)){const o=hw.findKey(n,e);!o||t&&!Hw(0,n[o],o,t)||(delete n[o],r=!0)}}return hw.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Hw(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return hw.forEach(this,(r,o)=>{const a=hw.findKey(n,o);if(a)return t[a]=$w(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();i!==o&&delete t[o],t[i]=$w(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return hw.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&hw.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Fw]=this[Fw]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=zw(e);t[r]||(!function(e,t){const n=hw.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return hw.isArray(e)?e.forEach(r):r(e),this}};function Vw(e,t){const n=this||Aw,r=t||n,o=Bw.from(r.headers);let a=r.data;return hw.forEach(e,function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Uw(e){return!(!e||!e.__CANCEL__)}Bw.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),hw.reduceDescriptors(Bw.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),hw.freezeMethods(Bw);let qw=class extends mw{constructor(e,t,n){super(null==e?"canceled":e,mw.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Ww(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new mw("Request failed with status code "+n.status,[mw.ERR_BAD_REQUEST,mw.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Yw=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[i];o||(o=l),n[a]=s,r[a]=l;let c=i,d=0;for(;c!==a;)d+=n[c++],c%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),l-o<t)return;const f=u&&l-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,a=1e3/t;const i=(t,a=Date.now())=>{o=a,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=a?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},a-s)))},()=>n&&i(n)]}(n=>{const a=n.loaded,i=n.lengthComputable?n.total:void 0,s=a-r,l=o(s);r=a;e({loaded:a,total:i,progress:i?a/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&a<=i?(i-a)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},Gw=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kw=e=>(...t)=>hw.asap(()=>e(...t));var Qw=Mw.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mw.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mw.origin),Mw.navigator&&/(msie|trident)/i.test(Mw.navigator.userAgent)):()=>!0,Zw=Mw.hasStandardBrowserEnv?{write(e,t,n,r,o,a,i){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];hw.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),hw.isString(r)&&s.push(`path=${r}`),hw.isString(o)&&s.push(`domain=${o}`),!0===a&&s.push("secure"),hw.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Xw(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Jw=e=>e instanceof Bw?{...e}:e;function ex(e,t){t=t||{};const n={};function r(e,t,n,r){return hw.isPlainObject(e)&&hw.isPlainObject(t)?hw.merge.call({caseless:r},e,t):hw.isPlainObject(t)?hw.merge({},t):hw.isArray(t)?t.slice():t}function o(e,t,n,o){return hw.isUndefined(t)?hw.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function a(e,t){if(!hw.isUndefined(t))return r(void 0,t)}function i(e,t){return hw.isUndefined(t)?hw.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t,n)=>o(Jw(e),Jw(t),0,!0)};return hw.forEach(Object.keys({...e,...t}),function(r){const a=l[r]||o,i=a(e[r],t[r],r);hw.isUndefined(i)&&a!==s||(n[r]=i)}),n}var tx=e=>{const t=ex({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;if(t.headers=i=Bw.from(i),t.url=_w(Xw(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),hw.isFormData(n))if(Mw.hasStandardBrowserEnv||Mw.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(hw.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(Mw.hasStandardBrowserEnv&&(r&&hw.isFunction(r)&&(r=r(t)),r||!1!==r&&Qw(t.url))){const e=o&&a&&Zw.read(a);e&&i.set(o,e)}return t};var nx="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=tx(e);let o=r.data;const a=Bw.from(r.headers).normalize();let i,s,l,u,c,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Bw.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ww(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new mw("Request aborted",mw.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new mw(r,mw.ERR_NETWORK,e,m);o.event=t||null,n(o),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||jw;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new mw(t,o.clarifyTimeoutError?mw.ETIMEDOUT:mw.ECONNABORTED,e,m)),m=null},void 0===o&&a.setContentType(null),"setRequestHeader"in m&&hw.forEach(a.toJSON(),function(e,t){m.setRequestHeader(t,e)}),hw.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,c]=Yw(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,u]=Yw(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new qw(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Mw.protocols.indexOf(y)?n(new mw("Unsupported protocol "+y+":",mw.ERR_BAD_REQUEST,e)):m.send(o||null)})};const rx=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof mw?t:new qw(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,o(new mw(`timeout of ${t}ms exceeded`,mw.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>hw.asap(i),s}},ox=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},ax=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},ix=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of ax(e))yield*ox(n,t)}(e,t);let a,i=0,s=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let a=r.byteLength;if(n){let e=i+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:sx}=hw,lx=(({Request:e,Response:t})=>({Request:e,Response:t}))(hw.global),{ReadableStream:ux,TextEncoder:cx}=hw.global,dx=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},fx=e=>{e=hw.merge.call({skipUndefined:!0},lx,e);const{fetch:t,Request:n,Response:r}=e,o=t?sx(t):"function"==typeof fetch,a=sx(n),i=sx(r);if(!o)return!1;const s=o&&sx(ux),l=o&&("function"==typeof cx?(u=new cx,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const c=a&&s&&dx(()=>{let e=!1;const t=new n(Mw.origin,{body:new ux,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&s&&dx(()=>hw.isReadableStream(new r("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new mw(`Response type '${e}' is not supported`,mw.ERR_NOT_SUPPORT,n)})});const p=async(e,t)=>{const r=hw.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(hw.isBlob(e))return e.size;if(hw.isSpecCompliantForm(e)){const t=new n(Mw.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return hw.isArrayBufferView(e)||hw.isArrayBuffer(e)?e.byteLength:(hw.isURLSearchParams(e)&&(e+=""),hw.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:o,method:i,data:s,signal:l,cancelToken:u,timeout:h,onDownloadProgress:m,onUploadProgress:g,responseType:y,headers:v,withCredentials:b="same-origin",fetchOptions:w}=tx(e),x=t||fetch;y=y?(y+"").toLowerCase():"text";let C=rx([l,u&&u.toAbortSignal()],h),S=null;const k=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let _;try{if(g&&c&&"get"!==i&&"head"!==i&&0!==(_=await p(v,s))){let e,t=new n(o,{method:"POST",body:s,duplex:"half"});if(hw.isFormData(s)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=Gw(_,Yw(Kw(g)));s=ix(t.body,65536,e,n)}}hw.isString(b)||(b=b?"include":"omit");const t=a&&"credentials"in n.prototype,l={...w,signal:C,method:i.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:t?b:void 0};S=a&&new n(o,l);let u=await(a?x(S,w):x(o,l));const h=d&&("stream"===y||"response"===y);if(d&&(m||h&&k)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=hw.toFiniteNumber(u.headers.get("content-length")),[n,o]=m&&Gw(t,Yw(Kw(m),!0))||[];u=new r(ix(u.body,65536,n,()=>{o&&o(),k&&k()}),e)}y=y||"text";let E=await f[hw.findKey(f,y)||"text"](u,e);return!h&&k&&k(),await new Promise((t,n)=>{Ww(t,n,{data:E,headers:Bw.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:S})})}catch(t){if(k&&k(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new mw("Network Error",mw.ERR_NETWORK,e,S),{cause:t.cause||t});throw mw.from(t,t&&t.code,e,S)}}},px=new Map,hx=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let i,s,l=a.length,u=px;for(;l--;)i=a[l],s=u.get(i),void 0===s&&u.set(i,s=l?new Map:fx(t)),u=s;return s};hx();const mx={http:null,xhr:nx,fetch:{get:hx}};hw.forEach(mx,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const gx=e=>`- ${e}`,yx=e=>hw.isFunction(e)||null===e||!1===e;var vx={getAdapter:function(e,t){e=hw.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let i=0;i<n;i++){let n;if(r=e[i],o=r,!yx(r)&&(o=mx[(n=String(r)).toLowerCase()],void 0===o))throw new mw(`Unknown adapter '${n}'`);if(o&&(hw.isFunction(o)||(o=o.get(t))))break;a[n||"#"+i]=o}if(!o){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(gx).join("\n"):" "+gx(e[0]):"as no adapter specified";throw new mw("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:mx};function bx(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qw(null,e)}function wx(e){bx(e),e.headers=Bw.from(e.headers),e.data=Vw.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return vx.getAdapter(e.adapter||Aw.adapter,e)(e).then(function(t){return bx(e),t.data=Vw.call(e,e.transformResponse,t),t.headers=Bw.from(t.headers),t},function(t){return Uw(t)||(bx(e),t&&t.response&&(t.response.data=Vw.call(e,e.transformResponse,t.response),t.response.headers=Bw.from(t.response.headers))),Promise.reject(t)})}const xx="1.13.4",Cx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Cx[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Sx={};Cx.transitional=function(e,t,n){function r(e,t){return"[Axios v"+xx+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,a)=>{if(!1===e)throw new mw(r(o," has been removed"+(t?" in "+t:"")),mw.ERR_DEPRECATED);return t&&!Sx[o]&&(Sx[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}},Cx.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var kx={assertOptions:function(e,t,n){if("object"!=typeof e)throw new mw("options must be an object",mw.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const t=e[a],n=void 0===t||i(t,a,e);if(!0!==n)throw new mw("option "+a+" must be "+n,mw.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new mw("Unknown option "+a,mw.ERR_BAD_OPTION)}},validators:Cx};const _x=kx.validators;let Ex=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ew,response:new Ew}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ex(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&kx.assertOptions(n,{silentJSONParsing:_x.transitional(_x.boolean),forcedJSONParsing:_x.transitional(_x.boolean),clarifyTimeoutError:_x.transitional(_x.boolean)},!1),null!=r&&(hw.isFunction(r)?t.paramsSerializer={serialize:r}:kx.assertOptions(r,{encode:_x.function,serialize:_x.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),kx.assertOptions(t,{baseUrl:_x.spelling("baseURL"),withXsrfToken:_x.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&hw.merge(o.common,o[t.method]);o&&hw.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Bw.concat(a,o);const i=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!s){const e=[wx.bind(this),void 0];for(e.unshift(...i),e.push(...l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=i.length;let f=t;for(;d<c;){const e=i[d++],t=i[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=wx.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return _w(Xw((e=ex(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};hw.forEach(["delete","get","head","options"],function(e){Ex.prototype[e]=function(t,n){return this.request(ex(n||{},{method:e,url:t,data:(n||{}).data}))}}),hw.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(ex(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ex.prototype[e]=t(),Ex.prototype[e+"Form"]=t(!0)});const jx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(jx).forEach(([e,t])=>{jx[t]=e});const Nx=function e(t){const n=new Ex(t),r=Eb(Ex.prototype.request,n);return hw.extend(r,Ex.prototype,n,{allOwnKeys:!0}),hw.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ex(t,n))},r}(Aw);Nx.Axios=Ex,Nx.CanceledError=qw,Nx.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new qw(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;const n=new e(function(e){t=e});return{token:n,cancel:t}}},Nx.isCancel=Uw,Nx.VERSION=xx,Nx.toFormData=ww,Nx.AxiosError=mw,Nx.Cancel=Nx.CanceledError,Nx.all=function(e){return Promise.all(e)},Nx.spread=function(e){return function(t){return e.apply(null,t)}},Nx.isAxiosError=function(e){return hw.isObject(e)&&!0===e.isAxiosError},Nx.mergeConfig=ex,Nx.AxiosHeaders=Bw,Nx.formToJSON=e=>Iw(hw.isHTMLForm(e)?new FormData(e):e),Nx.getAdapter=vx.getAdapter,Nx.HttpStatusCode=jx,Nx.default=Nx;const{Axios:Rx,AxiosError:Ox,CanceledError:Px,isCancel:Tx,CancelToken:Dx,VERSION:Mx,all:Ix,Cancel:Ax,isAxiosError:Lx,spread:Fx,toFormData:zx,AxiosHeaders:$x,HttpStatusCode:Hx,formToJSON:Bx,getAdapter:Vx,mergeConfig:Ux}=Nx,qx={dev:"https://biz.api.simpoocodes.com/api/v1/outbound",prod:"https://api.simpoobusiness.com/api/v1/outbound"},Wx=(e,t="dev")=>{e||console.warn("⚠️ No API key provided to createApiClient");const n=qx[t]||qx.dev,r=Nx.create({baseURL:n,headers:{"Content-Type":"application/json","SIMPOO-API-KEY":e}});return r.interceptors.request.use(t=>(e&&t.headers&&(t.headers["SIMPOO-API-KEY"]=e),t),e=>Promise.reject(e)),r.interceptors.response.use(e=>e,e=>(e.response?console.error("API Error:",e.response.status,e.response.data):console.error("Network or Axios Error:",e.message),Promise.reject(e))),r},Yx=(e,t,n={})=>{const{apiKey:r,env:o}=Pr(),a=Wx(r||"",o);return function(e){return ir(e,$n)}({queryKey:[...e,o],queryFn:()=>(async e=>{try{const{data:t}=await a.get(e);return t}catch(e){Kx(e)}})(t),...n})},Gx=(e={enableToast:!0},t,n)=>{const{enableToast:r,...o}=e,{apiKey:a,env:i}=Pr(),s=Wx(a||"",i);return function(e){const t=tr(),[n]=D.useState(()=>new Zn(t,e));D.useEffect(()=>{n.setOptions(e)},[n,e]);const r=D.useSyncExternalStore(D.useCallback(e=>n.subscribe(Rn.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=D.useCallback((e,t)=>{n.mutate(e,t).catch(rn)},[n]);if(r.error&&_n(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}({mutationFn:t?async({url:e,payload:t})=>{const{data:n}=await s.post(e,t,{headers:{"Content-Type":"multipart/form-data"}});return n}:async({url:e,payload:t})=>{const{data:n}=await s.post(e,t);return n},onSuccess(e,t,n){r&&wr.success(e.message)},onError(e,t,n){console.log(e),Kx(e)},...o})},Kx=e=>{e?.response?(console.log("response data:",e.response.data),console.log("Status Code:",e.response.status),console.log("Status Text:",e.response.statusText),500===e.response.status?wr.error("Something went wrong",{position:"top-right"}):e.response.data&&e.response.data.message&&wr.error(`${e.response?.data?.message}`,{position:"top-right"})):(e.request,console.log(e?.message),wr.error(`${e?.message}`,{position:"top-right"}))};function Qx(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Zx,Xx={exports:{}};var Jx=(Zx||(Zx=1,function(e){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function o(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,r=[],o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function p(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,n,r){return Gn(e,t,n,r,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=m()),e._pf}function y(e){var t=null,r=!1,o=e._d&&!isNaN(e._d.getTime());return o&&(t=g(e),r=n.call(t.parsedDateParts,function(e){return null!=e}),o=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?o:(e._isValid=o,e._isValid)}function v(e){var t=h(NaN);return null!=e?p(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var b=r.momentProperties=[],w=!1;function x(e,t){var n,r,o,a=b.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=g(t)),u(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)u(o=t[r=b[n]])||(e[r]=o);return e}function C(e){x(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,r.updateOffset(this),w=!1)}function S(e){return e instanceof C||null!=e&&null!=e._isAMomentObject}function k(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function _(e,t){var n=!0;return p(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var o,a,i,l=[],u=arguments.length;for(a=0;a<u;a++){if(o="","object"==typeof arguments[a]){for(i in o+="\n["+a+"] ",arguments[0])s(arguments[0],i)&&(o+=i+": "+arguments[0][i]+", ");o=o.slice(0,-2)}else o=arguments[a];l.push(o)}k(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var E,j={};function N(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),j[e]||(k(t),j[e]=!0)}function R(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e){var t,n;for(n in e)s(e,n)&&(R(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function P(e,t){var n,r=p({},e);for(n in t)s(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&i(e[n])&&(r[n]=p({},r[n]));return r}function T(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var D={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function M(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return R(r)?r.call(t,n):r}function I(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var A=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,L=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},z={};function $(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(z[e]=o),t&&(z[t[0]]=function(){return I(o.apply(this,arguments),t[1],t[2])}),n&&(z[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function H(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function B(e){var t,n,r=e.match(A);for(t=0,n=r.length;t<n;t++)z[r[t]]?r[t]=z[r[t]]:r[t]=H(r[t]);return function(t){var o,a="";for(o=0;o<n;o++)a+=R(r[o])?r[o].call(t,e):r[o];return a}}function V(e,t){return e.isValid()?(t=U(t,e.localeData()),F[t]=F[t]||B(t),F[t](e)):e.localeData().invalidDate()}function U(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(L.lastIndex=0;n>=0&&L.test(e);)e=e.replace(L,r),L.lastIndex=0,n-=1;return e}var q={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function W(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(A).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}var Y="Invalid date";function G(){return this._invalidDate}var K="%d",Q=/\d{1,2}/;function Z(e){return this._ordinal.replace("%d",e)}var X={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function J(e,t,n,r){var o=this._relativeTime[n];return R(o)?o(e,t,n,r):o.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return R(n)?n(t):n.replace(/%s/i,t)}var te={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function re(e){var t,n,r={};for(n in e)s(e,n)&&(t=ne(n))&&(r[t]=e[n]);return r}var oe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ae(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}var ie,se=/\d/,le=/\d\d/,ue=/\d{3}/,ce=/\d{4}/,de=/[+-]?\d{6}/,fe=/\d\d?/,pe=/\d\d\d\d?/,he=/\d\d\d\d\d\d?/,me=/\d{1,3}/,ge=/\d{1,4}/,ye=/[+-]?\d{1,6}/,ve=/\d+/,be=/[+-]?\d+/,we=/Z|[+-]\d\d:?\d\d/gi,xe=/Z|[+-]\d\d(?::?\d\d)?/gi,Ce=/[+-]?\d+(\.\d{1,3})?/,Se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ke=/^[1-9]\d?/,_e=/^([1-9]\d|\d)/;function Ee(e,t,n){ie[e]=R(t)?t:function(e,r){return e&&n?n:t}}function je(e,t){return s(ie,e)?ie[e](t._strict,t._locale):new RegExp(Ne(e))}function Ne(e){return Re(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o}))}function Re(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Oe(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Pe(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Oe(t)),n}ie={};var Te={};function De(e,t){var n,r,o=t;for("string"==typeof e&&(e=[e]),c(t)&&(o=function(e,n){n[t]=Pe(e)}),r=e.length,n=0;n<r;n++)Te[e[n]]=o}function Me(e,t){De(e,function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)})}function Ie(e,t,n){null!=t&&s(Te,e)&&Te[e](t,n._a,n,e)}function Ae(e){return e%4==0&&e%100!=0||e%400==0}var Le=0,Fe=1,ze=2,$e=3,He=4,Be=5,Ve=6,Ue=7,qe=8;function We(e){return Ae(e)?366:365}$("Y",0,0,function(){var e=this.year();return e<=9999?I(e,4):"+"+e}),$(0,["YY",2],0,function(){return this.year()%100}),$(0,["YYYY",4],0,"year"),$(0,["YYYYY",5],0,"year"),$(0,["YYYYYY",6,!0],0,"year"),Ee("Y",be),Ee("YY",fe,le),Ee("YYYY",ge,ce),Ee("YYYYY",ye,de),Ee("YYYYYY",ye,de),De(["YYYYY","YYYYYY"],Le),De("YYYY",function(e,t){t[Le]=2===e.length?r.parseTwoDigitYear(e):Pe(e)}),De("YY",function(e,t){t[Le]=r.parseTwoDigitYear(e)}),De("Y",function(e,t){t[Le]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return Pe(e)+(Pe(e)>68?1900:2e3)};var Ye,Ge=Qe("FullYear",!0);function Ke(){return Ae(this.year())}function Qe(e,t){return function(n){return null!=n?(Xe(this,e,n),r.updateOffset(this,t),this):Ze(this,e)}}function Ze(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Xe(e,t,n){var r,o,a,i,s;if(e.isValid()&&!isNaN(n)){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,i=e.month(),s=29!==(s=e.date())||1!==i||Ae(a)?s:28,o?r.setUTCFullYear(a,i,s):r.setFullYear(a,i,s)}}function Je(e){return R(this[e=ne(e)])?this[e]():this}function et(e,t){if("object"==typeof e){var n,r=ae(e=re(e)),o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(R(this[e=ne(e)]))return this[e](t);return this}function tt(e,t){return(e%t+t)%t}function nt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=tt(t,12);return e+=(t-n)/12,1===n?Ae(e)?29:28:31-n%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},$("M",["MM",2],"Mo",function(){return this.month()+1}),$("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),$("MMMM",0,0,function(e){return this.localeData().months(this,e)}),Ee("M",fe,ke),Ee("MM",fe,le),Ee("MMM",function(e,t){return t.monthsShortRegex(e)}),Ee("MMMM",function(e,t){return t.monthsRegex(e)}),De(["M","MM"],function(e,t){t[Fe]=Pe(e)-1}),De(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[Fe]=o:g(n).invalidMonth=e});var rt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ot="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),at=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,it=Se,st=Se;function lt(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||at).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone}function ut(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[at.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ct(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Ye.call(this._shortMonthsParse,i))?o:null:-1!==(o=Ye.call(this._longMonthsParse,i))?o:null:"MMM"===t?-1!==(o=Ye.call(this._shortMonthsParse,i))||-1!==(o=Ye.call(this._longMonthsParse,i))?o:null:-1!==(o=Ye.call(this._longMonthsParse,i))||-1!==(o=Ye.call(this._shortMonthsParse,i))?o:null}function dt(e,t,n){var r,o,a;if(this._monthsParseExact)return ct.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ft(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Pe(t);else if(!c(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,nt(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function pt(e){return null!=e?(ft(this,e),r.updateOffset(this,!0),this):Ze(this,"Month")}function ht(){return nt(this.year(),this.month())}function mt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||yt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=it),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function gt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||yt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=st),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function yt(){function e(e,t){return t.length-e.length}var t,n,r,o,a=[],i=[],s=[];for(t=0;t<12;t++)n=h([2e3,t]),r=Re(this.monthsShort(n,"")),o=Re(this.months(n,"")),a.push(r),i.push(o),s.push(o),s.push(r);a.sort(e),i.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+a.join("|")+")","i")}function vt(e,t,n,r,o,a,i){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,a,i),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,a,i),s}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function wt(e,t,n){var r=7+t-n;return-(7+bt(e,0,r).getUTCDay()-t)%7+r-1}function xt(e,t,n,r,o){var a,i,s=1+7*(t-1)+(7+n-r)%7+wt(e,r,o);return s<=0?i=We(a=e-1)+s:s>We(e)?(a=e+1,i=s-We(e)):(a=e,i=s),{year:a,dayOfYear:i}}function Ct(e,t,n){var r,o,a=wt(e.year(),t,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?r=i+St(o=e.year()-1,t,n):i>St(e.year(),t,n)?(r=i-St(e.year(),t,n),o=e.year()+1):(o=e.year(),r=i),{week:r,year:o}}function St(e,t,n){var r=wt(e,t,n),o=wt(e+1,t,n);return(We(e)-r+o)/7}function kt(e){return Ct(e,this._week.dow,this._week.doy).week}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),Ee("w",fe,ke),Ee("ww",fe,le),Ee("W",fe,ke),Ee("WW",fe,le),Me(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Pe(e)});var _t={dow:0,doy:6};function Et(){return this._week.dow}function jt(){return this._week.doy}function Nt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Rt(e){var t=Ct(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ot(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Pt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Tt(e,t){return e.slice(t,7).concat(e.slice(0,t))}$("d",0,"do","day"),$("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),$("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),$("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),Ee("d",fe),Ee("e",fe),Ee("E",fe),Ee("dd",function(e,t){return t.weekdaysMinRegex(e)}),Ee("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Ee("dddd",function(e,t){return t.weekdaysRegex(e)}),Me(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:g(n).invalidWeekday=e}),Me(["d","e","E"],function(e,t,n,r){t[r]=Pe(e)});var Dt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),It="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),At=Se,Lt=Se,Ft=Se;function zt(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Tt(n,this._week.dow):e?n[e.day()]:n}function $t(e){return!0===e?Tt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ht(e){return!0===e?Tt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Bt(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Ye.call(this._weekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Ye.call(this._shortWeekdaysParse,i))?o:null:-1!==(o=Ye.call(this._minWeekdaysParse,i))?o:null:"dddd"===t?-1!==(o=Ye.call(this._weekdaysParse,i))||-1!==(o=Ye.call(this._shortWeekdaysParse,i))||-1!==(o=Ye.call(this._minWeekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Ye.call(this._shortWeekdaysParse,i))||-1!==(o=Ye.call(this._weekdaysParse,i))||-1!==(o=Ye.call(this._minWeekdaysParse,i))?o:null:-1!==(o=Ye.call(this._minWeekdaysParse,i))||-1!==(o=Ye.call(this._weekdaysParse,i))||-1!==(o=Ye.call(this._shortWeekdaysParse,i))?o:null}function Vt(e,t,n){var r,o,a;if(this._weekdaysParseExact)return Bt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Ut(e){if(!this.isValid())return null!=e?this:NaN;var t=Ze(this,"Day");return null!=e?(e=Ot(e,this.localeData()),this.add(e-t,"d")):t}function qt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Wt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Pt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=At),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Gt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Lt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Kt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ft),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,n,r,o,a,i=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=Re(this.weekdaysMin(n,"")),o=Re(this.weekdaysShort(n,"")),a=Re(this.weekdays(n,"")),i.push(r),s.push(o),l.push(a),u.push(r),u.push(o),u.push(a);i.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Zt(){return this.hours()%12||12}function Xt(){return this.hours()||24}function Jt(e,t){$(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Zt),$("k",["kk",2],0,Xt),$("hmm",0,0,function(){return""+Zt.apply(this)+I(this.minutes(),2)}),$("hmmss",0,0,function(){return""+Zt.apply(this)+I(this.minutes(),2)+I(this.seconds(),2)}),$("Hmm",0,0,function(){return""+this.hours()+I(this.minutes(),2)}),$("Hmmss",0,0,function(){return""+this.hours()+I(this.minutes(),2)+I(this.seconds(),2)}),Jt("a",!0),Jt("A",!1),Ee("a",en),Ee("A",en),Ee("H",fe,_e),Ee("h",fe,ke),Ee("k",fe,ke),Ee("HH",fe,le),Ee("hh",fe,le),Ee("kk",fe,le),Ee("hmm",pe),Ee("hmmss",he),Ee("Hmm",pe),Ee("Hmmss",he),De(["H","HH"],$e),De(["k","kk"],function(e,t,n){var r=Pe(e);t[$e]=24===r?0:r}),De(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),De(["h","hh"],function(e,t,n){t[$e]=Pe(e),g(n).bigHour=!0}),De("hmm",function(e,t,n){var r=e.length-2;t[$e]=Pe(e.substr(0,r)),t[He]=Pe(e.substr(r)),g(n).bigHour=!0}),De("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[$e]=Pe(e.substr(0,r)),t[He]=Pe(e.substr(r,2)),t[Be]=Pe(e.substr(o)),g(n).bigHour=!0}),De("Hmm",function(e,t,n){var r=e.length-2;t[$e]=Pe(e.substr(0,r)),t[He]=Pe(e.substr(r))}),De("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[$e]=Pe(e.substr(0,r)),t[He]=Pe(e.substr(r,2)),t[Be]=Pe(e.substr(o))});var nn=/[ap]\.?m?\.?/i,rn=Qe("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:D,longDateFormat:q,invalidDate:Y,ordinal:K,dayOfMonthOrdinalParse:Q,relativeTime:X,months:rt,monthsShort:ot,week:_t,weekdays:Dt,weekdaysMin:It,weekdaysShort:Mt,meridiemParse:nn},ln={},un={};function cn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dn(e){return e?e.toLowerCase().replace("_","-"):e}function fn(e){for(var t,n,r,o,a=0;a<e.length;){for(t=(o=dn(e[a]).split("-")).length,n=(n=dn(e[a+1]))?n.split("-"):null;t>0;){if(r=hn(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&cn(o,n)>=t-1)break;t--}a++}return an}function pn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function hn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&pn(t))try{n=an._abbr,Qx("./locale/"+t),mn(n)}catch(e){ln[t]=null}return ln[t]}function mn(e,t){var n;return e&&((n=u(t)?vn(e):gn(e,t))?an=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function gn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])N("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=hn(t.parentLocale)))return un[t.parentLocale]||(un[t.parentLocale]=[]),un[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new T(P(r,t)),un[e]&&un[e].forEach(function(e){gn(e.name,e.config)}),mn(e),ln[e]}return delete ln[e],null}function yn(e,t){if(null!=t){var n,r,o=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(P(ln[e]._config,t)):(null!=(r=hn(e))&&(o=r._config),t=P(o,t),null==r&&(t.abbr=e),(n=new T(t)).parentLocale=ln[e],ln[e]=n),mn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===mn()&&mn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function vn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!a(e)){if(t=hn(e))return t;e=[e]}return fn(e)}function bn(){return E(ln)}function wn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Fe]<0||n[Fe]>11?Fe:n[ze]<1||n[ze]>nt(n[Le],n[Fe])?ze:n[$e]<0||n[$e]>24||24===n[$e]&&(0!==n[He]||0!==n[Be]||0!==n[Ve])?$e:n[He]<0||n[He]>59?He:n[Be]<0||n[Be]>59?Be:n[Ve]<0||n[Ve]>999?Ve:-1,g(e)._overflowDayOfYear&&(t<Le||t>ze)&&(t=ze),g(e)._overflowWeeks&&-1===t&&(t=Ue),g(e)._overflowWeekday&&-1===t&&(t=qe),g(e).overflow=t),e}var xn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,kn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_n=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],En=/^\/?Date\((-?\d+)/i,jn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Nn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Rn(e){var t,n,r,o,a,i,s=e._i,l=xn.exec(s)||Cn.exec(s),u=kn.length,c=_n.length;if(l){for(g(e).iso=!0,t=0,n=u;t<n;t++)if(kn[t][1].exec(l[1])){o=kn[t][0],r=!1!==kn[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=c;t<n;t++)if(_n[t][1].exec(l[3])){a=(l[2]||" ")+_n[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(l[4]){if(!Sn.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=o+(a||"")+(i||""),Hn(e)}else e._isValid=!1}function On(e,t,n,r,o,a){var i=[Pn(e),ot.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return a&&i.push(parseInt(a,10)),i}function Pn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Tn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Dn(e,t,n){return!e||Mt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Mn(e,t,n){if(e)return Nn[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}function In(e){var t,n=jn.exec(Tn(e._i));if(n){if(t=On(n[4],n[3],n[2],n[5],n[6],n[7]),!Dn(n[1],t,e))return;e._a=t,e._tzm=Mn(n[8],n[9],n[10]),e._d=bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function An(e){var t=En.exec(e._i);null===t?(Rn(e),!1===e._isValid&&(delete e._isValid,In(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Ln(e,t,n){return null!=e?e:null!=t?t:n}function Fn(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function zn(e){var t,n,r,o,a,i=[];if(!e._d){for(r=Fn(e),e._w&&null==e._a[ze]&&null==e._a[Fe]&&$n(e),null!=e._dayOfYear&&(a=Ln(e._a[Le],r[Le]),(e._dayOfYear>We(a)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=bt(a,0,e._dayOfYear),e._a[Fe]=n.getUTCMonth(),e._a[ze]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=i[t]=r[t];for(;t<7;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[$e]&&0===e._a[He]&&0===e._a[Be]&&0===e._a[Ve]&&(e._nextDay=!0,e._a[$e]=0),e._d=(e._useUTC?bt:vt).apply(null,i),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[$e]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(g(e).weekdayMismatch=!0)}}function $n(e){var t,n,r,o,a,i,s,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,i=4,n=Ln(t.GG,e._a[Le],Ct(Kn(),1,4).year),r=Ln(t.W,1),((o=Ln(t.E,1))<1||o>7)&&(l=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,u=Ct(Kn(),a,i),n=Ln(t.gg,e._a[Le],u.year),r=Ln(t.w,u.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(l=!0)):o=a),r<1||r>St(n,a,i)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=xt(n,r,o,a,i),e._a[Le]=s.year,e._dayOfYear=s.dayOfYear)}function Hn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,o,a,i,s,l,u=""+e._i,c=u.length,d=0;for(l=(o=U(e._f,e._locale).match(A)||[]).length,t=0;t<l;t++)a=o[t],(n=(u.match(je(a,e))||[])[0])&&((i=u.substr(0,u.indexOf(n))).length>0&&g(e).unusedInput.push(i),u=u.slice(u.indexOf(n)+n.length),d+=n.length),z[a]?(n?g(e).empty=!1:g(e).unusedTokens.push(a),Ie(a,n,e)):e._strict&&!n&&g(e).unusedTokens.push(a);g(e).charsLeftOver=c-d,u.length>0&&g(e).unusedInput.push(u),e._a[$e]<=12&&!0===g(e).bigHour&&e._a[$e]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[$e]=Bn(e._locale,e._a[$e],e._meridiem),null!==(s=g(e).era)&&(e._a[Le]=e._locale.erasConvertYear(s,e._a[Le])),zn(e),wn(e)}else In(e);else Rn(e)}function Bn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Vn(e){var t,n,r,o,a,i,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)a=0,i=!1,t=x({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Hn(t),y(t)&&(i=!0),a+=g(t).charsLeftOver,a+=10*g(t).unusedTokens.length,g(t).score=a,s?a<r&&(r=a,n=t):(null==r||a<r||i)&&(r=a,n=t,i&&(s=!0));p(e,n||t)}function Un(e){if(!e._d){var t=re(e._i),n=void 0===t.day?t.date:t.day;e._a=f([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),zn(e)}}function qn(e){var t=new C(wn(Wn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Wn(e){var t=e._i,n=e._f;return e._locale=e._locale||vn(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new C(wn(t)):(d(t)?e._d=t:a(n)?Vn(e):n?Hn(e):Yn(e),y(e)||(e._d=null),e))}function Yn(e){var t=e._i;u(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?An(e):a(t)?(e._a=f(t.slice(0),function(e){return parseInt(e,10)}),zn(e)):i(t)?Un(e):c(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Gn(e,t,n,r,o){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,qn(s)}function Kn(e,t,n,r){return Gn(e,t,n,r,!1)}r.createFromInputFallback=_("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Qn=_("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),Zn=_("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()});function Xn(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Kn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function Jn(){return Xn("isBefore",[].slice.call(arguments,0))}function er(){return Xn("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,o=nr.length;for(t in e)if(s(e,t)&&(-1===Ye.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<o;++n)if(e[nr[n]]){if(r)return!1;parseFloat(e[nr[n]])!==Pe(e[nr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return Nr(NaN)}function ir(e){var t=re(e),n=t.year||0,r=t.quarter||0,o=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=rr(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+i+7*a,this._months=+o+3*r+12*n,this._data={},this._locale=vn(),this._bubble()}function sr(e){return e instanceof ir}function lr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ur(e,t,n){var r,o=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0;for(r=0;r<o;r++)Pe(e[r])!==Pe(t[r])&&i++;return i+a}function cr(e,t){$(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+I(~~(e/60),2)+t+I(~~e%60,2)})}cr("Z",":"),cr("ZZ",""),Ee("Z",xe),Ee("ZZ",xe),De(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=fr(xe,e)});var dr=/([\+\-]|\d\d)/gi;function fr(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(dr)||["-",0,0])[1]+Pe(n[2]))?0:"+"===n[0]?r:-r}function pr(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(S(e)||d(e)?e.valueOf():Kn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),r.updateOffset(n,!1),n):Kn(e).local()}function hr(e){return-Math.round(e._d.getTimezoneOffset())}function mr(e,t,n){var o,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=fr(xe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(o=hr(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),a!==e&&(!t||this._changeInProgress?Dr(this,Nr(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:hr(this)}function gr(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function yr(e){return this.utcOffset(0,e)}function vr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(hr(this),"m")),this}function br(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=fr(we,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function wr(e){return!!this.isValid()&&(e=e?Kn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function xr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Cr(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return x(t,this),(t=Wn(t))._a?(e=t._isUTC?h(t._a):Kn(t._a),this._isDSTShifted=this.isValid()&&ur(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Sr(){return!!this.isValid()&&!this._isUTC}function kr(){return!!this.isValid()&&this._isUTC}function _r(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Er=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Nr(e,t){var n,r,o,a=e,i=null;return sr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(i=Er.exec(e))?(n="-"===i[1]?-1:1,a={y:0,d:Pe(i[ze])*n,h:Pe(i[$e])*n,m:Pe(i[He])*n,s:Pe(i[Be])*n,ms:Pe(lr(1e3*i[Ve]))*n}):(i=jr.exec(e))?(n="-"===i[1]?-1:1,a={y:Rr(i[2],n),M:Rr(i[3],n),w:Rr(i[4],n),d:Rr(i[5],n),h:Rr(i[6],n),m:Rr(i[7],n),s:Rr(i[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(o=Pr(Kn(a.from),Kn(a.to)),(a={}).ms=o.milliseconds,a.M=o.months),r=new ir(a),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Rr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Or(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Pr(e,t){var n;return e.isValid()&&t.isValid()?(t=pr(t,e),e.isBefore(t)?n=Or(e,t):((n=Or(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Tr(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(N(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),Dr(this,Nr(n,r),e),this}}function Dr(e,t,n,o){var a=t._milliseconds,i=lr(t._days),s=lr(t._months);e.isValid()&&(o=null==o||o,s&&ft(e,Ze(e,"Month")+s*n),i&&Xe(e,"Date",Ze(e,"Date")+i*n),a&&e._d.setTime(e._d.valueOf()+a*n),o&&r.updateOffset(e,i||s))}Nr.fn=ir.prototype,Nr.invalid=ar;var Mr=Tr(1,"add"),Ir=Tr(-1,"subtract");function Ar(e){return"string"==typeof e||e instanceof String}function Lr(e){return S(e)||d(e)||Ar(e)||c(e)||zr(e)||Fr(e)||null==e}function Fr(e){var t,n,r=i(e)&&!l(e),o=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=a.length;for(t=0;t<u;t+=1)n=a[t],o=o||s(e,n);return r&&o}function zr(e){var t=a(e),n=!1;return t&&(n=0===e.filter(function(t){return!c(t)&&Ar(e)}).length),t&&n}function $r(e){var t,n,r=i(e)&&!l(e),o=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)n=a[t],o=o||s(e,n);return r&&o}function Hr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Br(e,t){1===arguments.length&&(arguments[0]?Lr(arguments[0])?(e=arguments[0],t=void 0):$r(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Kn(),o=pr(n,this).startOf("day"),a=r.calendarFormat(this,o)||"sameElse",i=t&&(R(t[a])?t[a].call(this,n):t[a]);return this.format(i||this.localeData().calendar(a,this,Kn(n)))}function Vr(){return new C(this)}function Ur(e,t){var n=S(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function qr(e,t){var n=S(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Wr(e,t,n,r){var o=S(e)?e:Kn(e),a=S(t)?t:Kn(t);return!!(this.isValid()&&o.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))}function Yr(e,t){var n,r=S(e)?e:Kn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Gr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Kr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Qr(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(!(r=pr(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=ne(t)){case"year":a=Zr(this,r)/12;break;case"month":a=Zr(this,r);break;case"quarter":a=Zr(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:Oe(a)}function Zr(e,t){if(e.date()<t.date())return-Zr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Xr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Jr(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?V(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):R(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(n,"Z")):V(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eo(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,o="moment",a="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+o+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=a+'[")]',this.format(e+t+n+r)}function to(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=V(this,e);return this.localeData().postformat(t)}function no(e,t){return this.isValid()&&(S(e)&&e.isValid()||Kn(e).isValid())?Nr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ro(e){return this.from(Kn(),e)}function oo(e,t){return this.isValid()&&(S(e)&&e.isValid()||Kn(e).isValid())?Nr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ao(e){return this.to(Kn(),e)}function io(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var so=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function lo(){return this._locale}var uo=1e3,co=60*uo,fo=60*co,po=3506328*fo;function ho(e,t){return(e%t+t)%t}function mo(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-po:new Date(e,t,n).valueOf()}function go(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-po:Date.UTC(e,t,n)}function yo(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:mo,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ho(t+(this._isUTC?0:this.utcOffset()*co),fo);break;case"minute":t=this._d.valueOf(),t-=ho(t,co);break;case"second":t=this._d.valueOf(),t-=ho(t,uo)}return this._d.setTime(t),r.updateOffset(this,!0),this}function vo(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:mo,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=fo-ho(t+(this._isUTC?0:this.utcOffset()*co),fo)-1;break;case"minute":t=this._d.valueOf(),t+=co-ho(t,co)-1;break;case"second":t=this._d.valueOf(),t+=uo-ho(t,uo)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function bo(){return this._d.valueOf()-6e4*(this._offset||0)}function wo(){return Math.floor(this.valueOf()/1e3)}function xo(){return new Date(this.valueOf())}function Co(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function So(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ko(){return this.isValid()?this.toISOString():null}function _o(){return y(this)}function Eo(){return p({},g(this))}function jo(){return g(this).overflow}function No(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ro(e,t){var n,o,a,i=this._eras||vn("en")._eras;for(n=0,o=i.length;n<o;++n)switch("string"==typeof i[n].since&&(a=r(i[n].since).startOf("day"),i[n].since=a.valueOf()),typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":a=r(i[n].until).startOf("day").valueOf(),i[n].until=a.valueOf()}return i}function Oo(e,t,n){var r,o,a,i,s,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(a=l[r].name.toUpperCase(),i=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(i===e)return l[r];break;case"NNNN":if(a===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([a,i,s].indexOf(e)>=0)return l[r]}function Po(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function To(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Do(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Mo(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Io(){var e,t,n,o,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,o=this.clone().startOf("day").valueOf(),a[e].since<=o&&o<=a[e].until||a[e].until<=o&&o<=a[e].since)return(this.year()-r(a[e].since).year())*n+a[e].offset;return this.year()}function Ao(e){return s(this,"_erasNameRegex")||Vo.call(this),e?this._erasNameRegex:this._erasRegex}function Lo(e){return s(this,"_erasAbbrRegex")||Vo.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fo(e){return s(this,"_erasNarrowRegex")||Vo.call(this),e?this._erasNarrowRegex:this._erasRegex}function zo(e,t){return t.erasAbbrRegex(e)}function $o(e,t){return t.erasNameRegex(e)}function Ho(e,t){return t.erasNarrowRegex(e)}function Bo(e,t){return t._eraYearOrdinalRegex||ve}function Vo(){var e,t,n,r,o,a=[],i=[],s=[],l=[],u=this.eras();for(e=0,t=u.length;e<t;++e)n=Re(u[e].name),r=Re(u[e].abbr),o=Re(u[e].narrow),i.push(n),a.push(r),s.push(o),l.push(n),l.push(r),l.push(o);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function Uo(e,t){$(0,[e,e.length],0,t)}function qo(e){return Zo.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Wo(e){return Zo.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Yo(){return St(this.year(),1,4)}function Go(){return St(this.isoWeekYear(),1,4)}function Ko(){var e=this.localeData()._week;return St(this.year(),e.dow,e.doy)}function Qo(){var e=this.localeData()._week;return St(this.weekYear(),e.dow,e.doy)}function Zo(e,t,n,r,o){var a;return null==e?Ct(this,r,o).year:(t>(a=St(e,r,o))&&(t=a),Xo.call(this,e,t,n,r,o))}function Xo(e,t,n,r,o){var a=xt(e,t,n,r,o),i=bt(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}function Jo(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}$("N",0,0,"eraAbbr"),$("NN",0,0,"eraAbbr"),$("NNN",0,0,"eraAbbr"),$("NNNN",0,0,"eraName"),$("NNNNN",0,0,"eraNarrow"),$("y",["y",1],"yo","eraYear"),$("y",["yy",2],0,"eraYear"),$("y",["yyy",3],0,"eraYear"),$("y",["yyyy",4],0,"eraYear"),Ee("N",zo),Ee("NN",zo),Ee("NNN",zo),Ee("NNNN",$o),Ee("NNNNN",Ho),De(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?g(n).era=o:g(n).invalidEra=e}),Ee("y",ve),Ee("yy",ve),Ee("yyy",ve),Ee("yyyy",ve),Ee("yo",Bo),De(["y","yy","yyy","yyyy"],Le),De(["yo"],function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Le]=n._locale.eraYearOrdinalParse(e,o):t[Le]=parseInt(e,10)}),$(0,["gg",2],0,function(){return this.weekYear()%100}),$(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Uo("gggg","weekYear"),Uo("ggggg","weekYear"),Uo("GGGG","isoWeekYear"),Uo("GGGGG","isoWeekYear"),Ee("G",be),Ee("g",be),Ee("GG",fe,le),Ee("gg",fe,le),Ee("GGGG",ge,ce),Ee("gggg",ge,ce),Ee("GGGGG",ye,de),Ee("ggggg",ye,de),Me(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Pe(e)}),Me(["gg","GG"],function(e,t,n,o){t[o]=r.parseTwoDigitYear(e)}),$("Q",0,"Qo","quarter"),Ee("Q",se),De("Q",function(e,t){t[Fe]=3*(Pe(e)-1)}),$("D",["DD",2],"Do","date"),Ee("D",fe,ke),Ee("DD",fe,le),Ee("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),De(["D","DD"],ze),De("Do",function(e,t){t[ze]=Pe(e.match(fe)[0])});var ea=Qe("Date",!0);function ta(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}$("DDD",["DDDD",3],"DDDo","dayOfYear"),Ee("DDD",me),Ee("DDDD",ue),De(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Pe(e)}),$("m",["mm",2],0,"minute"),Ee("m",fe,_e),Ee("mm",fe,le),De(["m","mm"],He);var na=Qe("Minutes",!1);$("s",["ss",2],0,"second"),Ee("s",fe,_e),Ee("ss",fe,le),De(["s","ss"],Be);var ra,oa,aa=Qe("Seconds",!1);for($("S",0,0,function(){return~~(this.millisecond()/100)}),$(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,function(){return 10*this.millisecond()}),$(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),$(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),$(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),$(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),$(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Ee("S",me,se),Ee("SS",me,le),Ee("SSS",me,ue),ra="SSSS";ra.length<=9;ra+="S")Ee(ra,ve);function ia(e,t){t[Ve]=Pe(1e3*("0."+e))}for(ra="S";ra.length<=9;ra+="S")De(ra,ia);function sa(){return this._isUTC?"UTC":""}function la(){return this._isUTC?"Coordinated Universal Time":""}oa=Qe("Milliseconds",!1),$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var ua=C.prototype;function ca(e){return Kn(1e3*e)}function da(){return Kn.apply(null,arguments).parseZone()}function fa(e){return e}ua.add=Mr,ua.calendar=Br,ua.clone=Vr,ua.diff=Qr,ua.endOf=vo,ua.format=to,ua.from=no,ua.fromNow=ro,ua.to=oo,ua.toNow=ao,ua.get=Je,ua.invalidAt=jo,ua.isAfter=Ur,ua.isBefore=qr,ua.isBetween=Wr,ua.isSame=Yr,ua.isSameOrAfter=Gr,ua.isSameOrBefore=Kr,ua.isValid=_o,ua.lang=so,ua.locale=io,ua.localeData=lo,ua.max=Zn,ua.min=Qn,ua.parsingFlags=Eo,ua.set=et,ua.startOf=yo,ua.subtract=Ir,ua.toArray=Co,ua.toObject=So,ua.toDate=xo,ua.toISOString=Jr,ua.inspect=eo,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ua[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ua.toJSON=ko,ua.toString=Xr,ua.unix=wo,ua.valueOf=bo,ua.creationData=No,ua.eraName=To,ua.eraNarrow=Do,ua.eraAbbr=Mo,ua.eraYear=Io,ua.year=Ge,ua.isLeapYear=Ke,ua.weekYear=qo,ua.isoWeekYear=Wo,ua.quarter=ua.quarters=Jo,ua.month=pt,ua.daysInMonth=ht,ua.week=ua.weeks=Nt,ua.isoWeek=ua.isoWeeks=Rt,ua.weeksInYear=Ko,ua.weeksInWeekYear=Qo,ua.isoWeeksInYear=Yo,ua.isoWeeksInISOWeekYear=Go,ua.date=ea,ua.day=ua.days=Ut,ua.weekday=qt,ua.isoWeekday=Wt,ua.dayOfYear=ta,ua.hour=ua.hours=rn,ua.minute=ua.minutes=na,ua.second=ua.seconds=aa,ua.millisecond=ua.milliseconds=oa,ua.utcOffset=mr,ua.utc=yr,ua.local=vr,ua.parseZone=br,ua.hasAlignedHourOffset=wr,ua.isDST=xr,ua.isLocal=Sr,ua.isUtcOffset=kr,ua.isUtc=_r,ua.isUTC=_r,ua.zoneAbbr=sa,ua.zoneName=la,ua.dates=_("dates accessor is deprecated. Use date instead.",ea),ua.months=_("months accessor is deprecated. Use month instead",pt),ua.years=_("years accessor is deprecated. Use year instead",Ge),ua.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),ua.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Cr);var pa=T.prototype;function ha(e,t,n,r){var o=vn(),a=h().set(r,t);return o[n](a,e)}function ma(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return ha(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=ha(e,r,n,"month");return o}function ga(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var o,a=vn(),i=e?a._week.dow:0,s=[];if(null!=n)return ha(t,(n+i)%7,r,"day");for(o=0;o<7;o++)s[o]=ha(t,(o+i)%7,r,"day");return s}function ya(e,t){return ma(e,t,"months")}function va(e,t){return ma(e,t,"monthsShort")}function ba(e,t,n){return ga(e,t,n,"weekdays")}function wa(e,t,n){return ga(e,t,n,"weekdaysShort")}function xa(e,t,n){return ga(e,t,n,"weekdaysMin")}pa.calendar=M,pa.longDateFormat=W,pa.invalidDate=G,pa.ordinal=Z,pa.preparse=fa,pa.postformat=fa,pa.relativeTime=J,pa.pastFuture=ee,pa.set=O,pa.eras=Ro,pa.erasParse=Oo,pa.erasConvertYear=Po,pa.erasAbbrRegex=Lo,pa.erasNameRegex=Ao,pa.erasNarrowRegex=Fo,pa.months=lt,pa.monthsShort=ut,pa.monthsParse=dt,pa.monthsRegex=gt,pa.monthsShortRegex=mt,pa.week=kt,pa.firstDayOfYear=jt,pa.firstDayOfWeek=Et,pa.weekdays=zt,pa.weekdaysMin=Ht,pa.weekdaysShort=$t,pa.weekdaysParse=Vt,pa.weekdaysRegex=Yt,pa.weekdaysShortRegex=Gt,pa.weekdaysMinRegex=Kt,pa.isPM=tn,pa.meridiem=on,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Pe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=_("moment.lang is deprecated. Use moment.locale instead.",mn),r.langData=_("moment.langData is deprecated. Use moment.localeData instead.",vn);var Ca=Math.abs;function Sa(){var e=this._data;return this._milliseconds=Ca(this._milliseconds),this._days=Ca(this._days),this._months=Ca(this._months),e.milliseconds=Ca(e.milliseconds),e.seconds=Ca(e.seconds),e.minutes=Ca(e.minutes),e.hours=Ca(e.hours),e.months=Ca(e.months),e.years=Ca(e.years),this}function ka(e,t,n,r){var o=Nr(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function _a(e,t){return ka(this,e,t,1)}function Ea(e,t){return ka(this,e,t,-1)}function ja(e){return e<0?Math.floor(e):Math.ceil(e)}function Na(){var e,t,n,r,o,a=this._milliseconds,i=this._days,s=this._months,l=this._data;return a>=0&&i>=0&&s>=0||a<=0&&i<=0&&s<=0||(a+=864e5*ja(Oa(s)+i),i=0,s=0),l.milliseconds=a%1e3,e=Oe(a/1e3),l.seconds=e%60,t=Oe(e/60),l.minutes=t%60,n=Oe(t/60),l.hours=n%24,i+=Oe(n/24),s+=o=Oe(Ra(i)),i-=ja(Oa(o)),r=Oe(s/12),s%=12,l.days=i,l.months=s,l.years=r,this}function Ra(e){return 4800*e/146097}function Oa(e){return 146097*e/4800}function Pa(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Ra(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Oa(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Ta(e){return function(){return this.as(e)}}var Da=Ta("ms"),Ma=Ta("s"),Ia=Ta("m"),Aa=Ta("h"),La=Ta("d"),Fa=Ta("w"),za=Ta("M"),$a=Ta("Q"),Ha=Ta("y"),Ba=Da;function Va(){return Nr(this)}function Ua(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function qa(e){return function(){return this.isValid()?this._data[e]:NaN}}var Wa=qa("milliseconds"),Ya=qa("seconds"),Ga=qa("minutes"),Ka=qa("hours"),Qa=qa("days"),Za=qa("months"),Xa=qa("years");function Ja(){return Oe(this.days()/7)}var ei=Math.round,ti={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ni(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function ri(e,t,n,r){var o=Nr(e).abs(),a=ei(o.as("s")),i=ei(o.as("m")),s=ei(o.as("h")),l=ei(o.as("d")),u=ei(o.as("M")),c=ei(o.as("w")),d=ei(o.as("y")),f=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(f=f||c<=1&&["w"]||c<n.w&&["ww",c]),(f=f||u<=1&&["M"]||u<n.M&&["MM",u]||d<=1&&["y"]||["yy",d])[2]=t,f[3]=+e>0,f[4]=r,ni.apply(null,f)}function oi(e){return void 0===e?ei:"function"==typeof e&&(ei=e,!0)}function ai(e,t){return void 0!==ti[e]&&(void 0===t?ti[e]:(ti[e]=t,"s"===e&&(ti.ss=t-1),!0))}function ii(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,a=ti;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(a=Object.assign({},ti,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),r=ri(this,!o,a,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)}var si=Math.abs;function li(e){return(e>0)-(e<0)||+e}function ui(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,a,i,s,l=si(this._milliseconds)/1e3,u=si(this._days),c=si(this._months),d=this.asSeconds();return d?(e=Oe(l/60),t=Oe(e/60),l%=60,e%=60,n=Oe(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",a=li(this._months)!==li(d)?"-":"",i=li(this._days)!==li(d)?"-":"",s=li(this._milliseconds)!==li(d)?"-":"",o+"P"+(n?a+n+"Y":"")+(c?a+c+"M":"")+(u?i+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var ci=ir.prototype;return ci.isValid=or,ci.abs=Sa,ci.add=_a,ci.subtract=Ea,ci.as=Pa,ci.asMilliseconds=Da,ci.asSeconds=Ma,ci.asMinutes=Ia,ci.asHours=Aa,ci.asDays=La,ci.asWeeks=Fa,ci.asMonths=za,ci.asQuarters=$a,ci.asYears=Ha,ci.valueOf=Ba,ci._bubble=Na,ci.clone=Va,ci.get=Ua,ci.milliseconds=Wa,ci.seconds=Ya,ci.minutes=Ga,ci.hours=Ka,ci.days=Qa,ci.weeks=Ja,ci.months=Za,ci.years=Xa,ci.humanize=ii,ci.toISOString=ui,ci.toString=ui,ci.toJSON=ui,ci.locale=io,ci.localeData=lo,ci.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ui),ci.lang=so,$("X",0,0,"unix"),$("x",0,0,"valueOf"),Ee("x",be),Ee("X",Ce),De("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),De("x",function(e,t,n){n._d=new Date(Pe(e))}),
|
|
140
140
|
//! moment.js
|
|
141
|
-
r.version="2.30.1",o(Kn),r.fn=ua,r.min=Jn,r.max=er,r.now=tr,r.utc=h,r.unix=ca,r.months=ya,r.isDate=d,r.locale=mn,r.invalid=v,r.duration=Nr,r.isMoment=S,r.weekdays=ba,r.parseZone=da,r.localeData=vn,r.isDuration=sr,r.monthsShort=va,r.weekdaysMin=xa,r.defineLocale=gn,r.updateLocale=yn,r.locales=bn,r.weekdaysShort=wa,r.normalizeUnits=ne,r.relativeTimeRounding=oi,r.relativeTimeThreshold=ai,r.calendarFormat=Hr,r.prototype=ua,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}(Xx)),Xx.exports),eC=n(Jx),tC="Dialog",[nC]=ai(tC),[rC,oC]=nC(tC),aC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=D.useRef(null),l=D.useRef(null),[u,c]=ui({prop:r,defaultProp:o??!1,onChange:a,caller:tC});return m.jsx(rC,{scope:t,triggerRef:s,contentRef:l,contentId:Ui(),titleId:Ui(),descriptionId:Ui(),open:u,onOpenChange:c,onOpenToggle:D.useCallback(()=>c(e=>!e),[c]),modal:i,children:n})};aC.displayName=tC;var iC="DialogTrigger";D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=oC(iC,n),a=oi(t,o.triggerRef);return m.jsx(hi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":EC(o.open),...r,ref:a,onClick:ti(e.onClick,o.onOpenToggle)})}).displayName=iC;var sC="DialogPortal",[lC,uC]=nC(sC,{forceMount:void 0}),cC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=oC(sC,t);return m.jsx(lC,{scope:t,forceMount:n,children:D.Children.map(r,e=>m.jsx(iu,{present:n||a.open,children:m.jsx(au,{asChild:!0,container:o,children:e})}))})};cC.displayName=sC;var dC="DialogOverlay",fC=D.forwardRef((e,t)=>{const n=uC(dC,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=oC(dC,e.__scopeDialog);return a.modal?m.jsx(iu,{present:r||a.open,children:m.jsx(hC,{...o,ref:t})}):null});fC.displayName=dC;var pC=ci("DialogOverlay.RemoveScroll"),hC=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=oC(dC,n);return m.jsx(wc,{as:pC,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(hi.div,{"data-state":EC(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),mC="DialogContent",gC=D.forwardRef((e,t)=>{const n=uC(mC,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=oC(mC,e.__scopeDialog);return m.jsx(iu,{present:r||a.open,children:a.modal?m.jsx(yC,{...o,ref:t}):m.jsx(vC,{...o,ref:t})})});gC.displayName=mC;var yC=D.forwardRef((e,t)=>{const n=oC(mC,e.__scopeDialog),r=D.useRef(null),o=oi(t,n.contentRef,r);return D.useEffect(()=>{const e=r.current;if(e)return Tu(e)},[]),m.jsx(bC,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ti(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ti(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:ti(e.onFocusOutside,e=>e.preventDefault())})}),vC=D.forwardRef((e,t)=>{const n=oC(mC,e.__scopeDialog),r=D.useRef(!1),o=D.useRef(!1);return m.jsx(bC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=n.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),bC=D.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=oC(mC,n),l=D.useRef(null),u=oi(t,l);return Oi(),m.jsxs(m.Fragment,{children:[m.jsx(Ii,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(_i,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":EC(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(OC,{titleId:s.titleId}),m.jsx(PC,{contentRef:l,descriptionId:s.descriptionId})]})]})}),wC="DialogTitle",xC=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=oC(wC,n);return m.jsx(hi.h2,{id:o.titleId,...r,ref:t})});xC.displayName=wC;var CC="DialogDescription",SC=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=oC(CC,n);return m.jsx(hi.p,{id:o.descriptionId,...r,ref:t})});SC.displayName=CC;var kC="DialogClose",_C=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=oC(kC,n);return m.jsx(hi.button,{type:"button",...r,ref:t,onClick:ti(e.onClick,()=>o.onOpenChange(!1))})});function EC(e){return e?"open":"closed"}_C.displayName=kC;var jC="DialogTitleWarning",[NC,RC]=function(e,t){const n=D.createContext(t),r=e=>{const{children:t,...r}=e,o=D.useMemo(()=>r,Object.values(r));return m.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=D.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(jC,{contentName:mC,titleName:wC,docsSlug:"dialog"}),OC=({titleId:e})=>{const t=RC(jC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return D.useEffect(()=>{if(e){document.getElementById(e)||console.error(n)}},[n,e]),null},PC=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${RC("DialogDescriptionWarning").contentName}}.`;return D.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)||console.warn(n)}},[n,e,t]),null},TC=aC,DC=cC,MC=fC,IC=gC,AC=xC,LC=SC,FC=_C;const zC=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,$C=To,HC=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return $C(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=zC(t)||zC(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return $C(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},BC=TC,VC=FC,UC=DC,qC=D.forwardRef(({className:e,...t},n)=>m.jsx(MC,{className:Ya("fixed inset-0 z-50 bg-[#1E1E1E]/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));qC.displayName=MC.displayName;const WC=HC("fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-neutral-950",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),YC=D.forwardRef(({side:e="right",className:t,children:n,...r},o)=>{const{portalRef:a}=Pr();return m.jsxs(UC,{container:a.current,children:[m.jsx(qC,{}),m.jsx(IC,{ref:o,className:Ya(WC({side:e}),t),...r,children:n})]})});YC.displayName=IC.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(AC,{ref:n,className:Ya("text-lg font-semibold text-neutral-950 dark:text-neutral-50",e),...t})).displayName=AC.displayName;function GC({children:e,isOpen:t,onClose:n,title:r,className:o}){const[a,i]=D.useState(!1);return m.jsx(BC,{open:t,onOpenChange:n,children:m.jsxs(YC,{className:Ya("p-[30px] rounded-l-xl lg:max-w-full space-y-6 overflow-auto",o,a?"w-full rounded-l-none":null),children:[m.jsxs("div",{className:"flex items-center justify-between border-b pb-2",children:[m.jsx("h1",{className:"text-gray-900 font-semibold text-xl",children:r}),m.jsxs("div",{className:"flex items-center gap-5",children:[m.jsx("button",{className:"w-9 h-9 flex items-center justify-center rounded-md hover:ring-2 ring-inset ring-dark",onClick:()=>{i(!a)},children:Kv.expand}),m.jsx(VC,{asChild:!0,className:"w-9 h-9 rounded-md flex items-center justify-center bg-danger_light",children:m.jsxs("button",{children:[" ",M.cloneElement(Kv.close2,{fill:"#F1416C"})]})})]})]}),e]})})}function KC({children:e,className:t}){return m.jsx("div",{className:Ya("border rounded-xl py-[30px] border-gray-200 ",t),children:e})}function QC(){return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(ei,{className:"h-5 w-[500px] rounded-md"}),m.jsx(ei,{className:"h-5 w-[500px] rounded-md"})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(ei,{className:"h-9 w-[140px] rounded-md"}),m.jsx(ei,{className:"h-9 w-[140px] rounded-md"})]})]}),m.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[m.jsxs(KC,{className:"p-4 flex flex-col gap-3",children:[m.jsx(ei,{className:"flex-grow w-full rounded-md"}),m.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[m.jsx(ei,{className:"h-[79px] rounded-md"}),m.jsx(ei,{className:"h-[79px] rounded-md"}),m.jsx(ei,{className:"h-[79px] rounded-md"})]})]}),m.jsxs("div",{className:"space-y-8 col-span-2",children:[m.jsx(ei,{className:"h-9 w-full rounded-md"}),m.jsx(ei,{className:"h-4 w-[326px] rounded-md"}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(ei,{className:"h-3.5 w-[150px] rounded-md"}),m.jsx(ei,{className:"h-10 w-full rounded-md"})]}),m.jsx(ei,{className:"h-9 w-[500px] rounded-md"}),m.jsxs("div",{className:"flex gap-3",children:[m.jsx(ei,{className:"h-12 w-[115px] rounded-md"}),m.jsx(ei,{className:"h-12 w-[150px] rounded-md"}),m.jsx(ei,{className:"h-12 w-[171px] rounded-md"})]}),m.jsx(ei,{className:"h-3.5 w-[337px] rounded-md"})]})]}),m.jsxs("div",{className:"flex gap-4",children:[m.jsx(ei,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(ei,{className:"h-3.5 w-[140px] rounded-md"})]}),m.jsx("div",{className:"grid grid-cols-4 gap-3",children:[1,2,3,4].map((e,t)=>m.jsxs("div",{className:"border rounded-xl border-gray-200 p-4 gap-4 flex flex-col",children:[m.jsx(ei,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(ei,{className:"h-10 w-[200px] rounded-md"})]},t))}),m.jsx("div",{className:"space-y-6",children:[1,2,3,4].map((e,t)=>m.jsxs("div",{className:" gap-4 flex flex-col",children:[m.jsx(ei,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(ei,{className:"h-[163px] w-[896px] rounded-md"})]},t))})]})}D.forwardRef(({className:e,...t},n)=>m.jsx(LC,{ref:n,className:Ya("text-sm text-neutral-500 dark:text-neutral-400",e),...t})).displayName=LC.displayName;var ZC="https://unpkg.com/@simpoobusiness/sdk/dist/assets/placeholder-image94ba15ea00cc66fe.svg";function XC({images:e}){return m.jsxs(KC,{className:"p-5 flex flex-col gap-2.5",children:[m.jsx("div",{className:"relative flex-grow",children:m.jsx("img",{src:e?.[0]??ZC,sizes:"100%",alt:"item image",draggable:!1,className:"rounded-xl object-cover w-full h-full"})}),m.jsx("div",{className:"flex gap-4 overflow-auto",children:e.filter((e,t)=>0!==t).map((e,t)=>m.jsx("div",{className:"w-[89px] h-[79px] relative shrink-0",children:m.jsx("img",{src:e??ZC,alt:"item image",draggable:!1,className:"rounded-xl object-cover h-full w-full"})},t))})]})}var JC=Symbol.for("react.lazy"),eS=I[" use ".trim().toString()];function tS(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===JC&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function nS(e){const t=oS(e),n=D.forwardRef((e,n)=>{let{children:r,...o}=e;tS(r)&&"function"==typeof eS&&(r=eS(r._payload));const a=D.Children.toArray(r),i=a.find(iS);if(i){const e=i.props.children,r=a.map(t=>t===i?D.Children.count(e)>1?D.Children.only(null):D.isValidElement(e)?e.props.children:null:t);return m.jsx(t,{...o,ref:n,children:D.isValidElement(e)?D.cloneElement(e,void 0,r):null})}return m.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var rS=nS("Slot");function oS(e){const t=D.forwardRef((e,t)=>{let{children:n,...r}=e;if(tS(n)&&"function"==typeof eS&&(n=eS(n._payload)),D.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==D.Fragment&&(o.ref=t?ri(t,e):e),D.cloneElement(n,o)}return D.Children.count(n)>1?D.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var aS=Symbol("radix.slottable");function iS(e){return D.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===aS}var sS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=nS(`Primitive.${t}`),r=D.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),lS="horizontal",uS=["horizontal","vertical"],cS=D.forwardRef((e,t)=>{const{decorative:n,orientation:r=lS,...o}=e,a=function(e){return uS.includes(e)}(r)?r:lS,i=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return m.jsx(sS.div,{"data-orientation":a,...i,...o,ref:t})});cS.displayName="Separator";var dS=cS;const fS=D.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>m.jsx(dS,{ref:o,decorative:n,orientation:t,className:Ya("shrink-0 bg-gray-300 dark:bg-neutral-800","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...r}));function pS({data:e,printLabel:t}){const n=[{tag:"reorder level",value:`${e?.reorder_level} ${e?.unit_resource?.name}`},{tag:"packing groups",value:`${e?.item_group?.length} group(s)`},{tag:"variations",value:`${e?.variation?.length} variable(s)`},{tag:"extras",value:`${e?.extras?.length} extras`}];return m.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[m.jsx(XC,{images:e?.images?.map(e=>e.image)}),m.jsxs("div",{className:"col-span-2 flex flex-col gap-9",children:[m.jsxs("div",{className:"flex gap-4 bg-primary_light p-2.5 rounded-md",children:[m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Cost price:"," ",m.jsx("span",{className:"text-dark font-bold text-[15px]",children:Jv(Number(e?.cost_price))})]}),m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Selling price:"," ",e?.duplicate_prices?.map((t,n)=>m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-dark font-bold text-[15px] px-2",children:Jv(Number(t.selling_price))},n),n<e?.duplicate_prices?.length-1&&"-"]}))]})]}),m.jsxs("div",{className:"flex gap-2.5",children:[m.jsxs("p",{className:"text-gray-800 text-sm font-medium",children:["In stock:"," ",m.jsxs("span",{className:"text-dark font-bold text-[15px]",children:[eb(Number(e?.quantity))," ",e?.item_unit]})]}),"|",m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Total sold:"," ",m.jsxs("span",{className:"text-dark font-bold text-[15px]",children:[eb(e?.total_sold)," ",e?.item_unit]})]})]}),m.jsxs("div",{className:"space-y-2.5",children:[m.jsx("h2",{className:"text-gray-800 text-sm font-bold",children:"Description"}),m.jsx("p",{className:"text-gray-800 font-normal text-sm",children:e?.description??"No description..."})]}),m.jsx("div",{className:"flex gap-5 items-center",children:n.map((e,t)=>m.jsxs("div",{className:"flex gap-5 items-center",children:[m.jsxs("div",{className:"flex flex-col gap-2.5",children:[m.jsx("p",{className:"text-dark font-medium text-sm first-letter:uppercase",children:e.tag}),m.jsx("p",{className:"text-primary",children:e.value})]}),t<n.length-1&&m.jsx(fS,{className:"bg-[#7E8299] h-[30px] w-[1px]"})]},t))}),m.jsxs("div",{className:"flex gap-2.5 items-center",children:[m.jsxs("p",{className:"text-gray-700 text-sm font-medium flex gap-2",children:["Category:"," ",e?.category?.map((e,t)=>m.jsxs("span",{className:"text-dark font-normal text-[15px]",children:[e.name," "]},t))]}),m.jsx(fS,{className:"bg-[#7E8299] h-[14px] w-[1px]"}),m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Collection:"," ",e?.item_tags?.map((e,t)=>m.jsx("span",{className:"text-dark font-normal text-[15px]",children:e.name},t))]})]})]})]})}fS.displayName=dS.displayName;var hS=.999,mS=/[\\\/_+.#"@\[\(\{&]/,gS=/[\\\/_+.#"@\[\(\{&]/g,yS=/[\s-]/,vS=/[\s-]/g;function bS(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?1:.99;var s=`${o},${a}`;if(void 0!==i[s])return i[s];for(var l,u,c,d,f=r.charAt(a),p=n.indexOf(f,o),h=0;p>=0;)(l=bS(e,t,n,r,p+1,a+1,i))>h&&(p===o?l*=1:mS.test(e.charAt(p-1))?(l*=.8,(c=e.slice(o,p-1).match(gS))&&o>0&&(l*=Math.pow(hS,c.length))):yS.test(e.charAt(p-1))?(l*=.9,(d=e.slice(o,p-1).match(vS))&&o>0&&(l*=Math.pow(hS,d.length))):(l*=.17,o>0&&(l*=Math.pow(hS,p-o))),e.charAt(p)!==t.charAt(a)&&(l*=.9999)),(l<.1&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&(.1*(u=bS(e,t,n,r,p+1,a+2,i))>l&&(l=.1*u)),l>h&&(h=l),p=n.indexOf(f,p+1);return i[s]=h,h}function wS(e){return e.toLowerCase().replace(vS," ")}function xS(e,t,n){return bS(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,wS(e),wS(t),0,0,{})}var CS='[cmdk-group=""]',SS='[cmdk-group-items=""]',kS='[cmdk-item=""]',_S=`${kS}:not([aria-disabled="true"])`,ES="cmdk-item-select",jS="data-value",NS=(e,t,n)=>xS(e,t,n),RS=D.createContext(void 0),OS=()=>D.useContext(RS),PS=D.createContext(void 0),TS=()=>D.useContext(PS),DS=D.createContext(void 0),MS=D.forwardRef((e,t)=>{let n=GS(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=GS(()=>new Set),o=GS(()=>new Map),a=GS(()=>new Map),i=GS(()=>new Set),s=WS(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:g=!0,...y}=e,v=Ui(),b=Ui(),w=Ui(),x=D.useRef(null),C=ZS();YS(()=>{if(void 0!==c){let e=c.trim();n.current.value=e,S.emit()}},[c]),YS(()=>{C(6,R)},[]);let S=D.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i,l;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)N(),E(),C(1,j);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(o=document.getElementById(v))||o.focus()}if(C(7,()=>{var e;n.current.selectedItemId=null==(e=O())?void 0:e.id,S.emit()}),r||C(5,R),void 0!==(null==(a=s.current)?void 0:a.value)){let e=null!=t?t:"";return void(null==(l=(i=s.current).onValueChange)||l.call(i,e))}}S.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),k=D.useMemo(()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,_(t,r)),C(2,()=>{E(),S.emit()}))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),C(3,()=>{N(),E(),n.current.value||j(),S.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=O();C(4,()=>{N(),(null==t?void 0:t.getAttribute("id"))===e&&j(),S.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:w,labelId:b,listInnerRef:x}),[]);function _(e,t){var r,o;let a=null!=(o=null==(r=s.current)?void 0:r.filter)?o:NS;return e?a(e,n.current.search,t):0}function E(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=o.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;P().sort((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(SS);t?t.appendChild(e.parentElement===t?e:e.closest(`${SS} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${SS} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=x.current)?void 0:t.querySelector(`${CS}[${jS}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function j(){let e=P().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(jS);S.setState("value",t||void 0)}function N(){var e,t,i,l;if(!n.current.search||!1===s.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let u=0;for(let o of r.current){let r=_(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(l=null==(i=a.current.get(o))?void 0:i.keywords)?l:[]);n.current.filtered.items.set(o,r),r>0&&u++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function R(){var e,t,n;let r=O();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(CS))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function O(){var e;return null==(e=x.current)?void 0:e.querySelector(`${kS}[aria-selected="true"]`)}function P(){var e;return Array.from((null==(e=x.current)?void 0:e.querySelectorAll(_S))||[])}function T(e){let t=P()[e];t&&S.setState("value",t.getAttribute(jS))}function M(e){var t;let n=O(),r=P(),o=r.findIndex(e=>e===n),a=r[o+e];null!=(t=s.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&S.setState("value",a.getAttribute(jS))}function I(e){let t,n=O(),r=null==n?void 0:n.closest(CS);for(;r&&!t;)r=e>0?US(r,CS):qS(r,CS),t=null==r?void 0:r.querySelector(_S);t?S.setState("value",t.getAttribute(jS)):M(e)}let A=()=>T(P().length-1),L=e=>{e.preventDefault(),e.metaKey?A():e.altKey?I(1):M(1)},F=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?I(-1):M(-1)};return D.createElement(sS.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=y.onKeyDown)||t.call(y,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!n)switch(e.key){case"n":case"j":g&&e.ctrlKey&&L(e);break;case"ArrowDown":L(e);break;case"p":case"k":g&&e.ctrlKey&&F(e);break;case"ArrowUp":F(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),A();break;case"Enter":{e.preventDefault();let t=O();if(t){let e=new Event(ES);t.dispatchEvent(e)}}}}},D.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:JS},l),XS(e,e=>D.createElement(PS.Provider,{value:S},D.createElement(RS.Provider,{value:k},e))))}),IS=D.forwardRef((e,t)=>{var n,r;let o=Ui(),a=D.useRef(null),i=D.useContext(DS),s=OS(),l=WS(e),u=null!=(r=null==(n=l.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;YS(()=>{if(!u)return s.item(o,null==i?void 0:i.id)},[u]);let c=QS(o,a,[e.value,e.children,a],e.keywords),d=TS(),f=KS(e=>e.value&&e.value===c.current),p=KS(e=>!(!u&&!1!==s.filter())||(!e.search||e.filtered.items.get(o)>0));function h(){var e,t;m(),null==(t=(e=l.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(D.useEffect(()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(ES,h),()=>t.removeEventListener(ES,h)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:g,value:y,onSelect:v,forceMount:b,keywords:w,...x}=e;return D.createElement(sS.div,{ref:ri(a,t),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||s.getDisablePointerSelection()?void 0:m,onClick:g?void 0:h},e.children)}),AS=D.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=Ui(),s=D.useRef(null),l=D.useRef(null),u=Ui(),c=OS(),d=KS(e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i)));YS(()=>c.group(i),[]),QS(i,s,[e.value,e.heading,l]);let f=D.useMemo(()=>({id:i,forceMount:o}),[o]);return D.createElement(sS.div,{ref:ri(s,t),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&D.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),XS(e,e=>D.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},D.createElement(DS.Provider,{value:f},e))))}),LS=D.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=D.useRef(null),a=KS(e=>!e.search);return n||a?D.createElement(sS.div,{ref:ri(o,t),...r,"cmdk-separator":"",role:"separator"}):null}),FS=D.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=TS(),i=KS(e=>e.search),s=KS(e=>e.selectedItemId),l=OS();return D.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),D.createElement(sS.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})}),zS=D.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=D.useRef(null),i=D.useRef(null),s=KS(e=>e.selectedItemId),l=OS();return D.useEffect(()=>{if(i.current&&a.current){let e,t=i.current,n=a.current,r=new ResizeObserver(()=>{e=requestAnimationFrame(()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")})});return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}},[]),D.createElement(sS.div,{ref:ri(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},XS(e,e=>D.createElement("div",{ref:ri(i,l.listInnerRef),"cmdk-list-sizer":""},e)))}),$S=D.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return D.createElement(TC,{open:n,onOpenChange:r},D.createElement(DC,{container:i},D.createElement(MC,{"cmdk-overlay":"",className:o}),D.createElement(IC,{"aria-label":e.label,"cmdk-dialog":"",className:a},D.createElement(MS,{ref:t,...s}))))}),HS=D.forwardRef((e,t)=>KS(e=>0===e.filtered.count)?D.createElement(sS.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),BS=D.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return D.createElement(sS.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},XS(e,e=>D.createElement("div",{"aria-hidden":!0},e)))}),VS=Object.assign(MS,{List:zS,Item:IS,Input:FS,Group:AS,Separator:LS,Dialog:$S,Empty:HS,Loading:BS});function US(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function qS(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function WS(e){let t=D.useRef(e);return YS(()=>{t.current=e}),t}var YS="undefined"==typeof window?D.useEffect:D.useLayoutEffect;function GS(e){let t=D.useRef();return void 0===t.current&&(t.current=e()),t}function KS(e){let t=TS(),n=()=>e(t.snapshot());return D.useSyncExternalStore(t.subscribe,n,n)}function QS(e,t,n,r=[]){let o=D.useRef(),a=OS();return YS(()=>{var i;let s=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),l=r.map(e=>e.trim());a.value(e,s,l),null==(i=t.current)||i.setAttribute(jS,s),o.current=s}),o}var ZS=()=>{let[e,t]=D.useState(),n=GS(()=>new Map);return YS(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function XS({asChild:e,children:t},n){return e&&D.isValidElement(t)?D.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(t),{ref:t.ref},n(t.props.children)):n(t)}var JS={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ek=TC,tk=DC,nk=D.forwardRef(({className:e,...t},n)=>m.jsx(MC,{ref:n,className:Ya("fixed inset-0 z-50 bg-[#1E1E1E]/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));nk.displayName=MC.displayName;const rk=D.forwardRef(({className:e,children:t,...n},r)=>{const{portalRef:o}=Pr();return m.jsxs(tk,{container:o.current,children:[m.jsx(nk,{}),m.jsxs(IC,{ref:r,className:Ya("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...n,children:[t,m.jsxs(FC,{className:"hidden absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[m.jsx(Df,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});rk.displayName=IC.displayName;const ok=D.forwardRef(({className:e,...t},n)=>m.jsx(AC,{ref:n,className:Ya("text-lg font-semibold leading-none tracking-tight",e),...t}));ok.displayName=AC.displayName;const ak=D.forwardRef(({className:e,...t},n)=>m.jsx(LC,{ref:n,className:Ya("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));ak.displayName=LC.displayName;const ik=D.forwardRef(({className:e,...t},n)=>m.jsx(VS,{ref:n,className:Ya("flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50",e),...t}));ik.displayName=VS.displayName;const sk=D.forwardRef(({className:e,...t},n)=>m.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m.jsx(Tf,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m.jsx(VS.Input,{ref:n,className:Ya("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400",e),...t})]}));sk.displayName=VS.Input.displayName;const lk=D.forwardRef(({className:e,...t},n)=>m.jsx(VS.List,{ref:n,className:Ya("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));lk.displayName=VS.List.displayName;const uk=D.forwardRef((e,t)=>m.jsx(VS.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));uk.displayName=VS.Empty.displayName;const ck=D.forwardRef(({className:e,...t},n)=>m.jsx(VS.Group,{ref:n,className:Ya("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400",e),...t}));ck.displayName=VS.Group.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(VS.Separator,{ref:n,className:Ya("-mx-1 h-px bg-neutral-200 dark:bg-neutral-800",e),...t})).displayName=VS.Separator.displayName;const dk=D.forwardRef(({className:e,...t},n)=>m.jsx(VS.Item,{ref:n,className:Ya("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-primary_light data-[selected=true]:text-primary data-[disabled=true]:opacity-50 dark:data-[selected='true']:bg-primary_light dark:data-[selected=true]:text-primary",e),...t}));dk.displayName=VS.Item.displayName;var fk="Popover",[pk]=ai(fk,[zl]),hk=zl(),[mk,gk]=pk(fk),yk=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=hk(t),l=D.useRef(null),[u,c]=D.useState(!1),[d,f]=ui({prop:r,defaultProp:o??!1,onChange:a,caller:fk});return m.jsx(tu,{...s,children:m.jsx(mk,{scope:t,contentId:Ui(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:D.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:u,onCustomAnchorAdd:D.useCallback(()=>c(!0),[]),onCustomAnchorRemove:D.useCallback(()=>c(!1),[]),modal:i,children:n})})};yk.displayName=fk;var vk="PopoverAnchor";D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gk(vk,n),a=hk(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return D.useEffect(()=>(i(),()=>s()),[i,s]),m.jsx(nu,{...a,...r,ref:t})}).displayName=vk;var bk="PopoverTrigger",wk=D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gk(bk,n),a=hk(n),i=oi(t,o.triggerRef),s=m.jsx(hi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Dk(o.open),...r,ref:i,onClick:ti(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:m.jsx(nu,{asChild:!0,...a,children:s})});wk.displayName=bk;var xk="PopoverPortal",[Ck,Sk]=pk(xk,{forceMount:void 0}),kk=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=gk(xk,t);return m.jsx(Ck,{scope:t,forceMount:n,children:m.jsx(iu,{present:n||a.open,children:m.jsx(au,{asChild:!0,container:o,children:r})})})};kk.displayName=xk;var _k="PopoverContent",Ek=D.forwardRef((e,t)=>{const n=Sk(_k,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=gk(_k,e.__scopePopover);return m.jsx(iu,{present:r||a.open,children:a.modal?m.jsx(Nk,{...o,ref:t}):m.jsx(Rk,{...o,ref:t})})});Ek.displayName=_k;var jk=ci("PopoverContent.RemoveScroll"),Nk=D.forwardRef((e,t)=>{const n=gk(_k,e.__scopePopover),r=D.useRef(null),o=oi(t,r),a=D.useRef(!1);return D.useEffect(()=>{const e=r.current;if(e)return Tu(e)},[]),m.jsx(wc,{as:jk,allowPinchZoom:!0,children:m.jsx(Ok,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ti(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:ti(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:ti(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Rk=D.forwardRef((e,t)=>{const n=gk(_k,e.__scopePopover),r=D.useRef(!1),o=D.useRef(!1);return m.jsx(Ok,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=n.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),Ok=D.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=gk(_k,n),p=hk(n);return Oi(),m.jsx(Ii,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(_i,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:m.jsx(ru,{"data-state":Dk(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Pk="PopoverClose",Tk=D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gk(Pk,n);return m.jsx(hi.button,{type:"button",...r,ref:t,onClick:ti(e.onClick,()=>o.onOpenChange(!1))})});Tk.displayName=Pk;function Dk(e){return e?"open":"closed"}D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=hk(n);return m.jsx(ou,{...o,...r,ref:t})}).displayName="PopoverArrow";var Mk=kk,Ik=Ek;const Ak=yk,Lk=wk,Fk=D.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>{const{portalRef:a}=Pr();return m.jsx(Mk,{container:a.current,children:m.jsx(Ik,{ref:o,align:t,sideOffset:n,className:Ya("z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...r})})});Fk.displayName=Ik.displayName;const zk=HC("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300",{variants:{variant:{default:"bg-neutral-900 text-neutral-50 hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",destructive:"bg-red-500 text-neutral-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",outline:"border border-neutral-200 bg-white hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",secondary:"bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",ghost:"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",link:"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),$k=D.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const i=r?rS:"button";return m.jsx(i,{className:Ya(zk({variant:t,size:n,className:e})),ref:a,...o})});$k.displayName="Button";const Hk=({label:e,options:t=[],className:n,placeholder:r,value:o="",onValueChange:a,required:i,error:s,showSearch:l=!0,showOutline:u=!0,icon:c,info:d,optional:f,labelClass:p,actionLabel:h,actionLabelAction:g,actionLabelInfo:y,searchPlaceholder:v,disabled:b,triggerClass:w,loading:x,showError:C,onChangeSearch:S,searching:k,infoAlignment:_,align:E="start",valueClass:j})=>{const[N,R]=D.useState(""),[O,P]=D.useState(!1),[T,M]=D.useState(0),I=D.useRef(null);D.useEffect(()=>{const e=()=>{I.current&&M(I?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);return m.jsx(m.Fragment,{children:x?m.jsx(ei,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ya("flex flex-col gap-2.5",n),children:[m.jsxs("div",{className:Ya("flex justify-between gap-2 flex-wrap",e?null:"hidden"),children:[e&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",p),children:[m.jsx("span",{className:"first-letter:inherit",children:e})," ",i?m.jsx("span",{className:"text-[#E12D39]",children:e&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kb,{fieldName:e,align:_,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),h&&m.jsxs("button",{onClick:g,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[h,y&&m.jsx(kb,{fieldName:h,children:m.jsx("p",{className:"font-normal first-letter:uppercase text-left",children:y})})]})]}),m.jsxs(Ak,{modal:!0,open:O,onOpenChange:P,children:[m.jsx(Lk,{asChild:!0,children:m.jsxs($k,{ref:I,variant:"outline",role:"combobox","aria-expanded":O,className:Ya(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${(s||C)&&"!border-danger"}`,w),disabled:b,children:[m.jsx("span",{className:Ya("flex gap-2 first-letter:uppercase capitalize text-[#5E6278] justify-start truncate",o?"text-dark":null,j),children:o?(e=>{const n=t?.find(t=>t.value===e);return n?.label})(o):r??"Select..."}),m.jsx(Of,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(Fk,{style:{width:T},className:"min-w-[280px] p-0 bg-white rounded-xl border-gray-200",align:E,children:m.jsxs(ik,{className:"w-full",children:[l&&m.jsx(sk,{onChangeCapture:S,className:"placeholder:text-xs",placeholder:v??"Search..."}),k?m.jsx("div",{className:"flex flex-col gap-2 p-2",children:[1,2,3].map((e,t)=>m.jsx(ei,{className:"h-9 rounded-md"},t))}):m.jsx(uk,{children:"No result found."}),m.jsx(ck,{children:m.jsx(lk,{className:"",children:t?.map(e=>m.jsxs(dk,{value:"string"==typeof e.label?e.label:e?.searchId,className:`first-letter:uppercase capitalize mb-1 hover:bg-primary_light w-full rounded-md hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o===e.value&&"bg-primary_light text-primary"}`,onSelect:()=>{a&&a(e.value),P(!1)},children:[m.jsx(Ef,{className:Ya("mr-2 h-4 w-4",o===e.value?"opacity-100":"opacity-0")}),e.label]},`${"string"==typeof e.label?e.label:e?.searchId}${e.value}`))})})]})})]}),s&&m.jsx("p",{className:"text-danger text-xs font-normal",children:s})]})})};var Bk="https://unpkg.com/@simpoobusiness/sdk/dist/assets/image-placeholdere1821db1b147e2aa.png";function Vk({data:e}){const[t,n]=D.useState(e?.total_selling_price||0),r=[{label:"Stock Quantity",value:eb(Number(e?.quantity)),desc:null},{label:"Total Cost",value:Jv(Number(e?.total_cost_price)),desc:null},{label:"Total Selling Price",value:Jv(t),desc:m.jsx(Hk,{options:e?.prices?.map(e=>({label:e.priceGroup.name,value:e.selling_price.toString()})),onValueChange:e=>n(Number(e)),value:t?.toString(),triggerClass:"h-8",showSearch:!1,placeholder:"Select price"})},{label:"Profit to be made",value:Jv(t-e?.total_cost_price),desc:null}],o=[{tag:"Barcode",value:e?.barcode.map(e=>e.barcode)},{tag:"SKU",value:e?.sku},{tag:"System code",value:e?.itemcode.toString()}],a=["S/N","Batch number","Quantity","Expiry date","Unit cost"],i=[{tag:"Extras",headers:["S/N","image","extra name","quantity inside ","selling price"],body:e?.extras?.map((e,t)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:t+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:Bk,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:e.extra.name}),m.jsxs("td",{children:[e.quantity," ",e.extra.item_unit]}),m.jsx("td",{children:Jv(Number(e.selling_price))})]},t))||[]},{tag:"Raw materials",headers:["S/N","image","material name","quantity inside ","selling price"],body:e?.material?.map((e,t)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:t+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:Bk,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:e.raw_material?.name}),m.jsxs("td",{children:[e.quantity," ",e.raw_material?.item_unit]}),m.jsx("td",{children:Jv(Number(e.selling_price))})]},t))},{tag:"Packing groups",headers:["S/N","image","group name","quantity inside ","selling price","Group code","print label"],body:e?.item_group?.map((t,n)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:n+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:Bk,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:t.group_name}),m.jsxs("td",{children:[t.quantity," ",e.item_unit]}),m.jsx("td",{children:Jv(Number(t.selling_price))}),m.jsx("td",{children:t.barcode}),m.jsx("td",{children:m.jsx("button",{className:"w-6 h-6 items-center flex justify-center",children:Kv.printer_blue})})]},n))},{tag:"Variations",headers:["S/N","image","variation","quantity ","selling price","code","print label"],body:e?.variation?.map((t,n)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:n+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:t.image??Bk,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:t.variation_values.map((e,n)=>m.jsxs("span",{className:"pr-2",children:[e.attribute_value.value_name," ",t?.variation_values?.length-1>n&&"-"]},n))}),m.jsxs("td",{children:[t.quantity,e?.item_unit]}),m.jsx("td",{children:Jv(Number(t.locationprices?.[0]?.selling_price))}),m.jsx("td",{children:t.barcode}),m.jsx("td",{children:m.jsx("button",{className:"w-6 h-6 items-center flex justify-center",children:Kv.printer_blue})})]},n))}];return m.jsxs("div",{className:"space-y-6",children:[m.jsx("div",{className:"grid grid-cols-4 gap-2.5",children:r.map((n,o)=>m.jsxs("div",{className:"border rounded-xl border-gray-200 p-4 gap-4 flex flex-col",children:[m.jsx("p",{className:"text-dark text-sm font-medium",children:n.label}),m.jsxs("p",{title:n.value,className:Ya("text-dark font-bold text-3xl truncate",o===r.length-1&&Number(t)-Number(e?.cost_price)<0?"text-danger":null),children:[n.value,0===o&&m.jsx("span",{className:"font-normal text-sm",children:e.item_unit})]}),n.desc]},o))}),m.jsx("div",{className:"grid grid-cols-12",children:m.jsxs("div",{className:"col-span-10 space-y-6",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsx("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:"Item codes:"}),m.jsx("div",{className:"flex gap-5",children:o.map((e,t)=>m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:Ya("flex flex-col gap-2.5"),children:[m.jsx("p",{className:"text-dark text-sm font-medium",children:e.tag}),m.jsx("p",{className:"text-gray-500 text-sm font-normal flex flex-col gap-2",children:Array.isArray(e.value)?e.value?.map((e,t)=>m.jsx("span",{children:e},t)):e.value})]},t),t<o.length-1&&m.jsx("div",{children:m.jsx(fS,{orientation:"vertical",className:"bg-[#7E8299]"})},t)]}))})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:"Suppliers:"}),m.jsx("div",{className:"flex gap-5 flex-col",children:e?.suppliers?.map((e,t)=>m.jsxs("div",{className:"bg-gray-100 rounded-xl p-[15px] space-y-[18px]",children:[m.jsxs("div",{className:"flex gap-3",children:[m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:Bk,className:"object-cover w-full h-full"})}),m.jsxs("div",{className:"space-y-1 flex-grow border-b border-dashed border-gray-300 pb-1",children:[m.jsx("h1",{className:"text-dark font-semibold text-sm capitalize",children:e.name}),m.jsx("p",{className:"text-gray-700 font-medium text-[13px] capitalize"})]})]}),m.jsxs("table",{className:"table-auto w-full border-separate border-spacing-y-3",children:[m.jsx("thead",{children:m.jsx("tr",{children:a.map((e,t)=>m.jsx("th",{className:"text-left text-dark",children:e},t))})}),m.jsx("tbody",{children:m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:"1"}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:e.supplier_batch_number})}),m.jsx("td",{children:e.supplier_quantity}),m.jsx("td",{children:eC(e.supplier_expired_date).format("MMMM DD, YYYY")}),m.jsx("td",{children:Jv(Number(e.supplier_price))})]})})]})]},t))})]}),i.map((e,t)=>m.jsxs("div",{className:"space-y-3",children:[m.jsxs("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:[e.tag,": ",e.body?.length]}),e.body?.length>0?m.jsx("div",{className:"bg-gray-100 rounded-xl p-[15px] space-y-[18px]",children:m.jsxs("table",{className:"table-auto w-full border-separate border-spacing-y-3",children:[m.jsx("thead",{children:m.jsx("tr",{children:e.headers.map((e,t)=>m.jsx("th",{className:"text-left text-dark first-letter:uppercase",children:e},t))})}),m.jsx("tbody",{children:e.body})]})}):null]},t))]})})]})}const Uk=[{label:"All",count:900},{label:"Active",count:10},{label:"Inactive",count:0}];function qk({tabs:e=Uk,loading:t}){const[n,r]=D.useState(0);return m.jsxs("div",{className:"flex flex-col overflow-auto",children:[m.jsx("div",{className:"flex gap-[30px] ",children:e.map((e,o)=>m.jsxs("button",{className:"flex items-center gap-2.5 group relative pb-2",onClick:()=>((e,t)=>{e.link||r(t),e.action&&e.action()})(e,o),children:[m.jsx("p",{className:Ya("group-hover:text-gray-900 duration-200 text-gray-800 font-normal text-sm first-letter:uppercase whitespace-nowrap",o===n?"text-gray-900 font-semibold":null),children:e.label}),t?m.jsx(ei,{className:"h-6.5 rounded w-8"}):m.jsxs(m.Fragment,{children:[" ",e.count>=0?m.jsx("span",{className:Ya("rounded px-1.5 h-6.5 flex items-center text-xs font-semibold duration-200 group-hover:bg-primary_light group-hover:text-primary bg-gray-200 text-gray-500 shrink-0",o===n?"bg-primary_light text-primary":null),children:e.count}):null]}),o===n?m.jsx("div",{className:"h-[5px] rounded bg-primary absolute left-0 right-0 -bottom-[5px]"}):null]},o))}),m.jsx("div",{className:"h-[5px] rounded bg-gray-300"})]})}function Wk({isOpen:e,onClose:t,itemUUID:n}){const{data:r,isFetching:o}=Yx(["single_item",n],`/items/get?item_uuid=${n}`,{enabled:e}),a=r?.data,i=[{tag:"Created",value:eC(a?.created_date).format("MMMM DD, YYYY")},{tag:"Last edited",value:eC(a?.last_update_date).format("MMMM DD, YYYY")},{tag:"Expiry",value:m.jsxs("p",{className:"",children:[" ",m.jsxs("span",{className:"text-danger",children:[a?.expired," Expired,"]})," ",m.jsxs("span",{className:"text-warning",children:[a?.expiring," Expiring"]})]})}],[s,l]=D.useState(1),u=[{label:"Item overview",action:()=>l(1)}];return D.useEffect(()=>{!e&&l(1)},[e]),m.jsx(GC,{isOpen:e,onClose:t,title:"Item View",className:"w-[1176px]",children:o?m.jsx(QC,{}):m.jsxs("div",{className:"space-y-7",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsxs("h1",{className:"text-dark text-xl font-semibold flex items-center gap-2",children:[a?.name,m.jsx("span",{className:"bg-primary_light text-primary text-xs rounded px-[7px] h-5 flex items-center capitalize",children:a?.item_type?.name})]}),m.jsx("div",{className:"flex gap-2",children:i.map((e,t)=>m.jsxs("p",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[m.jsxs("span",{className:"text-dark",children:[e.tag,":"]})," ",e.value," ",t<2&&"|"]},t))})]}),m.jsx("div",{className:"flex gap-3"})]}),m.jsx(pS,{data:a}),m.jsx(qk,{tabs:u}),1===s?m.jsx(Vk,{data:a}):null]})})}function Yk({children:e,isOpen:t,onClose:n,title:r,className:o}){return m.jsx(ek,{open:t,onOpenChange:n,children:m.jsxs(rk,{className:Ya("p-0 gap-4 max-h-[90vh] overflow-auto",o),children:[m.jsx(ok,{className:"sr-only",children:"Modal Component"}),m.jsx(ak,{className:"sr-only",children:"This is a modal component"}),r?m.jsxs("div",{className:"sticky top-0 bg-inherit flex flex-col gap-4 pt-5 z-10",children:[m.jsxs("div",{className:"flex justify-between items-center px-5",children:[m.jsx("h1",{className:"text-dark font-medium text-lg",children:r}),m.jsx("button",{className:"w-6 h-6",onClick:n,children:M.cloneElement(Kv.close2,{fill:"black"})})]}),m.jsx(fS,{})]}):null,e]})})}var Gk="-ms-",Kk="-moz-",Qk="-webkit-",Zk="comm",Xk="rule",Jk="decl",e_="@keyframes",t_=Math.abs,n_=String.fromCharCode,r_=Object.assign;function o_(e){return e.trim()}function a_(e,t){return(e=t.exec(e))?e[0]:e}function i_(e,t,n){return e.replace(t,n)}function s_(e,t,n){return e.indexOf(t,n)}function l_(e,t){return 0|e.charCodeAt(t)}function u_(e,t,n){return e.slice(t,n)}function c_(e){return e.length}function d_(e){return e.length}function f_(e,t){return t.push(e),e}function p_(e,t){return e.filter(function(e){return!a_(e,t)})}var h_=1,m_=1,g_=0,y_=0,v_=0,b_="";function w_(e,t,n,r,o,a,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:h_,column:m_,length:i,return:"",siblings:s}}function x_(e,t){return r_(w_("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function C_(e){for(;e.root;)e=x_(e.root,{children:[e]});f_(e,e.siblings)}function S_(){return v_=y_>0?l_(b_,--y_):0,m_--,10===v_&&(m_=1,h_--),v_}function k_(){return v_=y_<g_?l_(b_,y_++):0,m_++,10===v_&&(m_=1,h_++),v_}function __(){return l_(b_,y_)}function E_(){return y_}function j_(e,t){return u_(b_,e,t)}function N_(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 R_(e){return o_(j_(y_-1,T_(91===e?e+2:40===e?e+1:e)))}function O_(e){for(;(v_=__())&&v_<33;)k_();return N_(e)>2||N_(v_)>3?"":" "}function P_(e,t){for(;--t&&k_()&&!(v_<48||v_>102||v_>57&&v_<65||v_>70&&v_<97););return j_(e,E_()+(t<6&&32==__()&&32==k_()))}function T_(e){for(;k_();)switch(v_){case e:return y_;case 34:case 39:34!==e&&39!==e&&T_(v_);break;case 40:41===e&&T_(e);break;case 92:k_()}return y_}function D_(e,t){for(;k_()&&e+v_!==57&&(e+v_!==84||47!==__()););return"/*"+j_(t,y_-1)+"*"+n_(47===e?e:k_())}function M_(e){for(;!N_(__());)k_();return j_(e,y_)}function I_(e){return function(e){return b_="",e}(A_("",null,null,null,[""],e=function(e){return h_=m_=1,g_=c_(b_=e),y_=0,[]}(e),0,[0],e))}function A_(e,t,n,r,o,a,i,s,l){for(var u=0,c=0,d=i,f=0,p=0,h=0,m=1,g=1,y=1,v=0,b="",w=o,x=a,C=r,S=b;g;)switch(h=v,v=k_()){case 40:if(108!=h&&58==l_(S,d-1)){-1!=s_(S+=i_(R_(v),"&","&\f"),"&\f",t_(u?s[u-1]:0))&&(y=-1);break}case 34:case 39:case 91:S+=R_(v);break;case 9:case 10:case 13:case 32:S+=O_(h);break;case 92:S+=P_(E_()-1,7);continue;case 47:switch(__()){case 42:case 47:f_(F_(D_(k_(),E_()),t,n,l),l),5!=N_(h||1)&&5!=N_(__()||1)||!c_(S)||" "===u_(S,-1,void 0)||(S+=" ");break;default:S+="/"}break;case 123*m:s[u++]=c_(S)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+c:-1==y&&(S=i_(S,/\f/g,"")),p>0&&(c_(S)-d||0===m&&47===h)&&f_(p>32?z_(S+";",r,n,d-1,l):z_(i_(S," ","")+";",r,n,d-2,l),l);break;case 59:S+=";";default:if(f_(C=L_(S,t,n,u,c,o,s,b,w=[],x=[],d,a),a),123===v)if(0===c)A_(S,t,C,C,w,a,d,s,x);else{switch(f){case 99:if(110===l_(S,3))break;case 108:if(97===l_(S,2))break;default:c=0;case 100:case 109:case 115:}c?A_(e,C,C,r&&f_(L_(e,C,C,0,0,o,s,b,o,w=[],d,x),x),o,x,d,s,r?w:x):A_(S,C,C,C,[""],x,0,s,x)}}u=c=p=0,m=y=1,b=S="",d=i;break;case 58:d=1+c_(S),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==S_())continue;switch(S+=n_(v),v*m){case 38:y=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(c_(S)-1)*y,y=1;break;case 64:45===__()&&(S+=R_(k_())),f=__(),c=d=c_(b=S+=M_(E_())),v++;break;case 45:45===h&&2==c_(S)&&(m=0)}}return a}function L_(e,t,n,r,o,a,i,s,l,u,c,d){for(var f=o-1,p=0===o?a:[""],h=d_(p),m=0,g=0,y=0;m<r;++m)for(var v=0,b=u_(e,f+1,f=t_(g=i[m])),w=e;v<h;++v)(w=o_(g>0?p[v]+" "+b:i_(b,/&\f/g,p[v])))&&(l[y++]=w);return w_(e,t,n,0===o?Xk:s,l,u,c,d)}function F_(e,t,n,r){return w_(e,t,n,Zk,n_(v_),u_(e,2,-2),0,r)}function z_(e,t,n,r,o){return w_(e,t,n,Jk,u_(e,0,r),u_(e,r+1,-1),r,o)}function $_(e,t,n){switch(function(e,t){return 45^l_(e,0)?(((t<<2^l_(e,0))<<2^l_(e,1))<<2^l_(e,2))<<2^l_(e,3):0}(e,t)){case 5103:return Qk+"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 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Qk+e+e;case 4855:return Qk+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Kk+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Qk+e+Kk+e+Gk+e+e;case 5936:switch(l_(e,t+11)){case 114:return Qk+e+Gk+i_(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Qk+e+Gk+i_(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Qk+e+Gk+i_(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Qk+e+Gk+e+e;case 6165:return Qk+e+Gk+"flex-"+e+e;case 5187:return Qk+e+i_(e,/(\w+).+(:[^]+)/,Qk+"box-$1$2"+Gk+"flex-$1$2")+e;case 5443:return Qk+e+Gk+"flex-item-"+i_(e,/flex-|-self/g,"")+(a_(e,/flex-|baseline/)?"":Gk+"grid-row-"+i_(e,/flex-|-self/g,""))+e;case 4675:return Qk+e+Gk+"flex-line-pack"+i_(e,/align-content|flex-|-self/g,"")+e;case 5548:return Qk+e+Gk+i_(e,"shrink","negative")+e;case 5292:return Qk+e+Gk+i_(e,"basis","preferred-size")+e;case 6060:return Qk+"box-"+i_(e,"-grow","")+Qk+e+Gk+i_(e,"grow","positive")+e;case 4554:return Qk+i_(e,/([^-])(transform)/g,"$1"+Qk+"$2")+e;case 6187:return i_(i_(i_(e,/(zoom-|grab)/,Qk+"$1"),/(image-set)/,Qk+"$1"),e,"")+e;case 5495:case 3959:return i_(e,/(image-set\([^]*)/,Qk+"$1$`$1");case 4968:return i_(i_(e,/(.+:)(flex-)?(.*)/,Qk+"box-pack:$3"+Gk+"flex-pack:$3"),/space-between/,"justify")+Qk+e+e;case 4200:if(!a_(e,/flex-|baseline/))return Gk+"grid-column-align"+u_(e,t)+e;break;case 2592:case 3360:return Gk+i_(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,a_(e.props,/grid-\w+-end/)})?~s_(e+(n=n[t].value),"span",0)?e:Gk+i_(e,"-start","")+e+Gk+"grid-row-span:"+(~s_(n,"span",0)?a_(n,/\d+/):+a_(n,/\d+/)-+a_(e,/\d+/))+";":Gk+i_(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return a_(e.props,/grid-\w+-start/)})?e:Gk+i_(i_(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return i_(e,/(.+)-inline(.+)/,Qk+"$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(c_(e)-1-t>6)switch(l_(e,t+1)){case 109:if(45!==l_(e,t+4))break;case 102:return i_(e,/(.+:)(.+)-([^]+)/,"$1"+Qk+"$2-$3$1"+Kk+(108==l_(e,t+3)?"$3":"$2-$3"))+e;case 115:return~s_(e,"stretch",0)?$_(i_(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return i_(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,a,i,s){return Gk+n+":"+r+s+(o?Gk+n+"-span:"+(a?i:+i-+r)+s:"")+e});case 4949:if(121===l_(e,t+6))return i_(e,":",":"+Qk)+e;break;case 6444:switch(l_(e,45===l_(e,14)?18:11)){case 120:return i_(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Qk+(45===l_(e,14)?"inline-":"")+"box$3$1"+Qk+"$2$3$1"+Gk+"$2box$3")+e;case 100:return i_(e,":",":"+Gk)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return i_(e,"scroll-","scroll-snap-")+e}return e}function H_(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function B_(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Jk:return e.return=e.return||e.value;case Zk:return"";case e_:return e.return=e.value+"{"+H_(e.children,r)+"}";case Xk:if(!c_(e.value=e.props.join(",")))return""}return c_(n=H_(e.children,r))?e.return=e.value+"{"+n+"}":""}function V_(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Jk:return void(e.return=$_(e.value,e.length,n));case e_:return H_([x_(e,{value:i_(e.value,"@","@"+Qk)})],r);case Xk:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(a_(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":C_(x_(e,{props:[i_(t,/:(read-\w+)/,":-moz-$1")]})),C_(x_(e,{props:[t]})),r_(e,{props:p_(n,r)});break;case"::placeholder":C_(x_(e,{props:[i_(t,/:(plac\w+)/,":"+Qk+"input-$1")]})),C_(x_(e,{props:[i_(t,/:(plac\w+)/,":-moz-$1")]})),C_(x_(e,{props:[i_(t,/:(plac\w+)/,Gk+"input-$1")]})),C_(x_(e,{props:[t]})),r_(e,{props:p_(n,r)})}return""})}}var U_="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",q_="active",W_="data-styled-version",Y_="6.3.8",G_="/*!sc*/\n",K_="undefined"!=typeof window&&"undefined"!=typeof document,Q_=void 0===M.createContext,Z_=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)),X_=Object.freeze([]),J_=Object.freeze({});var eE=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]),tE=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,nE=/(^-|-$)/g;function rE(e){return e.replace(tE,"-").replace(nE,"")}var oE=/(a)(d)/gi,aE=function(e){return String.fromCharCode(e+(e>25?39:97))};function iE(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=aE(t%52)+n;return(aE(t%52)+n).replace(oE,"$1-$2")}var sE,lE=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},uE=function(e){return lE(5381,e)};function cE(e){return iE(uE(e)>>>0)}function dE(e){return"string"==typeof e&&!0}var fE="function"==typeof Symbol&&Symbol.for,pE=fE?Symbol.for("react.memo"):60115,hE=fE?Symbol.for("react.forward_ref"):60112,mE={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gE={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},yE={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vE=((sE={})[hE]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},sE[pE]=yE,sE);function bE(e){return("type"in(t=e)&&t.type.$$typeof)===pE?yE:"$$typeof"in e?vE[e.$$typeof]:mE;var t}var wE=Object.defineProperty,xE=Object.getOwnPropertyNames,CE=Object.getOwnPropertySymbols,SE=Object.getOwnPropertyDescriptor,kE=Object.getPrototypeOf,_E=Object.prototype;function EE(e,t,n){if("string"!=typeof t){if(_E){var r=kE(t);r&&r!==_E&&EE(e,r,n)}var o=xE(t);CE&&(o=o.concat(CE(t)));for(var a=bE(e),i=bE(t),s=0;s<o.length;++s){var l=o[s];if(!(l in gE||n&&n[l]||i&&l in i||a&&l in a)){var u=SE(t,l);try{wE(e,l,u)}catch(e){}}}}return e}function jE(e){return"function"==typeof e}function NE(e){return"object"==typeof e&&"styledComponentId"in e}function RE(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function OE(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}function PE(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function TE(e,t,n){if(void 0===n&&(n=!1),!n&&!PE(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=TE(e[r],t[r]);else if(PE(t))for(var r in t)e[r]=TE(e[r],t[r]);return e}function DE(e,t){Object.defineProperty(e,"toString",{value:t})}function ME(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 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(", ")):""))}var IE=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,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw ME(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),s=(a=0,t.length);a<s;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(G_);return t},e}(),AE=new Map,LE=new Map,FE=1,zE=function(e){if(AE.has(e))return AE.get(e);for(;LE.has(FE);)FE++;var t=FE++;return AE.set(e,t),LE.set(t,e),t},$E=function(e,t){FE=t+1,AE.set(e,t),LE.set(t,e)},HE="style[".concat(U_,"][").concat(W_,'="').concat(Y_,'"]'),BE=new RegExp("^".concat(U_,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),VE=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},UE=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(G_),o=[],a=0,i=r.length;a<i;a++){var s=r[a].trim();if(s){var l=s.match(BE);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&($E(c,u),VE(e,c,l[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(s)}}},qE=function(e){for(var t=document.querySelectorAll(HE),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(U_)!==q_&&(UE(e,o),o.parentNode&&o.parentNode.removeChild(o))}};var WE=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(U_,"]")));return t[t.length-1]}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(U_,q_),r.setAttribute(W_,Y_);var i="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},YE=function(){function e(e){this.element=WE(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ME(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}(),GE=function(){function e(e){this.element=WE(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,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}(),KE=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}(),QE=K_,ZE={isServer:!K_,useCSSOMInjection:!Z_},XE=function(){function e(e,t,n){void 0===e&&(e=J_),void 0===t&&(t={});var r=this;this.options=Du(Du({},ZE),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&K_&&QE&&(QE=!1,qE(this)),DE(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return LE.get(e)}(n);if(void 0===o)return"continue";var a=e.names.get(o),i=t.getGroup(n);if(void 0===a||!a.size||0===i.length)return"continue";var s="".concat(U_,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==a&&a.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),r+="".concat(i).concat(s,'{content:"').concat(l,'"}').concat(G_)},a=0;a<n;a++)o(a);return r}(r)})}return e.registerId=function(e){return zE(e)},e.prototype.rehydrate=function(){!this.server&&K_&&qE(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(Du(Du({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new KE(n):t?new YE(n):new GE(n)}(this.options),new IE(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(zE(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(zE(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(zE(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),JE=/&/g,ej=47;function tj(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,n=0,r=0,o=!1,a=0;a<t;a++){var i=e.charCodeAt(a);if(0!==r||o||i!==ej||42!==e.charCodeAt(a+1))if(o)42===i&&e.charCodeAt(a+1)===ej&&(o=!1,a++);else if(34!==i&&39!==i||0!==a&&92===e.charCodeAt(a-1)){if(0===r)if(123===i)n++;else if(125===i&&--n<0)return!0}else 0===r?r=i:r===i&&(r=0);else o=!0,a++}return 0!==n||0!==r}function nj(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=nj(e.children,t)),e})}var rj=new XE,oj=function(){var e,t,n,r=J_,o=r.options,a=void 0===o?J_:o,i=r.plugins,s=void 0===i?X_:i,l=function(n,r,o){return o.startsWith(t)&&o.endsWith(t)&&o.replaceAll(t,"").length>0?".".concat(e):n},u=s.slice();u.push(function(e){e.type===Xk&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(JE,t).replace(n,l))}),a.prefix&&u.push(V_),u.push(B_);var c=function(r,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),e=s,t=o,n=new RegExp("\\".concat(t,"\\b"),"g");var l=function(e){if(!tj(e))return e;for(var t=e.length,n="",r=0,o=0,a=0,i=!1,s=0;s<t;s++){var l=e.charCodeAt(s);if(0!==a||i||l!==ej||42!==e.charCodeAt(s+1))if(i)42===l&&e.charCodeAt(s+1)===ej&&(i=!1,s++);else if(34!==l&&39!==l||0!==s&&92===e.charCodeAt(s-1)){if(0===a)if(123===l)o++;else if(125===l){if(--o<0){for(var u=s+1;u<t;){var c=e.charCodeAt(u);if(59===c||10===c)break;u++}u<t&&59===e.charCodeAt(u)&&u++,o=0,s=u-1,r=u;continue}0===o&&(n+=e.substring(r,s+1),r=s+1)}else 59===l&&0===o&&(n+=e.substring(r,s+1),r=s+1)}else 0===a?a=l:a===l&&(a=0);else i=!0,s++}if(r<t){var d=e.substring(r);tj(d)||(n+=d)}return n}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,n=[],r=0,o=0,a=0,i=0;o<t;){var s=e.charCodeAt(o);if(34!==s&&39!==s||0!==o&&92===e.charCodeAt(o-1))if(0===a)if(40===s&&o>=3&&108==(32|e.charCodeAt(o-1))&&114==(32|e.charCodeAt(o-2))&&117==(32|e.charCodeAt(o-3)))i=1,o++;else if(i>0)41===s?i--:40===s&&i++,o++;else if(s===ej&&o+1<t&&e.charCodeAt(o+1)===ej){for(o>r&&n.push(e.substring(r,o));o<t&&10!==e.charCodeAt(o);)o++;r=o}else o++;else o++;else 0===a?a=s:a===s&&(a=0),o++}return 0===r?e:(r<t&&n.push(e.substring(r)),n.join(""))}(r)),c=I_(i||o?"".concat(i," ").concat(o," { ").concat(l," }"):l);a.namespace&&(c=nj(c,a.namespace));var d,f=[];return H_(c,function(e){var t=d_(e);return function(n,r,o,a){for(var i="",s=0;s<t;s++)i+=e[s](n,r,o,a)||"";return i}}(u.concat((d=function(e){return f.push(e)},function(e){e.root||(e=e.return)&&d(e)})))),f};return c.hash=s.length?s.reduce(function(e,t){return t.name||ME(15),lE(e,t.name)},5381).toString():"",c}(),aj={shouldForwardProp:void 0,styleSheet:rj,stylis:oj},ij=Q_?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(aj)}}:M.createContext(aj);function sj(){return Q_?aj:M.useContext(ij)}ij.Consumer,Q_||M.createContext(void 0);var lj=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=oj);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,DE(this,function(){throw ME(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=oj),this.name+e.hash},e}();function uj(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in wm||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var cj=function(e){return e>="A"&&e<="Z"};function dj(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;cj(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var fj=function(e){return null==e||!1===e||""===e},pj=function(e){var t=[];for(var n in e){var r=e[n];e.hasOwnProperty(n)&&!fj(r)&&(Array.isArray(r)&&r.isCss||jE(r)?t.push("".concat(dj(n),":"),r,";"):PE(r)?t.push.apply(t,Iu(Iu(["".concat(n," {")],pj(r),!1),["}"],!1)):t.push("".concat(dj(n),": ").concat(uj(n,r),";")))}return t};function hj(e,t,n,r){return fj(e)?[]:NE(e)?[".".concat(e.styledComponentId)]:jE(e)?!jE(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:hj(e(t),t,n,r):e instanceof lj?n?(e.inject(n,r),[e.getName(r)]):[e]:PE(e)?pj(e):Array.isArray(e)?Array.prototype.concat.apply(X_,e.map(function(e){return hj(e,t,n,r)})):[e.toString()];var o}var mj=uE(Y_),gj=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(jE(n)&&!NE(n))return!1}return!0}(e),this.componentId=t,this.baseHash=lE(mj,t),this.baseStyle=n,XE.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n).className:"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=RE(r,this.staticRulesId);else{var o=OE(hj(this.rules,e,t,n)),a=iE(lE(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,a)){var i=n(o,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,i)}r=RE(r,a),this.staticRulesId=a}else{for(var s=lE(this.baseHash,n.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=OE(hj(c,e,t,n));s=lE(s,d+u),l+=d}}if(l){var f=iE(s>>>0);if(!t.hasNameForId(this.componentId,f)){var p=n(l,".".concat(f),void 0,this.componentId);t.insertRules(this.componentId,f,p)}r=RE(r,f)}}return{className:r,css:"undefined"==typeof window?t.getTag().getGroup(zE(this.componentId)):""}},e}(),yj=Q_?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:M.createContext(void 0);yj.Consumer;var vj={};function bj(e,t,n){var r=NE(e),o=e,a=!dE(e),i=t.attrs,s=void 0===i?X_:i,l=t.componentId,u=void 0===l?function(e,t){var n="string"!=typeof e?"sc":rE(e);vj[n]=(vj[n]||0)+1;var r="".concat(n,"-").concat(cE(Y_+n+vj[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):l,c=t.displayName,d=void 0===c?function(e){return dE(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):c,f=t.displayName&&t.componentId?"".concat(rE(t.displayName),"-").concat(t.componentId):t.componentId||u,p=r&&o.attrs?o.attrs.concat(s).filter(Boolean):s,h=t.shouldForwardProp;if(r&&o.shouldForwardProp){var m=o.shouldForwardProp;if(t.shouldForwardProp){var g=t.shouldForwardProp;h=function(e,t){return m(e,t)&&g(e,t)}}else h=m}var y=new gj(n,f,r?o.componentStyle:void 0);function v(e,t){return function(e,t,n){var r=e.attrs,o=e.componentStyle,a=e.defaultProps,i=e.foldedComponentIds,s=e.styledComponentId,l=e.target,u=Q_?void 0:M.useContext(yj),c=sj(),d=e.shouldForwardProp||c.shouldForwardProp,f=function(e,t,n){return void 0===n&&(n=J_),e.theme!==n.theme&&e.theme||t||n.theme}(t,u,a)||J_,p=function(e,t,n){for(var r,o=Du(Du({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var i=jE(r=e[a])?r(o):r;for(var s in i)"className"===s?o.className=RE(o.className,i[s]):"style"===s?o.style=Du(Du({},o.style),i[s]):o[s]=i[s]}return"className"in t&&"string"==typeof t.className&&(o.className=RE(o.className,t.className)),o}(r,t,f),h=p.as||l,m={};for(var g in p)void 0===p[g]||"$"===g[0]||"as"===g||"theme"===g&&p.theme===f||("forwardedAs"===g?m.as=p.forwardedAs:d&&!d(g,h)||(m[g]=p[g]));var y=function(e,t){var n=sj();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(o,p),v=y.className,b=y.css,w=RE(i,s);v&&(w+=" "+v),p.className&&(w+=" "+p.className),m[dE(h)&&!eE.has(h)?"class":"className"]=w,n&&(m.ref=n);var x=D.createElement(h,m);return Q_&&b?M.createElement(M.Fragment,null,M.createElement("style",{precedence:"styled-components",href:"sc-".concat(s,"-").concat(v),children:b}),x):x}(b,e,t)}v.displayName=d;var b=M.forwardRef(v);return b.attrs=p,b.componentStyle=y,b.displayName=d,b.shouldForwardProp=h,b.foldedComponentIds=r?RE(o.foldedComponentIds,o.styledComponentId):"",b.styledComponentId=f,b.target=r?o.target:e,Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=r?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)TE(e,o[r],!0);return e}({},o.defaultProps,e):e}}),DE(b,function(){return".".concat(b.styledComponentId)}),a&&EE(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),b}function wj(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var xj=function(e){return Object.assign(e,{isCss:!0})};function Cj(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(jE(e)||PE(e))return xj(hj(wj(X_,Iu([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?hj(r):xj(hj(wj(r,t)))}function Sj(e,t,n){if(void 0===n&&(n=J_),!t)throw ME(1,t);var r=function(r){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return e(t,n,Cj.apply(void 0,Iu([r],o,!1)))};return r.attrs=function(r){return Sj(e,t,Du(Du({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return Sj(e,t,Du(Du({},n),r))},r}var kj=function(e){return Sj(bj,e)},_j=kj;function Ej(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=OE(Cj.apply(void 0,Iu([e],t,!1))),o=cE(r);return new lj(o,r)}eE.forEach(function(e){_j[e]=kj(e)});const jj={"aria-busy":!0,role:"progressbar"},Nj=_j.div`
|
|
141
|
+
r.version="2.30.1",o(Kn),r.fn=ua,r.min=Jn,r.max=er,r.now=tr,r.utc=h,r.unix=ca,r.months=ya,r.isDate=d,r.locale=mn,r.invalid=v,r.duration=Nr,r.isMoment=S,r.weekdays=ba,r.parseZone=da,r.localeData=vn,r.isDuration=sr,r.monthsShort=va,r.weekdaysMin=xa,r.defineLocale=gn,r.updateLocale=yn,r.locales=bn,r.weekdaysShort=wa,r.normalizeUnits=ne,r.relativeTimeRounding=oi,r.relativeTimeThreshold=ai,r.calendarFormat=Hr,r.prototype=ua,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}(Xx)),Xx.exports),eC=n(Jx),tC="Dialog",[nC]=ai(tC),[rC,oC]=nC(tC),aC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=D.useRef(null),l=D.useRef(null),[u,c]=ui({prop:r,defaultProp:o??!1,onChange:a,caller:tC});return m.jsx(rC,{scope:t,triggerRef:s,contentRef:l,contentId:Ui(),titleId:Ui(),descriptionId:Ui(),open:u,onOpenChange:c,onOpenToggle:D.useCallback(()=>c(e=>!e),[c]),modal:i,children:n})};aC.displayName=tC;var iC="DialogTrigger";D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=oC(iC,n),a=oi(t,o.triggerRef);return m.jsx(hi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":EC(o.open),...r,ref:a,onClick:ti(e.onClick,o.onOpenToggle)})}).displayName=iC;var sC="DialogPortal",[lC,uC]=nC(sC,{forceMount:void 0}),cC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=oC(sC,t);return m.jsx(lC,{scope:t,forceMount:n,children:D.Children.map(r,e=>m.jsx(iu,{present:n||a.open,children:m.jsx(au,{asChild:!0,container:o,children:e})}))})};cC.displayName=sC;var dC="DialogOverlay",fC=D.forwardRef((e,t)=>{const n=uC(dC,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=oC(dC,e.__scopeDialog);return a.modal?m.jsx(iu,{present:r||a.open,children:m.jsx(hC,{...o,ref:t})}):null});fC.displayName=dC;var pC=ci("DialogOverlay.RemoveScroll"),hC=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=oC(dC,n);return m.jsx(wc,{as:pC,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(hi.div,{"data-state":EC(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),mC="DialogContent",gC=D.forwardRef((e,t)=>{const n=uC(mC,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=oC(mC,e.__scopeDialog);return m.jsx(iu,{present:r||a.open,children:a.modal?m.jsx(yC,{...o,ref:t}):m.jsx(vC,{...o,ref:t})})});gC.displayName=mC;var yC=D.forwardRef((e,t)=>{const n=oC(mC,e.__scopeDialog),r=D.useRef(null),o=oi(t,n.contentRef,r);return D.useEffect(()=>{const e=r.current;if(e)return Tu(e)},[]),m.jsx(bC,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ti(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ti(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:ti(e.onFocusOutside,e=>e.preventDefault())})}),vC=D.forwardRef((e,t)=>{const n=oC(mC,e.__scopeDialog),r=D.useRef(!1),o=D.useRef(!1);return m.jsx(bC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=n.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),bC=D.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=oC(mC,n),l=D.useRef(null),u=oi(t,l);return Oi(),m.jsxs(m.Fragment,{children:[m.jsx(Ii,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(_i,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":EC(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(OC,{titleId:s.titleId}),m.jsx(PC,{contentRef:l,descriptionId:s.descriptionId})]})]})}),wC="DialogTitle",xC=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=oC(wC,n);return m.jsx(hi.h2,{id:o.titleId,...r,ref:t})});xC.displayName=wC;var CC="DialogDescription",SC=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=oC(CC,n);return m.jsx(hi.p,{id:o.descriptionId,...r,ref:t})});SC.displayName=CC;var kC="DialogClose",_C=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=oC(kC,n);return m.jsx(hi.button,{type:"button",...r,ref:t,onClick:ti(e.onClick,()=>o.onOpenChange(!1))})});function EC(e){return e?"open":"closed"}_C.displayName=kC;var jC="DialogTitleWarning",[NC,RC]=function(e,t){const n=D.createContext(t),r=e=>{const{children:t,...r}=e,o=D.useMemo(()=>r,Object.values(r));return m.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=D.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(jC,{contentName:mC,titleName:wC,docsSlug:"dialog"}),OC=({titleId:e})=>{const t=RC(jC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return D.useEffect(()=>{if(e){document.getElementById(e)||console.error(n)}},[n,e]),null},PC=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${RC("DialogDescriptionWarning").contentName}}.`;return D.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)||console.warn(n)}},[n,e,t]),null},TC=aC,DC=cC,MC=fC,IC=gC,AC=xC,LC=SC,FC=_C;const zC=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,$C=To,HC=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return $C(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=zC(t)||zC(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return $C(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},BC=TC,VC=FC,UC=DC,qC=D.forwardRef(({className:e,...t},n)=>m.jsx(MC,{className:Ya("fixed inset-0 z-50 bg-[#1E1E1E]/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));qC.displayName=MC.displayName;const WC=HC("fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-neutral-950",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),YC=D.forwardRef(({side:e="right",className:t,children:n,...r},o)=>{const{portalRef:a}=Pr();return m.jsxs(UC,{container:a.current,children:[m.jsx(qC,{}),m.jsx(IC,{ref:o,className:Ya(WC({side:e}),t),...r,children:n})]})});YC.displayName=IC.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(AC,{ref:n,className:Ya("text-lg font-semibold text-neutral-950 dark:text-neutral-50",e),...t})).displayName=AC.displayName;function GC({children:e,isOpen:t,onClose:n,title:r,className:o}){const[a,i]=D.useState(!1);return m.jsx(BC,{open:t,onOpenChange:n,children:m.jsxs(YC,{className:Ya("p-[30px] rounded-l-xl lg:max-w-full space-y-6 overflow-auto",o,a?"w-full rounded-l-none":null),children:[m.jsxs("div",{className:"flex items-center justify-between border-b pb-2",children:[m.jsx("h1",{className:"text-gray-900 font-semibold text-xl",children:r}),m.jsxs("div",{className:"flex items-center gap-5",children:[m.jsx("button",{className:"w-9 h-9 flex items-center justify-center rounded-md hover:ring-2 ring-inset ring-dark",onClick:()=>{i(!a)},children:Kv.expand}),m.jsx(VC,{asChild:!0,className:"w-9 h-9 rounded-md flex items-center justify-center bg-danger_light",children:m.jsxs("button",{children:[" ",M.cloneElement(Kv.close2,{fill:"#F1416C"})]})})]})]}),e]})})}function KC({children:e,className:t}){return m.jsx("div",{className:Ya("border rounded-xl py-[30px] border-gray-200 ",t),children:e})}function QC(){return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(ei,{className:"h-5 w-[500px] rounded-md"}),m.jsx(ei,{className:"h-5 w-[500px] rounded-md"})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(ei,{className:"h-9 w-[140px] rounded-md"}),m.jsx(ei,{className:"h-9 w-[140px] rounded-md"})]})]}),m.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[m.jsxs(KC,{className:"p-4 flex flex-col gap-3",children:[m.jsx(ei,{className:"flex-grow w-full rounded-md"}),m.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[m.jsx(ei,{className:"h-[79px] rounded-md"}),m.jsx(ei,{className:"h-[79px] rounded-md"}),m.jsx(ei,{className:"h-[79px] rounded-md"})]})]}),m.jsxs("div",{className:"space-y-8 col-span-2",children:[m.jsx(ei,{className:"h-9 w-full rounded-md"}),m.jsx(ei,{className:"h-4 w-[326px] rounded-md"}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(ei,{className:"h-3.5 w-[150px] rounded-md"}),m.jsx(ei,{className:"h-10 w-full rounded-md"})]}),m.jsx(ei,{className:"h-9 w-[500px] rounded-md"}),m.jsxs("div",{className:"flex gap-3",children:[m.jsx(ei,{className:"h-12 w-[115px] rounded-md"}),m.jsx(ei,{className:"h-12 w-[150px] rounded-md"}),m.jsx(ei,{className:"h-12 w-[171px] rounded-md"})]}),m.jsx(ei,{className:"h-3.5 w-[337px] rounded-md"})]})]}),m.jsxs("div",{className:"flex gap-4",children:[m.jsx(ei,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(ei,{className:"h-3.5 w-[140px] rounded-md"})]}),m.jsx("div",{className:"grid grid-cols-4 gap-3",children:[1,2,3,4].map((e,t)=>m.jsxs("div",{className:"border rounded-xl border-gray-200 p-4 gap-4 flex flex-col",children:[m.jsx(ei,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(ei,{className:"h-10 w-[200px] rounded-md"})]},t))}),m.jsx("div",{className:"space-y-6",children:[1,2,3,4].map((e,t)=>m.jsxs("div",{className:" gap-4 flex flex-col",children:[m.jsx(ei,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(ei,{className:"h-[163px] w-[896px] rounded-md"})]},t))})]})}D.forwardRef(({className:e,...t},n)=>m.jsx(LC,{ref:n,className:Ya("text-sm text-neutral-500 dark:text-neutral-400",e),...t})).displayName=LC.displayName;var ZC="https://unpkg.com/@simpoobusiness/sdk/dist/assets/placeholder-image94ba15ea00cc66fe.svg";function XC({images:e}){return m.jsxs(KC,{className:"p-5 flex flex-col gap-2.5",children:[m.jsx("div",{className:"relative flex-grow",children:m.jsx("img",{src:e?.[0]??ZC,sizes:"100%",alt:"item image",draggable:!1,className:"rounded-xl object-cover w-full h-full"})}),m.jsx("div",{className:"flex gap-4 overflow-auto",children:e.filter((e,t)=>0!==t).map((e,t)=>m.jsx("div",{className:"w-[89px] h-[79px] relative shrink-0",children:m.jsx("img",{src:e??ZC,alt:"item image",draggable:!1,className:"rounded-xl object-cover h-full w-full"})},t))})]})}var JC=Symbol.for("react.lazy"),eS=I[" use ".trim().toString()];function tS(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===JC&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function nS(e){const t=oS(e),n=D.forwardRef((e,n)=>{let{children:r,...o}=e;tS(r)&&"function"==typeof eS&&(r=eS(r._payload));const a=D.Children.toArray(r),i=a.find(iS);if(i){const e=i.props.children,r=a.map(t=>t===i?D.Children.count(e)>1?D.Children.only(null):D.isValidElement(e)?e.props.children:null:t);return m.jsx(t,{...o,ref:n,children:D.isValidElement(e)?D.cloneElement(e,void 0,r):null})}return m.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var rS=nS("Slot");function oS(e){const t=D.forwardRef((e,t)=>{let{children:n,...r}=e;if(tS(n)&&"function"==typeof eS&&(n=eS(n._payload)),D.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==D.Fragment&&(o.ref=t?ri(t,e):e),D.cloneElement(n,o)}return D.Children.count(n)>1?D.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var aS=Symbol("radix.slottable");function iS(e){return D.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===aS}var sS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=nS(`Primitive.${t}`),r=D.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),lS="horizontal",uS=["horizontal","vertical"],cS=D.forwardRef((e,t)=>{const{decorative:n,orientation:r=lS,...o}=e,a=function(e){return uS.includes(e)}(r)?r:lS,i=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return m.jsx(sS.div,{"data-orientation":a,...i,...o,ref:t})});cS.displayName="Separator";var dS=cS;const fS=D.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>m.jsx(dS,{ref:o,decorative:n,orientation:t,className:Ya("shrink-0 bg-gray-300 dark:bg-neutral-800","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...r}));function pS({data:e,printLabel:t}){const n=[{tag:"reorder level",value:`${e?.reorder_level} ${e?.unit_resource?.name}`},{tag:"packing groups",value:`${e?.item_group?.length} group(s)`},{tag:"variations",value:`${e?.variation?.length} variable(s)`},{tag:"extras",value:`${e?.extras?.length} extras`}];return m.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[m.jsx(XC,{images:e?.images?.map(e=>e.image)}),m.jsxs("div",{className:"col-span-2 flex flex-col gap-9",children:[m.jsxs("div",{className:"flex gap-4 bg-primary_light p-2.5 rounded-md",children:[m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Cost price:"," ",m.jsx("span",{className:"text-dark font-bold text-[15px]",children:Jv(Number(e?.cost_price))})]}),m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Selling price:"," ",e?.duplicate_prices?.map((t,n)=>m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-dark font-bold text-[15px] px-2",children:Jv(Number(t.selling_price))},n),n<e?.duplicate_prices?.length-1&&"-"]}))]})]}),m.jsxs("div",{className:"flex gap-2.5",children:[m.jsxs("p",{className:"text-gray-800 text-sm font-medium",children:["In stock:"," ",m.jsxs("span",{className:"text-dark font-bold text-[15px]",children:[eb(Number(e?.quantity))," ",e?.item_unit]})]}),"|",m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Total sold:"," ",m.jsxs("span",{className:"text-dark font-bold text-[15px]",children:[eb(e?.total_sold)," ",e?.item_unit]})]})]}),m.jsxs("div",{className:"space-y-2.5",children:[m.jsx("h2",{className:"text-gray-800 text-sm font-bold",children:"Description"}),m.jsx("p",{className:"text-gray-800 font-normal text-sm",children:e?.description??"No description..."})]}),m.jsx("div",{className:"flex gap-5 items-center",children:n.map((e,t)=>m.jsxs("div",{className:"flex gap-5 items-center",children:[m.jsxs("div",{className:"flex flex-col gap-2.5",children:[m.jsx("p",{className:"text-dark font-medium text-sm first-letter:uppercase",children:e.tag}),m.jsx("p",{className:"text-primary",children:e.value})]}),t<n.length-1&&m.jsx(fS,{className:"bg-[#7E8299] h-[30px] w-[1px]"})]},t))}),m.jsxs("div",{className:"flex gap-2.5 items-center",children:[m.jsxs("p",{className:"text-gray-700 text-sm font-medium flex gap-2",children:["Category:"," ",e?.category?.map((e,t)=>m.jsxs("span",{className:"text-dark font-normal text-[15px]",children:[e.name," "]},t))]}),m.jsx(fS,{className:"bg-[#7E8299] h-[14px] w-[1px]"}),m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Collection:"," ",e?.item_tags?.map((e,t)=>m.jsx("span",{className:"text-dark font-normal text-[15px]",children:e.name},t))]})]})]})]})}fS.displayName=dS.displayName;var hS=.999,mS=/[\\\/_+.#"@\[\(\{&]/,gS=/[\\\/_+.#"@\[\(\{&]/g,yS=/[\s-]/,vS=/[\s-]/g;function bS(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?1:.99;var s=`${o},${a}`;if(void 0!==i[s])return i[s];for(var l,u,c,d,f=r.charAt(a),p=n.indexOf(f,o),h=0;p>=0;)(l=bS(e,t,n,r,p+1,a+1,i))>h&&(p===o?l*=1:mS.test(e.charAt(p-1))?(l*=.8,(c=e.slice(o,p-1).match(gS))&&o>0&&(l*=Math.pow(hS,c.length))):yS.test(e.charAt(p-1))?(l*=.9,(d=e.slice(o,p-1).match(vS))&&o>0&&(l*=Math.pow(hS,d.length))):(l*=.17,o>0&&(l*=Math.pow(hS,p-o))),e.charAt(p)!==t.charAt(a)&&(l*=.9999)),(l<.1&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&(.1*(u=bS(e,t,n,r,p+1,a+2,i))>l&&(l=.1*u)),l>h&&(h=l),p=n.indexOf(f,p+1);return i[s]=h,h}function wS(e){return e.toLowerCase().replace(vS," ")}function xS(e,t,n){return bS(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,wS(e),wS(t),0,0,{})}var CS='[cmdk-group=""]',SS='[cmdk-group-items=""]',kS='[cmdk-item=""]',_S=`${kS}:not([aria-disabled="true"])`,ES="cmdk-item-select",jS="data-value",NS=(e,t,n)=>xS(e,t,n),RS=D.createContext(void 0),OS=()=>D.useContext(RS),PS=D.createContext(void 0),TS=()=>D.useContext(PS),DS=D.createContext(void 0),MS=D.forwardRef((e,t)=>{let n=GS(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=GS(()=>new Set),o=GS(()=>new Map),a=GS(()=>new Map),i=GS(()=>new Set),s=WS(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:g=!0,...y}=e,v=Ui(),b=Ui(),w=Ui(),x=D.useRef(null),C=ZS();YS(()=>{if(void 0!==c){let e=c.trim();n.current.value=e,S.emit()}},[c]),YS(()=>{C(6,R)},[]);let S=D.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i,l;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)N(),E(),C(1,j);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(o=document.getElementById(v))||o.focus()}if(C(7,()=>{var e;n.current.selectedItemId=null==(e=O())?void 0:e.id,S.emit()}),r||C(5,R),void 0!==(null==(a=s.current)?void 0:a.value)){let e=null!=t?t:"";return void(null==(l=(i=s.current).onValueChange)||l.call(i,e))}}S.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),k=D.useMemo(()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,_(t,r)),C(2,()=>{E(),S.emit()}))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),C(3,()=>{N(),E(),n.current.value||j(),S.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=O();C(4,()=>{N(),(null==t?void 0:t.getAttribute("id"))===e&&j(),S.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:w,labelId:b,listInnerRef:x}),[]);function _(e,t){var r,o;let a=null!=(o=null==(r=s.current)?void 0:r.filter)?o:NS;return e?a(e,n.current.search,t):0}function E(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=o.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;P().sort((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(SS);t?t.appendChild(e.parentElement===t?e:e.closest(`${SS} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${SS} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=x.current)?void 0:t.querySelector(`${CS}[${jS}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function j(){let e=P().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(jS);S.setState("value",t||void 0)}function N(){var e,t,i,l;if(!n.current.search||!1===s.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let u=0;for(let o of r.current){let r=_(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(l=null==(i=a.current.get(o))?void 0:i.keywords)?l:[]);n.current.filtered.items.set(o,r),r>0&&u++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function R(){var e,t,n;let r=O();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(CS))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function O(){var e;return null==(e=x.current)?void 0:e.querySelector(`${kS}[aria-selected="true"]`)}function P(){var e;return Array.from((null==(e=x.current)?void 0:e.querySelectorAll(_S))||[])}function T(e){let t=P()[e];t&&S.setState("value",t.getAttribute(jS))}function M(e){var t;let n=O(),r=P(),o=r.findIndex(e=>e===n),a=r[o+e];null!=(t=s.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&S.setState("value",a.getAttribute(jS))}function I(e){let t,n=O(),r=null==n?void 0:n.closest(CS);for(;r&&!t;)r=e>0?US(r,CS):qS(r,CS),t=null==r?void 0:r.querySelector(_S);t?S.setState("value",t.getAttribute(jS)):M(e)}let A=()=>T(P().length-1),L=e=>{e.preventDefault(),e.metaKey?A():e.altKey?I(1):M(1)},F=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?I(-1):M(-1)};return D.createElement(sS.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=y.onKeyDown)||t.call(y,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!n)switch(e.key){case"n":case"j":g&&e.ctrlKey&&L(e);break;case"ArrowDown":L(e);break;case"p":case"k":g&&e.ctrlKey&&F(e);break;case"ArrowUp":F(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),A();break;case"Enter":{e.preventDefault();let t=O();if(t){let e=new Event(ES);t.dispatchEvent(e)}}}}},D.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:JS},l),XS(e,e=>D.createElement(PS.Provider,{value:S},D.createElement(RS.Provider,{value:k},e))))}),IS=D.forwardRef((e,t)=>{var n,r;let o=Ui(),a=D.useRef(null),i=D.useContext(DS),s=OS(),l=WS(e),u=null!=(r=null==(n=l.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;YS(()=>{if(!u)return s.item(o,null==i?void 0:i.id)},[u]);let c=QS(o,a,[e.value,e.children,a],e.keywords),d=TS(),f=KS(e=>e.value&&e.value===c.current),p=KS(e=>!(!u&&!1!==s.filter())||(!e.search||e.filtered.items.get(o)>0));function h(){var e,t;m(),null==(t=(e=l.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(D.useEffect(()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(ES,h),()=>t.removeEventListener(ES,h)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:g,value:y,onSelect:v,forceMount:b,keywords:w,...x}=e;return D.createElement(sS.div,{ref:ri(a,t),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||s.getDisablePointerSelection()?void 0:m,onClick:g?void 0:h},e.children)}),AS=D.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=Ui(),s=D.useRef(null),l=D.useRef(null),u=Ui(),c=OS(),d=KS(e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i)));YS(()=>c.group(i),[]),QS(i,s,[e.value,e.heading,l]);let f=D.useMemo(()=>({id:i,forceMount:o}),[o]);return D.createElement(sS.div,{ref:ri(s,t),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&D.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),XS(e,e=>D.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},D.createElement(DS.Provider,{value:f},e))))}),LS=D.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=D.useRef(null),a=KS(e=>!e.search);return n||a?D.createElement(sS.div,{ref:ri(o,t),...r,"cmdk-separator":"",role:"separator"}):null}),FS=D.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=TS(),i=KS(e=>e.search),s=KS(e=>e.selectedItemId),l=OS();return D.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),D.createElement(sS.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})}),zS=D.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=D.useRef(null),i=D.useRef(null),s=KS(e=>e.selectedItemId),l=OS();return D.useEffect(()=>{if(i.current&&a.current){let e,t=i.current,n=a.current,r=new ResizeObserver(()=>{e=requestAnimationFrame(()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")})});return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}},[]),D.createElement(sS.div,{ref:ri(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},XS(e,e=>D.createElement("div",{ref:ri(i,l.listInnerRef),"cmdk-list-sizer":""},e)))}),$S=D.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return D.createElement(TC,{open:n,onOpenChange:r},D.createElement(DC,{container:i},D.createElement(MC,{"cmdk-overlay":"",className:o}),D.createElement(IC,{"aria-label":e.label,"cmdk-dialog":"",className:a},D.createElement(MS,{ref:t,...s}))))}),HS=D.forwardRef((e,t)=>KS(e=>0===e.filtered.count)?D.createElement(sS.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),BS=D.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return D.createElement(sS.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},XS(e,e=>D.createElement("div",{"aria-hidden":!0},e)))}),VS=Object.assign(MS,{List:zS,Item:IS,Input:FS,Group:AS,Separator:LS,Dialog:$S,Empty:HS,Loading:BS});function US(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function qS(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function WS(e){let t=D.useRef(e);return YS(()=>{t.current=e}),t}var YS="undefined"==typeof window?D.useEffect:D.useLayoutEffect;function GS(e){let t=D.useRef();return void 0===t.current&&(t.current=e()),t}function KS(e){let t=TS(),n=()=>e(t.snapshot());return D.useSyncExternalStore(t.subscribe,n,n)}function QS(e,t,n,r=[]){let o=D.useRef(),a=OS();return YS(()=>{var i;let s=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),l=r.map(e=>e.trim());a.value(e,s,l),null==(i=t.current)||i.setAttribute(jS,s),o.current=s}),o}var ZS=()=>{let[e,t]=D.useState(),n=GS(()=>new Map);return YS(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function XS({asChild:e,children:t},n){return e&&D.isValidElement(t)?D.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(t),{ref:t.ref},n(t.props.children)):n(t)}var JS={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ek=TC,tk=DC,nk=D.forwardRef(({className:e,...t},n)=>m.jsx(MC,{ref:n,className:Ya("fixed inset-0 z-50 bg-[#1E1E1E]/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));nk.displayName=MC.displayName;const rk=D.forwardRef(({className:e,children:t,...n},r)=>{const{portalRef:o}=Pr();return m.jsxs(tk,{container:o.current,children:[m.jsx(nk,{}),m.jsxs(IC,{ref:r,className:Ya("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...n,children:[t,m.jsxs(FC,{className:"hidden absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[m.jsx(Df,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});rk.displayName=IC.displayName;const ok=D.forwardRef(({className:e,...t},n)=>m.jsx(AC,{ref:n,className:Ya("text-lg font-semibold leading-none tracking-tight",e),...t}));ok.displayName=AC.displayName;const ak=D.forwardRef(({className:e,...t},n)=>m.jsx(LC,{ref:n,className:Ya("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));ak.displayName=LC.displayName;const ik=D.forwardRef(({className:e,...t},n)=>m.jsx(VS,{ref:n,className:Ya("flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50",e),...t}));ik.displayName=VS.displayName;const sk=D.forwardRef(({className:e,...t},n)=>m.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m.jsx(Tf,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m.jsx(VS.Input,{ref:n,className:Ya("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400",e),...t})]}));sk.displayName=VS.Input.displayName;const lk=D.forwardRef(({className:e,...t},n)=>m.jsx(VS.List,{ref:n,className:Ya("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));lk.displayName=VS.List.displayName;const uk=D.forwardRef((e,t)=>m.jsx(VS.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));uk.displayName=VS.Empty.displayName;const ck=D.forwardRef(({className:e,...t},n)=>m.jsx(VS.Group,{ref:n,className:Ya("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400",e),...t}));ck.displayName=VS.Group.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(VS.Separator,{ref:n,className:Ya("-mx-1 h-px bg-neutral-200 dark:bg-neutral-800",e),...t})).displayName=VS.Separator.displayName;const dk=D.forwardRef(({className:e,...t},n)=>m.jsx(VS.Item,{ref:n,className:Ya("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-primary_light data-[selected=true]:text-primary data-[disabled=true]:opacity-50 dark:data-[selected='true']:bg-primary_light dark:data-[selected=true]:text-primary",e),...t}));dk.displayName=VS.Item.displayName;var fk="Popover",[pk]=ai(fk,[zl]),hk=zl(),[mk,gk]=pk(fk),yk=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=hk(t),l=D.useRef(null),[u,c]=D.useState(!1),[d,f]=ui({prop:r,defaultProp:o??!1,onChange:a,caller:fk});return m.jsx(tu,{...s,children:m.jsx(mk,{scope:t,contentId:Ui(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:D.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:u,onCustomAnchorAdd:D.useCallback(()=>c(!0),[]),onCustomAnchorRemove:D.useCallback(()=>c(!1),[]),modal:i,children:n})})};yk.displayName=fk;var vk="PopoverAnchor";D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gk(vk,n),a=hk(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return D.useEffect(()=>(i(),()=>s()),[i,s]),m.jsx(nu,{...a,...r,ref:t})}).displayName=vk;var bk="PopoverTrigger",wk=D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gk(bk,n),a=hk(n),i=oi(t,o.triggerRef),s=m.jsx(hi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Dk(o.open),...r,ref:i,onClick:ti(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:m.jsx(nu,{asChild:!0,...a,children:s})});wk.displayName=bk;var xk="PopoverPortal",[Ck,Sk]=pk(xk,{forceMount:void 0}),kk=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=gk(xk,t);return m.jsx(Ck,{scope:t,forceMount:n,children:m.jsx(iu,{present:n||a.open,children:m.jsx(au,{asChild:!0,container:o,children:r})})})};kk.displayName=xk;var _k="PopoverContent",Ek=D.forwardRef((e,t)=>{const n=Sk(_k,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=gk(_k,e.__scopePopover);return m.jsx(iu,{present:r||a.open,children:a.modal?m.jsx(Nk,{...o,ref:t}):m.jsx(Rk,{...o,ref:t})})});Ek.displayName=_k;var jk=ci("PopoverContent.RemoveScroll"),Nk=D.forwardRef((e,t)=>{const n=gk(_k,e.__scopePopover),r=D.useRef(null),o=oi(t,r),a=D.useRef(!1);return D.useEffect(()=>{const e=r.current;if(e)return Tu(e)},[]),m.jsx(wc,{as:jk,allowPinchZoom:!0,children:m.jsx(Ok,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ti(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:ti(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:ti(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Rk=D.forwardRef((e,t)=>{const n=gk(_k,e.__scopePopover),r=D.useRef(!1),o=D.useRef(!1);return m.jsx(Ok,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=n.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),Ok=D.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=gk(_k,n),p=hk(n);return Oi(),m.jsx(Ii,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(_i,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:m.jsx(ru,{"data-state":Dk(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Pk="PopoverClose",Tk=D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=gk(Pk,n);return m.jsx(hi.button,{type:"button",...r,ref:t,onClick:ti(e.onClick,()=>o.onOpenChange(!1))})});Tk.displayName=Pk;function Dk(e){return e?"open":"closed"}D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=hk(n);return m.jsx(ou,{...o,...r,ref:t})}).displayName="PopoverArrow";var Mk=kk,Ik=Ek;const Ak=yk,Lk=wk,Fk=D.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>{const{portalRef:a}=Pr();return m.jsx(Mk,{container:a.current,children:m.jsx(Ik,{ref:o,align:t,sideOffset:n,className:Ya("z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...r})})});Fk.displayName=Ik.displayName;const zk=HC("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300",{variants:{variant:{default:"bg-neutral-900 text-neutral-50 hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",destructive:"bg-red-500 text-neutral-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",outline:"border border-neutral-200 bg-white hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",secondary:"bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",ghost:"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",link:"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),$k=D.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const i=r?rS:"button";return m.jsx(i,{className:Ya(zk({variant:t,size:n,className:e})),ref:a,...o})});$k.displayName="Button";const Hk=({label:e,options:t=[],className:n,placeholder:r,value:o="",onValueChange:a,required:i,error:s,showSearch:l=!0,showOutline:u=!0,icon:c,info:d,optional:f,labelClass:p,actionLabel:h,actionLabelAction:g,actionLabelInfo:y,searchPlaceholder:v,disabled:b,triggerClass:w,loading:x,showError:C,onChangeSearch:S,searching:k,infoAlignment:_,align:E="start",valueClass:j})=>{const[N,R]=D.useState(""),[O,P]=D.useState(!1),[T,M]=D.useState(0),I=D.useRef(null);D.useEffect(()=>{const e=()=>{I.current&&M(I?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);return m.jsx(m.Fragment,{children:x?m.jsx(ei,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ya("flex flex-col gap-2.5",n),children:[m.jsxs("div",{className:Ya("flex justify-between gap-2 flex-wrap",e?null:"hidden"),children:[e&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",p),children:[m.jsx("span",{className:"first-letter:inherit",children:e})," ",i?m.jsx("span",{className:"text-[#E12D39]",children:e&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kb,{fieldName:e,align:_,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),h&&m.jsxs("button",{onClick:g,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[h,y&&m.jsx(kb,{fieldName:h,children:m.jsx("p",{className:"font-normal first-letter:uppercase text-left",children:y})})]})]}),m.jsxs(Ak,{modal:!0,open:O,onOpenChange:P,children:[m.jsx(Lk,{asChild:!0,children:m.jsxs($k,{ref:I,variant:"outline",role:"combobox","aria-expanded":O,className:Ya(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${(s||C)&&"!border-danger"}`,w),disabled:b,children:[m.jsx("span",{className:Ya("flex gap-2 first-letter:uppercase capitalize text-[#5E6278] justify-start truncate",o?"text-dark":null,j),children:o?(e=>{const n=t?.find(t=>t.value===e);return n?.label})(o):r??"Select..."}),m.jsx(Of,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(Fk,{style:{width:T},className:"min-w-[280px] p-0 bg-white rounded-xl border-gray-200",align:E,children:m.jsxs(ik,{className:"w-full",children:[l&&m.jsx(sk,{onChangeCapture:S,className:"placeholder:text-xs",placeholder:v??"Search..."}),k?m.jsx("div",{className:"flex flex-col gap-2 p-2",children:[1,2,3].map((e,t)=>m.jsx(ei,{className:"h-9 rounded-md"},t))}):m.jsx(uk,{children:"No result found."}),m.jsx(ck,{children:m.jsx(lk,{className:"",children:t?.map(e=>m.jsxs(dk,{value:"string"==typeof e.label?e.label:e?.searchId,className:`first-letter:uppercase capitalize mb-1 hover:bg-primary_light w-full rounded-md hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o===e.value&&"bg-primary_light text-primary"}`,onSelect:()=>{a&&a(e.value),P(!1)},children:[m.jsx(Ef,{className:Ya("mr-2 h-4 w-4",o===e.value?"opacity-100":"opacity-0")}),e.label]},`${"string"==typeof e.label?e.label:e?.searchId}${e.value}`))})})]})})]}),s&&m.jsx("p",{className:"text-danger text-xs font-normal",children:s})]})})};var Bk="https://unpkg.com/@simpoobusiness/sdk/dist/assets/image-placeholdere1821db1b147e2aa.png";function Vk({data:e}){const[t,n]=D.useState(e?.total_selling_price||0),r=[{label:"Stock Quantity",value:eb(Number(e?.quantity)),desc:null},{label:"Total Cost",value:Jv(Number(e?.total_cost_price)),desc:null},{label:"Total Selling Price",value:Jv(t),desc:m.jsx(Hk,{options:e?.prices?.map(e=>({label:e.priceGroup.name,value:e.selling_price.toString()})),onValueChange:e=>n(Number(e)),value:t?.toString(),triggerClass:"h-8",showSearch:!1,placeholder:"Select price"})},{label:"Profit to be made",value:Jv(t-e?.total_cost_price),desc:null}],o=[{tag:"Barcode",value:e?.barcode.map(e=>e.barcode)},{tag:"SKU",value:e?.sku},{tag:"System code",value:e?.itemcode.toString()}],a=["S/N","Batch number","Quantity","Expiry date","Unit cost"],i=[{tag:"Item Managers",headers:["S/N","manager name","quantity assigned"],body:e?.managers?.map((t,n)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:n+1}),m.jsx("td",{children:t?.manager?.name||""}),m.jsxs("td",{children:[t?.quantity||0," ",e?.item_unit||""]})]},n))||[]},{tag:"Extras",headers:["S/N","image","extra name","quantity inside ","selling price"],body:e?.extras?.map((e,t)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:t+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:Bk,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:e.extra.name}),m.jsxs("td",{children:[e.quantity," ",e.extra.item_unit]}),m.jsx("td",{children:Jv(Number(e.selling_price))})]},t))||[]},{tag:"Raw materials",headers:["S/N","image","material name","quantity inside ","selling price"],body:e?.material?.map((e,t)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:t+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:Bk,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:e.raw_material?.name}),m.jsxs("td",{children:[e.quantity," ",e.raw_material?.item_unit]}),m.jsx("td",{children:Jv(Number(e.selling_price))})]},t))},{tag:"Packing groups",headers:["S/N","image","group name","quantity inside ","selling price","Group code","print label"],body:e?.item_group?.map((t,n)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:n+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:Bk,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:t.group_name}),m.jsxs("td",{children:[t.quantity," ",e.item_unit]}),m.jsx("td",{children:Jv(Number(t.selling_price))}),m.jsx("td",{children:t.barcode}),m.jsx("td",{children:m.jsx("button",{className:"w-6 h-6 items-center flex justify-center",children:Kv.printer_blue})})]},n))},{tag:"Variations",headers:["S/N","image","variation","quantity ","selling price","code","print label"],body:e?.variation?.map((t,n)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:n+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:t.image??Bk,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:t.variation_values.map((e,n)=>m.jsxs("span",{className:"pr-2",children:[e.attribute_value.value_name," ",t?.variation_values?.length-1>n&&"-"]},n))}),m.jsxs("td",{children:[t.quantity,e?.item_unit]}),m.jsx("td",{children:Jv(Number(t.locationprices?.[0]?.selling_price))}),m.jsx("td",{children:t.barcode}),m.jsx("td",{children:m.jsx("button",{className:"w-6 h-6 items-center flex justify-center",children:Kv.printer_blue})})]},n))}];return m.jsxs("div",{className:"space-y-6",children:[m.jsx("div",{className:"grid grid-cols-4 gap-2.5",children:r.map((n,o)=>m.jsxs("div",{className:"border rounded-xl border-gray-200 p-4 gap-4 flex flex-col",children:[m.jsx("p",{className:"text-dark text-sm font-medium",children:n.label}),m.jsxs("p",{title:n.value,className:Ya("text-dark font-bold text-3xl truncate",o===r.length-1&&Number(t)-Number(e?.cost_price)<0?"text-danger":null),children:[n.value,0===o&&m.jsx("span",{className:"font-normal text-sm",children:e.item_unit})]}),n.desc]},o))}),m.jsx("div",{className:"grid grid-cols-12",children:m.jsxs("div",{className:"col-span-10 space-y-6",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsx("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:"Item codes:"}),m.jsx("div",{className:"flex gap-5",children:o.map((e,t)=>m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:Ya("flex flex-col gap-2.5"),children:[m.jsx("p",{className:"text-dark text-sm font-medium",children:e.tag}),m.jsx("p",{className:"text-gray-500 text-sm font-normal flex flex-col gap-2",children:Array.isArray(e.value)?e.value?.map((e,t)=>m.jsx("span",{children:e},t)):e.value})]},t),t<o.length-1&&m.jsx("div",{children:m.jsx(fS,{orientation:"vertical",className:"bg-[#7E8299]"})},t)]}))})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:"Suppliers:"}),m.jsx("div",{className:"flex gap-5 flex-col",children:e?.suppliers?.map((e,t)=>m.jsxs("div",{className:"bg-gray-100 rounded-xl p-[15px] space-y-[18px]",children:[m.jsxs("div",{className:"flex gap-3",children:[m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:Bk,className:"object-cover w-full h-full"})}),m.jsxs("div",{className:"space-y-1 flex-grow border-b border-dashed border-gray-300 pb-1",children:[m.jsx("h1",{className:"text-dark font-semibold text-sm capitalize",children:e.name}),m.jsx("p",{className:"text-gray-700 font-medium text-[13px] capitalize"})]})]}),m.jsxs("table",{className:"table-auto w-full border-separate border-spacing-y-3",children:[m.jsx("thead",{children:m.jsx("tr",{children:a.map((e,t)=>m.jsx("th",{className:"text-left text-dark",children:e},t))})}),m.jsx("tbody",{children:m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:"1"}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:e.supplier_batch_number})}),m.jsx("td",{children:e.supplier_quantity}),m.jsx("td",{children:eC(e.supplier_expired_date).format("MMMM DD, YYYY")}),m.jsx("td",{children:Jv(Number(e.supplier_price))})]})})]})]},t))})]}),i.map((e,t)=>m.jsxs("div",{className:"space-y-3",children:[m.jsxs("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:[e.tag,": ",e.body?.length]}),e.body?.length>0?m.jsx("div",{className:"bg-gray-100 rounded-xl p-[15px] space-y-[18px]",children:m.jsxs("table",{className:"table-auto w-full border-separate border-spacing-y-3",children:[m.jsx("thead",{children:m.jsx("tr",{children:e.headers.map((e,t)=>m.jsx("th",{className:"text-left text-dark first-letter:uppercase",children:e},t))})}),m.jsx("tbody",{children:e.body})]})}):null]},t))]})})]})}const Uk=[{label:"All",count:900},{label:"Active",count:10},{label:"Inactive",count:0}];function qk({tabs:e=Uk,loading:t}){const[n,r]=D.useState(0);return m.jsxs("div",{className:"flex flex-col overflow-auto",children:[m.jsx("div",{className:"flex gap-[30px] ",children:e.map((e,o)=>m.jsxs("button",{className:"flex items-center gap-2.5 group relative pb-2",onClick:()=>((e,t)=>{e.link||r(t),e.action&&e.action()})(e,o),children:[m.jsx("p",{className:Ya("group-hover:text-gray-900 duration-200 text-gray-800 font-normal text-sm first-letter:uppercase whitespace-nowrap",o===n?"text-gray-900 font-semibold":null),children:e.label}),t?m.jsx(ei,{className:"h-6.5 rounded w-8"}):m.jsxs(m.Fragment,{children:[" ",e.count>=0?m.jsx("span",{className:Ya("rounded px-1.5 h-6.5 flex items-center text-xs font-semibold duration-200 group-hover:bg-primary_light group-hover:text-primary bg-gray-200 text-gray-500 shrink-0",o===n?"bg-primary_light text-primary":null),children:e.count}):null]}),o===n?m.jsx("div",{className:"h-[5px] rounded bg-primary absolute left-0 right-0 -bottom-[5px]"}):null]},o))}),m.jsx("div",{className:"h-[5px] rounded bg-gray-300"})]})}function Wk({isOpen:e,onClose:t,itemUUID:n}){const{data:r,isFetching:o}=Yx(["single_item",n],`/items/get?item_uuid=${n}`,{enabled:e}),a=r?.data,i=[{tag:"Created",value:eC(a?.created_date).format("MMMM DD, YYYY")},{tag:"Last edited",value:eC(a?.last_update_date).format("MMMM DD, YYYY")},{tag:"Expiry",value:m.jsxs("p",{className:"",children:[" ",m.jsxs("span",{className:"text-danger",children:[a?.expired," Expired,"]})," ",m.jsxs("span",{className:"text-warning",children:[a?.expiring," Expiring"]})]})}],[s,l]=D.useState(1),u=[{label:"Item overview",action:()=>l(1)}];return D.useEffect(()=>{!e&&l(1)},[e]),m.jsx(GC,{isOpen:e,onClose:t,title:"Item View",className:"w-[1176px]",children:o?m.jsx(QC,{}):m.jsxs("div",{className:"space-y-7",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsxs("h1",{className:"text-dark text-xl font-semibold flex items-center gap-2",children:[a?.name,m.jsx("span",{className:"bg-primary_light text-primary text-xs rounded px-[7px] h-5 flex items-center capitalize",children:a?.item_type?.name})]}),m.jsx("div",{className:"flex gap-2",children:i.map((e,t)=>m.jsxs("p",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[m.jsxs("span",{className:"text-dark",children:[e.tag,":"]})," ",e.value," ",t<2&&"|"]},t))})]}),m.jsx("div",{className:"flex gap-3"})]}),m.jsx(pS,{data:a}),m.jsx(qk,{tabs:u}),1===s?m.jsx(Vk,{data:a}):null]})})}function Yk({children:e,isOpen:t,onClose:n,title:r,className:o}){return m.jsx(ek,{open:t,onOpenChange:n,children:m.jsxs(rk,{className:Ya("p-0 gap-4 max-h-[90vh] overflow-auto",o),children:[m.jsx(ok,{className:"sr-only",children:"Modal Component"}),m.jsx(ak,{className:"sr-only",children:"This is a modal component"}),r?m.jsxs("div",{className:"sticky top-0 bg-inherit flex flex-col gap-4 pt-5 z-10",children:[m.jsxs("div",{className:"flex justify-between items-center px-5",children:[m.jsx("h1",{className:"text-dark font-medium text-lg",children:r}),m.jsx("button",{className:"w-6 h-6",onClick:n,children:M.cloneElement(Kv.close2,{fill:"black"})})]}),m.jsx(fS,{})]}):null,e]})})}var Gk="-ms-",Kk="-moz-",Qk="-webkit-",Zk="comm",Xk="rule",Jk="decl",e_="@keyframes",t_=Math.abs,n_=String.fromCharCode,r_=Object.assign;function o_(e){return e.trim()}function a_(e,t){return(e=t.exec(e))?e[0]:e}function i_(e,t,n){return e.replace(t,n)}function s_(e,t,n){return e.indexOf(t,n)}function l_(e,t){return 0|e.charCodeAt(t)}function u_(e,t,n){return e.slice(t,n)}function c_(e){return e.length}function d_(e){return e.length}function f_(e,t){return t.push(e),e}function p_(e,t){return e.filter(function(e){return!a_(e,t)})}var h_=1,m_=1,g_=0,y_=0,v_=0,b_="";function w_(e,t,n,r,o,a,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:h_,column:m_,length:i,return:"",siblings:s}}function x_(e,t){return r_(w_("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function C_(e){for(;e.root;)e=x_(e.root,{children:[e]});f_(e,e.siblings)}function S_(){return v_=y_>0?l_(b_,--y_):0,m_--,10===v_&&(m_=1,h_--),v_}function k_(){return v_=y_<g_?l_(b_,y_++):0,m_++,10===v_&&(m_=1,h_++),v_}function __(){return l_(b_,y_)}function E_(){return y_}function j_(e,t){return u_(b_,e,t)}function N_(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 R_(e){return o_(j_(y_-1,T_(91===e?e+2:40===e?e+1:e)))}function O_(e){for(;(v_=__())&&v_<33;)k_();return N_(e)>2||N_(v_)>3?"":" "}function P_(e,t){for(;--t&&k_()&&!(v_<48||v_>102||v_>57&&v_<65||v_>70&&v_<97););return j_(e,E_()+(t<6&&32==__()&&32==k_()))}function T_(e){for(;k_();)switch(v_){case e:return y_;case 34:case 39:34!==e&&39!==e&&T_(v_);break;case 40:41===e&&T_(e);break;case 92:k_()}return y_}function D_(e,t){for(;k_()&&e+v_!==57&&(e+v_!==84||47!==__()););return"/*"+j_(t,y_-1)+"*"+n_(47===e?e:k_())}function M_(e){for(;!N_(__());)k_();return j_(e,y_)}function I_(e){return function(e){return b_="",e}(A_("",null,null,null,[""],e=function(e){return h_=m_=1,g_=c_(b_=e),y_=0,[]}(e),0,[0],e))}function A_(e,t,n,r,o,a,i,s,l){for(var u=0,c=0,d=i,f=0,p=0,h=0,m=1,g=1,y=1,v=0,b="",w=o,x=a,C=r,S=b;g;)switch(h=v,v=k_()){case 40:if(108!=h&&58==l_(S,d-1)){-1!=s_(S+=i_(R_(v),"&","&\f"),"&\f",t_(u?s[u-1]:0))&&(y=-1);break}case 34:case 39:case 91:S+=R_(v);break;case 9:case 10:case 13:case 32:S+=O_(h);break;case 92:S+=P_(E_()-1,7);continue;case 47:switch(__()){case 42:case 47:f_(F_(D_(k_(),E_()),t,n,l),l),5!=N_(h||1)&&5!=N_(__()||1)||!c_(S)||" "===u_(S,-1,void 0)||(S+=" ");break;default:S+="/"}break;case 123*m:s[u++]=c_(S)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+c:-1==y&&(S=i_(S,/\f/g,"")),p>0&&(c_(S)-d||0===m&&47===h)&&f_(p>32?z_(S+";",r,n,d-1,l):z_(i_(S," ","")+";",r,n,d-2,l),l);break;case 59:S+=";";default:if(f_(C=L_(S,t,n,u,c,o,s,b,w=[],x=[],d,a),a),123===v)if(0===c)A_(S,t,C,C,w,a,d,s,x);else{switch(f){case 99:if(110===l_(S,3))break;case 108:if(97===l_(S,2))break;default:c=0;case 100:case 109:case 115:}c?A_(e,C,C,r&&f_(L_(e,C,C,0,0,o,s,b,o,w=[],d,x),x),o,x,d,s,r?w:x):A_(S,C,C,C,[""],x,0,s,x)}}u=c=p=0,m=y=1,b=S="",d=i;break;case 58:d=1+c_(S),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==S_())continue;switch(S+=n_(v),v*m){case 38:y=c>0?1:(S+="\f",-1);break;case 44:s[u++]=(c_(S)-1)*y,y=1;break;case 64:45===__()&&(S+=R_(k_())),f=__(),c=d=c_(b=S+=M_(E_())),v++;break;case 45:45===h&&2==c_(S)&&(m=0)}}return a}function L_(e,t,n,r,o,a,i,s,l,u,c,d){for(var f=o-1,p=0===o?a:[""],h=d_(p),m=0,g=0,y=0;m<r;++m)for(var v=0,b=u_(e,f+1,f=t_(g=i[m])),w=e;v<h;++v)(w=o_(g>0?p[v]+" "+b:i_(b,/&\f/g,p[v])))&&(l[y++]=w);return w_(e,t,n,0===o?Xk:s,l,u,c,d)}function F_(e,t,n,r){return w_(e,t,n,Zk,n_(v_),u_(e,2,-2),0,r)}function z_(e,t,n,r,o){return w_(e,t,n,Jk,u_(e,0,r),u_(e,r+1,-1),r,o)}function $_(e,t,n){switch(function(e,t){return 45^l_(e,0)?(((t<<2^l_(e,0))<<2^l_(e,1))<<2^l_(e,2))<<2^l_(e,3):0}(e,t)){case 5103:return Qk+"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 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Qk+e+e;case 4855:return Qk+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Kk+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Qk+e+Kk+e+Gk+e+e;case 5936:switch(l_(e,t+11)){case 114:return Qk+e+Gk+i_(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Qk+e+Gk+i_(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Qk+e+Gk+i_(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Qk+e+Gk+e+e;case 6165:return Qk+e+Gk+"flex-"+e+e;case 5187:return Qk+e+i_(e,/(\w+).+(:[^]+)/,Qk+"box-$1$2"+Gk+"flex-$1$2")+e;case 5443:return Qk+e+Gk+"flex-item-"+i_(e,/flex-|-self/g,"")+(a_(e,/flex-|baseline/)?"":Gk+"grid-row-"+i_(e,/flex-|-self/g,""))+e;case 4675:return Qk+e+Gk+"flex-line-pack"+i_(e,/align-content|flex-|-self/g,"")+e;case 5548:return Qk+e+Gk+i_(e,"shrink","negative")+e;case 5292:return Qk+e+Gk+i_(e,"basis","preferred-size")+e;case 6060:return Qk+"box-"+i_(e,"-grow","")+Qk+e+Gk+i_(e,"grow","positive")+e;case 4554:return Qk+i_(e,/([^-])(transform)/g,"$1"+Qk+"$2")+e;case 6187:return i_(i_(i_(e,/(zoom-|grab)/,Qk+"$1"),/(image-set)/,Qk+"$1"),e,"")+e;case 5495:case 3959:return i_(e,/(image-set\([^]*)/,Qk+"$1$`$1");case 4968:return i_(i_(e,/(.+:)(flex-)?(.*)/,Qk+"box-pack:$3"+Gk+"flex-pack:$3"),/space-between/,"justify")+Qk+e+e;case 4200:if(!a_(e,/flex-|baseline/))return Gk+"grid-column-align"+u_(e,t)+e;break;case 2592:case 3360:return Gk+i_(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,a_(e.props,/grid-\w+-end/)})?~s_(e+(n=n[t].value),"span",0)?e:Gk+i_(e,"-start","")+e+Gk+"grid-row-span:"+(~s_(n,"span",0)?a_(n,/\d+/):+a_(n,/\d+/)-+a_(e,/\d+/))+";":Gk+i_(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return a_(e.props,/grid-\w+-start/)})?e:Gk+i_(i_(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return i_(e,/(.+)-inline(.+)/,Qk+"$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(c_(e)-1-t>6)switch(l_(e,t+1)){case 109:if(45!==l_(e,t+4))break;case 102:return i_(e,/(.+:)(.+)-([^]+)/,"$1"+Qk+"$2-$3$1"+Kk+(108==l_(e,t+3)?"$3":"$2-$3"))+e;case 115:return~s_(e,"stretch",0)?$_(i_(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return i_(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,a,i,s){return Gk+n+":"+r+s+(o?Gk+n+"-span:"+(a?i:+i-+r)+s:"")+e});case 4949:if(121===l_(e,t+6))return i_(e,":",":"+Qk)+e;break;case 6444:switch(l_(e,45===l_(e,14)?18:11)){case 120:return i_(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Qk+(45===l_(e,14)?"inline-":"")+"box$3$1"+Qk+"$2$3$1"+Gk+"$2box$3")+e;case 100:return i_(e,":",":"+Gk)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return i_(e,"scroll-","scroll-snap-")+e}return e}function H_(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function B_(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Jk:return e.return=e.return||e.value;case Zk:return"";case e_:return e.return=e.value+"{"+H_(e.children,r)+"}";case Xk:if(!c_(e.value=e.props.join(",")))return""}return c_(n=H_(e.children,r))?e.return=e.value+"{"+n+"}":""}function V_(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Jk:return void(e.return=$_(e.value,e.length,n));case e_:return H_([x_(e,{value:i_(e.value,"@","@"+Qk)})],r);case Xk:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(a_(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":C_(x_(e,{props:[i_(t,/:(read-\w+)/,":-moz-$1")]})),C_(x_(e,{props:[t]})),r_(e,{props:p_(n,r)});break;case"::placeholder":C_(x_(e,{props:[i_(t,/:(plac\w+)/,":"+Qk+"input-$1")]})),C_(x_(e,{props:[i_(t,/:(plac\w+)/,":-moz-$1")]})),C_(x_(e,{props:[i_(t,/:(plac\w+)/,Gk+"input-$1")]})),C_(x_(e,{props:[t]})),r_(e,{props:p_(n,r)})}return""})}}var U_="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",q_="active",W_="data-styled-version",Y_="6.3.8",G_="/*!sc*/\n",K_="undefined"!=typeof window&&"undefined"!=typeof document,Q_=void 0===M.createContext,Z_=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)),X_=Object.freeze([]),J_=Object.freeze({});var eE=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]),tE=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,nE=/(^-|-$)/g;function rE(e){return e.replace(tE,"-").replace(nE,"")}var oE=/(a)(d)/gi,aE=function(e){return String.fromCharCode(e+(e>25?39:97))};function iE(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=aE(t%52)+n;return(aE(t%52)+n).replace(oE,"$1-$2")}var sE,lE=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},uE=function(e){return lE(5381,e)};function cE(e){return iE(uE(e)>>>0)}function dE(e){return"string"==typeof e&&!0}var fE="function"==typeof Symbol&&Symbol.for,pE=fE?Symbol.for("react.memo"):60115,hE=fE?Symbol.for("react.forward_ref"):60112,mE={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gE={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},yE={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vE=((sE={})[hE]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},sE[pE]=yE,sE);function bE(e){return("type"in(t=e)&&t.type.$$typeof)===pE?yE:"$$typeof"in e?vE[e.$$typeof]:mE;var t}var wE=Object.defineProperty,xE=Object.getOwnPropertyNames,CE=Object.getOwnPropertySymbols,SE=Object.getOwnPropertyDescriptor,kE=Object.getPrototypeOf,_E=Object.prototype;function EE(e,t,n){if("string"!=typeof t){if(_E){var r=kE(t);r&&r!==_E&&EE(e,r,n)}var o=xE(t);CE&&(o=o.concat(CE(t)));for(var a=bE(e),i=bE(t),s=0;s<o.length;++s){var l=o[s];if(!(l in gE||n&&n[l]||i&&l in i||a&&l in a)){var u=SE(t,l);try{wE(e,l,u)}catch(e){}}}}return e}function jE(e){return"function"==typeof e}function NE(e){return"object"==typeof e&&"styledComponentId"in e}function RE(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function OE(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}function PE(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function TE(e,t,n){if(void 0===n&&(n=!1),!n&&!PE(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=TE(e[r],t[r]);else if(PE(t))for(var r in t)e[r]=TE(e[r],t[r]);return e}function DE(e,t){Object.defineProperty(e,"toString",{value:t})}function ME(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 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(", ")):""))}var IE=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,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw ME(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),s=(a=0,t.length);a<s;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(G_);return t},e}(),AE=new Map,LE=new Map,FE=1,zE=function(e){if(AE.has(e))return AE.get(e);for(;LE.has(FE);)FE++;var t=FE++;return AE.set(e,t),LE.set(t,e),t},$E=function(e,t){FE=t+1,AE.set(e,t),LE.set(t,e)},HE="style[".concat(U_,"][").concat(W_,'="').concat(Y_,'"]'),BE=new RegExp("^".concat(U_,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),VE=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},UE=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(G_),o=[],a=0,i=r.length;a<i;a++){var s=r[a].trim();if(s){var l=s.match(BE);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&($E(c,u),VE(e,c,l[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(s)}}},qE=function(e){for(var t=document.querySelectorAll(HE),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(U_)!==q_&&(UE(e,o),o.parentNode&&o.parentNode.removeChild(o))}};var WE=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(U_,"]")));return t[t.length-1]}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(U_,q_),r.setAttribute(W_,Y_);var i="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},YE=function(){function e(e){this.element=WE(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw ME(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}(),GE=function(){function e(e){this.element=WE(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,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}(),KE=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}(),QE=K_,ZE={isServer:!K_,useCSSOMInjection:!Z_},XE=function(){function e(e,t,n){void 0===e&&(e=J_),void 0===t&&(t={});var r=this;this.options=Du(Du({},ZE),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&K_&&QE&&(QE=!1,qE(this)),DE(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return LE.get(e)}(n);if(void 0===o)return"continue";var a=e.names.get(o),i=t.getGroup(n);if(void 0===a||!a.size||0===i.length)return"continue";var s="".concat(U_,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==a&&a.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),r+="".concat(i).concat(s,'{content:"').concat(l,'"}').concat(G_)},a=0;a<n;a++)o(a);return r}(r)})}return e.registerId=function(e){return zE(e)},e.prototype.rehydrate=function(){!this.server&&K_&&qE(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(Du(Du({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new KE(n):t?new YE(n):new GE(n)}(this.options),new IE(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(zE(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(zE(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(zE(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),JE=/&/g,ej=47;function tj(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,n=0,r=0,o=!1,a=0;a<t;a++){var i=e.charCodeAt(a);if(0!==r||o||i!==ej||42!==e.charCodeAt(a+1))if(o)42===i&&e.charCodeAt(a+1)===ej&&(o=!1,a++);else if(34!==i&&39!==i||0!==a&&92===e.charCodeAt(a-1)){if(0===r)if(123===i)n++;else if(125===i&&--n<0)return!0}else 0===r?r=i:r===i&&(r=0);else o=!0,a++}return 0!==n||0!==r}function nj(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=nj(e.children,t)),e})}var rj=new XE,oj=function(){var e,t,n,r=J_,o=r.options,a=void 0===o?J_:o,i=r.plugins,s=void 0===i?X_:i,l=function(n,r,o){return o.startsWith(t)&&o.endsWith(t)&&o.replaceAll(t,"").length>0?".".concat(e):n},u=s.slice();u.push(function(e){e.type===Xk&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(JE,t).replace(n,l))}),a.prefix&&u.push(V_),u.push(B_);var c=function(r,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),e=s,t=o,n=new RegExp("\\".concat(t,"\\b"),"g");var l=function(e){if(!tj(e))return e;for(var t=e.length,n="",r=0,o=0,a=0,i=!1,s=0;s<t;s++){var l=e.charCodeAt(s);if(0!==a||i||l!==ej||42!==e.charCodeAt(s+1))if(i)42===l&&e.charCodeAt(s+1)===ej&&(i=!1,s++);else if(34!==l&&39!==l||0!==s&&92===e.charCodeAt(s-1)){if(0===a)if(123===l)o++;else if(125===l){if(--o<0){for(var u=s+1;u<t;){var c=e.charCodeAt(u);if(59===c||10===c)break;u++}u<t&&59===e.charCodeAt(u)&&u++,o=0,s=u-1,r=u;continue}0===o&&(n+=e.substring(r,s+1),r=s+1)}else 59===l&&0===o&&(n+=e.substring(r,s+1),r=s+1)}else 0===a?a=l:a===l&&(a=0);else i=!0,s++}if(r<t){var d=e.substring(r);tj(d)||(n+=d)}return n}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,n=[],r=0,o=0,a=0,i=0;o<t;){var s=e.charCodeAt(o);if(34!==s&&39!==s||0!==o&&92===e.charCodeAt(o-1))if(0===a)if(40===s&&o>=3&&108==(32|e.charCodeAt(o-1))&&114==(32|e.charCodeAt(o-2))&&117==(32|e.charCodeAt(o-3)))i=1,o++;else if(i>0)41===s?i--:40===s&&i++,o++;else if(s===ej&&o+1<t&&e.charCodeAt(o+1)===ej){for(o>r&&n.push(e.substring(r,o));o<t&&10!==e.charCodeAt(o);)o++;r=o}else o++;else o++;else 0===a?a=s:a===s&&(a=0),o++}return 0===r?e:(r<t&&n.push(e.substring(r)),n.join(""))}(r)),c=I_(i||o?"".concat(i," ").concat(o," { ").concat(l," }"):l);a.namespace&&(c=nj(c,a.namespace));var d,f=[];return H_(c,function(e){var t=d_(e);return function(n,r,o,a){for(var i="",s=0;s<t;s++)i+=e[s](n,r,o,a)||"";return i}}(u.concat((d=function(e){return f.push(e)},function(e){e.root||(e=e.return)&&d(e)})))),f};return c.hash=s.length?s.reduce(function(e,t){return t.name||ME(15),lE(e,t.name)},5381).toString():"",c}(),aj={shouldForwardProp:void 0,styleSheet:rj,stylis:oj},ij=Q_?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(aj)}}:M.createContext(aj);function sj(){return Q_?aj:M.useContext(ij)}ij.Consumer,Q_||M.createContext(void 0);var lj=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=oj);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,DE(this,function(){throw ME(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=oj),this.name+e.hash},e}();function uj(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in wm||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var cj=function(e){return e>="A"&&e<="Z"};function dj(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;cj(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var fj=function(e){return null==e||!1===e||""===e},pj=function(e){var t=[];for(var n in e){var r=e[n];e.hasOwnProperty(n)&&!fj(r)&&(Array.isArray(r)&&r.isCss||jE(r)?t.push("".concat(dj(n),":"),r,";"):PE(r)?t.push.apply(t,Iu(Iu(["".concat(n," {")],pj(r),!1),["}"],!1)):t.push("".concat(dj(n),": ").concat(uj(n,r),";")))}return t};function hj(e,t,n,r){return fj(e)?[]:NE(e)?[".".concat(e.styledComponentId)]:jE(e)?!jE(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:hj(e(t),t,n,r):e instanceof lj?n?(e.inject(n,r),[e.getName(r)]):[e]:PE(e)?pj(e):Array.isArray(e)?Array.prototype.concat.apply(X_,e.map(function(e){return hj(e,t,n,r)})):[e.toString()];var o}var mj=uE(Y_),gj=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(jE(n)&&!NE(n))return!1}return!0}(e),this.componentId=t,this.baseHash=lE(mj,t),this.baseStyle=n,XE.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n).className:"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=RE(r,this.staticRulesId);else{var o=OE(hj(this.rules,e,t,n)),a=iE(lE(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,a)){var i=n(o,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,i)}r=RE(r,a),this.staticRulesId=a}else{for(var s=lE(this.baseHash,n.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=OE(hj(c,e,t,n));s=lE(s,d+u),l+=d}}if(l){var f=iE(s>>>0);if(!t.hasNameForId(this.componentId,f)){var p=n(l,".".concat(f),void 0,this.componentId);t.insertRules(this.componentId,f,p)}r=RE(r,f)}}return{className:r,css:"undefined"==typeof window?t.getTag().getGroup(zE(this.componentId)):""}},e}(),yj=Q_?{Provider:function(e){return e.children},Consumer:function(e){return(0,e.children)(void 0)}}:M.createContext(void 0);yj.Consumer;var vj={};function bj(e,t,n){var r=NE(e),o=e,a=!dE(e),i=t.attrs,s=void 0===i?X_:i,l=t.componentId,u=void 0===l?function(e,t){var n="string"!=typeof e?"sc":rE(e);vj[n]=(vj[n]||0)+1;var r="".concat(n,"-").concat(cE(Y_+n+vj[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):l,c=t.displayName,d=void 0===c?function(e){return dE(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):c,f=t.displayName&&t.componentId?"".concat(rE(t.displayName),"-").concat(t.componentId):t.componentId||u,p=r&&o.attrs?o.attrs.concat(s).filter(Boolean):s,h=t.shouldForwardProp;if(r&&o.shouldForwardProp){var m=o.shouldForwardProp;if(t.shouldForwardProp){var g=t.shouldForwardProp;h=function(e,t){return m(e,t)&&g(e,t)}}else h=m}var y=new gj(n,f,r?o.componentStyle:void 0);function v(e,t){return function(e,t,n){var r=e.attrs,o=e.componentStyle,a=e.defaultProps,i=e.foldedComponentIds,s=e.styledComponentId,l=e.target,u=Q_?void 0:M.useContext(yj),c=sj(),d=e.shouldForwardProp||c.shouldForwardProp,f=function(e,t,n){return void 0===n&&(n=J_),e.theme!==n.theme&&e.theme||t||n.theme}(t,u,a)||J_,p=function(e,t,n){for(var r,o=Du(Du({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var i=jE(r=e[a])?r(o):r;for(var s in i)"className"===s?o.className=RE(o.className,i[s]):"style"===s?o.style=Du(Du({},o.style),i[s]):o[s]=i[s]}return"className"in t&&"string"==typeof t.className&&(o.className=RE(o.className,t.className)),o}(r,t,f),h=p.as||l,m={};for(var g in p)void 0===p[g]||"$"===g[0]||"as"===g||"theme"===g&&p.theme===f||("forwardedAs"===g?m.as=p.forwardedAs:d&&!d(g,h)||(m[g]=p[g]));var y=function(e,t){var n=sj();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(o,p),v=y.className,b=y.css,w=RE(i,s);v&&(w+=" "+v),p.className&&(w+=" "+p.className),m[dE(h)&&!eE.has(h)?"class":"className"]=w,n&&(m.ref=n);var x=D.createElement(h,m);return Q_&&b?M.createElement(M.Fragment,null,M.createElement("style",{precedence:"styled-components",href:"sc-".concat(s,"-").concat(v),children:b}),x):x}(b,e,t)}v.displayName=d;var b=M.forwardRef(v);return b.attrs=p,b.componentStyle=y,b.displayName=d,b.shouldForwardProp=h,b.foldedComponentIds=r?RE(o.foldedComponentIds,o.styledComponentId):"",b.styledComponentId=f,b.target=r?o.target:e,Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=r?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)TE(e,o[r],!0);return e}({},o.defaultProps,e):e}}),DE(b,function(){return".".concat(b.styledComponentId)}),a&&EE(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),b}function wj(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var xj=function(e){return Object.assign(e,{isCss:!0})};function Cj(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(jE(e)||PE(e))return xj(hj(wj(X_,Iu([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?hj(r):xj(hj(wj(r,t)))}function Sj(e,t,n){if(void 0===n&&(n=J_),!t)throw ME(1,t);var r=function(r){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return e(t,n,Cj.apply(void 0,Iu([r],o,!1)))};return r.attrs=function(r){return Sj(e,t,Du(Du({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return Sj(e,t,Du(Du({},n),r))},r}var kj=function(e){return Sj(bj,e)},_j=kj;function Ej(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=OE(Cj.apply(void 0,Iu([e],t,!1))),o=cE(r);return new lj(o,r)}eE.forEach(function(e){_j[e]=kj(e)});const jj={"aria-busy":!0,role:"progressbar"},Nj=_j.div`
|
|
142
142
|
display: ${e=>e.$visible?"flex":"none"};
|
|
143
143
|
`,Rj=242.776657104492,Oj=Ej`
|
|
144
144
|
12.5% {
|
|
@@ -220,7 +220,7 @@ to {
|
|
|
220
220
|
animation: ${Dj} 2.5s cubic-bezier(0.35, 0.04, 0.63, 0.95) infinite;
|
|
221
221
|
`,_j.svg`
|
|
222
222
|
transform-origin: 50% 65%;
|
|
223
|
-
`;var Fj=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});D.forwardRef((e,t)=>m.jsx(hi.span,{...e,ref:t,style:{...Fj,...e.style}})).displayName="VisuallyHidden";var zj=[" ","Enter","ArrowUp","ArrowDown"],$j=[" ","Enter"],Hj="Select",[Bj,Vj,Uj]=gi(Hj),[qj]=ai(Hj,[Uj,zl]),Wj=zl(),[Yj,Gj]=qj(Hj),[Kj,Qj]=qj(Hj),Zj=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:h}=e,g=Wj(t),[y,v]=D.useState(null),[b,w]=D.useState(null),[x,C]=D.useState(!1),S=vi(u),[k,_]=ui({prop:r,defaultProp:o??!1,onChange:a,caller:Hj}),[E,j]=ui({prop:i,defaultProp:s,onChange:l,caller:Hj}),N=D.useRef(null),R=!y||(h||!!y.closest("form")),[O,P]=D.useState(new Set),T=Array.from(O).map(e=>e.props.value).join(";");return m.jsx(tu,{...g,children:m.jsxs(Yj,{required:p,scope:t,trigger:y,onTriggerChange:v,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:x,onValueNodeHasChildrenChange:C,contentId:Ui(),value:E,onValueChange:j,open:k,onOpenChange:_,dir:S,triggerPointerDownPosRef:N,disabled:f,children:[m.jsx(Bj.Provider,{scope:t,children:m.jsx(Kj,{scope:e.__scopeSelect,onNativeOptionAdd:D.useCallback(e=>{P(t=>new Set(t).add(e))},[]),onNativeOptionRemove:D.useCallback(e=>{P(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:n})}),R?m.jsxs(LN,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:E,onChange:e=>j(e.target.value),disabled:f,form:h,children:[void 0===E?m.jsx("option",{value:""}):null,Array.from(O)]},T):null]})})};Zj.displayName=Hj;var Xj="SelectTrigger",Jj=D.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Wj(n),i=Gj(Xj,n),s=i.disabled||r,l=oi(t,i.onTriggerChange),u=Vj(n),c=D.useRef("touch"),[d,f,p]=zN(e=>{const t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===i.value),r=$N(t,e,n);void 0!==r&&i.onValueChange(r.value)}),h=e=>{s||(i.onOpenChange(!0),p()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return m.jsx(nu,{asChild:!0,...a,children:m.jsx(hi.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":FN(i.value)?"":void 0,...o,ref:l,onClick:ti(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==c.current&&h(e)}),onPointerDown:ti(o.onPointerDown,e=>{c.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())}),onKeyDown:ti(o.onKeyDown,e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||zj.includes(e.key)&&(h(),e.preventDefault())})})})});Jj.displayName=Xj;var eN="SelectValue",tN=D.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,l=Gj(eN,n),{onValueNodeHasChildrenChange:u}=l,c=void 0!==a,d=oi(t,l.onValueNodeChange);return si(()=>{u(c)},[u,c]),m.jsx(hi.span,{...s,ref:d,style:{pointerEvents:"none"},children:FN(l.value)?m.jsx(m.Fragment,{children:i}):a})});tN.displayName=eN;var nN=D.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(hi.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nN.displayName="SelectIcon";var rN=e=>m.jsx(au,{asChild:!0,...e});rN.displayName="SelectPortal";var oN="SelectContent",aN=D.forwardRef((e,t)=>{const n=Gj(oN,e.__scopeSelect),[r,o]=D.useState();if(si(()=>{o(new DocumentFragment)},[]),!n.open){const t=r;return t?sr.createPortal(m.jsx(sN,{scope:e.__scopeSelect,children:m.jsx(Bj.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),t):null}return m.jsx(cN,{...e,ref:t})});aN.displayName=oN;var iN=10,[sN,lN]=qj(oN),uN=ci("SelectContent.RemoveScroll"),cN=D.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:y,...v}=e,b=Gj(oN,n),[w,x]=D.useState(null),[C,S]=D.useState(null),k=oi(t,e=>x(e)),[_,E]=D.useState(null),[j,N]=D.useState(null),R=Vj(n),[O,P]=D.useState(!1),T=D.useRef(!1);D.useEffect(()=>{if(w)return Tu(w)},[w]),Oi();const M=D.useCallback(e=>{const[t,...n]=R().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==o)return}},[R,C]),I=D.useCallback(()=>M([_,w]),[M,_,w]);D.useEffect(()=>{O&&I()},[O,I]);const{onOpenChange:A,triggerPointerDownPosRef:L}=b;D.useEffect(()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),L.current=null};return null!==L.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[w,A,L]),D.useEffect(()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[A]);const[F,z]=zN(e=>{const t=R().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=$N(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),$=D.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&(E(e),r&&(T.current=!0))},[b.value]),H=D.useCallback(()=>w?.focus(),[w]),B=D.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&N(e)},[b.value]),V="popper"===r?fN:dN,U=V===fN?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:y}:{};return m.jsx(sN,{scope:n,content:w,viewport:C,onViewportChange:S,itemRefCallback:$,selectedItem:_,onItemLeave:H,itemTextRefCallback:B,focusSelectedItem:I,selectedItemText:j,position:r,isPositioned:O,searchRef:F,children:m.jsx(wc,{as:uN,allowPinchZoom:!0,children:m.jsx(Ii,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ti(o,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:m.jsx(_i,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:m.jsx(V,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...v,...U,onPlaced:()=>P(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ti(v.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=R().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});cN.displayName="SelectContentImpl";var dN=D.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Gj(oN,n),i=lN(oN,n),[s,l]=D.useState(null),[u,c]=D.useState(null),d=oi(t,e=>c(e)),f=Vj(n),p=D.useRef(!1),h=D.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:v,focusSelectedItem:b}=i,w=D.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&y&&v){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,l=e.width+i,u=Math.max(l,t.width),c=window.innerWidth-iN,d=Aj(a,[iN,Math.max(iN,c-u)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,l=e.width+i,u=Math.max(l,t.width),c=window.innerWidth-iN,d=Aj(a,[iN,Math.max(iN,c-u)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=f(),l=window.innerHeight-2*iN,c=g.scrollHeight,d=window.getComputedStyle(u),h=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+m+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*y.offsetHeight,w),C=window.getComputedStyle(g),S=parseInt(C.paddingTop,10),k=parseInt(C.paddingBottom,10),_=e.top+e.height/2-iN,E=l-_,j=y.offsetHeight/2,N=h+m+(y.offsetTop+j),R=w-N;if(N<=_){const e=i.length>0&&y===i[i.length-1].ref.current;s.style.bottom="0px";const t=u.clientHeight-g.offsetTop-g.offsetHeight,n=N+Math.max(E,j+(e?k:0)+t+b);s.style.height=n+"px"}else{const e=i.length>0&&y===i[0].ref.current;s.style.top="0px";const t=Math.max(_,h+g.offsetTop+(e?S:0)+j)+R;s.style.height=t+"px",g.scrollTop=N-_+g.offsetTop}s.style.margin=`${iN}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,g,y,v,a.dir,r]);si(()=>w(),[w]);const[x,C]=D.useState();si(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const S=D.useCallback(e=>{e&&!0===h.current&&(w(),b?.(),h.current=!1)},[w,b]);return m.jsx(pN,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:m.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:m.jsx(hi.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});dN.displayName="SelectItemAlignedPosition";var fN=D.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=iN,...a}=e,i=Wj(n);return m.jsx(ru,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});fN.displayName="SelectPopperPosition";var[pN,hN]=qj(oN,{}),mN="SelectViewport",gN=D.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=lN(mN,n),i=hN(mN,n),s=oi(t,a.onViewportChange),l=D.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),m.jsx(Bj.Slot,{scope:n,children:m.jsx(hi.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ti(o.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(r?.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*iN,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});gN.displayName=mN;var yN="SelectGroup",[vN,bN]=qj(yN);D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ui();return m.jsx(vN,{scope:n,id:o,children:m.jsx(hi.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=yN;var wN="SelectLabel",xN=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=bN(wN,n);return m.jsx(hi.div,{id:o.id,...r,ref:t})});xN.displayName=wN;var CN="SelectItem",[SN,kN]=qj(CN),_N=D.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Gj(CN,n),l=lN(CN,n),u=s.value===r,[c,d]=D.useState(a??""),[f,p]=D.useState(!1),h=oi(t,e=>l.itemRefCallback?.(e,r,o)),g=Ui(),y=D.useRef("touch"),v=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(SN,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:D.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:m.jsx(Bj.ItemSlot,{scope:n,value:r,disabled:o,textValue:c,children:m.jsx(hi.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:h,onFocus:ti(i.onFocus,()=>p(!0)),onBlur:ti(i.onBlur,()=>p(!1)),onClick:ti(i.onClick,()=>{"mouse"!==y.current&&v()}),onPointerUp:ti(i.onPointerUp,()=>{"mouse"===y.current&&v()}),onPointerDown:ti(i.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:ti(i.onPointerMove,e=>{y.current=e.pointerType,o?l.onItemLeave?.():"mouse"===y.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ti(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:ti(i.onKeyDown,e=>{""!==l.searchRef?.current&&" "===e.key||($j.includes(e.key)&&v()," "===e.key&&e.preventDefault())})})})})});_N.displayName=CN;var EN="SelectItemText",jN=D.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Gj(EN,n),s=lN(EN,n),l=kN(EN,n),u=Qj(EN,n),[c,d]=D.useState(null),f=oi(t,e=>d(e),l.onItemTextChange,e=>s.itemTextRefCallback?.(e,l.value,l.disabled)),p=c?.textContent,h=D.useMemo(()=>m.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=u;return si(()=>(g(h),()=>y(h)),[g,y,h]),m.jsxs(m.Fragment,{children:[m.jsx(hi.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?sr.createPortal(a.children,i.valueNode):null]})});jN.displayName=EN;var NN="SelectItemIndicator",RN=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kN(NN,n).isSelected?m.jsx(hi.span,{"aria-hidden":!0,...r,ref:t}):null});RN.displayName=NN;var ON="SelectScrollUpButton",PN=D.forwardRef((e,t)=>{const n=lN(ON,e.__scopeSelect),r=hN(ON,e.__scopeSelect),[o,a]=D.useState(!1),i=oi(t,r.onScrollButtonChange);return si(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?m.jsx(MN,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});PN.displayName=ON;var TN="SelectScrollDownButton",DN=D.forwardRef((e,t)=>{const n=lN(TN,e.__scopeSelect),r=hN(TN,e.__scopeSelect),[o,a]=D.useState(!1),i=oi(t,r.onScrollButtonChange);return si(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?m.jsx(MN,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});DN.displayName=TN;var MN=D.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=lN("SelectScrollButton",n),i=D.useRef(null),s=Vj(n),l=D.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return D.useEffect(()=>()=>l(),[l]),si(()=>{const e=s().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[s]),m.jsx(hi.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ti(o.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:ti(o.onPointerMove,()=>{a.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:ti(o.onPointerLeave,()=>{l()})})}),IN=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(hi.div,{"aria-hidden":!0,...r,ref:t})});IN.displayName="SelectSeparator";var AN="SelectArrow";D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wj(n),a=Gj(AN,n),i=lN(AN,n);return a.open&&"popper"===i.position?m.jsx(ou,{...o,...r,ref:t}):null}).displayName=AN;var LN=D.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=D.useRef(null),a=oi(r,o),i=Lj(t);return D.useEffect(()=>{const e=o.current;if(!e)return;const n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value").set;if(i!==t&&r){const n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[i,t]),m.jsx(hi.select,{...n,style:{...Fj,...n.style},ref:a,defaultValue:t})});function FN(e){return""===e||void 0===e}function zN(e){const t=bi(e),n=D.useRef(""),r=D.useRef(0),o=D.useCallback(e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=D.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function $N(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,a=n?e.indexOf(n):-1;let i=(s=e,l=Math.max(a,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===o.length&&(i=i.filter(e=>e!==n));const u=i.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}LN.displayName="SelectBubbleInput";var HN=Jj,BN=nN,VN=rN,UN=aN,qN=gN,WN=xN,YN=_N,GN=jN,KN=RN,QN=PN,ZN=DN,XN=IN;const JN=Zj,eR=tN,tR=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(HN,{ref:r,className:Ya("flex h-10 w-full items-center hover:border-[#BFD7FE] justify-between rounded-md border focus:border-primary border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 ",e),...n,children:[t,m.jsx(BN,{asChild:!0,children:m.jsx(jf,{className:"h-4 w-4 opacity-50"})})]}));tR.displayName=HN.displayName;const nR=D.forwardRef(({className:e,...t},n)=>m.jsx(QN,{ref:n,className:Ya("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Rf,{className:"h-4 w-4"})}));nR.displayName=QN.displayName;const rR=D.forwardRef(({className:e,...t},n)=>m.jsx(ZN,{ref:n,className:Ya("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(jf,{className:"h-4 w-4"})}));rR.displayName=ZN.displayName;const oR=D.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>{const{portalRef:a}=Pr();return m.jsx(VN,{container:a.current,children:m.jsxs(UN,{ref:o,className:Ya("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[m.jsx(nR,{}),m.jsx(qN,{className:Ya("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),m.jsx(rR,{})]})})});oR.displayName=UN.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(WN,{ref:n,className:Ya("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})).displayName=WN.displayName;const aR=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(YN,{ref:r,className:Ya("relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-primary/20 cursor-pointer focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",e),...n,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(KN,{children:m.jsx(Ef,{className:"h-4 w-4"})})}),m.jsx(GN,{children:t})]}));aR.displayName=YN.displayName;function iR({label:e,addonLabel:t,type:n,placeholder:r,selectPlaceholder:o,error:a,success:i,value:s,defaultValue:l,name:u,id:c,formik:d,onChange:f,inputRef:p,onBlur:h,required:g,disabled:y,loading:v,showError:b,selectOptions:w,disableSearch:x,searchSelectPlaceholder:C,showSelectSearch:S,onSelectValueChange:k,selectValue:_,showOutline:E=!0,cols:j,rows:N,labelClass:R,addonLabelClass:O,optional:P,info:T,addonInfo:M,icon:I,actionIcon:A,actionLabel:L,actionLabelInfo:F,actionLabelAction:z,className:$,textAreaOnChange:H,addOn:B,infoAlignment:V,addonInfoAlignment:U,inputContainerClass:q,showNegative:W,showPositive:Y,...G}){const[K,Q]=D.useState(n),[Z,X]=D.useState(!1),[J,ee]=D.useState(""),te=((e,t)=>{const n=e?.filter(e=>"string"==typeof e.label?e.label?.toLowerCase().includes(t.toLowerCase()):e.value?.toLowerCase().includes(t.toLowerCase())||e?.searchId?.toLowerCase().includes(t.toLowerCase()));return t?n:e})(w??[],J);return m.jsx(m.Fragment,{children:v?m.jsx(ei,{className:"w-full h-12"}):m.jsx("div",{className:"w-full",children:m.jsxs("div",{className:`flex flex-col ${e&&"gap-2.5"} relative `,children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[t&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",O),children:[t," ",g?m.jsx("span",{className:"text-[#E12D39]",children:t&&"*"}):P?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,M&&m.jsx(kb,{fieldName:t,align:U,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:M})})]}),e&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",R),children:[e," ",g?m.jsx("span",{className:"text-[#E12D39]",children:e&&"*"}):P?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,T&&m.jsx(kb,{fieldName:e,align:V,children:m.jsx("p",{className:"font-normal first-letter:uppercase w-full whitespace-pre-wrap",children:T})})]}),L&&m.jsxs("button",{onClick:z,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-bold",children:[A,L,F&&m.jsx(kb,{fieldName:e,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:F})})]})]}),m.jsxs("div",{className:Ya(`border overflow-hidden rounded-md text-sm border-[#E1E3EA] hover:border-primary_light font-normal text-grey-950 flex gap-2 items-center bg-white px-3 ${"text-area"!==n&&"h-12"} ${(a||b)&&"!border-danger"} ${i&&"!border-success"} ${Z&&E&&"!border-primary"}\n ${I&&"px-2"}\n ${B&&"px-0"}\n `,y?"cursor-not-allowed bg-gray-200":null,w?"px-0":null,q),children:[B&&m.jsx("span",{className:"bg-gray-200 text-[13px] font-semibold text-gray-700 h-full min-w-[38px] flex items-center justify-center shrink-0 rounded-l-md px-2 ",children:B}),I,w&&m.jsxs(JN,{onValueChange:k,defaultValue:_,value:_,children:[m.jsx(tR,{disabled:x,className:" min-w-max w-max h-full border-0 border-r rounded-none hover:border-neutral-200 focus:border-neutral-200 bg-[#F9F9F9] hover:border-b-neutral-200 disabled:opacity-100 ",children:m.jsx(eR,{className:" text-sm text-[#5E6278] placeholder:font-medium outline-none",placeholder:o})}),m.jsxs(oR,{className:"bg-white w-full relative",children:[S&&m.jsx("input",{value:J,onChange:e=>{ee(e.target.value.toString())},placeholder:C??"Search...",className:"h-10 border mb-2 text-sm px-4 outline-none w-full border-neutral-200 rounded bg-white sticky top-0 z-20"}),te?.map((e,t)=>m.jsx(aR,{className:"text-sm",value:e.value,children:e.label},e.value))]})]}),"text-area"===n?m.jsx("textarea",{cols:j,rows:N,onFocus:()=>X(!0),onBlur:e=>{X(!1)},placeholder:r,className:Ya(`placeholder:text-[#7E8299] hover:border-primary_light py-2 h-full placeholder:font-medium outline-none w-full rounded ${y?"bg-[#EEEFF2] cursor-not-allowed":null} ${Z&&E&&"!border-primary"} transition-all ease-in-out`,$),...G,value:s,name:u,onChange:H}):m.jsx("input",{onInput:e=>{const t=e.target;"number"===n&&(t.value=t.value.replace(/[^0-9.]/g,""),t.value=t.value.replace(/^\.|(\..*)\./g,"$1"),t.value.length>1&&t.value.startsWith("0")&&"."!==t.value[1]&&(t.value=t.value.replace(/^0+/,"")),""!==t.value&&"0"!==t.value||(t.value="0"))},type:"number"===K?"text":K,placeholder:r,className:Ya("placeholder:text-[#7E8299] h-full placeholder:font-medium outline-none w-full rounded disabled:cursor-not-allowed",w&&"number"===n?"pr-2":null,I||B?"pr-0":null,w&&"number"===n&&t&&"text-right pr-2",$,Y&&"0"!==s?.toString().trim()?"text-green-600 font-semibold":"",W&&s?.toString().trim().startsWith("-")?"text-red-600 font-semibold":""),onFocus:()=>X(!0),onBlur:e=>{d&&h&&d&&h(e),X(!1)},value:s||"",defaultValue:l,onChange:f,id:c,name:u,required:g,disabled:y,ref:p,...G}),"password"===n&&m.jsx("span",{className:"cursor-pointer",onClick:()=>{Q(e=>"password"===e?"text":"password")},children:"password"===K?Kv.eyeslash:Kv.eye})]}),a&&m.jsx("p",{className:"text-danger text-xs font-normal",children:a})]})})})}function sR({value:e,label:t,placeholder:n,uuid:r,name:o,displayValue:a,valueType:i,item_unit:s}){const{mutate:l,isPending:u}=Gx();J();const[c,d]=D.useState(!1),[f,p]=D.useState({item_uuid:r,[o]:e});tr();const[h,g]=D.useState("");return m.jsxs(Ak,{open:c,onOpenChange:d,children:[m.jsx(Lk,{className:"flex items-center",children:m.jsx("button",{className:"hover:text-primary duration-150 underline disabled:no-underline disabled:hover:text-inherit",children:h?"selling_price"===o?Jv(+h):eb(+h)+s:a})}),m.jsxs(Fk,{align:"center",className:"shadow-[0_1px_2px_0px_#E4E5E73D,_0_12px_24px_0_#868C981F] space-y-2 bg-white rounded-xl p-3 w-[280px] relative before:absolute before:w-3 before:h-1.5 before:bg-white before:left-1/2 before:-translate-x-1/2 before:rotate-45 data-[side=bottom]:before:top-0 data-[side=top]:before:bottom-0",children:[m.jsx(iR,{type:i,value:f[o],label:t,placeholder:n,onChange:e=>{p(t=>({...t,[o]:e.target.value}))}}),m.jsxs("div",{className:"flex justify-end gap-2.5",children:[m.jsx(Tk,{children:m.jsx(Mj,{label:"Dismiss",className:"bg-gray-300 text-dark text-sm hover:bg-gray-300/90 font-medium",disabled:u})}),m.jsx(Mj,{label:"Update",className:"text-sm font-medium",onClick:()=>{l({url:"/items/update_basic",payload:f},{onSuccess:()=>{g(f[o]),d(!1)},onError:()=>{g("")}})},loading:u})]})]})]})}D.forwardRef(({className:e,...t},n)=>m.jsx(XN,{ref:n,className:Ya("-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800",e),...t})).displayName=XN.displayName;var lR="Tabs",[uR]=ai(lR,[mu]),cR=mu(),[dR,fR]=uR(lR),pR=D.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=vi(s),[d,f]=ui({prop:r,onChange:o,defaultProp:a??"",caller:lR});return m.jsx(dR,{scope:n,baseId:Ui(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:m.jsx(hi.div,{dir:c,"data-orientation":i,...u,ref:t})})});pR.displayName=lR;var hR="TabsList",mR=D.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=fR(hR,n),i=cR(n);return m.jsx(ku,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:m.jsx(hi.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});mR.displayName=hR;var gR="TabsTrigger",yR=D.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=fR(gR,n),s=cR(n),l=wR(i.baseId,r),u=xR(i.baseId,r),c=r===i.value;return m.jsx(_u,{asChild:!0,...s,focusable:!o,active:c,children:m.jsx(hi.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:ti(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)}),onKeyDown:ti(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)}),onFocus:ti(e.onFocus,()=>{const e="manual"!==i.activationMode;c||o||!e||i.onValueChange(r)})})})});yR.displayName=gR;var vR="TabsContent",bR=D.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=fR(vR,n),l=wR(s.baseId,r),u=xR(s.baseId,r),c=r===s.value,d=D.useRef(c);return D.useEffect(()=>{const e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),m.jsx(iu,{present:o||c,children:({present:n})=>m.jsx(hi.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:n&&a})})});function wR(e,t){return`${e}-trigger-${t}`}function xR(e,t){return`${e}-content-${t}`}bR.displayName=vR;var CR=mR,SR=yR,kR=bR;const _R=pR,ER=D.forwardRef(({className:e,...t},n)=>m.jsx(CR,{ref:n,className:Ya("inline-flex h-10 items-center justify-center rounded-md bg-neutral-100 p-1 text-neutral-500 dark:bg-neutral-800 dark:text-neutral-400",e),...t}));ER.displayName=CR.displayName;const jR=D.forwardRef(({className:e,...t},n)=>m.jsx(SR,{ref:n,className:Ya("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-neutral-950 data-[state=active]:shadow-sm dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300 dark:data-[state=active]:bg-neutral-950 dark:data-[state=active]:text-neutral-50",e),...t}));jR.displayName=SR.displayName;const NR=D.forwardRef(({className:e,...t},n)=>m.jsx(kR,{ref:n,className:Ya("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-offset-2 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300",e),...t}));NR.displayName=kR.displayName;var RR,OR={};function PR(){if(RR)return OR;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}RR=1,Object.defineProperty(OR,"__esModule",{value:!0}),OR.Collapse=void 0;var t,n=(t=f())&&t.__esModule?t:{default:t};function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function a(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,o=s(t);if(n){var a=s(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return i(t)}(this,r)}}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,e);var t=a(s);function s(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),l(i(n=t.call(this,e)),"timeout",void 0),l(i(n),"container",void 0),l(i(n),"content",void 0),l(i(n),"onResize",function(){if(clearTimeout(n.timeout),n.container&&n.content){var e=n.props,t=e.isOpened,r=e.checkTimeout,o=Math.floor(n.container.clientHeight),a=Math.floor(n.content.clientHeight),i=t&&Math.abs(a-o)<=1,s=!t&&Math.abs(o)<=1;i||s?n.onRest({isFullyOpened:i,isFullyClosed:s,isOpened:t,containerHeight:o,contentHeight:a}):(n.onWork({isFullyOpened:i,isFullyClosed:s,isOpened:t,containerHeight:o,contentHeight:a}),n.timeout=setTimeout(function(){return n.onResize()},r))}}),l(i(n),"onRest",function(e){var t=e.isFullyOpened,r=e.isFullyClosed,o=e.isOpened,a=e.containerHeight,i=e.contentHeight;if(n.container&&n.content){var s=o&&n.container.style.height==="".concat(i,"px"),l=!o&&"0px"===n.container.style.height;if(s||l){n.container.style.overflow=o?"initial":"hidden",n.container.style.height=o?"auto":"0px";var u=n.props.onRest;u&&u({isFullyOpened:t,isFullyClosed:r,isOpened:o,containerHeight:a,contentHeight:i})}}}),l(i(n),"onWork",function(e){var t=e.isFullyOpened,r=e.isFullyClosed,o=e.isOpened,a=e.containerHeight,i=e.contentHeight;if(n.container&&n.content){var s=o&&n.container.style.height==="".concat(i,"px"),l=!o&&"0px"===n.container.style.height;if(!s&&!l){n.container.style.overflow="hidden",n.container.style.height=o?"".concat(i,"px"):"0px";var u=n.props.onWork;u&&u({isFullyOpened:t,isFullyClosed:r,isOpened:o,containerHeight:a,contentHeight:i})}}}),l(i(n),"onRefContainer",function(e){n.container=e}),l(i(n),"onRefContent",function(e){n.content=e}),e.initialStyle?n.initialStyle=e.initialStyle:n.initialStyle=e.isOpened?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"},n}return r(s,[{key:"componentDidMount",value:function(){this.onResize()}},{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.theme,r=t.isOpened;return t.children!==e.children||r!==e.isOpened||Object.keys(n).some(function(t){return n[t]!==e.theme[t]})}},{key:"getSnapshotBeforeUpdate",value:function(){if(!this.container||!this.content)return null;if("auto"===this.container.style.height){var e=this.content.clientHeight;this.container.style.height="".concat(e,"px")}return null}},{key:"componentDidUpdate",value:function(){this.onResize()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"render",value:function(){var e=this.props,t=e.theme,r=e.children,o=e.isOpened;return n.default.createElement("div",{ref:this.onRefContainer,className:t.collapse,style:this.initialStyle,"aria-hidden":!o},n.default.createElement("div",{ref:this.onRefContent,className:t.content},r))}}]),s}(n.default.Component);return OR.Collapse=u,l(u,"defaultProps",{theme:{collapse:"ReactCollapse--collapse",content:"ReactCollapse--content"},initialStyle:void 0,onRest:void 0,onWork:void 0,checkTimeout:50}),OR}var TR,DR,MR,IR={};function AR(){if(TR)return IR;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}TR=1,Object.defineProperty(IR,"__esModule",{value:!0}),IR.UnmountClosed=void 0;var t,n=(t=f())&&t.__esModule?t:{default:t},r=PR(),o=["isOpened"],a=["isOpened"];function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,o=m(t);if(n){var a=m(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}(this,r)}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t=p(s);function s(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),g(h(n=t.call(this,e)),"onWork",function(e){var t=e.isOpened,r=u(e,o);n.setState({isResting:!1,isOpened:t});var a=n.props.onWork;a&&a(l({isOpened:t},r))}),g(h(n),"onRest",function(e){var t=e.isOpened,r=u(e,a);n.setState({isResting:!0,isOpened:t,isInitialRender:!1});var o=n.props.onRest;o&&o(l({isOpened:t},r))}),g(h(n),"getInitialStyle",function(){var e=n.state,t=e.isOpened;return e.isInitialRender&&t?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"}}),n.state={isResting:!0,isOpened:e.isOpened,isInitialRender:!0},n}return c(s,[{key:"componentDidUpdate",value:function(e){var t=this.props.isOpened;e.isOpened!==t&&this.setState({isResting:!1,isOpened:t,isInitialRender:!1})}},{key:"render",value:function(){var e=this.state,t=e.isResting,o=e.isOpened;return t&&!o?null:n.default.createElement(r.Collapse,i({},this.props,{initialStyle:this.getInitialStyle(),onWork:this.onWork,onRest:this.onRest}))}}]),s}(n.default.PureComponent);return IR.UnmountClosed=y,g(y,"defaultProps",{onWork:void 0,onRest:void 0}),IR}var LR=function(){if(MR)return DR;MR=1;var e=PR().Collapse,t=AR().UnmountClosed;return DR=t,t.Collapse=e,t.UnmountClosed=t,DR}(),FR="Switch",[zR]=ai(FR),[$R,HR]=zR(FR),BR=D.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,p]=D.useState(null),h=oi(t,e=>p(e)),g=D.useRef(!1),y=!f||(c||!!f.closest("form")),[v,b]=ui({prop:o,defaultProp:a??!1,onChange:u,caller:FR});return m.jsxs($R,{scope:n,checked:v,disabled:s,children:[m.jsx(hi.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":WR(v),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onClick:ti(e.onClick,e=>{b(e=>!e),y&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})}),y&&m.jsx(qR,{control:f,bubbles:!g.current,name:r,value:l,checked:v,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});BR.displayName=FR;var VR="SwitchThumb",UR=D.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=HR(VR,n);return m.jsx(hi.span,{"data-state":WR(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});UR.displayName=VR;var qR=D.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=D.useRef(null),s=oi(i,a),l=Lj(n),u=Al(t);return D.useEffect(()=>{const e=i.current;if(!e)return;const t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}},[l,n,r]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function WR(e){return e?"checked":"unchecked"}qR.displayName="SwitchBubbleInput";var YR=BR,GR=UR;const KR=D.forwardRef(({className:e,loading:t,...n},r)=>m.jsx(m.Fragment,{children:t?m.jsx(ei,{className:"w-11 h-6"}):m.jsx(YR,{className:Ya("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-neutral-200 dark:focus-visible:ring-neutral-300 dark:focus-visible:ring-offset-neutral-950 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=unchecked]:bg-neutral-800",e),...n,ref:r,children:m.jsx(GR,{className:Ya("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-neutral-950")})})}));function QR({children:e,sessionName:t,info:n,className:r,defaultOpen:o=!1}){const[a,i]=D.useState(o);return D.useEffect(()=>{i(o)},[o]),m.jsxs("div",{className:Ya("flex flex-col duration-300 ",a?"gap-5":"gap-0"),children:[m.jsxs("div",{className:"flex gap-2.5 items-center",children:[m.jsxs("h1",{className:Ya("text-dark font-medium text-sm flex gap-1 items-center first-letter:uppercase",r),children:[t,m.jsx(kb,{fieldName:t,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:n})})]}),m.jsx(KR,{checked:a,onClick:()=>i(!a)})]}),m.jsx(LR.Collapse,{isOpened:a,className:"pt-5",children:e})]})}function ZR(){const e=J(),{itemStoreData:t,editMode:n,fetchingItem:r,canBeDeletedFields:o}=ne(e=>e.items),[a,i]=D.useState(t.barcode??[""]);M.useEffect(()=>{n&&i(o?.barcode?.map(e=>e.barcode)??[])},[r]);const[s,l]=D.useState([]);D.useEffect(()=>{n&&e(Wt({field:"deletedBarcode",value:s}))},[s]);return D.useEffect(()=>{(1!==a.length||""!==a[0])&&e(Wt({field:"barcode",value:a}))},[a]),m.jsx(QR,{sessionName:"Barcode & SKU",info:"Enter the unique barcode or SKU (Stock Keeping Unit) for this item. This helps in tracking inventory, facilitating faster checkouts, and managing stock more efficiently.",defaultOpen:n&&a.length>=0&&""!==a[0]||n&&""!==t.sku,children:m.jsxs("div",{className:" grid grid-cols-2 gap-5",children:[m.jsxs("div",{className:"space-y-4",children:[a.map((e,t)=>m.jsxs("div",{className:"flex items-end gap-2.5",children:[m.jsx(iR,{type:"text",label:"Barcode",info:"Scan or manually enter the item's barcode. This allows for quick identification and tracking of the item during sales and inventory management.",placeholder:"Type barcode",value:e,onChange:e=>((e,t)=>{const n=[...a];n[e]=t,i(n)})(t,e.target.value)}),m.jsx("button",{className:" py-3",onClick:()=>(e=>{const t=a.filter((t,n)=>e!==n),n=a.filter((t,n)=>e===n),r=o?.barcode?.filter(e=>n.includes(e.barcode))||[];i(t),l([...s,...r.map(e=>e.id)])})(t),children:Kv.trash2})]},t)),m.jsx(Mj,{mode:"text",label:"Add another barcode",left_addon:Kv.plus_squared2,onClick:()=>{i(e=>[...e,""])},className:"font-medium text-sm"})]}),m.jsx(iR,{type:"text",label:"SKU",info:"Enter the unique Stock Keeping Unit (SKU) for this item. This code helps in identifying and tracking the item within your inventory system.",value:t.sku,placeholder:"Add SKU",onChange:t=>e(Wt({field:"sku",value:t.target.value}))})]})})}function XR(e,t){return e===t}function JR(e,t,n){var r=XR,o=D.useRef(e),a=D.useState({})[1],i=function(e,t,n,r){var o=this,a=D.useRef(null),i=D.useRef(0),s=D.useRef(0),l=D.useRef(null),u=D.useRef([]),c=D.useRef(),d=D.useRef(),f=D.useRef(e),p=D.useRef(!0),h=D.useRef(),m=D.useRef();f.current=e;var g="undefined"!=typeof window,y=!t&&0!==t&&g;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var v=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,w=!!n.flushOnExit&&b,x="maxWait"in n,C="debounceOnServer"in n&&!!n.debounceOnServer,S=x?Math.max(+n.maxWait||0,t):null,k=D.useMemo(function(){var e=function(e){var t=u.current,n=c.current;return u.current=c.current=null,i.current=e,s.current=s.current||e,d.current=f.current.apply(n,t)},n=function(e,t){y&&cancelAnimationFrame(l.current),l.current=y?requestAnimationFrame(e):setTimeout(e,t)},k=function(e){if(!p.current)return!1;var n=e-a.current;return!a.current||n>=t||n<0||x&&e-i.current>=S},_=function(t){return l.current=null,b&&u.current?e(t):(u.current=c.current=null,d.current)},E=function e(){var r=Date.now();if(v&&s.current===i.current&&j(),k(r))return _(r);if(p.current){var o=t-(r-a.current),l=x?Math.min(o,S-(r-i.current)):o;n(e,l)}},j=function(){r&&r({})},N=function(){if(g||C){var r,s=Date.now(),f=k(s);if(u.current=[].slice.call(arguments),c.current=o,a.current=s,w&&!h.current&&(h.current=function(){var e;"hidden"===(null==(e=global.document)?void 0:e.visibilityState)&&m.current.flush()},null==(r=global.document)||null==r.addEventListener||r.addEventListener("visibilitychange",h.current)),f){if(!l.current&&p.current)return i.current=a.current,n(E,t),v?e(a.current):d.current;if(x)return n(E,t),e(a.current)}return l.current||n(E,t),d.current}};return N.cancel=function(){var e=l.current;e&&(y?cancelAnimationFrame(l.current):clearTimeout(l.current)),i.current=0,u.current=a.current=c.current=l.current=null,e&&r&&r({})},N.isPending=function(){return!!l.current},N.flush=function(){return l.current?_(Date.now()):d.current},N},[v,x,t,S,b,w,y,g,C,r]);return m.current=k,D.useEffect(function(){return p.current=!0,function(){var e;w&&m.current.flush(),h.current&&(null==(e=global.document)||null==e.removeEventListener||e.removeEventListener("visibilitychange",h.current),h.current=null),p.current=!1}},[w]),k}(D.useCallback(function(e){o.current=e,a({})},[a]),t,n,a),s=D.useRef(e);return r(s.current,e)||(i(e),s.current=e),[o.current,i]}function eO({handleInputChange:e}){const t=(e,t)=>{if(!t)return e;const n=new RegExp(`(${t})`,"gi");return e.split(n).map((e,n)=>e.toLowerCase()===t.toLowerCase()?m.jsx("span",{className:"text-orange",children:e},n):e)},{itemStoreData:n,editMode:r,fetchingItem:o}=ne(e=>e.items),[a,i]=D.useState(""),[s]=JR(a,1e3),[l,u]=D.useState(!1),[c,d]=D.useState(!1),f=D.useRef(null),{data:p,isFetching:h}=Yx(["search_item_names",s],`/inventory/item/search/business/${a}`,{enabled:s.length>=2}),g=h,y=p?.data.data,v=e=>{f.current&&!f.current.contains(e.target)&&u(!1)};return D.useEffect(()=>(document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}),[]),m.jsxs("div",{className:"relative",ref:f,children:[m.jsx(iR,{type:"text",required:!0,placeholder:"e.g cocacola",info:"Enter the name of the item as it will appear in inventory, sales, and reports. Make it clear and recognizable.",label:"Item name",labelClass:"text-dark font-bold",name:"name",value:n.name,onChange:t=>{e("name",t.target.value),i(t.target.value),u(!0)},loading:o,onFocus:()=>u(!0)}),l&&a.length>=2&&m.jsx("div",{className:"absolute left-0 right-0 shadow-2xl p-5 rounded-md bg-white flex flex-col gap-2 overflow-auto max-h-[calc(100vh-200px)] z-20",children:g?[1,2,3].map((e,t)=>m.jsxs("div",{className:"flex justify-between border-b py-3 px-2",children:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx(ei,{className:"w-11 h-11 rounded-2xl"}),m.jsxs("div",{className:"space-y-1 max-w-[265px]",children:[m.jsx(ei,{className:"w-[250px] h-5 rounded-md"}),m.jsx(ei,{className:"w-[200px] h-5 rounded-md"})]})]}),m.jsxs("div",{className:"gap-1 flex flex-col items-end",children:[m.jsx(ei,{className:"w-[100px] h-5 rounded-md "}),m.jsx(ei,{className:"w-[150px] h-5 rounded-md"})]})]},t)):y?.length>0?y.map((n,r)=>m.jsxs("div",{className:"border-b py-3 flex justify-between gap-5 cursor-pointer hover:bg-gray-50 px-2 rounded-md duration-150 ",onClick:()=>{e("name",n.name),u(!1)},children:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("div",{className:"w-11 h-11 rounded-2xl relative bg-gray-100 shrink-0",children:m.jsx("img",{src:n.images[0]?.image??"/assets/images/placeholder-image.svg",alt:"item image",className:"rounded-2xl object-cover w-full h-full",draggable:!1})}),m.jsxs("div",{className:"space-y-1 max-w-[265px]",children:[m.jsx("h1",{className:"text-dark text-sm font-semibold",children:t(n.name,a)}),m.jsxs("p",{className:"text-dark text-xs font-normal flex items-center gap-1",children:[m.jsx("span",{children:n.category[0]?.name})," |"," ",m.jsxs("span",{className:"text-primary",children:[n.quantity,n.item_unit]})]})]})]}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("p",{className:"text-right text-primary font-semibold text-sm",children:Jv(parseFloat(n.selling_price))}),m.jsx("p",{className:"text-success text-sm",children:n.itemcode})]})]},r)):m.jsx("p",{className:"text-dark text-center h-24 ",children:" No results found."})})]})}KR.displayName=YR.displayName;var tO="ScrollArea",[nO]=ai(tO),[rO,oO]=nO(tO),aO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=D.useState(null),[u,c]=D.useState(null),[d,f]=D.useState(null),[p,h]=D.useState(null),[g,y]=D.useState(null),[v,b]=D.useState(0),[w,x]=D.useState(0),[C,S]=D.useState(!1),[k,_]=D.useState(!1),E=oi(t,e=>l(e)),j=vi(o);return m.jsx(rO,{scope:n,type:r,dir:j,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:C,onScrollbarXEnabledChange:S,scrollbarY:g,onScrollbarYChange:y,scrollbarYEnabled:k,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:x,children:m.jsx(hi.div,{dir:j,...i,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});aO.displayName=tO;var iO="ScrollAreaViewport",sO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=oO(iO,n),s=oi(t,D.useRef(null),i.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(hi.div,{"data-radix-scroll-area-viewport":"",...a,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});sO.displayName=iO;var lO="ScrollAreaScrollbar",uO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oO(lO,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s="horizontal"===e.orientation;return D.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),"hover"===o.type?m.jsx(cO,{...r,ref:t,forceMount:n}):"scroll"===o.type?m.jsx(dO,{...r,ref:t,forceMount:n}):"auto"===o.type?m.jsx(fO,{...r,ref:t,forceMount:n}):"always"===o.type?m.jsx(pO,{...r,ref:t}):null});uO.displayName=lO;var cO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oO(lO,e.__scopeScrollArea),[a,i]=D.useState(!1);return D.useEffect(()=>{const e=o.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(iu,{present:n||a,children:m.jsx(fO,{"data-state":a?"visible":"hidden",...r,ref:t})})}),dO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oO(lO,e.__scopeScrollArea),a="horizontal"===e.orientation,i=TO(()=>l("SCROLL_END"),100),[s,l]=function(e,t){return D.useReducer((e,n)=>t[e][n]??e,e)}("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return D.useEffect(()=>{if("idle"===s){const e=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,o.scrollHideDelay,l]),D.useEffect(()=>{const e=o.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[o.viewport,a,l,i]),m.jsx(iu,{present:n||"hidden"!==s,children:m.jsx(pO,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:ti(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ti(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),fO=D.forwardRef((e,t)=>{const n=oO(lO,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=D.useState(!1),s="horizontal"===e.orientation,l=TO(()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}},10);return DO(n.viewport,l),DO(n.content,l),m.jsx(iu,{present:r||a,children:m.jsx(pO,{"data-state":a?"visible":"hidden",...o,ref:t})})}),pO=D.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=oO(lO,e.__scopeScrollArea),a=D.useRef(null),i=D.useRef(0),[s,l]=D.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=EO(s.viewport,s.content),c={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const o=jO(n),a=o/2,i=t||a,s=o-i,l=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d="ltr"===r?[0,c]:[-1*c,0];return RO([l,u],d)(e)}(e,i.current,s,t)}return"horizontal"===n?m.jsx(hO,{...c,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=NO(o.viewport.scrollLeft,s,o.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=d(e,o.dir))}}):"vertical"===n?m.jsx(mO,{...c,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=NO(o.viewport.scrollTop,s);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=d(e))}}):null}),hO=D.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=oO(lO,e.__scopeScrollArea),[i,s]=D.useState(),l=D.useRef(null),u=oi(t,l,a.onScrollbarXChange);return D.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),m.jsx(vO,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":jO(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),OO(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:_O(i.paddingLeft),paddingEnd:_O(i.paddingRight)}})}})}),mO=D.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=oO(lO,e.__scopeScrollArea),[i,s]=D.useState(),l=D.useRef(null),u=oi(t,l,a.onScrollbarYChange);return D.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),m.jsx(vO,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":jO(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),OO(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:_O(i.paddingTop),paddingEnd:_O(i.paddingBottom)}})}})}),[gO,yO]=nO(lO),vO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=oO(lO,n),[h,g]=D.useState(null),y=oi(t,e=>g(e)),v=D.useRef(null),b=D.useRef(""),w=p.viewport,x=r.content-r.viewport,C=bi(c),S=bi(l),k=TO(d,10);function _(e){if(v.current){const t=e.clientX-v.current.left,n=e.clientY-v.current.top;u({x:t,y:n})}}return D.useEffect(()=>{const e=e=>{const t=e.target,n=h?.contains(t);n&&C(e,x)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[w,h,x,C]),D.useEffect(S,[r,S]),DO(h,k),DO(p.content,k),m.jsx(gO,{scope:n,scrollbar:h,hasThumb:o,onThumbChange:bi(a),onThumbPointerUp:bi(i),onThumbPositionChange:S,onThumbPointerDown:bi(s),children:m.jsx(hi.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:ti(e.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),v.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),_(e)}}),onPointerMove:ti(e.onPointerMove,_),onPointerUp:ti(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),bO="ScrollAreaThumb",wO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=yO(bO,e.__scopeScrollArea);return m.jsx(iu,{present:n||o.hasThumb,children:m.jsx(xO,{ref:t,...r})})}),xO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=oO(bO,n),i=yO(bO,n),{onThumbPositionChange:s}=i,l=oi(t,e=>i.onThumbChange(e)),u=D.useRef(void 0),c=TO(()=>{u.current&&(u.current(),u.current=void 0)},100);return D.useEffect(()=>{const e=a.viewport;if(e){const t=()=>{if(c(),!u.current){const t=PO(e,s);u.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[a.viewport,c,s]),m.jsx(hi.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ti(e.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})}),onPointerUp:ti(e.onPointerUp,i.onThumbPointerUp)})});wO.displayName=bO;var CO="ScrollAreaCorner",SO=D.forwardRef((e,t)=>{const n=oO(CO,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?m.jsx(kO,{...e,ref:t}):null});SO.displayName=CO;var kO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=oO(CO,n),[a,i]=D.useState(0),[s,l]=D.useState(0),u=Boolean(a&&s);return DO(o.scrollbarX,()=>{const e=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(e),l(e)}),DO(o.scrollbarY,()=>{const e=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(e),i(e)}),u?m.jsx(hi.div,{...r,ref:t,style:{width:a,height:s,position:"absolute",right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:0,...e.style}}):null});function _O(e){return e?parseInt(e,10):0}function EO(e,t){const n=e/t;return isNaN(n)?0:n}function jO(e){const t=EO(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function NO(e,t,n="ltr"){const r=jO(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-r,l=Aj(e,"ltr"===n?[0,i]:[-1*i,0]);return RO([0,i],[0,s])(l)}function RO(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function OO(e,t){return e>0&&e<t}var PO=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,s=n.top!==a.top;(i||s)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function TO(e,t){const n=bi(e),r=D.useRef(0);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),D.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function DO(e,t){const n=bi(t);si(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var MO=aO,IO=sO,AO=SO;const LO=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(MO,{ref:r,className:Ya("relative overflow-hidden",e),...n,children:[m.jsx(IO,{className:"h-full w-full rounded-[inherit]",children:t}),m.jsx(FO,{}),m.jsx(AO,{})]}));LO.displayName=MO.displayName;const FO=D.forwardRef(({className:e,orientation:t="vertical",...n},r)=>m.jsx(uO,{ref:r,orientation:t,className:Ya("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:m.jsx(wO,{className:"relative flex-1 rounded-full bg-neutral-200 dark:bg-neutral-800"})}));FO.displayName=uO.displayName;var zO="Checkbox",[$O]=ai(zO),[HO,BO]=$O(zO);function VO(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,p]=ui({prop:n,defaultProp:o??!1,onChange:l,caller:zO}),[h,g]=D.useState(null),[y,v]=D.useState(null),b=D.useRef(!1),w=!h||(!!i||!!h.closest("form")),x={checked:f,disabled:a,setChecked:p,control:h,setControl:g,name:s,form:i,value:c,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:!XO(o)&&o,isFormControl:w,bubbleInput:y,setBubbleInput:v};return m.jsx(HO,{scope:t,...x,children:ZO(d)?d(x):r})}var UO="CheckboxTrigger",qO=D.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:h}=BO(UO,e),g=oi(o,c),y=D.useRef(l);return D.useEffect(()=>{const e=a?.form;if(e){const t=()=>d(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[a,d]),m.jsx(hi.button,{type:"button",role:"checkbox","aria-checked":XO(l)?"mixed":l,"aria-required":u,"data-state":JO(l),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:g,onKeyDown:ti(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:ti(n,e=>{d(e=>!!XO(e)||!e),h&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});qO.displayName=UO;var WO=D.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return m.jsx(VO,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:e})=>m.jsxs(m.Fragment,{children:[m.jsx(qO,{...d,ref:t,__scopeCheckbox:n}),e&&m.jsx(QO,{__scopeCheckbox:n})]})})});WO.displayName=zO;var YO="CheckboxIndicator",GO=D.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=BO(YO,n);return m.jsx(iu,{present:r||XO(a.checked)||!0===a.checked,children:m.jsx(hi.span,{"data-state":JO(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});GO.displayName=YO;var KO="CheckboxBubbleInput",QO=D.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:p}=BO(KO,e),h=oi(n,p),g=Lj(a),y=Al(r);D.useEffect(()=>{const e=f;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!o.current;if(g!==a&&n){const t=new Event("click",{bubbles:r});e.indeterminate=XO(a),n.call(e,!XO(a)&&a),e.dispatchEvent(t)}},[f,g,a,o]);const v=D.useRef(!XO(a)&&a);return m.jsx(hi.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:s,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:h,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function ZO(e){return"function"==typeof e}function XO(e){return"indeterminate"===e}function JO(e){return XO(e)?"indeterminate":e?"checked":"unchecked"}QO.displayName=KO;const eP=D.forwardRef(({className:e,...t},n)=>m.jsx(WO,{ref:n,className:Ya("peer h-5 w-5 shrink-0 border border-[#7E8299] ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary rounded-[7px] data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 data-[state=checked]:border-primary dark:data-[state=checked]:text-neutral-900 bg-white",e),...t,children:m.jsx(GO,{className:Ya("flex items-center justify-center text-current"),children:m.jsx(Ef,{className:"h-4 w-4"})})}));eP.displayName=WO.displayName;const tP=({returnSelectedManagers:e,label:t,labelClass:n,info:r,infoAlignment:o,required:a,optional:i,values:s,loading:l})=>{const[u,c]=D.useState(!1),[d,f]=D.useState({}),[p,h]=D.useState("");D.useEffect(()=>{if(s&&s.length>0){const e=s.reduce((e,t)=>(e[t.manager_uuid]=Number(t.quantity),e),{});f(e)}},[s?.length]);const{apiKey:g}=Pr(),{data:y,isLoading:v}=Yx(["item-managers",g],"/manager/get_unpaginated",{enabled:!!g}),b=y?.data?.data||[],w=D.useMemo(()=>{if(!p)return b;const e=p.toLowerCase();return b.filter(t=>(t.name||"").toLowerCase().includes(e))},[b,p]);D.useEffect(()=>{if(e){const t=Object.entries(d).map(([e,t])=>({manager_uuid:e,quantity:t}));e(t)}},[d]);const x=Object.keys(d).length;return m.jsx(m.Fragment,{children:l?m.jsx(ei,{className:"w-full h-[48px]"}):m.jsxs("div",{className:"w-full flex flex-col gap-2.5",children:[t&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",n),children:[m.jsx("span",{className:"first-letter:inherit",children:t})," ",a?m.jsx("span",{className:"text-[#E12D39]",children:t&&"*"}):i?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,r&&m.jsx(kb,{fieldName:t,align:o,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:r})})]}),m.jsxs(Ak,{modal:!0,open:u,onOpenChange:c,children:[m.jsx(Lk,{asChild:!0,children:m.jsxs($k,{variant:"outline",role:"combobox","aria-expanded":u,className:"w-full justify-between h-12 bg-white border-neutral-200 text-neutral-700 hover:bg-neutral-50",children:[x>0?`${x} Manager${1===x?"":"s"} Selected`:"Select Managers",m.jsx(Of,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(Fk,{align:"end",className:"w-[450px] p-0 bg-white",side:"bottom",children:m.jsxs(ik,{shouldFilter:!1,children:[m.jsx(sk,{placeholder:"Search managers...",value:p,onValueChange:h}),m.jsxs(lk,{children:[m.jsx(uk,{children:"No manager found."}),m.jsx(ck,{children:v?m.jsx("div",{className:"flex flex-col gap-2 p-2",children:[1,2,3].map(e=>m.jsx(ei,{className:"h-10 w-full"},e))}):m.jsx(LO,{className:"h-72",children:w?.map(e=>{const t=(e=>e.uuid||"")(e),n=(e=>e.name||"Unknown Manager")(e),r=!!d[t],o=d[t]||0;return m.jsxs(dk,{value:t+n,onSelect:()=>{var e;(e=t)&&f(t=>{const n={...t};return n[e]?delete n[e]:n[e]=1,n})},className:Ya("flex items-center gap-3 p-2 cursor-pointer transition-colors aria-selected:bg-neutral-100",r&&"bg-blue-50 aria-selected:bg-blue-100"),children:[m.jsx("div",{className:"pointer-events-none flex items-center justify-center",children:m.jsx(eP,{checked:r,className:Ya(r?"bg-primary border-primary":"border-neutral-300")})}),m.jsx("div",{className:"flex-1 truncate font-medium text-neutral-700",children:n}),m.jsxs("div",{className:"flex items-center gap-2",onClick:e=>e.stopPropagation(),children:[m.jsx("span",{className:"text-xs text-neutral-400 font-medium",children:"Qty"}),m.jsx("input",{type:"number",min:"0",className:"w-20 h-8 rounded border border-neutral-300 px-2 text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",placeholder:"0",value:r?o:"",disabled:!r,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),onChange:e=>{const n=parseFloat(e.target.value);((e,t)=>{e&&f(n=>({...n,[e]:t}))})(t,isNaN(n)?0:n)}})]})]},t)})})})]})]})})]})]})})};function nP({placeholder:e,searchPlaceholder:t,options:n=[],showMultiSelectValues:r=!0,values:o,onChange:a,className:i,showCheckMark:s=!0,label:l,labelClass:u,required:c,info:d,optional:f,actionLabel:p,actionLabelAction:h,actionLabelInfo:g,removeSelectedValue:y,removeTag:v,loading:b,showCount:w,error:x}){const[C,S]=D.useState(!1),[k,_]=D.useState(0),E=D.useRef(null);D.useEffect(()=>{const e=()=>{E.current&&_(E?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[E]);const j=e=>{const t=o?.includes(e)?o?.filter(t=>t!==e):[...o||[],e];a&&a(t)};D.useEffect(()=>{y&&j(y)},[y]);const[N,R]=D.useState(null),O=e=>{R(t=>t===e?null:e)},P=e=>{for(let t of n){if(t.value===e)return t.label;if(t.subOptions){const n=t.subOptions.find(t=>t.value===e);if(n)return n.label}}return null};return m.jsx("div",{ref:E,children:b?m.jsx(ei,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ya("flex flex-col gap-2.5",i),children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[l&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",u),children:[l," ",c?m.jsx("span",{className:"text-[#E12D39]",children:l&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kb,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),p&&m.jsxs("button",{onClick:h,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[p,g&&m.jsx(kb,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:g})})]})]}),m.jsxs(Ak,{modal:!0,open:C,onOpenChange:S,children:[m.jsx(Lk,{asChild:!0,children:m.jsxs($k,{variant:"outline",role:"combobox","aria-expanded":C,className:Ya(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${x&&"!border-danger"}`,r?"h-auto py-3":null,i),children:[m.jsx("div",{className:"flex gap-2 text-[#5E6278] justify-start first-letter:uppercase flex-wrap",children:o?.length&&r?o.map((e,t)=>m.jsxs("div",{onClick:()=>{v||j(e),O(e)},className:"px-2 py-1 text-black flex items-center justify-between rounded gap-2 border bg-slate-200 text-xs font-medium",children:[m.jsx("span",{className:"flex justify-start text-start flex-wrap gap-2 whitespace-normal",children:P(e)}),m.jsx("span",{className:"",children:m.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.44001 4.49978L7.83334 2.12644C7.96064 1.99737 8.03146 1.82301 8.03021 1.64173C8.02896 1.46044 7.95575 1.28708 7.82667 1.15978C7.6976 1.03247 7.52324 0.961657 7.34196 0.962907C7.16067 0.964157 6.98731 1.03737 6.86001 1.16644L4.50001 3.55978L2.14001 1.21311C2.0151 1.08894 1.84613 1.01925 1.67001 1.01925C1.49388 1.01925 1.32492 1.08894 1.20001 1.21311C1.13752 1.27509 1.08793 1.34882 1.05408 1.43006C1.02023 1.5113 1.00281 1.59844 1.00281 1.68644C1.00281 1.77445 1.02023 1.86159 1.05408 1.94283C1.08793 2.02407 1.13752 2.0978 1.20001 2.15978L3.56001 4.49978L1.16667 6.87311C1.03937 7.00218 0.968554 7.17654 0.969804 7.35782C0.971054 7.53911 1.04427 7.71247 1.17334 7.83978C1.30241 7.96708 1.47677 8.0379 1.65805 8.03665C1.83934 8.0354 2.0127 7.96218 2.14001 7.83311L4.50001 5.43978L6.86001 7.78644C6.98492 7.91061 7.15388 7.98031 7.33001 7.98031C7.50613 7.98031 7.6751 7.91061 7.80001 7.78644C7.86249 7.72447 7.91209 7.65073 7.94594 7.56949C7.97978 7.48826 7.99721 7.40112 7.99721 7.31311C7.99721 7.2251 7.97978 7.13797 7.94594 7.05673C7.91209 6.97549 7.86249 6.90175 7.80001 6.83978L5.44001 4.49978Z",fill:"black"})})})]},t)):!r&&w&&o.length>0?`${o.length} ${l} selected`:e??"Select..."}),m.jsx(Of,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(Fk,{align:"start",style:{width:k},className:"w-[480px] p-0 bg-white rounded-xl border-gray-200",children:m.jsxs(ik,{children:[m.jsx(sk,{className:"placeholder:text-xs",placeholder:t??"Search..."}),m.jsx(uk,{children:"No result found."}),m.jsx(ck,{children:m.jsx(lk,{className:"",children:n?.map((e,t)=>m.jsxs("div",{children:[m.jsxs(dk,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{j(e.value),e?.subOptions&&e?.subOptions?.length>0&&O(e.value)},children:[s&&m.jsx(Ef,{className:Ya("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),m.jsxs("p",{className:"flex justify-between w-full",children:[e.label,e?.subOptions&&e?.subOptions?.length>0&&m.jsx(jf,{className:"ml-2 h-5 w-5 font-bold shrink-0 opacity-50"})]})]}),N===e.value&&e?.subOptions&&e?.subOptions?.map((e,t)=>m.jsxs(dk,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer pl-6 ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{j(e.value)},children:[s&&m.jsx(Ef,{className:Ya("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),e.label]},t))]},t))})})]})})]}),x&&m.jsx("p",{className:"text-danger text-xs font-normal",children:x})]})})}function rP({handleInputChange:e,setFileKey:t}){const{apiKey:n}=Pr(),{itemStoreData:r,editMode:o,fetchingItem:a}=ne(e=>e.items),[i,s]=D.useState([]),[l,u]=D.useState(!1),[c,d]=D.useState(!1),{data:f}=Yx(["categories",n],"/inventory_metas/categories",{enabled:!!n}),{data:p}=Yx(["itemunits",n],"/inventory_metas/units",{enabled:!!n}),h=f?.data?.data?.map(e=>({label:e.name,value:e.uuid,subOptions:e.subCategories.map(e=>({label:e.name,value:e.uuid}))}))||[],g=p?.data?.data?.map(e=>({label:e.name,value:e.uuid}))||[];D.useEffect(()=>{const t=r.itemunit_id||g.find(e=>"pieces"===e.label.toLowerCase())?.value;e("itemunit_id",t)},[p,r]);const y=M.useRef(!1);return M.useRef({set:!1,data:void 0}),m.jsxs("div",{className:"grid grid-cols-2 gap-x-[30px] gap-y-6",children:[m.jsx(eO,{handleInputChange:e}),m.jsx(iR,{type:"number",placeholder:"0.00",info:"Enter the cost price of a single unit of the item. This helps in calculating profit margins and inventory valuation.",label:`Unit cost price (${tb()})`,name:"cost_price",value:r.cost_price,labelClass:"text-dark font-bold first-letter:uppercase",onChange:t=>{y.current=!0,e("cost_price",t.target.value)},loading:a}),m.jsx("div",{className:"space-y-2.5",children:m.jsx(iR,{type:"number",selectOptions:g,onSelectValueChange:t=>e("itemunit_id",t),selectValue:r.itemunit_id||g.find(e=>"pieces"===e.label.toLowerCase())?.value,showSelectSearch:!0,placeholder:"0.00",addonInfo:"Select the measurement unit for this item (e.g., pieces, kg, liters). This ensures accurate stock tracking and transactions.",label:"Quantity",name:"item_quantity",value:r.item_quantity,onChange:t=>e("item_quantity",t.target.value),selectPlaceholder:"Item unit",labelClass:"text-dark font-bold first-letter:uppercase",addonLabel:"Item unit ",addonLabelClass:"text-dark font-bold first-letter:uppercase",info:"Enter the number of units available in stock for this item. This helps in managing inventory levels and ensuring you have enough stock to fulfill orders.",loading:a})}),m.jsx(iR,{type:"number",placeholder:"0.00",info:"Enter the selling price of a single unit of the item. This is the price at which the item will be sold to customers.",label:`Unit selling price (${tb()})`,name:"selling_price",value:r.selling_price,onChange:t=>e("selling_price",t.target.value),labelClass:"text-dark font-bold first-letter:uppercase",loading:a,required:!0}),m.jsx(iR,{type:"number",placeholder:"0.00",info:"Set the minimum stock quantity for this item. When the quantity drops below this level, you'll be alerted to reorder to prevent stockouts.",label:"Reorder level ",labelClass:"text-dark font-bold first-letter:uppercase",name:"reorder_level",value:r.reorder_level,onChange:t=>e("reorder_level",t.target.value),loading:a}),m.jsx(tP,{label:"Item Managers",labelClass:"text-dark font-bold first-letter:uppercase",info:"Select the managers for this item. This helps in managing inventory levels and ensuring you have enough stock to fulfill orders.",returnSelectedManagers:t=>{e("managers",t),console.log("returned managers",t)},values:r.managers,loading:a}),o&&m.jsx(nP,{label:"Category",info:"Select the category that best describes this item (e.g., electronics, clothing, food). Categorizing items helps in organizing inventory and simplifies product management.",options:h,placeholder:"Select category",labelClass:"text-dark font-bold text-sm",showSearch:!0,values:r.itemcategory_id,onChange:t=>e("itemcategory_id",t),loading:a})]})}function oP({itemTypeUUID:e,handleInputChange:t,setFileKey:n}){const r=J(),[o,a]=D.useState(!0),{itemStoreData:i,editMode:s}=ne(e=>e.items);return M.useEffect(()=>{r(Wt({field:"itemtype_id",value:e})),!s&&r(Yt())},[e]),m.jsxs("div",{className:"space-y-4",children:[s?null:m.jsxs("div",{className:Ya("bg-primary_light rounded-md px-4 py-3.5 flex justify-between items-center gap-[60px]",o?null:"hidden"),children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("span",{className:"shrink-0",children:Kv.info}),m.jsxs("div",{className:Ya("flex-grow space-y-1"),children:[m.jsx("h1",{className:"text-gray-800 font-semibold text-[15px]",children:"About product items"}),m.jsxs("p",{className:"text-[13px] text-gray-600",children:["Product items are tangible goods that can be quantified and are available in units. They can also have variations, such as different sizes, colors, or weights, ensuring flexible and comprehensive inventory management."," ",m.jsx("a",{href:"#",className:"text-primary",children:"Learn more"})]})]})]}),m.jsx("button",{onClick:()=>a(!1),children:Kv.close})]}),m.jsx(rP,{handleInputChange:t,setFileKey:n}),m.jsx(fS,{}),m.jsx(ZR,{})]})}function aP({handleInputChange:e,item_type_id:t,setFileKey:n}){const{apiKey:r}=Pr(),{editMode:o}=ne(e=>e.items),{data:a}=Yx(["itemtypes",r],"/inventory_metas/types",{enabled:!!r}),i=a?.data?.data?.filter(e=>"products"===e.name||"services"===e.name).map(e=>({label:e.name,value:e.uuid}))||[],s=[{label:"Simple Product",value:"simple product",uuid:(e=>{const t=i?.filter(t=>t.name.match(e));let n="";return t?.map(e=>n=e.uuid),n})("products")}],[l,u]=D.useState(o?t:s[0].uuid);return D.useEffect(()=>{u(o?t:s[0].uuid)},[i]),0===i?.length?null:m.jsx(KC,{className:"flex-grow px-4 pt-0",children:i?.length>0&&l?m.jsxs(_R,{defaultValue:l,className:"space-y-4",children:[m.jsxs("div",{className:Ya("flex items-center gap-7 border-b py-4 sticky top-16 bg-white z-10",o?"-top-8 pointer-events-none":null,i?.length>0?null:"pointer-events-none"),children:[m.jsx("h1",{className:"text-gray-900 font-medium text-sm shrink-0",children:"Item type"}),m.jsx(ER,{className:"flex bg-transparent flex-grow justify-start p-0 gap-[30px] overflow-auto h-auto",children:s.map((e,t)=>m.jsxs(jR,{className:"data-[state=active]:bg-transparent text-gray-700 data-[state=active]:text-gray-900 data-[state=active]:shadow-none capitalize data-[state=active]:font-bold font-medium hover:text-gray-900 p-0 flex items-center gap-2 cursor-pointer",value:e.uuid,children:[m.jsx("div",{className:Ya("flex items-center justify-center rounded-full h-[26px] w-[26px] bg-gray-300 shrink-0 indicator"),children:m.jsx("span",{className:"bg-white w-3 h-3 rounded-full indicator--child"})}),e.label]},t))})]}),m.jsx(NR,{value:s[0].uuid,children:m.jsx(oP,{itemTypeUUID:s[0]?.uuid,handleInputChange:e,setFileKey:n})})]}):m.jsx("div",{children:m.jsx(ei,{className:"rounded-md w-full h-[500px] mt-8"})})})}function iP({isOpen:e,onClose:t,itemUUID:n,itemTypeUUID:r}){const o=tr(),a=J(),{itemStoreData:i}=ne(e=>e.items),{mutate:s,isPending:l}=Gx({enableToast:!0},!0),{mutate:u,isPending:c}=Gx(),{data:d,isFetching:f}=Yx(["single_item",n],`/items/get?item_uuid=${n}`,{enabled:e}),p=d?.data,h=p?.kits.map(e=>({item_uuid:e.kit_item.uuid,quantity:Number(e.quantity)})),g=p?.variation.map(e=>{const t=e.variation_values.map(e=>e.attribute_value.uuid),n=e.locationprices.filter(e=>!e.price_group.name.match("Retail"));return{attribute_value_id:t,selling_price:e.locationprices[0].selling_price,quantity:e.quantity,sku:e.sku,prices:n.map(e=>({price_uuid:e.price_group.uuid,price_amt:e.selling_price})),image:e.image,id:e.uuid}}),y=p?.item_group.map(e=>({group_name:e.group_name,group_quantity:e.quantity,group_selling_price:e.selling_price,group_barcode:e.barcode,group_image:null,group_uuid:e.group_uuid,prices:e.locationprices.filter((e,t)=>t>0).map(e=>({price_uuid:e.price_group.uuid,price_amt:e.selling_price}))})),v=p?.extras.map(e=>({item_uuid:e.extra?.uuid,quantity:e.quantity,selling_price:e.selling_price})),b=p?.material?.map(e=>({item_uuid:e.raw_material?.uuid,quantity:e.quantity,selling_price:e.selling_price})),w=p?.suppliers.map(e=>({supplier_id:e.uuid,supplier_price:e.supplier_price,supplier_batch_number:e.supplier_batch_number,supplier_quantity:e.supplier_quantity,supplier_expired_date:e.supplier_expired_date})),x={name:p?.name,item_uuid:n,itemtype_id:p?.item_type?.uuid,selling_price:p?.selling_price,cost_price:p?.cost_price,item_quantity:p?.quantity,reorder_level:p?.reorder_level,itemunit_id:p?.unit_resource?.uuid,available_in_cart:!0,description:p?.description,itemcategory_id:p?.category?.map(e=>e.uuid),barcode:p?.barcode?.map(e=>e.barcode),itembrand_id:p?.item_brand,returnable_days:p?.returnable_days||"",images:[],group:y,taxes:p?.item_tax?.uuid,sku:p?.sku,is_draft:!1,kit:h,item_tags:p?.item_tags.map(e=>e.uuid),suppliers:w,variations:g,has_extras:v,discount:p?.discount||"",discount_type:p?.discount_type?.toString()||"1",price_man:p?.duplicate_prices?.map(e=>"Retail"===e.priceGroup.name?{}:{price_uuid:e.priceGroup.uuid,selling_price:e.selling_price.toString()}),raw_materials:b,managers:p?.managers?.map(e=>({manager_uuid:e.manager.uuid,quantity:e.quantity}))},C={prices:p?.prices,barcode:p?.barcode,extras:p?.extras,materials:p?.material,suppliers:p?.suppliers,images:p?.images,item_group:p?.item_group,variations:p?.variation},[S,k]=D.useState([]);M.useEffect(()=>{a(Qt(f))},[f]);return M.useEffect(()=>(a(Gt(e)),p&&a(Kt(x)),p&&a(Zt(C)),!e&&a(Yt()),()=>{a(Gt(!1)),a(Yt())}),[e,p]),m.jsxs(GC,{isOpen:e,onClose:t,title:"Item Edit",className:"w-[1176px] pb-0",children:[m.jsx(aP,{handleInputChange:(e,t)=>{a(Wt({field:e,value:t}))},item_type_id:r,setFileKey:k}),m.jsxs("div",{className:"flex justify-between border-t py-5 bg-white sticky bottom-0",children:[m.jsx(Mj,{label:"Cancel",className:"h-12 bg-gray-400 text-gray-900 font-bold hover:bg-gray-400/90 w-[162px]",onClick:t,disabled:l||c}),m.jsxs("div",{className:"flex gap-2.5",children:[m.jsx(Mj,{label:"Revert to draft",className:"h-12 bg-gray-400 text-gray-900 font-bold hover:bg-gray-400/90 px-8",onClick:()=>{u({url:"/item/update",payload:{...i,is_draft:!0,images:S.map(e=>({...e.file&&{image:e.file},...e.id&&{id:e.id},featured:e.featured}))}},{onSuccess:()=>{a(Yt()),o.invalidateQueries({queryKey:["items"]}),o.invalidateQueries({queryKey:["single_item",n]}),t&&t()}})},loading:c,disabled:!p?.status}),m.jsx(Mj,{label:"Update Item",className:"h-12 w-[162px]",onClick:()=>{s({url:"/item/update",payload:{...i,is_draft:!1,images:S.map(e=>({...e.file&&{image:e.file},...e.id&&{id:e.id},featured:e.featured}))}},{onSuccess:()=>{a(Yt()),o.invalidateQueries({queryKey:["items"]}),o.invalidateQueries({queryKey:["single_item",n]}),t&&t()}})},loading:l})]})]})]})}const sP=[{accessorKey:"item_description",header:()=>m.jsxs("p",{children:[" ","Item description/ ",m.jsx("br",{})," Product code"," "]}),cell:({row:e})=>{const t=e.original;return m.jsxs("div",{className:"flex items-center gap-5",children:[m.jsx("div",{className:"w-[50px] h-[50px] rounded-2xl relative bg-gray-100",children:m.jsx("img",{src:t.item_image,alt:"item image",className:"rounded-2xl object-cover w-full h-full",draggable:!1})}),m.jsxs("div",{className:"space-y-1 max-w-[265px]",children:[m.jsx(uP,{title:t.item_description,item_uuid:t.uuid,item_type_id:t.item_type_id,data:t.fullData}),m.jsxs("p",{className:"text-dark text-xs font-normal flex items-center gap-1",children:[m.jsx("span",{className:"uppercase whitespace-nowrap",children:t.itemcode}),t.sku||t.barcode.length>0?m.jsx(kb,{align:"center",fieldName:"All item codes",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px]",children:["+",(t.barcode?.length||0)+(t.sku?1:0)]}),children:m.jsxs("div",{className:"space-y-2",children:[t.sku?m.jsxs("div",{className:"",children:[m.jsx("p",{children:" SKU:"}),m.jsx("ul",{className:"list-disc pl-4",children:m.jsx("li",{children:t.sku})})]}):null,t.barcode.length>0?m.jsxs("div",{children:[m.jsx("p",{children:"Barcodes:"}),m.jsx("ul",{className:"list-disc pl-4 ",children:t.barcode.map((e,t)=>m.jsx("li",{children:e.barcode},t))})]}):null,m.jsxs("div",{className:"",children:[m.jsx("p",{children:" Itemcode:"}),m.jsx("ul",{className:"list-disc pl-4",children:m.jsx("li",{children:t.itemcode})})]})]})}):null,t.expired?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"|"}),"Expired",m.jsx("span",{className:"rounded bg-danger_light px-[5px] flex items-center text-danger font-semibold text-[11px] h-[18px]",children:t.expired})]}):null,t.expiring?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"|"}),"Expiring",m.jsx("span",{className:"rounded bg-warning-light px-[5px] flex items-center text-warning font-semibold text-[11px] h-[18px]",children:t.expiring})]}):null]})]})]})}},{accessorKey:"quantity",header:()=>m.jsx("p",{children:"quantity"}),cell:({row:e})=>{const t=e.original;return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Ya("flex items-center",t.quantity<=0?"text-danger":Number(t.reorder_level)==t.quantity?"text-orange":null),children:m.jsx(sR,{label:"Edit item quantity",placeholder:"Enter quantity",uuid:t.uuid,name:"item_quantity",displayValue:eb(t.quantity)+t.unit,value:t.quantity,valueType:"number",item_unit:t.unit})}),t.all_quantity===t.quantity?null:m.jsx("p",{className:"text-gray-700",children:Intl.NumberFormat().format(t.all_quantity??0)+t.unit})]})}},{accessorKey:"type",cell:({row:e})=>{const t=e.original;return m.jsx("p",{className:"capitalize",children:t.type})}},{accessorKey:"selling_price",header:`Selling Price (${tb()})`,cell:({row:e})=>{const t=e.original;return m.jsx(sR,{label:`Edit selling price (${tb()})`,placeholder:"Enter selling price",uuid:t.uuid,name:"selling_price",displayValue:Jv(t.selling_price??0),value:t.selling_price??0,valueType:"number"})}},{accessorKey:"categories",header:"categories/Tags",cell:({row:e})=>{const t=e.original;return m.jsxs(m.Fragment,{children:[" ",m.jsxs("div",{className:"flex items-center gap-2 capitalize",children:[t.categories&&t.categories?.length>0?t.categories?.[0]?.name:"...",t.categories.length>1?m.jsx(kb,{align:"center",fieldName:"Categories",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px]",children:["+",t.categories.length-1]}),children:m.jsx("ul",{className:"list-disc pl-4",children:t.categories.map((e,t)=>m.jsx("li",{children:e.name},t))})}):null]}),m.jsxs("div",{className:"text-gray-700 flex items-center gap-2 capitalize",children:[t.tags?.[0],t.tags?.length>1?m.jsx(kb,{align:"center",fieldName:"Tags",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px] border-primary",children:["+",t.tags.length-1]}),children:m.jsx("ul",{className:"list-disc pl-4",children:t.tags.map((e,t)=>m.jsx("li",{children:e},t))})}):null]})]})}},{accessorKey:"status",cell:({row:e})=>{const t=e.getValue("status");return m.jsx(_b,{status:t})}},{id:"actions",header:"actions",cell:({row:e})=>{const t=e.original;return m.jsx(lP,{item_uuid:t.uuid,item_type_id:t.item_type_id,data:t.fullData})}}],lP=({item_uuid:e,item_type_id:t,data:n})=>{const[r,o]=D.useState(null),a=()=>{o(null)},[i,s]=D.useState(!1),[l,u]=D.useState(!1),[c,d]=D.useState(!1),[f,p]=D.useState(!1),[h,g]=D.useState(!1),[y,v]=D.useState(!1),[b,w]=D.useState(!1),x=[{label:"view",icon:Kv.eye_outline,action:()=>s(!0)},{label:"edit",icon:Kv.notepad_edit,action:()=>u(!0)},{label:"delete",icon:Kv.trash,action:()=>p(!0)}];return m.jsxs(m.Fragment,{children:[m.jsxs(Mf,{children:[m.jsx(If,{asChild:!0,children:m.jsxs("button",{className:"bg-gray-100 rounded-md h-[30px] w-[90px] flex items-center justify-between p-2.5 font-semibold text-[10px] text-gray-500 hover:border duration-200",children:["Action"," ",m.jsx("svg",{width:"11",height:"6",viewBox:"0 0 11 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.50855 5.49304C5.42081 5.49355 5.33383 5.47673 5.25261 5.44356C5.17138 5.41038 5.09751 5.3615 5.03521 5.29971L1.03521 1.29971C0.972726 1.23773 0.92313 1.164 0.889284 1.08276C0.855438 1.00152 0.838013 0.914383 0.838013 0.826375C0.838013 0.738367 0.855438 0.65123 0.889284 0.56999C0.92313 0.488751 0.972726 0.415017 1.03521 0.353041C1.16012 0.228874 1.32909 0.15918 1.50521 0.15918C1.68134 0.15918 1.8503 0.228874 1.97521 0.353041L5.50855 3.88637L9.03521 0.353041C9.16012 0.228874 9.32909 0.15918 9.50521 0.15918C9.68134 0.15918 9.8503 0.228874 9.97521 0.353041C10.0377 0.415017 10.0873 0.488751 10.1211 0.56999C10.155 0.65123 10.1724 0.738367 10.1724 0.826375C10.1724 0.914383 10.155 1.00152 10.1211 1.08276C10.0873 1.164 10.0377 1.23773 9.97521 1.29971L5.97521 5.29971C5.85104 5.42287 5.68344 5.4923 5.50855 5.49304Z",fill:"#202125"})})]})}),m.jsx(Af,{align:"end",className:"flex flex-col gap-2.5 rounded-xl border-gray-200",children:x.map((e,t)=>m.jsxs(Lf,{className:`capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-gray-700 text-sm cursor-pointer px-[15px] flex items-center gap-[5px] ${t===x.length-1&&"text-danger focus:text-danger"}`,onMouseOver:()=>(e=>{o(e)})(t),onMouseOut:a,onClick:e.action,children:[M.cloneElement(e.icon,{fill:r===t?"#1868DB":"#5E6278"})," ",e.label]},t))})]}),m.jsx(Wk,{isOpen:i,onClose:()=>s(!1),itemUUID:e}),l?m.jsx(iP,{itemUUID:e,itemTypeUUID:t,isOpen:l,onClose:()=>u(!1)}):null,m.jsx(Ij,{isOpen:f,onClose:()=>p(!1),uuids:[e],single:!0})]})},uP=({title:e,item_uuid:t,item_type_id:n,data:r})=>{const[o,a]=D.useState(!1),[i,s]=D.useState(!1),[l,u]=D.useState(!1);return m.jsxs(m.Fragment,{children:[m.jsx("button",{className:Ya("text-primary font-bold text-sm first-letter:uppercase truncate max-w-[265px] cursor-pointer",r.expired?"text-danger":""),title:e,onClick:()=>a(!0),children:e}),m.jsx(Wk,{isOpen:o,onClose:()=>a(!1),itemUUID:t})]})};function cP({loading:e,data:t,meta:n}){const r=t?.otherscount?.map(e=>{const n=e.name;return{type:n,value:t?.result_array?.[n]?.total_selling_price??0}}),o=[{type:t?.result_array?.Retail?.pricegroup??t?.default,value:t?.result_array?.Retail?.total_selling_price??0},...r||[]],a=t?.otherscount?.map(e=>{const n=e.name;return{type:n,value:t?.result_array?.[n]?.total_profit??0}}),i=[{type:t?.result_array?.Retail?.pricegroup??t?.default,value:t?.result_array?.Retail?.total_profit??0},...a||[]],[s,l]=D.useState({type:o?.[0].type,value:o?.[0].value}),[u,c]=D.useState({type:i?.[0].type,value:i?.[0].value});M.useEffect(()=>{l({type:o?.[0].type,value:o?.[0].value}),c({type:i?.[0].type,value:i?.[0].value})},[e]);const d=[{label:"Total No. of Unique Item",count:Intl.NumberFormat().format(n?.total??0),desc:`With ${t?.unit_count??0} unit(s)`,icon:m.jsx("div",{className:"shrink-0 rounded-lg \n \n bg-[#EFF5FF] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:Kv.cube})},{label:"Total Cost Price",count:Jv(t?.result_array?.Retail?.total_cost??0),desc:"Takes into Account FIFO & LIFO ",icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#F9DFDD] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Kv.price_tag,{fill:"#ED7400"})})},{label:"Total Selling Price",count:Jv(s.value),desc:m.jsxs("p",{className:"flex gap-2 items-center flex-wrap",children:["Showing ",s.type," price"," ",m.jsxs(Mf,{children:[m.jsx(If,{asChild:!0,children:m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-[#F9F9F9]",children:["change",m.jsx("span",{className:"rotate-90",children:Kv.arrow})]})}),m.jsx(Af,{align:"start",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5 w-[210px]",children:o.map((e,t)=>m.jsx(Lf,{className:Ya("capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] \n \n ",e.type===s.type?"bg-primary_light text-primary":null),onClick:()=>l(t=>({...t,value:e.value,type:e.type})),children:e.type},t))})]})]}),icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#D8CDF4] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Kv.price_tag,{fill:"#9747FF"})})},{label:"Profit to be made",count:Jv(u.value),desc:m.jsxs("p",{className:"flex gap-2 items-center flex-wrap",children:["Showing ",u.type," price"," ",m.jsxs(Mf,{children:[m.jsx(If,{asChild:!0,children:m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-[#F9F9F9]",children:["change",m.jsx("span",{className:"rotate-90",children:Kv.arrow})]})}),m.jsx(Af,{align:"start",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5 w-[210px]",children:i.map((e,t)=>m.jsx(Lf,{className:Ya("capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] \n \n ",e.type===u.type?"bg-primary_light text-primary":null),onClick:()=>c(t=>({...t,value:e.value,type:e.type})),children:e.type},t))})]})]}),icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#C6E3D2] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Kv.price_tag,{fill:"#378C5A"})})}],[f,p]=D.useState(!1);return m.jsxs(KC,{className:"bg-[#F6F8FA] p-2.5 flex flex-col",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsx("h1",{className:"capitalize text-dark font-semibold text-lg",children:"Items overview"}),m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-white",onClick:()=>p(!f),children:[f?"Close":"Open"," ",m.jsx("span",{className:"rotate-90",children:Kv.arrow})]})]}),m.jsx(LR.Collapse,{isOpened:f,children:m.jsx("div",{className:"flex flex-wrap gap-2.5 mt-3",children:d.map((t,n)=>m.jsxs("div",{className:Ya("border rounded-xl border-[#E4E7EC] p-4 flex flex-col relative bg-right-bottom bg-no-repeat flex-auto",0===n?"bg-[#E4EEFA] bg-[url('/assets/images/ecstacy1.svg')]":1===n?"bg-[#FAEAE9] bg-[url('/assets/images/ecstacy2.svg')]":2===n?"bg-[#EEE9FA] bg-[url('/assets/images/ecstacy3.svg')]":3===n?"bg-[#EBF5EF] bg-[url('/assets/images/ecstacy4.svg')]":null),children:[m.jsxs("div",{className:"flex justify-between gap-1",children:[m.jsx("h1",{className:"text-dark text-sm font-medium",children:t.label}),m.jsx("div",{className:"shrink-0",children:t.icon})]}),m.jsxs("div",{className:"flex flex-col gap-1",children:[e?m.jsx(ei,{className:"w-28 h-6 rounded"}):m.jsx("h1",{className:Ya("text-dark font-bold text-[29px] truncate",n===d.length-1&&u.value<0?"text-danger":null),title:t.count,children:t.count}),m.jsx("div",{className:"text-gray-700 text-sm font-medium ",children:t.desc})]})]},n))})})]})}function dP({placeholder:e,className:t,inputClass:n,...r}){return m.jsxs("div",{className:Ya("h-12 border border-gray-300 rounded-md w-[320px] flex",t),children:[m.jsx("span",{className:"bg-gray-200 w-[38px] flex items-center justify-center shrink-0 rounded-l-md ",children:Kv.magnifier}),m.jsx("input",{type:"search",placeholder:e,className:"w-full px-3 text-dark text-sm font-medium bg-transparent outline-none rounded-r-md",...r})]})}function fP({placeholder:e,searchPlaceholder:t,options:n=[],showMultiSelectValues:r=!0,values:o,onChange:a,className:i,showCheckMark:s=!0,label:l,labelClass:u,required:c,info:d,optional:f,actionLabel:p,actionLabelAction:h,actionLabelInfo:g,removeSelectedValue:y,removeTag:v,loading:b,showCount:w,error:x,showError:C,onChangeSearch:S,searching:k,contentStyle:_,disabled:E,searchValue:j}){const[N,R]=D.useState(!1),[O,P]=D.useState(0),T=D.useRef(null);D.useEffect(()=>{const e=()=>{T.current&&P(T?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const M=o?.filter(e=>""!==e),I=e=>{const t=M?.includes(e)?M?.filter(t=>t!==e):[...M||[],e];a&&a(t)};return D.useEffect(()=>{y&&I(y)},[y]),m.jsx(m.Fragment,{children:b?m.jsx(ei,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ya("flex flex-col gap-2.5",i),children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[l&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",u),children:[l," ",c?m.jsx("span",{className:"text-[#E12D39]",children:l&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kb,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),p&&m.jsxs("button",{onClick:h,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[p,g&&m.jsx(kb,{fieldName:p,children:m.jsx("p",{className:"font-normal first-letter:uppercase text-left",children:g})})]})]}),m.jsxs(Ak,{modal:!0,open:N,onOpenChange:R,children:[m.jsx(Lk,{disabled:E,asChild:!0,children:m.jsxs($k,{ref:T,variant:"outline",role:"combobox","aria-expanded":N,className:Ya(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${(x||C)&&"!border-danger"}`,r?"h-auto py-3":null,i),children:[m.jsx("div",{className:"flex gap-2 text-[#5E6278] justify-start first-letter:uppercase flex-wrap",children:M?.length>0&&r?M?.map((e,t)=>m.jsxs("div",{onClick:()=>{!v&&I(e)},className:"px-2 py-1 text-black flex items-center justify-between rounded gap-2 border bg-slate-200 text-xs font-medium",children:[n?.[0].searchId?n?.find(t=>t.value===e)?.searchId:n?.find(t=>t.value===e)?.label,m.jsx("span",{className:"",children:m.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.44001 4.49978L7.83334 2.12644C7.96064 1.99737 8.03146 1.82301 8.03021 1.64173C8.02896 1.46044 7.95575 1.28708 7.82667 1.15978C7.6976 1.03247 7.52324 0.961657 7.34196 0.962907C7.16067 0.964157 6.98731 1.03737 6.86001 1.16644L4.50001 3.55978L2.14001 1.21311C2.0151 1.08894 1.84613 1.01925 1.67001 1.01925C1.49388 1.01925 1.32492 1.08894 1.20001 1.21311C1.13752 1.27509 1.08793 1.34882 1.05408 1.43006C1.02023 1.5113 1.00281 1.59844 1.00281 1.68644C1.00281 1.77445 1.02023 1.86159 1.05408 1.94283C1.08793 2.02407 1.13752 2.0978 1.20001 2.15978L3.56001 4.49978L1.16667 6.87311C1.03937 7.00218 0.968554 7.17654 0.969804 7.35782C0.971054 7.53911 1.04427 7.71247 1.17334 7.83978C1.30241 7.96708 1.47677 8.0379 1.65805 8.03665C1.83934 8.0354 2.0127 7.96218 2.14001 7.83311L4.50001 5.43978L6.86001 7.78644C6.98492 7.91061 7.15388 7.98031 7.33001 7.98031C7.50613 7.98031 7.6751 7.91061 7.80001 7.78644C7.86249 7.72447 7.91209 7.65073 7.94594 7.56949C7.97978 7.48826 7.99721 7.40112 7.99721 7.31311C7.99721 7.2251 7.97978 7.13797 7.94594 7.05673C7.91209 6.97549 7.86249 6.90175 7.80001 6.83978L5.44001 4.49978Z",fill:"black"})})})]},t)):!r&&w&&o.length>0?`${M.length} ${l} selected`:e??"Select..."}),m.jsx(Of,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(Fk,{align:"start",style:{width:O},className:Ya("w-[480px] p-0 bg-white rounded-xl border-gray-200",_),children:m.jsx(LO,{children:m.jsxs(ik,{children:[m.jsx(sk,{onChangeCapture:S,className:"placeholder:text-xs",placeholder:t??"Search..."}),k?m.jsx("div",{className:"flex flex-col gap-2 p-2",children:[1,2,3].map((e,t)=>m.jsx(ei,{className:"h-9 rounded-md"},t))}):m.jsx(uk,{children:j?"No result found.":e}),m.jsx(ck,{children:m.jsx(lk,{className:"",children:n?.map(e=>m.jsxs(dk,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{I(e.value)},children:[s&&m.jsx(Ef,{className:Ya("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),e.label]},e.value))})})]})})})]})]})})}const pP=D.createContext({dragDropManager:void 0});function hP(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var mP="function"==typeof Symbol&&Symbol.observable||"@@observable",gP=function(){return Math.random().toString(36).substring(7).split("").join(".")},yP={INIT:"@@redux/INIT"+gP(),REPLACE:"@@redux/REPLACE"+gP()};function vP(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(hP(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(hP(1));return n(vP)(e,t)}if("function"!=typeof e)throw new Error(hP(2));var o=e,a=t,i=[],s=i,l=!1;function u(){s===i&&(s=i.slice())}function c(){if(l)throw new Error(hP(3));return a}function d(e){if("function"!=typeof e)throw new Error(hP(4));if(l)throw new Error(hP(5));var t=!0;return u(),s.push(e),function(){if(t){if(l)throw new Error(hP(6));t=!1,u();var n=s.indexOf(e);s.splice(n,1),i=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(hP(7));if(void 0===e.type)throw new Error(hP(8));if(l)throw new Error(hP(9));try{l=!0,a=o(a,e)}finally{l=!1}for(var t=i=s,n=0;n<t.length;n++){(0,t[n])()}return e}return f({type:yP.INIT}),(r={dispatch:f,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(hP(10));o=e,f({type:yP.REPLACE})}})[mP]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(hP(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[mP]=function(){return this},e},r}function bP(e,t,...n){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function wP(e){return"object"==typeof e}const xP="dnd-core/INIT_COORDS",CP="dnd-core/BEGIN_DRAG",SP="dnd-core/PUBLISH_DRAG_SOURCE",kP="dnd-core/HOVER",_P="dnd-core/DROP",EP="dnd-core/END_DRAG";function jP(e,t){return{type:xP,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const NP={type:xP,payload:{clientOffset:null,sourceClientOffset:null}};function RP(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:o,getSourceClientOffset:a}=n,i=e.getMonitor(),s=e.getRegistry();e.dispatch(jP(o)),function(e,t,n){bP(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){bP(n.getSource(e),"Expected sourceIds to be registered.")})}(t,i,s);const l=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,i);if(null==l)return void e.dispatch(NP);let u=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");!function(e){bP("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(a),u=a(l)}e.dispatch(jP(o,u));const c=s.getSource(l).beginDrag(i,l);if(null==c)return;!function(e){bP(wP(e),"Item must be an object.")}(c),s.pinSource(l);const d=s.getSourceType(l);return{type:CP,payload:{itemType:d,item:c,sourceId:l,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!r}}}}function OP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){OP(e,t,n[t])})}return e}function TP(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){bP(e.isDragging(),"Cannot call drop while not dragging."),bP(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);const o=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);o.forEach((o,a)=>{const i=function(e,t,n,r){const o=n.getTarget(e);let a=o?o.drop(r,e):void 0;(function(e){bP(void 0===e||wP(e),"Drop result must either be an object or undefined.")})(a),void 0===a&&(a=0===t?{}:r.getDropResult());return a}(o,a,r,n),s={type:_P,payload:{dropResult:PP({},t,i)}};e.dispatch(s)})}}function DP(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){bP(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();if(null!=r){n.getSource(r,!0).endDrag(t,r),n.unpinSource()}return{type:EP}}}function MP(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function IP(e){return function(t,{clientOffset:n}={}){!function(e){bP(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),o=e.getMonitor(),a=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const o=e[r];MP(t.getTargetType(o),n)||e.splice(r,1)}}(r,a,o.getItemType()),function(e,t,n){bP(t.isDragging(),"Cannot call hover while not dragging."),bP(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const r=e[t];bP(e.lastIndexOf(r)===t,"Expected targetIds to be unique in the passed array.");bP(n.getTarget(r),"Expected targetIds to be registered.")}}(r,o,a),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,o,a),{type:kP,payload:{targetIds:r,clientOffset:n||null}}}}function AP(e){return function(){if(e.getMonitor().isDragging())return{type:SP}}}class LP{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:RP(e),publishDragSource:AP(e),hover:IP(e),drop:TP(e),endDrag:DP(e)}}(this);return Object.keys(n).reduce((r,o)=>{const a=n[o];var i;return r[o]=(i=a,(...n)=>{const r=i.apply(e,n);void 0!==r&&t(r)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function FP(e,t){return{x:e.x-t.x,y:e.y-t.y}}const zP=[],$P=[];zP.__IS_NONE__=!0,$P.__IS_ALL__=!0;class HP{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;bP("function"==typeof e,"listener must be a function."),bP(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),o=t.stateId;try{const a=o===r||o===r+1&&!function(e,t){return e!==zP&&(e===$P||void 0===t||(n=e,t.filter(e=>n.indexOf(e)>-1)).length>0);var n}(t.dirtyHandlerIds,n);a||e()}finally{r=o}})}subscribeToOffsetChange(e){bP("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return bP(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(bP(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return MP(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(bP(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!MP(r,o))return!1;const a=this.getTargetIds();if(!a.length)return!1;const i=a.indexOf(e);return n?i===a.length-1:i>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?FP(function(e,t){return{x:e.x+t.x,y:e.y+t.y}}(t,r),n):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?FP(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const BP="undefined"!=typeof global?global:self,VP=BP.MutationObserver||BP.WebKitMutationObserver;function UP(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}const qP="function"==typeof VP?function(e){let t=1;const n=new VP(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:UP;class WP{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const YP=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=qP(this.flush),this.requestErrorThrow=UP(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},GP=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new WP(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(YP.registerPendingError);const KP="dnd-core/ADD_SOURCE",QP="dnd-core/ADD_TARGET",ZP="dnd-core/REMOVE_SOURCE",XP="dnd-core/REMOVE_TARGET";function JP(e,t){t&&Array.isArray(e)?e.forEach(e=>JP(e,!1)):bP("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var eT;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(eT||(eT={}));let tT=0;function nT(e){const t=(tT++).toString();switch(e){case eT.SOURCE:return`S${t}`;case eT.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function rT(e){switch(e[0]){case"S":return eT.SOURCE;case"T":return eT.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function oT(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,o]}=n.next();if(o===t)return!0;r=!!e}while(!r);return!1}class aT{addSource(e,t){JP(e),function(e){bP("function"==typeof e.canDrag,"Expected canDrag to be a function."),bP("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),bP("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(eT.SOURCE,e,t);return this.store.dispatch(function(e){return{type:KP,payload:{sourceId:e}}}(n)),n}addTarget(e,t){JP(e,!0),function(e){bP("function"==typeof e.canDrop,"Expected canDrop to be a function."),bP("function"==typeof e.hover,"Expected hover to be a function."),bP("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(eT.TARGET,e,t);return this.store.dispatch(function(e){return{type:QP,payload:{targetId:e}}}(n)),n}containsHandler(e){return oT(this.dragSources,e)||oT(this.dropTargets,e)}getSource(e,t=!1){bP(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return bP(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return bP(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return bP(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return rT(e)===eT.SOURCE}isTargetId(e){return rT(e)===eT.TARGET}removeSource(e){var t;bP(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:ZP,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},YP.enqueueTask(GP.create(t))}removeTarget(e){bP(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:XP,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);bP(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){bP(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=nT(e);return this.types.set(r,t),e===eT.SOURCE?this.dragSources.set(r,n):e===eT.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const iT=(e,t)=>e===t;function sT(e=zP,t){switch(t.type){case kP:break;case KP:case QP:case XP:case ZP:return zP;default:return $P}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,o=function(e,t){const n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach((e,t)=>{1===e&&o.push(t)}),o}(n,r),a=o.length>0||!function(e,t,n=iT){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r);if(!a)return zP;const i=r[r.length-1],s=n[n.length-1];return i!==s&&(i&&o.push(i),s&&o.push(s)),o}function lT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const uT={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function cT(e=uT,t){const{payload:n}=t;switch(t.type){case xP:case CP:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case kP:return r=e.clientOffset,o=n.clientOffset,!r&&!o||r&&o&&r.x===o.x&&r.y===o.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){lT(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case EP:case _P:return uT;default:return e}var r,o}function dT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){dT(e,t,n[t])})}return e}const pT={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function hT(e=pT,t){const{payload:n}=t;switch(t.type){case CP:return fT({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case SP:return fT({},e,{isSourcePublic:!0});case kP:return fT({},e,{targetIds:n.targetIds});case XP:return-1===e.targetIds.indexOf(n.targetId)?e:fT({},e,{targetIds:(r=e.targetIds,o=n.targetId,r.filter(e=>e!==o))});case _P:return fT({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case EP:return fT({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,o}function mT(e=0,t){switch(t.type){case KP:case QP:return e+1;case ZP:case XP:return e-1;default:return e}}function gT(e=0){return e+1}function yT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){yT(e,t,n[t])})}return e}function bT(e={},t){return{dirtyHandlerIds:sT(e.dirtyHandlerIds,{type:t.type,payload:vT({},t.payload,{prevTargetIds:(n=e,r="dragOperation.targetIds",o=[],r.split(".").reduce((e,t)=>e&&e[t]?e[t]:o||null,n))})}),dragOffset:cT(e.dragOffset,t),refCount:mT(e.refCount,t),dragOperation:hT(e.dragOperation,t),stateId:gT(e.stateId)};var n,r,o}function wT(e,t=void 0,n={},r=!1){const o=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return vP(bT,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),a=new HP(o,new aT(o)),i=new LP(o,a),s=e(i,t,n);return i.receiveBackend(s),i}function xT(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}let CT=0;const ST=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var kT,_T,ET=D.memo(function(e){var{children:t}=e,n=xT(e,["children"]);const[r,o]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e,t=jT(),n,r){const o=t;o[ST]||(o[ST]={dragDropManager:wT(e,t,n,r)});return o[ST]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(n);return D.useEffect(()=>{if(o){const e=jT();return++CT,()=>{0===--CT&&(e[ST]=null)}}},[]),m.jsx(pP.Provider,{value:r,children:t})});function jT(){return"undefined"!=typeof global?global:window}var NT=(_T||(_T=1,kT=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;0!==o--;){var i=a[o];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}),kT),RT=n(NT);const OT="undefined"!=typeof window?D.useLayoutEffect:D.useEffect;function PT(e,t,n){const[r,o]=function(e,t,n){const[r,o]=D.useState(()=>t(e)),a=D.useCallback(()=>{const a=t(e);RT(r,a)||(o(a),n&&n())},[r,e,n]);return OT(a),[r,a]}(e,t,n);return OT(function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(o,{handlerIds:[t]})},[e,o]),r}function TT(e,t,n){return PT(t,e||(()=>({})),()=>n.reconnect())}function DT(e,t){const n=[...t||[]];return null==t&&"function"!=typeof e&&n.push(e),D.useMemo(()=>"function"==typeof e?e():e,n)}function MT(e){return D.useMemo(()=>e.hooks.dragSource(),[e])}function IT(e){return D.useMemo(()=>e.hooks.dragPreview(),[e])}let AT=!1,LT=!1;class FT{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){bP(!AT,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return AT=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{AT=!1}}isDragging(){if(!this.sourceId)return!1;bP(!LT,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return LT=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{LT=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let zT=!1;class $T{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;bP(!zT,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return zT=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{zT=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function HT(e,t,n,r){let o;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let n=0;n<a.length;n++){const r=a[n];if(!s(r))return!1;const i=e[r],l=t[r];if(o=void 0,!1===o||void 0===o&&i!==l)return!1}return!0}function BT(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function VT(e){return(t=null,n=null)=>{if(!D.isValidElement(t)){const r=t;return e(r,n),r}const r=t;!function(e){if("string"==typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}(r);const o=n?t=>e(t,n):e;return function(e,t){const n=e.ref;return bP("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?D.cloneElement(e,{ref:e=>{qT(n,e),qT(t,e)}}):D.cloneElement(e,{ref:t})}(r,o)}}function UT(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const e=VT(r);t[n]=()=>e}}),t}function qT(e,t){"function"==typeof e?e(t):e.current=t}class WT{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!HT(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!HT(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=UT({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,BT(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,BT(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class YT{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!HT(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=UT({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,BT(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function GT(){const{dragDropManager:e}=D.useContext(pP);return bP(null!=e,"Expected drag drop context"),e}class KT{beginDrag(){const e=this.spec,t=this.monitor;let n=null;return n="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=n?n:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const n=this.spec,r=this.monitor,{isDragging:o}=n;return o?o(r):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}}function QT(e,t,n){const r=GT(),o=function(e,t,n){const r=D.useMemo(()=>new KT(e,t,n),[t,n]);return D.useEffect(()=>{r.spec=e},[e]),r}(e,t,n),a=function(e){return D.useMemo(()=>{const t=e.type;return bP(null!=t,"spec.type must be defined"),t},[e])}(e);OT(function(){if(null!=a){const[e,i]=function(e,t,n){const r=n.getRegistry(),o=r.addSource(e,t);return[o,()=>r.removeSource(o)]}(a,o,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),i}},[r,t,n,o,a])}function ZT(e,t){const n=DT(e,t);bP(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=function(){const e=GT();return D.useMemo(()=>new FT(e),[e])}(),o=function(e,t){const n=GT(),r=D.useMemo(()=>new WT(n.getBackend()),[n]);return OT(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),OT(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}(n.options,n.previewOptions);return QT(n,r,o),[TT(n.collect,r,o),MT(o),IT(o)]}function XT(e){return D.useMemo(()=>e.hooks.dropTarget(),[e])}class JT{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function eD(e,t,n){const r=GT(),o=function(e,t){const n=D.useMemo(()=>new JT(e,t),[t]);return D.useEffect(()=>{n.spec=e},[e]),n}(e,t),a=function(e){const{accept:t}=e;return D.useMemo(()=>(bP(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}(e);OT(function(){const[e,i]=function(e,t,n){const r=n.getRegistry(),o=r.addTarget(e,t);return[o,()=>r.removeTarget(o)]}(a,o,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),i},[r,t,o,n,a.map(e=>e.toString()).join("|")])}function tD(e,t){const n=DT(e,t),r=function(){const e=GT();return D.useMemo(()=>new $T(e),[e])}(),o=function(e){const t=GT(),n=D.useMemo(()=>new YT(t.getBackend()),[t]);return OT(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}(n.options);return eD(n,r,o),[TT(n.collect,r,o),XT(o)]}function nD(e){let t=null;return()=>(null==t&&(t=e()),t)}class rD{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const o=[];return n.forEach(e=>o.push(e)),o}(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter(e=>e!==r)),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class oD{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const aD="__NATIVE_FILE__",iD="__NATIVE_URL__",sD="__NATIVE_TEXT__",lD="__NATIVE_HTML__";var uD=Object.freeze({__proto__:null,FILE:aD,HTML:lD,TEXT:sD,URL:iD});function cD(e,t,n){const r=t.reduce((t,n)=>t||e.getData(n),"");return null!=r?r:n}const dD={[aD]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[lD]:{exposeProperties:{html:(e,t)=>cD(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[iD]:{exposeProperties:{urls:(e,t)=>cD(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[sD]:{exposeProperties:{text:(e,t)=>cD(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function fD(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(dD).filter(e=>{const n=dD[e];return!!(null==n?void 0:n.matchesTypes)&&n.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null}const pD=nD(()=>/firefox/i.test(navigator.userAgent)),hD=nD(()=>Boolean(window.safari));class mD{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:o,c3s:a}=this;let i=t.length-1;if(e===t[i])return n[i];let s,l=0,u=a.length-1;for(;l<=u;){s=Math.floor(.5*(l+u));const r=t[s];if(r<e)l=s+1;else{if(!(r>e))return n[s];u=s-1}}i=Math.max(0,u);const c=e-t[i],d=c*c;return n[i]+r[i]*c+o[i]*d+a[i]*c*d}constructor(e,t){const{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort((t,n)=>e[t]<e[n]?-1:1);const o=[],a=[];let i,s;for(let r=0;r<n-1;r++)i=e[r+1]-e[r],s=t[r+1]-t[r],o.push(i),a.push(s/i);const l=[a[0]];for(let e=0;e<o.length-1;e++){const t=a[e],n=a[e+1];if(t*n<=0)l.push(0);else{i=o[e];const r=o[e+1],a=i+r;l.push(3*a/((a+r)/t+(a+i)/n))}}l.push(a[a.length-1]);const u=[],c=[];let d;for(let e=0;e<l.length-1;e++){d=a[e];const t=l[e],n=1/o[e],r=t+l[e+1]-d-d;u.push((d-t-r)*n),c.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=l,this.c2s=u,this.c3s=c}}function gD(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function yD(e){return{x:e.clientX,y:e.clientY}}function vD(e,t,n,r,o){const a=function(e){var t;return"IMG"===e.nodeName&&(pD()||!(null===(t=document.documentElement)||void 0===t?void 0:t.contains(e)))}(t),i=gD(a?e:t),s={x:n.x-i.x,y:n.y-i.y},{offsetWidth:l,offsetHeight:u}=e,{anchorX:c,anchorY:d}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=function(e,t,n,r){let o=e?t.width:n,a=e?t.height:r;return hD()&&e&&(a/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:a}}(a,t,l,u),{offsetX:h,offsetY:m}=o,g=0===m||m;return{x:0===h||h?h:new mD([0,.5,1],[s.x,s.x/l*f,s.x+f-l]).interpolate(c),y:g?m:(()=>{let e=new mD([0,.5,1],[s.y,s.y/u*p,s.y+p-u]).interpolate(d);return hD()&&a&&(e+=(window.devicePixelRatio-1)*p),e})()}}class bD{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function wD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){wD(e,t,n[t])})}return e}class CD{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),o=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),o=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",o),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return xD({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return xD({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(uD).some(t=>uD[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=dD[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new oD(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&gD(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=yD(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,o=fD(r);if(this.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),o=this.sourcePreviewNodes.get(e)||t;if(o){const{anchorX:e,anchorY:a,offsetX:i,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),l=vD(t,o,n,{anchorX:e,anchorY:a},{offsetX:i,offsetY:s});r.setDragImage(o,l.x,l.y)}}try{null==r||r.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(o)this.beginDragNativeItem(o);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=fD(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:yD(e)});t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=yD(e),this.scheduleHover(t);(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):fD(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:yD(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new bD(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new rD(this.isNodeInDocument)}}const SD=function(e,t,n){return new CD(e,t,n)};var kD,_D,ED=Object.create,jD=Object.defineProperty,ND=Object.getOwnPropertyDescriptor,RD=Object.getOwnPropertyNames,OD=Object.getPrototypeOf,PD=Object.prototype.hasOwnProperty,TD=(e,t,n)=>(n=null!=e?ED(OD(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of RD(t))PD.call(e,o)||o===n||jD(e,o,{get:()=>t[o],enumerable:!(r=ND(t,o))||r.enumerable});return e})(jD(n,"default",{value:e,enumerable:!0}),e)),DD=(kD={"node_modules/classnames/index.js"(e,t){!function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var a=typeof o;if("string"===a||"number"===a)t.push(o);else if(Array.isArray(o)){if(o.length){var i=n.apply(null,o);i&&t.push(i)}}else if("object"===a){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){t.push(o.toString());continue}for(var s in o)e.call(o,s)&&o[s]&&t.push(s)}}}return t.join(" ")}void 0!==t&&t.exports?(n.default=n,t.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return n}):window.classNames=n}()}},function(){return _D||(0,kD[RD(kD)[0]])((_D={exports:{}}).exports,_D),_D.exports}),MD=TD(DD()),ID="object"==typeof global&&global&&global.Object===Object&&global,AD="object"==typeof self&&self&&self.Object===Object&&self,LD=ID||AD||Function("return this")(),FD=LD.Symbol,zD=Object.prototype,$D=zD.hasOwnProperty,HD=zD.toString,BD=FD?FD.toStringTag:void 0;var VD=function(e){var t=$D.call(e,BD),n=e[BD];try{e[BD]=void 0;var r=!0}catch(e){}var o=HD.call(e);return r&&(t?e[BD]=n:delete e[BD]),o},UD=Object.prototype.toString;var qD=function(e){return UD.call(e)},WD=FD?FD.toStringTag:void 0;var YD=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":WD&&WD in Object(e)?VD(e):qD(e)};var GD=function(e){return null!=e&&"object"==typeof e};var KD=function(e){return"symbol"==typeof e||GD(e)&&"[object Symbol]"==YD(e)};var QD=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},ZD=Array.isArray,XD=FD?FD.prototype:void 0,JD=XD?XD.toString:void 0;var eM=function e(t){if("string"==typeof t)return t;if(ZD(t))return QD(t,e)+"";if(KD(t))return JD?JD.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var tM=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var nM,rM=function(e){if(!tM(e))return!1;var t=YD(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},oM=LD["__core-js_shared__"],aM=(nM=/[^.]+$/.exec(oM&&oM.keys&&oM.keys.IE_PROTO||""))?"Symbol(src)_1."+nM:"";var iM=function(e){return!!aM&&aM in e},sM=Function.prototype.toString;var lM=function(e){if(null!=e){try{return sM.call(e)}catch(e){}try{return e+""}catch(e){}}return""},uM=/^\[object .+?Constructor\]$/,cM=Function.prototype,dM=Object.prototype,fM=cM.toString,pM=dM.hasOwnProperty,hM=RegExp("^"+fM.call(pM).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var mM=function(e){return!(!tM(e)||iM(e))&&(rM(e)?hM:uM).test(lM(e))};var gM=function(e,t){return null==e?void 0:e[t]};var yM=function(e,t){var n=gM(e,t);return mM(n)?n:void 0},vM=yM(LD,"WeakMap");var bM=function(){};var wM=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1};var xM=function(e){return e!=e};var CM=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1};var SM=function(e,t,n){return t==t?CM(e,t,n):wM(e,xM,n)};var kM=function(e,t){return!!(null==e?0:e.length)&&SM(e,t,0)>-1},_M=/^(?:0|[1-9]\d*)$/;var EM=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&_M.test(e))&&e>-1&&e%1==0&&e<t};var jM=function(e,t){return e===t||e!=e&&t!=t};var NM=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var RM=function(e){return null!=e&&NM(e.length)&&!rM(e)},OM=Object.prototype;var PM=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||OM)};var TM=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var DM=function(e){return GD(e)&&"[object Arguments]"==YD(e)},MM=Object.prototype,IM=MM.hasOwnProperty,AM=MM.propertyIsEnumerable,LM=DM(function(){return arguments}())?DM:function(e){return GD(e)&&IM.call(e,"callee")&&!AM.call(e,"callee")},FM=LM;var zM=function(){return!1},$M="object"==typeof e&&e&&!e.nodeType&&e,HM=$M&&"object"==typeof module&&module&&!module.nodeType&&module,BM=HM&&HM.exports===$M?LD.Buffer:void 0,VM=(BM?BM.isBuffer:void 0)||zM,UM={};UM["[object Float32Array]"]=UM["[object Float64Array]"]=UM["[object Int8Array]"]=UM["[object Int16Array]"]=UM["[object Int32Array]"]=UM["[object Uint8Array]"]=UM["[object Uint8ClampedArray]"]=UM["[object Uint16Array]"]=UM["[object Uint32Array]"]=!0,UM["[object Arguments]"]=UM["[object Array]"]=UM["[object ArrayBuffer]"]=UM["[object Boolean]"]=UM["[object DataView]"]=UM["[object Date]"]=UM["[object Error]"]=UM["[object Function]"]=UM["[object Map]"]=UM["[object Number]"]=UM["[object Object]"]=UM["[object RegExp]"]=UM["[object Set]"]=UM["[object String]"]=UM["[object WeakMap]"]=!1;var qM=function(e){return GD(e)&&NM(e.length)&&!!UM[YD(e)]};var WM=function(e){return function(t){return e(t)}},YM="object"==typeof e&&e&&!e.nodeType&&e,GM=YM&&"object"==typeof module&&module&&!module.nodeType&&module,KM=GM&&GM.exports===YM&&ID.process,QM=function(){try{var e=GM&&GM.require&&GM.require("util").types;return e||KM&&KM.binding&&KM.binding("util")}catch(e){}}(),ZM=QM&&QM.isTypedArray,XM=ZM?WM(ZM):qM,JM=Object.prototype.hasOwnProperty;var eI=function(e,t){var n=ZD(e),r=!n&&FM(e),o=!n&&!r&&VM(e),a=!n&&!r&&!o&&XM(e),i=n||r||o||a,s=i?TM(e.length,String):[],l=s.length;for(var u in e)!t&&!JM.call(e,u)||i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||EM(u,l))||s.push(u);return s};var tI=function(e,t){return function(n){return e(t(n))}},nI=tI(Object.keys,Object),rI=Object.prototype.hasOwnProperty;var oI=function(e){if(!PM(e))return nI(e);var t=[];for(var n in Object(e))rI.call(e,n)&&"constructor"!=n&&t.push(n);return t};var aI=function(e){return RM(e)?eI(e):oI(e)},iI=yM(Object,"create");var sI=function(){this.__data__=iI?iI(null):{},this.size=0};var lI=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},uI=Object.prototype.hasOwnProperty;var cI=function(e){var t=this.__data__;if(iI){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return uI.call(t,e)?t[e]:void 0},dI=Object.prototype.hasOwnProperty;var fI=function(e){var t=this.__data__;return iI?void 0!==t[e]:dI.call(t,e)};var pI=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iI&&void 0===t?"__lodash_hash_undefined__":t,this};function hI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}hI.prototype.clear=sI,hI.prototype.delete=lI,hI.prototype.get=cI,hI.prototype.has=fI,hI.prototype.set=pI;var mI=hI;var gI=function(){this.__data__=[],this.size=0};var yI=function(e,t){for(var n=e.length;n--;)if(jM(e[n][0],t))return n;return-1},vI=Array.prototype.splice;var bI=function(e){var t=this.__data__,n=yI(t,e);return!(n<0)&&(n==t.length-1?t.pop():vI.call(t,n,1),--this.size,!0)};var wI=function(e){var t=this.__data__,n=yI(t,e);return n<0?void 0:t[n][1]};var xI=function(e){return yI(this.__data__,e)>-1};var CI=function(e,t){var n=this.__data__,r=yI(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function SI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}SI.prototype.clear=gI,SI.prototype.delete=bI,SI.prototype.get=wI,SI.prototype.has=xI,SI.prototype.set=CI;var kI=SI,_I=yM(LD,"Map");var EI=function(){this.size=0,this.__data__={hash:new mI,map:new(_I||kI),string:new mI}};var jI=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var NI=function(e,t){var n=e.__data__;return jI(t)?n["string"==typeof t?"string":"hash"]:n.map};var RI=function(e){var t=NI(this,e).delete(e);return this.size-=t?1:0,t};var OI=function(e){return NI(this,e).get(e)};var PI=function(e){return NI(this,e).has(e)};var TI=function(e,t){var n=NI(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function DI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}DI.prototype.clear=EI,DI.prototype.delete=RI,DI.prototype.get=OI,DI.prototype.has=PI,DI.prototype.set=TI;var MI=DI;var II=function(e){return null==e?"":eM(e)};var AI=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};var LI=function(e){return function(t){return null==e?void 0:e[t]}};var FI=function(){this.__data__=new kI,this.size=0};var zI=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var $I=function(e){return this.__data__.get(e)};var HI=function(e){return this.__data__.has(e)};var BI=function(e,t){var n=this.__data__;if(n instanceof kI){var r=n.__data__;if(!_I||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new MI(r)}return n.set(e,t),this.size=n.size,this};function VI(e){var t=this.__data__=new kI(e);this.size=t.size}VI.prototype.clear=FI,VI.prototype.delete=zI,VI.prototype.get=$I,VI.prototype.has=HI,VI.prototype.set=BI;var UI=VI;var qI=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a};var WI=function(){return[]},YI=Object.prototype.propertyIsEnumerable,GI=Object.getOwnPropertySymbols,KI=GI?function(e){return null==e?[]:(e=Object(e),qI(GI(e),function(t){return YI.call(e,t)}))}:WI;var QI=function(e,t,n){var r=t(e);return ZD(e)?r:AI(r,n(e))};var ZI=function(e){return QI(e,aI,KI)},XI=yM(LD,"DataView"),JI=yM(LD,"Promise"),eA=yM(LD,"Set"),tA="[object Map]",nA="[object Promise]",rA="[object Set]",oA="[object WeakMap]",aA="[object DataView]",iA=lM(XI),sA=lM(_I),lA=lM(JI),uA=lM(eA),cA=lM(vM),dA=YD;(XI&&dA(new XI(new ArrayBuffer(1)))!=aA||_I&&dA(new _I)!=tA||JI&&dA(JI.resolve())!=nA||eA&&dA(new eA)!=rA||vM&&dA(new vM)!=oA)&&(dA=function(e){var t=YD(e),n="[object Object]"==t?e.constructor:void 0,r=n?lM(n):"";if(r)switch(r){case iA:return aA;case sA:return tA;case lA:return nA;case uA:return rA;case cA:return oA}return t});var fA=dA,pA=LD.Uint8Array;var hA=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var mA=function(e){return this.__data__.has(e)};function gA(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new MI;++t<n;)this.add(e[t])}gA.prototype.add=gA.prototype.push=hA,gA.prototype.has=mA;var yA=gA;var vA=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var bA=function(e,t){return e.has(t)};var wA=function(e,t,n,r,o,a){var i=1&n,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=2&n?new yA:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var g=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!vA(t,function(e,t){if(!bA(p,t)&&(h===e||o(h,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(h!==m&&!o(h,m,n,r,a)){f=!1;break}}return a.delete(e),a.delete(t),f};var xA=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n};var CA=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},SA=FD?FD.prototype:void 0,kA=SA?SA.valueOf:void 0;var _A=function(e,t,n,r,o,a,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new pA(e),new pA(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jM(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=xA;case"[object Set]":var l=1&r;if(s||(s=CA),e.size!=t.size&&!l)return!1;var u=i.get(e);if(u)return u==t;r|=2,i.set(e,t);var c=wA(s(e),s(t),r,o,a,i);return i.delete(e),c;case"[object Symbol]":if(kA)return kA.call(e)==kA.call(t)}return!1},EA=Object.prototype.hasOwnProperty;var jA=function(e,t,n,r,o,a){var i=1&n,s=ZI(e),l=s.length;if(l!=ZI(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:EA.call(t,c)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var h=i;++u<l;){var m=e[c=s[u]],g=t[c];if(r)var y=i?r(g,m,c,t,e,a):r(m,g,c,e,t,a);if(!(void 0===y?m===g||o(m,g,n,r,a):y)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return a.delete(e),a.delete(t),p},NA="[object Arguments]",RA="[object Array]",OA="[object Object]",PA=Object.prototype.hasOwnProperty;var TA=function(e,t,n,r,o,a){var i=ZD(e),s=ZD(t),l=i?RA:fA(e),u=s?RA:fA(t),c=(l=l==NA?OA:l)==OA,d=(u=u==NA?OA:u)==OA,f=l==u;if(f&&VM(e)){if(!VM(t))return!1;i=!0,c=!1}if(f&&!c)return a||(a=new UI),i||XM(e)?wA(e,t,n,r,o,a):_A(e,t,l,n,r,o,a);if(!(1&n)){var p=c&&PA.call(e,"__wrapped__"),h=d&&PA.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return a||(a=new UI),o(m,g,n,r,a)}}return!!f&&(a||(a=new UI),jA(e,t,n,r,o,a))};var DA=function e(t,n,r,o,a){return t===n||(null==t||null==n||!GD(t)&&!GD(n)?t!=t&&n!=n:TA(t,n,r,o,e,a))};var MA=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},IA=LI({"&":"&","<":"<",">":">",'"':""","'":"'"}),AA=/[&<>"']/g,LA=RegExp(AA.source);var FA=function(e){return(e=II(e))&&LA.test(e)?e.replace(AA,IA):e},zA=/[\\^$.*+?()[\]{}|]/g,$A=RegExp(zA.source);var HA=function(e){return(e=II(e))&&$A.test(e)?e.replace(zA,"\\$&"):e};var BA=function(e,t){return DA(e,t)},VA=eA&&1/CA(new eA([,-0]))[1]==1/0?function(e){return new eA(e)}:bM,UA=VA;var qA=function(e,t,n){var r=-1,o=kM,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=MA;else if(a>=200){var u=t?null:UA(e);if(u)return CA(u);i=!1,o=bA,l=new yA}else l=t?[]:s;e:for(;++r<a;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,i&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(c)}else o(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s};var WA=function(e){return e&&e.length?qA(e):[]},YA={ENTER:[10,13],TAB:9,BACKSPACE:8,UP_ARROW:38,DOWN_ARROW:40,SPACE:32},GA={ENTER:"Enter",TAB:"Tab",COMMA:",",SPACE:" ",SEMICOLON:";"},KA="Press enter to add new tag",QA="text",ZA={tags:"ReactTags__tags",tagInput:"ReactTags__tagInput",tagInputField:"ReactTags__tagInputField",selected:"ReactTags__selected",tag:"ReactTags__tag",remove:"ReactTags__remove",suggestions:"ReactTags__suggestions",activeSuggestion:"ReactTags__activeSuggestion",editTagInput:"ReactTags__editTagInput",editTagInputField:"ReactTags__editTagInputField",clearAll:"ReactTags__clearAll"},XA="inline",JA="top",eL="bottom",tL="Tag limit reached!";function nL(e){const{moveTag:t,readOnly:n,allowDragDrop:r}=e;return void 0!==t&&!n&&r}var rL=e=>{const{readOnly:t,removeComponent:n,onRemove:r,className:o,tag:a,index:i}=e,s=e=>{if(YA.ENTER.includes(e.keyCode)||e.keyCode===YA.SPACE)return e.preventDefault(),void e.stopPropagation();e.keyCode===YA.BACKSPACE&&r(e)};if(t)return m.jsx("span",{});const l=`Tag at index ${i} with value ${a.id} focussed. Press backspace to remove`;if(n){const e=n;return m.jsx(e,{"data-testid":"remove",onRemove:r,onKeyDown:s,className:o,"aria-label":l,tag:a,index:i})}return m.jsx("button",{"data-testid":"remove",onClick:r,onKeyDown:s,className:o,type:"button","aria-label":l,children:m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:"12",width:"12",fill:"#fff",children:m.jsx("path",{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"})})})},oL="tag",aL=e=>{const t=D.useRef(null),{readOnly:n=!1,tag:r,classNames:o,index:a,moveTag:i,allowDragDrop:s=!0,labelField:l="text",tags:u}=e,[{isDragging:c},d]=ZT(()=>({type:oL,collect:e=>({isDragging:!!e.isDragging()}),item:e,canDrag:()=>nL({moveTag:i,readOnly:n,allowDragDrop:s})}),[u]),[,f]=tD(()=>({accept:oL,drop:t=>{const n=t.index,r=a;n!==r&&e?.moveTag?.(n,r)},canDrop:e=>function(e){const{readOnly:t,allowDragDrop:n}=e;return!t&&n}(e)}),[u]);d(f(t));const p=e.tag[l],{className:h=""}=r,g=c?0:1;return m.jsxs("span",{ref:t,className:(0,MD.default)("tag-wrapper",o.tag,h),style:{opacity:g,cursor:nL({moveTag:i,readOnly:n,allowDragDrop:s})?"move":"auto"},"data-testid":"tag",onClick:e.onTagClicked,onTouchStart:e.onTagClicked,children:[p,m.jsx(rL,{tag:e.tag,className:o.remove,removeComponent:e.removeComponent,onRemove:e.onDelete,readOnly:n,index:a})]})},iL=e=>m.jsx("button",{"aria-label":e["aria-label"],className:e.classNames.clearAll,onClick:e.onClick,children:"Clear all"}),sL=(e,t,n,r)=>"function"==typeof r?r(e):e.length>=t&&n,lL=D.memo(e=>{const t=D.createRef(),{labelField:n,minQueryLength:r,isFocused:o,classNames:a,selectedIndex:i,query:s}=e;D.useEffect(()=>{if(!t.current)return;const e=t.current.querySelector(`.${a.activeSuggestion}`);e&&((e,t)=>{const n=t.offsetHeight,r=e.offsetHeight,o=e.offsetTop-t.scrollTop;o+r>=n?t.scrollTop+=o-n+r:o<0&&(t.scrollTop+=o)})(e,t.current)},[i]);const l=(e,t)=>{const r=t.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),{[n]:o}=e;return{__html:o.replace(RegExp(r,"gi"),e=>`<mark>${FA(e)}</mark>`)}},u=(t,n)=>"function"==typeof e.renderSuggestion?e.renderSuggestion(t,n):m.jsx("span",{dangerouslySetInnerHTML:l(t,n)}),c=e.suggestions.map((t,n)=>m.jsx("li",{onMouseDown:e.handleClick.bind(null,n),onTouchStart:e.handleClick.bind(null,n),onMouseOver:e.handleHover.bind(null,n),className:n===e.selectedIndex?e.classNames.activeSuggestion:"",children:u(t,e.query)},n));return 0!==c.length&&sL(s,r||2,o,e.shouldRenderSuggestions)?m.jsx("div",{ref:t,className:a.suggestions,"data-testid":"suggestions",children:m.jsxs("ul",{children:[" ",c," "]})}):null},(e,t)=>{const{query:n,minQueryLength:r=2,isFocused:o,suggestions:a}=t;return!(e.isFocused!==o||!BA(e.suggestions,a)||sL(n,r,o,t.shouldRenderSuggestions)!==sL(e.query,e.minQueryLength??2,e.isFocused,e.shouldRenderSuggestions)||e.selectedIndex!==t.selectedIndex)}),uL=lL,cL=TD(DD()),dL=e=>{const{autofocus:t,autoFocus:n,readOnly:r,labelField:o,allowDeleteFromEmptyInput:a,allowAdditionFromPaste:i,allowDragDrop:s,minQueryLength:l,shouldRenderSuggestions:u,removeComponent:c,autocomplete:d,inline:f,maxTags:p,allowUnique:h,editable:g,placeholder:y,delimiters:v,separators:b,tags:w,inputFieldPosition:x,inputProps:C,classNames:S,maxLength:k,inputValue:_,clearAll:E,ariaAttrs:j}=e,[N,R]=D.useState(e.suggestions),[O,P]=D.useState(""),[T,M]=D.useState(!1),[I,A]=D.useState(-1),[L,F]=D.useState(!1),[z,$]=D.useState(""),[H,B]=D.useState(-1),[V,U]=D.useState(""),q=D.createRef(),W=D.useRef(null),Y=D.useRef(null);D.useEffect(()=>{v.length&&console.warn("[Deprecation] The delimiters prop is deprecated and will be removed in v7.x.x, please use separators instead. If you have any concerns regarding this, please share your thoughts in https://github.com/react-tags/react-tags/issues/960")},[]),D.useEffect(()=>{void 0!==f&&console.warn("[Deprecation] The inline attribute is deprecated and will be removed in v7.x.x, please use inputFieldPosition instead.")},[f]),D.useEffect(()=>{void 0!==t&&console.warn("[Deprecated] autofocus prop will be removed in 7.x so please migrate to autoFocus prop."),(t||n&&!1!==t)&&!r&&Q()},[n,n,r]),D.useEffect(()=>{ee()},[O,e.suggestions]);const G=t=>{let n=e.suggestions.slice();if(h){const e=w.map(e=>e.id.trim().toLowerCase());n=n.filter(t=>!e.includes(t.id.toLowerCase()))}if(e.handleFilterSuggestions)return e.handleFilterSuggestions(t,n);const r=n.filter(e=>0===K(t,e)),o=n.filter(e=>K(t,e)>0);return r.concat(o)},K=(e,t)=>t[o].toLowerCase().indexOf(e.toLowerCase()),Q=()=>{P(""),W.current&&(W.current.value="",W.current.focus())},Z=(t,n)=>{n.preventDefault(),n.stopPropagation();const r=w.slice();0!==r.length&&(U(""),e?.handleDelete?.(t,n),X(t,r))},X=(e,t)=>{if(!q?.current)return;const n=q.current.querySelectorAll(".ReactTags__remove");let r="";0===e&&t.length>1?(r=`Tag at index ${e} with value ${t[e].id} deleted. Tag at index 0 with value ${t[1].id} focussed. Press backspace to remove`,n[0].focus()):e>0?(r=`Tag at index ${e} with value ${t[e].id} deleted. Tag at index ${e-1} with value ${t[e-1].id} focussed. Press backspace to remove`,n[e-1].focus()):(r=`Tag at index ${e} with value ${t[e].id} deleted. Input focussed. Press enter to add a new tag`,W.current?.focus()),$(r)},J=t=>{e.handleInputChange&&e.handleInputChange(t.target.value,t);const n=t.target.value.trim();P(n)},ee=()=>{const e=G(O);R(e),A(I>=e.length?e.length-1:I)},te=t=>{const n=t.target.value;e.handleInputFocus&&e.handleInputFocus(n,t),M(!0)},ne=t=>{const n=t.target.value;e.handleInputBlur&&(e.handleInputBlur(n,t),W.current&&(W.current.value="")),M(!1),B(-1)},re=e=>{if(!e.nativeEvent.isComposing){if("Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),A(-1),F(!1),R([]),B(-1)),(-1!==b.indexOf(e.key)||-1!==v.indexOf(e.keyCode))&&!e.shiftKey){e.keyCode===YA.TAB&&""===O||e.preventDefault();const t=L&&-1!==I?N[I]:{id:O.trim(),[o]:O.trim(),className:""};Object.keys(t)&&ie(t)}"Backspace"!==e.key||""!==O||!a&&x!==XA||Z(w.length-1,e),e.keyCode===YA.UP_ARROW&&(e.preventDefault(),A(I<=0?N.length-1:I-1),F(!0)),e.keyCode===YA.DOWN_ARROW&&(e.preventDefault(),F(!0),0===N.length?A(-1):A((I+1)%N.length))}},oe=()=>p&&w.length>=p,ae=t=>{if(!i)return;if(oe())return U(tL),void Q();U(""),t.preventDefault();const n=t.clipboardData||window.clipboardData,r=n.getData("text"),{maxLength:a=r.length}=e,s=Math.min(a,r.length),l=n.getData("text").substr(0,s);let u=v;b.length&&(u=[],b.forEach(e=>{const t=function(e){switch(e){case GA.ENTER:return[10,13];case GA.TAB:return 9;case GA.COMMA:return 188;case GA.SPACE:return 32;case GA.SEMICOLON:return 186;default:return 0}}(e);Array.isArray(t)?u=[...u,...t]:u.push(t)}));const c=function(e){const t=e.map(e=>{const t=e-48*Math.floor(e/48);return String.fromCharCode(96<=e?t:e)}).join(""),n=HA(t);return new RegExp(`[${n}]+`)}(u),d=l.split(c).map(e=>e.trim());WA(d).forEach(e=>ie({id:e.trim(),[o]:e.trim(),className:""}))},ie=t=>{if(!t.id||!t[o])return;if(-1===H){if(oe())return U(tL),void Q();U("")}const n=w.map(e=>e.id.toLowerCase());if(!(h&&n.indexOf(t.id.trim().toLowerCase())>=0)){if(d){const e=G(t[o]);console.warn("[Deprecation] The autocomplete prop will be removed in 7.x to simplify the integration and make it more intutive. If you have any concerns regarding this, please share your thoughts in https://github.com/react-tags/react-tags/issues/949"),(1===d&&1===e.length||!0===d&&e.length)&&(t=e[0])}-1!==H&&e.onTagUpdate?e.onTagUpdate(H,t):e?.handleAddition?.(t),P(""),F(!1),A(-1),B(-1),Q()}},se=(t,n)=>{const r=w[t];e?.handleDrag?.(r,t,n)},le=(()=>{const t={...ZA,...e.classNames};return w.map((n,a)=>m.jsx(D.Fragment,{children:H===a?m.jsx("div",{className:t.editTagInput,children:m.jsx("input",{ref:e=>{Y.current=e},onFocus:te,value:O,onChange:J,onKeyDown:re,onBlur:ne,className:t.editTagInputField,onPaste:ae,"data-testid":"tag-edit"})}):m.jsx(aL,{index:a,tag:n,tags:w,labelField:o,onDelete:e=>Z(a,e),moveTag:s?se:void 0,removeComponent:c,onTagClicked:t=>((t,n,a)=>{r||(g&&(B(t),P(n[o]),Y.current?.focus()),e.handleTagClick?.(t,a))})(a,n,t),readOnly:r,classNames:t,allowDragDrop:s})},a))})(),ue={...ZA,...S},{name:ce,id:de}=e,fe=!1===f?eL:x,pe=r?null:m.jsxs("div",{className:ue.tagInput,children:[m.jsx("input",{...C,ref:e=>{W.current=e},className:ue.tagInputField,type:"text",placeholder:y,"aria-label":y,onFocus:te,onBlur:ne,onChange:J,onKeyDown:re,onPaste:ae,name:ce,id:de,maxLength:k,value:_,"data-automation":"input","data-testid":"input"}),m.jsx(uL,{query:O.trim(),suggestions:N,labelField:o,selectedIndex:I,handleClick:e=>{ie(N[e])},handleHover:e=>{A(e),F(!0)},minQueryLength:l,shouldRenderSuggestions:u,isFocused:T,classNames:ue,renderSuggestion:e.renderSuggestion}),E&&w.length>0&&m.jsx(iL,{"aria-label":j?.clearAllLabel,classNames:ue,onClick:()=>{e.onClearAll&&e.onClearAll(),U(""),Q()}}),V&&m.jsxs("div",{"data-testid":"error",className:"ReactTags__error",children:[m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:"24",width:"24",fill:"#e03131",children:m.jsx("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})}),V]})]});return m.jsxs("div",{className:(0,cL.default)(ue.tags,"react-tags-wrapper"),ref:q,children:[m.jsx("p",{role:"alert",className:"sr-only",style:{position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",margin:"-1px",padding:0,width:"1px",height:"1px",border:0},children:z}),fe===JA&&pe,m.jsxs("div",{className:ue.selected,children:[le,fe===XA&&pe]}),fe===eL&&pe]})},fL=e=>{const{placeholder:t=KA,labelField:n=QA,suggestions:r=[],delimiters:o=[],separators:a=(e.delimiters?.length?[]:[GA.ENTER,GA.TAB]),autofocus:i,autoFocus:s=!0,inline:l,inputFieldPosition:u="inline",allowDeleteFromEmptyInput:c=!1,allowAdditionFromPaste:d=!0,autocomplete:f=!1,readOnly:p=!1,allowUnique:h=!0,allowDragDrop:g=!0,tags:y=[],inputProps:v={},editable:b=!1,clearAll:w=!1,ariaAttrs:x={clearAllLabel:"clear all tags"},handleDelete:C,handleAddition:S,onTagUpdate:k,handleDrag:_,handleFilterSuggestions:E,handleTagClick:j,handleInputChange:N,handleInputFocus:R,handleInputBlur:O,minQueryLength:P,shouldRenderSuggestions:T,removeComponent:D,onClearAll:M,classNames:I,name:A,id:L,maxLength:F,inputValue:z,maxTags:$,renderSuggestion:H}=e;return m.jsx(dL,{placeholder:t,labelField:n,suggestions:r,delimiters:o,separators:a,autofocus:i,autoFocus:s,inline:l,inputFieldPosition:u,allowDeleteFromEmptyInput:c,allowAdditionFromPaste:d,autocomplete:f,readOnly:p,allowUnique:h,allowDragDrop:g,tags:y,inputProps:v,editable:b,clearAll:w,ariaAttrs:x,handleDelete:C,handleAddition:S,onTagUpdate:k,handleDrag:_,handleFilterSuggestions:E,handleTagClick:j,handleInputChange:N,handleInputFocus:R,handleInputBlur:O,minQueryLength:P,shouldRenderSuggestions:T,removeComponent:D,onClearAll:M,classNames:I,name:A,id:L,maxLength:F,inputValue:z,maxTags:$,renderSuggestion:H})},pL=({...e})=>m.jsx(ET,{backend:SD,children:m.jsx(fL,{...e})});
|
|
223
|
+
`;var Fj=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});D.forwardRef((e,t)=>m.jsx(hi.span,{...e,ref:t,style:{...Fj,...e.style}})).displayName="VisuallyHidden";var zj=[" ","Enter","ArrowUp","ArrowDown"],$j=[" ","Enter"],Hj="Select",[Bj,Vj,Uj]=gi(Hj),[qj]=ai(Hj,[Uj,zl]),Wj=zl(),[Yj,Gj]=qj(Hj),[Kj,Qj]=qj(Hj),Zj=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:h}=e,g=Wj(t),[y,v]=D.useState(null),[b,w]=D.useState(null),[x,C]=D.useState(!1),S=vi(u),[k,_]=ui({prop:r,defaultProp:o??!1,onChange:a,caller:Hj}),[E,j]=ui({prop:i,defaultProp:s,onChange:l,caller:Hj}),N=D.useRef(null),R=!y||(h||!!y.closest("form")),[O,P]=D.useState(new Set),T=Array.from(O).map(e=>e.props.value).join(";");return m.jsx(tu,{...g,children:m.jsxs(Yj,{required:p,scope:t,trigger:y,onTriggerChange:v,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:x,onValueNodeHasChildrenChange:C,contentId:Ui(),value:E,onValueChange:j,open:k,onOpenChange:_,dir:S,triggerPointerDownPosRef:N,disabled:f,children:[m.jsx(Bj.Provider,{scope:t,children:m.jsx(Kj,{scope:e.__scopeSelect,onNativeOptionAdd:D.useCallback(e=>{P(t=>new Set(t).add(e))},[]),onNativeOptionRemove:D.useCallback(e=>{P(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:n})}),R?m.jsxs(LN,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:E,onChange:e=>j(e.target.value),disabled:f,form:h,children:[void 0===E?m.jsx("option",{value:""}):null,Array.from(O)]},T):null]})})};Zj.displayName=Hj;var Xj="SelectTrigger",Jj=D.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Wj(n),i=Gj(Xj,n),s=i.disabled||r,l=oi(t,i.onTriggerChange),u=Vj(n),c=D.useRef("touch"),[d,f,p]=zN(e=>{const t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===i.value),r=$N(t,e,n);void 0!==r&&i.onValueChange(r.value)}),h=e=>{s||(i.onOpenChange(!0),p()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return m.jsx(nu,{asChild:!0,...a,children:m.jsx(hi.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":FN(i.value)?"":void 0,...o,ref:l,onClick:ti(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==c.current&&h(e)}),onPointerDown:ti(o.onPointerDown,e=>{c.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())}),onKeyDown:ti(o.onKeyDown,e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||zj.includes(e.key)&&(h(),e.preventDefault())})})})});Jj.displayName=Xj;var eN="SelectValue",tN=D.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,l=Gj(eN,n),{onValueNodeHasChildrenChange:u}=l,c=void 0!==a,d=oi(t,l.onValueNodeChange);return si(()=>{u(c)},[u,c]),m.jsx(hi.span,{...s,ref:d,style:{pointerEvents:"none"},children:FN(l.value)?m.jsx(m.Fragment,{children:i}):a})});tN.displayName=eN;var nN=D.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(hi.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nN.displayName="SelectIcon";var rN=e=>m.jsx(au,{asChild:!0,...e});rN.displayName="SelectPortal";var oN="SelectContent",aN=D.forwardRef((e,t)=>{const n=Gj(oN,e.__scopeSelect),[r,o]=D.useState();if(si(()=>{o(new DocumentFragment)},[]),!n.open){const t=r;return t?sr.createPortal(m.jsx(sN,{scope:e.__scopeSelect,children:m.jsx(Bj.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),t):null}return m.jsx(cN,{...e,ref:t})});aN.displayName=oN;var iN=10,[sN,lN]=qj(oN),uN=ci("SelectContent.RemoveScroll"),cN=D.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:y,...v}=e,b=Gj(oN,n),[w,x]=D.useState(null),[C,S]=D.useState(null),k=oi(t,e=>x(e)),[_,E]=D.useState(null),[j,N]=D.useState(null),R=Vj(n),[O,P]=D.useState(!1),T=D.useRef(!1);D.useEffect(()=>{if(w)return Tu(w)},[w]),Oi();const M=D.useCallback(e=>{const[t,...n]=R().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&C&&(C.scrollTop=0),n===r&&C&&(C.scrollTop=C.scrollHeight),n?.focus(),document.activeElement!==o)return}},[R,C]),I=D.useCallback(()=>M([_,w]),[M,_,w]);D.useEffect(()=>{O&&I()},[O,I]);const{onOpenChange:A,triggerPointerDownPosRef:L}=b;D.useEffect(()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),L.current=null};return null!==L.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[w,A,L]),D.useEffect(()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[A]);const[F,z]=zN(e=>{const t=R().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=$N(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),$=D.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&(E(e),r&&(T.current=!0))},[b.value]),H=D.useCallback(()=>w?.focus(),[w]),B=D.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&N(e)},[b.value]),V="popper"===r?fN:dN,U=V===fN?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:y}:{};return m.jsx(sN,{scope:n,content:w,viewport:C,onViewportChange:S,itemRefCallback:$,selectedItem:_,onItemLeave:H,itemTextRefCallback:B,focusSelectedItem:I,selectedItemText:j,position:r,isPositioned:O,searchRef:F,children:m.jsx(wc,{as:uN,allowPinchZoom:!0,children:m.jsx(Ii,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ti(o,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:m.jsx(_i,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:m.jsx(V,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...v,...U,onPlaced:()=>P(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ti(v.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=R().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});cN.displayName="SelectContentImpl";var dN=D.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Gj(oN,n),i=lN(oN,n),[s,l]=D.useState(null),[u,c]=D.useState(null),d=oi(t,e=>c(e)),f=Vj(n),p=D.useRef(!1),h=D.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:v,focusSelectedItem:b}=i,w=D.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&y&&v){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,l=e.width+i,u=Math.max(l,t.width),c=window.innerWidth-iN,d=Aj(a,[iN,Math.max(iN,c-u)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,l=e.width+i,u=Math.max(l,t.width),c=window.innerWidth-iN,d=Aj(a,[iN,Math.max(iN,c-u)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=f(),l=window.innerHeight-2*iN,c=g.scrollHeight,d=window.getComputedStyle(u),h=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+m+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*y.offsetHeight,w),C=window.getComputedStyle(g),S=parseInt(C.paddingTop,10),k=parseInt(C.paddingBottom,10),_=e.top+e.height/2-iN,E=l-_,j=y.offsetHeight/2,N=h+m+(y.offsetTop+j),R=w-N;if(N<=_){const e=i.length>0&&y===i[i.length-1].ref.current;s.style.bottom="0px";const t=u.clientHeight-g.offsetTop-g.offsetHeight,n=N+Math.max(E,j+(e?k:0)+t+b);s.style.height=n+"px"}else{const e=i.length>0&&y===i[0].ref.current;s.style.top="0px";const t=Math.max(_,h+g.offsetTop+(e?S:0)+j)+R;s.style.height=t+"px",g.scrollTop=N-_+g.offsetTop}s.style.margin=`${iN}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,g,y,v,a.dir,r]);si(()=>w(),[w]);const[x,C]=D.useState();si(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const S=D.useCallback(e=>{e&&!0===h.current&&(w(),b?.(),h.current=!1)},[w,b]);return m.jsx(pN,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:m.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:m.jsx(hi.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});dN.displayName="SelectItemAlignedPosition";var fN=D.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=iN,...a}=e,i=Wj(n);return m.jsx(ru,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});fN.displayName="SelectPopperPosition";var[pN,hN]=qj(oN,{}),mN="SelectViewport",gN=D.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=lN(mN,n),i=hN(mN,n),s=oi(t,a.onViewportChange),l=D.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),m.jsx(Bj.Slot,{scope:n,children:m.jsx(hi.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ti(o.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(r?.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*iN,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});gN.displayName=mN;var yN="SelectGroup",[vN,bN]=qj(yN);D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ui();return m.jsx(vN,{scope:n,id:o,children:m.jsx(hi.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=yN;var wN="SelectLabel",xN=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=bN(wN,n);return m.jsx(hi.div,{id:o.id,...r,ref:t})});xN.displayName=wN;var CN="SelectItem",[SN,kN]=qj(CN),_N=D.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Gj(CN,n),l=lN(CN,n),u=s.value===r,[c,d]=D.useState(a??""),[f,p]=D.useState(!1),h=oi(t,e=>l.itemRefCallback?.(e,r,o)),g=Ui(),y=D.useRef("touch"),v=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(SN,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:D.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:m.jsx(Bj.ItemSlot,{scope:n,value:r,disabled:o,textValue:c,children:m.jsx(hi.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:h,onFocus:ti(i.onFocus,()=>p(!0)),onBlur:ti(i.onBlur,()=>p(!1)),onClick:ti(i.onClick,()=>{"mouse"!==y.current&&v()}),onPointerUp:ti(i.onPointerUp,()=>{"mouse"===y.current&&v()}),onPointerDown:ti(i.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:ti(i.onPointerMove,e=>{y.current=e.pointerType,o?l.onItemLeave?.():"mouse"===y.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ti(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:ti(i.onKeyDown,e=>{""!==l.searchRef?.current&&" "===e.key||($j.includes(e.key)&&v()," "===e.key&&e.preventDefault())})})})})});_N.displayName=CN;var EN="SelectItemText",jN=D.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Gj(EN,n),s=lN(EN,n),l=kN(EN,n),u=Qj(EN,n),[c,d]=D.useState(null),f=oi(t,e=>d(e),l.onItemTextChange,e=>s.itemTextRefCallback?.(e,l.value,l.disabled)),p=c?.textContent,h=D.useMemo(()=>m.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=u;return si(()=>(g(h),()=>y(h)),[g,y,h]),m.jsxs(m.Fragment,{children:[m.jsx(hi.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?sr.createPortal(a.children,i.valueNode):null]})});jN.displayName=EN;var NN="SelectItemIndicator",RN=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kN(NN,n).isSelected?m.jsx(hi.span,{"aria-hidden":!0,...r,ref:t}):null});RN.displayName=NN;var ON="SelectScrollUpButton",PN=D.forwardRef((e,t)=>{const n=lN(ON,e.__scopeSelect),r=hN(ON,e.__scopeSelect),[o,a]=D.useState(!1),i=oi(t,r.onScrollButtonChange);return si(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?m.jsx(MN,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});PN.displayName=ON;var TN="SelectScrollDownButton",DN=D.forwardRef((e,t)=>{const n=lN(TN,e.__scopeSelect),r=hN(TN,e.__scopeSelect),[o,a]=D.useState(!1),i=oi(t,r.onScrollButtonChange);return si(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?m.jsx(MN,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});DN.displayName=TN;var MN=D.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=lN("SelectScrollButton",n),i=D.useRef(null),s=Vj(n),l=D.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return D.useEffect(()=>()=>l(),[l]),si(()=>{const e=s().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[s]),m.jsx(hi.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ti(o.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:ti(o.onPointerMove,()=>{a.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:ti(o.onPointerLeave,()=>{l()})})}),IN=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(hi.div,{"aria-hidden":!0,...r,ref:t})});IN.displayName="SelectSeparator";var AN="SelectArrow";D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wj(n),a=Gj(AN,n),i=lN(AN,n);return a.open&&"popper"===i.position?m.jsx(ou,{...o,...r,ref:t}):null}).displayName=AN;var LN=D.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=D.useRef(null),a=oi(r,o),i=Lj(t);return D.useEffect(()=>{const e=o.current;if(!e)return;const n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value").set;if(i!==t&&r){const n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[i,t]),m.jsx(hi.select,{...n,style:{...Fj,...n.style},ref:a,defaultValue:t})});function FN(e){return""===e||void 0===e}function zN(e){const t=bi(e),n=D.useRef(""),r=D.useRef(0),o=D.useCallback(e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=D.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function $N(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,a=n?e.indexOf(n):-1;let i=(s=e,l=Math.max(a,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===o.length&&(i=i.filter(e=>e!==n));const u=i.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}LN.displayName="SelectBubbleInput";var HN=Jj,BN=nN,VN=rN,UN=aN,qN=gN,WN=xN,YN=_N,GN=jN,KN=RN,QN=PN,ZN=DN,XN=IN;const JN=Zj,eR=tN,tR=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(HN,{ref:r,className:Ya("flex h-10 w-full items-center hover:border-[#BFD7FE] justify-between rounded-md border focus:border-primary border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 ",e),...n,children:[t,m.jsx(BN,{asChild:!0,children:m.jsx(jf,{className:"h-4 w-4 opacity-50"})})]}));tR.displayName=HN.displayName;const nR=D.forwardRef(({className:e,...t},n)=>m.jsx(QN,{ref:n,className:Ya("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Rf,{className:"h-4 w-4"})}));nR.displayName=QN.displayName;const rR=D.forwardRef(({className:e,...t},n)=>m.jsx(ZN,{ref:n,className:Ya("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(jf,{className:"h-4 w-4"})}));rR.displayName=ZN.displayName;const oR=D.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>{const{portalRef:a}=Pr();return m.jsx(VN,{container:a.current,children:m.jsxs(UN,{ref:o,className:Ya("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[m.jsx(nR,{}),m.jsx(qN,{className:Ya("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),m.jsx(rR,{})]})})});oR.displayName=UN.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(WN,{ref:n,className:Ya("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})).displayName=WN.displayName;const aR=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(YN,{ref:r,className:Ya("relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-primary/20 cursor-pointer focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",e),...n,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(KN,{children:m.jsx(Ef,{className:"h-4 w-4"})})}),m.jsx(GN,{children:t})]}));aR.displayName=YN.displayName;function iR({label:e,addonLabel:t,type:n,placeholder:r,selectPlaceholder:o,error:a,success:i,value:s,defaultValue:l,name:u,id:c,formik:d,onChange:f,inputRef:p,onBlur:h,required:g,disabled:y,loading:v,showError:b,selectOptions:w,disableSearch:x,searchSelectPlaceholder:C,showSelectSearch:S,onSelectValueChange:k,selectValue:_,showOutline:E=!0,cols:j,rows:N,labelClass:R,addonLabelClass:O,optional:P,info:T,addonInfo:M,icon:I,actionIcon:A,actionLabel:L,actionLabelInfo:F,actionLabelAction:z,className:$,textAreaOnChange:H,addOn:B,infoAlignment:V,addonInfoAlignment:U,inputContainerClass:q,showNegative:W,showPositive:Y,...G}){const[K,Q]=D.useState(n),[Z,X]=D.useState(!1),[J,ee]=D.useState(""),te=((e,t)=>{const n=e?.filter(e=>"string"==typeof e.label?e.label?.toLowerCase().includes(t.toLowerCase()):e.value?.toLowerCase().includes(t.toLowerCase())||e?.searchId?.toLowerCase().includes(t.toLowerCase()));return t?n:e})(w??[],J);return m.jsx(m.Fragment,{children:v?m.jsx(ei,{className:"w-full h-12"}):m.jsx("div",{className:"w-full",children:m.jsxs("div",{className:`flex flex-col ${e&&"gap-2.5"} relative `,children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[t&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",O),children:[t," ",g?m.jsx("span",{className:"text-[#E12D39]",children:t&&"*"}):P?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,M&&m.jsx(kb,{fieldName:t,align:U,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:M})})]}),e&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",R),children:[e," ",g?m.jsx("span",{className:"text-[#E12D39]",children:e&&"*"}):P?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,T&&m.jsx(kb,{fieldName:e,align:V,children:m.jsx("p",{className:"font-normal first-letter:uppercase w-full whitespace-pre-wrap",children:T})})]}),L&&m.jsxs("button",{onClick:z,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-bold",children:[A,L,F&&m.jsx(kb,{fieldName:e,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:F})})]})]}),m.jsxs("div",{className:Ya(`border overflow-hidden rounded-md text-sm border-[#E1E3EA] hover:border-primary_light font-normal text-grey-950 flex gap-2 items-center bg-white px-3 ${"text-area"!==n&&"h-12"} ${(a||b)&&"!border-danger"} ${i&&"!border-success"} ${Z&&E&&"!border-primary"}\n ${I&&"px-2"}\n ${B&&"px-0"}\n `,y?"cursor-not-allowed bg-gray-200":null,w?"px-0":null,q),children:[B&&m.jsx("span",{className:"bg-gray-200 text-[13px] font-semibold text-gray-700 h-full min-w-[38px] flex items-center justify-center shrink-0 rounded-l-md px-2 ",children:B}),I,w&&m.jsxs(JN,{onValueChange:k,defaultValue:_,value:_,children:[m.jsx(tR,{disabled:x,className:" min-w-max w-max h-full border-0 border-r rounded-none hover:border-neutral-200 focus:border-neutral-200 bg-[#F9F9F9] hover:border-b-neutral-200 disabled:opacity-100 ",children:m.jsx(eR,{className:" text-sm text-[#5E6278] placeholder:font-medium outline-none",placeholder:o})}),m.jsxs(oR,{className:"bg-white w-full relative",children:[S&&m.jsx("input",{value:J,onChange:e=>{ee(e.target.value.toString())},placeholder:C??"Search...",className:"h-10 border mb-2 text-sm px-4 outline-none w-full border-neutral-200 rounded bg-white sticky top-0 z-20"}),te?.map((e,t)=>m.jsx(aR,{className:"text-sm",value:e.value,children:e.label},e.value))]})]}),"text-area"===n?m.jsx("textarea",{cols:j,rows:N,onFocus:()=>X(!0),onBlur:e=>{X(!1)},placeholder:r,className:Ya(`placeholder:text-[#7E8299] hover:border-primary_light py-2 h-full placeholder:font-medium outline-none w-full rounded ${y?"bg-[#EEEFF2] cursor-not-allowed":null} ${Z&&E&&"!border-primary"} transition-all ease-in-out`,$),...G,value:s,name:u,onChange:H}):m.jsx("input",{onInput:e=>{const t=e.target;"number"===n&&(t.value=t.value.replace(/[^0-9.]/g,""),t.value=t.value.replace(/^\.|(\..*)\./g,"$1"),t.value.length>1&&t.value.startsWith("0")&&"."!==t.value[1]&&(t.value=t.value.replace(/^0+/,"")),""!==t.value&&"0"!==t.value||(t.value="0"))},type:"number"===K?"text":K,placeholder:r,className:Ya("placeholder:text-[#7E8299] h-full placeholder:font-medium outline-none w-full rounded disabled:cursor-not-allowed",w&&"number"===n?"pr-2":null,I||B?"pr-0":null,w&&"number"===n&&t&&"text-right pr-2",$,Y&&"0"!==s?.toString().trim()?"text-green-600 font-semibold":"",W&&s?.toString().trim().startsWith("-")?"text-red-600 font-semibold":""),onFocus:()=>X(!0),onBlur:e=>{d&&h&&d&&h(e),X(!1)},value:s||"",defaultValue:l,onChange:f,id:c,name:u,required:g,disabled:y,ref:p,...G}),"password"===n&&m.jsx("span",{className:"cursor-pointer",onClick:()=>{Q(e=>"password"===e?"text":"password")},children:"password"===K?Kv.eyeslash:Kv.eye})]}),a&&m.jsx("p",{className:"text-danger text-xs font-normal",children:a})]})})})}function sR({value:e,label:t,placeholder:n,uuid:r,name:o,displayValue:a,valueType:i,item_unit:s}){const{mutate:l,isPending:u}=Gx();J();const[c,d]=D.useState(!1),[f,p]=D.useState({item_uuid:r,[o]:e});tr();const[h,g]=D.useState("");return m.jsxs(Ak,{open:c,onOpenChange:d,children:[m.jsx(Lk,{className:"flex items-center",children:m.jsx("button",{className:"hover:text-primary duration-150 underline disabled:no-underline disabled:hover:text-inherit",children:h?"selling_price"===o?Jv(+h):eb(+h)+s:a})}),m.jsxs(Fk,{align:"center",className:"shadow-[0_1px_2px_0px_#E4E5E73D,_0_12px_24px_0_#868C981F] space-y-2 bg-white rounded-xl p-3 w-[280px] relative before:absolute before:w-3 before:h-1.5 before:bg-white before:left-1/2 before:-translate-x-1/2 before:rotate-45 data-[side=bottom]:before:top-0 data-[side=top]:before:bottom-0",children:[m.jsx(iR,{type:i,value:f[o],label:t,placeholder:n,onChange:e=>{p(t=>({...t,[o]:e.target.value}))}}),m.jsxs("div",{className:"flex justify-end gap-2.5",children:[m.jsx(Tk,{children:m.jsx(Mj,{label:"Dismiss",className:"bg-gray-300 text-dark text-sm hover:bg-gray-300/90 font-medium",disabled:u})}),m.jsx(Mj,{label:"Update",className:"text-sm font-medium",onClick:()=>{l({url:"/items/update_basic",payload:f},{onSuccess:()=>{g(f[o]),d(!1)},onError:()=>{g("")}})},loading:u})]})]})]})}D.forwardRef(({className:e,...t},n)=>m.jsx(XN,{ref:n,className:Ya("-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800",e),...t})).displayName=XN.displayName;var lR="Tabs",[uR]=ai(lR,[mu]),cR=mu(),[dR,fR]=uR(lR),pR=D.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=vi(s),[d,f]=ui({prop:r,onChange:o,defaultProp:a??"",caller:lR});return m.jsx(dR,{scope:n,baseId:Ui(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:m.jsx(hi.div,{dir:c,"data-orientation":i,...u,ref:t})})});pR.displayName=lR;var hR="TabsList",mR=D.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=fR(hR,n),i=cR(n);return m.jsx(ku,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:m.jsx(hi.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});mR.displayName=hR;var gR="TabsTrigger",yR=D.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=fR(gR,n),s=cR(n),l=wR(i.baseId,r),u=xR(i.baseId,r),c=r===i.value;return m.jsx(_u,{asChild:!0,...s,focusable:!o,active:c,children:m.jsx(hi.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:ti(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)}),onKeyDown:ti(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)}),onFocus:ti(e.onFocus,()=>{const e="manual"!==i.activationMode;c||o||!e||i.onValueChange(r)})})})});yR.displayName=gR;var vR="TabsContent",bR=D.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=fR(vR,n),l=wR(s.baseId,r),u=xR(s.baseId,r),c=r===s.value,d=D.useRef(c);return D.useEffect(()=>{const e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),m.jsx(iu,{present:o||c,children:({present:n})=>m.jsx(hi.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:n&&a})})});function wR(e,t){return`${e}-trigger-${t}`}function xR(e,t){return`${e}-content-${t}`}bR.displayName=vR;var CR=mR,SR=yR,kR=bR;const _R=pR,ER=D.forwardRef(({className:e,...t},n)=>m.jsx(CR,{ref:n,className:Ya("inline-flex h-10 items-center justify-center rounded-md bg-neutral-100 p-1 text-neutral-500 dark:bg-neutral-800 dark:text-neutral-400",e),...t}));ER.displayName=CR.displayName;const jR=D.forwardRef(({className:e,...t},n)=>m.jsx(SR,{ref:n,className:Ya("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-neutral-950 data-[state=active]:shadow-sm dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300 dark:data-[state=active]:bg-neutral-950 dark:data-[state=active]:text-neutral-50",e),...t}));jR.displayName=SR.displayName;const NR=D.forwardRef(({className:e,...t},n)=>m.jsx(kR,{ref:n,className:Ya("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-offset-2 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300",e),...t}));NR.displayName=kR.displayName;var RR,OR={};function PR(){if(RR)return OR;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}RR=1,Object.defineProperty(OR,"__esModule",{value:!0}),OR.Collapse=void 0;var t,n=(t=f())&&t.__esModule?t:{default:t};function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function a(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,o=s(t);if(n){var a=s(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return i(t)}(this,r)}}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,e);var t=a(s);function s(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),l(i(n=t.call(this,e)),"timeout",void 0),l(i(n),"container",void 0),l(i(n),"content",void 0),l(i(n),"onResize",function(){if(clearTimeout(n.timeout),n.container&&n.content){var e=n.props,t=e.isOpened,r=e.checkTimeout,o=Math.floor(n.container.clientHeight),a=Math.floor(n.content.clientHeight),i=t&&Math.abs(a-o)<=1,s=!t&&Math.abs(o)<=1;i||s?n.onRest({isFullyOpened:i,isFullyClosed:s,isOpened:t,containerHeight:o,contentHeight:a}):(n.onWork({isFullyOpened:i,isFullyClosed:s,isOpened:t,containerHeight:o,contentHeight:a}),n.timeout=setTimeout(function(){return n.onResize()},r))}}),l(i(n),"onRest",function(e){var t=e.isFullyOpened,r=e.isFullyClosed,o=e.isOpened,a=e.containerHeight,i=e.contentHeight;if(n.container&&n.content){var s=o&&n.container.style.height==="".concat(i,"px"),l=!o&&"0px"===n.container.style.height;if(s||l){n.container.style.overflow=o?"initial":"hidden",n.container.style.height=o?"auto":"0px";var u=n.props.onRest;u&&u({isFullyOpened:t,isFullyClosed:r,isOpened:o,containerHeight:a,contentHeight:i})}}}),l(i(n),"onWork",function(e){var t=e.isFullyOpened,r=e.isFullyClosed,o=e.isOpened,a=e.containerHeight,i=e.contentHeight;if(n.container&&n.content){var s=o&&n.container.style.height==="".concat(i,"px"),l=!o&&"0px"===n.container.style.height;if(!s&&!l){n.container.style.overflow="hidden",n.container.style.height=o?"".concat(i,"px"):"0px";var u=n.props.onWork;u&&u({isFullyOpened:t,isFullyClosed:r,isOpened:o,containerHeight:a,contentHeight:i})}}}),l(i(n),"onRefContainer",function(e){n.container=e}),l(i(n),"onRefContent",function(e){n.content=e}),e.initialStyle?n.initialStyle=e.initialStyle:n.initialStyle=e.isOpened?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"},n}return r(s,[{key:"componentDidMount",value:function(){this.onResize()}},{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.theme,r=t.isOpened;return t.children!==e.children||r!==e.isOpened||Object.keys(n).some(function(t){return n[t]!==e.theme[t]})}},{key:"getSnapshotBeforeUpdate",value:function(){if(!this.container||!this.content)return null;if("auto"===this.container.style.height){var e=this.content.clientHeight;this.container.style.height="".concat(e,"px")}return null}},{key:"componentDidUpdate",value:function(){this.onResize()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"render",value:function(){var e=this.props,t=e.theme,r=e.children,o=e.isOpened;return n.default.createElement("div",{ref:this.onRefContainer,className:t.collapse,style:this.initialStyle,"aria-hidden":!o},n.default.createElement("div",{ref:this.onRefContent,className:t.content},r))}}]),s}(n.default.Component);return OR.Collapse=u,l(u,"defaultProps",{theme:{collapse:"ReactCollapse--collapse",content:"ReactCollapse--content"},initialStyle:void 0,onRest:void 0,onWork:void 0,checkTimeout:50}),OR}var TR,DR,MR,IR={};function AR(){if(TR)return IR;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}TR=1,Object.defineProperty(IR,"__esModule",{value:!0}),IR.UnmountClosed=void 0;var t,n=(t=f())&&t.__esModule?t:{default:t},r=PR(),o=["isOpened"],a=["isOpened"];function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,o=m(t);if(n){var a=m(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}(this,r)}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t=p(s);function s(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),g(h(n=t.call(this,e)),"onWork",function(e){var t=e.isOpened,r=u(e,o);n.setState({isResting:!1,isOpened:t});var a=n.props.onWork;a&&a(l({isOpened:t},r))}),g(h(n),"onRest",function(e){var t=e.isOpened,r=u(e,a);n.setState({isResting:!0,isOpened:t,isInitialRender:!1});var o=n.props.onRest;o&&o(l({isOpened:t},r))}),g(h(n),"getInitialStyle",function(){var e=n.state,t=e.isOpened;return e.isInitialRender&&t?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"}}),n.state={isResting:!0,isOpened:e.isOpened,isInitialRender:!0},n}return c(s,[{key:"componentDidUpdate",value:function(e){var t=this.props.isOpened;e.isOpened!==t&&this.setState({isResting:!1,isOpened:t,isInitialRender:!1})}},{key:"render",value:function(){var e=this.state,t=e.isResting,o=e.isOpened;return t&&!o?null:n.default.createElement(r.Collapse,i({},this.props,{initialStyle:this.getInitialStyle(),onWork:this.onWork,onRest:this.onRest}))}}]),s}(n.default.PureComponent);return IR.UnmountClosed=y,g(y,"defaultProps",{onWork:void 0,onRest:void 0}),IR}var LR=function(){if(MR)return DR;MR=1;var e=PR().Collapse,t=AR().UnmountClosed;return DR=t,t.Collapse=e,t.UnmountClosed=t,DR}(),FR="Switch",[zR]=ai(FR),[$R,HR]=zR(FR),BR=D.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,p]=D.useState(null),h=oi(t,e=>p(e)),g=D.useRef(!1),y=!f||(c||!!f.closest("form")),[v,b]=ui({prop:o,defaultProp:a??!1,onChange:u,caller:FR});return m.jsxs($R,{scope:n,checked:v,disabled:s,children:[m.jsx(hi.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":WR(v),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onClick:ti(e.onClick,e=>{b(e=>!e),y&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})}),y&&m.jsx(qR,{control:f,bubbles:!g.current,name:r,value:l,checked:v,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});BR.displayName=FR;var VR="SwitchThumb",UR=D.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=HR(VR,n);return m.jsx(hi.span,{"data-state":WR(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});UR.displayName=VR;var qR=D.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=D.useRef(null),s=oi(i,a),l=Lj(n),u=Al(t);return D.useEffect(()=>{const e=i.current;if(!e)return;const t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}},[l,n,r]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function WR(e){return e?"checked":"unchecked"}qR.displayName="SwitchBubbleInput";var YR=BR,GR=UR;const KR=D.forwardRef(({className:e,loading:t,...n},r)=>m.jsx(m.Fragment,{children:t?m.jsx(ei,{className:"w-11 h-6"}):m.jsx(YR,{className:Ya("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-neutral-200 dark:focus-visible:ring-neutral-300 dark:focus-visible:ring-offset-neutral-950 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=unchecked]:bg-neutral-800",e),...n,ref:r,children:m.jsx(GR,{className:Ya("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-neutral-950")})})}));function QR({children:e,sessionName:t,info:n,className:r,defaultOpen:o=!1}){const[a,i]=D.useState(o);return D.useEffect(()=>{i(o)},[o]),m.jsxs("div",{className:Ya("flex flex-col duration-300 ",a?"gap-5":"gap-0"),children:[m.jsxs("div",{className:"flex gap-2.5 items-center",children:[m.jsxs("h1",{className:Ya("text-dark font-medium text-sm flex gap-1 items-center first-letter:uppercase",r),children:[t,m.jsx(kb,{fieldName:t,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:n})})]}),m.jsx(KR,{checked:a,onClick:()=>i(!a)})]}),m.jsx(LR.Collapse,{isOpened:a,className:"pt-5",children:e})]})}function ZR(){const e=J(),{itemStoreData:t,editMode:n,fetchingItem:r,canBeDeletedFields:o}=ne(e=>e.items),[a,i]=D.useState(t.barcode??[""]);M.useEffect(()=>{n&&i(o?.barcode?.map(e=>e.barcode)??[])},[r]);const[s,l]=D.useState([]);D.useEffect(()=>{n&&e(Wt({field:"deletedBarcode",value:s}))},[s]);return D.useEffect(()=>{(1!==a.length||""!==a[0])&&e(Wt({field:"barcode",value:a}))},[a]),m.jsx(QR,{sessionName:"Barcode & SKU",info:"Enter the unique barcode or SKU (Stock Keeping Unit) for this item. This helps in tracking inventory, facilitating faster checkouts, and managing stock more efficiently.",defaultOpen:n&&a.length>=0&&""!==a[0]||n&&""!==t.sku,children:m.jsxs("div",{className:" grid grid-cols-2 gap-5",children:[m.jsxs("div",{className:"space-y-4",children:[a.map((e,t)=>m.jsxs("div",{className:"flex items-end gap-2.5",children:[m.jsx(iR,{type:"text",label:"Barcode",info:"Scan or manually enter the item's barcode. This allows for quick identification and tracking of the item during sales and inventory management.",placeholder:"Type barcode",value:e,onChange:e=>((e,t)=>{const n=[...a];n[e]=t,i(n)})(t,e.target.value)}),m.jsx("button",{className:" py-3",onClick:()=>(e=>{const t=a.filter((t,n)=>e!==n),n=a.filter((t,n)=>e===n),r=o?.barcode?.filter(e=>n.includes(e.barcode))||[];i(t),l([...s,...r.map(e=>e.id)])})(t),children:Kv.trash2})]},t)),m.jsx(Mj,{mode:"text",label:"Add another barcode",left_addon:Kv.plus_squared2,onClick:()=>{i(e=>[...e,""])},className:"font-medium text-sm"})]}),m.jsx(iR,{type:"text",label:"SKU",info:"Enter the unique Stock Keeping Unit (SKU) for this item. This code helps in identifying and tracking the item within your inventory system.",value:t.sku,placeholder:"Add SKU",onChange:t=>e(Wt({field:"sku",value:t.target.value}))})]})})}function XR(e,t){return e===t}function JR(e,t,n){var r=XR,o=D.useRef(e),a=D.useState({})[1],i=function(e,t,n,r){var o=this,a=D.useRef(null),i=D.useRef(0),s=D.useRef(0),l=D.useRef(null),u=D.useRef([]),c=D.useRef(),d=D.useRef(),f=D.useRef(e),p=D.useRef(!0),h=D.useRef(),m=D.useRef();f.current=e;var g="undefined"!=typeof window,y=!t&&0!==t&&g;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var v=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,w=!!n.flushOnExit&&b,x="maxWait"in n,C="debounceOnServer"in n&&!!n.debounceOnServer,S=x?Math.max(+n.maxWait||0,t):null,k=D.useMemo(function(){var e=function(e){var t=u.current,n=c.current;return u.current=c.current=null,i.current=e,s.current=s.current||e,d.current=f.current.apply(n,t)},n=function(e,t){y&&cancelAnimationFrame(l.current),l.current=y?requestAnimationFrame(e):setTimeout(e,t)},k=function(e){if(!p.current)return!1;var n=e-a.current;return!a.current||n>=t||n<0||x&&e-i.current>=S},_=function(t){return l.current=null,b&&u.current?e(t):(u.current=c.current=null,d.current)},E=function e(){var r=Date.now();if(v&&s.current===i.current&&j(),k(r))return _(r);if(p.current){var o=t-(r-a.current),l=x?Math.min(o,S-(r-i.current)):o;n(e,l)}},j=function(){r&&r({})},N=function(){if(g||C){var r,s=Date.now(),f=k(s);if(u.current=[].slice.call(arguments),c.current=o,a.current=s,w&&!h.current&&(h.current=function(){var e;"hidden"===(null==(e=global.document)?void 0:e.visibilityState)&&m.current.flush()},null==(r=global.document)||null==r.addEventListener||r.addEventListener("visibilitychange",h.current)),f){if(!l.current&&p.current)return i.current=a.current,n(E,t),v?e(a.current):d.current;if(x)return n(E,t),e(a.current)}return l.current||n(E,t),d.current}};return N.cancel=function(){var e=l.current;e&&(y?cancelAnimationFrame(l.current):clearTimeout(l.current)),i.current=0,u.current=a.current=c.current=l.current=null,e&&r&&r({})},N.isPending=function(){return!!l.current},N.flush=function(){return l.current?_(Date.now()):d.current},N},[v,x,t,S,b,w,y,g,C,r]);return m.current=k,D.useEffect(function(){return p.current=!0,function(){var e;w&&m.current.flush(),h.current&&(null==(e=global.document)||null==e.removeEventListener||e.removeEventListener("visibilitychange",h.current),h.current=null),p.current=!1}},[w]),k}(D.useCallback(function(e){o.current=e,a({})},[a]),t,n,a),s=D.useRef(e);return r(s.current,e)||(i(e),s.current=e),[o.current,i]}function eO({handleInputChange:e}){const t=(e,t)=>{if(!t)return e;const n=new RegExp(`(${t})`,"gi");return e.split(n).map((e,n)=>e.toLowerCase()===t.toLowerCase()?m.jsx("span",{className:"text-orange",children:e},n):e)},{itemStoreData:n,editMode:r,fetchingItem:o}=ne(e=>e.items),[a,i]=D.useState(""),[s]=JR(a,1e3),[l,u]=D.useState(!1),[c,d]=D.useState(!1),f=D.useRef(null),{data:p,isFetching:h}=Yx(["search_item_names",s],`/inventory/item/search/business/${a}`,{enabled:s.length>=2}),g=h,y=p?.data.data,v=e=>{f.current&&!f.current.contains(e.target)&&u(!1)};return D.useEffect(()=>(document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}),[]),m.jsxs("div",{className:"relative",ref:f,children:[m.jsx(iR,{type:"text",required:!0,placeholder:"e.g cocacola",info:"Enter the name of the item as it will appear in inventory, sales, and reports. Make it clear and recognizable.",label:"Item name",labelClass:"text-dark font-bold",name:"name",value:n.name,onChange:t=>{e("name",t.target.value),i(t.target.value),u(!0)},loading:o,onFocus:()=>u(!0)}),l&&a.length>=2&&m.jsx("div",{className:"absolute left-0 right-0 shadow-2xl p-5 rounded-md bg-white flex flex-col gap-2 overflow-auto max-h-[calc(100vh-200px)] z-20",children:g?[1,2,3].map((e,t)=>m.jsxs("div",{className:"flex justify-between border-b py-3 px-2",children:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx(ei,{className:"w-11 h-11 rounded-2xl"}),m.jsxs("div",{className:"space-y-1 max-w-[265px]",children:[m.jsx(ei,{className:"w-[250px] h-5 rounded-md"}),m.jsx(ei,{className:"w-[200px] h-5 rounded-md"})]})]}),m.jsxs("div",{className:"gap-1 flex flex-col items-end",children:[m.jsx(ei,{className:"w-[100px] h-5 rounded-md "}),m.jsx(ei,{className:"w-[150px] h-5 rounded-md"})]})]},t)):y?.length>0?y.map((n,r)=>m.jsxs("div",{className:"border-b py-3 flex justify-between gap-5 cursor-pointer hover:bg-gray-50 px-2 rounded-md duration-150 ",onClick:()=>{e("name",n.name),u(!1)},children:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx("div",{className:"w-11 h-11 rounded-2xl relative bg-gray-100 shrink-0",children:m.jsx("img",{src:n.images[0]?.image??"/assets/images/placeholder-image.svg",alt:"item image",className:"rounded-2xl object-cover w-full h-full",draggable:!1})}),m.jsxs("div",{className:"space-y-1 max-w-[265px]",children:[m.jsx("h1",{className:"text-dark text-sm font-semibold",children:t(n.name,a)}),m.jsxs("p",{className:"text-dark text-xs font-normal flex items-center gap-1",children:[m.jsx("span",{children:n.category[0]?.name})," |"," ",m.jsxs("span",{className:"text-primary",children:[n.quantity,n.item_unit]})]})]})]}),m.jsxs("div",{className:"space-y-1",children:[m.jsx("p",{className:"text-right text-primary font-semibold text-sm",children:Jv(parseFloat(n.selling_price))}),m.jsx("p",{className:"text-success text-sm",children:n.itemcode})]})]},r)):m.jsx("p",{className:"text-dark text-center h-24 ",children:" No results found."})})]})}KR.displayName=YR.displayName;var tO="ScrollArea",[nO]=ai(tO),[rO,oO]=nO(tO),aO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=D.useState(null),[u,c]=D.useState(null),[d,f]=D.useState(null),[p,h]=D.useState(null),[g,y]=D.useState(null),[v,b]=D.useState(0),[w,x]=D.useState(0),[C,S]=D.useState(!1),[k,_]=D.useState(!1),E=oi(t,e=>l(e)),j=vi(o);return m.jsx(rO,{scope:n,type:r,dir:j,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:C,onScrollbarXEnabledChange:S,scrollbarY:g,onScrollbarYChange:y,scrollbarYEnabled:k,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:x,children:m.jsx(hi.div,{dir:j,...i,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});aO.displayName=tO;var iO="ScrollAreaViewport",sO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=oO(iO,n),s=oi(t,D.useRef(null),i.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(hi.div,{"data-radix-scroll-area-viewport":"",...a,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});sO.displayName=iO;var lO="ScrollAreaScrollbar",uO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oO(lO,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s="horizontal"===e.orientation;return D.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),"hover"===o.type?m.jsx(cO,{...r,ref:t,forceMount:n}):"scroll"===o.type?m.jsx(dO,{...r,ref:t,forceMount:n}):"auto"===o.type?m.jsx(fO,{...r,ref:t,forceMount:n}):"always"===o.type?m.jsx(pO,{...r,ref:t}):null});uO.displayName=lO;var cO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oO(lO,e.__scopeScrollArea),[a,i]=D.useState(!1);return D.useEffect(()=>{const e=o.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(iu,{present:n||a,children:m.jsx(fO,{"data-state":a?"visible":"hidden",...r,ref:t})})}),dO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oO(lO,e.__scopeScrollArea),a="horizontal"===e.orientation,i=TO(()=>l("SCROLL_END"),100),[s,l]=function(e,t){return D.useReducer((e,n)=>t[e][n]??e,e)}("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return D.useEffect(()=>{if("idle"===s){const e=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,o.scrollHideDelay,l]),D.useEffect(()=>{const e=o.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[o.viewport,a,l,i]),m.jsx(iu,{present:n||"hidden"!==s,children:m.jsx(pO,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:ti(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ti(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),fO=D.forwardRef((e,t)=>{const n=oO(lO,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=D.useState(!1),s="horizontal"===e.orientation,l=TO(()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}},10);return DO(n.viewport,l),DO(n.content,l),m.jsx(iu,{present:r||a,children:m.jsx(pO,{"data-state":a?"visible":"hidden",...o,ref:t})})}),pO=D.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=oO(lO,e.__scopeScrollArea),a=D.useRef(null),i=D.useRef(0),[s,l]=D.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=EO(s.viewport,s.content),c={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const o=jO(n),a=o/2,i=t||a,s=o-i,l=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d="ltr"===r?[0,c]:[-1*c,0];return RO([l,u],d)(e)}(e,i.current,s,t)}return"horizontal"===n?m.jsx(hO,{...c,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=NO(o.viewport.scrollLeft,s,o.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=d(e,o.dir))}}):"vertical"===n?m.jsx(mO,{...c,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=NO(o.viewport.scrollTop,s);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=d(e))}}):null}),hO=D.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=oO(lO,e.__scopeScrollArea),[i,s]=D.useState(),l=D.useRef(null),u=oi(t,l,a.onScrollbarXChange);return D.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),m.jsx(vO,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":jO(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),OO(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:_O(i.paddingLeft),paddingEnd:_O(i.paddingRight)}})}})}),mO=D.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=oO(lO,e.__scopeScrollArea),[i,s]=D.useState(),l=D.useRef(null),u=oi(t,l,a.onScrollbarYChange);return D.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),m.jsx(vO,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":jO(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),OO(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:_O(i.paddingTop),paddingEnd:_O(i.paddingBottom)}})}})}),[gO,yO]=nO(lO),vO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=oO(lO,n),[h,g]=D.useState(null),y=oi(t,e=>g(e)),v=D.useRef(null),b=D.useRef(""),w=p.viewport,x=r.content-r.viewport,C=bi(c),S=bi(l),k=TO(d,10);function _(e){if(v.current){const t=e.clientX-v.current.left,n=e.clientY-v.current.top;u({x:t,y:n})}}return D.useEffect(()=>{const e=e=>{const t=e.target,n=h?.contains(t);n&&C(e,x)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[w,h,x,C]),D.useEffect(S,[r,S]),DO(h,k),DO(p.content,k),m.jsx(gO,{scope:n,scrollbar:h,hasThumb:o,onThumbChange:bi(a),onThumbPointerUp:bi(i),onThumbPositionChange:S,onThumbPointerDown:bi(s),children:m.jsx(hi.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:ti(e.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),v.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),_(e)}}),onPointerMove:ti(e.onPointerMove,_),onPointerUp:ti(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),bO="ScrollAreaThumb",wO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=yO(bO,e.__scopeScrollArea);return m.jsx(iu,{present:n||o.hasThumb,children:m.jsx(xO,{ref:t,...r})})}),xO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=oO(bO,n),i=yO(bO,n),{onThumbPositionChange:s}=i,l=oi(t,e=>i.onThumbChange(e)),u=D.useRef(void 0),c=TO(()=>{u.current&&(u.current(),u.current=void 0)},100);return D.useEffect(()=>{const e=a.viewport;if(e){const t=()=>{if(c(),!u.current){const t=PO(e,s);u.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[a.viewport,c,s]),m.jsx(hi.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ti(e.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})}),onPointerUp:ti(e.onPointerUp,i.onThumbPointerUp)})});wO.displayName=bO;var CO="ScrollAreaCorner",SO=D.forwardRef((e,t)=>{const n=oO(CO,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?m.jsx(kO,{...e,ref:t}):null});SO.displayName=CO;var kO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=oO(CO,n),[a,i]=D.useState(0),[s,l]=D.useState(0),u=Boolean(a&&s);return DO(o.scrollbarX,()=>{const e=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(e),l(e)}),DO(o.scrollbarY,()=>{const e=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(e),i(e)}),u?m.jsx(hi.div,{...r,ref:t,style:{width:a,height:s,position:"absolute",right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:0,...e.style}}):null});function _O(e){return e?parseInt(e,10):0}function EO(e,t){const n=e/t;return isNaN(n)?0:n}function jO(e){const t=EO(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function NO(e,t,n="ltr"){const r=jO(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-r,l=Aj(e,"ltr"===n?[0,i]:[-1*i,0]);return RO([0,i],[0,s])(l)}function RO(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function OO(e,t){return e>0&&e<t}var PO=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,s=n.top!==a.top;(i||s)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function TO(e,t){const n=bi(e),r=D.useRef(0);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),D.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function DO(e,t){const n=bi(t);si(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var MO=aO,IO=sO,AO=SO;const LO=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(MO,{ref:r,className:Ya("relative overflow-hidden",e),...n,children:[m.jsx(IO,{className:"h-full w-full rounded-[inherit]",children:t}),m.jsx(FO,{}),m.jsx(AO,{})]}));LO.displayName=MO.displayName;const FO=D.forwardRef(({className:e,orientation:t="vertical",...n},r)=>m.jsx(uO,{ref:r,orientation:t,className:Ya("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:m.jsx(wO,{className:"relative flex-1 rounded-full bg-neutral-200 dark:bg-neutral-800"})}));FO.displayName=uO.displayName;var zO="Checkbox",[$O]=ai(zO),[HO,BO]=$O(zO);function VO(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,p]=ui({prop:n,defaultProp:o??!1,onChange:l,caller:zO}),[h,g]=D.useState(null),[y,v]=D.useState(null),b=D.useRef(!1),w=!h||(!!i||!!h.closest("form")),x={checked:f,disabled:a,setChecked:p,control:h,setControl:g,name:s,form:i,value:c,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:!XO(o)&&o,isFormControl:w,bubbleInput:y,setBubbleInput:v};return m.jsx(HO,{scope:t,...x,children:ZO(d)?d(x):r})}var UO="CheckboxTrigger",qO=D.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:h}=BO(UO,e),g=oi(o,c),y=D.useRef(l);return D.useEffect(()=>{const e=a?.form;if(e){const t=()=>d(y.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[a,d]),m.jsx(hi.button,{type:"button",role:"checkbox","aria-checked":XO(l)?"mixed":l,"aria-required":u,"data-state":JO(l),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:g,onKeyDown:ti(t,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:ti(n,e=>{d(e=>!!XO(e)||!e),h&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});qO.displayName=UO;var WO=D.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return m.jsx(VO,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:e})=>m.jsxs(m.Fragment,{children:[m.jsx(qO,{...d,ref:t,__scopeCheckbox:n}),e&&m.jsx(QO,{__scopeCheckbox:n})]})})});WO.displayName=zO;var YO="CheckboxIndicator",GO=D.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=BO(YO,n);return m.jsx(iu,{present:r||XO(a.checked)||!0===a.checked,children:m.jsx(hi.span,{"data-state":JO(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});GO.displayName=YO;var KO="CheckboxBubbleInput",QO=D.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:p}=BO(KO,e),h=oi(n,p),g=Lj(a),y=Al(r);D.useEffect(()=>{const e=f;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!o.current;if(g!==a&&n){const t=new Event("click",{bubbles:r});e.indeterminate=XO(a),n.call(e,!XO(a)&&a),e.dispatchEvent(t)}},[f,g,a,o]);const v=D.useRef(!XO(a)&&a);return m.jsx(hi.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:s,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:h,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function ZO(e){return"function"==typeof e}function XO(e){return"indeterminate"===e}function JO(e){return XO(e)?"indeterminate":e?"checked":"unchecked"}QO.displayName=KO;const eP=D.forwardRef(({className:e,...t},n)=>m.jsx(WO,{ref:n,className:Ya("peer h-5 w-5 shrink-0 border border-[#7E8299] ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary rounded-[7px] data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 data-[state=checked]:border-primary dark:data-[state=checked]:text-neutral-900 bg-white",e),...t,children:m.jsx(GO,{className:Ya("flex items-center justify-center text-current"),children:m.jsx(Ef,{className:"h-4 w-4"})})}));eP.displayName=WO.displayName;const tP=({returnSelectedManagers:e,label:t,labelClass:n,info:r,infoAlignment:o,required:a,optional:i,values:s,loading:l})=>{const[u,c]=D.useState(!1),[d,f]=D.useState({}),[p,h]=D.useState("");D.useEffect(()=>{if(s&&s.length>0){const e=s.reduce((e,t)=>(e[t.manager_uuid]=Number(t.quantity),e),{});f(e)}},[s?.length]);const{apiKey:g}=Pr(),{data:y,isLoading:v}=Yx(["item-managers",g],"/manager/get_unpaginated",{enabled:!!g}),b=y?.data?.data||[],w=D.useMemo(()=>{if(!p)return b;const e=p.toLowerCase();return b.filter(t=>(t.name||"").toLowerCase().includes(e))},[b,p]);D.useEffect(()=>{if(e){const t=Object.entries(d).map(([e,t])=>({manager_uuid:e,quantity:t}));e(t)}},[d]);const x=Object.keys(d).length;return m.jsx(m.Fragment,{children:l?m.jsx(ei,{className:"w-full h-[48px]"}):m.jsxs("div",{className:"w-full flex flex-col gap-2.5",children:[t&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",n),children:[m.jsx("span",{className:"first-letter:inherit",children:t})," ",a?m.jsx("span",{className:"text-[#E12D39]",children:t&&"*"}):i?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,r&&m.jsx(kb,{fieldName:t,align:o,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:r})})]}),m.jsxs(Ak,{modal:!0,open:u,onOpenChange:c,children:[m.jsx(Lk,{asChild:!0,children:m.jsxs($k,{variant:"outline",role:"combobox","aria-expanded":u,className:"w-full justify-between h-12 bg-white border-neutral-200 text-neutral-700 hover:bg-neutral-50",children:[x>0?`${x} Manager${1===x?"":"s"} Selected`:"Select Managers",m.jsx(Of,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(Fk,{align:"end",className:"w-[450px] p-0 bg-white",side:"bottom",children:m.jsxs(ik,{shouldFilter:!1,children:[m.jsx(sk,{placeholder:"Search managers...",value:p,onValueChange:h}),m.jsxs(lk,{children:[m.jsx(uk,{children:"No manager found."}),m.jsx(ck,{children:v?m.jsx("div",{className:"flex flex-col gap-2 p-2",children:[1,2,3].map(e=>m.jsx(ei,{className:"h-10 w-full"},e))}):m.jsx(LO,{className:"h-72",children:w?.map(e=>{const t=(e=>e.uuid||"")(e),n=(e=>e.name||"Unknown Manager")(e),r=!!d[t],o=d[t]||0;return m.jsxs(dk,{value:t+n,onSelect:()=>{var e;(e=t)&&f(t=>{const n={...t};return n[e]?delete n[e]:n[e]=1,n})},className:Ya("flex items-center gap-3 p-2 cursor-pointer transition-colors aria-selected:bg-neutral-100",r&&"bg-blue-50 aria-selected:bg-blue-100"),children:[m.jsx("div",{className:"pointer-events-none flex items-center justify-center",children:m.jsx(eP,{checked:r,className:Ya(r?"bg-primary border-primary":"border-neutral-300")})}),m.jsx("div",{className:"flex-1 truncate font-medium text-neutral-700",children:n}),m.jsxs("div",{className:"flex items-center gap-2",onClick:e=>e.stopPropagation(),children:[m.jsx("span",{className:"text-xs text-neutral-400 font-medium",children:"Qty"}),m.jsx("input",{type:"number",min:"0",className:"w-20 h-8 rounded border border-neutral-300 px-2 text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",placeholder:"0",value:r?o:"",disabled:!r,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),onChange:e=>{const n=parseFloat(e.target.value);((e,t)=>{e&&f(n=>({...n,[e]:t}))})(t,isNaN(n)?0:n)}})]})]},t)})})})]})]})})]})]})})};function nP({placeholder:e,searchPlaceholder:t,options:n=[],showMultiSelectValues:r=!0,values:o,onChange:a,className:i,showCheckMark:s=!0,label:l,labelClass:u,required:c,info:d,optional:f,actionLabel:p,actionLabelAction:h,actionLabelInfo:g,removeSelectedValue:y,removeTag:v,loading:b,showCount:w,error:x}){const[C,S]=D.useState(!1),[k,_]=D.useState(0),E=D.useRef(null);D.useEffect(()=>{const e=()=>{E.current&&_(E?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[E]);const j=e=>{const t=o?.includes(e)?o?.filter(t=>t!==e):[...o||[],e];a&&a(t)};D.useEffect(()=>{y&&j(y)},[y]);const[N,R]=D.useState(null),O=e=>{R(t=>t===e?null:e)},P=e=>{for(let t of n){if(t.value===e)return t.label;if(t.subOptions){const n=t.subOptions.find(t=>t.value===e);if(n)return n.label}}return null};return m.jsx("div",{ref:E,children:b?m.jsx(ei,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ya("flex flex-col gap-2.5",i),children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[l&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",u),children:[l," ",c?m.jsx("span",{className:"text-[#E12D39]",children:l&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kb,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),p&&m.jsxs("button",{onClick:h,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[p,g&&m.jsx(kb,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:g})})]})]}),m.jsxs(Ak,{modal:!0,open:C,onOpenChange:S,children:[m.jsx(Lk,{asChild:!0,children:m.jsxs($k,{variant:"outline",role:"combobox","aria-expanded":C,className:Ya(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${x&&"!border-danger"}`,r?"h-auto py-3":null,i),children:[m.jsx("div",{className:"flex gap-2 text-[#5E6278] justify-start first-letter:uppercase flex-wrap",children:o?.length&&r?o.map((e,t)=>m.jsxs("div",{onClick:()=>{v||j(e),O(e)},className:"px-2 py-1 text-black flex items-center justify-between rounded gap-2 border bg-slate-200 text-xs font-medium",children:[m.jsx("span",{className:"flex justify-start text-start flex-wrap gap-2 whitespace-normal",children:P(e)}),m.jsx("span",{className:"",children:m.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.44001 4.49978L7.83334 2.12644C7.96064 1.99737 8.03146 1.82301 8.03021 1.64173C8.02896 1.46044 7.95575 1.28708 7.82667 1.15978C7.6976 1.03247 7.52324 0.961657 7.34196 0.962907C7.16067 0.964157 6.98731 1.03737 6.86001 1.16644L4.50001 3.55978L2.14001 1.21311C2.0151 1.08894 1.84613 1.01925 1.67001 1.01925C1.49388 1.01925 1.32492 1.08894 1.20001 1.21311C1.13752 1.27509 1.08793 1.34882 1.05408 1.43006C1.02023 1.5113 1.00281 1.59844 1.00281 1.68644C1.00281 1.77445 1.02023 1.86159 1.05408 1.94283C1.08793 2.02407 1.13752 2.0978 1.20001 2.15978L3.56001 4.49978L1.16667 6.87311C1.03937 7.00218 0.968554 7.17654 0.969804 7.35782C0.971054 7.53911 1.04427 7.71247 1.17334 7.83978C1.30241 7.96708 1.47677 8.0379 1.65805 8.03665C1.83934 8.0354 2.0127 7.96218 2.14001 7.83311L4.50001 5.43978L6.86001 7.78644C6.98492 7.91061 7.15388 7.98031 7.33001 7.98031C7.50613 7.98031 7.6751 7.91061 7.80001 7.78644C7.86249 7.72447 7.91209 7.65073 7.94594 7.56949C7.97978 7.48826 7.99721 7.40112 7.99721 7.31311C7.99721 7.2251 7.97978 7.13797 7.94594 7.05673C7.91209 6.97549 7.86249 6.90175 7.80001 6.83978L5.44001 4.49978Z",fill:"black"})})})]},t)):!r&&w&&o.length>0?`${o.length} ${l} selected`:e??"Select..."}),m.jsx(Of,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(Fk,{align:"start",style:{width:k},className:"w-[480px] p-0 bg-white rounded-xl border-gray-200",children:m.jsxs(ik,{children:[m.jsx(sk,{className:"placeholder:text-xs",placeholder:t??"Search..."}),m.jsx(uk,{children:"No result found."}),m.jsx(ck,{children:m.jsx(lk,{className:"",children:n?.map((e,t)=>m.jsxs("div",{children:[m.jsxs(dk,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{j(e.value),e?.subOptions&&e?.subOptions?.length>0&&O(e.value)},children:[s&&m.jsx(Ef,{className:Ya("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),m.jsxs("p",{className:"flex justify-between w-full",children:[e.label,e?.subOptions&&e?.subOptions?.length>0&&m.jsx(jf,{className:"ml-2 h-5 w-5 font-bold shrink-0 opacity-50"})]})]}),N===e.value&&e?.subOptions&&e?.subOptions?.map((e,t)=>m.jsxs(dk,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer pl-6 ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{j(e.value)},children:[s&&m.jsx(Ef,{className:Ya("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),e.label]},t))]},t))})})]})})]}),x&&m.jsx("p",{className:"text-danger text-xs font-normal",children:x})]})})}function rP({handleInputChange:e,setFileKey:t}){const{apiKey:n}=Pr(),{itemStoreData:r,editMode:o,fetchingItem:a}=ne(e=>e.items),[i,s]=D.useState([]),[l,u]=D.useState(!1),[c,d]=D.useState(!1),{data:f}=Yx(["categories",n],"/inventory_metas/categories",{enabled:!!n}),{data:p}=Yx(["itemunits",n],"/inventory_metas/units",{enabled:!!n}),h=f?.data?.data?.map(e=>({label:e.name,value:e.uuid,subOptions:e.subCategories.map(e=>({label:e.name,value:e.uuid}))}))||[],g=p?.data?.data?.map(e=>({label:e.name,value:e.uuid}))||[];D.useEffect(()=>{const t=r.itemunit_id||g.find(e=>"pieces"===e.label.toLowerCase())?.value;e("itemunit_id",t)},[p,r]);const y=M.useRef(!1);return M.useRef({set:!1,data:void 0}),m.jsxs("div",{className:"grid grid-cols-2 gap-x-[30px] gap-y-6",children:[m.jsx(eO,{handleInputChange:e}),m.jsx(iR,{type:"number",placeholder:"0.00",info:"Enter the cost price of a single unit of the item. This helps in calculating profit margins and inventory valuation.",label:`Unit cost price (${tb()})`,name:"cost_price",value:r.cost_price,labelClass:"text-dark font-bold first-letter:uppercase",onChange:t=>{y.current=!0,e("cost_price",t.target.value)},loading:a}),m.jsx("div",{className:"space-y-2.5",children:m.jsx(iR,{type:"number",selectOptions:g,onSelectValueChange:t=>e("itemunit_id",t),selectValue:r.itemunit_id||g.find(e=>"pieces"===e.label.toLowerCase())?.value,showSelectSearch:!0,placeholder:"0.00",addonInfo:"Select the measurement unit for this item (e.g., pieces, kg, liters). This ensures accurate stock tracking and transactions.",label:"Quantity",name:"item_quantity",value:r.item_quantity,onChange:t=>e("item_quantity",t.target.value),selectPlaceholder:"Item unit",labelClass:"text-dark font-bold first-letter:uppercase",addonLabel:"Item unit ",addonLabelClass:"text-dark font-bold first-letter:uppercase",info:"Enter the number of units available in stock for this item. This helps in managing inventory levels and ensuring you have enough stock to fulfill orders.",loading:a})}),m.jsx(iR,{type:"number",placeholder:"0.00",info:"Enter the selling price of a single unit of the item. This is the price at which the item will be sold to customers.",label:`Unit selling price (${tb()})`,name:"selling_price",value:r.selling_price,onChange:t=>e("selling_price",t.target.value),labelClass:"text-dark font-bold first-letter:uppercase",loading:a,required:!0}),m.jsx(iR,{type:"number",placeholder:"0.00",info:"Set the minimum stock quantity for this item. When the quantity drops below this level, you'll be alerted to reorder to prevent stockouts.",label:"Reorder level ",labelClass:"text-dark font-bold first-letter:uppercase",name:"reorder_level",value:r.reorder_level,onChange:t=>e("reorder_level",t.target.value),loading:a}),m.jsx(tP,{label:"Item Managers",labelClass:"text-dark font-bold first-letter:uppercase",info:"Select the managers for this item. This helps in managing inventory levels and ensuring you have enough stock to fulfill orders.",returnSelectedManagers:t=>{e("managers",t),console.log("returned managers",t)},values:r.managers,loading:a}),o&&m.jsx(nP,{label:"Category",info:"Select the category that best describes this item (e.g., electronics, clothing, food). Categorizing items helps in organizing inventory and simplifies product management.",options:h,placeholder:"Select category",labelClass:"text-dark font-bold text-sm",showSearch:!0,values:r.itemcategory_id,onChange:t=>e("itemcategory_id",t),loading:a})]})}function oP({itemTypeUUID:e,handleInputChange:t,setFileKey:n}){const r=J(),[o,a]=D.useState(!0),{itemStoreData:i,editMode:s}=ne(e=>e.items);return M.useEffect(()=>{r(Wt({field:"itemtype_id",value:e})),!s&&r(Yt())},[e]),m.jsxs("div",{className:"space-y-4",children:[s?null:m.jsxs("div",{className:Ya("bg-primary_light rounded-md px-4 py-3.5 flex justify-between items-center gap-[60px]",o?null:"hidden"),children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("span",{className:"shrink-0",children:Kv.info}),m.jsxs("div",{className:Ya("flex-grow space-y-1"),children:[m.jsx("h1",{className:"text-gray-800 font-semibold text-[15px]",children:"About product items"}),m.jsxs("p",{className:"text-[13px] text-gray-600",children:["Product items are tangible goods that can be quantified and are available in units. They can also have variations, such as different sizes, colors, or weights, ensuring flexible and comprehensive inventory management."," ",m.jsx("a",{href:"#",className:"text-primary",children:"Learn more"})]})]})]}),m.jsx("button",{onClick:()=>a(!1),children:Kv.close})]}),m.jsx(rP,{handleInputChange:t,setFileKey:n}),m.jsx(fS,{}),m.jsx(ZR,{})]})}function aP({handleInputChange:e,item_type_id:t,setFileKey:n}){const{apiKey:r}=Pr(),{editMode:o}=ne(e=>e.items),{data:a}=Yx(["itemtypes",r],"/inventory_metas/types",{enabled:!!r}),i=a?.data?.data||[],s=[{label:"Simple Product",value:"simple product",uuid:(e=>{const t=i?.filter(t=>t?.name?.match(e));let n="";return t?.map(e=>n=e.uuid),n})("products")}],[l,u]=D.useState(o?t:s[0].uuid);return D.useEffect(()=>{u(o?t:s[0].uuid)},[i]),0===i?.length?null:m.jsx(KC,{className:"flex-grow px-4 pt-0",children:i?.length>0&&l?m.jsxs(_R,{defaultValue:l,className:"space-y-4",children:[m.jsxs("div",{className:Ya("flex items-center gap-7 border-b py-4 sticky top-16 bg-white z-10",o?"-top-8 pointer-events-none":null,i?.length>0?null:"pointer-events-none"),children:[m.jsx("h1",{className:"text-gray-900 font-medium text-sm shrink-0",children:"Item type"}),m.jsx(ER,{className:"flex bg-transparent flex-grow justify-start p-0 gap-[30px] overflow-auto h-auto",children:s.map((e,t)=>m.jsxs(jR,{className:"data-[state=active]:bg-transparent text-gray-700 data-[state=active]:text-gray-900 data-[state=active]:shadow-none capitalize data-[state=active]:font-bold font-medium hover:text-gray-900 p-0 flex items-center gap-2 cursor-pointer",value:e.uuid,children:[m.jsx("div",{className:Ya("flex items-center justify-center rounded-full h-[26px] w-[26px] bg-gray-300 shrink-0 indicator"),children:m.jsx("span",{className:"bg-white w-3 h-3 rounded-full indicator--child"})}),e.label]},t))})]}),m.jsx(NR,{value:s[0].uuid,children:m.jsx(oP,{itemTypeUUID:s[0]?.uuid,handleInputChange:e,setFileKey:n})})]}):m.jsx("div",{children:m.jsx(ei,{className:"rounded-md w-full h-[500px] mt-8"})})})}function iP({isOpen:e,onClose:t,itemUUID:n,itemTypeUUID:r}){const o=tr(),a=J(),{itemStoreData:i}=ne(e=>e.items),{mutate:s,isPending:l}=Gx({enableToast:!0},!0),{mutate:u,isPending:c}=Gx(),{data:d,isFetching:f}=Yx(["single_item",n],`/items/get?item_uuid=${n}`,{enabled:e}),p=d?.data,h=p?.kits.map(e=>({item_uuid:e.kit_item.uuid,quantity:Number(e.quantity)})),g=p?.variation.map(e=>{const t=e.variation_values.map(e=>e.attribute_value.uuid),n=e.locationprices.filter(e=>!e.price_group.name.match("Retail"));return{attribute_value_id:t,selling_price:e.locationprices[0].selling_price,quantity:e.quantity,sku:e.sku,prices:n.map(e=>({price_uuid:e.price_group.uuid,price_amt:e.selling_price})),image:e.image,id:e.uuid}}),y=p?.item_group.map(e=>({group_name:e.group_name,group_quantity:e.quantity,group_selling_price:e.selling_price,group_barcode:e.barcode,group_image:null,group_uuid:e.group_uuid,prices:e.locationprices.filter((e,t)=>t>0).map(e=>({price_uuid:e.price_group.uuid,price_amt:e.selling_price}))})),v=p?.extras.map(e=>({item_uuid:e.extra?.uuid,quantity:e.quantity,selling_price:e.selling_price})),b=p?.material?.map(e=>({item_uuid:e.raw_material?.uuid,quantity:e.quantity,selling_price:e.selling_price})),w=p?.suppliers.map(e=>({supplier_id:e.uuid,supplier_price:e.supplier_price,supplier_batch_number:e.supplier_batch_number,supplier_quantity:e.supplier_quantity,supplier_expired_date:e.supplier_expired_date})),x={name:p?.name,item_uuid:n,itemtype_id:p?.item_type?.uuid,selling_price:p?.selling_price,cost_price:p?.cost_price,item_quantity:p?.quantity,reorder_level:p?.reorder_level,itemunit_id:p?.unit_resource?.uuid,available_in_cart:!0,description:p?.description,itemcategory_id:p?.category?.map(e=>e.uuid),barcode:p?.barcode?.map(e=>e.barcode),itembrand_id:p?.item_brand,returnable_days:p?.returnable_days||"",images:[],group:y,taxes:p?.item_tax?.uuid,sku:p?.sku,is_draft:!1,kit:h,item_tags:p?.item_tags.map(e=>e.uuid),suppliers:w,variations:g,has_extras:v,discount:p?.discount||"",discount_type:p?.discount_type?.toString()||"1",price_man:p?.duplicate_prices?.map(e=>"Retail"===e.priceGroup.name?{}:{price_uuid:e.priceGroup.uuid,selling_price:e.selling_price.toString()}),raw_materials:b,managers:p?.managers?.map(e=>({manager_uuid:e.manager.uuid,quantity:e.quantity}))},C={prices:p?.prices,barcode:p?.barcode,extras:p?.extras,materials:p?.material,suppliers:p?.suppliers,images:p?.images,item_group:p?.item_group,variations:p?.variation},[S,k]=D.useState([]);M.useEffect(()=>{a(Qt(f))},[f]);return M.useEffect(()=>(a(Gt(e)),p&&a(Kt(x)),p&&a(Zt(C)),!e&&a(Yt()),()=>{a(Gt(!1)),a(Yt())}),[e,p]),m.jsxs(GC,{isOpen:e,onClose:t,title:"Item Edit",className:"w-[1176px] pb-0",children:[m.jsx(aP,{handleInputChange:(e,t)=>{a(Wt({field:e,value:t}))},item_type_id:r,setFileKey:k}),m.jsxs("div",{className:"flex justify-between border-t py-5 bg-white sticky bottom-0",children:[m.jsx(Mj,{label:"Cancel",className:"h-12 bg-gray-400 text-gray-900 font-bold hover:bg-gray-400/90 w-[162px]",onClick:t,disabled:l||c}),m.jsxs("div",{className:"flex gap-2.5",children:[m.jsx(Mj,{label:"Revert to draft",className:"h-12 bg-gray-400 text-gray-900 font-bold hover:bg-gray-400/90 px-8",onClick:()=>{u({url:"/items/update",payload:{...i,is_draft:!0,images:S.map(e=>({...e.file&&{image:e.file},...e.id&&{id:e.id},featured:e.featured}))}},{onSuccess:()=>{a(Yt()),o.invalidateQueries({queryKey:["items"]}),o.invalidateQueries({queryKey:["single_item",n]}),t&&t()}})},loading:c,disabled:!p?.status}),m.jsx(Mj,{label:"Update Item",className:"h-12 w-[162px]",onClick:()=>{s({url:"/items/update",payload:{...i,is_draft:!1,images:S.map(e=>({...e.file&&{image:e.file},...e.id&&{id:e.id},featured:e.featured}))}},{onSuccess:()=>{a(Yt()),o.invalidateQueries({queryKey:["items"]}),o.invalidateQueries({queryKey:["single_item",n]}),t&&t()}})},loading:l})]})]})]})}const sP=[{accessorKey:"item_description",header:()=>m.jsxs("p",{children:[" ","Item description/ ",m.jsx("br",{})," Product code"," "]}),cell:({row:e})=>{const t=e.original;return m.jsxs("div",{className:"flex items-center gap-5",children:[m.jsx("div",{className:"w-[50px] h-[50px] rounded-2xl relative bg-gray-100",children:m.jsx("img",{src:t.item_image,alt:"item image",className:"rounded-2xl object-cover w-full h-full",draggable:!1})}),m.jsxs("div",{className:"space-y-1 max-w-[265px]",children:[m.jsx(uP,{title:t.item_description,item_uuid:t.uuid,item_type_id:t.item_type_id,data:t.fullData}),m.jsxs("p",{className:"text-dark text-xs font-normal flex items-center gap-1",children:[m.jsx("span",{className:"uppercase whitespace-nowrap",children:t.itemcode}),t.sku||t.barcode.length>0?m.jsx(kb,{align:"center",fieldName:"All item codes",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px]",children:["+",(t.barcode?.length||0)+(t.sku?1:0)]}),children:m.jsxs("div",{className:"space-y-2",children:[t.sku?m.jsxs("div",{className:"",children:[m.jsx("p",{children:" SKU:"}),m.jsx("ul",{className:"list-disc pl-4",children:m.jsx("li",{children:t.sku})})]}):null,t.barcode.length>0?m.jsxs("div",{children:[m.jsx("p",{children:"Barcodes:"}),m.jsx("ul",{className:"list-disc pl-4 ",children:t.barcode.map((e,t)=>m.jsx("li",{children:e.barcode},t))})]}):null,m.jsxs("div",{className:"",children:[m.jsx("p",{children:" Itemcode:"}),m.jsx("ul",{className:"list-disc pl-4",children:m.jsx("li",{children:t.itemcode})})]})]})}):null,t.expired?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"|"}),"Expired",m.jsx("span",{className:"rounded bg-danger_light px-[5px] flex items-center text-danger font-semibold text-[11px] h-[18px]",children:t.expired})]}):null,t.expiring?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"|"}),"Expiring",m.jsx("span",{className:"rounded bg-warning-light px-[5px] flex items-center text-warning font-semibold text-[11px] h-[18px]",children:t.expiring})]}):null]})]})]})}},{accessorKey:"quantity",header:()=>m.jsx("p",{children:"quantity"}),cell:({row:e})=>{const t=e.original;return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Ya("flex items-center",t.quantity<=0?"text-danger":Number(t.reorder_level)==t.quantity?"text-orange":null),children:m.jsx(sR,{label:"Edit item quantity",placeholder:"Enter quantity",uuid:t.uuid,name:"item_quantity",displayValue:eb(t.quantity)+t.unit,value:t.quantity,valueType:"number",item_unit:t.unit})}),t.all_quantity===t.quantity?null:m.jsx("p",{className:"text-gray-700",children:Intl.NumberFormat().format(t.all_quantity??0)+t.unit})]})}},{accessorKey:"type",cell:({row:e})=>{const t=e.original;return m.jsx("p",{className:"capitalize",children:t.type})}},{accessorKey:"selling_price",header:`Selling Price (${tb()})`,cell:({row:e})=>{const t=e.original;return m.jsx(sR,{label:`Edit selling price (${tb()})`,placeholder:"Enter selling price",uuid:t.uuid,name:"selling_price",displayValue:Jv(t.selling_price??0),value:t.selling_price??0,valueType:"number"})}},{accessorKey:"categories",header:"categories/Tags",cell:({row:e})=>{const t=e.original;return m.jsxs(m.Fragment,{children:[" ",m.jsxs("div",{className:"flex items-center gap-2 capitalize",children:[t.categories&&t.categories?.length>0?t.categories?.[0]?.name:"...",t.categories.length>1?m.jsx(kb,{align:"center",fieldName:"Categories",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px]",children:["+",t.categories.length-1]}),children:m.jsx("ul",{className:"list-disc pl-4",children:t.categories.map((e,t)=>m.jsx("li",{children:e.name},t))})}):null]}),m.jsxs("div",{className:"text-gray-700 flex items-center gap-2 capitalize",children:[t.tags?.[0],t.tags?.length>1?m.jsx(kb,{align:"center",fieldName:"Tags",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px] border-primary",children:["+",t.tags.length-1]}),children:m.jsx("ul",{className:"list-disc pl-4",children:t.tags.map((e,t)=>m.jsx("li",{children:e},t))})}):null]})]})}},{accessorKey:"status",cell:({row:e})=>{const t=e.getValue("status");return m.jsx(_b,{status:t})}},{id:"actions",header:"actions",cell:({row:e})=>{const t=e.original;return m.jsx(lP,{item_uuid:t.uuid,item_type_id:t.item_type_id,data:t.fullData})}}],lP=({item_uuid:e,item_type_id:t,data:n})=>{const[r,o]=D.useState(null),a=()=>{o(null)},[i,s]=D.useState(!1),[l,u]=D.useState(!1),[c,d]=D.useState(!1),[f,p]=D.useState(!1),[h,g]=D.useState(!1),[y,v]=D.useState(!1),[b,w]=D.useState(!1),x=[{label:"view",icon:Kv.eye_outline,action:()=>s(!0)},{label:"edit",icon:Kv.notepad_edit,action:()=>u(!0)},{label:"delete",icon:Kv.trash,action:()=>p(!0)}];return m.jsxs(m.Fragment,{children:[m.jsxs(Mf,{children:[m.jsx(If,{asChild:!0,children:m.jsxs("button",{className:"bg-gray-100 rounded-md h-[30px] w-[90px] flex items-center justify-between p-2.5 font-semibold text-[10px] text-gray-500 hover:border duration-200",children:["Action"," ",m.jsx("svg",{width:"11",height:"6",viewBox:"0 0 11 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.50855 5.49304C5.42081 5.49355 5.33383 5.47673 5.25261 5.44356C5.17138 5.41038 5.09751 5.3615 5.03521 5.29971L1.03521 1.29971C0.972726 1.23773 0.92313 1.164 0.889284 1.08276C0.855438 1.00152 0.838013 0.914383 0.838013 0.826375C0.838013 0.738367 0.855438 0.65123 0.889284 0.56999C0.92313 0.488751 0.972726 0.415017 1.03521 0.353041C1.16012 0.228874 1.32909 0.15918 1.50521 0.15918C1.68134 0.15918 1.8503 0.228874 1.97521 0.353041L5.50855 3.88637L9.03521 0.353041C9.16012 0.228874 9.32909 0.15918 9.50521 0.15918C9.68134 0.15918 9.8503 0.228874 9.97521 0.353041C10.0377 0.415017 10.0873 0.488751 10.1211 0.56999C10.155 0.65123 10.1724 0.738367 10.1724 0.826375C10.1724 0.914383 10.155 1.00152 10.1211 1.08276C10.0873 1.164 10.0377 1.23773 9.97521 1.29971L5.97521 5.29971C5.85104 5.42287 5.68344 5.4923 5.50855 5.49304Z",fill:"#202125"})})]})}),m.jsx(Af,{align:"end",className:"flex flex-col gap-2.5 rounded-xl border-gray-200",children:x.map((e,t)=>m.jsxs(Lf,{className:`capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-gray-700 text-sm cursor-pointer px-[15px] flex items-center gap-[5px] ${t===x.length-1&&"text-danger focus:text-danger"}`,onMouseOver:()=>(e=>{o(e)})(t),onMouseOut:a,onClick:e.action,children:[M.cloneElement(e.icon,{fill:r===t?"#1868DB":"#5E6278"})," ",e.label]},t))})]}),m.jsx(Wk,{isOpen:i,onClose:()=>s(!1),itemUUID:e}),l?m.jsx(iP,{itemUUID:e,itemTypeUUID:t,isOpen:l,onClose:()=>u(!1)}):null,m.jsx(Ij,{isOpen:f,onClose:()=>p(!1),uuids:[e],single:!0})]})},uP=({title:e,item_uuid:t,item_type_id:n,data:r})=>{const[o,a]=D.useState(!1),[i,s]=D.useState(!1),[l,u]=D.useState(!1);return m.jsxs(m.Fragment,{children:[m.jsx("button",{className:Ya("text-primary font-bold text-sm first-letter:uppercase truncate max-w-[265px] cursor-pointer",r.expired?"text-danger":""),title:e,onClick:()=>a(!0),children:e}),m.jsx(Wk,{isOpen:o,onClose:()=>a(!1),itemUUID:t})]})};function cP({loading:e,data:t,meta:n}){const r=t?.otherscount?.map(e=>{const n=e.name;return{type:n,value:t?.result_array?.[n]?.total_selling_price??0}}),o=[{type:t?.result_array?.Retail?.pricegroup??t?.default,value:t?.result_array?.Retail?.total_selling_price??0},...r||[]],a=t?.otherscount?.map(e=>{const n=e.name;return{type:n,value:t?.result_array?.[n]?.total_profit??0}}),i=[{type:t?.result_array?.Retail?.pricegroup??t?.default,value:t?.result_array?.Retail?.total_profit??0},...a||[]],[s,l]=D.useState({type:o?.[0].type,value:o?.[0].value}),[u,c]=D.useState({type:i?.[0].type,value:i?.[0].value});M.useEffect(()=>{l({type:o?.[0].type,value:o?.[0].value}),c({type:i?.[0].type,value:i?.[0].value})},[e]);const d=[{label:"Total No. of Unique Item",count:Intl.NumberFormat().format(n?.total??0),desc:`With ${t?.unit_count??0} unit(s)`,icon:m.jsx("div",{className:"shrink-0 rounded-lg \n \n bg-[#EFF5FF] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:Kv.cube})},{label:"Total Cost Price",count:Jv(t?.result_array?.Retail?.total_cost??0),desc:"Takes into Account FIFO & LIFO ",icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#F9DFDD] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Kv.price_tag,{fill:"#ED7400"})})},{label:"Total Selling Price",count:Jv(s.value),desc:m.jsxs("p",{className:"flex gap-2 items-center flex-wrap",children:["Showing ",s.type," price"," ",m.jsxs(Mf,{children:[m.jsx(If,{asChild:!0,children:m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-[#F9F9F9]",children:["change",m.jsx("span",{className:"rotate-90",children:Kv.arrow})]})}),m.jsx(Af,{align:"start",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5 w-[210px]",children:o.map((e,t)=>m.jsx(Lf,{className:Ya("capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] \n \n ",e.type===s.type?"bg-primary_light text-primary":null),onClick:()=>l(t=>({...t,value:e.value,type:e.type})),children:e.type},t))})]})]}),icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#D8CDF4] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Kv.price_tag,{fill:"#9747FF"})})},{label:"Profit to be made",count:Jv(u.value),desc:m.jsxs("p",{className:"flex gap-2 items-center flex-wrap",children:["Showing ",u.type," price"," ",m.jsxs(Mf,{children:[m.jsx(If,{asChild:!0,children:m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-[#F9F9F9]",children:["change",m.jsx("span",{className:"rotate-90",children:Kv.arrow})]})}),m.jsx(Af,{align:"start",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5 w-[210px]",children:i.map((e,t)=>m.jsx(Lf,{className:Ya("capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] \n \n ",e.type===u.type?"bg-primary_light text-primary":null),onClick:()=>c(t=>({...t,value:e.value,type:e.type})),children:e.type},t))})]})]}),icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#C6E3D2] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Kv.price_tag,{fill:"#378C5A"})})}],[f,p]=D.useState(!1);return m.jsxs(KC,{className:"bg-[#F6F8FA] p-2.5 flex flex-col",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsx("h1",{className:"capitalize text-dark font-semibold text-lg",children:"Items overview"}),m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-white",onClick:()=>p(!f),children:[f?"Close":"Open"," ",m.jsx("span",{className:"rotate-90",children:Kv.arrow})]})]}),m.jsx(LR.Collapse,{isOpened:f,children:m.jsx("div",{className:"flex flex-wrap gap-2.5 mt-3",children:d.map((t,n)=>m.jsxs("div",{className:Ya("border rounded-xl border-[#E4E7EC] p-4 flex flex-col relative bg-right-bottom bg-no-repeat flex-auto",0===n?"bg-[#E4EEFA] bg-[url('/assets/images/ecstacy1.svg')]":1===n?"bg-[#FAEAE9] bg-[url('/assets/images/ecstacy2.svg')]":2===n?"bg-[#EEE9FA] bg-[url('/assets/images/ecstacy3.svg')]":3===n?"bg-[#EBF5EF] bg-[url('/assets/images/ecstacy4.svg')]":null),children:[m.jsxs("div",{className:"flex justify-between gap-1",children:[m.jsx("h1",{className:"text-dark text-sm font-medium",children:t.label}),m.jsx("div",{className:"shrink-0",children:t.icon})]}),m.jsxs("div",{className:"flex flex-col gap-1",children:[e?m.jsx(ei,{className:"w-28 h-6 rounded"}):m.jsx("h1",{className:Ya("text-dark font-bold text-[29px] truncate",n===d.length-1&&u.value<0?"text-danger":null),title:t.count,children:t.count}),m.jsx("div",{className:"text-gray-700 text-sm font-medium ",children:t.desc})]})]},n))})})]})}function dP({placeholder:e,className:t,inputClass:n,...r}){return m.jsxs("div",{className:Ya("h-12 border border-gray-300 rounded-md w-[320px] flex",t),children:[m.jsx("span",{className:"bg-gray-200 w-[38px] flex items-center justify-center shrink-0 rounded-l-md ",children:Kv.magnifier}),m.jsx("input",{type:"search",placeholder:e,className:"w-full px-3 text-dark text-sm font-medium bg-transparent outline-none rounded-r-md",...r})]})}function fP({placeholder:e,searchPlaceholder:t,options:n=[],showMultiSelectValues:r=!0,values:o,onChange:a,className:i,showCheckMark:s=!0,label:l,labelClass:u,required:c,info:d,optional:f,actionLabel:p,actionLabelAction:h,actionLabelInfo:g,removeSelectedValue:y,removeTag:v,loading:b,showCount:w,error:x,showError:C,onChangeSearch:S,searching:k,contentStyle:_,disabled:E,searchValue:j}){const[N,R]=D.useState(!1),[O,P]=D.useState(0),T=D.useRef(null);D.useEffect(()=>{const e=()=>{T.current&&P(T?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const M=o?.filter(e=>""!==e),I=e=>{const t=M?.includes(e)?M?.filter(t=>t!==e):[...M||[],e];a&&a(t)};return D.useEffect(()=>{y&&I(y)},[y]),m.jsx(m.Fragment,{children:b?m.jsx(ei,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ya("flex flex-col gap-2.5",i),children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[l&&m.jsxs("label",{className:Ya("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",u),children:[l," ",c?m.jsx("span",{className:"text-[#E12D39]",children:l&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kb,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),p&&m.jsxs("button",{onClick:h,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[p,g&&m.jsx(kb,{fieldName:p,children:m.jsx("p",{className:"font-normal first-letter:uppercase text-left",children:g})})]})]}),m.jsxs(Ak,{modal:!0,open:N,onOpenChange:R,children:[m.jsx(Lk,{disabled:E,asChild:!0,children:m.jsxs($k,{ref:T,variant:"outline",role:"combobox","aria-expanded":N,className:Ya(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${(x||C)&&"!border-danger"}`,r?"h-auto py-3":null,i),children:[m.jsx("div",{className:"flex gap-2 text-[#5E6278] justify-start first-letter:uppercase flex-wrap",children:M?.length>0&&r?M?.map((e,t)=>m.jsxs("div",{onClick:()=>{!v&&I(e)},className:"px-2 py-1 text-black flex items-center justify-between rounded gap-2 border bg-slate-200 text-xs font-medium",children:[n?.[0].searchId?n?.find(t=>t.value===e)?.searchId:n?.find(t=>t.value===e)?.label,m.jsx("span",{className:"",children:m.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.44001 4.49978L7.83334 2.12644C7.96064 1.99737 8.03146 1.82301 8.03021 1.64173C8.02896 1.46044 7.95575 1.28708 7.82667 1.15978C7.6976 1.03247 7.52324 0.961657 7.34196 0.962907C7.16067 0.964157 6.98731 1.03737 6.86001 1.16644L4.50001 3.55978L2.14001 1.21311C2.0151 1.08894 1.84613 1.01925 1.67001 1.01925C1.49388 1.01925 1.32492 1.08894 1.20001 1.21311C1.13752 1.27509 1.08793 1.34882 1.05408 1.43006C1.02023 1.5113 1.00281 1.59844 1.00281 1.68644C1.00281 1.77445 1.02023 1.86159 1.05408 1.94283C1.08793 2.02407 1.13752 2.0978 1.20001 2.15978L3.56001 4.49978L1.16667 6.87311C1.03937 7.00218 0.968554 7.17654 0.969804 7.35782C0.971054 7.53911 1.04427 7.71247 1.17334 7.83978C1.30241 7.96708 1.47677 8.0379 1.65805 8.03665C1.83934 8.0354 2.0127 7.96218 2.14001 7.83311L4.50001 5.43978L6.86001 7.78644C6.98492 7.91061 7.15388 7.98031 7.33001 7.98031C7.50613 7.98031 7.6751 7.91061 7.80001 7.78644C7.86249 7.72447 7.91209 7.65073 7.94594 7.56949C7.97978 7.48826 7.99721 7.40112 7.99721 7.31311C7.99721 7.2251 7.97978 7.13797 7.94594 7.05673C7.91209 6.97549 7.86249 6.90175 7.80001 6.83978L5.44001 4.49978Z",fill:"black"})})})]},t)):!r&&w&&o.length>0?`${M.length} ${l} selected`:e??"Select..."}),m.jsx(Of,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(Fk,{align:"start",style:{width:O},className:Ya("w-[480px] p-0 bg-white rounded-xl border-gray-200",_),children:m.jsx(LO,{children:m.jsxs(ik,{children:[m.jsx(sk,{onChangeCapture:S,className:"placeholder:text-xs",placeholder:t??"Search..."}),k?m.jsx("div",{className:"flex flex-col gap-2 p-2",children:[1,2,3].map((e,t)=>m.jsx(ei,{className:"h-9 rounded-md"},t))}):m.jsx(uk,{children:j?"No result found.":e}),m.jsx(ck,{children:m.jsx(lk,{className:"",children:n?.map(e=>m.jsxs(dk,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{I(e.value)},children:[s&&m.jsx(Ef,{className:Ya("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),e.label]},e.value))})})]})})})]})]})})}const pP=D.createContext({dragDropManager:void 0});function hP(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var mP="function"==typeof Symbol&&Symbol.observable||"@@observable",gP=function(){return Math.random().toString(36).substring(7).split("").join(".")},yP={INIT:"@@redux/INIT"+gP(),REPLACE:"@@redux/REPLACE"+gP()};function vP(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(hP(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(hP(1));return n(vP)(e,t)}if("function"!=typeof e)throw new Error(hP(2));var o=e,a=t,i=[],s=i,l=!1;function u(){s===i&&(s=i.slice())}function c(){if(l)throw new Error(hP(3));return a}function d(e){if("function"!=typeof e)throw new Error(hP(4));if(l)throw new Error(hP(5));var t=!0;return u(),s.push(e),function(){if(t){if(l)throw new Error(hP(6));t=!1,u();var n=s.indexOf(e);s.splice(n,1),i=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(hP(7));if(void 0===e.type)throw new Error(hP(8));if(l)throw new Error(hP(9));try{l=!0,a=o(a,e)}finally{l=!1}for(var t=i=s,n=0;n<t.length;n++){(0,t[n])()}return e}return f({type:yP.INIT}),(r={dispatch:f,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(hP(10));o=e,f({type:yP.REPLACE})}})[mP]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(hP(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[mP]=function(){return this},e},r}function bP(e,t,...n){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function wP(e){return"object"==typeof e}const xP="dnd-core/INIT_COORDS",CP="dnd-core/BEGIN_DRAG",SP="dnd-core/PUBLISH_DRAG_SOURCE",kP="dnd-core/HOVER",_P="dnd-core/DROP",EP="dnd-core/END_DRAG";function jP(e,t){return{type:xP,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const NP={type:xP,payload:{clientOffset:null,sourceClientOffset:null}};function RP(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:o,getSourceClientOffset:a}=n,i=e.getMonitor(),s=e.getRegistry();e.dispatch(jP(o)),function(e,t,n){bP(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){bP(n.getSource(e),"Expected sourceIds to be registered.")})}(t,i,s);const l=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,i);if(null==l)return void e.dispatch(NP);let u=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");!function(e){bP("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(a),u=a(l)}e.dispatch(jP(o,u));const c=s.getSource(l).beginDrag(i,l);if(null==c)return;!function(e){bP(wP(e),"Item must be an object.")}(c),s.pinSource(l);const d=s.getSourceType(l);return{type:CP,payload:{itemType:d,item:c,sourceId:l,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!r}}}}function OP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){OP(e,t,n[t])})}return e}function TP(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){bP(e.isDragging(),"Cannot call drop while not dragging."),bP(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);const o=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);o.forEach((o,a)=>{const i=function(e,t,n,r){const o=n.getTarget(e);let a=o?o.drop(r,e):void 0;(function(e){bP(void 0===e||wP(e),"Drop result must either be an object or undefined.")})(a),void 0===a&&(a=0===t?{}:r.getDropResult());return a}(o,a,r,n),s={type:_P,payload:{dropResult:PP({},t,i)}};e.dispatch(s)})}}function DP(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){bP(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();if(null!=r){n.getSource(r,!0).endDrag(t,r),n.unpinSource()}return{type:EP}}}function MP(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function IP(e){return function(t,{clientOffset:n}={}){!function(e){bP(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),o=e.getMonitor(),a=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const o=e[r];MP(t.getTargetType(o),n)||e.splice(r,1)}}(r,a,o.getItemType()),function(e,t,n){bP(t.isDragging(),"Cannot call hover while not dragging."),bP(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const r=e[t];bP(e.lastIndexOf(r)===t,"Expected targetIds to be unique in the passed array.");bP(n.getTarget(r),"Expected targetIds to be registered.")}}(r,o,a),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,o,a),{type:kP,payload:{targetIds:r,clientOffset:n||null}}}}function AP(e){return function(){if(e.getMonitor().isDragging())return{type:SP}}}class LP{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:RP(e),publishDragSource:AP(e),hover:IP(e),drop:TP(e),endDrag:DP(e)}}(this);return Object.keys(n).reduce((r,o)=>{const a=n[o];var i;return r[o]=(i=a,(...n)=>{const r=i.apply(e,n);void 0!==r&&t(r)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function FP(e,t){return{x:e.x-t.x,y:e.y-t.y}}const zP=[],$P=[];zP.__IS_NONE__=!0,$P.__IS_ALL__=!0;class HP{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;bP("function"==typeof e,"listener must be a function."),bP(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),o=t.stateId;try{const a=o===r||o===r+1&&!function(e,t){return e!==zP&&(e===$P||void 0===t||(n=e,t.filter(e=>n.indexOf(e)>-1)).length>0);var n}(t.dirtyHandlerIds,n);a||e()}finally{r=o}})}subscribeToOffsetChange(e){bP("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return bP(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(bP(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return MP(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(bP(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!MP(r,o))return!1;const a=this.getTargetIds();if(!a.length)return!1;const i=a.indexOf(e);return n?i===a.length-1:i>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?FP(function(e,t){return{x:e.x+t.x,y:e.y+t.y}}(t,r),n):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?FP(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const BP="undefined"!=typeof global?global:self,VP=BP.MutationObserver||BP.WebKitMutationObserver;function UP(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}const qP="function"==typeof VP?function(e){let t=1;const n=new VP(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:UP;class WP{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const YP=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=qP(this.flush),this.requestErrorThrow=UP(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},GP=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new WP(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(YP.registerPendingError);const KP="dnd-core/ADD_SOURCE",QP="dnd-core/ADD_TARGET",ZP="dnd-core/REMOVE_SOURCE",XP="dnd-core/REMOVE_TARGET";function JP(e,t){t&&Array.isArray(e)?e.forEach(e=>JP(e,!1)):bP("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var eT;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(eT||(eT={}));let tT=0;function nT(e){const t=(tT++).toString();switch(e){case eT.SOURCE:return`S${t}`;case eT.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function rT(e){switch(e[0]){case"S":return eT.SOURCE;case"T":return eT.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function oT(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,o]}=n.next();if(o===t)return!0;r=!!e}while(!r);return!1}class aT{addSource(e,t){JP(e),function(e){bP("function"==typeof e.canDrag,"Expected canDrag to be a function."),bP("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),bP("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(eT.SOURCE,e,t);return this.store.dispatch(function(e){return{type:KP,payload:{sourceId:e}}}(n)),n}addTarget(e,t){JP(e,!0),function(e){bP("function"==typeof e.canDrop,"Expected canDrop to be a function."),bP("function"==typeof e.hover,"Expected hover to be a function."),bP("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(eT.TARGET,e,t);return this.store.dispatch(function(e){return{type:QP,payload:{targetId:e}}}(n)),n}containsHandler(e){return oT(this.dragSources,e)||oT(this.dropTargets,e)}getSource(e,t=!1){bP(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return bP(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return bP(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return bP(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return rT(e)===eT.SOURCE}isTargetId(e){return rT(e)===eT.TARGET}removeSource(e){var t;bP(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:ZP,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},YP.enqueueTask(GP.create(t))}removeTarget(e){bP(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:XP,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);bP(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){bP(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=nT(e);return this.types.set(r,t),e===eT.SOURCE?this.dragSources.set(r,n):e===eT.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const iT=(e,t)=>e===t;function sT(e=zP,t){switch(t.type){case kP:break;case KP:case QP:case XP:case ZP:return zP;default:return $P}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,o=function(e,t){const n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach((e,t)=>{1===e&&o.push(t)}),o}(n,r),a=o.length>0||!function(e,t,n=iT){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r);if(!a)return zP;const i=r[r.length-1],s=n[n.length-1];return i!==s&&(i&&o.push(i),s&&o.push(s)),o}function lT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const uT={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function cT(e=uT,t){const{payload:n}=t;switch(t.type){case xP:case CP:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case kP:return r=e.clientOffset,o=n.clientOffset,!r&&!o||r&&o&&r.x===o.x&&r.y===o.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){lT(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case EP:case _P:return uT;default:return e}var r,o}function dT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){dT(e,t,n[t])})}return e}const pT={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function hT(e=pT,t){const{payload:n}=t;switch(t.type){case CP:return fT({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case SP:return fT({},e,{isSourcePublic:!0});case kP:return fT({},e,{targetIds:n.targetIds});case XP:return-1===e.targetIds.indexOf(n.targetId)?e:fT({},e,{targetIds:(r=e.targetIds,o=n.targetId,r.filter(e=>e!==o))});case _P:return fT({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case EP:return fT({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,o}function mT(e=0,t){switch(t.type){case KP:case QP:return e+1;case ZP:case XP:return e-1;default:return e}}function gT(e=0){return e+1}function yT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){yT(e,t,n[t])})}return e}function bT(e={},t){return{dirtyHandlerIds:sT(e.dirtyHandlerIds,{type:t.type,payload:vT({},t.payload,{prevTargetIds:(n=e,r="dragOperation.targetIds",o=[],r.split(".").reduce((e,t)=>e&&e[t]?e[t]:o||null,n))})}),dragOffset:cT(e.dragOffset,t),refCount:mT(e.refCount,t),dragOperation:hT(e.dragOperation,t),stateId:gT(e.stateId)};var n,r,o}function wT(e,t=void 0,n={},r=!1){const o=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return vP(bT,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),a=new HP(o,new aT(o)),i=new LP(o,a),s=e(i,t,n);return i.receiveBackend(s),i}function xT(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}let CT=0;const ST=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var kT,_T,ET=D.memo(function(e){var{children:t}=e,n=xT(e,["children"]);const[r,o]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e,t=jT(),n,r){const o=t;o[ST]||(o[ST]={dragDropManager:wT(e,t,n,r)});return o[ST]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(n);return D.useEffect(()=>{if(o){const e=jT();return++CT,()=>{0===--CT&&(e[ST]=null)}}},[]),m.jsx(pP.Provider,{value:r,children:t})});function jT(){return"undefined"!=typeof global?global:window}var NT=(_T||(_T=1,kT=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;0!==o--;){var i=a[o];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}),kT),RT=n(NT);const OT="undefined"!=typeof window?D.useLayoutEffect:D.useEffect;function PT(e,t,n){const[r,o]=function(e,t,n){const[r,o]=D.useState(()=>t(e)),a=D.useCallback(()=>{const a=t(e);RT(r,a)||(o(a),n&&n())},[r,e,n]);return OT(a),[r,a]}(e,t,n);return OT(function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(o,{handlerIds:[t]})},[e,o]),r}function TT(e,t,n){return PT(t,e||(()=>({})),()=>n.reconnect())}function DT(e,t){const n=[...t||[]];return null==t&&"function"!=typeof e&&n.push(e),D.useMemo(()=>"function"==typeof e?e():e,n)}function MT(e){return D.useMemo(()=>e.hooks.dragSource(),[e])}function IT(e){return D.useMemo(()=>e.hooks.dragPreview(),[e])}let AT=!1,LT=!1;class FT{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){bP(!AT,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return AT=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{AT=!1}}isDragging(){if(!this.sourceId)return!1;bP(!LT,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return LT=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{LT=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let zT=!1;class $T{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;bP(!zT,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return zT=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{zT=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function HT(e,t,n,r){let o;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let n=0;n<a.length;n++){const r=a[n];if(!s(r))return!1;const i=e[r],l=t[r];if(o=void 0,!1===o||void 0===o&&i!==l)return!1}return!0}function BT(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function VT(e){return(t=null,n=null)=>{if(!D.isValidElement(t)){const r=t;return e(r,n),r}const r=t;!function(e){if("string"==typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}(r);const o=n?t=>e(t,n):e;return function(e,t){const n=e.ref;return bP("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?D.cloneElement(e,{ref:e=>{qT(n,e),qT(t,e)}}):D.cloneElement(e,{ref:t})}(r,o)}}function UT(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const e=VT(r);t[n]=()=>e}}),t}function qT(e,t){"function"==typeof e?e(t):e.current=t}class WT{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!HT(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!HT(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=UT({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,BT(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,BT(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class YT{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!HT(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=UT({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,BT(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function GT(){const{dragDropManager:e}=D.useContext(pP);return bP(null!=e,"Expected drag drop context"),e}class KT{beginDrag(){const e=this.spec,t=this.monitor;let n=null;return n="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=n?n:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const n=this.spec,r=this.monitor,{isDragging:o}=n;return o?o(r):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}}function QT(e,t,n){const r=GT(),o=function(e,t,n){const r=D.useMemo(()=>new KT(e,t,n),[t,n]);return D.useEffect(()=>{r.spec=e},[e]),r}(e,t,n),a=function(e){return D.useMemo(()=>{const t=e.type;return bP(null!=t,"spec.type must be defined"),t},[e])}(e);OT(function(){if(null!=a){const[e,i]=function(e,t,n){const r=n.getRegistry(),o=r.addSource(e,t);return[o,()=>r.removeSource(o)]}(a,o,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),i}},[r,t,n,o,a])}function ZT(e,t){const n=DT(e,t);bP(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=function(){const e=GT();return D.useMemo(()=>new FT(e),[e])}(),o=function(e,t){const n=GT(),r=D.useMemo(()=>new WT(n.getBackend()),[n]);return OT(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),OT(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}(n.options,n.previewOptions);return QT(n,r,o),[TT(n.collect,r,o),MT(o),IT(o)]}function XT(e){return D.useMemo(()=>e.hooks.dropTarget(),[e])}class JT{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function eD(e,t,n){const r=GT(),o=function(e,t){const n=D.useMemo(()=>new JT(e,t),[t]);return D.useEffect(()=>{n.spec=e},[e]),n}(e,t),a=function(e){const{accept:t}=e;return D.useMemo(()=>(bP(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}(e);OT(function(){const[e,i]=function(e,t,n){const r=n.getRegistry(),o=r.addTarget(e,t);return[o,()=>r.removeTarget(o)]}(a,o,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),i},[r,t,o,n,a.map(e=>e.toString()).join("|")])}function tD(e,t){const n=DT(e,t),r=function(){const e=GT();return D.useMemo(()=>new $T(e),[e])}(),o=function(e){const t=GT(),n=D.useMemo(()=>new YT(t.getBackend()),[t]);return OT(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}(n.options);return eD(n,r,o),[TT(n.collect,r,o),XT(o)]}function nD(e){let t=null;return()=>(null==t&&(t=e()),t)}class rD{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const o=[];return n.forEach(e=>o.push(e)),o}(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter(e=>e!==r)),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class oD{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const aD="__NATIVE_FILE__",iD="__NATIVE_URL__",sD="__NATIVE_TEXT__",lD="__NATIVE_HTML__";var uD=Object.freeze({__proto__:null,FILE:aD,HTML:lD,TEXT:sD,URL:iD});function cD(e,t,n){const r=t.reduce((t,n)=>t||e.getData(n),"");return null!=r?r:n}const dD={[aD]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[lD]:{exposeProperties:{html:(e,t)=>cD(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[iD]:{exposeProperties:{urls:(e,t)=>cD(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[sD]:{exposeProperties:{text:(e,t)=>cD(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function fD(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(dD).filter(e=>{const n=dD[e];return!!(null==n?void 0:n.matchesTypes)&&n.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null}const pD=nD(()=>/firefox/i.test(navigator.userAgent)),hD=nD(()=>Boolean(window.safari));class mD{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:o,c3s:a}=this;let i=t.length-1;if(e===t[i])return n[i];let s,l=0,u=a.length-1;for(;l<=u;){s=Math.floor(.5*(l+u));const r=t[s];if(r<e)l=s+1;else{if(!(r>e))return n[s];u=s-1}}i=Math.max(0,u);const c=e-t[i],d=c*c;return n[i]+r[i]*c+o[i]*d+a[i]*c*d}constructor(e,t){const{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort((t,n)=>e[t]<e[n]?-1:1);const o=[],a=[];let i,s;for(let r=0;r<n-1;r++)i=e[r+1]-e[r],s=t[r+1]-t[r],o.push(i),a.push(s/i);const l=[a[0]];for(let e=0;e<o.length-1;e++){const t=a[e],n=a[e+1];if(t*n<=0)l.push(0);else{i=o[e];const r=o[e+1],a=i+r;l.push(3*a/((a+r)/t+(a+i)/n))}}l.push(a[a.length-1]);const u=[],c=[];let d;for(let e=0;e<l.length-1;e++){d=a[e];const t=l[e],n=1/o[e],r=t+l[e+1]-d-d;u.push((d-t-r)*n),c.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=l,this.c2s=u,this.c3s=c}}function gD(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function yD(e){return{x:e.clientX,y:e.clientY}}function vD(e,t,n,r,o){const a=function(e){var t;return"IMG"===e.nodeName&&(pD()||!(null===(t=document.documentElement)||void 0===t?void 0:t.contains(e)))}(t),i=gD(a?e:t),s={x:n.x-i.x,y:n.y-i.y},{offsetWidth:l,offsetHeight:u}=e,{anchorX:c,anchorY:d}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=function(e,t,n,r){let o=e?t.width:n,a=e?t.height:r;return hD()&&e&&(a/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:a}}(a,t,l,u),{offsetX:h,offsetY:m}=o,g=0===m||m;return{x:0===h||h?h:new mD([0,.5,1],[s.x,s.x/l*f,s.x+f-l]).interpolate(c),y:g?m:(()=>{let e=new mD([0,.5,1],[s.y,s.y/u*p,s.y+p-u]).interpolate(d);return hD()&&a&&(e+=(window.devicePixelRatio-1)*p),e})()}}class bD{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function wD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){wD(e,t,n[t])})}return e}class CD{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),o=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),o=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",o),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return xD({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return xD({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(uD).some(t=>uD[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=dD[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new oD(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&gD(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=yD(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,o=fD(r);if(this.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),o=this.sourcePreviewNodes.get(e)||t;if(o){const{anchorX:e,anchorY:a,offsetX:i,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),l=vD(t,o,n,{anchorX:e,anchorY:a},{offsetX:i,offsetY:s});r.setDragImage(o,l.x,l.y)}}try{null==r||r.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(o)this.beginDragNativeItem(o);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=fD(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:yD(e)});t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=yD(e),this.scheduleHover(t);(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):fD(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:yD(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new bD(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new rD(this.isNodeInDocument)}}const SD=function(e,t,n){return new CD(e,t,n)};var kD,_D,ED=Object.create,jD=Object.defineProperty,ND=Object.getOwnPropertyDescriptor,RD=Object.getOwnPropertyNames,OD=Object.getPrototypeOf,PD=Object.prototype.hasOwnProperty,TD=(e,t,n)=>(n=null!=e?ED(OD(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of RD(t))PD.call(e,o)||o===n||jD(e,o,{get:()=>t[o],enumerable:!(r=ND(t,o))||r.enumerable});return e})(jD(n,"default",{value:e,enumerable:!0}),e)),DD=(kD={"node_modules/classnames/index.js"(e,t){!function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var a=typeof o;if("string"===a||"number"===a)t.push(o);else if(Array.isArray(o)){if(o.length){var i=n.apply(null,o);i&&t.push(i)}}else if("object"===a){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){t.push(o.toString());continue}for(var s in o)e.call(o,s)&&o[s]&&t.push(s)}}}return t.join(" ")}void 0!==t&&t.exports?(n.default=n,t.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return n}):window.classNames=n}()}},function(){return _D||(0,kD[RD(kD)[0]])((_D={exports:{}}).exports,_D),_D.exports}),MD=TD(DD()),ID="object"==typeof global&&global&&global.Object===Object&&global,AD="object"==typeof self&&self&&self.Object===Object&&self,LD=ID||AD||Function("return this")(),FD=LD.Symbol,zD=Object.prototype,$D=zD.hasOwnProperty,HD=zD.toString,BD=FD?FD.toStringTag:void 0;var VD=function(e){var t=$D.call(e,BD),n=e[BD];try{e[BD]=void 0;var r=!0}catch(e){}var o=HD.call(e);return r&&(t?e[BD]=n:delete e[BD]),o},UD=Object.prototype.toString;var qD=function(e){return UD.call(e)},WD=FD?FD.toStringTag:void 0;var YD=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":WD&&WD in Object(e)?VD(e):qD(e)};var GD=function(e){return null!=e&&"object"==typeof e};var KD=function(e){return"symbol"==typeof e||GD(e)&&"[object Symbol]"==YD(e)};var QD=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},ZD=Array.isArray,XD=FD?FD.prototype:void 0,JD=XD?XD.toString:void 0;var eM=function e(t){if("string"==typeof t)return t;if(ZD(t))return QD(t,e)+"";if(KD(t))return JD?JD.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var tM=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var nM,rM=function(e){if(!tM(e))return!1;var t=YD(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},oM=LD["__core-js_shared__"],aM=(nM=/[^.]+$/.exec(oM&&oM.keys&&oM.keys.IE_PROTO||""))?"Symbol(src)_1."+nM:"";var iM=function(e){return!!aM&&aM in e},sM=Function.prototype.toString;var lM=function(e){if(null!=e){try{return sM.call(e)}catch(e){}try{return e+""}catch(e){}}return""},uM=/^\[object .+?Constructor\]$/,cM=Function.prototype,dM=Object.prototype,fM=cM.toString,pM=dM.hasOwnProperty,hM=RegExp("^"+fM.call(pM).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var mM=function(e){return!(!tM(e)||iM(e))&&(rM(e)?hM:uM).test(lM(e))};var gM=function(e,t){return null==e?void 0:e[t]};var yM=function(e,t){var n=gM(e,t);return mM(n)?n:void 0},vM=yM(LD,"WeakMap");var bM=function(){};var wM=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1};var xM=function(e){return e!=e};var CM=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1};var SM=function(e,t,n){return t==t?CM(e,t,n):wM(e,xM,n)};var kM=function(e,t){return!!(null==e?0:e.length)&&SM(e,t,0)>-1},_M=/^(?:0|[1-9]\d*)$/;var EM=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&_M.test(e))&&e>-1&&e%1==0&&e<t};var jM=function(e,t){return e===t||e!=e&&t!=t};var NM=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var RM=function(e){return null!=e&&NM(e.length)&&!rM(e)},OM=Object.prototype;var PM=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||OM)};var TM=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var DM=function(e){return GD(e)&&"[object Arguments]"==YD(e)},MM=Object.prototype,IM=MM.hasOwnProperty,AM=MM.propertyIsEnumerable,LM=DM(function(){return arguments}())?DM:function(e){return GD(e)&&IM.call(e,"callee")&&!AM.call(e,"callee")},FM=LM;var zM=function(){return!1},$M="object"==typeof e&&e&&!e.nodeType&&e,HM=$M&&"object"==typeof module&&module&&!module.nodeType&&module,BM=HM&&HM.exports===$M?LD.Buffer:void 0,VM=(BM?BM.isBuffer:void 0)||zM,UM={};UM["[object Float32Array]"]=UM["[object Float64Array]"]=UM["[object Int8Array]"]=UM["[object Int16Array]"]=UM["[object Int32Array]"]=UM["[object Uint8Array]"]=UM["[object Uint8ClampedArray]"]=UM["[object Uint16Array]"]=UM["[object Uint32Array]"]=!0,UM["[object Arguments]"]=UM["[object Array]"]=UM["[object ArrayBuffer]"]=UM["[object Boolean]"]=UM["[object DataView]"]=UM["[object Date]"]=UM["[object Error]"]=UM["[object Function]"]=UM["[object Map]"]=UM["[object Number]"]=UM["[object Object]"]=UM["[object RegExp]"]=UM["[object Set]"]=UM["[object String]"]=UM["[object WeakMap]"]=!1;var qM=function(e){return GD(e)&&NM(e.length)&&!!UM[YD(e)]};var WM=function(e){return function(t){return e(t)}},YM="object"==typeof e&&e&&!e.nodeType&&e,GM=YM&&"object"==typeof module&&module&&!module.nodeType&&module,KM=GM&&GM.exports===YM&&ID.process,QM=function(){try{var e=GM&&GM.require&&GM.require("util").types;return e||KM&&KM.binding&&KM.binding("util")}catch(e){}}(),ZM=QM&&QM.isTypedArray,XM=ZM?WM(ZM):qM,JM=Object.prototype.hasOwnProperty;var eI=function(e,t){var n=ZD(e),r=!n&&FM(e),o=!n&&!r&&VM(e),a=!n&&!r&&!o&&XM(e),i=n||r||o||a,s=i?TM(e.length,String):[],l=s.length;for(var u in e)!t&&!JM.call(e,u)||i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||EM(u,l))||s.push(u);return s};var tI=function(e,t){return function(n){return e(t(n))}},nI=tI(Object.keys,Object),rI=Object.prototype.hasOwnProperty;var oI=function(e){if(!PM(e))return nI(e);var t=[];for(var n in Object(e))rI.call(e,n)&&"constructor"!=n&&t.push(n);return t};var aI=function(e){return RM(e)?eI(e):oI(e)},iI=yM(Object,"create");var sI=function(){this.__data__=iI?iI(null):{},this.size=0};var lI=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},uI=Object.prototype.hasOwnProperty;var cI=function(e){var t=this.__data__;if(iI){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return uI.call(t,e)?t[e]:void 0},dI=Object.prototype.hasOwnProperty;var fI=function(e){var t=this.__data__;return iI?void 0!==t[e]:dI.call(t,e)};var pI=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iI&&void 0===t?"__lodash_hash_undefined__":t,this};function hI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}hI.prototype.clear=sI,hI.prototype.delete=lI,hI.prototype.get=cI,hI.prototype.has=fI,hI.prototype.set=pI;var mI=hI;var gI=function(){this.__data__=[],this.size=0};var yI=function(e,t){for(var n=e.length;n--;)if(jM(e[n][0],t))return n;return-1},vI=Array.prototype.splice;var bI=function(e){var t=this.__data__,n=yI(t,e);return!(n<0)&&(n==t.length-1?t.pop():vI.call(t,n,1),--this.size,!0)};var wI=function(e){var t=this.__data__,n=yI(t,e);return n<0?void 0:t[n][1]};var xI=function(e){return yI(this.__data__,e)>-1};var CI=function(e,t){var n=this.__data__,r=yI(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function SI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}SI.prototype.clear=gI,SI.prototype.delete=bI,SI.prototype.get=wI,SI.prototype.has=xI,SI.prototype.set=CI;var kI=SI,_I=yM(LD,"Map");var EI=function(){this.size=0,this.__data__={hash:new mI,map:new(_I||kI),string:new mI}};var jI=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var NI=function(e,t){var n=e.__data__;return jI(t)?n["string"==typeof t?"string":"hash"]:n.map};var RI=function(e){var t=NI(this,e).delete(e);return this.size-=t?1:0,t};var OI=function(e){return NI(this,e).get(e)};var PI=function(e){return NI(this,e).has(e)};var TI=function(e,t){var n=NI(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function DI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}DI.prototype.clear=EI,DI.prototype.delete=RI,DI.prototype.get=OI,DI.prototype.has=PI,DI.prototype.set=TI;var MI=DI;var II=function(e){return null==e?"":eM(e)};var AI=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};var LI=function(e){return function(t){return null==e?void 0:e[t]}};var FI=function(){this.__data__=new kI,this.size=0};var zI=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var $I=function(e){return this.__data__.get(e)};var HI=function(e){return this.__data__.has(e)};var BI=function(e,t){var n=this.__data__;if(n instanceof kI){var r=n.__data__;if(!_I||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new MI(r)}return n.set(e,t),this.size=n.size,this};function VI(e){var t=this.__data__=new kI(e);this.size=t.size}VI.prototype.clear=FI,VI.prototype.delete=zI,VI.prototype.get=$I,VI.prototype.has=HI,VI.prototype.set=BI;var UI=VI;var qI=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a};var WI=function(){return[]},YI=Object.prototype.propertyIsEnumerable,GI=Object.getOwnPropertySymbols,KI=GI?function(e){return null==e?[]:(e=Object(e),qI(GI(e),function(t){return YI.call(e,t)}))}:WI;var QI=function(e,t,n){var r=t(e);return ZD(e)?r:AI(r,n(e))};var ZI=function(e){return QI(e,aI,KI)},XI=yM(LD,"DataView"),JI=yM(LD,"Promise"),eA=yM(LD,"Set"),tA="[object Map]",nA="[object Promise]",rA="[object Set]",oA="[object WeakMap]",aA="[object DataView]",iA=lM(XI),sA=lM(_I),lA=lM(JI),uA=lM(eA),cA=lM(vM),dA=YD;(XI&&dA(new XI(new ArrayBuffer(1)))!=aA||_I&&dA(new _I)!=tA||JI&&dA(JI.resolve())!=nA||eA&&dA(new eA)!=rA||vM&&dA(new vM)!=oA)&&(dA=function(e){var t=YD(e),n="[object Object]"==t?e.constructor:void 0,r=n?lM(n):"";if(r)switch(r){case iA:return aA;case sA:return tA;case lA:return nA;case uA:return rA;case cA:return oA}return t});var fA=dA,pA=LD.Uint8Array;var hA=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var mA=function(e){return this.__data__.has(e)};function gA(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new MI;++t<n;)this.add(e[t])}gA.prototype.add=gA.prototype.push=hA,gA.prototype.has=mA;var yA=gA;var vA=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var bA=function(e,t){return e.has(t)};var wA=function(e,t,n,r,o,a){var i=1&n,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=2&n?new yA:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var g=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!vA(t,function(e,t){if(!bA(p,t)&&(h===e||o(h,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(h!==m&&!o(h,m,n,r,a)){f=!1;break}}return a.delete(e),a.delete(t),f};var xA=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n};var CA=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},SA=FD?FD.prototype:void 0,kA=SA?SA.valueOf:void 0;var _A=function(e,t,n,r,o,a,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new pA(e),new pA(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jM(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=xA;case"[object Set]":var l=1&r;if(s||(s=CA),e.size!=t.size&&!l)return!1;var u=i.get(e);if(u)return u==t;r|=2,i.set(e,t);var c=wA(s(e),s(t),r,o,a,i);return i.delete(e),c;case"[object Symbol]":if(kA)return kA.call(e)==kA.call(t)}return!1},EA=Object.prototype.hasOwnProperty;var jA=function(e,t,n,r,o,a){var i=1&n,s=ZI(e),l=s.length;if(l!=ZI(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:EA.call(t,c)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var h=i;++u<l;){var m=e[c=s[u]],g=t[c];if(r)var y=i?r(g,m,c,t,e,a):r(m,g,c,e,t,a);if(!(void 0===y?m===g||o(m,g,n,r,a):y)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return a.delete(e),a.delete(t),p},NA="[object Arguments]",RA="[object Array]",OA="[object Object]",PA=Object.prototype.hasOwnProperty;var TA=function(e,t,n,r,o,a){var i=ZD(e),s=ZD(t),l=i?RA:fA(e),u=s?RA:fA(t),c=(l=l==NA?OA:l)==OA,d=(u=u==NA?OA:u)==OA,f=l==u;if(f&&VM(e)){if(!VM(t))return!1;i=!0,c=!1}if(f&&!c)return a||(a=new UI),i||XM(e)?wA(e,t,n,r,o,a):_A(e,t,l,n,r,o,a);if(!(1&n)){var p=c&&PA.call(e,"__wrapped__"),h=d&&PA.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return a||(a=new UI),o(m,g,n,r,a)}}return!!f&&(a||(a=new UI),jA(e,t,n,r,o,a))};var DA=function e(t,n,r,o,a){return t===n||(null==t||null==n||!GD(t)&&!GD(n)?t!=t&&n!=n:TA(t,n,r,o,e,a))};var MA=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},IA=LI({"&":"&","<":"<",">":">",'"':""","'":"'"}),AA=/[&<>"']/g,LA=RegExp(AA.source);var FA=function(e){return(e=II(e))&&LA.test(e)?e.replace(AA,IA):e},zA=/[\\^$.*+?()[\]{}|]/g,$A=RegExp(zA.source);var HA=function(e){return(e=II(e))&&$A.test(e)?e.replace(zA,"\\$&"):e};var BA=function(e,t){return DA(e,t)},VA=eA&&1/CA(new eA([,-0]))[1]==1/0?function(e){return new eA(e)}:bM,UA=VA;var qA=function(e,t,n){var r=-1,o=kM,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=MA;else if(a>=200){var u=t?null:UA(e);if(u)return CA(u);i=!1,o=bA,l=new yA}else l=t?[]:s;e:for(;++r<a;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,i&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(c)}else o(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s};var WA=function(e){return e&&e.length?qA(e):[]},YA={ENTER:[10,13],TAB:9,BACKSPACE:8,UP_ARROW:38,DOWN_ARROW:40,SPACE:32},GA={ENTER:"Enter",TAB:"Tab",COMMA:",",SPACE:" ",SEMICOLON:";"},KA="Press enter to add new tag",QA="text",ZA={tags:"ReactTags__tags",tagInput:"ReactTags__tagInput",tagInputField:"ReactTags__tagInputField",selected:"ReactTags__selected",tag:"ReactTags__tag",remove:"ReactTags__remove",suggestions:"ReactTags__suggestions",activeSuggestion:"ReactTags__activeSuggestion",editTagInput:"ReactTags__editTagInput",editTagInputField:"ReactTags__editTagInputField",clearAll:"ReactTags__clearAll"},XA="inline",JA="top",eL="bottom",tL="Tag limit reached!";function nL(e){const{moveTag:t,readOnly:n,allowDragDrop:r}=e;return void 0!==t&&!n&&r}var rL=e=>{const{readOnly:t,removeComponent:n,onRemove:r,className:o,tag:a,index:i}=e,s=e=>{if(YA.ENTER.includes(e.keyCode)||e.keyCode===YA.SPACE)return e.preventDefault(),void e.stopPropagation();e.keyCode===YA.BACKSPACE&&r(e)};if(t)return m.jsx("span",{});const l=`Tag at index ${i} with value ${a.id} focussed. Press backspace to remove`;if(n){const e=n;return m.jsx(e,{"data-testid":"remove",onRemove:r,onKeyDown:s,className:o,"aria-label":l,tag:a,index:i})}return m.jsx("button",{"data-testid":"remove",onClick:r,onKeyDown:s,className:o,type:"button","aria-label":l,children:m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:"12",width:"12",fill:"#fff",children:m.jsx("path",{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"})})})},oL="tag",aL=e=>{const t=D.useRef(null),{readOnly:n=!1,tag:r,classNames:o,index:a,moveTag:i,allowDragDrop:s=!0,labelField:l="text",tags:u}=e,[{isDragging:c},d]=ZT(()=>({type:oL,collect:e=>({isDragging:!!e.isDragging()}),item:e,canDrag:()=>nL({moveTag:i,readOnly:n,allowDragDrop:s})}),[u]),[,f]=tD(()=>({accept:oL,drop:t=>{const n=t.index,r=a;n!==r&&e?.moveTag?.(n,r)},canDrop:e=>function(e){const{readOnly:t,allowDragDrop:n}=e;return!t&&n}(e)}),[u]);d(f(t));const p=e.tag[l],{className:h=""}=r,g=c?0:1;return m.jsxs("span",{ref:t,className:(0,MD.default)("tag-wrapper",o.tag,h),style:{opacity:g,cursor:nL({moveTag:i,readOnly:n,allowDragDrop:s})?"move":"auto"},"data-testid":"tag",onClick:e.onTagClicked,onTouchStart:e.onTagClicked,children:[p,m.jsx(rL,{tag:e.tag,className:o.remove,removeComponent:e.removeComponent,onRemove:e.onDelete,readOnly:n,index:a})]})},iL=e=>m.jsx("button",{"aria-label":e["aria-label"],className:e.classNames.clearAll,onClick:e.onClick,children:"Clear all"}),sL=(e,t,n,r)=>"function"==typeof r?r(e):e.length>=t&&n,lL=D.memo(e=>{const t=D.createRef(),{labelField:n,minQueryLength:r,isFocused:o,classNames:a,selectedIndex:i,query:s}=e;D.useEffect(()=>{if(!t.current)return;const e=t.current.querySelector(`.${a.activeSuggestion}`);e&&((e,t)=>{const n=t.offsetHeight,r=e.offsetHeight,o=e.offsetTop-t.scrollTop;o+r>=n?t.scrollTop+=o-n+r:o<0&&(t.scrollTop+=o)})(e,t.current)},[i]);const l=(e,t)=>{const r=t.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),{[n]:o}=e;return{__html:o.replace(RegExp(r,"gi"),e=>`<mark>${FA(e)}</mark>`)}},u=(t,n)=>"function"==typeof e.renderSuggestion?e.renderSuggestion(t,n):m.jsx("span",{dangerouslySetInnerHTML:l(t,n)}),c=e.suggestions.map((t,n)=>m.jsx("li",{onMouseDown:e.handleClick.bind(null,n),onTouchStart:e.handleClick.bind(null,n),onMouseOver:e.handleHover.bind(null,n),className:n===e.selectedIndex?e.classNames.activeSuggestion:"",children:u(t,e.query)},n));return 0!==c.length&&sL(s,r||2,o,e.shouldRenderSuggestions)?m.jsx("div",{ref:t,className:a.suggestions,"data-testid":"suggestions",children:m.jsxs("ul",{children:[" ",c," "]})}):null},(e,t)=>{const{query:n,minQueryLength:r=2,isFocused:o,suggestions:a}=t;return!(e.isFocused!==o||!BA(e.suggestions,a)||sL(n,r,o,t.shouldRenderSuggestions)!==sL(e.query,e.minQueryLength??2,e.isFocused,e.shouldRenderSuggestions)||e.selectedIndex!==t.selectedIndex)}),uL=lL,cL=TD(DD()),dL=e=>{const{autofocus:t,autoFocus:n,readOnly:r,labelField:o,allowDeleteFromEmptyInput:a,allowAdditionFromPaste:i,allowDragDrop:s,minQueryLength:l,shouldRenderSuggestions:u,removeComponent:c,autocomplete:d,inline:f,maxTags:p,allowUnique:h,editable:g,placeholder:y,delimiters:v,separators:b,tags:w,inputFieldPosition:x,inputProps:C,classNames:S,maxLength:k,inputValue:_,clearAll:E,ariaAttrs:j}=e,[N,R]=D.useState(e.suggestions),[O,P]=D.useState(""),[T,M]=D.useState(!1),[I,A]=D.useState(-1),[L,F]=D.useState(!1),[z,$]=D.useState(""),[H,B]=D.useState(-1),[V,U]=D.useState(""),q=D.createRef(),W=D.useRef(null),Y=D.useRef(null);D.useEffect(()=>{v.length&&console.warn("[Deprecation] The delimiters prop is deprecated and will be removed in v7.x.x, please use separators instead. If you have any concerns regarding this, please share your thoughts in https://github.com/react-tags/react-tags/issues/960")},[]),D.useEffect(()=>{void 0!==f&&console.warn("[Deprecation] The inline attribute is deprecated and will be removed in v7.x.x, please use inputFieldPosition instead.")},[f]),D.useEffect(()=>{void 0!==t&&console.warn("[Deprecated] autofocus prop will be removed in 7.x so please migrate to autoFocus prop."),(t||n&&!1!==t)&&!r&&Q()},[n,n,r]),D.useEffect(()=>{ee()},[O,e.suggestions]);const G=t=>{let n=e.suggestions.slice();if(h){const e=w.map(e=>e.id.trim().toLowerCase());n=n.filter(t=>!e.includes(t.id.toLowerCase()))}if(e.handleFilterSuggestions)return e.handleFilterSuggestions(t,n);const r=n.filter(e=>0===K(t,e)),o=n.filter(e=>K(t,e)>0);return r.concat(o)},K=(e,t)=>t[o].toLowerCase().indexOf(e.toLowerCase()),Q=()=>{P(""),W.current&&(W.current.value="",W.current.focus())},Z=(t,n)=>{n.preventDefault(),n.stopPropagation();const r=w.slice();0!==r.length&&(U(""),e?.handleDelete?.(t,n),X(t,r))},X=(e,t)=>{if(!q?.current)return;const n=q.current.querySelectorAll(".ReactTags__remove");let r="";0===e&&t.length>1?(r=`Tag at index ${e} with value ${t[e].id} deleted. Tag at index 0 with value ${t[1].id} focussed. Press backspace to remove`,n[0].focus()):e>0?(r=`Tag at index ${e} with value ${t[e].id} deleted. Tag at index ${e-1} with value ${t[e-1].id} focussed. Press backspace to remove`,n[e-1].focus()):(r=`Tag at index ${e} with value ${t[e].id} deleted. Input focussed. Press enter to add a new tag`,W.current?.focus()),$(r)},J=t=>{e.handleInputChange&&e.handleInputChange(t.target.value,t);const n=t.target.value.trim();P(n)},ee=()=>{const e=G(O);R(e),A(I>=e.length?e.length-1:I)},te=t=>{const n=t.target.value;e.handleInputFocus&&e.handleInputFocus(n,t),M(!0)},ne=t=>{const n=t.target.value;e.handleInputBlur&&(e.handleInputBlur(n,t),W.current&&(W.current.value="")),M(!1),B(-1)},re=e=>{if(!e.nativeEvent.isComposing){if("Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),A(-1),F(!1),R([]),B(-1)),(-1!==b.indexOf(e.key)||-1!==v.indexOf(e.keyCode))&&!e.shiftKey){e.keyCode===YA.TAB&&""===O||e.preventDefault();const t=L&&-1!==I?N[I]:{id:O.trim(),[o]:O.trim(),className:""};Object.keys(t)&&ie(t)}"Backspace"!==e.key||""!==O||!a&&x!==XA||Z(w.length-1,e),e.keyCode===YA.UP_ARROW&&(e.preventDefault(),A(I<=0?N.length-1:I-1),F(!0)),e.keyCode===YA.DOWN_ARROW&&(e.preventDefault(),F(!0),0===N.length?A(-1):A((I+1)%N.length))}},oe=()=>p&&w.length>=p,ae=t=>{if(!i)return;if(oe())return U(tL),void Q();U(""),t.preventDefault();const n=t.clipboardData||window.clipboardData,r=n.getData("text"),{maxLength:a=r.length}=e,s=Math.min(a,r.length),l=n.getData("text").substr(0,s);let u=v;b.length&&(u=[],b.forEach(e=>{const t=function(e){switch(e){case GA.ENTER:return[10,13];case GA.TAB:return 9;case GA.COMMA:return 188;case GA.SPACE:return 32;case GA.SEMICOLON:return 186;default:return 0}}(e);Array.isArray(t)?u=[...u,...t]:u.push(t)}));const c=function(e){const t=e.map(e=>{const t=e-48*Math.floor(e/48);return String.fromCharCode(96<=e?t:e)}).join(""),n=HA(t);return new RegExp(`[${n}]+`)}(u),d=l.split(c).map(e=>e.trim());WA(d).forEach(e=>ie({id:e.trim(),[o]:e.trim(),className:""}))},ie=t=>{if(!t.id||!t[o])return;if(-1===H){if(oe())return U(tL),void Q();U("")}const n=w.map(e=>e.id.toLowerCase());if(!(h&&n.indexOf(t.id.trim().toLowerCase())>=0)){if(d){const e=G(t[o]);console.warn("[Deprecation] The autocomplete prop will be removed in 7.x to simplify the integration and make it more intutive. If you have any concerns regarding this, please share your thoughts in https://github.com/react-tags/react-tags/issues/949"),(1===d&&1===e.length||!0===d&&e.length)&&(t=e[0])}-1!==H&&e.onTagUpdate?e.onTagUpdate(H,t):e?.handleAddition?.(t),P(""),F(!1),A(-1),B(-1),Q()}},se=(t,n)=>{const r=w[t];e?.handleDrag?.(r,t,n)},le=(()=>{const t={...ZA,...e.classNames};return w.map((n,a)=>m.jsx(D.Fragment,{children:H===a?m.jsx("div",{className:t.editTagInput,children:m.jsx("input",{ref:e=>{Y.current=e},onFocus:te,value:O,onChange:J,onKeyDown:re,onBlur:ne,className:t.editTagInputField,onPaste:ae,"data-testid":"tag-edit"})}):m.jsx(aL,{index:a,tag:n,tags:w,labelField:o,onDelete:e=>Z(a,e),moveTag:s?se:void 0,removeComponent:c,onTagClicked:t=>((t,n,a)=>{r||(g&&(B(t),P(n[o]),Y.current?.focus()),e.handleTagClick?.(t,a))})(a,n,t),readOnly:r,classNames:t,allowDragDrop:s})},a))})(),ue={...ZA,...S},{name:ce,id:de}=e,fe=!1===f?eL:x,pe=r?null:m.jsxs("div",{className:ue.tagInput,children:[m.jsx("input",{...C,ref:e=>{W.current=e},className:ue.tagInputField,type:"text",placeholder:y,"aria-label":y,onFocus:te,onBlur:ne,onChange:J,onKeyDown:re,onPaste:ae,name:ce,id:de,maxLength:k,value:_,"data-automation":"input","data-testid":"input"}),m.jsx(uL,{query:O.trim(),suggestions:N,labelField:o,selectedIndex:I,handleClick:e=>{ie(N[e])},handleHover:e=>{A(e),F(!0)},minQueryLength:l,shouldRenderSuggestions:u,isFocused:T,classNames:ue,renderSuggestion:e.renderSuggestion}),E&&w.length>0&&m.jsx(iL,{"aria-label":j?.clearAllLabel,classNames:ue,onClick:()=>{e.onClearAll&&e.onClearAll(),U(""),Q()}}),V&&m.jsxs("div",{"data-testid":"error",className:"ReactTags__error",children:[m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:"24",width:"24",fill:"#e03131",children:m.jsx("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})}),V]})]});return m.jsxs("div",{className:(0,cL.default)(ue.tags,"react-tags-wrapper"),ref:q,children:[m.jsx("p",{role:"alert",className:"sr-only",style:{position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",margin:"-1px",padding:0,width:"1px",height:"1px",border:0},children:z}),fe===JA&&pe,m.jsxs("div",{className:ue.selected,children:[le,fe===XA&&pe]}),fe===eL&&pe]})},fL=e=>{const{placeholder:t=KA,labelField:n=QA,suggestions:r=[],delimiters:o=[],separators:a=(e.delimiters?.length?[]:[GA.ENTER,GA.TAB]),autofocus:i,autoFocus:s=!0,inline:l,inputFieldPosition:u="inline",allowDeleteFromEmptyInput:c=!1,allowAdditionFromPaste:d=!0,autocomplete:f=!1,readOnly:p=!1,allowUnique:h=!0,allowDragDrop:g=!0,tags:y=[],inputProps:v={},editable:b=!1,clearAll:w=!1,ariaAttrs:x={clearAllLabel:"clear all tags"},handleDelete:C,handleAddition:S,onTagUpdate:k,handleDrag:_,handleFilterSuggestions:E,handleTagClick:j,handleInputChange:N,handleInputFocus:R,handleInputBlur:O,minQueryLength:P,shouldRenderSuggestions:T,removeComponent:D,onClearAll:M,classNames:I,name:A,id:L,maxLength:F,inputValue:z,maxTags:$,renderSuggestion:H}=e;return m.jsx(dL,{placeholder:t,labelField:n,suggestions:r,delimiters:o,separators:a,autofocus:i,autoFocus:s,inline:l,inputFieldPosition:u,allowDeleteFromEmptyInput:c,allowAdditionFromPaste:d,autocomplete:f,readOnly:p,allowUnique:h,allowDragDrop:g,tags:y,inputProps:v,editable:b,clearAll:w,ariaAttrs:x,handleDelete:C,handleAddition:S,onTagUpdate:k,handleDrag:_,handleFilterSuggestions:E,handleTagClick:j,handleInputChange:N,handleInputFocus:R,handleInputBlur:O,minQueryLength:P,shouldRenderSuggestions:T,removeComponent:D,onClearAll:M,classNames:I,name:A,id:L,maxLength:F,inputValue:z,maxTags:$,renderSuggestion:H})},pL=({...e})=>m.jsx(ET,{backend:SD,children:m.jsx(fL,{...e})});
|
|
224
224
|
/*! Bundled license information:
|
|
225
225
|
|
|
226
226
|
classnames/index.js:
|