@snagset/server 0.1.56 → 0.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/app.js +1 -0
  2. package/dist/app.js.map +1 -1
  3. package/dist/integrations/jira.js +6 -2
  4. package/dist/integrations/jira.js.map +1 -1
  5. package/dist/integrations/linear.js +6 -2
  6. package/dist/integrations/linear.js.map +1 -1
  7. package/dist/integrations/outbox.js +5 -2
  8. package/dist/integrations/outbox.js.map +1 -1
  9. package/dist/integrations/trello.js +26 -0
  10. package/dist/integrations/trello.js.map +1 -1
  11. package/dist/routes/integrations.js +58 -10
  12. package/dist/routes/integrations.js.map +1 -1
  13. package/package.json +1 -1
  14. package/static/dashboard/assets/{CompositeItem-B0Gv-UGy.js → CompositeItem-XBuzWv1L.js} +1 -1
  15. package/static/dashboard/assets/{CompositeList-DJzkqbsI.js → CompositeList-C2IVT2Po.js} +1 -1
  16. package/static/dashboard/assets/{ConfirmDialog-DrJjmykZ.js → ConfirmDialog-B9o4voIS.js} +1 -1
  17. package/static/dashboard/assets/{CopyButton-N4ZGq5sM.js → CopyButton-DLU4a9od.js} +1 -1
  18. package/static/dashboard/assets/{FieldItemContext-Btlb65DI.js → FieldItemContext-CM5jeOco.js} +1 -1
  19. package/static/dashboard/assets/{InstallTag-ErmrqxJG.js → InstallTag-CZO85i-P.js} +1 -1
  20. package/static/dashboard/assets/{InstanceRows-qItZIB6E.js → InstanceRows-D-tveODw.js} +1 -1
  21. package/static/dashboard/assets/{McpTokens-BANlGby-.js → McpTokens-DikOatOF.js} +1 -1
  22. package/static/dashboard/assets/{Picker-BGDXZjRG.js → Picker-lokRYiMC.js} +2 -2
  23. package/static/dashboard/assets/{SaveState-C5sUD5wu.js → SaveState-e4RnpJbD.js} +1 -1
  24. package/static/dashboard/assets/{_app-QhVaTUQt.js → _app-6KTAiiJs.js} +1 -1
  25. package/static/dashboard/assets/{_app-Bskz-yjz.js → _app-Dqyx0uzh.js} +1 -1
  26. package/static/dashboard/assets/{activity-RabDpuwi.js → activity-D87uMIpc.js} +1 -1
  27. package/static/dashboard/assets/{arrow-left-DJWxyBo6.js → arrow-left-Txus48to.js} +1 -1
  28. package/static/dashboard/assets/{avatar-CN3-8DpI.js → avatar-d0V38Rww.js} +1 -1
  29. package/static/dashboard/assets/{badge-C54dE8rx.js → badge-BpJT5EUT.js} +1 -1
  30. package/static/dashboard/assets/{card-Dxk95cVf.js → card-BqU7TCLe.js} +1 -1
  31. package/static/dashboard/assets/{check-CK4ao5He.js → check-T8owKS6W.js} +1 -1
  32. package/static/dashboard/assets/{chevron-down-OtEbsKDP.js → chevron-down-CPxjYKx7.js} +1 -1
  33. package/static/dashboard/assets/{chevron-right-DsIeYYan.js → chevron-right-BOLW380q.js} +1 -1
  34. package/static/dashboard/assets/{copy-oQJtUs23.js → copy-D7ySfk8w.js} +1 -1
  35. package/static/dashboard/assets/{createBaseUIEventDetails-CtitjO53.js → createBaseUIEventDetails-D5nICp6F.js} +1 -1
  36. package/static/dashboard/assets/{dialog-PoGeAS0T.js → dialog-C8j9bKc9.js} +1 -1
  37. package/static/dashboard/assets/{dropdown-menu-CnT2RuY9.js → dropdown-menu-7_qYsjof.js} +1 -1
  38. package/static/dashboard/assets/{forgot-C2yLPZRe.js → forgot-L_4h7Uc5.js} +1 -1
  39. package/static/dashboard/assets/{getPseudoElementBounds-1HRS6at-.js → getPseudoElementBounds-r9s2Gh_c.js} +1 -1
  40. package/static/dashboard/assets/{image-off-DUeMoP3X.js → image-off-DEk2KdgQ.js} +1 -1
  41. package/static/dashboard/assets/{index-DCtWnS4U.js → index-DBw3b5Rd.js} +9 -9
  42. package/static/dashboard/assets/{inertValue-DvQ1EW5I.js → inertValue-DPJM1mgv.js} +1 -1
  43. package/static/dashboard/assets/{invite-CGRft1Wf.js → invite-BQzST24s.js} +1 -1
  44. package/static/dashboard/assets/{label-Br7CuW71.js → label-BqqDq1Bf.js} +1 -1
  45. package/static/dashboard/assets/{layout-grid-D8FSCXx_.js → layout-grid-BaI-ZaQt.js} +1 -1
  46. package/static/dashboard/assets/me-BuXPSKyo.js +1 -0
  47. package/static/dashboard/assets/{parts-BE9o8mAH.js → parts-Dh3j93KT.js} +1 -1
  48. package/static/dashboard/assets/{plus-CZbLvWG1.js → plus-DLkZ3d4a.js} +1 -1
  49. package/static/dashboard/assets/{reset-ZYeb2Axs.js → reset-25I5KwzQ.js} +1 -1
  50. package/static/dashboard/assets/{s._site-DT0FXe9C.js → s._site-AdxvCMDp.js} +1 -1
  51. package/static/dashboard/assets/{s._site.comments-Ci3k9e5e.js → s._site.comments-Bn8q0GfW.js} +1 -1
  52. package/static/dashboard/assets/{s._site.reviewers-CMYsq2DL.js → s._site.reviewers-DhplEadn.js} +1 -1
  53. package/static/dashboard/assets/{s._site.settings-CWNTmj8T.js → s._site.settings-DkxPhD29.js} +1 -1
  54. package/static/dashboard/assets/{setup-C7sY4SXb.js → setup-BT2ymvDA.js} +1 -1
  55. package/static/dashboard/assets/{sign-in-DzeEwdj0.js → sign-in--bQ1djiP.js} +1 -1
  56. package/static/dashboard/assets/{sign-up-iJvFq_R3.js → sign-up-Tosf460o.js} +1 -1
  57. package/static/dashboard/assets/{sites-DiBJvBBN.js → sites-Bk7faXQx.js} +1 -1
  58. package/static/dashboard/assets/{studio-QR3vjisG.js → studio-BXY-BYUr.js} +1 -1
  59. package/static/dashboard/assets/studio-C5_LeEu7.js +1 -0
  60. package/static/dashboard/assets/{studio.index-B2WSVF56.js → studio.index-iCwNlbml.js} +1 -1
  61. package/static/dashboard/assets/studio.integrations-25ah_0to.js +16 -0
  62. package/static/dashboard/assets/{studio.members-DPqoth_D.js → studio.members-BnuODZjt.js} +1 -1
  63. package/static/dashboard/assets/{studio.plan-C3t2S9GZ.js → studio.plan-B2BnZVlI.js} +1 -1
  64. package/static/dashboard/assets/{sun-ChMFVIDA.js → sun-DZ77z3mK.js} +1 -1
  65. package/static/dashboard/assets/{switch-D0flLg1r.js → switch-DNodWtiG.js} +1 -1
  66. package/static/dashboard/assets/{table-PCTyuzaU.js → table-_kCW8sw7.js} +1 -1
  67. package/static/dashboard/assets/{useAriaLabelledBy-Bu-GFL0B.js → useAriaLabelledBy-CIrxFX1m.js} +1 -1
  68. package/static/dashboard/assets/{useBaseQuery-Cw1dAAOb.js → useBaseQuery-n1C4QVXL.js} +1 -1
  69. package/static/dashboard/assets/{useCompositeItem-CHXWc-fj.js → useCompositeItem-YAQuEkY3.js} +1 -1
  70. package/static/dashboard/assets/useQuery-rfvcXYjq.js +1 -0
  71. package/static/dashboard/assets/useRender-Rc2aDa9D.js +1 -0
  72. package/static/dashboard/assets/{useScrollLock-d8peZTpK.js → useScrollLock-BPMFXP7l.js} +1 -1
  73. package/static/dashboard/assets/{useValueChanged-CEhqkcjS.js → useValueChanged-w_Y86K5W.js} +1 -1
  74. package/static/dashboard/assets/{users-DGXcs62X.js → users-ZI_E8YXB.js} +1 -1
  75. package/static/dashboard/assets/{welcome-FVEqWF-E.js → welcome-CBYYDde-.js} +1 -1
  76. package/static/dashboard/assets/{widget-signin-CDnZ1WcR.js → widget-signin-Of2xQvu-.js} +1 -1
  77. package/static/dashboard/assets/{you-DaUXbySS.js → you-ey1-XO69.js} +1 -1
  78. package/static/dashboard/assets/{zod-Cs-QZqu7.js → zod-D8TwVQUn.js} +1 -1
  79. package/static/dashboard/index.html +1 -1
  80. package/static/widget/build.json +2 -2
  81. package/static/widget/snag.js +1 -1
  82. package/static/widget/snag.runtime.js +1 -1
  83. package/static/dashboard/assets/me-Bz7e5FMG.js +0 -1
  84. package/static/dashboard/assets/studio-CK_HRLS5.js +0 -1
  85. package/static/dashboard/assets/studio.integrations-BYz4cDCb.js +0 -16
  86. package/static/dashboard/assets/useQuery-B9Vos2vJ.js +0 -1
  87. package/static/dashboard/assets/useRender-BJibc2kV.js +0 -1
@@ -1,6 +1,6 @@
1
- import{c as Xt,ai as Nt,e as xe,l as Gt,r as s,i as vt,j as h,aG as At,f as He,m as ht,E as Kt,al as Jt,aj as Ot,k as Te,g as ft,h as Fe}from"./index-DCtWnS4U.js";import{C as Lt}from"./chevron-down-OtEbsKDP.js";import{C as Qt}from"./check-CK4ao5He.js";import{J as Zt,a7 as en,P as tn,R as nn,a8 as a,l as Ht,g as on,F as sn,x as rn,y as ln,m as nt,a9 as an,a4 as cn,t as un,N as dn,O as fn,Q as pn,C as gn,a as mn,M as hn,q as xn,aa as bn}from"./useScrollLock-d8peZTpK.js";import{i as Sn}from"./isElementDisabled-CwHw_lZC.js";import{w as vn,e as yn,h as Ft,A as Dt,k as Ct,l as Rn,x as wn,s as In,c as Ie,n as st,j as Tn,f as Mn,o as xt,a as pt,z as En,B as An,r as gt}from"./createBaseUIEventDetails-CtitjO53.js";import{a as yt,u as it,i as Cn,d as Pn,t as Rt,C as Vn}from"./inertValue-DvQ1EW5I.js";import{s as bt}from"./serializeValue-B8e3iXO-.js";import{u as jn}from"./useValueChanged-CEhqkcjS.js";import{d as Nn,h as On,e as Ln,f as Hn,i as Fn,c as Dn,u as kn,a as Un,b as Bn,p as _n,r as zn,g as Wn}from"./getPseudoElementBounds-1HRS6at-.js";import{C as Yn,a as qn,u as $n}from"./CompositeList-DJzkqbsI.js";/**
1
+ import{c as Xt,ai as Nt,e as xe,l as Gt,r as s,i as vt,j as h,aG as At,f as He,m as ht,E as Kt,al as Jt,aj as Ot,k as Te,g as ft,h as Fe}from"./index-DBw3b5Rd.js";import{C as Lt}from"./chevron-down-CPxjYKx7.js";import{C as Qt}from"./check-T8owKS6W.js";import{J as Zt,a7 as en,P as tn,R as nn,a8 as c,l as Ht,g as on,F as sn,x as rn,y as ln,m as nt,a9 as an,a4 as cn,t as un,N as dn,O as fn,Q as pn,C as gn,a as mn,M as hn,q as xn,aa as bn}from"./useScrollLock-BPMFXP7l.js";import{i as Sn}from"./isElementDisabled-CwHw_lZC.js";import{w as vn,e as yn,h as Ft,A as Dt,k as Ct,l as Rn,x as wn,s as In,c as Ie,n as st,j as Tn,f as Mn,o as xt,a as pt,z as En,B as An,r as gt}from"./createBaseUIEventDetails-D5nICp6F.js";import{a as yt,u as it,i as Cn,d as Pn,t as Rt,C as Vn}from"./inertValue-DPJM1mgv.js";import{s as bt}from"./serializeValue-B8e3iXO-.js";import{u as jn}from"./useValueChanged-w_Y86K5W.js";import{d as Nn,h as On,e as Ln,f as Hn,i as Fn,c as Dn,u as kn,a as Un,b as Bn,p as _n,r as zn,g as Wn}from"./getPseudoElementBounds-r9s2Gh_c.js";import{C as Yn,a as qn,u as $n}from"./CompositeList-C2IVT2Po.js";/**
2
2
  * @license lucide-react v1.39.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Xn=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Gn=Xt("chevron-up",Xn);function Kn(e){const{open:t=!1,onOpenChange:n,elements:o={}}=e,u=vn(),g=Zt()!=null,r=Nt(()=>new en({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new tn,floatingId:u,syncOnly:!1,nested:g})).current;return xe(()=>{const d={open:t,floatingId:u};o.reference!==void 0&&(d.referenceElement=o.reference,d.domReferenceElement=Gt(o.reference)?o.reference:null),o.floating!==void 0&&(d.floatingElement=o.floating),r.update(d)},[t,u,o.reference,o.floating,r]),r.context.onOpenChange=n,r.context.nested=g,r}function Jn(e){const[t,n]=s.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}const Qn=s.createContext(void 0),Zn={disableStyleElements:!1};function eo(){return s.useContext(Qn)??Zn}function to(e){const t=s.useRef(!0);t.current&&(t.current=!1,e())}const kt=s.createContext(null);function be(){const e=s.useContext(kt);if(e===null)throw new Error(vt(60));return e}const no=(e,t)=>Object.is(e,t);function We(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function ot(e,t,n){return!e||e.length===0?-1:e.findIndex(o=>o===void 0?!1:We(o,t,n))}function oo(e,t,n){return e.filter(o=>!We(t,o,n))}function Ut(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function so(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(Ut(t)){for(const n of t)for(const o of n.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function Bt(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return bt(e)}function ze(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?bt(e.value):bt(e)}function _t(e,t,n){function o(){return Bt(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??o();if(Array.isArray(t)){const u=t,g=Ut(u)?u.flatMap(r=>r.items):u;if(e==null||typeof e!="object"){const r=g.find(d=>d.value===e);return r&&r.label!=null?r.label:o()}if("value"in e){const r=g.find(d=>d&&d.value===e.value);if(r&&r.label!=null)return r.label}}return o()}function ro(e,t,n){return e.reduce((o,u,g)=>(g>0&&o.push(", "),o.push(h.jsx(s.Fragment,{children:_t(u,t,n)},g)),o),[])}const i={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:o}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:ze(t,o)!==""},hasNullItemLabel:(e,t)=>t?so(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(u=>We(t,u,n)):We(t,o,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function lo(e,t,n=(o,u)=>o===u){return e.length===t.length&&e.every((o,u)=>n(o,t[u]))}function $e(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const ge=1;function wt(e,t){return Math.max(0,e-t)}function rt(e,t){if(t<=0)return 0;const n=$e(e,0,t),o=n,u=t-n,g=o<=ge,r=u<=ge;return g&&r?o<=u?0:t:g?0:r?t:n}function io(e){const{id:t,value:n,defaultValue:o=null,onValueChange:u,open:g,defaultOpen:r=!1,onOpenChange:d,name:c,form:f,autoComplete:x,disabled:b=!1,readOnly:y=!1,required:I=!1,modal:C=!0,actionsRef:U,inputRef:S,onOpenChangeComplete:Y,items:L,multiple:T=!1,itemToStringLabel:M,itemToStringValue:j,isItemEqualToValue:B=no,highlightItemOnHover:N=!0,children:q}=e,{clearErrors:O}=yn(),{setDirty:ue,setTouched:$,setFocused:le,validityData:K,setFilled:H,name:V,disabled:J,validation:R,validationMode:ne}=Ft(),_=Dt({id:t}),P=J||b,l=V??c,[m,Q]=Ct({controlled:n,default:T?o??At:o,name:"Select",state:"value"}),[F,oe]=Ct({controlled:g,default:r,name:"Select",state:"open"}),p=s.useRef([]),v=s.useRef([]),D=s.useRef(null),ee=s.useRef(null),Se=s.useRef(0),E=s.useRef(null),X=s.useRef([]),z=s.useRef(!1),de=s.useRef(null),Z=s.useRef(null),se=s.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),re=s.useRef(!1),{mounted:ie,setMounted:fe,transitionStatus:W}=yt(F),{openMethod:G,triggerProps:ae}=Nn(F),A=Nt(()=>new nn({id:_,labelId:void 0,modal:C,multiple:T,itemToStringLabel:M,itemToStringValue:j,isItemEqualToValue:B,value:m,open:F,mounted:ie,transitionStatus:W,items:L,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Me=a(A,i.activeIndex),ve=a(A,i.selectedIndex),ye=a(A,i.triggerElement),ce=a(A,i.positionerElement),je=Jn(G),Ne=G??je,te=s.useMemo(()=>T?"":ze(m,j),[T,m,j]),at=s.useMemo(()=>T&&Array.isArray(m)?m.map(w=>ze(w,j)):ze(m,j),[T,m,j]),Ge=Ht(ye),Re=He(()=>at);Rn(Ge,_,m,Re,!P,c);const ct=s.useRef(m),Ye=T?Array.isArray(m)&&m.length>0:m!=null&&te!=="";xe(()=>{H(Ye)},[Ye,H]),xe(function(){let k=m,we=!1;if(T){const Le=Array.isArray(m)?m:[];we=Le.length===0,k=Le[Le.length-1]}const Pe=we?-1:ot(X.current,k,B),Ve=Pe===-1?null:Pe;Ve===null&&(Z.current=null),!F&&A.set("selectedIndex",Ve)},[T,F,m,B,A]);function me(w){const k=K.initialValue;return Array.isArray(w)&&Array.isArray(k)?!lo(w,k,(we,Pe)=>We(we,Pe,B)):w!==k}jn(m,()=>{O(l),ue(me(m)),R.change(m)});const De=He((w,k)=>{d?.(w,k),!k.isCanceled&&(oe(w),!w&&(k.reason===wn||k.reason===In)&&($(!0),le(!1),ne==="onBlur"&&R.commit(m)))}),ke=He(()=>{fe(!1),A.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),Y?.(!1)});it({enabled:!U,open:F,ref:D,onComplete(){F||ke()}}),s.useImperativeHandle(U,()=>({unmount:ke}),[ke]);const Ee=He((w,k)=>{u?.(w,k),!k.isCanceled&&Q(w)}),he=He(w=>{const k=wt(w.scrollHeight,w.clientHeight),we=rt(w.scrollTop,k),Pe=we>0,Ve=we<k;A.set("scrollUpArrowVisible",Pe),A.set("scrollDownArrowVisible",Ve)}),Ae=Kn({open:F,onOpenChange:De,elements:{reference:ye,floating:ce}}),Ue=On(Ae,{enabled:!y&&!P,event:"mousedown"}),Be=on(Ae),Ce=Ln(Ae,{enabled:!y&&!P,listRef:p,activeIndex:Me,selectedIndex:ve,disabledIndices:At,onNavigate(w){w===null&&!F||A.set("activeIndex",w)},focusItemOnHover:N}),Oe=Hn(Ae,{enabled:!y&&!P&&(F||!T),listRef:v,activeIndex:Me,selectedIndex:ve,disabledIndices:w=>Sn(p.current[w]),onMatch(w){F?A.set("activeIndex",w):Ee(X.current[w],Ie(st))},onTyping(w){z.current=w}}),Ke=s.useMemo(()=>ht(Oe.reference,Ce.reference,Be.reference,Ue.reference,ae),[Ue.reference,Oe.reference,Ce.reference,Be.reference,ae]),Je=s.useMemo(()=>ht(sn,Oe.floating,Ce.floating,Be.floating),[Oe.floating,Ce.floating,Be.floating]),Qe=Ce.item??Kt;to(()=>{A.update({popupProps:Je,triggerProps:Ke})}),A.useSyncedValues({id:_,modal:C,multiple:T,value:m,open:F,mounted:ie,transitionStatus:W,popupProps:Je,triggerProps:Ke,items:L,itemToStringLabel:M,itemToStringValue:j,isItemEqualToValue:B,openMethod:Ne});const pe=s.useMemo(()=>({store:A,floatingContext:Ae,required:I,disabled:P,readOnly:y,multiple:T,highlightItemOnHover:N,setValue:Ee,setOpen:De,listRef:p,popupRef:D,scrollHandlerRef:ee,handleScrollArrowVisibility:he,scrollArrowsMountedCountRef:Se,itemProps:Qe,valueRef:E,valuesRef:X,labelsRef:v,typingRef:z,selectionRef:se,firstItemTextRef:de,selectedItemTextRef:Z,validation:R,onOpenChangeComplete:Y,alignItemWithTriggerActiveRef:re,initialValueRef:ct}),[A,Ae,I,P,y,T,N,Ee,De,Qe,R,Y,he]),_e=Jt(S,R.inputRef),qe=T?void 0:l,ut=s.useMemo(()=>!T||!Array.isArray(m)||!l?null:m.map(w=>{const k=ze(w,j);return h.jsx("input",{type:"hidden",form:f,name:l,value:k,disabled:P},k)}),[T,m,f,l,j,P]);return h.jsxs(kt.Provider,{value:pe,children:[q,h.jsx("input",{...R.getValidationProps(P,{onFocus(){A.state.triggerElement?.focus({focusVisible:!0})},onChange(w){if(w.nativeEvent.defaultPrevented||P||y)return;const k=w.currentTarget.value,we=Ie(st,w.nativeEvent);function Pe(){if(T)return;const Ve=k.toLowerCase();let Le=X.current.findIndex(dt=>ze(dt,j).toLowerCase()===Ve||Bt(dt,M).toLowerCase()===Ve);Le===-1&&(Le=X.current.findIndex((dt,$t)=>{const Et=v.current[$t];return Et!=null&&Et.toLowerCase()===Ve}));const Mt=X.current[Le];Mt!=null&&Ee(Mt,we)}A.set("forceMount",!0),queueMicrotask(Pe)}}),id:_&&qe==null?`${_}-hidden-input`:void 0,form:f,name:qe,autoComplete:x,value:te,disabled:P,required:I&&!(T&&Ye),readOnly:y,ref:_e,style:l?rn:ln,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ut]})}function ao(e,t){return e??t}const co=400,uo={...cn,...Mn,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},fo=s.forwardRef(function(t,n){const{render:o,className:u,id:g,disabled:r=!1,nativeButton:d=!0,style:c,...f}=t,{setTouched:x,setFocused:b,validationMode:y,state:I,disabled:C}=Ft(),{labelId:U}=Tn(),{store:S,setOpen:Y,selectionRef:L,validation:T,readOnly:M,required:j,alignItemWithTriggerActiveRef:B,disabled:N}=be(),q=C||N||r,O=a(S,i.open),ue=a(S,i.mounted),$=a(S,i.value),le=a(S,i.triggerProps),K=a(S,i.positionerElement),H=a(S,i.listElement),V=a(S,i.popupSide),J=a(S,i.id),R=a(S,i.labelId),ne=a(S,i.hasSelectedValue),_=ue&&K?V:null,P=g??J,l=ao(U,R);Dt({id:P});const m=Ht(K),Q=s.useRef(null),{getButtonProps:F,buttonRef:oe}=Ot({disabled:q,native:d}),p=S.useStateSetter("triggerElement"),v=nt(),D=nt(),ee=nt();s.useEffect(()=>{if(O)return ee.start(co,()=>{L.current.allowUnselectedMouseUp=!0,L.current.allowSelectedMouseUp=!0}),()=>{ee.clear()};L.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},D.clear()},[O,L,D,ee]);const Se=ht(le,{id:P,role:"combobox","aria-expanded":O,"aria-haspopup":"listbox","aria-controls":O?H?.id??an(K)?.id:void 0,"aria-labelledby":l,"aria-readonly":M||void 0,"aria-required":j||void 0,tabIndex:q?-1:0,onFocus(z){b(!0),O&&B.current&&Y(!1,Ie(st,z.nativeEvent)),v.start(0,()=>{S.set("forceMount",!0)})},onBlur(z){pt(K,z.relatedTarget)||(x(!0),b(!1),y==="onBlur"&&T.commit($))},onMouseDown(z){if(O)return;const de=xt(z.currentTarget);function Z(se){if(!Q.current)return;const re=se.target;pt(Q.current,re)||pt(m.current,re)||Fn(se,Q.current)||Y(!1,Ie(En,se))}D.start(0,()=>{de.addEventListener("mouseup",Z,{once:!0})})}},f,F),E=T.getValidationProps(q,Se);E.role="combobox";const X={...I,open:O,disabled:q,value:$,readOnly:M,popupSide:_,placeholder:!ne};return Te("button",t,{ref:[n,Q,oe,p],state:X,stateAttributesMapping:uo,props:E})}),po={value:()=>null},go=s.forwardRef(function(t,n){const{className:o,render:u,children:g,placeholder:r,style:d,...c}=t,{store:f,valueRef:x}=be(),b=a(f,i.value),y=a(f,i.items),I=a(f,i.itemToStringLabel),C=a(f,i.hasSelectedValue),U=!C&&r!=null&&g==null,S=a(f,i.hasNullItemLabel,U),Y={value:b,placeholder:!C};let L=null;return typeof g=="function"?L=g(b):g!=null?L=g:U&&!S?L=r:Array.isArray(b)?L=ro(b,y,I):L=_t(b,y,I),Te("span",t,{state:Y,ref:[n,x],props:[{children:L},c],stateAttributesMapping:po})}),mo=s.forwardRef(function(t,n){const{render:o,className:u,style:g,...r}=t,{store:d}=be(),f={open:a(d,i.open)};return Te("span",t,{state:f,ref:n,props:[{"aria-hidden":!0,children:"▼"},r],stateAttributesMapping:un})}),ho=s.forwardRef(function(t,n){const{store:o}=be(),u=a(o,i.mounted),g=a(o,i.forceMount);return u||g?h.jsx(dn,{ref:n,...t}):null}),zt=s.createContext(void 0);function It(){const e=s.useContext(zt);if(!e)throw new Error(vt(59));return e}function lt(e,t){e&&Object.assign(e.style,t)}const Wt={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},xo={position:"fixed"},bo=s.forwardRef(function(t,n){const{anchor:o,className:u,render:g,positionMethod:r,side:d,align:c,sideOffset:f,alignOffset:x,collisionBoundary:b="clipping-ancestors",collisionPadding:y,arrowPadding:I,sticky:C,disableAnchorTracking:U,alignItemWithTrigger:S=!0,collisionAvoidance:Y=fn,style:L,...T}=t,{store:M,listRef:j,labelsRef:B,alignItemWithTriggerActiveRef:N,selectedItemTextRef:q,valuesRef:O,initialValueRef:ue,popupRef:$,setValue:le,floatingContext:K}=be(),H=a(M,i.open),V=a(M,i.mounted),J=a(M,i.modal),R=a(M,i.value),ne=a(M,i.openMethod),_=a(M,i.positionerElement),P=a(M,i.triggerElement),l=a(M,i.isItemEqualToValue),m=a(M,i.transitionStatus),Q=s.useRef(null),F=s.useRef(null),[oe,p]=s.useState(S),v=V&&oe&&ne!=="touch";!V&&oe!==S&&p(S),s.useImperativeHandle(N,()=>v),Dn((v||J)&&H,ne==="touch",_,P);const D=kn({anchor:o,floatingRootContext:K,positionMethod:r,mounted:V,side:d,sideOffset:f,align:c,alignOffset:x,arrowPadding:I,collisionBoundary:b,collisionPadding:y,sticky:C,disableAnchorTracking:U??v,collisionAvoidance:Y,keepMounted:!0}),ee=v?"none":D.side,Se=v?xo:D.positionerStyles,E={open:H,side:ee,align:D.align,anchorHidden:D.anchorHidden};xe(()=>{M.set("popupSide",D.side)},[M,D.side]);const X=M.useStateSetter("positionerElement"),z=Un(t,E,{styles:Se,transitionStatus:m,props:T,refs:[n,X],hidden:!V,inert:!H}),de=s.useRef(0),Z=He(re=>{if(O.current.length===0)return;const ie=de.current;if(de.current=re.size,re.size===ie)return;const fe=Ie(st);if(ie!==0&&!M.state.multiple&&R!==null&&ot(O.current,R,l)===-1){const G=ue.current,A=G!=null&&ot(O.current,G,l)!==-1?G:null;le(A,fe),A===null&&(M.set("selectedIndex",null),q.current=null)}if(ie!==0&&M.state.multiple&&Array.isArray(R)){const W=R.filter(G=>ot(O.current,G,l)!==-1);W.length!==R.length&&(le(W,fe),W.length===0&&(M.set("selectedIndex",null),q.current=null))}if(H&&v){M.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const W={height:""};lt(_,W),lt($.current,W)}}),se=s.useMemo(()=>({...D,side:ee,alignItemWithTriggerActive:v,setControlledAlignItemWithTrigger:p,scrollUpArrowRef:Q,scrollDownArrowRef:F}),[D,ee,v,p]);return h.jsx(Yn,{elementsRef:j,labelsRef:B,onMapChange:Z,children:h.jsxs(zt.Provider,{value:se,children:[V&&J&&h.jsx(pn,{inert:Cn(!H),cutout:P}),z]})})}),Ze="base-ui-disable-scrollbar",St={className:Ze,getElement(e){return h.jsx("style",{nonce:e,href:Ze,precedence:"base-ui:low",children:`.${Ze}{scrollbar-width:none}.${Ze}::-webkit-scrollbar{display:none}`})}},So={...xn,...Rt},vo=s.forwardRef(function(t,n){const{render:o,className:u,style:g,finalFocus:r,...d}=t,{store:c,popupRef:f,onOpenChangeComplete:x,setOpen:b,valueRef:y,firstItemTextRef:I,selectedItemTextRef:C,multiple:U,handleScrollArrowVisibility:S,scrollHandlerRef:Y,listRef:L,highlightItemOnHover:T,floatingContext:M}=be(),{side:j,align:B,alignItemWithTriggerActive:N,isPositioned:q,setControlledAlignItemWithTrigger:O}=It(),ue=Bn()!=null,$=qn(),{nonce:le,disableStyleElements:K}=eo(),H=a(c,i.id),V=a(c,i.open),J=a(c,i.openMethod),R=a(c,i.mounted),ne=a(c,i.popupProps),_=a(c,i.transitionStatus),P=a(c,i.triggerElement),l=a(c,i.positionerElement),m=a(c,i.listElement),Q=s.useRef(!1),F=s.useRef(!1),oe=s.useRef({}),p=Pn(),v=He(E=>{if(!l||!f.current||!F.current)return;const X=l.style.top==="0px",z=l.style.bottom==="0px";if(Q.current||!N||!X&&!z){S(E);return}const de=Vt(l),Z=Xe(l.getBoundingClientRect().height,"y",de),se=xt(l),re=ft(l),ie=re.getComputedStyle(l),fe=parseFloat(ie.marginTop),W=parseFloat(ie.marginBottom),G=Pt(re.getComputedStyle(f.current)),ae=Math.min(se.documentElement.clientHeight-fe-W,G),A=E.scrollTop,Me=et(E);let ve=null;const ye=te=>{l.style.height=`${te}px`},ce=X?Me-A:A,je=Math.min(Z+ce,ae);if(ce<=ge){const te=$e(ce,0,ae-Z);te>0&&ye(Z+te),E.scrollTop=X?Me:0,ae-(Z+te)<=ge&&(Q.current=!0),S(E);return}if(ae-je>ge)ve=X?1/0:0;else if(z&&A<Me){const te=Z+ce-ae;ve=A-(ce-te)}const Ne=Math.ceil(je);if(Ne!==0&&ye(Ne),ve!=null){const te=$e(ve,0,et(E));Math.abs(E.scrollTop-te)>ge&&(E.scrollTop=te)}Ne>=ae-ge&&(Q.current=!0),S(E)});s.useImperativeHandle(Y,()=>v,[v]),it({open:V,ref:f,onComplete(){V&&x?.(!0)}});const D={open:V,transitionStatus:_,side:j,align:B};xe(()=>{!l||!f.current||Object.keys(oe.current).length||(oe.current={top:l.style.top||"0",left:l.style.left||"0",right:l.style.right,height:l.style.height,bottom:l.style.bottom,minHeight:l.style.minHeight,maxHeight:l.style.maxHeight,marginTop:l.style.marginTop,marginBottom:l.style.marginBottom})},[f,l]),xe(()=>{V||N||(F.current=!1,Q.current=!1,lt(l,oe.current))},[V,N,l,f]),xe(()=>{const E=f.current;if(!V||!P||!l||!E||N&&!q||c.state.transitionStatus==="ending")return;if(F.current=!0,E.style.removeProperty("--transform-origin"),!N){p.request(()=>S(m||E));return}const X=yo(E);try{let z=C.current;z?.isConnected||(z=!i.hasSelectedValue(c.state)&&I.current?.isConnected?I.current:null);const de=y.current,Z=ft(l),se=Z.getComputedStyle(l),re=Z.getComputedStyle(E),ie=xt(P),fe=Vt(P),W=tt(P.getBoundingClientRect(),fe),G=tt(l.getBoundingClientRect(),fe),ae=W.height,A=m||E,Me=A.scrollHeight,ve=parseFloat(re.borderBottomWidth),ye=parseFloat(se.marginTop)||10,ce=parseFloat(se.marginBottom)||10,je=parseFloat(se.minHeight)||100,Ne=Pt(re),te=5,at=5,Ge=20,Re=ie.documentElement.clientHeight-ye-ce,ct=ie.documentElement.clientWidth,Ye=Re-W.bottom+ae;let me,De=$==="rtl"?W.right-G.width:W.left,ke=0;if(z&&de){const pe=tt(de.getBoundingClientRect(),fe);me=tt(z.getBoundingClientRect(),fe),De=G.left+($==="rtl"?pe.right-me.right:pe.left-me.left);const _e=pe.top-W.top+pe.height/2;ke=me.top-G.top+me.height/2-_e}const Ee=Ye+ke+ce+ve;let he=Math.min(Re,Ee);const Ae=Re-ye-ce,Ue=Ee-he,Be=ct-at;l.style.left=`${$e(De,te,Be-G.width)}px`,l.style.height=`${he}px`,l.style.maxHeight="none",l.style.marginTop=`${ye}px`,l.style.marginBottom=`${ce}px`,E.style.height="100%";const Ce=et(A),Oe=Ue>=Ce-ge;Oe&&(he=Math.min(Re,G.height)-(Ue-Ce));const Ke=W.top<Ge||W.bottom>Re-Ge||Math.ceil(he)+ge<Math.min(Me,je),Je=(Z.visualViewport?.scale??1)!==1&&gn;if(Ke||Je){lt(l,oe.current),O(!1);return}const Qe=Math.max(je,he);if(Oe){const pe=Math.max(0,Re-Ee);l.style.top=G.height>=Ae?"0":`${pe}px`,l.style.height=`${he}px`,A.scrollTop=et(A)}else l.style.bottom="0",A.scrollTop=Ue;if(me){const pe=G.top,_e=G.height,qe=me.top+me.height/2,ut=$e(_e>0?(qe-pe)/_e*100:50,0,100);E.style.setProperty("--transform-origin",`50% ${ut}%`)}(Qe===Re||he>=Ne)&&(Q.current=!0),S(A),T&&c.state.selectedIndex===null&&c.state.activeIndex===null&&L.current[0]!=null&&c.set("activeIndex",0)}finally{X()}},[c,V,l,P,y,I,C,f,S,N,O,p,m,L,T,$,q]),s.useEffect(()=>{if(!N||!l||!V)return;const E=ft(l);function X(z){b(!1,Ie(An,z))}return mn(E,"resize",X)},[b,N,l,V]);const ee={...m?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":U||void 0,id:`${H}-list`},onKeyDown(E){ue&&Vn.has(E.key)&&E.stopPropagation()},onScroll(E){m||v(E.currentTarget)},...N&&{style:m?{height:"100%"}:Wt},className:!m&&N?St.className:void 0},Se=Te("div",t,{ref:[n,f],state:D,stateAttributesMapping:So,props:[ne,ee,Wn(_),d]});return h.jsxs(s.Fragment,{children:[!K&&St.getElement(le),h.jsx(hn,{context:M,modal:!1,disabled:!R,openInteractionType:J,returnFocus:r,restoreFocus:!0,children:Se})]})});function Pt(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function et(e){return wt(e.scrollHeight,e.clientHeight)}function Vt(e){return _n.getScale(e)}function Xe(e,t,n){return e/n[t]}function tt(e,t){return zn({x:Xe(e.x,"x",t),y:Xe(e.y,"y",t),width:Xe(e.width,"x",t),height:Xe(e.height,"y",t)})}const jt=[["transform","none"],["scale","1"],["translate","0 0"]];function yo(e){const{style:t}=e,n={};for(const[o,u]of jt)n[o]=t.getPropertyValue(o),t.setProperty(o,u,"important");return()=>{for(const[o]of jt){const u=n[o];u?t.setProperty(o,u):t.removeProperty(o)}}}const Ro=s.forwardRef(function(t,n){const{render:o,className:u,style:g,...r}=t,{store:d,scrollHandlerRef:c,multiple:f}=be(),{alignItemWithTriggerActive:x}=It(),b=a(d,i.hasScrollArrows),y=a(d,i.openMethod),C={id:`${a(d,i.id)}-list`,role:"listbox","aria-multiselectable":f||void 0,onScroll(S){c.current?.(S.currentTarget)},...x&&{style:Wt},className:b&&y!=="touch"?St.className:void 0},U=d.useStateSetter("listElement");return Te("div",t,{ref:[n,U],props:[C,r]})}),Yt=s.createContext(void 0);function Tt(){const e=s.useContext(Yt);if(!e)throw new Error(vt(57));return e}const wo=s.memo(s.forwardRef(function(t,n){const{render:o,className:u,style:g,value:r=null,label:d,disabled:c=!1,nativeButton:f=!1,...x}=t,b=s.useRef(null),y=$n({guess:!0,label:d,textRef:b}),{store:I,itemProps:C,setOpen:U,setValue:S,selectionRef:Y,typingRef:L,valuesRef:T,multiple:M,selectedItemTextRef:j,disabled:B,readOnly:N}=be(),q=B||c,O=a(I,i.isActive,y.index),ue=a(I,i.open),$=a(I,i.isSelected,r),le=a(I,i.isSelectedByFocus,y.index),K=a(I,i.isItemEqualToValue),H=y.index,V=s.useRef(null);xe(()=>{const p=T.current;return p[H]=r,()=>{delete p[H]}},[H,r,T]),xe(()=>{const p=I.state.value;let v=p;M&&Array.isArray(p)&&(v=p.length>0?p[p.length-1]:void 0),v!==void 0&&We(r,v,K)&&(I.set("selectedIndex",H),b.current&&(j.current=b.current))},[H,M,K,I,r,j]);const J=s.useRef("mouse"),R=s.useRef(!1),{getButtonProps:ne,buttonRef:_}=Ot({disabled:q,focusableWhenDisabled:!0,native:f,composite:!0}),P={disabled:q,selected:$,highlighted:O};function l(p){if(B||N)return;const v=I.state.value;if(M){const D=Array.isArray(v)?v:[],ee=$?oo(D,r,K):[...D,r];S(ee,Ie(gt,p))}else S(r,Ie(gt,p)),U(!1,Ie(gt,p))}function m(){Y.current.dragY=0}const Q={role:"option","aria-selected":$,tabIndex:ue&&O?0:-1,onKeyDown(p){I.set("activeIndex",H),p.key===" "&&L.current&&p.preventDefault()},onClick(p){const v=J.current!=="touch",D=p.nativeEvent.pointerType,ee=v&&bn(p.nativeEvent)&&(D!==void 0||O),Se=v&&!ee&&!R.current;R.current=!1,!(q||Se)&&l(p.nativeEvent)},onPointerEnter(p){J.current=p.pointerType},onPointerMove(p){if(p.pointerType==="mouse"&&p.buttons===1){const v=Y.current;v.dragY+=p.movementY,v.dragY**2>=64&&(v.allowUnselectedMouseUp=!0)}},onPointerDown(p){J.current=p.pointerType,R.current=!0,m()},onMouseUp(){if(m(),q||J.current==="touch"||R.current)return;const p=!Y.current.allowSelectedMouseUp&&$,v=!Y.current.allowUnselectedMouseUp&&!$;p||v||(R.current=!0,V.current?.click(),R.current=!1)}},F=Te("div",t,{ref:[_,n,y.ref,V],state:P,props:[C,Q,x,ne]}),oe=s.useMemo(()=>({selected:$,index:H,textRef:b,selectedByFocus:le}),[$,H,b,le]);return h.jsx(Yt.Provider,{value:oe,children:F})})),Io=s.forwardRef(function(t,n){const{selected:o}=Tt();return t.keepMounted||o?h.jsx(To,{...t,ref:n}):null}),To=s.memo(s.forwardRef((e,t)=>{const{render:n,className:o,style:u,keepMounted:g,...r}=e,{selected:d}=Tt(),c=s.useRef(null),{transitionStatus:f,setMounted:x}=yt(d),y=Te("span",e,{ref:[t,c],state:{selected:d,transitionStatus:f},props:[{"aria-hidden":!0,children:"✔️"},r],stateAttributesMapping:Rt});return it({open:d,ref:c,onComplete(){d||x(!1)}}),y})),Mo=s.memo(s.forwardRef(function(t,n){const{index:o,textRef:u,selectedByFocus:g}=Tt(),{firstItemTextRef:r,selectedItemTextRef:d}=be(),{render:c,className:f,style:x,...b}=t,y=s.useCallback(C=>{C&&(o===0&&(r.current=C),g&&(d.current=C))},[r,d,o,g]);return Te("div",t,{ref:[y,n,u],props:b})})),qt=s.forwardRef(function(t,n){const{render:o,className:u,style:g,direction:r,keepMounted:d,...c}=t,f=r==="up",{store:x,popupRef:b,listRef:y,handleScrollArrowVisibility:I,scrollArrowsMountedCountRef:C}=be(),{side:U,scrollDownArrowRef:S,scrollUpArrowRef:Y}=It(),L=f?i.scrollUpArrowVisible:i.scrollDownArrowVisible,T=a(x,L),M=a(x,i.openMethod),j=T&&M!=="touch",B=nt(),N=f?Y:S,{mounted:q,transitionStatus:O,setMounted:ue}=yt(j);xe(()=>(C.current+=1,x.set("hasScrollArrows",!0),()=>{C.current=Math.max(0,C.current-1),C.current===0&&x.set("hasScrollArrows",!1)}),[x,C]),it({open:j,ref:N,onComplete(){j||ue(!1)}});const K=Te("div",t,{ref:[n,N],state:{direction:r,visible:j,side:U,transitionStatus:O},props:[{"aria-hidden":!0,children:f?"▲":"▼",style:{position:"absolute"},onMouseMove(V){if(V.movementX===0&&V.movementY===0||B.isStarted())return;x.set("activeIndex",null);function J(){const R=x.state.listElement??b.current;if(!R)return;x.set("activeIndex",null),I(R);const ne=wt(R.scrollHeight,R.clientHeight),_=rt(R.scrollTop,ne),P=_===(f?0:ne),l=y.current;if(_!==R.scrollTop&&(R.scrollTop=_),P){B.clear();return}if(l.length>0){const m=N.current?.offsetHeight||0;R.scrollTop=Eo(l,f,_,R.clientHeight,m,ne)}B.start(40,J)}B.start(40,J)},onMouseLeave(){B.clear()}},c],stateAttributesMapping:Rt});return q||d?K:null});function Eo(e,t,n,o,u,g){if(t){let x=0;const b=n+u-ge;for(let C=0;C<e.length;C+=1){const U=e[C];if(U&&U.offsetTop>=b){x=C;break}}const y=Math.max(0,x-1),I=e[y];return y<x&&I?rt(I.offsetTop-u,g):0}let r=e.length-1;const d=n+o-u+ge;for(let x=0;x<e.length;x+=1){const b=e[x];if(b&&b.offsetTop+b.offsetHeight>d){r=Math.max(0,x-1);break}}const c=Math.min(e.length-1,r+1),f=e[c];return c>r&&f?rt(f.offsetTop+f.offsetHeight-o+u,g):g}const Ao=s.forwardRef(function(t,n){return h.jsx(qt,{...t,ref:n,direction:"down"})}),Co=s.forwardRef(function(t,n){return h.jsx(qt,{...t,ref:n,direction:"up"})}),Po=io;function Vo({className:e,...t}){return h.jsx(go,{"data-slot":"select-value",className:Fe("flex flex-1 text-left",e),...t})}function jo({className:e,size:t="default",children:n,...o}){return h.jsxs(fo,{"data-slot":"select-trigger","data-size":t,className:Fe("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[n,h.jsx(mo,{render:h.jsx(Lt,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function No({className:e,children:t,side:n="bottom",sideOffset:o=4,align:u="center",alignOffset:g=0,alignItemWithTrigger:r=!0,...d}){return h.jsx(ho,{children:h.jsx(bo,{side:n,sideOffset:o,align:u,alignOffset:g,alignItemWithTrigger:r,className:"isolate z-50",children:h.jsxs(vo,{"data-slot":"select-content","data-align-trigger":r,className:Fe("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d,children:[h.jsx(Lo,{}),h.jsx(Ro,{children:t}),h.jsx(Ho,{})]})})})}function Oo({className:e,children:t,...n}){return h.jsxs(wo,{"data-slot":"select-item",className:Fe("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground 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:[h.jsx(Mo,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),h.jsx(Io,{render:h.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:h.jsx(Qt,{className:"pointer-events-none"})})]})}function Lo({className:e,...t}){return h.jsx(Co,{"data-slot":"select-scroll-up-button",className:Fe("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:h.jsx(Gn,{})})}function Ho({className:e,...t}){return h.jsx(Ao,{"data-slot":"select-scroll-down-button",className:Fe("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:h.jsx(Lt,{})})}const mt="__none__";function Xo({id:e,value:t,onChange:n,options:o,className:u,size:g="default","aria-label":r}){const d=o.map(c=>({value:c.value===""?mt:c.value,label:c.label}));return h.jsxs(Po,{items:d,value:t===""?mt:t,onValueChange:c=>c!=null&&n(c===mt?"":String(c)),children:[h.jsx(jo,{id:e,size:g,"aria-label":r,className:Fe("w-full bg-card",u),children:h.jsx(Vo,{})}),h.jsx(No,{children:d.map(c=>h.jsx(Oo,{value:c.value,children:c.label},c.value))})]})}export{Xo as P,Po as S,jo as a,Vo as b,No as c,Oo as d};
6
+ */const Xn=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Gn=Xt("chevron-up",Xn);function Kn(e){const{open:t=!1,onOpenChange:n,elements:o={}}=e,u=vn(),p=Zt()!=null,r=Nt(()=>new en({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new tn,floatingId:u,syncOnly:!1,nested:p})).current;return xe(()=>{const d={open:t,floatingId:u};o.reference!==void 0&&(d.referenceElement=o.reference,d.domReferenceElement=Gt(o.reference)?o.reference:null),o.floating!==void 0&&(d.floatingElement=o.floating),r.update(d)},[t,u,o.reference,o.floating,r]),r.context.onOpenChange=n,r.context.nested=p,r}function Jn(e){const[t,n]=s.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}const Qn=s.createContext(void 0),Zn={disableStyleElements:!1};function eo(){return s.useContext(Qn)??Zn}function to(e){const t=s.useRef(!0);t.current&&(t.current=!1,e())}const kt=s.createContext(null);function be(){const e=s.useContext(kt);if(e===null)throw new Error(vt(60));return e}const no=(e,t)=>Object.is(e,t);function We(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function ot(e,t,n){return!e||e.length===0?-1:e.findIndex(o=>o===void 0?!1:We(o,t,n))}function oo(e,t,n){return e.filter(o=>!We(t,o,n))}function Ut(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function so(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(Ut(t)){for(const n of t)for(const o of n.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function Bt(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return bt(e)}function ze(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?bt(e.value):bt(e)}function _t(e,t,n){function o(){return Bt(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??o();if(Array.isArray(t)){const u=t,p=Ut(u)?u.flatMap(r=>r.items):u;if(e==null||typeof e!="object"){const r=p.find(d=>d.value===e);return r&&r.label!=null?r.label:o()}if("value"in e){const r=p.find(d=>d&&d.value===e.value);if(r&&r.label!=null)return r.label}}return o()}function ro(e,t,n){return e.reduce((o,u,p)=>(p>0&&o.push(", "),o.push(h.jsx(s.Fragment,{children:_t(u,t,n)},p)),o),[])}const a={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:o}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:ze(t,o)!==""},hasNullItemLabel:(e,t)=>t?so(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,o=e.value;return e.multiple?Array.isArray(o)&&o.some(u=>We(t,u,n)):We(t,o,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function lo(e,t,n=(o,u)=>o===u){return e.length===t.length&&e.every((o,u)=>n(o,t[u]))}function $e(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const ge=1;function wt(e,t){return Math.max(0,e-t)}function rt(e,t){if(t<=0)return 0;const n=$e(e,0,t),o=n,u=t-n,p=o<=ge,r=u<=ge;return p&&r?o<=u?0:t:p?0:r?t:n}function io(e){const{id:t,value:n,defaultValue:o=null,onValueChange:u,open:p,defaultOpen:r=!1,onOpenChange:d,name:g,form:i,autoComplete:x,disabled:b=!1,readOnly:y=!1,required:I=!1,modal:C=!0,actionsRef:U,inputRef:S,onOpenChangeComplete:Y,items:L,multiple:T=!1,itemToStringLabel:M,itemToStringValue:j,isItemEqualToValue:B=no,highlightItemOnHover:N=!0,children:q}=e,{clearErrors:O}=yn(),{setDirty:ue,setTouched:$,setFocused:le,validityData:K,setFilled:H,name:V,disabled:J,validation:R,validationMode:ne}=Ft(),_=Dt({id:t}),P=J||b,l=V??g,[m,Q]=Ct({controlled:n,default:T?o??At:o,name:"Select",state:"value"}),[F,oe]=Ct({controlled:p,default:r,name:"Select",state:"open"}),f=s.useRef([]),v=s.useRef([]),D=s.useRef(null),ee=s.useRef(null),Se=s.useRef(0),E=s.useRef(null),X=s.useRef([]),z=s.useRef(!1),de=s.useRef(null),Z=s.useRef(null),se=s.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),re=s.useRef(!1),{mounted:ie,setMounted:fe,transitionStatus:W}=yt(F),{openMethod:G,triggerProps:ae}=Nn(F),A=Nt(()=>new nn({id:_,labelId:void 0,modal:C,multiple:T,itemToStringLabel:M,itemToStringValue:j,isItemEqualToValue:B,value:m,open:F,mounted:ie,transitionStatus:W,items:L,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Me=c(A,a.activeIndex),ve=c(A,a.selectedIndex),ye=c(A,a.triggerElement),ce=c(A,a.positionerElement),je=Jn(G),Ne=G??je,te=s.useMemo(()=>T?"":ze(m,j),[T,m,j]),at=s.useMemo(()=>T&&Array.isArray(m)?m.map(w=>ze(w,j)):ze(m,j),[T,m,j]),Ge=Ht(ye),Re=He(()=>at);Rn(Ge,_,m,Re,!P,g);const ct=s.useRef(m),Ye=T?Array.isArray(m)&&m.length>0:m!=null&&te!=="";xe(()=>{H(Ye)},[Ye,H]),xe(function(){let k=m,we=!1;if(T){const Le=Array.isArray(m)?m:[];we=Le.length===0,k=Le[Le.length-1]}const Pe=we?-1:ot(X.current,k,B),Ve=Pe===-1?null:Pe;Ve===null&&(Z.current=null),!F&&A.set("selectedIndex",Ve)},[T,F,m,B,A]);function me(w){const k=K.initialValue;return Array.isArray(w)&&Array.isArray(k)?!lo(w,k,(we,Pe)=>We(we,Pe,B)):w!==k}jn(m,()=>{O(l),ue(me(m)),R.change(m)});const De=He((w,k)=>{d?.(w,k),!k.isCanceled&&(oe(w),!w&&(k.reason===wn||k.reason===In)&&($(!0),le(!1),ne==="onBlur"&&R.commit(m)))}),ke=He(()=>{fe(!1),A.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),Y?.(!1)});it({enabled:!U,open:F,ref:D,onComplete(){F||ke()}}),s.useImperativeHandle(U,()=>({unmount:ke}),[ke]);const Ee=He((w,k)=>{u?.(w,k),!k.isCanceled&&Q(w)}),he=He(w=>{const k=wt(w.scrollHeight,w.clientHeight),we=rt(w.scrollTop,k),Pe=we>0,Ve=we<k;A.set("scrollUpArrowVisible",Pe),A.set("scrollDownArrowVisible",Ve)}),Ae=Kn({open:F,onOpenChange:De,elements:{reference:ye,floating:ce}}),Ue=On(Ae,{enabled:!y&&!P,event:"mousedown"}),Be=on(Ae),Ce=Ln(Ae,{enabled:!y&&!P,listRef:f,activeIndex:Me,selectedIndex:ve,disabledIndices:At,onNavigate(w){w===null&&!F||A.set("activeIndex",w)},focusItemOnHover:N}),Oe=Hn(Ae,{enabled:!y&&!P&&(F||!T),listRef:v,activeIndex:Me,selectedIndex:ve,disabledIndices:w=>Sn(f.current[w]),onMatch(w){F?A.set("activeIndex",w):Ee(X.current[w],Ie(st))},onTyping(w){z.current=w}}),Ke=s.useMemo(()=>ht(Oe.reference,Ce.reference,Be.reference,Ue.reference,ae),[Ue.reference,Oe.reference,Ce.reference,Be.reference,ae]),Je=s.useMemo(()=>ht(sn,Oe.floating,Ce.floating,Be.floating),[Oe.floating,Ce.floating,Be.floating]),Qe=Ce.item??Kt;to(()=>{A.update({popupProps:Je,triggerProps:Ke})}),A.useSyncedValues({id:_,modal:C,multiple:T,value:m,open:F,mounted:ie,transitionStatus:W,popupProps:Je,triggerProps:Ke,items:L,itemToStringLabel:M,itemToStringValue:j,isItemEqualToValue:B,openMethod:Ne});const pe=s.useMemo(()=>({store:A,floatingContext:Ae,required:I,disabled:P,readOnly:y,multiple:T,highlightItemOnHover:N,setValue:Ee,setOpen:De,listRef:f,popupRef:D,scrollHandlerRef:ee,handleScrollArrowVisibility:he,scrollArrowsMountedCountRef:Se,itemProps:Qe,valueRef:E,valuesRef:X,labelsRef:v,typingRef:z,selectionRef:se,firstItemTextRef:de,selectedItemTextRef:Z,validation:R,onOpenChangeComplete:Y,alignItemWithTriggerActiveRef:re,initialValueRef:ct}),[A,Ae,I,P,y,T,N,Ee,De,Qe,R,Y,he]),_e=Jt(S,R.inputRef),qe=T?void 0:l,ut=s.useMemo(()=>!T||!Array.isArray(m)||!l?null:m.map(w=>{const k=ze(w,j);return h.jsx("input",{type:"hidden",form:i,name:l,value:k,disabled:P},k)}),[T,m,i,l,j,P]);return h.jsxs(kt.Provider,{value:pe,children:[q,h.jsx("input",{...R.getValidationProps(P,{onFocus(){A.state.triggerElement?.focus({focusVisible:!0})},onChange(w){if(w.nativeEvent.defaultPrevented||P||y)return;const k=w.currentTarget.value,we=Ie(st,w.nativeEvent);function Pe(){if(T)return;const Ve=k.toLowerCase();let Le=X.current.findIndex(dt=>ze(dt,j).toLowerCase()===Ve||Bt(dt,M).toLowerCase()===Ve);Le===-1&&(Le=X.current.findIndex((dt,$t)=>{const Et=v.current[$t];return Et!=null&&Et.toLowerCase()===Ve}));const Mt=X.current[Le];Mt!=null&&Ee(Mt,we)}A.set("forceMount",!0),queueMicrotask(Pe)}}),id:_&&qe==null?`${_}-hidden-input`:void 0,form:i,name:qe,autoComplete:x,value:te,disabled:P,required:I&&!(T&&Ye),readOnly:y,ref:_e,style:l?rn:ln,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ut]})}function ao(e,t){return e??t}const co=400,uo={...cn,...Mn,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},fo=s.forwardRef(function(t,n){const{render:o,className:u,id:p,disabled:r=!1,nativeButton:d=!0,style:g,...i}=t,{setTouched:x,setFocused:b,validationMode:y,state:I,disabled:C}=Ft(),{labelId:U}=Tn(),{store:S,setOpen:Y,selectionRef:L,validation:T,readOnly:M,required:j,alignItemWithTriggerActiveRef:B,disabled:N}=be(),q=C||N||r,O=c(S,a.open),ue=c(S,a.mounted),$=c(S,a.value),le=c(S,a.triggerProps),K=c(S,a.positionerElement),H=c(S,a.listElement),V=c(S,a.popupSide),J=c(S,a.id),R=c(S,a.labelId),ne=c(S,a.hasSelectedValue),_=ue&&K?V:null,P=p??J,l=ao(U,R);Dt({id:P});const m=Ht(K),Q=s.useRef(null),{getButtonProps:F,buttonRef:oe}=Ot({disabled:q,native:d}),f=S.useStateSetter("triggerElement"),v=nt(),D=nt(),ee=nt();s.useEffect(()=>{if(O)return ee.start(co,()=>{L.current.allowUnselectedMouseUp=!0,L.current.allowSelectedMouseUp=!0}),()=>{ee.clear()};L.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},D.clear()},[O,L,D,ee]);const Se=ht(le,{id:P,role:"combobox","aria-expanded":O,"aria-haspopup":"listbox","aria-controls":O?H?.id??an(K)?.id:void 0,"aria-labelledby":l,"aria-readonly":M||void 0,"aria-required":j||void 0,tabIndex:q?-1:0,onFocus(z){b(!0),O&&B.current&&Y(!1,Ie(st,z.nativeEvent)),v.start(0,()=>{S.set("forceMount",!0)})},onBlur(z){pt(K,z.relatedTarget)||(x(!0),b(!1),y==="onBlur"&&T.commit($))},onMouseDown(z){if(O)return;const de=xt(z.currentTarget);function Z(se){if(!Q.current)return;const re=se.target;pt(Q.current,re)||pt(m.current,re)||Fn(se,Q.current)||Y(!1,Ie(En,se))}D.start(0,()=>{de.addEventListener("mouseup",Z,{once:!0})})}},i,F),E=T.getValidationProps(q,Se);E.role="combobox";const X={...I,open:O,disabled:q,value:$,readOnly:M,popupSide:_,placeholder:!ne};return Te("button",t,{ref:[n,Q,oe,f],state:X,stateAttributesMapping:uo,props:E})}),po={value:()=>null},go=s.forwardRef(function(t,n){const{className:o,render:u,children:p,placeholder:r,style:d,...g}=t,{store:i,valueRef:x}=be(),b=c(i,a.value),y=c(i,a.items),I=c(i,a.itemToStringLabel),C=c(i,a.hasSelectedValue),U=!C&&r!=null&&p==null,S=c(i,a.hasNullItemLabel,U),Y={value:b,placeholder:!C};let L=null;return typeof p=="function"?L=p(b):p!=null?L=p:U&&!S?L=r:Array.isArray(b)?L=ro(b,y,I):L=_t(b,y,I),Te("span",t,{state:Y,ref:[n,x],props:[{children:L},g],stateAttributesMapping:po})}),mo=s.forwardRef(function(t,n){const{render:o,className:u,style:p,...r}=t,{store:d}=be(),i={open:c(d,a.open)};return Te("span",t,{state:i,ref:n,props:[{"aria-hidden":!0,children:"▼"},r],stateAttributesMapping:un})}),ho=s.forwardRef(function(t,n){const{store:o}=be(),u=c(o,a.mounted),p=c(o,a.forceMount);return u||p?h.jsx(dn,{ref:n,...t}):null}),zt=s.createContext(void 0);function It(){const e=s.useContext(zt);if(!e)throw new Error(vt(59));return e}function lt(e,t){e&&Object.assign(e.style,t)}const Wt={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},xo={position:"fixed"},bo=s.forwardRef(function(t,n){const{anchor:o,className:u,render:p,positionMethod:r,side:d,align:g,sideOffset:i,alignOffset:x,collisionBoundary:b="clipping-ancestors",collisionPadding:y,arrowPadding:I,sticky:C,disableAnchorTracking:U,alignItemWithTrigger:S=!0,collisionAvoidance:Y=fn,style:L,...T}=t,{store:M,listRef:j,labelsRef:B,alignItemWithTriggerActiveRef:N,selectedItemTextRef:q,valuesRef:O,initialValueRef:ue,popupRef:$,setValue:le,floatingContext:K}=be(),H=c(M,a.open),V=c(M,a.mounted),J=c(M,a.modal),R=c(M,a.value),ne=c(M,a.openMethod),_=c(M,a.positionerElement),P=c(M,a.triggerElement),l=c(M,a.isItemEqualToValue),m=c(M,a.transitionStatus),Q=s.useRef(null),F=s.useRef(null),[oe,f]=s.useState(S),v=V&&oe&&ne!=="touch";!V&&oe!==S&&f(S),s.useImperativeHandle(N,()=>v),Dn((v||J)&&H,ne==="touch",_,P);const D=kn({anchor:o,floatingRootContext:K,positionMethod:r,mounted:V,side:d,sideOffset:i,align:g,alignOffset:x,arrowPadding:I,collisionBoundary:b,collisionPadding:y,sticky:C,disableAnchorTracking:U??v,collisionAvoidance:Y,keepMounted:!0}),ee=v?"none":D.side,Se=v?xo:D.positionerStyles,E={open:H,side:ee,align:D.align,anchorHidden:D.anchorHidden};xe(()=>{M.set("popupSide",D.side)},[M,D.side]);const X=M.useStateSetter("positionerElement"),z=Un(t,E,{styles:Se,transitionStatus:m,props:T,refs:[n,X],hidden:!V,inert:!H}),de=s.useRef(0),Z=He(re=>{if(O.current.length===0)return;const ie=de.current;if(de.current=re.size,re.size===ie)return;const fe=Ie(st);if(ie!==0&&!M.state.multiple&&R!==null&&ot(O.current,R,l)===-1){const G=ue.current,A=G!=null&&ot(O.current,G,l)!==-1?G:null;le(A,fe),A===null&&(M.set("selectedIndex",null),q.current=null)}if(ie!==0&&M.state.multiple&&Array.isArray(R)){const W=R.filter(G=>ot(O.current,G,l)!==-1);W.length!==R.length&&(le(W,fe),W.length===0&&(M.set("selectedIndex",null),q.current=null))}if(H&&v){M.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const W={height:""};lt(_,W),lt($.current,W)}}),se=s.useMemo(()=>({...D,side:ee,alignItemWithTriggerActive:v,setControlledAlignItemWithTrigger:f,scrollUpArrowRef:Q,scrollDownArrowRef:F}),[D,ee,v,f]);return h.jsx(Yn,{elementsRef:j,labelsRef:B,onMapChange:Z,children:h.jsxs(zt.Provider,{value:se,children:[V&&J&&h.jsx(pn,{inert:Cn(!H),cutout:P}),z]})})}),Ze="base-ui-disable-scrollbar",St={className:Ze,getElement(e){return h.jsx("style",{nonce:e,href:Ze,precedence:"base-ui:low",children:`.${Ze}{scrollbar-width:none}.${Ze}::-webkit-scrollbar{display:none}`})}},So={...xn,...Rt},vo=s.forwardRef(function(t,n){const{render:o,className:u,style:p,finalFocus:r,...d}=t,{store:g,popupRef:i,onOpenChangeComplete:x,setOpen:b,valueRef:y,firstItemTextRef:I,selectedItemTextRef:C,multiple:U,handleScrollArrowVisibility:S,scrollHandlerRef:Y,listRef:L,highlightItemOnHover:T,floatingContext:M}=be(),{side:j,align:B,alignItemWithTriggerActive:N,isPositioned:q,setControlledAlignItemWithTrigger:O}=It(),ue=Bn()!=null,$=qn(),{nonce:le,disableStyleElements:K}=eo(),H=c(g,a.id),V=c(g,a.open),J=c(g,a.openMethod),R=c(g,a.mounted),ne=c(g,a.popupProps),_=c(g,a.transitionStatus),P=c(g,a.triggerElement),l=c(g,a.positionerElement),m=c(g,a.listElement),Q=s.useRef(!1),F=s.useRef(!1),oe=s.useRef({}),f=Pn(),v=He(E=>{if(!l||!i.current||!F.current)return;const X=l.style.top==="0px",z=l.style.bottom==="0px";if(Q.current||!N||!X&&!z){S(E);return}const de=Vt(l),Z=Xe(l.getBoundingClientRect().height,"y",de),se=xt(l),re=ft(l),ie=re.getComputedStyle(l),fe=parseFloat(ie.marginTop),W=parseFloat(ie.marginBottom),G=Pt(re.getComputedStyle(i.current)),ae=Math.min(se.documentElement.clientHeight-fe-W,G),A=E.scrollTop,Me=et(E);let ve=null;const ye=te=>{l.style.height=`${te}px`},ce=X?Me-A:A,je=Math.min(Z+ce,ae);if(ce<=ge){const te=$e(ce,0,ae-Z);te>0&&ye(Z+te),E.scrollTop=X?Me:0,ae-(Z+te)<=ge&&(Q.current=!0),S(E);return}if(ae-je>ge)ve=X?1/0:0;else if(z&&A<Me){const te=Z+ce-ae;ve=A-(ce-te)}const Ne=Math.ceil(je);if(Ne!==0&&ye(Ne),ve!=null){const te=$e(ve,0,et(E));Math.abs(E.scrollTop-te)>ge&&(E.scrollTop=te)}Ne>=ae-ge&&(Q.current=!0),S(E)});s.useImperativeHandle(Y,()=>v,[v]),it({open:V,ref:i,onComplete(){V&&x?.(!0)}});const D={open:V,transitionStatus:_,side:j,align:B};xe(()=>{!l||!i.current||Object.keys(oe.current).length||(oe.current={top:l.style.top||"0",left:l.style.left||"0",right:l.style.right,height:l.style.height,bottom:l.style.bottom,minHeight:l.style.minHeight,maxHeight:l.style.maxHeight,marginTop:l.style.marginTop,marginBottom:l.style.marginBottom})},[i,l]),xe(()=>{V||N||(F.current=!1,Q.current=!1,lt(l,oe.current))},[V,N,l,i]),xe(()=>{const E=i.current;if(!V||!P||!l||!E||N&&!q||g.state.transitionStatus==="ending")return;if(F.current=!0,E.style.removeProperty("--transform-origin"),!N){f.request(()=>S(m||E));return}const X=yo(E);try{let z=C.current;z?.isConnected||(z=!a.hasSelectedValue(g.state)&&I.current?.isConnected?I.current:null);const de=y.current,Z=ft(l),se=Z.getComputedStyle(l),re=Z.getComputedStyle(E),ie=xt(P),fe=Vt(P),W=tt(P.getBoundingClientRect(),fe),G=tt(l.getBoundingClientRect(),fe),ae=W.height,A=m||E,Me=A.scrollHeight,ve=parseFloat(re.borderBottomWidth),ye=parseFloat(se.marginTop)||10,ce=parseFloat(se.marginBottom)||10,je=parseFloat(se.minHeight)||100,Ne=Pt(re),te=5,at=5,Ge=20,Re=ie.documentElement.clientHeight-ye-ce,ct=ie.documentElement.clientWidth,Ye=Re-W.bottom+ae;let me,De=$==="rtl"?W.right-G.width:W.left,ke=0;if(z&&de){const pe=tt(de.getBoundingClientRect(),fe);me=tt(z.getBoundingClientRect(),fe),De=G.left+($==="rtl"?pe.right-me.right:pe.left-me.left);const _e=pe.top-W.top+pe.height/2;ke=me.top-G.top+me.height/2-_e}const Ee=Ye+ke+ce+ve;let he=Math.min(Re,Ee);const Ae=Re-ye-ce,Ue=Ee-he,Be=ct-at;l.style.left=`${$e(De,te,Be-G.width)}px`,l.style.height=`${he}px`,l.style.maxHeight="none",l.style.marginTop=`${ye}px`,l.style.marginBottom=`${ce}px`,E.style.height="100%";const Ce=et(A),Oe=Ue>=Ce-ge;Oe&&(he=Math.min(Re,G.height)-(Ue-Ce));const Ke=W.top<Ge||W.bottom>Re-Ge||Math.ceil(he)+ge<Math.min(Me,je),Je=(Z.visualViewport?.scale??1)!==1&&gn;if(Ke||Je){lt(l,oe.current),O(!1);return}const Qe=Math.max(je,he);if(Oe){const pe=Math.max(0,Re-Ee);l.style.top=G.height>=Ae?"0":`${pe}px`,l.style.height=`${he}px`,A.scrollTop=et(A)}else l.style.bottom="0",A.scrollTop=Ue;if(me){const pe=G.top,_e=G.height,qe=me.top+me.height/2,ut=$e(_e>0?(qe-pe)/_e*100:50,0,100);E.style.setProperty("--transform-origin",`50% ${ut}%`)}(Qe===Re||he>=Ne)&&(Q.current=!0),S(A),T&&g.state.selectedIndex===null&&g.state.activeIndex===null&&L.current[0]!=null&&g.set("activeIndex",0)}finally{X()}},[g,V,l,P,y,I,C,i,S,N,O,f,m,L,T,$,q]),s.useEffect(()=>{if(!N||!l||!V)return;const E=ft(l);function X(z){b(!1,Ie(An,z))}return mn(E,"resize",X)},[b,N,l,V]);const ee={...m?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":U||void 0,id:`${H}-list`},onKeyDown(E){ue&&Vn.has(E.key)&&E.stopPropagation()},onScroll(E){m||v(E.currentTarget)},...N&&{style:m?{height:"100%"}:Wt},className:!m&&N?St.className:void 0},Se=Te("div",t,{ref:[n,i],state:D,stateAttributesMapping:So,props:[ne,ee,Wn(_),d]});return h.jsxs(s.Fragment,{children:[!K&&St.getElement(le),h.jsx(hn,{context:M,modal:!1,disabled:!R,openInteractionType:J,returnFocus:r,restoreFocus:!0,children:Se})]})});function Pt(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function et(e){return wt(e.scrollHeight,e.clientHeight)}function Vt(e){return _n.getScale(e)}function Xe(e,t,n){return e/n[t]}function tt(e,t){return zn({x:Xe(e.x,"x",t),y:Xe(e.y,"y",t),width:Xe(e.width,"x",t),height:Xe(e.height,"y",t)})}const jt=[["transform","none"],["scale","1"],["translate","0 0"]];function yo(e){const{style:t}=e,n={};for(const[o,u]of jt)n[o]=t.getPropertyValue(o),t.setProperty(o,u,"important");return()=>{for(const[o]of jt){const u=n[o];u?t.setProperty(o,u):t.removeProperty(o)}}}const Ro=s.forwardRef(function(t,n){const{render:o,className:u,style:p,...r}=t,{store:d,scrollHandlerRef:g,multiple:i}=be(),{alignItemWithTriggerActive:x}=It(),b=c(d,a.hasScrollArrows),y=c(d,a.openMethod),C={id:`${c(d,a.id)}-list`,role:"listbox","aria-multiselectable":i||void 0,onScroll(S){g.current?.(S.currentTarget)},...x&&{style:Wt},className:b&&y!=="touch"?St.className:void 0},U=d.useStateSetter("listElement");return Te("div",t,{ref:[n,U],props:[C,r]})}),Yt=s.createContext(void 0);function Tt(){const e=s.useContext(Yt);if(!e)throw new Error(vt(57));return e}const wo=s.memo(s.forwardRef(function(t,n){const{render:o,className:u,style:p,value:r=null,label:d,disabled:g=!1,nativeButton:i=!1,...x}=t,b=s.useRef(null),y=$n({guess:!0,label:d,textRef:b}),{store:I,itemProps:C,setOpen:U,setValue:S,selectionRef:Y,typingRef:L,valuesRef:T,multiple:M,selectedItemTextRef:j,disabled:B,readOnly:N}=be(),q=B||g,O=c(I,a.isActive,y.index),ue=c(I,a.open),$=c(I,a.isSelected,r),le=c(I,a.isSelectedByFocus,y.index),K=c(I,a.isItemEqualToValue),H=y.index,V=s.useRef(null);xe(()=>{const f=T.current;return f[H]=r,()=>{delete f[H]}},[H,r,T]),xe(()=>{const f=I.state.value;let v=f;M&&Array.isArray(f)&&(v=f.length>0?f[f.length-1]:void 0),v!==void 0&&We(r,v,K)&&(I.set("selectedIndex",H),b.current&&(j.current=b.current))},[H,M,K,I,r,j]);const J=s.useRef("mouse"),R=s.useRef(!1),{getButtonProps:ne,buttonRef:_}=Ot({disabled:q,focusableWhenDisabled:!0,native:i,composite:!0}),P={disabled:q,selected:$,highlighted:O};function l(f){if(B||N)return;const v=I.state.value;if(M){const D=Array.isArray(v)?v:[],ee=$?oo(D,r,K):[...D,r];S(ee,Ie(gt,f))}else S(r,Ie(gt,f)),U(!1,Ie(gt,f))}function m(){Y.current.dragY=0}const Q={role:"option","aria-selected":$,tabIndex:ue&&O?0:-1,onKeyDown(f){I.set("activeIndex",H),f.key===" "&&L.current&&f.preventDefault()},onClick(f){const v=J.current!=="touch",D=f.nativeEvent.pointerType,ee=v&&bn(f.nativeEvent)&&(D!==void 0||O),Se=v&&!ee&&!R.current;R.current=!1,!(q||Se)&&l(f.nativeEvent)},onPointerEnter(f){J.current=f.pointerType},onPointerMove(f){if(f.pointerType==="mouse"&&f.buttons===1){const v=Y.current;v.dragY+=f.movementY,v.dragY**2>=64&&(v.allowUnselectedMouseUp=!0)}},onPointerDown(f){J.current=f.pointerType,R.current=!0,m()},onMouseUp(){if(m(),q||J.current==="touch"||R.current)return;const f=!Y.current.allowSelectedMouseUp&&$,v=!Y.current.allowUnselectedMouseUp&&!$;f||v||(R.current=!0,V.current?.click(),R.current=!1)}},F=Te("div",t,{ref:[_,n,y.ref,V],state:P,props:[C,Q,x,ne]}),oe=s.useMemo(()=>({selected:$,index:H,textRef:b,selectedByFocus:le}),[$,H,b,le]);return h.jsx(Yt.Provider,{value:oe,children:F})})),Io=s.forwardRef(function(t,n){const{selected:o}=Tt();return t.keepMounted||o?h.jsx(To,{...t,ref:n}):null}),To=s.memo(s.forwardRef((e,t)=>{const{render:n,className:o,style:u,keepMounted:p,...r}=e,{selected:d}=Tt(),g=s.useRef(null),{transitionStatus:i,setMounted:x}=yt(d),y=Te("span",e,{ref:[t,g],state:{selected:d,transitionStatus:i},props:[{"aria-hidden":!0,children:"✔️"},r],stateAttributesMapping:Rt});return it({open:d,ref:g,onComplete(){d||x(!1)}}),y})),Mo=s.memo(s.forwardRef(function(t,n){const{index:o,textRef:u,selectedByFocus:p}=Tt(),{firstItemTextRef:r,selectedItemTextRef:d}=be(),{render:g,className:i,style:x,...b}=t,y=s.useCallback(C=>{C&&(o===0&&(r.current=C),p&&(d.current=C))},[r,d,o,p]);return Te("div",t,{ref:[y,n,u],props:b})})),qt=s.forwardRef(function(t,n){const{render:o,className:u,style:p,direction:r,keepMounted:d,...g}=t,i=r==="up",{store:x,popupRef:b,listRef:y,handleScrollArrowVisibility:I,scrollArrowsMountedCountRef:C}=be(),{side:U,scrollDownArrowRef:S,scrollUpArrowRef:Y}=It(),L=i?a.scrollUpArrowVisible:a.scrollDownArrowVisible,T=c(x,L),M=c(x,a.openMethod),j=T&&M!=="touch",B=nt(),N=i?Y:S,{mounted:q,transitionStatus:O,setMounted:ue}=yt(j);xe(()=>(C.current+=1,x.set("hasScrollArrows",!0),()=>{C.current=Math.max(0,C.current-1),C.current===0&&x.set("hasScrollArrows",!1)}),[x,C]),it({open:j,ref:N,onComplete(){j||ue(!1)}});const K=Te("div",t,{ref:[n,N],state:{direction:r,visible:j,side:U,transitionStatus:O},props:[{"aria-hidden":!0,children:i?"▲":"▼",style:{position:"absolute"},onMouseMove(V){if(V.movementX===0&&V.movementY===0||B.isStarted())return;x.set("activeIndex",null);function J(){const R=x.state.listElement??b.current;if(!R)return;x.set("activeIndex",null),I(R);const ne=wt(R.scrollHeight,R.clientHeight),_=rt(R.scrollTop,ne),P=_===(i?0:ne),l=y.current;if(_!==R.scrollTop&&(R.scrollTop=_),P){B.clear();return}if(l.length>0){const m=N.current?.offsetHeight||0;R.scrollTop=Eo(l,i,_,R.clientHeight,m,ne)}B.start(40,J)}B.start(40,J)},onMouseLeave(){B.clear()}},g],stateAttributesMapping:Rt});return q||d?K:null});function Eo(e,t,n,o,u,p){if(t){let x=0;const b=n+u-ge;for(let C=0;C<e.length;C+=1){const U=e[C];if(U&&U.offsetTop>=b){x=C;break}}const y=Math.max(0,x-1),I=e[y];return y<x&&I?rt(I.offsetTop-u,p):0}let r=e.length-1;const d=n+o-u+ge;for(let x=0;x<e.length;x+=1){const b=e[x];if(b&&b.offsetTop+b.offsetHeight>d){r=Math.max(0,x-1);break}}const g=Math.min(e.length-1,r+1),i=e[g];return g>r&&i?rt(i.offsetTop+i.offsetHeight-o+u,p):p}const Ao=s.forwardRef(function(t,n){return h.jsx(qt,{...t,ref:n,direction:"down"})}),Co=s.forwardRef(function(t,n){return h.jsx(qt,{...t,ref:n,direction:"up"})}),Po=io;function Vo({className:e,...t}){return h.jsx(go,{"data-slot":"select-value",className:Fe("flex flex-1 text-left",e),...t})}function jo({className:e,size:t="default",children:n,...o}){return h.jsxs(fo,{"data-slot":"select-trigger","data-size":t,className:Fe("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[n,h.jsx(mo,{render:h.jsx(Lt,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function No({className:e,children:t,side:n="bottom",sideOffset:o=4,align:u="center",alignOffset:p=0,alignItemWithTrigger:r=!0,...d}){return h.jsx(ho,{children:h.jsx(bo,{side:n,sideOffset:o,align:u,alignOffset:p,alignItemWithTrigger:r,className:"isolate z-50",children:h.jsxs(vo,{"data-slot":"select-content","data-align-trigger":r,className:Fe("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d,children:[h.jsx(Lo,{}),h.jsx(Ro,{children:t}),h.jsx(Ho,{})]})})})}function Oo({className:e,children:t,...n}){return h.jsxs(wo,{"data-slot":"select-item",className:Fe("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground 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:[h.jsx(Mo,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),h.jsx(Io,{render:h.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:h.jsx(Qt,{className:"pointer-events-none"})})]})}function Lo({className:e,...t}){return h.jsx(Co,{"data-slot":"select-scroll-up-button",className:Fe("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:h.jsx(Gn,{})})}function Ho({className:e,...t}){return h.jsx(Ao,{"data-slot":"select-scroll-down-button",className:Fe("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:h.jsx(Lt,{})})}const mt="__none__";function Xo({id:e,value:t,onChange:n,options:o,className:u,size:p="default","aria-label":r,placeholder:d="Choose…"}){const g=o.map(i=>({value:i.value===""?mt:i.value,label:i.label}));return h.jsxs(Po,{items:g,value:t===""?mt:t,onValueChange:i=>i!=null&&n(i===mt?"":String(i)),children:[h.jsx(jo,{id:e,size:p,"aria-label":r,className:Fe("w-full bg-card",u),children:h.jsx(Vo,{children:i=>{const x=g.find(b=>b.value===i);return x?x.label:h.jsx("span",{className:"text-muted-foreground",children:d})}})}),h.jsx(No,{children:g.map(i=>h.jsx(Oo,{value:i.value,children:i.label},i.value))})]})}export{Xo as P,Po as S,jo as a,Vo as b,No as c,Oo as d};
@@ -1 +1 @@
1
- import{r,j as e,a9 as o}from"./index-DCtWnS4U.js";function l({saving:s,savedAt:t}){const[i,a]=r.useState(!1);return r.useEffect(()=>{if(!t)return;a(!0);const n=setTimeout(()=>a(!1),1800);return()=>clearTimeout(n)},[t]),s?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[12.5px] text-muted-foreground","aria-live":"polite",children:[e.jsx(o,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Saving"]}):e.jsx("span",{className:"text-[12.5px] text-muted-foreground","aria-live":"polite",children:i?"Saved":""})}export{l as S};
1
+ import{r,j as e,a9 as o}from"./index-DBw3b5Rd.js";function l({saving:s,savedAt:t}){const[i,a]=r.useState(!1);return r.useEffect(()=>{if(!t)return;a(!0);const n=setTimeout(()=>a(!1),1800);return()=>clearTimeout(n)},[t]),s?e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[12.5px] text-muted-foreground","aria-live":"polite",children:[e.jsx(o,{className:"size-3.5 animate-spin","aria-hidden":"true"}),"Saving"]}):e.jsx("span",{className:"text-[12.5px] text-muted-foreground","aria-live":"polite",children:i?"Saved":""})}export{l as S};
@@ -1 +1 @@
1
- import{j as e,u as n,G as a,B as r}from"./index-DCtWnS4U.js";function i({error:s}){const t=n(),o=s instanceof Error?s.message:"Something went wrong.";return e.jsx(a,{children:e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Could not load the dashboard"}),e.jsx("p",{className:"m-0 text-muted-foreground",children:o}),e.jsx(r,{variant:"outline",size:"sm",onClick:()=>void t.invalidate(),children:"Try again"})]})})}const m=({error:s})=>e.jsx(i,{error:s});export{m as errorComponent};
1
+ import{j as e,u as n,G as a,B as r}from"./index-DBw3b5Rd.js";function i({error:s}){const t=n(),o=s instanceof Error?s.message:"Something went wrong.";return e.jsx(a,{children:e.jsxs("div",{className:"flex flex-col items-start gap-3",children:[e.jsx("h1",{className:"m-0 text-lg font-semibold",children:"Could not load the dashboard"}),e.jsx("p",{className:"m-0 text-muted-foreground",children:o}),e.jsx(r,{variant:"outline",size:"sm",onClick:()=>void t.invalidate(),children:"Try again"})]})})}const m=({error:s})=>e.jsx(i,{error:s});export{m as errorComponent};
@@ -1,4 +1,4 @@
1
- import{u as ft,a as xt,b as mt,c as O,d as je,r as o,e as L,f as ce,g as bt,j as e,B as Z,h as w,i as ne,m as ye,E as vt,k as Se,l as fe,n as jt,o as yt,p as ae,q as K,S as St,s as ee,t as $e,v as wt,L as _,w as Nt,M as Ct,x as kt,y as Tt,z as Pt,A as Be,O as Rt}from"./index-DCtWnS4U.js";import{u as we}from"./useQuery-B9Vos2vJ.js";import{D as Mt,a as Et,b as Ot,X as Dt,c as It,d as At,e as _t,f as zt,p as Ht,g as Lt,h as $t,i as Fe,j as Ue,k as qe,l as Bt,m as Ft,n as Ut}from"./dialog-PoGeAS0T.js";import{T as qt,i as Ve,a as Vt,R as Gt,b as Kt,P as Yt,f as Wt,u as Xt,c as Qt,d as Jt,e as Zt,g as es,h as ts,j as ss,k as ns,l as as,m as rs,t as os,n as is,o as ls,F as ds,p as cs,q as us,S as ps,r as gs,s as hs}from"./useScrollLock-d8peZTpK.js";import{c as B,n as Ge,g as fs,a as xe,t as xs,d as ms,i as bs,u as vs,b as ue}from"./createBaseUIEventDetails-CtitjO53.js";import{g as me,u as js,a as ys,b as Ss,s as ws,c as Ns,d as Cs,S as Ke,E as J,D as re,e as oe,f as ie,h as Ne,i as te,j as I,k as G,l as ks,m as pe}from"./dropdown-menu-CnT2RuY9.js";import{u as Ts,a as Ps,g as Rs}from"./getPseudoElementBounds-1HRS6at-.js";import{u as Ms}from"./inertValue-DvQ1EW5I.js";import{u as Ye}from"./useRender-BJibc2kV.js";import{A as Es,a as Os}from"./avatar-CN3-8DpI.js";import{L as Ds,I as Is}from"./label-Br7CuW71.js";import{u as le}from"./me-Bz7e5FMG.js";import{L as se}from"./layout-grid-D8FSCXx_.js";import{U as be}from"./users-DGXcs62X.js";import{c as As}from"./update-duXzIzFS.js";import{P as We}from"./plus-CZbLvWG1.js";import{M as _s,S as zs,a as Hs}from"./sun-ChMFVIDA.js";import"./useBaseQuery-Cw1dAAOb.js";import"./check-CK4ao5He.js";import"./CompositeList-DJzkqbsI.js";import"./CompositeItem-B0Gv-UGy.js";import"./useCompositeItem-CHXWc-fj.js";import"./useValueChanged-CEhqkcjS.js";function Ls(t){const s=ft({warn:t?.router===void 0}),n=t?.router||s;return xt(n.stores.__store,mt(t,n))}/**
1
+ import{u as ft,a as xt,b as mt,c as O,d as je,r as o,e as L,f as ce,g as bt,j as e,B as Z,h as w,i as ne,m as ye,E as vt,k as Se,l as fe,n as jt,o as yt,p as ae,q as K,S as St,s as ee,t as $e,v as wt,L as _,w as Nt,M as Ct,x as kt,y as Tt,z as Pt,A as Be,O as Rt}from"./index-DBw3b5Rd.js";import{u as we}from"./useQuery-rfvcXYjq.js";import{D as Mt,a as Et,b as Ot,X as Dt,c as It,d as At,e as _t,f as zt,p as Ht,g as Lt,h as $t,i as Fe,j as Ue,k as qe,l as Bt,m as Ft,n as Ut}from"./dialog-C8j9bKc9.js";import{T as qt,i as Ve,a as Vt,R as Gt,b as Kt,P as Yt,f as Wt,u as Xt,c as Qt,d as Jt,e as Zt,g as es,h as ts,j as ss,k as ns,l as as,m as rs,t as os,n as is,o as ls,F as ds,p as cs,q as us,S as ps,r as gs,s as hs}from"./useScrollLock-BPMFXP7l.js";import{c as B,n as Ge,g as fs,a as xe,t as xs,d as ms,i as bs,u as vs,b as ue}from"./createBaseUIEventDetails-D5nICp6F.js";import{g as me,u as js,a as ys,b as Ss,s as ws,c as Ns,d as Cs,S as Ke,E as J,D as re,e as oe,f as ie,h as Ne,i as te,j as I,k as G,l as ks,m as pe}from"./dropdown-menu-7_qYsjof.js";import{u as Ts,a as Ps,g as Rs}from"./getPseudoElementBounds-r9s2Gh_c.js";import{u as Ms}from"./inertValue-DPJM1mgv.js";import{u as Ye}from"./useRender-Rc2aDa9D.js";import{A as Es,a as Os}from"./avatar-d0V38Rww.js";import{L as Ds,I as Is}from"./label-BqqDq1Bf.js";import{u as le}from"./me-BuXPSKyo.js";import{L as se}from"./layout-grid-BaI-ZaQt.js";import{U as be}from"./users-ZI_E8YXB.js";import{c as As}from"./update-duXzIzFS.js";import{P as We}from"./plus-DLkZ3d4a.js";import{M as _s,S as zs,a as Hs}from"./sun-DZ77z3mK.js";import"./useBaseQuery-n1C4QVXL.js";import"./check-T8owKS6W.js";import"./CompositeList-C2IVT2Po.js";import"./CompositeItem-XBuzWv1L.js";import"./useCompositeItem-YAQuEkY3.js";import"./useValueChanged-w_Y86K5W.js";function Ls(t){const s=ft({warn:t?.router===void 0}),n=t?.router||s;return xt(n.stores.__store,mt(t,n))}/**
2
2
  * @license lucide-react v1.39.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{Y as p,Z as f,_ as g,p as v,j as e,B as x,$ as N,L as P,a0 as j}from"./index-DCtWnS4U.js";import{P as y}from"./Picker-BGDXZjRG.js";import{Q as b,u as w}from"./useBaseQuery-Cw1dAAOb.js";import{P as S,S as R}from"./parts-BE9o8mAH.js";import{v as E,w as k,S as F}from"./useScrollLock-d8peZTpK.js";import{u as M}from"./me-Bz7e5FMG.js";import"./chevron-down-OtEbsKDP.js";import"./check-CK4ao5He.js";import"./isElementDisabled-CwHw_lZC.js";import"./createBaseUIEventDetails-CtitjO53.js";import"./inertValue-DvQ1EW5I.js";import"./serializeValue-B8e3iXO-.js";import"./useValueChanged-CEhqkcjS.js";import"./getPseudoElementBounds-1HRS6at-.js";import"./CompositeList-DJzkqbsI.js";import"./card-Dxk95cVf.js";var A=class extends b{constructor(s,r){super(s,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(s){s._type="infinite",super.setOptions(s)}getOptimisticResult(s){return s._type="infinite",super.getOptimisticResult(s)}fetchNextPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"backward"}}})}createResult(s,r){const{state:n}=s,l=super.createResult(s,r),{isFetching:o,isRefetching:i,isError:u,isRefetchError:d}=l,t=n.fetchMeta?.fetchMore?.direction,c=u&&t==="forward",a=o&&t==="forward",m=u&&t==="backward",h=o&&t==="backward";return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:f(r,n.data),hasPreviousPage:p(r,n.data),isFetchNextPageError:c,isFetchingNextPage:a,isFetchPreviousPageError:m,isFetchingPreviousPage:h,isRefetchError:d&&!c&&!m,isRefetching:i&&!a&&!h}}};function C(s,r){return w(s,A)}const D=[{value:"unresolved",label:"Needs attention"},...k.map(s=>({value:s,label:F[s]})),{value:"all",label:"Everything"}];function L(s,r=new Date){const n=new Date(s),l=i=>new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime(),o=Math.round((l(r)-l(n))/864e5);return o<=0?"Today":o===1?"Yesterday":o<7?n.toLocaleDateString(void 0,{weekday:"long"}):n.toLocaleDateString(void 0,{day:"numeric",month:"long"})}function V(){const s=M(),{status:r="unresolved",site:n}=g.useSearch(),l=v({from:"/activity"}),o=t=>void l({search:c=>({...c,...t}),replace:!0}),i=C(j(r,n)),u=i.data?.pages.flatMap(t=>t.data)??[],d=[];for(const t of u){const c=L(t.updatedAt),a=d[d.length-1];a?.day===c?a.rows.push(t):d.push({day:c,rows:[t]})}return e.jsxs("div",{className:"flex flex-col gap-5 p-7",children:[e.jsx(S,{title:"Activity",sub:`Every site, newest first${n?"":" — all of them"}`}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[D.map(t=>e.jsx(x,{size:"sm",variant:r===t.value?"default":"outline",onClick:()=>o({status:t.value}),children:t.label},t.value)),e.jsx("div",{className:"flex-1"}),e.jsxs("label",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:["Site",e.jsx(y,{"aria-label":"Site",size:"sm",className:"w-auto min-w-40 text-foreground",value:n??"",onChange:t=>o({site:t||void 0}),options:[{value:"",label:"All sites"},...s.projects.map(t=>({value:t.uid,label:t.name}))]})]})]}),i.isPending&&e.jsx(N,{rows:4}),i.isError&&e.jsx("p",{className:"m-0 text-[13px] text-destructive",children:"Could not read the feed. Reload to try again."}),i.isSuccess&&u.length===0&&e.jsx("p",{className:"m-0 text-[13px] text-muted-foreground",children:r==="resolved"?"Nothing has been resolved yet — this is where finished comments go.":r==="unresolved"?"Nothing needs attention. Every comment on every site is resolved.":"No comments yet on any site."}),d.map(({day:t,rows:c})=>e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"m-0 text-[12px] font-medium uppercase tracking-wide text-muted-foreground",children:t}),e.jsx("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:c.map(a=>e.jsx("li",{children:e.jsxs(P,{to:"/s/$site/comments",params:{site:a.site.uid},search:{thread:a.key},className:"flex flex-col gap-1 rounded-md border border-border px-3 py-2.5 no-underline transition-colors hover:bg-muted/60",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-[13px]",children:[e.jsx(R,{status:a.status}),e.jsx("span",{className:"font-medium text-foreground",children:a.site.name}),e.jsx("code",{className:"font-mono text-[12px] text-muted-foreground",children:a.route}),e.jsx("span",{className:"flex-1"}),e.jsx("span",{className:"text-[12px] text-muted-foreground",children:E(a.updatedAt)})]}),a.latest?.body&&e.jsxs("span",{className:"line-clamp-2 text-[13px] text-foreground",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a.latest.author??a.createdBy.name,": "]}),a.latest.body]}),e.jsxs("span",{className:"flex flex-wrap items-center gap-x-2 text-[12px] text-muted-foreground",children:[e.jsx("span",{className:"font-mono",children:a.key}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:[a.commentCount," ",a.commentCount===1?"comment":"comments"]}),a.assignee&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:a.assignee})]})]})]})},a.id))})]},t)),i.hasNextPage&&e.jsx("div",{children:e.jsx(x,{variant:"outline",size:"sm",disabled:i.isFetchingNextPage,onClick:()=>void i.fetchNextPage(),children:i.isFetchingNextPage?"Reading…":"Show older"})})]})}export{V as component};
1
+ import{Y as p,Z as f,_ as g,p as v,j as e,B as x,$ as N,L as P,a0 as j}from"./index-DBw3b5Rd.js";import{P as y}from"./Picker-lokRYiMC.js";import{Q as b,u as w}from"./useBaseQuery-n1C4QVXL.js";import{P as S,S as R}from"./parts-Dh3j93KT.js";import{v as E,w as k,S as F}from"./useScrollLock-BPMFXP7l.js";import{u as M}from"./me-BuXPSKyo.js";import"./chevron-down-CPxjYKx7.js";import"./check-T8owKS6W.js";import"./isElementDisabled-CwHw_lZC.js";import"./createBaseUIEventDetails-D5nICp6F.js";import"./inertValue-DPJM1mgv.js";import"./serializeValue-B8e3iXO-.js";import"./useValueChanged-w_Y86K5W.js";import"./getPseudoElementBounds-r9s2Gh_c.js";import"./CompositeList-C2IVT2Po.js";import"./card-BqU7TCLe.js";var A=class extends b{constructor(s,r){super(s,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(s){s._type="infinite",super.setOptions(s)}getOptimisticResult(s){return s._type="infinite",super.getOptimisticResult(s)}fetchNextPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(s){return this.fetch({...s,meta:{fetchMore:{direction:"backward"}}})}createResult(s,r){const{state:n}=s,l=super.createResult(s,r),{isFetching:o,isRefetching:i,isError:u,isRefetchError:d}=l,t=n.fetchMeta?.fetchMore?.direction,c=u&&t==="forward",a=o&&t==="forward",m=u&&t==="backward",h=o&&t==="backward";return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:f(r,n.data),hasPreviousPage:p(r,n.data),isFetchNextPageError:c,isFetchingNextPage:a,isFetchPreviousPageError:m,isFetchingPreviousPage:h,isRefetchError:d&&!c&&!m,isRefetching:i&&!a&&!h}}};function C(s,r){return w(s,A)}const D=[{value:"unresolved",label:"Needs attention"},...k.map(s=>({value:s,label:F[s]})),{value:"all",label:"Everything"}];function L(s,r=new Date){const n=new Date(s),l=i=>new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime(),o=Math.round((l(r)-l(n))/864e5);return o<=0?"Today":o===1?"Yesterday":o<7?n.toLocaleDateString(void 0,{weekday:"long"}):n.toLocaleDateString(void 0,{day:"numeric",month:"long"})}function V(){const s=M(),{status:r="unresolved",site:n}=g.useSearch(),l=v({from:"/activity"}),o=t=>void l({search:c=>({...c,...t}),replace:!0}),i=C(j(r,n)),u=i.data?.pages.flatMap(t=>t.data)??[],d=[];for(const t of u){const c=L(t.updatedAt),a=d[d.length-1];a?.day===c?a.rows.push(t):d.push({day:c,rows:[t]})}return e.jsxs("div",{className:"flex flex-col gap-5 p-7",children:[e.jsx(S,{title:"Activity",sub:`Every site, newest first${n?"":" — all of them"}`}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[D.map(t=>e.jsx(x,{size:"sm",variant:r===t.value?"default":"outline",onClick:()=>o({status:t.value}),children:t.label},t.value)),e.jsx("div",{className:"flex-1"}),e.jsxs("label",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:["Site",e.jsx(y,{"aria-label":"Site",size:"sm",className:"w-auto min-w-40 text-foreground",value:n??"",onChange:t=>o({site:t||void 0}),options:[{value:"",label:"All sites"},...s.projects.map(t=>({value:t.uid,label:t.name}))]})]})]}),i.isPending&&e.jsx(N,{rows:4}),i.isError&&e.jsx("p",{className:"m-0 text-[13px] text-destructive",children:"Could not read the feed. Reload to try again."}),i.isSuccess&&u.length===0&&e.jsx("p",{className:"m-0 text-[13px] text-muted-foreground",children:r==="resolved"?"Nothing has been resolved yet — this is where finished comments go.":r==="unresolved"?"Nothing needs attention. Every comment on every site is resolved.":"No comments yet on any site."}),d.map(({day:t,rows:c})=>e.jsxs("section",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"m-0 text-[12px] font-medium uppercase tracking-wide text-muted-foreground",children:t}),e.jsx("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:c.map(a=>e.jsx("li",{children:e.jsxs(P,{to:"/s/$site/comments",params:{site:a.site.uid},search:{thread:a.key},className:"flex flex-col gap-1 rounded-md border border-border px-3 py-2.5 no-underline transition-colors hover:bg-muted/60",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 text-[13px]",children:[e.jsx(R,{status:a.status}),e.jsx("span",{className:"font-medium text-foreground",children:a.site.name}),e.jsx("code",{className:"font-mono text-[12px] text-muted-foreground",children:a.route}),e.jsx("span",{className:"flex-1"}),e.jsx("span",{className:"text-[12px] text-muted-foreground",children:E(a.updatedAt)})]}),a.latest?.body&&e.jsxs("span",{className:"line-clamp-2 text-[13px] text-foreground",children:[e.jsxs("span",{className:"text-muted-foreground",children:[a.latest.author??a.createdBy.name,": "]}),a.latest.body]}),e.jsxs("span",{className:"flex flex-wrap items-center gap-x-2 text-[12px] text-muted-foreground",children:[e.jsx("span",{className:"font-mono",children:a.key}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:[a.commentCount," ",a.commentCount===1?"comment":"comments"]}),a.assignee&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:a.assignee})]})]})]})},a.id))})]},t)),i.hasNextPage&&e.jsx("div",{children:e.jsx(x,{variant:"outline",size:"sm",disabled:i.isFetchingNextPage,onClick:()=>void i.fetchNextPage(),children:i.isFetchingNextPage?"Reading…":"Show older"})})]})}export{V as component};
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-DCtWnS4U.js";/**
1
+ import{c as o}from"./index-DBw3b5Rd.js";/**
2
2
  * @license lucide-react v1.39.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as a,i as b,k as f,j as d,h as m}from"./index-DCtWnS4U.js";import{m as A}from"./useScrollLock-d8peZTpK.js";const x=a.createContext(void 0);function k(){const e=a.useContext(x);if(e===void 0)throw new Error(b(13));return e}const g={imageLoadingStatus:()=>null},z=a.forwardRef(function(t,r){const{className:v,render:p,style:s,...c}=t,[n,o]=a.useState("idle"),i={imageLoadingStatus:n},u=a.useMemo(()=>({imageLoadingStatus:n,setImageLoadingStatus:o}),[n,o]),l=f("span",t,{state:i,ref:r,props:c,stateAttributesMapping:g});return d.jsx(x.Provider,{value:u,children:l})}),R=a.forwardRef(function(t,r){const{className:v,render:p,delay:s=0,style:c,...n}=t,{imageLoadingStatus:o}=k(),[i,u]=a.useState(s===0),l=A();return a.useEffect(()=>(s>0?l.start(s,()=>u(!0)):u(!0),l.clear),[l,s]),f("span",t,{state:{imageLoadingStatus:o},ref:r,props:n,stateAttributesMapping:g,enabled:o!=="loaded"&&(s===0||i)})});function h({className:e,size:t="default",...r}){return d.jsx(z,{"data-slot":"avatar","data-size":t,className:m("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...r})}function M({className:e,...t}){return d.jsx(R,{"data-slot":"avatar-fallback",className:m("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}export{h as A,M as a};
1
+ import{r as a,i as b,k as f,j as d,h as m}from"./index-DBw3b5Rd.js";import{m as A}from"./useScrollLock-BPMFXP7l.js";const x=a.createContext(void 0);function k(){const e=a.useContext(x);if(e===void 0)throw new Error(b(13));return e}const g={imageLoadingStatus:()=>null},z=a.forwardRef(function(t,r){const{className:v,render:p,style:s,...c}=t,[n,o]=a.useState("idle"),i={imageLoadingStatus:n},u=a.useMemo(()=>({imageLoadingStatus:n,setImageLoadingStatus:o}),[n,o]),l=f("span",t,{state:i,ref:r,props:c,stateAttributesMapping:g});return d.jsx(x.Provider,{value:u,children:l})}),R=a.forwardRef(function(t,r){const{className:v,render:p,delay:s=0,style:c,...n}=t,{imageLoadingStatus:o}=k(),[i,u]=a.useState(s===0),l=A();return a.useEffect(()=>(s>0?l.start(s,()=>u(!0)):u(!0),l.clear),[l,s]),f("span",t,{state:{imageLoadingStatus:o},ref:r,props:n,stateAttributesMapping:g,enabled:o!=="loaded"&&(s===0||i)})});function h({className:e,size:t="default",...r}){return d.jsx(z,{"data-slot":"avatar","data-size":t,className:m("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...r})}function M({className:e,...t}){return d.jsx(R,{"data-slot":"avatar-fallback",className:m("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}export{h as A,M as a};
@@ -1 +1 @@
1
- import{m as a,h as n,o}from"./index-DCtWnS4U.js";import{u as d}from"./useRender-BJibc2kV.js";const s=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function v({className:r,variant:e="default",render:t,...i}){return d({defaultTagName:"span",props:a({className:n(s({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{v as B};
1
+ import{m as a,h as n,o}from"./index-DBw3b5Rd.js";import{u as d}from"./useRender-Rc2aDa9D.js";const s=o("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function v({className:r,variant:e="default",render:t,...i}){return d({defaultTagName:"span",props:a({className:n(s({variant:e}),r)},i),render:t,state:{slot:"badge",variant:e}})}export{v as B};
@@ -1 +1 @@
1
- import{j as s,h as t}from"./index-DCtWnS4U.js";function c({className:a,size:d="default",...r}){return s.jsx("div",{"data-slot":"card","data-size":d,className:t("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...r})}export{c as C};
1
+ import{j as s,h as t}from"./index-DBw3b5Rd.js";function c({className:a,size:d="default",...r}){return s.jsx("div",{"data-slot":"card","data-size":d,className:t("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...r})}export{c as C};
@@ -1,4 +1,4 @@
1
- import{c}from"./index-DCtWnS4U.js";/**
1
+ import{c}from"./index-DBw3b5Rd.js";/**
2
2
  * @license lucide-react v1.39.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-DCtWnS4U.js";/**
1
+ import{c as o}from"./index-DBw3b5Rd.js";/**
2
2
  * @license lucide-react v1.39.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-DCtWnS4U.js";/**
1
+ import{c as o}from"./index-DBw3b5Rd.js";/**
2
2
  * @license lucide-react v1.39.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-DCtWnS4U.js";/**
1
+ import{c}from"./index-DBw3b5Rd.js";/**
2
2
  * @license lucide-react v1.39.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r,ak as o,i as R,E as v,bb as w,ai as C,f as T,e as m,l as h,b6 as D}from"./index-DCtWnS4U.js";function k(e){return e?.ownerDocument||document}const F={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},x={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},S={disabled:!1,...x},B={valid(e){return e===null?null:e?{"data-valid":""}:{"data-invalid":""}}},y={invalid:void 0,name:void 0,validityData:{state:F,errors:[],error:"",value:"",initialValue:null},setValidityData:o,disabled:void 0,setTouched:o,setDirty:o,setFilled:o,setFocused:o,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:S,registerFieldControl:o,validation:{getValidationProps:(e,t=v)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:o,getInputControl:()=>null,commit:async()=>{},change:o}},L=r.createContext(y);function A(e=!0){const t=r.useContext(L);if(t.setValidityData===o&&!e)throw new Error(R(28));return t}const P=r.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:o,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function $(){return r.useContext(P)}let b=0;function _(e,t="mui"){const[n,s]=r.useState(e),i=e||n;return r.useEffect(()=>{n==null&&(b+=1,s(`${t}-${b}`))},[n,t]),i}const E=w.useId;function M(e,t){if(E!==void 0){const n=E();return e??(t?`${t}-${n}`:n)}return _(e,t)}function O(e){return M(e,"base-ui")}const U=r.createContext({controlId:void 0,registerControlId:o,labelId:void 0,setLabelId:o,messageIds:[],setMessageIds:o,getDescriptionProps:e=>e});function V(){return r.useContext(U)}function z(e={}){const{id:t,implicit:n=!1,controlRef:s}=e,{controlId:i,registerControlId:l}=V(),a=O(t),u=n?i:void 0,c=C(()=>Symbol()),d=r.useRef(!1),I=r.useRef(t!=null),g=T(()=>{!d.current||l===o||(d.current=!1,l(c.current,void 0))});return m(()=>{if(l===o)return;let f;if(n){const p=s?.current;h(p)&&p.closest("label")!=null?f=t??null:f=u??a}else if(t!=null)I.current=!0,f=t;else if(I.current)f=a;else{g();return}if(f===void 0){g();return}d.current=!0,l(c.current,f)},[t,s,u,l,n,a,c,g]),r.useEffect(()=>g,[g]),i??a}function Y(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function j(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&D(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function q(e){return"composedPath"in e?e.composedPath()[0]:e.target}function G({controlled:e,default:t,name:n,state:s="value"}){const{current:i}=r.useRef(e!==void 0),[l,a]=r.useState(t),u=i?e:l,c=r.useCallback(d=>{i||a(d)},[]);return[u,c]}function H(e,t,n,s,i=!0,l){const{registerFieldControl:a}=A(),u=C(()=>Symbol());m(()=>{const c=u.current;if(!i){a(c,void 0);return}a(c,{controlRef:e,getValue:s,id:t,name:l,value:n})},[e,i,s,t,l,a,u,n]),m(()=>{const c=u.current;return()=>{a(c,void 0)}},[a,u])}const J="none",K="trigger-press",W="trigger-hover",X="trigger-focus",Q="outside-press",Z="item-press",ee="close-press",te="focus-out",ne="escape-key",se="list-navigation",oe="cancel-open",ae="sibling-open",re="disabled",ie="missing",le="initial",ue="imperative-action",ce="window-resize";function de(e,t,n,s){let i=!1,l=!1;const a=s??v;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){l=!0},get isCanceled(){return i},get isPropagationAllowed(){return l},trigger:n,...a}}export{z as A,ce as B,le as C,ie as D,ee as E,j as a,W as b,de as c,re as d,$ as e,B as f,q as g,A as h,ue as i,V as j,G as k,H as l,Y as m,J as n,k as o,X as p,ne as q,Z as r,Q as s,K as t,O as u,ae as v,M as w,te as x,se as y,oe as z};
1
+ import{r,ak as o,i as R,E as v,bb as w,ai as C,f as T,e as m,l as h,b6 as D}from"./index-DBw3b5Rd.js";function k(e){return e?.ownerDocument||document}const F={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},x={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},S={disabled:!1,...x},B={valid(e){return e===null?null:e?{"data-valid":""}:{"data-invalid":""}}},y={invalid:void 0,name:void 0,validityData:{state:F,errors:[],error:"",value:"",initialValue:null},setValidityData:o,disabled:void 0,setTouched:o,setDirty:o,setFilled:o,setFocused:o,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:S,registerFieldControl:o,validation:{getValidationProps:(e,t=v)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:o,getInputControl:()=>null,commit:async()=>{},change:o}},L=r.createContext(y);function A(e=!0){const t=r.useContext(L);if(t.setValidityData===o&&!e)throw new Error(R(28));return t}const P=r.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:o,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function $(){return r.useContext(P)}let b=0;function _(e,t="mui"){const[n,s]=r.useState(e),i=e||n;return r.useEffect(()=>{n==null&&(b+=1,s(`${t}-${b}`))},[n,t]),i}const E=w.useId;function M(e,t){if(E!==void 0){const n=E();return e??(t?`${t}-${n}`:n)}return _(e,t)}function O(e){return M(e,"base-ui")}const U=r.createContext({controlId:void 0,registerControlId:o,labelId:void 0,setLabelId:o,messageIds:[],setMessageIds:o,getDescriptionProps:e=>e});function V(){return r.useContext(U)}function z(e={}){const{id:t,implicit:n=!1,controlRef:s}=e,{controlId:i,registerControlId:l}=V(),a=O(t),u=n?i:void 0,c=C(()=>Symbol()),d=r.useRef(!1),I=r.useRef(t!=null),g=T(()=>{!d.current||l===o||(d.current=!1,l(c.current,void 0))});return m(()=>{if(l===o)return;let f;if(n){const p=s?.current;h(p)&&p.closest("label")!=null?f=t??null:f=u??a}else if(t!=null)I.current=!0,f=t;else if(I.current)f=a;else{g();return}if(f===void 0){g();return}d.current=!0,l(c.current,f)},[t,s,u,l,n,a,c,g]),r.useEffect(()=>g,[g]),i??a}function Y(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function j(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&D(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function q(e){return"composedPath"in e?e.composedPath()[0]:e.target}function G({controlled:e,default:t,name:n,state:s="value"}){const{current:i}=r.useRef(e!==void 0),[l,a]=r.useState(t),u=i?e:l,c=r.useCallback(d=>{i||a(d)},[]);return[u,c]}function H(e,t,n,s,i=!0,l){const{registerFieldControl:a}=A(),u=C(()=>Symbol());m(()=>{const c=u.current;if(!i){a(c,void 0);return}a(c,{controlRef:e,getValue:s,id:t,name:l,value:n})},[e,i,s,t,l,a,u,n]),m(()=>{const c=u.current;return()=>{a(c,void 0)}},[a,u])}const J="none",K="trigger-press",W="trigger-hover",X="trigger-focus",Q="outside-press",Z="item-press",ee="close-press",te="focus-out",ne="escape-key",se="list-navigation",oe="cancel-open",ae="sibling-open",re="disabled",ie="missing",le="initial",ue="imperative-action",ce="window-resize";function de(e,t,n,s){let i=!1,l=!1;const a=s??v;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){l=!0},get isCanceled(){return i},get isPropagationAllowed(){return l},trigger:n,...a}}export{z as A,ce as B,le as C,ie as D,ee as E,j as a,W as b,de as c,re as d,$ as e,B as f,q as g,A as h,ue as i,V as j,G as k,H as l,Y as m,J as n,k as o,X as p,ne as q,Z as r,Q as s,K as t,O as u,ae as v,M as w,te as x,se as y,oe as z};
@@ -1,4 +1,4 @@
1
- import{c as J,r as g,i as A,k as I,aj as Q,E as N,j as a,e as X,B as _,h as O}from"./index-DCtWnS4U.js";import{p as G,a7 as z,P as L,q as Z,an as ee,F as te,M as ne,N as oe,Q as se,g as ae,al as re,h as ie,R as le,Y as ue,u as de,ao as pe,c as ce,d as ge,e as fe}from"./useScrollLock-d8peZTpK.js";import{c as V,E as me,u as H,g as xe,a as Pe,i as Ce}from"./createBaseUIEventDetails-CtitjO53.js";import{t as he,u as Se,C as De,i as Oe}from"./inertValue-DvQ1EW5I.js";/**
1
+ import{c as J,r as g,i as A,k as I,aj as Q,E as N,j as a,e as X,B as _,h as O}from"./index-DBw3b5Rd.js";import{p as G,a7 as z,P as L,q as Z,an as ee,F as te,M as ne,N as oe,Q as se,g as ae,al as re,h as ie,R as le,Y as ue,u as de,ao as pe,c as ce,d as ge,e as fe}from"./useScrollLock-BPMFXP7l.js";import{c as V,E as me,u as H,g as xe,a as Pe,i as Ce}from"./createBaseUIEventDetails-D5nICp6F.js";import{t as he,u as Se,C as De,i as Oe}from"./inertValue-DPJM1mgv.js";/**
2
2
  * @license lucide-react v1.39.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as ut,r as a,k as me,ak as lt,g as _t,l as ue,aF as dt,ai as ft,f as de,e as ve,n as _e,i as Ee,am as Gt,aj as pt,m as Me,al as Ut,j as D,E as Le,aG as Vt,aH as Yt,aI as Xt,aJ as Kt,h as Ie}from"./index-DCtWnS4U.js";import{C as zt}from"./check-CK4ao5He.js";import{i as Ge,z as Wt,m as Re,A as ke,B as gt,C as $t,a as le,D as qt,E as Fe,G as Jt,H as Qt,T as Ue,I as Ke,J as ze,K as Zt,L as Ve,l as ye,M as en,p as tn,N as nn,O as on,o as rn,Q as sn,U as an,R as cn,V as mt,P as un,f as ln,W as ht,c as dn,d as fn,X as pn,Y as gn,Z as mn,g as hn,_ as vn,F as bn,h as En,e as Rn,$ as xn,a0 as Cn,a1 as yn,a2 as Tn,a3 as Mn,j as Pn,k as In,a4 as nt,a5 as ot,a6 as Sn}from"./useScrollLock-d8peZTpK.js";import{m as rt,o as be,a as ee,c as Z,p as Pe,g as Ae,t as vt,q as bt,b as ie,r as We,u as je,s as On,v as Te,k as wn,w as st,x as Ye,y as kn,i as Fn,z as Nn}from"./createBaseUIEventDetails-CtitjO53.js";import{u as Et,C as Dn,a as Ln}from"./CompositeList-DJzkqbsI.js";import{b as An,g as jn,u as Hn,c as Bn,a as _n,d as Gn,e as Un,f as Vn,i as Yn,h as Xn}from"./getPseudoElementBounds-1HRS6at-.js";import{p as Kn,g as zn}from"./dialog-PoGeAS0T.js";import{C as Wn}from"./CompositeItem-B0Gv-UGy.js";import{b as $n,t as qn,u as Rt,C as Jn,c as Qn,i as Zn,a as eo}from"./inertValue-DvQ1EW5I.js";/**
1
+ import{c as ut,r as a,k as me,ak as lt,g as _t,l as ue,aF as dt,ai as ft,f as de,e as ve,n as _e,i as Ee,am as Gt,aj as pt,m as Me,al as Ut,j as D,E as Le,aG as Vt,aH as Yt,aI as Xt,aJ as Kt,h as Ie}from"./index-DBw3b5Rd.js";import{C as zt}from"./check-T8owKS6W.js";import{i as Ge,z as Wt,m as Re,A as ke,B as gt,C as $t,a as le,D as qt,E as Fe,G as Jt,H as Qt,T as Ue,I as Ke,J as ze,K as Zt,L as Ve,l as ye,M as en,p as tn,N as nn,O as on,o as rn,Q as sn,U as an,R as cn,V as mt,P as un,f as ln,W as ht,c as dn,d as fn,X as pn,Y as gn,Z as mn,g as hn,_ as vn,F as bn,h as En,e as Rn,$ as xn,a0 as Cn,a1 as yn,a2 as Tn,a3 as Mn,j as Pn,k as In,a4 as nt,a5 as ot,a6 as Sn}from"./useScrollLock-BPMFXP7l.js";import{m as rt,o as be,a as ee,c as Z,p as Pe,g as Ae,t as vt,q as bt,b as ie,r as We,u as je,s as On,v as Te,k as wn,w as st,x as Ye,y as kn,i as Fn,z as Nn}from"./createBaseUIEventDetails-D5nICp6F.js";import{u as Et,C as Dn,a as Ln}from"./CompositeList-C2IVT2Po.js";import{b as An,g as jn,u as Hn,c as Bn,a as _n,d as Gn,e as Un,f as Vn,i as Yn,h as Xn}from"./getPseudoElementBounds-r9s2Gh_c.js";import{p as Kn,g as zn}from"./dialog-C8j9bKc9.js";import{C as Wn}from"./CompositeItem-XBuzWv1L.js";import{b as $n,t as qn,u as Rt,C as Jn,c as Qn,i as Zn,a as eo}from"./inertValue-DPJM1mgv.js";/**
2
2
  * @license lucide-react v1.39.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as l,s as h,C as p,j as e,G as m,L as d,B as f,D as g,F as j}from"./index-DCtWnS4U.js";import{u as N,a as b}from"./zod-Cs-QZqu7.js";import{L as k,I as y}from"./label-Br7CuW71.js";import"./createBaseUIEventDetails-CtitjO53.js";const S=g({email:j().trim().email("An email address")});function E(){const[s,r]=l.useState(""),[n,a]=l.useState(""),{register:c,handleSubmit:x,formState:t}=N({resolver:b(S)}),u=x(async({email:i})=>{r("");try{await h.requestReset(i),a(i)}catch(o){r(o instanceof p?o.message:"Could not reach the server. Try again.")}});return n?e.jsx(m,{children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("h1",{className:"m-0 text-[22px] font-semibold tracking-tight",children:"Check your mail"}),e.jsxs("p",{className:"m-0 text-muted-foreground",children:["If ",e.jsx("span",{className:"text-foreground",children:n})," has an account here, a link is on its way. It works once and expires in an hour."]}),e.jsxs("p",{className:"m-0 text-[13px] text-muted-foreground",children:["Nothing after a minute? Check the spelling and the spam folder, or"," ",e.jsx("button",{type:"button",className:"text-foreground underline underline-offset-4",onClick:()=>a(""),children:"try another address"}),"."]}),e.jsx("p",{className:"m-0 text-[13px] text-muted-foreground",children:e.jsx(d,{to:"/sign-in",className:"text-foreground underline underline-offset-4",children:"Back to sign in"})})]})}):e.jsx(m,{children:e.jsxs("form",{onSubmit:u,className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs("div",{children:[e.jsx("h1",{className:"m-0 text-[22px] font-semibold tracking-tight",children:"Forgot your password?"}),e.jsx("p",{className:"m-0 mt-1.5 text-muted-foreground",children:"Enter your email. A link is sent to it, and the link lets you choose a new password."})]}),s&&e.jsx("p",{role:"alert",className:"m-0 rounded-md border border-destructive/40 bg-warn-soft px-3 py-2 text-[13px] text-destructive",children:s}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(k,{htmlFor:"email",children:"Email"}),e.jsx(y,{id:"email",type:"email",autoComplete:"username","aria-invalid":!!t.errors.email,...c("email")}),t.errors.email&&e.jsx("p",{className:"m-0 text-[12px] text-destructive",children:t.errors.email.message})]}),e.jsx(f,{type:"submit",size:"lg",loading:t.isSubmitting,children:t.isSubmitting?"Sending…":"Send me the link"}),e.jsx("p",{className:"m-0 text-center text-[13px] text-muted-foreground",children:e.jsx(d,{to:"/sign-in",className:"text-foreground underline underline-offset-4",children:"Back to sign in"})})]})})}export{E as component};
1
+ import{r as l,s as h,C as p,j as e,G as m,L as d,B as f,D as g,F as j}from"./index-DBw3b5Rd.js";import{u as N,a as b}from"./zod-D8TwVQUn.js";import{L as k,I as y}from"./label-BqqDq1Bf.js";import"./createBaseUIEventDetails-D5nICp6F.js";const S=g({email:j().trim().email("An email address")});function E(){const[s,r]=l.useState(""),[n,a]=l.useState(""),{register:c,handleSubmit:x,formState:t}=N({resolver:b(S)}),u=x(async({email:i})=>{r("");try{await h.requestReset(i),a(i)}catch(o){r(o instanceof p?o.message:"Could not reach the server. Try again.")}});return n?e.jsx(m,{children:e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("h1",{className:"m-0 text-[22px] font-semibold tracking-tight",children:"Check your mail"}),e.jsxs("p",{className:"m-0 text-muted-foreground",children:["If ",e.jsx("span",{className:"text-foreground",children:n})," has an account here, a link is on its way. It works once and expires in an hour."]}),e.jsxs("p",{className:"m-0 text-[13px] text-muted-foreground",children:["Nothing after a minute? Check the spelling and the spam folder, or"," ",e.jsx("button",{type:"button",className:"text-foreground underline underline-offset-4",onClick:()=>a(""),children:"try another address"}),"."]}),e.jsx("p",{className:"m-0 text-[13px] text-muted-foreground",children:e.jsx(d,{to:"/sign-in",className:"text-foreground underline underline-offset-4",children:"Back to sign in"})})]})}):e.jsx(m,{children:e.jsxs("form",{onSubmit:u,className:"flex flex-col gap-4",noValidate:!0,children:[e.jsxs("div",{children:[e.jsx("h1",{className:"m-0 text-[22px] font-semibold tracking-tight",children:"Forgot your password?"}),e.jsx("p",{className:"m-0 mt-1.5 text-muted-foreground",children:"Enter your email. A link is sent to it, and the link lets you choose a new password."})]}),s&&e.jsx("p",{role:"alert",className:"m-0 rounded-md border border-destructive/40 bg-warn-soft px-3 py-2 text-[13px] text-destructive",children:s}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(k,{htmlFor:"email",children:"Email"}),e.jsx(y,{id:"email",type:"email",autoComplete:"username","aria-invalid":!!t.errors.email,...c("email")}),t.errors.email&&e.jsx("p",{className:"m-0 text-[12px] text-destructive",children:t.errors.email.message})]}),e.jsx(f,{type:"submit",size:"lg",loading:t.isSubmitting,children:t.isSubmitting?"Sending…":"Send me the link"}),e.jsx("p",{className:"m-0 text-center text-[13px] text-muted-foreground",children:e.jsx(d,{to:"/sign-in",className:"text-foreground underline underline-offset-4",children:"Back to sign in"})})]})})}export{E as component};
@@ -1 +1 @@
1
- import{r as w,E as tn,l as U,aO as we,aF as pe,aP as xe,g as se,aQ as Et,aI as Ze,aH as bt,aR as Cn,aS as nn,aT as Pn,aU as St,aV as on,aW as it,aX as vt,aY as Ht,aZ as rn,n as Mn,e as q,f as ie,aG as Tn,k as Ln}from"./index-DCtWnS4U.js";import{d as Ot,e as _t,g as ht,f as Bt,h as je,j as kn,k as Dn}from"./inertValue-DvQ1EW5I.js";import{m as sn,i as pt,G as In,ab as cn,I as ln,a9 as Fn,ac as Wn,l as ue,J as Vn,ad as $n,ae as fe,C as Hn,aa as _n,af as st,ag as ct,ah as an,ai as Ct,aj as Bn,ak as zn,q as Nn,al as Kn,am as Yn}from"./useScrollLock-d8peZTpK.js";import{t as Xn,g as fn,c as Je,m as xt,o as et,a as Be,y as zt,x as jn}from"./createBaseUIEventDetails-CtitjO53.js";import{u as qn}from"./useValueChanged-CEhqkcjS.js";import{a as Un}from"./CompositeList-DJzkqbsI.js";const Le=Math.min,de=Math.max,tt=Math.round,qe=Math.floor,me=e=>({x:e,y:e}),Gn={left:"right",right:"left",bottom:"top",top:"bottom"};function un(e,t,n){return de(e,Le(t,n))}function ye(e,t){return typeof e=="function"?e(t):e}function Q(e){return e.split("-")[0]}function Re(e){return e.split("-")[1]}function Pt(e){return e==="x"?"y":"x"}function Mt(e){return e==="y"?"height":"width"}function J(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Tt(e){return Pt(J(e))}function Jn(e,t,n){n===void 0&&(n=!1);const o=Re(e),r=Tt(e),i=Mt(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=nt(s)),[s,nt(s)]}function Qn(e){const t=nt(e);return[At(e),t,At(t)]}function At(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Nt=["left","right"],Kt=["right","left"],Zn=["top","bottom"],eo=["bottom","top"];function to(e,t,n){switch(e){case"top":case"bottom":return n?t?Kt:Nt:t?Nt:Kt;case"left":case"right":return t?Zn:eo;default:return[]}}function no(e,t,n,o){const r=Re(e);let i=to(Q(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(At)))),i}function nt(e){const t=Q(e);return Gn[t]+e.slice(t.length)}function oo(e){var t,n,o,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function dn(e){return typeof e!="number"?oo(e):{top:e,right:e,bottom:e,left:e}}function ot(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function dr(e,t={}){const{enabled:n=!0,event:o="click",toggle:r=!0,ignoreMouse:i=!1,stickIfOpen:s=!0,touchOpenDelay:c=0,reason:l=Xn}=t,a="rootStore"in e?e.rootStore:e,u=a.context.dataRef,f=w.useRef(void 0),g=Ot(),m=sn(),d=w.useMemo(()=>{function p(x,y,E,R){const v=Je(l,y,E);x&&R==="touch"&&c>0?m.start(c,()=>{a.setOpen(!0,v)}):a.setOpen(x,v)}function h(x,y,E){const R=u.current.openEvent,v=a.select("domReferenceElement")!==y;return x&&v||!x||!r?!0:R&&s?!E(R.type):!1}return{onPointerDown(x){f.current=pt(x.pointerType,!0)&&cn(x.nativeEvent)?"virtual":x.pointerType},onMouseDown(x){const y=f.current,E=x.nativeEvent,R=a.select("open");if(x.button!==0||o==="click"||pt(y,!0)&&i)return;const v=h(R,x.currentTarget,O=>O==="click"||O==="mousedown"),S=fn(E);if(In(S)){p(v,E,S,y);return}const P=x.currentTarget;g.request(()=>{p(v,E,P,y)})},onClick(x){if(o==="mousedown-only")return;const y=f.current;if(o==="mousedown"&&y){f.current=void 0;return}if(pt(y,!0)&&i)return;const E=a.select("open"),R=h(E,x.currentTarget,v=>v==="click"||v==="mousedown"||v==="keydown"||v==="keyup");p(R,x.nativeEvent,x.currentTarget,y)},onKeyDown(){f.current=void 0}}},[u,o,i,l,a,s,r,g,m,c]);return w.useMemo(()=>n?{reference:d}:tn,[n,d])}function Yt(e,t,n){let{reference:o,floating:r}=e;const i=J(t),s=Tt(t),c=Mt(s),l=Q(t),a=i==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,g=o[c]/2-r[c]/2;let m;switch(l){case"top":m={x:u,y:o.y-r.height};break;case"bottom":m={x:u,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-r.width,y:f};break;default:m={x:o.x,y:o.y}}const d=Re(t);return d&&(m[s]+=g*(d==="end"?1:-1)*(n&&a?-1:1)),m}async function ro(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:g=!1,padding:m=0}=ye(t,e),d=dn(m),h=c[g?f==="floating"?"reference":"floating":f],x=ot(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:l})),y=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),R=await(i.isElement==null?void 0:i.isElement(E))&&await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1},v=ot(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:E,strategy:l}):y);return{top:(x.top-v.top+d.top)/R.y,bottom:(v.bottom-x.bottom+d.bottom)/R.y,left:(x.left-v.left+d.left)/R.x,right:(v.right-x.right+d.right)/R.x}}const io=50,so=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:ro},l=await(s.isRTL==null?void 0:s.isRTL(t));let a=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=Yt(a,o,l),g=o,m=0;const d={};for(let p=0;p<i.length;p++){const h=i[p];if(!h)continue;const{name:x,fn:y}=h,{x:E,y:R,data:v,reset:S}=await y({x:u,y:f,initialPlacement:o,placement:g,strategy:r,middlewareData:d,rects:a,platform:c,elements:{reference:e,floating:t}});u=E??u,f=R??f,d[x]={...d[x],...v},S&&m<io&&(m++,typeof S=="object"&&(S.placement&&(g=S.placement),S.rects&&(a=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:u,y:f}=Yt(a,g,l)),p=-1)}return{x:u,y:f,placement:g,strategy:r,middlewareData:d}},co=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:a}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0,...h}=ye(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Q(r),y=J(c),E=Q(c)===c,R=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=g||(E||!p?[nt(c)]:Qn(c)),S=d!=="none";!g&&S&&v.push(...no(c,p,d,R));const P=[c,...v],O=await l.detectOverflow(t,h),k=[];let L=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&k.push(O[x]),f){const T=Jn(r,s,R);k.push(O[T[0]],O[T[1]])}if(L=[...L,{placement:r,overflows:k}],!k.every(T=>T<=0)){var D,K;const T=(((D=i.flip)==null?void 0:D.index)||0)+1,$=P[T];if($&&(!(f==="alignment"?y!==J($):!1)||L.every(b=>J(b.placement)===y?b.overflows[0]>0:!0)))return{data:{index:T,overflows:L},reset:{placement:$}};let F=(K=L.filter(W=>W.overflows[0]<=0).sort((W,b)=>W.overflows[1]-b.overflows[1])[0])==null?void 0:K.placement;if(!F)switch(m){case"bestFit":{var z;const W=(z=L.filter(b=>{if(S){const H=J(b.placement);return H===y||H==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(H=>H>0).reduce((H,_)=>H+_,0)]).sort((b,H)=>b[1]-H[1])[0])==null?void 0:z[0];W&&(F=W);break}case"initialPlacement":F=c;break}if(r!==F)return{reset:{placement:F}}}return{}}}},mn=new Set(["left","top"]);async function lo(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Q(n),c=Re(n),l=J(n)==="y",a=mn.has(s)?-1:1,u=i&&l?-1:1,f=ye(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof d=="number"&&(m=c==="end"?d*-1:d),l?{x:m*u,y:g*a}:{x:g*a,y:m*u}}const ao=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=t,l=await lo(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},fo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:y=>{let{x:E,y:R}=y;return{x:E,y:R}}},...a}=ye(e,t),u={x:n,y:o},f=await i.detectOverflow(t,a),g=J(r),m=Pt(g);let d=u[m],p=u[g];const h=(y,E)=>un(E+f[y==="y"?"top":"left"],E,E-f[y==="y"?"bottom":"right"]);s&&(d=h(m,d)),c&&(p=h(g,p));const x=l.fn({...t,[m]:d,[g]:p});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[m]:s,[g]:c}}}}}},uo=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:i,placement:s,rects:c,middlewareData:l}=t,{offset:a=0,mainAxis:u=!0,crossAxis:f=!0}=ye(e,t),g={x:r,y:i},m=J(s),d=Pt(m);let p=g[d],h=g[m];const x=ye(a,t),y=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(o=x.crossAxis)!=null?o:0};if(u){const v=d==="y"?"height":"width",S=c.reference[d]-c.floating[v]+y.mainAxis,P=c.reference[d]+c.reference[v]-y.mainAxis;p<S?p=S:p>P&&(p=P)}if(f){var E,R;const v=d==="y"?"width":"height",S=mn.has(Q(s)),P=c.reference[m]-c.floating[v]+(S&&((E=l.offset)==null?void 0:E[m])||0)+(S?0:y.crossAxis),O=c.reference[m]+c.reference[v]+(S?0:((R=l.offset)==null?void 0:R[m])||0)-(S?y.crossAxis:0);h<P?h=P:h>O&&(h=O)}return{[d]:p,[m]:h}}}},mo=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:s=()=>{},...c}=ye(e,t),l=await r.detectOverflow(t,c),a=Q(n),u=Re(n),f=J(n)==="y",{width:g,height:m}=o.floating;let d,p;a==="top"||a==="bottom"?(d=a,p=u===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(p=a,d=u==="end"?"top":"bottom");const h=m-l.top-l.bottom,x=g-l.left-l.right,y=Le(m-l[d],h),E=Le(g-l[p],x),R=t.middlewareData.shift,v=!R;let S=y,P=E;R!=null&&R.enabled.x&&(P=x),R!=null&&R.enabled.y&&(S=h),v&&!u&&(f?P=g-2*de(l.left,l.right):S=m-2*de(l.top,l.bottom)),await s({...t,availableWidth:P,availableHeight:S});const O=await r.getDimensions(i.floating);return g!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function gn(e){const t=xe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=pe(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=tt(n)!==i||tt(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Lt(e){return U(e)?e:e.contextElement}function Te(e){const t=Lt(e);if(!pe(t))return me(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=gn(t);let s=(i?tt(n.width):n.width)/o,c=(i?tt(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const go=me(0);function hn(e){const t=se(e);return!rn()||!t.visualViewport?go:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ho(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===se(e)}function Oe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Lt(e);let s=me(1);t&&(o?U(o)&&(s=Te(o)):s=Te(e));const c=ho(i,n,o)?hn(i):me(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,u=r.width/s.x,f=r.height/s.y;if(i&&o){const g=se(i),m=U(o)?se(o):o;let d=g,p=Ht(d);for(;p&&m!==d;){const h=Te(p),x=p.getBoundingClientRect(),y=xe(p),E=x.left+(p.clientLeft+parseFloat(y.paddingLeft))*h.x,R=x.top+(p.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,a*=h.y,u*=h.x,f*=h.y,l+=E,a+=R,d=se(p),p=Ht(d)}}return ot({width:u,height:f,x:l,y:a})}function lt(e,t){const n=it(e).scrollLeft;return t?t.left+n:Oe(we(e)).left+n}function pn(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-lt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function po(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=we(o),c=t?Et(t.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=me(1);const u=me(0),f=pe(o);if((f||!i)&&((St(o)!=="body"||on(s))&&(l=it(o)),f)){const m=Oe(o);a=Te(o),u.x=m.x+o.clientLeft,u.y=m.y+o.clientTop}const g=s&&!f&&!i?pn(s,l):me(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+u.x+g.x,y:n.y*a.y-l.scrollTop*a.y+u.y+g.y}}function xo(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function yo(e){const t=it(e),n=e.ownerDocument.body,o=de(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=de(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+lt(e);const s=-t.scrollTop;return xe(n).direction==="rtl"&&(i+=de(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:s}}const wo=25;function Ro(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=se(e),i=we(e),s=r.visualViewport;let c=i.clientWidth,l=i.clientHeight,a=0,u=0;if(s){const g=!rn()||t==="fixed";o?g||(a=-s.offsetLeft,u=-s.offsetTop):(c=s.width,l=s.height,g&&(a=s.offsetLeft,u=s.offsetTop))}if(lt(i)<=0){const g=i.ownerDocument,m=g.body,d=getComputedStyle(m),p=g.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,h=Math.abs(i.clientWidth-m.clientWidth-p),x=getComputedStyle(i).scrollbarGutter==="stable both-edges"?h/2:h;x<=wo&&(c-=x)}return{width:c,height:l,x:a,y:u}}function bo(e,t){const n=Oe(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Te(e),s=e.clientWidth*i.x,c=e.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function Xt(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Ro(e,n,t);else if(t==="document")o=yo(we(e));else if(U(t))o=bo(t,n);else{const r=hn(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ot(o)}function vo(e,t){const n=t.get(e);if(n)return n;let o=vt(e,[],!1).filter(c=>U(c)&&St(c)!=="body"),r=null;const i=xe(e).position==="fixed";let s=i?Ze(e):e;for(;U(s)&&!bt(s);){const c=xe(s),l=nn(s),a=r?r.position:i?"fixed":"";!l&&(a==="fixed"||a==="absolute"&&c.position==="static")?o=o.filter(f=>f!==s):r=c,s=Ze(s)}return t.set(e,o),o}function Oo(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Et(t)?[]:vo(t,this._c):[].concat(n),o],c=Xt(t,s[0],r);let l=c.top,a=c.right,u=c.bottom,f=c.left;for(let g=1;g<s.length;g++){const m=Xt(t,s[g],r);l=de(m.top,l),a=Le(m.right,a),u=Le(m.bottom,u),f=de(m.left,f)}return{width:a-f,height:u-l,x:f,y:l}}function Ao(e){const{width:t,height:n}=gn(e);return{width:t,height:n}}function Eo(e,t,n){const o=pe(t),r=we(t),i=n==="fixed",s=Oe(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=me(0);if((o||!i)&&((St(t)!=="body"||on(r))&&(c=it(t)),o)){const g=Oe(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}!o&&r&&(l.x=lt(r));const a=r&&!o&&!i?pn(r,c):me(0),u=s.left+c.scrollLeft-l.x-a.x,f=s.top+c.scrollTop-l.y-a.y;return{x:u,y:f,width:s.width,height:s.height}}function yt(e){return xe(e).position==="static"}function jt(e,t){if(!pe(e)||xe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return we(e)===n&&(n=n.ownerDocument.body),n}function xn(e,t){const n=se(e);if(Et(e))return n;if(!pe(e)){let r=Ze(e);for(;r&&!bt(r);){if(U(r)&&!yt(r))return r;r=Ze(r)}return n}let o=jt(e,t);for(;o&&Cn(o)&&yt(o);)o=jt(o,t);return o&&bt(o)&&yt(o)&&!nn(o)?n:o||Pn(e)||n}const So=async function(e){const t=this.getOffsetParent||xn,n=this.getDimensions,o=await n(e.floating);return{reference:Eo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Co(e){return xe(e).direction==="rtl"}const Po={convertOffsetParentRelativeRectToViewportRelativeRect:po,getDocumentElement:we,getClippingRect:Oo,getOffsetParent:xn,getElementRects:So,getClientRects:xo,getDimensions:Ao,getScale:Te,isElement:U,isRTL:Co};function yn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mo(e,t,n){let o=null,r;const i=we(e);function s(){var u;clearTimeout(r),(u=o)==null||u.disconnect(),o=null}function c(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),s();const g=e.getBoundingClientRect(),{left:m,top:d,width:p,height:h}=g;if(u||t(),!p||!h)return;const x=qe(d),y=qe(i.clientWidth-(m+p)),E=qe(i.clientHeight-(d+h)),R=qe(m),S={rootMargin:-x+"px "+-y+"px "+-E+"px "+-R+"px",threshold:de(0,Le(1,f))||1};let P=!0;function O(k){const L=k[0].intersectionRatio;if(!yn(g,e.getBoundingClientRect()))return c();if(L!==f){if(!P)return c();L?c(!1,L):r=setTimeout(()=>{c(!1,1e-7)},1e3)}P=!1}try{o=new IntersectionObserver(O,{...S,root:i.ownerDocument})}catch{o=new IntersectionObserver(O,S)}o.observe(e)}const l=se(e),a=()=>c(n);return l.addEventListener("resize",a),c(!0),()=>{l.removeEventListener("resize",a),s()}}function qt(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Lt(e),u=r||i?[...a?vt(a):[],...t?vt(t):[]]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n),i&&x.addEventListener("resize",n)});const f=a&&c?Mo(a,n,i):null;let g=-1,m=null;s&&(m=new ResizeObserver(x=>{let[y]=x;y&&y.target===a&&m&&t&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),n()}),a&&!l&&m.observe(a),t&&m.observe(t));let d,p=l?Oe(e):null;l&&h();function h(){const x=Oe(e);p&&!yn(p,x)&&n(),p=x,d=requestAnimationFrame(h)}return n(),()=>{var x;u.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(d)}}const To=ao,Lo=fo,ko=co,Do=mo,Io=uo,Fo=(e,t,n)=>{const o=new Map,r=n??{},i={...Po,...r.platform,_c:o};return so(e,t,{...r,platform:i})};var Wo=typeof document<"u",Vo=function(){},Qe=Wo?w.useLayoutEffect:Vo;function rt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!rt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!rt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function wn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ut(e,t){const n=wn(e);return Math.round(t*n)/n}function wt(e){const t=w.useRef(e);return Qe(()=>{t.current=e}),t}function $o(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=e,[u,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=w.useState(o);rt(g,o)||m(o);const[d,p]=w.useState(null),[h,x]=w.useState(null),y=w.useCallback(b=>{b!==S.current&&(S.current=b,p(b))},[]),E=w.useCallback(b=>{b!==P.current&&(P.current=b,x(b))},[]),R=i||d,v=s||h,S=w.useRef(null),P=w.useRef(null),O=w.useRef(u),k=l!=null,L=wt(l),D=wt(r),K=wt(a),z=w.useCallback(()=>{if(!S.current||!P.current)return;const b={placement:t,strategy:n,middleware:g};D.current&&(b.platform=D.current),Fo(S.current,P.current,b).then(H=>{const _={...H,isPositioned:K.current!==!1};T.current&&!rt(O.current,_)&&(O.current=_,Mn.flushSync(()=>{f(_)}))})},[g,t,n,D,K]);Qe(()=>{a===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(b=>({...b,isPositioned:!1})))},[a]);const T=w.useRef(!1);Qe(()=>(T.current=!0,()=>{T.current=!1}),[]),Qe(()=>{if(R&&(S.current=R),v&&(P.current=v),R&&v){if(L.current)return L.current(R,v,z);z()}},[R,v,z,L,k]);const $=w.useMemo(()=>({reference:S,floating:P,setReference:y,setFloating:E}),[y,E]),F=w.useMemo(()=>({reference:R,floating:v}),[R,v]),W=w.useMemo(()=>{const b={position:n,left:0,top:0};if(!F.floating)return b;const H=Ut(F.floating,u.x),_=Ut(F.floating,u.y);return c?{...b,transform:"translate("+H+"px, "+_+"px)",...wn(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:_}},[n,c,F.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:z,refs:$,elements:F,floatingStyles:W}),[u,z,$,F,W])}const Ho=(e,t)=>{const n=To(e);return{name:n.name,fn:n.fn,options:[e,t]}},_o=(e,t)=>{const n=Lo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bo=(e,t)=>({fn:Io(e).fn,options:[e,t]}),zo=(e,t)=>{const n=ko(e);return{name:n.name,fn:n.fn,options:[e,t]}},No=(e,t)=>{const n=Do(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Ko(e){return Yo(e,e.rootContext)}function Yo(e,t){const{nodeId:n,externalTree:o}=e,r=t.useState("referenceElement"),i=t.useState("floatingElement"),s=t.useState("domReferenceElement"),c=t.useState("open"),l=t.useState("floatingId"),[a,u]=w.useState(null),[f,g]=w.useState(void 0),[m,d]=w.useState(void 0),p=w.useRef(null),h=ln(o),x=w.useMemo(()=>({reference:r,floating:i,domReference:s}),[r,i,s]),y=$o({...e,elements:{...x,...a&&{reference:a}}}),E=U(f)?f:null,R=m===void 0?t.state.floatingElement:m;t.useSyncedValue("referenceElement",f??null),t.useSyncedValue("domReferenceElement",f===void 0?s:E),t.useSyncedValue("floatingElement",R);const v=w.useCallback(D=>{const K=U(D)?{getBoundingClientRect:()=>D.getBoundingClientRect(),getClientRects:()=>D.getClientRects(),contextElement:D}:D;u(K),y.refs.setReference(K)},[y.refs]),S=w.useCallback(D=>{(U(D)||D===null)&&(p.current=D,g(D)),(U(y.refs.reference.current)||y.refs.reference.current===null||D!==null&&!U(D))&&y.refs.setReference(D)},[y.refs,g]),P=w.useCallback(D=>{d(D),y.refs.setFloating(D)},[y.refs]),O=w.useMemo(()=>({...y.refs,setReference:S,setFloating:P,setPositionReference:v,domReference:p}),[y.refs,S,P,v]),k=w.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),L=w.useMemo(()=>({...y,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:O,elements:k,nodeId:n,rootStore:t}),[y,O,k,n,t,c,l]);return q(()=>{s&&(p.current=s)},[s]),q(()=>{t.context.dataRef.current.floatingContext=L;const D=h?.nodesRef.current.find(K=>K.id===n);D&&(D.context=L)}),w.useMemo(()=>({...y,context:L,refs:O,elements:k,rootStore:t}),[y,O,k,L,t])}const Xo="Escape";function Gt(e){return Hn&&e.movementX===0&&e.movementY===0}function at(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ue(e,t){return at(t,e===an||e===Ct,e===st||e===ct)}function Rt(e,t,n){return at(t,e===Ct,n?e===st:e===ct)||e==="Enter"||e===" "||e===""}function jo(e,t,n){return at(t,n?e===st:e===ct,e===Ct)}function qo(e,t,n,o){const r=n?e===ct:e===st,i=e===an;return t==="both"||t==="horizontal"&&o?e===Xo:at(t,r,i)}function mr(e,t){const{listRef:n,activeIndex:o,onNavigate:r=()=>{},enabled:i=!0,selectedIndex:s=null,allowEscape:c=!1,loopFocus:l=!1,nested:a=!1,rtl:u=!1,virtual:f=!1,focusItemOnOpen:g="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:d=!0,disabledIndices:p=void 0,orientation:h="vertical",parentOrientation:x,id:y,resetOnPointerLeave:E=!0,externalTree:R,grid:v}=t,S=v!=null,P="rootStore"in e?e.rootStore:e,O=P.useState("open"),k=P.useState("floatingElement"),L=P.useState("domReferenceElement"),D=P.context.dataRef,K=Fn(k),z=Wn(L),T=ue(K),$=Vn(),F=ln(R),W=w.useRef(g),b=w.useRef(s??-1),H=w.useRef(null),_=w.useRef(!0),N=ie(A=>{r(b.current===-1?null:b.current,A)}),be=w.useRef(!!k),B=w.useRef(O),X=w.useRef(!1),Ae=w.useRef(!1),ke=w.useRef(null),ft=ue(p),Ee=ue(O),ee=ue(s),ce=ue(E),De=Ot(),Se=Ot(),Ie=ie(()=>{function A(V){f?F?.events.emit("virtualfocus",V):ke.current=$n(V,{sync:X.current,preventScroll:!0})}const C=n.current[b.current],Y=Ae.current;C&&A(C),(X.current?V=>V():V=>De.request(V))(()=>{const V=n.current[b.current]||C;if(!V)return;C||A(V),Ce&&(Y||!_.current)&&V.scrollIntoView?.({block:"nearest",inline:"nearest"})})});q(()=>{D.current.orientation=h},[D,h]),q(()=>{i&&(O&&k?(b.current=s??-1,W.current&&s!=null&&(Ae.current=!0,N())):be.current&&(b.current=-1,N()))},[i,O,k,s,N]),q(()=>{if(i){if(!O){X.current=!1;return}if(k)if(o==null){if(X.current=!1,ee.current!=null)return;if(be.current&&(b.current=-1,Ie()),(!B.current||!be.current)&&W.current&&(H.current!=null||W.current===!0&&H.current==null)){let A=0;const C=()=>{n.current[0]==null?(A<2&&(A?M=>Se.request(M):queueMicrotask)(C),A+=1):(b.current=H.current==null||Rt(H.current,h,u)||a?ht(n):Bt(n),H.current=null,N())};C()}}else _t(n.current,o)||(b.current=o,Ie(),Ae.current=!1)}},[i,O,k,o,ee,a,n,h,u,N,Ie,Se]),q(()=>{if(!i||k||!F||f||!be.current)return;const A=F.nodesRef.current,C=A.find(V=>V.id===$)?.context?.elements.floating,Y=xt(et(L??C??null)),M=A.some(V=>V.context&&Be(V.context.elements.floating,Y));C&&!M&&_.current&&C.focus({preventScroll:!0})},[i,k,L,F,$,f]),q(()=>{B.current=O,be.current=!!k}),q(()=>{O||(H.current=null,W.current=g)},[O,g]);const ze=o!=null,te=ie(A=>{if(!Ee.current)return;const C=n.current.indexOf(A.currentTarget);C!==-1&&(b.current!==C||o!==C)&&(b.current=C,N(A))}),ve=ie(()=>x??F?.nodesRef.current.find(A=>A.id===$)?.context?.dataRef?.current.orientation),Fe=ie(()=>ht(n,ft.current)),ge=ie(A=>{if(_.current=!1,X.current=!0,A.which===229||!Ee.current&&A.currentTarget===T.current)return;if(a&&qo(A.key,h,u,S)){Ue(A.key,ve())||fe(A),P.setOpen(!1,Je(zt,A.nativeEvent)),pe(L)&&(f?F?.events.emit("virtualfocus",L):L.focus());return}const C=b.current,Y=ht(n,p),M=Bt(n,p);if(z||(A.key==="Home"&&(fe(A),b.current=Y,N(A)),A.key==="End"&&(fe(A),b.current=M,N(A))),v!=null){const V=v(A,b.current,n,h,l,u,p,Y,M);if(V!=null&&(b.current=V,N(A)),h==="both")return}if(Ue(A.key,h)){if(fe(A),O&&!f&&xt(A.currentTarget.ownerDocument)===A.currentTarget){b.current=Rt(A.key,h,u)?Y:M,N(A);return}Rt(A.key,h,u)?l?C>=M?c&&C!==n.current.length?b.current=-1:(X.current=!1,b.current=Y):b.current=je(n.current,{startingIndex:C,disabledIndices:p}):b.current=Math.min(M,je(n.current,{startingIndex:C,disabledIndices:p})):l?C<=Y?c&&C!==-1?b.current=n.current.length:(X.current=!1,b.current=M):b.current=je(n.current,{startingIndex:C,decrement:!0,disabledIndices:p}):b.current=Math.max(Y,je(n.current,{startingIndex:C,decrement:!0,disabledIndices:p})),_t(n.current,b.current)&&(b.current=-1),N(A)}}),Ce=w.useMemo(()=>({onFocus(C){X.current=!0,te(C)},onClick:({currentTarget:C})=>C.focus({preventScroll:!0}),onMouseMove(C){Gt(C)||(X.current=!0,Ae.current=!1,m&&te(C))},onPointerLeave(C){if(!Ee.current||!_.current||C.pointerType==="touch")return;X.current=!0;const Y=C.relatedTarget;if(!(!m||n.current.includes(Y))&&ce.current&&(ke.current?.(),ke.current=null,b.current=-1,N(C),!f)){const M=T.current,V=xt(et(M));M&&Be(M,V)&&M.focus({preventScroll:!0})}}}),[te,Ee,T,m,n,N,ce,f]),he=w.useMemo(()=>f&&O&&ze&&{"aria-activedescendant":`${y}-${o}`},[f,O,ze,y,o]),le=w.useMemo(()=>({"aria-orientation":h==="both"?void 0:h,...z?{}:he,onKeyDown(A){if(A.key==="Tab"&&A.shiftKey&&O&&!f){const C=fn(A.nativeEvent);if(C&&!Be(T.current,C))return;fe(A),P.setOpen(!1,Je(jn,A.nativeEvent)),pe(L)&&L.focus();return}ge(A)},onPointerMove(A){Gt(A)||(_.current=!0)}}),[he,ge,T,h,z,P,O,f,L]),ne=w.useMemo(()=>{function A(M){P.setOpen(!0,Je(zt,M.nativeEvent,M.currentTarget))}function C(M){g==="auto"&&_n(M.nativeEvent)&&(W.current=!f)}function Y(M){W.current=g,g==="auto"&&cn(M.nativeEvent)&&(W.current=!0)}return{onKeyDown(M){const V=P.select("open");_.current=!1;const Z=M.key.startsWith("Arrow"),Ve=jo(M.key,ve(),u),$e=Ue(M.key,h),Ne=(a?Ve:$e)||M.key==="Enter"||M.key.trim()==="";if(f&&V)return ge(M);if(!(!V&&!d&&Z)){if(Ne){const Pe=Ue(M.key,ve());H.current=a&&Pe?null:M.key}if(a){Ve&&(fe(M),V?(b.current=Fe(),N(M)):A(M));return}$e&&(ee.current!=null&&(b.current=ee.current),fe(M),!V&&d?A(M):ge(M),V&&N(M))}},onFocus(M){P.select("open")&&!f&&(b.current=-1,N(M))},onPointerDown:Y,onPointerEnter:Y,onMouseDown:C,onClick:C}},[ge,g,Fe,a,N,P,d,h,ve,u,ee,f]),We=w.useMemo(()=>({...he,...ne}),[he,ne]);return w.useMemo(()=>i?{reference:We,floating:le,item:Ce,trigger:ne}:{},[i,We,le,ne,Ce])}function gr(e,t){const{listRef:n,elementsRef:o,activeIndex:r,onMatch:i,disabledIndices:s,onTyping:c,enabled:l=!0,resetMs:a=750,selectedIndex:u=null}=t,f="rootStore"in e?e.rootStore:e,g=f.useState("open"),m=sn(),d=w.useRef(""),p=w.useRef(u??r??-1),h=w.useRef(null),x=ie(R=>{function v(T){return o?.current[T]}function S(T){const $=v(T);return $&&!kn($)||$?.matches(":disabled")?!1:s==null||!Dn(Tn,T,s)}function P(T,$,F=0){if(T.length===0)return-1;const W=(F%T.length+T.length)%T.length,b=$.toLowerCase();for(let H=0;H<T.length;H+=1){const _=(W+H)%T.length;if(!(!T[_]?.toLowerCase().startsWith(b)||!S(_)))return _}return-1}const O=n.current;if(d.current.length>0&&R.key===" "&&(fe(R),c?.(!0)),d.current.length>0&&d.current[0]!==" "&&P(O,d.current)===-1&&R.key!==" "&&c?.(!1),O==null||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;g&&R.key!==" "&&(fe(R),c?.(!0));const k=d.current==="";k&&(p.current=u??r??-1),O.every((T,$)=>T&&S($)?T[0]?.toLowerCase()!==T[1]?.toLowerCase():!0)&&d.current===R.key&&(d.current="",p.current=h.current),d.current+=R.key,m.start(a,()=>{d.current="",p.current=h.current,c?.(!1)});const K=((k?u??r??-1:p.current)??0)+1,z=P(O,d.current,K);z!==-1?(i?.(z),h.current=z):R.key!==" "&&(d.current="",c?.(!1))}),y=ie(R=>{const v=R.relatedTarget,S=f.select("domReferenceElement"),P=f.select("floatingElement");Be(S,v)||Be(P,v)||(m.clear(),d.current="",p.current=h.current,c?.(!1))});q(()=>{!g&&u!==null||(m.clear(),h.current=null,d.current!==""&&(d.current=""))},[g,u,m]);const E=w.useMemo(()=>({onKeyDown:x,onBlur:y}),[x,y]);return w.useMemo(()=>l?{reference:E,floating:E}:{},[l,E])}function Uo(e){const t=w.useRef(""),n=w.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:w.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function Go(e,t){const n=ie((i,s)=>{(typeof e=="function"?e():e)||t(s||(Bn?"touch":""))}),{onClick:o,onPointerDown:r}=Uo(n);return w.useMemo(()=>({onClick:o,onPointerDown:r}),[o,r])}function hr(e){const[t,n]=w.useState(null),o=Go(e,n);return qn(e,r=>{r&&!e&&n(null)}),w.useMemo(()=>({openMethod:t,triggerProps:o}),[t,o])}const Jo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=t,{element:a,padding:u=0,offsetParent:f="real"}=ye(e,t)||{};if(a==null)return{};const g=dn(u),m={x:n,y:o},d=Tt(r),p=Mt(d),h=await s.getDimensions(a),x=d==="y",y=x?"top":"left",E=x?"bottom":"right",R=x?"clientHeight":"clientWidth",v=i.reference[p]+i.reference[d]-m[d]-i.floating[p],S=m[d]-i.reference[d],P=f==="real"?await s.getOffsetParent?.(a):c.floating;let O=c.floating[R]||i.floating[p];(!O||!await s.isElement?.(P))&&(O=c.floating[R]||i.floating[p]);const k=v/2-S/2,L=O/2-h[p]/2-1,D=Math.min(g[y],L),K=Math.min(g[E],L),z=D,T=O-h[p]-K,$=O/2-h[p]/2+k,F=un(z,$,T),W=!l.arrow&&Re(r)!=null&&$!==F&&i.reference[p]/2-($<z?D:K)-h[p]/2<0,b=W?$<z?$-z:$-T:0;return{[d]:m[d]+b,data:{[d]:F,centerOffset:$-F-b,...W&&{alignmentOffset:b}},reset:W}}}),Qo=(e,t)=>({...Jo(e),options:[e,t]}),Zo={name:"hide",async fn(e){const{width:t,height:n,x:o,y:r}=e.rects.reference,i=t===0&&n===0&&o===0&&r===0,s=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:s.top-n>=0||s.right-t>=0||s.bottom-n>=0||s.left-t>=0||i}}}},er={sideX:"left",sideY:"top"},Jt="--available-width",Qt="--available-height";function Rn(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function Zt(e,t,n){const{rects:o,placement:r}=e;return{side:Rn(t,Q(r),n),align:Re(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function pr(e){return tr(e,Ko)}function tr(e,t){const{anchor:n,positionMethod:o="absolute",side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:a=5,sticky:u=!1,arrowPadding:f=5,disableAnchorTracking:g=!1,inline:m,keepMounted:d=!1,floatingRootContext:p,mounted:h,collisionAvoidance:x,shift:y,nodeId:E,adaptiveOrigin:R,lazyFlip:v=!1,externalTree:S}=e,[P,O]=w.useState(null);!h&&P!==null&&O(null);const k=x.side||"flip",L=x.align||"flip",D=x.fallbackAxisSide||"end",K=y?.crossAxis??!1,z=y?.rootBoundary,T=typeof n=="function"?n:void 0,$=ie(T),F=T?$:n,W=ue(n),b=ue(h),_=Un()==="rtl",N=P||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":_?"left":"right","inline-start":_?"right":"left"}[r],be=s==="center"?N:`${N}-${s}`;let B=a;typeof B=="number"?B={top:B,right:B,bottom:B,left:B}:B&&(B={top:B.top||0,right:B.right||0,bottom:B.bottom||0,left:B.left||0});const X=1,Ae=r==="bottom"?X:0,ke=r==="top"?X:0,ft=r==="right"?X:0,Ee=r==="left"?X:0,ee={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:B},ce=w.useRef(null),De=ue(i),Se=ue(c),Ie=typeof i!="function"?i:0,ze=typeof c!="function"?c:0,te=[];m&&te.push(m),te.push(Ho(I=>{const G=Zt(I,r,_),oe=typeof De.current=="function"?De.current(G):De.current,j=typeof Se.current=="function"?Se.current(G):Se.current;return{mainAxis:oe,crossAxis:j,alignmentAxis:j}},[Ie,ze,_,r]));const ve=L==="none"&&k!=="shift",Fe=!ve&&(u||K||k==="shift"),ge=k==="none"?null:zo({...ee,padding:{top:B.top+X+Ae,right:B.right+X+Ee,bottom:B.bottom+X+ke,left:B.left+X+ft},mainAxis:!K&&k==="flip",crossAxis:L==="flip"?"alignment":!1,fallbackAxisSideDirection:D}),Ce=ve?null:_o({...ee,rootBoundary:z,mainAxis:L!=="none",crossAxis:Fe,limiter:u||K?void 0:Bo(I=>{if(!ce.current)return{};const{width:G,height:oe}=ce.current.getBoundingClientRect(),j=J(Q(I.placement)),ae=j==="y"?G:oe,re=j==="y"?B.left+B.right:B.top+B.bottom;return{offset:ae/2+re/2}})},[ee,u,K,z,B,L]);k==="shift"||L==="shift"||s==="center"?te.push(Ce,ge):te.push(ge,Ce),te.push(No({...ee,apply({elements:{floating:I},availableWidth:G,availableHeight:oe,rects:j}){if(!b.current)return;const ae=I.style;ae.setProperty(Jt,`${G}px`),ae.setProperty(Qt,`${oe}px`);const re=se(I).devicePixelRatio||1,{x:He,y:Ye,width:Xe,height:ut}=j.reference,dt=(Math.round((He+Xe)*re)-Math.round(He*re))/re,mt=(Math.round((Ye+ut)*re)-Math.round(Ye*re))/re;ae.setProperty("--anchor-width",`${dt}px`),ae.setProperty("--anchor-height",`${mt}px`)}}),Qo(I=>({element:ce.current||et(I.elements.floating).createElement("div"),padding:f,offsetParent:"floating"}),[f]),{name:"transformOrigin",fn(I){const{elements:G,middlewareData:oe,placement:j,rects:ae,y:re}=I,He=Q(j),Ye=J(He),Xe=ce.current,ut=oe.arrow?.x||0,dt=oe.arrow?.y||0,mt=Xe?.clientWidth||0,bn=Xe?.clientHeight||0,gt=ut+mt/2,$t=dt+bn/2,vn=Math.abs(oe.shift?.y||0),On=ae.reference.height/2,_e=typeof i=="function"?i(Zt(I,r,_)):i,An=vn>_e,En={top:`${gt}px calc(100% + ${_e}px)`,bottom:`${gt}px ${-_e}px`,left:`calc(100% + ${_e}px) ${$t}px`,right:`${-_e}px ${$t}px`}[He],Sn=`${gt}px ${ae.reference.y+On-re}px`;return G.floating.style.setProperty("--transform-origin",Fe&&Ye==="y"&&An?Sn:En),{}}},Zo,R),q(()=>{!h&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,p]);const he=w.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:le,elements:ne,x:We,y:A,middlewareData:C,update:Y,placement:M,context:V,isPositioned:Z,floatingStyles:Ve}=t({rootContext:p,open:d?h:void 0,placement:be,middleware:te,strategy:o,whileElementsMounted:d?void 0:(...I)=>qt(...I,he),nodeId:E,externalTree:S}),{sideX:$e,sideY:Ne}=C.adaptiveOrigin||er,Pe=Z?o:"fixed",kt=w.useMemo(()=>{let I;return Z?R?I={position:Pe,[$e]:We,[Ne]:A}:I={...Ve,position:Pe}:I={position:Pe,top:0,left:0},I[Jt]="100vw",I[Qt]="100vh",Z||(I.opacity=0),I},[R,Pe,$e,We,Ne,A,Ve,Z]),Ke=w.useRef(null);q(()=>{if(!h)return;const I=W.current,G=typeof I=="function"?I():I,j=(en(G)?G.current:G)||null||null;j!==Ke.current&&(le.setPositionReference(j),Ke.current=j)},[h,le,F,W]),w.useEffect(()=>{if(!h)return;const I=W.current;typeof I!="function"&&en(I)&&I.current!==Ke.current&&(le.setPositionReference(I.current),Ke.current=I.current)},[h,le,F,W]),w.useEffect(()=>{if(d&&h&&ne.reference&&ne.floating)return qt(ne.reference,ne.floating,Y,he)},[d,h,ne,Y,he]);const Me=Q(M),Dt=Rn(r,Me,_),It=Re(M)||"center",Ft=!!C.hide?.referenceHidden;q(()=>{v&&h&&Z&&Me!==N&&O(Me)},[v,h,Z,Me,N]);const Wt=w.useMemo(()=>({position:"absolute",top:C.arrow?.y,left:C.arrow?.x}),[C.arrow]),Vt=C.arrow?.centerOffset!==0;return w.useMemo(()=>({positionerStyles:kt,arrowStyles:Wt,arrowRef:ce,arrowUncentered:Vt,side:Dt,align:It,physicalSide:Me,anchorHidden:Ft,refs:le,context:V,isPositioned:Z,update:Y}),[kt,Wt,ce,Vt,Dt,It,Me,Ft,le,V,Z,Y])}function en(e){return e!=null&&"current"in e}function nr(e){return e==="starting"?zn:tn}function xr(e,t,{styles:n,transitionStatus:o,props:r,refs:i,hidden:s,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),Ln("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:l},nr(o),r],stateAttributesMapping:Nn})}const or=w.createContext(void 0);function yr(e){return w.useContext(or)}const rr=20;function wr(e,t,n,o){const[r,i]=w.useState(!1);q(()=>{if(!e||!t||n==null){i(!1);return}const s=et(n).documentElement.clientWidth,c=n.offsetWidth;i(s>0&&c>0&&c>=s-rr)},[e,t,n]),Kn(e&&(!t||r),o)}const Ge=5;function Rr(e,t){const n=ir(t);return e.clientX>=n.left-Ge&&e.clientX<=n.right+Ge&&e.clientY>=n.top-Ge&&e.clientY<=n.bottom+Ge}function ir(e){const t=e.getBoundingClientRect(),n=se(e);if(Yn)return t;const o=n.getComputedStyle(e,"::before"),r=n.getComputedStyle(e,"::after");if(!(o.content!=="none"||r.content!=="none"))return t;const s=parseFloat(o.width)||0,c=parseFloat(o.height)||0,l=parseFloat(r.width)||0,a=parseFloat(r.height)||0,u=Math.max(t.width,s,l),f=Math.max(t.height,c,a),g=u-t.width,m=f-t.height;return{left:t.left-g/2,right:t.right+g/2,top:t.top-m/2,bottom:t.bottom+m/2}}export{xr as a,yr as b,wr as c,hr as d,mr as e,gr as f,nr as g,dr as h,Rr as i,Po as p,ot as r,pr as u};
1
+ import{r as w,E as tn,l as U,aO as we,aF as pe,aP as xe,g as se,aQ as Et,aI as Ze,aH as bt,aR as Cn,aS as nn,aT as Pn,aU as St,aV as on,aW as it,aX as vt,aY as Ht,aZ as rn,n as Mn,e as q,f as ie,aG as Tn,k as Ln}from"./index-DBw3b5Rd.js";import{d as Ot,e as _t,g as ht,f as Bt,h as je,j as kn,k as Dn}from"./inertValue-DPJM1mgv.js";import{m as sn,i as pt,G as In,ab as cn,I as ln,a9 as Fn,ac as Wn,l as ue,J as Vn,ad as $n,ae as fe,C as Hn,aa as _n,af as st,ag as ct,ah as an,ai as Ct,aj as Bn,ak as zn,q as Nn,al as Kn,am as Yn}from"./useScrollLock-BPMFXP7l.js";import{t as Xn,g as fn,c as Je,m as xt,o as et,a as Be,y as zt,x as jn}from"./createBaseUIEventDetails-D5nICp6F.js";import{u as qn}from"./useValueChanged-w_Y86K5W.js";import{a as Un}from"./CompositeList-C2IVT2Po.js";const Le=Math.min,de=Math.max,tt=Math.round,qe=Math.floor,me=e=>({x:e,y:e}),Gn={left:"right",right:"left",bottom:"top",top:"bottom"};function un(e,t,n){return de(e,Le(t,n))}function ye(e,t){return typeof e=="function"?e(t):e}function Q(e){return e.split("-")[0]}function Re(e){return e.split("-")[1]}function Pt(e){return e==="x"?"y":"x"}function Mt(e){return e==="y"?"height":"width"}function J(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Tt(e){return Pt(J(e))}function Jn(e,t,n){n===void 0&&(n=!1);const o=Re(e),r=Tt(e),i=Mt(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=nt(s)),[s,nt(s)]}function Qn(e){const t=nt(e);return[At(e),t,At(t)]}function At(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Nt=["left","right"],Kt=["right","left"],Zn=["top","bottom"],eo=["bottom","top"];function to(e,t,n){switch(e){case"top":case"bottom":return n?t?Kt:Nt:t?Nt:Kt;case"left":case"right":return t?Zn:eo;default:return[]}}function no(e,t,n,o){const r=Re(e);let i=to(Q(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(At)))),i}function nt(e){const t=Q(e);return Gn[t]+e.slice(t.length)}function oo(e){var t,n,o,r;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(r=e.left)!=null?r:0}}function dn(e){return typeof e!="number"?oo(e):{top:e,right:e,bottom:e,left:e}}function ot(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function dr(e,t={}){const{enabled:n=!0,event:o="click",toggle:r=!0,ignoreMouse:i=!1,stickIfOpen:s=!0,touchOpenDelay:c=0,reason:l=Xn}=t,a="rootStore"in e?e.rootStore:e,u=a.context.dataRef,f=w.useRef(void 0),g=Ot(),m=sn(),d=w.useMemo(()=>{function p(x,y,E,R){const v=Je(l,y,E);x&&R==="touch"&&c>0?m.start(c,()=>{a.setOpen(!0,v)}):a.setOpen(x,v)}function h(x,y,E){const R=u.current.openEvent,v=a.select("domReferenceElement")!==y;return x&&v||!x||!r?!0:R&&s?!E(R.type):!1}return{onPointerDown(x){f.current=pt(x.pointerType,!0)&&cn(x.nativeEvent)?"virtual":x.pointerType},onMouseDown(x){const y=f.current,E=x.nativeEvent,R=a.select("open");if(x.button!==0||o==="click"||pt(y,!0)&&i)return;const v=h(R,x.currentTarget,O=>O==="click"||O==="mousedown"),S=fn(E);if(In(S)){p(v,E,S,y);return}const P=x.currentTarget;g.request(()=>{p(v,E,P,y)})},onClick(x){if(o==="mousedown-only")return;const y=f.current;if(o==="mousedown"&&y){f.current=void 0;return}if(pt(y,!0)&&i)return;const E=a.select("open"),R=h(E,x.currentTarget,v=>v==="click"||v==="mousedown"||v==="keydown"||v==="keyup");p(R,x.nativeEvent,x.currentTarget,y)},onKeyDown(){f.current=void 0}}},[u,o,i,l,a,s,r,g,m,c]);return w.useMemo(()=>n?{reference:d}:tn,[n,d])}function Yt(e,t,n){let{reference:o,floating:r}=e;const i=J(t),s=Tt(t),c=Mt(s),l=Q(t),a=i==="y",u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,g=o[c]/2-r[c]/2;let m;switch(l){case"top":m={x:u,y:o.y-r.height};break;case"bottom":m={x:u,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-r.width,y:f};break;default:m={x:o.x,y:o.y}}const d=Re(t);return d&&(m[s]+=g*(d==="end"?1:-1)*(n&&a?-1:1)),m}async function ro(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:g=!1,padding:m=0}=ye(t,e),d=dn(m),h=c[g?f==="floating"?"reference":"floating":f],x=ot(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:l})),y=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),R=await(i.isElement==null?void 0:i.isElement(E))&&await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1},v=ot(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:E,strategy:l}):y);return{top:(x.top-v.top+d.top)/R.y,bottom:(v.bottom-x.bottom+d.bottom)/R.y,left:(x.left-v.left+d.left)/R.x,right:(v.right-x.right+d.right)/R.x}}const io=50,so=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:ro},l=await(s.isRTL==null?void 0:s.isRTL(t));let a=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:f}=Yt(a,o,l),g=o,m=0;const d={};for(let p=0;p<i.length;p++){const h=i[p];if(!h)continue;const{name:x,fn:y}=h,{x:E,y:R,data:v,reset:S}=await y({x:u,y:f,initialPlacement:o,placement:g,strategy:r,middlewareData:d,rects:a,platform:c,elements:{reference:e,floating:t}});u=E??u,f=R??f,d[x]={...d[x],...v},S&&m<io&&(m++,typeof S=="object"&&(S.placement&&(g=S.placement),S.rects&&(a=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:u,y:f}=Yt(a,g,l)),p=-1)}return{x:u,y:f,placement:g,strategy:r,middlewareData:d}},co=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:a}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:p=!0,...h}=ye(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Q(r),y=J(c),E=Q(c)===c,R=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=g||(E||!p?[nt(c)]:Qn(c)),S=d!=="none";!g&&S&&v.push(...no(c,p,d,R));const P=[c,...v],O=await l.detectOverflow(t,h),k=[];let L=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&k.push(O[x]),f){const T=Jn(r,s,R);k.push(O[T[0]],O[T[1]])}if(L=[...L,{placement:r,overflows:k}],!k.every(T=>T<=0)){var D,K;const T=(((D=i.flip)==null?void 0:D.index)||0)+1,$=P[T];if($&&(!(f==="alignment"?y!==J($):!1)||L.every(b=>J(b.placement)===y?b.overflows[0]>0:!0)))return{data:{index:T,overflows:L},reset:{placement:$}};let F=(K=L.filter(W=>W.overflows[0]<=0).sort((W,b)=>W.overflows[1]-b.overflows[1])[0])==null?void 0:K.placement;if(!F)switch(m){case"bestFit":{var z;const W=(z=L.filter(b=>{if(S){const H=J(b.placement);return H===y||H==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(H=>H>0).reduce((H,_)=>H+_,0)]).sort((b,H)=>b[1]-H[1])[0])==null?void 0:z[0];W&&(F=W);break}case"initialPlacement":F=c;break}if(r!==F)return{reset:{placement:F}}}return{}}}},mn=new Set(["left","top"]);async function lo(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Q(n),c=Re(n),l=J(n)==="y",a=mn.has(s)?-1:1,u=i&&l?-1:1,f=ye(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof d=="number"&&(m=c==="end"?d*-1:d),l?{x:m*u,y:g*a}:{x:g*a,y:m*u}}const ao=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=t,l=await lo(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},fo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:y=>{let{x:E,y:R}=y;return{x:E,y:R}}},...a}=ye(e,t),u={x:n,y:o},f=await i.detectOverflow(t,a),g=J(r),m=Pt(g);let d=u[m],p=u[g];const h=(y,E)=>un(E+f[y==="y"?"top":"left"],E,E-f[y==="y"?"bottom":"right"]);s&&(d=h(m,d)),c&&(p=h(g,p));const x=l.fn({...t,[m]:d,[g]:p});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[m]:s,[g]:c}}}}}},uo=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:r,y:i,placement:s,rects:c,middlewareData:l}=t,{offset:a=0,mainAxis:u=!0,crossAxis:f=!0}=ye(e,t),g={x:r,y:i},m=J(s),d=Pt(m);let p=g[d],h=g[m];const x=ye(a,t),y=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(o=x.crossAxis)!=null?o:0};if(u){const v=d==="y"?"height":"width",S=c.reference[d]-c.floating[v]+y.mainAxis,P=c.reference[d]+c.reference[v]-y.mainAxis;p<S?p=S:p>P&&(p=P)}if(f){var E,R;const v=d==="y"?"width":"height",S=mn.has(Q(s)),P=c.reference[m]-c.floating[v]+(S&&((E=l.offset)==null?void 0:E[m])||0)+(S?0:y.crossAxis),O=c.reference[m]+c.reference[v]+(S?0:((R=l.offset)==null?void 0:R[m])||0)-(S?y.crossAxis:0);h<P?h=P:h>O&&(h=O)}return{[d]:p,[m]:h}}}},mo=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:r,elements:i}=t,{apply:s=()=>{},...c}=ye(e,t),l=await r.detectOverflow(t,c),a=Q(n),u=Re(n),f=J(n)==="y",{width:g,height:m}=o.floating;let d,p;a==="top"||a==="bottom"?(d=a,p=u===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(p=a,d=u==="end"?"top":"bottom");const h=m-l.top-l.bottom,x=g-l.left-l.right,y=Le(m-l[d],h),E=Le(g-l[p],x),R=t.middlewareData.shift,v=!R;let S=y,P=E;R!=null&&R.enabled.x&&(P=x),R!=null&&R.enabled.y&&(S=h),v&&!u&&(f?P=g-2*de(l.left,l.right):S=m-2*de(l.top,l.bottom)),await s({...t,availableWidth:P,availableHeight:S});const O=await r.getDimensions(i.floating);return g!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function gn(e){const t=xe(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=pe(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=tt(n)!==i||tt(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Lt(e){return U(e)?e:e.contextElement}function Te(e){const t=Lt(e);if(!pe(t))return me(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=gn(t);let s=(i?tt(n.width):n.width)/o,c=(i?tt(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const go=me(0);function hn(e){const t=se(e);return!rn()||!t.visualViewport?go:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ho(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===se(e)}function Oe(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Lt(e);let s=me(1);t&&(o?U(o)&&(s=Te(o)):s=Te(e));const c=ho(i,n,o)?hn(i):me(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,u=r.width/s.x,f=r.height/s.y;if(i&&o){const g=se(i),m=U(o)?se(o):o;let d=g,p=Ht(d);for(;p&&m!==d;){const h=Te(p),x=p.getBoundingClientRect(),y=xe(p),E=x.left+(p.clientLeft+parseFloat(y.paddingLeft))*h.x,R=x.top+(p.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,a*=h.y,u*=h.x,f*=h.y,l+=E,a+=R,d=se(p),p=Ht(d)}}return ot({width:u,height:f,x:l,y:a})}function lt(e,t){const n=it(e).scrollLeft;return t?t.left+n:Oe(we(e)).left+n}function pn(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-lt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function po(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=we(o),c=t?Et(t.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=me(1);const u=me(0),f=pe(o);if((f||!i)&&((St(o)!=="body"||on(s))&&(l=it(o)),f)){const m=Oe(o);a=Te(o),u.x=m.x+o.clientLeft,u.y=m.y+o.clientTop}const g=s&&!f&&!i?pn(s,l):me(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+u.x+g.x,y:n.y*a.y-l.scrollTop*a.y+u.y+g.y}}function xo(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function yo(e){const t=it(e),n=e.ownerDocument.body,o=de(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=de(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-t.scrollLeft+lt(e);const s=-t.scrollTop;return xe(n).direction==="rtl"&&(i+=de(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:s}}const wo=25;function Ro(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=se(e),i=we(e),s=r.visualViewport;let c=i.clientWidth,l=i.clientHeight,a=0,u=0;if(s){const g=!rn()||t==="fixed";o?g||(a=-s.offsetLeft,u=-s.offsetTop):(c=s.width,l=s.height,g&&(a=s.offsetLeft,u=s.offsetTop))}if(lt(i)<=0){const g=i.ownerDocument,m=g.body,d=getComputedStyle(m),p=g.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,h=Math.abs(i.clientWidth-m.clientWidth-p),x=getComputedStyle(i).scrollbarGutter==="stable both-edges"?h/2:h;x<=wo&&(c-=x)}return{width:c,height:l,x:a,y:u}}function bo(e,t){const n=Oe(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Te(e),s=e.clientWidth*i.x,c=e.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function Xt(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Ro(e,n,t);else if(t==="document")o=yo(we(e));else if(U(t))o=bo(t,n);else{const r=hn(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ot(o)}function vo(e,t){const n=t.get(e);if(n)return n;let o=vt(e,[],!1).filter(c=>U(c)&&St(c)!=="body"),r=null;const i=xe(e).position==="fixed";let s=i?Ze(e):e;for(;U(s)&&!bt(s);){const c=xe(s),l=nn(s),a=r?r.position:i?"fixed":"";!l&&(a==="fixed"||a==="absolute"&&c.position==="static")?o=o.filter(f=>f!==s):r=c,s=Ze(s)}return t.set(e,o),o}function Oo(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Et(t)?[]:vo(t,this._c):[].concat(n),o],c=Xt(t,s[0],r);let l=c.top,a=c.right,u=c.bottom,f=c.left;for(let g=1;g<s.length;g++){const m=Xt(t,s[g],r);l=de(m.top,l),a=Le(m.right,a),u=Le(m.bottom,u),f=de(m.left,f)}return{width:a-f,height:u-l,x:f,y:l}}function Ao(e){const{width:t,height:n}=gn(e);return{width:t,height:n}}function Eo(e,t,n){const o=pe(t),r=we(t),i=n==="fixed",s=Oe(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=me(0);if((o||!i)&&((St(t)!=="body"||on(r))&&(c=it(t)),o)){const g=Oe(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}!o&&r&&(l.x=lt(r));const a=r&&!o&&!i?pn(r,c):me(0),u=s.left+c.scrollLeft-l.x-a.x,f=s.top+c.scrollTop-l.y-a.y;return{x:u,y:f,width:s.width,height:s.height}}function yt(e){return xe(e).position==="static"}function jt(e,t){if(!pe(e)||xe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return we(e)===n&&(n=n.ownerDocument.body),n}function xn(e,t){const n=se(e);if(Et(e))return n;if(!pe(e)){let r=Ze(e);for(;r&&!bt(r);){if(U(r)&&!yt(r))return r;r=Ze(r)}return n}let o=jt(e,t);for(;o&&Cn(o)&&yt(o);)o=jt(o,t);return o&&bt(o)&&yt(o)&&!nn(o)?n:o||Pn(e)||n}const So=async function(e){const t=this.getOffsetParent||xn,n=this.getDimensions,o=await n(e.floating);return{reference:Eo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Co(e){return xe(e).direction==="rtl"}const Po={convertOffsetParentRelativeRectToViewportRelativeRect:po,getDocumentElement:we,getClippingRect:Oo,getOffsetParent:xn,getElementRects:So,getClientRects:xo,getDimensions:Ao,getScale:Te,isElement:U,isRTL:Co};function yn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mo(e,t,n){let o=null,r;const i=we(e);function s(){var u;clearTimeout(r),(u=o)==null||u.disconnect(),o=null}function c(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),s();const g=e.getBoundingClientRect(),{left:m,top:d,width:p,height:h}=g;if(u||t(),!p||!h)return;const x=qe(d),y=qe(i.clientWidth-(m+p)),E=qe(i.clientHeight-(d+h)),R=qe(m),S={rootMargin:-x+"px "+-y+"px "+-E+"px "+-R+"px",threshold:de(0,Le(1,f))||1};let P=!0;function O(k){const L=k[0].intersectionRatio;if(!yn(g,e.getBoundingClientRect()))return c();if(L!==f){if(!P)return c();L?c(!1,L):r=setTimeout(()=>{c(!1,1e-7)},1e3)}P=!1}try{o=new IntersectionObserver(O,{...S,root:i.ownerDocument})}catch{o=new IntersectionObserver(O,S)}o.observe(e)}const l=se(e),a=()=>c(n);return l.addEventListener("resize",a),c(!0),()=>{l.removeEventListener("resize",a),s()}}function qt(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Lt(e),u=r||i?[...a?vt(a):[],...t?vt(t):[]]:[];u.forEach(x=>{r&&x.addEventListener("scroll",n),i&&x.addEventListener("resize",n)});const f=a&&c?Mo(a,n,i):null;let g=-1,m=null;s&&(m=new ResizeObserver(x=>{let[y]=x;y&&y.target===a&&m&&t&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),n()}),a&&!l&&m.observe(a),t&&m.observe(t));let d,p=l?Oe(e):null;l&&h();function h(){const x=Oe(e);p&&!yn(p,x)&&n(),p=x,d=requestAnimationFrame(h)}return n(),()=>{var x;u.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(d)}}const To=ao,Lo=fo,ko=co,Do=mo,Io=uo,Fo=(e,t,n)=>{const o=new Map,r=n??{},i={...Po,...r.platform,_c:o};return so(e,t,{...r,platform:i})};var Wo=typeof document<"u",Vo=function(){},Qe=Wo?w.useLayoutEffect:Vo;function rt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!rt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!rt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function wn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ut(e,t){const n=wn(e);return Math.round(t*n)/n}function wt(e){const t=w.useRef(e);return Qe(()=>{t.current=e}),t}function $o(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=e,[u,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=w.useState(o);rt(g,o)||m(o);const[d,p]=w.useState(null),[h,x]=w.useState(null),y=w.useCallback(b=>{b!==S.current&&(S.current=b,p(b))},[]),E=w.useCallback(b=>{b!==P.current&&(P.current=b,x(b))},[]),R=i||d,v=s||h,S=w.useRef(null),P=w.useRef(null),O=w.useRef(u),k=l!=null,L=wt(l),D=wt(r),K=wt(a),z=w.useCallback(()=>{if(!S.current||!P.current)return;const b={placement:t,strategy:n,middleware:g};D.current&&(b.platform=D.current),Fo(S.current,P.current,b).then(H=>{const _={...H,isPositioned:K.current!==!1};T.current&&!rt(O.current,_)&&(O.current=_,Mn.flushSync(()=>{f(_)}))})},[g,t,n,D,K]);Qe(()=>{a===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(b=>({...b,isPositioned:!1})))},[a]);const T=w.useRef(!1);Qe(()=>(T.current=!0,()=>{T.current=!1}),[]),Qe(()=>{if(R&&(S.current=R),v&&(P.current=v),R&&v){if(L.current)return L.current(R,v,z);z()}},[R,v,z,L,k]);const $=w.useMemo(()=>({reference:S,floating:P,setReference:y,setFloating:E}),[y,E]),F=w.useMemo(()=>({reference:R,floating:v}),[R,v]),W=w.useMemo(()=>{const b={position:n,left:0,top:0};if(!F.floating)return b;const H=Ut(F.floating,u.x),_=Ut(F.floating,u.y);return c?{...b,transform:"translate("+H+"px, "+_+"px)",...wn(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:_}},[n,c,F.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:z,refs:$,elements:F,floatingStyles:W}),[u,z,$,F,W])}const Ho=(e,t)=>{const n=To(e);return{name:n.name,fn:n.fn,options:[e,t]}},_o=(e,t)=>{const n=Lo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bo=(e,t)=>({fn:Io(e).fn,options:[e,t]}),zo=(e,t)=>{const n=ko(e);return{name:n.name,fn:n.fn,options:[e,t]}},No=(e,t)=>{const n=Do(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Ko(e){return Yo(e,e.rootContext)}function Yo(e,t){const{nodeId:n,externalTree:o}=e,r=t.useState("referenceElement"),i=t.useState("floatingElement"),s=t.useState("domReferenceElement"),c=t.useState("open"),l=t.useState("floatingId"),[a,u]=w.useState(null),[f,g]=w.useState(void 0),[m,d]=w.useState(void 0),p=w.useRef(null),h=ln(o),x=w.useMemo(()=>({reference:r,floating:i,domReference:s}),[r,i,s]),y=$o({...e,elements:{...x,...a&&{reference:a}}}),E=U(f)?f:null,R=m===void 0?t.state.floatingElement:m;t.useSyncedValue("referenceElement",f??null),t.useSyncedValue("domReferenceElement",f===void 0?s:E),t.useSyncedValue("floatingElement",R);const v=w.useCallback(D=>{const K=U(D)?{getBoundingClientRect:()=>D.getBoundingClientRect(),getClientRects:()=>D.getClientRects(),contextElement:D}:D;u(K),y.refs.setReference(K)},[y.refs]),S=w.useCallback(D=>{(U(D)||D===null)&&(p.current=D,g(D)),(U(y.refs.reference.current)||y.refs.reference.current===null||D!==null&&!U(D))&&y.refs.setReference(D)},[y.refs,g]),P=w.useCallback(D=>{d(D),y.refs.setFloating(D)},[y.refs]),O=w.useMemo(()=>({...y.refs,setReference:S,setFloating:P,setPositionReference:v,domReference:p}),[y.refs,S,P,v]),k=w.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),L=w.useMemo(()=>({...y,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:O,elements:k,nodeId:n,rootStore:t}),[y,O,k,n,t,c,l]);return q(()=>{s&&(p.current=s)},[s]),q(()=>{t.context.dataRef.current.floatingContext=L;const D=h?.nodesRef.current.find(K=>K.id===n);D&&(D.context=L)}),w.useMemo(()=>({...y,context:L,refs:O,elements:k,rootStore:t}),[y,O,k,L,t])}const Xo="Escape";function Gt(e){return Hn&&e.movementX===0&&e.movementY===0}function at(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ue(e,t){return at(t,e===an||e===Ct,e===st||e===ct)}function Rt(e,t,n){return at(t,e===Ct,n?e===st:e===ct)||e==="Enter"||e===" "||e===""}function jo(e,t,n){return at(t,n?e===st:e===ct,e===Ct)}function qo(e,t,n,o){const r=n?e===ct:e===st,i=e===an;return t==="both"||t==="horizontal"&&o?e===Xo:at(t,r,i)}function mr(e,t){const{listRef:n,activeIndex:o,onNavigate:r=()=>{},enabled:i=!0,selectedIndex:s=null,allowEscape:c=!1,loopFocus:l=!1,nested:a=!1,rtl:u=!1,virtual:f=!1,focusItemOnOpen:g="auto",focusItemOnHover:m=!0,openOnArrowKeyDown:d=!0,disabledIndices:p=void 0,orientation:h="vertical",parentOrientation:x,id:y,resetOnPointerLeave:E=!0,externalTree:R,grid:v}=t,S=v!=null,P="rootStore"in e?e.rootStore:e,O=P.useState("open"),k=P.useState("floatingElement"),L=P.useState("domReferenceElement"),D=P.context.dataRef,K=Fn(k),z=Wn(L),T=ue(K),$=Vn(),F=ln(R),W=w.useRef(g),b=w.useRef(s??-1),H=w.useRef(null),_=w.useRef(!0),N=ie(A=>{r(b.current===-1?null:b.current,A)}),be=w.useRef(!!k),B=w.useRef(O),X=w.useRef(!1),Ae=w.useRef(!1),ke=w.useRef(null),ft=ue(p),Ee=ue(O),ee=ue(s),ce=ue(E),De=Ot(),Se=Ot(),Ie=ie(()=>{function A(V){f?F?.events.emit("virtualfocus",V):ke.current=$n(V,{sync:X.current,preventScroll:!0})}const C=n.current[b.current],Y=Ae.current;C&&A(C),(X.current?V=>V():V=>De.request(V))(()=>{const V=n.current[b.current]||C;if(!V)return;C||A(V),Ce&&(Y||!_.current)&&V.scrollIntoView?.({block:"nearest",inline:"nearest"})})});q(()=>{D.current.orientation=h},[D,h]),q(()=>{i&&(O&&k?(b.current=s??-1,W.current&&s!=null&&(Ae.current=!0,N())):be.current&&(b.current=-1,N()))},[i,O,k,s,N]),q(()=>{if(i){if(!O){X.current=!1;return}if(k)if(o==null){if(X.current=!1,ee.current!=null)return;if(be.current&&(b.current=-1,Ie()),(!B.current||!be.current)&&W.current&&(H.current!=null||W.current===!0&&H.current==null)){let A=0;const C=()=>{n.current[0]==null?(A<2&&(A?M=>Se.request(M):queueMicrotask)(C),A+=1):(b.current=H.current==null||Rt(H.current,h,u)||a?ht(n):Bt(n),H.current=null,N())};C()}}else _t(n.current,o)||(b.current=o,Ie(),Ae.current=!1)}},[i,O,k,o,ee,a,n,h,u,N,Ie,Se]),q(()=>{if(!i||k||!F||f||!be.current)return;const A=F.nodesRef.current,C=A.find(V=>V.id===$)?.context?.elements.floating,Y=xt(et(L??C??null)),M=A.some(V=>V.context&&Be(V.context.elements.floating,Y));C&&!M&&_.current&&C.focus({preventScroll:!0})},[i,k,L,F,$,f]),q(()=>{B.current=O,be.current=!!k}),q(()=>{O||(H.current=null,W.current=g)},[O,g]);const ze=o!=null,te=ie(A=>{if(!Ee.current)return;const C=n.current.indexOf(A.currentTarget);C!==-1&&(b.current!==C||o!==C)&&(b.current=C,N(A))}),ve=ie(()=>x??F?.nodesRef.current.find(A=>A.id===$)?.context?.dataRef?.current.orientation),Fe=ie(()=>ht(n,ft.current)),ge=ie(A=>{if(_.current=!1,X.current=!0,A.which===229||!Ee.current&&A.currentTarget===T.current)return;if(a&&qo(A.key,h,u,S)){Ue(A.key,ve())||fe(A),P.setOpen(!1,Je(zt,A.nativeEvent)),pe(L)&&(f?F?.events.emit("virtualfocus",L):L.focus());return}const C=b.current,Y=ht(n,p),M=Bt(n,p);if(z||(A.key==="Home"&&(fe(A),b.current=Y,N(A)),A.key==="End"&&(fe(A),b.current=M,N(A))),v!=null){const V=v(A,b.current,n,h,l,u,p,Y,M);if(V!=null&&(b.current=V,N(A)),h==="both")return}if(Ue(A.key,h)){if(fe(A),O&&!f&&xt(A.currentTarget.ownerDocument)===A.currentTarget){b.current=Rt(A.key,h,u)?Y:M,N(A);return}Rt(A.key,h,u)?l?C>=M?c&&C!==n.current.length?b.current=-1:(X.current=!1,b.current=Y):b.current=je(n.current,{startingIndex:C,disabledIndices:p}):b.current=Math.min(M,je(n.current,{startingIndex:C,disabledIndices:p})):l?C<=Y?c&&C!==-1?b.current=n.current.length:(X.current=!1,b.current=M):b.current=je(n.current,{startingIndex:C,decrement:!0,disabledIndices:p}):b.current=Math.max(Y,je(n.current,{startingIndex:C,decrement:!0,disabledIndices:p})),_t(n.current,b.current)&&(b.current=-1),N(A)}}),Ce=w.useMemo(()=>({onFocus(C){X.current=!0,te(C)},onClick:({currentTarget:C})=>C.focus({preventScroll:!0}),onMouseMove(C){Gt(C)||(X.current=!0,Ae.current=!1,m&&te(C))},onPointerLeave(C){if(!Ee.current||!_.current||C.pointerType==="touch")return;X.current=!0;const Y=C.relatedTarget;if(!(!m||n.current.includes(Y))&&ce.current&&(ke.current?.(),ke.current=null,b.current=-1,N(C),!f)){const M=T.current,V=xt(et(M));M&&Be(M,V)&&M.focus({preventScroll:!0})}}}),[te,Ee,T,m,n,N,ce,f]),he=w.useMemo(()=>f&&O&&ze&&{"aria-activedescendant":`${y}-${o}`},[f,O,ze,y,o]),le=w.useMemo(()=>({"aria-orientation":h==="both"?void 0:h,...z?{}:he,onKeyDown(A){if(A.key==="Tab"&&A.shiftKey&&O&&!f){const C=fn(A.nativeEvent);if(C&&!Be(T.current,C))return;fe(A),P.setOpen(!1,Je(jn,A.nativeEvent)),pe(L)&&L.focus();return}ge(A)},onPointerMove(A){Gt(A)||(_.current=!0)}}),[he,ge,T,h,z,P,O,f,L]),ne=w.useMemo(()=>{function A(M){P.setOpen(!0,Je(zt,M.nativeEvent,M.currentTarget))}function C(M){g==="auto"&&_n(M.nativeEvent)&&(W.current=!f)}function Y(M){W.current=g,g==="auto"&&cn(M.nativeEvent)&&(W.current=!0)}return{onKeyDown(M){const V=P.select("open");_.current=!1;const Z=M.key.startsWith("Arrow"),Ve=jo(M.key,ve(),u),$e=Ue(M.key,h),Ne=(a?Ve:$e)||M.key==="Enter"||M.key.trim()==="";if(f&&V)return ge(M);if(!(!V&&!d&&Z)){if(Ne){const Pe=Ue(M.key,ve());H.current=a&&Pe?null:M.key}if(a){Ve&&(fe(M),V?(b.current=Fe(),N(M)):A(M));return}$e&&(ee.current!=null&&(b.current=ee.current),fe(M),!V&&d?A(M):ge(M),V&&N(M))}},onFocus(M){P.select("open")&&!f&&(b.current=-1,N(M))},onPointerDown:Y,onPointerEnter:Y,onMouseDown:C,onClick:C}},[ge,g,Fe,a,N,P,d,h,ve,u,ee,f]),We=w.useMemo(()=>({...he,...ne}),[he,ne]);return w.useMemo(()=>i?{reference:We,floating:le,item:Ce,trigger:ne}:{},[i,We,le,ne,Ce])}function gr(e,t){const{listRef:n,elementsRef:o,activeIndex:r,onMatch:i,disabledIndices:s,onTyping:c,enabled:l=!0,resetMs:a=750,selectedIndex:u=null}=t,f="rootStore"in e?e.rootStore:e,g=f.useState("open"),m=sn(),d=w.useRef(""),p=w.useRef(u??r??-1),h=w.useRef(null),x=ie(R=>{function v(T){return o?.current[T]}function S(T){const $=v(T);return $&&!kn($)||$?.matches(":disabled")?!1:s==null||!Dn(Tn,T,s)}function P(T,$,F=0){if(T.length===0)return-1;const W=(F%T.length+T.length)%T.length,b=$.toLowerCase();for(let H=0;H<T.length;H+=1){const _=(W+H)%T.length;if(!(!T[_]?.toLowerCase().startsWith(b)||!S(_)))return _}return-1}const O=n.current;if(d.current.length>0&&R.key===" "&&(fe(R),c?.(!0)),d.current.length>0&&d.current[0]!==" "&&P(O,d.current)===-1&&R.key!==" "&&c?.(!1),O==null||R.key.length!==1||R.ctrlKey||R.metaKey||R.altKey)return;g&&R.key!==" "&&(fe(R),c?.(!0));const k=d.current==="";k&&(p.current=u??r??-1),O.every((T,$)=>T&&S($)?T[0]?.toLowerCase()!==T[1]?.toLowerCase():!0)&&d.current===R.key&&(d.current="",p.current=h.current),d.current+=R.key,m.start(a,()=>{d.current="",p.current=h.current,c?.(!1)});const K=((k?u??r??-1:p.current)??0)+1,z=P(O,d.current,K);z!==-1?(i?.(z),h.current=z):R.key!==" "&&(d.current="",c?.(!1))}),y=ie(R=>{const v=R.relatedTarget,S=f.select("domReferenceElement"),P=f.select("floatingElement");Be(S,v)||Be(P,v)||(m.clear(),d.current="",p.current=h.current,c?.(!1))});q(()=>{!g&&u!==null||(m.clear(),h.current=null,d.current!==""&&(d.current=""))},[g,u,m]);const E=w.useMemo(()=>({onKeyDown:x,onBlur:y}),[x,y]);return w.useMemo(()=>l?{reference:E,floating:E}:{},[l,E])}function Uo(e){const t=w.useRef(""),n=w.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:w.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function Go(e,t){const n=ie((i,s)=>{(typeof e=="function"?e():e)||t(s||(Bn?"touch":""))}),{onClick:o,onPointerDown:r}=Uo(n);return w.useMemo(()=>({onClick:o,onPointerDown:r}),[o,r])}function hr(e){const[t,n]=w.useState(null),o=Go(e,n);return qn(e,r=>{r&&!e&&n(null)}),w.useMemo(()=>({openMethod:t,triggerProps:o}),[t,o])}const Jo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=t,{element:a,padding:u=0,offsetParent:f="real"}=ye(e,t)||{};if(a==null)return{};const g=dn(u),m={x:n,y:o},d=Tt(r),p=Mt(d),h=await s.getDimensions(a),x=d==="y",y=x?"top":"left",E=x?"bottom":"right",R=x?"clientHeight":"clientWidth",v=i.reference[p]+i.reference[d]-m[d]-i.floating[p],S=m[d]-i.reference[d],P=f==="real"?await s.getOffsetParent?.(a):c.floating;let O=c.floating[R]||i.floating[p];(!O||!await s.isElement?.(P))&&(O=c.floating[R]||i.floating[p]);const k=v/2-S/2,L=O/2-h[p]/2-1,D=Math.min(g[y],L),K=Math.min(g[E],L),z=D,T=O-h[p]-K,$=O/2-h[p]/2+k,F=un(z,$,T),W=!l.arrow&&Re(r)!=null&&$!==F&&i.reference[p]/2-($<z?D:K)-h[p]/2<0,b=W?$<z?$-z:$-T:0;return{[d]:m[d]+b,data:{[d]:F,centerOffset:$-F-b,...W&&{alignmentOffset:b}},reset:W}}}),Qo=(e,t)=>({...Jo(e),options:[e,t]}),Zo={name:"hide",async fn(e){const{width:t,height:n,x:o,y:r}=e.rects.reference,i=t===0&&n===0&&o===0&&r===0,s=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:s.top-n>=0||s.right-t>=0||s.bottom-n>=0||s.left-t>=0||i}}}},er={sideX:"left",sideY:"top"},Jt="--available-width",Qt="--available-height";function Rn(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function Zt(e,t,n){const{rects:o,placement:r}=e;return{side:Rn(t,Q(r),n),align:Re(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function pr(e){return tr(e,Ko)}function tr(e,t){const{anchor:n,positionMethod:o="absolute",side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:a=5,sticky:u=!1,arrowPadding:f=5,disableAnchorTracking:g=!1,inline:m,keepMounted:d=!1,floatingRootContext:p,mounted:h,collisionAvoidance:x,shift:y,nodeId:E,adaptiveOrigin:R,lazyFlip:v=!1,externalTree:S}=e,[P,O]=w.useState(null);!h&&P!==null&&O(null);const k=x.side||"flip",L=x.align||"flip",D=x.fallbackAxisSide||"end",K=y?.crossAxis??!1,z=y?.rootBoundary,T=typeof n=="function"?n:void 0,$=ie(T),F=T?$:n,W=ue(n),b=ue(h),_=Un()==="rtl",N=P||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":_?"left":"right","inline-start":_?"right":"left"}[r],be=s==="center"?N:`${N}-${s}`;let B=a;typeof B=="number"?B={top:B,right:B,bottom:B,left:B}:B&&(B={top:B.top||0,right:B.right||0,bottom:B.bottom||0,left:B.left||0});const X=1,Ae=r==="bottom"?X:0,ke=r==="top"?X:0,ft=r==="right"?X:0,Ee=r==="left"?X:0,ee={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:B},ce=w.useRef(null),De=ue(i),Se=ue(c),Ie=typeof i!="function"?i:0,ze=typeof c!="function"?c:0,te=[];m&&te.push(m),te.push(Ho(I=>{const G=Zt(I,r,_),oe=typeof De.current=="function"?De.current(G):De.current,j=typeof Se.current=="function"?Se.current(G):Se.current;return{mainAxis:oe,crossAxis:j,alignmentAxis:j}},[Ie,ze,_,r]));const ve=L==="none"&&k!=="shift",Fe=!ve&&(u||K||k==="shift"),ge=k==="none"?null:zo({...ee,padding:{top:B.top+X+Ae,right:B.right+X+Ee,bottom:B.bottom+X+ke,left:B.left+X+ft},mainAxis:!K&&k==="flip",crossAxis:L==="flip"?"alignment":!1,fallbackAxisSideDirection:D}),Ce=ve?null:_o({...ee,rootBoundary:z,mainAxis:L!=="none",crossAxis:Fe,limiter:u||K?void 0:Bo(I=>{if(!ce.current)return{};const{width:G,height:oe}=ce.current.getBoundingClientRect(),j=J(Q(I.placement)),ae=j==="y"?G:oe,re=j==="y"?B.left+B.right:B.top+B.bottom;return{offset:ae/2+re/2}})},[ee,u,K,z,B,L]);k==="shift"||L==="shift"||s==="center"?te.push(Ce,ge):te.push(ge,Ce),te.push(No({...ee,apply({elements:{floating:I},availableWidth:G,availableHeight:oe,rects:j}){if(!b.current)return;const ae=I.style;ae.setProperty(Jt,`${G}px`),ae.setProperty(Qt,`${oe}px`);const re=se(I).devicePixelRatio||1,{x:He,y:Ye,width:Xe,height:ut}=j.reference,dt=(Math.round((He+Xe)*re)-Math.round(He*re))/re,mt=(Math.round((Ye+ut)*re)-Math.round(Ye*re))/re;ae.setProperty("--anchor-width",`${dt}px`),ae.setProperty("--anchor-height",`${mt}px`)}}),Qo(I=>({element:ce.current||et(I.elements.floating).createElement("div"),padding:f,offsetParent:"floating"}),[f]),{name:"transformOrigin",fn(I){const{elements:G,middlewareData:oe,placement:j,rects:ae,y:re}=I,He=Q(j),Ye=J(He),Xe=ce.current,ut=oe.arrow?.x||0,dt=oe.arrow?.y||0,mt=Xe?.clientWidth||0,bn=Xe?.clientHeight||0,gt=ut+mt/2,$t=dt+bn/2,vn=Math.abs(oe.shift?.y||0),On=ae.reference.height/2,_e=typeof i=="function"?i(Zt(I,r,_)):i,An=vn>_e,En={top:`${gt}px calc(100% + ${_e}px)`,bottom:`${gt}px ${-_e}px`,left:`calc(100% + ${_e}px) ${$t}px`,right:`${-_e}px ${$t}px`}[He],Sn=`${gt}px ${ae.reference.y+On-re}px`;return G.floating.style.setProperty("--transform-origin",Fe&&Ye==="y"&&An?Sn:En),{}}},Zo,R),q(()=>{!h&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,p]);const he=w.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:le,elements:ne,x:We,y:A,middlewareData:C,update:Y,placement:M,context:V,isPositioned:Z,floatingStyles:Ve}=t({rootContext:p,open:d?h:void 0,placement:be,middleware:te,strategy:o,whileElementsMounted:d?void 0:(...I)=>qt(...I,he),nodeId:E,externalTree:S}),{sideX:$e,sideY:Ne}=C.adaptiveOrigin||er,Pe=Z?o:"fixed",kt=w.useMemo(()=>{let I;return Z?R?I={position:Pe,[$e]:We,[Ne]:A}:I={...Ve,position:Pe}:I={position:Pe,top:0,left:0},I[Jt]="100vw",I[Qt]="100vh",Z||(I.opacity=0),I},[R,Pe,$e,We,Ne,A,Ve,Z]),Ke=w.useRef(null);q(()=>{if(!h)return;const I=W.current,G=typeof I=="function"?I():I,j=(en(G)?G.current:G)||null||null;j!==Ke.current&&(le.setPositionReference(j),Ke.current=j)},[h,le,F,W]),w.useEffect(()=>{if(!h)return;const I=W.current;typeof I!="function"&&en(I)&&I.current!==Ke.current&&(le.setPositionReference(I.current),Ke.current=I.current)},[h,le,F,W]),w.useEffect(()=>{if(d&&h&&ne.reference&&ne.floating)return qt(ne.reference,ne.floating,Y,he)},[d,h,ne,Y,he]);const Me=Q(M),Dt=Rn(r,Me,_),It=Re(M)||"center",Ft=!!C.hide?.referenceHidden;q(()=>{v&&h&&Z&&Me!==N&&O(Me)},[v,h,Z,Me,N]);const Wt=w.useMemo(()=>({position:"absolute",top:C.arrow?.y,left:C.arrow?.x}),[C.arrow]),Vt=C.arrow?.centerOffset!==0;return w.useMemo(()=>({positionerStyles:kt,arrowStyles:Wt,arrowRef:ce,arrowUncentered:Vt,side:Dt,align:It,physicalSide:Me,anchorHidden:Ft,refs:le,context:V,isPositioned:Z,update:Y}),[kt,Wt,ce,Vt,Dt,It,Me,Ft,le,V,Z,Y])}function en(e){return e!=null&&"current"in e}function nr(e){return e==="starting"?zn:tn}function xr(e,t,{styles:n,transitionStatus:o,props:r,refs:i,hidden:s,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),Ln("div",e,{state:t,ref:i,props:[{role:"presentation",hidden:s,style:l},nr(o),r],stateAttributesMapping:Nn})}const or=w.createContext(void 0);function yr(e){return w.useContext(or)}const rr=20;function wr(e,t,n,o){const[r,i]=w.useState(!1);q(()=>{if(!e||!t||n==null){i(!1);return}const s=et(n).documentElement.clientWidth,c=n.offsetWidth;i(s>0&&c>0&&c>=s-rr)},[e,t,n]),Kn(e&&(!t||r),o)}const Ge=5;function Rr(e,t){const n=ir(t);return e.clientX>=n.left-Ge&&e.clientX<=n.right+Ge&&e.clientY>=n.top-Ge&&e.clientY<=n.bottom+Ge}function ir(e){const t=e.getBoundingClientRect(),n=se(e);if(Yn)return t;const o=n.getComputedStyle(e,"::before"),r=n.getComputedStyle(e,"::after");if(!(o.content!=="none"||r.content!=="none"))return t;const s=parseFloat(o.width)||0,c=parseFloat(o.height)||0,l=parseFloat(r.width)||0,a=parseFloat(r.height)||0,u=Math.max(t.width,s,l),f=Math.max(t.height,c,a),g=u-t.width,m=f-t.height;return{left:t.left-g/2,right:t.right+g/2,top:t.top-m/2,bottom:t.bottom+m/2}}export{xr as a,yr as b,wr as c,hr as d,mr as e,gr as f,nr as g,dr as h,Rr as i,Po as p,ot as r,pr as u};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-DCtWnS4U.js";/**
1
+ import{c as e}from"./index-DBw3b5Rd.js";/**
2
2
  * @license lucide-react v1.39.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.