1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75830,e=>{"use strict";var t=e.i(271645),i=e.i(30030),a=e.i(820783),r=e.i(991918),n=e.i(843476);e.s(["createCollection",0,function(e){let o=e+"CollectionProvider",[l,s]=(0,i.createContextScope)(o),[c,u]=l(o,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:i,children:a}=e,r=t.default.useRef(null),o=t.default.useRef(new Map).current;return(0,n.jsx)(c,{scope:i,itemMap:o,collectionRef:r,children:a})};d.displayName=o;let f=e+"CollectionSlot",p=(0,r.createSlot)(f),v=t.default.forwardRef((e,t)=>{let{scope:i,children:r}=e,o=u(f,i),l=(0,a.useComposedRefs)(t,o.collectionRef);return(0,n.jsx)(p,{ref:l,children:r})});v.displayName=f;let h=e+"CollectionItemSlot",m="data-radix-collection-item",y=(0,r.createSlot)(h),g=t.default.forwardRef((e,i)=>{let{scope:r,children:o,...l}=e,s=t.default.useRef(null),c=(0,a.useComposedRefs)(i,s),d=u(h,r);return t.default.useEffect(()=>(d.itemMap.set(s,{ref:s,...l}),()=>void d.itemMap.delete(s))),(0,n.jsx)(y,{...{[m]:""},ref:c,children:o})});return g.displayName=h,[{Provider:d,Slot:v,ItemSlot:g},function(i){let a=u(e+"CollectionConsumer",i);return t.default.useCallback(()=>{let e=a.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(a.itemMap.values()).sort((e,i)=>t.indexOf(e.ref.current)-t.indexOf(i.ref.current))},[a.collectionRef,a.itemMap])},s]}])},586318,e=>{"use strict";var t=e.i(271645),i=e.i(843476),a=t.createContext(void 0);e.s(["DirectionProvider",0,e=>{let{dir:t,children:r}=e;return(0,i.jsx)(a.Provider,{value:t,children:r})},"useDirection",0,function(e){let i=t.useContext(a);return e||i||"ltr"}])},842727,e=>{"use strict";var t=e.i(271645),i=e.i(981140),a=e.i(75830),r=e.i(820783),n=e.i(30030),o=e.i(610772),l=e.i(248425),s=e.i(30207),c=e.i(369340),u=e.i(586318),d=e.i(843476),f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},v="RovingFocusGroup",[h,m,y]=(0,a.createCollection)(v),[g,w]=(0,n.createContextScope)(v,[y]),[b,k]=g(v),x=t.forwardRef((e,t)=>(0,d.jsx)(h.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(h.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,d.jsx)(_,{...e,ref:t})})}));x.displayName=v;var _=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:n,orientation:o,loop:h=!1,dir:y,currentTabStopId:g,defaultCurrentTabStopId:w,onCurrentTabStopIdChange:k,onEntryFocus:x,preventScrollOnEntryFocus:_=!1,...S}=e,C=t.useRef(null),F=(0,r.useComposedRefs)(a,C),E=(0,u.useDirection)(y),[T,R]=(0,c.useControllableState)({prop:g,defaultProp:w??null,onChange:k,caller:v}),[A,P]=t.useState(!1),z=(0,s.useCallbackRef)(x),I=m(n),M=t.useRef(!1),[$,U]=t.useState(0);return t.useEffect(()=>{let e=C.current;if(e)return e.addEventListener(f,z),()=>e.removeEventListener(f,z)},[z]),(0,d.jsx)(b,{scope:n,orientation:o,dir:E,loop:h,currentTabStopId:T,onItemFocus:t.useCallback(e=>R(e),[R]),onItemShiftTab:t.useCallback(()=>P(!0),[]),onFocusableItemAdd:t.useCallback(()=>U(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>U(e=>e-1),[]),children:(0,d.jsx)(l.Primitive.div,{tabIndex:A||0===$?-1:0,"data-orientation":o,...S,ref:F,style:{outline:"none",...e.style},onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,()=>{M.current=!0}),onFocus:(0,i.composeEventHandlers)(e.onFocus,e=>{let t=!M.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(f,p);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=I().filter(e=>e.focusable);j([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),_)}}M.current=!1}),onBlur:(0,i.composeEventHandlers)(e.onBlur,()=>P(!1))})})}),S="RovingFocusGroupItem",C=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:c,children:u,...f}=e,p=(0,o.useId)(),v=c||p,y=k(S,r),g=y.currentTabStopId===v,w=m(r),{onFocusableItemAdd:b,onFocusableItemRemove:x,currentTabStopId:_}=y;return t.useEffect(()=>{if(n)return b(),()=>x()},[n,b,x]),(0,d.jsx)(h.ItemSlot,{scope:r,id:v,focusable:n,active:s,children:(0,d.jsx)(l.Primitive.span,{tabIndex:g?0:-1,"data-orientation":y.orientation,...f,ref:a,onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,e=>{n?y.onItemFocus(v):e.preventDefault()}),onFocus:(0,i.composeEventHandlers)(e.onFocus,()=>y.onItemFocus(v)),onKeyDown:(0,i.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void y.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,i){var a;let r=(a=e.key,"rtl"!==i?a:"ArrowLeft"===a?"ArrowRight":"ArrowRight"===a?"ArrowLeft":a);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return F[r]}(e,y.orientation,y.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=w().filter(e=>
1e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){var i,a;"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=y.loop?(i=r,a=n+1,i.map((e,t)=>i[(a+t)%i.length])):r.slice(n+1)}setTimeout(()=>j(r))}}),children:"function"==typeof u?u({isCurrentTabStop:g,hasTabStop:null!=_}):u})})});C.displayName=S;var F={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function j(e,t=!1){let i=document.activeElement;for(let a of e)if(a===i||(a.focus({preventScroll:t}),document.activeElement!==i))return}e.s(["Item",0,C,"Root",0,x,"createRovingFocusGroupScope",0,w])},627542,e=>{"use strict";var t=e.i(271645),i=e.i(981140),a=e.i(30030),r=e.i(842727),n=e.i(296626),o=e.i(248425),l=e.i(586318),s=e.i(369340),c=e.i(610772),u=e.i(843476),d="Tabs",[f,p]=(0,a.createContextScope)(d,[r.createRovingFocusGroupScope]),v=(0,r.createRovingFocusGroupScope)(),[h,m]=f(d),y=t.forwardRef((e,t)=>{let{__scopeTabs:i,value:a,onValueChange:r,defaultValue:n,orientation:f="horizontal",dir:p,activationMode:v="automatic",...m}=e,y=(0,l.useDirection)(p),[g,w]=(0,s.useControllableState)({prop:a,onChange:r,defaultProp:n??"",caller:d});return(0,u.jsx)(h,{scope:i,baseId:(0,c.useId)(),value:g,onValueChange:w,orientation:f,dir:y,activationMode:v,children:(0,u.jsx)(o.Primitive.div,{dir:y,"data-orientation":f,...m,ref:t})})});y.displayName=d;var g="TabsList",w=t.forwardRef((e,t)=>{let{__scopeTabs:i,loop:a=!0,...n}=e,l=m(g,i),s=v(i);return(0,u.jsx)(r.Root,{asChild:!0,...s,orientation:l.orientation,dir:l.dir,loop:a,children:(0,u.jsx)(o.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...n,ref:t})})});w.displayName=g;var b="TabsTrigger",k=t.forwardRef((e,t)=>{let{__scopeTabs:a,value:n,disabled:l=!1,...s}=e,c=m(b,a),d=v(a),f=S(c.baseId,n),p=C(c.baseId,n),h=n===c.value;return(0,u.jsx)(r.Item,{asChild:!0,...d,focusable:!l,active:h,children:(0,u.jsx)(o.Primitive.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":p,"data-state":h?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:f,...s,ref:t,onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(n)}),onKeyDown:(0,i.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(n)}),onFocus:(0,i.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;h||l||!e||c.onValueChange(n)})})})});k.displayName=b;var x="TabsContent",_=t.forwardRef((e,i)=>{let{__scopeTabs:a,value:r,forceMount:l,children:s,...c}=e,d=m(x,a),f=S(d.baseId,r),p=C(d.baseId,r),v=r===d.value,h=t.useRef(v);return t.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,u.jsx)(n.Presence,{present:l||v,children:({present:t})=>(0,u.jsx)(o.Primitive.div,{"data-state":v?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!t,id:p,tabIndex:0,...c,ref:i,style:{...e.style,animationDuration:h.current?"0s":void 0},children:t&&s})})});function S(e,t){return`${e}-trigger-${t}`}function C(e,t){return`${e}-content-${t}`}_.displayName=x,e.s(["Content",0,_,"List",0,w,"Root",0,y,"Tabs",0,y,"TabsContent",0,_,"TabsList",0,w,"TabsTrigger",0,k,"Trigger",0,k,"createTabsScope",0,p],926209);var F=e.i(926209);e.s(["Tabs",0,F],627542)},884656,412012,e=>{"use strict";var t=e.i(475254);let i=(0,t.default)("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);e.s(["default",0,i],884656);let a=(0,t.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["default",0,a],412012)},246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},463059,541071,e=>{"use strict";var t=e.i(246349);e.s(["ChevronRight",()=>t.default],463059);var i=e.i(373488);e.s(["MoreHorizontal",()=>i.default],541071)},247978,136166,e=>{"use strict";var t=e.i(475254);
1let i=(0,t.default)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);e.s(["default",0,i],247978);let a=(0,t.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,a],136166)},561659,581418,e=>{"use strict";var t=e.i(247978);e.s(["CreditCard",()=>t.default],561659);var i=e.i(136166);e.s(["ShieldCheck",()=>i.default],581418)},373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t])},211749,e=>{"use strict";let t=(0,e.i(475254).default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["default",0,t])},187942,e=>{"use strict";let t=(0,e.i(475254).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",0,t])},517302,e=>{"use strict";let t=(0,e.i(475254).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["default",0,t])},768214,e=>{"use strict";let t=(0,e.i(475254).default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);e.s(["default",0,t])},360200,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["default",0,t])},44016,e=>{"use strict";let t=(0,e.i(475254).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["default",0,t])},903446,e=>{"use strict";let t=(0,e.i(475254).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",0,t])},827330,e=>{"use strict";let t=(0,e.i(475254).default)("user-plus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);e.s(["default",0,t])},487486,e=>{"use strict";var t=e.i(843476),i=e.i(500932),a=e.i(665623),r=e.i(586011),n=e.i(975157);let o=(0,a.cva)("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function(e){let a,l,s,c,u,d,f=(0,i.c)(13);f[0]!==e?({className:a,variant:s,asChild:c,...l}=e,f[0]=e,f[1]=a,f[2]=l,f[3]=s,f[4]=c):(a=f[1],l=f[2],s=f[3],c=f[4]);let p=void 0===s?"default":s,v=void 0!==c&&c?r.Slot.Root:"span";return f[5]!==a||f[6]!==p?(u=(0,n.cn)(o({variant:p}),a),f[5]=a,f[6]=p,f[7]=u):u=f[7],f[8]!==v||f[9]!==l||f[10]!==u||f[11]!==p?(d=(0,t.jsx)(v,{"data-slot":"badge","data-variant":p,className:u,...l}),f[8]=v,f[9]=l,f[10]=u,f[11]=p,f[12]=d):d=f[12],d}])},793479,e=>{"use strict";var t=e.i(843476),i=e.i(500932),a=e.i(975157);e.s(["Input",0,function(e){let r,n,o,l,s,c=(0,i.c)(10);return c[0]!==e?({className:r,type:o,...n}=e,c[0]=e,c[1]=r,c[2]=n,c[3]=o):(r=c[1],n=c[2],o=c[3]),c[4]!==r?(l=(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",r),c[4]=r,c[5]=l):l=c[5],c[6]!==n||c[7]!==l||c[8]!==o?(s=(0,t.jsx)("input",{type:o,"data-slot":"input",className:l,...n}
1),c[6]=n,c[7]=l,c[8]=o,c[9]=s):s=c[9],s}])},702107,6416,e=>{"use strict";var t=e.i(843476),i=e.i(500932),a=e.i(271645),r=e.i(774606);e.s(["Portal",0,r],6416);var r=r;e.s(["OverlayPortal",0,function(e){let n,o,l,s,c,u=(0,i.c)(9),{children:d}=e,[f,p]=(0,a.useState)(!1);u[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{p(!!document.querySelector(".po-root"))},o=[],u[0]=n,u[1]=o):(n=u[0],o=u[1]),(0,a.useLayoutEffect)(n,o);let v="u"<typeof document?void 0:document.fullscreenElement??void 0,h=f?"palette-os":void 0;return u[2]===Symbol.for("react.memo_cache_sentinel")?(l={display:"contents"},u[2]=l):l=u[2],u[3]!==d||u[4]!==f?(s=f?(0,t.jsx)("div",{className:"po-root",style:{display:"contents"},children:d}):d,u[3]=d,u[4]=f,u[5]=s):s=u[5],u[6]!==h||u[7]!==s?(c=(0,t.jsx)(r.Root,{container:v,"data-theme":h,style:l,children:s}),u[6]=h,u[7]=s,u[8]=c):c=u[8],c}],702107)},571300,e=>{"use strict";var t=e.i(500932),i=e.i(271645),a=e.i(710596),r=e.i(899612),n=e.i(982484),o=e.i(955946),l=e.i(480302);let s=null,c=null;function u(e){let t=e.manifest??{};return{id:e.plugin_id,name:t.name??e.plugin_id,tagline:t.tagline??"",description:t.description??"",category:(0,n.normalizeAppCategory)(t.category),route:`/apps/${e.plugin_id}`,gradient:{bg:t.gradient?.bg??"linear-gradient(135deg, #6366F1, #8B5CF6)",text:t.gradient?.text??"#fff"},icon:function(e){if(!e)return a.Sparkle;let t=r[e];return t&&("function"==typeof t||"object"==typeof t)?t:a.Sparkle}(t.icon),developer:t.developer??"Unknown",version:e.version,rating:0,reviews:0,storeScope:t.store_scope??"general",permissions:t.permissions??[],provides:t.provides,requires:t.requires,consumes:t.consumes}}function d(){let e,a,r,n=(0,t.c)(3);n[0]===Symbol.for("react.memo_cache_sentinel")?(e=s??[],n[0]=e):e=n[0];let[o,l]=(0,i.useState)(e);return n[1]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{let e=!1,t=v;return s?(l(s),()=>{e=!0}):(c||(c=Promise.all([t("/api/v1/appstore/catalog"),t("/api/v1/plugins/dev-catalog")]).then(p).finally(f)),c.then(t=>{e||l(t)}),()=>{e=!0})},r=[],n[1]=a,n[2]=r):(a=n[1],r=n[2]),(0,i.useEffect)(a,r),o}function f(){c=null}function p(e){let[t,i]=e,a=new Map;for(let e of t??[])a.set(e.plugin_id,e);for(let e of i??[])a.set(e.plugin_id,e);return s=Array.from(a.values()).map(u)}function v(e){return(0,l.fetchCatalogCached)(e)}e.s(["useAppsById",0,function(){let e,i=(0,t.c)(3),a=d(),{catalog:r}=(0,o.useAppFullCatalog)();if(i[0]!==r||i[1]!==a){for(let t of(e={...n.APP_BY_ID},a))t.id in e||(e[t.id]=t);for(let t of(0,n.mergeCanonicalAppCatalog)(r.map(o.fullCatalogToAppDefinition),a,n.APP_CATALOG))e[t.id]=t;i[0]=r,i[1]=a,i[2]=e}else e=i[2];return e},"useAppstoreCatalog",0,d])},345526,e=>{"use strict";var t=e.i(271645),i=e.i(13080),a=e.i(209165);let r="palette_installed_apps_changed",n=[],o=null,l=null,s=null,c=null,u=new Set;function d(e,t=o){for(let i of(o=t,l=t,n=e,u))i(e)}async function f(e,t=!1){return t||l!==e?!t&&s&&c===e?s:(c=e,s=(0,a.apiFetch)("/api/v1/app-installs").then(e=>e.json()).then(t=>(d(t,e),t)).catch(()=>(d([],e),[])).finally(()=>{s=null,c=null})):n}function p(e){return e&&"object"==typeof e&&"body"in e?e.body??e:e&&"object"==typeof e&&"detail"in e?{detail:e.detail}:e}e.s(["useInstalledApps",0,function(){let{user:e}=(0,i.useAuth)(),s=e?.organization_id??null,c=e&&s?`${e.id}:${s}`:null,[v,h]=(0,t.useState)(o===c?n:[]),[m,y]=(0,t.useState)(!!(c&&l!==c)),[g,w]=(0,t.useState)(null);(0,t.useEffect)(()=>(u.add(h),()=>{u.delete(h)}),[]),(0,t.useEffect)(()=>{let e=!1;return async function(){if(!c){e||(d([],null),y(!1));return}if(l===c){e||(h(n),y(!1));return}y(!0);try{await f(c)}finally{e||y(!1)}}(),()=>{e=!0}},[c]),(0,t.useEffect)(()=>{if(!c)return;let e=()=>{f(c,!0).catch(()=>{})};return window.addEventListener(r,e),()=>window.removeEventListener(r,e)},[c]);let b=(0,t.useCallback)(async(e,t)=>{w(null);let i=n;d(i.includes(e)?i:[...i,e]);try{let n=t?.includeDependencies?"?include_dependencies=true":"",o=await (0,a.apiFetch)(`/api/v1/app-installs/${e}${n}`,{method:"POST"});if(!o.ok){let e=await o.json().catch(()=>({detail:o.statusText}));return w(e),d(i),{ok:!1,error:e}}return window.dispatchEvent(new Event(r)),{ok:!0}}catch(t){d(i);let e=p(t);return w(e),{ok:!1,error:e}}},[]),k=(0,t.useCallback)(async e=>{w(null);let t=n;d(t.filter(t=>t!==e));try{let i=await (0,a.apiFetch)(`/api/v1/app-installs/${e}`,{method:"DELETE"});if(!i.ok){let e=await i.json().catch(()=>({detail:i.statusText}));return w(e),d(t),{ok:!1,error:e}}return window.dispatchEvent(new Event(r)),{ok:!0}}catch(i){d(t);let e=p(i);return w(e),{ok:!1,error:e}}},[]),x=(0,t.useMemo)(()=>e?.org_app_store_enabled===!1?[]:v,[v,e?.org_app_store_enabled]),_=(0,t.useCallback)(e=>x.includes(e),[x]);return{installedApps:x,install:b,uninstall:k,isInstalled:_,loading:m,lastError:g}}])},752270,e=>{"use strict";var t=e.i(271645),i=e.i(402389),a=e.i(13080),r=e.i(209165),n=e.i(593900);let o=new Map;function l(e){let t=o.get(e);return t||(t={sent:null,received:null,sentPromise:null,receivedPromise:null},o.set(e,t)),t}async function s(e,t,i=!1){let a=l(e),n=`${t}Promise`;return!i&&a[t]?a[t]:(!i&&a[n]||(a[n]=(0,r.apiFetch)(`/api/v1/invitations/${t}`).then(e=>e.ok?e.json():[]).then(e=>(a[t]=e,e)).catch(()=>a[t]??[]).finally(()=>{a[n]=null})),a[n])}e.s(["useInvitations",0,function(){let{user:e}=(0,a.useAuth)(),c=`${e?.id??"anon"}:${e?.organization_id??"none"}`,u=o.get(c),[d,f]=(0,t.useState)(u?.sent??[]),[p,v]=(0,t.useState)(u?.received??[]),[h,m]=(0,t.useState)(!!(e?.organization_id&&(!u?.sent||!u?.received))),y=(0,t.useCallback)(async(t=!1)=>
1{if(!e?.organization_id)return void f([]);try{f(await s(c,"sent",t))}catch{}},[c,e?.organization_id]),g=(0,t.useCallback)(async(t=!1)=>{if(!e?.organization_id)return void v([]);try{v(await s(c,"received",t))}catch{}},[c,e?.organization_id]),w=(0,t.useCallback)(async(e=!1)=>{m(!0),await Promise.all([y(e),g(e)]),m(!1)},[y,g]);return(0,n.useNotifications)({onNotification:t=>{if(e?.organization_id&&("org_invitation"===t.type||null==t.organization_id||t.organization_id===e.organization_id)){if("org_invitation"===t.type){"number"==typeof function(e){if(!e.data_json)return{};try{let t=JSON.parse(e.data_json);return t&&"object"==typeof t?t:{}}catch{return{}}}(t).invitation_id&&g(!0);return}("invitation_accepted"===t.type||"invitation_rejected"===t.type)&&y(!0)}}}),(0,t.useEffect)(()=>{w(!1)},[w]),{sentInvitations:d,receivedInvitations:p,loading:h,sendInvitation:async function(e,t){let a=await (0,r.apiFetch)("/api/v1/invitations/",{method:"POST",body:JSON.stringify({email:e,role:t})});if(!a.ok)throw Error((await a.json().catch(()=>({detail:i.default.t("hooksUi.invitations.sendFailed","Failed to send invitation")}))).detail||i.default.t("hooksUi.invitations.sendFailed","Failed to send invitation"));let n=await a.json(),o=l(c);return o.sent=[n,...o.sent??[]],f(e=>[n,...e]),n},acceptInvitation:async function(e){let t=await (0,r.movingWorkspace)(()=>(0,r.apiFetch)(`/api/v1/invitations/${e}/accept`,{method:"POST"}));if(!t.ok)throw Error((await t.json().catch(()=>({detail:i.default.t("hooksUi.invitations.acceptFailed","Failed to accept invitation")}))).detail||i.default.t("hooksUi.invitations.acceptFailed","Failed to accept invitation"));let a=await t.json(),n=l(c);return n.received&&(n.received=n.received.filter(t=>t.id!==e)),v(t=>t.filter(t=>t.id!==e)),a},rejectInvitation:async function(e){let t=await (0,r.apiFetch)(`/api/v1/invitations/${e}/reject`,{method:"POST"});if(!t.ok)throw Error((await t.json().catch(()=>({detail:i.default.t("hooksUi.invitations.rejectFailed","Failed to reject invitation")}))).detail||i.default.t("hooksUi.invitations.rejectFailed","Failed to reject invitation"));let a=l(c);a.received&&(a.received=a.received.filter(t=>t.id!==e)),v(t=>t.filter(t=>t.id!==e))},cancelInvitation:async function(e){let t=await (0,r.apiFetch)(`/api/v1/invitations/${e}`,{method:"DELETE"});if(!t.ok)throw Error((await t.json().catch(()=>({detail:i.default.t("hooksUi.invitations.cancelFailed","Failed to cancel invitation")}))).detail||i.default.t("hooksUi.invitations.cancelFailed","Failed to cancel invitation"));let a=l(c);a.sent&&(a.sent=a.sent.filter(t=>t.id!==e)),f(t=>t.filter(t=>t.id!==e))},acceptByToken:async function(e){let t=await (0,r.apiFetch)("/api/v1/invitations/accept-by-token",{method:"POST",body:JSON.stringify({token:e})});if(!t.ok)throw Error((await t.json().catch(()=>({detail:i.default.t("hooksUi.invitations.invalid","Invalid or expired invitation")}))).detail||i.default.t("hooksUi.invitations.invalid","Invalid or expired invitation"));return await t.json()},refetch:w}}])},30728,e=>{"use strict";var t=e.i(13080);e.s(["useIsOwnerOrAdmin",0,function(){let{user:e}=(0,t.useAuth)();return e?.org_role==="owner"||e?.org_role==="admin"}])},569552,e=>{"use strict";var t=e.i(271645),i=e.i(402389),a=e.i(13080),r=e.i(209165);let n=new Map;async function o(e,t=!1){let i=n.get(e);if(!t&&i?.result)return i.result;if(!t&&i?.promise)return i.promise;let a={result:null,promise:null},l=(0,r.apiFetch)("/api/v1/org/teams").then(e=>e.json()).then(e=>(a.result=e,e)).catch(()=>(a.result=[],[])).finally(()=>{a.promise=null});return a.promise=l,n.set(e,a),l}e.s(["useOrgTeams",0,function(){let{user:e}=(0,a.useAuth)(),l=e?.organization_id??null,s=l?String(l):"none",c=n.get(s)?.result,[u,d]=(0,t.useState)(c??[]),[f,p]=(0,t.useState)(!!(l&&!c)),v=(0,t.useCallback)(async(e=!0)=>{if(!l){d([]),p(!1);return}p(!0);try{let t=await o(s,e);d(t)}catch{d([])}finally{p(!1)}},[s,l]);(0,t.useEffect)(()=>{v(!1)},[v]);let h=(0,t.useCallback)(async e=>{let t=await (0,r.apiFetch)("/api/v1/org/teams",{method:"POST",body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json().catch(()=>({}))).detail??"Failed to create team");await v()},[v]),m=(0,t.useCallback)(async(e,t)=>{let a=await (0,r.apiFetch)(`/api/v1/org/teams/${e}`,{method:"PATCH",body:JSON.stringify(t)});if(!a.ok)throw Error((await a.json().catch(()=>({}))).detail??i.default.t("hooksUi.orgTeams.updateFailed","Failed to update team"));await v()},[v]),y=(0,t.useCallback)(async e=>{let t=await (0,r.apiFetch)(`/api/v1/org/teams/${e}`,{method:"DELETE"});if(!t.ok)throw Error((await t.json().catch(()=>({}))).detail??i.default.t("hooksUi.orgTeams.deleteFailed","Failed to delete team"));await v()},[v]),g=(0,t.useCallback)(async(e,t)=>{let a=await (0,r.apiFetch)(`/api/v1/org/teams/${e}/members`,{method:"PUT",body:JSON.stringify({members:t})});if(!a.ok)throw Error((await a.json().catch(()=>({}))).detail??i.default.t("hooksUi.orgTeams.membersFailed","Failed to update team members"));await v()},[v]),w=(0,t.useCallback)(async(e,t,a)=>{let n=await (0,r.apiFetch)(`/api/v1/org/teams/${e}/apps`,{method:"PUT",body:JSON.stringify({app_access_mode:t,app_ids:a})});if(!n.ok)throw Error((await n.json().catch(()=>({}))).detail??i.default.t("hooksUi.orgTeams.appsFailed","Failed to update team apps"));await v()},[v]);return{teams:u,loading:f,refetch:v,createTeam:h,updateTeam:m,deleteTeam:y,updateTeamMembers:g,updateTeamApps:w}}])},529682,e=>{"use strict";var t=e.i(500932),i=e.i(271645),a=e.i(402389),r=e.i(209165),n=e.i(774498);async function o(e,t){let i=await (0,r.apiFetch)((0,n.connectionAuthorizePath)(e,t)),o=await i.json();if("string"!=typeof o.authorize_url)throw Error(a.default.t("hooksUi.serviceConnections.noAuthorizeUrl","No authorize URL returned"));window.location.href=o.authorize_url}e.s(["useServiceConnections",0,function(){let e,n,l,s,c,u,d,f,p,v=(0,t.c)(12);v[0]===Symbol.for("react.memo_cache_sentinel")?(e=[],v[0]=e):e=v[0];let[h,m]=(0,i.useState)(e),[y,g]=(0,i.useState)(!0),[w,b]=(0,i.useState)(null);v[1]===Symbol.for("react.memo_cache_sentinel")?(n=async()=>{try{let e=await (0,r.apiFetch)("/api/v1/connections");m(await e.json()),b(null)}catch(e){b(e instanceof Error?e.message:a.default.t("hooksUi.serviceConnections.loadFailed","Failed to load connections"))}},v[1]=n):n=v[1];let k=n;v[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{k().finally(()=>g(!1))},s=[k],v[2]=l,v[3]=s):(l=v[2],s=v[3]),(0,i.useEffect)(l,s),v[4]===Symbol.for("react.memo_cache_sentinel")?(c=async e=>{await (0,r.apiFetch)(`/api/v1/connections/${e}`,{method:"DELETE"}),await k()},v[4]=c):c=v[4];let x=c;v[5]===Symbol.for("react.memo_cache_sentinel")?(u=async e=>{let t=await (0,r.apiFetch)(`/api/v1/connections/${e}/test`,{method:"POST",body:"{}"}),i=await t.json();return await k(),i},v[5]=u):u=v[5];let _=u;v[6]===Symbol.for("react.memo_cache_sentinel")?(d=async(e,t)=>{let i=await (0,r.apiFetch)(`/api/v1/connections/${e}/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({bot_token:t})}),a=await i.json();return await k(),a},v[6]=d):d=v[6];let S=d;v[7]===Symbol.for("react.memo_cache_sentinel")?(f=async(e,t)=>{let i=await (0,r.apiFetch)(`/api/v1/connections/${e}/tools`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),a=await i.json();return await k(),a},v[7]=f):f=v[7];let C=f;
1return v[8]!==h||v[9]!==w||v[10]!==y?(p={connections:h,loading:y,error:w,refetch:k,connect:o,disconnect:x,test:_,connectWithToken:S,updateToolSettings:C},v[8]=h,v[9]=w,v[10]=y,v[11]=p):p=v[11],p}])},774498,e=>{"use strict";var t=e.i(209165);function i(e,t={}){let a="string"==typeof t?{returnTo:t}:t,r=a.returnTo??`${window.location.pathname}${window.location.search}${window.location.hash}`,n=new URLSearchParams;for(let e of(!r?.startsWith("/")||r.startsWith("//")||r.includes("\\")||n.set("return_to",r),a.scopes??[]))e.trim()&&n.append("scopes",e);a.display&&n.set("display",a.display);let o=n.toString();return`/api/v1/connections/${encodeURIComponent(e)}/authorize${o?`?${o}`:""}`}async function a(e,r={}){let n=window.open("about:blank","palette-connect","width=560,height=720");if(!n){if(!1===r.redirectOnBlocked)throw Error("popup blocked");let a=await (0,t.apiFetch)(i(e,{scopes:r.scopes})),n=await a.json();if("string"!=typeof n?.authorize_url)throw Error("no authorize_url");return window.location.href=n.authorize_url,"redirected"}try{let a=await (0,t.apiFetch)(i(e,{display:"popup",scopes:r.scopes})),o=await a.json();if("string"!=typeof o?.authorize_url)throw Error("no authorize_url");if(n.closed)return"denied";n.location.href=o.authorize_url}catch(e){throw n.close(),e}return new Promise(i=>{let a=e=>{window.removeEventListener("message",r),clearInterval(o),i(e)},r=i=>{try{if(i.origin!==new URL(t.BASE,window.location.href).origin)return}catch{return}if(i.source!==n)return;let r=i.data;r?.source==="palette-connections"&&r.provider===e&&a("connected"===r.status?"connected":"denied"===r.status?"denied":"error")};window.addEventListener("message",r);let o=setInterval(()=>{n.closed&&a("error")},600)})}e.s(["connectionAuthorizePath",0,i,"openConnectPopup",0,a])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.