@decocms/mesh 1.13.2 → 1.13.4
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/client/assets/{AlertCircle-C7jPyF1i.js → AlertCircle-CmTLFfTW.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BsEq7RkN.js → ArrowLeft-kUb-nLpp.js} +1 -1
- package/dist/client/assets/{ChevronDown-CTU5QhlY.js → ChevronDown-BIixgdXr.js} +1 -1
- package/dist/client/assets/{ChevronRight-UyghVUW5.js → ChevronRight-XFvS51AW.js} +1 -1
- package/dist/client/assets/{Copy01-2N4PsOoQ.js → Copy01-Bbnq-cRP.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-K1DaKZpH.js → DotsHorizontal-Wp9Jfd-l.js} +1 -1
- package/dist/client/assets/{DotsVertical-7n0u_WMH.js → DotsVertical-BWJddsCE.js} +1 -1
- package/dist/client/assets/{File06-B-4AkckK.js → File06-AO49hgxj.js} +1 -1
- package/dist/client/assets/{FilterLines-3KXsEQsL.js → FilterLines-D_oBG_mT.js} +1 -1
- package/dist/client/assets/{FlipBackward-C2XOXx8C.js → FlipBackward-v3DJy5dX.js} +1 -1
- package/dist/client/assets/{GitBranch01-C5iAlTnG.js → GitBranch01-Bg8OxNYr.js} +1 -1
- package/dist/client/assets/{Grid01-CJPihD4i.js → Grid01-D8szKORD.js} +1 -1
- package/dist/client/assets/{Inbox01-BnO6gOQP.js → Inbox01-DKJqmGhJ.js} +1 -1
- package/dist/client/assets/{InfoCircle-CALL1u00.js → InfoCircle-DQgIwXgE.js} +1 -1
- package/dist/client/assets/{Key01-B0l-5fMc.js → Key01-j8Px8dQ3.js} +1 -1
- package/dist/client/assets/{LinkExternal01--B-xlI11.js → LinkExternal01-DtwuKg3k.js} +1 -1
- package/dist/client/assets/{Loading01-BIZwCiUc.js → Loading01-BFMDuD9f.js} +1 -1
- package/dist/client/assets/{Lock01-DOOxUber.js → Lock01-B2Dlj0_A.js} +1 -1
- package/dist/client/assets/{Play-DtfCRxAy.js → Play-DZwkJO6F.js} +1 -1
- package/dist/client/assets/{Plus-DjZGP-Iq.js → Plus-DCJuRkSA.js} +1 -1
- package/dist/client/assets/{Terminal-CRoqjoNr.js → Terminal-BgBiWCRz.js} +1 -1
- package/dist/client/assets/{Trash01-BSvmxP0N.js → Trash01-DXJjsatW.js} +1 -1
- package/dist/client/assets/{X-PqPoM3vz.js → X-DO5JCiO9.js} +1 -1
- package/dist/client/assets/{XClose-BIM9TZ-N.js → XClose-yLguPztf.js} +1 -1
- package/dist/client/assets/{alert-dialog-BFA_XwNs.js → alert-dialog-BFj8FHOj.js} +1 -1
- package/dist/client/assets/{auth-oN0yIABg.js → auth-CS1Cey1o.js} +1 -1
- package/dist/client/assets/{auth-catchall-DSafll23.js → auth-catchall-BbJfiMLS.js} +1 -1
- package/dist/client/assets/avatar-Cw7f7Fm7.js +1 -0
- package/dist/client/assets/badge-cip1W12x.js +1 -0
- package/dist/client/assets/card-D7kEypvP.js +1 -0
- package/dist/client/assets/checkbox-DWLQD46M.js +1 -0
- package/dist/client/assets/{collection-detail-DKY5TkgR.js → collection-detail-BnPZ4P9Q.js} +2 -2
- package/dist/client/assets/collection-display-button-6se5sKw0.js +1 -0
- package/dist/client/assets/{collection-header-Cq2y0kMK.js → collection-header-BAGohiuL.js} +1 -1
- package/dist/client/assets/{collection-page-DzdXojp0.js → collection-page-BIjUaFrN.js} +1 -1
- package/dist/client/assets/collection-search-Bt7hJb44.js +1 -0
- package/dist/client/assets/collection-tab-DofbhRON.js +1 -0
- package/dist/client/assets/collection-table-wrapper-Nus9WkY9.js +1 -0
- package/dist/client/assets/connection-card-D6p9Apdb.js +1 -0
- package/dist/client/assets/connection-detail-CkpomsVk.js +1 -0
- package/dist/client/assets/connections-X3ifJgj8.js +1 -0
- package/dist/client/assets/constants-B627FiQ3.js +1 -0
- package/dist/client/assets/create-organization-dialog-D4ZZBa08.js +1 -0
- package/dist/client/assets/dialog-BPRbMnap.js +1 -0
- package/dist/client/assets/dropdown-menu-DH78LFXJ.js +1 -0
- package/dist/client/assets/empty-state-ZbNFSrHa.js +1 -0
- package/dist/client/assets/env-vars-editor-HOD_p6bM.js +1 -0
- package/dist/client/assets/error-boundary-CSDpN3IU.js +1 -0
- package/dist/client/assets/{extract-connection-data-u9kLLue9.js → extract-connection-data-BVRaMREC.js} +1 -1
- package/dist/client/assets/form-BWvfCr5W.js +1 -0
- package/dist/client/assets/{formatDistanceToNow-C2AI0RE1.js → formatDistanceToNow-CUtIwGZO.js} +1 -1
- package/dist/client/assets/gateway-detail-BVUnhnv6.js +1 -0
- package/dist/client/assets/gateway-selector-C6BhGNmC.js +1 -0
- package/dist/client/assets/gateways-CUY_RF0g.js +1 -0
- package/dist/client/assets/home-BDMCtoFs.js +1 -0
- package/dist/client/assets/{index-ChqW8s3_.js → index-2YBxks23.js} +2 -2
- package/dist/client/assets/index-B1wnL3pV.css +1 -0
- package/dist/client/assets/{index-CcOnUPVc.js → index-CFqw5CAk.js} +2 -2
- package/dist/client/assets/{index-79P7ggRz.js → index-m-YmB4ph.js} +1 -1
- package/dist/client/assets/{button-Dr2OfS67.js → input-BSDBSyke.js} +1 -1
- package/dist/client/assets/layout-C_WJLL2S.js +1 -0
- package/dist/client/assets/{lazy-highlighter-rbKuYd4Y.js → lazy-highlighter-QHCwZ7Bv.js} +1 -1
- package/dist/client/assets/localstorage-keys-DnYi5wZr.js +1 -0
- package/dist/client/assets/login-unmsX_CR.js +1 -0
- package/dist/client/assets/{mcp-oauth-CLB05bqO.js → mcp-oauth-D1oibR_i.js} +1 -1
- package/dist/client/assets/mcp-server-detail-5ueNKLNi.js +1 -0
- package/dist/client/assets/members-CgDxC8dY.js +3 -0
- package/dist/client/assets/{monaco-editor-BWGnuKvS.js → monaco-editor-18l2E7lk.js} +1 -1
- package/dist/client/assets/{monitoring-Daq8j1mw.js → monitoring-BS_WM-ML.js} +5 -5
- package/dist/client/assets/{oauth-callback-yMv-isiq.js → oauth-callback-tcEVQW2m.js} +1 -1
- package/dist/client/assets/page-Bm0QzKLN.js +1 -0
- package/dist/client/assets/{page-DkLEvKFr.js → page-C_wcQFSa.js} +1 -1
- package/dist/client/assets/pin-to-sidebar-button-rUjoaKt7.js +1 -0
- package/dist/client/assets/popover-DGwJ1U8B.js +1 -0
- package/dist/client/assets/project-context-provider-C7-HmBKu.js +1 -0
- package/dist/client/assets/resizable-BkJdAL7l.js +1 -0
- package/dist/client/assets/resource-tabs-DhNIXHvE.js +1 -0
- package/dist/client/assets/select-DLPmxXDW.js +1 -0
- package/dist/client/assets/settings-Dg4J4piv.js +1 -0
- package/dist/client/assets/shell-layout-CW_3D6wx.js +19 -0
- package/dist/client/assets/spinner-PGFal9m1.js +1 -0
- package/dist/client/assets/switch-Fn7If0Ti.js +1 -0
- package/dist/client/assets/textarea-CbNfP826.js +1 -0
- package/dist/client/assets/{thread-history-popover-BqhOXgTV.js → thread-history-popover-BW6o5miO.js} +45 -45
- package/dist/client/assets/{tools-list-wGfEy4CM.js → tools-list-BMbd7IEa.js} +1 -1
- package/dist/client/assets/{use-binding-DaAdA88g.js → use-binding-D77gExDp.js} +1 -1
- package/dist/client/assets/{use-connection-Dmp9OF3a.js → use-connection-BPzhCo7m.js} +1 -1
- package/dist/client/assets/{use-connection-resources-BB8wUxFy.js → use-connection-resources-CQGT27SN.js} +1 -1
- package/dist/client/assets/{use-gateway-CqHSf00q.js → use-gateway-C8QVevg7.js} +1 -1
- package/dist/client/assets/{use-list-state-OO7JJFHk.js → use-list-state-BzeiRpp0.js} +1 -1
- package/dist/client/assets/{use-mcp-DA1ttZCi.js → use-mcp-D2cijL_p.js} +1 -1
- package/dist/client/assets/{use-members-CU5bDeq-.js → use-members-CTyXRW-K.js} +1 -1
- package/dist/client/assets/{use-mobile-DJYJGOHZ.js → use-mobile-BTxzaR4j.js} +1 -1
- package/dist/client/assets/use-organization-settings-aN8k0KJJ.js +1 -0
- package/dist/client/assets/use-tool-call-C4GcZMyW.js +1 -0
- package/dist/client/assets/useQuery-DV_L-E86.js +1 -0
- package/dist/client/assets/value-DVG0CnkT.js +1 -0
- package/dist/client/assets/view-mode-toggle-DPmK0pgy.js +1 -0
- package/dist/client/assets/workflow-Dkm9OUwf.js +1 -0
- package/dist/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/client/assets/avatar-DWNKzJTz.js +0 -1
- package/dist/client/assets/badge-CMDsV8CJ.js +0 -1
- package/dist/client/assets/card-DGWmxOab.js +0 -1
- package/dist/client/assets/checkbox-CH_lW5sL.js +0 -1
- package/dist/client/assets/collection-display-button-CF5VNEyr.js +0 -1
- package/dist/client/assets/collection-search-5HSGaGGt.js +0 -1
- package/dist/client/assets/collection-tab-DfUfYU59.js +0 -1
- package/dist/client/assets/collection-table-wrapper-BcST91H1.js +0 -1
- package/dist/client/assets/connection-card-BYX60RAK.js +0 -1
- package/dist/client/assets/connection-detail-BIJapkB_.js +0 -1
- package/dist/client/assets/connections-iA0KSF8d.js +0 -1
- package/dist/client/assets/constants-Dj4zd5B9.js +0 -1
- package/dist/client/assets/create-organization-dialog-CrdjEf0i.js +0 -1
- package/dist/client/assets/dialog-Didf1Cm0.js +0 -1
- package/dist/client/assets/dropdown-menu-DW5iGKOq.js +0 -1
- package/dist/client/assets/empty-state-BN60qDU7.js +0 -1
- package/dist/client/assets/env-vars-editor-Bp_8Hwo3.js +0 -1
- package/dist/client/assets/error-boundary-BiqKDyx1.js +0 -1
- package/dist/client/assets/form-BXN-QLni.js +0 -1
- package/dist/client/assets/gateway-detail-B4v6dTjK.js +0 -1
- package/dist/client/assets/gateway-selector-QHaVxB2n.js +0 -1
- package/dist/client/assets/gateways-Cx9ti1Cv.js +0 -1
- package/dist/client/assets/home-CJdYeB-M.js +0 -1
- package/dist/client/assets/index-BjKus4OW.css +0 -1
- package/dist/client/assets/input-DBy5GvSG.js +0 -1
- package/dist/client/assets/layout-C4lOtZCC.js +0 -1
- package/dist/client/assets/localstorage-keys-D9YX3_IT.js +0 -1
- package/dist/client/assets/login-fLYNz1_K.js +0 -1
- package/dist/client/assets/mcp-server-detail-CcpTBZ0r.js +0 -1
- package/dist/client/assets/members-zUvSLEug.js +0 -3
- package/dist/client/assets/page-CqtvajVn.js +0 -1
- package/dist/client/assets/pin-to-sidebar-button-BiLL5QoJ.js +0 -1
- package/dist/client/assets/popover-BD8rPm7n.js +0 -1
- package/dist/client/assets/project-context-provider-CRa6hysF.js +0 -1
- package/dist/client/assets/resizable-CGOknEmg.js +0 -1
- package/dist/client/assets/resource-tabs-BPp4Cr-n.js +0 -1
- package/dist/client/assets/select-Bw9i3g8J.js +0 -1
- package/dist/client/assets/settings-DXlkaFxL.js +0 -1
- package/dist/client/assets/shell-layout-DBkPG18-.js +0 -19
- package/dist/client/assets/spinner-DhLOJDf8.js +0 -1
- package/dist/client/assets/switch-BTv42t3b.js +0 -1
- package/dist/client/assets/textarea-C3UNaEli.js +0 -1
- package/dist/client/assets/use-organization-settings-BGtwqtxs.js +0 -1
- package/dist/client/assets/use-tool-call-xMn-Ysup.js +0 -1
- package/dist/client/assets/useQuery-u2B_27A6.js +0 -1
- package/dist/client/assets/value-IcpA2Nq4.js +0 -1
- package/dist/client/assets/view-mode-toggle-Di5d2VZX.js +0 -1
- package/dist/client/assets/workflow-UoaX4VGc.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,at as O,ak as $,j as c,au as z,ae as L,av as G,ac as _,af as w,ah as g,aw as E,ag as j,ax as H,ay as K,az as B,aA as U,aB as V,aC as W,aD as Z,aE as q,aF as J,c as R}from"./index-CFqw5CAk.js";import{c as Q}from"./input-BSDBSyke.js";var m="Popover",[b]=L(m,[O]),P=O(),[X,d]=b(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:a,modal:s=!1}=t,p=P(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:a,caller:m});return c.jsx(z,{...p,children:c.jsx(X,{scope:e,contentId:G(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(C=>!C),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:s,children:o})})};N.displayName=m;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),a=P(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(s(),()=>p()),[s,p]),c.jsx(E,{...a,...r,ref:e})});Y.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(y,o),a=P(o),s=_(e,n.triggerRef),p=c.jsx(w.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:s,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(E,{asChild:!0,...a,children:p})});S.displayName=y;var A="PopoverPortal",[ee,oe]=b(A,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,a=d(A,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||a.open,children:c.jsx(H,{asChild:!0,container:n,children:r})})})};D.displayName=A;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,a=d(v,t.__scopePopover);return c.jsx(j,{present:r||a.open,children:a.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=_(e,r),a=i.useRef(!1);return i.useEffect(()=>{const s=r.current;if(s)return K(s)},[]),c.jsx(B,{as:te,allowPinchZoom:!0,children:c.jsx(k,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,s=>{s.preventDefault(),a.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,s=>{const p=s.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(k,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||o.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const s=a.target;o.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),k=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),C=P(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(q,{"data-state":I(f.open),role:"dialog",id:f.contentId,...C,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",ae=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(T,o);return c.jsx(w.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});ae.displayName=T;var se="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=se;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M;function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=R.c(12);let o,r,n,a;e[0]!==t?({className:o,align:n,sideOffset:a,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=a):(o=e[1],r=e[2],n=e[3],a=e[4]);const s=n===void 0?"center":n,p=a===void 0?4:a;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==s||e[8]!==r||e[9]!==p||e[10]!==l?(u=c.jsx(le,{children:c.jsx(ue,{"data-slot":"popover-content",align:s,sideOffset:p,className:l,...r})}),e[7]=s,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}export{ve as P,ge as a,Pe as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as a,j as d,af as H,ae as Z,at as $,ac as G,aw as ee,ah as C,ag as z,ax as te,aD as oe,aE as re,bz as ne,av as se,ak as ae,au as ie,aF as le,c as j}from"./index-CFqw5CAk.js";import{c as ce}from"./input-BSDBSyke.js";var ue=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),de="VisuallyHidden",F=a.forwardRef((o,e)=>d.jsx(H.span,{...o,ref:e,style:{...ue,...o.style}}));F.displayName=de;var pe=F;const fe=({size:o=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M20 6 9 17l-5-5"}));fe.displayName="Check";var[O]=Z("Tooltip",[$]),L=$(),V="TooltipProvider",ve=700,D="tooltip.open",[he,A]=O(V),B=o=>{const{__scopeTooltip:e,delayDuration:t=ve,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=a.useRef(!0),c=a.useRef(!1),i=a.useRef(0);return a.useEffect(()=>{const u=i.current;return()=>window.clearTimeout(u)},[]),d.jsx(he,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(i.current),l.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:a.useCallback(u=>{c.current=u},[]),disableHoverableContent:n,children:s})};B.displayName=V;var R="Tooltip",[xe,_]=O(R),U=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=o,i=A(R,o.__scopeTooltip),u=L(e),[p,v]=a.useState(null),h=se(),f=a.useRef(0),x=l??i.disableHoverableContent,m=c??i.delayDuration,g=a.useRef(!1),[y,T]=ae({prop:r,defaultProp:n??!1,onChange:M=>{M?(i.onOpen(),document.dispatchEvent(new CustomEvent(D))):i.onClose(),s?.(M)},caller:R}),b=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),I=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),d.jsx(ie,{...u,children:d.jsx(xe,{scope:e,contentId:h,open:y,stateAttribute:b,trigger:p,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{i.isOpenDelayedRef.current?I():P()},[i.isOpenDelayedRef,I,P]),onTriggerLeave:a.useCallback(()=>{x?E():(window.clearTimeout(f.current),f.current=0)},[E,x]),onOpen:P,onClose:E,disableHoverableContent:x,children:t})})};U.displayName=R;var k="TooltipTrigger",Y=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(k,t),s=A(k,t),l=L(t),c=a.useRef(null),i=G(e,c,n.onTriggerChange),u=a.useRef(!1),p=a.useRef(!1),v=a.useCallback(()=>u.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),d.jsx(ee,{asChild:!0,...l,children:d.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:i,onPointerMove:C(o.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),p.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),p.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:C(o.onFocus,()=>{u.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});Y.displayName=k;var N="TooltipPortal",[ge,me]=O(N,{forceMount:void 0}),W=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(N,e);return d.jsx(ge,{scope:e,forceMount:t,children:d.jsx(z,{present:t||s.open,children:d.jsx(te,{asChild:!0,container:n,children:r})})})};W.displayName=N;var w="TooltipContent",q=a.forwardRef((o,e)=>{const t=me(w,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(w,o.__scopeTooltip);return d.jsx(z,{present:r||l.open,children:l.disableHoverableContent?d.jsx(X,{side:n,...s,ref:e}):d.jsx(Te,{side:n,...s,ref:e})})}),Te=a.forwardRef((o,e)=>{const t=_(w,o.__scopeTooltip),r=A(w,o.__scopeTooltip),n=a.useRef(null),s=G(e,n),[l,c]=a.useState(null),{trigger:i,onClose:u}=t,p=n.current,{onPointerInTransitChange:v}=r,h=a.useCallback(()=>{c(null),v(!1)},[v]),f=a.useCallback((x,m)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},T=be(y,g.getBoundingClientRect()),b=Pe(y,T),P=Ee(m.getBoundingClientRect()),E=je([...b,...P]);c(E),v(!0)},[v]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(i&&p){const x=g=>f(g,p),m=g=>f(g,i);return i.addEventListener("pointerleave",x),p.addEventListener("pointerleave",m),()=>{i.removeEventListener("pointerleave",x),p.removeEventListener("pointerleave",m)}}},[i,p,f,h]),a.useEffect(()=>{if(l){const x=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=i?.contains(g)||p?.contains(g),b=!Re(y,l);T?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[i,p,l,u,h]),d.jsx(X,{...o,ref:s})}),[ye,Ce]=O(R,{isInside:!1}),we=ne("TooltipContent"),X=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=o,i=_(w,t),u=L(t),{onClose:p}=i;return a.useEffect(()=>(document.addEventListener(D,p),()=>document.removeEventListener(D,p)),[p]),a.useEffect(()=>{if(i.trigger){const v=h=>{h.target?.contains(i.trigger)&&p()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[i.trigger,p]),d.jsx(oe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:p,children:d.jsxs(re,{"data-state":i.stateAttribute,...u,...c,ref:e,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(we,{children:r}),d.jsx(ye,{scope:t,isInside:!0,children:d.jsx(pe,{id:i.contentId,role:"tooltip",children:n||r})})]})})});q.displayName=w;var J="TooltipArrow",K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=L(t);return Ce(J,t).isInside?null:d.jsx(le,{...n,...r,ref:e})});K.displayName=J;function be(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Pe(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function Ee(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function Re(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const c=e[s],i=e[l],u=c.x,p=c.y,v=i.x,h=i.y;p>r!=h>r&&t<(v-u)*(r-p)/(h-p)+u&&(n=!n)}return n}function je(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),_e(e)}function _e(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Oe=B,Le=U,De=Y,ke=W,Ae=q,Ne=K;function Ie(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=d.jsx(Oe,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function $e(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(Ie,{children:d.jsx(Le,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Ge(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(De,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function ze(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let c;e[5]!==r?(c=ce("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=c):c=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Ne,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=i):i=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==c?(u=d.jsx(ke,{children:d.jsxs(Ae,{"data-slot":"tooltip-content",sideOffset:l,className:c,...n,children:[t,i]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=c,e[12]=u):u=e[12],u}const S="org-admin",Me={from({org:o,project:e}){if(o?.includes("/")||e.includes("/"))throw new Error("Org or project cannot contain slashes");return`${o}/${e}`},parse(o){o.startsWith("/")&&(o=o.slice(1));const[e,t]=o.split("/");if(!e||!t)throw new Error("Invalid locator");return{org:e,project:t}},isOrgAdminProject(o){return o.split("/")[1]===S},adminProject(o){return`${o}/${S}`}},Q=a.createContext(void 0),Fe=()=>{const o=a.useContext(Q);if(!o)throw new Error("useProjectContext must be used within a ProjectContextProvider");return o},Ve=o=>{const e=j.c(10),{children:t,org:r,project:n}=o;let s;e[0]!==r.slug||e[1]!==n.slug?(s=Me.from({org:r.slug,project:n.slug}),e[0]=r.slug,e[1]=n.slug,e[2]=s):s=e[2];const l=s;let c;e[3]!==l||e[4]!==r||e[5]!==n?(c={org:r,project:n,locator:l},e[3]=l,e[4]=r,e[5]=n,e[6]=c):c=e[6];const i=c;let u;return e[7]!==t||e[8]!==i?(u=d.jsx(Q.Provider,{value:i,children:t}),e[7]=t,e[8]=i,e[9]=u):u=e[9],u};export{Me as L,S as O,Ve as P,ze as T,ue as V,Ie as a,Ge as b,$e as c,fe as i,Fe as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,a9 as Pn,c as He,j as he}from"./index-CFqw5CAk.js";import{c as Je}from"./input-BSDBSyke.js";const Ye=({size:n=24,color:e="currentColor",...t})=>f.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},f.createElement("path",{d:"M12 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));Ye.displayName="DotsGrid";const Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const A={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},_e=10,ne=f.useLayoutEffect,Fe=Pn.useId,wn=typeof Fe=="function"?Fe:()=>null;let En=0;function Ge(n=null){const e=wn(),t=f.useRef(n||e||null);return t.current===null&&(t.current=""+En++),n??t.current}function Qe({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:h,onExpand:w,onResize:p,order:u,style:v,tagName:z="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:N,getPanelStyle:D,groupId:V,isPanelCollapsed:R,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:q,unregisterPanel:W}=E,G=Ge(l),M=f.useRef({callbacks:{onCollapse:h,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:H}=M.current,B={...H};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.current.order=u,_.onCollapse=h,_.onExpand=w,_.onResize=p,H.collapsedSize=t,H.collapsible=r,H.defaultSize=i,H.maxSize=a,H.minSize=s,(B.collapsedSize!==H.collapsedSize||B.collapsible!==H.collapsible||B.maxSize!==H.maxSize||B.minSize!==H.minSize)&&P(M.current,B)}),ne(()=>{const _=M.current;return F(_),()=>{W(_)}},[u,G,F,W]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return N(M.current)},isCollapsed(){return R(M.current)},isExpanded(){return!R(M.current)},resize:_=>{q(M.current,_)}}),[S,L,N,R,G,q]);const Y=D(M.current,i);return f.createElement(z,{...C,children:n,className:e,id:G,style:{...Y,...v},[A.groupId]:V,[A.panel]:"",[A.panelCollapsible]:r||void 0,[A.panelId]:G,[A.panelSize]:parseFloat(""+Y.flexGrow).toFixed(1)})}const en=f.forwardRef((n,e)=>f.createElement(Qe,{...n,forwardedRef:e}));Qe.displayName="Panel";en.displayName="forwardRef(Panel)";let De=null,Se=-1,J=null;function Cn(n,e){if(e){const t=(e&ln)!==0,r=(e&an)!==0,i=(e&sn)!==0,o=(e&un)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function In(){J!==null&&(document.head.removeChild(J),De=null,J=null,Se=-1)}function ke(n,e){var t,r;const i=Cn(n,e);if(De!==i){if(De=i,J===null&&(J=document.createElement("style"),document.head.appendChild(J)),Se>=0){var o;(o=J.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=J.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function nn(n){return n.type==="keydown"}function tn(n){return n.type.startsWith("pointer")}function rn(n){return n.type.startsWith("mouse")}function Ce(n){if(tn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(rn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Rn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function kn(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:Ve(n),b:Ve(e)};let r;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),r=n;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const An=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(n){var e;const t=getComputedStyle((e=on(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Nn(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Mn(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||An.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function Ke(n){let e=n.length;for(;e--;){const t=n[e];if(x(t,"Missing node"),Nn(t))return t}return null}function Ue(n){return n&&Number(getComputedStyle(n).zIndex)||0}function Ve(n){const e=[];for(;n;)e.push(n),n=on(n);return e}function on(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const ln=1,an=2,sn=4,un=8,$n=Rn()==="coarse";let U=[],ae=!1,ee=new Map,Ie=new Map;const ze=new Set;function Dn(n,e,t,r,i){var o;const{ownerDocument:l}=e,a={direction:t,element:e,hitAreaMargins:r,setResizeHandlerState:i},s=(o=ee.get(l))!==null&&o!==void 0?o:0;return ee.set(l,s+1),ze.add(a),Pe(),function(){var w;Ie.delete(n),ze.delete(a);const p=(w=ee.get(l))!==null&&w!==void 0?w:1;if(ee.set(l,p-1),Pe(),p===1&&ee.delete(l),U.includes(a)){const u=U.indexOf(a);u>=0&&U.splice(u,1),Te(),i("up",!0,null)}}}function Hn(n){const{target:e}=n,{x:t,y:r}=Ce(n);ae=!0,Be({target:e,x:t,y:r}),Pe(),U.length>0&&(we("down",n),n.preventDefault(),cn(e)||n.stopImmediatePropagation())}function Ae(n){const{x:e,y:t}=Ce(n);if(ae&&n.buttons===0&&(ae=!1,we("up",n)),!ae){const{target:r}=n;Be({target:r,x:e,y:t})}we("move",n),Te(),U.length>0&&n.preventDefault()}function Me(n){const{target:e}=n,{x:t,y:r}=Ce(n);Ie.clear(),ae=!1,U.length>0&&(n.preventDefault(),cn(e)||n.stopImmediatePropagation()),we("up",n),Be({target:e,x:t,y:r}),Te(),Pe()}function cn(n){let e=n;for(;e;){if(e.hasAttribute(A.resizeHandle))return!0;e=e.parentElement}return!1}function Be({target:n,x:e,y:t}){U.splice(0);let r=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(r=n),ze.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:h,right:w,top:p}=a,u=$n?l.coarse:l.fine;if(e>=h-u&&e<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&kn(r,o)>0){let z=r,C=!1;for(;z&&!z.contains(o);){if(Ln(z.getBoundingClientRect(),a)){C=!0;break}z=z.parentElement}if(C)return}U.push(i)}})}function Ne(n,e){Ie.set(n,e)}function Te(){let n=!1,e=!1;U.forEach(r=>{const{direction:i}=r;i==="horizontal"?n=!0:e=!0});let t=0;Ie.forEach(r=>{t|=r}),n&&e?ke("intersection",t):n?ke("horizontal",t):e?ke("vertical",t):In()}let $e=new AbortController;function Pe(){$e.abort(),$e=new AbortController;const n={capture:!0,signal:$e.signal};ze.size&&(ae?(U.length>0&&ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("contextmenu",Me,n),r.addEventListener("pointerleave",Ae,n),r.addEventListener("pointermove",Ae,n))}),window.addEventListener("pointerup",Me,n),window.addEventListener("pointercancel",Me,n)):ee.forEach((e,t)=>{const{body:r}=t;e>0&&(r.addEventListener("pointerdown",Hn,n),r.addEventListener("pointermove",Ae,n))}))}function we(n,e){ze.forEach(t=>{const{setResizeHandlerState:r}=t,i=U.includes(t);r(n,i,e)})}function _n(){const[n,e]=f.useState(0);return f.useCallback(()=>e(t=>t+1),[])}function x(n,e){if(!n)throw console.error(e),Error(e)}function te(n,e,t=_e){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function X(n,e,t=_e){return te(n,e,t)===0}function j(n,e,t){return te(n,e,t)===0}function Gn(n,e,t){if(n.length!==e.length)return!1;for(let r=0;r<n.length;r++){const i=n[r],o=e[r];if(!j(i,o,t))return!1}return!0}function le({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];x(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed(_e)),t}function ge({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(j(n,0))return e;const l=[...e],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=n<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,v)){const S=C-E;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}{const p=n<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:z,minSize:C=0}=u;if(z){const E=e[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),j(E,C)){const S=E-v;te(S,Math.abs(n))>0&&(n=n<0?0-S:S)}}}}{const p=n<0?1:-1;let u=n<0?s:a,v=0;for(;;){const C=e[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const z=Math.min(Math.abs(n),Math.abs(v));n=n<0?0-z:z}{let u=n<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(n)-Math.abs(h),z=e[u];x(z!=null,`Previous layout not found for panel index ${u}`);const C=z-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!j(z,E)&&(h+=z-E,l[u]=E,h.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?u--:u++}}if(Gn(i,l))return i;{const p=n<0?s:a,u=e[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+h,z=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=z,!j(z,v)){let C=v-z,S=n<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const N=L+C,D=le({panelConstraints:t,panelIndex:S,size:N});if(j(L,D)||(C-=D-L,l[S]=D),j(C,0))break;n>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return j(w,100)?l:i}function Bn({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),e.forEach((p,u)=>{const{constraints:v}=p,{maxSize:z=100,minSize:C=0}=v;u===a?(r=C,i=z):(o+=C,l+=z)});const s=Math.min(i,100-o),h=Math.max(r,100-l),w=n[a];return{valueMax:s,valueMin:h,valueNow:w}}function ye(n,e=document){return Array.from(e.querySelectorAll(`[${A.resizeHandleId}][data-panel-group-id="${n}"]`))}function fn(n,e,t=document){const i=ye(n,t).findIndex(o=>o.getAttribute(A.resizeHandleId)===e);return i??null}function dn(n,e,t){const r=fn(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function pn(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function Re(n,e=document){const t=e.querySelector(`[${A.resizeHandleId}="${n}"]`);return t||null}function Tn(n,e,t,r=document){var i,o,l,a;const s=Re(e,r),h=ye(n,r),w=s?h.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function Wn({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:h,valueMin:w,valueNow:p}=Bn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(h)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,h)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=e.current;x(a,"Eager values not found");const{panelDataArray:s}=a,h=pn(t,o);x(h!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(A.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[z,C]=Tn(t,v,s,o);if(z==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(N=>N.id===z);if(L>=0){const N=s[L];x(N,`No panel data found for index ${L}`);const D=r[L],{collapsedSize:V=0,collapsible:R,minSize:P=0}=N.constraints;if(D!=null&&R){const F=ge({delta:j(D,V)?P-V:V-D,initialLayout:r,panelConstraints:s.map(q=>q.constraints),pivotIndices:dn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,n,e,t,r,i,l])}function Ze(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function gn(n,e){const t=n==="horizontal",{x:r,y:i}=Ce(e);return t?r:i}function jn(n,e,t,r,i){const o=t==="horizontal",l=Re(e,i);x(l,`No resize handle element found for id "${e}"`);const a=l.getAttribute(A.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const h=gn(t,n),w=pn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(h-s)/u*100}function Fn(n,e,t,r,i,o){if(nn(n)){const l=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(n.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:jn(n,e,t,r,o)}function Kn({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,e[o]=a,i-=a)}for(let o=0;o<n.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=n.length-r,h=i/s;r++,e[o]=h,i-=h}return e}function oe(n,e,t){e.forEach((r,i)=>{const o=n[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:h=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:z}=l;z&&z(r,p),w&&(u||v)&&(v&&(p==null||X(p,h))&&!X(r,h)&&v(),u&&(p==null||!X(p,h))&&X(r,h)&&u())}})}function be(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Un({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=n!=null?n.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Vn(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function Oe(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function mn(n){return`react-resizable-panels:${n}`}function hn(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=e;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function zn(n,e){try{const t=mn(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Zn(n,e,t){var r,i;const o=(r=zn(n,t))!==null&&r!==void 0?r:{},l=hn(e);return(i=o[l])!==null&&i!==void 0?i:null}function On(n,e,t,r,i){var o;const l=mn(n),a=hn(e),s=(o=zn(n,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(h){console.error(h)}}function qe({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!j(r,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:e,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!j(i,0))for(let o=0;o<e.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:e,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,j(i,0)))break}return t}const qn=100,me={getItem:n=>(Oe(me),me.getItem(n)),setItem:(n,e)=>{Oe(me),me.setItem(n,e)}},Xe={};function yn({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:h,tagName:w="div",...p}){const u=Ge(o),v=f.useRef(null),[z,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),N=f.useRef({}),D=f.useRef(new Map),V=f.useRef(0),R=f.useRef({autoSaveId:n,direction:r,dragState:z,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>R.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current,d=qe({layout:c,panelConstraints:g.map(y=>y.constraints)});Ze(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,N.current))}}),[]),ne(()=>{R.current.autoSaveId=n,R.current.direction=r,R.current.dragState=z,R.current.id=u,R.current.onLayout=l,R.current.storage=s}),Wn({committedValuesRef:R,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(n){if(E.length===0||E.length!==c.length)return;let m=Xe[n];m==null&&(m=Vn(On,qn),Xe[n]=m);const b=[...c],g=new Map(D.current);m(n,b,g,E,s)}},[n,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=R.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(Z=>Z.constraints),{collapsedSize:y=0,panelSize:I,pivotIndices:$}=Q(g,c,b);if(x(I!=null,`Panel size not found for panel "${c.id}"`),!X(I,y)){D.current.set(c.id,I);const O=ie(g,c)===g.length-1?I-y:y-I,k=ge({delta:O,initialLayout:b,panelConstraints:d,pivotIndices:$,prevLayout:b,trigger:"imperative-api"});be(b,k)||(S(k),P.current.layout=k,m&&m(k),oe(g,k,N.current))}}},[]),q=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(K=>K.constraints),{collapsedSize:I=0,panelSize:$=0,minSize:Z=0,pivotIndices:O}=Q(d,c,g),k=m??Z;if(X($,I)){const K=D.current.get(c.id),de=K!=null&&K>=k?K:k,Le=ie(d,c)===d.length-1?$-de:de-$,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:O,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,N.current))}}},[]),W=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=Q(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return Un({defaultSize:m,dragState:z,layout:E,panelData:b,panelIndex:g})},[z,E]),M=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&X(y,g)},[]),Y=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=Q(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=R.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const $=Zn(c,d,b);$&&(D.current=new Map(Object.entries($.expandToSizes)),y=$.layout)}y==null&&(y=Kn({panelDataArray:d}));const I=qe({layout:y,panelConstraints:d.map($=>$.constraints)});Ze(g,I)||(S(I),P.current.layout=I,m&&m(I),oe(d,I,N.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const H=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:I,dragState:$,id:Z,keyboardResizeBy:O,onLayout:k}=R.current,{layout:K,panelDataArray:de}=P.current,{initialLayout:ve}=$??{},Le=dn(Z,c,y);let T=Fn(d,c,I,$,O,y);const We=I==="horizontal";We&&m&&(T=-T);const bn=de.map(Sn=>Sn.constraints),pe=ge({delta:T,initialLayout:ve??K,panelConstraints:bn,pivotIndices:Le,prevLayout:K,trigger:nn(d)?"keyboard":"mouse-or-touch"}),je=!be(K,pe);(tn(d)||rn(d))&&V.current!=T&&(V.current=T,!je&&T!==0?We?Ne(c,T<0?ln:an):Ne(c,T<0?sn:un):Ne(c,0)),je&&(S(pe),P.current.layout=pe,k&&k(pe),oe(de,pe,N.current))}},[]),B=f.useCallback((c,m)=>{const{onLayout:b}=R.current,{layout:g,panelDataArray:d}=P.current,y=d.map(K=>K.constraints),{panelSize:I,pivotIndices:$}=Q(d,c,g);x(I!=null,`Panel size not found for panel "${c.id}"`);const O=ie(d,c)===d.length-1?I-m:m-I,k=ge({delta:O,initialLayout:g,panelConstraints:y,pivotIndices:$,prevLayout:g,trigger:"imperative-api"});be(g,k)||(S(k),P.current.layout=k,b&&b(k),oe(d,k,N.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:I=0,collapsible:$,maxSize:Z=100,minSize:O=0}=c.constraints,{panelSize:k}=Q(g,c,b);k!=null&&(y&&$&&X(k,d)?X(d,I)||B(c,I):k<O?B(c,O):k>Z&&B(c,Z))},[B]),ue=f.useCallback((c,m)=>{const{direction:b}=R.current,{layout:g}=P.current;if(!v.current)return;const d=Re(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=gn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete N.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:z,expandPanel:q,getPanelSize:W,getPanelStyle:G,groupId:u,isPanelCollapsed:M,isPanelExpanded:Y,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:H,resizePanel:B,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,z,r,q,W,G,u,M,Y,se,_,H,B,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:e,className:t,id:o,ref:v,style:{...fe,...h},[A.group]:"",[A.groupDirection]:r,[A.groupId]:u}))}const xn=f.forwardRef((n,e)=>f.createElement(yn,{...n,forwardedRef:e}));yn.displayName="PanelGroup";xn.displayName="forwardRef(PanelGroup)";function ie(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function Q(n,e,t){const r=ie(n,e),o=r===n.length-1?[r-1,r]:[r,r+1],l=t[r];return{...e.constraints,panelSize:l,pivotIndices:o}}function Xn({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(n||t==null||r==null)return;const i=Re(e,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(A.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),h=fn(a,e,r);x(h!==null,`No resize element found for id "${e}"`);const w=l.shiftKey?h>0?h-1:s.length-1:h+1<s.length?h+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,n,e,t])}function vn({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:h,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...z}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:h,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=h,L.current.onPointerUp=w});const N=f.useContext(Ee);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:V,registerResizeHandle:R,startDragging:P,stopDragging:F,panelGroupElement:q}=N,W=Ge(i),[G,M]=f.useState("inactive"),[Y,_]=f.useState(!1),[H,B]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)B(null);else{const re=R(W);B(()=>re)}},[t,W,R]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||H==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return Dn(W,re,D,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(W,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&M("hover"),x(g,'Expected event to be defined for "move" action'),H(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:I}=L.current;y?.(!1),I?.(),fe||d?.();break}}})},[ue,D,t,ce,R,W,H,P,F]),Xn({disabled:t,handleId:W,resizeHandler:H,panelGroupElement:q});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...z,children:n,className:e,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[A.groupDirection]:D,[A.groupId]:V,[A.resizeHandle]:"",[A.resizeHandleActive]:G==="drag"?"pointer":Y?"keyboard":void 0,[A.resizeHandleEnabled]:!t,[A.resizeHandleId]:W,[A.resizeHandleState]:G})}vn.displayName="PanelResizeHandle";function Qn(n){const e=He.c(8);let t,r;e[0]!==n?({className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let i;e[3]!==t?(i=Je("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[3]=t,e[4]=i):i=e[4];let o;return e[5]!==r||e[6]!==i?(o=he.jsx(xn,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=o):o=e[7],o}function et(n){const e=He.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let r;return e[2]!==t?(r=he.jsx(en,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=r):r=e[3],r}function nt(n){const e=He.c(12);let t,r,i;e[0]!==n?({withHandle:i,className:t,...r}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let o;e[4]!==t?(o=Je("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=o):o=e[5];let l;e[6]!==i?(l=i&&he.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:he.jsx(Ye,{className:"size-2.5"})}),e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==r||e[9]!==o||e[10]!==l?(a=he.jsx(vn,{"data-slot":"resizable-handle",className:o,...r,children:l}),e[8]=r,e[9]=o,e[10]=l,e[11]=a):a=e[11],a}export{et as R,nt as a,Qn as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as x,j as u}from"./index-CFqw5CAk.js";import{c,B as p}from"./input-BSDBSyke.js";import{B as g}from"./badge-cip1W12x.js";function j(f){const e=x.c(12),{tabs:d,activeTab:n,onTabChange:s,className:l}=f;let t;e[0]!==l?(t=c("flex items-center gap-2 overflow-x-auto no-scrollbar",l),e[0]=l,e[1]=t):t=e[1];let o;if(e[2]!==n||e[3]!==s||e[4]!==d){let i;e[6]!==n||e[7]!==s?(i=r=>{const m=n===r.id;return u.jsxs(p,{variant:"outline",size:"sm",onClick:()=>s(r.id),className:c("h-8 rounded-lg border border-transparent bg-transparent px-3 py-1 hover:bg-muted",m&&"bg-muted border-input text-foreground font-medium",!m&&"text-muted-foreground font-normal"),children:[r.label,r.count!==void 0&&u.jsx(g,{variant:"secondary",className:c("ml-2 h-5 min-w-5 px-1 rounded-full text-[10px] font-mono",m?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:r.count})]},r.id)},e[6]=n,e[7]=s,e[8]=i):i=e[8],o=d.map(i),e[2]=n,e[3]=s,e[4]=d,e[5]=o}else o=e[5];let a;return e[9]!==t||e[10]!==o?(a=u.jsx("div",{className:t,children:o}),e[9]=t,e[10]=o,e[11]=a):a=e[11],a}export{j as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,at as Pe,ad as rt,ak as _e,j as d,au as st,ae as lt,av as be,aM as at,ac as k,aw as it,af as j,ah as N,aj as $,ax as ct,a8 as Ee,aW as dt,ai as ut,ay as pt,aB as ft,az as mt,aA as ht,aC as vt,aD as gt,aE as xt,aF as St,c as ee}from"./index-CFqw5CAk.js";import{V as wt,i as yt}from"./project-context-provider-C7-HmBKu.js";import{t as Re}from"./ChevronDown-BIixgdXr.js";import{c as oe}from"./input-BSDBSyke.js";function Ne(n,[e,t]){return Math.min(t,Math.max(e,n))}var Ct=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=at(J),[ne]=lt(J,[bt,Pe]),pe=Pe(),[Tt,G]=ne(J),[_t,Nt]=ne(J),je=n=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:r,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:w,required:y,form:S}=n,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[F,M]=c.useState(!1),re=rt(u),[P,O]=_e({prop:o,defaultProp:r??!1,onChange:i,caller:J}),[U,q]=_e({prop:s,defaultProp:l,onChange:a,caller:J}),L=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(st,{...p,children:d.jsxs(Tt,{required:y,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:be(),value:U,onValueChange:q,open:P,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:w,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(_t,{scope:n.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:y,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:w,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:o=!1,...r}=n,i=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,w,y]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),y()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(it,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...r,ref:a,onClick:N(r.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(r.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:N(r.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&w(p.key),!(v&&p.key===" ")&&Ct.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,children:i,placeholder:s="",...l}=n,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=k(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var Pt="SelectIcon",ke=c.forwardRef((n,e)=>{const{__scopeSelect:t,children:o,...r}=n;return d.jsx(j.span,{"aria-hidden":!0,...r,ref:e,children:o||"▼"})});ke.displayName=Pt;var Et="SelectPortal",Le=n=>d.jsx(ct,{asChild:!0,...n});Le.displayName=Et;var Q="SelectContent",Be=c.forwardRef((n,e)=>{const t=G(Q,n.__scopeSelect),[o,r]=c.useState();if($(()=>{r(new DocumentFragment)},[]),!t.open){const i=o;return i?Ee.createPortal(d.jsx(Ve,{scope:n.__scopeSelect,children:d.jsx(de.Slot,{scope:n.__scopeSelect,children:d.jsx("div",{children:n.children})})}),i):null}return d.jsx(He,{...n,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=ht("SelectContent.RemoveScroll"),He=c.forwardRef((n,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=n,m=G(Q,t),[x,F]=c.useState(null),[M,re]=c.useState(null),P=k(e,f=>F(f)),[O,U]=c.useState(null),[q,L]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return pt(x)},[x]),ft();const E=c.useCallback(f=>{const[T,...R]=B().map(_=>_.ref.current),[I]=R.slice(-1),b=document.activeElement;for(const _ of f)if(_===b||(_?.scrollIntoView({block:"nearest"}),_===T&&M&&(M.scrollTop=0),_===I&&M&&(M.scrollTop=M.scrollHeight),_?.focus(),document.activeElement!==b))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=I=>{f={x:Math.abs(Math.round(I.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(I.pageY)-(K.current?.y??0))}},R=I=>{f.x<=10&&f.y<=10?I.preventDefault():x.contains(I.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(b=>!b.disabled),R=T.find(b=>b.ref.current===document.activeElement),I=ot(T,f,R);I&&setTimeout(()=>I.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const I=!H.current&&!R;(m.value!==void 0&&m.value===T||I)&&(U(f),I&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const I=!H.current&&!R;(m.value!==void 0&&m.value===T||I)&&L(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:w,collisionPadding:y,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(mt,{as:jt,allowPinchZoom:!0,children:d.jsx(vt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(gt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let I=B().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(f.key)&&(I=I.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const b=f.target,_=I.indexOf(b);I=I.slice(_+1)}setTimeout(()=>E(I)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:o,...r}=n,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=k(e,P=>h(P)),w=ue(t),y=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const P=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const b=q.left-O.left,_=U.left-b,X=P.left-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const b=O.right-q.right,_=window.innerWidth-U.right-b,X=window.innerWidth-P.right-_,Z=P.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(_,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=w(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=P.top+P.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const b=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const _=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(b?he:0)+_+D),Z=T+X;l.style.height=Z+"px"}else{const b=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(b?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>y.current=!0)}},[w,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[F,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(P=>{P&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:y,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...r,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((n,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:r=A,...i}=n,s=pe(t);return d.jsx(xt,{...s,...i,ref:e,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Fe=c.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:o,...r}=n,i=Y(we,t),s=Te(we,t),l=k(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:N(r.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:w}=s;if(w?.current&&g){const y=Math.abs(a.current-h.scrollTop);if(y>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+y,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,kt]=ne(Ue),Lt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=be();return d.jsx(Dt,{scope:t,id:r,children:d.jsx(j.div,{role:"group","aria-labelledby":r,...o,ref:e})})});Lt.displayName=Ue;var We="SelectLabel",Bt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=kt(We,t);return d.jsx(j.div,{id:r.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((n,e)=>{const{__scopeSelect:t,value:o,disabled:r=!1,textValue:i,...s}=n,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[w,y]=c.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,r)),p=be(),v=c.useRef("touch"),C=()=>{r||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:r,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:r,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":w?"":void 0,"aria-selected":u&&w,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>y(!0)),onBlur:N(s.onBlur,()=>y(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{v.current=m.pointerType,r?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((n,e)=>{const{__scopeSelect:t,className:o,style:r,...i}=n,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,g]=c.useState(null),w=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),y=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:y},a.value),[a.disabled,a.value,y]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:w}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ee.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var ye="SelectScrollUpButton",Xe=c.forwardRef((n,e)=>{const t=Y(ye,n.__scopeSelect),o=Te(ye,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=ye;var Ce="SelectScrollDownButton",Ze=c.forwardRef((n,e)=>{const t=Y(Ce,n.__scopeSelect),o=Te(Ce,n.__scopeSelect),[r,i]=c.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),r?d.jsx(Je,{...n,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=Ce;var Je=c.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:o,...r}=n,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:N(r.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(r.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(r.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ft=c.forwardRef((n,e)=>{const{__scopeSelect:t,...o}=n,r=pe(t),i=G(Ie,t),s=Y(Ie,t);return i.open&&s.position==="popper"?d.jsx(St,{...r,...o,ref:e}):null});Ft.displayName=Ie;var Ut="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:n,value:e,...t},o)=>{const r=c.useRef(null),i=k(o,r),s=dt(e);return c.useEffect(()=>{const l=r.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...wt,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ut;function et(n){return n===""||n===void 0}function tt(n){const e=ut(n),t=c.useRef(""),o=c.useRef(0),r=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,r,i]}function ot(n,e,t){const r=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Wt(n,Math.max(i,0));r.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return a!==t?a:void 0}function Wt(n,e){return n.map((t,o)=>n[(e+o)%n.length])}var Kt=je,$t=Ae,Gt=De,Yt=ke,qt=Le,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;const nt=({size:n=24,color:e="currentColor",...t})=>c.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},c.createElement("path",{d:"m18 15-6-6-6 6"}));nt.displayName="ChevronUp";function co(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function uo(n){const e=ee.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function po(n){const e=ee.c(13);let t,o,r,i;e[0]!==n?({className:o,size:i,children:t,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...r,children:[t,a]}),e[8]=t,e[9]=r,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function fo(n){const e=ee.c(20);let t,o,r,i;e[0]!==n?({className:o,children:t,position:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?"popper":i,l=s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let a;e[5]!==o||e[6]!==l?(a=oe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",l,o),e[5]=o,e[6]=l,e[7]=a):a=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=d.jsx(no,{}),e[8]=u):u=e[8];const h=s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let g;e[9]!==h?(g=oe("p-1",h),e[9]=h,e[10]=g):g=e[10];let w;e[11]!==t||e[12]!==g?(w=d.jsx(Zt,{className:g,children:t}),e[11]=t,e[12]=g,e[13]=w):w=e[13];let y;e[14]===Symbol.for("react.memo_cache_sentinel")?(y=d.jsx(ro,{}),e[14]=y):y=e[14];let S;return e[15]!==s||e[16]!==r||e[17]!==a||e[18]!==w?(S=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:a,position:s,...r,children:[u,w,y]})}),e[15]=s,e[16]=r,e[17]=a,e[18]=w,e[19]=S):S=e[19],S}function mo(n){const e=ee.c(16);let t,o,r,i;e[0]!==n?({className:o,children:t,hideCheck:i,...r}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=r,e[4]=i):(t=e[1],o=e[2],r=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(yt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==r||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...r,children:[a,u]}),e[11]=r,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(nt,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}function ro(n){const e=ee.c(9);let t,o;e[0]!==n?({className:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let r;e[3]!==t?(r=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=r):r=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==r?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:r,...o,children:i}),e[6]=o,e[7]=r,e[8]=s):s=e[8],s}export{co as S,po as a,uo as b,fo as c,mo as d,Ne as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as C,h as B,B as D,x as K,w as P,j as s,s as $,c as Q,t as N,K as U,a as H,v as R}from"./index-CFqw5CAk.js";import{C as A}from"./collection-header-BAGohiuL.js";import{C as V}from"./collection-page-BIjUaFrN.js";import{u as W}from"./project-context-provider-C7-HmBKu.js";import{u as Y,I,B as S}from"./input-BSDBSyke.js";import{a as G,F as k,b as L,c as O,d as E,f as M,e as J}from"./form-BWvfCr5W.js";import{i as T}from"./X-DO5JCiO9.js";import"./collection-display-button-6se5sKw0.js";import"./dropdown-menu-DH78LFXJ.js";import"./ChevronRight-XFvS51AW.js";import"./Grid01-D8szKORD.js";import"./view-mode-toggle-DPmK0pgy.js";const q=({size:d=24,color:e="currentColor",...a})=>C.createElement("svg",{viewBox:"0 0 24 24",width:d,height:d,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},C.createElement("path",{d:"M21 15v1.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V15m14-7-5-5m0 0L7 8m5-5v12"}));q.displayName="Upload01";const X=$({name:R().min(1,"Name is required").max(255,"Name is too long"),slug:R().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:R().optional()});function Z(d){const e=Q.c(24),{value:a,onChange:r,name:m}=d,o=C.useRef(null);let u;e[0]!==r?(u=z=>{const F=z.target.files?.[0];if(F){if(F.size>2097152){N.error("Image must be smaller than 2MB");return}const c=new FileReader;c.onerror=()=>{const y=c.error;console.error("FileReader error:",y),N.error(y?.message||"Failed to read image file. Please try again."),o.current&&(o.current.value="")},c.onloadend=()=>{if(c.readyState===FileReader.DONE&&c.result){const y=c.result;r(y)}},c.readAsDataURL(F)}},e[0]=r,e[1]=u):u=e[1];const j=u;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{o.current?.click()},e[2]=i):i=e[2];const t=i;let l;e[3]!==r?(l=z=>{z.stopPropagation(),r("")},e[3]=r,e[4]=l):l=e[4];const n=l;let g;e[5]!==j?(g=s.jsx("input",{type:"file",ref:o,className:"hidden",accept:"image/*",onChange:j}),e[5]=j,e[6]=g):g=e[6];let h;e[7]!==n||e[8]!==m||e[9]!==a?(h=a?s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"h-20 w-20 rounded-lg border border-border bg-muted/20 overflow-hidden",children:s.jsx("img",{src:a,alt:m||"Organization logo",className:"w-full h-full object-cover"})}),s.jsx("button",{type:"button",onClick:n,className:"absolute -top-2 -right-2 h-6 w-6 rounded-full bg-destructive text-destructive-foreground opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:s.jsx(T,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:t,className:"h-20 w-20 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent/50 transition-colors flex flex-col items-center justify-center gap-1 text-muted-foreground hover:text-foreground",children:[s.jsx(q,{className:"h-5 w-5"}),s.jsx("span",{className:"text-xs",children:"Upload"})]}),e[7]=n,e[8]=m,e[9]=a,e[10]=h):h=e[10];const w=a?"Change Logo":"Upload Logo";let x;e[11]!==w?(x=s.jsx(S,{type:"button",variant:"outline",size:"sm",onClick:t,className:"mb-2",children:w}),e[11]=w,e[12]=x):x=e[12];let f;e[13]!==n||e[14]!==a?(f=a&&s.jsx(S,{type:"button",variant:"ghost",size:"sm",onClick:n,className:"ml-2",children:"Remove"}),e[13]=n,e[14]=a,e[15]=f):f=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Recommended: Square image, at least 200x200px. Max 2MB."}),e[16]=v):v=e[16];let p;e[17]!==x||e[18]!==f?(p=s.jsxs("div",{className:"flex-1",children:[x,f,v]}),e[17]=x,e[18]=f,e[19]=p):p=e[19];let b;return e[20]!==p||e[21]!==g||e[22]!==h?(b=s.jsxs("div",{className:"flex items-start gap-4",children:[g,h,p]}),e[20]=p,e[21]=g,e[22]=h,e[23]=b):b=e[23],b}function me(){const d=B(),{org:e}=W(),a=D(),[r,m]=C.useState(!1),o=K({resolver:P(X),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),u=Y({mutationFn:async t=>{const l={name:t.name,slug:t.slug};t.logo&&(l.logo=t.logo);const n=await H.organization.update({organizationId:e.id,data:l});if(n?.error)throw new Error(n.error.message||"Failed to update organization");return n},onSuccess:t=>{a.invalidateQueries({queryKey:U.organizations()}),a.invalidateQueries({queryKey:U.activeOrganization(e.slug)}),N.success("Organization settings updated successfully"),t?.data?.slug&&t.data.slug!==e.slug&&d({to:"/$org/settings",params:{org:t.data.slug}})},onError:t=>{N.error(t instanceof Error?t.message:"Failed to update organization")},onSettled:()=>{m(!1)}}),j=t=>{m(!0),u.mutate(t)},i=o.formState.isDirty;return s.jsxs(V,{children:[s.jsx(A,{title:"Settings"}),s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"p-5 max-w-2xl",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Organization"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Update your organization's name, slug, and logo."})]}),s.jsx(G,{...o,children:s.jsxs("form",{onSubmit:o.handleSubmit(j),className:"space-y-6",children:[s.jsx(k,{control:o.control,name:"name",render:({field:t})=>s.jsxs(L,{children:[s.jsx(O,{children:"Organization Name"}),s.jsx(E,{children:s.jsx(I,{placeholder:"My Organization",...t,disabled:r})}),s.jsx(M,{})]})}),s.jsx(k,{control:o.control,name:"slug",render:({field:t})=>s.jsxs(L,{children:[s.jsx(O,{children:"Organization Slug"}),s.jsx(E,{children:s.jsx(I,{placeholder:"my-organization",...t,disabled:r,onChange:l=>{const n=l.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");t.onChange(n)}})}),s.jsx(J,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(M,{})]})}),s.jsx(k,{control:o.control,name:"logo",render:({field:t})=>s.jsxs(L,{children:[s.jsx(O,{children:"Logo"}),s.jsx(E,{children:s.jsx(Z,{value:t.value,onChange:t.onChange,name:o.watch("name")})}),s.jsx(M,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(S,{type:"submit",disabled:!i||r,className:"min-w-24",children:r?"Saving...":"Save Changes"}),i&&s.jsx(S,{type:"button",variant:"outline",onClick:()=>o.reset(),disabled:r,children:"Cancel"})]})]})})]})})})})})]})}export{me as default};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{r as v,c as h,j as a,R as Ft,T as Kt,D as Zt,C as Yt,P as qt,e as Xt,O as Jt,f as Qt,g as es,h as Le,i as tt,k as ts,d as ht,a as Ne,l as ss,G as ns,U as os,m as as,S as pt,n as ls,o as is,N as rs,t as at,p as cs,K as ds,q as xt}from"./index-CFqw5CAk.js";import{E as st}from"./error-boundary-CSDpN3IU.js";import{i as ms}from"./File06-AO49hgxj.js";import{i as Pe}from"./X-DO5JCiO9.js";import{u as ye}from"./use-mobile-BTxzaR4j.js";import{c as z,B as Y,I as fs}from"./input-BSDBSyke.js";import{T as us,a as hs,b as ps,c as xs,u as De,L as lt,i as gs,P as bs,O as js}from"./project-context-provider-C7-HmBKu.js";import{u as gt,a as vs}from"./use-organization-settings-aN8k0KJJ.js";import{n as Ss,u as Cs,E as ws,I as it}from"./use-connection-BPzhCo7m.js";import{i as Qe}from"./use-gateway-C8QVevg7.js";import{C as Ns}from"./create-organization-dialog-D4ZZBa08.js";import{P as ys,a as _s,b as ks}from"./popover-DGwJ1U8B.js";import{A as we}from"./avatar-Cw7f7Fm7.js";import{c as Is}from"./Grid01-D8szKORD.js";import{D as $s,a as Ms,b as zs,c as Ts,u as Os,d as Es,e as As,G as Rs}from"./gateway-selector-C6BhGNmC.js";import{D as Ps,a as Ls,b as Ds,c as Hs,d as rt}from"./dropdown-menu-DH78LFXJ.js";import{a as Bs}from"./Copy01-Bbnq-cRP.js";import{n as ct}from"./LinkExternal01-DtwuKg3k.js";import{D as bt,a as jt,b as vt,c as St,d as Ct}from"./dialog-BPRbMnap.js";import{u as He,L as Be}from"./localstorage-keys-DnYi5wZr.js";import{C as A,u as dt,a as Us,b as Gs,c as Ws,d as Vs,N as Fs,G as Ks,U as Zs,T as Ys,M as qs,D as Xs}from"./thread-history-popover-BW6o5miO.js";import{R as wt,a as Js,b as Qs}from"./resizable-BkJdAL7l.js";import{i as en}from"./Loading01-BFMDuD9f.js";import{s as tn}from"./Plus-DCJuRkSA.js";import{u as sn}from"./use-binding-D77gExDp.js";import"./alert-dialog-BFj8FHOj.js";import"./form-BWvfCr5W.js";import"./spinner-PGFal9m1.js";import"./select-DLPmxXDW.js";import"./ChevronDown-BIixgdXr.js";import"./ChevronRight-XFvS51AW.js";import"./useQuery-DV_L-E86.js";import"./AlertCircle-CmTLFfTW.js";import"./textarea-CbNfP826.js";import"./Terminal-BgBiWCRz.js";import"./monaco-editor-18l2E7lk.js";import"./InfoCircle-DQgIwXgE.js";import"./well-known-mcp-D13f-8h2.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-DXJjsatW.js";import"./auth-CS1Cey1o.js";const Nt=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));Nt.displayName="BarChart10";const yt=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));yt.displayName="Building02";const _t=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));_t.displayName="ChevronSelectorVertical";const kt=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"M2 12h20M2 12c0 5.523 4.477 10 10 10M2 12C2 6.477 6.477 2 12 2m10 10c0 5.523-4.477 10-10 10m10-10c0-5.523-4.477-10-10-10m0 0a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10m0-20a15.3 15.3 0 0 0-4 10 15.3 15.3 0 0 0 4 10"}));kt.displayName="Globe01";const It=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"M9 21v-7.4c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 12 10.04 12 10.6 12h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 12.76 15 13.04 15 13.6V21M11.018 2.764 4.235 8.039c-.453.353-.68.53-.843.75a2 2 0 0 0-.318.65C3 9.704 3 9.991 3 10.565V17.8c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8v-7.235c0-.574 0-.861-.074-1.126a2.002 2.002 0 0 0-.318-.65c-.163-.22-.39-.397-.843-.75l-6.783-5.275c-.351-.273-.527-.41-.72-.462a1 1 0 0 0-.523 0c-.194.052-.37.189-.721.462Z"}));It.displayName="Home02";const $t=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"M15 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));$t.displayName="LayoutRight";const Mt=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));Mt.displayName="LogOut01";const zt=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"m2 7 8.165 5.715c.661.463.992.695 1.351.784a2 2 0 0 0 .968 0c.36-.09.69-.32 1.351-.784L22 7M6.8 20h10.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C22 17.72 22 16.88 22 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C19.72 4 18.88 4 17.2 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 20 5.12 20 6.8 20Z"}));zt.displayName="Mail01";const Tt=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}),v.createElement("path",{d:"M18.727 14.727a1.5 1.5 0 0 0 .3 1.655l.055.054a1.816 1.816 0 0 1 0 2.573 1.818 1.818 0 0 1-2.573 0l-.055-.055a1.5 1.5 0 0 0-1.654-.3 1.5 1.5 0 0 0-.91 1.373v.155a1.818 1.818 0 1 1-3.636 0V20.1a1.5 1.5 0 0 0-.981-1.373 1.5 1.5 0 0 0-1.655.3l-.054.055a1.818 1.818 0 0 1-3.106-1.287 1.818 1.818 0 0 1 .533-1.286l.054-.055a1.5 1.5 0 0 0 .3-1.654 1.5 1.5 0 0 0-1.372-.91h-.155a1.818 1.818 0 1 1 0-3.636H3.9a1.5 1.5 0 0 0 1.373-.981 1.5 1.5 0 0 0-.3-1.655l-.055-.054A1.818 1.818 0 1 1 7.491 4.99l.054.054a1.5 1.5 0 0 0 1.655.3h.073a1.5 1.5 0 0 0 .909-1.372v-.155a1.818 1.818 0 0 1 3.636 0V3.9a1.499 1.499 0 0 0 .91 1.373 1.5 1.5 0 0 0 1.654-.3l.054-.055a1.817 1.817 0 0 1 2.573 0 1.819 1.819 0 0 1 0 2.573l-.055.054a1.5 1.5 0 0 0-.3 1.655v.073a1.5 1.5 0 0 0 1.373.909h.155a1.818 1.818 0 0 1 0 3.636H20.1a1.499 1.499 0 0 0-1.373.91Z"}));Tt.displayName="Settings01";const Ot=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"M5.316 19.438A4.001 4.001 0 0 1 9 17h6a4.001 4.001 0 0 1 3.684 2.438M16 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm6 2.5c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ot.displayName="UserCircle";const Et=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"M22 21v-2a4.002 4.002 0 0 0-3-3.874M15.5 3.291a4.001 4.001 0 0 1 0 7.418M17 21c0-1.864 0-2.796-.305-3.53a4 4 0 0 0-2.164-2.165C13.796 15 12.864 15 11 15H8c-1.864 0-2.796 0-3.53.305a4 4 0 0 0-2.166 2.164C2 18.204 2 19.136 2 21M13.5 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"}));Et.displayName="Users01";const At=({size:t=24,color:e="currentColor",...s})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},v.createElement("path",{d:"M13 2 4.093 12.688c-.348.418-.523.628-.525.804a.5.5 0 0 0 .185.397c.138.111.41.111.955.111H12l-1 8 8.907-10.688c.348-.418.523-.628.525-.804a.5.5 0 0 0-.185-.397c-.138-.111-.41-.111-.955-.111H12l1-8Z"}));At.displayName="Zap";function nn(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;return e[2]!==s?(o=a.jsx(Ft,{"data-slot":"sheet",...s}),e[2]=s,e[3]=o):o=e[3],o}function on(t){const e=h.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;return e[2]!==s?(o=a.jsx(qt,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=o):o=e[3],o}function an(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx(Jt,{"data-slot":"sheet-overlay",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}function ln(t){const e=h.c(17);let s,o,n,l;e[0]!==t?({className:o,children:s,side:l,...n}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=n,e[4]=l):(s=e[1],o=e[2],n=e[3],l=e[4]);const i=l===void 0?"right":l;let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(an,{}),e[5]=c):c=e[5];const r=i==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",d=i==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",m=i==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",f=i==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let u;e[6]!==o||e[7]!==r||e[8]!==d||e[9]!==m||e[10]!==f?(u=z("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",r,d,m,f,o),e[6]=o,e[7]=r,e[8]=d,e[9]=m,e[10]=f,e[11]=u):u=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsxs(Xt,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[a.jsx(Pe,{className:"size-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=x):x=e[12];let p;return e[13]!==s||e[14]!==n||e[15]!==u?(p=a.jsxs(on,{children:[c,a.jsxs(Yt,{"data-slot":"sheet-content",className:u,...n,children:[s,x]})]}),e[13]=s,e[14]=n,e[15]=u,e[16]=p):p=e[16],p}function rn(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("flex flex-col gap-1.5 p-4",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx("div",{"data-slot":"sheet-header",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}function cn(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("text-foreground font-semibold",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx(Kt,{"data-slot":"sheet-title",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}function dn(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("text-muted-foreground text-sm",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx(Zt,{"data-slot":"sheet-description",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}function Rt(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx("div",{"data-slot":"skeleton",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}const mn="sidebar_state",fn=3600*24*7,un="16rem",hn="18rem",pn="3rem",xn="b",Pt=v.createContext(null);function nt(){const t=v.useContext(Pt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function gn(t){const e=h.c(21),{defaultOpen:s,open:o,onOpenChange:n,children:l}=t,i=s===void 0?!0:s,c=ye(),[r,d]=v.useState(!1),[m,f]=v.useState(i),u=o??m;let x;e[0]!==u||e[1]!==n?(x=M=>{const $=typeof M=="function"?M(u):M;n?n($):f($),document.cookie=`${mn}=${$}; path=/; max-age=${fn}`},e[0]=u,e[1]=n,e[2]=x):x=e[2];const p=x;let S;e[3]!==c||e[4]!==p?(S=()=>c?d(jn):p(bn),e[3]=c,e[4]=p,e[5]=S):S=e[5];const g=S;let b,j;e[6]!==g?(b=()=>{const M=$=>{if($.key===xn&&($.metaKey||$.ctrlKey)){const N=$.target;if(N.tagName==="INPUT"||N.tagName==="TEXTAREA"||N.isContentEditable)return;$.preventDefault(),g()}};return globalThis.addEventListener("keydown",M),()=>globalThis.removeEventListener("keydown",M)},j=[g],e[6]=g,e[7]=b,e[8]=j):(b=e[7],j=e[8]),v.useEffect(b,j);const _=u?"expanded":"collapsed";let w;e[9]!==c||e[10]!==u||e[11]!==r||e[12]!==p||e[13]!==_||e[14]!==g?(w={state:_,open:u,setOpen:p,isMobile:c,openMobile:r,setOpenMobile:d,toggleSidebar:g},e[9]=c,e[10]=u,e[11]=r,e[12]=p,e[13]=_,e[14]=g,e[15]=w):w=e[15];const y=w;let C;e[16]!==l?(C=a.jsx(hs,{delayDuration:0,children:l}),e[16]=l,e[17]=C):C=e[17];let k;return e[18]!==y||e[19]!==C?(k=a.jsx(Pt.Provider,{value:y,children:C}),e[18]=y,e[19]=C,e[20]=k):k=e[20],k}function bn(t){return!t}function jn(t){return!t}function vn(t){const e=h.c(14);let s,o,n,l;e[0]!==t?({className:o,style:l,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=n,e[4]=l):(s=e[1],o=e[2],n=e[3],l=e[4]);let i;e[5]!==l?(i={"--sidebar-width":un,"--sidebar-width-icon":pn,...l},e[5]=l,e[6]=i):i=e[6];const c=i;let r;e[7]!==o?(r=z("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",o),e[7]=o,e[8]=r):r=e[8];let d;return e[9]!==s||e[10]!==n||e[11]!==c||e[12]!==r?(d=a.jsx("div",{"data-slot":"sidebar-wrapper",style:c,className:r,...n,children:s}),e[9]=s,e[10]=n,e[11]=c,e[12]=r,e[13]=d):d=e[13],d}function Sn(t){const e=h.c(46);let s,o,n,l,i,c;e[0]!==t?({side:l,variant:i,collapsible:c,className:o,children:s,...n}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=n,e[4]=l,e[5]=i,e[6]=c):(s=e[1],o=e[2],n=e[3],l=e[4],i=e[5],c=e[6]);const r=l===void 0?"left":l,d=i===void 0?"sidebar":i,m=c===void 0?"offcanvas":c,{isMobile:f,state:u,openMobile:x,setOpenMobile:p}=nt();if(m==="none"){let $;e[7]!==o?($=z("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",o),e[7]=o,e[8]=$):$=e[8];let N;return e[9]!==s||e[10]!==n||e[11]!==$?(N=a.jsx("div",{"data-slot":"sidebar",className:$,...n,children:s}),e[9]=s,e[10]=n,e[11]=$,e[12]=N):N=e[12],N}if(f){let $;e[13]===Symbol.for("react.memo_cache_sentinel")?($={"--sidebar-width":hn},e[13]=$):$=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=a.jsxs(rn,{className:"sr-only",children:[a.jsx(cn,{children:"Sidebar"}),a.jsx(dn,{children:"Displays the mobile sidebar."})]}),e[14]=N):N=e[14];let T;e[15]!==s?(T=a.jsx("div",{className:"flex h-full w-full flex-col",children:s}),e[15]=s,e[16]=T):T=e[16];let R;e[17]!==r||e[18]!==T?(R=a.jsxs(ln,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:$,side:r,children:[N,T]}),e[17]=r,e[18]=T,e[19]=R):R=e[19];let H;return e[20]!==x||e[21]!==n||e[22]!==p||e[23]!==R?(H=a.jsx(nn,{open:x,onOpenChange:p,...n,children:R}),e[20]=x,e[21]=n,e[22]=p,e[23]=R,e[24]=H):H=e[24],H}const S=u==="collapsed"?m:"",g=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[25]!==g?(b=z("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",g),e[25]=g,e[26]=b):b=e[26];let j;e[27]!==b?(j=a.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[27]=b,e[28]=j):j=e[28];const _=r==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",w=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let y;e[29]!==o||e[30]!==_||e[31]!==w?(y=z("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",_,w,o),e[29]=o,e[30]=_,e[31]=w,e[32]=y):y=e[32];let C;e[33]!==s?(C=a.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border py-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s}),e[33]=s,e[34]=C):C=e[34];let k;e[35]!==n||e[36]!==y||e[37]!==C?(k=a.jsx("div",{"data-slot":"sidebar-container",className:y,...n,children:C}),e[35]=n,e[36]=y,e[37]=C,e[38]=k):k=e[38];let M;return e[39]!==r||e[40]!==u||e[41]!==k||e[42]!==S||e[43]!==j||e[44]!==d?(M=a.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":u,"data-collapsible":S,"data-variant":d,"data-side":r,"data-slot":"sidebar",children:[j,k]}),e[39]=r,e[40]=u,e[41]=k,e[42]=S,e[43]=j,e[44]=d,e[45]=M):M=e[45],M}function Cn(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx("main",{"data-slot":"sidebar-inset",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}function wn(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("h-4 m-0! w-full",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx("div",{"data-sidebar":"separator",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}function Nn(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}function yn(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}function _n(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("w-full text-sm",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}function kn(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("flex w-full min-w-0 flex-col gap-1",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}function Ue(t){const e=h.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let n;e[3]!==s?(n=z("group/menu-item relative",s),e[3]=s,e[4]=n):n=e[4];let l;return e[5]!==o||e[6]!==n?(l=a.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...o}),e[5]=o,e[6]=n,e[7]=l):l=e[7],l}const In=Qt("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-7 text-sm font-[450]",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Lt(t){const e=h.c(28);let s,o,n,l,i,c,r;e[0]!==t?({asChild:n,isActive:l,variant:i,size:c,tooltip:r,className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=n,e[4]=l,e[5]=i,e[6]=c,e[7]=r):(s=e[1],o=e[2],n=e[3],l=e[4],i=e[5],c=e[6],r=e[7]);const d=n===void 0?!1:n,m=l===void 0?!1:l,f=i===void 0?"default":i,u=c===void 0?"default":c,x=d?es:"button",{isMobile:p,state:S}=nt();let g;e[8]!==s||e[9]!==u||e[10]!==f?(g=z(In({variant:f,size:u}),s),e[8]=s,e[9]=u,e[10]=f,e[11]=g):g=e[11];let b;e[12]!==x||e[13]!==m||e[14]!==o||e[15]!==u||e[16]!==g?(b=a.jsx(x,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":u,"data-active":m,className:g,...o}),e[12]=x,e[13]=m,e[14]=o,e[15]=u,e[16]=g,e[17]=b):b=e[17];const j=b;if(!r)return j;if(typeof r=="string"){let k;e[18]!==r?(k={children:r},e[18]=r,e[19]=k):k=e[19],r=k}let _;e[20]!==j?(_=a.jsx(ps,{asChild:!0,children:j}),e[20]=j,e[21]=_):_=e[21];const w=S!=="collapsed"||p;let y;e[22]!==w||e[23]!==r?(y=a.jsx(us,{side:"right",align:"center",hidden:w,...r}),e[22]=w,e[23]=r,e[24]=y):y=e[24];let C;return e[25]!==_||e[26]!==y?(C=a.jsxs(xs,{children:[_,y]}),e[25]=_,e[26]=y,e[27]=C):C=e[27],C}function $n(t){const e=h.c(26),{item:s}=t,o=Le(),{org:n}=De(),l=gt(n.id),i=vs(n.id);let c;e[0]!==i.update||e[1]!==s.url||e[2]!==l?.sidebar_items?(c=async()=>{const w=(l?.sidebar_items||[]).filter(y=>y.url!==s.url);await i.update.mutateAsync({sidebar_items:w})},e[0]=i.update,e[1]=s.url,e[2]=l?.sidebar_items,e[3]=c):c=e[3];const r=c;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=/^https?:\/\/.+/,e[4]=d):d=e[4];let m;e[5]!==s.icon?(m=d.test(s.icon),e[5]=s.icon,e[6]=m):m=e[6];const f=m;let u;e[7]!==s.url||e[8]!==o?(u=()=>{o({to:s.url})},e[7]=s.url,e[8]=o,e[9]=u):u=e[9];const x=s.title;let p;e[10]!==f||e[11]!==s.icon||e[12]!==s.title?(p=a.jsx("div",{className:"flex items-center justify-center shrink-0",children:f?a.jsx("img",{src:s.icon,alt:s.title,className:"h-4 w-4 rounded object-cover"}):a.jsx(ms,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=f,e[11]=s.icon,e[12]=s.title,e[13]=p):p=e[13];let S;e[14]!==s.title?(S=s.title.toLocaleLowerCase(),e[14]=s.title,e[15]=S):S=e[15];let g;e[16]!==S?(g=a.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:a.jsx("span",{className:"truncate text-sm w-full capitalize",children:S})}),e[16]=S,e[17]=g):g=e[17];let b;e[18]!==r?(b=a.jsx(Pe,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:_=>{_.preventDefault(),_.stopPropagation(),r()}}),e[18]=r,e[19]=b):b=e[19];let j;return e[20]!==s.title||e[21]!==u||e[22]!==p||e[23]!==g||e[24]!==b?(j=a.jsx(Ue,{children:a.jsxs(Lt,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:u,tooltip:x,children:[p,g,b]})}),e[20]=s.title,e[21]=u,e[22]=p,e[23]=g,e[24]=b,e[25]=j):j=e[25],j}function Mn(){const t=h.c(4),{org:e}=De(),o=gt(e.id)?.sidebar_items;if(!o?.length)return null;let n;t[0]!==o?(n=o.map(zn),t[0]=o,t[1]=n):n=t[1];let l;return t[2]!==n?(l=a.jsx(Dt,{children:n}),t[2]=n,t[3]=l):l=t[3],l}function zn(t){return a.jsx($n,{item:t},t.url)}function mt(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(Ue,{children:a.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:a.jsx(Rt,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function Dt(t){const e=h.c(4),{children:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(wn,{className:"my-2 -ml-1"}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx(Ue,{children:a.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:a.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=n):n=e[1];let l;return e[2]!==s?(l=a.jsxs(a.Fragment,{children:[o,n,s]}),e[2]=s,e[3]=l):l=e[3],l}function Tn(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(v.Suspense,{fallback:a.jsxs(Dt,{children:[a.jsx(mt,{}),a.jsx(mt,{})]}),children:a.jsx(Mn,{})}),t[0]=e):e=t[0],e}function On(){const t=h.c(49),{locator:e}=De(),s=Le(),o=tt();let n;t[0]!==e?(n=lt.parse(e),t[0]=e,t[1]=n):n=t[1];const{org:l}=n;let i;t[2]!==e?(i=lt.isOrgAdminProject(e),t[2]=e,t[3]=i):i=t[3];const c=i,r=o.location.pathname===`/${l}`||o.location.pathname===`/${l}/`;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(It,{}),t[4]=d):d=t[4];let m;t[5]!==r||t[6]!==s||t[7]!==l?(m={key:"home",label:"Home",icon:d,onClick:()=>{r?window.dispatchEvent(new CustomEvent("reset-home-view")):s({to:"/$org",params:{org:l}})}},t[5]=r,t[6]=s,t[7]=l,t[8]=m):m=t[8];let f;t[9]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(yt,{}),t[9]=f):f=t[9];let u;t[10]!==s||t[11]!==l?(u={key:"store",label:"Store",icon:f,onClick:()=>s({to:"/$org/store",params:{org:l}})},t[10]=s,t[11]=l,t[12]=u):u=t[12];let x;t[13]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(Ss,{}),t[13]=x):x=t[13];let p;t[14]!==s||t[15]!==l?(p={key:"mcps",label:"Connections",icon:x,onClick:()=>s({to:"/$org/mcps",params:{org:l}})},t[14]=s,t[15]=l,t[16]=p):p=t[16];let S;t[17]===Symbol.for("react.memo_cache_sentinel")?(S=a.jsx(Qe,{}),t[17]=S):S=t[17];let g;t[18]!==s||t[19]!==l?(g={key:"gateways",label:"Hubs",icon:S,onClick:()=>s({to:"/$org/gateways",params:{org:l}})},t[18]=s,t[19]=l,t[20]=g):g=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx(At,{}),t[21]=b):b=t[21];let j;t[22]!==s||t[23]!==l?(j={key:"workflow",label:"Workflows",icon:b,onClick:()=>s({to:"/$org/workflows",params:{org:l}})},t[22]=s,t[23]=l,t[24]=j):j=t[24];let _;t[25]===Symbol.for("react.memo_cache_sentinel")?(_=a.jsx(Nt,{}),t[25]=_):_=t[25];let w;t[26]!==s||t[27]!==l?(w={key:"monitoring",label:"Monitoring",icon:_,onClick:()=>s({to:"/$org/monitoring",params:{org:l}})},t[26]=s,t[27]=l,t[28]=w):w=t[28];let y;t[29]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Et,{}),t[29]=y):y=t[29];let C;t[30]!==s||t[31]!==l?(C={key:"members",label:"Members",icon:y,onClick:()=>s({to:"/$org/members",params:{org:l}})},t[30]=s,t[31]=l,t[32]=C):C=t[32];let k;t[33]===Symbol.for("react.memo_cache_sentinel")?(k=a.jsx(Tt,{}),t[33]=k):k=t[33];let M;t[34]!==s||t[35]!==l?(M={key:"settings",label:"Settings",icon:k,onClick:()=>s({to:"/$org/settings",params:{org:l}})},t[34]=s,t[35]=l,t[36]=M):M=t[36];let $;t[37]!==j||t[38]!==w||t[39]!==C||t[40]!==M||t[41]!==m||t[42]!==u||t[43]!==p||t[44]!==g?($=[m,u,p,g,j,w,C,M],t[37]=j,t[38]=w,t[39]=C,t[40]=M,t[41]=m,t[42]=u,t[43]=p,t[44]=g,t[45]=$):$=t[45];const N=$;let T;return t[46]!==N||t[47]!==c?(T=c?N:[],t[46]=N,t[47]=c,t[48]=T):T=t[48],T}function Ht(t){const e=h.c(10),{navigationItems:s,footer:o,additionalContent:n,variant:l,collapsible:i}=t,c=l===void 0?"sidebar":l,r=i===void 0?"icon":i;let d;e[0]!==s?(d=s.map(En),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==n||e[3]!==d?(m=a.jsx(Nn,{className:"flex-1 overflow-x-hidden",children:a.jsx(yn,{className:"font-medium",children:a.jsx(_n,{children:a.jsxs(kn,{className:"gap-0.5",children:[d,n]})})})}),e[2]=n,e[3]=d,e[4]=m):m=e[4];let f;return e[5]!==r||e[6]!==o||e[7]!==m||e[8]!==c?(f=a.jsxs(Sn,{variant:c,collapsible:r,children:[m,o]}),e[5]=r,e[6]=o,e[7]=m,e[8]=c,e[9]=f):f=e[9],f}function En(t){return a.jsx(Ue,{children:a.jsxs(Lt,{className:"group/nav-item cursor-pointer text-foreground/90 hover:text-foreground",onClick:t.onClick,isActive:t.isActive,tooltip:t.label,children:[a.jsx("span",{className:"text-muted-foreground group-hover/nav-item:text-foreground transition-colors [&>svg]:size-4",children:t.icon}),a.jsx("span",{className:"truncate",children:t.label})]})},t.key)}Ht.Skeleton=function(){return a.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>a.jsx("div",{className:"w-full h-8",children:a.jsx(Rt,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function An(){const t=h.c(3),e=On();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx(a.Fragment,{children:a.jsx(st,{children:a.jsx(v.Suspense,{fallback:null,children:a.jsx(Tn,{})})})}),t[0]=s):s=t[0];let o;return t[1]!==e?(o=a.jsx(Ht,{navigationItems:e,additionalContent:s}),t[1]=e,t[2]=o):o=t[2],o}function Rn(t){const e=h.c(12);let s,o,n,l;e[0]!==t?({className:s,orientation:n,decorative:l,...o}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=n,e[4]=l):(s=e[1],o=e[2],n=e[3],l=e[4]);const i=n===void 0?"horizontal":n,c=l===void 0?!0:l;let r;e[5]!==s?(r=z("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",s),e[5]=s,e[6]=r):r=e[6];let d;return e[7]!==c||e[8]!==i||e[9]!==o||e[10]!==r?(d=a.jsx(ts,{"data-slot":"separator-root",decorative:c,orientation:i,className:r,...o}),e[7]=c,e[8]=i,e[9]=o,e[10]=r,e[11]=d):d=e[11],d}const Bt=v.createContext(null);function Pn(){const t=v.useContext(Bt);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function Ln(t){const e=h.c(10),{children:s,onItemHover:o}=t,[n,l]=v.useState(null);let i;e[0]!==o?(i=f=>{l(f),o?.(f)},e[0]=o,e[1]=i):i=e[1];const c=i;let r;e[2]!==n||e[3]!==c?(r={hoveredItem:n,setHoveredItem:c},e[2]=n,e[3]=c,e[4]=r):r=e[4];let d;e[5]!==s?(d=a.jsx(ys,{children:s}),e[5]=s,e[6]=d):d=e[6];let m;return e[7]!==r||e[8]!==d?(m=a.jsx(Bt.Provider,{value:r,children:d}),e[7]=r,e[8]=d,e[9]=m):m=e[9],m}function Dn(t){const e=h.c(6),{children:s,onClick:o}=t;let n;e[0]!==s||e[1]!==o?(n=a.jsx(Y,{variant:"link",className:"p-0.5 h-auto",onClick:o,type:"button",children:s}),e[0]=s,e[1]=o,e[2]=n):n=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(_s,{asChild:!0,children:a.jsx(Y,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:a.jsx(_t,{size:16,className:"opacity-50"})})}),e[3]=l):l=e[3];let i;return e[4]!==n?(i=a.jsxs("div",{className:"flex items-center gap-1",children:[n,l]}),e[4]=n,e[5]=i):i=e[5],i}function Hn(t){const e=h.c(8),{item:s,fallback:o}=t,n=o===void 0?"":o,l=s?.avatarUrl??"",i=s?.name??n;let c;e[0]!==l||e[1]!==i?(c=a.jsx(we,{url:l,fallback:i,size:"xs",objectFit:"contain"}),e[0]=l,e[1]=i,e[2]=c):c=e[2];const r=s?.name??n;let d;e[3]!==r?(d=a.jsx("span",{children:r}),e[3]=r,e[4]=d):d=e[4];let m;return e[5]!==c||e[6]!==d?(m=a.jsxs("div",{className:"flex items-center gap-2",children:[c,d]}),e[5]=c,e[6]=d,e[7]=m):m=e[7],m}function Bn(t){const e=h.c(6),{children:s,align:o}=t,n=o===void 0?"start":o,i=v.Children.toArray(s).filter(Un).length===1?"280px":"480px";let c;e[0]!==i?(c={width:i},e[0]=i,e[1]=c):c=e[1];let r;return e[2]!==n||e[3]!==s||e[4]!==c?(r=a.jsx(ks,{align:n,className:"p-0 flex items-start",style:c,children:s}),e[2]=n,e[3]=s,e[4]=c,e[5]=r):r=e[5],r}function Un(t){return v.isValidElement(t)&&(t.type===Gt||t.type===Ut)}function Ut(t){const e=h.c(5),{children:s,className:o}=t;let n;e[0]!==o?(n=z("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",o),e[0]=o,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=a.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}const Gt=Ut;function Gn(t){const e=h.c(6),{placeholder:s,value:o,onChange:n}=t,l=s===void 0?"Search...":s;let i;e[0]!==n?(i=r=>n(r.target.value),e[0]=n,e[1]=i):i=e[1];let c;return e[2]!==l||e[3]!==i||e[4]!==o?(c=a.jsx(fs,{placeholder:l,value:o,onChange:i,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=l,e[3]=i,e[4]=o,e[5]=c):c=e[5],c}function Wn(t){const e=h.c(6),{children:s,emptyMessage:o}=t,n=o===void 0?"No items found.":o,l=v.Children.count(s)>0;let i;e[0]!==n||e[1]!==l?(i=!l&&a.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:n}),e[0]=n,e[1]=l,e[2]=i):i=e[2];let c;return e[3]!==s||e[4]!==i?(c=a.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[i,s]}),e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function Vn(t){const e=h.c(15),{item:s,onClick:o,onHover:n,children:l}=t,i=Pn();let c;e[0]!==i||e[1]!==s||e[2]!==n?(c=()=>{i.setHoveredItem(s.slug),n?.(s)},e[0]=i,e[1]=s,e[2]=n,e[3]=c):c=e[3];const r=c;let d;e[4]!==s||e[5]!==o?(d=()=>o(s),e[4]=s,e[5]=o,e[6]=d):d=e[6];let m;e[7]!==l||e[8]!==s.avatarUrl||e[9]!==s.name?(m=l||a.jsxs(a.Fragment,{children:[a.jsx(we,{url:s.avatarUrl??"",fallback:s.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),a.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.name})]}),e[7]=l,e[8]=s.avatarUrl,e[9]=s.name,e[10]=m):m=e[10];let f;return e[11]!==r||e[12]!==d||e[13]!==m?(f=a.jsx(Y,{onClick:d,onMouseEnter:r,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:m}),e[11]=r,e[12]=d,e[13]=m,e[14]=f):f=e[14],f}function Fn(t){const e=h.c(2),{children:s}=t;let o;return e[0]!==s?(o=a.jsx("div",{className:"px-1 pb-1 pt-0.5",children:s}),e[0]=s,e[1]=o):o=e[1],o}function Kn(t){const e=h.c(11),{onClick:s,icon:o,children:n,variant:l}=t,c=(l===void 0?"default":l)==="muted"&&"text-muted-foreground";let r;e[0]!==c?(r=z("w-full justify-start font-normal",c),e[0]=c,e[1]=r):r=e[1];let d;e[2]!==o?(d=o&&a.jsx("span",{className:"[&>svg]:size-4",children:o}),e[2]=o,e[3]=d):d=e[3];let m;e[4]!==n?(m=a.jsx("span",{children:n}),e[4]=n,e[5]=m):m=e[5];let f;return e[6]!==s||e[7]!==r||e[8]!==d||e[9]!==m?(f=a.jsxs(Y,{variant:"ghost",size:"sm",className:r,onClick:s,children:[d,m]}),e[6]=s,e[7]=r,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}function Zn(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(Rn,{}),t[0]=e):e=t[0],e}function Yn(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const D=Object.assign(Ln,{Trigger:Dn,CurrentItem:Hn,Content:Bn,Panel:Gt,Search:Gn,Items:Wn,Item:Vn,Actions:Fn,Action:Kn,Separator:Zn,Skeleton:Yn});function et(){const t=h.c(59);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=ht(e),{data:o}=Ne.useListOrganizations(),n=Le();let l;t[1]!==s||t[2]!==o?(l=o?.find(V=>V.slug===s),t[1]=s,t[2]=o,t[3]=l):l=t[3];const i=l,[c,r]=v.useState(""),[d,m]=v.useState(!1);let f,u,x,p,S,g,b,j;if(t[4]!==i||t[5]!==n||t[6]!==s||t[7]!==c||t[8]!==o){const q=(o?(()=>{const B=o.filter(U=>U.name.toLowerCase().includes(c.toLowerCase()));if(s){const U=B.findIndex(K=>K.slug===s);if(U>0){const K=B[U];K&&(B.splice(U,1),B.unshift(K))}}return B})():[]).map(qn);let I;t[17]!==i?(I=i?{slug:i.slug,name:i.name,avatarUrl:i.logo}:void 0,t[17]=i,t[18]=I):I=t[18];const W=I;p=D;let O;t[19]!==n||t[20]!==s?(O=()=>n({to:"/$org",params:{org:s??""}}),t[19]=n,t[20]=s,t[21]=O):O=t[21];let P;t[22]!==W?(P=a.jsx(D.CurrentItem,{item:W}),t[22]=W,t[23]=P):P=t[23],t[24]!==O||t[25]!==P?(j=a.jsx(D.Trigger,{onClick:O,children:P}),t[24]=O,t[25]=P,t[26]=j):j=t[26],x=D.Content,u=D.Panel,t[27]!==c?(b=a.jsx(D.Search,{placeholder:"Search organizations...",value:c,onChange:r}),t[27]=c,t[28]=b):b=t[28],f=D.Items,S="No organizations found.";let L;t[29]!==n?(L=B=>a.jsx(D.Item,{item:B,onClick:U=>n({to:"/$org",params:{org:U.slug}})},B.slug),t[29]=n,t[30]=L):L=t[30],g=q.map(L),t[4]=i,t[5]=n,t[6]=s,t[7]=c,t[8]=o,t[9]=f,t[10]=u,t[11]=x,t[12]=p,t[13]=S,t[14]=g,t[15]=b,t[16]=j}else f=t[9],u=t[10],x=t[11],p=t[12],S=t[13],g=t[14],b=t[15],j=t[16];let _;t[31]!==f||t[32]!==S||t[33]!==g?(_=a.jsx(f,{emptyMessage:S,children:g}),t[31]=f,t[32]=S,t[33]=g,t[34]=_):_=t[34];let w,y;t[35]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(D.Actions,{children:a.jsx(D.Action,{onClick:()=>m(!0),variant:"muted",children:"+ Create organization"})}),y=a.jsx(D.Separator,{}),t[35]=w,t[36]=y):(w=t[35],y=t[36]);let C;t[37]!==n?(C=()=>n({to:"/"}),t[37]=n,t[38]=C):C=t[38];let k;t[39]===Symbol.for("react.memo_cache_sentinel")?(k=a.jsx(Is,{}),t[39]=k):k=t[39];let M;t[40]!==C?(M=a.jsx(D.Actions,{children:a.jsx(D.Action,{onClick:C,icon:k,children:"See all organizations"})}),t[40]=C,t[41]=M):M=t[41];let $;t[42]!==u||t[43]!==M||t[44]!==b||t[45]!==_?($=a.jsxs(u,{children:[b,_,w,y,M]}),t[42]=u,t[43]=M,t[44]=b,t[45]=_,t[46]=$):$=t[46];let N;t[47]!==x||t[48]!==$?(N=a.jsx(x,{children:$}),t[47]=x,t[48]=$,t[49]=N):N=t[49];let T;t[50]!==p||t[51]!==N||t[52]!==j?(T=a.jsxs(p,{children:[j,N]}),t[50]=p,t[51]=N,t[52]=j,t[53]=T):T=t[53];let R;t[54]!==d?(R=a.jsx(Ns,{open:d,onOpenChange:m}),t[54]=d,t[55]=R):R=t[55];let H;return t[56]!==T||t[57]!==R?(H=a.jsxs(a.Fragment,{children:[T,R]}),t[56]=T,t[57]=R,t[58]=H):H=t[58],H}function qn(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}et.Skeleton=D.Skeleton;const Wt=v.createContext({setOpen:()=>{}}),Xn=()=>v.useContext(Wt),Jn=t=>{const e=h.c(25);let s,o,n,l,i;e[0]!==t?({children:s,defaultOpen:o,open:l,onOpenChange:n,...i}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=n,e[4]=l,e[5]=i):(s=e[1],o=e[2],n=e[3],l=e[4],i=e[5]);const c=o??!1;let r;e[6]!==n||e[7]!==l||e[8]!==c?(r={prop:l,defaultProp:c,onChange:n},e[6]=n,e[7]=l,e[8]=c,e[9]=r):r=e[9];const[d,m]=Os(r);let f;e[10]!==m?(f={setOpen:m},e[10]=m,e[11]=f):f=e[11];let u;e[12]!==s||e[13]!==d||e[14]!==i||e[15]!==m?(u=a.jsx(Es,{open:d,onOpenChange:m,...i,children:s}),e[12]=s,e[13]=d,e[14]=i,e[15]=m,e[16]=u):u=e[16];let x;e[17]!==d||e[18]!==i||e[19]!==m||e[20]!==u?(x=a.jsx(Ds,{open:d,onOpenChange:m,...i,children:u}),e[17]=d,e[18]=i,e[19]=m,e[20]=u,e[21]=x):x=e[21];let p;return e[22]!==f||e[23]!==x?(p=a.jsx(Wt.Provider,{value:f,children:x}),e[22]=f,e[23]=x,e[24]=p):p=e[24],p},Qn=t=>{const{children:e,title:s,...o}=t,n=ye(),{className:l,...i}=o;return n?a.jsxs(Ms,{...i,children:[a.jsx(zs,{className:"hidden",children:a.jsx(Ts,{children:s})}),a.jsx("div",{className:z("flex flex-col gap-2 p-2 py-4",l),children:e})]}):a.jsx(Ls,{...o,children:e})},eo=t=>{const{children:e,...s}=t,{setOpen:o}=Xn(),n=ye(),{className:l,...i}=s;return n?a.jsx("div",{...i,onClick:c=>{o(!1);const{onClick:r}=i;r?.(c)},className:z("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",l),children:e}):a.jsx(Hs,{...s,children:e})},to=t=>{const e=h.c(7);let s,o;e[0]!==t?({children:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=ye();let l;return e[3]!==s||e[4]!==n||e[5]!==o?(l=n?a.jsx($s,{asChild:!0,children:s}):a.jsx(Ps,{...o,children:s}),e[3]=s,e[4]=n,e[5]=o,e[6]=l):l=e[6],l},so=t=>{const e=h.c(7);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=ye();let l;return e[3]!==s||e[4]!==n||e[5]!==o?(l=n?a.jsx(rt,{className:z(s),...o}):a.jsx(rt,{className:z(s),...o}),e[3]=s,e[4]=n,e[5]=o,e[6]=l):l=e[6],l};function no(t){const e=h.c(11),{user:s,trigger:o,align:n,children:l}=t,i=n===void 0?"start":n;let c;e[0]!==o||e[1]!==s?(c=o(s),e[0]=o,e[1]=s,e[2]=c):c=e[2];let r;e[3]!==c?(r=a.jsx(to,{asChild:!0,children:a.jsx("div",{children:c})}),e[3]=c,e[4]=r):r=e[4];let d;e[5]!==i||e[6]!==l?(d=a.jsx(Qn,{side:"top",align:i,className:"md:w-[240px]",children:l}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let m;return e[8]!==r||e[9]!==d?(m=a.jsxs(Jn,{children:[r,d]}),e[8]=r,e[9]=d,e[10]=m):m=e[10],m}function oo(t){const e=h.c(8),{children:s,onClick:o,className:n,asChild:l}=t;let i;e[0]!==l||e[1]!==s||e[2]!==o?(i=l?s:a.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:o,children:s}),e[0]=l,e[1]=s,e[2]=o,e[3]=i):i=e[3];let c;return e[4]!==l||e[5]!==n||e[6]!==i?(c=a.jsx(eo,{asChild:l,className:n,children:i}),e[4]=l,e[5]=n,e[6]=i,e[7]=c):c=e[7],c}function ao(t){const e=h.c(2),{className:s}=t;let o;return e[0]!==s?(o=a.jsx(so,{className:s}),e[0]=s,e[1]=o):o=e[1],o}function lo(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const Z=Object.assign(no,{Item:oo,Separator:ao,Skeleton:lo});function io(t){const e=h.c(32),{open:s,onOpenChange:o,user:n,userImage:l}=t,[i,c]=v.useState(!1);let r;e[0]!==n.id?(r=()=>{navigator.clipboard.writeText(n.id),c(!0),setTimeout(()=>c(!1),2e3)},e[0]=n.id,e[1]=r):r=e[1];const d=r;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsxs(bt,{children:[a.jsx(jt,{children:"Profile"}),a.jsx(vt,{children:"Your account information"})]}),e[2]=m):m=e[2];const f=n.name||n.email||"U";let u;e[3]!==f||e[4]!==l?(u=a.jsx(we,{url:l,fallback:f,shape:"circle",size:"2xl"}),e[3]=f,e[4]=l,e[5]=u):u=e[5];const x=n.name||n.email;let p;e[6]!==x?(p=a.jsx("div",{className:"text-lg font-semibold text-center",children:x}),e[6]=x,e[7]=p):p=e[7];let S;e[8]!==n.email?(S=a.jsx("div",{className:"text-sm text-muted-foreground text-center",children:n.email}),e[8]=n.email,e[9]=S):S=e[9];let g;e[10]!==p||e[11]!==S?(g=a.jsxs("div",{className:"flex flex-col items-center gap-2 w-full",children:[p,S]}),e[10]=p,e[11]=S,e[12]=g):g=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"User ID"}),e[13]=b):b=e[13];let j;e[14]!==n.id?(j=a.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[b,a.jsx("span",{className:"text-sm font-mono truncate",children:n.id})]}),e[14]=n.id,e[15]=j):j=e[15];let _;e[16]!==i?(_=i?a.jsx(gs,{size:16,className:"text-green-600"}):a.jsx(Bs,{size:16,className:"text-muted-foreground"}),e[16]=i,e[17]=_):_=e[17];let w;e[18]!==d||e[19]!==_?(w=a.jsx("button",{type:"button",onClick:d,className:"flex-shrink-0 p-2 hover:bg-background rounded-md transition-colors","aria-label":"Copy user ID",children:_}),e[18]=d,e[19]=_,e[20]=w):w=e[20];let y;e[21]!==j||e[22]!==w?(y=a.jsxs("div",{className:"flex items-center justify-between gap-3 w-full px-4 py-3 rounded-lg bg-muted/50 border border-border",children:[j,w]}),e[21]=j,e[22]=w,e[23]=y):y=e[23];let C;e[24]!==y||e[25]!==u||e[26]!==g?(C=a.jsxs(St,{className:"sm:max-w-md",children:[m,a.jsxs("div",{className:"flex flex-col items-center gap-6 py-4",children:[u,g,y]})]}),e[24]=y,e[25]=u,e[26]=g,e[27]=C):C=e[27];let k;return e[28]!==o||e[29]!==s||e[30]!==C?(k=a.jsx(Ct,{open:s,onOpenChange:o,children:C}),e[28]=o,e[29]=s,e[30]=C,e[31]=k):k=e[31],k}function ro(t){const e=h.c(5),{open:s,onOpenChange:o}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsxs(bt,{children:[a.jsx(jt,{children:"Invitations"}),a.jsx(vt,{children:"Your pending organization invitations"})]}),e[0]=n):n=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsxs(St,{className:"sm:max-w-lg",children:[n,a.jsx("div",{className:"max-h-[420px] overflow-auto pr-1",children:a.jsx(os,{})})]}),e[1]=l):l=e[1];let i;return e[2]!==o||e[3]!==s?(i=a.jsx(Ct,{open:s,onOpenChange:o,children:l}),e[2]=o,e[3]=s,e[4]=i):i=e[4],i}function co(t){const e=h.c(31),{user:s,userImage:o,hasInvites:n,showInvitesItem:l}=t,[i,c]=v.useState(!1),[r,d]=v.useState(!1);let m;e[0]!==n||e[1]!==s.email||e[2]!==s.name||e[3]!==o?(m=()=>a.jsxs("div",{className:"relative",children:[a.jsx(we,{url:o,fallback:s.name||s.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all"}),n&&a.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2.5 w-2.5 rounded-full bg-destructive ring-2 ring-background"})]}),e[0]=n,e[1]=s.email,e[2]=s.name,e[3]=o,e[4]=m):m=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsxs(Z.Item,{onClick:()=>c(!0),children:[a.jsx(Ot,{className:"text-muted-foreground",size:18}),"Profile"]}),e[5]=f):f=e[5];let u;e[6]!==n||e[7]!==l?(u=l&&a.jsxs(Z.Item,{onClick:()=>d(!0),children:[a.jsx(zt,{className:"text-muted-foreground",size:18}),"Invitations",n&&a.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]}),e[6]=n,e[7]=l,e[8]=u):u=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(Z.Separator,{}),e[9]=x):x=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(ns,{className:"w-4 h-4 text-muted-foreground"}),e[10]=p):p=e[10];let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=a.jsx(Z.Item,{asChild:!0,children:a.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[p,"decocms/admin",a.jsx(ct,{size:18,className:"text-muted-foreground ml-auto"})]})}),e[11]=S):S=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsx(kt,{className:"text-muted-foreground",size:18}),e[12]=g):g=e[12];let b,j;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=a.jsx(Z.Item,{asChild:!0,children:a.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[g,"Homepage",a.jsx(ct,{size:18,className:"ml-auto text-muted-foreground"})]})}),j=a.jsx(Z.Separator,{}),e[13]=b,e[14]=j):(b=e[13],j=e[14]);let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=a.jsxs(Z.Item,{onClick:mo,children:[a.jsx(Mt,{size:18,className:"text-muted-foreground"}),"Log out"]}),e[15]=_):_=e[15];let w;e[16]!==m||e[17]!==u||e[18]!==s?(w=a.jsxs(Z,{user:s,trigger:m,align:"end",children:[f,u,x,S,b,j,_]}),e[16]=m,e[17]=u,e[18]=s,e[19]=w):w=e[19];let y;e[20]!==i||e[21]!==s||e[22]!==o?(y=i&&a.jsx(io,{open:i,onOpenChange:c,user:s,userImage:o}),e[20]=i,e[21]=s,e[22]=o,e[23]=y):y=e[23];let C;e[24]!==r||e[25]!==l?(C=l&&r&&a.jsx(ro,{open:r,onOpenChange:d}),e[24]=r,e[25]=l,e[26]=C):C=e[26];let k;return e[27]!==w||e[28]!==y||e[29]!==C?(k=a.jsxs(a.Fragment,{children:[w,y,C]}),e[27]=w,e[28]=y,e[29]=C,e[30]=k):k=e[30],k}function mo(){return Ne.signOut()}function fo(){const{data:t}=Ne.useSession(),e=v.useContext(ss),{data:s}=e.hooks.useListUserInvitations(),n=(s??[]).length>0;if(!t?.user)return a.jsx(we,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer",muted:!0});const l=t.user,i={...l,name:l.name??void 0},c=l.image;return a.jsx(co,{user:i,userImage:c,hasInvites:n,showInvitesItem:!0})}function ot(){const t=h.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=Be.decoChatOpen(),t[0]=e):e=t[0];const[s,o]=He(e,uo);let n;return t[1]!==s||t[2]!==o?(n=[s,o],t[1]=s,t[2]=o,t[3]=n):n=t[3],n}function uo(t){return!!(t??!1)}function ho(t){const e=h.c(6),{children:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(as,{children:a.jsx(pt,{})}),e[0]=o):o=e[0];let n;e[1]!==s?(n=a.jsx(ls,{children:s}),e[1]=s,e[2]=n):n=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx(is,{children:a.jsx(rs,{to:"/login",replace:!0})}),e[3]=l):l=e[3];let i;return e[4]!==n?(i=a.jsxs(a.Fragment,{children:[o,n,l]}),e[4]=n,e[5]=i):i=e[5],i}function po(t){const e=h.c(5),{children:s,className:o}=t;let n;e[0]!==o?(n=z("fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",o),e[0]=o,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=a.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function xo(t){const e=h.c(5),{children:s,className:o}=t;let n;e[0]!==o?(n=z("flex items-center justify-center px-2 h-full border-r border-border",o),e[0]=o,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=a.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function go(t){const e=h.c(5),{children:s,className:o}=t;let n;e[0]!==o?(n=z("flex items-center gap-2 px-2 h-full",o),e[0]=o,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=a.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function bo(t){const e=h.c(5),{children:s,className:o}=t;let n;e[0]!==o?(n=z("flex items-center gap-2 px-2 h-full flex-1",o),e[0]=o,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=a.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function jo(t){const e=h.c(5),{children:s,className:o}=t;let n;e[0]!==o?(n=z("flex items-center gap-2 px-2 h-full ml-auto",o),e[0]=o,e[1]=n):n=e[1];let l;return e[2]!==s||e[3]!==n?(l=a.jsx("div",{className:n,children:s}),e[2]=s,e[3]=n,e[4]=l):l=e[4],l}function vo(){const t=h.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx("div",{className:"flex items-center justify-center px-2 h-full border-r border-border",children:a.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx("div",{className:"flex items-center gap-2 px-2 h-full",children:a.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})}),t[1]=s):s=t[1];let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center w-full h-12 border-b border-border",children:[e,s,a.jsx("div",{className:"flex items-center gap-2 px-2 h-full ml-auto",children:a.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[2]=o):o=t[2],o}const Re=Object.assign(po,{Sidebar:xo,Left:go,Center:bo,Right:jo,Skeleton:vo});function Vt(){const t=h.c(3),{toggleSidebar:e}=nt();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=a.jsx($t,{className:"text-muted-foreground/85 group-hover:text-foreground transition-colors",size:20}),t[0]=s):s=t[0];let o;return t[1]!==e?(o=a.jsx(a.Fragment,{children:a.jsx(Y,{onClick:e,size:"icon",variant:"ghost",className:"w-8 h-8 rounded-md",children:s})}),t[1]=e,t[2]=o):o=t[2],o}Vt.Skeleton=function(){return a.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"})};function So(t,e){return t.find(e)??t[0]}function ft(t,e,s,o){const n=h.c(9),l=null,[i,c]=He(t,l);let r;n[0]!==s||n[1]!==i?(r=u=>i!==null?s(u,i):!1,n[0]=s,n[1]=i,n[2]=r):r=n[2];let d;n[3]!==e||n[4]!==r?(d=So(e,r),n[3]=e,n[4]=r,n[5]=d):d=n[5];const m=d;let f;return n[6]!==m||n[7]!==c?(f=[m,c],n[6]=m,n[7]=c,n[8]=f):f=n[8],f}const Co="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function wo(t){const e=/\/[^/]+\/mcps\/([^/]+)\/([^/]+)\/([^/]+)/,s=t.match(e);return s&&s[1]&&s[2]&&s[3]?{connectionId:decodeURIComponent(s[1]),collectionName:decodeURIComponent(s[2]),itemId:decodeURIComponent(s[3])}:{connectionId:null,collectionName:null,itemId:null}}function No(t){const e=h.c(2),s=tt();let o;e[0]!==s.location.pathname?(o=wo(s.location.pathname),e[0]=s.location.pathname,e[1]=o):o=e[1];const{connectionId:n,collectionName:l,itemId:i}=o;return`You are an AI assistant running in an MCP Mesh environment.
|
|
2
|
+
|
|
3
|
+
## About MCP Mesh
|
|
4
|
+
The Model Context Protocol (MCP) Mesh allows users to connect external Connections and expose their capabilities through Hubs. Each Hub provides access to a curated set of tools from connected Connections.
|
|
5
|
+
|
|
6
|
+
## Important Notes
|
|
7
|
+
- All tool calls are logged and audited for security and compliance
|
|
8
|
+
- You have access to the tools exposed through the selected gateway
|
|
9
|
+
- MCPs may expose resources that users can browse and edit
|
|
10
|
+
- You have context to the current gateway and its tools, resources, and prompts
|
|
11
|
+
|
|
12
|
+
## Current Editing Context
|
|
13
|
+
${n?`- Connection ID: ${n}`:""}
|
|
14
|
+
${l?`- Collection Name: ${l}`:""}
|
|
15
|
+
${i?`- Item ID: ${i}`:""}
|
|
16
|
+
${t?`- Gateway ID: ${t}`:""}
|
|
17
|
+
|
|
18
|
+
Help the user understand and work with this resource.
|
|
19
|
+
`}function yo(){const t=h.c(137),{org:e,locator:s}=De(),{slug:o,id:n}=e,[,l]=ot(),i=Le(),{data:c}=Ne.useSession(),r=c?.user,{createThread:d,activeThreadId:m,setActiveThreadId:f,hideThread:u}=dt(),{threads:x,refetch:p}=Us(),S=As(),g=Gs(),b=Cs();let j;t[0]!==b?(j={connections:b,binding:"LLMS"},t[0]=b,t[1]=j):j=t[1];const[_]=sn(j),w=!!_,y=S.length>0,C=w&&y;let k;t[2]!==s?(k=Be.chatSelectedModel(s),t[2]=s,t[3]=k):k=t[3];const[M,$]=ft(k,g,ko),[N,T]=ft(`${s}:selected-gateway`,S,_o),R=No(N?.id),H=Ws();let V;t[4]!==d||t[5]!==N?.id?(V=E=>d({id:E.id,title:E.title,gatewayId:N?.id}),t[4]=d,t[5]=N?.id,t[6]=V):V=t[6];let q;t[7]!==m||t[8]!==H||t[9]!==R||t[10]!==V?(q={threadId:m,systemPrompt:R,onToolCall:H,onCreateThread:V},t[7]=m,t[8]=H,t[9]=R,t[10]=V,t[11]=q):q=t[11];const I=Vs(q),{inputValue:W,setInputValue:O,branchContext:P,clearBranch:L}=dt(),{isEmpty:B}=I;let U;t[12]!==P||t[13]!==L||t[14]!==f||t[15]!==O?(U=()=>{P&&(f(P.originalThreadId),L(),O(""))},t[12]=P,t[13]=L,t[14]=f,t[15]=O,t[16]=U):U=t[16];const K=U;let _e;t[17]!==m||t[18]!==I||t[19]!==L||t[20]!==N||t[21]!==M||t[22]!==O||t[23]!==r?.image||t[24]!==r?.name?(_e=async E=>{if(!M){at.error("No model configured");return}if(!N?.id){at.error("No Hub configured");return}O(""),L();const F={created_at:new Date().toISOString(),thread_id:m,model:{id:M.id,connectionId:M.connectionId,provider:M.provider??void 0,limits:M.limits??void 0},gateway:{id:N.id},user:{avatar:r?.image??void 0,name:r?.name??"you"}};await I.sendMessage(E,F)},t[17]=m,t[18]=I,t[19]=L,t[20]=N,t[21]=M,t[22]=O,t[23]=r?.image,t[24]=r?.name,t[25]=_e):_e=t[25];const G=_e;let ke;t[26]!==$?(ke=E=>{$(E)},t[26]=$,t[27]=ke):ke=t[27];const Ge=ke;let Ie;t[28]!==T?(Ie=E=>{T({gatewayId:E})},t[28]=T,t[29]=Ie):Ie=t[29];const We=Ie;if(!C){let E,F;!w&&!y?(E="Connect your providers",F="Connect an LLM provider and create a Hub to unlock AI-powered features."):w?(E="No Hubs configured",F="Create a Hub to expose your MCP tools to the chat."):(E="No model provider connected",F="Connect to a model provider to unlock AI-powered features.");let Oe;t[30]===Symbol.for("react.memo_cache_sentinel")?(Oe=a.jsxs(A.Header.Left,{children:[a.jsx("img",{src:Co,alt:"deco chat",className:"size-5 rounded"}),a.jsx("span",{className:"text-sm font-medium",children:"deco chat"})]}),t[30]=Oe):Oe=t[30];let ve;t[31]!==l?(ve=()=>l(!1),t[31]=l,t[32]=ve):ve=t[32];let Ee;t[33]===Symbol.for("react.memo_cache_sentinel")?(Ee=a.jsx(Pe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[33]=Ee):Ee=t[33];let Se;t[34]!==ve?(Se=a.jsxs(A.Header,{children:[Oe,a.jsx(A.Header.Right,{children:a.jsx("button",{type:"button",onClick:ve,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:Ee})})]}),t[34]=ve,t[35]=Se):Se=t[35];let Ce;t[36]!==b||t[37]!==F||t[38]!==w||t[39]!==i||t[40]!==n||t[41]!==o||t[42]!==E||t[43]!==r?.id?(Ce=a.jsx(A.Main,{className:"flex flex-col items-center",children:a.jsx(A.EmptyState,{children:w?a.jsx(ws,{title:E,description:F,actions:a.jsx(Y,{variant:"outline",onClick:()=>i({to:"/$org/mcps",params:{org:o},search:{action:"create"}}),children:"Custom Connection"})}):a.jsx(Fs,{title:E,description:F,orgSlug:o,orgId:n,userId:r?.id??"",allConnections:b,onInstallMcpServer:()=>i({to:"/$org/mcps",params:{org:o},search:{action:"create"}})})})}),t[36]=b,t[37]=F,t[38]=w,t[39]=i,t[40]=n,t[41]=o,t[42]=E,t[43]=r?.id,t[44]=Ce):Ce=t[44];let Ae;return t[45]!==Se||t[46]!==Ce?(Ae=a.jsxs(A,{children:[Se,Ce]}),t[45]=Se,t[46]=Ce,t[47]=Ae):Ae=t[47],Ae}const Ve=N?.icon,Fe=N?.title||"deco chat";let $e;t[48]===Symbol.for("react.memo_cache_sentinel")?($e=a.jsx(Qe,{size:12}),t[48]=$e):$e=t[48];let X;t[49]!==Fe||t[50]!==Ve?(X=a.jsx(it,{icon:Ve,name:Fe,size:"xs",fallbackIcon:$e}),t[49]=Fe,t[50]=Ve,t[51]=X):X=t[51];const Ke=N?.title||"deco chat";let J;t[52]!==Ke?(J=a.jsx("span",{className:"text-sm font-medium",children:Ke}),t[52]=Ke,t[53]=J):J=t[53];let Q;t[54]!==X||t[55]!==J?(Q=a.jsxs(A.Header.Left,{children:[X,J]}),t[54]=X,t[55]=J,t[56]=Q):Q=t[56];let ee;t[57]!==d?(ee=()=>d(),t[57]=d,t[58]=ee):ee=t[58];let Me;t[59]===Symbol.for("react.memo_cache_sentinel")?(Me=a.jsx(tn,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[59]=Me):Me=t[59];let te;t[60]!==ee?(te=a.jsx("button",{type:"button",onClick:ee,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"New chat",children:Me}),t[60]=ee,t[61]=te):te=t[61];let se;t[62]!==p?(se=()=>p(),t[62]=p,t[63]=se):se=t[63];let ne;t[64]!==m||t[65]!==u||t[66]!==f||t[67]!==se||t[68]!==x?(ne=a.jsx(Ys,{threads:x,activeThreadId:m,onSelectThread:f,onRemoveThread:u,onOpen:se}),t[64]=m,t[65]=u,t[66]=f,t[67]=se,t[68]=x,t[69]=ne):ne=t[69];let oe;t[70]!==l?(oe=()=>l(!1),t[70]=l,t[71]=oe):oe=t[71];let ze;t[72]===Symbol.for("react.memo_cache_sentinel")?(ze=a.jsx(Pe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[72]=ze):ze=t[72];let ae;t[73]!==oe?(ae=a.jsx("button",{type:"button",onClick:oe,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:ze}),t[73]=oe,t[74]=ae):ae=t[74];let le;t[75]!==te||t[76]!==ne||t[77]!==ae?(le=a.jsxs(A.Header.Right,{children:[te,ne,ae]}),t[75]=te,t[76]=ne,t[77]=ae,t[78]=le):le=t[78];let ie;t[79]!==Q||t[80]!==le?(ie=a.jsxs(A.Header,{children:[Q,le]}),t[79]=Q,t[80]=le,t[81]=ie):ie=t[81];let re;t[82]!==I.messages||t[83]!==I.status||t[84]!==G||t[85]!==B||t[86]!==N?(re=a.jsx(A.Main,{children:B?a.jsx(A.EmptyState,{children:a.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[a.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[a.jsx(it,{icon:N?.icon,name:N?.title||"deco chat",size:"lg",fallbackIcon:a.jsx(Qe,{size:32}),className:"size-[60px]! rounded-[18px]!"}),a.jsx("h3",{className:"text-xl font-medium text-foreground",children:N?.title||"Ask deco chat"}),a.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:N?.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),N?.id&&a.jsx(st,{fallback:null,children:a.jsx(v.Suspense,{fallback:a.jsx("div",{className:"flex justify-center",children:a.jsx(en,{size:20,className:"animate-spin text-muted-foreground"})}),children:a.jsx(Ks,{gatewayId:N.id,onSelect:E=>{G(E.description??E.name)}})})},N.id)]})}):a.jsx(A.Messages,{messages:I.messages,status:I.status,minHeightOffset:240})}),t[82]=I.messages,t[83]=I.status,t[84]=G,t[85]=B,t[86]=N,t[87]=re):re=t[87];let ce;t[88]!==I.error||t[89]!==G?(ce=()=>{I.error&&G(`I encountered this error: ${I.error.message}. Can you help me fix it?`)},t[88]=I.error,t[89]=G,t[90]=ce):ce=t[90];let de;t[91]!==I.clearError||t[92]!==I.error||t[93]!==ce?(de=a.jsx(A.ErrorBanner,{error:I.error,onFixInChat:ce,onDismiss:I.clearError}),t[91]=I.clearError,t[92]=I.error,t[93]=ce,t[94]=de):de=t[94];let me;t[95]!==G?(me=()=>{G("Please continue.")},t[95]=G,t[96]=me):me=t[96];let fe;t[97]!==I.clearFinishReason||t[98]!==I.finishReason||t[99]!==me?(fe=a.jsx(A.FinishReasonWarning,{finishReason:I.finishReason,onContinue:me,onDismiss:I.clearFinishReason}),t[97]=I.clearFinishReason,t[98]=I.finishReason,t[99]=me,t[100]=fe):fe=t[100];let ue;t[101]!==P||t[102]!==L||t[103]!==K||t[104]!==O?(ue=a.jsx(A.BranchPreview,{branchContext:P,clearBranchContext:L,onGoToOriginalMessage:K,setInputValue:O}),t[101]=P,t[102]=L,t[103]=K,t[104]=O,t[105]=ue):ue=t[105];let he;t[106]!==G||t[107]!==W?(he=async()=>{W.trim()&&await G(W.trim())},t[106]=G,t[107]=W,t[108]=he):he=t[108];const Ze=!M||!N?.id,Ye=I.status==="submitted"||I.status==="streaming",qe=M?"Ask anything or @ for context":"Select a model to start chatting",Xe=N?.id;let pe;t[109]!==We||t[110]!==Xe?(pe=a.jsx(Rs,{selectedGatewayId:Xe,onGatewayChange:We,placeholder:"Hub",variant:"borderless"}),t[109]=We,t[110]=Xe,t[111]=pe):pe=t[111];const Je=M??void 0;let xe;t[112]!==Ge||t[113]!==Je?(xe=a.jsx(qs,{selectedModel:Je,onModelChange:Ge,placeholder:"Model",variant:"borderless"}),t[112]=Ge,t[113]=Je,t[114]=xe):xe=t[114];let ge;t[115]!==I.messages?(ge=a.jsx(Zs,{messages:I.messages}),t[115]=I.messages,t[116]=ge):ge=t[116];let be;t[117]!==I.stop||t[118]!==W||t[119]!==O||t[120]!==he||t[121]!==Ze||t[122]!==Ye||t[123]!==qe||t[124]!==pe||t[125]!==xe||t[126]!==ge?(be=a.jsxs(A.Input,{value:W,onChange:O,onSubmit:he,onStop:I.stop,disabled:Ze,isStreaming:Ye,placeholder:qe,children:[pe,xe,ge]}),t[117]=I.stop,t[118]=W,t[119]=O,t[120]=he,t[121]=Ze,t[122]=Ye,t[123]=qe,t[124]=pe,t[125]=xe,t[126]=ge,t[127]=be):be=t[127];let je;t[128]!==de||t[129]!==fe||t[130]!==ue||t[131]!==be?(je=a.jsx(A.Footer,{children:a.jsxs("div",{className:"flex flex-col gap-2",children:[de,fe,ue,be]})}),t[128]=de,t[129]=fe,t[130]=ue,t[131]=be,t[132]=je):je=t[132];let Te;return t[133]!==ie||t[134]!==re||t[135]!==je?(Te=a.jsxs(A,{children:[ie,re,je]}),t[133]=ie,t[134]=re,t[135]=je,t[136]=Te):Te=t[136],Te}function _o(t,e){return t.id===e.gatewayId}function ko(t,e){return t.id===e.id&&t.connectionId===e.connectionId}function Io(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(A.Provider,{children:a.jsx(yo,{})}),t[0]=e):e=t[0],e}const $o="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function ut({showSidebarToggle:t=!1,showOrgSwitcher:e=!1,showDecoChat:s=!1,disableDecoChat:o=!1}){const[n,l]=ot(),i=v.useRef(o);o&&n&&i.current!==o&&l(!1),i.current=o;const c=()=>{o||l(r=>!r)};return a.jsxs(Re,{children:[t&&a.jsx(Re.Sidebar,{children:a.jsx(Vt,{})}),a.jsx(Re.Left,{children:e&&a.jsx(v.Suspense,{fallback:a.jsx(et.Skeleton,{}),children:a.jsx(et,{})})}),a.jsxs(Re.Right,{className:"gap-2",children:[s&&!o&&a.jsxs(Y,{size:"sm",variant:"default",onClick:c,children:[a.jsx(we,{url:$o,fallback:"DC",size:"2xs",className:"rounded-sm"}),"deco chat"]}),a.jsx(fo,{})]})]})}function Mo(t){const e=h.c(10),{children:s,className:o}=t,[,n]=v.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Be.decoChatPanelWidth(),e[0]=l):l=e[0];const[i,c]=He(l,30);let r;e[1]!==c?(r=u=>n(()=>c(u)),e[1]=c,e[2]=r):r=e[2];const d=r;let m;e[3]!==o?(m=z("min-w-0",o),e[3]=o,e[4]=m):m=e[4];let f;return e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==m?(f=a.jsx(wt,{defaultSize:i,minSize:20,className:m,onResize:d,children:s}),e[5]=i,e[6]=s,e[7]=d,e[8]=m,e[9]=f):f=e[9],f}function zo(t){const e=h.c(5),{children:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Be.sidebarOpen(),e[0]=o):o=e[0];const[n,l]=He(o,!0);let i;return e[1]!==s||e[2]!==l||e[3]!==n?(i=a.jsx(gn,{open:n,onOpenChange:l,children:s}),e[1]=s,e[2]=l,e[3]=n,e[4]=i):i=e[4],i}function To(t){const e=h.c(10),{disableChat:s}=t,o=s===void 0?!1:s,[n]=ot(),l=n&&!o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(wt,{className:"bg-background",children:a.jsx(xt,{})}),e[0]=i):i=e[0];let c;e[1]!==o||e[2]!==l?(c=!o&&a.jsx(Js,{withHandle:l}),e[1]=o,e[2]=l,e[3]=c):c=e[3];const r=l?"max-w-none":"max-w-0";let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(st,{children:a.jsx(v.Suspense,{fallback:a.jsx(Xs,{}),children:a.jsx(Io,{})})}),e[4]=d):d=e[4];let m;e[5]!==r?(m=a.jsx(Mo,{className:r,children:d}),e[5]=r,e[6]=m):m=e[6];let f;return e[7]!==c||e[8]!==m?(f=a.jsxs(Qs,{direction:"horizontal",children:[i,c,m]}),e[7]=c,e[8]=m,e[9]=f):f=e[9],f}function Oo(){const t=h.c(22);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:s}=ht(e),o=tt(),n=o.location.pathname===`/${s}`||o.location.pathname===`/${s}/`;let l;t[1]!==s?(l=ds.activeOrganization(s),t[1]=s,t[2]=l):l=t[2];let i;t[3]!==s?(i=async()=>{if(!s)return null;const{data:S}=await Ne.organization.setActive({organizationSlug:s});return{org:S,project:{slug:js}}},t[3]=s,t[4]=i):i=t[4];let c;t[5]!==l||t[6]!==i?(c={queryKey:l,queryFn:i,gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1},t[5]=l,t[6]=i,t[7]=c):c=t[7];const{data:r}=cs(c);if(!r){let S;t[8]===Symbol.for("react.memo_cache_sentinel")?(S=a.jsx(ut,{}),t[8]=S):S=t[8];let g;return t[9]===Symbol.for("react.memo_cache_sentinel")?(g=a.jsxs("div",{className:"min-h-screen bg-background",children:[S,a.jsx("div",{className:"pt-12",children:a.jsx(xt,{})})]}),t[9]=g):g=t[9],g}let d;t[10]!==n?(d=a.jsx(ut,{showSidebarToggle:!0,showOrgSwitcher:!0,showDecoChat:!0,disableDecoChat:n}),t[10]=n,t[11]=d):d=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m={"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},t[12]=m):m=t[12];let f;t[13]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(An,{}),t[13]=f):f=t[13];let u;t[14]!==n?(u=a.jsxs(vn,{className:"flex-1 bg-sidebar",style:m,children:[f,a.jsx(Cn,{className:"pt-12",children:a.jsx(To,{disableChat:n})})]}),t[14]=n,t[15]=u):u=t[15];let x;t[16]!==d||t[17]!==u?(x=a.jsx(zo,{children:a.jsxs("div",{className:"flex flex-col h-screen",children:[d,u]})}),t[16]=d,t[17]=u,t[18]=x):x=t[18];let p;return t[19]!==r||t[20]!==x?(p=a.jsx(bs,{...r,children:x}),t[19]=r,t[20]=x,t[21]=p):p=t[21],p}function Sa(){const t=h.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(ho,{children:a.jsx(v.Suspense,{fallback:a.jsx(pt,{}),children:a.jsx(Oo,{})})}),t[0]=e):e=t[0],e}export{Sa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as C,f as d,j as a}from"./index-CFqw5CAk.js";import{c as m}from"./input-BSDBSyke.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as j,c as B,j as t,ae as V,af as I,ac as $,ak as _,ah as G,aW as J,aX as K}from"./index-CFqw5CAk.js";import{I as z,u as Y}from"./use-connection-BPzhCo7m.js";import{C as F}from"./checkbox-DWLQD46M.js";import{c as S,B as Z}from"./input-BSDBSyke.js";import{i as ee}from"./ArrowLeft-kUb-nLpp.js";import{C as te}from"./collection-search-Bt7hJb44.js";const se=j.memo(function(o){const e=B.c(21),{connection:n,isSelected:r,hasToolsEnabled:c,activeToolsCount:i,totalToolsCount:x,onSelect:b,onToggle:g}=o,d=r?"bg-accent/50":"hover:bg-muted/50";let u;e[0]!==d?(u=S("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",d),e[0]=d,e[1]=u):u=e[1];let m;e[2]!==n.icon||e[3]!==n.title?(m=t.jsx(z,{icon:n.icon,name:n.title,size:"xs"}),e[2]=n.icon,e[3]=n.title,e[4]=m):m=e[4];let p;e[5]!==n.title?(p=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title})}),e[5]=n.title,e[6]=p):p=e[6];let a;e[7]!==b||e[8]!==m||e[9]!==p?(a=t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:b,children:[m,p]}),e[7]=b,e[8]=m,e[9]=p,e[10]=a):a=e[10];let f;e[11]!==i||e[12]!==n.tools||e[13]!==c||e[14]!==g||e[15]!==x?(f=n.tools&&n.tools.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[i,"/",x]}),t.jsx(F,{checked:c,onCheckedChange:g,onClick:ne})]}),e[11]=i,e[12]=n.tools,e[13]=c,e[14]=g,e[15]=x,e[16]=f):f=e[16];let C;return e[17]!==u||e[18]!==a||e[19]!==f?(C=t.jsxs("div",{className:u,children:[a,f]}),e[17]=u,e[18]=a,e[19]=f,e[20]=C):C=e[20],C}),oe=j.memo(function(o){const e=B.c(18),{connectionId:n,tool:r,isSelected:c,onToggle:i}=o,x=`tool-${n}-${r.name}`,b=c?"text-foreground":"text-muted-foreground";let g;e[0]!==b?(g=S("text-sm font-medium",b),e[0]=b,e[1]=g):g=e[1];let d;e[2]!==g||e[3]!==r.name?(d=t.jsx("div",{className:"flex items-center gap-2 mb-1",children:t.jsx("span",{className:g,children:r.name})}),e[2]=g,e[3]=r.name,e[4]=d):d=e[4];let u;e[5]!==r.description?(u=r.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:r.description}),e[5]=r.description,e[6]=u):u=e[6];let m;e[7]!==d||e[8]!==u?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[d,u]}),e[7]=d,e[8]=u,e[9]=m):m=e[9];const p=`tool-${n}-${r.name}`;let a;e[10]!==c||e[11]!==i||e[12]!==p?(a=t.jsx("div",{className:"flex items-center shrink-0",children:t.jsx(F,{id:p,checked:c,onCheckedChange:i,onClick:re})}),e[10]=c,e[11]=i,e[12]=p,e[13]=a):a=e[13];let f;return e[14]!==x||e[15]!==m||e[16]!==a?(f=t.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:x,children:[m,a]}),e[14]=x,e[15]=m,e[16]=a,e[17]=f):f=e[17],f});function ge({toolSet:l,onToolSetChange:o}){const[e,n]=j.useState(""),r=j.useDeferredValue(e),[c,i]=j.useState("all"),[x,b]=j.useState(!1),g=j.useRef(new Set(Object.keys(l))),d=Y({searchTerm:r.trim()||void 0}),u=g.current,m=[...u.values()].map(s=>d.find(h=>h.id===s)).filter(s=>s!==void 0),p=d.filter(s=>!u.has(s.id)),a=[...m,...p],f=s=>{const h=l[s];return h!==void 0&&h.length>0},C=a.filter(s=>{if(c==="all")return!0;const h=f(s.id);return c==="selected"?h:c==="unselected"?!h:!0}),[k,P]=j.useState(a[0]?.id??null),v=k?a.find(s=>s.id===k)??null:null,E=v?.tools??[],Q=(s,h)=>l[s]?.includes(h)??!1,q=(s,h)=>{const w=l[s]??[],R=w.includes(h),T={...l};if(R){const y=w.filter(N=>N!==h);y.length===0?delete T[s]:T[s]=y}else T[s]=[...w,h];o(T)},L=s=>{const h=a.find(N=>N.id===s);if(!h?.tools)return;const w=l[s]??[],R=h.tools.map(N=>N.name),T=w.length>0&&R.every(N=>w.includes(N)),y={...l};T?delete y[s]:(y[s]=R,P(s)),o(y)},W=s=>{P(s),b(!0)},X=()=>{b(!1)};return t.jsxs("div",{className:"flex h-full",children:[t.jsxs("div",{className:S("w-full md:w-80 border-r border-border flex flex-col",x&&"hidden md:flex"),children:[t.jsx(te,{value:e,onChange:n,placeholder:"Search MCP Servers..."}),t.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[t.jsx("button",{onClick:()=>i("all"),className:S("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),t.jsx("button",{onClick:()=>i("selected"),className:S("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),t.jsx("button",{onClick:()=>i("unselected"),className:S("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),t.jsx("div",{className:"flex-1 overflow-auto",children:C.length===0?t.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:e?"No connections found":c==="selected"?"No servers selected":c==="unselected"?"No unselected servers":"No connections available"}):t.jsx("div",{className:"p-2 space-y-1",children:C.map(s=>{const h=s.tools?.length??0,w=l[s.id]?.length??0;return t.jsx(se,{connection:s,isSelected:k===s.id,hasToolsEnabled:f(s.id),activeToolsCount:w,totalToolsCount:h,onSelect:()=>W(s.id),onToggle:()=>L(s.id)},s.id)})})})]}),t.jsx("div",{className:S("flex-1 flex-col",x?"flex":"hidden md:flex"),children:v?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[t.jsx(Z,{variant:"ghost",size:"sm",onClick:X,className:"h-8 w-8 p-0 shrink-0",children:t.jsx(ee,{size:20})}),t.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[t.jsx(z,{icon:v.icon,name:v.title,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:v.title}),v.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:v.description})]})]})]}),t.jsx("div",{className:"flex-1 overflow-auto p-4",children:E.length===0?t.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):t.jsx("div",{className:"space-y-2",children:E.map(s=>t.jsx(oe,{connectionId:v.id,tool:s,isSelected:Q(v.id,s.name),onToggle:()=>q(v.id,s.name)},s.name))})})]}):t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}function ne(l){return l.stopPropagation()}function re(l){return l.stopPropagation()}var M="Switch",[le]=V(M),[ce,ie]=le(M),O=j.forwardRef((l,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:c,required:i,disabled:x,value:b="on",onCheckedChange:g,form:d,...u}=l,[m,p]=j.useState(null),a=$(o,v=>p(v)),f=j.useRef(!1),C=m?d||!!m.closest("form"):!0,[k,P]=_({prop:r,defaultProp:c??!1,onChange:g,caller:M});return t.jsxs(ce,{scope:e,checked:k,disabled:x,children:[t.jsx(I.button,{type:"button",role:"switch","aria-checked":k,"aria-required":i,"data-state":U(k),"data-disabled":x?"":void 0,disabled:x,value:b,...u,ref:a,onClick:G(l.onClick,v=>{P(E=>!E),C&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})}),C&&t.jsx(H,{control:m,bubbles:!f.current,name:n,value:b,checked:k,required:i,disabled:x,form:d,style:{transform:"translateX(-100%)"}})]})});O.displayName=M;var A="SwitchThumb",D=j.forwardRef((l,o)=>{const{__scopeSwitch:e,...n}=l,r=ie(A,e);return t.jsx(I.span,{"data-state":U(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});D.displayName=A;var ae="SwitchBubbleInput",H=j.forwardRef(({__scopeSwitch:l,control:o,checked:e,bubbles:n=!0,...r},c)=>{const i=j.useRef(null),x=$(i,c),b=J(e),g=K(o);return j.useEffect(()=>{const d=i.current;if(!d)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(b!==e&&p){const a=new Event("click",{bubbles:n});p.call(d,e),d.dispatchEvent(a)}},[b,e,n]),t.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:x,style:{...r.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});H.displayName=ae;function U(l){return l?"checked":"unchecked"}var de=O,ue=D;function ve(l){const o=B.c(9);let e,n;o[0]!==l?({className:e,...n}=l,o[0]=l,o[1]=e,o[2]=n):(e=o[1],n=o[2]);let r;o[3]!==e?(r=S("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),o[3]=e,o[4]=r):r=o[4];let c;o[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(ue,{"data-slot":"switch-thumb",className:S("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),o[5]=c):c=o[5];let i;return o[6]!==n||o[7]!==r?(i=t.jsx(de,{"data-slot":"switch",className:r,...n,children:c}),o[6]=n,o[7]=r,o[8]=i):i=o[8],i}export{ve as S,ge as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as o,j as n}from"./index-CFqw5CAk.js";import{c as l}from"./input-BSDBSyke.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
|