import{b9 as e}from"./index-C_tZnXTW.js";import{m as t,b as n}from"./cec18ad9a-DiLjrOUd.js";import{r as s,j as i}from"./vendor-react-AXa6hZO5.js";import{s as r}from"./vendor-motion-0BJMgYoH.js";function o(){const e=t("claudeai_session_state"),{account:s}=n();return e&&(s?.settings?.ccr_session_state_buckets??!0)}function a(){const{account:t}=n(),i=t?.settings?.ccr_session_state_buckets??!0,{mutate:r}=e();return[i,s.useCallback(e=>r({ccr_session_state_buckets:e}),[r])]}const l="cubic-bezier(0.22, 1, 0.36, 1)";function c(e,t,n){return r({visualDuration:e*n,bounce:t,keyframes:[0,1]}).toString()}function u({view:e,radius:t,slowdown:n=1,className:r,wrapperClassName:o,surface:a,children:u}){const d=s.useRef(null),p=s.useRef(null),[m,f]=s.useState(null);s.useLayoutEffect(()=>{const e=d.current;if(!e)return;const t=new ResizeObserver(([e])=>{const t=e.borderBoxSize[0];f({w:t.inlineSize,h:t.blockSize})});return t.observe(e,{box:"border-box"}),()=>t.disconnect()},[]);const[g,h]=s.useState(0),[b,w]=s.useState(0),[y,x]=s.useState(null),k=s.useRef({view:e,children:u}),v=s.useRef(e);v.current!==e&&(v.current=e,h(e=>e+1),x({key:k.current.view,node:k.current.children}));const _=b===g;s.useEffect(()=>{if(_)return;const e=g,t=setTimeout(()=>w(e),260*n);return()=>clearTimeout(t)},[_,g,n]),s.useEffect(()=>{if(!y)return;const e=setTimeout(()=>x(null),130*n);return()=>clearTimeout(e)},[y,n]),s.useEffect(()=>{k.current={view:e,children:u}});const $=260*n,j=s.useMemo(()=>[`width ${c(.28,.15,n)}`,`border-radius ${260*n}ms ${l}`].join(", "),[n]),S=s.useRef(-1);s.useLayoutEffect(()=>{const e=p.current,t=d.current;if(!e||!t)return;const n=t.getBoundingClientRect().height;if(_)e.style.transition=j,e.style.height=`${n}px`;else if(S.current!==g){const t=e.getBoundingClientRect().height;e.style.transition=j,e.style.height=`${t}px`,e.offsetHeight,e.style.transition=`${j}, height ${$}ms ${l}`,e.style.height=`${n}px`,S.current=g}});const q=`border-radius ${$}ms ${l}`,R=t??(m?Math.round(m.h/2):9999),E=0===g,z=130*n,P=90*n;return i.jsxs("div",{className:o,style:{position:"relative",width:"fit-content",maxWidth:"100%",borderRadius:R,transition:q},children:[i.jsx("div",{ref:d,className:r,"aria-hidden":!0,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",width:"max-content",maxWidth:"none"},children:u}),a&&i.jsx("div",{"aria-hidden":!0,style:{position:"absolute",inset:0,borderRadius:R,transition:q,pointerEvents:"none"},children:a}),i.jsxs("div",{ref:p,className:r,style:{position:"relative",overflow:"hidden",width:m?.w??"max-content",borderRadius:R,"--morph-radius":`${R}px`},children:[y&&y.key!==e&&i.jsx("div",{inert:!0,"aria-hidden":!0,style:{position:"absolute",left:0,bottom:0,width:"max-content",pointerEvents:"none",animation:`morph-out ${z}ms ease-out forwards`},children:y.node},`exit-${y.key}`),i.jsx("div",{style:E?{width:"max-content"}:{position:"absolute",left:0,bottom:0,width:"max-content",animation:`morph-in ${z}ms ease-out ${P}ms backwards`},children:u},e),i.jsx("style",{children:"\n          @keyframes morph-in {\n            from { opacity: 0; transform: scale(0.94); filter: blur(4px); }\n            to   { opacity: 1; transform: scale(1);    filter: blur(0); }\n          }\n          @keyframes morph-out {\n            from { opacity: 1; transform: scale(1);    filter: blur(0); }\n            to   { opacity: 0; transform: scale(0.94); filter: blur(4px); }\n          }\n        "})]})]})}
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/var d={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}};const p=Object.freeze(Object.defineProperty({__proto__:null,conf:d,language:{defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\@?[a-zA-Z_]\w*/,{cases:{"@namespaceFollows":{token:"keyword.$0",next:"@namespace"},"@keywords":{token:"keyword.$0",next:"@qualified"},"@default":{token:"identifier",next:"@qualified"}}}],{include:"@whitespace"},[/}/,{cases:{"$S2==interpolatedstring":{token:"string.quote",next:"@pop"},"$S2==litinterpstring":{token:"string.quote",next:"@pop"},"@default":"@brackets"}}],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}},Symbol.toStringTag,{value:"Module"}));
/**
 * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
 * @license MIT
 *
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * @license MIT
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 */const m=Object.freeze(Object.defineProperty({__proto__:null,FitAddon:class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(0===e.css.cell.width||0===e.css.cell.height)return;let t=0===this._terminal.options.scrollback?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(n.getPropertyValue("height")),i=Math.max(0,parseInt(n.getPropertyValue("width"))),r=window.getComputedStyle(this._terminal.element),o=s-(parseInt(r.getPropertyValue("padding-top"))+parseInt(r.getPropertyValue("padding-bottom"))),a=i-(parseInt(r.getPropertyValue("padding-right"))+parseInt(r.getPropertyValue("padding-left")))-t;return{cols:Math.max(2,Math.floor(a/e.css.cell.width)),rows:Math.max(1,Math.floor(o/e.css.cell.height))}}}},Symbol.toStringTag,{value:"Module"}));export{u as M,o as a,m as b,p as c,a as u};
