lizaui 3.0.18 → 3.0.20

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.
Files changed (36) hide show
  1. package/dist/button/index.cjs.js +1 -1
  2. package/dist/button/index.es.js +1 -1
  3. package/dist/calendar/index.cjs.js +1 -1
  4. package/dist/calendar/index.es.js +1 -1
  5. package/dist/chunks/{button-BFiQhp-f.js → button-DY6HAc8R.js} +1047 -907
  6. package/dist/chunks/button-DY6HAc8R.js.map +1 -0
  7. package/dist/chunks/button-DbkElM5k.js +10 -0
  8. package/dist/chunks/button-DbkElM5k.js.map +1 -0
  9. package/dist/chunks/index-BIzSm1_7.js +65 -0
  10. package/dist/chunks/index-BIzSm1_7.js.map +1 -0
  11. package/dist/chunks/index-mYE_k9Xd.js +6396 -0
  12. package/dist/chunks/index-mYE_k9Xd.js.map +1 -0
  13. package/dist/components/ui/modal.d.ts +8 -3
  14. package/dist/components/ui/modal.d.ts.map +1 -1
  15. package/dist/components/ui/switch.d.ts +1 -1
  16. package/dist/components/ui/switch.d.ts.map +1 -1
  17. package/dist/effects/motion-effect/index.d.ts +27 -0
  18. package/dist/effects/motion-effect/index.d.ts.map +1 -0
  19. package/dist/effects/motion-highlight/index.d.ts +83 -0
  20. package/dist/effects/motion-highlight/index.d.ts.map +1 -0
  21. package/dist/pagination/index.cjs.js +1 -1
  22. package/dist/pagination/index.es.js +2 -2
  23. package/dist/types/switch.type.d.ts +3 -0
  24. package/dist/types/switch.type.d.ts.map +1 -1
  25. package/dist/ui/index.cjs.js +1 -1
  26. package/dist/ui/index.cjs.js.map +1 -1
  27. package/dist/ui/index.es.js +5 -5
  28. package/dist/ui/index.es.js.map +1 -1
  29. package/package.json +2 -1
  30. package/dist/chunks/button-BFiQhp-f.js.map +0 -1
  31. package/dist/chunks/button-CBLcH0I-.js +0 -10
  32. package/dist/chunks/button-CBLcH0I-.js.map +0 -1
  33. package/dist/chunks/index-jBeQP53E.js +0 -65
  34. package/dist/chunks/index-jBeQP53E.js.map +0 -1
  35. package/dist/chunks/index-ui7isTRa.js +0 -5030
  36. package/dist/chunks/index-ui7isTRa.js.map +0 -1
@@ -0,0 +1,65 @@
1
+ "use strict";const v=require("./jsx-runtime-DFswc9zO.js"),P=require("react"),ie=require("./variants-BUTPDD09.js"),yi=require("./tv-C5lw0tnu.js"),Te=require("./bundle-mjs-Bta93uUH.js"),ue=require("./utils-WCaO4kJS.js"),Fe=require("./clsx-C11secjj.js"),Ei=require("./pattern-F8jUniwt.js");require("./refs-DLih6QCP.js");const m=require("./button-DbkElM5k.js"),re=require("./index-D2_xS2pD.js"),Wo=require("react-dom"),Ie=require("./floating-ui.react-dom-BPdJyHFN.js"),Si=require("./floating-ui.dom-CZ9SJ4ip.js");function Ho(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=Ho(P),bn=Ho(Wo);function bi(e){return e==="x"||e==="y"?m.isDragging[e]?null:(m.isDragging[e]=!0,()=>{m.isDragging[e]=!1}):m.isDragging.x||m.isDragging.y?null:(m.isDragging.x=m.isDragging.y=!0,()=>{m.isDragging.x=m.isDragging.y=!1})}function Uo(e){return m.isObject(e)&&"ownerSVGElement"in e}function wi(e){return Uo(e)&&e.tagName==="svg"}function lt(e,t,n,o){return m.addDomEvent(e,t,m.addPointerInfo(n),o)}const Go=1e-4,Ri=1-Go,Ci=1+Go,Ko=.01,Pi=0-Ko,Ti=0+Ko;function he(e){return e.max-e.min}function Di(e,t,n){return Math.abs(e-t)<=n}function Fn(e,t,n,o=.5){e.origin=o,e.originPoint=m.mixNumber(t.min,t.max,e.origin),e.scale=he(n)/he(t),e.translate=m.mixNumber(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ri&&e.scale<=Ci||isNaN(e.scale))&&(e.scale=1),(e.translate>=Pi&&e.translate<=Ti||isNaN(e.translate))&&(e.translate=0)}function ct(e,t,n,o){Fn(e.x,t.x,n.x,o?o.originX:void 0),Fn(e.y,t.y,n.y,o?o.originY:void 0)}function $n(e,t,n){e.min=n.min+t.min,e.max=e.min+he(t)}function ji(e,t,n){$n(e.x,t.x,n.x),$n(e.y,t.y,n.y)}function Wn(e,t,n){e.min=t.min-n.min,e.max=e.min+he(t)}function ut(e,t,n){Wn(e.x,t.x,n.x),Wn(e.y,t.y,n.y)}function ye(e){return[e("x"),e("y")]}const qo=({current:e})=>e?e.ownerDocument.defaultView:null,Hn=(e,t)=>Math.abs(e-t);function Ai(e,t){const n=Hn(e.x,t.x),o=Hn(e.y,t.y);return Math.sqrt(n**2+o**2)}class Xo{constructor(t,n,{transformPagePoint:o,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=qt(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=Ai(f.offset,{x:0,y:0})>=3;if(!p&&!g)return;const{point:E}=f,{timestamp:h}=m.frameData;this.history.push({...E,timestamp:h});const{onStart:x,onMove:y}=this.handlers;p||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Kt(p,this.transformPagePoint),m.frame.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:g,onSessionEnd:E,resumeAnimation:h}=this.handlers;if(this.dragSnapToOrigin&&h&&h(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=qt(f.type==="pointercancel"?this.lastMoveEventInfo:Kt(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,x),E&&E(f,x)},!m.isPrimaryPointer(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=o,this.contextWindow=i||window;const r=m.extractEventInfo(t),s=Kt(r,this.transformPagePoint),{point:l}=s,{timestamp:c}=m.frameData;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,qt(s,this.history)),this.removeListeners=m.pipe(lt(this.contextWindow,"pointermove",this.handlePointerMove),lt(this.contextWindow,"pointerup",this.handlePointerUp),lt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),m.cancelFrame(this.updatePoint)}}function Kt(e,t){return t?{point:t(e.point)}:e}function Un(e,t){return{x:e.x-t.x,y:e.y-t.y}}function qt({point:e},t){return{point:e,delta:Un(e,Yo(t)),offset:Un(e,Ii(t)),velocity:Mi(t,.1)}}function Ii(e){return e[0]}function Yo(e){return e[e.length-1]}function Mi(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const i=Yo(e);for(;n>=0&&(o=e[n],!(i.timestamp-o.timestamp>m.secondsToMilliseconds(t)));)n--;if(!o)return{x:0,y:0};const a=m.millisecondsToSeconds(i.timestamp-o.timestamp);if(a===0)return{x:0,y:0};const r={x:(i.x-o.x)/a,y:(i.y-o.y)/a};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Ni(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?m.mixNumber(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?m.mixNumber(n,e,o.max):Math.min(e,n)),e}function Gn(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Li(e,{top:t,left:n,bottom:o,right:i}){return{x:Gn(e.x,n,i),y:Gn(e.y,t,o)}}function Kn(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function ki(e,t){return{x:Kn(e.x,t.x),y:Kn(e.y,t.y)}}function Oi(e,t){let n=.5;const o=he(e),i=he(t);return i>o?n=m.progress(t.min,t.max-o,e.min):o>i&&(n=m.progress(e.min,e.max-i,t.min)),m.clamp(0,1,n)}function _i(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const fn=.35;function zi(e=fn){return e===!1?e=0:e===!0&&(e=fn),{x:qn(e,"left","right"),y:qn(e,"top","bottom")}}function qn(e,t,n){return{min:Xn(e,t),max:Xn(e,n)}}function Xn(e,t){return typeof e=="number"?e:e[t]||0}const Bi=new WeakMap;class Vi{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=m.createBox(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(m.extractEventInfo(u).point)},a=(u,f)=>{const{drag:p,dragPropagation:g,onDragStart:E}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bi(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ye(x=>{let y=this.getAxisMotionValue(x).get()||0;if(m.percent.test(y)){const{projection:S}=this.visualElement;if(S&&S.layout){const b=S.layout.layoutBox[x];b&&(y=he(b)*(parseFloat(y)/100))}}this.originPoint[x]=y}),E&&m.frame.postRender(()=>E(u,f)),m.addValueToWillChange(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},r=(u,f)=>{const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:E,onDrag:h}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:x}=f;if(g&&this.currentDirection===null){this.currentDirection=Fi(x),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),h&&h(u,f)},s=(u,f)=>this.stop(u,f),l=()=>ye(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)==null?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Xo(t,{onSessionStart:i,onStart:a,onMove:r,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:qo(this.visualElement)})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&m.frame.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:i}=this.getProps();if(!o||!gt(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=Ni(r,this.constraints[t],this.elastic[t])),a.set(r)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&m.isRefObject(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=Li(o.layoutBox,t):this.constraints=!1,this.elastic=zi(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ye(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=_i(o.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!m.isRefObject(t))return!1;const o=t.current;m.invariant(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=m.measurePageBox(o,i.root,this.visualElement.getTransformPagePoint());let r=ki(i.layout.layoutBox,a);if(n){const s=n(m.convertBoxToBoundingBox(r));this.hasMutatedConstraints=!!s,s&&(r=m.convertBoundingBoxToBox(s))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:i,dragTransition:a,dragSnapToOrigin:r,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=ye(u=>{if(!gt(u,n,this.currentDirection))return;let f=l&&l[u]||{};r&&(f={min:0,max:0});const p=i?200:1e6,g=i?40:1e7,E={type:"inertia",velocity:o?t[u]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(u,E)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return m.addValueToWillChange(this.visualElement,t),o.start(m.animateMotionValue(t,o,0,n,this.visualElement,!1))}stopAnimation(){ye(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ye(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),i=o[n];return i||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){ye(n=>{const{drag:o}=this.getProps();if(!gt(n,o,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:s}=i.layout.layoutBox[n];a.set(t[n]-m.mixNumber(r,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!m.isRefObject(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ye(r=>{const s=this.getAxisMotionValue(r);if(s&&this.constraints!==!1){const l=s.get();i[r]=Oi({min:l,max:l},this.constraints[r])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),ye(r=>{if(!gt(r,t,null))return;const s=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];s.set(m.mixNumber(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Bi.set(this.visualElement,this);const t=this.visualElement.current,n=lt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();m.isRefObject(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),m.frame.read(o);const r=m.addDomEvent(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ye(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:r=fn,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:a,dragElastic:r,dragMomentum:s}}}function gt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Fi(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $i extends m.Feature{constructor(t){super(t),this.removeGroupControls=m.noop,this.removeListeners=m.noop,this.controls=new Vi(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||m.noop}unmount(){this.removeGroupControls(),this.removeListeners()}}const Yn=e=>(t,n)=>{e&&m.frame.postRender(()=>e(t,n))};class Wi extends m.Feature{constructor(){super(...arguments),this.removePointerDownListener=m.noop}onPointerDown(t){this.session=new Xo(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:qo(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:i}=this.node.getProps();return{onSessionStart:Yn(t),onStart:Yn(n),onMove:o,onEnd:(a,r)=>{delete this.session,i&&m.frame.postRender(()=>i(a,r))}}}mount(){this.removePointerDownListener=lt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const wt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Zn(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ot={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(m.px.test(e))e=parseFloat(e);else return e;const n=Zn(e,t.target.x),o=Zn(e,t.target.y);return`${n}% ${o}%`}},Hi={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,i=m.complex.parse(e);if(i.length>5)return o;const a=m.complex.createTransformer(e),r=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+r]/=s,i[1+r]/=l;const c=m.mixNumber(s,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),a(i)}};class Ui extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:i}=this.props,{projection:a}=t;m.addScaleCorrector(Gi),a&&(n.group&&n.group.add(a),o&&o.register&&i&&o.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),wt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:i,isPresent:a}=this.props,{projection:r}=o;return r&&(r.isPresent=a,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?r.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?r.promote():r.relegate()||m.frame.postRender(()=>{const s=r.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),m.microtask.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),o&&o.deregister&&o.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Zo(e){const[t,n]=m.usePresence(),o=P.useContext(m.LayoutGroupContext);return v.jsxRuntimeExports.jsx(Ui,{...e,layoutGroup:o,switchLayoutGroup:P.useContext(m.SwitchLayoutGroupContext),isPresent:t,safeToRemove:n})}const Gi={borderRadius:{...ot,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ot,borderTopRightRadius:ot,borderBottomLeftRadius:ot,borderBottomRightRadius:ot,boxShadow:Hi};function Ki(e,t,n){const o=m.isMotionValue(e)?e:m.motionValue(e);return o.start(m.animateMotionValue("",o,t,n)),o.animation}const qi=(e,t)=>e.depth-t.depth;class Xi{constructor(){this.children=[],this.isDirty=!1}add(t){m.addUniqueItem(this.children,t),this.isDirty=!0}remove(t){m.removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(qi),this.isDirty=!1,this.children.forEach(t)}}function Yi(e,t){const n=m.time.now(),o=({timestamp:i})=>{const a=i-n;a>=t&&(m.cancelFrame(o),e(a-t))};return m.frame.setup(o,!0),()=>m.cancelFrame(o)}const Jo=["TopLeft","TopRight","BottomLeft","BottomRight"],Zi=Jo.length,Jn=e=>typeof e=="string"?parseFloat(e):e,Qn=e=>typeof e=="number"||m.px.test(e);function Ji(e,t,n,o,i,a){i?(e.opacity=m.mixNumber(0,n.opacity??1,Qi(o)),e.opacityExit=m.mixNumber(t.opacity??1,0,ea(o))):a&&(e.opacity=m.mixNumber(t.opacity??1,n.opacity??1,o));for(let r=0;r<Zi;r++){const s=`border${Jo[r]}Radius`;let l=eo(t,s),c=eo(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Qn(l)===Qn(c)?(e[s]=Math.max(m.mixNumber(Jn(l),Jn(c),o),0),(m.percent.test(c)||m.percent.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=m.mixNumber(t.rotate||0,n.rotate||0,o))}function eo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Qi=Qo(0,.5,m.circOut),ea=Qo(.5,.95,m.noop);function Qo(e,t,n){return o=>o<e?0:o>t?1:n(m.progress(e,t,o))}function to(e,t){e.min=t.min,e.max=t.max}function xe(e,t){to(e.x,t.x),to(e.y,t.y)}function no(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function oo(e,t,n,o,i){return e-=t,e=m.scalePoint(e,1/n,o),i!==void 0&&(e=m.scalePoint(e,1/i,o)),e}function ta(e,t=0,n=1,o=.5,i,a=e,r=e){if(m.percent.test(t)&&(t=parseFloat(t),t=m.mixNumber(r.min,r.max,t/100)-r.min),typeof t!="number")return;let s=m.mixNumber(a.min,a.max,o);e===a&&(s-=t),e.min=oo(e.min,t,n,s,i),e.max=oo(e.max,t,n,s,i)}function ro(e,t,[n,o,i],a,r){ta(e,t[n],t[o],t[i],t.scale,a,r)}const na=["x","scaleX","originX"],oa=["y","scaleY","originY"];function so(e,t,n,o){ro(e.x,t,na,n?n.x:void 0,o?o.x:void 0),ro(e.y,t,oa,n?n.y:void 0,o?o.y:void 0)}function io(e){return e.translate===0&&e.scale===1}function er(e){return io(e.x)&&io(e.y)}function ao(e,t){return e.min===t.min&&e.max===t.max}function ra(e,t){return ao(e.x,t.x)&&ao(e.y,t.y)}function lo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tr(e,t){return lo(e.x,t.x)&&lo(e.y,t.y)}function co(e){return he(e.x)/he(e.y)}function uo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class sa{constructor(){this.members=[]}add(t){m.addUniqueItem(this.members,t),t.scheduleRender()}remove(t){if(m.removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let o;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){o=a;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ia(e,t,n){let o="";const i=e.x.translate/t.x,a=e.y.translate/t.y,r=(n==null?void 0:n.z)||0;if((i||a||r)&&(o=`translate3d(${i}px, ${a}px, ${r}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:p,skewX:g,skewY:E}=n;c&&(o=`perspective(${c}px) ${o}`),u&&(o+=`rotate(${u}deg) `),f&&(o+=`rotateX(${f}deg) `),p&&(o+=`rotateY(${p}deg) `),g&&(o+=`skewX(${g}deg) `),E&&(o+=`skewY(${E}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(o+=`scale(${s}, ${l})`),o||"none"}const Xt=["","X","Y","Z"],aa={visibility:"hidden"},la=1e3;let ca=0;function Yt(e,t,n,o){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),o&&(o[e]=0))}function nr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=m.getOptimisedAppearId(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",m.frame,!(i||a))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&nr(o)}function or({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(r={},s=t==null?void 0:t()){this.id=ca++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(fa),this.nodes.forEach(va),this.nodes.forEach(xa),this.nodes.forEach(pa)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Xi)}addEventListener(r,s){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new m.SubscriptionManager),this.eventHandlers.get(r).add(s)}notifyListeners(r,...s){const l=this.eventHandlers.get(r);l&&l.notify(...s)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Uo(r)&&!wi(r),this.instance=r;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u;const f=()=>this.root.updateBlockedByResize=!1;e(r,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=Yi(f,250),wt.hasAnimatedSinceResize&&(wt.hasAnimatedSinceResize=!1,this.nodes.forEach(po))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||c.getDefaultTransition()||wa,{onLayoutAnimationStart:h,onLayoutAnimationComplete:x}=c.getProps(),y=!this.targetLayout||!tr(this.targetLayout,g),S=!f&&p;if(this.options.layoutRoot||this.resumeFrom||S||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...m.getValueTransition(E,"layout"),onPlay:h,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,S)}else f||po(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),m.cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ya),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&nr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(fo);return}this.isUpdating||this.nodes.forEach(ma),this.isUpdating=!1,this.nodes.forEach(ga),this.nodes.forEach(ua),this.nodes.forEach(da),this.clearAllSnapshots();const s=m.time.now();m.frameData.delta=m.clamp(0,1e3/60,s-m.frameData.timestamp),m.frameData.timestamp=s,m.frameData.isProcessing=!0,m.frameSteps.update.process(m.frameData),m.frameSteps.preRender.process(m.frameData),m.frameSteps.render.process(m.frameData),m.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,m.microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ha),this.sharedNodes.forEach(Ea)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,m.frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){m.frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!he(this.snapshot.measuredBox.x)&&!he(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=m.createBox(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(s=!1),s&&this.instance){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!er(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(s||m.hasTransform(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return r&&(l=this.removeTransform(l)),Ra(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:r}=this.options;if(!r)return m.createBox();const s=r.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(Ca))){const{scroll:u}=this.root;u&&(m.translateAxis(s.x,u.offset.x),m.translateAxis(s.y,u.offset.y))}return s}removeElementScroll(r){var l;const s=m.createBox();if(xe(s,r),(l=this.scroll)!=null&&l.wasRoot)return s;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:f,options:p}=u;u!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&xe(s,r),m.translateAxis(s.x,f.offset.x),m.translateAxis(s.y,f.offset.y))}return s}applyTransform(r,s=!1){const l=m.createBox();xe(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&m.transformBox(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),m.hasTransform(u.latestValues)&&m.transformBox(l,u.latestValues)}return m.hasTransform(this.latestValues)&&m.transformBox(l,this.latestValues),l}removeTransform(r){const s=m.createBox();xe(s,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!m.hasTransform(c.latestValues))continue;m.hasScale(c.latestValues)&&c.updateSnapshot();const u=m.createBox(),f=c.measurePageBox();xe(u,f),so(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return m.hasTransform(this.latestValues)&&so(s,this.latestValues),s}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==m.frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var p;const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!(!this.layout||!(u||f))){if(this.resolvedRelativeTargetAt=m.frameData.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=m.createBox(),this.relativeTargetOrigin=m.createBox(),ut(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),xe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=m.createBox(),this.targetWithTransforms=m.createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ji(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xe(this.target,this.layout.layoutBox),m.applyBoxDelta(this.target,this.targetDelta)):xe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=m.createBox(),this.relativeTargetOrigin=m.createBox(),ut(this.relativeTargetOrigin,this.target,g.target),xe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||m.hasScale(this.parent.latestValues)||m.has2DTranslate(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var E;const r=this.getLead(),s=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||(E=this.parent)!=null&&E.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===m.frameData.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;xe(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;m.applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,s),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=m.createBox());const{target:g}=r;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(no(this.prevProjectionDelta.x,this.projectionDelta.x),no(this.prevProjectionDelta.y,this.projectionDelta.y)),ct(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!uo(this.projectionDelta.x,this.prevProjectionDelta.x)||!uo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var s;if((s=this.options.visualElement)==null||s.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=m.createDelta(),this.projectionDelta=m.createDelta(),this.projectionDeltaWithTransform=m.createDelta()}setAnimationOrigin(r,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=m.createDelta();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=m.createBox(),g=l?l.source:void 0,E=this.layout?this.layout.source:void 0,h=g!==E,x=this.getStack(),y=!x||x.members.length<=1,S=!!(h&&!y&&this.options.crossfade===!0&&!this.path.some(ba));this.animationProgress=0;let b;this.mixTargetDelta=C=>{const A=C/1e3;ho(f.x,r.x,A),ho(f.y,r.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ut(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Sa(this.relativeTarget,this.relativeTargetOrigin,p,A),b&&ra(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=m.createBox()),xe(b,this.relativeTarget)),h&&(this.animationValues=u,Ji(u,c,this.latestValues,A,S,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var s,l,c;this.notifyListeners("animationStart"),(s=this.currentAnimation)==null||s.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(m.cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=m.frame.update(()=>{wt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=m.motionValue(0)),this.currentAnimation=Ki(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(la),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=r;if(!(!s||!l||!c)){if(this!==r&&this.layout&&c&&rr(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||m.createBox();const f=he(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const p=he(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+p}xe(s,l),m.transformBox(s,u),ct(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(r,s){this.sharedNodes.has(r)||this.sharedNodes.set(r,new sa),this.sharedNodes.get(r).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var s;const{layoutId:r}=this.options;return r?((s=this.getStack())==null?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:r}=this.options;return r?(s=this.getStack())==null?void 0:s.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let s=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Yt("z",r,c,this.animationValues);for(let u=0;u<Xt.length;u++)Yt(`rotate${Xt[u]}`,r,c,this.animationValues),Yt(`skew${Xt[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}getProjectionStyles(r){if(!this.instance||this.isSVG)return;if(!this.isVisible)return aa;const s={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=m.resolveMotionValue(r==null?void 0:r.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=m.resolveMotionValue(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!m.hasTransform(this.latestValues)&&(g.transform=l?l({},""):"none",this.hasProjected=!1),g}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=ia(this.projectionDeltaWithTransform,this.treeScale,u),l&&(s.transform=l(u,s.transform));const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in m.scaleCorrectors){if(u[g]===void 0)continue;const{correct:E,applyTo:h,isCSSVariable:x}=m.scaleCorrectors[g],y=s.transform==="none"?u[g]:E(u[g],c);if(h){const S=h.length;for(let b=0;b<S;b++)s[h[b]]=y}else x?this.options.visualElement.renderState.vars[g]=y:s[g]=y}return this.options.layoutId&&(s.pointerEvents=c===this?m.resolveMotionValue(r==null?void 0:r.pointerEvents)||"":"none"),s}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var s;return(s=r.currentAnimation)==null?void 0:s.stop()}),this.root.nodes.forEach(fo),this.root.sharedNodes.clear()}}}function ua(e){e.updateLayout()}function da(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:i}=e.layout,{animationType:a}=e.options,r=t.source!==e.layout.source;a==="size"?ye(f=>{const p=r?t.measuredBox[f]:t.layoutBox[f],g=he(p);p.min=o[f].min,p.max=p.min+g}):rr(a,t.layoutBox,o)&&ye(f=>{const p=r?t.measuredBox[f]:t.layoutBox[f],g=he(o[f]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const s=m.createDelta();ct(s,o,t.layoutBox);const l=m.createDelta();r?ct(l,e.applyTransform(i,!0),t.measuredBox):ct(l,o,t.layoutBox);const c=!er(s);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:g}=f;if(p&&g){const E=m.createBox();ut(E,t.layoutBox,p.layoutBox);const h=m.createBox();ut(h,o,g.layoutBox),tr(E,h)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=E,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function fa(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function pa(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ha(e){e.clearSnapshot()}function fo(e){e.clearMeasurements()}function ma(e){e.isLayoutDirty=!1}function ga(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function po(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function va(e){e.resolveTargetDelta()}function xa(e){e.calcProjection()}function ya(e){e.resetSkewAndRotation()}function Ea(e){e.removeLeadSnapshot()}function ho(e,t,n){e.translate=m.mixNumber(t.translate,0,n),e.scale=m.mixNumber(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function mo(e,t,n,o){e.min=m.mixNumber(t.min,n.min,o),e.max=m.mixNumber(t.max,n.max,o)}function Sa(e,t,n,o){mo(e.x,t.x,n.x,o),mo(e.y,t.y,n.y,o)}function ba(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const wa={duration:.45,ease:[.4,0,.1,1]},go=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),vo=go("applewebkit/")&&!go("chrome/")?Math.round:m.noop;function xo(e){e.min=vo(e.min),e.max=vo(e.max)}function Ra(e){xo(e.x),xo(e.y)}function rr(e,t,n){return e==="position"||e==="preserve-aspect"&&!Di(co(t),co(n),.2)}function Ca(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Pa=or({attachResizeListener:(e,t)=>m.addDomEvent(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zt={current:void 0},sr=or({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zt.current){const e=new Pa({});e.mount(window),e.setOptions({layoutScroll:!0}),Zt.current=e}return Zt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ta={pan:{Feature:Wi},drag:{Feature:$i,ProjectionNode:sr,MeasureLayout:Zo}},Da={layout:{ProjectionNode:sr,MeasureLayout:Zo}},ja=m.createMotionComponentFactory({...m.animations,...m.gestureAnimations,...Ta,...Da},m.createDomVisualElement),Jt=m.createDOMMotionComponentProxy(ja),Aa=yi.tv({slots:{base:["relative","inline-flex","shrink-0"],badge:["flex","z-10","flex-wrap","absolute","box-border","rounded-full","whitespace-nowrap","place-content-center","origin-center","items-center","text-inherit","select-none","font-regular","scale-100","opacity-100","subpixel-antialiased","data-[invisible=true]:scale-0","data-[invisible=true]:opacity-0"]},variants:{variant:{solid:{},flat:{},faded:{badge:"border-medium"},shadow:{}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{badge:"px-1 text-xs"},md:{badge:"px-1 text-sm"},lg:{badge:"px-1 text-sm"}},placement:{"top-right":{},"top-left":{},"bottom-right":{},"bottom-left":{}},shape:{circle:{},rectangle:{}},isInvisible:{true:{}},isOneChar:{true:{badge:"px-0"}},isDot:{true:{}},disableAnimation:{true:{badge:"transition-none"},false:{badge:"transition-transform-opacity !ease-soft-spring !duration-300"}},showOutline:{true:{badge:"border-2 border-background"},false:{badge:"border-transparent border-0"}}},defaultVariants:{variant:"solid",color:"default",size:"md",shape:"rectangle",placement:"top-right",showOutline:!0,isInvisible:!1},compoundVariants:[{variant:"solid",color:"default",class:{badge:ie.colorVariants.solid.default}},{variant:"solid",color:"primary",class:{badge:ie.colorVariants.solid.primary}},{variant:"solid",color:"secondary",class:{badge:ie.colorVariants.solid.secondary}},{variant:"solid",color:"success",class:{badge:ie.colorVariants.solid.success}},{variant:"solid",color:"warning",class:{badge:ie.colorVariants.solid.warning}},{variant:"solid",color:"danger",class:{badge:ie.colorVariants.solid.danger}},{variant:"shadow",color:"default",class:{badge:ie.colorVariants.shadow.default}},{variant:"shadow",color:"primary",class:{badge:ie.colorVariants.shadow.primary}},{variant:"shadow",color:"secondary",class:{badge:ie.colorVariants.shadow.secondary}},{variant:"shadow",color:"success",class:{badge:ie.colorVariants.shadow.success}},{variant:"shadow",color:"warning",class:{badge:ie.colorVariants.shadow.warning}},{variant:"shadow",color:"danger",class:{badge:ie.colorVariants.shadow.danger}},{variant:"flat",color:"default",class:{badge:ie.colorVariants.flat.default}},{variant:"flat",color:"primary",class:{badge:ie.colorVariants.flat.primary}},{variant:"flat",color:"secondary",class:{badge:ie.colorVariants.flat.secondary}},{variant:"flat",color:"success",class:{badge:ie.colorVariants.flat.success}},{variant:"flat",color:"warning",class:{badge:ie.colorVariants.flat.warning}},{variant:"flat",color:"danger",class:{badge:ie.colorVariants.flat.danger}},{variant:"faded",color:"default",class:{badge:ie.colorVariants.faded.default}},{variant:"faded",color:"primary",class:{badge:ie.colorVariants.faded.primary}},{variant:"faded",color:"secondary",class:{badge:ie.colorVariants.faded.secondary}},{variant:"faded",color:"success",class:{badge:ie.colorVariants.faded.success}},{variant:"faded",color:"warning",class:{badge:ie.colorVariants.faded.warning}},{variant:"faded",color:"danger",class:{badge:ie.colorVariants.faded.danger}},{isOneChar:!0,size:"sm",class:{badge:"w-4 h-4 min-w-4 min-h-4"}},{isOneChar:!0,size:"md",class:{badge:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,size:"lg",class:{badge:"w-6 h-6 min-w-6 min-h-6"}},{isDot:!0,size:"sm",class:{badge:"w-3 h-3 min-w-3 min-h-3"}},{isDot:!0,size:"md",class:{badge:"w-3.5 h-3.5 min-w-3.5 min-h-3.5"}},{isDot:!0,size:"lg",class:{badge:"w-4 h-4 min-w-4 min-h-4"}},{placement:"top-right",shape:"rectangle",class:{badge:"top-[5%] right-[5%] translate-x-1/2 -translate-y-1/2"}},{placement:"top-left",shape:"rectangle",class:{badge:"top-[5%] left-[5%] -translate-x-1/2 -translate-y-1/2"}},{placement:"bottom-right",shape:"rectangle",class:{badge:"bottom-[5%] right-[5%] translate-x-1/2 translate-y-1/2"}},{placement:"bottom-left",shape:"rectangle",class:{badge:"bottom-[5%] left-[5%] -translate-x-1/2 translate-y-1/2"}},{placement:"top-right",shape:"circle",class:{badge:"top-[10%] right-[10%] translate-x-1/2 -translate-y-1/2"}},{placement:"top-left",shape:"circle",class:{badge:"top-[10%] left-[10%] -translate-x-1/2 -translate-y-1/2"}},{placement:"bottom-right",shape:"circle",class:{badge:"bottom-[10%] right-[10%] translate-x-1/2 translate-y-1/2"}},{placement:"bottom-left",shape:"circle",class:{badge:"bottom-[10%] left-[10%] -translate-x-1/2 translate-y-1/2"}}]}),Ia=d.forwardRef(({className:e,variant:t,size:n,color:o,children:i,content:a,shape:r,placement:s,...l},c)=>{const{base:u,badge:f}=Aa({variant:t,size:n,color:o,shape:r,placement:s});return v.jsxRuntimeExports.jsxs("div",{className:u(),children:[i,v.jsxRuntimeExports.jsx("span",{ref:c,className:f({class:e}),...l,children:a})]})}),yo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Eo=Fe.clsx,wn=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return Eo(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,r=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],f=a==null?void 0:a[c];if(u===null)return null;const p=yo(u)||yo(f);return i[c][p]}),s=n&&Object.entries(n).reduce((c,u)=>{let[f,p]=u;return p===void 0||(c[f]=p),c},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((c,u)=>{let{class:f,className:p,...g}=u;return Object.entries(g).every(E=>{let[h,x]=E;return Array.isArray(x)?x.includes({...a,...s}[h]):{...a,...s}[h]===x})?[...c,f,p]:c},[]);return Eo(e,r,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ma=wn(["bg-white","transition duration-250 ease appearance-none file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 border px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-primary focus-visible:ring-primary/20 focus-visible:ring-[3px] aria-invalid:ring-danger/20 dark:aria-invalid:ring-danger/40 font-normal aria-invalid:border-danger"],{variants:{size:{sm:"h-9 text-sm",md:"h-10 text-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),ir=d.forwardRef((e,t)=>{const{id:n,type:o="text",value:i,defaultValue:a,className:r,classNameContainer:s,size:l,radius:c,startContent:u,endContent:f,disabled:p,error:g,touched:E,pattern:h,isErrorText:x=!0,label:y,required:S=!1,isClearable:b=!1,onChange:C,onClear:A,...I}=e,R=d.useId(),W=n||R,k=i!==void 0,V=!p&&!!g&&E,G=Fe.clsx("absolute top-0 h-full flex items-center cursor-pointer px-1.5 z-[1]",{"text-red-700":V,"text-gray-400":p,"text-green-700":!g&&E,"text-gray-500":!V}),z=Fe.clsx(u&&"pl-8",!u&&"pl-2.5",f&&"pr-8",!f&&"pr-2.5"),F=ue.cn(Ma({size:l,radius:c}),z,r),Y=ue.cn("block font-normal text-sm text-gray-700 mb-1",{"text-danger":V}),X=J=>{const ee=J.target.value;h&&!Ei.validatePatternInput(h,ee)||C==null||C(J)},K=J=>{J.preventDefault(),A==null||A()};return v.jsxRuntimeExports.jsxs("div",{className:Te.twMerge("w-full relative flex flex-col",s),children:[y&&v.jsxRuntimeExports.jsxs("label",{htmlFor:W,className:Y,children:[y," ",S&&v.jsxRuntimeExports.jsx("span",{className:"text-danger",children:"*"})]}),v.jsxRuntimeExports.jsxs("div",{className:"w-full relative",children:[u&&v.jsxRuntimeExports.jsx("div",{className:Te.twMerge("left-1",G),children:u}),v.jsxRuntimeExports.jsx("input",{ref:t,id:W,...p?{}:{"aria-invalid":V},type:o,autoComplete:"off",autoCapitalize:"off",disabled:p,onChange:X,className:F,...k?{value:i}:{defaultValue:a},...I}),b&&!p&&i?v.jsxRuntimeExports.jsx("div",{className:Te.twMerge("absolute top-0 h-full flex items-center px-1.5 z-[1] opacity-70 hover:opacity-100 cursor-pointer rounded-full","right-1"),onClick:K,children:v.jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"18",viewBox:"0 0 24 24",width:"18",children:v.jsxRuntimeExports.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})})}):null,f&&v.jsxRuntimeExports.jsx("div",{className:Te.twMerge("right-1",G),children:f})]}),!p&&g&&E&&x&&v.jsxRuntimeExports.jsx(ue.LabelError,{text:g})]})});ir.displayName="Input";var Na=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],te=Na.reduce((e,t)=>{const n=re.createSlot(`Primitive.${t}`),o=d.forwardRef((i,a)=>{const{asChild:r,...s}=i,l=r?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsxRuntimeExports.jsx(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function ar(e,t){e&&bn.flushSync(()=>e.dispatchEvent(t))}const La=wn(["flex items-center cursor-pointer relative rounded-full p-0.5 px-1 relative overflow-hidden"],{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",default:"bg-default"},size:{sm:"w-10 h-6",md:"w-12 h-7",lg:"w-14 h-8"}},defaultVariants:{color:"primary",size:"md"}}),lr=({id:e=null,color:t,size:n="md",className:o,disabled:i=!1,label:a,description:r,positionLabel:s="end",required:l,error:c,touched:u,value:f,leftIcon:p,rightIcon:g,thumbIcon:E,onChange:h,...x})=>{const y=P.useId(),S=e||y,[b,C]=P.useState(!1);P.useEffect(()=>{C(f)},[f]);const A=G=>{h(G.target.checked)},I=()=>{i||h(!b)},R=Te.twMerge("transition transform bg-white rounded-full shadow-sm flex justify-center items-center",Fe.clsx(n==="sm"&&"w-4 h-4",n==="md"&&"w-5 h-5",n==="lg"&&"w-6 h-6",n==="sm"&&b&&"translate-x-4",n==="md"&&b&&"translate-x-5",n==="lg"&&b&&"translate-x-6")),W=Te.twMerge(Fe.clsx(!b&&"bg-gray-200",i&&"bg-gray-100 hover:bg-gray-100")),k=Te.twMerge("text-gray-500 leading-none",Fe.clsx({"text-sm":n==="sm"||n==="md","after:content-['*'] after:ml-0.5 after:text-green-500":l,"after:text-gray-400 text-gray-400":i})),V=Te.twMerge("text-xs text-gray-500 mt-1",i&&"text-gray-400");return v.jsxRuntimeExports.jsxs("div",{className:Te.twMerge(o),children:[v.jsxRuntimeExports.jsxs("div",{className:Fe.clsx("flex gap-2",r&&a?"items-start":"items-center"),children:[s==="start"&&(a||r)&&v.jsxRuntimeExports.jsxs("div",{onClick:I,className:"cursor-pointer",children:[a&&v.jsxRuntimeExports.jsx("p",{className:k,children:a}),r&&v.jsxRuntimeExports.jsx("p",{className:V,children:r})]}),v.jsxRuntimeExports.jsxs("label",{htmlFor:S,className:ue.cn(La({size:n,color:t}),W),children:[v.jsxRuntimeExports.jsx("input",{type:"checkbox",id:S,className:"sr-only peer",onChange:A,disabled:i,checked:b,"data-state":b?"checked":"unchecked",...x}),p&&v.jsxRuntimeExports.jsx(Jt.div,{initial:!1,animate:b?{scale:1,opacity:1}:{scale:0,opacity:0},transition:{type:"spring",bounce:0},className:"absolute left-1 top-1/2 -translate-y-1/2 text-neutral-400",children:p}),g&&v.jsxRuntimeExports.jsx(Jt.div,{initial:!1,animate:b?{scale:0,opacity:0}:{scale:1,opacity:1},transition:{type:"spring",bounce:0},className:"absolute right-1 top-1/2 -translate-y-1/2 text-neutral-400",children:g}),v.jsxRuntimeExports.jsx("span",{className:R,children:E&&v.jsxRuntimeExports.jsx(Jt.div,{initial:!1,animate:{scale:1},className:"flex items-center justify-center",children:E})})]}),s==="end"&&(a||r)&&v.jsxRuntimeExports.jsxs("div",{onClick:I,className:"cursor-pointer",children:[a&&v.jsxRuntimeExports.jsx("p",{className:k,children:a}),r&&v.jsxRuntimeExports.jsx("p",{className:V,children:r})]})]}),!i&&c&&u&&v.jsxRuntimeExports.jsx(ue.LabelError,{text:c})]})};lr.displayName="Switch";function oe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function ka(e,t){const n=d.createContext(t),o=a=>{const{children:r,...s}=a,l=d.useMemo(()=>s,Object.values(s));return v.jsxRuntimeExports.jsx(n.Provider,{value:l,children:r})};o.displayName=e+"Provider";function i(a){const r=d.useContext(n);if(r)return r;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,i]}function pt(e,t=[]){let n=[];function o(a,r){const s=d.createContext(r),l=n.length;n=[...n,r];const c=f=>{var y;const{scope:p,children:g,...E}=f,h=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,x=d.useMemo(()=>E,Object.values(E));return v.jsxRuntimeExports.jsx(h.Provider,{value:x,children:g})};c.displayName=a+"Provider";function u(f,p){var h;const g=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,E=d.useContext(g);if(E)return E;if(r!==void 0)return r;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=n.map(r=>d.createContext(r));return function(s){const l=(s==null?void 0:s[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[o,Oa(i,...t)]}function Oa(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const r=o.reduce((s,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...s,...f}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var fe=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},_a=d[" useInsertionEffect ".trim().toString()]||fe;function Tt({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,a,r]=za({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const u=d.useRef(e!==void 0);d.useEffect(()=>{const f=u.current;if(f!==s){const p=f?"controlled":"uncontrolled",g=s?"controlled":"uncontrolled"}u.current=s},[s,o])}const c=d.useCallback(u=>{var f;if(s){const p=Ba(u)?u(e):u;p!==e&&((f=r.current)==null||f.call(r,p))}else a(u)},[s,e,a,r]);return[l,c]}function za({defaultProp:e,onChange:t}){const[n,o]=d.useState(e),i=d.useRef(n),a=d.useRef(t);return _a(()=>{a.current=t},[t]),d.useEffect(()=>{var r;i.current!==n&&((r=a.current)==null||r.call(a,n),i.current=n)},[n,i]),[n,o,a]}function Ba(e){return typeof e=="function"}function cr(e){const t=e+"CollectionProvider",[n,o]=pt(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),r=h=>{const{scope:x,children:y}=h,S=P.useRef(null),b=P.useRef(new Map).current;return v.jsxRuntimeExports.jsx(i,{scope:x,itemMap:b,collectionRef:S,children:y})};r.displayName=t;const s=e+"CollectionSlot",l=re.createSlot(s),c=P.forwardRef((h,x)=>{const{scope:y,children:S}=h,b=a(s,y),C=re.useComposedRefs(x,b.collectionRef);return v.jsxRuntimeExports.jsx(l,{ref:C,children:S})});c.displayName=s;const u=e+"CollectionItemSlot",f="data-radix-collection-item",p=re.createSlot(u),g=P.forwardRef((h,x)=>{const{scope:y,children:S,...b}=h,C=P.useRef(null),A=re.useComposedRefs(x,C),I=a(u,y);return P.useEffect(()=>(I.itemMap.set(C,{ref:C,...b}),()=>void I.itemMap.delete(C))),v.jsxRuntimeExports.jsx(p,{[f]:"",ref:A,children:S})});g.displayName=u;function E(h){const x=a(e+"CollectionConsumer",h);return P.useCallback(()=>{const S=x.collectionRef.current;if(!S)return[];const b=Array.from(S.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((I,R)=>b.indexOf(I.ref.current)-b.indexOf(R.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:r,Slot:c,ItemSlot:g},E,o]}var Va=d.createContext(void 0);function ur(e){const t=d.useContext(Va);return e||t||"ltr"}function ke(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function Fa(e,t=globalThis==null?void 0:globalThis.document){const n=ke(e);d.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var $a="DismissableLayer",pn="dismissableLayer.update",Wa="dismissableLayer.pointerDownOutside",Ha="dismissableLayer.focusOutside",So,dr=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nt=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:r,onDismiss:s,...l}=e,c=d.useContext(dr),[u,f]=d.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),E=re.useComposedRefs(t,R=>f(R)),h=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(x),S=u?h.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,C=S>=y,A=Ka(R=>{const W=R.target,k=[...c.branches].some(V=>V.contains(W));!C||k||(i==null||i(R),r==null||r(R),R.defaultPrevented||s==null||s())},p),I=qa(R=>{const W=R.target;[...c.branches].some(V=>V.contains(W))||(a==null||a(R),r==null||r(R),R.defaultPrevented||s==null||s())},p);return Fa(R=>{S===c.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},p),d.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(So=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),bo(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=So)}},[u,p,n,c]),d.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),bo())},[u,c]),d.useEffect(()=>{const R=()=>g({});return document.addEventListener(pn,R),()=>document.removeEventListener(pn,R)},[]),v.jsxRuntimeExports.jsx(te.div,{...l,ref:E,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:oe(e.onFocusCapture,I.onFocusCapture),onBlurCapture:oe(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:oe(e.onPointerDownCapture,A.onPointerDownCapture)})});Nt.displayName=$a;var Ua="DismissableLayerBranch",Ga=d.forwardRef((e,t)=>{const n=d.useContext(dr),o=d.useRef(null),i=re.useComposedRefs(t,o);return d.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),v.jsxRuntimeExports.jsx(te.div,{...e,ref:i})});Ga.displayName=Ua;function Ka(e,t=globalThis==null?void 0:globalThis.document){const n=ke(e),o=d.useRef(!1),i=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!o.current){let l=function(){fr(Wa,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);o.current=!1},r=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function qa(e,t=globalThis==null?void 0:globalThis.document){const n=ke(e),o=d.useRef(!1);return d.useEffect(()=>{const i=a=>{a.target&&!o.current&&fr(Ha,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function bo(){const e=new CustomEvent(pn);document.dispatchEvent(e)}function fr(e,t,n,{discrete:o}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?ar(i,a):i.dispatchEvent(a)}var Qt=0;function Rn(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??wo()),document.body.insertAdjacentElement("beforeend",e[1]??wo()),Qt++,()=>{Qt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Qt--}},[])}function wo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var en="focusScope.autoFocusOnMount",tn="focusScope.autoFocusOnUnmount",Ro={bubbles:!1,cancelable:!0},Xa="FocusScope",Lt=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...r}=e,[s,l]=d.useState(null),c=ke(i),u=ke(a),f=d.useRef(null),p=re.useComposedRefs(t,h=>l(h)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(o){let h=function(b){if(g.paused||!s)return;const C=b.target;s.contains(C)?f.current=C:Me(f.current,{select:!0})},x=function(b){if(g.paused||!s)return;const C=b.relatedTarget;C!==null&&(s.contains(C)||Me(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const A of b)A.removedNodes.length>0&&Me(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const S=new MutationObserver(y);return s&&S.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),S.disconnect()}}},[o,s,g.paused]),d.useEffect(()=>{if(s){Po.add(g);const h=document.activeElement;if(!s.contains(h)){const y=new CustomEvent(en,Ro);s.addEventListener(en,c),s.dispatchEvent(y),y.defaultPrevented||(Ya(tl(pr(s)),{select:!0}),document.activeElement===h&&Me(s))}return()=>{s.removeEventListener(en,c),setTimeout(()=>{const y=new CustomEvent(tn,Ro);s.addEventListener(tn,u),s.dispatchEvent(y),y.defaultPrevented||Me(h??document.body,{select:!0}),s.removeEventListener(tn,u),Po.remove(g)},0)}}},[s,c,u,g]);const E=d.useCallback(h=>{if(!n&&!o||g.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(x&&y){const S=h.currentTarget,[b,C]=Za(S);b&&C?!h.shiftKey&&y===C?(h.preventDefault(),n&&Me(b,{select:!0})):h.shiftKey&&y===b&&(h.preventDefault(),n&&Me(C,{select:!0})):y===S&&h.preventDefault()}},[n,o,g.paused]);return v.jsxRuntimeExports.jsx(te.div,{tabIndex:-1,...r,ref:p,onKeyDown:E})});Lt.displayName=Xa;function Ya(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Me(o,{select:t}),document.activeElement!==n)return}function Za(e){const t=pr(e),n=Co(t,e),o=Co(t.reverse(),e);return[n,o]}function pr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Co(e,t){for(const n of e)if(!Ja(n,{upTo:t}))return n}function Ja(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Qa(e){return e instanceof HTMLInputElement&&"select"in e}function Me(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qa(e)&&t&&e.select()}}var Po=el();function el(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=To(e,t),e.unshift(t)},remove(t){var n;e=To(e,t),(n=e[0])==null||n.resume()}}}function To(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function tl(e){return e.filter(t=>t.tagName!=="A")}var nl=d[" useId ".trim().toString()]||(()=>{}),ol=0;function $e(e){const[t,n]=d.useState(nl());return fe(()=>{n(o=>o??String(ol++))},[e]),e||(t?`radix-${t}`:"")}var rl="Arrow",hr=d.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...a}=e;return v.jsxRuntimeExports.jsx(te.svg,{...a,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});hr.displayName=rl;var sl=hr;function il(e){const[t,n]=d.useState(void 0);return fe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let r,s;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;r=c.inlineSize,s=c.blockSize}else r=e.offsetWidth,s=e.offsetHeight;n({width:r,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Cn="Popper",[mr,Pn]=pt(Cn),[al,gr]=mr(Cn),vr=e=>{const{__scopePopper:t,children:n}=e,[o,i]=d.useState(null);return v.jsxRuntimeExports.jsx(al,{scope:t,anchor:o,onAnchorChange:i,children:n})};vr.displayName=Cn;var xr="PopperAnchor",yr=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,a=gr(xr,n),r=d.useRef(null),s=re.useComposedRefs(t,r);return d.useEffect(()=>{a.onAnchorChange((o==null?void 0:o.current)||r.current)}),o?null:v.jsxRuntimeExports.jsx(te.div,{...i,ref:s})});yr.displayName=xr;var Tn="PopperContent",[ll,cl]=mr(Tn),Er=d.forwardRef((e,t)=>{var w,D,B,_,H,$;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:r=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:E,...h}=e,x=gr(Tn,n),[y,S]=d.useState(null),b=re.useComposedRefs(t,q=>S(q)),[C,A]=d.useState(null),I=il(C),R=(I==null?void 0:I.width)??0,W=(I==null?void 0:I.height)??0,k=o+(a!=="center"?"-"+a:""),V=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},G=Array.isArray(c)?c:[c],z=G.length>0,F={padding:V,boundary:G.filter(dl),altBoundary:z},{refs:Y,floatingStyles:X,placement:K,isPositioned:J,middlewareData:ee}=Ie.useFloating({strategy:"fixed",placement:k,whileElementsMounted:(...q)=>Si.autoUpdate(...q,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[Ie.offset({mainAxis:i+W,alignmentAxis:r}),l&&Ie.shift({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Ie.limitShift():void 0,...F}),l&&Ie.flip({...F}),Ie.size({...F,apply:({elements:q,rects:j,availableWidth:O,availableHeight:ne})=>{const{width:le,height:Q}=j.reference,Z=q.floating.style;Z.setProperty("--radix-popper-available-width",`${O}px`),Z.setProperty("--radix-popper-available-height",`${ne}px`),Z.setProperty("--radix-popper-anchor-width",`${le}px`),Z.setProperty("--radix-popper-anchor-height",`${Q}px`)}}),C&&Ie.arrow({element:C,padding:s}),fl({arrowWidth:R,arrowHeight:W}),p&&Ie.hide({strategy:"referenceHidden",...F})]}),[ae,me]=wr(K),se=ke(E);fe(()=>{J&&(se==null||se())},[J,se]);const de=(w=ee.arrow)==null?void 0:w.x,T=(D=ee.arrow)==null?void 0:D.y,M=((B=ee.arrow)==null?void 0:B.centerOffset)!==0,[L,N]=d.useState();return fe(()=>{y&&N(window.getComputedStyle(y).zIndex)},[y]),v.jsxRuntimeExports.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:J?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(_=ee.transformOrigin)==null?void 0:_.x,(H=ee.transformOrigin)==null?void 0:H.y].join(" "),...(($=ee.hide)==null?void 0:$.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsxRuntimeExports.jsx(ll,{scope:n,placedSide:ae,onArrowChange:A,arrowX:de,arrowY:T,shouldHideArrow:M,children:v.jsxRuntimeExports.jsx(te.div,{"data-side":ae,"data-align":me,...h,ref:b,style:{...h.style,animation:J?void 0:"none"}})})})});Er.displayName=Tn;var Sr="PopperArrow",ul={top:"bottom",right:"left",bottom:"top",left:"right"},br=d.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,a=cl(Sr,o),r=ul[a.placedSide];return v.jsxRuntimeExports.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[r]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:v.jsxRuntimeExports.jsx(sl,{...i,ref:n,style:{...i.style,display:"block"}})})});br.displayName=Sr;function dl(e){return e!==null}var fl=e=>({name:"transformOrigin",options:e,fn(t){var x,y,S;const{placement:n,rects:o,middlewareData:i}=t,r=((x=i.arrow)==null?void 0:x.centerOffset)!==0,s=r?0:e.arrowWidth,l=r?0:e.arrowHeight,[c,u]=wr(n),f={start:"0%",center:"50%",end:"100%"}[u],p=(((y=i.arrow)==null?void 0:y.x)??0)+s/2,g=(((S=i.arrow)==null?void 0:S.y)??0)+l/2;let E="",h="";return c==="bottom"?(E=r?f:`${p}px`,h=`${-l}px`):c==="top"?(E=r?f:`${p}px`,h=`${o.floating.height+l}px`):c==="right"?(E=`${-l}px`,h=r?f:`${g}px`):c==="left"&&(E=`${o.floating.width+l}px`,h=r?f:`${g}px`),{data:{x:E,y:h}}}});function wr(e){const[t,n="center"]=e.split("-");return[t,n]}var Rr=vr,Cr=yr,Pr=Er,Tr=br,pl="Portal",kt=d.forwardRef((e,t)=>{var s;const{container:n,...o}=e,[i,a]=d.useState(!1);fe(()=>a(!0),[]);const r=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return r?Wo.createPortal(v.jsxRuntimeExports.jsx(te.div,{...o,ref:t}),r):null});kt.displayName=pl;function hl(e,t){return d.useReducer((n,o)=>t[n][o]??n,e)}var ht=e=>{const{present:t,children:n}=e,o=ml(t),i=typeof n=="function"?n({present:o.isPresent}):d.Children.only(n),a=re.useComposedRefs(o.ref,gl(i));return typeof n=="function"||o.isPresent?d.cloneElement(i,{ref:a}):null};ht.displayName="Presence";function ml(e){const[t,n]=d.useState(),o=d.useRef(null),i=d.useRef(e),a=d.useRef("none"),r=e?"mounted":"unmounted",[s,l]=hl(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const c=vt(o.current);a.current=s==="mounted"?c:"none"},[s]),fe(()=>{const c=o.current,u=i.current;if(u!==e){const p=a.current,g=vt(c);e?l("MOUNT"):g==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),fe(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=g=>{const h=vt(o.current).includes(g.animationName);if(g.target===t&&h&&(l("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=g=>{g.target===t&&(a.current=vt(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:d.useCallback(c=>{o.current=c?getComputedStyle(c):null,n(c)},[])}}function vt(e){return(e==null?void 0:e.animationName)||"none"}function gl(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qe=new WeakMap,xt=new WeakMap,yt={},nn=0,Dr=function(e){return e&&(e.host||Dr(e.parentNode))},xl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Dr(n);return o&&e.contains(o)?o:null}).filter(function(n){return!!n})},yl=function(e,t,n,o){var i=xl(t,Array.isArray(e)?e:[e]);yt[n]||(yt[n]=new WeakMap);var a=yt[n],r=[],s=new Set,l=new Set(i),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};i.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else try{var g=p.getAttribute(o),E=g!==null&&g!=="false",h=(qe.get(p)||0)+1,x=(a.get(p)||0)+1;qe.set(p,h),a.set(p,x),r.push(p),h===1&&E&&xt.set(p,!0),x===1&&p.setAttribute(n,"true"),E||p.setAttribute(o,"true")}catch{}})};return u(t),s.clear(),nn++,function(){r.forEach(function(f){var p=qe.get(f)-1,g=a.get(f)-1;qe.set(f,p),a.set(f,g),p||(xt.has(f)||f.removeAttribute(o),xt.delete(f)),g||f.removeAttribute(n)}),nn--,nn||(qe=new WeakMap,qe=new WeakMap,xt=new WeakMap,yt={})}},Dn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=vl(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),yl(o,i,n,"aria-hidden")):function(){return null}},Re=function(){return Re=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Re.apply(this,arguments)};function jr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n}function El(e,t,n){if(n||arguments.length===2)for(var o=0,i=t.length,a;o<i;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var Rt="right-scroll-bar-position",Ct="width-before-scroll-bar",Sl="with-scroll-bars-hidden",bl="--removed-body-scroll-bar-size";function on(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wl(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o&&(n.value=o,n.callback(o,i))}}}})[0];return n.callback=t,n.facade}var Rl=typeof window<"u"?d.useLayoutEffect:d.useEffect,Do=new WeakMap;function Cl(e,t){var n=wl(null,function(o){return e.forEach(function(i){return on(i,o)})});return Rl(function(){var o=Do.get(n);if(o){var i=new Set(o),a=new Set(e),r=n.current;i.forEach(function(s){a.has(s)||on(s,null)}),a.forEach(function(s){i.has(s)||on(s,r)})}Do.set(n,e)},[e]),n}function Pl(e){return e}function Tl(e,t){t===void 0&&(t=Pl);var n=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var r=t(a,o);return n.push(r),function(){n=n.filter(function(s){return s!==r})}},assignSyncMedium:function(a){for(o=!0;n.length;){var r=n;n=[],r.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){o=!0;var r=[];if(n.length){var s=n;n=[],s.forEach(a),r=n}var l=function(){var u=r;r=[],u.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){r.push(u),c()},filter:function(u){return r=r.filter(u),n}}}};return i}function Dl(e){e===void 0&&(e={});var t=Tl(null);return t.options=Re({async:!0,ssr:!1},e),t}var Ar=function(e){var t=e.sideCar,n=jr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return d.createElement(o,Re({},n))};Ar.isSideCarExport=!0;function jl(e,t){return e.useMedium(t),Ar}var Ir=Dl(),rn=function(){},Ot=d.forwardRef(function(e,t){var n=d.useRef(null),o=d.useState({onScrollCapture:rn,onWheelCapture:rn,onTouchMoveCapture:rn}),i=o[0],a=o[1],r=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,g=e.noRelative,E=e.noIsolation,h=e.inert,x=e.allowPinchZoom,y=e.as,S=y===void 0?"div":y,b=e.gapMode,C=jr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=p,I=Cl([n,t]),R=Re(Re({},C),i);return d.createElement(d.Fragment,null,u&&d.createElement(A,{sideCar:Ir,removeScrollBar:c,shards:f,noRelative:g,noIsolation:E,inert:h,setCallbacks:a,allowPinchZoom:!!x,lockRef:n,gapMode:b}),r?d.cloneElement(d.Children.only(s),Re(Re({},R),{ref:I})):d.createElement(S,Re({},R,{className:l,ref:I}),s))});Ot.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ot.classNames={fullWidth:Ct,zeroRight:Rt};var Al=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Il(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Al();return t&&e.setAttribute("nonce",t),e}function Ml(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Nl(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ll=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Il())&&(Ml(t,n),Nl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kl=function(){var e=Ll();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mr=function(){var e=kl(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},Ol={left:0,top:0,right:0,gap:0},sn=function(e){return parseInt(e||"",10)||0},_l=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[sn(n),sn(o),sn(i)]},zl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ol;var t=_l(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Bl=Mr(),et="data-scroll-locked",Vl=function(e,t,n,o){var i=e.left,a=e.top,r=e.right,s=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(Sl,` {
3
+ overflow: hidden `).concat(o,`;
4
+ padding-right: `).concat(s,"px ").concat(o,`;
5
+ }
6
+ body[`).concat(et,`] {
7
+ overflow: hidden `).concat(o,`;
8
+ overscroll-behavior: contain;
9
+ `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
10
+ padding-left: `.concat(i,`px;
11
+ padding-top: `).concat(a,`px;
12
+ padding-right: `).concat(r,`px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: `).concat(s,"px ").concat(o,`;
16
+ `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
17
+ }
18
+
19
+ .`).concat(Rt,` {
20
+ right: `).concat(s,"px ").concat(o,`;
21
+ }
22
+
23
+ .`).concat(Ct,` {
24
+ margin-right: `).concat(s,"px ").concat(o,`;
25
+ }
26
+
27
+ .`).concat(Rt," .").concat(Rt,` {
28
+ right: 0 `).concat(o,`;
29
+ }
30
+
31
+ .`).concat(Ct," .").concat(Ct,` {
32
+ margin-right: 0 `).concat(o,`;
33
+ }
34
+
35
+ body[`).concat(et,`] {
36
+ `).concat(bl,": ").concat(s,`px;
37
+ }
38
+ `)},jo=function(){var e=parseInt(document.body.getAttribute(et)||"0",10);return isFinite(e)?e:0},Fl=function(){d.useEffect(function(){return document.body.setAttribute(et,(jo()+1).toString()),function(){var e=jo()-1;e<=0?document.body.removeAttribute(et):document.body.setAttribute(et,e.toString())}},[])},$l=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;Fl();var a=d.useMemo(function(){return zl(i)},[i]);return d.createElement(Bl,{styles:Vl(a,!t,i,n?"":"!important")})},hn=!1;if(typeof window<"u")try{var Et=Object.defineProperty({},"passive",{get:function(){return hn=!0,!0}});window.addEventListener("test",Et,Et),window.removeEventListener("test",Et,Et)}catch{hn=!1}var Xe=hn?{passive:!1}:!1,Wl=function(e){return e.tagName==="TEXTAREA"},Nr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Wl(e)&&n[t]==="visible")},Hl=function(e){return Nr(e,"overflowY")},Ul=function(e){return Nr(e,"overflowX")},Ao=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=Lr(e,o);if(i){var a=kr(e,o),r=a[1],s=a[2];if(r>s)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Gl=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Kl=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Lr=function(e,t){return e==="v"?Hl(t):Ul(t)},kr=function(e,t){return e==="v"?Gl(t):Kl(t)},ql=function(e,t){return e==="h"&&t==="rtl"?-1:1},Xl=function(e,t,n,o,i){var a=ql(e,window.getComputedStyle(t).direction),r=a*o,s=n.target,l=t.contains(s),c=!1,u=r>0,f=0,p=0;do{if(!s)break;var g=kr(e,s),E=g[0],h=g[1],x=g[2],y=h-x-a*E;(E||y)&&Lr(e,s)&&(f+=y,p+=E);var S=s.parentNode;s=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&Math.abs(f)<1||!u&&Math.abs(p)<1)&&(c=!0),c},St=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Io=function(e){return[e.deltaX,e.deltaY]},Mo=function(e){return e&&"current"in e?e.current:e},Yl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Zl=function(e){return`
39
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
+ `)},Jl=0,Ye=[];function Ql(e){var t=d.useRef([]),n=d.useRef([0,0]),o=d.useRef(),i=d.useState(Jl++)[0],a=d.useState(Mr)[0],r=d.useRef(e);d.useEffect(function(){r.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=El([e.lockRef.current],(e.shards||[]).map(Mo),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!r.current.allowPinchZoom;var y=St(h),S=n.current,b="deltaX"in h?h.deltaX:S[0]-y[0],C="deltaY"in h?h.deltaY:S[1]-y[1],A,I=h.target,R=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in h&&R==="h"&&I.type==="range")return!1;var W=Ao(R,I);if(!W)return!0;if(W?A=R:(A=R==="v"?"h":"v",W=Ao(R,I)),!W)return!1;if(!o.current&&"changedTouches"in h&&(b||C)&&(o.current=A),!A)return!0;var k=o.current||A;return Xl(k,x,h,k==="h"?b:C)},[]),l=d.useCallback(function(h){var x=h;if(!(!Ye.length||Ye[Ye.length-1]!==a)){var y="deltaY"in x?Io(x):St(x),S=t.current.filter(function(A){return A.name===x.type&&(A.target===x.target||x.target===A.shadowParent)&&Yl(A.delta,y)})[0];if(S&&S.should){x.cancelable&&x.preventDefault();return}if(!S){var b=(r.current.shards||[]).map(Mo).filter(Boolean).filter(function(A){return A.contains(x.target)}),C=b.length>0?s(x,b[0]):!r.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),c=d.useCallback(function(h,x,y,S){var b={name:h,delta:x,target:y,should:S,shadowParent:ec(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),u=d.useCallback(function(h){n.current=St(h),o.current=void 0},[]),f=d.useCallback(function(h){c(h.type,Io(h),h.target,s(h,e.lockRef.current))},[]),p=d.useCallback(function(h){c(h.type,St(h),h.target,s(h,e.lockRef.current))},[]);d.useEffect(function(){return Ye.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Xe),document.addEventListener("touchmove",l,Xe),document.addEventListener("touchstart",u,Xe),function(){Ye=Ye.filter(function(h){return h!==a}),document.removeEventListener("wheel",l,Xe),document.removeEventListener("touchmove",l,Xe),document.removeEventListener("touchstart",u,Xe)}},[]);var g=e.removeScrollBar,E=e.inert;return d.createElement(d.Fragment,null,E?d.createElement(a,{styles:Zl(i)}):null,g?d.createElement($l,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ec(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const tc=jl(Ir,Ql);var _t=d.forwardRef(function(e,t){return d.createElement(Ot,Re({},e,{ref:t,sideCar:tc}))});_t.classNames=Ot.classNames;const nc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),oc=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),No=e=>{const t=oc(e);return t.charAt(0).toUpperCase()+t.slice(1)},Or=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),rc=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var sc={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const ic=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:a,iconNode:r,...s},l)=>P.createElement("svg",{ref:l,...sc,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Or("lucide",i),...!a&&!rc(s)&&{"aria-hidden":"true"},...s},[...r.map(([c,u])=>P.createElement(c,u)),...Array.isArray(a)?a:[a]]));const mt=(e,t)=>{const n=P.forwardRef(({className:o,...i},a)=>P.createElement(ic,{ref:a,iconNode:t,className:Or(`lucide-${nc(No(e))}`,`lucide-${e}`,o),...i}));return n.displayName=No(e),n};const ac=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_r=mt("check",ac);const lc=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],jn=mt("chevron-down",lc);const cc=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],uc=mt("chevron-up",cc);const dc=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fc=mt("x",dc),zt=P.createContext(null);zt.displayName="PanelGroupContext";const ce={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},An=10,We=P.useLayoutEffect,Lo=d.useId,pc=typeof Lo=="function"?Lo:()=>null;let hc=0;function In(e=null){const t=pc(),n=P.useRef(e||t||null);return n.current===null&&(n.current=""+hc++),e??n.current}function zr({children:e,className:t="",collapsedSize:n,collapsible:o,defaultSize:i,forwardedRef:a,id:r,maxSize:s,minSize:l,onCollapse:c,onExpand:u,onResize:f,order:p,style:g,tagName:E="div",...h}){const x=P.useContext(zt);if(x===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:y,expandPanel:S,getPanelSize:b,getPanelStyle:C,groupId:A,isPanelCollapsed:I,reevaluatePanelConstraints:R,registerPanel:W,resizePanel:k,unregisterPanel:V}=x,G=In(r),z=P.useRef({callbacks:{onCollapse:c,onExpand:u,onResize:f},constraints:{collapsedSize:n,collapsible:o,defaultSize:i,maxSize:s,minSize:l},id:G,idIsFromProps:r!==void 0,order:p});P.useRef({didLogMissingDefaultSizeWarning:!1}),We(()=>{const{callbacks:Y,constraints:X}=z.current,K={...X};z.current.id=G,z.current.idIsFromProps=r!==void 0,z.current.order=p,Y.onCollapse=c,Y.onExpand=u,Y.onResize=f,X.collapsedSize=n,X.collapsible=o,X.defaultSize=i,X.maxSize=s,X.minSize=l,(K.collapsedSize!==X.collapsedSize||K.collapsible!==X.collapsible||K.maxSize!==X.maxSize||K.minSize!==X.minSize)&&R(z.current,K)}),We(()=>{const Y=z.current;return W(Y),()=>{V(Y)}},[p,G,W,V]),P.useImperativeHandle(a,()=>({collapse:()=>{y(z.current)},expand:Y=>{S(z.current,Y)},getId(){return G},getSize(){return b(z.current)},isCollapsed(){return I(z.current)},isExpanded(){return!I(z.current)},resize:Y=>{k(z.current,Y)}}),[y,S,b,I,G,k]);const F=C(z.current,i);return P.createElement(E,{...h,children:e,className:t,id:G,style:{...F,...g},[ce.groupId]:A,[ce.panel]:"",[ce.panelCollapsible]:o||void 0,[ce.panelId]:G,[ce.panelSize]:parseFloat(""+F.flexGrow).toFixed(1)})}const Br=P.forwardRef((e,t)=>P.createElement(zr,{...e,forwardedRef:t}));zr.displayName="Panel";Br.displayName="forwardRef(Panel)";let mn=null,Pt=-1,Ne=null;function mc(e,t){if(t){const n=(t&Hr)!==0,o=(t&Ur)!==0,i=(t&Gr)!==0,a=(t&Kr)!==0;if(n)return i?"se-resize":a?"ne-resize":"e-resize";if(o)return i?"sw-resize":a?"nw-resize":"w-resize";if(i)return"s-resize";if(a)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function gc(){Ne!==null&&(document.head.removeChild(Ne),mn=null,Ne=null,Pt=-1)}function an(e,t){var n,o;const i=mc(e,t);if(mn!==i){if(mn=i,Ne===null&&(Ne=document.createElement("style"),document.head.appendChild(Ne)),Pt>=0){var a;(a=Ne.sheet)===null||a===void 0||a.removeRule(Pt)}Pt=(n=(o=Ne.sheet)===null||o===void 0?void 0:o.insertRule(`*{cursor: ${i} !important;}`))!==null&&n!==void 0?n:-1}}function Vr(e){return e.type==="keydown"}function Fr(e){return e.type.startsWith("pointer")}function $r(e){return e.type.startsWith("mouse")}function Bt(e){if(Fr(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if($r(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function vc(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function xc(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function yc(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:_o(e),b:_o(t)};let o;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),o=e;U(o,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Oo(ko(n.a)),b:Oo(ko(n.b))};if(i.a===i.b){const a=o.childNodes,r={a:n.a.at(-1),b:n.b.at(-1)};let s=a.length;for(;s--;){const l=a[s];if(l===r.a)return 1;if(l===r.b)return-1}}return Math.sign(i.a-i.b)}const Ec=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Sc(e){var t;const n=getComputedStyle((t=Wr(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function bc(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Sc(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Ec.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function ko(e){let t=e.length;for(;t--;){const n=e[t];if(U(n,"Missing node"),bc(n))return n}return null}function Oo(e){return e&&Number(getComputedStyle(e).zIndex)||0}function _o(e){const t=[];for(;e;)t.push(e),e=Wr(e);return t}function Wr(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const Hr=1,Ur=2,Gr=4,Kr=8,wc=vc()==="coarse";let Se=[],tt=!1,Le=new Map,Vt=new Map;const dt=new Set;function Rc(e,t,n,o,i){var a;const{ownerDocument:r}=t,s={direction:n,element:t,hitAreaMargins:o,setResizeHandlerState:i},l=(a=Le.get(r))!==null&&a!==void 0?a:0;return Le.set(r,l+1),dt.add(s),Dt(),function(){var u;Vt.delete(e),dt.delete(s);const f=(u=Le.get(r))!==null&&u!==void 0?u:1;if(Le.set(r,f-1),Dt(),f===1&&Le.delete(r),Se.includes(s)){const p=Se.indexOf(s);p>=0&&Se.splice(p,1),Nn(),i("up",!0,null)}}}function Cc(e){const{target:t}=e,{x:n,y:o}=Bt(e);tt=!0,Mn({target:t,x:n,y:o}),Dt(),Se.length>0&&(jt("down",e),e.preventDefault(),qr(t)||e.stopImmediatePropagation())}function ln(e){const{x:t,y:n}=Bt(e);if(tt&&e.buttons===0&&(tt=!1,jt("up",e)),!tt){const{target:o}=e;Mn({target:o,x:t,y:n})}jt("move",e),Nn(),Se.length>0&&e.preventDefault()}function cn(e){const{target:t}=e,{x:n,y:o}=Bt(e);Vt.clear(),tt=!1,Se.length>0&&(e.preventDefault(),qr(t)||e.stopImmediatePropagation()),jt("up",e),Mn({target:t,x:n,y:o}),Nn(),Dt()}function qr(e){let t=e;for(;t;){if(t.hasAttribute(ce.resizeHandle))return!0;t=t.parentElement}return!1}function Mn({target:e,x:t,y:n}){Se.splice(0);let o=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(o=e),dt.forEach(i=>{const{element:a,hitAreaMargins:r}=i,s=a.getBoundingClientRect(),{bottom:l,left:c,right:u,top:f}=s,p=wc?r.coarse:r.fine;if(t>=c-p&&t<=u+p&&n>=f-p&&n<=l+p){if(o!==null&&document.contains(o)&&a!==o&&!a.contains(o)&&!o.contains(a)&&yc(o,a)>0){let E=o,h=!1;for(;E&&!E.contains(a);){if(xc(E.getBoundingClientRect(),s)){h=!0;break}E=E.parentElement}if(h)return}Se.push(i)}})}function un(e,t){Vt.set(e,t)}function Nn(){let e=!1,t=!1;Se.forEach(o=>{const{direction:i}=o;i==="horizontal"?e=!0:t=!0});let n=0;Vt.forEach(o=>{n|=o}),e&&t?an("intersection",n):e?an("horizontal",n):t?an("vertical",n):gc()}let dn=new AbortController;function Dt(){dn.abort(),dn=new AbortController;const e={capture:!0,signal:dn.signal};dt.size&&(tt?(Se.length>0&&Le.forEach((t,n)=>{const{body:o}=n;t>0&&(o.addEventListener("contextmenu",cn,e),o.addEventListener("pointerleave",ln,e),o.addEventListener("pointermove",ln,e))}),Le.forEach((t,n)=>{const{body:o}=n;o.addEventListener("pointerup",cn,e),o.addEventListener("pointercancel",cn,e)})):Le.forEach((t,n)=>{const{body:o}=n;t>0&&(o.addEventListener("pointerdown",Cc,e),o.addEventListener("pointermove",ln,e))}))}function jt(e,t){dt.forEach(n=>{const{setResizeHandlerState:o}=n,i=Se.includes(n);o(e,i,t)})}function Pc(){const[e,t]=P.useState(0);return P.useCallback(()=>t(n=>n+1),[])}function U(e,t){if(!e)throw Error(t)}function He(e,t,n=An){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function De(e,t,n=An){return He(e,t,n)===0}function ve(e,t,n){return He(e,t,n)===0}function Tc(e,t,n){if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++){const i=e[o],a=t[o];if(!ve(i,a,n))return!1}return!0}function Qe({panelConstraints:e,panelIndex:t,size:n}){const o=e[t];U(o!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,maxSize:r=100,minSize:s=0}=o;if(He(n,s)<0)if(a){const l=(i+s)/2;He(n,l)<0?n=i:n=s}else n=s;return n=Math.min(r,n),n=parseFloat(n.toFixed(An)),n}function st({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:o,prevLayout:i,trigger:a}){if(ve(e,0))return t;const r=[...t],[s,l]=o;U(s!=null,"Invalid first pivot index"),U(l!=null,"Invalid second pivot index");let c=0;if(a==="keyboard"){{const f=e<0?l:s,p=n[f];U(p,`Panel constraints not found for index ${f}`);const{collapsedSize:g=0,collapsible:E,minSize:h=0}=p;if(E){const x=t[f];if(U(x!=null,`Previous layout not found for panel index ${f}`),ve(x,g)){const y=h-x;He(y,Math.abs(e))>0&&(e=e<0?0-y:y)}}}{const f=e<0?s:l,p=n[f];U(p,`No panel constraints found for index ${f}`);const{collapsedSize:g=0,collapsible:E,minSize:h=0}=p;if(E){const x=t[f];if(U(x!=null,`Previous layout not found for panel index ${f}`),ve(x,h)){const y=x-g;He(y,Math.abs(e))>0&&(e=e<0?0-y:y)}}}}{const f=e<0?1:-1;let p=e<0?l:s,g=0;for(;;){const h=t[p];U(h!=null,`Previous layout not found for panel index ${p}`);const y=Qe({panelConstraints:n,panelIndex:p,size:100})-h;if(g+=y,p+=f,p<0||p>=n.length)break}const E=Math.min(Math.abs(e),Math.abs(g));e=e<0?0-E:E}{let p=e<0?s:l;for(;p>=0&&p<n.length;){const g=Math.abs(e)-Math.abs(c),E=t[p];U(E!=null,`Previous layout not found for panel index ${p}`);const h=E-g,x=Qe({panelConstraints:n,panelIndex:p,size:h});if(!ve(E,x)&&(c+=E-x,r[p]=x,c.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?p--:p++}}if(Tc(i,r))return i;{const f=e<0?l:s,p=t[f];U(p!=null,`Previous layout not found for panel index ${f}`);const g=p+c,E=Qe({panelConstraints:n,panelIndex:f,size:g});if(r[f]=E,!ve(E,g)){let h=g-E,y=e<0?l:s;for(;y>=0&&y<n.length;){const S=r[y];U(S!=null,`Previous layout not found for panel index ${y}`);const b=S+h,C=Qe({panelConstraints:n,panelIndex:y,size:b});if(ve(S,C)||(h-=C-S,r[y]=C),ve(h,0))break;e>0?y--:y++}}}const u=r.reduce((f,p)=>p+f,0);return ve(u,100)?r:i}function Dc({layout:e,panelsArray:t,pivotIndices:n}){let o=0,i=100,a=0,r=0;const s=n[0];U(s!=null,"No pivot index found"),t.forEach((f,p)=>{const{constraints:g}=f,{maxSize:E=100,minSize:h=0}=g;p===s?(o=h,i=E):(a+=h,r+=E)});const l=Math.min(i,100-a),c=Math.max(o,100-r),u=e[s];return{valueMax:l,valueMin:c,valueNow:u}}function ft(e,t=document){return Array.from(t.querySelectorAll(`[${ce.resizeHandleId}][data-panel-group-id="${e}"]`))}function Xr(e,t,n=document){const i=ft(e,n).findIndex(a=>a.getAttribute(ce.resizeHandleId)===t);return i??null}function Yr(e,t,n){const o=Xr(e,t,n);return o!=null?[o,o+1]:[-1,-1]}function jc(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Zr(e,t=document){if(jc(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function Ft(e,t=document){const n=t.querySelector(`[${ce.resizeHandleId}="${e}"]`);return n||null}function Ac(e,t,n,o=document){var i,a,r,s;const l=Ft(t,o),c=ft(e,o),u=l?c.indexOf(l):-1,f=(i=(a=n[u])===null||a===void 0?void 0:a.id)!==null&&i!==void 0?i:null,p=(r=(s=n[u+1])===null||s===void 0?void 0:s.id)!==null&&r!==void 0?r:null;return[f,p]}function Ic({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:o,panelDataArray:i,panelGroupElement:a,setLayout:r}){P.useRef({didWarnAboutMissingResizeHandle:!1}),We(()=>{if(!a)return;const s=ft(n,a);for(let l=0;l<i.length-1;l++){const{valueMax:c,valueMin:u,valueNow:f}=Dc({layout:o,panelsArray:i,pivotIndices:[l,l+1]}),p=s[l];if(p!=null){const g=i[l];U(g,`No panel data found for index "${l}"`),p.setAttribute("aria-controls",g.id),p.setAttribute("aria-valuemax",""+Math.round(c)),p.setAttribute("aria-valuemin",""+Math.round(u)),p.setAttribute("aria-valuenow",f!=null?""+Math.round(f):"")}}return()=>{s.forEach((l,c)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[n,o,i,a]),P.useEffect(()=>{if(!a)return;const s=t.current;U(s,"Eager values not found");const{panelDataArray:l}=s,c=Zr(n,a);U(c!=null,`No group found for id "${n}"`);const u=ft(n,a);U(u,`No resize handles found for group id "${n}"`);const f=u.map(p=>{const g=p.getAttribute(ce.resizeHandleId);U(g,"Resize handle element has no handle id attribute");const[E,h]=Ac(n,g,l,a);if(E==null||h==null)return()=>{};const x=y=>{if(!y.defaultPrevented)switch(y.key){case"Enter":{y.preventDefault();const S=l.findIndex(b=>b.id===E);if(S>=0){const b=l[S];U(b,`No panel data found for index ${S}`);const C=o[S],{collapsedSize:A=0,collapsible:I,minSize:R=0}=b.constraints;if(C!=null&&I){const W=st({delta:ve(C,A)?R-A:A-C,initialLayout:o,panelConstraints:l.map(k=>k.constraints),pivotIndices:Yr(n,g,a),prevLayout:o,trigger:"keyboard"});o!==W&&r(W)}}break}}};return p.addEventListener("keydown",x),()=>{p.removeEventListener("keydown",x)}});return()=>{f.forEach(p=>p())}},[a,e,t,n,o,i,r])}function zo(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Jr(e,t){const n=e==="horizontal",{x:o,y:i}=Bt(t);return n?o:i}function Mc(e,t,n,o,i){const a=n==="horizontal",r=Ft(t,i);U(r,`No resize handle element found for id "${t}"`);const s=r.getAttribute(ce.groupId);U(s,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=o;const c=Jr(n,e),u=Zr(s,i);U(u,`No group element found for id "${s}"`);const f=u.getBoundingClientRect(),p=a?f.width:f.height;return(c-l)/p*100}function Nc(e,t,n,o,i,a){if(Vr(e)){const r=n==="horizontal";let s=0;e.shiftKey?s=100:i!=null?s=i:s=10;let l=0;switch(e.key){case"ArrowDown":l=r?0:s;break;case"ArrowLeft":l=r?-s:0;break;case"ArrowRight":l=r?s:0;break;case"ArrowUp":l=r?0:-s;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return o==null?0:Mc(e,t,n,o,a)}function Lc({panelDataArray:e}){const t=Array(e.length),n=e.map(a=>a.constraints);let o=0,i=100;for(let a=0;a<e.length;a++){const r=n[a];U(r,`Panel constraints not found for index ${a}`);const{defaultSize:s}=r;s!=null&&(o++,t[a]=s,i-=s)}for(let a=0;a<e.length;a++){const r=n[a];U(r,`Panel constraints not found for index ${a}`);const{defaultSize:s}=r;if(s!=null)continue;const l=e.length-o,c=i/l;o++,t[a]=c,i-=c}return t}function Ze(e,t,n){t.forEach((o,i)=>{const a=e[i];U(a,`Panel data not found for index ${i}`);const{callbacks:r,constraints:s,id:l}=a,{collapsedSize:c=0,collapsible:u}=s,f=n[l];if(f==null||o!==f){n[l]=o;const{onCollapse:p,onExpand:g,onResize:E}=r;E&&E(o,f),u&&(p||g)&&(g&&(f==null||De(f,c))&&!De(o,c)&&g(),p&&(f==null||!De(f,c))&&De(o,c)&&p())}})}function bt(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function kc({defaultSize:e,dragState:t,layout:n,panelData:o,panelIndex:i,precision:a=3}){const r=n[i];let s;return r==null?s=e!=null?e.toPrecision(a):"1":o.length===1?s="1":s=r.toPrecision(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function Oc(e,t=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...i)},t)}}function Bo(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch{e.getItem=()=>null,e.setItem=()=>{}}}function Qr(e){return`react-resizable-panels:${e}`}function es(e){return e.map(t=>{const{constraints:n,id:o,idIsFromProps:i,order:a}=t;return i?o:a?`${a}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function ts(e,t){try{const n=Qr(e),o=t.getItem(n);if(o){const i=JSON.parse(o);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function _c(e,t,n){var o,i;const a=(o=ts(e,n))!==null&&o!==void 0?o:{},r=es(t);return(i=a[r])!==null&&i!==void 0?i:null}function zc(e,t,n,o,i){var a;const r=Qr(e),s=es(t),l=(a=ts(e,i))!==null&&a!==void 0?a:{};l[s]={expandToSizes:Object.fromEntries(n.entries()),layout:o};try{i.setItem(r,JSON.stringify(l))}catch{}}function Vo({layout:e,panelConstraints:t}){const n=[...e],o=n.reduce((a,r)=>a+r,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(a=>`${a}%`).join(", ")}`);if(!ve(o,100)&&n.length>0)for(let a=0;a<t.length;a++){const r=n[a];U(r!=null,`No layout data found for index ${a}`);const s=100/o*r;n[a]=s}let i=0;for(let a=0;a<t.length;a++){const r=n[a];U(r!=null,`No layout data found for index ${a}`);const s=Qe({panelConstraints:t,panelIndex:a,size:r});r!=s&&(i+=r-s,n[a]=s)}if(!ve(i,0))for(let a=0;a<t.length;a++){const r=n[a];U(r!=null,`No layout data found for index ${a}`);const s=r+i,l=Qe({panelConstraints:t,panelIndex:a,size:s});if(r!==l&&(i-=l-r,n[a]=l,ve(i,0)))break}return n}const Bc=100,it={getItem:e=>(Bo(it),it.getItem(e)),setItem:(e,t)=>{Bo(it),it.setItem(e,t)}},Fo={};function ns({autoSaveId:e=null,children:t,className:n="",direction:o,forwardedRef:i,id:a=null,onLayout:r=null,keyboardResizeBy:s=null,storage:l=it,style:c,tagName:u="div",...f}){const p=In(a),g=P.useRef(null),[E,h]=P.useState(null),[x,y]=P.useState([]),S=Pc(),b=P.useRef({}),C=P.useRef(new Map),A=P.useRef(0),I=P.useRef({autoSaveId:e,direction:o,dragState:E,id:p,keyboardResizeBy:s,onLayout:r,storage:l}),R=P.useRef({layout:x,panelDataArray:[],panelDataArrayChanged:!1});P.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),P.useImperativeHandle(i,()=>({getId:()=>I.current.id,getLayout:()=>{const{layout:T}=R.current;return T},setLayout:T=>{const{onLayout:M}=I.current,{layout:L,panelDataArray:N}=R.current,w=Vo({layout:T,panelConstraints:N.map(D=>D.constraints)});zo(L,w)||(y(w),R.current.layout=w,M&&M(w),Ze(N,w,b.current))}}),[]),We(()=>{I.current.autoSaveId=e,I.current.direction=o,I.current.dragState=E,I.current.id=p,I.current.onLayout=r,I.current.storage=l}),Ic({committedValuesRef:I,eagerValuesRef:R,groupId:p,layout:x,panelDataArray:R.current.panelDataArray,setLayout:y,panelGroupElement:g.current}),P.useEffect(()=>{const{panelDataArray:T}=R.current;if(e){if(x.length===0||x.length!==T.length)return;let M=Fo[e];M==null&&(M=Oc(zc,Bc),Fo[e]=M);const L=[...T],N=new Map(C.current);M(e,L,N,x,l)}},[e,x,l]),P.useEffect(()=>{});const W=P.useCallback(T=>{const{onLayout:M}=I.current,{layout:L,panelDataArray:N}=R.current;if(T.constraints.collapsible){const w=N.map(H=>H.constraints),{collapsedSize:D=0,panelSize:B,pivotIndices:_}=Ve(N,T,L);if(U(B!=null,`Panel size not found for panel "${T.id}"`),!De(B,D)){C.current.set(T.id,B);const $=Je(N,T)===N.length-1?B-D:D-B,q=st({delta:$,initialLayout:L,panelConstraints:w,pivotIndices:_,prevLayout:L,trigger:"imperative-api"});bt(L,q)||(y(q),R.current.layout=q,M&&M(q),Ze(N,q,b.current))}}},[]),k=P.useCallback((T,M)=>{const{onLayout:L}=I.current,{layout:N,panelDataArray:w}=R.current;if(T.constraints.collapsible){const D=w.map(j=>j.constraints),{collapsedSize:B=0,panelSize:_=0,minSize:H=0,pivotIndices:$}=Ve(w,T,N),q=M??H;if(De(_,B)){const j=C.current.get(T.id),O=j!=null&&j>=q?j:q,le=Je(w,T)===w.length-1?_-O:O-_,Q=st({delta:le,initialLayout:N,panelConstraints:D,pivotIndices:$,prevLayout:N,trigger:"imperative-api"});bt(N,Q)||(y(Q),R.current.layout=Q,L&&L(Q),Ze(w,Q,b.current))}}},[]),V=P.useCallback(T=>{const{layout:M,panelDataArray:L}=R.current,{panelSize:N}=Ve(L,T,M);return U(N!=null,`Panel size not found for panel "${T.id}"`),N},[]),G=P.useCallback((T,M)=>{const{panelDataArray:L}=R.current,N=Je(L,T);return kc({defaultSize:M,dragState:E,layout:x,panelData:L,panelIndex:N})},[E,x]),z=P.useCallback(T=>{const{layout:M,panelDataArray:L}=R.current,{collapsedSize:N=0,collapsible:w,panelSize:D}=Ve(L,T,M);return U(D!=null,`Panel size not found for panel "${T.id}"`),w===!0&&De(D,N)},[]),F=P.useCallback(T=>{const{layout:M,panelDataArray:L}=R.current,{collapsedSize:N=0,collapsible:w,panelSize:D}=Ve(L,T,M);return U(D!=null,`Panel size not found for panel "${T.id}"`),!w||He(D,N)>0},[]),Y=P.useCallback(T=>{const{panelDataArray:M}=R.current;M.push(T),M.sort((L,N)=>{const w=L.order,D=N.order;return w==null&&D==null?0:w==null?-1:D==null?1:w-D}),R.current.panelDataArrayChanged=!0,S()},[S]);We(()=>{if(R.current.panelDataArrayChanged){R.current.panelDataArrayChanged=!1;const{autoSaveId:T,onLayout:M,storage:L}=I.current,{layout:N,panelDataArray:w}=R.current;let D=null;if(T){const _=_c(T,w,L);_&&(C.current=new Map(Object.entries(_.expandToSizes)),D=_.layout)}D==null&&(D=Lc({panelDataArray:w}));const B=Vo({layout:D,panelConstraints:w.map(_=>_.constraints)});zo(N,B)||(y(B),R.current.layout=B,M&&M(B),Ze(w,B,b.current))}}),We(()=>{const T=R.current;return()=>{T.layout=[]}},[]);const X=P.useCallback(T=>{let M=!1;const L=g.current;return L&&window.getComputedStyle(L,null).getPropertyValue("direction")==="rtl"&&(M=!0),function(w){w.preventDefault();const D=g.current;if(!D)return()=>null;const{direction:B,dragState:_,id:H,keyboardResizeBy:$,onLayout:q}=I.current,{layout:j,panelDataArray:O}=R.current,{initialLayout:ne}=_??{},le=Yr(H,T,D);let Q=Nc(w,T,B,_,$,D);const Z=B==="horizontal";Z&&M&&(Q=-Q);const pe=O.map(Ce=>Ce.constraints),we=st({delta:Q,initialLayout:ne??j,panelConstraints:pe,pivotIndices:le,prevLayout:j,trigger:Vr(w)?"keyboard":"mouse-or-touch"}),ge=!bt(j,we);(Fr(w)||$r(w))&&A.current!=Q&&(A.current=Q,!ge&&Q!==0?Z?un(T,Q<0?Hr:Ur):un(T,Q<0?Gr:Kr):un(T,0)),ge&&(y(we),R.current.layout=we,q&&q(we),Ze(O,we,b.current))}},[]),K=P.useCallback((T,M)=>{const{onLayout:L}=I.current,{layout:N,panelDataArray:w}=R.current,D=w.map(j=>j.constraints),{panelSize:B,pivotIndices:_}=Ve(w,T,N);U(B!=null,`Panel size not found for panel "${T.id}"`);const $=Je(w,T)===w.length-1?B-M:M-B,q=st({delta:$,initialLayout:N,panelConstraints:D,pivotIndices:_,prevLayout:N,trigger:"imperative-api"});bt(N,q)||(y(q),R.current.layout=q,L&&L(q),Ze(w,q,b.current))},[]),J=P.useCallback((T,M)=>{const{layout:L,panelDataArray:N}=R.current,{collapsedSize:w=0,collapsible:D}=M,{collapsedSize:B=0,collapsible:_,maxSize:H=100,minSize:$=0}=T.constraints,{panelSize:q}=Ve(N,T,L);q!=null&&(D&&_&&De(q,w)?De(w,B)||K(T,B):q<$?K(T,$):q>H&&K(T,H))},[K]),ee=P.useCallback((T,M)=>{const{direction:L}=I.current,{layout:N}=R.current;if(!g.current)return;const w=Ft(T,g.current);U(w,`Drag handle element not found for id "${T}"`);const D=Jr(L,M);h({dragHandleId:T,dragHandleRect:w.getBoundingClientRect(),initialCursorPosition:D,initialLayout:N})},[]),ae=P.useCallback(()=>{h(null)},[]),me=P.useCallback(T=>{const{panelDataArray:M}=R.current,L=Je(M,T);L>=0&&(M.splice(L,1),delete b.current[T.id],R.current.panelDataArrayChanged=!0,S())},[S]),se=P.useMemo(()=>({collapsePanel:W,direction:o,dragState:E,expandPanel:k,getPanelSize:V,getPanelStyle:G,groupId:p,isPanelCollapsed:z,isPanelExpanded:F,reevaluatePanelConstraints:J,registerPanel:Y,registerResizeHandle:X,resizePanel:K,startDragging:ee,stopDragging:ae,unregisterPanel:me,panelGroupElement:g.current}),[W,E,o,k,V,G,p,z,F,J,Y,X,K,ee,ae,me]),de={display:"flex",flexDirection:o==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return P.createElement(zt.Provider,{value:se},P.createElement(u,{...f,children:t,className:n,id:a,ref:g,style:{...de,...c},[ce.group]:"",[ce.groupDirection]:o,[ce.groupId]:p}))}const os=P.forwardRef((e,t)=>P.createElement(ns,{...e,forwardedRef:t}));ns.displayName="PanelGroup";os.displayName="forwardRef(PanelGroup)";function Je(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Ve(e,t,n){const o=Je(e,t),a=o===e.length-1?[o-1,o]:[o,o+1],r=n[o];return{...t.constraints,panelSize:r,pivotIndices:a}}function Vc({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:o}){P.useEffect(()=>{if(e||n==null||o==null)return;const i=Ft(t,o);if(i==null)return;const a=r=>{if(!r.defaultPrevented)switch(r.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{r.preventDefault(),n(r);break}case"F6":{r.preventDefault();const s=i.getAttribute(ce.groupId);U(s,`No group element found for id "${s}"`);const l=ft(s,o),c=Xr(s,t,o);U(c!==null,`No resize element found for id "${t}"`);const u=r.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[u].focus();break}}};return i.addEventListener("keydown",a),()=>{i.removeEventListener("keydown",a)}},[o,e,t,n])}function rs({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:o,id:i,onBlur:a,onClick:r,onDragging:s,onFocus:l,onPointerDown:c,onPointerUp:u,style:f={},tabIndex:p=0,tagName:g="div",...E}){var h,x;const y=P.useRef(null),S=P.useRef({onClick:r,onDragging:s,onPointerDown:c,onPointerUp:u});P.useEffect(()=>{S.current.onClick=r,S.current.onDragging=s,S.current.onPointerDown=c,S.current.onPointerUp=u});const b=P.useContext(zt);if(b===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:C,groupId:A,registerResizeHandle:I,startDragging:R,stopDragging:W,panelGroupElement:k}=b,V=In(i),[G,z]=P.useState("inactive"),[F,Y]=P.useState(!1),[X,K]=P.useState(null),J=P.useRef({state:G});We(()=>{J.current.state=G}),P.useEffect(()=>{if(n)K(null);else{const se=I(V);K(()=>se)}},[n,V,I]);const ee=(h=o==null?void 0:o.coarse)!==null&&h!==void 0?h:15,ae=(x=o==null?void 0:o.fine)!==null&&x!==void 0?x:5;P.useEffect(()=>{if(n||X==null)return;const se=y.current;U(se,"Element ref not attached");let de=!1;return Rc(V,se,C,{coarse:ee,fine:ae},(M,L,N)=>{if(!L){z("inactive");return}switch(M){case"down":{z("drag"),de=!1,U(N,'Expected event to be defined for "down" action'),R(V,N);const{onDragging:w,onPointerDown:D}=S.current;w==null||w(!0),D==null||D();break}case"move":{const{state:w}=J.current;de=!0,w!=="drag"&&z("hover"),U(N,'Expected event to be defined for "move" action'),X(N);break}case"up":{z("hover"),W();const{onClick:w,onDragging:D,onPointerUp:B}=S.current;D==null||D(!1),B==null||B(),de||w==null||w();break}}})},[ee,C,n,ae,I,V,X,R,W]),Vc({disabled:n,handleId:V,resizeHandler:X,panelGroupElement:k});const me={touchAction:"none",userSelect:"none"};return P.createElement(g,{...E,children:e,className:t,id:i,onBlur:()=>{Y(!1),a==null||a()},onFocus:()=>{Y(!0),l==null||l()},ref:y,role:"separator",style:{...me,...f},tabIndex:p,[ce.groupDirection]:C,[ce.groupId]:A,[ce.resizeHandle]:"",[ce.resizeHandleActive]:G==="drag"?"pointer":F?"keyboard":void 0,[ce.resizeHandleEnabled]:!n,[ce.resizeHandleId]:V,[ce.resizeHandleState]:G})}rs.displayName="PanelResizeHandle";var $t="Dialog",[ss,Fc]=pt($t),[$c,be]=ss($t),is=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:r=!0}=e,s=d.useRef(null),l=d.useRef(null),[c,u]=Tt({prop:o,defaultProp:i??!1,onChange:a,caller:$t});return v.jsxRuntimeExports.jsx($c,{scope:t,triggerRef:s,contentRef:l,contentId:$e(),titleId:$e(),descriptionId:$e(),open:c,onOpenChange:u,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),modal:r,children:n})};is.displayName=$t;var as="DialogTrigger",ls=d.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=be(as,n),a=re.useComposedRefs(t,i.triggerRef);return v.jsxRuntimeExports.jsx(te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":On(i.open),...o,ref:a,onClick:oe(e.onClick,i.onOpenToggle)})});ls.displayName=as;var Ln="DialogPortal",[Wc,cs]=ss(Ln,{forceMount:void 0}),us=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,a=be(Ln,t);return v.jsxRuntimeExports.jsx(Wc,{scope:t,forceMount:n,children:d.Children.map(o,r=>v.jsxRuntimeExports.jsx(ht,{present:n||a.open,children:v.jsxRuntimeExports.jsx(kt,{asChild:!0,container:i,children:r})}))})};us.displayName=Ln;var At="DialogOverlay",ds=d.forwardRef((e,t)=>{const n=cs(At,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=be(At,e.__scopeDialog);return a.modal?v.jsxRuntimeExports.jsx(ht,{present:o||a.open,children:v.jsxRuntimeExports.jsx(Uc,{...i,ref:t})}):null});ds.displayName=At;var Hc=re.createSlot("DialogOverlay.RemoveScroll"),Uc=d.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=be(At,n);return v.jsxRuntimeExports.jsx(_t,{as:Hc,allowPinchZoom:!0,shards:[i.contentRef],children:v.jsxRuntimeExports.jsx(te.div,{"data-state":On(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Ue="DialogContent",fs=d.forwardRef((e,t)=>{const n=cs(Ue,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=be(Ue,e.__scopeDialog);return v.jsxRuntimeExports.jsx(ht,{present:o||a.open,children:a.modal?v.jsxRuntimeExports.jsx(Gc,{...i,ref:t}):v.jsxRuntimeExports.jsx(Kc,{...i,ref:t})})});fs.displayName=Ue;var Gc=d.forwardRef((e,t)=>{const n=be(Ue,e.__scopeDialog),o=d.useRef(null),i=re.useComposedRefs(t,n.contentRef,o);return d.useEffect(()=>{const a=o.current;if(a)return Dn(a)},[]),v.jsxRuntimeExports.jsx(ps,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:oe(e.onCloseAutoFocus,a=>{var r;a.preventDefault(),(r=n.triggerRef.current)==null||r.focus()}),onPointerDownOutside:oe(e.onPointerDownOutside,a=>{const r=a.detail.originalEvent,s=r.button===0&&r.ctrlKey===!0;(r.button===2||s)&&a.preventDefault()}),onFocusOutside:oe(e.onFocusOutside,a=>a.preventDefault())})}),Kc=d.forwardRef((e,t)=>{const n=be(Ue,e.__scopeDialog),o=d.useRef(!1),i=d.useRef(!1);return v.jsxRuntimeExports.jsx(ps,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var r,s;(r=e.onCloseAutoFocus)==null||r.call(e,a),a.defaultPrevented||(o.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const r=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(r))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),ps=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...r}=e,s=be(Ue,n),l=d.useRef(null),c=re.useComposedRefs(t,l);return Rn(),v.jsxRuntimeExports.jsxs(v.jsxRuntimeExports.Fragment,{children:[v.jsxRuntimeExports.jsx(Lt,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:v.jsxRuntimeExports.jsx(Nt,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":On(s.open),...r,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),v.jsxRuntimeExports.jsxs(v.jsxRuntimeExports.Fragment,{children:[v.jsxRuntimeExports.jsx(Xc,{titleId:s.titleId}),v.jsxRuntimeExports.jsx(Zc,{contentRef:l,descriptionId:s.descriptionId})]})]})}),kn="DialogTitle",hs=d.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=be(kn,n);return v.jsxRuntimeExports.jsx(te.h2,{id:i.titleId,...o,ref:t})});hs.displayName=kn;var ms="DialogDescription",gs=d.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=be(ms,n);return v.jsxRuntimeExports.jsx(te.p,{id:i.descriptionId,...o,ref:t})});gs.displayName=ms;var vs="DialogClose",xs=d.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=be(vs,n);return v.jsxRuntimeExports.jsx(te.button,{type:"button",...o,ref:t,onClick:oe(e.onClick,()=>i.onOpenChange(!1))})});xs.displayName=vs;function On(e){return e?"open":"closed"}var ys="DialogTitleWarning",[qc,Es]=ka(ys,{contentName:Ue,titleName:kn,docsSlug:"dialog"}),Xc=({titleId:e})=>{const t=Es(ys),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
+
43
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
+
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{if(e){const o=document.getElementById(e)}},[n,e]),null},Yc="DialogDescriptionWarning",Zc=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Es(Yc).contentName}}.`;return d.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");if(t&&i){const r=document.getElementById(t)}},[o,e,t]),null},Ss=is,bs=ls,ws=us,Rs=ds,Cs=fs,Ps=hs,Ts=gs,_n=xs;function Jc({...e}){return v.jsxRuntimeExports.jsx(Ss,{"data-slot":"dialog",...e})}function Qc({...e}){return v.jsxRuntimeExports.jsx(bs,{"data-slot":"dialog-trigger",...e})}function Ds({...e}){return v.jsxRuntimeExports.jsx(ws,{"data-slot":"dialog-portal",...e})}function eu({...e}){return v.jsxRuntimeExports.jsx(_n,{"data-slot":"dialog-close",...e})}function js({className:e,backdrop:t,...n}){let o="";switch(t){case"transparent":o="bg-transparent";break;case"opaque":o="bg-black/50";break;case"blur":o="backdrop-blur-md backdrop-saturate-150 bg-overlay/30";break}return v.jsxRuntimeExports.jsx(Rs,{"data-slot":"dialog-overlay",className:ue.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",o,e),...n})}const tu=d.forwardRef(({className:e,children:t,showCloseButton:n=!0,backdrop:o="opaque",...i},a)=>v.jsxRuntimeExports.jsx(m.AnimatePresence,{children:v.jsxRuntimeExports.jsxs(Ds,{"data-slot":"dialog-portal",children:[v.jsxRuntimeExports.jsx(js,{backdrop:o}),v.jsxRuntimeExports.jsxs(Cs,{"data-slot":"dialog-content",ref:a,className:ue.cn("bg-content1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg p-6 shadow-lg duration-200 sm:max-w-lg",e),...i,children:[t,n&&v.jsxRuntimeExports.jsxs(_n,{"data-slot":"dialog-close",className:"cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[v.jsxRuntimeExports.jsx(fc,{}),v.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}));function nu({className:e,...t}){return v.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-header",className:ue.cn("flex flex-col gap-2 text-center sm:text-left",e),...t})}function ou({className:e,...t}){return v.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-footer",className:ue.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function ru({className:e,...t}){return v.jsxRuntimeExports.jsx(Ps,{"data-slot":"dialog-title",className:ue.cn("text-lg leading-none font-semibold",e),...t})}function su({className:e,...t}){return v.jsxRuntimeExports.jsx(Ts,{"data-slot":"dialog-description",className:ue.cn("text-muted-foreground text-sm",e),...t})}function As(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Is=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),iu="VisuallyHidden",Ms=d.forwardRef((e,t)=>v.jsxRuntimeExports.jsx(te.span,{...e,ref:t,style:{...Is,...e.style}}));Ms.displayName=iu;var au=Ms;function gn(e,[t,n]){return Math.min(n,Math.max(t,e))}var lu=[" ","Enter","ArrowUp","ArrowDown"],cu=[" ","Enter"],Ge="Select",[Wt,Ht,uu]=cr(Ge),[nt,dd]=pt(Ge,[uu,Pn]),Ut=Pn(),[du,Oe]=nt(Ge),[fu,pu]=nt(Ge),Ns=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:i,onOpenChange:a,value:r,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:p,required:g,form:E}=e,h=Ut(t),[x,y]=d.useState(null),[S,b]=d.useState(null),[C,A]=d.useState(!1),I=ur(c),[R,W]=Tt({prop:o,defaultProp:i??!1,onChange:a,caller:Ge}),[k,V]=Tt({prop:r,defaultProp:s,onChange:l,caller:Ge}),G=d.useRef(null),z=x?E||!!x.closest("form"):!0,[F,Y]=d.useState(new Set),X=Array.from(F).map(K=>K.props.value).join(";");return v.jsxRuntimeExports.jsx(Rr,{...h,children:v.jsxRuntimeExports.jsxs(du,{required:g,scope:t,trigger:x,onTriggerChange:y,valueNode:S,onValueNodeChange:b,valueNodeHasChildren:C,onValueNodeHasChildrenChange:A,contentId:$e(),value:k,onValueChange:V,open:R,onOpenChange:W,dir:I,triggerPointerDownPosRef:G,disabled:p,children:[v.jsxRuntimeExports.jsx(Wt.Provider,{scope:t,children:v.jsxRuntimeExports.jsx(fu,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(K=>{Y(J=>new Set(J).add(K))},[]),onNativeOptionRemove:d.useCallback(K=>{Y(J=>{const ee=new Set(J);return ee.delete(K),ee})},[]),children:n})}),z?v.jsxRuntimeExports.jsxs(ri,{"aria-hidden":!0,required:g,tabIndex:-1,name:u,autoComplete:f,value:k,onChange:K=>V(K.target.value),disabled:p,form:E,children:[k===void 0?v.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(F)]},X):null]})})};Ns.displayName=Ge;var Ls="SelectTrigger",ks=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...i}=e,a=Ut(n),r=Oe(Ls,n),s=r.disabled||o,l=re.useComposedRefs(t,r.onTriggerChange),c=Ht(n),u=d.useRef("touch"),[f,p,g]=ii(h=>{const x=c().filter(b=>!b.disabled),y=x.find(b=>b.value===r.value),S=ai(x,h,y);S!==void 0&&r.onValueChange(S.value)}),E=h=>{s||(r.onOpenChange(!0),g()),h&&(r.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return v.jsxRuntimeExports.jsx(Cr,{asChild:!0,...a,children:v.jsxRuntimeExports.jsx(te.button,{type:"button",role:"combobox","aria-controls":r.contentId,"aria-expanded":r.open,"aria-required":r.required,"aria-autocomplete":"none",dir:r.dir,"data-state":r.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":si(r.value)?"":void 0,...i,ref:l,onClick:oe(i.onClick,h=>{h.currentTarget.focus(),u.current!=="mouse"&&E(h)}),onPointerDown:oe(i.onPointerDown,h=>{u.current=h.pointerType;const x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(E(h),h.preventDefault())}),onKeyDown:oe(i.onKeyDown,h=>{const x=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&p(h.key),!(x&&h.key===" ")&&lu.includes(h.key)&&(E(),h.preventDefault())})})})});ks.displayName=Ls;var Os="SelectValue",_s=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:i,children:a,placeholder:r="",...s}=e,l=Oe(Os,n),{onValueNodeHasChildrenChange:c}=l,u=a!==void 0,f=re.useComposedRefs(t,l.onValueNodeChange);return fe(()=>{c(u)},[c,u]),v.jsxRuntimeExports.jsx(te.span,{...s,ref:f,style:{pointerEvents:"none"},children:si(l.value)?v.jsxRuntimeExports.jsx(v.jsxRuntimeExports.Fragment,{children:r}):a})});_s.displayName=Os;var hu="SelectIcon",zs=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...i}=e;return v.jsxRuntimeExports.jsx(te.span,{"aria-hidden":!0,...i,ref:t,children:o||"▼"})});zs.displayName=hu;var mu="SelectPortal",Bs=e=>v.jsxRuntimeExports.jsx(kt,{asChild:!0,...e});Bs.displayName=mu;var Ke="SelectContent",Vs=d.forwardRef((e,t)=>{const n=Oe(Ke,e.__scopeSelect),[o,i]=d.useState();if(fe(()=>{i(new DocumentFragment)},[]),!n.open){const a=o;return a?bn.createPortal(v.jsxRuntimeExports.jsx(Fs,{scope:e.__scopeSelect,children:v.jsxRuntimeExports.jsx(Wt.Slot,{scope:e.__scopeSelect,children:v.jsxRuntimeExports.jsx("div",{children:e.children})})}),a):null}return v.jsxRuntimeExports.jsx($s,{...e,ref:t})});Vs.displayName=Ke;var Ee=10,[Fs,_e]=nt(Ke),gu="SelectContentImpl",vu=re.createSlot("SelectContent.RemoveScroll"),$s=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:r,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:g,sticky:E,hideWhenDetached:h,avoidCollisions:x,...y}=e,S=Oe(Ke,n),[b,C]=d.useState(null),[A,I]=d.useState(null),R=re.useComposedRefs(t,w=>C(w)),[W,k]=d.useState(null),[V,G]=d.useState(null),z=Ht(n),[F,Y]=d.useState(!1),X=d.useRef(!1);d.useEffect(()=>{if(b)return Dn(b)},[b]),Rn();const K=d.useCallback(w=>{const[D,...B]=z().map($=>$.ref.current),[_]=B.slice(-1),H=document.activeElement;for(const $ of w)if($===H||($==null||$.scrollIntoView({block:"nearest"}),$===D&&A&&(A.scrollTop=0),$===_&&A&&(A.scrollTop=A.scrollHeight),$==null||$.focus(),document.activeElement!==H))return},[z,A]),J=d.useCallback(()=>K([W,b]),[K,W,b]);d.useEffect(()=>{F&&J()},[F,J]);const{onOpenChange:ee,triggerPointerDownPosRef:ae}=S;d.useEffect(()=>{if(b){let w={x:0,y:0};const D=_=>{var H,$;w={x:Math.abs(Math.round(_.pageX)-(((H=ae.current)==null?void 0:H.x)??0)),y:Math.abs(Math.round(_.pageY)-((($=ae.current)==null?void 0:$.y)??0))}},B=_=>{w.x<=10&&w.y<=10?_.preventDefault():b.contains(_.target)||ee(!1),document.removeEventListener("pointermove",D),ae.current=null};return ae.current!==null&&(document.addEventListener("pointermove",D),document.addEventListener("pointerup",B,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",B,{capture:!0})}}},[b,ee,ae]),d.useEffect(()=>{const w=()=>ee(!1);return window.addEventListener("blur",w),window.addEventListener("resize",w),()=>{window.removeEventListener("blur",w),window.removeEventListener("resize",w)}},[ee]);const[me,se]=ii(w=>{const D=z().filter(H=>!H.disabled),B=D.find(H=>H.ref.current===document.activeElement),_=ai(D,w,B);_&&setTimeout(()=>_.ref.current.focus())}),de=d.useCallback((w,D,B)=>{const _=!X.current&&!B;(S.value!==void 0&&S.value===D||_)&&(k(w),_&&(X.current=!0))},[S.value]),T=d.useCallback(()=>b==null?void 0:b.focus(),[b]),M=d.useCallback((w,D,B)=>{const _=!X.current&&!B;(S.value!==void 0&&S.value===D||_)&&G(w)},[S.value]),L=o==="popper"?vn:Ws,N=L===vn?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:g,sticky:E,hideWhenDetached:h,avoidCollisions:x}:{};return v.jsxRuntimeExports.jsx(Fs,{scope:n,content:b,viewport:A,onViewportChange:I,itemRefCallback:de,selectedItem:W,onItemLeave:T,itemTextRefCallback:M,focusSelectedItem:J,selectedItemText:V,position:o,isPositioned:F,searchRef:me,children:v.jsxRuntimeExports.jsx(_t,{as:vu,allowPinchZoom:!0,children:v.jsxRuntimeExports.jsx(Lt,{asChild:!0,trapped:S.open,onMountAutoFocus:w=>{w.preventDefault()},onUnmountAutoFocus:oe(i,w=>{var D;(D=S.trigger)==null||D.focus({preventScroll:!0}),w.preventDefault()}),children:v.jsxRuntimeExports.jsx(Nt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:w=>w.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:v.jsxRuntimeExports.jsx(L,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:w=>w.preventDefault(),...y,...N,onPlaced:()=>Y(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:oe(y.onKeyDown,w=>{const D=w.ctrlKey||w.altKey||w.metaKey;if(w.key==="Tab"&&w.preventDefault(),!D&&w.key.length===1&&se(w.key),["ArrowUp","ArrowDown","Home","End"].includes(w.key)){let _=z().filter(H=>!H.disabled).map(H=>H.ref.current);if(["ArrowUp","End"].includes(w.key)&&(_=_.slice().reverse()),["ArrowUp","ArrowDown"].includes(w.key)){const H=w.target,$=_.indexOf(H);_=_.slice($+1)}setTimeout(()=>K(_)),w.preventDefault()}})})})})})})});$s.displayName=gu;var xu="SelectItemAlignedPosition",Ws=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...i}=e,a=Oe(Ke,n),r=_e(Ke,n),[s,l]=d.useState(null),[c,u]=d.useState(null),f=re.useComposedRefs(t,R=>u(R)),p=Ht(n),g=d.useRef(!1),E=d.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:y,focusSelectedItem:S}=r,b=d.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&h&&x&&y){const R=a.trigger.getBoundingClientRect(),W=c.getBoundingClientRect(),k=a.valueNode.getBoundingClientRect(),V=y.getBoundingClientRect();if(a.dir!=="rtl"){const H=V.left-W.left,$=k.left-H,q=R.left-$,j=R.width+q,O=Math.max(j,W.width),ne=window.innerWidth-Ee,le=gn($,[Ee,Math.max(Ee,ne-O)]);s.style.minWidth=j+"px",s.style.left=le+"px"}else{const H=W.right-V.right,$=window.innerWidth-k.right-H,q=window.innerWidth-R.right-$,j=R.width+q,O=Math.max(j,W.width),ne=window.innerWidth-Ee,le=gn($,[Ee,Math.max(Ee,ne-O)]);s.style.minWidth=j+"px",s.style.right=le+"px"}const G=p(),z=window.innerHeight-Ee*2,F=h.scrollHeight,Y=window.getComputedStyle(c),X=parseInt(Y.borderTopWidth,10),K=parseInt(Y.paddingTop,10),J=parseInt(Y.borderBottomWidth,10),ee=parseInt(Y.paddingBottom,10),ae=X+K+F+ee+J,me=Math.min(x.offsetHeight*5,ae),se=window.getComputedStyle(h),de=parseInt(se.paddingTop,10),T=parseInt(se.paddingBottom,10),M=R.top+R.height/2-Ee,L=z-M,N=x.offsetHeight/2,w=x.offsetTop+N,D=X+K+w,B=ae-D;if(D<=M){const H=G.length>0&&x===G[G.length-1].ref.current;s.style.bottom="0px";const $=c.clientHeight-h.offsetTop-h.offsetHeight,q=Math.max(L,N+(H?T:0)+$+J),j=D+q;s.style.height=j+"px"}else{const H=G.length>0&&x===G[0].ref.current;s.style.top="0px";const q=Math.max(M,X+h.offsetTop+(H?de:0)+N)+B;s.style.height=q+"px",h.scrollTop=D-M+h.offsetTop}s.style.margin=`${Ee}px 0`,s.style.minHeight=me+"px",s.style.maxHeight=z+"px",o==null||o(),requestAnimationFrame(()=>g.current=!0)}},[p,a.trigger,a.valueNode,s,c,h,x,y,a.dir,o]);fe(()=>b(),[b]);const[C,A]=d.useState();fe(()=>{c&&A(window.getComputedStyle(c).zIndex)},[c]);const I=d.useCallback(R=>{R&&E.current===!0&&(b(),S==null||S(),E.current=!1)},[b,S]);return v.jsxRuntimeExports.jsx(Eu,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:I,children:v.jsxRuntimeExports.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:v.jsxRuntimeExports.jsx(te.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Ws.displayName=xu;var yu="SelectPopperPosition",vn=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:i=Ee,...a}=e,r=Ut(n);return v.jsxRuntimeExports.jsx(Pr,{...r,...a,ref:t,align:o,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});vn.displayName=yu;var[Eu,zn]=nt(Ke,{}),xn="SelectViewport",Hs=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...i}=e,a=_e(xn,n),r=zn(xn,n),s=re.useComposedRefs(t,a.onViewportChange),l=d.useRef(0);return v.jsxRuntimeExports.jsxs(v.jsxRuntimeExports.Fragment,{children:[v.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),v.jsxRuntimeExports.jsx(Wt.Slot,{scope:n,children:v.jsxRuntimeExports.jsx(te.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:oe(i.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=r;if(p!=null&&p.current&&f){const g=Math.abs(l.current-u.scrollTop);if(g>0){const E=window.innerHeight-Ee*2,h=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),y=Math.max(h,x);if(y<E){const S=y+g,b=Math.min(E,S),C=S-b;f.style.height=b+"px",f.style.bottom==="0px"&&(u.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Hs.displayName=xn;var Us="SelectGroup",[Su,bu]=nt(Us),Gs=d.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,i=$e();return v.jsxRuntimeExports.jsx(Su,{scope:n,id:i,children:v.jsxRuntimeExports.jsx(te.div,{role:"group","aria-labelledby":i,...o,ref:t})})});Gs.displayName=Us;var Ks="SelectLabel",qs=d.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,i=bu(Ks,n);return v.jsxRuntimeExports.jsx(te.div,{id:i.id,...o,ref:t})});qs.displayName=Ks;var It="SelectItem",[wu,Xs]=nt(It),Ys=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:i=!1,textValue:a,...r}=e,s=Oe(It,n),l=_e(It,n),c=s.value===o,[u,f]=d.useState(a??""),[p,g]=d.useState(!1),E=re.useComposedRefs(t,S=>{var b;return(b=l.itemRefCallback)==null?void 0:b.call(l,S,o,i)}),h=$e(),x=d.useRef("touch"),y=()=>{i||(s.onValueChange(o),s.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsxRuntimeExports.jsx(wu,{scope:n,value:o,disabled:i,textId:h,isSelected:c,onItemTextChange:d.useCallback(S=>{f(b=>b||((S==null?void 0:S.textContent)??"").trim())},[]),children:v.jsxRuntimeExports.jsx(Wt.ItemSlot,{scope:n,value:o,disabled:i,textValue:u,children:v.jsxRuntimeExports.jsx(te.div,{role:"option","aria-labelledby":h,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...r,ref:E,onFocus:oe(r.onFocus,()=>g(!0)),onBlur:oe(r.onBlur,()=>g(!1)),onClick:oe(r.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:oe(r.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:oe(r.onPointerDown,S=>{x.current=S.pointerType}),onPointerMove:oe(r.onPointerMove,S=>{var b;x.current=S.pointerType,i?(b=l.onItemLeave)==null||b.call(l):x.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:oe(r.onPointerLeave,S=>{var b;S.currentTarget===document.activeElement&&((b=l.onItemLeave)==null||b.call(l))}),onKeyDown:oe(r.onKeyDown,S=>{var C;((C=l.searchRef)==null?void 0:C.current)!==""&&S.key===" "||(cu.includes(S.key)&&y(),S.key===" "&&S.preventDefault())})})})})});Ys.displayName=It;var at="SelectItemText",Zs=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:i,...a}=e,r=Oe(at,n),s=_e(at,n),l=Xs(at,n),c=pu(at,n),[u,f]=d.useState(null),p=re.useComposedRefs(t,y=>f(y),l.onItemTextChange,y=>{var S;return(S=s.itemTextRefCallback)==null?void 0:S.call(s,y,l.value,l.disabled)}),g=u==null?void 0:u.textContent,E=d.useMemo(()=>v.jsxRuntimeExports.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=c;return fe(()=>(h(E),()=>x(E)),[h,x,E]),v.jsxRuntimeExports.jsxs(v.jsxRuntimeExports.Fragment,{children:[v.jsxRuntimeExports.jsx(te.span,{id:l.textId,...a,ref:p}),l.isSelected&&r.valueNode&&!r.valueNodeHasChildren?bn.createPortal(a.children,r.valueNode):null]})});Zs.displayName=at;var Js="SelectItemIndicator",Qs=d.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Xs(Js,n).isSelected?v.jsxRuntimeExports.jsx(te.span,{"aria-hidden":!0,...o,ref:t}):null});Qs.displayName=Js;var yn="SelectScrollUpButton",ei=d.forwardRef((e,t)=>{const n=_e(yn,e.__scopeSelect),o=zn(yn,e.__scopeSelect),[i,a]=d.useState(!1),r=re.useComposedRefs(t,o.onScrollButtonChange);return fe(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollTop>0;a(c)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?v.jsxRuntimeExports.jsx(ni,{...e,ref:r,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});ei.displayName=yn;var En="SelectScrollDownButton",ti=d.forwardRef((e,t)=>{const n=_e(En,e.__scopeSelect),o=zn(En,e.__scopeSelect),[i,a]=d.useState(!1),r=re.useComposedRefs(t,o.onScrollButtonChange);return fe(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;a(u)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?v.jsxRuntimeExports.jsx(ni,{...e,ref:r,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});ti.displayName=En;var ni=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...i}=e,a=_e("SelectScrollButton",n),r=d.useRef(null),s=Ht(n),l=d.useCallback(()=>{r.current!==null&&(window.clearInterval(r.current),r.current=null)},[]);return d.useEffect(()=>()=>l(),[l]),fe(()=>{var u;const c=s().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[s]),v.jsxRuntimeExports.jsx(te.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:oe(i.onPointerDown,()=>{r.current===null&&(r.current=window.setInterval(o,50))}),onPointerMove:oe(i.onPointerMove,()=>{var c;(c=a.onItemLeave)==null||c.call(a),r.current===null&&(r.current=window.setInterval(o,50))}),onPointerLeave:oe(i.onPointerLeave,()=>{l()})})}),Ru="SelectSeparator",oi=d.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return v.jsxRuntimeExports.jsx(te.div,{"aria-hidden":!0,...o,ref:t})});oi.displayName=Ru;var Sn="SelectArrow",Cu=d.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,i=Ut(n),a=Oe(Sn,n),r=_e(Sn,n);return a.open&&r.position==="popper"?v.jsxRuntimeExports.jsx(Tr,{...i,...o,ref:t}):null});Cu.displayName=Sn;var Pu="SelectBubbleInput",ri=d.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const i=d.useRef(null),a=re.useComposedRefs(o,i),r=As(t);return d.useEffect(()=>{const s=i.current;if(!s)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(r!==t&&u){const f=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(f)}},[r,t]),v.jsxRuntimeExports.jsx(te.select,{...n,style:{...Is,...n.style},ref:a,defaultValue:t})});ri.displayName=Pu;function si(e){return e===""||e===void 0}function ii(e){const t=ke(e),n=d.useRef(""),o=d.useRef(0),i=d.useCallback(r=>{const s=n.current+r;t(s),function l(c){n.current=c,window.clearTimeout(o.current),c!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=d.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,i,a]}function ai(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let r=Tu(e,Math.max(a,0));i.length===1&&(r=r.filter(c=>c!==n));const l=r.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Tu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Du=Ns,ju=ks,Au=_s,Iu=zs,Mu=Bs,Nu=Vs,Lu=Hs,ku=Gs,Ou=qs,_u=Ys,zu=Zs,Bu=Qs,Vu=ei,Fu=ti,$u=oi;function Wu({...e}){return v.jsxRuntimeExports.jsx(Du,{"data-slot":"select",...e})}function Hu({...e}){return v.jsxRuntimeExports.jsx(ku,{"data-slot":"select-group",...e})}function Uu({...e}){return v.jsxRuntimeExports.jsx(Au,{"data-slot":"select-value",...e})}function Gu({className:e,size:t="default",children:n,...o}){return v.jsxRuntimeExports.jsxs(ju,{"data-slot":"select-trigger","data-size":t,className:ue.cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[n,v.jsxRuntimeExports.jsx(Iu,{asChild:!0,children:v.jsxRuntimeExports.jsx(jn,{className:"size-4 opacity-50"})})]})}function Ku({className:e,children:t,position:n="popper",...o}){return v.jsxRuntimeExports.jsx(Mu,{children:v.jsxRuntimeExports.jsxs(Nu,{"data-slot":"select-content",className:ue.cn("bg-content1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-medium",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[v.jsxRuntimeExports.jsx(li,{}),v.jsxRuntimeExports.jsx(Lu,{className:ue.cn("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),v.jsxRuntimeExports.jsx(ci,{})]})})}function qu({className:e,...t}){return v.jsxRuntimeExports.jsx(Ou,{"data-slot":"select-label",className:ue.cn("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function Xu({className:e,children:t,...n}){return v.jsxRuntimeExports.jsxs(_u,{"data-slot":"select-item",className:ue.cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[v.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:v.jsxRuntimeExports.jsx(Bu,{children:v.jsxRuntimeExports.jsx(_r,{className:"size-4"})})}),v.jsxRuntimeExports.jsx(zu,{children:t})]})}function Yu({className:e,...t}){return v.jsxRuntimeExports.jsx($u,{"data-slot":"select-separator",className:ue.cn("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function li({className:e,...t}){return v.jsxRuntimeExports.jsx(Vu,{"data-slot":"select-scroll-up-button",className:ue.cn("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsxRuntimeExports.jsx(uc,{className:"size-4"})})}function ci({className:e,...t}){return v.jsxRuntimeExports.jsx(Fu,{"data-slot":"select-scroll-down-button",className:ue.cn("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsxRuntimeExports.jsx(jn,{className:"size-4"})})}var Zu=Object.defineProperty,Ju=Object.defineProperties,Qu=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,ui=Object.prototype.hasOwnProperty,di=Object.prototype.propertyIsEnumerable,$o=(e,t,n)=>t in e?Zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ed=(e,t)=>{for(var n in t||(t={}))ui.call(t,n)&&$o(e,n,t[n]);if(Mt)for(var n of Mt(t))di.call(t,n)&&$o(e,n,t[n]);return e},td=(e,t)=>Ju(e,Qu(t)),nd=(e,t)=>{var n={};for(var o in e)ui.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Mt)for(var o of Mt(e))t.indexOf(o)<0&&di.call(e,o)&&(n[o]=e[o]);return n};function od(e){let t=setTimeout(e,0),n=setTimeout(e,10),o=setTimeout(e,50);return[t,n,o]}function rd(e){let t=d.useRef();return d.useEffect(()=>{t.current=e}),t.current}var sd=18,fi=40,id=`${fi}px`,ad=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function ld({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:o}){let[i,a]=d.useState(!1),[r,s]=d.useState(!1),[l,c]=d.useState(!1),u=d.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&i&&r,[i,r,n]),f=d.useCallback(()=>{let p=e.current,g=t.current;if(!p||!g||l||n==="none")return;let E=p,h=E.getBoundingClientRect().left+E.offsetWidth,x=E.getBoundingClientRect().top+E.offsetHeight/2,y=h-sd,S=x;document.querySelectorAll(ad).length===0&&document.elementFromPoint(y,S)===p||(a(!0),c(!0))},[e,t,l,n]);return d.useEffect(()=>{let p=e.current;if(!p||n==="none")return;function g(){let h=window.innerWidth-p.getBoundingClientRect().right;s(h>=fi)}g();let E=setInterval(g,1e3);return()=>{clearInterval(E)}},[e,n]),d.useEffect(()=>{let p=o||document.activeElement===t.current;if(n==="none"||!p)return;let g=setTimeout(f,0),E=setTimeout(f,2e3),h=setTimeout(f,5e3),x=setTimeout(()=>{c(!0)},6e3);return()=>{clearTimeout(g),clearTimeout(E),clearTimeout(h),clearTimeout(x)}},[t,o,n,f]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:id}}var pi=d.createContext({}),hi=d.forwardRef((e,t)=>{var n=e,{value:o,onChange:i,maxLength:a,textAlign:r="left",pattern:s,placeholder:l,inputMode:c="numeric",onComplete:u,pushPasswordManagerStrategy:f="increase-width",pasteTransformer:p,containerClassName:g,noScriptCSSFallback:E=cd,render:h,children:x}=n,y=nd(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),S,b,C,A,I;let[R,W]=d.useState(typeof y.defaultValue=="string"?y.defaultValue:""),k=o??R,V=rd(k),G=d.useCallback(j=>{i==null||i(j),W(j)},[i]),z=d.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),F=d.useRef(null),Y=d.useRef(null),X=d.useRef({value:k,onChange:G,isIOS:typeof window<"u"&&((b=(S=window==null?void 0:window.CSS)==null?void 0:S.supports)==null?void 0:b.call(S,"-webkit-touch-callout","none"))}),K=d.useRef({prev:[(C=F.current)==null?void 0:C.selectionStart,(A=F.current)==null?void 0:A.selectionEnd,(I=F.current)==null?void 0:I.selectionDirection]});d.useImperativeHandle(t,()=>F.current,[]),d.useEffect(()=>{let j=F.current,O=Y.current;if(!j||!O)return;X.current.value!==j.value&&X.current.onChange(j.value),K.current.prev=[j.selectionStart,j.selectionEnd,j.selectionDirection];function ne(){if(document.activeElement!==j){de(null),M(null);return}let Z=j.selectionStart,pe=j.selectionEnd,we=j.selectionDirection,ge=j.maxLength,Ce=j.value,Pe=K.current.prev,je=-1,Ae=-1,ze;if(Ce.length!==0&&Z!==null&&pe!==null){let gi=Z===pe,vi=Z===Ce.length&&Ce.length<ge;if(gi&&!vi){let Be=Z;if(Be===0)je=0,Ae=1,ze="forward";else if(Be===ge)je=Be-1,Ae=Be,ze="backward";else if(ge>1&&Ce.length>1){let Gt=0;if(Pe[0]!==null&&Pe[1]!==null){ze=Be<Pe[1]?"backward":"forward";let xi=Pe[0]===Pe[1]&&Pe[0]<ge;ze==="backward"&&!xi&&(Gt=-1)}je=Gt+Be,Ae=Gt+Be+1}}je!==-1&&Ae!==-1&&je!==Ae&&F.current.setSelectionRange(je,Ae,ze)}let Bn=je!==-1?je:Z,Vn=Ae!==-1?Ae:pe,mi=ze??we;de(Bn),M(Vn),K.current.prev=[Bn,Vn,mi]}if(document.addEventListener("selectionchange",ne,{capture:!0}),ne(),document.activeElement===j&&me(!0),!document.getElementById("input-otp-style")){let Z=document.createElement("style");if(Z.id="input-otp-style",document.head.appendChild(Z),Z.sheet){let pe="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";rt(Z.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),rt(Z.sheet,`[data-input-otp]:autofill { ${pe} }`),rt(Z.sheet,`[data-input-otp]:-webkit-autofill { ${pe} }`),rt(Z.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),rt(Z.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let le=()=>{O&&O.style.setProperty("--root-height",`${j.clientHeight}px`)};le();let Q=new ResizeObserver(le);return Q.observe(j),()=>{document.removeEventListener("selectionchange",ne,{capture:!0}),Q.disconnect()}},[]);let[J,ee]=d.useState(!1),[ae,me]=d.useState(!1),[se,de]=d.useState(null),[T,M]=d.useState(null);d.useEffect(()=>{od(()=>{var j,O,ne,le;(j=F.current)==null||j.dispatchEvent(new Event("input"));let Q=(O=F.current)==null?void 0:O.selectionStart,Z=(ne=F.current)==null?void 0:ne.selectionEnd,pe=(le=F.current)==null?void 0:le.selectionDirection;Q!==null&&Z!==null&&(de(Q),M(Z),K.current.prev=[Q,Z,pe])})},[k,ae]),d.useEffect(()=>{V!==void 0&&k!==V&&V.length<a&&k.length===a&&(u==null||u(k))},[a,u,V,k]);let L=ld({containerRef:Y,inputRef:F,pushPasswordManagerStrategy:f,isFocused:ae}),N=d.useCallback(j=>{let O=j.currentTarget.value.slice(0,a);if(O.length>0&&z&&!z.test(O)){j.preventDefault();return}typeof V=="string"&&O.length<V.length&&document.dispatchEvent(new Event("selectionchange")),G(O)},[a,G,V,z]),w=d.useCallback(()=>{var j;if(F.current){let O=Math.min(F.current.value.length,a-1),ne=F.current.value.length;(j=F.current)==null||j.setSelectionRange(O,ne),de(O),M(ne)}me(!0)},[a]),D=d.useCallback(j=>{var O,ne;let le=F.current;if(!p&&(!X.current.isIOS||!j.clipboardData||!le))return;let Q=j.clipboardData.getData("text/plain"),Z=p?p(Q):Q;j.preventDefault();let pe=(O=F.current)==null?void 0:O.selectionStart,we=(ne=F.current)==null?void 0:ne.selectionEnd,ge=(pe!==we?k.slice(0,pe)+Z+k.slice(we):k.slice(0,pe)+Z+k.slice(pe)).slice(0,a);if(ge.length>0&&z&&!z.test(ge))return;le.value=ge,G(ge);let Ce=Math.min(ge.length,a-1),Pe=ge.length;le.setSelectionRange(Ce,Pe),de(Ce),M(Pe)},[a,G,z,k]),B=d.useMemo(()=>({position:"relative",cursor:y.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[y.disabled]),_=d.useMemo(()=>({position:"absolute",inset:0,width:L.willPushPWMBadge?`calc(100% + ${L.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:L.willPushPWMBadge?`inset(0 ${L.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:r,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[L.PWM_BADGE_SPACE_WIDTH,L.willPushPWMBadge,r]),H=d.useMemo(()=>d.createElement("input",td(ed({autoComplete:y.autoComplete||"one-time-code"},y),{"data-input-otp":!0,"data-input-otp-placeholder-shown":k.length===0||void 0,"data-input-otp-mss":se,"data-input-otp-mse":T,inputMode:c,pattern:z==null?void 0:z.source,"aria-placeholder":l,style:_,maxLength:a,value:k,ref:F,onPaste:j=>{var O;D(j),(O=y.onPaste)==null||O.call(y,j)},onChange:N,onMouseOver:j=>{var O;ee(!0),(O=y.onMouseOver)==null||O.call(y,j)},onMouseLeave:j=>{var O;ee(!1),(O=y.onMouseLeave)==null||O.call(y,j)},onFocus:j=>{var O;w(),(O=y.onFocus)==null||O.call(y,j)},onBlur:j=>{var O;me(!1),(O=y.onBlur)==null||O.call(y,j)}})),[N,w,D,c,_,a,T,se,y,z==null?void 0:z.source,k]),$=d.useMemo(()=>({slots:Array.from({length:a}).map((j,O)=>{var ne;let le=ae&&se!==null&&T!==null&&(se===T&&O===se||O>=se&&O<T),Q=k[O]!==void 0?k[O]:null,Z=k[0]!==void 0?null:(ne=l==null?void 0:l[O])!=null?ne:null;return{char:Q,placeholderChar:Z,isActive:le,hasFakeCaret:le&&Q===null}}),isFocused:ae,isHovering:!y.disabled&&J}),[ae,J,a,T,se,y.disabled,k]),q=d.useMemo(()=>h?h($):d.createElement(pi.Provider,{value:$},x),[x,$,h]);return d.createElement(d.Fragment,null,E!==null&&d.createElement("noscript",null,d.createElement("style",null,E)),d.createElement("div",{ref:Y,"data-input-otp-container":!0,style:B,className:g},q,d.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},H)))});hi.displayName="Input";function rt(e,t){try{e.insertRule(t)}catch{}}var cd=`
46
+ [data-input-otp] {
47
+ --nojs-bg: white !important;
48
+ --nojs-fg: black !important;
49
+
50
+ background-color: var(--nojs-bg) !important;
51
+ color: var(--nojs-fg) !important;
52
+ caret-color: var(--nojs-fg) !important;
53
+ letter-spacing: .25em !important;
54
+ text-align: center !important;
55
+ border: 1px solid var(--nojs-fg) !important;
56
+ border-radius: 4px !important;
57
+ width: 100% !important;
58
+ }
59
+ @media (prefers-color-scheme: dark) {
60
+ [data-input-otp] {
61
+ --nojs-bg: black !important;
62
+ --nojs-fg: white !important;
63
+ }
64
+ }`;exports.Anchor=Cr;exports.Arrow=Tr;exports.Badge=Ia;exports.Check=_r;exports.ChevronDown=jn;exports.Close=_n;exports.Content=Pr;exports.Content$1=Cs;exports.Description=Ts;exports.DismissableLayer=Nt;exports.FocusScope=Lt;exports.Input=ir;exports.Lt=hi;exports.Modal=Jc;exports.ModalClose=eu;exports.ModalContent=tu;exports.ModalDescription=su;exports.ModalFooter=ou;exports.ModalHeader=nu;exports.ModalOverlay=js;exports.ModalPortal=Ds;exports.ModalTitle=ru;exports.ModalTrigger=Qc;exports.Overlay=Rs;exports.Panel=Br;exports.PanelGroup=os;exports.PanelResizeHandle=rs;exports.Portal=kt;exports.Portal$1=ws;exports.Presence=ht;exports.Primitive=te;exports.ReactRemoveScroll=_t;exports.Root=Ss;exports.Root$1=au;exports.Root2=Rr;exports.Select=Wu;exports.SelectContent=Ku;exports.SelectGroup=Hu;exports.SelectItem=Xu;exports.SelectLabel=qu;exports.SelectScrollDownButton=ci;exports.SelectScrollUpButton=li;exports.SelectSeparator=Yu;exports.SelectTrigger=Gu;exports.SelectValue=Uu;exports.Switch=lr;exports.Title=Ps;exports.Trigger=bs;exports.WarningProvider=qc;exports.clamp=gn;exports.composeEventHandlers=oe;exports.createCollection=cr;exports.createContextScope=pt;exports.createDialogScope=Fc;exports.createLucideIcon=mt;exports.createPopperScope=Pn;exports.cva=wn;exports.dispatchDiscreteCustomEvent=ar;exports.hideOthers=Dn;exports.jt=pi;exports.useCallbackRef=ke;exports.useControllableState=Tt;exports.useDirection=ur;exports.useFocusGuards=Rn;exports.useId=$e;exports.useLayoutEffect2=fe;exports.usePrevious=As;
65
+ //# sourceMappingURL=index-BIzSm1_7.js.map