@noxickon/onyx 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{ui-DIs-Q3SJ.js → ui-CY9lV5En.js} +1 -1
- package/dist/chunks/{ui-BFVntEuJ.js → ui-uWNvgve1.js} +4 -10
- package/dist/contexts/contexts.cjs.js +1 -1
- package/dist/contexts/contexts.es.js +1 -1
- package/dist/layouts/layouts.cjs.js +1 -1
- package/dist/layouts/layouts.es.js +1 -1
- package/dist/legacy/legacy.cjs.js +1 -1
- package/dist/legacy/legacy.es.js +1 -1
- package/dist/onyx.cjs.js +1 -1
- package/dist/onyx.es.js +1 -1
- package/dist/pages/pages.cjs.js +1 -1
- package/dist/pages/pages.es.js +1 -1
- package/dist/utils/utils.cjs.js +1 -1
- package/dist/utils/utils.es.js +1 -1
- package/package.json +1 -1
|
@@ -6,4 +6,4 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var q=J(Y,K,H,G,U+"."+K,
|
|
|
6
6
|
`},Hm={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function Ym(t){let{announcements:e=Hm,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=Wm}=t;const{announce:o,announcement:i}=Fm(),l=Nn("DndLiveRegion"),[a,d]=k.useState(!1);if(k.useEffect(()=>{d(!0)},[]),Vm(k.useMemo(()=>({onDragStart(u){let{active:f}=u;o(e.onDragStart({active:f}))},onDragMove(u){let{active:f,over:m}=u;e.onDragMove&&o(e.onDragMove({active:f,over:m}))},onDragOver(u){let{active:f,over:m}=u;o(e.onDragOver({active:f,over:m}))},onDragEnd(u){let{active:f,over:m}=u;o(e.onDragEnd({active:f,over:m}))},onDragCancel(u){let{active:f,over:m}=u;o(e.onDragCancel({active:f,over:m}))}}),[o,e])),!a)return null;const c=k.createElement(k.Fragment,null,k.createElement(Lm,{id:r,value:s.draggable}),k.createElement(zm,{id:l,announcement:i}));return n?rt.createPortal(c,n):c}var Ie;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Ie||(Ie={}));function nr(){}function Xt(t,e){return k.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function Ss(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return k.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const ct=Object.freeze({x:0,y:0});function sl(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function qm(t,e){const n=tr(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function ol(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function Gm(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function ko(t){let{left:e,top:n,height:r,width:s}=t;return[{x:e,y:n},{x:e+s,y:n},{x:e,y:n+r},{x:e+s,y:n+r}]}function il(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function Ro(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const ll=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=Ro(e,e.left,e.top),o=[];for(const i of r){const{id:l}=i,a=n.get(l);if(a){const d=sl(Ro(a),s);o.push({id:l,data:{droppableContainer:i,value:d}})}}return o.sort(ol)},al=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=ko(e),o=[];for(const i of r){const{id:l}=i,a=n.get(l);if(a){const d=ko(a),c=s.reduce((f,m,h)=>f+sl(d[h],m),0),u=Number((c/4).toFixed(4));o.push({id:l,data:{droppableContainer:i,value:u}})}}return o.sort(ol)};function Um(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height),i=s-r,l=o-n;if(r<s&&n<o){const a=e.width*e.height,d=t.width*t.height,c=i*l,u=c/(a+d-c);return Number(u.toFixed(4))}return 0}const Km=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=[];for(const o of r){const{id:i}=o,l=n.get(i);if(l){const a=Um(l,e);a>0&&s.push({id:i,data:{droppableContainer:o,value:a}})}}return s.sort(Gm)};function Xm(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function cl(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:ct}function Qm(t){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return s.reduce((i,l)=>({...i,top:i.top+t*l.y,bottom:i.bottom+t*l.y,left:i.left+t*l.x,right:i.right+t*l.x}),{...n})}}const Jm=Qm(1);function dl(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function Zm(t,e,n){const r=dl(e);if(!r)return t;const{scaleX:s,scaleY:o,x:i,y:l}=r,a=t.left-i-(1-s)*parseFloat(n),d=t.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=s?t.width/s:t.width,u=o?t.height/o:t.height;return{width:c,height:u,top:d,right:a+c,bottom:d+u,left:a}}const e1={ignoreTransform:!1};function on(t,e){e===void 0&&(e=e1);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:d,transformOrigin:c}=Ve(t).getComputedStyle(t);d&&(n=Zm(n,d,c))}const{top:r,left:s,width:o,height:i,bottom:l,right:a}=n;return{top:r,left:s,width:o,height:i,bottom:l,right:a}}function No(t){return on(t,{ignoreTransform:!0})}function t1(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function n1(t,e){return e===void 0&&(e=Ve(t).getComputedStyle(t)),e.position==="fixed"}function r1(t,e){e===void 0&&(e=Ve(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const o=e[s];return typeof o=="string"?n.test(o):!1})}function xr(t,e){const n=[];function r(s){if(e!=null&&n.length>=e||!s)return n;if(Es(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!kn(s)||tl(s)||n.includes(s))return n;const o=Ve(t).getComputedStyle(s);return s!==t&&r1(s,o)&&n.push(s),n1(s,o)?n:r(s.parentNode)}return t?r(t):n}function ul(t){const[e]=xr(t,1);return e??null}function Yr(t){return!pr||!t?null:rn(t)?t:Os(t)?Es(t)||t===sn(t).scrollingElement?window:kn(t)?t:null:null}function fl(t){return rn(t)?t.scrollX:t.scrollLeft}function ml(t){return rn(t)?t.scrollY:t.scrollTop}function rs(t){return{x:fl(t),y:ml(t)}}var _e;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(_e||(_e={}));function pl(t){return!pr||!t?!1:t===document.scrollingElement}function hl(t){const e={x:0,y:0},n=pl(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},s=t.scrollTop<=e.y,o=t.scrollLeft<=e.x,i=t.scrollTop>=r.y,l=t.scrollLeft>=r.x;return{isTop:s,isLeft:o,isBottom:i,isRight:l,maxScroll:r,minScroll:e}}const s1={x:.2,y:.2};function o1(t,e,n,r,s){let{top:o,left:i,right:l,bottom:a}=n;r===void 0&&(r=10),s===void 0&&(s=s1);const{isTop:d,isBottom:c,isLeft:u,isRight:f}=hl(t),m={x:0,y:0},h={x:0,y:0},p={height:e.height*s.y,width:e.width*s.x};return!d&&o<=e.top+p.height?(m.y=_e.Backward,h.y=r*Math.abs((e.top+p.height-o)/p.height)):!c&&a>=e.bottom-p.height&&(m.y=_e.Forward,h.y=r*Math.abs((e.bottom-p.height-a)/p.height)),!f&&l>=e.right-p.width?(m.x=_e.Forward,h.x=r*Math.abs((e.right-p.width-l)/p.width)):!u&&i<=e.left+p.width&&(m.x=_e.Backward,h.x=r*Math.abs((e.left+p.width-i)/p.width)),{direction:m,speed:h}}function i1(t){if(t===document.scrollingElement){const{innerWidth:o,innerHeight:i}=window;return{top:0,left:0,right:o,bottom:i,width:o,height:i}}const{top:e,left:n,right:r,bottom:s}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:s,width:t.clientWidth,height:t.clientHeight}}function gl(t){return t.reduce((e,n)=>Gt(e,rs(n)),ct)}function l1(t){return t.reduce((e,n)=>e+fl(n),0)}function a1(t){return t.reduce((e,n)=>e+ml(n),0)}function xl(t,e){if(e===void 0&&(e=on),!t)return;const{top:n,left:r,bottom:s,right:o}=e(t);ul(t)&&(s<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const c1=[["x",["left","right"],l1],["y",["top","bottom"],a1]];class ks{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=xr(n),s=gl(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,i,l]of c1)for(const a of i)Object.defineProperty(this,a,{get:()=>{const d=l(r),c=s[o]-d;return this.rect[a]+c},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class xn{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var s;(s=this.target)==null||s.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function d1(t){const{EventTarget:e}=Ve(t);return t instanceof e?t:sn(t)}function qr(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var nt;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(nt||(nt={}));function jo(t){t.preventDefault()}function u1(t){t.stopPropagation()}var ge;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(ge||(ge={}));const bl={start:[ge.Space,ge.Enter],cancel:[ge.Esc],end:[ge.Space,ge.Enter,ge.Tab]},f1=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case ge.Right:return{...n,x:n.x+25};case ge.Left:return{...n,x:n.x-25};case ge.Down:return{...n,y:n.y+25};case ge.Up:return{...n,y:n.y-25}}};class jn{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new xn(sn(n)),this.windowListeners=new xn(Ve(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(nt.Resize,this.handleCancel),this.windowListeners.add(nt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(nt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&xl(r),n(ct)}handleKeyDown(e){if(gr(e)){const{active:n,context:r,options:s}=this.props,{keyboardCodes:o=bl,coordinateGetter:i=f1,scrollBehavior:l="smooth"}=s,{code:a}=e;if(o.end.includes(a)){this.handleEnd(e);return}if(o.cancel.includes(a)){this.handleCancel(e);return}const{collisionRect:d}=r.current,c=d?{x:d.left,y:d.top}:ct;this.referenceCoordinates||(this.referenceCoordinates=c);const u=i(e,{active:n,context:r.current,currentCoordinates:c});if(u){const f=wn(u,c),m={x:0,y:0},{scrollableAncestors:h}=r.current;for(const p of h){const g=e.code,{isTop:x,isRight:v,isLeft:y,isBottom:w,maxScroll:C,minScroll:O}=hl(p),S=i1(p),E={x:Math.min(g===ge.Right?S.right-S.width/2:S.right,Math.max(g===ge.Right?S.left:S.left+S.width/2,u.x)),y:Math.min(g===ge.Down?S.bottom-S.height/2:S.bottom,Math.max(g===ge.Down?S.top:S.top+S.height/2,u.y))},R=g===ge.Right&&!v||g===ge.Left&&!y,N=g===ge.Down&&!w||g===ge.Up&&!x;if(R&&E.x!==u.x){const j=p.scrollLeft+f.x,D=g===ge.Right&&j<=C.x||g===ge.Left&&j>=O.x;if(D&&!f.y){p.scrollTo({left:j,behavior:l});return}D?m.x=p.scrollLeft-j:m.x=g===ge.Right?p.scrollLeft-C.x:p.scrollLeft-O.x,m.x&&p.scrollBy({left:-m.x,behavior:l});break}else if(N&&E.y!==u.y){const j=p.scrollTop+f.y,D=g===ge.Down&&j<=C.y||g===ge.Up&&j>=O.y;if(D&&!f.x){p.scrollTo({top:j,behavior:l});return}D?m.y=p.scrollTop-j:m.y=g===ge.Down?p.scrollTop-C.y:p.scrollTop-O.y,m.y&&p.scrollBy({top:-m.y,behavior:l});break}}this.handleMove(e,Gt(wn(u,this.referenceCoordinates),m))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}jn.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=bl,onActivation:s}=e,{active:o}=n;const{code:i}=t.nativeEvent;if(r.start.includes(i)){const l=o.activatorNode.current;return l&&t.target!==l?!1:(t.preventDefault(),s?.({event:t.nativeEvent}),!0)}return!1}}];function Do(t){return!!(t&&"distance"in t)}function Po(t){return!!(t&&"delay"in t)}class Rs{constructor(e,n,r){var s;r===void 0&&(r=d1(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:o}=e,{target:i}=o;this.props=e,this.events=n,this.document=sn(i),this.documentListeners=new xn(this.document),this.listeners=new xn(r),this.windowListeners=new xn(Ve(i)),this.initialCoordinates=(s=tr(o))!=null?s:ct,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(nt.Resize,this.handleCancel),this.windowListeners.add(nt.DragStart,jo),this.windowListeners.add(nt.VisibilityChange,this.handleCancel),this.windowListeners.add(nt.ContextMenu,jo),this.documentListeners.add(nt.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Po(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Do(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:s}=this.props;s(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(nt.Click,u1,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(nt.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:s,props:o}=this,{onMove:i,options:{activationConstraint:l}}=o;if(!s)return;const a=(n=tr(e))!=null?n:ct,d=wn(s,a);if(!r&&l){if(Do(l)){if(l.tolerance!=null&&qr(d,l.tolerance))return this.handleCancel();if(qr(d,l.distance))return this.handleStart()}if(Po(l)&&qr(d,l.tolerance))return this.handleCancel();this.handlePending(l,d);return}e.cancelable&&e.preventDefault(),i(a)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===ge.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const m1={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Dn extends Rs{constructor(e){const{event:n}=e,r=sn(n.target);super(e,m1,r)}}Dn.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const p1={move:{name:"mousemove"},end:{name:"mouseup"}};var ss;(function(t){t[t.RightClick=2]="RightClick"})(ss||(ss={}));class h1 extends Rs{constructor(e){super(e,p1,sn(e.event.target))}}h1.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===ss.RightClick?!1:(r?.({event:n}),!0)}}];const Gr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class g1 extends Rs{constructor(e){super(e,Gr)}static setup(){return window.addEventListener(Gr.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Gr.move.name,e)};function e(){}}}g1.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:s}=n;return s.length>1?!1:(r?.({event:n}),!0)}}];var bn;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(bn||(bn={}));var rr;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(rr||(rr={}));function x1(t){let{acceleration:e,activator:n=bn.Pointer,canScroll:r,draggingRect:s,enabled:o,interval:i=5,order:l=rr.TreeOrder,pointerCoordinates:a,scrollableAncestors:d,scrollableAncestorRects:c,delta:u,threshold:f}=t;const m=v1({delta:u,disabled:!o}),[h,p]=Mm(),g=k.useRef({x:0,y:0}),x=k.useRef({x:0,y:0}),v=k.useMemo(()=>{switch(n){case bn.Pointer:return a?{top:a.y,bottom:a.y,left:a.x,right:a.x}:null;case bn.DraggableRect:return s}},[n,s,a]),y=k.useRef(null),w=k.useCallback(()=>{const O=y.current;if(!O)return;const S=g.current.x*x.current.x,E=g.current.y*x.current.y;O.scrollBy(S,E)},[]),C=k.useMemo(()=>l===rr.TreeOrder?[...d].reverse():d,[l,d]);k.useEffect(()=>{if(!o||!d.length||!v){p();return}for(const O of C){if(r?.(O)===!1)continue;const S=d.indexOf(O),E=c[S];if(!E)continue;const{direction:R,speed:N}=o1(O,E,v,e,f);for(const j of["x","y"])m[j][R[j]]||(N[j]=0,R[j]=0);if(N.x>0||N.y>0){p(),y.current=O,h(w,i),g.current=N,x.current=R;return}}g.current={x:0,y:0},x.current={x:0,y:0},p()},[e,w,r,p,o,i,JSON.stringify(v),JSON.stringify(m),h,d,C,c,JSON.stringify(f)])}const b1={x:{[_e.Backward]:!1,[_e.Forward]:!1},y:{[_e.Backward]:!1,[_e.Forward]:!1}};function v1(t){let{delta:e,disabled:n}=t;const r=er(e);return Rn(s=>{if(n||!r||!s)return b1;const o={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[_e.Backward]:s.x[_e.Backward]||o.x===-1,[_e.Forward]:s.x[_e.Forward]||o.x===1},y:{[_e.Backward]:s.y[_e.Backward]||o.y===-1,[_e.Forward]:s.y[_e.Forward]||o.y===1}}},[n,e,r])}function y1(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return Rn(s=>{var o;return e==null?null:(o=r??s)!=null?o:null},[r,e])}function w1(t,e){return k.useMemo(()=>t.reduce((n,r)=>{const{sensor:s}=r,o=s.activators.map(i=>({eventName:i.eventName,handler:e(i.handler,r)}));return[...n,...o]},[]),[t,e])}var Cn;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Cn||(Cn={}));var os;(function(t){t.Optimized="optimized"})(os||(os={}));const To=new Map;function C1(t,e){let{dragging:n,dependencies:r,config:s}=e;const[o,i]=k.useState(null),{frequency:l,measure:a,strategy:d}=s,c=k.useRef(t),u=g(),f=yn(u),m=k.useCallback(function(x){x===void 0&&(x=[]),!f.current&&i(v=>v===null?x:v.concat(x.filter(y=>!v.includes(y))))},[f]),h=k.useRef(null),p=Rn(x=>{if(u&&!n)return To;if(!x||x===To||c.current!==t||o!=null){const v=new Map;for(let y of t){if(!y)continue;if(o&&o.length>0&&!o.includes(y.id)&&y.rect.current){v.set(y.id,y.rect.current);continue}const w=y.node.current,C=w?new ks(a(w),w):null;y.rect.current=C,C&&v.set(y.id,C)}return v}return x},[t,o,n,u,a]);return k.useEffect(()=>{c.current=t},[t]),k.useEffect(()=>{u||m()},[n,u]),k.useEffect(()=>{o&&o.length>0&&i(null)},[JSON.stringify(o)]),k.useEffect(()=>{u||typeof l!="number"||h.current!==null||(h.current=setTimeout(()=>{m(),h.current=null},l))},[l,u,m,...r]),{droppableRects:p,measureDroppableContainers:m,measuringScheduled:o!=null};function g(){switch(d){case Cn.Always:return!1;case Cn.BeforeDragging:return n;default:return!n}}}function Ns(t,e){return Rn(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function O1(t,e){return Ns(t,e)}function E1(t){let{callback:e,disabled:n}=t;const r=hr(e),s=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return k.useEffect(()=>()=>s?.disconnect(),[s]),s}function br(t){let{callback:e,disabled:n}=t;const r=hr(e),s=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return k.useEffect(()=>()=>s?.disconnect(),[s]),s}function S1(t){return new ks(on(t),t)}function Mo(t,e,n){e===void 0&&(e=S1);const[r,s]=k.useState(null);function o(){s(a=>{if(!t)return null;if(t.isConnected===!1){var d;return(d=a??n)!=null?d:null}const c=e(t);return JSON.stringify(a)===JSON.stringify(c)?a:c})}const i=E1({callback(a){if(t)for(const d of a){const{type:c,target:u}=d;if(c==="childList"&&u instanceof HTMLElement&&u.contains(t)){o();break}}}}),l=br({callback:o});return lt(()=>{o(),t?(l?.observe(t),i?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),i?.disconnect())},[t]),r}function k1(t){const e=Ns(t);return cl(t,e)}const Io=[];function R1(t){const e=k.useRef(t),n=Rn(r=>t?r&&r!==Io&&t&&e.current&&t.parentNode===e.current.parentNode?r:xr(t):Io,[t]);return k.useEffect(()=>{e.current=t},[t]),n}function N1(t){const[e,n]=k.useState(null),r=k.useRef(t),s=k.useCallback(o=>{const i=Yr(o.target);i&&n(l=>l?(l.set(i,rs(i)),new Map(l)):null)},[]);return k.useEffect(()=>{const o=r.current;if(t!==o){i(o);const l=t.map(a=>{const d=Yr(a);return d?(d.addEventListener("scroll",s,{passive:!0}),[d,rs(d)]):null}).filter(a=>a!=null);n(l.length?new Map(l):null),r.current=t}return()=>{i(t),i(o)};function i(l){l.forEach(a=>{const d=Yr(a);d?.removeEventListener("scroll",s)})}},[s,t]),k.useMemo(()=>t.length?e?Array.from(e.values()).reduce((o,i)=>Gt(o,i),ct):gl(t):ct,[t,e])}function Ao(t,e){e===void 0&&(e=[]);const n=k.useRef(null);return k.useEffect(()=>{n.current=null},e),k.useEffect(()=>{const r=t!==ct;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?wn(t,n.current):ct}function j1(t){k.useEffect(()=>{if(!pr)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n?.()}},t.map(e=>{let{sensor:n}=e;return n}))}function D1(t,e){return k.useMemo(()=>t.reduce((n,r)=>{let{eventName:s,handler:o}=r;return n[s]=i=>{o(i,e)},n},{}),[t,e])}function vl(t){return k.useMemo(()=>t?t1(t):null,[t])}const _o=[];function P1(t,e){e===void 0&&(e=on);const[n]=t,r=vl(n?Ve(n):null),[s,o]=k.useState(_o);function i(){o(()=>t.length?t.map(a=>pl(a)?r:new ks(e(a),a)):_o)}const l=br({callback:i});return lt(()=>{l?.disconnect(),i(),t.forEach(a=>l?.observe(a))},[t]),s}function yl(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return kn(e)?e:t}function T1(t){let{measure:e}=t;const[n,r]=k.useState(null),s=k.useCallback(d=>{for(const{target:c}of d)if(kn(c)){r(u=>{const f=e(c);return u?{...u,width:f.width,height:f.height}:f});break}},[e]),o=br({callback:s}),i=k.useCallback(d=>{const c=yl(d);o?.disconnect(),c&&o?.observe(c),r(c?e(c):null)},[e,o]),[l,a]=Zn(i);return k.useMemo(()=>({nodeRef:l,rect:n,setRef:a}),[n,l,a])}const M1=[{sensor:Dn,options:{}},{sensor:jn,options:{}}],I1={current:{}},qn={draggable:{measure:No},droppable:{measure:No,strategy:Cn.WhileDragging,frequency:os.Optimized},dragOverlay:{measure:on}};class vn extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const A1={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new vn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:nr},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:qn,measureDroppableContainers:nr,windowRect:null,measuringScheduled:!1},wl={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:nr,draggableNodes:new Map,over:null,measureDroppableContainers:nr},Pn=k.createContext(wl),Cl=k.createContext(A1);function _1(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new vn}}}function $1(t,e){switch(e.type){case Ie.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case Ie.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case Ie.DragEnd:case Ie.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ie.RegisterDroppable:{const{element:n}=e,{id:r}=n,s=new vn(t.droppable.containers);return s.set(r,n),{...t,droppable:{...t.droppable,containers:s}}}case Ie.SetDroppableDisabled:{const{id:n,key:r,disabled:s}=e,o=t.droppable.containers.get(n);if(!o||r!==o.key)return t;const i=new vn(t.droppable.containers);return i.set(n,{...o,disabled:s}),{...t,droppable:{...t.droppable,containers:i}}}case Ie.UnregisterDroppable:{const{id:n,key:r}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const o=new vn(t.droppable.containers);return o.delete(n),{...t,droppable:{...t.droppable,containers:o}}}default:return t}}function L1(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:s}=k.useContext(Pn),o=er(r),i=er(n?.id);return k.useEffect(()=>{if(!e&&!r&&o&&i!=null){if(!gr(o)||document.activeElement===o.target)return;const l=s.get(i);if(!l)return;const{activatorNode:a,node:d}=l;if(!a.current&&!d.current)return;requestAnimationFrame(()=>{for(const c of[a.current,d.current]){if(!c)continue;const u=_m(c);if(u){u.focus();break}}})}},[r,e,s,i,o]),null}function Ol(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((s,o)=>o({transform:s,...r}),n):n}function z1(t){return k.useMemo(()=>({draggable:{...qn.draggable,...t?.draggable},droppable:{...qn.droppable,...t?.droppable},dragOverlay:{...qn.dragOverlay,...t?.dragOverlay}}),[t?.draggable,t?.droppable,t?.dragOverlay])}function F1(t){let{activeNode:e,measure:n,initialRect:r,config:s=!0}=t;const o=k.useRef(!1),{x:i,y:l}=typeof s=="boolean"?{x:s,y:s}:s;lt(()=>{if(!i&&!l||!e){o.current=!1;return}if(o.current||!r)return;const d=e?.node.current;if(!d||d.isConnected===!1)return;const c=n(d),u=cl(c,r);if(i||(u.x=0),l||(u.y=0),o.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const f=ul(d);f&&f.scrollBy({top:u.y,left:u.x})}},[e,i,l,r,n])}const vr=k.createContext({...ct,scaleX:1,scaleY:1});var Tt;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Tt||(Tt={}));const yr=k.memo(function(e){var n,r,s,o;let{id:i,accessibility:l,autoScroll:a=!0,children:d,sensors:c=M1,collisionDetection:u=Km,measuring:f,modifiers:m,...h}=e;const p=k.useReducer($1,void 0,_1),[g,x]=p,[v,y]=Bm(),[w,C]=k.useState(Tt.Uninitialized),O=w===Tt.Initialized,{draggable:{active:S,nodes:E,translate:R},droppable:{containers:N}}=g,j=S!=null?E.get(S):null,D=k.useRef({initial:null,translated:null}),P=k.useMemo(()=>{var Le;return S!=null?{id:S,data:(Le=j?.data)!=null?Le:I1,rect:D}:null},[S,j]),M=k.useRef(null),[L,_]=k.useState(null),[T,A]=k.useState(null),V=yn(h,Object.values(h)),$=Nn("DndDescribedBy",i),F=k.useMemo(()=>N.getEnabled(),[N]),W=z1(f),{droppableRects:B,measureDroppableContainers:H,measuringScheduled:G}=C1(F,{dragging:O,dependencies:[R.x,R.y],config:W.droppable}),U=y1(E,S),Y=k.useMemo(()=>T?tr(T):null,[T]),Q=Ka(),X=O1(U,W.draggable.measure);F1({activeNode:S!=null?E.get(S):null,config:Q.layoutShiftCompensation,initialRect:X,measure:W.draggable.measure});const K=Mo(U,W.draggable.measure,X),J=Mo(U?U.parentElement:null),q=k.useRef({activatorEvent:null,active:null,activeNode:U,collisionRect:null,collisions:null,droppableRects:B,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=N.getNodeFor((n=q.current.over)==null?void 0:n.id),Z=T1({measure:W.dragOverlay.measure}),te=(r=Z.nodeRef.current)!=null?r:U,le=O?(s=Z.rect)!=null?s:K:null,ce=!!(Z.nodeRef.current&&Z.rect),fe=k1(ce?null:K),he=vl(te?Ve(te):null),ee=R1(O?ne??U:null),ie=P1(ee),oe=Ol(m,{transform:{x:R.x-fe.x,y:R.y-fe.y,scaleX:1,scaleY:1},activatorEvent:T,active:P,activeNodeRect:K,containerNodeRect:J,draggingNodeRect:le,over:q.current.over,overlayNodeRect:Z.rect,scrollableAncestors:ee,scrollableAncestorRects:ie,windowRect:he}),me=Y?Gt(Y,R):null,Oe=N1(ee),ke=Ao(Oe),Ye=Ao(Oe,[K]),qe=Gt(oe,ke),Ge=le?Jm(le,oe):null,et=P&&Ge?u({active:P,collisionRect:Ge,droppableRects:B,droppableContainers:F,pointerCoordinates:me}):null,vt=il(et,"id"),[Fe,$t]=k.useState(null),Ee=ce?oe:Gt(oe,Ye),be=Xm(Ee,(o=Fe?.rect)!=null?o:null,K),je=k.useRef(null),ve=k.useCallback((Le,Ue)=>{let{sensor:Ke,options:kt}=Ue;if(M.current==null)return;const tt=E.get(M.current);if(!tt)return;const Xe=Le.nativeEvent,ut=new Ke({active:M.current,activeNode:tt,event:Xe,options:kt,context:q,onAbort($e){if(!E.get($e))return;const{onDragAbort:ft}=V.current,yt={id:$e};ft?.(yt),v({type:"onDragAbort",event:yt})},onPending($e,Rt,ft,yt){if(!E.get($e))return;const{onDragPending:un}=V.current,Nt={id:$e,constraint:Rt,initialCoordinates:ft,offset:yt};un?.(Nt),v({type:"onDragPending",event:Nt})},onStart($e){const Rt=M.current;if(Rt==null)return;const ft=E.get(Rt);if(!ft)return;const{onDragStart:yt}=V.current,dn={activatorEvent:Xe,active:{id:Rt,data:ft.data,rect:D}};rt.unstable_batchedUpdates(()=>{yt?.(dn),C(Tt.Initializing),x({type:Ie.DragStart,initialCoordinates:$e,active:Rt}),v({type:"onDragStart",event:dn}),_(je.current),A(Xe)})},onMove($e){x({type:Ie.DragMove,coordinates:$e})},onEnd:Wt(Ie.DragEnd),onCancel:Wt(Ie.DragCancel)});je.current=ut;function Wt($e){return async function(){const{active:ft,collisions:yt,over:dn,scrollAdjustedTranslate:un}=q.current;let Nt=null;if(ft&&un){const{cancelDrop:fn}=V.current;Nt={activatorEvent:Xe,active:ft,collisions:yt,delta:un,over:dn},$e===Ie.DragEnd&&typeof fn=="function"&&await Promise.resolve(fn(Nt))&&($e=Ie.DragCancel)}M.current=null,rt.unstable_batchedUpdates(()=>{x({type:$e}),C(Tt.Uninitialized),$t(null),_(null),A(null),je.current=null;const fn=$e===Ie.DragEnd?"onDragEnd":"onDragCancel";if(Nt){const Dr=V.current[fn];Dr?.(Nt),v({type:fn,event:Nt})}})}}},[E]),Be=k.useCallback((Le,Ue)=>(Ke,kt)=>{const tt=Ke.nativeEvent,Xe=E.get(kt);if(M.current!==null||!Xe||tt.dndKit||tt.defaultPrevented)return;const ut={active:Xe};Le(Ke,Ue.options,ut)===!0&&(tt.dndKit={capturedBy:Ue.sensor},M.current=kt,ve(Ke,Ue))},[E,ve]),An=w1(c,Be);j1(c),lt(()=>{K&&w===Tt.Initializing&&C(Tt.Initialized)},[K,w]),k.useEffect(()=>{const{onDragMove:Le}=V.current,{active:Ue,activatorEvent:Ke,collisions:kt,over:tt}=q.current;if(!Ue||!Ke)return;const Xe={active:Ue,activatorEvent:Ke,collisions:kt,delta:{x:qe.x,y:qe.y},over:tt};rt.unstable_batchedUpdates(()=>{Le?.(Xe),v({type:"onDragMove",event:Xe})})},[qe.x,qe.y]),k.useEffect(()=>{const{active:Le,activatorEvent:Ue,collisions:Ke,droppableContainers:kt,scrollAdjustedTranslate:tt}=q.current;if(!Le||M.current==null||!Ue||!tt)return;const{onDragOver:Xe}=V.current,ut=kt.get(vt),Wt=ut&&ut.rect.current?{id:ut.id,rect:ut.rect.current,data:ut.data,disabled:ut.disabled}:null,$e={active:Le,activatorEvent:Ue,collisions:Ke,delta:{x:tt.x,y:tt.y},over:Wt};rt.unstable_batchedUpdates(()=>{$t(Wt),Xe?.($e),v({type:"onDragOver",event:$e})})},[vt]),lt(()=>{q.current={activatorEvent:T,active:P,activeNode:U,collisionRect:Ge,collisions:et,droppableRects:B,draggableNodes:E,draggingNode:te,draggingNodeRect:le,droppableContainers:N,over:Fe,scrollableAncestors:ee,scrollAdjustedTranslate:qe},D.current={initial:le,translated:Ge}},[P,U,et,Ge,E,te,le,B,N,Fe,ee,qe]),x1({...Q,delta:R,draggingRect:Ge,pointerCoordinates:me,scrollableAncestors:ee,scrollableAncestorRects:ie});const jr=k.useMemo(()=>({active:P,activeNode:U,activeNodeRect:K,activatorEvent:T,collisions:et,containerNodeRect:J,dragOverlay:Z,draggableNodes:E,droppableContainers:N,droppableRects:B,over:Fe,measureDroppableContainers:H,scrollableAncestors:ee,scrollableAncestorRects:ie,measuringConfiguration:W,measuringScheduled:G,windowRect:he}),[P,U,K,T,et,J,Z,E,N,B,Fe,H,ee,ie,W,G,he]),_n=k.useMemo(()=>({activatorEvent:T,activators:An,active:P,activeNodeRect:K,ariaDescribedById:{draggable:$},dispatch:x,draggableNodes:E,over:Fe,measureDroppableContainers:H}),[T,An,P,K,x,$,E,Fe,H]);return k.createElement(rl.Provider,{value:y},k.createElement(Pn.Provider,{value:_n},k.createElement(Cl.Provider,{value:jr},k.createElement(vr.Provider,{value:be},d)),k.createElement(L1,{disabled:l?.restoreFocus===!1})),k.createElement(Ym,{...l,hiddenTextDescribedById:$}));function Ka(){const Le=L?.autoScrollEnabled===!1,Ue=typeof a=="object"?a.enabled===!1:a===!1,Ke=O&&!Le&&!Ue;return typeof a=="object"?{...a,enabled:Ke}:{enabled:Ke}}}),V1=k.createContext(null),$o="button",B1="Draggable";function El(t){let{id:e,data:n,disabled:r=!1,attributes:s}=t;const o=Nn(B1),{activators:i,activatorEvent:l,active:a,activeNodeRect:d,ariaDescribedById:c,draggableNodes:u,over:f}=k.useContext(Pn),{role:m=$o,roleDescription:h="draggable",tabIndex:p=0}=s??{},g=a?.id===e,x=k.useContext(g?vr:V1),[v,y]=Zn(),[w,C]=Zn(),O=D1(i,e),S=yn(n);lt(()=>(u.set(e,{id:e,key:o,node:v,activatorNode:w,data:S}),()=>{const R=u.get(e);R&&R.key===o&&u.delete(e)}),[u,e]);const E=k.useMemo(()=>({role:m,tabIndex:p,"aria-disabled":r,"aria-pressed":g&&m===$o?!0:void 0,"aria-roledescription":h,"aria-describedby":c.draggable}),[r,m,p,g,h,c.draggable]);return{active:a,activatorEvent:l,activeNodeRect:d,attributes:E,isDragging:g,listeners:r?void 0:O,node:v,over:f,setNodeRef:y,setActivatorNodeRef:C,transform:x}}function Sl(){return k.useContext(Cl)}const W1="Droppable",H1={timeout:25};function js(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:s}=t;const o=Nn(W1),{active:i,dispatch:l,over:a,measureDroppableContainers:d}=k.useContext(Pn),c=k.useRef({disabled:n}),u=k.useRef(!1),f=k.useRef(null),m=k.useRef(null),{disabled:h,updateMeasurementsFor:p,timeout:g}={...H1,...s},x=yn(p??r),v=k.useCallback(()=>{if(!u.current){u.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{d(Array.isArray(x.current)?x.current:[x.current]),m.current=null},g)},[g]),y=br({callback:v,disabled:h||!i}),w=k.useCallback((E,R)=>{y&&(R&&(y.unobserve(R),u.current=!1),E&&y.observe(E))},[y]),[C,O]=Zn(w),S=yn(e);return k.useEffect(()=>{!y||!C.current||(y.disconnect(),u.current=!1,y.observe(C.current))},[C,y]),k.useEffect(()=>(l({type:Ie.RegisterDroppable,element:{id:r,key:o,disabled:n,node:C,rect:f,data:S}}),()=>l({type:Ie.UnregisterDroppable,key:o,id:r})),[r]),k.useEffect(()=>{n!==c.current.disabled&&(l({type:Ie.SetDroppableDisabled,id:r,key:o,disabled:n}),c.current.disabled=n)},[r,o,n,l]),{active:i,rect:f,isOver:a?.id===r,node:C,over:a,setNodeRef:O}}function Y1(t){let{animation:e,children:n}=t;const[r,s]=k.useState(null),[o,i]=k.useState(null),l=er(n);return!n&&!r&&l&&s(l),lt(()=>{if(!o)return;const a=r?.key,d=r?.props.id;if(a==null||d==null){s(null);return}Promise.resolve(e(d,o)).then(()=>{s(null)})},[e,r,o]),k.createElement(k.Fragment,null,n,r?k.cloneElement(r,{ref:i}):null)}const q1={x:0,y:0,scaleX:1,scaleY:1};function G1(t){let{children:e}=t;return k.createElement(Pn.Provider,{value:wl},k.createElement(vr.Provider,{value:q1},e))}const U1={position:"fixed",touchAction:"none"},K1=t=>gr(t)?"transform 250ms ease":void 0,X1=k.forwardRef((t,e)=>{let{as:n,activatorEvent:r,adjustScale:s,children:o,className:i,rect:l,style:a,transform:d,transition:c=K1}=t;if(!l)return null;const u=s?d:{...d,scaleX:1,scaleY:1},f={...U1,width:l.width,height:l.height,top:l.top,left:l.left,transform:at.Transform.toString(u),transformOrigin:s&&r?qm(r,l):void 0,transition:typeof c=="function"?c(r):c,...a};return k.createElement(n,{className:i,style:f,ref:e},o)}),Q1=t=>e=>{let{active:n,dragOverlay:r}=e;const s={},{styles:o,className:i}=t;if(o!=null&&o.active)for(const[l,a]of Object.entries(o.active))a!==void 0&&(s[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,a));if(o!=null&&o.dragOverlay)for(const[l,a]of Object.entries(o.dragOverlay))a!==void 0&&r.node.style.setProperty(l,a);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[a,d]of Object.entries(s))n.node.style.setProperty(a,d);i!=null&&i.active&&n.node.classList.remove(i.active)}},J1=t=>{let{transform:{initial:e,final:n}}=t;return[{transform:at.Transform.toString(e)},{transform:at.Transform.toString(n)}]},Z1={duration:250,easing:"ease",keyframes:J1,sideEffects:Q1({styles:{active:{opacity:"0"}}})};function ep(t){let{config:e,draggableNodes:n,droppableContainers:r,measuringConfiguration:s}=t;return hr((o,i)=>{if(e===null)return;const l=n.get(o);if(!l)return;const a=l.node.current;if(!a)return;const d=yl(i);if(!d)return;const{transform:c}=Ve(i).getComputedStyle(i),u=dl(c);if(!u)return;const f=typeof e=="function"?e:tp(e);return xl(a,s.draggable.measure),f({active:{id:o,data:l.data,node:a,rect:s.draggable.measure(a)},draggableNodes:n,dragOverlay:{node:i,rect:s.dragOverlay.measure(d)},droppableContainers:r,measuringConfiguration:s,transform:u})})}function tp(t){const{duration:e,easing:n,sideEffects:r,keyframes:s}={...Z1,...t};return o=>{let{active:i,dragOverlay:l,transform:a,...d}=o;if(!e)return;const c={x:l.rect.left-i.rect.left,y:l.rect.top-i.rect.top},u={scaleX:a.scaleX!==1?i.rect.width*a.scaleX/l.rect.width:1,scaleY:a.scaleY!==1?i.rect.height*a.scaleY/l.rect.height:1},f={x:a.x-c.x,y:a.y-c.y,...u},m=s({...d,active:i,dragOverlay:l,transform:{initial:a,final:f}}),[h]=m,p=m[m.length-1];if(JSON.stringify(h)===JSON.stringify(p))return;const g=r?.({active:i,dragOverlay:l,...d}),x=l.node.animate(m,{duration:e,easing:n,fill:"forwards"});return new Promise(v=>{x.onfinish=()=>{g?.(),v()}})}}let Lo=0;function np(t){return k.useMemo(()=>{if(t!=null)return Lo++,Lo},[t])}const rp=k.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:r,style:s,transition:o,modifiers:i,wrapperElement:l="div",className:a,zIndex:d=999}=t;const{activatorEvent:c,active:u,activeNodeRect:f,containerNodeRect:m,draggableNodes:h,droppableContainers:p,dragOverlay:g,over:x,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:w,windowRect:C}=Sl(),O=k.useContext(vr),S=np(u?.id),E=Ol(i,{activatorEvent:c,active:u,activeNodeRect:f,containerNodeRect:m,draggingNodeRect:g.rect,over:x,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:w,transform:O,windowRect:C}),R=Ns(f),N=ep({config:r,draggableNodes:h,droppableContainers:p,measuringConfiguration:v}),j=R?g.setRef:void 0;return k.createElement(G1,null,k.createElement(Y1,{animation:N},u&&S?k.createElement(X1,{key:S,id:u.id,ref:j,as:l,activatorEvent:c,adjustScale:e,className:a,transition:o,rect:R,style:{zIndex:d,...s},transform:E},n):null))}),kl=k.createContext(null),sp=t=>{const e=I.compilerRuntimeExports.c(20),{children:n,onDragCancel:r,onDragEnd:s,onDragOver:o,onDragStart:i}=t,[l,a]=k.useState(null),[d,c]=k.useState(null);let u;e[0]!==r?(u=v=>{a(null),c(null),r?.({active:v.active,over:v.over})},e[0]=r,e[1]=u):u=e[1];let f;e[2]!==s?(f=v=>{a(null),c(null),s?.({active:v.active,over:v.over})},e[2]=s,e[3]=f):f=e[3];let m;e[4]!==o?(m=v=>{c(v.over?String(v.over.id):null),o?.({active:v.active,over:v.over})},e[4]=o,e[5]=m):m=e[5];let h;e[6]!==i?(h=v=>{a(String(v.active.id)),i?.({active:v.active,over:null})},e[6]=i,e[7]=h):h=e[7];let p;e[8]!==l||e[9]!==d?(p={activeId:l,overId:d},e[8]=l,e[9]=d,e[10]=p):p=e[10];let g;e[11]!==n||e[12]!==p?(g=b.jsx(kl.Provider,{value:p,children:n}),e[11]=n,e[12]=p,e[13]=g):g=e[13];let x;return e[14]!==u||e[15]!==f||e[16]!==m||e[17]!==h||e[18]!==g?(x=b.jsx(yr,{onDragCancel:u,onDragEnd:f,onDragOver:m,onDragStart:h,children:g}),e[14]=u,e[15]=f,e[16]=m,e[17]=h,e[18]=g,e[19]=x):x=e[19],x},op=(t,e)=>t?"dragging":e?"disabled":"idle",Rl=t=>{const e=I.compilerRuntimeExports.c(32);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,data:s,disabled:l,id:i,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,d=k.useId(),c=i??d;let u;e[7]!==s||e[8]!==a||e[9]!==c?(u={data:s,disabled:a,id:c},e[7]=s,e[8]=a,e[9]=c,e[10]=u):u=e[10];const{attributes:f,isDragging:m,listeners:h,setNodeRef:p,transform:g}=El(u),x=!a&&!m;let v;e[11]!==r||e[12]!==a||e[13]!==m||e[14]!==x?(v=z("touch-none",{"cursor-grab":x,"cursor-grabbing":m,"cursor-not-allowed":a,"z-50":m},r),e[11]=r,e[12]=a,e[13]=m,e[14]=x,e[15]=v):v=e[15];let y;e[16]!==g?(y=at.Translate.toString(g),e[16]=g,e[17]=y):y=e[17];let w;e[18]!==y?(w={transform:y},e[18]=y,e[19]=w):w=e[19];let C;e[20]!==a||e[21]!==m?(C=op(m,a),e[20]=a,e[21]=m,e[22]=C):C=e[22];let O;return e[23]!==f||e[24]!==n||e[25]!==o||e[26]!==h||e[27]!==p||e[28]!==v||e[29]!==w||e[30]!==C?(O=b.jsx("div",{className:v,ref:p,style:w,...o,...h,...f,"data-ox-slot":"draggable","data-ox-state":C,children:n}),e[23]=f,e[24]=n,e[25]=o,e[26]=h,e[27]=p,e[28]=v,e[29]=w,e[30]=C,e[31]=O):O=e[31],O},ip=(t,e)=>t?"over":e?"disabled":"idle",Nl=t=>{const e=I.compilerRuntimeExports.c(23);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,data:s,disabled:l,id:i,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,d=k.useId(),c=i??d;let u;e[7]!==s||e[8]!==a||e[9]!==c?(u={data:s,disabled:a,id:c},e[7]=s,e[8]=a,e[9]=c,e[10]=u):u=e[10];const{isOver:f,setNodeRef:m}=js(u),h=f&&!a;let p;e[11]!==r||e[12]!==h?(p=z({"ring-2 ring-primary":h},r),e[11]=r,e[12]=h,e[13]=p):p=e[13];let g;e[14]!==a||e[15]!==f?(g=ip(f,a),e[14]=a,e[15]=f,e[16]=g):g=e[16];let x;return e[17]!==n||e[18]!==o||e[19]!==m||e[20]!==p||e[21]!==g?(x=b.jsx("div",{className:p,ref:m,...o,"data-ox-slot":"droppable","data-ox-state":g,children:n}),e[17]=n,e[18]=o,e[19]=m,e[20]=p,e[21]=g,e[22]=x):x=e[22],x},lp=()=>{const t=k.useContext(kl);if(!t)throw new Error("Dnd components must be used within OxDndContext");return t},ap=Object.assign(sp,{Draggable:Rl,Droppable:Nl}),jl=k.createContext(void 0),cp=t=>{const e=I.compilerRuntimeExports.c(10),{children:n,defaultOpen:r,onOpenChange:s,open:o}=t,i=r===void 0?!1:r,[l,a]=k.useState(i),d=o!==void 0,c=d?o:l;let u;e[0]!==d||e[1]!==s?(u=p=>{d||a(p),s?.(p)},e[0]=d,e[1]=s,e[2]=u):u=e[2];const f=u;let m;e[3]!==s||e[4]!==c||e[5]!==f?(m={open:c,setOpen:f,onOpenChange:s},e[3]=s,e[4]=c,e[5]=f,e[6]=m):m=e[6];let h;return e[7]!==n||e[8]!==m?(h=b.jsx(jl.Provider,{value:m,children:n}),e[7]=n,e[8]=m,e[9]=h):h=e[9],h},dp=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("flex-1 overflow-y-auto p-4",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"drawer-body",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Dl=()=>{const t=k.useContext(jl);if(t===void 0)throw new Error("useDrawerContext must be used within an OxDrawer component");return t},up={left:"inset-y-0 left-0 h-full w-full sm:w-3/4 sm:max-w-sm border-r",right:"inset-y-0 right-0 h-full w-full sm:w-3/4 sm:max-w-sm border-l",top:"inset-x-0 top-0 w-full max-h-[80vh] border-b",bottom:"inset-x-0 bottom-0 w-full max-h-[80vh] border-t"},fp=t=>{const e=I.compilerRuntimeExports.c(39);let n,r,s,o,i;e[0]!==t?({children:n,className:r,closeOnOutsideClick:o,side:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!0:o,a=i===void 0?"right":i,{open:d,setOpen:c}=Dl(),[u,f]=k.useState(!1),m=k.useRef(null),h=k.useRef(null);let p;e[6]!==c?(p=()=>{c(!1)},e[6]=c,e[7]=p):p=e[7];const g=p;let x;e[8]!==d||e[9]!==u?(x=T=>{T.target===m.current&&!d&&u&&f(!1)},e[8]=d,e[9]=u,e[10]=x):x=e[10];const v=x;let y,w;e[11]!==d?(y=()=>{d&&f(!0)},w=[d],e[11]=d,e[12]=y,e[13]=w):(y=e[12],w=e[13]),k.useEffect(y,w);let C,O;e[14]!==d||e[15]!==u?(C=()=>{if(u)return d&&(h.current=document.activeElement,document.body.classList.add("overflow-hidden"),requestAnimationFrame(()=>{m.current?.focus()})),()=>{document.body.classList.remove("overflow-hidden"),h.current&&(h.current.focus(),h.current=null)}},O=[d,u],e[14]=d,e[15]=u,e[16]=C,e[17]=O):(C=e[16],O=e[17]),k.useEffect(C,O);let S,E;if(e[18]!==l||e[19]!==g||e[20]!==u?(E=()=>{if(!u)return;const T=V=>{V.key==="Escape"&&g()},A=V=>{l&&m.current&&!m.current.contains(V.target)&&g()};return document.addEventListener("keydown",T),l&&document.addEventListener("mousedown",A),()=>{document.removeEventListener("keydown",T),document.removeEventListener("mousedown",A)}},S=[u,l,g],e[18]=l,e[19]=g,e[20]=u,e[21]=S,e[22]=E):(S=e[21],E=e[22]),k.useEffect(E,S),!u)return null;let R;e[23]===Symbol.for("react.memo_cache_sentinel")?(R=z("fixed inset-0","ox-drawer-backdrop"),e[23]=R):R=e[23];const N=d?"open":"closing";let j;e[24]!==N?(j=b.jsx("div",{className:R,"data-ox-slot":"drawer-backdrop","data-ox-state":N}),e[24]=N,e[25]=j):j=e[25];const D=up[a];let P;e[26]!==r||e[27]!==D?(P=z("fixed z-50 flex flex-col bg-background text-foreground","ox-drawer-animate",D,r),e[26]=r,e[27]=D,e[28]=P):P=e[28];const M=d?"open":"closing";let L;e[29]!==n||e[30]!==s||e[31]!==v||e[32]!==a||e[33]!==P||e[34]!==M?(L=b.jsx("div",{"aria-modal":"true",className:P,ref:m,role:"dialog",tabIndex:-1,onAnimationEnd:v,...s,"data-ox-side":a,"data-ox-slot":"drawer-content","data-ox-state":M,children:n}),e[29]=n,e[30]=s,e[31]=v,e[32]=a,e[33]=P,e[34]=M,e[35]=L):L=e[35];let _;return e[36]!==j||e[37]!==L?(_=rt.createPortal(b.jsxs(b.Fragment,{children:[j,L]}),document.body),e[36]=j,e[37]=L,e[38]=_):_=e[38],_},mp=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mx-4 flex shrink-0 flex-col gap-2 border-t py-4",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"drawer-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},pp=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mx-4 flex shrink-0 items-center justify-between border-b py-4",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"drawer-header",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},hp=t=>{const e=I.compilerRuntimeExports.c(17);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:i,onClick:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?!1:i,{setOpen:a}=Dl();let d;e[6]!==l||e[7]!==o||e[8]!==a?(d=m=>{l||(a(!0),o?.(m))},e[6]=l,e[7]=o,e[8]=a,e[9]=d):d=e[9];const c=d,u=l?"disabled":"enabled";let f;return e[10]!==n||e[11]!==r||e[12]!==l||e[13]!==s||e[14]!==c||e[15]!==u?(f=b.jsx(Ze,{className:r,disabled:l,variant:"ghost",onClick:c,...s,"data-ox-slot":"drawer-trigger","data-ox-state":u,children:n}),e[10]=n,e[11]=r,e[12]=l,e[13]=s,e[14]=c,e[15]=u,e[16]=f):f=e[16],f},sr=Object.assign(cp,{Body:dp,Content:fp,Footer:mp,Header:pp,Trigger:hp}),Pl=k.createContext(null),Tl=k.createContext(null),gp=t=>{const e=I.compilerRuntimeExports.c(5),{children:n}=t,[r,s]=k.useState(null);let o;e[0]!==r?(o={anchor:r,onAnchorChange:s},e[0]=r,e[1]=o):o=e[1];let i;return e[2]!==n||e[3]!==o?(i=b.jsx(Pl.Provider,{value:o,children:n}),e[2]=n,e[3]=o,e[4]=i):i=e[4],i},Ds=()=>{const t=k.useContext(Pl);if(!t)throw new Error("usePopperContext must be used within OxPopper");return t},Ml=()=>{const t=k.useContext(Tl);if(!t)throw new Error("usePopperContentContext must be used within OxPopper.Content");return t},xp=dt("OxPopperAnchor","div"),bp=t=>{const e=I.compilerRuntimeExports.c(19);let n,r,s,o;e[0]!==t?({asChild:s,children:n,virtualRef:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=s===void 0?!1:s,l=Ds(),a=k.useRef(null);let d;e[5]!==l?(d=h=>{a.current=h,l.onAnchorChange(h)},e[5]=l,e[6]=d):d=e[6];const c=d;let u,f;if(e[7]!==l||e[8]!==o?(u=()=>{o?.current&&l.onAnchorChange(o.current)},f=[l,o],e[7]=l,e[8]=o,e[9]=u,e[10]=f):(u=e[9],f=e[10]),k.useEffect(u,f),o)return null;if(i){let h;return e[11]!==n||e[12]!==r||e[13]!==c?(h=b.jsx(xp,{ref:c,...r,children:n}),e[11]=n,e[12]=r,e[13]=c,e[14]=h):h=e[14],h}let m;return e[15]!==n||e[16]!==r||e[17]!==c?(m=b.jsx("div",{ref:c,...r,children:n}),e[15]=n,e[16]=r,e[17]=c,e[18]=m):m=e[18],m};function wr(){return typeof window<"u"}function ln(t){return Il(t)?(t.nodeName||"").toLowerCase():"#document"}function Je(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function bt(t){var e;return(e=(Il(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Il(t){return wr()?t instanceof Node||t instanceof Je(t).Node:!1}function ze(t){return wr()?t instanceof Element||t instanceof Je(t).Element:!1}function xt(t){return wr()?t instanceof HTMLElement||t instanceof Je(t).HTMLElement:!1}function zo(t){return!wr()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Je(t).ShadowRoot}const vp=new Set(["inline","contents"]);function Tn(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!vp.has(s)}const yp=new Set(["table","td","th"]);function wp(t){return yp.has(ln(t))}const Cp=[":popover-open",":modal"];function Cr(t){return Cp.some(e=>{try{return t.matches(e)}catch{return!1}})}const Op=["transform","translate","scale","rotate","perspective"],Ep=["transform","translate","scale","rotate","perspective","filter"],Sp=["paint","layout","strict","content"];function Ps(t){const e=Ts(),n=ze(t)?ot(t):t;return Op.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Ep.some(r=>(n.willChange||"").includes(r))||Sp.some(r=>(n.contain||"").includes(r))}function kp(t){let e=Mt(t);for(;xt(e)&&!Qt(e);){if(Ps(e))return e;if(Cr(e))return null;e=Mt(e)}return null}function Ts(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Rp=new Set(["html","body","#document"]);function Qt(t){return Rp.has(ln(t))}function ot(t){return Je(t).getComputedStyle(t)}function Or(t){return ze(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Mt(t){if(ln(t)==="html")return t;const e=t.assignedSlot||t.parentNode||zo(t)&&t.host||bt(t);return zo(e)?e.host:e}function Al(t){const e=Mt(t);return Qt(e)?t.ownerDocument?t.ownerDocument.body:t.body:xt(e)&&Tn(e)?e:Al(e)}function On(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=Al(t),o=s===((r=t.ownerDocument)==null?void 0:r.body),i=Je(s);if(o){const l=is(i);return e.concat(i,i.visualViewport||[],Tn(s)?s:[],l&&n?On(l):[])}return e.concat(s,On(s,[],n))}function is(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Np=["top","right","bottom","left"],It=Math.min,Qe=Math.max,or=Math.round,Vn=Math.floor,gt=t=>({x:t,y:t}),jp={left:"right",right:"left",bottom:"top",top:"bottom"},Dp={start:"end",end:"start"};function ls(t,e,n){return Qe(t,It(e,n))}function Ot(t,e){return typeof t=="function"?t(e):t}function Et(t){return t.split("-")[0]}function an(t){return t.split("-")[1]}function Ms(t){return t==="x"?"y":"x"}function Is(t){return t==="y"?"height":"width"}const Pp=new Set(["top","bottom"]);function ht(t){return Pp.has(Et(t))?"y":"x"}function As(t){return Ms(ht(t))}function Tp(t,e,n){n===void 0&&(n=!1);const r=an(t),s=As(t),o=Is(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(i=ir(i)),[i,ir(i)]}function Mp(t){const e=ir(t);return[as(t),e,as(e)]}function as(t){return t.replace(/start|end/g,e=>Dp[e])}const Fo=["left","right"],Vo=["right","left"],Ip=["top","bottom"],Ap=["bottom","top"];function _p(t,e,n){switch(t){case"top":case"bottom":return n?e?Vo:Fo:e?Fo:Vo;case"left":case"right":return e?Ip:Ap;default:return[]}}function $p(t,e,n,r){const s=an(t);let o=_p(Et(t),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),e&&(o=o.concat(o.map(as)))),o}function ir(t){return t.replace(/left|right|bottom|top/g,e=>jp[e])}function Lp(t){return{top:0,right:0,bottom:0,left:0,...t}}function _l(t){return typeof t!="number"?Lp(t):{top:t,right:t,bottom:t,left:t}}function lr(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}var zp=typeof document<"u",Fp=function(){},ar=zp?k.useLayoutEffect:Fp;const Vp={...de},Bp=Vp.useInsertionEffect,Wp=Bp||(t=>t());function Hp(t){const e=de.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Wp(()=>{e.current=t}),de.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function Bo(t,e,n){let{reference:r,floating:s}=t;const o=ht(e),i=As(e),l=Is(i),a=Et(e),d=o==="y",c=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,f=r[l]/2-s[l]/2;let m;switch(a){case"top":m={x:c,y:r.y-s.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-s.width,y:u};break;default:m={x:r.x,y:r.y}}switch(an(e)){case"start":m[i]-=f*(n&&d?-1:1);break;case"end":m[i]+=f*(n&&d?-1:1);break}return m}const Yp=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,l=o.filter(Boolean),a=await(i.isRTL==null?void 0:i.isRTL(e));let d=await i.getElementRects({reference:t,floating:e,strategy:s}),{x:c,y:u}=Bo(d,r,a),f=r,m={},h=0;for(let p=0;p<l.length;p++){const{name:g,fn:x}=l[p],{x:v,y,data:w,reset:C}=await x({x:c,y:u,initialPlacement:r,placement:f,strategy:s,middlewareData:m,rects:d,platform:i,elements:{reference:t,floating:e}});c=v??c,u=y??u,m={...m,[g]:{...m[g],...w}},C&&h<=50&&(h++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(d=C.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:s}):C.rects),{x:c,y:u}=Bo(d,f,a)),p=-1)}return{x:c,y:u,placement:f,strategy:s,middlewareData:m}};async function En(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:o,rects:i,elements:l,strategy:a}=t,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Ot(e,t),h=_l(m),g=l[f?u==="floating"?"reference":"floating":u],x=lr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:d,rootBoundary:c,strategy:a})),v=u==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),w=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},C=lr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:y,strategy:a}):v);return{top:(x.top-C.top+h.top)/w.y,bottom:(C.bottom-x.bottom+h.bottom)/w.y,left:(x.left-C.left+h.left)/w.x,right:(C.right-x.right+h.right)/w.x}}const qp=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:o,platform:i,elements:l,middlewareData:a}=e,{element:d,padding:c=0}=Ot(t,e)||{};if(d==null)return{};const u=_l(c),f={x:n,y:r},m=As(s),h=Is(m),p=await i.getDimensions(d),g=m==="y",x=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=o.reference[h]+o.reference[m]-f[m]-o.floating[h],C=f[m]-o.reference[m],O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let S=O?O[y]:0;(!S||!await(i.isElement==null?void 0:i.isElement(O)))&&(S=l.floating[y]||o.floating[h]);const E=w/2-C/2,R=S/2-p[h]/2-1,N=It(u[x],R),j=It(u[v],R),D=N,P=S-p[h]-j,M=S/2-p[h]/2+E,L=ls(D,M,P),_=!a.arrow&&an(s)!=null&&M!==L&&o.reference[h]/2-(M<D?N:j)-p[h]/2<0,T=_?M<D?M-D:M-P:0;return{[m]:f[m]+T,data:{[m]:L,centerOffset:M-L-T,..._&&{alignmentOffset:T}},reset:_}}}),Gp=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:l,platform:a,elements:d}=e,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...g}=Ot(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=Et(s),v=ht(l),y=Et(l)===l,w=await(a.isRTL==null?void 0:a.isRTL(d.floating)),C=f||(y||!p?[ir(l)]:Mp(l)),O=h!=="none";!f&&O&&C.push(...$p(l,p,h,w));const S=[l,...C],E=await En(e,g),R=[];let N=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&R.push(E[x]),u){const M=Tp(s,i,w);R.push(E[M[0]],E[M[1]])}if(N=[...N,{placement:s,overflows:R}],!R.every(M=>M<=0)){var j,D;const M=(((j=o.flip)==null?void 0:j.index)||0)+1,L=S[M];if(L&&(!(u==="alignment"?v!==ht(L):!1)||N.every(A=>ht(A.placement)===v?A.overflows[0]>0:!0)))return{data:{index:M,overflows:N},reset:{placement:L}};let _=(D=N.filter(T=>T.overflows[0]<=0).sort((T,A)=>T.overflows[1]-A.overflows[1])[0])==null?void 0:D.placement;if(!_)switch(m){case"bestFit":{var P;const T=(P=N.filter(A=>{if(O){const V=ht(A.placement);return V===v||V==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(V=>V>0).reduce((V,$)=>V+$,0)]).sort((A,V)=>A[1]-V[1])[0])==null?void 0:P[0];T&&(_=T);break}case"initialPlacement":_=l;break}if(s!==_)return{reset:{placement:_}}}return{}}}};function Wo(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ho(t){return Np.some(e=>t[e]>=0)}const Up=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=Ot(t,e);switch(r){case"referenceHidden":{const o=await En(e,{...s,elementContext:"reference"}),i=Wo(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ho(i)}}}case"escaped":{const o=await En(e,{...s,altBoundary:!0}),i=Wo(o,n.floating);return{data:{escapedOffsets:i,escaped:Ho(i)}}}default:return{}}}}},$l=new Set(["left","top"]);async function Kp(t,e){const{placement:n,platform:r,elements:s}=t,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Et(n),l=an(n),a=ht(n)==="y",d=$l.has(i)?-1:1,c=o&&a?-1:1,u=Ot(e,t);let{mainAxis:f,crossAxis:m,alignmentAxis:h}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),a?{x:m*c,y:f*d}:{x:f*d,y:m*c}}const Xp=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:o,placement:i,middlewareData:l}=e,a=await Kp(e,t);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+a.x,y:o+a.y,data:{...a,placement:i}}}}},Qp=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:g=>{let{x,y:v}=g;return{x,y:v}}},...a}=Ot(t,e),d={x:n,y:r},c=await En(e,a),u=ht(Et(s)),f=Ms(u);let m=d[f],h=d[u];if(o){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",v=m+c[g],y=m-c[x];m=ls(v,m,y)}if(i){const g=u==="y"?"top":"left",x=u==="y"?"bottom":"right",v=h+c[g],y=h-c[x];h=ls(v,h,y)}const p=l.fn({...e,[f]:m,[u]:h});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:o,[u]:i}}}}}},Jp=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=e,{offset:l=0,mainAxis:a=!0,crossAxis:d=!0}=Ot(t,e),c={x:n,y:r},u=ht(s),f=Ms(u);let m=c[f],h=c[u];const p=Ot(l,e),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(a){const y=f==="y"?"height":"width",w=o.reference[f]-o.floating[y]+g.mainAxis,C=o.reference[f]+o.reference[y]-g.mainAxis;m<w?m=w:m>C&&(m=C)}if(d){var x,v;const y=f==="y"?"width":"height",w=$l.has(Et(s)),C=o.reference[u]-o.floating[y]+(w&&((x=i.offset)==null?void 0:x[u])||0)+(w?0:g.crossAxis),O=o.reference[u]+o.reference[y]+(w?0:((v=i.offset)==null?void 0:v[u])||0)-(w?g.crossAxis:0);h<C?h=C:h>O&&(h=O)}return{[f]:m,[u]:h}}}},Zp=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:o,platform:i,elements:l}=e,{apply:a=()=>{},...d}=Ot(t,e),c=await En(e,d),u=Et(s),f=an(s),m=ht(s)==="y",{width:h,height:p}=o.floating;let g,x;u==="top"||u==="bottom"?(g=u,x=f===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(x=u,g=f==="end"?"top":"bottom");const v=p-c.top-c.bottom,y=h-c.left-c.right,w=It(p-c[g],v),C=It(h-c[x],y),O=!e.middlewareData.shift;let S=w,E=C;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(E=y),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(S=v),O&&!f){const N=Qe(c.left,0),j=Qe(c.right,0),D=Qe(c.top,0),P=Qe(c.bottom,0);m?E=h-2*(N!==0||j!==0?N+j:Qe(c.left,c.right)):S=p-2*(D!==0||P!==0?D+P:Qe(c.top,c.bottom))}await a({...e,availableWidth:E,availableHeight:S});const R=await i.getDimensions(l.floating);return h!==R.width||p!==R.height?{reset:{rects:!0}}:{}}}};function Ll(t){const e=ot(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=xt(t),o=s?t.offsetWidth:n,i=s?t.offsetHeight:r,l=or(n)!==o||or(r)!==i;return l&&(n=o,r=i),{width:n,height:r,$:l}}function _s(t){return ze(t)?t:t.contextElement}function Ut(t){const e=_s(t);if(!xt(e))return gt(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:o}=Ll(e);let i=(o?or(n.width):n.width)/r,l=(o?or(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const eh=gt(0);function zl(t){const e=Je(t);return!Ts()||!e.visualViewport?eh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function th(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Je(t)?!1:e}function Vt(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),o=_s(t);let i=gt(1);e&&(r?ze(r)&&(i=Ut(r)):i=Ut(t));const l=th(o,n,r)?zl(o):gt(0);let a=(s.left+l.x)/i.x,d=(s.top+l.y)/i.y,c=s.width/i.x,u=s.height/i.y;if(o){const f=Je(o),m=r&&ze(r)?Je(r):r;let h=f,p=is(h);for(;p&&r&&m!==h;){const g=Ut(p),x=p.getBoundingClientRect(),v=ot(p),y=x.left+(p.clientLeft+parseFloat(v.paddingLeft))*g.x,w=x.top+(p.clientTop+parseFloat(v.paddingTop))*g.y;a*=g.x,d*=g.y,c*=g.x,u*=g.y,a+=y,d+=w,h=Je(p),p=is(h)}}return lr({width:c,height:u,x:a,y:d})}function Er(t,e){const n=Or(t).scrollLeft;return e?e.left+n:Vt(bt(t)).left+n}function Fl(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-Er(t,n),s=n.top+e.scrollTop;return{x:r,y:s}}function nh(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const o=s==="fixed",i=bt(r),l=e?Cr(e.floating):!1;if(r===i||l&&o)return n;let a={scrollLeft:0,scrollTop:0},d=gt(1);const c=gt(0),u=xt(r);if((u||!u&&!o)&&((ln(r)!=="body"||Tn(i))&&(a=Or(r)),xt(r))){const m=Vt(r);d=Ut(r),c.x=m.x+r.clientLeft,c.y=m.y+r.clientTop}const f=i&&!u&&!o?Fl(i,a):gt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-a.scrollLeft*d.x+c.x+f.x,y:n.y*d.y-a.scrollTop*d.y+c.y+f.y}}function rh(t){return Array.from(t.getClientRects())}function sh(t){const e=bt(t),n=Or(t),r=t.ownerDocument.body,s=Qe(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Qe(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Er(t);const l=-n.scrollTop;return ot(r).direction==="rtl"&&(i+=Qe(e.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:l}}const Yo=25;function oh(t,e){const n=Je(t),r=bt(t),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,l=0,a=0;if(s){o=s.width,i=s.height;const c=Ts();(!c||c&&e==="fixed")&&(l=s.offsetLeft,a=s.offsetTop)}const d=Er(r);if(d<=0){const c=r.ownerDocument,u=c.body,f=getComputedStyle(u),m=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-u.clientWidth-m);h<=Yo&&(o-=h)}else d<=Yo&&(o+=d);return{width:o,height:i,x:l,y:a}}const ih=new Set(["absolute","fixed"]);function lh(t,e){const n=Vt(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,o=xt(t)?Ut(t):gt(1),i=t.clientWidth*o.x,l=t.clientHeight*o.y,a=s*o.x,d=r*o.y;return{width:i,height:l,x:a,y:d}}function qo(t,e,n){let r;if(e==="viewport")r=oh(t,n);else if(e==="document")r=sh(bt(t));else if(ze(e))r=lh(e,n);else{const s=zl(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return lr(r)}function Vl(t,e){const n=Mt(t);return n===e||!ze(n)||Qt(n)?!1:ot(n).position==="fixed"||Vl(n,e)}function ah(t,e){const n=e.get(t);if(n)return n;let r=On(t,[],!1).filter(l=>ze(l)&&ln(l)!=="body"),s=null;const o=ot(t).position==="fixed";let i=o?Mt(t):t;for(;ze(i)&&!Qt(i);){const l=ot(i),a=Ps(i);!a&&l.position==="fixed"&&(s=null),(o?!a&&!s:!a&&l.position==="static"&&!!s&&ih.has(s.position)||Tn(i)&&!a&&Vl(t,i))?r=r.filter(c=>c!==i):s=l,i=Mt(i)}return e.set(t,r),r}function ch(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const i=[...n==="clippingAncestors"?Cr(e)?[]:ah(e,this._c):[].concat(n),r],l=i[0],a=i.reduce((d,c)=>{const u=qo(e,c,s);return d.top=Qe(u.top,d.top),d.right=It(u.right,d.right),d.bottom=It(u.bottom,d.bottom),d.left=Qe(u.left,d.left),d},qo(e,l,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function dh(t){const{width:e,height:n}=Ll(t);return{width:e,height:n}}function uh(t,e,n){const r=xt(e),s=bt(e),o=n==="fixed",i=Vt(t,!0,o,e);let l={scrollLeft:0,scrollTop:0};const a=gt(0);function d(){a.x=Er(s)}if(r||!r&&!o)if((ln(e)!=="body"||Tn(s))&&(l=Or(e)),r){const m=Vt(e,!0,o,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}else s&&d();o&&!r&&s&&d();const c=s&&!r&&!o?Fl(s,l):gt(0),u=i.left+l.scrollLeft-a.x-c.x,f=i.top+l.scrollTop-a.y-c.y;return{x:u,y:f,width:i.width,height:i.height}}function Ur(t){return ot(t).position==="static"}function Go(t,e){if(!xt(t)||ot(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return bt(t)===n&&(n=n.ownerDocument.body),n}function Bl(t,e){const n=Je(t);if(Cr(t))return n;if(!xt(t)){let s=Mt(t);for(;s&&!Qt(s);){if(ze(s)&&!Ur(s))return s;s=Mt(s)}return n}let r=Go(t,e);for(;r&&wp(r)&&Ur(r);)r=Go(r,e);return r&&Qt(r)&&Ur(r)&&!Ps(r)?n:r||kp(t)||n}const fh=async function(t){const e=this.getOffsetParent||Bl,n=this.getDimensions,r=await n(t.floating);return{reference:uh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mh(t){return ot(t).direction==="rtl"}const ph={convertOffsetParentRelativeRectToViewportRelativeRect:nh,getDocumentElement:bt,getClippingRect:ch,getOffsetParent:Bl,getElementRects:fh,getClientRects:rh,getDimensions:dh,getScale:Ut,isElement:ze,isRTL:mh};function Wl(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function hh(t,e){let n=null,r;const s=bt(t);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),o();const d=t.getBoundingClientRect(),{left:c,top:u,width:f,height:m}=d;if(l||e(),!f||!m)return;const h=Vn(u),p=Vn(s.clientWidth-(c+f)),g=Vn(s.clientHeight-(u+m)),x=Vn(c),y={rootMargin:-h+"px "+-p+"px "+-g+"px "+-x+"px",threshold:Qe(0,It(1,a))||1};let w=!0;function C(O){const S=O[0].intersectionRatio;if(S!==a){if(!w)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Wl(d,t.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(C,{...y,root:s.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(t)}return i(!0),o}function gh(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,d=_s(t),c=s||o?[...d?On(d):[],...On(e)]:[];c.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const u=d&&l?hh(d,n):null;let f=-1,m=null;i&&(m=new ResizeObserver(x=>{let[v]=x;v&&v.target===d&&m&&(m.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(e)})),n()}),d&&!a&&m.observe(d),m.observe(e));let h,p=a?Vt(t):null;a&&g();function g(){const x=Vt(t);p&&!Wl(p,x)&&n(),p=x,h=requestAnimationFrame(g)}return n(),()=>{var x;c.forEach(v=>{s&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),u?.(),(x=m)==null||x.disconnect(),m=null,a&&cancelAnimationFrame(h)}}const xh=Xp,bh=Qp,vh=Gp,yh=Zp,wh=Up,Uo=qp,Ch=Jp,Oh=(t,e,n)=>{const r=new Map,s={platform:ph,...n},o={...s.platform,_c:r};return Yp(t,e,{...s,platform:o})};var Eh=typeof document<"u",Sh=function(){},Gn=Eh?k.useLayoutEffect:Sh;function cr(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!cr(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&t.$$typeof)&&!cr(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Hl(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ko(t,e){const n=Hl(t);return Math.round(e*n)/n}function Kr(t){const e=de.useRef(t);return Gn(()=>{e.current=t}),e}function kh(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:a,open:d}=t,[c,u]=de.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,m]=de.useState(r);cr(f,r)||m(r);const[h,p]=de.useState(null),[g,x]=de.useState(null),v=de.useCallback(A=>{A!==O.current&&(O.current=A,p(A))},[]),y=de.useCallback(A=>{A!==S.current&&(S.current=A,x(A))},[]),w=o||h,C=i||g,O=de.useRef(null),S=de.useRef(null),E=de.useRef(c),R=a!=null,N=Kr(a),j=Kr(s),D=Kr(d),P=de.useCallback(()=>{if(!O.current||!S.current)return;const A={placement:e,strategy:n,middleware:f};j.current&&(A.platform=j.current),Oh(O.current,S.current,A).then(V=>{const $={...V,isPositioned:D.current!==!1};M.current&&!cr(E.current,$)&&(E.current=$,Xa.flushSync(()=>{u($)}))})},[f,e,n,j,D]);Gn(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,u(A=>({...A,isPositioned:!1})))},[d]);const M=de.useRef(!1);Gn(()=>(M.current=!0,()=>{M.current=!1}),[]),Gn(()=>{if(w&&(O.current=w),C&&(S.current=C),w&&C){if(N.current)return N.current(w,C,P);P()}},[w,C,P,N,R]);const L=de.useMemo(()=>({reference:O,floating:S,setReference:v,setFloating:y}),[v,y]),_=de.useMemo(()=>({reference:w,floating:C}),[w,C]),T=de.useMemo(()=>{const A={position:n,left:0,top:0};if(!_.floating)return A;const V=Ko(_.floating,c.x),$=Ko(_.floating,c.y);return l?{...A,transform:"translate("+V+"px, "+$+"px)",...Hl(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:$}},[n,l,_.floating,c.x,c.y]);return de.useMemo(()=>({...c,update:P,refs:L,elements:_,floatingStyles:T}),[c,P,L,_,T])}const Rh=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Uo({element:r.current,padding:s}).fn(n):{}:r?Uo({element:r,padding:s}).fn(n):{}}}},Nh=(t,e)=>({...xh(t),options:[t,e]}),jh=(t,e)=>({...bh(t),options:[t,e]}),Dh=(t,e)=>({...Ch(t),options:[t,e]}),Ph=(t,e)=>({...vh(t),options:[t,e]}),Th=(t,e)=>({...yh(t),options:[t,e]}),Mh=(t,e)=>({...wh(t),options:[t,e]}),Ih=(t,e)=>({...Rh(t),options:[t,e]}),Ah={...de};let Xo=!1,_h=0;const Qo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+_h++;function $h(){const[t,e]=de.useState(()=>Xo?Qo():void 0);return ar(()=>{t==null&&e(Qo())},[]),de.useEffect(()=>{Xo=!0},[]),t}const Lh=Ah.useId,Yl=Lh||$h;let Sn;process.env.NODE_ENV!=="production"&&(Sn=new Set);function zh(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const s="Floating UI: "+n.join(" ");if(!((t=Sn)!=null&&t.has(s))){var o;(o=Sn)==null||o.add(s),console.warn(s)}}function Fh(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const s="Floating UI: "+n.join(" ");if(!((t=Sn)!=null&&t.has(s))){var o;(o=Sn)==null||o.add(s),console.error(s)}}const Vh=de.forwardRef(function(e,n){const{context:{placement:r,elements:{floating:s},middlewareData:{arrow:o,shift:i}},width:l=14,height:a=7,tipRadius:d=0,strokeWidth:c=0,staticOffset:u,stroke:f,d:m,style:{transform:h,...p}={},...g}=e;process.env.NODE_ENV!=="production"&&(n||zh("The `ref` prop is required for `FloatingArrow`."));const x=Yl(),[v,y]=de.useState(!1);if(ar(()=>{if(!s)return;ot(s).direction==="rtl"&&y(!0)},[s]),!s)return null;const[w,C]=r.split("-"),O=w==="top"||w==="bottom";let S=u;(O&&i!=null&&i.x||!O&&i!=null&&i.y)&&(S=null);const E=c*2,R=E/2,N=l/2*(d/-8+1),j=a/2*d/4,D=!!m,P=S&&C==="end"?"bottom":"top";let M=S&&C==="end"?"right":"left";S&&v&&(M=C==="end"?"left":"right");const L=o?.x!=null?S||o.x:"",_=o?.y!=null?S||o.y:"",T=m||"M0,0"+(" H"+l)+(" L"+(l-N)+","+(a-j))+(" Q"+l/2+","+a+" "+N+","+(a-j))+" Z",A={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[w];return b.jsxs("svg",{...g,"aria-hidden":!0,ref:n,width:D?l:l+E,height:l,viewBox:"0 0 "+l+" "+(a>l?a:l),style:{position:"absolute",pointerEvents:"none",[M]:L,[P]:_,[w]:O||D?"100%":"calc(100% - "+E/2+"px)",transform:[A,h].filter(V=>!!V).join(" "),...p},children:[E>0&&b.jsx("path",{clipPath:"url(#"+x+")",fill:"none",stroke:f,strokeWidth:E+(m?0:1),d:T}),b.jsx("path",{stroke:E&&!m?g.fill:"none",d:T}),b.jsx("clipPath",{id:x,children:b.jsx("rect",{x:-R,y:R*(D?-1:1),width:l+E,height:l})})]})});function Bh(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(s=>s(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const Wh=de.createContext(null),Hh=de.createContext(null),Yh=()=>{var t;return((t=de.useContext(Wh))==null?void 0:t.id)||null},qh=()=>de.useContext(Hh);function Gh(t){const{open:e=!1,onOpenChange:n,elements:r}=t,s=Yl(),o=de.useRef({}),[i]=de.useState(()=>Bh()),l=Yh()!=null;if(process.env.NODE_ENV!=="production"){const m=r.reference;m&&!ze(m)&&Fh("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,d]=de.useState(r.reference),c=Hp((m,h,p)=>{o.current.openEvent=m?h:void 0,i.emit("openchange",{open:m,event:h,reason:p,nested:l}),n?.(m,h,p)}),u=de.useMemo(()=>({setPositionReference:d}),[]),f=de.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return de.useMemo(()=>({dataRef:o,open:e,onOpenChange:c,elements:f,events:i,floatingId:s,refs:u}),[e,c,f,i,s,u])}function Uh(t){t===void 0&&(t={});const{nodeId:e}=t,n=Gh({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,s=r.elements,[o,i]=de.useState(null),[l,a]=de.useState(null),c=s?.domReference||o,u=de.useRef(null),f=qh();ar(()=>{c&&(u.current=c)},[c]);const m=kh({...t,elements:{...s,...l&&{reference:l}}}),h=de.useCallback(y=>{const w=ze(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;a(w),m.refs.setReference(w)},[m.refs]),p=de.useCallback(y=>{(ze(y)||y===null)&&(u.current=y,i(y)),(ze(m.refs.reference.current)||m.refs.reference.current===null||y!==null&&!ze(y))&&m.refs.setReference(y)},[m.refs]),g=de.useMemo(()=>({...m.refs,setReference:p,setPositionReference:h,domReference:u}),[m.refs,p,h]),x=de.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),v=de.useMemo(()=>({...m,...r,refs:g,elements:x,nodeId:e}),[m,g,x,e,r]);return ar(()=>{r.dataRef.current.floatingContext=v;const y=f?.nodesRef.current.find(w=>w.id===e);y&&(y.context=v)}),de.useMemo(()=>({...m,context:v,refs:g,elements:x}),[m,g,x,v])}const Kh=()=>{const t=Ml();return b.jsx(Vh,{className:z("fill-popover [&>path:last-of-type]:stroke-popover","[&>path:first-of-type]:stroke-border dark:[&>path:first-of-type]:stroke-popover-stroke"),context:t.floatingContext,height:5,ref:t.onArrowChange,strokeWidth:1,width:10})};function ql(t){const[e,n="center"]=t.split("-");return[e,n]}const Xh=t=>({fn(e){const{middlewareData:n,placement:r,rects:s}=e,i=n.arrow?.centerOffset!==0,l=i?0:t.arrowWidth,a=i?0:t.arrowHeight,[d,c]=ql(r),u={center:"50%",end:"100%",start:"0%"}[c],f=(n.arrow?.x??0)+l/2,m=(n.arrow?.y??0)+a/2;let h="",p="";switch(d){case"bottom":{h=i?u:`${f}px`,p=`${-a}px`;break}case"top":{h=i?u:`${f}px`,p=`${s.floating.height+a}px`;break}case"right":{h=`${-a}px`,p=i?u:`${m}px`;break}case"left":{h=`${s.floating.width+a}px`,p=i?u:`${m}px`;break}}return{data:{x:h,y:p}}},name:"transformOrigin",options:t}),Qh=k.forwardRef(({align:t="center",alignOffset:e=0,arrowPadding:n=0,avoidCollisions:r=!0,children:s,collisionPadding:o=0,hideWhenDetached:i=!1,onPlaced:l,side:a="bottom",sideOffset:d=0,sticky:c="partial",style:u,...f},m)=>{const h=Ds(),[p,g]=k.useState(null),x=I.useSize(p),v=x?.width??0,y=x?.height??0,w=a+(t!=="center"?"-"+t:""),{context:C,floatingStyles:O,isPositioned:S,middlewareData:E,placement:R,refs:N}=Uh({elements:{reference:h.anchor},middleware:[Nh({alignmentAxis:e,mainAxis:d+y}),r&&jh({crossAxis:!1,limiter:c==="partial"?Dh():void 0,mainAxis:!0,padding:o}),r&&Ph({padding:o}),Th({apply:({availableHeight:T,availableWidth:A,elements:V,rects:$})=>{const{height:F,width:W}=$.reference,B=V.floating.style;B.setProperty("--ox-popper-available-width",`${A}px`),B.setProperty("--ox-popper-available-height",`${T}px`),B.setProperty("--ox-popper-anchor-width",`${W}px`),B.setProperty("--ox-popper-anchor-height",`${F}px`)},padding:o}),p&&Ih({element:p,padding:n}),Xh({arrowHeight:y,arrowWidth:v}),i&&Mh({strategy:"referenceHidden"})].filter(Boolean),placement:w,strategy:"fixed",whileElementsMounted:(...T)=>gh(...T,{animationFrame:!1})}),[j,D]=ql(R),P=E.transformOrigin,M=k.useRef(null);k.useEffect(()=>{const T=M.current;if(T?.showPopover)return T.showPopover(),()=>{T.hidePopover?.()}},[]);const L=k.useCallback(T=>{typeof m=="function"?m(T):m&&(m.current=T)},[m]);k.useLayoutEffect(()=>{S&&l?.()},[S,l]);const _=k.useCallback(T=>{M.current=T,N.setFloating(T)},[N]);return b.jsx("div",{className:"z-50","data-ox-popper-content-wrapper":"",popover:"manual",ref:_,style:{...O,minWidth:"max-content",transform:S?O.transform:"translate(0, -200%)","--ox-popper-transform-origin":P?`${P.x} ${P.y}`:void 0,...E.hide?.referenceHidden&&{pointerEvents:"none",visibility:"hidden"}},children:b.jsx(Tl.Provider,{value:{floatingContext:C,onArrowChange:g,placedSide:j},children:b.jsx("div",{"data-align":D,"data-ox-side":j,"data-side":j,ref:L,...f,style:{...u,animation:S?void 0:"none",position:"relative"},children:s})})})}),Se=Object.assign(gp,{Anchor:bp,Arrow:Kh,Content:Qh}),Gl=k.createContext(void 0),Jh=t=>{const e=I.compilerRuntimeExports.c(23),{align:n,children:r,closeOnOutsideClick:s,defaultOpen:o,disabled:i,onOpenChange:l,open:a,side:d}=t,c=n===void 0?"start":n,u=s===void 0?!0:s,f=o===void 0?!1:o,m=i===void 0?!1:i,h=d===void 0?"bottom":d;let p;e[0]!==u||e[1]!==a||e[2]!==f||e[3]!==m||e[4]!==l?(p={closeOnEscape:!0,closeOnOutsideClick:u,defaultOpen:f,disabled:m,onOpenChange:l,open:a},e[0]=u,e[1]=a,e[2]=f,e[3]=m,e[4]=l,e[5]=p):p=e[5];const{close:g,containerRef:x,isClosing:v,isVisible:y,open:w,toggle:C}=I.usePopperState(p);let O;e[6]!==c||e[7]!==g||e[8]!==m||e[9]!==v||e[10]!==y||e[11]!==w||e[12]!==h||e[13]!==C?(O={align:c,close:g,disabled:m,isClosing:v,isVisible:y,open:w,side:h,toggle:C},e[6]=c,e[7]=g,e[8]=m,e[9]=v,e[10]=y,e[11]=w,e[12]=h,e[13]=C,e[14]=O):O=e[14];const S=O;let E;e[15]!==r?(E=b.jsx(Se,{children:r}),e[15]=r,e[16]=E):E=e[16];let R;e[17]!==x||e[18]!==E?(R=b.jsx("div",{className:"inline-block","data-ox-slot":"dropdown",ref:x,children:E}),e[17]=x,e[18]=E,e[19]=R):R=e[19];let N;return e[20]!==S||e[21]!==R?(N=b.jsx(Gl.Provider,{value:S,children:R}),e[20]=S,e[21]=R,e[22]=N):N=e[22],N},Zh=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("grid min-h-0 flex-1 grid-cols-[auto_1fr_auto] gap-y-0.5 overflow-y-auto",'**:data-[ox-slot="icon"]:col-start-1 **:data-[ox-slot="icon"]:mr-2 **:data-[ox-slot="icon"]:justify-self-center','**:data-[ox-slot="dropdown-label"]:col-start-2','**:data-[ox-slot="dropdown-shortcut"]:col-start-3 **:data-[ox-slot="dropdown-shortcut"]:justify-self-end',r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("ul",{className:o,...s,"data-ox-slot":"dropdown-body",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i};function Sr(){const t=k.useContext(Gl);if(t===void 0)throw new Error("Dropdown components must be used within an OxDropdown");return t}const eg=t=>{const e=I.compilerRuntimeExports.c(15);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{align:o,isClosing:i,isVisible:l,side:a}=Sr();if(!l)return null;const d=i?"closing":"open";let c;e[4]!==r?(c=z("flex max-h-96 min-w-52 flex-col gap-1 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",r),e[4]=r,e[5]=c):c=e[5];let u;e[6]!==n||e[7]!==s||e[8]!==c?(u=b.jsx("div",{className:c,...s,"data-ox-slot":"dropdown-content",children:n}),e[6]=n,e[7]=s,e[8]=c,e[9]=u):u=e[9];let f;return e[10]!==o||e[11]!==a||e[12]!==d||e[13]!==u?(f=b.jsx(Bt,{children:b.jsx(Se.Content,{align:o,className:"ox-dropdown-animate","data-ox-state":d,role:"menu",side:a,sideOffset:8,children:u})}),e[10]=o,e[11]=a,e[12]=d,e[13]=u,e[14]=f):f=e[14],f},tg=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("col-span-3 shrink-0 px-3 py-2",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"dropdown-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},ng=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("col-span-3 shrink-0 px-3 py-2",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,"data-ox-slot":"dropdown-header",...s,children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Ul=z("group col-span-3 grid h-8 grid-cols-subgrid items-center gap-1 rounded-sm px-2 py-1.5 text-left text-sm",'[&_svg:not([class*="size-"])]:size-4 [&_svg:not([class*="text-"])]:text-muted-foreground',"cursor-pointer hover:bg-neutral-accent hover:text-neutral-accent-foreground","outline-hidden focus:bg-neutral-accent focus:text-neutral-accent-foreground","aria-disabled:ox-default-disabled","aria-disabled:hover:bg-transparent aria-disabled:hover:text-current","aria-disabled:focus:bg-transparent aria-disabled:focus:text-current"),rg=t=>"href"in t,sg=t=>{const e=I.compilerRuntimeExports.c(21);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,disabled:l,href:s,onClick:o,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,{close:d}=Sr();let c;e[7]!==r?(c=z(Ul,r),e[7]=r,e[8]=c):c=e[8];const u=c;let f;e[9]!==d||e[10]!==a||e[11]!==o?(f=x=>{if(a){x.preventDefault();return}o?.(x),d()},e[9]=d,e[10]=a,e[11]=o,e[12]=f):f=e[12];const m=f,h=a?void 0:s,p=a?-1:void 0;let g;return e[13]!==n||e[14]!==a||e[15]!==m||e[16]!==u||e[17]!==i||e[18]!==h||e[19]!==p?(g=b.jsx("li",{className:"contents","data-ox-slot":"dropdown-item",children:b.jsx("a",{"aria-disabled":a,className:u,href:h,role:"menuitem",tabIndex:p,onClick:m,...i,"data-ox-slot":"dropdown-link",children:n})}),e[13]=n,e[14]=a,e[15]=m,e[16]=u,e[17]=i,e[18]=h,e[19]=p,e[20]=g):g=e[20],g},og=t=>{const e=I.compilerRuntimeExports.c(19);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:i,onClick:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?!1:i,{close:a}=Sr();let d;e[6]!==r?(d=z(Ul,r),e[6]=r,e[7]=d):d=e[7];const c=d;let u;e[8]!==a||e[9]!==l||e[10]!==s?(u=p=>{if(l){p.preventDefault();return}s?.(p),a()},e[8]=a,e[9]=l,e[10]=s,e[11]=u):u=e[11];const f=u,m=l?-1:void 0;let h;return e[12]!==c||e[13]!==n||e[14]!==l||e[15]!==f||e[16]!==o||e[17]!==m?(h=b.jsx("li",{className:"contents","data-ox-slot":"dropdown-item",children:b.jsx("button",{"aria-disabled":l,className:c,role:"menuitem",tabIndex:m,type:"button",onClick:f,...o,"data-ox-slot":"dropdown-button",children:n})}),e[12]=c,e[13]=n,e[14]=l,e[15]=f,e[16]=o,e[17]=m,e[18]=h):h=e[18],h},ig=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=rg(t)?b.jsx(sg,{...t}):b.jsx(og,{...t}),e[0]=t,e[1]=n):n=e[1],n},lg=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("overflow-hidden text-sm font-medium text-ellipsis",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("span",{className:o,...s,"data-ox-slot":"dropdown-label",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},ag=t=>{const e=I.compilerRuntimeExports.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let s;e[3]!==n?(s=z("col-span-3",n),e[3]=n,e[4]=s):s=e[4];let o;return e[5]!==r||e[6]!==s?(o=b.jsx("li",{className:"contents",children:b.jsx(Ws,{className:s,role:"separator",...r})}),e[5]=r,e[6]=s,e[7]=o):o=e[7],o},cg=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("ml-auto text-xs tracking-widest text-muted-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("span",{className:o,...s,"data-ox-slot":"dropdown-shortcut",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},dg=dt("OxDropdownTrigger","button"),ug=t=>{const e=I.compilerRuntimeExports.c(37);let n,r,s,o,i,l,a,d,c,u;e[0]!==t?({animateIcon:o,asChild:i,children:n,className:r,disabled:l,hideIcon:a,icon:d,size:c,variant:u,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10]);const f=o===void 0?!0:o,m=i===void 0?!1:i,h=l===void 0?!1:l,p=a===void 0?!1:a,g=d===void 0?ae.ChevronDown:d,x=c===void 0?"md":c,v=u===void 0?"ghost":u,{disabled:y,open:w,toggle:C}=Sr(),O=h||y;if(m){const j=w?"open":"closed";let D;return e[11]!==n||e[12]!==r||e[13]!==s||e[14]!==O||e[15]!==w||e[16]!==j||e[17]!==C?(D=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx(dg,{"aria-expanded":w,"aria-haspopup":"menu",className:r,disabled:O,type:"button",onClick:C,...s,"data-ox-slot":"dropdown-trigger","data-ox-state":j,children:n})}),e[11]=n,e[12]=r,e[13]=s,e[14]=O,e[15]=w,e[16]=j,e[17]=C,e[18]=D):D=e[18],D}const S=w?"open":"closed";let E;e[19]!==n?(E=b.jsx("span",{className:"flex items-center gap-2",children:n}),e[19]=n,e[20]=E):E=e[20];let R;e[21]!==f||e[22]!==p||e[23]!==g||e[24]!==w?(R=!p&&g?b.jsx(ue,{className:z("text-current",{"transition-transform duration-200":f,"rotate-180":f&&w}),icon:g}):null,e[21]=f,e[22]=p,e[23]=g,e[24]=w,e[25]=R):R=e[25];let N;return e[26]!==r||e[27]!==s||e[28]!==O||e[29]!==w||e[30]!==x||e[31]!==R||e[32]!==S||e[33]!==E||e[34]!==C||e[35]!==v?(N=b.jsx(Se.Anchor,{asChild:!0,children:b.jsxs(Ze,{"aria-expanded":w,"aria-haspopup":"menu",className:r,disabled:O,size:x,variant:v,onClick:C,...s,"data-ox-slot":"dropdown-trigger","data-ox-state":S,children:[E,R]})}),e[26]=r,e[27]=s,e[28]=O,e[29]=w,e[30]=x,e[31]=R,e[32]=S,e[33]=E,e[34]=C,e[35]=v,e[36]=N):N=e[36],N},Jt=Object.assign(Jh,{Body:Zh,Content:eg,Footer:tg,Header:ng,Item:ig,Label:lg,Separator:ag,Shortcut:cg,Trigger:ug}),Kl=k.createContext(null),kr=()=>{const t=k.useContext(Kl);if(!t)throw new Error("useEndlessListContext must be used within OxEndlessList");return t},Xl=k.createContext(null),fg=()=>{const t=k.useContext(Xl);if(!t)throw new Error("useItemContext must be used within OxEndlessList.Items");return t},mg=5,pg=5,hg=t=>{const e=I.compilerRuntimeExports.c(37);let n,r,s,o,i,l,a,d,c,u,f,m,h,p;e[0]!==t?({children:n,className:r,data:s,estimateSize:i,gap:c,getItemKey:l,hasNextPage:u,isError:f,isLoading:m,loadMoreThreshold:h,onLoadMore:a,overscan:p,style:d,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14]);const g=c===void 0?0:c,x=u===void 0?!1:u,v=f===void 0?!1:f,y=m===void 0?!1:m,w=h===void 0?mg:h,C=p===void 0?pg:p,[O,S]=k.useState(null);let E;e[15]!==s||e[16]!==i||e[17]!==g||e[18]!==l||e[19]!==x||e[20]!==v||e[21]!==y||e[22]!==w||e[23]!==a||e[24]!==C||e[25]!==O?(E={data:s,estimateSize:i,gap:g,getItemKey:l,hasNextPage:x,isError:v,isLoading:y,itemCount:s.length,loadMoreThreshold:w,onLoadMore:a,overscan:C,scrollElement:O},e[15]=s,e[16]=i,e[17]=g,e[18]=l,e[19]=x,e[20]=v,e[21]=y,e[22]=w,e[23]=a,e[24]=C,e[25]=O,e[26]=E):E=e[26];const R=E;let N;e[27]!==r?(N=z("relative overflow-auto",r),e[27]=r,e[28]=N):N=e[28];let j;e[29]!==n||e[30]!==o||e[31]!==d||e[32]!==N?(j=b.jsx("div",{className:N,"data-ox-slot":"endless-list",ref:S,style:d,...o,children:n}),e[29]=n,e[30]=o,e[31]=d,e[32]=N,e[33]=j):j=e[33];let D;return e[34]!==R||e[35]!==j?(D=b.jsx(Kl.Provider,{value:R,children:j}),e[34]=R,e[35]=j,e[36]=D):D=e[36],D},gg=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{isLoading:o,itemCount:i}=kr();if(i>0||o)return null;let l;e[4]!==r?(l=z("flex min-h-full items-center justify-center text-muted-foreground",r),e[4]=r,e[5]=l):l=e[5];const a=n??"No items to display";let d;return e[6]!==s||e[7]!==l||e[8]!==a?(d=b.jsx("div",{className:l,"data-ox-slot":"endless-list-empty",...s,children:a}),e[6]=s,e[7]=l,e[8]=a,e[9]=d):d=e[9],d},xg=t=>{const e=I.compilerRuntimeExports.c(13);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{isError:o,onLoadMore:i}=kr();if(!o)return null;let l;e[4]!==r?(l=z("sticky bottom-0 flex items-center justify-center gap-2 bg-background/80 py-4 backdrop-blur-sm",r),e[4]=r,e[5]=l):l=e[5];let a;e[6]!==n||e[7]!==i?(a=n??b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"text-destructive",children:"Failed to load items"}),i&&b.jsx(Ze,{size:"sm",variant:"secondary",onClick:i,children:"Retry"})]}),e[6]=n,e[7]=i,e[8]=a):a=e[8];let d;return e[9]!==s||e[10]!==l||e[11]!==a?(d=b.jsx("div",{className:l,"data-ox-slot":"endless-list-error",...s,children:a}),e[9]=s,e[10]=l,e[11]=a,e[12]=d):d=e[12],d},bg=t=>{const e=I.compilerRuntimeExports.c(16),{children:n,className:r}=t,{index:s,item:o,paddingY:i,virtualItem:l,virtualizer:a}=fg();let d;e[0]!==a?(d=x=>{a.measureElement(x)},e[0]=a,e[1]=d):d=e[1];const c=d;let u;e[2]!==r?(u=z("w-full",r),e[2]=r,e[3]=u):u=e[3];const f=l.index,m=`translateY(${l.start+i}px)`;let h;e[4]!==m?(h={left:0,position:"absolute",top:0,transform:m,width:"100%"},e[4]=m,e[5]=h):h=e[5];let p;e[6]!==n||e[7]!==s||e[8]!==o?(p=n(o,s),e[6]=n,e[7]=s,e[8]=o,e[9]=p):p=e[9];let g;return e[10]!==c||e[11]!==u||e[12]!==h||e[13]!==p||e[14]!==l.index?(g=b.jsx("div",{className:u,"data-index":f,"data-ox-slot":"endless-list-item",ref:c,style:h,children:p}),e[10]=c,e[11]=u,e[12]=h,e[13]=p,e[14]=l.index,e[15]=g):g=e[15],g};function qt(t,e,n){let r=n.initialDeps??[],s,o=!0;function i(){var l,a,d;let c;n.key&&((l=n.debug)!=null&&l.call(n))&&(c=Date.now());const u=t();if(!(u.length!==r.length||u.some((h,p)=>r[p]!==h)))return s;r=u;let m;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(m=Date.now()),s=e(...u),n.key&&((d=n.debug)!=null&&d.call(n))){const h=Math.round((Date.now()-c)*100)/100,p=Math.round((Date.now()-m)*100)/100,g=p/16,x=(v,y)=>{for(v=String(v);v.length<y;)v=" "+v;return v};console.info(`%c⏱ ${x(p,5)} /${x(h,5)} ms`,`
|
|
7
7
|
font-size: .6rem;
|
|
8
8
|
font-weight: bold;
|
|
9
|
-
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(s),o=!1,s}return i.updateDeps=l=>{r=l},i}function Jo(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const vg=(t,e)=>Math.abs(t-e)<1.01,yg=(t,e,n)=>{let r;return function(...s){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,s),n)}},Zo=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},wg=t=>t,Cg=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),r=[];for(let s=e;s<=n;s++)r.push(s);return r},Og=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const s=i=>{const{width:l,height:a}=i;e({width:Math.round(l),height:Math.round(a)})};if(s(Zo(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(i=>{const l=()=>{const a=i[0];if(a?.borderBoxSize){const d=a.borderBoxSize[0];if(d){s({width:d.inlineSize,height:d.blockSize});return}}s(Zo(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},ei={passive:!0},ti=typeof window>"u"?!0:"onscrollend"in window,Eg=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;let s=0;const o=t.options.useScrollendEvent&&ti?()=>{}:yg(r,()=>{e(s,!1)},t.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:u,isRtl:f}=t.options;s=u?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),e(s,c)},l=i(!0),a=i(!1);a(),n.addEventListener("scroll",l,ei);const d=t.options.useScrollendEvent&&ti;return d&&n.addEventListener("scrollend",a,ei),()=>{n.removeEventListener("scroll",l),d&&n.removeEventListener("scrollend",a)}},Sg=(t,e,n)=>{if(e?.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},kg=(t,{adjustments:e=0,behavior:n},r)=>{var s,o;const i=t+e;(o=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[r.options.horizontal?"left":"top"]:i,behavior:n})};class Rg{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const i=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=r())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=r())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:wg,rangeExtractor:Cg,onChange:()=>{},measureElement:Sg,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=qt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,o=new Map;for(let i=r-1;i>=0;i--){const l=n[i];if(s.has(l.lane))continue;const a=o.get(l.lane);if(a==null||l.end>a.end?o.set(l.lane,l):l.end<a.end&&s.set(l.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=qt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,o,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:i,lanes:l}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=qt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:i,lanes:l},a)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const f of this.laneAssignments.keys())f>=n&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const c=this.measurementsCache.slice(0,d),u=new Array(l).fill(void 0);for(let f=0;f<d;f++){const m=c[f];m&&(u[m.lane]=f)}for(let f=d;f<n;f++){const m=o(f),h=this.laneAssignments.get(f);let p,g;if(h!==void 0&&this.options.lanes>1){p=h;const w=u[p],C=w!==void 0?c[w]:void 0;g=C?C.end+this.options.gap:r+s}else{const w=this.options.lanes===1?c[f-1]:this.getFurthestMeasurement(c,f);g=w?w.end+this.options.gap:r+s,p=w?w.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,p)}const x=a.get(m),v=typeof x=="number"?x:this.options.estimateSize(f),y=g+v;c[f]={index:f,start:g,size:v,end:y,key:m,lane:p},u[p]=f}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=qt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,o)=>this.range=n.length>0&&r>0?Ng({measurements:n,outerSize:r,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=qt(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,o,i)=>o===null||i===null?[]:n({startIndex:o,endIndex:i,overscan:r,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const i=o.key,l=this.elementsCache.get(i);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(i,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,i=r-o;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,i,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,s)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=qt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let o=0,i=n.length;o<i;o++){const l=n[o],a=r[l];s.push(a)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return Jo(r[Ql(0,r.length-1,s=>Jo(r[s]).start,n)])},this.getOffsetForAlignment=(n,r,s=0)=>{const o=this.getSize(),i=this.getScrollOffset();r==="auto"&&(r=n>=i+o?"end":"start"),r==="center"?n+=(s-o)/2:r==="end"&&(n-=o);const l=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(s.end>=i+o-this.options.scrollPaddingEnd)r="end";else if(s.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const l=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,r,s.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const i=10,l=d=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,d);if(!c){console.warn("Failed to get offset for index:",n);return}const[u,f]=c;this._scrollToOffset(u,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const m=this.getScrollOffset(),h=this.getOffsetForIndex(n,f);if(!h){console.warn("Failed to get offset for index:",n);return}vg(h[0],m)||a(f)})},a=d=>{this.targetWindow&&(o++,o<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,i),this.targetWindow.requestAnimationFrame(()=>l(d))):console.warn(`Failed to scroll to index ${n} after ${i} attempts.`))};l(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let i=r.length-1;for(;i>=0&&o.some(l=>l===null);){const l=r[i];o[l.lane]===null&&(o[l.lane]=l.end),i--}s=Math.max(...o.filter(l=>l!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}}const Ql=(t,e,n,r)=>{for(;t<=e;){const s=(t+e)/2|0,o=n(s);if(o<r)t=s+1;else if(o>r)e=s-1;else return s}return t>0?t-1:0};function Ng({measurements:t,outerSize:e,scrollOffset:n,lanes:r}){const s=t.length-1,o=a=>t[a].start;if(t.length<=r)return{startIndex:0,endIndex:s};let i=Ql(0,s,o,n),l=i;if(r===1)for(;l<s&&t[l].end<n+e;)l++;else if(r>1){const a=Array(r).fill(0);for(;l<s&&a.some(c=>c<n+e);){const c=t[l];a[c.lane]=c.end,l++}const d=Array(r).fill(n+e);for(;i>=0&&d.some(c=>c>=n);){const c=t[i];d[c.lane]=c.start,i--}i=Math.max(0,i-i%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:i,endIndex:l}}const ni=typeof document<"u"?de.useLayoutEffect:de.useEffect;function jg(t){const e=de.useReducer(()=>({}),{})[1],n={...t,onChange:(s,o)=>{var i;o?rt.flushSync(e):e(),(i=t.onChange)==null||i.call(t,s,o)}},[r]=de.useState(()=>new Rg(n));return r.setOptions(n),ni(()=>r._didMount(),[]),ni(()=>r._willUpdate()),r}function Dg(t){return jg({observeElementRect:Og,observeElementOffset:Eg,scrollToFn:kg,...t})}const Pg=({children:t,className:e,paddingY:n=0})=>{const{data:r,estimateSize:s,gap:o,getItemKey:i,hasNextPage:l,isError:a,isLoading:d,loadMoreThreshold:c,onLoadMore:u,overscan:f,scrollElement:m}=kr(),h=k.useCallback(w=>i(r[w],w),[r,i]),p=k.useCallback(w=>typeof s=="function"?s(w):s,[s]),g=Dg({count:r.length,enabled:!!m,estimateSize:p,gap:o,getItemKey:h,getScrollElement:()=>m,overscan:f}),x=g.getVirtualItems(),v=x.at(-1);k.useEffect(()=>{if(!v)return;v.index>=r.length-c&&l&&!d&&!a&&u&&u()},[v,r.length,l,d,a,c,u]);const y=k.Children.only(t);return b.jsx("div",{className:z("relative w-full",e),"data-ox-slot":"endless-list-items",style:{height:g.getTotalSize()+n*2},children:x.map(w=>{const C=r[w.index];return b.jsx(Xl.Provider,{value:{index:w.index,item:C,paddingY:n,virtualItem:w,virtualizer:g},children:k.isValidElement(y)?k.cloneElement(y):null},w.key)})})},Tg=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{hasNextPage:o,isLoading:i}=kr();if(!i||!o)return null;let l;e[4]!==r?(l=z("sticky bottom-0 flex items-center justify-center bg-background/80 py-4 backdrop-blur-sm",r),e[4]=r,e[5]=l):l=e[5];let a;e[6]!==n?(a=n??b.jsx(Cs,{size:"sm"}),e[6]=n,e[7]=a):a=e[7];let d;return e[8]!==s||e[9]!==l||e[10]!==a?(d=b.jsx("div",{className:l,"data-ox-slot":"endless-list-loader",...s,children:a}),e[8]=s,e[9]=l,e[10]=a,e[11]=d):d=e[11],d},Mg=Object.assign(hg,{Empty:gg,Error:xg,Item:bg,Items:Pg,Loader:Tg}),Jl=k.createContext(null),Ig=t=>{const e=I.compilerRuntimeExports.c(30),{align:n,children:r,closeDelay:s,defaultOpen:o,disabled:i,onOpenChange:l,open:a,openDelay:d,side:c}=t,u=n===void 0?"center":n,f=s===void 0?300:s,m=o===void 0?!1:o,h=i===void 0?!1:i,p=d===void 0?700:d,g=c===void 0?"bottom":c;let x;e[0]!==a||e[1]!==m||e[2]!==h||e[3]!==l?(x={closeOnEscape:!0,closeOnOutsideClick:!1,defaultOpen:m,disabled:h,onOpenChange:l,open:a},e[0]=a,e[1]=m,e[2]=h,e[3]=l,e[4]=x):x=e[4];const{close:v,containerRef:y,isClosing:w,isVisible:C,open:O,setOpen:S}=I.usePopperState(x),E=k.useRef(null);let R;e[5]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{E.current&&(clearTimeout(E.current),E.current=null)},e[5]=R):R=e[5];const N=R;let j;e[6]!==v||e[7]!==f?(j=()=>{N(),E.current=setTimeout(()=>{v()},f)},e[6]=v,e[7]=f,e[8]=j):j=e[8];const D=j;let P,M;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=()=>()=>{N()},M=[N],e[9]=P,e[10]=M):(P=e[9],M=e[10]),k.useEffect(P,M);let L;e[11]!==u||e[12]!==v||e[13]!==f||e[14]!==w||e[15]!==C||e[16]!==O||e[17]!==p||e[18]!==S||e[19]!==g||e[20]!==D?(L={align:u,clearCloseTimer:N,close:v,closeDelay:f,isClosing:w,isVisible:C,open:O,openDelay:p,setOpen:S,side:g,startCloseTimer:D},e[11]=u,e[12]=v,e[13]=f,e[14]=w,e[15]=C,e[16]=O,e[17]=p,e[18]=S,e[19]=g,e[20]=D,e[21]=L):L=e[21];const _=L;let T;e[22]!==r?(T=b.jsx(Se,{children:r}),e[22]=r,e[23]=T):T=e[23];let A;e[24]!==y||e[25]!==T?(A=b.jsx("div",{"data-ox-slot":"hovercard",ref:y,children:T}),e[24]=y,e[25]=T,e[26]=A):A=e[26];let V;return e[27]!==_||e[28]!==A?(V=b.jsx(Jl.Provider,{value:_,children:A}),e[27]=_,e[28]=A,e[29]=V):V=e[29],V},Zl=()=>{const t=k.useContext(Jl);if(!t)throw new Error("useHoverCardContext must be used within OxHoverCard");return t},Ag=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,forceMount:l,onPointerEnter:o,onPointerLeave:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,{align:d,clearCloseTimer:c,isClosing:u,isVisible:f,side:m,startCloseTimer:h}=Zl();let p;e[7]!==c||e[8]!==o?(p=S=>{c(),o?.(S)},e[7]=c,e[8]=o,e[9]=p):p=e[9];const g=p;let x;e[10]!==i||e[11]!==h?(x=S=>{h(),i?.(S)},e[10]=i,e[11]=h,e[12]=x):x=e[12];const v=x;if(!f&&!a)return null;let y;e[13]!==r?(y=z("ox-hovercard-animate min-w-64 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md",r),e[13]=r,e[14]=y):y=e[14];const w=u?"closing":"open";let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=b.jsx(Se.Arrow,{}),e[15]=C):C=e[15];let O;return e[16]!==d||e[17]!==n||e[18]!==s||e[19]!==g||e[20]!==v||e[21]!==m||e[22]!==y||e[23]!==w?(O=b.jsx(Bt,{children:b.jsxs(Se.Content,{align:d,className:y,side:m,sideOffset:8,...s,"data-ox-slot":"hovercard-content","data-ox-state":w,onPointerEnter:g,onPointerLeave:v,children:[C,n]})}),e[16]=d,e[17]=n,e[18]=s,e[19]=g,e[20]=v,e[21]=m,e[22]=y,e[23]=w,e[24]=O):O=e[24],O},_g=dt("OxHoverCardTrigger","div"),$g=t=>{const e=I.compilerRuntimeExports.c(27);let n,r,s,o,i,l;e[0]!==t?({asChild:l,children:n,className:r,onPointerEnter:o,onPointerLeave:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,{clearCloseTimer:d,openDelay:c,setOpen:u,startCloseTimer:f}=Zl(),m=k.useRef(null);let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{m.current&&(clearTimeout(m.current),m.current=null)},e[7]=h):h=e[7];const p=h;let g;e[8]!==d||e[9]!==o||e[10]!==c||e[11]!==u?(g=S=>{p(),d(),m.current=setTimeout(()=>{u(!0)},c),o?.(S)},e[8]=d,e[9]=o,e[10]=c,e[11]=u,e[12]=g):g=e[12];const x=g;let v;e[13]!==i||e[14]!==f?(v=S=>{p(),f(),i?.(S)},e[13]=i,e[14]=f,e[15]=v):v=e[15];const y=v;let w;e[16]!==r||e[17]!==s||e[18]!==x||e[19]!==y?(w={...s,className:r,"data-ox-slot":"hovercard-trigger",onPointerEnter:x,onPointerLeave:y},e[16]=r,e[17]=s,e[18]=x,e[19]=y,e[20]=w):w=e[20];const C=w;if(a){let S;return e[21]!==n||e[22]!==C?(S=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx(_g,{...C,children:n})}),e[21]=n,e[22]=C,e[23]=S):S=e[23],S}let O;return e[24]!==n||e[25]!==C?(O=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx("div",{...C,children:n})}),e[24]=n,e[25]=C,e[26]=O):O=e[26],O},Lg=Object.assign(Ig,{Content:Ag,Trigger:$g}),zg={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},Fg=({alt:t,className:e,fallback:n,height:r,objectFit:s,onLoadComplete:o,onLoadError:i,src:l,width:a,...d})=>{const[c,u]=k.useState("loading"),f=k.useRef(l);f.current!==l&&(f.current=l,u("loading"));const m=()=>{u("loaded"),o?.()},h=()=>{u("error"),i?.()},p=a&&r,g=s&&zg[s],x=c==="loading";return c==="error"?n?b.jsx("div",{className:z({"size-full":!p},e),"data-ox-slot":"image-fallback",style:{width:a,height:r},children:n}):b.jsxs("div",{className:z("flex flex-col items-center justify-center gap-2 bg-muted text-muted-foreground",{"size-full":!p},e),"data-ox-slot":"image-fallback",style:{width:a,height:r},children:[b.jsx(ue,{icon:ae.ImageOff,size:"md"}),b.jsx("span",{className:"text-sm",children:t})]}):b.jsxs("div",{className:z("relative",{"size-full":!p}),style:{width:a,height:r},children:[x?b.jsx(_t,{className:"absolute inset-0 size-full"}):null,b.jsx("img",{alt:t,className:z("size-full",g,{invisible:x},e),"data-ox-slot":"image",height:r,src:l,width:a,onError:h,onLoad:m,...d},l)]})},dr=t=>{const e=I.compilerRuntimeExports.c(82),{data:n,level:r,trailingComma:s}=t,o=s===void 0?!1:s,[i,l]=k.useState(r>2);if(n===null){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=b.jsx("span",{className:"text-muted-foreground",children:"null"}),e[0]=c):c=e[0];let u;e[1]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[1]=o,e[2]=u):u=e[2];let f;return e[3]!==u?(f=b.jsxs(b.Fragment,{children:[c,u]}),e[3]=u,e[4]=f):f=e[4],f}if(n===void 0){let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=b.jsx("span",{className:"text-muted-foreground",children:"undefined"}),e[5]=c):c=e[5];let u;e[6]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[6]=o,e[7]=u):u=e[7];let f;return e[8]!==u?(f=b.jsxs(b.Fragment,{children:[c,u]}),e[8]=u,e[9]=f):f=e[9],f}if(typeof n=="string"){let c;e[10]!==n?(c=b.jsxs("span",{className:We.green.text,children:['"',n,'"']}),e[10]=n,e[11]=c):c=e[11];let u;e[12]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[12]=o,e[13]=u):u=e[13];let f;return e[14]!==c||e[15]!==u?(f=b.jsxs(b.Fragment,{children:[c,u]}),e[14]=c,e[15]=u,e[16]=f):f=e[16],f}if(typeof n=="number"){let c;e[17]!==n?(c=b.jsx("span",{className:We.blue.text,children:n}),e[17]=n,e[18]=c):c=e[18];let u;e[19]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[19]=o,e[20]=u):u=e[20];let f;return e[21]!==c||e[22]!==u?(f=b.jsxs(b.Fragment,{children:[c,u]}),e[21]=c,e[22]=u,e[23]=f):f=e[23],f}if(typeof n=="boolean"){let c;e[24]!==n?(c=n.toString(),e[24]=n,e[25]=c):c=e[25];let u;e[26]!==c?(u=b.jsx("span",{className:We.amber.text,children:c}),e[26]=c,e[27]=u):u=e[27];let f;e[28]!==o?(f=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[28]=o,e[29]=f):f=e[29];let m;return e[30]!==u||e[31]!==f?(m=b.jsxs(b.Fragment,{children:[u,f]}),e[30]=u,e[31]=f,e[32]=m):m=e[32],m}if(Array.isArray(n)){if(n.length===0){let v;return e[33]===Symbol.for("react.memo_cache_sentinel")?(v=b.jsx("span",{className:"text-muted-foreground",children:"[]"}),e[33]=v):v=e[33],v}const c=i?"collapsed":"expanded";let u;e[34]!==i?(u=()=>l(!i),e[34]=i,e[35]=u):u=e[35];let f;e[36]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx("span",{className:"text-foreground",children:"["}),e[36]=f):f=e[36];let m;e[37]!==i||e[38]!==n.length?(m=i?b.jsxs("span",{className:"ml-1 text-muted-foreground",children:[n.length," item",n.length!==1?"s":""]}):null,e[37]=i,e[38]=n.length,e[39]=m):m=e[39];let h;e[40]!==c||e[41]!==u||e[42]!==m?(h=b.jsxs("button",{className:"ox-focus-ring text-muted-foreground hover:text-foreground","data-ox-state":c,onClick:u,children:[f,m]}),e[40]=c,e[41]=u,e[42]=m,e[43]=h):h=e[43];let p;e[44]!==i||e[45]!==n||e[46]!==r||e[47]!==o?(p=i?null:b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"ml-2 border-l border-muted pl-3",children:n.map((v,y)=>b.jsx("div",{className:"block",children:b.jsx(dr,{data:v,level:r+1,trailingComma:y<n.length-1})},y))}),b.jsxs("div",{children:[b.jsx("span",{className:"text-foreground",children:"]"}),o&&b.jsx("span",{className:"text-muted-foreground",children:","})]})]}),e[44]=i,e[45]=n,e[46]=r,e[47]=o,e[48]=p):p=e[48];let g;e[49]!==i?(g=i&&b.jsx("span",{className:"text-foreground",children:"]"}),e[49]=i,e[50]=g):g=e[50];let x;return e[51]!==h||e[52]!==p||e[53]!==g?(x=b.jsxs("div",{className:"inline","data-ox-slot":"json-array",children:[h,p,g]}),e[51]=h,e[52]=p,e[53]=g,e[54]=x):x=e[54],x}if(typeof n=="object"){let c;e[55]!==n?(c=Object.keys(n),e[55]=n,e[56]=c):c=e[56];const u=c;if(u.length===0){let w;return e[57]===Symbol.for("react.memo_cache_sentinel")?(w=b.jsx("span",{className:"text-muted-foreground",children:"{}"}),e[57]=w):w=e[57],w}const f=i?"collapsed":"expanded";let m;e[58]!==i?(m=()=>l(!i),e[58]=i,e[59]=m):m=e[59];let h;e[60]===Symbol.for("react.memo_cache_sentinel")?(h=b.jsx("span",{className:"text-foreground",children:"{"}),e[60]=h):h=e[60];let p;e[61]!==i||e[62]!==u.length?(p=i?b.jsxs("span",{className:"ml-1 text-muted-foreground",children:[u.length," key",u.length!==1?"s":""]}):null,e[61]=i,e[62]=u.length,e[63]=p):p=e[63];let g;e[64]!==f||e[65]!==m||e[66]!==p?(g=b.jsxs("button",{className:"ox-focus-ring text-muted-foreground hover:text-foreground","data-ox-state":f,onClick:m,children:[h,p]}),e[64]=f,e[65]=m,e[66]=p,e[67]=g):g=e[67];let x;e[68]!==i||e[69]!==n||e[70]!==u||e[71]!==r||e[72]!==o?(x=i?null:b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"ml-2 border-l border-muted pl-3",children:u.map((w,C)=>b.jsxs("div",{className:"block",children:[b.jsxs("span",{className:"text-foreground",children:['"',w,'"']}),b.jsx("span",{className:"text-muted-foreground",children:": "}),b.jsx(dr,{data:n[w],level:r+1,trailingComma:C<u.length-1})]},w))}),b.jsxs("div",{children:[b.jsx("span",{className:"text-foreground",children:"}"}),o&&b.jsx("span",{className:"text-muted-foreground",children:","})]})]}),e[68]=i,e[69]=n,e[70]=u,e[71]=r,e[72]=o,e[73]=x):x=e[73];let v;e[74]!==i?(v=i&&b.jsx("span",{className:"text-foreground",children:"}"}),e[74]=i,e[75]=v):v=e[75];let y;return e[76]!==g||e[77]!==x||e[78]!==v?(y=b.jsxs("div",{className:"inline",children:[g,x,v]}),e[76]=g,e[77]=x,e[78]=v,e[79]=y):y=e[79],y}const a=String(n);let d;return e[80]!==a?(d=b.jsx("span",{className:"text-muted-foreground",children:a}),e[80]=a,e[81]=d):d=e[81],d},Vg=t=>{const e=I.compilerRuntimeExports.c(27);let n,r,s;e[0]!==t?({className:n,value:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const[o,i]=k.useState(!1);let l;e[4]!==s?(l=(()=>{if(s==null)return{parsedData:null,isValid:!0,error:null};if(typeof s=="object")return{parsedData:s,isValid:!0,error:null};if(typeof s=="string")try{return{parsedData:JSON.parse(s),isValid:!0,error:null}}catch(C){const O=C;return{parsedData:null,isValid:!1,error:O instanceof Error?O.message:"Invalid JSON"}}return{parsedData:s,isValid:!0,error:null}})(),e[4]=s,e[5]=l):l=e[5];const{error:a,isValid:d,parsedData:c}=l;let u;e[6]!==c||e[7]!==s?(u=async()=>{const w=typeof s=="string"?s:JSON.stringify(c,null,2);try{await navigator.clipboard.writeText(w),i(!0),setTimeout(()=>i(!1),2e3)}catch(C){console.error("Failed to copy:",C)}},e[6]=c,e[7]=s,e[8]=u):u=e[8];const f=u;let m;d?o?m="copied":m="default":m="error";let h;e[9]!==n?(h=z("relative w-full overflow-auto rounded-lg border bg-card p-4 font-mono text-sm",n),e[9]=n,e[10]=h):h=e[10];const p=o?ae.Check:ae.Copy;let g;e[11]!==p?(g=b.jsx(ue,{icon:p}),e[11]=p,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==g?(x=b.jsx(Ze,{"aria-label":"Copy JSON to clipboard",className:"absolute top-1 right-1",size:"sm",variant:"ghost",onClick:f,children:g}),e[13]=f,e[14]=g,e[15]=x):x=e[15];let v;e[16]!==a||e[17]!==d||e[18]!==c||e[19]!==s?(v=b.jsx("div",{className:"pr-8 text-card-foreground",children:d?b.jsx(dr,{data:c,level:0}):b.jsxs("div",{className:"text-destructive-400",children:[b.jsx("div",{className:"font-medium",children:"Invalid JSON:"}),b.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:a}),b.jsx("div",{className:"mt-2 text-muted-foreground",children:b.jsx("pre",{className:"whitespace-pre-wrap",children:s})})]})}),e[16]=a,e[17]=d,e[18]=c,e[19]=s,e[20]=v):v=e[20];let y;return e[21]!==r||e[22]!==m||e[23]!==h||e[24]!==x||e[25]!==v?(y=b.jsxs("div",{className:h,...r,"data-ox-slot":"json-field","data-ox-state":m,children:[x,v]}),e[21]=r,e[22]=m,e[23]=h,e[24]=x,e[25]=v,e[26]=y):y=e[26],y},Bg=Object.assign(Vg,{Node:dr});function $s(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function Wg(t,e){return t.reduce((n,r,s)=>{const o=e.get(r);return o&&(n[s]=o),n},Array(t.length))}function Bn(t){return t!==null&&t>=0}function Hg(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Yg(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const Wn={scaleX:1,scaleY:1},qg=t=>{var e;let{rects:n,activeNodeRect:r,activeIndex:s,overIndex:o,index:i}=t;const l=(e=n[s])!=null?e:r;if(!l)return null;const a=Gg(n,i,s);if(i===s){const d=n[o];return d?{x:s<o?d.left+d.width-(l.left+l.width):d.left-l.left,y:0,...Wn}:null}return i>s&&i<=o?{x:-l.width-a,y:0,...Wn}:i<s&&i>=o?{x:l.width+a,y:0,...Wn}:{x:0,y:0,...Wn}};function Gg(t,e,n){const r=t[e],s=t[e-1],o=t[e+1];return!r||!s&&!o?0:n<e?s?r.left-(s.left+s.width):o.left-(r.left+r.width):o?o.left-(r.left+r.width):r.left-(s.left+s.width)}const Ls=t=>{let{rects:e,activeIndex:n,overIndex:r,index:s}=t;const o=$s(e,r,n),i=e[s],l=o[s];return!l||!i?null:{x:l.left-i.left,y:l.top-i.top,scaleX:l.width/i.width,scaleY:l.height/i.height}},Hn={scaleX:1,scaleY:1},zs=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:s,rects:o,overIndex:i}=t;const l=(e=o[n])!=null?e:r;if(!l)return null;if(s===n){const d=o[i];return d?{x:0,y:n<i?d.top+d.height-(l.top+l.height):d.top-l.top,...Hn}:null}const a=Ug(o,s,n);return s>n&&s<=i?{x:0,y:-l.height-a,...Hn}:s<n&&s>=i?{x:0,y:l.height+a,...Hn}:{x:0,y:0,...Hn}};function Ug(t,e,n){const r=t[e],s=t[e-1],o=t[e+1];return r?n<e?s?r.top-(s.top+s.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const ea="Sortable",ta=k.createContext({activeIndex:-1,containerId:ea,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ls,disabled:{draggable:!1,droppable:!1}});function Fs(t){let{children:e,id:n,items:r,strategy:s=Ls,disabled:o=!1}=t;const{active:i,dragOverlay:l,droppableRects:a,over:d,measureDroppableContainers:c}=Sl(),u=Nn(ea,n),f=l.rect!==null,m=k.useMemo(()=>r.map(O=>typeof O=="object"&&"id"in O?O.id:O),[r]),h=i!=null,p=i?m.indexOf(i.id):-1,g=d?m.indexOf(d.id):-1,x=k.useRef(m),v=!Hg(m,x.current),y=g!==-1&&p===-1||v,w=Yg(o);lt(()=>{v&&h&&c(m)},[v,m,h,c]),k.useEffect(()=>{x.current=m},[m]);const C=k.useMemo(()=>({activeIndex:p,containerId:u,disabled:w,disableTransforms:y,items:m,overIndex:g,useDragOverlay:f,sortedRects:Wg(m,a),strategy:s}),[p,u,w.draggable,w.droppable,y,m,g,a,f,s]);return k.createElement(ta.Provider,{value:C},e)}const Kg=t=>{let{id:e,items:n,activeIndex:r,overIndex:s}=t;return $s(n,r,s).indexOf(e)},Xg=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:s,items:o,newIndex:i,previousItems:l,previousContainerId:a,transition:d}=t;return!d||!r||l!==o&&s===i?!1:n?!0:i!==s&&e===a},Qg={duration:200,easing:"ease"},na="transform",Jg=at.Transition.toString({property:na,duration:0,easing:"linear"}),Zg={roleDescription:"sortable"};function ex(t){let{disabled:e,index:n,node:r,rect:s}=t;const[o,i]=k.useState(null),l=k.useRef(n);return lt(()=>{if(!e&&n!==l.current&&r.current){const a=s.current;if(a){const d=on(r.current,{ignoreTransform:!0}),c={x:a.left-d.left,y:a.top-d.top,scaleX:a.width/d.width,scaleY:a.height/d.height};(c.x||c.y)&&i(c)}}n!==l.current&&(l.current=n)},[e,n,r,s]),k.useEffect(()=>{o&&i(null)},[o]),o}function Vs(t){let{animateLayoutChanges:e=Xg,attributes:n,disabled:r,data:s,getNewIndex:o=Kg,id:i,strategy:l,resizeObserverConfig:a,transition:d=Qg}=t;const{items:c,containerId:u,activeIndex:f,disabled:m,disableTransforms:h,sortedRects:p,overIndex:g,useDragOverlay:x,strategy:v}=k.useContext(ta),y=tx(r,m),w=c.indexOf(i),C=k.useMemo(()=>({sortable:{containerId:u,index:w,items:c},...s}),[u,s,w,c]),O=k.useMemo(()=>c.slice(c.indexOf(i)),[c,i]),{rect:S,node:E,isOver:R,setNodeRef:N}=js({id:i,data:C,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...a}}),{active:j,activatorEvent:D,activeNodeRect:P,attributes:M,setNodeRef:L,listeners:_,isDragging:T,over:A,setActivatorNodeRef:V,transform:$}=El({id:i,data:C,attributes:{...Zg,...n},disabled:y.draggable}),F=Tm(N,L),W=!!j,B=W&&!h&&Bn(f)&&Bn(g),H=!x&&T,G=H&&B?$:null,Y=B?G??(l??v)({rects:p,activeNodeRect:P,activeIndex:f,overIndex:g,index:w}):null,Q=Bn(f)&&Bn(g)?o({id:i,items:c,activeIndex:f,overIndex:g}):w,X=j?.id,K=k.useRef({activeId:X,items:c,newIndex:Q,containerId:u}),J=c!==K.current.items,q=e({active:j,containerId:u,isDragging:T,isSorting:W,id:i,index:w,items:c,newIndex:K.current.newIndex,previousItems:K.current.items,previousContainerId:K.current.containerId,transition:d,wasDragging:K.current.activeId!=null}),ne=ex({disabled:!q,index:w,node:E,rect:S});return k.useEffect(()=>{W&&K.current.newIndex!==Q&&(K.current.newIndex=Q),u!==K.current.containerId&&(K.current.containerId=u),c!==K.current.items&&(K.current.items=c)},[W,Q,u,c]),k.useEffect(()=>{if(X===K.current.activeId)return;if(X!=null&&K.current.activeId==null){K.current.activeId=X;return}const te=setTimeout(()=>{K.current.activeId=X},50);return()=>clearTimeout(te)},[X]),{active:j,activeIndex:f,attributes:M,data:C,rect:S,index:w,newIndex:Q,items:c,isOver:R,isSorting:W,isDragging:T,listeners:_,node:E,overIndex:g,over:A,setNodeRef:F,setActivatorNodeRef:V,setDroppableNodeRef:N,setDraggableNodeRef:L,transform:ne??Y,transition:Z()};function Z(){if(ne||J&&K.current.newIndex===w)return Jg;if(!(H&&!gr(D)||!d)&&(W||q))return at.Transition.toString({...d,property:na})}}function tx(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t?.draggable)!=null?n:e.draggable,droppable:(r=t?.droppable)!=null?r:e.droppable}}function ur(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const nx=[ge.Down,ge.Right,ge.Up,ge.Left],Bs=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:o,over:i,scrollableAncestors:l}}=e;if(nx.includes(t.code)){if(t.preventDefault(),!n||!r)return;const a=[];o.getEnabled().forEach(u=>{if(!u||u!=null&&u.disabled)return;const f=s.get(u.id);if(f)switch(t.code){case ge.Down:r.top<f.top&&a.push(u);break;case ge.Up:r.top>f.top&&a.push(u);break;case ge.Left:r.left>f.left&&a.push(u);break;case ge.Right:r.left<f.left&&a.push(u);break}});const d=al({collisionRect:r,droppableRects:s,droppableContainers:a});let c=il(d,"id");if(c===i?.id&&d.length>1&&(c=d[1].id),c!=null){const u=o.get(n.id),f=o.get(c),m=f?s.get(f.id):null,h=f?.node.current;if(h&&m&&u&&f){const g=xr(h).some((O,S)=>l[S]!==O),x=ra(u,f),v=rx(u,f),y=g||!x?{x:0,y:0}:{x:v?r.width-m.width:0,y:v?r.height-m.height:0},w={x:m.left,y:m.top};return y.x&&y.y?w:wn(w,y)}}}};function ra(t,e){return!ur(t)||!ur(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function rx(t,e){return!ur(t)||!ur(e)||!ra(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}const sa=k.createContext(null),sx=()=>{const t=k.useContext(sa);if(!t)throw new Error("KanbanCardHandle must be used within an OxKanban.Card");return t},oa=k.createContext(null),ox=()=>{const t=k.useContext(oa);if(!t)throw new Error("KanbanCard must be used within an OxKanban.Column");return t},ia=k.createContext(null),la=()=>{const t=k.useContext(ia);if(!t)throw new Error("Kanban components must be used within an OxKanban");return t},ix=t=>{const e=I.compilerRuntimeExports.c(47);let n,r,s,o,i,l,a,d;e[0]!==t?({children:n,className:r,columnGap:a,disabled:d,onMove:o,onReorder:i,style:l,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=a===void 0?16:a,u=d===void 0?!1:d,[f,m]=k.useState(null),[h,p]=k.useState(null);let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=new Map,e[9]=g):g=e[9];const x=k.useRef(g);let v;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=new Map,e[10]=v):v=e[10];const y=k.useRef(v);let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=new Map,e[11]=w):w=e[11];const C=k.useRef(w),O=k.useRef(null);let S;e[12]===Symbol.for("react.memo_cache_sentinel")?(S={coordinateGetter:Bs},e[12]=S):S=e[12];const E=Ss(Xt(Dn),Xt(jn,S));let R;e[13]===Symbol.for("react.memo_cache_sentinel")?(R=(X,K,J)=>{x.current.set(X,K),y.current.set(X,J)},e[13]=R):R=e[13];const N=R;let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=X=>{x.current.delete(X),y.current.delete(X)},e[14]=j):j=e[14];const D=j;let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=X=>{const K=String(X.active.id);m(K),p(y.current.get(K)??null)},e[15]=P):P=e[15];const M=P;let L;e[16]!==o||e[17]!==i?(L=X=>{const{active:K,over:J}=X;if(!J)return;const q=String(K.id),ne=String(J.id),Z=x.current.get(q);if(!Z)return;const te=x.current.get(ne)??ne,le=C.current.get(te)??[];let ce=le.indexOf(ne);ce===-1&&(ce=le.length);const fe=O.current;if(!(fe?.column===te&&fe?.index===ce))if(O.current={column:te,index:ce},Z===te){const he=le.indexOf(q);he!==ce&&he!==-1&&i&&i(q,Z,he,ce)}else o(q,Z,te,ce)},e[16]=o,e[17]=i,e[18]=L):L=e[18];const _=L;let T;e[19]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{m(null),p(null),O.current=null},e[19]=T):T=e[19];const A=T;let V;e[20]!==h||e[21]!==f||e[22]!==u?(V={activeCardContent:h,activeId:f,columnCardIdsMap:C,disabled:u,registerCard:N,unregisterCard:D},e[20]=h,e[21]=f,e[22]=u,e[23]=V):V=e[23];const $=V,F=u?void 0:E;let W;e[24]!==r?(W=z("flex",r),e[24]=r,e[25]=W):W=e[25];let B;e[26]!==c||e[27]!==l?(B={gap:c,...l},e[26]=c,e[27]=l,e[28]=B):B=e[28];let H;e[29]!==n||e[30]!==s||e[31]!==W||e[32]!==B?(H=b.jsx("div",{className:W,"data-ox-slot":"kanban",style:B,...s,children:n}),e[29]=n,e[30]=s,e[31]=W,e[32]=B,e[33]=H):H=e[33];let G;e[34]!==h||e[35]!==f?(G=f&&h?b.jsx("div",{className:"cursor-grabbing rounded-md border border-primary bg-background p-3 shadow-xl ring-2 ring-primary/20",children:h}):null,e[34]=h,e[35]=f,e[36]=G):G=e[36];let U;e[37]!==G?(U=b.jsx(rp,{children:G}),e[37]=G,e[38]=U):U=e[38];let Y;e[39]!==_||e[40]!==F||e[41]!==H||e[42]!==U?(Y=b.jsxs(yr,{collisionDetection:al,sensors:F,onDragEnd:A,onDragOver:_,onDragStart:M,children:[H,U]}),e[39]=_,e[40]=F,e[41]=H,e[42]=U,e[43]=Y):Y=e[43];let Q;return e[44]!==$||e[45]!==Y?(Q=b.jsx(ia.Provider,{value:$,children:Y}),e[44]=$,e[45]=Y,e[46]=Q):Q=e[46],Q},lx=t=>{const e=I.compilerRuntimeExports.c(48);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,disabled:l,id:o,style:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,[d,c]=k.useState(!1),{registerCard:u,unregisterCard:f}=la(),{columnId:m,disabled:h}=ox(),p=h||a;let g,x;e[7]!==n||e[8]!==m||e[9]!==o||e[10]!==u||e[11]!==f?(g=()=>(u(o,m,n),()=>{f(o)}),x=[n,m,o,u,f],e[7]=n,e[8]=m,e[9]=o,e[10]=u,e[11]=f,e[12]=g,e[13]=x):(g=e[12],x=e[13]),k.useEffect(g,x);let v;e[14]!==p||e[15]!==o?(v={disabled:p,id:o},e[14]=p,e[15]=o,e[16]=v):v=e[16];const{attributes:y,isDragging:w,listeners:C,setActivatorNodeRef:O,setNodeRef:S,transform:E,transition:R}=Vs(v);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{c(!0)},e[17]=N):N=e[17];const j=N,D=w?.5:1;let P;e[18]!==E?(P=at.Transform.toString(E),e[18]=E,e[19]=P):P=e[19];let M;e[20]!==i||e[21]!==D||e[22]!==P||e[23]!==R?(M={opacity:D,transform:P,transition:R,...i},e[20]=i,e[21]=D,e[22]=P,e[23]=R,e[24]=M):M=e[24];const L=M;let _;e[25]!==y||e[26]!==p||e[27]!==w||e[28]!==C||e[29]!==O?(_={attributes:y,disabled:p,isDragging:w,listeners:C,registerHandle:j,setActivatorNodeRef:O},e[25]=y,e[26]=p,e[27]=w,e[28]=C,e[29]=O,e[30]=_):_=e[30];const T=_;let A;e[31]!==y||e[32]!==d||e[33]!==C?(A=d?{}:{...y,...C},e[31]=y,e[32]=d,e[33]=C,e[34]=A):A=e[34];const V=A;let $;e[35]!==r?($=z("rounded-md bg-background p-3 shadow-sm",r),e[35]=r,e[36]=$):$=e[36];const F=w?"dragging":void 0;let W;e[37]!==L||e[38]!==n||e[39]!==s||e[40]!==V||e[41]!==S||e[42]!==$||e[43]!==F?(W=b.jsx("div",{className:$,"data-ox-slot":"kanban-card","data-ox-state":F,ref:S,style:L,...V,...s,children:n}),e[37]=L,e[38]=n,e[39]=s,e[40]=V,e[41]=S,e[42]=$,e[43]=F,e[44]=W):W=e[44];let B;return e[45]!==T||e[46]!==W?(B=b.jsx(sa.Provider,{value:T,children:W}),e[45]=T,e[46]=W,e[47]=B):B=e[47],B},ax=t=>{const e=I.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{attributes:o,disabled:i,listeners:l,registerHandle:a,setActivatorNodeRef:d}=sx();let c,u;e[4]!==a?(c=()=>{a()},u=[a],e[4]=a,e[5]=c,e[6]=u):(c=e[5],u=e[6]),k.useEffect(c,u);let f;e[7]!==r||e[8]!==i?(f=z("flex cursor-grab touch-none items-center justify-center",{"cursor-not-allowed opacity-50":i},r),e[7]=r,e[8]=i,e[9]=f):f=e[9];let m;e[10]!==n?(m=n??b.jsx(ae.GripVertical,{className:"size-4 text-muted-foreground"}),e[10]=n,e[11]=m):m=e[11];let h;return e[12]!==o||e[13]!==i||e[14]!==s||e[15]!==l||e[16]!==d||e[17]!==f||e[18]!==m?(h=b.jsx("button",{"aria-label":"Drag to reorder",className:f,disabled:i,ref:d,type:"button",...o,...l,...s,"data-ox-slot":"kanban-card-handle",children:m}),e[12]=o,e[13]=i,e[14]=s,e[15]=l,e[16]=d,e[17]=f,e[18]=m,e[19]=h):h=e[19],h},aa=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mt-3",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"kanban-column-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},ca=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mb-3 font-medium",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"kanban-column-header",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},cx=t=>{const e=I.compilerRuntimeExports.c(53);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,disabled:d,emptyState:o,gap:c,heading:i,id:l,style:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=d===void 0?!1:d,f=c===void 0?8:c,{columnCardIdsMap:m,disabled:h}=la(),p=h||u;let g;e[10]!==l?(g={id:l},e[10]=l,e[11]=g):g=e[11];const{isOver:x,setNodeRef:v}=js(g);let y;e[12]!==n?(y={cards:[],footer:null,header:null},k.Children.forEach(n,W=>{k.isValidElement(W)&&(W.type===ca?y.header=W:W.type===aa?y.footer=W:y.cards.push(W))}),e[12]=n,e[13]=y):y=e[13];const{cards:w,footer:C,header:O}=y;let S;if(e[14]!==w){S=[];for(const W of w){const B=W.props;B.id&&S.push(B.id)}e[14]=w,e[15]=S}else S=e[15];const E=S;let R;e[16]!==m.current||e[17]!==l||e[18]!==E?(R=()=>{const W=m.current;return W.set(l,E),()=>{W.delete(l)}},e[16]=m.current,e[17]=l,e[18]=E,e[19]=R):R=e[19];let N;e[20]!==m||e[21]!==l||e[22]!==E?(N=[l,E,m],e[20]=m,e[21]=l,e[22]=E,e[23]=N):N=e[23],k.useEffect(R,N);let j;e[24]!==p||e[25]!==l?(j={columnId:l,disabled:p},e[24]=p,e[25]=l,e[26]=j):j=e[26];const D=j;let P;e[27]!==r||e[28]!==x?(P=z("flex min-w-64 flex-col rounded-lg bg-muted/50 p-3",{"ring-2 ring-primary":x},r),e[27]=r,e[28]=x,e[29]=P):P=e[29];const M=x?"over":void 0;let L;e[30]!==O||e[31]!==i?(L=O??(i&&b.jsx("div",{className:"mb-3 font-medium",children:i})),e[30]=O,e[31]=i,e[32]=L):L=e[32];let _;e[33]!==f?(_={gap:f},e[33]=f,e[34]=_):_=e[34];const T=w.length>0?w:o;let A;e[35]!==_||e[36]!==T?(A=b.jsx("div",{className:"flex flex-1 flex-col",style:_,children:T}),e[35]=_,e[36]=T,e[37]=A):A=e[37];let V;e[38]!==E||e[39]!==A?(V=b.jsx(Fs,{items:E,strategy:zs,children:A}),e[38]=E,e[39]=A,e[40]=V):V=e[40];let $;e[41]!==s||e[42]!==C||e[43]!==v||e[44]!==a||e[45]!==V||e[46]!==P||e[47]!==M||e[48]!==L?($=b.jsxs("div",{className:P,ref:v,style:a,...s,"data-ox-slot":"kanban-column","data-ox-state":M,children:[L,V,C]}),e[41]=s,e[42]=C,e[43]=v,e[44]=a,e[45]=V,e[46]=P,e[47]=M,e[48]=L,e[49]=$):$=e[49];let F;return e[50]!==D||e[51]!==$?(F=b.jsx(oa.Provider,{value:D,children:$}),e[50]=D,e[51]=$,e[52]=F):F=e[52],F},dx=Object.assign(ix,{Card:lx,CardHandle:ax,Column:cx,ColumnFooter:aa,ColumnHeader:ca}),ux=dt("OxLink","a"),fx=t=>{const e=I.compilerRuntimeExports.c(26);let n,r,s,o,i,l,a,d;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,size:a,variant:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=i===void 0?!1:i,u=l===void 0?!1:l,f=a===void 0?"md":a,m=d===void 0?"primary":d;let h;e[9]!==r||e[10]!==f||e[11]!==m?(h=z(Sd({variant:m,size:f}),r),e[9]=r,e[10]=f,e[11]=m,e[12]=h):h=e[12];const p=h,g=u||void 0,x=u?void 0:o,v=u?-1:void 0,y=u?mx:void 0;let w;e[13]!==p||e[14]!==s||e[15]!==g||e[16]!==x||e[17]!==v||e[18]!==y?(w={"aria-disabled":g,href:x,tabIndex:v,onClick:y,className:p,...s,"data-ox-slot":"link"},e[13]=p,e[14]=s,e[15]=g,e[16]=x,e[17]=v,e[18]=y,e[19]=w):w=e[19];const C=w;if(c){let S;return e[20]!==n||e[21]!==C?(S=b.jsx(ux,{...C,children:n}),e[20]=n,e[21]=C,e[22]=S):S=e[22],S}let O;return e[23]!==n||e[24]!==C?(O=b.jsx("a",{...C,children:n}),e[23]=n,e[24]=C,e[25]=O):O=e[25],O};function mx(t){return t.preventDefault()}const px=t=>{const e=I.compilerRuntimeExports.c(9),{children:n,className:r,columns:s,gap:o}=t,i=o===void 0?16:o,l=k.useRef(null);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const d=k.useRef(a),c=k.Children.toArray(n),{containerHeight:u,positions:f}=I.useMasonry(l,d,s,i,c.length);let m;e[1]!==r?(m=z("relative",r),e[1]=r,e[2]=m):m=e[2];const h="masonry",p="list",g=u||void 0;let x;e[3]!==g?(x={height:g},e[3]=g,e[4]=x):x=e[4];const v=c.map((w,C)=>{const O=f[C],S=O!==void 0,E=k.isValidElement(w)?w.key:C;return b.jsx("div",{"data-index":C,ref:R=>{d.current[C]=R},role:"listitem",style:{position:"absolute",transform:S?`translate(${O.x}px, ${O.y}px)`:void 0,visibility:S?"visible":"hidden",width:S?O.width:void 0},children:w},E??C)});let y;return e[5]!==m||e[6]!==x||e[7]!==v?(y=b.jsx("div",{className:m,"data-ox-slot":h,ref:l,role:p,style:x,children:v}),e[5]=m,e[6]=x,e[7]=v,e[8]=y):y=e[8],y},da=k.createContext(null),hx={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"},gx=t=>{const e=I.compilerRuntimeExports.c(59);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,closeOnOutsideClick:l,isOpen:o,onClose:i,persistent:a,showCloseButton:d,size:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=l===void 0?!0:l,f=a===void 0?!1:a,m=d===void 0?!0:d,h=c===void 0?"sm":c,p=k.useId(),g=k.useId(),x=k.useRef(null),[v,y]=k.useState(!1);let w;e[10]!==i?(w=Q=>Q?void 0:i?.(),e[10]=i,e[11]=w):w=e[11];let C;e[12]!==o||e[13]!==w?(C={value:o,onChange:w,defaultValue:!1,name:"OxDialog"},e[12]=o,e[13]=w,e[14]=C):C=e[14];const[O,S]=I.useControllableState(C),E=v&&O;let R;e[15]!==E?(R={containerRef:x,options:{enabled:E,restoreFocus:!0,trapFocus:!0,autoFocus:!0}},e[15]=E,e[16]=R):R=e[16],I.useFocus(R);let N;e[17]!==S?(N=()=>S(!1),e[17]=S,e[18]=N):N=e[18];let j;e[19]!==g||e[20]!==f||e[21]!==m||e[22]!==N||e[23]!==p?(j={onClose:N,titleId:p,bodyId:g,persistent:f,showCloseButton:m},e[19]=g,e[20]=f,e[21]=m,e[22]=N,e[23]=p,e[24]=j):j=e[24];const D=j;let P;e[25]!==O||e[26]!==v?(P=Q=>{Q.target===x.current&&!O&&v&&(y(!1),x.current?.close())},e[25]=O,e[26]=v,e[27]=P):P=e[27];const M=P;let L;e[28]!==O||e[29]!==f||e[30]!==S?(L=()=>{f&&O?x.current?.showModal():f||S(!1)},e[28]=O,e[29]=f,e[30]=S,e[31]=L):L=e[31];const _=L;let T,A;e[32]!==O?(T=()=>{O&&y(!0)},A=[O],e[32]=O,e[33]=T,e[34]=A):(T=e[33],A=e[34]),k.useEffect(T,A);let V,$;e[35]!==O||e[36]!==v?(V=()=>{const Q=x.current;if(!(!Q||!v))return O&&(document.body.classList.add("overflow-hidden"),Q.showModal()),xx},$=[O,v],e[35]=O,e[36]=v,e[37]=V,e[38]=$):(V=e[37],$=e[38]),k.useEffect(V,$);let F,W;if(e[39]!==u||e[40]!==_||e[41]!==f||e[42]!==v?(F=()=>{const Q=x.current;if(!Q||!v)return;const X=q=>{q.key==="Escape"&&f&&(q.preventDefault(),q.stopPropagation())},K=q=>{q.preventDefault(),_()},J=q=>{u&&q.target===Q&&_()};return document.addEventListener("keydown",X),Q.addEventListener("cancel",K),Q.addEventListener("click",J),Q.addEventListener("close",_),()=>{document.removeEventListener("keydown",X),Q.removeEventListener("cancel",K),Q.removeEventListener("click",J),Q.removeEventListener("close",_)}},W=[v,u,_,f],e[39]=u,e[40]=_,e[41]=f,e[42]=v,e[43]=F,e[44]=W):(F=e[43],W=e[44]),k.useEffect(F,W),!v)return null;const B=hx[h];let H;e[45]!==r||e[46]!==B?(H=z("fixed inset-0 m-auto grid h-fit w-full gap-4 rounded-lg border bg-background p-6 text-foreground shadow-lg","ox-dialog-animation ox-dialog-backdrop","max-w-[calc(100%-2rem)]",B,r),e[45]=r,e[46]=B,e[47]=H):H=e[47];const G=O?"open":"closing";let U;e[48]!==n||e[49]!==D?(U=b.jsx(da.Provider,{value:D,children:n}),e[48]=n,e[49]=D,e[50]=U):U=e[50];let Y;return e[51]!==g||e[52]!==s||e[53]!==M||e[54]!==H||e[55]!==G||e[56]!==U||e[57]!==p?(Y=rt.createPortal(b.jsx("dialog",{"aria-describedby":g,"aria-labelledby":p,className:H,ref:x,role:"dialog",onAnimationEnd:M,...s,"data-ox-slot":"dialog","data-ox-state":G,children:U}),document.body),e[51]=g,e[52]=s,e[53]=M,e[54]=H,e[55]=G,e[56]=U,e[57]=p,e[58]=Y):Y=e[58],Y};function xx(){document.body.classList.remove("overflow-hidden")}const ua=()=>{const t=k.useContext(da);if(!t)throw new Error("Dialog sub-components must be used within OxDialog");return t},bx=t=>{const e=I.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{bodyId:o}=ua();let i;e[4]!==r?(i=z("text-sm",r),e[4]=r,e[5]=i):i=e[5];let l;return e[6]!==o||e[7]!==n||e[8]!==s||e[9]!==i?(l=b.jsx("div",{id:o,className:i,...s,"data-ox-slot":"dialog-body",children:n}),e[6]=o,e[7]=n,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},vx=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("flex flex-col-reverse gap-2","sm:flex-row sm:justify-end",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"dialog-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},yx=t=>{const e=I.compilerRuntimeExports.c(17);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{onClose:o,persistent:i,showCloseButton:l,titleId:a}=ua(),d=l&&!i;let c;e[4]!==r?(c=z("flex flex-col gap-2 text-center sm:text-left",r),e[4]=r,e[5]=c):c=e[5];let u;e[6]!==n||e[7]!==s||e[8]!==c||e[9]!==a?(u=b.jsx("div",{id:a,className:c,...s,"data-ox-slot":"dialog-header",children:n}),e[6]=n,e[7]=s,e[8]=c,e[9]=a,e[10]=u):u=e[10];let f;e[11]!==o||e[12]!==d?(f=d?b.jsx(Ze,{"aria-label":"Close Dialog",className:"absolute top-4 right-4",variant:"ghost",onClick:o,children:b.jsx(ue,{icon:ae.X})}):null,e[11]=o,e[12]=d,e[13]=f):f=e[13];let m;return e[14]!==u||e[15]!==f?(m=b.jsxs(b.Fragment,{children:[u,f]}),e[14]=u,e[15]=f,e[16]=m):m=e[16],m},wx=Object.assign(gx,{Body:bx,Footer:vx,Header:yx}),fa=640,gn=k.createContext(null),Rr=()=>{const t=k.useContext(gn);if(!t)throw new Error("useNotificationsContext must be used within a NotificationsContext.Provider");return t},ma=t=>{const e=I.compilerRuntimeExports.c(43);let n,r,s,o,i,l,a,d,c,u,f;e[0]!==t?({children:n,className:r,icon:o,img:i,message:l,path:a,timestamp:u,title:f,type:d,unread:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11]);const m=d===void 0?"default":d,h=c===void 0?!1:c,{isMobile:p,onItemClick:g,setOpen:x}=Rr(),v=st[m].icon;let y;e[12]!==o||e[13]!==i||e[14]!==p||e[15]!==l||e[16]!==g||e[17]!==x||e[18]!==u||e[19]!==f||e[20]!==m||e[21]!==h?(y=()=>{const N={id:crypto.randomUUID(),icon:o,img:i,message:l,read:!h,timestamp:u||new Date,title:f||"",type:m};g?.(N),p&&x(!1)},e[12]=o,e[13]=i,e[14]=p,e[15]=l,e[16]=g,e[17]=x,e[18]=u,e[19]=f,e[20]=m,e[21]=h,e[22]=y):y=e[22];const w=y;let C;e[23]!==n||e[24]!==o||e[25]!==i||e[26]!==l||e[27]!==a||e[28]!==v||e[29]!==u||e[30]!==f||e[31]!==m||e[32]!==h?(C=n||b.jsxs(b.Fragment,{children:[i?b.jsx(gs,{alt:"User avatar",className:"mt-0.5","data-ox-slot":"notifications-icon",fallback:"NA",size:"sm",src:i}):b.jsx(ue.Box,{className:"mt-0.5",color:m,size:"md",children:b.jsx(ue,{icon:o??v,path:a})}),b.jsxs("div",{className:"min-w-0 flex-1","data-ox-slot":"notifications-content",children:[f&&b.jsx("h5",{className:"mb-1 text-sm leading-tight font-semibold text-pretty text-foreground",children:f}),l&&b.jsx("p",{className:"mb-1 text-xs leading-4",children:l}),u&&b.jsx("p",{className:"text-xs text-muted-foreground",children:fs(u)})]}),h&&b.jsx("div",{className:"mt-1.5 size-2 shrink-0 rounded-full bg-destructive","data-ox-slot":"notifications-unread"})]}),e[23]=n,e[24]=o,e[25]=i,e[26]=l,e[27]=a,e[28]=v,e[29]=u,e[30]=f,e[31]=m,e[32]=h,e[33]=C):C=e[33];const O=C;let S;e[34]!==r||e[35]!==h?(S=z("col-span-3 grid cursor-pointer grid-cols-subgrid items-start gap-3 p-3 text-left","ox-focus-ring hover:bg-neutral-accent/60",{"bg-neutral-accent/40":h},r),e[34]=r,e[35]=h,e[36]=S):S=e[36];const E=h?"unread":"read";let R;return e[37]!==s||e[38]!==w||e[39]!==O||e[40]!==S||e[41]!==E?(R=b.jsx("li",{className:"contents",children:b.jsx("button",{className:S,"data-ox-slot":"notifications-button",...s,"data-ox-state":E,onClick:w,children:O})}),e[37]=s,e[38]=w,e[39]=O,e[40]=S,e[41]=E,e[42]=R):R=e[42],R},ri=z("grid min-h-0 flex-1 auto-rows-min grid-cols-[auto_1fr_auto] overflow-y-auto",'[&_[data-ox-slot="notifications-icon"]]:col-start-1 [&_[data-ox-slot="notifications-icon"]]:justify-self-center','[&_[data-ox-slot="notifications-content"]]:cols-start-2','[&_[data-ox-slot="notifications-unread"]]:col-start-3 [&_[data-ox-slot="notifications-unread"]]:justify-self-end'),fr=t=>{const e=I.compilerRuntimeExports.c(52);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{emptyMessage:o,isMobile:i,items:l,onMarkAllRead:a,setOpen:d,unreadCount:c}=Rr(),u=l.length>0,f=c>0;let m;e[4]!==i||e[5]!==a||e[6]!==d?(m=()=>{a?.(),i&&d(!1)},e[4]=i,e[5]=a,e[6]=d,e[7]=m):m=e[7];const h=m;let p;e[8]!==n||e[9]!==o||e[10]!==u||e[11]!==l?(p=n||b.jsx(b.Fragment,{children:u?l.map(Cx):b.jsxs("li",{className:"col-span-3 px-3 py-8 text-center",role:"status",children:[b.jsx(ue,{className:"mx-auto mb-2 opacity-50",icon:ae.Bell,size:"3xl"}),b.jsx("p",{className:"text-sm opacity-50",children:o})]})}),e[8]=n,e[9]=o,e[10]=u,e[11]=l,e[12]=p):p=e[12];const g=p;if(i){let S;e[13]!==d?(S=()=>d(!1),e[13]=d,e[14]=S):S=e[14];let E;e[15]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx(ue,{icon:ae.X}),e[15]=E):E=e[15];let R;e[16]!==S?(R=b.jsx(Ze,{"aria-label":"Close notifications",variant:"ghost",onClick:S,children:E}),e[16]=S,e[17]=R):R=e[17];let N;e[18]===Symbol.for("react.memo_cache_sentinel")?(N=b.jsx("h5",{className:"text-sm font-semibold text-foreground",children:"Notifications"}),e[18]=N):N=e[18];let j;e[19]!==h||e[20]!==f||e[21]!==a?(j=f&&a&&b.jsx("button",{className:"cursor-pointer text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:h,children:"Mark all read"}),e[19]=h,e[20]=f,e[21]=a,e[22]=j):j=e[22];let D;e[23]!==j?(D=b.jsx("div",{className:"flex items-center gap-2",children:j}),e[23]=j,e[24]=D):D=e[24];let P;e[25]!==R||e[26]!==D?(P=b.jsxs("div",{className:"flex h-15 items-center justify-between border-b border-border px-4",children:[R,N,D]}),e[25]=R,e[26]=D,e[27]=P):P=e[27];let M;e[28]!==r?(M=z(ri,r),e[28]=r,e[29]=M):M=e[29];let L;e[30]!==s||e[31]!==g||e[32]!==M?(L=b.jsx("ul",{className:M,"data-ox-slot":"notifications-body",...s,children:g}),e[30]=s,e[31]=g,e[32]=M,e[33]=L):L=e[33];let _;return e[34]!==L||e[35]!==P?(_=b.jsxs(sr.Content,{closeOnOutsideClick:!0,side:"right",children:[P,L]}),e[34]=L,e[35]=P,e[36]=_):_=e[36],_}let x;e[37]===Symbol.for("react.memo_cache_sentinel")?(x=b.jsx("h5",{className:"text-sm font-semibold text-foreground",children:"Notifications"}),e[37]=x):x=e[37];let v;e[38]!==f||e[39]!==a?(v=f&&a&&b.jsx("button",{className:"ox-focus-ring cursor-pointer rounded-lg p-1 text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:a,children:"Mark all read"}),e[38]=f,e[39]=a,e[40]=v):v=e[40];let y;e[41]!==v?(y=b.jsx(Jt.Header,{className:"p-2",children:b.jsxs("div",{className:"flex items-center justify-between",children:[x,v]})}),e[41]=v,e[42]=y):y=e[42];let w;e[43]!==r?(w=z("w-85",ri,r),e[43]=r,e[44]=w):w=e[44];let C;e[45]!==s||e[46]!==g||e[47]!==w?(C=b.jsx("ul",{className:w,"data-ox-slot":"notifications-body",...s,children:g}),e[45]=s,e[46]=g,e[47]=w,e[48]=C):C=e[48];let O;return e[49]!==y||e[50]!==C?(O=b.jsxs(Jt.Content,{className:"p-0",children:[y,C]}),e[49]=y,e[50]=C,e[51]=O):O=e[51],O};function Cx(t,e){return b.jsx(ma,{className:z({"border-t border-border":e>0}),icon:t.icon,img:t.img,message:t.message,path:t.path,timestamp:t.timestamp,title:t.title,type:t.type,unread:!t.read},t.id)}const mr=t=>{const e=I.compilerRuntimeExports.c(44);let n,r,s,o,i;e[0]!==t?({children:n,className:r,customIcon:s,unreadCount:i,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const{disabled:l,isMobile:a,open:d,setOpen:c,unreadCount:u}=Rr(),f=i??u,m=f>0,h=s??ae.Bell,p=`Notifications${m?` (${f} unread)`:""}`;if(a){let O;e[6]!==l?(O=z({"opacity-50":l}),e[6]=l,e[7]=O):O=e[7];const S=d?"open":"closed";let E;e[8]!==c?(E=()=>c(!0),e[8]=c,e[9]=E):E=e[9];let R;e[10]!==n||e[11]!==h?(R=n||b.jsx(ue,{icon:h,size:"md"}),e[10]=n,e[11]=h,e[12]=R):R=e[12];let N;e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==o||e[17]!==S||e[18]!==E||e[19]!==R?(N=b.jsx(Ze,{"aria-label":p,className:r,disabled:l,variant:"ghost",...o,"data-ox-state":S,onClick:E,children:R}),e[13]=p,e[14]=r,e[15]=l,e[16]=o,e[17]=S,e[18]=E,e[19]=R,e[20]=N):N=e[20];let j;return e[21]!==O||e[22]!==N||e[23]!==f?(j=b.jsx(Zr,{className:O,count:f,variant:"primary",children:N}),e[21]=O,e[22]=N,e[23]=f,e[24]=j):j=e[24],j}let g;e[25]!==l?(g=z({"opacity-50":l}),e[25]=l,e[26]=g):g=e[26];let x;e[27]!==r||e[28]!==d?(x=z("flex h-10 min-w-10 items-center justify-center rounded-lg border border-transparent bg-transparent px-2 text-sm","ox-focus-ring enabled:cursor-pointer enabled:text-foreground enabled:hover:bg-neutral-accent disabled:ox-default-disabled",{"bg-neutral-accent":d},r),e[27]=r,e[28]=d,e[29]=x):x=e[29];const v=d?"open":"closed";let y;e[30]!==n||e[31]!==h?(y=n||b.jsx(ue,{icon:h,size:"md"}),e[30]=n,e[31]=h,e[32]=y):y=e[32];let w;e[33]!==p||e[34]!==l||e[35]!==o||e[36]!==x||e[37]!==v||e[38]!==y?(w=b.jsx(Jt.Trigger,{"aria-label":p,className:x,"data-ox-slot":"notifications-trigger",disabled:l,hideIcon:!0,...o,"data-ox-state":v,children:y}),e[33]=p,e[34]=l,e[35]=o,e[36]=x,e[37]=v,e[38]=y,e[39]=w):w=e[39];let C;return e[40]!==g||e[41]!==w||e[42]!==f?(C=b.jsx(Zr,{className:g,count:f,variant:"primary",children:w}),e[40]=g,e[41]=w,e[42]=f,e[43]=C):C=e[43],C},Ox=t=>{const e=I.compilerRuntimeExports.c(68);let n,r,s,o,i,l,a,d;e[0]!==t?({children:n,disabled:i,emptyMessage:l,items:a,onItemClick:s,onMarkAllRead:o,unreadCount:d,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=i===void 0?!1:i,u=l===void 0?"No notifications":l;let f;e[9]!==a?(f=a===void 0?[]:a,e[9]=a,e[10]=f):f=e[10];const m=f,h=d===void 0?0:d,[p,g]=k.useState(!1),[x,v]=k.useState(!1);let y,w;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const D=()=>{v(window.innerWidth<fa)};return D(),window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},w=[],e[11]=y,e[12]=w):(y=e[11],w=e[12]),k.useEffect(y,w);let C;e[13]!==c||e[14]!==u||e[15]!==x||e[16]!==m||e[17]!==s||e[18]!==o||e[19]!==p||e[20]!==h?(C={disabled:c,emptyMessage:u,isMobile:x,items:m,open:p,setOpen:g,unreadCount:h,onItemClick:s,onMarkAllRead:o},e[13]=c,e[14]=u,e[15]=x,e[16]=m,e[17]=s,e[18]=o,e[19]=p,e[20]=h,e[21]=C):C=e[21];const O=C;if(n){let D;e[22]!==n?(D=k.Children.toArray(n).find(Ex),e[22]=n,e[23]=D):D=e[23];const P=D;let M;e[24]!==n?(M=k.Children.toArray(n).find(Sx),e[24]=n,e[25]=M):M=e[25];const L=M;if(x){let V;e[26]!==L||e[27]!==p?(V=b.jsx(sr,{open:p,onOpenChange:g,children:L}),e[26]=L,e[27]=p,e[28]=V):V=e[28];let $;e[29]!==r||e[30]!==V||e[31]!==P?($=b.jsxs("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"mobile",children:[P,V]}),e[29]=r,e[30]=V,e[31]=P,e[32]=$):$=e[32];let F;return e[33]!==O||e[34]!==$?(F=b.jsx(gn.Provider,{value:O,children:$}),e[33]=O,e[34]=$,e[35]=F):F=e[35],F}let _;e[36]!==L||e[37]!==c||e[38]!==p||e[39]!==P?(_=b.jsxs(Jt,{align:"end",disabled:c,open:p,side:"bottom",onOpenChange:g,children:[P,L]}),e[36]=L,e[37]=c,e[38]=p,e[39]=P,e[40]=_):_=e[40];let T;e[41]!==r||e[42]!==_?(T=b.jsx("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"desktop",children:_}),e[41]=r,e[42]=_,e[43]=T):T=e[43];let A;return e[44]!==O||e[45]!==T?(A=b.jsx(gn.Provider,{value:O,children:T}),e[44]=O,e[45]=T,e[46]=A):A=e[46],A}if(x){let D;e[47]===Symbol.for("react.memo_cache_sentinel")?(D=b.jsx(mr,{}),e[47]=D):D=e[47];let P;e[48]===Symbol.for("react.memo_cache_sentinel")?(P=b.jsx(fr,{}),e[48]=P):P=e[48];let M;e[49]!==p?(M=b.jsx(sr,{open:p,onOpenChange:g,children:P}),e[49]=p,e[50]=M):M=e[50];let L;e[51]!==r||e[52]!==M?(L=b.jsxs("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"mobile",children:[D,M]}),e[51]=r,e[52]=M,e[53]=L):L=e[53];let _;return e[54]!==O||e[55]!==L?(_=b.jsx(gn.Provider,{value:O,children:L}),e[54]=O,e[55]=L,e[56]=_):_=e[56],_}let S,E;e[57]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx(mr,{}),S=b.jsx(fr,{}),e[57]=S,e[58]=E):(S=e[57],E=e[58]);let R;e[59]!==c||e[60]!==p?(R=b.jsxs(Jt,{align:"end",disabled:c,open:p,side:"bottom",onOpenChange:g,children:[E,S]}),e[59]=c,e[60]=p,e[61]=R):R=e[61];let N;e[62]!==r||e[63]!==R?(N=b.jsx("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"desktop",children:R}),e[62]=r,e[63]=R,e[64]=N):N=e[64];let j;return e[65]!==O||e[66]!==N?(j=b.jsx(gn.Provider,{value:O,children:N}),e[65]=O,e[66]=N,e[67]=j):j=e[67],j};function Ex(t){return k.isValidElement(t)&&t.type===mr}function Sx(t){return k.isValidElement(t)&&t.type===fr}const kx=t=>{const e=I.compilerRuntimeExports.c(45);let n,r,s,o,i,l,a,d,c,u,f,m;e[0]!==t?({children:n,className:r,href:o,icon:i,img:l,message:a,path:d,timestamp:f,title:m,type:c,unread:u,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12]);const h=c===void 0?"default":c,p=u===void 0?!1:u,{isMobile:g,onItemClick:x,setOpen:v}=Rr(),y=st[h].icon;let w;e[13]!==i||e[14]!==l||e[15]!==g||e[16]!==a||e[17]!==x||e[18]!==v||e[19]!==f||e[20]!==m||e[21]!==h||e[22]!==p?(w=()=>{const j={id:crypto.randomUUID(),icon:i,img:l,message:a,read:!p,timestamp:f||new Date,title:m||"",type:h};x?.(j),g&&v(!1)},e[13]=i,e[14]=l,e[15]=g,e[16]=a,e[17]=x,e[18]=v,e[19]=f,e[20]=m,e[21]=h,e[22]=p,e[23]=w):w=e[23];const C=w;let O;e[24]!==n||e[25]!==i||e[26]!==l||e[27]!==a||e[28]!==d||e[29]!==y||e[30]!==f||e[31]!==m||e[32]!==h||e[33]!==p?(O=n||b.jsxs(b.Fragment,{children:[l?b.jsx(gs,{alt:"User avatar",className:"mt-0.5","data-ox-slot":"notifications-icon",fallback:"NA",size:"md",src:l}):b.jsx(ue.Box,{className:"mt-0.5",color:h,"data-ox-slot":"notifications-icon",size:"md",children:b.jsx(ue,{icon:i??y,path:d})}),b.jsxs("div",{className:"min-w-0 flex-1","data-ox-slot":"notifications-content",children:[m&&b.jsx("h5",{className:"mb-1 text-sm leading-tight font-semibold text-pretty text-foreground",children:m}),a&&b.jsx("p",{className:"mb-1 text-xs leading-4",children:a}),f&&b.jsx("p",{className:"text-xs text-muted-foreground",children:fs(f)})]}),p&&b.jsx("div",{className:"mt-1.5 size-2 shrink-0 rounded-full bg-destructive","data-ox-slot":"notifications-unread"})]}),e[24]=n,e[25]=i,e[26]=l,e[27]=a,e[28]=d,e[29]=y,e[30]=f,e[31]=m,e[32]=h,e[33]=p,e[34]=O):O=e[34];const S=O;let E;e[35]!==r||e[36]!==p?(E=z("col-span-3 grid cursor-pointer grid-cols-subgrid items-start gap-3 p-3 text-left","ox-focus-ring hover:bg-neutral-accent/60",{"bg-neutral-accent/40":p},r),e[35]=r,e[36]=p,e[37]=E):E=e[37];const R=p?"unread":"read";let N;return e[38]!==s||e[39]!==C||e[40]!==o||e[41]!==S||e[42]!==E||e[43]!==R?(N=b.jsx("li",{className:"contents",children:b.jsx("a",{className:E,"data-ox-slot":"notifications-link",href:o,...s,"data-ox-state":R,onClick:C,children:S})}),e[38]=s,e[39]=C,e[40]=o,e[41]=S,e[42]=E,e[43]=R,e[44]=N):N=e[44],N},Rx=Object.assign(Ox,{Body:fr,Button:ma,Link:kx,Trigger:mr}),pa=k.createContext(void 0),ha=()=>{const t=k.useContext(pa);if(!t)throw new Error("PageOutline components must be used within an OxPageOutline");return t},Nx=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o;e[0]!==t?({children:n,className:r,scrollOffset:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o===void 0?0:o;let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=new Map,e[5]=l):l=e[5];const a=k.useRef(l),d=k.useRef(null);let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[6]=c):c=e[6];const[u,f]=k.useState(c),{activeId:m,setActiveId:h}=I.useScrollSpy(u);let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=(D,P)=>{a.current.set(D,P),f(M=>M.includes(D)?M:[...M,D])},e[7]=p):p=e[7];const g=p;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=D=>{a.current.delete(D),f(P=>P.filter(M=>M!==D))},e[8]=x):x=e[8];const v=x;let y;e[9]!==i||e[10]!==h?(y=D=>{const P=D.replace("#","");h(P),Di(`#${P}`,{behavior:"smooth",offset:i}).catch(jx)},e[9]=i,e[10]=h,e[11]=y):y=e[11];const w=y;let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=D=>{d.current=D},e[12]=C):C=e[12];const O=C;let S;e[13]!==m||e[14]!==w?(S={activeId:m,itemReferences:a,registerItem:g,scrollToSection:w,setContentRef:O,unregisterItem:v},e[13]=m,e[14]=w,e[15]=S):S=e[15];const E=S;let R;e[16]!==r?(R=z(r),e[16]=r,e[17]=R):R=e[17];let N;e[18]!==n||e[19]!==s||e[20]!==R?(N=b.jsx("nav",{className:R,"data-ox-slot":"page-outline",...s,children:n}),e[18]=n,e[19]=s,e[20]=R,e[21]=N):N=e[21];let j;return e[22]!==E||e[23]!==N?(j=b.jsx(pa.Provider,{value:E,children:N}),e[22]=E,e[23]=N,e[24]=j):j=e[24],j};function jx(t){console.error("Failed to scroll to element:",t)}const Dx=t=>{const e=I.compilerRuntimeExports.c(21);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{activeId:o,itemReferences:i,setContentRef:l}=ha(),a=k.useRef(null);let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d={height:0,opacity:0,top:0},e[4]=d):d=e[4];const[c,u]=k.useState(d),f=k.useRef("");let m,h;e[5]!==l?(m=()=>{a.current&&l(a.current)},h=[l],e[5]=l,e[6]=m,e[7]=h):(m=e[6],h=e[7]),k.useLayoutEffect(m,h);let p,g;e[8]!==o||e[9]!==i?(p=()=>{if(f.current===o)return;if(f.current=o,!o||!a.current){u({height:0,opacity:0,top:0});return}const w=i.current.get(o);if(!w){u({height:0,opacity:0,top:0});return}const C=a.current.getBoundingClientRect(),O=w.getBoundingClientRect();u({height:O.height,opacity:1,top:O.top-C.top})},g=[o,i],e[8]=o,e[9]=i,e[10]=p,e[11]=g):(p=e[10],g=e[11]),k.useLayoutEffect(p,g);let x;e[12]!==r?(x=z("relative border-l border-border",r),e[12]=r,e[13]=x):x=e[13];let v;e[14]!==c?(v=b.jsx("div",{className:"pointer-events-none absolute left-0 w-0.5 -translate-x-px rounded-full bg-primary transition-all duration-150 ease-out",style:c}),e[14]=c,e[15]=v):v=e[15];let y;return e[16]!==n||e[17]!==s||e[18]!==x||e[19]!==v?(y=b.jsxs("div",{className:x,"data-ox-slot":"page-outline-content",ref:a,...s,children:[v,n]}),e[16]=n,e[17]=s,e[18]=x,e[19]=v,e[20]=y):y=e[20],y},Px=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mb-2 text-sm font-medium text-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,"data-ox-slot":"page-outline-header",...s,children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Tx={1:"pl-3",2:"pl-6",3:"pl-9"},Mx=t=>{const e=I.compilerRuntimeExports.c(29);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,href:s,level:l,onClick:o,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?1:l,{activeId:d,registerItem:c,scrollToSection:u,unregisterItem:f}=ha(),m=k.useRef(null);let h;e[7]!==s?(h=s.startsWith("#")?s.slice(1):s,e[7]=s,e[8]=h):h=e[8];const p=h,g=d===p;let x,v;e[9]!==p||e[10]!==c||e[11]!==f?(x=()=>(m.current&&c(p,m.current),()=>f(p)),v=[p,c,f],e[9]=p,e[10]=c,e[11]=f,e[12]=x,e[13]=v):(x=e[12],v=e[13]),k.useEffect(x,v);let y;e[14]!==s||e[15]!==o||e[16]!==u?(y=N=>{N.preventDefault(),u(s),o?.(N)},e[14]=s,e[15]=o,e[16]=u,e[17]=y):y=e[17];const w=y,C=Tx[a],O=g&&"text-foreground";let S;e[18]!==r||e[19]!==C||e[20]!==O?(S=z("block py-1.5 text-sm","text-muted-foreground transition-colors duration-150 hover:text-foreground",C,O,r),e[18]=r,e[19]=C,e[20]=O,e[21]=S):S=e[21];const E=g?"active":"inactive";let R;return e[22]!==n||e[23]!==w||e[24]!==s||e[25]!==i||e[26]!==S||e[27]!==E?(R=b.jsx("a",{className:S,"data-ox-slot":"page-outline-item","data-ox-state":E,href:s,ref:m,onClick:w,...i,children:n}),e[22]=n,e[23]=w,e[24]=s,e[25]=i,e[26]=S,e[27]=E,e[28]=R):R=e[28],R},Ix=Object.assign(Nx,{Content:Dx,Header:Px,Item:Mx}),Ax=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mx-auto flex w-full justify-center",r),e[4]=r,e[5]=o):o=e[5];let i;e[6]!==n?(i=b.jsx("ul",{className:"flex items-center gap-1",children:n}),e[6]=n,e[7]=i):i=e[7];let l;return e[8]!==s||e[9]!==o||e[10]!==i?(l=b.jsx("nav",{"aria-label":"pagination",className:o,role:"navigation",...s,"data-ox-slot":"pagination",children:i}),e[8]=s,e[9]=o,e[10]=i,e[11]=l):l=e[11],l},_x=t=>{const e=I.compilerRuntimeExports.c(10);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let s;e[3]!==n?(s=z(At({variant:"ghost",size:"md",iconOnly:!0}),"pointer-events-none",n),e[3]=n,e[4]=s):s=e[4];let o,i;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(ue,{icon:ae.MoreHorizontal}),i=b.jsx("span",{className:"sr-only",children:"More pages"}),e[5]=o,e[6]=i):(o=e[5],i=e[6]);let l;return e[7]!==r||e[8]!==s?(l=b.jsxs("span",{"aria-hidden":"true",className:s,role:"presentation",...r,"data-ox-slot":"pagination-ellipsis",children:[o,i]}),e[7]=r,e[8]=s,e[9]=l):l=e[9],l},$x=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z(r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("li",{className:o,...s,"data-ox-slot":"pagination-item",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Lx=dt("OxPaginationLink","a"),zx=t=>{const e=I.compilerRuntimeExports.c(27);let n,r,s,o,i,l,a;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,isActive:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const d=i===void 0?!1:i,c=l===void 0?!1:l,u=a===void 0?!1:a;let f;e[8]!==r||e[9]!==u?(f=z(At({variant:u?"default":"ghost",size:"md",iconOnly:!0}),r),e[8]=r,e[9]=u,e[10]=f):f=e[10];const m=f;let h;e[11]!==c||e[12]!==s?(h=C=>{if(c){C.preventDefault();return}s.onClick?.(C)},e[11]=c,e[12]=s,e[13]=h):h=e[13];const p=h,g=u?"page":void 0,x=c?!0:void 0;let v;e[14]!==m||e[15]!==s||e[16]!==p||e[17]!==o||e[18]!==g||e[19]!==x?(v={"aria-current":g,"aria-disabled":x,href:o,className:m,...s,onClick:p,"data-ox-slot":"pagination-link"},e[14]=m,e[15]=s,e[16]=p,e[17]=o,e[18]=g,e[19]=x,e[20]=v):v=e[20];const y=v;if(d){let C;return e[21]!==n||e[22]!==y?(C=b.jsx(Lx,{...y,children:n}),e[21]=n,e[22]=y,e[23]=C):C=e[23],C}let w;return e[24]!==n||e[25]!==y?(w=b.jsx("a",{...y,children:n}),e[24]=n,e[25]=y,e[26]=w):w=e[26],w},Fx=dt("OxPaginationNext","a"),Vx=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=i===void 0?!1:i,d=l===void 0?!1:l,c=k.Children.count(n)>0;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"hidden sm:block",children:"Next"}),b.jsx(ue,{icon:ae.ChevronRight})]}),e[7]=u):u=e[7];const m=c?n:u;let h;e[8]!==r?(h=z(At({variant:"ghost",size:"md"}),"size-9 p-0 sm:h-9 sm:w-auto sm:px-4",r),e[8]=r,e[9]=h):h=e[9];const p=h;let g;e[10]!==d||e[11]!==s?(g=O=>{if(d){O.preventDefault();return}s.onClick?.(O)},e[10]=d,e[11]=s,e[12]=g):g=e[12];const x=g,v=d?!0:void 0;let y;e[13]!==p||e[14]!==s||e[15]!==x||e[16]!==o||e[17]!==v?(y={"aria-label":"Go to next page","aria-disabled":v,href:o,className:p,...s,onClick:x,"data-ox-slot":"pagination-next"},e[13]=p,e[14]=s,e[15]=x,e[16]=o,e[17]=v,e[18]=y):y=e[18];const w=y;if(a){let O;return e[19]!==m||e[20]!==w?(O=b.jsx(Fx,{...w,children:m}),e[19]=m,e[20]=w,e[21]=O):O=e[21],O}let C;return e[22]!==m||e[23]!==w?(C=b.jsx("a",{...w,children:m}),e[22]=m,e[23]=w,e[24]=C):C=e[24],C},Bx=dt("OxPaginationPrevious","a"),Wx=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=i===void 0?!1:i,d=l===void 0?!1:l,c=k.Children.count(n)>0;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsxs(b.Fragment,{children:[b.jsx(ue,{icon:ae.ChevronLeft}),b.jsx("span",{className:"hidden sm:block",children:"Previous"})]}),e[7]=u):u=e[7];const m=c?n:u;let h;e[8]!==r?(h=z(At({variant:"ghost",size:"md"}),"size-9 p-0 sm:h-9 sm:w-auto sm:px-4",r),e[8]=r,e[9]=h):h=e[9];const p=h;let g;e[10]!==d||e[11]!==s?(g=O=>{if(d){O.preventDefault();return}s.onClick?.(O)},e[10]=d,e[11]=s,e[12]=g):g=e[12];const x=g,v=d?!0:void 0;let y;e[13]!==p||e[14]!==s||e[15]!==x||e[16]!==o||e[17]!==v?(y={"aria-label":"Go to previous page","aria-disabled":v,href:o,className:p,...s,onClick:x,"data-ox-slot":"pagination-previous"},e[13]=p,e[14]=s,e[15]=x,e[16]=o,e[17]=v,e[18]=y):y=e[18];const w=y;if(a){let O;return e[19]!==m||e[20]!==w?(O=b.jsx(Bx,{...w,children:m}),e[19]=m,e[20]=w,e[21]=O):O=e[21],O}let C;return e[22]!==m||e[23]!==w?(C=b.jsx("a",{...w,children:m}),e[22]=m,e[23]=w,e[24]=C):C=e[24],C},Hx=Object.assign(Ax,{Ellipsis:_x,Item:$x,Link:zx,Next:Vx,Previous:Wx}),ga=k.createContext(null),Yx=t=>{const e=I.compilerRuntimeExports.c(22),{align:n,children:r,closeOnOutsideClick:s,defaultOpen:o,disabled:i,onOpenChange:l,open:a,side:d}=t,c=n===void 0?"center":n,u=s===void 0?!0:s,f=o===void 0?!1:o,m=i===void 0?!1:i,h=d===void 0?"bottom":d;let p;e[0]!==u||e[1]!==a||e[2]!==f||e[3]!==m||e[4]!==l?(p={closeOnEscape:!0,closeOnOutsideClick:u,defaultOpen:f,disabled:m,onOpenChange:l,open:a},e[0]=u,e[1]=a,e[2]=f,e[3]=m,e[4]=l,e[5]=p):p=e[5];const{close:g,containerRef:x,isClosing:v,isVisible:y,open:w,toggle:C}=I.usePopperState(p);let O;e[6]!==c||e[7]!==g||e[8]!==v||e[9]!==y||e[10]!==w||e[11]!==h||e[12]!==C?(O={align:c,close:g,isClosing:v,isVisible:y,open:w,side:h,toggle:C},e[6]=c,e[7]=g,e[8]=v,e[9]=y,e[10]=w,e[11]=h,e[12]=C,e[13]=O):O=e[13];const S=O;let E;e[14]!==r?(E=b.jsx(Se,{children:r}),e[14]=r,e[15]=E):E=e[15];let R;e[16]!==x||e[17]!==E?(R=b.jsx("div",{"data-ox-slot":"popover",ref:x,children:E}),e[16]=x,e[17]=E,e[18]=R):R=e[18];let N;return e[19]!==S||e[20]!==R?(N=b.jsx(ga.Provider,{value:S,children:R}),e[19]=S,e[20]=R,e[21]=N):N=e[21],N},xa=()=>{const t=k.useContext(ga);if(!t)throw new Error("usePopoverContext must be used within OxPopover");return t},qx=t=>{const e=I.compilerRuntimeExports.c(23);let n,r,s,o;e[0]!==t?({children:n,className:r,showCloseButton:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o===void 0?!0:o,{align:l,close:a,isClosing:d,isVisible:c,side:u}=xa();if(!c)return null;let f;e[5]!==r?(f=z("ox-popover-animate relative max-w-sm min-w-64 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md",r),e[5]=r,e[6]=f):f=e[6];const m=d?"closing":"open";let h;e[7]!==a||e[8]!==i?(h=i&&b.jsx("div",{className:"absolute top-2 right-2",children:b.jsx(Ze,{"aria-label":"Close popover",size:"sm",variant:"ghost",onClick:a,children:b.jsx(ue,{icon:ae.X})})}),e[7]=a,e[8]=i,e[9]=h):h=e[9];let p;e[10]!==i?(p=z({"pr-8":i}),e[10]=i,e[11]=p):p=e[11];let g;e[12]!==n||e[13]!==p?(g=b.jsx("div",{className:p,children:n}),e[12]=n,e[13]=p,e[14]=g):g=e[14];let x;return e[15]!==l||e[16]!==s||e[17]!==u||e[18]!==f||e[19]!==m||e[20]!==h||e[21]!==g?(x=b.jsx(Bt,{children:b.jsxs(Se.Content,{align:l,className:f,side:u,sideOffset:8,...s,"data-ox-slot":"popover-content","data-ox-state":m,children:[h,g]})}),e[15]=l,e[16]=s,e[17]=u,e[18]=f,e[19]=m,e[20]=h,e[21]=g,e[22]=x):x=e[22],x},Gx=dt("OxPopoverTrigger","button"),Ux=t=>{const e=I.compilerRuntimeExports.c(19);let n,r,s,o,i;e[0]!==t?({asChild:i,children:n,className:r,onClick:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?!1:i,{toggle:a}=xa();let d;e[6]!==o||e[7]!==a?(d=h=>{a(),o?.(h)},e[6]=o,e[7]=a,e[8]=d):d=e[8];const c=d;let u;e[9]!==r||e[10]!==s||e[11]!==c?(u={type:"button",...s,className:r,"aria-haspopup":"dialog","data-ox-slot":"popover-trigger",onClick:c},e[9]=r,e[10]=s,e[11]=c,e[12]=u):u=e[12];const f=u;if(l){let h;return e[13]!==n||e[14]!==f?(h=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx(Gx,{...f,children:n})}),e[13]=n,e[14]=f,e[15]=h):h=e[15],h}let m;return e[16]!==n||e[17]!==f?(m=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx("button",{...f,children:n})}),e[16]=n,e[17]=f,e[18]=m):m=e[18],m},Un=Object.assign(Yx,{Content:qx,Trigger:Ux}),Kx=t=>{const e=I.compilerRuntimeExports.c(19);let n,r,s,o,i;e[0]!==t?({buffer:n,className:r,max:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?100:o,d=Math.max(0,Math.min(i===void 0?0:i,l)),c=n?Math.max(0,Math.min(n,l)):0;let u;e[6]!==r?(u=z("relative h-2 overflow-hidden rounded-full bg-primary/20",r),e[6]=r,e[7]=u):u=e[7];let f;e[8]!==n||e[9]!==c||e[10]!==l?(f=n!==void 0?b.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full bg-primary/30 transition-all duration-300",style:{width:`${c/l*100}%`}}):null,e[8]=n,e[9]=c,e[10]=l,e[11]=f):f=e[11];const m=`${d/l*100}%`;let h;e[12]!==m?(h=b.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full bg-primary transition-all duration-300",style:{width:m}}),e[12]=m,e[13]=h):h=e[13];let p;return e[14]!==s||e[15]!==u||e[16]!==f||e[17]!==h?(p=b.jsxs("div",{className:u,"data-ox-slot":"progress",role:"progressbar",...s,children:[f,h]}),e[14]=s,e[15]=u,e[16]=f,e[17]=h,e[18]=p):p=e[18],p},Xx=t=>{const e=I.compilerRuntimeExports.c(23);let n,r,s,o,i;e[0]!==t?({className:n,max:s,showPercentage:o,value:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=s===void 0?100:s,a=o===void 0?!1:o,c=Math.max(0,Math.min(i===void 0?0:i,l));let u;e[6]!==l||e[7]!==c?(u=Math.round(c/l*100),e[6]=l,e[7]=c,e[8]=u):u=e[8];const f=u,m=2*Math.PI*24,h=m-c/l*m;let p;e[9]!==n?(p=z("inline-flex items-center justify-center",n),e[9]=n,e[10]=p):p=e[10];let g;e[11]!==h?(g=b.jsx("svg",{className:"-rotate-90 transform",height:52,width:52,children:b.jsx("circle",{className:"stroke-primary transition-all duration-300 ease-in-out",cx:26,cy:26,fill:"none",r:24,strokeLinecap:"round",strokeWidth:"4",style:{strokeDasharray:m,strokeDashoffset:h}})}),e[11]=h,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==a?(x=a&&b.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:b.jsxs("span",{className:"text-xs font-medium text-foreground",children:[f,"%"]})}),e[13]=f,e[14]=a,e[15]=x):x=e[15];let v;e[16]!==g||e[17]!==x?(v=b.jsxs("div",{className:"relative",children:[g,x]}),e[16]=g,e[17]=x,e[18]=v):v=e[18];let y;return e[19]!==r||e[20]!==p||e[21]!==v?(y=b.jsx("div",{className:p,"data-ox-slot":"progress",...r,children:v}),e[19]=r,e[20]=p,e[21]=v,e[22]=y):y=e[22],y},Qx=Object.assign(Kx,{Circular:Xx}),Ws=t=>{const e=I.compilerRuntimeExports.c(13);let n,r,s,o;e[0]!==t?({className:n,decorative:s,orientation:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=s===void 0?!0:s,l=o===void 0?"horizontal":o,a=i?void 0:l,d=l==="horizontal"?"h-px w-full":"h-full w-px";let c;e[5]!==n||e[6]!==d?(c=z("shrink-0 bg-border",d,n),e[5]=n,e[6]=d,e[7]=c):c=e[7];const u=i?"none":"separator";let f;return e[8]!==r||e[9]!==a||e[10]!==c||e[11]!==u?(f=b.jsx("div",{"aria-orientation":a,className:c,role:u,...r,"data-ox-slot":"separator"}),e[8]=r,e[9]=a,e[10]=c,e[11]=u,e[12]=f):f=e[12],f},Jx={rectangle:"rounded-lg",circle:"rounded-full"},_t=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({animate:s,className:n,shape:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=s===void 0?!0:s,a=Jx[o===void 0?"rectangle":o];let d;e[5]!==i||e[6]!==n||e[7]!==a?(d=z("relative overflow-hidden bg-secondary",a,{"animate-pulse":i},n),e[5]=i,e[6]=n,e[7]=a,e[8]=d):d=e[8];let c;return e[9]!==r||e[10]!==d?(c=b.jsx("div",{"aria-busy":"true","aria-label":"Loading...",className:d,"data-ox-slot":"skeleton",role:"status",...r}),e[9]=r,e[10]=d,e[11]=c):c=e[11],c},si=(t,e,n)=>{if(Array.isArray(t))return[Math.max(e,Math.min(n,t[0])),Math.max(e,Math.min(n,t[1]))];const r=Math.max(e,Math.min(n,t));return[r,r]},oi=(t,e,n)=>(t-e)/(n-e)*100,Zx=(t,e,n,r)=>{const s=e+t/100*(n-e),o=Math.round(s/r)*r;return Math.max(e,Math.min(n,o))},eb=t=>{const e=I.compilerRuntimeExports.c(122);let n,r,s,o,i,l,a,d,c,u,f,m,h,p;e[0]!==t?({"aria-label":n,"aria-labelledby":r,className:s,defaultValue:d,disabled:c,max:u,min:f,onChange:l,onChangeCommitted:a,orientation:m,showValue:h,step:p,value:o,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14]);const g=d===void 0?0:d,x=c===void 0?!1:c,v=u===void 0?100:u,y=f===void 0?0:f,w=m===void 0?"horizontal":m,C=h===void 0?!1:h,O=p===void 0?1:p,S=k.useRef(null),E=k.useRef(!1),R=k.useRef(0),N=o!==void 0,j=Array.isArray(g)||Array.isArray(o),D=o||g;let P;e[15]!==v||e[16]!==y||e[17]!==D?(P=si(D,y,v),e[15]=v,e[16]=y,e[17]=D,e[18]=P):P=e[18];const[M,L]=k.useState(P);let _;e[19]!==o||e[20]!==M||e[21]!==N||e[22]!==v||e[23]!==y?(_=N?si(o,y,v):M,e[19]=o,e[20]=M,e[21]=N,e[22]=v,e[23]=y,e[24]=_):_=e[24];const T=_;let A;e[25]!==x||e[26]!==N||e[27]!==j||e[28]!==l?(A=Ee=>{if(x)return;const be=j?Ee:Ee[0];N||L(Ee),l?.(be)},e[25]=x,e[26]=N,e[27]=j,e[28]=l,e[29]=A):A=e[29];const V=A;let $;e[30]!==v||e[31]!==y||e[32]!==w||e[33]!==O?($=Ee=>{if(!S.current)return y;const be=S.current.getBoundingClientRect(),je=w==="horizontal"?(Ee.clientX-be.left)/be.width*100:(be.bottom-Ee.clientY)/be.height*100;return Zx(Math.max(0,Math.min(100,je)),y,v,O)},e[30]=v,e[31]=y,e[32]=w,e[33]=O,e[34]=$):$=e[34];const F=$;let W;e[35]!==T||e[36]!==x||e[37]!==F||e[38]!==V||e[39]!==j?(W=(Ee,be)=>{if(x)return;Ee.preventDefault(),E.current=!0,R.current=be||0;const je=F(Ee);if(j&&be!==void 0){const ve=[...T];ve[be]=je,be===0&&ve[0]>ve[1]?ve[1]=ve[0]:be===1&&ve[1]<ve[0]&&(ve[0]=ve[1]),V(ve)}else V([je,je])},e[35]=T,e[36]=x,e[37]=F,e[38]=V,e[39]=j,e[40]=W):W=e[40];const B=W;let H;e[41]!==T||e[42]!==x||e[43]!==F||e[44]!==V||e[45]!==j?(H=Ee=>{if(x||E.current)return;const be=F(Ee);if(j){const[je,ve]=T,Be=Math.abs(be-je),An=Math.abs(be-ve),jr=Be<=An?0:1,_n=[...T];_n[jr]=be,V(_n)}else V([be,be])},e[41]=T,e[42]=x,e[43]=F,e[44]=V,e[45]=j,e[46]=H):H=e[46];const G=H;let U;e[47]!==T||e[48]!==x||e[49]!==V||e[50]!==j||e[51]!==v||e[52]!==y||e[53]!==O?(U=(Ee,be)=>{if(x)return;let je;e:switch(Ee.key){case"ArrowRight":case"ArrowUp":{je=O;break e}case"ArrowLeft":case"ArrowDown":{je=-O;break e}case"PageUp":{je=(v-y)*.1;break e}case"PageDown":{je=-(v-y)*.1;break e}case"Home":{je=y-T[be];break e}case"End":{je=v-T[be];break e}default:return}Ee.preventDefault();const ve=[...T];ve[be]=Math.max(y,Math.min(v,T[be]+je)),j&&(be===0&&ve[0]>ve[1]?ve[1]=ve[0]:be===1&&ve[1]<ve[0]&&(ve[0]=ve[1])),V(ve)},e[47]=T,e[48]=x,e[49]=V,e[50]=j,e[51]=v,e[52]=y,e[53]=O,e[54]=U):U=e[54];const Y=U;let Q,X;e[55]!==T||e[56]!==F||e[57]!==V||e[58]!==j||e[59]!==a?(Q=()=>{const Ee=je=>{if(!E.current)return;const ve=F(je);if(j){const Be=[...T];Be[R.current]=ve,R.current===0&&Be[0]>Be[1]?Be[1]=Be[0]:R.current===1&&Be[1]<Be[0]&&(Be[0]=Be[1]),V(Be)}else V([ve,ve])},be=()=>{E.current&&(E.current=!1,a?.(j?T:T[0]))};return E.current&&(document.addEventListener("mousemove",Ee),document.addEventListener("mouseup",be)),()=>{document.removeEventListener("mousemove",Ee),document.removeEventListener("mouseup",be)}},X=[F,j,T,V,a],e[55]=T,e[56]=F,e[57]=V,e[58]=j,e[59]=a,e[60]=Q,e[61]=X):(Q=e[60],X=e[61]),k.useEffect(Q,X);const[K,J]=T,q=oi(K,y,v),ne=oi(J,y,v);let Z;e[62]!==s?(Z=z("w-full py-3",s),e[62]=s,e[63]=Z):Z=e[63];let te;e[64]!==x?(te=z("relative h-1.5 w-full cursor-pointer rounded-full bg-muted",{"ox-default-disabled":x}),e[64]=x,e[65]=te):te=e[65];const le=`${j?q:0}%`,ce=`${j?ne-q:q}%`;let fe;e[66]!==le||e[67]!==ce?(fe=b.jsx("div",{className:"absolute h-full rounded-full bg-primary",style:{left:le,width:ce}}),e[66]=le,e[67]=ce,e[68]=fe):fe=e[68];const he=j?`${n} minimum`:n,ee=String(K);let ie;e[69]!==x?(ie=z("ox-focus-ring absolute top-1/2 size-4 -translate-1/2 cursor-grab rounded-full border-2 border-primary bg-background ring-ring/50 hover:ring-4 active:cursor-grabbing",{"cursor-not-allowed":x}),e[69]=x,e[70]=ie):ie=e[70];const oe=`${q}%`;let me;e[71]!==oe?(me={left:oe},e[71]=oe,e[72]=me):me=e[72];const Oe=x?-1:0;let ke;e[73]!==Y?(ke=Ee=>Y(Ee,0),e[73]=Y,e[74]=ke):ke=e[74];let Ye;e[75]!==B?(Ye=Ee=>B(Ee,0),e[75]=B,e[76]=Ye):Ye=e[76];let qe;e[77]!==r||e[78]!==v||e[79]!==y||e[80]!==K||e[81]!==w||e[82]!==he||e[83]!==ee||e[84]!==ie||e[85]!==me||e[86]!==Oe||e[87]!==ke||e[88]!==Ye?(qe=b.jsx("div",{"aria-label":he,"aria-labelledby":r,"aria-orientation":w,"aria-valuemax":v,"aria-valuemin":y,"aria-valuenow":K,"aria-valuetext":ee,className:ie,role:"slider",style:me,tabIndex:Oe,onKeyDown:ke,onMouseDown:Ye}),e[77]=r,e[78]=v,e[79]=y,e[80]=K,e[81]=w,e[82]=he,e[83]=ee,e[84]=ie,e[85]=me,e[86]=Oe,e[87]=ke,e[88]=Ye,e[89]=qe):qe=e[89];let Ge;e[90]!==n||e[91]!==r||e[92]!==x||e[93]!==Y||e[94]!==B||e[95]!==j||e[96]!==v||e[97]!==ne||e[98]!==J||e[99]!==y||e[100]!==w?(Ge=j?b.jsx("div",{"aria-label":j?`${n} maximum`:n,"aria-labelledby":r,"aria-orientation":w,"aria-valuemax":v,"aria-valuemin":y,"aria-valuenow":J,"aria-valuetext":String(J),className:z("ox-focus-ring absolute top-1/2 size-4 -translate-1/2 cursor-grab rounded-full border-2 border-primary bg-background ring-ring/50 hover:ring-4 active:cursor-grabbing",{"cursor-not-allowed":x}),role:"slider",style:{left:`${ne}%`},tabIndex:x?-1:0,onKeyDown:Ee=>Y(Ee,1),onMouseDown:Ee=>B(Ee,1)}):null,e[90]=n,e[91]=r,e[92]=x,e[93]=Y,e[94]=B,e[95]=j,e[96]=v,e[97]=ne,e[98]=J,e[99]=y,e[100]=w,e[101]=Ge):Ge=e[101];let et;e[102]!==G||e[103]!==te||e[104]!==fe||e[105]!==qe||e[106]!==Ge?(et=b.jsxs("div",{className:te,ref:S,onClick:G,children:[fe,qe,Ge]}),e[102]=G,e[103]=te,e[104]=fe,e[105]=qe,e[106]=Ge,e[107]=et):et=e[107];let vt;e[108]!==j||e[109]!==v||e[110]!==J||e[111]!==y||e[112]!==K||e[113]!==C?(vt=C&&b.jsxs("div",{className:z("mt-2 flex justify-between text-xs text-muted-foreground"),children:[b.jsx("span",{children:j?`${K} - ${J}`:K}),b.jsxs("span",{children:[y," - ",v]})]}),e[108]=j,e[109]=v,e[110]=J,e[111]=y,e[112]=K,e[113]=C,e[114]=vt):vt=e[114];let Fe;e[115]!==et||e[116]!==vt?(Fe=b.jsxs("div",{className:"relative py-3",children:[et,vt]}),e[115]=et,e[116]=vt,e[117]=Fe):Fe=e[117];let $t;return e[118]!==i||e[119]!==Z||e[120]!==Fe?($t=b.jsx("div",{className:Z,"data-ox-slot":"slider",...i,children:Fe}),e[118]=i,e[119]=Z,e[120]=Fe,e[121]=$t):$t=e[121],$t},ba=k.createContext(null),va=k.createContext(null),tb=()=>{const t=k.useContext(ba);if(!t)throw new Error("SortableList components must be used within an OxSortableList");return t},nb=()=>{const t=k.useContext(va);if(!t)throw new Error("SortableListHandle must be used within an OxSortableList.Item");return t},rb=t=>{const e=I.compilerRuntimeExports.c(58);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,columns:l,direction:a,disabled:d,gap:c,onReorder:o,style:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=l===void 0?3:l,f=a===void 0?"vertical":a,m=d===void 0?!1:d,h=c===void 0?8:c,p=k.useId();let g,x,v;if(e[10]!==p||e[11]!==n){g=k.Children.toArray(n);let Y;e[15]!==p?(Y=(Q,X)=>`${p}-item-${X}`,e[15]=p,e[16]=Y):Y=e[16],x=g.map(Y),v=new Map,x.forEach((Q,X)=>{v.set(Q,X)}),e[10]=p,e[11]=n,e[12]=g,e[13]=x,e[14]=v}else g=e[12],x=e[13],v=e[14];let y;e[17]!==g||e[18]!==x||e[19]!==v?(y={childArray:g,itemIds:x,itemIndexMap:v},e[17]=g,e[18]=x,e[19]=v,e[20]=y):y=e[20];const{childArray:w,itemIds:C,itemIndexMap:O}=y;let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S={coordinateGetter:Bs},e[21]=S):S=e[21];const E=Ss(Xt(Dn),Xt(jn,S));let R;e:switch(f){case"horizontal":{R=qg;break e}case"grid":{R=Ls;break e}default:R=zs}const N=R;let j;e[22]!==O||e[23]!==o?(j=Y=>{const{active:Q,over:X}=Y;if(X&&Q.id!==X.id){const K=O.get(String(Q.id)),J=O.get(String(X.id));K!==void 0&&J!==void 0&&o(K,J)}},e[22]=O,e[23]=o,e[24]=j):j=e[24];const D=j;let P;e[25]!==u||e[26]!==f||e[27]!==h?(P=f==="grid"?{display:"grid",gap:h,gridTemplateColumns:`repeat(${u}, 1fr)`}:{display:"flex",flexDirection:f==="vertical"?"column":"row",gap:h},e[25]=u,e[26]=f,e[27]=h,e[28]=P):P=e[28];const M=P;let L;e[29]!==M||e[30]!==i?(L={...M,...i},e[29]=M,e[30]=i,e[31]=L):L=e[31];const _=L;let T;e[32]!==f||e[33]!==m?(T={direction:f,disabled:m},e[32]=f,e[33]=m,e[34]=T):T=e[34];const A=T;let V;if(e[35]!==w||e[36]!==C){let Y;e[38]!==C?(Y=(Q,X)=>k.isValidElement(Q)?k.cloneElement(Q,{__sortableId:C[X],__sortableIndex:X}):Q,e[38]=C,e[39]=Y):Y=e[39],V=w.map(Y),e[35]=w,e[36]=C,e[37]=V}else V=e[37];const $=V,F=m?void 0:E;let W;e[40]!==r?(W=z(r),e[40]=r,e[41]=W):W=e[41];let B;e[42]!==s||e[43]!==$||e[44]!==_||e[45]!==W?(B=b.jsx("div",{className:W,"data-ox-slot":"sortable-list",style:_,...s,children:$}),e[42]=s,e[43]=$,e[44]=_,e[45]=W,e[46]=B):B=e[46];let H;e[47]!==C||e[48]!==N||e[49]!==B?(H=b.jsx(Fs,{items:C,strategy:N,children:B}),e[47]=C,e[48]=N,e[49]=B,e[50]=H):H=e[50];let G;e[51]!==D||e[52]!==F||e[53]!==H?(G=b.jsx(yr,{collisionDetection:ll,sensors:F,onDragEnd:D,children:H}),e[51]=D,e[52]=F,e[53]=H,e[54]=G):G=e[54];let U;return e[55]!==A||e[56]!==G?(U=b.jsx(ba.Provider,{value:A,children:G}),e[55]=A,e[56]=G,e[57]=U):U=e[57],U},sb=t=>{const e=I.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{attributes:o,disabled:i,listeners:l,registerHandle:a,setActivatorNodeRef:d}=nb();let c,u;e[4]!==a?(c=()=>{a()},u=[a],e[4]=a,e[5]=c,e[6]=u):(c=e[5],u=e[6]),k.useEffect(c,u);let f;e[7]!==r||e[8]!==i?(f=z("flex cursor-grab touch-none items-center justify-center",{"cursor-not-allowed opacity-50":i},r),e[7]=r,e[8]=i,e[9]=f):f=e[9];let m;e[10]!==n?(m=n??b.jsx(ae.GripVertical,{className:"size-4 text-muted-foreground"}),e[10]=n,e[11]=m):m=e[11];let h;return e[12]!==o||e[13]!==i||e[14]!==s||e[15]!==l||e[16]!==d||e[17]!==f||e[18]!==m?(h=b.jsx("button",{"aria-label":"Drag to reorder",className:f,"data-ox-slot":"sortable-list-handle",disabled:i,ref:d,type:"button",...o,...l,...s,children:m}),e[12]=o,e[13]=i,e[14]=s,e[15]=l,e[16]=d,e[17]=f,e[18]=m,e[19]=h):h=e[19],h},ob=t=>{const e=I.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a;e[0]!==t?({__sortableId:n,__sortableIndex:r,children:s,className:o,disabled:a,style:l,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const d=a===void 0?!1:a,[c,u]=k.useState(!1),{disabled:f}=tb(),m=f||d,h=n??`fallback-${r}`;let p;e[8]!==m||e[9]!==h?(p={disabled:m,id:h},e[8]=m,e[9]=h,e[10]=p):p=e[10];const{attributes:g,isDragging:x,listeners:v,setActivatorNodeRef:y,setNodeRef:w,transform:C,transition:O}=Vs(p);let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{u(!0)},e[11]=S):S=e[11];const E=S;let R;e[12]!==C?(R=at.Transform.toString(C),e[12]=C,e[13]=R):R=e[13];let N;e[14]!==l||e[15]!==R||e[16]!==O?(N={transform:R,transition:O,...l},e[14]=l,e[15]=R,e[16]=O,e[17]=N):N=e[17];const j=N;let D;e[18]!==g||e[19]!==m||e[20]!==x||e[21]!==v||e[22]!==y?(D={attributes:g,disabled:m,isDragging:x,listeners:v,registerHandle:E,setActivatorNodeRef:y},e[18]=g,e[19]=m,e[20]=x,e[21]=v,e[22]=y,e[23]=D):D=e[23];const P=D;let M;e[24]!==g||e[25]!==c||e[26]!==v?(M=c?{}:{...g,...v},e[24]=g,e[25]=c,e[26]=v,e[27]=M):M=e[27];const L=M;let _;e[28]!==o||e[29]!==x?(_=z({"opacity-50":x},o),e[28]=o,e[29]=x,e[30]=_):_=e[30];const T=x?"dragging":void 0;let A;e[31]!==s||e[32]!==i||e[33]!==L||e[34]!==j||e[35]!==w||e[36]!==_||e[37]!==T?(A=b.jsx("div",{className:_,"data-ox-slot":"sortable-list-item","data-ox-state":T,ref:w,style:j,...L,...i,children:s}),e[31]=s,e[32]=i,e[33]=L,e[34]=j,e[35]=w,e[36]=_,e[37]=T,e[38]=A):A=e[38];let V;return e[39]!==P||e[40]!==A?(V=b.jsx(va.Provider,{value:P,children:A}),e[39]=P,e[40]=A,e[41]=V):V=e[41],V},ib=Object.assign(rb,{Handle:sb,Item:ob}),lb={loading:{title:"Loading...",message:"Good things take time",icon:ae.LoaderCircle,showAction:!1},empty:{title:"Nothing here",message:"It's so empty... like my soul",icon:ae.PackageOpen,showAction:!1},offline:{title:"You're offline",message:"Did you forget to pay the internet bill?",icon:ae.WifiOff,showAction:!0},success:{title:"Success!",message:"Everything went perfectly as planned",icon:ae.CircleCheck,showAction:!1},warning:{title:"Heads up!",message:"Something needs your attention",icon:ae.AlertCircle,showAction:!1},info:{title:"Just so you know",message:"Here's some helpful information",icon:ae.Info,showAction:!1},401:{title:"Please log in",message:"You need to authenticate to access this page",showAction:!0},403:{title:"Access denied",message:"You don't have permission to view this content",showAction:!0},404:{title:"Page not found",message:"Nothing to see here... just... go away... now.",showAction:!0},408:{title:"Request timeout",message:"Taking too long? Try refreshing the page",showAction:!0},429:{title:"Slow down there!",message:"Too many requests. Take a coffee break",showAction:!0},500:{title:"Oops! We broke something",message:"Don't worry, it's not your fault... probably",showAction:!0},502:{title:"Bad gateway",message:"The server is having an existential crisis",showAction:!0},503:{title:"Taking a quick nap",message:"Service will be back after coffee break",showAction:!0},504:{title:"Server timeout",message:"Server is slower than a Windows 95 boot",showAction:!0}},ab=t=>t==="success"?st.success:t==="warning"?st.warning:t==="info"?st.info:typeof t=="number"?st.destructive:{text:"text-primary"},cb=t=>{const e=I.compilerRuntimeExports.c(66);let n,r,s,o,i,l,a,d,c;e[0]!==t?({action:n,children:r,className:s,inline:a,message:i,onBack:l,title:d,type:c,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=a===void 0?!1:a;if(r){let $;e[10]!==s?($=z("min-h-screen w-full",s),e[10]=s,e[11]=$):$=e[11];let F;return e[12]!==r||e[13]!==$?(F=b.jsx("div",{className:$,children:r}),e[12]=r,e[13]=$,e[14]=F):F=e[14],F}const f=lb[c],m=d||f.title,h=i||f.message;let p;e[15]!==l?(p=()=>{l?l():globalThis.history.back()},e[15]=l,e[16]=p):p=e[16];const g=p;let x;e[17]!==n||e[18]!==f.showAction||e[19]!==g?(x=()=>n!==void 0?n:f.showAction?b.jsx(Ze,{variant:"secondary",onClick:g,children:"Back"}):null,e[17]=n,e[18]=f.showAction,e[19]=g,e[20]=x):x=e[20];const v=x;let y,w,C,O,S,E,R,N;if(e[21]!==s||e[22]!==f.icon||e[23]!==f.path||e[24]!==o||e[25]!==u||e[26]!==c){const $=ab(c),F=()=>f.icon?b.jsx(ue,{className:z($.text,{"animate-spin":c==="loading"}),icon:f.icon,path:f.path,size:"2xl"}):typeof c=="number"?b.jsx("div",{className:z("bg-linear-to-br from-primary from-20% to-accent bg-clip-text text-3xl font-bold text-transparent"),children:c}):null;E=typeof c=="number"?"assertive":"polite";const W=!u;e[35]!==s||e[36]!==u||e[37]!==W?(R=z("flex w-full items-center justify-center",{"min-h-screen bg-background":W,"h-full":u},s),e[35]=s,e[36]=u,e[37]=W,e[38]=R):R=e[38],N="status-display",y=typeof c=="number"?"alert":"status",w=o,e[39]===Symbol.for("react.memo_cache_sentinel")?(S=z("flex max-w-md flex-col items-center space-y-6 text-center"),e[39]=S):S=e[39],C="flex items-center space-x-4",O=F(),e[21]=s,e[22]=f.icon,e[23]=f.path,e[24]=o,e[25]=u,e[26]=c,e[27]=y,e[28]=w,e[29]=C,e[30]=O,e[31]=S,e[32]=E,e[33]=R,e[34]=N}else y=e[27],w=e[28],C=e[29],O=e[30],S=e[31],E=e[32],R=e[33],N=e[34];let j;e[40]!==C||e[41]!==O?(j=b.jsx("div",{className:C,children:O}),e[40]=C,e[41]=O,e[42]=j):j=e[42];let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D=z("font-bold text-foreground","text-xl"),e[43]=D):D=e[43];let P;e[44]!==m?(P=b.jsx("h1",{id:"status-title","aria-describedby":"status-message",className:D,children:m}),e[44]=m,e[45]=P):P=e[45];let M;e[46]===Symbol.for("react.memo_cache_sentinel")?(M=z("text-muted-foreground","text-base"),e[46]=M):M=e[46];let L;e[47]!==h?(L=b.jsx("p",{id:"status-message",className:M,children:h}),e[47]=h,e[48]=L):L=e[48];let _;e[49]!==P||e[50]!==L?(_=b.jsxs("div",{className:"space-y-2",children:[P,L]}),e[49]=P,e[50]=L,e[51]=_):_=e[51];let T;e[52]!==v?(T=v(),e[52]=v,e[53]=T):T=e[53];let A;e[54]!==j||e[55]!==_||e[56]!==T||e[57]!==S?(A=b.jsxs("div",{className:S,children:[j,_,T]}),e[54]=j,e[55]=_,e[56]=T,e[57]=S,e[58]=A):A=e[58];let V;return e[59]!==y||e[60]!==w||e[61]!==A||e[62]!==E||e[63]!==R||e[64]!==N?(V=b.jsx("div",{"aria-live":E,className:R,"data-ox-slot":N,role:y,...w,children:A}),e[59]=y,e[60]=w,e[61]=A,e[62]=E,e[63]=R,e[64]=N,e[65]=V):V=e[65],V},ya=k.createContext(null),Hs=()=>{const t=k.useContext(ya);if(!t)throw new Error("OxStepperItem must be used within OxStepper");return t},wa=t=>{const e=I.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{orientation:o}=Hs(),i=o==="vertical";let l;e[4]!==r||e[5]!==i?(l=z("mt-2 p-4",{"border-t border-border":i},r),e[4]=r,e[5]=i,e[6]=l):l=e[6];let a;return e[7]!==n||e[8]!==s||e[9]!==l?(a=b.jsx("div",{className:l,...s,"data-ox-slot":"stepper-actions",children:n}),e[7]=n,e[8]=s,e[9]=l,e[10]=a):a=e[10],a},db=(t,e,n)=>t==="error"?st.destructive.icon:t==="warning"?st.warning.icon:e||(n?st.success.icon:null),Ca=(t,e)=>t==="error"?st.destructive:t==="warning"?st.warning:We[e],ii=(t,e)=>t==="error"||t==="warning"?e.text:"text-foreground",Oa=t=>{const e=I.compilerRuntimeExports.c(18);let n,r,s,o;e[0]!==t?({className:n,state:s,stepIndex:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{color:i,currentStep:l,orientation:a}=Hs(),d=l>o,c=s||(d?"completed":"current");let u;e[5]!==c||e[6]!==i?(u=Ca(c,i),e[5]=c,e[6]=i,e[7]=u):u=e[7];const f=u,m=a==="horizontal",h=a==="vertical",p=!d;let g;e[8]!==n||e[9]!==d||e[10]!==f.borderSubtle||e[11]!==m||e[12]!==h||e[13]!==p?(g=z("flex-1 border transition-colors duration-300",{"mx-4 mt-[19px]":m,"my-2 min-h-6":h,"border-border":p,[f.borderSubtle]:d},n),e[8]=n,e[9]=d,e[10]=f.borderSubtle,e[11]=m,e[12]=h,e[13]=p,e[14]=g):g=e[14];let x;return e[15]!==r||e[16]!==g?(x=b.jsx("div",{className:g,...r,"data-ox-slot":"stepper-connector"}),e[15]=r,e[16]=g,e[17]=x):x=e[17],x},Ea=k.createContext(null),He=()=>k.useContext(Ea),Zt=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,disabled:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=He(),l=s??!!i?.disabled;let a;e[5]!==r?(a=z("text-sm leading-relaxed text-pretty text-muted-foreground","aria-disabled:opacity-50",r),e[5]=r,e[6]=a):a=e[6];let d;return e[7]!==n||e[8]!==o||e[9]!==l||e[10]!==a?(d=b.jsx("div",{"aria-disabled":l,className:a,...o,"data-ox-slot":"description",children:n}),e[7]=n,e[8]=o,e[9]=l,e[10]=a,e[11]=d):d=e[11],d},Sa=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=He(),i=typeof o?.error=="string"?o.error:void 0,l=n??i;if(!l)return null;let a;e[4]!==r?(a=z("flex items-start gap-1.5 text-sm leading-relaxed text-pretty text-destructive",'[&>svg:not([class*="size-"])]:size-3.5',"[&>svg]:mt-0.75","[&>svg]:shrink-0","[&>svg]:text-current",r),e[4]=r,e[5]=a):a=e[5];let d;return e[6]!==l||e[7]!==s||e[8]!==a?(d=b.jsx("div",{className:a,role:"alert",...s,"data-ox-slot":"error",children:l}),e[6]=l,e[7]=s,e[8]=a,e[9]=d):d=e[9],d},ub={1:"text-2xl font-bold",2:"text-xl font-semibold",3:"text-lg font-semibold",4:"text-base font-semibold",5:"text-sm font-semibold",6:"text-sm font-medium",7:"text-sm"},ka=({as:t="h2",children:e,className:n,level:r,...s})=>{const o=r??(t!=="div"?Number.parseInt(t.slice(1)):2),i=I.clamp(o,1,7),l={className:z("text-foreground",ub[i],n),...s,"data-ox-slot":"heading",...t==="div"&&{role:"heading","aria-level":o}};return k.createElement(t,l,e)},Ra=t=>{const e=I.compilerRuntimeExports.c(21);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,disabled:s,htmlFor:i,id:l,required:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const d=He(),c=a??d?.required??!1,u=s??d?.disabled??!1,f=i??d?.id,m=l??d?.labelId,h=f&&!u;let p;e[8]!==r||e[9]!==h?(p=z("block text-sm font-medium text-foreground","aria-disabled:opacity-50",{"cursor-pointer":h},r),e[8]=r,e[9]=h,e[10]=p):p=e[10];let g;e[11]!==c?(g=c&&b.jsx("span",{"aria-hidden":"true",className:"ml-1 text-destructive",children:"*"}),e[11]=c,e[12]=g):g=e[12];let x;return e[13]!==n||e[14]!==o||e[15]!==u||e[16]!==f||e[17]!==m||e[18]!==p||e[19]!==g?(x=b.jsxs("label",{id:m,"aria-disabled":u,className:p,htmlFor:f,...o,"data-ox-slot":"label",children:[n,g]}),e[13]=n,e[14]=o,e[15]=u,e[16]=f,e[17]=m,e[18]=p,e[19]=g,e[20]=x):x=e[20],x},fb=t=>{const e=I.compilerRuntimeExports.c(16);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,required:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,a=i===void 0?!1:i;let d;e[6]!==r?(d=z("block text-base font-semibold text-foreground","aria-disabled:opacity-50",r),e[6]=r,e[7]=d):d=e[7];let c;e[8]!==a?(c=a&&b.jsx("span",{"aria-hidden":"true",className:"ml-1 text-destructive",children:"*"}),e[8]=a,e[9]=c):c=e[9];let u;return e[10]!==n||e[11]!==l||e[12]!==s||e[13]!==d||e[14]!==c?(u=b.jsxs("legend",{"aria-disabled":l,className:d,...s,"data-ox-slot":"legend",children:[n,c]}),e[10]=n,e[11]=l,e[12]=s,e[13]=d,e[14]=c,e[15]=u):u=e[15],u},mb={completed:"check",error:"close",warning:"warning",current:"current step",upcoming:"upcoming step"},Na=t=>{const e=I.compilerRuntimeExports.c(70);let n,r,s,o,i,l,a,d;e[0]!==t?({children:n,className:r,description:s,icon:i,state:l,stepIndex:a,title:d,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=a===void 0?0:a,{color:u,currentStep:f,onStepChange:m,orientation:h,totalSteps:p,type:g}=Hs(),x=f===c,v=f>c;let y,w,C,O,S,E,R,N;if(e[9]!==r||e[10]!==u||e[11]!==f||e[12]!==s||e[13]!==o||e[14]!==i||e[15]!==x||e[16]!==v||e[17]!==m||e[18]!==h||e[19]!==l||e[20]!==c||e[21]!==d||e[22]!==p||e[23]!==g){N=Symbol.for("react.early_return_sentinel");e:{let T;l?T=l:c<f?T="completed":c===f?T="current":T="upcoming";const A=g==="non-linear"||v||x,V=db(T,i,v),$=Ca(T,u);let F;e[32]!==A||e[33]!==m||e[34]!==c?(F=()=>{A&&m&&m(c)},e[32]=A,e[33]=m,e[34]=c,e[35]=F):F=e[35];const W=F,B=()=>b.jsx("button",{"aria-current":x?"step":void 0,"aria-describedby":s?`step-${c}-desc`:void 0,"aria-label":`${d} - ${mb[T]} (${c+1} of ${p})`,className:z("flex items-center justify-center rounded-lg transition-colors","enabled:cursor-pointer","ox-focus-ring",{"cursor-pointer":A,"opacity-50":T==="upcoming"}),disabled:!A,type:"button",onClick:W,children:b.jsx("div",{className:z("flex size-10 shrink-0 items-center justify-center rounded-lg border",$.borderSubtle,$.bgSubtle),children:V?b.jsx(ue,{className:$.text,icon:V}):b.jsx("span",{className:z("text-base font-medium text-current"),children:c+1})})});if(h==="horizontal"){let G;e[36]!==r?(G=z("flex flex-col items-center text-center",r),e[36]=r,e[37]=G):G=e[37];let U;e[38]!==s||e[39]!==c?(U=s?b.jsx(Zt,{id:`step-${c}-desc`,children:s}):null,e[38]=s,e[39]=c,e[40]=U):U=e[40],N=b.jsxs("div",{className:G,"data-ox-slot":"stepper-item",...o,children:[B(),b.jsxs("div",{className:"mt-2",children:[b.jsx("h6",{className:z("text-sm font-medium",ii(T,$)),children:d}),U]})]});break e}e[41]!==r?(O=z("flex gap-3",r),e[41]=r,e[42]=O):O=e[42],S="stepper-item",E=o;let H;e[43]!==l||e[44]!==c||e[45]!==p?(H=c<p-1?b.jsx(Oa,{state:l,stepIndex:c}):null,e[43]=l,e[44]=c,e[45]=p,e[46]=H):H=e[46],R=b.jsxs("div",{className:"flex flex-col items-center",children:[B(),H]}),C="flex-1",w="mb-4",y=z("text-sm font-medium",ii(T,$))}e[9]=r,e[10]=u,e[11]=f,e[12]=s,e[13]=o,e[14]=i,e[15]=x,e[16]=v,e[17]=m,e[18]=h,e[19]=l,e[20]=c,e[21]=d,e[22]=p,e[23]=g,e[24]=y,e[25]=w,e[26]=C,e[27]=O,e[28]=S,e[29]=E,e[30]=R,e[31]=N}else y=e[24],w=e[25],C=e[26],O=e[27],S=e[28],E=e[29],R=e[30],N=e[31];if(N!==Symbol.for("react.early_return_sentinel"))return N;let j;e[47]!==y||e[48]!==d?(j=b.jsx("h6",{className:y,children:d}),e[47]=y,e[48]=d,e[49]=j):j=e[49];let D;e[50]!==s||e[51]!==c?(D=s?b.jsx(Zt,{id:`step-${c}-desc`,children:s}):null,e[50]=s,e[51]=c,e[52]=D):D=e[52];let P;e[53]!==j||e[54]!==D||e[55]!==w?(P=b.jsxs("div",{className:w,children:[j,D]}),e[53]=j,e[54]=D,e[55]=w,e[56]=P):P=e[56];let M;e[57]!==n||e[58]!==x?(M=x&&n?b.jsx("div",{className:"mb-4 rounded-lg border border-border bg-card p-4",children:n}):null,e[57]=n,e[58]=x,e[59]=M):M=e[59];let L;e[60]!==P||e[61]!==M||e[62]!==C?(L=b.jsxs("div",{className:C,children:[P,M]}),e[60]=P,e[61]=M,e[62]=C,e[63]=L):L=e[63];let _;return e[64]!==L||e[65]!==O||e[66]!==S||e[67]!==E||e[68]!==R?(_=b.jsxs("div",{className:O,"data-ox-slot":S,...E,children:[R,L]}),e[64]=L,e[65]=O,e[66]=S,e[67]=E,e[68]=R,e[69]=_):_=e[69],_},pb=t=>{const e=I.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a,d;e[0]!==t?({children:n,className:r,color:i,currentStep:l,onStepChange:o,orientation:a,type:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=i===void 0?"violet":i,u=l===void 0?0:l,f=a===void 0?"vertical":a,m=d===void 0?"linear":d;let h,p,g,x,v,y,w,C,O;if(e[9]!==n||e[10]!==r||e[11]!==c||e[12]!==u||e[13]!==s||e[14]!==o||e[15]!==f||e[16]!==m){const R=k.Children.toArray(n).filter(hb);let N;e[26]!==n?(N=k.Children.toArray(n).find(gb),e[26]=n,e[27]=N):N=e[27],p=N;const j=R.map(xb),D={color:c,currentStep:u,onStepChange:o,orientation:f,totalSteps:R.length,type:m};h=ya.Provider,x=D,v="Step-by-step progress",e[28]!==r?(y=z("w-full",r),e[28]=r,e[29]=y):y=e[29],w="navigation",C=s,O="stepper",g=f==="horizontal"?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"flex w-full items-start",children:j.map((P,M)=>b.jsxs(k.Fragment,{children:[k.cloneElement(P,{className:z("min-w-0 flex-1",P.props.className)}),M<R.length-1?b.jsx(Oa,{state:R[M].props.state,stepIndex:M}):null]},M))}),R[u]?.props.children?b.jsx("div",{className:"mt-6 rounded-lg border border-border bg-card p-4",children:R[u].props.children}):null]}):j,e[9]=n,e[10]=r,e[11]=c,e[12]=u,e[13]=s,e[14]=o,e[15]=f,e[16]=m,e[17]=h,e[18]=p,e[19]=g,e[20]=x,e[21]=v,e[22]=y,e[23]=w,e[24]=C,e[25]=O}else h=e[17],p=e[18],g=e[19],x=e[20],v=e[21],y=e[22],w=e[23],C=e[24],O=e[25];let S;e[30]!==p||e[31]!==g||e[32]!==v||e[33]!==y||e[34]!==w||e[35]!==C||e[36]!==O?(S=b.jsxs("div",{"aria-label":v,className:y,role:w,...C,"data-ox-slot":O,children:[g,p]}),e[30]=p,e[31]=g,e[32]=v,e[33]=y,e[34]=w,e[35]=C,e[36]=O,e[37]=S):S=e[37];let E;return e[38]!==h||e[39]!==x||e[40]!==S?(E=b.jsx(h,{value:x,children:S}),e[38]=h,e[39]=x,e[40]=S,e[41]=E):E=e[41],E};function hb(t){return k.isValidElement(t)&&t.type===Na}function gb(t){return k.isValidElement(t)&&t.type===wa}function xb(t,e){return k.cloneElement(t,{stepIndex:e,key:e})}const bb=Object.assign(pb,{Actions:wa,Item:Na}),cs=k.createContext(void 0),vb=t=>{const e=I.compilerRuntimeExports.c(78);let n,r,s,o,i,l,a,d,c,u,f,m;e[0]!==t?({allRowIds:l,children:n,className:r,draggable:a,isLoading:d,onRowReorder:o,onSelectionChange:i,selectable:c,selectedRows:u,skeletonColumns:f,skeletonRows:m,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12]);let h;e[13]!==l?(h=l===void 0?[]:l,e[13]=l,e[14]=h):h=e[14];const p=h,g=a===void 0?!1:a,x=d===void 0?!1:d,v=c===void 0?!1:c;let y;e[15]!==u?(y=u===void 0?[]:u,e[15]=u,e[16]=y):y=e[16];const w=y,C=f===void 0?3:f,O=m===void 0?5:m,[S,E]=k.useState(null);let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=[],e[17]=R):R=e[17];const[N,j]=k.useState(R);let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=[],e[18]=D):D=e[18];const P=k.useRef(D),M=k.useRef(!1);let L;e[19]===Symbol.for("react.memo_cache_sentinel")?(L={coordinateGetter:Bs},e[19]=L):L=e[19];const _=Ss(Xt(Dn),Xt(jn,L));let T;e[20]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{M.current||(M.current=!0,queueMicrotask(()=>{M.current=!1,j([...P.current])}))},e[20]=T):T=e[20];const A=T;let V;e[21]===Symbol.for("react.memo_cache_sentinel")?(V=ee=>{P.current.includes(ee)||(P.current=[...P.current,ee],A())},e[21]=V):V=e[21];const $=V;let F;e[22]===Symbol.for("react.memo_cache_sentinel")?(F=ee=>{P.current=P.current.filter(ie=>ie!==ee),A()},e[22]=F):F=e[22];const W=F;let B;e[23]!==o||e[24]!==N?(B=ee=>{const{active:ie,over:oe}=ee;if(E(null),oe&&ie.id!==oe.id){const me=N.indexOf(String(ie.id)),Oe=N.indexOf(String(oe.id)),ke=$s(N,me,Oe);P.current=ke,j(ke),o?.(ke)}},e[23]=o,e[24]=N,e[25]=B):B=e[25];const H=B,G=p.length>0&&w.length===p.length,U=w.length>0&&w.length<p.length,Y=Math.max(1,Math.min(C,20)),Q=Math.max(1,Math.min(O,50));let X;e[26]!==S?(X=ee=>S===ee,e[26]=S,e[27]=X):X=e[27];let K;e[28]!==w?(K=ee=>w.includes(ee),e[28]=w,e[29]=K):K=e[29];let J;e[30]!==i||e[31]!==w?(J=ee=>{if(!i)return;const ie=w.includes(ee);i(ie?w.filter(oe=>oe!==ee):[...w,ee])},e[30]=i,e[31]=w,e[32]=J):J=e[32];let q;e[33]!==p||e[34]!==G||e[35]!==i?(q=()=>{i&&i(G?[]:[...p])},e[33]=p,e[34]=G,e[35]=i,e[36]=q):q=e[36];let ne;e[37]!==p||e[38]!==g||e[39]!==S||e[40]!==G||e[41]!==U||e[42]!==x||e[43]!==o||e[44]!==i||e[45]!==v||e[46]!==w||e[47]!==X||e[48]!==K||e[49]!==J||e[50]!==q||e[51]!==Y||e[52]!==Q?(ne={allRowIds:p,draggable:g,draggingRowId:S,isLoading:x,selectable:v,selectedRows:w,skeletonColumns:Y,skeletonRows:Q,onRowReorder:o,onSelectionChange:i,registerRowId:$,unregisterRowId:W,isDragging:X,isSelected:K,toggleSelection:J,toggleAll:q,isAllSelected:G,isIndeterminate:U},e[37]=p,e[38]=g,e[39]=S,e[40]=G,e[41]=U,e[42]=x,e[43]=o,e[44]=i,e[45]=v,e[46]=w,e[47]=X,e[48]=K,e[49]=J,e[50]=q,e[51]=Y,e[52]=Q,e[53]=ne):ne=e[53];const Z=ne;let te;e[54]!==r?(te=z("w-full caption-bottom text-sm",r),e[54]=r,e[55]=te):te=e[55];let le;e[56]!==g||e[57]!==v?(le=(v||g)&&b.jsxs("colgroup",{children:[g&&b.jsx("col",{className:"w-12"}),v&&b.jsx("col",{className:"w-12"})]}),e[56]=g,e[57]=v,e[58]=le):le=e[58];let ce;e[59]!==n||e[60]!==s||e[61]!==te||e[62]!==le?(ce=b.jsx("div",{className:"overflow-hidden rounded-md border border-border",children:b.jsxs("table",{className:te,...s,"data-ox-slot":"table",children:[le,n]})}),e[59]=n,e[60]=s,e[61]=te,e[62]=le,e[63]=ce):ce=e[63];const fe=ce;if(g){let ee;e[64]===Symbol.for("react.memo_cache_sentinel")?(ee=Oe=>E(String(Oe.active.id)),e[64]=ee):ee=e[64];let ie;e[65]!==N||e[66]!==fe?(ie=b.jsx(Fs,{items:N,strategy:zs,children:fe}),e[65]=N,e[66]=fe,e[67]=ie):ie=e[67];let oe;e[68]!==H||e[69]!==_||e[70]!==ie?(oe=b.jsx(yr,{collisionDetection:ll,sensors:_,onDragEnd:H,onDragStart:ee,children:ie}),e[68]=H,e[69]=_,e[70]=ie,e[71]=oe):oe=e[71];let me;return e[72]!==Z||e[73]!==oe?(me=b.jsx(cs.Provider,{value:Z,children:oe}),e[72]=Z,e[73]=oe,e[74]=me):me=e[74],me}let he;return e[75]!==Z||e[76]!==fe?(he=b.jsx(cs.Provider,{value:Z,children:fe}),e[75]=Z,e[76]=fe,e[77]=he):he=e[77],he},Ys=()=>k.useContext(cs),ja=t=>{const e=I.compilerRuntimeExports.c(7),{columns:n}=t,r=Ys();let s;e[0]!==r?.selectable?(s=r?.selectable?b.jsx("td",{className:"px-3 py-2",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(_t,{className:"h-[21px] w-4",shape:"circle"})})}):null,e[0]=r?.selectable,e[1]=s):s=e[1];let o;e[2]!==n?(o=Array.from({length:n}).map(yb),e[2]=n,e[3]=o):o=e[3];let i;return e[4]!==s||e[5]!==o?(i=b.jsxs("tr",{className:"border-b transition-colors",children:[s,o]}),e[4]=s,e[5]=o,e[6]=i):i=e[6],i};function yb(t,e){return b.jsx("td",{className:"px-3 py-2",children:b.jsx(_t,{className:"h-[21px] w-full"})},e)}const wb=t=>{const e=I.compilerRuntimeExports.c(13);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=Ys();let i;e[4]!==r?(i=z("[&_tr:last-child]:border-0",r),e[4]=r,e[5]=i):i=e[5];let l;e[6]!==n||e[7]!==o?(l=o?.isLoading?Array.from({length:o.skeletonRows}).map((d,c)=>b.jsx(ja,{columns:o.skeletonColumns},c)):n,e[6]=n,e[7]=o,e[8]=l):l=e[8];let a;return e[9]!==s||e[10]!==i||e[11]!==l?(a=b.jsx("tbody",{className:i,...s,"data-ox-slot":"table-body",children:l}),e[9]=s,e[10]=i,e[11]=l,e[12]=a):a=e[12],a},Cb=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("p-3 align-middle whitespace-nowrap",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("td",{className:o,...s,"data-ox-slot":"table-cell",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Ob=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mb-4 flex items-center justify-between gap-4",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"table-controls",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Eb=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("border-t border-border font-medium",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("tfoot",{className:o,...s,"data-ox-slot":"table-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Sb=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("h-10 px-3 text-left align-middle font-medium whitespace-nowrap text-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("th",{className:o,...s,"data-ox-slot":"table-head",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Da=k.createContext({isHeader:!1}),kb=()=>k.useContext(Da),Rb=t=>{const e=I.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={isHeader:!0},e[4]=o):o=e[4];let i;e[5]!==r?(i=z("[&_tr]:border-b",r),e[5]=r,e[6]=i):i=e[6];let l;return e[7]!==n||e[8]!==s||e[9]!==i?(l=b.jsx(Da.Provider,{value:o,children:b.jsx("thead",{className:i,...s,"data-ox-slot":"table-header",children:n})}),e[7]=n,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},Pt=t=>t==="indeterminate",Nb=t=>{const e=I.compilerRuntimeExports.c(53);let n,r,s,o,i,l,a,d,c,u,f,m;e[0]!==t?({checked:n,className:r,defaultChecked:s,disabled:o,error:l,id:u,name:a,onChange:d,onCheckedChange:c,required:f,value:m,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12]);const h=He(),p=k.useId(),g=k.useRef(null),x=o??h?.disabled??!1,v=l??!!h?.error,y=f??h?.required??!1,w=u??h?.id??p,C=s??!1;let O;e[13]!==c?(O=Y=>{Y!==void 0&&c?.(Y)},e[13]=c,e[14]=O):O=e[14];let S;e[15]!==n||e[16]!==C||e[17]!==O?(S={value:n,defaultValue:C,onChange:O,name:"OxCheckbox"},e[15]=n,e[16]=C,e[17]=O,e[18]=S):S=e[18];const[E,R]=I.useControllableState(S);let N,j;e[19]!==E?(N=()=>{g.current&&(g.current.indeterminate=Pt(E))},j=[E],e[19]=E,e[20]=N,e[21]=j):(N=e[20],j=e[21]),k.useEffect(N,j);let D;e[22]!==E||e[23]!==x?(D=()=>x?"disabled":Pt(E)?"indeterminate":E?"checked":"unchecked",e[22]=E,e[23]=x,e[24]=D):D=e[24];const P=D;let M;Pt(E)?M="mixed":E?M="true":M="false";let L;e[25]!==d||e[26]!==R?(L=Y=>{d?.(Y),R(Q=>Pt(Q)?!0:Y.target.checked)},e[25]=d,e[26]=R,e[27]=L):L=e[27];const _=L,T=Pt(E)?ae.Minus:ae.Check;let A;e[28]!==E?(A=Pt(E)?!1:E??!1,e[28]=E,e[29]=A):A=e[29];const V=A,$=M;let F;e[30]!==r?(F=z("peer size-4 shrink-0 cursor-pointer appearance-none rounded-sm border border-input bg-transparent shadow-xs","transition-shadow outline-none","ox-focus-ring","checked:border-primary checked:bg-primary",'data-[ox-state="indeterminate"]:border-primary data-[ox-state="indeterminate"]:bg-primary',"aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",r),e[30]=r,e[31]=F):F=e[31];const W=P();let B;e[32]!==M||e[33]!==i||e[34]!==_||e[35]!==v||e[36]!==w||e[37]!==V||e[38]!==x||e[39]!==y||e[40]!==a||e[41]!==F||e[42]!==W||e[43]!==m?(B=b.jsx("input",{id:w,"aria-checked":$,"aria-invalid":v,"aria-required":y,className:F,"data-ox-slot":"checkbox",disabled:x,name:a,ref:g,required:y,type:"checkbox",value:m,onChange:_,...i,checked:V,"data-ox-state":W}),e[32]=M,e[33]=i,e[34]=_,e[35]=v,e[36]=w,e[37]=V,e[38]=x,e[39]=y,e[40]=a,e[41]=F,e[42]=W,e[43]=m,e[44]=B):B=e[44];let H;e[45]!==E?(H=z("pointer-events-none absolute inset-0 m-auto text-primary-foreground",{"opacity-80":Pt(E),"opacity-0 peer-checked:opacity-80":!Pt(E)}),e[45]=E,e[46]=H):H=e[46];let G;e[47]!==T||e[48]!==H?(G=b.jsx(ue,{className:H,icon:T}),e[47]=T,e[48]=H,e[49]=G):G=e[49];let U;return e[50]!==B||e[51]!==G?(U=b.jsxs("div",{className:'relative inline-flex shrink-0 [&_svg:not([class*="size-"])]:size-3.5',children:[B,G]}),e[50]=B,e[51]=G,e[52]=U):U=e[52],U},Pa=k.createContext(void 0),jb=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,disabled:s,name:i,onChange:l,value:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);let d;e[8]!==a?(d=a===void 0?[]:a,e[8]=a,e[9]=d):d=e[9];const c=d,u=He(),f=s??u?.disabled??!1;let m;e[10]!==f||e[11]!==i||e[12]!==l||e[13]!==c?(m={value:c,onChange:l,name:i,disabled:f},e[10]=f,e[11]=i,e[12]=l,e[13]=c,e[14]=m):m=e[14];const h=u?.labelId;let p;e[15]!==r?(p=z("space-y-2",r),e[15]=r,e[16]=p):p=e[16];let g;e[17]!==n||e[18]!==o||e[19]!==h||e[20]!==p?(g=b.jsx("div",{"aria-labelledby":h,className:p,"data-ox-slot":"checkbox-group",role:"group",...o,children:n}),e[17]=n,e[18]=o,e[19]=h,e[20]=p,e[21]=g):g=e[21];let x;return e[22]!==m||e[23]!==g?(x=b.jsx(Pa.Provider,{value:m,children:g}),e[22]=m,e[23]=g,e[24]=x):x=e[24],x},Db=()=>k.useContext(Pa),Pb=t=>{const e=I.compilerRuntimeExports.c(37);let n,r,s,o,i,l,a,d,c;e[0]!==t?({className:n,disabled:o,error:a,id:l,name:i,onChange:s,required:d,value:c,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=a===void 0?!1:a,f=d===void 0?!1:d,m=k.useId(),h=Db();if(!h)throw new Error("CheckboxGroupItem must be used within CheckboxGroup");const p=l||m,g=o??h.disabled??!1,x=i??h.name;let v;e[10]!==h.value||e[11]!==c?(v=h.value?.includes(c)??!1,e[10]=h.value,e[11]=c,e[12]=v):v=e[12];const y=v;let w;e[13]!==h||e[14]!==s||e[15]!==c?(w=P=>{s?.(P);const M=h.value,_=P.target.checked?[...M,c]:M.filter(T=>T!==c);h.onChange?.(_)},e[13]=h,e[14]=s,e[15]=c,e[16]=w):w=e[16];const C=w;let O;e[17]!==g||e[18]!==y?(O=()=>g?"disabled":y?"checked":"unchecked",e[17]=g,e[18]=y,e[19]=O):O=e[19];const S=O;let E;e[20]!==n?(E=z("peer size-4 shrink-0 cursor-pointer appearance-none rounded-sm border border-input bg-transparent shadow-xs","transition-shadow outline-none","ox-focus-ring","checked:border-primary checked:bg-primary","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[20]=n,e[21]=E):E=e[21];const R=S();let N;e[22]!==g||e[23]!==r||e[24]!==u||e[25]!==C||e[26]!==p||e[27]!==y||e[28]!==x||e[29]!==f||e[30]!==E||e[31]!==R||e[32]!==c?(N=b.jsx("input",{id:p,"aria-checked":y,"aria-invalid":u,"aria-required":f,className:E,"data-ox-slot":"checkbox",disabled:g,name:x,required:f,type:"checkbox",value:c,onChange:C,...r,checked:y,"data-ox-state":R}),e[22]=g,e[23]=r,e[24]=u,e[25]=C,e[26]=p,e[27]=y,e[28]=x,e[29]=f,e[30]=E,e[31]=R,e[32]=c,e[33]=N):N=e[33];let j;e[34]===Symbol.for("react.memo_cache_sentinel")?(j=b.jsx(ue,{className:"pointer-events-none absolute inset-0 m-auto text-primary-foreground opacity-0 peer-checked:opacity-80",icon:ae.Check}),e[34]=j):j=e[34];let D;return e[35]!==N?(D=b.jsxs("div",{className:'relative inline-flex shrink-0 [&_svg:not([class*="size-"])]:size-3.5',children:[N,j]}),e[35]=N,e[36]=D):D=e[36],D},ds=Object.assign(Nb,{Group:jb,GroupItem:Pb}),Ta=k.createContext(void 0),Tb=t=>{const e=I.compilerRuntimeExports.c(49),{children:n,className:r,defaultValue:s,disabled:o,error:i,onChange:l,required:a,value:d}=t,c=s===void 0?null:s,u=He(),f=k.useId(),m=o??u?.disabled??!1,h=i??!!u?.error,p=a??u?.required??!1,g=u?.id??f,x=k.useRef(null),v=k.useRef(null),[y,w]=k.useState(0),[C,O]=k.useState(-1),[S,E]=k.useState(0);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R=new Map,e[0]=R):R=e[0];const N=k.useRef(R);let j;e[1]!==m?(j={closeOnEscape:!0,closeOnOutsideClick:!1,disabled:m},e[1]=m,e[2]=j):j=e[2];const{close:D,containerRef:P,isClosing:M,isVisible:L,setOpen:_}=I.usePopperState(j);let T,A;e[3]!==D||e[4]!==P||e[5]!==L?(T=()=>{if(!L)return;const fe=he=>{const ee=he.target,ie=P.current,oe=document.querySelector('[data-ox-slot="combobox-content"]'),me=ie?.contains(ee),Oe=oe?.contains(ee);!me&&!Oe&&D()};return document.addEventListener("mousedown",fe),()=>document.removeEventListener("mousedown",fe)},A=[L,D,P],e[3]=D,e[4]=P,e[5]=L,e[6]=T,e[7]=A):(T=e[6],A=e[7]),k.useEffect(T,A);const V=l;let $;e[8]!==c||e[9]!==V||e[10]!==d?($={defaultValue:c,name:"OxCombobox",onChange:V,value:d},e[8]=c,e[9]=V,e[10]=d,e[11]=$):$=e[11];const[F,W]=I.useControllableState($);let B;e[12]!==_?(B=()=>{x.current&&w(x.current.offsetWidth),O(-1),_(!0),setTimeout(()=>v.current?.focus(),0)},e[12]=_,e[13]=B):B=e[13];const H=B;let G;e[14]!==D?(G=()=>{D(),O(-1)},e[14]=D,e[15]=G):G=e[15];const U=G;let Y;e[16]!==U||e[17]!==H||e[18]!==L?(Y=()=>{L?U():H()},e[16]=U,e[17]=H,e[18]=L,e[19]=Y):Y=e[19];const Q=Y;let X;e[20]!==U||e[21]!==W?(X=fe=>{W(fe),U(),x.current?.focus()},e[20]=U,e[21]=W,e[22]=X):X=e[22];const J=X,q=F;let ne;e[23]!==g||e[24]!==U||e[25]!==H||e[26]!==Q||e[27]!==h||e[28]!==C||e[29]!==M||e[30]!==m||e[31]!==p||e[32]!==L||e[33]!==S||e[34]!==J||e[35]!==q||e[36]!==y?(ne={close:U,comboboxId:g,disabled:m,error:h,highlightedIndex:C,isClosing:M,isVisible:L,onSelect:J,open:H,optionCount:S,required:p,searchRef:v,selectedValue:q,setHighlightedIndex:O,setOptionCount:E,toggle:Q,triggerRef:x,triggerWidth:y,optionValuesMap:N},e[23]=g,e[24]=U,e[25]=H,e[26]=Q,e[27]=h,e[28]=C,e[29]=M,e[30]=m,e[31]=p,e[32]=L,e[33]=S,e[34]=J,e[35]=q,e[36]=y,e[37]=ne):ne=e[37];let Z;e[38]!==r?(Z=z('flex w-full flex-col text-sm [&_svg:not([class*="size-"])]:size-4',r),e[38]=r,e[39]=Z):Z=e[39];let te;e[40]!==n?(te=b.jsx(Se,{children:n}),e[40]=n,e[41]=te):te=e[41];let le;e[42]!==P||e[43]!==Z||e[44]!==te?(le=b.jsx("div",{className:Z,ref:P,children:te}),e[42]=P,e[43]=Z,e[44]=te,e[45]=le):le=e[45];let ce;return e[46]!==ne||e[47]!==le?(ce=b.jsx(Ta.Provider,{value:ne,children:le}),e[46]=ne,e[47]=le,e[48]=ce):ce=e[48],ce},Mn=()=>{const t=k.useContext(Ta);if(!t)throw new Error("Combobox components must be used within an OxCombobox");return t},Mb=t=>{const e=I.compilerRuntimeExports.c(18);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{comboboxId:o,isClosing:i,isVisible:l,triggerWidth:a}=Mn(),d=k.useRef(null);let c,u;if(e[4]!==l||e[5]!==a?(c=()=>{l&&d.current&&(d.current.style.minWidth=`${a}px`)},u=[l,a],e[4]=l,e[5]=a,e[6]=c,e[7]=u):(c=e[6],u=e[7]),k.useLayoutEffect(c,u),!l)return null;const f=i?"closing":"open",m=`${o}-content`;let h;e[8]!==r?(h=z("flex max-h-80 flex-col overflow-hidden",r),e[8]=r,e[9]=h):h=e[9];let p;e[10]!==n||e[11]!==s||e[12]!==m||e[13]!==h?(p=b.jsx("div",{id:m,className:h,...s,"data-ox-slot":"combobox-content",children:n}),e[10]=n,e[11]=s,e[12]=m,e[13]=h,e[14]=p):p=e[14];let g;return e[15]!==f||e[16]!==p?(g=b.jsx(Bt,{children:b.jsx(Se.Content,{align:"start",className:"ox-combobox-animate z-50 rounded-lg border border-border bg-popover text-sm text-popover-foreground shadow-md [&_svg:not([class*='size-'])]:size-4","data-ox-state":f,ref:d,side:"bottom",sideOffset:8,children:p})}),e[15]=f,e[16]=p,e[17]=g):g=e[17],g},Ib=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("flex items-center justify-center p-4 text-sm text-muted-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"combobox-empty",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Ab=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({className:n,rows:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=s===void 0?4:s;let i;e[4]!==n?(i=z("flex flex-col gap-1 mask-b-from-0% p-2",n),e[4]=n,e[5]=i):i=e[5];let l;e[6]!==o?(l=Array.from({length:o}).map(_b),e[6]=o,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==i||e[10]!==l?(a=b.jsx("div",{"aria-busy":"true","aria-label":"Loading options",className:i,role:"status",...r,"data-ox-slot":"combobox-loading",children:l}),e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],a};function _b(t,e){return b.jsx(_t,{className:"h-8 w-full rounded-sm bg-neutral-accent"},e)}const $b=t=>{const e=I.compilerRuntimeExports.c(36);let n,r,s,o;e[0]!==t?({children:n,className:r,value:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{comboboxId:i,highlightedIndex:l,onSelect:a,optionCount:d,optionValuesMap:c,selectedValue:u}=Mn(),[f,m]=k.useState(-1),h=k.useRef(null),p=u===o,g=f>-1&&l===f;let x;e[5]!==c||e[6]!==o?(x=()=>{const L=h.current?.parentElement;if(!L)return;const T=[...L.querySelectorAll('[data-ox-slot="combobox-option"]')].indexOf(h.current);m(T),c.current?.set(T,o)},e[5]=c,e[6]=o,e[7]=x):x=e[7];let v;e[8]!==d||e[9]!==c||e[10]!==o?(v=[d,c,o],e[8]=d,e[9]=c,e[10]=o,e[11]=v):v=e[11],k.useEffect(x,v);let y,w;e[12]!==g?(y=()=>{g&&h.current&&h.current.scrollIntoView({block:"nearest"})},w=[g],e[12]=g,e[13]=y,e[14]=w):(y=e[13],w=e[14]),k.useEffect(y,w);let C;e[15]!==a||e[16]!==o?(C=()=>{a(o)},e[15]=a,e[16]=o,e[17]=C):C=e[17];const O=C,S=`${i}-option-${f}`,E=g||p;let R;e[18]!==r||e[19]!==E?(R=z("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-popover-foreground outline-none","hover:bg-neutral-accent hover:text-neutral-accent-foreground",{"bg-neutral-accent text-neutral-accent-foreground":E},r),e[18]=r,e[19]=E,e[20]=R):R=e[20];const N=g||void 0,j=p||void 0;let D;e[21]!==n?(D=b.jsx("span",{className:"flex flex-1 items-center gap-2",children:n}),e[21]=n,e[22]=D):D=e[22];let P;e[23]!==p?(P=p&&b.jsx(ue,{className:"shrink-0 text-primary",icon:ae.Check,size:"sm"}),e[23]=p,e[24]=P):P=e[24];let M;return e[25]!==s||e[26]!==O||e[27]!==f||e[28]!==p||e[29]!==j||e[30]!==D||e[31]!==P||e[32]!==S||e[33]!==R||e[34]!==N?(M=b.jsxs("li",{id:S,"aria-selected":p,className:R,ref:h,role:"option",onClick:O,...s,"data-ox-highlighted":N,"data-ox-index":f,"data-ox-selected":j,"data-ox-slot":"combobox-option",children:[D,P]}),e[25]=s,e[26]=O,e[27]=f,e[28]=p,e[29]=j,e[30]=D,e[31]=P,e[32]=S,e[33]=R,e[34]=N,e[35]=M):M=e[35],M},Lb=t=>{const e=I.compilerRuntimeExports.c(17);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{comboboxId:o,setOptionCount:i}=Mn();let l;e[4]!==n?(l=k.Children.count(n),e[4]=n,e[5]=l):l=e[5];const a=l;let d,c;e[6]!==a||e[7]!==i?(d=()=>{i(a)},c=[a,i],e[6]=a,e[7]=i,e[8]=d,e[9]=c):(d=e[8],c=e[9]),k.useEffect(d,c);const u=`${o}-listbox`;let f;e[10]!==r?(f=z("flex flex-col gap-0.5 overflow-y-auto p-1",r),e[10]=r,e[11]=f):f=e[11];let m;return e[12]!==n||e[13]!==s||e[14]!==u||e[15]!==f?(m=b.jsx("ul",{id:u,"aria-label":"Options",className:f,role:"listbox",...s,"data-ox-slot":"combobox-options",children:n}),e[12]=n,e[13]=s,e[14]=u,e[15]=f,e[16]=m):m=e[16],m},zb=t=>{const e=I.compilerRuntimeExports.c(35);let n,r,s,o,i;e[0]!==t?({className:n,debounce:o,onChange:s,placeholder:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?300:o,a=i===void 0?"Search...":i,{close:d,comboboxId:c,disabled:u,highlightedIndex:f,isVisible:m,onSelect:h,optionCount:p,optionValuesMap:g,searchRef:x,setHighlightedIndex:v}=Mn(),[y,w]=k.useState(""),C=I.useDebounce(y,l);let O,S;e[6]!==C||e[7]!==s?(O=()=>{s?.(C)},S=[C,s],e[6]=C,e[7]=s,e[8]=O,e[9]=S):(O=e[8],S=e[9]),k.useEffect(O,S);let E;e[10]!==v?(E=T=>{w(T.target.value),v(-1)},e[10]=v,e[11]=E):E=e[11];const R=E;let N;e[12]!==d||e[13]!==f||e[14]!==m||e[15]!==h||e[16]!==p||e[17]!==g||e[18]!==v?(N=T=>{if(!(!m||p===0))e:switch(T.key){case"ArrowDown":{T.preventDefault();const A=f<p-1?f+1:0;v(A);break e}case"ArrowUp":{T.preventDefault();const A=f>0?f-1:p-1;v(A);break e}case"Enter":{if(T.preventDefault(),f>=0){const A=g.current?.get(f);A!==void 0&&h(A)}break e}case"Home":{T.preventDefault(),v(0);break e}case"End":{T.preventDefault(),v(p-1);break e}case"Escape":T.preventDefault(),d()}},e[12]=d,e[13]=f,e[14]=m,e[15]=h,e[16]=p,e[17]=g,e[18]=v,e[19]=N):N=e[19];const j=N;let D;e[20]===Symbol.for("react.memo_cache_sentinel")?(D=b.jsx(ue,{className:"shrink-0 text-muted-foreground",icon:ae.Search}),e[20]=D):D=e[20];const P=f>=0?`${c}-option-${f}`:void 0,M=`${c}-listbox`;let L;e[21]!==n?(L=z("h-8 w-full bg-transparent text-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",n),e[21]=n,e[22]=L):L=e[22];let _;return e[23]!==u||e[24]!==r||e[25]!==R||e[26]!==j||e[27]!==y||e[28]!==m||e[29]!==a||e[30]!==x||e[31]!==L||e[32]!==P||e[33]!==M?(_=b.jsxs("div",{className:"flex items-center gap-2 border-b border-border p-2",children:[D,b.jsx("input",{"aria-activedescendant":P,"aria-autocomplete":"list","aria-controls":M,"aria-expanded":m,className:L,disabled:u,placeholder:a,ref:x,role:"combobox",type:"text",value:y,onChange:R,onKeyDown:j,...r,"data-ox-slot":"combobox-search"})]}),e[23]=u,e[24]=r,e[25]=R,e[26]=j,e[27]=y,e[28]=m,e[29]=a,e[30]=x,e[31]=L,e[32]=P,e[33]=M,e[34]=_):_=e[34],_},Fb=t=>{const e=I.compilerRuntimeExports.c(35);let n,r,s,o,i;e[0]!==t?({className:n,disabled:s,placeholder:i,renderValue:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?"Select an option":i,{comboboxId:a,disabled:d,error:c,isVisible:u,selectedValue:f,toggle:m,triggerRef:h}=Mn(),p=s??d,g=f!=null;let x;e[6]!==g||e[7]!==o||e[8]!==f?(x=g?o?o(f):String(f):null,e[6]=g,e[7]=o,e[8]=f,e[9]=x):x=e[9];const v=x,y=`${a}-listbox`,w=g?`Selected: ${v}`:l;let C;e[10]!==n||e[11]!==c?(C=z("flex h-9 w-full items-center gap-x-2 rounded-lg border border-input bg-transparent px-3 py-2 text-left text-sm enabled:cursor-pointer","dark:bg-input/30 dark:enabled:hover:bg-input/50","ox-focus-ring focus-visible:border-ring","disabled:cursor-not-allowed disabled:opacity-50","shadow-xs transition-[color,box-shadow]","[&>span:empty]:text-muted-foreground",{"border-destructive ring-destructive/20 dark:ring-destructive/40":c},n),e[10]=n,e[11]=c,e[12]=C):C=e[12];const O=c||void 0,S=u?"open":"closed";let E;e[13]!==v||e[14]!==g||e[15]!==l?(E=g?b.jsx("span",{className:"min-w-0 flex-1 truncate",children:v}):b.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:l}),e[13]=v,e[14]=g,e[15]=l,e[16]=E):E=e[16];let R;e[17]!==u?(R=z("shrink-0 text-muted-foreground opacity-50 transition-transform duration-300 ease-in-out",{"rotate-180":u}),e[17]=u,e[18]=R):R=e[18];let N;e[19]!==R?(N=b.jsx(ue,{className:R,icon:ae.ChevronDown}),e[19]=R,e[20]=N):N=e[20];let j;return e[21]!==a||e[22]!==r||e[23]!==p||e[24]!==u||e[25]!==N||e[26]!==y||e[27]!==w||e[28]!==C||e[29]!==O||e[30]!==S||e[31]!==E||e[32]!==m||e[33]!==h?(j=b.jsx(Se.Anchor,{asChild:!0,children:b.jsxs("button",{id:a,"aria-controls":y,"aria-disabled":p,"aria-expanded":u,"aria-haspopup":"listbox","aria-label":w,className:C,disabled:p,ref:h,type:"button",onClick:m,...r,"data-ox-error":O,"data-ox-slot":"combobox-trigger","data-ox-state":S,children:[E,N]})}),e[21]=a,e[22]=r,e[23]=p,e[24]=u,e[25]=N,e[26]=y,e[27]=w,e[28]=C,e[29]=O,e[30]=S,e[31]=E,e[32]=m,e[33]=h,e[34]=j):j=e[34],j},Vb=Object.assign(Tb,{Content:Mb,Empty:Ib,Loading:Ab,Option:$b,Options:Lb,Search:zb,Trigger:Fb}),Ma=k.createContext(null),Bb=t=>t.map(e=>e.includes("/")?e:`.${e}`).join(","),li=t=>{const e={B:1,KB:1024,MB:1048576,GB:1073741824},n=t.match(/^(\d+(?:\.\d+)?)\s*(B|KB|MB|GB)$/i);if(!n)throw new Error(`Invalid size format: ${t}. Use format like "5MB", "1.5GB", etc.`);const[,r,s]=n;return Number.parseFloat(r)*e[s.toUpperCase()]},Wb=(t,e)=>e.some(n=>n.includes("/")?n.endsWith("/*")?t.type.startsWith(n.slice(0,-1)):t.type===n:t.name.toLowerCase().endsWith(`.${n.toLowerCase()}`)),Hb=t=>{t.preventDefault(),t.stopPropagation()},Yb=t=>{const e=I.compilerRuntimeExports.c(74);let n,r,s,o,i,l,a,d,c,u,f;e[0]!==t?({accept:c,children:n,className:r,disabled:u,maxFiles:o,maxSize:i,minSize:l,multiple:f,onError:a,onFileSelect:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11]);let m;e[12]!==c?(m=c===void 0?[]:c,e[12]=c,e[13]=m):m=e[13];const h=m,p=u===void 0?!1:u,g=f===void 0?!1:f,x=k.useRef(null);let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[14]=v):v=e[14];const[y,w]=k.useState(v),[C,O]=k.useState(!1),[S,E]=k.useState();let R;e[15]!==h||e[16]!==o||e[17]!==i||e[18]!==l||e[19]!==g?(R=Z=>{if(!g&&Z.length>1)return"Only single file selection is allowed";if(o&&Z.length>o)return`Maximum ${o} file${o===1?"":"s"} allowed`;if(Z.length===0)return null;if(h.length>0&&Z.filter(le=>!Wb(le,h)).length>0)return`Invalid file type. Accepted formats: ${h.join(", ")}`;if(i){const te=li(i);if(Z.filter(ce=>ce.size>te).length>0)return`File size must not exceed ${i}`}if(l){const te=li(l);if(Z.filter(ce=>ce.size<te).length>0)return`File size must be at least ${l}`}return null},e[15]=h,e[16]=o,e[17]=i,e[18]=l,e[19]=g,e[20]=R):R=e[20];const N=R;let j;e[21]!==a||e[22]!==d||e[23]!==N?(j=Z=>{const te=N(Z);if(te){E(te),a?.(te);return}E(void 0),w(Z),d?.(Z)},e[21]=a,e[22]=d,e[23]=N,e[24]=j):j=e[24];const D=j;let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=()=>{w([]),E(void 0)},e[25]=P):P=e[25];const M=P;let L;e[26]!==p?(L=()=>{!p&&x.current&&x.current.click()},e[26]=p,e[27]=L):L=e[27];const _=L;let T;e[28]!==D?(T=Z=>{const te=[...Z.target.files||[]];te.length>0&&D(te),Z.target.value=""},e[28]=D,e[29]=T):T=e[29];const A=T;let V;e[30]!==h||e[31]!==p||e[32]!==S||e[33]!==y||e[34]!==C||e[35]!==o||e[36]!==i||e[37]!==l||e[38]!==g||e[39]!==a||e[40]!==d||e[41]!==_||e[42]!==D||e[43]!==N?(V={accept:h,clearFiles:M,disabled:p,error:S,files:y,isDragActive:C,maxFiles:o,maxSize:i,minSize:l,multiple:g,onError:a,onFileSelect:d,openFilePicker:_,selectFiles:D,validateFiles:N},e[30]=h,e[31]=p,e[32]=S,e[33]=y,e[34]=C,e[35]=o,e[36]=i,e[37]=l,e[38]=g,e[39]=a,e[40]=d,e[41]=_,e[42]=D,e[43]=N,e[44]=V):V=e[44];const $=V;let F;e[45]!==p?(F=Z=>{Z.preventDefault(),Z.stopPropagation(),p||O(!0)},e[45]=p,e[46]=F):F=e[46];const W=F;let B;e[47]!==p?(B=Z=>{Z.preventDefault(),Z.stopPropagation(),!p&&!Z.currentTarget.contains(Z.relatedTarget)&&O(!1)},e[47]=p,e[48]=B):B=e[48];const H=B;let G;e[49]!==p||e[50]!==D?(G=Z=>{if(Z.preventDefault(),Z.stopPropagation(),p)return;O(!1);const te=[...Z.dataTransfer.files];D(te)},e[49]=p,e[50]=D,e[51]=G):G=e[51];const U=G;let Y;e[52]!==r?(Y=z("relative",r),e[52]=r,e[53]=Y):Y=e[53];const Q=C?"drag-active":"idle";let X;e[54]!==h?(X=h.length>0?Bb(h):void 0,e[54]=h,e[55]=X):X=e[55];let K;e[56]===Symbol.for("react.memo_cache_sentinel")?(K={display:"none"},e[56]=K):K=e[56];let J;e[57]!==p||e[58]!==A||e[59]!==g||e[60]!==X?(J=b.jsx("input",{accept:X,className:"hidden","data-ox-slot":"file-upload-input",disabled:p,multiple:g,ref:x,style:K,type:"file",onChange:A}),e[57]=p,e[58]=A,e[59]=g,e[60]=X,e[61]=J):J=e[61];let q;e[62]!==n||e[63]!==s||e[64]!==W||e[65]!==H||e[66]!==U||e[67]!==Y||e[68]!==Q||e[69]!==J?(q=b.jsxs("div",{className:Y,"data-ox-slot":"file-upload",...s,"data-ox-state":Q,onDragEnter:W,onDragLeave:H,onDragOver:Hb,onDrop:U,children:[n,J]}),e[62]=n,e[63]=s,e[64]=W,e[65]=H,e[66]=U,e[67]=Y,e[68]=Q,e[69]=J,e[70]=q):q=e[70];let ne;return e[71]!==$||e[72]!==q?(ne=b.jsx(Ma.Provider,{value:$,children:q}),e[71]=$,e[72]=q,e[73]=ne):ne=e[73],ne},qs=()=>{const t=k.useContext(Ma);if(!t)throw new Error("useFileUploadContext must be used within a FileUploadContext.Provider");return t},qb=t=>{const e=I.compilerRuntimeExports.c(29);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o,error:i,isDragActive:l,openFilePicker:a}=qs();let d;e[4]!==o||e[5]!==i||e[6]!==l?(d=()=>i?"error":l?"drag-active":o?"disabled":"idle",e[4]=o,e[5]=i,e[6]=l,e[7]=d):d=e[7];const c=d,u=!l&&!i,f=!i&&!o;let m;e[8]!==r||e[9]!==o||e[10]!==i||e[11]!==l||e[12]!==u||e[13]!==f?(m=z("rounded-lg border-2 border-dashed p-6 transition-all duration-200",{"border-border bg-card":u,"border-primary bg-card":l,"border-destructive bg-card":i,"cursor-pointer focus:border-primary focus:outline-none":f,"ox-default-disabled":o},r),e[8]=r,e[9]=o,e[10]=i,e[11]=l,e[12]=u,e[13]=f,e[14]=m):m=e[14];const h=o?-1:0,p=c();let g;e[15]!==o||e[16]!==a?(g=y=>{(y.key==="Enter"||y.key===" ")&&!o&&(y.preventDefault(),a())},e[15]=o,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==i?(x=i&&b.jsx("div",{className:"mt-2 text-center text-sm text-destructive",children:i}),e[18]=i,e[19]=x):x=e[19];let v;return e[20]!==n||e[21]!==s||e[22]!==a||e[23]!==m||e[24]!==h||e[25]!==p||e[26]!==g||e[27]!==x?(v=b.jsxs("div",{className:m,role:"button",tabIndex:h,...s,"data-ox-slot":"file-upload-area","data-ox-state":p,onClick:a,onKeyDown:g,children:[n,x]}),e[20]=n,e[21]=s,e[22]=a,e[23]=m,e[24]=h,e[25]=p,e[26]=g,e[27]=x,e[28]=v):v=e[28],v},Gb=t=>{const e=I.compilerRuntimeExports.c(16);let n,r,s,o,i;e[0]!==t?({children:n,className:r,size:o,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?"md":o,a=i===void 0?"primary":i,{disabled:d,openFilePicker:c}=qs();let u;e[6]!==r?(u=z("cursor-pointer",r),e[6]=r,e[7]=u):u=e[7];let f;return e[8]!==n||e[9]!==d||e[10]!==s||e[11]!==c||e[12]!==l||e[13]!==u||e[14]!==a?(f=b.jsx(Ze,{className:u,disabled:d,size:l,type:"button",variant:a,...s,onClick:c,children:n}),e[8]=n,e[9]=d,e[10]=s,e[11]=c,e[12]=l,e[13]=u,e[14]=a,e[15]=f):f=e[15],f},Ub=t=>{const e=I.compilerRuntimeExports.c(41);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const[o,i]=k.useState(!1),{disabled:l,isDragActive:a,openFilePicker:d}=qs();let c;e[4]!==l||e[5]!==a||e[6]!==o?(c=()=>a?"drag-active":o?"hovered":l?"disabled":"idle",e[4]=l,e[5]=a,e[6]=o,e[7]=c):c=e[7];const u=c,f=(o||a)&&!l;let m;e[8]!==r||e[9]!==l?(m=z("ox-backdrop-blur-parent group relative w-fit cursor-pointer overflow-hidden rounded-lg","ox-focus-ring",{"cursor-not-allowed opacity-50":l},r),e[8]=r,e[9]=l,e[10]=m):m=e[10];const h=l?-1:0,p=u();let g;e[11]!==l||e[12]!==d?(g=D=>{(D.key==="Enter"||D.key===" ")&&!l&&(D.preventDefault(),d())},e[11]=l,e[12]=d,e[13]=g):g=e[13];let x,v;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=()=>i(!0),v=()=>i(!1),e[14]=x,e[15]=v):(x=e[14],v=e[15]);const y=!f;let w;e[16]!==a||e[17]!==f||e[18]!==y?(w=z("absolute inset-0 flex w-full items-center justify-center transition-all duration-200","bg-background/70 backdrop-blur-sm",{"pointer-events-none opacity-0":y,"opacity-100":f,"bg-primary/60":a}),e[16]=a,e[17]=f,e[18]=y,e[19]=w):w=e[19];const C=!f;let O;e[20]!==a||e[21]!==f||e[22]!==C?(O=z("flex flex-col items-center gap-2 text-white transition-transform duration-200",{"scale-90":C,"scale-100":f,"scale-110":a}),e[20]=a,e[21]=f,e[22]=C,e[23]=O):O=e[23];const S=a?ae.CloudUpload:ae.Upload;let E;e[24]!==S?(E=b.jsx(ue,{className:"text-white drop-shadow-[0_0_12px_rgba(255,255,255,0.7)]",icon:S,size:"xl"}),e[24]=S,e[25]=E):E=e[25];let R;e[26]!==O||e[27]!==E?(R=b.jsx("div",{className:O,children:E}),e[26]=O,e[27]=E,e[28]=R):R=e[28];let N;e[29]!==R||e[30]!==w?(N=b.jsx("div",{className:w,"data-ox-slot":"file-upload-overlay-backdrop",children:R}),e[29]=R,e[30]=w,e[31]=N):N=e[31];let j;return e[32]!==n||e[33]!==s||e[34]!==d||e[35]!==N||e[36]!==m||e[37]!==h||e[38]!==p||e[39]!==g?(j=b.jsxs("div",{className:m,role:"button",tabIndex:h,...s,"data-ox-slot":"file-upload-overlay","data-ox-state":p,onClick:d,onKeyDown:g,onMouseEnter:x,onMouseLeave:v,children:[n,N]}),e[32]=n,e[33]=s,e[34]=d,e[35]=N,e[36]=m,e[37]=h,e[38]=p,e[39]=g,e[40]=j):j=e[40],j},Kb=Object.assign(Yb,{Area:qb,Button:Gb,Overlay:Ub}),Xb=t=>{const e=I.compilerRuntimeExports.c(14);let n,r,s,o,i;e[0]!==t?({children:n,className:r,fullWidth:o,noValidate:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,a=i===void 0?!0:i;let d;e[6]!==r||e[7]!==l?(d=z({"w-full":l},r),e[6]=r,e[7]=l,e[8]=d):d=e[8];let c;return e[9]!==n||e[10]!==s||e[11]!==a||e[12]!==d?(c=b.jsx("form",{className:d,"data-ox-slot":"form",noValidate:a,...s,children:n}),e[9]=n,e[10]=s,e[11]=a,e[12]=d,e[13]=c):c=e[13],c},Qb=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Zt,{...t}),e[0]=t,e[1]=n):n=e[1],n},Jb=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Sa,{...t}),e[0]=t,e[1]=n):n=e[1],n},Zb=z("grid grid-cols-[auto_1fr] items-center gap-x-3 gap-y-1",'input[data-ox-slot="checkbox"]:col-start-1','input[data-ox-slot="checkbox"]:row-start-1','input[data-ox-slot="radio"]:col-start-1','input[data-ox-slot="radio"]:row-start-1','button[data-ox-slot="switch"]:col-start-1','button[data-ox-slot="switch"]:row-start-1',"*:data-[ox-slot=label]:col-start-2","*:data-[ox-slot=description]:col-start-2","*:data-[ox-slot=error]:col-start-2"),e0=z("grid grid-cols-[1fr_auto] items-center gap-x-3 gap-y-1",'input[data-ox-slot="checkbox"]:col-start-2','input[data-ox-slot="checkbox"]:row-start-1','input[data-ox-slot="radio"]:col-start-2','input[data-ox-slot="radio"]:row-start-1','button[data-ox-slot="switch"]:col-start-2','button[data-ox-slot="switch"]:row-start-1',"*:data-[ox-slot=label]:col-start-1","*:data-[ox-slot=label]:row-start-1","*:data-[ox-slot=description]:col-start-1","*:data-[ox-slot=error]:col-start-1"),t0=t=>{const e=I.compilerRuntimeExports.c(28);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,disabled:i,error:l,id:s,labelPosition:a,orientation:d,required:c,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=i===void 0?!1:i,f=l===void 0?!1:l,m=a===void 0?"start":a,h=d===void 0?"vertical":d,p=c===void 0?!1:c,g=k.useId(),x=s??g,v=`${x}-label`,y=h==="horizontal",w=m==="end";let C;e[10]!==u||e[11]!==f||e[12]!==x||e[13]!==v||e[14]!==p?(C={disabled:u,error:f,id:x,labelId:v,required:p},e[10]=u,e[11]=f,e[12]=x,e[13]=v,e[14]=p,e[15]=C):C=e[15];const O=!y,S=y&&!w,E=y&&w;let R;e[16]!==r||e[17]!==O||e[18]!==S||e[19]!==E?(R=z({"space-y-1":O,[Zb]:S,[e0]:E},r),e[16]=r,e[17]=O,e[18]=S,e[19]=E,e[20]=R):R=e[20];let N;e[21]!==n||e[22]!==o||e[23]!==R?(N=b.jsx("div",{className:R,...o,"data-ox-slot":"form-field",children:n}),e[21]=n,e[22]=o,e[23]=R,e[24]=N):N=e[24];let j;return e[25]!==N||e[26]!==C?(j=b.jsx(Ea.Provider,{value:C,children:N}),e[25]=N,e[26]=C,e[27]=j):j=e[27],j},n0=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,layout:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o==="grid";let l;e[5]!==r||e[6]!==i?(l=z("space-y-6",{"md:>*:data-[ox-slot=heading]:[grid-column:1] md:>*:data-[ox-slot=description]:[grid-column:1] md:>div:[grid-column:2] md:grid md:grid-cols-[1fr_2fr] md:gap-x-8 md:gap-y-3":i},r),e[5]=r,e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==n||e[9]!==s||e[10]!==l?(a=b.jsx("div",{className:l,"data-ox-slot":"form-group",...s,children:n}),e[8]=n,e[9]=s,e[10]=l,e[11]=a):a=e[11],a},r0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(ka,{...t}),e[0]=t,e[1]=n):n=e[1],n},s0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Ra,{...t}),e[0]=t,e[1]=n):n=e[1],n},o0=Object.assign(Xb,{Description:Qb,Error:Jb,Field:t0,Group:n0,GroupTitle:r0,Label:s0}),In=k.createContext(null),cn=()=>{const t=k.useContext(In);if(!t)throw new Error("useBaseInputContext must be used within a BaseInput component");return t},St=t=>{const e=I.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o}=cn();let i;e[4]!==r?(i=z("enabled:cursor-pointer","disabled:ox-default-disabled",r),e[4]=r,e[5]=i):i=e[5];let l;return e[6]!==n||e[7]!==o||e[8]!==s||e[9]!==i?(l=b.jsx("button",{className:i,disabled:o,tabIndex:-1,type:"button",...s,"data-ox-slot":"input-button",children:n}),e[6]=n,e[7]=o,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},i0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},Nr=t=>{const e=I.compilerRuntimeExports.c(21);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o,error:i,setShowValidation:l,showValidation:a,validationMessage:d}=cn(),c=a&&!!d,u=!i;let f;e[4]!==r||e[5]!==o||e[6]!==i||e[7]!==u?(f=z("flex h-9 w-full items-center gap-2 rounded-md border bg-transparent px-3 py-1","dark:bg-input/30","text-base shadow-xs md:text-sm",'[&_svg:not([class*="size-"])]:size-4',"transition-[color,box-shadow]","ox-focus-within-ring focus-within:border-ring",{"border-input":u,"border-destructive ring-destructive/20 dark:ring-destructive/40":i,"cursor-not-allowed opacity-50 [&_svg]:opacity-50":o},r),e[4]=r,e[5]=o,e[6]=i,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==n||e[10]!==s||e[11]!==f?(m=b.jsx(Un.Trigger,{asChild:!0,children:b.jsx("div",{className:f,...s,"data-ox-slot":"input-container",children:n})}),e[9]=n,e[10]=s,e[11]=f,e[12]=m):m=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=b.jsx(ue,{className:"text-destructive",icon:ae.CircleAlert,size:"sm"}),e[13]=h):h=e[13];let p;e[14]!==d?(p=b.jsx(Un.Content,{showCloseButton:!1,children:b.jsxs("div",{className:"flex items-center gap-2 text-base text-destructive-foreground md:text-sm",children:[h,d]})}),e[14]=d,e[15]=p):p=e[15];let g;return e[16]!==c||e[17]!==l||e[18]!==m||e[19]!==p?(g=b.jsxs(Un,{closeOnOutsideClick:!0,open:c,side:"bottom",onOpenChange:l,children:[m,p]}),e[16]=c,e[17]=l,e[18]=m,e[19]=p,e[20]=g):g=e[20],g},Ia=k.createContext(null),Gs=()=>{const t=k.useContext(Ia);if(!t)throw new Error("useDateContext must be used within a DateInput component");return t},l0=()=>{const t=I.compilerRuntimeExports.c(10),{close:e,day:n,month:r,setValue:s,year:o}=Gs();let i;t[0]!==n||t[1]!==r||t[2]!==o?(i=n&&r&&o&&o.length===4?`${o}-${r.padStart(2,"0")}-${n.padStart(2,"0")}`:void 0,t[0]=n,t[1]=r,t[2]=o,t[3]=i):i=t[3];const l=i;let a;t[4]!==e||t[5]!==s?(a=u=>{const[f,m,h]=u.split("-");s({day:h,month:m,year:f}),e()},t[4]=e,t[5]=s,t[6]=a):a=t[6];const d=a;let c;return t[7]!==l||t[8]!==d?(c=b.jsx(el,{value:l,onChange:d}),t[7]=l,t[8]=d,t[9]=c):c=t[9],c},a0=t=>{if(!t)return{day:"",month:"",year:""};const[e="",n="",r=""]=t.split("-");return{day:r,month:n,year:e}},Aa=(t,e,n)=>{if(!t&&!e&&!n)return"";const r=t?t.padStart(2,"0"):"",s=e?e.padStart(2,"0"):"";return`${n?n.padStart(4,"0"):""}-${s}-${r}`},c0=(t,e)=>{if(!t)return 31;const n=Number.parseInt(t,10);if(n<1||n>12)return 31;const r=e&&e.length===4?Number.parseInt(e,10):new Date().getFullYear(),s=new Date(r,n-1,1);return pf(s)},d0=t=>t.length===2?Number.parseInt(t,10)<50?`20${t}`:`19${t}`:t,u0=(t,e,n)=>{if(!t||!e||!n||n.length<4)return!1;const r=Aa(t,e,n),s=um(r,"yyyy-MM-dd",new Date);return Wi(s)},f0=t=>{const e=I.compilerRuntimeExports.c(20),{defaultValue:n,onChange:r,value:s}=t,o=n??"";let i;e[0]!==r?(i=x=>r?.(x??""),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==o||e[3]!==i||e[4]!==s?(l={value:s,defaultValue:o,onChange:i},e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5];const[a,d]=I.useControllableState(l);let c;e[6]!==a?(c=a0(a),e[6]=a,e[7]=c):c=e[7];const{day:u,month:f,year:m}=c;let h;e[8]!==u||e[9]!==f||e[10]!==d||e[11]!==m?(h=x=>{const v=x.day??u,y=x.month??f,w=x.year??m,C=Aa(v,y,w);d(C)},e[8]=u,e[9]=f,e[10]=d,e[11]=m,e[12]=h):h=e[12];const p=h;let g;return e[13]!==a||e[14]!==u||e[15]!==f||e[16]!==d||e[17]!==p||e[18]!==m?(g={autoCompleteYear:d0,dateValue:a,day:u,getMaxDayForMonth:c0,isValidCompleteDate:u0,month:f,setDateValue:d,setValue:p,year:m},e[13]=a,e[14]=u,e[15]=f,e[16]=d,e[17]=p,e[18]=m,e[19]=g):g=e[19],g},m0=t=>{const e=I.compilerRuntimeExports.c(70);let n,r,s,o,i,l,a,d,c,u,f,m,h,p,g;e[0]!==t?({children:n,className:r,defaultOpen:o,defaultValue:m,disabled:i,error:a,onChange:d,onOpenChange:c,open:u,pickOnly:h,readOnly:p,required:f,validationMessage:s,value:g,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p,e[15]=g):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14],g=e[15]);const x=m===void 0?"":m,v=h===void 0?!1:h,y=p===void 0?!1:p,w=He(),C=i??w?.disabled??!1,O=a??!!w?.error,S=f??w?.required??!1,E=y||v;let R;e[16]!==d?(R=ee=>d?.(ee??""),e[16]=d,e[17]=R):R=e[17];let N;e[18]!==x||e[19]!==R||e[20]!==g?(N={value:g,defaultValue:x,onChange:R},e[18]=x,e[19]=R,e[20]=g,e[21]=N):N=e[21];const{autoCompleteYear:j,day:D,getMaxDayForMonth:P,isValidCompleteDate:M,month:L,setValue:_,year:T}=f0(N);let A;e[22]!==o||e[23]!==C||e[24]!==c||e[25]!==u?(A={closeOnEscape:!0,closeOnOutsideClick:!0,defaultOpen:o,disabled:C,onOpenChange:c,open:u},e[22]=o,e[23]=C,e[24]=c,e[25]=u,e[26]=A):A=e[26];const{close:V,containerRef:$,isClosing:F,isVisible:W,open:B,toggle:H}=I.usePopperState(A),[G,U]=k.useState(s??""),[Y,Q]=k.useState(!!s),X=w?.id;let K;e[27]!==O||e[28]!==C||e[29]!==S||e[30]!==Y||e[31]!==X||e[32]!==G?(K={disabled:C,error:O,id:X,required:S,setShowValidation:Q,setValidationMessage:U,showValidation:Y,validationMessage:G},e[27]=O,e[28]=C,e[29]=S,e[30]=Y,e[31]=X,e[32]=G,e[33]=K):K=e[33];let J;e[34]!==j||e[35]!==V||e[36]!==D||e[37]!==E||e[38]!==P||e[39]!==B||e[40]!==M||e[41]!==L||e[42]!==v||e[43]!==_||e[44]!==H||e[45]!==T?(J={autoCompleteYear:j,close:V,day:D,getMaxDayForMonth:P,isValidCompleteDate:M,month:L,open:B,pickOnly:v,readOnly:E,setValue:_,toggle:H,year:T},e[34]=j,e[35]=V,e[36]=D,e[37]=E,e[38]=P,e[39]=B,e[40]=M,e[41]=L,e[42]=v,e[43]=_,e[44]=H,e[45]=T,e[46]=J):J=e[46];let q;e[47]!==r?(q=z("w-fit",r),e[47]=r,e[48]=q):q=e[48];let ne;e[49]!==n||e[50]!==l?(ne=b.jsx(Nr,{...l,children:n}),e[49]=n,e[50]=l,e[51]=ne):ne=e[51];let Z;e[52]!==q||e[53]!==ne?(Z=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx("div",{className:q,children:ne})}),e[52]=q,e[53]=ne,e[54]=Z):Z=e[54];let te;e[55]!==F||e[56]!==W?(te=W&&b.jsx(Bt,{children:b.jsx(Se.Content,{align:"center",className:"ox-date-input-animate","data-ox-state":F?"closing":"open",side:"bottom",sideOffset:8,children:b.jsx(l0,{})})}),e[55]=F,e[56]=W,e[57]=te):te=e[57];let le;e[58]!==Z||e[59]!==te?(le=b.jsxs(Se,{children:[Z,te]}),e[58]=Z,e[59]=te,e[60]=le):le=e[60];let ce;e[61]!==$||e[62]!==le?(ce=b.jsx("div",{ref:$,children:le}),e[61]=$,e[62]=le,e[63]=ce):ce=e[63];let fe;e[64]!==ce||e[65]!==J?(fe=b.jsx(Ia.Provider,{value:J,children:ce}),e[64]=ce,e[65]=J,e[66]=fe):fe=e[66];let he;return e[67]!==fe||e[68]!==K?(he=b.jsx(In.Provider,{value:K,children:fe}),e[67]=fe,e[68]=K,e[69]=he):he=e[69],he},Ft=t=>{const e=I.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({className:n,id:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=k.useId(),{disabled:i,error:l,id:a,required:d,setShowValidation:c,setValidationMessage:u}=cn();let f;e[4]!==c||e[5]!==u?(f=v=>{v.preventDefault(),u(v.currentTarget.validationMessage),c(!0)},e[4]=c,e[5]=u,e[6]=f):f=e[6];const m=f,h=s??a??o;let p;e[7]!==n?(p=z("w-full min-w-10 appearance-none bg-transparent outline-none","placeholder:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50",n),e[7]=n,e[8]=p):p=e[8];let g;e[9]!==c?(g=()=>c(!1),e[9]=c,e[10]=g):g=e[10];let x;return e[11]!==i||e[12]!==r||e[13]!==l||e[14]!==m||e[15]!==h||e[16]!==d||e[17]!==p||e[18]!==g?(x=b.jsx("input",{id:h,"aria-invalid":l,"aria-required":d,className:p,disabled:i,required:d,onInput:g,onInvalid:m,...r,"data-ox-slot":"input"}),e[11]=i,e[12]=r,e[13]=l,e[14]=m,e[15]=h,e[16]=d,e[17]=p,e[18]=g,e[19]=x):x=e[19],x},Xr=it(["text-center","[appearance:textfield]","[&::-webkit-inner-spin-button]:appearance-none","[&::-webkit-outer-spin-button]:appearance-none"],{variants:{type:{day:"w-6 min-w-6",month:"w-6 min-w-6",year:"w-10 min-w-10"},pickOnly:{true:"enabled:cursor-pointer",false:""}}}),ai=it("text-muted-foreground",{variants:{disabled:{true:"opacity-50",false:""}}}),p0=()=>{const t=I.compilerRuntimeExports.c(92),{disabled:e,setValidationMessage:n}=cn(),{autoCompleteYear:r,day:s,getMaxDayForMonth:o,isValidCompleteDate:i,month:l,open:a,pickOnly:d,readOnly:c,setValue:u,toggle:f,year:m}=Gs(),h=k.useRef(null),p=k.useRef(null),g=k.useRef(null);let x;t[0]!==s||t[1]!==o||t[2]!==l||t[3]!==u||t[4]!==m?(x=ee=>{const ie=o(l,m);let oe;s?oe=Number.parseInt(s,10):ee===1?oe=0:oe=ie+1;let me;ee===1?me=oe>=ie?1:oe+1:me=oe<=1?ie:oe-1,u({day:String(me)})},t[0]=s,t[1]=o,t[2]=l,t[3]=u,t[4]=m,t[5]=x):x=t[5];const v=x;let y;t[6]!==s||t[7]!==o||t[8]!==l||t[9]!==u||t[10]!==m?(y=ee=>{let ie;l?ie=Number.parseInt(l,10):ee===1?ie=0:ie=13;let oe;ee===1?oe=ie>=12?1:ie+1:oe=ie<=1?12:ie-1;const me=o(String(oe),m);(s?Number.parseInt(s,10):0)>me?u({day:String(me),month:String(oe)}):u({month:String(oe)})},t[6]=s,t[7]=o,t[8]=l,t[9]=u,t[10]=m,t[11]=y):y=t[11];const w=y;let C;t[12]!==o||t[13]!==l||t[14]!==u||t[15]!==m?(C=ee=>{const ie=ee.target.value,oe=o(l,m);(ie===""||/^\d{1,2}$/.test(ie)&&Number.parseInt(ie,10)<=oe)&&u({day:ie})},t[12]=o,t[13]=l,t[14]=u,t[15]=m,t[16]=C):C=t[16];const O=C;let S;t[17]!==u?(S=ee=>{const ie=ee.target.value;(ie===""||/^\d{1,2}$/.test(ie)&&Number.parseInt(ie,10)<=12)&&u({month:ie})},t[17]=u,t[18]=S):S=t[18];const E=S;let R;t[19]!==u?(R=ee=>{const ie=ee.target.value;(ie===""||/^\d{1,4}$/.test(ie)&&Number.parseInt(ie,10)<=2100)&&u({year:ie})},t[19]=u,t[20]=R):R=t[20];const N=R;let j;t[21]!==v?(j=ee=>{ee.key==="ArrowUp"?(ee.preventDefault(),v(1)):ee.key==="ArrowDown"?(ee.preventDefault(),v(-1)):(ee.key==="Tab"&&!ee.shiftKey||ee.key==="Enter"||ee.key==="-")&&(ee.preventDefault(),p.current?.focus())},t[21]=v,t[22]=j):j=t[22];const D=j;let P;t[23]!==w||t[24]!==l?(P=ee=>{ee.key==="ArrowUp"?(ee.preventDefault(),w(1)):ee.key==="ArrowDown"?(ee.preventDefault(),w(-1)):ee.key==="Tab"&&ee.shiftKey?(ee.preventDefault(),h.current?.focus()):ee.key==="Tab"&&!ee.shiftKey||ee.key==="Enter"||ee.key==="-"?(ee.preventDefault(),g.current?.focus()):ee.key==="Backspace"&&l===""&&h.current?.focus()},t[23]=w,t[24]=l,t[25]=P):P=t[25];const M=P;let L;t[26]!==m?(L=ee=>{ee.key==="Tab"&&ee.shiftKey?(ee.preventDefault(),p.current?.focus()):ee.key==="Backspace"&&m===""&&p.current?.focus()},t[26]=m,t[27]=L):L=t[27];const _=L;let T;t[28]!==s||t[29]!==i||t[30]!==l||t[31]!==n||t[32]!==m?(T=()=>{s&&l&&m?i(s,l,m)?n(""):n("Invalid date"):n("")},t[28]=s,t[29]=i,t[30]=l,t[31]=n,t[32]=m,t[33]=T):T=t[33];const A=T;let V;t[34]!==A?(V=()=>{A()},t[34]=A,t[35]=V):V=t[35];const $=V;let F;t[36]!==A?(F=()=>{A()},t[36]=A,t[37]=F):F=t[37];const W=F;let B;t[38]!==r||t[39]!==u||t[40]!==A||t[41]!==m?(B=()=>{if(m.length===2){const ee=r(m);u({year:ee})}A()},t[38]=r,t[39]=u,t[40]=A,t[41]=m,t[42]=B):B=t[42];const H=B;let G;t[43]!==a||t[44]!==d||t[45]!==f?(G=()=>{d&&!a&&f()},t[43]=a,t[44]=d,t[45]=f,t[46]=G):G=t[46];const U=G,Y=d&&!e;let Q;t[47]!==Y?(Q=z("flex items-center gap-1 bg-transparent font-mono",{"cursor-pointer":Y}),t[47]=Y,t[48]=Q):Q=t[48];let X;t[49]!==d?(X=Xr({type:"day",pickOnly:d}),t[49]=d,t[50]=X):X=t[50];let K;t[51]!==s||t[52]!==$||t[53]!==O||t[54]!==D||t[55]!==c||t[56]!==X?(K=b.jsx(Ft,{"aria-label":"Day",autoComplete:"off",className:X,inputMode:"numeric",max:"31",min:"0",pattern:"[0-9]*",placeholder:"dd",readOnly:c,ref:h,type:"number",value:s,onBlur:$,onChange:O,onKeyDown:D}),t[51]=s,t[52]=$,t[53]=O,t[54]=D,t[55]=c,t[56]=X,t[57]=K):K=t[57];let J;t[58]!==e?(J=ai({disabled:e}),t[58]=e,t[59]=J):J=t[59];let q;t[60]!==J?(q=b.jsx("span",{className:J,children:"-"}),t[60]=J,t[61]=q):q=t[61];let ne;t[62]!==d?(ne=Xr({type:"month",pickOnly:d}),t[62]=d,t[63]=ne):ne=t[63];let Z;t[64]!==W||t[65]!==E||t[66]!==M||t[67]!==l||t[68]!==c||t[69]!==ne?(Z=b.jsx(Ft,{"aria-label":"Month",autoComplete:"off",className:ne,inputMode:"numeric",max:"12",min:"0",pattern:"[0-9]*",placeholder:"mm",readOnly:c,ref:p,type:"number",value:l,onBlur:W,onChange:E,onKeyDown:M}),t[64]=W,t[65]=E,t[66]=M,t[67]=l,t[68]=c,t[69]=ne,t[70]=Z):Z=t[70];let te;t[71]!==e?(te=ai({disabled:e}),t[71]=e,t[72]=te):te=t[72];let le;t[73]!==te?(le=b.jsx("span",{className:te,children:"-"}),t[73]=te,t[74]=le):le=t[74];let ce;t[75]!==d?(ce=Xr({type:"year",pickOnly:d}),t[75]=d,t[76]=ce):ce=t[76];let fe;t[77]!==H||t[78]!==N||t[79]!==_||t[80]!==c||t[81]!==ce||t[82]!==m?(fe=b.jsx(Ft,{"aria-label":"Year",autoComplete:"off",className:ce,inputMode:"numeric",max:"2100",min:"0",pattern:"[0-9]*",placeholder:"yyyy",readOnly:c,ref:g,type:"number",value:m,onBlur:H,onChange:N,onKeyDown:_}),t[77]=H,t[78]=N,t[79]=_,t[80]=c,t[81]=ce,t[82]=m,t[83]=fe):fe=t[83];let he;return t[84]!==U||t[85]!==Q||t[86]!==K||t[87]!==q||t[88]!==Z||t[89]!==le||t[90]!==fe?(he=b.jsxs("div",{className:Q,"data-ox-slot":"input-date",onClick:U,children:[K,q,Z,le,fe]}),t[84]=U,t[85]=Q,t[86]=K,t[87]=q,t[88]=Z,t[89]=le,t[90]=fe,t[91]=he):he=t[91],he},h0=t=>{const e=I.compilerRuntimeExports.c(6);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];const{toggle:r}=Gs();let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=b.jsx(ue,{icon:ae.Calendar}),e[2]=s):s=e[2];let o;return e[3]!==n||e[4]!==r?(o=b.jsx(St,{onClick:r,...n,children:s}),e[3]=n,e[4]=r,e[5]=o):o=e[5],o},g0=Object.assign(p0,{Button:i0,Container:m0,PickerButton:h0}),x0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},_a=k.createContext(null),b0=t=>{const e=I.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a,d,c,u,f,m,h,p,g,x;e[0]!==t?({children:n,defaultValue:s,disabled:o,error:l,locale:h,max:a,maximumFractionDigits:d,min:c,minimumFractionDigits:u,onChange:f,required:m,steps:p,useGrouping:g,validationMessage:r,value:x,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p,e[15]=g,e[16]=x):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14],g=e[15],x=e[16]);const v=h===void 0?"en-US":h,y=p===void 0?1:p,w=g===void 0?!0:g,C=He(),O=o??C?.disabled??!1,S=l??!!C?.error,E=m??C?.required??!1,R=k.useId(),N=new Intl.NumberFormat(v,{useGrouping:w!==!1,minimumFractionDigits:u,maximumFractionDigits:d});let j;e[17]!==f?(j=q=>f?.(q),e[17]=f,e[18]=j):j=e[18];let D;e[19]!==s||e[20]!==j||e[21]!==x?(D={value:x,onChange:j,defaultValue:s,name:"OxNumberInput"},e[19]=s,e[20]=j,e[21]=x,e[22]=D):D=e[22];const[P,M]=I.useControllableState(D),[L,_]=k.useState(P!==void 0?N.format(P):""),[T,A]=k.useState(r??""),[V,$]=k.useState(!!r),F=v0;let W;e[23]!==a||e[24]!==c?(W=q=>I.clamp(q,c??-1/0,a??1/0),e[23]=a,e[24]=c,e[25]=W):W=e[25];const B=W,H=q=>{let ne=F(L);ne===void 0&&(ne=P!==void 0?P:0);const Z=B(ne),te=B(Z+q);M(te),_(N.format(te))};let G;e[26]!==H||e[27]!==y?(G=()=>H(y),e[26]=H,e[27]=y,e[28]=G):G=e[28];const U=G;let Y;e[29]!==H||e[30]!==y?(Y=()=>H(-y),e[29]=H,e[30]=y,e[31]=Y):Y=e[31];const Q=Y,X=C?.id;let K;e[32]!==S||e[33]!==O||e[34]!==E||e[35]!==V||e[36]!==X||e[37]!==T?(K={disabled:O,error:S,id:X,required:E,setShowValidation:$,setValidationMessage:A,showValidation:V,validationMessage:T},e[32]=S,e[33]=O,e[34]=E,e[35]=V,e[36]=X,e[37]=T,e[38]=K):K=e[38];let J;return e[39]!==n||e[40]!==i?(J=b.jsx(Nr,{...i,children:n}),e[39]=n,e[40]=i,e[41]=J):J=e[41],b.jsx(In.Provider,{value:K,children:b.jsx(_a.Provider,{value:{clampValue:B,displayValue:L,formatter:N,handleDecrement:Q,handleIncrement:U,inputId:R,internalValue:P,max:a,min:c,parse:F,setDisplayValue:_,setInternalValue:M,steps:y},children:J})})};function v0(t){if(!t.trim())return;const e=t.replaceAll(/[^\d.-]/g,""),n=Number.parseFloat(e);return!Number.isNaN(n)&&Number.isFinite(n)?n:void 0}const Us=()=>{const t=k.useContext(_a);if(!t)throw new Error("useNumberContext must be used within a Number component");return t},y0=()=>{const t=I.compilerRuntimeExports.c(4),{handleDecrement:e,inputId:n}=Us();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=b.jsx(ue,{icon:ae.Minus}),t[0]=r):r=t[0];let s;return t[1]!==e||t[2]!==n?(s=b.jsx(St,{"aria-controls":n,"aria-label":"Decrease value",onClick:e,children:r}),t[1]=e,t[2]=n,t[3]=s):s=t[3],s},w0=()=>{const t=I.compilerRuntimeExports.c(4),{handleIncrement:e,inputId:n}=Us();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=b.jsx(ue,{icon:ae.Plus}),t[0]=r):r=t[0];let s;return t[1]!==e||t[2]!==n?(s=b.jsx(St,{"aria-controls":n,"aria-label":"Increase value",onClick:e,children:r}),t[1]=e,t[2]=n,t[3]=s):s=t[3],s},C0=t=>{const e=t.nativeEvent,n=t.target,r=n.value.slice(0,n.selectionStart??void 0)+(e.data??"")+n.value.slice(n.selectionEnd??void 0);!/^-?[\d.,]*$/.test(r)&&r!==""&&t.preventDefault()},O0=t=>{const e=I.compilerRuntimeExports.c(42);let n,r,s,o;e[0]!==t?({"aria-label":n,"aria-labelledby":r,className:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{clampValue:i,displayValue:l,formatter:a,handleDecrement:d,handleIncrement:c,inputId:u,internalValue:f,max:m,min:h,parse:p,setDisplayValue:g,setInternalValue:x}=Us(),[v,y]=k.useState(!1);let w;e[5]!==g?(w=L=>{g(L.target.value)},e[5]=g,e[6]=w):w=e[6];const C=w;let O;e[7]!==i||e[8]!==l||e[9]!==a||e[10]!==p||e[11]!==g||e[12]!==x?(O=()=>{const L=p(l);if(L!==void 0){const _=i(L);x(_),g(a.format(_))}else x(void 0),g("")},e[7]=i,e[8]=l,e[9]=a,e[10]=p,e[11]=g,e[12]=x,e[13]=O):O=e[13];const S=O;let E;e[14]!==a||e[15]!==p||e[16]!==g||e[17]!==x?(E=L=>{const _=L.clipboardData.getData("text"),T=p(_);T!==void 0&&(L.preventDefault(),g(a.format(T)),x(T))},e[14]=a,e[15]=p,e[16]=g,e[17]=x,e[18]=E):E=e[18];const R=E;let N;e[19]!==S||e[20]!==d||e[21]!==c||e[22]!==v?(N={onArrowDown:d,onArrowUp:c,onEnter:S,enabled:v,allowRepeat:!0},e[19]=S,e[20]=d,e[21]=c,e[22]=v,e[23]=N):N=e[23],I.useKeyboard(N);let j;e[24]!==s?(j=z("text-center font-mono",s),e[24]=s,e[25]=j):j=e[25];let D;e[26]!==S?(D=()=>{y(!1),S()},e[26]=S,e[27]=D):D=e[27];let P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=()=>y(!0),e[28]=P):P=e[28];let M;return e[29]!==n||e[30]!==r||e[31]!==l||e[32]!==o||e[33]!==C||e[34]!==R||e[35]!==u||e[36]!==f||e[37]!==m||e[38]!==h||e[39]!==j||e[40]!==D?(M=b.jsx(Ft,{id:u,"aria-label":n,"aria-labelledby":r,"aria-valuemax":m,"aria-valuemin":h,"aria-valuenow":f,autoComplete:"off",className:j,inputMode:"decimal",role:"spinbutton",type:"text",value:l,onBeforeInput:C0,onBlur:D,onChange:C,onFocus:P,onPaste:R,...o}),e[29]=n,e[30]=r,e[31]=l,e[32]=o,e[33]=C,e[34]=R,e[35]=u,e[36]=f,e[37]=m,e[38]=h,e[39]=j,e[40]=D,e[41]=M):M=e[41],M},E0=Object.assign(O0,{Button:x0,Container:b0,DecrementButton:y0,IncrementButton:w0}),S0=t=>{switch(t){case"numeric":return{inputMode:"numeric",pattern:"[0-9]*"};case"alphanumeric":return{inputMode:"text",pattern:"[A-Z0-9]*"};default:return{inputMode:"text"}}},k0=(t,e)=>{switch(e){case"numeric":return t.replaceAll(/[^0-9]/g,"");case"alphanumeric":return t.replaceAll(/[^A-Z0-9]/gi,"").toUpperCase();default:return t}},R0=t=>{const e=I.compilerRuntimeExports.c(23),{className:n,disabled:r,error:s,length:o,onComplete:i,onValueChange:l,placeholder:a,type:d}=t,c=r===void 0?!1:r,u=s===void 0?!1:s,f=o===void 0?6:o,m=a===void 0?"":a,h=d===void 0?"numeric":d,p=k.useId();let g;e[0]!==f?(g=()=>Array.from({length:f},N0),e[0]=f,e[1]=g):g=e[1];const[x,v]=k.useState(g);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[2]=y):y=e[2];const w=k.useRef(y);let C;e[3]!==h?(C=S0(h),e[3]=h,e[4]=C):C=e[4];const O=C;let S,E;e[5]!==f?(E=()=>{w.current=w.current.slice(0,f)},S=[f],e[5]=f,e[6]=S,e[7]=E):(S=e[6],E=e[7]),k.useEffect(E,S);let R;e[8]===Symbol.for("react.memo_cache_sentinel")?(R=D=>rt.flushSync(()=>{v(D)}),e[8]=R):R=e[8];const N=R;let j;if(e[9]!==p||e[10]!==n||e[11]!==x||e[12]!==c||e[13]!==u||e[14]!==f||e[15]!==i||e[16]!==l||e[17]!==m||e[18]!==h||e[19]!==O){const D=(_,T)=>{const A=k0(T,h),V=[...x];V[_]=A[0]||"";const $=V[_]&&_<f-1?_+1:void 0;N(V),$!==void 0&&w.current[$]?.focus();const F=V.filter(j0),W=F.join("");l?.(W),F.length===f&&i?.(W)},P=(_,T)=>{const A=[...x];if(T.key==="Backspace"){if(x[_]){A[_]="",N(A);const V=A.filter(D0);l?.(V.join(""))}else if(_>0){A[_-1]="",N(A),w.current[_-1]?.focus();const V=A.filter(P0);l?.(V.join(""))}}T.key==="ArrowLeft"&&_>0&&w.current[_-1]?.focus(),T.key==="ArrowRight"&&_<f-1&&w.current[_+1]?.focus()},M=_=>{w.current[_]?.select()};let L;e[21]!==n?(L=z("inline-flex gap-2 font-mono",n),e[21]=n,e[22]=L):L=e[22],j=b.jsx("div",{className:L,"data-ox-slot":"otp-input",children:Array.from({length:f},(_,T)=>{const A=T===0||x.slice(0,T).every(T0),V=c||!A;return b.jsx("input",{id:`${p}-digit-${T}`,"aria-disabled":V,"aria-invalid":u,"aria-label":`Digit ${T+1} of ${f}`,autoComplete:"one-time-code",className:z("size-9 rounded-md border border-input bg-transparent text-center shadow-xs transition-[color,box-shadow]","dark:bg-input/30","ox-focus-ring focus-visible:border-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40"),"data-ox-slot":"otp-digit",disabled:V,maxLength:1,placeholder:m,ref:$=>{w.current[T]=$},type:"text",value:x[T],onChange:$=>D(T,$.target.value),onFocus:()=>M(T),onKeyDown:$=>P(T,$),onPaste:M0,...O},T)})}),e[9]=p,e[10]=n,e[11]=x,e[12]=c,e[13]=u,e[14]=f,e[15]=i,e[16]=l,e[17]=m,e[18]=h,e[19]=O,e[20]=j}else j=e[20];return j};function N0(){return""}function j0(t){return t!==""}function D0(t){return t!==""}function P0(t){return t!==""}function T0(t){return t!==""}function M0(t){return t.preventDefault()}const I0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},$a=k.createContext(null),Ks=()=>{const t=k.useContext($a);if(!t)throw new Error("useTextContext must be used within a Text component");return t},A0=()=>{const t=I.compilerRuntimeExports.c(6),{handleClear:e,internalValue:n}=Ks(),r=!n;let s;t[0]!==r?(s=z({invisible:r}),t[0]=r,t[1]=s):s=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(ue,{icon:ae.X}),t[2]=o):o=t[2];let i;return t[3]!==e||t[4]!==s?(i=b.jsx(St,{"aria-label":"Clear input",className:s,onClick:e,children:o}),t[3]=e,t[4]=s,t[5]=i):i=t[5],i},_0=t=>{const e=I.compilerRuntimeExports.c(47);let n,r,s,o,i,l,a,d,c,u,f;e[0]!==t?({children:n,className:r,defaultValue:o,disabled:i,error:a,onChange:d,required:c,type:u,validationMessage:s,value:f,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11]);const m=u===void 0?"text":u,h=He(),p=i??h?.disabled??!1,g=a??!!h?.error,x=c??h?.required??!1,v=k.useRef(null);let y;e[12]!==d?(y=U=>{d?.(U??"")},e[12]=d,e[13]=y):y=e[13];let w;e[14]!==o||e[15]!==y||e[16]!==f?(w={defaultValue:o,name:"OxTextInput",onChange:y,value:f},e[14]=o,e[15]=y,e[16]=f,e[17]=w):w=e[17];const[C,O]=I.useControllableState(w),S=C??"";let E;e[18]!==O?(E=U=>O(U),e[18]=O,e[19]=E):E=e[19];const R=E,[N,j]=k.useState(m),[D,P]=k.useState(s??""),[M,L]=k.useState(!!s);let _;e[20]!==R?(_=()=>{R(""),v.current?.focus()},e[20]=R,e[21]=_):_=e[21];const T=_;let A;e[22]!==N?(A=()=>{N==="password"?j("text"):N==="text"&&j("password")},e[22]=N,e[23]=A):A=e[23];const V=A,$=h?.id;let F;e[24]!==g||e[25]!==p||e[26]!==x||e[27]!==M||e[28]!==$||e[29]!==D?(F={disabled:p,error:g,id:$,required:x,setShowValidation:L,setValidationMessage:P,showValidation:M,validationMessage:D},e[24]=g,e[25]=p,e[26]=x,e[27]=M,e[28]=$,e[29]=D,e[30]=F):F=e[30];let W;e[31]!==N||e[32]!==T||e[33]!==V||e[34]!==S||e[35]!==R?(W={handleClear:T,handleTypeToggle:V,inputRef:v,internalValue:S,setInternalValue:R,type:N},e[31]=N,e[32]=T,e[33]=V,e[34]=S,e[35]=R,e[36]=W):W=e[36];let B;e[37]!==n||e[38]!==r||e[39]!==l?(B=b.jsx(Nr,{className:r,...l,children:n}),e[37]=n,e[38]=r,e[39]=l,e[40]=B):B=e[40];let H;e[41]!==B||e[42]!==W?(H=b.jsx($a.Provider,{value:W,children:B}),e[41]=B,e[42]=W,e[43]=H):H=e[43];let G;return e[44]!==H||e[45]!==F?(G=b.jsx(In.Provider,{value:F,children:H}),e[44]=H,e[45]=F,e[46]=G):G=e[46],G},$0=t=>{const e=I.compilerRuntimeExports.c(14);let n,r,s,o,i;e[0]!==t?({className:n,currentLength:o,disabled:i,maxLength:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?0:o,a=i===void 0?!1:i;let d;e[6]!==n?(d=z("mt-1 text-right font-mono text-xs text-muted-foreground tabular-nums","aria-disabled:ox-default-disabled",n),e[6]=n,e[7]=d):d=e[7];let c;return e[8]!==l||e[9]!==a||e[10]!==r||e[11]!==s||e[12]!==d?(c=b.jsxs("div",{"aria-disabled":a,className:d,...r,"data-ox-slot":"input-counter",children:[l,"/",s]}),e[8]=l,e[9]=a,e[10]=r,e[11]=s,e[12]=d,e[13]=c):c=e[13],c},L0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx($0,{...t}),e[0]=t,e[1]=n):n=e[1],n},z0=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i,l,a;e[0]!==t?({autoComplete:n,className:r,id:o,maxLength:i,placeholder:l,spellCheck:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const d=a===void 0?!1:a,{disabled:c,error:u,required:f}=cn(),{inputRef:m,internalValue:h,setInternalValue:p,type:g}=Ks();let x;e[8]!==p?(x=w=>{p(w.target.value)},e[8]=p,e[9]=x):x=e[9];const v=x;let y;return e[10]!==n||e[11]!==r||e[12]!==c||e[13]!==s||e[14]!==u||e[15]!==v||e[16]!==o||e[17]!==m||e[18]!==h||e[19]!==i||e[20]!==l||e[21]!==f||e[22]!==d||e[23]!==g?(y=b.jsx(Ft,{id:o,"aria-invalid":u,"aria-required":f,autoComplete:n,className:r,disabled:c,maxLength:i,placeholder:l,ref:m,required:f,spellCheck:d,type:g,value:h,onChange:v,...s}),e[10]=n,e[11]=r,e[12]=c,e[13]=s,e[14]=u,e[15]=v,e[16]=o,e[17]=m,e[18]=h,e[19]=i,e[20]=l,e[21]=f,e[22]=d,e[23]=g,e[24]=y):y=e[24],y},F0=()=>{const t=I.compilerRuntimeExports.c(6),{handleTypeToggle:e,type:n}=Ks(),r=n==="text",s=r?"Hide password":"Show password",o=r?ae.EyeOff:ae.Eye;let i;t[0]!==o?(i=b.jsx(ue,{icon:o}),t[0]=o,t[1]=i):i=t[1];let l;return t[2]!==e||t[3]!==s||t[4]!==i?(l=b.jsx(St,{"aria-label":s,onClick:e,children:i}),t[2]=e,t[3]=s,t[4]=i,t[5]=l):l=t[5],l},V0=Object.assign(z0,{Button:I0,ClearButton:A0,Container:_0,Counter:L0,VisibilityButton:F0}),B0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},La=k.createContext(null),W0=t=>{if(!t)return{hours:"",minutes:""};const[e="",n=""]=t.split(":");return{hours:e,minutes:n}},ci=(t,e)=>{if(!t&&!e)return"";const n=t?t.padStart(2,"0"):"",r=e?e.padStart(2,"0"):"";return`${n}:${r}`},H0=t=>{const e=I.compilerRuntimeExports.c(21),{defaultValue:n,onChange:r,value:s}=t,o=n??"";let i;e[0]!==r?(i=v=>r?.(v??""),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==o||e[3]!==i||e[4]!==s?(l={defaultValue:o,name:"OxTimeInput",onChange:i,value:s},e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5];const[a,d]=I.useControllableState(l);let c;e[6]!==a?(c=W0(a),e[6]=a,e[7]=c):c=e[7];const{hours:u,minutes:f}=c;let m;e[8]!==f||e[9]!==d?(m=v=>{const y=ci(v,f);d(y)},e[8]=f,e[9]=d,e[10]=m):m=e[10];const h=m;let p;e[11]!==u||e[12]!==d?(p=v=>{const y=ci(u,v);d(y)},e[11]=u,e[12]=d,e[13]=p):p=e[13];const g=p;let x;return e[14]!==u||e[15]!==f||e[16]!==h||e[17]!==g||e[18]!==d||e[19]!==a?(x={hours:u,minutes:f,setHours:h,setMinutes:g,timeValue:a,setTimeValue:d},e[14]=u,e[15]=f,e[16]=h,e[17]=g,e[18]=d,e[19]=a,e[20]=x):x=e[20],x},Y0=t=>{const e=I.compilerRuntimeExports.c(39);let n,r,s,o,i,l,a,d,c,u;e[0]!==t?({children:n,className:r,defaultValue:c,disabled:o,error:l,onChange:a,required:d,validationMessage:s,value:u,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10]);const f=c===void 0?"":c,m=He(),h=o??m?.disabled??!1,p=l??!!m?.error,g=d??m?.required??!1;let x;e[11]!==f||e[12]!==a||e[13]!==u?(x={value:u,defaultValue:f,onChange:a},e[11]=f,e[12]=a,e[13]=u,e[14]=x):x=e[14];const{hours:v,minutes:y,setHours:w,setMinutes:C}=H0(x),[O,S]=k.useState(s??""),[E,R]=k.useState(!!s),N=m?.id;let j;e[15]!==p||e[16]!==h||e[17]!==g||e[18]!==E||e[19]!==N||e[20]!==O?(j={disabled:h,error:p,id:N,required:g,setShowValidation:R,setValidationMessage:S,showValidation:E,validationMessage:O},e[15]=p,e[16]=h,e[17]=g,e[18]=E,e[19]=N,e[20]=O,e[21]=j):j=e[21];let D;e[22]!==v||e[23]!==y||e[24]!==w||e[25]!==C?(D={hours:v,minutes:y,setHours:w,setMinutes:C},e[22]=v,e[23]=y,e[24]=w,e[25]=C,e[26]=D):D=e[26];let P;e[27]!==r?(P=z("w-fit",r),e[27]=r,e[28]=P):P=e[28];let M;e[29]!==n||e[30]!==i||e[31]!==P?(M=b.jsx(Nr,{className:P,...i,children:n}),e[29]=n,e[30]=i,e[31]=P,e[32]=M):M=e[32];let L;e[33]!==D||e[34]!==M?(L=b.jsx(La.Provider,{value:D,children:M}),e[33]=D,e[34]=M,e[35]=L):L=e[35];let _;return e[36]!==j||e[37]!==L?(_=b.jsx(In.Provider,{value:j,children:L}),e[36]=j,e[37]=L,e[38]=_):_=e[38],_},q0=()=>{const t=k.useContext(La);if(!t)throw new Error("useTimeContext must be used within a TimeInput component");return t},di=["w-8 min-w-8 text-center","[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"],G0=()=>{const t=I.compilerRuntimeExports.c(24),{hours:e,minutes:n,setHours:r,setMinutes:s}=q0(),{disabled:o}=cn(),i=k.useRef(null),l=k.useRef(null);let a;t[0]!==r?(a=S=>{const E=S.target.value;(E===""||/^\d{1,2}$/.test(E)&&Number.parseInt(E,10)<=23)&&r(E)},t[0]=r,t[1]=a):a=t[1];const d=a;let c;t[2]!==s?(c=S=>{const E=S.target.value;(E===""||/^\d{1,2}$/.test(E)&&Number.parseInt(E,10)<=59)&&s(E)},t[2]=s,t[3]=c):c=t[3];const u=c;let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=S=>{(S.key==="Tab"||S.key==="Enter"||S.key===":")&&(S.preventDefault(),l.current?.focus())},t[4]=f):f=t[4];const m=f;let h;t[5]!==n?(h=S=>{S.key==="Backspace"&&n===""&&i.current?.focus()},t[5]=n,t[6]=h):h=t[6];const p=h;let g;t[7]===Symbol.for("react.memo_cache_sentinel")?(g=z(di),t[7]=g):g=t[7];let x;t[8]!==d||t[9]!==e?(x=b.jsx(Ft,{autoComplete:"off",className:g,max:"23",min:"0",placeholder:"hh",ref:i,type:"number",value:e,onChange:d,onKeyDown:m}),t[8]=d,t[9]=e,t[10]=x):x=t[10];let v;t[11]!==o?(v=z("text-muted-foreground",{"opacity-50":o}),t[11]=o,t[12]=v):v=t[12];let y;t[13]!==v?(y=b.jsx("span",{className:v,children:":"}),t[13]=v,t[14]=y):y=t[14];let w;t[15]===Symbol.for("react.memo_cache_sentinel")?(w=z(di),t[15]=w):w=t[15];let C;t[16]!==u||t[17]!==p||t[18]!==n?(C=b.jsx(Ft,{autoComplete:"off",className:w,max:"59",min:"0",placeholder:"mm",ref:l,type:"number",value:n,onChange:u,onKeyDown:p}),t[16]=u,t[17]=p,t[18]=n,t[19]=C):C=t[19];let O;return t[20]!==x||t[21]!==y||t[22]!==C?(O=b.jsxs("div",{className:"flex items-center gap-1 bg-transparent font-mono","data-ox-slot":"input-time",children:[x,y,C]}),t[20]=x,t[21]=y,t[22]=C,t[23]=O):O=t[23],O},U0=Object.assign(G0,{Button:B0,Container:Y0}),za=k.createContext(void 0),K0=t=>{const e=I.compilerRuntimeExports.c(31);let n,r,s,o,i,l,a,d,c,u;e[0]!==t?({children:n,className:r,defaultValue:o,disabled:i,error:a,name:d,onChange:c,required:u,value:s,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10]);const f=He(),m=i??f?.disabled??!1,h=a??!!f?.error,p=u??f?.required??!1,[g,x]=k.useState(o),v=s!==void 0,y=v?s:g;let w;e[11]!==v||e[12]!==c?(w=j=>{v||x(j),c?.(j)},e[11]=v,e[12]=c,e[13]=w):w=e[13];const C=w;let O;e[14]!==y||e[15]!==C||e[16]!==m||e[17]!==d?(O={value:y,onChange:C,name:d,disabled:m},e[14]=y,e[15]=C,e[16]=m,e[17]=d,e[18]=O):O=e[18];const S=f?.labelId;let E;e[19]!==r?(E=z("space-y-2",r),e[19]=r,e[20]=E):E=e[20];let R;e[21]!==n||e[22]!==l||e[23]!==h||e[24]!==p||e[25]!==S||e[26]!==E?(R=b.jsx("div",{"aria-invalid":h,"aria-labelledby":S,"aria-required":p,className:E,"data-ox-slot":"radio-group",role:"radiogroup",...l,children:n}),e[21]=n,e[22]=l,e[23]=h,e[24]=p,e[25]=S,e[26]=E,e[27]=R):R=e[27];let N;return e[28]!==O||e[29]!==R?(N=b.jsx(za.Provider,{value:O,children:R}),e[28]=O,e[29]=R,e[30]=N):N=e[30],N},X0=()=>{const t=k.useContext(za);if(!t)throw new Error("OxRadio must be used within OxRadioGroup");return t},Q0=t=>{const e=I.compilerRuntimeExports.c(32);let n,r,s,o,i,l,a,d;e[0]!==t?({className:n,disabled:o,error:a,id:l,name:i,onChange:s,value:d,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=a===void 0?!1:a,u=k.useId(),f=X0();if(!f)throw new Error("RadioGroupItem must be used within RadioGroup");const m=l||u,h=o??f.disabled??!1,p=i??f.name,g=f.value===d;let x;e[9]!==f||e[10]!==s||e[11]!==d?(x=N=>{s?.(N),d!==void 0&&f.onChange?.(d)},e[9]=f,e[10]=s,e[11]=d,e[12]=x):x=e[12];const v=x;let y;e[13]!==h||e[14]!==g?(y=()=>h?"disabled":g?"checked":"unchecked",e[13]=h,e[14]=g,e[15]=y):y=e[15];const w=y;let C;e[16]!==n||e[17]!==c?(C=z("peer aspect-square size-4 shrink-0 cursor-pointer appearance-none rounded-full border border-input text-primary shadow-xs","dark:bg-input/30","transition-[color,box-shadow] outline-none","ox-focus-ring","aria-disabled:ox-default-disabled",{"border-destructive":c},n),e[16]=n,e[17]=c,e[18]=C):C=e[18];const O=w();let S;e[19]!==h||e[20]!==r||e[21]!==v||e[22]!==m||e[23]!==g||e[24]!==p||e[25]!==C||e[26]!==O||e[27]!==d?(S=b.jsx("input",{id:m,"aria-checked":g,"aria-disabled":h,className:C,disabled:h,name:p,type:"radio",value:d,onChange:v,...r,checked:g,"data-ox-slot":"radio","data-ox-state":O}),e[19]=h,e[20]=r,e[21]=v,e[22]=m,e[23]=g,e[24]=p,e[25]=C,e[26]=O,e[27]=d,e[28]=S):S=e[28];let E;e[29]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx("div",{className:"pointer-events-none absolute inset-0 m-auto size-2 rounded-full bg-primary opacity-0 peer-checked:opacity-100"}),e[29]=E):E=e[29];let R;return e[30]!==S?(R=b.jsxs("div",{className:"relative inline-flex shrink-0",children:[S,E]}),e[30]=S,e[31]=R):R=e[31],R},J0={Group:K0,Item:Q0},Fa=k.createContext(void 0),Xs=()=>{const t=k.useContext(Fa);if(!t)throw new Error("Select components must be used within an OxSelect");return t},Va=t=>{const e=I.compilerRuntimeExports.c(38);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,{close:a,multiple:d,onSelect:c,selectedValue:u}=Xs();let f;e[6]!==n||e[7]!==a||e[8]!==d||e[9]!==c||e[10]!==i?(f=()=>{c({label:n,value:i}),d||a()},e[6]=n,e[7]=a,e[8]=d,e[9]=c,e[10]=i,e[11]=f):f=e[11];const m=f;let h;e[12]!==a||e[13]!==m?(h=E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),m()),E.key==="Escape"&&a()},e[12]=a,e[13]=m,e[14]=h):h=e[14];const p=h;let g,x,v,y;e[15]!==r||e[16]!==u||e[17]!==i?(g=u.includes(i),y="none",x=g,v=z("relative flex w-full items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-start text-popover-foreground","ox-focus-ring enabled:cursor-pointer enabled:hover:bg-neutral-accent enabled:hover:text-neutral-accent-foreground","disabled:ox-default-disabled","[&_svg]:pointer-events-none [&_svg]:shrink-0",{"bg-neutral-accent text-neutral-accent-foreground":g},r),e[15]=r,e[16]=u,e[17]=i,e[18]=g,e[19]=x,e[20]=v,e[21]=y):(g=e[18],x=e[19],v=e[20],y=e[21]);const w=l?-1:0;let C;e[22]!==l||e[23]!==g?(C=g&&!l?b.jsx(ue,{className:"absolute right-2 text-primary","data-ox-slot":"select-check-icon",icon:ae.Check}):null,e[22]=l,e[23]=g,e[24]=C):C=e[24];let O;e[25]!==n||e[26]!==l||e[27]!==s||e[28]!==m||e[29]!==p||e[30]!==x||e[31]!==v||e[32]!==w||e[33]!==C?(O=b.jsxs("button",{"aria-selected":x,className:v,disabled:l,role:"option",tabIndex:w,type:"button",onClick:m,onKeyDown:p,...s,"data-ox-slot":"select-item",children:[n,C]}),e[25]=n,e[26]=l,e[27]=s,e[28]=m,e[29]=p,e[30]=x,e[31]=v,e[32]=w,e[33]=C,e[34]=O):O=e[34];let S;return e[35]!==y||e[36]!==O?(S=b.jsx("li",{role:y,children:O}),e[35]=y,e[36]=O,e[37]=S):S=e[37],S},Z0=t=>{const e=[];return k.Children.forEach(t,n=>{(typeof n=="string"||typeof n=="number")&&e.push(n)}),e.length>0?e.join(""):t},e2=t=>{const e=new Map,n=r=>{if(!k.isValidElement(r))return;if(r.type===Va||ms(r,"select-item")){const{children:i,value:l}=r.props,a=Z0(i);e.set(l,a);return}const s=r.props,{children:o}=s;o&&k.Children.forEach(o,n)};for(const r of t)n(r);return e},Ba=t=>{const e=I.compilerRuntimeExports.c(19);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{buttonRef:o,isClosing:i,isVisible:l,multiple:a,selectId:d}=Xs(),c=k.useRef(null);let u,f;if(e[4]!==o||e[5]!==l?(u=()=>{if(l&&o.current&&c.current){const v=o.current.offsetWidth;c.current.style.width=`${v}px`}},f=[o,l],e[4]=o,e[5]=l,e[6]=u,e[7]=f):(u=e[6],f=e[7]),k.useLayoutEffect(u,f),!l)return null;const m=i?"closing":"open",h=`${d}-listbox`;let p;e[8]!==r?(p=z("flex max-h-72 flex-col gap-y-0.5 overflow-x-hidden overflow-y-auto",r),e[8]=r,e[9]=p):p=e[9];let g;e[10]!==n||e[11]!==s||e[12]!==a||e[13]!==h||e[14]!==p?(g=b.jsx("ul",{id:h,"aria-multiselectable":a,className:p,role:"listbox",...s,"data-ox-slot":"select-content",children:n}),e[10]=n,e[11]=s,e[12]=a,e[13]=h,e[14]=p,e[15]=g):g=e[15];let x;return e[16]!==m||e[17]!==g?(x=b.jsx(Bt,{children:b.jsx(Se.Content,{align:"start",className:"ox-select-animate rounded-lg border border-border bg-popover p-1 text-sm text-popover-foreground shadow-md [&_svg:not([class*='size-'])]:size-4","data-ox-state":m,ref:c,side:"bottom",sideOffset:8,children:g})}),e[16]=m,e[17]=g,e[18]=x):x=e[18],x},ui=t=>t==null?[]:Array.isArray(t)?t:[t],t2=t=>{const e=I.compilerRuntimeExports.c(71),{children:n,className:r,defaultOpen:s,defaultValue:o,disabled:i,error:l,id:a,isLoading:d,multiple:c,onChange:u,onOpenChange:f,open:m,required:h,value:p}=t,g=s===void 0?!1:s,x=o===void 0?null:o,v=d===void 0?!1:d,y=c===void 0?!1:c,w=He(),C=k.useId(),O=k.useRef(null),{checkOverflow:S,handleResize:E,overflowAmount:R}=I.useOverflowDetection(),N=i??w?.disabled??!1,j=l??!!w?.error,D=h??w?.required??!1,P=a??w?.id??C;let M;e[0]!==m||e[1]!==g||e[2]!==N||e[3]!==f?(M={closeOnEscape:!0,closeOnOutsideClick:!0,defaultOpen:g,disabled:N,onOpenChange:f,open:m},e[0]=m,e[1]=g,e[2]=N,e[3]=f,e[4]=M):M=e[4];const{close:L,containerRef:_,isClosing:T,isVisible:A,open:V,toggle:$}=I.usePopperState(M);let F;if(e[5]!==n){e:{const oe=k.Children.toArray(n).find(n2);if(!oe||!k.isValidElement(oe)){let Oe;e[7]===Symbol.for("react.memo_cache_sentinel")?(Oe=new Map,e[7]=Oe):Oe=e[7],F=Oe;break e}const me=k.Children.toArray(oe.props.children||[]);F=e2(me)}e[5]=n,e[6]=F}else F=e[6];const W=F;let B;e[8]!==x?(B=new Set(ui(x)),e[8]=x,e[9]=B):B=e[9];let H;e[10]!==y||e[11]!==u?(H=oe=>{if(!oe)return;let me;y?me=[...oe]:oe.size>0?me=[...oe][0]:me=null,u?.(me)},e[10]=y,e[11]=u,e[12]=H):H=e[12];let G;e[13]!==p?(G=p!==void 0?new Set(ui(p)):void 0,e[13]=p,e[14]=G):G=e[14];let U;e[15]!==B||e[16]!==H||e[17]!==G?(U={defaultValue:B,name:"OxSelect",onChange:H,value:G},e[15]=B,e[16]=H,e[17]=G,e[18]=U):U=e[18];const[Y,Q]=I.useControllableState(U);let X;e[19]!==W||e[20]!==Y?(X=[...Y??new Set].filter(oe=>oe===""?W.has(""):!0).map(oe=>({label:W.get(oe)??oe,value:oe})),e[19]=W,e[20]=Y,e[21]=X):X=e[21];const K=X;let J;e[22]!==S?(J=()=>{S()},e[22]=S,e[23]=J):J=e[23];let q;if(e[24]!==S||e[25]!==Y?(q=[Y,S],e[24]=S,e[25]=Y,e[26]=q):q=e[26],k.useLayoutEffect(J,q),v){let oe;e[27]!==r?(oe=z("flex w-full flex-col",r),e[27]=r,e[28]=oe):oe=e[28];const me=!j;let Oe;e[29]!==j||e[30]!==me?(Oe=z("h-9 w-full rounded-lg border",{"border-destructive":j,"border-input":me}),e[29]=j,e[30]=me,e[31]=Oe):Oe=e[31];let ke;e[32]!==Oe?(ke=b.jsx(_t,{className:Oe}),e[32]=Oe,e[33]=ke):ke=e[33];let Ye;return e[34]!==oe||e[35]!==ke?(Ye=b.jsx("div",{className:oe,children:ke}),e[34]=oe,e[35]=ke,e[36]=Ye):Ye=e[36],Ye}let ne;e[37]!==y||e[38]!==Q?(ne=oe=>{const{value:me}=oe;Q(Oe=>{const ke=new Set(Oe);return y?ke.has(me)?ke.delete(me):ke.add(me):(ke.clear(),ke.add(me)),ke})},e[37]=y,e[38]=Q,e[39]=ne):ne=e[39];const Z=ne;let te;e[40]!==Y?(te=Y??new Set,e[40]=Y,e[41]=te):te=e[41];let le;e[42]!==te?(le=[...te],e[42]=te,e[43]=le):le=e[43];let ce;e[44]!==L||e[45]!==E||e[46]!==j||e[47]!==P||e[48]!==T||e[49]!==N||e[50]!==D||e[51]!==A||e[52]!==y||e[53]!==Z||e[54]!==V||e[55]!==R||e[56]!==K||e[57]!==le||e[58]!==$?(ce={buttonRef:O,close:L,disabled:N,error:j,handleResize:E,isClosing:T,isVisible:A,multiple:y,onSelect:Z,open:V,overflowAmount:R,required:D,selectedOptions:K,selectedValue:le,selectId:P,toggle:$},e[44]=L,e[45]=E,e[46]=j,e[47]=P,e[48]=T,e[49]=N,e[50]=D,e[51]=A,e[52]=y,e[53]=Z,e[54]=V,e[55]=R,e[56]=K,e[57]=le,e[58]=$,e[59]=ce):ce=e[59];let fe;e[60]!==r?(fe=z('flex w-full flex-col text-sm [&_svg:not([class*="size-"])]:size-4',r),e[60]=r,e[61]=fe):fe=e[61];let he;e[62]!==n?(he=b.jsx(Se,{children:n}),e[62]=n,e[63]=he):he=e[63];let ee;e[64]!==_||e[65]!==fe||e[66]!==he?(ee=b.jsx("div",{className:fe,ref:_,children:he}),e[64]=_,e[65]=fe,e[66]=he,e[67]=ee):ee=e[67];let ie;return e[68]!==ce||e[69]!==ee?(ie=b.jsx(Fa.Provider,{value:ce,children:ee}),e[68]=ce,e[69]=ee,e[70]=ie):ie=e[70],ie};function n2(t){return k.isValidElement(t)&&(t.type===Ba||ms(t,"select-content"))}const r2=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,label:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);let i;e[5]!==r||e[6]!==o?(i=o?b.jsx("div",{className:z("px-2 py-1.5 text-xs font-semibold text-muted-foreground",r),children:o}):null,e[5]=r,e[6]=o,e[7]=i):i=e[7];let l;return e[8]!==n||e[9]!==s||e[10]!==i?(l=b.jsxs("div",{role:"group",...s,"data-ox-slot":"select-group",children:[i,n]}),e[8]=n,e[9]=s,e[10]=i,e[11]=l):l=e[11],l},s2=t=>{const e=I.compilerRuntimeExports.c(41);let n,r,s,o,i,l;e[0]!==t?({className:n,disabled:s,displayAsTag:o,placeholder:i,tagColor:l,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=o===void 0?!1:o,d=i===void 0?"Select an option":i,c=l===void 0?"purple":l,{buttonRef:u,disabled:f,error:m,handleResize:h,multiple:p,open:g,overflowAmount:x,required:v,selectId:y,selectedOptions:w,toggle:C}=Xs(),O=x>0,S=s??f,E=`${y}-listbox`;let R;e[7]!==d||e[8]!==w?(R=w.length>0?`Selected: ${w.map(o2).join(", ")}`:d,e[7]=d,e[8]=w,e[9]=R):R=e[9];let N;e[10]!==n?(N=z("flex h-9 w-full items-center gap-x-2 rounded-lg border border-input bg-transparent px-3 py-2 text-left text-sm enabled:cursor-pointer","dark:bg-input/30 dark:enabled:hover:bg-input/50","ox-focus-ring focus-visible:border-ring","disabled:cursor-not-allowed disabled:opacity-50","shadow-xs transition-[color,box-shadow]","[&>span:empty]:text-muted-foreground","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[10]=n,e[11]=N):N=e[11];const j=g?"open":"closed";let D;e[12]!==a||e[13]!==h||e[14]!==S||e[15]!==p||e[16]!==x||e[17]!==d||e[18]!==w||e[19]!==O||e[20]!==c?(D=w.length>0?b.jsxs("div",{className:z("flex min-w-0 flex-1 items-center overflow-hidden","**:data-[ox-slot=icon]:hidden",{"opacity-50":S&&a}),children:[b.jsx("div",{className:z("truncate",{"flex gap-1":a&&p}),ref:h,children:a&&p?w.map(_=>b.jsx(es,{color:c,"data-ox-state":"selected",children:_.label},String(_.value))):w.map((_,T,A)=>{const V=A.length-x,$=T===V-1;return b.jsxs("span",{"data-ox-state":"selected",children:[_.label,T<A.length-1&&!$&&", "]},String(_.value))})}),O&&p?b.jsxs(es,{className:"ml-1",color:c,children:["+",x]}):null]}):b.jsx("span",{className:"min-w-0 flex-1 truncate",children:d}),e[12]=a,e[13]=h,e[14]=S,e[15]=p,e[16]=x,e[17]=d,e[18]=w,e[19]=O,e[20]=c,e[21]=D):D=e[21];let P;e[22]!==g?(P=z("shrink-0 text-muted-foreground opacity-50 transition-transform duration-300 ease-in-out",{"rotate-180":g}),e[22]=g,e[23]=P):P=e[23];let M;e[24]!==P?(M=b.jsx(ue,{className:P,icon:ae.ChevronDown}),e[24]=P,e[25]=M):M=e[25];let L;return e[26]!==u||e[27]!==r||e[28]!==m||e[29]!==S||e[30]!==g||e[31]!==v||e[32]!==y||e[33]!==M||e[34]!==E||e[35]!==R||e[36]!==N||e[37]!==j||e[38]!==D||e[39]!==C?(L=b.jsx(Se.Anchor,{asChild:!0,children:b.jsxs("button",{id:y,"aria-controls":E,"aria-disabled":S,"aria-expanded":g,"aria-haspopup":"listbox","aria-invalid":m,"aria-label":R,"aria-required":v,className:N,disabled:S,ref:u,role:"combobox",type:"button",onClick:C,...r,"data-ox-slot":"select-trigger","data-ox-state":j,children:[D,M]})}),e[26]=u,e[27]=r,e[28]=m,e[29]=S,e[30]=g,e[31]=v,e[32]=y,e[33]=M,e[34]=E,e[35]=R,e[36]=N,e[37]=j,e[38]=D,e[39]=C,e[40]=L):L=e[40],L};function o2(t){return t.label}const i2=Object.assign(t2,{Content:Ba,Group:r2,Item:Va,Trigger:s2}),l2=t=>{const e=I.compilerRuntimeExports.c(28);let n,r,s,o,i,l,a,d;e[0]!==t?({checked:d,className:n,disabled:r,error:o,id:l,onChange:i,required:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=d===void 0?!1:d,u=He(),f=k.useId(),m=r??u?.disabled??!1,h=o??!!u?.error,p=a??u?.required??!1,g=l??u?.id??f;let x;e[9]!==c||e[10]!==i?(x=()=>{i?.(!c)},e[9]=c,e[10]=i,e[11]=x):x=e[11];const v=x,y=c?"checked":"unchecked",w=h||void 0;let C;e[12]!==n?(C=z("peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs","transition-all outline-none","data-[state=checked]:bg-primary data-[state=unchecked]:bg-input","dark:data-[state=unchecked]:bg-input/80","ox-focus-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive",n),e[12]=n,e[13]=C):C=e[13];let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O=z("pointer-events-none block size-4 rounded-full ring-0 transition-transform","bg-background","dark:data-[state=unchecked]:bg-foreground","dark:data-[state=checked]:bg-primary-foreground","data-[state=checked]:translate-x-[calc(100%-2px)]","data-[state=unchecked]:translate-x-0"),e[14]=O):O=e[14];let S;e[15]!==y?(S=b.jsx("span",{className:O,"data-state":y}),e[15]=y,e[16]=S):S=e[16];let E;return e[17]!==c||e[18]!==y||e[19]!==s||e[20]!==v||e[21]!==g||e[22]!==m||e[23]!==p||e[24]!==w||e[25]!==C||e[26]!==S?(E=b.jsx("button",{id:g,"aria-checked":c,"aria-disabled":m,"aria-invalid":w,"aria-required":p,className:C,"data-ox-slot":"switch","data-state":y,disabled:m,role:"switch",type:"button",onClick:v,...s,children:S}),e[17]=c,e[18]=y,e[19]=s,e[20]=v,e[21]=g,e[22]=m,e[23]=p,e[24]=w,e[25]=C,e[26]=S,e[27]=E):E=e[27],E},a2=t=>{const e=I.compilerRuntimeExports.c(38);let n,r,s,o,i,l,a,d,c,u,f,m;e[0]!==t?({className:n,disabled:r,error:o,id:a,name:i,onChange:l,placeholder:c,required:d,rows:u,showMaxLength:f,value:m,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12]);const h=c===void 0?"Enter text...":c,p=u===void 0?3:u,g=f===void 0?!1:f,x=He(),v=k.useId(),[y,w]=k.useState(0),C=r??x?.disabled??!1,O=o??!!x?.error,S=d??x?.required??!1,R=`${a??x?.id??v}-textarea`,N=s.maxLength,j=m!==void 0;let D;j?D=typeof m=="string"?m.length:0:D=y;let P;e[13]!==j||e[14]!==l?(P=V=>{j||w(V.target.value.length),l?.(V)},e[13]=j,e[14]=l,e[15]=P):P=e[15];const M=P;let L;e[16]!==n?(L=z("flex field-sizing-content min-h-16 w-full","rounded-lg border border-input bg-transparent px-3 py-2 shadow-xs","text-base placeholder:text-muted-foreground sm:text-sm","transition-[color,box-shadow] outline-none","ox-focus-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[16]=n,e[17]=L):L=e[17];let _;e[18]!==s||e[19]!==M||e[20]!==O||e[21]!==C||e[22]!==S||e[23]!==i||e[24]!==h||e[25]!==p||e[26]!==L||e[27]!==R||e[28]!==m?(_=b.jsx("textarea",{id:R,"aria-invalid":O,"aria-required":S,className:L,"data-ox-slot":"textarea",disabled:C,name:i,placeholder:h,required:S,rows:p,value:m,onChange:M,...s}),e[18]=s,e[19]=M,e[20]=O,e[21]=C,e[22]=S,e[23]=i,e[24]=h,e[25]=p,e[26]=L,e[27]=R,e[28]=m,e[29]=_):_=e[29];let T;e[30]!==D||e[31]!==C||e[32]!==N||e[33]!==g?(T=g&&typeof N=="number"?b.jsxs("div",{className:z("mt-1 text-right font-mono text-xs text-muted-foreground tabular-nums",{"opacity-50":C}),"data-ox-slot":"input-counter",children:[D,"/",N]}):null,e[30]=D,e[31]=C,e[32]=N,e[33]=g,e[34]=T):T=e[34];let A;return e[35]!==_||e[36]!==T?(A=b.jsxs("div",{className:"flex w-full flex-col",children:[_,T]}),e[35]=_,e[36]=T,e[37]=A):A=e[37],A},c2=t=>{const e=I.compilerRuntimeExports.c(64);let n,r,s,o;e[0]!==t?({children:n,className:r,rowId:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=Ys(),{isHeader:l}=kb();let a;e[5]!==i?(a=i??{},e[5]=i,e[6]=a):a=e[6];const{draggable:d,registerRowId:c,unregisterRowId:u}=a;let f,m;e[7]!==d||e[8]!==c||e[9]!==o||e[10]!==u?(f=()=>{if(o&&d)return c?.(o),()=>u?.(o)},m=[o,d,c,u],e[7]=d,e[8]=c,e[9]=o,e[10]=u,e[11]=f,e[12]=m):(f=e[11],m=e[12]),k.useEffect(f,m);const h=!i?.draggable||!o||l,p=o??"";let g;e[13]!==h||e[14]!==p?(g={disabled:h,id:p},e[13]=h,e[14]=p,e[15]=g):g=e[15];const{attributes:x,isDragging:v,listeners:y,setNodeRef:w,transform:C,transition:O}=Vs(g);let S;e[16]!==C?(S=at.Transform.toString(C),e[16]=C,e[17]=S):S=e[17];let E;e[18]!==S||e[19]!==O?(E={transform:S,transition:O},e[18]=S,e[19]=O,e[20]=E):E=e[20];const R=E;let N;e[21]!==i||e[22]!==o?(N=()=>{o&&i?.selectable&&i.toggleSelection(o)},e[21]=i,e[22]=o,e[23]=N):N=e[23];const j=N;let D;e[24]!==i?(D=()=>{i?.toggleAll()},e[24]=i,e[25]=D):D=e[25];const P=D;let M,L,_;if(e[26]!==x||e[27]!==r||e[28]!==i||e[29]!==P||e[30]!==j||e[31]!==v||e[32]!==l||e[33]!==y||e[34]!==o){const W=o&&i?.isSelected(o),B=l?"th":"td";let H;e[38]!==B||e[39]!==x||e[40]!==i?.draggable||e[41]!==l||e[42]!==y||e[43]!==o?(H=()=>i?.draggable?l?b.jsx(B,{className:"h-10 w-12 px-3",children:b.jsx("span",{className:"sr-only",children:"Reorder"})}):o?b.jsx(B,{className:"px-3 py-2",children:b.jsx("button",{"aria-label":"Drag to reorder",className:"flex cursor-grab touch-none items-center justify-center",type:"button",...x,...y,children:b.jsx(ae.GripVertical,{className:"size-4 text-muted-foreground"})})}):b.jsx(B,{className:"px-3 py-2"}):null,e[38]=B,e[39]=x,e[40]=i?.draggable,e[41]=l,e[42]=y,e[43]=o,e[44]=H):H=e[44],M=H;let G;e[45]!==B||e[46]!==i||e[47]!==P||e[48]!==j||e[49]!==l||e[50]!==o?(G=()=>i?.selectable?l?b.jsx(B,{className:"h-10 w-12 px-3",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(ds,{"aria-label":"Select all rows",checked:i.isIndeterminate?"indeterminate":i.isAllSelected,onCheckedChange:P})})}):o?b.jsx(B,{className:"px-3 py-2",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(ds,{"aria-label":`Select row ${o}`,checked:i.isSelected(o),onCheckedChange:j})})}):b.jsx(B,{className:"px-3 py-2"}):null,e[45]=B,e[46]=i,e[47]=P,e[48]=j,e[49]=l,e[50]=o,e[51]=G):G=e[51],L=G,_=z("border-b transition-colors",{"hover:bg-muted/50":!l},{"bg-muted":i?.selectable&&W},{"opacity-50":v},r),e[26]=x,e[27]=r,e[28]=i,e[29]=P,e[30]=j,e[31]=v,e[32]=l,e[33]=y,e[34]=o,e[35]=M,e[36]=L,e[37]=_}else M=e[35],L=e[36],_=e[37];const T=l?void 0:w,A=l?void 0:R;let V;e[52]!==M?(V=M(),e[52]=M,e[53]=V):V=e[53];let $;e[54]!==L?($=L(),e[54]=L,e[55]=$):$=e[55];let F;return e[56]!==n||e[57]!==s||e[58]!==_||e[59]!==T||e[60]!==A||e[61]!==V||e[62]!==$?(F=b.jsxs("tr",{className:_,"data-ox-slot":"table-row",ref:T,style:A,...s,children:[V,$,n]}),e[56]=n,e[57]=s,e[58]=_,e[59]=T,e[60]=A,e[61]=V,e[62]=$,e[63]=F):F=e[63],F},d2=Object.assign(vb,{Body:wb,Cell:Cb,Controls:Ob,Footer:Eb,Head:Sb,Header:Rb,Row:c2,SkeletonRow:ja}),Wa=k.createContext(null),u2=t=>{const e=I.compilerRuntimeExports.c(24);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,defaultValue:s,onValueChange:i,value:a,variant:l,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const d=l===void 0?"pills":l,[c,u]=k.useState(s||""),f=a!==void 0,m=f?a:c;let h;e[8]!==f||e[9]!==i?(h=C=>{f||u(C),i?.(C)},e[8]=f,e[9]=i,e[10]=h):h=e[10];const p=h;let g;e[11]!==m||e[12]!==p||e[13]!==d?(g={value:m,variant:d,onValueChange:p},e[11]=m,e[12]=p,e[13]=d,e[14]=g):g=e[14];const x=g;let v;e[15]!==r?(v=z("w-full",r),e[15]=r,e[16]=v):v=e[16];let y;e[17]!==n||e[18]!==o||e[19]!==v?(y=b.jsx("div",{className:v,...o,"data-ox-slot":"tabs",children:n}),e[17]=n,e[18]=o,e[19]=v,e[20]=y):y=e[20];let w;return e[21]!==x||e[22]!==y?(w=b.jsx(Wa.Provider,{value:x,children:y}),e[21]=x,e[22]=y,e[23]=w):w=e[23],w},Qs=()=>{const t=k.useContext(Wa);if(!t)throw new Error("Tabs components must be used within OxTabs");return t},f2=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,value:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{value:i}=Qs();if(!(i===o))return null;const a=`tab-${o}`;let d;e[5]!==r?(d=z("pt-4",r),e[5]=r,e[6]=d):d=e[6];let c;return e[7]!==n||e[8]!==s||e[9]!==a||e[10]!==d?(c=b.jsx("div",{"aria-labelledby":a,className:d,role:"tabpanel",...s,"data-ox-slot":"tabs-content",children:n}),e[7]=n,e[8]=s,e[9]=a,e[10]=d,e[11]=c):c=e[11],c},m2=it("flex",{variants:{variant:{bordered:"border-b border-border",pills:"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]"}},defaultVariants:{variant:"pills"}}),p2=it(["inline-flex items-center justify-center gap-1.5 text-sm font-medium whitespace-nowrap","transition-[color,box-shadow]","ox-focus-ring cursor-pointer","disabled:pointer-events-none disabled:opacity-50",'[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4'],{variants:{variant:{bordered:["relative rounded-t-lg border-t border-r border-l border-transparent px-4 py-2","hover:bg-muted hover:text-foreground","data-[ox-state=active]:border-border data-[ox-state=active]:text-foreground","data-[ox-state=inactive]:text-muted-foreground"],pills:["h-[calc(100%-1px)] flex-1 rounded-md border border-transparent px-2 py-1","data-[ox-state=active]:bg-input/30 data-[ox-state=active]:border-input data-[ox-state=active]:text-foreground data-[ox-state=active]:shadow-sm","data-[ox-state=inactive]:text-muted-foreground"]}},defaultVariants:{variant:"pills"}}),h2=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{variant:o}=Qs();let i;e[4]!==r||e[5]!==o?(i=z(m2({variant:o}),r),e[4]=r,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==n||e[8]!==s||e[9]!==i||e[10]!==o?(l=b.jsx("div",{className:i,role:"tablist",...s,"data-ox-slot":"tabs-list","data-ox-variant":o,children:n}),e[7]=n,e[8]=s,e[9]=i,e[10]=o,e[11]=l):l=e[11],l},g2=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,{onValueChange:a,value:d,variant:c}=Qs(),u=d===i;let f;e[6]!==l||e[7]!==a||e[8]!==i?(f=()=>{l||a(i)},e[6]=l,e[7]=a,e[8]=i,e[9]=f):f=e[9];const m=f;let h;e[10]!==m?(h=w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),m())},e[10]=m,e[11]=h):h=e[11];const p=h,g=l||void 0;let x;e[12]!==r||e[13]!==c?(x=z(p2({variant:c}),r),e[12]=r,e[13]=c,e[14]=x):x=e[14];const v=u?"active":"inactive";let y;return e[15]!==n||e[16]!==l||e[17]!==s||e[18]!==m||e[19]!==p||e[20]!==u||e[21]!==g||e[22]!==x||e[23]!==v?(y=b.jsx("button",{"aria-disabled":g,"aria-selected":u,className:x,disabled:l,role:"tab",type:"button",onClick:m,onKeyDown:p,...s,"data-ox-slot":"tabs-trigger","data-ox-state":v,children:n}),e[15]=n,e[16]=l,e[17]=s,e[18]=m,e[19]=p,e[20]=u,e[21]=g,e[22]=x,e[23]=v,e[24]=y):y=e[24],y},x2=Object.assign(u2,{Content:f2,List:h2,Trigger:g2}),b2=t=>{const e=I.compilerRuntimeExports.c(32);let n,r,s,o,i;e[0]!==t?({className:n,onThemeChange:o,size:i,theme:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?"md":i,{setTheme:a,theme:d}=I.useOxTheme(),c=r??d,u=c==="dark";let f;e[6]!==r||e[7]!==u||e[8]!==o||e[9]!==a?(f=()=>{const E=u?"light":"dark";r===void 0&&a(E),o?.(E)},e[6]=r,e[7]=u,e[8]=o,e[9]=a,e[10]=f):f=e[10];const m=f,h=u?"Switch to light mode":"Switch to dark mode";let p;e[11]!==n||e[12]!==l?(p=z(At({variant:"ghost",size:l,iconOnly:!0}),n),e[11]=n,e[12]=l,e[13]=p):p=e[13];const g=u?"opacity-0 blur-[2px]":"blur-0 opacity-100";let x;e[14]!==g?(x=z("transition-all duration-200",g),e[14]=g,e[15]=x):x=e[15];let v;e[16]!==x?(v=b.jsx(ue,{className:x,icon:ae.Sun}),e[16]=x,e[17]=v):v=e[17];const y=u?"blur-0 opacity-100":"opacity-0 blur-[2px]";let w;e[18]!==y?(w=z("absolute inset-0 transition-all duration-200",y),e[18]=y,e[19]=w):w=e[19];let C;e[20]!==w?(C=b.jsx(ue,{className:w,icon:ae.Moon}),e[20]=w,e[21]=C):C=e[21];let O;e[22]!==C||e[23]!==v?(O=b.jsxs("span",{className:"relative flex items-center justify-center",children:[v,C]}),e[22]=C,e[23]=v,e[24]=O):O=e[24];let S;return e[25]!==s||e[26]!==m||e[27]!==O||e[28]!==h||e[29]!==p||e[30]!==c?(S=b.jsx("button",{"aria-label":h,className:p,type:"button",onClick:m,...s,"data-ox-slot":"theme-switcher","data-theme":c,children:O}),e[25]=s,e[26]=m,e[27]=O,e[28]=h,e[29]=p,e[30]=c,e[31]=S):S=e[31],S},v2=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("grid grid-cols-[1fr_auto_1fr] items-start gap-4 text-sm",'[&_svg:not([class*="size-"])]:size-5 [&>svg]:text-current',r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("ol",{"aria-label":"Timeline",className:o,"data-ox-slot":"timeline",role:"list",...s,children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},y2=t=>{const e=I.compilerRuntimeExports.c(45);let n,r,s,o,i,l,a,d,c,u;e[0]!==t?({align:a,children:n,className:r,color:d,description:s,icon:i,label:l,showSeparator:c,timestamp:u,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10]);const f=a===void 0?"left":a,m=d===void 0?"purple":d,h=c===void 0?!1:c,p=n||s;let g;e[11]!==r?(g=z("col-span-3 grid grid-cols-subgrid",r),e[11]=r,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==m||e[15]!==p||e[16]!==l||e[17]!==u?(x=f==="left"&&b.jsxs("div",{className:"space-y-1 text-right",children:[b.jsx("h6",{className:z("text-sm leading-tight font-medium",We[m].text),children:l}),p&&b.jsx(Zt,{children:p}),u&&b.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),e[13]=f,e[14]=m,e[15]=p,e[16]=l,e[17]=u,e[18]=x):x=e[18];let v;e[19]!==x?(v=b.jsx("div",{children:x}),e[19]=x,e[20]=v):v=e[20];const y=i||ae.Circle;let w;e[21]!==y?(w=b.jsx(ue,{icon:y}),e[21]=y,e[22]=w):w=e[22];let C;e[23]!==m||e[24]!==w?(C=b.jsx(ue.Box,{color:m,size:"lg",children:w}),e[23]=m,e[24]=w,e[25]=C):C=e[25];let O;e[26]!==h?(O=h?b.jsx(Ws,{className:"mx-auto",orientation:"vertical"}):null,e[26]=h,e[27]=O):O=e[27];let S;e[28]!==O||e[29]!==C?(S=b.jsxs("div",{className:"grid shrink-0 grid-rows-[auto_1fr] gap-4",children:[C,O]}),e[28]=O,e[29]=C,e[30]=S):S=e[30];let E;e[31]!==f||e[32]!==m||e[33]!==p||e[34]!==l||e[35]!==u?(E=f==="right"&&b.jsxs("div",{className:"space-y-1 text-left",children:[b.jsx("h6",{className:z("text-sm leading-tight font-medium",We[m].text),children:l}),p&&b.jsx(Zt,{children:p}),u&&b.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),e[31]=f,e[32]=m,e[33]=p,e[34]=l,e[35]=u,e[36]=E):E=e[36];let R;e[37]!==E?(R=b.jsx("div",{children:E}),e[37]=E,e[38]=R):R=e[38];let N;return e[39]!==o||e[40]!==S||e[41]!==R||e[42]!==g||e[43]!==v?(N=b.jsxs("li",{className:g,"data-ox-slot":"timeline-item",role:"listitem",...o,children:[v,S,R]}),e[39]=o,e[40]=S,e[41]=R,e[42]=g,e[43]=v,e[44]=N):N=e[44],N},w2=Object.assign(v2,{Item:y2}),Ha=k.createContext(null),C2=t=>{const e=I.compilerRuntimeExports.c(15),{align:n,children:r,maxToasts:s,position:o}=t,i=n===void 0?"right":n,l=s===void 0?3:s,a=o===void 0?"top":o;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];const[c,u]=k.useState(d);let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=O=>{u(S=>S.map(E=>E.id===O?{...E,isRemoving:!0}:E)),setTimeout(()=>{u(S=>I.reject(S,E=>E.id===O))},200)},e[1]=f):f=e[1];const m=f;let h;e[2]!==l?(h=(O,S,E,R)=>{const N=I.uniqueId(),j=E?.duration??5e3,D={id:N,title:O,type:S,duration:j,description:E?.description,icon:E?.icon,color:E?.color,customContent:R};return u(P=>I.take([D,...P],l)),j>0&&setTimeout(()=>{m(N)},j),N},e[2]=l,e[3]=h):h=e[3];const p=h;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=O=>{O?m(O):u([])},e[4]=g):g=e[4];const x=g;let v;e[5]!==p?(v=Object.assign((O,S)=>p(O,"default",S),{success:(O,S)=>p(O,"success",S),destructive:(O,S)=>p(O,"destructive",S),warning:(O,S)=>p(O,"warning",S),info:(O,S)=>p(O,"info",S),custom:(O,S)=>p("","default",{duration:S?.duration},O),dismiss:x}),e[5]=p,e[6]=v):v=e[6];const y=v;let w;e[7]!==i||e[8]!==a||e[9]!==c?(w=b.jsx(Ya,{align:i,position:a,toasts:c,onRemove:m}),e[7]=i,e[8]=a,e[9]=c,e[10]=w):w=e[10];let C;return e[11]!==r||e[12]!==w||e[13]!==y?(C=b.jsxs(Ha.Provider,{value:y,children:[r,w]}),e[11]=r,e[12]=w,e[13]=y,e[14]=C):C=e[14],C},O2=()=>{const t=k.useContext(Ha);if(!t)throw new Error("useOxToast must be used within a ToastProvider");return t},E2=t=>{const e=I.compilerRuntimeExports.c(48),{index:n,onRemove:r,position:s,toast:o}=t,i=o.icon??st[o.type].icon,[l,a]=k.useState(!0);let d,c;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{const D=setTimeout(()=>a(!1),50);return()=>clearTimeout(D)},c=[],e[0]=d,e[1]=c):(d=e[0],c=e[1]),k.useEffect(d,c);const u=n*8,f=1-n*.05;let m;e[2]!==n||e[3]!==l||e[4]!==s||e[5]!==f||e[6]!==u||e[7]!==o.isRemoving?(m=()=>{const P=l?s==="top"?-16:16:0,M=o.isRemoving||l?0:1;return s==="top"?{top:`${u+P}px`,transform:`scale(${f})`,zIndex:30-n,opacity:M}:{top:`${-u+P}px`,transform:`scale(${f})`,zIndex:30-n,opacity:M}},e[2]=n,e[3]=l,e[4]=s,e[5]=f,e[6]=u,e[7]=o.isRemoving,e[8]=m):m=e[8];const h=m;if(o.customContent){let D;e[9]!==h?(D=h(),e[9]=h,e[10]=D):D=e[10];let P;e[11]!==r||e[12]!==o.id?(P=()=>r(o.id),e[11]=r,e[12]=o.id,e[13]=P):P=e[13];let M;return e[14]!==D||e[15]!==P||e[16]!==o.customContent?(M=b.jsx("div",{className:"pointer-events-auto absolute w-full cursor-pointer rounded-lg border border-border bg-card transition-all duration-300 ease-out md:w-[320px]","data-ox-slot":"toast-item",role:"status",style:D,onClick:P,children:o.customContent}),e[14]=D,e[15]=P,e[16]=o.customContent,e[17]=M):M=e[17],M}const p=o.description?`${o.id}-desc`:void 0;let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=z("pointer-events-auto absolute","flex w-full items-center gap-3 md:w-[320px]",'[&_svg:not([class*="size-"])]:size-5 [&>svg]:text-current',"cursor-pointer","rounded-lg border border-border bg-card p-4","transition-all duration-300 ease-out"),e[18]=g):g=e[18];const x=o.type==="destructive"||o.type==="warning"?"alert":"status";let v;e[19]!==h?(v=h(),e[19]=h,e[20]=v):v=e[20];let y;e[21]!==r||e[22]!==o.id?(y=()=>r(o.id),e[21]=r,e[22]=o.id,e[23]=y):y=e[23];let w;e[24]!==o.type?(w=b.jsxs("span",{className:"sr-only",children:[o.type," notification:"]}),e[24]=o.type,e[25]=w):w=e[25];const C=o.color??o.type;let O;e[26]!==i||e[27]!==o.path?(O=b.jsx(ue,{icon:i,path:o.path}),e[26]=i,e[27]=o.path,e[28]=O):O=e[28];let S;e[29]!==C||e[30]!==O?(S=b.jsx(ue.Box,{color:C,size:"md",children:O}),e[29]=C,e[30]=O,e[31]=S):S=e[31];let E;e[32]!==o.title?(E=b.jsx("div",{className:"text-xs font-medium text-foreground",children:o.title}),e[32]=o.title,e[33]=E):E=e[33];let R;e[34]!==o.description||e[35]!==o.id?(R=o.description?b.jsx("p",{id:`${o.id}-desc`,className:"mt-1 text-xs",children:o.description}):null,e[34]=o.description,e[35]=o.id,e[36]=R):R=e[36];let N;e[37]!==E||e[38]!==R?(N=b.jsxs("div",{className:"flex-1",children:[E,R]}),e[37]=E,e[38]=R,e[39]=N):N=e[39];let j;return e[40]!==S||e[41]!==N||e[42]!==p||e[43]!==x||e[44]!==v||e[45]!==y||e[46]!==w?(j=b.jsxs("div",{"aria-describedby":p,className:g,"data-ox-slot":"toast-item",role:x,style:v,onClick:y,children:[w,S,N]}),e[40]=S,e[41]=N,e[42]=p,e[43]=x,e[44]=v,e[45]=y,e[46]=w,e[47]=j):j=e[47],j},S2={left:"left-1/2 -translate-x-1/2 md:translate-none md:left-4",center:"left-1/2 -translate-x-1/2",right:"left-1/2 -translate-x-1/2 md:translate-none md:left-auto md:right-4"},k2={top:"top-4",bottom:"bottom-24"},Ya=t=>{const e=I.compilerRuntimeExports.c(13),{align:n,onRemove:r,position:s,toasts:o}=t,i=S2[n],l=k2[s];let a;e[0]!==i||e[1]!==l?(a=z("pointer-events-none fixed z-50 w-11/12 md:w-[320px]",i,l),e[0]=i,e[1]=l,e[2]=a):a=e[2];let d;if(e[3]!==r||e[4]!==s||e[5]!==o){let u;e[7]!==r||e[8]!==s?(u=(f,m)=>b.jsx(E2,{index:m,position:s,toast:f,onRemove:r},f.id),e[7]=r,e[8]=s,e[9]=u):u=e[9],d=o.map(u),e[3]=r,e[4]=s,e[5]=o,e[6]=d}else d=e[6];let c;return e[10]!==a||e[11]!==d?(c=rt.createPortal(b.jsx("div",{"aria-atomic":"false","aria-label":"Notifications","aria-live":"polite",className:a,"data-ox-slot":"toast-container",role:"region",children:d}),document.body),e[10]=a,e[11]=d,e[12]=c):c=e[12],c},qa=k.createContext(null),R2=()=>k.useContext(qa),N2=t=>{const e=I.compilerRuntimeExports.c(48);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,disabled:s,id:a,onPressedChange:i,pressed:l,size:d,value:c,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=k.useId(),f=R2(),m=a||u,h=f!==null,p=s||f?.disabled||!1,g=d||f?.size||"md";let x,v,y,w,C;if(e[10]!==p||e[11]!==g||e[12]!==n||e[13]!==r||e[14]!==f||e[15]!==m||e[16]!==h||e[17]!==i||e[18]!==l||e[19]!==c){const S=Fi(n);let E;if(e[25]!==p||e[26]!==f||e[27]!==h||e[28]!==i||e[29]!==l||e[30]!==c){if(h&&c!==void 0){if(f.type==="single")E=f.value===c;else{let N;e[33]!==f.value?(N=f.value||[],e[33]=f.value,e[34]=N):N=e[34],E=N.includes(c)}let R;e[35]!==p||e[36]!==f||e[37]!==c?(R=()=>{!p&&f.onToggle&&f.onToggle(c)},e[35]=p,e[36]=f,e[37]=c,e[38]=R):R=e[38],x=R}else E=l||!1,x=()=>{!p&&i&&i(!E)};e[25]=p,e[26]=f,e[27]=h,e[28]=i,e[29]=l,e[30]=c,e[31]=x,e[32]=E}else x=e[31],E=e[32];v=m,y=p||void 0,w=E,C=z(At({size:g,variant:E?"default":"ghost",iconOnly:S}),r),e[10]=p,e[11]=g,e[12]=n,e[13]=r,e[14]=f,e[15]=m,e[16]=h,e[17]=i,e[18]=l,e[19]=c,e[20]=x,e[21]=v,e[22]=y,e[23]=w,e[24]=C}else x=e[20],v=e[21],y=e[22],w=e[23],C=e[24];let O;return e[39]!==p||e[40]!==n||e[41]!==o||e[42]!==x||e[43]!==v||e[44]!==y||e[45]!==w||e[46]!==C?(O=b.jsx("button",{id:v,"aria-disabled":y,"aria-pressed":w,className:C,disabled:p,role:"button",type:"button",onClick:x,...o,"data-ox-slot":"toggle",children:n}),e[39]=p,e[40]=n,e[41]=o,e[42]=x,e[43]=v,e[44]=y,e[45]=w,e[46]=C,e[47]=O):O=e[47],O},j2=t=>{const e=I.compilerRuntimeExports.c(30);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,disabled:l,name:o,onValueChange:i,size:a,type:d,value:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=l===void 0?!1:l,f=a===void 0?"md":a,m=d===void 0?"single":d;let h;e[10]!==i||e[11]!==m||e[12]!==c?(h=w=>{if(i)if(m==="single")i(c===w?"":w);else{const C=c||[],O=C.includes(w)?C.filter(S=>S!==w):[...C,w];i(O)}},e[10]=i,e[11]=m,e[12]=c,e[13]=h):h=e[13];const p=h;let g;e[14]!==u||e[15]!==p||e[16]!==o||e[17]!==f||e[18]!==m||e[19]!==c?(g={value:c,onToggle:p,size:f,name:o,disabled:u,type:m},e[14]=u,e[15]=p,e[16]=o,e[17]=f,e[18]=m,e[19]=c,e[20]=g):g=e[20];let x;e[21]!==r?(x=z("flex flex-wrap gap-2",r),e[21]=r,e[22]=x):x=e[22];let v;e[23]!==n||e[24]!==s||e[25]!==x?(v=b.jsx("div",{className:x,role:"group",...s,"data-ox-slot":"toggle-group",children:n}),e[23]=n,e[24]=s,e[25]=x,e[26]=v):v=e[26];let y;return e[27]!==g||e[28]!==v?(y=b.jsx(qa.Provider,{value:g,children:v}),e[27]=g,e[28]=v,e[29]=y):y=e[29],y},D2=Object.assign(N2,{Group:j2}),Ga=k.createContext(null),Ua=()=>k.useContext(Ga),P2=({align:t="center",children:e,className:n,content:r,disabled:s=!1,hoverDelay:o=700,interactive:i=!1,position:l="top",trigger:a="hover"})=>{const d=Ua(),[c,u]=k.useState(!1),[f,m]=k.useState(!1),[h,p]=k.useState(!1),g=k.useRef(null),x=k.useRef(null),v=k.useRef(null),y=s?!1:c;k.useEffect(()=>(y?(v.current&&clearTimeout(v.current),p(!1),m(!0),d?.onTooltipOpen()):f&&(p(!0),d?.onTooltipClose(),v.current=setTimeout(()=>{m(!1),p(!1)},100)),()=>{v.current&&clearTimeout(v.current)}),[y,f,d]);const w=k.useCallback(()=>{x.current&&clearTimeout(x.current),g.current&&clearTimeout(g.current),g.current=null,u(!0)},[]),C=k.useCallback(()=>{g.current&&clearTimeout(g.current),x.current&&clearTimeout(x.current),g.current=null,u(!1)},[]),O=k.useCallback(()=>{if(g.current&&clearTimeout(g.current),d?.shouldSkipDelay()??!1){u(!0);return}g.current=setTimeout(()=>{u(!0),g.current=null},o)},[o,d]),S=k.useCallback(()=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{u(!1),x.current=null},100)},[]),E=k.useCallback(()=>{x.current&&clearTimeout(x.current)},[]),R=k.useMemo(()=>a==="hover"?{onBlur:C,onFocus:w,onPointerEnter:O,onPointerLeave:i?S:C}:a==="click"?{onClick:()=>u(D=>!D)}:{onBlur:C,onFocus:w},[a,C,w,O,S,i]),N=k.useMemo(()=>i?{onPointerEnter:E,onPointerLeave:C}:{},[i,E,C]),j=k.isValidElement(e)?k.cloneElement(e,R):e;return b.jsxs(Se,{children:[b.jsx(Se.Anchor,{asChild:!0,children:j}),f&&b.jsx(Bt,{children:b.jsxs(Se.Content,{align:t,"aria-live":"polite",className:z("ox-tooltip-animate max-w-xs rounded-md border border-border bg-popover px-3.75 py-2.5 text-xs text-popover-foreground shadow-md",n),"data-ox-state":h?"closing":"open",role:"tooltip",side:l,sideOffset:2,...N,children:[b.jsx(Se.Arrow,{}),r]})})]})},T2=t=>{const e=I.compilerRuntimeExports.c(12),{children:n,skipDelayDuration:r}=t,s=r===void 0?300:r,[o,i]=k.useState(!1),l=k.useRef(0);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{i(!0)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{l.current=Date.now(),i(!1)},e[1]=c):c=e[1];const u=c;let f;e[2]!==o||e[3]!==s?(f=()=>o?!0:Date.now()-l.current<s,e[2]=o,e[3]=s,e[4]=f):f=e[4];const m=f;let h;e[5]!==o||e[6]!==m||e[7]!==s?(h={isTooltipOpen:o,onTooltipClose:u,onTooltipOpen:d,shouldSkipDelay:m,skipDelayDuration:s},e[5]=o,e[6]=m,e[7]=s,e[8]=h):h=e[8];const p=h;let g;return e[9]!==n||e[10]!==p?(g=b.jsx(Ga.Provider,{value:p,children:n}),e[9]=n,e[10]=p,e[11]=g):g=e[11],g};exports.MOBILE_BREAKPOINT=fa;exports.OxAccordion=jd;exports.OxAlert=Ad;exports.OxAspectRatio=Bd;exports.OxAvatar=gs;exports.OxBadge=Zr;exports.OxBreadcrumb=iu;exports.OxButton=Ze;exports.OxCalendar=el;exports.OxCard=Rm;exports.OxCheckbox=ds;exports.OxCombobox=Vb;exports.OxDateInput=g0;exports.OxDescription=Zt;exports.OxDescriptionList=Pm;exports.OxDialog=wx;exports.OxDndContext=ap;exports.OxDraggable=Rl;exports.OxDrawer=sr;exports.OxDropdown=Jt;exports.OxDroppable=Nl;exports.OxEndlessList=Mg;exports.OxError=Sa;exports.OxFileUpload=Kb;exports.OxForm=o0;exports.OxHeading=ka;exports.OxHoverCard=Lg;exports.OxIcon=ue;exports.OxIcon$1=$i;exports.OxImage=Fg;exports.OxJsonField=Bg;exports.OxKanban=dx;exports.OxLabel=Ra;exports.OxLegend=fb;exports.OxLink=fx;exports.OxMasonry=px;exports.OxNotifications=Rx;exports.OxNumberInput=E0;exports.OxOtpInput=R0;exports.OxPageOutline=Ix;exports.OxPagination=Hx;exports.OxPopover=Un;exports.OxPopper=Se;exports.OxProgress=Qx;exports.OxRadio=J0;exports.OxSelect=i2;exports.OxSeparator=Ws;exports.OxSkeleton=_t;exports.OxSlider=eb;exports.OxSortableList=ib;exports.OxSpinner=Cs;exports.OxStatusDisplay=cb;exports.OxStepper=bb;exports.OxSwitch=l2;exports.OxTable=d2;exports.OxTabs=x2;exports.OxTag=es;exports.OxTextInput=V0;exports.OxTextarea=a2;exports.OxThemeSwitcher=b2;exports.OxTimeInput=U0;exports.OxTimeline=w2;exports.OxToast=Ya;exports.OxToastProvider=C2;exports.OxToggle=D2;exports.OxTooltip=P2;exports.OxTooltipProvider=T2;exports.buildMailTo=Ja;exports.buildUrl=Qa;exports.cn=z;exports.copyToClipboard=Vc;exports.createId=qc;exports.createSlot=dt;exports.formatBytes=Uc;exports.formatCurrency=Kc;exports.formatDate=Xc;exports.formatNumber=Qc;exports.formatTimestamp=fs;exports.generateRandomString=Ri;exports.handleFormErrors=ji;exports.handleGraphQLFormErrors=Gc;exports.hasDataSlot=ms;exports.parseGraphQLErrors=Ni;exports.scrollToElement=Di;exports.useDndContext=lp;exports.useOxToast=O2;exports.useOxTooltipContext=Ua;exports.usePopperContentContext=Ml;exports.usePopperContext=Ds;exports.validateEmail=sd;exports.validatePhone=ld;exports.validateUrl=od;
|
|
9
|
+
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(s),o=!1,s}return i.updateDeps=l=>{r=l},i}function Jo(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const vg=(t,e)=>Math.abs(t-e)<1.01,yg=(t,e,n)=>{let r;return function(...s){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,s),n)}},Zo=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},wg=t=>t,Cg=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),r=[];for(let s=e;s<=n;s++)r.push(s);return r},Og=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const s=i=>{const{width:l,height:a}=i;e({width:Math.round(l),height:Math.round(a)})};if(s(Zo(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(i=>{const l=()=>{const a=i[0];if(a?.borderBoxSize){const d=a.borderBoxSize[0];if(d){s({width:d.inlineSize,height:d.blockSize});return}}s(Zo(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},ei={passive:!0},ti=typeof window>"u"?!0:"onscrollend"in window,Eg=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;let s=0;const o=t.options.useScrollendEvent&&ti?()=>{}:yg(r,()=>{e(s,!1)},t.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:u,isRtl:f}=t.options;s=u?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),e(s,c)},l=i(!0),a=i(!1);a(),n.addEventListener("scroll",l,ei);const d=t.options.useScrollendEvent&&ti;return d&&n.addEventListener("scrollend",a,ei),()=>{n.removeEventListener("scroll",l),d&&n.removeEventListener("scrollend",a)}},Sg=(t,e,n)=>{if(e?.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},kg=(t,{adjustments:e=0,behavior:n},r)=>{var s,o;const i=t+e;(o=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[r.options.horizontal?"left":"top"]:i,behavior:n})};class Rg{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const i=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=r())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=r())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:wg,rangeExtractor:Cg,onChange:()=>{},measureElement:Sg,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=qt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,o=new Map;for(let i=r-1;i>=0;i--){const l=n[i];if(s.has(l.lane))continue;const a=o.get(l.lane);if(a==null||l.end>a.end?o.set(l.lane,l):l.end<a.end&&s.set(l.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=qt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,o,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:i,lanes:l}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=qt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:i,lanes:l},a)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const f of this.laneAssignments.keys())f>=n&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const c=this.measurementsCache.slice(0,d),u=new Array(l).fill(void 0);for(let f=0;f<d;f++){const m=c[f];m&&(u[m.lane]=f)}for(let f=d;f<n;f++){const m=o(f),h=this.laneAssignments.get(f);let p,g;if(h!==void 0&&this.options.lanes>1){p=h;const w=u[p],C=w!==void 0?c[w]:void 0;g=C?C.end+this.options.gap:r+s}else{const w=this.options.lanes===1?c[f-1]:this.getFurthestMeasurement(c,f);g=w?w.end+this.options.gap:r+s,p=w?w.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,p)}const x=a.get(m),v=typeof x=="number"?x:this.options.estimateSize(f),y=g+v;c[f]={index:f,start:g,size:v,end:y,key:m,lane:p},u[p]=f}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=qt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,o)=>this.range=n.length>0&&r>0?Ng({measurements:n,outerSize:r,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=qt(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,o,i)=>o===null||i===null?[]:n({startIndex:o,endIndex:i,overscan:r,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const i=o.key,l=this.elementsCache.get(i);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(i,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,i=r-o;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,i,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,s)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=qt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let o=0,i=n.length;o<i;o++){const l=n[o],a=r[l];s.push(a)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return Jo(r[Ql(0,r.length-1,s=>Jo(r[s]).start,n)])},this.getOffsetForAlignment=(n,r,s=0)=>{const o=this.getSize(),i=this.getScrollOffset();r==="auto"&&(r=n>=i+o?"end":"start"),r==="center"?n+=(s-o)/2:r==="end"&&(n-=o);const l=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(s.end>=i+o-this.options.scrollPaddingEnd)r="end";else if(s.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const l=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,r,s.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const i=10,l=d=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,d);if(!c){console.warn("Failed to get offset for index:",n);return}const[u,f]=c;this._scrollToOffset(u,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const m=this.getScrollOffset(),h=this.getOffsetForIndex(n,f);if(!h){console.warn("Failed to get offset for index:",n);return}vg(h[0],m)||a(f)})},a=d=>{this.targetWindow&&(o++,o<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,i),this.targetWindow.requestAnimationFrame(()=>l(d))):console.warn(`Failed to scroll to index ${n} after ${i} attempts.`))};l(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let i=r.length-1;for(;i>=0&&o.some(l=>l===null);){const l=r[i];o[l.lane]===null&&(o[l.lane]=l.end),i--}s=Math.max(...o.filter(l=>l!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}}const Ql=(t,e,n,r)=>{for(;t<=e;){const s=(t+e)/2|0,o=n(s);if(o<r)t=s+1;else if(o>r)e=s-1;else return s}return t>0?t-1:0};function Ng({measurements:t,outerSize:e,scrollOffset:n,lanes:r}){const s=t.length-1,o=a=>t[a].start;if(t.length<=r)return{startIndex:0,endIndex:s};let i=Ql(0,s,o,n),l=i;if(r===1)for(;l<s&&t[l].end<n+e;)l++;else if(r>1){const a=Array(r).fill(0);for(;l<s&&a.some(c=>c<n+e);){const c=t[l];a[c.lane]=c.end,l++}const d=Array(r).fill(n+e);for(;i>=0&&d.some(c=>c>=n);){const c=t[i];d[c.lane]=c.start,i--}i=Math.max(0,i-i%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:i,endIndex:l}}const ni=typeof document<"u"?de.useLayoutEffect:de.useEffect;function jg(t){const e=de.useReducer(()=>({}),{})[1],n={...t,onChange:(s,o)=>{var i;o?rt.flushSync(e):e(),(i=t.onChange)==null||i.call(t,s,o)}},[r]=de.useState(()=>new Rg(n));return r.setOptions(n),ni(()=>r._didMount(),[]),ni(()=>r._willUpdate()),r}function Dg(t){return jg({observeElementRect:Og,observeElementOffset:Eg,scrollToFn:kg,...t})}const Pg=({children:t,className:e,paddingY:n=0})=>{const{data:r,estimateSize:s,gap:o,getItemKey:i,hasNextPage:l,isError:a,isLoading:d,loadMoreThreshold:c,onLoadMore:u,overscan:f,scrollElement:m}=kr(),h=k.useCallback(w=>i(r[w],w),[r,i]),p=k.useCallback(w=>typeof s=="function"?s(w):s,[s]),g=Dg({count:r.length,enabled:!!m,estimateSize:p,gap:o,getItemKey:h,getScrollElement:()=>m,overscan:f}),x=g.getVirtualItems(),v=x.at(-1);k.useEffect(()=>{if(!v)return;v.index>=r.length-c&&l&&!d&&!a&&u&&u()},[v,r.length,l,d,a,c,u]);const y=k.Children.only(t);return b.jsx("div",{className:z("relative w-full",e),"data-ox-slot":"endless-list-items",style:{height:g.getTotalSize()+n*2},children:x.map(w=>{const C=r[w.index];return b.jsx(Xl.Provider,{value:{index:w.index,item:C,paddingY:n,virtualItem:w,virtualizer:g},children:k.isValidElement(y)?k.cloneElement(y):null},w.key)})})},Tg=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{hasNextPage:o,isLoading:i}=kr();if(!i||!o)return null;let l;e[4]!==r?(l=z("sticky bottom-0 flex items-center justify-center bg-background/80 py-4 backdrop-blur-sm",r),e[4]=r,e[5]=l):l=e[5];let a;e[6]!==n?(a=n??b.jsx(Cs,{size:"sm"}),e[6]=n,e[7]=a):a=e[7];let d;return e[8]!==s||e[9]!==l||e[10]!==a?(d=b.jsx("div",{className:l,"data-ox-slot":"endless-list-loader",...s,children:a}),e[8]=s,e[9]=l,e[10]=a,e[11]=d):d=e[11],d},Mg=Object.assign(hg,{Empty:gg,Error:xg,Item:bg,Items:Pg,Loader:Tg}),Jl=k.createContext(null),Ig=t=>{const e=I.compilerRuntimeExports.c(30),{align:n,children:r,closeDelay:s,defaultOpen:o,disabled:i,onOpenChange:l,open:a,openDelay:d,side:c}=t,u=n===void 0?"center":n,f=s===void 0?300:s,m=o===void 0?!1:o,h=i===void 0?!1:i,p=d===void 0?700:d,g=c===void 0?"bottom":c;let x;e[0]!==a||e[1]!==m||e[2]!==h||e[3]!==l?(x={closeOnEscape:!0,closeOnOutsideClick:!1,defaultOpen:m,disabled:h,onOpenChange:l,open:a},e[0]=a,e[1]=m,e[2]=h,e[3]=l,e[4]=x):x=e[4];const{close:v,containerRef:y,isClosing:w,isVisible:C,open:O,setOpen:S}=I.usePopperState(x),E=k.useRef(null);let R;e[5]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{E.current&&(clearTimeout(E.current),E.current=null)},e[5]=R):R=e[5];const N=R;let j;e[6]!==v||e[7]!==f?(j=()=>{N(),E.current=setTimeout(()=>{v()},f)},e[6]=v,e[7]=f,e[8]=j):j=e[8];const D=j;let P,M;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=()=>()=>{N()},M=[N],e[9]=P,e[10]=M):(P=e[9],M=e[10]),k.useEffect(P,M);let L;e[11]!==u||e[12]!==v||e[13]!==f||e[14]!==w||e[15]!==C||e[16]!==O||e[17]!==p||e[18]!==S||e[19]!==g||e[20]!==D?(L={align:u,clearCloseTimer:N,close:v,closeDelay:f,isClosing:w,isVisible:C,open:O,openDelay:p,setOpen:S,side:g,startCloseTimer:D},e[11]=u,e[12]=v,e[13]=f,e[14]=w,e[15]=C,e[16]=O,e[17]=p,e[18]=S,e[19]=g,e[20]=D,e[21]=L):L=e[21];const _=L;let T;e[22]!==r?(T=b.jsx(Se,{children:r}),e[22]=r,e[23]=T):T=e[23];let A;e[24]!==y||e[25]!==T?(A=b.jsx("div",{"data-ox-slot":"hovercard",ref:y,children:T}),e[24]=y,e[25]=T,e[26]=A):A=e[26];let V;return e[27]!==_||e[28]!==A?(V=b.jsx(Jl.Provider,{value:_,children:A}),e[27]=_,e[28]=A,e[29]=V):V=e[29],V},Zl=()=>{const t=k.useContext(Jl);if(!t)throw new Error("useHoverCardContext must be used within OxHoverCard");return t},Ag=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,forceMount:l,onPointerEnter:o,onPointerLeave:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,{align:d,clearCloseTimer:c,isClosing:u,isVisible:f,side:m,startCloseTimer:h}=Zl();let p;e[7]!==c||e[8]!==o?(p=S=>{c(),o?.(S)},e[7]=c,e[8]=o,e[9]=p):p=e[9];const g=p;let x;e[10]!==i||e[11]!==h?(x=S=>{h(),i?.(S)},e[10]=i,e[11]=h,e[12]=x):x=e[12];const v=x;if(!f&&!a)return null;let y;e[13]!==r?(y=z("ox-hovercard-animate min-w-64 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md",r),e[13]=r,e[14]=y):y=e[14];const w=u?"closing":"open";let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=b.jsx(Se.Arrow,{}),e[15]=C):C=e[15];let O;return e[16]!==d||e[17]!==n||e[18]!==s||e[19]!==g||e[20]!==v||e[21]!==m||e[22]!==y||e[23]!==w?(O=b.jsx(Bt,{children:b.jsxs(Se.Content,{align:d,className:y,side:m,sideOffset:8,...s,"data-ox-slot":"hovercard-content","data-ox-state":w,onPointerEnter:g,onPointerLeave:v,children:[C,n]})}),e[16]=d,e[17]=n,e[18]=s,e[19]=g,e[20]=v,e[21]=m,e[22]=y,e[23]=w,e[24]=O):O=e[24],O},_g=dt("OxHoverCardTrigger","div"),$g=t=>{const e=I.compilerRuntimeExports.c(27);let n,r,s,o,i,l;e[0]!==t?({asChild:l,children:n,className:r,onPointerEnter:o,onPointerLeave:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,{clearCloseTimer:d,openDelay:c,setOpen:u,startCloseTimer:f}=Zl(),m=k.useRef(null);let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{m.current&&(clearTimeout(m.current),m.current=null)},e[7]=h):h=e[7];const p=h;let g;e[8]!==d||e[9]!==o||e[10]!==c||e[11]!==u?(g=S=>{p(),d(),m.current=setTimeout(()=>{u(!0)},c),o?.(S)},e[8]=d,e[9]=o,e[10]=c,e[11]=u,e[12]=g):g=e[12];const x=g;let v;e[13]!==i||e[14]!==f?(v=S=>{p(),f(),i?.(S)},e[13]=i,e[14]=f,e[15]=v):v=e[15];const y=v;let w;e[16]!==r||e[17]!==s||e[18]!==x||e[19]!==y?(w={...s,className:r,"data-ox-slot":"hovercard-trigger",onPointerEnter:x,onPointerLeave:y},e[16]=r,e[17]=s,e[18]=x,e[19]=y,e[20]=w):w=e[20];const C=w;if(a){let S;return e[21]!==n||e[22]!==C?(S=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx(_g,{...C,children:n})}),e[21]=n,e[22]=C,e[23]=S):S=e[23],S}let O;return e[24]!==n||e[25]!==C?(O=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx("div",{...C,children:n})}),e[24]=n,e[25]=C,e[26]=O):O=e[26],O},Lg=Object.assign(Ig,{Content:Ag,Trigger:$g}),zg={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},Fg=({alt:t,className:e,fallback:n,height:r,objectFit:s,onLoadComplete:o,onLoadError:i,src:l,width:a,...d})=>{const[c,u]=k.useState("loading"),f=k.useRef(l);f.current!==l&&(f.current=l,u("loading"));const m=()=>{u("loaded"),o?.()},h=()=>{u("error"),i?.()},p=a&&r,g=s&&zg[s],x=c==="loading";return c==="error"?n?b.jsx("div",{className:z({"size-full":!p},e),"data-ox-slot":"image-fallback",style:{width:a,height:r},children:n}):b.jsxs("div",{className:z("flex flex-col items-center justify-center gap-2 bg-muted text-muted-foreground",{"size-full":!p},e),"data-ox-slot":"image-fallback",style:{width:a,height:r},children:[b.jsx(ue,{icon:ae.ImageOff,size:"md"}),b.jsx("span",{className:"text-sm",children:t})]}):b.jsxs("div",{className:z("relative",{"size-full":!p}),style:{width:a,height:r},children:[x?b.jsx(_t,{className:"absolute inset-0 size-full"}):null,b.jsx("img",{alt:t,className:z("size-full",g,{invisible:x},e),"data-ox-slot":"image",height:r,src:l,width:a,onError:h,onLoad:m,...d},l)]})},dr=t=>{const e=I.compilerRuntimeExports.c(82),{data:n,level:r,trailingComma:s}=t,o=s===void 0?!1:s,[i,l]=k.useState(r>2);if(n===null){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=b.jsx("span",{className:"text-muted-foreground",children:"null"}),e[0]=c):c=e[0];let u;e[1]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[1]=o,e[2]=u):u=e[2];let f;return e[3]!==u?(f=b.jsxs(b.Fragment,{children:[c,u]}),e[3]=u,e[4]=f):f=e[4],f}if(n===void 0){let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=b.jsx("span",{className:"text-muted-foreground",children:"undefined"}),e[5]=c):c=e[5];let u;e[6]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[6]=o,e[7]=u):u=e[7];let f;return e[8]!==u?(f=b.jsxs(b.Fragment,{children:[c,u]}),e[8]=u,e[9]=f):f=e[9],f}if(typeof n=="string"){let c;e[10]!==n?(c=b.jsxs("span",{className:We.green.text,children:['"',n,'"']}),e[10]=n,e[11]=c):c=e[11];let u;e[12]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[12]=o,e[13]=u):u=e[13];let f;return e[14]!==c||e[15]!==u?(f=b.jsxs(b.Fragment,{children:[c,u]}),e[14]=c,e[15]=u,e[16]=f):f=e[16],f}if(typeof n=="number"){let c;e[17]!==n?(c=b.jsx("span",{className:We.blue.text,children:n}),e[17]=n,e[18]=c):c=e[18];let u;e[19]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[19]=o,e[20]=u):u=e[20];let f;return e[21]!==c||e[22]!==u?(f=b.jsxs(b.Fragment,{children:[c,u]}),e[21]=c,e[22]=u,e[23]=f):f=e[23],f}if(typeof n=="boolean"){let c;e[24]!==n?(c=n.toString(),e[24]=n,e[25]=c):c=e[25];let u;e[26]!==c?(u=b.jsx("span",{className:We.amber.text,children:c}),e[26]=c,e[27]=u):u=e[27];let f;e[28]!==o?(f=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[28]=o,e[29]=f):f=e[29];let m;return e[30]!==u||e[31]!==f?(m=b.jsxs(b.Fragment,{children:[u,f]}),e[30]=u,e[31]=f,e[32]=m):m=e[32],m}if(Array.isArray(n)){if(n.length===0){let v;return e[33]===Symbol.for("react.memo_cache_sentinel")?(v=b.jsx("span",{className:"text-muted-foreground",children:"[]"}),e[33]=v):v=e[33],v}const c=i?"collapsed":"expanded";let u;e[34]!==i?(u=()=>l(!i),e[34]=i,e[35]=u):u=e[35];let f;e[36]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx("span",{className:"text-foreground",children:"["}),e[36]=f):f=e[36];let m;e[37]!==i||e[38]!==n.length?(m=i?b.jsxs("span",{className:"ml-1 text-muted-foreground",children:[n.length," item",n.length!==1?"s":""]}):null,e[37]=i,e[38]=n.length,e[39]=m):m=e[39];let h;e[40]!==c||e[41]!==u||e[42]!==m?(h=b.jsxs("button",{className:"ox-focus-ring text-muted-foreground hover:text-foreground","data-ox-state":c,onClick:u,children:[f,m]}),e[40]=c,e[41]=u,e[42]=m,e[43]=h):h=e[43];let p;e[44]!==i||e[45]!==n||e[46]!==r||e[47]!==o?(p=i?null:b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"ml-2 border-l border-muted pl-3",children:n.map((v,y)=>b.jsx("div",{className:"block",children:b.jsx(dr,{data:v,level:r+1,trailingComma:y<n.length-1})},y))}),b.jsxs("div",{children:[b.jsx("span",{className:"text-foreground",children:"]"}),o&&b.jsx("span",{className:"text-muted-foreground",children:","})]})]}),e[44]=i,e[45]=n,e[46]=r,e[47]=o,e[48]=p):p=e[48];let g;e[49]!==i?(g=i&&b.jsx("span",{className:"text-foreground",children:"]"}),e[49]=i,e[50]=g):g=e[50];let x;return e[51]!==h||e[52]!==p||e[53]!==g?(x=b.jsxs("div",{className:"inline","data-ox-slot":"json-array",children:[h,p,g]}),e[51]=h,e[52]=p,e[53]=g,e[54]=x):x=e[54],x}if(typeof n=="object"){let c;e[55]!==n?(c=Object.keys(n),e[55]=n,e[56]=c):c=e[56];const u=c;if(u.length===0){let w;return e[57]===Symbol.for("react.memo_cache_sentinel")?(w=b.jsx("span",{className:"text-muted-foreground",children:"{}"}),e[57]=w):w=e[57],w}const f=i?"collapsed":"expanded";let m;e[58]!==i?(m=()=>l(!i),e[58]=i,e[59]=m):m=e[59];let h;e[60]===Symbol.for("react.memo_cache_sentinel")?(h=b.jsx("span",{className:"text-foreground",children:"{"}),e[60]=h):h=e[60];let p;e[61]!==i||e[62]!==u.length?(p=i?b.jsxs("span",{className:"ml-1 text-muted-foreground",children:[u.length," key",u.length!==1?"s":""]}):null,e[61]=i,e[62]=u.length,e[63]=p):p=e[63];let g;e[64]!==f||e[65]!==m||e[66]!==p?(g=b.jsxs("button",{className:"ox-focus-ring text-muted-foreground hover:text-foreground","data-ox-state":f,onClick:m,children:[h,p]}),e[64]=f,e[65]=m,e[66]=p,e[67]=g):g=e[67];let x;e[68]!==i||e[69]!==n||e[70]!==u||e[71]!==r||e[72]!==o?(x=i?null:b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"ml-2 border-l border-muted pl-3",children:u.map((w,C)=>b.jsxs("div",{className:"block",children:[b.jsxs("span",{className:"text-foreground",children:['"',w,'"']}),b.jsx("span",{className:"text-muted-foreground",children:": "}),b.jsx(dr,{data:n[w],level:r+1,trailingComma:C<u.length-1})]},w))}),b.jsxs("div",{children:[b.jsx("span",{className:"text-foreground",children:"}"}),o&&b.jsx("span",{className:"text-muted-foreground",children:","})]})]}),e[68]=i,e[69]=n,e[70]=u,e[71]=r,e[72]=o,e[73]=x):x=e[73];let v;e[74]!==i?(v=i&&b.jsx("span",{className:"text-foreground",children:"}"}),e[74]=i,e[75]=v):v=e[75];let y;return e[76]!==g||e[77]!==x||e[78]!==v?(y=b.jsxs("div",{className:"inline",children:[g,x,v]}),e[76]=g,e[77]=x,e[78]=v,e[79]=y):y=e[79],y}const a=String(n);let d;return e[80]!==a?(d=b.jsx("span",{className:"text-muted-foreground",children:a}),e[80]=a,e[81]=d):d=e[81],d},Vg=t=>{const e=I.compilerRuntimeExports.c(27);let n,r,s;e[0]!==t?({className:n,value:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const[o,i]=k.useState(!1);let l;e[4]!==s?(l=(()=>{if(s==null)return{parsedData:null,isValid:!0,error:null};if(typeof s=="object")return{parsedData:s,isValid:!0,error:null};if(typeof s=="string")try{return{parsedData:JSON.parse(s),isValid:!0,error:null}}catch(C){const O=C;return{parsedData:null,isValid:!1,error:O instanceof Error?O.message:"Invalid JSON"}}return{parsedData:s,isValid:!0,error:null}})(),e[4]=s,e[5]=l):l=e[5];const{error:a,isValid:d,parsedData:c}=l;let u;e[6]!==c||e[7]!==s?(u=async()=>{const w=typeof s=="string"?s:JSON.stringify(c,null,2);try{await navigator.clipboard.writeText(w),i(!0),setTimeout(()=>i(!1),2e3)}catch(C){console.error("Failed to copy:",C)}},e[6]=c,e[7]=s,e[8]=u):u=e[8];const f=u;let m;d?o?m="copied":m="default":m="error";let h;e[9]!==n?(h=z("relative w-full overflow-auto rounded-lg border bg-card p-4 font-mono text-sm",n),e[9]=n,e[10]=h):h=e[10];const p=o?ae.Check:ae.Copy;let g;e[11]!==p?(g=b.jsx(ue,{icon:p}),e[11]=p,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==g?(x=b.jsx(Ze,{"aria-label":"Copy JSON to clipboard",className:"absolute top-1 right-1",size:"sm",variant:"ghost",onClick:f,children:g}),e[13]=f,e[14]=g,e[15]=x):x=e[15];let v;e[16]!==a||e[17]!==d||e[18]!==c||e[19]!==s?(v=b.jsx("div",{className:"pr-8 text-card-foreground",children:d?b.jsx(dr,{data:c,level:0}):b.jsxs("div",{className:"text-destructive-400",children:[b.jsx("div",{className:"font-medium",children:"Invalid JSON:"}),b.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:a}),b.jsx("div",{className:"mt-2 text-muted-foreground",children:b.jsx("pre",{className:"whitespace-pre-wrap",children:s})})]})}),e[16]=a,e[17]=d,e[18]=c,e[19]=s,e[20]=v):v=e[20];let y;return e[21]!==r||e[22]!==m||e[23]!==h||e[24]!==x||e[25]!==v?(y=b.jsxs("div",{className:h,...r,"data-ox-slot":"json-field","data-ox-state":m,children:[x,v]}),e[21]=r,e[22]=m,e[23]=h,e[24]=x,e[25]=v,e[26]=y):y=e[26],y},Bg=Object.assign(Vg,{Node:dr});function $s(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function Wg(t,e){return t.reduce((n,r,s)=>{const o=e.get(r);return o&&(n[s]=o),n},Array(t.length))}function Bn(t){return t!==null&&t>=0}function Hg(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Yg(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const Wn={scaleX:1,scaleY:1},qg=t=>{var e;let{rects:n,activeNodeRect:r,activeIndex:s,overIndex:o,index:i}=t;const l=(e=n[s])!=null?e:r;if(!l)return null;const a=Gg(n,i,s);if(i===s){const d=n[o];return d?{x:s<o?d.left+d.width-(l.left+l.width):d.left-l.left,y:0,...Wn}:null}return i>s&&i<=o?{x:-l.width-a,y:0,...Wn}:i<s&&i>=o?{x:l.width+a,y:0,...Wn}:{x:0,y:0,...Wn}};function Gg(t,e,n){const r=t[e],s=t[e-1],o=t[e+1];return!r||!s&&!o?0:n<e?s?r.left-(s.left+s.width):o.left-(r.left+r.width):o?o.left-(r.left+r.width):r.left-(s.left+s.width)}const Ls=t=>{let{rects:e,activeIndex:n,overIndex:r,index:s}=t;const o=$s(e,r,n),i=e[s],l=o[s];return!l||!i?null:{x:l.left-i.left,y:l.top-i.top,scaleX:l.width/i.width,scaleY:l.height/i.height}},Hn={scaleX:1,scaleY:1},zs=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:s,rects:o,overIndex:i}=t;const l=(e=o[n])!=null?e:r;if(!l)return null;if(s===n){const d=o[i];return d?{x:0,y:n<i?d.top+d.height-(l.top+l.height):d.top-l.top,...Hn}:null}const a=Ug(o,s,n);return s>n&&s<=i?{x:0,y:-l.height-a,...Hn}:s<n&&s>=i?{x:0,y:l.height+a,...Hn}:{x:0,y:0,...Hn}};function Ug(t,e,n){const r=t[e],s=t[e-1],o=t[e+1];return r?n<e?s?r.top-(s.top+s.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const ea="Sortable",ta=k.createContext({activeIndex:-1,containerId:ea,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Ls,disabled:{draggable:!1,droppable:!1}});function Fs(t){let{children:e,id:n,items:r,strategy:s=Ls,disabled:o=!1}=t;const{active:i,dragOverlay:l,droppableRects:a,over:d,measureDroppableContainers:c}=Sl(),u=Nn(ea,n),f=l.rect!==null,m=k.useMemo(()=>r.map(O=>typeof O=="object"&&"id"in O?O.id:O),[r]),h=i!=null,p=i?m.indexOf(i.id):-1,g=d?m.indexOf(d.id):-1,x=k.useRef(m),v=!Hg(m,x.current),y=g!==-1&&p===-1||v,w=Yg(o);lt(()=>{v&&h&&c(m)},[v,m,h,c]),k.useEffect(()=>{x.current=m},[m]);const C=k.useMemo(()=>({activeIndex:p,containerId:u,disabled:w,disableTransforms:y,items:m,overIndex:g,useDragOverlay:f,sortedRects:Wg(m,a),strategy:s}),[p,u,w.draggable,w.droppable,y,m,g,a,f,s]);return k.createElement(ta.Provider,{value:C},e)}const Kg=t=>{let{id:e,items:n,activeIndex:r,overIndex:s}=t;return $s(n,r,s).indexOf(e)},Xg=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:s,items:o,newIndex:i,previousItems:l,previousContainerId:a,transition:d}=t;return!d||!r||l!==o&&s===i?!1:n?!0:i!==s&&e===a},Qg={duration:200,easing:"ease"},na="transform",Jg=at.Transition.toString({property:na,duration:0,easing:"linear"}),Zg={roleDescription:"sortable"};function ex(t){let{disabled:e,index:n,node:r,rect:s}=t;const[o,i]=k.useState(null),l=k.useRef(n);return lt(()=>{if(!e&&n!==l.current&&r.current){const a=s.current;if(a){const d=on(r.current,{ignoreTransform:!0}),c={x:a.left-d.left,y:a.top-d.top,scaleX:a.width/d.width,scaleY:a.height/d.height};(c.x||c.y)&&i(c)}}n!==l.current&&(l.current=n)},[e,n,r,s]),k.useEffect(()=>{o&&i(null)},[o]),o}function Vs(t){let{animateLayoutChanges:e=Xg,attributes:n,disabled:r,data:s,getNewIndex:o=Kg,id:i,strategy:l,resizeObserverConfig:a,transition:d=Qg}=t;const{items:c,containerId:u,activeIndex:f,disabled:m,disableTransforms:h,sortedRects:p,overIndex:g,useDragOverlay:x,strategy:v}=k.useContext(ta),y=tx(r,m),w=c.indexOf(i),C=k.useMemo(()=>({sortable:{containerId:u,index:w,items:c},...s}),[u,s,w,c]),O=k.useMemo(()=>c.slice(c.indexOf(i)),[c,i]),{rect:S,node:E,isOver:R,setNodeRef:N}=js({id:i,data:C,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...a}}),{active:j,activatorEvent:D,activeNodeRect:P,attributes:M,setNodeRef:L,listeners:_,isDragging:T,over:A,setActivatorNodeRef:V,transform:$}=El({id:i,data:C,attributes:{...Zg,...n},disabled:y.draggable}),F=Tm(N,L),W=!!j,B=W&&!h&&Bn(f)&&Bn(g),H=!x&&T,G=H&&B?$:null,Y=B?G??(l??v)({rects:p,activeNodeRect:P,activeIndex:f,overIndex:g,index:w}):null,Q=Bn(f)&&Bn(g)?o({id:i,items:c,activeIndex:f,overIndex:g}):w,X=j?.id,K=k.useRef({activeId:X,items:c,newIndex:Q,containerId:u}),J=c!==K.current.items,q=e({active:j,containerId:u,isDragging:T,isSorting:W,id:i,index:w,items:c,newIndex:K.current.newIndex,previousItems:K.current.items,previousContainerId:K.current.containerId,transition:d,wasDragging:K.current.activeId!=null}),ne=ex({disabled:!q,index:w,node:E,rect:S});return k.useEffect(()=>{W&&K.current.newIndex!==Q&&(K.current.newIndex=Q),u!==K.current.containerId&&(K.current.containerId=u),c!==K.current.items&&(K.current.items=c)},[W,Q,u,c]),k.useEffect(()=>{if(X===K.current.activeId)return;if(X!=null&&K.current.activeId==null){K.current.activeId=X;return}const te=setTimeout(()=>{K.current.activeId=X},50);return()=>clearTimeout(te)},[X]),{active:j,activeIndex:f,attributes:M,data:C,rect:S,index:w,newIndex:Q,items:c,isOver:R,isSorting:W,isDragging:T,listeners:_,node:E,overIndex:g,over:A,setNodeRef:F,setActivatorNodeRef:V,setDroppableNodeRef:N,setDraggableNodeRef:L,transform:ne??Y,transition:Z()};function Z(){if(ne||J&&K.current.newIndex===w)return Jg;if(!(H&&!gr(D)||!d)&&(W||q))return at.Transition.toString({...d,property:na})}}function tx(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t?.draggable)!=null?n:e.draggable,droppable:(r=t?.droppable)!=null?r:e.droppable}}function ur(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const nx=[ge.Down,ge.Right,ge.Up,ge.Left],Bs=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:o,over:i,scrollableAncestors:l}}=e;if(nx.includes(t.code)){if(t.preventDefault(),!n||!r)return;const a=[];o.getEnabled().forEach(u=>{if(!u||u!=null&&u.disabled)return;const f=s.get(u.id);if(f)switch(t.code){case ge.Down:r.top<f.top&&a.push(u);break;case ge.Up:r.top>f.top&&a.push(u);break;case ge.Left:r.left>f.left&&a.push(u);break;case ge.Right:r.left<f.left&&a.push(u);break}});const d=al({collisionRect:r,droppableRects:s,droppableContainers:a});let c=il(d,"id");if(c===i?.id&&d.length>1&&(c=d[1].id),c!=null){const u=o.get(n.id),f=o.get(c),m=f?s.get(f.id):null,h=f?.node.current;if(h&&m&&u&&f){const g=xr(h).some((O,S)=>l[S]!==O),x=ra(u,f),v=rx(u,f),y=g||!x?{x:0,y:0}:{x:v?r.width-m.width:0,y:v?r.height-m.height:0},w={x:m.left,y:m.top};return y.x&&y.y?w:wn(w,y)}}}};function ra(t,e){return!ur(t)||!ur(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function rx(t,e){return!ur(t)||!ur(e)||!ra(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}const sa=k.createContext(null),sx=()=>{const t=k.useContext(sa);if(!t)throw new Error("KanbanCardHandle must be used within an OxKanban.Card");return t},oa=k.createContext(null),ox=()=>{const t=k.useContext(oa);if(!t)throw new Error("KanbanCard must be used within an OxKanban.Column");return t},ia=k.createContext(null),la=()=>{const t=k.useContext(ia);if(!t)throw new Error("Kanban components must be used within an OxKanban");return t},ix=t=>{const e=I.compilerRuntimeExports.c(47);let n,r,s,o,i,l,a,d;e[0]!==t?({children:n,className:r,columnGap:a,disabled:d,onMove:o,onReorder:i,style:l,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=a===void 0?16:a,u=d===void 0?!1:d,[f,m]=k.useState(null),[h,p]=k.useState(null);let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=new Map,e[9]=g):g=e[9];const x=k.useRef(g);let v;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=new Map,e[10]=v):v=e[10];const y=k.useRef(v);let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=new Map,e[11]=w):w=e[11];const C=k.useRef(w),O=k.useRef(null);let S;e[12]===Symbol.for("react.memo_cache_sentinel")?(S={coordinateGetter:Bs},e[12]=S):S=e[12];const E=Ss(Xt(Dn),Xt(jn,S));let R;e[13]===Symbol.for("react.memo_cache_sentinel")?(R=(X,K,J)=>{x.current.set(X,K),y.current.set(X,J)},e[13]=R):R=e[13];const N=R;let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=X=>{x.current.delete(X),y.current.delete(X)},e[14]=j):j=e[14];const D=j;let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=X=>{const K=String(X.active.id);m(K),p(y.current.get(K)??null)},e[15]=P):P=e[15];const M=P;let L;e[16]!==o||e[17]!==i?(L=X=>{const{active:K,over:J}=X;if(!J)return;const q=String(K.id),ne=String(J.id),Z=x.current.get(q);if(!Z)return;const te=x.current.get(ne)??ne,le=C.current.get(te)??[];let ce=le.indexOf(ne);ce===-1&&(ce=le.length);const fe=O.current;if(!(fe?.column===te&&fe?.index===ce))if(O.current={column:te,index:ce},Z===te){const he=le.indexOf(q);he!==ce&&he!==-1&&i&&i(q,Z,he,ce)}else o(q,Z,te,ce)},e[16]=o,e[17]=i,e[18]=L):L=e[18];const _=L;let T;e[19]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{m(null),p(null),O.current=null},e[19]=T):T=e[19];const A=T;let V;e[20]!==h||e[21]!==f||e[22]!==u?(V={activeCardContent:h,activeId:f,columnCardIdsMap:C,disabled:u,registerCard:N,unregisterCard:D},e[20]=h,e[21]=f,e[22]=u,e[23]=V):V=e[23];const $=V,F=u?void 0:E;let W;e[24]!==r?(W=z("flex",r),e[24]=r,e[25]=W):W=e[25];let B;e[26]!==c||e[27]!==l?(B={gap:c,...l},e[26]=c,e[27]=l,e[28]=B):B=e[28];let H;e[29]!==n||e[30]!==s||e[31]!==W||e[32]!==B?(H=b.jsx("div",{className:W,"data-ox-slot":"kanban",style:B,...s,children:n}),e[29]=n,e[30]=s,e[31]=W,e[32]=B,e[33]=H):H=e[33];let G;e[34]!==h||e[35]!==f?(G=f&&h?b.jsx("div",{className:"cursor-grabbing rounded-md border border-primary bg-background p-3 shadow-xl ring-2 ring-primary/20",children:h}):null,e[34]=h,e[35]=f,e[36]=G):G=e[36];let U;e[37]!==G?(U=b.jsx(rp,{children:G}),e[37]=G,e[38]=U):U=e[38];let Y;e[39]!==_||e[40]!==F||e[41]!==H||e[42]!==U?(Y=b.jsxs(yr,{collisionDetection:al,sensors:F,onDragEnd:A,onDragOver:_,onDragStart:M,children:[H,U]}),e[39]=_,e[40]=F,e[41]=H,e[42]=U,e[43]=Y):Y=e[43];let Q;return e[44]!==$||e[45]!==Y?(Q=b.jsx(ia.Provider,{value:$,children:Y}),e[44]=$,e[45]=Y,e[46]=Q):Q=e[46],Q},lx=t=>{const e=I.compilerRuntimeExports.c(48);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,disabled:l,id:o,style:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,[d,c]=k.useState(!1),{registerCard:u,unregisterCard:f}=la(),{columnId:m,disabled:h}=ox(),p=h||a;let g,x;e[7]!==n||e[8]!==m||e[9]!==o||e[10]!==u||e[11]!==f?(g=()=>(u(o,m,n),()=>{f(o)}),x=[n,m,o,u,f],e[7]=n,e[8]=m,e[9]=o,e[10]=u,e[11]=f,e[12]=g,e[13]=x):(g=e[12],x=e[13]),k.useEffect(g,x);let v;e[14]!==p||e[15]!==o?(v={disabled:p,id:o},e[14]=p,e[15]=o,e[16]=v):v=e[16];const{attributes:y,isDragging:w,listeners:C,setActivatorNodeRef:O,setNodeRef:S,transform:E,transition:R}=Vs(v);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{c(!0)},e[17]=N):N=e[17];const j=N,D=w?.5:1;let P;e[18]!==E?(P=at.Transform.toString(E),e[18]=E,e[19]=P):P=e[19];let M;e[20]!==i||e[21]!==D||e[22]!==P||e[23]!==R?(M={opacity:D,transform:P,transition:R,...i},e[20]=i,e[21]=D,e[22]=P,e[23]=R,e[24]=M):M=e[24];const L=M;let _;e[25]!==y||e[26]!==p||e[27]!==w||e[28]!==C||e[29]!==O?(_={attributes:y,disabled:p,isDragging:w,listeners:C,registerHandle:j,setActivatorNodeRef:O},e[25]=y,e[26]=p,e[27]=w,e[28]=C,e[29]=O,e[30]=_):_=e[30];const T=_;let A;e[31]!==y||e[32]!==d||e[33]!==C?(A=d?{}:{...y,...C},e[31]=y,e[32]=d,e[33]=C,e[34]=A):A=e[34];const V=A;let $;e[35]!==r?($=z("rounded-md bg-background p-3 shadow-sm",r),e[35]=r,e[36]=$):$=e[36];const F=w?"dragging":void 0;let W;e[37]!==L||e[38]!==n||e[39]!==s||e[40]!==V||e[41]!==S||e[42]!==$||e[43]!==F?(W=b.jsx("div",{className:$,"data-ox-slot":"kanban-card","data-ox-state":F,ref:S,style:L,...V,...s,children:n}),e[37]=L,e[38]=n,e[39]=s,e[40]=V,e[41]=S,e[42]=$,e[43]=F,e[44]=W):W=e[44];let B;return e[45]!==T||e[46]!==W?(B=b.jsx(sa.Provider,{value:T,children:W}),e[45]=T,e[46]=W,e[47]=B):B=e[47],B},ax=t=>{const e=I.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{attributes:o,disabled:i,listeners:l,registerHandle:a,setActivatorNodeRef:d}=sx();let c,u;e[4]!==a?(c=()=>{a()},u=[a],e[4]=a,e[5]=c,e[6]=u):(c=e[5],u=e[6]),k.useEffect(c,u);let f;e[7]!==r||e[8]!==i?(f=z("flex cursor-grab touch-none items-center justify-center",{"cursor-not-allowed opacity-50":i},r),e[7]=r,e[8]=i,e[9]=f):f=e[9];let m;e[10]!==n?(m=n??b.jsx(ae.GripVertical,{className:"size-4 text-muted-foreground"}),e[10]=n,e[11]=m):m=e[11];let h;return e[12]!==o||e[13]!==i||e[14]!==s||e[15]!==l||e[16]!==d||e[17]!==f||e[18]!==m?(h=b.jsx("button",{"aria-label":"Drag to reorder",className:f,disabled:i,ref:d,type:"button",...o,...l,...s,"data-ox-slot":"kanban-card-handle",children:m}),e[12]=o,e[13]=i,e[14]=s,e[15]=l,e[16]=d,e[17]=f,e[18]=m,e[19]=h):h=e[19],h},aa=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mt-3",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"kanban-column-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},ca=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mb-3 font-medium",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"kanban-column-header",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},cx=t=>{const e=I.compilerRuntimeExports.c(53);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,disabled:d,emptyState:o,gap:c,heading:i,id:l,style:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=d===void 0?!1:d,f=c===void 0?8:c,{columnCardIdsMap:m,disabled:h}=la(),p=h||u;let g;e[10]!==l?(g={id:l},e[10]=l,e[11]=g):g=e[11];const{isOver:x,setNodeRef:v}=js(g);let y;e[12]!==n?(y={cards:[],footer:null,header:null},k.Children.forEach(n,W=>{k.isValidElement(W)&&(W.type===ca?y.header=W:W.type===aa?y.footer=W:y.cards.push(W))}),e[12]=n,e[13]=y):y=e[13];const{cards:w,footer:C,header:O}=y;let S;if(e[14]!==w){S=[];for(const W of w){const B=W.props;B.id&&S.push(B.id)}e[14]=w,e[15]=S}else S=e[15];const E=S;let R;e[16]!==m.current||e[17]!==l||e[18]!==E?(R=()=>{const W=m.current;return W.set(l,E),()=>{W.delete(l)}},e[16]=m.current,e[17]=l,e[18]=E,e[19]=R):R=e[19];let N;e[20]!==m||e[21]!==l||e[22]!==E?(N=[l,E,m],e[20]=m,e[21]=l,e[22]=E,e[23]=N):N=e[23],k.useEffect(R,N);let j;e[24]!==p||e[25]!==l?(j={columnId:l,disabled:p},e[24]=p,e[25]=l,e[26]=j):j=e[26];const D=j;let P;e[27]!==r||e[28]!==x?(P=z("flex min-w-64 flex-col rounded-lg bg-muted/50 p-3",{"ring-2 ring-primary":x},r),e[27]=r,e[28]=x,e[29]=P):P=e[29];const M=x?"over":void 0;let L;e[30]!==O||e[31]!==i?(L=O??(i&&b.jsx("div",{className:"mb-3 font-medium",children:i})),e[30]=O,e[31]=i,e[32]=L):L=e[32];let _;e[33]!==f?(_={gap:f},e[33]=f,e[34]=_):_=e[34];const T=w.length>0?w:o;let A;e[35]!==_||e[36]!==T?(A=b.jsx("div",{className:"flex flex-1 flex-col",style:_,children:T}),e[35]=_,e[36]=T,e[37]=A):A=e[37];let V;e[38]!==E||e[39]!==A?(V=b.jsx(Fs,{items:E,strategy:zs,children:A}),e[38]=E,e[39]=A,e[40]=V):V=e[40];let $;e[41]!==s||e[42]!==C||e[43]!==v||e[44]!==a||e[45]!==V||e[46]!==P||e[47]!==M||e[48]!==L?($=b.jsxs("div",{className:P,ref:v,style:a,...s,"data-ox-slot":"kanban-column","data-ox-state":M,children:[L,V,C]}),e[41]=s,e[42]=C,e[43]=v,e[44]=a,e[45]=V,e[46]=P,e[47]=M,e[48]=L,e[49]=$):$=e[49];let F;return e[50]!==D||e[51]!==$?(F=b.jsx(oa.Provider,{value:D,children:$}),e[50]=D,e[51]=$,e[52]=F):F=e[52],F},dx=Object.assign(ix,{Card:lx,CardHandle:ax,Column:cx,ColumnFooter:aa,ColumnHeader:ca}),ux=dt("OxLink","a"),fx=t=>{const e=I.compilerRuntimeExports.c(26);let n,r,s,o,i,l,a,d;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,size:a,variant:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=i===void 0?!1:i,u=l===void 0?!1:l,f=a===void 0?"md":a,m=d===void 0?"primary":d;let h;e[9]!==r||e[10]!==f||e[11]!==m?(h=z(Sd({variant:m,size:f}),r),e[9]=r,e[10]=f,e[11]=m,e[12]=h):h=e[12];const p=h,g=u||void 0,x=u?void 0:o,v=u?-1:void 0,y=u?mx:void 0;let w;e[13]!==p||e[14]!==s||e[15]!==g||e[16]!==x||e[17]!==v||e[18]!==y?(w={"aria-disabled":g,href:x,tabIndex:v,onClick:y,className:p,...s,"data-ox-slot":"link"},e[13]=p,e[14]=s,e[15]=g,e[16]=x,e[17]=v,e[18]=y,e[19]=w):w=e[19];const C=w;if(c){let S;return e[20]!==n||e[21]!==C?(S=b.jsx(ux,{...C,children:n}),e[20]=n,e[21]=C,e[22]=S):S=e[22],S}let O;return e[23]!==n||e[24]!==C?(O=b.jsx("a",{...C,children:n}),e[23]=n,e[24]=C,e[25]=O):O=e[25],O};function mx(t){return t.preventDefault()}const px=t=>{const e=I.compilerRuntimeExports.c(9),{children:n,className:r,columns:s,gap:o}=t,i=o===void 0?16:o,l=k.useRef(null);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const d=k.useRef(a),c=k.Children.toArray(n),{containerHeight:u,positions:f}=I.useMasonry(l,d,s,i,c.length);let m;e[1]!==r?(m=z("relative",r),e[1]=r,e[2]=m):m=e[2];const h="masonry",p="list",g=u||void 0;let x;e[3]!==g?(x={height:g},e[3]=g,e[4]=x):x=e[4];const v=c.map((w,C)=>{const O=f[C],S=O!==void 0,E=k.isValidElement(w)?w.key:C;return b.jsx("div",{"data-index":C,ref:R=>{d.current[C]=R},role:"listitem",style:{position:"absolute",transform:S?`translate(${O.x}px, ${O.y}px)`:void 0,visibility:S?"visible":"hidden",width:S?O.width:void 0},children:w},E??C)});let y;return e[5]!==m||e[6]!==x||e[7]!==v?(y=b.jsx("div",{className:m,"data-ox-slot":h,ref:l,role:p,style:x,children:v}),e[5]=m,e[6]=x,e[7]=v,e[8]=y):y=e[8],y},da=k.createContext(null),hx={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"},gx=t=>{const e=I.compilerRuntimeExports.c(59);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,closeOnOutsideClick:l,isOpen:o,onClose:i,persistent:a,showCloseButton:d,size:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=l===void 0?!0:l,f=a===void 0?!1:a,m=d===void 0?!0:d,h=c===void 0?"sm":c,p=k.useId(),g=k.useId(),x=k.useRef(null),[v,y]=k.useState(!1);let w;e[10]!==i?(w=Q=>Q?void 0:i?.(),e[10]=i,e[11]=w):w=e[11];let C;e[12]!==o||e[13]!==w?(C={value:o,onChange:w,defaultValue:!1,name:"OxDialog"},e[12]=o,e[13]=w,e[14]=C):C=e[14];const[O,S]=I.useControllableState(C),E=v&&O;let R;e[15]!==E?(R={containerRef:x,options:{enabled:E,restoreFocus:!0,trapFocus:!0,autoFocus:!0}},e[15]=E,e[16]=R):R=e[16],I.useFocus(R);let N;e[17]!==S?(N=()=>S(!1),e[17]=S,e[18]=N):N=e[18];let j;e[19]!==g||e[20]!==f||e[21]!==m||e[22]!==N||e[23]!==p?(j={onClose:N,titleId:p,bodyId:g,persistent:f,showCloseButton:m},e[19]=g,e[20]=f,e[21]=m,e[22]=N,e[23]=p,e[24]=j):j=e[24];const D=j;let P;e[25]!==O||e[26]!==v?(P=Q=>{Q.target===x.current&&!O&&v&&(y(!1),x.current?.close())},e[25]=O,e[26]=v,e[27]=P):P=e[27];const M=P;let L;e[28]!==O||e[29]!==f||e[30]!==S?(L=()=>{f&&O?x.current?.showModal():f||S(!1)},e[28]=O,e[29]=f,e[30]=S,e[31]=L):L=e[31];const _=L;let T,A;e[32]!==O?(T=()=>{O&&y(!0)},A=[O],e[32]=O,e[33]=T,e[34]=A):(T=e[33],A=e[34]),k.useEffect(T,A);let V,$;e[35]!==O||e[36]!==v?(V=()=>{const Q=x.current;if(!(!Q||!v))return O&&(document.body.classList.add("overflow-hidden"),Q.showModal()),xx},$=[O,v],e[35]=O,e[36]=v,e[37]=V,e[38]=$):(V=e[37],$=e[38]),k.useEffect(V,$);let F,W;if(e[39]!==u||e[40]!==_||e[41]!==f||e[42]!==v?(F=()=>{const Q=x.current;if(!Q||!v)return;const X=q=>{q.key==="Escape"&&f&&(q.preventDefault(),q.stopPropagation())},K=q=>{q.preventDefault(),_()},J=q=>{u&&q.target===Q&&_()};return document.addEventListener("keydown",X),Q.addEventListener("cancel",K),Q.addEventListener("click",J),Q.addEventListener("close",_),()=>{document.removeEventListener("keydown",X),Q.removeEventListener("cancel",K),Q.removeEventListener("click",J),Q.removeEventListener("close",_)}},W=[v,u,_,f],e[39]=u,e[40]=_,e[41]=f,e[42]=v,e[43]=F,e[44]=W):(F=e[43],W=e[44]),k.useEffect(F,W),!v)return null;const B=hx[h];let H;e[45]!==r||e[46]!==B?(H=z("fixed inset-0 m-auto grid h-fit w-full gap-4 rounded-lg border bg-background p-6 text-foreground shadow-lg","ox-dialog-animation ox-dialog-backdrop","max-w-[calc(100%-2rem)]",B,r),e[45]=r,e[46]=B,e[47]=H):H=e[47];const G=O?"open":"closing";let U;e[48]!==n||e[49]!==D?(U=b.jsx(da.Provider,{value:D,children:n}),e[48]=n,e[49]=D,e[50]=U):U=e[50];let Y;return e[51]!==g||e[52]!==s||e[53]!==M||e[54]!==H||e[55]!==G||e[56]!==U||e[57]!==p?(Y=rt.createPortal(b.jsx("dialog",{"aria-describedby":g,"aria-labelledby":p,className:H,ref:x,role:"dialog",onAnimationEnd:M,...s,"data-ox-slot":"dialog","data-ox-state":G,children:U}),document.body),e[51]=g,e[52]=s,e[53]=M,e[54]=H,e[55]=G,e[56]=U,e[57]=p,e[58]=Y):Y=e[58],Y};function xx(){document.body.classList.remove("overflow-hidden")}const ua=()=>{const t=k.useContext(da);if(!t)throw new Error("Dialog sub-components must be used within OxDialog");return t},bx=t=>{const e=I.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{bodyId:o}=ua();let i;e[4]!==r?(i=z("text-sm",r),e[4]=r,e[5]=i):i=e[5];let l;return e[6]!==o||e[7]!==n||e[8]!==s||e[9]!==i?(l=b.jsx("div",{id:o,className:i,...s,"data-ox-slot":"dialog-body",children:n}),e[6]=o,e[7]=n,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},vx=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("flex flex-col-reverse gap-2","sm:flex-row sm:justify-end",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"dialog-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},yx=t=>{const e=I.compilerRuntimeExports.c(17);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{onClose:o,persistent:i,showCloseButton:l,titleId:a}=ua(),d=l&&!i;let c;e[4]!==r?(c=z("flex flex-col gap-2 text-center sm:text-left",r),e[4]=r,e[5]=c):c=e[5];let u;e[6]!==n||e[7]!==s||e[8]!==c||e[9]!==a?(u=b.jsx("div",{id:a,className:c,...s,"data-ox-slot":"dialog-header",children:n}),e[6]=n,e[7]=s,e[8]=c,e[9]=a,e[10]=u):u=e[10];let f;e[11]!==o||e[12]!==d?(f=d?b.jsx(Ze,{"aria-label":"Close Dialog",className:"absolute top-4 right-4",variant:"ghost",onClick:o,children:b.jsx(ue,{icon:ae.X})}):null,e[11]=o,e[12]=d,e[13]=f):f=e[13];let m;return e[14]!==u||e[15]!==f?(m=b.jsxs(b.Fragment,{children:[u,f]}),e[14]=u,e[15]=f,e[16]=m):m=e[16],m},wx=Object.assign(gx,{Body:bx,Footer:vx,Header:yx}),fa=640,gn=k.createContext(null),Rr=()=>{const t=k.useContext(gn);if(!t)throw new Error("useNotificationsContext must be used within a NotificationsContext.Provider");return t},ma=t=>{const e=I.compilerRuntimeExports.c(43);let n,r,s,o,i,l,a,d,c,u,f;e[0]!==t?({children:n,className:r,icon:o,img:i,message:l,path:a,timestamp:u,title:f,type:d,unread:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11]);const m=d===void 0?"default":d,h=c===void 0?!1:c,{isMobile:p,onItemClick:g,setOpen:x}=Rr(),v=st[m].icon;let y;e[12]!==o||e[13]!==i||e[14]!==p||e[15]!==l||e[16]!==g||e[17]!==x||e[18]!==u||e[19]!==f||e[20]!==m||e[21]!==h?(y=()=>{const N={id:crypto.randomUUID(),icon:o,img:i,message:l,read:!h,timestamp:u||new Date,title:f||"",type:m};g?.(N),p&&x(!1)},e[12]=o,e[13]=i,e[14]=p,e[15]=l,e[16]=g,e[17]=x,e[18]=u,e[19]=f,e[20]=m,e[21]=h,e[22]=y):y=e[22];const w=y;let C;e[23]!==n||e[24]!==o||e[25]!==i||e[26]!==l||e[27]!==a||e[28]!==v||e[29]!==u||e[30]!==f||e[31]!==m||e[32]!==h?(C=n||b.jsxs(b.Fragment,{children:[i?b.jsx(gs,{alt:"User avatar",className:"mt-0.5","data-ox-slot":"notifications-icon",fallback:"NA",size:"sm",src:i}):b.jsx(ue.Box,{className:"mt-0.5",color:m,size:"md",children:b.jsx(ue,{icon:o??v,path:a})}),b.jsxs("div",{className:"min-w-0 flex-1","data-ox-slot":"notifications-content",children:[f&&b.jsx("h5",{className:"mb-1 text-sm leading-tight font-semibold text-pretty text-foreground",children:f}),l&&b.jsx("p",{className:"mb-1 text-xs leading-4",children:l}),u&&b.jsx("p",{className:"text-xs text-muted-foreground",children:fs(u)})]}),h&&b.jsx("div",{className:"mt-1.5 size-2 shrink-0 rounded-full bg-destructive","data-ox-slot":"notifications-unread"})]}),e[23]=n,e[24]=o,e[25]=i,e[26]=l,e[27]=a,e[28]=v,e[29]=u,e[30]=f,e[31]=m,e[32]=h,e[33]=C):C=e[33];const O=C;let S;e[34]!==r||e[35]!==h?(S=z("col-span-3 grid cursor-pointer grid-cols-subgrid items-start gap-3 p-3 text-left","ox-focus-ring hover:bg-neutral-accent/60",{"bg-neutral-accent/40":h},r),e[34]=r,e[35]=h,e[36]=S):S=e[36];const E=h?"unread":"read";let R;return e[37]!==s||e[38]!==w||e[39]!==O||e[40]!==S||e[41]!==E?(R=b.jsx("li",{className:"contents",children:b.jsx("button",{className:S,"data-ox-slot":"notifications-button",...s,"data-ox-state":E,onClick:w,children:O})}),e[37]=s,e[38]=w,e[39]=O,e[40]=S,e[41]=E,e[42]=R):R=e[42],R},ri=z("grid min-h-0 flex-1 auto-rows-min grid-cols-[auto_1fr_auto] overflow-y-auto",'[&_[data-ox-slot="notifications-icon"]]:col-start-1 [&_[data-ox-slot="notifications-icon"]]:justify-self-center','[&_[data-ox-slot="notifications-content"]]:cols-start-2','[&_[data-ox-slot="notifications-unread"]]:col-start-3 [&_[data-ox-slot="notifications-unread"]]:justify-self-end'),fr=t=>{const e=I.compilerRuntimeExports.c(52);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{emptyMessage:o,isMobile:i,items:l,onMarkAllRead:a,setOpen:d,unreadCount:c}=Rr(),u=l.length>0,f=c>0;let m;e[4]!==i||e[5]!==a||e[6]!==d?(m=()=>{a?.(),i&&d(!1)},e[4]=i,e[5]=a,e[6]=d,e[7]=m):m=e[7];const h=m;let p;e[8]!==n||e[9]!==o||e[10]!==u||e[11]!==l?(p=n||b.jsx(b.Fragment,{children:u?l.map(Cx):b.jsxs("li",{className:"col-span-3 px-3 py-8 text-center",role:"status",children:[b.jsx(ue,{className:"mx-auto mb-2 opacity-50",icon:ae.Bell,size:"3xl"}),b.jsx("p",{className:"text-sm opacity-50",children:o})]})}),e[8]=n,e[9]=o,e[10]=u,e[11]=l,e[12]=p):p=e[12];const g=p;if(i){let S;e[13]!==d?(S=()=>d(!1),e[13]=d,e[14]=S):S=e[14];let E;e[15]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx(ue,{icon:ae.X}),e[15]=E):E=e[15];let R;e[16]!==S?(R=b.jsx(Ze,{"aria-label":"Close notifications",variant:"ghost",onClick:S,children:E}),e[16]=S,e[17]=R):R=e[17];let N;e[18]===Symbol.for("react.memo_cache_sentinel")?(N=b.jsx("h5",{className:"text-sm font-semibold text-foreground",children:"Notifications"}),e[18]=N):N=e[18];let j;e[19]!==h||e[20]!==f||e[21]!==a?(j=f&&a&&b.jsx("button",{className:"cursor-pointer text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:h,children:"Mark all read"}),e[19]=h,e[20]=f,e[21]=a,e[22]=j):j=e[22];let D;e[23]!==j?(D=b.jsx("div",{className:"flex items-center gap-2",children:j}),e[23]=j,e[24]=D):D=e[24];let P;e[25]!==R||e[26]!==D?(P=b.jsxs("div",{className:"flex h-15 items-center justify-between border-b border-border px-4",children:[R,N,D]}),e[25]=R,e[26]=D,e[27]=P):P=e[27];let M;e[28]!==r?(M=z(ri,r),e[28]=r,e[29]=M):M=e[29];let L;e[30]!==s||e[31]!==g||e[32]!==M?(L=b.jsx("ul",{className:M,"data-ox-slot":"notifications-body",...s,children:g}),e[30]=s,e[31]=g,e[32]=M,e[33]=L):L=e[33];let _;return e[34]!==L||e[35]!==P?(_=b.jsxs(sr.Content,{closeOnOutsideClick:!0,side:"right",children:[P,L]}),e[34]=L,e[35]=P,e[36]=_):_=e[36],_}let x;e[37]===Symbol.for("react.memo_cache_sentinel")?(x=b.jsx("h5",{className:"text-sm font-semibold text-foreground",children:"Notifications"}),e[37]=x):x=e[37];let v;e[38]!==f||e[39]!==a?(v=f&&a&&b.jsx("button",{className:"ox-focus-ring cursor-pointer rounded-lg p-1 text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:a,children:"Mark all read"}),e[38]=f,e[39]=a,e[40]=v):v=e[40];let y;e[41]!==v?(y=b.jsx(Jt.Header,{className:"p-2",children:b.jsxs("div",{className:"flex items-center justify-between",children:[x,v]})}),e[41]=v,e[42]=y):y=e[42];let w;e[43]!==r?(w=z("w-85",ri,r),e[43]=r,e[44]=w):w=e[44];let C;e[45]!==s||e[46]!==g||e[47]!==w?(C=b.jsx("ul",{className:w,"data-ox-slot":"notifications-body",...s,children:g}),e[45]=s,e[46]=g,e[47]=w,e[48]=C):C=e[48];let O;return e[49]!==y||e[50]!==C?(O=b.jsxs(Jt.Content,{className:"p-0",children:[y,C]}),e[49]=y,e[50]=C,e[51]=O):O=e[51],O};function Cx(t,e){return b.jsx(ma,{className:z({"border-t border-border":e>0}),icon:t.icon,img:t.img,message:t.message,path:t.path,timestamp:t.timestamp,title:t.title,type:t.type,unread:!t.read},t.id)}const mr=t=>{const e=I.compilerRuntimeExports.c(44);let n,r,s,o,i;e[0]!==t?({children:n,className:r,customIcon:s,unreadCount:i,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const{disabled:l,isMobile:a,open:d,setOpen:c,unreadCount:u}=Rr(),f=i??u,m=f>0,h=s??ae.Bell,p=`Notifications${m?` (${f} unread)`:""}`;if(a){let O;e[6]!==l?(O=z({"opacity-50":l}),e[6]=l,e[7]=O):O=e[7];const S=d?"open":"closed";let E;e[8]!==c?(E=()=>c(!0),e[8]=c,e[9]=E):E=e[9];let R;e[10]!==n||e[11]!==h?(R=n||b.jsx(ue,{icon:h,size:"md"}),e[10]=n,e[11]=h,e[12]=R):R=e[12];let N;e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==o||e[17]!==S||e[18]!==E||e[19]!==R?(N=b.jsx(Ze,{"aria-label":p,className:r,disabled:l,variant:"ghost",...o,"data-ox-state":S,onClick:E,children:R}),e[13]=p,e[14]=r,e[15]=l,e[16]=o,e[17]=S,e[18]=E,e[19]=R,e[20]=N):N=e[20];let j;return e[21]!==O||e[22]!==N||e[23]!==f?(j=b.jsx(Zr,{className:O,count:f,variant:"primary",children:N}),e[21]=O,e[22]=N,e[23]=f,e[24]=j):j=e[24],j}let g;e[25]!==l?(g=z({"opacity-50":l}),e[25]=l,e[26]=g):g=e[26];let x;e[27]!==r||e[28]!==d?(x=z("flex h-10 min-w-10 items-center justify-center rounded-lg border border-transparent bg-transparent px-2 text-sm","ox-focus-ring enabled:cursor-pointer enabled:text-foreground enabled:hover:bg-neutral-accent disabled:ox-default-disabled",{"bg-neutral-accent":d},r),e[27]=r,e[28]=d,e[29]=x):x=e[29];const v=d?"open":"closed";let y;e[30]!==n||e[31]!==h?(y=n||b.jsx(ue,{icon:h,size:"md"}),e[30]=n,e[31]=h,e[32]=y):y=e[32];let w;e[33]!==p||e[34]!==l||e[35]!==o||e[36]!==x||e[37]!==v||e[38]!==y?(w=b.jsx(Jt.Trigger,{"aria-label":p,className:x,"data-ox-slot":"notifications-trigger",disabled:l,hideIcon:!0,...o,"data-ox-state":v,children:y}),e[33]=p,e[34]=l,e[35]=o,e[36]=x,e[37]=v,e[38]=y,e[39]=w):w=e[39];let C;return e[40]!==g||e[41]!==w||e[42]!==f?(C=b.jsx(Zr,{className:g,count:f,variant:"primary",children:w}),e[40]=g,e[41]=w,e[42]=f,e[43]=C):C=e[43],C},Ox=t=>{const e=I.compilerRuntimeExports.c(68);let n,r,s,o,i,l,a,d;e[0]!==t?({children:n,disabled:i,emptyMessage:l,items:a,onItemClick:s,onMarkAllRead:o,unreadCount:d,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=i===void 0?!1:i,u=l===void 0?"No notifications":l;let f;e[9]!==a?(f=a===void 0?[]:a,e[9]=a,e[10]=f):f=e[10];const m=f,h=d===void 0?0:d,[p,g]=k.useState(!1),[x,v]=k.useState(!1);let y,w;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const D=()=>{v(window.innerWidth<fa)};return D(),window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},w=[],e[11]=y,e[12]=w):(y=e[11],w=e[12]),k.useEffect(y,w);let C;e[13]!==c||e[14]!==u||e[15]!==x||e[16]!==m||e[17]!==s||e[18]!==o||e[19]!==p||e[20]!==h?(C={disabled:c,emptyMessage:u,isMobile:x,items:m,open:p,setOpen:g,unreadCount:h,onItemClick:s,onMarkAllRead:o},e[13]=c,e[14]=u,e[15]=x,e[16]=m,e[17]=s,e[18]=o,e[19]=p,e[20]=h,e[21]=C):C=e[21];const O=C;if(n){let D;e[22]!==n?(D=k.Children.toArray(n).find(Ex),e[22]=n,e[23]=D):D=e[23];const P=D;let M;e[24]!==n?(M=k.Children.toArray(n).find(Sx),e[24]=n,e[25]=M):M=e[25];const L=M;if(x){let V;e[26]!==L||e[27]!==p?(V=b.jsx(sr,{open:p,onOpenChange:g,children:L}),e[26]=L,e[27]=p,e[28]=V):V=e[28];let $;e[29]!==r||e[30]!==V||e[31]!==P?($=b.jsxs("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"mobile",children:[P,V]}),e[29]=r,e[30]=V,e[31]=P,e[32]=$):$=e[32];let F;return e[33]!==O||e[34]!==$?(F=b.jsx(gn.Provider,{value:O,children:$}),e[33]=O,e[34]=$,e[35]=F):F=e[35],F}let _;e[36]!==L||e[37]!==c||e[38]!==p||e[39]!==P?(_=b.jsxs(Jt,{align:"end",disabled:c,open:p,side:"bottom",onOpenChange:g,children:[P,L]}),e[36]=L,e[37]=c,e[38]=p,e[39]=P,e[40]=_):_=e[40];let T;e[41]!==r||e[42]!==_?(T=b.jsx("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"desktop",children:_}),e[41]=r,e[42]=_,e[43]=T):T=e[43];let A;return e[44]!==O||e[45]!==T?(A=b.jsx(gn.Provider,{value:O,children:T}),e[44]=O,e[45]=T,e[46]=A):A=e[46],A}if(x){let D;e[47]===Symbol.for("react.memo_cache_sentinel")?(D=b.jsx(mr,{}),e[47]=D):D=e[47];let P;e[48]===Symbol.for("react.memo_cache_sentinel")?(P=b.jsx(fr,{}),e[48]=P):P=e[48];let M;e[49]!==p?(M=b.jsx(sr,{open:p,onOpenChange:g,children:P}),e[49]=p,e[50]=M):M=e[50];let L;e[51]!==r||e[52]!==M?(L=b.jsxs("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"mobile",children:[D,M]}),e[51]=r,e[52]=M,e[53]=L):L=e[53];let _;return e[54]!==O||e[55]!==L?(_=b.jsx(gn.Provider,{value:O,children:L}),e[54]=O,e[55]=L,e[56]=_):_=e[56],_}let S,E;e[57]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx(mr,{}),S=b.jsx(fr,{}),e[57]=S,e[58]=E):(S=e[57],E=e[58]);let R;e[59]!==c||e[60]!==p?(R=b.jsxs(Jt,{align:"end",disabled:c,open:p,side:"bottom",onOpenChange:g,children:[E,S]}),e[59]=c,e[60]=p,e[61]=R):R=e[61];let N;e[62]!==r||e[63]!==R?(N=b.jsx("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"desktop",children:R}),e[62]=r,e[63]=R,e[64]=N):N=e[64];let j;return e[65]!==O||e[66]!==N?(j=b.jsx(gn.Provider,{value:O,children:N}),e[65]=O,e[66]=N,e[67]=j):j=e[67],j};function Ex(t){return k.isValidElement(t)&&t.type===mr}function Sx(t){return k.isValidElement(t)&&t.type===fr}const kx=t=>{const e=I.compilerRuntimeExports.c(45);let n,r,s,o,i,l,a,d,c,u,f,m;e[0]!==t?({children:n,className:r,href:o,icon:i,img:l,message:a,path:d,timestamp:f,title:m,type:c,unread:u,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12]);const h=c===void 0?"default":c,p=u===void 0?!1:u,{isMobile:g,onItemClick:x,setOpen:v}=Rr(),y=st[h].icon;let w;e[13]!==i||e[14]!==l||e[15]!==g||e[16]!==a||e[17]!==x||e[18]!==v||e[19]!==f||e[20]!==m||e[21]!==h||e[22]!==p?(w=()=>{const j={id:crypto.randomUUID(),icon:i,img:l,message:a,read:!p,timestamp:f||new Date,title:m||"",type:h};x?.(j),g&&v(!1)},e[13]=i,e[14]=l,e[15]=g,e[16]=a,e[17]=x,e[18]=v,e[19]=f,e[20]=m,e[21]=h,e[22]=p,e[23]=w):w=e[23];const C=w;let O;e[24]!==n||e[25]!==i||e[26]!==l||e[27]!==a||e[28]!==d||e[29]!==y||e[30]!==f||e[31]!==m||e[32]!==h||e[33]!==p?(O=n||b.jsxs(b.Fragment,{children:[l?b.jsx(gs,{alt:"User avatar",className:"mt-0.5","data-ox-slot":"notifications-icon",fallback:"NA",size:"md",src:l}):b.jsx(ue.Box,{className:"mt-0.5",color:h,"data-ox-slot":"notifications-icon",size:"md",children:b.jsx(ue,{icon:i??y,path:d})}),b.jsxs("div",{className:"min-w-0 flex-1","data-ox-slot":"notifications-content",children:[m&&b.jsx("h5",{className:"mb-1 text-sm leading-tight font-semibold text-pretty text-foreground",children:m}),a&&b.jsx("p",{className:"mb-1 text-xs leading-4",children:a}),f&&b.jsx("p",{className:"text-xs text-muted-foreground",children:fs(f)})]}),p&&b.jsx("div",{className:"mt-1.5 size-2 shrink-0 rounded-full bg-destructive","data-ox-slot":"notifications-unread"})]}),e[24]=n,e[25]=i,e[26]=l,e[27]=a,e[28]=d,e[29]=y,e[30]=f,e[31]=m,e[32]=h,e[33]=p,e[34]=O):O=e[34];const S=O;let E;e[35]!==r||e[36]!==p?(E=z("col-span-3 grid cursor-pointer grid-cols-subgrid items-start gap-3 p-3 text-left","ox-focus-ring hover:bg-neutral-accent/60",{"bg-neutral-accent/40":p},r),e[35]=r,e[36]=p,e[37]=E):E=e[37];const R=p?"unread":"read";let N;return e[38]!==s||e[39]!==C||e[40]!==o||e[41]!==S||e[42]!==E||e[43]!==R?(N=b.jsx("li",{className:"contents",children:b.jsx("a",{className:E,"data-ox-slot":"notifications-link",href:o,...s,"data-ox-state":R,onClick:C,children:S})}),e[38]=s,e[39]=C,e[40]=o,e[41]=S,e[42]=E,e[43]=R,e[44]=N):N=e[44],N},Rx=Object.assign(Ox,{Body:fr,Button:ma,Link:kx,Trigger:mr}),pa=k.createContext(void 0),ha=()=>{const t=k.useContext(pa);if(!t)throw new Error("PageOutline components must be used within an OxPageOutline");return t},Nx=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o;e[0]!==t?({children:n,className:r,scrollOffset:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o===void 0?0:o;let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=new Map,e[5]=l):l=e[5];const a=k.useRef(l),d=k.useRef(null);let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[6]=c):c=e[6];const[u,f]=k.useState(c),{activeId:m,setActiveId:h}=I.useScrollSpy(u);let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=(D,P)=>{a.current.set(D,P),f(M=>M.includes(D)?M:[...M,D])},e[7]=p):p=e[7];const g=p;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=D=>{a.current.delete(D),f(P=>P.filter(M=>M!==D))},e[8]=x):x=e[8];const v=x;let y;e[9]!==i||e[10]!==h?(y=D=>{const P=D.replace("#","");h(P),Di(`#${P}`,{behavior:"smooth",offset:i}).catch(jx)},e[9]=i,e[10]=h,e[11]=y):y=e[11];const w=y;let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=D=>{d.current=D},e[12]=C):C=e[12];const O=C;let S;e[13]!==m||e[14]!==w?(S={activeId:m,itemReferences:a,registerItem:g,scrollToSection:w,setContentRef:O,unregisterItem:v},e[13]=m,e[14]=w,e[15]=S):S=e[15];const E=S;let R;e[16]!==r?(R=z(r),e[16]=r,e[17]=R):R=e[17];let N;e[18]!==n||e[19]!==s||e[20]!==R?(N=b.jsx("nav",{className:R,"data-ox-slot":"page-outline",...s,children:n}),e[18]=n,e[19]=s,e[20]=R,e[21]=N):N=e[21];let j;return e[22]!==E||e[23]!==N?(j=b.jsx(pa.Provider,{value:E,children:N}),e[22]=E,e[23]=N,e[24]=j):j=e[24],j};function jx(t){console.error("Failed to scroll to element:",t)}const Dx=t=>{const e=I.compilerRuntimeExports.c(21);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{activeId:o,itemReferences:i,setContentRef:l}=ha(),a=k.useRef(null);let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d={height:0,opacity:0,top:0},e[4]=d):d=e[4];const[c,u]=k.useState(d),f=k.useRef("");let m,h;e[5]!==l?(m=()=>{a.current&&l(a.current)},h=[l],e[5]=l,e[6]=m,e[7]=h):(m=e[6],h=e[7]),k.useLayoutEffect(m,h);let p,g;e[8]!==o||e[9]!==i?(p=()=>{if(f.current===o)return;if(f.current=o,!o||!a.current){u({height:0,opacity:0,top:0});return}const w=i.current.get(o);if(!w){u({height:0,opacity:0,top:0});return}const C=a.current.getBoundingClientRect(),O=w.getBoundingClientRect();u({height:O.height,opacity:1,top:O.top-C.top})},g=[o,i],e[8]=o,e[9]=i,e[10]=p,e[11]=g):(p=e[10],g=e[11]),k.useLayoutEffect(p,g);let x;e[12]!==r?(x=z("relative border-l border-border",r),e[12]=r,e[13]=x):x=e[13];let v;e[14]!==c?(v=b.jsx("div",{className:"pointer-events-none absolute left-0 w-0.5 -translate-x-px rounded-full bg-primary transition-all duration-150 ease-out",style:c}),e[14]=c,e[15]=v):v=e[15];let y;return e[16]!==n||e[17]!==s||e[18]!==x||e[19]!==v?(y=b.jsxs("div",{className:x,"data-ox-slot":"page-outline-content",ref:a,...s,children:[v,n]}),e[16]=n,e[17]=s,e[18]=x,e[19]=v,e[20]=y):y=e[20],y},Px=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mb-2 text-sm font-medium text-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,"data-ox-slot":"page-outline-header",...s,children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Tx={1:"pl-3",2:"pl-6",3:"pl-9"},Mx=t=>{const e=I.compilerRuntimeExports.c(29);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,href:s,level:l,onClick:o,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?1:l,{activeId:d,registerItem:c,scrollToSection:u,unregisterItem:f}=ha(),m=k.useRef(null);let h;e[7]!==s?(h=s.startsWith("#")?s.slice(1):s,e[7]=s,e[8]=h):h=e[8];const p=h,g=d===p;let x,v;e[9]!==p||e[10]!==c||e[11]!==f?(x=()=>(m.current&&c(p,m.current),()=>f(p)),v=[p,c,f],e[9]=p,e[10]=c,e[11]=f,e[12]=x,e[13]=v):(x=e[12],v=e[13]),k.useEffect(x,v);let y;e[14]!==s||e[15]!==o||e[16]!==u?(y=N=>{N.preventDefault(),u(s),o?.(N)},e[14]=s,e[15]=o,e[16]=u,e[17]=y):y=e[17];const w=y,C=Tx[a],O=g&&"text-foreground";let S;e[18]!==r||e[19]!==C||e[20]!==O?(S=z("block py-1.5 text-sm","text-muted-foreground transition-colors duration-150 hover:text-foreground",C,O,r),e[18]=r,e[19]=C,e[20]=O,e[21]=S):S=e[21];const E=g?"active":"inactive";let R;return e[22]!==n||e[23]!==w||e[24]!==s||e[25]!==i||e[26]!==S||e[27]!==E?(R=b.jsx("a",{className:S,"data-ox-slot":"page-outline-item","data-ox-state":E,href:s,ref:m,onClick:w,...i,children:n}),e[22]=n,e[23]=w,e[24]=s,e[25]=i,e[26]=S,e[27]=E,e[28]=R):R=e[28],R},Ix=Object.assign(Nx,{Content:Dx,Header:Px,Item:Mx}),Ax=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mx-auto flex w-full justify-center",r),e[4]=r,e[5]=o):o=e[5];let i;e[6]!==n?(i=b.jsx("ul",{className:"flex items-center gap-1",children:n}),e[6]=n,e[7]=i):i=e[7];let l;return e[8]!==s||e[9]!==o||e[10]!==i?(l=b.jsx("nav",{"aria-label":"pagination",className:o,role:"navigation",...s,"data-ox-slot":"pagination",children:i}),e[8]=s,e[9]=o,e[10]=i,e[11]=l):l=e[11],l},_x=t=>{const e=I.compilerRuntimeExports.c(10);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let s;e[3]!==n?(s=z(At({variant:"ghost",size:"md",iconOnly:!0}),"pointer-events-none",n),e[3]=n,e[4]=s):s=e[4];let o,i;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(ue,{icon:ae.MoreHorizontal}),i=b.jsx("span",{className:"sr-only",children:"More pages"}),e[5]=o,e[6]=i):(o=e[5],i=e[6]);let l;return e[7]!==r||e[8]!==s?(l=b.jsxs("span",{"aria-hidden":"true",className:s,role:"presentation",...r,"data-ox-slot":"pagination-ellipsis",children:[o,i]}),e[7]=r,e[8]=s,e[9]=l):l=e[9],l},$x=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z(r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("li",{className:o,...s,"data-ox-slot":"pagination-item",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Lx=dt("OxPaginationLink","a"),zx=t=>{const e=I.compilerRuntimeExports.c(27);let n,r,s,o,i,l,a;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,isActive:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const d=i===void 0?!1:i,c=l===void 0?!1:l,u=a===void 0?!1:a;let f;e[8]!==r||e[9]!==u?(f=z(At({variant:u?"default":"ghost",size:"md",iconOnly:!0}),r),e[8]=r,e[9]=u,e[10]=f):f=e[10];const m=f;let h;e[11]!==c||e[12]!==s?(h=C=>{if(c){C.preventDefault();return}s.onClick?.(C)},e[11]=c,e[12]=s,e[13]=h):h=e[13];const p=h,g=u?"page":void 0,x=c?!0:void 0;let v;e[14]!==m||e[15]!==s||e[16]!==p||e[17]!==o||e[18]!==g||e[19]!==x?(v={"aria-current":g,"aria-disabled":x,href:o,className:m,...s,onClick:p,"data-ox-slot":"pagination-link"},e[14]=m,e[15]=s,e[16]=p,e[17]=o,e[18]=g,e[19]=x,e[20]=v):v=e[20];const y=v;if(d){let C;return e[21]!==n||e[22]!==y?(C=b.jsx(Lx,{...y,children:n}),e[21]=n,e[22]=y,e[23]=C):C=e[23],C}let w;return e[24]!==n||e[25]!==y?(w=b.jsx("a",{...y,children:n}),e[24]=n,e[25]=y,e[26]=w):w=e[26],w},Fx=dt("OxPaginationNext","a"),Vx=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=i===void 0?!1:i,d=l===void 0?!1:l,c=k.Children.count(n)>0;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"hidden sm:block",children:"Next"}),b.jsx(ue,{icon:ae.ChevronRight})]}),e[7]=u):u=e[7];const m=c?n:u;let h;e[8]!==r?(h=z(At({variant:"ghost",size:"md"}),"size-9 p-0 sm:h-9 sm:w-auto sm:px-4",r),e[8]=r,e[9]=h):h=e[9];const p=h;let g;e[10]!==d||e[11]!==s?(g=O=>{if(d){O.preventDefault();return}s.onClick?.(O)},e[10]=d,e[11]=s,e[12]=g):g=e[12];const x=g,v=d?!0:void 0;let y;e[13]!==p||e[14]!==s||e[15]!==x||e[16]!==o||e[17]!==v?(y={"aria-label":"Go to next page","aria-disabled":v,href:o,className:p,...s,onClick:x,"data-ox-slot":"pagination-next"},e[13]=p,e[14]=s,e[15]=x,e[16]=o,e[17]=v,e[18]=y):y=e[18];const w=y;if(a){let O;return e[19]!==m||e[20]!==w?(O=b.jsx(Fx,{...w,children:m}),e[19]=m,e[20]=w,e[21]=O):O=e[21],O}let C;return e[22]!==m||e[23]!==w?(C=b.jsx("a",{...w,children:m}),e[22]=m,e[23]=w,e[24]=C):C=e[24],C},Bx=dt("OxPaginationPrevious","a"),Wx=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=i===void 0?!1:i,d=l===void 0?!1:l,c=k.Children.count(n)>0;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsxs(b.Fragment,{children:[b.jsx(ue,{icon:ae.ChevronLeft}),b.jsx("span",{className:"hidden sm:block",children:"Previous"})]}),e[7]=u):u=e[7];const m=c?n:u;let h;e[8]!==r?(h=z(At({variant:"ghost",size:"md"}),"size-9 p-0 sm:h-9 sm:w-auto sm:px-4",r),e[8]=r,e[9]=h):h=e[9];const p=h;let g;e[10]!==d||e[11]!==s?(g=O=>{if(d){O.preventDefault();return}s.onClick?.(O)},e[10]=d,e[11]=s,e[12]=g):g=e[12];const x=g,v=d?!0:void 0;let y;e[13]!==p||e[14]!==s||e[15]!==x||e[16]!==o||e[17]!==v?(y={"aria-label":"Go to previous page","aria-disabled":v,href:o,className:p,...s,onClick:x,"data-ox-slot":"pagination-previous"},e[13]=p,e[14]=s,e[15]=x,e[16]=o,e[17]=v,e[18]=y):y=e[18];const w=y;if(a){let O;return e[19]!==m||e[20]!==w?(O=b.jsx(Bx,{...w,children:m}),e[19]=m,e[20]=w,e[21]=O):O=e[21],O}let C;return e[22]!==m||e[23]!==w?(C=b.jsx("a",{...w,children:m}),e[22]=m,e[23]=w,e[24]=C):C=e[24],C},Hx=Object.assign(Ax,{Ellipsis:_x,Item:$x,Link:zx,Next:Vx,Previous:Wx}),ga=k.createContext(null),Yx=t=>{const e=I.compilerRuntimeExports.c(22),{align:n,children:r,closeOnOutsideClick:s,defaultOpen:o,disabled:i,onOpenChange:l,open:a,side:d}=t,c=n===void 0?"center":n,u=s===void 0?!0:s,f=o===void 0?!1:o,m=i===void 0?!1:i,h=d===void 0?"bottom":d;let p;e[0]!==u||e[1]!==a||e[2]!==f||e[3]!==m||e[4]!==l?(p={closeOnEscape:!0,closeOnOutsideClick:u,defaultOpen:f,disabled:m,onOpenChange:l,open:a},e[0]=u,e[1]=a,e[2]=f,e[3]=m,e[4]=l,e[5]=p):p=e[5];const{close:g,containerRef:x,isClosing:v,isVisible:y,open:w,toggle:C}=I.usePopperState(p);let O;e[6]!==c||e[7]!==g||e[8]!==v||e[9]!==y||e[10]!==w||e[11]!==h||e[12]!==C?(O={align:c,close:g,isClosing:v,isVisible:y,open:w,side:h,toggle:C},e[6]=c,e[7]=g,e[8]=v,e[9]=y,e[10]=w,e[11]=h,e[12]=C,e[13]=O):O=e[13];const S=O;let E;e[14]!==r?(E=b.jsx(Se,{children:r}),e[14]=r,e[15]=E):E=e[15];let R;e[16]!==x||e[17]!==E?(R=b.jsx("div",{"data-ox-slot":"popover",ref:x,children:E}),e[16]=x,e[17]=E,e[18]=R):R=e[18];let N;return e[19]!==S||e[20]!==R?(N=b.jsx(ga.Provider,{value:S,children:R}),e[19]=S,e[20]=R,e[21]=N):N=e[21],N},xa=()=>{const t=k.useContext(ga);if(!t)throw new Error("usePopoverContext must be used within OxPopover");return t},qx=t=>{const e=I.compilerRuntimeExports.c(18);let n,r,s,o;e[0]!==t?({children:n,className:r,showCloseButton:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o===void 0?!0:o,{align:l,close:a,isClosing:d,isVisible:c,side:u}=xa();if(!c)return null;let f;e[5]!==r?(f=z("ox-popover-animate relative max-w-sm min-w-64 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md",r),e[5]=r,e[6]=f):f=e[6];const m=d?"closing":"open";let h;e[7]!==a||e[8]!==i?(h=i&&b.jsx("div",{className:"absolute top-2 right-2",children:b.jsx(Ze,{"aria-label":"Close popover",size:"sm",variant:"ghost",onClick:a,children:b.jsx(ue,{icon:ae.X})})}),e[7]=a,e[8]=i,e[9]=h):h=e[9];let p;return e[10]!==l||e[11]!==n||e[12]!==s||e[13]!==u||e[14]!==f||e[15]!==m||e[16]!==h?(p=b.jsx(Bt,{children:b.jsxs(Se.Content,{align:l,className:f,side:u,sideOffset:8,...s,"data-ox-slot":"popover-content","data-ox-state":m,children:[h,n]})}),e[10]=l,e[11]=n,e[12]=s,e[13]=u,e[14]=f,e[15]=m,e[16]=h,e[17]=p):p=e[17],p},Gx=dt("OxPopoverTrigger","button"),Ux=t=>{const e=I.compilerRuntimeExports.c(19);let n,r,s,o,i;e[0]!==t?({asChild:i,children:n,className:r,onClick:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?!1:i,{toggle:a}=xa();let d;e[6]!==o||e[7]!==a?(d=h=>{a(),o?.(h)},e[6]=o,e[7]=a,e[8]=d):d=e[8];const c=d;let u;e[9]!==r||e[10]!==s||e[11]!==c?(u={type:"button",...s,className:r,"aria-haspopup":"dialog","data-ox-slot":"popover-trigger",onClick:c},e[9]=r,e[10]=s,e[11]=c,e[12]=u):u=e[12];const f=u;if(l){let h;return e[13]!==n||e[14]!==f?(h=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx(Gx,{...f,children:n})}),e[13]=n,e[14]=f,e[15]=h):h=e[15],h}let m;return e[16]!==n||e[17]!==f?(m=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx("button",{...f,children:n})}),e[16]=n,e[17]=f,e[18]=m):m=e[18],m},Un=Object.assign(Yx,{Content:qx,Trigger:Ux}),Kx=t=>{const e=I.compilerRuntimeExports.c(19);let n,r,s,o,i;e[0]!==t?({buffer:n,className:r,max:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?100:o,d=Math.max(0,Math.min(i===void 0?0:i,l)),c=n?Math.max(0,Math.min(n,l)):0;let u;e[6]!==r?(u=z("relative h-2 overflow-hidden rounded-full bg-primary/20",r),e[6]=r,e[7]=u):u=e[7];let f;e[8]!==n||e[9]!==c||e[10]!==l?(f=n!==void 0?b.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full bg-primary/30 transition-all duration-300",style:{width:`${c/l*100}%`}}):null,e[8]=n,e[9]=c,e[10]=l,e[11]=f):f=e[11];const m=`${d/l*100}%`;let h;e[12]!==m?(h=b.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full bg-primary transition-all duration-300",style:{width:m}}),e[12]=m,e[13]=h):h=e[13];let p;return e[14]!==s||e[15]!==u||e[16]!==f||e[17]!==h?(p=b.jsxs("div",{className:u,"data-ox-slot":"progress",role:"progressbar",...s,children:[f,h]}),e[14]=s,e[15]=u,e[16]=f,e[17]=h,e[18]=p):p=e[18],p},Xx=t=>{const e=I.compilerRuntimeExports.c(23);let n,r,s,o,i;e[0]!==t?({className:n,max:s,showPercentage:o,value:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=s===void 0?100:s,a=o===void 0?!1:o,c=Math.max(0,Math.min(i===void 0?0:i,l));let u;e[6]!==l||e[7]!==c?(u=Math.round(c/l*100),e[6]=l,e[7]=c,e[8]=u):u=e[8];const f=u,m=2*Math.PI*24,h=m-c/l*m;let p;e[9]!==n?(p=z("inline-flex items-center justify-center",n),e[9]=n,e[10]=p):p=e[10];let g;e[11]!==h?(g=b.jsx("svg",{className:"-rotate-90 transform",height:52,width:52,children:b.jsx("circle",{className:"stroke-primary transition-all duration-300 ease-in-out",cx:26,cy:26,fill:"none",r:24,strokeLinecap:"round",strokeWidth:"4",style:{strokeDasharray:m,strokeDashoffset:h}})}),e[11]=h,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==a?(x=a&&b.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:b.jsxs("span",{className:"text-xs font-medium text-foreground",children:[f,"%"]})}),e[13]=f,e[14]=a,e[15]=x):x=e[15];let v;e[16]!==g||e[17]!==x?(v=b.jsxs("div",{className:"relative",children:[g,x]}),e[16]=g,e[17]=x,e[18]=v):v=e[18];let y;return e[19]!==r||e[20]!==p||e[21]!==v?(y=b.jsx("div",{className:p,"data-ox-slot":"progress",...r,children:v}),e[19]=r,e[20]=p,e[21]=v,e[22]=y):y=e[22],y},Qx=Object.assign(Kx,{Circular:Xx}),Ws=t=>{const e=I.compilerRuntimeExports.c(13);let n,r,s,o;e[0]!==t?({className:n,decorative:s,orientation:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=s===void 0?!0:s,l=o===void 0?"horizontal":o,a=i?void 0:l,d=l==="horizontal"?"h-px w-full":"h-full w-px";let c;e[5]!==n||e[6]!==d?(c=z("shrink-0 bg-border",d,n),e[5]=n,e[6]=d,e[7]=c):c=e[7];const u=i?"none":"separator";let f;return e[8]!==r||e[9]!==a||e[10]!==c||e[11]!==u?(f=b.jsx("div",{"aria-orientation":a,className:c,role:u,...r,"data-ox-slot":"separator"}),e[8]=r,e[9]=a,e[10]=c,e[11]=u,e[12]=f):f=e[12],f},Jx={rectangle:"rounded-lg",circle:"rounded-full"},_t=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({animate:s,className:n,shape:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=s===void 0?!0:s,a=Jx[o===void 0?"rectangle":o];let d;e[5]!==i||e[6]!==n||e[7]!==a?(d=z("relative overflow-hidden bg-secondary",a,{"animate-pulse":i},n),e[5]=i,e[6]=n,e[7]=a,e[8]=d):d=e[8];let c;return e[9]!==r||e[10]!==d?(c=b.jsx("div",{"aria-busy":"true","aria-label":"Loading...",className:d,"data-ox-slot":"skeleton",role:"status",...r}),e[9]=r,e[10]=d,e[11]=c):c=e[11],c},si=(t,e,n)=>{if(Array.isArray(t))return[Math.max(e,Math.min(n,t[0])),Math.max(e,Math.min(n,t[1]))];const r=Math.max(e,Math.min(n,t));return[r,r]},oi=(t,e,n)=>(t-e)/(n-e)*100,Zx=(t,e,n,r)=>{const s=e+t/100*(n-e),o=Math.round(s/r)*r;return Math.max(e,Math.min(n,o))},eb=t=>{const e=I.compilerRuntimeExports.c(122);let n,r,s,o,i,l,a,d,c,u,f,m,h,p;e[0]!==t?({"aria-label":n,"aria-labelledby":r,className:s,defaultValue:d,disabled:c,max:u,min:f,onChange:l,onChangeCommitted:a,orientation:m,showValue:h,step:p,value:o,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14]);const g=d===void 0?0:d,x=c===void 0?!1:c,v=u===void 0?100:u,y=f===void 0?0:f,w=m===void 0?"horizontal":m,C=h===void 0?!1:h,O=p===void 0?1:p,S=k.useRef(null),E=k.useRef(!1),R=k.useRef(0),N=o!==void 0,j=Array.isArray(g)||Array.isArray(o),D=o||g;let P;e[15]!==v||e[16]!==y||e[17]!==D?(P=si(D,y,v),e[15]=v,e[16]=y,e[17]=D,e[18]=P):P=e[18];const[M,L]=k.useState(P);let _;e[19]!==o||e[20]!==M||e[21]!==N||e[22]!==v||e[23]!==y?(_=N?si(o,y,v):M,e[19]=o,e[20]=M,e[21]=N,e[22]=v,e[23]=y,e[24]=_):_=e[24];const T=_;let A;e[25]!==x||e[26]!==N||e[27]!==j||e[28]!==l?(A=Ee=>{if(x)return;const be=j?Ee:Ee[0];N||L(Ee),l?.(be)},e[25]=x,e[26]=N,e[27]=j,e[28]=l,e[29]=A):A=e[29];const V=A;let $;e[30]!==v||e[31]!==y||e[32]!==w||e[33]!==O?($=Ee=>{if(!S.current)return y;const be=S.current.getBoundingClientRect(),je=w==="horizontal"?(Ee.clientX-be.left)/be.width*100:(be.bottom-Ee.clientY)/be.height*100;return Zx(Math.max(0,Math.min(100,je)),y,v,O)},e[30]=v,e[31]=y,e[32]=w,e[33]=O,e[34]=$):$=e[34];const F=$;let W;e[35]!==T||e[36]!==x||e[37]!==F||e[38]!==V||e[39]!==j?(W=(Ee,be)=>{if(x)return;Ee.preventDefault(),E.current=!0,R.current=be||0;const je=F(Ee);if(j&&be!==void 0){const ve=[...T];ve[be]=je,be===0&&ve[0]>ve[1]?ve[1]=ve[0]:be===1&&ve[1]<ve[0]&&(ve[0]=ve[1]),V(ve)}else V([je,je])},e[35]=T,e[36]=x,e[37]=F,e[38]=V,e[39]=j,e[40]=W):W=e[40];const B=W;let H;e[41]!==T||e[42]!==x||e[43]!==F||e[44]!==V||e[45]!==j?(H=Ee=>{if(x||E.current)return;const be=F(Ee);if(j){const[je,ve]=T,Be=Math.abs(be-je),An=Math.abs(be-ve),jr=Be<=An?0:1,_n=[...T];_n[jr]=be,V(_n)}else V([be,be])},e[41]=T,e[42]=x,e[43]=F,e[44]=V,e[45]=j,e[46]=H):H=e[46];const G=H;let U;e[47]!==T||e[48]!==x||e[49]!==V||e[50]!==j||e[51]!==v||e[52]!==y||e[53]!==O?(U=(Ee,be)=>{if(x)return;let je;e:switch(Ee.key){case"ArrowRight":case"ArrowUp":{je=O;break e}case"ArrowLeft":case"ArrowDown":{je=-O;break e}case"PageUp":{je=(v-y)*.1;break e}case"PageDown":{je=-(v-y)*.1;break e}case"Home":{je=y-T[be];break e}case"End":{je=v-T[be];break e}default:return}Ee.preventDefault();const ve=[...T];ve[be]=Math.max(y,Math.min(v,T[be]+je)),j&&(be===0&&ve[0]>ve[1]?ve[1]=ve[0]:be===1&&ve[1]<ve[0]&&(ve[0]=ve[1])),V(ve)},e[47]=T,e[48]=x,e[49]=V,e[50]=j,e[51]=v,e[52]=y,e[53]=O,e[54]=U):U=e[54];const Y=U;let Q,X;e[55]!==T||e[56]!==F||e[57]!==V||e[58]!==j||e[59]!==a?(Q=()=>{const Ee=je=>{if(!E.current)return;const ve=F(je);if(j){const Be=[...T];Be[R.current]=ve,R.current===0&&Be[0]>Be[1]?Be[1]=Be[0]:R.current===1&&Be[1]<Be[0]&&(Be[0]=Be[1]),V(Be)}else V([ve,ve])},be=()=>{E.current&&(E.current=!1,a?.(j?T:T[0]))};return E.current&&(document.addEventListener("mousemove",Ee),document.addEventListener("mouseup",be)),()=>{document.removeEventListener("mousemove",Ee),document.removeEventListener("mouseup",be)}},X=[F,j,T,V,a],e[55]=T,e[56]=F,e[57]=V,e[58]=j,e[59]=a,e[60]=Q,e[61]=X):(Q=e[60],X=e[61]),k.useEffect(Q,X);const[K,J]=T,q=oi(K,y,v),ne=oi(J,y,v);let Z;e[62]!==s?(Z=z("w-full py-3",s),e[62]=s,e[63]=Z):Z=e[63];let te;e[64]!==x?(te=z("relative h-1.5 w-full cursor-pointer rounded-full bg-muted",{"ox-default-disabled":x}),e[64]=x,e[65]=te):te=e[65];const le=`${j?q:0}%`,ce=`${j?ne-q:q}%`;let fe;e[66]!==le||e[67]!==ce?(fe=b.jsx("div",{className:"absolute h-full rounded-full bg-primary",style:{left:le,width:ce}}),e[66]=le,e[67]=ce,e[68]=fe):fe=e[68];const he=j?`${n} minimum`:n,ee=String(K);let ie;e[69]!==x?(ie=z("ox-focus-ring absolute top-1/2 size-4 -translate-1/2 cursor-grab rounded-full border-2 border-primary bg-background ring-ring/50 hover:ring-4 active:cursor-grabbing",{"cursor-not-allowed":x}),e[69]=x,e[70]=ie):ie=e[70];const oe=`${q}%`;let me;e[71]!==oe?(me={left:oe},e[71]=oe,e[72]=me):me=e[72];const Oe=x?-1:0;let ke;e[73]!==Y?(ke=Ee=>Y(Ee,0),e[73]=Y,e[74]=ke):ke=e[74];let Ye;e[75]!==B?(Ye=Ee=>B(Ee,0),e[75]=B,e[76]=Ye):Ye=e[76];let qe;e[77]!==r||e[78]!==v||e[79]!==y||e[80]!==K||e[81]!==w||e[82]!==he||e[83]!==ee||e[84]!==ie||e[85]!==me||e[86]!==Oe||e[87]!==ke||e[88]!==Ye?(qe=b.jsx("div",{"aria-label":he,"aria-labelledby":r,"aria-orientation":w,"aria-valuemax":v,"aria-valuemin":y,"aria-valuenow":K,"aria-valuetext":ee,className:ie,role:"slider",style:me,tabIndex:Oe,onKeyDown:ke,onMouseDown:Ye}),e[77]=r,e[78]=v,e[79]=y,e[80]=K,e[81]=w,e[82]=he,e[83]=ee,e[84]=ie,e[85]=me,e[86]=Oe,e[87]=ke,e[88]=Ye,e[89]=qe):qe=e[89];let Ge;e[90]!==n||e[91]!==r||e[92]!==x||e[93]!==Y||e[94]!==B||e[95]!==j||e[96]!==v||e[97]!==ne||e[98]!==J||e[99]!==y||e[100]!==w?(Ge=j?b.jsx("div",{"aria-label":j?`${n} maximum`:n,"aria-labelledby":r,"aria-orientation":w,"aria-valuemax":v,"aria-valuemin":y,"aria-valuenow":J,"aria-valuetext":String(J),className:z("ox-focus-ring absolute top-1/2 size-4 -translate-1/2 cursor-grab rounded-full border-2 border-primary bg-background ring-ring/50 hover:ring-4 active:cursor-grabbing",{"cursor-not-allowed":x}),role:"slider",style:{left:`${ne}%`},tabIndex:x?-1:0,onKeyDown:Ee=>Y(Ee,1),onMouseDown:Ee=>B(Ee,1)}):null,e[90]=n,e[91]=r,e[92]=x,e[93]=Y,e[94]=B,e[95]=j,e[96]=v,e[97]=ne,e[98]=J,e[99]=y,e[100]=w,e[101]=Ge):Ge=e[101];let et;e[102]!==G||e[103]!==te||e[104]!==fe||e[105]!==qe||e[106]!==Ge?(et=b.jsxs("div",{className:te,ref:S,onClick:G,children:[fe,qe,Ge]}),e[102]=G,e[103]=te,e[104]=fe,e[105]=qe,e[106]=Ge,e[107]=et):et=e[107];let vt;e[108]!==j||e[109]!==v||e[110]!==J||e[111]!==y||e[112]!==K||e[113]!==C?(vt=C&&b.jsxs("div",{className:z("mt-2 flex justify-between text-xs text-muted-foreground"),children:[b.jsx("span",{children:j?`${K} - ${J}`:K}),b.jsxs("span",{children:[y," - ",v]})]}),e[108]=j,e[109]=v,e[110]=J,e[111]=y,e[112]=K,e[113]=C,e[114]=vt):vt=e[114];let Fe;e[115]!==et||e[116]!==vt?(Fe=b.jsxs("div",{className:"relative py-3",children:[et,vt]}),e[115]=et,e[116]=vt,e[117]=Fe):Fe=e[117];let $t;return e[118]!==i||e[119]!==Z||e[120]!==Fe?($t=b.jsx("div",{className:Z,"data-ox-slot":"slider",...i,children:Fe}),e[118]=i,e[119]=Z,e[120]=Fe,e[121]=$t):$t=e[121],$t},ba=k.createContext(null),va=k.createContext(null),tb=()=>{const t=k.useContext(ba);if(!t)throw new Error("SortableList components must be used within an OxSortableList");return t},nb=()=>{const t=k.useContext(va);if(!t)throw new Error("SortableListHandle must be used within an OxSortableList.Item");return t},rb=t=>{const e=I.compilerRuntimeExports.c(58);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,columns:l,direction:a,disabled:d,gap:c,onReorder:o,style:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=l===void 0?3:l,f=a===void 0?"vertical":a,m=d===void 0?!1:d,h=c===void 0?8:c,p=k.useId();let g,x,v;if(e[10]!==p||e[11]!==n){g=k.Children.toArray(n);let Y;e[15]!==p?(Y=(Q,X)=>`${p}-item-${X}`,e[15]=p,e[16]=Y):Y=e[16],x=g.map(Y),v=new Map,x.forEach((Q,X)=>{v.set(Q,X)}),e[10]=p,e[11]=n,e[12]=g,e[13]=x,e[14]=v}else g=e[12],x=e[13],v=e[14];let y;e[17]!==g||e[18]!==x||e[19]!==v?(y={childArray:g,itemIds:x,itemIndexMap:v},e[17]=g,e[18]=x,e[19]=v,e[20]=y):y=e[20];const{childArray:w,itemIds:C,itemIndexMap:O}=y;let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S={coordinateGetter:Bs},e[21]=S):S=e[21];const E=Ss(Xt(Dn),Xt(jn,S));let R;e:switch(f){case"horizontal":{R=qg;break e}case"grid":{R=Ls;break e}default:R=zs}const N=R;let j;e[22]!==O||e[23]!==o?(j=Y=>{const{active:Q,over:X}=Y;if(X&&Q.id!==X.id){const K=O.get(String(Q.id)),J=O.get(String(X.id));K!==void 0&&J!==void 0&&o(K,J)}},e[22]=O,e[23]=o,e[24]=j):j=e[24];const D=j;let P;e[25]!==u||e[26]!==f||e[27]!==h?(P=f==="grid"?{display:"grid",gap:h,gridTemplateColumns:`repeat(${u}, 1fr)`}:{display:"flex",flexDirection:f==="vertical"?"column":"row",gap:h},e[25]=u,e[26]=f,e[27]=h,e[28]=P):P=e[28];const M=P;let L;e[29]!==M||e[30]!==i?(L={...M,...i},e[29]=M,e[30]=i,e[31]=L):L=e[31];const _=L;let T;e[32]!==f||e[33]!==m?(T={direction:f,disabled:m},e[32]=f,e[33]=m,e[34]=T):T=e[34];const A=T;let V;if(e[35]!==w||e[36]!==C){let Y;e[38]!==C?(Y=(Q,X)=>k.isValidElement(Q)?k.cloneElement(Q,{__sortableId:C[X],__sortableIndex:X}):Q,e[38]=C,e[39]=Y):Y=e[39],V=w.map(Y),e[35]=w,e[36]=C,e[37]=V}else V=e[37];const $=V,F=m?void 0:E;let W;e[40]!==r?(W=z(r),e[40]=r,e[41]=W):W=e[41];let B;e[42]!==s||e[43]!==$||e[44]!==_||e[45]!==W?(B=b.jsx("div",{className:W,"data-ox-slot":"sortable-list",style:_,...s,children:$}),e[42]=s,e[43]=$,e[44]=_,e[45]=W,e[46]=B):B=e[46];let H;e[47]!==C||e[48]!==N||e[49]!==B?(H=b.jsx(Fs,{items:C,strategy:N,children:B}),e[47]=C,e[48]=N,e[49]=B,e[50]=H):H=e[50];let G;e[51]!==D||e[52]!==F||e[53]!==H?(G=b.jsx(yr,{collisionDetection:ll,sensors:F,onDragEnd:D,children:H}),e[51]=D,e[52]=F,e[53]=H,e[54]=G):G=e[54];let U;return e[55]!==A||e[56]!==G?(U=b.jsx(ba.Provider,{value:A,children:G}),e[55]=A,e[56]=G,e[57]=U):U=e[57],U},sb=t=>{const e=I.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{attributes:o,disabled:i,listeners:l,registerHandle:a,setActivatorNodeRef:d}=nb();let c,u;e[4]!==a?(c=()=>{a()},u=[a],e[4]=a,e[5]=c,e[6]=u):(c=e[5],u=e[6]),k.useEffect(c,u);let f;e[7]!==r||e[8]!==i?(f=z("flex cursor-grab touch-none items-center justify-center",{"cursor-not-allowed opacity-50":i},r),e[7]=r,e[8]=i,e[9]=f):f=e[9];let m;e[10]!==n?(m=n??b.jsx(ae.GripVertical,{className:"size-4 text-muted-foreground"}),e[10]=n,e[11]=m):m=e[11];let h;return e[12]!==o||e[13]!==i||e[14]!==s||e[15]!==l||e[16]!==d||e[17]!==f||e[18]!==m?(h=b.jsx("button",{"aria-label":"Drag to reorder",className:f,"data-ox-slot":"sortable-list-handle",disabled:i,ref:d,type:"button",...o,...l,...s,children:m}),e[12]=o,e[13]=i,e[14]=s,e[15]=l,e[16]=d,e[17]=f,e[18]=m,e[19]=h):h=e[19],h},ob=t=>{const e=I.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a;e[0]!==t?({__sortableId:n,__sortableIndex:r,children:s,className:o,disabled:a,style:l,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const d=a===void 0?!1:a,[c,u]=k.useState(!1),{disabled:f}=tb(),m=f||d,h=n??`fallback-${r}`;let p;e[8]!==m||e[9]!==h?(p={disabled:m,id:h},e[8]=m,e[9]=h,e[10]=p):p=e[10];const{attributes:g,isDragging:x,listeners:v,setActivatorNodeRef:y,setNodeRef:w,transform:C,transition:O}=Vs(p);let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{u(!0)},e[11]=S):S=e[11];const E=S;let R;e[12]!==C?(R=at.Transform.toString(C),e[12]=C,e[13]=R):R=e[13];let N;e[14]!==l||e[15]!==R||e[16]!==O?(N={transform:R,transition:O,...l},e[14]=l,e[15]=R,e[16]=O,e[17]=N):N=e[17];const j=N;let D;e[18]!==g||e[19]!==m||e[20]!==x||e[21]!==v||e[22]!==y?(D={attributes:g,disabled:m,isDragging:x,listeners:v,registerHandle:E,setActivatorNodeRef:y},e[18]=g,e[19]=m,e[20]=x,e[21]=v,e[22]=y,e[23]=D):D=e[23];const P=D;let M;e[24]!==g||e[25]!==c||e[26]!==v?(M=c?{}:{...g,...v},e[24]=g,e[25]=c,e[26]=v,e[27]=M):M=e[27];const L=M;let _;e[28]!==o||e[29]!==x?(_=z({"opacity-50":x},o),e[28]=o,e[29]=x,e[30]=_):_=e[30];const T=x?"dragging":void 0;let A;e[31]!==s||e[32]!==i||e[33]!==L||e[34]!==j||e[35]!==w||e[36]!==_||e[37]!==T?(A=b.jsx("div",{className:_,"data-ox-slot":"sortable-list-item","data-ox-state":T,ref:w,style:j,...L,...i,children:s}),e[31]=s,e[32]=i,e[33]=L,e[34]=j,e[35]=w,e[36]=_,e[37]=T,e[38]=A):A=e[38];let V;return e[39]!==P||e[40]!==A?(V=b.jsx(va.Provider,{value:P,children:A}),e[39]=P,e[40]=A,e[41]=V):V=e[41],V},ib=Object.assign(rb,{Handle:sb,Item:ob}),lb={loading:{title:"Loading...",message:"Good things take time",icon:ae.LoaderCircle,showAction:!1},empty:{title:"Nothing here",message:"It's so empty... like my soul",icon:ae.PackageOpen,showAction:!1},offline:{title:"You're offline",message:"Did you forget to pay the internet bill?",icon:ae.WifiOff,showAction:!0},success:{title:"Success!",message:"Everything went perfectly as planned",icon:ae.CircleCheck,showAction:!1},warning:{title:"Heads up!",message:"Something needs your attention",icon:ae.AlertCircle,showAction:!1},info:{title:"Just so you know",message:"Here's some helpful information",icon:ae.Info,showAction:!1},401:{title:"Please log in",message:"You need to authenticate to access this page",showAction:!0},403:{title:"Access denied",message:"You don't have permission to view this content",showAction:!0},404:{title:"Page not found",message:"Nothing to see here... just... go away... now.",showAction:!0},408:{title:"Request timeout",message:"Taking too long? Try refreshing the page",showAction:!0},429:{title:"Slow down there!",message:"Too many requests. Take a coffee break",showAction:!0},500:{title:"Oops! We broke something",message:"Don't worry, it's not your fault... probably",showAction:!0},502:{title:"Bad gateway",message:"The server is having an existential crisis",showAction:!0},503:{title:"Taking a quick nap",message:"Service will be back after coffee break",showAction:!0},504:{title:"Server timeout",message:"Server is slower than a Windows 95 boot",showAction:!0}},ab=t=>t==="success"?st.success:t==="warning"?st.warning:t==="info"?st.info:typeof t=="number"?st.destructive:{text:"text-primary"},cb=t=>{const e=I.compilerRuntimeExports.c(66);let n,r,s,o,i,l,a,d,c;e[0]!==t?({action:n,children:r,className:s,inline:a,message:i,onBack:l,title:d,type:c,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=a===void 0?!1:a;if(r){let $;e[10]!==s?($=z("min-h-screen w-full",s),e[10]=s,e[11]=$):$=e[11];let F;return e[12]!==r||e[13]!==$?(F=b.jsx("div",{className:$,children:r}),e[12]=r,e[13]=$,e[14]=F):F=e[14],F}const f=lb[c],m=d||f.title,h=i||f.message;let p;e[15]!==l?(p=()=>{l?l():globalThis.history.back()},e[15]=l,e[16]=p):p=e[16];const g=p;let x;e[17]!==n||e[18]!==f.showAction||e[19]!==g?(x=()=>n!==void 0?n:f.showAction?b.jsx(Ze,{variant:"secondary",onClick:g,children:"Back"}):null,e[17]=n,e[18]=f.showAction,e[19]=g,e[20]=x):x=e[20];const v=x;let y,w,C,O,S,E,R,N;if(e[21]!==s||e[22]!==f.icon||e[23]!==f.path||e[24]!==o||e[25]!==u||e[26]!==c){const $=ab(c),F=()=>f.icon?b.jsx(ue,{className:z($.text,{"animate-spin":c==="loading"}),icon:f.icon,path:f.path,size:"2xl"}):typeof c=="number"?b.jsx("div",{className:z("bg-linear-to-br from-primary from-20% to-accent bg-clip-text text-3xl font-bold text-transparent"),children:c}):null;E=typeof c=="number"?"assertive":"polite";const W=!u;e[35]!==s||e[36]!==u||e[37]!==W?(R=z("flex w-full items-center justify-center",{"min-h-screen bg-background":W,"h-full":u},s),e[35]=s,e[36]=u,e[37]=W,e[38]=R):R=e[38],N="status-display",y=typeof c=="number"?"alert":"status",w=o,e[39]===Symbol.for("react.memo_cache_sentinel")?(S=z("flex max-w-md flex-col items-center space-y-6 text-center"),e[39]=S):S=e[39],C="flex items-center space-x-4",O=F(),e[21]=s,e[22]=f.icon,e[23]=f.path,e[24]=o,e[25]=u,e[26]=c,e[27]=y,e[28]=w,e[29]=C,e[30]=O,e[31]=S,e[32]=E,e[33]=R,e[34]=N}else y=e[27],w=e[28],C=e[29],O=e[30],S=e[31],E=e[32],R=e[33],N=e[34];let j;e[40]!==C||e[41]!==O?(j=b.jsx("div",{className:C,children:O}),e[40]=C,e[41]=O,e[42]=j):j=e[42];let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D=z("font-bold text-foreground","text-xl"),e[43]=D):D=e[43];let P;e[44]!==m?(P=b.jsx("h1",{id:"status-title","aria-describedby":"status-message",className:D,children:m}),e[44]=m,e[45]=P):P=e[45];let M;e[46]===Symbol.for("react.memo_cache_sentinel")?(M=z("text-muted-foreground","text-base"),e[46]=M):M=e[46];let L;e[47]!==h?(L=b.jsx("p",{id:"status-message",className:M,children:h}),e[47]=h,e[48]=L):L=e[48];let _;e[49]!==P||e[50]!==L?(_=b.jsxs("div",{className:"space-y-2",children:[P,L]}),e[49]=P,e[50]=L,e[51]=_):_=e[51];let T;e[52]!==v?(T=v(),e[52]=v,e[53]=T):T=e[53];let A;e[54]!==j||e[55]!==_||e[56]!==T||e[57]!==S?(A=b.jsxs("div",{className:S,children:[j,_,T]}),e[54]=j,e[55]=_,e[56]=T,e[57]=S,e[58]=A):A=e[58];let V;return e[59]!==y||e[60]!==w||e[61]!==A||e[62]!==E||e[63]!==R||e[64]!==N?(V=b.jsx("div",{"aria-live":E,className:R,"data-ox-slot":N,role:y,...w,children:A}),e[59]=y,e[60]=w,e[61]=A,e[62]=E,e[63]=R,e[64]=N,e[65]=V):V=e[65],V},ya=k.createContext(null),Hs=()=>{const t=k.useContext(ya);if(!t)throw new Error("OxStepperItem must be used within OxStepper");return t},wa=t=>{const e=I.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{orientation:o}=Hs(),i=o==="vertical";let l;e[4]!==r||e[5]!==i?(l=z("mt-2 p-4",{"border-t border-border":i},r),e[4]=r,e[5]=i,e[6]=l):l=e[6];let a;return e[7]!==n||e[8]!==s||e[9]!==l?(a=b.jsx("div",{className:l,...s,"data-ox-slot":"stepper-actions",children:n}),e[7]=n,e[8]=s,e[9]=l,e[10]=a):a=e[10],a},db=(t,e,n)=>t==="error"?st.destructive.icon:t==="warning"?st.warning.icon:e||(n?st.success.icon:null),Ca=(t,e)=>t==="error"?st.destructive:t==="warning"?st.warning:We[e],ii=(t,e)=>t==="error"||t==="warning"?e.text:"text-foreground",Oa=t=>{const e=I.compilerRuntimeExports.c(18);let n,r,s,o;e[0]!==t?({className:n,state:s,stepIndex:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{color:i,currentStep:l,orientation:a}=Hs(),d=l>o,c=s||(d?"completed":"current");let u;e[5]!==c||e[6]!==i?(u=Ca(c,i),e[5]=c,e[6]=i,e[7]=u):u=e[7];const f=u,m=a==="horizontal",h=a==="vertical",p=!d;let g;e[8]!==n||e[9]!==d||e[10]!==f.borderSubtle||e[11]!==m||e[12]!==h||e[13]!==p?(g=z("flex-1 border transition-colors duration-300",{"mx-4 mt-[19px]":m,"my-2 min-h-6":h,"border-border":p,[f.borderSubtle]:d},n),e[8]=n,e[9]=d,e[10]=f.borderSubtle,e[11]=m,e[12]=h,e[13]=p,e[14]=g):g=e[14];let x;return e[15]!==r||e[16]!==g?(x=b.jsx("div",{className:g,...r,"data-ox-slot":"stepper-connector"}),e[15]=r,e[16]=g,e[17]=x):x=e[17],x},Ea=k.createContext(null),He=()=>k.useContext(Ea),Zt=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,disabled:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=He(),l=s??!!i?.disabled;let a;e[5]!==r?(a=z("text-sm leading-relaxed text-pretty text-muted-foreground","aria-disabled:opacity-50",r),e[5]=r,e[6]=a):a=e[6];let d;return e[7]!==n||e[8]!==o||e[9]!==l||e[10]!==a?(d=b.jsx("div",{"aria-disabled":l,className:a,...o,"data-ox-slot":"description",children:n}),e[7]=n,e[8]=o,e[9]=l,e[10]=a,e[11]=d):d=e[11],d},Sa=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=He(),i=typeof o?.error=="string"?o.error:void 0,l=n??i;if(!l)return null;let a;e[4]!==r?(a=z("flex items-start gap-1.5 text-sm leading-relaxed text-pretty text-destructive",'[&>svg:not([class*="size-"])]:size-3.5',"[&>svg]:mt-0.75","[&>svg]:shrink-0","[&>svg]:text-current",r),e[4]=r,e[5]=a):a=e[5];let d;return e[6]!==l||e[7]!==s||e[8]!==a?(d=b.jsx("div",{className:a,role:"alert",...s,"data-ox-slot":"error",children:l}),e[6]=l,e[7]=s,e[8]=a,e[9]=d):d=e[9],d},ub={1:"text-2xl font-bold",2:"text-xl font-semibold",3:"text-lg font-semibold",4:"text-base font-semibold",5:"text-sm font-semibold",6:"text-sm font-medium",7:"text-sm"},ka=({as:t="h2",children:e,className:n,level:r,...s})=>{const o=r??(t!=="div"?Number.parseInt(t.slice(1)):2),i=I.clamp(o,1,7),l={className:z("text-foreground",ub[i],n),...s,"data-ox-slot":"heading",...t==="div"&&{role:"heading","aria-level":o}};return k.createElement(t,l,e)},Ra=t=>{const e=I.compilerRuntimeExports.c(21);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,disabled:s,htmlFor:i,id:l,required:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const d=He(),c=a??d?.required??!1,u=s??d?.disabled??!1,f=i??d?.id,m=l??d?.labelId,h=f&&!u;let p;e[8]!==r||e[9]!==h?(p=z("block text-sm font-medium text-foreground","aria-disabled:opacity-50",{"cursor-pointer":h},r),e[8]=r,e[9]=h,e[10]=p):p=e[10];let g;e[11]!==c?(g=c&&b.jsx("span",{"aria-hidden":"true",className:"ml-1 text-destructive",children:"*"}),e[11]=c,e[12]=g):g=e[12];let x;return e[13]!==n||e[14]!==o||e[15]!==u||e[16]!==f||e[17]!==m||e[18]!==p||e[19]!==g?(x=b.jsxs("label",{id:m,"aria-disabled":u,className:p,htmlFor:f,...o,"data-ox-slot":"label",children:[n,g]}),e[13]=n,e[14]=o,e[15]=u,e[16]=f,e[17]=m,e[18]=p,e[19]=g,e[20]=x):x=e[20],x},fb=t=>{const e=I.compilerRuntimeExports.c(16);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,required:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,a=i===void 0?!1:i;let d;e[6]!==r?(d=z("block text-base font-semibold text-foreground","aria-disabled:opacity-50",r),e[6]=r,e[7]=d):d=e[7];let c;e[8]!==a?(c=a&&b.jsx("span",{"aria-hidden":"true",className:"ml-1 text-destructive",children:"*"}),e[8]=a,e[9]=c):c=e[9];let u;return e[10]!==n||e[11]!==l||e[12]!==s||e[13]!==d||e[14]!==c?(u=b.jsxs("legend",{"aria-disabled":l,className:d,...s,"data-ox-slot":"legend",children:[n,c]}),e[10]=n,e[11]=l,e[12]=s,e[13]=d,e[14]=c,e[15]=u):u=e[15],u},mb={completed:"check",error:"close",warning:"warning",current:"current step",upcoming:"upcoming step"},Na=t=>{const e=I.compilerRuntimeExports.c(70);let n,r,s,o,i,l,a,d;e[0]!==t?({children:n,className:r,description:s,icon:i,state:l,stepIndex:a,title:d,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=a===void 0?0:a,{color:u,currentStep:f,onStepChange:m,orientation:h,totalSteps:p,type:g}=Hs(),x=f===c,v=f>c;let y,w,C,O,S,E,R,N;if(e[9]!==r||e[10]!==u||e[11]!==f||e[12]!==s||e[13]!==o||e[14]!==i||e[15]!==x||e[16]!==v||e[17]!==m||e[18]!==h||e[19]!==l||e[20]!==c||e[21]!==d||e[22]!==p||e[23]!==g){N=Symbol.for("react.early_return_sentinel");e:{let T;l?T=l:c<f?T="completed":c===f?T="current":T="upcoming";const A=g==="non-linear"||v||x,V=db(T,i,v),$=Ca(T,u);let F;e[32]!==A||e[33]!==m||e[34]!==c?(F=()=>{A&&m&&m(c)},e[32]=A,e[33]=m,e[34]=c,e[35]=F):F=e[35];const W=F,B=()=>b.jsx("button",{"aria-current":x?"step":void 0,"aria-describedby":s?`step-${c}-desc`:void 0,"aria-label":`${d} - ${mb[T]} (${c+1} of ${p})`,className:z("flex items-center justify-center rounded-lg transition-colors","enabled:cursor-pointer","ox-focus-ring",{"cursor-pointer":A,"opacity-50":T==="upcoming"}),disabled:!A,type:"button",onClick:W,children:b.jsx("div",{className:z("flex size-10 shrink-0 items-center justify-center rounded-lg border",$.borderSubtle,$.bgSubtle),children:V?b.jsx(ue,{className:$.text,icon:V}):b.jsx("span",{className:z("text-base font-medium text-current"),children:c+1})})});if(h==="horizontal"){let G;e[36]!==r?(G=z("flex flex-col items-center text-center",r),e[36]=r,e[37]=G):G=e[37];let U;e[38]!==s||e[39]!==c?(U=s?b.jsx(Zt,{id:`step-${c}-desc`,children:s}):null,e[38]=s,e[39]=c,e[40]=U):U=e[40],N=b.jsxs("div",{className:G,"data-ox-slot":"stepper-item",...o,children:[B(),b.jsxs("div",{className:"mt-2",children:[b.jsx("h6",{className:z("text-sm font-medium",ii(T,$)),children:d}),U]})]});break e}e[41]!==r?(O=z("flex gap-3",r),e[41]=r,e[42]=O):O=e[42],S="stepper-item",E=o;let H;e[43]!==l||e[44]!==c||e[45]!==p?(H=c<p-1?b.jsx(Oa,{state:l,stepIndex:c}):null,e[43]=l,e[44]=c,e[45]=p,e[46]=H):H=e[46],R=b.jsxs("div",{className:"flex flex-col items-center",children:[B(),H]}),C="flex-1",w="mb-4",y=z("text-sm font-medium",ii(T,$))}e[9]=r,e[10]=u,e[11]=f,e[12]=s,e[13]=o,e[14]=i,e[15]=x,e[16]=v,e[17]=m,e[18]=h,e[19]=l,e[20]=c,e[21]=d,e[22]=p,e[23]=g,e[24]=y,e[25]=w,e[26]=C,e[27]=O,e[28]=S,e[29]=E,e[30]=R,e[31]=N}else y=e[24],w=e[25],C=e[26],O=e[27],S=e[28],E=e[29],R=e[30],N=e[31];if(N!==Symbol.for("react.early_return_sentinel"))return N;let j;e[47]!==y||e[48]!==d?(j=b.jsx("h6",{className:y,children:d}),e[47]=y,e[48]=d,e[49]=j):j=e[49];let D;e[50]!==s||e[51]!==c?(D=s?b.jsx(Zt,{id:`step-${c}-desc`,children:s}):null,e[50]=s,e[51]=c,e[52]=D):D=e[52];let P;e[53]!==j||e[54]!==D||e[55]!==w?(P=b.jsxs("div",{className:w,children:[j,D]}),e[53]=j,e[54]=D,e[55]=w,e[56]=P):P=e[56];let M;e[57]!==n||e[58]!==x?(M=x&&n?b.jsx("div",{className:"mb-4 rounded-lg border border-border bg-card p-4",children:n}):null,e[57]=n,e[58]=x,e[59]=M):M=e[59];let L;e[60]!==P||e[61]!==M||e[62]!==C?(L=b.jsxs("div",{className:C,children:[P,M]}),e[60]=P,e[61]=M,e[62]=C,e[63]=L):L=e[63];let _;return e[64]!==L||e[65]!==O||e[66]!==S||e[67]!==E||e[68]!==R?(_=b.jsxs("div",{className:O,"data-ox-slot":S,...E,children:[R,L]}),e[64]=L,e[65]=O,e[66]=S,e[67]=E,e[68]=R,e[69]=_):_=e[69],_},pb=t=>{const e=I.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a,d;e[0]!==t?({children:n,className:r,color:i,currentStep:l,onStepChange:o,orientation:a,type:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=i===void 0?"violet":i,u=l===void 0?0:l,f=a===void 0?"vertical":a,m=d===void 0?"linear":d;let h,p,g,x,v,y,w,C,O;if(e[9]!==n||e[10]!==r||e[11]!==c||e[12]!==u||e[13]!==s||e[14]!==o||e[15]!==f||e[16]!==m){const R=k.Children.toArray(n).filter(hb);let N;e[26]!==n?(N=k.Children.toArray(n).find(gb),e[26]=n,e[27]=N):N=e[27],p=N;const j=R.map(xb),D={color:c,currentStep:u,onStepChange:o,orientation:f,totalSteps:R.length,type:m};h=ya.Provider,x=D,v="Step-by-step progress",e[28]!==r?(y=z("w-full",r),e[28]=r,e[29]=y):y=e[29],w="navigation",C=s,O="stepper",g=f==="horizontal"?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"flex w-full items-start",children:j.map((P,M)=>b.jsxs(k.Fragment,{children:[k.cloneElement(P,{className:z("min-w-0 flex-1",P.props.className)}),M<R.length-1?b.jsx(Oa,{state:R[M].props.state,stepIndex:M}):null]},M))}),R[u]?.props.children?b.jsx("div",{className:"mt-6 rounded-lg border border-border bg-card p-4",children:R[u].props.children}):null]}):j,e[9]=n,e[10]=r,e[11]=c,e[12]=u,e[13]=s,e[14]=o,e[15]=f,e[16]=m,e[17]=h,e[18]=p,e[19]=g,e[20]=x,e[21]=v,e[22]=y,e[23]=w,e[24]=C,e[25]=O}else h=e[17],p=e[18],g=e[19],x=e[20],v=e[21],y=e[22],w=e[23],C=e[24],O=e[25];let S;e[30]!==p||e[31]!==g||e[32]!==v||e[33]!==y||e[34]!==w||e[35]!==C||e[36]!==O?(S=b.jsxs("div",{"aria-label":v,className:y,role:w,...C,"data-ox-slot":O,children:[g,p]}),e[30]=p,e[31]=g,e[32]=v,e[33]=y,e[34]=w,e[35]=C,e[36]=O,e[37]=S):S=e[37];let E;return e[38]!==h||e[39]!==x||e[40]!==S?(E=b.jsx(h,{value:x,children:S}),e[38]=h,e[39]=x,e[40]=S,e[41]=E):E=e[41],E};function hb(t){return k.isValidElement(t)&&t.type===Na}function gb(t){return k.isValidElement(t)&&t.type===wa}function xb(t,e){return k.cloneElement(t,{stepIndex:e,key:e})}const bb=Object.assign(pb,{Actions:wa,Item:Na}),cs=k.createContext(void 0),vb=t=>{const e=I.compilerRuntimeExports.c(78);let n,r,s,o,i,l,a,d,c,u,f,m;e[0]!==t?({allRowIds:l,children:n,className:r,draggable:a,isLoading:d,onRowReorder:o,onSelectionChange:i,selectable:c,selectedRows:u,skeletonColumns:f,skeletonRows:m,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12]);let h;e[13]!==l?(h=l===void 0?[]:l,e[13]=l,e[14]=h):h=e[14];const p=h,g=a===void 0?!1:a,x=d===void 0?!1:d,v=c===void 0?!1:c;let y;e[15]!==u?(y=u===void 0?[]:u,e[15]=u,e[16]=y):y=e[16];const w=y,C=f===void 0?3:f,O=m===void 0?5:m,[S,E]=k.useState(null);let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=[],e[17]=R):R=e[17];const[N,j]=k.useState(R);let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=[],e[18]=D):D=e[18];const P=k.useRef(D),M=k.useRef(!1);let L;e[19]===Symbol.for("react.memo_cache_sentinel")?(L={coordinateGetter:Bs},e[19]=L):L=e[19];const _=Ss(Xt(Dn),Xt(jn,L));let T;e[20]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{M.current||(M.current=!0,queueMicrotask(()=>{M.current=!1,j([...P.current])}))},e[20]=T):T=e[20];const A=T;let V;e[21]===Symbol.for("react.memo_cache_sentinel")?(V=ee=>{P.current.includes(ee)||(P.current=[...P.current,ee],A())},e[21]=V):V=e[21];const $=V;let F;e[22]===Symbol.for("react.memo_cache_sentinel")?(F=ee=>{P.current=P.current.filter(ie=>ie!==ee),A()},e[22]=F):F=e[22];const W=F;let B;e[23]!==o||e[24]!==N?(B=ee=>{const{active:ie,over:oe}=ee;if(E(null),oe&&ie.id!==oe.id){const me=N.indexOf(String(ie.id)),Oe=N.indexOf(String(oe.id)),ke=$s(N,me,Oe);P.current=ke,j(ke),o?.(ke)}},e[23]=o,e[24]=N,e[25]=B):B=e[25];const H=B,G=p.length>0&&w.length===p.length,U=w.length>0&&w.length<p.length,Y=Math.max(1,Math.min(C,20)),Q=Math.max(1,Math.min(O,50));let X;e[26]!==S?(X=ee=>S===ee,e[26]=S,e[27]=X):X=e[27];let K;e[28]!==w?(K=ee=>w.includes(ee),e[28]=w,e[29]=K):K=e[29];let J;e[30]!==i||e[31]!==w?(J=ee=>{if(!i)return;const ie=w.includes(ee);i(ie?w.filter(oe=>oe!==ee):[...w,ee])},e[30]=i,e[31]=w,e[32]=J):J=e[32];let q;e[33]!==p||e[34]!==G||e[35]!==i?(q=()=>{i&&i(G?[]:[...p])},e[33]=p,e[34]=G,e[35]=i,e[36]=q):q=e[36];let ne;e[37]!==p||e[38]!==g||e[39]!==S||e[40]!==G||e[41]!==U||e[42]!==x||e[43]!==o||e[44]!==i||e[45]!==v||e[46]!==w||e[47]!==X||e[48]!==K||e[49]!==J||e[50]!==q||e[51]!==Y||e[52]!==Q?(ne={allRowIds:p,draggable:g,draggingRowId:S,isLoading:x,selectable:v,selectedRows:w,skeletonColumns:Y,skeletonRows:Q,onRowReorder:o,onSelectionChange:i,registerRowId:$,unregisterRowId:W,isDragging:X,isSelected:K,toggleSelection:J,toggleAll:q,isAllSelected:G,isIndeterminate:U},e[37]=p,e[38]=g,e[39]=S,e[40]=G,e[41]=U,e[42]=x,e[43]=o,e[44]=i,e[45]=v,e[46]=w,e[47]=X,e[48]=K,e[49]=J,e[50]=q,e[51]=Y,e[52]=Q,e[53]=ne):ne=e[53];const Z=ne;let te;e[54]!==r?(te=z("w-full caption-bottom text-sm",r),e[54]=r,e[55]=te):te=e[55];let le;e[56]!==g||e[57]!==v?(le=(v||g)&&b.jsxs("colgroup",{children:[g&&b.jsx("col",{className:"w-12"}),v&&b.jsx("col",{className:"w-12"})]}),e[56]=g,e[57]=v,e[58]=le):le=e[58];let ce;e[59]!==n||e[60]!==s||e[61]!==te||e[62]!==le?(ce=b.jsx("div",{className:"overflow-hidden rounded-md border border-border",children:b.jsxs("table",{className:te,...s,"data-ox-slot":"table",children:[le,n]})}),e[59]=n,e[60]=s,e[61]=te,e[62]=le,e[63]=ce):ce=e[63];const fe=ce;if(g){let ee;e[64]===Symbol.for("react.memo_cache_sentinel")?(ee=Oe=>E(String(Oe.active.id)),e[64]=ee):ee=e[64];let ie;e[65]!==N||e[66]!==fe?(ie=b.jsx(Fs,{items:N,strategy:zs,children:fe}),e[65]=N,e[66]=fe,e[67]=ie):ie=e[67];let oe;e[68]!==H||e[69]!==_||e[70]!==ie?(oe=b.jsx(yr,{collisionDetection:ll,sensors:_,onDragEnd:H,onDragStart:ee,children:ie}),e[68]=H,e[69]=_,e[70]=ie,e[71]=oe):oe=e[71];let me;return e[72]!==Z||e[73]!==oe?(me=b.jsx(cs.Provider,{value:Z,children:oe}),e[72]=Z,e[73]=oe,e[74]=me):me=e[74],me}let he;return e[75]!==Z||e[76]!==fe?(he=b.jsx(cs.Provider,{value:Z,children:fe}),e[75]=Z,e[76]=fe,e[77]=he):he=e[77],he},Ys=()=>k.useContext(cs),ja=t=>{const e=I.compilerRuntimeExports.c(7),{columns:n}=t,r=Ys();let s;e[0]!==r?.selectable?(s=r?.selectable?b.jsx("td",{className:"px-3 py-2",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(_t,{className:"h-[21px] w-4",shape:"circle"})})}):null,e[0]=r?.selectable,e[1]=s):s=e[1];let o;e[2]!==n?(o=Array.from({length:n}).map(yb),e[2]=n,e[3]=o):o=e[3];let i;return e[4]!==s||e[5]!==o?(i=b.jsxs("tr",{className:"border-b transition-colors",children:[s,o]}),e[4]=s,e[5]=o,e[6]=i):i=e[6],i};function yb(t,e){return b.jsx("td",{className:"px-3 py-2",children:b.jsx(_t,{className:"h-[21px] w-full"})},e)}const wb=t=>{const e=I.compilerRuntimeExports.c(13);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=Ys();let i;e[4]!==r?(i=z("[&_tr:last-child]:border-0",r),e[4]=r,e[5]=i):i=e[5];let l;e[6]!==n||e[7]!==o?(l=o?.isLoading?Array.from({length:o.skeletonRows}).map((d,c)=>b.jsx(ja,{columns:o.skeletonColumns},c)):n,e[6]=n,e[7]=o,e[8]=l):l=e[8];let a;return e[9]!==s||e[10]!==i||e[11]!==l?(a=b.jsx("tbody",{className:i,...s,"data-ox-slot":"table-body",children:l}),e[9]=s,e[10]=i,e[11]=l,e[12]=a):a=e[12],a},Cb=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("p-3 align-middle whitespace-nowrap",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("td",{className:o,...s,"data-ox-slot":"table-cell",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Ob=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("mb-4 flex items-center justify-between gap-4",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"table-controls",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Eb=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("border-t border-border font-medium",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("tfoot",{className:o,...s,"data-ox-slot":"table-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Sb=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("h-10 px-3 text-left align-middle font-medium whitespace-nowrap text-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("th",{className:o,...s,"data-ox-slot":"table-head",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Da=k.createContext({isHeader:!1}),kb=()=>k.useContext(Da),Rb=t=>{const e=I.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={isHeader:!0},e[4]=o):o=e[4];let i;e[5]!==r?(i=z("[&_tr]:border-b",r),e[5]=r,e[6]=i):i=e[6];let l;return e[7]!==n||e[8]!==s||e[9]!==i?(l=b.jsx(Da.Provider,{value:o,children:b.jsx("thead",{className:i,...s,"data-ox-slot":"table-header",children:n})}),e[7]=n,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},Pt=t=>t==="indeterminate",Nb=t=>{const e=I.compilerRuntimeExports.c(53);let n,r,s,o,i,l,a,d,c,u,f,m;e[0]!==t?({checked:n,className:r,defaultChecked:s,disabled:o,error:l,id:u,name:a,onChange:d,onCheckedChange:c,required:f,value:m,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12]);const h=He(),p=k.useId(),g=k.useRef(null),x=o??h?.disabled??!1,v=l??!!h?.error,y=f??h?.required??!1,w=u??h?.id??p,C=s??!1;let O;e[13]!==c?(O=Y=>{Y!==void 0&&c?.(Y)},e[13]=c,e[14]=O):O=e[14];let S;e[15]!==n||e[16]!==C||e[17]!==O?(S={value:n,defaultValue:C,onChange:O,name:"OxCheckbox"},e[15]=n,e[16]=C,e[17]=O,e[18]=S):S=e[18];const[E,R]=I.useControllableState(S);let N,j;e[19]!==E?(N=()=>{g.current&&(g.current.indeterminate=Pt(E))},j=[E],e[19]=E,e[20]=N,e[21]=j):(N=e[20],j=e[21]),k.useEffect(N,j);let D;e[22]!==E||e[23]!==x?(D=()=>x?"disabled":Pt(E)?"indeterminate":E?"checked":"unchecked",e[22]=E,e[23]=x,e[24]=D):D=e[24];const P=D;let M;Pt(E)?M="mixed":E?M="true":M="false";let L;e[25]!==d||e[26]!==R?(L=Y=>{d?.(Y),R(Q=>Pt(Q)?!0:Y.target.checked)},e[25]=d,e[26]=R,e[27]=L):L=e[27];const _=L,T=Pt(E)?ae.Minus:ae.Check;let A;e[28]!==E?(A=Pt(E)?!1:E??!1,e[28]=E,e[29]=A):A=e[29];const V=A,$=M;let F;e[30]!==r?(F=z("peer size-4 shrink-0 cursor-pointer appearance-none rounded-sm border border-input bg-transparent shadow-xs","transition-shadow outline-none","ox-focus-ring","checked:border-primary checked:bg-primary",'data-[ox-state="indeterminate"]:border-primary data-[ox-state="indeterminate"]:bg-primary',"aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",r),e[30]=r,e[31]=F):F=e[31];const W=P();let B;e[32]!==M||e[33]!==i||e[34]!==_||e[35]!==v||e[36]!==w||e[37]!==V||e[38]!==x||e[39]!==y||e[40]!==a||e[41]!==F||e[42]!==W||e[43]!==m?(B=b.jsx("input",{id:w,"aria-checked":$,"aria-invalid":v,"aria-required":y,className:F,"data-ox-slot":"checkbox",disabled:x,name:a,ref:g,required:y,type:"checkbox",value:m,onChange:_,...i,checked:V,"data-ox-state":W}),e[32]=M,e[33]=i,e[34]=_,e[35]=v,e[36]=w,e[37]=V,e[38]=x,e[39]=y,e[40]=a,e[41]=F,e[42]=W,e[43]=m,e[44]=B):B=e[44];let H;e[45]!==E?(H=z("pointer-events-none absolute inset-0 m-auto text-primary-foreground",{"opacity-80":Pt(E),"opacity-0 peer-checked:opacity-80":!Pt(E)}),e[45]=E,e[46]=H):H=e[46];let G;e[47]!==T||e[48]!==H?(G=b.jsx(ue,{className:H,icon:T}),e[47]=T,e[48]=H,e[49]=G):G=e[49];let U;return e[50]!==B||e[51]!==G?(U=b.jsxs("div",{className:'relative inline-flex shrink-0 [&_svg:not([class*="size-"])]:size-3.5',children:[B,G]}),e[50]=B,e[51]=G,e[52]=U):U=e[52],U},Pa=k.createContext(void 0),jb=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,disabled:s,name:i,onChange:l,value:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);let d;e[8]!==a?(d=a===void 0?[]:a,e[8]=a,e[9]=d):d=e[9];const c=d,u=He(),f=s??u?.disabled??!1;let m;e[10]!==f||e[11]!==i||e[12]!==l||e[13]!==c?(m={value:c,onChange:l,name:i,disabled:f},e[10]=f,e[11]=i,e[12]=l,e[13]=c,e[14]=m):m=e[14];const h=u?.labelId;let p;e[15]!==r?(p=z("space-y-2",r),e[15]=r,e[16]=p):p=e[16];let g;e[17]!==n||e[18]!==o||e[19]!==h||e[20]!==p?(g=b.jsx("div",{"aria-labelledby":h,className:p,"data-ox-slot":"checkbox-group",role:"group",...o,children:n}),e[17]=n,e[18]=o,e[19]=h,e[20]=p,e[21]=g):g=e[21];let x;return e[22]!==m||e[23]!==g?(x=b.jsx(Pa.Provider,{value:m,children:g}),e[22]=m,e[23]=g,e[24]=x):x=e[24],x},Db=()=>k.useContext(Pa),Pb=t=>{const e=I.compilerRuntimeExports.c(37);let n,r,s,o,i,l,a,d,c;e[0]!==t?({className:n,disabled:o,error:a,id:l,name:i,onChange:s,required:d,value:c,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=a===void 0?!1:a,f=d===void 0?!1:d,m=k.useId(),h=Db();if(!h)throw new Error("CheckboxGroupItem must be used within CheckboxGroup");const p=l||m,g=o??h.disabled??!1,x=i??h.name;let v;e[10]!==h.value||e[11]!==c?(v=h.value?.includes(c)??!1,e[10]=h.value,e[11]=c,e[12]=v):v=e[12];const y=v;let w;e[13]!==h||e[14]!==s||e[15]!==c?(w=P=>{s?.(P);const M=h.value,_=P.target.checked?[...M,c]:M.filter(T=>T!==c);h.onChange?.(_)},e[13]=h,e[14]=s,e[15]=c,e[16]=w):w=e[16];const C=w;let O;e[17]!==g||e[18]!==y?(O=()=>g?"disabled":y?"checked":"unchecked",e[17]=g,e[18]=y,e[19]=O):O=e[19];const S=O;let E;e[20]!==n?(E=z("peer size-4 shrink-0 cursor-pointer appearance-none rounded-sm border border-input bg-transparent shadow-xs","transition-shadow outline-none","ox-focus-ring","checked:border-primary checked:bg-primary","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[20]=n,e[21]=E):E=e[21];const R=S();let N;e[22]!==g||e[23]!==r||e[24]!==u||e[25]!==C||e[26]!==p||e[27]!==y||e[28]!==x||e[29]!==f||e[30]!==E||e[31]!==R||e[32]!==c?(N=b.jsx("input",{id:p,"aria-checked":y,"aria-invalid":u,"aria-required":f,className:E,"data-ox-slot":"checkbox",disabled:g,name:x,required:f,type:"checkbox",value:c,onChange:C,...r,checked:y,"data-ox-state":R}),e[22]=g,e[23]=r,e[24]=u,e[25]=C,e[26]=p,e[27]=y,e[28]=x,e[29]=f,e[30]=E,e[31]=R,e[32]=c,e[33]=N):N=e[33];let j;e[34]===Symbol.for("react.memo_cache_sentinel")?(j=b.jsx(ue,{className:"pointer-events-none absolute inset-0 m-auto text-primary-foreground opacity-0 peer-checked:opacity-80",icon:ae.Check}),e[34]=j):j=e[34];let D;return e[35]!==N?(D=b.jsxs("div",{className:'relative inline-flex shrink-0 [&_svg:not([class*="size-"])]:size-3.5',children:[N,j]}),e[35]=N,e[36]=D):D=e[36],D},ds=Object.assign(Nb,{Group:jb,GroupItem:Pb}),Ta=k.createContext(void 0),Tb=t=>{const e=I.compilerRuntimeExports.c(49),{children:n,className:r,defaultValue:s,disabled:o,error:i,onChange:l,required:a,value:d}=t,c=s===void 0?null:s,u=He(),f=k.useId(),m=o??u?.disabled??!1,h=i??!!u?.error,p=a??u?.required??!1,g=u?.id??f,x=k.useRef(null),v=k.useRef(null),[y,w]=k.useState(0),[C,O]=k.useState(-1),[S,E]=k.useState(0);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R=new Map,e[0]=R):R=e[0];const N=k.useRef(R);let j;e[1]!==m?(j={closeOnEscape:!0,closeOnOutsideClick:!1,disabled:m},e[1]=m,e[2]=j):j=e[2];const{close:D,containerRef:P,isClosing:M,isVisible:L,setOpen:_}=I.usePopperState(j);let T,A;e[3]!==D||e[4]!==P||e[5]!==L?(T=()=>{if(!L)return;const fe=he=>{const ee=he.target,ie=P.current,oe=document.querySelector('[data-ox-slot="combobox-content"]'),me=ie?.contains(ee),Oe=oe?.contains(ee);!me&&!Oe&&D()};return document.addEventListener("mousedown",fe),()=>document.removeEventListener("mousedown",fe)},A=[L,D,P],e[3]=D,e[4]=P,e[5]=L,e[6]=T,e[7]=A):(T=e[6],A=e[7]),k.useEffect(T,A);const V=l;let $;e[8]!==c||e[9]!==V||e[10]!==d?($={defaultValue:c,name:"OxCombobox",onChange:V,value:d},e[8]=c,e[9]=V,e[10]=d,e[11]=$):$=e[11];const[F,W]=I.useControllableState($);let B;e[12]!==_?(B=()=>{x.current&&w(x.current.offsetWidth),O(-1),_(!0),setTimeout(()=>v.current?.focus(),0)},e[12]=_,e[13]=B):B=e[13];const H=B;let G;e[14]!==D?(G=()=>{D(),O(-1)},e[14]=D,e[15]=G):G=e[15];const U=G;let Y;e[16]!==U||e[17]!==H||e[18]!==L?(Y=()=>{L?U():H()},e[16]=U,e[17]=H,e[18]=L,e[19]=Y):Y=e[19];const Q=Y;let X;e[20]!==U||e[21]!==W?(X=fe=>{W(fe),U(),x.current?.focus()},e[20]=U,e[21]=W,e[22]=X):X=e[22];const J=X,q=F;let ne;e[23]!==g||e[24]!==U||e[25]!==H||e[26]!==Q||e[27]!==h||e[28]!==C||e[29]!==M||e[30]!==m||e[31]!==p||e[32]!==L||e[33]!==S||e[34]!==J||e[35]!==q||e[36]!==y?(ne={close:U,comboboxId:g,disabled:m,error:h,highlightedIndex:C,isClosing:M,isVisible:L,onSelect:J,open:H,optionCount:S,required:p,searchRef:v,selectedValue:q,setHighlightedIndex:O,setOptionCount:E,toggle:Q,triggerRef:x,triggerWidth:y,optionValuesMap:N},e[23]=g,e[24]=U,e[25]=H,e[26]=Q,e[27]=h,e[28]=C,e[29]=M,e[30]=m,e[31]=p,e[32]=L,e[33]=S,e[34]=J,e[35]=q,e[36]=y,e[37]=ne):ne=e[37];let Z;e[38]!==r?(Z=z('flex w-full flex-col text-sm [&_svg:not([class*="size-"])]:size-4',r),e[38]=r,e[39]=Z):Z=e[39];let te;e[40]!==n?(te=b.jsx(Se,{children:n}),e[40]=n,e[41]=te):te=e[41];let le;e[42]!==P||e[43]!==Z||e[44]!==te?(le=b.jsx("div",{className:Z,ref:P,children:te}),e[42]=P,e[43]=Z,e[44]=te,e[45]=le):le=e[45];let ce;return e[46]!==ne||e[47]!==le?(ce=b.jsx(Ta.Provider,{value:ne,children:le}),e[46]=ne,e[47]=le,e[48]=ce):ce=e[48],ce},Mn=()=>{const t=k.useContext(Ta);if(!t)throw new Error("Combobox components must be used within an OxCombobox");return t},Mb=t=>{const e=I.compilerRuntimeExports.c(18);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{comboboxId:o,isClosing:i,isVisible:l,triggerWidth:a}=Mn(),d=k.useRef(null);let c,u;if(e[4]!==l||e[5]!==a?(c=()=>{l&&d.current&&(d.current.style.minWidth=`${a}px`)},u=[l,a],e[4]=l,e[5]=a,e[6]=c,e[7]=u):(c=e[6],u=e[7]),k.useLayoutEffect(c,u),!l)return null;const f=i?"closing":"open",m=`${o}-content`;let h;e[8]!==r?(h=z("flex max-h-80 flex-col overflow-hidden",r),e[8]=r,e[9]=h):h=e[9];let p;e[10]!==n||e[11]!==s||e[12]!==m||e[13]!==h?(p=b.jsx("div",{id:m,className:h,...s,"data-ox-slot":"combobox-content",children:n}),e[10]=n,e[11]=s,e[12]=m,e[13]=h,e[14]=p):p=e[14];let g;return e[15]!==f||e[16]!==p?(g=b.jsx(Bt,{children:b.jsx(Se.Content,{align:"start",className:"ox-combobox-animate z-50 rounded-lg border border-border bg-popover text-sm text-popover-foreground shadow-md [&_svg:not([class*='size-'])]:size-4","data-ox-state":f,ref:d,side:"bottom",sideOffset:8,children:p})}),e[15]=f,e[16]=p,e[17]=g):g=e[17],g},Ib=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("flex items-center justify-center p-4 text-sm text-muted-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"combobox-empty",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Ab=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({className:n,rows:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=s===void 0?4:s;let i;e[4]!==n?(i=z("flex flex-col gap-1 mask-b-from-0% p-2",n),e[4]=n,e[5]=i):i=e[5];let l;e[6]!==o?(l=Array.from({length:o}).map(_b),e[6]=o,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==i||e[10]!==l?(a=b.jsx("div",{"aria-busy":"true","aria-label":"Loading options",className:i,role:"status",...r,"data-ox-slot":"combobox-loading",children:l}),e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],a};function _b(t,e){return b.jsx(_t,{className:"h-8 w-full rounded-sm bg-neutral-accent"},e)}const $b=t=>{const e=I.compilerRuntimeExports.c(36);let n,r,s,o;e[0]!==t?({children:n,className:r,value:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{comboboxId:i,highlightedIndex:l,onSelect:a,optionCount:d,optionValuesMap:c,selectedValue:u}=Mn(),[f,m]=k.useState(-1),h=k.useRef(null),p=u===o,g=f>-1&&l===f;let x;e[5]!==c||e[6]!==o?(x=()=>{const L=h.current?.parentElement;if(!L)return;const T=[...L.querySelectorAll('[data-ox-slot="combobox-option"]')].indexOf(h.current);m(T),c.current?.set(T,o)},e[5]=c,e[6]=o,e[7]=x):x=e[7];let v;e[8]!==d||e[9]!==c||e[10]!==o?(v=[d,c,o],e[8]=d,e[9]=c,e[10]=o,e[11]=v):v=e[11],k.useEffect(x,v);let y,w;e[12]!==g?(y=()=>{g&&h.current&&h.current.scrollIntoView({block:"nearest"})},w=[g],e[12]=g,e[13]=y,e[14]=w):(y=e[13],w=e[14]),k.useEffect(y,w);let C;e[15]!==a||e[16]!==o?(C=()=>{a(o)},e[15]=a,e[16]=o,e[17]=C):C=e[17];const O=C,S=`${i}-option-${f}`,E=g||p;let R;e[18]!==r||e[19]!==E?(R=z("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-popover-foreground outline-none","hover:bg-neutral-accent hover:text-neutral-accent-foreground",{"bg-neutral-accent text-neutral-accent-foreground":E},r),e[18]=r,e[19]=E,e[20]=R):R=e[20];const N=g||void 0,j=p||void 0;let D;e[21]!==n?(D=b.jsx("span",{className:"flex flex-1 items-center gap-2",children:n}),e[21]=n,e[22]=D):D=e[22];let P;e[23]!==p?(P=p&&b.jsx(ue,{className:"shrink-0 text-primary",icon:ae.Check,size:"sm"}),e[23]=p,e[24]=P):P=e[24];let M;return e[25]!==s||e[26]!==O||e[27]!==f||e[28]!==p||e[29]!==j||e[30]!==D||e[31]!==P||e[32]!==S||e[33]!==R||e[34]!==N?(M=b.jsxs("li",{id:S,"aria-selected":p,className:R,ref:h,role:"option",onClick:O,...s,"data-ox-highlighted":N,"data-ox-index":f,"data-ox-selected":j,"data-ox-slot":"combobox-option",children:[D,P]}),e[25]=s,e[26]=O,e[27]=f,e[28]=p,e[29]=j,e[30]=D,e[31]=P,e[32]=S,e[33]=R,e[34]=N,e[35]=M):M=e[35],M},Lb=t=>{const e=I.compilerRuntimeExports.c(17);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{comboboxId:o,setOptionCount:i}=Mn();let l;e[4]!==n?(l=k.Children.count(n),e[4]=n,e[5]=l):l=e[5];const a=l;let d,c;e[6]!==a||e[7]!==i?(d=()=>{i(a)},c=[a,i],e[6]=a,e[7]=i,e[8]=d,e[9]=c):(d=e[8],c=e[9]),k.useEffect(d,c);const u=`${o}-listbox`;let f;e[10]!==r?(f=z("flex flex-col gap-0.5 overflow-y-auto p-1",r),e[10]=r,e[11]=f):f=e[11];let m;return e[12]!==n||e[13]!==s||e[14]!==u||e[15]!==f?(m=b.jsx("ul",{id:u,"aria-label":"Options",className:f,role:"listbox",...s,"data-ox-slot":"combobox-options",children:n}),e[12]=n,e[13]=s,e[14]=u,e[15]=f,e[16]=m):m=e[16],m},zb=t=>{const e=I.compilerRuntimeExports.c(35);let n,r,s,o,i;e[0]!==t?({className:n,debounce:o,onChange:s,placeholder:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?300:o,a=i===void 0?"Search...":i,{close:d,comboboxId:c,disabled:u,highlightedIndex:f,isVisible:m,onSelect:h,optionCount:p,optionValuesMap:g,searchRef:x,setHighlightedIndex:v}=Mn(),[y,w]=k.useState(""),C=I.useDebounce(y,l);let O,S;e[6]!==C||e[7]!==s?(O=()=>{s?.(C)},S=[C,s],e[6]=C,e[7]=s,e[8]=O,e[9]=S):(O=e[8],S=e[9]),k.useEffect(O,S);let E;e[10]!==v?(E=T=>{w(T.target.value),v(-1)},e[10]=v,e[11]=E):E=e[11];const R=E;let N;e[12]!==d||e[13]!==f||e[14]!==m||e[15]!==h||e[16]!==p||e[17]!==g||e[18]!==v?(N=T=>{if(!(!m||p===0))e:switch(T.key){case"ArrowDown":{T.preventDefault();const A=f<p-1?f+1:0;v(A);break e}case"ArrowUp":{T.preventDefault();const A=f>0?f-1:p-1;v(A);break e}case"Enter":{if(T.preventDefault(),f>=0){const A=g.current?.get(f);A!==void 0&&h(A)}break e}case"Home":{T.preventDefault(),v(0);break e}case"End":{T.preventDefault(),v(p-1);break e}case"Escape":T.preventDefault(),d()}},e[12]=d,e[13]=f,e[14]=m,e[15]=h,e[16]=p,e[17]=g,e[18]=v,e[19]=N):N=e[19];const j=N;let D;e[20]===Symbol.for("react.memo_cache_sentinel")?(D=b.jsx(ue,{className:"shrink-0 text-muted-foreground",icon:ae.Search}),e[20]=D):D=e[20];const P=f>=0?`${c}-option-${f}`:void 0,M=`${c}-listbox`;let L;e[21]!==n?(L=z("h-8 w-full bg-transparent text-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",n),e[21]=n,e[22]=L):L=e[22];let _;return e[23]!==u||e[24]!==r||e[25]!==R||e[26]!==j||e[27]!==y||e[28]!==m||e[29]!==a||e[30]!==x||e[31]!==L||e[32]!==P||e[33]!==M?(_=b.jsxs("div",{className:"flex items-center gap-2 border-b border-border p-2",children:[D,b.jsx("input",{"aria-activedescendant":P,"aria-autocomplete":"list","aria-controls":M,"aria-expanded":m,className:L,disabled:u,placeholder:a,ref:x,role:"combobox",type:"text",value:y,onChange:R,onKeyDown:j,...r,"data-ox-slot":"combobox-search"})]}),e[23]=u,e[24]=r,e[25]=R,e[26]=j,e[27]=y,e[28]=m,e[29]=a,e[30]=x,e[31]=L,e[32]=P,e[33]=M,e[34]=_):_=e[34],_},Fb=t=>{const e=I.compilerRuntimeExports.c(35);let n,r,s,o,i;e[0]!==t?({className:n,disabled:s,placeholder:i,renderValue:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?"Select an option":i,{comboboxId:a,disabled:d,error:c,isVisible:u,selectedValue:f,toggle:m,triggerRef:h}=Mn(),p=s??d,g=f!=null;let x;e[6]!==g||e[7]!==o||e[8]!==f?(x=g?o?o(f):String(f):null,e[6]=g,e[7]=o,e[8]=f,e[9]=x):x=e[9];const v=x,y=`${a}-listbox`,w=g?`Selected: ${v}`:l;let C;e[10]!==n||e[11]!==c?(C=z("flex h-9 w-full items-center gap-x-2 rounded-lg border border-input bg-transparent px-3 py-2 text-left text-sm enabled:cursor-pointer","dark:bg-input/30 dark:enabled:hover:bg-input/50","ox-focus-ring focus-visible:border-ring","disabled:cursor-not-allowed disabled:opacity-50","shadow-xs transition-[color,box-shadow]","[&>span:empty]:text-muted-foreground",{"border-destructive ring-destructive/20 dark:ring-destructive/40":c},n),e[10]=n,e[11]=c,e[12]=C):C=e[12];const O=c||void 0,S=u?"open":"closed";let E;e[13]!==v||e[14]!==g||e[15]!==l?(E=g?b.jsx("span",{className:"min-w-0 flex-1 truncate",children:v}):b.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:l}),e[13]=v,e[14]=g,e[15]=l,e[16]=E):E=e[16];let R;e[17]!==u?(R=z("shrink-0 text-muted-foreground opacity-50 transition-transform duration-300 ease-in-out",{"rotate-180":u}),e[17]=u,e[18]=R):R=e[18];let N;e[19]!==R?(N=b.jsx(ue,{className:R,icon:ae.ChevronDown}),e[19]=R,e[20]=N):N=e[20];let j;return e[21]!==a||e[22]!==r||e[23]!==p||e[24]!==u||e[25]!==N||e[26]!==y||e[27]!==w||e[28]!==C||e[29]!==O||e[30]!==S||e[31]!==E||e[32]!==m||e[33]!==h?(j=b.jsx(Se.Anchor,{asChild:!0,children:b.jsxs("button",{id:a,"aria-controls":y,"aria-disabled":p,"aria-expanded":u,"aria-haspopup":"listbox","aria-label":w,className:C,disabled:p,ref:h,type:"button",onClick:m,...r,"data-ox-error":O,"data-ox-slot":"combobox-trigger","data-ox-state":S,children:[E,N]})}),e[21]=a,e[22]=r,e[23]=p,e[24]=u,e[25]=N,e[26]=y,e[27]=w,e[28]=C,e[29]=O,e[30]=S,e[31]=E,e[32]=m,e[33]=h,e[34]=j):j=e[34],j},Vb=Object.assign(Tb,{Content:Mb,Empty:Ib,Loading:Ab,Option:$b,Options:Lb,Search:zb,Trigger:Fb}),Ma=k.createContext(null),Bb=t=>t.map(e=>e.includes("/")?e:`.${e}`).join(","),li=t=>{const e={B:1,KB:1024,MB:1048576,GB:1073741824},n=t.match(/^(\d+(?:\.\d+)?)\s*(B|KB|MB|GB)$/i);if(!n)throw new Error(`Invalid size format: ${t}. Use format like "5MB", "1.5GB", etc.`);const[,r,s]=n;return Number.parseFloat(r)*e[s.toUpperCase()]},Wb=(t,e)=>e.some(n=>n.includes("/")?n.endsWith("/*")?t.type.startsWith(n.slice(0,-1)):t.type===n:t.name.toLowerCase().endsWith(`.${n.toLowerCase()}`)),Hb=t=>{t.preventDefault(),t.stopPropagation()},Yb=t=>{const e=I.compilerRuntimeExports.c(74);let n,r,s,o,i,l,a,d,c,u,f;e[0]!==t?({accept:c,children:n,className:r,disabled:u,maxFiles:o,maxSize:i,minSize:l,multiple:f,onError:a,onFileSelect:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11]);let m;e[12]!==c?(m=c===void 0?[]:c,e[12]=c,e[13]=m):m=e[13];const h=m,p=u===void 0?!1:u,g=f===void 0?!1:f,x=k.useRef(null);let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[14]=v):v=e[14];const[y,w]=k.useState(v),[C,O]=k.useState(!1),[S,E]=k.useState();let R;e[15]!==h||e[16]!==o||e[17]!==i||e[18]!==l||e[19]!==g?(R=Z=>{if(!g&&Z.length>1)return"Only single file selection is allowed";if(o&&Z.length>o)return`Maximum ${o} file${o===1?"":"s"} allowed`;if(Z.length===0)return null;if(h.length>0&&Z.filter(le=>!Wb(le,h)).length>0)return`Invalid file type. Accepted formats: ${h.join(", ")}`;if(i){const te=li(i);if(Z.filter(ce=>ce.size>te).length>0)return`File size must not exceed ${i}`}if(l){const te=li(l);if(Z.filter(ce=>ce.size<te).length>0)return`File size must be at least ${l}`}return null},e[15]=h,e[16]=o,e[17]=i,e[18]=l,e[19]=g,e[20]=R):R=e[20];const N=R;let j;e[21]!==a||e[22]!==d||e[23]!==N?(j=Z=>{const te=N(Z);if(te){E(te),a?.(te);return}E(void 0),w(Z),d?.(Z)},e[21]=a,e[22]=d,e[23]=N,e[24]=j):j=e[24];const D=j;let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=()=>{w([]),E(void 0)},e[25]=P):P=e[25];const M=P;let L;e[26]!==p?(L=()=>{!p&&x.current&&x.current.click()},e[26]=p,e[27]=L):L=e[27];const _=L;let T;e[28]!==D?(T=Z=>{const te=[...Z.target.files||[]];te.length>0&&D(te),Z.target.value=""},e[28]=D,e[29]=T):T=e[29];const A=T;let V;e[30]!==h||e[31]!==p||e[32]!==S||e[33]!==y||e[34]!==C||e[35]!==o||e[36]!==i||e[37]!==l||e[38]!==g||e[39]!==a||e[40]!==d||e[41]!==_||e[42]!==D||e[43]!==N?(V={accept:h,clearFiles:M,disabled:p,error:S,files:y,isDragActive:C,maxFiles:o,maxSize:i,minSize:l,multiple:g,onError:a,onFileSelect:d,openFilePicker:_,selectFiles:D,validateFiles:N},e[30]=h,e[31]=p,e[32]=S,e[33]=y,e[34]=C,e[35]=o,e[36]=i,e[37]=l,e[38]=g,e[39]=a,e[40]=d,e[41]=_,e[42]=D,e[43]=N,e[44]=V):V=e[44];const $=V;let F;e[45]!==p?(F=Z=>{Z.preventDefault(),Z.stopPropagation(),p||O(!0)},e[45]=p,e[46]=F):F=e[46];const W=F;let B;e[47]!==p?(B=Z=>{Z.preventDefault(),Z.stopPropagation(),!p&&!Z.currentTarget.contains(Z.relatedTarget)&&O(!1)},e[47]=p,e[48]=B):B=e[48];const H=B;let G;e[49]!==p||e[50]!==D?(G=Z=>{if(Z.preventDefault(),Z.stopPropagation(),p)return;O(!1);const te=[...Z.dataTransfer.files];D(te)},e[49]=p,e[50]=D,e[51]=G):G=e[51];const U=G;let Y;e[52]!==r?(Y=z("relative",r),e[52]=r,e[53]=Y):Y=e[53];const Q=C?"drag-active":"idle";let X;e[54]!==h?(X=h.length>0?Bb(h):void 0,e[54]=h,e[55]=X):X=e[55];let K;e[56]===Symbol.for("react.memo_cache_sentinel")?(K={display:"none"},e[56]=K):K=e[56];let J;e[57]!==p||e[58]!==A||e[59]!==g||e[60]!==X?(J=b.jsx("input",{accept:X,className:"hidden","data-ox-slot":"file-upload-input",disabled:p,multiple:g,ref:x,style:K,type:"file",onChange:A}),e[57]=p,e[58]=A,e[59]=g,e[60]=X,e[61]=J):J=e[61];let q;e[62]!==n||e[63]!==s||e[64]!==W||e[65]!==H||e[66]!==U||e[67]!==Y||e[68]!==Q||e[69]!==J?(q=b.jsxs("div",{className:Y,"data-ox-slot":"file-upload",...s,"data-ox-state":Q,onDragEnter:W,onDragLeave:H,onDragOver:Hb,onDrop:U,children:[n,J]}),e[62]=n,e[63]=s,e[64]=W,e[65]=H,e[66]=U,e[67]=Y,e[68]=Q,e[69]=J,e[70]=q):q=e[70];let ne;return e[71]!==$||e[72]!==q?(ne=b.jsx(Ma.Provider,{value:$,children:q}),e[71]=$,e[72]=q,e[73]=ne):ne=e[73],ne},qs=()=>{const t=k.useContext(Ma);if(!t)throw new Error("useFileUploadContext must be used within a FileUploadContext.Provider");return t},qb=t=>{const e=I.compilerRuntimeExports.c(29);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o,error:i,isDragActive:l,openFilePicker:a}=qs();let d;e[4]!==o||e[5]!==i||e[6]!==l?(d=()=>i?"error":l?"drag-active":o?"disabled":"idle",e[4]=o,e[5]=i,e[6]=l,e[7]=d):d=e[7];const c=d,u=!l&&!i,f=!i&&!o;let m;e[8]!==r||e[9]!==o||e[10]!==i||e[11]!==l||e[12]!==u||e[13]!==f?(m=z("rounded-lg border-2 border-dashed p-6 transition-all duration-200",{"border-border bg-card":u,"border-primary bg-card":l,"border-destructive bg-card":i,"cursor-pointer focus:border-primary focus:outline-none":f,"ox-default-disabled":o},r),e[8]=r,e[9]=o,e[10]=i,e[11]=l,e[12]=u,e[13]=f,e[14]=m):m=e[14];const h=o?-1:0,p=c();let g;e[15]!==o||e[16]!==a?(g=y=>{(y.key==="Enter"||y.key===" ")&&!o&&(y.preventDefault(),a())},e[15]=o,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==i?(x=i&&b.jsx("div",{className:"mt-2 text-center text-sm text-destructive",children:i}),e[18]=i,e[19]=x):x=e[19];let v;return e[20]!==n||e[21]!==s||e[22]!==a||e[23]!==m||e[24]!==h||e[25]!==p||e[26]!==g||e[27]!==x?(v=b.jsxs("div",{className:m,role:"button",tabIndex:h,...s,"data-ox-slot":"file-upload-area","data-ox-state":p,onClick:a,onKeyDown:g,children:[n,x]}),e[20]=n,e[21]=s,e[22]=a,e[23]=m,e[24]=h,e[25]=p,e[26]=g,e[27]=x,e[28]=v):v=e[28],v},Gb=t=>{const e=I.compilerRuntimeExports.c(16);let n,r,s,o,i;e[0]!==t?({children:n,className:r,size:o,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?"md":o,a=i===void 0?"primary":i,{disabled:d,openFilePicker:c}=qs();let u;e[6]!==r?(u=z("cursor-pointer",r),e[6]=r,e[7]=u):u=e[7];let f;return e[8]!==n||e[9]!==d||e[10]!==s||e[11]!==c||e[12]!==l||e[13]!==u||e[14]!==a?(f=b.jsx(Ze,{className:u,disabled:d,size:l,type:"button",variant:a,...s,onClick:c,children:n}),e[8]=n,e[9]=d,e[10]=s,e[11]=c,e[12]=l,e[13]=u,e[14]=a,e[15]=f):f=e[15],f},Ub=t=>{const e=I.compilerRuntimeExports.c(41);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const[o,i]=k.useState(!1),{disabled:l,isDragActive:a,openFilePicker:d}=qs();let c;e[4]!==l||e[5]!==a||e[6]!==o?(c=()=>a?"drag-active":o?"hovered":l?"disabled":"idle",e[4]=l,e[5]=a,e[6]=o,e[7]=c):c=e[7];const u=c,f=(o||a)&&!l;let m;e[8]!==r||e[9]!==l?(m=z("ox-backdrop-blur-parent group relative w-fit cursor-pointer overflow-hidden rounded-lg","ox-focus-ring",{"cursor-not-allowed opacity-50":l},r),e[8]=r,e[9]=l,e[10]=m):m=e[10];const h=l?-1:0,p=u();let g;e[11]!==l||e[12]!==d?(g=D=>{(D.key==="Enter"||D.key===" ")&&!l&&(D.preventDefault(),d())},e[11]=l,e[12]=d,e[13]=g):g=e[13];let x,v;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=()=>i(!0),v=()=>i(!1),e[14]=x,e[15]=v):(x=e[14],v=e[15]);const y=!f;let w;e[16]!==a||e[17]!==f||e[18]!==y?(w=z("absolute inset-0 flex w-full items-center justify-center transition-all duration-200","bg-background/70 backdrop-blur-sm",{"pointer-events-none opacity-0":y,"opacity-100":f,"bg-primary/60":a}),e[16]=a,e[17]=f,e[18]=y,e[19]=w):w=e[19];const C=!f;let O;e[20]!==a||e[21]!==f||e[22]!==C?(O=z("flex flex-col items-center gap-2 text-white transition-transform duration-200",{"scale-90":C,"scale-100":f,"scale-110":a}),e[20]=a,e[21]=f,e[22]=C,e[23]=O):O=e[23];const S=a?ae.CloudUpload:ae.Upload;let E;e[24]!==S?(E=b.jsx(ue,{className:"text-white drop-shadow-[0_0_12px_rgba(255,255,255,0.7)]",icon:S,size:"xl"}),e[24]=S,e[25]=E):E=e[25];let R;e[26]!==O||e[27]!==E?(R=b.jsx("div",{className:O,children:E}),e[26]=O,e[27]=E,e[28]=R):R=e[28];let N;e[29]!==R||e[30]!==w?(N=b.jsx("div",{className:w,"data-ox-slot":"file-upload-overlay-backdrop",children:R}),e[29]=R,e[30]=w,e[31]=N):N=e[31];let j;return e[32]!==n||e[33]!==s||e[34]!==d||e[35]!==N||e[36]!==m||e[37]!==h||e[38]!==p||e[39]!==g?(j=b.jsxs("div",{className:m,role:"button",tabIndex:h,...s,"data-ox-slot":"file-upload-overlay","data-ox-state":p,onClick:d,onKeyDown:g,onMouseEnter:x,onMouseLeave:v,children:[n,N]}),e[32]=n,e[33]=s,e[34]=d,e[35]=N,e[36]=m,e[37]=h,e[38]=p,e[39]=g,e[40]=j):j=e[40],j},Kb=Object.assign(Yb,{Area:qb,Button:Gb,Overlay:Ub}),Xb=t=>{const e=I.compilerRuntimeExports.c(14);let n,r,s,o,i;e[0]!==t?({children:n,className:r,fullWidth:o,noValidate:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,a=i===void 0?!0:i;let d;e[6]!==r||e[7]!==l?(d=z({"w-full":l},r),e[6]=r,e[7]=l,e[8]=d):d=e[8];let c;return e[9]!==n||e[10]!==s||e[11]!==a||e[12]!==d?(c=b.jsx("form",{className:d,"data-ox-slot":"form",noValidate:a,...s,children:n}),e[9]=n,e[10]=s,e[11]=a,e[12]=d,e[13]=c):c=e[13],c},Qb=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Zt,{...t}),e[0]=t,e[1]=n):n=e[1],n},Jb=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Sa,{...t}),e[0]=t,e[1]=n):n=e[1],n},Zb=z("grid grid-cols-[auto_1fr] items-center gap-x-3 gap-y-1",'input[data-ox-slot="checkbox"]:col-start-1','input[data-ox-slot="checkbox"]:row-start-1','input[data-ox-slot="radio"]:col-start-1','input[data-ox-slot="radio"]:row-start-1','button[data-ox-slot="switch"]:col-start-1','button[data-ox-slot="switch"]:row-start-1',"*:data-[ox-slot=label]:col-start-2","*:data-[ox-slot=description]:col-start-2","*:data-[ox-slot=error]:col-start-2"),e0=z("grid grid-cols-[1fr_auto] items-center gap-x-3 gap-y-1",'input[data-ox-slot="checkbox"]:col-start-2','input[data-ox-slot="checkbox"]:row-start-1','input[data-ox-slot="radio"]:col-start-2','input[data-ox-slot="radio"]:row-start-1','button[data-ox-slot="switch"]:col-start-2','button[data-ox-slot="switch"]:row-start-1',"*:data-[ox-slot=label]:col-start-1","*:data-[ox-slot=label]:row-start-1","*:data-[ox-slot=description]:col-start-1","*:data-[ox-slot=error]:col-start-1"),t0=t=>{const e=I.compilerRuntimeExports.c(28);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,disabled:i,error:l,id:s,labelPosition:a,orientation:d,required:c,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=i===void 0?!1:i,f=l===void 0?!1:l,m=a===void 0?"start":a,h=d===void 0?"vertical":d,p=c===void 0?!1:c,g=k.useId(),x=s??g,v=`${x}-label`,y=h==="horizontal",w=m==="end";let C;e[10]!==u||e[11]!==f||e[12]!==x||e[13]!==v||e[14]!==p?(C={disabled:u,error:f,id:x,labelId:v,required:p},e[10]=u,e[11]=f,e[12]=x,e[13]=v,e[14]=p,e[15]=C):C=e[15];const O=!y,S=y&&!w,E=y&&w;let R;e[16]!==r||e[17]!==O||e[18]!==S||e[19]!==E?(R=z({"space-y-1":O,[Zb]:S,[e0]:E},r),e[16]=r,e[17]=O,e[18]=S,e[19]=E,e[20]=R):R=e[20];let N;e[21]!==n||e[22]!==o||e[23]!==R?(N=b.jsx("div",{className:R,...o,"data-ox-slot":"form-field",children:n}),e[21]=n,e[22]=o,e[23]=R,e[24]=N):N=e[24];let j;return e[25]!==N||e[26]!==C?(j=b.jsx(Ea.Provider,{value:C,children:N}),e[25]=N,e[26]=C,e[27]=j):j=e[27],j},n0=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,layout:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o==="grid";let l;e[5]!==r||e[6]!==i?(l=z("space-y-6",{"md:>*:data-[ox-slot=heading]:[grid-column:1] md:>*:data-[ox-slot=description]:[grid-column:1] md:>div:[grid-column:2] md:grid md:grid-cols-[1fr_2fr] md:gap-x-8 md:gap-y-3":i},r),e[5]=r,e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==n||e[9]!==s||e[10]!==l?(a=b.jsx("div",{className:l,"data-ox-slot":"form-group",...s,children:n}),e[8]=n,e[9]=s,e[10]=l,e[11]=a):a=e[11],a},r0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(ka,{...t}),e[0]=t,e[1]=n):n=e[1],n},s0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Ra,{...t}),e[0]=t,e[1]=n):n=e[1],n},o0=Object.assign(Xb,{Description:Qb,Error:Jb,Field:t0,Group:n0,GroupTitle:r0,Label:s0}),In=k.createContext(null),cn=()=>{const t=k.useContext(In);if(!t)throw new Error("useBaseInputContext must be used within a BaseInput component");return t},St=t=>{const e=I.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o}=cn();let i;e[4]!==r?(i=z("enabled:cursor-pointer","disabled:ox-default-disabled",r),e[4]=r,e[5]=i):i=e[5];let l;return e[6]!==n||e[7]!==o||e[8]!==s||e[9]!==i?(l=b.jsx("button",{className:i,disabled:o,tabIndex:-1,type:"button",...s,"data-ox-slot":"input-button",children:n}),e[6]=n,e[7]=o,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},i0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},Nr=t=>{const e=I.compilerRuntimeExports.c(21);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o,error:i,setShowValidation:l,showValidation:a,validationMessage:d}=cn(),c=a&&!!d,u=!i;let f;e[4]!==r||e[5]!==o||e[6]!==i||e[7]!==u?(f=z("flex h-9 w-full items-center gap-2 rounded-md border bg-transparent px-3 py-1","dark:bg-input/30","text-base shadow-xs md:text-sm",'[&_svg:not([class*="size-"])]:size-4',"transition-[color,box-shadow]","ox-focus-within-ring focus-within:border-ring",{"border-input":u,"border-destructive ring-destructive/20 dark:ring-destructive/40":i,"cursor-not-allowed opacity-50 [&_svg]:opacity-50":o},r),e[4]=r,e[5]=o,e[6]=i,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==n||e[10]!==s||e[11]!==f?(m=b.jsx(Un.Trigger,{asChild:!0,children:b.jsx("div",{className:f,...s,"data-ox-slot":"input-container",children:n})}),e[9]=n,e[10]=s,e[11]=f,e[12]=m):m=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=b.jsx(ue,{className:"text-destructive",icon:ae.CircleAlert,size:"sm"}),e[13]=h):h=e[13];let p;e[14]!==d?(p=b.jsx(Un.Content,{showCloseButton:!1,children:b.jsxs("div",{className:"flex items-center gap-2 text-base text-destructive-foreground md:text-sm",children:[h,d]})}),e[14]=d,e[15]=p):p=e[15];let g;return e[16]!==c||e[17]!==l||e[18]!==m||e[19]!==p?(g=b.jsxs(Un,{closeOnOutsideClick:!0,open:c,side:"bottom",onOpenChange:l,children:[m,p]}),e[16]=c,e[17]=l,e[18]=m,e[19]=p,e[20]=g):g=e[20],g},Ia=k.createContext(null),Gs=()=>{const t=k.useContext(Ia);if(!t)throw new Error("useDateContext must be used within a DateInput component");return t},l0=()=>{const t=I.compilerRuntimeExports.c(10),{close:e,day:n,month:r,setValue:s,year:o}=Gs();let i;t[0]!==n||t[1]!==r||t[2]!==o?(i=n&&r&&o&&o.length===4?`${o}-${r.padStart(2,"0")}-${n.padStart(2,"0")}`:void 0,t[0]=n,t[1]=r,t[2]=o,t[3]=i):i=t[3];const l=i;let a;t[4]!==e||t[5]!==s?(a=u=>{const[f,m,h]=u.split("-");s({day:h,month:m,year:f}),e()},t[4]=e,t[5]=s,t[6]=a):a=t[6];const d=a;let c;return t[7]!==l||t[8]!==d?(c=b.jsx(el,{value:l,onChange:d}),t[7]=l,t[8]=d,t[9]=c):c=t[9],c},a0=t=>{if(!t)return{day:"",month:"",year:""};const[e="",n="",r=""]=t.split("-");return{day:r,month:n,year:e}},Aa=(t,e,n)=>{if(!t&&!e&&!n)return"";const r=t?t.padStart(2,"0"):"",s=e?e.padStart(2,"0"):"";return`${n?n.padStart(4,"0"):""}-${s}-${r}`},c0=(t,e)=>{if(!t)return 31;const n=Number.parseInt(t,10);if(n<1||n>12)return 31;const r=e&&e.length===4?Number.parseInt(e,10):new Date().getFullYear(),s=new Date(r,n-1,1);return pf(s)},d0=t=>t.length===2?Number.parseInt(t,10)<50?`20${t}`:`19${t}`:t,u0=(t,e,n)=>{if(!t||!e||!n||n.length<4)return!1;const r=Aa(t,e,n),s=um(r,"yyyy-MM-dd",new Date);return Wi(s)},f0=t=>{const e=I.compilerRuntimeExports.c(20),{defaultValue:n,onChange:r,value:s}=t,o=n??"";let i;e[0]!==r?(i=x=>r?.(x??""),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==o||e[3]!==i||e[4]!==s?(l={value:s,defaultValue:o,onChange:i},e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5];const[a,d]=I.useControllableState(l);let c;e[6]!==a?(c=a0(a),e[6]=a,e[7]=c):c=e[7];const{day:u,month:f,year:m}=c;let h;e[8]!==u||e[9]!==f||e[10]!==d||e[11]!==m?(h=x=>{const v=x.day??u,y=x.month??f,w=x.year??m,C=Aa(v,y,w);d(C)},e[8]=u,e[9]=f,e[10]=d,e[11]=m,e[12]=h):h=e[12];const p=h;let g;return e[13]!==a||e[14]!==u||e[15]!==f||e[16]!==d||e[17]!==p||e[18]!==m?(g={autoCompleteYear:d0,dateValue:a,day:u,getMaxDayForMonth:c0,isValidCompleteDate:u0,month:f,setDateValue:d,setValue:p,year:m},e[13]=a,e[14]=u,e[15]=f,e[16]=d,e[17]=p,e[18]=m,e[19]=g):g=e[19],g},m0=t=>{const e=I.compilerRuntimeExports.c(70);let n,r,s,o,i,l,a,d,c,u,f,m,h,p,g;e[0]!==t?({children:n,className:r,defaultOpen:o,defaultValue:m,disabled:i,error:a,onChange:d,onOpenChange:c,open:u,pickOnly:h,readOnly:p,required:f,validationMessage:s,value:g,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p,e[15]=g):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14],g=e[15]);const x=m===void 0?"":m,v=h===void 0?!1:h,y=p===void 0?!1:p,w=He(),C=i??w?.disabled??!1,O=a??!!w?.error,S=f??w?.required??!1,E=y||v;let R;e[16]!==d?(R=ee=>d?.(ee??""),e[16]=d,e[17]=R):R=e[17];let N;e[18]!==x||e[19]!==R||e[20]!==g?(N={value:g,defaultValue:x,onChange:R},e[18]=x,e[19]=R,e[20]=g,e[21]=N):N=e[21];const{autoCompleteYear:j,day:D,getMaxDayForMonth:P,isValidCompleteDate:M,month:L,setValue:_,year:T}=f0(N);let A;e[22]!==o||e[23]!==C||e[24]!==c||e[25]!==u?(A={closeOnEscape:!0,closeOnOutsideClick:!0,defaultOpen:o,disabled:C,onOpenChange:c,open:u},e[22]=o,e[23]=C,e[24]=c,e[25]=u,e[26]=A):A=e[26];const{close:V,containerRef:$,isClosing:F,isVisible:W,open:B,toggle:H}=I.usePopperState(A),[G,U]=k.useState(s??""),[Y,Q]=k.useState(!!s),X=w?.id;let K;e[27]!==O||e[28]!==C||e[29]!==S||e[30]!==Y||e[31]!==X||e[32]!==G?(K={disabled:C,error:O,id:X,required:S,setShowValidation:Q,setValidationMessage:U,showValidation:Y,validationMessage:G},e[27]=O,e[28]=C,e[29]=S,e[30]=Y,e[31]=X,e[32]=G,e[33]=K):K=e[33];let J;e[34]!==j||e[35]!==V||e[36]!==D||e[37]!==E||e[38]!==P||e[39]!==B||e[40]!==M||e[41]!==L||e[42]!==v||e[43]!==_||e[44]!==H||e[45]!==T?(J={autoCompleteYear:j,close:V,day:D,getMaxDayForMonth:P,isValidCompleteDate:M,month:L,open:B,pickOnly:v,readOnly:E,setValue:_,toggle:H,year:T},e[34]=j,e[35]=V,e[36]=D,e[37]=E,e[38]=P,e[39]=B,e[40]=M,e[41]=L,e[42]=v,e[43]=_,e[44]=H,e[45]=T,e[46]=J):J=e[46];let q;e[47]!==r?(q=z("w-fit",r),e[47]=r,e[48]=q):q=e[48];let ne;e[49]!==n||e[50]!==l?(ne=b.jsx(Nr,{...l,children:n}),e[49]=n,e[50]=l,e[51]=ne):ne=e[51];let Z;e[52]!==q||e[53]!==ne?(Z=b.jsx(Se.Anchor,{asChild:!0,children:b.jsx("div",{className:q,children:ne})}),e[52]=q,e[53]=ne,e[54]=Z):Z=e[54];let te;e[55]!==F||e[56]!==W?(te=W&&b.jsx(Bt,{children:b.jsx(Se.Content,{align:"center",className:"ox-date-input-animate","data-ox-state":F?"closing":"open",side:"bottom",sideOffset:8,children:b.jsx(l0,{})})}),e[55]=F,e[56]=W,e[57]=te):te=e[57];let le;e[58]!==Z||e[59]!==te?(le=b.jsxs(Se,{children:[Z,te]}),e[58]=Z,e[59]=te,e[60]=le):le=e[60];let ce;e[61]!==$||e[62]!==le?(ce=b.jsx("div",{ref:$,children:le}),e[61]=$,e[62]=le,e[63]=ce):ce=e[63];let fe;e[64]!==ce||e[65]!==J?(fe=b.jsx(Ia.Provider,{value:J,children:ce}),e[64]=ce,e[65]=J,e[66]=fe):fe=e[66];let he;return e[67]!==fe||e[68]!==K?(he=b.jsx(In.Provider,{value:K,children:fe}),e[67]=fe,e[68]=K,e[69]=he):he=e[69],he},Ft=t=>{const e=I.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({className:n,id:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=k.useId(),{disabled:i,error:l,id:a,required:d,setShowValidation:c,setValidationMessage:u}=cn();let f;e[4]!==c||e[5]!==u?(f=v=>{v.preventDefault(),u(v.currentTarget.validationMessage),c(!0)},e[4]=c,e[5]=u,e[6]=f):f=e[6];const m=f,h=s??a??o;let p;e[7]!==n?(p=z("w-full min-w-10 appearance-none bg-transparent outline-none","placeholder:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50",n),e[7]=n,e[8]=p):p=e[8];let g;e[9]!==c?(g=()=>c(!1),e[9]=c,e[10]=g):g=e[10];let x;return e[11]!==i||e[12]!==r||e[13]!==l||e[14]!==m||e[15]!==h||e[16]!==d||e[17]!==p||e[18]!==g?(x=b.jsx("input",{id:h,"aria-invalid":l,"aria-required":d,className:p,disabled:i,required:d,onInput:g,onInvalid:m,...r,"data-ox-slot":"input"}),e[11]=i,e[12]=r,e[13]=l,e[14]=m,e[15]=h,e[16]=d,e[17]=p,e[18]=g,e[19]=x):x=e[19],x},Xr=it(["text-center","[appearance:textfield]","[&::-webkit-inner-spin-button]:appearance-none","[&::-webkit-outer-spin-button]:appearance-none"],{variants:{type:{day:"w-6 min-w-6",month:"w-6 min-w-6",year:"w-10 min-w-10"},pickOnly:{true:"enabled:cursor-pointer",false:""}}}),ai=it("text-muted-foreground",{variants:{disabled:{true:"opacity-50",false:""}}}),p0=()=>{const t=I.compilerRuntimeExports.c(92),{disabled:e,setValidationMessage:n}=cn(),{autoCompleteYear:r,day:s,getMaxDayForMonth:o,isValidCompleteDate:i,month:l,open:a,pickOnly:d,readOnly:c,setValue:u,toggle:f,year:m}=Gs(),h=k.useRef(null),p=k.useRef(null),g=k.useRef(null);let x;t[0]!==s||t[1]!==o||t[2]!==l||t[3]!==u||t[4]!==m?(x=ee=>{const ie=o(l,m);let oe;s?oe=Number.parseInt(s,10):ee===1?oe=0:oe=ie+1;let me;ee===1?me=oe>=ie?1:oe+1:me=oe<=1?ie:oe-1,u({day:String(me)})},t[0]=s,t[1]=o,t[2]=l,t[3]=u,t[4]=m,t[5]=x):x=t[5];const v=x;let y;t[6]!==s||t[7]!==o||t[8]!==l||t[9]!==u||t[10]!==m?(y=ee=>{let ie;l?ie=Number.parseInt(l,10):ee===1?ie=0:ie=13;let oe;ee===1?oe=ie>=12?1:ie+1:oe=ie<=1?12:ie-1;const me=o(String(oe),m);(s?Number.parseInt(s,10):0)>me?u({day:String(me),month:String(oe)}):u({month:String(oe)})},t[6]=s,t[7]=o,t[8]=l,t[9]=u,t[10]=m,t[11]=y):y=t[11];const w=y;let C;t[12]!==o||t[13]!==l||t[14]!==u||t[15]!==m?(C=ee=>{const ie=ee.target.value,oe=o(l,m);(ie===""||/^\d{1,2}$/.test(ie)&&Number.parseInt(ie,10)<=oe)&&u({day:ie})},t[12]=o,t[13]=l,t[14]=u,t[15]=m,t[16]=C):C=t[16];const O=C;let S;t[17]!==u?(S=ee=>{const ie=ee.target.value;(ie===""||/^\d{1,2}$/.test(ie)&&Number.parseInt(ie,10)<=12)&&u({month:ie})},t[17]=u,t[18]=S):S=t[18];const E=S;let R;t[19]!==u?(R=ee=>{const ie=ee.target.value;(ie===""||/^\d{1,4}$/.test(ie)&&Number.parseInt(ie,10)<=2100)&&u({year:ie})},t[19]=u,t[20]=R):R=t[20];const N=R;let j;t[21]!==v?(j=ee=>{ee.key==="ArrowUp"?(ee.preventDefault(),v(1)):ee.key==="ArrowDown"?(ee.preventDefault(),v(-1)):(ee.key==="Tab"&&!ee.shiftKey||ee.key==="Enter"||ee.key==="-")&&(ee.preventDefault(),p.current?.focus())},t[21]=v,t[22]=j):j=t[22];const D=j;let P;t[23]!==w||t[24]!==l?(P=ee=>{ee.key==="ArrowUp"?(ee.preventDefault(),w(1)):ee.key==="ArrowDown"?(ee.preventDefault(),w(-1)):ee.key==="Tab"&&ee.shiftKey?(ee.preventDefault(),h.current?.focus()):ee.key==="Tab"&&!ee.shiftKey||ee.key==="Enter"||ee.key==="-"?(ee.preventDefault(),g.current?.focus()):ee.key==="Backspace"&&l===""&&h.current?.focus()},t[23]=w,t[24]=l,t[25]=P):P=t[25];const M=P;let L;t[26]!==m?(L=ee=>{ee.key==="Tab"&&ee.shiftKey?(ee.preventDefault(),p.current?.focus()):ee.key==="Backspace"&&m===""&&p.current?.focus()},t[26]=m,t[27]=L):L=t[27];const _=L;let T;t[28]!==s||t[29]!==i||t[30]!==l||t[31]!==n||t[32]!==m?(T=()=>{s&&l&&m?i(s,l,m)?n(""):n("Invalid date"):n("")},t[28]=s,t[29]=i,t[30]=l,t[31]=n,t[32]=m,t[33]=T):T=t[33];const A=T;let V;t[34]!==A?(V=()=>{A()},t[34]=A,t[35]=V):V=t[35];const $=V;let F;t[36]!==A?(F=()=>{A()},t[36]=A,t[37]=F):F=t[37];const W=F;let B;t[38]!==r||t[39]!==u||t[40]!==A||t[41]!==m?(B=()=>{if(m.length===2){const ee=r(m);u({year:ee})}A()},t[38]=r,t[39]=u,t[40]=A,t[41]=m,t[42]=B):B=t[42];const H=B;let G;t[43]!==a||t[44]!==d||t[45]!==f?(G=()=>{d&&!a&&f()},t[43]=a,t[44]=d,t[45]=f,t[46]=G):G=t[46];const U=G,Y=d&&!e;let Q;t[47]!==Y?(Q=z("flex items-center gap-1 bg-transparent font-mono",{"cursor-pointer":Y}),t[47]=Y,t[48]=Q):Q=t[48];let X;t[49]!==d?(X=Xr({type:"day",pickOnly:d}),t[49]=d,t[50]=X):X=t[50];let K;t[51]!==s||t[52]!==$||t[53]!==O||t[54]!==D||t[55]!==c||t[56]!==X?(K=b.jsx(Ft,{"aria-label":"Day",autoComplete:"off",className:X,inputMode:"numeric",max:"31",min:"0",pattern:"[0-9]*",placeholder:"dd",readOnly:c,ref:h,type:"number",value:s,onBlur:$,onChange:O,onKeyDown:D}),t[51]=s,t[52]=$,t[53]=O,t[54]=D,t[55]=c,t[56]=X,t[57]=K):K=t[57];let J;t[58]!==e?(J=ai({disabled:e}),t[58]=e,t[59]=J):J=t[59];let q;t[60]!==J?(q=b.jsx("span",{className:J,children:"-"}),t[60]=J,t[61]=q):q=t[61];let ne;t[62]!==d?(ne=Xr({type:"month",pickOnly:d}),t[62]=d,t[63]=ne):ne=t[63];let Z;t[64]!==W||t[65]!==E||t[66]!==M||t[67]!==l||t[68]!==c||t[69]!==ne?(Z=b.jsx(Ft,{"aria-label":"Month",autoComplete:"off",className:ne,inputMode:"numeric",max:"12",min:"0",pattern:"[0-9]*",placeholder:"mm",readOnly:c,ref:p,type:"number",value:l,onBlur:W,onChange:E,onKeyDown:M}),t[64]=W,t[65]=E,t[66]=M,t[67]=l,t[68]=c,t[69]=ne,t[70]=Z):Z=t[70];let te;t[71]!==e?(te=ai({disabled:e}),t[71]=e,t[72]=te):te=t[72];let le;t[73]!==te?(le=b.jsx("span",{className:te,children:"-"}),t[73]=te,t[74]=le):le=t[74];let ce;t[75]!==d?(ce=Xr({type:"year",pickOnly:d}),t[75]=d,t[76]=ce):ce=t[76];let fe;t[77]!==H||t[78]!==N||t[79]!==_||t[80]!==c||t[81]!==ce||t[82]!==m?(fe=b.jsx(Ft,{"aria-label":"Year",autoComplete:"off",className:ce,inputMode:"numeric",max:"2100",min:"0",pattern:"[0-9]*",placeholder:"yyyy",readOnly:c,ref:g,type:"number",value:m,onBlur:H,onChange:N,onKeyDown:_}),t[77]=H,t[78]=N,t[79]=_,t[80]=c,t[81]=ce,t[82]=m,t[83]=fe):fe=t[83];let he;return t[84]!==U||t[85]!==Q||t[86]!==K||t[87]!==q||t[88]!==Z||t[89]!==le||t[90]!==fe?(he=b.jsxs("div",{className:Q,"data-ox-slot":"input-date",onClick:U,children:[K,q,Z,le,fe]}),t[84]=U,t[85]=Q,t[86]=K,t[87]=q,t[88]=Z,t[89]=le,t[90]=fe,t[91]=he):he=t[91],he},h0=t=>{const e=I.compilerRuntimeExports.c(6);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];const{toggle:r}=Gs();let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=b.jsx(ue,{icon:ae.Calendar}),e[2]=s):s=e[2];let o;return e[3]!==n||e[4]!==r?(o=b.jsx(St,{onClick:r,...n,children:s}),e[3]=n,e[4]=r,e[5]=o):o=e[5],o},g0=Object.assign(p0,{Button:i0,Container:m0,PickerButton:h0}),x0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},_a=k.createContext(null),b0=t=>{const e=I.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a,d,c,u,f,m,h,p,g,x;e[0]!==t?({children:n,defaultValue:s,disabled:o,error:l,locale:h,max:a,maximumFractionDigits:d,min:c,minimumFractionDigits:u,onChange:f,required:m,steps:p,useGrouping:g,validationMessage:r,value:x,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p,e[15]=g,e[16]=x):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14],g=e[15],x=e[16]);const v=h===void 0?"en-US":h,y=p===void 0?1:p,w=g===void 0?!0:g,C=He(),O=o??C?.disabled??!1,S=l??!!C?.error,E=m??C?.required??!1,R=k.useId(),N=new Intl.NumberFormat(v,{useGrouping:w!==!1,minimumFractionDigits:u,maximumFractionDigits:d});let j;e[17]!==f?(j=q=>f?.(q),e[17]=f,e[18]=j):j=e[18];let D;e[19]!==s||e[20]!==j||e[21]!==x?(D={value:x,onChange:j,defaultValue:s,name:"OxNumberInput"},e[19]=s,e[20]=j,e[21]=x,e[22]=D):D=e[22];const[P,M]=I.useControllableState(D),[L,_]=k.useState(P!==void 0?N.format(P):""),[T,A]=k.useState(r??""),[V,$]=k.useState(!!r),F=v0;let W;e[23]!==a||e[24]!==c?(W=q=>I.clamp(q,c??-1/0,a??1/0),e[23]=a,e[24]=c,e[25]=W):W=e[25];const B=W,H=q=>{let ne=F(L);ne===void 0&&(ne=P!==void 0?P:0);const Z=B(ne),te=B(Z+q);M(te),_(N.format(te))};let G;e[26]!==H||e[27]!==y?(G=()=>H(y),e[26]=H,e[27]=y,e[28]=G):G=e[28];const U=G;let Y;e[29]!==H||e[30]!==y?(Y=()=>H(-y),e[29]=H,e[30]=y,e[31]=Y):Y=e[31];const Q=Y,X=C?.id;let K;e[32]!==S||e[33]!==O||e[34]!==E||e[35]!==V||e[36]!==X||e[37]!==T?(K={disabled:O,error:S,id:X,required:E,setShowValidation:$,setValidationMessage:A,showValidation:V,validationMessage:T},e[32]=S,e[33]=O,e[34]=E,e[35]=V,e[36]=X,e[37]=T,e[38]=K):K=e[38];let J;return e[39]!==n||e[40]!==i?(J=b.jsx(Nr,{...i,children:n}),e[39]=n,e[40]=i,e[41]=J):J=e[41],b.jsx(In.Provider,{value:K,children:b.jsx(_a.Provider,{value:{clampValue:B,displayValue:L,formatter:N,handleDecrement:Q,handleIncrement:U,inputId:R,internalValue:P,max:a,min:c,parse:F,setDisplayValue:_,setInternalValue:M,steps:y},children:J})})};function v0(t){if(!t.trim())return;const e=t.replaceAll(/[^\d.-]/g,""),n=Number.parseFloat(e);return!Number.isNaN(n)&&Number.isFinite(n)?n:void 0}const Us=()=>{const t=k.useContext(_a);if(!t)throw new Error("useNumberContext must be used within a Number component");return t},y0=()=>{const t=I.compilerRuntimeExports.c(4),{handleDecrement:e,inputId:n}=Us();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=b.jsx(ue,{icon:ae.Minus}),t[0]=r):r=t[0];let s;return t[1]!==e||t[2]!==n?(s=b.jsx(St,{"aria-controls":n,"aria-label":"Decrease value",onClick:e,children:r}),t[1]=e,t[2]=n,t[3]=s):s=t[3],s},w0=()=>{const t=I.compilerRuntimeExports.c(4),{handleIncrement:e,inputId:n}=Us();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=b.jsx(ue,{icon:ae.Plus}),t[0]=r):r=t[0];let s;return t[1]!==e||t[2]!==n?(s=b.jsx(St,{"aria-controls":n,"aria-label":"Increase value",onClick:e,children:r}),t[1]=e,t[2]=n,t[3]=s):s=t[3],s},C0=t=>{const e=t.nativeEvent,n=t.target,r=n.value.slice(0,n.selectionStart??void 0)+(e.data??"")+n.value.slice(n.selectionEnd??void 0);!/^-?[\d.,]*$/.test(r)&&r!==""&&t.preventDefault()},O0=t=>{const e=I.compilerRuntimeExports.c(42);let n,r,s,o;e[0]!==t?({"aria-label":n,"aria-labelledby":r,className:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{clampValue:i,displayValue:l,formatter:a,handleDecrement:d,handleIncrement:c,inputId:u,internalValue:f,max:m,min:h,parse:p,setDisplayValue:g,setInternalValue:x}=Us(),[v,y]=k.useState(!1);let w;e[5]!==g?(w=L=>{g(L.target.value)},e[5]=g,e[6]=w):w=e[6];const C=w;let O;e[7]!==i||e[8]!==l||e[9]!==a||e[10]!==p||e[11]!==g||e[12]!==x?(O=()=>{const L=p(l);if(L!==void 0){const _=i(L);x(_),g(a.format(_))}else x(void 0),g("")},e[7]=i,e[8]=l,e[9]=a,e[10]=p,e[11]=g,e[12]=x,e[13]=O):O=e[13];const S=O;let E;e[14]!==a||e[15]!==p||e[16]!==g||e[17]!==x?(E=L=>{const _=L.clipboardData.getData("text"),T=p(_);T!==void 0&&(L.preventDefault(),g(a.format(T)),x(T))},e[14]=a,e[15]=p,e[16]=g,e[17]=x,e[18]=E):E=e[18];const R=E;let N;e[19]!==S||e[20]!==d||e[21]!==c||e[22]!==v?(N={onArrowDown:d,onArrowUp:c,onEnter:S,enabled:v,allowRepeat:!0},e[19]=S,e[20]=d,e[21]=c,e[22]=v,e[23]=N):N=e[23],I.useKeyboard(N);let j;e[24]!==s?(j=z("text-center font-mono",s),e[24]=s,e[25]=j):j=e[25];let D;e[26]!==S?(D=()=>{y(!1),S()},e[26]=S,e[27]=D):D=e[27];let P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=()=>y(!0),e[28]=P):P=e[28];let M;return e[29]!==n||e[30]!==r||e[31]!==l||e[32]!==o||e[33]!==C||e[34]!==R||e[35]!==u||e[36]!==f||e[37]!==m||e[38]!==h||e[39]!==j||e[40]!==D?(M=b.jsx(Ft,{id:u,"aria-label":n,"aria-labelledby":r,"aria-valuemax":m,"aria-valuemin":h,"aria-valuenow":f,autoComplete:"off",className:j,inputMode:"decimal",role:"spinbutton",type:"text",value:l,onBeforeInput:C0,onBlur:D,onChange:C,onFocus:P,onPaste:R,...o}),e[29]=n,e[30]=r,e[31]=l,e[32]=o,e[33]=C,e[34]=R,e[35]=u,e[36]=f,e[37]=m,e[38]=h,e[39]=j,e[40]=D,e[41]=M):M=e[41],M},E0=Object.assign(O0,{Button:x0,Container:b0,DecrementButton:y0,IncrementButton:w0}),S0=t=>{switch(t){case"numeric":return{inputMode:"numeric",pattern:"[0-9]*"};case"alphanumeric":return{inputMode:"text",pattern:"[A-Z0-9]*"};default:return{inputMode:"text"}}},k0=(t,e)=>{switch(e){case"numeric":return t.replaceAll(/[^0-9]/g,"");case"alphanumeric":return t.replaceAll(/[^A-Z0-9]/gi,"").toUpperCase();default:return t}},R0=t=>{const e=I.compilerRuntimeExports.c(23),{className:n,disabled:r,error:s,length:o,onComplete:i,onValueChange:l,placeholder:a,type:d}=t,c=r===void 0?!1:r,u=s===void 0?!1:s,f=o===void 0?6:o,m=a===void 0?"":a,h=d===void 0?"numeric":d,p=k.useId();let g;e[0]!==f?(g=()=>Array.from({length:f},N0),e[0]=f,e[1]=g):g=e[1];const[x,v]=k.useState(g);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[2]=y):y=e[2];const w=k.useRef(y);let C;e[3]!==h?(C=S0(h),e[3]=h,e[4]=C):C=e[4];const O=C;let S,E;e[5]!==f?(E=()=>{w.current=w.current.slice(0,f)},S=[f],e[5]=f,e[6]=S,e[7]=E):(S=e[6],E=e[7]),k.useEffect(E,S);let R;e[8]===Symbol.for("react.memo_cache_sentinel")?(R=D=>rt.flushSync(()=>{v(D)}),e[8]=R):R=e[8];const N=R;let j;if(e[9]!==p||e[10]!==n||e[11]!==x||e[12]!==c||e[13]!==u||e[14]!==f||e[15]!==i||e[16]!==l||e[17]!==m||e[18]!==h||e[19]!==O){const D=(_,T)=>{const A=k0(T,h),V=[...x];V[_]=A[0]||"";const $=V[_]&&_<f-1?_+1:void 0;N(V),$!==void 0&&w.current[$]?.focus();const F=V.filter(j0),W=F.join("");l?.(W),F.length===f&&i?.(W)},P=(_,T)=>{const A=[...x];if(T.key==="Backspace"){if(x[_]){A[_]="",N(A);const V=A.filter(D0);l?.(V.join(""))}else if(_>0){A[_-1]="",N(A),w.current[_-1]?.focus();const V=A.filter(P0);l?.(V.join(""))}}T.key==="ArrowLeft"&&_>0&&w.current[_-1]?.focus(),T.key==="ArrowRight"&&_<f-1&&w.current[_+1]?.focus()},M=_=>{w.current[_]?.select()};let L;e[21]!==n?(L=z("inline-flex gap-2 font-mono",n),e[21]=n,e[22]=L):L=e[22],j=b.jsx("div",{className:L,"data-ox-slot":"otp-input",children:Array.from({length:f},(_,T)=>{const A=T===0||x.slice(0,T).every(T0),V=c||!A;return b.jsx("input",{id:`${p}-digit-${T}`,"aria-disabled":V,"aria-invalid":u,"aria-label":`Digit ${T+1} of ${f}`,autoComplete:"one-time-code",className:z("size-9 rounded-md border border-input bg-transparent text-center shadow-xs transition-[color,box-shadow]","dark:bg-input/30","ox-focus-ring focus-visible:border-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40"),"data-ox-slot":"otp-digit",disabled:V,maxLength:1,placeholder:m,ref:$=>{w.current[T]=$},type:"text",value:x[T],onChange:$=>D(T,$.target.value),onFocus:()=>M(T),onKeyDown:$=>P(T,$),onPaste:M0,...O},T)})}),e[9]=p,e[10]=n,e[11]=x,e[12]=c,e[13]=u,e[14]=f,e[15]=i,e[16]=l,e[17]=m,e[18]=h,e[19]=O,e[20]=j}else j=e[20];return j};function N0(){return""}function j0(t){return t!==""}function D0(t){return t!==""}function P0(t){return t!==""}function T0(t){return t!==""}function M0(t){return t.preventDefault()}const I0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},$a=k.createContext(null),Ks=()=>{const t=k.useContext($a);if(!t)throw new Error("useTextContext must be used within a Text component");return t},A0=()=>{const t=I.compilerRuntimeExports.c(6),{handleClear:e,internalValue:n}=Ks(),r=!n;let s;t[0]!==r?(s=z({invisible:r}),t[0]=r,t[1]=s):s=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(ue,{icon:ae.X}),t[2]=o):o=t[2];let i;return t[3]!==e||t[4]!==s?(i=b.jsx(St,{"aria-label":"Clear input",className:s,onClick:e,children:o}),t[3]=e,t[4]=s,t[5]=i):i=t[5],i},_0=t=>{const e=I.compilerRuntimeExports.c(47);let n,r,s,o,i,l,a,d,c,u,f;e[0]!==t?({children:n,className:r,defaultValue:o,disabled:i,error:a,onChange:d,required:c,type:u,validationMessage:s,value:f,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11]);const m=u===void 0?"text":u,h=He(),p=i??h?.disabled??!1,g=a??!!h?.error,x=c??h?.required??!1,v=k.useRef(null);let y;e[12]!==d?(y=U=>{d?.(U??"")},e[12]=d,e[13]=y):y=e[13];let w;e[14]!==o||e[15]!==y||e[16]!==f?(w={defaultValue:o,name:"OxTextInput",onChange:y,value:f},e[14]=o,e[15]=y,e[16]=f,e[17]=w):w=e[17];const[C,O]=I.useControllableState(w),S=C??"";let E;e[18]!==O?(E=U=>O(U),e[18]=O,e[19]=E):E=e[19];const R=E,[N,j]=k.useState(m),[D,P]=k.useState(s??""),[M,L]=k.useState(!!s);let _;e[20]!==R?(_=()=>{R(""),v.current?.focus()},e[20]=R,e[21]=_):_=e[21];const T=_;let A;e[22]!==N?(A=()=>{N==="password"?j("text"):N==="text"&&j("password")},e[22]=N,e[23]=A):A=e[23];const V=A,$=h?.id;let F;e[24]!==g||e[25]!==p||e[26]!==x||e[27]!==M||e[28]!==$||e[29]!==D?(F={disabled:p,error:g,id:$,required:x,setShowValidation:L,setValidationMessage:P,showValidation:M,validationMessage:D},e[24]=g,e[25]=p,e[26]=x,e[27]=M,e[28]=$,e[29]=D,e[30]=F):F=e[30];let W;e[31]!==N||e[32]!==T||e[33]!==V||e[34]!==S||e[35]!==R?(W={handleClear:T,handleTypeToggle:V,inputRef:v,internalValue:S,setInternalValue:R,type:N},e[31]=N,e[32]=T,e[33]=V,e[34]=S,e[35]=R,e[36]=W):W=e[36];let B;e[37]!==n||e[38]!==r||e[39]!==l?(B=b.jsx(Nr,{className:r,...l,children:n}),e[37]=n,e[38]=r,e[39]=l,e[40]=B):B=e[40];let H;e[41]!==B||e[42]!==W?(H=b.jsx($a.Provider,{value:W,children:B}),e[41]=B,e[42]=W,e[43]=H):H=e[43];let G;return e[44]!==H||e[45]!==F?(G=b.jsx(In.Provider,{value:F,children:H}),e[44]=H,e[45]=F,e[46]=G):G=e[46],G},$0=t=>{const e=I.compilerRuntimeExports.c(14);let n,r,s,o,i;e[0]!==t?({className:n,currentLength:o,disabled:i,maxLength:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?0:o,a=i===void 0?!1:i;let d;e[6]!==n?(d=z("mt-1 text-right font-mono text-xs text-muted-foreground tabular-nums","aria-disabled:ox-default-disabled",n),e[6]=n,e[7]=d):d=e[7];let c;return e[8]!==l||e[9]!==a||e[10]!==r||e[11]!==s||e[12]!==d?(c=b.jsxs("div",{"aria-disabled":a,className:d,...r,"data-ox-slot":"input-counter",children:[l,"/",s]}),e[8]=l,e[9]=a,e[10]=r,e[11]=s,e[12]=d,e[13]=c):c=e[13],c},L0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx($0,{...t}),e[0]=t,e[1]=n):n=e[1],n},z0=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i,l,a;e[0]!==t?({autoComplete:n,className:r,id:o,maxLength:i,placeholder:l,spellCheck:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const d=a===void 0?!1:a,{disabled:c,error:u,required:f}=cn(),{inputRef:m,internalValue:h,setInternalValue:p,type:g}=Ks();let x;e[8]!==p?(x=w=>{p(w.target.value)},e[8]=p,e[9]=x):x=e[9];const v=x;let y;return e[10]!==n||e[11]!==r||e[12]!==c||e[13]!==s||e[14]!==u||e[15]!==v||e[16]!==o||e[17]!==m||e[18]!==h||e[19]!==i||e[20]!==l||e[21]!==f||e[22]!==d||e[23]!==g?(y=b.jsx(Ft,{id:o,"aria-invalid":u,"aria-required":f,autoComplete:n,className:r,disabled:c,maxLength:i,placeholder:l,ref:m,required:f,spellCheck:d,type:g,value:h,onChange:v,...s}),e[10]=n,e[11]=r,e[12]=c,e[13]=s,e[14]=u,e[15]=v,e[16]=o,e[17]=m,e[18]=h,e[19]=i,e[20]=l,e[21]=f,e[22]=d,e[23]=g,e[24]=y):y=e[24],y},F0=()=>{const t=I.compilerRuntimeExports.c(6),{handleTypeToggle:e,type:n}=Ks(),r=n==="text",s=r?"Hide password":"Show password",o=r?ae.EyeOff:ae.Eye;let i;t[0]!==o?(i=b.jsx(ue,{icon:o}),t[0]=o,t[1]=i):i=t[1];let l;return t[2]!==e||t[3]!==s||t[4]!==i?(l=b.jsx(St,{"aria-label":s,onClick:e,children:i}),t[2]=e,t[3]=s,t[4]=i,t[5]=l):l=t[5],l},V0=Object.assign(z0,{Button:I0,ClearButton:A0,Container:_0,Counter:L0,VisibilityButton:F0}),B0=t=>{const e=I.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},La=k.createContext(null),W0=t=>{if(!t)return{hours:"",minutes:""};const[e="",n=""]=t.split(":");return{hours:e,minutes:n}},ci=(t,e)=>{if(!t&&!e)return"";const n=t?t.padStart(2,"0"):"",r=e?e.padStart(2,"0"):"";return`${n}:${r}`},H0=t=>{const e=I.compilerRuntimeExports.c(21),{defaultValue:n,onChange:r,value:s}=t,o=n??"";let i;e[0]!==r?(i=v=>r?.(v??""),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==o||e[3]!==i||e[4]!==s?(l={defaultValue:o,name:"OxTimeInput",onChange:i,value:s},e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5];const[a,d]=I.useControllableState(l);let c;e[6]!==a?(c=W0(a),e[6]=a,e[7]=c):c=e[7];const{hours:u,minutes:f}=c;let m;e[8]!==f||e[9]!==d?(m=v=>{const y=ci(v,f);d(y)},e[8]=f,e[9]=d,e[10]=m):m=e[10];const h=m;let p;e[11]!==u||e[12]!==d?(p=v=>{const y=ci(u,v);d(y)},e[11]=u,e[12]=d,e[13]=p):p=e[13];const g=p;let x;return e[14]!==u||e[15]!==f||e[16]!==h||e[17]!==g||e[18]!==d||e[19]!==a?(x={hours:u,minutes:f,setHours:h,setMinutes:g,timeValue:a,setTimeValue:d},e[14]=u,e[15]=f,e[16]=h,e[17]=g,e[18]=d,e[19]=a,e[20]=x):x=e[20],x},Y0=t=>{const e=I.compilerRuntimeExports.c(39);let n,r,s,o,i,l,a,d,c,u;e[0]!==t?({children:n,className:r,defaultValue:c,disabled:o,error:l,onChange:a,required:d,validationMessage:s,value:u,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10]);const f=c===void 0?"":c,m=He(),h=o??m?.disabled??!1,p=l??!!m?.error,g=d??m?.required??!1;let x;e[11]!==f||e[12]!==a||e[13]!==u?(x={value:u,defaultValue:f,onChange:a},e[11]=f,e[12]=a,e[13]=u,e[14]=x):x=e[14];const{hours:v,minutes:y,setHours:w,setMinutes:C}=H0(x),[O,S]=k.useState(s??""),[E,R]=k.useState(!!s),N=m?.id;let j;e[15]!==p||e[16]!==h||e[17]!==g||e[18]!==E||e[19]!==N||e[20]!==O?(j={disabled:h,error:p,id:N,required:g,setShowValidation:R,setValidationMessage:S,showValidation:E,validationMessage:O},e[15]=p,e[16]=h,e[17]=g,e[18]=E,e[19]=N,e[20]=O,e[21]=j):j=e[21];let D;e[22]!==v||e[23]!==y||e[24]!==w||e[25]!==C?(D={hours:v,minutes:y,setHours:w,setMinutes:C},e[22]=v,e[23]=y,e[24]=w,e[25]=C,e[26]=D):D=e[26];let P;e[27]!==r?(P=z("w-fit",r),e[27]=r,e[28]=P):P=e[28];let M;e[29]!==n||e[30]!==i||e[31]!==P?(M=b.jsx(Nr,{className:P,...i,children:n}),e[29]=n,e[30]=i,e[31]=P,e[32]=M):M=e[32];let L;e[33]!==D||e[34]!==M?(L=b.jsx(La.Provider,{value:D,children:M}),e[33]=D,e[34]=M,e[35]=L):L=e[35];let _;return e[36]!==j||e[37]!==L?(_=b.jsx(In.Provider,{value:j,children:L}),e[36]=j,e[37]=L,e[38]=_):_=e[38],_},q0=()=>{const t=k.useContext(La);if(!t)throw new Error("useTimeContext must be used within a TimeInput component");return t},di=["w-8 min-w-8 text-center","[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"],G0=()=>{const t=I.compilerRuntimeExports.c(24),{hours:e,minutes:n,setHours:r,setMinutes:s}=q0(),{disabled:o}=cn(),i=k.useRef(null),l=k.useRef(null);let a;t[0]!==r?(a=S=>{const E=S.target.value;(E===""||/^\d{1,2}$/.test(E)&&Number.parseInt(E,10)<=23)&&r(E)},t[0]=r,t[1]=a):a=t[1];const d=a;let c;t[2]!==s?(c=S=>{const E=S.target.value;(E===""||/^\d{1,2}$/.test(E)&&Number.parseInt(E,10)<=59)&&s(E)},t[2]=s,t[3]=c):c=t[3];const u=c;let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=S=>{(S.key==="Tab"||S.key==="Enter"||S.key===":")&&(S.preventDefault(),l.current?.focus())},t[4]=f):f=t[4];const m=f;let h;t[5]!==n?(h=S=>{S.key==="Backspace"&&n===""&&i.current?.focus()},t[5]=n,t[6]=h):h=t[6];const p=h;let g;t[7]===Symbol.for("react.memo_cache_sentinel")?(g=z(di),t[7]=g):g=t[7];let x;t[8]!==d||t[9]!==e?(x=b.jsx(Ft,{autoComplete:"off",className:g,max:"23",min:"0",placeholder:"hh",ref:i,type:"number",value:e,onChange:d,onKeyDown:m}),t[8]=d,t[9]=e,t[10]=x):x=t[10];let v;t[11]!==o?(v=z("text-muted-foreground",{"opacity-50":o}),t[11]=o,t[12]=v):v=t[12];let y;t[13]!==v?(y=b.jsx("span",{className:v,children:":"}),t[13]=v,t[14]=y):y=t[14];let w;t[15]===Symbol.for("react.memo_cache_sentinel")?(w=z(di),t[15]=w):w=t[15];let C;t[16]!==u||t[17]!==p||t[18]!==n?(C=b.jsx(Ft,{autoComplete:"off",className:w,max:"59",min:"0",placeholder:"mm",ref:l,type:"number",value:n,onChange:u,onKeyDown:p}),t[16]=u,t[17]=p,t[18]=n,t[19]=C):C=t[19];let O;return t[20]!==x||t[21]!==y||t[22]!==C?(O=b.jsxs("div",{className:"flex items-center gap-1 bg-transparent font-mono","data-ox-slot":"input-time",children:[x,y,C]}),t[20]=x,t[21]=y,t[22]=C,t[23]=O):O=t[23],O},U0=Object.assign(G0,{Button:B0,Container:Y0}),za=k.createContext(void 0),K0=t=>{const e=I.compilerRuntimeExports.c(31);let n,r,s,o,i,l,a,d,c,u;e[0]!==t?({children:n,className:r,defaultValue:o,disabled:i,error:a,name:d,onChange:c,required:u,value:s,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10]);const f=He(),m=i??f?.disabled??!1,h=a??!!f?.error,p=u??f?.required??!1,[g,x]=k.useState(o),v=s!==void 0,y=v?s:g;let w;e[11]!==v||e[12]!==c?(w=j=>{v||x(j),c?.(j)},e[11]=v,e[12]=c,e[13]=w):w=e[13];const C=w;let O;e[14]!==y||e[15]!==C||e[16]!==m||e[17]!==d?(O={value:y,onChange:C,name:d,disabled:m},e[14]=y,e[15]=C,e[16]=m,e[17]=d,e[18]=O):O=e[18];const S=f?.labelId;let E;e[19]!==r?(E=z("space-y-2",r),e[19]=r,e[20]=E):E=e[20];let R;e[21]!==n||e[22]!==l||e[23]!==h||e[24]!==p||e[25]!==S||e[26]!==E?(R=b.jsx("div",{"aria-invalid":h,"aria-labelledby":S,"aria-required":p,className:E,"data-ox-slot":"radio-group",role:"radiogroup",...l,children:n}),e[21]=n,e[22]=l,e[23]=h,e[24]=p,e[25]=S,e[26]=E,e[27]=R):R=e[27];let N;return e[28]!==O||e[29]!==R?(N=b.jsx(za.Provider,{value:O,children:R}),e[28]=O,e[29]=R,e[30]=N):N=e[30],N},X0=()=>{const t=k.useContext(za);if(!t)throw new Error("OxRadio must be used within OxRadioGroup");return t},Q0=t=>{const e=I.compilerRuntimeExports.c(32);let n,r,s,o,i,l,a,d;e[0]!==t?({className:n,disabled:o,error:a,id:l,name:i,onChange:s,value:d,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=a===void 0?!1:a,u=k.useId(),f=X0();if(!f)throw new Error("RadioGroupItem must be used within RadioGroup");const m=l||u,h=o??f.disabled??!1,p=i??f.name,g=f.value===d;let x;e[9]!==f||e[10]!==s||e[11]!==d?(x=N=>{s?.(N),d!==void 0&&f.onChange?.(d)},e[9]=f,e[10]=s,e[11]=d,e[12]=x):x=e[12];const v=x;let y;e[13]!==h||e[14]!==g?(y=()=>h?"disabled":g?"checked":"unchecked",e[13]=h,e[14]=g,e[15]=y):y=e[15];const w=y;let C;e[16]!==n||e[17]!==c?(C=z("peer aspect-square size-4 shrink-0 cursor-pointer appearance-none rounded-full border border-input text-primary shadow-xs","dark:bg-input/30","transition-[color,box-shadow] outline-none","ox-focus-ring","aria-disabled:ox-default-disabled",{"border-destructive":c},n),e[16]=n,e[17]=c,e[18]=C):C=e[18];const O=w();let S;e[19]!==h||e[20]!==r||e[21]!==v||e[22]!==m||e[23]!==g||e[24]!==p||e[25]!==C||e[26]!==O||e[27]!==d?(S=b.jsx("input",{id:m,"aria-checked":g,"aria-disabled":h,className:C,disabled:h,name:p,type:"radio",value:d,onChange:v,...r,checked:g,"data-ox-slot":"radio","data-ox-state":O}),e[19]=h,e[20]=r,e[21]=v,e[22]=m,e[23]=g,e[24]=p,e[25]=C,e[26]=O,e[27]=d,e[28]=S):S=e[28];let E;e[29]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx("div",{className:"pointer-events-none absolute inset-0 m-auto size-2 rounded-full bg-primary opacity-0 peer-checked:opacity-100"}),e[29]=E):E=e[29];let R;return e[30]!==S?(R=b.jsxs("div",{className:"relative inline-flex shrink-0",children:[S,E]}),e[30]=S,e[31]=R):R=e[31],R},J0={Group:K0,Item:Q0},Fa=k.createContext(void 0),Xs=()=>{const t=k.useContext(Fa);if(!t)throw new Error("Select components must be used within an OxSelect");return t},Va=t=>{const e=I.compilerRuntimeExports.c(38);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,{close:a,multiple:d,onSelect:c,selectedValue:u}=Xs();let f;e[6]!==n||e[7]!==a||e[8]!==d||e[9]!==c||e[10]!==i?(f=()=>{c({label:n,value:i}),d||a()},e[6]=n,e[7]=a,e[8]=d,e[9]=c,e[10]=i,e[11]=f):f=e[11];const m=f;let h;e[12]!==a||e[13]!==m?(h=E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),m()),E.key==="Escape"&&a()},e[12]=a,e[13]=m,e[14]=h):h=e[14];const p=h;let g,x,v,y;e[15]!==r||e[16]!==u||e[17]!==i?(g=u.includes(i),y="none",x=g,v=z("relative flex w-full items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-start text-popover-foreground","ox-focus-ring enabled:cursor-pointer enabled:hover:bg-neutral-accent enabled:hover:text-neutral-accent-foreground","disabled:ox-default-disabled","[&_svg]:pointer-events-none [&_svg]:shrink-0",{"bg-neutral-accent text-neutral-accent-foreground":g},r),e[15]=r,e[16]=u,e[17]=i,e[18]=g,e[19]=x,e[20]=v,e[21]=y):(g=e[18],x=e[19],v=e[20],y=e[21]);const w=l?-1:0;let C;e[22]!==l||e[23]!==g?(C=g&&!l?b.jsx(ue,{className:"absolute right-2 text-primary","data-ox-slot":"select-check-icon",icon:ae.Check}):null,e[22]=l,e[23]=g,e[24]=C):C=e[24];let O;e[25]!==n||e[26]!==l||e[27]!==s||e[28]!==m||e[29]!==p||e[30]!==x||e[31]!==v||e[32]!==w||e[33]!==C?(O=b.jsxs("button",{"aria-selected":x,className:v,disabled:l,role:"option",tabIndex:w,type:"button",onClick:m,onKeyDown:p,...s,"data-ox-slot":"select-item",children:[n,C]}),e[25]=n,e[26]=l,e[27]=s,e[28]=m,e[29]=p,e[30]=x,e[31]=v,e[32]=w,e[33]=C,e[34]=O):O=e[34];let S;return e[35]!==y||e[36]!==O?(S=b.jsx("li",{role:y,children:O}),e[35]=y,e[36]=O,e[37]=S):S=e[37],S},Z0=t=>{const e=[];return k.Children.forEach(t,n=>{(typeof n=="string"||typeof n=="number")&&e.push(n)}),e.length>0?e.join(""):t},e2=t=>{const e=new Map,n=r=>{if(!k.isValidElement(r))return;if(r.type===Va||ms(r,"select-item")){const{children:i,value:l}=r.props,a=Z0(i);e.set(l,a);return}const s=r.props,{children:o}=s;o&&k.Children.forEach(o,n)};for(const r of t)n(r);return e},Ba=t=>{const e=I.compilerRuntimeExports.c(19);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{buttonRef:o,isClosing:i,isVisible:l,multiple:a,selectId:d}=Xs(),c=k.useRef(null);let u,f;if(e[4]!==o||e[5]!==l?(u=()=>{if(l&&o.current&&c.current){const v=o.current.offsetWidth;c.current.style.width=`${v}px`}},f=[o,l],e[4]=o,e[5]=l,e[6]=u,e[7]=f):(u=e[6],f=e[7]),k.useLayoutEffect(u,f),!l)return null;const m=i?"closing":"open",h=`${d}-listbox`;let p;e[8]!==r?(p=z("flex max-h-72 flex-col gap-y-0.5 overflow-x-hidden overflow-y-auto",r),e[8]=r,e[9]=p):p=e[9];let g;e[10]!==n||e[11]!==s||e[12]!==a||e[13]!==h||e[14]!==p?(g=b.jsx("ul",{id:h,"aria-multiselectable":a,className:p,role:"listbox",...s,"data-ox-slot":"select-content",children:n}),e[10]=n,e[11]=s,e[12]=a,e[13]=h,e[14]=p,e[15]=g):g=e[15];let x;return e[16]!==m||e[17]!==g?(x=b.jsx(Bt,{children:b.jsx(Se.Content,{align:"start",className:"ox-select-animate rounded-lg border border-border bg-popover p-1 text-sm text-popover-foreground shadow-md [&_svg:not([class*='size-'])]:size-4","data-ox-state":m,ref:c,side:"bottom",sideOffset:8,children:g})}),e[16]=m,e[17]=g,e[18]=x):x=e[18],x},ui=t=>t==null?[]:Array.isArray(t)?t:[t],t2=t=>{const e=I.compilerRuntimeExports.c(71),{children:n,className:r,defaultOpen:s,defaultValue:o,disabled:i,error:l,id:a,isLoading:d,multiple:c,onChange:u,onOpenChange:f,open:m,required:h,value:p}=t,g=s===void 0?!1:s,x=o===void 0?null:o,v=d===void 0?!1:d,y=c===void 0?!1:c,w=He(),C=k.useId(),O=k.useRef(null),{checkOverflow:S,handleResize:E,overflowAmount:R}=I.useOverflowDetection(),N=i??w?.disabled??!1,j=l??!!w?.error,D=h??w?.required??!1,P=a??w?.id??C;let M;e[0]!==m||e[1]!==g||e[2]!==N||e[3]!==f?(M={closeOnEscape:!0,closeOnOutsideClick:!0,defaultOpen:g,disabled:N,onOpenChange:f,open:m},e[0]=m,e[1]=g,e[2]=N,e[3]=f,e[4]=M):M=e[4];const{close:L,containerRef:_,isClosing:T,isVisible:A,open:V,toggle:$}=I.usePopperState(M);let F;if(e[5]!==n){e:{const oe=k.Children.toArray(n).find(n2);if(!oe||!k.isValidElement(oe)){let Oe;e[7]===Symbol.for("react.memo_cache_sentinel")?(Oe=new Map,e[7]=Oe):Oe=e[7],F=Oe;break e}const me=k.Children.toArray(oe.props.children||[]);F=e2(me)}e[5]=n,e[6]=F}else F=e[6];const W=F;let B;e[8]!==x?(B=new Set(ui(x)),e[8]=x,e[9]=B):B=e[9];let H;e[10]!==y||e[11]!==u?(H=oe=>{if(!oe)return;let me;y?me=[...oe]:oe.size>0?me=[...oe][0]:me=null,u?.(me)},e[10]=y,e[11]=u,e[12]=H):H=e[12];let G;e[13]!==p?(G=p!==void 0?new Set(ui(p)):void 0,e[13]=p,e[14]=G):G=e[14];let U;e[15]!==B||e[16]!==H||e[17]!==G?(U={defaultValue:B,name:"OxSelect",onChange:H,value:G},e[15]=B,e[16]=H,e[17]=G,e[18]=U):U=e[18];const[Y,Q]=I.useControllableState(U);let X;e[19]!==W||e[20]!==Y?(X=[...Y??new Set].filter(oe=>oe===""?W.has(""):!0).map(oe=>({label:W.get(oe)??oe,value:oe})),e[19]=W,e[20]=Y,e[21]=X):X=e[21];const K=X;let J;e[22]!==S?(J=()=>{S()},e[22]=S,e[23]=J):J=e[23];let q;if(e[24]!==S||e[25]!==Y?(q=[Y,S],e[24]=S,e[25]=Y,e[26]=q):q=e[26],k.useLayoutEffect(J,q),v){let oe;e[27]!==r?(oe=z("flex w-full flex-col",r),e[27]=r,e[28]=oe):oe=e[28];const me=!j;let Oe;e[29]!==j||e[30]!==me?(Oe=z("h-9 w-full rounded-lg border",{"border-destructive":j,"border-input":me}),e[29]=j,e[30]=me,e[31]=Oe):Oe=e[31];let ke;e[32]!==Oe?(ke=b.jsx(_t,{className:Oe}),e[32]=Oe,e[33]=ke):ke=e[33];let Ye;return e[34]!==oe||e[35]!==ke?(Ye=b.jsx("div",{className:oe,children:ke}),e[34]=oe,e[35]=ke,e[36]=Ye):Ye=e[36],Ye}let ne;e[37]!==y||e[38]!==Q?(ne=oe=>{const{value:me}=oe;Q(Oe=>{const ke=new Set(Oe);return y?ke.has(me)?ke.delete(me):ke.add(me):(ke.clear(),ke.add(me)),ke})},e[37]=y,e[38]=Q,e[39]=ne):ne=e[39];const Z=ne;let te;e[40]!==Y?(te=Y??new Set,e[40]=Y,e[41]=te):te=e[41];let le;e[42]!==te?(le=[...te],e[42]=te,e[43]=le):le=e[43];let ce;e[44]!==L||e[45]!==E||e[46]!==j||e[47]!==P||e[48]!==T||e[49]!==N||e[50]!==D||e[51]!==A||e[52]!==y||e[53]!==Z||e[54]!==V||e[55]!==R||e[56]!==K||e[57]!==le||e[58]!==$?(ce={buttonRef:O,close:L,disabled:N,error:j,handleResize:E,isClosing:T,isVisible:A,multiple:y,onSelect:Z,open:V,overflowAmount:R,required:D,selectedOptions:K,selectedValue:le,selectId:P,toggle:$},e[44]=L,e[45]=E,e[46]=j,e[47]=P,e[48]=T,e[49]=N,e[50]=D,e[51]=A,e[52]=y,e[53]=Z,e[54]=V,e[55]=R,e[56]=K,e[57]=le,e[58]=$,e[59]=ce):ce=e[59];let fe;e[60]!==r?(fe=z('flex w-full flex-col text-sm [&_svg:not([class*="size-"])]:size-4',r),e[60]=r,e[61]=fe):fe=e[61];let he;e[62]!==n?(he=b.jsx(Se,{children:n}),e[62]=n,e[63]=he):he=e[63];let ee;e[64]!==_||e[65]!==fe||e[66]!==he?(ee=b.jsx("div",{className:fe,ref:_,children:he}),e[64]=_,e[65]=fe,e[66]=he,e[67]=ee):ee=e[67];let ie;return e[68]!==ce||e[69]!==ee?(ie=b.jsx(Fa.Provider,{value:ce,children:ee}),e[68]=ce,e[69]=ee,e[70]=ie):ie=e[70],ie};function n2(t){return k.isValidElement(t)&&(t.type===Ba||ms(t,"select-content"))}const r2=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,label:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);let i;e[5]!==r||e[6]!==o?(i=o?b.jsx("div",{className:z("px-2 py-1.5 text-xs font-semibold text-muted-foreground",r),children:o}):null,e[5]=r,e[6]=o,e[7]=i):i=e[7];let l;return e[8]!==n||e[9]!==s||e[10]!==i?(l=b.jsxs("div",{role:"group",...s,"data-ox-slot":"select-group",children:[i,n]}),e[8]=n,e[9]=s,e[10]=i,e[11]=l):l=e[11],l},s2=t=>{const e=I.compilerRuntimeExports.c(41);let n,r,s,o,i,l;e[0]!==t?({className:n,disabled:s,displayAsTag:o,placeholder:i,tagColor:l,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=o===void 0?!1:o,d=i===void 0?"Select an option":i,c=l===void 0?"purple":l,{buttonRef:u,disabled:f,error:m,handleResize:h,multiple:p,open:g,overflowAmount:x,required:v,selectId:y,selectedOptions:w,toggle:C}=Xs(),O=x>0,S=s??f,E=`${y}-listbox`;let R;e[7]!==d||e[8]!==w?(R=w.length>0?`Selected: ${w.map(o2).join(", ")}`:d,e[7]=d,e[8]=w,e[9]=R):R=e[9];let N;e[10]!==n?(N=z("flex h-9 w-full items-center gap-x-2 rounded-lg border border-input bg-transparent px-3 py-2 text-left text-sm enabled:cursor-pointer","dark:bg-input/30 dark:enabled:hover:bg-input/50","ox-focus-ring focus-visible:border-ring","disabled:cursor-not-allowed disabled:opacity-50","shadow-xs transition-[color,box-shadow]","[&>span:empty]:text-muted-foreground","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[10]=n,e[11]=N):N=e[11];const j=g?"open":"closed";let D;e[12]!==a||e[13]!==h||e[14]!==S||e[15]!==p||e[16]!==x||e[17]!==d||e[18]!==w||e[19]!==O||e[20]!==c?(D=w.length>0?b.jsxs("div",{className:z("flex min-w-0 flex-1 items-center overflow-hidden","**:data-[ox-slot=icon]:hidden",{"opacity-50":S&&a}),children:[b.jsx("div",{className:z("truncate",{"flex gap-1":a&&p}),ref:h,children:a&&p?w.map(_=>b.jsx(es,{color:c,"data-ox-state":"selected",children:_.label},String(_.value))):w.map((_,T,A)=>{const V=A.length-x,$=T===V-1;return b.jsxs("span",{"data-ox-state":"selected",children:[_.label,T<A.length-1&&!$&&", "]},String(_.value))})}),O&&p?b.jsxs(es,{className:"ml-1",color:c,children:["+",x]}):null]}):b.jsx("span",{className:"min-w-0 flex-1 truncate",children:d}),e[12]=a,e[13]=h,e[14]=S,e[15]=p,e[16]=x,e[17]=d,e[18]=w,e[19]=O,e[20]=c,e[21]=D):D=e[21];let P;e[22]!==g?(P=z("shrink-0 text-muted-foreground opacity-50 transition-transform duration-300 ease-in-out",{"rotate-180":g}),e[22]=g,e[23]=P):P=e[23];let M;e[24]!==P?(M=b.jsx(ue,{className:P,icon:ae.ChevronDown}),e[24]=P,e[25]=M):M=e[25];let L;return e[26]!==u||e[27]!==r||e[28]!==m||e[29]!==S||e[30]!==g||e[31]!==v||e[32]!==y||e[33]!==M||e[34]!==E||e[35]!==R||e[36]!==N||e[37]!==j||e[38]!==D||e[39]!==C?(L=b.jsx(Se.Anchor,{asChild:!0,children:b.jsxs("button",{id:y,"aria-controls":E,"aria-disabled":S,"aria-expanded":g,"aria-haspopup":"listbox","aria-invalid":m,"aria-label":R,"aria-required":v,className:N,disabled:S,ref:u,role:"combobox",type:"button",onClick:C,...r,"data-ox-slot":"select-trigger","data-ox-state":j,children:[D,M]})}),e[26]=u,e[27]=r,e[28]=m,e[29]=S,e[30]=g,e[31]=v,e[32]=y,e[33]=M,e[34]=E,e[35]=R,e[36]=N,e[37]=j,e[38]=D,e[39]=C,e[40]=L):L=e[40],L};function o2(t){return t.label}const i2=Object.assign(t2,{Content:Ba,Group:r2,Item:Va,Trigger:s2}),l2=t=>{const e=I.compilerRuntimeExports.c(28);let n,r,s,o,i,l,a,d;e[0]!==t?({checked:d,className:n,disabled:r,error:o,id:l,onChange:i,required:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8]);const c=d===void 0?!1:d,u=He(),f=k.useId(),m=r??u?.disabled??!1,h=o??!!u?.error,p=a??u?.required??!1,g=l??u?.id??f;let x;e[9]!==c||e[10]!==i?(x=()=>{i?.(!c)},e[9]=c,e[10]=i,e[11]=x):x=e[11];const v=x,y=c?"checked":"unchecked",w=h||void 0;let C;e[12]!==n?(C=z("peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs","transition-all outline-none","data-[state=checked]:bg-primary data-[state=unchecked]:bg-input","dark:data-[state=unchecked]:bg-input/80","ox-focus-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive",n),e[12]=n,e[13]=C):C=e[13];let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O=z("pointer-events-none block size-4 rounded-full ring-0 transition-transform","bg-background","dark:data-[state=unchecked]:bg-foreground","dark:data-[state=checked]:bg-primary-foreground","data-[state=checked]:translate-x-[calc(100%-2px)]","data-[state=unchecked]:translate-x-0"),e[14]=O):O=e[14];let S;e[15]!==y?(S=b.jsx("span",{className:O,"data-state":y}),e[15]=y,e[16]=S):S=e[16];let E;return e[17]!==c||e[18]!==y||e[19]!==s||e[20]!==v||e[21]!==g||e[22]!==m||e[23]!==p||e[24]!==w||e[25]!==C||e[26]!==S?(E=b.jsx("button",{id:g,"aria-checked":c,"aria-disabled":m,"aria-invalid":w,"aria-required":p,className:C,"data-ox-slot":"switch","data-state":y,disabled:m,role:"switch",type:"button",onClick:v,...s,children:S}),e[17]=c,e[18]=y,e[19]=s,e[20]=v,e[21]=g,e[22]=m,e[23]=p,e[24]=w,e[25]=C,e[26]=S,e[27]=E):E=e[27],E},a2=t=>{const e=I.compilerRuntimeExports.c(38);let n,r,s,o,i,l,a,d,c,u,f,m;e[0]!==t?({className:n,disabled:r,error:o,id:a,name:i,onChange:l,placeholder:c,required:d,rows:u,showMaxLength:f,value:m,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10],f=e[11],m=e[12]);const h=c===void 0?"Enter text...":c,p=u===void 0?3:u,g=f===void 0?!1:f,x=He(),v=k.useId(),[y,w]=k.useState(0),C=r??x?.disabled??!1,O=o??!!x?.error,S=d??x?.required??!1,R=`${a??x?.id??v}-textarea`,N=s.maxLength,j=m!==void 0;let D;j?D=typeof m=="string"?m.length:0:D=y;let P;e[13]!==j||e[14]!==l?(P=V=>{j||w(V.target.value.length),l?.(V)},e[13]=j,e[14]=l,e[15]=P):P=e[15];const M=P;let L;e[16]!==n?(L=z("flex field-sizing-content min-h-16 w-full","rounded-lg border border-input bg-transparent px-3 py-2 shadow-xs","text-base placeholder:text-muted-foreground sm:text-sm","transition-[color,box-shadow] outline-none","ox-focus-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[16]=n,e[17]=L):L=e[17];let _;e[18]!==s||e[19]!==M||e[20]!==O||e[21]!==C||e[22]!==S||e[23]!==i||e[24]!==h||e[25]!==p||e[26]!==L||e[27]!==R||e[28]!==m?(_=b.jsx("textarea",{id:R,"aria-invalid":O,"aria-required":S,className:L,"data-ox-slot":"textarea",disabled:C,name:i,placeholder:h,required:S,rows:p,value:m,onChange:M,...s}),e[18]=s,e[19]=M,e[20]=O,e[21]=C,e[22]=S,e[23]=i,e[24]=h,e[25]=p,e[26]=L,e[27]=R,e[28]=m,e[29]=_):_=e[29];let T;e[30]!==D||e[31]!==C||e[32]!==N||e[33]!==g?(T=g&&typeof N=="number"?b.jsxs("div",{className:z("mt-1 text-right font-mono text-xs text-muted-foreground tabular-nums",{"opacity-50":C}),"data-ox-slot":"input-counter",children:[D,"/",N]}):null,e[30]=D,e[31]=C,e[32]=N,e[33]=g,e[34]=T):T=e[34];let A;return e[35]!==_||e[36]!==T?(A=b.jsxs("div",{className:"flex w-full flex-col",children:[_,T]}),e[35]=_,e[36]=T,e[37]=A):A=e[37],A},c2=t=>{const e=I.compilerRuntimeExports.c(64);let n,r,s,o;e[0]!==t?({children:n,className:r,rowId:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=Ys(),{isHeader:l}=kb();let a;e[5]!==i?(a=i??{},e[5]=i,e[6]=a):a=e[6];const{draggable:d,registerRowId:c,unregisterRowId:u}=a;let f,m;e[7]!==d||e[8]!==c||e[9]!==o||e[10]!==u?(f=()=>{if(o&&d)return c?.(o),()=>u?.(o)},m=[o,d,c,u],e[7]=d,e[8]=c,e[9]=o,e[10]=u,e[11]=f,e[12]=m):(f=e[11],m=e[12]),k.useEffect(f,m);const h=!i?.draggable||!o||l,p=o??"";let g;e[13]!==h||e[14]!==p?(g={disabled:h,id:p},e[13]=h,e[14]=p,e[15]=g):g=e[15];const{attributes:x,isDragging:v,listeners:y,setNodeRef:w,transform:C,transition:O}=Vs(g);let S;e[16]!==C?(S=at.Transform.toString(C),e[16]=C,e[17]=S):S=e[17];let E;e[18]!==S||e[19]!==O?(E={transform:S,transition:O},e[18]=S,e[19]=O,e[20]=E):E=e[20];const R=E;let N;e[21]!==i||e[22]!==o?(N=()=>{o&&i?.selectable&&i.toggleSelection(o)},e[21]=i,e[22]=o,e[23]=N):N=e[23];const j=N;let D;e[24]!==i?(D=()=>{i?.toggleAll()},e[24]=i,e[25]=D):D=e[25];const P=D;let M,L,_;if(e[26]!==x||e[27]!==r||e[28]!==i||e[29]!==P||e[30]!==j||e[31]!==v||e[32]!==l||e[33]!==y||e[34]!==o){const W=o&&i?.isSelected(o),B=l?"th":"td";let H;e[38]!==B||e[39]!==x||e[40]!==i?.draggable||e[41]!==l||e[42]!==y||e[43]!==o?(H=()=>i?.draggable?l?b.jsx(B,{className:"h-10 w-12 px-3",children:b.jsx("span",{className:"sr-only",children:"Reorder"})}):o?b.jsx(B,{className:"px-3 py-2",children:b.jsx("button",{"aria-label":"Drag to reorder",className:"flex cursor-grab touch-none items-center justify-center",type:"button",...x,...y,children:b.jsx(ae.GripVertical,{className:"size-4 text-muted-foreground"})})}):b.jsx(B,{className:"px-3 py-2"}):null,e[38]=B,e[39]=x,e[40]=i?.draggable,e[41]=l,e[42]=y,e[43]=o,e[44]=H):H=e[44],M=H;let G;e[45]!==B||e[46]!==i||e[47]!==P||e[48]!==j||e[49]!==l||e[50]!==o?(G=()=>i?.selectable?l?b.jsx(B,{className:"h-10 w-12 px-3",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(ds,{"aria-label":"Select all rows",checked:i.isIndeterminate?"indeterminate":i.isAllSelected,onCheckedChange:P})})}):o?b.jsx(B,{className:"px-3 py-2",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(ds,{"aria-label":`Select row ${o}`,checked:i.isSelected(o),onCheckedChange:j})})}):b.jsx(B,{className:"px-3 py-2"}):null,e[45]=B,e[46]=i,e[47]=P,e[48]=j,e[49]=l,e[50]=o,e[51]=G):G=e[51],L=G,_=z("border-b transition-colors",{"hover:bg-muted/50":!l},{"bg-muted":i?.selectable&&W},{"opacity-50":v},r),e[26]=x,e[27]=r,e[28]=i,e[29]=P,e[30]=j,e[31]=v,e[32]=l,e[33]=y,e[34]=o,e[35]=M,e[36]=L,e[37]=_}else M=e[35],L=e[36],_=e[37];const T=l?void 0:w,A=l?void 0:R;let V;e[52]!==M?(V=M(),e[52]=M,e[53]=V):V=e[53];let $;e[54]!==L?($=L(),e[54]=L,e[55]=$):$=e[55];let F;return e[56]!==n||e[57]!==s||e[58]!==_||e[59]!==T||e[60]!==A||e[61]!==V||e[62]!==$?(F=b.jsxs("tr",{className:_,"data-ox-slot":"table-row",ref:T,style:A,...s,children:[V,$,n]}),e[56]=n,e[57]=s,e[58]=_,e[59]=T,e[60]=A,e[61]=V,e[62]=$,e[63]=F):F=e[63],F},d2=Object.assign(vb,{Body:wb,Cell:Cb,Controls:Ob,Footer:Eb,Head:Sb,Header:Rb,Row:c2,SkeletonRow:ja}),Wa=k.createContext(null),u2=t=>{const e=I.compilerRuntimeExports.c(24);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,defaultValue:s,onValueChange:i,value:a,variant:l,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const d=l===void 0?"pills":l,[c,u]=k.useState(s||""),f=a!==void 0,m=f?a:c;let h;e[8]!==f||e[9]!==i?(h=C=>{f||u(C),i?.(C)},e[8]=f,e[9]=i,e[10]=h):h=e[10];const p=h;let g;e[11]!==m||e[12]!==p||e[13]!==d?(g={value:m,variant:d,onValueChange:p},e[11]=m,e[12]=p,e[13]=d,e[14]=g):g=e[14];const x=g;let v;e[15]!==r?(v=z("w-full",r),e[15]=r,e[16]=v):v=e[16];let y;e[17]!==n||e[18]!==o||e[19]!==v?(y=b.jsx("div",{className:v,...o,"data-ox-slot":"tabs",children:n}),e[17]=n,e[18]=o,e[19]=v,e[20]=y):y=e[20];let w;return e[21]!==x||e[22]!==y?(w=b.jsx(Wa.Provider,{value:x,children:y}),e[21]=x,e[22]=y,e[23]=w):w=e[23],w},Qs=()=>{const t=k.useContext(Wa);if(!t)throw new Error("Tabs components must be used within OxTabs");return t},f2=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,value:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{value:i}=Qs();if(!(i===o))return null;const a=`tab-${o}`;let d;e[5]!==r?(d=z("pt-4",r),e[5]=r,e[6]=d):d=e[6];let c;return e[7]!==n||e[8]!==s||e[9]!==a||e[10]!==d?(c=b.jsx("div",{"aria-labelledby":a,className:d,role:"tabpanel",...s,"data-ox-slot":"tabs-content",children:n}),e[7]=n,e[8]=s,e[9]=a,e[10]=d,e[11]=c):c=e[11],c},m2=it("flex",{variants:{variant:{bordered:"border-b border-border",pills:"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]"}},defaultVariants:{variant:"pills"}}),p2=it(["inline-flex items-center justify-center gap-1.5 text-sm font-medium whitespace-nowrap","transition-[color,box-shadow]","ox-focus-ring cursor-pointer","disabled:pointer-events-none disabled:opacity-50",'[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4'],{variants:{variant:{bordered:["relative rounded-t-lg border-t border-r border-l border-transparent px-4 py-2","hover:bg-muted hover:text-foreground","data-[ox-state=active]:border-border data-[ox-state=active]:text-foreground","data-[ox-state=inactive]:text-muted-foreground"],pills:["h-[calc(100%-1px)] flex-1 rounded-md border border-transparent px-2 py-1","data-[ox-state=active]:bg-input/30 data-[ox-state=active]:border-input data-[ox-state=active]:text-foreground data-[ox-state=active]:shadow-sm","data-[ox-state=inactive]:text-muted-foreground"]}},defaultVariants:{variant:"pills"}}),h2=t=>{const e=I.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{variant:o}=Qs();let i;e[4]!==r||e[5]!==o?(i=z(m2({variant:o}),r),e[4]=r,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==n||e[8]!==s||e[9]!==i||e[10]!==o?(l=b.jsx("div",{className:i,role:"tablist",...s,"data-ox-slot":"tabs-list","data-ox-variant":o,children:n}),e[7]=n,e[8]=s,e[9]=i,e[10]=o,e[11]=l):l=e[11],l},g2=t=>{const e=I.compilerRuntimeExports.c(25);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,{onValueChange:a,value:d,variant:c}=Qs(),u=d===i;let f;e[6]!==l||e[7]!==a||e[8]!==i?(f=()=>{l||a(i)},e[6]=l,e[7]=a,e[8]=i,e[9]=f):f=e[9];const m=f;let h;e[10]!==m?(h=w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),m())},e[10]=m,e[11]=h):h=e[11];const p=h,g=l||void 0;let x;e[12]!==r||e[13]!==c?(x=z(p2({variant:c}),r),e[12]=r,e[13]=c,e[14]=x):x=e[14];const v=u?"active":"inactive";let y;return e[15]!==n||e[16]!==l||e[17]!==s||e[18]!==m||e[19]!==p||e[20]!==u||e[21]!==g||e[22]!==x||e[23]!==v?(y=b.jsx("button",{"aria-disabled":g,"aria-selected":u,className:x,disabled:l,role:"tab",type:"button",onClick:m,onKeyDown:p,...s,"data-ox-slot":"tabs-trigger","data-ox-state":v,children:n}),e[15]=n,e[16]=l,e[17]=s,e[18]=m,e[19]=p,e[20]=u,e[21]=g,e[22]=x,e[23]=v,e[24]=y):y=e[24],y},x2=Object.assign(u2,{Content:f2,List:h2,Trigger:g2}),b2=t=>{const e=I.compilerRuntimeExports.c(32);let n,r,s,o,i;e[0]!==t?({className:n,onThemeChange:o,size:i,theme:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?"md":i,{setTheme:a,theme:d}=I.useOxTheme(),c=r??d,u=c==="dark";let f;e[6]!==r||e[7]!==u||e[8]!==o||e[9]!==a?(f=()=>{const E=u?"light":"dark";r===void 0&&a(E),o?.(E)},e[6]=r,e[7]=u,e[8]=o,e[9]=a,e[10]=f):f=e[10];const m=f,h=u?"Switch to light mode":"Switch to dark mode";let p;e[11]!==n||e[12]!==l?(p=z(At({variant:"ghost",size:l,iconOnly:!0}),n),e[11]=n,e[12]=l,e[13]=p):p=e[13];const g=u?"opacity-0 blur-[2px]":"blur-0 opacity-100";let x;e[14]!==g?(x=z("transition-all duration-200",g),e[14]=g,e[15]=x):x=e[15];let v;e[16]!==x?(v=b.jsx(ue,{className:x,icon:ae.Sun}),e[16]=x,e[17]=v):v=e[17];const y=u?"blur-0 opacity-100":"opacity-0 blur-[2px]";let w;e[18]!==y?(w=z("absolute inset-0 transition-all duration-200",y),e[18]=y,e[19]=w):w=e[19];let C;e[20]!==w?(C=b.jsx(ue,{className:w,icon:ae.Moon}),e[20]=w,e[21]=C):C=e[21];let O;e[22]!==C||e[23]!==v?(O=b.jsxs("span",{className:"relative flex items-center justify-center",children:[v,C]}),e[22]=C,e[23]=v,e[24]=O):O=e[24];let S;return e[25]!==s||e[26]!==m||e[27]!==O||e[28]!==h||e[29]!==p||e[30]!==c?(S=b.jsx("button",{"aria-label":h,className:p,type:"button",onClick:m,...s,"data-ox-slot":"theme-switcher","data-theme":c,children:O}),e[25]=s,e[26]=m,e[27]=O,e[28]=h,e[29]=p,e[30]=c,e[31]=S):S=e[31],S},v2=t=>{const e=I.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=z("grid grid-cols-[1fr_auto_1fr] items-start gap-4 text-sm",'[&_svg:not([class*="size-"])]:size-5 [&>svg]:text-current',r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("ol",{"aria-label":"Timeline",className:o,"data-ox-slot":"timeline",role:"list",...s,children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},y2=t=>{const e=I.compilerRuntimeExports.c(45);let n,r,s,o,i,l,a,d,c,u;e[0]!==t?({align:a,children:n,className:r,color:d,description:s,icon:i,label:l,showSeparator:c,timestamp:u,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9],u=e[10]);const f=a===void 0?"left":a,m=d===void 0?"purple":d,h=c===void 0?!1:c,p=n||s;let g;e[11]!==r?(g=z("col-span-3 grid grid-cols-subgrid",r),e[11]=r,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==m||e[15]!==p||e[16]!==l||e[17]!==u?(x=f==="left"&&b.jsxs("div",{className:"space-y-1 text-right",children:[b.jsx("h6",{className:z("text-sm leading-tight font-medium",We[m].text),children:l}),p&&b.jsx(Zt,{children:p}),u&&b.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),e[13]=f,e[14]=m,e[15]=p,e[16]=l,e[17]=u,e[18]=x):x=e[18];let v;e[19]!==x?(v=b.jsx("div",{children:x}),e[19]=x,e[20]=v):v=e[20];const y=i||ae.Circle;let w;e[21]!==y?(w=b.jsx(ue,{icon:y}),e[21]=y,e[22]=w):w=e[22];let C;e[23]!==m||e[24]!==w?(C=b.jsx(ue.Box,{color:m,size:"lg",children:w}),e[23]=m,e[24]=w,e[25]=C):C=e[25];let O;e[26]!==h?(O=h?b.jsx(Ws,{className:"mx-auto",orientation:"vertical"}):null,e[26]=h,e[27]=O):O=e[27];let S;e[28]!==O||e[29]!==C?(S=b.jsxs("div",{className:"grid shrink-0 grid-rows-[auto_1fr] gap-4",children:[C,O]}),e[28]=O,e[29]=C,e[30]=S):S=e[30];let E;e[31]!==f||e[32]!==m||e[33]!==p||e[34]!==l||e[35]!==u?(E=f==="right"&&b.jsxs("div",{className:"space-y-1 text-left",children:[b.jsx("h6",{className:z("text-sm leading-tight font-medium",We[m].text),children:l}),p&&b.jsx(Zt,{children:p}),u&&b.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),e[31]=f,e[32]=m,e[33]=p,e[34]=l,e[35]=u,e[36]=E):E=e[36];let R;e[37]!==E?(R=b.jsx("div",{children:E}),e[37]=E,e[38]=R):R=e[38];let N;return e[39]!==o||e[40]!==S||e[41]!==R||e[42]!==g||e[43]!==v?(N=b.jsxs("li",{className:g,"data-ox-slot":"timeline-item",role:"listitem",...o,children:[v,S,R]}),e[39]=o,e[40]=S,e[41]=R,e[42]=g,e[43]=v,e[44]=N):N=e[44],N},w2=Object.assign(v2,{Item:y2}),Ha=k.createContext(null),C2=t=>{const e=I.compilerRuntimeExports.c(15),{align:n,children:r,maxToasts:s,position:o}=t,i=n===void 0?"right":n,l=s===void 0?3:s,a=o===void 0?"top":o;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];const[c,u]=k.useState(d);let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=O=>{u(S=>S.map(E=>E.id===O?{...E,isRemoving:!0}:E)),setTimeout(()=>{u(S=>I.reject(S,E=>E.id===O))},200)},e[1]=f):f=e[1];const m=f;let h;e[2]!==l?(h=(O,S,E,R)=>{const N=I.uniqueId(),j=E?.duration??5e3,D={id:N,title:O,type:S,duration:j,description:E?.description,icon:E?.icon,color:E?.color,customContent:R};return u(P=>I.take([D,...P],l)),j>0&&setTimeout(()=>{m(N)},j),N},e[2]=l,e[3]=h):h=e[3];const p=h;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=O=>{O?m(O):u([])},e[4]=g):g=e[4];const x=g;let v;e[5]!==p?(v=Object.assign((O,S)=>p(O,"default",S),{success:(O,S)=>p(O,"success",S),destructive:(O,S)=>p(O,"destructive",S),warning:(O,S)=>p(O,"warning",S),info:(O,S)=>p(O,"info",S),custom:(O,S)=>p("","default",{duration:S?.duration},O),dismiss:x}),e[5]=p,e[6]=v):v=e[6];const y=v;let w;e[7]!==i||e[8]!==a||e[9]!==c?(w=b.jsx(Ya,{align:i,position:a,toasts:c,onRemove:m}),e[7]=i,e[8]=a,e[9]=c,e[10]=w):w=e[10];let C;return e[11]!==r||e[12]!==w||e[13]!==y?(C=b.jsxs(Ha.Provider,{value:y,children:[r,w]}),e[11]=r,e[12]=w,e[13]=y,e[14]=C):C=e[14],C},O2=()=>{const t=k.useContext(Ha);if(!t)throw new Error("useOxToast must be used within a ToastProvider");return t},E2=t=>{const e=I.compilerRuntimeExports.c(48),{index:n,onRemove:r,position:s,toast:o}=t,i=o.icon??st[o.type].icon,[l,a]=k.useState(!0);let d,c;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{const D=setTimeout(()=>a(!1),50);return()=>clearTimeout(D)},c=[],e[0]=d,e[1]=c):(d=e[0],c=e[1]),k.useEffect(d,c);const u=n*8,f=1-n*.05;let m;e[2]!==n||e[3]!==l||e[4]!==s||e[5]!==f||e[6]!==u||e[7]!==o.isRemoving?(m=()=>{const P=l?s==="top"?-16:16:0,M=o.isRemoving||l?0:1;return s==="top"?{top:`${u+P}px`,transform:`scale(${f})`,zIndex:30-n,opacity:M}:{top:`${-u+P}px`,transform:`scale(${f})`,zIndex:30-n,opacity:M}},e[2]=n,e[3]=l,e[4]=s,e[5]=f,e[6]=u,e[7]=o.isRemoving,e[8]=m):m=e[8];const h=m;if(o.customContent){let D;e[9]!==h?(D=h(),e[9]=h,e[10]=D):D=e[10];let P;e[11]!==r||e[12]!==o.id?(P=()=>r(o.id),e[11]=r,e[12]=o.id,e[13]=P):P=e[13];let M;return e[14]!==D||e[15]!==P||e[16]!==o.customContent?(M=b.jsx("div",{className:"pointer-events-auto absolute w-full cursor-pointer rounded-lg border border-border bg-card transition-all duration-300 ease-out md:w-[320px]","data-ox-slot":"toast-item",role:"status",style:D,onClick:P,children:o.customContent}),e[14]=D,e[15]=P,e[16]=o.customContent,e[17]=M):M=e[17],M}const p=o.description?`${o.id}-desc`:void 0;let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=z("pointer-events-auto absolute","flex w-full items-center gap-3 md:w-[320px]",'[&_svg:not([class*="size-"])]:size-5 [&>svg]:text-current',"cursor-pointer","rounded-lg border border-border bg-card p-4","transition-all duration-300 ease-out"),e[18]=g):g=e[18];const x=o.type==="destructive"||o.type==="warning"?"alert":"status";let v;e[19]!==h?(v=h(),e[19]=h,e[20]=v):v=e[20];let y;e[21]!==r||e[22]!==o.id?(y=()=>r(o.id),e[21]=r,e[22]=o.id,e[23]=y):y=e[23];let w;e[24]!==o.type?(w=b.jsxs("span",{className:"sr-only",children:[o.type," notification:"]}),e[24]=o.type,e[25]=w):w=e[25];const C=o.color??o.type;let O;e[26]!==i||e[27]!==o.path?(O=b.jsx(ue,{icon:i,path:o.path}),e[26]=i,e[27]=o.path,e[28]=O):O=e[28];let S;e[29]!==C||e[30]!==O?(S=b.jsx(ue.Box,{color:C,size:"md",children:O}),e[29]=C,e[30]=O,e[31]=S):S=e[31];let E;e[32]!==o.title?(E=b.jsx("div",{className:"text-xs font-medium text-foreground",children:o.title}),e[32]=o.title,e[33]=E):E=e[33];let R;e[34]!==o.description||e[35]!==o.id?(R=o.description?b.jsx("p",{id:`${o.id}-desc`,className:"mt-1 text-xs",children:o.description}):null,e[34]=o.description,e[35]=o.id,e[36]=R):R=e[36];let N;e[37]!==E||e[38]!==R?(N=b.jsxs("div",{className:"flex-1",children:[E,R]}),e[37]=E,e[38]=R,e[39]=N):N=e[39];let j;return e[40]!==S||e[41]!==N||e[42]!==p||e[43]!==x||e[44]!==v||e[45]!==y||e[46]!==w?(j=b.jsxs("div",{"aria-describedby":p,className:g,"data-ox-slot":"toast-item",role:x,style:v,onClick:y,children:[w,S,N]}),e[40]=S,e[41]=N,e[42]=p,e[43]=x,e[44]=v,e[45]=y,e[46]=w,e[47]=j):j=e[47],j},S2={left:"left-1/2 -translate-x-1/2 md:translate-none md:left-4",center:"left-1/2 -translate-x-1/2",right:"left-1/2 -translate-x-1/2 md:translate-none md:left-auto md:right-4"},k2={top:"top-4",bottom:"bottom-24"},Ya=t=>{const e=I.compilerRuntimeExports.c(13),{align:n,onRemove:r,position:s,toasts:o}=t,i=S2[n],l=k2[s];let a;e[0]!==i||e[1]!==l?(a=z("pointer-events-none fixed z-50 w-11/12 md:w-[320px]",i,l),e[0]=i,e[1]=l,e[2]=a):a=e[2];let d;if(e[3]!==r||e[4]!==s||e[5]!==o){let u;e[7]!==r||e[8]!==s?(u=(f,m)=>b.jsx(E2,{index:m,position:s,toast:f,onRemove:r},f.id),e[7]=r,e[8]=s,e[9]=u):u=e[9],d=o.map(u),e[3]=r,e[4]=s,e[5]=o,e[6]=d}else d=e[6];let c;return e[10]!==a||e[11]!==d?(c=rt.createPortal(b.jsx("div",{"aria-atomic":"false","aria-label":"Notifications","aria-live":"polite",className:a,"data-ox-slot":"toast-container",role:"region",children:d}),document.body),e[10]=a,e[11]=d,e[12]=c):c=e[12],c},qa=k.createContext(null),R2=()=>k.useContext(qa),N2=t=>{const e=I.compilerRuntimeExports.c(48);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,disabled:s,id:a,onPressedChange:i,pressed:l,size:d,value:c,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=k.useId(),f=R2(),m=a||u,h=f!==null,p=s||f?.disabled||!1,g=d||f?.size||"md";let x,v,y,w,C;if(e[10]!==p||e[11]!==g||e[12]!==n||e[13]!==r||e[14]!==f||e[15]!==m||e[16]!==h||e[17]!==i||e[18]!==l||e[19]!==c){const S=Fi(n);let E;if(e[25]!==p||e[26]!==f||e[27]!==h||e[28]!==i||e[29]!==l||e[30]!==c){if(h&&c!==void 0){if(f.type==="single")E=f.value===c;else{let N;e[33]!==f.value?(N=f.value||[],e[33]=f.value,e[34]=N):N=e[34],E=N.includes(c)}let R;e[35]!==p||e[36]!==f||e[37]!==c?(R=()=>{!p&&f.onToggle&&f.onToggle(c)},e[35]=p,e[36]=f,e[37]=c,e[38]=R):R=e[38],x=R}else E=l||!1,x=()=>{!p&&i&&i(!E)};e[25]=p,e[26]=f,e[27]=h,e[28]=i,e[29]=l,e[30]=c,e[31]=x,e[32]=E}else x=e[31],E=e[32];v=m,y=p||void 0,w=E,C=z(At({size:g,variant:E?"default":"ghost",iconOnly:S}),r),e[10]=p,e[11]=g,e[12]=n,e[13]=r,e[14]=f,e[15]=m,e[16]=h,e[17]=i,e[18]=l,e[19]=c,e[20]=x,e[21]=v,e[22]=y,e[23]=w,e[24]=C}else x=e[20],v=e[21],y=e[22],w=e[23],C=e[24];let O;return e[39]!==p||e[40]!==n||e[41]!==o||e[42]!==x||e[43]!==v||e[44]!==y||e[45]!==w||e[46]!==C?(O=b.jsx("button",{id:v,"aria-disabled":y,"aria-pressed":w,className:C,disabled:p,role:"button",type:"button",onClick:x,...o,"data-ox-slot":"toggle",children:n}),e[39]=p,e[40]=n,e[41]=o,e[42]=x,e[43]=v,e[44]=y,e[45]=w,e[46]=C,e[47]=O):O=e[47],O},j2=t=>{const e=I.compilerRuntimeExports.c(30);let n,r,s,o,i,l,a,d,c;e[0]!==t?({children:n,className:r,disabled:l,name:o,onValueChange:i,size:a,type:d,value:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=d,e[9]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],d=e[8],c=e[9]);const u=l===void 0?!1:l,f=a===void 0?"md":a,m=d===void 0?"single":d;let h;e[10]!==i||e[11]!==m||e[12]!==c?(h=w=>{if(i)if(m==="single")i(c===w?"":w);else{const C=c||[],O=C.includes(w)?C.filter(S=>S!==w):[...C,w];i(O)}},e[10]=i,e[11]=m,e[12]=c,e[13]=h):h=e[13];const p=h;let g;e[14]!==u||e[15]!==p||e[16]!==o||e[17]!==f||e[18]!==m||e[19]!==c?(g={value:c,onToggle:p,size:f,name:o,disabled:u,type:m},e[14]=u,e[15]=p,e[16]=o,e[17]=f,e[18]=m,e[19]=c,e[20]=g):g=e[20];let x;e[21]!==r?(x=z("flex flex-wrap gap-2",r),e[21]=r,e[22]=x):x=e[22];let v;e[23]!==n||e[24]!==s||e[25]!==x?(v=b.jsx("div",{className:x,role:"group",...s,"data-ox-slot":"toggle-group",children:n}),e[23]=n,e[24]=s,e[25]=x,e[26]=v):v=e[26];let y;return e[27]!==g||e[28]!==v?(y=b.jsx(qa.Provider,{value:g,children:v}),e[27]=g,e[28]=v,e[29]=y):y=e[29],y},D2=Object.assign(N2,{Group:j2}),Ga=k.createContext(null),Ua=()=>k.useContext(Ga),P2=({align:t="center",children:e,className:n,content:r,disabled:s=!1,hoverDelay:o=700,interactive:i=!1,position:l="top",trigger:a="hover"})=>{const d=Ua(),[c,u]=k.useState(!1),[f,m]=k.useState(!1),[h,p]=k.useState(!1),g=k.useRef(null),x=k.useRef(null),v=k.useRef(null),y=s?!1:c;k.useEffect(()=>(y?(v.current&&clearTimeout(v.current),p(!1),m(!0),d?.onTooltipOpen()):f&&(p(!0),d?.onTooltipClose(),v.current=setTimeout(()=>{m(!1),p(!1)},100)),()=>{v.current&&clearTimeout(v.current)}),[y,f,d]);const w=k.useCallback(()=>{x.current&&clearTimeout(x.current),g.current&&clearTimeout(g.current),g.current=null,u(!0)},[]),C=k.useCallback(()=>{g.current&&clearTimeout(g.current),x.current&&clearTimeout(x.current),g.current=null,u(!1)},[]),O=k.useCallback(()=>{if(g.current&&clearTimeout(g.current),d?.shouldSkipDelay()??!1){u(!0);return}g.current=setTimeout(()=>{u(!0),g.current=null},o)},[o,d]),S=k.useCallback(()=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{u(!1),x.current=null},100)},[]),E=k.useCallback(()=>{x.current&&clearTimeout(x.current)},[]),R=k.useMemo(()=>a==="hover"?{onBlur:C,onFocus:w,onPointerEnter:O,onPointerLeave:i?S:C}:a==="click"?{onClick:()=>u(D=>!D)}:{onBlur:C,onFocus:w},[a,C,w,O,S,i]),N=k.useMemo(()=>i?{onPointerEnter:E,onPointerLeave:C}:{},[i,E,C]),j=k.isValidElement(e)?k.cloneElement(e,R):e;return b.jsxs(Se,{children:[b.jsx(Se.Anchor,{asChild:!0,children:j}),f&&b.jsx(Bt,{children:b.jsxs(Se.Content,{align:t,"aria-live":"polite",className:z("ox-tooltip-animate max-w-xs rounded-md border border-border bg-popover px-3.75 py-2.5 text-xs text-popover-foreground shadow-md",n),"data-ox-state":h?"closing":"open",role:"tooltip",side:l,sideOffset:2,...N,children:[b.jsx(Se.Arrow,{}),r]})})]})},T2=t=>{const e=I.compilerRuntimeExports.c(12),{children:n,skipDelayDuration:r}=t,s=r===void 0?300:r,[o,i]=k.useState(!1),l=k.useRef(0);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{i(!0)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{l.current=Date.now(),i(!1)},e[1]=c):c=e[1];const u=c;let f;e[2]!==o||e[3]!==s?(f=()=>o?!0:Date.now()-l.current<s,e[2]=o,e[3]=s,e[4]=f):f=e[4];const m=f;let h;e[5]!==o||e[6]!==m||e[7]!==s?(h={isTooltipOpen:o,onTooltipClose:u,onTooltipOpen:d,shouldSkipDelay:m,skipDelayDuration:s},e[5]=o,e[6]=m,e[7]=s,e[8]=h):h=e[8];const p=h;let g;return e[9]!==n||e[10]!==p?(g=b.jsx(Ga.Provider,{value:p,children:n}),e[9]=n,e[10]=p,e[11]=g):g=e[11],g};exports.MOBILE_BREAKPOINT=fa;exports.OxAccordion=jd;exports.OxAlert=Ad;exports.OxAspectRatio=Bd;exports.OxAvatar=gs;exports.OxBadge=Zr;exports.OxBreadcrumb=iu;exports.OxButton=Ze;exports.OxCalendar=el;exports.OxCard=Rm;exports.OxCheckbox=ds;exports.OxCombobox=Vb;exports.OxDateInput=g0;exports.OxDescription=Zt;exports.OxDescriptionList=Pm;exports.OxDialog=wx;exports.OxDndContext=ap;exports.OxDraggable=Rl;exports.OxDrawer=sr;exports.OxDropdown=Jt;exports.OxDroppable=Nl;exports.OxEndlessList=Mg;exports.OxError=Sa;exports.OxFileUpload=Kb;exports.OxForm=o0;exports.OxHeading=ka;exports.OxHoverCard=Lg;exports.OxIcon=ue;exports.OxIcon$1=$i;exports.OxImage=Fg;exports.OxJsonField=Bg;exports.OxKanban=dx;exports.OxLabel=Ra;exports.OxLegend=fb;exports.OxLink=fx;exports.OxMasonry=px;exports.OxNotifications=Rx;exports.OxNumberInput=E0;exports.OxOtpInput=R0;exports.OxPageOutline=Ix;exports.OxPagination=Hx;exports.OxPopover=Un;exports.OxPopper=Se;exports.OxProgress=Qx;exports.OxRadio=J0;exports.OxSelect=i2;exports.OxSeparator=Ws;exports.OxSkeleton=_t;exports.OxSlider=eb;exports.OxSortableList=ib;exports.OxSpinner=Cs;exports.OxStatusDisplay=cb;exports.OxStepper=bb;exports.OxSwitch=l2;exports.OxTable=d2;exports.OxTabs=x2;exports.OxTag=es;exports.OxTextInput=V0;exports.OxTextarea=a2;exports.OxThemeSwitcher=b2;exports.OxTimeInput=U0;exports.OxTimeline=w2;exports.OxToast=Ya;exports.OxToastProvider=C2;exports.OxToggle=D2;exports.OxTooltip=P2;exports.OxTooltipProvider=T2;exports.buildMailTo=Ja;exports.buildUrl=Qa;exports.cn=z;exports.copyToClipboard=Vc;exports.createId=qc;exports.createSlot=dt;exports.formatBytes=Uc;exports.formatCurrency=Kc;exports.formatDate=Xc;exports.formatNumber=Qc;exports.formatTimestamp=fs;exports.generateRandomString=Ri;exports.handleFormErrors=ji;exports.handleGraphQLFormErrors=Gc;exports.hasDataSlot=ms;exports.parseGraphQLErrors=Ni;exports.scrollToElement=Di;exports.useDndContext=lp;exports.useOxToast=O2;exports.useOxTooltipContext=Ua;exports.usePopperContentContext=Ml;exports.usePopperContext=Ds;exports.validateEmail=sd;exports.validatePhone=ld;exports.validateUrl=od;
|