@tui-sandbox/library 7.5.4 → 7.5.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [7.5.6](https://github.com/mikavilpas/tui-sandbox/compare/library-v7.5.5...library-v7.5.6) (2025-01-09)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * waiting forever for :messages to finish when neovim is stuck ([#218](https://github.com/mikavilpas/tui-sandbox/issues/218)) ([e8ef89b](https://github.com/mikavilpas/tui-sandbox/commit/e8ef89baddf36f468900ed7211bf7339e4f9042a))
9
+
10
+ ## [7.5.5](https://github.com/mikavilpas/tui-sandbox/compare/library-v7.5.4...library-v7.5.5) (2025-01-01)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * crash when using startupScriptModifications with `'` in the name ([bde5d06](https://github.com/mikavilpas/tui-sandbox/commit/bde5d06f37bc77c7276ac0db407640baeac87984))
16
+ * directory schema generation failing with unescaped chars ([bb9b89b](https://github.com/mikavilpas/tui-sandbox/commit/bb9b89b9f047cc4cd5f8a39018045d639a4dc3d2))
17
+
3
18
  ## [7.5.4](https://github.com/mikavilpas/tui-sandbox/compare/library-v7.5.3...library-v7.5.4) (2024-12-25)
4
19
 
5
20
 
@@ -1,4 +1,4 @@
1
- var Ar=Object.defineProperty;var Br=(c,e,a)=>e in c?Ar(c,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):c[e]=a;var Ke=(c,e,a)=>Br(c,typeof e!="symbol"?e+"":e,a);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))u(m);new MutationObserver(m=>{for(const y of m)if(y.type==="childList")for(const k of y.addedNodes)k.tagName==="LINK"&&k.rel==="modulepreload"&&u(k)}).observe(document,{childList:!0,subtree:!0});function a(m){const y={};return m.integrity&&(y.integrity=m.integrity),m.referrerPolicy&&(y.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?y.credentials="include":m.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function u(m){if(m.ep)return;m.ep=!0;const y=a(m);fetch(m.href,y)}})();function $e(c){const e={subscribe(a){let u=null,m=!1,y=!1,k=!1;function t(){if(u===null){k=!0;return}y||(y=!0,typeof u=="function"?u():u&&u.unsubscribe())}return u=c({next(o){var l;m||(l=a.next)==null||l.call(a,o)},error(o){var l;m||(m=!0,(l=a.error)==null||l.call(a,o),t())},complete(){var o;m||(m=!0,(o=a.complete)==null||o.call(a),t())}}),k&&t(),{unsubscribe:t}},pipe(...a){return a.reduce(Or,e)}};return e}function Or(c,e){return e(c)}function Mr(c){const e=new AbortController;return new Promise((u,m)=>{let y=!1;function k(){y||(y=!0,t.unsubscribe())}e.signal.addEventListener("abort",()=>{m(e.signal.reason)});const t=c.subscribe({next(o){y=!0,u(o),k()},error(o){m(o)},complete(){e.abort(),k()}})})}function Ir(c){return e=>{let a=0,u=null;const m=[];function y(){u||(u=e.subscribe({next(t){var o;for(const l of m)(o=l.next)==null||o.call(l,t)},error(t){var o;for(const l of m)(o=l.error)==null||o.call(l,t)},complete(){var t;for(const o of m)(t=o.complete)==null||t.call(o)}}))}function k(){if(a===0&&u){const t=u;u=null,t.unsubscribe()}}return $e(t=>(a++,m.push(t),y(),{unsubscribe(){a--,k();const o=m.findIndex(l=>l===t);o>-1&&m.splice(o,1)}}))}}function Pr(c){let e=c;const a=[],u=k=>{e!==void 0&&k.next(e),a.push(k)},m=k=>{a.splice(a.indexOf(k),1)},y=$e(k=>(u(k),()=>{m(k)}));return y.next=k=>{if(e!==k){e=k;for(const t of a)t.next(k)}},y.get=()=>e,y}function cr(c){return $e(e=>{function a(m=0,y=c.op){const k=c.links[m];if(!k)throw new Error("No more links to execute - did you forget to add an ending link?");return k({op:y,next(o){return a(m+1,o)}})}return a().subscribe(e)})}const hr=()=>{},qt=c=>{Object.freeze&&Object.freeze(c)};function lr(c,e,a){var u,m;const y=e.join(".");return(u=a)[m=y]??(u[m]=new Proxy(hr,{get(k,t){if(!(typeof t!="string"||t==="then"))return lr(c,[...e,t],a)},apply(k,t,o){const l=e[e.length-1];let _={args:o,path:e};return l==="call"?_={args:o.length>=2?[o[1]]:[],path:e.slice(0,-1)}:l==="apply"&&(_={args:o.length>=2?o[1]:[],path:e.slice(0,-1)}),qt(_.args),qt(_.path),c(_)}})),a[y]}const Hr=c=>lr(c,[],Object.create(null)),Fr=c=>new Proxy(hr,{get(e,a){if(!(typeof a!="string"||a==="then"))return c(a)}}),_t={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};function Je(c){return!!c&&!Array.isArray(c)&&typeof c=="object"}const dr=c=>c();function pt(c,e,a){return e in c?Object.defineProperty(c,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):c[e]=a,c}var ur;const At=new WeakMap,Nr=()=>{};ur=Symbol.toStringTag;let Wr=ur;class Ee{subscribe(){let e,a;const{settlement:u}=this;if(u===null){if(this.subscribers===null)throw new Error("Unpromise settled but still has subscribers");const m=Ur();this.subscribers=$r(this.subscribers,m),e=m.promise,a=()=>{this.subscribers!==null&&(this.subscribers=qr(this.subscribers,m))}}else{const{status:m}=u;m==="fulfilled"?e=Promise.resolve(u.value):e=Promise.reject(u.reason),a=Nr}return Object.assign(e,{unsubscribe:a})}then(e,a){const u=this.subscribe(),{unsubscribe:m}=u;return Object.assign(u.then(e,a),{unsubscribe:m})}catch(e){const a=this.subscribe(),{unsubscribe:u}=a;return Object.assign(a.catch(e),{unsubscribe:u})}finally(e){const a=this.subscribe(),{unsubscribe:u}=a;return Object.assign(a.finally(e),{unsubscribe:u})}static proxy(e){const a=Ee.getSubscribablePromise(e);return typeof a<"u"?a:Ee.createSubscribablePromise(e)}static createSubscribablePromise(e){const a=new Ee(e);return At.set(e,a),At.set(a,a),a}static getSubscribablePromise(e){return At.get(e)}static resolve(e){const a=typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"?e:Promise.resolve(e);return Ee.proxy(a).subscribe()}static async any(e){const u=(Array.isArray(e)?e:[...e]).map(Ee.resolve);try{return await Promise.any(u)}finally{u.forEach(({unsubscribe:m})=>{m()})}}static async race(e){const u=(Array.isArray(e)?e:[...e]).map(Ee.resolve);try{return await Promise.race(u)}finally{u.forEach(({unsubscribe:m})=>{m()})}}static async raceReferences(e){const a=e.map(jr);try{return await Promise.race(a)}finally{for(const u of a)u.unsubscribe()}}constructor(e){pt(this,"promise",void 0),pt(this,"subscribers",[]),pt(this,"settlement",null),pt(this,Wr,"Unpromise"),typeof e=="function"?this.promise=new Promise(e):this.promise=e;const a=this.promise.then(u=>{const{subscribers:m}=this;this.subscribers=null,this.settlement={status:"fulfilled",value:u},m==null||m.forEach(({resolve:y})=>{y(u)})});"catch"in a&&a.catch(u=>{const{subscribers:m}=this;this.subscribers=null,this.settlement={status:"rejected",reason:u},m==null||m.forEach(({reject:y})=>{y(u)})})}}function jr(c){return Ee.proxy(c).then(()=>[c])}function Ur(){let c,e;return{promise:new Promise((u,m)=>{c=u,e=m}),resolve:c,reject:e}}function $r(c,e){return[...c,e]}function zr(c,e){return[...c.slice(0,e),...c.slice(e+1)]}function qr(c,e){const a=c.indexOf(e);return a!==-1?zr(c,a):c}var Vt,Zt;(Vt=Symbol).dispose??(Vt.dispose=Symbol());(Zt=Symbol).asyncDispose??(Zt.asyncDispose=Symbol());function Vr(c,e){const a=c;if(a[Symbol.dispose])throw new Error("Symbol.dispose already exists");return a[Symbol.dispose]=e,a}function Zr(c,e){const a=c;if(a[Symbol.asyncDispose])throw new Error("Symbol.asyncDispose already exists");return a[Symbol.asyncDispose]=e,a}const fr=Symbol();function Kr(c){let e=null;return Vr({start(){if(e)throw new Error("Timer already started");return new Promise(u=>{e=setTimeout(()=>u(fr),c)})}},()=>{e&&clearTimeout(e)})}function _r(c,e,a){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var u,m;if(a){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");u=e[Symbol.asyncDispose]}if(u===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");u=e[Symbol.dispose],a&&(m=u)}if(typeof u!="function")throw new TypeError("Object not disposable.");m&&(u=function(){try{m.call(this)}catch(y){return Promise.reject(y)}}),c.stack.push({value:e,dispose:u,async:a})}else a&&c.stack.push({async:!0});return e}function Ut(c){var e=typeof SuppressedError=="function"?SuppressedError:function(a,u,m){var y=new Error(m);return y.name="SuppressedError",y.error=a,y.suppressed=u,y};return(Ut=function(u){function m(o){u.error=u.hasError?new e(o,u.error,"An error was suppressed during disposal."):o,u.hasError=!0}var y,k=0;function t(){for(;y=u.stack.pop();)try{if(!y.async&&k===1)return k=0,u.stack.push(y),Promise.resolve().then(t);if(y.dispose){var o=y.dispose.call(y.value);if(y.async)return k|=2,Promise.resolve(o).then(t,function(l){return m(l),t()})}else k|=1}catch(l){m(l)}if(k===1)return u.hasError?Promise.reject(u.error):Promise.resolve();if(u.hasError)throw u.error}return t()})(c)}const Gr="ping",Yr="serialized-error",Jr="connected";async function Xr(c){const e={stack:[],error:void 0,hasError:!1};try{const a=_r(e,Kr(c.timeoutMs),!1),u=await Ee.race([c.promise,a.start()]);return u===fr?await c.onTimeout():u}catch(a){e.error=a,e.hasError=!0}finally{Ut(e)}}function Qr(c){const{deserialize:e=t=>t}=c;let a={};const u=c.signal;let m=null;const y=()=>new ReadableStream({async start(t){const[o,l]=await Promise.all([c.url(),c.init()]),_=m=new c.EventSource(o,l);t.enqueue({type:"connecting",eventSource:m,event:null}),_.addEventListener(Jr,p=>{const C=JSON.parse(p.data);a=C,t.enqueue({type:"connected",options:C,eventSource:_})}),_.addEventListener(Yr,p=>{const v=p;t.enqueue({type:"serialized-error",error:e(JSON.parse(v.data)),eventSource:_})}),_.addEventListener(Gr,()=>{t.enqueue({type:"ping",eventSource:_})}),_.addEventListener("error",p=>{_.readyState===EventSource.CLOSED?t.error(p):t.enqueue({type:"connecting",eventSource:_,event:p})}),_.addEventListener("message",p=>{const v=p,f={data:e(JSON.parse(v.data))};v.lastEventId&&(f.id=v.lastEventId),t.enqueue({type:"data",data:f,eventSource:_})});const h=()=>{t.close(),_.close()};u.aborted?h():u.addEventListener("abort",h)},cancel(){m==null||m.close()}}),k=()=>{let t=y(),o=t.getReader();async function l(){await o.cancel(),m=null}return Zr({read(){return o.read()},async recreate(){await l(),t=y(),o=t.getReader()}},l)};return dr(async function*(){const t={stack:[],error:void 0,hasError:!1};try{const o=_r(t,k(),!0);for(;;){let l=o.read();const _=a.reconnectAfterInactivityMs;_&&(l=Xr({promise:l,timeoutMs:_,onTimeout:async()=>{const p={value:{type:"timeout",ms:_,eventSource:m},done:!1};return await o.recreate(),p}}));const h=await l;if(h.done)return h.value;yield h.value}}catch(o){t.error=o,t.hasError=!0}finally{const o=Ut(t);o&&await o}})}function es(c,e){if("error"in c){const u=e.deserialize(c.error);return{ok:!1,error:{...c,error:u}}}return{ok:!0,result:{...c.result,...(!c.result.type||c.result.type==="data")&&{type:"data",data:e.deserialize(c.result.data)}}}}class Bt extends Error{constructor(){super("Unable to transform response from server")}}function ts(c,e){let a;try{a=es(c,e)}catch{throw new Bt}if(!a.ok&&(!Je(a.error.error)||typeof a.error.error.code!="number"))throw new Bt;if(a.ok&&!Je(a.result))throw new Bt;return a}var rr,sr,ir,nr,or,ar;typeof window>"u"||"Deno"in window||((sr=(rr=globalThis.process)==null?void 0:rr.env)==null?void 0:sr.NODE_ENV)==="test"||(nr=(ir=globalThis.process)==null?void 0:ir.env)!=null&&nr.JEST_WORKER_ID||(ar=(or=globalThis.process)==null?void 0:or.env)!=null&&ar.VITEST_WORKER_ID;function gt(c,e,a){return e in c?Object.defineProperty(c,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):c[e]=a,c}function rs(c){return c instanceof pe||c instanceof Error&&c.name==="TRPCClientError"}function ss(c){return Je(c)&&Je(c.error)&&typeof c.error.code=="number"&&typeof c.error.message=="string"}function is(c,e){return typeof c=="string"?c:Je(c)&&typeof c.message=="string"?c.message:e}class pe extends Error{static from(e,a={}){const u=e;return rs(u)?(a.meta&&(u.meta={...u.meta,...a.meta}),u):ss(u)?new pe(u.error.message,{...a,result:u}):new pe(is(u,"Unknown error"),{...a,cause:u})}constructor(e,a){var m,y;const u=a==null?void 0:a.cause;super(e,{cause:u}),gt(this,"cause",void 0),gt(this,"shape",void 0),gt(this,"data",void 0),gt(this,"meta",void 0),this.meta=a==null?void 0:a.meta,this.cause=u,this.shape=(m=a==null?void 0:a.result)==null?void 0:m.error,this.data=(y=a==null?void 0:a.result)==null?void 0:y.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,pe.prototype)}}function Ot(c,e,a){return e in c?Object.defineProperty(c,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):c[e]=a,c}class ns{$request(e){return cr({links:this.links,op:{...e,context:e.context??{},id:++this.requestId}}).pipe(Ir())}async requestAsPromise(e){try{const a=this.$request(e);return(await Mr(a)).result.data}catch(a){throw pe.from(a)}}query(e,a,u){return this.requestAsPromise({type:"query",path:e,input:a,context:u==null?void 0:u.context,signal:u==null?void 0:u.signal})}mutation(e,a,u){return this.requestAsPromise({type:"mutation",path:e,input:a,context:u==null?void 0:u.context,signal:u==null?void 0:u.signal})}subscription(e,a,u){return this.$request({type:"subscription",path:e,input:a,context:u.context,signal:u.signal}).subscribe({next(y){var k,t,o,l;switch(y.result.type){case"state":{(k=u.onConnectionStateChange)==null||k.call(u,y.result);break}case"started":{(t=u.onStarted)==null||t.call(u,{context:y.context});break}case"stopped":{(o=u.onStopped)==null||o.call(u);break}case"data":case void 0:{(l=u.onData)==null||l.call(u,y.result.data);break}}},error(y){var k;(k=u.onError)==null||k.call(u,y)},complete(){var y;(y=u.onComplete)==null||y.call(u)}})}constructor(e){Ot(this,"links",void 0),Ot(this,"runtime",void 0),Ot(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(a=>a(this.runtime))}}const os={query:"query",mutate:"mutation",subscribe:"subscription"},as=c=>os[c];function cs(c){const e=Hr(({path:a,args:u})=>{const m=[...a],y=as(m.pop()),k=m.join(".");return c[y](k,...u)});return Fr(a=>c.hasOwnProperty(a)?c[a]:a==="__untypedClient"?c:e[a])}function hs(c){const e=new ns(c);return cs(e)}const Kt=c=>typeof c=="function";function ls(c){if(c)return c;if(typeof window<"u"&&Kt(window.fetch))return window.fetch;if(typeof globalThis<"u"&&Kt(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}const Gt=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function Yt(c){let e=null,a=null;const u=()=>{clearTimeout(a),a=null,e=null};function m(t){var _,h;const o=[[]];let l=0;for(;;){const p=t[l];if(!p)break;const v=o[o.length-1];if(p.aborted){(_=p.reject)==null||_.call(p,new Error("Aborted")),l++;continue}if(c.validate(v.concat(p).map(f=>f.key))){v.push(p),l++;continue}if(v.length===0){(h=p.reject)==null||h.call(p,new Error("Input is too big for a single dispatch")),l++;continue}o.push([])}return o}function y(){const t=m(e);u();for(const o of t){if(!o.length)continue;const l={items:o};for(const h of o)h.batch=l;c.fetch(l.items.map(h=>h.key)).then(async h=>{var p;await Promise.all(h.map(async(v,C)=>{var i,n;const f=l.items[C];try{const r=await Promise.resolve(v);(i=f.resolve)==null||i.call(f,r)}catch(r){(n=f.reject)==null||n.call(f,r)}f.batch=null,f.reject=null,f.resolve=null}));for(const v of l.items)(p=v.reject)==null||p.call(v,new Error("Missing result")),v.batch=null}).catch(h=>{var p;for(const v of l.items)(p=v.reject)==null||p.call(v,h),v.batch=null})}}function k(t){const o={aborted:!1,key:t,batch:null,resolve:Gt,reject:Gt},l=new Promise((_,h)=>{o.reject=h,o.resolve=_,e||(e=[]),e.push(o)});return a||(a=setTimeout(y)),l}return{load:k}}function ds(...c){const e=new AbortController,a=c.length;let u=0;const m=()=>{++u===a&&e.abort()};for(const y of c)y!=null&&y.aborted?m():y==null||y.addEventListener("abort",m,{once:!0});return e.signal}function us(...c){const e=new AbortController;for(const a of c)a!=null&&a.aborted?e.abort():a==null||a.addEventListener("abort",()=>e.abort(),{once:!0});return e.signal}function pr(c){const e=c;return e?"input"in e?e:{input:e,output:e}:{input:{serialize:a=>a,deserialize:a=>a},output:{serialize:a=>a,deserialize:a=>a}}}function fs(c){return{url:c.url.toString(),fetch:c.fetch,transformer:pr(c.transformer),methodOverride:c.methodOverride}}function _s(c){const e={};for(let a=0;a<c.length;a++){const u=c[a];e[a]=u}return e}const ps={query:"GET",mutation:"POST",subscription:"PATCH"};function gr(c){return"input"in c?c.transformer.input.serialize(c.input):_s(c.inputs.map(e=>c.transformer.input.serialize(e)))}const $t=c=>{const e=c.url.split("?");let u=e[0].replace(/\/$/,"")+"/"+c.path;const m=[];if(e[1]&&m.push(e[1]),"inputs"in c&&m.push("batch=1"),c.type==="query"||c.type==="subscription"){const y=gr(c);y!==void 0&&c.methodOverride!=="POST"&&m.push(`input=${encodeURIComponent(JSON.stringify(y))}`)}return m.length&&(u+="?"+m.join("&")),u},gs=c=>{if(c.type==="query"&&c.methodOverride!=="POST")return;const e=gr(c);return e!==void 0?JSON.stringify(e):void 0},vs=c=>ys({...c,contentTypeHeader:"application/json",getUrl:$t,getBody:gs});class ms extends Error{constructor(){const e="AbortError";super(e),this.name=e,this.message=e}}const bs=c=>{var e;if(c!=null&&c.aborted)throw(e=c.throwIfAborted)==null||e.call(c),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new ms};async function Ss(c){bs(c.signal);const e=c.getUrl(c),a=c.getBody(c),{type:u}=c,m=await(async()=>{const k=await c.headers();return Symbol.iterator in k?Object.fromEntries(k):k})(),y={...c.contentTypeHeader?{"content-type":c.contentTypeHeader}:{},...c.trpcAcceptHeader?{"trpc-accept":c.trpcAcceptHeader}:void 0,...m};return ls(c.fetch)(e,{method:c.methodOverride??ps[u],signal:c.signal,body:a,headers:y})}async function ys(c){const e={},a=await Ss(c);e.response=a;const u=await a.json();return e.responseJSON=u,{json:u,meta:e}}function Cs(c){const e=fs(c),a=c.maxURLLength??1/0;return()=>{const u=t=>({validate(o){if(a===1/0)return!0;const l=o.map(p=>p.path).join(","),_=o.map(p=>p.input);return $t({...e,type:t,path:l,inputs:_,signal:null}).length<=a},async fetch(o){const l=o.map(f=>f.path).join(","),_=o.map(f=>f.input),h=ds(...o.map(f=>f.signal)),p=await vs({...e,path:l,inputs:_,type:t,headers(){return c.headers?typeof c.headers=="function"?c.headers({opList:o}):c.headers:{}},signal:h});return(Array.isArray(p.json)?p.json:o.map(()=>p.json)).map(f=>({meta:p.meta,json:f}))}}),m=Yt(u("query")),y=Yt(u("mutation")),k={query:m,mutation:y};return({op:t})=>$e(o=>{/* istanbul ignore if -- @preserve */if(t.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const _=k[t.type].load(t);let h;return _.then(p=>{h=p;const v=ts(p.json,e.transformer.output);if(!v.ok){o.error(pe.from(v.error,{meta:p.meta}));return}o.next({context:p.meta,result:v.result}),o.complete()}).catch(p=>{o.error(pe.from(p,{meta:h==null?void 0:h.meta}))}),()=>{}})}}function Jt(c){return Array.isArray(c)?c:[c]}function ws(c){return e=>{const a=Jt(c.true).map(m=>m(e)),u=Jt(c.false).map(m=>m(e));return m=>$e(y=>{const k=c.condition(m.op)?a:u;return cr({op:m.op,links:k}).subscribe(y)})}}const Ht=(c,...e)=>typeof c=="function"?c(...e):c;function Es(c,e){return!e||c!=null&&typeof c!="object"?c:{...c??{},lastEventId:e}}async function xs(c){let e=await Ht(c.url);if(c.connectionParams){const a=await Ht(c.connectionParams),u=e.includes("?")?"&":"?";e+=u+"connectionParams="+encodeURIComponent(JSON.stringify(a))}return e}const ks=[_t.BAD_GATEWAY,_t.SERVICE_UNAVAILABLE,_t.GATEWAY_TIMEOUT,_t.INTERNAL_SERVER_ERROR];function Rs(c){const e=pr(c.transformer);return()=>({op:a})=>$e(u=>{const{type:m,path:y,input:k}=a;/* istanbul ignore if -- @preserve */if(m!=="subscription")throw new Error("httpSubscriptionLink only supports subscriptions");let t;const o=new AbortController,l=us(a.signal,o.signal),_=Qr({url:async()=>$t({transformer:e,url:await xs(c),input:Es(k,t),path:y,type:m,signal:null}),init:()=>Ht(c.eventSourceOptions,{op:a}),signal:l,deserialize:e.output.deserialize,EventSource:c.EventSource??globalThis.EventSource}),h=Pr({type:"state",state:"connecting",error:null}),p=h.subscribe({next(v){u.next({result:v})}});return dr(async()=>{for await(const v of _)switch(v.type){case"ping":break;case"data":const C=v.data;let f;C.id?(t=C.id,f={id:C.id,data:C}):f={data:C.data},u.next({result:f,context:{eventSource:v.eventSource}});break;case"connected":{u.next({result:{type:"started"},context:{eventSource:v.eventSource}}),h.next({type:"state",state:"pending",error:null});break}case"serialized-error":{const i=pe.from({error:v.error});if(ks.includes(v.error.code)){h.next({type:"state",state:"connecting",error:i});break}throw i}case"connecting":{const i=h.get(),n=v.event&&pe.from(v.event);if(!n&&i.state==="connecting")break;h.next({type:"state",state:"connecting",error:n});break}case"timeout":h.next({type:"state",state:"connecting",error:new pe(`Timeout of ${v.ms}ms reached while waiting for a response`)})}u.next({result:{type:"stopped"}}),u.complete()}).catch(v=>{u.error(pe.from(v))}),()=>{u.complete(),o.abort(),p.unsubscribe()}})}const Ls={version:"1.7.1",latte:{name:"Latte",emoji:"🌻",order:0,dark:!1,colors:{rosewater:{name:"Rosewater",order:0,hex:"#dc8a78",rgb:{r:220,g:138,b:120},hsl:{h:10.799999999999995,s:.5882352941176472,l:.6666666666666667},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#dd7878",rgb:{r:221,g:120,b:120},hsl:{h:0,s:.5976331360946746,l:.6686274509803922},accent:!0},pink:{name:"Pink",order:2,hex:"#ea76cb",rgb:{r:234,g:118,b:203},hsl:{h:316.0344827586207,s:.7341772151898731,l:.6901960784313725},accent:!0},mauve:{name:"Mauve",order:3,hex:"#8839ef",rgb:{r:136,g:57,b:239},hsl:{h:266.0439560439561,s:.8504672897196262,l:.5803921568627451},accent:!0},red:{name:"Red",order:4,hex:"#d20f39",rgb:{r:210,g:15,b:57},hsl:{h:347.0769230769231,s:.8666666666666666,l:.4411764705882353},accent:!0},maroon:{name:"Maroon",order:5,hex:"#e64553",rgb:{r:230,g:69,b:83},hsl:{h:354.78260869565213,s:.76303317535545,l:.5862745098039216},accent:!0},peach:{name:"Peach",order:6,hex:"#fe640b",rgb:{r:254,g:100,b:11},hsl:{h:21.975308641975307,s:.9918367346938776,l:.5196078431372549},accent:!0},yellow:{name:"Yellow",order:7,hex:"#df8e1d",rgb:{r:223,g:142,b:29},hsl:{h:34.948453608247426,s:.7698412698412698,l:.49411764705882355},accent:!0},green:{name:"Green",order:8,hex:"#40a02b",rgb:{r:64,g:160,b:43},hsl:{h:109.23076923076923,s:.5763546798029556,l:.39803921568627454},accent:!0},teal:{name:"Teal",order:9,hex:"#179299",rgb:{r:23,g:146,b:153},hsl:{h:183.23076923076923,s:.7386363636363636,l:.34509803921568627},accent:!0},sky:{name:"Sky",order:10,hex:"#04a5e5",rgb:{r:4,g:165,b:229},hsl:{h:197.0666666666667,s:.965665236051502,l:.45686274509803926},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#209fb5",rgb:{r:32,g:159,b:181},hsl:{h:188.85906040268458,s:.6995305164319249,l:.4176470588235294},accent:!0},blue:{name:"Blue",order:12,hex:"#1e66f5",rgb:{r:30,g:102,b:245},hsl:{h:219.90697674418607,s:.9148936170212768,l:.5392156862745098},accent:!0},lavender:{name:"Lavender",order:13,hex:"#7287fd",rgb:{r:114,g:135,b:253},hsl:{h:230.93525179856115,s:.9720279720279721,l:.7196078431372549},accent:!0},text:{name:"Text",order:14,hex:"#4c4f69",rgb:{r:76,g:79,b:105},hsl:{h:233.79310344827587,s:.16022099447513813,l:.3549019607843137},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#5c5f77",rgb:{r:92,g:95,b:119},hsl:{h:233.33333333333334,s:.1279620853080569,l:.4137254901960784},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#6c6f85",rgb:{r:108,g:111,b:133},hsl:{h:232.79999999999998,s:.10373443983402494,l:.4725490196078431},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#7c7f93",rgb:{r:124,g:127,b:147},hsl:{h:232.17391304347825,s:.09623430962343092,l:.5313725490196078},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#8c8fa1",rgb:{r:140,g:143,b:161},hsl:{h:231.42857142857144,s:.10047846889952144,l:.5901960784313726},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#9ca0b0",rgb:{r:156,g:160,b:176},hsl:{h:228.00000000000003,s:.11235955056179768,l:.6509803921568628},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#acb0be",rgb:{r:172,g:176,b:190},hsl:{h:226.6666666666667,s:.12162162162162159,l:.7098039215686275},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#bcc0cc",rgb:{r:188,g:192,b:204},hsl:{h:225.00000000000003,s:.13559322033898308,l:.7686274509803922},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#ccd0da",rgb:{r:204,g:208,b:218},hsl:{h:222.85714285714292,s:.1590909090909089,l:.8274509803921568},accent:!1},base:{name:"Base",order:23,hex:"#eff1f5",rgb:{r:239,g:241,b:245},hsl:{h:220.00000000000009,s:.23076923076923136,l:.9490196078431372},accent:!1},mantle:{name:"Mantle",order:24,hex:"#e6e9ef",rgb:{r:230,g:233,b:239},hsl:{h:220.00000000000006,s:.21951219512195116,l:.919607843137255},accent:!1},crust:{name:"Crust",order:25,hex:"#dce0e8",rgb:{r:220,g:224,b:232},hsl:{h:220.00000000000006,s:.20689655172413762,l:.8862745098039215},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#5c5f77",rgb:{r:92,g:95,b:119},hsl:{h:233.33333333333334,s:.1279620853080569,l:.4137254901960784},code:0},bright:{name:"Bright Black",hex:"#6c6f85",rgb:{r:108,g:111,b:133},hsl:{h:232.79999999999998,s:.10373443983402494,l:.4725490196078431},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#d20f39",rgb:{r:210,g:15,b:57},hsl:{h:347.0769230769231,s:.8666666666666666,l:.4411764705882353},code:1},bright:{name:"Bright Red",hex:"#de293e",rgb:{r:222,g:41,b:62},hsl:{h:353.0386740331492,s:.7327935222672065,l:.515686274509804},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#40a02b",rgb:{r:64,g:160,b:43},hsl:{h:109.23076923076923,s:.5763546798029556,l:.39803921568627454},code:2},bright:{name:"Bright Green",hex:"#49af3d",rgb:{r:73,g:175,b:61},hsl:{h:113.68421052631581,s:.48305084745762705,l:.4627450980392157},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#df8e1d",rgb:{r:223,g:142,b:29},hsl:{h:34.948453608247426,s:.7698412698412698,l:.49411764705882355},code:3},bright:{name:"Bright Yellow",hex:"#eea02d",rgb:{r:238,g:160,b:45},hsl:{h:35.751295336787564,s:.8502202643171807,l:.5549019607843138},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#1e66f5",rgb:{r:30,g:102,b:245},hsl:{h:219.90697674418607,s:.9148936170212768,l:.5392156862745098},code:4},bright:{name:"Bright Blue",hex:"#456eff",rgb:{r:69,g:110,b:255},hsl:{h:226.77419354838707,s:1,l:.6352941176470588},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#ea76cb",rgb:{r:234,g:118,b:203},hsl:{h:316.0344827586207,s:.7341772151898731,l:.6901960784313725},code:5},bright:{name:"Bright Magenta",hex:"#fe85d8",rgb:{r:254,g:133,b:216},hsl:{h:318.8429752066116,s:.983739837398374,l:.7588235294117647},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#179299",rgb:{r:23,g:146,b:153},hsl:{h:183.23076923076923,s:.7386363636363636,l:.34509803921568627},code:6},bright:{name:"Bright Cyan",hex:"#2d9fa8",rgb:{r:45,g:159,b:168},hsl:{h:184.39024390243904,s:.5774647887323943,l:.4176470588235294},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#acb0be",rgb:{r:172,g:176,b:190},hsl:{h:226.6666666666667,s:.12162162162162159,l:.7098039215686275},code:7},bright:{name:"Bright White",hex:"#bcc0cc",rgb:{r:188,g:192,b:204},hsl:{h:225.00000000000003,s:.13559322033898308,l:.7686274509803922},code:15}}}},frappe:{name:"Frappé",emoji:"🪴",order:1,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f2d5cf",rgb:{r:242,g:213,b:207},hsl:{h:10.2857142857143,s:.5737704918032784,l:.8803921568627451},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#eebebe",rgb:{r:238,g:190,b:190},hsl:{h:0,s:.5853658536585367,l:.8392156862745098},accent:!0},pink:{name:"Pink",order:2,hex:"#f4b8e4",rgb:{r:244,g:184,b:228},hsl:{h:316,s:.7317073170731713,l:.8392156862745098},accent:!0},mauve:{name:"Mauve",order:3,hex:"#ca9ee6",rgb:{r:202,g:158,b:230},hsl:{h:276.66666666666663,s:.5901639344262294,l:.7607843137254902},accent:!0},red:{name:"Red",order:4,hex:"#e78284",rgb:{r:231,g:130,b:132},hsl:{h:358.8118811881188,s:.6778523489932885,l:.7078431372549019},accent:!0},maroon:{name:"Maroon",order:5,hex:"#ea999c",rgb:{r:234,g:153,b:156},hsl:{h:357.77777777777777,s:.6585365853658534,l:.7588235294117647},accent:!0},peach:{name:"Peach",order:6,hex:"#ef9f76",rgb:{r:239,g:159,b:118},hsl:{h:20.33057851239669,s:.7908496732026143,l:.7},accent:!0},yellow:{name:"Yellow",order:7,hex:"#e5c890",rgb:{r:229,g:200,b:144},hsl:{h:39.52941176470588,s:.6204379562043796,l:.7313725490196079},accent:!0},green:{name:"Green",order:8,hex:"#a6d189",rgb:{r:166,g:209,b:137},hsl:{h:95.83333333333331,s:.4390243902439024,l:.6784313725490196},accent:!0},teal:{name:"Teal",order:9,hex:"#81c8be",rgb:{r:129,g:200,b:190},hsl:{h:171.5492957746479,s:.3922651933701657,l:.6450980392156862},accent:!0},sky:{name:"Sky",order:10,hex:"#99d1db",rgb:{r:153,g:209,b:219},hsl:{h:189.09090909090907,s:.47826086956521735,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#85c1dc",rgb:{r:133,g:193,b:220},hsl:{h:198.62068965517244,s:.5541401273885351,l:.692156862745098},accent:!0},blue:{name:"Blue",order:12,hex:"#8caaee",rgb:{r:140,g:170,b:238},hsl:{h:221.6326530612245,s:.7424242424242424,l:.7411764705882353},accent:!0},lavender:{name:"Lavender",order:13,hex:"#babbf1",rgb:{r:186,g:187,b:241},hsl:{h:238.90909090909093,s:.6626506024096385,l:.8372549019607842},accent:!0},text:{name:"Text",order:14,hex:"#c6d0f5",rgb:{r:198,g:208,b:245},hsl:{h:227.2340425531915,s:.7014925373134333,l:.8686274509803922},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#b5bfe2",rgb:{r:181,g:191,b:226},hsl:{h:226.66666666666669,s:.43689320388349495,l:.7980392156862746},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a5adce",rgb:{r:165,g:173,b:206},hsl:{h:228.29268292682926,s:.2949640287769784,l:.7274509803921569},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#949cbb",rgb:{r:148,g:156,b:187},hsl:{h:227.69230769230768,s:.22285714285714275,l:.6568627450980392},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#838ba7",rgb:{r:131,g:139,b:167},hsl:{h:226.66666666666669,s:.16981132075471703,l:.584313725490196},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#737994",rgb:{r:115,g:121,b:148},hsl:{h:229.0909090909091,s:.13360323886639683,l:.515686274509804},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#626880",rgb:{r:98,g:104,b:128},hsl:{h:228.00000000000003,s:.1327433628318584,l:.44313725490196076},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#51576d",rgb:{r:81,g:87,b:109},hsl:{h:227.14285714285714,s:.14736842105263157,l:.37254901960784315},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#414559",rgb:{r:65,g:69,b:89},hsl:{h:230.00000000000003,s:.15584415584415584,l:.30196078431372547},accent:!1},base:{name:"Base",order:23,hex:"#303446",rgb:{r:48,g:52,b:70},hsl:{h:229.0909090909091,s:.18644067796610175,l:.23137254901960785},accent:!1},mantle:{name:"Mantle",order:24,hex:"#292c3c",rgb:{r:41,g:44,b:60},hsl:{h:230.52631578947367,s:.18811881188118806,l:.19803921568627453},accent:!1},crust:{name:"Crust",order:25,hex:"#232634",rgb:{r:35,g:38,b:52},hsl:{h:229.41176470588238,s:.19540229885057467,l:.17058823529411765},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#51576d",rgb:{r:81,g:87,b:109},hsl:{h:227.14285714285714,s:.14736842105263157,l:.37254901960784315},code:0},bright:{name:"Bright Black",hex:"#626880",rgb:{r:98,g:104,b:128},hsl:{h:228.00000000000003,s:.1327433628318584,l:.44313725490196076},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#e78284",rgb:{r:231,g:130,b:132},hsl:{h:358.8118811881188,s:.6778523489932885,l:.7078431372549019},code:1},bright:{name:"Bright Red",hex:"#e67172",rgb:{r:230,g:113,b:114},hsl:{h:359.4871794871795,s:.7005988023952096,l:.6725490196078432},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6d189",rgb:{r:166,g:209,b:137},hsl:{h:95.83333333333331,s:.4390243902439024,l:.6784313725490196},code:2},bright:{name:"Bright Green",hex:"#8ec772",rgb:{r:142,g:199,b:114},hsl:{h:100.23529411764706,s:.431472081218274,l:.6137254901960785},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#e5c890",rgb:{r:229,g:200,b:144},hsl:{h:39.52941176470588,s:.6204379562043796,l:.7313725490196079},code:3},bright:{name:"Bright Yellow",hex:"#d9ba73",rgb:{r:217,g:186,b:115},hsl:{h:41.764705882352935,s:.5730337078651685,l:.6509803921568628},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#8caaee",rgb:{r:140,g:170,b:238},hsl:{h:221.6326530612245,s:.7424242424242424,l:.7411764705882353},code:4},bright:{name:"Bright Blue",hex:"#7b9ef0",rgb:{r:123,g:158,b:240},hsl:{h:222.05128205128207,s:.7959183673469388,l:.711764705882353},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f4b8e4",rgb:{r:244,g:184,b:228},hsl:{h:316,s:.7317073170731713,l:.8392156862745098},code:5},bright:{name:"Bright Magenta",hex:"#f2a4db",rgb:{r:242,g:164,b:219},hsl:{h:317.6923076923077,s:.7499999999999998,l:.7960784313725491},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#81c8be",rgb:{r:129,g:200,b:190},hsl:{h:171.5492957746479,s:.3922651933701657,l:.6450980392156862},code:6},bright:{name:"Bright Cyan",hex:"#5abfb5",rgb:{r:90,g:191,b:181},hsl:{h:174.05940594059405,s:.44104803493449785,l:.5509803921568628},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a5adce",rgb:{r:165,g:173,b:206},hsl:{h:228.29268292682926,s:.2949640287769784,l:.7274509803921569},code:7},bright:{name:"Bright White",hex:"#b5bfe2",rgb:{r:181,g:191,b:226},hsl:{h:226.66666666666669,s:.43689320388349495,l:.7980392156862746},code:15}}}},macchiato:{name:"Macchiato",emoji:"🌺",order:2,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f4dbd6",rgb:{r:244,g:219,b:214},hsl:{h:9.999999999999963,s:.5769230769230775,l:.8980392156862745},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#f0c6c6",rgb:{r:240,g:198,b:198},hsl:{h:0,s:.5833333333333333,l:.8588235294117648},accent:!0},pink:{name:"Pink",order:2,hex:"#f5bde6",rgb:{r:245,g:189,b:230},hsl:{h:316.0714285714286,s:.7368421052631583,l:.8509803921568628},accent:!0},mauve:{name:"Mauve",order:3,hex:"#c6a0f6",rgb:{r:198,g:160,b:246},hsl:{h:266.51162790697674,s:.8269230769230772,l:.7960784313725491},accent:!0},red:{name:"Red",order:4,hex:"#ed8796",rgb:{r:237,g:135,b:150},hsl:{h:351.1764705882353,s:.7391304347826088,l:.7294117647058824},accent:!0},maroon:{name:"Maroon",order:5,hex:"#ee99a0",rgb:{r:238,g:153,b:160},hsl:{h:355.05882352941177,s:.7142857142857143,l:.7666666666666666},accent:!0},peach:{name:"Peach",order:6,hex:"#f5a97f",rgb:{r:245,g:169,b:127},hsl:{h:21.355932203389827,s:.8550724637681162,l:.7294117647058824},accent:!0},yellow:{name:"Yellow",order:7,hex:"#eed49f",rgb:{r:238,g:212,b:159},hsl:{h:40.253164556962034,s:.6991150442477877,l:.7784313725490196},accent:!0},green:{name:"Green",order:8,hex:"#a6da95",rgb:{r:166,g:218,b:149},hsl:{h:105.21739130434783,s:.4825174825174825,l:.7196078431372549},accent:!0},teal:{name:"Teal",order:9,hex:"#8bd5ca",rgb:{r:139,g:213,b:202},hsl:{h:171.08108108108107,s:.46835443037974706,l:.6901960784313725},accent:!0},sky:{name:"Sky",order:10,hex:"#91d7e3",rgb:{r:145,g:215,b:227},hsl:{h:188.78048780487802,s:.5942028985507245,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#7dc4e4",rgb:{r:125,g:196,b:228},hsl:{h:198.64077669902912,s:.6560509554140128,l:.692156862745098},accent:!0},blue:{name:"Blue",order:12,hex:"#8aadf4",rgb:{r:138,g:173,b:244},hsl:{h:220.188679245283,s:.8281250000000003,l:.7490196078431373},accent:!0},lavender:{name:"Lavender",order:13,hex:"#b7bdf8",rgb:{r:183,g:189,b:248},hsl:{h:234.46153846153848,s:.8227848101265824,l:.8450980392156863},accent:!0},text:{name:"Text",order:14,hex:"#cad3f5",rgb:{r:202,g:211,b:245},hsl:{h:227.4418604651163,s:.6825396825396831,l:.8764705882352941},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#b8c0e0",rgb:{r:184,g:192,b:224},hsl:{h:228,s:.39215686274509803,l:.8},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a5adcb",rgb:{r:165,g:173,b:203},hsl:{h:227.36842105263156,s:.2676056338028167,l:.7215686274509804},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#939ab7",rgb:{r:147,g:154,b:183},hsl:{h:228.33333333333331,s:.2000000000000001,l:.6470588235294117},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#8087a2",rgb:{r:128,g:135,b:162},hsl:{h:227.6470588235294,s:.1545454545454545,l:.5686274509803921},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#6e738d",rgb:{r:110,g:115,b:141},hsl:{h:230.32258064516128,s:.12350597609561753,l:.49215686274509807},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#5b6078",rgb:{r:91,g:96,b:120},hsl:{h:229.65517241379308,s:.13744075829383887,l:.4137254901960784},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#494d64",rgb:{r:73,g:77,b:100},hsl:{h:231.11111111111114,s:.15606936416184972,l:.3392156862745098},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#363a4f",rgb:{r:54,g:58,b:79},hsl:{h:230.4,s:.1879699248120301,l:.2607843137254902},accent:!1},base:{name:"Base",order:23,hex:"#24273a",rgb:{r:36,g:39,b:58},hsl:{h:231.8181818181818,s:.23404255319148934,l:.1843137254901961},accent:!1},mantle:{name:"Mantle",order:24,hex:"#1e2030",rgb:{r:30,g:32,b:48},hsl:{h:233.33333333333334,s:.23076923076923075,l:.15294117647058825},accent:!1},crust:{name:"Crust",order:25,hex:"#181926",rgb:{r:24,g:25,b:38},hsl:{h:235.71428571428572,s:.22580645161290322,l:.12156862745098039},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#494d64",rgb:{r:73,g:77,b:100},hsl:{h:231.11111111111114,s:.15606936416184972,l:.3392156862745098},code:0},bright:{name:"Bright Black",hex:"#5b6078",rgb:{r:91,g:96,b:120},hsl:{h:229.65517241379308,s:.13744075829383887,l:.4137254901960784},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#ed8796",rgb:{r:237,g:135,b:150},hsl:{h:351.1764705882353,s:.7391304347826088,l:.7294117647058824},code:1},bright:{name:"Bright Red",hex:"#ec7486",rgb:{r:236,g:116,b:134},hsl:{h:351,s:.759493670886076,l:.6901960784313725},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6da95",rgb:{r:166,g:218,b:149},hsl:{h:105.21739130434783,s:.4825174825174825,l:.7196078431372549},code:2},bright:{name:"Bright Green",hex:"#8ccf7f",rgb:{r:140,g:207,b:127},hsl:{h:110.24999999999999,s:.45454545454545453,l:.6549019607843137},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#eed49f",rgb:{r:238,g:212,b:159},hsl:{h:40.253164556962034,s:.6991150442477877,l:.7784313725490196},code:3},bright:{name:"Bright Yellow",hex:"#e1c682",rgb:{r:225,g:198,b:130},hsl:{h:42.94736842105264,s:.6129032258064515,l:.696078431372549},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#8aadf4",rgb:{r:138,g:173,b:244},hsl:{h:220.188679245283,s:.8281250000000003,l:.7490196078431373},code:4},bright:{name:"Bright Blue",hex:"#78a1f6",rgb:{r:120,g:161,b:246},hsl:{h:220.47619047619048,s:.8750000000000002,l:.7176470588235294},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f5bde6",rgb:{r:245,g:189,b:230},hsl:{h:316.0714285714286,s:.7368421052631583,l:.8509803921568628},code:5},bright:{name:"Bright Magenta",hex:"#f2a9dd",rgb:{r:242,g:169,b:221},hsl:{h:317.26027397260276,s:.7373737373737372,l:.8058823529411765},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#8bd5ca",rgb:{r:139,g:213,b:202},hsl:{h:171.08108108108107,s:.46835443037974706,l:.6901960784313725},code:6},bright:{name:"Bright Cyan",hex:"#63cbc0",rgb:{r:99,g:203,b:192},hsl:{h:173.65384615384616,s:.4999999999999998,l:.592156862745098},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a5adcb",rgb:{r:165,g:173,b:203},hsl:{h:227.36842105263156,s:.2676056338028167,l:.7215686274509804},code:7},bright:{name:"Bright White",hex:"#b8c0e0",rgb:{r:184,g:192,b:224},hsl:{h:228,s:.39215686274509803,l:.8},code:15}}}},mocha:{name:"Mocha",emoji:"🌿",order:3,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f5e0dc",rgb:{r:245,g:224,b:220},hsl:{h:9.599999999999968,s:.555555555555556,l:.911764705882353},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#f2cdcd",rgb:{r:242,g:205,b:205},hsl:{h:0,s:.587301587301587,l:.8764705882352941},accent:!0},pink:{name:"Pink",order:2,hex:"#f5c2e7",rgb:{r:245,g:194,b:231},hsl:{h:316.4705882352941,s:.7183098591549301,l:.8607843137254902},accent:!0},mauve:{name:"Mauve",order:3,hex:"#cba6f7",rgb:{r:203,g:166,b:247},hsl:{h:267.4074074074074,s:.8350515463917528,l:.8098039215686275},accent:!0},red:{name:"Red",order:4,hex:"#f38ba8",rgb:{r:243,g:139,b:168},hsl:{h:343.2692307692308,s:.8124999999999998,l:.7490196078431373},accent:!0},maroon:{name:"Maroon",order:5,hex:"#eba0ac",rgb:{r:235,g:160,b:172},hsl:{h:350.4,s:.6521739130434779,l:.7745098039215685},accent:!0},peach:{name:"Peach",order:6,hex:"#fab387",rgb:{r:250,g:179,b:135},hsl:{h:22.95652173913043,s:.92,l:.7549019607843137},accent:!0},yellow:{name:"Yellow",order:7,hex:"#f9e2af",rgb:{r:249,g:226,b:175},hsl:{h:41.35135135135135,s:.8604651162790699,l:.8313725490196078},accent:!0},green:{name:"Green",order:8,hex:"#a6e3a1",rgb:{r:166,g:227,b:161},hsl:{h:115.45454545454544,s:.5409836065573769,l:.7607843137254902},accent:!0},teal:{name:"Teal",order:9,hex:"#94e2d5",rgb:{r:148,g:226,b:213},hsl:{h:170.00000000000003,s:.5735294117647057,l:.7333333333333334},accent:!0},sky:{name:"Sky",order:10,hex:"#89dceb",rgb:{r:137,g:220,b:235},hsl:{h:189.18367346938774,s:.7101449275362316,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#74c7ec",rgb:{r:116,g:199,b:236},hsl:{h:198.5,s:.759493670886076,l:.6901960784313725},accent:!0},blue:{name:"Blue",order:12,hex:"#89b4fa",rgb:{r:137,g:180,b:250},hsl:{h:217.1681415929203,s:.9186991869918699,l:.7588235294117647},accent:!0},lavender:{name:"Lavender",order:13,hex:"#b4befe",rgb:{r:180,g:190,b:254},hsl:{h:231.89189189189187,s:.9736842105263159,l:.8509803921568628},accent:!0},text:{name:"Text",order:14,hex:"#cdd6f4",rgb:{r:205,g:214,b:244},hsl:{h:226.15384615384616,s:.6393442622950825,l:.8803921568627451},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#bac2de",rgb:{r:186,g:194,b:222},hsl:{h:226.66666666666669,s:.35294117647058837,l:.8},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a6adc8",rgb:{r:166,g:173,b:200},hsl:{h:227.6470588235294,s:.23611111111111102,l:.7176470588235294},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#9399b2",rgb:{r:147,g:153,b:178},hsl:{h:228.38709677419354,s:.16756756756756758,l:.6372549019607843},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#7f849c",rgb:{r:127,g:132,b:156},hsl:{h:229.65517241379308,s:.12775330396475776,l:.5549019607843138},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#6c7086",rgb:{r:108,g:112,b:134},hsl:{h:230.7692307692308,s:.10743801652892565,l:.4745098039215686},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#585b70",rgb:{r:88,g:91,b:112},hsl:{h:232.5,s:.12,l:.39215686274509803},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#45475a",rgb:{r:69,g:71,b:90},hsl:{h:234.2857142857143,s:.13207547169811326,l:.31176470588235294},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#313244",rgb:{r:49,g:50,b:68},hsl:{h:236.84210526315792,s:.16239316239316234,l:.22941176470588237},accent:!1},base:{name:"Base",order:23,hex:"#1e1e2e",rgb:{r:30,g:30,b:46},hsl:{h:240,s:.21052631578947367,l:.14901960784313725},accent:!1},mantle:{name:"Mantle",order:24,hex:"#181825",rgb:{r:24,g:24,b:37},hsl:{h:240,s:.2131147540983607,l:.11960784313725491},accent:!1},crust:{name:"Crust",order:25,hex:"#11111b",rgb:{r:17,g:17,b:27},hsl:{h:240,s:.22727272727272727,l:.08627450980392157},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#45475a",rgb:{r:69,g:71,b:90},hsl:{h:234.2857142857143,s:.13207547169811326,l:.31176470588235294},code:0},bright:{name:"Bright Black",hex:"#585b70",rgb:{r:88,g:91,b:112},hsl:{h:232.5,s:.12,l:.39215686274509803},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#f38ba8",rgb:{r:243,g:139,b:168},hsl:{h:343.2692307692308,s:.8124999999999998,l:.7490196078431373},code:1},bright:{name:"Bright Red",hex:"#f37799",rgb:{r:243,g:119,b:153},hsl:{h:343.54838709677415,s:.8378378378378376,l:.7098039215686274},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6e3a1",rgb:{r:166,g:227,b:161},hsl:{h:115.45454545454544,s:.5409836065573769,l:.7607843137254902},code:2},bright:{name:"Bright Green",hex:"#89d88b",rgb:{r:137,g:216,b:139},hsl:{h:121.51898734177213,s:.5031847133757963,l:.692156862745098},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#f9e2af",rgb:{r:249,g:226,b:175},hsl:{h:41.35135135135135,s:.8604651162790699,l:.8313725490196078},code:3},bright:{name:"Bright Yellow",hex:"#ebd391",rgb:{r:235,g:211,b:145},hsl:{h:44,s:.692307692307692,l:.7450980392156863},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#89b4fa",rgb:{r:137,g:180,b:250},hsl:{h:217.1681415929203,s:.9186991869918699,l:.7588235294117647},code:4},bright:{name:"Bright Blue",hex:"#74a8fc",rgb:{r:116,g:168,b:252},hsl:{h:217.05882352941174,s:.9577464788732396,l:.7215686274509804},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f5c2e7",rgb:{r:245,g:194,b:231},hsl:{h:316.4705882352941,s:.7183098591549301,l:.8607843137254902},code:5},bright:{name:"Bright Magenta",hex:"#f2aede",rgb:{r:242,g:174,b:222},hsl:{h:317.6470588235294,s:.7234042553191488,l:.8156862745098039},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#94e2d5",rgb:{r:148,g:226,b:213},hsl:{h:170.00000000000003,s:.5735294117647057,l:.7333333333333334},code:6},bright:{name:"Bright Cyan",hex:"#6bd7ca",rgb:{r:107,g:215,b:202},hsl:{h:172.77777777777777,s:.5744680851063831,l:.6313725490196078},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a6adc8",rgb:{r:166,g:173,b:200},hsl:{h:227.6470588235294,s:.23611111111111102,l:.7176470588235294},code:7},bright:{name:"Bright White",hex:"#bac2de",rgb:{r:186,g:194,b:222},hsl:{h:226.66666666666669,s:.35294117647058837,l:.8},code:15}}}}},vt=c=>Object.entries(c),{version:Ki,...Ds}=Ls,vr=vt(Ds).reduce((c,[e,a])=>(c[e]={...a,colorEntries:vt(a.colors),ansiColorEntries:vt(a.ansiColors)},c),{});vt(vr);var Mt={exports:{}},Xt;function Ts(){return Xt||(Xt=1,function(c,e){(function(a,u){c.exports=u()})(self,()=>(()=>{var a={};return(()=>{var u=a;Object.defineProperty(u,"__esModule",{value:!0}),u.FitAddon=void 0,u.FitAddon=class{activate(m){this._terminal=m}dispose(){}fit(){const m=this.proposeDimensions();if(!m||!this._terminal||isNaN(m.cols)||isNaN(m.rows))return;const y=this._terminal._core;this._terminal.rows===m.rows&&this._terminal.cols===m.cols||(y._renderService.clear(),this._terminal.resize(m.cols,m.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const m=this._terminal._core,y=m._renderService.dimensions;if(y.css.cell.width===0||y.css.cell.height===0)return;const k=this._terminal.options.scrollback===0?0:m.viewport.scrollBarWidth,t=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(t.getPropertyValue("height")),l=Math.max(0,parseInt(t.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),h=o-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),p=l-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-k;return{cols:Math.max(2,Math.floor(p/y.css.cell.width)),rows:Math.max(1,Math.floor(h/y.css.cell.height))}}}})(),a})())}(Mt)),Mt.exports}var As=Ts(),It={exports:{}},Qt;function Bs(){return Qt||(Qt=1,function(c,e){(function(a,u){c.exports=u()})(globalThis,()=>(()=>{var a={4567:function(k,t,o){var l=this&&this.__decorate||function(r,s,d,S){var b,w=arguments.length,g=w<3?s:S===null?S=Object.getOwnPropertyDescriptor(s,d):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(r,s,d,S);else for(var E=r.length-1;E>=0;E--)(b=r[E])&&(g=(w<3?b(g):w>3?b(s,d,g):b(s,d))||g);return w>3&&g&&Object.defineProperty(s,d,g),g},_=this&&this.__param||function(r,s){return function(d,S){s(d,S,r)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityManager=void 0;const h=o(9042),p=o(9924),v=o(844),C=o(4725),f=o(2585),i=o(3656);let n=t.AccessibilityManager=class extends v.Disposable{constructor(r,s,d,S){super(),this._terminal=r,this._coreBrowserService=d,this._renderService=S,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let b=0;b<this._terminal.rows;b++)this._rowElements[b]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[b]);if(this._topBoundaryFocusListener=b=>this._handleBoundaryFocus(b,0),this._bottomBoundaryFocusListener=b=>this._handleBoundaryFocus(b,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(b=>this._handleResize(b.rows))),this.register(this._terminal.onRender(b=>this._refreshRows(b.start,b.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(b=>this._handleChar(b))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
1
+ var Ar=Object.defineProperty;var Br=(c,e,a)=>e in c?Ar(c,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):c[e]=a;var Ke=(c,e,a)=>Br(c,typeof e!="symbol"?e+"":e,a);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))u(m);new MutationObserver(m=>{for(const y of m)if(y.type==="childList")for(const k of y.addedNodes)k.tagName==="LINK"&&k.rel==="modulepreload"&&u(k)}).observe(document,{childList:!0,subtree:!0});function a(m){const y={};return m.integrity&&(y.integrity=m.integrity),m.referrerPolicy&&(y.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?y.credentials="include":m.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function u(m){if(m.ep)return;m.ep=!0;const y=a(m);fetch(m.href,y)}})();function $e(c){const e={subscribe(a){let u=null,m=!1,y=!1,k=!1;function t(){if(u===null){k=!0;return}y||(y=!0,typeof u=="function"?u():u&&u.unsubscribe())}return u=c({next(o){var l;m||(l=a.next)==null||l.call(a,o)},error(o){var l;m||(m=!0,(l=a.error)==null||l.call(a,o),t())},complete(){var o;m||(m=!0,(o=a.complete)==null||o.call(a),t())}}),k&&t(),{unsubscribe:t}},pipe(...a){return a.reduce(Or,e)}};return e}function Or(c,e){return e(c)}function Mr(c){const e=new AbortController;return new Promise((u,m)=>{let y=!1;function k(){y||(y=!0,t.unsubscribe())}e.signal.addEventListener("abort",()=>{m(e.signal.reason)});const t=c.subscribe({next(o){y=!0,u(o),k()},error(o){m(o)},complete(){e.abort(),k()}})})}function Ir(c){return e=>{let a=0,u=null;const m=[];function y(){u||(u=e.subscribe({next(t){var o;for(const l of m)(o=l.next)==null||o.call(l,t)},error(t){var o;for(const l of m)(o=l.error)==null||o.call(l,t)},complete(){var t;for(const o of m)(t=o.complete)==null||t.call(o)}}))}function k(){if(a===0&&u){const t=u;u=null,t.unsubscribe()}}return $e(t=>(a++,m.push(t),y(),{unsubscribe(){a--,k();const o=m.findIndex(l=>l===t);o>-1&&m.splice(o,1)}}))}}function Pr(c){let e=c;const a=[],u=k=>{e!==void 0&&k.next(e),a.push(k)},m=k=>{a.splice(a.indexOf(k),1)},y=$e(k=>(u(k),()=>{m(k)}));return y.next=k=>{if(e!==k){e=k;for(const t of a)t.next(k)}},y.get=()=>e,y}function cr(c){return $e(e=>{function a(m=0,y=c.op){const k=c.links[m];if(!k)throw new Error("No more links to execute - did you forget to add an ending link?");return k({op:y,next(o){return a(m+1,o)}})}return a().subscribe(e)})}const hr=()=>{},qt=c=>{Object.freeze&&Object.freeze(c)};function lr(c,e,a){var u,m;const y=e.join(".");return(u=a)[m=y]??(u[m]=new Proxy(hr,{get(k,t){if(!(typeof t!="string"||t==="then"))return lr(c,[...e,t],a)},apply(k,t,o){const l=e[e.length-1];let _={args:o,path:e};return l==="call"?_={args:o.length>=2?[o[1]]:[],path:e.slice(0,-1)}:l==="apply"&&(_={args:o.length>=2?o[1]:[],path:e.slice(0,-1)}),qt(_.args),qt(_.path),c(_)}})),a[y]}const Hr=c=>lr(c,[],Object.create(null)),Fr=c=>new Proxy(hr,{get(e,a){if(!(typeof a!="string"||a==="then"))return c(a)}}),_t={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};function Je(c){return!!c&&!Array.isArray(c)&&typeof c=="object"}const dr=c=>c();function pt(c,e,a){return e in c?Object.defineProperty(c,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):c[e]=a,c}var ur;const At=new WeakMap,Nr=()=>{};ur=Symbol.toStringTag;let Wr=ur;class Ee{subscribe(){let e,a;const{settlement:u}=this;if(u===null){if(this.subscribers===null)throw new Error("Unpromise settled but still has subscribers");const m=Ur();this.subscribers=$r(this.subscribers,m),e=m.promise,a=()=>{this.subscribers!==null&&(this.subscribers=qr(this.subscribers,m))}}else{const{status:m}=u;m==="fulfilled"?e=Promise.resolve(u.value):e=Promise.reject(u.reason),a=Nr}return Object.assign(e,{unsubscribe:a})}then(e,a){const u=this.subscribe(),{unsubscribe:m}=u;return Object.assign(u.then(e,a),{unsubscribe:m})}catch(e){const a=this.subscribe(),{unsubscribe:u}=a;return Object.assign(a.catch(e),{unsubscribe:u})}finally(e){const a=this.subscribe(),{unsubscribe:u}=a;return Object.assign(a.finally(e),{unsubscribe:u})}static proxy(e){const a=Ee.getSubscribablePromise(e);return typeof a<"u"?a:Ee.createSubscribablePromise(e)}static createSubscribablePromise(e){const a=new Ee(e);return At.set(e,a),At.set(a,a),a}static getSubscribablePromise(e){return At.get(e)}static resolve(e){const a=typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"?e:Promise.resolve(e);return Ee.proxy(a).subscribe()}static async any(e){const u=(Array.isArray(e)?e:[...e]).map(Ee.resolve);try{return await Promise.any(u)}finally{u.forEach(({unsubscribe:m})=>{m()})}}static async race(e){const u=(Array.isArray(e)?e:[...e]).map(Ee.resolve);try{return await Promise.race(u)}finally{u.forEach(({unsubscribe:m})=>{m()})}}static async raceReferences(e){const a=e.map(jr);try{return await Promise.race(a)}finally{for(const u of a)u.unsubscribe()}}constructor(e){pt(this,"promise",void 0),pt(this,"subscribers",[]),pt(this,"settlement",null),pt(this,Wr,"Unpromise"),typeof e=="function"?this.promise=new Promise(e):this.promise=e;const a=this.promise.then(u=>{const{subscribers:m}=this;this.subscribers=null,this.settlement={status:"fulfilled",value:u},m==null||m.forEach(({resolve:y})=>{y(u)})});"catch"in a&&a.catch(u=>{const{subscribers:m}=this;this.subscribers=null,this.settlement={status:"rejected",reason:u},m==null||m.forEach(({reject:y})=>{y(u)})})}}function jr(c){return Ee.proxy(c).then(()=>[c])}function Ur(){let c,e;return{promise:new Promise((u,m)=>{c=u,e=m}),resolve:c,reject:e}}function $r(c,e){return[...c,e]}function zr(c,e){return[...c.slice(0,e),...c.slice(e+1)]}function qr(c,e){const a=c.indexOf(e);return a!==-1?zr(c,a):c}var Vt,Zt;(Vt=Symbol).dispose??(Vt.dispose=Symbol());(Zt=Symbol).asyncDispose??(Zt.asyncDispose=Symbol());function Vr(c,e){const a=c;if(a[Symbol.dispose])throw new Error("Symbol.dispose already exists");return a[Symbol.dispose]=e,a}function Zr(c,e){const a=c;if(a[Symbol.asyncDispose])throw new Error("Symbol.asyncDispose already exists");return a[Symbol.asyncDispose]=e,a}const fr=Symbol();function Kr(c){let e=null;return Vr({start(){if(e)throw new Error("Timer already started");return new Promise(u=>{e=setTimeout(()=>u(fr),c)})}},()=>{e&&clearTimeout(e)})}function _r(c,e,a){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var u,m;if(a){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");u=e[Symbol.asyncDispose]}if(u===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");u=e[Symbol.dispose],a&&(m=u)}if(typeof u!="function")throw new TypeError("Object not disposable.");m&&(u=function(){try{m.call(this)}catch(y){return Promise.reject(y)}}),c.stack.push({value:e,dispose:u,async:a})}else a&&c.stack.push({async:!0});return e}function Ut(c){var e=typeof SuppressedError=="function"?SuppressedError:function(a,u,m){var y=new Error(m);return y.name="SuppressedError",y.error=a,y.suppressed=u,y};return(Ut=function(u){function m(o){u.error=u.hasError?new e(o,u.error,"An error was suppressed during disposal."):o,u.hasError=!0}var y,k=0;function t(){for(;y=u.stack.pop();)try{if(!y.async&&k===1)return k=0,u.stack.push(y),Promise.resolve().then(t);if(y.dispose){var o=y.dispose.call(y.value);if(y.async)return k|=2,Promise.resolve(o).then(t,function(l){return m(l),t()})}else k|=1}catch(l){m(l)}if(k===1)return u.hasError?Promise.reject(u.error):Promise.resolve();if(u.hasError)throw u.error}return t()})(c)}const Gr="ping",Yr="serialized-error",Jr="connected";async function Xr(c){const e={stack:[],error:void 0,hasError:!1};try{const a=_r(e,Kr(c.timeoutMs),!1),u=await Ee.race([c.promise,a.start()]);return u===fr?await c.onTimeout():u}catch(a){e.error=a,e.hasError=!0}finally{Ut(e)}}function Qr(c){const{deserialize:e=t=>t}=c;let a={};const u=c.signal;let m=null;const y=()=>new ReadableStream({async start(t){const[o,l]=await Promise.all([c.url(),c.init()]),_=m=new c.EventSource(o,l);t.enqueue({type:"connecting",eventSource:m,event:null}),_.addEventListener(Jr,p=>{const C=JSON.parse(p.data);a=C,t.enqueue({type:"connected",options:C,eventSource:_})}),_.addEventListener(Yr,p=>{const v=p;t.enqueue({type:"serialized-error",error:e(JSON.parse(v.data)),eventSource:_})}),_.addEventListener(Gr,()=>{t.enqueue({type:"ping",eventSource:_})}),_.addEventListener("error",p=>{_.readyState===EventSource.CLOSED?t.error(p):t.enqueue({type:"connecting",eventSource:_,event:p})}),_.addEventListener("message",p=>{const v=p,f={data:e(JSON.parse(v.data))};v.lastEventId&&(f.id=v.lastEventId),t.enqueue({type:"data",data:f,eventSource:_})});const h=()=>{try{_.close(),t.close()}catch{}};u.aborted?h():u.addEventListener("abort",h)},cancel(){m==null||m.close()}}),k=()=>{let t=y(),o=t.getReader();async function l(){await o.cancel(),m=null}return Zr({read(){return o.read()},async recreate(){await l(),t=y(),o=t.getReader()}},l)};return dr(async function*(){const t={stack:[],error:void 0,hasError:!1};try{const o=_r(t,k(),!0);for(;;){let l=o.read();const _=a.reconnectAfterInactivityMs;_&&(l=Xr({promise:l,timeoutMs:_,onTimeout:async()=>{const p={value:{type:"timeout",ms:_,eventSource:m},done:!1};return await o.recreate(),p}}));const h=await l;if(h.done)return h.value;yield h.value}}catch(o){t.error=o,t.hasError=!0}finally{const o=Ut(t);o&&await o}})}function es(c,e){if("error"in c){const u=e.deserialize(c.error);return{ok:!1,error:{...c,error:u}}}return{ok:!0,result:{...c.result,...(!c.result.type||c.result.type==="data")&&{type:"data",data:e.deserialize(c.result.data)}}}}class Bt extends Error{constructor(){super("Unable to transform response from server")}}function ts(c,e){let a;try{a=es(c,e)}catch{throw new Bt}if(!a.ok&&(!Je(a.error.error)||typeof a.error.error.code!="number"))throw new Bt;if(a.ok&&!Je(a.result))throw new Bt;return a}var rr,sr,ir,nr,or,ar;typeof window>"u"||"Deno"in window||((sr=(rr=globalThis.process)==null?void 0:rr.env)==null?void 0:sr.NODE_ENV)==="test"||(nr=(ir=globalThis.process)==null?void 0:ir.env)!=null&&nr.JEST_WORKER_ID||(ar=(or=globalThis.process)==null?void 0:or.env)!=null&&ar.VITEST_WORKER_ID;function gt(c,e,a){return e in c?Object.defineProperty(c,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):c[e]=a,c}function rs(c){return c instanceof pe||c instanceof Error&&c.name==="TRPCClientError"}function ss(c){return Je(c)&&Je(c.error)&&typeof c.error.code=="number"&&typeof c.error.message=="string"}function is(c,e){return typeof c=="string"?c:Je(c)&&typeof c.message=="string"?c.message:e}class pe extends Error{static from(e,a={}){const u=e;return rs(u)?(a.meta&&(u.meta={...u.meta,...a.meta}),u):ss(u)?new pe(u.error.message,{...a,result:u}):new pe(is(u,"Unknown error"),{...a,cause:u})}constructor(e,a){var m,y;const u=a==null?void 0:a.cause;super(e,{cause:u}),gt(this,"cause",void 0),gt(this,"shape",void 0),gt(this,"data",void 0),gt(this,"meta",void 0),this.meta=a==null?void 0:a.meta,this.cause=u,this.shape=(m=a==null?void 0:a.result)==null?void 0:m.error,this.data=(y=a==null?void 0:a.result)==null?void 0:y.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,pe.prototype)}}function Ot(c,e,a){return e in c?Object.defineProperty(c,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):c[e]=a,c}class ns{$request(e){return cr({links:this.links,op:{...e,context:e.context??{},id:++this.requestId}}).pipe(Ir())}async requestAsPromise(e){try{const a=this.$request(e);return(await Mr(a)).result.data}catch(a){throw pe.from(a)}}query(e,a,u){return this.requestAsPromise({type:"query",path:e,input:a,context:u==null?void 0:u.context,signal:u==null?void 0:u.signal})}mutation(e,a,u){return this.requestAsPromise({type:"mutation",path:e,input:a,context:u==null?void 0:u.context,signal:u==null?void 0:u.signal})}subscription(e,a,u){return this.$request({type:"subscription",path:e,input:a,context:u.context,signal:u.signal}).subscribe({next(y){var k,t,o,l;switch(y.result.type){case"state":{(k=u.onConnectionStateChange)==null||k.call(u,y.result);break}case"started":{(t=u.onStarted)==null||t.call(u,{context:y.context});break}case"stopped":{(o=u.onStopped)==null||o.call(u);break}case"data":case void 0:{(l=u.onData)==null||l.call(u,y.result.data);break}}},error(y){var k;(k=u.onError)==null||k.call(u,y)},complete(){var y;(y=u.onComplete)==null||y.call(u)}})}constructor(e){Ot(this,"links",void 0),Ot(this,"runtime",void 0),Ot(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(a=>a(this.runtime))}}const os={query:"query",mutate:"mutation",subscribe:"subscription"},as=c=>os[c];function cs(c){const e=Hr(({path:a,args:u})=>{const m=[...a],y=as(m.pop()),k=m.join(".");return c[y](k,...u)});return Fr(a=>c.hasOwnProperty(a)?c[a]:a==="__untypedClient"?c:e[a])}function hs(c){const e=new ns(c);return cs(e)}const Kt=c=>typeof c=="function";function ls(c){if(c)return c;if(typeof window<"u"&&Kt(window.fetch))return window.fetch;if(typeof globalThis<"u"&&Kt(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}const Gt=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function Yt(c){let e=null,a=null;const u=()=>{clearTimeout(a),a=null,e=null};function m(t){var _,h;const o=[[]];let l=0;for(;;){const p=t[l];if(!p)break;const v=o[o.length-1];if(p.aborted){(_=p.reject)==null||_.call(p,new Error("Aborted")),l++;continue}if(c.validate(v.concat(p).map(f=>f.key))){v.push(p),l++;continue}if(v.length===0){(h=p.reject)==null||h.call(p,new Error("Input is too big for a single dispatch")),l++;continue}o.push([])}return o}function y(){const t=m(e);u();for(const o of t){if(!o.length)continue;const l={items:o};for(const h of o)h.batch=l;c.fetch(l.items.map(h=>h.key)).then(async h=>{var p;await Promise.all(h.map(async(v,C)=>{var i,n;const f=l.items[C];try{const r=await Promise.resolve(v);(i=f.resolve)==null||i.call(f,r)}catch(r){(n=f.reject)==null||n.call(f,r)}f.batch=null,f.reject=null,f.resolve=null}));for(const v of l.items)(p=v.reject)==null||p.call(v,new Error("Missing result")),v.batch=null}).catch(h=>{var p;for(const v of l.items)(p=v.reject)==null||p.call(v,h),v.batch=null})}}function k(t){const o={aborted:!1,key:t,batch:null,resolve:Gt,reject:Gt},l=new Promise((_,h)=>{o.reject=h,o.resolve=_,e||(e=[]),e.push(o)});return a||(a=setTimeout(y)),l}return{load:k}}function ds(...c){const e=new AbortController,a=c.length;let u=0;const m=()=>{++u===a&&e.abort()};for(const y of c)y!=null&&y.aborted?m():y==null||y.addEventListener("abort",m,{once:!0});return e.signal}function us(...c){const e=new AbortController;for(const a of c)a!=null&&a.aborted?e.abort():a==null||a.addEventListener("abort",()=>e.abort(),{once:!0});return e.signal}function pr(c){const e=c;return e?"input"in e?e:{input:e,output:e}:{input:{serialize:a=>a,deserialize:a=>a},output:{serialize:a=>a,deserialize:a=>a}}}function fs(c){return{url:c.url.toString(),fetch:c.fetch,transformer:pr(c.transformer),methodOverride:c.methodOverride}}function _s(c){const e={};for(let a=0;a<c.length;a++){const u=c[a];e[a]=u}return e}const ps={query:"GET",mutation:"POST",subscription:"PATCH"};function gr(c){return"input"in c?c.transformer.input.serialize(c.input):_s(c.inputs.map(e=>c.transformer.input.serialize(e)))}const $t=c=>{const e=c.url.split("?");let u=e[0].replace(/\/$/,"")+"/"+c.path;const m=[];if(e[1]&&m.push(e[1]),"inputs"in c&&m.push("batch=1"),c.type==="query"||c.type==="subscription"){const y=gr(c);y!==void 0&&c.methodOverride!=="POST"&&m.push(`input=${encodeURIComponent(JSON.stringify(y))}`)}return m.length&&(u+="?"+m.join("&")),u},gs=c=>{if(c.type==="query"&&c.methodOverride!=="POST")return;const e=gr(c);return e!==void 0?JSON.stringify(e):void 0},vs=c=>ys({...c,contentTypeHeader:"application/json",getUrl:$t,getBody:gs});class ms extends Error{constructor(){const e="AbortError";super(e),this.name=e,this.message=e}}const bs=c=>{var e;if(c!=null&&c.aborted)throw(e=c.throwIfAborted)==null||e.call(c),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new ms};async function Ss(c){bs(c.signal);const e=c.getUrl(c),a=c.getBody(c),{type:u}=c,m=await(async()=>{const k=await c.headers();return Symbol.iterator in k?Object.fromEntries(k):k})(),y={...c.contentTypeHeader?{"content-type":c.contentTypeHeader}:{},...c.trpcAcceptHeader?{"trpc-accept":c.trpcAcceptHeader}:void 0,...m};return ls(c.fetch)(e,{method:c.methodOverride??ps[u],signal:c.signal,body:a,headers:y})}async function ys(c){const e={},a=await Ss(c);e.response=a;const u=await a.json();return e.responseJSON=u,{json:u,meta:e}}function Cs(c){const e=fs(c),a=c.maxURLLength??1/0;return()=>{const u=t=>({validate(o){if(a===1/0)return!0;const l=o.map(p=>p.path).join(","),_=o.map(p=>p.input);return $t({...e,type:t,path:l,inputs:_,signal:null}).length<=a},async fetch(o){const l=o.map(f=>f.path).join(","),_=o.map(f=>f.input),h=ds(...o.map(f=>f.signal)),p=await vs({...e,path:l,inputs:_,type:t,headers(){return c.headers?typeof c.headers=="function"?c.headers({opList:o}):c.headers:{}},signal:h});return(Array.isArray(p.json)?p.json:o.map(()=>p.json)).map(f=>({meta:p.meta,json:f}))}}),m=Yt(u("query")),y=Yt(u("mutation")),k={query:m,mutation:y};return({op:t})=>$e(o=>{/* istanbul ignore if -- @preserve */if(t.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const _=k[t.type].load(t);let h;return _.then(p=>{h=p;const v=ts(p.json,e.transformer.output);if(!v.ok){o.error(pe.from(v.error,{meta:p.meta}));return}o.next({context:p.meta,result:v.result}),o.complete()}).catch(p=>{o.error(pe.from(p,{meta:h==null?void 0:h.meta}))}),()=>{}})}}function Jt(c){return Array.isArray(c)?c:[c]}function ws(c){return e=>{const a=Jt(c.true).map(m=>m(e)),u=Jt(c.false).map(m=>m(e));return m=>$e(y=>{const k=c.condition(m.op)?a:u;return cr({op:m.op,links:k}).subscribe(y)})}}const Ht=(c,...e)=>typeof c=="function"?c(...e):c;function Es(c,e){return!e||c!=null&&typeof c!="object"?c:{...c??{},lastEventId:e}}async function xs(c){let e=await Ht(c.url);if(c.connectionParams){const a=await Ht(c.connectionParams),u=e.includes("?")?"&":"?";e+=u+"connectionParams="+encodeURIComponent(JSON.stringify(a))}return e}const ks=[_t.BAD_GATEWAY,_t.SERVICE_UNAVAILABLE,_t.GATEWAY_TIMEOUT,_t.INTERNAL_SERVER_ERROR];function Rs(c){const e=pr(c.transformer);return()=>({op:a})=>$e(u=>{const{type:m,path:y,input:k}=a;/* istanbul ignore if -- @preserve */if(m!=="subscription")throw new Error("httpSubscriptionLink only supports subscriptions");let t;const o=new AbortController,l=us(a.signal,o.signal),_=Qr({url:async()=>$t({transformer:e,url:await xs(c),input:Es(k,t),path:y,type:m,signal:null}),init:()=>Ht(c.eventSourceOptions,{op:a}),signal:l,deserialize:e.output.deserialize,EventSource:c.EventSource??globalThis.EventSource}),h=Pr({type:"state",state:"connecting",error:null}),p=h.subscribe({next(v){u.next({result:v})}});return dr(async()=>{for await(const v of _)switch(v.type){case"ping":break;case"data":const C=v.data;let f;C.id?(t=C.id,f={id:C.id,data:C}):f={data:C.data},u.next({result:f,context:{eventSource:v.eventSource}});break;case"connected":{u.next({result:{type:"started"},context:{eventSource:v.eventSource}}),h.next({type:"state",state:"pending",error:null});break}case"serialized-error":{const i=pe.from({error:v.error});if(ks.includes(v.error.code)){h.next({type:"state",state:"connecting",error:i});break}throw i}case"connecting":{const i=h.get(),n=v.event&&pe.from(v.event);if(!n&&i.state==="connecting")break;h.next({type:"state",state:"connecting",error:n});break}case"timeout":h.next({type:"state",state:"connecting",error:new pe(`Timeout of ${v.ms}ms reached while waiting for a response`)})}u.next({result:{type:"stopped"}}),u.complete()}).catch(v=>{u.error(pe.from(v))}),()=>{u.complete(),o.abort(),p.unsubscribe()}})}const Ls={version:"1.7.1",latte:{name:"Latte",emoji:"🌻",order:0,dark:!1,colors:{rosewater:{name:"Rosewater",order:0,hex:"#dc8a78",rgb:{r:220,g:138,b:120},hsl:{h:10.799999999999995,s:.5882352941176472,l:.6666666666666667},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#dd7878",rgb:{r:221,g:120,b:120},hsl:{h:0,s:.5976331360946746,l:.6686274509803922},accent:!0},pink:{name:"Pink",order:2,hex:"#ea76cb",rgb:{r:234,g:118,b:203},hsl:{h:316.0344827586207,s:.7341772151898731,l:.6901960784313725},accent:!0},mauve:{name:"Mauve",order:3,hex:"#8839ef",rgb:{r:136,g:57,b:239},hsl:{h:266.0439560439561,s:.8504672897196262,l:.5803921568627451},accent:!0},red:{name:"Red",order:4,hex:"#d20f39",rgb:{r:210,g:15,b:57},hsl:{h:347.0769230769231,s:.8666666666666666,l:.4411764705882353},accent:!0},maroon:{name:"Maroon",order:5,hex:"#e64553",rgb:{r:230,g:69,b:83},hsl:{h:354.78260869565213,s:.76303317535545,l:.5862745098039216},accent:!0},peach:{name:"Peach",order:6,hex:"#fe640b",rgb:{r:254,g:100,b:11},hsl:{h:21.975308641975307,s:.9918367346938776,l:.5196078431372549},accent:!0},yellow:{name:"Yellow",order:7,hex:"#df8e1d",rgb:{r:223,g:142,b:29},hsl:{h:34.948453608247426,s:.7698412698412698,l:.49411764705882355},accent:!0},green:{name:"Green",order:8,hex:"#40a02b",rgb:{r:64,g:160,b:43},hsl:{h:109.23076923076923,s:.5763546798029556,l:.39803921568627454},accent:!0},teal:{name:"Teal",order:9,hex:"#179299",rgb:{r:23,g:146,b:153},hsl:{h:183.23076923076923,s:.7386363636363636,l:.34509803921568627},accent:!0},sky:{name:"Sky",order:10,hex:"#04a5e5",rgb:{r:4,g:165,b:229},hsl:{h:197.0666666666667,s:.965665236051502,l:.45686274509803926},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#209fb5",rgb:{r:32,g:159,b:181},hsl:{h:188.85906040268458,s:.6995305164319249,l:.4176470588235294},accent:!0},blue:{name:"Blue",order:12,hex:"#1e66f5",rgb:{r:30,g:102,b:245},hsl:{h:219.90697674418607,s:.9148936170212768,l:.5392156862745098},accent:!0},lavender:{name:"Lavender",order:13,hex:"#7287fd",rgb:{r:114,g:135,b:253},hsl:{h:230.93525179856115,s:.9720279720279721,l:.7196078431372549},accent:!0},text:{name:"Text",order:14,hex:"#4c4f69",rgb:{r:76,g:79,b:105},hsl:{h:233.79310344827587,s:.16022099447513813,l:.3549019607843137},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#5c5f77",rgb:{r:92,g:95,b:119},hsl:{h:233.33333333333334,s:.1279620853080569,l:.4137254901960784},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#6c6f85",rgb:{r:108,g:111,b:133},hsl:{h:232.79999999999998,s:.10373443983402494,l:.4725490196078431},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#7c7f93",rgb:{r:124,g:127,b:147},hsl:{h:232.17391304347825,s:.09623430962343092,l:.5313725490196078},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#8c8fa1",rgb:{r:140,g:143,b:161},hsl:{h:231.42857142857144,s:.10047846889952144,l:.5901960784313726},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#9ca0b0",rgb:{r:156,g:160,b:176},hsl:{h:228.00000000000003,s:.11235955056179768,l:.6509803921568628},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#acb0be",rgb:{r:172,g:176,b:190},hsl:{h:226.6666666666667,s:.12162162162162159,l:.7098039215686275},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#bcc0cc",rgb:{r:188,g:192,b:204},hsl:{h:225.00000000000003,s:.13559322033898308,l:.7686274509803922},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#ccd0da",rgb:{r:204,g:208,b:218},hsl:{h:222.85714285714292,s:.1590909090909089,l:.8274509803921568},accent:!1},base:{name:"Base",order:23,hex:"#eff1f5",rgb:{r:239,g:241,b:245},hsl:{h:220.00000000000009,s:.23076923076923136,l:.9490196078431372},accent:!1},mantle:{name:"Mantle",order:24,hex:"#e6e9ef",rgb:{r:230,g:233,b:239},hsl:{h:220.00000000000006,s:.21951219512195116,l:.919607843137255},accent:!1},crust:{name:"Crust",order:25,hex:"#dce0e8",rgb:{r:220,g:224,b:232},hsl:{h:220.00000000000006,s:.20689655172413762,l:.8862745098039215},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#5c5f77",rgb:{r:92,g:95,b:119},hsl:{h:233.33333333333334,s:.1279620853080569,l:.4137254901960784},code:0},bright:{name:"Bright Black",hex:"#6c6f85",rgb:{r:108,g:111,b:133},hsl:{h:232.79999999999998,s:.10373443983402494,l:.4725490196078431},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#d20f39",rgb:{r:210,g:15,b:57},hsl:{h:347.0769230769231,s:.8666666666666666,l:.4411764705882353},code:1},bright:{name:"Bright Red",hex:"#de293e",rgb:{r:222,g:41,b:62},hsl:{h:353.0386740331492,s:.7327935222672065,l:.515686274509804},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#40a02b",rgb:{r:64,g:160,b:43},hsl:{h:109.23076923076923,s:.5763546798029556,l:.39803921568627454},code:2},bright:{name:"Bright Green",hex:"#49af3d",rgb:{r:73,g:175,b:61},hsl:{h:113.68421052631581,s:.48305084745762705,l:.4627450980392157},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#df8e1d",rgb:{r:223,g:142,b:29},hsl:{h:34.948453608247426,s:.7698412698412698,l:.49411764705882355},code:3},bright:{name:"Bright Yellow",hex:"#eea02d",rgb:{r:238,g:160,b:45},hsl:{h:35.751295336787564,s:.8502202643171807,l:.5549019607843138},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#1e66f5",rgb:{r:30,g:102,b:245},hsl:{h:219.90697674418607,s:.9148936170212768,l:.5392156862745098},code:4},bright:{name:"Bright Blue",hex:"#456eff",rgb:{r:69,g:110,b:255},hsl:{h:226.77419354838707,s:1,l:.6352941176470588},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#ea76cb",rgb:{r:234,g:118,b:203},hsl:{h:316.0344827586207,s:.7341772151898731,l:.6901960784313725},code:5},bright:{name:"Bright Magenta",hex:"#fe85d8",rgb:{r:254,g:133,b:216},hsl:{h:318.8429752066116,s:.983739837398374,l:.7588235294117647},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#179299",rgb:{r:23,g:146,b:153},hsl:{h:183.23076923076923,s:.7386363636363636,l:.34509803921568627},code:6},bright:{name:"Bright Cyan",hex:"#2d9fa8",rgb:{r:45,g:159,b:168},hsl:{h:184.39024390243904,s:.5774647887323943,l:.4176470588235294},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#acb0be",rgb:{r:172,g:176,b:190},hsl:{h:226.6666666666667,s:.12162162162162159,l:.7098039215686275},code:7},bright:{name:"Bright White",hex:"#bcc0cc",rgb:{r:188,g:192,b:204},hsl:{h:225.00000000000003,s:.13559322033898308,l:.7686274509803922},code:15}}}},frappe:{name:"Frappé",emoji:"🪴",order:1,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f2d5cf",rgb:{r:242,g:213,b:207},hsl:{h:10.2857142857143,s:.5737704918032784,l:.8803921568627451},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#eebebe",rgb:{r:238,g:190,b:190},hsl:{h:0,s:.5853658536585367,l:.8392156862745098},accent:!0},pink:{name:"Pink",order:2,hex:"#f4b8e4",rgb:{r:244,g:184,b:228},hsl:{h:316,s:.7317073170731713,l:.8392156862745098},accent:!0},mauve:{name:"Mauve",order:3,hex:"#ca9ee6",rgb:{r:202,g:158,b:230},hsl:{h:276.66666666666663,s:.5901639344262294,l:.7607843137254902},accent:!0},red:{name:"Red",order:4,hex:"#e78284",rgb:{r:231,g:130,b:132},hsl:{h:358.8118811881188,s:.6778523489932885,l:.7078431372549019},accent:!0},maroon:{name:"Maroon",order:5,hex:"#ea999c",rgb:{r:234,g:153,b:156},hsl:{h:357.77777777777777,s:.6585365853658534,l:.7588235294117647},accent:!0},peach:{name:"Peach",order:6,hex:"#ef9f76",rgb:{r:239,g:159,b:118},hsl:{h:20.33057851239669,s:.7908496732026143,l:.7},accent:!0},yellow:{name:"Yellow",order:7,hex:"#e5c890",rgb:{r:229,g:200,b:144},hsl:{h:39.52941176470588,s:.6204379562043796,l:.7313725490196079},accent:!0},green:{name:"Green",order:8,hex:"#a6d189",rgb:{r:166,g:209,b:137},hsl:{h:95.83333333333331,s:.4390243902439024,l:.6784313725490196},accent:!0},teal:{name:"Teal",order:9,hex:"#81c8be",rgb:{r:129,g:200,b:190},hsl:{h:171.5492957746479,s:.3922651933701657,l:.6450980392156862},accent:!0},sky:{name:"Sky",order:10,hex:"#99d1db",rgb:{r:153,g:209,b:219},hsl:{h:189.09090909090907,s:.47826086956521735,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#85c1dc",rgb:{r:133,g:193,b:220},hsl:{h:198.62068965517244,s:.5541401273885351,l:.692156862745098},accent:!0},blue:{name:"Blue",order:12,hex:"#8caaee",rgb:{r:140,g:170,b:238},hsl:{h:221.6326530612245,s:.7424242424242424,l:.7411764705882353},accent:!0},lavender:{name:"Lavender",order:13,hex:"#babbf1",rgb:{r:186,g:187,b:241},hsl:{h:238.90909090909093,s:.6626506024096385,l:.8372549019607842},accent:!0},text:{name:"Text",order:14,hex:"#c6d0f5",rgb:{r:198,g:208,b:245},hsl:{h:227.2340425531915,s:.7014925373134333,l:.8686274509803922},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#b5bfe2",rgb:{r:181,g:191,b:226},hsl:{h:226.66666666666669,s:.43689320388349495,l:.7980392156862746},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a5adce",rgb:{r:165,g:173,b:206},hsl:{h:228.29268292682926,s:.2949640287769784,l:.7274509803921569},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#949cbb",rgb:{r:148,g:156,b:187},hsl:{h:227.69230769230768,s:.22285714285714275,l:.6568627450980392},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#838ba7",rgb:{r:131,g:139,b:167},hsl:{h:226.66666666666669,s:.16981132075471703,l:.584313725490196},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#737994",rgb:{r:115,g:121,b:148},hsl:{h:229.0909090909091,s:.13360323886639683,l:.515686274509804},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#626880",rgb:{r:98,g:104,b:128},hsl:{h:228.00000000000003,s:.1327433628318584,l:.44313725490196076},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#51576d",rgb:{r:81,g:87,b:109},hsl:{h:227.14285714285714,s:.14736842105263157,l:.37254901960784315},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#414559",rgb:{r:65,g:69,b:89},hsl:{h:230.00000000000003,s:.15584415584415584,l:.30196078431372547},accent:!1},base:{name:"Base",order:23,hex:"#303446",rgb:{r:48,g:52,b:70},hsl:{h:229.0909090909091,s:.18644067796610175,l:.23137254901960785},accent:!1},mantle:{name:"Mantle",order:24,hex:"#292c3c",rgb:{r:41,g:44,b:60},hsl:{h:230.52631578947367,s:.18811881188118806,l:.19803921568627453},accent:!1},crust:{name:"Crust",order:25,hex:"#232634",rgb:{r:35,g:38,b:52},hsl:{h:229.41176470588238,s:.19540229885057467,l:.17058823529411765},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#51576d",rgb:{r:81,g:87,b:109},hsl:{h:227.14285714285714,s:.14736842105263157,l:.37254901960784315},code:0},bright:{name:"Bright Black",hex:"#626880",rgb:{r:98,g:104,b:128},hsl:{h:228.00000000000003,s:.1327433628318584,l:.44313725490196076},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#e78284",rgb:{r:231,g:130,b:132},hsl:{h:358.8118811881188,s:.6778523489932885,l:.7078431372549019},code:1},bright:{name:"Bright Red",hex:"#e67172",rgb:{r:230,g:113,b:114},hsl:{h:359.4871794871795,s:.7005988023952096,l:.6725490196078432},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6d189",rgb:{r:166,g:209,b:137},hsl:{h:95.83333333333331,s:.4390243902439024,l:.6784313725490196},code:2},bright:{name:"Bright Green",hex:"#8ec772",rgb:{r:142,g:199,b:114},hsl:{h:100.23529411764706,s:.431472081218274,l:.6137254901960785},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#e5c890",rgb:{r:229,g:200,b:144},hsl:{h:39.52941176470588,s:.6204379562043796,l:.7313725490196079},code:3},bright:{name:"Bright Yellow",hex:"#d9ba73",rgb:{r:217,g:186,b:115},hsl:{h:41.764705882352935,s:.5730337078651685,l:.6509803921568628},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#8caaee",rgb:{r:140,g:170,b:238},hsl:{h:221.6326530612245,s:.7424242424242424,l:.7411764705882353},code:4},bright:{name:"Bright Blue",hex:"#7b9ef0",rgb:{r:123,g:158,b:240},hsl:{h:222.05128205128207,s:.7959183673469388,l:.711764705882353},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f4b8e4",rgb:{r:244,g:184,b:228},hsl:{h:316,s:.7317073170731713,l:.8392156862745098},code:5},bright:{name:"Bright Magenta",hex:"#f2a4db",rgb:{r:242,g:164,b:219},hsl:{h:317.6923076923077,s:.7499999999999998,l:.7960784313725491},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#81c8be",rgb:{r:129,g:200,b:190},hsl:{h:171.5492957746479,s:.3922651933701657,l:.6450980392156862},code:6},bright:{name:"Bright Cyan",hex:"#5abfb5",rgb:{r:90,g:191,b:181},hsl:{h:174.05940594059405,s:.44104803493449785,l:.5509803921568628},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a5adce",rgb:{r:165,g:173,b:206},hsl:{h:228.29268292682926,s:.2949640287769784,l:.7274509803921569},code:7},bright:{name:"Bright White",hex:"#b5bfe2",rgb:{r:181,g:191,b:226},hsl:{h:226.66666666666669,s:.43689320388349495,l:.7980392156862746},code:15}}}},macchiato:{name:"Macchiato",emoji:"🌺",order:2,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f4dbd6",rgb:{r:244,g:219,b:214},hsl:{h:9.999999999999963,s:.5769230769230775,l:.8980392156862745},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#f0c6c6",rgb:{r:240,g:198,b:198},hsl:{h:0,s:.5833333333333333,l:.8588235294117648},accent:!0},pink:{name:"Pink",order:2,hex:"#f5bde6",rgb:{r:245,g:189,b:230},hsl:{h:316.0714285714286,s:.7368421052631583,l:.8509803921568628},accent:!0},mauve:{name:"Mauve",order:3,hex:"#c6a0f6",rgb:{r:198,g:160,b:246},hsl:{h:266.51162790697674,s:.8269230769230772,l:.7960784313725491},accent:!0},red:{name:"Red",order:4,hex:"#ed8796",rgb:{r:237,g:135,b:150},hsl:{h:351.1764705882353,s:.7391304347826088,l:.7294117647058824},accent:!0},maroon:{name:"Maroon",order:5,hex:"#ee99a0",rgb:{r:238,g:153,b:160},hsl:{h:355.05882352941177,s:.7142857142857143,l:.7666666666666666},accent:!0},peach:{name:"Peach",order:6,hex:"#f5a97f",rgb:{r:245,g:169,b:127},hsl:{h:21.355932203389827,s:.8550724637681162,l:.7294117647058824},accent:!0},yellow:{name:"Yellow",order:7,hex:"#eed49f",rgb:{r:238,g:212,b:159},hsl:{h:40.253164556962034,s:.6991150442477877,l:.7784313725490196},accent:!0},green:{name:"Green",order:8,hex:"#a6da95",rgb:{r:166,g:218,b:149},hsl:{h:105.21739130434783,s:.4825174825174825,l:.7196078431372549},accent:!0},teal:{name:"Teal",order:9,hex:"#8bd5ca",rgb:{r:139,g:213,b:202},hsl:{h:171.08108108108107,s:.46835443037974706,l:.6901960784313725},accent:!0},sky:{name:"Sky",order:10,hex:"#91d7e3",rgb:{r:145,g:215,b:227},hsl:{h:188.78048780487802,s:.5942028985507245,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#7dc4e4",rgb:{r:125,g:196,b:228},hsl:{h:198.64077669902912,s:.6560509554140128,l:.692156862745098},accent:!0},blue:{name:"Blue",order:12,hex:"#8aadf4",rgb:{r:138,g:173,b:244},hsl:{h:220.188679245283,s:.8281250000000003,l:.7490196078431373},accent:!0},lavender:{name:"Lavender",order:13,hex:"#b7bdf8",rgb:{r:183,g:189,b:248},hsl:{h:234.46153846153848,s:.8227848101265824,l:.8450980392156863},accent:!0},text:{name:"Text",order:14,hex:"#cad3f5",rgb:{r:202,g:211,b:245},hsl:{h:227.4418604651163,s:.6825396825396831,l:.8764705882352941},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#b8c0e0",rgb:{r:184,g:192,b:224},hsl:{h:228,s:.39215686274509803,l:.8},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a5adcb",rgb:{r:165,g:173,b:203},hsl:{h:227.36842105263156,s:.2676056338028167,l:.7215686274509804},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#939ab7",rgb:{r:147,g:154,b:183},hsl:{h:228.33333333333331,s:.2000000000000001,l:.6470588235294117},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#8087a2",rgb:{r:128,g:135,b:162},hsl:{h:227.6470588235294,s:.1545454545454545,l:.5686274509803921},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#6e738d",rgb:{r:110,g:115,b:141},hsl:{h:230.32258064516128,s:.12350597609561753,l:.49215686274509807},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#5b6078",rgb:{r:91,g:96,b:120},hsl:{h:229.65517241379308,s:.13744075829383887,l:.4137254901960784},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#494d64",rgb:{r:73,g:77,b:100},hsl:{h:231.11111111111114,s:.15606936416184972,l:.3392156862745098},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#363a4f",rgb:{r:54,g:58,b:79},hsl:{h:230.4,s:.1879699248120301,l:.2607843137254902},accent:!1},base:{name:"Base",order:23,hex:"#24273a",rgb:{r:36,g:39,b:58},hsl:{h:231.8181818181818,s:.23404255319148934,l:.1843137254901961},accent:!1},mantle:{name:"Mantle",order:24,hex:"#1e2030",rgb:{r:30,g:32,b:48},hsl:{h:233.33333333333334,s:.23076923076923075,l:.15294117647058825},accent:!1},crust:{name:"Crust",order:25,hex:"#181926",rgb:{r:24,g:25,b:38},hsl:{h:235.71428571428572,s:.22580645161290322,l:.12156862745098039},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#494d64",rgb:{r:73,g:77,b:100},hsl:{h:231.11111111111114,s:.15606936416184972,l:.3392156862745098},code:0},bright:{name:"Bright Black",hex:"#5b6078",rgb:{r:91,g:96,b:120},hsl:{h:229.65517241379308,s:.13744075829383887,l:.4137254901960784},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#ed8796",rgb:{r:237,g:135,b:150},hsl:{h:351.1764705882353,s:.7391304347826088,l:.7294117647058824},code:1},bright:{name:"Bright Red",hex:"#ec7486",rgb:{r:236,g:116,b:134},hsl:{h:351,s:.759493670886076,l:.6901960784313725},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6da95",rgb:{r:166,g:218,b:149},hsl:{h:105.21739130434783,s:.4825174825174825,l:.7196078431372549},code:2},bright:{name:"Bright Green",hex:"#8ccf7f",rgb:{r:140,g:207,b:127},hsl:{h:110.24999999999999,s:.45454545454545453,l:.6549019607843137},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#eed49f",rgb:{r:238,g:212,b:159},hsl:{h:40.253164556962034,s:.6991150442477877,l:.7784313725490196},code:3},bright:{name:"Bright Yellow",hex:"#e1c682",rgb:{r:225,g:198,b:130},hsl:{h:42.94736842105264,s:.6129032258064515,l:.696078431372549},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#8aadf4",rgb:{r:138,g:173,b:244},hsl:{h:220.188679245283,s:.8281250000000003,l:.7490196078431373},code:4},bright:{name:"Bright Blue",hex:"#78a1f6",rgb:{r:120,g:161,b:246},hsl:{h:220.47619047619048,s:.8750000000000002,l:.7176470588235294},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f5bde6",rgb:{r:245,g:189,b:230},hsl:{h:316.0714285714286,s:.7368421052631583,l:.8509803921568628},code:5},bright:{name:"Bright Magenta",hex:"#f2a9dd",rgb:{r:242,g:169,b:221},hsl:{h:317.26027397260276,s:.7373737373737372,l:.8058823529411765},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#8bd5ca",rgb:{r:139,g:213,b:202},hsl:{h:171.08108108108107,s:.46835443037974706,l:.6901960784313725},code:6},bright:{name:"Bright Cyan",hex:"#63cbc0",rgb:{r:99,g:203,b:192},hsl:{h:173.65384615384616,s:.4999999999999998,l:.592156862745098},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a5adcb",rgb:{r:165,g:173,b:203},hsl:{h:227.36842105263156,s:.2676056338028167,l:.7215686274509804},code:7},bright:{name:"Bright White",hex:"#b8c0e0",rgb:{r:184,g:192,b:224},hsl:{h:228,s:.39215686274509803,l:.8},code:15}}}},mocha:{name:"Mocha",emoji:"🌿",order:3,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f5e0dc",rgb:{r:245,g:224,b:220},hsl:{h:9.599999999999968,s:.555555555555556,l:.911764705882353},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#f2cdcd",rgb:{r:242,g:205,b:205},hsl:{h:0,s:.587301587301587,l:.8764705882352941},accent:!0},pink:{name:"Pink",order:2,hex:"#f5c2e7",rgb:{r:245,g:194,b:231},hsl:{h:316.4705882352941,s:.7183098591549301,l:.8607843137254902},accent:!0},mauve:{name:"Mauve",order:3,hex:"#cba6f7",rgb:{r:203,g:166,b:247},hsl:{h:267.4074074074074,s:.8350515463917528,l:.8098039215686275},accent:!0},red:{name:"Red",order:4,hex:"#f38ba8",rgb:{r:243,g:139,b:168},hsl:{h:343.2692307692308,s:.8124999999999998,l:.7490196078431373},accent:!0},maroon:{name:"Maroon",order:5,hex:"#eba0ac",rgb:{r:235,g:160,b:172},hsl:{h:350.4,s:.6521739130434779,l:.7745098039215685},accent:!0},peach:{name:"Peach",order:6,hex:"#fab387",rgb:{r:250,g:179,b:135},hsl:{h:22.95652173913043,s:.92,l:.7549019607843137},accent:!0},yellow:{name:"Yellow",order:7,hex:"#f9e2af",rgb:{r:249,g:226,b:175},hsl:{h:41.35135135135135,s:.8604651162790699,l:.8313725490196078},accent:!0},green:{name:"Green",order:8,hex:"#a6e3a1",rgb:{r:166,g:227,b:161},hsl:{h:115.45454545454544,s:.5409836065573769,l:.7607843137254902},accent:!0},teal:{name:"Teal",order:9,hex:"#94e2d5",rgb:{r:148,g:226,b:213},hsl:{h:170.00000000000003,s:.5735294117647057,l:.7333333333333334},accent:!0},sky:{name:"Sky",order:10,hex:"#89dceb",rgb:{r:137,g:220,b:235},hsl:{h:189.18367346938774,s:.7101449275362316,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#74c7ec",rgb:{r:116,g:199,b:236},hsl:{h:198.5,s:.759493670886076,l:.6901960784313725},accent:!0},blue:{name:"Blue",order:12,hex:"#89b4fa",rgb:{r:137,g:180,b:250},hsl:{h:217.1681415929203,s:.9186991869918699,l:.7588235294117647},accent:!0},lavender:{name:"Lavender",order:13,hex:"#b4befe",rgb:{r:180,g:190,b:254},hsl:{h:231.89189189189187,s:.9736842105263159,l:.8509803921568628},accent:!0},text:{name:"Text",order:14,hex:"#cdd6f4",rgb:{r:205,g:214,b:244},hsl:{h:226.15384615384616,s:.6393442622950825,l:.8803921568627451},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#bac2de",rgb:{r:186,g:194,b:222},hsl:{h:226.66666666666669,s:.35294117647058837,l:.8},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a6adc8",rgb:{r:166,g:173,b:200},hsl:{h:227.6470588235294,s:.23611111111111102,l:.7176470588235294},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#9399b2",rgb:{r:147,g:153,b:178},hsl:{h:228.38709677419354,s:.16756756756756758,l:.6372549019607843},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#7f849c",rgb:{r:127,g:132,b:156},hsl:{h:229.65517241379308,s:.12775330396475776,l:.5549019607843138},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#6c7086",rgb:{r:108,g:112,b:134},hsl:{h:230.7692307692308,s:.10743801652892565,l:.4745098039215686},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#585b70",rgb:{r:88,g:91,b:112},hsl:{h:232.5,s:.12,l:.39215686274509803},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#45475a",rgb:{r:69,g:71,b:90},hsl:{h:234.2857142857143,s:.13207547169811326,l:.31176470588235294},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#313244",rgb:{r:49,g:50,b:68},hsl:{h:236.84210526315792,s:.16239316239316234,l:.22941176470588237},accent:!1},base:{name:"Base",order:23,hex:"#1e1e2e",rgb:{r:30,g:30,b:46},hsl:{h:240,s:.21052631578947367,l:.14901960784313725},accent:!1},mantle:{name:"Mantle",order:24,hex:"#181825",rgb:{r:24,g:24,b:37},hsl:{h:240,s:.2131147540983607,l:.11960784313725491},accent:!1},crust:{name:"Crust",order:25,hex:"#11111b",rgb:{r:17,g:17,b:27},hsl:{h:240,s:.22727272727272727,l:.08627450980392157},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#45475a",rgb:{r:69,g:71,b:90},hsl:{h:234.2857142857143,s:.13207547169811326,l:.31176470588235294},code:0},bright:{name:"Bright Black",hex:"#585b70",rgb:{r:88,g:91,b:112},hsl:{h:232.5,s:.12,l:.39215686274509803},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#f38ba8",rgb:{r:243,g:139,b:168},hsl:{h:343.2692307692308,s:.8124999999999998,l:.7490196078431373},code:1},bright:{name:"Bright Red",hex:"#f37799",rgb:{r:243,g:119,b:153},hsl:{h:343.54838709677415,s:.8378378378378376,l:.7098039215686274},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6e3a1",rgb:{r:166,g:227,b:161},hsl:{h:115.45454545454544,s:.5409836065573769,l:.7607843137254902},code:2},bright:{name:"Bright Green",hex:"#89d88b",rgb:{r:137,g:216,b:139},hsl:{h:121.51898734177213,s:.5031847133757963,l:.692156862745098},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#f9e2af",rgb:{r:249,g:226,b:175},hsl:{h:41.35135135135135,s:.8604651162790699,l:.8313725490196078},code:3},bright:{name:"Bright Yellow",hex:"#ebd391",rgb:{r:235,g:211,b:145},hsl:{h:44,s:.692307692307692,l:.7450980392156863},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#89b4fa",rgb:{r:137,g:180,b:250},hsl:{h:217.1681415929203,s:.9186991869918699,l:.7588235294117647},code:4},bright:{name:"Bright Blue",hex:"#74a8fc",rgb:{r:116,g:168,b:252},hsl:{h:217.05882352941174,s:.9577464788732396,l:.7215686274509804},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f5c2e7",rgb:{r:245,g:194,b:231},hsl:{h:316.4705882352941,s:.7183098591549301,l:.8607843137254902},code:5},bright:{name:"Bright Magenta",hex:"#f2aede",rgb:{r:242,g:174,b:222},hsl:{h:317.6470588235294,s:.7234042553191488,l:.8156862745098039},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#94e2d5",rgb:{r:148,g:226,b:213},hsl:{h:170.00000000000003,s:.5735294117647057,l:.7333333333333334},code:6},bright:{name:"Bright Cyan",hex:"#6bd7ca",rgb:{r:107,g:215,b:202},hsl:{h:172.77777777777777,s:.5744680851063831,l:.6313725490196078},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a6adc8",rgb:{r:166,g:173,b:200},hsl:{h:227.6470588235294,s:.23611111111111102,l:.7176470588235294},code:7},bright:{name:"Bright White",hex:"#bac2de",rgb:{r:186,g:194,b:222},hsl:{h:226.66666666666669,s:.35294117647058837,l:.8},code:15}}}}},vt=c=>Object.entries(c),{version:Ki,...Ds}=Ls,vr=vt(Ds).reduce((c,[e,a])=>(c[e]={...a,colorEntries:vt(a.colors),ansiColorEntries:vt(a.ansiColors)},c),{});vt(vr);var Mt={exports:{}},Xt;function Ts(){return Xt||(Xt=1,function(c,e){(function(a,u){c.exports=u()})(self,()=>(()=>{var a={};return(()=>{var u=a;Object.defineProperty(u,"__esModule",{value:!0}),u.FitAddon=void 0,u.FitAddon=class{activate(m){this._terminal=m}dispose(){}fit(){const m=this.proposeDimensions();if(!m||!this._terminal||isNaN(m.cols)||isNaN(m.rows))return;const y=this._terminal._core;this._terminal.rows===m.rows&&this._terminal.cols===m.cols||(y._renderService.clear(),this._terminal.resize(m.cols,m.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const m=this._terminal._core,y=m._renderService.dimensions;if(y.css.cell.width===0||y.css.cell.height===0)return;const k=this._terminal.options.scrollback===0?0:m.viewport.scrollBarWidth,t=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(t.getPropertyValue("height")),l=Math.max(0,parseInt(t.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),h=o-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),p=l-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-k;return{cols:Math.max(2,Math.floor(p/y.css.cell.width)),rows:Math.max(1,Math.floor(h/y.css.cell.height))}}}})(),a})())}(Mt)),Mt.exports}var As=Ts(),It={exports:{}},Qt;function Bs(){return Qt||(Qt=1,function(c,e){(function(a,u){c.exports=u()})(globalThis,()=>(()=>{var a={4567:function(k,t,o){var l=this&&this.__decorate||function(r,s,d,S){var b,w=arguments.length,g=w<3?s:S===null?S=Object.getOwnPropertyDescriptor(s,d):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(r,s,d,S);else for(var E=r.length-1;E>=0;E--)(b=r[E])&&(g=(w<3?b(g):w>3?b(s,d,g):b(s,d))||g);return w>3&&g&&Object.defineProperty(s,d,g),g},_=this&&this.__param||function(r,s){return function(d,S){s(d,S,r)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityManager=void 0;const h=o(9042),p=o(9924),v=o(844),C=o(4725),f=o(2585),i=o(3656);let n=t.AccessibilityManager=class extends v.Disposable{constructor(r,s,d,S){super(),this._terminal=r,this._coreBrowserService=d,this._renderService=S,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let b=0;b<this._terminal.rows;b++)this._rowElements[b]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[b]);if(this._topBoundaryFocusListener=b=>this._handleBoundaryFocus(b,0),this._bottomBoundaryFocusListener=b=>this._handleBoundaryFocus(b,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(b=>this._handleResize(b.rows))),this.register(this._terminal.onRender(b=>this._refreshRows(b.start,b.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(b=>this._handleChar(b))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
2
2
  `))),this.register(this._terminal.onA11yTab(b=>this._handleTab(b))),this.register(this._terminal.onKey(b=>this._handleKey(b.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,i.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,v.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(r){for(let s=0;s<r;s++)this._handleChar(" ")}_handleChar(r){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==r&&(this._charsToAnnounce+=r):this._charsToAnnounce+=r,r===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(r){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(r)||this._charsToConsume.push(r)}_refreshRows(r,s){this._liveRegionDebouncer.refresh(r,s,this._terminal.rows)}_renderRows(r,s){const d=this._terminal.buffer,S=d.lines.length.toString();for(let b=r;b<=s;b++){const w=d.lines.get(d.ydisp+b),g=[],E=(w==null?void 0:w.translateToString(!0,void 0,void 0,g))||"",T=(d.ydisp+b+1).toString(),B=this._rowElements[b];B&&(E.length===0?(B.innerText=" ",this._rowColumns.set(B,[0,1])):(B.textContent=E,this._rowColumns.set(B,g)),B.setAttribute("aria-posinset",T),B.setAttribute("aria-setsize",S))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(r,s){const d=r.target,S=this._rowElements[s===0?1:this._rowElements.length-2];if(d.getAttribute("aria-posinset")===(s===0?"1":`${this._terminal.buffer.lines.length}`)||r.relatedTarget!==S)return;let b,w;if(s===0?(b=d,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(b=this._rowElements.shift(),w=d,this._rowContainer.removeChild(b)),b.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),s===0){const g=this._createAccessibilityTreeNode();this._rowElements.unshift(g),this._rowContainer.insertAdjacentElement("afterbegin",g)}else{const g=this._createAccessibilityTreeNode();this._rowElements.push(g),this._rowContainer.appendChild(g)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(s===0?-1:1),this._rowElements[s===0?1:this._rowElements.length-2].focus(),r.preventDefault(),r.stopImmediatePropagation()}_handleSelectionChange(){var E;if(this._rowElements.length===0)return;const r=document.getSelection();if(!r)return;if(r.isCollapsed)return void(this._rowContainer.contains(r.anchorNode)&&this._terminal.clearSelection());if(!r.anchorNode||!r.focusNode)return void console.error("anchorNode and/or focusNode are null");let s={node:r.anchorNode,offset:r.anchorOffset},d={node:r.focusNode,offset:r.focusOffset};if((s.node.compareDocumentPosition(d.node)&Node.DOCUMENT_POSITION_PRECEDING||s.node===d.node&&s.offset>d.offset)&&([s,d]=[d,s]),s.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(s={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(s.node))return;const S=this._rowElements.slice(-1)[0];if(d.node.compareDocumentPosition(S)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(d={node:S,offset:((E=S.textContent)==null?void 0:E.length)??0}),!this._rowContainer.contains(d.node))return;const b=({node:T,offset:B})=>{const O=T instanceof Text?T.parentNode:T;let D=parseInt(O==null?void 0:O.getAttribute("aria-posinset"),10)-1;if(isNaN(D))return console.warn("row is invalid. Race condition?"),null;const P=this._rowColumns.get(O);if(!P)return console.warn("columns is null. Race condition?"),null;let F=B<P.length?P[B]:P.slice(-1)[0]+1;return F>=this._terminal.cols&&(++D,F=0),{row:D,column:F}},w=b(s),g=b(d);if(w&&g){if(w.row>g.row||w.row===g.row&&w.column>=g.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(g.row-w.row)*this._terminal.cols-w.column+g.column)}}_handleResize(r){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let s=this._rowContainer.children.length;s<this._terminal.rows;s++)this._rowElements[s]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[s]);for(;this._rowElements.length>r;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const r=this._coreBrowserService.mainDocument.createElement("div");return r.setAttribute("role","listitem"),r.tabIndex=-1,this._refreshRowDimensions(r),r}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let r=0;r<this._terminal.rows;r++)this._refreshRowDimensions(this._rowElements[r])}}_refreshRowDimensions(r){r.style.height=`${this._renderService.dimensions.css.cell.height}px`}};t.AccessibilityManager=n=l([_(1,f.IInstantiationService),_(2,C.ICoreBrowserService),_(3,C.IRenderService)],n)},3614:(k,t)=>{function o(p){return p.replace(/\r?\n/g,"\r")}function l(p,v){return v?"\x1B[200~"+p+"\x1B[201~":p}function _(p,v,C,f){p=l(p=o(p),C.decPrivateModes.bracketedPasteMode&&f.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(p,!0),v.value=""}function h(p,v,C){const f=C.getBoundingClientRect(),i=p.clientX-f.left-10,n=p.clientY-f.top-10;v.style.width="20px",v.style.height="20px",v.style.left=`${i}px`,v.style.top=`${n}px`,v.style.zIndex="1000",v.focus()}Object.defineProperty(t,"__esModule",{value:!0}),t.rightClickHandler=t.moveTextAreaUnderMouseCursor=t.paste=t.handlePasteEvent=t.copyHandler=t.bracketTextForPaste=t.prepareTextForTerminal=void 0,t.prepareTextForTerminal=o,t.bracketTextForPaste=l,t.copyHandler=function(p,v){p.clipboardData&&p.clipboardData.setData("text/plain",v.selectionText),p.preventDefault()},t.handlePasteEvent=function(p,v,C,f){p.stopPropagation(),p.clipboardData&&_(p.clipboardData.getData("text/plain"),v,C,f)},t.paste=_,t.moveTextAreaUnderMouseCursor=h,t.rightClickHandler=function(p,v,C,f,i){h(p,v,C),i&&f.rightClickSelect(p),v.value=f.selectionText,v.select()}},7239:(k,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorContrastCache=void 0;const l=o(1505);t.ColorContrastCache=class{constructor(){this._color=new l.TwoKeyMap,this._css=new l.TwoKeyMap}setCss(_,h,p){this._css.set(_,h,p)}getCss(_,h){return this._css.get(_,h)}setColor(_,h,p){this._color.set(_,h,p)}getColor(_,h){return this._color.get(_,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(k,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(o,l,_,h){o.addEventListener(l,_,h);let p=!1;return{dispose:()=>{p||(p=!0,o.removeEventListener(l,_,h))}}}},3551:function(k,t,o){var l=this&&this.__decorate||function(n,r,s,d){var S,b=arguments.length,w=b<3?r:d===null?d=Object.getOwnPropertyDescriptor(r,s):d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(n,r,s,d);else for(var g=n.length-1;g>=0;g--)(S=n[g])&&(w=(b<3?S(w):b>3?S(r,s,w):S(r,s))||w);return b>3&&w&&Object.defineProperty(r,s,w),w},_=this&&this.__param||function(n,r){return function(s,d){r(s,d,n)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Linkifier=void 0;const h=o(3656),p=o(8460),v=o(844),C=o(2585),f=o(4725);let i=t.Linkifier=class extends v.Disposable{get currentLink(){return this._currentLink}constructor(n,r,s,d,S){super(),this._element=n,this._mouseService=r,this._renderService=s,this._bufferService=d,this._linkProviderService=S,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,v.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,v.toDisposable)(()=>{var b;this._lastMouseEvent=void 0,(b=this._activeProviderReplies)==null||b.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(n){this._lastMouseEvent=n;const r=this._positionFromMouseEvent(n,this._element,this._mouseService);if(!r)return;this._isMouseOut=!1;const s=n.composedPath();for(let d=0;d<s.length;d++){const S=s[d];if(S.classList.contains("xterm"))break;if(S.classList.contains("xterm-hover"))return}this._lastBufferCell&&r.x===this._lastBufferCell.x&&r.y===this._lastBufferCell.y||(this._handleHover(r),this._lastBufferCell=r)}_handleHover(n){if(this._activeLine!==n.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(n,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,n)||(this._clearCurrentLink(),this._askForLink(n,!0))}_askForLink(n,r){var d,S;this._activeProviderReplies&&r||((d=this._activeProviderReplies)==null||d.forEach(b=>{b==null||b.forEach(w=>{w.link.dispose&&w.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=n.y);let s=!1;for(const[b,w]of this._linkProviderService.linkProviders.entries())r?(S=this._activeProviderReplies)!=null&&S.get(b)&&(s=this._checkLinkProviderResult(b,n,s)):w.provideLinks(n.y,g=>{var T,B;if(this._isMouseOut)return;const E=g==null?void 0:g.map(O=>({link:O}));(T=this._activeProviderReplies)==null||T.set(b,E),s=this._checkLinkProviderResult(b,n,s),((B=this._activeProviderReplies)==null?void 0:B.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(n.y,this._activeProviderReplies)})}_removeIntersectingLinks(n,r){const s=new Set;for(let d=0;d<r.size;d++){const S=r.get(d);if(S)for(let b=0;b<S.length;b++){const w=S[b],g=w.link.range.start.y<n?0:w.link.range.start.x,E=w.link.range.end.y>n?this._bufferService.cols:w.link.range.end.x;for(let T=g;T<=E;T++){if(s.has(T)){S.splice(b--,1);break}s.add(T)}}}}_checkLinkProviderResult(n,r,s){var b;if(!this._activeProviderReplies)return s;const d=this._activeProviderReplies.get(n);let S=!1;for(let w=0;w<n;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(S=!0);if(!S&&d){const w=d.find(g=>this._linkAtPosition(g.link,r));w&&(s=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!s)for(let w=0;w<this._activeProviderReplies.size;w++){const g=(b=this._activeProviderReplies.get(w))==null?void 0:b.find(E=>this._linkAtPosition(E.link,r));if(g){s=!0,this._handleNewLink(g);break}}return s}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(n){if(!this._currentLink)return;const r=this._positionFromMouseEvent(n,this._element,this._mouseService);r&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(n,this._currentLink.link.text)}_clearCurrentLink(n,r){this._currentLink&&this._lastMouseEvent&&(!n||!r||this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=r)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,v.disposeArray)(this._linkCacheDisposables))}_handleNewLink(n){if(!this._lastMouseEvent)return;const r=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);r&&this._linkAtPosition(n.link,r)&&(this._currentLink=n,this._currentLink.state={decorations:{underline:n.link.decorations===void 0||n.link.decorations.underline,pointerCursor:n.link.decorations===void 0||n.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,n.link,this._lastMouseEvent),n.link.decorations={},Object.defineProperties(n.link.decorations,{pointerCursor:{get:()=>{var s,d;return(d=(s=this._currentLink)==null?void 0:s.state)==null?void 0:d.decorations.pointerCursor},set:s=>{var d;(d=this._currentLink)!=null&&d.state&&this._currentLink.state.decorations.pointerCursor!==s&&(this._currentLink.state.decorations.pointerCursor=s,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",s))}},underline:{get:()=>{var s,d;return(d=(s=this._currentLink)==null?void 0:s.state)==null?void 0:d.decorations.underline},set:s=>{var d,S,b;(d=this._currentLink)!=null&&d.state&&((b=(S=this._currentLink)==null?void 0:S.state)==null?void 0:b.decorations.underline)!==s&&(this._currentLink.state.decorations.underline=s,this._currentLink.state.isHovered&&this._fireUnderlineEvent(n.link,s))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(s=>{if(!this._currentLink)return;const d=s.start===0?0:s.start+1+this._bufferService.buffer.ydisp,S=this._bufferService.buffer.ydisp+1+s.end;if(this._currentLink.link.range.start.y>=d&&this._currentLink.link.range.end.y<=S&&(this._clearCurrentLink(d,S),this._lastMouseEvent)){const b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._askForLink(b,!1)}})))}_linkHover(n,r,s){var d;(d=this._currentLink)!=null&&d.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!0),this._currentLink.state.decorations.pointerCursor&&n.classList.add("xterm-cursor-pointer")),r.hover&&r.hover(s,r.text)}_fireUnderlineEvent(n,r){const s=n.range,d=this._bufferService.buffer.ydisp,S=this._createLinkUnderlineEvent(s.start.x-1,s.start.y-d-1,s.end.x,s.end.y-d-1,void 0);(r?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(S)}_linkLeave(n,r,s){var d;(d=this._currentLink)!=null&&d.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!1),this._currentLink.state.decorations.pointerCursor&&n.classList.remove("xterm-cursor-pointer")),r.leave&&r.leave(s,r.text)}_linkAtPosition(n,r){const s=n.range.start.y*this._bufferService.cols+n.range.start.x,d=n.range.end.y*this._bufferService.cols+n.range.end.x,S=r.y*this._bufferService.cols+r.x;return s<=S&&S<=d}_positionFromMouseEvent(n,r,s){const d=s.getCoords(n,r,this._bufferService.cols,this._bufferService.rows);if(d)return{x:d[0],y:d[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(n,r,s,d,S){return{x1:n,y1:r,x2:s,y2:d,cols:this._bufferService.cols,fg:S}}};t.Linkifier=i=l([_(1,f.IMouseService),_(2,f.IRenderService),_(3,C.IBufferService),_(4,f.ILinkProviderService)],i)},9042:(k,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tooMuchOutput=t.promptLabel=void 0,t.promptLabel="Terminal input",t.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(k,t,o){var l=this&&this.__decorate||function(f,i,n,r){var s,d=arguments.length,S=d<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(f,i,n,r);else for(var b=f.length-1;b>=0;b--)(s=f[b])&&(S=(d<3?s(S):d>3?s(i,n,S):s(i,n))||S);return d>3&&S&&Object.defineProperty(i,n,S),S},_=this&&this.__param||function(f,i){return function(n,r){i(n,r,f)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OscLinkProvider=void 0;const h=o(511),p=o(2585);let v=t.OscLinkProvider=class{constructor(f,i,n){this._bufferService=f,this._optionsService=i,this._oscLinkService=n}provideLinks(f,i){var E;const n=this._bufferService.buffer.lines.get(f-1);if(!n)return void i(void 0);const r=[],s=this._optionsService.rawOptions.linkHandler,d=new h.CellData,S=n.getTrimmedLength();let b=-1,w=-1,g=!1;for(let T=0;T<S;T++)if(w!==-1||n.hasContent(T)){if(n.loadCell(T,d),d.hasExtendedAttrs()&&d.extended.urlId){if(w===-1){w=T,b=d.extended.urlId;continue}g=d.extended.urlId!==b}else w!==-1&&(g=!0);if(g||w!==-1&&T===S-1){const B=(E=this._oscLinkService.getLinkData(b))==null?void 0:E.uri;if(B){const O={start:{x:w+1,y:f},end:{x:T+(g||T!==S-1?0:1),y:f}};let D=!1;if(!(s!=null&&s.allowNonHttpProtocols))try{const P=new URL(B);["http:","https:"].includes(P.protocol)||(D=!0)}catch{D=!0}D||r.push({text:B,range:O,activate:(P,F)=>s?s.activate(P,F,O):C(0,F),hover:(P,F)=>{var U;return(U=s==null?void 0:s.hover)==null?void 0:U.call(s,P,F,O)},leave:(P,F)=>{var U;return(U=s==null?void 0:s.leave)==null?void 0:U.call(s,P,F,O)}})}g=!1,d.hasExtendedAttrs()&&d.extended.urlId?(w=T,b=d.extended.urlId):(w=-1,b=-1)}}i(r)}};function C(f,i){if(confirm(`Do you want to navigate to ${i}?
4
4
 
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <title>tui-sandbox integration tests</title>
6
- <script type="module" crossorigin src="/assets/index-CWXBquay.js"></script>
6
+ <script type="module" crossorigin src="/assets/index-DpW-bZpc.js"></script>
7
7
  <link rel="stylesheet" crossorigin href="/assets/index-D6fBrqAi.css">
8
8
  </head>
9
9
  <body>
@@ -20,7 +20,6 @@ import type {
20
20
  StartNeovimGenericArguments,
21
21
  TestDirectory,
22
22
  } from "@tui-sandbox/library/dist/src/server/types"
23
- import assert from "assert"
24
23
  import type { OverrideProperties } from "type-fest"
25
24
  import type { MyTestDirectory, MyTestDirectoryFile } from "../../MyTestDirectory"
26
25
 
@@ -109,7 +108,14 @@ declare global {
109
108
 
110
109
  afterEach(async () => {
111
110
  if (!testWindow) return
112
- await testWindow.runExCommand({ command: "messages", log: true })
111
+ const timeout = new Promise<void>((resolve, reject) =>
112
+ setTimeout(() => {
113
+ Cypress.log({ name: "timeout when waiting for :messages to finish. Neovim might be stuck." })
114
+ reject("timeout when waiting for :messages to finish. Neovim might be stuck.")
115
+ }, 5_000)
116
+ )
117
+
118
+ await Promise.race([timeout, testWindow.runExCommand({ command: "messages" })])
113
119
  })
114
120
  `;
115
121
  const options = await resolveConfig(__filename);
@@ -66,6 +66,12 @@ describe("dirtree", () => {
66
66
  extension: z.literal("lua"),
67
67
  stem: z.literal("add_command_to_count_open_buffers."),
68
68
  }),
69
+ "don't_crash_when_modification_contains_unescaped_characters\\".lua": z.object({
70
+ name: z.literal("don't_crash_when_modification_contains_unescaped_characters\\".lua"),
71
+ type: z.literal("file"),
72
+ extension: z.literal("lua"),
73
+ stem: z.literal("don't_crash_when_modification_contains_unescaped_characters\\"."),
74
+ }),
69
75
  }),
70
76
  }),
71
77
  "dir with spaces": z.object({
@@ -166,6 +172,7 @@ describe("dirtree", () => {
166
172
  ".config/nvim",
167
173
  ".config",
168
174
  "config-modifications/add_command_to_count_open_buffers.lua",
175
+ "config-modifications/don't_crash_when_modification_contains_unescaped_characters\\".lua",
169
176
  "config-modifications",
170
177
  "dir with spaces/file1.txt",
171
178
  "dir with spaces/file2.txt",
@@ -6,7 +6,7 @@ export async function jsonToZod(object, name = "schema") {
6
6
  const parse = (o, seen) => {
7
7
  switch (typeof o) {
8
8
  case "string":
9
- return `z.literal("${o}")`;
9
+ return `z.literal("${o.replaceAll('"', `\\"`)}")`;
10
10
  case "number":
11
11
  return "z.number()";
12
12
  case "bigint":
@@ -37,7 +37,10 @@ export async function jsonToZod(object, name = "schema") {
37
37
  }
38
38
  }
39
39
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
40
- return `z.object({${Object.entries(o).map(([k, v]) => `'${k}':${parse(v, seen)}`)}})`;
40
+ return `z.object({${Object.entries(o).map(([k, v]) => {
41
+ const key = k.replaceAll("'", "\\'");
42
+ return `'${key}':${parse(v, seen)}`;
43
+ })}})`;
41
44
  case "undefined":
42
45
  return "z.undefined()";
43
46
  case "function":
@@ -26,13 +26,14 @@ export class NeovimApplication {
26
26
  const neovimArguments = [];
27
27
  if (startArgs.startupScriptModifications) {
28
28
  for (const modification of startArgs.startupScriptModifications) {
29
- const file = path.join(testDirectory.rootPathAbsolute, "config-modifications", modification);
29
+ let file = path.join(testDirectory.rootPathAbsolute, "config-modifications", modification);
30
30
  try {
31
31
  await access(file);
32
32
  }
33
33
  catch (e) {
34
34
  throw new Error(`startupScriptModifications file does not exist: ${file}. Error: ${String(e)}`);
35
35
  }
36
+ file = file.replaceAll("'", "\\'");
36
37
  neovimArguments.push("-c", `lua dofile('${file}')`);
37
38
  }
38
39
  }