!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a09684-0260-7040-9d14-ddba8380a2a4")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,298091,e=>{"use strict";var t=e.i(270401);let r=t.forwardRef(function({title:e,titleId:r,...n},o){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))});e.s(["Bars3Icon",0,r],298091)},53375,e=>{"use strict";var t=e.i(270401);let r=t.forwardRef(function({title:e,titleId:r,...n},o){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z"}))});e.s(["StopIcon",0,r],53375)},531650,e=>{"use strict";var t=e.i(270401);let r=t.forwardRef(function({title:e,titleId:r,...n},o){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{fillRule:"evenodd",d:"M18.97 3.659a2.25 2.25 0 0 0-3.182 0l-10.94 10.94a3.75 3.75 0 1 0 5.304 5.303l7.693-7.693a.75.75 0 0 1 1.06 1.06l-7.693 7.693a5.25 5.25 0 1 1-7.424-7.424l10.939-10.94a3.75 3.75 0 1 1 5.303 5.304L9.097 18.835l-.008.008-.007.007-.002.002-.003.002A2.25 2.25 0 0 1 5.91 15.66l7.81-7.81a.75.75 0 0 1 1.061 1.06l-7.81 7.81a.75.75 0 0 0 1.054 1.068L18.97 6.84a2.25 2.25 0 0 0 0-3.182Z",clipRule:"evenodd"}))});e.s(["PaperClipIcon",0,r],531650)},694913,864226,e=>{"use strict";var t=e.i(126435),r=e.i(403908);let n=/[#.]/g;var o=e.i(301800),a=e.i(773601),s=e.i(237925);function l(e,t,a){let l=a?function(e){let t=new Map;for(let r of e)t.set(r.toLowerCase(),r);return t}(a):void 0;return function(a,c,...d){let m;if(null==a)m={type:"root",children:[]},d.unshift(c);else{let u=(m=function(e,t){let r,o,a=e||"",s={},l=0;for(;l{"use strict";e.s(["htmlVoidElements",0,["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"]])},892542,e=>{"use strict";let t={}.hasOwnProperty;e.s(["zwitch",0,function(e,r){let n=r||{};function o(r,...n){let a=o.invalid,s=o.handlers;if(r&&t.call(r,e)){let n=String(r[e]);a=t.call(s,n)?s[n]:o.unknown}if(a)return a.call(this,r,...n)}return o.handlers=n.handlers||{},o.invalid=n.invalid,o.unknown=n.unknown,o}])},965542,291730,e=>{"use strict";var t=e.i(222666),r=e.i(505962),n=e.i(452473),o=e.i(128341),a=e.i(821369),s=e.i(994740),l=e.i(270401),i=e.i(972117),c=e.i(517567),d=e.i(777096),m=e.i(922083),u=e.i(933975);e.i(810810);var p=e.i(702378),f=e.i(241636);let h="data-message-chrome",g={[h]:""},b=`[${h}]`;e.s(["MESSAGE_CHROME_SELECTOR",0,b,"messageChromeProps",0,g],291730);let x=(0,a.default)(()=>e.A(666703),{loadableGenerated:{modules:[567707]}}),y="pointer-events-none sticky top-12 z-10 h-0",w="pointer-events-auto absolute right-2 top-2 flex items-center",v="mt-6 mb-4 text-foreground",k=e=>{let o,a,s=(0,r.c)(3),{children:l}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,n.cn)(v,"border-b border-border pb-1 text-2xl font-bold"),s[0]=o):o=s[0],s[1]!==l?(a=(0,t.jsx)("h1",{className:o,children:l}),s[1]=l,s[2]=a):a=s[2],a},N=e=>{let o,a,s=(0,r.c)(3),{children:l}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,n.cn)(v,"text-2xl font-bold"),s[0]=o):o=s[0],s[1]!==l?(a=(0,t.jsx)("h2",{className:o,children:l}),s[1]=l,s[2]=a):a=s[2],a},j=e=>{let o,a,s=(0,r.c)(3),{children:l}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,n.cn)(v,"text-base font-medium"),s[0]=o):o=s[0],s[1]!==l?(a=(0,t.jsx)("h3",{className:o,children:l}),s[1]=l,s[2]=a):a=s[2],a},_=e=>{let o,a,s=(0,r.c)(3),{children:l}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,n.cn)(v,"text-base font-medium"),s[0]=o):o=s[0],s[1]!==l?(a=(0,t.jsx)("h4",{className:o,children:l}),s[1]=l,s[2]=a):a=s[2],a},E=e=>{let o,a,s=(0,r.c)(3),{children:l}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,n.cn)(v,"text-base font-medium"),s[0]=o):o=s[0],s[1]!==l?(a=(0,t.jsx)("h5",{className:o,children:l}),s[1]=l,s[2]=a):a=s[2],a},A=e=>{let o,a,s=(0,r.c)(3),{children:l}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,n.cn)(v,"text-sm font-medium"),s[0]=o):o=s[0],s[1]!==l?(a=(0,t.jsx)("h6",{className:o,children:l}),s[1]=l,s[2]=a):a=s[2],a},S=e=>{let n,o=(0,r.c)(2),{children:a}=e;return o[0]!==a?(n=(0,t.jsx)("blockquote",{className:"mb-4 border-l-2 border-border pl-4 italic",children:a}),o[0]=a,o[1]=n):n=o[1],n},C=e=>{let n,o=(0,r.c)(2),{children:a}=e;return o[0]!==a?(n=(0,t.jsx)("p",{className:"mb-4 break-words text-sm font-normal leading-7",children:a}),o[0]=a,o[1]=n):n=o[1],n},R=e=>{let n,o=(0,r.c)(2),{children:a}=e;return o[0]!==a?(n=(0,t.jsx)("div",{className:"markdown-table my-6 overflow-x-auto rounded-lg border border-border bg-card text-foreground",children:(0,t.jsx)("table",{className:"w-full border-collapse",children:a})}),o[0]=a,o[1]=n):n=o[1],n},L=e=>{let n,o=(0,r.c)(2),{children:a}=e;return o[0]!==a?(n=(0,t.jsx)("thead",{className:"whitespace-nowrap border-b border-border text-foreground",children:a}),o[0]=a,o[1]=n):n=o[1],n},B=e=>{let n,o=(0,r.c)(2),{children:a}=e;return o[0]!==a?(n=(0,t.jsx)("tbody",{children:a}),o[0]=a,o[1]=n):n=o[1],n},F=e=>{let n,o=(0,r.c)(2),{children:a}=e;return o[0]!==a?(n=(0,t.jsx)("tr",{className:"border-b border-border last:border-b-0",children:a}),o[0]=a,o[1]=n):n=o[1],n},M=e=>{let n,o=(0,r.c)(2),{children:a}=e;return o[0]!==a?(n=(0,t.jsx)("th",{className:"border-r border-border p-3 text-left font-medium last:border-r-0",children:a}),o[0]=a,o[1]=n):n=o[1],n},O=e=>{let n,o=(0,r.c)(2),{children:a}=e;return o[0]!==a?(n=(0,t.jsx)("td",{className:"border-r border-border p-3 text-left last:border-r-0",children:a}),o[0]=a,o[1]=n):n=o[1],n},T=e=>{let n,o,a=(0,r.c)(4);if(a[0]!==e){let{node:t,...r}=e;n=r,a[0]=e,a[1]=n}else n=a[1];return a[2]!==n?(o=(0,t.jsx)("ul",{...n,className:"list-disc pl-8"}),a[2]=n,a[3]=o):o=a[3],o},I=e=>{let n,o,a=(0,r.c)(4);if(a[0]!==e){let{node:t,...r}=e;n=r,a[0]=e,a[1]=n}else n=a[1];return a[2]!==n?(o=(0,t.jsx)("ol",{...n,className:"list-decimal pl-8"}),a[2]=n,a[3]=o):o=a[3],o},D=e=>{let n,o=(0,r.c)(2),{children:a}=e;return o[0]!==a?(n=(0,t.jsx)("li",{className:"mt-1.5",children:a}),o[0]=a,o[1]=n):n=o[1],n},P=()=>{let e,n=(0,r.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("hr",{className:"my-6 border-t border-border"}),n[0]=e):e=n[0],e},H=e=>{let n,o=(0,r.c)(3),{src:a,alt:l}=e;if("string"!=typeof a||!a)return null;let i=l??"";return o[0]!==a||o[1]!==i?(n=(0,t.jsx)(s.default,{src:a,alt:i,width:0,height:0,sizes:"100vw",className:"w-full h-auto max-w-full rounded-lg",unoptimized:!0}),o[0]=a,o[1]=i,o[2]=n):n=o[2],n},G="opacity-0 transition-opacity duration-100 group-hover/codeblock:opacity-100",z="inline-flex rounded-md bg-popover",W=e=>{let o,a,s=(0,r.c)(3),{text:l}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,n.cn)(z,G),s[0]=o):o=s[0],s[1]!==l?(a=(0,t.jsx)("span",{className:o,children:(0,t.jsx)(p.CopyToClipboardButton,{text:l,hideCopyText:!0,className:"hover:bg-card-hover",size:"icon-sm",variant:"ghost"})}),s[1]=l,s[2]=a):a=s[2],a},K=e=>{let a,s,i,c,d,p,f=(0,r.c)(30),{children:h}=e,{resolvedTheme:b}=(0,o.useTheme)();if(f[0]!==h){let e,{className:t,children:r}=l.default.Children.toArray(h)[0].props;a=r,f[3]===Symbol.for("react.memo_cache_sentinel")?(e=/language-(\w+)/,f[3]=e):e=f[3],s=e.exec(t||""),f[0]=h,f[1]=a,f[2]=s}else a=f[1],s=f[2];let x=s,v=x?x[1]:null;if(v){let e,r,o,s,l,i,c,d="dark"===b?m.OPENROUTER_SHIKI_DARK_THEME:m.OPENROUTER_SHIKI_LIGHT_THEME,p=String(a);f[4]!==p?(e=p.trimEnd(),f[4]=p,f[5]=e):e=f[5];let h=e;return f[6]===Symbol.for("react.memo_cache_sentinel")?(r=(0,n.cn)(z,"h-8 select-none items-center px-1.5 text-xs leading-none text-muted-foreground",G),f[6]=r):r=f[6],f[7]!==v?(o=(0,t.jsx)("span",{className:r,children:v}),f[7]=v,f[8]=o):o=f[8],f[9]!==h?(s=(0,t.jsx)(W,{text:h}),f[9]=h,f[10]=s):s=f[10],f[11]!==o||f[12]!==s?(l=(0,t.jsx)("div",{className:y,...g,children:(0,t.jsxs)("div",{className:w,children:[o,s]})}),f[11]=o,f[12]=s,f[13]=l):l=f[13],f[14]!==h||f[15]!==v||f[16]!==d?(i=(0,t.jsx)(u.ShikiHighlighter,{code:h,lang:v,theme:d}),f[14]=h,f[15]=v,f[16]=d,f[17]=i):i=f[17],f[18]!==l||f[19]!==i?(c=(0,t.jsxs)("div",{className:"relative group/codeblock mb-4",children:[l,i]}),f[18]=l,f[19]=i,f[20]=c):c=f[20],c}let k=String(a);f[21]!==k?(i=k.trimEnd(),f[21]=k,f[22]=i):i=f[22];let N=i;return f[23]!==N?(c=(0,t.jsx)("div",{className:y,...g,children:(0,t.jsx)("div",{className:w,children:(0,t.jsx)(W,{text:N})})}),f[23]=N,f[24]=c):c=f[24],f[25]!==N?(d=(0,t.jsx)("pre",{className:"overflow-x-auto rounded-lg border border-border bg-card p-4",children:(0,t.jsx)("code",{className:"bg-transparent font-mono text-sm text-foreground",children:N})}),f[25]=N,f[26]=d):d=f[26],f[27]!==c||f[28]!==d?(p=(0,t.jsxs)("div",{className:"relative group/codeblock mb-4",children:[c,d]}),f[27]=c,f[28]=d,f[29]=p):p=f[29],p},U=e=>{let n,o=(0,r.c)(2),{children:a}=e;return o[0]!==a?(n=(0,t.jsx)("strong",{className:"font-medium",children:a}),o[0]=a,o[1]=n):n=o[1],n},q=e=>{let n,o,a,s=(0,r.c)(6);return s[0]!==e?({children:n,...o}=e,s[0]=e,s[1]=n,s[2]=o):(n=s[1],o=s[2]),s[3]!==n||s[4]!==o?(a=(0,t.jsx)("details",{...o,className:"group/details mb-4 overflow-hidden rounded-lg border border-border bg-card px-4 text-foreground open:pb-3",children:n}),s[3]=n,s[4]=o,s[5]=a):a=s[5],a},V=e=>{let n,o,a,s=(0,r.c)(6);return s[0]!==e?({children:n,...o}=e,s[0]=e,s[1]=n,s[2]=o):(n=s[1],o=s[2]),s[3]!==n||s[4]!==o?(a=(0,t.jsx)("summary",{...o,className:'-mx-4 flex cursor-pointer list-none select-none items-center gap-2 px-4 py-3 font-medium text-foreground transition-colors hover:bg-card-hover before:text-xs before:transition-transform before:duration-200 before:content-["▶"] group-open/details:before:rotate-90 [&::-webkit-details-marker]:hidden',children:n}),s[3]=n,s[4]=o,s[5]=a):a=s[5],a},Z=[];e.s(["ChatroomMarkdownContainer",0,e=>{let o,a,s,m,u,p,h,g,b=(0,r.c)(28),{children:y,className:w,linkClassName:v,disableLink:G,shouldRenderRawHtml:z,disallowedElements:W,codeVariant:$}=e,X=void 0===y?"":y,Y=void 0===w?"":w,J=void 0===v?"":v,Q=void 0!==G&&G,ee=void 0===z||z,et=void 0===W?Z:W,er=void 0===$?"classic":$;if(b[0]!==er){let e;e="subtle"===er?"rounded-md bg-card-hover border border-border px-1.5 py-0.5 font-mono text-sm leading-6 break-words text-foreground":"rounded-md bg-card-hover px-1.5 py-0.5 font-mono text-sm leading-6 break-words",o=o=>{let a,s,l,i,c,d=(0,r.c)(10);if(d[0]!==o){let{node:e,className:t,children:r,...n}=o;s=t,a=r,l=n,d[0]=o,d[1]=a,d[2]=s,d[3]=l}else a=d[1],s=d[2],l=d[3];return d[4]!==s?(i=(0,n.cn)(e,"[.markdown-table_td_&]:break-normal [.markdown-table_td_&]:whitespace-pre","[.markdown-table_th_&]:break-normal [.markdown-table_th_&]:whitespace-pre","classic"===er&&"text-foreground",s),d[4]=s,d[5]=i):i=d[5],d[6]!==a||d[7]!==l||d[8]!==i?(c=(0,t.jsx)("code",{...l,className:i,children:a}),d[6]=a,d[7]=l,d[8]=i,d[9]=c):c=d[9],c},b[0]=er,b[1]=o}else o=b[1];if(b[2]!==Q||b[3]!==J){let e;e={disableLink:Q,linkClassName:J},a=({node:r,...n})=>e.disableLink?(0,t.jsx)("span",{...n}):(0,t.jsx)(d.MarkdownLink,{className:e.linkClassName,...n,children:n.children}),b[2]=Q,b[3]=J,b[4]=a}else a=b[4];b[5]!==o||b[6]!==a?(s={h1:k,h2:N,h3:j,h4:_,h5:E,h6:A,blockquote:S,p:C,pre:K,code:o,table:R,thead:L,tbody:B,tr:F,th:M,td:O,ul:T,ol:I,li:D,hr:P,a:a,strong:U,img:H,details:q,summary:V},b[5]=o,b[6]=a,b[7]=s):s=b[7];let en=s,eo=(0,c.hasMathSyntax)(X);b[8]!==ee?(m=(0,f.getBaseChatroomRehypePlugins)(ee),b[8]=ee,b[9]=m):m=b[9];let ea=m,es="subtle"===er&&"[&_h1]:text-2xl [&_h2]:text-xl";b[10]!==Y||b[11]!==es?(u=(0,n.cn)("min-w-0 w-full","[&>ol]:mb-4 [&>ul]:mb-4","[&>*:last-child]:mb-0","[&_li>p]:mb-0",es,Y),b[10]=Y,b[11]=es,b[12]=u):u=b[12];let el=u;b[13]!==X||b[14]!==en||b[15]!==el||b[16]!==et||b[17]!==ea?(p=(0,t.jsx)(i.default,{remarkPlugins:f.BASE_CHATROOM_REMARK_PLUGINS,rehypePlugins:ea,disallowedElements:et,components:en,className:el,children:X}),b[13]=X,b[14]=en,b[15]=el,b[16]=et,b[17]=ea,b[18]=p):p=b[18];let ei=p;return eo?(b[19]!==X||b[20]!==en||b[21]!==el||b[22]!==et||b[23]!==ee?(h=(0,t.jsx)(x,{shouldRenderRawHtml:ee,disallowedElements:et,components:en,className:el,children:X}),b[19]=X,b[20]=en,b[21]=el,b[22]=et,b[23]=ee,b[24]=h):h=b[24],b[25]!==ei||b[26]!==h?(g=(0,t.jsx)(l.Suspense,{fallback:ei,children:h}),b[25]=ei,b[26]=h,b[27]=g):g=b[27],g):ei}],965542)},922083,e=>{"use strict";let t="#03080A",r="#03080AB0",n="#FCFCFE",o="#FCFCFEA0",a="openrouter-light",s="openrouter-dark";e.s(["OPENROUTER_SHIKI_DARK_THEME",0,s,"OPENROUTER_SHIKI_LIGHT_THEME",0,a,"openrouterShikiDarkTheme",0,{name:s,type:"dark",colors:{"editor.background":"#03080A","editor.foreground":n},settings:[{settings:{foreground:n}},{scope:["comment","punctuation.definition.comment"],settings:{foreground:o}},{scope:["punctuation","meta.brace","meta.delimiter"],settings:{foreground:o}},{scope:["string","punctuation.definition.string","markup.inserted"],settings:{foreground:"#34DFAA"}},{scope:["constant.numeric","constant.language","constant.character","constant.other","entity.other.attribute-name"],settings:{foreground:"#FFAB00"}},{scope:["keyword","keyword.operator.new","storage.type","storage.modifier"],settings:{foreground:"#4D8DFF"}},{scope:["entity.name.function","support.function","meta.function-call.generic"],settings:{foreground:"#DA70D6"}},{scope:["entity.name.type","entity.name.class","entity.name.namespace","support.type","support.class"],settings:{foreground:"#40E0D0"}},{scope:["variable","variable.parameter","variable.other"],settings:{foreground:n}},{scope:["variable.other.property","support.variable.property"],settings:{foreground:"#FFBB28"}},{scope:["entity.name.tag","markup.deleted","invalid"],settings:{foreground:"#FF2D55"}},{scope:["string.regexp","constant.regexp"],settings:{foreground:"#9ACD32"}},{scope:["markup.heading","markup.bold"],settings:{fontStyle:"bold",foreground:n}},{scope:["markup.italic"],settings:{fontStyle:"italic"}}]},"openrouterShikiLightTheme",0,{name:a,type:"light",colors:{"editor.background":"#FFFFFF","editor.foreground":t},settings:[{settings:{foreground:t}},{scope:["comment","punctuation.definition.comment"],settings:{foreground:r}},{scope:["punctuation","meta.brace","meta.delimiter"],settings:{foreground:r}},{scope:["string","punctuation.definition.string","markup.inserted"],settings:{foreground:"#007544"}},{scope:["constant.numeric","constant.language","constant.character","constant.other","entity.other.attribute-name"],settings:{foreground:"#8A6000"}},{scope:["keyword","keyword.operator.new","storage.type","storage.modifier"],settings:{foreground:"#0352C9"}},{scope:["entity.name.function","support.function","meta.function-call.generic"],settings:{foreground:"#800080"}},{scope:["entity.name.type","entity.name.class","entity.name.namespace","support.type","support.class"],settings:{foreground:"#4682B4"}},{scope:["variable","variable.parameter","variable.other"],settings:{foreground:t}},{scope:["variable.other.property","support.variable.property"],settings:{foreground:"#7B68EE"}},{scope:["entity.name.tag","markup.deleted","invalid"],settings:{foreground:"#BF0024"}},{scope:["string.regexp","constant.regexp"],settings:{foreground:"#2E8B57"}},{scope:["markup.heading","markup.bold"],settings:{fontStyle:"bold",foreground:t}},{scope:["markup.italic"],settings:{fontStyle:"italic"}}]}])},524268,e=>{"use strict";var t=e.i(222666),r=e.i(505962),n=e.i(368862),o=e.i(298091),a=e.i(452473),s=e.i(528164),l=e.i(270401),i=e.i(214857),c=e.i(882968),d=e.i(340966);e.s(["HistorySidebarDrawer",0,function(e){let m,u,p,f,h,g,b,x,y,w,v,k,N,j,_,E,A,S,C,R,L,B,F,M,O,T,I,D=(0,r.c)(68),{title:P,triggerAriaLabel:H,isOpen:G,onOpenChange:z,newAction:W,children:K}=e,U=(0,d.usePortalContainer)(),q=W.icon;D[0]!==G||D[1]!==z?(m=()=>{if(!G)return;let e=e=>{"Escape"===e.key&&z(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},u=[G,z],D[0]=G,D[1]=z,D[2]=m,D[3]=u):(m=D[2],u=D[3]),(0,l.useEffect)(m,u),D[4]!==W||D[5]!==z?(p=async()=>{await W.onClick(),z(!1)},D[4]=W,D[5]=z,D[6]=p):p=D[6];let V=p;D[7]!==z?(f=()=>z(!1),D[7]=z,D[8]=f):f=D[8];let Z=G?"opacity-100":"pointer-events-none opacity-0";D[9]!==Z?(h=(0,a.cn)(c.MOBILE_DRAWER_BACKDROP,Z),D[9]=Z,D[10]=h):h=D[10],D[11]!==f||D[12]!==h?(g=(0,t.jsx)("div",{"aria-hidden":"true",onClick:f,className:h}),D[11]=f,D[12]=h,D[13]=g):g=D[13];let $=G?"open":"closed",X=G?"translate-x-0":"pointer-events-none invisible -translate-x-full";D[14]!==X?(b=(0,a.cn)(c.MOBILE_DRAWER_INSET,c.MOBILE_DRAWER_WIDTH,c.MOBILE_DRAWER_SURFACE,"left-0 flex flex-col dark:border-r","transition-[transform,visibility] duration-200 will-change-transform",X),D[14]=X,D[15]=b):b=D[15],D[16]!==G?(x=G?{}:{inert:!0},D[16]=G,D[17]=x):x=D[17],D[18]!==P?(y=P.toLowerCase(),D[18]=P,D[19]=y):y=D[19];let Y=`Back to ${y}`;D[20]!==z?(w=()=>z(!1),D[20]=z,D[21]=w):w=D[21],D[22]===Symbol.for("react.memo_cache_sentinel")?(v=(0,t.jsx)(n.ArrowLeftIcon,{className:"!size-5"}),D[22]=v):v=D[22],D[23]!==Y||D[24]!==w?(k=(0,t.jsx)(s.Button,{type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 shrink-0","aria-label":Y,onClick:w,children:v}),D[23]=Y,D[24]=w,D[25]=k):k=D[25],D[26]!==P?(N=(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:P}),D[26]=P,D[27]=N):N=D[27],D[28]!==k||D[29]!==N?(j=(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-2 py-2",children:[k,N]}),D[28]=k,D[29]=N,D[30]=j):j=D[30],D[31]!==V?(_=()=>void V(),D[31]=V,D[32]=_):_=D[32],D[33]!==q?(E=(0,t.jsx)(q,{className:"absolute left-3 size-4"}),D[33]=q,D[34]=E):E=D[34],D[35]!==W.label?(A=(0,t.jsx)("span",{className:"w-full text-center",children:W.label}),D[35]=W.label,D[36]=A):A=D[36],D[37]!==_||D[38]!==E||D[39]!==A?(S=(0,t.jsxs)(s.Button,{type:"button",size:"md",variant:"outline",className:"relative w-full shrink-0 shadow-none",onClick:_,children:[E,A]}),D[37]=_,D[38]=E,D[39]=A,D[40]=S):S=D[40],D[41]!==K?(C=(0,t.jsx)("div",{className:"min-h-0 flex-1",children:K}),D[41]=K,D[42]=C):C=D[42],D[43]!==S||D[44]!==C?(R=(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-2 p-2",children:[S,C]}),D[43]=S,D[44]=C,D[45]=R):R=D[45],D[46]!==b||D[47]!==x||D[48]!==j||D[49]!==R||D[50]!==$||D[51]!==P?(L=(0,t.jsxs)("div",{role:"dialog","aria-label":P,"data-state":$,className:b,...x,children:[j,R]}),D[46]=b,D[47]=x,D[48]=j,D[49]=R,D[50]=$,D[51]=P,D[52]=L):L=D[52],D[53]!==L||D[54]!==g?(B=(0,t.jsxs)(t.Fragment,{children:[g,L]}),D[53]=L,D[54]=g,D[55]=B):B=D[55];let J=B;return D[56]!==z?(F=()=>z(!0),D[56]=z,D[57]=F):F=D[57],D[58]===Symbol.for("react.memo_cache_sentinel")?(M=(0,t.jsx)(o.Bars3Icon,{className:"!size-5"}),D[58]=M):M=D[58],D[59]!==F||D[60]!==H?(O=(0,t.jsx)(s.Button,{type:"button",variant:"ghost",size:"icon",className:"h-9 w-9 shrink-0 shadow-none","aria-label":H,onClick:F,children:M}),D[59]=F,D[60]=H,D[61]=O):O=D[61],D[62]!==U||D[63]!==J?(T=U?(0,i.createPortal)(J,U):null,D[62]=U,D[63]=J,D[64]=T):T=D[64],D[65]!==O||D[66]!==T?(I=(0,t.jsxs)(t.Fragment,{children:[O,T]}),D[65]=O,D[66]=T,D[67]=I):I=D[67],I}])},160962,e=>{"use strict";var t=e.i(222666),r=e.i(505962),n=e.i(553215),o=e.i(452473),a=e.i(528164),s=e.i(252358),l=e.i(505987);e.i(406201);var i=e.i(806024);e.s(["NoWorkspaceState",0,function(e){let c,d,m,u,p,f,h,g,b=(0,r.c)(16),{surface:x,className:y,description:w}=e,v=void 0===w?"You need to be a member of a workspace to use Chat and Fusion.":w,k=(0,s.usePosthogClient)();return b[0]!==y?(c=(0,o.cn)("flex w-full flex-col items-center justify-center gap-4","px-6 py-16 text-center",y),b[0]=y,b[1]=c):c=b[1],b[2]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-muted",children:(0,t.jsx)(l.Boxes,{"aria-hidden":"true",className:"size-6 text-muted-foreground"})}),b[2]=d):d=b[2],b[3]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)("h2",{className:"text-lg font-medium text-foreground",children:"No workspace"}),b[3]=m):m=b[3],b[4]!==v?(u=(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[m,(0,t.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:v})]}),b[4]=v,b[5]=u):u=b[5],b[6]!==k||b[7]!==x?(p=()=>k.capture(n.PostHogEvent.ClickNoWorkspaceCta,{surface:x}),b[6]=k,b[7]=x,b[8]=p):p=b[8],b[9]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)(i.Link,{href:"/workspaces",children:"Go to workspaces"}),b[9]=f):f=b[9],b[10]!==p?(h=(0,t.jsx)(a.Button,{onClick:p,render:f}),b[10]=p,b[11]=h):h=b[11],b[12]!==c||b[13]!==u||b[14]!==h?(g=(0,t.jsxs)("div",{className:c,children:[d,u,h]}),b[12]=c,b[13]=u,b[14]=h,b[15]=g):g=b[15],g}])},829104,205059,e=>{"use strict";let t={Loading:"loading",Blocked:"blocked",Allowed:"allowed"};function r({isAuthLoaded:e,isSignedIn:n,workspaces:o,didFetchFail:a}){return e?!0!==n?t.Allowed:void 0!==o?0===o.length?t.Blocked:t.Allowed:a?t.Allowed:t.Loading:t.Loading}e.s(["NoWorkspaceGateState",0,t,"resolveNoWorkspaceGate",0,r],829104);var n=e.i(505962),o=e.i(850658),a=e.i(48318);e.s(["useNoWorkspaceGate",0,function(){let e,t,s=(0,n.c)(7),{isLoaded:l,isSignedIn:i}=(0,o.useAuth)(),c=!0===i;s[0]!==c?(e={isEnabled:c},s[0]=c,s[1]=e):e=s[1];let{workspaces:d,didFetchFail:m}=(0,a.useUserWorkspaces)(e);return s[2]!==m||s[3]!==l||s[4]!==i||s[5]!==d?(t=r({isAuthLoaded:l,isSignedIn:i,workspaces:d,didFetchFail:m}),s[2]=m,s[3]=l,s[4]=i,s[5]=d,s[6]=t):t=s[6],t}],205059)}]); //# sourceMappingURL=0pg_htao3u94c.js.map //# chunkId=01a09684-0260-7040-9d14-ddba8380a2a4