@lunora/studio 1.0.0-alpha.82 → 1.0.0-alpha.83
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/standalone/{chunk-73GRNONE.js → chunk-7L7FXGJU.js} +1 -1
- package/dist/standalone/chunk-JOFD43OI.js +1 -0
- package/dist/standalone/{chunk-CPSGJSHY.js → chunk-KXSSTTEY.js} +1 -1
- package/dist/standalone/{chunk-UBPYN4DU.js → chunk-PD4LANXJ.js} +1 -1
- package/dist/standalone/{chunk-YSRW5RNU.js → chunk-ZI5ZVNIN.js} +1 -1
- package/dist/standalone/studio.js +1 -1
- package/package.json +2 -2
- package/dist/standalone/chunk-U457LHCO.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as In,b as _n}from"./chunk-HEB6GQQ6.js";import{a as An,d as Vn}from"./chunk-3C3CG7ZK.js";import{a as $t,b as qt,c as Gt,d as Nn,e as Bo}from"./chunk-I6A5C46N.js";import{$ as Cn,A as Bt,C as hn,D as Z,E as vn,F as bn,I as Ft,L as _e,M as So,N as jt,P as No,Q as xn,R as yn,S as To,T as Kt,U as zt,V as Ut,W as Zt,X as wo,Y as Wt,_ as Pn,aa as Eo,b as on,ba as ko,ea as Oo,fa as Ce,ga as Rn,ha as Yt,i as sn,ia as Sn,j as ln,ja as de,k as cn,ka as Mo,l as fr,m as xo,ma as Do,na as Io,o as yo,oa as _o,p as dn,pa as Ao,q as Po,qa as Vo,ra as Lo,s as pn,sa as Tn,ta as wn,u as un,ua as Ho,v as mn,va as En,w as fn,x as Co,y as Ro,z as gn}from"./chunk-2QSHLBCO.js";import{c as kn,h as On,k as gr}from"./chunk-QBWRC5YX.js";import{a as Fo}from"./chunk-HPFLBYRI.js";import{f as Dn}from"./chunk-ILNELDFC.js";import{a as Br,b as Fr,d as jr,e as no,f as pr,g as Kr,h as zr,i as Ur,j as Zr,k as Wr}from"./chunk-SMIESS7P.js";import{B as rn,C as nn,I as ve,J as an,K as Ht,O as L,P as Y,R as mr,e as fe,p as ao,q as tn}from"./chunk-CFPZYHPY.js";import{a as Hr}from"./chunk-7QIFDWQV.js";import{b as Ae,c as hr}from"./chunk-FXCBF4XT.js";import{a as Ie,c as Xr,h as bo,i as en}from"./chunk-2OUPA2WJ.js";import{a as ur,b as Lt}from"./chunk-THIXMMZD.js";import{a as Ee,c as G,i as je,j as F}from"./chunk-6ST5ECQA.js";import{a as $r,b as qr}from"./chunk-QLQADHFE.js";import{a as so}from"./chunk-XDAT7LHC.js";import{a as Qr}from"./chunk-XBDKZZ67.js";import{a as Gr,b as Yr,c as Jr,d as ge,m as Jt,o as Mn}from"./chunk-OG4N2XHD.js";import{c as cr}from"./chunk-AADILRJW.js";import{a as i,d as lr,e as R,f as M,g as dr,h as se,j as $}from"./chunk-3XIESWL4.js";var I=R(dr(),1);var ye=R(M(),1),z=R(M(),1);var a=R(se(),1);var Ln=R(M(),1),ke=R(se(),1);var Os={border:"1px solid var(--destructive)",color:"var(--destructive)",padding:12},Ms={overflow:"auto",whiteSpace:"pre-wrap"},jo=class extends Ln.Component{static{i(this,"g")}static getDerivedStateFromError(e){return{error:e}}state={error:null};componentDidCatch(e,o){console.error("[lunora-studio] panel error",e,o.componentStack)}reset=i(()=>{this.setState({error:null})},"reset");render(){let{children:e,fallbackTitle:o,label:r,retryLabel:n}=this.props,{error:s}=this.state;if(s===null)return(0,ke.jsx)(ke.Fragment,{children:e});let l=o??(r===void 0?"Something went wrong":`${r} failed`);return(0,ke.jsxs)("div",{"data-testid":"dash-error-boundary",role:"alert",style:Os,children:[(0,ke.jsx)("strong",{children:l}),(0,ke.jsx)("pre",{"data-testid":"dash-error-message",style:Ms,children:s.message}),(0,ke.jsx)("button",{"data-testid":"dash-error-retry",onClick:this.reset,type:"button",children:n??"Try again"})]})}};var Be={};lr(Be,{Arrow:()=>Xn,Backdrop:()=>ta,Close:()=>ia,Description:()=>aa,Handle:()=>lo,Popup:()=>Jn,Portal:()=>Un,Positioner:()=>Zn,Root:()=>Fn,Title:()=>ra,Trigger:()=>jn,Viewport:()=>da,createHandle:()=>pa});var Oe=R(M(),1);var Ko=R(M(),1);var vr=Ko.createContext(void 0);function X(t){let e=Ko.useContext(vr);if(e===void 0&&!t)throw new Error(G(47));return e}i(X,"usePopoverRootContext");var Ve=R(M(),1),Hn=R(Hr(),1);function Ds(){return{...$t(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}i(Ds,"createInitialState");var Is={...Gt,disabled:Z(t=>t.disabled),instantType:Z(t=>t.instantType),openMethod:Z(t=>t.openMethod),openChangeReason:Z(t=>t.openChangeReason),modal:Z(t=>t.modal),focusManagerModal:Z(t=>t.focusManagerModal),stickIfOpen:Z(t=>t.stickIfOpen),titleElementId:Z(t=>t.titleElementId),descriptionElementId:Z(t=>t.descriptionElementId),openOnHover:Z(t=>t.openOnHover),closeDelay:Z(t=>t.closeDelay),hasViewport:Z(t=>t.hasViewport)},Qt=class t extends Ft{static{i(this,"PopoverStore")}constructor(e,o,r=!1){let n={...Ds(),...e},s=new Wt;n.open&&e?.mounted===void 0&&(n.mounted=!0),n.floatingRootContext=qt(s,o,r),super(n,{popupRef:Ve.createRef(),backdropRef:Ve.createRef(),internalBackdropRef:Ve.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Ve.createRef(),beforeContentFocusGuardRef:Ve.createRef(),stickIfOpenTimeout:new rn,triggerElements:s},Is)}setOpen=i((e,o)=>{let r=o.reason===L.triggerHover,n=o.reason===L.triggerPress&&o.event.detail===0,s=!e&&(o.reason===L.escapeKey||o.reason==null),l=xn(o),d=this.select("activeTriggerId");if(!e&&o.reason===L.closePress&&o.trigger==null&&d!=null&&(o.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let p=i(()=>{let c={open:e,openChangeReason:o.reason};No(c,e,o.trigger,l()),this.update(c)},"changeState");r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),Hn.flushSync(p)):p(),n||s?this.set("instantType",n?"click":"dismiss"):o.reason===L.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)},"setOpen");static useStore(e,o){let{store:r,internalStore:n}=jt(e,(s,l)=>new t(o,s,l));return Ve.useEffect(()=>n?.disposeEffect(),[n]),r}disposeEffect=i(()=>this.context.stickIfOpenTimeout.disposeEffect(),"disposeEffect")};var Ke=R(se(),1);function Bn({props:t}){let{children:e,open:o,defaultOpen:r=!1,onOpenChange:n,onOpenChangeComplete:s,modal:l=!1,handle:d,triggerId:p,defaultTriggerId:c=null}=t,u=Qt.useStore(d?.store,{modal:l,open:r,openProp:o,activeTriggerId:c,triggerIdProp:p});To(u,o,r,c),u.useControlledProp("openProp",o),u.useControlledProp("triggerIdProp",p);let h=u.useState("open"),v=u.useState("mounted"),f=u.useState("payload"),m=pn()!=null;u.useContextCallback("onOpenChange",n),u.useContextCallback("onOpenChangeComplete",s),wo(u,h),zt(u);let{forceUnmount:g}=Ut(h,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:l,nested:m}),Oe.useEffect(()=>{h||u.context.stickIfOpenTimeout.clear()},[u,h]);let b=Oe.useCallback(()=>{u.setOpen(!1,Y(L.imperativeAction))},[u]);Oe.useImperativeHandle(t.actionsRef,()=>({unmount:g,close:b}),[g,b]);let x=h||v,P=Oe.useMemo(()=>({store:u}),[u]);return(0,Ke.jsxs)(vr.Provider,{value:P,children:[x&&(0,Ke.jsx)(_s,{store:u,modal:l}),typeof e=="function"?e({payload:f}):e]})}i(Bn,"PopoverRootComponent");function Fn(t){return X(!0)?(0,Ke.jsx)(Bn,{props:t}):(0,Ke.jsx)(fn,{children:(0,Ke.jsx)(Bn,{props:t})})}i(Fn,"PopoverRoot");function _s({store:t,modal:e}){let o=t.useState("floatingRootContext"),r=Bt(o,{outsidePressEvent:{mouse:e==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),n=r.reference??je,s=r.trigger??je,l=Oe.useMemo(()=>Ee(_e,r.floating),[r.floating]);return Zt(t,{activeTriggerProps:n,inactiveTriggerProps:s,popupProps:l}),null}i(_s,"PopoverInteractions");var Le=R(M(),1);var ze=R(se(),1);var jn=Le.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,handle:p,payload:c,openOnHover:u=!1,delay:h=300,closeDelay:v=0,id:f,...m}=e,g=X(!0),b=p?.store??g?.store;if(!b)throw new Error(G(74));let x=fe(f),P=b.useState("isTriggerActive",x),y=b.useState("floatingRootContext"),S=b.useState("isOpenedByTrigger",x),C=b.useState("triggerPopupId",x),w=Le.useRef(null),{registerTrigger:N,isMountedByThisTrigger:E}=Kt(x,w,b,{payload:c,disabled:l,openOnHover:u,closeDelay:v}),T=b.useState("openChangeReason"),k=b.useState("stickIfOpen"),O=b.useState("openMethod"),B=b.useState("focusManagerModal"),D=ko(y,{enabled:!l&&y!=null&&u&&(O!=="touch"||T!==L.triggerPress),mouseOnly:!0,move:!1,handleClose:Oo(),restMs:h,delay:{close:v},triggerElementRef:w,isActiveTrigger:P,isClosing:i(()=>b.select("transitionStatus")==="ending","isClosing")}),j=Ro(y,{enabled:y!=null,stickIfOpen:k}),H=Mo(()=>b.select("open"),Q=>{b.set("openMethod",Q)}),K=b.useState("triggerProps",E),{getButtonProps:W,buttonRef:_}=Ae({disabled:l,native:d}),A={open(Q){return Q&&T===L.triggerPress?Sn.open(Q):Yt.open(Q)}},{preFocusGuardRef:V,handlePreFocusGuardFocus:oe,handleFocusTargetFocus:te}=Nn(b,w),J=F("button",e,{state:{disabled:l,open:S},ref:[_,o,N,w],props:[j.reference,D,K,H,{[xo]:"",id:x,"aria-haspopup":"dialog","aria-expanded":S,"aria-controls":C},m,W],stateAttributesMapping:A});return E&&!B?(0,ze.jsxs)(Le.Fragment,{children:[(0,ze.jsx)(fr,{ref:V,onFocus:oe}),(0,ze.jsx)(Le.Fragment,{children:J},x),(0,ze.jsx)(fr,{ref:b.context.triggerFocusTargetRef,onFocus:te})]}):(0,ze.jsx)(Le.Fragment,{children:J},x)},"PopoverTrigger"));var zn=R(M(),1);var zo=R(M(),1);var br=zo.createContext(void 0);function Kn(){let t=zo.useContext(br);if(t===void 0)throw new Error(G(45));return t}i(Kn,"usePopoverPortalContext");var xr=R(se(),1);var Un=zn.forwardRef(i(function(e,o){let{keepMounted:r=!1,...n}=e,{store:s}=X();return s.useState("mounted")||r?(0,xr.jsx)(br.Provider,{value:r,children:(0,xr.jsx)(Po,{ref:o,...n})}):null},"PopoverPortal"));var eo=R(M(),1);var Uo=R(M(),1);var yr=Uo.createContext(void 0);function Xt(){let t=Uo.useContext(yr);if(!t)throw new Error(G(46));return t}i(Xt,"usePopoverPositionerContext");var io=R(se(),1);var Zn=eo.forwardRef(i(function(e,o){let{render:r,className:n,style:s,anchor:l,positionMethod:d="absolute",side:p="bottom",align:c="center",sideOffset:u=0,alignOffset:h=0,collisionBoundary:v="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:b=!1,collisionAvoidance:x=yo,...P}=e,{store:y}=X(),S=Kn(),C=un(),w=y.useState("floatingRootContext"),N=y.useState("mounted"),E=y.useState("open"),T=y.useState("openChangeReason"),k=y.useState("activeTriggerElement"),O=y.useState("modal"),B=y.useState("openMethod"),D=y.useState("positionerElement"),j=y.useState("instantType"),H=y.useState("transitionStatus"),K=y.useState("hasViewport"),W=eo.useRef(null),_=an(D,!1,!1),A=_o({anchor:l,floatingRootContext:w,positionMethod:d,mounted:N,side:p,sideOffset:u,align:c,alignOffset:h,arrowPadding:m,collisionBoundary:v,collisionPadding:f,sticky:g,disableAnchorTracking:b,keepMounted:S,nodeId:C,collisionAvoidance:x,adaptiveOrigin:K?Io:void 0}),V=w.useState("domReferenceElement");Ie(()=>{let J=V,Q=W.current;if(J&&(W.current=J),Q&&J&&J!==Q){y.set("instantType",void 0);let ne=new AbortController;return _(()=>{y.set("instantType","trigger-change")},ne.signal),()=>{ne.abort()}}},[V,_,y]),wn(E&&O===!0&&T!==L.triggerHover,B==="touch",D,k);let oe=eo.useCallback(J=>{y.set("positionerElement",J)},[y]),te={open:E,side:A.side,align:A.align,anchorHidden:A.anchorHidden,instant:j},le=Lo(e,te,{styles:A.positionerStyles,transitionStatus:H,props:P,refs:[o,oe],hidden:!N,inert:!E});return(0,io.jsxs)(yr.Provider,{value:A,children:[N&&O===!0&&T!==L.triggerHover&&(0,io.jsx)(Ao,{ref:y.context.internalBackdropRef,inert:Do(!E),cutout:k}),(0,io.jsx)(mn,{id:C,children:le})]})},"PopoverPositioner"));var Zo=R(M(),1);var He=R(M(),1);var Wn=R(se(),1);var $n=He.createContext(void 0);function qn(){let[t,e]=He.useState(0),o=Xr(()=>(e(n=>n+1),()=>{e(n=>Math.max(0,n-1))}));return{context:He.useMemo(()=>({register:o}),[o]),hasClosePart:t>0}}i(qn,"useClosePartCount");function Gn(t){let{value:e,children:o}=t;return(0,Wn.jsx)($n.Provider,{value:e,children:o})}i(Gn,"ClosePartProvider");function Yn(){let t=He.useContext($n);Ie(()=>t?.register(),[t])}i(Yn,"useClosePartRegistration");var Pr=R(se(),1);var As={...de,...ve},Jn=Zo.forwardRef(i(function(e,o){let{render:r,className:n,style:s,initialFocus:l,finalFocus:d,...p}=e,{store:c}=X(),u=Xt(),h=En(!0)!=null,{context:v,hasClosePart:f}=qn(),m=c.useState("open"),g=c.useState("openMethod"),b=c.useState("instantType"),x=c.useState("transitionStatus"),P=c.useState("popupProps"),y=c.useState("titleElementId"),S=c.useState("descriptionElementId"),C=c.useState("modal"),w=c.useState("mounted"),N=c.useState("openChangeReason"),E=c.useState("activeTriggerElement"),T=c.useState("floatingRootContext"),k=T.useState("floatingId"),O=c.useState("disabled"),B=c.useState("openOnHover"),D=c.useState("closeDelay"),j=p.id??k;Ht({open:m,ref:c.context.popupRef,onComplete(){m&&c.context.onOpenChangeComplete?.(!0)}}),Eo(T,{enabled:B&&!O,closeDelay:D});let H=l===void 0?So(c.context.popupRef):l,K=C!==!1&&f;c.useSyncedValue("focusManagerModal",K);let W=Zo.useCallback(V=>{c.set("popupElement",V)},[c]),_={open:m,side:u.side,align:u.align,instant:b,transitionStatus:x},A=F("div",e,{state:_,ref:[o,c.context.popupRef,W],props:[P,{id:j,role:"dialog",..._e,"aria-labelledby":y,"aria-describedby":S,onKeyDown(V){h&&Ho.has(V.key)&&V.stopPropagation()}},Vo(x),p],stateAttributesMapping:As});return(0,Pr.jsx)(Co,{context:T,openInteractionType:g,modal:K,disabled:!w||N===L.triggerHover,initialFocus:H,returnFocus:d,restoreFocus:"popup",previousFocusableElement:en(E)?E:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Pr.jsx)(Gn,{value:v,children:A})})},"PopoverPopup"));var Qn=R(M(),1);var Xn=Qn.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=d.useState("open"),{arrowRef:c,side:u,align:h,arrowUncentered:v,arrowStyles:f}=Xt();return F("div",e,{state:{open:p,side:u,align:h,uncentered:v},ref:[o,c],props:[{style:f,"aria-hidden":!0},l],stateAttributesMapping:de})},"PopoverArrow"));var ea=R(M(),1);var Vs={...de,...ve},ta=ea.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=d.useState("open"),c=d.useState("mounted"),u=d.useState("transitionStatus"),h=d.useState("openChangeReason");return F("div",e,{state:{open:p,transitionStatus:u},ref:[d.context.backdropRef,o],props:[{role:"presentation",hidden:!c,style:{pointerEvents:h===L.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:Vs})},"PopoverBackdrop"));var oa=R(M(),1);var ra=oa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=fe(l.id);return d.useSyncedValueWithCleanup("titleElementId",p),F("h2",e,{ref:o,props:[{id:p},l]})},"PopoverTitle"));var na=R(M(),1);var aa=na.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=fe(l.id);return d.useSyncedValueWithCleanup("descriptionElementId",p),F("p",e,{ref:o,props:[{id:p},l]})},"PopoverDescription"));var sa=R(M(),1);var ia=sa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,...p}=e,{buttonRef:c,getButtonProps:u}=Ae({disabled:l,focusableWhenDisabled:!1,native:d}),{store:h}=X();return Yn(),F("button",e,{ref:[o,c],props:[{onClick(f){h.setOpen(!1,Y(L.closePress,f.nativeEvent))}},p,u]})},"PopoverClose"));var ca=R(M(),1);var la=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Ls={activationDirection:i(t=>t?{"data-activation-direction":t}:null,"activationDirection")},da=ca.forwardRef(i(function(e,o){let{render:r,className:n,style:s,children:l,...d}=e,{store:p}=X(),{side:c}=Xt(),u=p.useState("instantType"),{children:h,state:v}=Bo({store:p,side:c,cssVars:la,children:l}),f={activationDirection:v.activationDirection,transitioning:v.transitioning,instant:u};return F("div",e,{state:f,ref:o,props:[d,{children:h}],stateAttributesMapping:Ls})},"PopoverViewport"));var lo=class{static{i(this,"PopoverHandle")}constructor(){this.store=new Qt}open(e){let o=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!o)throw new Error(G(80,e));this.store.setOpen(!0,Y(L.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(L.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function pa(){return new lo}i(pa,"createPopoverHandle");var pe={};lr(pe,{Backdrop:()=>ma,Close:()=>ga,Description:()=>va,Handle:()=>mo,Popup:()=>Ca,Portal:()=>Sa,Root:()=>Oa,Title:()=>_a,Trigger:()=>Aa,Viewport:()=>Da,createHandle:()=>Va});var ua=R(M(),1);var co=R(M(),1);var Wo=co.createContext(!1),Cr=co.createContext(void 0);function ie(t){let e=co.useContext(Cr);if(t===!1&&e===void 0)throw new Error(G(27));return e}i(ie,"useDialogRootContext");var Hs={...de,...ve},ma=ua.forwardRef(i(function(e,o){let{render:r,className:n,style:s,forceRender:l=!1,...d}=e,{store:p}=ie(),c=p.useState("open"),u=p.useState("nested"),h=p.useState("mounted"),v=p.useState("transitionStatus");return F("div",e,{state:{open:c,transitionStatus:v},ref:[p.context.backdropRef,o],stateAttributesMapping:Hs,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:l||!u})},"DialogBackdrop"));var fa=R(M(),1);var ga=fa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,...p}=e,{store:c}=ie(),u=c.useState("open"),{getButtonProps:h,buttonRef:v}=Ae({disabled:l,native:d}),f={disabled:l};function m(g){u&&c.setOpen(!1,Y(L.closePress,g.nativeEvent))}return i(m,"handleClick"),F("button",e,{state:f,ref:[o,v],props:[{onClick:m},p,h]})},"DialogClose"));var ha=R(M(),1);var va=ha.forwardRef(i(function(e,o){let{render:r,className:n,style:s,id:l,...d}=e,{store:p}=ie(),c=fe(l);return p.useSyncedValueWithCleanup("descriptionElementId",c),F("p",e,{ref:o,props:[{id:c},d]})},"DialogDescription"));var ya=R(M(),1);var ba=(function(t){return t.nestedDialogs="--nested-dialogs",t})({});var xa=(function(t){return t[t.open=Ce.open]="open",t[t.closed=Ce.closed]="closed",t[t.startingStyle=Ce.startingStyle]="startingStyle",t[t.endingStyle=Ce.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var $o=R(M(),1);var Rr=$o.createContext(void 0);function qo(){let t=$o.useContext(Rr);if(t===void 0)throw new Error(G(26));return t}i(qo,"useDialogPortalContext");var Pa=R(se(),1);var Bs={...de,...ve,nestedDialogOpen(t){return t?{[xa.nestedDialogOpen]:""}:null}},Ca=ya.forwardRef(i(function(e,o){let{render:r,className:n,style:s,finalFocus:l,initialFocus:d,...p}=e,{store:c}=ie(),u=c.useState("descriptionElementId"),h=c.useState("disablePointerDismissal"),v=c.useState("floatingRootContext"),f=c.useState("popupProps"),m=c.useState("modal"),g=c.useState("mounted"),b=c.useState("nested"),x=c.useState("nestedOpenDialogCount"),P=c.useState("open"),y=c.useState("openMethod"),S=c.useState("titleElementId"),C=c.useState("transitionStatus"),w=c.useState("role"),N=v.useState("floatingId"),E=p.id??N;qo(),Ht({open:P,ref:c.context.popupRef,onComplete(){P&&c.context.onOpenChangeComplete?.(!0)}});let T=d===void 0?So(c.context.popupRef):d,k=x>0,O=c.useStateSetter("popupElement"),D=F("div",e,{state:{open:P,nested:b,transitionStatus:C,nestedDialogOpen:k},props:[f,{id:E,"aria-labelledby":S??void 0,"aria-describedby":u??void 0,role:w,..._e,hidden:!g,onKeyDown(j){Ho.has(j.key)&&j.stopPropagation()},style:{[ba.nestedDialogs]:x}},p],ref:[o,c.context.popupRef,O],stateAttributesMapping:Bs});return(0,Pa.jsx)(Co,{context:v,openInteractionType:y,disabled:!g,closeOnFocusOut:!h,initialFocus:T,returnFocus:l,modal:m!==!1,restoreFocus:"popup",children:D})},"DialogPopup"));var Ra=R(M(),1);var po=R(se(),1);var Sa=Ra.forwardRef(i(function(e,o){let{keepMounted:r=!1,...n}=e,{store:s}=ie(),l=s.useState("mounted"),d=s.useState("modal"),p=s.useState("open");return l||r?(0,po.jsx)(Rr.Provider,{value:r,children:(0,po.jsxs)(Po,{ref:o,...n,children:[l&&d===!0&&(0,po.jsx)(Ao,{ref:s.context.internalBackdropRef,inert:Do(!p)}),e.children]})}):null},"DialogPortal"));var ka=R(M(),1);var wa=R(M(),1);var Me=R(M(),1);function Na(t){let{store:e,actionsRef:o}=t,r=e.useState("open");wo(e,r),zt(e);let{forceUnmount:n}=Ut(r,e),s=Me.useCallback(()=>{e.setOpen(!1,Y(L.imperativeAction))},[e]);Me.useImperativeHandle(o,()=>({unmount:n,close:s}),[n,s])}i(Na,"useDialogRoot");function Ta({store:t,parentContext:e,isDrawer:o}){let r=t.useState("open"),n=t.useState("disablePointerDismissal"),s=t.useState("modal"),l=t.useState("popupElement"),d=t.useState("floatingRootContext"),[p,c]=Me.useState(0),[u,h]=Me.useState(0),v=p===0,f=Bt(d,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(x){if(!t.context.outsidePressEnabledRef.current||"button"in x&&x.button!==0||"touches"in x&&x.touches.length!==1)return!1;let P=tn(x);return v&&!n?s&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===P||t.context.backdropRef.current===P||ao(P,l)&&!P?.hasAttribute("data-base-ui-portal"):!0:!1},escapeKey:v});Tn(r&&s===!0,l),t.useContextCallback("onNestedDialogOpen",(x,P)=>{c(x),h(P)}),t.useContextCallback("onNestedDialogClose",()=>{c(0),h(0)}),Me.useEffect(()=>(e?.onNestedDialogOpen&&r&&e.onNestedDialogOpen(p+1,u+(o?1:0)),e?.onNestedDialogClose&&!r&&e.onNestedDialogClose(),()=>{e?.onNestedDialogClose&&r&&e.onNestedDialogClose()}),[o,r,p,u,e]);let m=f.reference??je,g=f.trigger??je,b=f.floating??je;return Zt(t,{activeTriggerProps:m,inactiveTriggerProps:g,popupProps:b,nestedOpenDialogCount:p,nestedOpenDrawerCount:u}),null}i(Ta,"DialogInteractions");var Go=R(M(),1);var Fs={...Gt,modal:Z(t=>t.modal),nested:Z(t=>t.nested),nestedOpenDialogCount:Z(t=>t.nestedOpenDialogCount),nestedOpenDrawerCount:Z(t=>t.nestedOpenDrawerCount),disablePointerDismissal:Z(t=>t.disablePointerDismissal),openMethod:Z(t=>t.openMethod),descriptionElementId:Z(t=>t.descriptionElementId),titleElementId:Z(t=>t.titleElementId),viewportElement:Z(t=>t.viewportElement),role:Z(t=>t.role)},to=class t extends Ft{static{i(this,"DialogStore")}constructor(e,o,r=!1){let n=new Wt,s=js(e);s.floatingRootContext=qt(n,o,r),super(s,{popupRef:Go.createRef(),backdropRef:Go.createRef(),internalBackdropRef:Go.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:n,onOpenChange:void 0,onOpenChangeComplete:void 0},Fs)}setOpen=i((e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let r={open:e};No(r,e,o.trigger),this.update(r)},"setOpen");static useStore(e,o){return jt(e,(n,s)=>new t(o,n,s),!0).store}};function js(t={}){return{...$t(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...t}}i(js,"createInitialState");var uo=R(se(),1);function Ea(t,e="dialog"){let{children:o,open:r,defaultOpen:n=!1,onOpenChange:s,onOpenChangeComplete:l,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:c,handle:u,triggerId:h,defaultTriggerId:v=null}=t,f=e==="drawer",m=e==="alert-dialog",g=m?!0:p,b=m||d,x=m?"alertdialog":"dialog",P=ie(!0),S={modal:g,disablePointerDismissal:b,nested:!!P,role:x},C=to.useStore(u?.store,{open:n,openProp:r,activeTriggerId:v,triggerIdProp:h,...S});hn(()=>{let O=r===void 0&&C.state.open===!1&&n===!0?{open:!0,activeTriggerId:v}:null;m?C.update(O?{...S,...O}:S):O&&C.update(O)}),C.useControlledProp("openProp",r),C.useControlledProp("triggerIdProp",h),C.useSyncedValues(S),C.useContextCallback("onOpenChange",s),C.useContextCallback("onOpenChangeComplete",l);let w=C.useState("open"),N=C.useState("mounted"),E=C.useState("payload");Na({store:C,actionsRef:c});let T=w||N,k=wa.useMemo(()=>({store:C}),[C]);return(0,uo.jsx)(Wo.Provider,{value:!1,children:(0,uo.jsxs)(Cr.Provider,{value:k,children:[T&&(0,uo.jsx)(Ta,{store:C,parentContext:P?.store.context,isDrawer:f}),typeof o=="function"?o({payload:E}):o]})})}i(Ea,"useRenderDialogRoot");function Oa(t){let e=ka.useContext(Wo)?"drawer":"dialog";return Ea(t,e)}i(Oa,"DialogRoot");var Ma=R(M(),1);var Sr=(function(t){return t[t.open=Ce.open]="open",t[t.closed=Ce.closed]="closed",t[t.startingStyle=Ce.startingStyle]="startingStyle",t[t.endingStyle=Ce.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var Ks={...de,...ve,nested(t){return t?{[Sr.nested]:""}:null},nestedDialogOpen(t){return t?{[Sr.nestedDialogOpen]:""}:null}},Da=Ma.forwardRef(i(function(e,o){let{render:r,className:n,style:s,children:l,...d}=e,p=qo(),{store:c}=ie(),u=c.useState("open"),h=c.useState("nested"),v=c.useState("transitionStatus"),f=c.useState("nestedOpenDialogCount"),m=c.useState("mounted"),g=c.useStateSetter("viewportElement"),b=f>0;return F("div",e,{enabled:p||m,state:{open:u,nested:h,transitionStatus:v,nestedDialogOpen:b},ref:[o,g],stateAttributesMapping:Ks,props:[{role:"presentation",hidden:!m,style:{pointerEvents:u?void 0:"none"},children:l},d]})},"DialogViewport"));var Ia=R(M(),1);var _a=Ia.forwardRef(i(function(e,o){let{render:r,className:n,style:s,id:l,...d}=e,{store:p}=ie(),c=fe(l);return p.useSyncedValueWithCleanup("titleElementId",c),F("h2",e,{ref:o,props:[{id:c},d]})},"DialogTitle"));var Yo=R(M(),1);var Aa=Yo.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,id:p,payload:c,handle:u,...h}=e,v=ie(!0),f=u?.store??v?.store;if(!f)throw new Error(G(79));let m=fe(p),g=f.useState("floatingRootContext"),b=f.useState("isOpenedByTrigger",m),x=f.useState("triggerPopupId",m),P=Yo.useRef(null),{registerTrigger:y,isMountedByThisTrigger:S}=Kt(m,P,f,{payload:c}),{getButtonProps:C,buttonRef:w}=Ae({disabled:l,native:d}),N=Ro(g,{enabled:g!=null}),E=Mo(()=>f.select("open"),O=>{f.set("openMethod",O)}),T={disabled:l,open:b},k=f.useState("triggerProps",S);return F("button",e,{state:T,ref:[w,o,y,P],props:[N.reference,k,E,{[xo]:"",id:m,"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":x},h,C],stateAttributesMapping:Yt})},"DialogTrigger"));var mo=class{static{i(this,"DialogHandle")}constructor(e){this.store=e??new to}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,Y(L.imperativeAction,void 0,o))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,Y(L.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,Y(L.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Va(){return new mo}i(Va,"createDialogHandle");var Se={};lr(Se,{Arrow:()=>ts,Handle:()=>fo,Popup:()=>Xa,Portal:()=>Ga,Positioner:()=>Ja,Provider:()=>os,Root:()=>Ha,Trigger:()=>za,Viewport:()=>as,createHandle:()=>ss});var Re=R(M(),1);var Jo=R(M(),1);var Nr=Jo.createContext(void 0);function be(t){let e=Jo.useContext(Nr);if(e===void 0&&!t)throw new Error(G(72));return e}i(be,"useTooltipRootContext");var La=R(M(),1);var zs={...Gt,disabled:Z(t=>t.disabled),instantType:Z(t=>t.instantType),isInstantPhase:Z(t=>t.isInstantPhase),trackCursorAxis:Z(t=>t.trackCursorAxis),disableHoverablePopup:Z(t=>t.disableHoverablePopup),lastOpenChangeReason:Z(t=>t.openChangeReason),closeOnClick:Z(t=>t.closeOnClick),closeDelay:Z(t=>t.closeDelay),hasViewport:Z(t=>t.hasViewport)},oo=class t extends Ft{static{i(this,"TooltipStore")}constructor(e,o,r=!1){let n=new Wt,s={...Us(),...e};s.floatingRootContext=qt(n,o,r),super(s,{popupRef:La.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},zs)}setOpen=i((e,o)=>{yn(this,e,o,{extraState:{openChangeReason:o.reason}})},"setOpen");cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Y(L.triggerPress,e))}static useStore(e,o){return jt(e,(n,s)=>new t(o,n,s)).store}};function Us(){return{...$t(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}i(Us,"createInitialState");var Qo=R(se(),1);var Ha=vn(i(function(e){let{disabled:o=!1,defaultOpen:r=!1,open:n,disableHoverablePopup:s=!1,trackCursorAxis:l="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:c,handle:u,triggerId:h,defaultTriggerId:v=null,children:f}=e,m=oo.useStore(u?.store,{open:r,openProp:n,activeTriggerId:v,triggerIdProp:h});To(m,n,r,v),m.useControlledProp("openProp",n),m.useControlledProp("triggerIdProp",h),m.useContextCallback("onOpenChange",p),m.useContextCallback("onOpenChangeComplete",c);let g=m.useState("open"),b=!o&&g,x=m.useState("activeTriggerId"),P=m.useState("mounted"),y=m.useState("payload");m.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:s}),m.useSyncedValue("disabled",o),zt(m,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:S,transitionStatus:C}=Ut(b,m),w=m.useState("isInstantPhase"),N=m.useState("instantType"),E=m.useState("lastOpenChangeReason"),T=Re.useRef(null);Ie(()=>{g&&o&&m.setOpen(!1,Y(L.disabled))},[g,o,m]),Ie(()=>{C==="ending"&&E===L.none||C!=="ending"&&w?(N!=="delay"&&(T.current=N),m.set("instantType","delay")):T.current!==null&&(m.set("instantType",T.current),T.current=null)},[C,w,E,N,m]),Ie(()=>{b&&x==null&&m.set("payload",void 0)},[m,x,b]);let k=Re.useCallback(()=>{m.setOpen(!1,Y(L.imperativeAction))},[m]);Re.useImperativeHandle(d,()=>({unmount:S,close:k}),[S,k]);let O=b||P||!o&&l!=="none";return(0,Qo.jsxs)(Nr.Provider,{value:m,children:[O&&(0,Qo.jsx)(Zs,{store:m,disabled:o,trackCursorAxis:l}),typeof f=="function"?f({payload:y}):f]})},"TooltipRoot"));function Zs({store:t,disabled:e,trackCursorAxis:o}){let r=t.useState("floatingRootContext"),n=Bt(r,{enabled:!e,referencePress:i(()=>t.select("closeOnClick"),"referencePress")}),s=gn(r,{enabled:!e&&o!=="none",axis:o==="none"?void 0:o}),l=Re.useMemo(()=>Ee(s.reference,n.reference),[s.reference,n.reference]),d=Re.useMemo(()=>Ee(s.trigger,n.trigger),[s.trigger,n.trigger]),p=Re.useMemo(()=>Ee(_e,s.floating,n.floating),[s.floating,n.floating]);return Zt(t,{activeTriggerProps:l,inactiveTriggerProps:d,popupProps:p}),null}i(Zs,"TooltipInteractions");var er=R(M(),1);var Xo=R(M(),1);var Tr=Xo.createContext(void 0);function Ba(){return Xo.useContext(Tr)}i(Ba,"useTooltipProviderContext");var Fa=(function(t){return t[t.popupOpen=Rn.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t})({});var Ka="data-base-ui-tooltip-trigger";function ja(t){if("composedPath"in t){let o=t.composedPath();for(let r=0;r<o.length;r+=1){let n=o[r];if(bo(n))return n}}let e=t.target;return bo(e)?e:null}i(ja,"getTargetElement");function Ws(t){let e=t;for(;e;){if(e.hasAttribute(Ka))return e;let o=e.parentElement;if(o){e=o;continue}let r=e.getRootNode();e="host"in r&&bo(r.host)?r.host:null}return null}i(Ws,"closestEnabledTooltipTrigger");var za=bn(i(function(e,o){let{render:r,className:n,style:s,handle:l,payload:d,disabled:p,delay:c,closeOnClick:u=!0,closeDelay:h,id:v,...f}=e,m=be(!0),g=l?.store??m;if(!g)throw new Error(G(82));let b=fe(v),x=g.useState("isTriggerActive",b),P=g.useState("isOpenedByTrigger",b),y=g.useState("floatingRootContext"),S=er.useRef(null),C=c??600,w=h??0,{registerTrigger:N,isMountedByThisTrigger:E}=Kt(b,S,g,{payload:d,closeOnClick:u,closeDelay:w}),T=Ba(),{delayRef:k,isInstantPhase:O,hasProvider:B}=ln(y,{open:P}),D=Cn(y);g.useSyncedValue("isInstantPhase",O);let j=g.useState("disabled"),H=p??j,K=cn(H),W=g.useState("trackCursorAxis"),_=g.useState("disableHoverablePopup"),A=er.useRef(!1),V=nn(),oe=er.useRef(void 0);function te(){let q=T?.delay,ee=typeof k.current=="object"?k.current.open:void 0,ae=C;return B&&(ee!==0?ae=c??q??C:ae=0),ae}i(te,"getOpenDelay");function le(q){let ee=S.current;if(!ee||!q)return!1;let ae=Ws(q);return ae!==null&&ae!==ee&&ao(ee,ae)}i(le,"isEnabledNestedTriggerTarget");function J(q){let ee=le(q);return A.current=ee,ee&&(D.openChangeTimeout.clear(),D.restTimeout.clear(),D.restTimeoutPending=!1,V.clear()),ee}i(J,"detectNestedTriggerHover");let Q=ko(y,{enabled:!H,mouseOnly:!0,move:!1,handleClose:!_&&W!=="both"?Oo():null,restMs:te,delay(){let q=typeof k.current=="object"?k.current.close:void 0,ee=w;return h==null&&B&&(ee=q),{close:ee}},triggerElementRef:S,isActiveTrigger:x,isClosing:i(()=>g.select("transitionStatus")==="ending","isClosing"),shouldOpen(){return!A.current}}),ne=Pn(y,{enabled:!H}).reference,ue=i(q=>{let ee=A.current,ae=ja(q),Ne=J(ae),xe=S.current,De=xe&&ae&&ao(xe,ae);if(Ne&&g.select("open")&&g.select("lastOpenChangeReason")===L.triggerHover){g.setOpen(!1,Y(L.triggerHover,q));return}if(ee&&!Ne&&De&&!K.current&&!g.select("open")&&xe&&on(oe.current)){let Te=i(()=>{!A.current&&!K.current&&!g.select("open")&&g.setOpen(!0,Y(L.triggerHover,q,xe))},"open"),we=te();we===0?(V.clear(),Te()):V.start(we,Te)}},"handleNestedTriggerHover"),me=g.useState("triggerProps",E);return F("button",e,{state:{open:P},ref:[o,N,S],props:[Q,ne,E||W!=="none"?me:void 0,{onMouseOver(q){ue(q.nativeEvent)},onFocus(q){le(ja(q.nativeEvent))&&q.preventBaseUIHandler()},onMouseLeave(){A.current=!1,V.clear(),oe.current=void 0},onPointerEnter(q){oe.current=q.pointerType},onPointerDown(q){oe.current=q.pointerType,g.set("closeOnClick",u),u&&!g.select("open")&&g.cancelPendingOpen(q.nativeEvent)},onClick(q){u&&!g.select("open")&&g.cancelPendingOpen(q.nativeEvent)},id:b,[Fa.triggerDisabled]:H?"":void 0,[Ka]:H?void 0:""},f],stateAttributesMapping:Yt})},"TooltipTrigger"));var qa=R(M(),1);var tr=R(M(),1);var wr=tr.createContext(void 0);function Ua(){let t=tr.useContext(wr);if(t===void 0)throw new Error(G(70));return t}i(Ua,"useTooltipPortalContext");var or=R(M(),1),Za=R(Hr(),1);var Wa=R(se(),1);var $a=or.forwardRef(i(function(e,o){let{children:r,container:n,className:s,render:l,style:d,...p}=e,{portalNode:c,portalSubtree:u}=dn({container:n,ref:o,componentProps:e,elementProps:p});return!u&&!c?null:(0,Wa.jsxs)(or.Fragment,{children:[u,c&&Za.createPortal(r,c)]})},"FloatingPortalLite"));var Er=R(se(),1);var Ga=qa.forwardRef(i(function(e,o){let{keepMounted:r=!1,...n}=e;return be().useState("mounted")||r?(0,Er.jsx)(wr.Provider,{value:r,children:(0,Er.jsx)($a,{ref:o,...n})}):null},"TooltipPortal"));var nr=R(M(),1);var rr=R(M(),1);var kr=rr.createContext(void 0);function ro(){let t=rr.useContext(kr);if(t===void 0)throw new Error(G(71));return t}i(ro,"useTooltipPositionerContext");var Ya=R(se(),1);var Ja=nr.forwardRef(i(function(e,o){let{render:r,className:n,anchor:s,positionMethod:l="absolute",side:d="top",align:p="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:h="clipping-ancestors",collisionPadding:v=5,arrowPadding:f=5,sticky:m=!1,disableAnchorTracking:g=!1,collisionAvoidance:b=yo,style:x,...P}=e,y=be(),S=Ua(),C=y.useState("open"),w=y.useState("mounted"),N=y.useState("trackCursorAxis"),E=y.useState("disableHoverablePopup"),T=y.useState("floatingRootContext"),k=y.useState("instantType"),O=y.useState("transitionStatus"),B=y.useState("hasViewport"),D=_o({anchor:s,positionMethod:l,floatingRootContext:T,mounted:w,side:d,sideOffset:c,align:p,alignOffset:u,collisionBoundary:h,collisionPadding:v,sticky:m,arrowPadding:f,disableAnchorTracking:g,keepMounted:S,collisionAvoidance:b,adaptiveOrigin:B?Io:void 0}),j=nr.useMemo(()=>({open:C,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:N!=="none"?"tracking-cursor":k}),[C,D.side,D.align,D.anchorHidden,N,k]),H=Lo(e,j,{styles:D.positionerStyles,transitionStatus:O,props:P,refs:[o,y.useStateSetter("positionerElement")],hidden:!w,inert:!C||N==="both"||E});return(0,Ya.jsx)(kr.Provider,{value:D,children:H})},"TooltipPositioner"));var Qa=R(M(),1);var $s={...de,...ve},Xa=Qa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,d=be(),{side:p,align:c}=ro(),u=d.useState("open"),h=d.useState("instantType"),v=d.useState("transitionStatus"),f=d.useState("popupProps"),m=d.useState("floatingRootContext"),g=d.useState("disabled"),b=d.useState("closeDelay");Ht({open:u,ref:d.context.popupRef,onComplete(){u&&d.context.onOpenChangeComplete?.(!0)}}),Eo(m,{enabled:!g,closeDelay:b});let x=d.useStateSetter("popupElement");return F("div",e,{state:{open:u,side:p,align:c,instant:h,transitionStatus:v},ref:[o,d.context.popupRef,x],props:[f,Vo(v),l],stateAttributesMapping:$s})},"TooltipPopup"));var es=R(M(),1);var ts=es.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,d=be(),{arrowRef:p,side:c,align:u,arrowUncentered:h,arrowStyles:v}=ro(),f=d.useState("open"),m=d.useState("instantType");return F("div",e,{state:{open:f,side:c,align:u,uncentered:h,instant:m},ref:[o,p],props:[{style:v,"aria-hidden":!0},l],stateAttributesMapping:de})},"TooltipArrow"));var Or=R(M(),1);var Mr=R(se(),1);var os=i(function(e){let{delay:o,closeDelay:r,timeout:n=400}=e,s=Or.useMemo(()=>({delay:o,closeDelay:r}),[o,r]),l=Or.useMemo(()=>({open:o,close:r}),[o,r]);return(0,Mr.jsx)(Tr.Provider,{value:s,children:(0,Mr.jsx)(sn,{delay:l,timeoutMs:n,children:e.children})})},"TooltipProvider");var ns=R(M(),1);var rs=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var qs={activationDirection:i(t=>t?{"data-activation-direction":t}:null,"activationDirection")},as=ns.forwardRef(i(function(e,o){let{render:r,className:n,style:s,children:l,...d}=e,p=be(),c=ro(),u=p.useState("instantType"),{children:h,state:v}=Bo({store:p,side:c.side,cssVars:rs,children:l}),f={activationDirection:v.activationDirection,transitioning:v.transitioning,instant:u};return F("div",e,{state:f,ref:o,props:[d,{children:h}],stateAttributesMapping:qs})},"TooltipViewport"));var fo=class{static{i(this,"TooltipHandle")}constructor(){this.store=new oo}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!o)throw new Error(G(81,e));this.store.setOpen(!0,Y(L.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(L.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function ss(){return new fo}i(ss,"createTooltipHandle");var is=R(dr(),1);var ls=R(se(),1);var Gs=i((t,e,o)=>t!==void 0?t:e===void 0&&o===void 0?Yr:Gr(e,o),"p"),cs=i(t=>{let e=(0,is.c)(7),{catalogs:o,children:r,i18n:n,locale:s}=t,l;e[0]!==o||e[1]!==n||e[2]!==s?(l=Gs(n,s,o),e[0]=o,e[1]=n,e[2]=s,e[3]=l):l=e[3];let d=l,p;return e[4]!==r||e[5]!==d?(p=(0,ls.jsx)(Jr,{value:d,children:r}),e[4]=r,e[5]=d,e[6]=p):p=e[6],p},"S");var Ir=R(dr(),1);var Fe=R(M(),1);var re=R(se(),1);var Dr="lunora:command-palette",ds=i(()=>{"window"in globalThis&&globalThis.dispatchEvent(new Event(Dr))},"re"),Ys=i(t=>{let e=(0,Ir.c)(18),{active:o,index:r,item:n,onActivate:s,onSelect:l}=t,d;e[0]!==n||e[1]!==l?(d=i(()=>{l(n)},"s"),e[0]=n,e[1]=l,e[2]=d):d=e[2];let p=d,c;e[3]!==r||e[4]!==s?(c=i(()=>{s(r)},"c"),e[3]=r,e[4]=s,e[5]=c):c=e[5];let u=c,h=o?"bg-accent text-accent-foreground":"text-foreground",v;e[6]!==h?(v=$("flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground",h),e[6]=h,e[7]=v):v=e[7];let f;e[8]!==n.label?(f=(0,re.jsx)("span",{children:n.label}),e[8]=n.label,e[9]=f):f=e[9];let m;e[10]!==n.group?(m=(0,re.jsx)("span",{className:"text-xs text-muted-foreground",children:n.group}),e[10]=n.group,e[11]=m):m=e[11];let g;return e[12]!==p||e[13]!==u||e[14]!==v||e[15]!==f||e[16]!==m?(g=(0,re.jsx)("li",{children:(0,re.jsxs)("button",{className:v,onClick:p,onMouseEnter:u,type:"button",children:[f,m]})}),e[12]=p,e[13]=u,e[14]=v,e[15]=f,e[16]=m,e[17]=g):g=e[17],g},"q"),Js=i((t,e)=>{let o=e.trim().toLowerCase();return o===""?t:t.filter(r=>r.label.toLowerCase().includes(o)||r.group.toLowerCase().includes(o))},"G"),ps=i(t=>{let e=(0,Ir.c)(39),{items:o}=t,r=ge(),n=no(),[s,l]=(0,Fe.useState)(!1),[d,p]=(0,Fe.useState)(""),[c,u]=(0,Fe.useState)(0),h=(0,Fe.useRef)(null),v,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=i(()=>{let _=i(V=>{(V.metaKey||V.ctrlKey)&&V.key.toLowerCase()==="k"&&(V.preventDefault(),l(!0))},"o"),A=i(()=>{l(!0)},"r");return globalThis.addEventListener("keydown",_),globalThis.addEventListener(Dr,A),()=>{globalThis.removeEventListener("keydown",_),globalThis.removeEventListener(Dr,A)}},"i"),f=[],e[0]=v,e[1]=f):(v=e[0],f=e[1]),(0,Fe.useEffect)(v,f);let m;e[2]!==o||e[3]!==d?(m=Js(o,d),e[2]=o,e[3]=d,e[4]=m):m=e[4];let g=m,b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=i(_=>{l(_),_||(p(""),u(0))},"T"),e[5]=b):b=e[5];let x=b,P;e[6]!==n?(P=i(_=>{x(!1),Jt(n({to:_.to}))},"D"),e[6]=n,e[7]=P):P=e[7];let y=P,S;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=i(_=>{p(_.target.value),u(0)},"A"),e[8]=S):S=e[8];let C=S,w;e[9]!==c||e[10]!==g||e[11]!==y?(w=i(_=>{e:switch(_.key){case"ArrowDown":{_.preventDefault(),u(A=>g.length===0?0:(A+1)%g.length);break e}case"ArrowUp":{_.preventDefault(),u(A=>g.length===0?0:(A-1+g.length)%g.length);break e}case"Enter":{_.preventDefault();let A=g[c];A!==void 0&&y(A);break e}}},"j"),e[9]=c,e[10]=g,e[11]=y,e[12]=w):w=e[12];let N=w,E;e[13]===Symbol.for("react.memo_cache_sentinel")?(E=(0,re.jsx)(pe.Backdrop,{className:"fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"}),e[13]=E):E=e[13];let T;e[14]!==r?(T=r("Command palette"),e[14]=r,e[15]=T):T=e[15];let k;e[16]!==T?(k=(0,re.jsx)(pe.Title,{className:"sr-only",children:T}),e[16]=T,e[17]=k):k=e[17];let O;e[18]===Symbol.for("react.memo_cache_sentinel")?(O=(0,re.jsxs)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,re.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,re.jsx)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[18]=O):O=e[18];let B;e[19]!==r?(B=r("Search\u2026"),e[19]=r,e[20]=B):B=e[20];let D;e[21]!==N||e[22]!==d||e[23]!==B?(D=(0,re.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[O,(0,re.jsx)("input",{className:"h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-testid":"dash-command-input",onChange:C,onKeyDown:N,placeholder:B,ref:h,type:"text",value:d})]}),e[21]=N,e[22]=d,e[23]=B,e[24]=D):D=e[24];let j;e[25]!==c||e[26]!==g||e[27]!==y||e[28]!==r?(j=g.length===0?(0,re.jsx)("li",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:r("No results.")}):g.map((_,A)=>(0,re.jsx)(Ys,{active:A===c,index:A,item:_,onActivate:u,onSelect:y},_.to)),e[25]=c,e[26]=g,e[27]=y,e[28]=r,e[29]=j):j=e[29];let H;e[30]!==j?(H=(0,re.jsx)("ul",{className:"max-h-80 overflow-y-auto p-1.5","data-testid":"dash-command-list",children:j}),e[30]=j,e[31]=H):H=e[31];let K;e[32]!==k||e[33]!==D||e[34]!==H?(K=(0,re.jsxs)(pe.Portal,{children:[E,(0,re.jsxs)(pe.Popup,{className:"fixed start-1/2 top-24 z-50 w-[36rem] max-w-[90vw] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","data-testid":"dash-command-palette",initialFocus:h,children:[k,D,H]})]}),e[32]=k,e[33]=D,e[34]=H,e[35]=K):K=e[35];let W;return e[36]!==s||e[37]!==K?(W=(0,re.jsx)(pe.Root,{onOpenChange:x,open:s,children:K}),e[36]=s,e[37]=K,e[38]=W):W=e[38],W},"le");var vs="(prefers-color-scheme: dark)",bs=i(()=>{try{return globalThis.localStorage}catch{return}},"Vt"),Qs=i(t=>t==="system"||t==="light"||t==="dark","wa"),xs=i(()=>globalThis.matchMedia,"Zt"),ys="lunora-studio-theme",_r=["system","light","dark"],Xs=i((t="system")=>{try{let e=bs()?.getItem(ys);return Qs(e)?e:t}catch{return t}},"Na"),us=i(t=>{let e=bs();if(e!==void 0)try{e.setItem(ys,t)}catch{}},"St"),ei=i(()=>{try{return xs()?.(vs).matches?"dark":"light"}catch{return"light"}},"Sa"),ti=i((t,e)=>t==="system"?e:t,"Ma"),oi=i(t=>{let e;try{e=xs()?.(vs)}catch{e=void 0}if(e===void 0)return()=>{};let o=i(r=>{t(r.matches?"dark":"light")},"a");return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}},"Ca"),Lr=(0,z.createContext)(null),ri=i(({children:t,defaultTheme:e="system"})=>{let[o,r]=(0,z.useState)(()=>Xs(e)),[n,s]=(0,z.useState)(()=>ei());(0,z.useEffect)(()=>oi(s),[]);let l=i(p=>{us(p),r(p)},"i"),d={cycleTheme:i(()=>{r(p=>{let c=_r[(_r.indexOf(p)+1)%_r.length]??p;return us(c),c})},"cycleTheme"),resolvedTheme:ti(o,n),setTheme:l,systemTheme:n,theme:o};return(0,a.jsx)(Lr,{value:d,children:t})},"_a"),ni=i(t=>{let e=(0,I.c)(3),{children:o}=t,r=(0,z.use)(Lr),n;return e[0]!==o||e[1]!==r?(n=r===null?(0,a.jsx)(ri,{children:o}):o,e[0]=o,e[1]=r,e[2]=n):n=e[2],n},"La"),ai=i(()=>{let t=(0,z.use)(Lr);if(t===null)throw new cr("INTERNAL","useTheme must be used within a <ThemeProvider>");return t},"Pa");function Vg({delay:t=0,...e}){return(0,a.jsx)(Se.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}i(Vg,"dn");function si(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Se.Root,{"data-slot":"tooltip",...o}),e[2]=o,e[3]=r):r=e[3],r}i(si,"$a");function ii(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Se.Trigger,{"data-slot":"tooltip-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}i(ii,"Aa");function li({className:t,side:e="top",sideOffset:o=4,align:r="center",alignOffset:n=0,children:s,...l}){return(0,a.jsx)(Se.Portal,{children:(0,a.jsx)(Se.Positioner,{align:r,alignOffset:n,side:e,sideOffset:o,className:"isolate z-50",children:(0,a.jsxs)(Se.Popup,{"data-slot":"tooltip-content",className:$("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[s,(0,a.jsx)(Se.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-md bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}i(li,"Ta");var ci=i(t=>{let e=(0,I.c)(5),{className:o}=t,r;e[0]!==o?(r=$("h-full w-full text-foreground",o),e[0]=o,e[1]=r):r=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)("path",{d:"M 259.500 10.552 C 220.080 15.859, 182.424 32.566, 152.500 58.025 C 110.179 94.031, 85.380 137.183, 77.518 188.500 C 75.410 202.255, 74.569 225.677, 75.796 236.466 C 76.757 244.917, 76.683 245.692, 74.518 249.966 C 63.118 272.466, 53.141 303.876, 51.382 322.799 L 50.718 329.943 71.960 320.471 C 83.643 315.262, 93.326 311, 93.478 311 C 93.630 311, 96.547 316.063, 99.959 322.250 C 103.371 328.438, 107.249 334.850, 108.577 336.500 L 110.990 339.500 110.981 336 C 110.977 334.075, 111.499 324.991, 112.143 315.813 L 113.312 299.127 121.406 293.336 C 132.495 285.403, 149.593 271.554, 161 261.268 C 171.556 251.748, 189.116 235, 188.540 235 C 188.337 235, 183.069 238.648, 176.835 243.106 C 142.318 267.789, 68.537 314, 63.646 314 C 61.843 314, 72.791 281.179, 80.905 262.259 C 92.233 235.845, 107.473 212.389, 132.106 183.453 L 138.451 176 148.268 176 C 176.192 176, 197.512 187.154, 212.868 209.797 C 216.470 215.108, 217.035 216.595, 216.477 219.297 C 211.386 243.968, 202.359 274.496, 193.797 296 C 183.898 320.861, 167.147 352.101, 152.395 373.215 L 147.004 380.930 152.891 385.830 C 161.400 392.911, 165.563 396, 166.594 395.998 C 167.092 395.998, 168.772 391.641, 170.327 386.317 C 176.279 365.934, 188.422 338.749, 200.942 317.778 C 223.060 280.731, 256.432 244.369, 294.500 215.836 C 309.956 204.252, 313.937 201.603, 314.719 202.385 C 315.116 202.783, 315.449 213.096, 315.460 225.304 C 315.474 241.855, 315.021 250.405, 313.680 258.924 C 307.009 301.272, 291.175 336.677, 263.112 372 C 255.259 381.883, 227.182 410.673, 218.516 417.727 L 213.532 421.783 223.439 424.880 C 281.705 443.093, 349.165 436.018, 398.616 406.508 C 446.728 377.797, 483.322 331.466, 497.366 281.481 C 503.381 260.075, 504.480 250.741, 504.491 221 C 504.501 191.997, 503.598 184.047, 497.987 163.732 C 484.768 115.871, 452.505 72.708, 407.718 42.964 C 381.051 25.254, 352.818 14.828, 319.695 10.460 C 305.932 8.645, 273.298 8.695, 259.500 10.552",fillRule:"evenodd"}),e[2]=n):n=e[2];let s;return e[3]!==r?(s=(0,a.jsx)("svg",{"aria-hidden":"true",className:r,fill:"currentColor",viewBox:"0 0 543 446",children:n}),e[3]=r,e[4]=s):s=e[4],s},"za"),Ps="lunora.studio.rulesBannerDismissed",di=i(()=>{try{return globalThis.localStorage.getItem(Ps)==="1"}catch{return!1}},"Ea"),pi=i(()=>{try{globalThis.localStorage.setItem(Ps,"1")}catch{}},"Ra"),ui=i(()=>{let t=(0,I.c)(18),e=ge(),[o,r]=(0,z.useState)(mi),n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=i(()=>{r(!0),pi()},"n"),t[0]=n):n=t[0];let s=n;if(o)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"}),t[1]=l):l=t[1];let d;t[2]!==e?(d=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=d):d=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"}),t[4]=p):p=t[4];let c;t[5]!==e?(c=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=c):c=t[6];let u;t[7]!==d||t[8]!==c?(u=(0,a.jsxs)("span",{children:[d," ",p," ",c]}),t[7]=d,t[8]=c,t[9]=u):u=t[9];let h;t[10]!==e?(h=e("Dismiss"),t[10]=e,t[11]=h):h=t[11];let v;t[12]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})}),t[12]=v):v=t[12];let f;t[13]!==h?(f=(0,a.jsx)("button",{"aria-label":h,className:"ms-auto flex size-5 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":"dash-app-rules-banner-dismiss",onClick:s,type:"button",children:v}),t[13]=h,t[14]=f):f=t[14];let m;return t[15]!==u||t[16]!==f?(m=(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[l,u,f]}),t[15]=u,t[16]=f,t[17]=m):m=t[17],m},"Ia");function mi(){return di()}i(mi,"Ha");function Cs(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Be.Root,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}i(Cs,"Bt");function Rs(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Be.Trigger,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}i(Rs,"Dt");function Ss({align:t="end",alignOffset:e=0,className:o,keepMounted:r=!1,side:n="bottom",sideOffset:s=6,...l}){return(0,a.jsx)(Be.Portal,{keepMounted:r,children:(0,a.jsx)(Be.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:n,sideOffset:s,children:(0,a.jsx)(Be.Popup,{className:$("z-50 w-72 origin-(--transform-origin) rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),"data-slot":"popover-content",...l})})})}i(Ss,"Wt");var Ar=768;function fi(){let t=(0,I.c)(2),[e,o]=(0,z.useState)(void 0),r,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=i(()=>{let s=globalThis.matchMedia(`(max-width: ${Ar-1}px)`),l=i(()=>{o(globalThis.innerWidth<Ar)},"i");return s.addEventListener("change",l),o(globalThis.innerWidth<Ar),()=>{s.removeEventListener("change",l)}},"r"),n=[],t[0]=r,t[1]=n):(r=t[0],n=t[1]),(0,z.useEffect)(r,n),!!e}i(fi,"Ka");function gi(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(pe.Root,{"data-slot":"sheet",...o}),e[2]=o,e[3]=r):r=e[3],r}i(gi,"Va");function hi(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(pe.Portal,{"data-slot":"sheet-portal",...o}),e[2]=o,e[3]=r):r=e[3],r}i(hi,"Za");function vi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("fixed inset-0 z-50 bg-black/10 text-xs/relaxed transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)(pe.Backdrop,{"data-slot":"sheet-overlay",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(vi,"Oa");function bi({className:t,children:e,side:o="right",showCloseButton:r=!0,...n}){return(0,a.jsxs)(hi,{children:[(0,a.jsx)(vi,{}),(0,a.jsxs)(pe.Popup,{"data-slot":"sheet-content","data-side":o,className:$("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...n,children:[e,r&&(0,a.jsxs)(pe.Close,{"data-slot":"sheet-close",render:(0,a.jsx)(hr,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[(0,a.jsx)(gr,{icon:kn,strokeWidth:2}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}i(bi,"qa");function xi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex flex-col gap-0.5 p-4",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sheet-header",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(xi,"Ba");function yi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("text-sm font-medium text-foreground",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)(pe.Title,{"data-slot":"sheet-title",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(yi,"Da");function Pi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("text-xs/relaxed text-muted-foreground",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)(pe.Description,{"data-slot":"sheet-description",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Pi,"Wa");var Ci="sidebar_state",Ri=3600*24*7,Si="16rem",Ni="18rem",Ti="3rem",wi="b",Ns=ye.createContext(null);function ar(){let t=ye.useContext(Ns);if(!t)throw new cr("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}i(ar,"ht");function Ei({defaultOpen:t=!0,open:e,onOpenChange:o,className:r,style:n,children:s,...l}){let d=fi(),[p,c]=ye.useState(!1),[u,h]=ye.useState(t),v=e??u,f=i(x=>{let P=typeof x=="function"?x(v):x;o?o(P):h(P),document.cookie=`${Ci}=${P}; path=/; max-age=${Ri}`},"h"),m=i(()=>d?c(x=>!x):f(x=>!x),"f"),g=ye.useEffectEvent(()=>{m()});ye.useEffect(()=>{let x=i(P=>{P.key===wi&&(P.metaKey||P.ctrlKey)&&(P.preventDefault(),g())},"m");return globalThis.addEventListener("keydown",x),()=>globalThis.removeEventListener("keydown",x)},[]);let b={state:v?"expanded":"collapsed",open:v,setOpen:f,isMobile:d,openMobile:p,setOpenMobile:c,toggleSidebar:m};return(0,a.jsx)(Ns.Provider,{value:b,children:(0,a.jsx)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Si,"--sidebar-width-icon":Ti,...n},className:$("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...l,children:s})})}i(Ei,"Ya");function ki({side:t="left",variant:e="sidebar",collapsible:o="offcanvas",className:r,children:n,dir:s,...l}){let{isMobile:d,state:p,openMobile:c,setOpenMobile:u}=ar();return o==="none"?(0,a.jsx)("div",{"data-slot":"sidebar",className:$("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...l,children:n}):d?(0,a.jsx)(gi,{open:c,onOpenChange:u,...l,children:(0,a.jsxs)(bi,{dir:s,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Ni},side:t,children:[(0,a.jsxs)(xi,{className:"sr-only",children:[(0,a.jsx)(yi,{children:"Sidebar"}),(0,a.jsx)(Pi,{children:"Displays the mobile sidebar."})]}),(0,a.jsx)("div",{className:"flex h-full w-full flex-col",children:n})]})}):(0,a.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":p==="collapsed"?o:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[(0,a.jsx)("div",{"data-slot":"sidebar-gap",className:$("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,a.jsx)("div",{"data-slot":"sidebar-container","data-side":t,className:$("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",r),...l,children:(0,a.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:n})})]})}i(ki,"Ga");function Oi(t){let e=(0,I.c)(15),o,r,n;e[0]!==t?({className:o,onClick:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n):(o=e[1],r=e[2],n=e[3]);let{toggleSidebar:s}=ar(),l;e[4]!==o?(l=$(o),e[4]=o,e[5]=l):l=e[5];let d;e[6]!==r||e[7]!==s?(d=i(h=>{r?.(h),s()},"l"),e[6]=r,e[7]=s,e[8]=d):d=e[8];let p,c;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(gr,{icon:On,strokeWidth:2,className:"rtl:rotate-180"}),c=(0,a.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=p,e[10]=c):(p=e[9],c=e[10]);let u;return e[11]!==n||e[12]!==l||e[13]!==d?(u=(0,a.jsxs)(hr,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:d,...n,children:[p,c]}),e[11]=n,e[12]=l,e[13]=d,e[14]=u):u=e[14],u}i(Oi,"er");function Mi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("main",{"data-slot":"sidebar-inset",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Mi,"tr");function Di(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Di,"ar");function Ii(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Ii,"rr");function _i(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto [scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_25%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/25 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5 hover:[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_50%,transparent)_transparent] hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(_i,"sr");function Ai(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("relative flex w-full min-w-0 flex-col p-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Ai,"nr");function Vi(t){let e=(0,I.c)(10),o,r,n,s;if(e[0]!==t){let{className:p,render:c,...u}=t;o=c,s=ur,r="div",n=Ee({className:$("flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",p)},u),e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s}else o=e[1],r=e[2],n=e[3],s=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let d;return e[6]!==o||e[7]!==r||e[8]!==n?(d={defaultTagName:r,props:n,render:o,state:l},e[6]=o,e[7]=r,e[8]=n,e[9]=d):d=e[9],s(d)}i(Vi,"or");function Li(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("w-full text-xs",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Li,"ir");function ms(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex w-full min-w-0 flex-col gap-0",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(ms,"Mt");function fs(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("group/menu-item relative",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(fs,"Ct");var Hi=Qr("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none p-2 text-start text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ts({render:t,isActive:e=!1,variant:o="default",size:r="default",tooltip:n,className:s,...l}){let{isMobile:d,state:p}=ar(),c=ur({defaultTagName:"button",props:Ee({className:$(Hi({variant:o,size:r}),s)},l),render:n?(0,a.jsx)(ii,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:r,active:e}});return n?(typeof n=="string"&&(n={children:n}),(0,a.jsxs)(si,{children:[c,(0,a.jsx)(li,{side:"right",align:"center",hidden:p!=="collapsed"||d,...n})]})):c}i(Ts,"jt");var Bi=i(t=>t.replace("__lunora_admin__:",""),"dr"),Fi=i(()=>(0,z.useSyncExternalStore)(so.subscribe,so.getSnapshot,so.getSnapshot),"cr"),ji=i(t=>t==="error"?"destructive":t==="pending"?"secondary":"default","ur"),Ki=i(t=>{let e=(0,I.c)(56),{entry:o,focused:r}=t,n=ge(),s;e[0]!==r?(s=i(B=>{B!==null&&r&&B.scrollIntoView({block:"nearest"})},"o"),e[0]=r,e[1]=s):s=e[1];let l=s,d;e[2]!==o.functionPath||e[3]!==o.shardKey||e[4]!==o.summary?(d=i(()=>{Mn(`${o.functionPath} ${o.summary}${o.shardKey===""?"":` (shard ${o.shardKey})`}`)},"l"),e[2]=o.functionPath,e[3]=o.shardKey,e[4]=o.summary,e[5]=d):d=e[5];let p=d,c=r&&"bg-accent ring-1 ring-inset ring-primary/40",u;e[6]!==c?(u=$("border-b border-border/60 last:border-b-0",c),e[6]=c,e[7]=u):u=e[7];let h;e[8]!==o.status?(h=ji(o.status),e[8]=o.status,e[9]=h):h=e[9];let v=o.status==="pending"?"\u2026":o.status,f;e[10]!==h||e[11]!==v?(f=(0,a.jsx)(Lt,{className:"mt-px shrink-0",variant:h,children:v}),e[10]=h,e[11]=v,e[12]=f):f=e[12];let m;e[13]!==o.functionPath?(m=Bi(o.functionPath),e[13]=o.functionPath,e[14]=m):m=e[14];let g;e[15]!==m?(g=(0,a.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:m}),e[15]=m,e[16]=g):g=e[16];let b;e[17]!==o.kind||e[18]!==n?(b=o.kind==="subscription"&&(0,a.jsx)(Lt,{className:"shrink-0",variant:"outline",children:n("live")}),e[17]=o.kind,e[18]=n,e[19]=b):b=e[19];let x;e[20]!==o.summary?(x=o.summary!==""&&(0,a.jsx)("span",{className:"min-w-0 truncate text-muted-foreground",children:o.summary}),e[20]=o.summary,e[21]=x):x=e[21];let P;e[22]!==o.shardKey?(P=o.shardKey!==""&&(0,a.jsx)("span",{className:"font-mono",children:o.shardKey}),e[22]=o.shardKey,e[23]=P):P=e[23];let y;e[24]!==o.resultCount||e[25]!==n?(y=o.resultCount!==void 0&&(0,a.jsx)("span",{children:n("{count} rows",{count:o.resultCount})}),e[24]=o.resultCount,e[25]=n,e[26]=y):y=e[26];let S;e[27]!==o.pushes||e[28]!==n?(S=o.pushes!==void 0&&o.pushes>0&&(0,a.jsx)("span",{children:n("{count} pushes",{count:o.pushes})}),e[27]=o.pushes,e[28]=n,e[29]=S):S=e[29];let C;e[30]!==o.durationMs?(C=o.durationMs!==void 0&&(0,a.jsxs)("span",{children:[o.durationMs,"ms"]}),e[30]=o.durationMs,e[31]=C):C=e[31];let w;e[32]!==n?(w=n("Copy"),e[32]=n,e[33]=w):w=e[33];let N;e[34]!==p||e[35]!==w?(N=(0,a.jsx)("button",{"aria-label":w,className:"rounded px-1 outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-copy",onClick:p,type:"button",children:"\u29C9"}),e[34]=p,e[35]=w,e[36]=N):N=e[36];let E;e[37]!==P||e[38]!==y||e[39]!==S||e[40]!==C||e[41]!==N?(E=(0,a.jsxs)("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[P,y,S,C,N]}),e[37]=P,e[38]=y,e[39]=S,e[40]=C,e[41]=N,e[42]=E):E=e[42];let T;e[43]!==b||e[44]!==x||e[45]!==E||e[46]!==f||e[47]!==g?(T=(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[f,g,b,x,E]}),e[43]=b,e[44]=x,e[45]=E,e[46]=f,e[47]=g,e[48]=T):T=e[48];let k;e[49]!==o.error?(k=o.error!==void 0&&(0,a.jsx)("p",{className:"px-3 pb-1.5 font-mono text-[11px] text-destructive","data-testid":"oc-error",children:o.error}),e[49]=o.error,e[50]=k):k=e[50];let O;return e[51]!==l||e[52]!==T||e[53]!==k||e[54]!==u?(O=(0,a.jsxs)("li",{className:u,"data-testid":"oc-row",ref:l,children:[T,k]}),e[51]=l,e[52]=T,e[53]=k,e[54]=u,e[55]=O):O=e[55],O},"hr"),zi=i(t=>{let e=(0,I.c)(62),{focusSeq:o,onClose:r,onShownChange:n,shown:s}=t,l=ge(),d=Fi(),[p,c]=(0,z.useState)(""),u;if(e[0]!==d||e[1]!==o||e[2]!==p||e[3]!==r||e[4]!==n||e[5]!==s||e[6]!==l){let h=p.trim().toLowerCase(),v=d.filter(V=>(s==="errors"?V.status==="error":!0)&&(h===""||`${V.functionPath} ${V.summary} ${V.shardKey}`.toLowerCase().includes(h))).toReversed(),f;e[8]!==d?(f=d.filter(Ui),e[8]=d,e[9]=f):f=e[9];let m=f.length,g;e[10]!==l?(g=l("Operation console"),e[10]=l,e[11]=g):g=e[11];let b;e[12]!==l?(b=l("Operation console"),e[12]=l,e[13]=b):b=e[13];let x;e[14]!==b?(x=(0,a.jsx)("span",{className:"text-xs font-medium",children:b}),e[14]=b,e[15]=x):x=e[15];let P;e[16]!==d.length||e[17]!==l?(P=l("{count} calls",{count:d.length}),e[16]=d.length,e[17]=l,e[18]=P):P=e[18];let y;e[19]!==P?(y=(0,a.jsx)(Lt,{variant:"secondary",children:P}),e[19]=P,e[20]=y):y=e[20];let S;e[21]!==m||e[22]!==l?(S=m>0&&(0,a.jsx)(Lt,{variant:"destructive",children:l("{count} failed",{count:m})}),e[21]=m,e[22]=l,e[23]=S):S=e[23];let C=s==="errors",w=s==="errors"&&"bg-accent",N;e[24]!==w?(N=$("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",w),e[24]=w,e[25]=N):N=e[25];let E;e[26]!==n||e[27]!==s?(E=i(()=>{n(s==="errors"?"all":"errors")},"P"),e[26]=n,e[27]=s,e[28]=E):E=e[28];let T;e[29]!==l?(T=l("Errors"),e[29]=l,e[30]=T):T=e[30];let k;e[31]!==N||e[32]!==E||e[33]!==T||e[34]!==C?(k=(0,a.jsx)("button",{"aria-pressed":C,className:N,"data-testid":"oc-filter-errors",onClick:E,type:"button",children:T}),e[31]=N,e[32]=E,e[33]=T,e[34]=C,e[35]=k):k=e[35];let O;e[36]!==l?(O=l("Filter"),e[36]=l,e[37]=O):O=e[37];let B;e[38]===Symbol.for("react.memo_cache_sentinel")?(B=i(V=>{c(V.target.value)},"E"),e[38]=B):B=e[38];let D;e[39]!==l?(D=l("Filter"),e[39]=l,e[40]=D):D=e[40];let j;e[41]!==p||e[42]!==O||e[43]!==D?(j=(0,a.jsx)(mr,{"aria-label":O,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:B,placeholder:D,value:p}),e[41]=p,e[42]=O,e[43]=D,e[44]=j):j=e[44];let H;e[45]!==l?(H=l("Clear"),e[45]=l,e[46]=H):H=e[46];let K;e[47]!==H?(K=(0,a.jsx)("button",{className:"ms-auto rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-clear",onClick:Zi,type:"button",children:H}),e[47]=H,e[48]=K):K=e[48];let W;e[49]!==l?(W=l("Hide"),e[49]=l,e[50]=W):W=e[50];let _;e[51]!==r||e[52]!==W?(_=(0,a.jsx)("button",{"aria-label":W,className:"rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-close",onClick:r,type:"button",children:"\u2715"}),e[51]=r,e[52]=W,e[53]=_):_=e[53];let A;e[54]!==k||e[55]!==j||e[56]!==K||e[57]!==_||e[58]!==x||e[59]!==y||e[60]!==S?(A=(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[x,y,S,k,j,K,_]}),e[54]=k,e[55]=j,e[56]=K,e[57]=_,e[58]=x,e[59]=y,e[60]=S,e[61]=A):A=e[61],u=(0,a.jsxs)("section",{"aria-label":g,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[A,v.length===0?(0,a.jsx)("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:l("Every admin call this studio makes is recorded here.")}):(0,a.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"oc-rows",children:v.map(V=>(0,a.jsx)(Ki,{entry:V,focused:V.seq===o},V.seq))})]}),e[0]=d,e[1]=o,e[2]=p,e[3]=r,e[4]=n,e[5]=s,e[6]=l,e[7]=u}else u=e[7];return u},"mr");function Ui(t){return t.status==="error"}i(Ui,"pr");function Zi(){so.clear()}i(Zi,"fr");var Wi=i(()=>{let t=(0,I.c)(304),e=ge(),o;t[0]!==e?(o=e("Health score"),t[0]=e,t[1]=o):o=t[1];let r;t[2]!==e?(r=e("Agents"),t[2]=e,t[3]=r):r=t[3];let n;t[4]!==e?(n=e("Analytics"),t[4]=e,t[5]=n):n=t[5];let s;t[6]!==e?(s=e("API"),t[6]=e,t[7]=s):s=t[7];let l;t[8]!==e?(l=e("Audit"),t[8]=e,t[9]=l):l=t[9];let d;t[10]!==e?(d=e("Auth audit"),t[10]=e,t[11]=d):d=t[11];let p;t[12]!==e?(p=e("Configuration"),t[12]=e,t[13]=p):p=t[13];let c;t[14]!==e?(c=e("Sessions"),t[14]=e,t[15]=c):c=t[15];let u;t[16]!==e?(u=e("Containers"),t[16]=e,t[17]=u):u=t[17];let h;t[18]!==e?(h=e("Dashboards"),t[18]=e,t[19]=h):h=t[19];let v;t[20]!==e?(v=e("Data"),t[20]=e,t[21]=v):v=t[21];let f;t[22]!==e?(f=e("Deployment health"),t[22]=e,t[23]=f):f=t[23];let m;t[24]!==e?(m=e("Log drains"),t[24]=e,t[25]=m):m=t[25];let g;t[26]!==e?(g=e("Export / Import"),t[26]=e,t[27]=g):g=t[27];let b;t[28]!==e?(b=e("Fan-out"),t[28]=e,t[29]=b):b=t[29];let x;t[30]!==e?(x=e("Files"),t[30]=e,t[31]=x):x=t[31];let P;t[32]!==e?(P=e("Flags"),t[32]=e,t[33]=P):P=t[33];let y;t[34]!==e?(y=e("Functions"),t[34]=e,t[35]=y):y=t[35];let S;t[36]!==e?(S=e("Health"),t[36]=e,t[37]=S):S=t[37];let C;t[38]!==e?(C=e("Home"),t[38]=e,t[39]=C):C=t[39];let w;t[40]!==e?(w=e("Performance"),t[40]=e,t[41]=w):w=t[41];let N;t[42]!==e?(N=e("Issues"),t[42]=e,t[43]=N):N=t[43];let E;t[44]!==e?(E=e("KV"),t[44]=e,t[45]=E):E=t[45];let T;t[46]!==e?(T=e("Logs"),t[46]=e,t[47]=T):T=t[47];let k;t[48]!==e?(k=e("Metrics"),t[48]=e,t[49]=k):k=t[49];let O;t[50]!==e?(O=e("Migrations"),t[50]=e,t[51]=O):O=t[51];let B;t[52]!==e?(B=e("Notifications"),t[52]=e,t[53]=B):B=t[53];let D;t[54]!==e?(D=e("Organizations"),t[54]=e,t[55]=D):D=t[55];let j;t[56]!==e?(j=e("Time Travel"),t[56]=e,t[57]=j):j=t[57];let H;t[58]!==e?(H=e("Mail"),t[58]=e,t[59]=H):H=t[59];let K;t[60]!==e?(K=e("Payments"),t[60]=e,t[61]=K):K=t[61];let W;t[62]!==e?(W=e("Permissions"),t[62]=e,t[63]=W):W=t[63];let _;t[64]!==e?(_=e("Queues"),t[64]=e,t[65]=_):_=t[65];let A;t[66]!==e?(A=e("Realtime"),t[66]=e,t[67]=A):A=t[67];let V;t[68]!==e?(V=e("RLS Policies"),t[68]=e,t[69]=V):V=t[69];let oe;t[70]!==e?(oe=e("Scheduled"),t[70]=e,t[71]=oe):oe=t[71];let te;t[72]!==e?(te=e("Schema"),t[72]=e,t[73]=te):te=t[73];let le;t[74]!==e?(le=e("Security"),t[74]=e,t[75]=le):le=t[75];let J;t[76]!==e?(J=e("Settings"),t[76]=e,t[77]=J):J=t[77];let Q;t[78]!==e?(Q=e("SQL editor"),t[78]=e,t[79]=Q):Q=t[79];let ne;t[80]!==e?(ne=e("Traces"),t[80]=e,t[81]=ne):ne=t[81];let ue;t[82]!==e?(ue=e("Access Rules"),t[82]=e,t[83]=ue):ue=t[83];let me;t[84]!==e?(me=e("Users"),t[84]=e,t[85]=me):me=t[85];let he;t[86]!==e?(he=e("Vectors"),t[86]=e,t[87]=he):he=t[87];let ce;t[88]!==e?(ce=e("Workflows"),t[88]=e,t[89]=ce):ce=t[89];let Pe;t[90]!==o||t[91]!==r||t[92]!==v||t[93]!==f||t[94]!==m||t[95]!==g||t[96]!==b||t[97]!==x||t[98]!==P||t[99]!==y||t[100]!==S||t[101]!==C||t[102]!==n||t[103]!==w||t[104]!==N||t[105]!==E||t[106]!==T||t[107]!==k||t[108]!==O||t[109]!==B||t[110]!==D||t[111]!==j||t[112]!==H||t[113]!==s||t[114]!==K||t[115]!==W||t[116]!==_||t[117]!==A||t[118]!==V||t[119]!==oe||t[120]!==te||t[121]!==le||t[122]!==J||t[123]!==Q||t[124]!==l||t[125]!==ne||t[126]!==ue||t[127]!==me||t[128]!==he||t[129]!==ce||t[130]!==d||t[131]!==p||t[132]!==c||t[133]!==u||t[134]!==h?(Pe={advisorHealth:o,agents:r,analytics:n,api:s,audit:l,authAudit:d,authConfig:p,authSessions:c,containers:u,dashboards:h,data:v,deploymentHealth:f,drains:m,export:g,fanout:b,files:x,flags:P,functions:y,health:S,home:C,insights:w,issues:N,kv:E,logs:T,metrics:k,migrations:O,notifications:B,organizations:D,pitr:j,mail:H,payments:K,permissions:W,queues:_,realtime:A,rls:V,schedule:oe,schema:te,security:le,settings:J,sql:Q,traces:ne,storageRules:ue,users:me,vectors:he,workflows:ce},t[90]=o,t[91]=r,t[92]=v,t[93]=f,t[94]=m,t[95]=g,t[96]=b,t[97]=x,t[98]=P,t[99]=y,t[100]=S,t[101]=C,t[102]=n,t[103]=w,t[104]=N,t[105]=E,t[106]=T,t[107]=k,t[108]=O,t[109]=B,t[110]=D,t[111]=j,t[112]=H,t[113]=s,t[114]=K,t[115]=W,t[116]=_,t[117]=A,t[118]=V,t[119]=oe,t[120]=te,t[121]=le,t[122]=J,t[123]=Q,t[124]=l,t[125]=ne,t[126]=ue,t[127]=me,t[128]=he,t[129]=ce,t[130]=d,t[131]=p,t[132]=c,t[133]=u,t[134]=h,t[135]=Pe):Pe=t[135];let q=Pe,ee;t[136]!==e?(ee=e("Advisors"),t[136]=e,t[137]=ee):ee=t[137];let ae;t[138]!==e?(ae=e("Auth"),t[138]=e,t[139]=ae):ae=t[139];let Ne;t[140]!==e?(Ne=e("Database"),t[140]=e,t[141]=Ne):Ne=t[141];let xe;t[142]!==e?(xe=e("Functions"),t[142]=e,t[143]=xe):xe=t[143];let De;t[144]!==e?(De=e("Observability"),t[144]=e,t[145]=De):De=t[145];let Te;t[146]!==e?(Te=e("Operations"),t[146]=e,t[147]=Te):Te=t[147];let we;t[148]!==e?(we=e("Overview"),t[148]=e,t[149]=we):we=t[149];let Ue;t[150]!==e?(Ue=e("Settings"),t[150]=e,t[151]=Ue):Ue=t[151];let Ze;t[152]!==e?(Ze=e("Storage"),t[152]=e,t[153]=Ze):Ze=t[153];let go;t[154]!==ee||t[155]!==ae||t[156]!==Ne||t[157]!==xe||t[158]!==De||t[159]!==Te||t[160]!==we||t[161]!==Ue||t[162]!==Ze?(go={advisors:ee,auth:ae,database:Ne,functions:xe,observability:De,operations:Te,overview:we,settings:Ue,storage:Ze},t[154]=ee,t[155]=ae,t[156]=Ne,t[157]=xe,t[158]=De,t[159]=Te,t[160]=we,t[161]=Ue,t[162]=Ze,t[163]=go):go=t[163];let sr=go,We;t[164]!==e?(We=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[164]=e,t[165]=We):We=t[165];let $e;t[166]!==e?($e=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[166]=e,t[167]=$e):$e=t[167];let qe;t[168]!==e?(qe=e("Usage and latency from Analytics Engine \u2014 request volume, p50/p95, and hot shards."),t[168]=e,t[169]=qe):qe=t[169];let Ge;t[170]!==e?(Ge=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[170]=e,t[171]=Ge):Ge=t[171];let Ye;t[172]!==e?(Ye=e("A durable log of admin state-changing operations."),t[172]=e,t[173]=Ye):Ye=t[173];let Je;t[174]!==e?(Je=e("Authentication and security events \u2014 sign-ins, MFA, and session changes."),t[174]=e,t[175]=Je):Je=t[175];let Qe;t[176]!==e?(Qe=e("Enabled plugins and session config (read-only)."),t[176]=e,t[177]=Qe):Qe=t[177];let Xe;t[178]!==e?(Xe=e("Browse and revoke active sessions across all users."),t[178]=e,t[179]=Xe):Xe=t[179];let et;t[180]!==e?(et=e("Live Cloudflare Containers \u2014 current lifecycle state per instance from the log stream."),t[180]=e,t[181]=et):et=t[181];let tt;t[182]!==e?(tt=e("Chart widgets backed by saved read-only SQL queries."),t[182]=e,t[183]=tt):tt=t[183];let ot;t[184]!==e?(ot=e("Browse and edit rows across your shard and global tables."),t[184]=e,t[185]=ot):ot=t[185];let rt;t[186]!==e?(rt=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[186]=e,t[187]=rt):rt=t[187];let nt;t[188]!==e?(nt=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[188]=e,t[189]=nt):nt=t[189];let at;t[190]!==e?(at=e("Export a shard to NDJSON, or import rows from it."),t[190]=e,t[191]=at):at=t[191];let st;t[192]!==e?(st=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[192]=e,t[193]=st):st=t[193];let it;t[194]!==e?(it=e("Browse objects in your R2 storage buckets."),t[194]=e,t[195]=it):it=t[195];let lt;t[196]!==e?(lt=e("Inspect feature flags and their live evaluation under a targeting context."),t[196]=e,t[197]=lt):lt=t[197];let ct;t[198]!==e?(ct=e("Run registered queries, mutations, and actions."),t[198]=e,t[199]=ct):ct=t[199];let dt;t[200]!==e?(dt=e("At-a-glance connection, error, and shard signals."),t[200]=e,t[201]=dt):dt=t[201];let pt;t[202]!==e?(pt=e("Connection, health, and advisor summary for your deployment."),t[202]=e,t[203]=pt):pt=t[203];let ut;t[204]!==e?(ut=e("Surface slow functions, error spikes, and cache problems."),t[204]=e,t[205]=ut):ut=t[205];let mt;t[206]!==e?(mt=e("Grouped error triage \u2014 Worker throws and container crashes folded by fingerprint."),t[206]=e,t[207]=mt):mt=t[207];let ft;t[208]!==e?(ft=e("A live stream of recent function logs."),t[208]=e,t[209]=ft):ft=t[209];let gt;t[210]!==e?(gt=e("Per-shard health and aggregate metrics."),t[210]=e,t[211]=gt):gt=t[211];let ht;t[212]!==e?(ht=e("Review migration status and run them."),t[212]=e,t[213]=ht):ht=t[213];let vt;t[214]!==e?(vt=e("Registered push devices \u2014 endpoint, kind, last-send status, and delivery errors."),t[214]=e,t[215]=vt):vt=t[215];let bt;t[216]!==e?(bt=e("Browse and manage organizations, members, and invitations."),t[216]=e,t[217]=bt):bt=t[217];let xt;t[218]!==e?(xt=e("Restore a shard to a point in the last 30 days."),t[218]=e,t[219]=xt):xt=t[219];let yt;t[220]!==e?(yt=e("Email your app sent, captured in dev."),t[220]=e,t[221]=yt):yt=t[221];let Pt;t[222]!==e?(Pt=e("Synced customers, subscriptions, and webhook events."),t[222]=e,t[223]=Pt):Pt=t[223];let Ct;t[224]!==e?(Ct=e("Inspect access policies per table, and probe a function as any identity."),t[224]=e,t[225]=Ct):Ct=t[225];let Rt;t[226]!==e?(Rt=e("Inspect declared Cloudflare Queues \u2014 their producer bindings, consumer mode, and dead-letter queue."),t[226]=e,t[227]=Rt):Rt=t[227];let St;t[228]!==e?(St=e("Active WebSocket subscriptions on this shard."),t[228]=e,t[229]=St):St=t[229];let Nt;t[230]!==e?(Nt=e("Inspect row-level-security policies and roles, per table."),t[230]=e,t[231]=Nt):Nt=t[231];let Tt;t[232]!==e?(Tt=e("Inspect and cancel scheduled jobs."),t[232]=e,t[233]=Tt):Tt=t[233];let wt;t[234]!==e?(wt=e("Inspect each table and its columns."),t[234]=e,t[235]=wt):wt=t[235];let Et;t[236]!==e?(Et=e("Review admin gates, credentials, and log redaction."),t[236]=e,t[237]=Et):Et=t[237];let kt;t[238]!==e?(kt=e("Read-only deployment config \u2014 vars, secrets, and bindings."),t[238]=e,t[239]=kt):kt=t[239];let Ot;t[240]!==e?(Ot=e("Run read-only SQL against a shard."),t[240]=e,t[241]=Ot):Ot=t[241];let Mt;t[242]!==e?(Mt=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[242]=e,t[243]=Mt):Mt=t[243];let Dt;t[244]!==e?(Dt=e("Inspect storage access rules \u2014 per bucket, operation, and key prefix."),t[244]=e,t[245]=Dt):Dt=t[245];let It;t[246]!==e?(It=e("Recent ctx.trace waterfalls for this shard \u2014 the drill-down from a log line."),t[246]=e,t[247]=It):It=t[247];let _t;t[248]!==e?(_t=e("Manage auth users \u2014 roles, bans, sessions, and identity."),t[248]=e,t[249]=_t):_t=t[249];let At;t[250]!==e?(At=e("Browse Vectorize indexes and run similarity searches."),t[250]=e,t[251]=At):At=t[251];let Vt;t[252]!==e?(Vt=e("Inspect declared Cloudflare Workflows and their bindings."),t[252]=e,t[253]=Vt):Vt=t[253];let ho;t[254]!==Vt||t[255]!==We||t[256]!==$e||t[257]!==qe||t[258]!==Ge||t[259]!==Ye||t[260]!==Je||t[261]!==Qe||t[262]!==Xe||t[263]!==et||t[264]!==tt||t[265]!==ot||t[266]!==rt||t[267]!==nt||t[268]!==at||t[269]!==st||t[270]!==it||t[271]!==lt||t[272]!==ct||t[273]!==dt||t[274]!==pt||t[275]!==ut||t[276]!==mt||t[277]!==ft||t[278]!==gt||t[279]!==ht||t[280]!==vt||t[281]!==bt||t[282]!==xt||t[283]!==yt||t[284]!==Pt||t[285]!==Ct||t[286]!==Rt||t[287]!==St||t[288]!==Nt||t[289]!==Tt||t[290]!==wt||t[291]!==Et||t[292]!==kt||t[293]!==Ot||t[294]!==Mt||t[295]!==Dt||t[296]!==It||t[297]!==_t||t[298]!==At?(ho={advisorHealth:We,agents:$e,analytics:qe,api:Ge,audit:Ye,authAudit:Je,authConfig:Qe,authSessions:Xe,containers:et,dashboards:tt,data:ot,deploymentHealth:rt,drains:nt,export:at,fanout:st,files:it,flags:lt,functions:ct,health:dt,home:pt,insights:ut,issues:mt,logs:ft,metrics:gt,migrations:ht,notifications:vt,organizations:bt,pitr:xt,mail:yt,payments:Pt,permissions:Ct,queues:Rt,realtime:St,rls:Nt,schedule:Tt,schema:wt,security:Et,settings:kt,sql:Ot,kv:Mt,storageRules:Dt,traces:It,users:_t,vectors:At,workflows:Vt},t[254]=Vt,t[255]=We,t[256]=$e,t[257]=qe,t[258]=Ge,t[259]=Ye,t[260]=Je,t[261]=Qe,t[262]=Xe,t[263]=et,t[264]=tt,t[265]=ot,t[266]=rt,t[267]=nt,t[268]=at,t[269]=st,t[270]=it,t[271]=lt,t[272]=ct,t[273]=dt,t[274]=pt,t[275]=ut,t[276]=mt,t[277]=ft,t[278]=gt,t[279]=ht,t[280]=vt,t[281]=bt,t[282]=xt,t[283]=yt,t[284]=Pt,t[285]=Ct,t[286]=Rt,t[287]=St,t[288]=Nt,t[289]=Tt,t[290]=wt,t[291]=Et,t[292]=kt,t[293]=Ot,t[294]=Mt,t[295]=Dt,t[296]=It,t[297]=_t,t[298]=At,t[299]=ho):ho=t[299];let ir=ho,vo;return t[300]!==sr||t[301]!==ir||t[302]!==q?(vo={groupLabel:sr,tabDescription:ir,tabLabel:q},t[300]=sr,t[301]=ir,t[302]=q,t[303]=vo):vo=t[303],vo},"gr"),$i=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,a.jsx)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"}),(0,a.jsx)("path",{d:"M8 21h8M12 17v4"})]}),t[0]=e):e=t[0],e},"br"),qi=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,a.jsx)("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),t[0]=e):e=t[0],e},"vr"),Gi=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"})}),t[0]=e):e=t[0],e},"yr"),Yi=[{Icon:$i,value:"system"},{Icon:qi,value:"light"},{Icon:Gi,value:"dark"}],Ji=i(()=>{let t=(0,I.c)(19),{theme:e,setTheme:o}=ai(),r=ge(),n;t[0]!==r?(n=r("Dark theme"),t[0]=r,t[1]=n):n=t[1];let s;t[2]!==r?(s=r("Light theme"),t[2]=r,t[3]=s):s=t[3];let l;t[4]!==r?(l=r("System theme"),t[4]=r,t[5]=l):l=t[5];let d;t[6]!==n||t[7]!==s||t[8]!==l?(d={dark:n,light:s,system:l},t[6]=n,t[7]=s,t[8]=l,t[9]=d):d=t[9];let p=d,c;t[10]!==r?(c=r("Theme"),t[10]=r,t[11]=c):c=t[11];let u;t[12]!==p||t[13]!==o||t[14]!==e?(u=Yi.map(v=>{let{Icon:f,value:m}=v,g=e===m;return(0,a.jsxs)("button",{"aria-checked":g,"aria-label":p[m],className:$("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",g?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${m}`,onClick:i(()=>{o(m)},"onClick"),role:"radio",title:p[m],type:"button",children:[g&&(0,a.jsx)(Dn.span,{className:"absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",layoutId:"studio-theme-active",transition:{bounce:.1,duration:.45,type:"spring"}}),(0,a.jsx)("span",{className:"relative",children:(0,a.jsx)(f,{})})]},m)}),t[12]=p,t[13]=o,t[14]=e,t[15]=u):u=t[15];let h;return t[16]!==c||t[17]!==u?(h=(0,a.jsx)("div",{"aria-label":c,className:"inline-flex items-center gap-0.5 overflow-hidden rounded-md border border-border bg-muted/60 p-0.5","data-testid":"dash-app-theme",role:"radiogroup",children:u}),t[16]=c,t[17]=u,t[18]=h):h=t[18],h},"kr"),Qi=i(t=>{let e=(0,I.c)(23),{domain:o,onOpenCommandPalette:r,page:n}=t,s=ge(),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(Oi,{className:"-ms-1"}),e[0]=l):l=e[0];let d;e[1]!==s?(d=s("Breadcrumb"),e[1]=s,e[2]=d):d=e[2];let p;e[3]!==o?(p=(0,a.jsx)("span",{className:"text-muted-foreground",children:o}),e[3]=o,e[4]=p):p=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-3.5 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),e[5]=c):c=e[5];let u;e[6]!==n?(u=(0,a.jsx)("span",{className:"font-medium text-foreground",children:n}),e[6]=n,e[7]=u):u=e[7];let h;e[8]!==d||e[9]!==p||e[10]!==u?(h=(0,a.jsxs)("nav",{"aria-label":d,className:"flex items-center gap-1.5 text-[13px]",children:[p,c,u]}),e[8]=d,e[9]=p,e[10]=u,e[11]=h):h=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,a.jsx)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[12]=v):v=e[12];let f;e[13]!==s?(f=s("Search\u2026"),e[13]=s,e[14]=f):f=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"\u2318K"}),e[15]=m):m=e[15];let g;e[16]!==r||e[17]!==f?(g=(0,a.jsxs)("button",{className:"mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex","data-testid":"dash-app-search",onClick:r,type:"button",children:[v,f,m]}),e[16]=r,e[17]=f,e[18]=g):g=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsx)("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:(0,a.jsx)(Ji,{})}),e[19]=b):b=e[19];let x;return e[20]!==g||e[21]!==h?(x=(0,a.jsxs)("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[l,h,g,b]}),e[20]=g,e[21]=h,e[22]=x):x=e[22],x},"wr"),Xi=i(t=>{let e=(0,I.c)(3),o,r;e[0]!==t?(o=i(()=>{if(t===void 0)return;let n=i(s=>{if(!s.ctrlKey||s.metaKey||s.altKey||s.shiftKey||s.repeat||s.key!=="`")return;let{target:l}=s;l instanceof HTMLElement&&(l.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(l.tagName))||(s.preventDefault(),t())},"n");return globalThis.addEventListener("keydown",n),()=>{globalThis.removeEventListener("keydown",n)}},"a"),r=[t],e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]),(0,z.useEffect)(o,r)},"Nr"),U=i((t,e)=>(0,z.lazy)(()=>t().then(o=>({default:o[e]}))),"C"),el=U(()=>import("./chunk-73GRNONE.js"),"InsightsPanel"),tl=(0,z.lazy)(()=>import("./chunk-CGLS2ILT.js")),ol=(0,z.lazy)(()=>import("./chunk-CPSGJSHY.js")),rl=(0,z.lazy)(()=>import("./chunk-KSRP7GZV.js")),nl=U(()=>import("./chunk-GWQIPIYA.js"),"AgentsPanel"),al=U(()=>import("./chunk-WQVVA5NB.js"),"AnalyticsPanel"),sl=(0,z.lazy)(()=>import("./chunk-VCXH5V3Z.js")),il=U(()=>import("./chunk-KAPSM6AI.js"),"AuthAuditPanel"),ll=U(()=>import("./chunk-T242WITF.js"),"AuthConfigPanel"),cl=U(()=>import("./chunk-UDVB4URN.js"),"AuthSessionsPanel"),dl=U(()=>import("./chunk-OE465DVY.js"),"OrganizationsPanel"),pl=U(()=>import("./chunk-Q7QTRX2E.js"),"UsersPanel"),ul=U(()=>import("./chunk-CU6SCYQ7.js"),"ContainersPanel"),ml=U(()=>import("./chunk-WJGOI3FZ.js"),"DeploymentHealthPanel"),fl=U(()=>import("./chunk-DGBJE7YF.js"),"TableEditor"),gl=U(()=>import("./chunk-7YKWP4QK.js"),"ExportImportPanel"),hl=U(()=>import("./chunk-GB6LP6UJ.js"),"MigrationsRoutePanel"),vl={data:An,migrations:Vn},bl=U(()=>import("./chunk-B2H5DK55.js"),"PitrPanel"),xl=U(()=>import("./chunk-ZK3XKFCI.js"),"FlagsPanel"),yl=U(()=>import("./chunk-WDG4WFUV.js"),"FunctionRunner"),Pl=U(()=>import("./chunk-A3KUNMU6.js"),"FunctionStatsPanel"),Cl=U(()=>import("./chunk-TBRZQICB.js"),"IssuesPanel"),Rl=U(()=>import("./chunk-WZ3B3MEV.js"),"AuditPanel"),Sl=U(()=>import("./chunk-S4ILMYP5.js"),"LogDrainsPanel"),Nl=(0,z.lazy)(()=>import("./chunk-NRCXRCJX.js").then(t=>({default:t.LogsPanel}))),Tl=U(()=>import("./chunk-LLF5KWDZ.js"),"MailPanel"),wl=U(()=>import("./chunk-GM67EQJU.js"),"SchedulePanel"),El=(0,z.lazy)(()=>import("./chunk-Y7A5NCXT.js")),kl=(0,z.lazy)(()=>import("./chunk-SDQBPFLO.js")),Ol=U(()=>import("./chunk-YSRW5RNU.js"),"KvBrowser"),Ml=U(()=>import("./chunk-5SQRE3VR.js"),"NotificationsPanel"),Dl=U(()=>import("./chunk-6QP5N57V.js"),"PaymentsPanel"),Il=U(()=>import("./chunk-GWHM4C4N.js"),"PermissionsPanel"),_l=(0,z.lazy)(()=>import("./chunk-C7EOC2WS.js")),Al=(0,z.lazy)(()=>import("./chunk-74DN6HIE.js")),Vl=(0,z.lazy)(()=>import("./chunk-ZHBIKP5G.js")),Ll=U(()=>import("./chunk-SV52HB7D.js"),"HealthPanel"),Hl=U(()=>import("./chunk-VC5SSRUP.js"),"MetricsPanel"),Bl=U(()=>import("./chunk-GN567L2T.js"),"SchemaViewer"),Fl=U(()=>import("./chunk-UETNCBWU.js"),"SettingsPanel"),jl=U(()=>import("./chunk-HOR3JLUY.js"),"SqlEditorPanel"),Kl=U(()=>import("./chunk-VTLYN3CX.js"),"FileBrowser"),zl=U(()=>import("./chunk-7ZUQE3KU.js"),"StorageRulesPanel"),Ul=U(()=>import("./chunk-PXYWCZ7T.js"),"TracesPanel"),Zl=U(()=>import("./chunk-TQXZ7LG4.js"),"VectorBrowser"),Wl=(0,z.lazy)(()=>import("./chunk-BDJCCVB6.js")),ws=(0,z.createContext)(null),$l={analytics:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),api:(0,a.jsx)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"}),audit:(0,a.jsx)("path",{d:"M7 4h7l4 4v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm6 0v5h5M9 13h6M9 16h6M9 10h2"}),authAudit:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8h6m-6 3h6"}),authConfig:(0,a.jsx)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6h-3.6l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"}),agents:(0,a.jsx)("path",{d:"M12 8V5m0 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM6 8h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2Zm3 5h.01M15 13h.01M9 21h6"}),authSessions:(0,a.jsx)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),containers:(0,a.jsx)("path",{d:"M3 7.5 12 3l9 4.5v9L12 21l-9-4.5v-9Zm0 0 9 4.5m0 0 9-4.5m-9 4.5V21"}),dashboards:(0,a.jsx)("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"}),deploymentHealth:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2 3 4-5"}),drains:(0,a.jsx)("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"}),data:(0,a.jsx)("path",{d:"M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6Zm0 0v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5"}),export:(0,a.jsx)("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"}),fanout:(0,a.jsx)("path",{d:"M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm-7 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm14 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 7v3.5M12 10.5 6 17m6-6.5 6 6.5"}),files:(0,a.jsx)("path",{d:"M4 7a2 2 0 0 1 2-2h3l2 2.5h7a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Z"}),flags:(0,a.jsx)("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"}),functions:(0,a.jsx)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"}),health:(0,a.jsx)("path",{d:"M3 12h4l2 6 4-14 2 8h6"}),home:(0,a.jsx)("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"}),insights:(0,a.jsx)("path",{d:"M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"}),issues:(0,a.jsx)("path",{d:"M10.3 4.3 2.5 18a2 2 0 0 0 1.7 3h15.6a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0ZM12 9v4m0 3v.01"}),kv:(0,a.jsx)("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"}),logs:(0,a.jsx)("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"}),mail:(0,a.jsx)("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"}),payments:(0,a.jsx)("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"}),metrics:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),migrations:(0,a.jsx)("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"}),notifications:(0,a.jsx)("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"}),organizations:(0,a.jsx)("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"}),permissions:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2.2 2.2L15 9.5M8.5 16h7"}),pitr:(0,a.jsx)("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"}),queues:(0,a.jsx)("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),realtime:(0,a.jsx)("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}),rls:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3ZM8.5 10h7M8.5 13h7"}),schedule:(0,a.jsx)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),schema:(0,a.jsx)("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"}),sql:(0,a.jsx)("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"}),storageRules:(0,a.jsx)("path",{d:"M7 10V7a5 5 0 0 1 10 0v3m-11 0h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1Zm6 4v2"}),advisorHealth:(0,a.jsx)("path",{d:"M3 12h4l2-5 3 10 2-5h5"}),security:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-2.5 8.5 2 2 4-4"}),traces:(0,a.jsx)("path",{d:"M3 6h9M6 12h12M10 18h7"}),settings:(0,a.jsx)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6H10.5l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"}),users:(0,a.jsx)("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85M16 3.13A4 4 0 0 1 16 11"}),vectors:(0,a.jsx)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"}),workflows:(0,a.jsx)("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"})},gs=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authAudit","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","traces","audit","realtime","fanout","containers","metrics","analytics","health","deploymentHealth"]},{key:"advisors",tabs:["advisorHealth","security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags"]},{key:"settings",tabs:["settings"]}],ql={analytics:"analytics",authAudit:"auth",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",notifications:"notifications",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},hs=i((t,e)=>{let o=ql[t];return o===void 0||e[o]},"Lt"),Vr=i(t=>{let e=(0,I.c)(2),{tab:o}=t,r=$l[o],n;return e[0]!==r?(n=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:r}),e[0]=r,e[1]=n):n=e[1],n},"xt"),Gl=i(t=>t,"ys"),Es=Gl(["home","data","sql","functions","api","workflows","agents","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authAudit","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","deploymentHealth","advisorHealth","security","rls","permissions","insights","issues","logs","traces","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","settings"]),Yl=new Set(["api","data","migrations","sql"]),Jl=i(t=>{let e=t.split("/").findLast(Boolean)??"";return Es.includes(e)?e:"home"},"ks"),Ql=i(t=>{let e=(0,I.c)(19),{chrome:o,connected:r}=t,n=ge(),s;e[0]!==n?(s=n("admin token"),e[0]=n,e[1]=s):s=e[1];let l;e[2]!==s?(l=(0,a.jsx)("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:s}),e[2]=s,e[3]=l):l=e[3];let d;e[4]!==o.onTokenChange||e[5]!==o.token?(d=(0,a.jsx)(mr,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:o.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:o.token}),e[4]=o.onTokenChange,e[5]=o.token,e[6]=d):d=e[6];let p;e[7]!==r||e[8]!==n?(p=r&&(0,a.jsxs)("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[(0,a.jsx)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"}),n("Token rides the WebSocket URL \u2014 it can surface in browser DevTools and server logs. Use a dev-only token.")]}),e[7]=r,e[8]=n,e[9]=p):p=e[9];let c;e[10]!==o.clearToken||e[11]!==r||e[12]!==n?(c=r&&(0,a.jsx)("button",{className:"self-start rounded-md border border-border px-2.5 py-1 text-xs font-medium outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"dash-app-clear-token",onClick:o.clearToken,type:"button",children:n("Clear")}),e[10]=o.clearToken,e[11]=r,e[12]=n,e[13]=c):c=e[13];let u;return e[14]!==l||e[15]!==d||e[16]!==p||e[17]!==c?(u=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[l,d,p,c]}),e[14]=l,e[15]=d,e[16]=p,e[17]=c,e[18]=u):u=e[18],u},"ws"),Xl=i(t=>{let e=(0,I.c)(25),{current:o,group:r,groupLabel:n,selectTab:s,tabDescription:l,tabLabel:d}=t,p=r.tabs.includes(o)?"page":void 0,c=n[r.key],u=r.tabs[0],h;e[0]!==u?(h=(0,a.jsx)(Vr,{tab:u}),e[0]=u,e[1]=h):h=e[1];let v;e[2]!==p||e[3]!==c||e[4]!==h?(v=(0,a.jsx)(Rs,{"aria-current":p,"aria-label":c,className:"mx-auto flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent data-[popup-open]:bg-sidebar-accent data-[popup-open]:text-sidebar-accent-foreground data-[popup-open]:shadow-xs aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground aria-[current=page]:shadow-xs",delay:120,openOnHover:!0,children:h}),e[2]=p,e[3]=c,e[4]=h,e[5]=v):v=e[5];let f=n[r.key],m;e[6]!==f?(m=(0,a.jsx)("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:f}),e[6]=f,e[7]=m):m=e[7];let g;if(e[8]!==o||e[9]!==r.tabs||e[10]!==s||e[11]!==l||e[12]!==d){let P;e[14]!==o||e[15]!==s||e[16]!==l||e[17]!==d?(P=i(y=>(0,a.jsxs)("button",{"aria-current":o===y?"page":void 0,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-[13px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent aria-[current=page]:font-medium [&_svg]:opacity-70 aria-[current=page]:[&_svg]:opacity-100","data-tab":y,"data-testid":`dash-tab-${y}`,onClick:s,title:l[y],type:"button",children:[(0,a.jsx)(Vr,{tab:y}),(0,a.jsx)("span",{children:d[y]})]},y),"y"),e[14]=o,e[15]=s,e[16]=l,e[17]=d,e[18]=P):P=e[18],g=r.tabs.map(P),e[8]=o,e[9]=r.tabs,e[10]=s,e[11]=l,e[12]=d,e[13]=g}else g=e[13];let b;e[19]!==m||e[20]!==g?(b=(0,a.jsxs)(Ss,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[m,g]}),e[19]=m,e[20]=g,e[21]=b):b=e[21];let x;return e[22]!==v||e[23]!==b?(x=(0,a.jsxs)(Cs,{children:[v,b]}),e[22]=v,e[23]=b,e[24]=x):x=e[24],x},"Ns"),ec=i(t=>{let e=(0,I.c)(45),{chrome:o,collapsed:r,connected:n}=t,s=ge();if(o===null){let y;e[0]!==s?(y=s("Admin"),e[0]=s,e[1]=y):y=e[1];let S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=(0,a.jsx)("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=S):S=e[2];let C;e[3]!==s?(C=s("Admin"),e[3]=s,e[4]=C):C=e[4];let w;e[5]!==C?(w=(0,a.jsx)("span",{className:"truncate text-[13px] font-medium",children:C}),e[5]=C,e[6]=w):w=e[6];let N;e[7]!==s?(N=s("Studio"),e[7]=s,e[8]=N):N=e[8];let E;e[9]!==N?(E=(0,a.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:N}),e[9]=N,e[10]=E):E=e[10];let T;e[11]!==w||e[12]!==E?(T=(0,a.jsxs)("span",{className:"grid flex-1 text-start leading-tight",children:[w,E]}),e[11]=w,e[12]=E,e[13]=T):T=e[13];let k;return e[14]!==y||e[15]!==T?(k=(0,a.jsxs)(Ts,{className:"data-active:bg-transparent",size:"lg",tooltip:y,children:[S,T]}),e[14]=y,e[15]=T,e[16]=k):k=e[16],k}let l=r?"mx-auto size-8 justify-center":"w-full p-2",d;e[17]!==l?(d=$("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=d):d=e[18];let p;e[19]!==n||e[20]!==s?(p=s(n?"Connected":"Not connected"),e[19]=n,e[20]=s,e[21]=p):p=e[21];let c=n?"bg-success":"bg-muted-foreground/50",u;e[22]!==c?(u=$("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",c),e[22]=c,e[23]=u):u=e[23];let h;e[24]!==u?(h=(0,a.jsxs)("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",(0,a.jsx)("span",{"aria-hidden":"true",className:u})]}),e[24]=u,e[25]=h):h=e[25];let v;e[26]!==r||e[27]!==n||e[28]!==s?(v=!r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"grid flex-1 text-start leading-tight",children:[(0,a.jsx)("span",{className:"truncate text-[13px] font-medium",children:s("Admin")}),(0,a.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:s(n?"Connected":"Not connected")})]}),(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e[26]=r,e[27]=n,e[28]=s,e[29]=v):v=e[29];let f;e[30]!==d||e[31]!==p||e[32]!==h||e[33]!==v?(f=(0,a.jsxs)(Rs,{className:d,"data-testid":"dash-app-connect",title:p,children:[h,v]}),e[30]=d,e[31]=p,e[32]=h,e[33]=v,e[34]=f):f=e[34];let m=r?"end":"start",g=r?"right":"top",b;e[35]!==o||e[36]!==n?(b=(0,a.jsx)(Ql,{chrome:o,connected:n}),e[35]=o,e[36]=n,e[37]=b):b=e[37];let x;e[38]!==g||e[39]!==b||e[40]!==m?(x=(0,a.jsx)(Ss,{align:m,keepMounted:!0,side:g,children:b}),e[38]=g,e[39]=b,e[40]=m,e[41]=x):x=e[41];let P;return e[42]!==x||e[43]!==f?(P=(0,a.jsxs)(Cs,{children:[f,x]}),e[42]=x,e[43]=f,e[44]=P):P=e[44],P},"Ss"),tc=i(t=>{let e=(0,I.c)(28),{chrome:o,connected:r,current:n,groupLabel:s,groups:l,selectTab:d,tabDescription:p,tabLabel:c}=t,u=ge(),{state:h}=ar(),v=h==="collapsed",f=v&&"justify-center px-0",m;e[0]!==f?(m=$("flex items-center gap-2.5 px-1.5 py-1",f),e[0]=f,e[1]=m):m=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(ci,{className:"size-9 shrink-0 text-foreground"}),e[2]=g):g=e[2];let b;e[3]!==v||e[4]!==r||e[5]!==u?(b=!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"grid flex-1 leading-tight",children:[(0,a.jsx)("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"}),(0,a.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:u("Studio")})]}),(0,a.jsx)(Lt,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:u(r?"Live":"Local")})]}),e[3]=v,e[4]=r,e[5]=u,e[6]=b):b=e[6];let x;e[7]!==m||e[8]!==b?(x=(0,a.jsx)(Di,{children:(0,a.jsxs)("div",{className:m,children:[g,b]})}),e[7]=m,e[8]=b,e[9]=x):x=e[9];let P;e[10]!==v||e[11]!==n||e[12]!==s||e[13]!==l||e[14]!==d||e[15]!==p||e[16]!==c?(P=v?l.map(w=>(0,a.jsx)(Xl,{current:n,group:w,groupLabel:s,selectTab:d,tabDescription:p,tabLabel:c},w.key)):l.map(w=>(0,a.jsxs)(Ai,{children:[(0,a.jsx)(Vi,{className:"text-[11px] font-medium tracking-wider uppercase",children:s[w.key]}),(0,a.jsx)(Li,{children:(0,a.jsx)(ms,{children:w.tabs.map(N=>(0,a.jsx)(fs,{children:(0,a.jsxs)(Ts,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":N,"data-testid":`dash-tab-${N}`,isActive:n===N,onClick:d,title:p[N],tooltip:p[N],children:[(0,a.jsx)(Vr,{tab:N}),(0,a.jsx)("span",{children:c[N]})]})},N))})})]},w.key)),e[10]=v,e[11]=n,e[12]=s,e[13]=l,e[14]=d,e[15]=p,e[16]=c,e[17]=P):P=e[17];let y;e[18]!==P?(y=(0,a.jsx)(_i,{children:P}),e[18]=P,e[19]=y):y=e[19];let S;e[20]!==o||e[21]!==v||e[22]!==r?(S=(0,a.jsx)(Ii,{children:(0,a.jsx)(ms,{children:(0,a.jsx)(fs,{children:(0,a.jsx)(ec,{chrome:o,collapsed:v,connected:r})})})}),e[20]=o,e[21]=v,e[22]=r,e[23]=S):S=e[23];let C;return e[24]!==x||e[25]!==y||e[26]!==S?(C=(0,a.jsxs)(ki,{collapsible:"icon",variant:"inset",children:[x,y,S]}),e[24]=x,e[25]=y,e[26]=S,e[27]=C):C=e[27],C},"Ms"),ks=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(Fo,{className:"h-8 w-40"}),(0,a.jsx)(Fo,{className:"h-8 w-24"})]}),(0,a.jsx)(Fo,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},"Jt"),oc=i(()=>{let t=(0,I.c)(64),e=ge(),o=no(),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={select:lc},t[0]=r):r=t[0];let n=Wr(r),s,l;t[1]!==n?(s=Jl(n),l=Yl.has(s),t[1]=n,t[2]=s,t[3]=l):(s=t[2],l=t[3]);let d=l,p=qr(),c=p?.toggle;Xi(c);let u=In(),{groupLabel:h,tabDescription:v,tabLabel:f}=Wi(),m;t[4]!==u?(m=i(ce=>({...ce,tabs:ce.tabs.filter(Pe=>hs(Pe,u))}),"f"),t[4]=u,t[5]=m):m=t[5];let g=gs.map(m).filter(cc),b,x;t[6]!==s||t[7]!==u||t[8]!==o?(b=i(()=>{hs(s,u)||Jt(o({replace:!0,to:"/home"}))},"b"),x=[s,u,o],t[6]=s,t[7]=u,t[8]=o,t[9]=b,t[10]=x):(b=t[9],x=t[10]),(0,z.useEffect)(b,x);let P;t[11]!==o?(P=i(ce=>{Jt(o({to:`/${ce.currentTarget.dataset.tab??""}`}))},"y"),t[11]=o,t[12]=P):P=t[12];let y=P,S,C;t[13]!==s||t[14]!==f?(S=i(()=>{typeof document<"u"&&(document.title=`${f[s]} \xB7 lunora`)},"S"),C=[s,f],t[13]=s,t[14]=f,t[15]=S,t[16]=C):(S=t[15],C=t[16]),(0,z.useEffect)(S,C);let w=g.find(ce=>ce.tabs.includes(s))??gs[0],N;t[17]!==h||t[18]!==f?(N=i(ce=>ce.tabs.map(Pe=>({group:h[ce.key],label:f[Pe],to:`/${Pe}`})),"N"),t[17]=h,t[18]=f,t[19]=N):N=t[19];let E=g.flatMap(N),T=(0,z.use)(ws),k=T!==null&&T.token!=="",O;t[20]!==E?(O=(0,a.jsx)(ps,{items:E}),t[20]=E,t[21]=O):O=t[21];let B;t[22]!==T||t[23]!==k||t[24]!==s||t[25]!==h||t[26]!==y||t[27]!==v||t[28]!==f||t[29]!==g?(B=(0,a.jsx)(tc,{chrome:T,connected:k,current:s,groupLabel:h,groups:g,selectTab:y,tabDescription:v,tabLabel:f}),t[22]=T,t[23]=k,t[24]=s,t[25]=h,t[26]=y,t[27]=v,t[28]=f,t[29]=g,t[30]=B):B=t[30];let D=h[w.key],j=f[s],H;t[31]!==D||t[32]!==j?(H=(0,a.jsx)(Qi,{domain:D,onOpenCommandPalette:ds,page:j}),t[31]=D,t[32]=j,t[33]=H):H=t[33];let K;t[34]!==T?.rulesInstalled?(K=T?.rulesInstalled===!1&&(0,a.jsx)(ui,{}),t[34]=T?.rulesInstalled,t[35]=K):K=t[35];let W=`dash-tab-${s}`,_=d?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",A=f[s],V;t[36]!==e||t[37]!==A?(V=e("{title} failed",{title:A}),t[36]=e,t[37]=A,t[38]=V):V=t[38];let oe=f[s],te;t[39]!==e?(te=e("Try again"),t[39]=e,t[40]=te):te=t[40];let le;t[41]===Symbol.for("react.memo_cache_sentinel")?(le=(0,a.jsx)(z.Suspense,{fallback:(0,a.jsx)(ks,{}),children:(0,a.jsx)(zr,{})}),t[41]=le):le=t[41];let J;t[42]!==s||t[43]!==V||t[44]!==oe||t[45]!==te?(J=(0,a.jsx)(jo,{fallbackTitle:V,label:oe,retryLabel:te,children:le},s),t[42]=s,t[43]=V,t[44]=oe,t[45]=te,t[46]=J):J=t[46];let Q;t[47]!==_||t[48]!==J?(Q=(0,a.jsx)("div",{className:_,children:J}),t[47]=_,t[48]=J,t[49]=Q):Q=t[49];let ne;t[50]!==p?(ne=p?.open===!0&&(0,a.jsx)(zi,{focusSeq:p.focusSeq,onClose:p.close,onShownChange:p.setShown,shown:p.shown}),t[50]=p,t[51]=ne):ne=t[51];let ue;t[52]!==W||t[53]!==Q||t[54]!==ne?(ue=(0,a.jsxs)("div",{"aria-labelledby":W,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:[Q,ne]}),t[52]=W,t[53]=Q,t[54]=ne,t[55]=ue):ue=t[55];let me;t[56]!==H||t[57]!==K||t[58]!==ue?(me=(0,a.jsxs)(Mi,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[H,K,ue]}),t[56]=H,t[57]=K,t[58]=ue,t[59]=me):me=t[59];let he;return t[60]!==B||t[61]!==me||t[62]!==O?(he=(0,a.jsxs)(Ei,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[O,B,me]}),t[60]=B,t[61]=me,t[62]=O,t[63]=he):he=t[63],he},"Cs"),rc=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)($r,{children:(0,a.jsx)(oc,{})}),t[0]=e):e=t[0],e},"_s"),nc=i(t=>{let e=(0,I.c)(5),{initialShardKey:o,schemaEditable:r}=t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];let s=jr(n),{table:l}=s,d=typeof l=="string"?l:void 0,p;return e[1]!==o||e[2]!==d||e[3]!==r?(p=(0,a.jsx)(Bl,{initialShardKey:o,initialTable:d,schemaEditable:r}),e[1]=o,e[2]=d,e[3]=r,e[4]=p):p=e[4],p},"Ls"),ac=i(()=>{let t=(0,I.c)(3),e=no(),o,r;return t[0]!==e?(o=i(()=>{Jt(e({replace:!0,to:"/home"}))},"a"),r=[e],t[0]=e,t[1]=o,t[2]=r):(o=t[1],r=t[2]),(0,z.useEffect)(o,r),null},"Ps"),sc=i(({basePath:t,dataEditable:e=!1,functions:o,initialShardKey:r,openApiSpec:n,openRpcSpec:s,runAsIdentity:l=!1,schemaEditable:d=!1,scheduledCancel:p,scheduledCron:c,scheduledLoad:u})=>{let h=Kr({component:rc}),v={agents:(0,a.jsx)(nl,{initialShardKey:r}),analytics:(0,a.jsx)(al,{}),api:(0,a.jsx)(sl,{functions:o,initialShardKey:r,openApiSpec:n,openRpcSpec:s}),audit:(0,a.jsx)(Rl,{initialShardKey:r}),authAudit:(0,a.jsx)(il,{}),authConfig:(0,a.jsx)(ll,{}),authSessions:(0,a.jsx)(cl,{}),containers:(0,a.jsx)(ul,{}),dashboards:(0,a.jsx)(Al,{initialShardKey:r}),data:(0,a.jsx)(fl,{editable:e,initialShardKey:r}),deploymentHealth:(0,a.jsx)(ml,{}),drains:(0,a.jsx)(Sl,{}),export:(0,a.jsx)(gl,{initialShardKey:r}),fanout:(0,a.jsx)(Vl,{initialShardKey:r}),files:(0,a.jsx)(Kl,{}),kv:(0,a.jsx)(Ol,{}),flags:(0,a.jsx)(xl,{initialShardKey:r}),functions:(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(Pl,{functions:o,initialShardKey:r}),(0,a.jsx)(yl,{functions:o,runAsIdentity:l})]}),health:(0,a.jsx)(Ll,{initialShardKey:r}),home:(0,a.jsx)(_n,{initialShardKey:r}),insights:(0,a.jsx)(el,{initialShardKey:r}),issues:(0,a.jsx)(Cl,{initialShardKey:r}),logs:(0,a.jsx)(Nl,{initialShardKey:r}),traces:(0,a.jsx)(Ul,{initialShardKey:r}),metrics:(0,a.jsx)(Hl,{initialShardKey:r}),migrations:(0,a.jsx)(hl,{initialShardKey:r}),notifications:(0,a.jsx)(Ml,{}),organizations:(0,a.jsx)(dl,{}),permissions:(0,a.jsx)(Il,{functions:o,runAsIdentity:l,schemaEditable:d}),pitr:(0,a.jsx)(bl,{initialShardKey:r}),mail:(0,a.jsx)(Tl,{}),payments:(0,a.jsx)(Dl,{}),queues:(0,a.jsx)(_l,{}),realtime:(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(El,{initialShardKey:r}),(0,a.jsx)(kl,{})]}),rls:(0,a.jsx)(tl,{}),schedule:(0,a.jsx)(wl,{loadCronJobs:c,scheduledCancel:p,scheduledLoad:u}),schema:(0,a.jsx)(nc,{initialShardKey:r,schemaEditable:d}),advisorHealth:(0,a.jsx)(ol,{}),security:(0,a.jsx)(rl,{}),settings:(0,a.jsx)(Fl,{initialShardKey:r}),sql:(0,a.jsx)(jl,{initialShardKey:r}),storageRules:(0,a.jsx)(zl,{}),users:(0,a.jsx)(pl,{}),vectors:(0,a.jsx)(Zl,{}),workflows:(0,a.jsx)(Wl,{})},f=pr({component:i(()=>v.home,"component"),getParentRoute:i(()=>h,"getParentRoute"),path:"/"}),m=Es.map(x=>pr({component:i(()=>v[x],"component"),getParentRoute:i(()=>h,"getParentRoute"),path:`/${x}`,validateSearch:vl[x]})),g=h.addChildren([f,...m]),b="window"in globalThis?Br():Fr({initialEntries:["/home"]});return Ur({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:ac,defaultPendingComponent:ks,defaultPendingMinMs:0,defaultPendingMs:0,history:b,routeTree:g})},"$s"),ic=i(t=>{let e=(0,I.c)(17),{basePath:o,chrome:r,dataEditable:n,functions:s,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:h,scheduledCron:v,scheduledLoad:f}=t,m;e[0]!==o||e[1]!==n||e[2]!==s||e[3]!==l||e[4]!==d||e[5]!==p||e[6]!==c||e[7]!==h||e[8]!==v||e[9]!==f||e[10]!==u?(m=sc({basePath:o,dataEditable:n,functions:s,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:h,scheduledCron:v,scheduledLoad:f}),e[0]=o,e[1]=n,e[2]=s,e[3]=l,e[4]=d,e[5]=p,e[6]=c,e[7]=h,e[8]=v,e[9]=f,e[10]=u,e[11]=m):m=e[11];let g=m,b=r??null,x;e[12]!==g?(x=(0,a.jsx)(Zr,{router:g}),e[12]=g,e[13]=x):x=e[13];let P;return e[14]!==b||e[15]!==x?(P=(0,a.jsx)(ws,{value:b,children:x}),e[14]=b,e[15]=x,e[16]=P):P=e[16],P},"As"),Lg=i(t=>{let e=(0,I.c)(17),{basePath:o,chrome:r,dataEditable:n,functions:s,i18n:l,initialShardKey:d,locale:p,openApiSpec:c,openRpcSpec:u,runAsIdentity:h,schemaEditable:v,scheduledCancel:f,scheduledCron:m,scheduledLoad:g}=t,b;e[0]!==o||e[1]!==r||e[2]!==n||e[3]!==s||e[4]!==d||e[5]!==c||e[6]!==u||e[7]!==h||e[8]!==f||e[9]!==m||e[10]!==g||e[11]!==v?(b=(0,a.jsx)(ni,{children:(0,a.jsx)(ic,{basePath:o,chrome:r,dataEditable:n,functions:s,initialShardKey:d,openApiSpec:c,openRpcSpec:u,runAsIdentity:h,scheduledCancel:f,scheduledCron:m,scheduledLoad:g,schemaEditable:v})}),e[0]=o,e[1]=r,e[2]=n,e[3]=s,e[4]=d,e[5]=c,e[6]=u,e[7]=h,e[8]=f,e[9]=m,e[10]=g,e[11]=v,e[12]=b):b=e[12];let x=b;if(l===void 0&&p===void 0)return x;let P;return e[13]!==l||e[14]!==p||e[15]!==x?(P=(0,a.jsx)(cs,{i18n:l,locale:p,children:x}),e[13]=l,e[14]=p,e[15]=x,e[16]=P):P=e[16],P},"cn");function lc(t){return t.location.pathname}i(lc,"Ts");function cc(t){return t.tabs.length>0}i(cc,"zs");export{jo as a,cs as b,ri as c,ai as d,Vg as e,ci as f,gi as g,bi as h,xi as i,yi as j,Lg as k};
|
|
1
|
+
import{a as In,b as _n}from"./chunk-HEB6GQQ6.js";import{a as An,d as Vn}from"./chunk-3C3CG7ZK.js";import{a as $t,b as qt,c as Gt,d as Nn,e as Bo}from"./chunk-I6A5C46N.js";import{$ as Cn,A as Bt,C as hn,D as Z,E as vn,F as bn,I as Ft,L as _e,M as So,N as jt,P as No,Q as xn,R as yn,S as To,T as Kt,U as zt,V as Ut,W as Zt,X as wo,Y as Wt,_ as Pn,aa as Eo,b as on,ba as ko,ea as Oo,fa as Ce,ga as Rn,ha as Yt,i as sn,ia as Sn,j as ln,ja as de,k as cn,ka as Mo,l as fr,m as xo,ma as Do,na as Io,o as yo,oa as _o,p as dn,pa as Ao,q as Po,qa as Vo,ra as Lo,s as pn,sa as Tn,ta as wn,u as un,ua as Ho,v as mn,va as En,w as fn,x as Co,y as Ro,z as gn}from"./chunk-2QSHLBCO.js";import{c as kn,h as On,k as gr}from"./chunk-QBWRC5YX.js";import{a as Fo}from"./chunk-HPFLBYRI.js";import{f as Dn}from"./chunk-ILNELDFC.js";import{a as Br,b as Fr,d as jr,e as no,f as pr,g as Kr,h as zr,i as Ur,j as Zr,k as Wr}from"./chunk-SMIESS7P.js";import{B as rn,C as nn,I as ve,J as an,K as Ht,O as L,P as Y,R as mr,e as fe,p as ao,q as tn}from"./chunk-CFPZYHPY.js";import{a as Hr}from"./chunk-7QIFDWQV.js";import{b as Ae,c as hr}from"./chunk-FXCBF4XT.js";import{a as Ie,c as Xr,h as bo,i as en}from"./chunk-2OUPA2WJ.js";import{a as ur,b as Lt}from"./chunk-THIXMMZD.js";import{a as Ee,c as G,i as je,j as F}from"./chunk-6ST5ECQA.js";import{a as $r,b as qr}from"./chunk-QLQADHFE.js";import{a as so}from"./chunk-XDAT7LHC.js";import{a as Qr}from"./chunk-XBDKZZ67.js";import{a as Gr,b as Yr,c as Jr,d as ge,m as Jt,o as Mn}from"./chunk-OG4N2XHD.js";import{c as cr}from"./chunk-AADILRJW.js";import{a as i,d as lr,e as R,f as M,g as dr,h as se,j as $}from"./chunk-3XIESWL4.js";var I=R(dr(),1);var ye=R(M(),1),z=R(M(),1);var a=R(se(),1);var Ln=R(M(),1),ke=R(se(),1);var Os={border:"1px solid var(--destructive)",color:"var(--destructive)",padding:12},Ms={overflow:"auto",whiteSpace:"pre-wrap"},jo=class extends Ln.Component{static{i(this,"g")}static getDerivedStateFromError(e){return{error:e}}state={error:null};componentDidCatch(e,o){console.error("[lunora-studio] panel error",e,o.componentStack)}reset=i(()=>{this.setState({error:null})},"reset");render(){let{children:e,fallbackTitle:o,label:r,retryLabel:n}=this.props,{error:s}=this.state;if(s===null)return(0,ke.jsx)(ke.Fragment,{children:e});let l=o??(r===void 0?"Something went wrong":`${r} failed`);return(0,ke.jsxs)("div",{"data-testid":"dash-error-boundary",role:"alert",style:Os,children:[(0,ke.jsx)("strong",{children:l}),(0,ke.jsx)("pre",{"data-testid":"dash-error-message",style:Ms,children:s.message}),(0,ke.jsx)("button",{"data-testid":"dash-error-retry",onClick:this.reset,type:"button",children:n??"Try again"})]})}};var Be={};lr(Be,{Arrow:()=>Xn,Backdrop:()=>ta,Close:()=>ia,Description:()=>aa,Handle:()=>lo,Popup:()=>Jn,Portal:()=>Un,Positioner:()=>Zn,Root:()=>Fn,Title:()=>ra,Trigger:()=>jn,Viewport:()=>da,createHandle:()=>pa});var Oe=R(M(),1);var Ko=R(M(),1);var vr=Ko.createContext(void 0);function X(t){let e=Ko.useContext(vr);if(e===void 0&&!t)throw new Error(G(47));return e}i(X,"usePopoverRootContext");var Ve=R(M(),1),Hn=R(Hr(),1);function Ds(){return{...$t(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}i(Ds,"createInitialState");var Is={...Gt,disabled:Z(t=>t.disabled),instantType:Z(t=>t.instantType),openMethod:Z(t=>t.openMethod),openChangeReason:Z(t=>t.openChangeReason),modal:Z(t=>t.modal),focusManagerModal:Z(t=>t.focusManagerModal),stickIfOpen:Z(t=>t.stickIfOpen),titleElementId:Z(t=>t.titleElementId),descriptionElementId:Z(t=>t.descriptionElementId),openOnHover:Z(t=>t.openOnHover),closeDelay:Z(t=>t.closeDelay),hasViewport:Z(t=>t.hasViewport)},Qt=class t extends Ft{static{i(this,"PopoverStore")}constructor(e,o,r=!1){let n={...Ds(),...e},s=new Wt;n.open&&e?.mounted===void 0&&(n.mounted=!0),n.floatingRootContext=qt(s,o,r),super(n,{popupRef:Ve.createRef(),backdropRef:Ve.createRef(),internalBackdropRef:Ve.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:Ve.createRef(),beforeContentFocusGuardRef:Ve.createRef(),stickIfOpenTimeout:new rn,triggerElements:s},Is)}setOpen=i((e,o)=>{let r=o.reason===L.triggerHover,n=o.reason===L.triggerPress&&o.event.detail===0,s=!e&&(o.reason===L.escapeKey||o.reason==null),l=xn(o),d=this.select("activeTriggerId");if(!e&&o.reason===L.closePress&&o.trigger==null&&d!=null&&(o.trigger=this.context.triggerElements.getById(d)??this.select("activeTriggerElement")??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let p=i(()=>{let c={open:e,openChangeReason:o.reason};No(c,e,o.trigger,l()),this.update(c)},"changeState");r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set("stickIfOpen",!1)}),Hn.flushSync(p)):p(),n||s?this.set("instantType",n?"click":"dismiss"):o.reason===L.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)},"setOpen");static useStore(e,o){let{store:r,internalStore:n}=jt(e,(s,l)=>new t(o,s,l));return Ve.useEffect(()=>n?.disposeEffect(),[n]),r}disposeEffect=i(()=>this.context.stickIfOpenTimeout.disposeEffect(),"disposeEffect")};var Ke=R(se(),1);function Bn({props:t}){let{children:e,open:o,defaultOpen:r=!1,onOpenChange:n,onOpenChangeComplete:s,modal:l=!1,handle:d,triggerId:p,defaultTriggerId:c=null}=t,u=Qt.useStore(d?.store,{modal:l,open:r,openProp:o,activeTriggerId:c,triggerIdProp:p});To(u,o,r,c),u.useControlledProp("openProp",o),u.useControlledProp("triggerIdProp",p);let h=u.useState("open"),v=u.useState("mounted"),f=u.useState("payload"),m=pn()!=null;u.useContextCallback("onOpenChange",n),u.useContextCallback("onOpenChangeComplete",s),wo(u,h),zt(u);let{forceUnmount:g}=Ut(h,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});u.useSyncedValues({modal:l,nested:m}),Oe.useEffect(()=>{h||u.context.stickIfOpenTimeout.clear()},[u,h]);let b=Oe.useCallback(()=>{u.setOpen(!1,Y(L.imperativeAction))},[u]);Oe.useImperativeHandle(t.actionsRef,()=>({unmount:g,close:b}),[g,b]);let x=h||v,P=Oe.useMemo(()=>({store:u}),[u]);return(0,Ke.jsxs)(vr.Provider,{value:P,children:[x&&(0,Ke.jsx)(_s,{store:u,modal:l}),typeof e=="function"?e({payload:f}):e]})}i(Bn,"PopoverRootComponent");function Fn(t){return X(!0)?(0,Ke.jsx)(Bn,{props:t}):(0,Ke.jsx)(fn,{children:(0,Ke.jsx)(Bn,{props:t})})}i(Fn,"PopoverRoot");function _s({store:t,modal:e}){let o=t.useState("floatingRootContext"),r=Bt(o,{outsidePressEvent:{mouse:e==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),n=r.reference??je,s=r.trigger??je,l=Oe.useMemo(()=>Ee(_e,r.floating),[r.floating]);return Zt(t,{activeTriggerProps:n,inactiveTriggerProps:s,popupProps:l}),null}i(_s,"PopoverInteractions");var Le=R(M(),1);var ze=R(se(),1);var jn=Le.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,handle:p,payload:c,openOnHover:u=!1,delay:h=300,closeDelay:v=0,id:f,...m}=e,g=X(!0),b=p?.store??g?.store;if(!b)throw new Error(G(74));let x=fe(f),P=b.useState("isTriggerActive",x),y=b.useState("floatingRootContext"),S=b.useState("isOpenedByTrigger",x),C=b.useState("triggerPopupId",x),w=Le.useRef(null),{registerTrigger:N,isMountedByThisTrigger:E}=Kt(x,w,b,{payload:c,disabled:l,openOnHover:u,closeDelay:v}),T=b.useState("openChangeReason"),k=b.useState("stickIfOpen"),O=b.useState("openMethod"),B=b.useState("focusManagerModal"),D=ko(y,{enabled:!l&&y!=null&&u&&(O!=="touch"||T!==L.triggerPress),mouseOnly:!0,move:!1,handleClose:Oo(),restMs:h,delay:{close:v},triggerElementRef:w,isActiveTrigger:P,isClosing:i(()=>b.select("transitionStatus")==="ending","isClosing")}),j=Ro(y,{enabled:y!=null,stickIfOpen:k}),H=Mo(()=>b.select("open"),Q=>{b.set("openMethod",Q)}),K=b.useState("triggerProps",E),{getButtonProps:W,buttonRef:_}=Ae({disabled:l,native:d}),A={open(Q){return Q&&T===L.triggerPress?Sn.open(Q):Yt.open(Q)}},{preFocusGuardRef:V,handlePreFocusGuardFocus:oe,handleFocusTargetFocus:te}=Nn(b,w),J=F("button",e,{state:{disabled:l,open:S},ref:[_,o,N,w],props:[j.reference,D,K,H,{[xo]:"",id:x,"aria-haspopup":"dialog","aria-expanded":S,"aria-controls":C},m,W],stateAttributesMapping:A});return E&&!B?(0,ze.jsxs)(Le.Fragment,{children:[(0,ze.jsx)(fr,{ref:V,onFocus:oe}),(0,ze.jsx)(Le.Fragment,{children:J},x),(0,ze.jsx)(fr,{ref:b.context.triggerFocusTargetRef,onFocus:te})]}):(0,ze.jsx)(Le.Fragment,{children:J},x)},"PopoverTrigger"));var zn=R(M(),1);var zo=R(M(),1);var br=zo.createContext(void 0);function Kn(){let t=zo.useContext(br);if(t===void 0)throw new Error(G(45));return t}i(Kn,"usePopoverPortalContext");var xr=R(se(),1);var Un=zn.forwardRef(i(function(e,o){let{keepMounted:r=!1,...n}=e,{store:s}=X();return s.useState("mounted")||r?(0,xr.jsx)(br.Provider,{value:r,children:(0,xr.jsx)(Po,{ref:o,...n})}):null},"PopoverPortal"));var eo=R(M(),1);var Uo=R(M(),1);var yr=Uo.createContext(void 0);function Xt(){let t=Uo.useContext(yr);if(!t)throw new Error(G(46));return t}i(Xt,"usePopoverPositionerContext");var io=R(se(),1);var Zn=eo.forwardRef(i(function(e,o){let{render:r,className:n,style:s,anchor:l,positionMethod:d="absolute",side:p="bottom",align:c="center",sideOffset:u=0,alignOffset:h=0,collisionBoundary:v="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:g=!1,disableAnchorTracking:b=!1,collisionAvoidance:x=yo,...P}=e,{store:y}=X(),S=Kn(),C=un(),w=y.useState("floatingRootContext"),N=y.useState("mounted"),E=y.useState("open"),T=y.useState("openChangeReason"),k=y.useState("activeTriggerElement"),O=y.useState("modal"),B=y.useState("openMethod"),D=y.useState("positionerElement"),j=y.useState("instantType"),H=y.useState("transitionStatus"),K=y.useState("hasViewport"),W=eo.useRef(null),_=an(D,!1,!1),A=_o({anchor:l,floatingRootContext:w,positionMethod:d,mounted:N,side:p,sideOffset:u,align:c,alignOffset:h,arrowPadding:m,collisionBoundary:v,collisionPadding:f,sticky:g,disableAnchorTracking:b,keepMounted:S,nodeId:C,collisionAvoidance:x,adaptiveOrigin:K?Io:void 0}),V=w.useState("domReferenceElement");Ie(()=>{let J=V,Q=W.current;if(J&&(W.current=J),Q&&J&&J!==Q){y.set("instantType",void 0);let ne=new AbortController;return _(()=>{y.set("instantType","trigger-change")},ne.signal),()=>{ne.abort()}}},[V,_,y]),wn(E&&O===!0&&T!==L.triggerHover,B==="touch",D,k);let oe=eo.useCallback(J=>{y.set("positionerElement",J)},[y]),te={open:E,side:A.side,align:A.align,anchorHidden:A.anchorHidden,instant:j},le=Lo(e,te,{styles:A.positionerStyles,transitionStatus:H,props:P,refs:[o,oe],hidden:!N,inert:!E});return(0,io.jsxs)(yr.Provider,{value:A,children:[N&&O===!0&&T!==L.triggerHover&&(0,io.jsx)(Ao,{ref:y.context.internalBackdropRef,inert:Do(!E),cutout:k}),(0,io.jsx)(mn,{id:C,children:le})]})},"PopoverPositioner"));var Zo=R(M(),1);var He=R(M(),1);var Wn=R(se(),1);var $n=He.createContext(void 0);function qn(){let[t,e]=He.useState(0),o=Xr(()=>(e(n=>n+1),()=>{e(n=>Math.max(0,n-1))}));return{context:He.useMemo(()=>({register:o}),[o]),hasClosePart:t>0}}i(qn,"useClosePartCount");function Gn(t){let{value:e,children:o}=t;return(0,Wn.jsx)($n.Provider,{value:e,children:o})}i(Gn,"ClosePartProvider");function Yn(){let t=He.useContext($n);Ie(()=>t?.register(),[t])}i(Yn,"useClosePartRegistration");var Pr=R(se(),1);var As={...de,...ve},Jn=Zo.forwardRef(i(function(e,o){let{render:r,className:n,style:s,initialFocus:l,finalFocus:d,...p}=e,{store:c}=X(),u=Xt(),h=En(!0)!=null,{context:v,hasClosePart:f}=qn(),m=c.useState("open"),g=c.useState("openMethod"),b=c.useState("instantType"),x=c.useState("transitionStatus"),P=c.useState("popupProps"),y=c.useState("titleElementId"),S=c.useState("descriptionElementId"),C=c.useState("modal"),w=c.useState("mounted"),N=c.useState("openChangeReason"),E=c.useState("activeTriggerElement"),T=c.useState("floatingRootContext"),k=T.useState("floatingId"),O=c.useState("disabled"),B=c.useState("openOnHover"),D=c.useState("closeDelay"),j=p.id??k;Ht({open:m,ref:c.context.popupRef,onComplete(){m&&c.context.onOpenChangeComplete?.(!0)}}),Eo(T,{enabled:B&&!O,closeDelay:D});let H=l===void 0?So(c.context.popupRef):l,K=C!==!1&&f;c.useSyncedValue("focusManagerModal",K);let W=Zo.useCallback(V=>{c.set("popupElement",V)},[c]),_={open:m,side:u.side,align:u.align,instant:b,transitionStatus:x},A=F("div",e,{state:_,ref:[o,c.context.popupRef,W],props:[P,{id:j,role:"dialog",..._e,"aria-labelledby":y,"aria-describedby":S,onKeyDown(V){h&&Ho.has(V.key)&&V.stopPropagation()}},Vo(x),p],stateAttributesMapping:As});return(0,Pr.jsx)(Co,{context:T,openInteractionType:g,modal:K,disabled:!w||N===L.triggerHover,initialFocus:H,returnFocus:d,restoreFocus:"popup",previousFocusableElement:en(E)?E:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,Pr.jsx)(Gn,{value:v,children:A})})},"PopoverPopup"));var Qn=R(M(),1);var Xn=Qn.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=d.useState("open"),{arrowRef:c,side:u,align:h,arrowUncentered:v,arrowStyles:f}=Xt();return F("div",e,{state:{open:p,side:u,align:h,uncentered:v},ref:[o,c],props:[{style:f,"aria-hidden":!0},l],stateAttributesMapping:de})},"PopoverArrow"));var ea=R(M(),1);var Vs={...de,...ve},ta=ea.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=d.useState("open"),c=d.useState("mounted"),u=d.useState("transitionStatus"),h=d.useState("openChangeReason");return F("div",e,{state:{open:p,transitionStatus:u},ref:[d.context.backdropRef,o],props:[{role:"presentation",hidden:!c,style:{pointerEvents:h===L.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:Vs})},"PopoverBackdrop"));var oa=R(M(),1);var ra=oa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=fe(l.id);return d.useSyncedValueWithCleanup("titleElementId",p),F("h2",e,{ref:o,props:[{id:p},l]})},"PopoverTitle"));var na=R(M(),1);var aa=na.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,{store:d}=X(),p=fe(l.id);return d.useSyncedValueWithCleanup("descriptionElementId",p),F("p",e,{ref:o,props:[{id:p},l]})},"PopoverDescription"));var sa=R(M(),1);var ia=sa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,...p}=e,{buttonRef:c,getButtonProps:u}=Ae({disabled:l,focusableWhenDisabled:!1,native:d}),{store:h}=X();return Yn(),F("button",e,{ref:[o,c],props:[{onClick(f){h.setOpen(!1,Y(L.closePress,f.nativeEvent))}},p,u]})},"PopoverClose"));var ca=R(M(),1);var la=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var Ls={activationDirection:i(t=>t?{"data-activation-direction":t}:null,"activationDirection")},da=ca.forwardRef(i(function(e,o){let{render:r,className:n,style:s,children:l,...d}=e,{store:p}=X(),{side:c}=Xt(),u=p.useState("instantType"),{children:h,state:v}=Bo({store:p,side:c,cssVars:la,children:l}),f={activationDirection:v.activationDirection,transitioning:v.transitioning,instant:u};return F("div",e,{state:f,ref:o,props:[d,{children:h}],stateAttributesMapping:Ls})},"PopoverViewport"));var lo=class{static{i(this,"PopoverHandle")}constructor(){this.store=new Qt}open(e){let o=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!o)throw new Error(G(80,e));this.store.setOpen(!0,Y(L.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(L.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function pa(){return new lo}i(pa,"createPopoverHandle");var pe={};lr(pe,{Backdrop:()=>ma,Close:()=>ga,Description:()=>va,Handle:()=>mo,Popup:()=>Ca,Portal:()=>Sa,Root:()=>Oa,Title:()=>_a,Trigger:()=>Aa,Viewport:()=>Da,createHandle:()=>Va});var ua=R(M(),1);var co=R(M(),1);var Wo=co.createContext(!1),Cr=co.createContext(void 0);function ie(t){let e=co.useContext(Cr);if(t===!1&&e===void 0)throw new Error(G(27));return e}i(ie,"useDialogRootContext");var Hs={...de,...ve},ma=ua.forwardRef(i(function(e,o){let{render:r,className:n,style:s,forceRender:l=!1,...d}=e,{store:p}=ie(),c=p.useState("open"),u=p.useState("nested"),h=p.useState("mounted"),v=p.useState("transitionStatus");return F("div",e,{state:{open:c,transitionStatus:v},ref:[p.context.backdropRef,o],stateAttributesMapping:Hs,props:[{role:"presentation",hidden:!h,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:l||!u})},"DialogBackdrop"));var fa=R(M(),1);var ga=fa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,...p}=e,{store:c}=ie(),u=c.useState("open"),{getButtonProps:h,buttonRef:v}=Ae({disabled:l,native:d}),f={disabled:l};function m(g){u&&c.setOpen(!1,Y(L.closePress,g.nativeEvent))}return i(m,"handleClick"),F("button",e,{state:f,ref:[o,v],props:[{onClick:m},p,h]})},"DialogClose"));var ha=R(M(),1);var va=ha.forwardRef(i(function(e,o){let{render:r,className:n,style:s,id:l,...d}=e,{store:p}=ie(),c=fe(l);return p.useSyncedValueWithCleanup("descriptionElementId",c),F("p",e,{ref:o,props:[{id:c},d]})},"DialogDescription"));var ya=R(M(),1);var ba=(function(t){return t.nestedDialogs="--nested-dialogs",t})({});var xa=(function(t){return t[t.open=Ce.open]="open",t[t.closed=Ce.closed]="closed",t[t.startingStyle=Ce.startingStyle]="startingStyle",t[t.endingStyle=Ce.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var $o=R(M(),1);var Rr=$o.createContext(void 0);function qo(){let t=$o.useContext(Rr);if(t===void 0)throw new Error(G(26));return t}i(qo,"useDialogPortalContext");var Pa=R(se(),1);var Bs={...de,...ve,nestedDialogOpen(t){return t?{[xa.nestedDialogOpen]:""}:null}},Ca=ya.forwardRef(i(function(e,o){let{render:r,className:n,style:s,finalFocus:l,initialFocus:d,...p}=e,{store:c}=ie(),u=c.useState("descriptionElementId"),h=c.useState("disablePointerDismissal"),v=c.useState("floatingRootContext"),f=c.useState("popupProps"),m=c.useState("modal"),g=c.useState("mounted"),b=c.useState("nested"),x=c.useState("nestedOpenDialogCount"),P=c.useState("open"),y=c.useState("openMethod"),S=c.useState("titleElementId"),C=c.useState("transitionStatus"),w=c.useState("role"),N=v.useState("floatingId"),E=p.id??N;qo(),Ht({open:P,ref:c.context.popupRef,onComplete(){P&&c.context.onOpenChangeComplete?.(!0)}});let T=d===void 0?So(c.context.popupRef):d,k=x>0,O=c.useStateSetter("popupElement"),D=F("div",e,{state:{open:P,nested:b,transitionStatus:C,nestedDialogOpen:k},props:[f,{id:E,"aria-labelledby":S??void 0,"aria-describedby":u??void 0,role:w,..._e,hidden:!g,onKeyDown(j){Ho.has(j.key)&&j.stopPropagation()},style:{[ba.nestedDialogs]:x}},p],ref:[o,c.context.popupRef,O],stateAttributesMapping:Bs});return(0,Pa.jsx)(Co,{context:v,openInteractionType:y,disabled:!g,closeOnFocusOut:!h,initialFocus:T,returnFocus:l,modal:m!==!1,restoreFocus:"popup",children:D})},"DialogPopup"));var Ra=R(M(),1);var po=R(se(),1);var Sa=Ra.forwardRef(i(function(e,o){let{keepMounted:r=!1,...n}=e,{store:s}=ie(),l=s.useState("mounted"),d=s.useState("modal"),p=s.useState("open");return l||r?(0,po.jsx)(Rr.Provider,{value:r,children:(0,po.jsxs)(Po,{ref:o,...n,children:[l&&d===!0&&(0,po.jsx)(Ao,{ref:s.context.internalBackdropRef,inert:Do(!p)}),e.children]})}):null},"DialogPortal"));var ka=R(M(),1);var wa=R(M(),1);var Me=R(M(),1);function Na(t){let{store:e,actionsRef:o}=t,r=e.useState("open");wo(e,r),zt(e);let{forceUnmount:n}=Ut(r,e),s=Me.useCallback(()=>{e.setOpen(!1,Y(L.imperativeAction))},[e]);Me.useImperativeHandle(o,()=>({unmount:n,close:s}),[n,s])}i(Na,"useDialogRoot");function Ta({store:t,parentContext:e,isDrawer:o}){let r=t.useState("open"),n=t.useState("disablePointerDismissal"),s=t.useState("modal"),l=t.useState("popupElement"),d=t.useState("floatingRootContext"),[p,c]=Me.useState(0),[u,h]=Me.useState(0),v=p===0,f=Bt(d,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(x){if(!t.context.outsidePressEnabledRef.current||"button"in x&&x.button!==0||"touches"in x&&x.touches.length!==1)return!1;let P=tn(x);return v&&!n?s&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===P||t.context.backdropRef.current===P||ao(P,l)&&!P?.hasAttribute("data-base-ui-portal"):!0:!1},escapeKey:v});Tn(r&&s===!0,l),t.useContextCallback("onNestedDialogOpen",(x,P)=>{c(x),h(P)}),t.useContextCallback("onNestedDialogClose",()=>{c(0),h(0)}),Me.useEffect(()=>(e?.onNestedDialogOpen&&r&&e.onNestedDialogOpen(p+1,u+(o?1:0)),e?.onNestedDialogClose&&!r&&e.onNestedDialogClose(),()=>{e?.onNestedDialogClose&&r&&e.onNestedDialogClose()}),[o,r,p,u,e]);let m=f.reference??je,g=f.trigger??je,b=f.floating??je;return Zt(t,{activeTriggerProps:m,inactiveTriggerProps:g,popupProps:b,nestedOpenDialogCount:p,nestedOpenDrawerCount:u}),null}i(Ta,"DialogInteractions");var Go=R(M(),1);var Fs={...Gt,modal:Z(t=>t.modal),nested:Z(t=>t.nested),nestedOpenDialogCount:Z(t=>t.nestedOpenDialogCount),nestedOpenDrawerCount:Z(t=>t.nestedOpenDrawerCount),disablePointerDismissal:Z(t=>t.disablePointerDismissal),openMethod:Z(t=>t.openMethod),descriptionElementId:Z(t=>t.descriptionElementId),titleElementId:Z(t=>t.titleElementId),viewportElement:Z(t=>t.viewportElement),role:Z(t=>t.role)},to=class t extends Ft{static{i(this,"DialogStore")}constructor(e,o,r=!1){let n=new Wt,s=js(e);s.floatingRootContext=qt(n,o,r),super(s,{popupRef:Go.createRef(),backdropRef:Go.createRef(),internalBackdropRef:Go.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:n,onOpenChange:void 0,onOpenChangeComplete:void 0},Fs)}setOpen=i((e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);let r={open:e};No(r,e,o.trigger),this.update(r)},"setOpen");static useStore(e,o){return jt(e,(n,s)=>new t(o,n,s),!0).store}};function js(t={}){return{...$t(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...t}}i(js,"createInitialState");var uo=R(se(),1);function Ea(t,e="dialog"){let{children:o,open:r,defaultOpen:n=!1,onOpenChange:s,onOpenChangeComplete:l,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:c,handle:u,triggerId:h,defaultTriggerId:v=null}=t,f=e==="drawer",m=e==="alert-dialog",g=m?!0:p,b=m||d,x=m?"alertdialog":"dialog",P=ie(!0),S={modal:g,disablePointerDismissal:b,nested:!!P,role:x},C=to.useStore(u?.store,{open:n,openProp:r,activeTriggerId:v,triggerIdProp:h,...S});hn(()=>{let O=r===void 0&&C.state.open===!1&&n===!0?{open:!0,activeTriggerId:v}:null;m?C.update(O?{...S,...O}:S):O&&C.update(O)}),C.useControlledProp("openProp",r),C.useControlledProp("triggerIdProp",h),C.useSyncedValues(S),C.useContextCallback("onOpenChange",s),C.useContextCallback("onOpenChangeComplete",l);let w=C.useState("open"),N=C.useState("mounted"),E=C.useState("payload");Na({store:C,actionsRef:c});let T=w||N,k=wa.useMemo(()=>({store:C}),[C]);return(0,uo.jsx)(Wo.Provider,{value:!1,children:(0,uo.jsxs)(Cr.Provider,{value:k,children:[T&&(0,uo.jsx)(Ta,{store:C,parentContext:P?.store.context,isDrawer:f}),typeof o=="function"?o({payload:E}):o]})})}i(Ea,"useRenderDialogRoot");function Oa(t){let e=ka.useContext(Wo)?"drawer":"dialog";return Ea(t,e)}i(Oa,"DialogRoot");var Ma=R(M(),1);var Sr=(function(t){return t[t.open=Ce.open]="open",t[t.closed=Ce.closed]="closed",t[t.startingStyle=Ce.startingStyle]="startingStyle",t[t.endingStyle=Ce.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});var Ks={...de,...ve,nested(t){return t?{[Sr.nested]:""}:null},nestedDialogOpen(t){return t?{[Sr.nestedDialogOpen]:""}:null}},Da=Ma.forwardRef(i(function(e,o){let{render:r,className:n,style:s,children:l,...d}=e,p=qo(),{store:c}=ie(),u=c.useState("open"),h=c.useState("nested"),v=c.useState("transitionStatus"),f=c.useState("nestedOpenDialogCount"),m=c.useState("mounted"),g=c.useStateSetter("viewportElement"),b=f>0;return F("div",e,{enabled:p||m,state:{open:u,nested:h,transitionStatus:v,nestedDialogOpen:b},ref:[o,g],stateAttributesMapping:Ks,props:[{role:"presentation",hidden:!m,style:{pointerEvents:u?void 0:"none"},children:l},d]})},"DialogViewport"));var Ia=R(M(),1);var _a=Ia.forwardRef(i(function(e,o){let{render:r,className:n,style:s,id:l,...d}=e,{store:p}=ie(),c=fe(l);return p.useSyncedValueWithCleanup("titleElementId",c),F("h2",e,{ref:o,props:[{id:c},d]})},"DialogTitle"));var Yo=R(M(),1);var Aa=Yo.forwardRef(i(function(e,o){let{render:r,className:n,style:s,disabled:l=!1,nativeButton:d=!0,id:p,payload:c,handle:u,...h}=e,v=ie(!0),f=u?.store??v?.store;if(!f)throw new Error(G(79));let m=fe(p),g=f.useState("floatingRootContext"),b=f.useState("isOpenedByTrigger",m),x=f.useState("triggerPopupId",m),P=Yo.useRef(null),{registerTrigger:y,isMountedByThisTrigger:S}=Kt(m,P,f,{payload:c}),{getButtonProps:C,buttonRef:w}=Ae({disabled:l,native:d}),N=Ro(g,{enabled:g!=null}),E=Mo(()=>f.select("open"),O=>{f.set("openMethod",O)}),T={disabled:l,open:b},k=f.useState("triggerProps",S);return F("button",e,{state:T,ref:[w,o,y,P],props:[N.reference,k,E,{[xo]:"",id:m,"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":x},h,C],stateAttributesMapping:Yt})},"DialogTrigger"));var mo=class{static{i(this,"DialogHandle")}constructor(e){this.store=e??new to}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,Y(L.imperativeAction,void 0,o))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,Y(L.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,Y(L.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Va(){return new mo}i(Va,"createDialogHandle");var Se={};lr(Se,{Arrow:()=>ts,Handle:()=>fo,Popup:()=>Xa,Portal:()=>Ga,Positioner:()=>Ja,Provider:()=>os,Root:()=>Ha,Trigger:()=>za,Viewport:()=>as,createHandle:()=>ss});var Re=R(M(),1);var Jo=R(M(),1);var Nr=Jo.createContext(void 0);function be(t){let e=Jo.useContext(Nr);if(e===void 0&&!t)throw new Error(G(72));return e}i(be,"useTooltipRootContext");var La=R(M(),1);var zs={...Gt,disabled:Z(t=>t.disabled),instantType:Z(t=>t.instantType),isInstantPhase:Z(t=>t.isInstantPhase),trackCursorAxis:Z(t=>t.trackCursorAxis),disableHoverablePopup:Z(t=>t.disableHoverablePopup),lastOpenChangeReason:Z(t=>t.openChangeReason),closeOnClick:Z(t=>t.closeOnClick),closeDelay:Z(t=>t.closeDelay),hasViewport:Z(t=>t.hasViewport)},oo=class t extends Ft{static{i(this,"TooltipStore")}constructor(e,o,r=!1){let n=new Wt,s={...Us(),...e};s.floatingRootContext=qt(n,o,r),super(s,{popupRef:La.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},zs)}setOpen=i((e,o)=>{yn(this,e,o,{extraState:{openChangeReason:o.reason}})},"setOpen");cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Y(L.triggerPress,e))}static useStore(e,o){return jt(e,(n,s)=>new t(o,n,s)).store}};function Us(){return{...$t(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}i(Us,"createInitialState");var Qo=R(se(),1);var Ha=vn(i(function(e){let{disabled:o=!1,defaultOpen:r=!1,open:n,disableHoverablePopup:s=!1,trackCursorAxis:l="none",actionsRef:d,onOpenChange:p,onOpenChangeComplete:c,handle:u,triggerId:h,defaultTriggerId:v=null,children:f}=e,m=oo.useStore(u?.store,{open:r,openProp:n,activeTriggerId:v,triggerIdProp:h});To(m,n,r,v),m.useControlledProp("openProp",n),m.useControlledProp("triggerIdProp",h),m.useContextCallback("onOpenChange",p),m.useContextCallback("onOpenChangeComplete",c);let g=m.useState("open"),b=!o&&g,x=m.useState("activeTriggerId"),P=m.useState("mounted"),y=m.useState("payload");m.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:s}),m.useSyncedValue("disabled",o),zt(m,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:S,transitionStatus:C}=Ut(b,m),w=m.useState("isInstantPhase"),N=m.useState("instantType"),E=m.useState("lastOpenChangeReason"),T=Re.useRef(null);Ie(()=>{g&&o&&m.setOpen(!1,Y(L.disabled))},[g,o,m]),Ie(()=>{C==="ending"&&E===L.none||C!=="ending"&&w?(N!=="delay"&&(T.current=N),m.set("instantType","delay")):T.current!==null&&(m.set("instantType",T.current),T.current=null)},[C,w,E,N,m]),Ie(()=>{b&&x==null&&m.set("payload",void 0)},[m,x,b]);let k=Re.useCallback(()=>{m.setOpen(!1,Y(L.imperativeAction))},[m]);Re.useImperativeHandle(d,()=>({unmount:S,close:k}),[S,k]);let O=b||P||!o&&l!=="none";return(0,Qo.jsxs)(Nr.Provider,{value:m,children:[O&&(0,Qo.jsx)(Zs,{store:m,disabled:o,trackCursorAxis:l}),typeof f=="function"?f({payload:y}):f]})},"TooltipRoot"));function Zs({store:t,disabled:e,trackCursorAxis:o}){let r=t.useState("floatingRootContext"),n=Bt(r,{enabled:!e,referencePress:i(()=>t.select("closeOnClick"),"referencePress")}),s=gn(r,{enabled:!e&&o!=="none",axis:o==="none"?void 0:o}),l=Re.useMemo(()=>Ee(s.reference,n.reference),[s.reference,n.reference]),d=Re.useMemo(()=>Ee(s.trigger,n.trigger),[s.trigger,n.trigger]),p=Re.useMemo(()=>Ee(_e,s.floating,n.floating),[s.floating,n.floating]);return Zt(t,{activeTriggerProps:l,inactiveTriggerProps:d,popupProps:p}),null}i(Zs,"TooltipInteractions");var er=R(M(),1);var Xo=R(M(),1);var Tr=Xo.createContext(void 0);function Ba(){return Xo.useContext(Tr)}i(Ba,"useTooltipProviderContext");var Fa=(function(t){return t[t.popupOpen=Rn.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t})({});var Ka="data-base-ui-tooltip-trigger";function ja(t){if("composedPath"in t){let o=t.composedPath();for(let r=0;r<o.length;r+=1){let n=o[r];if(bo(n))return n}}let e=t.target;return bo(e)?e:null}i(ja,"getTargetElement");function Ws(t){let e=t;for(;e;){if(e.hasAttribute(Ka))return e;let o=e.parentElement;if(o){e=o;continue}let r=e.getRootNode();e="host"in r&&bo(r.host)?r.host:null}return null}i(Ws,"closestEnabledTooltipTrigger");var za=bn(i(function(e,o){let{render:r,className:n,style:s,handle:l,payload:d,disabled:p,delay:c,closeOnClick:u=!0,closeDelay:h,id:v,...f}=e,m=be(!0),g=l?.store??m;if(!g)throw new Error(G(82));let b=fe(v),x=g.useState("isTriggerActive",b),P=g.useState("isOpenedByTrigger",b),y=g.useState("floatingRootContext"),S=er.useRef(null),C=c??600,w=h??0,{registerTrigger:N,isMountedByThisTrigger:E}=Kt(b,S,g,{payload:d,closeOnClick:u,closeDelay:w}),T=Ba(),{delayRef:k,isInstantPhase:O,hasProvider:B}=ln(y,{open:P}),D=Cn(y);g.useSyncedValue("isInstantPhase",O);let j=g.useState("disabled"),H=p??j,K=cn(H),W=g.useState("trackCursorAxis"),_=g.useState("disableHoverablePopup"),A=er.useRef(!1),V=nn(),oe=er.useRef(void 0);function te(){let q=T?.delay,ee=typeof k.current=="object"?k.current.open:void 0,ae=C;return B&&(ee!==0?ae=c??q??C:ae=0),ae}i(te,"getOpenDelay");function le(q){let ee=S.current;if(!ee||!q)return!1;let ae=Ws(q);return ae!==null&&ae!==ee&&ao(ee,ae)}i(le,"isEnabledNestedTriggerTarget");function J(q){let ee=le(q);return A.current=ee,ee&&(D.openChangeTimeout.clear(),D.restTimeout.clear(),D.restTimeoutPending=!1,V.clear()),ee}i(J,"detectNestedTriggerHover");let Q=ko(y,{enabled:!H,mouseOnly:!0,move:!1,handleClose:!_&&W!=="both"?Oo():null,restMs:te,delay(){let q=typeof k.current=="object"?k.current.close:void 0,ee=w;return h==null&&B&&(ee=q),{close:ee}},triggerElementRef:S,isActiveTrigger:x,isClosing:i(()=>g.select("transitionStatus")==="ending","isClosing"),shouldOpen(){return!A.current}}),ne=Pn(y,{enabled:!H}).reference,ue=i(q=>{let ee=A.current,ae=ja(q),Ne=J(ae),xe=S.current,De=xe&&ae&&ao(xe,ae);if(Ne&&g.select("open")&&g.select("lastOpenChangeReason")===L.triggerHover){g.setOpen(!1,Y(L.triggerHover,q));return}if(ee&&!Ne&&De&&!K.current&&!g.select("open")&&xe&&on(oe.current)){let Te=i(()=>{!A.current&&!K.current&&!g.select("open")&&g.setOpen(!0,Y(L.triggerHover,q,xe))},"open"),we=te();we===0?(V.clear(),Te()):V.start(we,Te)}},"handleNestedTriggerHover"),me=g.useState("triggerProps",E);return F("button",e,{state:{open:P},ref:[o,N,S],props:[Q,ne,E||W!=="none"?me:void 0,{onMouseOver(q){ue(q.nativeEvent)},onFocus(q){le(ja(q.nativeEvent))&&q.preventBaseUIHandler()},onMouseLeave(){A.current=!1,V.clear(),oe.current=void 0},onPointerEnter(q){oe.current=q.pointerType},onPointerDown(q){oe.current=q.pointerType,g.set("closeOnClick",u),u&&!g.select("open")&&g.cancelPendingOpen(q.nativeEvent)},onClick(q){u&&!g.select("open")&&g.cancelPendingOpen(q.nativeEvent)},id:b,[Fa.triggerDisabled]:H?"":void 0,[Ka]:H?void 0:""},f],stateAttributesMapping:Yt})},"TooltipTrigger"));var qa=R(M(),1);var tr=R(M(),1);var wr=tr.createContext(void 0);function Ua(){let t=tr.useContext(wr);if(t===void 0)throw new Error(G(70));return t}i(Ua,"useTooltipPortalContext");var or=R(M(),1),Za=R(Hr(),1);var Wa=R(se(),1);var $a=or.forwardRef(i(function(e,o){let{children:r,container:n,className:s,render:l,style:d,...p}=e,{portalNode:c,portalSubtree:u}=dn({container:n,ref:o,componentProps:e,elementProps:p});return!u&&!c?null:(0,Wa.jsxs)(or.Fragment,{children:[u,c&&Za.createPortal(r,c)]})},"FloatingPortalLite"));var Er=R(se(),1);var Ga=qa.forwardRef(i(function(e,o){let{keepMounted:r=!1,...n}=e;return be().useState("mounted")||r?(0,Er.jsx)(wr.Provider,{value:r,children:(0,Er.jsx)($a,{ref:o,...n})}):null},"TooltipPortal"));var nr=R(M(),1);var rr=R(M(),1);var kr=rr.createContext(void 0);function ro(){let t=rr.useContext(kr);if(t===void 0)throw new Error(G(71));return t}i(ro,"useTooltipPositionerContext");var Ya=R(se(),1);var Ja=nr.forwardRef(i(function(e,o){let{render:r,className:n,anchor:s,positionMethod:l="absolute",side:d="top",align:p="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:h="clipping-ancestors",collisionPadding:v=5,arrowPadding:f=5,sticky:m=!1,disableAnchorTracking:g=!1,collisionAvoidance:b=yo,style:x,...P}=e,y=be(),S=Ua(),C=y.useState("open"),w=y.useState("mounted"),N=y.useState("trackCursorAxis"),E=y.useState("disableHoverablePopup"),T=y.useState("floatingRootContext"),k=y.useState("instantType"),O=y.useState("transitionStatus"),B=y.useState("hasViewport"),D=_o({anchor:s,positionMethod:l,floatingRootContext:T,mounted:w,side:d,sideOffset:c,align:p,alignOffset:u,collisionBoundary:h,collisionPadding:v,sticky:m,arrowPadding:f,disableAnchorTracking:g,keepMounted:S,collisionAvoidance:b,adaptiveOrigin:B?Io:void 0}),j=nr.useMemo(()=>({open:C,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:N!=="none"?"tracking-cursor":k}),[C,D.side,D.align,D.anchorHidden,N,k]),H=Lo(e,j,{styles:D.positionerStyles,transitionStatus:O,props:P,refs:[o,y.useStateSetter("positionerElement")],hidden:!w,inert:!C||N==="both"||E});return(0,Ya.jsx)(kr.Provider,{value:D,children:H})},"TooltipPositioner"));var Qa=R(M(),1);var $s={...de,...ve},Xa=Qa.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,d=be(),{side:p,align:c}=ro(),u=d.useState("open"),h=d.useState("instantType"),v=d.useState("transitionStatus"),f=d.useState("popupProps"),m=d.useState("floatingRootContext"),g=d.useState("disabled"),b=d.useState("closeDelay");Ht({open:u,ref:d.context.popupRef,onComplete(){u&&d.context.onOpenChangeComplete?.(!0)}}),Eo(m,{enabled:!g,closeDelay:b});let x=d.useStateSetter("popupElement");return F("div",e,{state:{open:u,side:p,align:c,instant:h,transitionStatus:v},ref:[o,d.context.popupRef,x],props:[f,Vo(v),l],stateAttributesMapping:$s})},"TooltipPopup"));var es=R(M(),1);var ts=es.forwardRef(i(function(e,o){let{render:r,className:n,style:s,...l}=e,d=be(),{arrowRef:p,side:c,align:u,arrowUncentered:h,arrowStyles:v}=ro(),f=d.useState("open"),m=d.useState("instantType");return F("div",e,{state:{open:f,side:c,align:u,uncentered:h,instant:m},ref:[o,p],props:[{style:v,"aria-hidden":!0},l],stateAttributesMapping:de})},"TooltipArrow"));var Or=R(M(),1);var Mr=R(se(),1);var os=i(function(e){let{delay:o,closeDelay:r,timeout:n=400}=e,s=Or.useMemo(()=>({delay:o,closeDelay:r}),[o,r]),l=Or.useMemo(()=>({open:o,close:r}),[o,r]);return(0,Mr.jsx)(Tr.Provider,{value:s,children:(0,Mr.jsx)(sn,{delay:l,timeoutMs:n,children:e.children})})},"TooltipProvider");var ns=R(M(),1);var rs=(function(t){return t.popupWidth="--popup-width",t.popupHeight="--popup-height",t})({});var qs={activationDirection:i(t=>t?{"data-activation-direction":t}:null,"activationDirection")},as=ns.forwardRef(i(function(e,o){let{render:r,className:n,style:s,children:l,...d}=e,p=be(),c=ro(),u=p.useState("instantType"),{children:h,state:v}=Bo({store:p,side:c.side,cssVars:rs,children:l}),f={activationDirection:v.activationDirection,transitioning:v.transitioning,instant:u};return F("div",e,{state:f,ref:o,props:[d,{children:h}],stateAttributesMapping:qs})},"TooltipViewport"));var fo=class{static{i(this,"TooltipHandle")}constructor(){this.store=new oo}open(e){let o=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!o)throw new Error(G(81,e));this.store.setOpen(!0,Y(L.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Y(L.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function ss(){return new fo}i(ss,"createTooltipHandle");var is=R(dr(),1);var ls=R(se(),1);var Gs=i((t,e,o)=>t!==void 0?t:e===void 0&&o===void 0?Yr:Gr(e,o),"p"),cs=i(t=>{let e=(0,is.c)(7),{catalogs:o,children:r,i18n:n,locale:s}=t,l;e[0]!==o||e[1]!==n||e[2]!==s?(l=Gs(n,s,o),e[0]=o,e[1]=n,e[2]=s,e[3]=l):l=e[3];let d=l,p;return e[4]!==r||e[5]!==d?(p=(0,ls.jsx)(Jr,{value:d,children:r}),e[4]=r,e[5]=d,e[6]=p):p=e[6],p},"S");var Ir=R(dr(),1);var Fe=R(M(),1);var re=R(se(),1);var Dr="lunora:command-palette",ds=i(()=>{"window"in globalThis&&globalThis.dispatchEvent(new Event(Dr))},"re"),Ys=i(t=>{let e=(0,Ir.c)(18),{active:o,index:r,item:n,onActivate:s,onSelect:l}=t,d;e[0]!==n||e[1]!==l?(d=i(()=>{l(n)},"s"),e[0]=n,e[1]=l,e[2]=d):d=e[2];let p=d,c;e[3]!==r||e[4]!==s?(c=i(()=>{s(r)},"c"),e[3]=r,e[4]=s,e[5]=c):c=e[5];let u=c,h=o?"bg-accent text-accent-foreground":"text-foreground",v;e[6]!==h?(v=$("flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground",h),e[6]=h,e[7]=v):v=e[7];let f;e[8]!==n.label?(f=(0,re.jsx)("span",{children:n.label}),e[8]=n.label,e[9]=f):f=e[9];let m;e[10]!==n.group?(m=(0,re.jsx)("span",{className:"text-xs text-muted-foreground",children:n.group}),e[10]=n.group,e[11]=m):m=e[11];let g;return e[12]!==p||e[13]!==u||e[14]!==v||e[15]!==f||e[16]!==m?(g=(0,re.jsx)("li",{children:(0,re.jsxs)("button",{className:v,onClick:p,onMouseEnter:u,type:"button",children:[f,m]})}),e[12]=p,e[13]=u,e[14]=v,e[15]=f,e[16]=m,e[17]=g):g=e[17],g},"q"),Js=i((t,e)=>{let o=e.trim().toLowerCase();return o===""?t:t.filter(r=>r.label.toLowerCase().includes(o)||r.group.toLowerCase().includes(o))},"G"),ps=i(t=>{let e=(0,Ir.c)(39),{items:o}=t,r=ge(),n=no(),[s,l]=(0,Fe.useState)(!1),[d,p]=(0,Fe.useState)(""),[c,u]=(0,Fe.useState)(0),h=(0,Fe.useRef)(null),v,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=i(()=>{let _=i(V=>{(V.metaKey||V.ctrlKey)&&V.key.toLowerCase()==="k"&&(V.preventDefault(),l(!0))},"o"),A=i(()=>{l(!0)},"r");return globalThis.addEventListener("keydown",_),globalThis.addEventListener(Dr,A),()=>{globalThis.removeEventListener("keydown",_),globalThis.removeEventListener(Dr,A)}},"i"),f=[],e[0]=v,e[1]=f):(v=e[0],f=e[1]),(0,Fe.useEffect)(v,f);let m;e[2]!==o||e[3]!==d?(m=Js(o,d),e[2]=o,e[3]=d,e[4]=m):m=e[4];let g=m,b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=i(_=>{l(_),_||(p(""),u(0))},"T"),e[5]=b):b=e[5];let x=b,P;e[6]!==n?(P=i(_=>{x(!1),Jt(n({to:_.to}))},"D"),e[6]=n,e[7]=P):P=e[7];let y=P,S;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=i(_=>{p(_.target.value),u(0)},"A"),e[8]=S):S=e[8];let C=S,w;e[9]!==c||e[10]!==g||e[11]!==y?(w=i(_=>{e:switch(_.key){case"ArrowDown":{_.preventDefault(),u(A=>g.length===0?0:(A+1)%g.length);break e}case"ArrowUp":{_.preventDefault(),u(A=>g.length===0?0:(A-1+g.length)%g.length);break e}case"Enter":{_.preventDefault();let A=g[c];A!==void 0&&y(A);break e}}},"j"),e[9]=c,e[10]=g,e[11]=y,e[12]=w):w=e[12];let N=w,E;e[13]===Symbol.for("react.memo_cache_sentinel")?(E=(0,re.jsx)(pe.Backdrop,{className:"fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"}),e[13]=E):E=e[13];let T;e[14]!==r?(T=r("Command palette"),e[14]=r,e[15]=T):T=e[15];let k;e[16]!==T?(k=(0,re.jsx)(pe.Title,{className:"sr-only",children:T}),e[16]=T,e[17]=k):k=e[17];let O;e[18]===Symbol.for("react.memo_cache_sentinel")?(O=(0,re.jsxs)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,re.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,re.jsx)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[18]=O):O=e[18];let B;e[19]!==r?(B=r("Search\u2026"),e[19]=r,e[20]=B):B=e[20];let D;e[21]!==N||e[22]!==d||e[23]!==B?(D=(0,re.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[O,(0,re.jsx)("input",{className:"h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground","data-testid":"dash-command-input",onChange:C,onKeyDown:N,placeholder:B,ref:h,type:"text",value:d})]}),e[21]=N,e[22]=d,e[23]=B,e[24]=D):D=e[24];let j;e[25]!==c||e[26]!==g||e[27]!==y||e[28]!==r?(j=g.length===0?(0,re.jsx)("li",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:r("No results.")}):g.map((_,A)=>(0,re.jsx)(Ys,{active:A===c,index:A,item:_,onActivate:u,onSelect:y},_.to)),e[25]=c,e[26]=g,e[27]=y,e[28]=r,e[29]=j):j=e[29];let H;e[30]!==j?(H=(0,re.jsx)("ul",{className:"max-h-80 overflow-y-auto p-1.5","data-testid":"dash-command-list",children:j}),e[30]=j,e[31]=H):H=e[31];let K;e[32]!==k||e[33]!==D||e[34]!==H?(K=(0,re.jsxs)(pe.Portal,{children:[E,(0,re.jsxs)(pe.Popup,{className:"fixed start-1/2 top-24 z-50 w-[36rem] max-w-[90vw] -translate-x-1/2 overflow-hidden rounded-lg border border-border bg-popover text-popover-foreground shadow-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95","data-testid":"dash-command-palette",initialFocus:h,children:[k,D,H]})]}),e[32]=k,e[33]=D,e[34]=H,e[35]=K):K=e[35];let W;return e[36]!==s||e[37]!==K?(W=(0,re.jsx)(pe.Root,{onOpenChange:x,open:s,children:K}),e[36]=s,e[37]=K,e[38]=W):W=e[38],W},"le");var vs="(prefers-color-scheme: dark)",bs=i(()=>{try{return globalThis.localStorage}catch{return}},"Vt"),Qs=i(t=>t==="system"||t==="light"||t==="dark","wa"),xs=i(()=>globalThis.matchMedia,"Zt"),ys="lunora-studio-theme",_r=["system","light","dark"],Xs=i((t="system")=>{try{let e=bs()?.getItem(ys);return Qs(e)?e:t}catch{return t}},"Na"),us=i(t=>{let e=bs();if(e!==void 0)try{e.setItem(ys,t)}catch{}},"St"),ei=i(()=>{try{return xs()?.(vs).matches?"dark":"light"}catch{return"light"}},"Sa"),ti=i((t,e)=>t==="system"?e:t,"Ma"),oi=i(t=>{let e;try{e=xs()?.(vs)}catch{e=void 0}if(e===void 0)return()=>{};let o=i(r=>{t(r.matches?"dark":"light")},"a");return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}},"Ca"),Lr=(0,z.createContext)(null),ri=i(({children:t,defaultTheme:e="system"})=>{let[o,r]=(0,z.useState)(()=>Xs(e)),[n,s]=(0,z.useState)(()=>ei());(0,z.useEffect)(()=>oi(s),[]);let l=i(p=>{us(p),r(p)},"i"),d={cycleTheme:i(()=>{r(p=>{let c=_r[(_r.indexOf(p)+1)%_r.length]??p;return us(c),c})},"cycleTheme"),resolvedTheme:ti(o,n),setTheme:l,systemTheme:n,theme:o};return(0,a.jsx)(Lr,{value:d,children:t})},"_a"),ni=i(t=>{let e=(0,I.c)(3),{children:o}=t,r=(0,z.use)(Lr),n;return e[0]!==o||e[1]!==r?(n=r===null?(0,a.jsx)(ri,{children:o}):o,e[0]=o,e[1]=r,e[2]=n):n=e[2],n},"La"),ai=i(()=>{let t=(0,z.use)(Lr);if(t===null)throw new cr("INTERNAL","useTheme must be used within a <ThemeProvider>");return t},"Pa");function Vg({delay:t=0,...e}){return(0,a.jsx)(Se.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}i(Vg,"dn");function si(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Se.Root,{"data-slot":"tooltip",...o}),e[2]=o,e[3]=r):r=e[3],r}i(si,"$a");function ii(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Se.Trigger,{"data-slot":"tooltip-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}i(ii,"Aa");function li({className:t,side:e="top",sideOffset:o=4,align:r="center",alignOffset:n=0,children:s,...l}){return(0,a.jsx)(Se.Portal,{children:(0,a.jsx)(Se.Positioner,{align:r,alignOffset:n,side:e,sideOffset:o,className:"isolate z-50",children:(0,a.jsxs)(Se.Popup,{"data-slot":"tooltip-content",className:$("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...l,children:[s,(0,a.jsx)(Se.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-md bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}i(li,"Ta");var ci=i(t=>{let e=(0,I.c)(5),{className:o}=t,r;e[0]!==o?(r=$("h-full w-full text-foreground",o),e[0]=o,e[1]=r):r=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,a.jsx)("path",{d:"M 259.500 10.552 C 220.080 15.859, 182.424 32.566, 152.500 58.025 C 110.179 94.031, 85.380 137.183, 77.518 188.500 C 75.410 202.255, 74.569 225.677, 75.796 236.466 C 76.757 244.917, 76.683 245.692, 74.518 249.966 C 63.118 272.466, 53.141 303.876, 51.382 322.799 L 50.718 329.943 71.960 320.471 C 83.643 315.262, 93.326 311, 93.478 311 C 93.630 311, 96.547 316.063, 99.959 322.250 C 103.371 328.438, 107.249 334.850, 108.577 336.500 L 110.990 339.500 110.981 336 C 110.977 334.075, 111.499 324.991, 112.143 315.813 L 113.312 299.127 121.406 293.336 C 132.495 285.403, 149.593 271.554, 161 261.268 C 171.556 251.748, 189.116 235, 188.540 235 C 188.337 235, 183.069 238.648, 176.835 243.106 C 142.318 267.789, 68.537 314, 63.646 314 C 61.843 314, 72.791 281.179, 80.905 262.259 C 92.233 235.845, 107.473 212.389, 132.106 183.453 L 138.451 176 148.268 176 C 176.192 176, 197.512 187.154, 212.868 209.797 C 216.470 215.108, 217.035 216.595, 216.477 219.297 C 211.386 243.968, 202.359 274.496, 193.797 296 C 183.898 320.861, 167.147 352.101, 152.395 373.215 L 147.004 380.930 152.891 385.830 C 161.400 392.911, 165.563 396, 166.594 395.998 C 167.092 395.998, 168.772 391.641, 170.327 386.317 C 176.279 365.934, 188.422 338.749, 200.942 317.778 C 223.060 280.731, 256.432 244.369, 294.500 215.836 C 309.956 204.252, 313.937 201.603, 314.719 202.385 C 315.116 202.783, 315.449 213.096, 315.460 225.304 C 315.474 241.855, 315.021 250.405, 313.680 258.924 C 307.009 301.272, 291.175 336.677, 263.112 372 C 255.259 381.883, 227.182 410.673, 218.516 417.727 L 213.532 421.783 223.439 424.880 C 281.705 443.093, 349.165 436.018, 398.616 406.508 C 446.728 377.797, 483.322 331.466, 497.366 281.481 C 503.381 260.075, 504.480 250.741, 504.491 221 C 504.501 191.997, 503.598 184.047, 497.987 163.732 C 484.768 115.871, 452.505 72.708, 407.718 42.964 C 381.051 25.254, 352.818 14.828, 319.695 10.460 C 305.932 8.645, 273.298 8.695, 259.500 10.552",fillRule:"evenodd"}),e[2]=n):n=e[2];let s;return e[3]!==r?(s=(0,a.jsx)("svg",{"aria-hidden":"true",className:r,fill:"currentColor",viewBox:"0 0 543 446",children:n}),e[3]=r,e[4]=s):s=e[4],s},"za"),Ps="lunora.studio.rulesBannerDismissed",di=i(()=>{try{return globalThis.localStorage.getItem(Ps)==="1"}catch{return!1}},"Ea"),pi=i(()=>{try{globalThis.localStorage.setItem(Ps,"1")}catch{}},"Ra"),ui=i(()=>{let t=(0,I.c)(18),e=ge(),[o,r]=(0,z.useState)(mi),n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=i(()=>{r(!0),pi()},"n"),t[0]=n):n=t[0];let s=n;if(o)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"}),t[1]=l):l=t[1];let d;t[2]!==e?(d=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=d):d=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"}),t[4]=p):p=t[4];let c;t[5]!==e?(c=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=c):c=t[6];let u;t[7]!==d||t[8]!==c?(u=(0,a.jsxs)("span",{children:[d," ",p," ",c]}),t[7]=d,t[8]=c,t[9]=u):u=t[9];let h;t[10]!==e?(h=e("Dismiss"),t[10]=e,t[11]=h):h=t[11];let v;t[12]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})}),t[12]=v):v=t[12];let f;t[13]!==h?(f=(0,a.jsx)("button",{"aria-label":h,className:"ms-auto flex size-5 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":"dash-app-rules-banner-dismiss",onClick:s,type:"button",children:v}),t[13]=h,t[14]=f):f=t[14];let m;return t[15]!==u||t[16]!==f?(m=(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[l,u,f]}),t[15]=u,t[16]=f,t[17]=m):m=t[17],m},"Ia");function mi(){return di()}i(mi,"Ha");function Cs(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Be.Root,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}i(Cs,"Bt");function Rs(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(Be.Trigger,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}i(Rs,"Dt");function Ss({align:t="end",alignOffset:e=0,className:o,keepMounted:r=!1,side:n="bottom",sideOffset:s=6,...l}){return(0,a.jsx)(Be.Portal,{keepMounted:r,children:(0,a.jsx)(Be.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:n,sideOffset:s,children:(0,a.jsx)(Be.Popup,{className:$("z-50 w-72 origin-(--transform-origin) rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o),"data-slot":"popover-content",...l})})})}i(Ss,"Wt");var Ar=768;function fi(){let t=(0,I.c)(2),[e,o]=(0,z.useState)(void 0),r,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=i(()=>{let s=globalThis.matchMedia(`(max-width: ${Ar-1}px)`),l=i(()=>{o(globalThis.innerWidth<Ar)},"i");return s.addEventListener("change",l),o(globalThis.innerWidth<Ar),()=>{s.removeEventListener("change",l)}},"r"),n=[],t[0]=r,t[1]=n):(r=t[0],n=t[1]),(0,z.useEffect)(r,n),!!e}i(fi,"Ka");function gi(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(pe.Root,{"data-slot":"sheet",...o}),e[2]=o,e[3]=r):r=e[3],r}i(gi,"Va");function hi(t){let e=(0,I.c)(4),o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=(0,a.jsx)(pe.Portal,{"data-slot":"sheet-portal",...o}),e[2]=o,e[3]=r):r=e[3],r}i(hi,"Za");function vi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("fixed inset-0 z-50 bg-black/10 text-xs/relaxed transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)(pe.Backdrop,{"data-slot":"sheet-overlay",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(vi,"Oa");function bi({className:t,children:e,side:o="right",showCloseButton:r=!0,...n}){return(0,a.jsxs)(hi,{children:[(0,a.jsx)(vi,{}),(0,a.jsxs)(pe.Popup,{"data-slot":"sheet-content","data-side":o,className:$("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...n,children:[e,r&&(0,a.jsxs)(pe.Close,{"data-slot":"sheet-close",render:(0,a.jsx)(hr,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[(0,a.jsx)(gr,{icon:kn,strokeWidth:2}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}i(bi,"qa");function xi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex flex-col gap-0.5 p-4",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sheet-header",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(xi,"Ba");function yi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("text-sm font-medium text-foreground",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)(pe.Title,{"data-slot":"sheet-title",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(yi,"Da");function Pi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("text-xs/relaxed text-muted-foreground",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)(pe.Description,{"data-slot":"sheet-description",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Pi,"Wa");var Ci="sidebar_state",Ri=3600*24*7,Si="16rem",Ni="18rem",Ti="3rem",wi="b",Ns=ye.createContext(null);function ar(){let t=ye.useContext(Ns);if(!t)throw new cr("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}i(ar,"ht");function Ei({defaultOpen:t=!0,open:e,onOpenChange:o,className:r,style:n,children:s,...l}){let d=fi(),[p,c]=ye.useState(!1),[u,h]=ye.useState(t),v=e??u,f=i(x=>{let P=typeof x=="function"?x(v):x;o?o(P):h(P),document.cookie=`${Ci}=${P}; path=/; max-age=${Ri}`},"h"),m=i(()=>d?c(x=>!x):f(x=>!x),"f"),g=ye.useEffectEvent(()=>{m()});ye.useEffect(()=>{let x=i(P=>{P.key===wi&&(P.metaKey||P.ctrlKey)&&(P.preventDefault(),g())},"m");return globalThis.addEventListener("keydown",x),()=>globalThis.removeEventListener("keydown",x)},[]);let b={state:v?"expanded":"collapsed",open:v,setOpen:f,isMobile:d,openMobile:p,setOpenMobile:c,toggleSidebar:m};return(0,a.jsx)(Ns.Provider,{value:b,children:(0,a.jsx)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Si,"--sidebar-width-icon":Ti,...n},className:$("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...l,children:s})})}i(Ei,"Ya");function ki({side:t="left",variant:e="sidebar",collapsible:o="offcanvas",className:r,children:n,dir:s,...l}){let{isMobile:d,state:p,openMobile:c,setOpenMobile:u}=ar();return o==="none"?(0,a.jsx)("div",{"data-slot":"sidebar",className:$("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...l,children:n}):d?(0,a.jsx)(gi,{open:c,onOpenChange:u,...l,children:(0,a.jsxs)(bi,{dir:s,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Ni},side:t,children:[(0,a.jsxs)(xi,{className:"sr-only",children:[(0,a.jsx)(yi,{children:"Sidebar"}),(0,a.jsx)(Pi,{children:"Displays the mobile sidebar."})]}),(0,a.jsx)("div",{className:"flex h-full w-full flex-col",children:n})]})}):(0,a.jsxs)("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":p==="collapsed"?o:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[(0,a.jsx)("div",{"data-slot":"sidebar-gap",className:$("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,a.jsx)("div",{"data-slot":"sidebar-container","data-side":t,className:$("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",r),...l,children:(0,a.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:n})})]})}i(ki,"Ga");function Oi(t){let e=(0,I.c)(15),o,r,n;e[0]!==t?({className:o,onClick:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n):(o=e[1],r=e[2],n=e[3]);let{toggleSidebar:s}=ar(),l;e[4]!==o?(l=$(o),e[4]=o,e[5]=l):l=e[5];let d;e[6]!==r||e[7]!==s?(d=i(h=>{r?.(h),s()},"l"),e[6]=r,e[7]=s,e[8]=d):d=e[8];let p,c;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(gr,{icon:On,strokeWidth:2,className:"rtl:rotate-180"}),c=(0,a.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=p,e[10]=c):(p=e[9],c=e[10]);let u;return e[11]!==n||e[12]!==l||e[13]!==d?(u=(0,a.jsxs)(hr,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:d,...n,children:[p,c]}),e[11]=n,e[12]=l,e[13]=d,e[14]=u):u=e[14],u}i(Oi,"er");function Mi(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("main",{"data-slot":"sidebar-inset",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Mi,"tr");function Di(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Di,"ar");function Ii(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex flex-col gap-2 p-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Ii,"rr");function _i(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto [scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_25%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/25 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5 hover:[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_50%,transparent)_transparent] hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(_i,"sr");function Ai(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("relative flex w-full min-w-0 flex-col p-2",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Ai,"nr");function Vi(t){let e=(0,I.c)(10),o,r,n,s;if(e[0]!==t){let{className:p,render:c,...u}=t;o=c,s=ur,r="div",n=Ee({className:$("flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",p)},u),e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s}else o=e[1],r=e[2],n=e[3],s=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let d;return e[6]!==o||e[7]!==r||e[8]!==n?(d={defaultTagName:r,props:n,render:o,state:l},e[6]=o,e[7]=r,e[8]=n,e[9]=d):d=e[9],s(d)}i(Vi,"or");function Li(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("w-full text-xs",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(Li,"ir");function ms(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("flex w-full min-w-0 flex-col gap-0",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(ms,"Mt");function fs(t){let e=(0,I.c)(8),o,r;e[0]!==t?({className:o,...r}=t,e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]);let n;e[3]!==o?(n=$("group/menu-item relative",o),e[3]=o,e[4]=n):n=e[4];let s;return e[5]!==r||e[6]!==n?(s=(0,a.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...r}),e[5]=r,e[6]=n,e[7]=s):s=e[7],s}i(fs,"Ct");var Hi=Qr("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none p-2 text-start text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ts({render:t,isActive:e=!1,variant:o="default",size:r="default",tooltip:n,className:s,...l}){let{isMobile:d,state:p}=ar(),c=ur({defaultTagName:"button",props:Ee({className:$(Hi({variant:o,size:r}),s)},l),render:n?(0,a.jsx)(ii,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:r,active:e}});return n?(typeof n=="string"&&(n={children:n}),(0,a.jsxs)(si,{children:[c,(0,a.jsx)(li,{side:"right",align:"center",hidden:p!=="collapsed"||d,...n})]})):c}i(Ts,"jt");var Bi=i(t=>t.replace("__lunora_admin__:",""),"dr"),Fi=i(()=>(0,z.useSyncExternalStore)(so.subscribe,so.getSnapshot,so.getSnapshot),"cr"),ji=i(t=>t==="error"?"destructive":t==="pending"?"secondary":"default","ur"),Ki=i(t=>{let e=(0,I.c)(56),{entry:o,focused:r}=t,n=ge(),s;e[0]!==r?(s=i(B=>{B!==null&&r&&B.scrollIntoView({block:"nearest"})},"o"),e[0]=r,e[1]=s):s=e[1];let l=s,d;e[2]!==o.functionPath||e[3]!==o.shardKey||e[4]!==o.summary?(d=i(()=>{Mn(`${o.functionPath} ${o.summary}${o.shardKey===""?"":` (shard ${o.shardKey})`}`)},"l"),e[2]=o.functionPath,e[3]=o.shardKey,e[4]=o.summary,e[5]=d):d=e[5];let p=d,c=r&&"bg-accent ring-1 ring-inset ring-primary/40",u;e[6]!==c?(u=$("border-b border-border/60 last:border-b-0",c),e[6]=c,e[7]=u):u=e[7];let h;e[8]!==o.status?(h=ji(o.status),e[8]=o.status,e[9]=h):h=e[9];let v=o.status==="pending"?"\u2026":o.status,f;e[10]!==h||e[11]!==v?(f=(0,a.jsx)(Lt,{className:"mt-px shrink-0",variant:h,children:v}),e[10]=h,e[11]=v,e[12]=f):f=e[12];let m;e[13]!==o.functionPath?(m=Bi(o.functionPath),e[13]=o.functionPath,e[14]=m):m=e[14];let g;e[15]!==m?(g=(0,a.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:m}),e[15]=m,e[16]=g):g=e[16];let b;e[17]!==o.kind||e[18]!==n?(b=o.kind==="subscription"&&(0,a.jsx)(Lt,{className:"shrink-0",variant:"outline",children:n("live")}),e[17]=o.kind,e[18]=n,e[19]=b):b=e[19];let x;e[20]!==o.summary?(x=o.summary!==""&&(0,a.jsx)("span",{className:"min-w-0 truncate text-muted-foreground",children:o.summary}),e[20]=o.summary,e[21]=x):x=e[21];let P;e[22]!==o.shardKey?(P=o.shardKey!==""&&(0,a.jsx)("span",{className:"font-mono",children:o.shardKey}),e[22]=o.shardKey,e[23]=P):P=e[23];let y;e[24]!==o.resultCount||e[25]!==n?(y=o.resultCount!==void 0&&(0,a.jsx)("span",{children:n("{count} rows",{count:o.resultCount})}),e[24]=o.resultCount,e[25]=n,e[26]=y):y=e[26];let S;e[27]!==o.pushes||e[28]!==n?(S=o.pushes!==void 0&&o.pushes>0&&(0,a.jsx)("span",{children:n("{count} pushes",{count:o.pushes})}),e[27]=o.pushes,e[28]=n,e[29]=S):S=e[29];let C;e[30]!==o.durationMs?(C=o.durationMs!==void 0&&(0,a.jsxs)("span",{children:[o.durationMs,"ms"]}),e[30]=o.durationMs,e[31]=C):C=e[31];let w;e[32]!==n?(w=n("Copy"),e[32]=n,e[33]=w):w=e[33];let N;e[34]!==p||e[35]!==w?(N=(0,a.jsx)("button",{"aria-label":w,className:"rounded px-1 outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-copy",onClick:p,type:"button",children:"\u29C9"}),e[34]=p,e[35]=w,e[36]=N):N=e[36];let E;e[37]!==P||e[38]!==y||e[39]!==S||e[40]!==C||e[41]!==N?(E=(0,a.jsxs)("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[P,y,S,C,N]}),e[37]=P,e[38]=y,e[39]=S,e[40]=C,e[41]=N,e[42]=E):E=e[42];let T;e[43]!==b||e[44]!==x||e[45]!==E||e[46]!==f||e[47]!==g?(T=(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[f,g,b,x,E]}),e[43]=b,e[44]=x,e[45]=E,e[46]=f,e[47]=g,e[48]=T):T=e[48];let k;e[49]!==o.error?(k=o.error!==void 0&&(0,a.jsx)("p",{className:"px-3 pb-1.5 font-mono text-[11px] text-destructive","data-testid":"oc-error",children:o.error}),e[49]=o.error,e[50]=k):k=e[50];let O;return e[51]!==l||e[52]!==T||e[53]!==k||e[54]!==u?(O=(0,a.jsxs)("li",{className:u,"data-testid":"oc-row",ref:l,children:[T,k]}),e[51]=l,e[52]=T,e[53]=k,e[54]=u,e[55]=O):O=e[55],O},"hr"),zi=i(t=>{let e=(0,I.c)(62),{focusSeq:o,onClose:r,onShownChange:n,shown:s}=t,l=ge(),d=Fi(),[p,c]=(0,z.useState)(""),u;if(e[0]!==d||e[1]!==o||e[2]!==p||e[3]!==r||e[4]!==n||e[5]!==s||e[6]!==l){let h=p.trim().toLowerCase(),v=d.filter(V=>(s==="errors"?V.status==="error":!0)&&(h===""||`${V.functionPath} ${V.summary} ${V.shardKey}`.toLowerCase().includes(h))).toReversed(),f;e[8]!==d?(f=d.filter(Ui),e[8]=d,e[9]=f):f=e[9];let m=f.length,g;e[10]!==l?(g=l("Operation console"),e[10]=l,e[11]=g):g=e[11];let b;e[12]!==l?(b=l("Operation console"),e[12]=l,e[13]=b):b=e[13];let x;e[14]!==b?(x=(0,a.jsx)("span",{className:"text-xs font-medium",children:b}),e[14]=b,e[15]=x):x=e[15];let P;e[16]!==d.length||e[17]!==l?(P=l("{count} calls",{count:d.length}),e[16]=d.length,e[17]=l,e[18]=P):P=e[18];let y;e[19]!==P?(y=(0,a.jsx)(Lt,{variant:"secondary",children:P}),e[19]=P,e[20]=y):y=e[20];let S;e[21]!==m||e[22]!==l?(S=m>0&&(0,a.jsx)(Lt,{variant:"destructive",children:l("{count} failed",{count:m})}),e[21]=m,e[22]=l,e[23]=S):S=e[23];let C=s==="errors",w=s==="errors"&&"bg-accent",N;e[24]!==w?(N=$("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",w),e[24]=w,e[25]=N):N=e[25];let E;e[26]!==n||e[27]!==s?(E=i(()=>{n(s==="errors"?"all":"errors")},"P"),e[26]=n,e[27]=s,e[28]=E):E=e[28];let T;e[29]!==l?(T=l("Errors"),e[29]=l,e[30]=T):T=e[30];let k;e[31]!==N||e[32]!==E||e[33]!==T||e[34]!==C?(k=(0,a.jsx)("button",{"aria-pressed":C,className:N,"data-testid":"oc-filter-errors",onClick:E,type:"button",children:T}),e[31]=N,e[32]=E,e[33]=T,e[34]=C,e[35]=k):k=e[35];let O;e[36]!==l?(O=l("Filter"),e[36]=l,e[37]=O):O=e[37];let B;e[38]===Symbol.for("react.memo_cache_sentinel")?(B=i(V=>{c(V.target.value)},"E"),e[38]=B):B=e[38];let D;e[39]!==l?(D=l("Filter"),e[39]=l,e[40]=D):D=e[40];let j;e[41]!==p||e[42]!==O||e[43]!==D?(j=(0,a.jsx)(mr,{"aria-label":O,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:B,placeholder:D,value:p}),e[41]=p,e[42]=O,e[43]=D,e[44]=j):j=e[44];let H;e[45]!==l?(H=l("Clear"),e[45]=l,e[46]=H):H=e[46];let K;e[47]!==H?(K=(0,a.jsx)("button",{className:"ms-auto rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-clear",onClick:Zi,type:"button",children:H}),e[47]=H,e[48]=K):K=e[48];let W;e[49]!==l?(W=l("Hide"),e[49]=l,e[50]=W):W=e[50];let _;e[51]!==r||e[52]!==W?(_=(0,a.jsx)("button",{"aria-label":W,className:"rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-close",onClick:r,type:"button",children:"\u2715"}),e[51]=r,e[52]=W,e[53]=_):_=e[53];let A;e[54]!==k||e[55]!==j||e[56]!==K||e[57]!==_||e[58]!==x||e[59]!==y||e[60]!==S?(A=(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[x,y,S,k,j,K,_]}),e[54]=k,e[55]=j,e[56]=K,e[57]=_,e[58]=x,e[59]=y,e[60]=S,e[61]=A):A=e[61],u=(0,a.jsxs)("section",{"aria-label":g,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[A,v.length===0?(0,a.jsx)("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:l("Every admin call this studio makes is recorded here.")}):(0,a.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"oc-rows",children:v.map(V=>(0,a.jsx)(Ki,{entry:V,focused:V.seq===o},V.seq))})]}),e[0]=d,e[1]=o,e[2]=p,e[3]=r,e[4]=n,e[5]=s,e[6]=l,e[7]=u}else u=e[7];return u},"mr");function Ui(t){return t.status==="error"}i(Ui,"pr");function Zi(){so.clear()}i(Zi,"fr");var Wi=i(()=>{let t=(0,I.c)(304),e=ge(),o;t[0]!==e?(o=e("Health score"),t[0]=e,t[1]=o):o=t[1];let r;t[2]!==e?(r=e("Agents"),t[2]=e,t[3]=r):r=t[3];let n;t[4]!==e?(n=e("Analytics"),t[4]=e,t[5]=n):n=t[5];let s;t[6]!==e?(s=e("API"),t[6]=e,t[7]=s):s=t[7];let l;t[8]!==e?(l=e("Audit"),t[8]=e,t[9]=l):l=t[9];let d;t[10]!==e?(d=e("Auth audit"),t[10]=e,t[11]=d):d=t[11];let p;t[12]!==e?(p=e("Configuration"),t[12]=e,t[13]=p):p=t[13];let c;t[14]!==e?(c=e("Sessions"),t[14]=e,t[15]=c):c=t[15];let u;t[16]!==e?(u=e("Containers"),t[16]=e,t[17]=u):u=t[17];let h;t[18]!==e?(h=e("Dashboards"),t[18]=e,t[19]=h):h=t[19];let v;t[20]!==e?(v=e("Data"),t[20]=e,t[21]=v):v=t[21];let f;t[22]!==e?(f=e("Deployment health"),t[22]=e,t[23]=f):f=t[23];let m;t[24]!==e?(m=e("Log drains"),t[24]=e,t[25]=m):m=t[25];let g;t[26]!==e?(g=e("Export / Import"),t[26]=e,t[27]=g):g=t[27];let b;t[28]!==e?(b=e("Fan-out"),t[28]=e,t[29]=b):b=t[29];let x;t[30]!==e?(x=e("Files"),t[30]=e,t[31]=x):x=t[31];let P;t[32]!==e?(P=e("Flags"),t[32]=e,t[33]=P):P=t[33];let y;t[34]!==e?(y=e("Functions"),t[34]=e,t[35]=y):y=t[35];let S;t[36]!==e?(S=e("Health"),t[36]=e,t[37]=S):S=t[37];let C;t[38]!==e?(C=e("Home"),t[38]=e,t[39]=C):C=t[39];let w;t[40]!==e?(w=e("Performance"),t[40]=e,t[41]=w):w=t[41];let N;t[42]!==e?(N=e("Issues"),t[42]=e,t[43]=N):N=t[43];let E;t[44]!==e?(E=e("KV"),t[44]=e,t[45]=E):E=t[45];let T;t[46]!==e?(T=e("Logs"),t[46]=e,t[47]=T):T=t[47];let k;t[48]!==e?(k=e("Metrics"),t[48]=e,t[49]=k):k=t[49];let O;t[50]!==e?(O=e("Migrations"),t[50]=e,t[51]=O):O=t[51];let B;t[52]!==e?(B=e("Notifications"),t[52]=e,t[53]=B):B=t[53];let D;t[54]!==e?(D=e("Organizations"),t[54]=e,t[55]=D):D=t[55];let j;t[56]!==e?(j=e("Time Travel"),t[56]=e,t[57]=j):j=t[57];let H;t[58]!==e?(H=e("Mail"),t[58]=e,t[59]=H):H=t[59];let K;t[60]!==e?(K=e("Payments"),t[60]=e,t[61]=K):K=t[61];let W;t[62]!==e?(W=e("Permissions"),t[62]=e,t[63]=W):W=t[63];let _;t[64]!==e?(_=e("Queues"),t[64]=e,t[65]=_):_=t[65];let A;t[66]!==e?(A=e("Realtime"),t[66]=e,t[67]=A):A=t[67];let V;t[68]!==e?(V=e("RLS Policies"),t[68]=e,t[69]=V):V=t[69];let oe;t[70]!==e?(oe=e("Scheduled"),t[70]=e,t[71]=oe):oe=t[71];let te;t[72]!==e?(te=e("Schema"),t[72]=e,t[73]=te):te=t[73];let le;t[74]!==e?(le=e("Security"),t[74]=e,t[75]=le):le=t[75];let J;t[76]!==e?(J=e("Settings"),t[76]=e,t[77]=J):J=t[77];let Q;t[78]!==e?(Q=e("SQL editor"),t[78]=e,t[79]=Q):Q=t[79];let ne;t[80]!==e?(ne=e("Traces"),t[80]=e,t[81]=ne):ne=t[81];let ue;t[82]!==e?(ue=e("Access Rules"),t[82]=e,t[83]=ue):ue=t[83];let me;t[84]!==e?(me=e("Users"),t[84]=e,t[85]=me):me=t[85];let he;t[86]!==e?(he=e("Vectors"),t[86]=e,t[87]=he):he=t[87];let ce;t[88]!==e?(ce=e("Workflows"),t[88]=e,t[89]=ce):ce=t[89];let Pe;t[90]!==o||t[91]!==r||t[92]!==v||t[93]!==f||t[94]!==m||t[95]!==g||t[96]!==b||t[97]!==x||t[98]!==P||t[99]!==y||t[100]!==S||t[101]!==C||t[102]!==n||t[103]!==w||t[104]!==N||t[105]!==E||t[106]!==T||t[107]!==k||t[108]!==O||t[109]!==B||t[110]!==D||t[111]!==j||t[112]!==H||t[113]!==s||t[114]!==K||t[115]!==W||t[116]!==_||t[117]!==A||t[118]!==V||t[119]!==oe||t[120]!==te||t[121]!==le||t[122]!==J||t[123]!==Q||t[124]!==l||t[125]!==ne||t[126]!==ue||t[127]!==me||t[128]!==he||t[129]!==ce||t[130]!==d||t[131]!==p||t[132]!==c||t[133]!==u||t[134]!==h?(Pe={advisorHealth:o,agents:r,analytics:n,api:s,audit:l,authAudit:d,authConfig:p,authSessions:c,containers:u,dashboards:h,data:v,deploymentHealth:f,drains:m,export:g,fanout:b,files:x,flags:P,functions:y,health:S,home:C,insights:w,issues:N,kv:E,logs:T,metrics:k,migrations:O,notifications:B,organizations:D,pitr:j,mail:H,payments:K,permissions:W,queues:_,realtime:A,rls:V,schedule:oe,schema:te,security:le,settings:J,sql:Q,traces:ne,storageRules:ue,users:me,vectors:he,workflows:ce},t[90]=o,t[91]=r,t[92]=v,t[93]=f,t[94]=m,t[95]=g,t[96]=b,t[97]=x,t[98]=P,t[99]=y,t[100]=S,t[101]=C,t[102]=n,t[103]=w,t[104]=N,t[105]=E,t[106]=T,t[107]=k,t[108]=O,t[109]=B,t[110]=D,t[111]=j,t[112]=H,t[113]=s,t[114]=K,t[115]=W,t[116]=_,t[117]=A,t[118]=V,t[119]=oe,t[120]=te,t[121]=le,t[122]=J,t[123]=Q,t[124]=l,t[125]=ne,t[126]=ue,t[127]=me,t[128]=he,t[129]=ce,t[130]=d,t[131]=p,t[132]=c,t[133]=u,t[134]=h,t[135]=Pe):Pe=t[135];let q=Pe,ee;t[136]!==e?(ee=e("Advisors"),t[136]=e,t[137]=ee):ee=t[137];let ae;t[138]!==e?(ae=e("Auth"),t[138]=e,t[139]=ae):ae=t[139];let Ne;t[140]!==e?(Ne=e("Database"),t[140]=e,t[141]=Ne):Ne=t[141];let xe;t[142]!==e?(xe=e("Functions"),t[142]=e,t[143]=xe):xe=t[143];let De;t[144]!==e?(De=e("Observability"),t[144]=e,t[145]=De):De=t[145];let Te;t[146]!==e?(Te=e("Operations"),t[146]=e,t[147]=Te):Te=t[147];let we;t[148]!==e?(we=e("Overview"),t[148]=e,t[149]=we):we=t[149];let Ue;t[150]!==e?(Ue=e("Settings"),t[150]=e,t[151]=Ue):Ue=t[151];let Ze;t[152]!==e?(Ze=e("Storage"),t[152]=e,t[153]=Ze):Ze=t[153];let go;t[154]!==ee||t[155]!==ae||t[156]!==Ne||t[157]!==xe||t[158]!==De||t[159]!==Te||t[160]!==we||t[161]!==Ue||t[162]!==Ze?(go={advisors:ee,auth:ae,database:Ne,functions:xe,observability:De,operations:Te,overview:we,settings:Ue,storage:Ze},t[154]=ee,t[155]=ae,t[156]=Ne,t[157]=xe,t[158]=De,t[159]=Te,t[160]=we,t[161]=Ue,t[162]=Ze,t[163]=go):go=t[163];let sr=go,We;t[164]!==e?(We=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[164]=e,t[165]=We):We=t[165];let $e;t[166]!==e?($e=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[166]=e,t[167]=$e):$e=t[167];let qe;t[168]!==e?(qe=e("Usage and latency from Analytics Engine \u2014 request volume, p50/p95, and hot shards."),t[168]=e,t[169]=qe):qe=t[169];let Ge;t[170]!==e?(Ge=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[170]=e,t[171]=Ge):Ge=t[171];let Ye;t[172]!==e?(Ye=e("A durable log of admin state-changing operations."),t[172]=e,t[173]=Ye):Ye=t[173];let Je;t[174]!==e?(Je=e("Authentication and security events \u2014 sign-ins, MFA, and session changes."),t[174]=e,t[175]=Je):Je=t[175];let Qe;t[176]!==e?(Qe=e("Enabled plugins and session config (read-only)."),t[176]=e,t[177]=Qe):Qe=t[177];let Xe;t[178]!==e?(Xe=e("Browse and revoke active sessions across all users."),t[178]=e,t[179]=Xe):Xe=t[179];let et;t[180]!==e?(et=e("Live Cloudflare Containers \u2014 current lifecycle state per instance from the log stream."),t[180]=e,t[181]=et):et=t[181];let tt;t[182]!==e?(tt=e("Chart widgets backed by saved read-only SQL queries."),t[182]=e,t[183]=tt):tt=t[183];let ot;t[184]!==e?(ot=e("Browse and edit rows across your shard and global tables."),t[184]=e,t[185]=ot):ot=t[185];let rt;t[186]!==e?(rt=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[186]=e,t[187]=rt):rt=t[187];let nt;t[188]!==e?(nt=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[188]=e,t[189]=nt):nt=t[189];let at;t[190]!==e?(at=e("Export a shard to NDJSON, or import rows from it."),t[190]=e,t[191]=at):at=t[191];let st;t[192]!==e?(st=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[192]=e,t[193]=st):st=t[193];let it;t[194]!==e?(it=e("Browse objects in your R2 storage buckets."),t[194]=e,t[195]=it):it=t[195];let lt;t[196]!==e?(lt=e("Inspect feature flags and their live evaluation under a targeting context."),t[196]=e,t[197]=lt):lt=t[197];let ct;t[198]!==e?(ct=e("Run registered queries, mutations, and actions."),t[198]=e,t[199]=ct):ct=t[199];let dt;t[200]!==e?(dt=e("At-a-glance connection, error, and shard signals."),t[200]=e,t[201]=dt):dt=t[201];let pt;t[202]!==e?(pt=e("Connection, health, and advisor summary for your deployment."),t[202]=e,t[203]=pt):pt=t[203];let ut;t[204]!==e?(ut=e("Surface slow functions, error spikes, and cache problems."),t[204]=e,t[205]=ut):ut=t[205];let mt;t[206]!==e?(mt=e("Grouped error triage \u2014 Worker throws and container crashes folded by fingerprint."),t[206]=e,t[207]=mt):mt=t[207];let ft;t[208]!==e?(ft=e("A live stream of recent function logs."),t[208]=e,t[209]=ft):ft=t[209];let gt;t[210]!==e?(gt=e("Per-shard health and aggregate metrics."),t[210]=e,t[211]=gt):gt=t[211];let ht;t[212]!==e?(ht=e("Review migration status and run them."),t[212]=e,t[213]=ht):ht=t[213];let vt;t[214]!==e?(vt=e("Registered push devices \u2014 endpoint, kind, last-send status, and delivery errors."),t[214]=e,t[215]=vt):vt=t[215];let bt;t[216]!==e?(bt=e("Browse and manage organizations, members, and invitations."),t[216]=e,t[217]=bt):bt=t[217];let xt;t[218]!==e?(xt=e("Restore a shard to a point in the last 30 days."),t[218]=e,t[219]=xt):xt=t[219];let yt;t[220]!==e?(yt=e("Email your app sent, captured in dev."),t[220]=e,t[221]=yt):yt=t[221];let Pt;t[222]!==e?(Pt=e("Synced customers, subscriptions, and webhook events."),t[222]=e,t[223]=Pt):Pt=t[223];let Ct;t[224]!==e?(Ct=e("Inspect access policies per table, and probe a function as any identity."),t[224]=e,t[225]=Ct):Ct=t[225];let Rt;t[226]!==e?(Rt=e("Inspect declared Cloudflare Queues \u2014 their producer bindings, consumer mode, and dead-letter queue."),t[226]=e,t[227]=Rt):Rt=t[227];let St;t[228]!==e?(St=e("Active WebSocket subscriptions on this shard."),t[228]=e,t[229]=St):St=t[229];let Nt;t[230]!==e?(Nt=e("Inspect row-level-security policies and roles, per table."),t[230]=e,t[231]=Nt):Nt=t[231];let Tt;t[232]!==e?(Tt=e("Inspect and cancel scheduled jobs."),t[232]=e,t[233]=Tt):Tt=t[233];let wt;t[234]!==e?(wt=e("Inspect each table and its columns."),t[234]=e,t[235]=wt):wt=t[235];let Et;t[236]!==e?(Et=e("Review admin gates, credentials, and log redaction."),t[236]=e,t[237]=Et):Et=t[237];let kt;t[238]!==e?(kt=e("Read-only deployment config \u2014 vars, secrets, and bindings."),t[238]=e,t[239]=kt):kt=t[239];let Ot;t[240]!==e?(Ot=e("Run read-only SQL against a shard."),t[240]=e,t[241]=Ot):Ot=t[241];let Mt;t[242]!==e?(Mt=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[242]=e,t[243]=Mt):Mt=t[243];let Dt;t[244]!==e?(Dt=e("Inspect storage access rules \u2014 per bucket, operation, and key prefix."),t[244]=e,t[245]=Dt):Dt=t[245];let It;t[246]!==e?(It=e("Recent ctx.trace waterfalls for this shard \u2014 the drill-down from a log line."),t[246]=e,t[247]=It):It=t[247];let _t;t[248]!==e?(_t=e("Manage auth users \u2014 roles, bans, sessions, and identity."),t[248]=e,t[249]=_t):_t=t[249];let At;t[250]!==e?(At=e("Browse Vectorize indexes and run similarity searches."),t[250]=e,t[251]=At):At=t[251];let Vt;t[252]!==e?(Vt=e("Inspect declared Cloudflare Workflows and their bindings."),t[252]=e,t[253]=Vt):Vt=t[253];let ho;t[254]!==Vt||t[255]!==We||t[256]!==$e||t[257]!==qe||t[258]!==Ge||t[259]!==Ye||t[260]!==Je||t[261]!==Qe||t[262]!==Xe||t[263]!==et||t[264]!==tt||t[265]!==ot||t[266]!==rt||t[267]!==nt||t[268]!==at||t[269]!==st||t[270]!==it||t[271]!==lt||t[272]!==ct||t[273]!==dt||t[274]!==pt||t[275]!==ut||t[276]!==mt||t[277]!==ft||t[278]!==gt||t[279]!==ht||t[280]!==vt||t[281]!==bt||t[282]!==xt||t[283]!==yt||t[284]!==Pt||t[285]!==Ct||t[286]!==Rt||t[287]!==St||t[288]!==Nt||t[289]!==Tt||t[290]!==wt||t[291]!==Et||t[292]!==kt||t[293]!==Ot||t[294]!==Mt||t[295]!==Dt||t[296]!==It||t[297]!==_t||t[298]!==At?(ho={advisorHealth:We,agents:$e,analytics:qe,api:Ge,audit:Ye,authAudit:Je,authConfig:Qe,authSessions:Xe,containers:et,dashboards:tt,data:ot,deploymentHealth:rt,drains:nt,export:at,fanout:st,files:it,flags:lt,functions:ct,health:dt,home:pt,insights:ut,issues:mt,logs:ft,metrics:gt,migrations:ht,notifications:vt,organizations:bt,pitr:xt,mail:yt,payments:Pt,permissions:Ct,queues:Rt,realtime:St,rls:Nt,schedule:Tt,schema:wt,security:Et,settings:kt,sql:Ot,kv:Mt,storageRules:Dt,traces:It,users:_t,vectors:At,workflows:Vt},t[254]=Vt,t[255]=We,t[256]=$e,t[257]=qe,t[258]=Ge,t[259]=Ye,t[260]=Je,t[261]=Qe,t[262]=Xe,t[263]=et,t[264]=tt,t[265]=ot,t[266]=rt,t[267]=nt,t[268]=at,t[269]=st,t[270]=it,t[271]=lt,t[272]=ct,t[273]=dt,t[274]=pt,t[275]=ut,t[276]=mt,t[277]=ft,t[278]=gt,t[279]=ht,t[280]=vt,t[281]=bt,t[282]=xt,t[283]=yt,t[284]=Pt,t[285]=Ct,t[286]=Rt,t[287]=St,t[288]=Nt,t[289]=Tt,t[290]=wt,t[291]=Et,t[292]=kt,t[293]=Ot,t[294]=Mt,t[295]=Dt,t[296]=It,t[297]=_t,t[298]=At,t[299]=ho):ho=t[299];let ir=ho,vo;return t[300]!==sr||t[301]!==ir||t[302]!==q?(vo={groupLabel:sr,tabDescription:ir,tabLabel:q},t[300]=sr,t[301]=ir,t[302]=q,t[303]=vo):vo=t[303],vo},"gr"),$i=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,a.jsx)("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"}),(0,a.jsx)("path",{d:"M8 21h8M12 17v4"})]}),t[0]=e):e=t[0],e},"br"),qi=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,a.jsx)("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),t[0]=e):e=t[0],e},"vr"),Gi=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"})}),t[0]=e):e=t[0],e},"yr"),Yi=[{Icon:$i,value:"system"},{Icon:qi,value:"light"},{Icon:Gi,value:"dark"}],Ji=i(()=>{let t=(0,I.c)(19),{theme:e,setTheme:o}=ai(),r=ge(),n;t[0]!==r?(n=r("Dark theme"),t[0]=r,t[1]=n):n=t[1];let s;t[2]!==r?(s=r("Light theme"),t[2]=r,t[3]=s):s=t[3];let l;t[4]!==r?(l=r("System theme"),t[4]=r,t[5]=l):l=t[5];let d;t[6]!==n||t[7]!==s||t[8]!==l?(d={dark:n,light:s,system:l},t[6]=n,t[7]=s,t[8]=l,t[9]=d):d=t[9];let p=d,c;t[10]!==r?(c=r("Theme"),t[10]=r,t[11]=c):c=t[11];let u;t[12]!==p||t[13]!==o||t[14]!==e?(u=Yi.map(v=>{let{Icon:f,value:m}=v,g=e===m;return(0,a.jsxs)("button",{"aria-checked":g,"aria-label":p[m],className:$("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",g?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${m}`,onClick:i(()=>{o(m)},"onClick"),role:"radio",title:p[m],type:"button",children:[g&&(0,a.jsx)(Dn.span,{className:"absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",layoutId:"studio-theme-active",transition:{bounce:.1,duration:.45,type:"spring"}}),(0,a.jsx)("span",{className:"relative",children:(0,a.jsx)(f,{})})]},m)}),t[12]=p,t[13]=o,t[14]=e,t[15]=u):u=t[15];let h;return t[16]!==c||t[17]!==u?(h=(0,a.jsx)("div",{"aria-label":c,className:"inline-flex items-center gap-0.5 overflow-hidden rounded-md border border-border bg-muted/60 p-0.5","data-testid":"dash-app-theme",role:"radiogroup",children:u}),t[16]=c,t[17]=u,t[18]=h):h=t[18],h},"kr"),Qi=i(t=>{let e=(0,I.c)(23),{domain:o,onOpenCommandPalette:r,page:n}=t,s=ge(),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(Oi,{className:"-ms-1"}),e[0]=l):l=e[0];let d;e[1]!==s?(d=s("Breadcrumb"),e[1]=s,e[2]=d):d=e[2];let p;e[3]!==o?(p=(0,a.jsx)("span",{className:"text-muted-foreground",children:o}),e[3]=o,e[4]=p):p=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-3.5 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),e[5]=c):c=e[5];let u;e[6]!==n?(u=(0,a.jsx)("span",{className:"font-medium text-foreground",children:n}),e[6]=n,e[7]=u):u=e[7];let h;e[8]!==d||e[9]!==p||e[10]!==u?(h=(0,a.jsxs)("nav",{"aria-label":d,className:"flex items-center gap-1.5 text-[13px]",children:[p,c,u]}),e[8]=d,e[9]=p,e[10]=u,e[11]=h):h=e[11];let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsxs)("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,a.jsx)("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[12]=v):v=e[12];let f;e[13]!==s?(f=s("Search\u2026"),e[13]=s,e[14]=f):f=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"\u2318K"}),e[15]=m):m=e[15];let g;e[16]!==r||e[17]!==f?(g=(0,a.jsxs)("button",{className:"mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex","data-testid":"dash-app-search",onClick:r,type:"button",children:[v,f,m]}),e[16]=r,e[17]=f,e[18]=g):g=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsx)("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:(0,a.jsx)(Ji,{})}),e[19]=b):b=e[19];let x;return e[20]!==g||e[21]!==h?(x=(0,a.jsxs)("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[l,h,g,b]}),e[20]=g,e[21]=h,e[22]=x):x=e[22],x},"wr"),Xi=i(t=>{let e=(0,I.c)(3),o,r;e[0]!==t?(o=i(()=>{if(t===void 0)return;let n=i(s=>{if(!s.ctrlKey||s.metaKey||s.altKey||s.shiftKey||s.repeat||s.key!=="`")return;let{target:l}=s;l instanceof HTMLElement&&(l.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(l.tagName))||(s.preventDefault(),t())},"n");return globalThis.addEventListener("keydown",n),()=>{globalThis.removeEventListener("keydown",n)}},"a"),r=[t],e[0]=t,e[1]=o,e[2]=r):(o=e[1],r=e[2]),(0,z.useEffect)(o,r)},"Nr"),U=i((t,e)=>(0,z.lazy)(()=>t().then(o=>({default:o[e]}))),"C"),el=U(()=>import("./chunk-7L7FXGJU.js"),"InsightsPanel"),tl=(0,z.lazy)(()=>import("./chunk-CGLS2ILT.js")),ol=(0,z.lazy)(()=>import("./chunk-KXSSTTEY.js")),rl=(0,z.lazy)(()=>import("./chunk-KSRP7GZV.js")),nl=U(()=>import("./chunk-GWQIPIYA.js"),"AgentsPanel"),al=U(()=>import("./chunk-WQVVA5NB.js"),"AnalyticsPanel"),sl=(0,z.lazy)(()=>import("./chunk-VCXH5V3Z.js")),il=U(()=>import("./chunk-KAPSM6AI.js"),"AuthAuditPanel"),ll=U(()=>import("./chunk-T242WITF.js"),"AuthConfigPanel"),cl=U(()=>import("./chunk-UDVB4URN.js"),"AuthSessionsPanel"),dl=U(()=>import("./chunk-OE465DVY.js"),"OrganizationsPanel"),pl=U(()=>import("./chunk-Q7QTRX2E.js"),"UsersPanel"),ul=U(()=>import("./chunk-CU6SCYQ7.js"),"ContainersPanel"),ml=U(()=>import("./chunk-WJGOI3FZ.js"),"DeploymentHealthPanel"),fl=U(()=>import("./chunk-DGBJE7YF.js"),"TableEditor"),gl=U(()=>import("./chunk-7YKWP4QK.js"),"ExportImportPanel"),hl=U(()=>import("./chunk-GB6LP6UJ.js"),"MigrationsRoutePanel"),vl={data:An,migrations:Vn},bl=U(()=>import("./chunk-B2H5DK55.js"),"PitrPanel"),xl=U(()=>import("./chunk-ZK3XKFCI.js"),"FlagsPanel"),yl=U(()=>import("./chunk-WDG4WFUV.js"),"FunctionRunner"),Pl=U(()=>import("./chunk-A3KUNMU6.js"),"FunctionStatsPanel"),Cl=U(()=>import("./chunk-TBRZQICB.js"),"IssuesPanel"),Rl=U(()=>import("./chunk-WZ3B3MEV.js"),"AuditPanel"),Sl=U(()=>import("./chunk-S4ILMYP5.js"),"LogDrainsPanel"),Nl=(0,z.lazy)(()=>import("./chunk-NRCXRCJX.js").then(t=>({default:t.LogsPanel}))),Tl=U(()=>import("./chunk-LLF5KWDZ.js"),"MailPanel"),wl=U(()=>import("./chunk-GM67EQJU.js"),"SchedulePanel"),El=(0,z.lazy)(()=>import("./chunk-Y7A5NCXT.js")),kl=(0,z.lazy)(()=>import("./chunk-SDQBPFLO.js")),Ol=U(()=>import("./chunk-ZI5ZVNIN.js"),"KvBrowser"),Ml=U(()=>import("./chunk-5SQRE3VR.js"),"NotificationsPanel"),Dl=U(()=>import("./chunk-6QP5N57V.js"),"PaymentsPanel"),Il=U(()=>import("./chunk-GWHM4C4N.js"),"PermissionsPanel"),_l=(0,z.lazy)(()=>import("./chunk-C7EOC2WS.js")),Al=(0,z.lazy)(()=>import("./chunk-74DN6HIE.js")),Vl=(0,z.lazy)(()=>import("./chunk-ZHBIKP5G.js")),Ll=U(()=>import("./chunk-SV52HB7D.js"),"HealthPanel"),Hl=U(()=>import("./chunk-VC5SSRUP.js"),"MetricsPanel"),Bl=U(()=>import("./chunk-GN567L2T.js"),"SchemaViewer"),Fl=U(()=>import("./chunk-UETNCBWU.js"),"SettingsPanel"),jl=U(()=>import("./chunk-HOR3JLUY.js"),"SqlEditorPanel"),Kl=U(()=>import("./chunk-VTLYN3CX.js"),"FileBrowser"),zl=U(()=>import("./chunk-7ZUQE3KU.js"),"StorageRulesPanel"),Ul=U(()=>import("./chunk-PXYWCZ7T.js"),"TracesPanel"),Zl=U(()=>import("./chunk-TQXZ7LG4.js"),"VectorBrowser"),Wl=(0,z.lazy)(()=>import("./chunk-BDJCCVB6.js")),ws=(0,z.createContext)(null),$l={analytics:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),api:(0,a.jsx)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"}),audit:(0,a.jsx)("path",{d:"M7 4h7l4 4v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm6 0v5h5M9 13h6M9 16h6M9 10h2"}),authAudit:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8h6m-6 3h6"}),authConfig:(0,a.jsx)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6h-3.6l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"}),agents:(0,a.jsx)("path",{d:"M12 8V5m0 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM6 8h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2Zm3 5h.01M15 13h.01M9 21h6"}),authSessions:(0,a.jsx)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),containers:(0,a.jsx)("path",{d:"M3 7.5 12 3l9 4.5v9L12 21l-9-4.5v-9Zm0 0 9 4.5m0 0 9-4.5m-9 4.5V21"}),dashboards:(0,a.jsx)("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"}),deploymentHealth:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2 3 4-5"}),drains:(0,a.jsx)("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"}),data:(0,a.jsx)("path",{d:"M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6Zm0 0v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5"}),export:(0,a.jsx)("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"}),fanout:(0,a.jsx)("path",{d:"M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm-7 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm14 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 7v3.5M12 10.5 6 17m6-6.5 6 6.5"}),files:(0,a.jsx)("path",{d:"M4 7a2 2 0 0 1 2-2h3l2 2.5h7a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Z"}),flags:(0,a.jsx)("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"}),functions:(0,a.jsx)("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"}),health:(0,a.jsx)("path",{d:"M3 12h4l2 6 4-14 2 8h6"}),home:(0,a.jsx)("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"}),insights:(0,a.jsx)("path",{d:"M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"}),issues:(0,a.jsx)("path",{d:"M10.3 4.3 2.5 18a2 2 0 0 0 1.7 3h15.6a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0ZM12 9v4m0 3v.01"}),kv:(0,a.jsx)("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"}),logs:(0,a.jsx)("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"}),mail:(0,a.jsx)("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"}),payments:(0,a.jsx)("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"}),metrics:(0,a.jsx)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),migrations:(0,a.jsx)("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"}),notifications:(0,a.jsx)("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"}),organizations:(0,a.jsx)("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"}),permissions:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2.2 2.2L15 9.5M8.5 16h7"}),pitr:(0,a.jsx)("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"}),queues:(0,a.jsx)("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),realtime:(0,a.jsx)("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}),rls:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3ZM8.5 10h7M8.5 13h7"}),schedule:(0,a.jsx)("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),schema:(0,a.jsx)("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"}),sql:(0,a.jsx)("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"}),storageRules:(0,a.jsx)("path",{d:"M7 10V7a5 5 0 0 1 10 0v3m-11 0h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1Zm6 4v2"}),advisorHealth:(0,a.jsx)("path",{d:"M3 12h4l2-5 3 10 2-5h5"}),security:(0,a.jsx)("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-2.5 8.5 2 2 4-4"}),traces:(0,a.jsx)("path",{d:"M3 6h9M6 12h12M10 18h7"}),settings:(0,a.jsx)("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6H10.5l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"}),users:(0,a.jsx)("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85M16 3.13A4 4 0 0 1 16 11"}),vectors:(0,a.jsx)("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"}),workflows:(0,a.jsx)("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"})},gs=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authAudit","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","traces","audit","realtime","fanout","containers","metrics","analytics","health","deploymentHealth"]},{key:"advisors",tabs:["advisorHealth","security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags"]},{key:"settings",tabs:["settings"]}],ql={analytics:"analytics",authAudit:"auth",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",notifications:"notifications",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},hs=i((t,e)=>{let o=ql[t];return o===void 0||e[o]},"Lt"),Vr=i(t=>{let e=(0,I.c)(2),{tab:o}=t,r=$l[o],n;return e[0]!==r?(n=(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:r}),e[0]=r,e[1]=n):n=e[1],n},"xt"),Gl=i(t=>t,"ys"),Es=Gl(["home","data","sql","functions","api","workflows","agents","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authAudit","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","deploymentHealth","advisorHealth","security","rls","permissions","insights","issues","logs","traces","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","settings"]),Yl=new Set(["api","data","migrations","sql"]),Jl=i(t=>{let e=t.split("/").findLast(Boolean)??"";return Es.includes(e)?e:"home"},"ks"),Ql=i(t=>{let e=(0,I.c)(19),{chrome:o,connected:r}=t,n=ge(),s;e[0]!==n?(s=n("admin token"),e[0]=n,e[1]=s):s=e[1];let l;e[2]!==s?(l=(0,a.jsx)("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:s}),e[2]=s,e[3]=l):l=e[3];let d;e[4]!==o.onTokenChange||e[5]!==o.token?(d=(0,a.jsx)(mr,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:o.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:o.token}),e[4]=o.onTokenChange,e[5]=o.token,e[6]=d):d=e[6];let p;e[7]!==r||e[8]!==n?(p=r&&(0,a.jsxs)("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[(0,a.jsx)("span",{"aria-hidden":"true",className:"text-warning",children:"\u26A0"}),n("Token rides the WebSocket URL \u2014 it can surface in browser DevTools and server logs. Use a dev-only token.")]}),e[7]=r,e[8]=n,e[9]=p):p=e[9];let c;e[10]!==o.clearToken||e[11]!==r||e[12]!==n?(c=r&&(0,a.jsx)("button",{className:"self-start rounded-md border border-border px-2.5 py-1 text-xs font-medium outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"dash-app-clear-token",onClick:o.clearToken,type:"button",children:n("Clear")}),e[10]=o.clearToken,e[11]=r,e[12]=n,e[13]=c):c=e[13];let u;return e[14]!==l||e[15]!==d||e[16]!==p||e[17]!==c?(u=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[l,d,p,c]}),e[14]=l,e[15]=d,e[16]=p,e[17]=c,e[18]=u):u=e[18],u},"ws"),Xl=i(t=>{let e=(0,I.c)(25),{current:o,group:r,groupLabel:n,selectTab:s,tabDescription:l,tabLabel:d}=t,p=r.tabs.includes(o)?"page":void 0,c=n[r.key],u=r.tabs[0],h;e[0]!==u?(h=(0,a.jsx)(Vr,{tab:u}),e[0]=u,e[1]=h):h=e[1];let v;e[2]!==p||e[3]!==c||e[4]!==h?(v=(0,a.jsx)(Rs,{"aria-current":p,"aria-label":c,className:"mx-auto flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent data-[popup-open]:bg-sidebar-accent data-[popup-open]:text-sidebar-accent-foreground data-[popup-open]:shadow-xs aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground aria-[current=page]:shadow-xs",delay:120,openOnHover:!0,children:h}),e[2]=p,e[3]=c,e[4]=h,e[5]=v):v=e[5];let f=n[r.key],m;e[6]!==f?(m=(0,a.jsx)("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:f}),e[6]=f,e[7]=m):m=e[7];let g;if(e[8]!==o||e[9]!==r.tabs||e[10]!==s||e[11]!==l||e[12]!==d){let P;e[14]!==o||e[15]!==s||e[16]!==l||e[17]!==d?(P=i(y=>(0,a.jsxs)("button",{"aria-current":o===y?"page":void 0,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-[13px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent aria-[current=page]:font-medium [&_svg]:opacity-70 aria-[current=page]:[&_svg]:opacity-100","data-tab":y,"data-testid":`dash-tab-${y}`,onClick:s,title:l[y],type:"button",children:[(0,a.jsx)(Vr,{tab:y}),(0,a.jsx)("span",{children:d[y]})]},y),"y"),e[14]=o,e[15]=s,e[16]=l,e[17]=d,e[18]=P):P=e[18],g=r.tabs.map(P),e[8]=o,e[9]=r.tabs,e[10]=s,e[11]=l,e[12]=d,e[13]=g}else g=e[13];let b;e[19]!==m||e[20]!==g?(b=(0,a.jsxs)(Ss,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[m,g]}),e[19]=m,e[20]=g,e[21]=b):b=e[21];let x;return e[22]!==v||e[23]!==b?(x=(0,a.jsxs)(Cs,{children:[v,b]}),e[22]=v,e[23]=b,e[24]=x):x=e[24],x},"Ns"),ec=i(t=>{let e=(0,I.c)(45),{chrome:o,collapsed:r,connected:n}=t,s=ge();if(o===null){let y;e[0]!==s?(y=s("Admin"),e[0]=s,e[1]=y):y=e[1];let S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=(0,a.jsx)("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=S):S=e[2];let C;e[3]!==s?(C=s("Admin"),e[3]=s,e[4]=C):C=e[4];let w;e[5]!==C?(w=(0,a.jsx)("span",{className:"truncate text-[13px] font-medium",children:C}),e[5]=C,e[6]=w):w=e[6];let N;e[7]!==s?(N=s("Studio"),e[7]=s,e[8]=N):N=e[8];let E;e[9]!==N?(E=(0,a.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:N}),e[9]=N,e[10]=E):E=e[10];let T;e[11]!==w||e[12]!==E?(T=(0,a.jsxs)("span",{className:"grid flex-1 text-start leading-tight",children:[w,E]}),e[11]=w,e[12]=E,e[13]=T):T=e[13];let k;return e[14]!==y||e[15]!==T?(k=(0,a.jsxs)(Ts,{className:"data-active:bg-transparent",size:"lg",tooltip:y,children:[S,T]}),e[14]=y,e[15]=T,e[16]=k):k=e[16],k}let l=r?"mx-auto size-8 justify-center":"w-full p-2",d;e[17]!==l?(d=$("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=d):d=e[18];let p;e[19]!==n||e[20]!==s?(p=s(n?"Connected":"Not connected"),e[19]=n,e[20]=s,e[21]=p):p=e[21];let c=n?"bg-success":"bg-muted-foreground/50",u;e[22]!==c?(u=$("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",c),e[22]=c,e[23]=u):u=e[23];let h;e[24]!==u?(h=(0,a.jsxs)("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",(0,a.jsx)("span",{"aria-hidden":"true",className:u})]}),e[24]=u,e[25]=h):h=e[25];let v;e[26]!==r||e[27]!==n||e[28]!==s?(v=!r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"grid flex-1 text-start leading-tight",children:[(0,a.jsx)("span",{className:"truncate text-[13px] font-medium",children:s("Admin")}),(0,a.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:s(n?"Connected":"Not connected")})]}),(0,a.jsx)("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e[26]=r,e[27]=n,e[28]=s,e[29]=v):v=e[29];let f;e[30]!==d||e[31]!==p||e[32]!==h||e[33]!==v?(f=(0,a.jsxs)(Rs,{className:d,"data-testid":"dash-app-connect",title:p,children:[h,v]}),e[30]=d,e[31]=p,e[32]=h,e[33]=v,e[34]=f):f=e[34];let m=r?"end":"start",g=r?"right":"top",b;e[35]!==o||e[36]!==n?(b=(0,a.jsx)(Ql,{chrome:o,connected:n}),e[35]=o,e[36]=n,e[37]=b):b=e[37];let x;e[38]!==g||e[39]!==b||e[40]!==m?(x=(0,a.jsx)(Ss,{align:m,keepMounted:!0,side:g,children:b}),e[38]=g,e[39]=b,e[40]=m,e[41]=x):x=e[41];let P;return e[42]!==x||e[43]!==f?(P=(0,a.jsxs)(Cs,{children:[f,x]}),e[42]=x,e[43]=f,e[44]=P):P=e[44],P},"Ss"),tc=i(t=>{let e=(0,I.c)(28),{chrome:o,connected:r,current:n,groupLabel:s,groups:l,selectTab:d,tabDescription:p,tabLabel:c}=t,u=ge(),{state:h}=ar(),v=h==="collapsed",f=v&&"justify-center px-0",m;e[0]!==f?(m=$("flex items-center gap-2.5 px-1.5 py-1",f),e[0]=f,e[1]=m):m=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(ci,{className:"size-9 shrink-0 text-foreground"}),e[2]=g):g=e[2];let b;e[3]!==v||e[4]!==r||e[5]!==u?(b=!v&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"grid flex-1 leading-tight",children:[(0,a.jsx)("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"}),(0,a.jsx)("span",{className:"truncate text-[11px] text-muted-foreground",children:u("Studio")})]}),(0,a.jsx)(Lt,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:u(r?"Live":"Local")})]}),e[3]=v,e[4]=r,e[5]=u,e[6]=b):b=e[6];let x;e[7]!==m||e[8]!==b?(x=(0,a.jsx)(Di,{children:(0,a.jsxs)("div",{className:m,children:[g,b]})}),e[7]=m,e[8]=b,e[9]=x):x=e[9];let P;e[10]!==v||e[11]!==n||e[12]!==s||e[13]!==l||e[14]!==d||e[15]!==p||e[16]!==c?(P=v?l.map(w=>(0,a.jsx)(Xl,{current:n,group:w,groupLabel:s,selectTab:d,tabDescription:p,tabLabel:c},w.key)):l.map(w=>(0,a.jsxs)(Ai,{children:[(0,a.jsx)(Vi,{className:"text-[11px] font-medium tracking-wider uppercase",children:s[w.key]}),(0,a.jsx)(Li,{children:(0,a.jsx)(ms,{children:w.tabs.map(N=>(0,a.jsx)(fs,{children:(0,a.jsxs)(Ts,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":N,"data-testid":`dash-tab-${N}`,isActive:n===N,onClick:d,title:p[N],tooltip:p[N],children:[(0,a.jsx)(Vr,{tab:N}),(0,a.jsx)("span",{children:c[N]})]})},N))})})]},w.key)),e[10]=v,e[11]=n,e[12]=s,e[13]=l,e[14]=d,e[15]=p,e[16]=c,e[17]=P):P=e[17];let y;e[18]!==P?(y=(0,a.jsx)(_i,{children:P}),e[18]=P,e[19]=y):y=e[19];let S;e[20]!==o||e[21]!==v||e[22]!==r?(S=(0,a.jsx)(Ii,{children:(0,a.jsx)(ms,{children:(0,a.jsx)(fs,{children:(0,a.jsx)(ec,{chrome:o,collapsed:v,connected:r})})})}),e[20]=o,e[21]=v,e[22]=r,e[23]=S):S=e[23];let C;return e[24]!==x||e[25]!==y||e[26]!==S?(C=(0,a.jsxs)(ki,{collapsible:"icon",variant:"inset",children:[x,y,S]}),e[24]=x,e[25]=y,e[26]=S,e[27]=C):C=e[27],C},"Ms"),ks=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(Fo,{className:"h-8 w-40"}),(0,a.jsx)(Fo,{className:"h-8 w-24"})]}),(0,a.jsx)(Fo,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},"Jt"),oc=i(()=>{let t=(0,I.c)(64),e=ge(),o=no(),r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={select:lc},t[0]=r):r=t[0];let n=Wr(r),s,l;t[1]!==n?(s=Jl(n),l=Yl.has(s),t[1]=n,t[2]=s,t[3]=l):(s=t[2],l=t[3]);let d=l,p=qr(),c=p?.toggle;Xi(c);let u=In(),{groupLabel:h,tabDescription:v,tabLabel:f}=Wi(),m;t[4]!==u?(m=i(ce=>({...ce,tabs:ce.tabs.filter(Pe=>hs(Pe,u))}),"f"),t[4]=u,t[5]=m):m=t[5];let g=gs.map(m).filter(cc),b,x;t[6]!==s||t[7]!==u||t[8]!==o?(b=i(()=>{hs(s,u)||Jt(o({replace:!0,to:"/home"}))},"b"),x=[s,u,o],t[6]=s,t[7]=u,t[8]=o,t[9]=b,t[10]=x):(b=t[9],x=t[10]),(0,z.useEffect)(b,x);let P;t[11]!==o?(P=i(ce=>{Jt(o({to:`/${ce.currentTarget.dataset.tab??""}`}))},"y"),t[11]=o,t[12]=P):P=t[12];let y=P,S,C;t[13]!==s||t[14]!==f?(S=i(()=>{typeof document<"u"&&(document.title=`${f[s]} \xB7 lunora`)},"S"),C=[s,f],t[13]=s,t[14]=f,t[15]=S,t[16]=C):(S=t[15],C=t[16]),(0,z.useEffect)(S,C);let w=g.find(ce=>ce.tabs.includes(s))??gs[0],N;t[17]!==h||t[18]!==f?(N=i(ce=>ce.tabs.map(Pe=>({group:h[ce.key],label:f[Pe],to:`/${Pe}`})),"N"),t[17]=h,t[18]=f,t[19]=N):N=t[19];let E=g.flatMap(N),T=(0,z.use)(ws),k=T!==null&&T.token!=="",O;t[20]!==E?(O=(0,a.jsx)(ps,{items:E}),t[20]=E,t[21]=O):O=t[21];let B;t[22]!==T||t[23]!==k||t[24]!==s||t[25]!==h||t[26]!==y||t[27]!==v||t[28]!==f||t[29]!==g?(B=(0,a.jsx)(tc,{chrome:T,connected:k,current:s,groupLabel:h,groups:g,selectTab:y,tabDescription:v,tabLabel:f}),t[22]=T,t[23]=k,t[24]=s,t[25]=h,t[26]=y,t[27]=v,t[28]=f,t[29]=g,t[30]=B):B=t[30];let D=h[w.key],j=f[s],H;t[31]!==D||t[32]!==j?(H=(0,a.jsx)(Qi,{domain:D,onOpenCommandPalette:ds,page:j}),t[31]=D,t[32]=j,t[33]=H):H=t[33];let K;t[34]!==T?.rulesInstalled?(K=T?.rulesInstalled===!1&&(0,a.jsx)(ui,{}),t[34]=T?.rulesInstalled,t[35]=K):K=t[35];let W=`dash-tab-${s}`,_=d?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",A=f[s],V;t[36]!==e||t[37]!==A?(V=e("{title} failed",{title:A}),t[36]=e,t[37]=A,t[38]=V):V=t[38];let oe=f[s],te;t[39]!==e?(te=e("Try again"),t[39]=e,t[40]=te):te=t[40];let le;t[41]===Symbol.for("react.memo_cache_sentinel")?(le=(0,a.jsx)(z.Suspense,{fallback:(0,a.jsx)(ks,{}),children:(0,a.jsx)(zr,{})}),t[41]=le):le=t[41];let J;t[42]!==s||t[43]!==V||t[44]!==oe||t[45]!==te?(J=(0,a.jsx)(jo,{fallbackTitle:V,label:oe,retryLabel:te,children:le},s),t[42]=s,t[43]=V,t[44]=oe,t[45]=te,t[46]=J):J=t[46];let Q;t[47]!==_||t[48]!==J?(Q=(0,a.jsx)("div",{className:_,children:J}),t[47]=_,t[48]=J,t[49]=Q):Q=t[49];let ne;t[50]!==p?(ne=p?.open===!0&&(0,a.jsx)(zi,{focusSeq:p.focusSeq,onClose:p.close,onShownChange:p.setShown,shown:p.shown}),t[50]=p,t[51]=ne):ne=t[51];let ue;t[52]!==W||t[53]!==Q||t[54]!==ne?(ue=(0,a.jsxs)("div",{"aria-labelledby":W,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:[Q,ne]}),t[52]=W,t[53]=Q,t[54]=ne,t[55]=ue):ue=t[55];let me;t[56]!==H||t[57]!==K||t[58]!==ue?(me=(0,a.jsxs)(Mi,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[H,K,ue]}),t[56]=H,t[57]=K,t[58]=ue,t[59]=me):me=t[59];let he;return t[60]!==B||t[61]!==me||t[62]!==O?(he=(0,a.jsxs)(Ei,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[O,B,me]}),t[60]=B,t[61]=me,t[62]=O,t[63]=he):he=t[63],he},"Cs"),rc=i(()=>{let t=(0,I.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)($r,{children:(0,a.jsx)(oc,{})}),t[0]=e):e=t[0],e},"_s"),nc=i(t=>{let e=(0,I.c)(5),{initialShardKey:o,schemaEditable:r}=t,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];let s=jr(n),{table:l}=s,d=typeof l=="string"?l:void 0,p;return e[1]!==o||e[2]!==d||e[3]!==r?(p=(0,a.jsx)(Bl,{initialShardKey:o,initialTable:d,schemaEditable:r}),e[1]=o,e[2]=d,e[3]=r,e[4]=p):p=e[4],p},"Ls"),ac=i(()=>{let t=(0,I.c)(3),e=no(),o,r;return t[0]!==e?(o=i(()=>{Jt(e({replace:!0,to:"/home"}))},"a"),r=[e],t[0]=e,t[1]=o,t[2]=r):(o=t[1],r=t[2]),(0,z.useEffect)(o,r),null},"Ps"),sc=i(({basePath:t,dataEditable:e=!1,functions:o,initialShardKey:r,openApiSpec:n,openRpcSpec:s,runAsIdentity:l=!1,schemaEditable:d=!1,scheduledCancel:p,scheduledCron:c,scheduledLoad:u})=>{let h=Kr({component:rc}),v={agents:(0,a.jsx)(nl,{initialShardKey:r}),analytics:(0,a.jsx)(al,{}),api:(0,a.jsx)(sl,{functions:o,initialShardKey:r,openApiSpec:n,openRpcSpec:s}),audit:(0,a.jsx)(Rl,{initialShardKey:r}),authAudit:(0,a.jsx)(il,{}),authConfig:(0,a.jsx)(ll,{}),authSessions:(0,a.jsx)(cl,{}),containers:(0,a.jsx)(ul,{}),dashboards:(0,a.jsx)(Al,{initialShardKey:r}),data:(0,a.jsx)(fl,{editable:e,initialShardKey:r}),deploymentHealth:(0,a.jsx)(ml,{}),drains:(0,a.jsx)(Sl,{}),export:(0,a.jsx)(gl,{initialShardKey:r}),fanout:(0,a.jsx)(Vl,{initialShardKey:r}),files:(0,a.jsx)(Kl,{}),kv:(0,a.jsx)(Ol,{}),flags:(0,a.jsx)(xl,{initialShardKey:r}),functions:(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(Pl,{functions:o,initialShardKey:r}),(0,a.jsx)(yl,{functions:o,runAsIdentity:l})]}),health:(0,a.jsx)(Ll,{initialShardKey:r}),home:(0,a.jsx)(_n,{initialShardKey:r}),insights:(0,a.jsx)(el,{initialShardKey:r}),issues:(0,a.jsx)(Cl,{initialShardKey:r}),logs:(0,a.jsx)(Nl,{initialShardKey:r}),traces:(0,a.jsx)(Ul,{initialShardKey:r}),metrics:(0,a.jsx)(Hl,{initialShardKey:r}),migrations:(0,a.jsx)(hl,{initialShardKey:r}),notifications:(0,a.jsx)(Ml,{}),organizations:(0,a.jsx)(dl,{}),permissions:(0,a.jsx)(Il,{functions:o,runAsIdentity:l,schemaEditable:d}),pitr:(0,a.jsx)(bl,{initialShardKey:r}),mail:(0,a.jsx)(Tl,{}),payments:(0,a.jsx)(Dl,{}),queues:(0,a.jsx)(_l,{}),realtime:(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(El,{initialShardKey:r}),(0,a.jsx)(kl,{})]}),rls:(0,a.jsx)(tl,{}),schedule:(0,a.jsx)(wl,{loadCronJobs:c,scheduledCancel:p,scheduledLoad:u}),schema:(0,a.jsx)(nc,{initialShardKey:r,schemaEditable:d}),advisorHealth:(0,a.jsx)(ol,{}),security:(0,a.jsx)(rl,{}),settings:(0,a.jsx)(Fl,{initialShardKey:r}),sql:(0,a.jsx)(jl,{initialShardKey:r}),storageRules:(0,a.jsx)(zl,{}),users:(0,a.jsx)(pl,{}),vectors:(0,a.jsx)(Zl,{}),workflows:(0,a.jsx)(Wl,{})},f=pr({component:i(()=>v.home,"component"),getParentRoute:i(()=>h,"getParentRoute"),path:"/"}),m=Es.map(x=>pr({component:i(()=>v[x],"component"),getParentRoute:i(()=>h,"getParentRoute"),path:`/${x}`,validateSearch:vl[x]})),g=h.addChildren([f,...m]),b="window"in globalThis?Br():Fr({initialEntries:["/home"]});return Ur({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:ac,defaultPendingComponent:ks,defaultPendingMinMs:0,defaultPendingMs:0,history:b,routeTree:g})},"$s"),ic=i(t=>{let e=(0,I.c)(17),{basePath:o,chrome:r,dataEditable:n,functions:s,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:h,scheduledCron:v,scheduledLoad:f}=t,m;e[0]!==o||e[1]!==n||e[2]!==s||e[3]!==l||e[4]!==d||e[5]!==p||e[6]!==c||e[7]!==h||e[8]!==v||e[9]!==f||e[10]!==u?(m=sc({basePath:o,dataEditable:n,functions:s,initialShardKey:l,openApiSpec:d,openRpcSpec:p,runAsIdentity:c,schemaEditable:u,scheduledCancel:h,scheduledCron:v,scheduledLoad:f}),e[0]=o,e[1]=n,e[2]=s,e[3]=l,e[4]=d,e[5]=p,e[6]=c,e[7]=h,e[8]=v,e[9]=f,e[10]=u,e[11]=m):m=e[11];let g=m,b=r??null,x;e[12]!==g?(x=(0,a.jsx)(Zr,{router:g}),e[12]=g,e[13]=x):x=e[13];let P;return e[14]!==b||e[15]!==x?(P=(0,a.jsx)(ws,{value:b,children:x}),e[14]=b,e[15]=x,e[16]=P):P=e[16],P},"As"),Lg=i(t=>{let e=(0,I.c)(17),{basePath:o,chrome:r,dataEditable:n,functions:s,i18n:l,initialShardKey:d,locale:p,openApiSpec:c,openRpcSpec:u,runAsIdentity:h,schemaEditable:v,scheduledCancel:f,scheduledCron:m,scheduledLoad:g}=t,b;e[0]!==o||e[1]!==r||e[2]!==n||e[3]!==s||e[4]!==d||e[5]!==c||e[6]!==u||e[7]!==h||e[8]!==f||e[9]!==m||e[10]!==g||e[11]!==v?(b=(0,a.jsx)(ni,{children:(0,a.jsx)(ic,{basePath:o,chrome:r,dataEditable:n,functions:s,initialShardKey:d,openApiSpec:c,openRpcSpec:u,runAsIdentity:h,scheduledCancel:f,scheduledCron:m,scheduledLoad:g,schemaEditable:v})}),e[0]=o,e[1]=r,e[2]=n,e[3]=s,e[4]=d,e[5]=c,e[6]=u,e[7]=h,e[8]=f,e[9]=m,e[10]=g,e[11]=v,e[12]=b):b=e[12];let x=b;if(l===void 0&&p===void 0)return x;let P;return e[13]!==l||e[14]!==p||e[15]!==x?(P=(0,a.jsx)(cs,{i18n:l,locale:p,children:x}),e[13]=l,e[14]=p,e[15]=x,e[16]=P):P=e[16],P},"cn");function lc(t){return t.location.pathname}i(lc,"Ts");function cc(t){return t.tabs.length>0}i(cc,"zs");export{jo as a,cs as b,ri as c,ai as d,Vg as e,ci as f,gi as g,bi as h,xi as i,yi as j,Lg as k};
|