diff --git a/美国版/Food Labeling Management Platform/build/assets/index-CSLBXRYd.js b/美国版/Food Labeling Management Platform/build/assets/index-ChMXTsCq.js index 14104cf..ad7e990 100644 --- a/美国版/Food Labeling Management Platform/build/assets/index-CSLBXRYd.js +++ b/美国版/Food Labeling Management Platform/build/assets/index-ChMXTsCq.js @@ -34,10 +34,10 @@ function U5(e,t){for(var r=0;rF||_[k]!==j[F]){var W=` -`+_[k].replace(" at new "," at ");return o.displayName&&W.includes("")&&(W=W.replace("",o.displayName)),W}while(1<=k&&0<=F);break}}}finally{Q=!1,Error.prepareStackTrace=v}return(o=o?o.displayName||o.name:"")?$(o):""}function pe(o){switch(o.tag){case 5:return $(o.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return o=ae(o.type,!1),o;case 11:return o=ae(o.type.render,!1),o;case 1:return o=ae(o.type,!0),o;default:return""}}function ye(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case T:return"Fragment";case N:return"Portal";case I:return"Profiler";case R:return"StrictMode";case U:return"Suspense";case H:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case L:return(o.displayName||"Context")+".Consumer";case q:return(o._context.displayName||"Context")+".Provider";case D:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case V:return l=o.displayName||null,l!==null?l:ye(o.type)||"Memo";case K:l=o._payload,o=o._init;try{return ye(o(l))}catch{}}return null}function oe(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(l);case 8:return l===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function me(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ie(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function ue(o){var l=ie(o)?"checked":"value",v=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),x=""+o[l];if(!o.hasOwnProperty(l)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var _=v.get,j=v.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return _.call(this)},set:function(k){x=""+k,j.call(this,k)}}),Object.defineProperty(o,l,{enumerable:v.enumerable}),{getValue:function(){return x},setValue:function(k){x=""+k},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function ve(o){o._valueTracker||(o._valueTracker=ue(o))}function re(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var v=l.getValue(),x="";return o&&(x=ie(o)?o.checked?"true":"false":o.value),o=x,o!==v?(l.setValue(o),!0):!1}function De(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Te(o,l){var v=l.checked;return ee({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??o._wrapperState.initialChecked})}function Ke(o,l){var v=l.defaultValue==null?"":l.defaultValue,x=l.checked!=null?l.checked:l.defaultChecked;v=me(l.value!=null?l.value:v),o._wrapperState={initialChecked:x,initialValue:v,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function lt(o,l){l=l.checked,l!=null&&E(o,"checked",l,!1)}function vt(o,l){lt(o,l);var v=me(l.value),x=l.type;if(v!=null)x==="number"?(v===0&&o.value===""||o.value!=v)&&(o.value=""+v):o.value!==""+v&&(o.value=""+v);else if(x==="submit"||x==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?Or(o,l.type,v):l.hasOwnProperty("defaultValue")&&Or(o,l.type,me(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function dr(o,l,v){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var x=l.type;if(!(x!=="submit"&&x!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,v||l===o.value||(o.value=l),o.defaultValue=l}v=o.name,v!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,v!==""&&(o.name=v)}function Or(o,l,v){(l!=="number"||De(o.ownerDocument)!==o)&&(v==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+v&&(o.defaultValue=""+v))}var jr=Array.isArray;function Kt(o,l,v,x){if(o=o.options,l){l={};for(var _=0;_"+l.valueOf().toString()+"",l=fu.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function Ks(o,l){if(l){var v=o.firstChild;if(v&&v===o.lastChild&&v.nodeType===3){v.nodeValue=l;return}}o.textContent=l}var Xs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},G3=["Webkit","ms","Moz","O"];Object.keys(Xs).forEach(function(o){G3.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Xs[l]=Xs[o]})});function k_(o,l,v){return l==null||typeof l=="boolean"||l===""?"":v||typeof l!="number"||l===0||Xs.hasOwnProperty(o)&&Xs[o]?(""+l).trim():l+"px"}function R_(o,l){o=o.style;for(var v in l)if(l.hasOwnProperty(v)){var x=v.indexOf("--")===0,_=k_(v,l[v],x);v==="float"&&(v="cssFloat"),x?o.setProperty(v,_):o[v]=_}}var K3=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yp(o,l){if(l){if(K3[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function Qp(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zp=null;function Jp(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var em=null,ao=null,oo=null;function M_(o){if(o=gl(o)){if(typeof em!="function")throw Error(r(280));var l=o.stateNode;l&&(l=Mu(l),em(o.stateNode,o.type,l))}}function I_(o){ao?oo?oo.push(o):oo=[o]:ao=o}function D_(){if(ao){var o=ao,l=oo;if(oo=ao=null,M_(o),l)for(o=0;o>>=0,o===0?32:31-(a4(o)/o4|0)|0}var vu=64,gu=4194304;function Js(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function yu(o,l){var v=o.pendingLanes;if(v===0)return 0;var x=0,_=o.suspendedLanes,j=o.pingedLanes,k=v&268435455;if(k!==0){var F=k&~_;F!==0?x=Js(F):(j&=k,j!==0&&(x=Js(j)))}else k=v&~_,k!==0?x=Js(k):j!==0&&(x=Js(j));if(x===0)return 0;if(l!==0&&l!==x&&(l&_)===0&&(_=x&-x,j=l&-l,_>=j||_===16&&(j&4194240)!==0))return l;if((x&4)!==0&&(x|=v&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=x;0v;v++)l.push(o);return l}function el(o,l,v){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-ln(l),o[l]=v}function u4(o,l){var v=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var x=o.eventTimes;for(o=o.expirationTimes;0=ll),uS=" ",fS=!1;function dS(o,l){switch(o){case"keyup":return $4.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hS(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var co=!1;function z4(o,l){switch(o){case"compositionend":return hS(l);case"keypress":return l.which!==32?null:(fS=!0,uS);case"textInput":return o=l.data,o===uS&&fS?null:o;default:return null}}function F4(o,l){if(co)return o==="compositionend"||!ym&&dS(o,l)?(o=iS(),Su=dm=Ei=null,co=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:v,offset:l-o};o=x}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=bS(v)}}function _S(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?_S(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function SS(){for(var o=window,l=De();l instanceof o.HTMLIFrameElement;){try{var v=typeof l.contentWindow.location.href=="string"}catch{v=!1}if(v)o=l.contentWindow;else break;l=De(o.document)}return l}function wm(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function Y4(o){var l=SS(),v=o.focusedElem,x=o.selectionRange;if(l!==v&&v&&v.ownerDocument&&_S(v.ownerDocument.documentElement,v)){if(x!==null&&wm(v)){if(l=x.start,o=x.end,o===void 0&&(o=l),"selectionStart"in v)v.selectionStart=l,v.selectionEnd=Math.min(o,v.value.length);else if(o=(l=v.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var _=v.textContent.length,j=Math.min(x.start,_);x=x.end===void 0?j:Math.min(x.end,_),!o.extend&&j>x&&(_=x,x=j,j=_),_=wS(v,j);var k=wS(v,x);_&&k&&(o.rangeCount!==1||o.anchorNode!==_.node||o.anchorOffset!==_.offset||o.focusNode!==k.node||o.focusOffset!==k.offset)&&(l=l.createRange(),l.setStart(_.node,_.offset),o.removeAllRanges(),j>x?(o.addRange(l),o.extend(k.node,k.offset)):(l.setEnd(k.node,k.offset),o.addRange(l)))}}for(l=[],o=v;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v=document.documentMode,uo=null,_m=null,dl=null,Sm=!1;function OS(o,l,v){var x=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;Sm||uo==null||uo!==De(x)||(x=uo,"selectionStart"in x&&wm(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),dl&&fl(dl,x)||(dl=x,x=Tu(_m,"onSelect"),0vo||(o.current=Im[vo],Im[vo]=null,vo--)}function dt(o,l){vo++,Im[vo]=o.current,o.current=l}var Ci={},Jt=Ni(Ci),hr=Ni(!1),ca=Ci;function go(o,l){var v=o.type.contextTypes;if(!v)return Ci;var x=o.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===l)return x.__reactInternalMemoizedMaskedChildContext;var _={},j;for(j in v)_[j]=l[j];return x&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=_),_}function pr(o){return o=o.childContextTypes,o!=null}function Iu(){yt(hr),yt(Jt)}function BS(o,l,v){if(Jt.current!==Ci)throw Error(r(168));dt(Jt,l),dt(hr,v)}function zS(o,l,v){var x=o.stateNode;if(l=l.childContextTypes,typeof x.getChildContext!="function")return v;x=x.getChildContext();for(var _ in x)if(!(_ in l))throw Error(r(108,oe(o)||"Unknown",_));return ee({},v,x)}function Du(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Ci,ca=Jt.current,dt(Jt,o),dt(hr,hr.current),!0}function FS(o,l,v){var x=o.stateNode;if(!x)throw Error(r(169));v?(o=zS(o,l,ca),x.__reactInternalMemoizedMergedChildContext=o,yt(hr),yt(Jt),dt(Jt,o)):yt(hr),dt(hr,v)}var Xn=null,Lu=!1,Dm=!1;function qS(o){Xn===null?Xn=[o]:Xn.push(o)}function l5(o){Lu=!0,qS(o)}function Ti(){if(!Dm&&Xn!==null){Dm=!0;var o=0,l=ct;try{var v=Xn;for(ct=1;o>=k,_-=k,Yn=1<<32-ln(l)+_|v<<_|x,Qn=j+o}else Yn=1<$e?(Wt=Re,Re=null):Wt=Re.sibling;var Ye=se(Y,Re,J[$e],fe);if(Ye===null){Re===null&&(Re=Wt);break}o&&Re&&Ye.alternate===null&&l(Y,Re),G=j(Ye,G,$e),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye,Re=Wt}if($e===J.length)return v(Y,Re),bt&&fa(Y,$e),Pe;if(Re===null){for(;$e$e?(Wt=Re,Re=null):Wt=Re.sibling;var zi=se(Y,Re,Ye.value,fe);if(zi===null){Re===null&&(Re=Wt);break}o&&Re&&zi.alternate===null&&l(Y,Re),G=j(zi,G,$e),ke===null?Pe=zi:ke.sibling=zi,ke=zi,Re=Wt}if(Ye.done)return v(Y,Re),bt&&fa(Y,$e),Pe;if(Re===null){for(;!Ye.done;$e++,Ye=J.next())Ye=ce(Y,Ye.value,fe),Ye!==null&&(G=j(Ye,G,$e),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye);return bt&&fa(Y,$e),Pe}for(Re=x(Y,Re);!Ye.done;$e++,Ye=J.next())Ye=xe(Re,Y,$e,Ye.value,fe),Ye!==null&&(o&&Ye.alternate!==null&&Re.delete(Ye.key===null?$e:Ye.key),G=j(Ye,G,$e),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye);return o&&Re.forEach(function(q5){return l(Y,q5)}),bt&&fa(Y,$e),Pe}function Nt(Y,G,J,fe){if(typeof J=="object"&&J!==null&&J.type===T&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case A:e:{for(var Pe=J.key,ke=G;ke!==null;){if(ke.key===Pe){if(Pe=J.type,Pe===T){if(ke.tag===7){v(Y,ke.sibling),G=_(ke,J.props.children),G.return=Y,Y=G;break e}}else if(ke.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===K&&KS(Pe)===ke.type){v(Y,ke.sibling),G=_(ke,J.props),G.ref=yl(Y,ke,J),G.return=Y,Y=G;break e}v(Y,ke);break}else l(Y,ke);ke=ke.sibling}J.type===T?(G=xa(J.props.children,Y.mode,fe,J.key),G.return=Y,Y=G):(fe=df(J.type,J.key,J.props,null,Y.mode,fe),fe.ref=yl(Y,G,J),fe.return=Y,Y=fe)}return k(Y);case N:e:{for(ke=J.key;G!==null;){if(G.key===ke)if(G.tag===4&&G.stateNode.containerInfo===J.containerInfo&&G.stateNode.implementation===J.implementation){v(Y,G.sibling),G=_(G,J.children||[]),G.return=Y,Y=G;break e}else{v(Y,G);break}else l(Y,G);G=G.sibling}G=Rv(J,Y.mode,fe),G.return=Y,Y=G}return k(Y);case K:return ke=J._init,Nt(Y,G,ke(J._payload),fe)}if(jr(J))return _e(Y,G,J,fe);if(Z(J))return Ee(Y,G,J,fe);Fu(Y,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,G!==null&&G.tag===6?(v(Y,G.sibling),G=_(G,J),G.return=Y,Y=G):(v(Y,G),G=kv(J,Y.mode,fe),G.return=Y,Y=G),k(Y)):v(Y,G)}return Nt}var wo=XS(!0),YS=XS(!1),qu=Ni(null),Uu=null,_o=null,qm=null;function Um(){qm=_o=Uu=null}function Wm(o){var l=qu.current;yt(qu),o._currentValue=l}function Hm(o,l,v){for(;o!==null;){var x=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,x!==null&&(x.childLanes|=l)):x!==null&&(x.childLanes&l)!==l&&(x.childLanes|=l),o===v)break;o=o.return}}function So(o,l){Uu=o,qm=_o=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(mr=!0),o.firstContext=null)}function Gr(o){var l=o._currentValue;if(qm!==o)if(o={context:o,memoizedValue:l,next:null},_o===null){if(Uu===null)throw Error(r(308));_o=o,Uu.dependencies={lanes:0,firstContext:o}}else _o=_o.next=o;return l}var da=null;function Vm(o){da===null?da=[o]:da.push(o)}function QS(o,l,v,x){var _=l.interleaved;return _===null?(v.next=v,Vm(l)):(v.next=_.next,_.next=v),l.interleaved=v,Zn(o,x)}function Zn(o,l){o.lanes|=l;var v=o.alternate;for(v!==null&&(v.lanes|=l),v=o,o=o.return;o!==null;)o.childLanes|=l,v=o.alternate,v!==null&&(v.childLanes|=l),v=o,o=o.return;return v.tag===3?v.stateNode:null}var ki=!1;function Gm(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ZS(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Jn(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Ri(o,l,v){var x=o.updateQueue;if(x===null)return null;if(x=x.shared,(Xe&2)!==0){var _=x.pending;return _===null?l.next=l:(l.next=_.next,_.next=l),x.pending=l,Zn(o,v)}return _=x.interleaved,_===null?(l.next=l,Vm(x)):(l.next=_.next,_.next=l),x.interleaved=l,Zn(o,v)}function Wu(o,l,v){if(l=l.updateQueue,l!==null&&(l=l.shared,(v&4194240)!==0)){var x=l.lanes;x&=o.pendingLanes,v|=x,l.lanes=v,sm(o,v)}}function JS(o,l){var v=o.updateQueue,x=o.alternate;if(x!==null&&(x=x.updateQueue,v===x)){var _=null,j=null;if(v=v.firstBaseUpdate,v!==null){do{var k={eventTime:v.eventTime,lane:v.lane,tag:v.tag,payload:v.payload,callback:v.callback,next:null};j===null?_=j=k:j=j.next=k,v=v.next}while(v!==null);j===null?_=j=l:j=j.next=l}else _=j=l;v={baseState:x.baseState,firstBaseUpdate:_,lastBaseUpdate:j,shared:x.shared,effects:x.effects},o.updateQueue=v;return}o=v.lastBaseUpdate,o===null?v.firstBaseUpdate=l:o.next=l,v.lastBaseUpdate=l}function Hu(o,l,v,x){var _=o.updateQueue;ki=!1;var j=_.firstBaseUpdate,k=_.lastBaseUpdate,F=_.shared.pending;if(F!==null){_.shared.pending=null;var W=F,te=W.next;W.next=null,k===null?j=te:k.next=te,k=W;var le=o.alternate;le!==null&&(le=le.updateQueue,F=le.lastBaseUpdate,F!==k&&(F===null?le.firstBaseUpdate=te:F.next=te,le.lastBaseUpdate=W))}if(j!==null){var ce=_.baseState;k=0,le=te=W=null,F=j;do{var se=F.lane,xe=F.eventTime;if((x&se)===se){le!==null&&(le=le.next={eventTime:xe,lane:0,tag:F.tag,payload:F.payload,callback:F.callback,next:null});e:{var _e=o,Ee=F;switch(se=l,xe=v,Ee.tag){case 1:if(_e=Ee.payload,typeof _e=="function"){ce=_e.call(xe,ce,se);break e}ce=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Ee.payload,se=typeof _e=="function"?_e.call(xe,ce,se):_e,se==null)break e;ce=ee({},ce,se);break e;case 2:ki=!0}}F.callback!==null&&F.lane!==0&&(o.flags|=64,se=_.effects,se===null?_.effects=[F]:se.push(F))}else xe={eventTime:xe,lane:se,tag:F.tag,payload:F.payload,callback:F.callback,next:null},le===null?(te=le=xe,W=ce):le=le.next=xe,k|=se;if(F=F.next,F===null){if(F=_.shared.pending,F===null)break;se=F,F=se.next,se.next=null,_.lastBaseUpdate=se,_.shared.pending=null}}while(!0);if(le===null&&(W=ce),_.baseState=W,_.firstBaseUpdate=te,_.lastBaseUpdate=le,l=_.shared.interleaved,l!==null){_=l;do k|=_.lane,_=_.next;while(_!==l)}else j===null&&(_.shared.lanes=0);ma|=k,o.lanes=k,o.memoizedState=ce}}function eO(o,l,v){if(o=l.effects,l.effects=null,o!==null)for(l=0;lv?v:4,o(!0);var x=Zm.transition;Zm.transition={};try{o(!1),l()}finally{ct=v,Zm.transition=x}}function xO(){return Kr().memoizedState}function d5(o,l,v){var x=Li(o);if(v={lane:x,action:v,hasEagerState:!1,eagerState:null,next:null},bO(o))wO(l,v);else if(v=QS(o,l,v,x),v!==null){var _=sr();pn(v,o,x,_),_O(v,l,x)}}function h5(o,l,v){var x=Li(o),_={lane:x,action:v,hasEagerState:!1,eagerState:null,next:null};if(bO(o))wO(l,_);else{var j=o.alternate;if(o.lanes===0&&(j===null||j.lanes===0)&&(j=l.lastRenderedReducer,j!==null))try{var k=l.lastRenderedState,F=j(k,v);if(_.hasEagerState=!0,_.eagerState=F,cn(F,k)){var W=l.interleaved;W===null?(_.next=_,Vm(l)):(_.next=W.next,W.next=_),l.interleaved=_;return}}catch{}finally{}v=QS(o,l,_,x),v!==null&&(_=sr(),pn(v,o,x,_),_O(v,l,x))}}function bO(o){var l=o.alternate;return o===St||l!==null&&l===St}function wO(o,l){_l=Ku=!0;var v=o.pending;v===null?l.next=l:(l.next=v.next,v.next=l),o.pending=l}function _O(o,l,v){if((v&4194240)!==0){var x=l.lanes;x&=o.pendingLanes,v|=x,l.lanes=v,sm(o,v)}}var Qu={readContext:Gr,useCallback:er,useContext:er,useEffect:er,useImperativeHandle:er,useInsertionEffect:er,useLayoutEffect:er,useMemo:er,useReducer:er,useRef:er,useState:er,useDebugValue:er,useDeferredValue:er,useTransition:er,useMutableSource:er,useSyncExternalStore:er,useId:er,unstable_isNewReconciler:!1},p5={readContext:Gr,useCallback:function(o,l){return Tn().memoizedState=[o,l===void 0?null:l],o},useContext:Gr,useEffect:fO,useImperativeHandle:function(o,l,v){return v=v!=null?v.concat([o]):null,Xu(4194308,4,pO.bind(null,l,o),v)},useLayoutEffect:function(o,l){return Xu(4194308,4,o,l)},useInsertionEffect:function(o,l){return Xu(4,2,o,l)},useMemo:function(o,l){var v=Tn();return l=l===void 0?null:l,o=o(),v.memoizedState=[o,l],o},useReducer:function(o,l,v){var x=Tn();return l=v!==void 0?v(l):l,x.memoizedState=x.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},x.queue=o,o=o.dispatch=d5.bind(null,St,o),[x.memoizedState,o]},useRef:function(o){var l=Tn();return o={current:o},l.memoizedState=o},useState:cO,useDebugValue:av,useDeferredValue:function(o){return Tn().memoizedState=o},useTransition:function(){var o=cO(!1),l=o[0];return o=f5.bind(null,o[1]),Tn().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,v){var x=St,_=Tn();if(bt){if(v===void 0)throw Error(r(407));v=v()}else{if(v=l(),Ut===null)throw Error(r(349));(pa&30)!==0||iO(x,l,v)}_.memoizedState=v;var j={value:v,getSnapshot:l};return _.queue=j,fO(oO.bind(null,x,j,o),[o]),x.flags|=2048,jl(9,aO.bind(null,x,j,v,l),void 0,null),v},useId:function(){var o=Tn(),l=Ut.identifierPrefix;if(bt){var v=Qn,x=Yn;v=(x&~(1<<32-ln(x)-1)).toString(32)+v,l=":"+l+"R"+v,v=Sl++,0")&&(W=W.replace("",o.displayName)),W}while(1<=k&&0<=F);break}}}finally{Q=!1,Error.prepareStackTrace=v}return(o=o?o.displayName||o.name:"")?$(o):""}function pe(o){switch(o.tag){case 5:return $(o.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return o=ae(o.type,!1),o;case 11:return o=ae(o.type.render,!1),o;case 1:return o=ae(o.type,!0),o;default:return""}}function ye(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case T:return"Fragment";case N:return"Portal";case I:return"Profiler";case R:return"StrictMode";case U:return"Suspense";case H:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case L:return(o.displayName||"Context")+".Consumer";case q:return(o._context.displayName||"Context")+".Provider";case D:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case V:return l=o.displayName||null,l!==null?l:ye(o.type)||"Memo";case K:l=o._payload,o=o._init;try{return ye(o(l))}catch{}}return null}function oe(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(l);case 8:return l===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function me(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ie(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function ue(o){var l=ie(o)?"checked":"value",v=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),x=""+o[l];if(!o.hasOwnProperty(l)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var _=v.get,j=v.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return _.call(this)},set:function(k){x=""+k,j.call(this,k)}}),Object.defineProperty(o,l,{enumerable:v.enumerable}),{getValue:function(){return x},setValue:function(k){x=""+k},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function ve(o){o._valueTracker||(o._valueTracker=ue(o))}function re(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var v=l.getValue(),x="";return o&&(x=ie(o)?o.checked?"true":"false":o.value),o=x,o!==v?(l.setValue(o),!0):!1}function De(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Te(o,l){var v=l.checked;return ee({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??o._wrapperState.initialChecked})}function Ke(o,l){var v=l.defaultValue==null?"":l.defaultValue,x=l.checked!=null?l.checked:l.defaultChecked;v=me(l.value!=null?l.value:v),o._wrapperState={initialChecked:x,initialValue:v,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function lt(o,l){l=l.checked,l!=null&&E(o,"checked",l,!1)}function vt(o,l){lt(o,l);var v=me(l.value),x=l.type;if(v!=null)x==="number"?(v===0&&o.value===""||o.value!=v)&&(o.value=""+v):o.value!==""+v&&(o.value=""+v);else if(x==="submit"||x==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?Or(o,l.type,v):l.hasOwnProperty("defaultValue")&&Or(o,l.type,me(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function dr(o,l,v){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var x=l.type;if(!(x!=="submit"&&x!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,v||l===o.value||(o.value=l),o.defaultValue=l}v=o.name,v!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,v!==""&&(o.name=v)}function Or(o,l,v){(l!=="number"||De(o.ownerDocument)!==o)&&(v==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+v&&(o.defaultValue=""+v))}var jr=Array.isArray;function Kt(o,l,v,x){if(o=o.options,l){l={};for(var _=0;_"+l.valueOf().toString()+"",l=fu.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function Ks(o,l){if(l){var v=o.firstChild;if(v&&v===o.lastChild&&v.nodeType===3){v.nodeValue=l;return}}o.textContent=l}var Xs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},G3=["Webkit","ms","Moz","O"];Object.keys(Xs).forEach(function(o){G3.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Xs[l]=Xs[o]})});function k_(o,l,v){return l==null||typeof l=="boolean"||l===""?"":v||typeof l!="number"||l===0||Xs.hasOwnProperty(o)&&Xs[o]?(""+l).trim():l+"px"}function R_(o,l){o=o.style;for(var v in l)if(l.hasOwnProperty(v)){var x=v.indexOf("--")===0,_=k_(v,l[v],x);v==="float"&&(v="cssFloat"),x?o.setProperty(v,_):o[v]=_}}var K3=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yp(o,l){if(l){if(K3[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function Qp(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zp=null;function Jp(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var em=null,ao=null,oo=null;function M_(o){if(o=gl(o)){if(typeof em!="function")throw Error(r(280));var l=o.stateNode;l&&(l=Mu(l),em(o.stateNode,o.type,l))}}function I_(o){ao?oo?oo.push(o):oo=[o]:ao=o}function D_(){if(ao){var o=ao,l=oo;if(oo=ao=null,M_(o),l)for(o=0;o>>=0,o===0?32:31-(a4(o)/o4|0)|0}var vu=64,gu=4194304;function Js(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function yu(o,l){var v=o.pendingLanes;if(v===0)return 0;var x=0,_=o.suspendedLanes,j=o.pingedLanes,k=v&268435455;if(k!==0){var F=k&~_;F!==0?x=Js(F):(j&=k,j!==0&&(x=Js(j)))}else k=v&~_,k!==0?x=Js(k):j!==0&&(x=Js(j));if(x===0)return 0;if(l!==0&&l!==x&&(l&_)===0&&(_=x&-x,j=l&-l,_>=j||_===16&&(j&4194240)!==0))return l;if((x&4)!==0&&(x|=v&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=x;0v;v++)l.push(o);return l}function el(o,l,v){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-ln(l),o[l]=v}function u4(o,l){var v=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var x=o.eventTimes;for(o=o.expirationTimes;0=ll),uS=" ",fS=!1;function dS(o,l){switch(o){case"keyup":return $4.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hS(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var co=!1;function z4(o,l){switch(o){case"compositionend":return hS(l);case"keypress":return l.which!==32?null:(fS=!0,uS);case"textInput":return o=l.data,o===uS&&fS?null:o;default:return null}}function F4(o,l){if(co)return o==="compositionend"||!ym&&dS(o,l)?(o=iS(),Su=dm=Ei=null,co=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:v,offset:l-o};o=x}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=bS(v)}}function _S(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?_S(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function SS(){for(var o=window,l=De();l instanceof o.HTMLIFrameElement;){try{var v=typeof l.contentWindow.location.href=="string"}catch{v=!1}if(v)o=l.contentWindow;else break;l=De(o.document)}return l}function wm(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function Y4(o){var l=SS(),v=o.focusedElem,x=o.selectionRange;if(l!==v&&v&&v.ownerDocument&&_S(v.ownerDocument.documentElement,v)){if(x!==null&&wm(v)){if(l=x.start,o=x.end,o===void 0&&(o=l),"selectionStart"in v)v.selectionStart=l,v.selectionEnd=Math.min(o,v.value.length);else if(o=(l=v.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var _=v.textContent.length,j=Math.min(x.start,_);x=x.end===void 0?j:Math.min(x.end,_),!o.extend&&j>x&&(_=x,x=j,j=_),_=wS(v,j);var k=wS(v,x);_&&k&&(o.rangeCount!==1||o.anchorNode!==_.node||o.anchorOffset!==_.offset||o.focusNode!==k.node||o.focusOffset!==k.offset)&&(l=l.createRange(),l.setStart(_.node,_.offset),o.removeAllRanges(),j>x?(o.addRange(l),o.extend(k.node,k.offset)):(l.setEnd(k.node,k.offset),o.addRange(l)))}}for(l=[],o=v;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v=document.documentMode,uo=null,_m=null,dl=null,Sm=!1;function OS(o,l,v){var x=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;Sm||uo==null||uo!==De(x)||(x=uo,"selectionStart"in x&&wm(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),dl&&fl(dl,x)||(dl=x,x=Tu(_m,"onSelect"),0vo||(o.current=Im[vo],Im[vo]=null,vo--)}function dt(o,l){vo++,Im[vo]=o.current,o.current=l}var Ci={},Jt=Ni(Ci),hr=Ni(!1),ca=Ci;function go(o,l){var v=o.type.contextTypes;if(!v)return Ci;var x=o.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===l)return x.__reactInternalMemoizedMaskedChildContext;var _={},j;for(j in v)_[j]=l[j];return x&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=_),_}function pr(o){return o=o.childContextTypes,o!=null}function Iu(){yt(hr),yt(Jt)}function BS(o,l,v){if(Jt.current!==Ci)throw Error(r(168));dt(Jt,l),dt(hr,v)}function zS(o,l,v){var x=o.stateNode;if(l=l.childContextTypes,typeof x.getChildContext!="function")return v;x=x.getChildContext();for(var _ in x)if(!(_ in l))throw Error(r(108,oe(o)||"Unknown",_));return ee({},v,x)}function Du(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Ci,ca=Jt.current,dt(Jt,o),dt(hr,hr.current),!0}function FS(o,l,v){var x=o.stateNode;if(!x)throw Error(r(169));v?(o=zS(o,l,ca),x.__reactInternalMemoizedMergedChildContext=o,yt(hr),yt(Jt),dt(Jt,o)):yt(hr),dt(hr,v)}var Xn=null,Lu=!1,Dm=!1;function qS(o){Xn===null?Xn=[o]:Xn.push(o)}function l5(o){Lu=!0,qS(o)}function Ti(){if(!Dm&&Xn!==null){Dm=!0;var o=0,l=ct;try{var v=Xn;for(ct=1;o>=k,_-=k,Yn=1<<32-ln(l)+_|v<<_|x,Qn=j+o}else Yn=1<Be?(Wt=Re,Re=null):Wt=Re.sibling;var Ye=se(Y,Re,J[Be],de);if(Ye===null){Re===null&&(Re=Wt);break}o&&Re&&Ye.alternate===null&&l(Y,Re),G=j(Ye,G,Be),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye,Re=Wt}if(Be===J.length)return v(Y,Re),bt&&fa(Y,Be),Pe;if(Re===null){for(;BeBe?(Wt=Re,Re=null):Wt=Re.sibling;var zi=se(Y,Re,Ye.value,de);if(zi===null){Re===null&&(Re=Wt);break}o&&Re&&zi.alternate===null&&l(Y,Re),G=j(zi,G,Be),ke===null?Pe=zi:ke.sibling=zi,ke=zi,Re=Wt}if(Ye.done)return v(Y,Re),bt&&fa(Y,Be),Pe;if(Re===null){for(;!Ye.done;Be++,Ye=J.next())Ye=ce(Y,Ye.value,de),Ye!==null&&(G=j(Ye,G,Be),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye);return bt&&fa(Y,Be),Pe}for(Re=x(Y,Re);!Ye.done;Be++,Ye=J.next())Ye=xe(Re,Y,Be,Ye.value,de),Ye!==null&&(o&&Ye.alternate!==null&&Re.delete(Ye.key===null?Be:Ye.key),G=j(Ye,G,Be),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye);return o&&Re.forEach(function(q5){return l(Y,q5)}),bt&&fa(Y,Be),Pe}function Nt(Y,G,J,de){if(typeof J=="object"&&J!==null&&J.type===T&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case A:e:{for(var Pe=J.key,ke=G;ke!==null;){if(ke.key===Pe){if(Pe=J.type,Pe===T){if(ke.tag===7){v(Y,ke.sibling),G=_(ke,J.props.children),G.return=Y,Y=G;break e}}else if(ke.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===K&&KS(Pe)===ke.type){v(Y,ke.sibling),G=_(ke,J.props),G.ref=yl(Y,ke,J),G.return=Y,Y=G;break e}v(Y,ke);break}else l(Y,ke);ke=ke.sibling}J.type===T?(G=xa(J.props.children,Y.mode,de,J.key),G.return=Y,Y=G):(de=df(J.type,J.key,J.props,null,Y.mode,de),de.ref=yl(Y,G,J),de.return=Y,Y=de)}return k(Y);case N:e:{for(ke=J.key;G!==null;){if(G.key===ke)if(G.tag===4&&G.stateNode.containerInfo===J.containerInfo&&G.stateNode.implementation===J.implementation){v(Y,G.sibling),G=_(G,J.children||[]),G.return=Y,Y=G;break e}else{v(Y,G);break}else l(Y,G);G=G.sibling}G=Rv(J,Y.mode,de),G.return=Y,Y=G}return k(Y);case K:return ke=J._init,Nt(Y,G,ke(J._payload),de)}if(jr(J))return Se(Y,G,J,de);if(Z(J))return Ee(Y,G,J,de);Fu(Y,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,G!==null&&G.tag===6?(v(Y,G.sibling),G=_(G,J),G.return=Y,Y=G):(v(Y,G),G=kv(J,Y.mode,de),G.return=Y,Y=G),k(Y)):v(Y,G)}return Nt}var wo=XS(!0),YS=XS(!1),qu=Ni(null),Uu=null,_o=null,qm=null;function Um(){qm=_o=Uu=null}function Wm(o){var l=qu.current;yt(qu),o._currentValue=l}function Hm(o,l,v){for(;o!==null;){var x=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,x!==null&&(x.childLanes|=l)):x!==null&&(x.childLanes&l)!==l&&(x.childLanes|=l),o===v)break;o=o.return}}function So(o,l){Uu=o,qm=_o=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(mr=!0),o.firstContext=null)}function Gr(o){var l=o._currentValue;if(qm!==o)if(o={context:o,memoizedValue:l,next:null},_o===null){if(Uu===null)throw Error(r(308));_o=o,Uu.dependencies={lanes:0,firstContext:o}}else _o=_o.next=o;return l}var da=null;function Vm(o){da===null?da=[o]:da.push(o)}function QS(o,l,v,x){var _=l.interleaved;return _===null?(v.next=v,Vm(l)):(v.next=_.next,_.next=v),l.interleaved=v,Zn(o,x)}function Zn(o,l){o.lanes|=l;var v=o.alternate;for(v!==null&&(v.lanes|=l),v=o,o=o.return;o!==null;)o.childLanes|=l,v=o.alternate,v!==null&&(v.childLanes|=l),v=o,o=o.return;return v.tag===3?v.stateNode:null}var ki=!1;function Gm(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ZS(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Jn(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Ri(o,l,v){var x=o.updateQueue;if(x===null)return null;if(x=x.shared,(Xe&2)!==0){var _=x.pending;return _===null?l.next=l:(l.next=_.next,_.next=l),x.pending=l,Zn(o,v)}return _=x.interleaved,_===null?(l.next=l,Vm(x)):(l.next=_.next,_.next=l),x.interleaved=l,Zn(o,v)}function Wu(o,l,v){if(l=l.updateQueue,l!==null&&(l=l.shared,(v&4194240)!==0)){var x=l.lanes;x&=o.pendingLanes,v|=x,l.lanes=v,sm(o,v)}}function JS(o,l){var v=o.updateQueue,x=o.alternate;if(x!==null&&(x=x.updateQueue,v===x)){var _=null,j=null;if(v=v.firstBaseUpdate,v!==null){do{var k={eventTime:v.eventTime,lane:v.lane,tag:v.tag,payload:v.payload,callback:v.callback,next:null};j===null?_=j=k:j=j.next=k,v=v.next}while(v!==null);j===null?_=j=l:j=j.next=l}else _=j=l;v={baseState:x.baseState,firstBaseUpdate:_,lastBaseUpdate:j,shared:x.shared,effects:x.effects},o.updateQueue=v;return}o=v.lastBaseUpdate,o===null?v.firstBaseUpdate=l:o.next=l,v.lastBaseUpdate=l}function Hu(o,l,v,x){var _=o.updateQueue;ki=!1;var j=_.firstBaseUpdate,k=_.lastBaseUpdate,F=_.shared.pending;if(F!==null){_.shared.pending=null;var W=F,te=W.next;W.next=null,k===null?j=te:k.next=te,k=W;var le=o.alternate;le!==null&&(le=le.updateQueue,F=le.lastBaseUpdate,F!==k&&(F===null?le.firstBaseUpdate=te:F.next=te,le.lastBaseUpdate=W))}if(j!==null){var ce=_.baseState;k=0,le=te=W=null,F=j;do{var se=F.lane,xe=F.eventTime;if((x&se)===se){le!==null&&(le=le.next={eventTime:xe,lane:0,tag:F.tag,payload:F.payload,callback:F.callback,next:null});e:{var Se=o,Ee=F;switch(se=l,xe=v,Ee.tag){case 1:if(Se=Ee.payload,typeof Se=="function"){ce=Se.call(xe,ce,se);break e}ce=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ee.payload,se=typeof Se=="function"?Se.call(xe,ce,se):Se,se==null)break e;ce=ee({},ce,se);break e;case 2:ki=!0}}F.callback!==null&&F.lane!==0&&(o.flags|=64,se=_.effects,se===null?_.effects=[F]:se.push(F))}else xe={eventTime:xe,lane:se,tag:F.tag,payload:F.payload,callback:F.callback,next:null},le===null?(te=le=xe,W=ce):le=le.next=xe,k|=se;if(F=F.next,F===null){if(F=_.shared.pending,F===null)break;se=F,F=se.next,se.next=null,_.lastBaseUpdate=se,_.shared.pending=null}}while(!0);if(le===null&&(W=ce),_.baseState=W,_.firstBaseUpdate=te,_.lastBaseUpdate=le,l=_.shared.interleaved,l!==null){_=l;do k|=_.lane,_=_.next;while(_!==l)}else j===null&&(_.shared.lanes=0);ma|=k,o.lanes=k,o.memoizedState=ce}}function eO(o,l,v){if(o=l.effects,l.effects=null,o!==null)for(l=0;lv?v:4,o(!0);var x=Zm.transition;Zm.transition={};try{o(!1),l()}finally{ct=v,Zm.transition=x}}function xO(){return Kr().memoizedState}function d5(o,l,v){var x=Li(o);if(v={lane:x,action:v,hasEagerState:!1,eagerState:null,next:null},bO(o))wO(l,v);else if(v=QS(o,l,v,x),v!==null){var _=sr();pn(v,o,x,_),_O(v,l,x)}}function h5(o,l,v){var x=Li(o),_={lane:x,action:v,hasEagerState:!1,eagerState:null,next:null};if(bO(o))wO(l,_);else{var j=o.alternate;if(o.lanes===0&&(j===null||j.lanes===0)&&(j=l.lastRenderedReducer,j!==null))try{var k=l.lastRenderedState,F=j(k,v);if(_.hasEagerState=!0,_.eagerState=F,cn(F,k)){var W=l.interleaved;W===null?(_.next=_,Vm(l)):(_.next=W.next,W.next=_),l.interleaved=_;return}}catch{}finally{}v=QS(o,l,_,x),v!==null&&(_=sr(),pn(v,o,x,_),_O(v,l,x))}}function bO(o){var l=o.alternate;return o===St||l!==null&&l===St}function wO(o,l){_l=Ku=!0;var v=o.pending;v===null?l.next=l:(l.next=v.next,v.next=l),o.pending=l}function _O(o,l,v){if((v&4194240)!==0){var x=l.lanes;x&=o.pendingLanes,v|=x,l.lanes=v,sm(o,v)}}var Qu={readContext:Gr,useCallback:er,useContext:er,useEffect:er,useImperativeHandle:er,useInsertionEffect:er,useLayoutEffect:er,useMemo:er,useReducer:er,useRef:er,useState:er,useDebugValue:er,useDeferredValue:er,useTransition:er,useMutableSource:er,useSyncExternalStore:er,useId:er,unstable_isNewReconciler:!1},p5={readContext:Gr,useCallback:function(o,l){return Tn().memoizedState=[o,l===void 0?null:l],o},useContext:Gr,useEffect:fO,useImperativeHandle:function(o,l,v){return v=v!=null?v.concat([o]):null,Xu(4194308,4,pO.bind(null,l,o),v)},useLayoutEffect:function(o,l){return Xu(4194308,4,o,l)},useInsertionEffect:function(o,l){return Xu(4,2,o,l)},useMemo:function(o,l){var v=Tn();return l=l===void 0?null:l,o=o(),v.memoizedState=[o,l],o},useReducer:function(o,l,v){var x=Tn();return l=v!==void 0?v(l):l,x.memoizedState=x.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},x.queue=o,o=o.dispatch=d5.bind(null,St,o),[x.memoizedState,o]},useRef:function(o){var l=Tn();return o={current:o},l.memoizedState=o},useState:cO,useDebugValue:av,useDeferredValue:function(o){return Tn().memoizedState=o},useTransition:function(){var o=cO(!1),l=o[0];return o=f5.bind(null,o[1]),Tn().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,v){var x=St,_=Tn();if(bt){if(v===void 0)throw Error(r(407));v=v()}else{if(v=l(),Ut===null)throw Error(r(349));(pa&30)!==0||iO(x,l,v)}_.memoizedState=v;var j={value:v,getSnapshot:l};return _.queue=j,fO(oO.bind(null,x,j,o),[o]),x.flags|=2048,jl(9,aO.bind(null,x,j,v,l),void 0,null),v},useId:function(){var o=Tn(),l=Ut.identifierPrefix;if(bt){var v=Qn,x=Yn;v=(x&~(1<<32-ln(x)-1)).toString(32)+v,l=":"+l+"R"+v,v=Sl++,0<\/script>",o=o.removeChild(o.firstChild)):typeof x.is=="string"?o=k.createElement(v,{is:x.is}):(o=k.createElement(v),v==="select"&&(k=o,x.multiple?k.multiple=!0:x.size&&(k.size=x.size))):o=k.createElementNS(o,v),o[Nn]=l,o[vl]=x,qO(o,l,!1,!1),l.stateNode=o;e:{switch(k=Qp(v,x),v){case"dialog":gt("cancel",o),gt("close",o),_=x;break;case"iframe":case"object":case"embed":gt("load",o),_=x;break;case"video":case"audio":for(_=0;_Po&&(l.flags|=128,x=!0,El(j,!1),l.lanes=4194304)}else{if(!x)if(o=Vu(k),o!==null){if(l.flags|=128,x=!0,v=o.updateQueue,v!==null&&(l.updateQueue=v,l.flags|=4),El(j,!0),j.tail===null&&j.tailMode==="hidden"&&!k.alternate&&!bt)return tr(l),null}else 2*Pt()-j.renderingStartTime>Po&&v!==1073741824&&(l.flags|=128,x=!0,El(j,!1),l.lanes=4194304);j.isBackwards?(k.sibling=l.child,l.child=k):(v=j.last,v!==null?v.sibling=k:l.child=k,j.last=k)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=Pt(),l.sibling=null,v=_t.current,dt(_t,x?v&1|2:v&1),l):(tr(l),null);case 22:case 23:return Nv(),x=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==x&&(l.flags|=8192),x&&(l.mode&1)!==0?(Nr&1073741824)!==0&&(tr(l),l.subtreeFlags&6&&(l.flags|=8192)):tr(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function _5(o,l){switch($m(l),l.tag){case 1:return pr(l.type)&&Iu(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Oo(),yt(hr),yt(Jt),Qm(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return Xm(l),null;case 13:if(yt(_t),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));bo()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return yt(_t),null;case 4:return Oo(),null;case 10:return Wm(l.type._context),null;case 22:case 23:return Nv(),null;case 24:return null;default:return null}}var tf=!1,rr=!1,S5=typeof WeakSet=="function"?WeakSet:Set,be=null;function Eo(o,l){var v=o.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(x){Ot(o,l,x)}else v.current=null}function gv(o,l,v){try{v()}catch(x){Ot(o,l,x)}}var HO=!1;function O5(o,l){if(Nm=wu,o=SS(),wm(o)){if("selectionStart"in o)var v={start:o.selectionStart,end:o.selectionEnd};else e:{v=(v=o.ownerDocument)&&v.defaultView||window;var x=v.getSelection&&v.getSelection();if(x&&x.rangeCount!==0){v=x.anchorNode;var _=x.anchorOffset,j=x.focusNode;x=x.focusOffset;try{v.nodeType,j.nodeType}catch{v=null;break e}var k=0,F=-1,W=-1,te=0,le=0,ce=o,se=null;t:for(;;){for(var xe;ce!==v||_!==0&&ce.nodeType!==3||(F=k+_),ce!==j||x!==0&&ce.nodeType!==3||(W=k+x),ce.nodeType===3&&(k+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)se=ce,ce=xe;for(;;){if(ce===o)break t;if(se===v&&++te===_&&(F=k),se===j&&++le===x&&(W=k),(xe=ce.nextSibling)!==null)break;ce=se,se=ce.parentNode}ce=xe}v=F===-1||W===-1?null:{start:F,end:W}}else v=null}v=v||{start:0,end:0}}else v=null;for(Cm={focusedElem:o,selectionRange:v},wu=!1,be=l;be!==null;)if(l=be,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,be=o;else for(;be!==null;){l=be;try{var _e=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(_e!==null){var Ee=_e.memoizedProps,Nt=_e.memoizedState,Y=l.stateNode,G=Y.getSnapshotBeforeUpdate(l.elementType===l.type?Ee:fn(l.type,Ee),Nt);Y.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var J=l.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(fe){Ot(l,l.return,fe)}if(o=l.sibling,o!==null){o.return=l.return,be=o;break}be=l.return}return _e=HO,HO=!1,_e}function Al(o,l,v){var x=l.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var _=x=x.next;do{if((_.tag&o)===o){var j=_.destroy;_.destroy=void 0,j!==void 0&&gv(l,v,j)}_=_.next}while(_!==x)}}function rf(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var v=l=l.next;do{if((v.tag&o)===o){var x=v.create;v.destroy=x()}v=v.next}while(v!==l)}}function yv(o){var l=o.ref;if(l!==null){var v=o.stateNode;switch(o.tag){case 5:o=v;break;default:o=v}typeof l=="function"?l(o):l.current=o}}function VO(o){var l=o.alternate;l!==null&&(o.alternate=null,VO(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[Nn],delete l[vl],delete l[Mm],delete l[o5],delete l[s5])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function GO(o){return o.tag===5||o.tag===3||o.tag===4}function KO(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||GO(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function xv(o,l,v){var x=o.tag;if(x===5||x===6)o=o.stateNode,l?v.nodeType===8?v.parentNode.insertBefore(o,l):v.insertBefore(o,l):(v.nodeType===8?(l=v.parentNode,l.insertBefore(o,v)):(l=v,l.appendChild(o)),v=v._reactRootContainer,v!=null||l.onclick!==null||(l.onclick=Ru));else if(x!==4&&(o=o.child,o!==null))for(xv(o,l,v),o=o.sibling;o!==null;)xv(o,l,v),o=o.sibling}function bv(o,l,v){var x=o.tag;if(x===5||x===6)o=o.stateNode,l?v.insertBefore(o,l):v.appendChild(o);else if(x!==4&&(o=o.child,o!==null))for(bv(o,l,v),o=o.sibling;o!==null;)bv(o,l,v),o=o.sibling}var Yt=null,dn=!1;function Mi(o,l,v){for(v=v.child;v!==null;)XO(o,l,v),v=v.sibling}function XO(o,l,v){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(mu,v)}catch{}switch(v.tag){case 5:rr||Eo(v,l);case 6:var x=Yt,_=dn;Yt=null,Mi(o,l,v),Yt=x,dn=_,Yt!==null&&(dn?(o=Yt,v=v.stateNode,o.nodeType===8?o.parentNode.removeChild(v):o.removeChild(v)):Yt.removeChild(v.stateNode));break;case 18:Yt!==null&&(dn?(o=Yt,v=v.stateNode,o.nodeType===8?Rm(o.parentNode,v):o.nodeType===1&&Rm(o,v),al(o)):Rm(Yt,v.stateNode));break;case 4:x=Yt,_=dn,Yt=v.stateNode.containerInfo,dn=!0,Mi(o,l,v),Yt=x,dn=_;break;case 0:case 11:case 14:case 15:if(!rr&&(x=v.updateQueue,x!==null&&(x=x.lastEffect,x!==null))){_=x=x.next;do{var j=_,k=j.destroy;j=j.tag,k!==void 0&&((j&2)!==0||(j&4)!==0)&&gv(v,l,k),_=_.next}while(_!==x)}Mi(o,l,v);break;case 1:if(!rr&&(Eo(v,l),x=v.stateNode,typeof x.componentWillUnmount=="function"))try{x.props=v.memoizedProps,x.state=v.memoizedState,x.componentWillUnmount()}catch(F){Ot(v,l,F)}Mi(o,l,v);break;case 21:Mi(o,l,v);break;case 22:v.mode&1?(rr=(x=rr)||v.memoizedState!==null,Mi(o,l,v),rr=x):Mi(o,l,v);break;default:Mi(o,l,v)}}function YO(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var v=o.stateNode;v===null&&(v=o.stateNode=new S5),l.forEach(function(x){var _=R5.bind(null,o,x);v.has(x)||(v.add(x),x.then(_,_))})}}function hn(o,l){var v=l.deletions;if(v!==null)for(var x=0;x_&&(_=k),x&=~j}if(x=_,x=Pt()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*E5(x/1960))-x,10o?16:o,Di===null)var x=!1;else{if(o=Di,Di=null,lf=0,(Xe&6)!==0)throw Error(r(331));var _=Xe;for(Xe|=4,be=o.current;be!==null;){var j=be,k=j.child;if((be.flags&16)!==0){var F=j.deletions;if(F!==null){for(var W=0;WPt()-Sv?ga(o,0):_v|=v),gr(o,l)}function cj(o,l){l===0&&((o.mode&1)===0?l=1:(l=gu,gu<<=1,(gu&130023424)===0&&(gu=4194304)));var v=sr();o=Zn(o,l),o!==null&&(el(o,l,v),gr(o,v))}function k5(o){var l=o.memoizedState,v=0;l!==null&&(v=l.retryLane),cj(o,v)}function R5(o,l){var v=0;switch(o.tag){case 13:var x=o.stateNode,_=o.memoizedState;_!==null&&(v=_.retryLane);break;case 19:x=o.stateNode;break;default:throw Error(r(314))}x!==null&&x.delete(l),cj(o,v)}var uj;uj=function(o,l,v){if(o!==null)if(o.memoizedProps!==l.pendingProps||hr.current)mr=!0;else{if((o.lanes&v)===0&&(l.flags&128)===0)return mr=!1,b5(o,l,v);mr=(o.flags&131072)!==0}else mr=!1,bt&&(l.flags&1048576)!==0&&US(l,Bu,l.index);switch(l.lanes=0,l.tag){case 2:var x=l.type;ef(o,l),o=l.pendingProps;var _=go(l,Jt.current);So(l,v),_=ev(null,l,x,o,_,v);var j=tv();return l.flags|=1,typeof _=="object"&&_!==null&&typeof _.render=="function"&&_.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,pr(x)?(j=!0,Du(l)):j=!1,l.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,Gm(l),_.updater=Zu,l.stateNode=_,_._reactInternals=l,sv(l,x,o,v),l=fv(null,l,x,!0,j,v)):(l.tag=0,bt&&j&&Lm(l),or(null,l,_,v),l=l.child),l;case 16:x=l.elementType;e:{switch(ef(o,l),o=l.pendingProps,_=x._init,x=_(x._payload),l.type=x,_=l.tag=I5(x),o=fn(x,o),_){case 0:l=uv(null,l,x,o,v);break e;case 1:l=DO(null,l,x,o,v);break e;case 11:l=TO(null,l,x,o,v);break e;case 14:l=kO(null,l,x,fn(x.type,o),v);break e}throw Error(r(306,x,""))}return l;case 0:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),uv(o,l,x,_,v);case 1:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),DO(o,l,x,_,v);case 3:e:{if(LO(l),o===null)throw Error(r(387));x=l.pendingProps,j=l.memoizedState,_=j.element,ZS(o,l),Hu(l,x,null,v);var k=l.memoizedState;if(x=k.element,j.isDehydrated)if(j={element:x,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},l.updateQueue.baseState=j,l.memoizedState=j,l.flags&256){_=jo(Error(r(423)),l),l=$O(o,l,x,v,_);break e}else if(x!==_){_=jo(Error(r(424)),l),l=$O(o,l,x,v,_);break e}else for(Pr=Pi(l.stateNode.containerInfo.firstChild),Ar=l,bt=!0,un=null,v=YS(l,null,x,v),l.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(bo(),x===_){l=ei(o,l,v);break e}or(o,l,x,v)}l=l.child}return l;case 5:return tO(l),o===null&&zm(l),x=l.type,_=l.pendingProps,j=o!==null?o.memoizedProps:null,k=_.children,Tm(x,_)?k=null:j!==null&&Tm(x,j)&&(l.flags|=32),IO(o,l),or(o,l,k,v),l.child;case 6:return o===null&&zm(l),null;case 13:return BO(o,l,v);case 4:return Km(l,l.stateNode.containerInfo),x=l.pendingProps,o===null?l.child=wo(l,null,x,v):or(o,l,x,v),l.child;case 11:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),TO(o,l,x,_,v);case 7:return or(o,l,l.pendingProps,v),l.child;case 8:return or(o,l,l.pendingProps.children,v),l.child;case 12:return or(o,l,l.pendingProps.children,v),l.child;case 10:e:{if(x=l.type._context,_=l.pendingProps,j=l.memoizedProps,k=_.value,dt(qu,x._currentValue),x._currentValue=k,j!==null)if(cn(j.value,k)){if(j.children===_.children&&!hr.current){l=ei(o,l,v);break e}}else for(j=l.child,j!==null&&(j.return=l);j!==null;){var F=j.dependencies;if(F!==null){k=j.child;for(var W=F.firstContext;W!==null;){if(W.context===x){if(j.tag===1){W=Jn(-1,v&-v),W.tag=2;var te=j.updateQueue;if(te!==null){te=te.shared;var le=te.pending;le===null?W.next=W:(W.next=le.next,le.next=W),te.pending=W}}j.lanes|=v,W=j.alternate,W!==null&&(W.lanes|=v),Hm(j.return,v,l),F.lanes|=v;break}W=W.next}}else if(j.tag===10)k=j.type===l.type?null:j.child;else if(j.tag===18){if(k=j.return,k===null)throw Error(r(341));k.lanes|=v,F=k.alternate,F!==null&&(F.lanes|=v),Hm(k,v,l),k=j.sibling}else k=j.child;if(k!==null)k.return=j;else for(k=j;k!==null;){if(k===l){k=null;break}if(j=k.sibling,j!==null){j.return=k.return,k=j;break}k=k.return}j=k}or(o,l,_.children,v),l=l.child}return l;case 9:return _=l.type,x=l.pendingProps.children,So(l,v),_=Gr(_),x=x(_),l.flags|=1,or(o,l,x,v),l.child;case 14:return x=l.type,_=fn(x,l.pendingProps),_=fn(x.type,_),kO(o,l,x,_,v);case 15:return RO(o,l,l.type,l.pendingProps,v);case 17:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),ef(o,l),l.tag=1,pr(x)?(o=!0,Du(l)):o=!1,So(l,v),OO(l,x,_),sv(l,x,_,v),fv(null,l,x,!0,o,v);case 19:return FO(o,l,v);case 22:return MO(o,l,v)}throw Error(r(156,l.tag))};function fj(o,l){return W_(o,l)}function M5(o,l,v,x){this.tag=o,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(o,l,v,x){return new M5(o,l,v,x)}function Tv(o){return o=o.prototype,!(!o||!o.isReactComponent)}function I5(o){if(typeof o=="function")return Tv(o)?1:0;if(o!=null){if(o=o.$$typeof,o===D)return 11;if(o===V)return 14}return 2}function Bi(o,l){var v=o.alternate;return v===null?(v=Yr(o.tag,l,o.key,o.mode),v.elementType=o.elementType,v.type=o.type,v.stateNode=o.stateNode,v.alternate=o,o.alternate=v):(v.pendingProps=l,v.type=o.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=o.flags&14680064,v.childLanes=o.childLanes,v.lanes=o.lanes,v.child=o.child,v.memoizedProps=o.memoizedProps,v.memoizedState=o.memoizedState,v.updateQueue=o.updateQueue,l=o.dependencies,v.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},v.sibling=o.sibling,v.index=o.index,v.ref=o.ref,v}function df(o,l,v,x,_,j){var k=2;if(x=o,typeof o=="function")Tv(o)&&(k=1);else if(typeof o=="string")k=5;else e:switch(o){case T:return xa(v.children,_,j,l);case R:k=8,_|=8;break;case I:return o=Yr(12,v,l,_|2),o.elementType=I,o.lanes=j,o;case U:return o=Yr(13,v,l,_),o.elementType=U,o.lanes=j,o;case H:return o=Yr(19,v,l,_),o.elementType=H,o.lanes=j,o;case X:return hf(v,_,j,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case q:k=10;break e;case L:k=9;break e;case D:k=11;break e;case V:k=14;break e;case K:k=16,x=null;break e}throw Error(r(130,o==null?o:typeof o,""))}return l=Yr(k,v,l,_),l.elementType=o,l.type=x,l.lanes=j,l}function xa(o,l,v,x){return o=Yr(7,o,x,l),o.lanes=v,o}function hf(o,l,v,x){return o=Yr(22,o,x,l),o.elementType=X,o.lanes=v,o.stateNode={isHidden:!1},o}function kv(o,l,v){return o=Yr(6,o,null,l),o.lanes=v,o}function Rv(o,l,v){return l=Yr(4,o.children!==null?o.children:[],o.key,l),l.lanes=v,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function D5(o,l,v,x,_){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=om(0),this.expirationTimes=om(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=om(0),this.identifierPrefix=x,this.onRecoverableError=_,this.mutableSourceEagerHydrationData=null}function Mv(o,l,v,x,_,j,k,F,W){return o=new D5(o,l,v,F,W),l===1?(l=1,j===!0&&(l|=8)):l=0,j=Yr(3,null,null,l),o.current=j,j.stateNode=o,j.memoizedState={element:x,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gm(j),o}function L5(o,l,v){var x=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zv.exports=X5(),zv.exports}var jj;function Y5(){if(jj)return wf;jj=1;var e=cR();return wf.createRoot=e.createRoot,wf.hydrateRoot=e.hydrateRoot,wf}var Q5=Y5(),P=Vh();const z=it(P),X1=U5({__proto__:null,default:z},[P]);/** +`+j.stack}return{value:o,source:l,stack:_,digest:null}}function lv(o,l,v){return{value:o,source:null,stack:v??null,digest:l??null}}function cv(o,l){try{console.error(l.value)}catch(v){setTimeout(function(){throw v})}}var g5=typeof WeakMap=="function"?WeakMap:Map;function EO(o,l,v){v=Jn(-1,v),v.tag=3,v.payload={element:null};var x=l.value;return v.callback=function(){of||(of=!0,Ov=x),cv(o,l)},v}function AO(o,l,v){v=Jn(-1,v),v.tag=3;var x=o.type.getDerivedStateFromError;if(typeof x=="function"){var _=l.value;v.payload=function(){return x(_)},v.callback=function(){cv(o,l)}}var j=o.stateNode;return j!==null&&typeof j.componentDidCatch=="function"&&(v.callback=function(){cv(o,l),typeof x!="function"&&(Ii===null?Ii=new Set([this]):Ii.add(this));var k=l.stack;this.componentDidCatch(l.value,{componentStack:k!==null?k:""})}),v}function PO(o,l,v){var x=o.pingCache;if(x===null){x=o.pingCache=new g5;var _=new Set;x.set(l,_)}else _=x.get(l),_===void 0&&(_=new Set,x.set(l,_));_.has(v)||(_.add(v),o=T5.bind(null,o,l,v),l.then(o,o))}function NO(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function CO(o,l,v,x,_){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(l=Jn(-1,1),l.tag=2,Ri(v,l,1))),v.lanes|=1),o):(o.flags|=65536,o.lanes=_,o)}var y5=C.ReactCurrentOwner,mr=!1;function or(o,l,v,x){l.child=o===null?YS(l,null,v,x):wo(l,o.child,v,x)}function TO(o,l,v,x,_){v=v.render;var j=l.ref;return So(l,_),x=ev(o,l,v,x,j,_),v=tv(),o!==null&&!mr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~_,ei(o,l,_)):(bt&&v&&Lm(l),l.flags|=1,or(o,l,x,_),l.child)}function kO(o,l,v,x,_){if(o===null){var j=v.type;return typeof j=="function"&&!Tv(j)&&j.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(l.tag=15,l.type=j,RO(o,l,j,x,_)):(o=df(v.type,null,x,l,l.mode,_),o.ref=l.ref,o.return=l,l.child=o)}if(j=o.child,(o.lanes&_)===0){var k=j.memoizedProps;if(v=v.compare,v=v!==null?v:fl,v(k,x)&&o.ref===l.ref)return ei(o,l,_)}return l.flags|=1,o=Bi(j,x),o.ref=l.ref,o.return=l,l.child=o}function RO(o,l,v,x,_){if(o!==null){var j=o.memoizedProps;if(fl(j,x)&&o.ref===l.ref)if(mr=!1,l.pendingProps=x=j,(o.lanes&_)!==0)(o.flags&131072)!==0&&(mr=!0);else return l.lanes=o.lanes,ei(o,l,_)}return uv(o,l,v,x,_)}function MO(o,l,v){var x=l.pendingProps,_=x.children,j=o!==null?o.memoizedState:null;if(x.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},dt(Ao,Nr),Nr|=v;else{if((v&1073741824)===0)return o=j!==null?j.baseLanes|v:v,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,dt(Ao,Nr),Nr|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},x=j!==null?j.baseLanes:v,dt(Ao,Nr),Nr|=x}else j!==null?(x=j.baseLanes|v,l.memoizedState=null):x=v,dt(Ao,Nr),Nr|=x;return or(o,l,_,v),l.child}function IO(o,l){var v=l.ref;(o===null&&v!==null||o!==null&&o.ref!==v)&&(l.flags|=512,l.flags|=2097152)}function uv(o,l,v,x,_){var j=pr(v)?ca:Jt.current;return j=go(l,j),So(l,_),v=ev(o,l,v,x,j,_),x=tv(),o!==null&&!mr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~_,ei(o,l,_)):(bt&&x&&Lm(l),l.flags|=1,or(o,l,v,_),l.child)}function DO(o,l,v,x,_){if(pr(v)){var j=!0;Du(l)}else j=!1;if(So(l,_),l.stateNode===null)ef(o,l),OO(l,v,x),sv(l,v,x,_),x=!0;else if(o===null){var k=l.stateNode,F=l.memoizedProps;k.props=F;var W=k.context,te=v.contextType;typeof te=="object"&&te!==null?te=Gr(te):(te=pr(v)?ca:Jt.current,te=go(l,te));var le=v.getDerivedStateFromProps,ce=typeof le=="function"||typeof k.getSnapshotBeforeUpdate=="function";ce||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(F!==x||W!==te)&&jO(l,k,x,te),ki=!1;var se=l.memoizedState;k.state=se,Hu(l,x,k,_),W=l.memoizedState,F!==x||se!==W||hr.current||ki?(typeof le=="function"&&(ov(l,v,le,x),W=l.memoizedState),(F=ki||SO(l,v,F,x,se,W,te))?(ce||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(l.flags|=4194308)):(typeof k.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=x,l.memoizedState=W),k.props=x,k.state=W,k.context=te,x=F):(typeof k.componentDidMount=="function"&&(l.flags|=4194308),x=!1)}else{k=l.stateNode,ZS(o,l),F=l.memoizedProps,te=l.type===l.elementType?F:fn(l.type,F),k.props=te,ce=l.pendingProps,se=k.context,W=v.contextType,typeof W=="object"&&W!==null?W=Gr(W):(W=pr(v)?ca:Jt.current,W=go(l,W));var xe=v.getDerivedStateFromProps;(le=typeof xe=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(F!==ce||se!==W)&&jO(l,k,x,W),ki=!1,se=l.memoizedState,k.state=se,Hu(l,x,k,_);var Se=l.memoizedState;F!==ce||se!==Se||hr.current||ki?(typeof xe=="function"&&(ov(l,v,xe,x),Se=l.memoizedState),(te=ki||SO(l,v,te,x,se,Se,W)||!1)?(le||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(x,Se,W),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(x,Se,W)),typeof k.componentDidUpdate=="function"&&(l.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof k.componentDidUpdate!="function"||F===o.memoizedProps&&se===o.memoizedState||(l.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||F===o.memoizedProps&&se===o.memoizedState||(l.flags|=1024),l.memoizedProps=x,l.memoizedState=Se),k.props=x,k.state=Se,k.context=W,x=te):(typeof k.componentDidUpdate!="function"||F===o.memoizedProps&&se===o.memoizedState||(l.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||F===o.memoizedProps&&se===o.memoizedState||(l.flags|=1024),x=!1)}return fv(o,l,v,x,j,_)}function fv(o,l,v,x,_,j){IO(o,l);var k=(l.flags&128)!==0;if(!x&&!k)return _&&FS(l,v,!1),ei(o,l,j);x=l.stateNode,y5.current=l;var F=k&&typeof v.getDerivedStateFromError!="function"?null:x.render();return l.flags|=1,o!==null&&k?(l.child=wo(l,o.child,null,j),l.child=wo(l,null,F,j)):or(o,l,F,j),l.memoizedState=x.state,_&&FS(l,v,!0),l.child}function LO(o){var l=o.stateNode;l.pendingContext?BS(o,l.pendingContext,l.pendingContext!==l.context):l.context&&BS(o,l.context,!1),Km(o,l.containerInfo)}function $O(o,l,v,x,_){return bo(),Fm(_),l.flags|=256,or(o,l,v,x),l.child}var dv={dehydrated:null,treeContext:null,retryLane:0};function hv(o){return{baseLanes:o,cachePool:null,transitions:null}}function BO(o,l,v){var x=l.pendingProps,_=_t.current,j=!1,k=(l.flags&128)!==0,F;if((F=k)||(F=o!==null&&o.memoizedState===null?!1:(_&2)!==0),F?(j=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(_|=1),dt(_t,_&1),o===null)return zm(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:o.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(k=x.children,o=x.fallback,j?(x=l.mode,j=l.child,k={mode:"hidden",children:k},(x&1)===0&&j!==null?(j.childLanes=0,j.pendingProps=k):j=hf(k,x,0,null),o=xa(o,x,v,null),j.return=l,o.return=l,j.sibling=o,l.child=j,l.child.memoizedState=hv(v),l.memoizedState=dv,o):pv(l,k));if(_=o.memoizedState,_!==null&&(F=_.dehydrated,F!==null))return x5(o,l,k,x,F,_,v);if(j){j=x.fallback,k=l.mode,_=o.child,F=_.sibling;var W={mode:"hidden",children:x.children};return(k&1)===0&&l.child!==_?(x=l.child,x.childLanes=0,x.pendingProps=W,l.deletions=null):(x=Bi(_,W),x.subtreeFlags=_.subtreeFlags&14680064),F!==null?j=Bi(F,j):(j=xa(j,k,v,null),j.flags|=2),j.return=l,x.return=l,x.sibling=j,l.child=x,x=j,j=l.child,k=o.child.memoizedState,k=k===null?hv(v):{baseLanes:k.baseLanes|v,cachePool:null,transitions:k.transitions},j.memoizedState=k,j.childLanes=o.childLanes&~v,l.memoizedState=dv,x}return j=o.child,o=j.sibling,x=Bi(j,{mode:"visible",children:x.children}),(l.mode&1)===0&&(x.lanes=v),x.return=l,x.sibling=null,o!==null&&(v=l.deletions,v===null?(l.deletions=[o],l.flags|=16):v.push(o)),l.child=x,l.memoizedState=null,x}function pv(o,l){return l=hf({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function Ju(o,l,v,x){return x!==null&&Fm(x),wo(l,o.child,null,v),o=pv(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function x5(o,l,v,x,_,j,k){if(v)return l.flags&256?(l.flags&=-257,x=lv(Error(r(422))),Ju(o,l,k,x)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(j=x.fallback,_=l.mode,x=hf({mode:"visible",children:x.children},_,0,null),j=xa(j,_,k,null),j.flags|=2,x.return=l,j.return=l,x.sibling=j,l.child=x,(l.mode&1)!==0&&wo(l,o.child,null,k),l.child.memoizedState=hv(k),l.memoizedState=dv,j);if((l.mode&1)===0)return Ju(o,l,k,null);if(_.data==="$!"){if(x=_.nextSibling&&_.nextSibling.dataset,x)var F=x.dgst;return x=F,j=Error(r(419)),x=lv(j,x,void 0),Ju(o,l,k,x)}if(F=(k&o.childLanes)!==0,mr||F){if(x=Ut,x!==null){switch(k&-k){case 4:_=2;break;case 16:_=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:_=32;break;case 536870912:_=268435456;break;default:_=0}_=(_&(x.suspendedLanes|k))!==0?0:_,_!==0&&_!==j.retryLane&&(j.retryLane=_,Zn(o,_),pn(x,o,_,-1))}return Cv(),x=lv(Error(r(421))),Ju(o,l,k,x)}return _.data==="$?"?(l.flags|=128,l.child=o.child,l=k5.bind(null,o),_._reactRetry=l,null):(o=j.treeContext,Pr=Pi(_.nextSibling),Ar=l,bt=!0,un=null,o!==null&&(Hr[Vr++]=Yn,Hr[Vr++]=Qn,Hr[Vr++]=ua,Yn=o.id,Qn=o.overflow,ua=l),l=pv(l,x.children),l.flags|=4096,l)}function zO(o,l,v){o.lanes|=l;var x=o.alternate;x!==null&&(x.lanes|=l),Hm(o.return,l,v)}function mv(o,l,v,x,_){var j=o.memoizedState;j===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:x,tail:v,tailMode:_}:(j.isBackwards=l,j.rendering=null,j.renderingStartTime=0,j.last=x,j.tail=v,j.tailMode=_)}function FO(o,l,v){var x=l.pendingProps,_=x.revealOrder,j=x.tail;if(or(o,l,x.children,v),x=_t.current,(x&2)!==0)x=x&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&zO(o,v,l);else if(o.tag===19)zO(o,v,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}x&=1}if(dt(_t,x),(l.mode&1)===0)l.memoizedState=null;else switch(_){case"forwards":for(v=l.child,_=null;v!==null;)o=v.alternate,o!==null&&Vu(o)===null&&(_=v),v=v.sibling;v=_,v===null?(_=l.child,l.child=null):(_=v.sibling,v.sibling=null),mv(l,!1,_,v,j);break;case"backwards":for(v=null,_=l.child,l.child=null;_!==null;){if(o=_.alternate,o!==null&&Vu(o)===null){l.child=_;break}o=_.sibling,_.sibling=v,v=_,_=o}mv(l,!0,v,null,j);break;case"together":mv(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function ef(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function ei(o,l,v){if(o!==null&&(l.dependencies=o.dependencies),ma|=l.lanes,(v&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,v=Bi(o,o.pendingProps),l.child=v,v.return=l;o.sibling!==null;)o=o.sibling,v=v.sibling=Bi(o,o.pendingProps),v.return=l;v.sibling=null}return l.child}function b5(o,l,v){switch(l.tag){case 3:LO(l),bo();break;case 5:tO(l);break;case 1:pr(l.type)&&Du(l);break;case 4:Km(l,l.stateNode.containerInfo);break;case 10:var x=l.type._context,_=l.memoizedProps.value;dt(qu,x._currentValue),x._currentValue=_;break;case 13:if(x=l.memoizedState,x!==null)return x.dehydrated!==null?(dt(_t,_t.current&1),l.flags|=128,null):(v&l.child.childLanes)!==0?BO(o,l,v):(dt(_t,_t.current&1),o=ei(o,l,v),o!==null?o.sibling:null);dt(_t,_t.current&1);break;case 19:if(x=(v&l.childLanes)!==0,(o.flags&128)!==0){if(x)return FO(o,l,v);l.flags|=128}if(_=l.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),dt(_t,_t.current),x)break;return null;case 22:case 23:return l.lanes=0,MO(o,l,v)}return ei(o,l,v)}var qO,vv,UO,WO;qO=function(o,l){for(var v=l.child;v!==null;){if(v.tag===5||v.tag===6)o.appendChild(v.stateNode);else if(v.tag!==4&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===l)break;for(;v.sibling===null;){if(v.return===null||v.return===l)return;v=v.return}v.sibling.return=v.return,v=v.sibling}},vv=function(){},UO=function(o,l,v,x){var _=o.memoizedProps;if(_!==x){o=l.stateNode,ha(Cn.current);var j=null;switch(v){case"input":_=Te(o,_),x=Te(o,x),j=[];break;case"select":_=ee({},_,{value:void 0}),x=ee({},x,{value:void 0}),j=[];break;case"textarea":_=Xt(o,_),x=Xt(o,x),j=[];break;default:typeof _.onClick!="function"&&typeof x.onClick=="function"&&(o.onclick=Ru)}Yp(v,x);var k;v=null;for(te in _)if(!x.hasOwnProperty(te)&&_.hasOwnProperty(te)&&_[te]!=null)if(te==="style"){var F=_[te];for(k in F)F.hasOwnProperty(k)&&(v||(v={}),v[k]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(i.hasOwnProperty(te)?j||(j=[]):(j=j||[]).push(te,null));for(te in x){var W=x[te];if(F=_?.[te],x.hasOwnProperty(te)&&W!==F&&(W!=null||F!=null))if(te==="style")if(F){for(k in F)!F.hasOwnProperty(k)||W&&W.hasOwnProperty(k)||(v||(v={}),v[k]="");for(k in W)W.hasOwnProperty(k)&&F[k]!==W[k]&&(v||(v={}),v[k]=W[k])}else v||(j||(j=[]),j.push(te,v)),v=W;else te==="dangerouslySetInnerHTML"?(W=W?W.__html:void 0,F=F?F.__html:void 0,W!=null&&F!==W&&(j=j||[]).push(te,W)):te==="children"?typeof W!="string"&&typeof W!="number"||(j=j||[]).push(te,""+W):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(i.hasOwnProperty(te)?(W!=null&&te==="onScroll"&>("scroll",o),j||F===W||(j=[])):(j=j||[]).push(te,W))}v&&(j=j||[]).push("style",v);var te=j;(l.updateQueue=te)&&(l.flags|=4)}},WO=function(o,l,v,x){v!==x&&(l.flags|=4)};function El(o,l){if(!bt)switch(o.tailMode){case"hidden":l=o.tail;for(var v=null;l!==null;)l.alternate!==null&&(v=l),l=l.sibling;v===null?o.tail=null:v.sibling=null;break;case"collapsed":v=o.tail;for(var x=null;v!==null;)v.alternate!==null&&(x=v),v=v.sibling;x===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:x.sibling=null}}function tr(o){var l=o.alternate!==null&&o.alternate.child===o.child,v=0,x=0;if(l)for(var _=o.child;_!==null;)v|=_.lanes|_.childLanes,x|=_.subtreeFlags&14680064,x|=_.flags&14680064,_.return=o,_=_.sibling;else for(_=o.child;_!==null;)v|=_.lanes|_.childLanes,x|=_.subtreeFlags,x|=_.flags,_.return=o,_=_.sibling;return o.subtreeFlags|=x,o.childLanes=v,l}function w5(o,l,v){var x=l.pendingProps;switch($m(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tr(l),null;case 1:return pr(l.type)&&Iu(),tr(l),null;case 3:return x=l.stateNode,Oo(),yt(hr),yt(Jt),Qm(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(o===null||o.child===null)&&(zu(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,un!==null&&(Av(un),un=null))),vv(o,l),tr(l),null;case 5:Xm(l);var _=ha(wl.current);if(v=l.type,o!==null&&l.stateNode!=null)UO(o,l,v,x,_),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!x){if(l.stateNode===null)throw Error(r(166));return tr(l),null}if(o=ha(Cn.current),zu(l)){x=l.stateNode,v=l.type;var j=l.memoizedProps;switch(x[Nn]=l,x[vl]=j,o=(l.mode&1)!==0,v){case"dialog":gt("cancel",x),gt("close",x);break;case"iframe":case"object":case"embed":gt("load",x);break;case"video":case"audio":for(_=0;_<\/script>",o=o.removeChild(o.firstChild)):typeof x.is=="string"?o=k.createElement(v,{is:x.is}):(o=k.createElement(v),v==="select"&&(k=o,x.multiple?k.multiple=!0:x.size&&(k.size=x.size))):o=k.createElementNS(o,v),o[Nn]=l,o[vl]=x,qO(o,l,!1,!1),l.stateNode=o;e:{switch(k=Qp(v,x),v){case"dialog":gt("cancel",o),gt("close",o),_=x;break;case"iframe":case"object":case"embed":gt("load",o),_=x;break;case"video":case"audio":for(_=0;_Po&&(l.flags|=128,x=!0,El(j,!1),l.lanes=4194304)}else{if(!x)if(o=Vu(k),o!==null){if(l.flags|=128,x=!0,v=o.updateQueue,v!==null&&(l.updateQueue=v,l.flags|=4),El(j,!0),j.tail===null&&j.tailMode==="hidden"&&!k.alternate&&!bt)return tr(l),null}else 2*Pt()-j.renderingStartTime>Po&&v!==1073741824&&(l.flags|=128,x=!0,El(j,!1),l.lanes=4194304);j.isBackwards?(k.sibling=l.child,l.child=k):(v=j.last,v!==null?v.sibling=k:l.child=k,j.last=k)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=Pt(),l.sibling=null,v=_t.current,dt(_t,x?v&1|2:v&1),l):(tr(l),null);case 22:case 23:return Nv(),x=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==x&&(l.flags|=8192),x&&(l.mode&1)!==0?(Nr&1073741824)!==0&&(tr(l),l.subtreeFlags&6&&(l.flags|=8192)):tr(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function _5(o,l){switch($m(l),l.tag){case 1:return pr(l.type)&&Iu(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Oo(),yt(hr),yt(Jt),Qm(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return Xm(l),null;case 13:if(yt(_t),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));bo()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return yt(_t),null;case 4:return Oo(),null;case 10:return Wm(l.type._context),null;case 22:case 23:return Nv(),null;case 24:return null;default:return null}}var tf=!1,rr=!1,S5=typeof WeakSet=="function"?WeakSet:Set,be=null;function Eo(o,l){var v=o.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(x){Ot(o,l,x)}else v.current=null}function gv(o,l,v){try{v()}catch(x){Ot(o,l,x)}}var HO=!1;function O5(o,l){if(Nm=wu,o=SS(),wm(o)){if("selectionStart"in o)var v={start:o.selectionStart,end:o.selectionEnd};else e:{v=(v=o.ownerDocument)&&v.defaultView||window;var x=v.getSelection&&v.getSelection();if(x&&x.rangeCount!==0){v=x.anchorNode;var _=x.anchorOffset,j=x.focusNode;x=x.focusOffset;try{v.nodeType,j.nodeType}catch{v=null;break e}var k=0,F=-1,W=-1,te=0,le=0,ce=o,se=null;t:for(;;){for(var xe;ce!==v||_!==0&&ce.nodeType!==3||(F=k+_),ce!==j||x!==0&&ce.nodeType!==3||(W=k+x),ce.nodeType===3&&(k+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)se=ce,ce=xe;for(;;){if(ce===o)break t;if(se===v&&++te===_&&(F=k),se===j&&++le===x&&(W=k),(xe=ce.nextSibling)!==null)break;ce=se,se=ce.parentNode}ce=xe}v=F===-1||W===-1?null:{start:F,end:W}}else v=null}v=v||{start:0,end:0}}else v=null;for(Cm={focusedElem:o,selectionRange:v},wu=!1,be=l;be!==null;)if(l=be,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,be=o;else for(;be!==null;){l=be;try{var Se=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Se!==null){var Ee=Se.memoizedProps,Nt=Se.memoizedState,Y=l.stateNode,G=Y.getSnapshotBeforeUpdate(l.elementType===l.type?Ee:fn(l.type,Ee),Nt);Y.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var J=l.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(de){Ot(l,l.return,de)}if(o=l.sibling,o!==null){o.return=l.return,be=o;break}be=l.return}return Se=HO,HO=!1,Se}function Al(o,l,v){var x=l.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var _=x=x.next;do{if((_.tag&o)===o){var j=_.destroy;_.destroy=void 0,j!==void 0&&gv(l,v,j)}_=_.next}while(_!==x)}}function rf(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var v=l=l.next;do{if((v.tag&o)===o){var x=v.create;v.destroy=x()}v=v.next}while(v!==l)}}function yv(o){var l=o.ref;if(l!==null){var v=o.stateNode;switch(o.tag){case 5:o=v;break;default:o=v}typeof l=="function"?l(o):l.current=o}}function VO(o){var l=o.alternate;l!==null&&(o.alternate=null,VO(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[Nn],delete l[vl],delete l[Mm],delete l[o5],delete l[s5])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function GO(o){return o.tag===5||o.tag===3||o.tag===4}function KO(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||GO(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function xv(o,l,v){var x=o.tag;if(x===5||x===6)o=o.stateNode,l?v.nodeType===8?v.parentNode.insertBefore(o,l):v.insertBefore(o,l):(v.nodeType===8?(l=v.parentNode,l.insertBefore(o,v)):(l=v,l.appendChild(o)),v=v._reactRootContainer,v!=null||l.onclick!==null||(l.onclick=Ru));else if(x!==4&&(o=o.child,o!==null))for(xv(o,l,v),o=o.sibling;o!==null;)xv(o,l,v),o=o.sibling}function bv(o,l,v){var x=o.tag;if(x===5||x===6)o=o.stateNode,l?v.insertBefore(o,l):v.appendChild(o);else if(x!==4&&(o=o.child,o!==null))for(bv(o,l,v),o=o.sibling;o!==null;)bv(o,l,v),o=o.sibling}var Yt=null,dn=!1;function Mi(o,l,v){for(v=v.child;v!==null;)XO(o,l,v),v=v.sibling}function XO(o,l,v){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(mu,v)}catch{}switch(v.tag){case 5:rr||Eo(v,l);case 6:var x=Yt,_=dn;Yt=null,Mi(o,l,v),Yt=x,dn=_,Yt!==null&&(dn?(o=Yt,v=v.stateNode,o.nodeType===8?o.parentNode.removeChild(v):o.removeChild(v)):Yt.removeChild(v.stateNode));break;case 18:Yt!==null&&(dn?(o=Yt,v=v.stateNode,o.nodeType===8?Rm(o.parentNode,v):o.nodeType===1&&Rm(o,v),al(o)):Rm(Yt,v.stateNode));break;case 4:x=Yt,_=dn,Yt=v.stateNode.containerInfo,dn=!0,Mi(o,l,v),Yt=x,dn=_;break;case 0:case 11:case 14:case 15:if(!rr&&(x=v.updateQueue,x!==null&&(x=x.lastEffect,x!==null))){_=x=x.next;do{var j=_,k=j.destroy;j=j.tag,k!==void 0&&((j&2)!==0||(j&4)!==0)&&gv(v,l,k),_=_.next}while(_!==x)}Mi(o,l,v);break;case 1:if(!rr&&(Eo(v,l),x=v.stateNode,typeof x.componentWillUnmount=="function"))try{x.props=v.memoizedProps,x.state=v.memoizedState,x.componentWillUnmount()}catch(F){Ot(v,l,F)}Mi(o,l,v);break;case 21:Mi(o,l,v);break;case 22:v.mode&1?(rr=(x=rr)||v.memoizedState!==null,Mi(o,l,v),rr=x):Mi(o,l,v);break;default:Mi(o,l,v)}}function YO(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var v=o.stateNode;v===null&&(v=o.stateNode=new S5),l.forEach(function(x){var _=R5.bind(null,o,x);v.has(x)||(v.add(x),x.then(_,_))})}}function hn(o,l){var v=l.deletions;if(v!==null)for(var x=0;x_&&(_=k),x&=~j}if(x=_,x=Pt()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*E5(x/1960))-x,10o?16:o,Di===null)var x=!1;else{if(o=Di,Di=null,lf=0,(Xe&6)!==0)throw Error(r(331));var _=Xe;for(Xe|=4,be=o.current;be!==null;){var j=be,k=j.child;if((be.flags&16)!==0){var F=j.deletions;if(F!==null){for(var W=0;WPt()-Sv?ga(o,0):_v|=v),gr(o,l)}function cj(o,l){l===0&&((o.mode&1)===0?l=1:(l=gu,gu<<=1,(gu&130023424)===0&&(gu=4194304)));var v=sr();o=Zn(o,l),o!==null&&(el(o,l,v),gr(o,v))}function k5(o){var l=o.memoizedState,v=0;l!==null&&(v=l.retryLane),cj(o,v)}function R5(o,l){var v=0;switch(o.tag){case 13:var x=o.stateNode,_=o.memoizedState;_!==null&&(v=_.retryLane);break;case 19:x=o.stateNode;break;default:throw Error(r(314))}x!==null&&x.delete(l),cj(o,v)}var uj;uj=function(o,l,v){if(o!==null)if(o.memoizedProps!==l.pendingProps||hr.current)mr=!0;else{if((o.lanes&v)===0&&(l.flags&128)===0)return mr=!1,b5(o,l,v);mr=(o.flags&131072)!==0}else mr=!1,bt&&(l.flags&1048576)!==0&&US(l,Bu,l.index);switch(l.lanes=0,l.tag){case 2:var x=l.type;ef(o,l),o=l.pendingProps;var _=go(l,Jt.current);So(l,v),_=ev(null,l,x,o,_,v);var j=tv();return l.flags|=1,typeof _=="object"&&_!==null&&typeof _.render=="function"&&_.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,pr(x)?(j=!0,Du(l)):j=!1,l.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,Gm(l),_.updater=Zu,l.stateNode=_,_._reactInternals=l,sv(l,x,o,v),l=fv(null,l,x,!0,j,v)):(l.tag=0,bt&&j&&Lm(l),or(null,l,_,v),l=l.child),l;case 16:x=l.elementType;e:{switch(ef(o,l),o=l.pendingProps,_=x._init,x=_(x._payload),l.type=x,_=l.tag=I5(x),o=fn(x,o),_){case 0:l=uv(null,l,x,o,v);break e;case 1:l=DO(null,l,x,o,v);break e;case 11:l=TO(null,l,x,o,v);break e;case 14:l=kO(null,l,x,fn(x.type,o),v);break e}throw Error(r(306,x,""))}return l;case 0:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),uv(o,l,x,_,v);case 1:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),DO(o,l,x,_,v);case 3:e:{if(LO(l),o===null)throw Error(r(387));x=l.pendingProps,j=l.memoizedState,_=j.element,ZS(o,l),Hu(l,x,null,v);var k=l.memoizedState;if(x=k.element,j.isDehydrated)if(j={element:x,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},l.updateQueue.baseState=j,l.memoizedState=j,l.flags&256){_=jo(Error(r(423)),l),l=$O(o,l,x,v,_);break e}else if(x!==_){_=jo(Error(r(424)),l),l=$O(o,l,x,v,_);break e}else for(Pr=Pi(l.stateNode.containerInfo.firstChild),Ar=l,bt=!0,un=null,v=YS(l,null,x,v),l.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(bo(),x===_){l=ei(o,l,v);break e}or(o,l,x,v)}l=l.child}return l;case 5:return tO(l),o===null&&zm(l),x=l.type,_=l.pendingProps,j=o!==null?o.memoizedProps:null,k=_.children,Tm(x,_)?k=null:j!==null&&Tm(x,j)&&(l.flags|=32),IO(o,l),or(o,l,k,v),l.child;case 6:return o===null&&zm(l),null;case 13:return BO(o,l,v);case 4:return Km(l,l.stateNode.containerInfo),x=l.pendingProps,o===null?l.child=wo(l,null,x,v):or(o,l,x,v),l.child;case 11:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),TO(o,l,x,_,v);case 7:return or(o,l,l.pendingProps,v),l.child;case 8:return or(o,l,l.pendingProps.children,v),l.child;case 12:return or(o,l,l.pendingProps.children,v),l.child;case 10:e:{if(x=l.type._context,_=l.pendingProps,j=l.memoizedProps,k=_.value,dt(qu,x._currentValue),x._currentValue=k,j!==null)if(cn(j.value,k)){if(j.children===_.children&&!hr.current){l=ei(o,l,v);break e}}else for(j=l.child,j!==null&&(j.return=l);j!==null;){var F=j.dependencies;if(F!==null){k=j.child;for(var W=F.firstContext;W!==null;){if(W.context===x){if(j.tag===1){W=Jn(-1,v&-v),W.tag=2;var te=j.updateQueue;if(te!==null){te=te.shared;var le=te.pending;le===null?W.next=W:(W.next=le.next,le.next=W),te.pending=W}}j.lanes|=v,W=j.alternate,W!==null&&(W.lanes|=v),Hm(j.return,v,l),F.lanes|=v;break}W=W.next}}else if(j.tag===10)k=j.type===l.type?null:j.child;else if(j.tag===18){if(k=j.return,k===null)throw Error(r(341));k.lanes|=v,F=k.alternate,F!==null&&(F.lanes|=v),Hm(k,v,l),k=j.sibling}else k=j.child;if(k!==null)k.return=j;else for(k=j;k!==null;){if(k===l){k=null;break}if(j=k.sibling,j!==null){j.return=k.return,k=j;break}k=k.return}j=k}or(o,l,_.children,v),l=l.child}return l;case 9:return _=l.type,x=l.pendingProps.children,So(l,v),_=Gr(_),x=x(_),l.flags|=1,or(o,l,x,v),l.child;case 14:return x=l.type,_=fn(x,l.pendingProps),_=fn(x.type,_),kO(o,l,x,_,v);case 15:return RO(o,l,l.type,l.pendingProps,v);case 17:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),ef(o,l),l.tag=1,pr(x)?(o=!0,Du(l)):o=!1,So(l,v),OO(l,x,_),sv(l,x,_,v),fv(null,l,x,!0,o,v);case 19:return FO(o,l,v);case 22:return MO(o,l,v)}throw Error(r(156,l.tag))};function fj(o,l){return W_(o,l)}function M5(o,l,v,x){this.tag=o,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(o,l,v,x){return new M5(o,l,v,x)}function Tv(o){return o=o.prototype,!(!o||!o.isReactComponent)}function I5(o){if(typeof o=="function")return Tv(o)?1:0;if(o!=null){if(o=o.$$typeof,o===D)return 11;if(o===V)return 14}return 2}function Bi(o,l){var v=o.alternate;return v===null?(v=Yr(o.tag,l,o.key,o.mode),v.elementType=o.elementType,v.type=o.type,v.stateNode=o.stateNode,v.alternate=o,o.alternate=v):(v.pendingProps=l,v.type=o.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=o.flags&14680064,v.childLanes=o.childLanes,v.lanes=o.lanes,v.child=o.child,v.memoizedProps=o.memoizedProps,v.memoizedState=o.memoizedState,v.updateQueue=o.updateQueue,l=o.dependencies,v.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},v.sibling=o.sibling,v.index=o.index,v.ref=o.ref,v}function df(o,l,v,x,_,j){var k=2;if(x=o,typeof o=="function")Tv(o)&&(k=1);else if(typeof o=="string")k=5;else e:switch(o){case T:return xa(v.children,_,j,l);case R:k=8,_|=8;break;case I:return o=Yr(12,v,l,_|2),o.elementType=I,o.lanes=j,o;case U:return o=Yr(13,v,l,_),o.elementType=U,o.lanes=j,o;case H:return o=Yr(19,v,l,_),o.elementType=H,o.lanes=j,o;case X:return hf(v,_,j,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case q:k=10;break e;case L:k=9;break e;case D:k=11;break e;case V:k=14;break e;case K:k=16,x=null;break e}throw Error(r(130,o==null?o:typeof o,""))}return l=Yr(k,v,l,_),l.elementType=o,l.type=x,l.lanes=j,l}function xa(o,l,v,x){return o=Yr(7,o,x,l),o.lanes=v,o}function hf(o,l,v,x){return o=Yr(22,o,x,l),o.elementType=X,o.lanes=v,o.stateNode={isHidden:!1},o}function kv(o,l,v){return o=Yr(6,o,null,l),o.lanes=v,o}function Rv(o,l,v){return l=Yr(4,o.children!==null?o.children:[],o.key,l),l.lanes=v,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function D5(o,l,v,x,_){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=om(0),this.expirationTimes=om(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=om(0),this.identifierPrefix=x,this.onRecoverableError=_,this.mutableSourceEagerHydrationData=null}function Mv(o,l,v,x,_,j,k,F,W){return o=new D5(o,l,v,F,W),l===1?(l=1,j===!0&&(l|=8)):l=0,j=Yr(3,null,null,l),o.current=j,j.stateNode=o,j.memoizedState={element:x,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gm(j),o}function L5(o,l,v){var x=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zv.exports=X5(),zv.exports}var jj;function Y5(){if(jj)return wf;jj=1;var e=cR();return wf.createRoot=e.createRoot,wf.hydrateRoot=e.hydrateRoot,wf}var Q5=Y5(),P=Vh();const z=it(P),X1=U5({__proto__:null,default:z},[P]);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. @@ -327,7 +327,7 @@ Error generating stack: `+j.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const T8=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ec=Ce("x",T8);function yR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),xR=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Td="-",Pj=[],M8="arbitrary..",I8=e=>{const t=L8(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return D8(s);const u=s.split(Td),f=u[0]===""&&u.length>1?1:0;return bR(u,f,t)},getConflictingClassGroupIds:(s,u)=>{if(u){const f=n[s],c=r[s];return f?c?k8(c,f):f:c||Pj}return r[s]||Pj}}},bR=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const c=bR(e,t+1,a);if(c)return c}const s=r.validators;if(s===null)return;const u=t===0?e.join(Td):e.slice(t).join(Td),f=s.length;for(let c=0;ce.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?M8+n:void 0})(),L8=e=>{const{theme:t,classGroups:r}=e;return $8(r,t)},$8=(e,t)=>{const r=xR();for(const n in e){const i=e[n];J1(i,r,n,t)}return r},J1=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){z8(e,t,r);return}if(typeof e=="function"){F8(e,t,r,n);return}q8(e,t,r,n)},z8=(e,t,r)=>{const n=e===""?t:wR(t,e);n.classGroupId=r},F8=(e,t,r,n)=>{if(U8(e)){J1(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(R8(r,e))},q8=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let s=0;s{let r=e;const n=t.split(Td),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,W8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,s)=>{r[a]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return i(a,s),s},set(a,s){a in r?r[a]=s:i(a,s)}}},db="!",Nj=":",H8=[],Cj=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),V8=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let s=0,u=0,f=0,c;const d=i.length;for(let y=0;yf?c-f:void 0;return Cj(a,g,m,b)};if(t){const i=t+Nj,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):Cj(H8,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},G8=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},K8=e=>({cache:W8(e.cacheSize),parseClassName:V8(e),sortModifiers:G8(e),...I8(e)}),X8=/\s+/,Y8=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,s=[],u=e.trim().split(X8);let f="";for(let c=u.length-1;c>=0;c-=1){const d=u[c],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:y}=r(d);if(h){f=d+(f.length>0?" "+f:f);continue}let w=!!y,S=n(w?b.substring(0,y):b);if(!S){if(!w){f=d+(f.length>0?" "+f:f);continue}if(S=n(b),!S){f=d+(f.length>0?" "+f:f);continue}w=!1}const O=m.length===0?"":m.length===1?m[0]:a(m).join(":"),E=g?O+db:O,C=E+S;if(s.indexOf(C)>-1)continue;s.push(C);const A=i(S,w);for(let N=0;N0?" "+f:f)}return f},Q8=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const s=f=>{const c=t.reduce((d,h)=>h(d),e());return r=K8(c),n=r.cache.get,i=r.cache.set,a=u,u(f)},u=f=>{const c=n(f);if(c)return c;const d=Y8(f,r);return i(f,d),d};return a=s,(...f)=>a(Q8(...f))},J8=[],Dt=e=>{const t=r=>r[e]||J8;return t.isThemeGetter=!0,t},SR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,OR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,e6=/^\d+\/\d+$/,t6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,r6=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,n6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,i6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,a6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Co=e=>e6.test(e),He=e=>!!e&&!Number.isNaN(Number(e)),Fi=e=>!!e&&Number.isInteger(Number(e)),Wv=e=>e.endsWith("%")&&He(e.slice(0,-1)),ri=e=>t6.test(e),o6=()=>!0,s6=e=>r6.test(e)&&!n6.test(e),jR=()=>!1,l6=e=>i6.test(e),c6=e=>a6.test(e),u6=e=>!Se(e)&&!Oe(e),f6=e=>Ts(e,PR,jR),Se=e=>SR.test(e),ba=e=>Ts(e,NR,s6),Hv=e=>Ts(e,v6,He),Tj=e=>Ts(e,ER,jR),d6=e=>Ts(e,AR,c6),_f=e=>Ts(e,CR,l6),Oe=e=>OR.test(e),Rl=e=>ks(e,NR),h6=e=>ks(e,g6),kj=e=>ks(e,ER),p6=e=>ks(e,PR),m6=e=>ks(e,AR),Sf=e=>ks(e,CR,!0),Ts=(e,t,r)=>{const n=SR.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ks=(e,t,r=!1)=>{const n=OR.exec(e);return n?n[1]?t(n[1]):r:!1},ER=e=>e==="position"||e==="percentage",AR=e=>e==="image"||e==="url",PR=e=>e==="length"||e==="size"||e==="bg-size",NR=e=>e==="length",v6=e=>e==="number",g6=e=>e==="family-name",CR=e=>e==="shadow",y6=()=>{const e=Dt("color"),t=Dt("font"),r=Dt("text"),n=Dt("font-weight"),i=Dt("tracking"),a=Dt("leading"),s=Dt("breakpoint"),u=Dt("container"),f=Dt("spacing"),c=Dt("radius"),d=Dt("shadow"),h=Dt("inset-shadow"),m=Dt("text-shadow"),g=Dt("drop-shadow"),b=Dt("blur"),y=Dt("perspective"),w=Dt("aspect"),S=Dt("ease"),O=Dt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...C(),Oe,Se],N=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],R=()=>[Oe,Se,f],I=()=>[Co,"full","auto",...R()],q=()=>[Fi,"none","subgrid",Oe,Se],L=()=>["auto",{span:["full",Fi,Oe,Se]},Fi,Oe,Se],D=()=>[Fi,"auto",Oe,Se],U=()=>["auto","min","max","fr",Oe,Se],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...R()],X=()=>[Co,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],B=()=>[e,Oe,Se],Z=()=>[...C(),kj,Tj,{position:[Oe,Se]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",p6,f6,{size:[Oe,Se]}],$=()=>[Wv,Rl,ba],Q=()=>["","none","full",c,Oe,Se],ae=()=>["",He,Rl,ba],pe=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[He,Wv,kj,Tj],me=()=>["","none",b,Oe,Se],ie=()=>["none",He,Oe,Se],ue=()=>["none",He,Oe,Se],ve=()=>[He,Oe,Se],re=()=>[Co,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ri],breakpoint:[ri],color:[o6],container:[ri],"drop-shadow":[ri],ease:["in","out","in-out"],font:[u6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ri],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ri],shadow:[ri],spacing:["px",He],text:[ri],"text-shadow":[ri],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Co,Se,Oe,w]}],container:["container"],columns:[{columns:[He,Se,Oe,u]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Fi,"auto",Oe,Se]}],basis:[{basis:[Co,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,Co,"auto","initial","none",Se]}],grow:[{grow:["",He,Oe,Se]}],shrink:[{shrink:["",He,Oe,Se]}],order:[{order:[Fi,"first","last","none",Oe,Se]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Rl,ba]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Oe,Hv]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wv,Se]}],"font-family":[{font:[h6,Se,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Oe,Se]}],"line-clamp":[{"line-clamp":[He,"none",Oe,Hv]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",Oe,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",Oe,ba]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[He,"auto",Oe,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Oe,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fi,Oe,Se],radial:["",Oe,Se],conic:[Fi,Oe,Se]},m6,d6]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,Oe,Se]}],"outline-w":[{outline:["",He,Rl,ba]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",d,Sf,_f]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",h,Sf,_f]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[He,ba]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",m,Sf,_f]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[He,Oe,Se]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[Oe,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,Se]}],filter:[{filter:["","none",Oe,Se]}],blur:[{blur:me()}],brightness:[{brightness:[He,Oe,Se]}],contrast:[{contrast:[He,Oe,Se]}],"drop-shadow":[{"drop-shadow":["","none",g,Sf,_f]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",He,Oe,Se]}],"hue-rotate":[{"hue-rotate":[He,Oe,Se]}],invert:[{invert:["",He,Oe,Se]}],saturate:[{saturate:[He,Oe,Se]}],sepia:[{sepia:["",He,Oe,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,Se]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[He,Oe,Se]}],"backdrop-contrast":[{"backdrop-contrast":[He,Oe,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,Oe,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,Oe,Se]}],"backdrop-invert":[{"backdrop-invert":["",He,Oe,Se]}],"backdrop-opacity":[{"backdrop-opacity":[He,Oe,Se]}],"backdrop-saturate":[{"backdrop-saturate":[He,Oe,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",He,Oe,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",Oe,Se]}],ease:[{ease:["linear","initial",S,Oe,Se]}],delay:[{delay:[He,Oe,Se]}],animate:[{animate:["none",O,Oe,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Oe,Se]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Oe,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Oe,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Oe,Se]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[He,Rl,ba,Hv]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},x6=Z8(y6);function Ie(...e){return x6(Ue(e))}var Kc=cR();const b6=it(Kc);function Rj(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rs(...e){return t=>{let r=!1;const n=e.map(i=>{const a=Rj(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(O6);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function _6(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=E6(i),u=j6(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var S6=Symbol("radix.slottable");function O6(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S6}function j6(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function E6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var A6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=A6.reduce((e,t)=>{const r=w6(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function P6(e,t){e&&Kc.flushSync(()=>e.dispatchEvent(t))}var Rt=globalThis?.document?P.useLayoutEffect:()=>{};function N6(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}var Un=e=>{const{present:t,children:r}=e,n=C6(t),i=typeof r=="function"?r({present:n.isPresent}):P.Children.only(r),a=Je(n.ref,T6(i));return typeof r=="function"||n.isPresent?P.cloneElement(i,{ref:a}):null};Un.displayName="Presence";function C6(e){const[t,r]=P.useState(),n=P.useRef(null),i=P.useRef(e),a=P.useRef("none"),s=e?"mounted":"unmounted",[u,f]=N6(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=Of(n.current);a.current=u==="mounted"?c:"none"},[u]),Rt(()=>{const c=n.current,d=i.current;if(d!==e){const m=a.current,g=Of(c);e?f("MOUNT"):g==="none"||c?.display==="none"?f("UNMOUNT"):f(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Rt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,h=g=>{const y=Of(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&y&&(f("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=g=>{g.target===t&&(a.current=Of(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:P.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Of(e){return e?.animationName||"none"}function T6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function k6(e,t){const r=P.createContext(t),n=a=>{const{children:s,...u}=a,f=P.useMemo(()=>u,Object.values(u));return p.jsx(r.Provider,{value:f,children:s})};n.displayName=e+"Provider";function i(a){const s=P.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function gi(e,t=[]){let r=[];function n(a,s){const u=P.createContext(s),f=r.length;r=[...r,s];const c=h=>{const{scope:m,children:g,...b}=h,y=m?.[e]?.[f]||u,w=P.useMemo(()=>b,Object.values(b));return p.jsx(y.Provider,{value:w,children:g})};c.displayName=a+"Provider";function d(h,m){const g=m?.[e]?.[f]||u,b=P.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=r.map(s=>P.createContext(s));return function(u){const f=u?.[e]||a;return P.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,R6(i,...t)]}function R6(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((u,{useScope:f,scopeName:c})=>{const h=f(a)[`__scope${c}`];return{...u,...h}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function ar(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...r)=>t.current?.(...r),[])}var M6=P.createContext(void 0);function Kh(e){const t=P.useContext(M6);return e||t||"ltr"}function hb(e,[t,r]){return Math.min(r,Math.max(t,e))}function Fe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),r===!1||!i.defaultPrevented)return t?.(i)}}function I6(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}var ew="ScrollArea",[TR]=gi(ew),[D6,on]=TR(ew),kR=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:i,scrollHideDelay:a=600,...s}=e,[u,f]=P.useState(null),[c,d]=P.useState(null),[h,m]=P.useState(null),[g,b]=P.useState(null),[y,w]=P.useState(null),[S,O]=P.useState(0),[E,C]=P.useState(0),[A,N]=P.useState(!1),[T,R]=P.useState(!1),I=Je(t,L=>f(L)),q=Kh(i);return p.jsx(D6,{scope:r,type:n,dir:q,scrollHideDelay:a,scrollArea:u,viewport:c,onViewportChange:d,content:h,onContentChange:m,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:A,onScrollbarXEnabledChange:N,scrollbarY:y,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:O,onCornerHeightChange:C,children:p.jsx(We.div,{dir:q,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});kR.displayName=ew;var RR="ScrollAreaViewport",MR=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:i,...a}=e,s=on(RR,r),u=P.useRef(null),f=Je(t,u,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.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:i}),p.jsx(We.div,{"data-radix-scroll-area-viewport":"",...a,ref:f,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});MR.displayName=RR;var Wn="ScrollAreaScrollbar",IR=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=i,u=e.orientation==="horizontal";return P.useEffect(()=>(u?a(!0):s(!0),()=>{u?a(!1):s(!1)}),[u,a,s]),i.type==="hover"?p.jsx(L6,{...n,ref:t,forceMount:r}):i.type==="scroll"?p.jsx($6,{...n,ref:t,forceMount:r}):i.type==="auto"?p.jsx(DR,{...n,ref:t,forceMount:r}):i.type==="always"?p.jsx(tw,{...n,ref:t}):null});IR.displayName=Wn;var L6=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),[a,s]=P.useState(!1);return P.useEffect(()=>{const u=i.scrollArea;let f=0;if(u){const c=()=>{window.clearTimeout(f),s(!0)},d=()=>{f=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",c),u.addEventListener("pointerleave",d),()=>{window.clearTimeout(f),u.removeEventListener("pointerenter",c),u.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),p.jsx(Un,{present:r||a,children:p.jsx(DR,{"data-state":a?"visible":"hidden",...n,ref:t})})}),$6=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Yh(()=>f("SCROLL_END"),100),[u,f]=I6("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 P.useEffect(()=>{if(u==="idle"){const c=window.setTimeout(()=>f("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[u,i.scrollHideDelay,f]),P.useEffect(()=>{const c=i.viewport,d=a?"scrollLeft":"scrollTop";if(c){let h=c[d];const m=()=>{const g=c[d];h!==g&&(f("SCROLL"),s()),h=g};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[i.viewport,a,f,s]),p.jsx(Un,{present:r||u!=="hidden",children:p.jsx(tw,{"data-state":u==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Fe(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:Fe(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),DR=P.forwardRef((e,t)=>{const r=on(Wn,e.__scopeScrollArea),{forceMount:n,...i}=e,[a,s]=P.useState(!1),u=e.orientation==="horizontal",f=Yh(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,i=on(Wn,e.__scopeScrollArea),a=P.useRef(null),s=P.useRef(0),[u,f]=P.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=FR(u.viewport,u.content),d={...n,sizes:u,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function h(m,g){return W6(m,s.current,u,g)}return r==="horizontal"?p.jsx(B6,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollLeft,g=Mj(m,u,i.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=h(m,i.dir))}}):r==="vertical"?p.jsx(z6,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollTop,g=Mj(m,u);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=h(m))}}):null}),B6=P.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,a=on(Wn,e.__scopeScrollArea),[s,u]=P.useState(),f=P.useRef(null),c=Je(t,f,a.onScrollbarXChange);return P.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),p.jsx($R,{"data-orientation":"horizontal",...i,ref:c,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Xh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),UR(m,h)&&d.preventDefault()}},onResize:()=>{f.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Rd(s.paddingLeft),paddingEnd:Rd(s.paddingRight)}})}})}),z6=P.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,a=on(Wn,e.__scopeScrollArea),[s,u]=P.useState(),f=P.useRef(null),c=Je(t,f,a.onScrollbarYChange);return P.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),p.jsx($R,{"data-orientation":"vertical",...i,ref:c,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Xh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),UR(m,h)&&d.preventDefault()}},onResize:()=>{f.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Rd(s.paddingTop),paddingEnd:Rd(s.paddingBottom)}})}})}),[F6,LR]=TR(Wn),$R=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:i,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:u,onThumbPositionChange:f,onDragScroll:c,onWheelScroll:d,onResize:h,...m}=e,g=on(Wn,r),[b,y]=P.useState(null),w=Je(t,I=>y(I)),S=P.useRef(null),O=P.useRef(""),E=g.viewport,C=n.content-n.viewport,A=ar(d),N=ar(f),T=Yh(h,10);function R(I){if(S.current){const q=I.clientX-S.current.left,L=I.clientY-S.current.top;c({x:q,y:L})}}return P.useEffect(()=>{const I=q=>{const L=q.target;b?.contains(L)&&A(q,C)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[E,b,C,A]),P.useEffect(N,[n,N]),is(b,T),is(g.content,T),p.jsx(F6,{scope:r,scrollbar:b,hasThumb:i,onThumbChange:ar(a),onThumbPointerUp:ar(s),onThumbPositionChange:N,onThumbPointerDown:ar(u),children:p.jsx(We.div,{...m,ref:w,style:{position:"absolute",...m.style},onPointerDown:Fe(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),S.current=b.getBoundingClientRect(),O.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),R(I))}),onPointerMove:Fe(e.onPointerMove,R),onPointerUp:Fe(e.onPointerUp,I=>{const q=I.target;q.hasPointerCapture(I.pointerId)&&q.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=O.current,g.viewport&&(g.viewport.style.scrollBehavior=""),S.current=null})})})}),kd="ScrollAreaThumb",BR=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=LR(kd,e.__scopeScrollArea);return p.jsx(Un,{present:r||i.hasThumb,children:p.jsx(q6,{ref:t,...n})})}),q6=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...i}=e,a=on(kd,r),s=LR(kd,r),{onThumbPositionChange:u}=s,f=Je(t,h=>s.onThumbChange(h)),c=P.useRef(void 0),d=Yh(()=>{c.current&&(c.current(),c.current=void 0)},100);return P.useEffect(()=>{const h=a.viewport;if(h){const m=()=>{if(d(),!c.current){const g=H6(h,u);c.current=g,u()}};return u(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[a.viewport,d,u]),p.jsx(We.div,{"data-state":s.hasThumb?"visible":"hidden",...i,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Fe(e.onPointerDownCapture,h=>{const g=h.target.getBoundingClientRect(),b=h.clientX-g.left,y=h.clientY-g.top;s.onThumbPointerDown({x:b,y})}),onPointerUp:Fe(e.onPointerUp,s.onThumbPointerUp)})});BR.displayName=kd;var rw="ScrollAreaCorner",zR=P.forwardRef((e,t)=>{const r=on(rw,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?p.jsx(U6,{...e,ref:t}):null});zR.displayName=rw;var U6=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,i=on(rw,r),[a,s]=P.useState(0),[u,f]=P.useState(0),c=!!(a&&u);return is(i.scrollbarX,()=>{const d=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(d),f(d)}),is(i.scrollbarY,()=>{const d=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(d),s(d)}),c?p.jsx(We.div,{...n,ref:t,style:{width:a,height:u,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Rd(e){return e?parseInt(e,10):0}function FR(e,t){const r=e/t;return isNaN(r)?0:r}function Xh(e){const t=FR(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function W6(e,t,r,n="ltr"){const i=Xh(r),a=i/2,s=t||a,u=i-s,f=r.scrollbar.paddingStart+s,c=r.scrollbar.size-r.scrollbar.paddingEnd-u,d=r.content-r.viewport,h=n==="ltr"?[0,d]:[d*-1,0];return qR([f,c],h)(e)}function Mj(e,t,r="ltr"){const n=Xh(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,s=t.content-t.viewport,u=a-n,f=r==="ltr"?[0,s]:[s*-1,0],c=hb(e,f);return qR([0,s],[0,u])(c)}function qR(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function UR(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function i(){const a={left:e.scrollLeft,top:e.scrollTop},s=r.left!==a.left,u=r.top!==a.top;(s||u)&&t(),r=a,n=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(n)};function Yh(e,t){const r=ar(e),n=P.useRef(0);return P.useEffect(()=>()=>window.clearTimeout(n.current),[]),P.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function is(e,t){const r=ar(t);Rt(()=>{let n=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(n),i.unobserve(e)}}},[e,r])}var V6=kR,G6=MR,K6=zR;function fc({className:e,children:t,...r}){return p.jsxs(V6,{"data-slot":"scroll-area",className:Ie("relative",e),...r,children:[p.jsx(G6,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),p.jsx(X6,{}),p.jsx(K6,{})]})}function X6({className:e,orientation:t="vertical",...r}){return p.jsx(IR,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Ie("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:p.jsx(BR,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const Y6="/assets/773f0c39e1986271e9144596caac519f934a6ae6-Cou8J2R8.png";function Q6({currentView:e,setCurrentView:t}){const[r,n]=P.useState(!0),i=[{name:"Dashboard",icon:qB,type:"item"},{type:"header",name:"MODULES"},{name:"Labeling",icon:fb,type:"sub",isOpen:r,toggle:()=>n(!r),children:[{name:"Labels",icon:fb},{name:"Label Categories",icon:zB},{name:"Label Types",icon:Z1},{name:"Label Templates",icon:MB},{name:"Multiple Options",icon:vR}]},{type:"header",name:"MANAGEMENT"},{name:"Location Manager",icon:Gh,type:"item"},{name:"Account Management",icon:gR,type:"item"},{name:"Menu Manager",icon:ub,type:"item"},{name:"Reports",icon:uc,type:"item"},{name:"Support",icon:cb,type:"item"},{name:"Log Out",icon:VB,type:"item"}];return p.jsxs("div",{className:"w-64 bg-[#1e3a8a] text-white flex flex-col h-screen border-r border-blue-800 shadow-xl z-20 shrink-0",children:[p.jsx("div",{className:"flex items-center justify-center border-b border-blue-800/50 bg-white px-4 shrink-0",style:{height:90},children:p.jsx("img",{src:Y6,alt:"MedVantage",className:"h-16 w-auto object-contain"})}),p.jsx(fc,{className:"flex-1 py-4",children:p.jsx("div",{className:"px-3 space-y-1",children:i.map((a,s)=>a.type==="header"?p.jsx("div",{className:"px-4 py-2 mt-4 text-xs font-semibold text-blue-300 uppercase tracking-wider",children:a.name},s):a.type==="sub"?p.jsxs("div",{className:"space-y-1",children:[p.jsxs("button",{onClick:a.toggle,className:Ie("w-full flex items-center justify-between px-4 py-2.5 text-sm font-medium rounded-lg transition-colors","hover:bg-blue-800/50 text-blue-100"),children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(a.icon,{className:"w-4 h-4"}),a.name]}),a.isOpen?p.jsx(cc,{className:"w-4 h-4"}):p.jsx(Cd,{className:"w-4 h-4"})]}),a.isOpen&&p.jsx("div",{className:"pl-4 space-y-1",children:a.children?.map((u,f)=>p.jsxs("button",{onClick:()=>t(u.name),className:Ie("w-full flex items-center gap-3 px-4 py-2 text-sm font-medium rounded-lg transition-colors border-l-2",e===u.name?"bg-blue-800 border-blue-400 text-white":"border-transparent hover:bg-blue-800/30 text-blue-200 hover:text-white"),children:[p.jsx("div",{className:"w-1 h-1 rounded-full bg-current"}),u.name]},f))})]},s):p.jsxs("button",{onClick:()=>t(a.name),className:Ie("w-full flex items-center gap-3 px-4 py-2.5 text-sm font-medium rounded-lg transition-colors",e===a.name?"bg-blue-700 text-white shadow-md shadow-blue-900/20":a.name==="Log Out"?"text-red-300 hover:bg-red-900/20 hover:text-red-200":"text-blue-100 hover:bg-blue-800 hover:text-white"),children:[p.jsx(a.icon,{className:"w-4 h-4"}),a.name]},s))})})]})}function Be({className:e,type:t,...r}){return p.jsx("input",{type:t,"data-slot":"input",className:Ie("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}var Z6=Symbol.for("react.lazy"),Md=X1[" use ".trim().toString()];function J6(e){return typeof e=="object"&&e!==null&&"then"in e}function WR(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Z6&&"_payload"in e&&J6(e._payload)}function nw(e){const t=ez(e),r=P.forwardRef((n,i)=>{let{children:a,...s}=n;WR(a)&&typeof Md=="function"&&(a=Md(a._payload));const u=P.Children.toArray(a),f=u.find(rz);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var HR=nw("Slot");function ez(e){const t=P.forwardRef((r,n)=>{let{children:i,...a}=r;if(WR(i)&&typeof Md=="function"&&(i=Md(i._payload)),P.isValidElement(i)){const s=iz(i),u=nz(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tz=Symbol("radix.slottable");function rz(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tz}function nz(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function iz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const Ij=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dj=Ue,VR=(e,t)=>r=>{var n;if(t?.variants==null)return Dj(e,r?.class,r?.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(c=>{const d=r?.[c],h=a?.[c];if(d===null)return null;const m=Ij(d)||Ij(h);return i[c][m]}),u=r&&Object.entries(r).reduce((c,d)=>{let[h,m]=d;return m===void 0||(c[h]=m),c},{}),f=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:h,className:m,...g}=d;return Object.entries(g).every(b=>{let[y,w]=b;return Array.isArray(w)?w.includes({...a,...u}[y]):{...a,...u}[y]===w})?[...c,h,m]:c},[]);return Dj(e,s,f,r?.class,r?.className)},az=VR("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9 rounded-md"}},defaultVariants:{variant:"default",size:"default"}});function Ne({className:e,variant:t,size:r,asChild:n=!1,...i}){const a=n?HR:"button";return p.jsx(a,{"data-slot":"button",className:Ie(az({variant:t,size:r,className:e})),...i})}function oz(e,t=[]){let r=[];function n(a,s){const u=P.createContext(s);u.displayName=a+"Context";const f=r.length;r=[...r,s];const c=h=>{const{scope:m,children:g,...b}=h,y=m?.[e]?.[f]||u,w=P.useMemo(()=>b,Object.values(b));return p.jsx(y.Provider,{value:w,children:g})};c.displayName=a+"Provider";function d(h,m){const g=m?.[e]?.[f]||u,b=P.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=r.map(s=>P.createContext(s));return function(u){const f=u?.[e]||a;return P.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,sz(i,...t)]}function sz(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((u,{useScope:f,scopeName:c})=>{const h=f(a)[`__scope${c}`];return{...u,...h}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var lz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],iw=lz.reduce((e,t)=>{const r=nw(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Vv={exports:{}},Gv={};/** + */const T8=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ec=Ce("x",T8);function yR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),xR=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Td="-",Pj=[],M8="arbitrary..",I8=e=>{const t=L8(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return D8(s);const u=s.split(Td),f=u[0]===""&&u.length>1?1:0;return bR(u,f,t)},getConflictingClassGroupIds:(s,u)=>{if(u){const f=n[s],c=r[s];return f?c?k8(c,f):f:c||Pj}return r[s]||Pj}}},bR=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const c=bR(e,t+1,a);if(c)return c}const s=r.validators;if(s===null)return;const u=t===0?e.join(Td):e.slice(t).join(Td),f=s.length;for(let c=0;ce.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?M8+n:void 0})(),L8=e=>{const{theme:t,classGroups:r}=e;return $8(r,t)},$8=(e,t)=>{const r=xR();for(const n in e){const i=e[n];J1(i,r,n,t)}return r},J1=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){z8(e,t,r);return}if(typeof e=="function"){F8(e,t,r,n);return}q8(e,t,r,n)},z8=(e,t,r)=>{const n=e===""?t:wR(t,e);n.classGroupId=r},F8=(e,t,r,n)=>{if(U8(e)){J1(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(R8(r,e))},q8=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let s=0;s{let r=e;const n=t.split(Td),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,W8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,s)=>{r[a]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return i(a,s),s},set(a,s){a in r?r[a]=s:i(a,s)}}},db="!",Nj=":",H8=[],Cj=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),V8=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let s=0,u=0,f=0,c;const d=i.length;for(let y=0;yf?c-f:void 0;return Cj(a,g,m,b)};if(t){const i=t+Nj,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):Cj(H8,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},G8=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},K8=e=>({cache:W8(e.cacheSize),parseClassName:V8(e),sortModifiers:G8(e),...I8(e)}),X8=/\s+/,Y8=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,s=[],u=e.trim().split(X8);let f="";for(let c=u.length-1;c>=0;c-=1){const d=u[c],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:y}=r(d);if(h){f=d+(f.length>0?" "+f:f);continue}let w=!!y,S=n(w?b.substring(0,y):b);if(!S){if(!w){f=d+(f.length>0?" "+f:f);continue}if(S=n(b),!S){f=d+(f.length>0?" "+f:f);continue}w=!1}const O=m.length===0?"":m.length===1?m[0]:a(m).join(":"),E=g?O+db:O,C=E+S;if(s.indexOf(C)>-1)continue;s.push(C);const A=i(S,w);for(let N=0;N0?" "+f:f)}return f},Q8=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const s=f=>{const c=t.reduce((d,h)=>h(d),e());return r=K8(c),n=r.cache.get,i=r.cache.set,a=u,u(f)},u=f=>{const c=n(f);if(c)return c;const d=Y8(f,r);return i(f,d),d};return a=s,(...f)=>a(Q8(...f))},J8=[],Dt=e=>{const t=r=>r[e]||J8;return t.isThemeGetter=!0,t},SR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,OR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,e6=/^\d+\/\d+$/,t6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,r6=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,n6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,i6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,a6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Co=e=>e6.test(e),He=e=>!!e&&!Number.isNaN(Number(e)),Fi=e=>!!e&&Number.isInteger(Number(e)),Wv=e=>e.endsWith("%")&&He(e.slice(0,-1)),ri=e=>t6.test(e),o6=()=>!0,s6=e=>r6.test(e)&&!n6.test(e),jR=()=>!1,l6=e=>i6.test(e),c6=e=>a6.test(e),u6=e=>!Oe(e)&&!je(e),f6=e=>Ts(e,PR,jR),Oe=e=>SR.test(e),ba=e=>Ts(e,NR,s6),Hv=e=>Ts(e,v6,He),Tj=e=>Ts(e,ER,jR),d6=e=>Ts(e,AR,c6),_f=e=>Ts(e,CR,l6),je=e=>OR.test(e),Rl=e=>ks(e,NR),h6=e=>ks(e,g6),kj=e=>ks(e,ER),p6=e=>ks(e,PR),m6=e=>ks(e,AR),Sf=e=>ks(e,CR,!0),Ts=(e,t,r)=>{const n=SR.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ks=(e,t,r=!1)=>{const n=OR.exec(e);return n?n[1]?t(n[1]):r:!1},ER=e=>e==="position"||e==="percentage",AR=e=>e==="image"||e==="url",PR=e=>e==="length"||e==="size"||e==="bg-size",NR=e=>e==="length",v6=e=>e==="number",g6=e=>e==="family-name",CR=e=>e==="shadow",y6=()=>{const e=Dt("color"),t=Dt("font"),r=Dt("text"),n=Dt("font-weight"),i=Dt("tracking"),a=Dt("leading"),s=Dt("breakpoint"),u=Dt("container"),f=Dt("spacing"),c=Dt("radius"),d=Dt("shadow"),h=Dt("inset-shadow"),m=Dt("text-shadow"),g=Dt("drop-shadow"),b=Dt("blur"),y=Dt("perspective"),w=Dt("aspect"),S=Dt("ease"),O=Dt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...C(),je,Oe],N=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],R=()=>[je,Oe,f],I=()=>[Co,"full","auto",...R()],q=()=>[Fi,"none","subgrid",je,Oe],L=()=>["auto",{span:["full",Fi,je,Oe]},Fi,je,Oe],D=()=>[Fi,"auto",je,Oe],U=()=>["auto","min","max","fr",je,Oe],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...R()],X=()=>[Co,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],B=()=>[e,je,Oe],Z=()=>[...C(),kj,Tj,{position:[je,Oe]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",p6,f6,{size:[je,Oe]}],$=()=>[Wv,Rl,ba],Q=()=>["","none","full",c,je,Oe],ae=()=>["",He,Rl,ba],pe=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[He,Wv,kj,Tj],me=()=>["","none",b,je,Oe],ie=()=>["none",He,je,Oe],ue=()=>["none",He,je,Oe],ve=()=>[He,je,Oe],re=()=>[Co,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ri],breakpoint:[ri],color:[o6],container:[ri],"drop-shadow":[ri],ease:["in","out","in-out"],font:[u6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ri],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ri],shadow:[ri],spacing:["px",He],text:[ri],"text-shadow":[ri],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Co,Oe,je,w]}],container:["container"],columns:[{columns:[He,Oe,je,u]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Fi,"auto",je,Oe]}],basis:[{basis:[Co,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,Co,"auto","initial","none",Oe]}],grow:[{grow:["",He,je,Oe]}],shrink:[{shrink:["",He,je,Oe]}],order:[{order:[Fi,"first","last","none",je,Oe]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Rl,ba]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,je,Hv]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wv,Oe]}],"font-family":[{font:[h6,Oe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,je,Oe]}],"line-clamp":[{"line-clamp":[He,"none",je,Hv]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",je,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",je,ba]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[He,"auto",je,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fi,je,Oe],radial:["",je,Oe],conic:[Fi,je,Oe]},m6,d6]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,je,Oe]}],"outline-w":[{outline:["",He,Rl,ba]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",d,Sf,_f]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",h,Sf,_f]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[He,ba]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",m,Sf,_f]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[He,je,Oe]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[je,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Oe]}],filter:[{filter:["","none",je,Oe]}],blur:[{blur:me()}],brightness:[{brightness:[He,je,Oe]}],contrast:[{contrast:[He,je,Oe]}],"drop-shadow":[{"drop-shadow":["","none",g,Sf,_f]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",He,je,Oe]}],"hue-rotate":[{"hue-rotate":[He,je,Oe]}],invert:[{invert:["",He,je,Oe]}],saturate:[{saturate:[He,je,Oe]}],sepia:[{sepia:["",He,je,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Oe]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[He,je,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[He,je,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,je,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,je,Oe]}],"backdrop-invert":[{"backdrop-invert":["",He,je,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[He,je,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[He,je,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",He,je,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",je,Oe]}],ease:[{ease:["linear","initial",S,je,Oe]}],delay:[{delay:[He,je,Oe]}],animate:[{animate:["none",O,je,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,je,Oe]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[je,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je,Oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",je,Oe]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[He,Rl,ba,Hv]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},x6=Z8(y6);function Ie(...e){return x6(Ue(e))}var Kc=cR();const b6=it(Kc);function Rj(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rs(...e){return t=>{let r=!1;const n=e.map(i=>{const a=Rj(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(O6);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function _6(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=E6(i),u=j6(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var S6=Symbol("radix.slottable");function O6(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S6}function j6(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function E6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var A6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=A6.reduce((e,t)=>{const r=w6(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function P6(e,t){e&&Kc.flushSync(()=>e.dispatchEvent(t))}var Rt=globalThis?.document?P.useLayoutEffect:()=>{};function N6(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}var Un=e=>{const{present:t,children:r}=e,n=C6(t),i=typeof r=="function"?r({present:n.isPresent}):P.Children.only(r),a=Je(n.ref,T6(i));return typeof r=="function"||n.isPresent?P.cloneElement(i,{ref:a}):null};Un.displayName="Presence";function C6(e){const[t,r]=P.useState(),n=P.useRef(null),i=P.useRef(e),a=P.useRef("none"),s=e?"mounted":"unmounted",[u,f]=N6(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=Of(n.current);a.current=u==="mounted"?c:"none"},[u]),Rt(()=>{const c=n.current,d=i.current;if(d!==e){const m=a.current,g=Of(c);e?f("MOUNT"):g==="none"||c?.display==="none"?f("UNMOUNT"):f(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Rt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,h=g=>{const y=Of(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&y&&(f("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=g=>{g.target===t&&(a.current=Of(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:P.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Of(e){return e?.animationName||"none"}function T6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function k6(e,t){const r=P.createContext(t),n=a=>{const{children:s,...u}=a,f=P.useMemo(()=>u,Object.values(u));return p.jsx(r.Provider,{value:f,children:s})};n.displayName=e+"Provider";function i(a){const s=P.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function gi(e,t=[]){let r=[];function n(a,s){const u=P.createContext(s),f=r.length;r=[...r,s];const c=h=>{const{scope:m,children:g,...b}=h,y=m?.[e]?.[f]||u,w=P.useMemo(()=>b,Object.values(b));return p.jsx(y.Provider,{value:w,children:g})};c.displayName=a+"Provider";function d(h,m){const g=m?.[e]?.[f]||u,b=P.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=r.map(s=>P.createContext(s));return function(u){const f=u?.[e]||a;return P.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,R6(i,...t)]}function R6(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((u,{useScope:f,scopeName:c})=>{const h=f(a)[`__scope${c}`];return{...u,...h}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function ar(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...r)=>t.current?.(...r),[])}var M6=P.createContext(void 0);function Kh(e){const t=P.useContext(M6);return e||t||"ltr"}function hb(e,[t,r]){return Math.min(r,Math.max(t,e))}function Fe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),r===!1||!i.defaultPrevented)return t?.(i)}}function I6(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}var ew="ScrollArea",[TR]=gi(ew),[D6,on]=TR(ew),kR=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:i,scrollHideDelay:a=600,...s}=e,[u,f]=P.useState(null),[c,d]=P.useState(null),[h,m]=P.useState(null),[g,b]=P.useState(null),[y,w]=P.useState(null),[S,O]=P.useState(0),[E,C]=P.useState(0),[A,N]=P.useState(!1),[T,R]=P.useState(!1),I=Je(t,L=>f(L)),q=Kh(i);return p.jsx(D6,{scope:r,type:n,dir:q,scrollHideDelay:a,scrollArea:u,viewport:c,onViewportChange:d,content:h,onContentChange:m,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:A,onScrollbarXEnabledChange:N,scrollbarY:y,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:O,onCornerHeightChange:C,children:p.jsx(We.div,{dir:q,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});kR.displayName=ew;var RR="ScrollAreaViewport",MR=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:i,...a}=e,s=on(RR,r),u=P.useRef(null),f=Je(t,u,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.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:i}),p.jsx(We.div,{"data-radix-scroll-area-viewport":"",...a,ref:f,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});MR.displayName=RR;var Wn="ScrollAreaScrollbar",IR=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=i,u=e.orientation==="horizontal";return P.useEffect(()=>(u?a(!0):s(!0),()=>{u?a(!1):s(!1)}),[u,a,s]),i.type==="hover"?p.jsx(L6,{...n,ref:t,forceMount:r}):i.type==="scroll"?p.jsx($6,{...n,ref:t,forceMount:r}):i.type==="auto"?p.jsx(DR,{...n,ref:t,forceMount:r}):i.type==="always"?p.jsx(tw,{...n,ref:t}):null});IR.displayName=Wn;var L6=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),[a,s]=P.useState(!1);return P.useEffect(()=>{const u=i.scrollArea;let f=0;if(u){const c=()=>{window.clearTimeout(f),s(!0)},d=()=>{f=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",c),u.addEventListener("pointerleave",d),()=>{window.clearTimeout(f),u.removeEventListener("pointerenter",c),u.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),p.jsx(Un,{present:r||a,children:p.jsx(DR,{"data-state":a?"visible":"hidden",...n,ref:t})})}),$6=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Yh(()=>f("SCROLL_END"),100),[u,f]=I6("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 P.useEffect(()=>{if(u==="idle"){const c=window.setTimeout(()=>f("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[u,i.scrollHideDelay,f]),P.useEffect(()=>{const c=i.viewport,d=a?"scrollLeft":"scrollTop";if(c){let h=c[d];const m=()=>{const g=c[d];h!==g&&(f("SCROLL"),s()),h=g};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[i.viewport,a,f,s]),p.jsx(Un,{present:r||u!=="hidden",children:p.jsx(tw,{"data-state":u==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Fe(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:Fe(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),DR=P.forwardRef((e,t)=>{const r=on(Wn,e.__scopeScrollArea),{forceMount:n,...i}=e,[a,s]=P.useState(!1),u=e.orientation==="horizontal",f=Yh(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,i=on(Wn,e.__scopeScrollArea),a=P.useRef(null),s=P.useRef(0),[u,f]=P.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=FR(u.viewport,u.content),d={...n,sizes:u,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function h(m,g){return W6(m,s.current,u,g)}return r==="horizontal"?p.jsx(B6,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollLeft,g=Mj(m,u,i.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=h(m,i.dir))}}):r==="vertical"?p.jsx(z6,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollTop,g=Mj(m,u);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=h(m))}}):null}),B6=P.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,a=on(Wn,e.__scopeScrollArea),[s,u]=P.useState(),f=P.useRef(null),c=Je(t,f,a.onScrollbarXChange);return P.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),p.jsx($R,{"data-orientation":"horizontal",...i,ref:c,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Xh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),UR(m,h)&&d.preventDefault()}},onResize:()=>{f.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Rd(s.paddingLeft),paddingEnd:Rd(s.paddingRight)}})}})}),z6=P.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,a=on(Wn,e.__scopeScrollArea),[s,u]=P.useState(),f=P.useRef(null),c=Je(t,f,a.onScrollbarYChange);return P.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),p.jsx($R,{"data-orientation":"vertical",...i,ref:c,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Xh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),UR(m,h)&&d.preventDefault()}},onResize:()=>{f.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Rd(s.paddingTop),paddingEnd:Rd(s.paddingBottom)}})}})}),[F6,LR]=TR(Wn),$R=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:i,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:u,onThumbPositionChange:f,onDragScroll:c,onWheelScroll:d,onResize:h,...m}=e,g=on(Wn,r),[b,y]=P.useState(null),w=Je(t,I=>y(I)),S=P.useRef(null),O=P.useRef(""),E=g.viewport,C=n.content-n.viewport,A=ar(d),N=ar(f),T=Yh(h,10);function R(I){if(S.current){const q=I.clientX-S.current.left,L=I.clientY-S.current.top;c({x:q,y:L})}}return P.useEffect(()=>{const I=q=>{const L=q.target;b?.contains(L)&&A(q,C)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[E,b,C,A]),P.useEffect(N,[n,N]),is(b,T),is(g.content,T),p.jsx(F6,{scope:r,scrollbar:b,hasThumb:i,onThumbChange:ar(a),onThumbPointerUp:ar(s),onThumbPositionChange:N,onThumbPointerDown:ar(u),children:p.jsx(We.div,{...m,ref:w,style:{position:"absolute",...m.style},onPointerDown:Fe(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),S.current=b.getBoundingClientRect(),O.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),R(I))}),onPointerMove:Fe(e.onPointerMove,R),onPointerUp:Fe(e.onPointerUp,I=>{const q=I.target;q.hasPointerCapture(I.pointerId)&&q.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=O.current,g.viewport&&(g.viewport.style.scrollBehavior=""),S.current=null})})})}),kd="ScrollAreaThumb",BR=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=LR(kd,e.__scopeScrollArea);return p.jsx(Un,{present:r||i.hasThumb,children:p.jsx(q6,{ref:t,...n})})}),q6=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...i}=e,a=on(kd,r),s=LR(kd,r),{onThumbPositionChange:u}=s,f=Je(t,h=>s.onThumbChange(h)),c=P.useRef(void 0),d=Yh(()=>{c.current&&(c.current(),c.current=void 0)},100);return P.useEffect(()=>{const h=a.viewport;if(h){const m=()=>{if(d(),!c.current){const g=H6(h,u);c.current=g,u()}};return u(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[a.viewport,d,u]),p.jsx(We.div,{"data-state":s.hasThumb?"visible":"hidden",...i,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Fe(e.onPointerDownCapture,h=>{const g=h.target.getBoundingClientRect(),b=h.clientX-g.left,y=h.clientY-g.top;s.onThumbPointerDown({x:b,y})}),onPointerUp:Fe(e.onPointerUp,s.onThumbPointerUp)})});BR.displayName=kd;var rw="ScrollAreaCorner",zR=P.forwardRef((e,t)=>{const r=on(rw,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?p.jsx(U6,{...e,ref:t}):null});zR.displayName=rw;var U6=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,i=on(rw,r),[a,s]=P.useState(0),[u,f]=P.useState(0),c=!!(a&&u);return is(i.scrollbarX,()=>{const d=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(d),f(d)}),is(i.scrollbarY,()=>{const d=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(d),s(d)}),c?p.jsx(We.div,{...n,ref:t,style:{width:a,height:u,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Rd(e){return e?parseInt(e,10):0}function FR(e,t){const r=e/t;return isNaN(r)?0:r}function Xh(e){const t=FR(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function W6(e,t,r,n="ltr"){const i=Xh(r),a=i/2,s=t||a,u=i-s,f=r.scrollbar.paddingStart+s,c=r.scrollbar.size-r.scrollbar.paddingEnd-u,d=r.content-r.viewport,h=n==="ltr"?[0,d]:[d*-1,0];return qR([f,c],h)(e)}function Mj(e,t,r="ltr"){const n=Xh(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,s=t.content-t.viewport,u=a-n,f=r==="ltr"?[0,s]:[s*-1,0],c=hb(e,f);return qR([0,s],[0,u])(c)}function qR(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function UR(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function i(){const a={left:e.scrollLeft,top:e.scrollTop},s=r.left!==a.left,u=r.top!==a.top;(s||u)&&t(),r=a,n=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(n)};function Yh(e,t){const r=ar(e),n=P.useRef(0);return P.useEffect(()=>()=>window.clearTimeout(n.current),[]),P.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function is(e,t){const r=ar(t);Rt(()=>{let n=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(n),i.unobserve(e)}}},[e,r])}var V6=kR,G6=MR,K6=zR;function fc({className:e,children:t,...r}){return p.jsxs(V6,{"data-slot":"scroll-area",className:Ie("relative",e),...r,children:[p.jsx(G6,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),p.jsx(X6,{}),p.jsx(K6,{})]})}function X6({className:e,orientation:t="vertical",...r}){return p.jsx(IR,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Ie("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:p.jsx(BR,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const Y6="/assets/773f0c39e1986271e9144596caac519f934a6ae6-Cou8J2R8.png";function Q6({currentView:e,setCurrentView:t}){const[r,n]=P.useState(!0),i=[{name:"Dashboard",icon:qB,type:"item"},{type:"header",name:"MODULES"},{name:"Labeling",icon:fb,type:"sub",isOpen:r,toggle:()=>n(!r),children:[{name:"Labels",icon:fb},{name:"Label Categories",icon:zB},{name:"Label Types",icon:Z1},{name:"Label Templates",icon:MB},{name:"Multiple Options",icon:vR}]},{type:"header",name:"MANAGEMENT"},{name:"Location Manager",icon:Gh,type:"item"},{name:"Account Management",icon:gR,type:"item"},{name:"Menu Manager",icon:ub,type:"item"},{name:"Reports",icon:uc,type:"item"},{name:"Support",icon:cb,type:"item"},{name:"Log Out",icon:VB,type:"item"}];return p.jsxs("div",{className:"w-64 bg-[#1e3a8a] text-white flex flex-col h-screen border-r border-blue-800 shadow-xl z-20 shrink-0",children:[p.jsx("div",{className:"flex items-center justify-center border-b border-blue-800/50 bg-white px-4 shrink-0",style:{height:90},children:p.jsx("img",{src:Y6,alt:"MedVantage",className:"h-16 w-auto object-contain"})}),p.jsx(fc,{className:"flex-1 py-4",children:p.jsx("div",{className:"px-3 space-y-1",children:i.map((a,s)=>a.type==="header"?p.jsx("div",{className:"px-4 py-2 mt-4 text-xs font-semibold text-blue-300 uppercase tracking-wider",children:a.name},s):a.type==="sub"?p.jsxs("div",{className:"space-y-1",children:[p.jsxs("button",{onClick:a.toggle,className:Ie("w-full flex items-center justify-between px-4 py-2.5 text-sm font-medium rounded-lg transition-colors","hover:bg-blue-800/50 text-blue-100"),children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(a.icon,{className:"w-4 h-4"}),a.name]}),a.isOpen?p.jsx(cc,{className:"w-4 h-4"}):p.jsx(Cd,{className:"w-4 h-4"})]}),a.isOpen&&p.jsx("div",{className:"pl-4 space-y-1",children:a.children?.map((u,f)=>p.jsxs("button",{onClick:()=>t(u.name),className:Ie("w-full flex items-center gap-3 px-4 py-2 text-sm font-medium rounded-lg transition-colors border-l-2",e===u.name?"bg-blue-800 border-blue-400 text-white":"border-transparent hover:bg-blue-800/30 text-blue-200 hover:text-white"),children:[p.jsx("div",{className:"w-1 h-1 rounded-full bg-current"}),u.name]},f))})]},s):p.jsxs("button",{onClick:()=>t(a.name),className:Ie("w-full flex items-center gap-3 px-4 py-2.5 text-sm font-medium rounded-lg transition-colors",e===a.name?"bg-blue-700 text-white shadow-md shadow-blue-900/20":a.name==="Log Out"?"text-red-300 hover:bg-red-900/20 hover:text-red-200":"text-blue-100 hover:bg-blue-800 hover:text-white"),children:[p.jsx(a.icon,{className:"w-4 h-4"}),a.name]},s))})})]})}function $e({className:e,type:t,...r}){return p.jsx("input",{type:t,"data-slot":"input",className:Ie("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}var Z6=Symbol.for("react.lazy"),Md=X1[" use ".trim().toString()];function J6(e){return typeof e=="object"&&e!==null&&"then"in e}function WR(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Z6&&"_payload"in e&&J6(e._payload)}function nw(e){const t=ez(e),r=P.forwardRef((n,i)=>{let{children:a,...s}=n;WR(a)&&typeof Md=="function"&&(a=Md(a._payload));const u=P.Children.toArray(a),f=u.find(rz);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var HR=nw("Slot");function ez(e){const t=P.forwardRef((r,n)=>{let{children:i,...a}=r;if(WR(i)&&typeof Md=="function"&&(i=Md(i._payload)),P.isValidElement(i)){const s=iz(i),u=nz(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tz=Symbol("radix.slottable");function rz(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tz}function nz(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function iz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const Ij=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dj=Ue,VR=(e,t)=>r=>{var n;if(t?.variants==null)return Dj(e,r?.class,r?.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(c=>{const d=r?.[c],h=a?.[c];if(d===null)return null;const m=Ij(d)||Ij(h);return i[c][m]}),u=r&&Object.entries(r).reduce((c,d)=>{let[h,m]=d;return m===void 0||(c[h]=m),c},{}),f=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:h,className:m,...g}=d;return Object.entries(g).every(b=>{let[y,w]=b;return Array.isArray(w)?w.includes({...a,...u}[y]):{...a,...u}[y]===w})?[...c,h,m]:c},[]);return Dj(e,s,f,r?.class,r?.className)},az=VR("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9 rounded-md"}},defaultVariants:{variant:"default",size:"default"}});function Ne({className:e,variant:t,size:r,asChild:n=!1,...i}){const a=n?HR:"button";return p.jsx(a,{"data-slot":"button",className:Ie(az({variant:t,size:r,className:e})),...i})}function oz(e,t=[]){let r=[];function n(a,s){const u=P.createContext(s);u.displayName=a+"Context";const f=r.length;r=[...r,s];const c=h=>{const{scope:m,children:g,...b}=h,y=m?.[e]?.[f]||u,w=P.useMemo(()=>b,Object.values(b));return p.jsx(y.Provider,{value:w,children:g})};c.displayName=a+"Provider";function d(h,m){const g=m?.[e]?.[f]||u,b=P.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=r.map(s=>P.createContext(s));return function(u){const f=u?.[e]||a;return P.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,sz(i,...t)]}function sz(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((u,{useScope:f,scopeName:c})=>{const h=f(a)[`__scope${c}`];return{...u,...h}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var lz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],iw=lz.reduce((e,t)=>{const r=nw(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Vv={exports:{}},Gv={};/** * @license React * use-sync-external-store-shim.production.js * @@ -335,7 +335,7 @@ Error generating stack: `+j.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Lj;function cz(){if(Lj)return Gv;Lj=1;var e=Vh();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function u(h,m){var g=m(),b=n({inst:{value:g,getSnapshot:m}}),y=b[0].inst,w=b[1];return a(function(){y.value=g,y.getSnapshot=m,f(y)&&w({inst:y})},[h,g,m]),i(function(){return f(y)&&w({inst:y}),h(function(){f(y)&&w({inst:y})})},[h]),s(g),g}function f(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!r(h,g)}catch{return!0}}function c(h,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:u;return Gv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Gv}var $j;function uz(){return $j||($j=1,Vv.exports=cz()),Vv.exports}var fz=uz();function dz(){return fz.useSyncExternalStore(hz,()=>!0,()=>!1)}function hz(){return()=>{}}var aw="Avatar",[pz]=oz(aw),[mz,GR]=pz(aw),KR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[i,a]=P.useState("idle");return p.jsx(mz,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:p.jsx(iw.span,{...n,ref:t})})});KR.displayName=aw;var XR="AvatarImage",YR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:i=()=>{},...a}=e,s=GR(XR,r),u=vz(n,a),f=ar(c=>{i(c),s.onImageLoadingStatusChange(c)});return Rt(()=>{u!=="idle"&&f(u)},[u,f]),u==="loaded"?p.jsx(iw.img,{...a,ref:t,src:n}):null});YR.displayName=XR;var QR="AvatarFallback",ZR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...i}=e,a=GR(QR,r),[s,u]=P.useState(n===void 0);return P.useEffect(()=>{if(n!==void 0){const f=window.setTimeout(()=>u(!0),n);return()=>window.clearTimeout(f)}},[n]),s&&a.imageLoadingStatus!=="loaded"?p.jsx(iw.span,{...i,ref:t}):null});ZR.displayName=QR;function Bj(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function vz(e,{referrerPolicy:t,crossOrigin:r}){const n=dz(),i=P.useRef(null),a=n?(i.current||(i.current=new window.Image),i.current):null,[s,u]=P.useState(()=>Bj(a,e));return Rt(()=>{u(Bj(a,e))},[a,e]),Rt(()=>{const f=h=>()=>{u(h)};if(!a)return;const c=f("loaded"),d=f("error");return a.addEventListener("load",c),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",c),a.removeEventListener("error",d)}},[a,r,t]),s}var gz=KR,yz=YR,xz=ZR;function bz({className:e,...t}){return p.jsx(gz,{"data-slot":"avatar",className:Ie("relative flex size-10 shrink-0 overflow-hidden rounded-full",e),...t})}function wz({className:e,...t}){return p.jsx(yz,{"data-slot":"avatar-image",className:Ie("aspect-square size-full",e),...t})}function _z({className:e,...t}){return p.jsx(xz,{"data-slot":"avatar-fallback",className:Ie("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function Sz({title:e}){const t=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return p.jsxs("header",{className:"bg-white border-b border-gray-200 px-8 flex items-center justify-between shadow-sm sticky top-0 z-10 shrink-0",style:{height:90},children:[p.jsxs("div",{children:[p.jsxs("h1",{className:"text-2xl font-bold",style:{color:"rgb(43, 50, 143)"},children:[e," Overview"]}),p.jsxs("p",{className:"text-sm text-gray-500 mt-1 flex items-center gap-2",children:[t," | Last updated: Just now"]})]}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center w-64 h-9 rounded-md border border-gray-200 bg-gray-50 focus-within:bg-white focus-within:ring-2 focus-within:ring-ring/50 focus-within:border-ring transition-colors overflow-hidden",children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-3 pointer-events-none"}),p.jsx(Be,{type:"search",placeholder:"Search...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full"})]}),p.jsx(Ne,{variant:"ghost",size:"icon",className:"text-gray-500 hover:text-gray-700",children:p.jsx(vR,{className:"w-5 h-5"})}),p.jsx("div",{className:"h-8 w-px bg-gray-200 mx-2"}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{className:"text-right hidden md:block",children:[p.jsx("div",{className:"text-sm font-medium text-gray-900",children:"Admin User"}),p.jsx("div",{className:"text-xs text-gray-500",children:"Administrator"})]}),p.jsxs(bz,{className:"h-10 w-10 border border-gray-200",children:[p.jsx(wz,{src:"https://github.com/shadcn.png"}),p.jsx(_z,{children:"AD"})]})]})]})]})}function Oz({children:e,currentView:t,setCurrentView:r}){return p.jsxs("div",{className:"flex h-screen bg-gray-50 overflow-hidden font-sans",children:[p.jsx(Q6,{currentView:t,setCurrentView:r}),p.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[p.jsx(Sz,{title:t}),p.jsx("div",{className:"px-8 mt-8 shrink-0",children:p.jsxs("nav",{className:"flex items-center gap-2 text-sm font-normal","aria-label":"Breadcrumb",children:[p.jsx("button",{type:"button",onClick:()=>r("Dashboard"),className:"text-gray-500 hover:text-gray-700 transition-colors",children:"Home"}),p.jsx(Cd,{className:"w-4 h-4 text-gray-500 shrink-0"}),p.jsx("span",{style:{color:"rgb(43, 50, 143)"},children:t})]})}),p.jsx("main",{className:"flex-1 overflow-y-auto p-8",children:p.jsx("div",{className:"w-full h-full",children:e})})]})]})}function Ir({className:e,...t}){return p.jsx("div",{"data-slot":"card",className:Ie("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border",e),...t})}function yn({className:e,...t}){return p.jsx("div",{"data-slot":"card-header",className:Ie("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function xn({className:e,...t}){return p.jsx("h4",{"data-slot":"card-title",className:Ie("leading-none",e),...t})}function Id({className:e,...t}){return p.jsx("p",{"data-slot":"card-description",className:Ie("text-muted-foreground",e),...t})}function tn({className:e,...t}){return p.jsx("div",{"data-slot":"card-content",className:Ie("px-6 [&:last-child]:pb-6",e),...t})}const jz=VR("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Rn({className:e,variant:t,asChild:r=!1,...n}){const i=r?HR:"span";return p.jsx(i,{"data-slot":"badge",className:Ie(jz({variant:t}),e),...n})}var Kv,zj;function Sr(){if(zj)return Kv;zj=1;var e=Array.isArray;return Kv=e,Kv}var Xv,Fj;function JR(){if(Fj)return Xv;Fj=1;var e=typeof bf=="object"&&bf&&bf.Object===Object&&bf;return Xv=e,Xv}var Yv,qj;function Hn(){if(qj)return Yv;qj=1;var e=JR(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Yv=r,Yv}var Qv,Uj;function Xc(){if(Uj)return Qv;Uj=1;var e=Hn(),t=e.Symbol;return Qv=t,Qv}var Zv,Wj;function Ez(){if(Wj)return Zv;Wj=1;var e=Xc(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(s){var u=r.call(s,i),f=s[i];try{s[i]=void 0;var c=!0}catch{}var d=n.call(s);return c&&(u?s[i]=f:delete s[i]),d}return Zv=a,Zv}var Jv,Hj;function Az(){if(Hj)return Jv;Hj=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Jv=r,Jv}var eg,Vj;function yi(){if(Vj)return eg;Vj=1;var e=Xc(),t=Ez(),r=Az(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function s(u){return u==null?u===void 0?i:n:a&&a in Object(u)?t(u):r(u)}return eg=s,eg}var tg,Gj;function xi(){if(Gj)return tg;Gj=1;function e(t){return t!=null&&typeof t=="object"}return tg=e,tg}var rg,Kj;function Ms(){if(Kj)return rg;Kj=1;var e=yi(),t=xi(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return rg=n,rg}var ng,Xj;function ow(){if(Xj)return ng;Xj=1;var e=Sr(),t=Ms(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(e(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return ng=i,ng}var ig,Yj;function Qi(){if(Yj)return ig;Yj=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return ig=e,ig}var ag,Qj;function sw(){if(Qj)return ag;Qj=1;var e=yi(),t=Qi(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!t(u))return!1;var f=e(u);return f==n||f==i||f==r||f==a}return ag=s,ag}var og,Zj;function Pz(){if(Zj)return og;Zj=1;var e=Hn(),t=e["__core-js_shared__"];return og=t,og}var sg,Jj;function Nz(){if(Jj)return sg;Jj=1;var e=Pz(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return sg=r,sg}var lg,eE;function eM(){if(eE)return lg;eE=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return lg=r,lg}var cg,tE;function Cz(){if(tE)return cg;tE=1;var e=sw(),t=Nz(),r=Qi(),n=eM(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,f=s.toString,c=u.hasOwnProperty,d=RegExp("^"+f.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!r(m)||t(m))return!1;var g=e(m)?d:a;return g.test(n(m))}return cg=h,cg}var ug,rE;function Tz(){if(rE)return ug;rE=1;function e(t,r){return t?.[r]}return ug=e,ug}var fg,nE;function Ya(){if(nE)return fg;nE=1;var e=Cz(),t=Tz();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return fg=r,fg}var dg,iE;function Qh(){if(iE)return dg;iE=1;var e=Ya(),t=e(Object,"create");return dg=t,dg}var hg,aE;function kz(){if(aE)return hg;aE=1;var e=Qh();function t(){this.__data__=e?e(null):{},this.size=0}return hg=t,hg}var pg,oE;function Rz(){if(oE)return pg;oE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return pg=e,pg}var mg,sE;function Mz(){if(sE)return mg;sE=1;var e=Qh(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var s=this.__data__;if(e){var u=s[a];return u===t?void 0:u}return n.call(s,a)?s[a]:void 0}return mg=i,mg}var vg,lE;function Iz(){if(lE)return vg;lE=1;var e=Qh(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return vg=n,vg}var gg,cE;function Dz(){if(cE)return gg;cE=1;var e=Qh(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return gg=r,gg}var yg,uE;function Lz(){if(uE)return yg;uE=1;var e=kz(),t=Rz(),r=Mz(),n=Iz(),i=Dz();function a(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u-1}return Og=t,Og}var jg,gE;function qz(){if(gE)return jg;gE=1;var e=Zh();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return jg=t,jg}var Eg,yE;function Jh(){if(yE)return Eg;yE=1;var e=$z(),t=Bz(),r=zz(),n=Fz(),i=qz();function a(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:u;return Gv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Gv}var $j;function uz(){return $j||($j=1,Vv.exports=cz()),Vv.exports}var fz=uz();function dz(){return fz.useSyncExternalStore(hz,()=>!0,()=>!1)}function hz(){return()=>{}}var aw="Avatar",[pz]=oz(aw),[mz,GR]=pz(aw),KR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[i,a]=P.useState("idle");return p.jsx(mz,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:p.jsx(iw.span,{...n,ref:t})})});KR.displayName=aw;var XR="AvatarImage",YR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:i=()=>{},...a}=e,s=GR(XR,r),u=vz(n,a),f=ar(c=>{i(c),s.onImageLoadingStatusChange(c)});return Rt(()=>{u!=="idle"&&f(u)},[u,f]),u==="loaded"?p.jsx(iw.img,{...a,ref:t,src:n}):null});YR.displayName=XR;var QR="AvatarFallback",ZR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...i}=e,a=GR(QR,r),[s,u]=P.useState(n===void 0);return P.useEffect(()=>{if(n!==void 0){const f=window.setTimeout(()=>u(!0),n);return()=>window.clearTimeout(f)}},[n]),s&&a.imageLoadingStatus!=="loaded"?p.jsx(iw.span,{...i,ref:t}):null});ZR.displayName=QR;function Bj(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function vz(e,{referrerPolicy:t,crossOrigin:r}){const n=dz(),i=P.useRef(null),a=n?(i.current||(i.current=new window.Image),i.current):null,[s,u]=P.useState(()=>Bj(a,e));return Rt(()=>{u(Bj(a,e))},[a,e]),Rt(()=>{const f=h=>()=>{u(h)};if(!a)return;const c=f("loaded"),d=f("error");return a.addEventListener("load",c),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",c),a.removeEventListener("error",d)}},[a,r,t]),s}var gz=KR,yz=YR,xz=ZR;function bz({className:e,...t}){return p.jsx(gz,{"data-slot":"avatar",className:Ie("relative flex size-10 shrink-0 overflow-hidden rounded-full",e),...t})}function wz({className:e,...t}){return p.jsx(yz,{"data-slot":"avatar-image",className:Ie("aspect-square size-full",e),...t})}function _z({className:e,...t}){return p.jsx(xz,{"data-slot":"avatar-fallback",className:Ie("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function Sz({title:e}){const t=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return p.jsxs("header",{className:"bg-white border-b border-gray-200 px-8 flex items-center justify-between shadow-sm sticky top-0 z-10 shrink-0",style:{height:90},children:[p.jsxs("div",{children:[p.jsxs("h1",{className:"text-2xl font-bold",style:{color:"rgb(43, 50, 143)"},children:[e," Overview"]}),p.jsxs("p",{className:"text-sm text-gray-500 mt-1 flex items-center gap-2",children:[t," | Last updated: Just now"]})]}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center w-64 h-9 rounded-md border border-gray-200 bg-gray-50 focus-within:bg-white focus-within:ring-2 focus-within:ring-ring/50 focus-within:border-ring transition-colors overflow-hidden",children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-3 pointer-events-none"}),p.jsx($e,{type:"search",placeholder:"Search...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full"})]}),p.jsx(Ne,{variant:"ghost",size:"icon",className:"text-gray-500 hover:text-gray-700",children:p.jsx(vR,{className:"w-5 h-5"})}),p.jsx("div",{className:"h-8 w-px bg-gray-200 mx-2"}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{className:"text-right hidden md:block",children:[p.jsx("div",{className:"text-sm font-medium text-gray-900",children:"Admin User"}),p.jsx("div",{className:"text-xs text-gray-500",children:"Administrator"})]}),p.jsxs(bz,{className:"h-10 w-10 border border-gray-200",children:[p.jsx(wz,{src:"https://github.com/shadcn.png"}),p.jsx(_z,{children:"AD"})]})]})]})]})}function Oz({children:e,currentView:t,setCurrentView:r}){return p.jsxs("div",{className:"flex h-screen bg-gray-50 overflow-hidden font-sans",children:[p.jsx(Q6,{currentView:t,setCurrentView:r}),p.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[p.jsx(Sz,{title:t}),p.jsx("div",{className:"px-8 mt-8 shrink-0",children:p.jsxs("nav",{className:"flex items-center gap-2 text-sm font-normal","aria-label":"Breadcrumb",children:[p.jsx("button",{type:"button",onClick:()=>r("Dashboard"),className:"text-gray-500 hover:text-gray-700 transition-colors",children:"Home"}),p.jsx(Cd,{className:"w-4 h-4 text-gray-500 shrink-0"}),p.jsx("span",{style:{color:"rgb(43, 50, 143)"},children:t})]})}),p.jsx("main",{className:"flex-1 overflow-y-auto p-8",children:p.jsx("div",{className:"w-full h-full",children:e})})]})]})}function Ir({className:e,...t}){return p.jsx("div",{"data-slot":"card",className:Ie("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border",e),...t})}function yn({className:e,...t}){return p.jsx("div",{"data-slot":"card-header",className:Ie("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function xn({className:e,...t}){return p.jsx("h4",{"data-slot":"card-title",className:Ie("leading-none",e),...t})}function Id({className:e,...t}){return p.jsx("p",{"data-slot":"card-description",className:Ie("text-muted-foreground",e),...t})}function tn({className:e,...t}){return p.jsx("div",{"data-slot":"card-content",className:Ie("px-6 [&:last-child]:pb-6",e),...t})}const jz=VR("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Rn({className:e,variant:t,asChild:r=!1,...n}){const i=r?HR:"span";return p.jsx(i,{"data-slot":"badge",className:Ie(jz({variant:t}),e),...n})}var Kv,zj;function Sr(){if(zj)return Kv;zj=1;var e=Array.isArray;return Kv=e,Kv}var Xv,Fj;function JR(){if(Fj)return Xv;Fj=1;var e=typeof bf=="object"&&bf&&bf.Object===Object&&bf;return Xv=e,Xv}var Yv,qj;function Hn(){if(qj)return Yv;qj=1;var e=JR(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Yv=r,Yv}var Qv,Uj;function Xc(){if(Uj)return Qv;Uj=1;var e=Hn(),t=e.Symbol;return Qv=t,Qv}var Zv,Wj;function Ez(){if(Wj)return Zv;Wj=1;var e=Xc(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(s){var u=r.call(s,i),f=s[i];try{s[i]=void 0;var c=!0}catch{}var d=n.call(s);return c&&(u?s[i]=f:delete s[i]),d}return Zv=a,Zv}var Jv,Hj;function Az(){if(Hj)return Jv;Hj=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Jv=r,Jv}var eg,Vj;function yi(){if(Vj)return eg;Vj=1;var e=Xc(),t=Ez(),r=Az(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function s(u){return u==null?u===void 0?i:n:a&&a in Object(u)?t(u):r(u)}return eg=s,eg}var tg,Gj;function xi(){if(Gj)return tg;Gj=1;function e(t){return t!=null&&typeof t=="object"}return tg=e,tg}var rg,Kj;function Ms(){if(Kj)return rg;Kj=1;var e=yi(),t=xi(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return rg=n,rg}var ng,Xj;function ow(){if(Xj)return ng;Xj=1;var e=Sr(),t=Ms(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(e(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return ng=i,ng}var ig,Yj;function Qi(){if(Yj)return ig;Yj=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return ig=e,ig}var ag,Qj;function sw(){if(Qj)return ag;Qj=1;var e=yi(),t=Qi(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!t(u))return!1;var f=e(u);return f==n||f==i||f==r||f==a}return ag=s,ag}var og,Zj;function Pz(){if(Zj)return og;Zj=1;var e=Hn(),t=e["__core-js_shared__"];return og=t,og}var sg,Jj;function Nz(){if(Jj)return sg;Jj=1;var e=Pz(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return sg=r,sg}var lg,eE;function eM(){if(eE)return lg;eE=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return lg=r,lg}var cg,tE;function Cz(){if(tE)return cg;tE=1;var e=sw(),t=Nz(),r=Qi(),n=eM(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,f=s.toString,c=u.hasOwnProperty,d=RegExp("^"+f.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!r(m)||t(m))return!1;var g=e(m)?d:a;return g.test(n(m))}return cg=h,cg}var ug,rE;function Tz(){if(rE)return ug;rE=1;function e(t,r){return t?.[r]}return ug=e,ug}var fg,nE;function Ya(){if(nE)return fg;nE=1;var e=Cz(),t=Tz();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return fg=r,fg}var dg,iE;function Qh(){if(iE)return dg;iE=1;var e=Ya(),t=e(Object,"create");return dg=t,dg}var hg,aE;function kz(){if(aE)return hg;aE=1;var e=Qh();function t(){this.__data__=e?e(null):{},this.size=0}return hg=t,hg}var pg,oE;function Rz(){if(oE)return pg;oE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return pg=e,pg}var mg,sE;function Mz(){if(sE)return mg;sE=1;var e=Qh(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var s=this.__data__;if(e){var u=s[a];return u===t?void 0:u}return n.call(s,a)?s[a]:void 0}return mg=i,mg}var vg,lE;function Iz(){if(lE)return vg;lE=1;var e=Qh(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return vg=n,vg}var gg,cE;function Dz(){if(cE)return gg;cE=1;var e=Qh(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return gg=r,gg}var yg,uE;function Lz(){if(uE)return yg;uE=1;var e=kz(),t=Rz(),r=Mz(),n=Iz(),i=Dz();function a(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u-1}return Og=t,Og}var jg,gE;function qz(){if(gE)return jg;gE=1;var e=Zh();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return jg=t,jg}var Eg,yE;function Jh(){if(yE)return Eg;yE=1;var e=$z(),t=Bz(),r=zz(),n=Fz(),i=qz();function a(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Qa.isSsr)return{width:0,height:0};var n=dU(r),i=JSON.stringify({text:t,copyStyle:n});if(To.widthCache[i])return To.widthCache[i];try{var a=document.getElementById(xP);a||(a=document.createElement("span"),a.setAttribute("id",xP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=kb(kb({},fU),n);Object.assign(a.style,s),a.textContent="".concat(t);var u=a.getBoundingClientRect(),f={width:u.width,height:u.height};return To.widthCache[i]=f,++To.cacheCount>uU&&(To.cacheCount=0,To.widthCache={}),f}catch{return{width:0,height:0}}},hU=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}function Kd(e,t){return gU(e)||vU(e,t)||mU(e,t)||pU()}function pU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mU(e,t){if(e){if(typeof e=="string")return bP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bP(e,t)}}function bP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TU(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function EP(e,t){return IU(e)||MU(e,t)||RU(e,t)||kU()}function kU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RU(e,t){if(e){if(typeof e=="string")return AP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return AP(e,t)}}function AP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(K,X){var B=X.word,Z=X.width,ee=K[K.length-1];if(ee&&(i==null||a||ee.width+Z+nX.width?K:X})};if(!d)return g;for(var y="…",w=function(V){var K=h.slice(0,V),X=rI({breakAll:c,style:f,children:K+y}).wordsWithComputedWidth,B=m(X),Z=B.length>s||b(B).width>Number(i);return[Z,B]},S=0,O=h.length-1,E=0,C;S<=O&&E<=h.length-1;){var A=Math.floor((S+O)/2),N=A-1,T=w(N),R=EP(T,2),I=R[0],q=R[1],L=w(A),D=EP(L,1),U=D[0];if(!I&&!U&&(S=A+1),I&&U&&(O=A-1),!I&&U){C=q;break}E++}return C||g},PP=function(t){var r=qe(t)?[]:t.toString().split(tI);return[{words:r}]},LU=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,s=t.breakAll,u=t.maxLines;if((r||n)&&!Qa.isSsr){var f,c,d=rI({breakAll:s,children:i,style:a});if(d){var h=d.wordsWithComputedWidth,m=d.spaceWidth;f=h,c=m}else return PP(i);return DU({breakAll:s,children:i,maxLines:u,style:a},f,c,r,n)}return PP(i)},NP="#808080",$a=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,s=t.lineHeight,u=s===void 0?"1em":s,f=t.capHeight,c=f===void 0?"0.71em":f,d=t.scaleToFit,h=d===void 0?!1:d,m=t.textAnchor,g=m===void 0?"start":m,b=t.verticalAnchor,y=b===void 0?"end":b,w=t.fill,S=w===void 0?NP:w,O=jP(t,NU),E=P.useMemo(function(){return LU({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:h,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,h,O.style,O.width]),C=O.dx,A=O.dy,N=O.angle,T=O.className,R=O.breakAll,I=jP(O,CU);if(!zt(n)||!zt(a))return null;var q=n+(he(C)?C:0),L=a+(he(A)?A:0),D;switch(y){case"start":D=ex("calc(".concat(c,")"));break;case"middle":D=ex("calc(".concat((E.length-1)/2," * -").concat(u," + (").concat(c," / 2))"));break;default:D=ex("calc(".concat(E.length-1," * -").concat(u,")"));break}var U=[];if(h){var H=E[0].width,V=O.width;U.push("scale(".concat((he(V)?V/H:1)/H,")"))}return N&&U.push("rotate(".concat(N,", ").concat(q,", ").concat(L,")")),U.length&&(I.transform=U.join(" ")),z.createElement("text",Rb({},Me(I,!0),{x:q,y:L,className:Ue("recharts-text",T),textAnchor:g,fill:S.includes("url")?NP:S}),E.map(function(K,X){var B=K.words.join(R?"":" ");return z.createElement("tspan",{x:q,dy:X===0?D:u,key:"".concat(B,"-").concat(X)},B)}))};function Vi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function $U(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Pw(e){let t,r,n;e.length!==2?(t=Vi,r=(u,f)=>Vi(e(u),f),n=(u,f)=>e(u)-f):(t=e===Vi||e===$U?e:BU,r=e,n=e);function i(u,f,c=0,d=u.length){if(c>>1;r(u[h],f)<0?c=h+1:d=h}while(c>>1;r(u[h],f)<=0?c=h+1:d=h}while(cc&&n(u[h-1],f)>-n(u[h],f)?h-1:h}return{left:i,center:s,right:a}}function BU(){return 0}function nI(e){return e===null?NaN:+e}function*zU(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const FU=Pw(Vi),Zc=FU.right;Pw(nI).center;class CP extends Map{constructor(t,r=WU){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(TP(this,t))}has(t){return super.has(TP(this,t))}set(t,r){return super.set(qU(this,t),r)}delete(t){return super.delete(UU(this,t))}}function TP({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function qU({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function UU({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function WU(e){return e!==null&&typeof e=="object"?e.valueOf():e}function HU(e=Vi){if(e===Vi)return iI;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function iI(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const VU=Math.sqrt(50),GU=Math.sqrt(10),KU=Math.sqrt(2);function Xd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=VU?10:a>=GU?5:a>=KU?2:1;let u,f,c;return i<0?(c=Math.pow(10,-i)/s,u=Math.round(e*c),f=Math.round(t*c),u/ct&&--f,c=-c):(c=Math.pow(10,i)*s,u=Math.round(e/c),f=Math.round(t/c),u*ct&&--f),f0))return[];if(e===t)return[e];const n=t=i))return[];const u=a-i+1,f=new Array(u);if(n)if(s<0)for(let c=0;c=n)&&(r=n);return r}function RP(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function aI(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?iI:HU(i);n>r;){if(n-r>600){const f=n-r+1,c=t-r+1,d=Math.log(f),h=.5*Math.exp(2*d/3),m=.5*Math.sqrt(d*h*(f-h)/f)*(c-f/2<0?-1:1),g=Math.max(r,Math.floor(t-c*h/f+m)),b=Math.min(n,Math.floor(t+(f-c)*h/f+m));aI(e,t,g,b,i)}const a=e[t];let s=r,u=n;for(Il(e,r,t),i(e[n],a)>0&&Il(e,r,n);s0;)--u}i(e[r],a)===0?Il(e,r,u):(++u,Il(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function Il(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function XU(e,t,r){if(e=Float64Array.from(zU(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return RP(e);if(t>=1)return kP(e);var n,i=(n-1)*t,a=Math.floor(i),s=kP(aI(e,a).subarray(0,a+1)),u=RP(e.subarray(a+1));return s+(u-s)*(i-a)}}function YU(e,t,r=nI){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),s=+r(e[a],a,e),u=+r(e[a+1],a+1,e);return s+(u-s)*(i-a)}}function QU(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Nf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Nf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=JU.exec(e))?new xr(t[1],t[2],t[3],1):(t=eW.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tW.exec(e))?Nf(t[1],t[2],t[3],t[4]):(t=rW.exec(e))?Nf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nW.exec(e))?zP(t[1],t[2]/100,t[3]/100,1):(t=iW.exec(e))?zP(t[1],t[2]/100,t[3]/100,t[4]):MP.hasOwnProperty(e)?LP(MP[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function LP(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function Nf(e,t,r,n){return n<=0&&(e=t=r=NaN),new xr(e,t,r,n)}function sW(e){return e instanceof Jc||(e=_c(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function $b(e,t,r,n){return arguments.length===1?sW(e):new xr(e,t,r,n??1)}function xr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Cw(xr,$b,sI(Jc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bc:Math.pow(bc,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(Ra(this.r),Ra(this.g),Ra(this.b),Qd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$P,formatHex:$P,formatHex8:lW,formatRgb:BP,toString:BP}));function $P(){return`#${Ca(this.r)}${Ca(this.g)}${Ca(this.b)}`}function lW(){return`#${Ca(this.r)}${Ca(this.g)}${Ca(this.b)}${Ca((isNaN(this.opacity)?1:this.opacity)*255)}`}function BP(){const e=Qd(this.opacity);return`${e===1?"rgb(":"rgba("}${Ra(this.r)}, ${Ra(this.g)}, ${Ra(this.b)}${e===1?")":`, ${e})`}`}function Qd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ra(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ca(e){return e=Ra(e),(e<16?"0":"")+e.toString(16)}function zP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new _n(e,t,r,n)}function lI(e){if(e instanceof _n)return new _n(e.h,e.s,e.l,e.opacity);if(e instanceof Jc||(e=_c(e)),!e)return new _n;if(e instanceof _n)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,u=a-i,f=(a+i)/2;return u?(t===a?s=(r-n)/u+(r0&&f<1?0:s,new _n(s,u,f,e.opacity)}function cW(e,t,r,n){return arguments.length===1?lI(e):new _n(e,t,r,n??1)}function _n(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Cw(_n,cW,sI(Jc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new _n(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bc:Math.pow(bc,e),new _n(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new xr(tx(e>=240?e-240:e+120,i,n),tx(e,i,n),tx(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new _n(FP(this.h),Cf(this.s),Cf(this.l),Qd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qd(this.opacity);return`${e===1?"hsl(":"hsla("}${FP(this.h)}, ${Cf(this.s)*100}%, ${Cf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FP(e){return e=(e||0)%360,e<0?e+360:e}function Cf(e){return Math.max(0,Math.min(1,e||0))}function tx(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Tw=e=>()=>e;function uW(e,t){return function(r){return e+r*t}}function fW(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function dW(e){return(e=+e)==1?cI:function(t,r){return r-t?fW(t,r,e):Tw(isNaN(t)?r:t)}}function cI(e,t){var r=t-e;return r?uW(e,r):Tw(isNaN(e)?t:e)}const qP=(function e(t){var r=dW(t);function n(i,a){var s=r((i=$b(i)).r,(a=$b(a)).r),u=r(i.g,a.g),f=r(i.b,a.b),c=cI(i.opacity,a.opacity);return function(d){return i.r=s(d),i.g=u(d),i.b=f(d),i.opacity=c(d),i+""}}return n.gamma=e,n})(1);function hW(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),u[s]?u[s]+=a:u[++s]=a),(n=n[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,f.push({i:s,x:Zd(n,i)})),r=rx.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function OW(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i2?jW:OW,f=c=null,h}function h(m){return m==null||isNaN(m=+m)?a:(f||(f=u(e.map(n),t,r)))(n(s(m)))}return h.invert=function(m){return s(i((c||(c=u(t,e.map(n),Zd)))(m)))},h.domain=function(m){return arguments.length?(e=Array.from(m,Jd),d()):e.slice()},h.range=function(m){return arguments.length?(t=Array.from(m),d()):t.slice()},h.rangeRound=function(m){return t=Array.from(m),r=kw,d()},h.clamp=function(m){return arguments.length?(s=m?!0:fr,d()):s!==fr},h.interpolate=function(m){return arguments.length?(r=m,d()):r},h.unknown=function(m){return arguments.length?(a=m,h):a},function(m,g){return n=m,i=g,d()}}function Rw(){return up()(fr,fr)}function EW(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function eh(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function us(e){return e=eh(Math.abs(e)),e?e[1]:NaN}function AW(e,t){return function(r,n){for(var i=r.length,a=[],s=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>n&&(u=Math.max(1,n-f)),a.push(r.substring(i-=u,i+u)),!((f+=u+1)>n));)u=e[s=(s+1)%e.length];return a.reverse().join(t)}}function PW(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var NW=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sc(e){if(!(t=NW.exec(e)))throw new Error("invalid format: "+e);var t;return new Mw({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Sc.prototype=Mw.prototype;function Mw(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Mw.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function CW(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var th;function TW(e,t){var r=eh(e,t);if(!r)return th=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(th=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+eh(e,Math.max(0,t+a-1))[0]}function WP(e,t){var r=eh(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const HP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:EW,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>WP(e*100,t),r:WP,s:TW,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function VP(e){return e}var GP=Array.prototype.map,KP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kW(e){var t=e.grouping===void 0||e.thousands===void 0?VP:AW(GP.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?VP:PW(GP.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(h,m){h=Sc(h);var g=h.fill,b=h.align,y=h.sign,w=h.symbol,S=h.zero,O=h.width,E=h.comma,C=h.precision,A=h.trim,N=h.type;N==="n"?(E=!0,N="g"):HP[N]||(C===void 0&&(C=12),A=!0,N="g"),(S||g==="0"&&b==="=")&&(S=!0,g="0",b="=");var T=(m&&m.prefix!==void 0?m.prefix:"")+(w==="$"?r:w==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():""),R=(w==="$"?n:/[%p]/.test(N)?s:"")+(m&&m.suffix!==void 0?m.suffix:""),I=HP[N],q=/[defgprs%]/.test(N);C=C===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function L(D){var U=T,H=R,V,K,X;if(N==="c")H=I(D)+H,D="";else{D=+D;var B=D<0||1/D<0;if(D=isNaN(D)?f:I(Math.abs(D),C),A&&(D=CW(D)),B&&+D==0&&y!=="+"&&(B=!1),U=(B?y==="("?y:u:y==="-"||y==="("?"":y)+U,H=(N==="s"&&!isNaN(D)&&th!==void 0?KP[8+th/3]:"")+H+(B&&y==="("?")":""),q){for(V=-1,K=D.length;++VX||X>57){H=(X===46?i+D.slice(V+1):D.slice(V))+H,D=D.slice(0,V);break}}}E&&!S&&(D=t(D,1/0));var Z=U.length+D.length+H.length,ee=Z>1)+U+D+H+ee.slice(Z);break;default:D=ee+U+D+H;break}return a(D)}return L.toString=function(){return h+""},L}function d(h,m){var g=Math.max(-8,Math.min(8,Math.floor(us(m)/3)))*3,b=Math.pow(10,-g),y=c((h=Sc(h),h.type="f",h),{suffix:KP[8+g/3]});return function(w){return y(b*w)}}return{format:c,formatPrefix:d}}var Tf,Iw,uI;RW({thousands:",",grouping:[3],currency:["$",""]});function RW(e){return Tf=kW(e),Iw=Tf.format,uI=Tf.formatPrefix,Tf}function MW(e){return Math.max(0,-us(Math.abs(e)))}function IW(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(us(t)/3)))*3-us(Math.abs(e)))}function DW(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,us(t)-us(e))+1}function fI(e,t,r,n){var i=Db(e,t,r),a;switch(n=Sc(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=IW(i,s))&&(n.precision=a),uI(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=DW(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=MW(i))&&(n.precision=a-(n.type==="%")*2);break}}return Iw(n)}function Zi(e){var t=e.domain;return e.ticks=function(r){var n=t();return Mb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return fI(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,s=n[i],u=n[a],f,c,d=10;for(u0;){if(c=Ib(s,u,r),c===f)return n[i]=s,n[a]=u,t(n);if(c>0)s=Math.floor(s/c)*c,u=Math.ceil(u/c)*c;else if(c<0)s=Math.ceil(s*c)/c,u=Math.floor(u*c)/c;else break;f=c}return e},e}function rh(){var e=Rw();return e.copy=function(){return eu(e,rh())},sn.apply(e,arguments),Zi(e)}function dI(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Jd),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return dI(e).unknown(t)},e=arguments.length?Array.from(e,Jd):[0,1],Zi(r)}function hI(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return aMath.pow(e,t)}function FW(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function QP(e){return(t,r)=>-e(-t,r)}function Dw(e){const t=e(XP,YP),r=t.domain;let n=10,i,a;function s(){return i=FW(n),a=zW(n),r()[0]<0?(i=QP(i),a=QP(a),e(LW,$W)):e(XP,YP),t}return t.base=function(u){return arguments.length?(n=+u,s()):n},t.domain=function(u){return arguments.length?(r(u),s()):r()},t.ticks=u=>{const f=r();let c=f[0],d=f[f.length-1];const h=d0){for(;m<=g;++m)for(b=1;bd)break;S.push(y)}}else for(;m<=g;++m)for(b=n-1;b>=1;--b)if(y=m>0?b/a(-m):b*a(m),!(yd)break;S.push(y)}S.length*2{if(u==null&&(u=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Sc(f)).precision==null&&(f.trim=!0),f=Iw(f)),u===1/0)return f;const c=Math.max(1,n*u/t.ticks().length);return d=>{let h=d/a(Math.round(i(d)));return h*nr(hI(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),t}function pI(){const e=Dw(up()).domain([1,10]);return e.copy=()=>eu(e,pI()).base(e.base()),sn.apply(e,arguments),e}function ZP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function JP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Lw(e){var t=1,r=e(ZP(t),JP(t));return r.constant=function(n){return arguments.length?e(ZP(t=+n),JP(t)):t},Zi(r)}function mI(){var e=Lw(up());return e.copy=function(){return eu(e,mI()).constant(e.constant())},sn.apply(e,arguments)}function eN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qW(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function UW(e){return e<0?-e*e:e*e}function $w(e){var t=e(fr,fr),r=1;function n(){return r===1?e(fr,fr):r===.5?e(qW,UW):e(eN(r),eN(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Zi(t)}function Bw(){var e=$w(up());return e.copy=function(){return eu(e,Bw()).exponent(e.exponent())},sn.apply(e,arguments),e}function WW(){return Bw.apply(null,arguments).exponent(.5)}function tN(e){return Math.sign(e)*e*e}function HW(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vI(){var e=Rw(),t=[0,1],r=!1,n;function i(a){var s=HW(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(tN(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Jd)).map(tN)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return vI(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},sn.apply(i,arguments),Zi(i)}function gI(){var e=[],t=[],r=[],n;function i(){var s=0,u=Math.max(1,t.length);for(r=new Array(u-1);++s0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[c-1],n[c]]},s.unknown=function(f){return arguments.length&&(a=f),s},s.thresholds=function(){return n.slice()},s.copy=function(){return yI().domain([e,t]).range(i).unknown(a)},sn.apply(Zi(s),arguments)}function xI(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Zc(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return xI().domain(e).range(t).unknown(r)},sn.apply(i,arguments)}const nx=new Date,ix=new Date;function Ft(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),u=i.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,u)=>{const f=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a0))return f;let c;do f.push(c=new Date(+a)),t(a,u),e(a);while(cFt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;t(s,-1),!a(s););else for(;--u>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(nx.setTime(+a),ix.setTime(+s),e(nx),e(ix),Math.floor(r(nx,ix))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const nh=Ft(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);nh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ft(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):nh);nh.range;const oi=1e3,nn=oi*60,si=nn*60,di=si*24,zw=di*7,rN=di*30,ax=di*365,Ta=Ft(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*oi)},(e,t)=>(t-e)/oi,e=>e.getUTCSeconds());Ta.range;const Fw=Ft(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oi)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getMinutes());Fw.range;const qw=Ft(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getUTCMinutes());qw.range;const Uw=Ft(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oi-e.getMinutes()*nn)},(e,t)=>{e.setTime(+e+t*si)},(e,t)=>(t-e)/si,e=>e.getHours());Uw.range;const Ww=Ft(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*si)},(e,t)=>(t-e)/si,e=>e.getUTCHours());Ww.range;const tu=Ft(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*nn)/di,e=>e.getDate()-1);tu.range;const fp=Ft(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/di,e=>e.getUTCDate()-1);fp.range;const bI=Ft(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/di,e=>Math.floor(e/di));bI.range;function Za(e){return Ft(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*nn)/zw)}const dp=Za(0),ih=Za(1),VW=Za(2),GW=Za(3),fs=Za(4),KW=Za(5),XW=Za(6);dp.range;ih.range;VW.range;GW.range;fs.range;KW.range;XW.range;function Ja(e){return Ft(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/zw)}const hp=Ja(0),ah=Ja(1),YW=Ja(2),QW=Ja(3),ds=Ja(4),ZW=Ja(5),JW=Ja(6);hp.range;ah.range;YW.range;QW.range;ds.range;ZW.range;JW.range;const Hw=Ft(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Hw.range;const Vw=Ft(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Vw.range;const hi=Ft(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());hi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ft(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});hi.range;const pi=Ft(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());pi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ft(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});pi.range;function wI(e,t,r,n,i,a){const s=[[Ta,1,oi],[Ta,5,5*oi],[Ta,15,15*oi],[Ta,30,30*oi],[a,1,nn],[a,5,5*nn],[a,15,15*nn],[a,30,30*nn],[i,1,si],[i,3,3*si],[i,6,6*si],[i,12,12*si],[n,1,di],[n,2,2*di],[r,1,zw],[t,1,rN],[t,3,3*rN],[e,1,ax]];function u(c,d,h){const m=dw).right(s,m);if(g===s.length)return e.every(Db(c/ax,d/ax,h));if(g===0)return nh.every(Math.max(Db(c,d,h),1));const[b,y]=s[m/s[g-1][2]53)return null;"w"in re||(re.w=1),"Z"in re?(Te=sx(Dl(re.y,0,1)),Ke=Te.getUTCDay(),Te=Ke>4||Ke===0?ah.ceil(Te):ah(Te),Te=fp.offset(Te,(re.V-1)*7),re.y=Te.getUTCFullYear(),re.m=Te.getUTCMonth(),re.d=Te.getUTCDate()+(re.w+6)%7):(Te=ox(Dl(re.y,0,1)),Ke=Te.getDay(),Te=Ke>4||Ke===0?ih.ceil(Te):ih(Te),Te=tu.offset(Te,(re.V-1)*7),re.y=Te.getFullYear(),re.m=Te.getMonth(),re.d=Te.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),Ke="Z"in re?sx(Dl(re.y,0,1)).getUTCDay():ox(Dl(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(Ke+5)%7:re.w+re.U*7-(Ke+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,sx(re)):ox(re)}}function R(ie,ue,ve,re){for(var De=0,Te=ue.length,Ke=ve.length,lt,vt;De=Ke)return-1;if(lt=ue.charCodeAt(De++),lt===37){if(lt=ue.charAt(De++),vt=A[lt in nN?ue.charAt(De++):lt],!vt||(re=vt(ie,ve,re))<0)return-1}else if(lt!=ve.charCodeAt(re++))return-1}return re}function I(ie,ue,ve){var re=c.exec(ue.slice(ve));return re?(ie.p=d.get(re[0].toLowerCase()),ve+re[0].length):-1}function q(ie,ue,ve){var re=g.exec(ue.slice(ve));return re?(ie.w=b.get(re[0].toLowerCase()),ve+re[0].length):-1}function L(ie,ue,ve){var re=h.exec(ue.slice(ve));return re?(ie.w=m.get(re[0].toLowerCase()),ve+re[0].length):-1}function D(ie,ue,ve){var re=S.exec(ue.slice(ve));return re?(ie.m=O.get(re[0].toLowerCase()),ve+re[0].length):-1}function U(ie,ue,ve){var re=y.exec(ue.slice(ve));return re?(ie.m=w.get(re[0].toLowerCase()),ve+re[0].length):-1}function H(ie,ue,ve){return R(ie,t,ue,ve)}function V(ie,ue,ve){return R(ie,r,ue,ve)}function K(ie,ue,ve){return R(ie,n,ue,ve)}function X(ie){return s[ie.getDay()]}function B(ie){return a[ie.getDay()]}function Z(ie){return f[ie.getMonth()]}function ee(ie){return u[ie.getMonth()]}function M(ie){return i[+(ie.getHours()>=12)]}function $(ie){return 1+~~(ie.getMonth()/3)}function Q(ie){return s[ie.getUTCDay()]}function ae(ie){return a[ie.getUTCDay()]}function pe(ie){return f[ie.getUTCMonth()]}function ye(ie){return u[ie.getUTCMonth()]}function oe(ie){return i[+(ie.getUTCHours()>=12)]}function me(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var ue=N(ie+="",E);return ue.toString=function(){return ie},ue},parse:function(ie){var ue=T(ie+="",!1);return ue.toString=function(){return ie},ue},utcFormat:function(ie){var ue=N(ie+="",C);return ue.toString=function(){return ie},ue},utcParse:function(ie){var ue=T(ie+="",!0);return ue.toString=function(){return ie},ue}}}var nN={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,aH=/^%/,oH=/[\\^$*+?|[\]().{}]/g;function et(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function lH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function cH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function uH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function fH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function dH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function iN(e,t,r){var n=Gt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function aN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function hH(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function pH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function mH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function oN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function vH(e,t,r){var n=Gt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function sN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function gH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function yH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function xH(e,t,r){var n=Gt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function bH(e,t,r){var n=Gt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function wH(e,t,r){var n=aH.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function _H(e,t,r){var n=Gt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function SH(e,t,r){var n=Gt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function lN(e,t){return et(e.getDate(),t,2)}function OH(e,t){return et(e.getHours(),t,2)}function jH(e,t){return et(e.getHours()%12||12,t,2)}function EH(e,t){return et(1+tu.count(hi(e),e),t,3)}function _I(e,t){return et(e.getMilliseconds(),t,3)}function AH(e,t){return _I(e,t)+"000"}function PH(e,t){return et(e.getMonth()+1,t,2)}function NH(e,t){return et(e.getMinutes(),t,2)}function CH(e,t){return et(e.getSeconds(),t,2)}function TH(e){var t=e.getDay();return t===0?7:t}function kH(e,t){return et(dp.count(hi(e)-1,e),t,2)}function SI(e){var t=e.getDay();return t>=4||t===0?fs(e):fs.ceil(e)}function RH(e,t){return e=SI(e),et(fs.count(hi(e),e)+(hi(e).getDay()===4),t,2)}function MH(e){return e.getDay()}function IH(e,t){return et(ih.count(hi(e)-1,e),t,2)}function DH(e,t){return et(e.getFullYear()%100,t,2)}function LH(e,t){return e=SI(e),et(e.getFullYear()%100,t,2)}function $H(e,t){return et(e.getFullYear()%1e4,t,4)}function BH(e,t){var r=e.getDay();return e=r>=4||r===0?fs(e):fs.ceil(e),et(e.getFullYear()%1e4,t,4)}function zH(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+et(t/60|0,"0",2)+et(t%60,"0",2)}function cN(e,t){return et(e.getUTCDate(),t,2)}function FH(e,t){return et(e.getUTCHours(),t,2)}function qH(e,t){return et(e.getUTCHours()%12||12,t,2)}function UH(e,t){return et(1+fp.count(pi(e),e),t,3)}function OI(e,t){return et(e.getUTCMilliseconds(),t,3)}function WH(e,t){return OI(e,t)+"000"}function HH(e,t){return et(e.getUTCMonth()+1,t,2)}function VH(e,t){return et(e.getUTCMinutes(),t,2)}function GH(e,t){return et(e.getUTCSeconds(),t,2)}function KH(e){var t=e.getUTCDay();return t===0?7:t}function XH(e,t){return et(hp.count(pi(e)-1,e),t,2)}function jI(e){var t=e.getUTCDay();return t>=4||t===0?ds(e):ds.ceil(e)}function YH(e,t){return e=jI(e),et(ds.count(pi(e),e)+(pi(e).getUTCDay()===4),t,2)}function QH(e){return e.getUTCDay()}function ZH(e,t){return et(ah.count(pi(e)-1,e),t,2)}function JH(e,t){return et(e.getUTCFullYear()%100,t,2)}function eV(e,t){return e=jI(e),et(e.getUTCFullYear()%100,t,2)}function tV(e,t){return et(e.getUTCFullYear()%1e4,t,4)}function rV(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ds(e):ds.ceil(e),et(e.getUTCFullYear()%1e4,t,4)}function nV(){return"+0000"}function uN(){return"%"}function fN(e){return+e}function dN(e){return Math.floor(+e/1e3)}var ko,EI,AI;iV({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function iV(e){return ko=iH(e),EI=ko.format,ko.parse,AI=ko.utcFormat,ko.utcParse,ko}function aV(e){return new Date(e)}function oV(e){return e instanceof Date?+e:+new Date(+e)}function Gw(e,t,r,n,i,a,s,u,f,c){var d=Rw(),h=d.invert,m=d.domain,g=c(".%L"),b=c(":%S"),y=c("%I:%M"),w=c("%I %p"),S=c("%a %d"),O=c("%b %d"),E=c("%B"),C=c("%Y");function A(N){return(f(N)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>XU(e,a/n))},r.copy=function(){return TI(t).domain(e)},bi.apply(r,arguments)}function mp(){var e=0,t=.5,r=1,n=1,i,a,s,u,f,c=fr,d,h=!1,m;function g(y){return isNaN(y=+y)?m:(y=.5+((y=+d(y))-a)*(n*yr}return cx=e,cx}var ux,vN;function fV(){if(vN)return ux;vN=1;var e=vp(),t=II(),r=Ls();function n(i){return i&&i.length?e(i,r,t):void 0}return ux=n,ux}var dV=fV();const gp=it(dV);var fx,gN;function DI(){if(gN)return fx;gN=1;function e(t,r){return te.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};we.decimalPlaces=we.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*xt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};we.dividedBy=we.div=function(e){return ui(this,new this.constructor(e))};we.dividedToIntegerBy=we.idiv=function(e){var t=this,r=t.constructor;return ft(ui(t,new r(e),0,1),r.precision)};we.equals=we.eq=function(e){return!this.cmp(e)};we.exponent=function(){return kt(this)};we.greaterThan=we.gt=function(e){return this.cmp(e)>0};we.greaterThanOrEqualTo=we.gte=function(e){return this.cmp(e)>=0};we.isInteger=we.isint=function(){return this.e>this.d.length-2};we.isNegative=we.isneg=function(){return this.s<0};we.isPositive=we.ispos=function(){return this.s>0};we.isZero=function(){return this.s===0};we.lessThan=we.lt=function(e){return this.cmp(e)<0};we.lessThanOrEqualTo=we.lte=function(e){return this.cmp(e)<1};we.logarithm=we.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Br))throw Error(an+"NaN");if(r.s<1)throw Error(an+(r.s?"NaN":"-Infinity"));return r.eq(Br)?new n(0):(wt=!1,t=ui(Oc(r,a),Oc(e,a),a),wt=!0,ft(t,i))};we.minus=we.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?zI(t,e):$I(t,(e.s=-e.s,e))};we.modulo=we.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(an+"NaN");return r.s?(wt=!1,t=ui(r,e,0,1).times(e),wt=!0,r.minus(t)):ft(new n(r),i)};we.naturalExponential=we.exp=function(){return BI(this)};we.naturalLogarithm=we.ln=function(){return Oc(this)};we.negated=we.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};we.plus=we.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?$I(t,e):zI(t,(e.s=-e.s,e))};we.precision=we.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ma+e);if(t=kt(i)+1,n=i.d.length-1,r=n*xt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};we.squareRoot=we.sqrt=function(){var e,t,r,n,i,a,s,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(an+"NaN")}for(e=kt(u),wt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=In(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=zs((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(a=n,n=a.plus(ui(u,a,s+2)).times(.5),In(a.d).slice(0,s)===(t=In(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(ft(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(t!="9999")break;s+=4}return wt=!0,ft(n,r)};we.times=we.mul=function(e){var t,r,n,i,a,s,u,f,c,d=this,h=d.constructor,m=d.d,g=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,r=d.e+e.e,f=m.length,c=g.length,f=0;){for(t=0,i=f+n;i>n;)u=a[i]+g[n]*m[i-n-1]+t,a[i--]=u%Ht|0,t=u/Ht|0;a[i]=(a[i]+t)%Ht|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,wt?ft(e,h.precision):e};we.toDecimalPlaces=we.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zn(e,0,Bs),t===void 0?t=n.rounding:zn(t,0,8),ft(r,e+kt(r)+1,t))};we.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ba(n,!0):(zn(e,0,Bs),t===void 0?t=i.rounding:zn(t,0,8),n=ft(new i(n),e+1,t),r=Ba(n,!0,e+1)),r};we.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ba(i):(zn(e,0,Bs),t===void 0?t=a.rounding:zn(t,0,8),n=ft(new a(i),e+kt(i)+1,t),r=Ba(n.abs(),!1,e+kt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};we.toInteger=we.toint=function(){var e=this,t=e.constructor;return ft(new t(e),kt(e)+1,t.rounding)};we.toNumber=function(){return+this};we.toPower=we.pow=function(e){var t,r,n,i,a,s,u=this,f=u.constructor,c=12,d=+(e=new f(e));if(!e.s)return new f(Br);if(u=new f(u),!u.s){if(e.s<1)throw Error(an+"Infinity");return u}if(u.eq(Br))return u;if(n=f.precision,e.eq(Br))return ft(u,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=u.s,s){if((r=d<0?-d:d)<=LI){for(i=new f(Br),t=Math.ceil(n/xt+4),wt=!1;r%2&&(i=i.times(u),SN(i.d,t)),r=zs(r/2),r!==0;)u=u.times(u),SN(u.d,t);return wt=!0,e.s<0?new f(Br).div(i):ft(i,n)}}else if(a<0)throw Error(an+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,wt=!1,i=e.times(Oc(u,n+c)),wt=!0,i=BI(i),i.s=a,i};we.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=kt(i),n=Ba(i,r<=a.toExpNeg||r>=a.toExpPos)):(zn(e,1,Bs),t===void 0?t=a.rounding:zn(t,0,8),i=ft(new a(i),e,t),r=kt(i),n=Ba(i,e<=r||r<=a.toExpNeg,e)),n};we.toSignificantDigits=we.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zn(e,1,Bs),t===void 0?t=n.rounding:zn(t,0,8)),ft(new n(r),e,t)};we.toString=we.valueOf=we.val=we.toJSON=we[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=kt(e),r=e.constructor;return Ba(e,t<=r.toExpNeg||t>=r.toExpPos)};function $I(e,t){var r,n,i,a,s,u,f,c,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),wt?ft(t,h):t;if(f=e.d,c=t.d,s=e.e,i=t.e,f=f.slice(),a=s-i,a){for(a<0?(n=f,a=-a,u=c.length):(n=c,i=s,u=f.length),s=Math.ceil(h/xt),u=s>u?s+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=f.length,a=c.length,u-a<0&&(a=u,n=c,c=f,f=n),r=0;a;)r=(f[--a]=f[a]+c[a]+r)/Ht|0,f[a]%=Ht;for(r&&(f.unshift(r),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,wt?ft(t,h):t}function zn(e,t,r){if(e!==~~e||er)throw Error(Ma+e)}function In(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;ts?1:-1;else for(u=f=0;ui[u]?1:-1;break}return f}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]1;)n.shift()}return function(n,i,a,s){var u,f,c,d,h,m,g,b,y,w,S,O,E,C,A,N,T,R,I=n.constructor,q=n.s==i.s?1:-1,L=n.d,D=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(an+"Division by zero");for(f=n.e-i.e,T=D.length,A=L.length,g=new I(q),b=g.d=[],c=0;D[c]==(L[c]||0);)++c;if(D[c]>(L[c]||0)&&--f,a==null?O=a=I.precision:s?O=a+(kt(n)-kt(i))+1:O=a,O<0)return new I(0);if(O=O/xt+2|0,c=0,T==1)for(d=0,D=D[0],O++;(c1&&(D=e(D,d),L=e(L,d),T=D.length,A=L.length),C=T,y=L.slice(0,T),w=y.length;w=Ht/2&&++N;do d=0,u=t(D,y,T,w),u<0?(S=y[0],T!=w&&(S=S*Ht+(y[1]||0)),d=S/N|0,d>1?(d>=Ht&&(d=Ht-1),h=e(D,d),m=h.length,w=y.length,u=t(h,y,m,w),u==1&&(d--,r(h,T16)throw Error(Yw+kt(e));if(!e.s)return new d(Br);for(wt=!1,u=h,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(n=Math.log(Aa(2,c))/Math.LN10*2+5|0,u+=n,r=i=a=new d(Br),d.precision=u;;){if(i=ft(i.times(e),u),r=r.times(++f),s=a.plus(ui(i,r,u)),In(s.d).slice(0,u)===In(a.d).slice(0,u)){for(;c--;)a=ft(a.times(a),u);return d.precision=h,t==null?(wt=!0,ft(a,h)):a}a=s}}function kt(e){for(var t=e.e*xt,r=e.d[0];r>=10;r/=10)t++;return t}function vx(e,t,r){if(t>e.LN10.sd())throw wt=!0,r&&(e.precision=r),Error(an+"LN10 precision limit exceeded");return ft(new e(e.LN10),t)}function Ui(e){for(var t="";e--;)t+="0";return t}function Oc(e,t){var r,n,i,a,s,u,f,c,d,h=1,m=10,g=e,b=g.d,y=g.constructor,w=y.precision;if(g.s<1)throw Error(an+(g.s?"NaN":"-Infinity"));if(g.eq(Br))return new y(0);if(t==null?(wt=!1,c=w):c=t,g.eq(10))return t==null&&(wt=!0),vx(y,c);if(c+=m,y.precision=c,r=In(b),n=r.charAt(0),a=kt(g),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=In(g.d),n=r.charAt(0),h++;a=kt(g),n>1?(g=new y("0."+r),a++):g=new y(n+"."+r.slice(1))}else return f=vx(y,c+2,w).times(a+""),g=Oc(new y(n+"."+r.slice(1)),c-m).plus(f),y.precision=w,t==null?(wt=!0,ft(g,w)):g;for(u=s=g=ui(g.minus(Br),g.plus(Br),c),d=ft(g.times(g),c),i=3;;){if(s=ft(s.times(d),c),f=u.plus(ui(s,new y(i),c)),In(f.d).slice(0,c)===In(u.d).slice(0,c))return u=u.times(2),a!==0&&(u=u.plus(vx(y,c+2,w).times(a+""))),u=ui(u,new y(h),c),y.precision=w,t==null?(wt=!0,ft(u,w)):u;u=f,i+=2}}function _N(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=zs(r/xt),e.d=[],n=(r+1)%xt,r<0&&(n+=xt),noh||e.e<-oh))throw Error(Yw+r)}else e.s=0,e.e=0,e.d=[0];return e}function ft(e,t,r){var n,i,a,s,u,f,c,d,h=e.d;for(s=1,a=h[0];a>=10;a/=10)s++;if(n=t-s,n<0)n+=xt,i=t,c=h[d=0];else{if(d=Math.ceil((n+1)/xt),a=h.length,d>=a)return e;for(c=a=h[d],s=1;a>=10;a/=10)s++;n%=xt,i=n-xt+s}if(r!==void 0&&(a=Aa(10,s-i-1),u=c/a%10|0,f=t<0||h[d+1]!==void 0||c%a,f=r<4?(u||f)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||f||r==6&&(n>0?i>0?c/Aa(10,s-i):0:h[d-1])%10&1||r==(e.s<0?8:7))),t<1||!h[0])return f?(a=kt(e),h.length=1,t=t-a-1,h[0]=Aa(10,(xt-t%xt)%xt),e.e=zs(-t/xt)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(n==0?(h.length=d,a=1,d--):(h.length=d+1,a=Aa(10,xt-n),h[d]=i>0?(c/Aa(10,s-i)%Aa(10,i)|0)*a:0),f)for(;;)if(d==0){(h[0]+=a)==Ht&&(h[0]=1,++e.e);break}else{if(h[d]+=a,h[d]!=Ht)break;h[d--]=0,a=1}for(n=h.length;h[--n]===0;)h.pop();if(wt&&(e.e>oh||e.e<-oh))throw Error(Yw+kt(e));return e}function zI(e,t){var r,n,i,a,s,u,f,c,d,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),wt?ft(t,g):t;if(f=e.d,h=t.d,n=t.e,c=e.e,f=f.slice(),s=c-n,s){for(d=s<0,d?(r=f,s=-s,u=h.length):(r=h,n=c,u=f.length),i=Math.max(Math.ceil(g/xt),u)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,u=h.length,d=i0;--i)f[u++]=0;for(i=h.length;i>s;){if(f[--i]0?a=a.charAt(0)+"."+a.slice(1)+Ui(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ui(-i-1)+a,r&&(n=r-s)>0&&(a+=Ui(n))):i>=s?(a+=Ui(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Ui(n))):((n=i+1)0&&(i+1===s&&(a+="."),a+=Ui(n))),e.s<0?"-"+a:a}function SN(e,t){if(e.length>t)return e.length=t,!0}function FI(e){var t,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ma+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return _N(s,a.toString())}else if(typeof a!="string")throw Error(Ma+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,_V.test(a))_N(s,a);else throw Error(Ma+a)}if(i.prototype=we,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=FI,i.config=i.set=SV,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ma+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ma+r+": "+n);return this}var Qw=FI(wV);Br=new Qw(1);const ut=Qw;function OV(e){return PV(e)||AV(e)||EV(e)||jV()}function jV(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RU(e,t){if(e){if(typeof e=="string")return AP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return AP(e,t)}}function AP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(K,X){var B=X.word,Z=X.width,ee=K[K.length-1];if(ee&&(i==null||a||ee.width+Z+nX.width?K:X})};if(!d)return g;for(var y="…",w=function(V){var K=h.slice(0,V),X=rI({breakAll:c,style:f,children:K+y}).wordsWithComputedWidth,B=m(X),Z=B.length>s||b(B).width>Number(i);return[Z,B]},S=0,O=h.length-1,E=0,C;S<=O&&E<=h.length-1;){var A=Math.floor((S+O)/2),N=A-1,T=w(N),R=EP(T,2),I=R[0],q=R[1],L=w(A),D=EP(L,1),U=D[0];if(!I&&!U&&(S=A+1),I&&U&&(O=A-1),!I&&U){C=q;break}E++}return C||g},PP=function(t){var r=qe(t)?[]:t.toString().split(tI);return[{words:r}]},LU=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,s=t.breakAll,u=t.maxLines;if((r||n)&&!Qa.isSsr){var f,c,d=rI({breakAll:s,children:i,style:a});if(d){var h=d.wordsWithComputedWidth,m=d.spaceWidth;f=h,c=m}else return PP(i);return DU({breakAll:s,children:i,maxLines:u,style:a},f,c,r,n)}return PP(i)},NP="#808080",$a=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,s=t.lineHeight,u=s===void 0?"1em":s,f=t.capHeight,c=f===void 0?"0.71em":f,d=t.scaleToFit,h=d===void 0?!1:d,m=t.textAnchor,g=m===void 0?"start":m,b=t.verticalAnchor,y=b===void 0?"end":b,w=t.fill,S=w===void 0?NP:w,O=jP(t,NU),E=P.useMemo(function(){return LU({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:h,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,h,O.style,O.width]),C=O.dx,A=O.dy,N=O.angle,T=O.className,R=O.breakAll,I=jP(O,CU);if(!zt(n)||!zt(a))return null;var q=n+(he(C)?C:0),L=a+(he(A)?A:0),D;switch(y){case"start":D=ex("calc(".concat(c,")"));break;case"middle":D=ex("calc(".concat((E.length-1)/2," * -").concat(u," + (").concat(c," / 2))"));break;default:D=ex("calc(".concat(E.length-1," * -").concat(u,")"));break}var U=[];if(h){var H=E[0].width,V=O.width;U.push("scale(".concat((he(V)?V/H:1)/H,")"))}return N&&U.push("rotate(".concat(N,", ").concat(q,", ").concat(L,")")),U.length&&(I.transform=U.join(" ")),z.createElement("text",Rb({},Me(I,!0),{x:q,y:L,className:Ue("recharts-text",T),textAnchor:g,fill:S.includes("url")?NP:S}),E.map(function(K,X){var B=K.words.join(R?"":" ");return z.createElement("tspan",{x:q,dy:X===0?D:u,key:"".concat(B,"-").concat(X)},B)}))};function Vi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function $U(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Pw(e){let t,r,n;e.length!==2?(t=Vi,r=(u,f)=>Vi(e(u),f),n=(u,f)=>e(u)-f):(t=e===Vi||e===$U?e:BU,r=e,n=e);function i(u,f,c=0,d=u.length){if(c>>1;r(u[h],f)<0?c=h+1:d=h}while(c>>1;r(u[h],f)<=0?c=h+1:d=h}while(cc&&n(u[h-1],f)>-n(u[h],f)?h-1:h}return{left:i,center:s,right:a}}function BU(){return 0}function nI(e){return e===null?NaN:+e}function*zU(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const FU=Pw(Vi),Zc=FU.right;Pw(nI).center;class CP extends Map{constructor(t,r=WU){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(TP(this,t))}has(t){return super.has(TP(this,t))}set(t,r){return super.set(qU(this,t),r)}delete(t){return super.delete(UU(this,t))}}function TP({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function qU({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function UU({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function WU(e){return e!==null&&typeof e=="object"?e.valueOf():e}function HU(e=Vi){if(e===Vi)return iI;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function iI(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const VU=Math.sqrt(50),GU=Math.sqrt(10),KU=Math.sqrt(2);function Xd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=VU?10:a>=GU?5:a>=KU?2:1;let u,f,c;return i<0?(c=Math.pow(10,-i)/s,u=Math.round(e*c),f=Math.round(t*c),u/ct&&--f,c=-c):(c=Math.pow(10,i)*s,u=Math.round(e/c),f=Math.round(t/c),u*ct&&--f),f0))return[];if(e===t)return[e];const n=t=i))return[];const u=a-i+1,f=new Array(u);if(n)if(s<0)for(let c=0;c=n)&&(r=n);return r}function RP(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function aI(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?iI:HU(i);n>r;){if(n-r>600){const f=n-r+1,c=t-r+1,d=Math.log(f),h=.5*Math.exp(2*d/3),m=.5*Math.sqrt(d*h*(f-h)/f)*(c-f/2<0?-1:1),g=Math.max(r,Math.floor(t-c*h/f+m)),b=Math.min(n,Math.floor(t+(f-c)*h/f+m));aI(e,t,g,b,i)}const a=e[t];let s=r,u=n;for(Il(e,r,t),i(e[n],a)>0&&Il(e,r,n);s0;)--u}i(e[r],a)===0?Il(e,r,u):(++u,Il(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function Il(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function XU(e,t,r){if(e=Float64Array.from(zU(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return RP(e);if(t>=1)return kP(e);var n,i=(n-1)*t,a=Math.floor(i),s=kP(aI(e,a).subarray(0,a+1)),u=RP(e.subarray(a+1));return s+(u-s)*(i-a)}}function YU(e,t,r=nI){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),s=+r(e[a],a,e),u=+r(e[a+1],a+1,e);return s+(u-s)*(i-a)}}function QU(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Nf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Nf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=JU.exec(e))?new xr(t[1],t[2],t[3],1):(t=eW.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tW.exec(e))?Nf(t[1],t[2],t[3],t[4]):(t=rW.exec(e))?Nf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nW.exec(e))?zP(t[1],t[2]/100,t[3]/100,1):(t=iW.exec(e))?zP(t[1],t[2]/100,t[3]/100,t[4]):MP.hasOwnProperty(e)?LP(MP[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function LP(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function Nf(e,t,r,n){return n<=0&&(e=t=r=NaN),new xr(e,t,r,n)}function sW(e){return e instanceof Jc||(e=_c(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function $b(e,t,r,n){return arguments.length===1?sW(e):new xr(e,t,r,n??1)}function xr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Cw(xr,$b,sI(Jc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bc:Math.pow(bc,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(Ra(this.r),Ra(this.g),Ra(this.b),Qd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$P,formatHex:$P,formatHex8:lW,formatRgb:BP,toString:BP}));function $P(){return`#${Ca(this.r)}${Ca(this.g)}${Ca(this.b)}`}function lW(){return`#${Ca(this.r)}${Ca(this.g)}${Ca(this.b)}${Ca((isNaN(this.opacity)?1:this.opacity)*255)}`}function BP(){const e=Qd(this.opacity);return`${e===1?"rgb(":"rgba("}${Ra(this.r)}, ${Ra(this.g)}, ${Ra(this.b)}${e===1?")":`, ${e})`}`}function Qd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ra(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ca(e){return e=Ra(e),(e<16?"0":"")+e.toString(16)}function zP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new _n(e,t,r,n)}function lI(e){if(e instanceof _n)return new _n(e.h,e.s,e.l,e.opacity);if(e instanceof Jc||(e=_c(e)),!e)return new _n;if(e instanceof _n)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,u=a-i,f=(a+i)/2;return u?(t===a?s=(r-n)/u+(r0&&f<1?0:s,new _n(s,u,f,e.opacity)}function cW(e,t,r,n){return arguments.length===1?lI(e):new _n(e,t,r,n??1)}function _n(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Cw(_n,cW,sI(Jc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new _n(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bc:Math.pow(bc,e),new _n(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new xr(tx(e>=240?e-240:e+120,i,n),tx(e,i,n),tx(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new _n(FP(this.h),Cf(this.s),Cf(this.l),Qd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qd(this.opacity);return`${e===1?"hsl(":"hsla("}${FP(this.h)}, ${Cf(this.s)*100}%, ${Cf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FP(e){return e=(e||0)%360,e<0?e+360:e}function Cf(e){return Math.max(0,Math.min(1,e||0))}function tx(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Tw=e=>()=>e;function uW(e,t){return function(r){return e+r*t}}function fW(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function dW(e){return(e=+e)==1?cI:function(t,r){return r-t?fW(t,r,e):Tw(isNaN(t)?r:t)}}function cI(e,t){var r=t-e;return r?uW(e,r):Tw(isNaN(e)?t:e)}const qP=(function e(t){var r=dW(t);function n(i,a){var s=r((i=$b(i)).r,(a=$b(a)).r),u=r(i.g,a.g),f=r(i.b,a.b),c=cI(i.opacity,a.opacity);return function(d){return i.r=s(d),i.g=u(d),i.b=f(d),i.opacity=c(d),i+""}}return n.gamma=e,n})(1);function hW(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),u[s]?u[s]+=a:u[++s]=a),(n=n[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,f.push({i:s,x:Zd(n,i)})),r=rx.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function OW(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i2?jW:OW,f=c=null,h}function h(m){return m==null||isNaN(m=+m)?a:(f||(f=u(e.map(n),t,r)))(n(s(m)))}return h.invert=function(m){return s(i((c||(c=u(t,e.map(n),Zd)))(m)))},h.domain=function(m){return arguments.length?(e=Array.from(m,Jd),d()):e.slice()},h.range=function(m){return arguments.length?(t=Array.from(m),d()):t.slice()},h.rangeRound=function(m){return t=Array.from(m),r=kw,d()},h.clamp=function(m){return arguments.length?(s=m?!0:fr,d()):s!==fr},h.interpolate=function(m){return arguments.length?(r=m,d()):r},h.unknown=function(m){return arguments.length?(a=m,h):a},function(m,g){return n=m,i=g,d()}}function Rw(){return up()(fr,fr)}function EW(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function eh(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function us(e){return e=eh(Math.abs(e)),e?e[1]:NaN}function AW(e,t){return function(r,n){for(var i=r.length,a=[],s=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>n&&(u=Math.max(1,n-f)),a.push(r.substring(i-=u,i+u)),!((f+=u+1)>n));)u=e[s=(s+1)%e.length];return a.reverse().join(t)}}function PW(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var NW=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sc(e){if(!(t=NW.exec(e)))throw new Error("invalid format: "+e);var t;return new Mw({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Sc.prototype=Mw.prototype;function Mw(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Mw.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function CW(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var th;function TW(e,t){var r=eh(e,t);if(!r)return th=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(th=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+eh(e,Math.max(0,t+a-1))[0]}function WP(e,t){var r=eh(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const HP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:EW,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>WP(e*100,t),r:WP,s:TW,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function VP(e){return e}var GP=Array.prototype.map,KP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kW(e){var t=e.grouping===void 0||e.thousands===void 0?VP:AW(GP.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?VP:PW(GP.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(h,m){h=Sc(h);var g=h.fill,b=h.align,y=h.sign,w=h.symbol,S=h.zero,O=h.width,E=h.comma,C=h.precision,A=h.trim,N=h.type;N==="n"?(E=!0,N="g"):HP[N]||(C===void 0&&(C=12),A=!0,N="g"),(S||g==="0"&&b==="=")&&(S=!0,g="0",b="=");var T=(m&&m.prefix!==void 0?m.prefix:"")+(w==="$"?r:w==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():""),R=(w==="$"?n:/[%p]/.test(N)?s:"")+(m&&m.suffix!==void 0?m.suffix:""),I=HP[N],q=/[defgprs%]/.test(N);C=C===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function L(D){var U=T,H=R,V,K,X;if(N==="c")H=I(D)+H,D="";else{D=+D;var B=D<0||1/D<0;if(D=isNaN(D)?f:I(Math.abs(D),C),A&&(D=CW(D)),B&&+D==0&&y!=="+"&&(B=!1),U=(B?y==="("?y:u:y==="-"||y==="("?"":y)+U,H=(N==="s"&&!isNaN(D)&&th!==void 0?KP[8+th/3]:"")+H+(B&&y==="("?")":""),q){for(V=-1,K=D.length;++VX||X>57){H=(X===46?i+D.slice(V+1):D.slice(V))+H,D=D.slice(0,V);break}}}E&&!S&&(D=t(D,1/0));var Z=U.length+D.length+H.length,ee=Z>1)+U+D+H+ee.slice(Z);break;default:D=ee+U+D+H;break}return a(D)}return L.toString=function(){return h+""},L}function d(h,m){var g=Math.max(-8,Math.min(8,Math.floor(us(m)/3)))*3,b=Math.pow(10,-g),y=c((h=Sc(h),h.type="f",h),{suffix:KP[8+g/3]});return function(w){return y(b*w)}}return{format:c,formatPrefix:d}}var Tf,Iw,uI;RW({thousands:",",grouping:[3],currency:["$",""]});function RW(e){return Tf=kW(e),Iw=Tf.format,uI=Tf.formatPrefix,Tf}function MW(e){return Math.max(0,-us(Math.abs(e)))}function IW(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(us(t)/3)))*3-us(Math.abs(e)))}function DW(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,us(t)-us(e))+1}function fI(e,t,r,n){var i=Db(e,t,r),a;switch(n=Sc(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=IW(i,s))&&(n.precision=a),uI(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=DW(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=MW(i))&&(n.precision=a-(n.type==="%")*2);break}}return Iw(n)}function Zi(e){var t=e.domain;return e.ticks=function(r){var n=t();return Mb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return fI(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,s=n[i],u=n[a],f,c,d=10;for(u0;){if(c=Ib(s,u,r),c===f)return n[i]=s,n[a]=u,t(n);if(c>0)s=Math.floor(s/c)*c,u=Math.ceil(u/c)*c;else if(c<0)s=Math.ceil(s*c)/c,u=Math.floor(u*c)/c;else break;f=c}return e},e}function rh(){var e=Rw();return e.copy=function(){return eu(e,rh())},sn.apply(e,arguments),Zi(e)}function dI(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Jd),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return dI(e).unknown(t)},e=arguments.length?Array.from(e,Jd):[0,1],Zi(r)}function hI(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return aMath.pow(e,t)}function FW(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function QP(e){return(t,r)=>-e(-t,r)}function Dw(e){const t=e(XP,YP),r=t.domain;let n=10,i,a;function s(){return i=FW(n),a=zW(n),r()[0]<0?(i=QP(i),a=QP(a),e(LW,$W)):e(XP,YP),t}return t.base=function(u){return arguments.length?(n=+u,s()):n},t.domain=function(u){return arguments.length?(r(u),s()):r()},t.ticks=u=>{const f=r();let c=f[0],d=f[f.length-1];const h=d0){for(;m<=g;++m)for(b=1;bd)break;S.push(y)}}else for(;m<=g;++m)for(b=n-1;b>=1;--b)if(y=m>0?b/a(-m):b*a(m),!(yd)break;S.push(y)}S.length*2{if(u==null&&(u=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Sc(f)).precision==null&&(f.trim=!0),f=Iw(f)),u===1/0)return f;const c=Math.max(1,n*u/t.ticks().length);return d=>{let h=d/a(Math.round(i(d)));return h*nr(hI(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),t}function pI(){const e=Dw(up()).domain([1,10]);return e.copy=()=>eu(e,pI()).base(e.base()),sn.apply(e,arguments),e}function ZP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function JP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Lw(e){var t=1,r=e(ZP(t),JP(t));return r.constant=function(n){return arguments.length?e(ZP(t=+n),JP(t)):t},Zi(r)}function mI(){var e=Lw(up());return e.copy=function(){return eu(e,mI()).constant(e.constant())},sn.apply(e,arguments)}function eN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qW(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function UW(e){return e<0?-e*e:e*e}function $w(e){var t=e(fr,fr),r=1;function n(){return r===1?e(fr,fr):r===.5?e(qW,UW):e(eN(r),eN(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Zi(t)}function Bw(){var e=$w(up());return e.copy=function(){return eu(e,Bw()).exponent(e.exponent())},sn.apply(e,arguments),e}function WW(){return Bw.apply(null,arguments).exponent(.5)}function tN(e){return Math.sign(e)*e*e}function HW(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vI(){var e=Rw(),t=[0,1],r=!1,n;function i(a){var s=HW(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(tN(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Jd)).map(tN)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return vI(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},sn.apply(i,arguments),Zi(i)}function gI(){var e=[],t=[],r=[],n;function i(){var s=0,u=Math.max(1,t.length);for(r=new Array(u-1);++s0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[c-1],n[c]]},s.unknown=function(f){return arguments.length&&(a=f),s},s.thresholds=function(){return n.slice()},s.copy=function(){return yI().domain([e,t]).range(i).unknown(a)},sn.apply(Zi(s),arguments)}function xI(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Zc(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return xI().domain(e).range(t).unknown(r)},sn.apply(i,arguments)}const nx=new Date,ix=new Date;function Ft(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),u=i.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,u)=>{const f=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a0))return f;let c;do f.push(c=new Date(+a)),t(a,u),e(a);while(cFt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;t(s,-1),!a(s););else for(;--u>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(nx.setTime(+a),ix.setTime(+s),e(nx),e(ix),Math.floor(r(nx,ix))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const nh=Ft(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);nh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ft(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):nh);nh.range;const oi=1e3,nn=oi*60,si=nn*60,di=si*24,zw=di*7,rN=di*30,ax=di*365,Ta=Ft(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*oi)},(e,t)=>(t-e)/oi,e=>e.getUTCSeconds());Ta.range;const Fw=Ft(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oi)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getMinutes());Fw.range;const qw=Ft(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getUTCMinutes());qw.range;const Uw=Ft(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oi-e.getMinutes()*nn)},(e,t)=>{e.setTime(+e+t*si)},(e,t)=>(t-e)/si,e=>e.getHours());Uw.range;const Ww=Ft(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*si)},(e,t)=>(t-e)/si,e=>e.getUTCHours());Ww.range;const tu=Ft(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*nn)/di,e=>e.getDate()-1);tu.range;const fp=Ft(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/di,e=>e.getUTCDate()-1);fp.range;const bI=Ft(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/di,e=>Math.floor(e/di));bI.range;function Za(e){return Ft(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*nn)/zw)}const dp=Za(0),ih=Za(1),VW=Za(2),GW=Za(3),fs=Za(4),KW=Za(5),XW=Za(6);dp.range;ih.range;VW.range;GW.range;fs.range;KW.range;XW.range;function Ja(e){return Ft(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/zw)}const hp=Ja(0),ah=Ja(1),YW=Ja(2),QW=Ja(3),ds=Ja(4),ZW=Ja(5),JW=Ja(6);hp.range;ah.range;YW.range;QW.range;ds.range;ZW.range;JW.range;const Hw=Ft(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Hw.range;const Vw=Ft(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Vw.range;const hi=Ft(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());hi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ft(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});hi.range;const pi=Ft(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());pi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ft(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});pi.range;function wI(e,t,r,n,i,a){const s=[[Ta,1,oi],[Ta,5,5*oi],[Ta,15,15*oi],[Ta,30,30*oi],[a,1,nn],[a,5,5*nn],[a,15,15*nn],[a,30,30*nn],[i,1,si],[i,3,3*si],[i,6,6*si],[i,12,12*si],[n,1,di],[n,2,2*di],[r,1,zw],[t,1,rN],[t,3,3*rN],[e,1,ax]];function u(c,d,h){const m=dw).right(s,m);if(g===s.length)return e.every(Db(c/ax,d/ax,h));if(g===0)return nh.every(Math.max(Db(c,d,h),1));const[b,y]=s[m/s[g-1][2]53)return null;"w"in re||(re.w=1),"Z"in re?(Te=sx(Dl(re.y,0,1)),Ke=Te.getUTCDay(),Te=Ke>4||Ke===0?ah.ceil(Te):ah(Te),Te=fp.offset(Te,(re.V-1)*7),re.y=Te.getUTCFullYear(),re.m=Te.getUTCMonth(),re.d=Te.getUTCDate()+(re.w+6)%7):(Te=ox(Dl(re.y,0,1)),Ke=Te.getDay(),Te=Ke>4||Ke===0?ih.ceil(Te):ih(Te),Te=tu.offset(Te,(re.V-1)*7),re.y=Te.getFullYear(),re.m=Te.getMonth(),re.d=Te.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),Ke="Z"in re?sx(Dl(re.y,0,1)).getUTCDay():ox(Dl(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(Ke+5)%7:re.w+re.U*7-(Ke+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,sx(re)):ox(re)}}function R(ie,ue,ve,re){for(var De=0,Te=ue.length,Ke=ve.length,lt,vt;De=Ke)return-1;if(lt=ue.charCodeAt(De++),lt===37){if(lt=ue.charAt(De++),vt=A[lt in nN?ue.charAt(De++):lt],!vt||(re=vt(ie,ve,re))<0)return-1}else if(lt!=ve.charCodeAt(re++))return-1}return re}function I(ie,ue,ve){var re=c.exec(ue.slice(ve));return re?(ie.p=d.get(re[0].toLowerCase()),ve+re[0].length):-1}function q(ie,ue,ve){var re=g.exec(ue.slice(ve));return re?(ie.w=b.get(re[0].toLowerCase()),ve+re[0].length):-1}function L(ie,ue,ve){var re=h.exec(ue.slice(ve));return re?(ie.w=m.get(re[0].toLowerCase()),ve+re[0].length):-1}function D(ie,ue,ve){var re=S.exec(ue.slice(ve));return re?(ie.m=O.get(re[0].toLowerCase()),ve+re[0].length):-1}function U(ie,ue,ve){var re=y.exec(ue.slice(ve));return re?(ie.m=w.get(re[0].toLowerCase()),ve+re[0].length):-1}function H(ie,ue,ve){return R(ie,t,ue,ve)}function V(ie,ue,ve){return R(ie,r,ue,ve)}function K(ie,ue,ve){return R(ie,n,ue,ve)}function X(ie){return s[ie.getDay()]}function B(ie){return a[ie.getDay()]}function Z(ie){return f[ie.getMonth()]}function ee(ie){return u[ie.getMonth()]}function M(ie){return i[+(ie.getHours()>=12)]}function $(ie){return 1+~~(ie.getMonth()/3)}function Q(ie){return s[ie.getUTCDay()]}function ae(ie){return a[ie.getUTCDay()]}function pe(ie){return f[ie.getUTCMonth()]}function ye(ie){return u[ie.getUTCMonth()]}function oe(ie){return i[+(ie.getUTCHours()>=12)]}function me(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var ue=N(ie+="",E);return ue.toString=function(){return ie},ue},parse:function(ie){var ue=T(ie+="",!1);return ue.toString=function(){return ie},ue},utcFormat:function(ie){var ue=N(ie+="",C);return ue.toString=function(){return ie},ue},utcParse:function(ie){var ue=T(ie+="",!0);return ue.toString=function(){return ie},ue}}}var nN={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,aH=/^%/,oH=/[\\^$*+?|[\]().{}]/g;function et(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function lH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function cH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function uH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function fH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function dH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function iN(e,t,r){var n=Gt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function aN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function hH(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function pH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function mH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function oN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function vH(e,t,r){var n=Gt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function sN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function gH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function yH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function xH(e,t,r){var n=Gt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function bH(e,t,r){var n=Gt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function wH(e,t,r){var n=aH.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function _H(e,t,r){var n=Gt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function SH(e,t,r){var n=Gt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function lN(e,t){return et(e.getDate(),t,2)}function OH(e,t){return et(e.getHours(),t,2)}function jH(e,t){return et(e.getHours()%12||12,t,2)}function EH(e,t){return et(1+tu.count(hi(e),e),t,3)}function _I(e,t){return et(e.getMilliseconds(),t,3)}function AH(e,t){return _I(e,t)+"000"}function PH(e,t){return et(e.getMonth()+1,t,2)}function NH(e,t){return et(e.getMinutes(),t,2)}function CH(e,t){return et(e.getSeconds(),t,2)}function TH(e){var t=e.getDay();return t===0?7:t}function kH(e,t){return et(dp.count(hi(e)-1,e),t,2)}function SI(e){var t=e.getDay();return t>=4||t===0?fs(e):fs.ceil(e)}function RH(e,t){return e=SI(e),et(fs.count(hi(e),e)+(hi(e).getDay()===4),t,2)}function MH(e){return e.getDay()}function IH(e,t){return et(ih.count(hi(e)-1,e),t,2)}function DH(e,t){return et(e.getFullYear()%100,t,2)}function LH(e,t){return e=SI(e),et(e.getFullYear()%100,t,2)}function $H(e,t){return et(e.getFullYear()%1e4,t,4)}function BH(e,t){var r=e.getDay();return e=r>=4||r===0?fs(e):fs.ceil(e),et(e.getFullYear()%1e4,t,4)}function zH(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+et(t/60|0,"0",2)+et(t%60,"0",2)}function cN(e,t){return et(e.getUTCDate(),t,2)}function FH(e,t){return et(e.getUTCHours(),t,2)}function qH(e,t){return et(e.getUTCHours()%12||12,t,2)}function UH(e,t){return et(1+fp.count(pi(e),e),t,3)}function OI(e,t){return et(e.getUTCMilliseconds(),t,3)}function WH(e,t){return OI(e,t)+"000"}function HH(e,t){return et(e.getUTCMonth()+1,t,2)}function VH(e,t){return et(e.getUTCMinutes(),t,2)}function GH(e,t){return et(e.getUTCSeconds(),t,2)}function KH(e){var t=e.getUTCDay();return t===0?7:t}function XH(e,t){return et(hp.count(pi(e)-1,e),t,2)}function jI(e){var t=e.getUTCDay();return t>=4||t===0?ds(e):ds.ceil(e)}function YH(e,t){return e=jI(e),et(ds.count(pi(e),e)+(pi(e).getUTCDay()===4),t,2)}function QH(e){return e.getUTCDay()}function ZH(e,t){return et(ah.count(pi(e)-1,e),t,2)}function JH(e,t){return et(e.getUTCFullYear()%100,t,2)}function eV(e,t){return e=jI(e),et(e.getUTCFullYear()%100,t,2)}function tV(e,t){return et(e.getUTCFullYear()%1e4,t,4)}function rV(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ds(e):ds.ceil(e),et(e.getUTCFullYear()%1e4,t,4)}function nV(){return"+0000"}function uN(){return"%"}function fN(e){return+e}function dN(e){return Math.floor(+e/1e3)}var ko,EI,AI;iV({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function iV(e){return ko=iH(e),EI=ko.format,ko.parse,AI=ko.utcFormat,ko.utcParse,ko}function aV(e){return new Date(e)}function oV(e){return e instanceof Date?+e:+new Date(+e)}function Gw(e,t,r,n,i,a,s,u,f,c){var d=Rw(),h=d.invert,m=d.domain,g=c(".%L"),b=c(":%S"),y=c("%I:%M"),w=c("%I %p"),S=c("%a %d"),O=c("%b %d"),E=c("%B"),C=c("%Y");function A(N){return(f(N)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>XU(e,a/n))},r.copy=function(){return TI(t).domain(e)},bi.apply(r,arguments)}function mp(){var e=0,t=.5,r=1,n=1,i,a,s,u,f,c=fr,d,h=!1,m;function g(y){return isNaN(y=+y)?m:(y=.5+((y=+d(y))-a)*(n*yr}return cx=e,cx}var ux,vN;function fV(){if(vN)return ux;vN=1;var e=vp(),t=II(),r=Ls();function n(i){return i&&i.length?e(i,r,t):void 0}return ux=n,ux}var dV=fV();const gp=it(dV);var fx,gN;function DI(){if(gN)return fx;gN=1;function e(t,r){return te.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};_e.decimalPlaces=_e.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*xt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};_e.dividedBy=_e.div=function(e){return ui(this,new this.constructor(e))};_e.dividedToIntegerBy=_e.idiv=function(e){var t=this,r=t.constructor;return ft(ui(t,new r(e),0,1),r.precision)};_e.equals=_e.eq=function(e){return!this.cmp(e)};_e.exponent=function(){return kt(this)};_e.greaterThan=_e.gt=function(e){return this.cmp(e)>0};_e.greaterThanOrEqualTo=_e.gte=function(e){return this.cmp(e)>=0};_e.isInteger=_e.isint=function(){return this.e>this.d.length-2};_e.isNegative=_e.isneg=function(){return this.s<0};_e.isPositive=_e.ispos=function(){return this.s>0};_e.isZero=function(){return this.s===0};_e.lessThan=_e.lt=function(e){return this.cmp(e)<0};_e.lessThanOrEqualTo=_e.lte=function(e){return this.cmp(e)<1};_e.logarithm=_e.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Br))throw Error(an+"NaN");if(r.s<1)throw Error(an+(r.s?"NaN":"-Infinity"));return r.eq(Br)?new n(0):(wt=!1,t=ui(Oc(r,a),Oc(e,a),a),wt=!0,ft(t,i))};_e.minus=_e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?zI(t,e):$I(t,(e.s=-e.s,e))};_e.modulo=_e.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(an+"NaN");return r.s?(wt=!1,t=ui(r,e,0,1).times(e),wt=!0,r.minus(t)):ft(new n(r),i)};_e.naturalExponential=_e.exp=function(){return BI(this)};_e.naturalLogarithm=_e.ln=function(){return Oc(this)};_e.negated=_e.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};_e.plus=_e.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?$I(t,e):zI(t,(e.s=-e.s,e))};_e.precision=_e.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ma+e);if(t=kt(i)+1,n=i.d.length-1,r=n*xt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};_e.squareRoot=_e.sqrt=function(){var e,t,r,n,i,a,s,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(an+"NaN")}for(e=kt(u),wt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=In(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=zs((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(a=n,n=a.plus(ui(u,a,s+2)).times(.5),In(a.d).slice(0,s)===(t=In(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(ft(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(t!="9999")break;s+=4}return wt=!0,ft(n,r)};_e.times=_e.mul=function(e){var t,r,n,i,a,s,u,f,c,d=this,h=d.constructor,m=d.d,g=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,r=d.e+e.e,f=m.length,c=g.length,f=0;){for(t=0,i=f+n;i>n;)u=a[i]+g[n]*m[i-n-1]+t,a[i--]=u%Ht|0,t=u/Ht|0;a[i]=(a[i]+t)%Ht|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,wt?ft(e,h.precision):e};_e.toDecimalPlaces=_e.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zn(e,0,Bs),t===void 0?t=n.rounding:zn(t,0,8),ft(r,e+kt(r)+1,t))};_e.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ba(n,!0):(zn(e,0,Bs),t===void 0?t=i.rounding:zn(t,0,8),n=ft(new i(n),e+1,t),r=Ba(n,!0,e+1)),r};_e.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ba(i):(zn(e,0,Bs),t===void 0?t=a.rounding:zn(t,0,8),n=ft(new a(i),e+kt(i)+1,t),r=Ba(n.abs(),!1,e+kt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};_e.toInteger=_e.toint=function(){var e=this,t=e.constructor;return ft(new t(e),kt(e)+1,t.rounding)};_e.toNumber=function(){return+this};_e.toPower=_e.pow=function(e){var t,r,n,i,a,s,u=this,f=u.constructor,c=12,d=+(e=new f(e));if(!e.s)return new f(Br);if(u=new f(u),!u.s){if(e.s<1)throw Error(an+"Infinity");return u}if(u.eq(Br))return u;if(n=f.precision,e.eq(Br))return ft(u,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=u.s,s){if((r=d<0?-d:d)<=LI){for(i=new f(Br),t=Math.ceil(n/xt+4),wt=!1;r%2&&(i=i.times(u),SN(i.d,t)),r=zs(r/2),r!==0;)u=u.times(u),SN(u.d,t);return wt=!0,e.s<0?new f(Br).div(i):ft(i,n)}}else if(a<0)throw Error(an+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,wt=!1,i=e.times(Oc(u,n+c)),wt=!0,i=BI(i),i.s=a,i};_e.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=kt(i),n=Ba(i,r<=a.toExpNeg||r>=a.toExpPos)):(zn(e,1,Bs),t===void 0?t=a.rounding:zn(t,0,8),i=ft(new a(i),e,t),r=kt(i),n=Ba(i,e<=r||r<=a.toExpNeg,e)),n};_e.toSignificantDigits=_e.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zn(e,1,Bs),t===void 0?t=n.rounding:zn(t,0,8)),ft(new n(r),e,t)};_e.toString=_e.valueOf=_e.val=_e.toJSON=_e[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=kt(e),r=e.constructor;return Ba(e,t<=r.toExpNeg||t>=r.toExpPos)};function $I(e,t){var r,n,i,a,s,u,f,c,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),wt?ft(t,h):t;if(f=e.d,c=t.d,s=e.e,i=t.e,f=f.slice(),a=s-i,a){for(a<0?(n=f,a=-a,u=c.length):(n=c,i=s,u=f.length),s=Math.ceil(h/xt),u=s>u?s+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=f.length,a=c.length,u-a<0&&(a=u,n=c,c=f,f=n),r=0;a;)r=(f[--a]=f[a]+c[a]+r)/Ht|0,f[a]%=Ht;for(r&&(f.unshift(r),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,wt?ft(t,h):t}function zn(e,t,r){if(e!==~~e||er)throw Error(Ma+e)}function In(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;ts?1:-1;else for(u=f=0;ui[u]?1:-1;break}return f}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]1;)n.shift()}return function(n,i,a,s){var u,f,c,d,h,m,g,b,y,w,S,O,E,C,A,N,T,R,I=n.constructor,q=n.s==i.s?1:-1,L=n.d,D=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(an+"Division by zero");for(f=n.e-i.e,T=D.length,A=L.length,g=new I(q),b=g.d=[],c=0;D[c]==(L[c]||0);)++c;if(D[c]>(L[c]||0)&&--f,a==null?O=a=I.precision:s?O=a+(kt(n)-kt(i))+1:O=a,O<0)return new I(0);if(O=O/xt+2|0,c=0,T==1)for(d=0,D=D[0],O++;(c1&&(D=e(D,d),L=e(L,d),T=D.length,A=L.length),C=T,y=L.slice(0,T),w=y.length;w=Ht/2&&++N;do d=0,u=t(D,y,T,w),u<0?(S=y[0],T!=w&&(S=S*Ht+(y[1]||0)),d=S/N|0,d>1?(d>=Ht&&(d=Ht-1),h=e(D,d),m=h.length,w=y.length,u=t(h,y,m,w),u==1&&(d--,r(h,T16)throw Error(Yw+kt(e));if(!e.s)return new d(Br);for(wt=!1,u=h,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(n=Math.log(Aa(2,c))/Math.LN10*2+5|0,u+=n,r=i=a=new d(Br),d.precision=u;;){if(i=ft(i.times(e),u),r=r.times(++f),s=a.plus(ui(i,r,u)),In(s.d).slice(0,u)===In(a.d).slice(0,u)){for(;c--;)a=ft(a.times(a),u);return d.precision=h,t==null?(wt=!0,ft(a,h)):a}a=s}}function kt(e){for(var t=e.e*xt,r=e.d[0];r>=10;r/=10)t++;return t}function vx(e,t,r){if(t>e.LN10.sd())throw wt=!0,r&&(e.precision=r),Error(an+"LN10 precision limit exceeded");return ft(new e(e.LN10),t)}function Ui(e){for(var t="";e--;)t+="0";return t}function Oc(e,t){var r,n,i,a,s,u,f,c,d,h=1,m=10,g=e,b=g.d,y=g.constructor,w=y.precision;if(g.s<1)throw Error(an+(g.s?"NaN":"-Infinity"));if(g.eq(Br))return new y(0);if(t==null?(wt=!1,c=w):c=t,g.eq(10))return t==null&&(wt=!0),vx(y,c);if(c+=m,y.precision=c,r=In(b),n=r.charAt(0),a=kt(g),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=In(g.d),n=r.charAt(0),h++;a=kt(g),n>1?(g=new y("0."+r),a++):g=new y(n+"."+r.slice(1))}else return f=vx(y,c+2,w).times(a+""),g=Oc(new y(n+"."+r.slice(1)),c-m).plus(f),y.precision=w,t==null?(wt=!0,ft(g,w)):g;for(u=s=g=ui(g.minus(Br),g.plus(Br),c),d=ft(g.times(g),c),i=3;;){if(s=ft(s.times(d),c),f=u.plus(ui(s,new y(i),c)),In(f.d).slice(0,c)===In(u.d).slice(0,c))return u=u.times(2),a!==0&&(u=u.plus(vx(y,c+2,w).times(a+""))),u=ui(u,new y(h),c),y.precision=w,t==null?(wt=!0,ft(u,w)):u;u=f,i+=2}}function _N(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=zs(r/xt),e.d=[],n=(r+1)%xt,r<0&&(n+=xt),noh||e.e<-oh))throw Error(Yw+r)}else e.s=0,e.e=0,e.d=[0];return e}function ft(e,t,r){var n,i,a,s,u,f,c,d,h=e.d;for(s=1,a=h[0];a>=10;a/=10)s++;if(n=t-s,n<0)n+=xt,i=t,c=h[d=0];else{if(d=Math.ceil((n+1)/xt),a=h.length,d>=a)return e;for(c=a=h[d],s=1;a>=10;a/=10)s++;n%=xt,i=n-xt+s}if(r!==void 0&&(a=Aa(10,s-i-1),u=c/a%10|0,f=t<0||h[d+1]!==void 0||c%a,f=r<4?(u||f)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||f||r==6&&(n>0?i>0?c/Aa(10,s-i):0:h[d-1])%10&1||r==(e.s<0?8:7))),t<1||!h[0])return f?(a=kt(e),h.length=1,t=t-a-1,h[0]=Aa(10,(xt-t%xt)%xt),e.e=zs(-t/xt)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(n==0?(h.length=d,a=1,d--):(h.length=d+1,a=Aa(10,xt-n),h[d]=i>0?(c/Aa(10,s-i)%Aa(10,i)|0)*a:0),f)for(;;)if(d==0){(h[0]+=a)==Ht&&(h[0]=1,++e.e);break}else{if(h[d]+=a,h[d]!=Ht)break;h[d--]=0,a=1}for(n=h.length;h[--n]===0;)h.pop();if(wt&&(e.e>oh||e.e<-oh))throw Error(Yw+kt(e));return e}function zI(e,t){var r,n,i,a,s,u,f,c,d,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),wt?ft(t,g):t;if(f=e.d,h=t.d,n=t.e,c=e.e,f=f.slice(),s=c-n,s){for(d=s<0,d?(r=f,s=-s,u=h.length):(r=h,n=c,u=f.length),i=Math.max(Math.ceil(g/xt),u)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,u=h.length,d=i0;--i)f[u++]=0;for(i=h.length;i>s;){if(f[--i]0?a=a.charAt(0)+"."+a.slice(1)+Ui(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ui(-i-1)+a,r&&(n=r-s)>0&&(a+=Ui(n))):i>=s?(a+=Ui(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Ui(n))):((n=i+1)0&&(i+1===s&&(a+="."),a+=Ui(n))),e.s<0?"-"+a:a}function SN(e,t){if(e.length>t)return e.length=t,!0}function FI(e){var t,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ma+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return _N(s,a.toString())}else if(typeof a!="string")throw Error(Ma+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,_V.test(a))_N(s,a);else throw Error(Ma+a)}if(i.prototype=_e,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=FI,i.config=i.set=SV,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ma+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ma+r+": "+n);return this}var Qw=FI(wV);Br=new Qw(1);const ut=Qw;function OV(e){return PV(e)||AV(e)||EV(e)||jV()}function jV(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EV(e,t){if(e){if(typeof e=="string")return Fb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fb(e,t)}}function AV(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function PV(e){if(Array.isArray(e))return Fb(e)}function Fb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-s,ON(function(){for(var u=arguments.length,f=new Array(u),c=0;ce.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=e[Symbol.iterator](),u;!(n=(u=s.next()).done)&&(r.push(u.value),!(t&&r.length===t));n=!0);}catch(f){i=!0,a=f}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function UV(e){if(Array.isArray(e))return e}function VI(e){var t=jc(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function GI(e,t,r){if(e.lte(0))return new ut(0);var n=bp.getDigitCount(e.toNumber()),i=new ut(10).pow(n),a=e.div(i),s=n!==1?.05:.1,u=new ut(Math.ceil(a.div(s).toNumber())).add(r).mul(s),f=u.mul(i);return t?f:new ut(Math.ceil(f))}function WV(e,t,r){var n=1,i=new ut(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ut(10).pow(bp.getDigitCount(e)-1),i=new ut(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ut(Math.floor(e)))}else e===0?i=new ut(Math.floor((t-1)/2)):r||(i=new ut(Math.floor(e)));var s=Math.floor((t-1)/2),u=kV(TV(function(f){return i.add(new ut(f-s).mul(n)).toNumber()}),qb);return u(0,t)}function KI(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new ut(0),tickMin:new ut(0),tickMax:new ut(0)};var a=GI(new ut(t).sub(e).div(r-1),n,i),s;e<=0&&t>=0?s=new ut(0):(s=new ut(e).add(t).div(2),s=s.sub(new ut(s).mod(a)));var u=Math.ceil(s.sub(e).div(a).toNumber()),f=Math.ceil(new ut(t).sub(s).div(a).toNumber()),c=u+f+1;return c>r?KI(e,t,r,n,i+1):(c0?f+(r-c):f,u=t>0?u:u+(r-c)),{step:a,tickMin:s.sub(new ut(u).mul(a)),tickMax:s.add(new ut(f).mul(a))})}function HV(e){var t=jc(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),u=VI([r,n]),f=jc(u,2),c=f[0],d=f[1];if(c===-1/0||d===1/0){var h=d===1/0?[c].concat(Wb(qb(0,i-1).map(function(){return 1/0}))):[].concat(Wb(qb(0,i-1).map(function(){return-1/0})),[d]);return r>n?Ub(h):h}if(c===d)return WV(c,i,a);var m=KI(c,d,s,a),g=m.step,b=m.tickMin,y=m.tickMax,w=bp.rangeStep(b,y.add(new ut(.1).mul(g)),g);return r>n?Ub(w):w}function VV(e,t){var r=jc(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=VI([n,i]),u=jc(s,2),f=u[0],c=u[1];if(f===-1/0||c===1/0)return[n,i];if(f===c)return[f];var d=Math.max(t,2),h=GI(new ut(c).sub(f).div(d-1),a,0),m=[].concat(Wb(bp.rangeStep(new ut(f),new ut(c).sub(new ut(.99).mul(h)),h)),[c]);return n>i?Ub(m):m}var GV=WI(HV),KV=WI(VV),XV="Invariant failed";function za(e,t){throw new Error(XV)}var YV=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function hs(e){"@babel/helpers - typeof";return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hs(e)}function sh(){return sh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rh){g=[].concat(Mo(f.slice(0,b)),[h-y]);break}var w=g.length%2===0?[0,m]:[m];return[].concat(Mo(t.repeat(f,d)),Mo(g),w).map(function(S){return"".concat(S,"px")}).join(", ")}),wn(r,"id",Ds("recharts-line-")),wn(r,"pathRef",function(s){r.mainCurve=s}),wn(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),wn(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Kee(t,e),Wee(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.points,u=a.xAxis,f=a.yAxis,c=a.layout,d=a.children,h=Fr(d,nu);if(!h)return null;var m=function(y,w){return{x:y.x,y:y.y,value:y.value,errorVal:Bt(y.payload,w)}},g={clipPath:n?"url(#clipPath-".concat(i,")"):null};return z.createElement(Ze,g,h.map(function(b){return z.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:s,xAxis:u,yAxis:f,layout:c,dataPointFormatter:m})}))}},{key:"renderDots",value:function(n,i,a){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var u=this.props,f=u.dot,c=u.points,d=u.dataKey,h=Me(this.props,!1),m=Me(f,!0),g=c.map(function(y,w){var S=kr(kr(kr({key:"dot-".concat(w),r:3},h),m),{},{index:w,cx:y.x,cy:y.y,value:y.value,dataKey:d,payload:y.payload,points:c});return t.renderDotItem(f,S)}),b={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return z.createElement(Ze,sc({className:"recharts-line-dots",key:"dots"},b),g)}},{key:"renderCurveStatically",value:function(n,i,a,s){var u=this.props,f=u.type,c=u.layout,d=u.connectNulls;u.ref;var h=ST(u,Dee),m=kr(kr(kr({},Me(h,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},s),{},{type:f,layout:c,connectNulls:d});return z.createElement(dh,sc({},m,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,s=this.props,u=s.points,f=s.strokeDasharray,c=s.isAnimationActive,d=s.animationBegin,h=s.animationDuration,m=s.animationEasing,g=s.animationId,b=s.animateNewValues,y=s.width,w=s.height,S=this.state,O=S.prevPoints,E=S.totalLength;return z.createElement(Fn,{begin:d,duration:h,isActive:c,easing:m,from:{t:0},to:{t:1},key:"line-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var A=C.t;if(O){var N=O.length/u.length,T=u.map(function(D,U){var H=Math.floor(U*N);if(O[H]){var V=O[H],K=Lr(V.x,D.x),X=Lr(V.y,D.y);return kr(kr({},D),{},{x:K(A),y:X(A)})}if(b){var B=Lr(y*2,D.x),Z=Lr(w/2,D.y);return kr(kr({},D),{},{x:B(A),y:Z(A)})}return kr(kr({},D),{},{x:D.x,y:D.y})});return a.renderCurveStatically(T,n,i)}var R=Lr(0,E),I=R(A),q;if(f){var L="".concat(f).split(/[,\s]+/gim).map(function(D){return parseFloat(D)});q=a.getStrokeDasharray(I,E,L)}else q=a.generateSimpleStrokeDasharray(E,I);return a.renderCurveStatically(u,n,i,{strokeDasharray:q})})}},{key:"renderCurve",value:function(n,i){var a=this.props,s=a.points,u=a.isAnimationActive,f=this.state,c=f.prevPoints,d=f.totalLength;return u&&s&&s.length&&(!c&&d>0||!ru(c,s))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,s=i.dot,u=i.points,f=i.className,c=i.xAxis,d=i.yAxis,h=i.top,m=i.left,g=i.width,b=i.height,y=i.isAnimationActive,w=i.id;if(a||!u||!u.length)return null;var S=this.state.isAnimationFinished,O=u.length===1,E=Ue("recharts-line",f),C=c&&c.allowDataOverflow,A=d&&d.allowDataOverflow,N=C||A,T=qe(w)?this.id:w,R=(n=Me(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},I=R.r,q=I===void 0?3:I,L=R.strokeWidth,D=L===void 0?2:L,U=OF(s)?s:{},H=U.clipDot,V=H===void 0?!0:H,K=q*2+D;return z.createElement(Ze,{className:E},C||A?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(T)},z.createElement("rect",{x:C?m:m-g/2,y:A?h:h-b/2,width:C?g:g*2,height:A?b:b*2})),!V&&z.createElement("clipPath",{id:"clipPath-dots-".concat(T)},z.createElement("rect",{x:m-K/2,y:h-K/2,width:g+K,height:b+K}))):null,!O&&this.renderCurve(N,T),this.renderErrorBar(N,T),(O||s)&&this.renderDots(N,V,T),(!y||S)&&fi.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Mo(n),[0]):n,s=[],u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $te(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Bte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zte(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?s:t&&t.length&&he(i)&&he(a)?t.slice(i,a+1):[]};function gL(e){return e==="number"?[0,"auto"]:void 0}var M1=function(t,r,n,i){var a=t.graphicalItems,s=t.tooltipAxis,u=Rp(r,t);return n<0||!a||!a.length||n>=u.length?null:a.reduce(function(f,c){var d,h=(d=c.props.data)!==null&&d!==void 0?d:r;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(s.dataKey&&!s.allowDuplicatedCategory){var g=h===void 0?u:h;m=Dd(g,s.dataKey,i)}else m=h&&h[n]||u[n];return m?[].concat(Ns(f),[sD(c,m)]):f},[])},kT=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},s=Zte(a,n),u=t.orderedTooltipTicks,f=t.tooltipAxis,c=t.tooltipTicks,d=wG(s,u,c,f);if(d>=0&&c){var h=c[d]&&c[d].value,m=M1(t,r,d,h),g=Jte(n,u,d,a);return{activeTooltipIndex:d,activeLabel:h,activePayload:m,activeCoordinate:g}}return null},ere=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,h=t.children,m=t.stackOffset,g=tD(d,a);return n.reduce(function(b,y){var w,S=y.type.defaultProps!==void 0?ne(ne({},y.type.defaultProps),y.props):y.props,O=S.type,E=S.dataKey,C=S.allowDataOverflow,A=S.allowDuplicatedCategory,N=S.scale,T=S.ticks,R=S.includeHidden,I=S[s];if(b[I])return b;var q=Rp(t.data,{graphicalItems:i.filter(function($){var Q,ae=s in $.props?$.props[s]:(Q=$.type.defaultProps)===null||Q===void 0?void 0:Q[s];return ae===I}),dataStartIndex:f,dataEndIndex:c}),L=q.length,D,U,H;Ete(S.domain,C,O)&&(D=Kb(S.domain,null,C),g&&(O==="number"||N!=="auto")&&(H=nc(q,E,"category")));var V=gL(O);if(!D||D.length===0){var K,X=(K=S.domain)!==null&&K!==void 0?K:V;if(E){if(D=nc(q,E,O),O==="category"&&g){var B=pF(D);A&&B?(U=D,D=Sh(0,L)):A||(D=MN(X,D,y).reduce(function($,Q){return $.indexOf(Q)>=0?$:[].concat(Ns($),[Q])},[]))}else if(O==="category")A?D=D.filter(function($){return $!==""&&!qe($)}):D=MN(X,D,y).reduce(function($,Q){return $.indexOf(Q)>=0||Q===""||qe(Q)?$:[].concat(Ns($),[Q])},[]);else if(O==="number"){var Z=EG(q,i.filter(function($){var Q,ae,pe=s in $.props?$.props[s]:(Q=$.type.defaultProps)===null||Q===void 0?void 0:Q[s],ye="hide"in $.props?$.props.hide:(ae=$.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return pe===I&&(R||!ye)}),E,a,d);Z&&(D=Z)}g&&(O==="number"||N!=="auto")&&(H=nc(q,E,"category"))}else g?D=Sh(0,L):u&&u[I]&&u[I].hasStack&&O==="number"?D=m==="expand"?[0,1]:oD(u[I].stackGroups,f,c):D=eD(q,i.filter(function($){var Q=s in $.props?$.props[s]:$.type.defaultProps[s],ae="hide"in $.props?$.props.hide:$.type.defaultProps.hide;return Q===I&&(R||!ae)}),O,d,!0);if(O==="number")D=T1(h,D,I,a,T),X&&(D=Kb(X,D,C));else if(O==="category"&&X){var ee=X,M=D.every(function($){return ee.indexOf($)>=0});M&&(D=ee)}}return ne(ne({},b),{},Le({},I,ne(ne({},S),{},{axisType:a,domain:D,categoricalDomain:H,duplicateDomain:U,originalDomain:(w=S.domain)!==null&&w!==void 0?w:V,isCategorical:g,layout:d})))},{})},tre=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,h=t.children,m=Rp(t.data,{graphicalItems:n,dataStartIndex:f,dataEndIndex:c}),g=m.length,b=tD(d,a),y=-1;return n.reduce(function(w,S){var O=S.type.defaultProps!==void 0?ne(ne({},S.type.defaultProps),S.props):S.props,E=O[s],C=gL("number");if(!w[E]){y++;var A;return b?A=Sh(0,g):u&&u[E]&&u[E].hasStack?(A=oD(u[E].stackGroups,f,c),A=T1(h,A,E,a)):(A=Kb(C,eD(m,n.filter(function(N){var T,R,I=s in N.props?N.props[s]:(T=N.type.defaultProps)===null||T===void 0?void 0:T[s],q="hide"in N.props?N.props.hide:(R=N.type.defaultProps)===null||R===void 0?void 0:R.hide;return I===E&&!q}),"number",d),i.defaultProps.allowDataOverflow),A=T1(h,A,E,a)),ne(ne({},w),{},Le({},E,ne(ne({axisType:a},i.defaultProps),{},{hide:!0,orientation:zr(Yte,"".concat(a,".").concat(y%2),null),domain:A,originalDomain:C,isCategorical:b,layout:d})))}return w},{})},rre=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,s=r.graphicalItems,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.children,h="".concat(i,"Id"),m=Fr(d,a),g={};return m&&m.length?g=ere(t,{axes:m,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:f,dataEndIndex:c}):s&&s.length&&(g=tre(t,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:f,dataEndIndex:c})),g},nre=function(t){var r=Wi(t),n=li(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ew(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ch(r,n)}},RT=function(t){var r=t.children,n=t.defaultShowTooltip,i=Mr(r,xs),a=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},ire=function(t){return!t||!t.length?!1:t.some(function(r){var n=ci(r&&r.type);return n&&n.indexOf("Bar")>=0})},MT=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},are=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,s=a===void 0?{}:a,u=t.yAxisMap,f=u===void 0?{}:u,c=n.width,d=n.height,h=n.children,m=n.margin||{},g=Mr(h,xs),b=Mr(h,Qo),y=Object.keys(f).reduce(function(A,N){var T=f[N],R=T.orientation;return!T.mirror&&!T.hide?ne(ne({},A),{},Le({},R,A[R]+T.width)):A},{left:m.left||0,right:m.right||0}),w=Object.keys(s).reduce(function(A,N){var T=s[N],R=T.orientation;return!T.mirror&&!T.hide?ne(ne({},A),{},Le({},R,zr(A,"".concat(R))+T.height)):A},{top:m.top||0,bottom:m.bottom||0}),S=ne(ne({},w),y),O=S.bottom;g&&(S.bottom+=g.props.height||xs.defaultProps.height),b&&r&&(S=OG(S,i,n,r));var E=c-S.left-S.right,C=d-S.top-S.bottom;return ne(ne({brushBottom:O},S),{},{width:Math.max(E,0),height:Math.max(C,0)})},ore=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},c_=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,s=t.validateTooltipEventTypes,u=s===void 0?["axis"]:s,f=t.axisComponents,c=t.legendContent,d=t.formatAxisMap,h=t.defaultProps,m=function(S,O){var E=O.graphicalItems,C=O.stackGroups,A=O.offset,N=O.updateId,T=O.dataStartIndex,R=O.dataEndIndex,I=S.barSize,q=S.layout,L=S.barGap,D=S.barCategoryGap,U=S.maxBarSize,H=MT(q),V=H.numericAxisName,K=H.cateAxisName,X=ire(E),B=[];return E.forEach(function(Z,ee){var M=Rp(S.data,{graphicalItems:[Z],dataStartIndex:T,dataEndIndex:R}),$=Z.type.defaultProps!==void 0?ne(ne({},Z.type.defaultProps),Z.props):Z.props,Q=$.dataKey,ae=$.maxBarSize,pe=$["".concat(V,"Id")],ye=$["".concat(K,"Id")],oe={},me=f.reduce(function(Kt,Xt){var io=O["".concat(Xt.axisType,"Map")],Vs=$["".concat(Xt.axisType,"Id")];io&&io[Vs]||Xt.axisType==="zAxis"||za();var Gs=io[Vs];return ne(ne({},Kt),{},Le(Le({},Xt.axisType,Gs),"".concat(Xt.axisType,"Ticks"),li(Gs)))},oe),ie=me[K],ue=me["".concat(K,"Ticks")],ve=C&&C[pe]&&C[pe].hasStack&&IG(Z,C[pe].stackGroups),re=ci(Z.type).indexOf("Bar")>=0,De=ch(ie,ue),Te=[],Ke=X&&_G({barSize:I,stackGroups:C,totalSize:ore(me,K)});if(re){var lt,vt,dr=qe(ae)?U:ae,Or=(lt=(vt=ch(ie,ue,!0))!==null&&vt!==void 0?vt:dr)!==null&<!==void 0?lt:0;Te=SG({barGap:L,barCategoryGap:D,bandSize:Or!==De?Or:De,sizeList:Ke[ye],maxBarSize:dr}),Or!==De&&(Te=Te.map(function(Kt){return ne(ne({},Kt),{},{position:ne(ne({},Kt.position),{},{offset:Kt.position.offset-Or/2})})}))}var jr=Z&&Z.type&&Z.type.getComposedData;jr&&B.push({props:ne(ne({},jr(ne(ne({},me),{},{displayedData:M,props:S,dataKey:Q,item:Z,bandSize:De,barPosition:Te,offset:A,stackedData:ve,layout:q,dataStartIndex:T,dataEndIndex:R}))),{},Le(Le(Le({key:Z.key||"item-".concat(ee)},V,me[V]),K,me[K]),"animationId",N)),childIndex:AF(Z,S.children),item:Z})}),B},g=function(S,O){var E=S.props,C=S.dataStartIndex,A=S.dataEndIndex,N=S.updateId;if(!KE({props:E}))return null;var T=E.children,R=E.layout,I=E.stackOffset,q=E.data,L=E.reverseStackOrder,D=MT(R),U=D.numericAxisName,H=D.cateAxisName,V=Fr(T,n),K=RG(q,V,"".concat(U,"Id"),"".concat(H,"Id"),I,L),X=f.reduce(function($,Q){var ae="".concat(Q.axisType,"Map");return ne(ne({},$),{},Le({},ae,rre(E,ne(ne({},Q),{},{graphicalItems:V,stackGroups:Q.axisType===U&&K,dataStartIndex:C,dataEndIndex:A}))))},{}),B=are(ne(ne({},X),{},{props:E,graphicalItems:V}),O?.legendBBox);Object.keys(X).forEach(function($){X[$]=d(E,X[$],B,$.replace("Map",""),r)});var Z=X["".concat(H,"Map")],ee=nre(Z),M=m(E,ne(ne({},X),{},{dataStartIndex:C,dataEndIndex:A,updateId:N,graphicalItems:V,stackGroups:K,offset:B}));return ne(ne({formattedGraphicalItems:M,graphicalItems:V,offset:B,stackGroups:K},ee),X)},b=(function(w){function S(O){var E,C,A;return Bte(this,S),A=qte(this,S,[O]),Le(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Le(A,"accessibilityManager",new jte),Le(A,"handleLegendBBoxUpdate",function(N){if(N){var T=A.state,R=T.dataStartIndex,I=T.dataEndIndex,q=T.updateId;A.setState(ne({legendBBox:N},g({props:A.props,dataStartIndex:R,dataEndIndex:I,updateId:q},ne(ne({},A.state),{},{legendBBox:N}))))}}),Le(A,"handleReceiveSyncEvent",function(N,T,R){if(A.props.syncId===N){if(R===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(T)}}),Le(A,"handleBrushChange",function(N){var T=N.startIndex,R=N.endIndex;if(T!==A.state.dataStartIndex||R!==A.state.dataEndIndex){var I=A.state.updateId;A.setState(function(){return ne({dataStartIndex:T,dataEndIndex:R},g({props:A.props,dataStartIndex:T,dataEndIndex:R,updateId:I},A.state))}),A.triggerSyncEvent({dataStartIndex:T,dataEndIndex:R})}}),Le(A,"handleMouseEnter",function(N){var T=A.getMouseInfo(N);if(T){var R=ne(ne({},T),{},{isTooltipActive:!0});A.setState(R),A.triggerSyncEvent(R);var I=A.props.onMouseEnter;ze(I)&&I(R,N)}}),Le(A,"triggeredAfterMouseMove",function(N){var T=A.getMouseInfo(N),R=T?ne(ne({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(R),A.triggerSyncEvent(R);var I=A.props.onMouseMove;ze(I)&&I(R,N)}),Le(A,"handleItemMouseEnter",function(N){A.setState(function(){return{isTooltipActive:!0,activeItem:N,activePayload:N.tooltipPayload,activeCoordinate:N.tooltipPosition||{x:N.cx,y:N.cy}}})}),Le(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),Le(A,"handleMouseMove",function(N){N.persist(),A.throttleTriggeredAfterMouseMove(N)}),Le(A,"handleMouseLeave",function(N){A.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};A.setState(T),A.triggerSyncEvent(T);var R=A.props.onMouseLeave;ze(R)&&R(T,N)}),Le(A,"handleOuterEvent",function(N){var T=EF(N),R=zr(A.props,"".concat(T));if(T&&ze(R)){var I,q;/.*touch.*/i.test(T)?q=A.getMouseInfo(N.changedTouches[0]):q=A.getMouseInfo(N),R((I=q)!==null&&I!==void 0?I:{},N)}}),Le(A,"handleClick",function(N){var T=A.getMouseInfo(N);if(T){var R=ne(ne({},T),{},{isTooltipActive:!0});A.setState(R),A.triggerSyncEvent(R);var I=A.props.onClick;ze(I)&&I(R,N)}}),Le(A,"handleMouseDown",function(N){var T=A.props.onMouseDown;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleMouseUp",function(N){var T=A.props.onMouseUp;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleTouchMove",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(N.changedTouches[0])}),Le(A,"handleTouchStart",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.handleMouseDown(N.changedTouches[0])}),Le(A,"handleTouchEnd",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.handleMouseUp(N.changedTouches[0])}),Le(A,"handleDoubleClick",function(N){var T=A.props.onDoubleClick;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleContextMenu",function(N){var T=A.props.onContextMenu;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"triggerSyncEvent",function(N){A.props.syncId!==void 0&&Gx.emit(Kx,A.props.syncId,N,A.eventEmitterSymbol)}),Le(A,"applySyncEvent",function(N){var T=A.props,R=T.layout,I=T.syncMethod,q=A.state.updateId,L=N.dataStartIndex,D=N.dataEndIndex;if(N.dataStartIndex!==void 0||N.dataEndIndex!==void 0)A.setState(ne({dataStartIndex:L,dataEndIndex:D},g({props:A.props,dataStartIndex:L,dataEndIndex:D,updateId:q},A.state)));else if(N.activeTooltipIndex!==void 0){var U=N.chartX,H=N.chartY,V=N.activeTooltipIndex,K=A.state,X=K.offset,B=K.tooltipTicks;if(!X)return;if(typeof I=="function")V=I(B,N);else if(I==="value"){V=-1;for(var Z=0;Z=0){var ve,re;if(U.dataKey&&!U.allowDuplicatedCategory){var De=typeof U.dataKey=="function"?ue:"payload.".concat(U.dataKey.toString());ve=Dd(Z,De,V),re=ee&&M&&Dd(M,De,V)}else ve=Z?.[H],re=ee&&M&&M[H];if(ye||pe){var Te=N.props.activeIndex!==void 0?N.props.activeIndex:H;return[P.cloneElement(N,ne(ne(ne({},I.props),me),{},{activeIndex:Te})),null,null]}if(!qe(ve))return[ie].concat(Ns(A.renderActivePoints({item:I,activePoint:ve,basePoint:re,childIndex:H,isRange:ee})))}else{var Ke,lt=(Ke=A.getItemByXY(A.state.activeCoordinate))!==null&&Ke!==void 0?Ke:{graphicalItem:ie},vt=lt.graphicalItem,dr=vt.item,Or=dr===void 0?N:dr,jr=vt.childIndex,Kt=ne(ne(ne({},I.props),me),{},{activeIndex:jr});return[P.cloneElement(Or,Kt),null,null]}return ee?[ie,null,null]:[ie,null]}),Le(A,"renderCustomized",function(N,T,R){return P.cloneElement(N,ne(ne({key:"recharts-customized-".concat(R)},A.props),A.state))}),Le(A,"renderMap",{CartesianGrid:{handler:Lf,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Lf},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Lf},YAxis:{handler:Lf},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((E=O.id)!==null&&E!==void 0?E:Ds("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=ZM(A.triggeredAfterMouseMove,(C=O.throttleDelay)!==null&&C!==void 0?C:1e3/60),A.state={},A}return Hte(S,w),Fte(S,[{key:"componentDidMount",value:function(){var E,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,C=E.children,A=E.data,N=E.height,T=E.layout,R=Mr(C,Dr);if(R){var I=R.props.defaultIndex;if(!(typeof I!="number"||I<0||I>this.state.tooltipTicks.length-1)){var q=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,L=M1(this.state,A,I,q),D=this.state.tooltipTicks[I].coordinate,U=(this.state.offset.top+N)/2,H=T==="horizontal",V=H?{x:D,y:U}:{y:D,x:U},K=this.state.formattedGraphicalItems.find(function(B){var Z=B.item;return Z.type.name==="Scatter"});K&&(V=ne(ne({},V),K.props.points[I].tooltipPosition),L=K.props.points[I].tooltipPayload);var X={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:q,activePayload:L,activeCoordinate:V};this.setState(X),this.renderCursor(R),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var A,N;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0}})}return null}},{key:"componentDidUpdate",value:function(E){vb([Mr(E.children,Dr)],[Mr(this.props.children,Dr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Mr(this.props.children,Dr);if(E&&typeof E.props.shared=="boolean"){var C=E.props.shared?"axis":"item";return u.indexOf(C)>=0?C:a}return a}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var C=this.container,A=C.getBoundingClientRect(),N=hU(A),T={chartX:Math.round(E.pageX-N.left),chartY:Math.round(E.pageY-N.top)},R=A.width/C.offsetWidth||1,I=this.inRange(T.chartX,T.chartY,R);if(!I)return null;var q=this.state,L=q.xAxisMap,D=q.yAxisMap,U=this.getTooltipEventType(),H=kT(this.state,this.props.data,this.props.layout,I);if(U!=="axis"&&L&&D){var V=Wi(L).scale,K=Wi(D).scale,X=V&&V.invert?V.invert(T.chartX):null,B=K&&K.invert?K.invert(T.chartY):null;return ne(ne({},T),{},{xValue:X,yValue:B},H)}return H?ne(ne({},T),H):null}},{key:"inRange",value:function(E,C){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=this.props.layout,T=E/A,R=C/A;if(N==="horizontal"||N==="vertical"){var I=this.state.offset,q=T>=I.left&&T<=I.left+I.width&&R>=I.top&&R<=I.top+I.height;return q?{x:T,y:R}:null}var L=this.state,D=L.angleAxisMap,U=L.radiusAxisMap;if(D&&U){var H=Wi(D);return LN({x:T,y:R},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,C=this.getTooltipEventType(),A=Mr(E,Dr),N={};A&&C==="axis"&&(A.props.trigger==="click"?N={onClick:this.handleClick}:N={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=Ld(this.props,this.handleOuterEvent);return ne(ne({},T),N)}},{key:"addListener",value:function(){Gx.on(Kx,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Gx.removeListener(Kx,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,C,A){for(var N=this.state.formattedGraphicalItems,T=0,R=N.length;Tp.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg border border-gray-100 hover:bg-gray-100 transition-colors",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 font-bold text-xs",children:e.template.substring(0,2)}),p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-semibold text-gray-900",children:e.product}),p.jsxs("p",{className:"text-xs text-gray-500",children:[e.id," • ",e.user]})]})]}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsx("span",{className:"text-xs text-gray-500 font-medium",children:e.time}),p.jsx(Rn,{variant:"secondary",className:e.status==="expired"?"bg-red-100 text-red-700":"bg-green-100 text-green-700",children:e.status})]})]},e.id))})})]})]}),p.jsx("div",{className:"space-y-6",children:p.jsxs(Ir,{className:"shadow-sm border-gray-200",children:[p.jsx(yn,{children:p.jsxs(xn,{className:"text-base font-bold text-gray-800 flex items-center gap-2",children:[p.jsx(ub,{className:"w-5 h-5 text-gray-500"}),"By Category"]})}),p.jsxs(tn,{children:[p.jsxs("div",{className:"h-[200px] relative",children:[p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(lre,{children:[p.jsx(wi,{data:Yx,cx:"50%",cy:"50%",innerRadius:60,outerRadius:80,paddingAngle:5,dataKey:"value",children:Yx.map((e,t)=>p.jsx(cp,{fill:e.color},`cell-${t}`))}),p.jsx(Dr,{})]})}),p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center flex-col pointer-events-none",children:[p.jsx("span",{className:"text-2xl font-bold text-gray-900",children:"1000"}),p.jsx("span",{className:"text-xs text-gray-500",children:"Total"})]})]}),p.jsx("div",{className:"mt-4 space-y-2",children:Yx.map(e=>p.jsxs("div",{className:"flex items-center justify-between text-sm",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),p.jsx("span",{className:"text-gray-600",children:e.name})]}),p.jsx("span",{className:"font-medium text-gray-900",children:e.value})]},e.name))})]})]})})]})]})}function Io({title:e,value:t,trend:r,trendUp:n,icon:i,color:a,bgColor:s}){return p.jsx(Ir,{className:"border-gray-200 shadow-sm hover:shadow-md transition-shadow",children:p.jsxs(tn,{className:"p-6",children:[p.jsxs("div",{className:"flex justify-between items-start",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-medium text-gray-500 mb-1",children:e}),p.jsx("h3",{className:"text-2xl font-bold text-gray-900",children:t})]}),p.jsx("div",{className:`p-2 rounded-lg ${s}`,children:p.jsx(i,{className:`w-5 h-5 ${a}`})})]}),p.jsxs("div",{className:"mt-4 flex items-center text-sm",children:[n?p.jsx(fR,{className:"w-4 h-4 text-green-500 mr-1"}):p.jsx(aB,{className:"w-4 h-4 text-red-500 mr-1"}),p.jsx("span",{className:n?"text-green-600 font-medium":"text-red-600 font-medium",children:r}),p.jsx("span",{className:"text-gray-400 ml-1",children:"Vs. last period"})]})]})})}function dre({title:e}){return p.jsxs("div",{className:"space-y-6",children:[p.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[1,2,3,4].map(t=>p.jsxs(Ir,{children:[p.jsx(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:p.jsxs(xn,{className:"text-sm font-medium",children:["Metric ",t]})}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"000"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+0.0% from last month"})]})]},t))}),p.jsx(Ir,{className:"min-h-[400px] flex items-center justify-center border-dashed",children:p.jsxs("div",{className:"text-center text-muted-foreground",children:[p.jsxs("h3",{className:"text-lg font-medium",children:[e," Module"]}),p.jsx("p",{children:"This module is currently under development."})]})})]})}function br({className:e,...t}){return p.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:p.jsx("table",{"data-slot":"table",className:Ie("w-full caption-bottom text-sm",e),...t})})}function wr({className:e,...t}){return p.jsx("thead",{"data-slot":"table-header",className:Ie("[&_tr]:border-b",e),...t})}function _r({className:e,...t}){return p.jsx("tbody",{"data-slot":"table-body",className:Ie("[&_tr:last-child]:border-0",e),...t})}function Qe({className:e,...t}){return p.jsx("tr",{"data-slot":"table-row",className:Ie("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function ge({className:e,...t}){return p.jsx("th",{"data-slot":"table-head",className:Ie("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function de({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:Ie("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function IT(e){const t=hre(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(mre);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function hre(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=gre(i),u=vre(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pre=Symbol("radix.slottable");function mre(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pre}function vre(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function gre(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function xL(e){const t=e+"CollectionProvider",[r,n]=gi(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=y=>{const{scope:w,children:S}=y,O=z.useRef(null),E=z.useRef(new Map).current;return p.jsx(i,{scope:w,itemMap:E,collectionRef:O,children:S})};s.displayName=t;const u=e+"CollectionSlot",f=IT(u),c=z.forwardRef((y,w)=>{const{scope:S,children:O}=y,E=a(u,S),C=Je(w,E.collectionRef);return p.jsx(f,{ref:C,children:O})});c.displayName=u;const d=e+"CollectionItemSlot",h="data-radix-collection-item",m=IT(d),g=z.forwardRef((y,w)=>{const{scope:S,children:O,...E}=y,C=z.useRef(null),A=Je(w,C),N=a(d,S);return z.useEffect(()=>(N.itemMap.set(C,{ref:C,...E}),()=>void N.itemMap.delete(C))),p.jsx(m,{[h]:"",ref:A,children:O})});g.displayName=d;function b(y){const w=a(e+"CollectionConsumer",y);return z.useCallback(()=>{const O=w.collectionRef.current;if(!O)return[];const E=Array.from(O.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((N,T)=>E.indexOf(N.ref.current)-E.indexOf(T.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:s,Slot:c,ItemSlot:g},b,n]}function yre(e,t=globalThis?.document){const r=ar(e);P.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var xre="DismissableLayer",I1="dismissableLayer.update",bre="dismissableLayer.pointerDownOutside",wre="dismissableLayer.focusOutside",DT,bL=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),u_=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:u,...f}=e,c=P.useContext(bL),[d,h]=P.useState(null),m=d?.ownerDocument??globalThis?.document,[,g]=P.useState({}),b=Je(t,T=>h(T)),y=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),S=y.indexOf(w),O=d?y.indexOf(d):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,C=O>=S,A=Ore(T=>{const R=T.target,I=[...c.branches].some(q=>q.contains(R));!C||I||(i?.(T),s?.(T),T.defaultPrevented||u?.())},m),N=jre(T=>{const R=T.target;[...c.branches].some(q=>q.contains(R))||(a?.(T),s?.(T),T.defaultPrevented||u?.())},m);return yre(T=>{O===c.layers.size-1&&(n?.(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},m),P.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(DT=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),LT(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=DT)}},[d,m,r,c]),P.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),LT())},[d,c]),P.useEffect(()=>{const T=()=>g({});return document.addEventListener(I1,T),()=>document.removeEventListener(I1,T)},[]),p.jsx(We.div,{...f,ref:b,style:{pointerEvents:E?C?"auto":"none":void 0,...e.style},onFocusCapture:Fe(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Fe(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Fe(e.onPointerDownCapture,A.onPointerDownCapture)})});u_.displayName=xre;var _re="DismissableLayerBranch",Sre=P.forwardRef((e,t)=>{const r=P.useContext(bL),n=P.useRef(null),i=Je(t,n);return P.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),p.jsx(We.div,{...e,ref:i})});Sre.displayName=_re;function Ore(e,t=globalThis?.document){const r=ar(e),n=P.useRef(!1),i=P.useRef(()=>{});return P.useEffect(()=>{const a=u=>{if(u.target&&!n.current){let f=function(){wL(bre,r,c,{discrete:!0})};const c={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function jre(e,t=globalThis?.document){const r=ar(e),n=P.useRef(!1);return P.useEffect(()=>{const i=a=>{a.target&&!n.current&&wL(wre,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function LT(){const e=new CustomEvent(I1);document.dispatchEvent(e)}function wL(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?P6(i,a):i.dispatchEvent(a)}var Qx=0;function _L(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$T()),document.body.insertAdjacentElement("beforeend",e[1]??$T()),Qx++,()=>{Qx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Qx--}},[])}function $T(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Zx="focusScope.autoFocusOnMount",Jx="focusScope.autoFocusOnUnmount",BT={bubbles:!1,cancelable:!0},Ere="FocusScope",f_=P.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[u,f]=P.useState(null),c=ar(i),d=ar(a),h=P.useRef(null),m=Je(t,y=>f(y)),g=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(n){let y=function(E){if(g.paused||!u)return;const C=E.target;u.contains(C)?h.current=C:qi(h.current,{select:!0})},w=function(E){if(g.paused||!u)return;const C=E.relatedTarget;C!==null&&(u.contains(C)||qi(h.current,{select:!0}))},S=function(E){if(document.activeElement===document.body)for(const A of E)A.removedNodes.length>0&&qi(u)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const O=new MutationObserver(S);return u&&O.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),O.disconnect()}}},[n,u,g.paused]),P.useEffect(()=>{if(u){FT.add(g);const y=document.activeElement;if(!u.contains(y)){const S=new CustomEvent(Zx,BT);u.addEventListener(Zx,c),u.dispatchEvent(S),S.defaultPrevented||(Are(kre(SL(u)),{select:!0}),document.activeElement===y&&qi(u))}return()=>{u.removeEventListener(Zx,c),setTimeout(()=>{const S=new CustomEvent(Jx,BT);u.addEventListener(Jx,d),u.dispatchEvent(S),S.defaultPrevented||qi(y??document.body,{select:!0}),u.removeEventListener(Jx,d),FT.remove(g)},0)}}},[u,c,d,g]);const b=P.useCallback(y=>{if(!r&&!n||g.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(w&&S){const O=y.currentTarget,[E,C]=Pre(O);E&&C?!y.shiftKey&&S===C?(y.preventDefault(),r&&qi(E,{select:!0})):y.shiftKey&&S===E&&(y.preventDefault(),r&&qi(C,{select:!0})):S===O&&y.preventDefault()}},[r,n,g.paused]);return p.jsx(We.div,{tabIndex:-1,...s,ref:m,onKeyDown:b})});f_.displayName=Ere;function Are(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(qi(n,{select:t}),document.activeElement!==r)return}function Pre(e){const t=SL(e),r=zT(t,e),n=zT(t.reverse(),e);return[r,n]}function SL(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function zT(e,t){for(const r of e)if(!Nre(r,{upTo:t}))return r}function Nre(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cre(e){return e instanceof HTMLInputElement&&"select"in e}function qi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Cre(e)&&t&&e.select()}}var FT=Tre();function Tre(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=qT(e,t),e.unshift(t)},remove(t){e=qT(e,t),e[0]?.resume()}}}function qT(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function kre(e){return e.filter(t=>t.tagName!=="A")}var Rre=X1[" useId ".trim().toString()]||(()=>{}),Mre=0;function Gi(e){const[t,r]=P.useState(Rre());return Rt(()=>{r(n=>n??String(Mre++))},[e]),e||(t?`radix-${t}`:"")}const Ire=["top","right","bottom","left"],Xi=Math.min,$r=Math.max,$h=Math.round,$f=Math.floor,Bn=e=>({x:e,y:e}),Dre={left:"right",right:"left",bottom:"top",top:"bottom"},Lre={start:"end",end:"start"};function D1(e,t,r){return $r(e,Xi(t,r))}function mi(e,t){return typeof e=="function"?e(t):e}function vi(e){return e.split("-")[0]}function Us(e){return e.split("-")[1]}function d_(e){return e==="x"?"y":"x"}function h_(e){return e==="y"?"height":"width"}const $re=new Set(["top","bottom"]);function Dn(e){return $re.has(vi(e))?"y":"x"}function p_(e){return d_(Dn(e))}function Bre(e,t,r){r===void 0&&(r=!1);const n=Us(e),i=p_(e),a=h_(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bh(s)),[s,Bh(s)]}function zre(e){const t=Bh(e);return[L1(e),t,L1(t)]}function L1(e){return e.replace(/start|end/g,t=>Lre[t])}const UT=["left","right"],WT=["right","left"],Fre=["top","bottom"],qre=["bottom","top"];function Ure(e,t,r){switch(e){case"top":case"bottom":return r?t?WT:UT:t?UT:WT;case"left":case"right":return t?Fre:qre;default:return[]}}function Wre(e,t,r,n){const i=Us(e);let a=Ure(vi(e),r==="start",n);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(L1)))),a}function Bh(e){return e.replace(/left|right|bottom|top/g,t=>Dre[t])}function Hre(e){return{top:0,right:0,bottom:0,left:0,...e}}function OL(e){return typeof e!="number"?Hre(e):{top:e,right:e,bottom:e,left:e}}function zh(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function HT(e,t,r){let{reference:n,floating:i}=e;const a=Dn(t),s=p_(t),u=h_(s),f=vi(t),c=a==="y",d=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,m=n[u]/2-i[u]/2;let g;switch(f){case"top":g={x:d,y:n.y-i.height};break;case"bottom":g={x:d,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:h};break;case"left":g={x:n.x-i.width,y:h};break;default:g={x:n.x,y:n.y}}switch(Us(t)){case"start":g[s]-=m*(r&&c?-1:1);break;case"end":g[s]+=m*(r&&c?-1:1);break}return g}async function Vre(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:s,elements:u,strategy:f}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=mi(t,e),b=OL(g),w=u[m?h==="floating"?"reference":"floating":h],S=zh(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(w)))==null||r?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:c,rootBoundary:d,strategy:f})),O=h==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),C=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},A=zh(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:O,offsetParent:E,strategy:f}):O);return{top:(S.top-A.top+b.top)/C.y,bottom:(A.bottom-S.bottom+b.bottom)/C.y,left:(S.left-A.left+b.left)/C.x,right:(A.right-S.right+b.right)/C.x}}const Gre=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,u=a.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=HT(c,n,f),m=n,g={},b=0;for(let w=0;w({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:s,elements:u,middlewareData:f}=t,{element:c,padding:d=0}=mi(e,t)||{};if(c==null)return{};const h=OL(d),m={x:r,y:n},g=p_(i),b=h_(g),y=await s.getDimensions(c),w=g==="y",S=w?"top":"left",O=w?"bottom":"right",E=w?"clientHeight":"clientWidth",C=a.reference[b]+a.reference[g]-m[g]-a.floating[b],A=m[g]-a.reference[g],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let T=N?N[E]:0;(!T||!await(s.isElement==null?void 0:s.isElement(N)))&&(T=u.floating[E]||a.floating[b]);const R=C/2-A/2,I=T/2-y[b]/2-1,q=Xi(h[S],I),L=Xi(h[O],I),D=q,U=T-y[b]-L,H=T/2-y[b]/2+R,V=D1(D,H,U),K=!f.arrow&&Us(i)!=null&&H!==V&&a.reference[b]/2-(HH<=0)){var L,D;const H=(((L=a.flip)==null?void 0:L.index)||0)+1,V=T[H];if(V&&(!(h==="alignment"?O!==Dn(V):!1)||q.every(B=>Dn(B.placement)===O?B.overflows[0]>0:!0)))return{data:{index:H,overflows:q},reset:{placement:V}};let K=(D=q.filter(X=>X.overflows[0]<=0).sort((X,B)=>X.overflows[1]-B.overflows[1])[0])==null?void 0:D.placement;if(!K)switch(g){case"bestFit":{var U;const X=(U=q.filter(B=>{if(N){const Z=Dn(B.placement);return Z===O||Z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(Z=>Z>0).reduce((Z,ee)=>Z+ee,0)]).sort((B,Z)=>B[1]-Z[1])[0])==null?void 0:U[0];X&&(K=X);break}case"initialPlacement":K=u;break}if(i!==K)return{reset:{placement:K}}}return{}}}};function VT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function GT(e){return Ire.some(t=>e[t]>=0)}const Yre=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...a}=mi(e,t);switch(i){case"referenceHidden":{const s=await n.detectOverflow(t,{...a,elementContext:"reference"}),u=VT(s,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:GT(u)}}}case"escaped":{const s=await n.detectOverflow(t,{...a,altBoundary:!0}),u=VT(s,r.floating);return{data:{escapedOffsets:u,escaped:GT(u)}}}default:return{}}}}},jL=new Set(["left","top"]);async function Qre(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=vi(r),u=Us(r),f=Dn(r)==="y",c=jL.has(s)?-1:1,d=a&&f?-1:1,h=mi(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof b=="number"&&(g=u==="end"?b*-1:b),f?{x:g*d,y:m*c}:{x:m*c,y:g*d}}const Zre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:s,middlewareData:u}=t,f=await Qre(t,e);return s===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:a+f.y,data:{...f,placement:s}}}}},Jre=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:a}=t,{mainAxis:s=!0,crossAxis:u=!1,limiter:f={fn:S=>{let{x:O,y:E}=S;return{x:O,y:E}}},...c}=mi(e,t),d={x:r,y:n},h=await a.detectOverflow(t,c),m=Dn(vi(i)),g=d_(m);let b=d[g],y=d[m];if(s){const S=g==="y"?"top":"left",O=g==="y"?"bottom":"right",E=b+h[S],C=b-h[O];b=D1(E,b,C)}if(u){const S=m==="y"?"top":"left",O=m==="y"?"bottom":"right",E=y+h[S],C=y-h[O];y=D1(E,y,C)}const w=f.fn({...t,[g]:b,[m]:y});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[g]:s,[m]:u}}}}}},ene=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:s}=t,{offset:u=0,mainAxis:f=!0,crossAxis:c=!0}=mi(e,t),d={x:r,y:n},h=Dn(i),m=d_(h);let g=d[m],b=d[h];const y=mi(u,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const E=m==="y"?"height":"width",C=a.reference[m]-a.floating[E]+w.mainAxis,A=a.reference[m]+a.reference[E]-w.mainAxis;gA&&(g=A)}if(c){var S,O;const E=m==="y"?"width":"height",C=jL.has(vi(i)),A=a.reference[h]-a.floating[E]+(C&&((S=s.offset)==null?void 0:S[h])||0)+(C?0:w.crossAxis),N=a.reference[h]+a.reference[E]+(C?0:((O=s.offset)==null?void 0:O[h])||0)-(C?w.crossAxis:0);bN&&(b=N)}return{[m]:g,[h]:b}}}},tne=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:s,elements:u}=t,{apply:f=()=>{},...c}=mi(e,t),d=await s.detectOverflow(t,c),h=vi(i),m=Us(i),g=Dn(i)==="y",{width:b,height:y}=a.floating;let w,S;h==="top"||h==="bottom"?(w=h,S=m===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(S=h,w=m==="end"?"top":"bottom");const O=y-d.top-d.bottom,E=b-d.left-d.right,C=Xi(y-d[w],O),A=Xi(b-d[S],E),N=!t.middlewareData.shift;let T=C,R=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=O),N&&!m){const q=$r(d.left,0),L=$r(d.right,0),D=$r(d.top,0),U=$r(d.bottom,0);g?R=b-2*(q!==0||L!==0?q+L:$r(d.left,d.right)):T=y-2*(D!==0||U!==0?D+U:$r(d.top,d.bottom))}await f({...t,availableWidth:R,availableHeight:T});const I=await s.getDimensions(u.floating);return b!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function Mp(){return typeof window<"u"}function Ws(e){return EL(e)?(e.nodeName||"").toLowerCase():"#document"}function qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gn(e){var t;return(t=(EL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EL(e){return Mp()?e instanceof Node||e instanceof qr(e).Node:!1}function On(e){return Mp()?e instanceof Element||e instanceof qr(e).Element:!1}function qn(e){return Mp()?e instanceof HTMLElement||e instanceof qr(e).HTMLElement:!1}function KT(e){return!Mp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qr(e).ShadowRoot}const rne=new Set(["inline","contents"]);function iu(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=jn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!rne.has(i)}const nne=new Set(["table","td","th"]);function ine(e){return nne.has(Ws(e))}const ane=[":popover-open",":modal"];function Ip(e){return ane.some(t=>{try{return e.matches(t)}catch{return!1}})}const one=["transform","translate","scale","rotate","perspective"],sne=["transform","translate","scale","rotate","perspective","filter"],lne=["paint","layout","strict","content"];function m_(e){const t=v_(),r=On(e)?jn(e):e;return one.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||sne.some(n=>(r.willChange||"").includes(n))||lne.some(n=>(r.contain||"").includes(n))}function cne(e){let t=Yi(e);for(;qn(t)&&!Cs(t);){if(m_(t))return t;if(Ip(t))return null;t=Yi(t)}return null}function v_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const une=new Set(["html","body","#document"]);function Cs(e){return une.has(Ws(e))}function jn(e){return qr(e).getComputedStyle(e)}function Dp(e){return On(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yi(e){if(Ws(e)==="html")return e;const t=e.assignedSlot||e.parentNode||KT(e)&&e.host||Gn(e);return KT(t)?t.host:t}function AL(e){const t=Yi(e);return Cs(t)?e.ownerDocument?e.ownerDocument.body:e.body:qn(t)&&iu(t)?t:AL(t)}function Gc(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=AL(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),s=qr(i);if(a){const u=$1(s);return t.concat(s,s.visualViewport||[],iu(i)?i:[],u&&r?Gc(u):[])}return t.concat(i,Gc(i,[],r))}function $1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PL(e){const t=jn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=qn(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,u=$h(r)!==a||$h(n)!==s;return u&&(r=a,n=s),{width:r,height:n,$:u}}function g_(e){return On(e)?e:e.contextElement}function es(e){const t=g_(e);if(!qn(t))return Bn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=PL(t);let s=(a?$h(r.width):r.width)/n,u=(a?$h(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const fne=Bn(0);function NL(e){const t=qr(e);return!v_()||!t.visualViewport?fne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dne(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==qr(e)?!1:t}function Wa(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=g_(e);let s=Bn(1);t&&(n?On(n)&&(s=es(n)):s=es(e));const u=dne(a,r,n)?NL(a):Bn(0);let f=(i.left+u.x)/s.x,c=(i.top+u.y)/s.y,d=i.width/s.x,h=i.height/s.y;if(a){const m=qr(a),g=n&&On(n)?qr(n):n;let b=m,y=$1(b);for(;y&&n&&g!==b;){const w=es(y),S=y.getBoundingClientRect(),O=jn(y),E=S.left+(y.clientLeft+parseFloat(O.paddingLeft))*w.x,C=S.top+(y.clientTop+parseFloat(O.paddingTop))*w.y;f*=w.x,c*=w.y,d*=w.x,h*=w.y,f+=E,c+=C,b=qr(y),y=$1(b)}}return zh({width:d,height:h,x:f,y:c})}function Lp(e,t){const r=Dp(e).scrollLeft;return t?t.left+r:Wa(Gn(e)).left+r}function CL(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Lp(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function hne(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",s=Gn(n),u=t?Ip(t.floating):!1;if(n===s||u&&a)return r;let f={scrollLeft:0,scrollTop:0},c=Bn(1);const d=Bn(0),h=qn(n);if((h||!h&&!a)&&((Ws(n)!=="body"||iu(s))&&(f=Dp(n)),qn(n))){const g=Wa(n);c=es(n),d.x=g.x+n.clientLeft,d.y=g.y+n.clientTop}const m=s&&!h&&!a?CL(s,f):Bn(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-f.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-f.scrollTop*c.y+d.y+m.y}}function pne(e){return Array.from(e.getClientRects())}function mne(e){const t=Gn(e),r=Dp(e),n=e.ownerDocument.body,i=$r(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=$r(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Lp(e);const u=-r.scrollTop;return jn(n).direction==="rtl"&&(s+=$r(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:u}}const XT=25;function vne(e,t){const r=qr(e),n=Gn(e),i=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,u=0,f=0;if(i){a=i.width,s=i.height;const d=v_();(!d||d&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}const c=Lp(n);if(c<=0){const d=n.ownerDocument,h=d.body,m=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(n.clientWidth-h.clientWidth-g);b<=XT&&(a-=b)}else c<=XT&&(a+=c);return{width:a,height:s,x:u,y:f}}const gne=new Set(["absolute","fixed"]);function yne(e,t){const r=Wa(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=qn(e)?es(e):Bn(1),s=e.clientWidth*a.x,u=e.clientHeight*a.y,f=i*a.x,c=n*a.y;return{width:s,height:u,x:f,y:c}}function YT(e,t,r){let n;if(t==="viewport")n=vne(e,r);else if(t==="document")n=mne(Gn(e));else if(On(t))n=yne(t,r);else{const i=NL(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zh(n)}function TL(e,t){const r=Yi(e);return r===t||!On(r)||Cs(r)?!1:jn(r).position==="fixed"||TL(r,t)}function xne(e,t){const r=t.get(e);if(r)return r;let n=Gc(e,[],!1).filter(u=>On(u)&&Ws(u)!=="body"),i=null;const a=jn(e).position==="fixed";let s=a?Yi(e):e;for(;On(s)&&!Cs(s);){const u=jn(s),f=m_(s);!f&&u.position==="fixed"&&(i=null),(a?!f&&!i:!f&&u.position==="static"&&!!i&&gne.has(i.position)||iu(s)&&!f&&TL(e,s))?n=n.filter(d=>d!==s):i=u,s=Yi(s)}return t.set(e,n),n}function bne(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Ip(t)?[]:xne(t,this._c):[].concat(r),n],u=s[0],f=s.reduce((c,d)=>{const h=YT(t,d,i);return c.top=$r(h.top,c.top),c.right=Xi(h.right,c.right),c.bottom=Xi(h.bottom,c.bottom),c.left=$r(h.left,c.left),c},YT(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function wne(e){const{width:t,height:r}=PL(e);return{width:t,height:r}}function _ne(e,t,r){const n=qn(t),i=Gn(t),a=r==="fixed",s=Wa(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const f=Bn(0);function c(){f.x=Lp(i)}if(n||!n&&!a)if((Ws(t)!=="body"||iu(i))&&(u=Dp(t)),n){const g=Wa(t,!0,a,t);f.x=g.x+t.clientLeft,f.y=g.y+t.clientTop}else i&&c();a&&!n&&i&&c();const d=i&&!n&&!a?CL(i,u):Bn(0),h=s.left+u.scrollLeft-f.x-d.x,m=s.top+u.scrollTop-f.y-d.y;return{x:h,y:m,width:s.width,height:s.height}}function eb(e){return jn(e).position==="static"}function QT(e,t){if(!qn(e)||jn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gn(e)===r&&(r=r.ownerDocument.body),r}function kL(e,t){const r=qr(e);if(Ip(e))return r;if(!qn(e)){let i=Yi(e);for(;i&&!Cs(i);){if(On(i)&&!eb(i))return i;i=Yi(i)}return r}let n=QT(e,t);for(;n&&ine(n)&&eb(n);)n=QT(n,t);return n&&Cs(n)&&eb(n)&&!m_(n)?r:n||cne(e)||r}const Sne=async function(e){const t=this.getOffsetParent||kL,r=this.getDimensions,n=await r(e.floating);return{reference:_ne(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function One(e){return jn(e).direction==="rtl"}const jne={convertOffsetParentRelativeRectToViewportRelativeRect:hne,getDocumentElement:Gn,getClippingRect:bne,getOffsetParent:kL,getElementRects:Sne,getClientRects:pne,getDimensions:wne,getScale:es,isElement:On,isRTL:One};function RL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ene(e,t){let r=null,n;const i=Gn(e);function a(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function s(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),a();const c=e.getBoundingClientRect(),{left:d,top:h,width:m,height:g}=c;if(u||t(),!m||!g)return;const b=$f(h),y=$f(i.clientWidth-(d+m)),w=$f(i.clientHeight-(h+g)),S=$f(d),E={rootMargin:-b+"px "+-y+"px "+-w+"px "+-S+"px",threshold:$r(0,Xi(1,f))||1};let C=!0;function A(N){const T=N[0].intersectionRatio;if(T!==f){if(!C)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!RL(c,e.getBoundingClientRect())&&s(),C=!1}try{r=new IntersectionObserver(A,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(A,E)}r.observe(e)}return s(!0),a}function Ane(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,c=g_(e),d=i||a?[...c?Gc(c):[],...Gc(t)]:[];d.forEach(S=>{i&&S.addEventListener("scroll",r,{passive:!0}),a&&S.addEventListener("resize",r)});const h=c&&u?Ene(c,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(S=>{let[O]=S;O&&O.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var E;(E=g)==null||E.observe(t)})),r()}),c&&!f&&g.observe(c),g.observe(t));let b,y=f?Wa(e):null;f&&w();function w(){const S=Wa(e);y&&!RL(y,S)&&r(),y=S,b=requestAnimationFrame(w)}return r(),()=>{var S;d.forEach(O=>{i&&O.removeEventListener("scroll",r),a&&O.removeEventListener("resize",r)}),h?.(),(S=g)==null||S.disconnect(),g=null,f&&cancelAnimationFrame(b)}}const Pne=Zre,Nne=Jre,Cne=Xre,Tne=tne,kne=Yre,ZT=Kre,Rne=ene,Mne=(e,t,r)=>{const n=new Map,i={platform:jne,...r},a={...i.platform,_c:n};return Gre(e,t,{...i,platform:a})};var Ine=typeof document<"u",Dne=function(){},Ad=Ine?P.useLayoutEffect:Dne;function Fh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Fh(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!Fh(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ML(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JT(e,t){const r=ML(e);return Math.round(t*r)/r}function tb(e){const t=P.useRef(e);return Ad(()=>{t.current=e}),t}function Lne(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:u=!0,whileElementsMounted:f,open:c}=e,[d,h]=P.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=P.useState(n);Fh(m,n)||g(n);const[b,y]=P.useState(null),[w,S]=P.useState(null),O=P.useCallback(B=>{B!==N.current&&(N.current=B,y(B))},[]),E=P.useCallback(B=>{B!==T.current&&(T.current=B,S(B))},[]),C=a||b,A=s||w,N=P.useRef(null),T=P.useRef(null),R=P.useRef(d),I=f!=null,q=tb(f),L=tb(i),D=tb(c),U=P.useCallback(()=>{if(!N.current||!T.current)return;const B={placement:t,strategy:r,middleware:m};L.current&&(B.platform=L.current),Mne(N.current,T.current,B).then(Z=>{const ee={...Z,isPositioned:D.current!==!1};H.current&&!Fh(R.current,ee)&&(R.current=ee,Kc.flushSync(()=>{h(ee)}))})},[m,t,r,L,D]);Ad(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(B=>({...B,isPositioned:!1})))},[c]);const H=P.useRef(!1);Ad(()=>(H.current=!0,()=>{H.current=!1}),[]),Ad(()=>{if(C&&(N.current=C),A&&(T.current=A),C&&A){if(q.current)return q.current(C,A,U);U()}},[C,A,U,q,I]);const V=P.useMemo(()=>({reference:N,floating:T,setReference:O,setFloating:E}),[O,E]),K=P.useMemo(()=>({reference:C,floating:A}),[C,A]),X=P.useMemo(()=>{const B={position:r,left:0,top:0};if(!K.floating)return B;const Z=JT(K.floating,d.x),ee=JT(K.floating,d.y);return u?{...B,transform:"translate("+Z+"px, "+ee+"px)",...ML(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:ee}},[r,u,K.floating,d.x,d.y]);return P.useMemo(()=>({...d,update:U,refs:V,elements:K,floatingStyles:X}),[d,U,V,K,X])}const $ne=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ZT({element:n.current,padding:i}).fn(r):{}:n?ZT({element:n,padding:i}).fn(r):{}}}},Bne=(e,t)=>({...Pne(e),options:[e,t]}),zne=(e,t)=>({...Nne(e),options:[e,t]}),Fne=(e,t)=>({...Rne(e),options:[e,t]}),qne=(e,t)=>({...Cne(e),options:[e,t]}),Une=(e,t)=>({...Tne(e),options:[e,t]}),Wne=(e,t)=>({...kne(e),options:[e,t]}),Hne=(e,t)=>({...$ne(e),options:[e,t]});var Vne="Arrow",IL=P.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return p.jsx(We.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});IL.displayName=Vne;var Gne=IL;function y_(e){const[t,r]=P.useState(void 0);return Rt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,u;if("borderBoxSize"in a){const f=a.borderBoxSize,c=Array.isArray(f)?f[0]:f;s=c.inlineSize,u=c.blockSize}else s=e.offsetWidth,u=e.offsetHeight;r({width:s,height:u})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var x_="Popper",[DL,LL]=gi(x_),[Kne,$L]=DL(x_),BL=e=>{const{__scopePopper:t,children:r}=e,[n,i]=P.useState(null);return p.jsx(Kne,{scope:t,anchor:n,onAnchorChange:i,children:r})};BL.displayName=x_;var zL="PopperAnchor",FL=P.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=$L(zL,r),s=P.useRef(null),u=Je(t,s),f=P.useRef(null);return P.useEffect(()=>{const c=f.current;f.current=n?.current||s.current,c!==f.current&&a.onAnchorChange(f.current)}),n?null:p.jsx(We.div,{...i,ref:u})});FL.displayName=zL;var b_="PopperContent",[Xne,Yne]=DL(b_),qL=P.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:b,...y}=e,w=$L(b_,r),[S,O]=P.useState(null),E=Je(t,oe=>O(oe)),[C,A]=P.useState(null),N=y_(C),T=N?.width??0,R=N?.height??0,I=n+(a!=="center"?"-"+a:""),q=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},L=Array.isArray(c)?c:[c],D=L.length>0,U={padding:q,boundary:L.filter(Zne),altBoundary:D},{refs:H,floatingStyles:V,placement:K,isPositioned:X,middlewareData:B}=Lne({strategy:"fixed",placement:I,whileElementsMounted:(...oe)=>Ane(...oe,{animationFrame:g==="always"}),elements:{reference:w.anchor},middleware:[Bne({mainAxis:i+R,alignmentAxis:s}),f&&zne({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Fne():void 0,...U}),f&&qne({...U}),Une({...U,apply:({elements:oe,rects:me,availableWidth:ie,availableHeight:ue})=>{const{width:ve,height:re}=me.reference,De=oe.floating.style;De.setProperty("--radix-popper-available-width",`${ie}px`),De.setProperty("--radix-popper-available-height",`${ue}px`),De.setProperty("--radix-popper-anchor-width",`${ve}px`),De.setProperty("--radix-popper-anchor-height",`${re}px`)}}),C&&Hne({element:C,padding:u}),Jne({arrowWidth:T,arrowHeight:R}),m&&Wne({strategy:"referenceHidden",...U})]}),[Z,ee]=HL(K),M=ar(b);Rt(()=>{X&&M?.()},[X,M]);const $=B.arrow?.x,Q=B.arrow?.y,ae=B.arrow?.centerOffset!==0,[pe,ye]=P.useState();return Rt(()=>{S&&ye(window.getComputedStyle(S).zIndex)},[S]),p.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:X?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Xne,{scope:r,placedSide:Z,onArrowChange:A,arrowX:$,arrowY:Q,shouldHideArrow:ae,children:p.jsx(We.div,{"data-side":Z,"data-align":ee,...y,ref:E,style:{...y.style,animation:X?void 0:"none"}})})})});qL.displayName=b_;var UL="PopperArrow",Qne={top:"bottom",right:"left",bottom:"top",left:"right"},WL=P.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=Yne(UL,n),s=Qne[a.placedSide];return p.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:p.jsx(Gne,{...i,ref:r,style:{...i.style,display:"block"}})})});WL.displayName=UL;function Zne(e){return e!==null}var Jne=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,u=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[c,d]=HL(r),h={start:"0%",center:"50%",end:"100%"}[d],m=(i.arrow?.x??0)+u/2,g=(i.arrow?.y??0)+f/2;let b="",y="";return c==="bottom"?(b=s?h:`${m}px`,y=`${-f}px`):c==="top"?(b=s?h:`${m}px`,y=`${n.floating.height+f}px`):c==="right"?(b=`${-f}px`,y=s?h:`${g}px`):c==="left"&&(b=`${n.floating.width+f}px`,y=s?h:`${g}px`),{data:{x:b,y}}}});function HL(e){const[t,r="center"]=e.split("-");return[t,r]}var eie=BL,tie=FL,rie=qL,nie=WL,iie="Portal",w_=P.forwardRef((e,t)=>{const{container:r,...n}=e,[i,a]=P.useState(!1);Rt(()=>a(!0),[]);const s=r||i&&globalThis?.document?.body;return s?b6.createPortal(p.jsx(We.div,{...n,ref:t}),s):null});w_.displayName=iie;function aie(e){const t=oie(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(lie);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function oie(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=uie(i),u=cie(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sie=Symbol("radix.slottable");function lie(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sie}function cie(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function uie(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fie=X1[" useInsertionEffect ".trim().toString()]||Rt;function Ha({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,s]=die({defaultProp:t,onChange:r}),u=e!==void 0,f=u?e:i;{const d=P.useRef(e!==void 0);P.useEffect(()=>{const h=d.current;h!==u&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=u},[u,n])}const c=P.useCallback(d=>{if(u){const h=hie(d)?d(e):d;h!==e&&s.current?.(h)}else a(d)},[u,e,a,s]);return[f,c]}function die({defaultProp:e,onChange:t}){const[r,n]=P.useState(e),i=P.useRef(r),a=P.useRef(t);return fie(()=>{a.current=t},[t]),P.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,n,a]}function hie(e){return typeof e=="function"}function __(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var VL=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"}),pie="VisuallyHidden",mie=P.forwardRef((e,t)=>p.jsx(We.span,{...e,ref:t,style:{...VL,...e.style}}));mie.displayName=pie;var vie=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Do=new WeakMap,Bf=new WeakMap,zf={},rb=0,GL=function(e){return e&&(e.host||GL(e.parentNode))},gie=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=GL(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},yie=function(e,t,r,n){var i=gie(t,Array.isArray(e)?e:[e]);zf[r]||(zf[r]=new WeakMap);var a=zf[r],s=[],u=new Set,f=new Set(i),c=function(h){!h||u.has(h)||(u.add(h),c(h.parentNode))};i.forEach(c);var d=function(h){!h||f.has(h)||Array.prototype.forEach.call(h.children,function(m){if(u.has(m))d(m);else try{var g=m.getAttribute(n),b=g!==null&&g!=="false",y=(Do.get(m)||0)+1,w=(a.get(m)||0)+1;Do.set(m,y),a.set(m,w),s.push(m),y===1&&b&&Bf.set(m,!0),w===1&&m.setAttribute(r,"true"),b||m.setAttribute(n,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return d(t),u.clear(),rb++,function(){s.forEach(function(h){var m=Do.get(h)-1,g=a.get(h)-1;Do.set(h,m),a.set(h,g),m||(Bf.has(h)||h.removeAttribute(n),Bf.delete(h)),g||h.removeAttribute(r)}),rb--,rb||(Do=new WeakMap,Do=new WeakMap,Bf=new WeakMap,zf={})}},KL=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=vie(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),yie(n,i,r,"aria-hidden")):function(){return null}},Mn=function(){return Mn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return Iie;var t=Die(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},$ie=ZL(),ts="data-scroll-locked",Bie=function(e,t,r,n){var i=e.left,a=e.top,s=e.right,u=e.gap;return r===void 0&&(r="margin"),` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pL(e,t){if(e){if(typeof e=="string")return R1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return R1(e,t)}}function Gte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kte(e){if(Array.isArray(e))return R1(e)}function R1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?s:t&&t.length&&he(i)&&he(a)?t.slice(i,a+1):[]};function gL(e){return e==="number"?[0,"auto"]:void 0}var M1=function(t,r,n,i){var a=t.graphicalItems,s=t.tooltipAxis,u=Rp(r,t);return n<0||!a||!a.length||n>=u.length?null:a.reduce(function(f,c){var d,h=(d=c.props.data)!==null&&d!==void 0?d:r;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(s.dataKey&&!s.allowDuplicatedCategory){var g=h===void 0?u:h;m=Dd(g,s.dataKey,i)}else m=h&&h[n]||u[n];return m?[].concat(Ns(f),[sD(c,m)]):f},[])},kT=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},s=Zte(a,n),u=t.orderedTooltipTicks,f=t.tooltipAxis,c=t.tooltipTicks,d=wG(s,u,c,f);if(d>=0&&c){var h=c[d]&&c[d].value,m=M1(t,r,d,h),g=Jte(n,u,d,a);return{activeTooltipIndex:d,activeLabel:h,activePayload:m,activeCoordinate:g}}return null},ere=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,h=t.children,m=t.stackOffset,g=tD(d,a);return n.reduce(function(b,y){var w,S=y.type.defaultProps!==void 0?ne(ne({},y.type.defaultProps),y.props):y.props,O=S.type,E=S.dataKey,C=S.allowDataOverflow,A=S.allowDuplicatedCategory,N=S.scale,T=S.ticks,R=S.includeHidden,I=S[s];if(b[I])return b;var q=Rp(t.data,{graphicalItems:i.filter(function($){var Q,ae=s in $.props?$.props[s]:(Q=$.type.defaultProps)===null||Q===void 0?void 0:Q[s];return ae===I}),dataStartIndex:f,dataEndIndex:c}),L=q.length,D,U,H;Ete(S.domain,C,O)&&(D=Kb(S.domain,null,C),g&&(O==="number"||N!=="auto")&&(H=nc(q,E,"category")));var V=gL(O);if(!D||D.length===0){var K,X=(K=S.domain)!==null&&K!==void 0?K:V;if(E){if(D=nc(q,E,O),O==="category"&&g){var B=pF(D);A&&B?(U=D,D=Sh(0,L)):A||(D=MN(X,D,y).reduce(function($,Q){return $.indexOf(Q)>=0?$:[].concat(Ns($),[Q])},[]))}else if(O==="category")A?D=D.filter(function($){return $!==""&&!qe($)}):D=MN(X,D,y).reduce(function($,Q){return $.indexOf(Q)>=0||Q===""||qe(Q)?$:[].concat(Ns($),[Q])},[]);else if(O==="number"){var Z=EG(q,i.filter(function($){var Q,ae,pe=s in $.props?$.props[s]:(Q=$.type.defaultProps)===null||Q===void 0?void 0:Q[s],ye="hide"in $.props?$.props.hide:(ae=$.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return pe===I&&(R||!ye)}),E,a,d);Z&&(D=Z)}g&&(O==="number"||N!=="auto")&&(H=nc(q,E,"category"))}else g?D=Sh(0,L):u&&u[I]&&u[I].hasStack&&O==="number"?D=m==="expand"?[0,1]:oD(u[I].stackGroups,f,c):D=eD(q,i.filter(function($){var Q=s in $.props?$.props[s]:$.type.defaultProps[s],ae="hide"in $.props?$.props.hide:$.type.defaultProps.hide;return Q===I&&(R||!ae)}),O,d,!0);if(O==="number")D=T1(h,D,I,a,T),X&&(D=Kb(X,D,C));else if(O==="category"&&X){var ee=X,M=D.every(function($){return ee.indexOf($)>=0});M&&(D=ee)}}return ne(ne({},b),{},Le({},I,ne(ne({},S),{},{axisType:a,domain:D,categoricalDomain:H,duplicateDomain:U,originalDomain:(w=S.domain)!==null&&w!==void 0?w:V,isCategorical:g,layout:d})))},{})},tre=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,h=t.children,m=Rp(t.data,{graphicalItems:n,dataStartIndex:f,dataEndIndex:c}),g=m.length,b=tD(d,a),y=-1;return n.reduce(function(w,S){var O=S.type.defaultProps!==void 0?ne(ne({},S.type.defaultProps),S.props):S.props,E=O[s],C=gL("number");if(!w[E]){y++;var A;return b?A=Sh(0,g):u&&u[E]&&u[E].hasStack?(A=oD(u[E].stackGroups,f,c),A=T1(h,A,E,a)):(A=Kb(C,eD(m,n.filter(function(N){var T,R,I=s in N.props?N.props[s]:(T=N.type.defaultProps)===null||T===void 0?void 0:T[s],q="hide"in N.props?N.props.hide:(R=N.type.defaultProps)===null||R===void 0?void 0:R.hide;return I===E&&!q}),"number",d),i.defaultProps.allowDataOverflow),A=T1(h,A,E,a)),ne(ne({},w),{},Le({},E,ne(ne({axisType:a},i.defaultProps),{},{hide:!0,orientation:zr(Yte,"".concat(a,".").concat(y%2),null),domain:A,originalDomain:C,isCategorical:b,layout:d})))}return w},{})},rre=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,s=r.graphicalItems,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.children,h="".concat(i,"Id"),m=Fr(d,a),g={};return m&&m.length?g=ere(t,{axes:m,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:f,dataEndIndex:c}):s&&s.length&&(g=tre(t,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:f,dataEndIndex:c})),g},nre=function(t){var r=Wi(t),n=li(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ew(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ch(r,n)}},RT=function(t){var r=t.children,n=t.defaultShowTooltip,i=Mr(r,xs),a=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},ire=function(t){return!t||!t.length?!1:t.some(function(r){var n=ci(r&&r.type);return n&&n.indexOf("Bar")>=0})},MT=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},are=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,s=a===void 0?{}:a,u=t.yAxisMap,f=u===void 0?{}:u,c=n.width,d=n.height,h=n.children,m=n.margin||{},g=Mr(h,xs),b=Mr(h,Qo),y=Object.keys(f).reduce(function(A,N){var T=f[N],R=T.orientation;return!T.mirror&&!T.hide?ne(ne({},A),{},Le({},R,A[R]+T.width)):A},{left:m.left||0,right:m.right||0}),w=Object.keys(s).reduce(function(A,N){var T=s[N],R=T.orientation;return!T.mirror&&!T.hide?ne(ne({},A),{},Le({},R,zr(A,"".concat(R))+T.height)):A},{top:m.top||0,bottom:m.bottom||0}),S=ne(ne({},w),y),O=S.bottom;g&&(S.bottom+=g.props.height||xs.defaultProps.height),b&&r&&(S=OG(S,i,n,r));var E=c-S.left-S.right,C=d-S.top-S.bottom;return ne(ne({brushBottom:O},S),{},{width:Math.max(E,0),height:Math.max(C,0)})},ore=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},c_=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,s=t.validateTooltipEventTypes,u=s===void 0?["axis"]:s,f=t.axisComponents,c=t.legendContent,d=t.formatAxisMap,h=t.defaultProps,m=function(S,O){var E=O.graphicalItems,C=O.stackGroups,A=O.offset,N=O.updateId,T=O.dataStartIndex,R=O.dataEndIndex,I=S.barSize,q=S.layout,L=S.barGap,D=S.barCategoryGap,U=S.maxBarSize,H=MT(q),V=H.numericAxisName,K=H.cateAxisName,X=ire(E),B=[];return E.forEach(function(Z,ee){var M=Rp(S.data,{graphicalItems:[Z],dataStartIndex:T,dataEndIndex:R}),$=Z.type.defaultProps!==void 0?ne(ne({},Z.type.defaultProps),Z.props):Z.props,Q=$.dataKey,ae=$.maxBarSize,pe=$["".concat(V,"Id")],ye=$["".concat(K,"Id")],oe={},me=f.reduce(function(Kt,Xt){var io=O["".concat(Xt.axisType,"Map")],Vs=$["".concat(Xt.axisType,"Id")];io&&io[Vs]||Xt.axisType==="zAxis"||za();var Gs=io[Vs];return ne(ne({},Kt),{},Le(Le({},Xt.axisType,Gs),"".concat(Xt.axisType,"Ticks"),li(Gs)))},oe),ie=me[K],ue=me["".concat(K,"Ticks")],ve=C&&C[pe]&&C[pe].hasStack&&IG(Z,C[pe].stackGroups),re=ci(Z.type).indexOf("Bar")>=0,De=ch(ie,ue),Te=[],Ke=X&&_G({barSize:I,stackGroups:C,totalSize:ore(me,K)});if(re){var lt,vt,dr=qe(ae)?U:ae,Or=(lt=(vt=ch(ie,ue,!0))!==null&&vt!==void 0?vt:dr)!==null&<!==void 0?lt:0;Te=SG({barGap:L,barCategoryGap:D,bandSize:Or!==De?Or:De,sizeList:Ke[ye],maxBarSize:dr}),Or!==De&&(Te=Te.map(function(Kt){return ne(ne({},Kt),{},{position:ne(ne({},Kt.position),{},{offset:Kt.position.offset-Or/2})})}))}var jr=Z&&Z.type&&Z.type.getComposedData;jr&&B.push({props:ne(ne({},jr(ne(ne({},me),{},{displayedData:M,props:S,dataKey:Q,item:Z,bandSize:De,barPosition:Te,offset:A,stackedData:ve,layout:q,dataStartIndex:T,dataEndIndex:R}))),{},Le(Le(Le({key:Z.key||"item-".concat(ee)},V,me[V]),K,me[K]),"animationId",N)),childIndex:AF(Z,S.children),item:Z})}),B},g=function(S,O){var E=S.props,C=S.dataStartIndex,A=S.dataEndIndex,N=S.updateId;if(!KE({props:E}))return null;var T=E.children,R=E.layout,I=E.stackOffset,q=E.data,L=E.reverseStackOrder,D=MT(R),U=D.numericAxisName,H=D.cateAxisName,V=Fr(T,n),K=RG(q,V,"".concat(U,"Id"),"".concat(H,"Id"),I,L),X=f.reduce(function($,Q){var ae="".concat(Q.axisType,"Map");return ne(ne({},$),{},Le({},ae,rre(E,ne(ne({},Q),{},{graphicalItems:V,stackGroups:Q.axisType===U&&K,dataStartIndex:C,dataEndIndex:A}))))},{}),B=are(ne(ne({},X),{},{props:E,graphicalItems:V}),O?.legendBBox);Object.keys(X).forEach(function($){X[$]=d(E,X[$],B,$.replace("Map",""),r)});var Z=X["".concat(H,"Map")],ee=nre(Z),M=m(E,ne(ne({},X),{},{dataStartIndex:C,dataEndIndex:A,updateId:N,graphicalItems:V,stackGroups:K,offset:B}));return ne(ne({formattedGraphicalItems:M,graphicalItems:V,offset:B,stackGroups:K},ee),X)},b=(function(w){function S(O){var E,C,A;return Bte(this,S),A=qte(this,S,[O]),Le(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Le(A,"accessibilityManager",new jte),Le(A,"handleLegendBBoxUpdate",function(N){if(N){var T=A.state,R=T.dataStartIndex,I=T.dataEndIndex,q=T.updateId;A.setState(ne({legendBBox:N},g({props:A.props,dataStartIndex:R,dataEndIndex:I,updateId:q},ne(ne({},A.state),{},{legendBBox:N}))))}}),Le(A,"handleReceiveSyncEvent",function(N,T,R){if(A.props.syncId===N){if(R===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(T)}}),Le(A,"handleBrushChange",function(N){var T=N.startIndex,R=N.endIndex;if(T!==A.state.dataStartIndex||R!==A.state.dataEndIndex){var I=A.state.updateId;A.setState(function(){return ne({dataStartIndex:T,dataEndIndex:R},g({props:A.props,dataStartIndex:T,dataEndIndex:R,updateId:I},A.state))}),A.triggerSyncEvent({dataStartIndex:T,dataEndIndex:R})}}),Le(A,"handleMouseEnter",function(N){var T=A.getMouseInfo(N);if(T){var R=ne(ne({},T),{},{isTooltipActive:!0});A.setState(R),A.triggerSyncEvent(R);var I=A.props.onMouseEnter;ze(I)&&I(R,N)}}),Le(A,"triggeredAfterMouseMove",function(N){var T=A.getMouseInfo(N),R=T?ne(ne({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(R),A.triggerSyncEvent(R);var I=A.props.onMouseMove;ze(I)&&I(R,N)}),Le(A,"handleItemMouseEnter",function(N){A.setState(function(){return{isTooltipActive:!0,activeItem:N,activePayload:N.tooltipPayload,activeCoordinate:N.tooltipPosition||{x:N.cx,y:N.cy}}})}),Le(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),Le(A,"handleMouseMove",function(N){N.persist(),A.throttleTriggeredAfterMouseMove(N)}),Le(A,"handleMouseLeave",function(N){A.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};A.setState(T),A.triggerSyncEvent(T);var R=A.props.onMouseLeave;ze(R)&&R(T,N)}),Le(A,"handleOuterEvent",function(N){var T=EF(N),R=zr(A.props,"".concat(T));if(T&&ze(R)){var I,q;/.*touch.*/i.test(T)?q=A.getMouseInfo(N.changedTouches[0]):q=A.getMouseInfo(N),R((I=q)!==null&&I!==void 0?I:{},N)}}),Le(A,"handleClick",function(N){var T=A.getMouseInfo(N);if(T){var R=ne(ne({},T),{},{isTooltipActive:!0});A.setState(R),A.triggerSyncEvent(R);var I=A.props.onClick;ze(I)&&I(R,N)}}),Le(A,"handleMouseDown",function(N){var T=A.props.onMouseDown;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleMouseUp",function(N){var T=A.props.onMouseUp;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleTouchMove",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(N.changedTouches[0])}),Le(A,"handleTouchStart",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.handleMouseDown(N.changedTouches[0])}),Le(A,"handleTouchEnd",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.handleMouseUp(N.changedTouches[0])}),Le(A,"handleDoubleClick",function(N){var T=A.props.onDoubleClick;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleContextMenu",function(N){var T=A.props.onContextMenu;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"triggerSyncEvent",function(N){A.props.syncId!==void 0&&Gx.emit(Kx,A.props.syncId,N,A.eventEmitterSymbol)}),Le(A,"applySyncEvent",function(N){var T=A.props,R=T.layout,I=T.syncMethod,q=A.state.updateId,L=N.dataStartIndex,D=N.dataEndIndex;if(N.dataStartIndex!==void 0||N.dataEndIndex!==void 0)A.setState(ne({dataStartIndex:L,dataEndIndex:D},g({props:A.props,dataStartIndex:L,dataEndIndex:D,updateId:q},A.state)));else if(N.activeTooltipIndex!==void 0){var U=N.chartX,H=N.chartY,V=N.activeTooltipIndex,K=A.state,X=K.offset,B=K.tooltipTicks;if(!X)return;if(typeof I=="function")V=I(B,N);else if(I==="value"){V=-1;for(var Z=0;Z=0){var ve,re;if(U.dataKey&&!U.allowDuplicatedCategory){var De=typeof U.dataKey=="function"?ue:"payload.".concat(U.dataKey.toString());ve=Dd(Z,De,V),re=ee&&M&&Dd(M,De,V)}else ve=Z?.[H],re=ee&&M&&M[H];if(ye||pe){var Te=N.props.activeIndex!==void 0?N.props.activeIndex:H;return[P.cloneElement(N,ne(ne(ne({},I.props),me),{},{activeIndex:Te})),null,null]}if(!qe(ve))return[ie].concat(Ns(A.renderActivePoints({item:I,activePoint:ve,basePoint:re,childIndex:H,isRange:ee})))}else{var Ke,lt=(Ke=A.getItemByXY(A.state.activeCoordinate))!==null&&Ke!==void 0?Ke:{graphicalItem:ie},vt=lt.graphicalItem,dr=vt.item,Or=dr===void 0?N:dr,jr=vt.childIndex,Kt=ne(ne(ne({},I.props),me),{},{activeIndex:jr});return[P.cloneElement(Or,Kt),null,null]}return ee?[ie,null,null]:[ie,null]}),Le(A,"renderCustomized",function(N,T,R){return P.cloneElement(N,ne(ne({key:"recharts-customized-".concat(R)},A.props),A.state))}),Le(A,"renderMap",{CartesianGrid:{handler:Lf,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Lf},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Lf},YAxis:{handler:Lf},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((E=O.id)!==null&&E!==void 0?E:Ds("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=ZM(A.triggeredAfterMouseMove,(C=O.throttleDelay)!==null&&C!==void 0?C:1e3/60),A.state={},A}return Hte(S,w),Fte(S,[{key:"componentDidMount",value:function(){var E,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,C=E.children,A=E.data,N=E.height,T=E.layout,R=Mr(C,Dr);if(R){var I=R.props.defaultIndex;if(!(typeof I!="number"||I<0||I>this.state.tooltipTicks.length-1)){var q=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,L=M1(this.state,A,I,q),D=this.state.tooltipTicks[I].coordinate,U=(this.state.offset.top+N)/2,H=T==="horizontal",V=H?{x:D,y:U}:{y:D,x:U},K=this.state.formattedGraphicalItems.find(function(B){var Z=B.item;return Z.type.name==="Scatter"});K&&(V=ne(ne({},V),K.props.points[I].tooltipPosition),L=K.props.points[I].tooltipPayload);var X={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:q,activePayload:L,activeCoordinate:V};this.setState(X),this.renderCursor(R),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var A,N;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0}})}return null}},{key:"componentDidUpdate",value:function(E){vb([Mr(E.children,Dr)],[Mr(this.props.children,Dr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Mr(this.props.children,Dr);if(E&&typeof E.props.shared=="boolean"){var C=E.props.shared?"axis":"item";return u.indexOf(C)>=0?C:a}return a}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var C=this.container,A=C.getBoundingClientRect(),N=hU(A),T={chartX:Math.round(E.pageX-N.left),chartY:Math.round(E.pageY-N.top)},R=A.width/C.offsetWidth||1,I=this.inRange(T.chartX,T.chartY,R);if(!I)return null;var q=this.state,L=q.xAxisMap,D=q.yAxisMap,U=this.getTooltipEventType(),H=kT(this.state,this.props.data,this.props.layout,I);if(U!=="axis"&&L&&D){var V=Wi(L).scale,K=Wi(D).scale,X=V&&V.invert?V.invert(T.chartX):null,B=K&&K.invert?K.invert(T.chartY):null;return ne(ne({},T),{},{xValue:X,yValue:B},H)}return H?ne(ne({},T),H):null}},{key:"inRange",value:function(E,C){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=this.props.layout,T=E/A,R=C/A;if(N==="horizontal"||N==="vertical"){var I=this.state.offset,q=T>=I.left&&T<=I.left+I.width&&R>=I.top&&R<=I.top+I.height;return q?{x:T,y:R}:null}var L=this.state,D=L.angleAxisMap,U=L.radiusAxisMap;if(D&&U){var H=Wi(D);return LN({x:T,y:R},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,C=this.getTooltipEventType(),A=Mr(E,Dr),N={};A&&C==="axis"&&(A.props.trigger==="click"?N={onClick:this.handleClick}:N={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=Ld(this.props,this.handleOuterEvent);return ne(ne({},T),N)}},{key:"addListener",value:function(){Gx.on(Kx,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Gx.removeListener(Kx,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,C,A){for(var N=this.state.formattedGraphicalItems,T=0,R=N.length;Tp.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg border border-gray-100 hover:bg-gray-100 transition-colors",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 font-bold text-xs",children:e.template.substring(0,2)}),p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-semibold text-gray-900",children:e.product}),p.jsxs("p",{className:"text-xs text-gray-500",children:[e.id," • ",e.user]})]})]}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsx("span",{className:"text-xs text-gray-500 font-medium",children:e.time}),p.jsx(Rn,{variant:"secondary",className:e.status==="expired"?"bg-red-100 text-red-700":"bg-green-100 text-green-700",children:e.status})]})]},e.id))})})]})]}),p.jsx("div",{className:"space-y-6",children:p.jsxs(Ir,{className:"shadow-sm border-gray-200",children:[p.jsx(yn,{children:p.jsxs(xn,{className:"text-base font-bold text-gray-800 flex items-center gap-2",children:[p.jsx(ub,{className:"w-5 h-5 text-gray-500"}),"By Category"]})}),p.jsxs(tn,{children:[p.jsxs("div",{className:"h-[200px] relative",children:[p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(lre,{children:[p.jsx(wi,{data:Yx,cx:"50%",cy:"50%",innerRadius:60,outerRadius:80,paddingAngle:5,dataKey:"value",children:Yx.map((e,t)=>p.jsx(cp,{fill:e.color},`cell-${t}`))}),p.jsx(Dr,{})]})}),p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center flex-col pointer-events-none",children:[p.jsx("span",{className:"text-2xl font-bold text-gray-900",children:"1000"}),p.jsx("span",{className:"text-xs text-gray-500",children:"Total"})]})]}),p.jsx("div",{className:"mt-4 space-y-2",children:Yx.map(e=>p.jsxs("div",{className:"flex items-center justify-between text-sm",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),p.jsx("span",{className:"text-gray-600",children:e.name})]}),p.jsx("span",{className:"font-medium text-gray-900",children:e.value})]},e.name))})]})]})})]})]})}function Io({title:e,value:t,trend:r,trendUp:n,icon:i,color:a,bgColor:s}){return p.jsx(Ir,{className:"border-gray-200 shadow-sm hover:shadow-md transition-shadow",children:p.jsxs(tn,{className:"p-6",children:[p.jsxs("div",{className:"flex justify-between items-start",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-medium text-gray-500 mb-1",children:e}),p.jsx("h3",{className:"text-2xl font-bold text-gray-900",children:t})]}),p.jsx("div",{className:`p-2 rounded-lg ${s}`,children:p.jsx(i,{className:`w-5 h-5 ${a}`})})]}),p.jsxs("div",{className:"mt-4 flex items-center text-sm",children:[n?p.jsx(fR,{className:"w-4 h-4 text-green-500 mr-1"}):p.jsx(aB,{className:"w-4 h-4 text-red-500 mr-1"}),p.jsx("span",{className:n?"text-green-600 font-medium":"text-red-600 font-medium",children:r}),p.jsx("span",{className:"text-gray-400 ml-1",children:"Vs. last period"})]})]})})}function dre({title:e}){return p.jsxs("div",{className:"space-y-6",children:[p.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[1,2,3,4].map(t=>p.jsxs(Ir,{children:[p.jsx(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:p.jsxs(xn,{className:"text-sm font-medium",children:["Metric ",t]})}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"000"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+0.0% from last month"})]})]},t))}),p.jsx(Ir,{className:"min-h-[400px] flex items-center justify-center border-dashed",children:p.jsxs("div",{className:"text-center text-muted-foreground",children:[p.jsxs("h3",{className:"text-lg font-medium",children:[e," Module"]}),p.jsx("p",{children:"This module is currently under development."})]})})]})}function br({className:e,...t}){return p.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:p.jsx("table",{"data-slot":"table",className:Ie("w-full caption-bottom text-sm",e),...t})})}function wr({className:e,...t}){return p.jsx("thead",{"data-slot":"table-header",className:Ie("[&_tr]:border-b",e),...t})}function _r({className:e,...t}){return p.jsx("tbody",{"data-slot":"table-body",className:Ie("[&_tr:last-child]:border-0",e),...t})}function Qe({className:e,...t}){return p.jsx("tr",{"data-slot":"table-row",className:Ie("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function ge({className:e,...t}){return p.jsx("th",{"data-slot":"table-head",className:Ie("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function fe({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:Ie("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function IT(e){const t=hre(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(mre);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function hre(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=gre(i),u=vre(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pre=Symbol("radix.slottable");function mre(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pre}function vre(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function gre(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function xL(e){const t=e+"CollectionProvider",[r,n]=gi(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=y=>{const{scope:w,children:S}=y,O=z.useRef(null),E=z.useRef(new Map).current;return p.jsx(i,{scope:w,itemMap:E,collectionRef:O,children:S})};s.displayName=t;const u=e+"CollectionSlot",f=IT(u),c=z.forwardRef((y,w)=>{const{scope:S,children:O}=y,E=a(u,S),C=Je(w,E.collectionRef);return p.jsx(f,{ref:C,children:O})});c.displayName=u;const d=e+"CollectionItemSlot",h="data-radix-collection-item",m=IT(d),g=z.forwardRef((y,w)=>{const{scope:S,children:O,...E}=y,C=z.useRef(null),A=Je(w,C),N=a(d,S);return z.useEffect(()=>(N.itemMap.set(C,{ref:C,...E}),()=>void N.itemMap.delete(C))),p.jsx(m,{[h]:"",ref:A,children:O})});g.displayName=d;function b(y){const w=a(e+"CollectionConsumer",y);return z.useCallback(()=>{const O=w.collectionRef.current;if(!O)return[];const E=Array.from(O.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((N,T)=>E.indexOf(N.ref.current)-E.indexOf(T.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:s,Slot:c,ItemSlot:g},b,n]}function yre(e,t=globalThis?.document){const r=ar(e);P.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var xre="DismissableLayer",I1="dismissableLayer.update",bre="dismissableLayer.pointerDownOutside",wre="dismissableLayer.focusOutside",DT,bL=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),u_=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:u,...f}=e,c=P.useContext(bL),[d,h]=P.useState(null),m=d?.ownerDocument??globalThis?.document,[,g]=P.useState({}),b=Je(t,T=>h(T)),y=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),S=y.indexOf(w),O=d?y.indexOf(d):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,C=O>=S,A=Ore(T=>{const R=T.target,I=[...c.branches].some(q=>q.contains(R));!C||I||(i?.(T),s?.(T),T.defaultPrevented||u?.())},m),N=jre(T=>{const R=T.target;[...c.branches].some(q=>q.contains(R))||(a?.(T),s?.(T),T.defaultPrevented||u?.())},m);return yre(T=>{O===c.layers.size-1&&(n?.(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},m),P.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(DT=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),LT(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=DT)}},[d,m,r,c]),P.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),LT())},[d,c]),P.useEffect(()=>{const T=()=>g({});return document.addEventListener(I1,T),()=>document.removeEventListener(I1,T)},[]),p.jsx(We.div,{...f,ref:b,style:{pointerEvents:E?C?"auto":"none":void 0,...e.style},onFocusCapture:Fe(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Fe(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Fe(e.onPointerDownCapture,A.onPointerDownCapture)})});u_.displayName=xre;var _re="DismissableLayerBranch",Sre=P.forwardRef((e,t)=>{const r=P.useContext(bL),n=P.useRef(null),i=Je(t,n);return P.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),p.jsx(We.div,{...e,ref:i})});Sre.displayName=_re;function Ore(e,t=globalThis?.document){const r=ar(e),n=P.useRef(!1),i=P.useRef(()=>{});return P.useEffect(()=>{const a=u=>{if(u.target&&!n.current){let f=function(){wL(bre,r,c,{discrete:!0})};const c={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function jre(e,t=globalThis?.document){const r=ar(e),n=P.useRef(!1);return P.useEffect(()=>{const i=a=>{a.target&&!n.current&&wL(wre,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function LT(){const e=new CustomEvent(I1);document.dispatchEvent(e)}function wL(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?P6(i,a):i.dispatchEvent(a)}var Qx=0;function _L(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$T()),document.body.insertAdjacentElement("beforeend",e[1]??$T()),Qx++,()=>{Qx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Qx--}},[])}function $T(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Zx="focusScope.autoFocusOnMount",Jx="focusScope.autoFocusOnUnmount",BT={bubbles:!1,cancelable:!0},Ere="FocusScope",f_=P.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[u,f]=P.useState(null),c=ar(i),d=ar(a),h=P.useRef(null),m=Je(t,y=>f(y)),g=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(n){let y=function(E){if(g.paused||!u)return;const C=E.target;u.contains(C)?h.current=C:qi(h.current,{select:!0})},w=function(E){if(g.paused||!u)return;const C=E.relatedTarget;C!==null&&(u.contains(C)||qi(h.current,{select:!0}))},S=function(E){if(document.activeElement===document.body)for(const A of E)A.removedNodes.length>0&&qi(u)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const O=new MutationObserver(S);return u&&O.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),O.disconnect()}}},[n,u,g.paused]),P.useEffect(()=>{if(u){FT.add(g);const y=document.activeElement;if(!u.contains(y)){const S=new CustomEvent(Zx,BT);u.addEventListener(Zx,c),u.dispatchEvent(S),S.defaultPrevented||(Are(kre(SL(u)),{select:!0}),document.activeElement===y&&qi(u))}return()=>{u.removeEventListener(Zx,c),setTimeout(()=>{const S=new CustomEvent(Jx,BT);u.addEventListener(Jx,d),u.dispatchEvent(S),S.defaultPrevented||qi(y??document.body,{select:!0}),u.removeEventListener(Jx,d),FT.remove(g)},0)}}},[u,c,d,g]);const b=P.useCallback(y=>{if(!r&&!n||g.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(w&&S){const O=y.currentTarget,[E,C]=Pre(O);E&&C?!y.shiftKey&&S===C?(y.preventDefault(),r&&qi(E,{select:!0})):y.shiftKey&&S===E&&(y.preventDefault(),r&&qi(C,{select:!0})):S===O&&y.preventDefault()}},[r,n,g.paused]);return p.jsx(We.div,{tabIndex:-1,...s,ref:m,onKeyDown:b})});f_.displayName=Ere;function Are(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(qi(n,{select:t}),document.activeElement!==r)return}function Pre(e){const t=SL(e),r=zT(t,e),n=zT(t.reverse(),e);return[r,n]}function SL(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function zT(e,t){for(const r of e)if(!Nre(r,{upTo:t}))return r}function Nre(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cre(e){return e instanceof HTMLInputElement&&"select"in e}function qi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Cre(e)&&t&&e.select()}}var FT=Tre();function Tre(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=qT(e,t),e.unshift(t)},remove(t){e=qT(e,t),e[0]?.resume()}}}function qT(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function kre(e){return e.filter(t=>t.tagName!=="A")}var Rre=X1[" useId ".trim().toString()]||(()=>{}),Mre=0;function Gi(e){const[t,r]=P.useState(Rre());return Rt(()=>{r(n=>n??String(Mre++))},[e]),e||(t?`radix-${t}`:"")}const Ire=["top","right","bottom","left"],Xi=Math.min,$r=Math.max,$h=Math.round,$f=Math.floor,Bn=e=>({x:e,y:e}),Dre={left:"right",right:"left",bottom:"top",top:"bottom"},Lre={start:"end",end:"start"};function D1(e,t,r){return $r(e,Xi(t,r))}function mi(e,t){return typeof e=="function"?e(t):e}function vi(e){return e.split("-")[0]}function Us(e){return e.split("-")[1]}function d_(e){return e==="x"?"y":"x"}function h_(e){return e==="y"?"height":"width"}const $re=new Set(["top","bottom"]);function Dn(e){return $re.has(vi(e))?"y":"x"}function p_(e){return d_(Dn(e))}function Bre(e,t,r){r===void 0&&(r=!1);const n=Us(e),i=p_(e),a=h_(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bh(s)),[s,Bh(s)]}function zre(e){const t=Bh(e);return[L1(e),t,L1(t)]}function L1(e){return e.replace(/start|end/g,t=>Lre[t])}const UT=["left","right"],WT=["right","left"],Fre=["top","bottom"],qre=["bottom","top"];function Ure(e,t,r){switch(e){case"top":case"bottom":return r?t?WT:UT:t?UT:WT;case"left":case"right":return t?Fre:qre;default:return[]}}function Wre(e,t,r,n){const i=Us(e);let a=Ure(vi(e),r==="start",n);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(L1)))),a}function Bh(e){return e.replace(/left|right|bottom|top/g,t=>Dre[t])}function Hre(e){return{top:0,right:0,bottom:0,left:0,...e}}function OL(e){return typeof e!="number"?Hre(e):{top:e,right:e,bottom:e,left:e}}function zh(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function HT(e,t,r){let{reference:n,floating:i}=e;const a=Dn(t),s=p_(t),u=h_(s),f=vi(t),c=a==="y",d=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,m=n[u]/2-i[u]/2;let g;switch(f){case"top":g={x:d,y:n.y-i.height};break;case"bottom":g={x:d,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:h};break;case"left":g={x:n.x-i.width,y:h};break;default:g={x:n.x,y:n.y}}switch(Us(t)){case"start":g[s]-=m*(r&&c?-1:1);break;case"end":g[s]+=m*(r&&c?-1:1);break}return g}async function Vre(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:s,elements:u,strategy:f}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=mi(t,e),b=OL(g),w=u[m?h==="floating"?"reference":"floating":h],S=zh(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(w)))==null||r?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:c,rootBoundary:d,strategy:f})),O=h==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),C=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},A=zh(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:O,offsetParent:E,strategy:f}):O);return{top:(S.top-A.top+b.top)/C.y,bottom:(A.bottom-S.bottom+b.bottom)/C.y,left:(S.left-A.left+b.left)/C.x,right:(A.right-S.right+b.right)/C.x}}const Gre=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,u=a.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=HT(c,n,f),m=n,g={},b=0;for(let w=0;w({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:s,elements:u,middlewareData:f}=t,{element:c,padding:d=0}=mi(e,t)||{};if(c==null)return{};const h=OL(d),m={x:r,y:n},g=p_(i),b=h_(g),y=await s.getDimensions(c),w=g==="y",S=w?"top":"left",O=w?"bottom":"right",E=w?"clientHeight":"clientWidth",C=a.reference[b]+a.reference[g]-m[g]-a.floating[b],A=m[g]-a.reference[g],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let T=N?N[E]:0;(!T||!await(s.isElement==null?void 0:s.isElement(N)))&&(T=u.floating[E]||a.floating[b]);const R=C/2-A/2,I=T/2-y[b]/2-1,q=Xi(h[S],I),L=Xi(h[O],I),D=q,U=T-y[b]-L,H=T/2-y[b]/2+R,V=D1(D,H,U),K=!f.arrow&&Us(i)!=null&&H!==V&&a.reference[b]/2-(HH<=0)){var L,D;const H=(((L=a.flip)==null?void 0:L.index)||0)+1,V=T[H];if(V&&(!(h==="alignment"?O!==Dn(V):!1)||q.every(B=>Dn(B.placement)===O?B.overflows[0]>0:!0)))return{data:{index:H,overflows:q},reset:{placement:V}};let K=(D=q.filter(X=>X.overflows[0]<=0).sort((X,B)=>X.overflows[1]-B.overflows[1])[0])==null?void 0:D.placement;if(!K)switch(g){case"bestFit":{var U;const X=(U=q.filter(B=>{if(N){const Z=Dn(B.placement);return Z===O||Z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(Z=>Z>0).reduce((Z,ee)=>Z+ee,0)]).sort((B,Z)=>B[1]-Z[1])[0])==null?void 0:U[0];X&&(K=X);break}case"initialPlacement":K=u;break}if(i!==K)return{reset:{placement:K}}}return{}}}};function VT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function GT(e){return Ire.some(t=>e[t]>=0)}const Yre=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...a}=mi(e,t);switch(i){case"referenceHidden":{const s=await n.detectOverflow(t,{...a,elementContext:"reference"}),u=VT(s,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:GT(u)}}}case"escaped":{const s=await n.detectOverflow(t,{...a,altBoundary:!0}),u=VT(s,r.floating);return{data:{escapedOffsets:u,escaped:GT(u)}}}default:return{}}}}},jL=new Set(["left","top"]);async function Qre(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=vi(r),u=Us(r),f=Dn(r)==="y",c=jL.has(s)?-1:1,d=a&&f?-1:1,h=mi(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof b=="number"&&(g=u==="end"?b*-1:b),f?{x:g*d,y:m*c}:{x:m*c,y:g*d}}const Zre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:s,middlewareData:u}=t,f=await Qre(t,e);return s===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:a+f.y,data:{...f,placement:s}}}}},Jre=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:a}=t,{mainAxis:s=!0,crossAxis:u=!1,limiter:f={fn:S=>{let{x:O,y:E}=S;return{x:O,y:E}}},...c}=mi(e,t),d={x:r,y:n},h=await a.detectOverflow(t,c),m=Dn(vi(i)),g=d_(m);let b=d[g],y=d[m];if(s){const S=g==="y"?"top":"left",O=g==="y"?"bottom":"right",E=b+h[S],C=b-h[O];b=D1(E,b,C)}if(u){const S=m==="y"?"top":"left",O=m==="y"?"bottom":"right",E=y+h[S],C=y-h[O];y=D1(E,y,C)}const w=f.fn({...t,[g]:b,[m]:y});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[g]:s,[m]:u}}}}}},ene=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:s}=t,{offset:u=0,mainAxis:f=!0,crossAxis:c=!0}=mi(e,t),d={x:r,y:n},h=Dn(i),m=d_(h);let g=d[m],b=d[h];const y=mi(u,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const E=m==="y"?"height":"width",C=a.reference[m]-a.floating[E]+w.mainAxis,A=a.reference[m]+a.reference[E]-w.mainAxis;gA&&(g=A)}if(c){var S,O;const E=m==="y"?"width":"height",C=jL.has(vi(i)),A=a.reference[h]-a.floating[E]+(C&&((S=s.offset)==null?void 0:S[h])||0)+(C?0:w.crossAxis),N=a.reference[h]+a.reference[E]+(C?0:((O=s.offset)==null?void 0:O[h])||0)-(C?w.crossAxis:0);bN&&(b=N)}return{[m]:g,[h]:b}}}},tne=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:s,elements:u}=t,{apply:f=()=>{},...c}=mi(e,t),d=await s.detectOverflow(t,c),h=vi(i),m=Us(i),g=Dn(i)==="y",{width:b,height:y}=a.floating;let w,S;h==="top"||h==="bottom"?(w=h,S=m===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(S=h,w=m==="end"?"top":"bottom");const O=y-d.top-d.bottom,E=b-d.left-d.right,C=Xi(y-d[w],O),A=Xi(b-d[S],E),N=!t.middlewareData.shift;let T=C,R=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=O),N&&!m){const q=$r(d.left,0),L=$r(d.right,0),D=$r(d.top,0),U=$r(d.bottom,0);g?R=b-2*(q!==0||L!==0?q+L:$r(d.left,d.right)):T=y-2*(D!==0||U!==0?D+U:$r(d.top,d.bottom))}await f({...t,availableWidth:R,availableHeight:T});const I=await s.getDimensions(u.floating);return b!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function Mp(){return typeof window<"u"}function Ws(e){return EL(e)?(e.nodeName||"").toLowerCase():"#document"}function qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gn(e){var t;return(t=(EL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EL(e){return Mp()?e instanceof Node||e instanceof qr(e).Node:!1}function On(e){return Mp()?e instanceof Element||e instanceof qr(e).Element:!1}function qn(e){return Mp()?e instanceof HTMLElement||e instanceof qr(e).HTMLElement:!1}function KT(e){return!Mp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qr(e).ShadowRoot}const rne=new Set(["inline","contents"]);function iu(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=jn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!rne.has(i)}const nne=new Set(["table","td","th"]);function ine(e){return nne.has(Ws(e))}const ane=[":popover-open",":modal"];function Ip(e){return ane.some(t=>{try{return e.matches(t)}catch{return!1}})}const one=["transform","translate","scale","rotate","perspective"],sne=["transform","translate","scale","rotate","perspective","filter"],lne=["paint","layout","strict","content"];function m_(e){const t=v_(),r=On(e)?jn(e):e;return one.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||sne.some(n=>(r.willChange||"").includes(n))||lne.some(n=>(r.contain||"").includes(n))}function cne(e){let t=Yi(e);for(;qn(t)&&!Cs(t);){if(m_(t))return t;if(Ip(t))return null;t=Yi(t)}return null}function v_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const une=new Set(["html","body","#document"]);function Cs(e){return une.has(Ws(e))}function jn(e){return qr(e).getComputedStyle(e)}function Dp(e){return On(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yi(e){if(Ws(e)==="html")return e;const t=e.assignedSlot||e.parentNode||KT(e)&&e.host||Gn(e);return KT(t)?t.host:t}function AL(e){const t=Yi(e);return Cs(t)?e.ownerDocument?e.ownerDocument.body:e.body:qn(t)&&iu(t)?t:AL(t)}function Gc(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=AL(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),s=qr(i);if(a){const u=$1(s);return t.concat(s,s.visualViewport||[],iu(i)?i:[],u&&r?Gc(u):[])}return t.concat(i,Gc(i,[],r))}function $1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PL(e){const t=jn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=qn(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,u=$h(r)!==a||$h(n)!==s;return u&&(r=a,n=s),{width:r,height:n,$:u}}function g_(e){return On(e)?e:e.contextElement}function es(e){const t=g_(e);if(!qn(t))return Bn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=PL(t);let s=(a?$h(r.width):r.width)/n,u=(a?$h(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const fne=Bn(0);function NL(e){const t=qr(e);return!v_()||!t.visualViewport?fne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dne(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==qr(e)?!1:t}function Wa(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=g_(e);let s=Bn(1);t&&(n?On(n)&&(s=es(n)):s=es(e));const u=dne(a,r,n)?NL(a):Bn(0);let f=(i.left+u.x)/s.x,c=(i.top+u.y)/s.y,d=i.width/s.x,h=i.height/s.y;if(a){const m=qr(a),g=n&&On(n)?qr(n):n;let b=m,y=$1(b);for(;y&&n&&g!==b;){const w=es(y),S=y.getBoundingClientRect(),O=jn(y),E=S.left+(y.clientLeft+parseFloat(O.paddingLeft))*w.x,C=S.top+(y.clientTop+parseFloat(O.paddingTop))*w.y;f*=w.x,c*=w.y,d*=w.x,h*=w.y,f+=E,c+=C,b=qr(y),y=$1(b)}}return zh({width:d,height:h,x:f,y:c})}function Lp(e,t){const r=Dp(e).scrollLeft;return t?t.left+r:Wa(Gn(e)).left+r}function CL(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Lp(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function hne(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",s=Gn(n),u=t?Ip(t.floating):!1;if(n===s||u&&a)return r;let f={scrollLeft:0,scrollTop:0},c=Bn(1);const d=Bn(0),h=qn(n);if((h||!h&&!a)&&((Ws(n)!=="body"||iu(s))&&(f=Dp(n)),qn(n))){const g=Wa(n);c=es(n),d.x=g.x+n.clientLeft,d.y=g.y+n.clientTop}const m=s&&!h&&!a?CL(s,f):Bn(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-f.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-f.scrollTop*c.y+d.y+m.y}}function pne(e){return Array.from(e.getClientRects())}function mne(e){const t=Gn(e),r=Dp(e),n=e.ownerDocument.body,i=$r(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=$r(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Lp(e);const u=-r.scrollTop;return jn(n).direction==="rtl"&&(s+=$r(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:u}}const XT=25;function vne(e,t){const r=qr(e),n=Gn(e),i=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,u=0,f=0;if(i){a=i.width,s=i.height;const d=v_();(!d||d&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}const c=Lp(n);if(c<=0){const d=n.ownerDocument,h=d.body,m=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(n.clientWidth-h.clientWidth-g);b<=XT&&(a-=b)}else c<=XT&&(a+=c);return{width:a,height:s,x:u,y:f}}const gne=new Set(["absolute","fixed"]);function yne(e,t){const r=Wa(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=qn(e)?es(e):Bn(1),s=e.clientWidth*a.x,u=e.clientHeight*a.y,f=i*a.x,c=n*a.y;return{width:s,height:u,x:f,y:c}}function YT(e,t,r){let n;if(t==="viewport")n=vne(e,r);else if(t==="document")n=mne(Gn(e));else if(On(t))n=yne(t,r);else{const i=NL(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zh(n)}function TL(e,t){const r=Yi(e);return r===t||!On(r)||Cs(r)?!1:jn(r).position==="fixed"||TL(r,t)}function xne(e,t){const r=t.get(e);if(r)return r;let n=Gc(e,[],!1).filter(u=>On(u)&&Ws(u)!=="body"),i=null;const a=jn(e).position==="fixed";let s=a?Yi(e):e;for(;On(s)&&!Cs(s);){const u=jn(s),f=m_(s);!f&&u.position==="fixed"&&(i=null),(a?!f&&!i:!f&&u.position==="static"&&!!i&&gne.has(i.position)||iu(s)&&!f&&TL(e,s))?n=n.filter(d=>d!==s):i=u,s=Yi(s)}return t.set(e,n),n}function bne(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Ip(t)?[]:xne(t,this._c):[].concat(r),n],u=s[0],f=s.reduce((c,d)=>{const h=YT(t,d,i);return c.top=$r(h.top,c.top),c.right=Xi(h.right,c.right),c.bottom=Xi(h.bottom,c.bottom),c.left=$r(h.left,c.left),c},YT(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function wne(e){const{width:t,height:r}=PL(e);return{width:t,height:r}}function _ne(e,t,r){const n=qn(t),i=Gn(t),a=r==="fixed",s=Wa(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const f=Bn(0);function c(){f.x=Lp(i)}if(n||!n&&!a)if((Ws(t)!=="body"||iu(i))&&(u=Dp(t)),n){const g=Wa(t,!0,a,t);f.x=g.x+t.clientLeft,f.y=g.y+t.clientTop}else i&&c();a&&!n&&i&&c();const d=i&&!n&&!a?CL(i,u):Bn(0),h=s.left+u.scrollLeft-f.x-d.x,m=s.top+u.scrollTop-f.y-d.y;return{x:h,y:m,width:s.width,height:s.height}}function eb(e){return jn(e).position==="static"}function QT(e,t){if(!qn(e)||jn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gn(e)===r&&(r=r.ownerDocument.body),r}function kL(e,t){const r=qr(e);if(Ip(e))return r;if(!qn(e)){let i=Yi(e);for(;i&&!Cs(i);){if(On(i)&&!eb(i))return i;i=Yi(i)}return r}let n=QT(e,t);for(;n&&ine(n)&&eb(n);)n=QT(n,t);return n&&Cs(n)&&eb(n)&&!m_(n)?r:n||cne(e)||r}const Sne=async function(e){const t=this.getOffsetParent||kL,r=this.getDimensions,n=await r(e.floating);return{reference:_ne(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function One(e){return jn(e).direction==="rtl"}const jne={convertOffsetParentRelativeRectToViewportRelativeRect:hne,getDocumentElement:Gn,getClippingRect:bne,getOffsetParent:kL,getElementRects:Sne,getClientRects:pne,getDimensions:wne,getScale:es,isElement:On,isRTL:One};function RL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ene(e,t){let r=null,n;const i=Gn(e);function a(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function s(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),a();const c=e.getBoundingClientRect(),{left:d,top:h,width:m,height:g}=c;if(u||t(),!m||!g)return;const b=$f(h),y=$f(i.clientWidth-(d+m)),w=$f(i.clientHeight-(h+g)),S=$f(d),E={rootMargin:-b+"px "+-y+"px "+-w+"px "+-S+"px",threshold:$r(0,Xi(1,f))||1};let C=!0;function A(N){const T=N[0].intersectionRatio;if(T!==f){if(!C)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!RL(c,e.getBoundingClientRect())&&s(),C=!1}try{r=new IntersectionObserver(A,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(A,E)}r.observe(e)}return s(!0),a}function Ane(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,c=g_(e),d=i||a?[...c?Gc(c):[],...Gc(t)]:[];d.forEach(S=>{i&&S.addEventListener("scroll",r,{passive:!0}),a&&S.addEventListener("resize",r)});const h=c&&u?Ene(c,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(S=>{let[O]=S;O&&O.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var E;(E=g)==null||E.observe(t)})),r()}),c&&!f&&g.observe(c),g.observe(t));let b,y=f?Wa(e):null;f&&w();function w(){const S=Wa(e);y&&!RL(y,S)&&r(),y=S,b=requestAnimationFrame(w)}return r(),()=>{var S;d.forEach(O=>{i&&O.removeEventListener("scroll",r),a&&O.removeEventListener("resize",r)}),h?.(),(S=g)==null||S.disconnect(),g=null,f&&cancelAnimationFrame(b)}}const Pne=Zre,Nne=Jre,Cne=Xre,Tne=tne,kne=Yre,ZT=Kre,Rne=ene,Mne=(e,t,r)=>{const n=new Map,i={platform:jne,...r},a={...i.platform,_c:n};return Gre(e,t,{...i,platform:a})};var Ine=typeof document<"u",Dne=function(){},Ad=Ine?P.useLayoutEffect:Dne;function Fh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Fh(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!Fh(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ML(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JT(e,t){const r=ML(e);return Math.round(t*r)/r}function tb(e){const t=P.useRef(e);return Ad(()=>{t.current=e}),t}function Lne(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:u=!0,whileElementsMounted:f,open:c}=e,[d,h]=P.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=P.useState(n);Fh(m,n)||g(n);const[b,y]=P.useState(null),[w,S]=P.useState(null),O=P.useCallback(B=>{B!==N.current&&(N.current=B,y(B))},[]),E=P.useCallback(B=>{B!==T.current&&(T.current=B,S(B))},[]),C=a||b,A=s||w,N=P.useRef(null),T=P.useRef(null),R=P.useRef(d),I=f!=null,q=tb(f),L=tb(i),D=tb(c),U=P.useCallback(()=>{if(!N.current||!T.current)return;const B={placement:t,strategy:r,middleware:m};L.current&&(B.platform=L.current),Mne(N.current,T.current,B).then(Z=>{const ee={...Z,isPositioned:D.current!==!1};H.current&&!Fh(R.current,ee)&&(R.current=ee,Kc.flushSync(()=>{h(ee)}))})},[m,t,r,L,D]);Ad(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(B=>({...B,isPositioned:!1})))},[c]);const H=P.useRef(!1);Ad(()=>(H.current=!0,()=>{H.current=!1}),[]),Ad(()=>{if(C&&(N.current=C),A&&(T.current=A),C&&A){if(q.current)return q.current(C,A,U);U()}},[C,A,U,q,I]);const V=P.useMemo(()=>({reference:N,floating:T,setReference:O,setFloating:E}),[O,E]),K=P.useMemo(()=>({reference:C,floating:A}),[C,A]),X=P.useMemo(()=>{const B={position:r,left:0,top:0};if(!K.floating)return B;const Z=JT(K.floating,d.x),ee=JT(K.floating,d.y);return u?{...B,transform:"translate("+Z+"px, "+ee+"px)",...ML(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:ee}},[r,u,K.floating,d.x,d.y]);return P.useMemo(()=>({...d,update:U,refs:V,elements:K,floatingStyles:X}),[d,U,V,K,X])}const $ne=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ZT({element:n.current,padding:i}).fn(r):{}:n?ZT({element:n,padding:i}).fn(r):{}}}},Bne=(e,t)=>({...Pne(e),options:[e,t]}),zne=(e,t)=>({...Nne(e),options:[e,t]}),Fne=(e,t)=>({...Rne(e),options:[e,t]}),qne=(e,t)=>({...Cne(e),options:[e,t]}),Une=(e,t)=>({...Tne(e),options:[e,t]}),Wne=(e,t)=>({...kne(e),options:[e,t]}),Hne=(e,t)=>({...$ne(e),options:[e,t]});var Vne="Arrow",IL=P.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return p.jsx(We.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});IL.displayName=Vne;var Gne=IL;function y_(e){const[t,r]=P.useState(void 0);return Rt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,u;if("borderBoxSize"in a){const f=a.borderBoxSize,c=Array.isArray(f)?f[0]:f;s=c.inlineSize,u=c.blockSize}else s=e.offsetWidth,u=e.offsetHeight;r({width:s,height:u})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var x_="Popper",[DL,LL]=gi(x_),[Kne,$L]=DL(x_),BL=e=>{const{__scopePopper:t,children:r}=e,[n,i]=P.useState(null);return p.jsx(Kne,{scope:t,anchor:n,onAnchorChange:i,children:r})};BL.displayName=x_;var zL="PopperAnchor",FL=P.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=$L(zL,r),s=P.useRef(null),u=Je(t,s),f=P.useRef(null);return P.useEffect(()=>{const c=f.current;f.current=n?.current||s.current,c!==f.current&&a.onAnchorChange(f.current)}),n?null:p.jsx(We.div,{...i,ref:u})});FL.displayName=zL;var b_="PopperContent",[Xne,Yne]=DL(b_),qL=P.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:b,...y}=e,w=$L(b_,r),[S,O]=P.useState(null),E=Je(t,oe=>O(oe)),[C,A]=P.useState(null),N=y_(C),T=N?.width??0,R=N?.height??0,I=n+(a!=="center"?"-"+a:""),q=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},L=Array.isArray(c)?c:[c],D=L.length>0,U={padding:q,boundary:L.filter(Zne),altBoundary:D},{refs:H,floatingStyles:V,placement:K,isPositioned:X,middlewareData:B}=Lne({strategy:"fixed",placement:I,whileElementsMounted:(...oe)=>Ane(...oe,{animationFrame:g==="always"}),elements:{reference:w.anchor},middleware:[Bne({mainAxis:i+R,alignmentAxis:s}),f&&zne({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Fne():void 0,...U}),f&&qne({...U}),Une({...U,apply:({elements:oe,rects:me,availableWidth:ie,availableHeight:ue})=>{const{width:ve,height:re}=me.reference,De=oe.floating.style;De.setProperty("--radix-popper-available-width",`${ie}px`),De.setProperty("--radix-popper-available-height",`${ue}px`),De.setProperty("--radix-popper-anchor-width",`${ve}px`),De.setProperty("--radix-popper-anchor-height",`${re}px`)}}),C&&Hne({element:C,padding:u}),Jne({arrowWidth:T,arrowHeight:R}),m&&Wne({strategy:"referenceHidden",...U})]}),[Z,ee]=HL(K),M=ar(b);Rt(()=>{X&&M?.()},[X,M]);const $=B.arrow?.x,Q=B.arrow?.y,ae=B.arrow?.centerOffset!==0,[pe,ye]=P.useState();return Rt(()=>{S&&ye(window.getComputedStyle(S).zIndex)},[S]),p.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:X?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Xne,{scope:r,placedSide:Z,onArrowChange:A,arrowX:$,arrowY:Q,shouldHideArrow:ae,children:p.jsx(We.div,{"data-side":Z,"data-align":ee,...y,ref:E,style:{...y.style,animation:X?void 0:"none"}})})})});qL.displayName=b_;var UL="PopperArrow",Qne={top:"bottom",right:"left",bottom:"top",left:"right"},WL=P.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=Yne(UL,n),s=Qne[a.placedSide];return p.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:p.jsx(Gne,{...i,ref:r,style:{...i.style,display:"block"}})})});WL.displayName=UL;function Zne(e){return e!==null}var Jne=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,u=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[c,d]=HL(r),h={start:"0%",center:"50%",end:"100%"}[d],m=(i.arrow?.x??0)+u/2,g=(i.arrow?.y??0)+f/2;let b="",y="";return c==="bottom"?(b=s?h:`${m}px`,y=`${-f}px`):c==="top"?(b=s?h:`${m}px`,y=`${n.floating.height+f}px`):c==="right"?(b=`${-f}px`,y=s?h:`${g}px`):c==="left"&&(b=`${n.floating.width+f}px`,y=s?h:`${g}px`),{data:{x:b,y}}}});function HL(e){const[t,r="center"]=e.split("-");return[t,r]}var eie=BL,tie=FL,rie=qL,nie=WL,iie="Portal",w_=P.forwardRef((e,t)=>{const{container:r,...n}=e,[i,a]=P.useState(!1);Rt(()=>a(!0),[]);const s=r||i&&globalThis?.document?.body;return s?b6.createPortal(p.jsx(We.div,{...n,ref:t}),s):null});w_.displayName=iie;function aie(e){const t=oie(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(lie);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function oie(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=uie(i),u=cie(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sie=Symbol("radix.slottable");function lie(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sie}function cie(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function uie(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fie=X1[" useInsertionEffect ".trim().toString()]||Rt;function Ha({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,s]=die({defaultProp:t,onChange:r}),u=e!==void 0,f=u?e:i;{const d=P.useRef(e!==void 0);P.useEffect(()=>{const h=d.current;h!==u&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=u},[u,n])}const c=P.useCallback(d=>{if(u){const h=hie(d)?d(e):d;h!==e&&s.current?.(h)}else a(d)},[u,e,a,s]);return[f,c]}function die({defaultProp:e,onChange:t}){const[r,n]=P.useState(e),i=P.useRef(r),a=P.useRef(t);return fie(()=>{a.current=t},[t]),P.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,n,a]}function hie(e){return typeof e=="function"}function __(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var VL=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"}),pie="VisuallyHidden",mie=P.forwardRef((e,t)=>p.jsx(We.span,{...e,ref:t,style:{...VL,...e.style}}));mie.displayName=pie;var vie=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Do=new WeakMap,Bf=new WeakMap,zf={},rb=0,GL=function(e){return e&&(e.host||GL(e.parentNode))},gie=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=GL(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},yie=function(e,t,r,n){var i=gie(t,Array.isArray(e)?e:[e]);zf[r]||(zf[r]=new WeakMap);var a=zf[r],s=[],u=new Set,f=new Set(i),c=function(h){!h||u.has(h)||(u.add(h),c(h.parentNode))};i.forEach(c);var d=function(h){!h||f.has(h)||Array.prototype.forEach.call(h.children,function(m){if(u.has(m))d(m);else try{var g=m.getAttribute(n),b=g!==null&&g!=="false",y=(Do.get(m)||0)+1,w=(a.get(m)||0)+1;Do.set(m,y),a.set(m,w),s.push(m),y===1&&b&&Bf.set(m,!0),w===1&&m.setAttribute(r,"true"),b||m.setAttribute(n,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return d(t),u.clear(),rb++,function(){s.forEach(function(h){var m=Do.get(h)-1,g=a.get(h)-1;Do.set(h,m),a.set(h,g),m||(Bf.has(h)||h.removeAttribute(n),Bf.delete(h)),g||h.removeAttribute(r)}),rb--,rb||(Do=new WeakMap,Do=new WeakMap,Bf=new WeakMap,zf={})}},KL=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=vie(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),yie(n,i,r,"aria-hidden")):function(){return null}},Mn=function(){return Mn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return Iie;var t=Die(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},$ie=ZL(),ts="data-scroll-locked",Bie=function(e,t,r,n){var i=e.left,a=e.top,s=e.right,u=e.gap;return r===void 0&&(r="margin"),` .`.concat(bie,` { overflow: hidden `).concat(n,`; padding-right: `).concat(u,"px ").concat(n,`; @@ -447,7 +447,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)},tk=function(){var e=parseInt(document.body.getAttribute(ts)||"0",10);return isFinite(e)?e:0},zie=function(){P.useEffect(function(){return document.body.setAttribute(ts,(tk()+1).toString()),function(){var e=tk()-1;e<=0?document.body.removeAttribute(ts):document.body.setAttribute(ts,e.toString())}},[])},Fie=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;zie();var a=P.useMemo(function(){return Lie(i)},[i]);return P.createElement($ie,{styles:Bie(a,!t,i,r?"":"!important")})},B1=!1;if(typeof window<"u")try{var Ff=Object.defineProperty({},"passive",{get:function(){return B1=!0,!0}});window.addEventListener("test",Ff,Ff),window.removeEventListener("test",Ff,Ff)}catch{B1=!1}var Lo=B1?{passive:!1}:!1,qie=function(e){return e.tagName==="TEXTAREA"},JL=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!qie(e)&&r[t]==="visible")},Uie=function(e){return JL(e,"overflowY")},Wie=function(e){return JL(e,"overflowX")},rk=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=e$(e,n);if(i){var a=t$(e,n),s=a[1],u=a[2];if(s>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Hie=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Vie=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},e$=function(e,t){return e==="v"?Uie(t):Wie(t)},t$=function(e,t){return e==="v"?Hie(t):Vie(t)},Gie=function(e,t){return e==="h"&&t==="rtl"?-1:1},Kie=function(e,t,r,n,i){var a=Gie(e,window.getComputedStyle(t).direction),s=a*n,u=r.target,f=t.contains(u),c=!1,d=s>0,h=0,m=0;do{if(!u)break;var g=t$(e,u),b=g[0],y=g[1],w=g[2],S=y-w-a*b;(b||S)&&e$(e,u)&&(h+=S,m+=b);var O=u.parentNode;u=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(d&&Math.abs(h)<1||!d&&Math.abs(m)<1)&&(c=!0),c},qf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nk=function(e){return[e.deltaX,e.deltaY]},ik=function(e){return e&&"current"in e?e.current:e},Xie=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yie=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},Qie=0,$o=[];function Zie(e){var t=P.useRef([]),r=P.useRef([0,0]),n=P.useRef(),i=P.useState(Qie++)[0],a=P.useState(ZL)[0],s=P.useRef(e);P.useEffect(function(){s.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=xie([e.lockRef.current],(e.shards||[]).map(ik),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=P.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!s.current.allowPinchZoom;var S=qf(y),O=r.current,E="deltaX"in y?y.deltaX:O[0]-S[0],C="deltaY"in y?y.deltaY:O[1]-S[1],A,N=y.target,T=Math.abs(E)>Math.abs(C)?"h":"v";if("touches"in y&&T==="h"&&N.type==="range")return!1;var R=window.getSelection(),I=R&&R.anchorNode,q=I?I===N||I.contains(N):!1;if(q)return!1;var L=rk(T,N);if(!L)return!0;if(L?A=T:(A=T==="v"?"h":"v",L=rk(T,N)),!L)return!1;if(!n.current&&"changedTouches"in y&&(E||C)&&(n.current=A),!A)return!0;var D=n.current||A;return Kie(D,w,y,D==="h"?E:C)},[]),f=P.useCallback(function(y){var w=y;if(!(!$o.length||$o[$o.length-1]!==a)){var S="deltaY"in w?nk(w):qf(w),O=t.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&Xie(A.delta,S)})[0];if(O&&O.should){w.cancelable&&w.preventDefault();return}if(!O){var E=(s.current.shards||[]).map(ik).filter(Boolean).filter(function(A){return A.contains(w.target)}),C=E.length>0?u(w,E[0]):!s.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),c=P.useCallback(function(y,w,S,O){var E={name:y,delta:w,target:S,should:O,shadowParent:Jie(S)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(C){return C!==E})},1)},[]),d=P.useCallback(function(y){r.current=qf(y),n.current=void 0},[]),h=P.useCallback(function(y){c(y.type,nk(y),y.target,u(y,e.lockRef.current))},[]),m=P.useCallback(function(y){c(y.type,qf(y),y.target,u(y,e.lockRef.current))},[]);P.useEffect(function(){return $o.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",f,Lo),document.addEventListener("touchmove",f,Lo),document.addEventListener("touchstart",d,Lo),function(){$o=$o.filter(function(y){return y!==a}),document.removeEventListener("wheel",f,Lo),document.removeEventListener("touchmove",f,Lo),document.removeEventListener("touchstart",d,Lo)}},[]);var g=e.removeScrollBar,b=e.inert;return P.createElement(P.Fragment,null,b?P.createElement(a,{styles:Yie(i)}):null,g?P.createElement(Fie,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Jie(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const eae=Pie(QL,Zie);var S_=P.forwardRef(function(e,t){return P.createElement($p,Mn({},e,{ref:t,sideCar:eae}))});S_.classNames=$p.classNames;var tae=[" ","Enter","ArrowUp","ArrowDown"],rae=[" ","Enter"],Va="Select",[Bp,zp,nae]=xL(Va),[Hs]=gi(Va,[nae,LL]),Fp=LL(),[iae,ta]=Hs(Va),[aae,oae]=Hs(Va),r$=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:s,defaultValue:u,onValueChange:f,dir:c,name:d,autoComplete:h,disabled:m,required:g,form:b}=e,y=Fp(t),[w,S]=P.useState(null),[O,E]=P.useState(null),[C,A]=P.useState(!1),N=Kh(c),[T,R]=Ha({prop:n,defaultProp:i??!1,onChange:a,caller:Va}),[I,q]=Ha({prop:s,defaultProp:u,onChange:f,caller:Va}),L=P.useRef(null),D=w?b||!!w.closest("form"):!0,[U,H]=P.useState(new Set),V=Array.from(U).map(K=>K.props.value).join(";");return p.jsx(eie,{...y,children:p.jsxs(iae,{required:g,scope:t,trigger:w,onTriggerChange:S,valueNode:O,onValueNodeChange:E,valueNodeHasChildren:C,onValueNodeHasChildrenChange:A,contentId:Gi(),value:I,onValueChange:q,open:T,onOpenChange:R,dir:N,triggerPointerDownPosRef:L,disabled:m,children:[p.jsx(Bp.Provider,{scope:t,children:p.jsx(aae,{scope:e.__scopeSelect,onNativeOptionAdd:P.useCallback(K=>{H(X=>new Set(X).add(K))},[]),onNativeOptionRemove:P.useCallback(K=>{H(X=>{const B=new Set(X);return B.delete(K),B})},[]),children:r})}),D?p.jsxs(O$,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:h,value:I,onChange:K=>q(K.target.value),disabled:m,form:b,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(U)]},V):null]})})};r$.displayName=Va;var n$="SelectTrigger",i$=P.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...i}=e,a=Fp(r),s=ta(n$,r),u=s.disabled||n,f=Je(t,s.onTriggerChange),c=zp(r),d=P.useRef("touch"),[h,m,g]=E$(y=>{const w=c().filter(E=>!E.disabled),S=w.find(E=>E.value===s.value),O=A$(w,y,S);O!==void 0&&s.onValueChange(O.value)}),b=y=>{u||(s.onOpenChange(!0),g()),y&&(s.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return p.jsx(tie,{asChild:!0,...a,children:p.jsx(We.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":j$(s.value)?"":void 0,...i,ref:f,onClick:Fe(i.onClick,y=>{y.currentTarget.focus(),d.current!=="mouse"&&b(y)}),onPointerDown:Fe(i.onPointerDown,y=>{d.current=y.pointerType;const w=y.target;w.hasPointerCapture(y.pointerId)&&w.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(b(y),y.preventDefault())}),onKeyDown:Fe(i.onKeyDown,y=>{const w=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&m(y.key),!(w&&y.key===" ")&&tae.includes(y.key)&&(b(),y.preventDefault())})})})});i$.displayName=n$;var a$="SelectValue",o$=P.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:a,placeholder:s="",...u}=e,f=ta(a$,r),{onValueNodeHasChildrenChange:c}=f,d=a!==void 0,h=Je(t,f.onValueNodeChange);return Rt(()=>{c(d)},[c,d]),p.jsx(We.span,{...u,ref:h,style:{pointerEvents:"none"},children:j$(f.value)?p.jsx(p.Fragment,{children:s}):a})});o$.displayName=a$;var sae="SelectIcon",s$=P.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return p.jsx(We.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});s$.displayName=sae;var lae="SelectPortal",l$=e=>p.jsx(w_,{asChild:!0,...e});l$.displayName=lae;var Ga="SelectContent",c$=P.forwardRef((e,t)=>{const r=ta(Ga,e.__scopeSelect),[n,i]=P.useState();if(Rt(()=>{i(new DocumentFragment)},[]),!r.open){const a=n;return a?Kc.createPortal(p.jsx(u$,{scope:e.__scopeSelect,children:p.jsx(Bp.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),a):null}return p.jsx(f$,{...e,ref:t})});c$.displayName=Ga;var gn=10,[u$,ra]=Hs(Ga),cae="SelectContentImpl",uae=aie("SelectContent.RemoveScroll"),f$=P.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:u,sideOffset:f,align:c,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:y,avoidCollisions:w,...S}=e,O=ta(Ga,r),[E,C]=P.useState(null),[A,N]=P.useState(null),T=Je(t,oe=>C(oe)),[R,I]=P.useState(null),[q,L]=P.useState(null),D=zp(r),[U,H]=P.useState(!1),V=P.useRef(!1);P.useEffect(()=>{if(E)return KL(E)},[E]),_L();const K=P.useCallback(oe=>{const[me,...ie]=D().map(re=>re.ref.current),[ue]=ie.slice(-1),ve=document.activeElement;for(const re of oe)if(re===ve||(re?.scrollIntoView({block:"nearest"}),re===me&&A&&(A.scrollTop=0),re===ue&&A&&(A.scrollTop=A.scrollHeight),re?.focus(),document.activeElement!==ve))return},[D,A]),X=P.useCallback(()=>K([R,E]),[K,R,E]);P.useEffect(()=>{U&&X()},[U,X]);const{onOpenChange:B,triggerPointerDownPosRef:Z}=O;P.useEffect(()=>{if(E){let oe={x:0,y:0};const me=ue=>{oe={x:Math.abs(Math.round(ue.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(ue.pageY)-(Z.current?.y??0))}},ie=ue=>{oe.x<=10&&oe.y<=10?ue.preventDefault():E.contains(ue.target)||B(!1),document.removeEventListener("pointermove",me),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",ie,{capture:!0})}}},[E,B,Z]),P.useEffect(()=>{const oe=()=>B(!1);return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[B]);const[ee,M]=E$(oe=>{const me=D().filter(ve=>!ve.disabled),ie=me.find(ve=>ve.ref.current===document.activeElement),ue=A$(me,oe,ie);ue&&setTimeout(()=>ue.ref.current.focus())}),$=P.useCallback((oe,me,ie)=>{const ue=!V.current&&!ie;(O.value!==void 0&&O.value===me||ue)&&(I(oe),ue&&(V.current=!0))},[O.value]),Q=P.useCallback(()=>E?.focus(),[E]),ae=P.useCallback((oe,me,ie)=>{const ue=!V.current&&!ie;(O.value!==void 0&&O.value===me||ue)&&L(oe)},[O.value]),pe=n==="popper"?z1:d$,ye=pe===z1?{side:u,sideOffset:f,align:c,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:y,avoidCollisions:w}:{};return p.jsx(u$,{scope:r,content:E,viewport:A,onViewportChange:N,itemRefCallback:$,selectedItem:R,onItemLeave:Q,itemTextRefCallback:ae,focusSelectedItem:X,selectedItemText:q,position:n,isPositioned:U,searchRef:ee,children:p.jsx(S_,{as:uae,allowPinchZoom:!0,children:p.jsx(f_,{asChild:!0,trapped:O.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:Fe(i,oe=>{O.trigger?.focus({preventScroll:!0}),oe.preventDefault()}),children:p.jsx(u_,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:p.jsx(pe,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:oe=>oe.preventDefault(),...S,...ye,onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Fe(S.onKeyDown,oe=>{const me=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!me&&oe.key.length===1&&M(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let ue=D().filter(ve=>!ve.disabled).map(ve=>ve.ref.current);if(["ArrowUp","End"].includes(oe.key)&&(ue=ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const ve=oe.target,re=ue.indexOf(ve);ue=ue.slice(re+1)}setTimeout(()=>K(ue)),oe.preventDefault()}})})})})})})});f$.displayName=cae;var fae="SelectItemAlignedPosition",d$=P.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,a=ta(Ga,r),s=ra(Ga,r),[u,f]=P.useState(null),[c,d]=P.useState(null),h=Je(t,T=>d(T)),m=zp(r),g=P.useRef(!1),b=P.useRef(!0),{viewport:y,selectedItem:w,selectedItemText:S,focusSelectedItem:O}=s,E=P.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&c&&y&&w&&S){const T=a.trigger.getBoundingClientRect(),R=c.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),q=S.getBoundingClientRect();if(a.dir!=="rtl"){const ve=q.left-R.left,re=I.left-ve,De=T.left-re,Te=T.width+De,Ke=Math.max(Te,R.width),lt=window.innerWidth-gn,vt=hb(re,[gn,Math.max(gn,lt-Ke)]);u.style.minWidth=Te+"px",u.style.left=vt+"px"}else{const ve=R.right-q.right,re=window.innerWidth-I.right-ve,De=window.innerWidth-T.right-re,Te=T.width+De,Ke=Math.max(Te,R.width),lt=window.innerWidth-gn,vt=hb(re,[gn,Math.max(gn,lt-Ke)]);u.style.minWidth=Te+"px",u.style.right=vt+"px"}const L=m(),D=window.innerHeight-gn*2,U=y.scrollHeight,H=window.getComputedStyle(c),V=parseInt(H.borderTopWidth,10),K=parseInt(H.paddingTop,10),X=parseInt(H.borderBottomWidth,10),B=parseInt(H.paddingBottom,10),Z=V+K+U+B+X,ee=Math.min(w.offsetHeight*5,Z),M=window.getComputedStyle(y),$=parseInt(M.paddingTop,10),Q=parseInt(M.paddingBottom,10),ae=T.top+T.height/2-gn,pe=D-ae,ye=w.offsetHeight/2,oe=w.offsetTop+ye,me=V+K+oe,ie=Z-me;if(me<=ae){const ve=L.length>0&&w===L[L.length-1].ref.current;u.style.bottom="0px";const re=c.clientHeight-y.offsetTop-y.offsetHeight,De=Math.max(pe,ye+(ve?Q:0)+re+X),Te=me+De;u.style.height=Te+"px"}else{const ve=L.length>0&&w===L[0].ref.current;u.style.top="0px";const De=Math.max(ae,V+y.offsetTop+(ve?$:0)+ye)+ie;u.style.height=De+"px",y.scrollTop=me-ae+y.offsetTop}u.style.margin=`${gn}px 0`,u.style.minHeight=ee+"px",u.style.maxHeight=D+"px",n?.(),requestAnimationFrame(()=>g.current=!0)}},[m,a.trigger,a.valueNode,u,c,y,w,S,a.dir,n]);Rt(()=>E(),[E]);const[C,A]=P.useState();Rt(()=>{c&&A(window.getComputedStyle(c).zIndex)},[c]);const N=P.useCallback(T=>{T&&b.current===!0&&(E(),O?.(),b.current=!1)},[E,O]);return p.jsx(hae,{scope:r,contentWrapper:u,shouldExpandOnScrollRef:g,onScrollButtonChange:N,children:p.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(We.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});d$.displayName=fae;var dae="SelectPopperPosition",z1=P.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=gn,...a}=e,s=Fp(r);return p.jsx(rie,{...s,...a,ref:t,align:n,collisionPadding:i,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)"}})});z1.displayName=dae;var[hae,O_]=Hs(Ga,{}),F1="SelectViewport",h$=P.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,a=ra(F1,r),s=O_(F1,r),u=Je(t,a.onViewportChange),f=P.useRef(0);return p.jsxs(p.Fragment,{children:[p.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:n}),p.jsx(Bp.Slot,{scope:r,children:p.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Fe(i.onScroll,c=>{const d=c.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=s;if(m?.current&&h){const g=Math.abs(f.current-d.scrollTop);if(g>0){const b=window.innerHeight-gn*2,y=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),S=Math.max(y,w);if(S0?C:0,h.style.justifyContent="flex-end")}}}f.current=d.scrollTop})})})]})});h$.displayName=F1;var p$="SelectGroup",[pae,mae]=Hs(p$),vae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Gi();return p.jsx(pae,{scope:r,id:i,children:p.jsx(We.div,{role:"group","aria-labelledby":i,...n,ref:t})})});vae.displayName=p$;var m$="SelectLabel",gae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=mae(m$,r);return p.jsx(We.div,{id:i.id,...n,ref:t})});gae.displayName=m$;var qh="SelectItem",[yae,v$]=Hs(qh),g$=P.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...s}=e,u=ta(qh,r),f=ra(qh,r),c=u.value===n,[d,h]=P.useState(a??""),[m,g]=P.useState(!1),b=Je(t,O=>f.itemRefCallback?.(O,n,i)),y=Gi(),w=P.useRef("touch"),S=()=>{i||(u.onValueChange(n),u.onOpenChange(!1))};if(n==="")throw new Error("A 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 p.jsx(yae,{scope:r,value:n,disabled:i,textId:y,isSelected:c,onItemTextChange:P.useCallback(O=>{h(E=>E||(O?.textContent??"").trim())},[]),children:p.jsx(Bp.ItemSlot,{scope:r,value:n,disabled:i,textValue:d,children:p.jsx(We.div,{role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:b,onFocus:Fe(s.onFocus,()=>g(!0)),onBlur:Fe(s.onBlur,()=>g(!1)),onClick:Fe(s.onClick,()=>{w.current!=="mouse"&&S()}),onPointerUp:Fe(s.onPointerUp,()=>{w.current==="mouse"&&S()}),onPointerDown:Fe(s.onPointerDown,O=>{w.current=O.pointerType}),onPointerMove:Fe(s.onPointerMove,O=>{w.current=O.pointerType,i?f.onItemLeave?.():w.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Fe(s.onPointerLeave,O=>{O.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:Fe(s.onKeyDown,O=>{f.searchRef?.current!==""&&O.key===" "||(rae.includes(O.key)&&S(),O.key===" "&&O.preventDefault())})})})})});g$.displayName=qh;var Zl="SelectItemText",y$=P.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...a}=e,s=ta(Zl,r),u=ra(Zl,r),f=v$(Zl,r),c=oae(Zl,r),[d,h]=P.useState(null),m=Je(t,S=>h(S),f.onItemTextChange,S=>u.itemTextRefCallback?.(S,f.value,f.disabled)),g=d?.textContent,b=P.useMemo(()=>p.jsx("option",{value:f.value,disabled:f.disabled,children:g},f.value),[f.disabled,f.value,g]),{onNativeOptionAdd:y,onNativeOptionRemove:w}=c;return Rt(()=>(y(b),()=>w(b)),[y,w,b]),p.jsxs(p.Fragment,{children:[p.jsx(We.span,{id:f.textId,...a,ref:m}),f.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Kc.createPortal(a.children,s.valueNode):null]})});y$.displayName=Zl;var x$="SelectItemIndicator",b$=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return v$(x$,r).isSelected?p.jsx(We.span,{"aria-hidden":!0,...n,ref:t}):null});b$.displayName=x$;var q1="SelectScrollUpButton",w$=P.forwardRef((e,t)=>{const r=ra(q1,e.__scopeSelect),n=O_(q1,e.__scopeSelect),[i,a]=P.useState(!1),s=Je(t,n.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let u=function(){const c=f.scrollTop>0;a(c)};const f=r.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?p.jsx(S$,{...e,ref:s,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=r;u&&f&&(u.scrollTop=u.scrollTop-f.offsetHeight)}}):null});w$.displayName=q1;var U1="SelectScrollDownButton",_$=P.forwardRef((e,t)=>{const r=ra(U1,e.__scopeSelect),n=O_(U1,e.__scopeSelect),[i,a]=P.useState(!1),s=Je(t,n.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let u=function(){const c=f.scrollHeight-f.clientHeight,d=Math.ceil(f.scrollTop)f.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?p.jsx(S$,{...e,ref:s,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=r;u&&f&&(u.scrollTop=u.scrollTop+f.offsetHeight)}}):null});_$.displayName=U1;var S$=P.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,a=ra("SelectScrollButton",r),s=P.useRef(null),u=zp(r),f=P.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return P.useEffect(()=>()=>f(),[f]),Rt(()=>{u().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),p.jsx(We.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Fe(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:Fe(i.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:Fe(i.onPointerLeave,()=>{f()})})}),xae="SelectSeparator",bae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return p.jsx(We.div,{"aria-hidden":!0,...n,ref:t})});bae.displayName=xae;var W1="SelectArrow",wae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Fp(r),a=ta(W1,r),s=ra(W1,r);return a.open&&s.position==="popper"?p.jsx(nie,{...i,...n,ref:t}):null});wae.displayName=W1;var _ae="SelectBubbleInput",O$=P.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=P.useRef(null),a=Je(n,i),s=__(t);return P.useEffect(()=>{const u=i.current;if(!u)return;const f=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(f,"value").set;if(s!==t&&d){const h=new Event("change",{bubbles:!0});d.call(u,t),u.dispatchEvent(h)}},[s,t]),p.jsx(We.select,{...r,style:{...VL,...r.style},ref:a,defaultValue:t})});O$.displayName=_ae;function j$(e){return e===""||e===void 0}function E$(e){const t=ar(e),r=P.useRef(""),n=P.useRef(0),i=P.useCallback(s=>{const u=r.current+s;t(u),(function f(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>f(""),1e3))})(u)},[t]),a=P.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return P.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function A$(e,t,r){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=Sae(e,Math.max(a,0));i.length===1&&(s=s.filter(c=>c!==r));const f=s.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==r?f:void 0}function Sae(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Oae=r$,jae=i$,Eae=o$,Aae=s$,Pae=l$,Nae=c$,Cae=h$,Tae=g$,kae=y$,Rae=b$,Mae=w$,Iae=_$;function tt({...e}){return p.jsx(Oae,{"data-slot":"select",...e})}function rt({...e}){return p.jsx(Eae,{"data-slot":"select-value",...e})}function nt({className:e,size:t="default",children:r,...n}){return p.jsxs(jae,{"data-slot":"select-trigger","data-size":t,className:Ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,p.jsx(Aae,{asChild:!0,children:p.jsx(cc,{className:"size-4 opacity-50"})})]})}function st({className:e,children:t,position:r="popper",...n}){return p.jsx(Pae,{children:p.jsxs(Nae,{"data-slot":"select-content",className:Ie("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"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:r,...n,children:[p.jsx(Dae,{}),p.jsx(Cae,{className:Ie("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsx(Lae,{})]})})}function Ae({className:e,children:t,...r}){return p.jsxs(Tae,{"data-slot":"select-item",className:Ie("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[p.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(Rae,{children:p.jsx(dR,{className:"size-4"})})}),p.jsx(kae,{children:t})]})}function Dae({className:e,...t}){return p.jsx(Mae,{"data-slot":"select-scroll-up-button",className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(jB,{className:"size-4"})})}function Lae({className:e,...t}){return p.jsx(Iae,{"data-slot":"select-scroll-down-button",className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(cc,{className:"size-4"})})}function $ae(){const e=[{id:1,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Defrost",lastEdited:"2025.12.03.11:45",hasError:!1},{id:2,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Opened/Preped",lastEdited:"2025.12.03.11:45",hasError:!1},{id:3,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Heated",lastEdited:"2025.12.03.11:45",hasError:!1},{id:4,location:"Location A",labelCategory:"Grab'n'Go",productCategory:"Sandwich",product:"Chicken Sandwich",template:`2"x6" G'n'G`,labelType:"",lastEdited:"2025.12.03.11:45",hasError:!0}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 text-gray-900 placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0 text-gray-900",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs("div",{className:"flex rounded-md border border-gray-300 bg-white h-10 overflow-hidden shrink-0",children:[p.jsx("button",{type:"button",className:"px-4 h-full border-r border-gray-200 text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Import"}),p.jsx("button",{type:"button",className:"px-4 h-full border-r border-gray-200 text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Export"}),p.jsx("button",{type:"button",className:"px-4 h-full text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Edit"})]}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"text-red-600 font-bold italic text-lg",children:"One or more of your labels are missing fields from their templates (! ! ! 1 in total)."}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[120px]",children:"Location"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[140px]",children:"Label Category"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[140px]",children:"Product Category"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Product"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Template"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Label Type"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(de,{className:"font-medium",children:t.location}),p.jsx(de,{children:t.labelCategory}),p.jsx(de,{children:t.productCategory}),p.jsx(de,{children:t.product}),p.jsxs(de,{className:"font-medium",children:[t.template,t.hasError&&p.jsx("span",{className:"text-red-600 font-bold ml-2",children:"! ! !"})]}),p.jsx(de,{children:t.labelType||"-"}),p.jsx(de,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function Bae(){const e=[{id:1,category:"Prep",count:54,photo:"XXX",lastEdited:"2025.12.03.11:45"},{id:2,category:"Green",count:33,photo:"XXX",lastEdited:"2025.12.03.11:45"},{id:3,category:"Red",count:44,photo:"XXX",lastEdited:"2025.12.03.11:45"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Search"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[150px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Location"}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label Category ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[250px]",children:"Label Category"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"No. of Labels"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"Category Photo"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(de,{className:"font-medium",children:t.category}),p.jsx(de,{className:"font-numeric",children:t.count}),p.jsx(de,{className:"text-gray-500",children:t.photo}),p.jsx(de,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function zae(){const e=[{id:1,type:"Defrost",count:54,lastEdited:"2025.12.03.11:45"},{id:2,type:"Thawed",count:33,lastEdited:"2025.12.03.11:45"},{id:3,type:"Opened",count:44,lastEdited:"2025.12.03.11:45"},{id:4,type:"Preped",count:17,lastEdited:"2025.12.03.11:45"},{id:5,type:"Heated",count:67,lastEdited:"2025.12.03.11:45"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Search"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[150px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"all"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Location"}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label Type ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[250px]",children:"Label Types"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"No. of Labels"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(de,{className:"font-medium",children:t.type}),p.jsx(de,{className:"font-numeric",children:t.count}),p.jsx(de,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}const Fae="label-template-",qae="label-template-ids";function P$(e){return`${Fae}${e}`}function N$(){return qae}function Uae(){return`template-${Date.now()}`}function Wae(){return`el-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Hae(e){return{id:e??Uae(),name:"未命名模板",labelType:"PRICE",unit:"cm",width:6,height:4,appliedLocation:"ALL",showRuler:!0,showGrid:!0,elements:[]}}const ob=[{name:'2"×1"',width:2,height:1,unit:"inch"},{name:'2"×2"',width:2,height:2,unit:"inch"},{name:'3"×1"',width:3,height:1,unit:"inch"},{name:'3"×2"',width:3,height:2,unit:"inch"},{name:'4"×2"',width:4,height:2,unit:"inch"},{name:'4"×6"',width:4,height:6,unit:"inch"},{name:"6cm×4cm",width:6,height:4,unit:"cm"},{name:"10cm×6cm",width:10,height:6,unit:"cm"},{name:"A4",width:21,height:29.7,unit:"cm"},{name:"A5",width:14.8,height:21,unit:"cm"}];function Vae(e,t=20,r=20){const n=Wae(),a={TEXT_STATIC:{width:120,height:24,config:{text:"文本",fontFamily:"Arial",fontSize:14,fontWeight:"normal",textAlign:"left"}},TEXT_PRODUCT:{width:120,height:24,config:{text:"商品名",fontFamily:"Arial",fontSize:14,fontWeight:"normal",textAlign:"left"}},TEXT_PRICE:{width:80,height:24,config:{text:"0.00",prefix:"¥",decimal:2,fontFamily:"Arial",fontSize:14,fontWeight:"bold",textAlign:"right"}},BARCODE:{width:160,height:48,config:{barcodeType:"CODE128",data:"123456789",showText:!0,orientation:"horizontal"}},QRCODE:{width:80,height:80,config:{data:"https://example.com",errorLevel:"M"}},IMAGE:{width:60,height:60,config:{src:"",scaleMode:"contain"}},DATE:{width:120,height:24,config:{format:"YYYY-MM-DD",offsetDays:0}},TIME:{width:100,height:24,config:{format:"HH:mm",offsetDays:0}},DURATION:{width:120,height:24,config:{format:"YYYY-MM-DD",offsetDays:3}},WEIGHT:{width:80,height:24,config:{unit:"g",value:500}},WEIGHT_PRICE:{width:100,height:24,config:{unitPrice:10,weight:.5,currency:"¥"}},BLANK:{width:40,height:24,config:{}},NUTRITION:{width:200,height:120,config:{calories:120,fat:"5g",protein:"3g",carbs:"10g",layout:"standard"}}}[e];return{id:n,type:e,x:t,y:r,width:a.width,height:a.height,rotation:"horizontal",border:"none",config:{...a.config}}}function C$(){try{const e=localStorage.getItem(N$());if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function T$(e){try{const t=localStorage.getItem(P$(e));return t?JSON.parse(t):null}catch{return null}}function ak(){const e=C$(),t=[];for(const r of e){const n=T$(r);n&&t.push(n)}return t.sort((r,n)=>n.id>r.id?1:-1)}function Gae(e){localStorage.setItem(N$(),JSON.stringify(e))}function Kae(e){const t=P$(e.id);localStorage.setItem(t,JSON.stringify(e));const r=C$();r.includes(e.id)||(r.push(e.id),Gae(r))}function Xae(e){const t=Yae(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(Zae);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function Yae(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=eoe(i),u=Jae(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qae=Symbol("radix.slottable");function Zae(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qae}function Jae(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function eoe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qp="Dialog",[k$]=gi(qp),[toe,An]=k$(qp),R$=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,u=P.useRef(null),f=P.useRef(null),[c,d]=Ha({prop:n,defaultProp:i??!1,onChange:a,caller:qp});return p.jsx(toe,{scope:t,triggerRef:u,contentRef:f,contentId:Gi(),titleId:Gi(),descriptionId:Gi(),open:c,onOpenChange:d,onOpenToggle:P.useCallback(()=>d(h=>!h),[d]),modal:s,children:r})};R$.displayName=qp;var M$="DialogTrigger",roe=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(M$,r),a=Je(t,i.triggerRef);return p.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":A_(i.open),...n,ref:a,onClick:Fe(e.onClick,i.onOpenToggle)})});roe.displayName=M$;var j_="DialogPortal",[noe,I$]=k$(j_,{forceMount:void 0}),D$=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=An(j_,t);return p.jsx(noe,{scope:t,forceMount:r,children:P.Children.map(n,s=>p.jsx(Un,{present:r||a.open,children:p.jsx(w_,{asChild:!0,container:i,children:s})}))})};D$.displayName=j_;var Uh="DialogOverlay",L$=P.forwardRef((e,t)=>{const r=I$(Uh,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=An(Uh,e.__scopeDialog);return a.modal?p.jsx(Un,{present:n||a.open,children:p.jsx(aoe,{...i,ref:t})}):null});L$.displayName=Uh;var ioe=Xae("DialogOverlay.RemoveScroll"),aoe=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(Uh,r);return p.jsx(S_,{as:ioe,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(We.div,{"data-state":A_(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ka="DialogContent",$$=P.forwardRef((e,t)=>{const r=I$(Ka,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=An(Ka,e.__scopeDialog);return p.jsx(Un,{present:n||a.open,children:a.modal?p.jsx(ooe,{...i,ref:t}):p.jsx(soe,{...i,ref:t})})});$$.displayName=Ka;var ooe=P.forwardRef((e,t)=>{const r=An(Ka,e.__scopeDialog),n=P.useRef(null),i=Je(t,r.contentRef,n);return P.useEffect(()=>{const a=n.current;if(a)return KL(a)},[]),p.jsx(B$,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Fe(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Fe(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&a.preventDefault()}),onFocusOutside:Fe(e.onFocusOutside,a=>a.preventDefault())})}),soe=P.forwardRef((e,t)=>{const r=An(Ka,e.__scopeDialog),n=P.useRef(!1),i=P.useRef(!1);return p.jsx(B$,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;r.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),B$=P.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,u=An(Ka,r),f=P.useRef(null),c=Je(t,f);return _L(),p.jsxs(p.Fragment,{children:[p.jsx(f_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:p.jsx(u_,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":A_(u.open),...s,ref:c,onDismiss:()=>u.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(loe,{titleId:u.titleId}),p.jsx(uoe,{contentRef:f,descriptionId:u.descriptionId})]})]})}),E_="DialogTitle",z$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(E_,r);return p.jsx(We.h2,{id:i.titleId,...n,ref:t})});z$.displayName=E_;var F$="DialogDescription",q$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(F$,r);return p.jsx(We.p,{id:i.descriptionId,...n,ref:t})});q$.displayName=F$;var U$="DialogClose",W$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(U$,r);return p.jsx(We.button,{type:"button",...n,ref:t,onClick:Fe(e.onClick,()=>i.onOpenChange(!1))})});W$.displayName=U$;function A_(e){return e?"open":"closed"}var H$="DialogTitleWarning",[Fle,V$]=k6(H$,{contentName:Ka,titleName:E_,docsSlug:"dialog"}),loe=({titleId:e})=>{const t=V$(H$),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. +`)},Qie=0,$o=[];function Zie(e){var t=P.useRef([]),r=P.useRef([0,0]),n=P.useRef(),i=P.useState(Qie++)[0],a=P.useState(ZL)[0],s=P.useRef(e);P.useEffect(function(){s.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=xie([e.lockRef.current],(e.shards||[]).map(ik),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=P.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!s.current.allowPinchZoom;var S=qf(y),O=r.current,E="deltaX"in y?y.deltaX:O[0]-S[0],C="deltaY"in y?y.deltaY:O[1]-S[1],A,N=y.target,T=Math.abs(E)>Math.abs(C)?"h":"v";if("touches"in y&&T==="h"&&N.type==="range")return!1;var R=window.getSelection(),I=R&&R.anchorNode,q=I?I===N||I.contains(N):!1;if(q)return!1;var L=rk(T,N);if(!L)return!0;if(L?A=T:(A=T==="v"?"h":"v",L=rk(T,N)),!L)return!1;if(!n.current&&"changedTouches"in y&&(E||C)&&(n.current=A),!A)return!0;var D=n.current||A;return Kie(D,w,y,D==="h"?E:C)},[]),f=P.useCallback(function(y){var w=y;if(!(!$o.length||$o[$o.length-1]!==a)){var S="deltaY"in w?nk(w):qf(w),O=t.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&Xie(A.delta,S)})[0];if(O&&O.should){w.cancelable&&w.preventDefault();return}if(!O){var E=(s.current.shards||[]).map(ik).filter(Boolean).filter(function(A){return A.contains(w.target)}),C=E.length>0?u(w,E[0]):!s.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),c=P.useCallback(function(y,w,S,O){var E={name:y,delta:w,target:S,should:O,shadowParent:Jie(S)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(C){return C!==E})},1)},[]),d=P.useCallback(function(y){r.current=qf(y),n.current=void 0},[]),h=P.useCallback(function(y){c(y.type,nk(y),y.target,u(y,e.lockRef.current))},[]),m=P.useCallback(function(y){c(y.type,qf(y),y.target,u(y,e.lockRef.current))},[]);P.useEffect(function(){return $o.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",f,Lo),document.addEventListener("touchmove",f,Lo),document.addEventListener("touchstart",d,Lo),function(){$o=$o.filter(function(y){return y!==a}),document.removeEventListener("wheel",f,Lo),document.removeEventListener("touchmove",f,Lo),document.removeEventListener("touchstart",d,Lo)}},[]);var g=e.removeScrollBar,b=e.inert;return P.createElement(P.Fragment,null,b?P.createElement(a,{styles:Yie(i)}):null,g?P.createElement(Fie,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Jie(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const eae=Pie(QL,Zie);var S_=P.forwardRef(function(e,t){return P.createElement($p,Mn({},e,{ref:t,sideCar:eae}))});S_.classNames=$p.classNames;var tae=[" ","Enter","ArrowUp","ArrowDown"],rae=[" ","Enter"],Va="Select",[Bp,zp,nae]=xL(Va),[Hs]=gi(Va,[nae,LL]),Fp=LL(),[iae,ta]=Hs(Va),[aae,oae]=Hs(Va),r$=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:s,defaultValue:u,onValueChange:f,dir:c,name:d,autoComplete:h,disabled:m,required:g,form:b}=e,y=Fp(t),[w,S]=P.useState(null),[O,E]=P.useState(null),[C,A]=P.useState(!1),N=Kh(c),[T,R]=Ha({prop:n,defaultProp:i??!1,onChange:a,caller:Va}),[I,q]=Ha({prop:s,defaultProp:u,onChange:f,caller:Va}),L=P.useRef(null),D=w?b||!!w.closest("form"):!0,[U,H]=P.useState(new Set),V=Array.from(U).map(K=>K.props.value).join(";");return p.jsx(eie,{...y,children:p.jsxs(iae,{required:g,scope:t,trigger:w,onTriggerChange:S,valueNode:O,onValueNodeChange:E,valueNodeHasChildren:C,onValueNodeHasChildrenChange:A,contentId:Gi(),value:I,onValueChange:q,open:T,onOpenChange:R,dir:N,triggerPointerDownPosRef:L,disabled:m,children:[p.jsx(Bp.Provider,{scope:t,children:p.jsx(aae,{scope:e.__scopeSelect,onNativeOptionAdd:P.useCallback(K=>{H(X=>new Set(X).add(K))},[]),onNativeOptionRemove:P.useCallback(K=>{H(X=>{const B=new Set(X);return B.delete(K),B})},[]),children:r})}),D?p.jsxs(O$,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:h,value:I,onChange:K=>q(K.target.value),disabled:m,form:b,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(U)]},V):null]})})};r$.displayName=Va;var n$="SelectTrigger",i$=P.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...i}=e,a=Fp(r),s=ta(n$,r),u=s.disabled||n,f=Je(t,s.onTriggerChange),c=zp(r),d=P.useRef("touch"),[h,m,g]=E$(y=>{const w=c().filter(E=>!E.disabled),S=w.find(E=>E.value===s.value),O=A$(w,y,S);O!==void 0&&s.onValueChange(O.value)}),b=y=>{u||(s.onOpenChange(!0),g()),y&&(s.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return p.jsx(tie,{asChild:!0,...a,children:p.jsx(We.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":j$(s.value)?"":void 0,...i,ref:f,onClick:Fe(i.onClick,y=>{y.currentTarget.focus(),d.current!=="mouse"&&b(y)}),onPointerDown:Fe(i.onPointerDown,y=>{d.current=y.pointerType;const w=y.target;w.hasPointerCapture(y.pointerId)&&w.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(b(y),y.preventDefault())}),onKeyDown:Fe(i.onKeyDown,y=>{const w=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&m(y.key),!(w&&y.key===" ")&&tae.includes(y.key)&&(b(),y.preventDefault())})})})});i$.displayName=n$;var a$="SelectValue",o$=P.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:a,placeholder:s="",...u}=e,f=ta(a$,r),{onValueNodeHasChildrenChange:c}=f,d=a!==void 0,h=Je(t,f.onValueNodeChange);return Rt(()=>{c(d)},[c,d]),p.jsx(We.span,{...u,ref:h,style:{pointerEvents:"none"},children:j$(f.value)?p.jsx(p.Fragment,{children:s}):a})});o$.displayName=a$;var sae="SelectIcon",s$=P.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return p.jsx(We.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});s$.displayName=sae;var lae="SelectPortal",l$=e=>p.jsx(w_,{asChild:!0,...e});l$.displayName=lae;var Ga="SelectContent",c$=P.forwardRef((e,t)=>{const r=ta(Ga,e.__scopeSelect),[n,i]=P.useState();if(Rt(()=>{i(new DocumentFragment)},[]),!r.open){const a=n;return a?Kc.createPortal(p.jsx(u$,{scope:e.__scopeSelect,children:p.jsx(Bp.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),a):null}return p.jsx(f$,{...e,ref:t})});c$.displayName=Ga;var gn=10,[u$,ra]=Hs(Ga),cae="SelectContentImpl",uae=aie("SelectContent.RemoveScroll"),f$=P.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:u,sideOffset:f,align:c,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:y,avoidCollisions:w,...S}=e,O=ta(Ga,r),[E,C]=P.useState(null),[A,N]=P.useState(null),T=Je(t,oe=>C(oe)),[R,I]=P.useState(null),[q,L]=P.useState(null),D=zp(r),[U,H]=P.useState(!1),V=P.useRef(!1);P.useEffect(()=>{if(E)return KL(E)},[E]),_L();const K=P.useCallback(oe=>{const[me,...ie]=D().map(re=>re.ref.current),[ue]=ie.slice(-1),ve=document.activeElement;for(const re of oe)if(re===ve||(re?.scrollIntoView({block:"nearest"}),re===me&&A&&(A.scrollTop=0),re===ue&&A&&(A.scrollTop=A.scrollHeight),re?.focus(),document.activeElement!==ve))return},[D,A]),X=P.useCallback(()=>K([R,E]),[K,R,E]);P.useEffect(()=>{U&&X()},[U,X]);const{onOpenChange:B,triggerPointerDownPosRef:Z}=O;P.useEffect(()=>{if(E){let oe={x:0,y:0};const me=ue=>{oe={x:Math.abs(Math.round(ue.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(ue.pageY)-(Z.current?.y??0))}},ie=ue=>{oe.x<=10&&oe.y<=10?ue.preventDefault():E.contains(ue.target)||B(!1),document.removeEventListener("pointermove",me),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",ie,{capture:!0})}}},[E,B,Z]),P.useEffect(()=>{const oe=()=>B(!1);return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[B]);const[ee,M]=E$(oe=>{const me=D().filter(ve=>!ve.disabled),ie=me.find(ve=>ve.ref.current===document.activeElement),ue=A$(me,oe,ie);ue&&setTimeout(()=>ue.ref.current.focus())}),$=P.useCallback((oe,me,ie)=>{const ue=!V.current&&!ie;(O.value!==void 0&&O.value===me||ue)&&(I(oe),ue&&(V.current=!0))},[O.value]),Q=P.useCallback(()=>E?.focus(),[E]),ae=P.useCallback((oe,me,ie)=>{const ue=!V.current&&!ie;(O.value!==void 0&&O.value===me||ue)&&L(oe)},[O.value]),pe=n==="popper"?z1:d$,ye=pe===z1?{side:u,sideOffset:f,align:c,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:y,avoidCollisions:w}:{};return p.jsx(u$,{scope:r,content:E,viewport:A,onViewportChange:N,itemRefCallback:$,selectedItem:R,onItemLeave:Q,itemTextRefCallback:ae,focusSelectedItem:X,selectedItemText:q,position:n,isPositioned:U,searchRef:ee,children:p.jsx(S_,{as:uae,allowPinchZoom:!0,children:p.jsx(f_,{asChild:!0,trapped:O.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:Fe(i,oe=>{O.trigger?.focus({preventScroll:!0}),oe.preventDefault()}),children:p.jsx(u_,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:p.jsx(pe,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:oe=>oe.preventDefault(),...S,...ye,onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Fe(S.onKeyDown,oe=>{const me=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!me&&oe.key.length===1&&M(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let ue=D().filter(ve=>!ve.disabled).map(ve=>ve.ref.current);if(["ArrowUp","End"].includes(oe.key)&&(ue=ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const ve=oe.target,re=ue.indexOf(ve);ue=ue.slice(re+1)}setTimeout(()=>K(ue)),oe.preventDefault()}})})})})})})});f$.displayName=cae;var fae="SelectItemAlignedPosition",d$=P.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,a=ta(Ga,r),s=ra(Ga,r),[u,f]=P.useState(null),[c,d]=P.useState(null),h=Je(t,T=>d(T)),m=zp(r),g=P.useRef(!1),b=P.useRef(!0),{viewport:y,selectedItem:w,selectedItemText:S,focusSelectedItem:O}=s,E=P.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&c&&y&&w&&S){const T=a.trigger.getBoundingClientRect(),R=c.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),q=S.getBoundingClientRect();if(a.dir!=="rtl"){const ve=q.left-R.left,re=I.left-ve,De=T.left-re,Te=T.width+De,Ke=Math.max(Te,R.width),lt=window.innerWidth-gn,vt=hb(re,[gn,Math.max(gn,lt-Ke)]);u.style.minWidth=Te+"px",u.style.left=vt+"px"}else{const ve=R.right-q.right,re=window.innerWidth-I.right-ve,De=window.innerWidth-T.right-re,Te=T.width+De,Ke=Math.max(Te,R.width),lt=window.innerWidth-gn,vt=hb(re,[gn,Math.max(gn,lt-Ke)]);u.style.minWidth=Te+"px",u.style.right=vt+"px"}const L=m(),D=window.innerHeight-gn*2,U=y.scrollHeight,H=window.getComputedStyle(c),V=parseInt(H.borderTopWidth,10),K=parseInt(H.paddingTop,10),X=parseInt(H.borderBottomWidth,10),B=parseInt(H.paddingBottom,10),Z=V+K+U+B+X,ee=Math.min(w.offsetHeight*5,Z),M=window.getComputedStyle(y),$=parseInt(M.paddingTop,10),Q=parseInt(M.paddingBottom,10),ae=T.top+T.height/2-gn,pe=D-ae,ye=w.offsetHeight/2,oe=w.offsetTop+ye,me=V+K+oe,ie=Z-me;if(me<=ae){const ve=L.length>0&&w===L[L.length-1].ref.current;u.style.bottom="0px";const re=c.clientHeight-y.offsetTop-y.offsetHeight,De=Math.max(pe,ye+(ve?Q:0)+re+X),Te=me+De;u.style.height=Te+"px"}else{const ve=L.length>0&&w===L[0].ref.current;u.style.top="0px";const De=Math.max(ae,V+y.offsetTop+(ve?$:0)+ye)+ie;u.style.height=De+"px",y.scrollTop=me-ae+y.offsetTop}u.style.margin=`${gn}px 0`,u.style.minHeight=ee+"px",u.style.maxHeight=D+"px",n?.(),requestAnimationFrame(()=>g.current=!0)}},[m,a.trigger,a.valueNode,u,c,y,w,S,a.dir,n]);Rt(()=>E(),[E]);const[C,A]=P.useState();Rt(()=>{c&&A(window.getComputedStyle(c).zIndex)},[c]);const N=P.useCallback(T=>{T&&b.current===!0&&(E(),O?.(),b.current=!1)},[E,O]);return p.jsx(hae,{scope:r,contentWrapper:u,shouldExpandOnScrollRef:g,onScrollButtonChange:N,children:p.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(We.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});d$.displayName=fae;var dae="SelectPopperPosition",z1=P.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=gn,...a}=e,s=Fp(r);return p.jsx(rie,{...s,...a,ref:t,align:n,collisionPadding:i,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)"}})});z1.displayName=dae;var[hae,O_]=Hs(Ga,{}),F1="SelectViewport",h$=P.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,a=ra(F1,r),s=O_(F1,r),u=Je(t,a.onViewportChange),f=P.useRef(0);return p.jsxs(p.Fragment,{children:[p.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:n}),p.jsx(Bp.Slot,{scope:r,children:p.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Fe(i.onScroll,c=>{const d=c.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=s;if(m?.current&&h){const g=Math.abs(f.current-d.scrollTop);if(g>0){const b=window.innerHeight-gn*2,y=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),S=Math.max(y,w);if(S0?C:0,h.style.justifyContent="flex-end")}}}f.current=d.scrollTop})})})]})});h$.displayName=F1;var p$="SelectGroup",[pae,mae]=Hs(p$),vae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Gi();return p.jsx(pae,{scope:r,id:i,children:p.jsx(We.div,{role:"group","aria-labelledby":i,...n,ref:t})})});vae.displayName=p$;var m$="SelectLabel",gae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=mae(m$,r);return p.jsx(We.div,{id:i.id,...n,ref:t})});gae.displayName=m$;var qh="SelectItem",[yae,v$]=Hs(qh),g$=P.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...s}=e,u=ta(qh,r),f=ra(qh,r),c=u.value===n,[d,h]=P.useState(a??""),[m,g]=P.useState(!1),b=Je(t,O=>f.itemRefCallback?.(O,n,i)),y=Gi(),w=P.useRef("touch"),S=()=>{i||(u.onValueChange(n),u.onOpenChange(!1))};if(n==="")throw new Error("A 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 p.jsx(yae,{scope:r,value:n,disabled:i,textId:y,isSelected:c,onItemTextChange:P.useCallback(O=>{h(E=>E||(O?.textContent??"").trim())},[]),children:p.jsx(Bp.ItemSlot,{scope:r,value:n,disabled:i,textValue:d,children:p.jsx(We.div,{role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:b,onFocus:Fe(s.onFocus,()=>g(!0)),onBlur:Fe(s.onBlur,()=>g(!1)),onClick:Fe(s.onClick,()=>{w.current!=="mouse"&&S()}),onPointerUp:Fe(s.onPointerUp,()=>{w.current==="mouse"&&S()}),onPointerDown:Fe(s.onPointerDown,O=>{w.current=O.pointerType}),onPointerMove:Fe(s.onPointerMove,O=>{w.current=O.pointerType,i?f.onItemLeave?.():w.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Fe(s.onPointerLeave,O=>{O.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:Fe(s.onKeyDown,O=>{f.searchRef?.current!==""&&O.key===" "||(rae.includes(O.key)&&S(),O.key===" "&&O.preventDefault())})})})})});g$.displayName=qh;var Zl="SelectItemText",y$=P.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...a}=e,s=ta(Zl,r),u=ra(Zl,r),f=v$(Zl,r),c=oae(Zl,r),[d,h]=P.useState(null),m=Je(t,S=>h(S),f.onItemTextChange,S=>u.itemTextRefCallback?.(S,f.value,f.disabled)),g=d?.textContent,b=P.useMemo(()=>p.jsx("option",{value:f.value,disabled:f.disabled,children:g},f.value),[f.disabled,f.value,g]),{onNativeOptionAdd:y,onNativeOptionRemove:w}=c;return Rt(()=>(y(b),()=>w(b)),[y,w,b]),p.jsxs(p.Fragment,{children:[p.jsx(We.span,{id:f.textId,...a,ref:m}),f.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Kc.createPortal(a.children,s.valueNode):null]})});y$.displayName=Zl;var x$="SelectItemIndicator",b$=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return v$(x$,r).isSelected?p.jsx(We.span,{"aria-hidden":!0,...n,ref:t}):null});b$.displayName=x$;var q1="SelectScrollUpButton",w$=P.forwardRef((e,t)=>{const r=ra(q1,e.__scopeSelect),n=O_(q1,e.__scopeSelect),[i,a]=P.useState(!1),s=Je(t,n.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let u=function(){const c=f.scrollTop>0;a(c)};const f=r.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?p.jsx(S$,{...e,ref:s,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=r;u&&f&&(u.scrollTop=u.scrollTop-f.offsetHeight)}}):null});w$.displayName=q1;var U1="SelectScrollDownButton",_$=P.forwardRef((e,t)=>{const r=ra(U1,e.__scopeSelect),n=O_(U1,e.__scopeSelect),[i,a]=P.useState(!1),s=Je(t,n.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let u=function(){const c=f.scrollHeight-f.clientHeight,d=Math.ceil(f.scrollTop)f.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?p.jsx(S$,{...e,ref:s,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=r;u&&f&&(u.scrollTop=u.scrollTop+f.offsetHeight)}}):null});_$.displayName=U1;var S$=P.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,a=ra("SelectScrollButton",r),s=P.useRef(null),u=zp(r),f=P.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return P.useEffect(()=>()=>f(),[f]),Rt(()=>{u().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),p.jsx(We.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Fe(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:Fe(i.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:Fe(i.onPointerLeave,()=>{f()})})}),xae="SelectSeparator",bae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return p.jsx(We.div,{"aria-hidden":!0,...n,ref:t})});bae.displayName=xae;var W1="SelectArrow",wae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Fp(r),a=ta(W1,r),s=ra(W1,r);return a.open&&s.position==="popper"?p.jsx(nie,{...i,...n,ref:t}):null});wae.displayName=W1;var _ae="SelectBubbleInput",O$=P.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=P.useRef(null),a=Je(n,i),s=__(t);return P.useEffect(()=>{const u=i.current;if(!u)return;const f=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(f,"value").set;if(s!==t&&d){const h=new Event("change",{bubbles:!0});d.call(u,t),u.dispatchEvent(h)}},[s,t]),p.jsx(We.select,{...r,style:{...VL,...r.style},ref:a,defaultValue:t})});O$.displayName=_ae;function j$(e){return e===""||e===void 0}function E$(e){const t=ar(e),r=P.useRef(""),n=P.useRef(0),i=P.useCallback(s=>{const u=r.current+s;t(u),(function f(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>f(""),1e3))})(u)},[t]),a=P.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return P.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function A$(e,t,r){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=Sae(e,Math.max(a,0));i.length===1&&(s=s.filter(c=>c!==r));const f=s.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==r?f:void 0}function Sae(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Oae=r$,jae=i$,Eae=o$,Aae=s$,Pae=l$,Nae=c$,Cae=h$,Tae=g$,kae=y$,Rae=b$,Mae=w$,Iae=_$;function tt({...e}){return p.jsx(Oae,{"data-slot":"select",...e})}function rt({...e}){return p.jsx(Eae,{"data-slot":"select-value",...e})}function nt({className:e,size:t="default",children:r,...n}){return p.jsxs(jae,{"data-slot":"select-trigger","data-size":t,className:Ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,p.jsx(Aae,{asChild:!0,children:p.jsx(cc,{className:"size-4 opacity-50"})})]})}function st({className:e,children:t,position:r="popper",...n}){return p.jsx(Pae,{children:p.jsxs(Nae,{"data-slot":"select-content",className:Ie("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"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:r,...n,children:[p.jsx(Dae,{}),p.jsx(Cae,{className:Ie("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsx(Lae,{})]})})}function Ae({className:e,children:t,...r}){return p.jsxs(Tae,{"data-slot":"select-item",className:Ie("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[p.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(Rae,{children:p.jsx(dR,{className:"size-4"})})}),p.jsx(kae,{children:t})]})}function Dae({className:e,...t}){return p.jsx(Mae,{"data-slot":"select-scroll-up-button",className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(jB,{className:"size-4"})})}function Lae({className:e,...t}){return p.jsx(Iae,{"data-slot":"select-scroll-down-button",className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(cc,{className:"size-4"})})}function $ae(){const e=[{id:1,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Defrost",lastEdited:"2025.12.03.11:45",hasError:!1},{id:2,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Opened/Preped",lastEdited:"2025.12.03.11:45",hasError:!1},{id:3,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Heated",lastEdited:"2025.12.03.11:45",hasError:!1},{id:4,location:"Location A",labelCategory:"Grab'n'Go",productCategory:"Sandwich",product:"Chicken Sandwich",template:`2"x6" G'n'G`,labelType:"",lastEdited:"2025.12.03.11:45",hasError:!0}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 text-gray-900 placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0 text-gray-900",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs("div",{className:"flex rounded-md border border-gray-300 bg-white h-10 overflow-hidden shrink-0",children:[p.jsx("button",{type:"button",className:"px-4 h-full border-r border-gray-200 text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Import"}),p.jsx("button",{type:"button",className:"px-4 h-full border-r border-gray-200 text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Export"}),p.jsx("button",{type:"button",className:"px-4 h-full text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Edit"})]}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"text-red-600 font-bold italic text-lg",children:"One or more of your labels are missing fields from their templates (! ! ! 1 in total)."}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[120px]",children:"Location"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[140px]",children:"Label Category"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[140px]",children:"Product Category"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Product"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Template"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Label Type"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(fe,{className:"font-medium",children:t.location}),p.jsx(fe,{children:t.labelCategory}),p.jsx(fe,{children:t.productCategory}),p.jsx(fe,{children:t.product}),p.jsxs(fe,{className:"font-medium",children:[t.template,t.hasError&&p.jsx("span",{className:"text-red-600 font-bold ml-2",children:"! ! !"})]}),p.jsx(fe,{children:t.labelType||"-"}),p.jsx(fe,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function Bae(){const e=[{id:1,category:"Prep",count:54,photo:"XXX",lastEdited:"2025.12.03.11:45"},{id:2,category:"Green",count:33,photo:"XXX",lastEdited:"2025.12.03.11:45"},{id:3,category:"Red",count:44,photo:"XXX",lastEdited:"2025.12.03.11:45"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Search"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[150px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Location"}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label Category ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[250px]",children:"Label Category"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"No. of Labels"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"Category Photo"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(fe,{className:"font-medium",children:t.category}),p.jsx(fe,{className:"font-numeric",children:t.count}),p.jsx(fe,{className:"text-gray-500",children:t.photo}),p.jsx(fe,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function zae(){const e=[{id:1,type:"Defrost",count:54,lastEdited:"2025.12.03.11:45"},{id:2,type:"Thawed",count:33,lastEdited:"2025.12.03.11:45"},{id:3,type:"Opened",count:44,lastEdited:"2025.12.03.11:45"},{id:4,type:"Preped",count:17,lastEdited:"2025.12.03.11:45"},{id:5,type:"Heated",count:67,lastEdited:"2025.12.03.11:45"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Search"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[150px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"all"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Location"}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label Type ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[250px]",children:"Label Types"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"No. of Labels"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(fe,{className:"font-medium",children:t.type}),p.jsx(fe,{className:"font-numeric",children:t.count}),p.jsx(fe,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}const Fae="label-template-",qae="label-template-ids";function P$(e){return`${Fae}${e}`}function N$(){return qae}function Uae(){return`template-${Date.now()}`}function Wae(){return`el-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Hae(e){return{id:e??Uae(),name:"未命名模板",labelType:"PRICE",unit:"cm",width:6,height:4,appliedLocation:"ALL",showRuler:!0,showGrid:!0,elements:[]}}const ob=[{name:'2"×1"',width:2,height:1,unit:"inch"},{name:'2"×2"',width:2,height:2,unit:"inch"},{name:'3"×1"',width:3,height:1,unit:"inch"},{name:'3"×2"',width:3,height:2,unit:"inch"},{name:'4"×2"',width:4,height:2,unit:"inch"},{name:'4"×6"',width:4,height:6,unit:"inch"},{name:"6cm×4cm",width:6,height:4,unit:"cm"},{name:"10cm×6cm",width:10,height:6,unit:"cm"},{name:"A4",width:21,height:29.7,unit:"cm"},{name:"A5",width:14.8,height:21,unit:"cm"}];function Vae(e,t=20,r=20){const n=Wae(),a={TEXT_STATIC:{width:120,height:24,config:{text:"文本",fontFamily:"Arial",fontSize:14,fontWeight:"normal",textAlign:"left"}},TEXT_PRODUCT:{width:120,height:24,config:{text:"商品名",fontFamily:"Arial",fontSize:14,fontWeight:"normal",textAlign:"left"}},TEXT_PRICE:{width:80,height:24,config:{text:"0.00",prefix:"¥",decimal:2,fontFamily:"Arial",fontSize:14,fontWeight:"bold",textAlign:"right"}},BARCODE:{width:160,height:48,config:{barcodeType:"CODE128",data:"123456789",showText:!0,orientation:"horizontal"}},QRCODE:{width:80,height:80,config:{data:"https://example.com",errorLevel:"M"}},IMAGE:{width:60,height:60,config:{src:"",scaleMode:"contain"}},DATE:{width:120,height:24,config:{format:"YYYY-MM-DD",offsetDays:0}},TIME:{width:100,height:24,config:{format:"HH:mm",offsetDays:0}},DURATION:{width:120,height:24,config:{format:"YYYY-MM-DD",offsetDays:3}},WEIGHT:{width:80,height:24,config:{unit:"g",value:500}},WEIGHT_PRICE:{width:100,height:24,config:{unitPrice:10,weight:.5,currency:"¥"}},BLANK:{width:40,height:24,config:{}},NUTRITION:{width:200,height:120,config:{calories:120,fat:"5g",protein:"3g",carbs:"10g",layout:"standard"}}}[e];return{id:n,type:e,x:t,y:r,width:a.width,height:a.height,rotation:"horizontal",border:"none",config:{...a.config}}}function C$(){try{const e=localStorage.getItem(N$());if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function T$(e){try{const t=localStorage.getItem(P$(e));return t?JSON.parse(t):null}catch{return null}}function ak(){const e=C$(),t=[];for(const r of e){const n=T$(r);n&&t.push(n)}return t.sort((r,n)=>n.id>r.id?1:-1)}function Gae(e){localStorage.setItem(N$(),JSON.stringify(e))}function Kae(e){const t=P$(e.id);localStorage.setItem(t,JSON.stringify(e));const r=C$();r.includes(e.id)||(r.push(e.id),Gae(r))}function Xae(e){const t=Yae(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(Zae);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function Yae(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=eoe(i),u=Jae(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qae=Symbol("radix.slottable");function Zae(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qae}function Jae(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function eoe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qp="Dialog",[k$]=gi(qp),[toe,An]=k$(qp),R$=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,u=P.useRef(null),f=P.useRef(null),[c,d]=Ha({prop:n,defaultProp:i??!1,onChange:a,caller:qp});return p.jsx(toe,{scope:t,triggerRef:u,contentRef:f,contentId:Gi(),titleId:Gi(),descriptionId:Gi(),open:c,onOpenChange:d,onOpenToggle:P.useCallback(()=>d(h=>!h),[d]),modal:s,children:r})};R$.displayName=qp;var M$="DialogTrigger",roe=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(M$,r),a=Je(t,i.triggerRef);return p.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":A_(i.open),...n,ref:a,onClick:Fe(e.onClick,i.onOpenToggle)})});roe.displayName=M$;var j_="DialogPortal",[noe,I$]=k$(j_,{forceMount:void 0}),D$=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=An(j_,t);return p.jsx(noe,{scope:t,forceMount:r,children:P.Children.map(n,s=>p.jsx(Un,{present:r||a.open,children:p.jsx(w_,{asChild:!0,container:i,children:s})}))})};D$.displayName=j_;var Uh="DialogOverlay",L$=P.forwardRef((e,t)=>{const r=I$(Uh,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=An(Uh,e.__scopeDialog);return a.modal?p.jsx(Un,{present:n||a.open,children:p.jsx(aoe,{...i,ref:t})}):null});L$.displayName=Uh;var ioe=Xae("DialogOverlay.RemoveScroll"),aoe=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(Uh,r);return p.jsx(S_,{as:ioe,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(We.div,{"data-state":A_(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ka="DialogContent",$$=P.forwardRef((e,t)=>{const r=I$(Ka,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=An(Ka,e.__scopeDialog);return p.jsx(Un,{present:n||a.open,children:a.modal?p.jsx(ooe,{...i,ref:t}):p.jsx(soe,{...i,ref:t})})});$$.displayName=Ka;var ooe=P.forwardRef((e,t)=>{const r=An(Ka,e.__scopeDialog),n=P.useRef(null),i=Je(t,r.contentRef,n);return P.useEffect(()=>{const a=n.current;if(a)return KL(a)},[]),p.jsx(B$,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Fe(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Fe(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&a.preventDefault()}),onFocusOutside:Fe(e.onFocusOutside,a=>a.preventDefault())})}),soe=P.forwardRef((e,t)=>{const r=An(Ka,e.__scopeDialog),n=P.useRef(!1),i=P.useRef(!1);return p.jsx(B$,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;r.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),B$=P.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,u=An(Ka,r),f=P.useRef(null),c=Je(t,f);return _L(),p.jsxs(p.Fragment,{children:[p.jsx(f_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:p.jsx(u_,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":A_(u.open),...s,ref:c,onDismiss:()=>u.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(loe,{titleId:u.titleId}),p.jsx(uoe,{contentRef:f,descriptionId:u.descriptionId})]})]})}),E_="DialogTitle",z$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(E_,r);return p.jsx(We.h2,{id:i.titleId,...n,ref:t})});z$.displayName=E_;var F$="DialogDescription",q$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(F$,r);return p.jsx(We.p,{id:i.descriptionId,...n,ref:t})});q$.displayName=F$;var U$="DialogClose",W$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(U$,r);return p.jsx(We.button,{type:"button",...n,ref:t,onClick:Fe(e.onClick,()=>i.onOpenChange(!1))})});W$.displayName=U$;function A_(e){return e?"open":"closed"}var H$="DialogTitleWarning",[Fle,V$]=k6(H$,{contentName:Ka,titleName:E_,docsSlug:"dialog"}),loe=({titleId:e})=>{const t=V$(H$),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. @@ -460,4 +460,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do * Copyright (c) Paul O'Shannessy * SPDX-License-Identifier: ISC */var cse={L:Xo.QrCode.Ecc.LOW,M:Xo.QrCode.Ecc.MEDIUM,Q:Xo.QrCode.Ecc.QUARTILE,H:Xo.QrCode.Ecc.HIGH},n3=128,i3="L",a3="#FFFFFF",o3="#000000",s3=!1,l3=1,use=4,fse=0,dse=.1;function c3(e,t=0){const r=[];return e.forEach(function(n,i){let a=null;n.forEach(function(s,u){if(!s&&a!==null){r.push(`M${a+t} ${i+t}h${u-a}v1H${a+t}z`),a=null;return}if(u===n.length-1){if(!s)return;a===null?r.push(`M${u+t},${i+t} h1v1H${u+t}z`):r.push(`M${a+t},${i+t} h${u+1-a}v1H${a+t}z`);return}s&&a===null&&(a=u)})}),r.join("")}function u3(e,t){return e.slice().map((r,n)=>n=t.y+t.h?r:r.map((i,a)=>a=t.x+t.w?i:!1))}function hse(e,t,r,n){if(n==null)return null;const i=e.length+r*2,a=Math.floor(t*dse),s=i/t,u=(n.width||a)*s,f=(n.height||a)*s,c=n.x==null?e.length/2-u/2:n.x*s,d=n.y==null?e.length/2-f/2:n.y*s,h=n.opacity==null?1:n.opacity;let m=null;if(n.excavate){let b=Math.floor(c),y=Math.floor(d),w=Math.ceil(u+c-b),S=Math.ceil(f+d-y);m={x:b,y,w,h:S}}const g=n.crossOrigin;return{x:c,y:d,h:f,w:u,excavation:m,opacity:h,crossOrigin:g}}function pse(e,t){return t!=null?Math.max(Math.floor(t),0):e?use:fse}function f3({value:e,level:t,minVersion:r,includeMargin:n,marginSize:i,imageSettings:a,size:s,boostLevel:u}){let f=z.useMemo(()=>{const b=(Array.isArray(e)?e:[e]).reduce((y,w)=>(y.push(...Xo.QrSegment.makeSegments(w)),y),[]);return Xo.QrCode.encodeSegments(b,cse[t],r,void 0,void 0,u)},[e,t,r,u]);const{cells:c,margin:d,numCells:h,calculatedImageSettings:m}=z.useMemo(()=>{let g=f.getModules();const b=pse(n,i),y=g.length+b*2,w=hse(g,s,b,a);return{cells:g,margin:b,numCells:y,calculatedImageSettings:w}},[f,s,a,n,i]);return{qrcode:f,margin:d,cells:c,numCells:h,calculatedImageSettings:m}}var mse=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),vse=z.forwardRef(function(t,r){const n=t,{value:i,size:a=n3,level:s=i3,bgColor:u=a3,fgColor:f=o3,includeMargin:c=s3,minVersion:d=l3,boostLevel:h,marginSize:m,imageSettings:g}=n,y=V1(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:w}=y,S=V1(y,["style"]),O=g?.src,E=z.useRef(null),C=z.useRef(null),A=z.useCallback(H=>{E.current=H,typeof r=="function"?r(H):r&&(r.current=H)},[r]),[N,T]=z.useState(!1),{margin:R,cells:I,numCells:q,calculatedImageSettings:L}=f3({value:i,level:s,minVersion:d,boostLevel:h,includeMargin:c,marginSize:m,imageSettings:g,size:a});z.useEffect(()=>{if(E.current!=null){const H=E.current,V=H.getContext("2d");if(!V)return;let K=I;const X=C.current,B=L!=null&&X!==null&&X.complete&&X.naturalHeight!==0&&X.naturalWidth!==0;B&&L.excavation!=null&&(K=u3(I,L.excavation));const Z=window.devicePixelRatio||1;H.height=H.width=a*Z;const ee=a/q*Z;V.scale(ee,ee),V.fillStyle=u,V.fillRect(0,0,q,q),V.fillStyle=f,mse?V.fill(new Path2D(c3(K,R))):I.forEach(function(M,$){M.forEach(function(Q,ae){Q&&V.fillRect(ae+R,$+R,1,1)})}),L&&(V.globalAlpha=L.opacity),B&&V.drawImage(X,L.x+R,L.y+R,L.w,L.h)}}),z.useEffect(()=>{T(!1)},[O]);const D=H1({height:a,width:a},w);let U=null;return O!=null&&(U=z.createElement("img",{src:O,key:O,style:{display:"none"},onLoad:()=>{T(!0)},ref:C,crossOrigin:L?.crossOrigin})),z.createElement(z.Fragment,null,z.createElement("canvas",H1({style:D,height:a,width:a,ref:A,role:"img"},S)),U)});vse.displayName="QRCodeCanvas";var d3=z.forwardRef(function(t,r){const n=t,{value:i,size:a=n3,level:s=i3,bgColor:u=a3,fgColor:f=o3,includeMargin:c=s3,minVersion:d=l3,boostLevel:h,title:m,marginSize:g,imageSettings:b}=n,y=V1(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:w,cells:S,numCells:O,calculatedImageSettings:E}=f3({value:i,level:s,minVersion:d,boostLevel:h,includeMargin:c,marginSize:g,imageSettings:b,size:a});let C=S,A=null;b!=null&&E!=null&&(E.excavation!=null&&(C=u3(S,E.excavation)),A=z.createElement("image",{href:b.src,height:E.h,width:E.w,x:E.x+w,y:E.y+w,preserveAspectRatio:"none",opacity:E.opacity,crossOrigin:E.crossOrigin}));const N=c3(C,w);return z.createElement("svg",H1({height:a,width:a,viewBox:`0 0 ${O} ${O}`,ref:r,role:"img"},y),!!m&&z.createElement("title",null,m),z.createElement("path",{fill:u,d:`M0,0 h${O}v${O}H0z`,shapeRendering:"crispEdges"}),z.createElement("path",{fill:f,d:N,shapeRendering:"crispEdges"}),A)});d3.displayName="QRCodeSVG";function gse({data:e,width:t,height:r,showText:n,orientation:i="horizontal"}){const a=P.useRef(null),s=i==="vertical",u=Math.max(20,(s?t:r)-(n?14:4));P.useEffect(()=>{if(a.current&&e)try{sse(a.current,e,{format:"CODE128",width:1,height:u,displayValue:n!==!1,margin:2,fontOptions:"",fontSize:10})}catch{}},[e,u,n]);const f=p.jsx("svg",{ref:a,className:"w-full h-full min-h-0",style:{maxHeight:s?t:r}});return s?p.jsx("div",{className:"w-full h-full flex items-center justify-center",children:p.jsx("div",{style:{transform:"rotate(-90deg)",transformOrigin:"center center",width:r,height:t,display:"flex",alignItems:"center",justifyContent:"center"},children:f})}):f}const lc=8;function qo(e){return Math.round(e/lc)*lc}function Hh(e,t){return t==="cm"?e*37.8:e*96}function sR(e,t){return t==="cm"?e/37.8:e/96}function h3({el:e}){const t=e.config,r=e.type,n={fontSize:t?.fontSize??14,fontFamily:t?.fontFamily??"Arial",fontWeight:t?.fontWeight??"normal",textAlign:t?.textAlign??"left",color:t?.color??"#000"},i=t?.inputType;if(r==="TEXT_STATIC"){const a=t?.text??"文本";return i==="number"?p.jsx("input",{type:"number",readOnly:!0,value:t?.text??"0",className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 pointer-events-none",style:{...n,textAlign:"right"}}):i==="options"?p.jsxs("div",{className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 flex items-center pointer-events-none text-gray-500",style:n,children:[p.jsx("span",{className:"truncate flex-1",children:a||"请选择..."}),p.jsx("span",{className:"ml-auto text-gray-400",children:"▼"})]}):i==="text"?p.jsx("input",{type:"text",readOnly:!0,value:a,className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 pointer-events-none",style:n}):p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-pre-wrap break-all leading-tight",style:n,children:a})}if(r==="TEXT_PRODUCT"){const a=t?.text??"商品名";return p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-pre-wrap break-all leading-tight",style:n,children:a})}if(r==="TEXT_PRICE"){const a=t?.prefix??"¥",s=t?.text??"0.00";return p.jsxs("div",{className:"w-full h-full px-1 overflow-hidden flex items-center",style:{...n,justifyContent:n.textAlign==="center"?"center":n.textAlign==="right"?"flex-end":"flex-start"},children:[p.jsx("span",{children:a}),p.jsx("span",{children:s})]})}if(r==="BARCODE"){const a=t?.data??"123456789",s=t?.showText!==!1,u=t?.orientation==="vertical"?"vertical":"horizontal";return p.jsx("div",{className:"flex flex-col items-center justify-center w-full h-full overflow-hidden p-0.5",children:p.jsx("div",{className:"flex-1 w-full min-h-0 flex items-center justify-center",children:p.jsx(gse,{data:a,width:e.width,height:e.height,showText:s,orientation:u})})})}if(r==="QRCODE"){const a=t?.data??"https://example.com",s=Math.min(e.width,e.height)-4;return p.jsx("div",{className:"w-full h-full flex items-center justify-center p-0.5",children:p.jsx(d3,{value:a,size:Math.max(20,s),level:"M",includeMargin:!1})})}if(r==="IMAGE"){const a=t?.src;return a?p.jsx("img",{src:a,alt:"",className:"w-full h-full object-contain"}):p.jsx("div",{className:"w-full h-full flex flex-col items-center justify-center bg-gray-100 text-gray-500 text-[10px] border border-dashed border-gray-300",children:p.jsx("span",{className:"font-medium",children:"Logo"})})}if(r==="DATE"){const s=(t?.format??"YYYY-MM-DD").replace("YYYY","2025").replace("MM","02").replace("DD","01");return t?.inputType==="datetime"||t?.inputType==="date"?p.jsx("input",{type:"date",readOnly:!0,value:"2025-02-01",className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 pointer-events-none text-[10px]",style:n}):p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:s})}if(r==="TIME"){const s=(t?.format??"HH:mm").replace("HH","12").replace("mm","30");return p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:s})}if(r==="DURATION")return p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:"保质期 2025-02-04"});if(r==="WEIGHT"){const a=t?.value??500,s=t?.unit??"g";return p.jsxs("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:[a,s]})}if(r==="WEIGHT_PRICE"){const a=t?.unitPrice??10,s=t?.weight??.5,u=t?.currency??"¥";return p.jsxs("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:[u,(a*s).toFixed(2)]})}if(r==="NUTRITION"){const a=t?.calories??120;return p.jsxs("div",{className:"text-[8px] p-0.5 w-full h-full overflow-hidden flex flex-col",children:[p.jsx("div",{className:"font-semibold border-b border-black",children:"Nutrition Facts"}),p.jsxs("div",{children:["Calories ",a]})]})}return r==="BLANK"?p.jsx("div",{className:"w-full h-full border border-dashed border-gray-200"}):p.jsx("div",{className:"text-gray-500 text-[10px] px-1 truncate w-full flex items-center justify-center",children:e.type.replace(/_/g," ")})}function yse({template:e,selectedId:t,onSelect:r,onUpdateElement:n,onDeleteElement:i,onTemplateChange:a,scale:s=1,onZoomIn:u,onZoomOut:f,onPreview:c}){const d=P.useRef(null),h=P.useRef(null),m=P.useRef(null),g=P.useRef(null),b=P.useRef(null),y=P.useRef(null),w=P.useRef(null),[S,O]=z.useState(!1),[E,C]=z.useState(!1),A=P.useRef(null),[N,T]=z.useState({x:0,y:0}),R=P.useRef(null),I=Hh(e.width,e.unit),q=Hh(e.height,e.unit),L=e.showGrid!==!1,D=P.useCallback((M,$)=>{if(S||M.button===1)return;M.stopPropagation(),r($),h.current?.focus();const Q=e.elements.find(pe=>pe.id===$);if(!Q)return;const ae=document.getElementById(`element-${$}`);ae&&(ae.classList.add("z-50","opacity-90","shadow-xl","ring-2","ring-blue-400","ring-offset-2"),ae.style.cursor="grabbing"),m.current={id:$,startX:M.clientX,startY:M.clientY,elX:Q.x,elY:Q.y},y.current={id:$,x:Q.x,y:Q.y},M.currentTarget.setPointerCapture?.(M.pointerId)},[e.elements,r,S]),U=P.useCallback(M=>{w.current!==null&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame(()=>{M(),w.current=null})},[]),H=P.useCallback(M=>{if(E&&R.current){const $=M.clientX-R.current.startX,Q=M.clientY-R.current.startY;T({x:R.current.x+$,y:R.current.y+Q});return}if(E&&A.current&&d.current){const $=M.clientX-A.current.x,Q=M.clientY-A.current.y;d.current.scrollLeft=A.current.scrollLeft-$,d.current.scrollTop=A.current.scrollTop-Q;return}if(m.current){const{id:$,startX:Q,startY:ae,elX:pe,elY:ye}=m.current,oe=M.clientX,me=M.clientY;U(()=>{const ie=(oe-Q)/s,ue=(me-ae)/s,ve=Math.max(0,pe+ie),re=Math.max(0,ye+ue),De=qo(ve),Te=qo(re),Ke=document.getElementById(`element-${$}`);Ke&&(Ke.style.left=`${De}px`,Ke.style.top=`${Te}px`),y.current={id:$,x:De,y:Te}})}if(g.current){const{id:$,corner:Q,startX:ae,startY:pe,w:ye,h:oe,elX:me,elY:ie}=g.current,ue=M.clientX,ve=M.clientY;U(()=>{const re=(ue-ae)/s,De=(ve-pe)/s;let Te=ye,Ke=oe,lt=me,vt=ie;Q.includes("e")&&(Te=Math.max(20,ye+re)),Q.includes("w")&&(Te=Math.max(20,ye-re),lt=me+re),Q.includes("s")&&(Ke=Math.max(12,oe+De)),Q.includes("n")&&(Ke=Math.max(12,oe-De),vt=ie+De);const dr=qo(Te),Or=qo(Ke),jr=qo(lt),Kt=qo(vt),Xt=document.getElementById(`element-${$}`);Xt&&(Xt.style.width=`${dr}px`,Xt.style.height=`${Or}px`,Xt.style.left=`${jr}px`,Xt.style.top=`${Kt}px`),y.current={id:$,width:dr,height:Or,x:jr,y:Kt}})}if(b.current&&a){const{edge:$,startX:Q,startY:ae,startW:pe,startH:ye}=b.current,oe=M.clientX,me=M.clientY;U(()=>{const ie=(oe-Q)/s,ue=(me-ae)/s,ve=sR(ie,e.unit),re=sR(ue,e.unit);if($==="bottom"){const De=Math.max(1,ye+re);a({height:De})}else{const De=Math.max(1,pe+ve);a({width:De})}})}},[E,a,s,e.unit,U]),V=P.useCallback(()=>{E&&(C(!1),A.current=null,R.current=null),w.current!==null&&(cancelAnimationFrame(w.current),w.current=null);const M=m.current?.id||g.current?.id;if(M){const $=document.getElementById(`element-${M}`);$&&($.classList.remove("z-50","opacity-90","shadow-xl","ring-2","ring-blue-400","ring-offset-2"),$.style.cursor="")}if(y.current){const{id:$,...Q}=y.current;n($,Q),y.current=null}m.current=null,g.current=null,b.current=null},[n]);P.useEffect(()=>{const M=Q=>{Q.code==="Space"&&!Q.repeat&&O(!0)},$=Q=>{Q.code==="Space"&&(O(!1),C(!1),A.current=null,R.current=null)};return window.addEventListener("keydown",M),window.addEventListener("keyup",$),()=>{window.removeEventListener("keydown",M),window.removeEventListener("keyup",$)}},[]),P.useEffect(()=>{const M=d.current;if(!M)return;const $=()=>{M.scrollLeft=Math.max(0,(M.scrollWidth-M.clientWidth)/2),M.scrollTop=Math.max(0,(M.scrollHeight-M.clientHeight)/2)},Q=requestAnimationFrame($),ae=setTimeout($,100);return()=>{cancelAnimationFrame(Q),clearTimeout(ae)}},[s,I,q]);const K=P.useCallback(M=>{if(!t)return;if(M.key==="Delete"||M.key==="Backspace"){M.preventDefault();const ye=e.elements.findIndex(oe=>oe.id===t);if(ye>=0){const oe=e.elements.filter(me=>me.id!==t);i(t),r(oe[ye]?.id??oe[ye-1]?.id??null)}return}const $=e.elements.find(ye=>ye.id===t);if(!$)return;const Q=M.shiftKey?1:lc;let ae=0,pe=0;switch(M.key){case"ArrowLeft":ae=-Q;break;case"ArrowRight":ae=Q;break;case"ArrowUp":pe=-Q;break;case"ArrowDown":pe=-Q;break;default:return}M.key==="ArrowDown"&&(pe=Q),M.preventDefault(),n($.id,{x:Math.max(0,$.x+ae),y:Math.max(0,$.y+pe)})},[t,e.elements,n,i,r]),X=()=>r(null),B=M=>{(S||M.button===1)&&(M.preventDefault(),C(!0),A.current={x:M.clientX,y:M.clientY,scrollLeft:d.current?.scrollLeft||0,scrollTop:d.current?.scrollTop||0},M.currentTarget.setPointerCapture(M.pointerId))},Z=M=>{if(E&&A.current&&d.current){const $=M.clientX-A.current.x,Q=M.clientY-A.current.y;d.current.scrollLeft=A.current.scrollLeft-$,d.current.scrollTop=A.current.scrollTop-Q}},ee=M=>{E&&(C(!1),A.current=null)};return p.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-gray-100",children:[p.jsxs("div",{className:"shrink-0 px-4 py-2 border-b border-gray-200 bg-white flex items-center justify-between gap-2 flex-wrap z-10",children:[p.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Label Preview"}),p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c&&p.jsx("button",{type:"button",onClick:c,className:"h-8 px-3 rounded border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 text-xs font-medium shadow-sm transition-all active:scale-95",children:"预览"}),a&&p.jsxs(p.Fragment,{children:[p.jsxs(tt,{value:(()=>{const M=ob.findIndex($=>$.width===e.width&&$.height===e.height&&$.unit===e.unit);return M>=0?String(M):"custom"})(),onValueChange:M=>{if(M==="custom")return;const $=ob[Number(M)];$&&a({width:$.width,height:$.height,unit:$.unit})},children:[p.jsx(nt,{className:"h-8 w-[130px] text-xs",children:p.jsx(rt,{placeholder:"画布大小"})}),p.jsxs(st,{children:[ob.map((M,$)=>p.jsx(Ae,{value:String($),className:"text-xs",children:M.name},$)),p.jsx(Ae,{value:"custom",className:"text-xs text-gray-500",children:"自定义"})]})]}),p.jsx("button",{type:"button",onClick:()=>a({showGrid:!L}),className:Ie("h-8 px-3 rounded border text-xs font-medium shadow-sm transition-colors",L?"border-gray-300 bg-white text-gray-700 hover:bg-gray-50":"border-gray-300 bg-gray-100 text-gray-500"),children:L?"隐藏网格":"显示网格"})]}),p.jsxs("div",{className:"flex items-center gap-1 bg-white rounded border border-gray-300 p-0.5 shadow-sm h-8",children:[p.jsx("button",{type:"button",onClick:f,disabled:!f,className:"h-6 w-6 rounded hover:bg-gray-100 text-gray-600 disabled:opacity-50 disabled:pointer-events-none flex items-center justify-center text-sm font-medium active:scale-90 transition-transform",title:"缩小",children:"−"}),p.jsxs("span",{className:"min-w-[3rem] text-center text-xs text-gray-600 font-medium",children:[Math.round(s*100),"%"]}),p.jsx("button",{type:"button",onClick:u,disabled:!u,className:"h-6 w-6 rounded hover:bg-gray-100 text-gray-600 disabled:opacity-50 disabled:pointer-events-none flex items-center justify-center text-sm font-medium active:scale-90 transition-transform",title:"放大",children:"+"})]})]})]}),p.jsx("div",{ref:d,className:Ie("flex-1 overflow-auto bg-gray-100 relative",S?"cursor-grab active:cursor-grabbing":""),onClick:X,onPointerDown:B,onPointerMove:Z,onPointerUp:ee,onPointerLeave:ee,children:p.jsx("div",{style:{minWidth:"100%",minHeight:"100%",width:"fit-content",height:"fit-content",display:"flex",padding:50,boxSizing:"border-box",transform:`translate(${N.x}px, ${N.y}px)`},children:p.jsxs("div",{ref:h,tabIndex:0,className:Ie("relative bg-white shadow-lg border border-dashed border-gray-300 origin-top-left outline-none m-auto",E?"cursor-grabbing":"cursor-grab"),style:{width:I,height:q,transform:`scale(${s})`,backgroundImage:L?`linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px), - linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px)`:void 0,backgroundSize:L?`${lc}px ${lc}px`:void 0,pointerEvents:S?"none":"auto"},onPointerDown:M=>{const $=M.target,Q=$.closest('[id^="element-"]'),ae=$.closest('[title*="拖拽拉高"]')||$.closest('[title*="拖拽拉宽"]');h.current?.contains($)&&!Q&&!ae&&!m.current&&!g.current&&(M.preventDefault(),M.stopPropagation(),C(!0),R.current={x:N.x,y:N.y,startX:M.clientX,startY:M.clientY},A.current={x:M.clientX,y:M.clientY,scrollLeft:d.current?.scrollLeft??0,scrollTop:d.current?.scrollTop??0},M.currentTarget.setPointerCapture?.(M.pointerId))},onPointerMove:H,onPointerUp:V,onKeyDown:K,children:[e.showRuler&&p.jsxs("div",{className:"absolute top-0 left-0 right-0 h-5 border-b border-gray-300 bg-gray-50 text-[10px] text-gray-500 flex items-center px-1 pointer-events-none select-none",children:[e.unit," ",e.width," × ",e.height]}),a&&p.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-3 cursor-ns-resize flex items-center justify-center bg-gray-200/80 hover:bg-blue-400/30 border-t border-gray-300 text-[10px] text-gray-500 transition-colors",title:"拖拽拉高纸张",onPointerDown:M=>{M.stopPropagation(),b.current={edge:"bottom",startX:M.clientX,startY:M.clientY,startW:e.width,startH:e.height},M.target.setPointerCapture?.(M.pointerId)},children:"⋮"}),a&&p.jsx("div",{className:"absolute top-0 right-0 bottom-0 w-3 cursor-ew-resize flex items-center justify-center bg-gray-200/80 hover:bg-blue-400/30 border-l border-gray-300 text-[10px] text-gray-500 transition-colors",title:"拖拽拉宽纸张",onPointerDown:M=>{M.stopPropagation(),b.current={edge:"right",startX:M.clientX,startY:M.clientY,startW:e.width,startH:e.height},M.target.setPointerCapture?.(M.pointerId)},children:"⋮"}),e.elements.map(M=>p.jsxs("div",{id:`element-${M.id}`,className:Ie("absolute box-border cursor-move overflow-hidden transition-shadow",M.border==="line"&&"border border-gray-400",M.border==="dotted"&&"border border-dotted border-gray-400",t===M.id&&"ring-2 ring-blue-500 ring-offset-1 z-10"),style:{left:M.x,top:M.y,width:M.width,height:M.height},onClick:$=>{$.stopPropagation(),r(M.id)},onPointerDown:$=>D($,M.id),children:[p.jsx(h3,{el:M}),t===M.id&&p.jsxs(p.Fragment,{children:[["nw","ne","sw","se"].map($=>p.jsx("div",{className:"absolute w-4 h-4 bg-white border-2 border-blue-500 rounded-full z-20 shadow-md hover:scale-110 transition-transform",style:{cursor:"nwse-resize",top:$.startsWith("n")?-6:void 0,bottom:$.startsWith("s")?-6:void 0,left:$.endsWith("w")?-6:void 0,right:$.endsWith("e")?-6:void 0},onPointerDown:Q=>{Q.stopPropagation();const ae=e.elements.find(pe=>pe.id===M.id);g.current={id:M.id,corner:$,startX:Q.clientX,startY:Q.clientY,w:ae.width,h:ae.height,elX:ae.x,elY:ae.y},Q.currentTarget.setPointerCapture?.(Q.pointerId)}},$)),["n","s","w","e"].map($=>p.jsx("div",{className:"absolute bg-blue-500/50 border border-white/50 rounded-sm z-10 shadow-sm hover:bg-blue-600",style:{cursor:$==="n"||$==="s"?"ns-resize":"ew-resize",width:$==="n"||$==="s"?"20px":"6px",height:$==="n"||$==="s"?"6px":"20px",top:$==="n"?-3:$==="s"?void 0:"50%",bottom:$==="s"?-3:void 0,left:$==="w"?-3:$==="e"?void 0:"50%",right:$==="e"?-3:void 0,transform:$==="n"||$==="s"?"translateX(-50%)":"translateY(-50%)"},onPointerDown:Q=>{Q.stopPropagation();const ae=e.elements.find(ye=>ye.id===M.id),pe=document.getElementById(`element-${M.id}`);pe&&pe.classList.add("z-50","opacity-90"),g.current={id:M.id,corner:$,startX:Q.clientX,startY:Q.clientY,w:ae.width,h:ae.height,elX:ae.x,elY:ae.y},Q.currentTarget.setPointerCapture?.(Q.pointerId)}},$))]})]},M.id))]})})})]})}function xse({template:e,maxWidth:t=480}){const r=Hh(e.width,e.unit),n=Hh(e.height,e.unit),i=t?Math.min(t/r,t/n,2):1,a=r*i,s=n*i;return p.jsx("div",{className:"flex items-center justify-center p-4 bg-gray-100 rounded",children:p.jsx("div",{style:{width:a,height:s},className:"relative bg-white shadow-lg overflow-hidden",children:p.jsx("div",{className:"origin-top-left",style:{position:"absolute",left:0,top:0,width:r,height:n,transform:`scale(${i})`,transformOrigin:"0 0"},children:e.elements.map(u=>p.jsx("div",{className:"absolute box-border overflow-hidden pointer-events-none flex items-center justify-center text-xs",style:{left:u.x,top:u.y,width:u.width,height:u.height,border:u.border==="line"?"1px solid #999":u.border==="dotted"?"1px dotted #999":void 0},children:p.jsx(h3,{el:u})},u.id))})})})}var bse=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wse=bse.reduce((e,t)=>{const r=nw(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),_se="Label",p3=P.forwardRef((e,t)=>p.jsx(wse.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));p3.displayName=_se;var Sse=p3;function je({className:e,...t}){return p.jsx(Sse,{"data-slot":"label",className:Ie("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var Vp="Switch",[Ose]=gi(Vp),[jse,Ese]=Ose(Vp),m3=P.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:a,required:s,disabled:u,value:f="on",onCheckedChange:c,form:d,...h}=e,[m,g]=P.useState(null),b=Je(t,E=>g(E)),y=P.useRef(!1),w=m?d||!!m.closest("form"):!0,[S,O]=Ha({prop:i,defaultProp:a??!1,onChange:c,caller:Vp});return p.jsxs(jse,{scope:r,checked:S,disabled:u,children:[p.jsx(We.button,{type:"button",role:"switch","aria-checked":S,"aria-required":s,"data-state":x3(S),"data-disabled":u?"":void 0,disabled:u,value:f,...h,ref:b,onClick:Fe(e.onClick,E=>{O(C=>!C),w&&(y.current=E.isPropagationStopped(),y.current||E.stopPropagation())})}),w&&p.jsx(y3,{control:m,bubbles:!y.current,name:n,value:f,checked:S,required:s,disabled:u,form:d,style:{transform:"translateX(-100%)"}})]})});m3.displayName=Vp;var v3="SwitchThumb",g3=P.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,i=Ese(v3,r);return p.jsx(We.span,{"data-state":x3(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:t})});g3.displayName=v3;var Ase="SwitchBubbleInput",y3=P.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...i},a)=>{const s=P.useRef(null),u=Je(s,a),f=__(r),c=y_(t);return P.useEffect(()=>{const d=s.current;if(!d)return;const h=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(h,"checked").set;if(f!==r&&g){const b=new Event("click",{bubbles:n});g.call(d,r),d.dispatchEvent(b)}},[f,r,n]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:u,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});y3.displayName=Ase;function x3(e){return e?"checked":"unchecked"}var Pse=m3,Nse=g3;function no({className:e,...t}){return p.jsx(Pse,{"data-slot":"switch",className:Ie("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(Nse,{"data-slot":"switch-thumb",className:Ie("bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function Cse({template:e,selectedElement:t,onTemplateChange:r,onElementChange:n,onDeleteElement:i}){return t?p.jsxs("div",{className:"w-72 shrink-0 border-l border-gray-200 bg-white flex flex-col h-full",children:[p.jsx("div",{className:"px-3 py-2 border-b border-gray-200 font-semibold text-gray-800",children:"Properties (Element)"}),p.jsx(fc,{className:"flex-1",children:p.jsxs("div",{className:"p-3 space-y-3",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"X"}),p.jsx(Be,{type:"number",value:t.x,onChange:a=>n(t.id,{x:Number(a.target.value)||0}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Y"}),p.jsx(Be,{type:"number",value:t.y,onChange:a=>n(t.id,{y:Number(a.target.value)||0}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Width"}),p.jsx(Be,{type:"number",value:t.width,onChange:a=>n(t.id,{width:Math.max(1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Height"}),p.jsx(Be,{type:"number",value:t.height,onChange:a=>n(t.id,{height:Math.max(1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Rotation"}),p.jsxs(tt,{value:t.rotation,onValueChange:a=>n(t.id,{rotation:a}),children:[p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"horizontal",children:"horizontal"}),p.jsx(Ae,{value:"vertical",children:"vertical"})]})]})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Border"}),p.jsxs(tt,{value:t.border,onValueChange:a=>n(t.id,{border:a}),children:[p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"none",children:"none"}),p.jsx(Ae,{value:"line",children:"line"}),p.jsx(Ae,{value:"dotted",children:"dotted"})]})]})]}),p.jsx(Tse,{element:t,onChange:a=>n(t.id,{config:{...t.config,...a}})}),i&&p.jsx("div",{className:"pt-4 border-t border-gray-100",children:p.jsx(Ne,{variant:"destructive",className:"w-full",onClick:()=>i(t.id),children:"Delete Element"})})]})})]}):p.jsxs("div",{className:"w-72 shrink-0 border-l border-gray-200 bg-white flex flex-col h-full",children:[p.jsx("div",{className:"px-3 py-2 border-b border-gray-200 font-semibold text-gray-800",children:"Properties (Template)"}),p.jsx(fc,{className:"flex-1",children:p.jsxs("div",{className:"p-3 space-y-3",children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Template Name"}),p.jsx(Be,{value:e.name,onChange:a=>r({name:a.target.value}),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Label Type"}),p.jsxs(tt,{value:e.labelType,onValueChange:a=>r({labelType:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"PRICE",children:"PRICE"}),p.jsx(Ae,{value:"NUTRITION",children:"NUTRITION"}),p.jsx(Ae,{value:"SHIPPING",children:"SHIPPING"})]})]})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Applied Location"}),p.jsxs(tt,{value:e.appliedLocation,onValueChange:a=>r({appliedLocation:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"ALL",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Width"}),p.jsx(Be,{type:"number",value:e.width,onChange:a=>r({width:Math.max(.1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Height"}),p.jsx(Be,{type:"number",value:e.height,onChange:a=>r({height:Math.max(.1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Unit"}),p.jsxs(tt,{value:e.unit,onValueChange:a=>r({unit:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"cm",children:"cm"}),p.jsx(Ae,{value:"inch",children:"inch"})]})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{checked:e.showRuler,onCheckedChange:a=>r({showRuler:a})}),p.jsx(je,{className:"text-xs",children:"Show Ruler"})]})]})})]})}function Tse({element:e,onChange:t}){const r=e.config,n=(i,a)=>t({[i]:a});switch(e.type){case"TEXT_STATIC":case"TEXT_PRODUCT":case"TEXT_PRICE":return p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Text"}),p.jsx(Be,{value:r.text??"",onChange:i=>n("text",i.target.value),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Font Size"}),p.jsx(Be,{type:"number",value:r.fontSize??14,onChange:i=>n("fontSize",Number(i.target.value)||14),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Text Align"}),p.jsxs(tt,{value:r.textAlign??"left",onValueChange:i=>n("textAlign",i),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"left",children:"Left"}),p.jsx(Ae,{value:"center",children:"Center"}),p.jsx(Ae,{value:"right",children:"Right"})]})]})]})]});case"BARCODE":return p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Data"}),p.jsx(Be,{value:r.data??"",onChange:i=>n("data",i.target.value),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"方向"}),p.jsxs(tt,{value:r.orientation??"horizontal",onValueChange:i=>n("orientation",i),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"horizontal",children:"水平"}),p.jsx(Ae,{value:"vertical",children:"竖排"})]})]})]})]});case"QRCODE":return p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Data (URL)"}),p.jsx(Be,{value:r.data??"",onChange:i=>n("data",i.target.value),className:"h-8 text-sm mt-1"})]});case"WEIGHT":return p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Value"}),p.jsx(Be,{type:"number",value:r.value??0,onChange:i=>n("value",Number(i.target.value)||0),className:"h-8 text-sm mt-1"})]});default:return p.jsxs("div",{className:"text-xs text-gray-500",children:["Config for ",e.type," (edit in code if needed)"]})}}const kse=.5,Rse=2,lR=.25,Mse=1;function Ise({templateId:e,initialTemplate:t,onClose:r,onSaved:n}){const[i,a]=P.useState(()=>t?{...t}:Hae(e??void 0)),[s,u]=P.useState(null),[f,c]=P.useState(Mse),[d,h]=P.useState(!1),m=i.elements.find(E=>E.id===s)??null,g=P.useCallback((E,C)=>{const A=Vae(E,30,30);C&&Object.keys(C).length>0&&(A.config={...A.config,...C}),a(N=>({...N,elements:[...N.elements,A]})),u(A.id)},[]),b=P.useCallback((E,C)=>{a(A=>({...A,elements:A.elements.map(N=>N.id===E?{...N,...C}:N)}))},[]),y=P.useCallback(E=>{a(C=>({...C,elements:C.elements.filter(A=>A.id!==E)})),u(null)},[]),w=P.useCallback(E=>{a(C=>({...C,...E}))},[]),S=P.useCallback(()=>{Kae(i),n(),r()},[i,n,r]),O=P.useCallback(()=>{const E=new Blob([JSON.stringify(i,null,2)],{type:"application/json"}),C=URL.createObjectURL(E),A=document.createElement("a");A.href=C,A.download=`label-template-${i.id}.json`,A.click(),URL.revokeObjectURL(C)},[i]);return p.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200 bg-white shrink-0",children:[p.jsxs(Ne,{variant:"outline",size:"sm",onClick:r,children:[p.jsx(sB,{className:"w-4 h-4 mr-1"}),"Back"]}),p.jsx("span",{className:"text-sm font-medium text-gray-700 truncate flex-1",children:i.name}),p.jsxs(Ne,{size:"sm",onClick:O,variant:"outline",children:[p.jsx(Y1,{className:"w-4 h-4 mr-1"}),"Export JSON"]}),p.jsxs(Ne,{size:"sm",className:"bg-blue-600 hover:bg-blue-700 text-white",onClick:S,children:[p.jsx(o8,{className:"w-4 h-4 mr-1"}),"Save"]})]}),p.jsxs("div",{className:"flex flex-1 min-h-0",children:[p.jsx(woe,{onAddElement:g}),p.jsx(yse,{template:i,selectedId:s,onSelect:u,onUpdateElement:b,onDeleteElement:y,onTemplateChange:w,scale:f,onZoomIn:()=>c(E=>Math.min(Rse,E+lR)),onZoomOut:()=>c(E=>Math.max(kse,E-lR)),onPreview:()=>h(!0)}),p.jsx(na,{open:d,onOpenChange:h,children:p.jsxs(ia,{className:"max-w-[90vw] max-h-[90vh] overflow-auto",children:[p.jsx(aa,{children:p.jsx(oa,{children:"标签预览"})}),p.jsx(xse,{template:i,maxWidth:500})]})}),p.jsx(Cse,{template:i,selectedElement:m,onTemplateChange:w,onElementChange:b,onDeleteElement:y})]})]})}function Dse(){const[e,t]=P.useState(()=>ak()),[r,n]=P.useState("list"),[i,a]=P.useState(null),[s,u]=P.useState(""),[f,c]=P.useState("all"),d=P.useCallback(()=>{t(ak())},[]);P.useEffect(()=>{r==="list"&&d()},[r,d]);const h=e.filter(y=>{const w=!s||y.name.toLowerCase().includes(s.toLowerCase()),S=f==="all"||y.appliedLocation===f;return w&&S}),m=()=>{a(null),n("editor")},g=y=>{a(y),n("editor")},b=()=>{n("list"),a(null)};if(r==="editor"){const y=i?T$(i):null;return p.jsx("div",{className:"h-[calc(100vh-8rem)] min-h-[500px] flex flex-col",children:p.jsx(Ise,{templateId:i,initialTemplate:y,onClose:b,onSaved:d})})}return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500",value:s,onChange:y=>u(y.target.value)}),p.jsxs(tt,{value:f,onValueChange:c,children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"ALL",children:"ALL"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs(Ne,{className:"hidden bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",onClick:m,children:["New Label Template ",p.jsx(Ur,{className:"ml-1 w-4 h-4"})]})]}),p.jsxs("div",{className:"text-red-600 font-bold italic text-sm md:text-base",children:["***One or more templates have incomplete labels attached to them.",p.jsx("br",{}),"Go to Labels view to see which labels are missing fields."]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[180px]",children:"Label Template"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[120px]",children:"Location"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Contents"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[150px]",children:"Size"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[100px]",children:"Actions"})]})}),p.jsx(_r,{children:h.length===0?p.jsx(Qe,{children:p.jsx(de,{colSpan:5,className:"text-center text-gray-500 py-8",children:'No templates yet. Click "New Label Template" to create one.'})}):h.map(y=>p.jsxs(Qe,{className:"hover:bg-gray-50 cursor-pointer",onClick:()=>g(y.id),children:[p.jsx(de,{className:"font-medium",children:y.name}),p.jsx(de,{children:y.appliedLocation}),p.jsxs(de,{className:"text-sm text-gray-600",children:[y.elements.length," element(s)"]}),p.jsxs(de,{children:[y.width,"×",y.height," ",y.unit]}),p.jsx(de,{onClick:w=>w.stopPropagation(),children:p.jsxs(Ne,{variant:"outline",size:"sm",onClick:()=>g(y.id),children:[p.jsx(jd,{className:"w-3 h-3 mr-1"}),"Edit"]})})]},y.id))})]})})]})}function Lse(){const e=[{id:1,name:"Prepped By",contents:"A. Smith; B. Doe; C. Borne",lastEdited:"2025.12.03.11:45"},{id:2,name:"Checked By",contents:"D. Manager; E. Supervisor",lastEdited:"2025.12.04.09:30"},{id:3,name:"Allergens",contents:"Peanuts; Dairy; Gluten; Soy",lastEdited:"2025.12.05.14:15"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Multiple Options ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"Multiple Option Name"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Contents"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[180px]",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(de,{className:"font-medium",children:t.name}),p.jsx(de,{className:"text-gray-600",children:t.contents}),p.jsx(de,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function $se({currentView:e="Labels",onViewChange:t}){const r=["Labels","Label Categories","Label Types","Label Templates","Multiple Options"],n=i=>{t&&t(i)};return p.jsxs("div",{className:"space-y-6",children:[p.jsx("div",{className:"w-full border-b border-gray-200",children:p.jsx("div",{className:"flex overflow-x-auto bg-white",children:r.map(i=>p.jsx("div",{onClick:()=>n(i),style:e===i?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px ${e===i?"text-blue-600":"border-b-2 border-b-transparent text-gray-600 hover:text-gray-800"}`,children:i},i))})}),p.jsxs("div",{className:"min-h-[400px]",children:[e==="Labels"&&p.jsx($ae,{}),e==="Label Categories"&&p.jsx(Bae,{}),e==="Label Types"&&p.jsx(zae,{}),e==="Label Templates"&&p.jsx(Dse,{}),e==="Multiple Options"&&p.jsx(Lse,{}),!["Labels","Label Categories","Label Types","Label Templates","Multiple Options"].includes(e)&&p.jsxs("div",{className:"flex items-center justify-center h-64 text-gray-400",children:[e," content coming soon..."]})]})]})}function Bse(){const[e,t]=P.useState([{id:"1",name:"Pop",isOpen:!0,subcategories:[{id:"1-1",name:"2024",isOpen:!0,files:[{id:"f1",name:"uuuuu",date:"10/23/24, 12:21 AM",type:"image"},{id:"f2",name:"664EF167-DFCE-49C1-A417-DC09FEDF78D7.jpg",date:"11/24/25, 8:40 PM",type:"image"}]}]},{id:"2",name:"Training",isOpen:!0,subcategories:[{id:"2-1",name:"BOH",isOpen:!1,files:[]},{id:"2-2",name:"FOH",isOpen:!0,files:[]}]},{id:"3",name:"ww",isOpen:!1,subcategories:[]}]),r=i=>{t(a=>a.map(s=>s.id===i?{...s,isOpen:!s.isOpen}:s))},n=(i,a)=>{t(s=>s.map(u=>u.id!==i?u:{...u,subcategories:u.subcategories.map(f=>f.id===a?{...f,isOpen:!f.isOpen}:f)}))};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Be,{className:"bg-white border border-black rounded-md h-10 w-[150px]"}),p.jsx("span",{className:"text-sm text-black whitespace-nowrap",children:"Search"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-black rounded-md h-10 w-[100px]",children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"all"}),p.jsx(Ae,{value:"loc-a",children:"Location A"})]})]}),p.jsx("span",{className:"text-sm text-black whitespace-nowrap",children:"Location"})]})]}),p.jsxs("div",{className:"bg-gray-100 p-2 flex justify-between items-center border-b border-gray-200",children:[p.jsx("h1",{className:"text-xl font-medium text-gray-700",children:"Information"}),p.jsxs("div",{className:"flex items-center gap-4 text-gray-600",children:[p.jsx("div",{className:"flex items-center gap-1 bg-gray-700 text-white text-[10px] px-1 py-0.5 rounded-sm font-bold",children:"NEW"}),p.jsx(h8,{className:"h-5 w-5"}),p.jsx("span",{className:"font-medium",children:"55789"})]})]}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("button",{className:"w-full bg-[#2c7bb6] hover:bg-[#256b9e] text-white py-2 px-4 flex items-center gap-2 text-sm font-medium rounded-sm",children:[p.jsx(Ur,{className:"h-4 w-4"}),"New Category",p.jsx(cb,{className:"h-4 w-4 opacity-70"})]}),p.jsx("div",{className:"space-y-4",children:e.map(i=>p.jsxs("div",{className:"border border-gray-300 rounded-sm overflow-hidden",children:[p.jsxs("div",{className:"bg-gradient-to-b from-gray-50 to-gray-100 border-b border-gray-200 p-2 flex items-center justify-between",children:[p.jsxs("button",{onClick:()=>r(i.id),className:"flex items-center gap-2 text-gray-700 font-medium text-sm flex-1 text-left",children:[i.isOpen?p.jsx(cc,{className:"h-4 w-4 text-[#2c7bb6]"}):p.jsx(Cd,{className:"h-4 w-4 text-[#2c7bb6]"}),i.name]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:p.jsx(jd,{className:"h-4 w-4"})}),p.jsx("button",{className:"text-red-400 hover:text-red-600",children:p.jsx(ec,{className:"h-4 w-4"})})]})]}),i.isOpen&&p.jsxs("div",{className:"p-2 space-y-3 bg-white",children:[p.jsxs("button",{className:"w-full bg-[#2c7bb6] hover:bg-[#256b9e] text-white py-2 px-4 flex items-center gap-2 text-sm font-medium rounded-sm",children:[p.jsx(Ur,{className:"h-4 w-4"}),"New Subcategory",p.jsx(cb,{className:"h-4 w-4 opacity-70"})]}),p.jsxs("div",{className:"space-y-3",children:[i.subcategories.map(a=>p.jsxs("div",{className:"border border-gray-200 rounded-sm",children:[p.jsxs("div",{className:"bg-white border-b border-gray-200 p-2 flex items-center justify-between",children:[p.jsxs("button",{onClick:()=>n(i.id,a.id),className:"flex items-center gap-2 text-gray-700 font-medium text-sm flex-1 text-left",children:[a.isOpen?p.jsx(cc,{className:"h-4 w-4 text-[#2c7bb6]"}):p.jsx(Cd,{className:"h-4 w-4 text-[#2c7bb6]"}),a.name]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:p.jsx(jd,{className:"h-4 w-4"})}),p.jsx("button",{className:"text-red-400 hover:text-red-600",children:p.jsx(ec,{className:"h-4 w-4"})})]})]}),a.isOpen&&p.jsxs("div",{className:"p-3 bg-gray-50/50",children:[p.jsx("div",{className:"mb-2 text-xs font-bold text-gray-500 uppercase tracking-wide",children:"Files"}),p.jsxs("div",{className:"flex flex-wrap gap-2 mb-3 justify-end",children:[p.jsx(Ne,{size:"sm",className:"h-8 bg-[#4CAF50] hover:bg-[#43a047] text-white text-xs border-none rounded-sm",children:"Upload Your Own File(s)"}),p.jsx(Ne,{size:"sm",className:"h-8 bg-[#4CAF50] hover:bg-[#43a047] text-white text-xs border-none rounded-sm",children:"Create A Custom File"}),p.jsx(Ne,{size:"sm",className:"h-8 bg-[#2c7bb6] hover:bg-[#256b9e] text-white text-xs border-none rounded-sm",children:"Edit File Permissions"}),p.jsxs(Ne,{size:"sm",className:"h-8 bg-[#2c7bb6] hover:bg-[#256b9e] text-white text-xs border-none rounded-sm gap-1",children:["Sort (A-Z) ",p.jsx(cB,{className:"h-3 w-3"})]})]}),p.jsx("div",{className:"space-y-1",children:a.files.length>0?a.files.map(s=>p.jsxs("div",{className:"flex items-center bg-gray-200/50 p-2 border border-gray-200 rounded-sm text-sm hover:bg-gray-200 transition-colors",children:[p.jsx("div",{className:"flex-shrink-0 mr-3",children:s.type==="image"?p.jsx(Ia,{className:"h-5 w-5 text-[#2c7bb6]"}):p.jsx(uc,{className:"h-5 w-5 text-[#2c7bb6]"})}),p.jsx("div",{className:"flex-1 min-w-0",children:p.jsx("div",{className:"font-medium text-gray-700 truncate",children:s.name})}),p.jsx("div",{className:"text-xs text-gray-500 mr-4 whitespace-nowrap",children:s.date}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("button",{className:"p-1 text-gray-400 hover:text-gray-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(uc,{className:"h-3 w-3"})}),p.jsx("button",{className:"p-1 text-gray-400 hover:text-gray-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(jd,{className:"h-3 w-3"})}),p.jsx("button",{className:"p-1 text-red-400 hover:text-red-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(ec,{className:"h-3 w-3"})})]})]},s.id)):p.jsx("div",{className:"p-4 border-2 border-dashed border-gray-300 rounded-sm text-center text-gray-400 text-sm",children:"No files in this subcategory"})})]})]},a.id)),i.subcategories.length===0&&p.jsx("div",{className:"p-2 text-sm text-gray-400 italic",children:"No subcategories"})]})]})]},i.id))})]})]})}const zse=[{id:1,title:"Coffee - 2 hrs",subtitle:"1 min - Completes at 12:05 PM",totalTime:7200,remainingTime:0,status:"expired",icon:CB},{id:2,title:"Clean Tablet",subtitle:"1 hrs - Completes at 12:37 PM",totalTime:3600,remainingTime:237,status:"running",icon:v8},{id:3,title:"Replace Sanitizer Towels",subtitle:"1 hrs - Completes at 12:37 PM",totalTime:3600,remainingTime:238,status:"running",icon:Aj},{id:4,title:"Take Out Trash",subtitle:"1 hrs - Completes at 01:03 PM",totalTime:3600,remainingTime:58,status:"running",icon:Aj},{id:5,title:"Change Utensils",subtitle:"1 hrs - Completes at 01:03 PM",totalTime:3600,remainingTime:58,status:"running",icon:C8},{id:6,title:"Sanitize Surfaces",subtitle:"1 hrs - Completes at 02:00 PM",totalTime:3600,remainingTime:2157,status:"running",icon:Uv},{id:7,title:"Check Temperatures",subtitle:"1 hrs - Completes at 02:00 PM",totalTime:3600,remainingTime:2158,status:"running",icon:Uv},{id:8,title:"Ranch 4 hrs",subtitle:"4 hrs - Completes at 04:04 PM",totalTime:14400,remainingTime:2158,status:"running",icon:Uv}];function Fse({timer:e}){const t=(e.totalTime-e.remainingTime)/e.totalTime*100,r=e.remainingTime===0,n=i=>{if(i<=0)return"0s";const a=Math.floor(i/60),s=i%60;return`${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`};return p.jsxs("div",{className:"bg-gray-200 rounded-xl p-4 flex flex-col items-center relative shadow-sm h-[280px]",children:[p.jsxs("div",{className:"text-center mb-2",children:[p.jsx("h3",{className:"text-lg font-medium text-gray-800 leading-tight",children:e.title}),p.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.subtitle})]}),p.jsxs("div",{className:"relative w-32 h-32 my-auto flex items-center justify-center",children:[p.jsxs("svg",{className:"w-full h-full transform -rotate-90",children:[p.jsx("circle",{cx:"64",cy:"64",r:"56",stroke:"white",strokeWidth:"12",fill:"transparent"}),p.jsx("circle",{cx:"64",cy:"64",r:"56",stroke:r?"#ef4444":"#3b82f6",strokeWidth:"12",fill:"transparent",strokeDasharray:351.86,strokeDashoffset:r?0:351.86*(t/100),className:"transition-all duration-1000 ease-linear"})]}),p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[p.jsx("span",{className:Ie("text-3xl font-bold",r?"text-red-500":"text-gray-800"),children:r?"0s":n(e.remainingTime)}),p.jsx("span",{className:Ie("text-[10px] font-medium uppercase mt-1",r?"text-red-400":"text-gray-400"),children:"Remaining"})]})]}),p.jsxs("div",{className:"w-full flex justify-between items-end mt-2",children:[p.jsx(e8,{className:"w-5 h-5 text-blue-700 fill-current"}),p.jsx("div",{className:"flex flex-col items-center",children:p.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-300 flex items-center justify-center text-gray-400 mb-1",children:p.jsx(e.icon,{className:"w-5 h-5"})})}),p.jsx("div",{className:"flex flex-col items-end",children:p.jsx("span",{className:"text-xs text-blue-600 font-bold mb-2 cursor-pointer",children:"EDIT"})})]}),p.jsx("button",{className:"absolute bottom-12 right-4 bg-blue-600 rounded-full p-1 text-white hover:bg-blue-700 shadow-md",children:p.jsx(ec,{className:"w-4 h-4"})})]})}function qse(){const[e,t]=P.useState(!0);return p.jsxs("div",{className:"h-full flex flex-col bg-gray-50 relative",children:[p.jsxs("div",{className:"bg-white border-b border-gray-200 px-4 py-3 flex items-center justify-between shadow-sm z-10",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("button",{className:"flex items-center text-blue-500 text-lg font-medium",children:[p.jsx(_B,{className:"w-6 h-6"}),"Back"]}),p.jsx(XB,{className:"w-6 h-6 text-gray-500"})]}),p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"bg-blue-600 p-1.5 rounded-md",children:p.jsx(x8,{className:"w-5 h-5 text-white"})}),p.jsx("h1",{className:"text-xl font-bold text-blue-900",children:"Timers"})]}),p.jsxs("div",{className:"flex items-center gap-1 text-xs text-green-600 font-medium",children:[p.jsx("span",{children:"86016"}),p.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"})]})]}),p.jsxs("div",{className:"flex items-center gap-4 text-blue-500 font-medium",children:[p.jsx(A8,{className:"w-6 h-6 text-gray-400"}),p.jsxs("button",{className:"flex items-center gap-1",children:[p.jsx(Ur,{className:"w-5 h-5"}),"Add Timer"]})]})]}),p.jsxs("div",{className:"bg-gray-700 text-white px-6 py-2 flex items-center justify-between",children:[p.jsx("div",{className:"flex-1"})," ",p.jsx("div",{className:"font-medium",children:"Today, December 15"}),p.jsxs("div",{className:"flex-1 flex justify-end items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(LB,{className:"w-5 h-5 text-gray-300"}),p.jsx(WB,{className:"w-5 h-5 text-gray-500"})]}),p.jsx(nB,{className:"w-5 h-5 text-blue-400"})]})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:p.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:zse.map(r=>p.jsx(Fse,{timer:r},r.id))})}),e&&p.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-[1px]",children:p.jsx("div",{className:"bg-black text-white rounded-xl shadow-2xl w-[600px] max-w-full overflow-hidden border border-gray-800",children:p.jsxs("div",{className:"p-8 text-center space-y-6",children:[p.jsx("h2",{className:"text-3xl font-medium text-blue-500",children:"Coffee - 2 hrs"}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsx("p",{className:"text-2xl font-light",children:"Timer expired at 12:05 PM"}),p.jsx("p",{className:"text-2xl font-light",children:"Please discard the coffee"})]}),p.jsx("div",{className:"flex justify-end",children:p.jsx("span",{className:"bg-gray-200 text-black text-[10px] px-1 rounded-sm opacity-50",children:"TACT_Img_Timer-Notification@2x"})}),p.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-8",children:[p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-700 hover:bg-blue-600 text-white h-14 text-xl font-medium rounded-lg",children:"Mute"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-500 text-white h-14 text-xl font-medium rounded-lg",children:"Restart"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-800 hover:bg-blue-700 text-white h-14 text-xl font-medium rounded-lg",children:"Acknowledge"})]})]})})})]})}var lb="rovingFocusGroup.onEntryFocus",Use={bubbles:!1,cancelable:!0},uu="RovingFocusGroup",[G1,b3,Wse]=xL(uu),[Hse,w3]=gi(uu,[Wse]),[Vse,Gse]=Hse(uu),_3=P.forwardRef((e,t)=>p.jsx(G1.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(G1.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Kse,{...e,ref:t})})}));_3.displayName=uu;var Kse=P.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...h}=e,m=P.useRef(null),g=Je(t,m),b=Kh(a),[y,w]=Ha({prop:s,defaultProp:u??null,onChange:f,caller:uu}),[S,O]=P.useState(!1),E=ar(c),C=b3(r),A=P.useRef(!1),[N,T]=P.useState(0);return P.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(lb,E),()=>R.removeEventListener(lb,E)},[E]),p.jsx(Vse,{scope:r,orientation:n,dir:b,loop:i,currentTabStopId:y,onItemFocus:P.useCallback(R=>w(R),[w]),onItemShiftTab:P.useCallback(()=>O(!0),[]),onFocusableItemAdd:P.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:P.useCallback(()=>T(R=>R-1),[]),children:p.jsx(We.div,{tabIndex:S||N===0?-1:0,"data-orientation":n,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:Fe(e.onMouseDown,()=>{A.current=!0}),onFocus:Fe(e.onFocus,R=>{const I=!A.current;if(R.target===R.currentTarget&&I&&!S){const q=new CustomEvent(lb,Use);if(R.currentTarget.dispatchEvent(q),!q.defaultPrevented){const L=C().filter(K=>K.focusable),D=L.find(K=>K.active),U=L.find(K=>K.id===y),V=[D,U,...L].filter(Boolean).map(K=>K.ref.current);j3(V,d)}}A.current=!1}),onBlur:Fe(e.onBlur,()=>O(!1))})})}),S3="RovingFocusGroupItem",O3=P.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:s,...u}=e,f=Gi(),c=a||f,d=Gse(S3,r),h=d.currentTabStopId===c,m=b3(r),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:y}=d;return P.useEffect(()=>{if(n)return g(),()=>b()},[n,g,b]),p.jsx(G1.ItemSlot,{scope:r,id:c,focusable:n,active:i,children:p.jsx(We.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...u,ref:t,onMouseDown:Fe(e.onMouseDown,w=>{n?d.onItemFocus(c):w.preventDefault()}),onFocus:Fe(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Fe(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const S=Qse(w,d.orientation,d.dir);if(S!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=m().filter(C=>C.focusable).map(C=>C.ref.current);if(S==="last")E.reverse();else if(S==="prev"||S==="next"){S==="prev"&&E.reverse();const C=E.indexOf(w.currentTarget);E=d.loop?Zse(E,C+1):E.slice(C+1)}setTimeout(()=>j3(E))}}),children:typeof s=="function"?s({isCurrentTabStop:h,hasTabStop:y!=null}):s})})});O3.displayName=S3;var Xse={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Yse(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Qse(e,t,r){const n=Yse(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Xse[n]}function j3(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Zse(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Jse=_3,ele=O3,Gp="Tabs",[tle]=gi(Gp,[w3]),E3=w3(),[rle,P_]=tle(Gp),A3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:u,activationMode:f="automatic",...c}=e,d=Kh(u),[h,m]=Ha({prop:n,onChange:i,defaultProp:a??"",caller:Gp});return p.jsx(rle,{scope:r,baseId:Gi(),value:h,onValueChange:m,orientation:s,dir:d,activationMode:f,children:p.jsx(We.div,{dir:d,"data-orientation":s,...c,ref:t})})});A3.displayName=Gp;var P3="TabsList",N3=P.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,a=P_(P3,r),s=E3(r);return p.jsx(Jse,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:p.jsx(We.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});N3.displayName=P3;var C3="TabsTrigger",T3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,s=P_(C3,r),u=E3(r),f=M3(s.baseId,n),c=I3(s.baseId,n),d=n===s.value;return p.jsx(ele,{asChild:!0,...u,focusable:!i,active:d,children:p.jsx(We.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...a,ref:t,onMouseDown:Fe(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?s.onValueChange(n):h.preventDefault()}),onKeyDown:Fe(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&s.onValueChange(n)}),onFocus:Fe(e.onFocus,()=>{const h=s.activationMode!=="manual";!d&&!i&&h&&s.onValueChange(n)})})})});T3.displayName=C3;var k3="TabsContent",R3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:a,...s}=e,u=P_(k3,r),f=M3(u.baseId,n),c=I3(u.baseId,n),d=n===u.value,h=P.useRef(d);return P.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),p.jsx(Un,{present:i||d,children:({present:m})=>p.jsx(We.div,{"data-state":d?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!m,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&a})})});R3.displayName=k3;function M3(e,t){return`${e}-trigger-${t}`}function I3(e,t){return`${e}-content-${t}`}var nle=A3,ile=N3,ale=T3,ole=R3;function D3({className:e,...t}){return p.jsx(nle,{"data-slot":"tabs",className:Ie("flex flex-col gap-2",e),...t})}function L3({className:e,...t}){return p.jsx(ile,{"data-slot":"tabs-list",className:Ie("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex",e),...t})}function rs({className:e,...t}){return p.jsx(ale,{"data-slot":"tabs-trigger",className:Ie("data-[state=active]:bg-card dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function ns({className:e,...t}){return p.jsx(ole,{"data-slot":"tabs-content",className:Ie("flex-1 outline-none",e),...t})}const sle=[{id:"cat1",name:"Dairy",type:"color",value:"#bfdbfe",status:"active"},{id:"cat2",name:"Meat",type:"image",value:"meat.png",status:"active"},{id:"cat3",name:"Bakery",type:"text",value:"Bakery",status:"active"}],lle=[{id:"prod1",locationId:"12345",categoryId:"cat1",categoryName:"Dairy",name:"Whole Milk",productId:"2222222",barcode:"123456789",barcodeType:"EAN-13",status:"active",appearance:{type:"text",value:"Whole Milk"}},{id:"prod2",locationId:"12345",categoryId:"cat2",categoryName:"Meat",name:"Ground Beef",productId:"3333333",barcode:"113456789",barcodeType:"UPC-A",status:"active",appearance:{type:"color",value:"#ef4444"}},{id:"prod3",locationId:"67890",categoryId:"cat3",categoryName:"Bakery",name:"Croissant",productId:"4444444",barcode:"998877665",barcodeType:"EAN-8",status:"inactive",appearance:{type:"image",value:"croissant.jpg"}}];function cle(){const[e,t]=P.useState("products"),[r,n]=P.useState(lle),[i,a]=P.useState(sle),[s,u]=P.useState(!1),[f,c]=P.useState(!1);return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsxs("div",{className:"pb-4",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3 flex-wrap",children:[p.jsxs("div",{className:"flex items-center w-40 shrink-0 rounded-md border border-gray-300 bg-white overflow-hidden",style:{height:40},children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-2.5 pointer-events-none"}),p.jsx(Be,{placeholder:"Search...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full placeholder:text-gray-500"})]}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"loc-12345",children:[p.jsx(nt,{className:"w-[160px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"loc-12345",children:"Location 12345"}),p.jsx(Ae,{value:"all",children:"All Locations"})]})]}),p.jsxs(tt,{children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Category"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Categories"}),i.map(d=>p.jsx(Ae,{value:d.id,children:d.name},d.id))]})]}),p.jsx("div",{className:"flex-1 min-w-2"}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(j8,{className:"w-4 h-4"})," Bulk Import"]}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Y1,{className:"w-4 h-4"})," Bulk Export"]}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Uo,{className:"w-4 h-4"})," Bulk Edit"]}),e==="products"?p.jsxs(Ne,{className:"h-10 rounded-md bg-blue-600 text-white hover:bg-blue-700 font-medium gap-1 shrink-0",onClick:()=>u(!0),children:["New Product ",p.jsx(Ur,{className:"w-4 h-4"})]}):p.jsxs(Ne,{className:"h-10 rounded-md bg-blue-600 text-white hover:bg-blue-700 font-medium gap-1 shrink-0",onClick:()=>c(!0),children:["New Category ",p.jsx(Ur,{className:"w-4 h-4"})]})]}),p.jsx("div",{className:"w-full border-b border-gray-200 mt-4",children:p.jsxs("div",{className:"flex overflow-x-auto w-fit",children:[p.jsx("button",{onClick:()=>t("products"),style:e==="products"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2 ${e==="products"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"}`,children:"Products"}),p.jsx("button",{onClick:()=>t("categories"),style:e==="categories"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2 ${e==="categories"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"}`,children:"Categories"})]})})]}),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:e==="products"?p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Category"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Barcode"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Status"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(d=>p.jsxs(Qe,{children:[p.jsx(de,{className:"border-r font-numeric",children:d.locationId}),p.jsx(de,{className:"border-r text-gray-900 font-medium",children:d.categoryName}),p.jsx(de,{className:"border-r text-gray-900 font-medium",children:p.jsxs("div",{className:"flex items-center gap-2",children:[d.appearance.type==="color"&&p.jsx("div",{className:"w-4 h-4 rounded-full border border-gray-300 shadow-sm",style:{backgroundColor:d.appearance.value}}),d.appearance.type==="image"&&p.jsx(Ia,{className:"w-4 h-4 text-gray-500"}),d.name]})}),p.jsx(de,{className:"border-r font-numeric text-gray-600",children:d.productId}),p.jsx(de,{className:"border-r font-numeric",children:p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-xs text-gray-400",children:d.barcodeType}),p.jsx("span",{children:d.barcode})]})}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{variant:d.status==="active"?"default":"secondary",className:d.status==="active"?"bg-green-600":"bg-gray-400",children:d.status})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(hR,{className:"h-4 w-4"})})})]},d.id))})]})}):p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Category Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Display Type"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Preview"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Status"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:i.map(d=>p.jsxs(Qe,{children:[p.jsx(de,{className:"border-r font-medium",children:d.name}),p.jsx(de,{className:"border-r capitalize",children:d.type}),p.jsxs(de,{className:"border-r",children:[d.type==="color"&&p.jsx("div",{className:"w-8 h-8 rounded-md border border-gray-200 shadow-sm",style:{backgroundColor:d.value}}),d.type==="image"&&p.jsx("div",{className:"w-8 h-8 bg-gray-100 flex items-center justify-center rounded-md border border-gray-200",children:p.jsx(Ia,{className:"w-4 h-4 text-gray-500"})}),d.type==="text"&&p.jsx("div",{className:"w-auto px-2 py-1 bg-gray-100 rounded-md border border-gray-200 text-xs font-medium inline-block",children:d.value})]}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{variant:d.status==="active"?"default":"secondary",className:d.status==="active"?"bg-green-600":"bg-gray-400",children:d.status})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(Uo,{className:"h-4 w-4"})})})]},d.id))})]})})}),p.jsx(ule,{open:s,onOpenChange:u,categories:i}),p.jsx(fle,{open:f,onOpenChange:c})]})}function ule({open:e,onOpenChange:t,categories:r}){const[n,i]=P.useState("text");return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px] max-h-[90vh] overflow-y-auto",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Product"}),p.jsx(au,{children:"Create a new product. Fill in the details below."})]}),p.jsxs("div",{className:"grid gap-6 py-4",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Product Category"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Category"})}),p.jsx(st,{children:r.map(a=>p.jsx(Ae,{value:a.id,children:a.name},a.id))})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Product Name"}),p.jsx(Be,{placeholder:"e.g. Whole Milk"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Product ID"}),p.jsx(Be,{placeholder:"Internal ID"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Status"}),p.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[p.jsx(no,{defaultChecked:!0}),p.jsx("span",{className:"text-sm text-gray-500",children:"Active"})]})]})]}),p.jsxs("div",{className:"space-y-3 p-4 bg-gray-50 rounded-md border border-gray-100",children:[p.jsxs(je,{className:"flex items-center gap-2",children:[p.jsx(dB,{className:"w-4 h-4"})," Barcode Settings"]}),p.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[p.jsx("div",{className:"col-span-1",children:p.jsxs(tt,{defaultValue:"ean13",children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Format"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"ean13",children:"EAN-13"}),p.jsx(Ae,{value:"upc-a",children:"UPC-A"}),p.jsx(Ae,{value:"code128",children:"Code 128"}),p.jsx(Ae,{value:"qr",children:"QR Code"})]})]})}),p.jsx("div",{className:"col-span-2",children:p.jsx(Be,{placeholder:"Barcode Value"})})]}),p.jsx(Ne,{variant:"link",className:"px-0 text-xs h-auto",children:"+ Add another barcode standard"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(je,{children:"App Appearance"}),p.jsxs(D3,{value:n,onValueChange:i,className:"w-full",children:[p.jsxs(L3,{className:"grid w-full grid-cols-3",children:[p.jsxs(rs,{value:"text",className:"flex items-center gap-2",children:[p.jsx(Z1,{className:"w-3 h-3"})," Text"]}),p.jsxs(rs,{value:"color",className:"flex items-center gap-2",children:[p.jsx(pR,{className:"w-3 h-3"})," Color"]}),p.jsxs(rs,{value:"image",className:"flex items-center gap-2",children:[p.jsx(Ia,{className:"w-3 h-3"})," Image"]})]}),p.jsxs(ns,{value:"text",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Display Text"}),p.jsx(Be,{placeholder:"Text to display on button"})]}),p.jsxs(ns,{value:"color",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Select Color"}),p.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["#ef4444","#f97316","#f59e0b","#84cc16","#10b981","#06b6d4","#3b82f6","#6366f1","#a855f7","#ec4899"].map(a=>p.jsx("button",{className:"w-8 h-8 rounded-full border border-gray-200 shadow-sm hover:scale-110 transition-transform",style:{backgroundColor:a}},a)),p.jsx("button",{className:"w-8 h-8 rounded-full border border-dashed border-gray-400 flex items-center justify-center hover:bg-gray-50",children:p.jsx(Ur,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs(ns,{value:"image",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Upload Image"}),p.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-md p-6 flex flex-col items-center justify-center text-gray-500 hover:bg-gray-50 cursor-pointer",children:[p.jsx(Ia,{className:"w-8 h-8 mb-2 opacity-50"}),p.jsx("span",{className:"text-xs",children:"Click to upload or drag and drop"})]})]})]})]}),p.jsxs("div",{className:"space-y-3 pt-2 border-t border-gray-100",children:[p.jsx(je,{children:"Store Availability"}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"all-stores",name:"scope",className:"text-blue-600 focus:ring-blue-500",defaultChecked:!0}),p.jsx("label",{htmlFor:"all-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"All Stores in Group"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"specific-stores",name:"scope",className:"text-blue-600 focus:ring-blue-500"}),p.jsx("label",{htmlFor:"specific-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Specific Location(s)"})]})]}),p.jsx("div",{className:"pl-6 pt-2",children:p.jsx(tt,{disabled:!0,children:p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{placeholder:"Select Locations..."})})})})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Create Product"})]})]})})}function fle({open:e,onOpenChange:t}){const[r,n]=P.useState("text");return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[500px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Category"}),p.jsx(au,{children:"Create a product category to organize your items."})]}),p.jsxs("div",{className:"grid gap-6 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Category Name"}),p.jsx(Be,{placeholder:"e.g. Dairy, Meat, Bakery"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(je,{children:"Button Appearance"}),p.jsxs(D3,{value:r,onValueChange:n,className:"w-full",children:[p.jsxs(L3,{className:"grid w-full grid-cols-3",children:[p.jsxs(rs,{value:"text",className:"flex items-center gap-2",children:[p.jsx(Z1,{className:"w-3 h-3"})," Text"]}),p.jsxs(rs,{value:"color",className:"flex items-center gap-2",children:[p.jsx(pR,{className:"w-3 h-3"})," Color"]}),p.jsxs(rs,{value:"image",className:"flex items-center gap-2",children:[p.jsx(Ia,{className:"w-3 h-3"})," Image"]})]}),p.jsxs(ns,{value:"text",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Display Text"}),p.jsx(Be,{placeholder:"Category Name"})]}),p.jsxs(ns,{value:"color",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Select Color"}),p.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["#bfdbfe","#bbf7d0","#fecaca","#ddd6fe","#fde68a"].map(i=>p.jsx("button",{className:"w-8 h-8 rounded-full border border-gray-200 shadow-sm hover:scale-110 transition-transform",style:{backgroundColor:i}},i)),p.jsx("button",{className:"w-8 h-8 rounded-full border border-dashed border-gray-400 flex items-center justify-center hover:bg-gray-50",children:p.jsx(Ur,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs(ns,{value:"image",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Upload Icon/Image"}),p.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-md p-6 flex flex-col items-center justify-center text-gray-500 hover:bg-gray-50 cursor-pointer",children:[p.jsx(Ia,{className:"w-8 h-8 mb-2 opacity-50"}),p.jsx("span",{className:"text-xs",children:"Click to upload"})]})]})]})]}),p.jsx("div",{className:"grid grid-cols-2 gap-4",children:p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Status"}),p.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[p.jsx(no,{defaultChecked:!0}),p.jsx("span",{className:"text-sm text-gray-500",children:"Active"})]})]})}),p.jsxs("div",{className:"space-y-3 pt-2 border-t border-gray-100",children:[p.jsx(je,{children:"Store Availability"}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"cat-all-stores",name:"cat-scope",className:"text-blue-600 focus:ring-blue-500",defaultChecked:!0}),p.jsx("label",{htmlFor:"cat-all-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"All Stores in Group"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"cat-specific-stores",name:"cat-scope",className:"text-blue-600 focus:ring-blue-500"}),p.jsx("label",{htmlFor:"cat-specific-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Specific Location(s)"})]})]})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Create Category"})]})]})})}var Kp="Checkbox",[dle]=gi(Kp),[hle,N_]=dle(Kp);function ple(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:i,disabled:a,form:s,name:u,onCheckedChange:f,required:c,value:d="on",internal_do_not_use_render:h}=e,[m,g]=Ha({prop:r,defaultProp:i??!1,onChange:f,caller:Kp}),[b,y]=P.useState(null),[w,S]=P.useState(null),O=P.useRef(!1),E=b?!!s||!!b.closest("form"):!0,C={checked:m,disabled:a,setChecked:g,control:b,setControl:y,name:u,form:s,value:d,hasConsumerStoppedPropagationRef:O,required:c,defaultChecked:Ki(i)?!1:i,isFormControl:E,bubbleInput:w,setBubbleInput:S};return p.jsx(hle,{scope:t,...C,children:mle(h)?h(C):n})}var $3="CheckboxTrigger",B3=P.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},i)=>{const{control:a,value:s,disabled:u,checked:f,required:c,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:b}=N_($3,e),y=Je(i,d),w=P.useRef(f);return P.useEffect(()=>{const S=a?.form;if(S){const O=()=>h(w.current);return S.addEventListener("reset",O),()=>S.removeEventListener("reset",O)}},[a,h]),p.jsx(We.button,{type:"button",role:"checkbox","aria-checked":Ki(f)?"mixed":f,"aria-required":c,"data-state":H3(f),"data-disabled":u?"":void 0,disabled:u,value:s,...n,ref:y,onKeyDown:Fe(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Fe(r,S=>{h(O=>Ki(O)?!0:!O),b&&g&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})})});B3.displayName=$3;var z3=P.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:a,required:s,disabled:u,value:f,onCheckedChange:c,form:d,...h}=e;return p.jsx(ple,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:u,required:s,onCheckedChange:c,name:n,form:d,value:f,internal_do_not_use_render:({isFormControl:m})=>p.jsxs(p.Fragment,{children:[p.jsx(B3,{...h,ref:t,__scopeCheckbox:r}),m&&p.jsx(W3,{__scopeCheckbox:r})]})})});z3.displayName=Kp;var F3="CheckboxIndicator",q3=P.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,a=N_(F3,r);return p.jsx(Un,{present:n||Ki(a.checked)||a.checked===!0,children:p.jsx(We.span,{"data-state":H3(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});q3.displayName=F3;var U3="CheckboxBubbleInput",W3=P.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:u,disabled:f,name:c,value:d,form:h,bubbleInput:m,setBubbleInput:g}=N_(U3,e),b=Je(r,g),y=__(a),w=y_(n);P.useEffect(()=>{const O=m;if(!O)return;const E=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(E,"checked").set,N=!i.current;if(y!==a&&A){const T=new Event("click",{bubbles:N});O.indeterminate=Ki(a),A.call(O,Ki(a)?!1:a),O.dispatchEvent(T)}},[m,y,a,i]);const S=P.useRef(Ki(a)?!1:a);return p.jsx(We.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??S.current,required:u,disabled:f,name:c,value:d,form:h,...t,tabIndex:-1,ref:b,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});W3.displayName=U3;function mle(e){return typeof e=="function"}function Ki(e){return e==="indeterminate"}function H3(e){return Ki(e)?"indeterminate":e?"checked":"unchecked"}function Jl({className:e,...t}){return p.jsx(z3,{"data-slot":"checkbox",className:Ie("peer border bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(q3,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:p.jsx(dR,{className:"size-3.5"})})})}const vle=[{id:"1",name:"Downtown Store (101)"},{id:"2",name:"Uptown Store (102)"},{id:"3",name:"Airport Kiosk (201)"},{id:"4",name:"Mall Outlet (305)"}],gle=[{id:"r1",name:"Partner Admin",permissions:["all"],notifications:["system_updates","billing"]},{id:"r2",name:"Group Admin",permissions:["manage_users","manage_products","view_reports"],notifications:["new_users"]},{id:"r3",name:"Manager",permissions:["manage_store","view_reports","manage_inventory"],notifications:["label_expiry","low_stock"]},{id:"r4",name:"Team Member",permissions:["view_tasks","print_labels"],notifications:["task_assignment"]}],V3=[{id:"p1",name:"Global Foods Inc.",status:"active",contact:"admin@globalfoods.com"},{id:"p2",name:"Local Eateries Co.",status:"active",contact:"support@localeateries.com"}],yle=[{id:"g1",name:"West Coast Region",partner:"Global Foods Inc.",status:"active"},{id:"g2",name:"East Coast Region",partner:"Global Foods Inc.",status:"inactive"}],xle=[{id:"m1",name:"Alice Johnson",role:"Manager",locations:["Downtown Store (101)","Uptown Store (102)"],email:"alice@example.com",status:"active"},{id:"m2",name:"Bob Smith",role:"Team Member",locations:["Airport Kiosk (201)"],email:"bob@example.com",status:"active"},{id:"m3",name:"Charlie Brown",role:"Team Member",locations:["Downtown Store (101)"],email:"charlie@example.com",status:"inactive"}];function ble(){const[e,t]=P.useState("Roles"),[r,n]=P.useState(gle),[i,a]=P.useState(V3),[s,u]=P.useState(yle),[f,c]=P.useState(xle),[d,h]=P.useState(!1),[m,g]=P.useState(!1),[b,y]=P.useState(!1),[w,S]=P.useState(!1),O=()=>{alert(`Exporting ${e} list to PDF...`)},E=()=>{switch(e){case"Roles":h(!0);break;case"Partner":g(!0);break;case"Group":y(!0);break;case"Team Member":S(!0);break}},C=()=>{const N=e==="Team Member";return p.jsxs("div",{className:"flex flex-col gap-4 pb-4",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"border border-gray-300 rounded-md w-40 shrink-0 bg-white placeholder:text-gray-500"}),p.jsx("div",{className:"flex-1"}),N&&p.jsxs(p.Fragment,{children:[p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Import"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Edit"})]}),p.jsx(Ne,{variant:"outline",onClick:O,className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Export (PDF)"}),p.jsx(Ne,{className:"h-10 bg-blue-600 hover:bg-blue-700 text-white rounded-md px-6 font-medium shrink-0",onClick:E,children:"New+"})]}),p.jsx("div",{className:"w-full border-b border-gray-200",children:p.jsx("div",{className:"flex overflow-x-auto w-fit",children:["Roles","Partner","Group","Team Member"].map(T=>p.jsx("button",{onClick:()=>t(T),style:e===T?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e===T?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:T},T))})})]})},A=()=>{switch(e){case"Roles":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Role Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Access Permissions"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Notifications"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(N=>p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium border-r",children:N.name}),p.jsx(de,{className:"border-r",children:p.jsx("div",{className:"flex flex-wrap gap-1",children:N.permissions.map(T=>p.jsx(Rn,{variant:"secondary",className:"text-xs bg-blue-100 text-blue-800 hover:bg-blue-100",children:T},T))})}),p.jsx(de,{className:"border-r",children:p.jsx("div",{className:"flex flex-wrap gap-1",children:N.notifications.map(T=>p.jsx(Rn,{variant:"outline",className:"text-xs border-orange-200 text-orange-700 bg-orange-50",children:T},T))})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Partner":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Partner Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Contact"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:i.map(N=>p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium border-r",children:N.name}),p.jsx(de,{className:"border-r",children:N.contact}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Group":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Group Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Parent Partner"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:s.map(N=>p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium border-r",children:N.name}),p.jsx(de,{className:"border-r",children:N.partner}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Team Member":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Email"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Role"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Assigned Locations"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:f.map(N=>p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium border-r",children:N.name}),p.jsx(de,{className:"border-r text-gray-600",children:N.email}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{variant:"outline",className:"font-normal",children:N.role})}),p.jsx(de,{className:"border-r",children:p.jsx("div",{className:"flex flex-col gap-1",children:N.locations.map(T=>p.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-600",children:[p.jsx(Gh,{className:"w-3 h-3"})," ",T]},T))})}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]})}};return p.jsxs("div",{className:"h-full flex flex-col",children:[C(),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md",children:A()})}),p.jsx(wle,{open:d,onOpenChange:h}),p.jsx(_le,{open:m,onOpenChange:g}),p.jsx(Sle,{open:b,onOpenChange:y}),p.jsx(Ole,{open:w,onOpenChange:S,roles:r})]})}function wle({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Create New Role"}),p.jsx(au,{children:"Define permissions and notification settings for this role."})]}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Role Name"}),p.jsx(Be,{placeholder:"e.g. Inventory Specialist"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs(je,{className:"flex items-center gap-2",children:[p.jsx(u8,{className:"w-4 h-4"})," Access Permissions"]}),p.jsx("div",{className:"grid grid-cols-2 gap-2 p-3 bg-gray-50 rounded border border-gray-100",children:["Manage Labels","Manage Products","Manage People","View Reports","Edit Settings","Approve Batches"].map(r=>p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:`perm-${r}`}),p.jsx("label",{htmlFor:`perm-${r}`,className:"text-sm font-medium leading-none cursor-pointer",children:r})]},r))})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs(je,{className:"flex items-center gap-2",children:[p.jsx(pB,{className:"w-4 h-4"})," Notifications (Alerts)"]}),p.jsxs("div",{className:"grid grid-cols-1 gap-2 p-3 bg-gray-50 rounded border border-gray-100",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-expiry",defaultChecked:!0}),p.jsx("label",{htmlFor:"notif-expiry",className:"text-sm font-medium leading-none cursor-pointer",children:"Label Expiry Alerts"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-stock"}),p.jsx("label",{htmlFor:"notif-stock",className:"text-sm font-medium leading-none cursor-pointer",children:"Low Stock Alerts"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-tasks"}),p.jsx("label",{htmlFor:"notif-tasks",className:"text-sm font-medium leading-none cursor-pointer",children:"New Task Assignments"})]})]})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Role"})]})]})})}function _le({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{children:[p.jsx(aa,{children:p.jsx(oa,{children:"Create New Partner"})}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Partner Name"}),p.jsx(Be,{placeholder:"Company Name"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Contact Email"}),p.jsx(Be,{placeholder:"admin@partner.com"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"partner-status",defaultChecked:!0}),p.jsx(je,{htmlFor:"partner-status",children:"Active"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Partner"})]})]})})}function Sle({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{children:[p.jsx(aa,{children:p.jsx(oa,{children:"Create New Group"})}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Group Name"}),p.jsx(Be,{placeholder:"e.g. West Coast Region"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Assign to Partner"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Partner"})}),p.jsx(st,{children:V3.map(r=>p.jsx(Ae,{value:r.id,children:r.name},r.id))})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"group-status",defaultChecked:!0}),p.jsx(je,{htmlFor:"group-status",children:"Active"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Group"})]})]})})}function Ole({open:e,onOpenChange:t,roles:r}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[500px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add Team Member / Manager"}),p.jsx(au,{children:"Create a user account and assign them to locations."})]}),p.jsxs("div",{className:"space-y-4 py-4 max-h-[60vh] overflow-y-auto pr-1",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Full Name"}),p.jsx(Be,{placeholder:"John Doe"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Role"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Role"})}),p.jsx(st,{children:r.map(n=>p.jsx(Ae,{value:n.name,children:n.name},n.id))})]})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Password"}),p.jsx(Be,{type:"password",placeholder:"Enter password",autoComplete:"new-password",className:"w-full"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Email Address"}),p.jsx(Be,{type:"email",placeholder:"john@example.com"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(fc,{className:"h-[120px] w-full border rounded-md p-2",children:p.jsx("div",{className:"space-y-2",children:vle.map(n=>p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:`loc-${n.id}`}),p.jsx("label",{htmlFor:`loc-${n.id}`,className:"text-sm cursor-pointer w-full hover:bg-gray-50 p-1 rounded",children:n.name})]},n.id))})}),p.jsx("p",{className:"text-xs text-gray-500",children:"* Users must be assigned to at least one location."})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"member-status",defaultChecked:!0}),p.jsx(je,{htmlFor:"member-status",children:"Active Account"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Create User"})]})]})})}function jle(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Array(12).fill(0);let K1=1;class Ele{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:n,...i}=t,a=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:K1++,s=this.toasts.find(f=>f.id===a),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(f=>f.id===a?(this.publish({...f,...t,id:a,title:n}),{...f,...t,id:a,dismissible:u,title:n}):f):this.addToast({title:n,...i,dismissible:u,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let a=n!==void 0,s;const u=i.then(async c=>{if(s=["resolve",c],z.isValidElement(c))a=!1,this.create({id:n,type:"default",message:c});else if(Ple(c)&&!c.ok){a=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${c.status}`):r.error,m=typeof r.description=="function"?await r.description(`HTTP error! status: ${c.status}`):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:m,...b})}else if(c instanceof Error){a=!1;const h=typeof r.error=="function"?await r.error(c):r.error,m=typeof r.description=="function"?await r.description(c):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:m,...b})}else if(r.success!==void 0){a=!1;const h=typeof r.success=="function"?await r.success(c):r.success,m=typeof r.description=="function"?await r.description(c):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:m,...b})}}).catch(async c=>{if(s=["reject",c],r.error!==void 0){a=!1;const d=typeof r.error=="function"?await r.error(c):r.error,h=typeof r.description=="function"?await r.description(c):r.description,g=typeof d=="object"&&!z.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:h,...g})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),f=()=>new Promise((c,d)=>u.then(()=>s[0]==="reject"?d(s[1]):c(s[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:f}:Object.assign(n,{unwrap:f})},this.custom=(t,r)=>{const n=r?.id||K1++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const en=new Ele,Ale=(e,t)=>{const r=t?.id||K1++;return en.addToast({title:e,...t,id:r}),r},Ple=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Nle=Ale,Cle=()=>en.toasts,Tle=()=>en.getActiveToasts(),kle=Object.assign(Nle,{success:en.success,info:en.info,warning:en.warning,error:en.error,custom:en.custom,message:en.message,promise:en.promise,dismiss:en.dismiss,loading:en.loading},{getHistory:Cle,getToasts:Tle});jle("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const Rle=[{id:"1-251201",productName:"Whole Milk",category:"Dairy",template:'2"x2" Basic',printedAt:"2024-03-20 09:30 AM",printedBy:"Alice Johnson",location:"Downtown Store (101)",expiryDate:"2024-03-27",status:"Valid"},{id:"2-251201",productName:"Ground Beef",category:"Meat",template:'2"x2" Basic',printedAt:"2024-03-20 10:15 AM",printedBy:"Bob Smith",location:"Uptown Store (102)",expiryDate:"2024-03-23",status:"Valid"},{id:"3-251201",productName:"Croissant",category:"Bakery",template:'2"x2" Basic',printedAt:"2024-03-19 14:00 PM",printedBy:"Charlie Brown",location:"Downtown Store (101)",expiryDate:"2024-03-20",status:"Expired"},{id:"4-251201",productName:"Caesar Salad",category:"Deli",template:`2"x6" G'n'G !!!`,printedAt:"2024-03-18 11:45 AM",printedBy:"Alice Johnson",location:"Downtown Store (101)",expiryDate:"2024-03-21",status:"Expiring Soon"},{id:"5-251201",productName:"Orange Juice",category:"Beverage",template:'2"x2" Basic',printedAt:"2024-03-18 08:20 AM",printedBy:"Bob Smith",location:"Airport Kiosk (201)",expiryDate:"2024-03-25",status:"Valid"}],Mle=[{name:"Dairy",count:450},{name:"Meat",count:320},{name:"Bakery",count:280},{name:"Deli",count:190},{name:"Produce",count:150},{name:"Beverage",count:120}],Ile=[{date:"Mon",count:120},{date:"Tue",count:132},{date:"Wed",count:101},{date:"Thu",count:134},{date:"Fri",count:190},{date:"Sat",count:230},{date:"Sun",count:210}];function Dle(){const[e,t]=P.useState("print-log"),r=n=>{kle.success(`Reprinting label ${n}`,{description:"Watermark 'RePrint' applied."})};return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsxs("div",{className:"pb-4",children:[p.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"loc-12345",children:[p.jsx(nt,{className:"w-[160px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"loc-12345",children:"Downtown Store"}),p.jsx(Ae,{value:"all",children:"All Locations"})]})]}),p.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[p.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Period Search:"}),p.jsxs("div",{className:"flex items-center bg-white border border-gray-300 rounded-md h-10 px-2",style:{minHeight:40},children:[p.jsx(vB,{className:"w-4 h-4 text-gray-500 mr-2 shrink-0"}),p.jsx("input",{type:"date",className:"text-sm outline-none w-32 bg-transparent"}),p.jsx("span",{className:"mx-2 text-gray-400",children:"-"}),p.jsx("input",{type:"date",className:"text-sm outline-none w-32 bg-transparent"})]})]}),p.jsxs("div",{className:"flex items-center w-64 rounded-md border border-gray-300 bg-white overflow-hidden shrink-0",style:{height:40},children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-3 pointer-events-none"}),p.jsx(Be,{placeholder:"Search Product or Category...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full placeholder:text-gray-500"})]}),p.jsx("div",{className:"flex-1 min-w-2"}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Y1,{className:"w-4 h-4"})," Export Report"]})]}),p.jsx("div",{className:"w-full border-b border-gray-200 mt-4",children:p.jsxs("div",{className:"flex overflow-x-auto w-fit",children:[p.jsx("button",{onClick:()=>t("print-log"),style:e==="print-log"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e==="print-log"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:"Print Log"}),p.jsx("button",{onClick:()=>t("label-report"),style:e==="label-report"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e==="label-report"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:"Label Report"})]})})]}),p.jsxs("div",{className:"flex-1 overflow-auto pt-6",children:[e==="print-log"&&p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Label ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Category"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Template"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Printed At"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Printed By"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Expiry Date"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Action"})]})}),p.jsx(_r,{children:Rle.map(n=>p.jsxs(Qe,{children:[p.jsx(de,{className:"border-r font-numeric text-gray-600",children:n.id}),p.jsx(de,{className:"border-r font-medium",children:n.productName}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{variant:"secondary",className:"bg-blue-50 text-blue-700 hover:bg-blue-50 border-blue-200",children:n.category})}),p.jsx(de,{className:"border-r text-gray-600 text-sm",children:(()=>{const i=n.template.endsWith(" !!!"),a=i?n.template.slice(0,-4):n.template,s=a.lastIndexOf(" "),u=a.slice(0,s+1),f=a.slice(s+1);return p.jsxs(p.Fragment,{children:[u,p.jsx("span",{className:"font-bold text-gray-900",children:f}),i&&p.jsx("span",{className:"text-red-600",children:" !!!"})]})})()}),p.jsx(de,{className:"border-r text-gray-600 text-sm font-numeric",children:n.printedAt}),p.jsx(de,{className:"border-r text-gray-600 text-sm",children:n.printedBy}),p.jsx(de,{className:"border-r text-gray-600 text-sm font-numeric",children:n.location}),p.jsx(de,{className:"border-r",children:p.jsx("span",{className:Ie("text-sm font-medium font-numeric",n.status==="Expired"?"text-red-600":n.status==="Expiring Soon"?"text-orange-500":"text-green-600"),children:n.expiryDate})}),p.jsx(de,{className:"text-center",children:p.jsxs(Ne,{size:"sm",variant:"outline",className:"h-8 gap-1 hover:bg-gray-100 border-gray-300",onClick:()=>r(n.id),children:[p.jsx(mR,{className:"w-3 h-3"})," Reprint"]})})]},n.id))})]})}),e==="label-report"&&p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Total Labels Printed"}),p.jsx(uc,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"2,543"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+20.1% from last month"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Most Printed Category"}),p.jsx(yB,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"Dairy"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"450 labels generated"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Top Product"}),p.jsx(fR,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"Whole Milk"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"182 labels generated"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Avg. Daily Prints"}),p.jsx(i8,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"85"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+12% from last week"})]})]})]}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[p.jsxs(Ir,{className:"col-span-1",children:[p.jsxs(yn,{children:[p.jsx(xn,{children:"Labels by Category"}),p.jsx(Id,{children:"Distribution of printed labels across product categories."})]}),p.jsx(tn,{className:"h-[300px]",children:p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(sre,{data:Mle,children:[p.jsx(Rh,{strokeDasharray:"3 3",vertical:!1}),p.jsx(qa,{dataKey:"name",fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Ua,{fontSize:12,tickLine:!1,axisLine:!1,tickFormatter:n=>`${n}`}),p.jsx(Dr,{}),p.jsx(to,{dataKey:"count",fill:"#facc15",radius:[4,4,0,0]})]})})})]}),p.jsxs(Ir,{className:"col-span-1",children:[p.jsxs(yn,{children:[p.jsx(xn,{children:"Print Volume Trends"}),p.jsx(Id,{children:"Daily label printing volume for the last 7 days."})]}),p.jsx(tn,{className:"h-[300px]",children:p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(yL,{data:Ile,children:[p.jsx(Rh,{strokeDasharray:"3 3",vertical:!1}),p.jsx(qa,{dataKey:"date",fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Ua,{fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Dr,{}),p.jsx(qs,{type:"monotone",dataKey:"count",stroke:"#dc2626",strokeWidth:2,dot:{r:4},activeDot:{r:6}})]})})})]})]}),p.jsxs(Ir,{children:[p.jsx(yn,{children:p.jsx(xn,{children:"Most Used Products"})}),p.jsx(tn,{children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{children:[p.jsx(ge,{children:"Product Name"}),p.jsx(ge,{children:"Category"}),p.jsx(ge,{className:"text-right",children:"Total Printed"}),p.jsx(ge,{className:"text-right",children:"Usage %"})]})}),p.jsxs(_r,{children:[p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium",children:"Whole Milk"}),p.jsx(de,{children:"Dairy"}),p.jsx(de,{className:"text-right",children:"182"}),p.jsx(de,{className:"text-right",children:"7.2%"})]}),p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium",children:"Ground Beef 80/20"}),p.jsx(de,{children:"Meat"}),p.jsx(de,{className:"text-right",children:"145"}),p.jsx(de,{className:"text-right",children:"5.7%"})]}),p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium",children:"Chicken Breast"}),p.jsx(de,{children:"Meat"}),p.jsx(de,{className:"text-right",children:"132"}),p.jsx(de,{className:"text-right",children:"5.2%"})]}),p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium",children:"Sliced Ham"}),p.jsx(de,{children:"Deli"}),p.jsx(de,{className:"text-right",children:"98"}),p.jsx(de,{className:"text-right",children:"3.8%"})]})]})]})})]})]})]})]})}const Lle=[{id:"12345",name:"Downtown Store",street:"123 Main St",city:"New York",state:"NY",country:"USA",zipCode:"10001",phone:"+1 (555) 123-4567",email:"downtown@example.com",gps:"40.7128° N, 74.0060° W",status:"active"},{id:"12335",name:"Uptown Market",street:"456 High St",city:"New York",state:"NY",country:"USA",zipCode:"10002",phone:"+1 (555) 987-6543",email:"uptown@example.com",gps:"40.7580° N, 73.9855° W",status:"active"},{id:"12445",name:"Airport Kiosk",street:"Terminal 4, JFK Airport",city:"Jamaica",state:"NY",country:"USA",zipCode:"11430",phone:"+1 (555) 555-5555",email:"jfk@example.com",gps:"40.6413° N, 73.7781° W",status:"active"},{id:"12555",name:"Suburban Outlet",street:"789 Country Rd",city:"Long Island",state:"NY",country:"USA",zipCode:"11901",phone:"+1 (555) 111-2222",email:"suburb@example.com",gps:"40.8500° N, 73.2000° W",status:"inactive"}];function $le(){const[e,t]=P.useState(!1),[r,n]=P.useState(Lle);return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsx("div",{className:"pb-4",children:p.jsx("div",{className:"flex flex-col gap-4",children:p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"border border-gray-300 rounded-md w-40 shrink-0 bg-white placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-1",children:"Location 1"})]})]}),p.jsx("div",{className:"flex-1"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Import"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Export"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Edit"}),p.jsx(Ne,{className:"h-10 bg-blue-600 hover:bg-blue-700 text-white rounded-md px-6 font-medium shrink-0",onClick:()=>t(!0),children:"New+"})]})})}),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Street"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"City"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"State"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Country"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Zip Code"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Phone"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Email"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"GPS"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(i=>p.jsxs(Qe,{children:[p.jsx(de,{className:"border-r font-numeric text-gray-600",children:i.id}),p.jsx(de,{className:"border-r font-medium text-black",children:i.name}),p.jsx(de,{className:"border-r text-gray-600 max-w-[140px] truncate",children:i.street}),p.jsx(de,{className:"border-r text-gray-600",children:i.city}),p.jsx(de,{className:"border-r text-gray-600",children:i.state}),p.jsx(de,{className:"border-r text-gray-600",children:i.country}),p.jsx(de,{className:"border-r text-gray-600 font-numeric",children:i.zipCode}),p.jsx(de,{className:"border-r text-gray-600 whitespace-nowrap",children:i.phone}),p.jsx(de,{className:"border-r text-gray-600 text-sm",children:i.email}),p.jsx(de,{className:"border-r text-gray-500 font-numeric text-xs",children:i.gps}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(hR,{className:"h-4 w-4 text-gray-500"})})})]},i.id))})]})})}),p.jsx(Ble,{open:e,onOpenChange:t})]})}function Ble({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Location"}),p.jsx(au,{children:"Enter the details for the new store location."})]}),p.jsxs("div",{className:"grid gap-4 py-4",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Partner"}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{children:p.jsx(rt,{})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Group"}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{children:p.jsx(rt,{})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]})]})]}),p.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[p.jsxs("div",{className:"space-y-2 col-span-1",children:[p.jsx(je,{children:"Location ID"}),p.jsx(Be,{placeholder:"e.g. 12345"})]}),p.jsxs("div",{className:"space-y-2 col-span-2",children:[p.jsx(je,{children:"Location Name"}),p.jsx(Be,{placeholder:"e.g. Downtown Store"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Street"}),p.jsx(Be,{placeholder:"e.g. 123 Main St"})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"City"}),p.jsx(Be,{placeholder:"e.g. New York"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"State"}),p.jsx(Be,{placeholder:"e.g. NY"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Country"}),p.jsx(Be,{placeholder:"e.g. USA"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Zip Code"}),p.jsx(Be,{placeholder:"e.g. 10001"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Phone Number"}),p.jsx(Be,{placeholder:"+1 (555) 000-0000"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Email"}),p.jsx(Be,{placeholder:"store@example.com"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(je,{className:"flex items-center gap-2",children:[p.jsx(Gh,{className:"w-4 h-4"})," GPS Coordinates"]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Be,{placeholder:"Latitude (e.g. 40.7128)"}),p.jsx(Be,{placeholder:"Longitude (e.g. -74.0060)"})]})]}),p.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[p.jsx(no,{id:"loc-status",defaultChecked:!0}),p.jsx(je,{htmlFor:"loc-status",children:"Active Location"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Create Location"})]})]})})}function zle(){const[e,t]=P.useState("Dashboard"),r=()=>{switch(e){case"Dashboard":return p.jsx(fre,{});case"Training":return p.jsx(Bse,{});case"Alerts":return p.jsx(qse,{});case"Menu Manager":return p.jsx(cle,{});case"Account Management":return p.jsx(ble,{});case"Reports":return p.jsx(Dle,{});case"Location Manager":return p.jsx($le,{});case"Labels":case"Label Categories":case"Label Types":case"Label Templates":case"Multiple Options":return p.jsx($se,{currentView:e,onViewChange:t});default:return p.jsx(dre,{title:e})}};return p.jsx(Oz,{currentView:e,setCurrentView:t,children:r()})}Q5.createRoot(document.getElementById("root")).render(p.jsx(zle,{})); + linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px)`:void 0,backgroundSize:L?`${lc}px ${lc}px`:void 0,pointerEvents:S?"none":"auto"},onPointerDown:M=>{const $=M.target,Q=$.closest('[id^="element-"]'),ae=$.closest('[title*="拖拽拉高"]')||$.closest('[title*="拖拽拉宽"]');h.current?.contains($)&&!Q&&!ae&&!m.current&&!g.current&&(M.preventDefault(),M.stopPropagation(),C(!0),R.current={x:N.x,y:N.y,startX:M.clientX,startY:M.clientY},A.current={x:M.clientX,y:M.clientY,scrollLeft:d.current?.scrollLeft??0,scrollTop:d.current?.scrollTop??0},M.currentTarget.setPointerCapture?.(M.pointerId))},onPointerMove:H,onPointerUp:V,onKeyDown:K,children:[e.showRuler&&p.jsxs("div",{className:"absolute top-0 left-0 right-0 h-5 border-b border-gray-300 bg-gray-50 text-[10px] text-gray-500 flex items-center px-1 pointer-events-none select-none",children:[e.unit," ",e.width," × ",e.height]}),a&&p.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-3 cursor-ns-resize flex items-center justify-center bg-gray-200/80 hover:bg-blue-400/30 border-t border-gray-300 text-[10px] text-gray-500 transition-colors",title:"拖拽拉高纸张",onPointerDown:M=>{M.stopPropagation(),b.current={edge:"bottom",startX:M.clientX,startY:M.clientY,startW:e.width,startH:e.height},M.target.setPointerCapture?.(M.pointerId)},children:"⋮"}),a&&p.jsx("div",{className:"absolute top-0 right-0 bottom-0 w-3 cursor-ew-resize flex items-center justify-center bg-gray-200/80 hover:bg-blue-400/30 border-l border-gray-300 text-[10px] text-gray-500 transition-colors",title:"拖拽拉宽纸张",onPointerDown:M=>{M.stopPropagation(),b.current={edge:"right",startX:M.clientX,startY:M.clientY,startW:e.width,startH:e.height},M.target.setPointerCapture?.(M.pointerId)},children:"⋮"}),e.elements.map(M=>p.jsxs("div",{id:`element-${M.id}`,className:Ie("absolute box-border cursor-move overflow-hidden transition-shadow",M.border==="line"&&"border border-gray-400",M.border==="dotted"&&"border border-dotted border-gray-400",t===M.id&&"ring-2 ring-blue-500 ring-offset-1 z-10"),style:{left:M.x,top:M.y,width:M.width,height:M.height},onClick:$=>{$.stopPropagation(),r(M.id)},onPointerDown:$=>D($,M.id),children:[p.jsx(h3,{el:M}),t===M.id&&p.jsxs(p.Fragment,{children:[["nw","ne","sw","se"].map($=>p.jsx("div",{className:"absolute w-4 h-4 bg-white border-2 border-blue-500 rounded-full z-20 shadow-md hover:scale-110 transition-transform",style:{cursor:"nwse-resize",top:$.startsWith("n")?-6:void 0,bottom:$.startsWith("s")?-6:void 0,left:$.endsWith("w")?-6:void 0,right:$.endsWith("e")?-6:void 0},onPointerDown:Q=>{Q.stopPropagation();const ae=e.elements.find(pe=>pe.id===M.id);g.current={id:M.id,corner:$,startX:Q.clientX,startY:Q.clientY,w:ae.width,h:ae.height,elX:ae.x,elY:ae.y},Q.currentTarget.setPointerCapture?.(Q.pointerId)}},$)),["n","s","w","e"].map($=>p.jsx("div",{className:"absolute bg-blue-500/50 border border-white/50 rounded-sm z-10 shadow-sm hover:bg-blue-600",style:{cursor:$==="n"||$==="s"?"ns-resize":"ew-resize",width:$==="n"||$==="s"?"20px":"6px",height:$==="n"||$==="s"?"6px":"20px",top:$==="n"?-3:$==="s"?void 0:"50%",bottom:$==="s"?-3:void 0,left:$==="w"?-3:$==="e"?void 0:"50%",right:$==="e"?-3:void 0,transform:$==="n"||$==="s"?"translateX(-50%)":"translateY(-50%)"},onPointerDown:Q=>{Q.stopPropagation();const ae=e.elements.find(ye=>ye.id===M.id),pe=document.getElementById(`element-${M.id}`);pe&&pe.classList.add("z-50","opacity-90"),g.current={id:M.id,corner:$,startX:Q.clientX,startY:Q.clientY,w:ae.width,h:ae.height,elX:ae.x,elY:ae.y},Q.currentTarget.setPointerCapture?.(Q.pointerId)}},$))]})]},M.id))]})})})]})}function xse({template:e,maxWidth:t=480}){const r=Hh(e.width,e.unit),n=Hh(e.height,e.unit),i=t?Math.min(t/r,t/n,2):1,a=r*i,s=n*i;return p.jsx("div",{className:"flex items-center justify-center p-4 bg-gray-100 rounded",children:p.jsx("div",{style:{width:a,height:s},className:"relative bg-white shadow-lg overflow-hidden",children:p.jsx("div",{className:"origin-top-left",style:{position:"absolute",left:0,top:0,width:r,height:n,transform:`scale(${i})`,transformOrigin:"0 0"},children:e.elements.map(u=>p.jsx("div",{className:"absolute box-border overflow-hidden pointer-events-none flex items-center justify-center text-xs",style:{left:u.x,top:u.y,width:u.width,height:u.height,border:u.border==="line"?"1px solid #999":u.border==="dotted"?"1px dotted #999":void 0},children:p.jsx(h3,{el:u})},u.id))})})})}var bse=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wse=bse.reduce((e,t)=>{const r=nw(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),_se="Label",p3=P.forwardRef((e,t)=>p.jsx(wse.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));p3.displayName=_se;var Sse=p3;function we({className:e,...t}){return p.jsx(Sse,{"data-slot":"label",className:Ie("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var Vp="Switch",[Ose]=gi(Vp),[jse,Ese]=Ose(Vp),m3=P.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:a,required:s,disabled:u,value:f="on",onCheckedChange:c,form:d,...h}=e,[m,g]=P.useState(null),b=Je(t,E=>g(E)),y=P.useRef(!1),w=m?d||!!m.closest("form"):!0,[S,O]=Ha({prop:i,defaultProp:a??!1,onChange:c,caller:Vp});return p.jsxs(jse,{scope:r,checked:S,disabled:u,children:[p.jsx(We.button,{type:"button",role:"switch","aria-checked":S,"aria-required":s,"data-state":x3(S),"data-disabled":u?"":void 0,disabled:u,value:f,...h,ref:b,onClick:Fe(e.onClick,E=>{O(C=>!C),w&&(y.current=E.isPropagationStopped(),y.current||E.stopPropagation())})}),w&&p.jsx(y3,{control:m,bubbles:!y.current,name:n,value:f,checked:S,required:s,disabled:u,form:d,style:{transform:"translateX(-100%)"}})]})});m3.displayName=Vp;var v3="SwitchThumb",g3=P.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,i=Ese(v3,r);return p.jsx(We.span,{"data-state":x3(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:t})});g3.displayName=v3;var Ase="SwitchBubbleInput",y3=P.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...i},a)=>{const s=P.useRef(null),u=Je(s,a),f=__(r),c=y_(t);return P.useEffect(()=>{const d=s.current;if(!d)return;const h=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(h,"checked").set;if(f!==r&&g){const b=new Event("click",{bubbles:n});g.call(d,r),d.dispatchEvent(b)}},[f,r,n]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:u,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});y3.displayName=Ase;function x3(e){return e?"checked":"unchecked"}var Pse=m3,Nse=g3;function no({className:e,...t}){return p.jsx(Pse,{"data-slot":"switch",className:Ie("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(Nse,{"data-slot":"switch-thumb",className:Ie("bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function Cse({template:e,selectedElement:t,onTemplateChange:r,onElementChange:n,onDeleteElement:i}){return t?p.jsxs("div",{className:"w-72 shrink-0 border-l border-gray-200 bg-white flex flex-col h-full",children:[p.jsx("div",{className:"px-3 py-2 border-b border-gray-200 font-semibold text-gray-800",children:"Properties (Element)"}),p.jsx(fc,{className:"flex-1",children:p.jsxs("div",{className:"p-3 space-y-3",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"X"}),p.jsx($e,{type:"number",value:t.x,onChange:a=>n(t.id,{x:Number(a.target.value)||0}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Y"}),p.jsx($e,{type:"number",value:t.y,onChange:a=>n(t.id,{y:Number(a.target.value)||0}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Width"}),p.jsx($e,{type:"number",value:t.width,onChange:a=>n(t.id,{width:Math.max(1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Height"}),p.jsx($e,{type:"number",value:t.height,onChange:a=>n(t.id,{height:Math.max(1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Rotation"}),p.jsxs(tt,{value:t.rotation,onValueChange:a=>n(t.id,{rotation:a}),children:[p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"horizontal",children:"horizontal"}),p.jsx(Ae,{value:"vertical",children:"vertical"})]})]})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Border"}),p.jsxs(tt,{value:t.border,onValueChange:a=>n(t.id,{border:a}),children:[p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"none",children:"none"}),p.jsx(Ae,{value:"line",children:"line"}),p.jsx(Ae,{value:"dotted",children:"dotted"})]})]})]}),p.jsx(Tse,{element:t,onChange:a=>n(t.id,{config:{...t.config,...a}})}),i&&p.jsx("div",{className:"pt-4 border-t border-gray-100",children:p.jsx(Ne,{variant:"destructive",className:"w-full",onClick:()=>i(t.id),children:"Delete Element"})})]})})]}):p.jsxs("div",{className:"w-72 shrink-0 border-l border-gray-200 bg-white flex flex-col h-full",children:[p.jsx("div",{className:"px-3 py-2 border-b border-gray-200 font-semibold text-gray-800",children:"Properties (Template)"}),p.jsx(fc,{className:"flex-1",children:p.jsxs("div",{className:"p-3 space-y-3",children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Template Name"}),p.jsx($e,{value:e.name,onChange:a=>r({name:a.target.value}),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Label Type"}),p.jsxs(tt,{value:e.labelType,onValueChange:a=>r({labelType:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"PRICE",children:"PRICE"}),p.jsx(Ae,{value:"NUTRITION",children:"NUTRITION"}),p.jsx(Ae,{value:"SHIPPING",children:"SHIPPING"})]})]})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Applied Location"}),p.jsxs(tt,{value:e.appliedLocation,onValueChange:a=>r({appliedLocation:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"ALL",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Width"}),p.jsx($e,{type:"number",value:e.width,onChange:a=>r({width:Math.max(.1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Height"}),p.jsx($e,{type:"number",value:e.height,onChange:a=>r({height:Math.max(.1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Unit"}),p.jsxs(tt,{value:e.unit,onValueChange:a=>r({unit:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"cm",children:"cm"}),p.jsx(Ae,{value:"inch",children:"inch"})]})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{checked:e.showRuler,onCheckedChange:a=>r({showRuler:a})}),p.jsx(we,{className:"text-xs",children:"Show Ruler"})]})]})})]})}function Tse({element:e,onChange:t}){const r=e.config,n=(i,a)=>t({[i]:a});switch(e.type){case"TEXT_STATIC":case"TEXT_PRODUCT":case"TEXT_PRICE":return p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Text"}),p.jsx($e,{value:r.text??"",onChange:i=>n("text",i.target.value),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Font Size"}),p.jsx($e,{type:"number",value:r.fontSize??14,onChange:i=>n("fontSize",Number(i.target.value)||14),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Text Align"}),p.jsxs(tt,{value:r.textAlign??"left",onValueChange:i=>n("textAlign",i),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"left",children:"Left"}),p.jsx(Ae,{value:"center",children:"Center"}),p.jsx(Ae,{value:"right",children:"Right"})]})]})]})]});case"BARCODE":return p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Data"}),p.jsx($e,{value:r.data??"",onChange:i=>n("data",i.target.value),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"方向"}),p.jsxs(tt,{value:r.orientation??"horizontal",onValueChange:i=>n("orientation",i),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"horizontal",children:"水平"}),p.jsx(Ae,{value:"vertical",children:"竖排"})]})]})]})]});case"QRCODE":return p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Data (URL)"}),p.jsx($e,{value:r.data??"",onChange:i=>n("data",i.target.value),className:"h-8 text-sm mt-1"})]});case"WEIGHT":return p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Value"}),p.jsx($e,{type:"number",value:r.value??0,onChange:i=>n("value",Number(i.target.value)||0),className:"h-8 text-sm mt-1"})]});default:return p.jsxs("div",{className:"text-xs text-gray-500",children:["Config for ",e.type," (edit in code if needed)"]})}}const kse=.5,Rse=2,lR=.25,Mse=1;function Ise({templateId:e,initialTemplate:t,onClose:r,onSaved:n}){const[i,a]=P.useState(()=>t?{...t}:Hae(e??void 0)),[s,u]=P.useState(null),[f,c]=P.useState(Mse),[d,h]=P.useState(!1),m=i.elements.find(E=>E.id===s)??null,g=P.useCallback((E,C)=>{const A=Vae(E,30,30);C&&Object.keys(C).length>0&&(A.config={...A.config,...C}),a(N=>({...N,elements:[...N.elements,A]})),u(A.id)},[]),b=P.useCallback((E,C)=>{a(A=>({...A,elements:A.elements.map(N=>N.id===E?{...N,...C}:N)}))},[]),y=P.useCallback(E=>{a(C=>({...C,elements:C.elements.filter(A=>A.id!==E)})),u(null)},[]),w=P.useCallback(E=>{a(C=>({...C,...E}))},[]),S=P.useCallback(()=>{Kae(i),n(),r()},[i,n,r]),O=P.useCallback(()=>{const E=new Blob([JSON.stringify(i,null,2)],{type:"application/json"}),C=URL.createObjectURL(E),A=document.createElement("a");A.href=C,A.download=`label-template-${i.id}.json`,A.click(),URL.revokeObjectURL(C)},[i]);return p.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200 bg-white shrink-0",children:[p.jsxs(Ne,{variant:"outline",size:"sm",onClick:r,children:[p.jsx(sB,{className:"w-4 h-4 mr-1"}),"Back"]}),p.jsx("span",{className:"text-sm font-medium text-gray-700 truncate flex-1",children:i.name}),p.jsxs(Ne,{size:"sm",onClick:O,variant:"outline",children:[p.jsx(Y1,{className:"w-4 h-4 mr-1"}),"Export JSON"]}),p.jsxs(Ne,{size:"sm",className:"bg-blue-600 hover:bg-blue-700 text-white",onClick:S,children:[p.jsx(o8,{className:"w-4 h-4 mr-1"}),"Save"]})]}),p.jsxs("div",{className:"flex flex-1 min-h-0",children:[p.jsx(woe,{onAddElement:g}),p.jsx(yse,{template:i,selectedId:s,onSelect:u,onUpdateElement:b,onDeleteElement:y,onTemplateChange:w,scale:f,onZoomIn:()=>c(E=>Math.min(Rse,E+lR)),onZoomOut:()=>c(E=>Math.max(kse,E-lR)),onPreview:()=>h(!0)}),p.jsx(na,{open:d,onOpenChange:h,children:p.jsxs(ia,{className:"max-w-[90vw] max-h-[90vh] overflow-auto",children:[p.jsx(aa,{children:p.jsx(oa,{children:"标签预览"})}),p.jsx(xse,{template:i,maxWidth:500})]})}),p.jsx(Cse,{template:i,selectedElement:m,onTemplateChange:w,onElementChange:b,onDeleteElement:y})]})]})}function Dse(){const[e,t]=P.useState(()=>ak()),[r,n]=P.useState("list"),[i,a]=P.useState(null),[s,u]=P.useState(""),[f,c]=P.useState("all"),d=P.useCallback(()=>{t(ak())},[]);P.useEffect(()=>{r==="list"&&d()},[r,d]);const h=e.filter(y=>{const w=!s||y.name.toLowerCase().includes(s.toLowerCase()),S=f==="all"||y.appliedLocation===f;return w&&S}),m=()=>{},g=y=>{a(y),n("editor")},b=()=>{n("list"),a(null)};if(r==="editor"){const y=i?T$(i):null;return p.jsx("div",{className:"h-[calc(100vh-8rem)] min-h-[500px] flex flex-col",children:p.jsx(Ise,{templateId:i,initialTemplate:y,onClose:b,onSaved:d})})}return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500",value:s,onChange:y=>u(y.target.value)}),p.jsxs(tt,{value:f,onValueChange:c,children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"ALL",children:"ALL"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",onClick:m,children:["New Label Template ",p.jsx(Ur,{className:"ml-1 w-4 h-4"})]})]}),p.jsxs("div",{className:"text-red-600 font-bold italic text-sm md:text-base",children:["***One or more templates have incomplete labels attached to them.",p.jsx("br",{}),"Go to Labels view to see which labels are missing fields."]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[180px]",children:"Label Template"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[120px]",children:"Location"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Contents"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[150px]",children:"Size"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[100px]",children:"Actions"})]})}),p.jsx(_r,{children:h.length===0?p.jsx(Qe,{children:p.jsx(fe,{colSpan:5,className:"text-center text-gray-500 py-8",children:'No templates yet. Click "New Label Template" to create one.'})}):h.map(y=>p.jsxs(Qe,{className:"hover:bg-gray-50 cursor-pointer",onClick:()=>g(y.id),children:[p.jsx(fe,{className:"font-medium",children:y.name}),p.jsx(fe,{children:y.appliedLocation}),p.jsxs(fe,{className:"text-sm text-gray-600",children:[y.elements.length," element(s)"]}),p.jsxs(fe,{children:[y.width,"×",y.height," ",y.unit]}),p.jsx(fe,{onClick:w=>w.stopPropagation(),children:p.jsxs(Ne,{variant:"outline",size:"sm",onClick:()=>g(y.id),children:[p.jsx(jd,{className:"w-3 h-3 mr-1"}),"Edit"]})})]},y.id))})]})})]})}function Lse(){const e=[{id:1,name:"Prepped By",contents:"A. Smith; B. Doe; C. Borne",lastEdited:"2025.12.03.11:45"},{id:2,name:"Checked By",contents:"D. Manager; E. Supervisor",lastEdited:"2025.12.04.09:30"},{id:3,name:"Allergens",contents:"Peanuts; Dairy; Gluten; Soy",lastEdited:"2025.12.05.14:15"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Multiple Options ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"Multiple Option Name"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Contents"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[180px]",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(fe,{className:"font-medium",children:t.name}),p.jsx(fe,{className:"text-gray-600",children:t.contents}),p.jsx(fe,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function $se({currentView:e="Labels",onViewChange:t}){const r=["Labels","Label Categories","Label Types","Label Templates","Multiple Options"],n=i=>{t&&t(i)};return p.jsxs("div",{className:"space-y-6",children:[p.jsx("div",{className:"w-full border-b border-gray-200",children:p.jsx("div",{className:"flex overflow-x-auto bg-white",children:r.map(i=>p.jsx("div",{onClick:()=>n(i),style:e===i?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px ${e===i?"text-blue-600":"border-b-2 border-b-transparent text-gray-600 hover:text-gray-800"}`,children:i},i))})}),p.jsxs("div",{className:"min-h-[400px]",children:[e==="Labels"&&p.jsx($ae,{}),e==="Label Categories"&&p.jsx(Bae,{}),e==="Label Types"&&p.jsx(zae,{}),e==="Label Templates"&&p.jsx(Dse,{}),e==="Multiple Options"&&p.jsx(Lse,{}),!["Labels","Label Categories","Label Types","Label Templates","Multiple Options"].includes(e)&&p.jsxs("div",{className:"flex items-center justify-center h-64 text-gray-400",children:[e," content coming soon..."]})]})]})}function Bse(){const[e,t]=P.useState([{id:"1",name:"Pop",isOpen:!0,subcategories:[{id:"1-1",name:"2024",isOpen:!0,files:[{id:"f1",name:"uuuuu",date:"10/23/24, 12:21 AM",type:"image"},{id:"f2",name:"664EF167-DFCE-49C1-A417-DC09FEDF78D7.jpg",date:"11/24/25, 8:40 PM",type:"image"}]}]},{id:"2",name:"Training",isOpen:!0,subcategories:[{id:"2-1",name:"BOH",isOpen:!1,files:[]},{id:"2-2",name:"FOH",isOpen:!0,files:[]}]},{id:"3",name:"ww",isOpen:!1,subcategories:[]}]),r=i=>{t(a=>a.map(s=>s.id===i?{...s,isOpen:!s.isOpen}:s))},n=(i,a)=>{t(s=>s.map(u=>u.id!==i?u:{...u,subcategories:u.subcategories.map(f=>f.id===a?{...f,isOpen:!f.isOpen}:f)}))};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx($e,{className:"bg-white border border-black rounded-md h-10 w-[150px]"}),p.jsx("span",{className:"text-sm text-black whitespace-nowrap",children:"Search"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-black rounded-md h-10 w-[100px]",children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"all"}),p.jsx(Ae,{value:"loc-a",children:"Location A"})]})]}),p.jsx("span",{className:"text-sm text-black whitespace-nowrap",children:"Location"})]})]}),p.jsxs("div",{className:"bg-gray-100 p-2 flex justify-between items-center border-b border-gray-200",children:[p.jsx("h1",{className:"text-xl font-medium text-gray-700",children:"Information"}),p.jsxs("div",{className:"flex items-center gap-4 text-gray-600",children:[p.jsx("div",{className:"flex items-center gap-1 bg-gray-700 text-white text-[10px] px-1 py-0.5 rounded-sm font-bold",children:"NEW"}),p.jsx(h8,{className:"h-5 w-5"}),p.jsx("span",{className:"font-medium",children:"55789"})]})]}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("button",{className:"w-full bg-[#2c7bb6] hover:bg-[#256b9e] text-white py-2 px-4 flex items-center gap-2 text-sm font-medium rounded-sm",children:[p.jsx(Ur,{className:"h-4 w-4"}),"New Category",p.jsx(cb,{className:"h-4 w-4 opacity-70"})]}),p.jsx("div",{className:"space-y-4",children:e.map(i=>p.jsxs("div",{className:"border border-gray-300 rounded-sm overflow-hidden",children:[p.jsxs("div",{className:"bg-gradient-to-b from-gray-50 to-gray-100 border-b border-gray-200 p-2 flex items-center justify-between",children:[p.jsxs("button",{onClick:()=>r(i.id),className:"flex items-center gap-2 text-gray-700 font-medium text-sm flex-1 text-left",children:[i.isOpen?p.jsx(cc,{className:"h-4 w-4 text-[#2c7bb6]"}):p.jsx(Cd,{className:"h-4 w-4 text-[#2c7bb6]"}),i.name]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:p.jsx(jd,{className:"h-4 w-4"})}),p.jsx("button",{className:"text-red-400 hover:text-red-600",children:p.jsx(ec,{className:"h-4 w-4"})})]})]}),i.isOpen&&p.jsxs("div",{className:"p-2 space-y-3 bg-white",children:[p.jsxs("button",{className:"w-full bg-[#2c7bb6] hover:bg-[#256b9e] text-white py-2 px-4 flex items-center gap-2 text-sm font-medium rounded-sm",children:[p.jsx(Ur,{className:"h-4 w-4"}),"New Subcategory",p.jsx(cb,{className:"h-4 w-4 opacity-70"})]}),p.jsxs("div",{className:"space-y-3",children:[i.subcategories.map(a=>p.jsxs("div",{className:"border border-gray-200 rounded-sm",children:[p.jsxs("div",{className:"bg-white border-b border-gray-200 p-2 flex items-center justify-between",children:[p.jsxs("button",{onClick:()=>n(i.id,a.id),className:"flex items-center gap-2 text-gray-700 font-medium text-sm flex-1 text-left",children:[a.isOpen?p.jsx(cc,{className:"h-4 w-4 text-[#2c7bb6]"}):p.jsx(Cd,{className:"h-4 w-4 text-[#2c7bb6]"}),a.name]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:p.jsx(jd,{className:"h-4 w-4"})}),p.jsx("button",{className:"text-red-400 hover:text-red-600",children:p.jsx(ec,{className:"h-4 w-4"})})]})]}),a.isOpen&&p.jsxs("div",{className:"p-3 bg-gray-50/50",children:[p.jsx("div",{className:"mb-2 text-xs font-bold text-gray-500 uppercase tracking-wide",children:"Files"}),p.jsxs("div",{className:"flex flex-wrap gap-2 mb-3 justify-end",children:[p.jsx(Ne,{size:"sm",className:"h-8 bg-[#4CAF50] hover:bg-[#43a047] text-white text-xs border-none rounded-sm",children:"Upload Your Own File(s)"}),p.jsx(Ne,{size:"sm",className:"h-8 bg-[#4CAF50] hover:bg-[#43a047] text-white text-xs border-none rounded-sm",children:"Create A Custom File"}),p.jsx(Ne,{size:"sm",className:"h-8 bg-[#2c7bb6] hover:bg-[#256b9e] text-white text-xs border-none rounded-sm",children:"Edit File Permissions"}),p.jsxs(Ne,{size:"sm",className:"h-8 bg-[#2c7bb6] hover:bg-[#256b9e] text-white text-xs border-none rounded-sm gap-1",children:["Sort (A-Z) ",p.jsx(cB,{className:"h-3 w-3"})]})]}),p.jsx("div",{className:"space-y-1",children:a.files.length>0?a.files.map(s=>p.jsxs("div",{className:"flex items-center bg-gray-200/50 p-2 border border-gray-200 rounded-sm text-sm hover:bg-gray-200 transition-colors",children:[p.jsx("div",{className:"flex-shrink-0 mr-3",children:s.type==="image"?p.jsx(Ia,{className:"h-5 w-5 text-[#2c7bb6]"}):p.jsx(uc,{className:"h-5 w-5 text-[#2c7bb6]"})}),p.jsx("div",{className:"flex-1 min-w-0",children:p.jsx("div",{className:"font-medium text-gray-700 truncate",children:s.name})}),p.jsx("div",{className:"text-xs text-gray-500 mr-4 whitespace-nowrap",children:s.date}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("button",{className:"p-1 text-gray-400 hover:text-gray-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(uc,{className:"h-3 w-3"})}),p.jsx("button",{className:"p-1 text-gray-400 hover:text-gray-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(jd,{className:"h-3 w-3"})}),p.jsx("button",{className:"p-1 text-red-400 hover:text-red-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(ec,{className:"h-3 w-3"})})]})]},s.id)):p.jsx("div",{className:"p-4 border-2 border-dashed border-gray-300 rounded-sm text-center text-gray-400 text-sm",children:"No files in this subcategory"})})]})]},a.id)),i.subcategories.length===0&&p.jsx("div",{className:"p-2 text-sm text-gray-400 italic",children:"No subcategories"})]})]})]},i.id))})]})]})}const zse=[{id:1,title:"Coffee - 2 hrs",subtitle:"1 min - Completes at 12:05 PM",totalTime:7200,remainingTime:0,status:"expired",icon:CB},{id:2,title:"Clean Tablet",subtitle:"1 hrs - Completes at 12:37 PM",totalTime:3600,remainingTime:237,status:"running",icon:v8},{id:3,title:"Replace Sanitizer Towels",subtitle:"1 hrs - Completes at 12:37 PM",totalTime:3600,remainingTime:238,status:"running",icon:Aj},{id:4,title:"Take Out Trash",subtitle:"1 hrs - Completes at 01:03 PM",totalTime:3600,remainingTime:58,status:"running",icon:Aj},{id:5,title:"Change Utensils",subtitle:"1 hrs - Completes at 01:03 PM",totalTime:3600,remainingTime:58,status:"running",icon:C8},{id:6,title:"Sanitize Surfaces",subtitle:"1 hrs - Completes at 02:00 PM",totalTime:3600,remainingTime:2157,status:"running",icon:Uv},{id:7,title:"Check Temperatures",subtitle:"1 hrs - Completes at 02:00 PM",totalTime:3600,remainingTime:2158,status:"running",icon:Uv},{id:8,title:"Ranch 4 hrs",subtitle:"4 hrs - Completes at 04:04 PM",totalTime:14400,remainingTime:2158,status:"running",icon:Uv}];function Fse({timer:e}){const t=(e.totalTime-e.remainingTime)/e.totalTime*100,r=e.remainingTime===0,n=i=>{if(i<=0)return"0s";const a=Math.floor(i/60),s=i%60;return`${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`};return p.jsxs("div",{className:"bg-gray-200 rounded-xl p-4 flex flex-col items-center relative shadow-sm h-[280px]",children:[p.jsxs("div",{className:"text-center mb-2",children:[p.jsx("h3",{className:"text-lg font-medium text-gray-800 leading-tight",children:e.title}),p.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.subtitle})]}),p.jsxs("div",{className:"relative w-32 h-32 my-auto flex items-center justify-center",children:[p.jsxs("svg",{className:"w-full h-full transform -rotate-90",children:[p.jsx("circle",{cx:"64",cy:"64",r:"56",stroke:"white",strokeWidth:"12",fill:"transparent"}),p.jsx("circle",{cx:"64",cy:"64",r:"56",stroke:r?"#ef4444":"#3b82f6",strokeWidth:"12",fill:"transparent",strokeDasharray:351.86,strokeDashoffset:r?0:351.86*(t/100),className:"transition-all duration-1000 ease-linear"})]}),p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[p.jsx("span",{className:Ie("text-3xl font-bold",r?"text-red-500":"text-gray-800"),children:r?"0s":n(e.remainingTime)}),p.jsx("span",{className:Ie("text-[10px] font-medium uppercase mt-1",r?"text-red-400":"text-gray-400"),children:"Remaining"})]})]}),p.jsxs("div",{className:"w-full flex justify-between items-end mt-2",children:[p.jsx(e8,{className:"w-5 h-5 text-blue-700 fill-current"}),p.jsx("div",{className:"flex flex-col items-center",children:p.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-300 flex items-center justify-center text-gray-400 mb-1",children:p.jsx(e.icon,{className:"w-5 h-5"})})}),p.jsx("div",{className:"flex flex-col items-end",children:p.jsx("span",{className:"text-xs text-blue-600 font-bold mb-2 cursor-pointer",children:"EDIT"})})]}),p.jsx("button",{className:"absolute bottom-12 right-4 bg-blue-600 rounded-full p-1 text-white hover:bg-blue-700 shadow-md",children:p.jsx(ec,{className:"w-4 h-4"})})]})}function qse(){const[e,t]=P.useState(!0);return p.jsxs("div",{className:"h-full flex flex-col bg-gray-50 relative",children:[p.jsxs("div",{className:"bg-white border-b border-gray-200 px-4 py-3 flex items-center justify-between shadow-sm z-10",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("button",{className:"flex items-center text-blue-500 text-lg font-medium",children:[p.jsx(_B,{className:"w-6 h-6"}),"Back"]}),p.jsx(XB,{className:"w-6 h-6 text-gray-500"})]}),p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"bg-blue-600 p-1.5 rounded-md",children:p.jsx(x8,{className:"w-5 h-5 text-white"})}),p.jsx("h1",{className:"text-xl font-bold text-blue-900",children:"Timers"})]}),p.jsxs("div",{className:"flex items-center gap-1 text-xs text-green-600 font-medium",children:[p.jsx("span",{children:"86016"}),p.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"})]})]}),p.jsxs("div",{className:"flex items-center gap-4 text-blue-500 font-medium",children:[p.jsx(A8,{className:"w-6 h-6 text-gray-400"}),p.jsxs("button",{className:"flex items-center gap-1",children:[p.jsx(Ur,{className:"w-5 h-5"}),"Add Timer"]})]})]}),p.jsxs("div",{className:"bg-gray-700 text-white px-6 py-2 flex items-center justify-between",children:[p.jsx("div",{className:"flex-1"})," ",p.jsx("div",{className:"font-medium",children:"Today, December 15"}),p.jsxs("div",{className:"flex-1 flex justify-end items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(LB,{className:"w-5 h-5 text-gray-300"}),p.jsx(WB,{className:"w-5 h-5 text-gray-500"})]}),p.jsx(nB,{className:"w-5 h-5 text-blue-400"})]})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:p.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:zse.map(r=>p.jsx(Fse,{timer:r},r.id))})}),e&&p.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-[1px]",children:p.jsx("div",{className:"bg-black text-white rounded-xl shadow-2xl w-[600px] max-w-full overflow-hidden border border-gray-800",children:p.jsxs("div",{className:"p-8 text-center space-y-6",children:[p.jsx("h2",{className:"text-3xl font-medium text-blue-500",children:"Coffee - 2 hrs"}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsx("p",{className:"text-2xl font-light",children:"Timer expired at 12:05 PM"}),p.jsx("p",{className:"text-2xl font-light",children:"Please discard the coffee"})]}),p.jsx("div",{className:"flex justify-end",children:p.jsx("span",{className:"bg-gray-200 text-black text-[10px] px-1 rounded-sm opacity-50",children:"TACT_Img_Timer-Notification@2x"})}),p.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-8",children:[p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-700 hover:bg-blue-600 text-white h-14 text-xl font-medium rounded-lg",children:"Mute"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-500 text-white h-14 text-xl font-medium rounded-lg",children:"Restart"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-800 hover:bg-blue-700 text-white h-14 text-xl font-medium rounded-lg",children:"Acknowledge"})]})]})})})]})}var lb="rovingFocusGroup.onEntryFocus",Use={bubbles:!1,cancelable:!0},uu="RovingFocusGroup",[G1,b3,Wse]=xL(uu),[Hse,w3]=gi(uu,[Wse]),[Vse,Gse]=Hse(uu),_3=P.forwardRef((e,t)=>p.jsx(G1.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(G1.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Kse,{...e,ref:t})})}));_3.displayName=uu;var Kse=P.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...h}=e,m=P.useRef(null),g=Je(t,m),b=Kh(a),[y,w]=Ha({prop:s,defaultProp:u??null,onChange:f,caller:uu}),[S,O]=P.useState(!1),E=ar(c),C=b3(r),A=P.useRef(!1),[N,T]=P.useState(0);return P.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(lb,E),()=>R.removeEventListener(lb,E)},[E]),p.jsx(Vse,{scope:r,orientation:n,dir:b,loop:i,currentTabStopId:y,onItemFocus:P.useCallback(R=>w(R),[w]),onItemShiftTab:P.useCallback(()=>O(!0),[]),onFocusableItemAdd:P.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:P.useCallback(()=>T(R=>R-1),[]),children:p.jsx(We.div,{tabIndex:S||N===0?-1:0,"data-orientation":n,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:Fe(e.onMouseDown,()=>{A.current=!0}),onFocus:Fe(e.onFocus,R=>{const I=!A.current;if(R.target===R.currentTarget&&I&&!S){const q=new CustomEvent(lb,Use);if(R.currentTarget.dispatchEvent(q),!q.defaultPrevented){const L=C().filter(K=>K.focusable),D=L.find(K=>K.active),U=L.find(K=>K.id===y),V=[D,U,...L].filter(Boolean).map(K=>K.ref.current);j3(V,d)}}A.current=!1}),onBlur:Fe(e.onBlur,()=>O(!1))})})}),S3="RovingFocusGroupItem",O3=P.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:s,...u}=e,f=Gi(),c=a||f,d=Gse(S3,r),h=d.currentTabStopId===c,m=b3(r),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:y}=d;return P.useEffect(()=>{if(n)return g(),()=>b()},[n,g,b]),p.jsx(G1.ItemSlot,{scope:r,id:c,focusable:n,active:i,children:p.jsx(We.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...u,ref:t,onMouseDown:Fe(e.onMouseDown,w=>{n?d.onItemFocus(c):w.preventDefault()}),onFocus:Fe(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Fe(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const S=Qse(w,d.orientation,d.dir);if(S!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=m().filter(C=>C.focusable).map(C=>C.ref.current);if(S==="last")E.reverse();else if(S==="prev"||S==="next"){S==="prev"&&E.reverse();const C=E.indexOf(w.currentTarget);E=d.loop?Zse(E,C+1):E.slice(C+1)}setTimeout(()=>j3(E))}}),children:typeof s=="function"?s({isCurrentTabStop:h,hasTabStop:y!=null}):s})})});O3.displayName=S3;var Xse={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Yse(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Qse(e,t,r){const n=Yse(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Xse[n]}function j3(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Zse(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Jse=_3,ele=O3,Gp="Tabs",[tle]=gi(Gp,[w3]),E3=w3(),[rle,P_]=tle(Gp),A3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:u,activationMode:f="automatic",...c}=e,d=Kh(u),[h,m]=Ha({prop:n,onChange:i,defaultProp:a??"",caller:Gp});return p.jsx(rle,{scope:r,baseId:Gi(),value:h,onValueChange:m,orientation:s,dir:d,activationMode:f,children:p.jsx(We.div,{dir:d,"data-orientation":s,...c,ref:t})})});A3.displayName=Gp;var P3="TabsList",N3=P.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,a=P_(P3,r),s=E3(r);return p.jsx(Jse,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:p.jsx(We.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});N3.displayName=P3;var C3="TabsTrigger",T3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,s=P_(C3,r),u=E3(r),f=M3(s.baseId,n),c=I3(s.baseId,n),d=n===s.value;return p.jsx(ele,{asChild:!0,...u,focusable:!i,active:d,children:p.jsx(We.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...a,ref:t,onMouseDown:Fe(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?s.onValueChange(n):h.preventDefault()}),onKeyDown:Fe(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&s.onValueChange(n)}),onFocus:Fe(e.onFocus,()=>{const h=s.activationMode!=="manual";!d&&!i&&h&&s.onValueChange(n)})})})});T3.displayName=C3;var k3="TabsContent",R3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:a,...s}=e,u=P_(k3,r),f=M3(u.baseId,n),c=I3(u.baseId,n),d=n===u.value,h=P.useRef(d);return P.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),p.jsx(Un,{present:i||d,children:({present:m})=>p.jsx(We.div,{"data-state":d?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!m,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&a})})});R3.displayName=k3;function M3(e,t){return`${e}-trigger-${t}`}function I3(e,t){return`${e}-content-${t}`}var nle=A3,ile=N3,ale=T3,ole=R3;function D3({className:e,...t}){return p.jsx(nle,{"data-slot":"tabs",className:Ie("flex flex-col gap-2",e),...t})}function L3({className:e,...t}){return p.jsx(ile,{"data-slot":"tabs-list",className:Ie("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex",e),...t})}function rs({className:e,...t}){return p.jsx(ale,{"data-slot":"tabs-trigger",className:Ie("data-[state=active]:bg-card dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function ns({className:e,...t}){return p.jsx(ole,{"data-slot":"tabs-content",className:Ie("flex-1 outline-none",e),...t})}const sle=[{id:"cat1",name:"Dairy",type:"color",value:"#bfdbfe",status:"active"},{id:"cat2",name:"Meat",type:"image",value:"meat.png",status:"active"},{id:"cat3",name:"Bakery",type:"text",value:"Bakery",status:"active"}],lle=[{id:"prod1",locationId:"12345",categoryId:"cat1",categoryName:"Dairy",name:"Whole Milk",productId:"2222222",barcode:"123456789",barcodeType:"EAN-13",status:"active",appearance:{type:"text",value:"Whole Milk"}},{id:"prod2",locationId:"12345",categoryId:"cat2",categoryName:"Meat",name:"Ground Beef",productId:"3333333",barcode:"113456789",barcodeType:"UPC-A",status:"active",appearance:{type:"color",value:"#ef4444"}},{id:"prod3",locationId:"67890",categoryId:"cat3",categoryName:"Bakery",name:"Croissant",productId:"4444444",barcode:"998877665",barcodeType:"EAN-8",status:"inactive",appearance:{type:"image",value:"croissant.jpg"}}];function cle(){const[e,t]=P.useState("products"),[r,n]=P.useState(lle),[i,a]=P.useState(sle),[s,u]=P.useState(!1),[f,c]=P.useState(!1);return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsxs("div",{className:"pb-4",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3 flex-wrap",children:[p.jsxs("div",{className:"flex items-center w-40 shrink-0 rounded-md border border-gray-300 bg-white overflow-hidden",style:{height:40},children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-2.5 pointer-events-none"}),p.jsx($e,{placeholder:"Search...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full placeholder:text-gray-500"})]}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"loc-12345",children:[p.jsx(nt,{className:"w-[160px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"loc-12345",children:"Location 12345"}),p.jsx(Ae,{value:"all",children:"All Locations"})]})]}),p.jsxs(tt,{children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Category"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Categories"}),i.map(d=>p.jsx(Ae,{value:d.id,children:d.name},d.id))]})]}),p.jsx("div",{className:"flex-1 min-w-2"}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(j8,{className:"w-4 h-4"})," Bulk Import"]}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Y1,{className:"w-4 h-4"})," Bulk Export"]}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Uo,{className:"w-4 h-4"})," Bulk Edit"]}),e==="products"?p.jsxs(Ne,{className:"h-10 rounded-md bg-blue-600 text-white hover:bg-blue-700 font-medium gap-1 shrink-0",onClick:()=>u(!0),children:["New Product ",p.jsx(Ur,{className:"w-4 h-4"})]}):p.jsxs(Ne,{className:"h-10 rounded-md bg-blue-600 text-white hover:bg-blue-700 font-medium gap-1 shrink-0",onClick:()=>c(!0),children:["New Category ",p.jsx(Ur,{className:"w-4 h-4"})]})]}),p.jsx("div",{className:"w-full border-b border-gray-200 mt-4",children:p.jsxs("div",{className:"flex overflow-x-auto w-fit",children:[p.jsx("button",{onClick:()=>t("products"),style:e==="products"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2 ${e==="products"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"}`,children:"Products"}),p.jsx("button",{onClick:()=>t("categories"),style:e==="categories"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2 ${e==="categories"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"}`,children:"Categories"})]})})]}),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:e==="products"?p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Category"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Barcode"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Status"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(d=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"border-r font-numeric",children:d.locationId}),p.jsx(fe,{className:"border-r text-gray-900 font-medium",children:d.categoryName}),p.jsx(fe,{className:"border-r text-gray-900 font-medium",children:p.jsxs("div",{className:"flex items-center gap-2",children:[d.appearance.type==="color"&&p.jsx("div",{className:"w-4 h-4 rounded-full border border-gray-300 shadow-sm",style:{backgroundColor:d.appearance.value}}),d.appearance.type==="image"&&p.jsx(Ia,{className:"w-4 h-4 text-gray-500"}),d.name]})}),p.jsx(fe,{className:"border-r font-numeric text-gray-600",children:d.productId}),p.jsx(fe,{className:"border-r font-numeric",children:p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-xs text-gray-400",children:d.barcodeType}),p.jsx("span",{children:d.barcode})]})}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{variant:d.status==="active"?"default":"secondary",className:d.status==="active"?"bg-green-600":"bg-gray-400",children:d.status})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(hR,{className:"h-4 w-4"})})})]},d.id))})]})}):p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Category Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Display Type"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Preview"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Status"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:i.map(d=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"border-r font-medium",children:d.name}),p.jsx(fe,{className:"border-r capitalize",children:d.type}),p.jsxs(fe,{className:"border-r",children:[d.type==="color"&&p.jsx("div",{className:"w-8 h-8 rounded-md border border-gray-200 shadow-sm",style:{backgroundColor:d.value}}),d.type==="image"&&p.jsx("div",{className:"w-8 h-8 bg-gray-100 flex items-center justify-center rounded-md border border-gray-200",children:p.jsx(Ia,{className:"w-4 h-4 text-gray-500"})}),d.type==="text"&&p.jsx("div",{className:"w-auto px-2 py-1 bg-gray-100 rounded-md border border-gray-200 text-xs font-medium inline-block",children:d.value})]}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{variant:d.status==="active"?"default":"secondary",className:d.status==="active"?"bg-green-600":"bg-gray-400",children:d.status})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(Uo,{className:"h-4 w-4"})})})]},d.id))})]})})}),p.jsx(ule,{open:s,onOpenChange:u,categories:i}),p.jsx(fle,{open:f,onOpenChange:c})]})}function ule({open:e,onOpenChange:t,categories:r}){const[n,i]=P.useState("text");return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px] max-h-[90vh] overflow-y-auto",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Product"}),p.jsx(au,{children:"Create a new product. Fill in the details below."})]}),p.jsxs("div",{className:"grid gap-6 py-4",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Product Category"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Category"})}),p.jsx(st,{children:r.map(a=>p.jsx(Ae,{value:a.id,children:a.name},a.id))})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Product Name"}),p.jsx($e,{placeholder:"e.g. Whole Milk"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Product ID"}),p.jsx($e,{placeholder:"Internal ID"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Status"}),p.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[p.jsx(no,{defaultChecked:!0}),p.jsx("span",{className:"text-sm text-gray-500",children:"Active"})]})]})]}),p.jsxs("div",{className:"space-y-3 p-4 bg-gray-50 rounded-md border border-gray-100",children:[p.jsxs(we,{className:"flex items-center gap-2",children:[p.jsx(dB,{className:"w-4 h-4"})," Barcode Settings"]}),p.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[p.jsx("div",{className:"col-span-1",children:p.jsxs(tt,{defaultValue:"ean13",children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Format"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"ean13",children:"EAN-13"}),p.jsx(Ae,{value:"upc-a",children:"UPC-A"}),p.jsx(Ae,{value:"code128",children:"Code 128"}),p.jsx(Ae,{value:"qr",children:"QR Code"})]})]})}),p.jsx("div",{className:"col-span-2",children:p.jsx($e,{placeholder:"Barcode Value"})})]}),p.jsx(Ne,{variant:"link",className:"px-0 text-xs h-auto",children:"+ Add another barcode standard"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(we,{children:"App Appearance"}),p.jsxs(D3,{value:n,onValueChange:i,className:"w-full",children:[p.jsxs(L3,{className:"grid w-full grid-cols-3",children:[p.jsxs(rs,{value:"text",className:"flex items-center gap-2",children:[p.jsx(Z1,{className:"w-3 h-3"})," Text"]}),p.jsxs(rs,{value:"color",className:"flex items-center gap-2",children:[p.jsx(pR,{className:"w-3 h-3"})," Color"]}),p.jsxs(rs,{value:"image",className:"flex items-center gap-2",children:[p.jsx(Ia,{className:"w-3 h-3"})," Image"]})]}),p.jsxs(ns,{value:"text",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Display Text"}),p.jsx($e,{placeholder:"Text to display on button"})]}),p.jsxs(ns,{value:"color",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Select Color"}),p.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["#ef4444","#f97316","#f59e0b","#84cc16","#10b981","#06b6d4","#3b82f6","#6366f1","#a855f7","#ec4899"].map(a=>p.jsx("button",{className:"w-8 h-8 rounded-full border border-gray-200 shadow-sm hover:scale-110 transition-transform",style:{backgroundColor:a}},a)),p.jsx("button",{className:"w-8 h-8 rounded-full border border-dashed border-gray-400 flex items-center justify-center hover:bg-gray-50",children:p.jsx(Ur,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs(ns,{value:"image",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Upload Image"}),p.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-md p-6 flex flex-col items-center justify-center text-gray-500 hover:bg-gray-50 cursor-pointer",children:[p.jsx(Ia,{className:"w-8 h-8 mb-2 opacity-50"}),p.jsx("span",{className:"text-xs",children:"Click to upload or drag and drop"})]})]})]})]}),p.jsxs("div",{className:"space-y-3 pt-2 border-t border-gray-100",children:[p.jsx(we,{children:"Store Availability"}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"all-stores",name:"scope",className:"text-blue-600 focus:ring-blue-500",defaultChecked:!0}),p.jsx("label",{htmlFor:"all-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"All Stores in Group"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"specific-stores",name:"scope",className:"text-blue-600 focus:ring-blue-500"}),p.jsx("label",{htmlFor:"specific-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Specific Location(s)"})]})]}),p.jsx("div",{className:"pl-6 pt-2",children:p.jsx(tt,{disabled:!0,children:p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{placeholder:"Select Locations..."})})})})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Create Product"})]})]})})}function fle({open:e,onOpenChange:t}){const[r,n]=P.useState("text");return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[500px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Category"}),p.jsx(au,{children:"Create a product category to organize your items."})]}),p.jsxs("div",{className:"grid gap-6 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Category Name"}),p.jsx($e,{placeholder:"e.g. Dairy, Meat, Bakery"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(we,{children:"Button Appearance"}),p.jsxs(D3,{value:r,onValueChange:n,className:"w-full",children:[p.jsxs(L3,{className:"grid w-full grid-cols-3",children:[p.jsxs(rs,{value:"text",className:"flex items-center gap-2",children:[p.jsx(Z1,{className:"w-3 h-3"})," Text"]}),p.jsxs(rs,{value:"color",className:"flex items-center gap-2",children:[p.jsx(pR,{className:"w-3 h-3"})," Color"]}),p.jsxs(rs,{value:"image",className:"flex items-center gap-2",children:[p.jsx(Ia,{className:"w-3 h-3"})," Image"]})]}),p.jsxs(ns,{value:"text",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Display Text"}),p.jsx($e,{placeholder:"Category Name"})]}),p.jsxs(ns,{value:"color",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Select Color"}),p.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["#bfdbfe","#bbf7d0","#fecaca","#ddd6fe","#fde68a"].map(i=>p.jsx("button",{className:"w-8 h-8 rounded-full border border-gray-200 shadow-sm hover:scale-110 transition-transform",style:{backgroundColor:i}},i)),p.jsx("button",{className:"w-8 h-8 rounded-full border border-dashed border-gray-400 flex items-center justify-center hover:bg-gray-50",children:p.jsx(Ur,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs(ns,{value:"image",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Upload Icon/Image"}),p.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-md p-6 flex flex-col items-center justify-center text-gray-500 hover:bg-gray-50 cursor-pointer",children:[p.jsx(Ia,{className:"w-8 h-8 mb-2 opacity-50"}),p.jsx("span",{className:"text-xs",children:"Click to upload"})]})]})]})]}),p.jsx("div",{className:"grid grid-cols-2 gap-4",children:p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Status"}),p.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[p.jsx(no,{defaultChecked:!0}),p.jsx("span",{className:"text-sm text-gray-500",children:"Active"})]})]})}),p.jsxs("div",{className:"space-y-3 pt-2 border-t border-gray-100",children:[p.jsx(we,{children:"Store Availability"}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"cat-all-stores",name:"cat-scope",className:"text-blue-600 focus:ring-blue-500",defaultChecked:!0}),p.jsx("label",{htmlFor:"cat-all-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"All Stores in Group"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"cat-specific-stores",name:"cat-scope",className:"text-blue-600 focus:ring-blue-500"}),p.jsx("label",{htmlFor:"cat-specific-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Specific Location(s)"})]})]})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Create Category"})]})]})})}var Kp="Checkbox",[dle]=gi(Kp),[hle,N_]=dle(Kp);function ple(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:i,disabled:a,form:s,name:u,onCheckedChange:f,required:c,value:d="on",internal_do_not_use_render:h}=e,[m,g]=Ha({prop:r,defaultProp:i??!1,onChange:f,caller:Kp}),[b,y]=P.useState(null),[w,S]=P.useState(null),O=P.useRef(!1),E=b?!!s||!!b.closest("form"):!0,C={checked:m,disabled:a,setChecked:g,control:b,setControl:y,name:u,form:s,value:d,hasConsumerStoppedPropagationRef:O,required:c,defaultChecked:Ki(i)?!1:i,isFormControl:E,bubbleInput:w,setBubbleInput:S};return p.jsx(hle,{scope:t,...C,children:mle(h)?h(C):n})}var $3="CheckboxTrigger",B3=P.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},i)=>{const{control:a,value:s,disabled:u,checked:f,required:c,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:b}=N_($3,e),y=Je(i,d),w=P.useRef(f);return P.useEffect(()=>{const S=a?.form;if(S){const O=()=>h(w.current);return S.addEventListener("reset",O),()=>S.removeEventListener("reset",O)}},[a,h]),p.jsx(We.button,{type:"button",role:"checkbox","aria-checked":Ki(f)?"mixed":f,"aria-required":c,"data-state":H3(f),"data-disabled":u?"":void 0,disabled:u,value:s,...n,ref:y,onKeyDown:Fe(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Fe(r,S=>{h(O=>Ki(O)?!0:!O),b&&g&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})})});B3.displayName=$3;var z3=P.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:a,required:s,disabled:u,value:f,onCheckedChange:c,form:d,...h}=e;return p.jsx(ple,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:u,required:s,onCheckedChange:c,name:n,form:d,value:f,internal_do_not_use_render:({isFormControl:m})=>p.jsxs(p.Fragment,{children:[p.jsx(B3,{...h,ref:t,__scopeCheckbox:r}),m&&p.jsx(W3,{__scopeCheckbox:r})]})})});z3.displayName=Kp;var F3="CheckboxIndicator",q3=P.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,a=N_(F3,r);return p.jsx(Un,{present:n||Ki(a.checked)||a.checked===!0,children:p.jsx(We.span,{"data-state":H3(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});q3.displayName=F3;var U3="CheckboxBubbleInput",W3=P.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:u,disabled:f,name:c,value:d,form:h,bubbleInput:m,setBubbleInput:g}=N_(U3,e),b=Je(r,g),y=__(a),w=y_(n);P.useEffect(()=>{const O=m;if(!O)return;const E=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(E,"checked").set,N=!i.current;if(y!==a&&A){const T=new Event("click",{bubbles:N});O.indeterminate=Ki(a),A.call(O,Ki(a)?!1:a),O.dispatchEvent(T)}},[m,y,a,i]);const S=P.useRef(Ki(a)?!1:a);return p.jsx(We.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??S.current,required:u,disabled:f,name:c,value:d,form:h,...t,tabIndex:-1,ref:b,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});W3.displayName=U3;function mle(e){return typeof e=="function"}function Ki(e){return e==="indeterminate"}function H3(e){return Ki(e)?"indeterminate":e?"checked":"unchecked"}function Jl({className:e,...t}){return p.jsx(z3,{"data-slot":"checkbox",className:Ie("peer border bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(q3,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:p.jsx(dR,{className:"size-3.5"})})})}const vle=[{id:"1",name:"Downtown Store (101)"},{id:"2",name:"Uptown Store (102)"},{id:"3",name:"Airport Kiosk (201)"},{id:"4",name:"Mall Outlet (305)"}],gle=[{id:"r1",name:"Partner Admin",permissions:["all"],notifications:["system_updates","billing"]},{id:"r2",name:"Group Admin",permissions:["manage_users","manage_products","view_reports"],notifications:["new_users"]},{id:"r3",name:"Manager",permissions:["manage_store","view_reports","manage_inventory"],notifications:["label_expiry","low_stock"]},{id:"r4",name:"Team Member",permissions:["view_tasks","print_labels"],notifications:["task_assignment"]}],V3=[{id:"p1",name:"Global Foods Inc.",status:"active",contact:"admin@globalfoods.com",phone:"+1 (555) 100-2000"},{id:"p2",name:"Local Eateries Co.",status:"active",contact:"support@localeateries.com",phone:"+1 (555) 200-3000"}],yle=[{id:"g1",name:"West Coast Region",partner:"Global Foods Inc.",status:"active"},{id:"g2",name:"East Coast Region",partner:"Global Foods Inc.",status:"inactive"}],xle=[{id:"m1",name:"Alice Johnson",role:"Manager",locations:["Downtown Store (101)","Uptown Store (102)"],email:"alice@example.com",phone:"+1 (555) 111-2222",status:"active"},{id:"m2",name:"Bob Smith",role:"Team Member",locations:["Airport Kiosk (201)"],email:"bob@example.com",phone:"+1 (555) 222-3333",status:"active"},{id:"m3",name:"Charlie Brown",role:"Team Member",locations:["Downtown Store (101)"],email:"charlie@example.com",phone:"+1 (555) 333-4444",status:"inactive"}];function ble(){const[e,t]=P.useState("Roles"),[r,n]=P.useState(gle),[i,a]=P.useState(V3),[s,u]=P.useState(yle),[f,c]=P.useState(xle),[d,h]=P.useState(!1),[m,g]=P.useState(!1),[b,y]=P.useState(!1),[w,S]=P.useState(!1),O=()=>{alert(`Exporting ${e} list to PDF...`)},E=()=>{switch(e){case"Roles":h(!0);break;case"Partner":g(!0);break;case"Group":y(!0);break;case"Team Member":S(!0);break}},C=()=>{const N=e==="Team Member";return p.jsxs("div",{className:"flex flex-col gap-4 pb-4",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"border border-gray-300 rounded-md w-40 shrink-0 bg-white placeholder:text-gray-500"}),p.jsx("div",{className:"flex-1"}),N&&p.jsxs(p.Fragment,{children:[p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Import"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Edit"})]}),p.jsx(Ne,{variant:"outline",onClick:O,className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Export (PDF)"}),p.jsx(Ne,{className:"h-10 bg-blue-600 hover:bg-blue-700 text-white rounded-md px-6 font-medium shrink-0",onClick:E,children:"New+"})]}),p.jsx("div",{className:"w-full border-b border-gray-200",children:p.jsx("div",{className:"flex overflow-x-auto w-fit",children:["Roles","Partner","Group","Team Member"].map(T=>p.jsx("button",{onClick:()=>t(T),style:e===T?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e===T?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:T},T))})})]})},A=()=>{switch(e){case"Roles":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Role Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Access Permissions"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Notifications"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(N=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium border-r",children:N.name}),p.jsx(fe,{className:"border-r",children:p.jsx("div",{className:"flex flex-wrap gap-1",children:N.permissions.map(T=>p.jsx(Rn,{variant:"secondary",className:"text-xs bg-blue-100 text-blue-800 hover:bg-blue-100",children:T},T))})}),p.jsx(fe,{className:"border-r",children:p.jsx("div",{className:"flex flex-wrap gap-1",children:N.notifications.map(T=>p.jsx(Rn,{variant:"outline",className:"text-xs border-orange-200 text-orange-700 bg-orange-50",children:T},T))})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Partner":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Partner Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Contact"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Phone"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:i.map(N=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium border-r",children:N.name}),p.jsx(fe,{className:"border-r",children:N.contact}),p.jsx(fe,{className:"border-r text-gray-600",children:N.phone}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Group":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Group Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Parent Partner"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:s.map(N=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium border-r",children:N.name}),p.jsx(fe,{className:"border-r",children:N.partner}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Team Member":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Email"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Phone"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Role"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Assigned Locations"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:f.map(N=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium border-r",children:N.name}),p.jsx(fe,{className:"border-r text-gray-600",children:N.email}),p.jsx(fe,{className:"border-r text-gray-600",children:N.phone}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{variant:"outline",className:"font-normal",children:N.role})}),p.jsx(fe,{className:"border-r",children:p.jsx("div",{className:"flex flex-col gap-1",children:N.locations.map(T=>p.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-600",children:[p.jsx(Gh,{className:"w-3 h-3"})," ",T]},T))})}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]})}};return p.jsxs("div",{className:"h-full flex flex-col",children:[C(),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md",children:A()})}),p.jsx(wle,{open:d,onOpenChange:h}),p.jsx(_le,{open:m,onOpenChange:g}),p.jsx(Sle,{open:b,onOpenChange:y}),p.jsx(Ole,{open:w,onOpenChange:S,roles:r})]})}function wle({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Create New Role"}),p.jsx(au,{children:"Define permissions and notification settings for this role."})]}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Role Name"}),p.jsx($e,{placeholder:"e.g. Inventory Specialist"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs(we,{className:"flex items-center gap-2",children:[p.jsx(u8,{className:"w-4 h-4"})," Access Permissions"]}),p.jsx("div",{className:"grid grid-cols-2 gap-2 p-3 bg-gray-50 rounded border border-gray-100",children:["Manage Labels","Manage Products","Manage People","View Reports","Edit Settings","Approve Batches"].map(r=>p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:`perm-${r}`}),p.jsx("label",{htmlFor:`perm-${r}`,className:"text-sm font-medium leading-none cursor-pointer",children:r})]},r))})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs(we,{className:"flex items-center gap-2",children:[p.jsx(pB,{className:"w-4 h-4"})," Notifications (Alerts)"]}),p.jsxs("div",{className:"grid grid-cols-1 gap-2 p-3 bg-gray-50 rounded border border-gray-100",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-expiry",defaultChecked:!0}),p.jsx("label",{htmlFor:"notif-expiry",className:"text-sm font-medium leading-none cursor-pointer",children:"Label Expiry Alerts"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-stock"}),p.jsx("label",{htmlFor:"notif-stock",className:"text-sm font-medium leading-none cursor-pointer",children:"Low Stock Alerts"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-tasks"}),p.jsx("label",{htmlFor:"notif-tasks",className:"text-sm font-medium leading-none cursor-pointer",children:"New Task Assignments"})]})]})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Role"})]})]})})}function _le({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{children:[p.jsx(aa,{children:p.jsx(oa,{children:"Create New Partner"})}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Partner Name"}),p.jsx($e,{placeholder:"Company Name"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Contact Email"}),p.jsx($e,{placeholder:"admin@partner.com"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Phone Number"}),p.jsx($e,{type:"tel",placeholder:"+1 (555) 000-0000"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"partner-status",defaultChecked:!0}),p.jsx(we,{htmlFor:"partner-status",children:"Active"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Partner"})]})]})})}function Sle({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{children:[p.jsx(aa,{children:p.jsx(oa,{children:"Create New Group"})}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Group Name"}),p.jsx($e,{placeholder:"e.g. West Coast Region"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Assign to Partner"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Partner"})}),p.jsx(st,{children:V3.map(r=>p.jsx(Ae,{value:r.id,children:r.name},r.id))})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"group-status",defaultChecked:!0}),p.jsx(we,{htmlFor:"group-status",children:"Active"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Group"})]})]})})}function Ole({open:e,onOpenChange:t,roles:r}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[500px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add Team Member / Manager"}),p.jsx(au,{children:"Create a user account and assign them to locations."})]}),p.jsxs("div",{className:"space-y-4 py-4 max-h-[60vh] overflow-y-auto pr-1",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Full Name"}),p.jsx($e,{placeholder:"John Doe"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Role"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Role"})}),p.jsx(st,{children:r.map(n=>p.jsx(Ae,{value:n.name,children:n.name},n.id))})]})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Password"}),p.jsx($e,{type:"password",placeholder:"Enter password",autoComplete:"new-password",className:"w-full"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Email Address"}),p.jsx($e,{type:"email",placeholder:"john@example.com"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Phone Number"}),p.jsx($e,{type:"tel",placeholder:"+1 (555) 000-0000"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(fc,{className:"h-[120px] w-full border rounded-md p-2",children:p.jsx("div",{className:"space-y-2",children:vle.map(n=>p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:`loc-${n.id}`}),p.jsx("label",{htmlFor:`loc-${n.id}`,className:"text-sm cursor-pointer w-full hover:bg-gray-50 p-1 rounded",children:n.name})]},n.id))})}),p.jsx("p",{className:"text-xs text-gray-500",children:"* Users must be assigned to at least one location."})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"member-status",defaultChecked:!0}),p.jsx(we,{htmlFor:"member-status",children:"Active Account"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Create User"})]})]})})}function jle(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Array(12).fill(0);let K1=1;class Ele{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:n,...i}=t,a=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:K1++,s=this.toasts.find(f=>f.id===a),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(f=>f.id===a?(this.publish({...f,...t,id:a,title:n}),{...f,...t,id:a,dismissible:u,title:n}):f):this.addToast({title:n,...i,dismissible:u,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let a=n!==void 0,s;const u=i.then(async c=>{if(s=["resolve",c],z.isValidElement(c))a=!1,this.create({id:n,type:"default",message:c});else if(Ple(c)&&!c.ok){a=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${c.status}`):r.error,m=typeof r.description=="function"?await r.description(`HTTP error! status: ${c.status}`):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:m,...b})}else if(c instanceof Error){a=!1;const h=typeof r.error=="function"?await r.error(c):r.error,m=typeof r.description=="function"?await r.description(c):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:m,...b})}else if(r.success!==void 0){a=!1;const h=typeof r.success=="function"?await r.success(c):r.success,m=typeof r.description=="function"?await r.description(c):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:m,...b})}}).catch(async c=>{if(s=["reject",c],r.error!==void 0){a=!1;const d=typeof r.error=="function"?await r.error(c):r.error,h=typeof r.description=="function"?await r.description(c):r.description,g=typeof d=="object"&&!z.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:h,...g})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),f=()=>new Promise((c,d)=>u.then(()=>s[0]==="reject"?d(s[1]):c(s[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:f}:Object.assign(n,{unwrap:f})},this.custom=(t,r)=>{const n=r?.id||K1++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const en=new Ele,Ale=(e,t)=>{const r=t?.id||K1++;return en.addToast({title:e,...t,id:r}),r},Ple=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Nle=Ale,Cle=()=>en.toasts,Tle=()=>en.getActiveToasts(),kle=Object.assign(Nle,{success:en.success,info:en.info,warning:en.warning,error:en.error,custom:en.custom,message:en.message,promise:en.promise,dismiss:en.dismiss,loading:en.loading},{getHistory:Cle,getToasts:Tle});jle("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const Rle=[{id:"1-251201",productName:"Whole Milk",category:"Dairy",template:'2"x2" Basic',printedAt:"2024-03-20 09:30 AM",printedBy:"Alice Johnson",location:"Downtown Store (101)",expiryDate:"2024-03-27",status:"Valid"},{id:"2-251201",productName:"Ground Beef",category:"Meat",template:'2"x2" Basic',printedAt:"2024-03-20 10:15 AM",printedBy:"Bob Smith",location:"Uptown Store (102)",expiryDate:"2024-03-23",status:"Valid"},{id:"3-251201",productName:"Croissant",category:"Bakery",template:'2"x2" Basic',printedAt:"2024-03-19 14:00 PM",printedBy:"Charlie Brown",location:"Downtown Store (101)",expiryDate:"2024-03-20",status:"Expired"},{id:"4-251201",productName:"Caesar Salad",category:"Deli",template:`2"x6" G'n'G !!!`,printedAt:"2024-03-18 11:45 AM",printedBy:"Alice Johnson",location:"Downtown Store (101)",expiryDate:"2024-03-21",status:"Expiring Soon"},{id:"5-251201",productName:"Orange Juice",category:"Beverage",template:'2"x2" Basic',printedAt:"2024-03-18 08:20 AM",printedBy:"Bob Smith",location:"Airport Kiosk (201)",expiryDate:"2024-03-25",status:"Valid"}],Mle=[{name:"Dairy",count:450},{name:"Meat",count:320},{name:"Bakery",count:280},{name:"Deli",count:190},{name:"Produce",count:150},{name:"Beverage",count:120}],Ile=[{date:"Mon",count:120},{date:"Tue",count:132},{date:"Wed",count:101},{date:"Thu",count:134},{date:"Fri",count:190},{date:"Sat",count:230},{date:"Sun",count:210}];function Dle(){const[e,t]=P.useState("print-log"),r=n=>{kle.success(`Reprinting label ${n}`,{description:"Watermark 'RePrint' applied."})};return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsxs("div",{className:"pb-4",children:[p.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"loc-12345",children:[p.jsx(nt,{className:"w-[160px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"loc-12345",children:"Downtown Store"}),p.jsx(Ae,{value:"all",children:"All Locations"})]})]}),p.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[p.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Period Search:"}),p.jsxs("div",{className:"flex items-center bg-white border border-gray-300 rounded-md h-10 px-2",style:{minHeight:40},children:[p.jsx(vB,{className:"w-4 h-4 text-gray-500 mr-2 shrink-0"}),p.jsx("input",{type:"date",className:"text-sm outline-none w-32 bg-transparent"}),p.jsx("span",{className:"mx-2 text-gray-400",children:"-"}),p.jsx("input",{type:"date",className:"text-sm outline-none w-32 bg-transparent"})]})]}),p.jsxs("div",{className:"flex items-center w-64 rounded-md border border-gray-300 bg-white overflow-hidden shrink-0",style:{height:40},children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-3 pointer-events-none"}),p.jsx($e,{placeholder:"Search Product or Category...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full placeholder:text-gray-500"})]}),p.jsx("div",{className:"flex-1 min-w-2"}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Y1,{className:"w-4 h-4"})," Export Report"]})]}),p.jsx("div",{className:"w-full border-b border-gray-200 mt-4",children:p.jsxs("div",{className:"flex overflow-x-auto w-fit",children:[p.jsx("button",{onClick:()=>t("print-log"),style:e==="print-log"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e==="print-log"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:"Print Log"}),p.jsx("button",{onClick:()=>t("label-report"),style:e==="label-report"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e==="label-report"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:"Label Report"})]})})]}),p.jsxs("div",{className:"flex-1 overflow-auto pt-6",children:[e==="print-log"&&p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Label ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Category"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Template"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Printed At"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Printed By"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Expiry Date"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Action"})]})}),p.jsx(_r,{children:Rle.map(n=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"border-r font-numeric text-gray-600",children:n.id}),p.jsx(fe,{className:"border-r font-medium",children:n.productName}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{variant:"secondary",className:"bg-blue-50 text-blue-700 hover:bg-blue-50 border-blue-200",children:n.category})}),p.jsx(fe,{className:"border-r text-gray-600 text-sm",children:(()=>{const i=n.template.endsWith(" !!!"),a=i?n.template.slice(0,-4):n.template,s=a.lastIndexOf(" "),u=a.slice(0,s+1),f=a.slice(s+1);return p.jsxs(p.Fragment,{children:[u,p.jsx("span",{className:"font-bold text-gray-900",children:f}),i&&p.jsx("span",{className:"text-red-600",children:" !!!"})]})})()}),p.jsx(fe,{className:"border-r text-gray-600 text-sm font-numeric",children:n.printedAt}),p.jsx(fe,{className:"border-r text-gray-600 text-sm",children:n.printedBy}),p.jsx(fe,{className:"border-r text-gray-600 text-sm font-numeric",children:n.location}),p.jsx(fe,{className:"border-r",children:p.jsx("span",{className:Ie("text-sm font-medium font-numeric",n.status==="Expired"?"text-red-600":n.status==="Expiring Soon"?"text-orange-500":"text-green-600"),children:n.expiryDate})}),p.jsx(fe,{className:"text-center",children:p.jsxs(Ne,{size:"sm",variant:"outline",className:"h-8 gap-1 hover:bg-gray-100 border-gray-300",onClick:()=>r(n.id),children:[p.jsx(mR,{className:"w-3 h-3"})," Reprint"]})})]},n.id))})]})}),e==="label-report"&&p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Total Labels Printed"}),p.jsx(uc,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"2,543"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+20.1% from last month"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Most Printed Category"}),p.jsx(yB,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"Dairy"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"450 labels generated"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Top Product"}),p.jsx(fR,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"Whole Milk"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"182 labels generated"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Avg. Daily Prints"}),p.jsx(i8,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"85"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+12% from last week"})]})]})]}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[p.jsxs(Ir,{className:"col-span-1",children:[p.jsxs(yn,{children:[p.jsx(xn,{children:"Labels by Category"}),p.jsx(Id,{children:"Distribution of printed labels across product categories."})]}),p.jsx(tn,{className:"h-[300px]",children:p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(sre,{data:Mle,children:[p.jsx(Rh,{strokeDasharray:"3 3",vertical:!1}),p.jsx(qa,{dataKey:"name",fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Ua,{fontSize:12,tickLine:!1,axisLine:!1,tickFormatter:n=>`${n}`}),p.jsx(Dr,{}),p.jsx(to,{dataKey:"count",fill:"#facc15",radius:[4,4,0,0]})]})})})]}),p.jsxs(Ir,{className:"col-span-1",children:[p.jsxs(yn,{children:[p.jsx(xn,{children:"Print Volume Trends"}),p.jsx(Id,{children:"Daily label printing volume for the last 7 days."})]}),p.jsx(tn,{className:"h-[300px]",children:p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(yL,{data:Ile,children:[p.jsx(Rh,{strokeDasharray:"3 3",vertical:!1}),p.jsx(qa,{dataKey:"date",fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Ua,{fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Dr,{}),p.jsx(qs,{type:"monotone",dataKey:"count",stroke:"#dc2626",strokeWidth:2,dot:{r:4},activeDot:{r:6}})]})})})]})]}),p.jsxs(Ir,{children:[p.jsx(yn,{children:p.jsx(xn,{children:"Most Used Products"})}),p.jsx(tn,{children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{children:[p.jsx(ge,{children:"Product Name"}),p.jsx(ge,{children:"Category"}),p.jsx(ge,{className:"text-right",children:"Total Printed"}),p.jsx(ge,{className:"text-right",children:"Usage %"})]})}),p.jsxs(_r,{children:[p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium",children:"Whole Milk"}),p.jsx(fe,{children:"Dairy"}),p.jsx(fe,{className:"text-right",children:"182"}),p.jsx(fe,{className:"text-right",children:"7.2%"})]}),p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium",children:"Ground Beef 80/20"}),p.jsx(fe,{children:"Meat"}),p.jsx(fe,{className:"text-right",children:"145"}),p.jsx(fe,{className:"text-right",children:"5.7%"})]}),p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium",children:"Chicken Breast"}),p.jsx(fe,{children:"Meat"}),p.jsx(fe,{className:"text-right",children:"132"}),p.jsx(fe,{className:"text-right",children:"5.2%"})]}),p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium",children:"Sliced Ham"}),p.jsx(fe,{children:"Deli"}),p.jsx(fe,{className:"text-right",children:"98"}),p.jsx(fe,{className:"text-right",children:"3.8%"})]})]})]})})]})]})]})]})}const Lle=[{id:"12345",name:"Downtown Store",street:"123 Main St",city:"New York",state:"NY",country:"USA",zipCode:"10001",phone:"+1 (555) 123-4567",email:"downtown@example.com",gps:"40.7128° N, 74.0060° W",status:"active"},{id:"12335",name:"Uptown Market",street:"456 High St",city:"New York",state:"NY",country:"USA",zipCode:"10002",phone:"+1 (555) 987-6543",email:"uptown@example.com",gps:"40.7580° N, 73.9855° W",status:"active"},{id:"12445",name:"Airport Kiosk",street:"Terminal 4, JFK Airport",city:"Jamaica",state:"NY",country:"USA",zipCode:"11430",phone:"+1 (555) 555-5555",email:"jfk@example.com",gps:"40.6413° N, 73.7781° W",status:"active"},{id:"12555",name:"Suburban Outlet",street:"789 Country Rd",city:"Long Island",state:"NY",country:"USA",zipCode:"11901",phone:"+1 (555) 111-2222",email:"suburb@example.com",gps:"40.8500° N, 73.2000° W",status:"inactive"}];function $le(){const[e,t]=P.useState(!1),[r,n]=P.useState(Lle);return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsx("div",{className:"pb-4",children:p.jsx("div",{className:"flex flex-col gap-4",children:p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"border border-gray-300 rounded-md w-40 shrink-0 bg-white placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-1",children:"Location 1"})]})]}),p.jsx("div",{className:"flex-1"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Import"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Export"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Edit"}),p.jsx(Ne,{className:"h-10 bg-blue-600 hover:bg-blue-700 text-white rounded-md px-6 font-medium shrink-0",onClick:()=>t(!0),children:"New+"})]})})}),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Street"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"City"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"State"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Country"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Zip Code"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Phone"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Email"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"GPS"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(i=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"border-r font-numeric text-gray-600",children:i.id}),p.jsx(fe,{className:"border-r font-medium text-black",children:i.name}),p.jsx(fe,{className:"border-r text-gray-600 max-w-[140px] truncate",children:i.street}),p.jsx(fe,{className:"border-r text-gray-600",children:i.city}),p.jsx(fe,{className:"border-r text-gray-600",children:i.state}),p.jsx(fe,{className:"border-r text-gray-600",children:i.country}),p.jsx(fe,{className:"border-r text-gray-600 font-numeric",children:i.zipCode}),p.jsx(fe,{className:"border-r text-gray-600 whitespace-nowrap",children:i.phone}),p.jsx(fe,{className:"border-r text-gray-600 text-sm",children:i.email}),p.jsx(fe,{className:"border-r text-gray-500 font-numeric text-xs",children:i.gps}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(hR,{className:"h-4 w-4 text-gray-500"})})})]},i.id))})]})})}),p.jsx(Ble,{open:e,onOpenChange:t})]})}function Ble({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Location"}),p.jsx(au,{children:"Enter the details for the new store location."})]}),p.jsxs("div",{className:"grid gap-4 py-4",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Partner"}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{children:p.jsx(rt,{})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Group"}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{children:p.jsx(rt,{})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]})]})]}),p.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[p.jsxs("div",{className:"space-y-2 col-span-1",children:[p.jsx(we,{children:"Location ID"}),p.jsx($e,{placeholder:"e.g. 12345"})]}),p.jsxs("div",{className:"space-y-2 col-span-2",children:[p.jsx(we,{children:"Location Name"}),p.jsx($e,{placeholder:"e.g. Downtown Store"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Street"}),p.jsx($e,{placeholder:"e.g. 123 Main St"})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"City"}),p.jsx($e,{placeholder:"e.g. New York"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"State"}),p.jsx($e,{placeholder:"e.g. NY"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Country"}),p.jsx($e,{placeholder:"e.g. USA"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Zip Code"}),p.jsx($e,{placeholder:"e.g. 10001"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Phone Number"}),p.jsx($e,{placeholder:"+1 (555) 000-0000"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Email"}),p.jsx($e,{placeholder:"store@example.com"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(we,{className:"flex items-center gap-2",children:[p.jsx(Gh,{className:"w-4 h-4"})," GPS Coordinates"]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx($e,{placeholder:"Latitude (e.g. 40.7128)"}),p.jsx($e,{placeholder:"Longitude (e.g. -74.0060)"})]})]}),p.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[p.jsx(no,{id:"loc-status",defaultChecked:!0}),p.jsx(we,{htmlFor:"loc-status",children:"Active Location"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Create Location"})]})]})})}function zle(){const[e,t]=P.useState("Dashboard"),r=()=>{switch(e){case"Dashboard":return p.jsx(fre,{});case"Training":return p.jsx(Bse,{});case"Alerts":return p.jsx(qse,{});case"Menu Manager":return p.jsx(cle,{});case"Account Management":return p.jsx(ble,{});case"Reports":return p.jsx(Dle,{});case"Location Manager":return p.jsx($le,{});case"Labels":case"Label Categories":case"Label Types":case"Label Templates":case"Multiple Options":return p.jsx($se,{currentView:e,onViewChange:t});default:return p.jsx(dre,{title:e})}};return p.jsx(Oz,{currentView:e,setCurrentView:t,children:r()})}Q5.createRoot(document.getElementById("root")).render(p.jsx(zle,{})); diff --git a/美国版/Food Labeling Management Platform/build/index.html b/美国版/Food Labeling Management Platform/build/index.html index 010eb70..7b059d5 100644 --- a/美国版/Food Labeling Management Platform/build/index.html +++ b/美国版/Food Labeling Management Platform/build/index.html @@ -5,7 +5,7 @@ Food Labeling Management Platform - + diff --git a/美国版/Food Labeling Management Platform/src/components/labels/LabelTemplatesView.tsx b/美国版/Food Labeling Management Platform/src/components/labels/LabelTemplatesView.tsx index 75415d6..be8b522 100755 --- a/美国版/Food Labeling Management Platform/src/components/labels/LabelTemplatesView.tsx +++ b/美国版/Food Labeling Management Platform/src/components/labels/LabelTemplatesView.tsx @@ -45,8 +45,7 @@ export function LabelTemplatesView() { }); const handleNewTemplate = () => { - setEditingTemplateId(null); - setViewMode('editor'); + // 点击不跳转,仅保留按钮展示 }; const handleEditTemplate = (id: string) => { @@ -97,7 +96,7 @@ export function LabelTemplatesView() {