@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s}from"./index-C1Qc7Z7W.js";const e=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],t=s("plus",e);export{t as P};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,a5 as z,a6 as pe,a7 as de,_ as ge,a8 as F,a9 as fe,ac as Y,af as D,ag as me,bF as he,H as Q,bG as W,aa as Ce,bm as be,ad as ve,j as f,bH as Pe,aQ as Te,ai as Ee,aj as xe,aS as Re,X,an as Se,ab as Oe,al as ye,aR as Ie,am as re,bI as Me,ao as Fe,ap as ke,aq as je,ar as we,a$ as Ae,aT as He,bJ as Ne,at as Le,as as J,b0 as Be,$ as te,bK as Ge,bL as _e,bM as Ke,a3 as Ue,bN as $e,bO as oe,aY as qe,au as Ve,bP as ze,bQ as Ye,av as De,aw as Qe,V as We,ax as ae,ay as ie,aZ as Xe,a_ as Je,bR as Ze,bS as et,az as tt,aA as ot,aB as nt,aC as st,aW as rt,aX as at,bT as it,c as Z,h as ct}from"./index-C1Qc7Z7W.js";import{u as lt}from"./usePopupAutoResize-CaO9EPHk.js";const ce=r.createContext(void 0);function q(n){const e=r.useContext(ce);if(e===void 0&&!n)throw new Error(z(47));return e}function ut(){return{...ve(),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 pt={...fe,disabled:F(n=>n.disabled),instantType:F(n=>n.instantType),openMethod:F(n=>n.openMethod),openChangeReason:F(n=>n.openChangeReason),modal:F(n=>n.modal),stickIfOpen:F(n=>n.stickIfOpen),titleElementId:F(n=>n.titleElementId),descriptionElementId:F(n=>n.descriptionElementId),openOnHover:F(n=>n.openOnHover),closeDelay:F(n=>n.closeDelay)};class ee extends pe{constructor(e){const t={...ut(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),stickIfOpenTimeout:new ge,triggerElements:new de},pt)}setOpen=(e,t)=>{const a=t.reason===Y,h=t.reason===D&&t.event.detail===0,i=!e&&(t.reason===me||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},s=t.trigger?.id??null;(s||e)&&(l.activeTriggerId=s,l.activeTriggerElement=t.trigger??null),this.update(l)};a?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(he,()=>{this.set("stickIfOpen",!1)}),Q.flushSync(o)):o(),h||i?this.set("instantType",h?"click":"dismiss"):t.reason===W?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){const a=Ce(()=>e??new ee(t)).current;return be(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:P,triggerId:o,defaultTriggerId:l=null}=n,s=ee.useStore(P?.store,{open:t??a,modal:p,activeTriggerId:o!==void 0?o:l});s.useControlledProp("open",t,a),s.useControlledProp("activeTriggerId",o,l);const m=s.useState("open"),d=s.useState("positionerElement"),b=s.useState("payload"),C=s.useState("openChangeReason");s.useContextCallback("onOpenChange",h),s.useContextCallback("onOpenChangeComplete",i);const{openMethod:c,triggerProps:T,reset:w}=Te(m);Ee(s);const{forceUnmount:u}=xe(m,s,()=>{s.update({stickIfOpen:!0,openChangeReason:null}),w()});Re(m&&p===!0&&C!==Y&&c!=="touch",d),r.useEffect(()=>{m||s.context.stickIfOpenTimeout.clear()},[s,m]);const k=r.useCallback(L=>{const O=X(L);return O.preventUnmountOnClose=()=>{s.set("preventUnmountingOnClose",!0)},O},[s]),E=r.useCallback(()=>{s.setOpen(!1,k(Se))},[s,k]);r.useImperativeHandle(n.actionsRef,()=>({unmount:u,close:E}),[u,E]);const I=Oe({popupStore:s,onOpenChange:s.setOpen}),M=ye(I,{outsidePressEvent:{mouse:p==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),x=Ie(I),{getReferenceProps:A,getFloatingProps:j,getTriggerProps:S}=re([M,x]),B=r.useMemo(()=>A(T),[A,T]),H=r.useMemo(()=>S(T),[S,T]),G=r.useMemo(()=>j(),[j]);s.useSyncedValues({modal:p,openMethod:c,activeTriggerProps:B,inactiveTriggerProps:H,popupProps:G,floatingRootContext:I,nested:Me()!=null});const N=r.useMemo(()=>({store:s}),[s]);return f.jsx(ce.Provider,{value:N,children:typeof e=="function"?e({payload:b}):e})}function dt(n){return q(!0)?f.jsx(ne,{props:n}):f.jsx(Pe,{children:f.jsx(ne,{props:n})})}const gt=300,se=r.forwardRef(function(e,t){const{render:a,className:h,disabled:i=!1,nativeButton:p=!0,handle:P,payload:o,openOnHover:l=!1,delay:s=gt,closeDelay:m=0,id:d,...b}=e,C=q(!0),c=P?.store??C?.store;if(!c)throw new Error(z(74));const T=Fe(d),w=c.useState("isTriggerActive",T),u=c.useState("floatingRootContext"),k=c.useState("isOpenedByTrigger",T),E=r.useRef(null),{registerTrigger:I,isMountedByThisTrigger:M}=ke(T,E,c,{payload:o,disabled:i,openOnHover:l,closeDelay:m}),x=c.useState("openChangeReason"),A=c.useState("stickIfOpen"),j=c.useState("openMethod"),S=je(u,{enabled:u!=null&&l&&(j!=="touch"||x!==D),mouseOnly:!0,move:!1,handleClose:we(),restMs:s,delay:{close:m},triggerElementRef:E,isActiveTrigger:w}),B=Ae(u,{enabled:u!=null,stickIfOpen:A}),H=re([B]),G=c.useState("triggerProps",M),N=r.useMemo(()=>({disabled:i,open:k}),[i,k]),{getButtonProps:L,buttonRef:O}=He({disabled:i,native:p}),K=r.useMemo(()=>({open(g){return g&&x===D?Ne.open(g):Le.open(g)}}),[x]),R=J("button",e,{state:N,ref:[O,t,I,E],props:[H.getReferenceProps(),S,G,{[Be]:"",id:T},b,L],stateAttributesMapping:K}),_=r.useRef(null),U=te(g=>{Q.flushSync(()=>{c.setOpen(!1,X(W,g.nativeEvent,g.currentTarget))}),Ge(_.current)?.focus()}),$=te(g=>{const v=c.select("positionerElement");if(v&&_e(g,v))c.context.beforeContentFocusGuardRef.current?.focus();else{Q.flushSync(()=>{c.setOpen(!1,X(W,g.nativeEvent,g.currentTarget))});let y=Ke(E.current);for(;y!==null&&Ue(v,y)||y?.hasAttribute("aria-hidden");){const V=y;if(y=$e(y),y===V)break}y?.focus()}});return w?f.jsxs(r.Fragment,{children:[f.jsx(oe,{ref:_,onFocus:U}),f.jsx(r.Fragment,{children:R},T),f.jsx(oe,{ref:c.context.triggerFocusTargetRef,onFocus:$})]}):f.jsx(r.Fragment,{children:R},T)}),le=r.createContext(void 0);function ft(){const n=r.useContext(le);if(n===void 0)throw new Error(z(45));return n}const mt=r.forwardRef(function(e,t){const{keepMounted:a=!1,...h}=e,{store:i}=q();return i.useState("mounted")||a?f.jsx(le.Provider,{value:a,children:f.jsx(qe,{ref:t,...h,renderGuards:!1})}):null}),ue=r.createContext(void 0);function ht(){const n=r.useContext(ue);if(!n)throw new Error(z(46));return n}const Ct=r.forwardRef(function(e,t){const{render:a,className:h,anchor:i,positionMethod:p="absolute",side:P="bottom",align:o="center",sideOffset:l=0,alignOffset:s=0,collisionBoundary:m="clipping-ancestors",collisionPadding:d=5,arrowPadding:b=5,sticky:C=!1,disableAnchorTracking:c=!1,collisionAvoidance:T=Ve,...w}=e,{store:u}=q(),k=ft(),E=ze(),I=u.useState("floatingRootContext"),M=u.useState("mounted"),x=u.useState("open"),A=u.useState("openChangeReason"),j=u.useState("activeTriggerElement"),S=u.useState("modal"),B=u.useState("positionerElement"),H=u.useState("instantType"),G=u.useState("transitionStatus"),N=r.useRef(null),L=Ye(B,!1,!1),O=De({anchor:i,floatingRootContext:I,positionMethod:p,mounted:M,side:P,sideOffset:l,align:o,alignOffset:s,arrowPadding:b,collisionBoundary:m,collisionPadding:d,sticky:C,disableAnchorTracking:c,keepMounted:k,nodeId:E,collisionAvoidance:T,adaptiveOrigin:Qe}),K=r.useMemo(()=>{const v={};return x||(v.pointerEvents="none"),{role:"presentation",hidden:!M,style:{...O.positionerStyles,...v}}},[x,M,O.positionerStyles]),R=r.useMemo(()=>({props:K,...O}),[K,O]),_=I?.select("domReferenceElement");We(()=>{const v=_,y=N.current;if(v&&(N.current=v),y&&v&&v!==y){u.set("instantType",void 0);const V=new AbortController;return L(()=>{u.set("instantType","trigger-change")},V.signal),()=>{V.abort()}}},[_,L,u]);const U=r.useMemo(()=>({open:x,side:R.side,align:R.align,anchorHidden:R.anchorHidden,instant:H}),[x,R.side,R.align,R.anchorHidden,H]),$=r.useCallback(v=>{u.set("positionerElement",v)},[u]),g=J("div",e,{state:U,props:[R.props,ae(G),w],ref:[t,$],stateAttributesMapping:ie});return f.jsxs(ue.Provider,{value:R,children:[M&&S===!0&&A!==Y&&f.jsx(Xe,{ref:u.context.internalBackdropRef,inert:Je(!x),cutout:j}),f.jsx(Ze,{id:E,children:g})]})}),bt={...ie,...st},vt=r.forwardRef(function(e,t){const{className:a,render:h,initialFocus:i,finalFocus:p,...P}=e,{store:o}=q(),l=ht(),s=et()!=null,m=tt(),d=o.useState("open"),b=o.useState("openMethod"),C=o.useState("instantType"),c=o.useState("transitionStatus"),T=o.useState("popupProps"),w=o.useState("titleElementId"),u=o.useState("descriptionElementId"),k=o.useState("modal"),E=o.useState("mounted"),I=o.useState("openChangeReason"),M=o.useState("popupElement"),x=o.useState("payload"),A=o.useState("positionerElement"),j=o.useState("activeTriggerElement"),S=o.useState("floatingRootContext");ot({open:d,ref:o.context.popupRef,onComplete(){d&&o.context.onOpenChangeComplete?.(!0)}});const B=o.useState("disabled"),H=o.useState("openOnHover"),G=o.useState("closeDelay");nt(S,{enabled:H&&!B,closeDelay:G});function N(g){return g==="touch"?o.context.popupRef.current:!0}const L=i===void 0?N:i,O=r.useMemo(()=>({open:d,side:l.side,align:l.align,instant:C,transitionStatus:c}),[d,l.side,l.align,C,c]),K=r.useCallback(g=>{o.set("popupElement",g)},[o]);function R(){S.context.events.emit("measure-layout")}function _(g,v){S.context.events.emit("measure-layout-complete",{previousDimensions:g,nextDimensions:v})}const U=r.useCallback(()=>o.context.triggerElements.size>1,[o]);lt({popupElement:M,positionerElement:A,mounted:E,content:x,enabled:U,onMeasureLayout:R,onMeasureLayoutComplete:_,side:l.side,direction:m});const $=J("div",e,{state:O,ref:[t,o.context.popupRef,K],props:[T,{"aria-labelledby":w,"aria-describedby":u,onKeyDown(g){s&&rt.has(g.key)&&g.stopPropagation()}},ae(c),P],stateAttributesMapping:bt});return f.jsx(at,{context:S,openInteractionType:b,modal:k==="trap-focus",disabled:!E||I===Y,initialFocus:L,returnFocus:p,restoreFocus:"popup",previousFocusableElement:it(j)?j:void 0,nextFocusableElement:o.context.triggerFocusTargetRef,beforeContentFocusGuardRef:o.context.beforeContentFocusGuardRef,children:$})});var Pt="_1ffqjcq4",Tt="_1ffqjcq5";function Rt(n){const e=Z.c(9),{children:t,open:a,defaultOpen:h,onOpenChange:i,modal:p,preventCloseOnNestedPortals:P}=n,o=p===void 0?!1:p,l=P===void 0?!0:P;let s;e[0]!==i||e[1]!==l?(s=(b,C)=>{if(!b&&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?.(b)},e[0]=i,e[1]=l,e[2]=s):s=e[2];const m=s;let d;return e[3]!==t||e[4]!==h||e[5]!==m||e[6]!==o||e[7]!==a?(d=f.jsx(dt,{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 St(n){const e=Z.c(6),{children:t,className:a,asChild:h}=n;if(h&&r.isValidElement(t)){let p;return e[0]!==t||e[1]!==a?(p=f.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=f.jsx(se,{className:a,children:t}),e[3]=t,e[4]=a,e[5]=i):i=e[5],i}function Ot(n){const e=Z.c(11),{children:t,className:a,sideOffset:h,align:i,side:p,positionMethod:P}=n,o=h===void 0?8:h,l=i===void 0?"center":i,s=p===void 0?"bottom":p,m=P===void 0?"absolute":P;let d;e[0]!==a?(d=ct(Tt,a),e[0]=a,e[1]=d):d=e[1];let b;e[2]!==t||e[3]!==d?(b=f.jsx(vt,{className:d,children:t}),e[2]=t,e[3]=d,e[4]=b):b=e[4];let C;return e[5]!==l||e[6]!==m||e[7]!==s||e[8]!==o||e[9]!==b?(C=f.jsx(mt,{children:f.jsx(Ct,{className:Pt,sideOffset:o,align:l,side:s,positionMethod:m,children:b})}),e[5]=l,e[6]=m,e[7]=s,e[8]=o,e[9]=b,e[10]=C):C=e[10],C}export{Rt as P,St as a,Ot as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as R,r as M,x as K,j as s,h as U,I as N}from"./index-C1Qc7Z7W.js";import{a as ee}from"./useAnalytics-CHDelHQa.js";import{u as te}from"./useConfigList-Bx9xKceA.js";import{c as ne,u as re,d as ae,f as S}from"./index-CAScpK2G.js";import{B as Y}from"./button-J5fxAIyE.js";import{T as se,a as oe,b as j,c as ie,d as ce,e as ue}from"./table-jMzD3FNy.js";import{P as de,a as le,b as fe}from"./popover-BndR7yWD.js";import{t as y,s as he,a as me,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-D5kKsJ4z.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-BdOT-uCr.js";import{C as je}from"./chevron-right-CcvZen9O.js";/* empty css */import"./usePopupAutoResize-CaO9EPHk.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 m=C(u);return t.getTime()>=o.getTime()?r+1:t.getTime()>=m.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),m=+o-I(o),h=+u-I(u);return Math.round((m-h)/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 m=P(u,e),h=v(e?.in||n,0);h.setFullYear(r,0,o),h.setHours(0,0,0,0);const k=P(h,e);return+t>=+m?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,m=g(n,t?.in);if(!Re(m))throw new RangeError("Invalid time value");let h=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&&(h=a.localize.preprocessor(m,h));const k={firstWeekContainsDate:o,weekStartsOn:u,locale:a};return h.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(m,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 kt(){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:m}=ee({limit:b,offset:n,startDate:t.from,endDate:t.to,configId:t.configId,variantId:t.variantId,environmentId:t.environmentId,tags:o}),{data:h}=te(),k=M.useMemo(()=>h?new Map(h.map(i=>[i.id,i.name])):new Map,[h]),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(he,f>=200&&f<300?me: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 m?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{kt as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as o,j as n,O as m}from"./index-C1Qc7Z7W.js";/* empty css */function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(m,{}),e[0]=t):t=e[0],t}export{c as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as i,u as c,q as l,a as m,j as n,N as a,l as u,b as p,O as f}from"./index-C1Qc7Z7W.js";/* empty css */const y=["session"],_=async()=>{const{data:e}=await m.getSession();return e?.session??null},S=()=>l({queryKey:y,queryFn:_,staleTime:300*1e3}),d=()=>{const e=i.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=S(),e[0]=t):t=e[0],c(t)};function h(){const e=i.c(4),{data:t,isLoading:r}=d();if(!window.bootstrapData?.setupComplete){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(a,{to:"/setup"}),e[0]=s):s=e[0],s}if(r){let s;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:u,children:n.jsx("div",{className:p})}),e[1]=s):s=e[1],s}if(!t){let s;return e[2]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(a,{to:"/signin"}),e[2]=s):s=e[2],s}let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(f,{}),e[3]=o):o=e[3],o}export{h as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as n,j as o,O as r}from"./index-C1Qc7Z7W.js";/* empty css */function c(){const e=n.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(o.Fragment,{children:o.jsx(r,{})}),e[0]=t):t=e[0],t}export{c as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as o,j as n,O as m}from"./index-C1Qc7Z7W.js";/* empty css */function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(m,{}),e[0]=t):t=e[0],t}export{c as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as n,j as o,O as r}from"./index-C1Qc7Z7W.js";/* empty css */function c(){const e=n.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(o.Fragment,{children:o.jsx(r,{})}),e[0]=t):t=e[0],t}export{c as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as k,c as j,u as V,q as w,k as I,r as f,j as t,aD as E}from"./index-C1Qc7Z7W.js";import{C as T}from"./check-BdOT-uCr.js";import{C as q}from"./copy-Btrg1ewH.js";/* empty css */const z=[["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"}]],M=k("eye-off",z);const $=[["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",$),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}),L=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 O="xpj81m1 xpj81m0 _1lg22bkc",P="xpj81m2",D="xpj81m3",H="xpj81m4",K="xpj81m5",Q="xpj81m6",B="xpj81m7",F="xpj81m8",U="xpj81m9",Z="xpj81ma",G="xpj81mb",J="xpj81mc",v="xpj81md",b="xpj81mf xpj81me _1lg22bkc _1lg22bkj0 _1lg22bkv0";const W=a=>{const e=j.c(15),{environmentId:n}=a,{data:o,isLoading:N}=L(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:D,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:K,children:[t.jsxs("div",{className:Q,children:[t.jsx("span",{className:B,children:c.keyName}),t.jsx("span",{className:F,children:"Use this key to authenticate API requests for this environment."}),t.jsx("div",{className:U,children:t.jsx("span",{className:r?Z:G,children:r?c.keyValue:C(c.keyValue)})})]}),t.jsxs("div",{className:J,children:[t.jsx("button",{type:"button",className:v,onClick:()=>g(c.id),"aria-label":r?"Hide secret":"Show secret",children:r?t.jsx(M,{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(q,{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:O,children:t.jsxs("div",{className:P,children:[x,t.jsx("div",{className:H,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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as p,n as j,k as D,T as f,p as k,g as w,r as N,j as t}from"./index-C1Qc7Z7W.js";import{u as y}from"./useMutation-CNzYa4ST.js";import{g as b}from"./useEnvironments-DILRhv_b.js";import{T}from"./tooltip-BiUUXiGj.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 u}from"./Form-DHA5ZPmK.js";/* empty css */import"./usePopupAutoResize-CaO9EPHk.js";import"./useValueChanged-8LsiEynk.js";const _=()=>{const e=p.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",O="xvtkwc6",Y="xvtkwc7",z="xvtkwc8",g="xvtkwc9",G="xvtkwca",H="xvtkwcb",J="xvtkwcc",L="xvtkwcd",U="xvtkwce",V="xvtkwcf",W="xvtkwcg";function ce(){const e=p.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:O,children:[t.jsx("span",{className:Y,children:"Delete this environment"}),t.jsx("span",{className:z,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:g,disabled:!0,children:"Delete Environment"})})}):t.jsxs(I,{children:[t.jsx(C,{className:g,children:"Delete Environment"}),t.jsxs(P,{children:[t.jsx(S,{className:G}),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(u,{className:V,children:"Cancel"}),t.jsx(u,{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{ce as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as v,n as j,k as N,aP as y,g as _,r as C,j as s}from"./index-C1Qc7Z7W.js";import{u as S}from"./useMutation-CNzYa4ST.js";import{q as I}from"./useConfigList-Bx9xKceA.js";import{D as T,b as k,d as F,e as P,f as p,F as R,A as w,a as A,c as B}from"./Form-DHA5ZPmK.js";/* empty css */import"./useValueChanged-8LsiEynk.js";const q=()=>{const e=v.c(2),t=j();let a;return e[0]!==t?(a={mutationFn:E,onSuccess:()=>{t.invalidateQueries({queryKey:I})}},e[0]=t,e[1]=a):a=e[1],S(a)};async function E(e){const a=await(await N.v1.configs[":id"].$delete({param:{id:e}})).json();return"data"in a?a.data:void 0}var $="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 re(){const e=v.c(15),{id:t}=y.useParams(),a=_(),f=q(),[n,b]=C.useState(!1);let i;e[0]!==t||e[1]!==f||e[2]!==a?(i=async()=>{b(!0);try{await f.mutateAsync(t),a({to:"/configs"})}catch(D){console.error("Failed to delete config:",D),b(!1)}},e[0]=t,e[1]=f,e[2]=a,e[3]=i):i=e[3];const u=i;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 l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=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]=l):l=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(T,{className:J,children:"Delete Config"}),e[6]=r):r=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(k,{className:L}),e[7]=c):c=e[7];let m,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(F,{className:V,children:"Delete config?"}),x=s.jsx(P,{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]=x):(m=e[8],x=e[9]);let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(p,{className:Y,children:"Cancel"}),e[10]=d):d=e[10];const h=n?"Deleting...":"Delete";let g;return e[11]!==u||e[12]!==n||e[13]!==h?(g=s.jsx("div",{className:$,children:s.jsx(R,{className:M,children:s.jsxs("div",{className:Q,children:[o,s.jsx("div",{className:K,children:s.jsxs("div",{className:O,children:[l,s.jsxs(w,{children:[r,s.jsxs(A,{children:[c,s.jsxs(B,{className:U,children:[m,x,s.jsxs("div",{className:X,children:[d,s.jsx(p,{className:ee,onClick:u,disabled:n,children:h})]})]})]})]})]})})]})})}),e[11]=u,e[12]=n,e[13]=h,e[14]=g):g=e[14],g}export{re as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,N as w,r as s,L as p,i as n,a as f,k as C}from"./index-C1Qc7Z7W.js";import{B as y}from"./button-J5fxAIyE.js";import{S as b,l as S}from"./logo.css-BHDDnlVa.js";import{a as L,l as E,b as k,r as F,t as P,f as B,c as D,d as I,e as q,g as z,h as i,i as o,j as A,k as H,m as M,n as O}from"./auth.css-CbKu-iME.js";/* empty css */function J(){if(window.bootstrapData?.setupComplete??!1)return e.jsx(w,{to:"/signin"});const[c,x]=s.useState(""),[m,g]=s.useState(""),[l,j]=s.useState(""),[d,t]=s.useState(null),[u,h]=s.useState(!1),N=async a=>{if(a.preventDefault(),t(null),l.length<8){t("Password must be at least 8 characters");return}h(!0);try{const r=await f.signUp.email({email:m,password:l,name:c});if(r.error){t(r.error.message||"Failed to create account");return}const v=r.data?.user?.id;await C.v1["workspace-settings"].$patch({json:{setupComplete:!0,superAdminId:v}}),window.location.href="/"}catch{t("An unexpected error occurred")}finally{h(!1)}};return e.jsxs("div",{className:L,children:[e.jsx("div",{className:E,children:e.jsxs("div",{className:k,children:[e.jsx(b,{className:S(),viewBox:"450 550 1100 1500",style:{height:22,width:18}}),"LLMOps"]})}),e.jsxs("div",{className:F,children:[e.jsx(p,{to:"/signin",className:P,children:"Sign in"}),e.jsxs("div",{className:B,children:[e.jsxs("div",{className:D,children:[e.jsx("h1",{className:I,children:"Create an account"}),e.jsx("p",{className:q,children:"Enter your details below to create your account"})]}),e.jsxs("form",{className:z,onSubmit:N,children:[e.jsxs("div",{className:i,children:[e.jsx("label",{className:o,htmlFor:"name",children:"Name"}),e.jsx(n,{id:"name",type:"text",size:"lg",placeholder:"Enter your name",value:c,onChange:a=>x(a.target.value),required:!0,autoComplete:"name"})]}),e.jsxs("div",{className:i,children:[e.jsx("label",{className:o,htmlFor:"email",children:"Email"}),e.jsx(n,{id:"email",type:"email",size:"lg",placeholder:"name@example.com",value:m,onChange:a=>g(a.target.value),required:!0,autoComplete:"email"})]}),e.jsxs("div",{className:i,children:[e.jsx("label",{className:o,htmlFor:"password",children:"Password"}),e.jsx(n,{id:"password",type:"password",size:"lg",placeholder:"Create a password (min. 8 characters)",value:l,onChange:a=>j(a.target.value),required:!0,autoComplete:"new-password",minLength:8})]}),d&&e.jsx("div",{className:A,children:d}),e.jsx(y,{type:"submit",variant:"primary",disabled:u,className:H,children:u?"Creating account...":"Create account"})]}),e.jsxs("p",{className:M,children:["Already have an account?"," ",e.jsx(p,{to:"/signin",className:O,children:"Sign in"})]})]})]})]})}export{J as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,j as e,i as d,a as g}from"./index-C1Qc7Z7W.js";import{B as j}from"./button-J5fxAIyE.js";import{S as v,l as N}from"./logo.css-BHDDnlVa.js";import{a as f,l as w,b as y,r as S,f as b,c as E,d as C,e as L,g as F,h as m,i as u,j as P,k as B}from"./auth.css-CbKu-iME.js";/* empty css */function W(){const[l,h]=s.useState(""),[i,p]=s.useState(""),[n,r]=s.useState(null),[o,c]=s.useState(!1),x=async a=>{a.preventDefault(),r(null),c(!0);try{const t=await g.signIn.email({email:l,password:i});if(t.error){r(t.error.message||"Failed to sign in");return}window.location.href="/"}catch{r("An unexpected error occurred")}finally{c(!1)}};return e.jsxs("div",{className:f,children:[e.jsx("div",{className:w,children:e.jsxs("div",{className:y,children:[e.jsx(v,{className:N(),viewBox:"450 550 1100 1500",style:{height:22,width:18}}),"LLMOps"]})}),e.jsx("div",{className:S,children:e.jsxs("div",{className:b,children:[e.jsxs("div",{className:E,children:[e.jsx("h1",{className:C,children:"Welcome back"}),e.jsx("p",{className:L,children:"Enter your credentials to sign in to your account"})]}),e.jsxs("form",{className:F,onSubmit:x,children:[e.jsxs("div",{className:m,children:[e.jsx("label",{className:u,htmlFor:"email",children:"Email"}),e.jsx(d,{id:"email",type:"email",size:"lg",placeholder:"name@example.com",value:l,onChange:a=>h(a.target.value),required:!0,autoComplete:"email"})]}),e.jsxs("div",{className:m,children:[e.jsx("label",{className:u,htmlFor:"password",children:"Password"}),e.jsx(d,{id:"password",type:"password",size:"lg",placeholder:"Enter your password",value:i,onChange:a=>p(a.target.value),required:!0,autoComplete:"current-password"})]}),n&&e.jsx("div",{className:P,children:n}),e.jsx(j,{type:"submit",variant:"primary",disabled:o,className:B,children:o?"Signing in...":"Sign in"})]})]})})]})}export{W as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as b,c as p,h as m,aH as h,j as n,aI as N,aJ as x,aK as j,aL as u,aM as w,aN as y,aO as C}from"./index-C1Qc7Z7W.js";const T=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],$=b("arrow-down",T);const k=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],v=b("arrow-up",k),R=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:C,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},_=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(N,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},M=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(x({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},q=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},z=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{R as T,_ as a,M as b,q as c,B as d,z as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as a}from"./index-C1Qc7Z7W.js";/* empty css */var s="_1krr3zc0",e=a({defaultClassName:"_1krr3zc2 _1krr3zc1 _1lg22bks0 _1lg22bk3 _1lg22bkv0 _1lg22bkj9 _1lg22bkw0",variantClassNames:{},defaultVariants:{},compoundVariants:[]});export{s as a,e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as f,aG as v,g as y,j as n}from"./index-C1Qc7Z7W.js";import{b as g,e as a,a as b,c as m,T,d as R}from"./table-jMzD3FNy.js";import{u as V}from"./useEnvironments-DILRhv_b.js";import{u as C}from"./useTargetingRules-D10mXxut.js";import{a as E}from"./variants.css-Dzb38Nu1.js";/* empty css */function B(){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 c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=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]=c):c=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 d;return e[9]!==t?(d=n.jsx("div",{className:E,children:n.jsxs(T,{children:[c,n.jsx(R,{children:t})]})}),e[9]=t,e[10]=d):d=e[10],d}function _(e){return[e.environmentId,e]}export{B as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,V as D,W as ie,X as Y,Y as K,Z as le,j as w,_ as ue,$ as G,a0 as ce,a1 as pe,a2 as de,a3 as fe,a4 as ge,H as J,a5 as V,a6 as me,a7 as he,a8 as A,a9 as ye,aa as ve,ab as xe,ac as Z,ad as Ce,ae as Se,af as Pe,ag as Re,ah as Te,ai as be,aj as Ie,ak as we,al as Me,am as Ee,an as Oe,ao as Ae,ap as De,aq as ke,ar as je,as as U,at as He,au as Le,av as Ne,aw as Fe,ax as Q,ay as W,az as Ve,aA as Ue,aB as _e,aC as Be,c as ee,h as Xe}from"./index-C1Qc7Z7W.js";import{u as Ye}from"./usePopupAutoResize-CaO9EPHk.js";const te=r.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new ue,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),a=r.useRef(null),i=r.useRef(null),c=le();return w.jsx(te.Provider,{value:r.useMemo(()=>({hasProvider:!0,delayRef:d,initialDelayRef:l,currentIdRef:a,timeoutMs:o,currentContextRef:i,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,a=r.useContext(te),{currentIdRef:i,delayRef:c,timeoutMs:u,initialDelayRef:f,currentContextRef:p,hasProvider:g,timeout:n}=a,[x,y]=r.useState(!1);return D(()=>{function v(){y(!1),p.current?.setIsInstantPhase(!1),i.current=null,p.current=null,c.current=f.current}if(d&&i.current&&!l&&i.current===o){if(y(!1),u){const m=o;return n.start(u,()=>{t.select("open")||i.current&&i.current!==m||v()}),()=>{n.clear()}}v()}},[d,l,o,i,c,u,f,p,n,t]),D(()=>{if(!d||!l)return;const v=p.current,m=i.current;n.clear(),p.current={onOpenChange:t.setOpen,setIsInstantPhase:y},i.current=o,c.current={open:0,close:ie(f.current,"close")},m!==null&&m!==o?(y(!0),v?.setIsInstantPhase(!0),v?.onOpenChange(!1,Y(K))):(y(!1),v?.setIsInstantPhase(!1))},[d,l,o,t,i,c,u,f,p,n]),D(()=>()=>{p.current=null},[p]),r.useMemo(()=>({hasProvider:g,delayRef:c,isInstantPhase:x}),[g,c,x])}function $e(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},a=e.axis==="x"||e.axis==="both",i=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&&a&&(t=l.x-e.x),o==null&&e.y&&i&&(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=a&&e.x!=null?e.x:p,g=i&&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 q(s){return s!=null&&s.clientX!=null}function Ge(s,e={}){const t="rootStore"in s?s.rootStore:s,o=t.useState("open"),d=t.useState("floatingElement"),l=t.useState("domReferenceElement"),a=t.context.dataRef,{enabled:i=!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=G((C,b)=>{p.current||a.current.openEvent&&!q(a.current.openEvent)||t.set("positionReference",$e(l,{x:C,y:b,axis:c,dataRef:a,pointerType:n}))}),h=G(C=>{u!=null||f!=null||(o?g.current||v([]):m(C.clientX,C.clientY))}),P=ce(n)?d:o,S=r.useCallback(()=>{if(!P||!i||u!=null||f!=null)return;const C=pe(d);function b(I){const M=de(I);fe(d,M)?(C.removeEventListener("mousemove",b),g.current=null):m(I.clientX,I.clientY)}if(!a.current.openEvent||q(a.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,i,u,f,d,a,l,t,m]);r.useEffect(()=>S(),[S,y]),r.useEffect(()=>{i&&!d&&(p.current=!1)},[i,d]),r.useEffect(()=>{!i&&o&&(p.current=!0)},[i,o]),D(()=>{i&&(u!=null||f!=null)&&(p.current=!1,m(u,f))},[i,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(()=>i?{reference:T}:{},[i,T])}const Ze=r.forwardRef(function(e,t){const{children:o,container:d,className:l,render:a,...i}=e,{portalNode:c,portalSubtree:u}=ge({container:d,ref:t,componentProps:e,elementProps:i});return!u&&!c?null:w.jsxs(r.Fragment,{children:[u,c&&J.createPortal(o,c)]})}),ne=r.createContext(void 0);function N(s){const e=r.useContext(ne);if(e===void 0&&!s)throw new Error(V(72));return e}const qe={...ye,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 me{constructor(e){super({...Ke(),...e},{popupRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new he},qe)}setOpen=(e,t)=>{const o=t.reason,d=o===Z,l=e&&o===Se,a=!e&&(o===Pe||o===Re);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;const i=()=>{const c={open:e,openChangeReason:o};l?c.instantType="focus":a?c.instantType="dismiss":o===Z&&(c.instantType=void 0);const u=t.trigger?.id??null;(u||e)&&(c.activeTriggerId=u,c.activeTriggerElement=t.trigger??null),this.update(c)};d?J.flushSync(i):i()};static useStore(e,t){const o=ve(()=>e??new z(t)).current,d=xe({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=d,o}}function Ke(){return{...Ce(),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:a,onOpenChange:i,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",i),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(Te))},[x,e,n]),n.useSyncedValue("disabled",e),be(n);const{forceUnmount:h,transitionStatus:P}=Ie(m,n),S=n.useState("isInstantPhase"),T=n.useState("instantType"),C=n.useState("lastOpenChangeReason"),b=r.useRef(null);D(()=>{P==="ending"&&C===K||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,Oe))},[n]);r.useImperativeHandle(a,()=>({unmount:h,close:I}),[h,I]);const M=n.useState("floatingRootContext"),E=we(M,{enabled:!e}),R=Me(M,{enabled:!e,referencePress:!0}),L=Ge(M,{enabled:!e&&l!=="none",axis:l==="none"?void 0:l}),{getReferenceProps:O,getFloatingProps:k,getTriggerProps:j}=Ee([E,R,L]),H=r.useMemo(()=>O(),[O]),_=r.useMemo(()=>j(),[j]),$=r.useMemo(()=>k(),[k]);return n.useSyncedValues({floatingRootContext:M,activeTriggerProps:H,inactiveTriggerProps:_,popupProps:$}),w.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:a,disabled:i,delay:c,closeDelay:u,id:f,...p}=e,g=N(!0),n=l?.store??g;if(!n)throw new Error(V(82));const x=Ae(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}=De(x,h,n,{payload:a,closeDelay:S}),b=et(),{delayRef:I,isInstantPhase:M,hasProvider:E}=ze(v,{open:m});n.useSyncedValue("isInstantPhase",M);const R=n.useState("disabled"),L=i??R,O=n.useState("trackCursorAxis"),k=n.useState("disableHoverablePopup"),j=ke(v,{enabled:!L,mouseOnly:!0,move:!1,handleClose:!k&&O!=="both"?je():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 U("button",e,{state:H,ref:[t,T,h],props:[j,_,{id:x},p],stateAttributesMapping:He})}),se=r.createContext(void 0);function ot(){const s=r.useContext(se);if(s===void 0)throw new Error(V(70));return s}const st=r.forwardRef(function(e,t){const{keepMounted:o=!1,...d}=e;return N().useState("mounted")||o?w.jsx(se.Provider,{value:o,children:w.jsx(Ze,{ref:t,...d})}):null}),re=r.createContext(void 0);function ae(){const s=r.useContext(re);if(s===void 0)throw new Error(V(71));return s}const rt=r.forwardRef(function(e,t){const{render:o,className:d,anchor:l,positionMethod:a="absolute",side:i="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=Le,...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"),M=h.useState("instantType"),E=h.useState("transitionStatus"),R=Ne({anchor:l,positionMethod:a,floatingRootContext:I,mounted:T,side:i,sideOffset:u,align:c,alignOffset:f,collisionBoundary:p,collisionPadding:g,sticky:x,arrowPadding:n,disableAnchorTracking:y,keepMounted:P,collisionAvoidance:v,adaptiveOrigin:Fe}),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":M}),[S,R.side,R.align,R.anchorHidden,C,M]),k=r.useMemo(()=>({...O,arrowRef:R.arrowRef,arrowStyles:R.arrowStyles,arrowUncentered:R.arrowUncentered}),[O,R.arrowRef,R.arrowStyles,R.arrowUncentered]),j=U("div",e,{state:O,props:[L,Q(E),m],ref:[t,h.useStateSetter("positionerElement")],stateAttributesMapping:W});return w.jsx(re.Provider,{value:k,children:j})}),at={...W,...Be},it=r.forwardRef(function(e,t){const{className:o,render:d,...l}=e,a=N(),{side:i,align:c}=ae(),u=a.useState("open"),f=a.useState("mounted"),p=a.useState("instantType"),g=a.useState("transitionStatus"),n=a.useState("popupProps"),x=a.useState("payload"),y=a.useState("popupElement"),v=a.useState("positionerElement"),m=a.useState("floatingRootContext"),h=Ve();Ue({open:u,ref:a.context.popupRef,onComplete(){u&&a.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(()=>a.context.triggerElements.size>1,[a]);Ye({popupElement:y,positionerElement:v,mounted:f,content:x,enabled:T,onMeasureLayout:P,onMeasureLayoutComplete:S,side:i,direction:h});const C=a.useState("disabled"),b=a.useState("closeDelay");_e(m,{enabled:!C,closeDelay:b});const I=r.useMemo(()=>({open:u,side:i,align:c,instant:p,transitionStatus:g}),[u,i,c,p,g]);return U("div",e,{state:I,ref:[t,a.context.popupRef,a.useStateSetter("popupElement")],props:[n,Q(g),l],stateAttributesMapping:at})}),lt=r.forwardRef(function(e,t){const{className:o,render:d,...l}=e,i=N().useState("instantType"),{open:c,arrowRef:u,side:f,align:p,arrowUncentered:g,arrowStyles:n}=ae(),x=r.useMemo(()=>({open:c,side:f,align:p,uncentered:g,instant:i}),[c,f,p,g,i]);return U("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]),a=r.useMemo(()=>({open:t,close:o}),[t,o]);return w.jsx(oe.Provider,{value:l,children:w.jsx(We,{delay:a,timeoutMs:d,children:e.children})})};var ct="_1v73km82",pt="_1v73km83",dt="_1v73km84",ft="_1v73km85";function gt(s){const e=ee.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=w.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=w.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 yt(s){const e=ee.c(20),{content:t,children:o,side:d,align:l,sideOffset:a,delay:i,closeDelay:c,className:u}=s,f=d===void 0?"top":d,p=l===void 0?"center":l,g=a===void 0?8:a,n=i===void 0?400:i,x=c===void 0?0:c;let y;e[0]!==o?(y=w.jsx(nt,{render:o}),e[0]=o,e[1]=y):y=e[1];let v;e[2]!==u?(v=Xe(pt,u),e[2]=u,e[3]=v):v=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=w.jsx(lt,{className:dt,children:w.jsx(gt,{})}),e[4]=m):m=e[4];let h;e[5]!==t||e[6]!==v?(h=w.jsxs(it,{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=w.jsx(st,{children:w.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=w.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=w.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{yt as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{s as P,c as $,r as R,w as V,j as y}from"./index-C1Qc7Z7W.js";import{u as k,e as W,f as U,g as q}from"./index.esm-BVbruXk6.js";import{T as A}from"./tooltip-BiUUXiGj.js";const H=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],G=P("x",H);var J="b0ts4r0",K="b0ts4r1",Q="b0ts4r2";const N="--tile-width",M="100%";function Y(){const d=$.c(1),e=R.useRef(null),o=R.useRef(null);let n;return d[0]===Symbol.for("react.memo_cache_sentinel")?(n={containerRef:e,setTileWidth:s=>{if(!e.current)return;const a=e.current;o.current&&(o.current.cancel(),o.current=null);const i=getComputedStyle(a).getPropertyValue(N).trim()||M,l=parseFloat(i.replace(/[^\d.]/g,"")),r=parseFloat(s.replace(/[^\d.]/g,""));if(Math.abs(l-r)>1){const h=s.replace(/[\d.]/g,"");o.current=V(l,r,{duration:.3,ease:"circInOut",onUpdate:c=>{a.style.setProperty(N,`${c}${h}`)},onComplete:()=>{o.current=null,a.style.setProperty(N,s)}})}else a.style.setProperty(N,s)}},d[0]=n):n=d[0],n}function Z(d){const e=$.c(31),{id:o,entity:n,placeholder:g,onCreate:s,onUpdate:a,disabled:i,tooltip:l}=d,r=o==="new",h=n?.name??"";let c;e[0]!==h?(c={values:{name:h}},e[0]=h,e[1]=c):c=e[1];const{register:j,handleSubmit:T,formState:D}=k(c),{errors:F,isSubmitting:v}=D;let b;e[2]!==i||e[3]!==n||e[4]!==r||e[5]!==s||e[6]!==a?(b=async t=>{if(!(!t.name.trim()||i))try{r?await s({name:t.name}):await a({id:n.id,name:t.name})}catch(L){console.error("Error in creating/updating:",L)}},e[2]=i,e[3]=n,e[4]=r,e[5]=s,e[6]=a,e[7]=b):b=e[7];const x=b,w=`${g} is required`;let u;e[8]!==j||e[9]!==w?(u=j("name",{required:w}),e[8]=j,e[9]=w,e[10]=u):u=e[10];const E=F.name?"true":"false";let S;e[11]!==i||e[12]!==g||e[13]!==u||e[14]!==E?(S=y.jsx("input",{...u,placeholder:g,"data-1p-ignore":!0,title:"name",className:W,"aria-invalid":E,disabled:i}),e[11]=i,e[12]=g,e[13]=u,e[14]=E,e[15]=S):S=e[15];const I=S;let m,p;e[16]!==T||e[17]!==x?(p=T(x),m=t=>{t.preventDefault(),T(x)()},e[16]=T,e[17]=x,e[18]=m,e[19]=p):(m=e[18],p=e[19]);let f;e[20]!==r||e[21]!==v?(f=v&&(r?y.jsx("span",{className:U,children:"Creating..."}):y.jsx("span",{className:U,children:"Updating..."})),e[20]=r,e[21]=v,e[22]=f):f=e[22];let _;e[23]!==I||e[24]!==m||e[25]!==f||e[26]!==p?(_=y.jsxs("form",{className:q,onBlur:p,onSubmit:m,children:[I,f]}),e[23]=I,e[24]=m,e[25]=f,e[26]=p,e[27]=_):_=e[27];const C=_;if(l){let t;return e[28]!==C||e[29]!==l?(t=y.jsx(A,{content:l,children:C}),e[28]=C,e[29]=l,e[30]=t):t=e[30],t}return C}export{Z as U,G as X,K as l,Q as r,J as t,Y as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as l,u,k as y}from"./index-C1Qc7Z7W.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as t,u as n,k as o}from"./index-C1Qc7Z7W.js";const a=["configs-list"],i=()=>{const s=t.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:a,queryFn:c},s[0]=e):e=s[0],n(e)};async function c(){return(await(await o.v1.configs.$get()).json()).data}export{a as q,i as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as u,u as i,k as l}from"./index-C1Qc7Z7W.js";const c=t=>["config-variants",t],m=t=>{const e=u.c(8);let s;e[0]!==t?(s=c(t),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const o=await(await l.v1.configs[":configId"].variants.$get({param:{configId:t}})).json();return"data"in o?o.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],i(r)};export{c as g,m as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as s,u as r,k as n}from"./index-C1Qc7Z7W.js";const o=()=>["environments"],m=()=>{const e=s.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:o(),queryFn:i},e[0]=t):t=e[0],r(t)};function a(e){return{...e,isProd:e.isProd===!0||e.isProd===1||e.isProd==="true"}}async function i(){const t=await(await n.v1.environments.$get()).json();return("data"in t?t.data:[]).map(a)}export{o as g,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bX as l,bY as b,bZ as a,b_ as p,b$ as h,n as d,r as o,c0 as m,c1 as f}from"./index-C1Qc7Z7W.js";var v=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),b(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??p();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,i=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#e.onSuccess?.(t.data,s,i,e),this.#e.onSettled?.(t.data,null,s,i,e)):t?.type==="error"&&(this.#e.onError?.(t.error,s,i,e),this.#e.onSettled?.(void 0,t.error,s,i,e))}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const i=d(),[e]=o.useState(()=>new v(i,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const r=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(r.error&&f(e.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}export{O as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bU as O,bT as R,bV as A,r as g,bQ as B,bl as T,$ as C,b1 as k,V as D}from"./index-C1Qc7Z7W.js";function F(o){const e=O(o);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const u=R(o),c=u?o.offsetWidth:t,d=u?o.offsetHeight:i;return(A(t)!==c||A(i)!==d)&&(t=c,i=d),{width:t,height:i}}const H=typeof ResizeObserver<"u",V=()=>!0;function I(o){const{popupElement:e,positionerElement:t,content:i,mounted:u,enabled:c=V,onMeasureLayout:d,onMeasureLayoutComplete:m,side:n,direction:w}=o,f=g.useRef(!0),x=B(e,!0,!1),b=T(),s=g.useRef(null),S=C(d),P=C(m),M=g.useMemo(()=>{let r=n==="top",a=n==="left";return w==="rtl"?(r=r||n==="inline-end",a=a||n==="inline-end"):(r=r||n==="inline-start",a=a||n==="inline-start"),r?{position:"absolute",[n==="top"?"bottom":"top"]:"0",[a?"right":"left"]:"0"}:k},[n,w]);D(()=>{if(!u||!c()||!H){f.current=!0,s.current=null;return}if(!e||!t)return;Object.entries(M).forEach(([l,p])=>{e.style.setProperty(l,p)});const r=new ResizeObserver(l=>{const p=l[0];p&&(s.current===null?s.current={width:Math.ceil(p.borderBoxSize[0].inlineSize),height:Math.ceil(p.borderBoxSize[0].blockSize)}:(s.current.width=Math.ceil(p.borderBoxSize[0].inlineSize),s.current.height=Math.ceil(p.borderBoxSize[0].blockSize)))});r.observe(e),e.style.setProperty("--popup-width","auto"),e.style.setProperty("--popup-height","auto");const a=y(e,"position","static"),z=y(e,"transform","none"),$=y(e,"scale","1"),E=y(t,"--available-width","max-content"),v=y(t,"--available-height","max-content");if(S?.(),f.current||s.current===null){t.style.setProperty("--positioner-width","max-content"),t.style.setProperty("--positioner-height","max-content");const l=F(e);return t.style.setProperty("--positioner-width",`${l.width}px`),t.style.setProperty("--positioner-height",`${l.height}px`),a(),z(),$(),E(),v(),P?.(null,l),f.current=!1,()=>{r.disconnect()}}e.style.setProperty("--popup-width","auto"),e.style.setProperty("--popup-height","auto"),t.style.setProperty("--positioner-width","max-content"),t.style.setProperty("--positioner-height","max-content");const h=F(e);e.style.setProperty("--popup-width",`${s.current.width}px`),e.style.setProperty("--popup-height",`${s.current.height}px`),a(),z(),E(),v(),P?.(s.current,h),t.style.setProperty("--positioner-width",`${h.width}px`),t.style.setProperty("--positioner-height",`${h.height}px`);const L=new AbortController;return b.request(()=>{e.style.setProperty("--popup-width",`${h.width}px`),e.style.setProperty("--popup-height",`${h.height}px`),x(()=>{e.style.setProperty("--popup-width","auto"),e.style.setProperty("--popup-height","auto")},L.signal)}),()=>{r.disconnect(),L.abort(),b.cancel()}},[i,e,t,x,b,c,u,S,P,M])}function y(o,e,t){const i=o.style.getPropertyValue(e);return o.style.setProperty(e,t),()=>{o.style.setProperty(e,i)}}export{I as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{s as o,c as n,u as i,q as c,k as r,n as u}from"./index-C1Qc7Z7W.js";import{u as v}from"./useMutation-CNzYa4ST.js";import{g as p}from"./useTargetingRules-D10mXxut.js";const y=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],V=o("save",y);var w="_1oq6p8e0",h="_1oq6p8e1",I="_1oq6p8e3",k="_1oq6p8e4",Q="_1oq6p8e5",C="_1oq6p8e6",$="_1oq6p8e7",b="_1oq6p8e8",F="_1oq6p8e9";const d=e=>["variant-versions",e],m=e=>c({queryKey:d(e),queryFn:async()=>{const a=await(await r.v1.variants[":id"].versions.$get({param:{id:e}})).json();return"data"in a?a.data:[]},enabled:!!e,staleTime:1e3*60*5}),H=e=>{const t=n.c(2);let a;return t[0]!==e?(a=m(e),t[0]=e,t[1]=a):a=t[1],i(a)},K=()=>{const e=n.c(2),t=u();let a;return e[0]!==t?(a={mutationFn:g,onSuccess:(l,s)=>{t.invalidateQueries({queryKey:p(s.configId)})}},e[0]=t,e[1]=a):a=e[1],v(a)};async function g(e){const t=await r.v1.targeting.set.$post({json:{environmentId:e.environmentId,configId:e.configId,configVariantId:e.configVariantId,variantVersionId:e.variantVersionId}}),a=await t.json();if(!t.ok||!("data"in a))throw new Error("message"in a?a.message:"Failed to set targeting");return a.data}export{V as S,Q as a,F as b,C as c,k as d,H as e,w as f,d as g,h,I as i,b as m,K as u,$ as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as l,u as o,k as i}from"./index-C1Qc7Z7W.js";const c=t=>["targeting-rules",t],g=t=>{const e=l.c(8);let s;e[0]!==t?(s=c(t),e[0]=t,e[1]=s):s=e[1];let r;e[2]!==t?(r=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]=r):r=e[3];const n=!!t;let a;return e[4]!==s||e[5]!==r||e[6]!==n?(a={queryKey:s,queryFn:r,enabled:n},e[4]=s,e[5]=r,e[6]=n,e[7]=a):a=e[7],o(a)};export{c as g,g as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,c2 as a,$ as c,V as o}from"./index-C1Qc7Z7W.js";const u=r.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:a,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function i(){return r.useContext(u)}function m(e,s){const t=r.useRef(e),n=c(s);o(()=>{t.current!==e&&n(t.current)},[e,n]),o(()=>{t.current=e},[e])}export{u as F,i as a,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{s as n,c as s,j as t}from"./index-C1Qc7Z7W.js";import{i as c}from"./info-box.css-BzqwxgQm.js";/* empty css */const a=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],r=n("info",a);function p(){const e=s.c(2);if((window.bootstrapData?.authType||"basic")==="basic"){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{children:t.jsxs("div",{className:c,children:[t.jsx(r,{size:16}),t.jsx("span",{children:"You are using basic authentication. Profile settings cannot be changed in this mode."})]})}),e[0]=i):i=e[0],i}let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{children:t.jsx("h2",{children:"Profile"})}),e[1]=o):o=e[1],o}export{p as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as v,aE as g,n as C,g as y,j as n,aF as b,I as V}from"./index-C1Qc7Z7W.js";import{B as I}from"./button-J5fxAIyE.js";import{b as p,e as c,a as T,c as x,T as N,d as _}from"./table-jMzD3FNy.js";import{u as $}from"./useConfigVariants-CB0S5gfJ.js";import{v as k,a as R}from"./variants.css-Dzb38Nu1.js";import{P as w}from"./plus-DqiZvCBU.js";/* empty css */function U(){const e=v.c(18),{id:a}=g.useParams(),j=C(),{data:d,isLoading:u}=$(a),i=y();if(u){let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{children:"Loading variants..."}),e[0]=s):s=e[0],s}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=n.jsx(V,{icon:w}),e[4]=m):m=e[4];let r;e[5]!==t?(r=n.jsx("div",{className:k,children:n.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=n.jsx(T,{children:n.jsxs(p,{children:[n.jsx(x,{children:"Name"}),n.jsx(x,{children:"Provider"}),n.jsx(x,{children:"Model"}),n.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(s=>n.jsxs(p,{interactive:!0,onMouseEnter:()=>{j.prefetchQuery(b(s.variantId))},onClick:()=>i({to:"/configs/$id/variants/$variant",params:{id:a,variant:s.variantId}}),children:[n.jsx(c,{children:s.name||"Unnamed Variant"}),n.jsx(c,{children:s.provider||"Unknown"}),n.jsx(c,{children:s.modelName||"Unknown"}),n.jsx(c,{children:s.latestVersion?.version?`v${s.latestVersion.version}`:"-"})]},s.variantId)):n.jsx(p,{children:n.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=n.jsxs(N,{children:[f,n.jsx(_,{children:o})]}),e[13]=o,e[14]=l):l=e[14];let h;return e[15]!==r||e[16]!==l?(h=n.jsxs("div",{className:R,children:[r,l]}),e[15]=r,e[16]=l,e[17]=h):h=e[17],h}export{U as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./index-C1Qc7Z7W.js";var r="tye0o0",t="tye0o1";export{r as a,t as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as g,u as w,k as h,n as x,r as _,j as a}from"./index-C1Qc7Z7W.js";import{u as S}from"./useMutation-CNzYa4ST.js";/* empty css */const k=()=>["workspace-settings"],N=()=>{const e=g.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:k(),queryFn:$},e[0]=t):t=e[0],w(t)};async function $(){const t=await(await h.v1["workspace-settings"].$get()).json();return"data"in t?t.data:null}const E=()=>{const e=g.c(2),t=x();let s;return e[0]!==t?(s={mutationFn:C,onSuccess:()=>{t.invalidateQueries({queryKey:k()})}},e[0]=t,e[1]=s):s=e[1],S(s)};async function C(e){const t=await h.v1["workspace-settings"].$patch({json:{name:e.name}}),s=await t.json();if(!t.ok||!("data"in s))throw new Error("message"in s?s.message:"Failed to update workspace settings");return s.data}var y="_1ervu4v0",F="_1ervu4v1",K="_1ervu4v2",q="_1ervu4v5",Q="_1ervu4v7 _1ervu4v6 _1lg22bkv0 _1lg22bkuc _1lg22bk26 _1lg22bk2u _1lg22bkbc _1lg22bkj9";function B(){const e=g.c(14),{data:t,isLoading:s}=N(),p=E(),[r,f]=_.useState("");let o;e[0]!==t?(o=()=>{t?.name!==void 0&&f(t.name??"")},e[0]=t,e[1]=o):o=e[1];const d=t?.name;let i;e[2]!==d?(i=[d],e[2]=d,e[3]=i):i=e[3],_.useEffect(o,i);let c;e[4]!==r||e[5]!==t?.name||e[6]!==p?(c=()=>{const n=r.trim(),j=t?.name??"";n!==j&&p.mutate({name:n||null})},e[4]=r,e[5]=t?.name,e[6]=p,e[7]=c):c=e[7],t?.name;const v=c,b=L;if(s){let n;return e[8]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx("div",{className:y,children:"Loading..."}),e[8]=n):n=e[8],n}let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("label",{className:q,children:"Name of your workspace"}),e[9]=l):l=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=n=>f(n.target.value),e[10]=u):u=e[10];let m;return e[11]!==v||e[12]!==r?(m=a.jsx("div",{className:y,children:a.jsx("div",{className:F,children:a.jsx("div",{className:K,children:a.jsxs("div",{children:[l,a.jsx("input",{type:"text",className:Q,value:r,onChange:u,onBlur:v,onKeyDown:b,placeholder:"Workspace name"})]})})})}),e[11]=v,e[12]=r,e[13]=m):m=e[13],m}function L(e){e.key==="Enter"&&e.currentTarget.blur()}export{B as component};
|