@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"./index-FrTQ7TcS.js";var o="i5n19u0",a="i5n19u1";export{a,o as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._6nggtl0{--ghost-body: var(--tyy9ow1v);--ghost-eyes: var(--tyy9ow1k)}._6nggtl1{--ghost-body: var(--tyy9ow1k);--ghost-eyes: var(--tyy9ow1v)}._1rf6rl0{display:flex;flex-direction:column;align-items:center;justify-content:center;height:calc(100% - 3rem)}._1rf6rl1{display:flex;flex-direction:column;align-items:center;gap:1rem}._1rf6rl2{margin:0;color:var(--tyy9ow1t);font-weight:400;font-size:.875rem;text-align:center;max-width:240px;text-wrap:balance}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,r as e}from"./index-FrTQ7TcS.js";var l=a({defaultClassName:"_6nggtl0",variantClassNames:{invert:{true:"_6nggtl1"}},defaultVariants:{invert:!1},compoundVariants:[]}),n="_1rf6rl0",s="_1rf6rl1",o="_1rf6rl2";const i=t=>e.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 2000 2000",xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",...t},e.createElement("path",{d:"M500,2000L500,1050C500.705,750.116 682.618,600.065 1000,600C1332.431,602.05 1499.991,750.677 1500,1050L1500,2000L500,2000Z",fill:"var(--ghost-body, #000)"}),e.createElement("g",{transform:"matrix(1.5,0,0,0.8,-300,180)"},e.createElement("ellipse",{cx:750,cy:1025,rx:50,ry:125,fill:"var(--ghost-eyes, #fff)"})),e.createElement("g",{transform:"matrix(1.5,0,0,0.8,50,180)"},e.createElement("ellipse",{cx:750,cy:1025,rx:50,ry:125,fill:"var(--ghost-eyes, #fff)"})));export{i as S,s as a,o as b,l,n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as e}from"./index-FrTQ7TcS.js";const o=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],t=e("plus",o);export{t as P};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,x as D,j as g,a as J,e as pe}from"./index-FrTQ7TcS.js";import{u as de,a as fe,b as ge,I as me,i as he,F as Ce}from"./InternalBackdrop-Za9lpJi7.js";import{f as z,b as ve,d as Pe,c as Q,a as te,u as Te,j as xe}from"./useButton-CsZ8hBM8.js";import{R as be,P as Ee,T as Re,d as M,t as Y,f as W,h as Se,$ as Oe,K as X,a6 as Ie,N as ye,c as Z,m as Fe,k as Me,l as re,I as ke,o as je,Z as we,p as Ae,x as Ne,V as He,W as Be,X as Le,a as Ge,Y as _e,_ as oe,F as Ke,q as Ue,H as qe,a8 as Ve,r as ae,B as $e,s as ze,v as Ye}from"./popupStateMapping-DolkyTT3.js";import{p as De,c as We,a as Xe,b as Ze,u as Je,d as Qe}from"./useSyncedFloatingRootContext-BKbVh8Gq.js";import{u as et,C as tt}from"./useRole-CiSaVva3.js";import{u as ot,s as nt,b as st,a as rt}from"./usePopupAutoResize-D6RSlB-m.js";import{u as at,a as it,g as ie,b as ct}from"./getDisabledMountTransitionStyles-TZFYxPIU.js";const lt=s.createContext(void 0);function ut(n){return s.useContext(lt)}const ce=s.createContext(void 0);function V(n){const e=s.useContext(ce);if(e===void 0&&!n)throw new Error(z(47));return e}function pt(){return{...We(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0}}const dt={...De,disabled:M(n=>n.disabled),instantType:M(n=>n.instantType),openMethod:M(n=>n.openMethod),openChangeReason:M(n=>n.openChangeReason),modal:M(n=>n.modal),stickIfOpen:M(n=>n.stickIfOpen),titleElementId:M(n=>n.titleElementId),descriptionElementId:M(n=>n.descriptionElementId),openOnHover:M(n=>n.openOnHover),closeDelay:M(n=>n.closeDelay)};class ee extends be{constructor(e){const t={...pt(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:s.createRef(),backdropRef:s.createRef(),internalBackdropRef:s.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:s.createRef(),beforeContentFocusGuardRef:s.createRef(),stickIfOpenTimeout:new Re,triggerElements:new Ee},dt)}setOpen=(e,t)=>{const a=t.reason===Y,h=t.reason===W&&t.event.detail===0,i=!e&&(t.reason===Se||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;const p={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger};this.state.floatingRootContext.context.events?.emit("openchange",p);const o=()=>{const l={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(l.activeTriggerId=r,l.activeTriggerElement=t.trigger??null),this.update(l)};a?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(Oe,()=>{this.set("stickIfOpen",!1)}),D.flushSync(o)):o(),h||i?this.set("instantType",h?"click":"dismiss"):t.reason===X?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){const a=ve(()=>e??new ee(t)).current;return Ie(a.disposeEffect),a}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function ne({props:n}){const{children:e,open:t,defaultOpen:a=!1,onOpenChange:h,onOpenChangeComplete:i,modal:p=!1,handle:T,triggerId:o,defaultTriggerId:l=null}=n,r=ee.useStore(T?.store,{open:t??a,modal:p,activeTriggerId:o!==void 0?o:l});r.useControlledProp("open",t,a),r.useControlledProp("activeTriggerId",o,l);const m=r.useState("open"),d=r.useState("positionerElement"),v=r.useState("payload"),C=r.useState("openChangeReason");r.useContextCallback("onOpenChange",h),r.useContextCallback("onOpenChangeComplete",i);const{openMethod:c,triggerProps:x,reset:w}=de(m);Xe(r);const{forceUnmount:u}=Ze(m,r,()=>{r.update({stickIfOpen:!0,openChangeReason:null}),w()});fe(m&&p===!0&&C!==Y&&c!=="touch",d),s.useEffect(()=>{m||r.context.stickIfOpenTimeout.clear()},[r,m]);const k=s.useCallback(B=>{const O=Z(B);return O.preventUnmountOnClose=()=>{r.set("preventUnmountingOnClose",!0)},O},[r]),b=s.useCallback(()=>{r.setOpen(!1,k(Fe))},[r,k]);s.useImperativeHandle(n.actionsRef,()=>({unmount:u,close:b}),[u,b]);const y=Je({popupStore:r,onOpenChange:r.setOpen}),F=Me(y,{outsidePressEvent:{mouse:p==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),E=et(y),{getReferenceProps:A,getFloatingProps:j,getTriggerProps:S}=re([F,E]),L=s.useMemo(()=>A(x),[A,x]),N=s.useMemo(()=>S(x),[S,x]),G=s.useMemo(()=>j(),[j]);r.useSyncedValues({modal:p,openMethod:c,activeTriggerProps:L,inactiveTriggerProps:N,popupProps:G,floatingRootContext:y,nested:ke()!=null});const H=s.useMemo(()=>({store:r}),[r]);return g.jsx(ce.Provider,{value:H,children:typeof e=="function"?e({payload:v}):e})}function ft(n){return V(!0)?g.jsx(ne,{props:n}):g.jsx(ye,{children:g.jsx(ne,{props:n})})}const gt=300,se=s.forwardRef(function(e,t){const{render:a,className:h,disabled:i=!1,nativeButton:p=!0,handle:T,payload:o,openOnHover:l=!1,delay:r=gt,closeDelay:m=0,id:d,...v}=e,C=V(!0),c=T?.store??C?.store;if(!c)throw new Error(z(74));const x=je(d),w=c.useState("isTriggerActive",x),u=c.useState("floatingRootContext"),k=c.useState("isOpenedByTrigger",x),b=s.useRef(null),{registerTrigger:y,isMountedByThisTrigger:F}=Qe(x,b,c,{payload:o,disabled:i,openOnHover:l,closeDelay:m}),E=c.useState("openChangeReason"),A=c.useState("stickIfOpen"),j=c.useState("openMethod"),S=ot(u,{enabled:u!=null&&l&&(j!=="touch"||E!==W),mouseOnly:!0,move:!1,handleClose:nt(),restMs:r,delay:{close:m},triggerElementRef:b,isActiveTrigger:w}),L=ge(u,{enabled:u!=null,stickIfOpen:A}),N=re([L]),G=c.useState("triggerProps",F),H=s.useMemo(()=>({disabled:i,open:k}),[i,k]),{getButtonProps:B,buttonRef:O}=Pe({disabled:i,native:p}),K=s.useMemo(()=>({open(f){return f&&E===W?we.open(f):Ae.open(f)}}),[E]),R=Q("button",e,{state:H,ref:[O,t,y,b],props:[N.getReferenceProps(),S,G,{[Ne]:"",id:x},v,B],stateAttributesMapping:K}),_=s.useRef(null),U=te(f=>{D.flushSync(()=>{c.setOpen(!1,Z(X,f.nativeEvent,f.currentTarget))}),He(_.current)?.focus()}),q=te(f=>{const P=c.select("positionerElement");if(P&&Be(f,P))c.context.beforeContentFocusGuardRef.current?.focus();else{D.flushSync(()=>{c.setOpen(!1,Z(X,f.nativeEvent,f.currentTarget))});let I=Le(b.current);for(;I!==null&&Ge(P,I)||I?.hasAttribute("aria-hidden");){const $=I;if(I=_e(I),I===$)break}I?.focus()}});return w?g.jsxs(s.Fragment,{children:[g.jsx(oe,{ref:_,onFocus:U}),g.jsx(s.Fragment,{children:R},x),g.jsx(oe,{ref:c.context.triggerFocusTargetRef,onFocus:q})]}):g.jsx(s.Fragment,{children:R},x)}),le=s.createContext(void 0);function mt(){const n=s.useContext(le);if(n===void 0)throw new Error(z(45));return n}const ht=s.forwardRef(function(e,t){const{keepMounted:a=!1,...h}=e,{store:i}=V();return i.useState("mounted")||a?g.jsx(le.Provider,{value:a,children:g.jsx(Ke,{ref:t,...h,renderGuards:!1})}):null}),ue=s.createContext(void 0);function Ct(){const n=s.useContext(ue);if(!n)throw new Error(z(46));return n}const vt=s.forwardRef(function(e,t){const{render:a,className:h,anchor:i,positionMethod:p="absolute",side:T="bottom",align:o="center",sideOffset:l=0,alignOffset:r=0,collisionBoundary:m="clipping-ancestors",collisionPadding:d=5,arrowPadding:v=5,sticky:C=!1,disableAnchorTracking:c=!1,collisionAvoidance:x=Ue,...w}=e,{store:u}=V(),k=mt(),b=qe(),y=u.useState("floatingRootContext"),F=u.useState("mounted"),E=u.useState("open"),A=u.useState("openChangeReason"),j=u.useState("activeTriggerElement"),S=u.useState("modal"),L=u.useState("positionerElement"),N=u.useState("instantType"),G=u.useState("transitionStatus"),H=s.useRef(null),B=Ve(L,!1,!1),O=at({anchor:i,floatingRootContext:y,positionMethod:p,mounted:F,side:T,sideOffset:l,align:o,alignOffset:r,arrowPadding:v,collisionBoundary:m,collisionPadding:d,sticky:C,disableAnchorTracking:c,keepMounted:k,nodeId:b,collisionAvoidance:x,adaptiveOrigin:it}),K=s.useMemo(()=>{const P={};return E||(P.pointerEvents="none"),{role:"presentation",hidden:!F,style:{...O.positionerStyles,...P}}},[E,F,O.positionerStyles]),R=s.useMemo(()=>({props:K,...O}),[K,O]),_=y?.select("domReferenceElement");Te(()=>{const P=_,I=H.current;if(P&&(H.current=P),I&&P&&P!==I){u.set("instantType",void 0);const $=new AbortController;return B(()=>{u.set("instantType","trigger-change")},$.signal),()=>{$.abort()}}},[_,B,u]);const U=s.useMemo(()=>({open:E,side:R.side,align:R.align,anchorHidden:R.anchorHidden,instant:N}),[E,R.side,R.align,R.anchorHidden,N]),q=s.useCallback(P=>{u.set("positionerElement",P)},[u]),f=Q("div",e,{state:U,props:[R.props,ie(G),w],ref:[t,q],stateAttributesMapping:ae});return g.jsxs(ue.Provider,{value:R,children:[F&&S===!0&&A!==Y&&g.jsx(me,{ref:u.context.internalBackdropRef,inert:he(!E),cutout:j}),g.jsx($e,{id:b,children:f})]})}),Pt={...ae,...Ye},Tt=s.forwardRef(function(e,t){const{className:a,render:h,initialFocus:i,finalFocus:p,...T}=e,{store:o}=V(),l=Ct(),r=ut()!=null,m=ct(),d=o.useState("open"),v=o.useState("openMethod"),C=o.useState("instantType"),c=o.useState("transitionStatus"),x=o.useState("popupProps"),w=o.useState("titleElementId"),u=o.useState("descriptionElementId"),k=o.useState("modal"),b=o.useState("mounted"),y=o.useState("openChangeReason"),F=o.useState("popupElement"),E=o.useState("payload"),A=o.useState("positionerElement"),j=o.useState("activeTriggerElement"),S=o.useState("floatingRootContext");ze({open:d,ref:o.context.popupRef,onComplete(){d&&o.context.onOpenChangeComplete?.(!0)}});const L=o.useState("disabled"),N=o.useState("openOnHover"),G=o.useState("closeDelay");st(S,{enabled:N&&!L,closeDelay:G});function H(f){return f==="touch"?o.context.popupRef.current:!0}const B=i===void 0?H:i,O=s.useMemo(()=>({open:d,side:l.side,align:l.align,instant:C,transitionStatus:c}),[d,l.side,l.align,C,c]),K=s.useCallback(f=>{o.set("popupElement",f)},[o]);function R(){S.context.events.emit("measure-layout")}function _(f,P){S.context.events.emit("measure-layout-complete",{previousDimensions:f,nextDimensions:P})}const U=s.useCallback(()=>o.context.triggerElements.size>1,[o]);rt({popupElement:F,positionerElement:A,mounted:b,content:E,enabled:U,onMeasureLayout:R,onMeasureLayoutComplete:_,side:l.side,direction:m});const q=Q("div",e,{state:O,ref:[t,o.context.popupRef,K],props:[x,{"aria-labelledby":w,"aria-describedby":u,onKeyDown(f){r&&tt.has(f.key)&&f.stopPropagation()}},ie(c),T],stateAttributesMapping:Pt});return g.jsx(Ce,{context:S,openInteractionType:v,modal:k==="trap-focus",disabled:!b||y===Y,initialFocus:B,returnFocus:p,restoreFocus:"popup",previousFocusableElement:xe(j)?j:void 0,nextFocusableElement:o.context.triggerFocusTargetRef,beforeContentFocusGuardRef:o.context.beforeContentFocusGuardRef,children:q})});var xt="_1ffqjcq4",bt="_1ffqjcq5";function kt(n){const e=J.c(9),{children:t,open:a,defaultOpen:h,onOpenChange:i,modal:p,preventCloseOnNestedPortals:T}=n,o=p===void 0?!1:p,l=T===void 0?!0:T;let r;e[0]!==i||e[1]!==l?(r=(v,C)=>{if(!v&&l&&C.reason==="outside-press"&&C.event){const c=C.event.target;if(c?.closest("[data-open]")||c?.closest('[role="listbox"]')||c?.closest('[role="option"]')){C.cancel?.();return}}i?.(v)},e[0]=i,e[1]=l,e[2]=r):r=e[2];const m=r;let d;return e[3]!==t||e[4]!==h||e[5]!==m||e[6]!==o||e[7]!==a?(d=g.jsx(ft,{open:a,defaultOpen:h,onOpenChange:m,modal:o,children:t}),e[3]=t,e[4]=h,e[5]=m,e[6]=o,e[7]=a,e[8]=d):d=e[8],d}function jt(n){const e=J.c(6),{children:t,className:a,asChild:h}=n;if(h&&s.isValidElement(t)){let p;return e[0]!==t||e[1]!==a?(p=g.jsx(se,{render:t,className:a,children:t}),e[0]=t,e[1]=a,e[2]=p):p=e[2],p}let i;return e[3]!==t||e[4]!==a?(i=g.jsx(se,{className:a,children:t}),e[3]=t,e[4]=a,e[5]=i):i=e[5],i}function wt(n){const e=J.c(11),{children:t,className:a,sideOffset:h,align:i,side:p,positionMethod:T}=n,o=h===void 0?8:h,l=i===void 0?"center":i,r=p===void 0?"bottom":p,m=T===void 0?"absolute":T;let d;e[0]!==a?(d=pe(bt,a),e[0]=a,e[1]=d):d=e[1];let v;e[2]!==t||e[3]!==d?(v=g.jsx(Tt,{className:d,children:t}),e[2]=t,e[3]=d,e[4]=v):v=e[4];let C;return e[5]!==l||e[6]!==m||e[7]!==r||e[8]!==o||e[9]!==v?(C=g.jsx(ht,{children:g.jsx(vt,{className:xt,sideOffset:o,align:l,side:r,positionMethod:m,children:v})}),e[5]=l,e[6]=m,e[7]=r,e[8]=o,e[9]=v,e[10]=C):C=e[10],C}export{kt as P,jt as a,wt as b,ut as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{y as Nt,r as l,x as ue,j as D,aH as kt,w as Mt}from"./index-FrTQ7TcS.js";import{E as Ne,b as pe,a as g,u as P,j as Ze,C as Lt,D as Dt,c as Ft,n as H,k as Te,l as Vt,o as _t,p as Re,s as Kt,f as jt,B as Bt,N as qt}from"./useButton-CsZ8hBM8.js";import{a as Ht,l as Wt}from"./reselect-DVmmTZGf.js";const sr=500,ar=500,ir={style:{transition:"none"}},or="data-base-ui-click-trigger",cr={fallbackAxisSide:"none"},ur={fallbackAxisSide:"end"},Ut={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Yt="none",We="trigger-press",lr="trigger-hover",dr="trigger-focus",Gt="outside-press",fr="item-press",hr="close-press",pr="clear-press",gr="chip-remove-press",br="track-press",mr="input-change",Er="input-clear",$t="focus-out",Xt="escape-key",vr="list-navigation",Sr="keyboard",yr="drag",Tr="cancel-open",Rr="sibling-open",Ir="disabled",xr="imperative-action";function U(t,e,n,r){let s=!1,a=!1;const i=r??Ne;return{reason:t,event:e??new Event("base-ui"),cancel(){s=!0},allowPropagation(){a=!0},get isCanceled(){return s},get isPropagationAllowed(){return a},trigger:n,...i}}function wr(t,e,n){const r=n??Ne;return{reason:t,event:e??new Event("base-ui"),...r}}const zt={...Nt};let Ue=0;function Jt(t,e="mui"){const[n,r]=l.useState(t),s=t||n;return l.useEffect(()=>{n==null&&(Ue+=1,r(`${e}-${Ue}`))},[n,e]),s}const Ye=zt.useId;function ke(t,e){if(Ye!==void 0){const n=Ye();return t??(e?`${e}-${n}`:n)}return Jt(t,e)}function Cr(t){return ke(t,"base-ui")}const Zt=[];function Qe(t){l.useEffect(t,Zt)}const ae=null;class Qt{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)n[s]?.(e)};request(e){const n=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(e){const n=e-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const ie=new Qt;class k{static create(){return new k}static request(e){return ie.request(e)}static cancel(e){return ie.cancel(e)}currentId=ae;request(e){this.cancel(),this.currentId=ie.request(()=>{this.currentId=ae,e()})}cancel=()=>{this.currentId!==ae&&(ie.cancel(this.currentId),this.currentId=ae)};disposeEffect=()=>this.cancel}function en(){const t=pe(k.create).current;return Qe(t.disposeEffect),t}function tn(t){return t==null?t:"current"in t?t.current:t}function nn(t,e=!1,n=!0){const r=en();return g((s,a=null)=>{r.cancel();const i=tn(t);i!=null&&(typeof i.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?s():r.request(()=>{function u(){i&&Promise.all(i.getAnimations().map(f=>f.finished)).then(()=>{a!=null&&a.aborted||ue.flushSync(s)}).catch(()=>{if(n){if(a!=null&&a.aborted)return;ue.flushSync(s)}else i.getAnimations().length>0&&i.getAnimations().some(f=>f.pending||f.playState!=="finished")&&u()})}e?r.request(u):u()}))})}function Or(t,e=!1,n=!1){const[r,s]=l.useState(t&&e?"idle":void 0),[a,i]=l.useState(t);return t&&!a&&(i(!0),s("starting")),!t&&a&&r!=="ending"&&!n&&s("ending"),!t&&!a&&r==="ending"&&s(void 0),P(()=>{if(!t&&a&&r!=="ending"&&n){const u=k.request(()=>{s("ending")});return()=>{k.cancel(u)}}},[t,a,r,n]),P(()=>{if(!t||e)return;const u=k.request(()=>{s(void 0)});return()=>{k.cancel(u)}},[e,t]),P(()=>{if(!t||!e)return;t&&a&&r!=="idle"&&s("starting");const u=k.request(()=>{s("idle")});return()=>{k.cancel(u)}},[e,t,a,s,r]),l.useMemo(()=>({mounted:a,setMounted:i,transitionStatus:r}),[a,r])}let le=(function(t){return t.startingStyle="data-starting-style",t.endingStyle="data-ending-style",t})({});const rn={[le.startingStyle]:""},sn={[le.endingStyle]:""},Pr={transitionStatus(t){return t==="starting"?rn:t==="ending"?sn:null}},K=typeof navigator<"u",Ie=on(),et=un(),Me=cn(),Ar=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Nr=Ie.platform==="MacIntel"&&Ie.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Ie.platform),kr=K&&/firefox/i.test(Me),an=K&&/apple/i.test(navigator.vendor),we=K&&/android/i.test(et)||/android/i.test(Me),Mr=K&&et.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,tt=Me.includes("jsdom/");function on(){if(!K)return{platform:"",maxTouchPoints:-1};const t=navigator.userAgentData;return t?.platform?{platform:t.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function cn(){if(!K)return"";const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(({brand:e,version:n})=>`${e}/${n}`).join(" "):navigator.userAgent}function un(){if(!K)return"";const t=navigator.userAgentData;return t?.platform?t.platform:navigator.platform??""}const Ce="data-base-ui-focusable",nt="active",rt="selected",ln="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Lr="ArrowLeft",Dr="ArrowRight",Fr="ArrowUp",Vr="ArrowDown";function dn(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Q(t,e){if(!t||!e)return!1;const n=e.getRootNode?.();if(t.contains(e))return!0;if(n&&Lt(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function W(t){return"composedPath"in t?t.composedPath()[0]:t.target}function O(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function fn(t){return t.matches("html,body")}function Y(t){return t?.ownerDocument||document}function hn(t){return Ze(t)&&t.matches(ln)}function _r(t){return t?t.getAttribute("role")==="combobox"&&hn(t):!1}function Kr(t){if(!t||tt)return!0;try{return t.matches(":focus-visible")}catch{return!0}}function jr(t){return t?t.hasAttribute(Ce)?t:t.querySelector(`[${Ce}]`)||t:null}function ce(t,e,n=!0){return t.filter(s=>s.parentId===e&&(!n||s.context?.open)).flatMap(s=>[s,...ce(t,s.id,n)])}function Br(t,e){let n=[],r=t.find(s=>s.id===e)?.parentId;for(;r;){const s=t.find(a=>a.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function qr(t){t.preventDefault(),t.stopPropagation()}function pn(t){return"nativeEvent"in t}function Hr(t){return t.mozInputSource===0&&t.isTrusted?!0:we&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Wr(t){return tt?!1:!we&&t.width===0&&t.height===0||we&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0&&t.pointerType==="touch"}function Ur(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function gn(t){const e=t.type;return e==="click"||e==="mousedown"||e==="keydown"||e==="keyup"}var bn=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],de=bn.join(","),st=typeof Element>"u",G=st?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fe=!st&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},te=function(e,n){var r;n===void 0&&(n=!0);var s=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=s===""||s==="true",i=a||n&&e&&te(e.parentNode);return i},mn=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},at=function(e,n,r){if(te(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(de));return n&&G.call(e,de)&&s.unshift(e),s=s.filter(r),s},he=function(e,n,r){for(var s=[],a=Array.from(e);a.length;){var i=a.shift();if(!te(i,!1))if(i.tagName==="SLOT"){var u=i.assignedElements(),f=u.length?u:i.children,c=he(f,!0,r);r.flatten?s.push.apply(s,c):s.push({scopeParent:i,candidates:c})}else{var b=G.call(i,de);b&&r.filter(i)&&(n||!e.includes(i))&&s.push(i);var m=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),I=!te(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(m&&I){var v=he(m===!0?i.children:m.children,!0,r);r.flatten?s.push.apply(s,v):s.push({scopeParent:i,candidates:v})}else a.unshift.apply(a,i.children)}}return s},it=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ot=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||mn(e))&&!it(e)?0:e.tabIndex},En=function(e,n){var r=ot(e);return r<0&&n&&!it(e)?0:r},vn=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},ct=function(e){return e.tagName==="INPUT"},Sn=function(e){return ct(e)&&e.type==="hidden"},yn=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},Tn=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},Rn=function(e){if(!e.name)return!0;var n=e.form||fe(e),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(e.name));else try{s=r(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=Tn(s,e.form);return!a||a===e},In=function(e){return ct(e)&&e.type==="radio"},xn=function(e){return In(e)&&!Rn(e)},wn=function(e){var n,r=e&&fe(e),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==e){var i,u,f;for(a=!!((i=s)!==null&&i!==void 0&&(u=i.ownerDocument)!==null&&u!==void 0&&u.contains(s)||e!=null&&(f=e.ownerDocument)!==null&&f!==void 0&&f.contains(e));!a&&s;){var c,b,m;r=fe(s),s=(c=r)===null||c===void 0?void 0:c.host,a=!!((b=s)!==null&&b!==void 0&&(m=b.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},Ge=function(e){var n=e.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},Cn=function(e,n){var r=n.displayCheck,s=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var a=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(e).visibility==="hidden")return!0;var i=G.call(e,"details>summary:first-of-type"),u=i?e.parentElement:e;if(G.call(u,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var f=e;e;){var c=e.parentElement,b=fe(e);if(c&&!c.shadowRoot&&s(c)===!0)return Ge(e);e.assignedSlot?e=e.assignedSlot:!c&&b!==e.ownerDocument?e=b.host:e=c}e=f}if(wn(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ge(e);return!1},On=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var s=n.children.item(r);if(s.tagName==="LEGEND")return G.call(n,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}n=n.parentElement}return!1},Oe=function(e,n){return!(n.disabled||te(n)||Sn(n)||Cn(n,e)||yn(n)||On(n))},Pe=function(e,n){return!(xn(n)||ot(n)<0||!Oe(e,n))},Pn=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},ut=function(e){var n=[],r=[];return e.forEach(function(s,a){var i=!!s.scopeParent,u=i?s.scopeParent:s,f=En(u,i),c=i?ut(s.candidates):u;f===0?i?n.push.apply(n,c):n.push(u):r.push({documentOrder:a,tabIndex:f,item:s,isScope:i,content:c})}),r.sort(vn).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},Le=function(e,n){n=n||{};var r;return n.getShadowRoot?r=he([e],n.includeContainer,{filter:Pe.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Pn}):r=at(e,n.includeContainer,Pe.bind(null,n)),ut(r)},Yr=function(e,n){n=n||{};var r;return n.getShadowRoot?r=he([e],n.includeContainer,{filter:Oe.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=at(e,n.includeContainer,Oe.bind(null,n)),r},Gr=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return G.call(e,de)===!1?!1:Pe(n,e)};const De=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function lt(t,e){const n=Le(t,De()),r=n.length;if(r===0)return;const s=dn(Y(t)),a=n.indexOf(s),i=a===-1?e===1?0:r-1:a+e;return n[i]}function An(t){return lt(Y(t).body,1)||t}function Nn(t){return lt(Y(t).body,-1)||t}function dt(t,e){if(!t)return null;const n=Le(Y(t).body,De()),r=n.length;if(r===0)return null;const s=n.indexOf(t);if(s===-1)return null;const a=(s+e+r)%r;return n[a]}function $r(t){return dt(t,1)}function Xr(t){return dt(t,-1)}function xe(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!Q(n,r)}function kn(t){Le(t,De()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function $e(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Mn(t){const e=pe(Ln,t).current;return e.next=t,P(e.effect),e}function Ln(t){const e={current:t,next:t,effect:()=>{e.current=e.next}};return e}function zr(t){const{enabled:e=!0,open:n,ref:r,onComplete:s}=t,a=Mn(n),i=g(s),u=nn(r,n);l.useEffect(()=>{e&&u(()=>{n===a.current&&i()})},[e,n,i,u,a])}function Jr(t){return t?.ownerDocument||document}const J=0;class ge{static create(){return new ge}currentId=J;start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=J,n()},e)}isStarted(){return this.currentId!==J}clear=()=>{this.currentId!==J&&(clearTimeout(this.currentId),this.currentId=J)};disposeEffect=()=>this.clear}function Xe(){const t=pe(ge.create).current;return Qe(t.disposeEffect),t}function ft(){const t=new Map;return{emit(e,n){t.get(e)?.forEach(r=>r(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){t.get(e)?.delete(n)}}}class Dn{nodesRef={current:[]};events=ft();addNode(e){this.nodesRef.current.push(e)}removeNode(e){const n=this.nodesRef.current.findIndex(r=>r===e);n!==-1&&this.nodesRef.current.splice(n,1)}}const ht=l.createContext(null),pt=l.createContext(null),gt=()=>l.useContext(ht)?.id||null,bt=t=>{const e=l.useContext(pt);return t??e};function Zr(t){const e=ke(),n=bt(t),r=gt();return P(()=>{if(!e)return;const s={id:e,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,e,r]),e}function Qr(t){const{children:e,id:n}=t,r=gt();return D.jsx(ht.Provider,{value:l.useMemo(()=>({id:n,parentId:r}),[n,r]),children:e})}function es(t){const{children:e,externalTree:n}=t,r=pe(()=>n??new Dn).current;return D.jsx(pt.Provider,{value:r,children:e})}function mt(t){return`data-base-ui-${t}`}const Fn={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1},ze=l.forwardRef(function(e,n){const[r,s]=l.useState();P(()=>{an&&s("button")},[]);const a={tabIndex:0,role:r};return D.jsx("span",{...e,ref:n,style:Fn,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),Et=l.createContext(null),Vn=()=>l.useContext(Et),_n=mt("portal");function Kn(t={}){const{ref:e,container:n,componentProps:r=Ne,elementProps:s,elementState:a}=t,i=ke(),f=Vn()?.portalNode,[c,b]=l.useState(null),[m,I]=l.useState(null),v=l.useRef(null);P(()=>{if(n===null){v.current&&(v.current=null,I(null),b(null));return}if(i==null)return;const M=(n&&(Dt(n)?n:n.current))??f??document.body;if(M==null){v.current&&(v.current=null,I(null),b(null));return}v.current!==M&&(v.current=M,I(null),b(M))},[n,f,i]);const A=Ft("div",r,{ref:[e,I],state:a,props:[{id:i,[_n]:""},s]});return{portalNode:m,portalSubtree:c&&A?ue.createPortal(A,c):null}}const ts=l.forwardRef(function(e,n){const{children:r,container:s,className:a,render:i,renderGuards:u,...f}=e,{portalNode:c,portalSubtree:b}=Kn({container:s,ref:n,componentProps:e,elementProps:f}),m=l.useRef(null),I=l.useRef(null),v=l.useRef(null),A=l.useRef(null),[S,M]=l.useState(null),ne=S?.modal,N=S?.open,$=typeof u=="boolean"?u:!!S&&!S.modal&&S.open&&!!c;l.useEffect(()=>{if(!c||ne)return;function x(C){c&&xe(C)&&(C.type==="focusin"?$e:kn)(c)}return c.addEventListener("focusin",x,!0),c.addEventListener("focusout",x,!0),()=>{c.removeEventListener("focusin",x,!0),c.removeEventListener("focusout",x,!0)}},[c,ne]),l.useEffect(()=>{!c||N||$e(c)},[N,c]);const L=l.useMemo(()=>({beforeOutsideRef:m,afterOutsideRef:I,beforeInsideRef:v,afterInsideRef:A,portalNode:c,setFocusManagerState:M}),[c]);return D.jsxs(l.Fragment,{children:[b,D.jsxs(Et.Provider,{value:L,children:[$&&c&&D.jsx(ze,{"data-type":"outside",ref:m,onFocus:x=>{if(xe(x,c))v.current?.focus();else{const C=S?S.domReference:null;Nn(C)?.focus()}}}),$&&c&&D.jsx("span",{"aria-owns":c.id,style:Ut}),c&&ue.createPortal(r,c),$&&c&&D.jsx(ze,{"data-type":"outside",ref:I,onFocus:x=>{if(xe(x,c))A.current?.focus();else{const C=S?S.domReference:null;An(C)?.focus(),S?.closeOnFocusOut&&S?.onOpenChange(!1,U($t,x.nativeEvent))}}})]})]})}),jn={intentional:"onClick",sloppy:"onPointerDown"};function Bn(t){return{escapeKey:typeof t=="boolean"?t:t?.escapeKey??!1,outsidePress:typeof t=="boolean"?t:t?.outsidePress??!0}}function ns(t,e={}){const n="rootStore"in t?t.rootStore:t,r=n.useState("open"),s=n.useState("floatingElement"),a=n.useState("referenceElement"),i=n.useState("domReferenceElement"),{onOpenChange:u,dataRef:f}=n.context,{enabled:c=!0,escapeKey:b=!0,outsidePress:m=!0,outsidePressEvent:I="sloppy",referencePress:v=!1,referencePressEvent:A="sloppy",ancestorScroll:S=!1,bubbles:M,externalTree:ne}=e,N=bt(ne),$=g(typeof m=="function"?m:()=>!1),L=typeof m=="function"?$:m,x=l.useRef(!1),{escapeKey:C,outsidePress:X}=Bn(M),y=l.useRef(null),re=Xe(),Ve=Xe(),j=g(()=>{Ve.clear(),f.current.insideReactTree=!1}),be=l.useRef(!1),_e=l.useRef(""),me=g(o=>{_e.current=o.pointerType}),B=g(()=>{const o=_e.current,h=o==="pen"||!o?"mouse":o,d=typeof I=="function"?I():I;return typeof d=="string"?d:d[h]}),F=g(o=>{if(!r||!c||!b||o.key!=="Escape"||be.current)return;const h=f.current.floatingContext?.nodeId,d=N?ce(N.nodesRef.current,h):[];if(!C&&d.length>0){let T=!0;if(d.forEach(E=>{E.context?.open&&!E.context.dataRef.current.__escapeKeyBubbles&&(T=!1)}),!T)return}const w=pn(o)?o.nativeEvent:o,p=U(Xt,w);n.setOpen(!1,p),!C&&!p.isPropagationAllowed&&o.stopPropagation()}),vt=g(o=>{const h=B();return h==="intentional"&&o.type!=="click"||h==="sloppy"&&o.type==="click"}),V=g(()=>{f.current.insideReactTree=!0,Ve.start(0,j)}),z=g((o,h=!1)=>{if(vt(o)){j();return}if(f.current.insideReactTree){j();return}if(B()==="intentional"&&h||typeof L=="function"&&!L(o))return;const d=W(o),w=`[${mt("inert")}]`,p=Y(n.select("floatingElement")).querySelectorAll(w),T=n.context.triggerElements;if(d&&(T.hasElement(d)||T.hasMatchingElement(R=>Q(R,d))))return;let E=H(d)?d:null;for(;E&&!Te(E);){const R=Vt(E);if(Te(R)||!H(R))break;E=R}if(p.length&&H(d)&&!fn(d)&&!Q(d,n.select("floatingElement"))&&Array.from(p).every(R=>!Q(E,R)))return;if(Ze(d)&&!("touches"in o)){const R=Te(d),q=_t(d),He=/auto|scroll/,It=R||He.test(q.overflowX),xt=R||He.test(q.overflowY),wt=It&&d.clientWidth>0&&d.scrollWidth>d.clientWidth,Ct=xt&&d.clientHeight>0&&d.scrollHeight>d.clientHeight,Ot=q.direction==="rtl",Pt=Ct&&(Ot?o.offsetX<=d.offsetWidth-d.clientWidth:o.offsetX>d.clientWidth),At=wt&&o.offsetY>d.clientHeight;if(Pt||At)return}const Be=f.current.floatingContext?.nodeId,Rt=N&&ce(N.nodesRef.current,Be).some(R=>O(o,R.context?.elements.floating));if(O(o,n.select("floatingElement"))||O(o,n.select("domReferenceElement"))||Rt)return;const qe=N?ce(N.nodesRef.current,Be):[];if(qe.length>0){let R=!0;if(qe.forEach(q=>{q.context?.open&&!q.context.dataRef.current.__outsidePressBubbles&&(R=!1)}),!R)return}n.setOpen(!1,U(Gt,o)),j()}),Ke=g(o=>{B()!=="sloppy"||o.pointerType==="touch"||!n.select("open")||!c||O(o,n.select("floatingElement"))||O(o,n.select("domReferenceElement"))||z(o)}),St=g(o=>{if(B()!=="sloppy"||!n.select("open")||!c||O(o,n.select("floatingElement"))||O(o,n.select("domReferenceElement")))return;const h=o.touches[0];h&&(y.current={startTime:Date.now(),startX:h.clientX,startY:h.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},re.start(1e3,()=>{y.current&&(y.current.dismissOnTouchEnd=!1,y.current.dismissOnMouseDown=!1)}))}),Ee=g(o=>{const h=W(o);function d(){St(o),h?.removeEventListener(o.type,d)}h?.addEventListener(o.type,d)}),_=g(o=>{const h=x.current;if(x.current=!1,re.clear(),o.type==="mousedown"&&y.current&&!y.current.dismissOnMouseDown)return;const d=W(o);function w(){o.type==="pointerdown"?Ke(o):z(o,h),d?.removeEventListener(o.type,w)}d?.addEventListener(o.type,w)}),yt=g(o=>{if(B()!=="sloppy"||!y.current||O(o,n.select("floatingElement"))||O(o,n.select("domReferenceElement")))return;const h=o.touches[0];if(!h)return;const d=Math.abs(h.clientX-y.current.startX),w=Math.abs(h.clientY-y.current.startY),p=Math.sqrt(d*d+w*w);p>5&&(y.current.dismissOnTouchEnd=!0),p>10&&(z(o),re.clear(),y.current=null)}),ve=g(o=>{const h=W(o);function d(){yt(o),h?.removeEventListener(o.type,d)}h?.addEventListener(o.type,d)}),Tt=g(o=>{B()!=="sloppy"||!y.current||O(o,n.select("floatingElement"))||O(o,n.select("domReferenceElement"))||(y.current.dismissOnTouchEnd&&z(o),re.clear(),y.current=null)}),Se=g(o=>{const h=W(o);function d(){Tt(o),h?.removeEventListener(o.type,d)}h?.addEventListener(o.type,d)});l.useEffect(()=>{if(!r||!c)return;f.current.__escapeKeyBubbles=C,f.current.__outsidePressBubbles=X;const o=new ge;function h(E){n.setOpen(!1,U(Yt,E))}function d(){o.clear(),be.current=!0}function w(){o.start(Kt()?5:0,()=>{be.current=!1})}const p=Y(s);p.addEventListener("pointerdown",me,!0),b&&(p.addEventListener("keydown",F),p.addEventListener("compositionstart",d),p.addEventListener("compositionend",w)),L&&(p.addEventListener("click",_,!0),p.addEventListener("pointerdown",_,!0),p.addEventListener("touchstart",Ee,!0),p.addEventListener("touchmove",ve,!0),p.addEventListener("touchend",Se,!0),p.addEventListener("mousedown",_,!0));let T=[];return S&&(H(i)&&(T=Re(i)),H(s)&&(T=T.concat(Re(s))),!H(a)&&a&&a.contextElement&&(T=T.concat(Re(a.contextElement)))),T=T.filter(E=>E!==p.defaultView?.visualViewport),T.forEach(E=>{E.addEventListener("scroll",h,{passive:!0})}),()=>{p.removeEventListener("pointerdown",me,!0),b&&(p.removeEventListener("keydown",F),p.removeEventListener("compositionstart",d),p.removeEventListener("compositionend",w)),L&&(p.removeEventListener("click",_,!0),p.removeEventListener("pointerdown",_,!0),p.removeEventListener("touchstart",Ee,!0),p.removeEventListener("touchmove",ve,!0),p.removeEventListener("touchend",Se,!0),p.removeEventListener("mousedown",_,!0)),T.forEach(E=>{E.removeEventListener("scroll",h)}),o.clear()}},[f,s,a,i,b,L,r,u,S,c,C,X,F,z,_,Ke,Ee,ve,Se,me,n]),l.useEffect(j,[L,j]);const ye=l.useMemo(()=>({onKeyDown:F,...v&&{[jn[A]]:o=>{n.setOpen(!1,U(We,o.nativeEvent))},...A!=="intentional"&&{onClick(o){n.setOpen(!1,U(We,o.nativeEvent))}}}}),[F,n,v,A]),se=g(o=>{const h=W(o.nativeEvent);!Q(n.select("floatingElement"),h)||o.button!==0||(x.current=!0)}),je=l.useMemo(()=>({onKeyDown:F,onPointerDown:se,onMouseDown:se,onMouseUp:se,onClickCapture:V,onMouseDownCapture:V,onPointerDownCapture:V,onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[F,se,V]);return l.useMemo(()=>c?{reference:ye,floating:je,trigger:ye}:{},[c,ye,je])}Ht({memoize:Wt,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Z=(t,e,n,r,s,a,...i)=>{if(i.length>0)throw new Error(jt(1));let u;if(t)u=t;else throw new Error("Missing arguments");return u};var qn=kt();const Hn=Bt(19),Wn=Hn?Yn:Gn;function Un(t,e,n,r,s){return Wn(t,e,n,r,s)}function Yn(t,e,n,r,s){const a=l.useCallback(()=>e(t.getSnapshot(),n,r,s),[t,e,n,r,s]);return qn.useSyncExternalStore(t.subscribe,a,a)}function Gn(t,e,n,r,s){return Mt.useSyncExternalStoreWithSelector(t.subscribe,t.getSnapshot,t.getSnapshot,a=>e(a,n,r,s))}class ee{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(e)}}update(e){for(const n in e)if(!Object.is(this.state[n],e[n])){ee.prototype.setState.call(this,{...this.state,...e});return}}set(e,n){Object.is(this.state[e],n)||ee.prototype.setState.call(this,{...this.state,[e]:n})}notifyAll(){const e={...this.state};ee.prototype.setState.call(this,e)}}class $n extends ee{constructor(e,n={},r){super(e),this.context=n,this.selectors=r}controlledValues=new Map;useSyncedValue(e,n){l.useDebugValue(e),P(()=>{this.state[e]!==n&&this.set(e,n)},[e,n])}useSyncedValueWithCleanup(e,n){P(()=>(this.state[e]!==n&&this.set(e,n),()=>{this.set(e,void 0)}),[e,n])}useSyncedValues(e){const n=Object.values(e);P(()=>{this.update(e)},n)}useControlledProp(e,n,r){l.useDebugValue(e);const s=n!==void 0;this.controlledValues.has(e)||(this.controlledValues.set(e,s),!s&&!Object.is(this.state[e],r)&&super.setState({...this.state,[e]:r})),P(()=>{s&&!Object.is(this.state[e],n)&&super.setState({...this.state,[e]:n})},[e,n,r,s])}set(e,n){this.controlledValues.get(e)!==!0&&super.set(e,n)}update(e){const n={...e};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.update(n)}setState(e){const n={...e};for(const r in n)if(Object.hasOwn(n,r)&&this.controlledValues.get(r)===!0){delete n[r];continue}super.setState({...this.state,...n})}select=(e,n,r,s)=>{const a=this.selectors[e];return a(this.state,n,r,s)};useState=(e,n,r,s)=>{l.useDebugValue(e);const a=this.selectors[e];return Un(this,a,n,r,s)};useContextCallback(e,n){l.useDebugValue(e);const r=g(n??qt);this.context[e]=r}useStateSetter(e){const n=l.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(e,r)}),n.current}observe(e,n){let r;typeof e=="function"?r=e:r=this.selectors[e];let s=r(this.state);return n(s,s,this),this.subscribe(a=>{const i=r(a);if(!Object.is(s,i)){const u=s;s=i,n(i,u,this)}})}}const Xn={open:Z(t=>t.open),domReferenceElement:Z(t=>t.domReferenceElement),referenceElement:Z(t=>t.positionReference??t.referenceElement),floatingElement:Z(t=>t.floatingElement),floatingId:Z(t=>t.floatingId)};class rs extends $n{constructor(e){const{nested:n,noEmit:r,onOpenChange:s,triggerElements:a,...i}=e;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:ft(),nested:n,noEmit:r,triggerElements:a},Xn)}setOpen=(e,n)=>{if((!e||!this.state.open||gn(n.event))&&(this.context.dataRef.current.openEvent=e?n.event:void 0),!this.context.noEmit){const r={open:e,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)}this.context.onOpenChange?.(e,n)}}class ss{constructor(){this.elements=new Set,this.idMap=new Map}add(e,n){const r=this.idMap.get(e);r!==n&&(r!==void 0&&this.elements.delete(r),this.elements.add(n),this.idMap.set(e,n))}delete(e){const n=this.idMap.get(e);n&&(this.elements.delete(n),this.idMap.delete(e))}hasElement(e){return this.elements.has(e)}hasMatchingElement(e){for(const n of this.elements)if(e(n))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function as(t=[]){const e=t.map(c=>c?.reference),n=t.map(c=>c?.floating),r=t.map(c=>c?.item),s=t.map(c=>c?.trigger),a=l.useCallback(c=>oe(c,t,"reference"),e),i=l.useCallback(c=>oe(c,t,"floating"),n),u=l.useCallback(c=>oe(c,t,"item"),r),f=l.useCallback(c=>oe(c,t,"trigger"),s);return l.useMemo(()=>({getReferenceProps:a,getFloatingProps:i,getItemProps:u,getTriggerProps:f}),[a,i,u,f])}function oe(t,e,n){const r=new Map,s=n==="item",a={};n==="floating"&&(a.tabIndex=-1,a[Ce]="");for(const i in t)s&&t&&(i===nt||i===rt)||(a[i]=t[i]);for(let i=0;i<e.length;i+=1){let u;const f=e[i]?.[n];typeof f=="function"?u=t?f(t):null:u=f,u&&Je(a,u,s,r)}return Je(a,t,s,r),a}function Je(t,e,n,r){for(const s in e){const a=e[s];n&&(s===nt||s===rt)||(s.startsWith("on")?(r.has(s)||r.set(s,[]),typeof a=="function"&&(r.get(s)?.push(a),t[s]=(...i)=>r.get(s)?.map(u=>u(...i)).find(u=>u!==void 0))):t[s]=a)}}let Fe=(function(t){return t.open="data-open",t.closed="data-closed",t[t.startingStyle=le.startingStyle]="startingStyle",t[t.endingStyle=le.endingStyle]="endingStyle",t.anchorHidden="data-anchor-hidden",t})({}),Ae=(function(t){return t.popupOpen="data-popup-open",t.pressed="data-pressed",t})({});const zn={[Ae.popupOpen]:""},Jn={[Ae.popupOpen]:"",[Ae.pressed]:""},Zn={[Fe.open]:""},Qn={[Fe.closed]:""},er={[Fe.anchorHidden]:""},is={open(t){return t?zn:null}},os={open(t){return t?Jn:null}},cs={open(t){return t?Zn:Qn},anchorHidden(t){return t?er:null}};export{ar as $,Gt as A,Qr as B,Fe as C,cr as D,Rr as E,ts as F,Dn as G,Zr as H,gt as I,ke as J,$t as K,vr as L,en as M,es as N,sr as O,ss as P,Jr as Q,$n as R,bt as S,ge as T,Tr as U,Xr as V,xe as W,$r as X,An as Y,os as Z,ze as _,Q as a,Mn as a0,dn as a1,Sr as a2,mr as a3,yr as a4,br as a5,Qe as a6,Fn as a7,nn as a8,mt as a9,Nr as aA,Ar as aB,k as aC,Vn as aD,Le as aE,De as aF,Br as aG,tn as aH,Nn as aI,Gr as aJ,Yr as aK,gn as aL,hn as aa,Kr as ab,Y as ac,Mr as ad,an as ae,ln as af,ce as ag,jr as ah,Or as ai,rs as aj,Fr as ak,qr as al,Vr as am,Lr as an,Dr as ao,_r as ap,Hr as aq,Wr as ar,ee as as,Un as at,Er as au,kr as av,we as aw,pr as ax,gr as ay,ir as az,Kn as b,U as c,Z as d,dr as e,We as f,W as g,Xt as h,Ur as i,Ir as j,ns as k,as as l,xr as m,Yt as n,Cr as o,is as p,ur as q,cs as r,zr as s,lr as t,Xe as u,Pr as v,hr as w,or as x,wr as y,fr as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as R,r as M,p as K,j as s,e as U,I as N}from"./index-FrTQ7TcS.js";import{a as ee}from"./useAnalytics-DTf81POS.js";import{u as te}from"./useConfigList-CAf01_dV.js";import{c as ne,u as re,d as ae,f as S}from"./index-DeuSY0Yv.js";import{B as Y}from"./button-CMZqhyXB.js";import{T as se,a as oe,b as j,c as ie,d as ce,e as ue}from"./table-DggTSlPh.js";import{P as de,a as le,b as fe}from"./popover-DXj4s-ni.js";import{t as y,s as me,a as he,b as ge,l as we,L as pe,e as xe,r as ye,c as be,d as Oe,f as ke,g as Me,h as Te,i as ve,p as Pe,j as E,k as Ce}from"./observability.css-wgjHtY3p.js";import{a as D,t as g,c as v,n as De,g as I,d as Ne,f as G,e as Ye}from"./en-US-C8ut0f5H.js";import{C as Se}from"./check-D9E8RKB4.js";import{C as je}from"./chevron-right-fMWRsRLZ.js";/* empty css */import"./useButton-CsZ8hBM8.js";import"./InternalBackdrop-Za9lpJi7.js";import"./popupStateMapping-DolkyTT3.js";import"./reselect-DVmmTZGf.js";import"./useSyncedFloatingRootContext-BKbVh8Gq.js";import"./useRole-CiSaVva3.js";import"./usePopupAutoResize-D6RSlB-m.js";import"./getDisabledMountTransitionStyles-TZFYxPIU.js";const Ee=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ie=R("chevron-left",Ee);const qe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],We=R("columns-3",qe);function P(n,e){const t=D(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,a=g(n,e?.in),o=a.getDay(),u=(o<r?7:0)+o-r;return a.setDate(a.getDate()-u),a.setHours(0,0,0,0),a}function C(n,e){return P(n,{...e,weekStartsOn:1})}function _(n,e){const t=g(n,e?.in),r=t.getFullYear(),a=v(t,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=C(a),u=v(t,0);u.setFullYear(r,0,4),u.setHours(0,0,0,0);const h=C(u);return t.getTime()>=o.getTime()?r+1:t.getTime()>=h.getTime()?r:r-1}function q(n,e){const t=g(n,e?.in);return t.setHours(0,0,0,0),t}function He(n,e,t){const[r,a]=De(t?.in,n,e),o=q(r),u=q(a),h=+o-I(o),m=+u-I(u);return Math.round((h-m)/Ne)}function Le(n,e){const t=_(n,e),r=v(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),C(r)}function Fe(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function Re(n){return!(!Fe(n)&&typeof n!="number"||isNaN(+g(n)))}function Ge(n,e){const t=g(n,e?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function _e(n,e){const t=g(n,e?.in);return He(t,Ge(t))+1}function Be(n,e){const t=g(n,e?.in),r=+C(t)-+Le(t);return Math.round(r/G)+1}function B(n,e){const t=g(n,e?.in),r=t.getFullYear(),a=D(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,u=v(e?.in||n,0);u.setFullYear(r+1,0,o),u.setHours(0,0,0,0);const h=P(u,e),m=v(e?.in||n,0);m.setFullYear(r,0,o),m.setHours(0,0,0,0);const k=P(m,e);return+t>=+h?r+1:+t>=+k?r:r-1}function Ve(n,e){const t=D(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,a=B(n,e),o=v(e?.in||n,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),P(o,e)}function Qe(n,e){const t=g(n,e?.in),r=+P(t,e)-+Ve(t,e);return Math.round(r/G)+1}function c(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const p={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return c(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):c(t+1,2)},d(n,e){return c(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return c(n.getHours()%12||12,e.length)},H(n,e){return c(n.getHours(),e.length)},m(n,e){return c(n.getMinutes(),e.length)},s(n,e){return c(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,t-3));return c(a,e.length)}},T={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},W={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),a=r>0?r:1-r;return t.ordinalNumber(a,{unit:"year"})}return p.y(n,e)},Y:function(n,e,t,r){const a=B(n,r),o=a>0?a:1-a;if(e==="YY"){const u=o%100;return c(u,2)}return e==="Yo"?t.ordinalNumber(o,{unit:"year"}):c(o,e.length)},R:function(n,e){const t=_(n);return c(t,e.length)},u:function(n,e){const t=n.getFullYear();return c(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return p.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const a=Qe(n,r);return e==="wo"?t.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(n,e,t){const r=Be(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):p.d(n,e)},D:function(n,e,t){const r=_e(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const a=n.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return c(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(a,{width:"short",context:"formatting"});case"eeee":default:return t.day(a,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const a=n.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return c(o,e.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(a,{width:"narrow",context:"standalone"});case"cccccc":return t.day(a,{width:"short",context:"standalone"});case"cccc":default:return t.day(a,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return t.ordinalNumber(a,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const a=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let a;switch(r===12?a=T.noon:r===0?a=T.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let a;switch(r>=17?a=T.evening:r>=12?a=T.afternoon:r>=4?a=T.morning:a=T.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return p.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):p.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):p.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):p.s(n,e)},S:function(n,e){return p.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return O(r);case"XXXXX":case"XXX":default:return O(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return O(r);case"xxxxx":case"xxx":default:return O(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+H(r,":");case"OOOO":default:return"GMT"+O(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+H(r,":");case"zzzz":default:return"GMT"+O(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return c(r,e.length)},T:function(n,e,t){return c(+n,e.length)}};function H(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),o=r%60;return o===0?t+String(a):t+String(a)+e+c(o,2)}function L(n,e){return n%60===0?(n>0?"-":"+")+c(Math.abs(n)/60,2):O(n,e)}function O(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),a=c(Math.trunc(r/60),2),o=c(r%60,2);return t+a+e+o}const F=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},V=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Xe=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],a=t[2];if(!a)return F(n,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",F(r,e)).replace("{{time}}",V(a,e))},$e={p:V,P:Xe},ze=/^D+$/,Ae=/^Y+$/,Je=["D","DD","YY","YYYY"];function Ze(n){return ze.test(n)}function Ke(n){return Ae.test(n)}function Ue(n,e,t){const r=et(n,e,t);if(console.warn(r),Je.includes(n))throw new RangeError(r)}function et(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const tt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,nt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,rt=/^'([^]*?)'?$/,at=/''/g,st=/[a-zA-Z]/;function ot(n,e,t){const r=D(),a=r.locale??Ye,o=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,u=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,h=g(n,t?.in);if(!Re(h))throw new RangeError("Invalid time value");let m=e.match(nt).map(l=>{const d=l[0];if(d==="p"||d==="P"){const w=$e[d];return w(l,a.formatLong)}return l}).join("").match(tt).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const d=l[0];if(d==="'")return{isToken:!1,value:it(l)};if(W[d])return{isToken:!0,value:l};if(d.match(st))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:l}});a.localize.preprocessor&&(m=a.localize.preprocessor(h,m));const k={firstWeekContainsDate:o,weekStartsOn:u,locale:a};return m.map(l=>{if(!l.isToken)return l.value;const d=l.value;(Ke(d)||Ze(d))&&Ue(d,e,String(n));const w=W[d[0]];return w(h,d,a.localize,k)}).join("")}function it(n){const e=n.match(rt);return e?e[1].replace(at,"'"):n}const x=ne(),b=10,ct=n=>{const e=n/1e6;return e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`};function Nt(){const[n,e]=M.useState(0),t=K({from:"/(app)/observability"}),[r,a]=M.useState({provider:!1}),o=M.useMemo(()=>{if(t.tags)try{return JSON.parse(t.tags)}catch{return}},[t.tags]);M.useEffect(()=>{e(0)},[t.from,t.to,t.configId,t.variantId,t.environmentId,t.tags]),console.log("[Requests] Search params:",{configId:t.configId,variantId:t.variantId,environmentId:t.environmentId,tags:t.tags});const{data:u,isLoading:h}=ee({limit:b,offset:n,startDate:t.from,endDate:t.to,configId:t.configId,variantId:t.variantId,environmentId:t.environmentId,tags:o}),{data:m}=te(),k=M.useMemo(()=>m?new Map(m.map(i=>[i.id,i.name])):new Map,[m]),l=M.useMemo(()=>[x.accessor("createdAt",{id:"timestamp",header:"Timestamp",cell:i=>s.jsx("span",{className:y,children:ot(new Date(i.getValue()),"yyyy-MM-dd HH:mm:ss")})}),x.accessor("configId",{id:"config",header:"Config",cell:i=>{const f=i.getValue(),Z=f?k.get(f):null;return s.jsx("span",{className:y,children:Z??"—"})}}),x.accessor("provider",{header:"Provider",cell:i=>s.jsx("span",{className:y,children:i.getValue()})}),x.accessor("model",{header:"Model",cell:i=>s.jsx("span",{className:y,children:i.getValue()})}),x.accessor("statusCode",{id:"status",header:"Status",cell:i=>{const f=i.getValue();return s.jsx("span",{className:U(me,f>=200&&f<300?he:ge),children:f})}}),x.display({id:"tokens",header:"Tokens (In → Out)",cell:i=>s.jsxs("span",{className:y,children:[i.row.original.promptTokens.toLocaleString()," →"," ",i.row.original.completionTokens.toLocaleString()]})}),x.accessor("cost",{header:"Cost",cell:i=>s.jsx("span",{className:y,children:ct(i.getValue())})}),x.accessor("latencyMs",{id:"latency",header:"Latency",cell:i=>s.jsxs("span",{className:y,children:[i.getValue(),"ms"]})})],[k]),d=re({data:u?.data||[],columns:l,state:{columnVisibility:r},onColumnVisibilityChange:a,getCoreRowModel:ae()}),w=u?.total??0,Q=Math.floor(n/b)+1,X=Math.ceil(w/b),$=n>0,z=n+b<w,A=()=>{e(Math.max(0,n-b))},J=()=>{e(n+b)};return h?s.jsx("div",{className:we,children:s.jsx(pe,{className:"animate-spin",size:24})}):!u?.data||u.data.length===0?s.jsxs("div",{className:xe,children:[s.jsx("p",{children:"No requests found in the selected time range."}),s.jsx("p",{children:"Make some API requests through the gateway to see them here."})]}):s.jsxs("div",{className:ye,children:[s.jsxs("div",{className:be,children:[s.jsx("h3",{className:Oe,children:"Request Logs"}),s.jsxs(de,{children:[s.jsx(le,{asChild:!0,children:s.jsxs(Y,{variant:"outline",size:"sm",scheme:"gray",children:[s.jsx(N,{icon:We,size:"sm"}),"Columns"]})}),s.jsx(fe,{align:"end",sideOffset:4,children:s.jsx("div",{className:ke,children:d.getAllLeafColumns().map(i=>s.jsxs("label",{className:Me,children:[s.jsx("span",{className:Te,"data-checked":i.getIsVisible(),children:i.getIsVisible()&&s.jsx(Se,{size:12})}),typeof i.columnDef.header=="string"?i.columnDef.header:i.id,s.jsx("input",{type:"checkbox",checked:i.getIsVisible(),onChange:i.getToggleVisibilityHandler(),style:{display:"none"}})]},i.id))})})]})]}),s.jsx("div",{className:ve,children:s.jsxs(se,{children:[s.jsx(oe,{children:d.getHeaderGroups().map(i=>s.jsx(j,{children:i.headers.map(f=>s.jsx(ie,{children:f.isPlaceholder?null:S(f.column.columnDef.header,f.getContext())},f.id))},i.id))}),s.jsx(ce,{children:d.getRowModel().rows.map(i=>s.jsx(j,{children:i.getVisibleCells().map(f=>s.jsx(ue,{children:S(f.column.columnDef.cell,f.getContext())},f.id))},i.id))})]})}),s.jsxs("div",{className:Pe,children:[s.jsxs("span",{className:E,children:["Showing ",n+1,"–",Math.min(n+b,w)," of"," ",w.toLocaleString()," requests"]}),s.jsxs("div",{className:Ce,children:[s.jsxs(Y,{variant:"outline",size:"sm",scheme:"gray",onClick:A,disabled:!$,children:[s.jsx(N,{icon:Ie,size:"sm"}),"Previous"]}),s.jsxs("span",{className:E,children:["Page ",Q," of ",X]}),s.jsxs(Y,{variant:"outline",size:"sm",scheme:"gray",onClick:J,disabled:!z,children:["Next",s.jsx(N,{icon:je,size:"sm"})]})]})]})]})}export{Nt as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Symbol("NOT_FOUND");function z(e,n=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(n)}function T(e,n=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(n)}function j(e,n="expected all items to be functions, instead received the following types: "){if(!e.every(t=>typeof t=="function")){const t=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${n}[${t}]`)}}var C=e=>Array.isArray(e)?e:[e];function M(e){const n=Array.isArray(e[0])?e[0]:e;return j(n,"createSelector expects all input-selectors to be functions, but received the following types: "),n}function I(e,n){const t=[],{length:o}=e;for(let i=0;i<o;i++)t.push(e[i].apply(null,n));return t}function x(e){let n;return{get(t){return n&&e(n.key,t)?n.value:g},put(t,o){n={key:t,value:o}},getEntries(){return n?[n]:[]},clear(){n=void 0}}}function O(e,n){let t=[];function o(r){const l=t.findIndex(c=>n(r,c.key));if(l>-1){const c=t[l];return l>0&&(t.splice(l,1),t.unshift(c)),c.value}return g}function i(r,l){o(r)===g&&(t.unshift({key:r,value:l}),t.length>e&&t.pop())}function s(){return t}function a(){t=[]}return{get:o,put:i,getEntries:s,clear:a}}var $=(e,n)=>e===n;function A(e){return function(t,o){if(t===null||o===null||t.length!==o.length)return!1;const{length:i}=t;for(let s=0;s<i;s++)if(!e(t[s],o[s]))return!1;return!0}}function _(e,n){const t=typeof n=="object"?n:{equalityCheck:n},{equalityCheck:o=$,maxSize:i=1,resultEqualityCheck:s}=t,a=A(o);let r=0;const l=i<=1?x(a):O(i,a);function c(){let u=l.get(arguments);if(u===g){if(u=e.apply(null,arguments),r++,s){const y=l.getEntries().find(f=>s(f.value,u));y&&(u=y.value,r!==0&&r--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>r,c.resetResultsCount=()=>{r=0},c}var D=class{constructor(e){this.value=e}deref(){return this.value}},F=typeof WeakRef<"u"?WeakRef:D,W=0,b=1;function h(){return{s:W,v:void 0,o:null,p:null}}function w(e,n={}){let t=h();const{resultEqualityCheck:o}=n;let i,s=0;function a(){let r=t;const{length:l}=arguments;for(let p=0,y=l;p<y;p++){const f=arguments[p];if(typeof f=="function"||typeof f=="object"&&f!==null){let d=r.o;d===null&&(r.o=d=new WeakMap);const m=d.get(f);m===void 0?(r=h(),d.set(f,r)):r=m}else{let d=r.p;d===null&&(r.p=d=new Map);const m=d.get(f);m===void 0?(r=h(),d.set(f,r)):r=m}}const c=r;let u;if(r.s===b)u=r.v;else if(u=e.apply(null,arguments),s++,o){const p=i?.deref?.()??i;p!=null&&o(p,u)&&(u=p,s!==0&&s--),i=typeof u=="object"&&u!==null||typeof u=="function"?new F(u):u}return c.s=b,c.v=u,u}return a.clearCache=()=>{t=h(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function q(e,...n){const t=typeof e=="function"?{memoize:e,memoizeOptions:n}:e,o=(...i)=>{let s=0,a=0,r,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),z(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...t,...l},{memoize:p,memoizeOptions:y=[],argsMemoize:f=w,argsMemoizeOptions:d=[]}=u,m=C(y),E=C(d),v=M(i),R=p(function(){return s++,c.apply(null,arguments)},...m),S=f(function(){a++;const k=I(v,arguments);return r=R.apply(null,k),r},...E);return Object.assign(S,{resultFunc:c,memoizedResultFunc:R,dependencies:v,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>r,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:p,argsMemoize:f})};return Object.assign(o,{withTypes:()=>o}),o}var U=q(w),K=Object.assign((e,n=U)=>{T(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const t=Object.keys(e),o=t.map(s=>e[s]);return n(o,(...s)=>s.reduce((a,r,l)=>(a[t[l]]=r,a),{}))},{withTypes:()=>K});export{q as a,U as c,_ as l};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as k,a as j,t as V,H as w,i as I,r as f,j as t,J as E}from"./index-FrTQ7TcS.js";import{C as T}from"./check-D9E8RKB4.js";import{C as z}from"./copy-DADLeZ69.js";/* empty css */const M=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],$=k("eye-off",M);const q=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],R=k("eye",q),A=a=>w({queryKey:["environment-secrets",a],queryFn:async()=>{const n=await(await I.v1.environments[":id"].secrets.$get({param:{id:a}})).json();return"data"in n?n.data:[]},enabled:!!a,staleTime:1e3*60*5}),H=a=>{const e=j.c(2);let n;return e[0]!==a?(n=A(a),e[0]=a,e[1]=n):n=e[1],V(n)};var L="xpj81m1 xpj81m0 _1lg22bkc",O="xpj81m2",P="xpj81m3",K="xpj81m4",Q="xpj81m5",B="xpj81m6",D="xpj81m7",F="xpj81m8",J="xpj81m9",U="xpj81ma",Z="xpj81mb",G="xpj81mc",v="xpj81md",b="xpj81mf xpj81me _1lg22bkc _1lg22bkj0 _1lg22bkv0";const W=a=>{const e=j.c(15),{environmentId:n}=a,{data:o,isLoading:N}=H(n),[l,y]=f.useState(null);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=new Set,e[0]=d):d=e[0];const[m,S]=f.useState(d);let p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=async(s,c)=>{await navigator.clipboard.writeText(s),y(c),setTimeout(()=>y(null),2e3)},e[1]=p):p=e[1];const _=p;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=s=>{S(c=>{const r=new Set(c);return r.has(s)?r.delete(s):r.add(s),r})},e[2]=u):u=e[2];const g=u,C=X;if(N){let s;return e[3]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:b,children:"Loading secrets..."}),e[3]=s):s=e[3],s}if(!o||o.length===0){let s;return e[4]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:b,children:"No secrets configured for this environment."}),e[4]=s):s=e[4],s}let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("h3",{className:P,children:"API Keys"}),e[5]=x):x=e[5];let i;if(e[6]!==l||e[7]!==o||e[8]!==m){let s;e[10]!==l||e[11]!==m?(s=c=>{const r=m.has(c.id);return t.jsxs("div",{className:Q,children:[t.jsxs("div",{className:B,children:[t.jsx("span",{className:D,children:c.keyName}),t.jsx("span",{className:F,children:"Use this key to authenticate API requests for this environment."}),t.jsx("div",{className:J,children:t.jsx("span",{className:r?U:Z,children:r?c.keyValue:C(c.keyValue)})})]}),t.jsxs("div",{className:G,children:[t.jsx("button",{type:"button",className:v,onClick:()=>g(c.id),"aria-label":r?"Hide secret":"Show secret",children:r?t.jsx($,{size:16}):t.jsx(R,{size:16})}),t.jsx("button",{type:"button",className:v,onClick:()=>_(c.keyValue,c.id),"aria-label":"Copy to clipboard",children:l===c.id?t.jsx(T,{size:16}):t.jsx(z,{size:16})})]})]},c.id)},e[10]=l,e[11]=m,e[12]=s):s=e[12],i=o.map(s),e[6]=l,e[7]=o,e[8]=m,e[9]=i}else i=e[9];let h;return e[13]!==i?(h=t.jsx("div",{className:L,children:t.jsxs("div",{className:O,children:[x,t.jsx("div",{className:K,children:i})]})}),e[13]=i,e[14]=h):h=e[14],h};function X(a){return"•".repeat(Math.min(a.length,32))}function ae(){const a=j.c(2),{environment:e}=E.useParams();let n;return a[0]!==e?(n=t.jsx(W,{environmentId:e}),a[0]=e,a[1]=n):n=a[1],n}export{ae as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v,g as j,i as N,$ as y,d as _,r as C,j as s}from"./index-FrTQ7TcS.js";import{u as S}from"./useMutation-D4JglXWk.js";import{q as I}from"./useConfigList-CAf01_dV.js";import{D as T,b as F,d as R,e as k,f as b,F as w,A,a as B,c as P}from"./Form-Bh6BPtQ_.js";/* empty css */import"./useButton-CsZ8hBM8.js";import"./InternalBackdrop-Za9lpJi7.js";import"./popupStateMapping-DolkyTT3.js";import"./reselect-DVmmTZGf.js";import"./useSyncedFloatingRootContext-BKbVh8Gq.js";import"./useRole-CiSaVva3.js";import"./useValueChanged-CTjBqaGs.js";const $=()=>{const e=v.c(2),a=j();let t;return e[0]!==a?(t={mutationFn:q,onSuccess:()=>{a.invalidateQueries({queryKey:I})}},e[0]=a,e[1]=t):t=e[1],S(t)};async function q(e){const t=await(await N.v1.configs[":id"].$delete({param:{id:e}})).json();return"data"in t?t.data:void 0}var E="b432xx0",M="b432xx1",Q="b432xx2",Z="b432xx3",K="b432xx4",O="b432xx5",z="b432xx6",G="b432xx7",H="b432xx8",J="b432xx9",L="b432xxa",U="b432xxb",V="b432xxc",W="b432xxd",X="b432xxe",Y="b432xxf",ee="b432xxg";function fe(){const e=v.c(15),{id:a}=y.useParams(),t=_(),f=$(),[i,h]=C.useState(!1);let n;e[0]!==a||e[1]!==f||e[2]!==t?(n=async()=>{h(!0);try{await f.mutateAsync(a),t({to:"/configs"})}catch(D){console.error("Failed to delete config:",D),h(!1)}},e[0]=a,e[1]=f,e[2]=t,e[3]=n):n=e[3];const p=n;let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("h3",{className:Z,children:"Danger Zone"}),e[4]=o):o=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:z,children:[s.jsx("span",{className:G,children:"Delete this config"}),s.jsx("span",{className:H,children:"Once you delete a config, there is no going back. Please be certain."})]}),e[5]=r):r=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(T,{className:J,children:"Delete Config"}),e[6]=l):l=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(F,{className:L}),e[7]=c):c=e[7];let m,d;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(R,{className:V,children:"Delete config?"}),d=s.jsx(k,{className:W,children:"This action cannot be undone. This will permanently delete the config and all associated variants and targeting rules."}),e[8]=m,e[9]=d):(m=e[8],d=e[9]);let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(b,{className:Y,children:"Cancel"}),e[10]=x):x=e[10];const u=i?"Deleting...":"Delete";let g;return e[11]!==p||e[12]!==i||e[13]!==u?(g=s.jsx("div",{className:E,children:s.jsx(w,{className:M,children:s.jsxs("div",{className:Q,children:[o,s.jsx("div",{className:K,children:s.jsxs("div",{className:O,children:[r,s.jsxs(A,{children:[l,s.jsxs(B,{children:[c,s.jsxs(P,{className:U,children:[m,d,s.jsxs("div",{className:X,children:[x,s.jsx(b,{className:ee,onClick:p,disabled:i,children:u})]})]})]})]})]})})]})})}),e[11]=p,e[12]=i,e[13]=u,e[14]=g):g=e[14],g}export{fe as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as g,g as j,i as D,G as f,k,d as w,r as N,j as t}from"./index-FrTQ7TcS.js";import{u as y}from"./useMutation-D4JglXWk.js";import{g as b}from"./useEnvironments-Bu_0SIUj.js";import{T}from"./tooltip-BuSsMQ8P.js";import{F as E,A as I,D as C,a as P,b as S,c as B,d as F,e as R,f as p}from"./Form-Bh6BPtQ_.js";/* empty css */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"./InternalBackdrop-Za9lpJi7.js";import"./useRole-CiSaVva3.js";import"./useValueChanged-CTjBqaGs.js";const _=()=>{const e=g.c(2),n=j();let s;return e[0]!==n?(s={mutationFn:A,onSuccess:()=>{n.invalidateQueries({queryKey:b()})}},e[0]=n,e[1]=s):s=e[1],y(s)};async function A(e){const s=await(await D.v1.environments[":id"].$delete({param:{id:e}})).json();return"data"in s?s.data:void 0}var Q="xvtkwc0",$="xvtkwc1",q="xvtkwc2",K="xvtkwc3",M="xvtkwc4",Z="xvtkwc5",G="xvtkwc6",O="xvtkwc7",Y="xvtkwc8",u="xvtkwc9",z="xvtkwca",H="xvtkwcb",J="xvtkwcc",L="xvtkwcd",U="xvtkwce",V="xvtkwcf",W="xvtkwcg";function ge(){const e=g.c(11),{environment:n}=f.useParams(),{data:s}=k(n),m=w(),d=_(),[r,x]=N.useState(!1),a=s?.isProd??!1;let i;e[0]!==d||e[1]!==n||e[2]!==a||e[3]!==m?(i=async()=>{if(!a){x(!0);try{await d.mutateAsync(n),m({to:"/environments"})}catch(h){console.error("Failed to delete environment:",h),x(!1)}}},e[0]=d,e[1]=n,e[2]=a,e[3]=m,e[4]=i):i=e[4];const v=i;let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("h3",{className:K,children:"Danger Zone"}),e[5]=o):o=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsxs("div",{className:G,children:[t.jsx("span",{className:O,children:"Delete this environment"}),t.jsx("span",{className:Y,children:"Once you delete an environment, there is no going back. Please be certain."})]}),e[6]=c):c=e[6];let l;return e[7]!==v||e[8]!==r||e[9]!==a?(l=t.jsx("div",{className:Q,children:t.jsx(E,{className:$,children:t.jsxs("div",{className:q,children:[o,t.jsx("div",{className:M,children:t.jsxs("div",{className:Z,children:[c,a?t.jsx(T,{content:"You can't delete the Production environment.",children:t.jsx("span",{children:t.jsx("button",{className:u,disabled:!0,children:"Delete Environment"})})}):t.jsxs(I,{children:[t.jsx(C,{className:u,children:"Delete Environment"}),t.jsxs(P,{children:[t.jsx(S,{className:z}),t.jsxs(B,{className:H,children:[t.jsx(F,{className:J,children:"Delete environment?"}),t.jsx(R,{className:L,children:"This action cannot be undone. This will permanently delete the environment and all associated secrets."}),t.jsxs("div",{className:U,children:[t.jsx(p,{className:V,children:"Cancel"}),t.jsx(p,{className:W,onClick:v,disabled:r,children:r?"Deleting...":"Delete"})]})]})]})]})]})})]})})}),e[7]=v,e[8]=r,e[9]=a,e[10]=l):l=e[10],l}export{ge as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as b,a as p,e as m,Q as h,j as n,T as x,V as N,W as j,X as u,Y as w,Z as y,_ as T}from"./index-FrTQ7TcS.js";const C=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],$=b("arrow-down",C);const k=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],v=b("arrow-up",k),H=o=>{const e=p.c(12);let l,a,s;e[0]!==o?({className:a,children:l,...s}=o,e[0]=o,e[1]=l,e[2]=a,e[3]=s):(l=e[1],a=e[2],s=e[3]);let t;e[4]!==a?(t=m(h,a),e[4]=a,e[5]=t):t=e[5];let c;e[6]!==l?(c=n.jsx("table",{className:T,children:l}),e[6]=l,e[7]=c):c=e[7];let r;return e[8]!==s||e[9]!==t||e[10]!==c?(r=n.jsx("div",{...s,className:t,children:c}),e[8]=s,e[9]=t,e[10]=c,e[11]=r):r=e[11],r},R=o=>{const e=p.c(10);let l,a,s;e[0]!==o?({className:a,children:l,...s}=o,e[0]=o,e[1]=l,e[2]=a,e[3]=s):(l=e[1],a=e[2],s=e[3]);let t;e[4]!==a?(t=m(x,a),e[4]=a,e[5]=t):t=e[5];let c;return e[6]!==l||e[7]!==s||e[8]!==t?(c=n.jsx("thead",{...s,className:t,children:l}),e[6]=l,e[7]=s,e[8]=t,e[9]=c):c=e[9],c},B=o=>{const e=p.c(10);let l,a,s;e[0]!==o?({className:a,children:l,...s}=o,e[0]=o,e[1]=l,e[2]=a,e[3]=s):(l=e[1],a=e[2],s=e[3]);let t;e[4]!==a?(t=m(w,a),e[4]=a,e[5]=t):t=e[5];let c;return e[6]!==l||e[7]!==s||e[8]!==t?(c=n.jsx("tbody",{...s,className:t,children:l}),e[6]=l,e[7]=s,e[8]=t,e[9]=c):c=e[9],c},q=o=>{const e=p.c(14);let l,a,s,t,c;e[0]!==o?({className:a,interactive:s,selected:c,children:l,...t}=o,e[0]=o,e[1]=l,e[2]=a,e[3]=s,e[4]=t,e[5]=c):(l=e[1],a=e[2],s=e[3],t=e[4],c=e[5]);let r;e[6]!==a||e[7]!==s||e[8]!==c?(r=m(N({interactive:s,selected:c}),a),e[6]=a,e[7]=s,e[8]=c,e[9]=r):r=e[9];let i;return e[10]!==l||e[11]!==t||e[12]!==r?(i=n.jsx("tr",{...t,className:r,children:l}),e[10]=l,e[11]=t,e[12]=r,e[13]=i):i=e[13],i},z=o=>{const e=p.c(17);let l,a,s,t,c;e[0]!==o?({className:a,sortable:c,sortDirection:t,children:l,...s}=o,e[0]=o,e[1]=l,e[2]=a,e[3]=s,e[4]=t,e[5]=c):(l=e[1],a=e[2],s=e[3],t=e[4],c=e[5]);let r;e[6]!==l||e[7]!==s||e[8]!==t||e[9]!==c?(r=c?n.jsxs("button",{type:"button",className:j,onClick:s.onClick,children:[l,t==="asc"&&n.jsx(v,{size:12}),t==="desc"&&n.jsx($,{size:12})]}):l,e[6]=l,e[7]=s,e[8]=t,e[9]=c,e[10]=r):r=e[10];const i=r;let d;e[11]!==a?(d=m(u,a),e[11]=a,e[12]=d):d=e[12];let f;return e[13]!==i||e[14]!==s||e[15]!==d?(f=n.jsx("th",{...s,className:d,children:i}),e[13]=i,e[14]=s,e[15]=d,e[16]=f):f=e[16],f},A=o=>{const e=p.c(10);let l,a,s;e[0]!==o?({className:a,children:l,...s}=o,e[0]=o,e[1]=l,e[2]=a,e[3]=s):(l=e[1],a=e[2],s=e[3]);let t;e[4]!==a?(t=m(y,a),e[4]=a,e[5]=t):t=e[5];let c;return e[6]!==l||e[7]!==s||e[8]!==t?(c=n.jsx("td",{...s,className:t,children:l}),e[6]=l,e[7]=s,e[8]=t,e[9]=c):c=e[9],c};export{H as T,R as a,q as b,z as c,B as d,A as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as f,P as v,d as y,j as n}from"./index-FrTQ7TcS.js";import{b as g,e as a,a as b,c as m,T,d as R}from"./table-DggTSlPh.js";import{u as V}from"./useEnvironments-Bu_0SIUj.js";import{u as C}from"./useTargetingRules-BrgaEdxR.js";import{a as E}from"./variants.css-rCWHZycz.js";/* empty css */function A(){const e=f.c(11),{id:o}=v.useParams(),{data:r,isLoading:j}=V(),{data:p,isLoading:u}=C(o),x=y();if(j||u){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{children:"Loading..."}),e[0]=s):s=e[0],s}let l;e[1]!==p?(l=new Map(p?.map(_)??[]),e[1]=p,e[2]=l):l=e[2];const h=l;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(b,{children:n.jsxs(g,{children:[n.jsx(m,{children:"Environment"}),n.jsx(m,{children:"Slug"}),n.jsx(m,{children:"Active Variant"}),n.jsx(m,{children:"Variant Version"})]})}),e[3]=d):d=e[3];let t;e[4]!==o||e[5]!==r||e[6]!==x||e[7]!==h?(t=r&&r.length>0?r.map(s=>{const i=h.get(s.id);return n.jsxs(g,{interactive:!0,onClick:()=>x({to:"/configs/$id/targeting/$environment",params:{id:o,environment:s.id}}),children:[n.jsxs(a,{children:[s.name,s.isProd&&n.jsx("span",{style:{marginLeft:"0.5rem",opacity:.6},children:"(prod or this environment)"})]}),n.jsx(a,{children:s.slug}),n.jsx(a,{children:i?n.jsx("span",{children:i.variantName||"Unnamed"}):n.jsx("span",{style:{opacity:.5},children:"Not configured"})}),n.jsx(a,{children:i?i.pinnedVersion?n.jsxs("span",{children:["v",i.pinnedVersion," (pinned)"]}):i.latestVersion?n.jsxs("span",{children:["v",i.latestVersion," (latest)"]}):n.jsx("span",{style:{opacity:.5},children:"-"}):n.jsx("span",{style:{opacity:.5},children:"-"})})]},s.id)}):n.jsx(g,{children:n.jsx(a,{colSpan:4,style:{textAlign:"center",padding:"2rem"},children:"No environments found. Create an environment to get started."})}),e[4]=o,e[5]=r,e[6]=x,e[7]=h,e[8]=t):t=e[8];let c;return e[9]!==t?(c=n.jsx("div",{className:E,children:n.jsxs(T,{children:[d,n.jsx(R,{children:t})]})}),e[9]=t,e[10]=c):c=e[10],c}function _(e){return[e.environmentId,e]}export{A as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,j as M,x as Z,a as J,e as ae}from"./index-FrTQ7TcS.js";import{u as D,a as $,g as le,f as U,b as ue,c as V}from"./useButton-CsZ8hBM8.js";import{c as Y,n as Q,u as ce,T as pe,i as de,g as fe,a as ge,b as me,R as he,P as ye,d as A,t as q,e as ve,f as xe,h as Ce,j as Se,k as Pe,l as Re,m as Te,o as be,p as Ie,q as Me,r as W,s as we,v as Ee}from"./popupStateMapping-DolkyTT3.js";import{g as Oe,u as Ae,s as De,a as ke,b as je}from"./usePopupAutoResize-D6RSlB-m.js";import{p as He,u as Le,c as Ne,a as Fe,b as Ue,d as Ve}from"./useSyncedFloatingRootContext-BKbVh8Gq.js";import{u as _e,a as Be,g as ee,b as Xe}from"./getDisabledMountTransitionStyles-TZFYxPIU.js";import{u as Ye}from"./useFocus-9TCY0h5x.js";const te=r.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new pe,currentIdRef:{current:null},currentContextRef:{current:null}});function We(s){const{children:e,delay:t,timeoutMs:o=0}=s,d=r.useRef(t),l=r.useRef(t),i=r.useRef(null),a=r.useRef(null),c=ce();return M.jsx(te.Provider,{value:r.useMemo(()=>({hasProvider:!0,delayRef:d,initialDelayRef:l,currentIdRef:i,timeoutMs:o,currentContextRef:a,timeout:c}),[o,c]),children:e})}function ze(s,e={open:!1}){const t="rootStore"in s?s.rootStore:s,o=t.useState("floatingId"),{enabled:d=!0,open:l}=e,i=r.useContext(te),{currentIdRef:a,delayRef:c,timeoutMs:u,initialDelayRef:f,currentContextRef:p,hasProvider:g,timeout:n}=i,[x,y]=r.useState(!1);return D(()=>{function v(){y(!1),p.current?.setIsInstantPhase(!1),a.current=null,p.current=null,c.current=f.current}if(d&&a.current&&!l&&a.current===o){if(y(!1),u){const m=o;return n.start(u,()=>{t.select("open")||a.current&&a.current!==m||v()}),()=>{n.clear()}}v()}},[d,l,o,a,c,u,f,p,n,t]),D(()=>{if(!d||!l)return;const v=p.current,m=a.current;n.clear(),p.current={onOpenChange:t.setOpen,setIsInstantPhase:y},a.current=o,c.current={open:0,close:Oe(f.current,"close")},m!==null&&m!==o?(y(!0),v?.setIsInstantPhase(!0),v?.onOpenChange(!1,Y(Q))):(y(!1),v?.setIsInstantPhase(!1))},[d,l,o,t,a,c,u,f,p,n]),D(()=>()=>{p.current=null},[p]),r.useMemo(()=>({hasProvider:g,delayRef:c,isInstantPhase:x}),[g,c,x])}function Ge(s,e){let t=null,o=null,d=!1;return{contextElement:s||void 0,getBoundingClientRect(){const l=s?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},i=e.axis==="x"||e.axis==="both",a=e.axis==="y"||e.axis==="both",c=["mouseenter","mousemove"].includes(e.dataRef.current.openEvent?.type||"")&&e.pointerType!=="touch";let u=l.width,f=l.height,p=l.x,g=l.y;return t==null&&e.x&&i&&(t=l.x-e.x),o==null&&e.y&&a&&(o=l.y-e.y),p-=t||0,g-=o||0,u=0,f=0,!d||c?(u=e.axis==="y"?l.width:0,f=e.axis==="x"?l.height:0,p=i&&e.x!=null?e.x:p,g=a&&e.y!=null?e.y:g):d&&!c&&(f=e.axis==="x"?l.height:f,u=e.axis==="y"?l.width:u),d=!0,{width:u,height:f,x:p,y:g,top:g,right:p+u,bottom:g+f,left:p}}}}function K(s){return s!=null&&s.clientX!=null}function $e(s,e={}){const t="rootStore"in s?s.rootStore:s,o=t.useState("open"),d=t.useState("floatingElement"),l=t.useState("domReferenceElement"),i=t.context.dataRef,{enabled:a=!0,axis:c="both",x:u=null,y:f=null}=e,p=r.useRef(!1),g=r.useRef(null),[n,x]=r.useState(),[y,v]=r.useState([]),m=$((C,b)=>{p.current||i.current.openEvent&&!K(i.current.openEvent)||t.set("positionReference",Ge(l,{x:C,y:b,axis:c,dataRef:i,pointerType:n}))}),h=$(C=>{u!=null||f!=null||(o?g.current||v([]):m(C.clientX,C.clientY))}),P=de(n)?d:o,S=r.useCallback(()=>{if(!P||!a||u!=null||f!=null)return;const C=le(d);function b(I){const w=fe(I);ge(d,w)?(C.removeEventListener("mousemove",b),g.current=null):m(I.clientX,I.clientY)}if(!i.current.openEvent||K(i.current.openEvent)){C.addEventListener("mousemove",b);const I=()=>{C.removeEventListener("mousemove",b),g.current=null};return g.current=I,I}t.set("positionReference",l)},[P,a,u,f,d,i,l,t,m]);r.useEffect(()=>S(),[S,y]),r.useEffect(()=>{a&&!d&&(p.current=!1)},[a,d]),r.useEffect(()=>{!a&&o&&(p.current=!0)},[a,o]),D(()=>{a&&(u!=null||f!=null)&&(p.current=!1,m(u,f))},[a,u,f,m]);const T=r.useMemo(()=>{function C(b){x(b.pointerType)}return{onPointerDown:C,onPointerEnter:C,onMouseMove:h,onMouseEnter:h}},[h]);return r.useMemo(()=>a?{reference:T}:{},[a,T])}const qe=r.forwardRef(function(e,t){const{children:o,container:d,className:l,render:i,...a}=e,{portalNode:c,portalSubtree:u}=me({container:d,ref:t,componentProps:e,elementProps:a});return!u&&!c?null:M.jsxs(r.Fragment,{children:[u,c&&Z.createPortal(o,c)]})}),ne=r.createContext(void 0);function N(s){const e=r.useContext(ne);if(e===void 0&&!s)throw new Error(U(72));return e}const Ke={...He,disabled:A(s=>s.disabled),instantType:A(s=>s.instantType),isInstantPhase:A(s=>s.isInstantPhase),trackCursorAxis:A(s=>s.trackCursorAxis),disableHoverablePopup:A(s=>s.disableHoverablePopup),lastOpenChangeReason:A(s=>s.openChangeReason),closeDelay:A(s=>s.closeDelay)};class z extends he{constructor(e){super({...Ze(),...e},{popupRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new ye},Ke)}setOpen=(e,t)=>{const o=t.reason,d=o===q,l=e&&o===ve,i=!e&&(o===xe||o===Ce);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;const a=()=>{const c={open:e,openChangeReason:o};l?c.instantType="focus":i?c.instantType="dismiss":o===q&&(c.instantType=void 0);const u=t.trigger?.id??null;(u||e)&&(c.activeTriggerId=u,c.activeTriggerElement=t.trigger??null),this.update(c)};d?Z.flushSync(a):a()};static useStore(e,t){const o=ue(()=>e??new z(t)).current,d=Le({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=d,o}}function Ze(){return{...Ne(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0}}function Je(s){const{disabled:e=!1,defaultOpen:t=!1,open:o,disableHoverablePopup:d=!1,trackCursorAxis:l="none",actionsRef:i,onOpenChange:a,onOpenChangeComplete:c,handle:u,triggerId:f,defaultTriggerId:p=null,children:g}=s,n=z.useStore(u?.store,{open:o??t,activeTriggerId:f!==void 0?f:p});n.useControlledProp("open",o,t),n.useControlledProp("activeTriggerId",f,p),n.useContextCallback("onOpenChange",a),n.useContextCallback("onOpenChangeComplete",c);const x=n.useState("open"),y=n.useState("activeTriggerId"),v=n.useState("payload");n.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:d});const m=!e&&x;D(()=>{x&&e&&n.setOpen(!1,Y(Se))},[x,e,n]),n.useSyncedValue("disabled",e),Fe(n);const{forceUnmount:h,transitionStatus:P}=Ue(m,n),S=n.useState("isInstantPhase"),T=n.useState("instantType"),C=n.useState("lastOpenChangeReason"),b=r.useRef(null);D(()=>{P==="ending"&&C===Q||P!=="ending"&&S?(T!=="delay"&&(b.current=T),n.set("instantType","delay")):b.current!==null&&(n.set("instantType",b.current),b.current=null)},[P,S,C,T,n]),D(()=>{m&&y==null&&n.set("payload",void 0)},[n,y,m]);const I=r.useCallback(()=>{n.setOpen(!1,Qe(n,Te))},[n]);r.useImperativeHandle(i,()=>({unmount:h,close:I}),[h,I]);const w=n.useState("floatingRootContext"),E=Ye(w,{enabled:!e}),R=Pe(w,{enabled:!e,referencePress:!0}),L=$e(w,{enabled:!e&&l!=="none",axis:l==="none"?void 0:l}),{getReferenceProps:O,getFloatingProps:k,getTriggerProps:j}=Re([E,R,L]),H=r.useMemo(()=>O(),[O]),_=r.useMemo(()=>j(),[j]),G=r.useMemo(()=>k(),[k]);return n.useSyncedValues({floatingRootContext:w,activeTriggerProps:H,inactiveTriggerProps:_,popupProps:G}),M.jsx(ne.Provider,{value:n,children:typeof g=="function"?g({payload:v}):g})}function Qe(s,e){const t=Y(e);return t.preventUnmountOnClose=()=>{s.set("preventUnmountingOnClose",!0)},t}const oe=r.createContext(void 0);function et(){return r.useContext(oe)}const tt=600,nt=r.forwardRef(function(e,t){const{className:o,render:d,handle:l,payload:i,disabled:a,delay:c,closeDelay:u,id:f,...p}=e,g=N(!0),n=l?.store??g;if(!n)throw new Error(U(82));const x=be(f),y=n.useState("isTriggerActive",x),v=n.useState("floatingRootContext"),m=n.useState("isOpenedByTrigger",x),h=r.useRef(null),P=c??tt,S=u??0,{registerTrigger:T,isMountedByThisTrigger:C}=Ve(x,h,n,{payload:i,closeDelay:S}),b=et(),{delayRef:I,isInstantPhase:w,hasProvider:E}=ze(v,{open:m});n.useSyncedValue("isInstantPhase",w);const R=n.useState("disabled"),L=a??R,O=n.useState("trackCursorAxis"),k=n.useState("disableHoverablePopup"),j=Ae(v,{enabled:!L,mouseOnly:!0,move:!1,handleClose:!k&&O!=="both"?De():null,restMs(){const B=b?.delay,F=typeof I.current=="object"?I.current.open:void 0;let X=P;return E&&(F!==0?X=c??B??P:X=0),X},delay(){const B=typeof I.current=="object"?I.current.close:void 0;let F=S;return u==null&&E&&(F=B),{close:F}},triggerElementRef:h,isActiveTrigger:y}),H=r.useMemo(()=>({open:m}),[m]),_=n.useState("triggerProps",C);return V("button",e,{state:H,ref:[t,T,h],props:[j,_,{id:x},p],stateAttributesMapping:Ie})}),se=r.createContext(void 0);function ot(){const s=r.useContext(se);if(s===void 0)throw new Error(U(70));return s}const st=r.forwardRef(function(e,t){const{keepMounted:o=!1,...d}=e;return N().useState("mounted")||o?M.jsx(se.Provider,{value:o,children:M.jsx(qe,{ref:t,...d})}):null}),re=r.createContext(void 0);function ie(){const s=r.useContext(re);if(s===void 0)throw new Error(U(71));return s}const rt=r.forwardRef(function(e,t){const{render:o,className:d,anchor:l,positionMethod:i="absolute",side:a="top",align:c="center",sideOffset:u=0,alignOffset:f=0,collisionBoundary:p="clipping-ancestors",collisionPadding:g=5,arrowPadding:n=5,sticky:x=!1,disableAnchorTracking:y=!1,collisionAvoidance:v=Me,...m}=e,h=N(),P=ot(),S=h.useState("open"),T=h.useState("mounted"),C=h.useState("trackCursorAxis"),b=h.useState("disableHoverablePopup"),I=h.useState("floatingRootContext"),w=h.useState("instantType"),E=h.useState("transitionStatus"),R=_e({anchor:l,positionMethod:i,floatingRootContext:I,mounted:T,side:a,sideOffset:u,align:c,alignOffset:f,collisionBoundary:p,collisionPadding:g,sticky:x,arrowPadding:n,disableAnchorTracking:y,keepMounted:P,collisionAvoidance:v,adaptiveOrigin:Be}),L=r.useMemo(()=>{const H={};return(!S||C==="both"||b)&&(H.pointerEvents="none"),{role:"presentation",hidden:!T,style:{...R.positionerStyles,...H}}},[S,C,b,T,R.positionerStyles]),O=r.useMemo(()=>({open:S,side:R.side,align:R.align,anchorHidden:R.anchorHidden,instant:C!=="none"?"tracking-cursor":w}),[S,R.side,R.align,R.anchorHidden,C,w]),k=r.useMemo(()=>({...O,arrowRef:R.arrowRef,arrowStyles:R.arrowStyles,arrowUncentered:R.arrowUncentered}),[O,R.arrowRef,R.arrowStyles,R.arrowUncentered]),j=V("div",e,{state:O,props:[L,ee(E),m],ref:[t,h.useStateSetter("positionerElement")],stateAttributesMapping:W});return M.jsx(re.Provider,{value:k,children:j})}),it={...W,...Ee},at=r.forwardRef(function(e,t){const{className:o,render:d,...l}=e,i=N(),{side:a,align:c}=ie(),u=i.useState("open"),f=i.useState("mounted"),p=i.useState("instantType"),g=i.useState("transitionStatus"),n=i.useState("popupProps"),x=i.useState("payload"),y=i.useState("popupElement"),v=i.useState("positionerElement"),m=i.useState("floatingRootContext"),h=Xe();we({open:u,ref:i.context.popupRef,onComplete(){u&&i.context.onOpenChangeComplete?.(!0)}});function P(){m.context.events.emit("measure-layout")}function S(E,R){m.context.events.emit("measure-layout-complete",{previousDimensions:E,nextDimensions:R})}const T=r.useCallback(()=>i.context.triggerElements.size>1,[i]);ke({popupElement:y,positionerElement:v,mounted:f,content:x,enabled:T,onMeasureLayout:P,onMeasureLayoutComplete:S,side:a,direction:h});const C=i.useState("disabled"),b=i.useState("closeDelay");je(m,{enabled:!C,closeDelay:b});const I=r.useMemo(()=>({open:u,side:a,align:c,instant:p,transitionStatus:g}),[u,a,c,p,g]);return V("div",e,{state:I,ref:[t,i.context.popupRef,i.useStateSetter("popupElement")],props:[n,ee(g),l],stateAttributesMapping:it})}),lt=r.forwardRef(function(e,t){const{className:o,render:d,...l}=e,a=N().useState("instantType"),{open:c,arrowRef:u,side:f,align:p,arrowUncentered:g,arrowStyles:n}=ie(),x=r.useMemo(()=>({open:c,side:f,align:p,uncentered:g,instant:a}),[c,f,p,g,a]);return V("div",e,{state:x,ref:[t,u],props:[{style:n,"aria-hidden":!0},l],stateAttributesMapping:W})}),ut=function(e){const{delay:t,closeDelay:o,timeout:d=400}=e,l=r.useMemo(()=>({delay:t,closeDelay:o}),[t,o]),i=r.useMemo(()=>({open:t,close:o}),[t,o]);return M.jsx(oe.Provider,{value:l,children:M.jsx(We,{delay:i,timeoutMs:d,children:e.children})})};var ct="_1v73km82",pt="_1v73km83",dt="_1v73km84",ft="_1v73km85";function gt(s){const e=J.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=M.jsx("path",{d:"M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",className:ft}),e[0]=t):t=e[0];let o;return e[1]!==s?(o=M.jsx("svg",{width:"20",height:"10",viewBox:"0 0 20 10",fill:"none",...s,children:t}),e[1]=s,e[2]=o):o=e[2],o}function Pt(s){const e=J.c(20),{content:t,children:o,side:d,align:l,sideOffset:i,delay:a,closeDelay:c,className:u}=s,f=d===void 0?"top":d,p=l===void 0?"center":l,g=i===void 0?8:i,n=a===void 0?400:a,x=c===void 0?0:c;let y;e[0]!==o?(y=M.jsx(nt,{render:o}),e[0]=o,e[1]=y):y=e[1];let v;e[2]!==u?(v=ae(pt,u),e[2]=u,e[3]=v):v=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=M.jsx(lt,{className:dt,children:M.jsx(gt,{})}),e[4]=m):m=e[4];let h;e[5]!==t||e[6]!==v?(h=M.jsxs(at,{className:v,children:[m,t]}),e[5]=t,e[6]=v,e[7]=h):h=e[7];let P;e[8]!==p||e[9]!==f||e[10]!==g||e[11]!==h?(P=M.jsx(st,{children:M.jsx(rt,{className:ct,side:f,align:p,sideOffset:g,children:h})}),e[8]=p,e[9]=f,e[10]=g,e[11]=h,e[12]=P):P=e[12];let S;e[13]!==P||e[14]!==y?(S=M.jsxs(Je,{children:[y,P]}),e[13]=P,e[14]=y,e[15]=S):S=e[15];let T;return e[16]!==x||e[17]!==n||e[18]!==S?(T=M.jsx(ut,{delay:n,closeDelay:x,children:S}),e[16]=x,e[17]=n,e[18]=S,e[19]=T):T=e[19],T}export{Pt as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l,t as u,i as y}from"./index-FrTQ7TcS.js";const D=(e,a)=>{const t=l.c(7),i=!0;let n,s;t[0]!==e?(n=["analytics","costs","total",e],s=async()=>{const c={startDate:e.startDate,endDate:e.endDate,...e.configId&&{configId:e.configId},...e.variantId&&{variantId:e.variantId},...e.environmentId&&{environmentId:e.environmentId},...e.tags&&Object.keys(e.tags).length>0&&{tags:JSON.stringify(e.tags)}},r=await(await y.v1.analytics.costs.total.$get({query:c})).json();return"data"in r?r.data:null},t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==i||t[4]!==n||t[5]!==s?(o={queryKey:n,queryFn:s,enabled:i},t[3]=i,t[4]=n,t[5]=s,t[6]=o):o=t[6],u(o)},q=(e,a)=>{const t=l.c(7),i=!0;let n,s;t[0]!==e?(n=["analytics","costs","summary",e],s=async()=>{const c={startDate:e.startDate,endDate:e.endDate,...e.groupBy&&{groupBy:e.groupBy},...e.configId&&{configId:e.configId},...e.variantId&&{variantId:e.variantId},...e.environmentId&&{environmentId:e.environmentId},...e.tags&&Object.keys(e.tags).length>0&&{tags:JSON.stringify(e.tags)}},r=await(await y.v1.analytics.costs.summary.$get({query:c})).json();return"data"in r?r.data:[]},t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==i||t[4]!==n||t[5]!==s?(o={queryKey:n,queryFn:s,enabled:i},t[3]=i,t[4]=n,t[5]=s,t[6]=o):o=t[6],u(o)},b=(e,a)=>{const t=l.c(7),i=!0;let n,s;t[0]!==e?(n=["analytics","stats",e],s=async()=>{const c={startDate:e.startDate,endDate:e.endDate,...e.configId&&{configId:e.configId},...e.variantId&&{variantId:e.variantId},...e.environmentId&&{environmentId:e.environmentId},...e.tags&&Object.keys(e.tags).length>0&&{tags:JSON.stringify(e.tags)}},r=await(await y.v1.analytics.stats.$get({query:c})).json();return"data"in r?r.data:null},t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==i||t[4]!==n||t[5]!==s?(o={queryKey:n,queryFn:s,enabled:i},t[3]=i,t[4]=n,t[5]=s,t[6]=o):o=t[6],u(o)},w=(e,a)=>{const t=l.c(9);let i;t[0]!==e?(i=e===void 0?{}:e,t[0]=e,t[1]=i):i=t[1];const n=i,s=!0;let o,c;t[2]!==n?(o=["analytics","requests",n],c=async()=>{const r={...n.limit!==void 0&&{limit:String(n.limit)},...n.offset!==void 0&&{offset:String(n.offset)},...n.configId&&{configId:n.configId},...n.variantId&&{variantId:n.variantId},...n.environmentId&&{environmentId:n.environmentId},...n.provider&&{provider:n.provider},...n.model&&{model:n.model},...n.startDate&&{startDate:n.startDate},...n.endDate&&{endDate:n.endDate},...n.tags&&Object.keys(n.tags).length>0&&{tags:JSON.stringify(n.tags)}},g=await(await y.v1.analytics.requests.$get({query:r})).json();return"data"in g?g.data:{data:[],total:0,limit:n.limit??100,offset:n.offset??0}},t[2]=n,t[3]=o,t[4]=c):(o=t[3],c=t[4]);let d;return t[5]!==s||t[6]!==o||t[7]!==c?(d={queryKey:o,queryFn:c,enabled:s},t[5]=s,t[6]=o,t[7]=c,t[8]=d):d=t[8],u(d)},$=e=>{const a=l.c(3),t=!0;let i;a[0]===Symbol.for("react.memo_cache_sentinel")?(i=["analytics","tags"],a[0]=i):i=a[0];let n;return a[1]!==t?(n={queryKey:i,queryFn:f,enabled:t},a[1]=t,a[2]=n):n=a[2],u(n)};async function f(){const a=await(await y.v1.analytics.tags.$get()).json();return"data"in a?a.data:[]}export{w as a,D as b,b as c,q as d,$ as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,y as te}from"./index-FrTQ7TcS.js";const T={};function v(e,t){const n=a.useRef(T);return n.current===T&&(n.current=e(t)),n}const C=te[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],ne=C&&C!==a.useLayoutEffect?C:e=>e();function O(e){const t=v(oe).current;return t.next=e,ne(t.effect),t.trampoline}function oe(){const e={next:void 0,callback:re,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function re(){}const se=()=>{},ce=typeof document<"u"?a.useLayoutEffect:se;function B(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function A(e,t,n,r){const o=v(U).current;return ue(o,e,t,n,r)&&j(o,[e,t,n,r]),o.callback}function ie(e){const t=v(U).current;return ae(t,e)&&j(t,e),t.callback}function U(){return{callback:null,cleanup:null,refs:[]}}function ue(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function ae(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function j(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(r[o]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const i=r[o];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const le=parseInt(a.version,10);function fe(e){return le>=e}function L(e){if(!a.isValidElement(e))return null;const t=e,n=t.props;return(fe(19)?n?.ref:t.ref)??null}function k(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function de(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const s=t[r](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function pe(e,t){return typeof e=="function"?e(t):e}function be(e,t){return typeof e=="function"?e(t):e}const w={};function K(e,t,n,r,o){let s={...N(e,w)};return t&&(s=h(s,t)),n&&(s=h(s,n)),r&&(s=h(s,r)),s}function me(e){if(e.length===0)return w;if(e.length===1)return N(e[0],w);let t={...N(e[0],w)};for(let n=1;n<e.length;n+=1)t=h(t,e[n]);return t}function h(e,t){return V(t)?t(e):ye(e,t)}function ye(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=k(e.style,r);break}case"className":{e[n]=W(e.className,r);break}default:we(n,r)?e[n]=Ee(e[n],r):e[n]=r}}return e}function we(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function V(e){return typeof e=="function"}function N(e,t){return V(e)?e(t):e??w}function Ee(e,t){return t?e?n=>{if(he(n)){const o=n;D(o);const s=t(o);return o.baseUIHandlerPrevented||e?.(o),s}const r=t(n);return e?.(n),r}:t:e}function D(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function W(e,t){return t?e?t+" "+e:t:e}function he(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function We(){}const Fe=Object.freeze([]),m=Object.freeze({});function $e(e,t,n={}){const r=t.render,o=ge(t,n);if(n.enabled===!1)return null;const s=n.state??m;return Ce(e,r,o,s)}function ge(e,t={}){const{className:n,style:r,render:o}=e,{state:s=m,ref:i,props:f,stateAttributesMapping:p,enabled:u=!0}=t,b=u?pe(n,s):void 0,E=u?be(r,s):void 0,d=u?de(s,p):m,l=u?k(d,Array.isArray(f)?me(f):f)??m:m;return typeof document<"u"&&(u?Array.isArray(i)?l.ref=ie([l.ref,L(o),...i]):l.ref=A(l.ref,L(o),i):A(null,null)),u?(b!==void 0&&(l.className=W(l.className,b)),E!==void 0&&(l.style=k(l.style,E)),l):m}function Ce(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=K(n,t.props);return o.ref=n.ref,a.cloneElement(t,o)}if(e&&typeof e=="string")return ke(e,n);throw new Error(B(8))}function ke(e,t){return e==="button"?a.createElement("button",{type:"button",...t,key:t.key}):e==="img"?a.createElement("img",{alt:"",...t,key:t.key}):a.createElement(e,t)}function g(){return typeof window<"u"}function P(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ne(e){var t;return(t=(F(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function F(e){return g()?e instanceof Node||e instanceof y(e).Node:!1}function $(e){return g()?e instanceof Element||e instanceof y(e).Element:!1}function x(e){return g()?e instanceof HTMLElement||e instanceof y(e).HTMLElement:!1}function R(e){return!g()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof y(e).ShadowRoot}const De=new Set(["inline","contents"]);function _(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!De.has(o)}const Se=new Set(["table","td","th"]);function _e(e){return Se.has(P(e))}const ve=[":popover-open",":modal"];function Pe(e){return ve.some(t=>{try{return e.matches(t)}catch{return!1}})}const xe=["transform","translate","scale","rotate","perspective"],Ie=["transform","translate","scale","rotate","perspective","filter"],Te=["paint","layout","strict","content"];function Oe(e){const t=Ae(),n=$(e)?H(e):e;return xe.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Ie.some(r=>(n.willChange||"").includes(r))||Te.some(r=>(n.contain||"").includes(r))}function Ye(e){let t=S(e);for(;x(t)&&!Y(t);){if(Oe(t))return t;if(Pe(t))return null;t=S(t)}return null}function Ae(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Le=new Set(["html","body","#document"]);function Y(e){return Le.has(P(e))}function H(e){return y(e).getComputedStyle(e)}function He(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function S(e){if(P(e)==="html")return e;const t=e.assignedSlot||e.parentNode||R(e)&&e.host||Ne(e);return R(t)?t.host:t}function z(e){const t=S(e);return Y(t)?e.ownerDocument?e.ownerDocument.body:e.body:x(t)&&_(t)?t:z(t)}function M(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=z(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=y(o);if(s){const f=Re(i);return t.concat(i,i.visualViewport||[],_(o)?o:[],f&&n?M(f):[])}return t.concat(o,M(o,[],n))}function Re(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Me=a.createContext(void 0);function Be(e=!1){const t=a.useContext(Me);if(t===void 0&&!e)throw new Error(B(16));return t}function Ue(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:s}=e,i=r&&t!==!1,f=r&&t===!1;return{props:a.useMemo(()=>{const u={onKeyDown(b){n&&t&&b.key!=="Tab"&&b.preventDefault()}};return r||(u.tabIndex=o,!s&&n&&(u.tabIndex=t?o:-1)),(s&&(t||i)||!s&&n)&&(u["aria-disabled"]=n),s&&(!t||f)&&(u.disabled=n),u},[r,n,t,i,f,s,o])}}function ze(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,s=a.useRef(null),i=Be(!0)!==void 0,f=O(()=>{const d=s.current;return!!(d?.tagName==="A"&&d?.href)}),{props:p}=Ue({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:r,isNativeButton:o}),u=a.useCallback(()=>{const d=s.current;je(d)&&i&&t&&p.disabled===void 0&&d.disabled&&(d.disabled=!1)},[t,p.disabled,i]);ce(u,[u]);const b=a.useCallback((d={})=>{const{onClick:l,onMouseDown:G,onKeyUp:X,onKeyDown:q,onPointerDown:J,...Z}=d;return K({type:o?"button":void 0,onClick(c){if(t){c.preventDefault();return}l?.(c)},onMouseDown(c){t||G?.(c)},onKeyDown(c){if(t||(D(c),q?.(c)),c.baseUIHandlerPrevented)return;const Q=c.target===c.currentTarget&&!o&&!f()&&!t,I=c.key==="Enter",ee=c.key===" ";Q&&((ee||I)&&c.preventDefault(),I&&l?.(c))},onKeyUp(c){t||(D(c),X?.(c)),!c.baseUIHandlerPrevented&&c.target===c.currentTarget&&!o&&!t&&c.key===" "&&l?.(c)},onPointerDown(c){if(t){c.preventDefault();return}J?.(c)}},o?void 0:{role:"button"},p,Z)},[t,p,o,f]),E=O(d=>{s.current=d,u()});return{getButtonProps:b,buttonRef:E}}function je(e){return x(e)&&e.tagName==="BUTTON"}export{He as A,fe as B,R as C,F as D,m as E,We as N,O as a,v as b,$e as c,ze as d,A as e,B as f,y as g,Fe as h,Be as i,x as j,Y as k,S as l,K as m,$ as n,H as o,M as p,Ne as q,Re as r,Ae as s,Pe as t,ce as u,_e as v,Oe as w,Ye as x,P as y,_ as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s,t as n,i as o}from"./index-FrTQ7TcS.js";const a=["configs-list"],i=()=>{const e=s.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:a,queryFn:r},e[0]=t):t=e[0],n(t)};async function r(){return(await(await o.v1.configs.$get()).json()).data}export{a as q,i as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s,t as r,i as n}from"./index-FrTQ7TcS.js";const o=()=>["environments"],m=()=>{const t=s.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:o(),queryFn:i},t[0]=e):e=t[0],r(e)};function a(t){return{...t,isProd:t.isProd===!0||t.isProd===1||t.isProd==="true"}}async function i(){const e=await(await n.v1.environments.$get()).json();return("data"in e?e.data:[]).map(a)}export{o as g,m as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s}from"./index-FrTQ7TcS.js";import{g as h,n as b,j as M}from"./useButton-CsZ8hBM8.js";import{u as F,a9 as D,a1 as T,a as w,c as y,e as L,g as k,aa as O,ab as S,ac as x,ad as A,ae as C,f as B,h as K}from"./popupStateMapping-DolkyTT3.js";const g=A&&C;function H(i,R={}){const r="rootStore"in i?i.rootStore:i,{events:f,dataRef:E}=r.context,{enabled:o=!0,visibleOnly:v=!0}=R,a=s.useRef(!1),p=F(),l=s.useRef(!0);s.useEffect(()=>{const t=r.select("domReferenceElement");if(!o)return;const e=h(t);function u(){!r.select("open")&&M(t)&&t===T(x(t))&&(a.current=!0)}function c(){l.current=!0}function n(){l.current=!1}return e.addEventListener("blur",u),g&&(e.addEventListener("keydown",c,!0),e.addEventListener("pointerdown",n,!0)),()=>{e.removeEventListener("blur",u),g&&(e.removeEventListener("keydown",c,!0),e.removeEventListener("pointerdown",n,!0))}},[r,o]),s.useEffect(()=>{if(!o)return;function t(e){(e.reason===B||e.reason===K)&&(a.current=!0)}return f.on("openchange",t),()=>{f.off("openchange",t)}},[f,o]);const d=s.useMemo(()=>({onMouseLeave(){a.current=!1},onFocus(t){if(a.current)return;const e=k(t.nativeEvent);if(v&&b(e)){if(g&&!t.relatedTarget){if(!l.current&&!O(e))return}else if(!S(e))return}r.setOpen(!0,y(L,t.nativeEvent,t.currentTarget))},onBlur(t){a.current=!1;const e=t.relatedTarget,u=t.nativeEvent,c=b(e)&&e.hasAttribute(D("focus-guard"))&&e.getAttribute("data-type")==="outside";p.start(0,()=>{const n=r.select("domReferenceElement"),m=T(n?n.ownerDocument:document);!e&&m===n||w(E.current.floatingContext?.refs.floating.current,m)||w(n,m)||c||r.context.triggerElements.hasElement(t.relatedTarget)||r.setOpen(!1,y(L,u))})}}),[E,r,v,p]);return s.useMemo(()=>o?{reference:d,trigger:d}:{},[o,d])}export{H as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as C,x as ge}from"./index-FrTQ7TcS.js";import{a as W,u as oe,n as ie,o as pe,j as he,E as Ee}from"./useButton-CsZ8hBM8.js";import{i as Z,a9 as ye,u as ce,af as ve,S as fe,I as be,c as U,t as G,ac as ee,g as de,a0 as te,a as q,T as Re,ag as Pe,a8 as Te,M as Me}from"./popupStateMapping-DolkyTT3.js";import{r as ue}from"./getDisabledMountTransitionStyles-TZFYxPIU.js";function ne(r,e,n){if(n&&!Z(n))return 0;if(typeof r=="number")return r;if(typeof r=="function"){const o=r();return typeof o=="number"?o:o?.[e]}return r?.[e]}const se=ye("safe-polygon"),Le=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${ve}`;function we(r){return r?!!r.closest(Le):!1}function me(r){const e=C.useRef(void 0),n=C.useRef(!1),o=C.useRef(void 0),f=C.useRef(!0),d=C.useRef(!1),E=C.useRef(()=>{}),S=C.useRef(!1),m=ce(),A=ce(),M=C.useRef(void 0);return C.useMemo(()=>{const u=r.context.dataRef.current;return u.hoverInteractionState||(u.hoverInteractionState={pointerTypeRef:e,interactedInsideRef:n,handlerRef:o,blockMouseMoveRef:f,performedPointerEventsMutationRef:d,unbindMouseMoveRef:E,restTimeoutPendingRef:S,openChangeTimeout:m,restTimeout:A,handleCloseOptionsRef:M}),u.hoverInteractionState},[r,e,n,o,f,d,E,S,m,A,M])}const Ce=new Set(["click","mousedown"]);function He(r,e={}){const n="rootStore"in r?r.rootStore:r,o=n.useState("open"),f=n.useState("floatingElement"),d=n.useState("domReferenceElement"),{dataRef:E}=n.context,{enabled:S=!0,closeDelay:m=0,externalTree:A}=e,{pointerTypeRef:M,interactedInsideRef:u,handlerRef:R,performedPointerEventsMutationRef:g,unbindMouseMoveRef:O,restTimeoutPendingRef:v,openChangeTimeout:B,handleCloseOptionsRef:y}=me(n),P=fe(A),F=be(),D=W(()=>u.current?!0:E.current.openEvent?Ce.has(E.current.openEvent.type):!1),x=W(()=>{const i=E.current.openEvent?.type;return i?.includes("mouse")&&i!=="mousedown"}),k=C.useCallback((i,I=!0)=>{const s=Se(m,M.current);s&&!R.current?B.start(s,()=>n.setOpen(!1,U(G,i))):I&&(B.clear(),n.setOpen(!1,U(G,i)))},[m,R,n,M,B]),b=W(()=>{O.current(),R.current=void 0}),Y=W(()=>{if(g.current){const i=ee(f).body;i.style.pointerEvents="",i.removeAttribute(se),g.current=!1}}),T=W(i=>{const I=de(i);if(!we(I)){u.current=!1;return}u.current=!0});oe(()=>{o||(M.current=void 0,v.current=!1,u.current=!1,b(),Y())},[o,M,v,u,b,Y]),C.useEffect(()=>()=>{b()},[b]),C.useEffect(()=>Y,[Y]),oe(()=>{if(S&&o&&y.current?.blockPointerEvents&&x()&&ie(d)&&f){g.current=!0;const i=ee(f).body;i.setAttribute(se,"");const I=d,s=f,t=P?.nodesRef.current.find(L=>L.id===F)?.context?.elements.floating;return t&&(t.style.pointerEvents=""),i.style.pointerEvents="none",I.style.pointerEvents="auto",s.style.pointerEvents="auto",()=>{i.style.pointerEvents="",I.style.pointerEvents="",s.style.pointerEvents=""}}},[S,o,d,f,y,x,P,F,g]),C.useEffect(()=>{if(!S)return;function i(L){if(D()||!E.current.floatingContext||!n.select("open"))return;const z=n.context.triggerElements;L.relatedTarget&&z.hasElement(L.relatedTarget)||(Y(),b(),D()||k(L))}function I(L){B.clear(),Y(),R.current?.(L),b()}function s(L){D()||k(L,!1)}const t=f;return t&&(t.addEventListener("mouseleave",i),t.addEventListener("mouseenter",I),t.addEventListener("mouseleave",s),t.addEventListener("pointerdown",T,!0)),()=>{t&&(t.removeEventListener("mouseleave",i),t.removeEventListener("mouseenter",I),t.removeEventListener("mouseleave",s),t.removeEventListener("pointerdown",T,!0))}})}function Se(r,e){return e&&!Z(e)?0:typeof r=="function"?r():r}function re(r){return typeof r=="function"?r():r}const Oe={current:null};function Be(r,e={}){const n="rootStore"in r?r.rootStore:r,{dataRef:o,events:f}=n.context,{enabled:d=!0,delay:E=0,handleClose:S=null,mouseOnly:m=!1,restMs:A=0,move:M=!0,triggerElementRef:u=Oe,externalTree:R,isActiveTrigger:g=!0}=e,O=fe(R),{pointerTypeRef:v,interactedInsideRef:B,handlerRef:y,blockMouseMoveRef:P,performedPointerEventsMutationRef:F,unbindMouseMoveRef:D,restTimeoutPendingRef:x,openChangeTimeout:k,restTimeout:b,handleCloseOptionsRef:Y}=me(n),T=te(S),i=te(E),I=te(A);g&&(Y.current=T.current?.__options);const s=W(()=>B.current?!0:o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1),t=C.useCallback((l,c=!0)=>{const w=ne(i.current,"close",v.current);w&&!y.current?k.start(w,()=>n.setOpen(!1,U(G,l))):c&&(k.clear(),n.setOpen(!1,U(G,l)))},[i,y,n,v,k]),L=W(()=>{D.current(),y.current=void 0}),z=W(()=>{if(F.current){const l=ee(n.select("domReferenceElement")).body;l.style.pointerEvents="",l.removeAttribute(se),F.current=!1}});C.useEffect(()=>{if(!d)return;function l(c){c.open||(k.clear(),b.clear(),P.current=!0,x.current=!1)}return f.on("openchange",l),()=>{f.off("openchange",l)}},[d,f,k,b,P,x]);const X=W(l=>{if(s()||!o.current.floatingContext)return;const c=n.context.triggerElements;if(l.relatedTarget&&c.hasElement(l.relatedTarget))return;const w=u.current;T.current?.({...o.current.floatingContext,tree:O,x:l.clientX,y:l.clientY,onClose(){z(),L(),!s()&&w===n.select("domReferenceElement")&&t(l)}})(l)});return C.useEffect(()=>{if(!d)return;const l=u.current??(g?n.select("domReferenceElement"):null);if(!ie(l))return;function c(p){if(k.clear(),P.current=!1,m&&!Z(v.current)||re(I.current)>0&&!ne(i.current,"open"))return;const _=ne(i.current,"open",v.current),$=n.select("domReferenceElement"),H=n.context.triggerElements,V=(H.hasElement(p.target)||H.hasMatchingElement(N=>q(N,p.target)))&&(!$||!q($,p.target)),a=p.currentTarget??null,h=!n.select("open")||V;_?k.start(_,()=>{h&&n.setOpen(!0,U(G,p,a))}):h&&n.setOpen(!0,U(G,p,a))}function w(p){if(s()){z();return}D.current();const _=n.select("domReferenceElement"),$=ee(_);b.clear(),x.current=!1;const H=n.context.triggerElements;if(p.relatedTarget&&H.hasElement(p.relatedTarget))return;if(T.current&&o.current.floatingContext){n.select("open")||k.clear();const a=u.current;y.current=T.current({...o.current.floatingContext,tree:O,x:p.clientX,y:p.clientY,onClose(){z(),L(),!s()&&a===n.select("domReferenceElement")&&t(p,!0)}});const h=y.current;h(p),$.addEventListener("mousemove",h),D.current=()=>{$.removeEventListener("mousemove",h)};return}(v.current==="touch"?!q(n.select("floatingElement"),p.relatedTarget):!0)&&t(p)}function j(p){X(p)}return n.select("open")&&l.addEventListener("mouseleave",j),M&&l.addEventListener("mousemove",c,{once:!0}),l.addEventListener("mouseenter",c),l.addEventListener("mouseleave",w),()=>{l.removeEventListener("mouseleave",j),M&&l.removeEventListener("mousemove",c),l.removeEventListener("mouseenter",c),l.removeEventListener("mouseleave",w)}},[L,z,P,o,i,t,n,d,T,X,g,s,m,M,v,I,b,x,k,u,O,D,y]),C.useMemo(()=>{function l(c){v.current=c.pointerType}return{onPointerDown:l,onPointerEnter:l,onMouseMove(c){const{nativeEvent:w}=c,j=c.currentTarget,p=n.select("domReferenceElement"),_=n.context.triggerElements,$=n.select("open"),H=(_.hasElement(c.target)||_.hasMatchingElement(a=>q(a,c.target)))&&(!p||!q(p,c.target));if(m&&!Z(v.current)||$&&!H||re(I.current)===0||!H&&x.current&&c.movementX**2+c.movementY**2<2)return;b.clear();function V(){!P.current&&(!$||H)&&n.setOpen(!0,U(G,w,j))}v.current==="touch"?ge.flushSync(()=>{V()}):H&&$?V():(x.current=!0,b.start(re(I.current),V))}}},[P,m,n,v,I,b,x])}function le(r,e){const[n,o]=r;let f=!1;const d=e.length;for(let E=0,S=d-1;E<d;S=E++){const[m,A]=e[E]||[0,0],[M,u]=e[S]||[0,0];A>=o!=u>=o&&n<=(M-m)*(o-A)/(u-A)+m&&(f=!f)}return f}function ke(r,e){return r[0]>=e.x&&r[0]<=e.x+e.width&&r[1]>=e.y&&r[1]<=e.y+e.height}function Ye(r={}){const{buffer:e=.5,blockPointerEvents:n=!1,requireIntent:o=!0}=r,f=new Re;let d=!1,E=null,S=null,m=typeof performance<"u"?performance.now():0;function A(u,R){const g=performance.now(),O=g-m;if(E===null||S===null||O===0)return E=u,S=R,m=g,null;const v=u-E,B=R-S,P=Math.sqrt(v*v+B*B)/O;return E=u,S=R,m=g,P}const M=({x:u,y:R,placement:g,elements:O,onClose:v,nodeId:B,tree:y})=>function(F){function D(){f.clear(),v()}if(f.clear(),!O.domReference||!O.floating||g==null||u==null||R==null)return;const{clientX:x,clientY:k}=F,b=[x,k],Y=de(F),T=F.type==="mouseleave",i=q(O.floating,Y),I=q(O.domReference,Y),s=O.domReference.getBoundingClientRect(),t=O.floating.getBoundingClientRect(),L=g.split("-")[0],z=u>t.right-t.width/2,X=R>t.bottom-t.height/2,l=ke(b,s),c=t.width>s.width,w=t.height>s.height,j=(c?s:t).left,p=(c?s:t).right,_=(w?s:t).top,$=(w?s:t).bottom;if(i&&(d=!0,!T))return;if(I&&(d=!1),I&&!T){d=!0;return}if(T&&ie(F.relatedTarget)&&q(O.floating,F.relatedTarget)||y&&Pe(y.nodesRef.current,B).some(({context:a})=>a?.open))return;if(L==="top"&&R>=s.bottom-1||L==="bottom"&&R<=s.top+1||L==="left"&&u>=s.right-1||L==="right"&&u<=s.left+1)return D();let H=[];switch(L){case"top":H=[[j,s.top+1],[j,t.bottom-1],[p,t.bottom-1],[p,s.top+1]];break;case"bottom":H=[[j,t.top+1],[j,s.bottom-1],[p,s.bottom-1],[p,t.top+1]];break;case"left":H=[[t.right-1,$],[t.right-1,_],[s.left+1,_],[s.left+1,$]];break;case"right":H=[[s.right-1,$],[s.right-1,_],[t.left+1,_],[t.left+1,$]];break}function V([a,h]){switch(L){case"top":{const N=[c?a+e/2:z?a+e*4:a-e*4,h+e+1],J=[c?a-e/2:z?a+e*4:a-e*4,h+e+1],K=[[t.left,z||c?t.bottom-e:t.top],[t.right,z?c?t.bottom-e:t.top:t.bottom-e]];return[N,J,...K]}case"bottom":{const N=[c?a+e/2:z?a+e*4:a-e*4,h-e],J=[c?a-e/2:z?a+e*4:a-e*4,h-e],K=[[t.left,z||c?t.top+e:t.bottom],[t.right,z?c?t.top+e:t.bottom:t.top+e]];return[N,J,...K]}case"left":{const N=[a+e+1,w?h+e/2:X?h+e*4:h-e*4],J=[a+e+1,w?h-e/2:X?h+e*4:h-e*4];return[...[[X||w?t.right-e:t.left,t.top],[X?w?t.right-e:t.left:t.right-e,t.bottom]],N,J]}case"right":{const N=[a-e,w?h+e/2:X?h+e*4:h-e*4],J=[a-e,w?h-e/2:X?h+e*4:h-e*4],K=[[X||w?t.left+e:t.right,t.top],[X?w?t.left+e:t.right:t.left+e,t.bottom]];return[N,J,...K]}default:return[]}}if(!le([x,k],H)){if(d&&!l)return D();if(!T&&o){const a=A(F.clientX,F.clientY);if(a!==null&&a<.1)return D()}le([x,k],V([u,R]))?!d&&o&&f.start(40,D):D()}};return M.__options={blockPointerEvents:n},M}function ae(r){const e=pe(r);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const f=he(r),d=f?r.offsetWidth:n,E=f?r.offsetHeight:o;return(ue(n)!==d||ue(o)!==E)&&(n=d,o=E),{width:n,height:o}}const Ie=typeof ResizeObserver<"u",xe=()=>!0;function $e(r){const{popupElement:e,positionerElement:n,content:o,mounted:f,enabled:d=xe,onMeasureLayout:E,onMeasureLayoutComplete:S,side:m,direction:A}=r,M=C.useRef(!0),u=Te(e,!0,!1),R=Me(),g=C.useRef(null),O=W(E),v=W(S),B=C.useMemo(()=>{let y=m==="top",P=m==="left";return A==="rtl"?(y=y||m==="inline-end",P=P||m==="inline-end"):(y=y||m==="inline-start",P=P||m==="inline-start"),y?{position:"absolute",[m==="top"?"bottom":"top"]:"0",[P?"right":"left"]:"0"}:Ee},[m,A]);oe(()=>{if(!f||!d()||!Ie){M.current=!0,g.current=null;return}if(!e||!n)return;Object.entries(B).forEach(([T,i])=>{e.style.setProperty(T,i)});const y=new ResizeObserver(T=>{const i=T[0];i&&(g.current===null?g.current={width:Math.ceil(i.borderBoxSize[0].inlineSize),height:Math.ceil(i.borderBoxSize[0].blockSize)}:(g.current.width=Math.ceil(i.borderBoxSize[0].inlineSize),g.current.height=Math.ceil(i.borderBoxSize[0].blockSize)))});y.observe(e),e.style.setProperty("--popup-width","auto"),e.style.setProperty("--popup-height","auto");const P=Q(e,"position","static"),F=Q(e,"transform","none"),D=Q(e,"scale","1"),x=Q(n,"--available-width","max-content"),k=Q(n,"--available-height","max-content");if(O?.(),M.current||g.current===null){n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const T=ae(e);return n.style.setProperty("--positioner-width",`${T.width}px`),n.style.setProperty("--positioner-height",`${T.height}px`),P(),F(),D(),x(),k(),v?.(null,T),M.current=!1,()=>{y.disconnect()}}e.style.setProperty("--popup-width","auto"),e.style.setProperty("--popup-height","auto"),n.style.setProperty("--positioner-width","max-content"),n.style.setProperty("--positioner-height","max-content");const b=ae(e);e.style.setProperty("--popup-width",`${g.current.width}px`),e.style.setProperty("--popup-height",`${g.current.height}px`),P(),F(),x(),k(),v?.(g.current,b),n.style.setProperty("--positioner-width",`${b.width}px`),n.style.setProperty("--positioner-height",`${b.height}px`);const Y=new AbortController;return R.request(()=>{e.style.setProperty("--popup-width",`${b.width}px`),e.style.setProperty("--popup-height",`${b.height}px`),u(()=>{e.style.setProperty("--popup-width","auto"),e.style.setProperty("--popup-height","auto")},Y.signal)}),()=>{y.disconnect(),Y.abort(),R.cancel()}},[o,e,n,u,R,d,f,O,v,B])}function Q(r,e,n){const o=r.style.getPropertyValue(e);return r.style.setProperty(e,n),()=>{r.style.setProperty(e,o)}}export{$e as a,He as b,ne as g,Ye as s,Be as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n}from"./index-FrTQ7TcS.js";import{J as T,ah as W,I as C}from"./popupStateMapping-DolkyTT3.js";import{E as F}from"./useButton-CsZ8hBM8.js";const R="ArrowUp",E="ArrowDown",S="ArrowLeft",I="ArrowRight",A="Home",w="End",H=new Set([S,I]),N=new Set([R,E]),Y=new Set([...H,...N]);[...Y];const J=new Set([R,E,S,I,A,w]),h=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function U(c,O={}){const s="rootStore"in c?c.rootStore:c,a=s.useState("open"),u=s.useState("floatingId"),M=s.useState("domReferenceElement"),d=s.useState("floatingElement"),{enabled:m=!0,role:o="dialog"}=O,x=T(),l=M?.id||x,t=n.useMemo(()=>W(d)?.id||u,[d,u]),e=h.get(o)??o,p=C()!=null,i=n.useMemo(()=>e==="tooltip"||o==="label"?F:{"aria-haspopup":e==="alertdialog"?"dialog":e,"aria-expanded":"false",...e==="listbox"&&{role:"combobox"},...e==="menu"&&p&&{role:"menuitem"},...o==="select"&&{"aria-autocomplete":"none"},...o==="combobox"&&{"aria-autocomplete":"list"}},[e,p,o]),f=n.useMemo(()=>e==="tooltip"||o==="label"?{[`aria-${o==="label"?"labelledby":"describedby"}`]:a?t:void 0}:{...i,"aria-expanded":a?"true":"false","aria-controls":a?t:void 0,...e==="menu"&&{id:l}},[e,t,a,l,o,i]),b=n.useMemo(()=>{const r={id:t,...e&&{role:e}};return e==="tooltip"||o==="label"?r:{...r,...e==="menu"&&{"aria-labelledby":l}}},[e,t,l,o]),g=n.useCallback(({active:r,selected:_})=>{const P={role:"option",...r&&{id:`${t}-fui-option`}};switch(o){case"select":case"combobox":return{...P,"aria-selected":_}}return{}},[t,o]);return n.useMemo(()=>m?{reference:f,floating:b,item:g,trigger:i}:{},[m,f,b,i,g])}export{S as A,J as C,w as E,A as H,E as a,I as b,R as c,U as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as f}from"./index-FrTQ7TcS.js";import{a as T,u as m,E as p,b as S,n as C}from"./useButton-CsZ8hBM8.js";import{ai as x,s as I,aj as E,P as O,d as i,J as P,I as R}from"./popupStateMapping-DolkyTT3.js";function y(e,n){const t=f.useRef(null);return f.useCallback(o=>{e!==void 0&&(t.current!==null&&(n.context.triggerElements.delete(t.current),t.current=null),o!==null&&(t.current=e,n.context.triggerElements.add(e,o)))},[n,e])}function F(e,n,t,o){const r=t.useState("isMountedByTrigger",e),l=y(e,t),s=T(a=>{l(a),a!==null&&t.select("open")&&t.select("activeTriggerId")==null&&t.update({activeTriggerId:e,activeTriggerElement:a,...o})});return m(()=>{r&&t.update({activeTriggerElement:n.current,...o})},[r,t,n,...Object.values(o)]),{registerTrigger:s,isMountedByThisTrigger:r}}function w(e){const n=e.useState("open");m(()=>{if(n&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const t=e.context.triggerElements.entries().next();if(!t.done){const[o,r]=t.value;e.update({activeTriggerId:o,activeTriggerElement:r})}}},[n,e])}function U(e,n,t){const{mounted:o,setMounted:r,transitionStatus:l}=x(e);n.useSyncedValues({mounted:o,transitionStatus:l});const s=T(()=>{r(!1),n.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),t?.(),n.context.onOpenChangeComplete?.(!1)}),a=n.useState("preventUnmountingOnClose");return I({enabled:!a,open:e,ref:n.context.popupRef,onComplete(){e||s()}}),{forceUnmount:s,transitionStatus:l}}function b(){return new E({open:!1,floatingElement:null,referenceElement:null,triggerElements:new O,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function A(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:b(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:p,inactiveTriggerProps:p,popupProps:p}}const j={open:i(e=>e.open),mounted:i(e=>e.mounted),transitionStatus:i(e=>e.transitionStatus),floatingRootContext:i(e=>e.floatingRootContext),preventUnmountingOnClose:i(e=>e.preventUnmountingOnClose),payload:i(e=>e.payload),activeTriggerId:i(e=>e.activeTriggerId),activeTriggerElement:i(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:i((e,n)=>n!==void 0&&e.activeTriggerId===n),isOpenedByTrigger:i((e,n)=>n!==void 0&&e.activeTriggerId===n&&e.open),isMountedByTrigger:i((e,n)=>n!==void 0&&e.activeTriggerId===n&&e.mounted),triggerProps:i((e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:i(e=>e.popupProps),popupElement:i(e=>e.popupElement),positionerElement:i(e=>e.positionerElement)};function k(e){const{popupStore:n,noEmit:t=!1,treatPopupAsFloatingElement:o=!1,onOpenChange:r}=e,l=P(),s=R()!=null,a=n.useState("open"),g=n.useState("activeTriggerElement"),c=n.useState(o?"popupElement":"positionerElement"),v=n.context.triggerElements,u=S(()=>new E({open:a,referenceElement:g,floatingElement:c,triggerElements:v,onOpenChange:r,floatingId:l,nested:s,noEmit:t})).current;return m(()=>{const d={open:a,floatingId:l,referenceElement:g,floatingElement:c};C(g)&&(d.domReferenceElement=g),u.update(d)},[a,l,g,c,u]),u.context.onOpenChange=r,u.context.nested=s,u.context.noEmit=t,u}export{w as a,U as b,A as c,F as d,y as e,j as p,k as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l,t as o,i}from"./index-FrTQ7TcS.js";const p=t=>["targeting-rules",t],g=t=>{const e=l.c(8);let s;e[0]!==t?(s=p(t),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const u=await(await i.v1.targeting.config[":configId"].$get({param:{configId:t}})).json();return"data"in u?u.data:[]},e[2]=t,e[3]=a):a=e[3];const n=!!t;let r;return e[4]!==s||e[5]!==a||e[6]!==n?(r={queryKey:s,queryFn:a,enabled:n},e[4]=s,e[5]=a,e[6]=n,e[7]=r):r=e[7],o(r)};export{p as g,g as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r}from"./index-FrTQ7TcS.js";import{N as a,a as u,u as n}from"./useButton-CsZ8hBM8.js";const c=r.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:a,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function m(){return r.useContext(c)}function C(e,s){const t=r.useRef(e),o=u(s);n(()=>{t.current!==e&&o(t.current)},[e,o]),n(()=>{t.current=e},[e])}export{c as F,m as a,C as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v,K as g,g as C,d as y,j as s,M as b,I as V}from"./index-FrTQ7TcS.js";import{B as I}from"./button-CMZqhyXB.js";import{b as p,e as c,a as T,c as x,T as N,d as _}from"./table-DggTSlPh.js";import{u as $}from"./useConfigVariants-CLc_hPw1.js";import{v as k,a as R}from"./variants.css-rCWHZycz.js";import{P as w}from"./plus-JQ0TORpd.js";/* empty css */import"./useButton-CsZ8hBM8.js";function U(){const e=v.c(18),{id:a}=g.useParams(),j=C(),{data:d,isLoading:u}=$(a),i=y();if(u){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{children:"Loading variants..."}),e[0]=n):n=e[0],n}let t;e[1]!==a||e[2]!==i?(t=()=>{i({to:"/configs/$id/variants/$variant",params:{id:a,variant:"new"}})},e[1]=a,e[2]=i,e[3]=t):t=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(V,{icon:w}),e[4]=m):m=e[4];let r;e[5]!==t?(r=s.jsx("div",{className:k,children:s.jsxs(I,{variant:"ghost",onClick:t,children:[m,"Add Variant"]})}),e[5]=t,e[6]=r):r=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(T,{children:s.jsxs(p,{children:[s.jsx(x,{children:"Name"}),s.jsx(x,{children:"Provider"}),s.jsx(x,{children:"Model"}),s.jsx(x,{children:"Current Version"})]})}),e[7]=f):f=e[7];let o;e[8]!==a||e[9]!==d||e[10]!==i||e[11]!==j?(o=d&&d.length>0?d.map(n=>s.jsxs(p,{interactive:!0,onMouseEnter:()=>{j.prefetchQuery(b(n.variantId))},onClick:()=>i({to:"/configs/$id/variants/$variant",params:{id:a,variant:n.variantId}}),children:[s.jsx(c,{children:n.name||"Unnamed Variant"}),s.jsx(c,{children:n.provider||"Unknown"}),s.jsx(c,{children:n.modelName||"Unknown"}),s.jsx(c,{children:n.latestVersion?.version?`v${n.latestVersion.version}`:"-"})]},n.variantId)):s.jsx(p,{children:s.jsx(c,{colSpan:4,style:{textAlign:"center",padding:"2rem"},children:'No variants added yet. Click "Add Variant" to get started.'})}),e[8]=a,e[9]=d,e[10]=i,e[11]=j,e[12]=o):o=e[12];let l;e[13]!==o?(l=s.jsxs(N,{children:[f,s.jsx(_,{children:o})]}),e[13]=o,e[14]=l):l=e[14];let h;return e[15]!==r||e[16]!==l?(h=s.jsxs("div",{className:R,children:[r,l]}),e[15]=r,e[16]=l,e[17]=h):h=e[17],h}export{U as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./index-FrTQ7TcS.js";var r="tye0o0",t="tye0o1";export{r as a,t as v};
|