lizaui 3.0.44 → 3.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/index-DUhJE4fQ.js +65 -0
- package/dist/chunks/index-DUhJE4fQ.js.map +1 -0
- package/dist/chunks/{index-DSpBzH_i.js → index-Dtbzjbl8.js} +753 -751
- package/dist/chunks/index-Dtbzjbl8.js.map +1 -0
- package/dist/components/table/body/table-body.d.ts +2 -1
- package/dist/components/table/body/table-body.d.ts.map +1 -1
- package/dist/components/table/table.d.ts +1 -2
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/pagination/index.cjs.js +1 -1
- package/dist/pagination/index.es.js +1 -1
- package/dist/table/index.cjs.js +1 -1
- package/dist/table/index.cjs.js.map +1 -1
- package/dist/table/index.es.js +53 -54
- package/dist/table/index.es.js.map +1 -1
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.es.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/index-BnlGNtJe.js +0 -65
- package/dist/chunks/index-BnlGNtJe.js.map +0 -1
- package/dist/chunks/index-DSpBzH_i.js.map +0 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";const v=require("./jsx-runtime-DFswc9zO.js"),P=require("react"),ae=require("./variants-BUTPDD09.js"),Ei=require("./tv-C5lw0tnu.js"),je=require("./bundle-mjs-Bta93uUH.js"),ue=require("./utils-WCaO4kJS.js"),Fe=require("./clsx-C11secjj.js"),Si=require("./pattern-F8jUniwt.js");require("./assertion-C7nbUE-q.js");const m=require("./ripple-CUdIIH3t.js"),se=require("./index-D2_xS2pD.js"),bi=require("./button-W_O8D9E6.js"),Wo=require("react-dom"),Ie=require("./floating-ui.react-dom-BPdJyHFN.js"),wi=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 u=Ho(P),bn=Ho(Wo);function Ri(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 Ci(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,Pi=1-Go,ji=1+Go,Ko=.01,Ti=0-Ko,Di=0+Ko;function me(e){return e.max-e.min}function Ai(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=me(n)/me(t),e.translate=m.mixNumber(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Pi&&e.scale<=ji||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ti&&e.translate<=Di||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+me(t)}function Ii(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+me(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 Ni(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=Ni(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:d}=n;d&&d(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,Mi(t)),velocity:Li(t,.1)}}function Mi(e){return e[0]}function Yo(e){return e[e.length-1]}function Li(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 ki(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 Oi(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 zi(e,t){return{x:Kn(e.x,t.x),y:Kn(e.y,t.y)}}function _i(e,t){let n=.5;const o=me(e),i=me(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 Bi(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 Vi(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 Fi=new WeakMap;class $i{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=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(m.extractEventInfo(d).point)},a=(d,f)=>{const{drag:p,dragPropagation:g,onDragStart:E}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ri(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=me(b)*(parseFloat(y)/100))}}this.originPoint[x]=y}),E&&m.frame.postRender(()=>E(d,f)),m.addValueToWillChange(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},r=(d,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=Wi(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(d,f)},s=(d,f)=>this.stop(d,f),l=()=>ye(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).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||!mt(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=ki(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=Oi(o.layoutBox,t):this.constraints=!1,this.elastic=Vi(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ye(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Bi(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=zi(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(d=>{if(!mt(d,n,this.currentDirection))return;let f=l&&l[d]||{};r&&(f={min:0,max:0});const p=i?200:1e6,g=i?40:1e7,E={type:"inertia",velocity:o?t[d]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(d,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(!mt(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]=_i({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(!mt(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;Fi.set(this.visualElement,this);const t=this.visualElement.current,n=lt(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&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(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=l[d].translate,f.set(f.get()+l[d].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 mt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Wi(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Hi extends m.Feature{constructor(t){super(t),this.removeGroupControls=m.noop,this.removeListeners=m.noop,this.controls=new $i(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 Ui 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 bt={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}%`}},Gi={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 Ki extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:i}=this.props,{projection:a}=t;m.addScaleCorrector(qi),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()})),bt.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(Ki,{...e,layoutGroup:o,switchLayoutGroup:P.useContext(m.SwitchLayoutGroupContext),isPresent:t,safeToRemove:n})}const qi={borderRadius:{...ot,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ot,borderTopRightRadius:ot,borderBottomLeftRadius:ot,borderBottomRightRadius:ot,boxShadow:Gi};function Xi(e,t,n){const o=m.isMotionValue(e)?e:m.motionValue(e);return o.start(m.animateMotionValue("",o,t,n)),o.animation}const Yi=(e,t)=>e.depth-t.depth;class Zi{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(Yi),this.isDirty=!1,this.children.forEach(t)}}function Ji(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"],Qi=Jo.length,Jn=e=>typeof e=="string"?parseFloat(e):e,Qn=e=>typeof e=="number"||m.px.test(e);function ea(e,t,n,o,i,a){i?(e.opacity=m.mixNumber(0,n.opacity??1,ta(o)),e.opacityExit=m.mixNumber(t.opacity??1,0,na(o))):a&&(e.opacity=m.mixNumber(t.opacity??1,n.opacity??1,o));for(let r=0;r<Qi;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 ta=Qo(0,.5,m.circOut),na=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 oa(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){oa(e,t[n],t[o],t[i],t.scale,a,r)}const ra=["x","scaleX","originX"],sa=["y","scaleY","originY"];function so(e,t,n,o){ro(e.x,t,ra,n?n.x:void 0,o?o.x:void 0),ro(e.y,t,sa,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 ia(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 me(e.x)/me(e.y)}function uo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class aa{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 la(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:d,rotateX:f,rotateY:p,skewX:g,skewY:E}=n;c&&(o=`perspective(${c}px) ${o}`),d&&(o+=`rotate(${d}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"],ca={visibility:"hidden"},ua=1e3;let da=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=da++,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(ha),this.nodes.forEach(ya),this.nodes.forEach(Ea),this.nodes.forEach(ma)},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 Zi)}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)&&!Ci(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 d;const f=()=>this.root.updateBlockedByResize=!1;e(r,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Ji(f,250),bt.hasAnimatedSinceResize&&(bt.hasAnimatedSinceResize=!1,this.nodes.forEach(po))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:d,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()||Ca,{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(d,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(Sa),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 d=0;d<this.path.length;d++){const f=this.path[d];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(va),this.isUpdating=!1,this.nodes.forEach(xa),this.nodes.forEach(fa),this.nodes.forEach(pa),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(ga),this.sharedNodes.forEach(ba)}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&&!me(this.snapshot.measuredBox.x)&&!me(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,d=c!==this.prevTransformTemplateValue;r&&this.instance&&(s||m.hasTransform(this.latestValues)||d)&&(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)),Pa(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(ja))){const{scroll:d}=this.root;d&&(m.translateAxis(s.x,d.offset.x),m.translateAxis(s.y,d.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 d=this.path[c],{scroll:f,options:p}=d;d!==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 d=this.path[c];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&m.transformBox(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),m.hasTransform(d.latestValues)&&m.transformBox(l,d.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 d=m.createBox(),f=c.measurePageBox();xe(d,f),so(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}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:d,layoutId:f}=this.options;if(!(!this.layout||!(d||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(),Ii(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:d}=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||d))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:{},d={...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(Ra));this.animationProgress=0;let b;this.mixTargetDelta=C=>{const I=C/1e3;ho(f.x,r.x,I),ho(f.y,r.y,I),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ut(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wa(this.relativeTarget,this.relativeTargetOrigin,p,I),b&&ia(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=m.createBox()),xe(b,this.relativeTarget)),h&&(this.animationValues=d,ea(d,c,this.latestValues,I,S,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=I},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(()=>{bt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=m.motionValue(0)),this.currentAnimation=Xi(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),r.onUpdate&&r.onUpdate(d)},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(ua),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:d}=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=me(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const p=me(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+p}xe(s,l),m.transformBox(s,d),ct(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(r,s){this.sharedNodes.has(r)||this.sharedNodes.set(r,new aa),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 d=0;d<Xt.length;d++)Yt(`rotate${Xt[d]}`,r,c,this.animationValues),Yt(`skew${Xt[d]}`,r,c,this.animationValues);r.render();for(const d in c)r.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);r.scheduleRender()}getProjectionStyles(r){if(!this.instance||this.isSVG)return;if(!this.isVisible)return ca;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 d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),s.transform=la(this.projectionDeltaWithTransform,this.treeScale,d),l&&(s.transform=l(d,s.transform));const{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?s.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in m.scaleCorrectors){if(d[g]===void 0)continue;const{correct:E,applyTo:h,isCSSVariable:x}=m.scaleCorrectors[g],y=s.transform==="none"?d[g]:E(d[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 fa(e){e.updateLayout()}function pa(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=me(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=me(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 d=!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)||(d=!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:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function ha(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 ma(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ga(e){e.clearSnapshot()}function fo(e){e.clearMeasurements()}function va(e){e.isLayoutDirty=!1}function xa(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 ya(e){e.resolveTargetDelta()}function Ea(e){e.calcProjection()}function Sa(e){e.resetSkewAndRotation()}function ba(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 wa(e,t,n,o){mo(e.x,t.x,n.x,o),mo(e.y,t.y,n.y,o)}function Ra(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ca={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 Pa(e){xo(e.x),xo(e.y)}function rr(e,t,n){return e==="position"||e==="preserve-aspect"&&!Ai(co(t),co(n),.2)}function ja(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Ta=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 Ta({});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"}),Da={pan:{Feature:Ui},drag:{Feature:Hi,ProjectionNode:sr,MeasureLayout:Zo}},Aa={layout:{ProjectionNode:sr,MeasureLayout:Zo}},Ia=m.createMotionComponentFactory({...m.animations,...m.gestureAnimations,...Da,...Aa},m.createDomVisualElement),Jt=m.createDOMMotionComponentProxy(Ia),Na=Ei.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:ae.colorVariants.solid.default}},{variant:"solid",color:"primary",class:{badge:ae.colorVariants.solid.primary}},{variant:"solid",color:"secondary",class:{badge:ae.colorVariants.solid.secondary}},{variant:"solid",color:"success",class:{badge:ae.colorVariants.solid.success}},{variant:"solid",color:"warning",class:{badge:ae.colorVariants.solid.warning}},{variant:"solid",color:"danger",class:{badge:ae.colorVariants.solid.danger}},{variant:"shadow",color:"default",class:{badge:ae.colorVariants.shadow.default}},{variant:"shadow",color:"primary",class:{badge:ae.colorVariants.shadow.primary}},{variant:"shadow",color:"secondary",class:{badge:ae.colorVariants.shadow.secondary}},{variant:"shadow",color:"success",class:{badge:ae.colorVariants.shadow.success}},{variant:"shadow",color:"warning",class:{badge:ae.colorVariants.shadow.warning}},{variant:"shadow",color:"danger",class:{badge:ae.colorVariants.shadow.danger}},{variant:"flat",color:"default",class:{badge:ae.colorVariants.flat.default}},{variant:"flat",color:"primary",class:{badge:ae.colorVariants.flat.primary}},{variant:"flat",color:"secondary",class:{badge:ae.colorVariants.flat.secondary}},{variant:"flat",color:"success",class:{badge:ae.colorVariants.flat.success}},{variant:"flat",color:"warning",class:{badge:ae.colorVariants.flat.warning}},{variant:"flat",color:"danger",class:{badge:ae.colorVariants.flat.danger}},{variant:"faded",color:"default",class:{badge:ae.colorVariants.faded.default}},{variant:"faded",color:"primary",class:{badge:ae.colorVariants.faded.primary}},{variant:"faded",color:"secondary",class:{badge:ae.colorVariants.faded.secondary}},{variant:"faded",color:"success",class:{badge:ae.colorVariants.faded.success}},{variant:"faded",color:"warning",class:{badge:ae.colorVariants.faded.warning}},{variant:"faded",color:"danger",class:{badge:ae.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"}}]}),Ma=u.forwardRef(({className:e,variant:t,size:n,color:o,children:i,content:a,shape:r,placement:s,...l},c)=>{const{base:d,badge:f}=Na({variant:t,size:n,color:o,shape:r,placement:s});return v.jsxRuntimeExports.jsxs("div",{className:d(),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 d=n==null?void 0:n[c],f=a==null?void 0:a[c];if(d===null)return null;const p=yo(d)||yo(f);return i[c][p]}),s=n&&Object.entries(n).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((c,d)=>{let{class:f,className:p,...g}=d;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)},La=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=u.forwardRef((e,t)=>{const{id:n,type:o="text",value:i,defaultValue:a,className:r,classNameContainer:s,startClassName:l,endClassName:c,size:d,radius:f,startContent:p,endContent:g,disabled:E,error:h,touched:x,pattern:y,isErrorText:S=!0,label:b,required:C=!1,isClearable:I=!1,onChange:A,onClear:R,...$}=e,k=u.useId(),W=n||k,K=i!==void 0,_=!E&&!!h&&x,V=Fe.clsx("absolute top-0 h-full flex items-center cursor-pointer px-1.5 z-[1]",{"text-red-700":_,"text-gray-400":E,"text-green-700":!h&&x,"text-gray-500":!_}),Y=Fe.clsx(p&&"pl-8",!p&&"pl-2.5",g&&"pr-8",!g&&"pr-2.5"),X=ue.cn(La({size:d,radius:f}),Y,r),G=ue.cn("block font-normal text-sm text-foreground mb-1",{"text-danger":_}),ne=Q=>{const pe=Q.target.value;y&&!Si.validatePatternInput(y,pe)||A==null||A(Q)},ee=Q=>{Q.preventDefault(),R==null||R()};return v.jsxRuntimeExports.jsxs("div",{className:je.twMerge("w-full relative flex flex-col",s),children:[b&&v.jsxRuntimeExports.jsxs("label",{htmlFor:W,className:G,children:[b," ",C&&v.jsxRuntimeExports.jsx("span",{className:"text-danger",children:"*"})]}),v.jsxRuntimeExports.jsxs("div",{className:"w-full relative",children:[p&&v.jsxRuntimeExports.jsx("div",{className:je.twMerge("left-1",V,l),children:p}),v.jsxRuntimeExports.jsx("input",{ref:t,id:W,...E?{}:{"aria-invalid":_},type:o,autoComplete:"off",autoCapitalize:"off",disabled:E,onChange:ne,className:X,...K?{value:i}:{defaultValue:a},...$}),I&&!E&&i?v.jsxRuntimeExports.jsx("div",{className:je.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:ee,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,g&&v.jsxRuntimeExports.jsx("div",{className:je.twMerge("right-1",V,c),children:g})]}),!E&&h&&x&&S&&v.jsxRuntimeExports.jsx(ue.LabelError,{text:h})]})});ir.displayName="Input";var ka=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],te=ka.reduce((e,t)=>{const n=se.createSlot(`Primitive.${t}`),o=u.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 Oa=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:d,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 I=K=>{h(K.target.checked)},A=()=>{i||h(!b)},R=je.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")),$=je.twMerge(Fe.clsx(!b&&"bg-default-200",i&&"bg-default-100 hover:bg-default-100")),k=je.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})),W=je.twMerge("text-xs text-gray-500 mt-1",i&&"text-gray-400");return v.jsxRuntimeExports.jsxs("div",{className:je.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:A,className:"cursor-pointer",children:[a&&v.jsxRuntimeExports.jsx("p",{className:k,children:a}),r&&v.jsxRuntimeExports.jsx("p",{className:W,children:r})]}),v.jsxRuntimeExports.jsxs("label",{htmlFor:S,className:ue.cn(Oa({size:n,color:t}),$),children:[v.jsxRuntimeExports.jsx("input",{type:"checkbox",id:S,className:"sr-only peer",onChange:I,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:A,className:"cursor-pointer",children:[a&&v.jsxRuntimeExports.jsx("p",{className:k,children:a}),r&&v.jsxRuntimeExports.jsx("p",{className:W,children:r})]})]}),!i&&c&&d&&v.jsxRuntimeExports.jsx(ue.LabelError,{text:c})]})};lr.displayName="Switch";function re(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 za(e,t){const n=u.createContext(t),o=a=>{const{children:r,...s}=a,l=u.useMemo(()=>s,Object.values(s));return v.jsxRuntimeExports.jsx(n.Provider,{value:l,children:r})};o.displayName=e+"Provider";function i(a){const r=u.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=u.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=u.useMemo(()=>E,Object.values(E));return v.jsxRuntimeExports.jsx(h.Provider,{value:x,children:g})};c.displayName=a+"Provider";function d(f,p){var h;const g=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,E=u.useContext(g);if(E)return E;if(r!==void 0)return r;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=n.map(r=>u.createContext(r));return function(s){const l=(s==null?void 0:s[e])||a;return u.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[o,_a(i,...t)]}function _a(...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 u.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var fe=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},Ba=u[" useInsertionEffect ".trim().toString()]||fe;function Pt({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,a,r]=Va({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const d=u.useRef(e!==void 0);u.useEffect(()=>{const f=d.current;if(f!==s){const p=f?"controlled":"uncontrolled",g=s?"controlled":"uncontrolled"}d.current=s},[s,o])}const c=u.useCallback(d=>{var f;if(s){const p=Fa(d)?d(e):d;p!==e&&((f=r.current)==null||f.call(r,p))}else a(d)},[s,e,a,r]);return[l,c]}function Va({defaultProp:e,onChange:t}){const[n,o]=u.useState(e),i=u.useRef(n),a=u.useRef(t);return Ba(()=>{a.current=t},[t]),u.useEffect(()=>{var r;i.current!==n&&((r=a.current)==null||r.call(a,n),i.current=n)},[n,i]),[n,o,a]}function Fa(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=se.createSlot(s),c=P.forwardRef((h,x)=>{const{scope:y,children:S}=h,b=a(s,y),C=se.useComposedRefs(x,b.collectionRef);return v.jsxRuntimeExports.jsx(l,{ref:C,children:S})});c.displayName=s;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=se.createSlot(d),g=P.forwardRef((h,x)=>{const{scope:y,children:S,...b}=h,C=P.useRef(null),I=se.useComposedRefs(x,C),A=a(d,y);return P.useEffect(()=>(A.itemMap.set(C,{ref:C,...b}),()=>void A.itemMap.delete(C))),v.jsxRuntimeExports.jsx(p,{[f]:"",ref:I,children:S})});g.displayName=d;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((A,R)=>b.indexOf(A.ref.current)-b.indexOf(R.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:r,Slot:c,ItemSlot:g},E,o]}var $a=u.createContext(void 0);function ur(e){const t=u.useContext($a);return e||t||"ltr"}function ke(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function Wa(e,t=globalThis==null?void 0:globalThis.document){const n=ke(e);u.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 Ha="DismissableLayer",pn="dismissableLayer.update",Ua="dismissableLayer.pointerDownOutside",Ga="dismissableLayer.focusOutside",So,dr=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nt=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:r,onDismiss:s,...l}=e,c=u.useContext(dr),[d,f]=u.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=u.useState({}),E=se.useComposedRefs(t,R=>f(R)),h=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(x),S=d?h.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,C=S>=y,I=Xa(R=>{const $=R.target,k=[...c.branches].some(W=>W.contains($));!C||k||(i==null||i(R),r==null||r(R),R.defaultPrevented||s==null||s())},p),A=Ya(R=>{const $=R.target;[...c.branches].some(W=>W.contains($))||(a==null||a(R),r==null||r(R),R.defaultPrevented||s==null||s())},p);return Wa(R=>{S===c.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},p),u.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(So=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),bo(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=So)}},[d,p,n,c]),u.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),bo())},[d,c]),u.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:re(e.onFocusCapture,A.onFocusCapture),onBlurCapture:re(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:re(e.onPointerDownCapture,I.onPointerDownCapture)})});Nt.displayName=Ha;var Ka="DismissableLayerBranch",qa=u.forwardRef((e,t)=>{const n=u.useContext(dr),o=u.useRef(null),i=se.useComposedRefs(t,o);return u.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})});qa.displayName=Ka;function Xa(e,t=globalThis==null?void 0:globalThis.document){const n=ke(e),o=u.useRef(!1),i=u.useRef(()=>{});return u.useEffect(()=>{const a=s=>{if(s.target&&!o.current){let l=function(){fr(Ua,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 Ya(e,t=globalThis==null?void 0:globalThis.document){const n=ke(e),o=u.useRef(!1);return u.useEffect(()=>{const i=a=>{a.target&&!o.current&&fr(Ga,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(){u.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},Za="FocusScope",Mt=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...r}=e,[s,l]=u.useState(null),c=ke(i),d=ke(a),f=u.useRef(null),p=se.useComposedRefs(t,h=>l(h)),g=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(o){let h=function(b){if(g.paused||!s)return;const C=b.target;s.contains(C)?f.current=C:Ne(f.current,{select:!0})},x=function(b){if(g.paused||!s)return;const C=b.relatedTarget;C!==null&&(s.contains(C)||Ne(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const I of b)I.removedNodes.length>0&&Ne(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]),u.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||(Ja(ol(pr(s)),{select:!0}),document.activeElement===h&&Ne(s))}return()=>{s.removeEventListener(en,c),setTimeout(()=>{const y=new CustomEvent(tn,Ro);s.addEventListener(tn,d),s.dispatchEvent(y),y.defaultPrevented||Ne(h??document.body,{select:!0}),s.removeEventListener(tn,d),Po.remove(g)},0)}}},[s,c,d,g]);const E=u.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]=Qa(S);b&&C?!h.shiftKey&&y===C?(h.preventDefault(),n&&Ne(b,{select:!0})):h.shiftKey&&y===b&&(h.preventDefault(),n&&Ne(C,{select:!0})):y===S&&h.preventDefault()}},[n,o,g.paused]);return v.jsxRuntimeExports.jsx(te.div,{tabIndex:-1,...r,ref:p,onKeyDown:E})});Mt.displayName=Za;function Ja(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Ne(o,{select:t}),document.activeElement!==n)return}function Qa(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(!el(n,{upTo:t}))return n}function el(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 tl(e){return e instanceof HTMLInputElement&&"select"in e}function Ne(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&tl(e)&&t&&e.select()}}var Po=nl();function nl(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jo(e,t),e.unshift(t)},remove(t){var n;e=jo(e,t),(n=e[0])==null||n.resume()}}}function jo(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function ol(e){return e.filter(t=>t.tagName!=="A")}var rl=u[" useId ".trim().toString()]||(()=>{}),sl=0;function $e(e){const[t,n]=u.useState(rl());return fe(()=>{n(o=>o??String(sl++))},[e]),e||(t?`radix-${t}`:"")}var il="Arrow",hr=u.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=il;var al=hr;function mr(e){const[t,n]=u.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",[gr,Pn]=pt(Cn),[ll,vr]=gr(Cn),xr=e=>{const{__scopePopper:t,children:n}=e,[o,i]=u.useState(null);return v.jsxRuntimeExports.jsx(ll,{scope:t,anchor:o,onAnchorChange:i,children:n})};xr.displayName=Cn;var yr="PopperAnchor",Er=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,a=vr(yr,n),r=u.useRef(null),s=se.useComposedRefs(t,r);return u.useEffect(()=>{a.onAnchorChange((o==null?void 0:o.current)||r.current)}),o?null:v.jsxRuntimeExports.jsx(te.div,{...i,ref:s})});Er.displayName=yr;var jn="PopperContent",[cl,ul]=gr(jn),Sr=u.forwardRef((e,t)=>{var w,T,B,z,H,F;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:r=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:E,...h}=e,x=vr(jn,n),[y,S]=u.useState(null),b=se.useComposedRefs(t,q=>S(q)),[C,I]=u.useState(null),A=mr(C),R=(A==null?void 0:A.width)??0,$=(A==null?void 0:A.height)??0,k=o+(a!=="center"?"-"+a:""),W=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},K=Array.isArray(c)?c:[c],_=K.length>0,V={padding:W,boundary:K.filter(fl),altBoundary:_},{refs:Y,floatingStyles:X,placement:G,isPositioned:ne,middlewareData:ee}=Ie.useFloating({strategy:"fixed",placement:k,whileElementsMounted:(...q)=>wi.autoUpdate(...q,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[Ie.offset({mainAxis:i+$,alignmentAxis:r}),l&&Ie.shift({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Ie.limitShift():void 0,...V}),l&&Ie.flip({...V}),Ie.size({...V,apply:({elements:q,rects:D,availableWidth:O,availableHeight:oe})=>{const{width:le,height:J}=D.reference,Z=q.floating.style;Z.setProperty("--radix-popper-available-width",`${O}px`),Z.setProperty("--radix-popper-available-height",`${oe}px`),Z.setProperty("--radix-popper-anchor-width",`${le}px`),Z.setProperty("--radix-popper-anchor-height",`${J}px`)}}),C&&Ie.arrow({element:C,padding:s}),pl({arrowWidth:R,arrowHeight:$}),p&&Ie.hide({strategy:"referenceHidden",...V})]}),[Q,pe]=Rr(G),ie=ke(E);fe(()=>{ne&&(ie==null||ie())},[ne,ie]);const de=(w=ee.arrow)==null?void 0:w.x,j=(T=ee.arrow)==null?void 0:T.y,N=((B=ee.arrow)==null?void 0:B.centerOffset)!==0,[L,M]=u.useState();return fe(()=>{y&&M(window.getComputedStyle(y).zIndex)},[y]),v.jsxRuntimeExports.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:ne?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(z=ee.transformOrigin)==null?void 0:z.x,(H=ee.transformOrigin)==null?void 0:H.y].join(" "),...((F=ee.hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsxRuntimeExports.jsx(cl,{scope:n,placedSide:Q,onArrowChange:I,arrowX:de,arrowY:j,shouldHideArrow:N,children:v.jsxRuntimeExports.jsx(te.div,{"data-side":Q,"data-align":pe,...h,ref:b,style:{...h.style,animation:ne?void 0:"none"}})})})});Sr.displayName=jn;var br="PopperArrow",dl={top:"bottom",right:"left",bottom:"top",left:"right"},wr=u.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,a=ul(br,o),r=dl[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(al,{...i,ref:n,style:{...i.style,display:"block"}})})});wr.displayName=br;function fl(e){return e!==null}var pl=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,d]=Rr(n),f={start:"0%",center:"50%",end:"100%"}[d],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 Rr(e){const[t,n="center"]=e.split("-");return[t,n]}var Cr=xr,Pr=Er,jr=Sr,Tr=wr,hl="Portal",Lt=u.forwardRef((e,t)=>{var s;const{container:n,...o}=e,[i,a]=u.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});Lt.displayName=hl;function ml(e,t){return u.useReducer((n,o)=>t[n][o]??n,e)}var ht=e=>{const{present:t,children:n}=e,o=gl(t),i=typeof n=="function"?n({present:o.isPresent}):u.Children.only(n),a=se.useComposedRefs(o.ref,vl(i));return typeof n=="function"||o.isPresent?u.cloneElement(i,{ref:a}):null};ht.displayName="Presence";function gl(e){const[t,n]=u.useState(),o=u.useRef(null),i=u.useRef(e),a=u.useRef("none"),r=e?"mounted":"unmounted",[s,l]=ml(r,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const c=gt(o.current);a.current=s==="mounted"?c:"none"},[s]),fe(()=>{const c=o.current,d=i.current;if(d!==e){const p=a.current,g=gt(c);e?l("MOUNT"):g==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),fe(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=g=>{const h=gt(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=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=g=>{g.target===t&&(a.current=gt(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.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:u.useCallback(c=>{o.current=c?getComputedStyle(c):null,n(c)},[])}}function gt(e){return(e==null?void 0:e.animationName)||"none"}function vl(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 xl=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qe=new WeakMap,vt=new WeakMap,xt={},nn=0,Dr=function(e){return e&&(e.host||Dr(e.parentNode))},yl=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})},El=function(e,t,n,o){var i=yl(t,Array.isArray(e)?e:[e]);xt[n]||(xt[n]=new WeakMap);var a=xt[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 d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))d(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&&vt.set(p,!0),x===1&&p.setAttribute(n,"true"),E||p.setAttribute(o,"true")}catch{}})};return d(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||(vt.has(f)||f.removeAttribute(o),vt.delete(f)),g||f.removeAttribute(n)}),nn--,nn||(qe=new WeakMap,qe=new WeakMap,vt=new WeakMap,xt={})}},Tn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=xl(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),El(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 Ar(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 Sl(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 wt="right-scroll-bar-position",Rt="width-before-scroll-bar",bl="with-scroll-bars-hidden",wl="--removed-body-scroll-bar-size";function on(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Rl(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 Cl=typeof window<"u"?u.useLayoutEffect:u.useEffect,To=new WeakMap;function Pl(e,t){var n=Rl(null,function(o){return e.forEach(function(i){return on(i,o)})});return Cl(function(){var o=To.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)})}To.set(n,e)},[e]),n}function jl(e){return e}function Tl(e,t){t===void 0&&(t=jl);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 d=r;r=[],d.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){r.push(d),c()},filter:function(d){return r=r.filter(d),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 Ir=function(e){var t=e.sideCar,n=Ar(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 u.createElement(o,Re({},n))};Ir.isSideCarExport=!0;function Al(e,t){return e.useMedium(t),Ir}var Nr=Dl(),rn=function(){},kt=u.forwardRef(function(e,t){var n=u.useRef(null),o=u.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,d=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=Ar(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=p,A=Pl([n,t]),R=Re(Re({},C),i);return u.createElement(u.Fragment,null,d&&u.createElement(I,{sideCar:Nr,removeScrollBar:c,shards:f,noRelative:g,noIsolation:E,inert:h,setCallbacks:a,allowPinchZoom:!!x,lockRef:n,gapMode:b}),r?u.cloneElement(u.Children.only(s),Re(Re({},R),{ref:A})):u.createElement(S,Re({},R,{className:l,ref:A}),s))});kt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kt.classNames={fullWidth:Rt,zeroRight:wt};var Il=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Nl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Il();return t&&e.setAttribute("nonce",t),e}function Ml(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ll(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Nl())&&(Ml(t,n),Ll(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ol=function(){var e=kl();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mr=function(){var e=Ol(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},zl={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)]},Bl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zl;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])}},Vl=Mr(),et="data-scroll-locked",Fl=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(bl,` {
|
|
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(wt,` {
|
|
20
|
+
right: `).concat(s,"px ").concat(o,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(Rt,` {
|
|
24
|
+
margin-right: `).concat(s,"px ").concat(o,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(wt," .").concat(wt,` {
|
|
28
|
+
right: 0 `).concat(o,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(Rt," .").concat(Rt,` {
|
|
32
|
+
margin-right: 0 `).concat(o,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(et,`] {
|
|
36
|
+
`).concat(wl,": ").concat(s,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},Do=function(){var e=parseInt(document.body.getAttribute(et)||"0",10);return isFinite(e)?e:0},$l=function(){u.useEffect(function(){return document.body.setAttribute(et,(Do()+1).toString()),function(){var e=Do()-1;e<=0?document.body.removeAttribute(et):document.body.setAttribute(et,e.toString())}},[])},Wl=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;$l();var a=u.useMemo(function(){return Bl(i)},[i]);return u.createElement(Vl,{styles:Fl(a,!t,i,n?"":"!important")})},hn=!1;if(typeof window<"u")try{var yt=Object.defineProperty({},"passive",{get:function(){return hn=!0,!0}});window.addEventListener("test",yt,yt),window.removeEventListener("test",yt,yt)}catch{hn=!1}var Xe=hn?{passive:!1}:!1,Hl=function(e){return e.tagName==="TEXTAREA"},Lr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Hl(e)&&n[t]==="visible")},Ul=function(e){return Lr(e,"overflowY")},Gl=function(e){return Lr(e,"overflowX")},Ao=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=kr(e,o);if(i){var a=Or(e,o),r=a[1],s=a[2];if(r>s)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Kl=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},ql=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},kr=function(e,t){return e==="v"?Ul(t):Gl(t)},Or=function(e,t){return e==="v"?Kl(t):ql(t)},Xl=function(e,t){return e==="h"&&t==="rtl"?-1:1},Yl=function(e,t,n,o,i){var a=Xl(e,window.getComputedStyle(t).direction),r=a*o,s=n.target,l=t.contains(s),c=!1,d=r>0,f=0,p=0;do{if(!s)break;var g=Or(e,s),E=g[0],h=g[1],x=g[2],y=h-x-a*E;(E||y)&&kr(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(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(c=!0),c},Et=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Io=function(e){return[e.deltaX,e.deltaY]},No=function(e){return e&&"current"in e?e.current:e},Zl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Jl=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},Ql=0,Ye=[];function ec(e){var t=u.useRef([]),n=u.useRef([0,0]),o=u.useRef(),i=u.useState(Ql++)[0],a=u.useState(Mr)[0],r=u.useRef(e);u.useEffect(function(){r.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=Sl([e.lockRef.current],(e.shards||[]).map(No),!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=u.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!r.current.allowPinchZoom;var y=Et(h),S=n.current,b="deltaX"in h?h.deltaX:S[0]-y[0],C="deltaY"in h?h.deltaY:S[1]-y[1],I,A=h.target,R=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in h&&R==="h"&&A.type==="range")return!1;var $=Ao(R,A);if(!$)return!0;if($?I=R:(I=R==="v"?"h":"v",$=Ao(R,A)),!$)return!1;if(!o.current&&"changedTouches"in h&&(b||C)&&(o.current=I),!I)return!0;var k=o.current||I;return Yl(k,x,h,k==="h"?b:C)},[]),l=u.useCallback(function(h){var x=h;if(!(!Ye.length||Ye[Ye.length-1]!==a)){var y="deltaY"in x?Io(x):Et(x),S=t.current.filter(function(I){return I.name===x.type&&(I.target===x.target||x.target===I.shadowParent)&&Zl(I.delta,y)})[0];if(S&&S.should){x.cancelable&&x.preventDefault();return}if(!S){var b=(r.current.shards||[]).map(No).filter(Boolean).filter(function(I){return I.contains(x.target)}),C=b.length>0?s(x,b[0]):!r.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),c=u.useCallback(function(h,x,y,S){var b={name:h,delta:x,target:y,should:S,shadowParent:tc(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),d=u.useCallback(function(h){n.current=Et(h),o.current=void 0},[]),f=u.useCallback(function(h){c(h.type,Io(h),h.target,s(h,e.lockRef.current))},[]),p=u.useCallback(function(h){c(h.type,Et(h),h.target,s(h,e.lockRef.current))},[]);u.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",d,Xe),function(){Ye=Ye.filter(function(h){return h!==a}),document.removeEventListener("wheel",l,Xe),document.removeEventListener("touchmove",l,Xe),document.removeEventListener("touchstart",d,Xe)}},[]);var g=e.removeScrollBar,E=e.inert;return u.createElement(u.Fragment,null,E?u.createElement(a,{styles:Jl(i)}):null,g?u.createElement(Wl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const nc=Al(Nr,ec);var Ot=u.forwardRef(function(e,t){return u.createElement(kt,Re({},e,{ref:t,sideCar:nc}))});Ot.classNames=kt.classNames;const oc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rc=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,o)=>o?o.toUpperCase():n.toLowerCase()),Mo=e=>{const t=rc(e);return t.charAt(0).toUpperCase()+t.slice(1)},zr=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim(),sc=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var ic={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 ac=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,...ic,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:zr("lucide",i),...!a&&!sc(s)&&{"aria-hidden":"true"},...s},[...r.map(([c,d])=>P.createElement(c,d)),...Array.isArray(a)?a:[a]]));const zt=(e,t)=>{const n=P.forwardRef(({className:o,...i},a)=>P.createElement(ac,{ref:a,iconNode:t,className:zr(`lucide-${oc(Mo(e))}`,`lucide-${e}`,o),...i}));return n.displayName=Mo(e),n};const lc=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_r=zt("check",lc);const cc=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Dn=zt("chevron-down",cc);const uc=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],dc=zt("chevron-up",uc),_t=P.createContext(null);_t.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=u.useId,fc=typeof Lo=="function"?Lo:()=>null;let pc=0;function In(e=null){const t=fc(),n=P.useRef(e||t||null);return n.current===null&&(n.current=""+pc++),e??n.current}function Br({children:e,className:t="",collapsedSize:n,collapsible:o,defaultSize:i,forwardedRef:a,id:r,maxSize:s,minSize:l,onCollapse:c,onExpand:d,onResize:f,order:p,style:g,tagName:E="div",...h}){const x=P.useContext(_t);if(x===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:y,expandPanel:S,getPanelSize:b,getPanelStyle:C,groupId:I,isPanelCollapsed:A,reevaluatePanelConstraints:R,registerPanel:$,resizePanel:k,unregisterPanel:W}=x,K=In(r),_=P.useRef({callbacks:{onCollapse:c,onExpand:d,onResize:f},constraints:{collapsedSize:n,collapsible:o,defaultSize:i,maxSize:s,minSize:l},id:K,idIsFromProps:r!==void 0,order:p});P.useRef({didLogMissingDefaultSizeWarning:!1}),We(()=>{const{callbacks:Y,constraints:X}=_.current,G={...X};_.current.id=K,_.current.idIsFromProps=r!==void 0,_.current.order=p,Y.onCollapse=c,Y.onExpand=d,Y.onResize=f,X.collapsedSize=n,X.collapsible=o,X.defaultSize=i,X.maxSize=s,X.minSize=l,(G.collapsedSize!==X.collapsedSize||G.collapsible!==X.collapsible||G.maxSize!==X.maxSize||G.minSize!==X.minSize)&&R(_.current,G)}),We(()=>{const Y=_.current;return $(Y),()=>{W(Y)}},[p,K,$,W]),P.useImperativeHandle(a,()=>({collapse:()=>{y(_.current)},expand:Y=>{S(_.current,Y)},getId(){return K},getSize(){return b(_.current)},isCollapsed(){return A(_.current)},isExpanded(){return!A(_.current)},resize:Y=>{k(_.current,Y)}}),[y,S,b,A,K,k]);const V=C(_.current,i);return P.createElement(E,{...h,children:e,className:t,id:K,style:{...V,...g},[ce.groupId]:I,[ce.panel]:"",[ce.panelCollapsible]:o||void 0,[ce.panelId]:K,[ce.panelSize]:parseFloat(""+V.flexGrow).toFixed(1)})}const Vr=P.forwardRef((e,t)=>P.createElement(Br,{...e,forwardedRef:t}));Br.displayName="Panel";Vr.displayName="forwardRef(Panel)";let mn=null,Ct=-1,Me=null;function hc(e,t){if(t){const n=(t&Ur)!==0,o=(t&Gr)!==0,i=(t&Kr)!==0,a=(t&qr)!==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 mc(){Me!==null&&(document.head.removeChild(Me),mn=null,Me=null,Ct=-1)}function an(e,t){var n,o;const i=hc(e,t);if(mn!==i){if(mn=i,Me===null&&(Me=document.createElement("style"),document.head.appendChild(Me)),Ct>=0){var a;(a=Me.sheet)===null||a===void 0||a.removeRule(Ct)}Ct=(n=(o=Me.sheet)===null||o===void 0?void 0:o.insertRule(`*{cursor: ${i} !important;}`))!==null&&n!==void 0?n:-1}}function Fr(e){return e.type==="keydown"}function $r(e){return e.type.startsWith("pointer")}function Wr(e){return e.type.startsWith("mouse")}function Bt(e){if($r(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Wr(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function gc(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function vc(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 xc(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:zo(e),b:zo(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 yc=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Ec(e){var t;const n=getComputedStyle((t=Hr(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function Sc(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Ec(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"||yc.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function ko(e){let t=e.length;for(;t--;){const n=e[t];if(U(n,"Missing node"),Sc(n))return n}return null}function Oo(e){return e&&Number(getComputedStyle(e).zIndex)||0}function zo(e){const t=[];for(;e;)t.push(e),e=Hr(e);return t}function Hr(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const Ur=1,Gr=2,Kr=4,qr=8,bc=gc()==="coarse";let Se=[],tt=!1,Le=new Map,Vt=new Map;const dt=new Set;function wc(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),jt(),function(){var d;Vt.delete(e),dt.delete(s);const f=(d=Le.get(r))!==null&&d!==void 0?d:1;if(Le.set(r,f-1),jt(),f===1&&Le.delete(r),Se.includes(s)){const p=Se.indexOf(s);p>=0&&Se.splice(p,1),Mn(),i("up",!0,null)}}}function Rc(e){const{target:t}=e,{x:n,y:o}=Bt(e);tt=!0,Nn({target:t,x:n,y:o}),jt(),Se.length>0&&(Tt("down",e),e.preventDefault(),Xr(t)||e.stopImmediatePropagation())}function ln(e){const{x:t,y:n}=Bt(e);if(tt&&e.buttons===0&&(tt=!1,Tt("up",e)),!tt){const{target:o}=e;Nn({target:o,x:t,y:n})}Tt("move",e),Mn(),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(),Xr(t)||e.stopImmediatePropagation()),Tt("up",e),Nn({target:t,x:n,y:o}),Mn(),jt()}function Xr(e){let t=e;for(;t;){if(t.hasAttribute(ce.resizeHandle))return!0;t=t.parentElement}return!1}function Nn({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:d,top:f}=s,p=bc?r.coarse:r.fine;if(t>=c-p&&t<=d+p&&n>=f-p&&n<=l+p){if(o!==null&&document.contains(o)&&a!==o&&!a.contains(o)&&!o.contains(a)&&xc(o,a)>0){let E=o,h=!1;for(;E&&!E.contains(a);){if(vc(E.getBoundingClientRect(),s)){h=!0;break}E=E.parentElement}if(h)return}Se.push(i)}})}function un(e,t){Vt.set(e,t)}function Mn(){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):mc()}let dn=new AbortController;function jt(){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",Rc,e),o.addEventListener("pointermove",ln,e))}))}function Tt(e,t){dt.forEach(n=>{const{setResizeHandlerState:o}=n,i=Se.includes(n);o(e,i,t)})}function Cc(){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 Te(e,t,n=An){return He(e,t,n)===0}function ve(e,t,n){return He(e,t,n)===0}function Pc(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(Pc(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 d=r.reduce((f,p)=>p+f,0);return ve(d,100)?r:i}function jc({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),d=e[s];return{valueMax:l,valueMin:c,valueNow:d}}function ft(e,t=document){return Array.from(t.querySelectorAll(`[${ce.resizeHandleId}][data-panel-group-id="${e}"]`))}function Yr(e,t,n=document){const i=ft(e,n).findIndex(a=>a.getAttribute(ce.resizeHandleId)===t);return i??null}function Zr(e,t,n){const o=Yr(e,t,n);return o!=null?[o,o+1]:[-1,-1]}function Tc(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Jr(e,t=document){if(Tc(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 Dc(e,t,n,o=document){var i,a,r,s;const l=Ft(t,o),c=ft(e,o),d=l?c.indexOf(l):-1,f=(i=(a=n[d])===null||a===void 0?void 0:a.id)!==null&&i!==void 0?i:null,p=(r=(s=n[d+1])===null||s===void 0?void 0:s.id)!==null&&r!==void 0?r:null;return[f,p]}function Ac({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:d,valueNow:f}=jc({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(d)),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=Jr(n,a);U(c!=null,`No group found for id "${n}"`);const d=ft(n,a);U(d,`No resize handles found for group id "${n}"`);const f=d.map(p=>{const g=p.getAttribute(ce.resizeHandleId);U(g,"Resize handle element has no handle id attribute");const[E,h]=Dc(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:I=0,collapsible:A,minSize:R=0}=b.constraints;if(C!=null&&A){const $=st({delta:ve(C,I)?R-I:I-C,initialLayout:o,panelConstraints:l.map(k=>k.constraints),pivotIndices:Zr(n,g,a),prevLayout:o,trigger:"keyboard"});o!==$&&r($)}}break}}};return p.addEventListener("keydown",x),()=>{p.removeEventListener("keydown",x)}});return()=>{f.forEach(p=>p())}},[a,e,t,n,o,i,r])}function _o(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 Qr(e,t){const n=e==="horizontal",{x:o,y:i}=Bt(t);return n?o:i}function Ic(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=Qr(n,e),d=Jr(s,i);U(d,`No group element found for id "${s}"`);const f=d.getBoundingClientRect(),p=a?f.width:f.height;return(c-l)/p*100}function Nc(e,t,n,o,i,a){if(Fr(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:Ic(e,t,n,o,a)}function Mc({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:d}=s,f=n[l];if(f==null||o!==f){n[l]=o;const{onCollapse:p,onExpand:g,onResize:E}=r;E&&E(o,f),d&&(p||g)&&(g&&(f==null||Te(f,c))&&!Te(o,c)&&g(),p&&(f==null||!Te(f,c))&&Te(o,c)&&p())}})}function St(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 Lc({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 kc(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 es(e){return`react-resizable-panels:${e}`}function ts(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 ns(e,t){try{const n=es(e),o=t.getItem(n);if(o){const i=JSON.parse(o);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Oc(e,t,n){var o,i;const a=(o=ns(e,n))!==null&&o!==void 0?o:{},r=ts(t);return(i=a[r])!==null&&i!==void 0?i:null}function zc(e,t,n,o,i){var a;const r=es(e),s=ts(t),l=(a=ns(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 _c=100,it={getItem:e=>(Bo(it),it.getItem(e)),setItem:(e,t)=>{Bo(it),it.setItem(e,t)}},Fo={};function os({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:d="div",...f}){const p=In(a),g=P.useRef(null),[E,h]=P.useState(null),[x,y]=P.useState([]),S=Cc(),b=P.useRef({}),C=P.useRef(new Map),I=P.useRef(0),A=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:()=>A.current.id,getLayout:()=>{const{layout:j}=R.current;return j},setLayout:j=>{const{onLayout:N}=A.current,{layout:L,panelDataArray:M}=R.current,w=Vo({layout:j,panelConstraints:M.map(T=>T.constraints)});_o(L,w)||(y(w),R.current.layout=w,N&&N(w),Ze(M,w,b.current))}}),[]),We(()=>{A.current.autoSaveId=e,A.current.direction=o,A.current.dragState=E,A.current.id=p,A.current.onLayout=r,A.current.storage=l}),Ac({committedValuesRef:A,eagerValuesRef:R,groupId:p,layout:x,panelDataArray:R.current.panelDataArray,setLayout:y,panelGroupElement:g.current}),P.useEffect(()=>{const{panelDataArray:j}=R.current;if(e){if(x.length===0||x.length!==j.length)return;let N=Fo[e];N==null&&(N=kc(zc,_c),Fo[e]=N);const L=[...j],M=new Map(C.current);N(e,L,M,x,l)}},[e,x,l]),P.useEffect(()=>{});const $=P.useCallback(j=>{const{onLayout:N}=A.current,{layout:L,panelDataArray:M}=R.current;if(j.constraints.collapsible){const w=M.map(H=>H.constraints),{collapsedSize:T=0,panelSize:B,pivotIndices:z}=Ve(M,j,L);if(U(B!=null,`Panel size not found for panel "${j.id}"`),!Te(B,T)){C.current.set(j.id,B);const F=Je(M,j)===M.length-1?B-T:T-B,q=st({delta:F,initialLayout:L,panelConstraints:w,pivotIndices:z,prevLayout:L,trigger:"imperative-api"});St(L,q)||(y(q),R.current.layout=q,N&&N(q),Ze(M,q,b.current))}}},[]),k=P.useCallback((j,N)=>{const{onLayout:L}=A.current,{layout:M,panelDataArray:w}=R.current;if(j.constraints.collapsible){const T=w.map(D=>D.constraints),{collapsedSize:B=0,panelSize:z=0,minSize:H=0,pivotIndices:F}=Ve(w,j,M),q=N??H;if(Te(z,B)){const D=C.current.get(j.id),O=D!=null&&D>=q?D:q,le=Je(w,j)===w.length-1?z-O:O-z,J=st({delta:le,initialLayout:M,panelConstraints:T,pivotIndices:F,prevLayout:M,trigger:"imperative-api"});St(M,J)||(y(J),R.current.layout=J,L&&L(J),Ze(w,J,b.current))}}},[]),W=P.useCallback(j=>{const{layout:N,panelDataArray:L}=R.current,{panelSize:M}=Ve(L,j,N);return U(M!=null,`Panel size not found for panel "${j.id}"`),M},[]),K=P.useCallback((j,N)=>{const{panelDataArray:L}=R.current,M=Je(L,j);return Lc({defaultSize:N,dragState:E,layout:x,panelData:L,panelIndex:M})},[E,x]),_=P.useCallback(j=>{const{layout:N,panelDataArray:L}=R.current,{collapsedSize:M=0,collapsible:w,panelSize:T}=Ve(L,j,N);return U(T!=null,`Panel size not found for panel "${j.id}"`),w===!0&&Te(T,M)},[]),V=P.useCallback(j=>{const{layout:N,panelDataArray:L}=R.current,{collapsedSize:M=0,collapsible:w,panelSize:T}=Ve(L,j,N);return U(T!=null,`Panel size not found for panel "${j.id}"`),!w||He(T,M)>0},[]),Y=P.useCallback(j=>{const{panelDataArray:N}=R.current;N.push(j),N.sort((L,M)=>{const w=L.order,T=M.order;return w==null&&T==null?0:w==null?-1:T==null?1:w-T}),R.current.panelDataArrayChanged=!0,S()},[S]);We(()=>{if(R.current.panelDataArrayChanged){R.current.panelDataArrayChanged=!1;const{autoSaveId:j,onLayout:N,storage:L}=A.current,{layout:M,panelDataArray:w}=R.current;let T=null;if(j){const z=Oc(j,w,L);z&&(C.current=new Map(Object.entries(z.expandToSizes)),T=z.layout)}T==null&&(T=Mc({panelDataArray:w}));const B=Vo({layout:T,panelConstraints:w.map(z=>z.constraints)});_o(M,B)||(y(B),R.current.layout=B,N&&N(B),Ze(w,B,b.current))}}),We(()=>{const j=R.current;return()=>{j.layout=[]}},[]);const X=P.useCallback(j=>{let N=!1;const L=g.current;return L&&window.getComputedStyle(L,null).getPropertyValue("direction")==="rtl"&&(N=!0),function(w){w.preventDefault();const T=g.current;if(!T)return()=>null;const{direction:B,dragState:z,id:H,keyboardResizeBy:F,onLayout:q}=A.current,{layout:D,panelDataArray:O}=R.current,{initialLayout:oe}=z??{},le=Zr(H,j,T);let J=Nc(w,j,B,z,F,T);const Z=B==="horizontal";Z&&N&&(J=-J);const he=O.map(Ce=>Ce.constraints),we=st({delta:J,initialLayout:oe??D,panelConstraints:he,pivotIndices:le,prevLayout:D,trigger:Fr(w)?"keyboard":"mouse-or-touch"}),ge=!St(D,we);($r(w)||Wr(w))&&I.current!=J&&(I.current=J,!ge&&J!==0?Z?un(j,J<0?Ur:Gr):un(j,J<0?Kr:qr):un(j,0)),ge&&(y(we),R.current.layout=we,q&&q(we),Ze(O,we,b.current))}},[]),G=P.useCallback((j,N)=>{const{onLayout:L}=A.current,{layout:M,panelDataArray:w}=R.current,T=w.map(D=>D.constraints),{panelSize:B,pivotIndices:z}=Ve(w,j,M);U(B!=null,`Panel size not found for panel "${j.id}"`);const F=Je(w,j)===w.length-1?B-N:N-B,q=st({delta:F,initialLayout:M,panelConstraints:T,pivotIndices:z,prevLayout:M,trigger:"imperative-api"});St(M,q)||(y(q),R.current.layout=q,L&&L(q),Ze(w,q,b.current))},[]),ne=P.useCallback((j,N)=>{const{layout:L,panelDataArray:M}=R.current,{collapsedSize:w=0,collapsible:T}=N,{collapsedSize:B=0,collapsible:z,maxSize:H=100,minSize:F=0}=j.constraints,{panelSize:q}=Ve(M,j,L);q!=null&&(T&&z&&Te(q,w)?Te(w,B)||G(j,B):q<F?G(j,F):q>H&&G(j,H))},[G]),ee=P.useCallback((j,N)=>{const{direction:L}=A.current,{layout:M}=R.current;if(!g.current)return;const w=Ft(j,g.current);U(w,`Drag handle element not found for id "${j}"`);const T=Qr(L,N);h({dragHandleId:j,dragHandleRect:w.getBoundingClientRect(),initialCursorPosition:T,initialLayout:M})},[]),Q=P.useCallback(()=>{h(null)},[]),pe=P.useCallback(j=>{const{panelDataArray:N}=R.current,L=Je(N,j);L>=0&&(N.splice(L,1),delete b.current[j.id],R.current.panelDataArrayChanged=!0,S())},[S]),ie=P.useMemo(()=>({collapsePanel:$,direction:o,dragState:E,expandPanel:k,getPanelSize:W,getPanelStyle:K,groupId:p,isPanelCollapsed:_,isPanelExpanded:V,reevaluatePanelConstraints:ne,registerPanel:Y,registerResizeHandle:X,resizePanel:G,startDragging:ee,stopDragging:Q,unregisterPanel:pe,panelGroupElement:g.current}),[$,E,o,k,W,K,p,_,V,ne,Y,X,G,ee,Q,pe]),de={display:"flex",flexDirection:o==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return P.createElement(_t.Provider,{value:ie},P.createElement(d,{...f,children:t,className:n,id:a,ref:g,style:{...de,...c},[ce.group]:"",[ce.groupDirection]:o,[ce.groupId]:p}))}const rs=P.forwardRef((e,t)=>P.createElement(os,{...e,forwardedRef:t}));os.displayName="PanelGroup";rs.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 Bc({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=Yr(s,t,o);U(c!==null,`No resize element found for id "${t}"`);const d=r.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[d].focus();break}}};return i.addEventListener("keydown",a),()=>{i.removeEventListener("keydown",a)}},[o,e,t,n])}function ss({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:o,id:i,onBlur:a,onClick:r,onDragging:s,onFocus:l,onPointerDown:c,onPointerUp:d,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:d});P.useEffect(()=>{S.current.onClick=r,S.current.onDragging=s,S.current.onPointerDown=c,S.current.onPointerUp=d});const b=P.useContext(_t);if(b===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:C,groupId:I,registerResizeHandle:A,startDragging:R,stopDragging:$,panelGroupElement:k}=b,W=In(i),[K,_]=P.useState("inactive"),[V,Y]=P.useState(!1),[X,G]=P.useState(null),ne=P.useRef({state:K});We(()=>{ne.current.state=K}),P.useEffect(()=>{if(n)G(null);else{const ie=A(W);G(()=>ie)}},[n,W,A]);const ee=(h=o==null?void 0:o.coarse)!==null&&h!==void 0?h:15,Q=(x=o==null?void 0:o.fine)!==null&&x!==void 0?x:5;P.useEffect(()=>{if(n||X==null)return;const ie=y.current;U(ie,"Element ref not attached");let de=!1;return wc(W,ie,C,{coarse:ee,fine:Q},(N,L,M)=>{if(!L){_("inactive");return}switch(N){case"down":{_("drag"),de=!1,U(M,'Expected event to be defined for "down" action'),R(W,M);const{onDragging:w,onPointerDown:T}=S.current;w==null||w(!0),T==null||T();break}case"move":{const{state:w}=ne.current;de=!0,w!=="drag"&&_("hover"),U(M,'Expected event to be defined for "move" action'),X(M);break}case"up":{_("hover"),$();const{onClick:w,onDragging:T,onPointerUp:B}=S.current;T==null||T(!1),B==null||B(),de||w==null||w();break}}})},[ee,C,n,Q,A,W,X,R,$]),Bc({disabled:n,handleId:W,resizeHandler:X,panelGroupElement:k});const pe={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:{...pe,...f},tabIndex:p,[ce.groupDirection]:C,[ce.groupId]:I,[ce.resizeHandle]:"",[ce.resizeHandleActive]:K==="drag"?"pointer":V?"keyboard":void 0,[ce.resizeHandleEnabled]:!n,[ce.resizeHandleId]:W,[ce.resizeHandleState]:K})}ss.displayName="PanelResizeHandle";var $t="Dialog",[is,Vc]=pt($t),[Fc,be]=is($t),as=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:a,modal:r=!0}=e,s=u.useRef(null),l=u.useRef(null),[c,d]=Pt({prop:o,defaultProp:i??!1,onChange:a,caller:$t});return v.jsxRuntimeExports.jsx(Fc,{scope:t,triggerRef:s,contentRef:l,contentId:$e(),titleId:$e(),descriptionId:$e(),open:c,onOpenChange:d,onOpenToggle:u.useCallback(()=>d(f=>!f),[d]),modal:r,children:n})};as.displayName=$t;var ls="DialogTrigger",cs=u.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=be(ls,n),a=se.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:re(e.onClick,i.onOpenToggle)})});cs.displayName=ls;var Ln="DialogPortal",[$c,us]=is(Ln,{forceMount:void 0}),ds=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,a=be(Ln,t);return v.jsxRuntimeExports.jsx($c,{scope:t,forceMount:n,children:u.Children.map(o,r=>v.jsxRuntimeExports.jsx(ht,{present:n||a.open,children:v.jsxRuntimeExports.jsx(Lt,{asChild:!0,container:i,children:r})}))})};ds.displayName=Ln;var Dt="DialogOverlay",fs=u.forwardRef((e,t)=>{const n=us(Dt,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,a=be(Dt,e.__scopeDialog);return a.modal?v.jsxRuntimeExports.jsx(ht,{present:o||a.open,children:v.jsxRuntimeExports.jsx(Hc,{...i,ref:t})}):null});fs.displayName=Dt;var Wc=se.createSlot("DialogOverlay.RemoveScroll"),Hc=u.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=be(Dt,n);return v.jsxRuntimeExports.jsx(Ot,{as:Wc,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",ps=u.forwardRef((e,t)=>{const n=us(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(Uc,{...i,ref:t}):v.jsxRuntimeExports.jsx(Gc,{...i,ref:t})})});ps.displayName=Ue;var Uc=u.forwardRef((e,t)=>{const n=be(Ue,e.__scopeDialog),o=u.useRef(null),i=se.useComposedRefs(t,n.contentRef,o);return u.useEffect(()=>{const a=o.current;if(a)return Tn(a)},[]),v.jsxRuntimeExports.jsx(hs,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:re(e.onCloseAutoFocus,a=>{var r;a.preventDefault(),(r=n.triggerRef.current)==null||r.focus()}),onPointerDownOutside:re(e.onPointerDownOutside,a=>{const r=a.detail.originalEvent,s=r.button===0&&r.ctrlKey===!0;(r.button===2||s)&&a.preventDefault()}),onFocusOutside:re(e.onFocusOutside,a=>a.preventDefault())})}),Gc=u.forwardRef((e,t)=>{const n=be(Ue,e.__scopeDialog),o=u.useRef(!1),i=u.useRef(!1);return v.jsxRuntimeExports.jsx(hs,{...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()}})}),hs=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...r}=e,s=be(Ue,n),l=u.useRef(null),c=se.useComposedRefs(t,l);return Rn(),v.jsxRuntimeExports.jsxs(v.jsxRuntimeExports.Fragment,{children:[v.jsxRuntimeExports.jsx(Mt,{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(qc,{titleId:s.titleId}),v.jsxRuntimeExports.jsx(Yc,{contentRef:l,descriptionId:s.descriptionId})]})]})}),kn="DialogTitle",ms=u.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=be(kn,n);return v.jsxRuntimeExports.jsx(te.h2,{id:i.titleId,...o,ref:t})});ms.displayName=kn;var gs="DialogDescription",vs=u.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=be(gs,n);return v.jsxRuntimeExports.jsx(te.p,{id:i.descriptionId,...o,ref:t})});vs.displayName=gs;var xs="DialogClose",ys=u.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=be(xs,n);return v.jsxRuntimeExports.jsx(te.button,{type:"button",...o,ref:t,onClick:re(e.onClick,()=>i.onOpenChange(!1))})});ys.displayName=xs;function On(e){return e?"open":"closed"}var Es="DialogTitleWarning",[Kc,Ss]=za(Es,{contentName:Ue,titleName:kn,docsSlug:"dialog"}),qc=({titleId:e})=>{const t=Ss(Es),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 u.useEffect(()=>{if(e){const o=document.getElementById(e)}},[n,e]),null},Xc="DialogDescriptionWarning",Yc=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ss(Xc).contentName}}.`;return u.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},bs=as,ws=cs,Rs=ds,Cs=fs,Ps=ps,js=ms,Ts=vs,zn=ys;function Zc({...e}){return v.jsxRuntimeExports.jsx(bs,{"data-slot":"dialog",...e})}function Jc({...e}){return v.jsxRuntimeExports.jsx(ws,{"data-slot":"dialog-trigger",...e})}function Ds({...e}){return v.jsxRuntimeExports.jsx(Rs,{"data-slot":"dialog-portal",...e})}function Qc({...e}){return v.jsxRuntimeExports.jsx(zn,{"data-slot":"dialog-close",...e})}function As({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(Cs,{"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 eu=u.forwardRef(({className:e,children:t,showCloseButton:n=!0,disabled:o=!1,backdrop:i="opaque",...a},r)=>v.jsxRuntimeExports.jsx(m.AnimatePresence,{children:v.jsxRuntimeExports.jsxs(Ds,{"data-slot":"dialog-portal",children:[v.jsxRuntimeExports.jsx(As,{backdrop:i}),v.jsxRuntimeExports.jsxs(Ps,{"data-slot":"dialog-content",ref:r,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),...a,children:[t,n&&v.jsxRuntimeExports.jsx(zn,{"data-slot":"dialog-close",asChild:!0,className:"absolute top-3 right-4 disabled:pointer-events-none",children:v.jsxRuntimeExports.jsx("div",{children:v.jsxRuntimeExports.jsxs(bi.Button,{isIconOnly:!0,variant:"light",radius:"full","aria-label":"Close",disabled:o,className:"p-0 w-[36px] h-[36px] min-w-auto bg-default-100 hover:bg-default-200 text-default-500 hover:text-default-600 dark:bg-default-100 dark:hover:bg-default-200 dark:text-default-500 dark:hover:text-default-600 disabled:opacity-50 disabled:pointer-events-none",children:[v.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",fill:"currentColor",role:"img","aria-hidden":"true",children:[v.jsxRuntimeExports.jsx("path",{fill:"none",d:"M0 0h21v21H0z"}),v.jsxRuntimeExports.jsx("path",{d:"m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z"})]}),v.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})})})]})]})}));function tu({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 nu({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 ou({className:e,...t}){return v.jsxRuntimeExports.jsx(js,{"data-slot":"dialog-title",className:ue.cn("text-lg leading-none font-semibold",e),...t})}function ru({className:e,...t}){return v.jsxRuntimeExports.jsx(Ts,{"data-slot":"dialog-description",className:ue.cn("text-muted-foreground text-sm",e),...t})}function Is(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ns=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"}),su="VisuallyHidden",Ms=u.forwardRef((e,t)=>v.jsxRuntimeExports.jsx(te.span,{...e,ref:t,style:{...Ns,...e.style}}));Ms.displayName=su;var iu=Ms;function gn(e,[t,n]){return Math.min(n,Math.max(t,e))}var au=[" ","Enter","ArrowUp","ArrowDown"],lu=[" ","Enter"],Ge="Select",[Wt,Ht,cu]=cr(Ge),[nt,ud]=pt(Ge,[cu,Pn]),Ut=Pn(),[uu,Oe]=nt(Ge),[du,fu]=nt(Ge),Ls=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:i,onOpenChange:a,value:r,defaultValue:s,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:p,required:g,form:E}=e,h=Ut(t),[x,y]=u.useState(null),[S,b]=u.useState(null),[C,I]=u.useState(!1),A=ur(c),[R,$]=Pt({prop:o,defaultProp:i??!1,onChange:a,caller:Ge}),[k,W]=Pt({prop:r,defaultProp:s,onChange:l,caller:Ge}),K=u.useRef(null),_=x?E||!!x.closest("form"):!0,[V,Y]=u.useState(new Set),X=Array.from(V).map(G=>G.props.value).join(";");return v.jsxRuntimeExports.jsx(Cr,{...h,children:v.jsxRuntimeExports.jsxs(uu,{required:g,scope:t,trigger:x,onTriggerChange:y,valueNode:S,onValueNodeChange:b,valueNodeHasChildren:C,onValueNodeHasChildrenChange:I,contentId:$e(),value:k,onValueChange:W,open:R,onOpenChange:$,dir:A,triggerPointerDownPosRef:K,disabled:p,children:[v.jsxRuntimeExports.jsx(Wt.Provider,{scope:t,children:v.jsxRuntimeExports.jsx(du,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(G=>{Y(ne=>new Set(ne).add(G))},[]),onNativeOptionRemove:u.useCallback(G=>{Y(ne=>{const ee=new Set(ne);return ee.delete(G),ee})},[]),children:n})}),_?v.jsxRuntimeExports.jsxs(si,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:f,value:k,onChange:G=>W(G.target.value),disabled:p,form:E,children:[k===void 0?v.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from(V)]},X):null]})})};Ls.displayName=Ge;var ks="SelectTrigger",Os=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...i}=e,a=Ut(n),r=Oe(ks,n),s=r.disabled||o,l=se.useComposedRefs(t,r.onTriggerChange),c=Ht(n),d=u.useRef("touch"),[f,p,g]=ai(h=>{const x=c().filter(b=>!b.disabled),y=x.find(b=>b.value===r.value),S=li(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(Pr,{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":ii(r.value)?"":void 0,...i,ref:l,onClick:re(i.onClick,h=>{h.currentTarget.focus(),d.current!=="mouse"&&E(h)}),onPointerDown:re(i.onPointerDown,h=>{d.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:re(i.onKeyDown,h=>{const x=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&p(h.key),!(x&&h.key===" ")&&au.includes(h.key)&&(E(),h.preventDefault())})})})});Os.displayName=ks;var zs="SelectValue",_s=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:i,children:a,placeholder:r="",...s}=e,l=Oe(zs,n),{onValueNodeHasChildrenChange:c}=l,d=a!==void 0,f=se.useComposedRefs(t,l.onValueNodeChange);return fe(()=>{c(d)},[c,d]),v.jsxRuntimeExports.jsx(te.span,{...s,ref:f,style:{pointerEvents:"none"},children:ii(l.value)?v.jsxRuntimeExports.jsx(v.jsxRuntimeExports.Fragment,{children:r}):a})});_s.displayName=zs;var pu="SelectIcon",Bs=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...i}=e;return v.jsxRuntimeExports.jsx(te.span,{"aria-hidden":!0,...i,ref:t,children:o||"▼"})});Bs.displayName=pu;var hu="SelectPortal",Vs=e=>v.jsxRuntimeExports.jsx(Lt,{asChild:!0,...e});Vs.displayName=hu;var Ke="SelectContent",Fs=u.forwardRef((e,t)=>{const n=Oe(Ke,e.__scopeSelect),[o,i]=u.useState();if(fe(()=>{i(new DocumentFragment)},[]),!n.open){const a=o;return a?bn.createPortal(v.jsxRuntimeExports.jsx($s,{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(Ws,{...e,ref:t})});Fs.displayName=Ke;var Ee=10,[$s,ze]=nt(Ke),mu="SelectContentImpl",gu=se.createSlot("SelectContent.RemoveScroll"),Ws=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:r,side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:g,sticky:E,hideWhenDetached:h,avoidCollisions:x,...y}=e,S=Oe(Ke,n),[b,C]=u.useState(null),[I,A]=u.useState(null),R=se.useComposedRefs(t,w=>C(w)),[$,k]=u.useState(null),[W,K]=u.useState(null),_=Ht(n),[V,Y]=u.useState(!1),X=u.useRef(!1);u.useEffect(()=>{if(b)return Tn(b)},[b]),Rn();const G=u.useCallback(w=>{const[T,...B]=_().map(F=>F.ref.current),[z]=B.slice(-1),H=document.activeElement;for(const F of w)if(F===H||(F==null||F.scrollIntoView({block:"nearest"}),F===T&&I&&(I.scrollTop=0),F===z&&I&&(I.scrollTop=I.scrollHeight),F==null||F.focus(),document.activeElement!==H))return},[_,I]),ne=u.useCallback(()=>G([$,b]),[G,$,b]);u.useEffect(()=>{V&&ne()},[V,ne]);const{onOpenChange:ee,triggerPointerDownPosRef:Q}=S;u.useEffect(()=>{if(b){let w={x:0,y:0};const T=z=>{var H,F;w={x:Math.abs(Math.round(z.pageX)-(((H=Q.current)==null?void 0:H.x)??0)),y:Math.abs(Math.round(z.pageY)-(((F=Q.current)==null?void 0:F.y)??0))}},B=z=>{w.x<=10&&w.y<=10?z.preventDefault():b.contains(z.target)||ee(!1),document.removeEventListener("pointermove",T),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",B,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",B,{capture:!0})}}},[b,ee,Q]),u.useEffect(()=>{const w=()=>ee(!1);return window.addEventListener("blur",w),window.addEventListener("resize",w),()=>{window.removeEventListener("blur",w),window.removeEventListener("resize",w)}},[ee]);const[pe,ie]=ai(w=>{const T=_().filter(H=>!H.disabled),B=T.find(H=>H.ref.current===document.activeElement),z=li(T,w,B);z&&setTimeout(()=>z.ref.current.focus())}),de=u.useCallback((w,T,B)=>{const z=!X.current&&!B;(S.value!==void 0&&S.value===T||z)&&(k(w),z&&(X.current=!0))},[S.value]),j=u.useCallback(()=>b==null?void 0:b.focus(),[b]),N=u.useCallback((w,T,B)=>{const z=!X.current&&!B;(S.value!==void 0&&S.value===T||z)&&K(w)},[S.value]),L=o==="popper"?vn:Hs,M=L===vn?{side:s,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:g,sticky:E,hideWhenDetached:h,avoidCollisions:x}:{};return v.jsxRuntimeExports.jsx($s,{scope:n,content:b,viewport:I,onViewportChange:A,itemRefCallback:de,selectedItem:$,onItemLeave:j,itemTextRefCallback:N,focusSelectedItem:ne,selectedItemText:W,position:o,isPositioned:V,searchRef:pe,children:v.jsxRuntimeExports.jsx(Ot,{as:gu,allowPinchZoom:!0,children:v.jsxRuntimeExports.jsx(Mt,{asChild:!0,trapped:S.open,onMountAutoFocus:w=>{w.preventDefault()},onUnmountAutoFocus:re(i,w=>{var T;(T=S.trigger)==null||T.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,...M,onPlaced:()=>Y(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:re(y.onKeyDown,w=>{const T=w.ctrlKey||w.altKey||w.metaKey;if(w.key==="Tab"&&w.preventDefault(),!T&&w.key.length===1&&ie(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)&&(z=z.slice().reverse()),["ArrowUp","ArrowDown"].includes(w.key)){const H=w.target,F=z.indexOf(H);z=z.slice(F+1)}setTimeout(()=>G(z)),w.preventDefault()}})})})})})})});Ws.displayName=mu;var vu="SelectItemAlignedPosition",Hs=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...i}=e,a=Oe(Ke,n),r=ze(Ke,n),[s,l]=u.useState(null),[c,d]=u.useState(null),f=se.useComposedRefs(t,R=>d(R)),p=Ht(n),g=u.useRef(!1),E=u.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:y,focusSelectedItem:S}=r,b=u.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&h&&x&&y){const R=a.trigger.getBoundingClientRect(),$=c.getBoundingClientRect(),k=a.valueNode.getBoundingClientRect(),W=y.getBoundingClientRect();if(a.dir!=="rtl"){const H=W.left-$.left,F=k.left-H,q=R.left-F,D=R.width+q,O=Math.max(D,$.width),oe=window.innerWidth-Ee,le=gn(F,[Ee,Math.max(Ee,oe-O)]);s.style.minWidth=D+"px",s.style.left=le+"px"}else{const H=$.right-W.right,F=window.innerWidth-k.right-H,q=window.innerWidth-R.right-F,D=R.width+q,O=Math.max(D,$.width),oe=window.innerWidth-Ee,le=gn(F,[Ee,Math.max(Ee,oe-O)]);s.style.minWidth=D+"px",s.style.right=le+"px"}const K=p(),_=window.innerHeight-Ee*2,V=h.scrollHeight,Y=window.getComputedStyle(c),X=parseInt(Y.borderTopWidth,10),G=parseInt(Y.paddingTop,10),ne=parseInt(Y.borderBottomWidth,10),ee=parseInt(Y.paddingBottom,10),Q=X+G+V+ee+ne,pe=Math.min(x.offsetHeight*5,Q),ie=window.getComputedStyle(h),de=parseInt(ie.paddingTop,10),j=parseInt(ie.paddingBottom,10),N=R.top+R.height/2-Ee,L=_-N,M=x.offsetHeight/2,w=x.offsetTop+M,T=X+G+w,B=Q-T;if(T<=N){const H=K.length>0&&x===K[K.length-1].ref.current;s.style.bottom="0px";const F=c.clientHeight-h.offsetTop-h.offsetHeight,q=Math.max(L,M+(H?j:0)+F+ne),D=T+q;s.style.height=D+"px"}else{const H=K.length>0&&x===K[0].ref.current;s.style.top="0px";const q=Math.max(N,X+h.offsetTop+(H?de:0)+M)+B;s.style.height=q+"px",h.scrollTop=T-N+h.offsetTop}s.style.margin=`${Ee}px 0`,s.style.minHeight=pe+"px",s.style.maxHeight=_+"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,I]=u.useState();fe(()=>{c&&I(window.getComputedStyle(c).zIndex)},[c]);const A=u.useCallback(R=>{R&&E.current===!0&&(b(),S==null||S(),E.current=!1)},[b,S]);return v.jsxRuntimeExports.jsx(yu,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:g,onScrollButtonChange:A,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}})})})});Hs.displayName=vu;var xu="SelectPopperPosition",vn=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:i=Ee,...a}=e,r=Ut(n);return v.jsxRuntimeExports.jsx(jr,{...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=xu;var[yu,_n]=nt(Ke,{}),xn="SelectViewport",Us=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...i}=e,a=ze(xn,n),r=_n(xn,n),s=se.useComposedRefs(t,a.onViewportChange),l=u.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:re(i.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=r;if(p!=null&&p.current&&f){const g=Math.abs(l.current-d.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"&&(d.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Us.displayName=xn;var Gs="SelectGroup",[Eu,Su]=nt(Gs),Ks=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,i=$e();return v.jsxRuntimeExports.jsx(Eu,{scope:n,id:i,children:v.jsxRuntimeExports.jsx(te.div,{role:"group","aria-labelledby":i,...o,ref:t})})});Ks.displayName=Gs;var qs="SelectLabel",Xs=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,i=Su(qs,n);return v.jsxRuntimeExports.jsx(te.div,{id:i.id,...o,ref:t})});Xs.displayName=qs;var At="SelectItem",[bu,Ys]=nt(At),Zs=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:i=!1,textValue:a,...r}=e,s=Oe(At,n),l=ze(At,n),c=s.value===o,[d,f]=u.useState(a??""),[p,g]=u.useState(!1),E=se.useComposedRefs(t,S=>{var b;return(b=l.itemRefCallback)==null?void 0:b.call(l,S,o,i)}),h=$e(),x=u.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(bu,{scope:n,value:o,disabled:i,textId:h,isSelected:c,onItemTextChange:u.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:d,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:re(r.onFocus,()=>g(!0)),onBlur:re(r.onBlur,()=>g(!1)),onClick:re(r.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:re(r.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:re(r.onPointerDown,S=>{x.current=S.pointerType}),onPointerMove:re(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:re(r.onPointerLeave,S=>{var b;S.currentTarget===document.activeElement&&((b=l.onItemLeave)==null||b.call(l))}),onKeyDown:re(r.onKeyDown,S=>{var C;((C=l.searchRef)==null?void 0:C.current)!==""&&S.key===" "||(lu.includes(S.key)&&y(),S.key===" "&&S.preventDefault())})})})})});Zs.displayName=At;var at="SelectItemText",Js=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:i,...a}=e,r=Oe(at,n),s=ze(at,n),l=Ys(at,n),c=fu(at,n),[d,f]=u.useState(null),p=se.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=d==null?void 0:d.textContent,E=u.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]})});Js.displayName=at;var Qs="SelectItemIndicator",ei=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Ys(Qs,n).isSelected?v.jsxRuntimeExports.jsx(te.span,{"aria-hidden":!0,...o,ref:t}):null});ei.displayName=Qs;var yn="SelectScrollUpButton",ti=u.forwardRef((e,t)=>{const n=ze(yn,e.__scopeSelect),o=_n(yn,e.__scopeSelect),[i,a]=u.useState(!1),r=se.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(oi,{...e,ref:r,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});ti.displayName=yn;var En="SelectScrollDownButton",ni=u.forwardRef((e,t)=>{const n=ze(En,e.__scopeSelect),o=_n(En,e.__scopeSelect),[i,a]=u.useState(!1),r=se.useComposedRefs(t,o.onScrollButtonChange);return fe(()=>{if(n.viewport&&n.isPositioned){let s=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;a(d)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?v.jsxRuntimeExports.jsx(oi,{...e,ref:r,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});ni.displayName=En;var oi=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...i}=e,a=ze("SelectScrollButton",n),r=u.useRef(null),s=Ht(n),l=u.useCallback(()=>{r.current!==null&&(window.clearInterval(r.current),r.current=null)},[]);return u.useEffect(()=>()=>l(),[l]),fe(()=>{var d;const c=s().find(f=>f.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),v.jsxRuntimeExports.jsx(te.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:re(i.onPointerDown,()=>{r.current===null&&(r.current=window.setInterval(o,50))}),onPointerMove:re(i.onPointerMove,()=>{var c;(c=a.onItemLeave)==null||c.call(a),r.current===null&&(r.current=window.setInterval(o,50))}),onPointerLeave:re(i.onPointerLeave,()=>{l()})})}),wu="SelectSeparator",ri=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return v.jsxRuntimeExports.jsx(te.div,{"aria-hidden":!0,...o,ref:t})});ri.displayName=wu;var Sn="SelectArrow",Ru=u.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,i=Ut(n),a=Oe(Sn,n),r=ze(Sn,n);return a.open&&r.position==="popper"?v.jsxRuntimeExports.jsx(Tr,{...i,...o,ref:t}):null});Ru.displayName=Sn;var Cu="SelectBubbleInput",si=u.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const i=u.useRef(null),a=se.useComposedRefs(o,i),r=Is(t);return u.useEffect(()=>{const s=i.current;if(!s)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(r!==t&&d){const f=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(f)}},[r,t]),v.jsxRuntimeExports.jsx(te.select,{...n,style:{...Ns,...n.style},ref:a,defaultValue:t})});si.displayName=Cu;function ii(e){return e===""||e===void 0}function ai(e){const t=ke(e),n=u.useRef(""),o=u.useRef(0),i=u.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=u.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,i,a]}function li(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=Pu(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 Pu(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var ju=Ls,Tu=Os,Du=_s,Au=Bs,Iu=Vs,Nu=Fs,Mu=Us,Lu=Ks,ku=Xs,Ou=Zs,zu=Js,_u=ei,Bu=ti,Vu=ni,Fu=ri;function $u({...e}){return v.jsxRuntimeExports.jsx(ju,{"data-slot":"select",...e})}function Wu({...e}){return v.jsxRuntimeExports.jsx(Lu,{"data-slot":"select-group",...e})}function Hu({...e}){return v.jsxRuntimeExports.jsx(Du,{"data-slot":"select-value",...e})}function Uu({className:e,size:t="default",children:n,...o}){return v.jsxRuntimeExports.jsxs(Tu,{"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(Au,{asChild:!0,children:v.jsxRuntimeExports.jsx(Dn,{className:"size-4 opacity-50"})})]})}function Gu({className:e,children:t,position:n="popper",...o}){return v.jsxRuntimeExports.jsx(Iu,{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(ci,{}),v.jsxRuntimeExports.jsx(Mu,{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(ui,{})]})})}function Ku({className:e,...t}){return v.jsxRuntimeExports.jsx(ku,{"data-slot":"select-label",className:ue.cn("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function qu({className:e,children:t,...n}){return v.jsxRuntimeExports.jsxs(Ou,{"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(_u,{children:v.jsxRuntimeExports.jsx(_r,{className:"size-4"})})}),v.jsxRuntimeExports.jsx(zu,{children:t})]})}function Xu({className:e,...t}){return v.jsxRuntimeExports.jsx(Fu,{"data-slot":"select-separator",className:ue.cn("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function ci({className:e,...t}){return v.jsxRuntimeExports.jsx(Bu,{"data-slot":"select-scroll-up-button",className:ue.cn("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsxRuntimeExports.jsx(dc,{className:"size-4"})})}function ui({className:e,...t}){return v.jsxRuntimeExports.jsx(Vu,{"data-slot":"select-scroll-down-button",className:ue.cn("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsxRuntimeExports.jsx(Dn,{className:"size-4"})})}var Yu=Object.defineProperty,Zu=Object.defineProperties,Ju=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,di=Object.prototype.hasOwnProperty,fi=Object.prototype.propertyIsEnumerable,$o=(e,t,n)=>t in e?Yu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qu=(e,t)=>{for(var n in t||(t={}))di.call(t,n)&&$o(e,n,t[n]);if(It)for(var n of It(t))fi.call(t,n)&&$o(e,n,t[n]);return e},ed=(e,t)=>Zu(e,Ju(t)),td=(e,t)=>{var n={};for(var o in e)di.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&It)for(var o of It(e))t.indexOf(o)<0&&fi.call(e,o)&&(n[o]=e[o]);return n};function nd(e){let t=setTimeout(e,0),n=setTimeout(e,10),o=setTimeout(e,50);return[t,n,o]}function od(e){let t=u.useRef();return u.useEffect(()=>{t.current=e}),t.current}var rd=18,pi=40,sd=`${pi}px`,id=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function ad({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:o}){let[i,a]=u.useState(!1),[r,s]=u.useState(!1),[l,c]=u.useState(!1),d=u.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&i&&r,[i,r,n]),f=u.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-rd,S=x;document.querySelectorAll(id).length===0&&document.elementFromPoint(y,S)===p||(a(!0),c(!0))},[e,t,l,n]);return u.useEffect(()=>{let p=e.current;if(!p||n==="none")return;function g(){let h=window.innerWidth-p.getBoundingClientRect().right;s(h>=pi)}g();let E=setInterval(g,1e3);return()=>{clearInterval(E)}},[e,n]),u.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:d,PWM_BADGE_SPACE_WIDTH:sd}}var hi=u.createContext({}),mi=u.forwardRef((e,t)=>{var n=e,{value:o,onChange:i,maxLength:a,textAlign:r="left",pattern:s,placeholder:l,inputMode:c="numeric",onComplete:d,pushPasswordManagerStrategy:f="increase-width",pasteTransformer:p,containerClassName:g,noScriptCSSFallback:E=ld,render:h,children:x}=n,y=td(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),S,b,C,I,A;let[R,$]=u.useState(typeof y.defaultValue=="string"?y.defaultValue:""),k=o??R,W=od(k),K=u.useCallback(D=>{i==null||i(D),$(D)},[i]),_=u.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),V=u.useRef(null),Y=u.useRef(null),X=u.useRef({value:k,onChange:K,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"))}),G=u.useRef({prev:[(C=V.current)==null?void 0:C.selectionStart,(I=V.current)==null?void 0:I.selectionEnd,(A=V.current)==null?void 0:A.selectionDirection]});u.useImperativeHandle(t,()=>V.current,[]),u.useEffect(()=>{let D=V.current,O=Y.current;if(!D||!O)return;X.current.value!==D.value&&X.current.onChange(D.value),G.current.prev=[D.selectionStart,D.selectionEnd,D.selectionDirection];function oe(){if(document.activeElement!==D){de(null),N(null);return}let Z=D.selectionStart,he=D.selectionEnd,we=D.selectionDirection,ge=D.maxLength,Ce=D.value,Pe=G.current.prev,De=-1,Ae=-1,_e;if(Ce.length!==0&&Z!==null&&he!==null){let vi=Z===he,xi=Z===Ce.length&&Ce.length<ge;if(vi&&!xi){let Be=Z;if(Be===0)De=0,Ae=1,_e="forward";else if(Be===ge)De=Be-1,Ae=Be,_e="backward";else if(ge>1&&Ce.length>1){let Gt=0;if(Pe[0]!==null&&Pe[1]!==null){_e=Be<Pe[1]?"backward":"forward";let yi=Pe[0]===Pe[1]&&Pe[0]<ge;_e==="backward"&&!yi&&(Gt=-1)}De=Gt+Be,Ae=Gt+Be+1}}De!==-1&&Ae!==-1&&De!==Ae&&V.current.setSelectionRange(De,Ae,_e)}let Bn=De!==-1?De:Z,Vn=Ae!==-1?Ae:he,gi=_e??we;de(Bn),N(Vn),G.current.prev=[Bn,Vn,gi]}if(document.addEventListener("selectionchange",oe,{capture:!0}),oe(),document.activeElement===D&&pe(!0),!document.getElementById("input-otp-style")){let Z=document.createElement("style");if(Z.id="input-otp-style",document.head.appendChild(Z),Z.sheet){let he="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 { ${he} }`),rt(Z.sheet,`[data-input-otp]:-webkit-autofill { ${he} }`),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",`${D.clientHeight}px`)};le();let J=new ResizeObserver(le);return J.observe(D),()=>{document.removeEventListener("selectionchange",oe,{capture:!0}),J.disconnect()}},[]);let[ne,ee]=u.useState(!1),[Q,pe]=u.useState(!1),[ie,de]=u.useState(null),[j,N]=u.useState(null);u.useEffect(()=>{nd(()=>{var D,O,oe,le;(D=V.current)==null||D.dispatchEvent(new Event("input"));let J=(O=V.current)==null?void 0:O.selectionStart,Z=(oe=V.current)==null?void 0:oe.selectionEnd,he=(le=V.current)==null?void 0:le.selectionDirection;J!==null&&Z!==null&&(de(J),N(Z),G.current.prev=[J,Z,he])})},[k,Q]),u.useEffect(()=>{W!==void 0&&k!==W&&W.length<a&&k.length===a&&(d==null||d(k))},[a,d,W,k]);let L=ad({containerRef:Y,inputRef:V,pushPasswordManagerStrategy:f,isFocused:Q}),M=u.useCallback(D=>{let O=D.currentTarget.value.slice(0,a);if(O.length>0&&_&&!_.test(O)){D.preventDefault();return}typeof W=="string"&&O.length<W.length&&document.dispatchEvent(new Event("selectionchange")),K(O)},[a,K,W,_]),w=u.useCallback(()=>{var D;if(V.current){let O=Math.min(V.current.value.length,a-1),oe=V.current.value.length;(D=V.current)==null||D.setSelectionRange(O,oe),de(O),N(oe)}pe(!0)},[a]),T=u.useCallback(D=>{var O,oe;let le=V.current;if(!p&&(!X.current.isIOS||!D.clipboardData||!le))return;let J=D.clipboardData.getData("text/plain"),Z=p?p(J):J;D.preventDefault();let he=(O=V.current)==null?void 0:O.selectionStart,we=(oe=V.current)==null?void 0:oe.selectionEnd,ge=(he!==we?k.slice(0,he)+Z+k.slice(we):k.slice(0,he)+Z+k.slice(he)).slice(0,a);if(ge.length>0&&_&&!_.test(ge))return;le.value=ge,K(ge);let Ce=Math.min(ge.length,a-1),Pe=ge.length;le.setSelectionRange(Ce,Pe),de(Ce),N(Pe)},[a,K,_,k]),B=u.useMemo(()=>({position:"relative",cursor:y.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[y.disabled]),z=u.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=u.useMemo(()=>u.createElement("input",ed(Qu({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":ie,"data-input-otp-mse":j,inputMode:c,pattern:_==null?void 0:_.source,"aria-placeholder":l,style:z,maxLength:a,value:k,ref:V,onPaste:D=>{var O;T(D),(O=y.onPaste)==null||O.call(y,D)},onChange:M,onMouseOver:D=>{var O;ee(!0),(O=y.onMouseOver)==null||O.call(y,D)},onMouseLeave:D=>{var O;ee(!1),(O=y.onMouseLeave)==null||O.call(y,D)},onFocus:D=>{var O;w(),(O=y.onFocus)==null||O.call(y,D)},onBlur:D=>{var O;pe(!1),(O=y.onBlur)==null||O.call(y,D)}})),[M,w,T,c,z,a,j,ie,y,_==null?void 0:_.source,k]),F=u.useMemo(()=>({slots:Array.from({length:a}).map((D,O)=>{var oe;let le=Q&&ie!==null&&j!==null&&(ie===j&&O===ie||O>=ie&&O<j),J=k[O]!==void 0?k[O]:null,Z=k[0]!==void 0?null:(oe=l==null?void 0:l[O])!=null?oe:null;return{char:J,placeholderChar:Z,isActive:le,hasFakeCaret:le&&J===null}}),isFocused:Q,isHovering:!y.disabled&&ne}),[Q,ne,a,j,ie,y.disabled,k]),q=u.useMemo(()=>h?h(F):u.createElement(hi.Provider,{value:F},x),[x,F,h]);return u.createElement(u.Fragment,null,E!==null&&u.createElement("noscript",null,u.createElement("style",null,E)),u.createElement("div",{ref:Y,"data-input-otp-container":!0,style:B,className:g},q,u.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},H)))});mi.displayName="Input";function rt(e,t){try{e.insertRule(t)}catch{}}var ld=`
|
|
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=Pr;exports.Arrow=Tr;exports.Badge=Ma;exports.Check=_r;exports.ChevronDown=Dn;exports.Close=zn;exports.Content=jr;exports.Content$1=Ps;exports.Description=Ts;exports.DismissableLayer=Nt;exports.FocusScope=Mt;exports.Input=ir;exports.Lt=mi;exports.Modal=Zc;exports.ModalClose=Qc;exports.ModalContent=eu;exports.ModalDescription=ru;exports.ModalFooter=nu;exports.ModalHeader=tu;exports.ModalOverlay=As;exports.ModalPortal=Ds;exports.ModalTitle=ou;exports.ModalTrigger=Jc;exports.Overlay=Cs;exports.Panel=Vr;exports.PanelGroup=rs;exports.PanelResizeHandle=ss;exports.Portal=Lt;exports.Portal$1=Rs;exports.Presence=ht;exports.Primitive=te;exports.ReactRemoveScroll=Ot;exports.Root=bs;exports.Root$1=iu;exports.Root2=Cr;exports.Select=$u;exports.SelectContent=Gu;exports.SelectGroup=Wu;exports.SelectItem=qu;exports.SelectLabel=Ku;exports.SelectScrollDownButton=ui;exports.SelectScrollUpButton=ci;exports.SelectSeparator=Xu;exports.SelectTrigger=Uu;exports.SelectValue=Hu;exports.Switch=lr;exports.Title=js;exports.Trigger=ws;exports.WarningProvider=Kc;exports.clamp=gn;exports.composeEventHandlers=re;exports.createCollection=cr;exports.createContextScope=pt;exports.createDialogScope=Vc;exports.createLucideIcon=zt;exports.createPopperScope=Pn;exports.cva=wn;exports.dispatchDiscreteCustomEvent=ar;exports.hideOthers=Tn;exports.jt=hi;exports.useCallbackRef=ke;exports.useControllableState=Pt;exports.useDirection=ur;exports.useFocusGuards=Rn;exports.useId=$e;exports.useLayoutEffect2=fe;exports.usePrevious=Is;exports.useSize=mr;
|
|
65
|
+
//# sourceMappingURL=index-DUhJE4fQ.js.map
|