@llmops/app 0.1.8 → 0.1.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +285 -366
- package/dist/assets/Form-DHA5ZPmK.js +1 -0
- package/dist/assets/_environment-Bj632BW3.js +1 -0
- package/dist/assets/_observability-Bsw31e8i.js +1 -0
- package/dist/assets/_settings-MuCcKpRb.js +1 -0
- package/dist/assets/{_tabs-DaucGqpx.js → _tabs-DR5WY23M.js} +1 -1
- package/dist/assets/{_tabs-D9USU0yw.js → _tabs-Osf37WI9.js} +1 -1
- package/dist/assets/_variant-DGrwitKk.js +30 -0
- package/dist/assets/{_variants-Bjp8ZEvO.js → _variants-C7fc4T8_.js} +1 -1
- package/dist/assets/{area.css-CSjofvHM.js → area.css-ByjMFuMe.js} +1 -1
- package/dist/assets/auth-BkNQi67-.css +1 -0
- package/dist/assets/auth.css-CbKu-iME.js +1 -0
- package/dist/assets/button-J5fxAIyE.js +1 -0
- package/dist/assets/check-BdOT-uCr.js +1 -0
- package/dist/assets/{chevron-right-fMWRsRLZ.js → chevron-right-CcvZen9O.js} +1 -1
- package/dist/assets/combobox-BKEpKROu.js +1 -0
- package/dist/assets/configs-BEKTOPIS.js +1 -0
- package/dist/assets/{copy-DADLeZ69.js → copy-Btrg1ewH.js} +1 -1
- package/dist/assets/{costs-Fh0OPnEw.js → costs-C0sD1amq.js} +1 -1
- package/dist/assets/environments-CZ6PX9PA.js +1 -0
- package/dist/assets/index-C1Qc7Z7W.js +27 -0
- package/dist/assets/index-C8Gwa2Ui.js +1 -0
- package/dist/assets/{index-DeuSY0Yv.js → index-CAScpK2G.js} +1 -1
- package/dist/assets/{index-DW-cTzEh.js → index-CPQ3xdGh.js} +1 -1
- package/dist/assets/index-CPokRl9v.js +1 -0
- package/dist/assets/index-CQALuvff.js +1 -0
- package/dist/assets/{index-BFe2NM3q.css → index-CgbnU9Zg.css} +1 -1
- package/dist/assets/{index-Cns5MLjo.js → index-ChLdrp-m.js} +1 -1
- package/dist/assets/{index.esm-oCSEvUVx.js → index.esm-BVbruXk6.js} +1 -1
- package/dist/assets/info-box.css-BzqwxgQm.js +1 -0
- package/dist/assets/logo-D4ybjOzp.css +1 -0
- package/dist/assets/logo.css-BHDDnlVa.js +1 -0
- package/dist/assets/new-config-state-B8sMe-TC.css +1 -0
- package/dist/assets/new-config-state.css-DccH1TI0.js +1 -0
- package/dist/assets/{observability.css-wgjHtY3p.js → observability.css-D5kKsJ4z.js} +1 -1
- package/dist/assets/{overview-D1QIYPBL.js → overview-Czui5UTZ.js} +5 -5
- package/dist/assets/plus-DqiZvCBU.js +1 -0
- package/dist/assets/popover-BndR7yWD.js +1 -0
- package/dist/assets/requests-DrSJLtrE.js +1 -0
- package/dist/assets/{route-Df57lqxl.js → route-22shZRiS.js} +1 -1
- package/dist/assets/route-7Tn2yELm.js +1 -0
- package/dist/assets/{route-CjAw8hSU.js → route-CqIm0KnA.js} +1 -1
- package/dist/assets/{route-timDYxX2.js → route-D_QnUz7-.js} +1 -1
- package/dist/assets/{route-DmWZbVk6.js → route-DwYQMwtZ.js} +1 -1
- package/dist/assets/secrets-DnWQ2F0V.js +1 -0
- package/dist/assets/settings-c6c9IYPa.js +1 -0
- package/dist/assets/settings-sisslKb5.js +1 -0
- package/dist/assets/setup-G_oS-RU-.js +1 -0
- package/dist/assets/signin-B-qadLup.js +1 -0
- package/dist/assets/table-jMzD3FNy.js +1 -0
- package/dist/assets/{tabs.css-CG5ugi0p.js → tabs.css-CkcP1Ksc.js} +1 -1
- package/dist/assets/targeting-CaE84Lx8.js +1 -0
- package/dist/assets/tooltip-BiUUXiGj.js +1 -0
- package/dist/assets/{update-or-create-name-B-M46wHl.js → update-or-create-name-DGt2MGEI.js} +1 -1
- package/dist/assets/useAnalytics-CHDelHQa.js +1 -0
- package/dist/assets/useConfigList-Bx9xKceA.js +1 -0
- package/dist/assets/{useConfigVariants-CLc_hPw1.js → useConfigVariants-CB0S5gfJ.js} +1 -1
- package/dist/assets/useEnvironments-DILRhv_b.js +1 -0
- package/dist/assets/{useMutation-D4JglXWk.js → useMutation-CNzYa4ST.js} +1 -1
- package/dist/assets/usePopupAutoResize-CaO9EPHk.js +1 -0
- package/dist/assets/{useSetTargeting-bk0Ixhqq.js → useSetTargeting-DY3jI95T.js} +1 -1
- package/dist/assets/useTargetingRules-D10mXxut.js +1 -0
- package/dist/assets/useValueChanged-8LsiEynk.js +1 -0
- package/dist/assets/{user-profile-BB3dPOc5.js → user-profile-8xq1f7_D.js} +1 -1
- package/dist/assets/variants-rQQlpgeF.js +1 -0
- package/dist/assets/variants.css-Dzb38Nu1.js +1 -0
- package/dist/assets/{workspace-general-DYXfOF9H.js → workspace-general-dH65Sm8D.js} +1 -1
- package/dist/index.cjs +136 -59
- package/dist/index.d.cts +8 -5
- package/dist/index.d.mts +8 -5
- package/dist/index.mjs +138 -61
- package/package.json +4 -3
- package/dist/assets/Form-Bh6BPtQ_.js +0 -1
- package/dist/assets/InternalBackdrop-Za9lpJi7.js +0 -12
- package/dist/assets/_environment-COxSWJ9w.js +0 -1
- package/dist/assets/_observability-C8wSXZk2.js +0 -1
- package/dist/assets/_settings-DOmj1R7I.js +0 -1
- package/dist/assets/_variant-DxME2BL0.js +0 -30
- package/dist/assets/button-CMZqhyXB.js +0 -1
- package/dist/assets/check-D9E8RKB4.js +0 -1
- package/dist/assets/chevron-down-BJFxhYkh.js +0 -1
- package/dist/assets/combobox-iSbUYz0A.js +0 -1
- package/dist/assets/configs-BflhBVlY.js +0 -1
- package/dist/assets/environments-ChldQPyq.js +0 -1
- package/dist/assets/getDisabledMountTransitionStyles-TZFYxPIU.js +0 -1
- package/dist/assets/index-BDsrc1Q7.js +0 -1
- package/dist/assets/index-BWU02PnY.js +0 -1
- package/dist/assets/index-DYoud8po.js +0 -1
- package/dist/assets/index-FrTQ7TcS.js +0 -16
- package/dist/assets/info-box.css-DuVI9M9-.js +0 -1
- package/dist/assets/llmops-B3IIte87.css +0 -1
- package/dist/assets/llmops-CdOQq40D.js +0 -1
- package/dist/assets/plus-JQ0TORpd.js +0 -1
- package/dist/assets/popover-DXj4s-ni.js +0 -1
- package/dist/assets/popupStateMapping-DolkyTT3.js +0 -1
- package/dist/assets/requests-CzvYwfwV.js +0 -1
- package/dist/assets/reselect-DVmmTZGf.js +0 -1
- package/dist/assets/secrets-BxFGEuKj.js +0 -1
- package/dist/assets/settings-DpSRw7LL.js +0 -1
- package/dist/assets/settings-pgWZnVf6.js +0 -1
- package/dist/assets/table-DggTSlPh.js +0 -1
- package/dist/assets/targeting-CkqRTjnZ.js +0 -1
- package/dist/assets/tooltip-BuSsMQ8P.js +0 -1
- package/dist/assets/useAnalytics-DTf81POS.js +0 -1
- package/dist/assets/useButton-CsZ8hBM8.js +0 -1
- package/dist/assets/useConfigList-CAf01_dV.js +0 -1
- package/dist/assets/useEnvironments-Bu_0SIUj.js +0 -1
- package/dist/assets/useFocus-9TCY0h5x.js +0 -1
- package/dist/assets/usePopupAutoResize-D6RSlB-m.js +0 -1
- package/dist/assets/useRole-CiSaVva3.js +0 -1
- package/dist/assets/useSyncedFloatingRootContext-BKbVh8Gq.js +0 -1
- package/dist/assets/useTargetingRules-BrgaEdxR.js +0 -1
- package/dist/assets/useValueChanged-CTjBqaGs.js +0 -1
- package/dist/assets/variants-BH682hHM.js +0 -1
- package/dist/assets/variants.css-rCWHZycz.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as u,a as d,e as b,az as B,j as x}from"./index-FrTQ7TcS.js";import{d as R,c as E}from"./useButton-CsZ8hBM8.js";const h=u.forwardRef(function(e,t){const{render:l,className:c,disabled:s=!1,focusableWhenDisabled:o=!1,nativeButton:a=!0,...n}=e,r=!!s,{getButtonProps:f,buttonRef:m}=R({disabled:r,focusableWhenDisabled:o,native:a}),p=u.useMemo(()=>({disabled:r}),[r]);return E("button",e,{state:p,ref:[t,m],props:[n,f]})}),N=i=>{const e=d.c(16);let t,l,c,s,o,a;e[0]!==i?({variant:a,scheme:s,size:o,className:l,children:t,...c}=i,e[0]=i,e[1]=t,e[2]=l,e[3]=c,e[4]=s,e[5]=o,e[6]=a):(t=e[1],l=e[2],c=e[3],s=e[4],o=e[5],a=e[6]);let n;e[7]!==l||e[8]!==s||e[9]!==o||e[10]!==a?(n=b(B({variant:a,size:o,scheme:s}),l),e[7]=l,e[8]=s,e[9]=o,e[10]=a,e[11]=n):n=e[11];let r;return e[12]!==t||e[13]!==c||e[14]!==n?(r=x.jsx(h,{...c,className:n,children:t}),e[12]=t,e[13]=c,e[14]=n,e[15]=r):r=e[15],r};export{N as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as c}from"./index-FrTQ7TcS.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o}from"./index-FrTQ7TcS.js";const n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],c=o("chevron-down",n);export{c as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,j as P,x as ln,a as at,e as gt,a6 as zo,a7 as Uo,a8 as qo,a9 as Wo,aa as Go,ab as $o,ac as Qo,ad as Yo,ae as Jo,af as On,ag as Xo,ah as Zo,ai as er,aj as yn,ak as tr,al as kn,am as An,an as Tn,ao as Nn,ap as jn,aq as Dn,ar as Ln,as as Fn,at as Hn,au as nr,av as or,aw as rr,ax as sr,ay as ir}from"./index-FrTQ7TcS.js";import{a as ue,b as Lt,u as re,j as Cn,h as it,f as Ye,N as Ie,E as rn,n as lr,e as ar,d as Ft,c as De}from"./useButton-CsZ8hBM8.js";import{ak as an,al as de,am as Rt,an as $e,ao as Qe,ah as cr,a0 as nt,I as ur,S as dr,ap as fr,a1 as Rn,ac as pr,a as ze,c as Y,L as bt,g as yt,K as mr,aq as hr,ar as gr,u as _n,d as L,o as Bn,as as br,at as I,ai as cn,y as mt,au as Ge,a3 as ot,z as xr,n as He,s as Ht,k as Ir,l as yr,a7 as Cr,Z as Kn,Q as Rr,av as vn,h as vr,aw as wr,p as Er,v as un,ax as wn,F as Pr,D as Mr,r as zn,ay as En}from"./popupStateMapping-DolkyTT3.js";import{f as Pn,c as Sr,b as Vr,u as Or,g as kr}from"./getDisabledMountTransitionStyles-TZFYxPIU.js";import{e as Ar,u as Tr,b as Un,a as Nr,I as jr,i as Dr,F as Lr}from"./InternalBackdrop-Za9lpJi7.js";import{a as qn,u as At}from"./useValueChanged-CTjBqaGs.js";function tn({controlled:e,default:t,name:o,state:r="value"}){const{current:u}=s.useRef(e!==void 0),[i,d]=s.useState(t),a=u?e:i,l=s.useCallback(f=>{u||d(f)},[]);return[a,l]}const Wn=s.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Fr(){return s.useContext(Wn)}function Gn(e){const{children:t,elementsRef:o,labelsRef:r,onMapChange:u}=e,i=ue(u),d=s.useRef(0),a=Lt(_r).current,l=Lt(Hr).current,[f,m]=s.useState(0),c=s.useRef(f),R=ue((p,n)=>{l.set(p,n??null),c.current+=1,m(c.current)}),h=ue(p=>{l.delete(p),c.current+=1,m(c.current)}),V=s.useMemo(()=>{const p=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(Br).forEach((x,b)=>{const w=l.get(x)??{};p.set(x,{...w,index:b})}),p},[l,f]);re(()=>{if(typeof MutationObserver!="function"||V.size===0)return;const p=new MutationObserver(n=>{const x=new Set,b=w=>x.has(w)?x.delete(w):x.add(w);n.forEach(w=>{w.removedNodes.forEach(b),w.addedNodes.forEach(b)}),x.size===0&&(c.current+=1,m(c.current))});return V.forEach((n,x)=>{x.parentElement&&p.observe(x.parentElement,{childList:!0})}),()=>{p.disconnect()}},[V]),re(()=>{c.current===f&&(o.current.length!==V.size&&(o.current.length=V.size),r&&r.current.length!==V.size&&(r.current.length=V.size),d.current=V.size),i(V)},[i,V,o,r,f]),re(()=>()=>{o.current=[]},[o]),re(()=>()=>{r&&(r.current=[])},[r]);const g=ue(p=>(a.add(p),()=>{a.delete(p)}));re(()=>{a.forEach(p=>p(V))},[a,V]);const C=s.useMemo(()=>({register:R,unregister:h,subscribeMapChange:g,elementsRef:o,labelsRef:r,nextIndexRef:d}),[R,h,g,o,r,d]);return P.jsx(Wn.Provider,{value:C,children:t})}function Hr(){return new Map}function _r(){return new Set}function Br(e,t){const o=e.compareDocumentPosition(t);return o&Node.DOCUMENT_POSITION_FOLLOWING||o&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:o&Node.DOCUMENT_POSITION_PRECEDING||o&Node.DOCUMENT_POSITION_CONTAINS?1:0}let $n=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Qn(e={}){const{label:t,metadata:o,textRef:r,indexGuessBehavior:u,index:i}=e,{register:d,unregister:a,subscribeMapChange:l,elementsRef:f,labelsRef:m,nextIndexRef:c}=Fr(),R=s.useRef(-1),[h,V]=s.useState(i??(u===$n.GuessFromOrder?()=>{if(R.current===-1){const p=c.current;c.current+=1,R.current=p}return R.current}:-1)),g=s.useRef(null),C=s.useCallback(p=>{if(g.current=p,h!==-1&&p!==null&&(f.current[h]=p,m)){const n=t!==void 0;m.current[h]=n?t:r?.current?.textContent??p.textContent}},[h,f,m,t,r]);return re(()=>{if(i!=null)return;const p=g.current;if(p)return d(p,o),()=>{a(p)}},[i,d,a,o]),re(()=>{if(i==null)return l(p=>{const n=g.current?p.get(g.current)?.index:null;n!=null&&V(n)})},[i,l,V]),s.useMemo(()=>({ref:C,index:h}),[h,C])}function Tt(e,t,o){return Math.floor(e/t)!==o}function xt(e,t){return t<0||t>=e.current.length}function nn(e,t){return Pe(e,{disabledIndices:t})}function Mn(e,t){return Pe(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Pe(e,{startingIndex:t=-1,decrement:o=!1,disabledIndices:r,amount:u=1}={}){let i=t;do i+=o?-u:u;while(i>=0&&i<=e.current.length-1&&It(e,i,r));return i}function Kr(e,{event:t,orientation:o,loopFocus:r,rtl:u,cols:i,disabledIndices:d,minIndex:a,maxIndex:l,prevIndex:f,stopEvent:m=!1}){let c=f;const R=[],h={};let V=!1;{let p=null,n=-1;e.current.forEach((x,b)=>{if(x==null)return;const w=x.closest('[role="row"]');w&&(V=!0),(w!==p||n===-1)&&(p=w,n+=1,R[n]=[]),R[n].push(b),h[b]=n})}const g=V&&R.length>0&&R.some(p=>p.length!==i);function C(p){if(!g||f===-1)return;const n=h[f];if(n==null)return;const x=R[n].indexOf(f);let b=p==="up"?n-1:n+1;r&&(b<0?b=R.length-1:b>=R.length&&(b=0));const w=new Set;for(;b>=0&&b<R.length&&!w.has(b);){w.add(b);const E=R[b];if(E.length===0){b=p==="up"?b-1:b+1;continue}const v=Math.min(x,E.length-1);for(let O=v;O>=0;O-=1){const H=E[O];if(!It(e,H,d))return H}b=p==="up"?b-1:b+1,r&&(b<0?b=R.length-1:b>=R.length&&(b=0))}}if(t.key===an){const p=C("up");if(p!==void 0)m&&de(t),c=p;else{if(m&&de(t),f===-1)c=l;else if(c=Pe(e,{startingIndex:c,amount:i,decrement:!0,disabledIndices:d}),r&&(f-i<a||c<0)){const n=f%i,x=l%i,b=l-(x-n);x===n?c=l:c=x>n?b:b-i}xt(e,c)&&(c=f)}}if(t.key===Rt){const p=C("down");p!==void 0?(m&&de(t),c=p):(m&&de(t),f===-1?c=a:(c=Pe(e,{startingIndex:f,amount:i,disabledIndices:d}),r&&f+i>l&&(c=Pe(e,{startingIndex:f%i-i,amount:i,disabledIndices:d}))),xt(e,c)&&(c=f))}if(o==="both"){const p=Pn(f/i);t.key===(u?$e:Qe)&&(m&&de(t),f%i!==i-1?(c=Pe(e,{startingIndex:f,disabledIndices:d}),r&&Tt(c,i,p)&&(c=Pe(e,{startingIndex:f-f%i-1,disabledIndices:d}))):r&&(c=Pe(e,{startingIndex:f-f%i-1,disabledIndices:d})),Tt(c,i,p)&&(c=f)),t.key===(u?Qe:$e)&&(m&&de(t),f%i!==0?(c=Pe(e,{startingIndex:f,decrement:!0,disabledIndices:d}),r&&Tt(c,i,p)&&(c=Pe(e,{startingIndex:f+(i-f%i),decrement:!0,disabledIndices:d}))):r&&(c=Pe(e,{startingIndex:f+(i-f%i),decrement:!0,disabledIndices:d})),Tt(c,i,p)&&(c=f));const n=Pn(l/i)===p;xt(e,c)&&(r&&n?c=t.key===(u?Qe:$e)?l:Pe(e,{startingIndex:f-f%i-1,disabledIndices:d}):c=f)}return c}function zr(e,t,o){const r=[];let u=0;return e.forEach(({width:i,height:d},a)=>{let l=!1;for(o&&(u=0);!l;){const f=[];for(let m=0;m<i;m+=1)for(let c=0;c<d;c+=1)f.push(u+m+c*t);u%t+i<=t&&f.every(m=>r[m]==null)?(f.forEach(m=>{r[m]=a}),l=!0):u+=1}}),[...r]}function Ur(e,t,o,r,u){if(e===-1)return-1;const i=o.indexOf(e),d=t[e];switch(u){case"tl":return i;case"tr":return d?i+d.width-1:i;case"bl":return d?i+(d.height-1)*r:i;case"br":return o.lastIndexOf(e);default:return-1}}function qr(e,t){return t.flatMap((o,r)=>e.includes(o)?[r]:[])}function It(e,t,o){if(typeof o=="function")return o(t);if(o)return o.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}const Wr="Escape";function _t(e,t,o){switch(e){case"vertical":return t;case"horizontal":return o;default:return t||o}}function Nt(e,t){return _t(t,e===an||e===Rt,e===$e||e===Qe)}function on(e,t,o){return _t(t,e===Rt,o?e===$e:e===Qe)||e==="Enter"||e===" "||e===""}function Gr(e,t,o){return _t(t,o?e===$e:e===Qe,e===Rt)}function $r(e,t,o,r){const u=o?e===Qe:e===$e,i=e===an;return t==="both"||t==="horizontal"&&r&&r>1?e===Wr:_t(t,u,i)}function Qr(e,t){const o="rootStore"in e?e.rootStore:e,r=o.useState("open"),u=o.useState("floatingElement"),i=o.useState("domReferenceElement"),d=o.context.dataRef,{listRef:a,activeIndex:l,onNavigate:f=()=>{},enabled:m=!0,selectedIndex:c=null,allowEscape:R=!1,loopFocus:h=!1,nested:V=!1,rtl:g=!1,virtual:C=!1,focusItemOnOpen:p="auto",focusItemOnHover:n=!0,openOnArrowKeyDown:x=!0,disabledIndices:b=void 0,orientation:w="vertical",parentOrientation:E,cols:v=1,scrollItemIntoView:O=!0,itemSizes:H,dense:W=!1,id:_,resetOnPointerLeave:J=!0,externalTree:q}=t,U=cr(u),k=nt(U),G=ur(),le=dr(q);re(()=>{d.current.orientation=w},[d,w]);const ye=fr(i),ne=s.useRef(p),T=s.useRef(c??-1),$=s.useRef(null),me=s.useRef(!0),te=ue(A=>{f(T.current===-1?null:T.current,A)}),Z=s.useRef(te),N=s.useRef(!!u),fe=s.useRef(r),ae=s.useRef(!1),ce=s.useRef(!1),he=nt(b),S=nt(r),B=nt(O),Q=nt(c),Re=nt(J),ve=ue(()=>{function A(ie){C?le?.events.emit("virtualfocus",ie):Ar(ie,{sync:ae.current,preventScroll:!0})}const X=a.current[T.current],j=ce.current;X&&A(X),(ae.current?ie=>ie():requestAnimationFrame)(()=>{const ie=a.current[T.current]||X;if(!ie)return;X||A(ie);const oe=B.current;oe&&Me&&(j||!me.current)&&ie.scrollIntoView?.(typeof oe=="boolean"?{block:"nearest",inline:"nearest"}:oe)})});re(()=>{m&&(r&&u?(T.current=c??-1,ne.current&&c!=null&&(ce.current=!0,te())):N.current&&(T.current=-1,Z.current()))},[m,r,u,c,te]),re(()=>{if(m){if(!r){ae.current=!1;return}if(u)if(l==null){if(ae.current=!1,Q.current!=null)return;if(N.current&&(T.current=-1,ve()),(!fe.current||!N.current)&&ne.current&&($.current!=null||ne.current===!0&&$.current==null)){let A=0;const X=()=>{a.current[0]==null?(A<2&&(A?requestAnimationFrame:queueMicrotask)(X),A+=1):(T.current=$.current==null||on($.current,w,g)||V?nn(a):Mn(a),$.current=null,te())};X()}}else xt(a,l)||(T.current=l,ve(),ce.current=!1)}},[m,r,u,l,Q,V,a,w,g,te,ve,he]),re(()=>{if(!m||u||!le||C||!N.current)return;const A=le.nodesRef.current,X=A.find(ie=>ie.id===G)?.context?.elements.floating,j=Rn(pr(u)),se=A.some(ie=>ie.context&&ze(ie.context.elements.floating,j));X&&!se&&me.current&&X.focus({preventScroll:!0})},[m,u,le,G,C]),re(()=>{Z.current=te,fe.current=r,N.current=!!u}),re(()=>{r||($.current=null,ne.current=p)},[r,p]);const ee=l!=null,Me=s.useMemo(()=>{function A(j){if(!S.current)return;const se=a.current.indexOf(j.currentTarget);se!==-1&&T.current!==se&&(T.current=se,te(j))}return{onFocus(j){ae.current=!0,A(j)},onClick:({currentTarget:j})=>j.focus({preventScroll:!0}),onMouseMove(j){ae.current=!0,ce.current=!1,n&&A(j)},onPointerLeave(j){if(!S.current||!me.current||j.pointerType==="touch")return;ae.current=!0;const se=j.relatedTarget;!n||a.current.includes(se)||Re.current&&(T.current=-1,te(j),C||k.current?.focus({preventScroll:!0}))}}},[S,k,n,a,te,Re,C]),ke=s.useCallback(()=>E??le?.nodesRef.current.find(A=>A.id===G)?.context?.dataRef?.current.orientation,[G,le,E]),Ue=ue(A=>{if(me.current=!1,ae.current=!0,A.which===229||!S.current&&A.currentTarget===k.current)return;if(V&&$r(A.key,w,g,v)){Nt(A.key,ke())||de(A),o.setOpen(!1,Y(bt,A.nativeEvent)),Cn(i)&&(C?le?.events.emit("virtualfocus",i):i.focus());return}const X=T.current,j=nn(a,b),se=Mn(a,b);if(ye||(A.key==="Home"&&(de(A),T.current=j,te(A)),A.key==="End"&&(de(A),T.current=se,te(A))),v>1){const ie=H||Array.from({length:a.current.length},()=>({width:1,height:1})),oe=zr(ie,v,W),we=oe.findIndex(Ae=>Ae!=null&&!It(a,Ae,b)),_e=oe.reduce((Ae,ge,F)=>ge!=null&&!It(a,ge,b)?F:Ae,-1),Le=oe[Kr({current:oe.map(Ae=>Ae!=null?a.current[Ae]:null)},{event:A,orientation:w,loopFocus:h,rtl:g,cols:v,disabledIndices:qr([...(typeof b!="function"?b:null)||a.current.map((Ae,ge)=>It(a,ge,b)?ge:void 0),void 0],oe),minIndex:we,maxIndex:_e,prevIndex:Ur(T.current>se?j:T.current,ie,oe,v,A.key===Rt?"bl":A.key===(g?$e:Qe)?"tr":"tl"),stopEvent:!0})];if(Le!=null&&(T.current=Le,te(A)),w==="both")return}if(Nt(A.key,w)){if(de(A),r&&!C&&Rn(A.currentTarget.ownerDocument)===A.currentTarget){T.current=on(A.key,w,g)?j:se,te(A);return}on(A.key,w,g)?h?X>=se?R&&X!==a.current.length?T.current=-1:(ae.current=!1,T.current=j):T.current=Pe(a,{startingIndex:X,disabledIndices:b}):T.current=Math.min(se,Pe(a,{startingIndex:X,disabledIndices:b})):h?X<=j?R&&X!==-1?T.current=a.current.length:(ae.current=!1,T.current=se):T.current=Pe(a,{startingIndex:X,decrement:!0,disabledIndices:b}):T.current=Math.max(j,Pe(a,{startingIndex:X,decrement:!0,disabledIndices:b})),xt(a,T.current)&&(T.current=-1),te(A)}}),Je=s.useMemo(()=>C&&r&&ee&&{"aria-activedescendant":`${_}-${l}`},[C,r,ee,_,l]),ct=s.useMemo(()=>({"aria-orientation":w==="both"?void 0:w,...ye?{}:Je,onKeyDown(A){if(A.key==="Tab"&&A.shiftKey&&r&&!C){const X=yt(A.nativeEvent);if(X&&!ze(k.current,X))return;de(A),o.setOpen(!1,Y(mr,A.nativeEvent)),Cn(i)&&i.focus();return}Ue(A)},onPointerMove(){me.current=!0}}),[Je,Ue,k,w,ye,o,r,C,i]),qe=s.useMemo(()=>{function A(j){p==="auto"&&hr(j.nativeEvent)&&(ne.current=!C)}function X(j){ne.current=p,p==="auto"&&gr(j.nativeEvent)&&(ne.current=!0)}return{onKeyDown(j){const se=o.select("open");me.current=!1;const ie=j.key.startsWith("Arrow"),oe=Gr(j.key,ke(),g),we=Nt(j.key,w),_e=(V?oe:we)||j.key==="Enter"||j.key.trim()==="";if(C&&se)return Ue(j);if(!(!se&&!x&&ie)){if(_e){const Le=Nt(j.key,ke());$.current=V&&Le?null:j.key}if(V){oe&&(de(j),se?(T.current=nn(a,he.current),te(j)):o.setOpen(!0,Y(bt,j.nativeEvent,j.currentTarget)));return}we&&(Q.current!=null&&(T.current=Q.current),de(j),!se&&x?o.setOpen(!0,Y(bt,j.nativeEvent,j.currentTarget)):Ue(j),se&&te(j))}},onFocus(j){o.select("open")&&!C&&(T.current=-1,te(j))},onPointerDown:X,onPointerEnter:X,onMouseDown:A,onClick:A}},[Ue,he,p,a,V,te,o,x,w,ke,g,Q,C]),Ve=s.useMemo(()=>({...Je,...qe}),[Je,qe]);return s.useMemo(()=>m?{reference:Ve,floating:ct,item:Me,trigger:qe}:{},[m,Ve,ct,qe,Me])}function Yr(e,t){const o="rootStore"in e?e.rootStore:e,r=o.useState("open"),u=o.context.dataRef,{listRef:i,activeIndex:d,onMatch:a,onTypingChange:l,enabled:f=!0,findMatch:m=null,resetMs:c=750,ignoreKeys:R=it,selectedIndex:h=null}=t,V=_n(),g=s.useRef(""),C=s.useRef(h??d??-1),p=s.useRef(null);re(()=>{r&&(V.clear(),p.current=null,g.current="")},[r,V]),re(()=>{r&&g.current===""&&(C.current=h??d??-1)},[r,h,d]);const n=ue(E=>{E?u.current.typing||(u.current.typing=E,l?.(E)):u.current.typing&&(u.current.typing=E,l?.(E))}),x=ue(E=>{function v(J,q,U){const k=m?m(q,U):q.find(G=>G?.toLocaleLowerCase().indexOf(U.toLocaleLowerCase())===0);return k?J.indexOf(k):-1}const O=i.current;if(g.current.length>0&&g.current[0]!==" "&&(v(O,O,g.current)===-1?n(!1):E.key===" "&&de(E)),O==null||R.includes(E.key)||E.key.length!==1||E.ctrlKey||E.metaKey||E.altKey)return;r&&E.key!==" "&&(de(E),n(!0)),O.every(J=>J?J[0]?.toLocaleLowerCase()!==J[1]?.toLocaleLowerCase():!0)&&g.current===E.key&&(g.current="",C.current=p.current),g.current+=E.key,V.start(c,()=>{g.current="",C.current=p.current,n(!1)});const W=C.current,_=v(O,[...O.slice((W||0)+1),...O.slice(0,(W||0)+1)],g.current);_!==-1?(a?.(_),p.current=_):E.key!==" "&&(g.current="",n(!1))}),b=s.useMemo(()=>({onKeyDown:x}),[x]),w=s.useMemo(()=>({onKeyDown:x,onKeyUp(E){E.key===" "&&n(!1)}}),[x,n]);return s.useMemo(()=>f?{reference:b,floating:w}:{},[f,b,w])}function Jr(e){const t=s.useRef(!0);t.current&&(t.current=!1,e())}const Yn=s.createContext(void 0),Jn=s.createContext(void 0),Xn=s.createContext(void 0),Zn=s.createContext("");function Oe(){const e=s.useContext(Yn);if(!e)throw new Error(Ye(22));return e}function Bt(){const e=s.useContext(Jn);if(!e)throw new Error(Ye(23));return e}function rt(){const e=s.useContext(Xn);if(!e)throw new Error(Ye(24));return e}function dn(){return s.useContext(Zn)}const Xr=(e,t)=>Object.is(e,t);function lt(e,t,o){return e==null||t==null?Object.is(e,t):o(e,t)}function jt(e,t,o){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:lt(r,t,o))}function Ct(e,t,o){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:lt(r,t,o))}function Zr(e,t,o){return e.filter(r=>!lt(r,t,o))}const y={id:L(e=>e.id),query:L(e=>e.query),items:L(e=>e.items),selectedValue:L(e=>e.selectedValue),open:L(e=>e.open),mounted:L(e=>e.mounted),forceMounted:L(e=>e.forceMounted),inline:L(e=>e.inline),activeIndex:L(e=>e.activeIndex),selectedIndex:L(e=>e.selectedIndex),isActive:L((e,t)=>e.activeIndex===t),isSelected:L((e,t)=>{const o=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(u=>lt(u,t,o)):lt(r,t,o)}),transitionStatus:L(e=>e.transitionStatus),popupProps:L(e=>e.popupProps),inputProps:L(e=>e.inputProps),triggerProps:L(e=>e.triggerProps),getItemProps:L(e=>e.getItemProps),positionerElement:L(e=>e.positionerElement),listElement:L(e=>e.listElement),triggerElement:L(e=>e.triggerElement),inputElement:L(e=>e.inputElement),popupSide:L(e=>e.popupSide),openMethod:L(e=>e.openMethod),inputInsidePopup:L(e=>e.inputInsidePopup),selectionMode:L(e=>e.selectionMode),listRef:L(e=>e.listRef),labelsRef:L(e=>e.labelsRef),popupRef:L(e=>e.popupRef),emptyRef:L(e=>e.emptyRef),inputRef:L(e=>e.inputRef),keyboardActiveRef:L(e=>e.keyboardActiveRef),chipsContainerRef:L(e=>e.chipsContainerRef),clearRef:L(e=>e.clearRef),valuesRef:L(e=>e.valuesRef),allValuesRef:L(e=>e.allValuesRef),name:L(e=>e.name),disabled:L(e=>e.disabled),readOnly:L(e=>e.readOnly),required:L(e=>e.required),grid:L(e=>e.grid),isGrouped:L(e=>e.isGrouped),virtualized:L(e=>e.virtualized),onOpenChangeComplete:L(e=>e.onOpenChangeComplete),openOnInputClick:L(e=>e.openOnInputClick),itemToStringLabel:L(e=>e.itemToStringLabel),isItemEqualToValue:L(e=>e.isItemEqualToValue),modal:L(e=>e.modal),autoHighlight:L(e=>e.autoHighlight),submitOnItemClick:L(e=>e.submitOnItemClick)};let Sn=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const es={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},eo={valid(e){return e===null?null:e?{[Sn.valid]:""}:{[Sn.invalid]:""}}},ts=s.createContext({invalid:void 0,name:void 0,validityData:{state:es,errors:[],error:"",value:"",initialValue:null},setValidityData:Ie,disabled:void 0,touched:!1,setTouched:Ie,dirty:!1,setDirty:Ie,filled:!1,setFilled:Ie,focused:!1,setFocused:Ie,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=rn)=>e,getInputValidationProps:(e=rn)=>e,inputRef:{current:null},commit:async()=>{}}});function vt(e=!0){const t=s.useContext(ts);if(t.setValidityData===Ie&&!e)throw new Error(Ye(28));return t}function ns(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function os(e){const{enabled:t=!0,value:o,id:r,name:u,controlRef:i,commit:d}=e,{formRef:a}=qn(),{invalid:l,markedDirtyRef:f,validityData:m,setValidityData:c}=vt(),R=ue(e.getValue);re(()=>{if(!t)return;let h=o;h===void 0&&(h=R()),m.initialValue===null&&h!==null&&c(V=>({...V,initialValue:h}))},[t,c,o,m.initialValue,R]),re(()=>{!t||!r||a.current.fields.set(r,{getValue:R,name:u,controlRef:i,validityData:ns(m,l),validate(){let h=o;h===void 0&&(h=R()),f.current=!0,ln.flushSync(()=>d(h))}})},[d,i,t,a,R,r,l,f,u,m,o]),re(()=>{const h=a.current.fields;return()=>{r&&h.delete(r)}},[a,r])}const rs=s.createContext({controlId:void 0,setControlId:Ie,labelId:void 0,setLabelId:Ie,messageIds:[],setMessageIds:Ie,getDescriptionProps:e=>e});function fn(){return s.useContext(rs)}function ss(e={}){const{id:t,implicit:o=!1,controlRef:r}=e,{controlId:u,setControlId:i}=fn(),d=Bn(t);return re(()=>{if(!(!o&&!t||i===Ie)){if(o){const a=r?.current;lr(a)&&a.closest("label")!=null?i(t??null):i(u??d)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,u,i,o,d]),u??d}function sn(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function to(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Ce(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 sn(e)}function ht(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?sn(e.value):sn(e)}function is(e,t,o){if(o&&e!=null)return o(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??Ce(e,o);if(Array.isArray(t)){const r=to(t)?t.flatMap(u=>u.items):t;if(e==null){const u=r.find(i=>i.value==null);return u&&u.label!=null?u.label:Ce(e,o)}if(typeof e!="object"){const u=r.find(i=>i&&i.value===e);return u&&u.label!=null?u.label:Ce(e,o)}if("value"in e){const u=r.find(i=>i&&i.value===e.value);if(u&&u.label!=null)return u.label}}return Ce(e,o)}function ls(e,t){return(o,r)=>{if(o==null)return!1;const u=Ce(o,t);return e.contains(u,r)}}function as(e,t,o){return(r,u)=>{if(r==null)return!1;if(!u)return!0;const i=Ce(r,t),d=o!=null?Ce(o,t):"";return d&&e.contains(d,u)&&d.length===u.length?!0:e.contains(i,u)}}const Vn=new Map;function no(e){return Array.isArray(e)?e.map(t=>no(t)).join(","):e==null?"":String(e)}function cs(e={}){const t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},o=`${no(e.locale)}|${JSON.stringify(t)}`,r=Vn.get(o);if(r)return r;const u=new Intl.Collator(e.locale,t),i={contains(d,a,l){if(!a)return!0;const f=Ce(d,l);for(let m=0;m<=f.length-a.length;m+=1)if(u.compare(f.slice(m,m+a.length),a)===0)return!0;return!1},startsWith(d,a,l){if(!a)return!0;const f=Ce(d,l);return u.compare(f.slice(0,a.length),a)===0},endsWith(d,a,l){if(!a)return!0;const f=Ce(d,l),m=a.length;return f.length>=m&&u.compare(f.slice(f.length-m),a)===0}};return Vn.set(o,i),i}const us=cs,oo=Symbol("none"),tt={value:oo,index:-1};function ds(e){const{id:t,onOpenChangeComplete:o,defaultSelectedValue:r=null,selectedValue:u,onSelectedValueChange:i,defaultInputValue:d,inputValue:a,selectionMode:l="none",onItemHighlighted:f,name:m,disabled:c=!1,readOnly:R=!1,required:h=!1,inputRef:V,grid:g=!1,items:C,filteredItems:p,filter:n,openOnInputClick:x=!0,autoHighlight:b=!1,keepHighlight:w=!1,highlightItemOnHover:E=!0,itemToStringLabel:v,itemToStringValue:O,isItemEqualToValue:H=Xr,virtualized:W=!1,inline:_=!1,fillInputOnItemPress:J=!0,modal:q=!1,limit:U=-1,autoComplete:k="list",locale:G,submitOnItemClick:le=!1}=e,{clearErrors:ye}=qn(),{setDirty:ne,validityData:T,shouldValidateOnChange:$,setFilled:me,name:te,disabled:Z,validation:N}=vt(),fe=ss({id:t}),ae=us({locale:G}),[ce,he]=s.useState(!1),[S,B]=s.useState(null),Q=s.useRef([]),Re=s.useRef([]),ve=s.useRef(null),ee=s.useRef(null),Me=s.useRef(null),ke=s.useRef(!0),Ue=s.useRef(!1),Je=s.useRef(null),ct=s.useRef(null),qe=s.useRef(null),Ve=s.useRef(tt),A=s.useRef(null),X=s.useRef([]),j=s.useRef([]),se=Z||c,ie=te??m,oe=l==="multiple",we=l==="single",_e=a!==void 0||d!==void 0,Le=C!==void 0,Ae=p!==void 0;let ge;b==="always"?ge="always":ge=b?"input-change":!1;const[F,wt]=tn({controlled:u,default:oe?r??it:r,name:"Combobox",state:"selectedValue"}),Et=s.useMemo(()=>n===null?()=>!0:n!==void 0?n:we&&!ce?as(ae,v,F):ls(ae,v),[n,we,F,ce,ae,v]),mn=Lt(()=>_e?d??"":we?Ce(F,v):"").current,[Te,Ro]=tn({controlled:a,default:mn,name:"Combobox",state:"inputValue"}),[xe,vo]=tn({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}),Be=to(C),Se=S??(Te===""?"":String(Te).trim()),Kt=we?Ce(F,v):"",hn=we&&!ce&&Se!==""&&Kt!==""&&Kt.length===Se.length&&ae.contains(Kt,Se),ut=hn?"":Se,gn=Le&&Ae&&hn,We=s.useMemo(()=>C?Be?C.flatMap(M=>M.items):C:it,[C,Be]),dt=s.useMemo(()=>{if(p&&!gn)return p;if(!C)return it;if(Be){const D=C,K=[];let pe=0;for(const be of D){if(U>-1&&pe>=U)break;const Ee=ut===""?be.items:be.items.filter(kt=>Et(kt,ut,v));if(Ee.length===0)continue;const Ze=U>-1?U-pe:1/0,et=Ee.slice(0,Ze);if(et.length>0){const kt={...be,items:et};K.push(kt),pe+=et.length}}return K}if(ut==="")return U>-1?We.slice(0,U):We;const M=[];for(const D of We){if(U>-1&&M.length>=U)break;Et(D,ut,v)&&M.push(D)}return M},[p,gn,C,Be,ut,U,Et,v,We]),Fe=s.useMemo(()=>Be?dt.flatMap(D=>D.items):dt,[dt,Be]),z=Lt(()=>new br({id:fe,selectedValue:F,open:xe,filter:Et,query:Se,items:C,selectionMode:l,listRef:Q,labelsRef:Re,popupRef:ve,emptyRef:Me,inputRef:ee,keyboardActiveRef:ke,chipsContainerRef:Je,clearRef:ct,valuesRef:X,allValuesRef:j,selectionEventRef:qe,name:ie,disabled:se,readOnly:R,required:h,grid:g,isGrouped:Be,virtualized:W,openOnInputClick:x,itemToStringLabel:v,isItemEqualToValue:H,modal:q,autoHighlight:ge,submitOnItemClick:le,hasInputValue:_e,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:_,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:o||Ie,setOpen:Ie,setInputValue:Ie,setSelectedValue:Ie,setIndices:Ie,onItemHighlighted:Ie,handleSelection:Ie,getItemProps:()=>rn,forceMount:Ie,requestSubmit:Ie})).current,st=l==="none"?Te:F,wo=s.useMemo(()=>l==="none"?st:Array.isArray(F)?F.map(M=>ht(M,O)):ht(F,O),[st,O,l,F]),zt=ue(f),Ut=ue(o),Pt=I(z,y.activeIndex),Eo=I(z,y.selectedIndex),Mt=I(z,y.positionerElement),bn=I(z,y.listElement),ft=I(z,y.triggerElement),qt=I(z,y.inputElement),Ke=I(z,y.inline),Xe=I(z,y.inputInsidePopup),Po=nt(ft),{mounted:xn,setMounted:Mo,transitionStatus:Wt}=cn(xe),{openMethod:In,triggerProps:Gt,reset:So}=Tr(xe);os({id:fe,name:ie,commit:N.commit,value:st,controlRef:Xe?Po:ee,getValue:()=>wo});const St=ue(()=>{C?Re.current=Fe.map(M=>Ce(M,v)):z.set("forceMounted",!0)}),Vo=s.useRef(F);re(()=>{F!==Vo.current&&St()},[St,F]);const Ne=ue(M=>{z.update(M);const D=M.type||"none";if(M.activeIndex!==void 0)if(M.activeIndex===null)Ve.current!==tt&&(Ve.current=tt,zt(void 0,mt(D,void 0,{index:-1})));else{const K=X.current[M.activeIndex];Ve.current={value:K,index:M.activeIndex},zt(K,mt(D,void 0,{index:M.activeIndex}))}}),je=ue((M,D)=>{if(Ue.current=D.reason===Ge,e.onInputValueChange?.(M,D),!D.isCanceled){if(D.reason===ot){const K=M.trim()!=="";K&&he(!0),A.current={hasQuery:K},K&&ge&&z.state.activeIndex==null&&z.set("activeIndex",0)}Ro(M)}}),pt=ue((M,D)=>{xe!==M&&(D.reason==="escape-key"&&Le&&Fe.length===0&&!z.state.emptyRef.current&&D.allowPropagation(),e.onOpenChange?.(M,D),!D.isCanceled&&(!M&&ce&&(we?(B(Se),Se===""&&he(!1)):oe&&(Ke||Xe?Ne({activeIndex:null}):B(Se),je("",Y(Ge,D.event)))),vo(M)))}),Vt=ue((M,D)=>{if(i?.(M,D),D.isCanceled)return;wt(M),(l==="none"&&ve.current&&J||we&&!z.state.inputInsidePopup)&&je(Ce(M,v),Y(D.reason,D.event)),we&&M!=null&&D.reason!==ot&&ce&&B(Se)}),Oo=ue((M,D)=>{let K=D;if(K===void 0){if(Pt===null)return;K=X.current[Pt]}const pe=yt(M),be=qe.current??M;qe.current=null;const Ee=Y(xr,be),Ze=pe?.closest("a")?.getAttribute("href");if(Ze){Ze.startsWith("#")&&pt(!1,Ee);return}if(oe){const et=Array.isArray(F)?F:[],Ko=jt(et,K,z.state.isItemEqualToValue)?Zr(et,K,z.state.isItemEqualToValue):[...et,K];if(Vt(Ko,Ee),!(ee.current?ee.current.value.trim()!=="":!1))return;z.state.inputInsidePopup?je("",Y(Ge,Ee.event)):pt(!1,Ee)}else Vt(K,Ee),pt(!1,Ee)}),$t=ue(()=>{if(!z.state.submitOnItemClick)return;const M=z.state.inputElement?.form;M&&typeof M.requestSubmit=="function"&&M.requestSubmit()}),Qt=ue(()=>{if(Mo(!1),Ut?.(!1),he(!1),So(),B(null),Ne(l==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),oe&&ee.current&&ee.current.value!==""&&!Ue.current&&je("",Y(Ge)),we)if(z.state.inputInsidePopup)ee.current&&ee.current.value!==""&&je("",Y(Ge));else{const M=Ce(F,v);ee.current&&ee.current.value!==M&&je(M,Y(M===""?Ge:He))}}),ko=s.useMemo(()=>Ke&&Mt?{current:Mt.closest('[role="dialog"]')}:ve,[Ke,Mt]);Ht({enabled:!e.actionsRef,open:xe,ref:ko,onComplete(){xe||Qt()}}),s.useImperativeHandle(e.actionsRef,()=>({unmount:Qt}),[Qt]),re(function(){if(xe||l==="none")return;const D=C?We:j.current;if(oe){const K=Array.isArray(F)?F:[],pe=K[K.length-1],be=Ct(D,pe,H);Ne({selectedIndex:be===-1?null:be})}else{const K=Ct(D,F,H);Ne({selectedIndex:K===-1?null:K})}},[xe,F,C,l,We,oe,H,Ne]),re(()=>{C&&(X.current=Fe,Q.current.length=Fe.length)},[C,Fe]),re(()=>{const M=A.current;if(M&&(M.hasQuery?ge&&z.set("activeIndex",0):ge==="always"&&z.set("activeIndex",0),A.current=null),!xe&&!Ke)return;const K=Le||Ae?Fe:X.current,pe=z.state.activeIndex;if(pe==null){if(ge==="always"&&K.length>0){z.set("activeIndex",0);return}Ve.current!==tt&&(Ve.current=tt,z.state.onItemHighlighted(void 0,mt(He,void 0,{index:-1})));return}if(pe>=K.length){Ve.current!==tt&&(Ve.current=tt,z.state.onItemHighlighted(void 0,mt(He,void 0,{index:-1}))),z.set("activeIndex",null);return}const be=K[pe],Ee=Ve.current.value,Ze=Ee!==oo&&z.state.isItemEqualToValue(be,Ee);(Ve.current.index!==pe||!Ze)&&(Ve.current={value:be,index:pe},z.state.onItemHighlighted(be,mt(He,void 0,{index:pe})))},[Pt,ge,Ae,Le,Fe,Ke,xe,z]),re(()=>{if(!C||l==="none")return;const M=We;if(oe){const pe=Array.isArray(F)?F:it,be=pe.filter(Ee=>jt(M,Ee,z.state.isItemEqualToValue));be.length!==pe.length&&wt(be);return}if(F==null?!0:jt(M,F,z.state.isItemEqualToValue))return;let K=null;if(r!=null&&jt(M,r,z.state.isItemEqualToValue)&&(K=r),wt(K),!z.state.inputInsidePopup){const pe=Ce(K,v);ee.current&&ee.current.value!==pe&&je(pe,Y(He))}},[C,We,oe,l,F,r,wt,v,z,je]),re(()=>{if(l==="none"){me(String(Te)!=="");return}me(oe?Array.isArray(F)&&F.length>0:F!=null)},[me,l,Te,F,oe]),s.useEffect(()=>{Le&&ge&&Fe.length===0&&Ne({activeIndex:null})},[Le,ge,Fe.length,Ne]),At(Se,()=>{!xe||Se===""||Se===String(mn)||he(!0)}),At(F,()=>{if(l!=="none"&&(ye(ie),ne(F!==T.initialValue),$()?N.commit(F):N.commit(F,!0),oe&&z.state.selectedIndex!==null&&(!Array.isArray(F)||F.length===0)&&Ne({activeIndex:null,selectedIndex:null}),we&&!_e&&!Xe)){const M=Ce(F,v);Te!==M&&je(M,Y(He))}}),At(Te,()=>{l==="none"&&(ye(ie),ne(Te!==T.initialValue),$()?N.commit(Te):N.commit(Te,!0))}),At(C,()=>{if(!we||_e||Xe||ce)return;const M=Ce(F,v);Te!==M&&je(M,Y(He))});const Ot=Sr({open:Ke?!0:xe,onOpenChange:pt,elements:{reference:Xe?ft:qt,floating:Mt}});let Yt,Jt;Ke||(Yt=g?"grid":"listbox",Jt=xe?"true":"false");const Ao=s.useMemo(()=>{const M=qt?.tagName==="INPUT",D=M||xe,K=M?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return D&&(K.role="combobox",K["aria-expanded"]=Jt,K["aria-haspopup"]=Yt,K["aria-controls"]=xe?bn?.id:void 0,K["aria-autocomplete"]=k),{reference:K,floating:{role:"presentation"}}},[qt,xe,Jt,Yt,bn?.id,k]),To=Un(Ot,{enabled:!R&&!se&&x,event:"mousedown-only",toggle:!1,touchOpenDelay:Xe?0:50}),No=Ir(Ot,{enabled:!R&&!se&&!Ke,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:Ke?!0:void 0,outsidePress(M){const D=yt(M);return!ze(ft,D)&&!ze(ct.current,D)&&!ze(Je.current,D)}}),jo=Qr(Ot,{enabled:!R&&!se,id:fe,listRef:Q,activeIndex:Pt,selectedIndex:Eo,virtual:!0,loopFocus:!0,allowEscape:!ge,focusItemOnOpen:ce||l==="none"&&!ge?!1:"auto",focusItemOnHover:E,resetOnPointerLeave:!w,cols:g?2:1,orientation:g?"horizontal":void 0,disabledIndices:it,onNavigate(M,D){!D&&!xe||Wt==="ending"||Ne(D?{activeIndex:M,type:ke.current?"keyboard":"pointer"}:{activeIndex:M})}}),{getReferenceProps:Xt,getFloatingProps:Zt,getItemProps:en}=yr([Ao,To,No,jo]);Jr(()=>{z.update({inline:_,popupProps:Zt(),inputProps:Xt(),triggerProps:Gt,getItemProps:en,setOpen:pt,setInputValue:je,setSelectedValue:Vt,setIndices:Ne,onItemHighlighted:zt,handleSelection:Oo,forceMount:St,requestSubmit:$t})}),re(()=>{z.update({id:fe,selectedValue:F,open:xe,mounted:xn,transitionStatus:Wt,items:C,inline:_,popupProps:Zt(),inputProps:Xt(),triggerProps:Gt,openMethod:In,getItemProps:en,selectionMode:l,name:ie,disabled:se,readOnly:R,required:h,grid:g,isGrouped:Be,virtualized:W,onOpenChangeComplete:Ut,openOnInputClick:x,itemToStringLabel:v,modal:q,autoHighlight:ge,isItemEqualToValue:H,submitOnItemClick:le,hasInputValue:_e,requestSubmit:$t})},[z,fe,F,xe,xn,Wt,C,Zt,Xt,en,In,Gt,l,ie,se,R,h,N,g,Be,W,Ut,x,v,q,H,le,_e,_,$t,ge]);const Do=ar(V,N.inputRef),Lo=s.useMemo(()=>({query:Se,filteredItems:dt,flatFilteredItems:Fe}),[Se,dt,Fe]),Fo=s.useMemo(()=>Array.isArray(st)?"":ht(st,O),[st,O]),Ho=oe&&Array.isArray(F)&&F.length>0,_o=s.useMemo(()=>!oe||!Array.isArray(F)||!ie?null:F.map(M=>{const D=ht(M,O);return P.jsx("input",{type:"hidden",name:ie,value:D},D)}),[oe,F,ie,O]),Bo=P.jsxs(s.Fragment,{children:[e.children,P.jsx("input",{...N.getInputValidationProps({onFocus(){if(Xe){ft?.focus();return}(ee.current||ft)?.focus()},onChange(M){if(M.nativeEvent.defaultPrevented)return;const D=M.target.value,K=Y(ot,M.nativeEvent);function pe(){if(oe)return;if(l==="none"){ne(D!==T.initialValue),je(D,K),$()&&N.commit(D);return}const be=X.current.find(Ee=>ht(Ee,O).toLowerCase()===D.toLowerCase());be!=null&&(ne(be!==T.initialValue),Vt?.(be,K),$()&&N.commit(be))}C?pe():(St(),queueMicrotask(pe))}}),id:fe,name:oe||l==="none"?void 0:ie,disabled:se,required:h&&!Ho,readOnly:R,value:Fo,ref:Do,style:Cr,tabIndex:-1,"aria-hidden":!0}),_o]});return P.jsx(Yn.Provider,{value:z,children:P.jsx(Jn.Provider,{value:Ot,children:P.jsx(Xn.Provider,{value:Lo,children:P.jsx(Zn.Provider,{value:Te,children:Bo})})})})}function fs(e){const t=e.getBoundingClientRect(),o=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(o.content!=="none"||r.content!=="none"))return t;const i=parseFloat(o.width)||0,d=parseFloat(o.height)||0,a=parseFloat(r.width)||0,l=parseFloat(r.height)||0,f=Math.max(t.width,i,a),m=Math.max(t.height,d,l),c=f-t.width,R=m-t.height;return{left:t.left-c/2,right:t.right+c/2,top:t.top-R/2,bottom:t.bottom+R/2}}const Dt=2,ps={...Kn,...eo},ms=s.forwardRef(function(t,o){const{render:r,className:u,nativeButton:i=!0,disabled:d=!1,...a}=t,{state:l,disabled:f,setTouched:m,setFocused:c,validationMode:R,validation:h}=vt(),{labelId:V}=fn(),g=Oe(),C=I(g,y.selectionMode),p=I(g,y.disabled),n=I(g,y.readOnly),x=I(g,y.listElement),b=I(g,y.triggerProps),w=I(g,y.triggerElement),E=I(g,y.inputInsidePopup),v=I(g,y.open),O=I(g,y.selectedValue),H=I(g,y.activeIndex),W=I(g,y.selectedIndex),_=Bt(),J=dn(),q=_n(),U=f||p||d,k=s.useRef("");function G(N){k.current=N.pointerType}const le=_.select("domReferenceElement");s.useEffect(()=>{E&&w&&w!==le&&_.set("domReferenceElement",w)},[w,le,_,E]);const{reference:ye}=Yr(_,{enabled:!v&&!n&&!p&&C==="single",listRef:g.state.labelsRef,activeIndex:H,selectedIndex:W,onMatch(N){const fe=g.state.valuesRef.current[N];fe!==void 0&&g.state.setSelectedValue(fe,Y("none"))}}),{reference:ne}=Un(_,{enabled:!n&&!p,event:"mousedown"}),{buttonRef:T,getButtonProps:$}=Ft({native:i,disabled:U}),me=s.useMemo(()=>({...l,open:v,disabled:U}),[l,v,U]),te=ue(N=>{g.set("triggerElement",N)});return De("button",t,{ref:[o,T,te],state:me,props:[b,ne,ye,{tabIndex:E?0:-1,disabled:U,role:E?"combobox":void 0,"aria-expanded":v?"true":"false","aria-haspopup":E?"dialog":"listbox","aria-controls":v?x?.id:void 0,"aria-readonly":n||void 0,"aria-labelledby":V,onPointerDown:G,onPointerEnter:G,onFocus(){c(!0),!(U||n)&&q.start(0,g.state.forceMount)},onBlur(){if(m(!0),c(!1),R==="onBlur"){const N=C==="none"?J:O;h.commit(N)}},onMouseDown(N){if(U||n||(E||_.set("domReferenceElement",N.currentTarget),g.state.forceMount(),k.current!=="touch"&&(g.state.inputRef.current?.focus(),E||N.preventDefault()),v))return;const fe=Rr(N.currentTarget);function ae(ce){if(!w)return;const he=yt(ce),S=g.state.positionerElement,B=g.state.listElement;if(ze(w,he)||ze(S,he)||ze(B,he)||he===w)return;const Q=fs(w),Re=ce.clientX>=Q.left-Dt&&ce.clientX<=Q.right+Dt,ve=ce.clientY>=Q.top-Dt&&ce.clientY<=Q.bottom+Dt;Re&&ve||g.state.setOpen(!1,Y("cancel-open",ce))}E&&fe.addEventListener("mouseup",ae,{once:!0})},onKeyDown(N){U||n||(N.key==="ArrowDown"||N.key==="ArrowUp")&&(de(N),g.state.setOpen(!0,Y(bt,N.nativeEvent)),g.state.inputRef.current?.focus())}},h?h.getValidationProps(a):a,$],stateAttributesMapping:ps})}),ro=s.createContext(void 0);function so(){return s.useContext(ro)}const io=s.createContext(void 0);function pn(e){const t=s.useContext(io);if(t===void 0&&!e)throw new Error(Ye(21));return t}const hs={...Kn,...eo,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null},lo=s.forwardRef(function(t,o){const{render:r,className:u,disabled:i=!1,id:d,...a}=t,{state:l,disabled:f,setTouched:m,setFocused:c,validationMode:R,validation:h}=vt(),{labelId:V}=fn(),g=so(),p=!!pn(!0),n=Oe(),{filteredItems:x}=rt(),b=dn(),w=Bn(d),E=Vr(),v=I(n,y.disabled),O=I(n,y.readOnly),H=I(n,y.name),W=I(n,y.selectionMode),_=I(n,y.autoHighlight),J=I(n,y.inputProps),q=I(n,y.triggerProps),U=I(n,y.open),k=I(n,y.mounted),G=I(n,y.selectedValue),le=I(n,y.popupSide),ye=I(n,y.positionerElement),ne=!!_,T=k&&ye?le:null,$=f||v||i,me=x.length===0,[te,Z]=s.useState(null),N=s.useRef(!1),fe=ue(S=>{const B=p||n.state.inline;B&&!n.state.hasInputValue&&n.state.setInputValue("",Y(He)),n.update({inputElement:S,inputInsidePopup:B})}),ae=s.useMemo(()=>({...l,open:U,disabled:$,readOnly:O,popupSide:T,listEmpty:me}),[l,U,$,O,T,me]);function ce(S){if(!g)return;let B;const{highlightedChipIndex:Q}=g;if(Q!==void 0){if(S.key==="ArrowLeft")S.preventDefault(),Q>0?B=Q-1:B=void 0;else if(S.key==="ArrowRight")S.preventDefault(),Q<G.length-1?B=Q+1:B=void 0;else if(S.key==="Backspace"||S.key==="Delete"){S.preventDefault();const Re=Q>=G.length-1?G.length-2:Q;B=Re>=0?Re:void 0,n.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return B}return S.key==="ArrowLeft"&&(S.currentTarget.selectionStart??0)===0&&G.length>0?(S.preventDefault(),B=Math.max(G.length-1,0)):S.key==="Backspace"&&S.currentTarget.value===""&&G.length>0&&(n.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),S.preventDefault()),B}return De("input",t,{state:ae,ref:[o,n.state.inputRef,fe],props:[J,q,{type:"text",value:t.value??te??b,"aria-readonly":O||void 0,"aria-labelledby":V,disabled:$,readOnly:O,...W==="none"&&H&&{name:H},id:w,onFocus(){c(!0)},onBlur(){if(m(!0),c(!1),R==="onBlur"){const S=W==="none"?b:G;h.commit(S)}},onCompositionStart(S){wr||(N.current=!0,Z(S.currentTarget.value))},onCompositionEnd(S){N.current=!1;const B=S.currentTarget.value;Z(null),n.state.setInputValue(B,Y(ot,S.nativeEvent))},onChange(S){if(N.current){const ve=S.currentTarget.value;Z(ve),ve===""&&!n.state.openOnInputClick&&!n.state.inputInsidePopup&&n.state.setOpen(!1,Y(Ge,S.nativeEvent));const ee=ve.trim(),Me=ne&&ee!=="";!O&&!$&&ee!==""&&(n.state.setOpen(!0,Y(ot,S.nativeEvent)),ne||n.state.setIndices({activeIndex:null,selectedIndex:null,type:n.state.keyboardActiveRef.current?"keyboard":"pointer"})),U&&n.state.activeIndex!==null&&!Me&&n.state.setIndices({activeIndex:null,selectedIndex:null,type:n.state.keyboardActiveRef.current?"keyboard":"pointer"});return}n.state.setInputValue(S.currentTarget.value,Y(ot,S.nativeEvent));const B=S.currentTarget.value==="",Q=Y(Ge,S.nativeEvent);B&&!n.state.inputInsidePopup&&(W==="single"&&n.state.setSelectedValue(null,Q),n.state.openOnInputClick||n.state.setOpen(!1,Q));const Re=S.currentTarget.value.trim();!O&&!$&&Re!==""&&(n.state.setOpen(!0,Y(ot,S.nativeEvent)),ne||n.state.setIndices({activeIndex:null,selectedIndex:null,type:n.state.keyboardActiveRef.current?"keyboard":"pointer"})),U&&n.state.activeIndex!==null&&!ne&&n.state.setIndices({activeIndex:null,selectedIndex:null,type:n.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(S){if($||O||S.ctrlKey||S.shiftKey||S.altKey||S.metaKey)return;n.state.keyboardActiveRef.current=!0;const B=S.currentTarget,Q=B.scrollWidth-B.clientWidth,Re=E==="rtl";if(S.key==="Home"){de(S);const ee=vn&&Re?B.value.length:0;B.setSelectionRange(ee,ee),B.scrollLeft=0;return}if(S.key==="End"){de(S);const ee=vn&&Re?0:B.value.length;B.setSelectionRange(ee,ee),B.scrollLeft=Re?-Q:Q;return}if(!k&&S.key==="Escape"){const ee=W==="multiple"&&Array.isArray(G)?G.length===0:G===null,Me=Y(vr,S.nativeEvent),ke=W==="multiple"?[]:null;n.state.setInputValue("",Me),n.state.setSelectedValue(ke,Me),!ee&&!n.state.inline&&!Me.isPropagationAllowed&&S.stopPropagation();return}if(g&&S.key==="Backspace"&&B.value===""&&g.highlightedChipIndex===void 0&&Array.isArray(G)&&G.length>0){const ee=G.slice(0,-1);n.state.setIndices({activeIndex:null,selectedIndex:null,type:n.state.keyboardActiveRef.current?"keyboard":"pointer"}),n.state.setSelectedValue(ee,Y(He,S.nativeEvent));return}const ve=ce(S);if(g?.setHighlightedChipIndex(ve),ve!==void 0?g?.chipsRef.current[ve]?.focus():n.state.inputRef.current?.focus(),S.which!==229&&S.key==="Enter"&&U){const ee=n.state.activeIndex,Me=S.nativeEvent;if(ee===null){n.state.setOpen(!1,Y(He,Me));return}de(S);const ke=n.state.listRef.current[ee];ke&&(n.state.selectionEventRef.current=Me,ke.click(),n.state.selectionEventRef.current=null)}},onPointerMove(){n.state.keyboardActiveRef.current=!1},onPointerDown(){n.state.keyboardActiveRef.current=!1}},h?h.getValidationProps(a):a],stateAttributesMapping:hs})}),gs={...un,...Er},bs=s.forwardRef(function(t,o){const{render:r,className:u,disabled:i=!1,nativeButton:d=!0,keepMounted:a=!1,...l}=t,{disabled:f}=vt(),m=Oe(),c=I(m,y.selectionMode),R=I(m,y.disabled),h=I(m,y.readOnly),V=I(m,y.open),g=I(m,y.selectedValue),C=dn();let p=!1;c==="none"?p=C!=="":c==="single"?p=g!=null:p=Array.isArray(g)&&g.length>0;const n=f||R||i,{buttonRef:x,getButtonProps:b}=Ft({native:d,disabled:n}),{mounted:w,transitionStatus:E,setMounted:v}=cn(p),O=s.useMemo(()=>({disabled:n,open:V,transitionStatus:E}),[n,V,E]);Ht({open:p,ref:m.state.clearRef,onComplete(){p||v(!1)}});const H=De("button",t,{state:O,ref:[o,x,m.state.clearRef],props:[{tabIndex:-1,children:"x",disabled:n,"aria-readonly":h||void 0,onMouseDown(_){_.preventDefault()},onClick(_){if(n||h)return;const J=m.state.keyboardActiveRef;m.state.setInputValue("",Y(wn,_.nativeEvent)),c!=="none"?(m.state.setSelectedValue(Array.isArray(g)?[]:null,Y(wn,_.nativeEvent)),m.state.setIndices({activeIndex:null,selectedIndex:null,type:J.current?"keyboard":"pointer"})):m.state.setIndices({activeIndex:null,type:J.current?"keyboard":"pointer"}),m.state.inputRef.current?.focus()}},l,b],stateAttributesMapping:gs});return a||w?H:null}),xs=s.createContext(null);function Is(){return s.useContext(xs)}function ys(e){const{children:t}=e,{filteredItems:o}=rt(),r=Is(),u=r?r.items:o;return u?P.jsx(s.Fragment,{children:u.map(t)}):null}const ao=s.forwardRef(function(t,o){var r;const{render:u,className:i,children:d,...a}=t,l=Oe(),f=Bt(),m=!!pn(!0),{filteredItems:c}=rt(),R=I(l,y.items),h=I(l,y.labelsRef),V=I(l,y.listRef),g=I(l,y.selectionMode),C=I(l,y.grid),p=I(l,y.popupProps),n=I(l,y.disabled),x=I(l,y.readOnly),b=I(l,y.virtualized),w=g==="multiple",E=c.length===0,v=ue(q=>{l.set("positionerElement",q)}),O=ue(q=>{l.set("listElement",q)}),H=s.useMemo(()=>typeof d=="function"?r||(r=P.jsx(ys,{children:d})):d,[d]),W=s.useMemo(()=>({empty:E}),[E]),_=f.useState("floatingId"),J=De("div",t,{state:W,ref:[o,O,m?null:v],props:[p,{children:H,tabIndex:-1,id:_,role:C?"grid":"listbox","aria-multiselectable":w?"true":void 0,onKeyDown(q){if(!(n||x)&&q.key==="Enter"){const U=l.state.activeIndex;if(U==null)return;de(q);const k=q.nativeEvent,G=l.state.listRef.current[U];G&&(l.state.selectionEventRef.current=k,G.click(),l.state.selectionEventRef.current=null)}},onKeyDownCapture(){l.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){l.state.keyboardActiveRef.current=!1}},a]});return b?J:P.jsx(Gn,{elementsRef:V,labelsRef:R?void 0:h,children:J})}),co=s.createContext(void 0);function Cs(){const e=s.useContext(co);if(e===void 0)throw new Error(Ye(20));return e}const uo=s.forwardRef(function(t,o){const{keepMounted:r=!1,...u}=t,i=Oe(),d=I(i,y.mounted),a=I(i,y.forceMounted);return d||r||a?P.jsx(co.Provider,{value:r,children:P.jsx(Pr,{ref:o,...u})}):null}),fo=s.forwardRef(function(t,o){const{render:r,className:u,anchor:i,positionMethod:d="absolute",side:a="bottom",align:l="center",sideOffset:f=0,alignOffset:m=0,collisionBoundary:c="clipping-ancestors",collisionPadding:R=5,arrowPadding:h=5,sticky:V=!1,disableAnchorTracking:g=!1,collisionAvoidance:C=Mr,...p}=t,n=Oe(),{filteredItems:x}=rt(),b=Bt(),w=Cs(),E=I(n,y.modal),v=I(n,y.open),O=I(n,y.mounted),H=I(n,y.openMethod),W=I(n,y.triggerElement),_=I(n,y.inputElement),J=I(n,y.inputInsidePopup),q=x.length===0,k=Or({anchor:i??(J?W:_),floatingRootContext:b,positionMethod:d,mounted:O,side:a,sideOffset:f,align:l,alignOffset:m,arrowPadding:h,collisionBoundary:c,collisionPadding:R,sticky:V,disableAnchorTracking:g,keepMounted:w,collisionAvoidance:C,lazyFlip:!0});Nr(v&&E&&H!=="touch",W);const G=s.useMemo(()=>{const $={...k.positionerStyles};return v||($.pointerEvents="none"),{role:"presentation",hidden:!O,style:$}},[v,O,k.positionerStyles]),le=s.useMemo(()=>({open:v,side:k.side,align:k.align,anchorHidden:k.anchorHidden,empty:q}),[v,k.side,k.align,k.anchorHidden,q]);re(()=>{n.set("popupSide",k.side)},[n,k.side]);const ye=s.useMemo(()=>({side:k.side,align:k.align,arrowRef:k.arrowRef,arrowUncentered:k.arrowUncentered,arrowStyles:k.arrowStyles,anchorHidden:k.anchorHidden,isPositioned:k.isPositioned}),[k.side,k.align,k.arrowRef,k.arrowUncentered,k.arrowStyles,k.anchorHidden,k.isPositioned]),ne=ue($=>{n.set("positionerElement",$)}),T=De("div",t,{state:le,ref:[o,ne],props:[G,p],stateAttributesMapping:zn});return P.jsxs(io.Provider,{value:ye,children:[O&&E&&P.jsx(jr,{inert:Dr(!v),cutout:_??W}),T]})}),Rs={...zn,...un},po=s.forwardRef(function(t,o){const{render:r,className:u,initialFocus:i,finalFocus:d,...a}=t,l=Oe(),f=pn(),m=Bt(),{filteredItems:c}=rt(),R=I(l,y.mounted),h=I(l,y.open),V=I(l,y.openMethod),g=I(l,y.transitionStatus),C=I(l,y.inputInsidePopup),p=I(l,y.inputElement),n=c.length===0;Ht({open:h,ref:l.state.popupRef,onComplete(){h&&l.state.onOpenChangeComplete(!0)}});const x=s.useMemo(()=>({open:h,side:f.side,align:f.align,anchorHidden:f.anchorHidden,transitionStatus:g,empty:n}),[h,f.side,f.align,f.anchorHidden,g,n]),b=De("div",t,{state:x,ref:[o,l.state.popupRef],props:[{role:C?"dialog":"presentation",tabIndex:-1,onFocus(O){const H=yt(O.nativeEvent);V!=="touch"&&(ze(l.state.listElement,H)||H===O.currentTarget)&&l.state.inputRef.current?.focus()}},kr(g),a],stateAttributesMapping:Rs}),E=i===void 0?C?O=>O==="touch"?l.state.popupRef.current:p:!1:i;let v;return d!=null?v=d:v=C?void 0:!1,P.jsx(Lr,{context:m,disabled:!R,modal:!C,openInteractionType:V,initialFocus:E,returnFocus:v,children:b})}),mo=s.createContext(void 0);function ho(){const e=s.useContext(mo);if(!e)throw new Error(Ye(19));return e}const vs=s.createContext(!1);function ws(){return s.useContext(vs)}const go=s.memo(s.forwardRef(function(t,o){const{render:r,className:u,value:i=null,index:d,disabled:a=!1,nativeButton:l=!1,...f}=t,m=s.useRef(!1),c=s.useRef(null),R=Qn({index:d,textRef:c,indexGuessBehavior:$n.GuessFromOrder}),h=Oe(),V=ws(),{flatFilteredItems:g}=rt(),C=I(h,y.open),p=I(h,y.selectionMode),n=I(h,y.readOnly),x=I(h,y.virtualized),b=I(h,y.isItemEqualToValue),w=p!=="none",E=d??(x?Ct(g,i,b):R.index),v=R.index!==-1,O=I(h,y.id),H=I(h,y.isActive,E),W=I(h,y.isSelected,i),_=I(h,y.items),J=I(h,y.getItemProps),q=s.useRef(null),U=O!=null&&v?`${O}-${E}`:void 0,k=W&&w;re(()=>{if(!(v&&(x||d!=null)))return;const N=h.state.listRef.current;return N[E]=q.current,()=>{delete N[E]}},[v,x,E,d,h]),re(()=>{if(!v||_)return;const Z=h.state.valuesRef.current;return Z[E]=i,p!=="none"&&h.state.allValuesRef.current.push(i),()=>{delete Z[E]}},[v,_,E,i,h,p]),re(()=>{if(!C){m.current=!1;return}if(!v||_)return;const Z=h.state.selectedValue,N=Array.isArray(Z)?Z[Z.length-1]:Z;lt(N,i,b)&&h.set("selectedIndex",E)},[v,_,C,h,E,i,b]);const G=s.useMemo(()=>({disabled:a,selected:k,highlighted:H}),[a,k,H]),le=J({active:H,selected:k});le.id=void 0,le.onFocus=void 0;const{getButtonProps:ye,buttonRef:ne}=Ft({disabled:a,focusableWhenDisabled:!0,native:l});function T(Z){function N(){h.state.handleSelection(Z,i)}h.state.submitOnItemClick?(ln.flushSync(N),h.state.requestSubmit()):N()}const $={id:U,role:V?"gridcell":"option","aria-disabled":a||void 0,"aria-selected":w?k:void 0,tabIndex:void 0,onPointerDownCapture(Z){m.current=!0,Z.preventDefault()},onClick(Z){a||n||T(Z.nativeEvent)},onMouseUp(Z){const N=m.current;m.current=!1,!(a||n||Z.button!==0||N||!H)&&T(Z.nativeEvent)}},me=De("div",t,{ref:[ne,o,R.ref,q],state:G,props:[le,$,f,ye]}),te=s.useMemo(()=>({selected:k,textRef:c}),[k,c]);return P.jsx(mo.Provider,{value:te,children:me})})),bo=s.forwardRef(function(t,o){const{render:r,className:u,children:i,...d}=t,{filteredItems:a}=rt(),l=Oe(),f=a.length===0?i:null;return De("div",t,{ref:[o,l.state.emptyRef],props:[{children:f,role:"status","aria-live":"polite","aria-atomic":!0},d]})});function xo(e){const{multiple:t=!1,defaultValue:o,value:r,onValueChange:u,...i}=e;return P.jsx(ds,{...i,selectionMode:t?"multiple":"single",selectedValue:r,defaultSelectedValue:o,onSelectedValueChange:u})}function Es(e){const{children:t}=e,o=Oe(),r=I(o,y.itemToStringLabel),u=I(o,y.selectedValue),i=I(o,y.items);let d=null;return typeof t=="function"?d=t(u):t!=null?d=t:d=is(u,i,r),P.jsx(s.Fragment,{children:d})}const Io=s.forwardRef(function(t,o){const r=t.keepMounted??!1,{selected:u}=ho();return r||u?P.jsx(Ps,{...t,ref:o}):null}),Ps=s.memo(s.forwardRef((e,t)=>{const{render:o,className:r,keepMounted:u,...i}=e,{selected:d}=ho(),a=s.useRef(null),{transitionStatus:l,setMounted:f}=cn(d),m=s.useMemo(()=>({selected:d,transitionStatus:l}),[d,l]),c=De("span",e,{ref:[t,a],state:m,props:[{"aria-hidden":!0,children:"✔️"},i],stateAttributesMapping:un});return Ht({open:d,ref:a,onComplete(){d||f(!1)}}),c})),Ms=s.forwardRef(function(t,o){const{render:r,className:u,...i}=t,d=Oe(),a=I(d,y.open),[l,f]=s.useState(void 0);a&&l!==void 0&&f(void 0);const m=s.useRef([]),c=De("div",t,{ref:[o,d.state.chipsContainerRef],props:i}),R=s.useMemo(()=>({highlightedChipIndex:l,setHighlightedChipIndex:f,chipsRef:m}),[l,f,m]);return P.jsx(ro.Provider,{value:R,children:P.jsx(Gn,{elementsRef:m,children:c})})}),yo=s.createContext(void 0);function Ss(){const e=s.useContext(yo);if(!e)throw new Error(Ye(17));return e}const Vs=s.forwardRef(function(t,o){const{render:r,className:u,...i}=t,d=Oe(),{setHighlightedChipIndex:a,chipsRef:l}=so(),f=I(d,y.disabled),m=I(d,y.readOnly),c=I(d,y.selectedValue),{ref:R,index:h}=Qn();function V(n){let x=h;if(n.key==="ArrowLeft")n.preventDefault(),h>0?x=h-1:x=void 0;else if(n.key==="ArrowRight")n.preventDefault(),h<c.length-1?x=h+1:x=void 0;else if(n.key==="Backspace"||n.key==="Delete"){const b=h>=c.length-1?c.length-2:h;x=b>=0?b:void 0,de(n),d.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),d.state.setSelectedValue(c.filter((w,E)=>E!==h),Y(He,n.nativeEvent))}else n.key==="Enter"||n.key===" "?(de(n),x=void 0):n.key==="ArrowDown"||n.key==="ArrowUp"?(de(n),d.state.setOpen(!0,Y(bt,n.nativeEvent)),x=void 0):n.key.length===1&&!n.ctrlKey&&!n.metaKey&&!n.altKey&&(x=void 0);return x}const g=s.useMemo(()=>({disabled:f}),[f]),C=De("div",t,{ref:[o,R],state:g,props:[{tabIndex:-1,"aria-disabled":f||void 0,"aria-readonly":m||void 0,onKeyDown(n){if(f||m)return;const x=V(n);ln.flushSync(()=>{a(x)}),x===void 0?d.state.inputRef.current?.focus():l.current[x]?.focus()},onMouseDown(n){f||m||(n.preventDefault(),d.state.inputRef.current?.focus())}},i]}),p=s.useMemo(()=>({index:h}),[h]);return P.jsx(yo.Provider,{value:p,children:C})}),Os=s.forwardRef(function(t,o){const{render:r,className:u,nativeButton:i=!0,...d}=t,a=Oe(),{index:l}=Ss(),f=I(a,y.disabled),m=I(a,y.readOnly),c=I(a,y.selectedValue),R=I(a,y.isItemEqualToValue),{buttonRef:h,getButtonProps:V}=Ft({native:i,disabled:f||m,focusableWhenDisabled:!0}),g=s.useMemo(()=>({disabled:f}),[f]);return De("button",t,{ref:[o,h],state:g,props:[{tabIndex:-1,disabled:f,"aria-readonly":m||void 0,onClick(p){if(f||m)return;const n=Y(En,p.nativeEvent),x=a.state.activeIndex,b=c[l],w=Ct(a.state.valuesRef.current,b,R);w!==-1&&x===w&&a.state.setIndices({activeIndex:null,type:a.state.keyboardActiveRef.current?"pointer":"keyboard"}),a.state.setSelectedValue(c.filter((E,v)=>v!==l),n),n.isPropagationAllowed||p.stopPropagation(),a.state.inputRef.current?.focus()},onKeyDown(p){if(f||m)return;const n=Y(En,p.nativeEvent);if(p.key==="Enter"||p.key===" "){const x=a.state.activeIndex,b=c[l],w=Ct(a.state.valuesRef.current,b,R);w!==-1&&x===w&&a.state.setIndices({activeIndex:null,type:a.state.keyboardActiveRef.current?"pointer":"keyboard"}),a.state.setSelectedValue(c.filter((E,v)=>v!==l),n),n.isPropagationAllowed||de(p),a.state.inputRef.current?.focus()}}},d,V]})});function Co(e){const t=at.c(3);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.jsx("path",{d:"M9.1603 1.12218C9.50684 1.34873 9.60427 1.81354 9.37792 2.16038L5.13603 8.66012C5.01614 8.8438 4.82192 8.96576 4.60451 8.99384C4.3871 9.02194 4.1683 8.95335 4.00574 8.80615L1.24664 6.30769C0.939709 6.02975 0.916013 5.55541 1.19372 5.24822C1.47142 4.94102 1.94536 4.91731 2.2523 5.19524L4.36085 7.10461L8.12299 1.33999C8.34934 0.993152 8.81376 0.895638 9.1603 1.12218Z"}),t[0]=o):o=t[0];let r;return t[1]!==e?(r=P.jsx("svg",{fill:"currentcolor",width:"10",height:"10",viewBox:"0 0 10 10",...e,children:o}),t[1]=e,t[2]=r):r=t[2],r}function ks(e){const t=at.c(4);let o,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.jsx("path",{d:"M18 6L6 18"}),r=P.jsx("path",{d:"M6 6l12 12"}),t[0]=o,t[1]=r):(o=t[0],r=t[1]);let u;return t[2]!==e?(u=P.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o,r]}),t[2]=e,t[3]=u):u=t[3],u}function As(e){const t=at.c(3);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.jsx("path",{d:"M6 9l6 6 6-6"}),t[0]=o):o=t[0];let r;return t[1]!==e?(r=P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:o}),t[1]=e,t[2]=r):r=t[2],r}function Ts(e){const t=at.c(4);let o,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=P.jsx("path",{d:"M18 6 6 18"}),r=P.jsx("path",{d:"m6 6 12 12"}),t[0]=o,t[1]=r):(o=t[0],r=t[1]);let u;return t[2]!==e?(u=P.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,...e,children:[o,r]}),t[2]=e,t[3]=u):u=t[3],u}function Bs(e){const t=at.c(44),{items:o,label:r,placeholder:u,id:i,value:d,defaultValue:a,onValueChange:l,disabled:f,className:m,itemToString:c,itemToIcon:R,variant:h}=e,V=u===void 0?"Search...":u,g=f===void 0?!1:f,C=h===void 0?"default":h,p=s.useId(),n=i||p,x=C==="inline",b=x?Jo:On,w=x?zo:Uo,E=g&&(x?qo:Wo);let v;t[0]!==w||t[1]!==E?(v=gt(w,E),t[0]=w,t[1]=E,t[2]=v):v=t[2];const O=v,H=x?Go:$o,W=g&&(x?Qo:Yo);let _;t[3]!==H||t[4]!==W?(_=gt(H,W),t[3]=H,t[4]=W,t[5]=_):_=t[5];const J=_,q=x?Zo:er;let U;t[6]!==l?(U=(B,Q)=>{l?.(B)},t[6]=l,t[7]=U):U=t[7];const k=U,G=d!==void 0,le=G?d??void 0:void 0,ye=G?void 0:a??void 0;let ne;t[8]!==m||t[9]!==b?(ne=gt(b,m),t[8]=m,t[9]=b,t[10]=ne):ne=t[10];let T;t[11]!==n||t[12]!==r?(T=r&&P.jsx("label",{htmlFor:n,children:r}),t[11]=n,t[12]=r,t[13]=T):T=t[13];let $;t[14]!==n||t[15]!==J||t[16]!==V?($=P.jsx(lo,{placeholder:V,id:n,className:J}),t[14]=n,t[15]=J,t[16]=V,t[17]=$):$=t[17];let me;t[18]===Symbol.for("react.memo_cache_sentinel")?(me=gt(Xo,"combobox-clear"),t[18]=me):me=t[18];let te;t[19]===Symbol.for("react.memo_cache_sentinel")?(te=P.jsx(bs,{className:me,"aria-label":"Clear selection",children:P.jsx(ks,{className:yn})}),t[19]=te):te=t[19];let Z;t[20]===Symbol.for("react.memo_cache_sentinel")?(Z=P.jsx(ms,{className:tr,"aria-label":"Open popup",children:P.jsx(As,{className:yn})}),t[20]=Z):Z=t[20];let N;t[21]!==q?(N=P.jsxs("div",{className:q,children:[te,Z]}),t[21]=q,t[22]=N):N=t[22];let fe;t[23]!==$||t[24]!==N||t[25]!==O?(fe=P.jsxs("div",{className:O,children:[$,N]}),t[23]=$,t[24]=N,t[25]=O,t[26]=fe):fe=t[26];let ae;t[27]!==ne||t[28]!==T||t[29]!==fe?(ae=P.jsxs("div",{className:ne,children:[T,fe]}),t[27]=ne,t[28]=T,t[29]=fe,t[30]=ae):ae=t[30];let ce;t[31]===Symbol.for("react.memo_cache_sentinel")?(ce=P.jsx(bo,{className:kn,children:"No items found."}),t[31]=ce):ce=t[31];let he;t[32]!==R||t[33]!==c?(he=P.jsx(uo,{children:P.jsx(fo,{className:An,sideOffset:4,children:P.jsxs(po,{className:Tn,children:[ce,P.jsx(ao,{className:Nn,children:B=>{const Q=!!R;return P.jsxs(go,{value:B,className:jn({withIcon:Q}),children:[P.jsx(Io,{className:Dn({withIcon:Q}),children:P.jsx(Co,{className:Ln})}),R&&P.jsx("div",{className:Fn({withIcon:Q}),children:R(B)}),P.jsx("div",{className:Hn({withIcon:Q}),children:c?c(B):String(B)})]},c?c(B):String(B))}})]})})}),t[32]=R,t[33]=c,t[34]=he):he=t[34];let S;return t[35]!==g||t[36]!==k||t[37]!==c||t[38]!==o||t[39]!==le||t[40]!==ye||t[41]!==ae||t[42]!==he?(S=P.jsxs(xo,{items:o,value:le,defaultValue:ye,onValueChange:k,disabled:g,itemToStringLabel:c,children:[ae,he]}),t[35]=g,t[36]=k,t[37]=c,t[38]=o,t[39]=le,t[40]=ye,t[41]=ae,t[42]=he,t[43]=S):S=t[43],S}function Ks(e){const t=at.c(27),{items:o,label:r,placeholder:u,id:i,value:d,defaultValue:a,onValueChange:l,disabled:f,className:m,itemToString:c,itemToIcon:R}=e,h=u===void 0?"Search...":u,V=f===void 0?!1:f,g=s.useId(),C=i||g,p=s.useRef(null);let n;t[0]!==m?(n=gt(On,m),t[0]=m,t[1]=n):n=t[1];let x;t[2]!==C||t[3]!==r?(x=r&&P.jsx("label",{htmlFor:C,children:r}),t[2]=C,t[3]=r,t[4]=x):x=t[4];let b;t[5]!==C||t[6]!==R||t[7]!==c||t[8]!==h?(b=P.jsx(Ms,{className:nr,ref:p,children:P.jsx(Es,{children:H=>P.jsxs(s.Fragment,{children:[H.map(W=>{const _=c?c(W):String(W),J=c?c(W):String(W),q=R?.(W);return P.jsxs(Vs,{className:or,"aria-label":J,children:[q&&P.jsx("div",{className:rr,children:q}),J,P.jsx(Os,{className:sr,"aria-label":"Remove",children:P.jsx(Ts,{})})]},_)}),P.jsx(lo,{id:C,placeholder:H.length>0?"":h,className:ir})]})})}),t[5]=C,t[6]=R,t[7]=c,t[8]=h,t[9]=b):b=t[9];let w;t[10]!==n||t[11]!==x||t[12]!==b?(w=P.jsxs("div",{className:n,children:[x,b]}),t[10]=n,t[11]=x,t[12]=b,t[13]=w):w=t[13];let E;t[14]===Symbol.for("react.memo_cache_sentinel")?(E=P.jsx(bo,{className:kn,children:"No items found."}),t[14]=E):E=t[14];let v;t[15]!==R||t[16]!==c?(v=P.jsx(uo,{children:P.jsx(fo,{className:An,sideOffset:4,anchor:p,children:P.jsxs(po,{className:Tn,children:[E,P.jsx(ao,{className:Nn,children:H=>{const W=c?c(H):String(H),_=c?c(H):String(H),J=R?.(H),q=!!R;return P.jsxs(go,{value:H,className:jn({withIcon:q}),children:[P.jsx(Io,{className:Dn({withIcon:q}),children:P.jsx(Co,{className:Ln})}),J&&P.jsx("div",{className:Fn({withIcon:q}),children:J}),P.jsx("div",{className:Hn({withIcon:q}),children:_})]},W)}})]})})}),t[15]=R,t[16]=c,t[17]=v):v=t[17];let O;return t[18]!==a||t[19]!==V||t[20]!==c||t[21]!==o||t[22]!==l||t[23]!==w||t[24]!==v||t[25]!==d?(O=P.jsxs(xo,{items:o,value:d,defaultValue:a,onValueChange:l,disabled:V,multiple:!0,itemToStringLabel:c,children:[w,v]}),t[18]=a,t[19]=V,t[20]=c,t[21]=o,t[22]=l,t[23]=w,t[24]=v,t[25]=d,t[26]=O):O=t[26],O}export{Ks as C,Gn as a,Qr as b,Yr as c,vt as d,fn as e,tn as f,fs as g,os as h,ss as i,Bs as j,Qn as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as J,a as D,j as s,r as w,d as B,f as L,g as z,m as Y,i as G,n as Z,I as H,b as ee,u as te,e as P,L as se,O as ae}from"./index-FrTQ7TcS.js";import{U as ie,X as oe,u as ne,l as le,r as re,t as ce}from"./update-or-create-name-B-M46wHl.js";import{w as q,b as de,C as me,c as A,B as fe,h as O,H as ue,a as ge,g as pe}from"./area.css-CSjofvHM.js";import{c as he,u as Ce,g as xe,a as je,b as ye,d as be,f as Q}from"./index-DeuSY0Yv.js";import{T as ve,a as Se,b as U,c as we,d as Ne,e as Te}from"./table-DggTSlPh.js";import{u as Re,q as W}from"./useConfigList-CAf01_dV.js";import{f as _e}from"./formatDistance-Bok3-MB1.js";import{B as E}from"./button-CMZqhyXB.js";import{c as De,a as $e,b as ke,d as Me,h as K}from"./index.esm-oCSEvUVx.js";import{u as X}from"./useMutation-D4JglXWk.js";import{C as Fe}from"./check-D9E8RKB4.js";import{C as He}from"./copy-DADLeZ69.js";import{C as Be}from"./chevron-right-fMWRsRLZ.js";import{P as Ie}from"./plus-JQ0TORpd.js";/* empty css */import"./tooltip-BuSsMQ8P.js";import"./useButton-CsZ8hBM8.js";import"./popupStateMapping-DolkyTT3.js";import"./reselect-DVmmTZGf.js";import"./usePopupAutoResize-D6RSlB-m.js";import"./getDisabledMountTransitionStyles-TZFYxPIU.js";import"./useSyncedFloatingRootContext-BKbVh8Gq.js";import"./useFocus-9TCY0h5x.js";import"./en-US-C8ut0f5H.js";/* empty css */const Ee=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Le=J("arrow-left",Ee);var ze="_1xwfgwi0",Pe="_1xwfgwi1",qe="_1xwfgwi2";const Ae=()=>{const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:ze,children:s.jsx("div",{className:Pe,children:s.jsx("h2",{className:qe,children:"No configs yet. Create your first config to get started."})})}),e[0]=t):t=e[0],t},V=he();function Oe(){const[e,t]=w.useState([]),[a,o]=w.useState([]),[i,c]=w.useState(""),u=B(),{id:r}=L({strict:!1}),{data:p}=Re(),h=z(),C=w.useCallback(n=>{h.prefetchQuery(Y(n))},[h]),b=w.useMemo(()=>[V.accessor("name",{header:"Name",cell:n=>n.getValue()}),V.accessor("createdAt",{header:"Creation Date",cell:n=>_e(new Date(n.getValue()),new Date,{addSuffix:!0})})],[]),g=Ce({data:p||[],columns:b,state:{sorting:e,columnFilters:a,globalFilter:i},onSortingChange:t,onColumnFiltersChange:o,onGlobalFilterChange:c,getCoreRowModel:be(),getFilteredRowModel:ye(),getSortedRowModel:je(),getPaginationRowModel:xe(),initialState:{pagination:{pageSize:100}}});return!p||p.length===0?s.jsx(Ae,{}):s.jsx("div",{children:s.jsxs(ve,{children:[s.jsx(Se,{children:g.getHeaderGroups().map(n=>s.jsx(U,{children:n.headers.map(l=>{const d=l.column.getIsSorted();return s.jsx(we,{sortable:l.column.getCanSort(),onClick:l.column.getToggleSortingHandler(),sortDirection:d==="asc"?"asc":d==="desc"?"desc":null,children:l.isPlaceholder?null:Q(l.column.columnDef.header,l.getContext())},l.id)})},n.id))}),s.jsx(Ne,{children:g.getRowModel().rows.map(n=>s.jsx(U,{interactive:!0,selected:n.original.id===r,onMouseEnter:()=>C(n.original.id),onClick:()=>u({to:"/configs/$id",params:{id:n.original.id}}),children:n.getVisibleCells().map(l=>s.jsx(Te,{children:Q(l.column.columnDef.cell,l.getContext())},l.id))},n.id))})]})})}const Qe=()=>{const e=D.c(3),t=B(),a=z();let o;return e[0]!==t||e[1]!==a?(o={mutationFn:Ue,onSuccess:async i=>{await a.invalidateQueries({queryKey:W}),i?.id&&t({to:"/configs/$id",params:{id:i?.id}})}},e[0]=t,e[1]=a,e[2]=o):o=e[2],X(o)};async function Ue(e){const a=await(await G.v1.configs.$post({json:{name:e.name}})).json();return"data"in a?a.data:void 0}const Ve=()=>{const e=D.c(2),t=z();let a;return e[0]!==t?(a={mutationFn:Ge,onSuccess:()=>{t.invalidateQueries({queryKey:W})}},e[0]=t,e[1]=a):a=e[1],X(a)};async function Ge(e){const a=await(await G.v1.configs[":id"].$patch({param:{id:e.id},json:{name:e.name}})).json();return"data"in a?a.data:void 0}const We=e=>{const t=D.c(6),{id:a,config:o,disabled:i}=e,{mutateAsync:c}=Qe(),{mutateAsync:u}=Ve();let r;return t[0]!==o||t[1]!==c||t[2]!==i||t[3]!==a||t[4]!==u?(r=s.jsx(ie,{id:a,entity:o,placeholder:"Config Name",onCreate:c,onUpdate:u,disabled:i}),t[0]=o,t[1]=c,t[2]=i,t[3]=a,t[4]=u,t[5]=r):r=t[5],r},Ke=e=>{const t=D.c(25),{id:a}=e,o=B(),{data:i}=Z(a),[c,u]=w.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const p=L(r),h="variant"in p,C="environment"in p,b=h||C;let g;t[1]!==a||t[2]!==C||t[3]!==h||t[4]!==o?(g=()=>{o(h?{to:"/configs/$id/variants",params:{id:a}}:C?{to:"/configs/$id/targeting",params:{id:a}}:{to:"/configs"})},t[1]=a,t[2]=C,t[3]=h,t[4]=o,t[5]=g):g=t[5];const n=g;let l;t[6]!==i?(l=async()=>{i?.slug&&(await navigator.clipboard.writeText(i.slug),u(!0),setTimeout(()=>u(!1),2e3))},t[6]=i,t[7]=l):l=t[7];const d=l,S=b?Le:oe;let m;t[8]!==S?(m=s.jsx(H,{icon:S}),t[8]=S,t[9]=m):m=t[9];let x;t[10]!==n||t[11]!==m?(x=s.jsx(E,{onClick:n,size:"icon",scheme:"gray",variant:"ghost",children:m}),t[10]=n,t[11]=m,t[12]=x):x=t[12];const v=i??void 0;let f;t[13]!==a||t[14]!==b||t[15]!==v?(f=s.jsx(We,{id:a,config:v,disabled:b},a),t[13]=a,t[14]=b,t[15]=v,t[16]=f):f=t[16];let j;t[17]!==c||t[18]!==i||t[19]!==d?(j=i?.slug&&s.jsxs("div",{className:De,children:[s.jsx("span",{className:$e,children:"Config Id"}),s.jsx("span",{className:ke,children:i.slug}),s.jsx("button",{type:"button",className:Me,onClick:d,"aria-label":"Copy config ID",children:c?s.jsx(Fe,{size:14}):s.jsx(He,{size:14})})]}),t[17]=c,t[18]=i,t[19]=d,t[20]=j):j=t[20];let y;return t[21]!==x||t[22]!==f||t[23]!==j?(y=s.jsxs("div",{className:K,children:[x,f,j]}),t[21]=x,t[22]=f,t[23]=j,t[24]=y):y=t[24],y};function St(){const e=D.c(40),{containerRef:t,setTileWidth:a}=ne();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[0]=o):o=e[0];const i=L(o),c=B(),u=ee(),{toggleSidebar:r}=te();let p;e[1]!==u?(p=u.filter(Je).map(Xe),e[1]=u,e[2]=p):p=e[2];const h=p;let C;e[3]!==c?(C=()=>{c({to:"/configs/$id",params:{id:"new"}})},e[3]=c,e[4]=C):C=e[4];const b=C;let g;e[5]!==i.id||e[6]!==a?(g=()=>{i?.id?a("25%"):a("100%")},e[5]=i.id,e[6]=a,e[7]=g):g=e[7];const n=i?.id;let l;e[8]!==n?(l=[n],e[8]=n,e[9]=l):l=e[9],w.useEffect(g,l);let d;e[10]!==r?(d=()=>{r()},e[10]=r,e[11]=d):d=e[11];let S;e[12]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(H,{icon:me}),e[12]=S):S=e[12];let m;e[13]!==d?(m=s.jsx(E,{onClick:d,size:"icon",variant:"ghost",scheme:"gray",children:S}),e[13]=d,e[14]=m):m=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(H,{icon:Be,className:A}),e[15]=x):x=e[15];let v;e[16]!==h?(v=s.jsx(fe,{items:h}),e[16]=h,e[17]=v):v=e[17];let f;e[18]!==v||e[19]!==m?(f=s.jsxs("div",{className:O,children:[m,x,v]}),e[18]=v,e[19]=m,e[20]=f):f=e[20];let j;e[21]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{icon:Ie,className:A}),e[21]=j):j=e[21];let y;e[22]!==b?(y=s.jsx("div",{className:O,children:s.jsxs(E,{variant:"outline",scheme:"gray",onClick:b,children:[j,"New Config"]})}),e[22]=b,e[23]=y):y=e[23];let N;e[24]!==f||e[25]!==y?(N=s.jsxs(ue,{className:ge,children:[f,y]}),e[24]=f,e[25]=y,e[26]=N):N=e[26];let $,k;e[27]===Symbol.for("react.memo_cache_sentinel")?($=s.jsxs("div",{className:P(q,le),children:[s.jsx("div",{className:K}),s.jsx(Oe,{})]}),k=P(q,re),e[27]=$,e[28]=k):($=e[27],k=e[28]);const I=i.id;let T;e[29]!==I?(T=s.jsx(Ke,{id:I}),e[29]=I,e[30]=T):T=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(ae,{}),e[31]=M):M=e[31];let R;e[32]!==T?(R=s.jsx("div",{className:k,children:s.jsxs("div",{children:[T,M]})}),e[32]=T,e[33]=R):R=e[33];let _;e[34]!==t||e[35]!==R?(_=s.jsx("div",{className:pe,children:s.jsxs("div",{ref:t,className:ce,children:[$,R]})}),e[34]=t,e[35]=R,e[36]=_):_=e[36];let F;return e[37]!==N||e[38]!==_?(F=s.jsxs(s.Fragment,{children:[N,_]}),e[37]=N,e[38]=_,e[39]=F):F=e[39],F}function Xe(e){const t=e.loaderData?.title,a=e.staticData.customData?.title,o=t??a;return{key:e.id,label:s.jsx(se,{to:e.pathname,className:de,children:o}),prefix:e.staticData.customData?.icon}}function Je(e){return!!e.staticData.customData?.title||!!e.loaderData?.title}export{St as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as w,d as F,f as z,g as I,h as Y,j as n,a as R,i as L,k as X,I as k,u as J,b as Z,e as Q,L as ee,O as te}from"./index-FrTQ7TcS.js";import{w as q,b as ne,C as se,c as A,B as oe,h as O,H as ae,a as ie,g as re}from"./area.css-CSjofvHM.js";import{B}from"./button-CMZqhyXB.js";import{U as le,X as ce,u as me,l as de,r as ue,t as fe}from"./update-or-create-name-B-M46wHl.js";import{c as pe,u as ve,f as U,g as ge,a as he,b as xe,d as je}from"./index-DeuSY0Yv.js";import{T as Ce,a as be,b as V,c as ye,d as Se,e as we}from"./table-DggTSlPh.js";import{u as Ne,g as G}from"./useEnvironments-Bu_0SIUj.js";import{f as Re}from"./formatDistance-Bok3-MB1.js";import{h as K}from"./index.esm-oCSEvUVx.js";import{u as W}from"./useMutation-D4JglXWk.js";import{C as De}from"./chevron-right-fMWRsRLZ.js";import{P as Ee}from"./plus-JQ0TORpd.js";/* empty css */import"./useButton-CsZ8hBM8.js";import"./tooltip-BuSsMQ8P.js";import"./popupStateMapping-DolkyTT3.js";import"./reselect-DVmmTZGf.js";import"./usePopupAutoResize-D6RSlB-m.js";import"./getDisabledMountTransitionStyles-TZFYxPIU.js";import"./useSyncedFloatingRootContext-BKbVh8Gq.js";import"./useFocus-9TCY0h5x.js";import"./en-US-C8ut0f5H.js";/* empty css */const H=pe();function Te(){const[e,t]=w.useState([{id:"createdAt",desc:!1}]),[s,o]=w.useState([]),[l,i]=w.useState(""),{data:d}=Ne(),m=F(),{environment:r}=z({strict:!1}),u=I(),f=w.useCallback(a=>{u.prefetchQuery(Y(a))},[u]),N=w.useMemo(()=>[H.accessor("name",{header:"Name",cell:a=>a.row.original.isProd?`${a.getValue()} (this environment)`:a.getValue()}),H.accessor("isProd",{header:"Production",cell:a=>a.getValue()?"Yes":"No"}),H.accessor("createdAt",{header:"Creation Date",cell:a=>Re(new Date(a.getValue()),new Date,{addSuffix:!0})})],[]),v=ve({data:d||[],columns:N,state:{sorting:e,columnFilters:s,globalFilter:l},onSortingChange:t,onColumnFiltersChange:o,onGlobalFilterChange:i,getCoreRowModel:je(),getFilteredRowModel:xe(),getSortedRowModel:he(),getPaginationRowModel:ge(),initialState:{pagination:{pageSize:100}}});return n.jsx("div",{children:n.jsxs(Ce,{children:[n.jsx(be,{children:v.getHeaderGroups().map(a=>n.jsx(V,{children:a.headers.map(c=>{const p=c.column.getIsSorted();return n.jsx(ye,{sortable:c.column.getCanSort(),onClick:c.column.getToggleSortingHandler(),sortDirection:p==="asc"?"asc":p==="desc"?"desc":null,children:c.isPlaceholder?null:U(c.column.columnDef.header,c.getContext())},c.id)})},a.id))}),n.jsx(Se,{children:v.getRowModel().rows.map(a=>n.jsx(V,{interactive:!0,selected:a.original.id===r,onMouseEnter:()=>f(a.original.id),onClick:()=>m({to:"/environments/$environment",params:{environment:a.original.id}}),children:a.getVisibleCells().map(c=>n.jsx(we,{children:U(c.column.columnDef.cell,c.getContext())},c.id))},a.id))})]})})}const Pe=()=>{const e=R.c(3),t=F(),s=I();let o;return e[0]!==t||e[1]!==s?(o={mutationFn:$e,onSuccess:async l=>{await s.invalidateQueries({queryKey:G()}),l?.id&&t({to:"/environments/$environment",params:{environment:l?.id}})}},e[0]=t,e[1]=s,e[2]=o):o=e[2],W(o)};async function $e(e){const t=e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),o=await(await L.v1.environments.$post({json:{name:e.name,slug:t,isProd:e.isProd}})).json();return"data"in o?o.data:void 0}const Me=()=>{const e=R.c(2),t=I();let s;return e[0]!==t?(s={mutationFn:_e,onSuccess:()=>{t.invalidateQueries({queryKey:G()})}},e[0]=t,e[1]=s):s=e[1],W(s)};async function _e(e){const s=await(await L.v1.environments[":id"].$patch({param:{id:e.id},json:{name:e.name}})).json();return"data"in s?s.data:void 0}const ke=e=>{const t=R.c(7),{id:s,environment:o}=e,{mutateAsync:l}=Pe(),{mutateAsync:i}=Me(),d=o?.isProd,m=o?.isProd?"You can't rename Production environment.":void 0;let r;return t[0]!==l||t[1]!==o||t[2]!==s||t[3]!==d||t[4]!==m||t[5]!==i?(r=n.jsx(le,{id:s,disabled:d,tooltip:m,entity:o,placeholder:"Environment Name",onCreate:l,onUpdate:i}),t[0]=l,t[1]=o,t[2]=s,t[3]=d,t[4]=m,t[5]=i,t[6]=r):r=t[6],r},Fe=e=>{const t=R.c(11),{id:s}=e,o=F(),{data:l}=X(s);let i;t[0]!==o?(i=()=>{o({to:"/environments"})},t[0]=o,t[1]=i):i=t[1];const d=i;let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(k,{icon:ce}),t[2]=m):m=t[2];let r;t[3]!==d?(r=n.jsx(B,{onClick:d,size:"icon",scheme:"gray",variant:"ghost",children:m}),t[3]=d,t[4]=r):r=t[4];let u;t[5]!==l||t[6]!==s?(u=s?n.jsx(ke,{id:s,environment:l??void 0},s):null,t[5]=l,t[6]=s,t[7]=u):u=t[7];let f;return t[8]!==r||t[9]!==u?(f=n.jsxs("div",{className:K,children:[r,u]}),t[8]=r,t[9]=u,t[10]=f):f=t[10],f};function rt(){const e=R.c(40),{toggleSidebar:t}=J(),{containerRef:s,setTileWidth:o}=me();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[0]=l):l=e[0];const i=z(l),d=Z(),m=F();let r;e[1]!==d?(r=d.filter(Be).map(He),e[1]=d,e[2]=r):r=e[2];const u=r;let f;e[3]!==m?(f=()=>{m({to:"/environments/$environment",params:{environment:"new"}})},e[3]=m,e[4]=f):f=e[4];const N=f;let v;e[5]!==i.environment||e[6]!==o?(v=()=>{i?.environment?o("25%"):o("100%")},e[5]=i.environment,e[6]=o,e[7]=v):v=e[7];const a=i?.environment;let c;e[8]!==a?(c=[a],e[8]=a,e[9]=c):c=e[9],w.useEffect(v,c);let p;e[10]!==t?(p=()=>{t()},e[10]=t,e[11]=p):p=e[11];let D;e[12]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(k,{icon:se}),e[12]=D):D=e[12];let g;e[13]!==p?(g=n.jsx(B,{onClick:p,size:"icon",variant:"ghost",scheme:"gray",children:D}),e[13]=p,e[14]=g):g=e[14];let E;e[15]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(k,{icon:De,className:A}),e[15]=E):E=e[15];let h;e[16]!==u?(h=n.jsx(oe,{items:u}),e[16]=u,e[17]=h):h=e[17];let x;e[18]!==h||e[19]!==g?(x=n.jsxs("div",{className:O,children:[g,E,h]}),e[18]=h,e[19]=g,e[20]=x):x=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(k,{icon:Ee,className:A}),e[21]=T):T=e[21];let j;e[22]!==N?(j=n.jsx("div",{className:O,children:n.jsxs(B,{variant:"outline",scheme:"gray",onClick:N,children:[T,"New Environment"]})}),e[22]=N,e[23]=j):j=e[23];let C;e[24]!==x||e[25]!==j?(C=n.jsxs(ae,{className:ie,children:[x,j]}),e[24]=x,e[25]=j,e[26]=C):C=e[26];let P,$;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsxs("div",{className:Q(q,de),children:[n.jsx("div",{className:K}),n.jsx(Te,{})]}),$=Q(q,ue),e[27]=P,e[28]=$):(P=e[27],$=e[28]);let b;e[29]!==i.environment?(b=n.jsx(Fe,{id:i.environment}),e[29]=i.environment,e[30]=b):b=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx(te,{}),e[31]=M):M=e[31];let y;e[32]!==b?(y=n.jsx("div",{className:$,children:n.jsxs("div",{children:[b,M]})}),e[32]=b,e[33]=y):y=e[33];let S;e[34]!==s||e[35]!==y?(S=n.jsx("div",{className:re,children:n.jsxs("div",{ref:s,className:fe,children:[P,y]})}),e[34]=s,e[35]=y,e[36]=S):S=e[36];let _;return e[37]!==C||e[38]!==S?(_=n.jsxs(n.Fragment,{children:[C,S]}),e[37]=C,e[38]=S,e[39]=_):_=e[39],_}function He(e){const t=e.loaderData?.title,s=e.staticData.customData?.title,o=t??s;return{key:e.id,label:n.jsx(ee,{to:e.pathname,className:ne,children:o}),prefix:e.staticData.customData?.icon}}function Be(e){return!!e.staticData.customData?.title||!!e.loaderData?.title}export{rt as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as S,x as Qe}from"./index-FrTQ7TcS.js";import{J as Ge,I as Ze,aj as tn,P as en,S as nn,Q as De,a0 as $t,az as on}from"./popupStateMapping-DolkyTT3.js";import{p as Wt,n as $,q as J,g as K,r as pe,o as q,j as Q,s as Me,t as zt,l as dt,k as Rt,v as sn,w as Te,x as rn,y as _t,z as Nt,A as Et,b as cn,u as st,a as ln,E as an}from"./useButton-CsZ8hBM8.js";const fn=S.createContext(void 0);function un(){return S.useContext(fn)?.direction??"ltr"}const dn=["top","right","bottom","left"],ct=Math.min,z=Math.max,At=Math.round,yt=Math.floor,X=t=>({x:t,y:t}),gn={left:"right",right:"left",bottom:"top",top:"bottom"},mn={start:"end",end:"start"};function Vt(t,e,o){return z(t,ct(e,o))}function U(t,e){return typeof t=="function"?t(e):t}function V(t){return t.split("-")[0]}function G(t){return t.split("-")[1]}function Yt(t){return t==="x"?"y":"x"}function jt(t){return t==="y"?"height":"width"}const hn=new Set(["top","bottom"]);function N(t){return hn.has(V(t))?"y":"x"}function Xt(t){return Yt(N(t))}function pn(t,e,o){o===void 0&&(o=!1);const n=G(t),i=Xt(t),s=jt(i);let r=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=St(r)),[r,St(r)]}function xn(t){const e=St(t);return[It(t),e,It(e)]}function It(t){return t.replace(/start|end/g,e=>mn[e])}const xe=["left","right"],we=["right","left"],wn=["top","bottom"],yn=["bottom","top"];function bn(t,e,o){switch(t){case"top":case"bottom":return o?e?we:xe:e?xe:we;case"left":case"right":return e?wn:yn;default:return[]}}function vn(t,e,o,n){const i=G(t);let s=bn(V(t),o==="start",n);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(It)))),s}function St(t){return t.replace(/left|right|bottom|top/g,e=>gn[e])}function Rn(t){return{top:0,right:0,bottom:0,left:0,...t}}function Le(t){return typeof t!="number"?Rn(t):{top:t,right:t,bottom:t,left:t}}function Ot(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function ye(t,e,o){let{reference:n,floating:i}=t;const s=N(e),r=Xt(e),l=jt(r),a=V(e),f=s==="y",c=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,m=n[l]/2-i[l]/2;let d;switch(a){case"top":d={x:c,y:n.y-i.height};break;case"bottom":d={x:c,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:u};break;case"left":d={x:n.x-i.width,y:u};break;default:d={x:n.x,y:n.y}}switch(G(e)){case"start":d[r]-=m*(o&&f?-1:1);break;case"end":d[r]+=m*(o&&f?-1:1);break}return d}const An=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:r}=o,l=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(e));let f=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:u}=ye(f,n,a),m=n,d={},g=0;for(let h=0;h<l.length;h++){const{name:x,fn:w}=l[h],{x:y,y:v,data:A,reset:R}=await w({x:c,y:u,initialPlacement:n,placement:m,strategy:i,middlewareData:d,rects:f,platform:r,elements:{reference:t,floating:e}});c=y??c,u=v??u,d={...d,[x]:{...d[x],...A}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(f=R.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):R.rects),{x:c,y:u}=ye(f,m,a)),h=-1)}return{x:c,y:u,placement:m,strategy:i,middlewareData:d}};async function gt(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:s,rects:r,elements:l,strategy:a}=t,{boundary:f="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:m=!1,padding:d=0}=U(e,t),g=Le(d),x=l[m?u==="floating"?"reference":"floating":u],w=Ot(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(x)))==null||o?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:f,rootBoundary:c,strategy:a})),y=u==="floating"?{x:n,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},R=Ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:a}):y);return{top:(w.top-R.top+g.top)/A.y,bottom:(R.bottom-w.bottom+g.bottom)/A.y,left:(w.left-R.left+g.left)/A.x,right:(R.right-w.right+g.right)/A.x}}const Sn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:s,rects:r,initialPlacement:l,platform:a,elements:f}=e,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...x}=U(t,e);if((o=s.arrow)!=null&&o.alignmentOffset)return{};const w=V(i),y=N(l),v=V(l)===l,A=await(a.isRTL==null?void 0:a.isRTL(f.floating)),R=m||(v||!h?[St(l)]:xn(l)),C=g!=="none";!m&&C&&R.push(...vn(l,h,g,A));const b=[l,...R],O=await gt(e,x),I=[];let L=((n=s.flip)==null?void 0:n.overflows)||[];if(c&&I.push(O[w]),u){const k=pn(i,r,A);I.push(O[k[0]],O[k[1]])}if(L=[...L,{placement:i,overflows:I}],!I.every(k=>k<=0)){var B,H;const k=(((B=s.flip)==null?void 0:B.index)||0)+1,D=b[k];if(D&&(!(u==="alignment"?y!==N(D):!1)||L.every(p=>N(p.placement)===y?p.overflows[0]>0:!0)))return{data:{index:k,overflows:L},reset:{placement:D}};let M=(H=L.filter(F=>F.overflows[0]<=0).sort((F,p)=>F.overflows[1]-p.overflows[1])[0])==null?void 0:H.placement;if(!M)switch(d){case"bestFit":{var P;const F=(P=L.filter(p=>{if(C){const E=N(p.placement);return E===y||E==="y"}return!0}).map(p=>[p.placement,p.overflows.filter(E=>E>0).reduce((E,Y)=>E+Y,0)]).sort((p,E)=>p[1]-E[1])[0])==null?void 0:P[0];F&&(M=F);break}case"initialPlacement":M=l;break}if(i!==M)return{reset:{placement:M}}}return{}}}};function be(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ve(t){return dn.some(e=>t[e]>=0)}const On=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:o}=e,{strategy:n="referenceHidden",...i}=U(t,e);switch(n){case"referenceHidden":{const s=await gt(e,{...i,elementContext:"reference"}),r=be(s,o.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:ve(r)}}}case"escaped":{const s=await gt(e,{...i,altBoundary:!0}),r=be(s,o.floating);return{data:{escapedOffsets:r,escaped:ve(r)}}}default:return{}}}}},Fe=new Set(["left","top"]);async function Cn(t,e){const{placement:o,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),r=V(o),l=G(o),a=N(o)==="y",f=Fe.has(r)?-1:1,c=s&&a?-1:1,u=U(e,t);let{mainAxis:m,crossAxis:d,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof g=="number"&&(d=l==="end"?g*-1:g),a?{x:d*c,y:m*f}:{x:m*f,y:d*c}}const En=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:s,placement:r,middlewareData:l}=e,a=await Cn(e,t);return r===((o=l.offset)==null?void 0:o.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},Pn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:l={fn:x=>{let{x:w,y}=x;return{x:w,y}}},...a}=U(t,e),f={x:o,y:n},c=await gt(e,a),u=N(V(i)),m=Yt(u);let d=f[m],g=f[u];if(s){const x=m==="y"?"top":"left",w=m==="y"?"bottom":"right",y=d+c[x],v=d-c[w];d=Vt(y,d,v)}if(r){const x=u==="y"?"top":"left",w=u==="y"?"bottom":"right",y=g+c[x],v=g-c[w];g=Vt(y,g,v)}const h=l.fn({...e,[m]:d,[u]:g});return{...h,data:{x:h.x-o,y:h.y-n,enabled:{[m]:s,[u]:r}}}}}},Dn=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:o,y:n,placement:i,rects:s,middlewareData:r}=e,{offset:l=0,mainAxis:a=!0,crossAxis:f=!0}=U(t,e),c={x:o,y:n},u=N(i),m=Yt(u);let d=c[m],g=c[u];const h=U(l,e),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(a){const v=m==="y"?"height":"width",A=s.reference[m]-s.floating[v]+x.mainAxis,R=s.reference[m]+s.reference[v]-x.mainAxis;d<A?d=A:d>R&&(d=R)}if(f){var w,y;const v=m==="y"?"width":"height",A=Fe.has(V(i)),R=s.reference[u]-s.floating[v]+(A&&((w=r.offset)==null?void 0:w[u])||0)+(A?0:x.crossAxis),C=s.reference[u]+s.reference[v]+(A?0:((y=r.offset)==null?void 0:y[u])||0)-(A?x.crossAxis:0);g<R?g=R:g>C&&(g=C)}return{[m]:d,[u]:g}}}},Mn=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:s,platform:r,elements:l}=e,{apply:a=()=>{},...f}=U(t,e),c=await gt(e,f),u=V(i),m=G(i),d=N(i)==="y",{width:g,height:h}=s.floating;let x,w;u==="top"||u==="bottom"?(x=u,w=m===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(w=u,x=m==="end"?"top":"bottom");const y=h-c.top-c.bottom,v=g-c.left-c.right,A=ct(h-c[x],y),R=ct(g-c[w],v),C=!e.middlewareData.shift;let b=A,O=R;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(O=v),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(b=y),C&&!m){const L=z(c.left,0),B=z(c.right,0),H=z(c.top,0),P=z(c.bottom,0);d?O=g-2*(L!==0||B!==0?L+B:z(c.left,c.right)):b=h-2*(H!==0||P!==0?H+P:z(c.top,c.bottom))}await a({...e,availableWidth:O,availableHeight:b});const I=await r.getDimensions(l.floating);return g!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function ke(t){const e=q(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Q(t),s=i?t.offsetWidth:o,r=i?t.offsetHeight:n,l=At(o)!==s||At(n)!==r;return l&&(o=s,n=r),{width:o,height:n,$:l}}function qt(t){return $(t)?t:t.contextElement}function rt(t){const e=qt(t);if(!Q(e))return X(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:s}=ke(e);let r=(s?At(o.width):o.width)/n,l=(s?At(o.height):o.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const Tn=X(0);function $e(t){const e=K(t);return!Me()||!e.visualViewport?Tn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ln(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==K(t)?!1:e}function Z(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),s=qt(t);let r=X(1);e&&(n?$(n)&&(r=rt(n)):r=rt(t));const l=Ln(s,o,n)?$e(s):X(0);let a=(i.left+l.x)/r.x,f=(i.top+l.y)/r.y,c=i.width/r.x,u=i.height/r.y;if(s){const m=K(s),d=n&&$(n)?K(n):n;let g=m,h=pe(g);for(;h&&n&&d!==g;){const x=rt(h),w=h.getBoundingClientRect(),y=q(h),v=w.left+(h.clientLeft+parseFloat(y.paddingLeft))*x.x,A=w.top+(h.clientTop+parseFloat(y.paddingTop))*x.y;a*=x.x,f*=x.y,c*=x.x,u*=x.y,a+=v,f+=A,g=K(h),h=pe(g)}}return Ot({width:c,height:u,x:a,y:f})}function Pt(t,e){const o=Et(t).scrollLeft;return e?e.left+o:Z(J(t)).left+o}function Be(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-Pt(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Fn(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const s=i==="fixed",r=J(n),l=e?zt(e.floating):!1;if(n===r||l&&s)return o;let a={scrollLeft:0,scrollTop:0},f=X(1);const c=X(0),u=Q(n);if((u||!u&&!s)&&((_t(n)!=="body"||Nt(r))&&(a=Et(n)),Q(n))){const d=Z(n);f=rt(n),c.x=d.x+n.clientLeft,c.y=d.y+n.clientTop}const m=r&&!u&&!s?Be(r,a):X(0);return{width:o.width*f.x,height:o.height*f.y,x:o.x*f.x-a.scrollLeft*f.x+c.x+m.x,y:o.y*f.y-a.scrollTop*f.y+c.y+m.y}}function kn(t){return Array.from(t.getClientRects())}function $n(t){const e=J(t),o=Et(t),n=t.ownerDocument.body,i=z(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=z(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+Pt(t);const l=-o.scrollTop;return q(n).direction==="rtl"&&(r+=z(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:r,y:l}}const Re=25;function Bn(t,e){const o=K(t),n=J(t),i=o.visualViewport;let s=n.clientWidth,r=n.clientHeight,l=0,a=0;if(i){s=i.width,r=i.height;const c=Me();(!c||c&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}const f=Pt(n);if(f<=0){const c=n.ownerDocument,u=c.body,m=getComputedStyle(u),d=c.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-d);g<=Re&&(s-=g)}else f<=Re&&(s+=f);return{width:s,height:r,x:l,y:a}}const Hn=new Set(["absolute","fixed"]);function Wn(t,e){const o=Z(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,s=Q(t)?rt(t):X(1),r=t.clientWidth*s.x,l=t.clientHeight*s.y,a=i*s.x,f=n*s.y;return{width:r,height:l,x:a,y:f}}function Ae(t,e,o){let n;if(e==="viewport")n=Bn(t,o);else if(e==="document")n=$n(J(t));else if($(e))n=Wn(e,o);else{const i=$e(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ot(n)}function He(t,e){const o=dt(t);return o===e||!$(o)||Rt(o)?!1:q(o).position==="fixed"||He(o,e)}function Vn(t,e){const o=e.get(t);if(o)return o;let n=Wt(t,[],!1).filter(l=>$(l)&&_t(l)!=="body"),i=null;const s=q(t).position==="fixed";let r=s?dt(t):t;for(;$(r)&&!Rt(r);){const l=q(r),a=Te(r);!a&&l.position==="fixed"&&(i=null),(s?!a&&!i:!a&&l.position==="static"&&!!i&&Hn.has(i.position)||Nt(r)&&!a&&He(t,r))?n=n.filter(c=>c!==r):i=l,r=dt(r)}return e.set(t,n),n}function In(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const r=[...o==="clippingAncestors"?zt(e)?[]:Vn(e,this._c):[].concat(o),n],l=r[0],a=r.reduce((f,c)=>{const u=Ae(e,c,i);return f.top=z(u.top,f.top),f.right=ct(u.right,f.right),f.bottom=ct(u.bottom,f.bottom),f.left=z(u.left,f.left),f},Ae(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function zn(t){const{width:e,height:o}=ke(t);return{width:e,height:o}}function _n(t,e,o){const n=Q(e),i=J(e),s=o==="fixed",r=Z(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const a=X(0);function f(){a.x=Pt(i)}if(n||!n&&!s)if((_t(e)!=="body"||Nt(i))&&(l=Et(e)),n){const d=Z(e,!0,s,e);a.x=d.x+e.clientLeft,a.y=d.y+e.clientTop}else i&&f();s&&!n&&i&&f();const c=i&&!n&&!s?Be(i,l):X(0),u=r.left+l.scrollLeft-a.x-c.x,m=r.top+l.scrollTop-a.y-c.y;return{x:u,y:m,width:r.width,height:r.height}}function Bt(t){return q(t).position==="static"}function Se(t,e){if(!Q(t)||q(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return J(t)===o&&(o=o.ownerDocument.body),o}function We(t,e){const o=K(t);if(zt(t))return o;if(!Q(t)){let i=dt(t);for(;i&&!Rt(i);){if($(i)&&!Bt(i))return i;i=dt(i)}return o}let n=Se(t,e);for(;n&&sn(n)&&Bt(n);)n=Se(n,e);return n&&Rt(n)&&Bt(n)&&!Te(n)?o:n||rn(t)||o}const Nn=async function(t){const e=this.getOffsetParent||We,o=this.getDimensions,n=await o(t.floating);return{reference:_n(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Yn(t){return q(t).direction==="rtl"}const jn={convertOffsetParentRelativeRectToViewportRelativeRect:Fn,getDocumentElement:J,getClippingRect:In,getOffsetParent:We,getElementRects:Nn,getClientRects:kn,getDimensions:zn,getScale:rt,isElement:$,isRTL:Yn};function Ve(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Xn(t,e){let o=null,n;const i=J(t);function s(){var l;clearTimeout(n),(l=o)==null||l.disconnect(),o=null}function r(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),s();const f=t.getBoundingClientRect(),{left:c,top:u,width:m,height:d}=f;if(l||e(),!m||!d)return;const g=yt(u),h=yt(i.clientWidth-(c+m)),x=yt(i.clientHeight-(u+d)),w=yt(c),v={rootMargin:-g+"px "+-h+"px "+-x+"px "+-w+"px",threshold:z(0,ct(1,a))||1};let A=!0;function R(C){const b=C[0].intersectionRatio;if(b!==a){if(!A)return r();b?r(!1,b):n=setTimeout(()=>{r(!1,1e-7)},1e3)}b===1&&!Ve(f,t.getBoundingClientRect())&&r(),A=!1}try{o=new IntersectionObserver(R,{...v,root:i.ownerDocument})}catch{o=new IntersectionObserver(R,v)}o.observe(t)}return r(!0),s}function Oe(t,e,o,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=n,f=qt(t),c=i||s?[...f?Wt(f):[],...Wt(e)]:[];c.forEach(w=>{i&&w.addEventListener("scroll",o,{passive:!0}),s&&w.addEventListener("resize",o)});const u=f&&l?Xn(f,o):null;let m=-1,d=null;r&&(d=new ResizeObserver(w=>{let[y]=w;y&&y.target===f&&d&&(d.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(e)})),o()}),f&&!a&&d.observe(f),d.observe(e));let g,h=a?Z(t):null;a&&x();function x(){const w=Z(t);h&&!Ve(h,w)&&o(),h=w,g=requestAnimationFrame(x)}return o(),()=>{var w;c.forEach(y=>{i&&y.removeEventListener("scroll",o),s&&y.removeEventListener("resize",o)}),u?.(),(w=d)==null||w.disconnect(),d=null,a&&cancelAnimationFrame(g)}}const qn=En,Un=Pn,Jn=Sn,Kn=Mn,Qn=On,Gn=Dn,Zn=(t,e,o)=>{const n=new Map,i={platform:jn,...o},s={...i.platform,_c:n};return An(t,e,{...i,platform:s})};var to=typeof document<"u",eo=function(){},bt=to?S.useLayoutEffect:eo;function Ct(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let o,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!==e.length)return!1;for(n=o;n--!==0;)if(!Ct(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),o=i.length,o!==Object.keys(e).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=o;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!Ct(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function Ie(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ce(t,e){const o=Ie(t);return Math.round(e*o)/o}function Ht(t){const e=S.useRef(t);return bt(()=>{e.current=t}),e}function no(t){t===void 0&&(t={});const{placement:e="bottom",strategy:o="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:r}={},transform:l=!0,whileElementsMounted:a,open:f}=t,[c,u]=S.useState({x:0,y:0,strategy:o,placement:e,middlewareData:{},isPositioned:!1}),[m,d]=S.useState(n);Ct(m,n)||d(n);const[g,h]=S.useState(null),[x,w]=S.useState(null),y=S.useCallback(p=>{p!==C.current&&(C.current=p,h(p))},[]),v=S.useCallback(p=>{p!==b.current&&(b.current=p,w(p))},[]),A=s||g,R=r||x,C=S.useRef(null),b=S.useRef(null),O=S.useRef(c),I=a!=null,L=Ht(a),B=Ht(i),H=Ht(f),P=S.useCallback(()=>{if(!C.current||!b.current)return;const p={placement:e,strategy:o,middleware:m};B.current&&(p.platform=B.current),Zn(C.current,b.current,p).then(E=>{const Y={...E,isPositioned:H.current!==!1};k.current&&!Ct(O.current,Y)&&(O.current=Y,Qe.flushSync(()=>{u(Y)}))})},[m,e,o,B,H]);bt(()=>{f===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,u(p=>({...p,isPositioned:!1})))},[f]);const k=S.useRef(!1);bt(()=>(k.current=!0,()=>{k.current=!1}),[]),bt(()=>{if(A&&(C.current=A),R&&(b.current=R),A&&R){if(L.current)return L.current(A,R,P);P()}},[A,R,P,L,I]);const D=S.useMemo(()=>({reference:C,floating:b,setReference:y,setFloating:v}),[y,v]),M=S.useMemo(()=>({reference:A,floating:R}),[A,R]),F=S.useMemo(()=>{const p={position:o,left:0,top:0};if(!M.floating)return p;const E=Ce(M.floating,c.x),Y=Ce(M.floating,c.y);return l?{...p,transform:"translate("+E+"px, "+Y+"px)",...Ie(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:E,top:Y}},[o,l,M.floating,c.x,c.y]);return S.useMemo(()=>({...c,update:P,refs:D,elements:M,floatingStyles:F}),[c,P,D,M,F])}const oo=(t,e)=>({...qn(t),options:[t,e]}),io=(t,e)=>({...Un(t),options:[t,e]}),so=(t,e)=>({...Gn(t),options:[t,e]}),ro=(t,e)=>({...Jn(t),options:[t,e]}),co=(t,e)=>({...Kn(t),options:[t,e]}),lo=(t,e)=>({...Qn(t),options:[t,e]});function ao(t){const{open:e=!1,onOpenChange:o,elements:n={}}=t,i=Ge(),s=Ze()!=null,r=cn(()=>new tn({open:e,onOpenChange:o,referenceElement:n.reference??null,floatingElement:n.floating??null,triggerElements:n.triggers??new en,floatingId:i,nested:s,noEmit:t.noEmit||!1})).current;return st(()=>{const l={open:e,floatingId:i};n.reference!==void 0&&(l.referenceElement=n.reference,l.domReferenceElement=$(n.reference)?n.reference:null),n.floating!==void 0&&(l.floatingElement=n.floating),r.update(l)},[e,i,n.reference,n.floating,r]),r.context.onOpenChange=o,r.context.nested=s,r.context.noEmit=t.noEmit||!1,r}function fo(t={}){const{nodeId:e,externalTree:o}=t,n=ao(t),i=t.rootContext||n,s={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[r,l]=S.useState(null),a=S.useRef(null),f=nn(o);st(()=>{s.domReference&&(a.current=s.domReference)},[s.domReference]);const c=no({...t,elements:{...s,...r&&{reference:r}}}),u=S.useCallback(b=>{const O=$(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;l(O),c.refs.setReference(O)},[c.refs]),[m,d]=S.useState(null),[g,h]=S.useState(null);i.useSyncedValue("referenceElement",m),i.useSyncedValue("domReferenceElement",$(m)?m:null),i.useSyncedValue("floatingElement",g);const x=S.useCallback(b=>{($(b)||b===null)&&(a.current=b,d(b)),($(c.refs.reference.current)||c.refs.reference.current===null||b!==null&&!$(b))&&c.refs.setReference(b)},[c.refs,d]),w=S.useCallback(b=>{h(b),c.refs.setFloating(b)},[c.refs]),y=S.useMemo(()=>({...c.refs,setReference:x,setFloating:w,setPositionReference:u,domReference:a}),[c.refs,x,w,u]),v=S.useMemo(()=>({...c.elements,domReference:s.domReference}),[c.elements,s.domReference]),A=i.useState("open"),R=i.useState("floatingId"),C=S.useMemo(()=>({...c,dataRef:i.context.dataRef,open:A,onOpenChange:i.setOpen,events:i.context.events,floatingId:R,refs:y,elements:v,nodeId:e,rootStore:i}),[c,y,v,e,i,A,R]);return st(()=>{i.context.dataRef.current.floatingContext=C;const b=f?.nodesRef.current.find(O=>O.id===e);b&&(b.context=C)}),S.useMemo(()=>({...c,context:C,refs:y,elements:v,rootStore:i}),[c,y,v,C,i])}const uo=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:n,placement:i,rects:s,platform:r,elements:l,middlewareData:a}=e,{element:f,padding:c=0,offsetParent:u="real"}=U(t,e)||{};if(f==null)return{};const m=Le(c),d={x:o,y:n},g=Xt(i),h=jt(g),x=await r.getDimensions(f),w=g==="y",y=w?"top":"left",v=w?"bottom":"right",A=w?"clientHeight":"clientWidth",R=s.reference[h]+s.reference[g]-d[g]-s.floating[h],C=d[g]-s.reference[g],b=u==="real"?await r.getOffsetParent?.(f):l.floating;let O=l.floating[A]||s.floating[h];(!O||!await r.isElement?.(b))&&(O=l.floating[A]||s.floating[h]);const I=R/2-C/2,L=O/2-x[h]/2-1,B=Math.min(m[y],L),H=Math.min(m[v],L),P=B,k=O-x[h]-H,D=O/2-x[h]/2+I,M=Vt(P,D,k),F=!a.arrow&&G(i)!=null&&D!==M&&s.reference[h]/2-(D<P?B:H)-x[h]/2<0,p=F?D<P?D-P:D-k:0;return{[g]:d[g]+p,data:{[g]:M,centerOffset:D-M-p,...F&&{alignmentOffset:p}},reset:F}}}),go=(t,e)=>({...uo(t),options:[t,e]}),mo={name:"hide",async fn(t){const{width:e,height:o,x:n,y:i}=t.rects.reference,s=e===0&&o===0&&n===0&&i===0;return{data:{referenceHidden:(await lo().fn(t)).data?.referenceHidden||s}}}},vt={sideX:"left",sideY:"top"},bo={name:"adaptiveOrigin",async fn(t){const{x:e,y:o,rects:{floating:n},elements:{floating:i},platform:s,strategy:r,placement:l}=t,a=K(i),f=a.getComputedStyle(i);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:e,y:o,data:vt};const u=await s.getOffsetParent?.(i);let m={width:0,height:0};if(r==="fixed"&&a?.visualViewport)m={width:a.visualViewport.width,height:a.visualViewport.height};else if(u===a){const y=De(i);m={width:y.documentElement.clientWidth,height:y.documentElement.clientHeight}}else await s.isElement?.(u)&&(m=await s.getDimensions(u));const d=V(l);let g=e,h=o;d==="left"&&(g=m.width-(e+n.width)),d==="top"&&(h=m.height-(o+n.height));const x=d==="left"?"right":vt.sideX,w=d==="top"?"bottom":vt.sideY;return{x:g,y:h,data:{sideX:x,sideY:w}}}};function ze(t,e,o){const n=t==="inline-start"||t==="inline-end";return{top:"top",right:n?o?"inline-start":"inline-end":"right",bottom:"bottom",left:n?o?"inline-end":"inline-start":"left"}[e]}function Ee(t,e,o){const{rects:n,placement:i}=t;return{side:ze(e,V(i),o),align:G(i)||"center",anchor:{width:n.reference.width,height:n.reference.height},positioner:{width:n.floating.width,height:n.floating.height}}}function vo(t){const{anchor:e,positionMethod:o="absolute",side:n="bottom",sideOffset:i=0,align:s="center",alignOffset:r=0,collisionBoundary:l,collisionPadding:a=5,sticky:f=!1,arrowPadding:c=5,disableAnchorTracking:u=!1,keepMounted:m=!1,floatingRootContext:d,mounted:g,collisionAvoidance:h,shiftCrossAxis:x=!1,nodeId:w,adaptiveOrigin:y,lazyFlip:v=!1,externalTree:A}=t,[R,C]=S.useState(null);!g&&R!==null&&C(null);const b=h.side||"flip",O=h.align||"flip",I=h.fallbackAxisSide||"end",L=typeof e=="function"?e:void 0,B=ln(L),H=L?B:e,P=$t(e),D=un()==="rtl",M=R||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":D?"left":"right","inline-start":D?"right":"left"}[n],F=s==="center"?M:`${M}-${s}`;let p=a;const E=1,Y=n==="bottom"?E:0,Ut=n==="top"?E:0,Jt=n==="right"?E:0,Kt=n==="left"?E:0;typeof p=="number"?p={top:p+Y,right:p+Kt,bottom:p+Ut,left:p+Jt}:p&&(p={top:(p.top||0)+Y,right:(p.right||0)+Kt,bottom:(p.bottom||0)+Ut,left:(p.left||0)+Jt});const mt={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:p},tt=S.useRef(null),Dt=$t(i),Mt=$t(r),ht=[oo(T=>{const W=Ee(T,n,D),j=typeof Dt.current=="function"?Dt.current(W):Dt.current,_=typeof Mt.current=="function"?Mt.current(W):Mt.current;return{mainAxis:j,crossAxis:_,alignmentAxis:_}},[typeof i!="function"?i:0,typeof r!="function"?r:0,D,n])],Qt=O==="none"&&b!=="shift",Gt=!Qt&&(f||x||b==="shift"),Zt=b==="none"?null:ro({...mt,padding:{top:p.top+E,right:p.right+E,bottom:p.bottom+E,left:p.left+E},mainAxis:!x&&b==="flip",crossAxis:O==="flip"?"alignment":!1,fallbackAxisSideDirection:I}),te=Qt?null:io(T=>{const W=De(T.elements.floating).documentElement;return{...mt,rootBoundary:x?{x:0,y:0,width:W.clientWidth,height:W.clientHeight}:void 0,mainAxis:O!=="none",crossAxis:Gt,limiter:f||x?void 0:so(j=>{if(!tt.current)return{};const{width:_,height:ot}=tt.current.getBoundingClientRect(),it=N(V(j.placement)),wt=it==="y"?_:ot,Ft=it==="y"?p.left+p.right:p.top+p.bottom;return{offset:wt/2+Ft/2}})}},[mt,f,x,p,O]);b==="shift"||O==="shift"||s==="center"?ht.push(te,Zt):ht.push(Zt,te),ht.push(co({...mt,apply({elements:{floating:T},rects:{reference:W},availableWidth:j,availableHeight:_}){Object.entries({"--available-width":`${j}px`,"--available-height":`${_}px`,"--anchor-width":`${W.width}px`,"--anchor-height":`${W.height}px`}).forEach(([ot,it])=>{T.style.setProperty(ot,it)})}}),go(()=>({element:tt.current||document.createElement("div"),padding:c,offsetParent:"floating"}),[c]),{name:"transformOrigin",fn(T){const{elements:W,middlewareData:j,placement:_,rects:ot,y:it}=T,wt=V(_),Ft=N(wt),me=tt.current,_e=j.arrow?.x||0,Ne=j.arrow?.y||0,Ye=me?.clientWidth||0,je=me?.clientHeight||0,kt=_e+Ye/2,he=Ne+je/2,Xe=Math.abs(j.shift?.y||0),qe=ot.reference.height/2,ut=typeof i=="function"?i(Ee(T,n,D)):i,Ue=Xe>ut,Je={top:`${kt}px calc(100% + ${ut}px)`,bottom:`${kt}px ${-ut}px`,left:`calc(100% + ${ut}px) ${he}px`,right:`${-ut}px ${he}px`}[wt],Ke=`${kt}px ${ot.reference.y+qe-it}px`;return W.floating.style.setProperty("--transform-origin",Gt&&Ft==="y"&&Ue?Ke:Je),{}}},mo,y),st(()=>{!g&&d&&d.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[g,d]);const Tt=S.useMemo(()=>({elementResize:!u&&typeof ResizeObserver<"u",layoutShift:!u&&typeof IntersectionObserver<"u"}),[u]),{refs:et,elements:lt,x:ee,y:ne,middlewareData:nt,update:pt,placement:oe,context:ie,isPositioned:at,floatingStyles:se}=fo({rootContext:d,placement:F,middleware:ht,strategy:o,whileElementsMounted:m?void 0:(...T)=>Oe(...T,Tt),nodeId:w,externalTree:A}),{sideX:re,sideY:ce}=nt.adaptiveOrigin||vt,Lt=at?o:"fixed",le=S.useMemo(()=>y?{position:Lt,[re]:ee,[ce]:ne}:{position:Lt,...se},[y,Lt,re,ee,ce,ne,se]),xt=S.useRef(null);st(()=>{if(!g)return;const T=P.current,W=typeof T=="function"?T():T,_=(Pe(W)?W.current:W)||null||null;_!==xt.current&&(et.setPositionReference(_),xt.current=_)},[g,et,H,P]),S.useEffect(()=>{if(!g)return;const T=P.current;typeof T!="function"&&Pe(T)&&T.current!==xt.current&&(et.setPositionReference(T.current),xt.current=T.current)},[g,et,H,P]),S.useEffect(()=>{if(m&&g&<.domReference&<.floating)return Oe(lt.domReference,lt.floating,pt,Tt)},[m,g,lt,pt,Tt]);const ft=V(oe),ae=ze(n,ft,D),fe=G(oe)||"center",ue=!!nt.hide?.referenceHidden;st(()=>{v&&g&&at&&C(ft)},[v,g,at,ft]);const de=S.useMemo(()=>({position:"absolute",top:nt.arrow?.y,left:nt.arrow?.x}),[nt.arrow]),ge=nt.arrow?.centerOffset!==0;return S.useMemo(()=>({positionerStyles:le,arrowStyles:de,arrowRef:tt,arrowUncentered:ge,side:ae,align:fe,physicalSide:ft,anchorHidden:ue,refs:et,context:ie,isPositioned:at,update:pt}),[le,de,tt,ge,ae,fe,ft,ue,et,ie,at,pt])}function Pe(t){return t!=null&&"current"in t}function Ro(t){return t==="starting"?on:an}export{bo as a,un as b,ao as c,yt as f,Ro as g,At as r,vo as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as V,a as F,u as G,b as P,d as M,r as W,e as q,j as a,L as H,I as B,S as J}from"./index-FrTQ7TcS.js";import{w as K,b as O,C as Q,c as X,B as Y,h as L,H as Z,a as ee,g as ae}from"./area.css-CSjofvHM.js";import{B as se}from"./button-CMZqhyXB.js";import{T as te,a as le,b as $,c as z,d as ie,e as A}from"./table-DggTSlPh.js";import{u as re}from"./useConfigList-CAf01_dV.js";import{f as ne}from"./formatDistance-Bok3-MB1.js";import{C as oe}from"./chevron-right-fMWRsRLZ.js";import{C as ce}from"./check-D9E8RKB4.js";import{C as de}from"./copy-DADLeZ69.js";/* empty css */import"./useButton-CsZ8hBM8.js";import"./en-US-C8ut0f5H.js";var me="_1xlxh5s0",xe="_1xlxh5s1",he="_1xlxh5s2",fe="_1xlxh5s3",pe="_1xlxh5s5 _1xlxh5s4 _1lg22bks0 _1lg22bksf _1lg22bktu",be=V({defaultClassName:"_1xlxh5s6",variantClassNames:{variant:{primary:"_1xlxh5s7"}},defaultVariants:{},compoundVariants:[]}),ue="_1xlxh5s9 _1xlxh5s8 _1lg22bkvx",E="_1xlxh5sb _1xlxh5sa _1lg22bkw0",je="_1xlxh5sc",_e="_1xlxh5se _1xlxh5sd _1lg22bkux _1lg22bkj3 _1lg22bkw0",ve="_1xlxh5sf",ge="_1xlxh5sg";function Ee(){const e=F.c(44),{toggleSidebar:s}=G(),r=P(),b=M(),{data:T}=re(),[u,R]=W.useState(!1),U=typeof window<"u"?`${window.location.origin}${window.bootstrapData?.basePath==="/"?"":window.bootstrapData?.basePath||""}/api/genai/v1`:"/api/genai/v1";let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=async()=>{await navigator.clipboard.writeText(U),R(!0),setTimeout(()=>R(!1),2e3)},e[0]=j):j=e[0];const I=j;let t,l,n,o,i;if(e[1]!==T||e[2]!==u||e[3]!==r||e[4]!==b||e[5]!==s){const k=T?.slice().sort(we).slice(0,3);let v;e[11]!==r?(v=r.filter(Ne).map(Ce),e[11]=r,e[12]=v):v=e[12];const D=v;let m;e[13]!==s?(m=()=>{s()},e[13]=s,e[14]=m):m=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx(B,{icon:Q}),e[15]=g):g=e[15];let x;e[16]!==m?(x=a.jsx(se,{onClick:m,size:"icon",variant:"ghost",scheme:"gray",children:g}),e[16]=m,e[17]=x):x=e[17];let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=a.jsx(B,{icon:oe,className:X}),e[18]=C):C=e[18];let h;e[19]!==D?(h=a.jsx(Y,{items:D}),e[19]=D,e[20]=h):h=e[20];let f;e[21]!==h||e[22]!==x?(f=a.jsxs("div",{className:L,children:[x,C,h]}),e[21]=h,e[22]=x,e[23]=f):f=e[23];let N,w;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=a.jsx("span",{className:_e,children:"Base URL"}),w=a.jsx("span",{className:ve,children:U}),e[24]=N,e[25]=w):(N=e[24],w=e[25]);let p;e[26]!==u?(p=a.jsx("div",{className:L,children:a.jsxs("div",{className:je,children:[N,w,a.jsx("button",{type:"button",className:ge,onClick:I,"aria-label":"Copy base URL",children:u?a.jsx(ce,{size:14}):a.jsx(de,{size:14})})]})}),e[26]=u,e[27]=p):p=e[27],e[28]!==f||e[29]!==p?(i=a.jsxs(Z,{className:ee,children:[f,p]}),e[28]=f,e[29]=p,e[30]=i):i=e[30],o=ae,e[31]===Symbol.for("react.memo_cache_sentinel")?(t=q(K,me),e[31]=t):t=e[31];let y;e[32]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx("h2",{className:E,children:"Get Started"}),e[32]=y):y=e[32],e[33]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsxs("div",{className:xe,children:[y,a.jsx("div",{className:pe,children:a.jsxs(H,{to:"/configs/$id",params:{id:"new"},className:be({variant:"primary"}),children:[a.jsx(B,{icon:J,size:"lg"}),a.jsx("span",{className:ue,children:"Create New Config"})]})})]}),e[33]=l):l=e[33],n=k&&k.length>0&&a.jsxs("div",{className:he,children:[a.jsx("h2",{className:E,children:"Recent"}),a.jsx("div",{className:fe,children:a.jsxs(te,{children:[a.jsx(le,{children:a.jsxs($,{children:[a.jsx(z,{children:"Name"}),a.jsx(z,{children:"Updated"})]})}),a.jsx(ie,{children:k.map(S=>a.jsxs($,{interactive:!0,onClick:()=>b({to:"/configs/$id",params:{id:S.id}}),children:[a.jsx(A,{children:S.name}),a.jsx(A,{children:ne(new Date(S.updatedAt),new Date,{addSuffix:!0})})]},S.id))})]})})]}),e[1]=T,e[2]=u,e[3]=r,e[4]=b,e[5]=s,e[6]=t,e[7]=l,e[8]=n,e[9]=o,e[10]=i}else t=e[6],l=e[7],n=e[8],o=e[9],i=e[10];let c;e[34]!==t||e[35]!==l||e[36]!==n?(c=a.jsxs("div",{className:t,children:[l,n]}),e[34]=t,e[35]=l,e[36]=n,e[37]=c):c=e[37];let d;e[38]!==o||e[39]!==c?(d=a.jsx("div",{className:o,children:c}),e[38]=o,e[39]=c,e[40]=d):d=e[40];let _;return e[41]!==i||e[42]!==d?(_=a.jsxs(a.Fragment,{children:[i,d]}),e[41]=i,e[42]=d,e[43]=_):_=e[43],_}function Ce(e){const s=e.loaderData?.title,r=e.staticData.customData?.title,b=s??r;return{key:e.id,label:a.jsx(H,{to:e.pathname,className:O,children:b}),prefix:e.staticData.customData?.icon}}function Ne(e){return!!e.staticData.customData?.title||!!e.loaderData?.title}function we(e,s){return new Date(s.updatedAt).getTime()-new Date(e.updatedAt).getTime()}export{Ee as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o,j as s,s as i,N as r}from"./index-FrTQ7TcS.js";import{n as c,a as l,S as m,l as f,b as g}from"./llmops-CdOQq40D.js";/* empty css */const h=()=>{const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:c,children:s.jsxs("div",{className:l,children:[s.jsx(m,{style:{height:128,width:128},className:f()}),s.jsx("div",{children:s.jsx("h2",{className:g,children:"Create a new config by naming the config above."})})]})}),e[0]=t):t=e[0],t};function u(){const e=o.c(3),{id:t}=i.useParams();if(t==="new"){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(h,{}),e[0]=n):n=e[0],n}let a;return e[1]!==t?(a=s.jsx(r,{to:"/configs/$id/variants",params:{id:t},replace:!0}),e[1]=t,e[2]=a):a=e[2],a}export{u as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,j as n,R as r,N as i}from"./index-FrTQ7TcS.js";import{n as m,a as c,S as l,l as f,b as h}from"./llmops-CdOQq40D.js";/* empty css */const p=()=>{const e=a.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx("div",{className:m,children:n.jsxs("div",{className:c,children:[n.jsx(l,{style:{height:128,width:128},className:f()}),n.jsx("div",{children:n.jsx("h2",{className:h,children:"Create a new environment by naming the environment above."})})]})}),e[0]=t):t=e[0],t};function d(){const e=a.c(3),{environment:t}=r.useParams();if(t==="new"){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(p,{}),e[0]=o):o=e[0],o}let s;return e[1]!==t?(s=n.jsx(i,{to:"/environments/$environment/secrets",params:{environment:t},replace:!0}),e[1]=t,e[2]=s):s=e[2],s}export{d as component};
|