diff --git a/ui/dist/assets/index-B9tJoFQc.js b/ui/dist/assets/index-B9tJoFQc.js deleted file mode 100644 index ecef9cff..00000000 --- a/ui/dist/assets/index-B9tJoFQc.js +++ /dev/null @@ -1,1056 +0,0 @@ -var bU=Object.defineProperty;var M8=e=>{throw TypeError(e)};var yU=(e,n,t)=>n in e?bU(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Os=(e,n,t)=>yU(e,typeof n!="symbol"?n+"":n,t),Wx=(e,n,t)=>n.has(e)||M8("Cannot "+t);var fe=(e,n,t)=>(Wx(e,n,"read from private field"),t?t.call(e):n.get(e)),nt=(e,n,t)=>n.has(e)?M8("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Fe=(e,n,t,r)=>(Wx(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Mt=(e,n,t)=>(Wx(e,n,"access private method"),t);var X_=(e,n,t,r)=>({set _(s){Fe(e,n,s,t)},get _(){return fe(e,n,r)}});(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=t(s);fetch(s.href,i)}})();function $p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vx={exports:{}},Z_={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var D8;function xU(){if(D8)return Z_;D8=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,i){var o=null;if(i!==void 0&&(o=""+i),s.key!==void 0&&(o=""+s.key),"key"in s){i={};for(var a in s)a!=="key"&&(i[a]=s[a])}else i=s;return s=i.ref,{$$typeof:e,type:r,key:o,ref:s!==void 0?s:null,props:i}}return Z_.Fragment=n,Z_.jsx=t,Z_.jsxs=t,Z_}var L8;function wU(){return L8||(L8=1,Vx.exports=xU()),Vx.exports}var h=wU(),Kx={exports:{}},Zt={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var O8;function SU(){if(O8)return Zt;O8=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;function m($){return $===null||typeof $!="object"?null:($=p&&$[p]||$["@@iterator"],typeof $=="function"?$:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function v($,H,G){this.props=$,this.context=H,this.refs=b,this.updater=G||x}v.prototype.isReactComponent={},v.prototype.setState=function($,H){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,H,"setState")},v.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function y(){}y.prototype=v.prototype;function w($,H,G){this.props=$,this.context=H,this.refs=b,this.updater=G||x}var C=w.prototype=new y;C.constructor=w,S(C,v.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function E(){}var j={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function R($,H,G){var ne=G.ref;return{$$typeof:e,type:$,key:H,ref:ne!==void 0?ne:null,props:G}}function O($,H){return R($.type,H,$.props)}function I($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function F($){var H={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(G){return H[G]})}var U=/\/+/g;function q($,H){return typeof $=="object"&&$!==null&&$.key!=null?F(""+$.key):H.toString(36)}function Y($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(E,E):($.status="pending",$.then(function(H){$.status==="pending"&&($.status="fulfilled",$.value=H)},function(H){$.status==="pending"&&($.status="rejected",$.reason=H)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function V($,H,G,ne,oe){var le=typeof $;(le==="undefined"||le==="boolean")&&($=null);var se=!1;if($===null)se=!0;else switch(le){case"bigint":case"string":case"number":se=!0;break;case"object":switch($.$$typeof){case e:case n:se=!0;break;case _:return se=$._init,V(se($._payload),H,G,ne,oe)}}if(se)return oe=oe($),se=ne===""?"."+q($,0):ne,N(oe)?(G="",se!=null&&(G=se.replace(U,"$&/")+"/"),V(oe,H,G,"",function(ee){return ee})):oe!=null&&(I(oe)&&(oe=O(oe,G+(oe.key==null||$&&$.key===oe.key?"":(""+oe.key).replace(U,"$&/")+"/")+se)),H.push(oe)),1;se=0;var Q=ne===""?".":ne+":";if(N($))for(var ce=0;ce<$.length;ce++)ne=$[ce],le=Q+q(ne,ce),se+=V(ne,H,G,le,oe);else if(ce=m($),typeof ce=="function")for($=ce.call($),ce=0;!(ne=$.next()).done;)ne=ne.value,le=Q+q(ne,ce++),se+=V(ne,H,G,le,oe);else if(le==="object"){if(typeof $.then=="function")return V(Y($),H,G,ne,oe);throw H=String($),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return se}function Z($,H,G){if($==null)return $;var ne=[],oe=0;return V($,ne,"","",function(le){return H.call(G,le,oe++)}),ne}function te($){if($._status===-1){var H=$._result;H=H(),H.then(function(G){($._status===0||$._status===-1)&&($._status=1,$._result=G)},function(G){($._status===0||$._status===-1)&&($._status=2,$._result=G)}),$._status===-1&&($._status=0,$._result=H)}if($._status===1)return $._result.default;throw $._result}var P=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},L={map:Z,forEach:function($,H,G){Z($,function(){H.apply(this,arguments)},G)},count:function($){var H=0;return Z($,function(){H++}),H},toArray:function($){return Z($,function(H){return H})||[]},only:function($){if(!I($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return Zt.Activity=f,Zt.Children=L,Zt.Component=v,Zt.Fragment=t,Zt.Profiler=s,Zt.PureComponent=w,Zt.StrictMode=r,Zt.Suspense=l,Zt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Zt.__COMPILER_RUNTIME={__proto__:null,c:function($){return j.H.useMemoCache($)}},Zt.cache=function($){return function(){return $.apply(null,arguments)}},Zt.cacheSignal=function(){return null},Zt.cloneElement=function($,H,G){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var ne=S({},$.props),oe=$.key;if(H!=null)for(le in H.key!==void 0&&(oe=""+H.key),H)!z.call(H,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&H.ref===void 0||(ne[le]=H[le]);var le=arguments.length-2;if(le===1)ne.children=G;else if(1{const n=M.useContext(qR);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},kU=({client:e,children:n})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(qR.Provider,{value:e,children:n})),CU={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var Vc,_3,AR,EU=(AR=class{constructor(){nt(this,Vc,CU);nt(this,_3,!1)}setTimeoutProvider(e){Fe(this,Vc,e)}setTimeout(e,n){return fe(this,Vc).setTimeout(e,n)}clearTimeout(e){fe(this,Vc).clearTimeout(e)}setInterval(e,n){return fe(this,Vc).setInterval(e,n)}clearInterval(e){fe(this,Vc).clearInterval(e)}},Vc=new WeakMap,_3=new WeakMap,AR);const cf=new EU;function NU(e){setTimeout(e,0)}const zU=typeof window>"u"||"Deno"in globalThis;function Fs(){}function TU(e,n){return typeof e=="function"?e(n):e}function UR(e){return typeof e=="number"&&e>=0&&e!==1/0}function GR(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Lr(e,n){return typeof e=="function"?e(n):e}function B8(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(n.queryHash!==p3(o,n.options))return!1}else if(!Rh(n.queryKey,o))return!1}if(t!=="all"){const l=n.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof a=="boolean"&&n.isStale()!==a||s&&s!==n.state.fetchStatus||i&&!i(n))}function $8(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(Mf(n.options.mutationKey)!==Mf(i))return!1}else if(!Rh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function p3(e,n){return((n==null?void 0:n.queryKeyHashFn)||Mf)(e)}function Mf(e){return JSON.stringify(e,(n,t)=>Fw(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function Rh(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){for(let r=0;r500)return n;const r=P8(e)&&P8(n);if(!r&&!(Fw(e)&&Fw(n)))return n;const s=(r?e:Object.keys(e)).length,i=r?n:Object.keys(n),o=i.length,a=r?new Array(o):{};let l=0;for(let u=0;u{cf.setTimeout(n,e)})}function Hw(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?m3(e,n):n}function RU(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function MU(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const g3=Symbol();function WR(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===g3?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function v3(e,n){return typeof e=="function"?e(...n):!!e}function DU(e,n,t){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=n()),r||(r=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}let LU=()=>zU;const b3=()=>LU();var Uf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},hf,Kc,_h,RR,OU=(RR=class extends Uf{constructor(){super();nt(this,hf);nt(this,Kc);nt(this,_h);Fe(this,_h,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){fe(this,Kc)||this.setEventListener(fe(this,_h))}onUnsubscribe(){var n;this.hasListeners()||((n=fe(this,Kc))==null||n.call(this),Fe(this,Kc,void 0))}setEventListener(n){var t;Fe(this,_h,n),(t=fe(this,Kc))==null||t.call(this),Fe(this,Kc,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){fe(this,hf)!==n&&(Fe(this,hf,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof fe(this,hf)=="boolean"?fe(this,hf):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},hf=new WeakMap,Kc=new WeakMap,_h=new WeakMap,RR);const y3=new OU,IU=NU;function BU(){let e=[],n=0,t=a=>{a()},r=a=>{a()},s=IU;const i=a=>{n?e.push(a):s(()=>{t(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{t(l)})})})};return{batch:a=>{let l;n++;try{l=a()}finally{n--,n||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{t=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}const kr=BU();var ph,Qc,mh,MR,$U=(MR=class extends Uf{constructor(){super();nt(this,ph,!0);nt(this,Qc);nt(this,mh);Fe(this,mh,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){fe(this,Qc)||this.setEventListener(fe(this,mh))}onUnsubscribe(){var n;this.hasListeners()||((n=fe(this,Qc))==null||n.call(this),Fe(this,Qc,void 0))}setEventListener(n){var t;Fe(this,mh,n),(t=fe(this,Qc))==null||t.call(this),Fe(this,Qc,n(this.setOnline.bind(this)))}setOnline(n){fe(this,ph)!==n&&(Fe(this,ph,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return fe(this,ph)}},ph=new WeakMap,Qc=new WeakMap,mh=new WeakMap,MR);const O1=new $U;function PU(e){return Math.min(1e3*2**e,3e4)}function VR(e){return(e??"online")==="online"?O1.isOnline():!0}var I1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function FU(e){return e instanceof I1}function KR(e){let n=!1,t=0,r,s="pending",i,o;const a=new Promise((y,w)=>{i=y,o=w});a.catch(Fs);const l=()=>s!=="pending",u=y=>{var w;if(!l()){const C=new I1(y);S(C),(w=e.onCancel)==null||w.call(e,C)}},_=()=>{n=!0},f=()=>{n=!1},p=()=>y3.isFocused()&&(e.networkMode==="always"||O1.isOnline())&&e.canRun(),m=()=>VR(e.networkMode)&&e.canRun(),x=y=>{l()||(r==null||r(),s="resolved",i(y))},S=y=>{l()||(r==null||r(),s="rejected",o(y))},b=()=>new Promise(y=>{var w;r=C=>{(l()||p())&&y(C)},(w=e.onPause)==null||w.call(e)}).then(()=>{var y;r=void 0,l()||(y=e.onContinue)==null||y.call(e)}),v=()=>{if(l())return;let y;const w=t===0?e.initialPromise:void 0;try{y=w??e.fn()}catch(C){y=Promise.reject(C)}Promise.resolve(y).then(x).catch(C=>{var R;if(l())return;const N=e.retry??(b3()?0:3),E=e.retryDelay??PU,j=typeof E=="function"?E(t,C):E,z=N===!0||typeof N=="number"&&tp()?void 0:b()).then(()=>{n?S(C):v()})})};return{promise:a,status:()=>s,cancel:u,continue:()=>(r==null||r(),a),cancelRetry:_,continueRetry:f,canStart:m,start:()=>(m()?v():b().then(v),a)}}var _f,DR,QR=(DR=class{constructor(){nt(this,_f)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),UR(this.gcTime)&&Fe(this,_f,cf.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(b3()?1/0:3e5))}clearGcTimeout(){fe(this,_f)!==void 0&&(cf.clearTimeout(fe(this,_f)),Fe(this,_f,void 0))}},_f=new WeakMap,DR);function HU(e){return{onFetch:(n,t)=>{var _,f,p,m,x;const r=n.options,s=(p=(f=(_=n.fetchOptions)==null?void 0:_.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,i=((m=n.state.data)==null?void 0:m.pages)||[],o=((x=n.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let S=!1;const b=w=>{DU(w,()=>n.signal,()=>S=!0)},v=WR(n.options,n.fetchOptions),y=async(w,C,N)=>{if(S)return Promise.reject(n.signal.reason);if(C==null&&w.pages.length)return Promise.resolve(w);const j=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return b(I),I})(),z=await v(j),{maxPages:R}=n.options,O=N?MU:RU;return{pages:O(w.pages,z,R),pageParams:O(w.pageParams,C,R)}};if(s&&i.length){const w=s==="backward",C=w?qU:H8,N={pages:i,pageParams:o};a=await y(N,C(r,N),w)}else{const w=e??i.length;do{const C=l===0?o[0]??r.initialPageParam:H8(r,a);if(l>0&&C==null)break;a=await y(a,C),l++}while(l{var S,b;return(b=(S=n.options).persister)==null?void 0:b.call(S,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function H8(e,{pages:n,pageParams:t}){const r=n.length-1;return n.length>0?e.getNextPageParam(n[r],n,t[r],t):void 0}function qU(e,{pages:n,pageParams:t}){var r;return n.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,n[0],n,t[0],t):void 0}var gh,pf,vh,ba,mf,fs,Cp,gf,Ha,El,LR,UU=(LR=class extends QR{constructor(n){super();nt(this,Ha);nt(this,gh);nt(this,pf);nt(this,vh);nt(this,ba);nt(this,mf);nt(this,fs);nt(this,Cp);nt(this,gf);Fe(this,gf,!1),Fe(this,Cp,n.defaultOptions),this.setOptions(n.options),this.observers=[],Fe(this,mf,n.client),Fe(this,ba,fe(this,mf).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Fe(this,pf,U8(this.options)),this.state=n.state??fe(this,pf),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return fe(this,gh)}get promise(){var n;return(n=fe(this,fs))==null?void 0:n.promise}setOptions(n){if(this.options={...fe(this,Cp),...n},n!=null&&n._type&&Fe(this,gh,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=U8(this.options);t.data!==void 0&&(this.setState(q8(t.data,t.dataUpdatedAt)),Fe(this,pf,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&fe(this,ba).remove(this)}setData(n,t){const r=Hw(this.state.data,n,this.options);return Mt(this,Ha,El).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Mt(this,Ha,El).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=fe(this,fs))==null?void 0:r.promise;return(s=fe(this,fs))==null||s.cancel(n),t?t.then(Fs).catch(Fs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return fe(this,pf)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Lr(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===g3||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Lr(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!GR(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=fe(this,fs))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=fe(this,fs))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),fe(this,ba).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){const t=this.observers.indexOf(n);t!==-1&&(this.observers.splice(t,1),this.observers.length||(fe(this,fs)&&(fe(this,gf)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?fe(this,fs).cancel({revert:!0}):fe(this,fs).cancelRetry()),this.scheduleGc()),fe(this,ba).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Mt(this,Ha,El).call(this,{type:"invalidate"})}async fetch(n,t){var u,_,f,p,m,x,S,b,v,y,w,C;if(this.state.fetchStatus!=="idle"&&((u=fe(this,fs))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(fe(this,fs))return fe(this,fs).continueRetry(),fe(this,fs).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(E=>E.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Fe(this,gf,!0),r.signal)})},i=()=>{const N=WR(this.options,t),j=(()=>{const z={client:fe(this,mf),queryKey:this.queryKey,meta:this.meta};return s(z),z})();return Fe(this,gf,!1),this.options.persister?this.options.persister(N,j,this):N(j)},a=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:fe(this,mf),state:this.state,fetchFn:i};return s(N),N})();(_=fe(this,gh)==="infinite"?HU(this.options.pages):this.options.behavior)==null||_.onFetch(a,this),Fe(this,vh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=a.fetchOptions)==null?void 0:f.meta))&&Mt(this,Ha,El).call(this,{type:"fetch",meta:(p=a.fetchOptions)==null?void 0:p.meta});const l=Fe(this,fs,KR({initialPromise:t==null?void 0:t.initialPromise,fn:a.fetchFn,onCancel:N=>{N instanceof I1&&N.revert&&this.setState({...fe(this,vh),fetchStatus:"idle"}),r.abort()},onFail:(N,E)=>{Mt(this,Ha,El).call(this,{type:"failed",failureCount:N,error:E})},onPause:()=>{Mt(this,Ha,El).call(this,{type:"pause"})},onContinue:()=>{Mt(this,Ha,El).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const N=await l.start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(x=(m=fe(this,ba).config).onSuccess)==null||x.call(m,N,this),(b=(S=fe(this,ba).config).onSettled)==null||b.call(S,N,this.state.error,this),N}catch(N){if(N instanceof I1){if(N.silent)return fe(this,fs).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Mt(this,Ha,El).call(this,{type:"error",error:N}),(y=(v=fe(this,ba).config).onError)==null||y.call(v,N,this),(C=(w=fe(this,ba).config).onSettled)==null||C.call(w,this.state.data,N,this),N}finally{fe(this,fs)===l&&Fe(this,fs,void 0),this.scheduleGc()}}},gh=new WeakMap,pf=new WeakMap,vh=new WeakMap,ba=new WeakMap,mf=new WeakMap,fs=new WeakMap,Cp=new WeakMap,gf=new WeakMap,Ha=new WeakSet,El=function(n){const t=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...YR(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...q8(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Fe(this,vh,n.manual?s:void 0),s;case"error":const i=n.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=t(this.state),kr.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),fe(this,ba).notify({query:this,type:"updated",action:n})})},LR);function YR(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:VR(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function q8(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function U8(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,t=n!==void 0,r=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Xs,yn,Ep,Zs,vf,bh,jl,Np,yh,xh,bf,yf,Yc,wh,On,g0,qw,Uw,Gw,Ww,Vw,Kw,Qw,Yw,OR,x3=(OR=class extends Uf{constructor(n,t){super();nt(this,On);nt(this,Xs);nt(this,yn);nt(this,Ep);nt(this,Zs);nt(this,vf);nt(this,bh);nt(this,jl);nt(this,Np);nt(this,yh);nt(this,xh);nt(this,bf);nt(this,yf);nt(this,Yc);nt(this,wh,new Set);this.options=t,Fe(this,Xs,n),Fe(this,jl,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(fe(this,yn).addObserver(this),G8(fe(this,yn),this.options)?Mt(this,On,g0).call(this):this.updateResult(),Mt(this,On,Vw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xw(fe(this,yn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xw(fe(this,yn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Mt(this,On,Kw).call(this),Mt(this,On,Qw).call(this),fe(this,yn).removeObserver(this)}setOptions(n){const t=this.options,r=fe(this,yn);if(this.options=fe(this,Xs).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Lr(this.options.enabled,fe(this,yn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Mt(this,On,Yw).call(this),fe(this,yn).setOptions(this.options),t._defaulted&&!C0(this.options,t)&&fe(this,Xs).getQueryCache().notify({type:"observerOptionsUpdated",query:fe(this,yn),observer:this});const s=this.hasListeners();s&&W8(fe(this,yn),r,this.options,t)&&Mt(this,On,g0).call(this),this.updateResult(),s&&(fe(this,yn)!==r||Lr(this.options.enabled,fe(this,yn))!==Lr(t.enabled,fe(this,yn))||Lr(this.options.staleTime,fe(this,yn))!==Lr(t.staleTime,fe(this,yn)))&&Mt(this,On,Uw).call(this);const i=Mt(this,On,Gw).call(this);s&&(fe(this,yn)!==r||Lr(this.options.enabled,fe(this,yn))!==Lr(t.enabled,fe(this,yn))||i!==fe(this,Yc))&&Mt(this,On,Ww).call(this,i)}getOptimisticResult(n){const t=fe(this,Xs).getQueryCache().build(fe(this,Xs),n),r=this.createResult(t,n);return C0(this.getCurrentResult(),r)||(Fe(this,Zs,r),Fe(this,bh,this.options),Fe(this,vf,fe(this,yn).state)),r}getCurrentResult(){return fe(this,Zs)}trackResult(n,t){return new Proxy(n,{get:(r,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(r,s))})}trackProp(n){fe(this,wh).add(n)}getCurrentQuery(){return fe(this,yn)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=fe(this,Xs).defaultQueryOptions(n),r=fe(this,Xs).getQueryCache().build(fe(this,Xs),t);let s=()=>{},i;const o=new Promise(a=>{i=a,s=fe(this,Xs).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===r.queryHash&&r.state.data!==void 0&&(s(),a(this.createResult(r,t)))})});return Promise.race([r.fetch().then(()=>{const a=this.createResult(r,t);return i==null||i(a),a}).finally(()=>{s()}),o])}fetch(n){return Mt(this,On,g0).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),fe(this,Zs)))}createResult(n,t){var E;const r=fe(this,yn),s=this.options,i=fe(this,Zs),o=fe(this,vf),a=fe(this,bh),l=n!==r?n.state:fe(this,Ep),{state:u}=n;let _={...u},f=!1,p;if(t._optimisticResults){const j=this.hasListeners(),z=!j&&G8(n,t),R=j&&W8(n,r,t,s);(z||R)&&(_={..._,...YR(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(_.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:S}=_;p=_.data;let b=!1;if(t.placeholderData!==void 0&&p===void 0&&S==="pending"){let j;i!=null&&i.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData)?(j=i.data,b=!0):j=typeof t.placeholderData=="function"?t.placeholderData((E=fe(this,xh))==null?void 0:E.state.data,fe(this,xh)):t.placeholderData,j!==void 0&&(S="success",p=Hw(i==null?void 0:i.data,j,t),f=!0)}if(t.select&&p!==void 0&&!b)if(i&&p===(o==null?void 0:o.data)&&t.select===fe(this,Np))p=fe(this,yh);else try{Fe(this,Np,t.select),p=t.select(p),p=Hw(i==null?void 0:i.data,p,t),Fe(this,yh,p),Fe(this,jl,null)}catch(j){Fe(this,jl,j)}else p===void 0&&Fe(this,jl,null);fe(this,jl)&&(m=fe(this,jl),p=fe(this,yh),x=Date.now(),S="error",f=!1);const v=_.fetchStatus==="fetching",y=S==="pending",w=S==="error",C=y&&v,N=p!==void 0;return{status:S,fetchStatus:_.fetchStatus,isPending:y,isSuccess:S==="success",isError:w,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:_.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:_.fetchFailureCount,failureReason:_.fetchFailureReason,errorUpdateCount:_.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:_.dataUpdateCount>l.dataUpdateCount||_.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!y,isLoadingError:w&&!N,isPaused:_.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&N,isStale:w3(n,t),refetch:this.refetch,isEnabled:Lr(t.enabled,n)!==!1}}updateResult(){const n=fe(this,Zs),t=this.createResult(fe(this,yn),this.options);if(Fe(this,vf,fe(this,yn).state),Fe(this,bh,this.options),fe(this,vf).data!==void 0&&Fe(this,xh,fe(this,yn)),C0(t,n))return;Fe(this,Zs,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!fe(this,wh).size)return!0;const a=new Set(o??fe(this,wh));return this.options.throwOnError&&a.add("error"),Object.keys(fe(this,Zs)).some(l=>{const u=l;return fe(this,Zs)[u]!==n[u]&&a.has(u)})})();kr.batch(()=>{s&&this.listeners.forEach(i=>{i(fe(this,Zs))}),fe(this,Xs).getQueryCache().notify({query:fe(this,yn),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Mt(this,On,Vw).call(this)}},Xs=new WeakMap,yn=new WeakMap,Ep=new WeakMap,Zs=new WeakMap,vf=new WeakMap,bh=new WeakMap,jl=new WeakMap,Np=new WeakMap,yh=new WeakMap,xh=new WeakMap,bf=new WeakMap,yf=new WeakMap,Yc=new WeakMap,wh=new WeakMap,On=new WeakSet,g0=function(n){Mt(this,On,Yw).call(this);let t=fe(this,yn).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(Fs)),t},qw=function(n){return!b3()&&Lr(this.options.enabled,fe(this,yn))!==!1&&UR(n)},Uw=function(){Mt(this,On,Kw).call(this);const n=Lr(this.options.staleTime,fe(this,yn));if(fe(this,Zs).isStale||!Mt(this,On,qw).call(this,n))return;const t=GR(fe(this,Zs).dataUpdatedAt,n)+1;Fe(this,bf,cf.setTimeout(()=>{fe(this,Zs).isStale||this.updateResult()},t))},Gw=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(fe(this,yn)):this.options.refetchInterval)??!1},Ww=function(n){Mt(this,On,Qw).call(this),Fe(this,Yc,n),!(fe(this,Yc)===0||!Mt(this,On,qw).call(this,fe(this,Yc)))&&Fe(this,yf,cf.setInterval(()=>{(this.options.refetchIntervalInBackground||y3.isFocused())&&Mt(this,On,g0).call(this)},fe(this,Yc)))},Vw=function(){Mt(this,On,Uw).call(this),Mt(this,On,Ww).call(this,Mt(this,On,Gw).call(this))},Kw=function(){fe(this,bf)!==void 0&&(cf.clearTimeout(fe(this,bf)),Fe(this,bf,void 0))},Qw=function(){fe(this,yf)!==void 0&&(cf.clearInterval(fe(this,yf)),Fe(this,yf,void 0))},Yw=function(){const n=fe(this,Xs).getQueryCache().build(fe(this,Xs),this.options);if(n===fe(this,yn))return;const t=fe(this,yn);Fe(this,yn,n),Fe(this,Ep,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},OR);function GU(e,n){return Lr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Lr(n.retryOnMount,e)===!1)}function G8(e,n){return GU(e,n)||e.state.data!==void 0&&Xw(e,n,n.refetchOnMount)}function Xw(e,n,t){if(Lr(n.enabled,e)!==!1&&Lr(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&w3(e,n)}return!1}function W8(e,n,t,r){return(e!==n||Lr(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&w3(e,t)}function w3(e,n){return Lr(n.enabled,e)!==!1&&e.isStaleByTime(Lr(n.staleTime,e))}var zp,ko,Bs,xf,Co,qc,IR,WU=(IR=class extends QR{constructor(n){super();nt(this,Co);nt(this,zp);nt(this,ko);nt(this,Bs);nt(this,xf);Fe(this,zp,n.client),this.mutationId=n.mutationId,Fe(this,Bs,n.mutationCache),Fe(this,ko,[]),this.state=n.state||XR(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){fe(this,ko).includes(n)||(fe(this,ko).push(n),this.clearGcTimeout(),fe(this,Bs).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Fe(this,ko,fe(this,ko).filter(t=>t!==n)),this.scheduleGc(),fe(this,Bs).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){fe(this,ko).length||(this.state.status==="pending"?this.scheduleGc():fe(this,Bs).remove(this))}continue(){var n;return((n=fe(this,xf))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var a,l,u,_,f,p,m,x,S,b,v,y,w,C,N,E,j,z;const t=()=>{Mt(this,Co,qc).call(this,{type:"continue"})},r={client:fe(this,zp),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Fe(this,xf,KR({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,O)=>{Mt(this,Co,qc).call(this,{type:"failed",failureCount:R,error:O})},onPause:()=>{Mt(this,Co,qc).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>fe(this,Bs).canRun(this)})),i=this.state.status==="pending",o=!s.canStart();try{if(i)t();else{Mt(this,Co,qc).call(this,{type:"pending",variables:n,isPaused:o}),fe(this,Bs).config.onMutate&&await fe(this,Bs).config.onMutate(n,this,r);const O=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,n,r));O!==this.state.context&&Mt(this,Co,qc).call(this,{type:"pending",context:O,variables:n,isPaused:o})}const R=await s.start();return await((_=(u=fe(this,Bs).config).onSuccess)==null?void 0:_.call(u,R,n,this.state.context,this,r)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,R,n,this.state.context,r)),await((x=(m=fe(this,Bs).config).onSettled)==null?void 0:x.call(m,R,null,this.state.variables,this.state.context,this,r)),await((b=(S=this.options).onSettled)==null?void 0:b.call(S,R,null,n,this.state.context,r)),Mt(this,Co,qc).call(this,{type:"success",data:R}),R}catch(R){try{await((y=(v=fe(this,Bs).config).onError)==null?void 0:y.call(v,R,n,this.state.context,this,r))}catch(O){Promise.reject(O)}try{await((C=(w=this.options).onError)==null?void 0:C.call(w,R,n,this.state.context,r))}catch(O){Promise.reject(O)}try{await((E=(N=fe(this,Bs).config).onSettled)==null?void 0:E.call(N,void 0,R,this.state.variables,this.state.context,this,r))}catch(O){Promise.reject(O)}try{await((z=(j=this.options).onSettled)==null?void 0:z.call(j,void 0,R,n,this.state.context,r))}catch(O){Promise.reject(O)}throw Mt(this,Co,qc).call(this,{type:"error",error:R}),R}finally{fe(this,xf)===s&&Fe(this,xf,void 0),fe(this,Bs).runNext(this)}}},zp=new WeakMap,ko=new WeakMap,Bs=new WeakMap,xf=new WeakMap,Co=new WeakSet,qc=function(n){const t=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=t(this.state),kr.batch(()=>{fe(this,ko).forEach(r=>{r.onMutationUpdate(n)}),fe(this,Bs).notify({mutation:this,type:"updated",action:n})})},IR);function XR(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Al,qa,Tp,BR,VU=(BR=class extends Uf{constructor(n={}){super();nt(this,Al);nt(this,qa);nt(this,Tp);this.config=n,Fe(this,Al,new Set),Fe(this,qa,new Map),Fe(this,Tp,0)}build(n,t,r){const s=new WU({client:n,mutationCache:this,mutationId:++X_(this,Tp)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){fe(this,Al).add(n);const t=mg(n);if(typeof t=="string"){const r=fe(this,qa).get(t);r?r.push(n):fe(this,qa).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(fe(this,Al).delete(n)){const t=mg(n);if(typeof t=="string"){const r=fe(this,qa).get(t);if(r)if(r.length>1){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}else r[0]===n&&fe(this,qa).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=mg(n);if(typeof t=="string"){const s=(r=fe(this,qa).get(t))==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===n}else return!0}runNext(n){var r,s;const t=mg(n);return typeof t=="string"?((s=(r=fe(this,qa).get(t))==null?void 0:r.find(i=>i!==n&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){kr.batch(()=>{fe(this,Al).forEach(n=>{this.notify({type:"removed",mutation:n})}),fe(this,Al).clear(),fe(this,qa).clear()})}getAll(){return Array.from(fe(this,Al))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>$8(t,r))}findAll(n={}){return this.getAll().filter(t=>$8(n,t))}notify(n){kr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return kr.batch(()=>Promise.all(n.map(t=>t.continue().catch(Fs))))}},Al=new WeakMap,qa=new WeakMap,Tp=new WeakMap,BR);function mg(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Rl,Xc,$s,Ml,jo,v0,Zw,$R,KU=($R=class extends Uf{constructor(t,r){super();nt(this,jo);nt(this,Rl);nt(this,Xc);nt(this,$s);nt(this,Ml);Fe(this,Rl,t),this.setOptions(r),this.bindMethods(),Mt(this,jo,v0).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const r=this.options;this.options=fe(this,Rl).defaultMutationOptions(t),C0(this.options,r)||fe(this,Rl).getMutationCache().notify({type:"observerOptionsUpdated",mutation:fe(this,$s),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Mf(r.mutationKey)!==Mf(this.options.mutationKey)?this.reset():((s=fe(this,$s))==null?void 0:s.state.status)==="pending"&&fe(this,$s).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&fe(this,$s)&&(fe(this,$s).addObserver(this),Mt(this,jo,v0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=fe(this,$s))==null||t.removeObserver(this)}onMutationUpdate(t){Mt(this,jo,v0).call(this),Mt(this,jo,Zw).call(this,t)}getCurrentResult(){return fe(this,Xc)}reset(){var t;(t=fe(this,$s))==null||t.removeObserver(this),Fe(this,$s,void 0),Mt(this,jo,v0).call(this),Mt(this,jo,Zw).call(this)}mutate(t,r){var s;return Fe(this,Ml,r),(s=fe(this,$s))==null||s.removeObserver(this),Fe(this,$s,fe(this,Rl).getMutationCache().build(fe(this,Rl),this.options)),fe(this,$s).addObserver(this),fe(this,$s).execute(t)}},Rl=new WeakMap,Xc=new WeakMap,$s=new WeakMap,Ml=new WeakMap,jo=new WeakSet,v0=function(){var r;const t=((r=fe(this,$s))==null?void 0:r.state)??XR();Fe(this,Xc,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Zw=function(t){kr.batch(()=>{var r,s,i,o,a,l,u,_;if(fe(this,Ml)&&this.hasListeners()){const f=fe(this,Xc).variables,p=fe(this,Xc).context,m={client:fe(this,Rl),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=fe(this,Ml)).onSuccess)==null||s.call(r,t.data,f,p,m)}catch(x){Promise.reject(x)}try{(o=(i=fe(this,Ml)).onSettled)==null||o.call(i,t.data,null,f,p,m)}catch(x){Promise.reject(x)}}else if((t==null?void 0:t.type)==="error"){try{(l=(a=fe(this,Ml)).onError)==null||l.call(a,t.error,f,p,m)}catch(x){Promise.reject(x)}try{(_=(u=fe(this,Ml)).onSettled)==null||_.call(u,void 0,t.error,f,p,m)}catch(x){Promise.reject(x)}}}this.listeners.forEach(f=>{f(fe(this,Xc))})})},$R);function V8(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var Sh,Js,kh,wf,Bi,Sf,jp,Ap,Rp,Mp,_s,Jw,e4,ZR,t4,n4,r4,PR,QU=(PR=class extends Uf{constructor(n,t,r){super();nt(this,_s);nt(this,Sh);nt(this,Js);nt(this,kh);nt(this,wf);nt(this,Bi);nt(this,Sf);nt(this,jp);nt(this,Ap);nt(this,Rp);nt(this,Mp,[]);Fe(this,Sh,n),Fe(this,wf,r),Fe(this,kh,[]),Fe(this,Bi,[]),Fe(this,Js,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&fe(this,Bi).forEach(n=>{n.subscribe(t=>{Mt(this,_s,n4).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,fe(this,Bi).forEach(n=>{n.destroy()})}setQueries(n,t){Fe(this,kh,n),Fe(this,wf,t),kr.batch(()=>{const r=fe(this,Bi),s=Mt(this,_s,t4).call(this,fe(this,kh));s.forEach(f=>f.observer.setOptions(f.defaultedQueryOptions));const i=s.map(f=>f.observer),o=i.map(f=>f.getCurrentResult()),a=r.length!==i.length,l=i.some((f,p)=>f!==r[p]),u=a||l,_=u?!0:o.some((f,p)=>{const m=fe(this,Js)[p];return!m||!C0(f,m)});!u&&!_||(u&&(Fe(this,Mp,s),Fe(this,Bi,i)),Fe(this,Js,o),this.hasListeners()&&(u&&(V8(r,i).forEach(f=>{f.destroy()}),V8(i,r).forEach(f=>{f.subscribe(p=>{Mt(this,_s,n4).call(this,f,p)})})),Mt(this,_s,r4).call(this)))})}getCurrentResult(){return fe(this,Js)}getQueries(){return fe(this,Bi).map(n=>n.getCurrentQuery())}getObservers(){return fe(this,Bi)}getOptimisticResult(n,t){const r=Mt(this,_s,t4).call(this,n),s=r.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),i=r.map(o=>o.defaultedQueryOptions.queryHash);return[s,o=>Mt(this,_s,e4).call(this,o??s,t,i),()=>Mt(this,_s,Jw).call(this,s,r)]}},Sh=new WeakMap,Js=new WeakMap,kh=new WeakMap,wf=new WeakMap,Bi=new WeakMap,Sf=new WeakMap,jp=new WeakMap,Ap=new WeakMap,Rp=new WeakMap,Mp=new WeakMap,_s=new WeakSet,Jw=function(n,t){const r=new Set;return t.map((s,i)=>{const o=n[i];return s.defaultedQueryOptions.notifyOnChangeProps?o:s.observer.trackResult(o,a=>{r.has(a)||(r.add(a),t.forEach(l=>{l.observer.trackProp(a)}))})})},e4=function(n,t,r){if(t){const s=fe(this,Rp),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((o,a)=>o!==s[a]));return(fe(this,Js)!==fe(this,Ap)||i||t!==fe(this,jp))&&(Fe(this,jp,t),Fe(this,Ap,fe(this,Js)),r!==void 0&&Fe(this,Rp,r),Fe(this,Sf,m3(fe(this,Sf),t(n)))),fe(this,Sf)}return n},ZR=function(){var n;return!((n=fe(this,wf))!=null&&n.combine)||fe(this,Bi).some((t,r)=>{var s;return t.options.suspense&&((s=fe(this,Js)[r])==null?void 0:s.data)===void 0})},t4=function(n){const t=new Map;fe(this,Bi).forEach(s=>{const i=s.options.queryHash;if(!i)return;const o=t.get(i);o?o.push(s):t.set(i,[s])});const r=[];return n.forEach(s=>{var a;const i=fe(this,Sh).defaultQueryOptions(s),o=((a=t.get(i.queryHash))==null?void 0:a.shift())??new x3(fe(this,Sh),i);r.push({defaultedQueryOptions:i,observer:o})}),r},n4=function(n,t){const r=fe(this,Bi).indexOf(n);r!==-1&&(Fe(this,Js,fe(this,Js).slice()),fe(this,Js)[r]=t,Mt(this,_s,r4).call(this))},r4=function(){var n;if(this.hasListeners()){const t=Mt(this,_s,ZR).call(this),r=fe(this,Sf),s=t?r:Mt(this,_s,e4).call(this,Mt(this,_s,Jw).call(this,fe(this,Js),fe(this,Mp)),(n=fe(this,wf))==null?void 0:n.combine);(t||r!==s)&&kr.batch(()=>{this.listeners.forEach(i=>{i(fe(this,Js))})})}},PR),Eo,FR,YU=(FR=class extends Uf{constructor(n={}){super();nt(this,Eo);this.config=n,Fe(this,Eo,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??p3(s,t);let o=this.get(i);return o||(o=new UU({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(o)),o}add(n){fe(this,Eo).has(n.queryHash)||(fe(this,Eo).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=fe(this,Eo).get(n.queryHash);t&&(n.destroy(),t===n&&fe(this,Eo).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){kr.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return fe(this,Eo).get(n)}getAll(){return[...fe(this,Eo).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>B8(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>B8(n,r)):t}notify(n){kr.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){kr.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){kr.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Eo=new WeakMap,FR),wr,Zc,Jc,Ch,Eh,eu,Nh,zh,HR,XU=(HR=class{constructor(e={}){nt(this,wr);nt(this,Zc);nt(this,Jc);nt(this,Ch);nt(this,Eh);nt(this,eu);nt(this,Nh);nt(this,zh);Fe(this,wr,e.queryCache||new YU),Fe(this,Zc,e.mutationCache||new VU),Fe(this,Jc,e.defaultOptions||{}),Fe(this,Ch,new Map),Fe(this,Eh,new Map),Fe(this,eu,0)}mount(){X_(this,eu)._++,fe(this,eu)===1&&(Fe(this,Nh,y3.subscribe(async e=>{e&&(await this.resumePausedMutations(),fe(this,wr).onFocus())})),Fe(this,zh,O1.subscribe(async e=>{e&&(await this.resumePausedMutations(),fe(this,wr).onOnline())})))}unmount(){var e,n;X_(this,eu)._--,fe(this,eu)===0&&((e=fe(this,Nh))==null||e.call(this),Fe(this,Nh,void 0),(n=fe(this,zh))==null||n.call(this),Fe(this,zh,void 0))}isFetching(e){return fe(this,wr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return fe(this,Zc).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=fe(this,wr).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=fe(this,wr).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Lr(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return fe(this,wr).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var o;const r=this.defaultQueryOptions({queryKey:e}),s=(o=fe(this,wr).get(r.queryHash))==null?void 0:o.state.data,i=TU(n,s);if(i!==void 0)return fe(this,wr).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return kr.batch(()=>fe(this,wr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=fe(this,wr).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=fe(this,wr);kr.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=fe(this,wr);return kr.batch(()=>{const r=t.findAll(e),s=new Set(r);return r.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>s.has(i)},n)})}cancelQueries(e,n={}){const t={revert:!0,...n},r=kr.batch(()=>fe(this,wr).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(Fs).catch(Fs)}invalidateQueries(e,n={}){return kr.batch(()=>(fe(this,wr).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const t={...n,cancelRefetch:n.cancelRefetch??!0},r=kr.batch(()=>fe(this,wr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(Fs)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Fs)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=fe(this,wr).build(this,n),r=t.isStaleByTime(Lr(n.staleTime,t))?await t.fetch(n):t.state.data,s=n.select;return s?s(r):r}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=fe(this,wr).build(this,n);return t.isStaleByTime(Lr(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Fs).catch(Fs)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Fs).catch(Fs)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return O1.isOnline()?fe(this,Zc).resumePausedMutations():Promise.resolve()}getQueryCache(){return fe(this,wr)}getMutationCache(){return fe(this,Zc)}getDefaultOptions(){return fe(this,Jc)}setDefaultOptions(e){Fe(this,Jc,e)}setQueryDefaults(e,n){fe(this,Ch).set(Mf(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...fe(this,Ch).values()],t={};return n.forEach(r=>{Rh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){fe(this,Eh).set(Mf(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...fe(this,Eh).values()],t={};return n.forEach(r=>{Rh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...fe(this,Jc).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=p3(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===g3&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...fe(this,Jc).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){fe(this,wr).clear(),fe(this,Zc).clear()}},wr=new WeakMap,Zc=new WeakMap,Jc=new WeakMap,Ch=new WeakMap,Eh=new WeakMap,eu=new WeakMap,Nh=new WeakMap,zh=new WeakMap,HR);const JR=M.createContext(!1),eM=()=>M.useContext(JR);JR.Provider;function ZU(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const JU=M.createContext(ZU()),tM=()=>M.useContext(JU),nM=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?v3(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},rM=e=>{M.useEffect(()=>{e.clearReset()},[e])},sM=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||v3(t,[e.error,r])),iM=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>t(r(...s)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},s4=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,aM=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function eG({queries:e,...n},t){const r=$v(),s=eM(),i=tM(),o=n.subscribed!==!1,a=M.useMemo(()=>e.map(S=>{const b=r.defaultQueryOptions(S);return b._optimisticResults=s?"isRestoring":o?"optimistic":void 0,b}),[e,r,s,o]);a.forEach(S=>{iM(S);const b=r.getQueryCache().get(S.queryHash);nM(S,i,b)}),rM(i);const[l]=M.useState(()=>new QU(r,a,n)),[u,_,f]=l.getOptimisticResult(a,n.combine),p=!s&&o;M.useSyncExternalStore(M.useCallback(S=>p?l.subscribe(kr.batchCalls(S)):Fs,[l,p]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),M.useEffect(()=>{l.setQueries(a,n)},[a,n,l]);const m=u.some((S,b)=>s4(a[b],S))?u.flatMap((S,b)=>{const v=a[b];if(v&&s4(v,S)){const y=new x3(r,v);return aM(v,y,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const x=u.find((S,b)=>{const v=a[b];return v&&sM({result:S,errorResetBoundary:i,throwOnError:v.throwOnError,query:r.getQueryCache().get(v.queryHash),suspense:v.suspense})});if(x)throw x.error;return _(f())}function tG(e,n,t){const r=eM(),s=tM(),i=$v(),o=i.defaultQueryOptions(e),a=i.getQueryCache().get(o.queryHash),l=e.subscribed!==!1;o._optimisticResults=r?"isRestoring":l?"optimistic":void 0,iM(o),nM(o,s,a),rM(s);const[u]=M.useState(()=>new n(i,o)),_=u.getOptimisticResult(o),f=!r&&l;if(M.useSyncExternalStore(M.useCallback(p=>{const m=f?u.subscribe(kr.batchCalls(p)):Fs;return u.updateResult(),m},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),M.useEffect(()=>{u.setOptions(o)},[o,u]),s4(o,_))throw aM(o,u,s);if(sM({result:_,errorResetBoundary:s,throwOnError:o.throwOnError,query:a,suspense:o.suspense}))throw _.error;return o.notifyOnChangeProps?_:u.trackResult(_)}function ht(e,n){return tG(e,x3)}function nG(e,n){const t=$v(),r=t.getQueryCache();return M.useSyncExternalStore(M.useCallback(s=>r.subscribe(kr.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function Cn(e,n){const t=$v(),[r]=M.useState(()=>new KU(t,e));M.useEffect(()=>{r.setOptions(e)},[r,e]);const s=M.useSyncExternalStore(M.useCallback(o=>r.subscribe(kr.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=M.useCallback((...o)=>{r.mutate(o[0],o[1]).catch(Fs)},[r]);if(s.error&&v3(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const Je=new XU({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),cu=new Set;let K8=null,Pv=0;const i4=new Set,rG=()=>Pv,Q8=e=>(i4.add(e),()=>{i4.delete(e)}),Ca=()=>["workspace",Pv],Et=(e,...n)=>[...Ca(),e,...n];function sG(e,n=!1){if(K8===e&&!n)return!1;const t=Ca();return K8=e,Pv++,cu.clear(),S3({queryKey:t}),i4.forEach(r=>r()),!0}const Mn=e=>e[1]===Pv;async function S3(e){await Je.cancelQueries(e,{revert:!1}),Je.removeQueries(e)}function Wr(e,n){if(Mn(e))return Je.setQueryData(e,n)}var Qx={exports:{}},J_={},Yx={exports:{}},Xx={};/** - * @license React - * scheduler.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Y8;function iG(){return Y8||(Y8=1,(function(e){function n(V,Z){var te=V.length;V.push(Z);e:for(;0>>1,L=V[P];if(0>>1;P<$;){var H=2*(P+1)-1,G=V[H],ne=H+1,oe=V[ne];if(0>s(G,te))nes(oe,G)?(V[P]=oe,V[ne]=te,P=ne):(V[P]=G,V[H]=te,P=H);else if(nes(oe,te))V[P]=oe,V[ne]=te,P=ne;else break e}}return Z}function s(V,Z){var te=V.sortIndex-Z.sortIndex;return te!==0?te:V.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],_=1,f=null,p=3,m=!1,x=!1,S=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function C(V){for(var Z=t(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=V)r(u),Z.sortIndex=Z.expirationTime,n(l,Z);else break;Z=t(u)}}function N(V){if(S=!1,C(V),!x)if(t(l)!==null)x=!0,E||(E=!0,F());else{var Z=t(u);Z!==null&&Y(N,Z.startTime-V)}}var E=!1,j=-1,z=5,R=-1;function O(){return b?!0:!(e.unstable_now()-RV&&O());){var P=f.callback;if(typeof P=="function"){f.callback=null,p=f.priorityLevel;var L=P(f.expirationTime<=V);if(V=e.unstable_now(),typeof L=="function"){f.callback=L,C(V),Z=!0;break t}f===t(l)&&r(l),C(V)}else r(l);f=t(l)}if(f!==null)Z=!0;else{var $=t(u);$!==null&&Y(N,$.startTime-V),Z=!1}}break e}finally{f=null,p=te,m=!1}Z=void 0}}finally{Z?F():E=!1}}}var F;if(typeof w=="function")F=function(){w(I)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,q=U.port2;U.port1.onmessage=I,F=function(){q.postMessage(null)}}else F=function(){v(I,0)};function Y(V,Z){j=v(function(){V(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125P?(V.sortIndex=te,n(u,V),t(l)===null&&V===t(u)&&(S?(y(j),j=-1):S=!0,Y(N,te-P))):(V.sortIndex=L,n(l,V),x||m||(x=!0,E||(E=!0,F()))),V},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(V){var Z=p;return function(){var te=p;p=Z;try{return V.apply(this,arguments)}finally{p=te}}}})(Xx)),Xx}var X8;function aG(){return X8||(X8=1,Yx.exports=iG()),Yx.exports}var Zx={exports:{}},Is={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Z8;function oG(){if(Z8)return Is;Z8=1;var e=Pp();function n(l){var u="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Zx.exports=oG(),Zx.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var e9;function lG(){if(e9)return J_;e9=1;var e=aG(),n=Pp(),t=oM();function r(c){var d="https://react.dev/errors/"+c;if(1L||(c.current=P[L],P[L]=null,L--)}function G(c,d){L++,P[L]=c.current,c.current=d}var ne=$(null),oe=$(null),le=$(null),se=$(null);function Q(c,d){switch(G(le,d),G(oe,c),G(ne,null),d.nodeType){case 9:case 11:c=(c=d.documentElement)&&(c=c.namespaceURI)?n8(c):0;break;default:if(c=d.tagName,d=d.namespaceURI)d=n8(d),c=r8(d,c);else switch(c){case"svg":c=1;break;case"math":c=2;break;default:c=0}}H(ne),G(ne,c)}function ce(){H(ne),H(oe),H(le)}function ee(c){c.memoizedState!==null&&G(se,c);var d=ne.current,g=r8(d,c.type);d!==g&&(G(oe,c),G(ne,g))}function ue(c){oe.current===c&&(H(ne),H(oe)),se.current===c&&(H(se),V_._currentValue=te)}var de,ye;function Ae(c){if(de===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);de=d&&d[1]||"",ye=-1)":-1A||me[k]!==Ee[A]){var Re=` -`+me[k].replace(" at new "," at ");return c.displayName&&Re.includes("")&&(Re=Re.replace("",c.displayName)),Re}while(1<=k&&0<=A);break}}}finally{Ve=!1,Error.prepareStackTrace=g}return(g=c?c.displayName||c.name:"")?Ae(g):""}function $e(c,d){switch(c.tag){case 26:case 27:case 5:return Ae(c.type);case 16:return Ae("Lazy");case 13:return c.child!==d&&d!==null?Ae("Suspense Fallback"):Ae("Suspense");case 19:return Ae("SuspenseList");case 0:case 15:return Ge(c.type,!1);case 11:return Ge(c.type.render,!1);case 1:return Ge(c.type,!0);case 31:return Ae("Activity");default:return""}}function ut(c){try{var d="",g=null;do d+=$e(c,g),g=c,c=c.return;while(c);return d}catch(k){return` -Error generating stack: `+k.message+` -`+k.stack}}var pt=Object.prototype.hasOwnProperty,Ut=e.unstable_scheduleCallback,It=e.unstable_cancelCallback,$t=e.unstable_shouldYield,tt=e.unstable_requestPaint,mt=e.unstable_now,At=e.unstable_getCurrentPriorityLevel,ke=e.unstable_ImmediatePriority,De=e.unstable_UserBlockingPriority,We=e.unstable_NormalPriority,rt=e.unstable_LowPriority,bt=e.unstable_IdlePriority,Wt=e.log,Pe=e.unstable_setDisableYieldValue,Dt=null,ln=null;function kn(c){if(typeof Wt=="function"&&Pe(c),ln&&typeof ln.setStrictMode=="function")try{ln.setStrictMode(Dt,c)}catch{}}var Jt=Math.clz32?Math.clz32:sn,Gn=Math.log,Gt=Math.LN2;function sn(c){return c>>>=0,c===0?32:31-(Gn(c)/Gt|0)|0}var Wn=256,Tn=262144,Er=4194304;function rr(c){var d=c&42;if(d!==0)return d;switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return c&261888;case 262144:case 524288:case 1048576:case 2097152:return c&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return c&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return c}}function Or(c,d,g){var k=c.pendingLanes;if(k===0)return 0;var A=0,D=c.suspendedLanes,K=c.pingedLanes;c=c.warmLanes;var re=k&134217727;return re!==0?(k=re&~D,k!==0?A=rr(k):(K&=re,K!==0?A=rr(K):g||(g=re&~c,g!==0&&(A=rr(g))))):(re=k&~D,re!==0?A=rr(re):K!==0?A=rr(K):g||(g=k&~c,g!==0&&(A=rr(g)))),A===0?0:d!==0&&d!==A&&(d&D)===0&&(D=A&-A,g=d&-d,D>=g||D===32&&(g&4194048)!==0)?d:A}function Nr(c,d){return(c.pendingLanes&~(c.suspendedLanes&~c.pingedLanes)&d)===0}function yt(c,d){switch(c){case 1:case 2:case 4:case 8:case 64:return d+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fn(){var c=Er;return Er<<=1,(Er&62914560)===0&&(Er=4194304),c}function wn(c){for(var d=[],g=0;31>g;g++)d.push(c);return d}function Xt(c,d){c.pendingLanes|=d,d!==268435456&&(c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0)}function ar(c,d,g,k,A,D){var K=c.pendingLanes;c.pendingLanes=g,c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0,c.expiredLanes&=g,c.entangledLanes&=g,c.errorRecoveryDisabledLanes&=g,c.shellSuspendCounter=0;var re=c.entanglements,me=c.expirationTimes,Ee=c.hiddenUpdates;for(g=K&~g;0"u")return null;try{return c.activeElement||c.body}catch{return c.body}}var $r=/[\n"\\]/g;function jt(c){return c.replace($r,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function Aa(c,d,g,k,A,D,K,re){c.name="",K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?c.type=K:c.removeAttribute("type"),d!=null?K==="number"?(d===0&&c.value===""||c.value!=d)&&(c.value=""+Xn(d)):c.value!==""+Xn(d)&&(c.value=""+Xn(d)):K!=="submit"&&K!=="reset"||c.removeAttribute("value"),d!=null?Vr(c,K,Xn(d)):g!=null?Vr(c,K,Xn(g)):k!=null&&c.removeAttribute("value"),A==null&&D!=null&&(c.defaultChecked=!!D),A!=null&&(c.checked=A&&typeof A!="function"&&typeof A!="symbol"),re!=null&&typeof re!="function"&&typeof re!="symbol"&&typeof re!="boolean"?c.name=""+Xn(re):c.removeAttribute("name")}function ta(c,d,g,k,A,D,K,re){if(D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(c.type=D),d!=null||g!=null){if(!(D!=="submit"&&D!=="reset"||d!=null)){or(c);return}g=g!=null?""+Xn(g):"",d=d!=null?""+Xn(d):g,re||d===c.value||(c.value=d),c.defaultValue=d}k=k??A,k=typeof k!="function"&&typeof k!="symbol"&&!!k,c.checked=re?c.checked:!!k,c.defaultChecked=!!k,K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"&&(c.name=K),or(c)}function Vr(c,d,g){d==="number"&&Br(c.ownerDocument)===c||c.defaultValue===""+g||(c.defaultValue=""+g)}function Rs(c,d,g,k){if(c=c.options,d){d={};for(var A=0;A"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zo=!1;if(Ni)try{var Ma={};Object.defineProperty(Ma,"passive",{get:function(){Zo=!0}}),window.addEventListener("test",Ma,Ma),window.removeEventListener("test",Ma,Ma)}catch{Zo=!1}var Vs=null,Jo=null,Hn=null;function Nu(){if(Hn)return Hn;var c,d=Jo,g=d.length,k,A="value"in Vs?Vs.value:Vs.textContent,D=A.length;for(c=0;c=Oa),uc=" ",ls=!1;function fc(c,d){switch(c){case"keyup":return co.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mu(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var Ia=!1;function uo(c,d){switch(c){case"compositionend":return Mu(d);case"keypress":return d.which!==32?null:(ls=!0,uc);case"textInput":return c=d.data,c===uc&&ls?null:c;default:return null}}function Du(c,d){if(Ia)return c==="compositionend"||!rl&&fc(c,d)?(c=Nu(),Hn=Jo=Vs=null,Ia=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:g,offset:d-c};c=k}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=la(g)}}function dc(c,d){return c&&d?c===d?!0:c&&c.nodeType===3?!1:d&&d.nodeType===3?dc(c,d.parentNode):"contains"in c?c.contains(d):c.compareDocumentPosition?!!(c.compareDocumentPosition(d)&16):!1:!1}function Ti(c){c=c!=null&&c.ownerDocument!=null&&c.ownerDocument.defaultView!=null?c.ownerDocument.defaultView:window;for(var d=Br(c.document);d instanceof c.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)c=d.contentWindow;else break;d=Br(c.document)}return d}function ld(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d&&(d==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||d==="textarea"||c.contentEditable==="true")}var hm=Ni&&"documentMode"in document&&11>=document.documentMode,il=null,cd=null,hc=null,ud=!1;function An(c,d,g){var k=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;ud||il==null||il!==Br(k)||(k=il,"selectionStart"in k&&ld(k)?k={start:k.selectionStart,end:k.selectionEnd}:(k=(k.ownerDocument&&k.ownerDocument.defaultView||window).getSelection(),k={anchorNode:k.anchorNode,anchorOffset:k.anchorOffset,focusNode:k.focusNode,focusOffset:k.focusOffset}),hc&&li(hc,k)||(hc=k,k=tg(cd,"onSelect"),0>=K,A-=K,ho=1<<32-Jt(d)+A|g<an?(vn=xt,xt=null):vn=xt.sibling;var zn=Ne(xe,xt,Se[an],Le);if(zn===null){xt===null&&(xt=vn);break}c&&xt&&zn.alternate===null&&d(xe,xt),ge=D(zn,ge,an),Nn===null?zt=zn:Nn.sibling=zn,Nn=zn,xt=vn}if(an===Se.length)return g(xe,xt),bn&&ol(xe,an),zt;if(xt===null){for(;anan?(vn=xt,xt=null):vn=xt.sibling;var Lc=Ne(xe,xt,zn.value,Le);if(Lc===null){xt===null&&(xt=vn);break}c&&xt&&Lc.alternate===null&&d(xe,xt),ge=D(Lc,ge,an),Nn===null?zt=Lc:Nn.sibling=Lc,Nn=Lc,xt=vn}if(zn.done)return g(xe,xt),bn&&ol(xe,an),zt;if(xt===null){for(;!zn.done;an++,zn=Se.next())zn=Ie(xe,zn.value,Le),zn!==null&&(ge=D(zn,ge,an),Nn===null?zt=zn:Nn.sibling=zn,Nn=zn);return bn&&ol(xe,an),zt}for(xt=k(xt);!zn.done;an++,zn=Se.next())zn=Te(xt,xe,an,zn.value,Le),zn!==null&&(c&&zn.alternate!==null&&xt.delete(zn.key===null?an:zn.key),ge=D(zn,ge,an),Nn===null?zt=zn:Nn.sibling=zn,Nn=zn);return c&&xt.forEach(function(vU){return d(xe,vU)}),bn&&ol(xe,an),zt}function Yn(xe,ge,Se,Le){if(typeof Se=="object"&&Se!==null&&Se.type===S&&Se.key===null&&(Se=Se.props.children),typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case m:e:{for(var zt=Se.key;ge!==null;){if(ge.key===zt){if(zt=Se.type,zt===S){if(ge.tag===7){g(xe,ge.sibling),Le=A(ge,Se.props.children),Le.return=xe,xe=Le;break e}}else if(ge.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===z&&Hu(zt)===ge.type){g(xe,ge.sibling),Le=A(ge,Se.props),k_(Le,Se),Le.return=xe,xe=Le;break e}g(xe,ge);break}else d(xe,ge);ge=ge.sibling}Se.type===S?(Le=Iu(Se.props.children,xe.mode,Le,Se.key),Le.return=xe,xe=Le):(Le=vm(Se.type,Se.key,Se.props,null,xe.mode,Le),k_(Le,Se),Le.return=xe,xe=Le)}return K(xe);case x:e:{for(zt=Se.key;ge!==null;){if(ge.key===zt)if(ge.tag===4&&ge.stateNode.containerInfo===Se.containerInfo&&ge.stateNode.implementation===Se.implementation){g(xe,ge.sibling),Le=A(ge,Se.children||[]),Le.return=xe,xe=Le;break e}else{g(xe,ge);break}else d(xe,ge);ge=ge.sibling}Le=uy(Se,xe.mode,Le),Le.return=xe,xe=Le}return K(xe);case z:return Se=Hu(Se),Yn(xe,ge,Se,Le)}if(Y(Se))return _t(xe,ge,Se,Le);if(F(Se)){if(zt=F(Se),typeof zt!="function")throw Error(r(150));return Se=zt.call(Se),Bt(xe,ge,Se,Le)}if(typeof Se.then=="function")return Yn(xe,ge,Cm(Se),Le);if(Se.$$typeof===w)return Yn(xe,ge,xm(xe,Se),Le);Em(xe,Se)}return typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint"?(Se=""+Se,ge!==null&&ge.tag===6?(g(xe,ge.sibling),Le=A(ge,Se),Le.return=xe,xe=Le):(g(xe,ge),Le=cy(Se,xe.mode,Le),Le.return=xe,xe=Le),K(xe)):g(xe,ge)}return function(xe,ge,Se,Le){try{S_=0;var zt=Yn(xe,ge,Se,Le);return yd=null,zt}catch(xt){if(xt===bd||xt===Sm)throw xt;var Nn=ji(29,xt,null,xe.mode);return Nn.lanes=Le,Nn.return=xe,Nn}finally{}}}var Uu=Vk(!0),Kk=Vk(!1),vc=!1;function wy(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sy(c,d){c=c.updateQueue,d.updateQueue===c&&(d.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,callbacks:null})}function bc(c){return{lane:c,tag:0,payload:null,callback:null,next:null}}function yc(c,d,g){var k=c.updateQueue;if(k===null)return null;if(k=k.shared,(Rn&2)!==0){var A=k.pending;return A===null?d.next=d:(d.next=A.next,A.next=d),k.pending=d,d=gm(c),Ak(c,null,g),d}return mm(c,k,d,g),gm(c)}function C_(c,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var k=d.lanes;k&=c.pendingLanes,g|=k,d.lanes=g,hn(c,g)}}function ky(c,d){var g=c.updateQueue,k=c.alternate;if(k!==null&&(k=k.updateQueue,g===k)){var A=null,D=null;if(g=g.firstBaseUpdate,g!==null){do{var K={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};D===null?A=D=K:D=D.next=K,g=g.next}while(g!==null);D===null?A=D=d:D=D.next=d}else A=D=d;g={baseState:k.baseState,firstBaseUpdate:A,lastBaseUpdate:D,shared:k.shared,callbacks:k.callbacks},c.updateQueue=g;return}c=g.lastBaseUpdate,c===null?g.firstBaseUpdate=d:c.next=d,g.lastBaseUpdate=d}var Cy=!1;function E_(){if(Cy){var c=vd;if(c!==null)throw c}}function N_(c,d,g,k){Cy=!1;var A=c.updateQueue;vc=!1;var D=A.firstBaseUpdate,K=A.lastBaseUpdate,re=A.shared.pending;if(re!==null){A.shared.pending=null;var me=re,Ee=me.next;me.next=null,K===null?D=Ee:K.next=Ee,K=me;var Re=c.alternate;Re!==null&&(Re=Re.updateQueue,re=Re.lastBaseUpdate,re!==K&&(re===null?Re.firstBaseUpdate=Ee:re.next=Ee,Re.lastBaseUpdate=me))}if(D!==null){var Ie=A.baseState;K=0,Re=Ee=me=null,re=D;do{var Ne=re.lane&-536870913,Te=Ne!==re.lane;if(Te?(gn&Ne)===Ne:(k&Ne)===Ne){Ne!==0&&Ne===gd&&(Cy=!0),Re!==null&&(Re=Re.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var _t=c,Bt=re;Ne=d;var Yn=g;switch(Bt.tag){case 1:if(_t=Bt.payload,typeof _t=="function"){Ie=_t.call(Yn,Ie,Ne);break e}Ie=_t;break e;case 3:_t.flags=_t.flags&-65537|128;case 0:if(_t=Bt.payload,Ne=typeof _t=="function"?_t.call(Yn,Ie,Ne):_t,Ne==null)break e;Ie=f({},Ie,Ne);break e;case 2:vc=!0}}Ne=re.callback,Ne!==null&&(c.flags|=64,Te&&(c.flags|=8192),Te=A.callbacks,Te===null?A.callbacks=[Ne]:Te.push(Ne))}else Te={lane:Ne,tag:re.tag,payload:re.payload,callback:re.callback,next:null},Re===null?(Ee=Re=Te,me=Ie):Re=Re.next=Te,K|=Ne;if(re=re.next,re===null){if(re=A.shared.pending,re===null)break;Te=re,re=Te.next,Te.next=null,A.lastBaseUpdate=Te,A.shared.pending=null}}while(!0);Re===null&&(me=Ie),A.baseState=me,A.firstBaseUpdate=Ee,A.lastBaseUpdate=Re,D===null&&(A.shared.lanes=0),Cc|=K,c.lanes=K,c.memoizedState=Ie}}function Qk(c,d){if(typeof c!="function")throw Error(r(191,c));c.call(d)}function Yk(c,d){var g=c.callbacks;if(g!==null)for(c.callbacks=null,c=0;cD?D:8;var K=V.T,re={};V.T=re,Uy(c,!1,d,g);try{var me=A(),Ee=V.S;if(Ee!==null&&Ee(re,me),me!==null&&typeof me=="object"&&typeof me.then=="function"){var Re=oq(me,k);j_(c,d,Re,Li(c))}else j_(c,d,k,Li(c))}catch(Ie){j_(c,d,{then:function(){},status:"rejected",reason:Ie},Li())}finally{Z.p=D,K!==null&&re.types!==null&&(K.types=re.types),V.T=K}}function hq(){}function Hy(c,d,g,k){if(c.tag!==5)throw Error(r(476));var A=z7(c).queue;N7(c,A,d,te,g===null?hq:function(){return T7(c),g(k)})}function z7(c){var d=c.memoizedState;if(d!==null)return d;d={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:te},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:g},next:null},c.memoizedState=d,c=c.alternate,c!==null&&(c.memoizedState=d),d}function T7(c){var d=z7(c);d.next===null&&(d=c.alternate.memoizedState),j_(c,d.next.queue,{},Li())}function qy(){return ks(V_)}function j7(){return qr().memoizedState}function A7(){return qr().memoizedState}function _q(c){for(var d=c.return;d!==null;){switch(d.tag){case 24:case 3:var g=Li();c=bc(g);var k=yc(d,c,g);k!==null&&(_i(k,d,g),C_(k,d,g)),d={cache:vy()},c.payload=d;return}d=d.return}}function pq(c,d,g){var k=Li();g={lane:k,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Om(c)?M7(d,g):(g=oy(c,d,g,k),g!==null&&(_i(g,c,k),D7(g,d,k)))}function R7(c,d,g){var k=Li();j_(c,d,g,k)}function j_(c,d,g,k){var A={lane:k,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(Om(c))M7(d,A);else{var D=c.alternate;if(c.lanes===0&&(D===null||D.lanes===0)&&(D=d.lastRenderedReducer,D!==null))try{var K=d.lastRenderedState,re=D(K,g);if(A.hasEagerState=!0,A.eagerState=re,Pr(re,K))return mm(c,d,A,0),Jn===null&&pm(),!1}catch{}finally{}if(g=oy(c,d,A,k),g!==null)return _i(g,c,k),D7(g,d,k),!0}return!1}function Uy(c,d,g,k){if(k={lane:2,revertLane:wx(),gesture:null,action:k,hasEagerState:!1,eagerState:null,next:null},Om(c)){if(d)throw Error(r(479))}else d=oy(c,g,k,2),d!==null&&_i(d,c,2)}function Om(c){var d=c.alternate;return c===rn||d!==null&&d===rn}function M7(c,d){wd=Tm=!0;var g=c.pending;g===null?d.next=d:(d.next=g.next,g.next=d),c.pending=d}function D7(c,d,g){if((g&4194048)!==0){var k=d.lanes;k&=c.pendingLanes,g|=k,d.lanes=g,hn(c,g)}}var A_={readContext:ks,use:Rm,useCallback:Rr,useContext:Rr,useEffect:Rr,useImperativeHandle:Rr,useLayoutEffect:Rr,useInsertionEffect:Rr,useMemo:Rr,useReducer:Rr,useRef:Rr,useState:Rr,useDebugValue:Rr,useDeferredValue:Rr,useTransition:Rr,useSyncExternalStore:Rr,useId:Rr,useHostTransitionStatus:Rr,useFormState:Rr,useActionState:Rr,useOptimistic:Rr,useMemoCache:Rr,useCacheRefresh:Rr};A_.useEffectEvent=Rr;var L7={readContext:ks,use:Rm,useCallback:function(c,d){return Qs().memoizedState=[c,d===void 0?null:d],c},useContext:ks,useEffect:v7,useImperativeHandle:function(c,d,g){g=g!=null?g.concat([c]):null,Dm(4194308,4,w7.bind(null,d,c),g)},useLayoutEffect:function(c,d){return Dm(4194308,4,c,d)},useInsertionEffect:function(c,d){Dm(4,2,c,d)},useMemo:function(c,d){var g=Qs();d=d===void 0?null:d;var k=c();if(Gu){kn(!0);try{c()}finally{kn(!1)}}return g.memoizedState=[k,d],k},useReducer:function(c,d,g){var k=Qs();if(g!==void 0){var A=g(d);if(Gu){kn(!0);try{g(d)}finally{kn(!1)}}}else A=d;return k.memoizedState=k.baseState=A,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:A},k.queue=c,c=c.dispatch=pq.bind(null,rn,c),[k.memoizedState,c]},useRef:function(c){var d=Qs();return c={current:c},d.memoizedState=c},useState:function(c){c=Iy(c);var d=c.queue,g=R7.bind(null,rn,d);return d.dispatch=g,[c.memoizedState,g]},useDebugValue:Py,useDeferredValue:function(c,d){var g=Qs();return Fy(g,c,d)},useTransition:function(){var c=Iy(!1);return c=N7.bind(null,rn,c.queue,!0,!1),Qs().memoizedState=c,[!1,c]},useSyncExternalStore:function(c,d,g){var k=rn,A=Qs();if(bn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),Jn===null)throw Error(r(349));(gn&127)!==0||n7(k,d,g)}A.memoizedState=g;var D={value:g,getSnapshot:d};return A.queue=D,v7(s7.bind(null,k,D,c),[c]),k.flags|=2048,kd(9,{destroy:void 0},r7.bind(null,k,D,g,d),null),g},useId:function(){var c=Qs(),d=Jn.identifierPrefix;if(bn){var g=_o,k=ho;g=(k&~(1<<32-Jt(k)-1)).toString(32)+g,d="_"+d+"R_"+g,g=jm++,0<\/script>",D=D.removeChild(D.firstChild);break;case"select":D=typeof k.is=="string"?K.createElement("select",{is:k.is}):K.createElement("select"),k.multiple?D.multiple=!0:k.size&&(D.size=k.size);break;default:D=typeof k.is=="string"?K.createElement(A,{is:k.is}):K.createElement(A)}}D[Rt]=d,D[Vt]=k;e:for(K=d.child;K!==null;){if(K.tag===5||K.tag===6)D.appendChild(K.stateNode);else if(K.tag!==4&&K.tag!==27&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===d)break e;for(;K.sibling===null;){if(K.return===null||K.return===d)break e;K=K.return}K.sibling.return=K.return,K=K.sibling}d.stateNode=D;e:switch(Es(D,A,k),A){case"button":case"input":case"select":case"textarea":k=!!k.autoFocus;break e;case"img":k=!0;break e;default:k=!1}k&&hl(d)}}return ur(d),sx(d,d.type,c===null?null:c.memoizedProps,d.pendingProps,g),null;case 6:if(c&&d.stateNode!=null)c.memoizedProps!==k&&hl(d);else{if(typeof k!="string"&&d.stateNode===null)throw Error(r(166));if(c=le.current,pd(d)){if(c=d.stateNode,g=d.memoizedProps,k=null,A=Ss,A!==null)switch(A.tag){case 27:case 5:k=A.memoizedProps}c[Rt]=d,c=!!(c.nodeValue===g||k!==null&&k.suppressHydrationWarning===!0||e8(c.nodeValue,g)),c||mc(d,!0)}else c=ng(c).createTextNode(k),c[Rt]=d,d.stateNode=c}return ur(d),null;case 31:if(g=d.memoizedState,c===null||c.memoizedState!==null){if(k=pd(d),g!==null){if(c===null){if(!k)throw Error(r(318));if(c=d.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(557));c[Rt]=d}else Bu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;ur(d),c=!1}else g=_y(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=g),c=!0;if(!c)return d.flags&256?(Ri(d),d):(Ri(d),null);if((d.flags&128)!==0)throw Error(r(558))}return ur(d),null;case 13:if(k=d.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(A=pd(d),k!==null&&k.dehydrated!==null){if(c===null){if(!A)throw Error(r(318));if(A=d.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(r(317));A[Rt]=d}else Bu(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;ur(d),A=!1}else A=_y(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=A),A=!0;if(!A)return d.flags&256?(Ri(d),d):(Ri(d),null)}return Ri(d),(d.flags&128)!==0?(d.lanes=g,d):(g=k!==null,c=c!==null&&c.memoizedState!==null,g&&(k=d.child,A=null,k.alternate!==null&&k.alternate.memoizedState!==null&&k.alternate.memoizedState.cachePool!==null&&(A=k.alternate.memoizedState.cachePool.pool),D=null,k.memoizedState!==null&&k.memoizedState.cachePool!==null&&(D=k.memoizedState.cachePool.pool),D!==A&&(k.flags|=2048)),g!==c&&g&&(d.child.flags|=8192),Fm(d,d.updateQueue),ur(d),null);case 4:return ce(),c===null&&Ex(d.stateNode.containerInfo),ur(d),null;case 10:return cl(d.type),ur(d),null;case 19:if(H(Hr),k=d.memoizedState,k===null)return ur(d),null;if(A=(d.flags&128)!==0,D=k.rendering,D===null)if(A)M_(k,!1);else{if(Mr!==0||c!==null&&(c.flags&128)!==0)for(c=d.child;c!==null;){if(D=zm(c),D!==null){for(d.flags|=128,M_(k,!1),c=D.updateQueue,d.updateQueue=c,Fm(d,c),d.subtreeFlags=0,c=g,g=d.child;g!==null;)Rk(g,c),g=g.sibling;return G(Hr,Hr.current&1|2),bn&&ol(d,k.treeForkCount),d.child}c=c.sibling}k.tail!==null&&mt()>Wm&&(d.flags|=128,A=!0,M_(k,!1),d.lanes=4194304)}else{if(!A)if(c=zm(D),c!==null){if(d.flags|=128,A=!0,c=c.updateQueue,d.updateQueue=c,Fm(d,c),M_(k,!0),k.tail===null&&k.tailMode==="hidden"&&!D.alternate&&!bn)return ur(d),null}else 2*mt()-k.renderingStartTime>Wm&&g!==536870912&&(d.flags|=128,A=!0,M_(k,!1),d.lanes=4194304);k.isBackwards?(D.sibling=d.child,d.child=D):(c=k.last,c!==null?c.sibling=D:d.child=D,k.last=D)}return k.tail!==null?(c=k.tail,k.rendering=c,k.tail=c.sibling,k.renderingStartTime=mt(),c.sibling=null,g=Hr.current,G(Hr,A?g&1|2:g&1),bn&&ol(d,k.treeForkCount),c):(ur(d),null);case 22:case 23:return Ri(d),Ny(),k=d.memoizedState!==null,c!==null?c.memoizedState!==null!==k&&(d.flags|=8192):k&&(d.flags|=8192),k?(g&536870912)!==0&&(d.flags&128)===0&&(ur(d),d.subtreeFlags&6&&(d.flags|=8192)):ur(d),g=d.updateQueue,g!==null&&Fm(d,g.retryQueue),g=null,c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),k=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(k=d.memoizedState.cachePool.pool),k!==g&&(d.flags|=2048),c!==null&&H(Fu),null;case 24:return g=null,c!==null&&(g=c.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),cl(Qr),ur(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function yq(c,d){switch(dy(d),d.tag){case 1:return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 3:return cl(Qr),ce(),c=d.flags,(c&65536)!==0&&(c&128)===0?(d.flags=c&-65537|128,d):null;case 26:case 27:case 5:return ue(d),null;case 31:if(d.memoizedState!==null){if(Ri(d),d.alternate===null)throw Error(r(340));Bu()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 13:if(Ri(d),c=d.memoizedState,c!==null&&c.dehydrated!==null){if(d.alternate===null)throw Error(r(340));Bu()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 19:return H(Hr),null;case 4:return ce(),null;case 10:return cl(d.type),null;case 22:case 23:return Ri(d),Ny(),c!==null&&H(Fu),c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 24:return cl(Qr),null;case 25:return null;default:return null}}function iC(c,d){switch(dy(d),d.tag){case 3:cl(Qr),ce();break;case 26:case 27:case 5:ue(d);break;case 4:ce();break;case 31:d.memoizedState!==null&&Ri(d);break;case 13:Ri(d);break;case 19:H(Hr);break;case 10:cl(d.type);break;case 22:case 23:Ri(d),Ny(),c!==null&&H(Fu);break;case 24:cl(Qr)}}function D_(c,d){try{var g=d.updateQueue,k=g!==null?g.lastEffect:null;if(k!==null){var A=k.next;g=A;do{if((g.tag&c)===c){k=void 0;var D=g.create,K=g.inst;k=D(),K.destroy=k}g=g.next}while(g!==A)}}catch(re){Un(d,d.return,re)}}function Sc(c,d,g){try{var k=d.updateQueue,A=k!==null?k.lastEffect:null;if(A!==null){var D=A.next;k=D;do{if((k.tag&c)===c){var K=k.inst,re=K.destroy;if(re!==void 0){K.destroy=void 0,A=d;var me=g,Ee=re;try{Ee()}catch(Re){Un(A,me,Re)}}}k=k.next}while(k!==D)}}catch(Re){Un(d,d.return,Re)}}function aC(c){var d=c.updateQueue;if(d!==null){var g=c.stateNode;try{Yk(d,g)}catch(k){Un(c,c.return,k)}}}function oC(c,d,g){g.props=Wu(c.type,c.memoizedProps),g.state=c.memoizedState;try{g.componentWillUnmount()}catch(k){Un(c,d,k)}}function L_(c,d){try{var g=c.ref;if(g!==null){switch(c.tag){case 26:case 27:case 5:var k=c.stateNode;break;case 30:k=c.stateNode;break;default:k=c.stateNode}typeof g=="function"?c.refCleanup=g(k):g.current=k}}catch(A){Un(c,d,A)}}function po(c,d){var g=c.ref,k=c.refCleanup;if(g!==null)if(typeof k=="function")try{k()}catch(A){Un(c,d,A)}finally{c.refCleanup=null,c=c.alternate,c!=null&&(c.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(A){Un(c,d,A)}else g.current=null}function lC(c){var d=c.type,g=c.memoizedProps,k=c.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":g.autoFocus&&k.focus();break e;case"img":g.src?k.src=g.src:g.srcSet&&(k.srcset=g.srcSet)}}catch(A){Un(c,c.return,A)}}function ix(c,d,g){try{var k=c.stateNode;Hq(k,c.type,g,d),k[Vt]=d}catch(A){Un(c,c.return,A)}}function cC(c){return c.tag===5||c.tag===3||c.tag===26||c.tag===27&&jc(c.type)||c.tag===4}function ax(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||cC(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.tag===27&&jc(c.type)||c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function ox(c,d,g){var k=c.tag;if(k===5||k===6)c=c.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(c,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(c),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=hr));else if(k!==4&&(k===27&&jc(c.type)&&(g=c.stateNode,d=null),c=c.child,c!==null))for(ox(c,d,g),c=c.sibling;c!==null;)ox(c,d,g),c=c.sibling}function Hm(c,d,g){var k=c.tag;if(k===5||k===6)c=c.stateNode,d?g.insertBefore(c,d):g.appendChild(c);else if(k!==4&&(k===27&&jc(c.type)&&(g=c.stateNode),c=c.child,c!==null))for(Hm(c,d,g),c=c.sibling;c!==null;)Hm(c,d,g),c=c.sibling}function uC(c){var d=c.stateNode,g=c.memoizedProps;try{for(var k=c.type,A=d.attributes;A.length;)d.removeAttributeNode(A[0]);Es(d,k,g),d[Rt]=c,d[Vt]=g}catch(D){Un(c,c.return,D)}}var _l=!1,Zr=!1,lx=!1,fC=typeof WeakSet=="function"?WeakSet:Set,ms=null;function xq(c,d){if(c=c.containerInfo,Tx=cg,c=Ti(c),ld(c)){if("selectionStart"in c)var g={start:c.selectionStart,end:c.selectionEnd};else e:{g=(g=c.ownerDocument)&&g.defaultView||window;var k=g.getSelection&&g.getSelection();if(k&&k.rangeCount!==0){g=k.anchorNode;var A=k.anchorOffset,D=k.focusNode;k=k.focusOffset;try{g.nodeType,D.nodeType}catch{g=null;break e}var K=0,re=-1,me=-1,Ee=0,Re=0,Ie=c,Ne=null;t:for(;;){for(var Te;Ie!==g||A!==0&&Ie.nodeType!==3||(re=K+A),Ie!==D||k!==0&&Ie.nodeType!==3||(me=K+k),Ie.nodeType===3&&(K+=Ie.nodeValue.length),(Te=Ie.firstChild)!==null;)Ne=Ie,Ie=Te;for(;;){if(Ie===c)break t;if(Ne===g&&++Ee===A&&(re=K),Ne===D&&++Re===k&&(me=K),(Te=Ie.nextSibling)!==null)break;Ie=Ne,Ne=Ie.parentNode}Ie=Te}g=re===-1||me===-1?null:{start:re,end:me}}else g=null}g=g||{start:0,end:0}}else g=null;for(jx={focusedElem:c,selectionRange:g},cg=!1,ms=d;ms!==null;)if(d=ms,c=d.child,(d.subtreeFlags&1028)!==0&&c!==null)c.return=d,ms=c;else for(;ms!==null;){switch(d=ms,D=d.alternate,c=d.flags,d.tag){case 0:if((c&4)!==0&&(c=d.updateQueue,c=c!==null?c.events:null,c!==null))for(g=0;g title"))),Es(D,k,g),D[Rt]=c,Bn(D),k=D;break e;case"link":var K=g8("link","href",A).get(k+(g.href||""));if(K){for(var re=0;reYn&&(K=Yn,Yn=Bt,Bt=K);var xe=sl(re,Bt),ge=sl(re,Yn);if(xe&&ge&&(Te.rangeCount!==1||Te.anchorNode!==xe.node||Te.anchorOffset!==xe.offset||Te.focusNode!==ge.node||Te.focusOffset!==ge.offset)){var Se=Ie.createRange();Se.setStart(xe.node,xe.offset),Te.removeAllRanges(),Bt>Yn?(Te.addRange(Se),Te.extend(ge.node,ge.offset)):(Se.setEnd(ge.node,ge.offset),Te.addRange(Se))}}}}for(Ie=[],Te=re;Te=Te.parentNode;)Te.nodeType===1&&Ie.push({element:Te,left:Te.scrollLeft,top:Te.scrollTop});for(typeof re.focus=="function"&&re.focus(),re=0;reg?32:g,V.T=null,g=px,px=null;var D=Nc,K=bl;if(cs=0,Td=Nc=null,bl=0,(Rn&6)!==0)throw Error(r(331));var re=Rn;if(Rn|=4,wC(D.current),bC(D,D.current,K,g),Rn=re,F_(0,!1),ln&&typeof ln.onPostCommitFiberRoot=="function")try{ln.onPostCommitFiberRoot(Dt,D)}catch{}return!0}finally{Z.p=A,V.T=k,PC(c,d)}}function HC(c,d,g){d=ua(g,d),d=Ky(c.stateNode,d,2),c=yc(c,d,2),c!==null&&(Xt(c,2),mo(c))}function Un(c,d,g){if(c.tag===3)HC(c,c,g);else for(;d!==null;){if(d.tag===3){HC(d,c,g);break}else if(d.tag===1){var k=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof k.componentDidCatch=="function"&&(Ec===null||!Ec.has(k))){c=ua(g,c),g=q7(2),k=yc(d,g,2),k!==null&&(U7(g,k,d,c),Xt(k,2),mo(k));break}}d=d.return}}function bx(c,d,g){var k=c.pingCache;if(k===null){k=c.pingCache=new kq;var A=new Set;k.set(d,A)}else A=k.get(d),A===void 0&&(A=new Set,k.set(d,A));A.has(g)||(fx=!0,A.add(g),c=Tq.bind(null,c,d,g),d.then(c,c))}function Tq(c,d,g){var k=c.pingCache;k!==null&&k.delete(d),c.pingedLanes|=c.suspendedLanes&g,c.warmLanes&=~g,Jn===c&&(gn&g)===g&&(Mr===4||Mr===3&&(gn&62914560)===gn&&300>mt()-Gm?(Rn&2)===0&&jd(c,0):dx|=g,zd===gn&&(zd=0)),mo(c)}function qC(c,d){d===0&&(d=fn()),c=Ou(c,d),c!==null&&(Xt(c,d),mo(c))}function jq(c){var d=c.memoizedState,g=0;d!==null&&(g=d.retryLane),qC(c,g)}function Aq(c,d){var g=0;switch(c.tag){case 31:case 13:var k=c.stateNode,A=c.memoizedState;A!==null&&(g=A.retryLane);break;case 19:k=c.stateNode;break;case 22:k=c.stateNode._retryCache;break;default:throw Error(r(314))}k!==null&&k.delete(d),qC(c,g)}function Rq(c,d){return Ut(c,d)}var Zm=null,Rd=null,yx=!1,Jm=!1,xx=!1,Tc=0;function mo(c){c!==Rd&&c.next===null&&(Rd===null?Zm=Rd=c:Rd=Rd.next=c),Jm=!0,yx||(yx=!0,Dq())}function F_(c,d){if(!xx&&Jm){xx=!0;do for(var g=!1,k=Zm;k!==null;){if(c!==0){var A=k.pendingLanes;if(A===0)var D=0;else{var K=k.suspendedLanes,re=k.pingedLanes;D=(1<<31-Jt(42|c)+1)-1,D&=A&~(K&~re),D=D&201326741?D&201326741|1:D?D|2:0}D!==0&&(g=!0,VC(k,D))}else D=gn,D=Or(k,k===Jn?D:0,k.cancelPendingCommit!==null||k.timeoutHandle!==-1),(D&3)===0||Nr(k,D)||(g=!0,VC(k,D));k=k.next}while(g);xx=!1}}function Mq(){UC()}function UC(){Jm=yx=!1;var c=0;Tc!==0&&Uq()&&(c=Tc);for(var d=mt(),g=null,k=Zm;k!==null;){var A=k.next,D=GC(k,d);D===0?(k.next=null,g===null?Zm=A:g.next=A,A===null&&(Rd=g)):(g=k,(c!==0||(D&3)!==0)&&(Jm=!0)),k=A}cs!==0&&cs!==5||F_(c),Tc!==0&&(Tc=0)}function GC(c,d){for(var g=c.suspendedLanes,k=c.pingedLanes,A=c.expirationTimes,D=c.pendingLanes&-62914561;0re)break;var Re=me.transferSize,Ie=me.initiatorType;Re&&t8(Ie)&&(me=me.responseEnd,K+=Re*(me"u"?null:document;function h8(c,d,g){var k=Md;if(k&&typeof d=="string"&&d){var A=jt(d);A='link[rel="'+c+'"][href="'+A+'"]',typeof g=="string"&&(A+='[crossorigin="'+g+'"]'),d8.has(A)||(d8.add(A),c={rel:c,crossOrigin:g,href:d},k.querySelector(A)===null&&(d=k.createElement("link"),Es(d,"link",c),Bn(d),k.head.appendChild(d)))}}function Jq(c){yl.D(c),h8("dns-prefetch",c,null)}function eU(c,d){yl.C(c,d),h8("preconnect",c,d)}function tU(c,d,g){yl.L(c,d,g);var k=Md;if(k&&c&&d){var A='link[rel="preload"][as="'+jt(d)+'"]';d==="image"&&g&&g.imageSrcSet?(A+='[imagesrcset="'+jt(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(A+='[imagesizes="'+jt(g.imageSizes)+'"]')):A+='[href="'+jt(c)+'"]';var D=A;switch(d){case"style":D=Dd(c);break;case"script":D=Ld(c)}ma.has(D)||(c=f({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:c,as:d},g),ma.set(D,c),k.querySelector(A)!==null||d==="style"&&k.querySelector(G_(D))||d==="script"&&k.querySelector(W_(D))||(d=k.createElement("link"),Es(d,"link",c),Bn(d),k.head.appendChild(d)))}}function nU(c,d){yl.m(c,d);var g=Md;if(g&&c){var k=d&&typeof d.as=="string"?d.as:"script",A='link[rel="modulepreload"][as="'+jt(k)+'"][href="'+jt(c)+'"]',D=A;switch(k){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":D=Ld(c)}if(!ma.has(D)&&(c=f({rel:"modulepreload",href:c},d),ma.set(D,c),g.querySelector(A)===null)){switch(k){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(W_(D)))return}k=g.createElement("link"),Es(k,"link",c),Bn(k),g.head.appendChild(k)}}}function rU(c,d,g){yl.S(c,d,g);var k=Md;if(k&&c){var A=Tr(k).hoistableStyles,D=Dd(c);d=d||"default";var K=A.get(D);if(!K){var re={loading:0,preload:null};if(K=k.querySelector(G_(D)))re.loading=5;else{c=f({rel:"stylesheet",href:c,"data-precedence":d},g),(g=ma.get(D))&&Ix(c,g);var me=K=k.createElement("link");Bn(me),Es(me,"link",c),me._p=new Promise(function(Ee,Re){me.onload=Ee,me.onerror=Re}),me.addEventListener("load",function(){re.loading|=1}),me.addEventListener("error",function(){re.loading|=2}),re.loading|=4,sg(K,d,k)}K={type:"stylesheet",instance:K,count:1,state:re},A.set(D,K)}}}function sU(c,d){yl.X(c,d);var g=Md;if(g&&c){var k=Tr(g).hoistableScripts,A=Ld(c),D=k.get(A);D||(D=g.querySelector(W_(A)),D||(c=f({src:c,async:!0},d),(d=ma.get(A))&&Bx(c,d),D=g.createElement("script"),Bn(D),Es(D,"link",c),g.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},k.set(A,D))}}function iU(c,d){yl.M(c,d);var g=Md;if(g&&c){var k=Tr(g).hoistableScripts,A=Ld(c),D=k.get(A);D||(D=g.querySelector(W_(A)),D||(c=f({src:c,async:!0,type:"module"},d),(d=ma.get(A))&&Bx(c,d),D=g.createElement("script"),Bn(D),Es(D,"link",c),g.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},k.set(A,D))}}function _8(c,d,g,k){var A=(A=le.current)?rg(A):null;if(!A)throw Error(r(446));switch(c){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(d=Dd(g.href),g=Tr(A).hoistableStyles,k=g.get(d),k||(k={type:"style",instance:null,count:0,state:null},g.set(d,k)),k):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){c=Dd(g.href);var D=Tr(A).hoistableStyles,K=D.get(c);if(K||(A=A.ownerDocument||A,K={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},D.set(c,K),(D=A.querySelector(G_(c)))&&!D._p&&(K.instance=D,K.state.loading=5),ma.has(c)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},ma.set(c,g),D||aU(A,c,g,K.state))),d&&k===null)throw Error(r(528,""));return K}if(d&&k!==null)throw Error(r(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=Ld(g),g=Tr(A).hoistableScripts,k=g.get(d),k||(k={type:"script",instance:null,count:0,state:null},g.set(d,k)),k):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,c))}}function Dd(c){return'href="'+jt(c)+'"'}function G_(c){return'link[rel="stylesheet"]['+c+"]"}function p8(c){return f({},c,{"data-precedence":c.precedence,precedence:null})}function aU(c,d,g,k){c.querySelector('link[rel="preload"][as="style"]['+d+"]")?k.loading=1:(d=c.createElement("link"),k.preload=d,d.addEventListener("load",function(){return k.loading|=1}),d.addEventListener("error",function(){return k.loading|=2}),Es(d,"link",g),Bn(d),c.head.appendChild(d))}function Ld(c){return'[src="'+jt(c)+'"]'}function W_(c){return"script[async]"+c}function m8(c,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var k=c.querySelector('style[data-href~="'+jt(g.href)+'"]');if(k)return d.instance=k,Bn(k),k;var A=f({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return k=(c.ownerDocument||c).createElement("style"),Bn(k),Es(k,"style",A),sg(k,g.precedence,c),d.instance=k;case"stylesheet":A=Dd(g.href);var D=c.querySelector(G_(A));if(D)return d.state.loading|=4,d.instance=D,Bn(D),D;k=p8(g),(A=ma.get(A))&&Ix(k,A),D=(c.ownerDocument||c).createElement("link"),Bn(D);var K=D;return K._p=new Promise(function(re,me){K.onload=re,K.onerror=me}),Es(D,"link",k),d.state.loading|=4,sg(D,g.precedence,c),d.instance=D;case"script":return D=Ld(g.src),(A=c.querySelector(W_(D)))?(d.instance=A,Bn(A),A):(k=g,(A=ma.get(D))&&(k=f({},g),Bx(k,A)),c=c.ownerDocument||c,A=c.createElement("script"),Bn(A),Es(A,"link",k),c.head.appendChild(A),d.instance=A);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(k=d.instance,d.state.loading|=4,sg(k,g.precedence,c));return d.instance}function sg(c,d,g){for(var k=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=k.length?k[k.length-1]:null,D=A,K=0;K title"):null)}function oU(c,d,g){if(g===1||d.itemProp!=null)return!1;switch(c){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return c=d.disabled,typeof d.precedence=="string"&&c==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function b8(c){return!(c.type==="stylesheet"&&(c.state.loading&3)===0)}function lU(c,d,g,k){if(g.type==="stylesheet"&&(typeof k.media!="string"||matchMedia(k.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var A=Dd(k.href),D=d.querySelector(G_(A));if(D){d=D._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(c.count++,c=ag.bind(c),d.then(c,c)),g.state.loading|=4,g.instance=D,Bn(D);return}D=d.ownerDocument||d,k=p8(k),(A=ma.get(A))&&Ix(k,A),D=D.createElement("link"),Bn(D);var K=D;K._p=new Promise(function(re,me){K.onload=re,K.onerror=me}),Es(D,"link",k),g.instance=D}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(c.count++,g=ag.bind(c),d.addEventListener("load",g),d.addEventListener("error",g))}}var $x=0;function cU(c,d){return c.stylesheets&&c.count===0&&lg(c,c.stylesheets),0$x?50:800)+d);return c.unsuspend=g,function(){c.unsuspend=null,clearTimeout(k),clearTimeout(A)}}:null}function ag(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lg(this,this.stylesheets);else if(this.unsuspend){var c=this.unsuspend;this.unsuspend=null,c()}}}var og=null;function lg(c,d){c.stylesheets=null,c.unsuspend!==null&&(c.count++,og=new Map,d.forEach(uU,c),og=null,ag.call(c))}function uU(c,d){if(!(d.state.loading&4)){var g=og.get(c);if(g)var k=g.get(null);else{g=new Map,og.set(c,g);for(var A=c.querySelectorAll("link[data-precedence],style[data-precedence]"),D=0;D"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Qx.exports=lG(),Qx.exports}var uG=cG();const fG=!1;var lM=M.useLayoutEffect;function dG(e,n,t){M.useEffect(()=>{if(!e.current||t||typeof IntersectionObserver!="function")return()=>n();const r=new IntersectionObserver(s=>{n(s.pop())},{rootMargin:"100px"});return r.observe(e.current),()=>{r.disconnect(),n()}},[n,t,e])}function hG(e){const n=M.useRef(null);return M.useImperativeHandle(e,()=>n.current,[]),n}function P0(e){return e[e.length-1]}function Mh(e,n){return typeof e=="function"?e(n):e}const cM=Object.prototype.hasOwnProperty,_G=Object.prototype.propertyIsEnumerable;function uM(e){for(const n in e)if(cM.call(e,n))return!0;return!1}const pG=()=>Object.create(null),Qu=(e,n)=>uf(e,n,pG);function uf(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=s9(e)&&s9(s);if(!i&&!(B1(e)&&B1(s)))return s;const o=i?e:n9(e);if(!o)return s;const a=i?s:n9(s);if(!a)return s;const l=o.length,u=a.length,_=i?new Array(u):t();let f=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!r9(t)||!t.hasOwnProperty("isPrototypeOf"))}function r9(e){return Object.prototype.toString.call(e)==="[object Object]"}function s9(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function iu(e,n,t){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let r=0,s=e.length;rs||!iu(e[o],n[o],t)))return!1;return s===i}return!1}const mG=/[\x00-\x1f\x7f"<>`{}]/g;function gG(e){return e.replace(mG,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function i9(e){let n;try{n=decodeURI(e)}catch{n=e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return gG(n)}const vG=["http:","https:","mailto:","tel:"];function $1(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function e0(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const n=/%25|%5C/gi;let t=0,r="",s;for(;(s=n.exec(e))!==null;)r+=i9(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+i9(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function bG(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function yG(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,t=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const o=n.get(i);if(o)return s(o),o.value},set(i,o){if(n.size>=e&&t){const l=t;n.delete(l.key),l.next&&(t=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const a=n.get(i);if(a)a.value=o,s(a);else{const l={key:i,value:o,prev:r};r&&(r.next=l),r=l,t||(t=l),n.set(i,l)}},clear(){n.clear(),t=void 0,r=void 0}}}const nu=4,fM=5;function dM(e,n,t=new Uint16Array(6)){const r=e.indexOf("/",n),s=r===-1?e.length:r,i=e.substring(n,s);if(!i||!i.includes("$"))return t[0]=0,t[1]=n,t[2]=n,t[3]=s,t[4]=s,t[5]=s,t;if(i==="$"){const l=e.length;return t[0]=2,t[1]=n,t[2]=n,t[3]=l,t[4]=l,t[5]=l,t}if(i.charCodeAt(0)===36)return t[0]=1,t[1]=n,t[2]=n+1,t[3]=s,t[4]=s,t[5]=s,t;const o=i.indexOf("{");let a;if(o!==-1&&o+1!I.parse&&I.caseSensitive===z&&I.prefix===E&&I.suffix===j));if(O)y=O;else{const I=xG(N,f,z,E,j);y=I,I.parent=s,I.depth=i;let F;N===1?F=s.dynamic??(s.dynamic=[]):N===3?F=s.optional??(s.optional=[]):F=s.wildcard??(s.wildcard=[]),F.push(I),F.length===2&&(o==null||o.push(F))}break}}s=y}if(S&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const v=rh(f);v.kind=fM,v.parent=s,i++,v.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(v),s=v}const b=(t.path||!t.children)&&!t.isRoot;if(b&&f.endsWith("/")){const v=rh(f);v.kind=nu,v.parent=s,i++,v.depth=i,s.index=v,s=v}s.parse=S??null,s.priority=((_=p==null?void 0:p.params)==null?void 0:_.priority)??0,b&&!s.route&&(s.route=t,s.fullPath=f)}if(t.children)for(const f of t.children)Fv(e,n,f,l,s,i,o,a)}function hM(e,n){if(e.parse&&!n.parse)return-1;if(!e.parse&&n.parse)return 1;if(e.parse&&n.parse&&(e.priority||n.priority))return n.priority-e.priority;if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function rh(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function xG(e,n,t,r,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0,caseSensitive:t,prefix:r,suffix:s}}function wG(e,n){const t=rh("/"),r=new Uint16Array(6),s=[];for(const i of e)Fv(!1,r,i,1,t,0,s);for(const i of s)i.sort(hM);n.masksTree=t,n.flatCache=P1(1e3)}function SG(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=C3(e,n.masksTree);return n.flatCache.set(e,r),r}function kG(e,n,t,r,s){e||(e="/"),r||(r="/");const i=n?`case\0${e}`:e;let o=s.singleCache.get(i);return o||(o=rh("/"),Fv(n,new Uint16Array(6),{from:e},1,o,0),s.singleCache.set(i,o)),C3(r,o,t)}function CG(e,n,t=!1){const r=t?e:`nofuzz\0${e}`,s=n.matchCache.get(r);if(s!==void 0)return s;e||(e="/");let i;try{i=C3(e,n.segmentTree,t)}catch(o){if(o instanceof URIError)i=null;else throw o}return i&&(i.branch=pM(i.route)),n.matchCache.set(r,i),i}function EG(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function NG(e,n=!1,t){const r=rh(e.fullPath),s=new Uint16Array(6),i=[],o={},a={};let l=0;Fv(n,s,e,1,r,0,i,u=>{if(t==null||t(u,l),u.id in o&&k3(),o[u.id]=u,l!==0&&u.path){const _=EG(u.fullPath);(!a[_]||u.fullPath.endsWith("/"))&&(a[_]=u)}l++});for(const u of i)u.sort(hM);return{processedTree:{segmentTree:r,singleCache:P1(1e3),matchCache:P1(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function C3(e,n,t=!1){const r=e.split("/"),s=TG(e,r,n,t);if(!s)return null;const[i]=_M(e,r,s);return{route:s.node.route,rawParams:i}}function _M(e,n,t){var _,f,p,m;const r=zG(t.node);let s=null;const i=Object.create(null);let o=((_=t.extract)==null?void 0:_.part)??0,a=((f=t.extract)==null?void 0:f.node)??0,l=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;a=0;E--){const j=f.wildcard[E],{prefix:z,suffix:R}=j;if(!(z&&(w||!(j.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(z)))){if(R){if(w)continue;const O=n.slice(p).join("/"),I=O.slice(-R.length);if((j.caseSensitive?I:I.toLowerCase())!==R||O.length-R.length=0;j--){const z=f.optional[j];a.push({node:z,index:p,skipped:E,statics:x,dynamics:S,optionals:b,extract:v,rawParams:y})}if(!w)for(let j=f.optional.length-1;j>=0;j--){const z=f.optional[j],{prefix:R,suffix:O}=z;if(R||O){const I=z.caseSensitive?C:N??(N=C.toLowerCase());if(R&&!I.startsWith(R)||O&&I.indexOf(O,I.length-O.length)=0;E--){const j=f.dynamic[E],{prefix:z,suffix:R}=j;if(z||R){const O=j.caseSensitive?C:N??(N=C.toLowerCase());if(z&&!O.startsWith(z)||R&&O.indexOf(R,O.length-R.length)=0;E--){const j=f.pathless[E];a.push({node:j,index:p,skipped:m,statics:x,dynamics:S,optionals:b,extract:v,rawParams:y})}}if(u)return u;if(r&&l){let _=l.index;for(let p=0;pe.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&(n.optionals>e.optionals||n.optionals===e.optionals&&((n.node.kind===nu)>(e.node.kind===nu)||n.node.kind===nu==(e.node.kind===nu)&&n.node.depth>e.node.depth))):!0}function d1(e){return h1(e.filter(n=>n!==void 0).join("/"))}function h1(e){return e.replace(/\/{2,}/g,"/")}function mM(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Dl(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function gM(e){return Dl(mM(e))}function F1(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function AG(e,n,t){return F1(e,t)===F1(n,t)}function RG({base:e,to:n,trailingSlash:t="never",cache:r}){if(n.includes("//")&&(n=h1(n)),n.startsWith("/"))return n.length===1||t==="preserve"?n:t==="always"?n.endsWith("/")?n:`${n}/`:n.endsWith("/")?n.slice(0,-1):n;const s=n===".";let i;if(r){i=s?e:e+"\0"+n;const u=r.get(i);if(u)return u}let o;if(s)o=e.split("/");else{for(e.includes("//")&&(e=h1(e)),o=e.split("/");o.length>1&&P0(o)==="";)o.pop();const u=n.split("/");for(let _=0,f=u.length;_1?o.pop():o=[""]:p==="."||o.push(p)}}o.length>1&&(P0(o)===""?t==="never"&&o.pop():t==="always"&&o.push(""));const a=o.join("/"),l=(s?h1(a):a)||"/";return i&&r&&r.set(i,l),l}function MG(e){const n=new Map(e.map(s=>[encodeURIComponent(s),s])),t=Array.from(n.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(t,"g");return s=>s.replace(r,i=>n.get(i)??i)}function Jx(e,n,t){const r=n[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>l9(s,t)).join("/"):l9(r,t)}function o9({path:e,params:n,decoder:t,...r}){let s=!1;const i=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:s};const o=e.length;let a=0,l,u="";for(;ae.state.__TSR_key||e.href;function PG(e){const n=e.getAttribute(c9);if(n)return`[${c9}="${n}"]`;let t="",r=e,s;for(;s=r.parentNode;){let i=1,o=r;for(;o=o.previousElementSibling;)i++;const a=`${r.localName}:nth-child(${i})`;t=t?`${a} > ${t}`:a,r=s}return t}let bg=!1;const _1="window";function a4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function u9(e){const n=new Set;for(const t of e){if(t===_1)continue;const r=a4(t);r&&n.add(r)}return n}function FG(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||$G,i=new Set,o=a=>{const l=Uc[a]||(Uc[a]={});for(const u of i)u===document?l[_1]={scrollX,scrollY}:u.isConnected&&(l[PG(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,bg=!1,history.scrollRestoration="manual",document.addEventListener("scroll",a=>{bg||i.add(a.target)},!0),e.subscribe("onBeforeLoad",a=>{a.fromLocation&&o(s(a.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{o(s(e.stores.resolvedLocation.get()??e.stores.location.get())),BG()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",a=>{var S;const l=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,_=r.next,f=r.hash;let p;if(i.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=s(a.toLocation),x=a.fromLocation&&s(a.fromLocation);if(r.restoring&&x&&x!==m){const b=Uc[x];if(b){let v=Uc[m];for(const y in b){if(y===_1){if(_)continue}else{const w=a4(y);if(!w||_&&u&&(p??(p=u9(u)),p.has(w)))continue}v||(v=Uc[m]={}),v[y]??(v[y]=b[y])}}}bg=!0;try{const b=a.toLocation.hash,v=a.toLocation.state.__hashScrollIntoViewOptions??!0;let y=!1;if(_){!b&&u&&(p??(p=u9(u)));const w=b&&v&&f,C=r.restoring?Uc[m]:void 0;if(C)for(const N in C){const{scrollX:E,scrollY:j}=C[N];if(N===_1){if(w)continue;scrollTo({top:j,left:E,behavior:l}),y=!0}else{const z=a4(N);z&&(z.scrollLeft=E,z.scrollTop=j,p==null||p.delete(z))}}if(!b){const N={top:0,left:0,behavior:l};if(y||scrollTo(N),p)for(const E of p)E.scrollTo(N)}}!y&&b&&v&&((S=document.getElementById(b))==null||S.scrollIntoView(v))}finally{bg=!1}}))}function HG(e,n=String){const t=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&t.set(r,n(s))}return t.toString()}function e2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function qG(e){const n=new URLSearchParams(e),t=Object.create(null);for(const[r,s]of n.entries()){const i=t[r];i==null?t[r]=e2(s):Array.isArray(i)?i.push(e2(s)):t[r]=[i,e2(s)]}return t}const UG=/^(?:\s|["[{\d-]|fa|nu|tr)/,GG=VG(JSON.parse),WG=KG(JSON.stringify,JSON.parse);function VG(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=qG(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function KG(e,n){const t=n===JSON.parse;function r(s){if(s&&typeof s=="object")try{return e(s)}catch{}else if(n&&typeof s=="string"){if(t&&!UG.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=HG(s,r);return i?`?${i}`:""}}const ih="__root__";function QG(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:n});if(t.options=e,e.throw)throw t;return t}function vM(e){return e instanceof Response&&!!e.options}function YG(e){return{input:({url:n})=>{for(const t of e)n=o4(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=bM(e[t],n);return n}}}function XG(e){const n=gM(e.basepath),t=`/${n}`,r=e.caseSensitive?t:t.toLowerCase(),s=`${r}/`;return{input:({url:i})=>{const o=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return o===r?i.pathname="/":o.startsWith(s)&&(i.pathname=i.pathname.slice(t.length)),i},output:({url:i})=>(i.pathname=d1(["/",n,i.pathname]),i)}}function o4(e,n){var r;const t=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function bM(e,n){var r;const t=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function ZG(e,n){const{createMutableStore:t,createReadonlyStore:r,batch:s}=n,i=new Map,o=t("idle"),a=t(e),l=t(void 0),u=t([]),_=r(()=>u.get().map(S=>i.get(S).get())),f=r(()=>({status:o.get(),isLoading:o.get()==="pending",matches:_.get(),location:a.get(),resolvedLocation:l.get()}));function p(S){let b=i.get(S);return b||(b=t(void 0),i.set(S,b)),b}const m={status:o,location:a,resolvedLocation:l,ids:u,matches:_,byRoute:i,__store:f,getMatchStore:p,setMatches:x};function x(S){const b=u.get(),v=S.map(y=>y.routeId);s(()=>{yG(b,v)||u.set(v);for(const y of b)v.includes(y)||i.get(y).set(()=>{});for(const y of S){const w=p(y.routeId);w.get()!==y&&w.set(y)}})}return m}var au="__TSR_index",f9="popstate",d9="beforeunload";function JG(e){let n=e.getLocation();const t=new Set,r=o=>{n=e.getLocation(),t.forEach(a=>a({location:n,action:o}))},s=o=>{e.notifyOnIndexChange??!0?r(o):n=e.getLocation()},i=async({task:o,navigateOpts:a,...l})=>{var f,p;if((a==null?void 0:a.ignoreBlocker)??!1){o();return}const u=((f=e.getBlockers)==null?void 0:f.call(e))??[],_=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&_)for(const m of u){const x=H1(l.path,l.state);if(await m.blockerFn({currentLocation:n,nextLocation:x,action:l.type})){(p=e.onBlocked)==null||p.call(e);return}}o()};return{get location(){return n},get length(){return e.getLength()},subscribers:t,subscribe:o=>(t.add(o),()=>{t.delete(o)}),push:(o,a,l)=>{const u=n.state[au];a=h9(u+1,a),i({task:()=>{e.pushState(o,a),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:o,state:a})},replace:(o,a,l)=>{const u=n.state[au];a=h9(u,a),i({task:()=>{e.replaceState(o,a),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:o,state:a})},go:(o,a)=>{i({task:()=>{e.go(o),s({type:"GO",index:o})},navigateOpts:a,type:"GO"})},back:o=>{i({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{i({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>n.state[au]!==0,createHref:o=>e.createHref(o),block:o=>{var l;if(!e.setBlockers)return()=>{};const a=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...a,o]),()=>{var _,f;const u=((_=e.getBlockers)==null?void 0:_.call(e))??[];(f=e.setBlockers)==null||f.call(e,u.filter(p=>p!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:r}}function h9(e,n){n||(n={});const t=E3();return{...n,key:t,__TSR_key:t,[au]:e}}function eW(e){var j,z;const n=typeof document<"u"?window:void 0,t=n.history.pushState,r=n.history.replaceState;let s=[];const i=()=>s,o=R=>s=R,a=(R=>R),l=(()=>H1(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((j=n.history.state)!=null&&j.__TSR_key)&&!((z=n.history.state)!=null&&z.key)){const R=E3();n.history.replaceState({[au]:0,key:R,__TSR_key:R},"")}let u=l(),_,f=!1,p=!1,m=!1,x=!1;const S=()=>u;let b;const v=()=>{b&&(E._ignoreSubscribers=!0,(b[2]?n.history.pushState:n.history.replaceState)(b[1],"",b[0]),E._ignoreSubscribers=!1,b=void 0,_=void 0)},y=(R,O,I)=>{const F=a(O),U=!!b;U||(_=u),u=H1(O,I),b=[F,I,(b==null?void 0:b[2])||R],U||queueMicrotask(()=>v())},w=R=>{u=l(),E.notify({type:R})},C=async()=>{if(p){p=!1;return}const R=l(),O=R.state[au]-u.state[au],I=O===1,F=O===-1,U=!I&&!F||f;f=!1;const q=U?"GO":F?"BACK":"FORWARD",Y=U?{type:"GO",index:O}:{type:F?"BACK":"FORWARD"};if(m)m=!1;else{const V=i();if(typeof document<"u"&&V.length){for(const Z of V)if(await Z.blockerFn({currentLocation:u,nextLocation:R,action:q})){p=!0,n.history.go(1),E.notify(Y);return}}}u=l(),E.notify(Y)},N=R=>{if(x){x=!1;return}let O=!1;const I=i();if(typeof document<"u"&&I.length)for(const F of I){const U=F.enableBeforeUnload??!0;if(U===!0){O=!0;break}if(typeof U=="function"&&U()===!0){O=!0;break}}if(O)return R.preventDefault(),R.returnValue=""},E=JG({getLocation:S,getLength:()=>n.history.length,pushState:(R,O)=>y(!0,R,O),replaceState:(R,O)=>y(!1,R,O),back:R=>(R&&(m=!0),x=!0,n.history.back()),forward:R=>{R&&(m=!0),x=!0,n.history.forward()},go:R=>{f=!0,n.history.go(R)},createHref:R=>a(R),flush:v,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(d9,N,{capture:!0}),n.removeEventListener(f9,C)},onBlocked:()=>{_&&u!==_&&(u=_)},getBlockers:i,setBlockers:o,notifyOnIndexChange:!1});return n.addEventListener(d9,N,{capture:!0}),n.addEventListener(f9,C),n.history.pushState=function(...R){const O=t.apply(n.history,R);return E._ignoreSubscribers||w("PUSH"),O},n.history.replaceState=function(...R){const O=r.apply(n.history,R);return E._ignoreSubscribers||w("REPLACE"),O},E}function tW(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function H1(e,n){const t=tW(e),r=t.indexOf("#"),s=t.indexOf("?"),i=E3();return{href:t,pathname:t.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:t.length),hash:r>-1?t.substring(r):"",search:s>-1?t.slice(s,r===-1?void 0:r):"",state:n||{[au]:0,key:i,__TSR_key:i}}}function E3(){return(Math.random()+1).toString(36).substring(7)}function _9(e){var n,t;return e.options.loader||e.options.beforeLoad||e.lazyFn||((n=e.options.component)==null?void 0:n.preload)||((t=e.options.pendingComponent)==null?void 0:t.preload)}function Hv(e,n){return{fromLocation:n,toLocation:e,pathChanged:(n==null?void 0:n.pathname)!==e.pathname,hrefChanged:(n==null?void 0:n.href)!==e.href,hashChanged:(n==null?void 0:n.hash)!==e.hash}}function p9({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function nW(e,n,t,r){var s,i,o,a;for(const l of n){if(r&&e._tx!==r)return;t.some(u=>u.routeId===l.routeId)||(i=(s=e.routesById[l.routeId].options).onLeave)==null||i.call(s,l)}for(const l of t){if(r&&e._tx!==r)return;(a=(o=e.routesById[l.routeId].options)[n.some(u=>u.routeId===l.routeId)?"onStay":"onEnter"])==null||a.call(o,l)}}var rW=class{constructor(e,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async t=>(t(),!1),this.update=t=>{const r=this.options,s=this.basepath??(r==null?void 0:r.basepath)??"/",i=this.basepath===void 0,o=r==null?void 0:r.rewrite;if(this.options={...r,...t},this.isServer=this.options.isServer??fG??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=MG(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=eW()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=P1(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=ZG(this.latestLocation,u),FG(this)}const a=this.options.basepath??"/",l=this.options.rewrite;if(i||s!==a||o!==l){this.basepath=a;const u=[],_=gM(a);_&&_!=="/"&&u.push(XG({basepath:a})),l&&u.push(l),this.rewrite=u.length===0?void 0:u.length===1?u[0]:YG(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=NG(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&wG(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,r)=>{const s={eventType:t,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{for(const r of this.subscribers)if(r.eventType===t.type)try{r.fn(t)}catch(s){console.error(s)}},this.parseLocation=(t,r)=>{const s=({pathname:l,search:u,hash:_,href:f,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const v=this.options.parseSearch(u),y=this.options.stringifySearch(v);return{href:l+y+_,publicHref:l+y+_,pathname:e0(l).path,external:!1,searchStr:y,search:Qu(r==null?void 0:r.search,v),hash:e0(_.slice(1)).path,state:uf(r==null?void 0:r.state,p)}}const m=new URL(f,this.origin),x=o4(this.rewrite,m),S=this.options.parseSearch(x.search),b=this.options.stringifySearch(S);return x.search=b,{href:x.href.replace(x.origin,""),publicHref:f,pathname:e0(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:b,search:Qu(r==null?void 0:r.search,S),hash:e0(x.hash.slice(1)).path,state:uf(r==null?void 0:r.state,p)}},i=s(t),{__tempLocation:o,__tempKey:a}=i.state;if(o&&(!a||a===this.tempLocationKey)){const l=s(o);return l.state.key=i.state.key,l.state.__TSR_key=i.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:i}}return i},this.resolvePathWithBase=(t,r)=>RG({base:t,to:r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,r,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:r},s):this.matchRoutesInternal(t,r),this.getMatchedRoutes=t=>{const r=Object.create(null),s=CG(Dl(t),this.processedTree,!0);return s&&Object.assign(r,s.rawParams),[(s==null?void 0:s.branch)||[this.routesById.__root__],r,s==null?void 0:s.route]},this.buildLocation=t=>{const r=(i={})=>{var R,O;if(i.href){const I=H1(i.href,{});i={...i,to:o4(this.rewrite,new URL(I.pathname,this.origin)).pathname,search:this.options.parseSearch(I.search),hash:I.hash.slice(1)}}const o=i._fromLocation||this._pendingLocation||this.latestLocation,a=this.matchRoutesLightweight(o);i.from;const l=i.unsafeRelative==="path"?o.pathname:i.from??a[1],u=a[2],_=a[3],f=this.resolvePathWithBase(l,i.to?`${i.to}`:".");let p=m9(i.params,_);const m=this.routesByPath[Dl(f)];let x;if(m)x=this.getRouteBranch(m);else if(f.includes("$"))x=[];else{const[I,F,U]=this.getMatchedRoutes(f);x=I,this.options.notFoundRoute&&(!U||U.path!=="/"&&F["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&uM(p))for(const I of x){const F=((R=I.options.params)==null?void 0:R.stringify)??I.options.stringifyParams;if(F){p===_&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,F(p))}catch{}}}const S=t.leaveParams?f:e0(o9({path:f,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let b=u;if(t._includeValidateSearch&&((O=this.options.search)!=null&&O.strict)){const I={};x.forEach(F=>{if(F.options.validateSearch)try{Object.assign(I,p1(F.options.validateSearch,{...I,...b}))}catch{}}),b=I}b=iW(b,i,x,t._includeValidateSearch),b=Qu(u,b);const v=this.options.stringifySearch(b),y=i.hash===!0?o.hash:i.hash?Mh(i.hash,o.hash):void 0,w=y?`#${y}`:"";let C=i.state===!0?o.state:i.state?Mh(i.state,o.state):{};i.state&&(C=uf(o.state,C));const N=`${S}${v}${w}`;let E,j,z=!1;if(this.rewrite){const I=new URL(N,this.origin),F=bM(this.rewrite,I);E=I.href.replace(I.origin,""),F.origin!==this.origin?(j=F.href,z=!0):j=F.pathname+F.search+F.hash}else E=bG(N),j=E;return{publicHref:j,href:E,pathname:S,search:b,searchStr:v,state:C,hash:y??"",external:z,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=SG(s.pathname,this.processedTree);if(i){const o=Object.assign(Object.create(null),i.rawParams),{from:a,params:l,...u}=i.route,_=m9(l,o);s.maskedLocation=r({from:t.from,...u,params:_})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const o=Dl(this.latestLocation.href)===Dl(s.href)&&iu(p9(s.state),p9(this.latestLocation.state)),a=this._commitPromise;let l;const u=new Promise(_=>{l=_});if(u.resolve=()=>{l(),a==null||a.resolve()},this._commitPromise=u,o)this.load();else{let{maskedLocation:_,hashScrollIntoView:f,...p}=s;_&&(p={..._,state:{..._.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,i=s.replace?"REPLACE":"PUSH",this.history[i==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=s.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:t,resetScroll:r,hashScrollIntoView:s,viewTransition:i,ignoreBlocker:o,...a}={})=>{const l=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=l;const u=this.commitLocation({...l,viewTransition:i,replace:t,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:o});return queueMicrotask(()=>{this._pendingLocation===l&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:r,href:s,publicHref:i,...o})=>{var l,u;let a=!1;if(s)try{new URL(`${s}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(t!==void 0||!s){const f=this.buildLocation({to:t,...o});s=s??f.publicHref,i=i??f.publicHref}const _=!a&&i?i:s;if($1(_,this.protocolAllowlist))return;if(!o.ignoreBlocker){const f=((u=(l=this.history).getBlockers)==null?void 0:u.call(l))??[];for(const p of f)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}o.replace?window.location.replace(_):window.location.href=_;return}return this.buildAndCommitLocation({...o,href:s,to:t,_isNavigate:!0})},this.load=async t=>{this.updateLatestLocation(),t!=null&&t.action&&(this._scroll.hash=t.action.type==="PUSH"||t.action.type==="REPLACE"),await _W(this,t)},this.startViewTransition=t=>{var s,i;const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&((i=(s=window.CSS)==null?void 0:s.supports)!=null&&i.call(s,"selector(:active-view-transition-type(a))"))){const a=this.latestLocation,l=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(Hv(a,l)):r.types;if(u===!1)return t();o={update:t,types:u}}else o=t;return document.startViewTransition(o).updateCallbackDone}return t()},this.invalidate=t=>{var u,_;const r=this._committed,s=t==null?void 0:t.filter,i=this._preloads,o=new Set([...r,...this._cache.values(),...[...(i==null?void 0:i.values())??[]].flat(),...((u=this._tx)==null?void 0:u[3])??[]].filter(f=>!s||s(f)).map(f=>f.id)),a=[];for(const[f,p]of i??[])p.some(m=>o.has(m.id))&&(i.delete(f),a.push(f));const l=f=>{if(o.has(f.id)){const p=this.routesById[f.routeId],m={...f,invalid:!0,...(t!=null&&t.forcePending||f.status==="error"||f.status==="notFound")&&_9(p)?{status:"pending",error:void 0}:void 0};return f._flight=void 0,m}return f};this._committed=r.map(l);for(const[f,p]of this._cache)o.has(f)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const f of o)(_=this._flights)==null||_.delete(f);for(const f of a)f.abort();return this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const r=t.headers.get("Location");if(t.options.href){if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const i=s.pathname+s.search+s.hash;t.options.href=i,t.headers.set("Location",i)}}catch{}}else{const s=this.buildLocation(t.options).publicHref||"/";t.options.href=s,t.headers.set("Location",s)}if(t.options.href&&$1(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{var u;const r=this._cache,s=this._preloads,i=t==null?void 0:t.filter,o=[],a=[];for(const[_,f]of r)(!i||i(f))&&(a.push(_),o.push(f));const l=[];for(const[_,f]of s??[])(!i||f.some(i))&&(l.push(_),o.push(...f));for(const _ of a)r.delete(_);for(const _ of l)s.delete(_);for(const _ of o){const f=_._flight;_._flight=void 0,f&&!--f[2]&&(((u=this._flights)==null?void 0:u.get(_.id))===f&&this._flights.delete(_.id),l.push(f[1]))}for(const _ of l)_.abort()},this.loadRouteChunk=ah,this.preloadRoute=t=>pW(this,t),this.matchRoute=(t,r)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},i=this.buildLocation(s),o=this.stores.status.get()==="pending";if(r!=null&&r.pending&&!o)return!1;const a=(r==null?void 0:r.pending)??!o?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=kG(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,a.pathname,this.processedTree);return!l||t.params&&!iu(l.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?iu(a.search,i.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??WG,parseSearch:e.parseSearch??GG,protocolAllowlist:e.protocolAllowlist??vG}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:n,processedTree:t}){this.routesById=e,this.routesByPath=n,this.processedTree=t;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let n=this.routeBranchCache.get(e);return n||(n=pM(e),this.routeBranchCache.set(e,n)),n}matchRoutesInternal(e,n){var p,m;const[t,r,s]=this.getMatchedRoutes(e.pathname);let i=t,o=!1;(s?s.path!=="/"&&r["**"]:Dl(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:o=!0);const a=o?aW(this.options.notFoundMode,i):void 0,l=new Array(i.length),u=this._committed,_=(x,S)=>{const b=u[S];return(b==null?void 0:b.routeId)===x.id?b:x===this.options.notFoundRoute?u.find(v=>v.routeId===x.id):void 0};let f;for(let x=0;x{const m=p(l.preSearchFilters?l.preSearchFilters.reduce((x,S)=>S(x),f):f);return l.postSearchFilters?l.postSearchFilters.reduce((x,S)=>S(x),m):m};s.push(_)}const u=l.validateSearch;if(r&&u){const _=({search:f,next:p,meta:m})=>{const x=p(f);try{const S=p1(u,x);if(m&&S)for(const b in S)b in x||(m.defaulted||(m.defaulted=new Map)).set(b,S[b]);return{...x,...S}}catch{}return x};s.push(_)}}const i=(a,l,u)=>{if(a>=s.length){if(!n.search)return{};if(n.search===!0)return l;const f=Mh(n.search,l);return u&&(u.explicit=f),f}const _=(f,p)=>{if(p){const m=u||{};return{search:i(a+1,f,m),meta:m}}return i(a+1,f,u)};return s[a]({search:l,next:_,meta:u})};return i(0,e)}function aW(e,n){if(e!=="root"){let t;for(let r=n.length-1;r>=0;r--){const s=n[r];if(s.options.notFoundComponent)return s.id;t||(t=s.children&&s.id)}if(t)return t}return ih}function m9(e,n){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return n;const t=Object.assign(Object.create(null),n);return Object.assign(t,Mh(e,t))}function g9(e,n){var r;const t=((r=e.options.params)==null?void 0:r.parse)??e.options.parseParams;t&&Object.assign(n,t(n))}function l4(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function oW(e,n){const t=l4(e,"component");let r=l4(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function ah(e,n,t){const r=()=>n===!1?void 0:n?l4(e,n):oW(e,t),s=e._lazy;if(s)return s===!0?r():s.then(r);if(!e.lazyFn)return r();const i=e.lazyFn().then(o=>{{const{id:a,...l}=o.options;Object.assign(e.options,l),e._lazy=!0}},o=>{throw e._lazy=void 0,o});return e._lazy=i,i.then(r)}function N3(e){const n=e.findIndex(t=>t.status!=="success"||t._notFound)+1;return n&&n{const s=()=>r(n);n.addEventListener("abort",s,{once:!0}),Promise.resolve(e).then(t,r).finally(()=>n.removeEventListener("abort",s))})}function Wf(e,n){return e.routesById[n.routeId]}function H0(e,n,t){return vM(e)?[Pi,e]:Dh(e)?(e.routeId||(e.routeId=t),[qv,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[Fl,e]):[Ao,e]}function z3(e,n){var r,s;let t=H0(n,!0,e.id);if(t[0]!==Fl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=H0(i,!0,e.id)}return t}function E0(e,n,t,r,s){return s[0].signal.aborted?uu:A3(e,n,t,z3(t,r),s)}async function lW(e,n,t,r,s,i){var _,f;const[o,a]=n,l=t[0].signal,u=!!t[3];for(let p=t[6]??0;pe.navigate({...C,_fromLocation:o}),buildLocation:e.buildLocation,cause:u?"preload":m.cause,abortController:t[0],preload:u,matches:a,routeId:x.id};try{const C=m._ctx||(m._ctx=x.options.context?x.options.context({...b,deps:m.loaderDeps,context:S})||{}:void 0);m.context={...S,...C}}catch(C){return Ll(e,m),[p,E0(e,n,x,C,t)]}if(l.aborted)return[p,uu];const v=m.paramsError??m.searchError;if(v!==void 0)return Ll(e,m),[p,E0(e,n,x,v,t)];const y=x.options.beforeLoad;if(!y)continue;const w=m.status;p>=i&&(m.status="pending",(f=t[7])==null||f.call(t));try{q0(e,m,"beforeLoad",t[0]);const C=await Gf(y({...b,search:m.search,context:m.context,...e.options.additionalContext}),l);if(l.aborted)return[p,uu];const N=A3(e,n,x,H0(C,!1,x.id),t);if(N[0]!==Ao)return Ll(e,m),[p,N];m.context={...m.context,...C}}catch(C){return Ll(e,m),[p,E0(e,n,x,C,t)]}finally{m.status=w,q0(e,m,!1,t[0])}}s()}function T3(e,n,t){var r;if(!(!t||--t[2])){if(((r=e._flights)==null?void 0:r.get(n.id))===t){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(n)&&s[3].some(i=>i.id===n.id)&&s[3].some(i=>i.isFetching==="beforeLoad"))return;e._flights.delete(n.id)}return t[1]}}function Ll(e,n){var r;const t=n._flight;n._flight=void 0,(r=T3(e,n,t))==null||r.abort()}function bi(e,n,t,r){var i;const s=[];for(const o of n)if(!(t!=null&&t.includes(o))){const a=o._flight;if(o._flight=void 0,r&&(a==null?void 0:a[2])===1&&((i=e._flights)==null?void 0:i.get(o.id))===a&&(t!=null&&t.some(l=>l.id===o.id)))a[2]=0;else{const l=T3(e,o,a);l&&s.push(l)}}for(const o of s)o.abort()}function j3(e){for(const n of e){const t=n._flight;t&&t[2]++}}function q0(e,n,t,r){var o;if(n.isFetching=t,r&&((o=e._tx)==null?void 0:o[0])!==r)return;const s=e.stores.byRoute.get(n.routeId),i=s==null?void 0:s.get();(i==null?void 0:i.id)===n.id&&s.set({...i,isFetching:t})}function yM(e,n,t,r,s,i,o){const a=n[0];return{params:t.params,location:a,navigate:l=>e.navigate({...l,_fromLocation:a}),cause:o?"preload":t.cause,abortController:s,preload:o,deps:t.loaderDeps,parentMatchPromise:i,context:t.context,route:r,...e.options.additionalContext}}async function v9(e,n,t,r,s,i,o){const a=o[0],l=a.signal;if(l.aborted)return uu;if(!s)return[Ao,void 0];let u=t._flight;q0(e,t,"loader",a);try{if(!u){const _=new AbortController;u=[Promise.resolve().then(()=>s(yM(e,n,t,r,_,i,!!o[3]))).then(f=>H0(f,!1,r.id),f=>H0(f,!0,r.id)).then(f=>{var p;return f[0]!==Ao&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||_.abort()),f[0]===Fl&&u[2]?z3(r,f[1]):f}),_,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],A3(e,n,r,await Gf(u[0],l),o)}catch(_){if(_!==l||!l.aborted)throw _;return Ll(e,t),uu}finally{q0(e,t,!1,a)}}function b9(e,n,t){n[0]!==Pi&&(e.status="success",e.error=void 0,n[0]===Ao?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function cW(e,n,t){const r=e._cache.get(n.id);if(r!==t||e._committed.some(i=>i.id===n.id&&i._flight===n._flight))return;const s={...n,_notFound:void 0,context:{}};s._flight&&s._flight[2]++,e._cache.set(n.id,s),r&&Ll(e,r)}function y9(e,n){return n[0]===Fl||n[0]===qv?{...e,status:n[0]===Fl?"error":"notFound",error:n[1],_flight:void 0}:e}function uW(e,n,t,r,s,i,o){var F,U;const a=n[1][t],l=Wf(e,a),u=!!i[3],_=e._cache.get(a.id);let f,p=!1,m;try{if(a.status==="success"&&(f=l.options.shouldReload,typeof f=="function"&&(f=f(yM(e,n,a,l,i[0],s,u))),i[0].signal.aborted&&(m=uu)),!m)if(a.status!=="success")p=!0;else{const q=u||a.preload?l.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.options.defaultStaleTime??0;p=!!(a.invalid||f||f===void 0&&Date.now()-a.updatedAt>=q&&(i[5]||a.cause==="enter"||i[2].some(Y=>Y.routeId===a.routeId&&Y.id!==a.id)))}}catch(q){a.invalid=!0,Ll(e,a),m=E0(e,n,l,q,i)}const x=l.options.loader,S=typeof x=="function",b=S?x:x==null?void 0:x.handler,v=!u||l.options.preload!==!1;let y=v&&x?(F=e._flights)==null?void 0:F.get(a.id):void 0;y===a._flight||m?y=void 0:y&&!p&&!u&&f===void 0?p=!0:p||(y=void 0);const w=!!(x&&p&&a.status==="success"&&!u&&!i[4]&&((S?void 0:x.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&v,N=C&&!w&&(a.status!=="success"||!!x),E=t>=o?i[7]:void 0,j=l.lazyFn&&l._lazy!==!0?E:void 0;if(C&&!x&&(a.invalid=!1,a.updatedAt=Date.now()),y&&y[2]++,N){const q=a._flight;a._flight=y,(U=T3(e,a,q))==null||U.abort(),t>=o&&(a.status="pending"),E==null||E()}C||(a.isFetching=!1);const z=(m?Promise.resolve(m):N?v9(e,n,a,l,b,s,i):Promise.resolve([Ao,a.loaderData])).then(q=>(N&&(b9(a,q,u),q[0]===Ao&&(x&&!i[0].signal.aborted&&cW(e,a,_),t>=o&&(a.status="pending"))),q)),R=Gf(Promise.resolve().then(()=>ah(l,void 0,j)),i[0].signal).then(()=>{},q=>n[1].some((Y,V)=>V<=t&&(Y.status==="error"||Y.status==="notFound"||Y._notFound))?void 0:[t,E0(e,n,l,q,i)]).then(q=>z.then(Y=>(N&&!q&&Y[0]===Ao&&a.status==="pending"&&!i[0].signal.aborted&&(a.status="success",E==null||E()),q)));if(r.push([t,z,R]),!w)return z.then(q=>y9(a,q));const O={...a,status:"pending",preload:!1,_flight:y};a.invalid=!1,a.isFetching="loader";const I=v9(e,n,O,l,b,s,i).then(q=>(a.isFetching=!1,b9(O,q,!1),q));return(n[2]??(n[2]=[])).push([t,I,R,O]),I.then(q=>y9(O,q))}async function c4(e,n,t,r,s=0){const i=t==null?void 0:t[1][1];let o=i!=null&&i.routeId?n.findIndex(a=>a.routeId===i.routeId):(t==null?void 0:t[0])??n.length-1;o<0&&(o=0);for(let a=o;a>=0;a--){const l=Wf(e,n[a]);try{const u=ah(l,!1);u&&await Gf(u,r)}catch(u){if(u===r&&r.aborted)throw u}if(l.options.notFoundComponent)return a}return i!=null&&i.routeId?o:s}function Nf(e,n){n[2]&&(bi(e,n[2].map(t=>t[3])),n[2]=void 0)}async function x9(e,n,t,r){let s;try{await Promise.all(e.map(i=>i[1].then(async o=>{const a=i[0];if(!(r&&a>=await r)){if(o[0]>=Pi)throw[a,o];!s&&o[0]!==Ao&&(s=[a,o],await Promise.all((t??[]).map(l=>{if(!(l[0]<=a))return l[1].then(u=>{if(u[0]===Pi)throw[l[0],u]})})))}})))}catch(i){return i}return n??s}function A3(e,n,t,r,s,i){for(;r[0]===Pi;){const o=r[1],a=o.options;if(a.reloadDocument?s[3]:s[1]>=20)return r;try{return a.href&&a.reloadDocument?(e.resolveRedirect(o),r):[Pi,o,e.buildLocation({...a,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(l){r=i?[Fl,l]:z3(t,l),i=!0}}return r}async function xM(e,n,t,r,s,i){const o=n[1];let a=await s,l=!1;const u=o.findIndex(m=>m._notFound),_=m=>m[1][0]===qv?c4(e,o,m,r.signal):m[0];let f=u<0?o.length:u;if(((a==null?void 0:a[1][0])??0)>=Pi)f=0;else if(a){f=a[2]??(a[2]=await _(a));for(const m of t){if(m[0]>=f)break;const x=await m[1];if(x[0]!==Ao&&x[0]=f)break;const x=await m[2];if(x){a=x;break}}if(((a==null?void 0:a[1][0])??0)>=Pi){const m=a[1];if(m[0]!==Pi||m[1].options.reloadDocument||m[2])return Nf(e,n),m;l=!0,a=[0,[Fl,new Error("Too many redirects")]]}const p=a?a[2]??await _(a):u;if(p>=0){const m=a==null?void 0:a[1],x=m==null?void 0:m[0],S=o[p],b=m==null?void 0:m[1],v=()=>{m&&(S._notFound=void 0,x===Fl?S.status="error":(b.routeId=S.routeId,S.routeId===e.routeTree.id?(S.status="success",S._notFound=!0):S.status="notFound"),S.error=b,S.isFetching=!1)};v(),m||i==null||i();const y=Wf(e,S);try{await Gf(m?Promise.resolve().then(()=>ah(y,x===Fl?"errorComponent":"notFoundComponent")):Promise.all([ah(y),ah(y,"notFoundComponent")]),r.signal)}catch(w){if(w===r.signal&&r.signal.aborted)return Nf(e,n),uu}m?l&&(r.abort(),await Promise.all([...t.map(w=>w[1]),...t.map(w=>w[2]),...(n[2]??[]).map(w=>w[1])]),Nf(e,n),bi(e,o),v()):S.status="success"}return n}async function wM(e,n,t,r=0,s=n[1].length){var o,a;const i=n[1];for(let l=r;ly._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const y=await c4(e,t,void 0,i,u);t[u]._notFound=void 0,t[y]._notFound=!0,u=y}let _=u<0?t.length:u+1,f=0;for(;f<_&&f!==u;){const y=t[f],w=r[2][f],C=l[f];if((w==null?void 0:w.id)!==y.id||w.status!=="success"||w._notFound||y.preload||(C==null?void 0:C.id)!==y.id||C.status!=="success"||C._notFound)break;f++}const p=[],m=r[6]??0;let x=m?Promise.resolve(t[m-1]):void 0;const S=()=>{for(let y=m;y<_&&!i.aborted;y++)x=uW(e,s,y,p,x,r,f)},b=await lW(e,s,r,_,S,f);if(b){if(r[4]=!0,_=b[0],b[1][0]===qv){const y=await c4(e,t,b,i);b[2]=y,_=Math.min(_,y+1)}else b[1][0]>=Pi&&(_=0);S()}if(!i.aborted&&!r[3]){const y=[];for(const[w,C]of e._flights??[])C[2]||(e._flights.delete(w),y.push(C[1]));for(const w of y)w.abort()}const v=xM(e,s,p,r[0],x9(p,b,s[2]),r[7]);(a=s[2])!=null&&a.length&&(s[3]=x9(s[2],void 0,void 0,v.then(y=>F0(y)?0:N3(t).length,()=>0))),o=await v}catch(l){if(Nf(e,s),l===i&&i.aborted)return uu;throw l}return F0(o)?o:wM(e,o,i,r[6]===t.length?r[6]:0)}function u4(e,n){var i,o;if(e._tx!==n)return;const t=n[3],r=e.stores.matches.get();let s=e._pending;for(let a=0;a0){s[3]=setTimeout(()=>u4(e,n),y);return}s[2]=0}const b=t.map(y=>({...y,_flight:void 0}));b[a].status="pending";const v=s[4]=e.startTransition(()=>e.stores.setMatches(b),b).then(y=>(y&&e._pending===s&&s[4]===v&&!s[2]&&(s[2]=Date.now()+x),y));return}}function t0(e,n){var r;const t=e._pending;(e._tx===n||!((r=e._tx)!=null&&r[3].some(s=>s.id===(t==null?void 0:t[1]))))&&(clearTimeout(t==null?void 0:t[3]),e._pending=void 0)}async function w9(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!N3(n[3]).some(i=>i.id===t[1]))return;let s;try{await Gf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function kM(e,n){e._committed=n,e.stores.setMatches(n)}function fW(e,n,t,r){const s=e._committed,i=e._cache;for(const l of t)l.preload=!1,r&&(l._assetEnd=void 0);const o=N3(t).length,a=new Map;{const l=Date.now();for(const u of[...s,...i.values()]){if(u.status!=="success"||t.some((f,p)=>f.id===u.id&&(p=(u.preload?_.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:_.options.gcTime??e.options.defaultGcTime??3e5)||a.set(u.id,i.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}}n[3]=[],e._cache=a,kM(e,t),bi(e,[...i.values(),...s],[...t,...a.values()]),nW(e,s,t,n)}async function yg(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function CM(e,n,t){const r=t[1].options,s=t[2];if(!s)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:s.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});s._redirects=n[1]+1,e._pendingLocation=s;const i=e.commitLocation({...s,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===s&&(e._pendingLocation=void 0)}),i}async function dW(e,n,t,r,s){const i=t.map(l=>({...l}));j3(i);for(const l of r)Ll(e,i[l[0]]),i[l[0]]=l[3];const o=[n[2],i];let a;try{a=await xM(e,o,r,n[0],s)}catch(l){throw bi(e,i),l}if(F0(a)){bi(e,i),a[0]===Pi&&e._tx===n&&e._committed===t&&await CM(e,n,a);return}if(await wM(e,a,n[0].signal),e._tx!==n||e._committed!==t){bi(e,i);return}for(const l of i){const u=e._cache.get(l.id);u!=null&&u._flight&&u._flight===l._flight&&(e._cache.delete(l.id),Ll(e,u))}kM(e,i),bi(e,t,i)}async function hW(e,n,t,r,s,i){const o=await SM(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(F0(o)){const f=o[0]===Pi&&e._tx===n;if((!f||o[1].options.reloadDocument)&&t0(e,n),bi(e,n[3]),n[3]=[],!f)return;if(e._tx!==n){t0(e,n);return}await CM(e,n,o);return}const a=o[1];if(e._tx===n&&await w9(e,n),e._tx!==n){t0(e,n),bi(e,a),Nf(e,o);return}const l=n[2],u=Hv(l,e.stores.resolvedLocation.get()),_=o[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await w9(e,n),e._tx!==n){t0(e,n),bi(e,a),Nf(e,o);return}const f=()=>{t0(e,n),fW(e,n,a,i),e._tx===n&&(e.emit({type:"onLoad",...u}),e._tx===n&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(f,a);if(e._tx!==n){Nf(e,o);return}_!=null&&_.length&&dW(e,n,a,_,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(l),e.stores.status.set("idle"),e._tx===n&&e.emit({type:"onResolved",...u}),p&&e._tx===n&&e.emit({type:"onRendered",...u})}),e._tx===n&&((m=e._commitPromise)==null||m.resolve(),e._commitPromise=void 0)})}async function _W(e,n){var C;const t=e._tx,r=e.stores.resolvedLocation.get(),s=r??e.stores.location.get(),i=e.latestLocation,o=e._pendingLocation,a=(o==null?void 0:o.href)===i.href?o._redirects??0:0,l=e._handoff,u=l==null?void 0:l[0](),_=new AbortController,f=e._preflight;if(e._preflight=_,u||l==null||l[1](),f==null||f.abort(),!_.signal.aborted){const N=Hv(i,r);e.emit({type:"onBeforeNavigate",...N}),_.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(_.signal.aborted){await yg(e,t);return}const p=s.href===i.href;let m=_;const x=e.matchRoutes(i,{_controller:_});j3(x);const S=u?l[1](x):void 0;if(S?m=u:u==null||u.abort(),_.signal.aborted){bi(e,x),await yg(e,t);return}e._preflight=void 0;let b;const v=()=>hW(e,w,p,()=>u4(e,w),n==null?void 0:n.sync,S),y=n!=null&&n.sync?new Promise(N=>b=N):Promise.resolve().then(v).then(),w=[m,a,i,x,Date.now(),y];if(e._tx=w,t){for(const N of e.stores.matches.get()){if(e._tx!==w)break;N.isFetching&&q0(e,N,!1)}t[0].abort(),bi(e,t[3],w[3],!0)}if(e._tx!==w){bi(e,w[3]),w[3]=[],b==null||b(),await yg(e,w);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(i)}),(S||!e._committed.length&&((C=x[0])==null?void 0:C.status)!=="success"&&!x.some(N=>N._notFound))&&u4(e,w),b==null||b(v()),await y,await yg(e,w)}async function pW(e,n){let t=e.buildLocation(n);for(let r=0;;r++){const s=e._committed,i=new AbortController;let o,a,l;try{try{o=e.matchRoutes(t,{_controller:i}),j3(o),a=(e._preloads??(e._preloads=new Map)).set(i,o),l=await SM(e,t,o,[i,r,s,!0])}finally{a&&(a=a.delete(i),bi(e,o)),i.abort()}if(!F0(l))return l[1];if(!a||l.length<3)return;t=l[2]}catch(u){Dh(u)||console.error(u);return}}}const mW="Error preloading route! ☝️";var EM=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=n=>{var l,u;this.originalIndex=n.originalIndex;const t=this.options,r=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),r?this._path=ih:this.parentRoute||k3();let s=r?ih:t==null?void 0:t.path;s&&s!=="/"&&(s=mM(s));const i=(t==null?void 0:t.id)||s;let o=r?ih:d1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),o!=="__root__"&&(o=d1(["/",o]));const a=o==="__root__"?"/":d1([this.parentRoute.fullPath,s]);this._path=s,this._id=o,this._fullPath=a,this._to=Dl(a)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>QG({from:this.fullPath,...n}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},gW=class extends EM{constructor(e){super(e)}},R3=class extends M.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,n){const t=e.getResetKey();return n.error&&n.resetKey!==t?{resetKey:t,error:null}:{resetKey:t}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,n){var t,r;(r=(t=this.props).onCatch)==null||r.call(t,e,n)}render(){const e=this.state.error;return e?M.createElement(this.props.errorComponent??vW,{error:e,reset:this.reset}):this.props.children}};function vW({error:e}){const[n,t]=M.useState(!1);return h.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[h.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),h.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(r=>!r),children:n?"Hide Error":"Show Error"})]}),h.jsx("div",{style:{height:".25rem"}}),n?h.jsx("div",{children:h.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?h.jsx("code",{children:e.message}):null})}):null]})}function bW({children:e,fallback:n=null}){return h.jsx(Xe.Fragment,{children:NM()?e:n})}function NM(){return Xe.useSyncExternalStore(yW,()=>!0,()=>!1)}function yW(){return()=>{}}var zM=M.createContext(null);function ri(e){return M.useContext(zM)}var Uv=M.createContext(void 0),xW=M.createContext(void 0),mr=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(mr||{});function wW({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:o,shallowPropagate:a};function r(u,_,f){const p=_.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:_.deps;if(m!==void 0&&m.dep===u){m.version=f,_.depsTail=m;return}const x=u.subsTail;if(x!==void 0&&x.version===f&&x.sub===_)return;const S=_.depsTail=u.subsTail={version:f,dep:u,sub:_,prevDep:p,nextDep:m,prevSub:x,nextSub:void 0};m!==void 0&&(m.prevDep=S),p!==void 0?p.nextDep=S:_.deps=S,x!==void 0?x.nextSub=S:u.subs=S}function s(u,_=u.sub){const f=u.dep,p=u.prevDep,m=u.nextDep,x=u.nextSub,S=u.prevSub;return m!==void 0?m.prevDep=p:_.depsTail=p,p!==void 0?p.nextDep=m:_.deps=m,x!==void 0?x.prevSub=S:f.subsTail=S,S!==void 0?S.nextSub=x:(f.subs=x)===void 0&&t(f),m}function i(u){let _=u.nextSub,f;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&l(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&n(p),m&1){const x=p.subs;if(x!==void 0){const S=(u=x).nextSub;S!==void 0&&(f={value:_,prev:f},_=S);continue}}if((u=_)!==void 0){_=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){_=u.nextSub;continue e}break}while(!0)}function o(u,_){let f,p=0,m=!1;e:do{const x=u.dep,S=x.flags;if(_.flags&16)m=!0;else if((S&17)===17){if(e(x)){const b=x.subs;b.nextSub!==void 0&&a(b),m=!0}}else if((S&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(f={value:u,prev:f}),u=x.deps,_=x,++p;continue}if(!m){const b=u.nextDep;if(b!==void 0){u=b;continue}}for(;p--;){const b=_.subs,v=b.nextSub!==void 0;if(v?(u=f.value,f=f.prev):u=b,m){if(e(_)){v&&a(b),_=u.sub;continue}m=!1}else _.flags&=-33;_=u.sub;const y=u.nextDep;if(y!==void 0){u=y;continue e}}return m}while(!0)}function a(u){do{const _=u.sub,f=_.flags;(f&48)===32&&(_.flags=f|16,(f&6)===2&&n(_))}while((u=u.nextSub)!==void 0)}function l(u,_){let f=_.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function SW(e,n,t){var i,o,a;const r=typeof e=="object",s=r?e:void 0;return{next:(i=r?e.next:e)==null?void 0:i.bind(s),error:(o=r?e.error:n)==null?void 0:o.bind(s),complete:(a=r?e.complete:t)==null?void 0:a.bind(s)}}const f4=[];let m1=0;const{link:S9,unlink:kW,propagate:CW,checkDirty:TM,shallowPropagate:k9}=wW({update(e){return e._update()},notify(e){f4[d4++]=e,e.flags&=~mr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=mr.Mutable|mr.Dirty,U1(e))}});let xg=0,d4=0,So,h4=0;function EW(e){try{++h4,e()}finally{--h4||jM()}}function U1(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=kW(t,e)}function jM(){if(!(h4>0)){for(;xg{var u;s.get(),a.current?(u=o.next)==null||u.call(o,s._snapshot):a.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(i){const o=So,a=(n==null?void 0:n.compare)??Object.is;if(t)So=s,++m1,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=mr.Mutable|mr.RecursedCheck);try{const l=s._snapshot,u=typeof i=="function"?i(l):i===void 0&&t?r(l):i;return l===void 0||!a(l,u)?(s._snapshot=u,!0):!1}finally{So=o,t&&(s.flags&=~mr.RecursedCheck),U1(s)}}};return t?(s.flags=mr.Mutable|mr.Dirty,s.get=function(){const i=s.flags;if(i&mr.Dirty||i&mr.Pending&&TM(s.deps,s)){if(s._update()){const o=s.subs;o!==void 0&&k9(o)}}else i&mr.Pending&&(s.flags=i&~mr.Pending);return So!==void 0&&S9(s,So,m1),s._snapshot}):s.set=function(i){if(s._update(i)){const o=s.subs;o!==void 0&&(CW(o),k9(o),jM())}},s}function NW(e){const n=()=>{const r=So;So=t,++m1,t.depsTail=void 0,t.flags=mr.Watching|mr.RecursedCheck;try{return e()}finally{So=r,t.flags&=~mr.RecursedCheck,U1(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:mr.Watching|mr.RecursedCheck,notify(){const r=this.flags;r&mr.Dirty||r&mr.Pending&&TM(this.deps,this)?n():this.flags=mr.Watching},stop(){this.flags=mr.None,this.depsTail=void 0,U1(this)}};return n(),t}var t2={exports:{}},n2={},r2={exports:{}},s2={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var E9;function zW(){if(E9)return s2;E9=1;var e=Pp();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function a(f,p){var m=p(),x=r({inst:{value:m,getSnapshot:p}}),S=x[0].inst,b=x[1];return i(function(){S.value=m,S.getSnapshot=p,l(S)&&b({inst:S})},[f,m,p]),s(function(){return l(S)&&b({inst:S}),f(function(){l(S)&&b({inst:S})})},[f]),o(m),m}function l(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!t(f,m)}catch{return!0}}function u(f,p){return p()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return s2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,s2}var N9;function TW(){return N9||(N9=1,r2.exports=zW()),r2.exports}/** - * @license React - * use-sync-external-store-shim/with-selector.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var z9;function jW(){if(z9)return n2;z9=1;var e=Pp(),n=TW();function t(u,_){return u===_&&(u!==0||1/u===1/_)||u!==u&&_!==_}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,i=e.useRef,o=e.useEffect,a=e.useMemo,l=e.useDebugValue;return n2.useSyncExternalStoreWithSelector=function(u,_,f,p,m){var x=i(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=a(function(){function v(E){if(!y){if(y=!0,w=E,E=p(E),m!==void 0&&S.hasValue){var j=S.value;if(m(j,E))return C=j}return C=E}if(j=C,r(w,E))return j;var z=p(E);return m!==void 0&&m(j,z)?(w=E,j):(w=E,C=z)}var y=!1,w,C,N=f===void 0?null:f;return[function(){return v(_())},N===null?void 0:function(){return v(N())}]},[_,f,p,m]);var b=s(u,x[0],x[1]);return o(function(){S.hasValue=!0,S.value=b},[b]),l(b),b},n2}var T9;function AW(){return T9||(T9=1,t2.exports=jW()),t2.exports}var AM=AW();const RW=$p(AM);function MW(e,n){return e===n}function Do(e,n,t=MW){const r=M.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:a}=e.subscribe(o);return a},[e]),s=M.useCallback(()=>e==null?void 0:e.get(),[e]);return AM.useSyncExternalStoreWithSelector(r,s,s,n,t)}var j9={};function M3(e,n){const t=M.useRef();return r=>{const s=e!=null&&e.select?e.select(r):r;return(e==null?void 0:e.structuralSharing)??n.options.defaultStructuralSharing?t.current=uf(t.current,s):s}}function Vf(e){const n=ri(),t=M.useContext(e.from?xW:Uv),r=e.from??t,s=n.stores.getMatchStore(r),i=M3(e,n),o=Do(s,a=>a?i(a):j9);if(o!==j9)return o;(e.shouldThrow??!0)&&k3()}function RM(e){return Vf({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function MM(e){const{select:n,...t}=e;return Vf({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function DM(e){return Vf({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const t=e.strict===!1?n.params:n._strictParams;return e.select?e.select(t):t}})}function LM(e){return Vf({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Gv(e){const n=ri();return M.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function D3(e){return Vf({...e,select:n=>e.select?e.select(n.context):n.context})}function i2(e){const n=M.useRef(e);return iu(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function DW(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function LW(e,n,t){if(e!=null&&e.external)return $1(e.href,t)?void 0:e.href;if(!HW(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),$1(n,t)?void 0:n}catch{}}function OW(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!AG(e.pathname,n.pathname,r))return!1}else{const o=F1(e.pathname,r),a=F1(n.pathname,r);if(!(o.startsWith(a)&&(o.length===a.length||o[a.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!iu(e.search,n.search,{partial:!(t!=null&&t.exact),ignoreUndefined:!(t!=null&&t.explicitUndefined)})?!1:t!=null&&t.includeHash?s&&e.hash===n.hash:!0}function IW(e,n){const t=ri(),r=hG(n),{activeProps:s,inactiveProps:i,activeOptions:o,to:a,preload:l,preloadDelay:u,preloadIntentProximity:_,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:x,viewTransition:S,children:b,target:v,disabled:y,style:w,className:C,onClick:N,onBlur:E,onFocus:j,onMouseEnter:z,onMouseLeave:R,onTouchStart:O,ignoreBlocker:I,params:F,search:U,hash:q,state:Y,mask:V,reloadDocument:Z,unsafeRelative:te,from:P,_fromLocation:L,...$}=e,H=NM(),G=i2(e.search),ne=i2(e.params),oe=i2(o),le=M.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,G,ne,e.state,e.mask,e.unsafeRelative]),se=M.useCallback(tt=>{const mt=t.buildLocation({_fromLocation:tt,...le}),At=FW(mt.maskedLocation?mt.maskedLocation.publicHref:mt.publicHref,mt.maskedLocation?mt.maskedLocation.external:mt.external,t.history,y),ke=LW(At,a,t.protocolAllowlist);return[At==null?void 0:At.href,ke,OW(tt,mt,oe,t.basepath,H,ke!==void 0)]},[oe,y,H,le,t,a]),[Q,ce,ee]=Do(t.stores.location,se,DW),ue=ee?Mh(s,{})??BW:a2,de=ee?a2:Mh(i,{})??a2,ye=[C,ue.className,de.className].filter(Boolean).join(" "),Ae=(w||ue.style||de.style)&&{...w,...ue.style,...de.style},Ve=M.useRef(!1),Ge=e.reloadDocument||ce||y?!1:l??t.options.defaultPreload,$e=u??t.options.defaultPreloadDelay??0,ut=M.useCallback(()=>{t.preloadRoute(le).catch(tt=>{console.warn(tt),console.warn(mW)})},[t,le]),pt=M.useCallback(tt=>{if(!tt){o2(r);return}if(!(tt.isIntersecting??Ge==="intent")){tt.isIntersecting===!1&&o2(r);return}if(!$e){ut();return}N0.has(r)||N0.set(r,setTimeout(()=>{N0.delete(r),ut()},$e))},[ut,r,Ge,$e]);dG(r,pt,Ge!=="viewport"),M.useEffect(()=>{Ve.current||Ge==="render"&&(ut(),Ve.current=!0)},[ut,Ge]);const Ut=tt=>{const mt=tt.currentTarget.getAttribute("target"),At=v!==void 0?v:mt;!y&&!(tt.metaKey||tt.altKey||tt.ctrlKey||tt.shiftKey)&&!tt.defaultPrevented&&(!At||At==="_self")&&tt.button===0&&(tt.preventDefault(),t.navigate({...le,replace:p,resetScroll:x,hashScrollIntoView:f,startTransition:m,viewTransition:S,ignoreBlocker:I}))};if(ce)return{...$,ref:r,href:ce,...b&&{children:b},...v&&{target:v},...y&&{disabled:y},...w&&{style:w},...C&&{className:C},...N&&{onClick:N},...E&&{onBlur:E},...j&&{onFocus:j},...z&&{onMouseEnter:z},...R&&{onMouseLeave:R},...O&&{onTouchStart:O}};const It=()=>{Ge==="intent"&&ut()},$t=()=>{Ge==="intent"&&o2(r)};return{...$,...ue,...de,href:Q,ref:r,onClick:Id([N,Ut]),onBlur:Id([E,$t]),onFocus:Id([j,pt]),onMouseEnter:Id([z,pt]),onMouseLeave:Id([R,$t]),onTouchStart:Id([O,It]),disabled:!!y,target:v,...Ae&&{style:Ae},...ye&&{className:ye},...y&&$W,...ee&&PW}}var a2={},BW={className:"active"},$W={role:"link","aria-disabled":!0},PW={"data-status":"active","aria-current":"page"},N0=new WeakMap,o2=e=>{clearTimeout(N0.get(e)),N0.delete(e)},Id=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function FW(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function HW(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var Wv=M.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=IW(r,n),o=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!t){const{disabled:a,...l}=i;return M.createElement("a",l,o)}return M.createElement(t,i,o)}),qW=class extends EM{constructor(n){super(n),this.useMatch=t=>Vf({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>D3({...t,from:this.id}),this.useSearch=t=>LM({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>DM({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>MM({...t,from:this.id}),this.useLoaderData=t=>RM({...t,from:this.id}),this.useNavigate=()=>Gv({from:this.fullPath}),this.Link=Xe.forwardRef((t,r)=>h.jsx(Wv,{ref:r,from:this.fullPath,...t}))}};function UW(e){return new qW(e)}function GW(){return e=>VW(e)}var WW=class extends gW{constructor(e){super(e),this.useMatch=n=>Vf({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>D3({...n,from:this.id}),this.useSearch=n=>LM({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>DM({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>MM({...n,from:this.id}),this.useLoaderData=n=>RM({...n,from:this.id}),this.useNavigate=()=>Gv({from:this.fullPath}),this.Link=Xe.forwardRef((n,t)=>h.jsx(Wv,{ref:t,from:this.fullPath,...n}))}};function VW(e){return new WW(e)}function $o(e){return n=>{const t=UW(n);return t.isRoot=!1,t}}function KW(e){const n=ri(),t=`not-found-${Do(n.stores.location,r=>r.pathname)}-${Do(n.stores.status,r=>r)}`;return h.jsx(R3,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(Dh(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Dh(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function QW(){return h.jsx("p",{children:"Not Found"})}function Gd(e){return h.jsx(h.Fragment,{children:e.children})}function OM(e,n,t){return n.options.notFoundComponent?h.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?h.jsx(e.options.defaultNotFoundComponent,{...t}):h.jsx(QW,{})}function Vv(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?h.jsx(t,{}):null}var YW=(e,n)=>e[0]===n[0]&&e[1]===n[1],IM=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,BM=M.memo(function({routeId:n}){const t=ri();return h.jsx(XW,{router:t,match:Do(t.stores.getMatchStore(n),r=>r)})});function XW({router:e,match:n}){var f,p;const t=e.routesById[n.routeId],r=Vv(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,i=t.options.onCatch??e.options.defaultOnCatch,o=t.isRoot?t.options.notFoundComponent??((f=e.options.notFoundRoute)==null?void 0:f.options.component):t.options.notFoundComponent,a=n.ssr===!1||n.ssr==="data-only",l=IM(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||a))?M.Suspense:Gd,u=s?R3:Gd,_=o?KW:Gd;return h.jsxs(t.isRoot?t.options.shellComponent??Gd:Gd,{children:[h.jsx(Uv.Provider,{value:n.routeId,children:h.jsx(l,{fallback:r,children:h.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,x)=>{if(Dh(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,x)},children:h.jsx(_,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return M.createElement(o,m)},children:a?h.jsx(bW,{fallback:r,children:h.jsx(A9,{match:n})}):h.jsx(A9,{match:n})})})})}),null]})}var A9=M.memo(function({match:n}){const t=ri(),r=n.routeId,s=t.routesById[r],i=M.useMemo(()=>{var l;const a=(l=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:l({routeId:r,loaderDeps:n.loaderDeps,params:n._strictParams,search:n._strictSearch});return a?JSON.stringify(a):void 0},[r,n.loaderDeps,n._strictParams,n._strictSearch,s.options.remountDeps,t.options.defaultRemountDeps]),o=M.useMemo(()=>{const a=s.options.component??t.options.defaultComponent;return a?h.jsx(a,{},i):h.jsx(U0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!IM(t,s,n.ssr))return o;if(t._tx)throw t._tx[5];return Vv(t,s)}if(n.status==="notFound")return OM(t,s,n.error);if(n.status==="error")throw n.error;return o}),U0=M.memo(function(){const n=ri(),t=M.useContext(Uv);let r,s,i;{const a=n.stores.getMatchStore(t);[r,s]=Do(a,l=>[!!l._notFound,l.error],YW),i=Do(n.stores.ids,l=>l[l.indexOf(t)+1])}if(r)return OM(n,n.routesById[t],s);if(!i)return null;const o=h.jsx(BM,{routeId:i});return t===ih?h.jsx(M.Suspense,{fallback:Vv(n),children:o}):o});function $M(e,n){const t=e[1];e.length=0,t==null||t(n)}function ZW({t:e}){const n=ri(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{$M(t,!1),t.push(s,i),e(n),M.startTransition(r)}),lM(()=>{const r=n.history.subscribe(n.load);n.updateLatestLocation();const s=n.latestLocation,i=n.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Dl(s.publicHref)!==Dl(i.publicHref))return n.commitLocation({...i,replace:!0,ignoreBlocker:!0}),r;const o=n.stores.resolvedLocation.get();return(o==null?void 0:o.href)===s.href&&o.state.__TSR_key===s.state.__TSR_key?t.push(n.stores.matches.get(),a=>{a&&n.emit({type:"onRendered",...Hv(o,o)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function JW(){const e=ri(),n=e.routesById[ih],t=Vv(e,n),r=e.ssr?Gd:M.Suspense,s=h.jsxs(h.Fragment,{children:[h.jsx(ZW,{t:M.useState()[1]}),h.jsx(r,{fallback:t,children:h.jsx(eV,{})})]});return e.options.InnerWrap?h.jsx(e.options.InnerWrap,{children:s}):s}function eV(){const e=ri(),n=e._rendered,t=Do(e.stores.matches,o=>n[0]??o),r=t[0],s=r==null?void 0:r.routeId;lM(()=>{n[0]===t&&$M(n,!0)},[n,t]);const i=s?h.jsx(BM,{routeId:s}):null;return h.jsx(Uv.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:h.jsx(R3,{getResetKey:()=>r,onCatch:void 0,children:i})})}var tV=e=>({createMutableStore:C9,createReadonlyStore:C9,batch:EW}),nV=e=>new rV(e),rV=class extends rW{constructor(e){super(e,tV)}};function sV({router:e,children:n,...t}){uM(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=h.jsx(zM.Provider,{value:e,children:n});return e.options.Wrap?h.jsx(e.options.Wrap,{children:r}):r}function iV({router:e,...n}){return h.jsx(sV,{router:e,...n,children:h.jsx(JW,{})})}function aV(e,n){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const t=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>t&&r!==void 0?await r():t,enableBeforeUnload:t,withResolver:r===void 0}}function oV(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=aV(e),o=ri(),{history:a}=o,[l,u]=M.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return M.useEffect(()=>{const _=async f=>{function p(v){const y=o.parseLocation(v),[,w,C]=o.getMatchedRoutes(y.pathname);return C===void 0?{routeId:"__notFound__",fullPath:y.pathname,pathname:y.pathname,params:w,search:o.options.parseSearch(v.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:y.pathname,params:w,search:o.options.parseSearch(v.search)}}const m=p(f.currentLocation),x=p(f.nextLocation);if(m.routeId==="__notFound__"&&x.routeId!=="__notFound__")return!1;const S=await t({action:f.action,current:m,next:x});if(!i)return S;if(!S)return!1;const b=await new Promise(v=>{u({status:"blocked",current:m,next:x,action:f.action,proceed:()=>v(!1),reset:()=>v(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),b};return s?void 0:a.block({blockerFn:_,enableBeforeUnload:r})},[t,r,s,i,a,o]),l}function PM(e){const n=ri({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return Do(t.stores.__store,M3(e,t))}function lV(e){const n=ri();return Do(n.stores.location,M3(e,n))}const G1=new WeakMap,g1=new WeakMap;function Ga(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))G1.set(s,(G1.get(s)??0)+1),(r=g1.get(s))==null||r.add(t)}function Fp(e,n,t,r=!0){if(!n)return e;const s=new Map(n.map(l=>[l.id,l])),i=new Set(e.map(l=>l.id)),o=n.filter(l=>t.has(l.id)&&!i.has(l.id)),a=e.filter(l=>!t.has(l.id)||s.has(l.id)).map(l=>t.has(l.id)?s.get(l.id)??l:l);return r?[...o,...a]:[...a,...o]}async function e_(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?G1.get(s):void 0,o=await t();if(!s||G1.get(s)===i||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:n,exact:!0})!==s)return o;e.setQueryData(n,l=>l??o);const a=new Set;g1.set(s,a);try{const l=await t();return a.size?r(l,e.getQueryData(n),a):l}finally{g1.get(s)===a&&g1.delete(s)}}const Lh=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function FM(e){const n=e.queryKey[2];if(n==="resolvedFile")return Lh(e.queryKey[7]);const t=n==="getProjectFile"?e.queryKey[5]:n==="getCodeTree"?e.queryKey[4]:null;return typeof t=="object"&&t!==null&&"ref"in t&&Lh(t.ref)}function va(e,n=Ca(),t,r=!1){if(!Mn(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!FM(i)&&(!t||t(i))};r?Je.cancelQueries(s).then(()=>{Mn(n)&&Je.invalidateQueries(s)}):Je.invalidateQueries(s)}const HM=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],L3=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],cV=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...L3,...HM,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function uV(e,n=Ca(),t=!1){const r=Je.getQueryData([...n,"listChatSessions",e])??[],s=Je.getQueryData([...n,"listRuns",e])??[],i=Je.getQueryData([...n,"listExperiments",e])??[];va([...HM,...L3,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],n,o=>{const a=o.queryKey[2];return a==="getRunDiff"?s.some(l=>l.id===o.queryKey[3]):a==="getExperimentDiff"?i.some(l=>l.id===o.queryKey[3]):a==="getSessionWorktree"?r.some(l=>l.id===o.queryKey[3]):a==="fileVersion"?typeof o.queryKey[3]=="string"&&o.queryKey[3].startsWith(`/api/projects/${e}/`):o.queryKey[3]===e},t)}function Kv(e){const n=Ca();cu.add(e),Ga(Je,[...n,"listChatSessions"],e),Je.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])S3({queryKey:[...n,t,e]})}function fV(e){const n=Ca(),t=Je.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])Kv(r.id);S3({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const dV={hf:["getHfSettings","getComputeSettings","getEnvVars"],tinker:["getTinkerSettings","getComputeSettings","getEnvVars"],k8s:["getK8sSettings","getComputeSettings"],modal:["getModalSettings","getComputeSettings","getEnvVars"],slurm:["getSlurmSettings","getComputeSettings"],ray:["getRaySettings","getComputeSettings"],env:["getEnvVars","getHfSettings","getTinkerSettings","getModalSettings","getSlurmSettings","getRaySettings","getK8sSettings","getOpenResearchSettings","getComputeSettings","getHarnesses"],"data-dir":["getDataDir"],ssh:["getSshHosts","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function hV(e,n){var o;if(!Mn(n))return;const t=(a,l=n,u)=>va(a,l,u,!0),r=e.split("?")[0];if(/\/(ui-state|open|prewarm|validate|preflight)$/.test(r))return;const s=(o=/^\/api\/settings\/([^/]+)/.exec(r))==null?void 0:o[1];if(s){t(dV[s]??[],n);return}if(r==="/api/user-skills"){t(["listUserSkills","getSkills","getSkillContent"],n);return}if(r==="/api/latex-templates"){t(["listLatexTemplates"],n);return}if(r==="/api/overleaf/token"){t(["getOverleafSettings","getOverleafState","getOverleafStatus"],n);return}if(r.startsWith("/api/update/")){t(["getUpdateStatus","getLocalMachine"],n);return}if(r.startsWith("/api/remote/")||r.startsWith("/_orx/")){t(["listRemoteSessions"],n),Je.invalidateQueries({queryKey:["gateway","runtime"]});return}if(r.startsWith("/api/chat/")){r==="/api/chat/sessions"&&t(["getProjectStarterPrompts","listProjectActivity"],n);return}const i=/^\/api\/projects\/([^/]+)(.*)$/.exec(r);if(i){const[,a,l]=i;if(l.startsWith("/file")){uV(a,n,!0);return}t(["listProjects","listProjectActivity"],n),t(["getProjectGitStatus","getCodeTree","getProjectStarterPrompts"],n,u=>u.queryKey[3]===a);return}(r==="/api/projects"||r==="/api/onboarding/complete")&&t(["listProjects","listProjectActivity","getUiState","getProfile"],n)}const _V={},pV="en",O3=["en","zh-CN","fa"],qM="orx:locale",I3=["localStorage","preferredLanguage","baseLocale"],R9=[],G0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let M9=!1,T=()=>{var t;let e=I3;!G0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=WM(window.location.href));const n=mV(e);if(n)return M9||(M9=!0,UM(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function mV(e,n){let t;for(const r of e){if(r==="baseLocale")t=pV;else if(r==="preferredLanguage"&&!G0)t=xV();else if(r==="localStorage"&&!G0)t=localStorage.getItem(qM)??void 0;else if(VM(r)&&W1.has(r)){const i=W1.get(r);if(i){const o=i.getLocale();if(o instanceof Promise)continue;if(o!==void 0)return bV(o)}}const s=W0(t);if(s)return s}}const gV=e=>{window.location.reload()};let UM=(e,n)=>{var a;const t={reload:!0,...n};let r;try{r=T()}catch{}const s=[];let i=I3;!G0&&typeof window<"u"&&((a=window.location)!=null&&a.href)&&(i=WM(window.location.href));for(const l of i)if(l!=="baseLocale"){if(l==="localStorage"&&typeof window<"u")localStorage.setItem(qM,e);else if(VM(l)&&W1.has(l)){const u=W1.get(l);if(u){let _=u.setLocale(e);_ instanceof Promise&&(_=_.catch(f=>{throw new Error(`Custom strategy "${l}" setLocale failed.`,{cause:f})}),s.push(_))}}}const o=()=>{!G0&&t.reload&&window.location&&e!==r&&gV()};if(s.length)return Promise.all(s).then(()=>{o()});o()},vV=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function W0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of O3)if(t.toLowerCase()===n)return t}function GM(e){return!!e&&O3.some(n=>n===e)}function bV(e){const n=W0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${O3.join(", ")}`)}function yV(e,n){return e.exec(n.href)}function xV(){var n;if(!((n=navigator==null?void 0:navigator.languages)!=null&&n.length))return;const e=navigator.languages.map(t=>({fullTag:t,baseTag:t.split("-")[0]}));for(const t of e){const r=W0(t.fullTag);if(r)return r;const s=W0(t.baseTag);if(s)return s}}function wV(e){return SV(e)}function SV(e){const n=typeof e=="string"?new URL(e,vV()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&W0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let D9,L9;function kV(e){if(R9.length===0)return;const n=typeof e=="string"?e:e.href;if(D9===n)return L9;const t=new URL(n,"http://example.com"),r=wV(t),s=r.href===t.href?[t]:[t,r];let i;for(const o of s){for(const a of R9){const l=new _V(a.match,o.href);if(yV(l,o)){i=a;break}}if(i)break}return D9=n,L9=i,i}function WM(e){const n=kV(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:I3}const W1=new Map;function VM(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const CV=e=>`Actions for ${e==null?void 0:e.name}`,EV=e=>`${e==null?void 0:e.name} 的操作`,NV=e=>`عملیات ${e==null?void 0:e.name}`,zV=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?EV(e):t==="fa"?NV(e):CV(e)}),TV=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,jV=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,AV=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,RV=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?jV(e):t==="fa"?AV(e):TV(e)}),MV=e=>`Branch: ${e==null?void 0:e.branch}`,DV=e=>`分支:${e==null?void 0:e.branch}`,LV=e=>`شاخه: ${e==null?void 0:e.branch}`,OV=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?DV(e):t==="fa"?LV(e):MV(e)}),IV=e=>`Browse code on ${e==null?void 0:e.branch}`,BV=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,$V=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,KM=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?BV(e):t==="fa"?$V(e):IV(e)}),PV=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,FV=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,HV=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,qV=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?FV(e):t==="fa"?HV(e):PV(e)}),UV=e=>`Collapse ${e==null?void 0:e.name}`,GV=e=>`折叠 ${e==null?void 0:e.name}`,WV=e=>`بستن ${e==null?void 0:e.name}`,VV=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?GV(e):t==="fa"?WV(e):UV(e)}),KV=e=>`Committed changes versus ${e==null?void 0:e.parent}`,QV=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,YV=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,XV=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?QV(e):t==="fa"?YV(e):KV(e)}),ZV=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,JV=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,eK=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,tK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?JV(e):t==="fa"?eK(e):ZV(e)}),nK=e=>`Copy ${e==null?void 0:e.value}`,rK=e=>`复制 ${e==null?void 0:e.value}`,sK=e=>`کپی ${e==null?void 0:e.value}`,iK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?rK(e):t==="fa"?sK(e):nK(e)}),aK=e=>`Delete ${e==null?void 0:e.name}`,oK=e=>`删除 ${e==null?void 0:e.name}`,lK=e=>`حذف ${e==null?void 0:e.name}`,_4=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?oK(e):t==="fa"?lK(e):aK(e)}),cK=e=>`Download ${e==null?void 0:e.name}`,uK=e=>`下载 ${e==null?void 0:e.name}`,fK=e=>`بارگیری ${e==null?void 0:e.name}`,O9=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?uK(e):t==="fa"?fK(e):cK(e)}),dK=e=>`Expand ${e==null?void 0:e.name}`,hK=e=>`展开 ${e==null?void 0:e.name}`,_K=e=>`باز کردن ${e==null?void 0:e.name}`,pK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?hK(e):t==="fa"?_K(e):dK(e)}),mK=e=>`Hide additional ${e==null?void 0:e.target}`,gK=e=>`隐藏其余${e==null?void 0:e.target}`,vK=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,bK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?gK(e):t==="fa"?vK(e):mK(e)}),yK=e=>`Hide error details for ${e==null?void 0:e.activity}`,xK=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,wK=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,SK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?xK(e):t==="fa"?wK(e):yK(e)}),kK=e=>`${e==null?void 0:e.count} consecutive identical calls`,CK=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,EK=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,NK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?CK(e):t==="fa"?EK(e):kK(e)}),zK=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,TK=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,jK=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,AK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?TK(e):t==="fa"?jK(e):zK(e)}),RK=e=>`Open ${e==null?void 0:e.branch} on GitHub`,MK=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,DK=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,QM=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?MK(e):t==="fa"?DK(e):RK(e)}),LK=e=>`Open experiment ${e==null?void 0:e.name}`,OK=e=>`打开实验 ${e==null?void 0:e.name}`,IK=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,BK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?OK(e):t==="fa"?IK(e):LK(e)}),$K=e=>`Open ${e==null?void 0:e.path} in the right pane`,PK=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,FK=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,HK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?PK(e):t==="fa"?FK(e):$K(e)}),qK=e=>`Open ${e==null?void 0:e.name}`,UK=e=>`打开 ${e==null?void 0:e.name}`,GK=e=>`باز کردن ${e==null?void 0:e.name}`,WK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?UK(e):t==="fa"?GK(e):qK(e)}),VK=e=>`Open logs for run ${e==null?void 0:e.run}`,KK=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,QK=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,YK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?KK(e):t==="fa"?QK(e):VK(e)}),XK=e=>`Open ${e==null?void 0:e.name} on GitHub`,ZK=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,JK=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,V1=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?ZK(e):t==="fa"?JK(e):XK(e)}),eQ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,tQ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,nQ=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,rQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?tQ(e):t==="fa"?nQ(e):eQ(e)}),sQ=e=>`Overleaf — ${e==null?void 0:e.status}`,iQ=e=>`Overleaf — ${e==null?void 0:e.status}`,aQ=e=>`Overleaf — ${e==null?void 0:e.status}`,oQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?iQ(e):t==="fa"?aQ(e):sQ(e)}),lQ=e=>`Preview /${e==null?void 0:e.name} skill`,cQ=e=>`预览 /${e==null?void 0:e.name} 技能`,uQ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,fQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cQ(e):t==="fa"?uQ(e):lQ(e)}),dQ=e=>`Remove annotation ${e==null?void 0:e.number}`,hQ=e=>`移除批注 ${e==null?void 0:e.number}`,_Q=e=>`حذف یادداشت ${e==null?void 0:e.number}`,pQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?hQ(e):t==="fa"?_Q(e):dQ(e)}),mQ=e=>`Remove ${e==null?void 0:e.name}`,gQ=e=>`移除 ${e==null?void 0:e.name}`,vQ=e=>`حذف ${e==null?void 0:e.name}`,bQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?gQ(e):t==="fa"?vQ(e):mQ(e)}),yQ=e=>`Remove queued message: ${e==null?void 0:e.text}`,xQ=e=>`移除排队消息:${e==null?void 0:e.text}`,wQ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,SQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?xQ(e):t==="fa"?wQ(e):yQ(e)}),kQ=e=>`Retry queued message: ${e==null?void 0:e.text}`,CQ=e=>`重试排队消息:${e==null?void 0:e.text}`,EQ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,NQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?CQ(e):t==="fa"?EQ(e):kQ(e)}),zQ=e=>`Run ${e==null?void 0:e.id}`,TQ=e=>`运行 ${e==null?void 0:e.id}`,jQ=e=>`اجرای ${e==null?void 0:e.id}`,AQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?TQ(e):t==="fa"?jQ(e):zQ(e)}),RQ=e=>`Show error details for ${e==null?void 0:e.activity}`,MQ=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,DQ=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,LQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?MQ(e):t==="fa"?DQ(e):RQ(e)}),OQ=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,IQ=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,BQ=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,$Q=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?IQ(e):t==="fa"?BQ(e):OQ(e)}),PQ=e=>`${e==null?void 0:e.name} skill`,FQ=e=>`${e==null?void 0:e.name} 技能`,HQ=e=>`مهارت ${e==null?void 0:e.name}`,qQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?FQ(e):t==="fa"?HQ(e):PQ(e)}),UQ=e=>`Value for ${e==null?void 0:e.name}`,GQ=e=>`${e==null?void 0:e.name} 的值`,WQ=e=>`مقدار ${e==null?void 0:e.name}`,VQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?GQ(e):t==="fa"?WQ(e):UQ(e)}),KQ=()=>"Agent reported back",QQ=()=>"智能体已返回结果",YQ=()=>"عامل نتیجه را گزارش کرد",XQ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QQ():t==="fa"?YQ():KQ()}),ZQ=()=>"Browse",JQ=()=>"浏览",eY=()=>"مرور",tY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?JQ():t==="fa"?eY():ZQ()}),nY=()=>"Browsing…",rY=()=>"正在浏览…",sY=()=>"در حال مرور…",iY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rY():t==="fa"?sY():nY()}),aY=()=>"Checked experiment status and updated notes",oY=()=>"已检查实验状态并更新笔记",lY=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",cY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oY():t==="fa"?lY():aY()}),uY=()=>"Closed an agent",fY=()=>"已关闭智能体",dY=()=>"عامل بسته شد",hY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fY():t==="fa"?dY():uY()}),_Y=()=>"Compacted context",pY=()=>"上下文已压缩",mY=()=>"زمینه فشرده شد",gY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pY():t==="fa"?mY():_Y()}),vY=()=>"Compacting context…",bY=()=>"正在压缩上下文…",yY=()=>"در حال فشرده‌سازی زمینه…",xY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bY():t==="fa"?yY():vY()}),wY=e=>`Created ${e==null?void 0:e.target}`,SY=e=>`已创建 ${e==null?void 0:e.target}`,kY=e=>`${e==null?void 0:e.target} ایجاد شد`,CY=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?SY(e):t==="fa"?kY(e):wY(e)}),EY=()=>"Delegate",NY=()=>"委派",zY=()=>"واگذاری",TY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?NY():t==="fa"?zY():EY()}),jY=()=>"Delegating…",AY=()=>"正在委派…",RY=()=>"در حال واگذاری…",MY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?AY():t==="fa"?RY():jY()}),DY=e=>`Deleted ${e==null?void 0:e.target}`,LY=e=>`已删除 ${e==null?void 0:e.target}`,OY=e=>`${e==null?void 0:e.target} حذف شد`,IY=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?LY(e):t==="fa"?OY(e):DY(e)}),BY=()=>"Edit",$Y=()=>"编辑",PY=()=>"ویرایش",FY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Y():t==="fa"?PY():BY()}),HY=e=>`Edited ${e==null?void 0:e.target}`,qY=e=>`已编辑 ${e==null?void 0:e.target}`,UY=e=>`${e==null?void 0:e.target} ویرایش شد`,GY=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?qY(e):t==="fa"?UY(e):HY(e)}),WY=()=>"Editing…",VY=()=>"正在编辑…",KY=()=>"در حال ویرایش…",QY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VY():t==="fa"?KY():WY()}),YY=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,XY=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,ZY=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,JY=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?XY(e):t==="fa"?ZY(e):YY(e)}),eX=e=>`Listed files matching ${e==null?void 0:e.pattern}`,tX=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,nX=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,rX=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?tX(e):t==="fa"?nX(e):eX(e)}),sX=()=>"Load",iX=()=>"加载",aX=()=>"بارگیری",oX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iX():t==="fa"?aX():sX()}),lX=()=>"Loaded a skill",cX=()=>"已加载技能",uX=()=>"یک مهارت بارگیری شد",fX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cX():t==="fa"?uX():lX()}),dX=e=>`Loaded ${e==null?void 0:e.name} skill`,hX=e=>`已加载技能 ${e==null?void 0:e.name}`,_X=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,pX=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?hX(e):t==="fa"?_X(e):dX(e)}),mX=()=>"Loading…",gX=()=>"正在加载…",vX=()=>"در حال بارگیری…",bX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gX():t==="fa"?vX():mX()}),yX=e=>`Opened ${e==null?void 0:e.target}`,xX=e=>`已打开 ${e==null?void 0:e.target}`,wX=e=>`${e==null?void 0:e.target} باز شد`,SX=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?xX(e):t==="fa"?wX(e):yX(e)}),kX=e=>`Ran ${e==null?void 0:e.command}`,CX=e=>`已运行 ${e==null?void 0:e.command}`,EX=e=>`${e==null?void 0:e.command} اجرا شد`,NX=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?CX(e):t==="fa"?EX(e):kX(e)}),zX=()=>"Ran a sub-agent",TX=()=>"已运行子智能体",jX=()=>"یک عامل فرعی اجرا شد",AX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TX():t==="fa"?jX():zX()}),RX=()=>"Read",MX=()=>"读取",DX=()=>"خواندن",LX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MX():t==="fa"?DX():RX()}),OX=()=>"Read experiment notes",IX=()=>"已读取实验笔记",BX=()=>"یادداشت‌های آزمایش خوانده شد",$X=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IX():t==="fa"?BX():OX()}),PX=()=>"Read a paper",FX=()=>"已读取论文",HX=()=>"یک مقاله خوانده شد",qX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FX():t==="fa"?HX():PX()}),UX=e=>`Read ${e==null?void 0:e.name} skill`,GX=e=>`已读取技能 ${e==null?void 0:e.name}`,WX=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,l2=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?GX(e):t==="fa"?WX(e):UX(e)}),VX=e=>`Read ${e==null?void 0:e.target}`,KX=e=>`已读取 ${e==null?void 0:e.target}`,QX=e=>`${e==null?void 0:e.target} خوانده شد`,n0=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?KX(e):t==="fa"?QX(e):VX(e)}),YX=()=>"Read a web page",XX=()=>"已读取网页",ZX=()=>"یک صفحهٔ وب خوانده شد",JX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XX():t==="fa"?ZX():YX()}),eZ=()=>"Reading…",tZ=()=>"正在读取…",nZ=()=>"در حال خواندن…",rZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tZ():t==="fa"?nZ():eZ()}),sZ=()=>"Resumed an agent",iZ=()=>"已恢复智能体",aZ=()=>"عامل از سر گرفته شد",oZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iZ():t==="fa"?aZ():sZ()}),lZ=()=>"Review",cZ=()=>"查看",uZ=()=>"بازبینی",fZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cZ():t==="fa"?uZ():lZ()}),dZ=()=>"Reviewed run log",hZ=()=>"已查看运行日志",_Z=()=>"گزارش اجرا بازبینی شد",pZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hZ():t==="fa"?_Z():dZ()}),mZ=()=>"Reviewed run logs",gZ=()=>"已查看运行日志",vZ=()=>"گزارش‌های اجرا بازبینی شد",bZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gZ():t==="fa"?vZ():mZ()}),yZ=()=>"Reviewed experiment status and notes",xZ=()=>"已查看实验状态和笔记",wZ=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",SZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xZ():t==="fa"?wZ():yZ()}),kZ=()=>"Reviewing…",CZ=()=>"正在查看…",EZ=()=>"در حال بازبینی…",NZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CZ():t==="fa"?EZ():kZ()}),zZ=()=>"Run",TZ=()=>"运行",jZ=()=>"اجرا",AZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TZ():t==="fa"?jZ():zZ()}),RZ=()=>"Running…",MZ=()=>"正在运行…",DZ=()=>"در حال اجرا…",YM=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MZ():t==="fa"?DZ():RZ()}),LZ=()=>"Search",OZ=()=>"搜索",IZ=()=>"جست‌وجو",BZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OZ():t==="fa"?IZ():LZ()}),$Z=()=>"Searched alphaXiv full text",PZ=()=>"已搜索 alphaXiv 全文",FZ=()=>"متن کامل alphaXiv جست‌وجو شد",HZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PZ():t==="fa"?FZ():$Z()}),qZ=()=>"Searched alphaXiv semantically",UZ=()=>"已对 alphaXiv 进行语义搜索",GZ=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",WZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UZ():t==="fa"?GZ():qZ()}),VZ=()=>"Searched bioRxiv",KZ=()=>"已搜索 bioRxiv",QZ=()=>"bioRxiv جست‌وجو شد",YZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KZ():t==="fa"?QZ():VZ()}),XZ=()=>"Searched code",ZZ=()=>"已搜索代码",JZ=()=>"کد جست‌وجو شد",c2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZZ():t==="fa"?JZ():XZ()}),eJ=e=>`Searched code for “${e==null?void 0:e.pattern}”`,tJ=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,nJ=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,u2=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?tJ(e):t==="fa"?nJ(e):eJ(e)}),rJ=e=>`Searched images for “${e==null?void 0:e.query}”`,sJ=e=>`已搜索图片“${e==null?void 0:e.query}”`,iJ=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,aJ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?sJ(e):t==="fa"?iJ(e):rJ(e)}),oJ=()=>"Searched the literature",lJ=()=>"已搜索文献",cJ=()=>"منابع علمی جست‌وجو شد",I9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lJ():t==="fa"?cJ():oJ()}),uJ=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,fJ=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,dJ=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,hJ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?fJ(e):t==="fa"?dJ(e):uJ(e)}),_J=()=>"Searched OpenAlex",pJ=()=>"已搜索 OpenAlex",mJ=()=>"OpenAlex جست‌وجو شد",gJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pJ():t==="fa"?mJ():_J()}),vJ=e=>`Searched the web for “${e==null?void 0:e.query}”`,bJ=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,yJ=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,B9=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?bJ(e):t==="fa"?yJ(e):vJ(e)}),xJ=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,wJ=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,SJ=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,kJ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?wJ(e):t==="fa"?SJ(e):xJ(e)}),CJ=()=>"Searching…",EJ=()=>"正在搜索…",NJ=()=>"در حال جست‌وجو…",zJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?EJ():t==="fa"?NJ():CJ()}),TJ=()=>"Sent input to an agent",jJ=()=>"已向智能体发送输入",AJ=()=>"ورودی به عامل فرستاده شد",RJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jJ():t==="fa"?AJ():TJ()}),MJ=()=>"Spawned an agent",DJ=()=>"已创建智能体",LJ=()=>"یک عامل ساخته شد",OJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?DJ():t==="fa"?LJ():MJ()}),IJ=()=>"Sub-agent",BJ=()=>"子智能体",$J=()=>"عامل فرعی",PJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?BJ():t==="fa"?$J():IJ()}),FJ=()=>"Sub-agent interrupted",HJ=()=>"子智能体已中断",qJ=()=>"عامل فرعی متوقف شد",UJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?HJ():t==="fa"?qJ():FJ()}),GJ=()=>"Sub-agent started",WJ=()=>"子智能体已启动",VJ=()=>"عامل فرعی آغاز شد",KJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?WJ():t==="fa"?VJ():GJ()}),QJ=()=>"Updated experiment notes",YJ=()=>"已更新实验笔记",XJ=()=>"یادداشت‌های آزمایش به‌روز شد",ZJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YJ():t==="fa"?XJ():QJ()}),JJ=()=>"Waiting on an agent",eee=()=>"正在等待智能体",tee=()=>"در انتظار عامل",nee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eee():t==="fa"?tee():JJ()}),ree=e=>`Approval required: ${e==null?void 0:e.label}`,see=e=>`需要批准:${e==null?void 0:e.label}`,iee=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,$9=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?see(e):t==="fa"?iee(e):ree(e)}),aee=()=>"The CLI is retrying the turn.",oee=()=>"CLI 正在重试本轮。",lee=()=>"CLI در حال تلاش دوباره برای این نوبت است.",cee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oee():t==="fa"?lee():aee()}),uee=()=>"Continue is available.",fee=()=>"可以继续。",dee=()=>"ادامه در دسترس است.",hee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fee():t==="fa"?dee():uee()}),_ee=()=>"Retry is available.",pee=()=>"可以重试。",mee=()=>"تلاش دوباره در دسترس است.",gee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pee():t==="fa"?mee():_ee()}),vee=()=>"Running a tool",bee=()=>"正在运行工具",yee=()=>"در حال اجرای ابزار",xee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bee():t==="fa"?yee():vee()}),wee=()=>"Tool activity completed",See=()=>"工具活动已完成",kee=()=>"فعالیت ابزار کامل شد",Cee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?See():t==="fa"?kee():wee()}),Eee=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,Nee=e=>`工具活动失败:${e==null?void 0:e.labels}`,zee=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,Tee=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Nee(e):t==="fa"?zee(e):Eee(e)}),jee=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,Aee=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,Ree=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,Mee=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Aee(e):t==="fa"?Ree(e):jee(e)}),Dee=()=>"Turn did not finish.",Lee=()=>"本轮未完成。",Oee=()=>"این نوبت کامل نشد.",Iee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lee():t==="fa"?Oee():Dee()}),Bee=()=>"Artifacts",$ee=()=>"产物",Pee=()=>"خروجی‌ها",Fee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$ee():t==="fa"?Pee():Bee()}),Hee=()=>"Close panel",qee=()=>"关闭面板",Uee=()=>"بستن پنل",K1=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qee():t==="fa"?Uee():Hee()}),Gee=()=>"Current task",Wee=()=>"当前任务",Vee=()=>"وظیفهٔ فعلی",P9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wee():t==="fa"?Vee():Gee()}),Kee=()=>"Drag to resize panel",Qee=()=>"拖动以调整面板大小",Yee=()=>"برای تغییر اندازهٔ پنل بکشید",Xee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Qee():t==="fa"?Yee():Kee()}),Zee=()=>"Drag toward the center to restore panel",Jee=()=>"向中央拖动以恢复面板",ete=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",tte=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Jee():t==="fa"?ete():Zee()}),nte=()=>"Entire project",rte=()=>"整个项目",ste=()=>"کل پروژه",F9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rte():t==="fa"?ste():nte()}),ite=()=>"Expand panel",ate=()=>"展开面板",ote=()=>"گسترش پنل",H9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ate():t==="fa"?ote():ite()}),lte=e=>`Experiment filter: ${e==null?void 0:e.scope}`,cte=e=>`实验筛选:${e==null?void 0:e.scope}`,ute=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,fte=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cte(e):t==="fa"?ute(e):lte(e)}),dte=()=>"Experiment view",hte=()=>"实验视图",_te=()=>"نمای آزمایش",pte=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hte():t==="fa"?_te():dte()}),mte=()=>"Experiments",gte=()=>"实验",vte=()=>"آزمایش‌ها",bte=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gte():t==="fa"?vte():mte()}),yte=()=>"Files",xte=()=>"文件",wte=()=>"فایل‌ها",Ste=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xte():t==="fa"?wte():yte()}),kte=()=>"Filter experiments",Cte=()=>"筛选实验",Ete=()=>"فیلتر آزمایش‌ها",Nte=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cte():t==="fa"?Ete():kte()}),zte=()=>"Current task filtering is unavailable for unattributed experiments",Tte=()=>"存在无法归属的实验时,不能按当前任务筛选",jte=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",Ate=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tte():t==="fa"?jte():zte()}),Rte=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",Mte=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",Dte=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Lte=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mte():t==="fa"?Dte():Rte()}),Ote=()=>"Open a task to filter to its experiments",Ite=()=>"请打开一个任务以筛选其实验",Bte=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",$te=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ite():t==="fa"?Bte():Ote()}),Pte=()=>"projects",Fte=()=>"项目",Hte=()=>"پروژه‌ها",z0=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Fte():t==="fa"?Hte():Pte()}),qte=()=>"Restore panel",Ute=()=>"还原面板",Gte=()=>"بازگرداندن اندازهٔ پنل",q9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ute():t==="fa"?Gte():qte()}),Wte=()=>"Retry",Vte=()=>"重试",Kte=()=>"تلاش دوباره",Hi=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vte():t==="fa"?Kte():Wte()}),Qte=()=>"Select a project to browse its files.",Yte=()=>"选择一个项目以浏览其文件。",Xte=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Zte=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yte():t==="fa"?Xte():Qte()}),Jte=()=>"settings",ene=()=>"设置",tne=()=>"تنظیمات",nne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ene():t==="fa"?tne():Jte()}),rne=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,sne=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,ine=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,ane=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?sne(e):t==="fa"?ine(e):rne(e)}),one=()=>"Sub-agent",lne=()=>"子智能体",cne=()=>"عامل فرعی",une=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lne():t==="fa"?cne():one()}),fne=()=>"Table",dne=()=>"表格",hne=()=>"جدول",_ne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dne():t==="fa"?hne():fne()}),pne=()=>"Tree",mne=()=>"树状图",gne=()=>"درخت",vne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mne():t==="fa"?gne():pne()}),bne=e=>`Collapse ${e==null?void 0:e.name}`,yne=e=>`折叠 ${e==null?void 0:e.name}`,xne=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,wne=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?yne(e):t==="fa"?xne(e):bne(e)}),Sne=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,kne=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,Cne=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,B3=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?kne(e):t==="fa"?Cne(e):Sne(e)}),Ene=e=>`Delete folder ${e==null?void 0:e.name}`,Nne=e=>`删除文件夹 ${e==null?void 0:e.name}`,zne=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,Tne=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Nne(e):t==="fa"?zne(e):Ene(e)}),jne=e=>`Expand ${e==null?void 0:e.name}`,Ane=e=>`展开 ${e==null?void 0:e.name}`,Rne=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,Mne=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Ane(e):t==="fa"?Rne(e):jne(e)}),Dne=()=>"Binary or unsupported file — no inline preview.",Lne=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",One=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",Ine=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lne():t==="fa"?One():Dne()}),Bne=()=>"Copy path",$ne=()=>"复制路径",Pne=()=>"کپی مسیر",XM=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$ne():t==="fa"?Pne():Bne()}),Fne=()=>"Artifact not found",Hne=()=>"找不到产物",qne=()=>"خروجی پیدا نشد",Une=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hne():t==="fa"?qne():Fne()}),Gne=()=>"Open raw",Wne=()=>"打开原始文件",Vne=()=>"باز کردن فایل خام",Kne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wne():t==="fa"?Vne():Gne()}),Qne=()=>"Click an artifact to view it",Yne=()=>"点击产物即可查看",Xne=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Zne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yne():t==="fa"?Xne():Qne()}),Jne=()=>"Copy artifacts directory path",ere=()=>"复制产物目录路径",tre=()=>"کپی مسیر پوشهٔ خروجی‌ها",nre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ere():t==="fa"?tre():Jne()}),rre=()=>"Delete artifact",sre=()=>"删除产物",ire=()=>"حذف خروجی",U9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sre():t==="fa"?ire():rre()}),are=()=>"Delete folder",ore=()=>"删除文件夹",lre=()=>"حذف پوشه",cre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ore():t==="fa"?lre():are()}),ure=()=>"Failed to load:",fre=()=>"加载失败:",dre=()=>"بارگیری ناموفق بود:",hre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fre():t==="fa"?dre():ure()}),_re=()=>"File truncated — showing the first 512 KB.",pre=()=>"文件已截断——仅显示前 512 KB。",mre=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",gre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pre():t==="fa"?mre():_re()}),vre=()=>"Listing truncated — the folder has more artifacts.",bre=()=>"列表已截断——文件夹中还有更多产物。",yre=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",xre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bre():t==="fa"?yre():vre()}),wre=()=>"Loading…",Sre=()=>"正在加载…",kre=()=>"در حال بارگیری…",ZM=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sre():t==="fa"?kre():wre()}),Cre=()=>"Loading artifacts…",Ere=()=>"正在加载产物…",Nre=()=>"در حال بارگیری خروجی‌ها…",zre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ere():t==="fa"?Nre():Cre()}),Tre=()=>"Modified",jre=()=>"修改时间",Are=()=>"ویرایش‌شده",Rre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jre():t==="fa"?Are():Tre()}),Mre=()=>"No artifacts yet",Dre=()=>"尚无产物",Lre=()=>"هنوز خروجی‌ای وجود ندارد",Ore=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Dre():t==="fa"?Lre():Mre()}),Ire=()=>"Open raw in new tab",Bre=()=>"在新标签页中打开原始文件",$re=()=>"باز کردن فایل خام در زبانهٔ جدید",G9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bre():t==="fa"?$re():Ire()}),Pre=()=>"Storage settings",Fre=()=>"存储设置",Hre=()=>"تنظیمات ذخیره‌سازی",W9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Fre():t==="fa"?Hre():Pre()}),qre=()=>"This is the project's durable output space for reports, figures, images, CSVs, PDFs, and other research artifacts. Ask the agent for a write-up or add your own files:",Ure=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件:",Gre=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید:",Wre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ure():t==="fa"?Gre():qre()}),Vre=()=>"File too large to preview inline.",Kre=()=>"文件太大,无法内嵌预览。",Qre=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",Yre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kre():t==="fa"?Qre():Vre()}),Xre=()=>"This is the baseline branch, so there is no parent comparison.",Zre=()=>"这是基线分支,因此没有父分支可供比较。",Jre=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",ese=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zre():t==="fa"?Jre():Xre()}),tse=()=>"Failed to load changes:",nse=()=>"加载更改失败:",rse=()=>"بارگیری تغییرات ناموفق بود:",sse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nse():t==="fa"?rse():tse()}),ise=()=>"Loading changes…",ase=()=>"正在加载更改…",ose=()=>"در حال بارگیری تغییرات…",lse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ase():t==="fa"?ose():ise()}),cse=()=>"No committed changes from the parent branch.",use=()=>"与父分支相比没有已提交的更改。",fse=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",dse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?use():t==="fa"?fse():cse()}),hse=e=>`agent ${e==null?void 0:e.number}`,_se=e=>`智能体 ${e==null?void 0:e.number}`,pse=e=>`عامل ${e==null?void 0:e.number}`,V9=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?_se(e):t==="fa"?pse(e):hse(e)}),mse=()=>"agent sessions",gse=()=>"智能体会话",vse=()=>"نشست‌های عامل‌ها",bse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gse():t==="fa"?vse():mse()}),yse=()=>"All sessions",xse=()=>"所有会话",wse=()=>"همهٔ نشست‌ها",JM=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xse():t==="fa"?wse():yse()}),Sse=e=>`${e==null?void 0:e.count} annotations`,kse=e=>`${e==null?void 0:e.count} 条批注`,Cse=e=>`${e==null?void 0:e.count} یادداشت`,Ese=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?kse(e):t==="fa"?Cse(e):Sse(e)}),Nse=()=>"Archive",zse=()=>"归档",Tse=()=>"بایگانی",jse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zse():t==="fa"?Tse():Nse()}),Ase=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",Rse=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",Mse=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",Dse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rse():t==="fa"?Mse():Ase()}),Lse=()=>"Asked about selected text",Ose=()=>"已询问所选文本",Ise=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",Bse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ose():t==="fa"?Ise():Lse()}),$se=()=>"Attachment",Pse=()=>"附件",Fse=()=>"پیوست",Hse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pse():t==="fa"?Fse():$se()}),qse=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,Use=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,Gse=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,Wse=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Use(e):t==="fa"?Gse(e):qse(e)}),Vse=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",Kse=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",Qse=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",Yse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kse():t==="fa"?Qse():Vse()}),Xse=()=>"Wait for the turn to finish before running a command.",Zse=()=>"请等待本轮结束后再运行命令。",Jse=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",eie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zse():t==="fa"?Jse():Xse()}),tie=e=>`Exited with code ${e==null?void 0:e.code}`,nie=e=>`退出码 ${e==null?void 0:e.code}`,rie=e=>`با کد ${e==null?void 0:e.code} خارج شد`,sie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?nie(e):t==="fa"?rie(e):tie(e)}),iie=e=>`Command not run: ${e==null?void 0:e.error}`,aie=e=>`命令未运行:${e==null?void 0:e.error}`,oie=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,K9=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?aie(e):t==="fa"?oie(e):iie(e)}),lie=()=>"Collapse tool activity",cie=()=>"折叠工具活动",uie=()=>"بستن فعالیت ابزارها",fie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cie():t==="fa"?uie():lie()}),die=()=>"Continue",hie=()=>"继续",_ie=()=>"ادامه",pie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hie():t==="fa"?_ie():die()}),mie=e=>`Delete “${e==null?void 0:e.title}”? - -Its transcript will be permanently removed.`,gie=e=>`删除“${e==null?void 0:e.title}”? - -其对话记录将被永久移除。`,vie=e=>`«${e==null?void 0:e.title}» حذف شود؟ - -رونوشت آن برای همیشه حذف خواهد شد.`,bie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?gie(e):t==="fa"?vie(e):mie(e)}),yie=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,xie=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,wie=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,Sie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?xie(e):t==="fa"?wie(e):yie(e)}),kie=()=>"Could not exit Plan mode. Try again.",Cie=()=>"无法退出计划模式。请重试。",Eie=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",Nie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cie():t==="fa"?Eie():kie()}),zie=()=>"Expand tool activity",Tie=()=>"展开工具活动",jie=()=>"باز کردن فعالیت ابزارها",Aie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tie():t==="fa"?jie():zie()}),Rie=()=>"experiments",Mie=()=>"实验",Die=()=>"آزمایش‌ها",Lie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mie():t==="fa"?Die():Rie()}),Oie=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,Iie=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,Bie=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,$ie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Iie(e):t==="fa"?Bie(e):Oie(e)}),Pie=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,Fie=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,Hie=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,qie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Fie(e):t==="fa"?Hie(e):Pie(e)}),Uie=e=>`Message not sent: ${e==null?void 0:e.error}`,Gie=e=>`消息未发送:${e==null?void 0:e.error}`,Wie=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,Vie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Gie(e):t==="fa"?Wie(e):Uie(e)}),Kie=()=>"New session",Qie=()=>"新会话",Yie=()=>"نشست جدید",Q9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Qie():t==="fa"?Yie():Kie()}),Xie=()=>"No active sessions",Zie=()=>"没有活跃会话",Jie=()=>"نشست فعالی وجود ندارد",eae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zie():t==="fa"?Jie():Xie()}),tae=()=>"No activity",nae=()=>"无活动",rae=()=>"بدون فعالیت",sae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nae():t==="fa"?rae():tae()}),iae=()=>"No archived sessions",aae=()=>"没有已归档的会话",oae=()=>"نشست بایگانی‌شده‌ای وجود ندارد",lae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aae():t==="fa"?oae():iae()}),cae=()=>"No sessions yet",uae=()=>"还没有会话",fae=()=>"هنوز نشستی وجود ندارد",dae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uae():t==="fa"?fae():cae()}),hae=()=>"1 annotation",_ae=()=>"1 条批注",pae=()=>"۱ یادداشت",mae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_ae():t==="fa"?pae():hae()}),gae=()=>"Open sub-agent transcript",vae=()=>"打开子智能体记录",bae=()=>"باز کردن متن گفت‌وگوی عامل فرعی",yae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vae():t==="fa"?bae():gae()}),xae=()=>"About this demo",wae=()=>"关于此演示",Sae=()=>"دربارهٔ این نسخهٔ نمایشی",Y9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wae():t==="fa"?Sae():xae()}),kae=()=>"Accept and auto mode",Cae=()=>"接受并使用自动模式",Eae=()=>"پذیرش و حالت خودکار",Nae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cae():t==="fa"?Eae():kae()}),zae=()=>"Accept and bypass all",Tae=()=>"接受并跳过所有审批",jae=()=>"پذیرش و عبور از همهٔ تأییدها",Aae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tae():t==="fa"?jae():zae()}),Rae=()=>"Active",Mae=()=>"活跃",Dae=()=>"فعال",Lae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mae():t==="fa"?Dae():Rae()}),Oae=()=>"All",Iae=()=>"全部",Bae=()=>"همه",$ae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Iae():t==="fa"?Bae():Oae()}),Pae=()=>"Allow",Fae=()=>"允许",Hae=()=>"اجازه دادن",qae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Fae():t==="fa"?Hae():Pae()}),Uae=()=>"Approval required",Gae=()=>"需要批准",Wae=()=>"نیازمند تأیید",Vae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Gae():t==="fa"?Wae():Uae()}),Kae=()=>"Archived",Qae=()=>"已归档",Yae=()=>"بایگانی‌شده",X9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Qae():t==="fa"?Yae():Kae()}),Xae=()=>"Artifacts",Zae=()=>"产物",Jae=()=>"خروجی‌ها",eoe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zae():t==="fa"?Jae():Xae()}),toe=()=>"Ask about this",noe=()=>"询问此内容",roe=()=>"دربارهٔ این بپرسید",soe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?noe():t==="fa"?roe():toe()}),ioe=()=>"Attach a PDF or image",aoe=()=>"附加 PDF 或图片",ooe=()=>"پیوست PDF یا تصویر",Z9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aoe():t==="fa"?ooe():ioe()}),loe=()=>"Bash",coe=()=>"Bash",uoe=()=>"Bash",eD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?coe():t==="fa"?uoe():loe()}),foe=()=>"Browsed the web",doe=()=>"已浏览网页",hoe=()=>"وب مرور شد",J9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?doe():t==="fa"?hoe():foe()}),_oe=()=>"Built the project",poe=()=>"已构建项目",moe=()=>"پروژه ساخته شد",goe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?poe():t==="fa"?moe():_oe()}),voe=()=>"Cancel",boe=()=>"取消",yoe=()=>"لغو",xoe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?boe():t==="fa"?yoe():voe()}),woe=()=>"Cancelled an experiment run",Soe=()=>"已取消实验运行",koe=()=>"اجرای آزمایش لغو شد",Coe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Soe():t==="fa"?koe():woe()}),Eoe=()=>"Checked code style",Noe=()=>"已检查代码风格",zoe=()=>"سبک کد بررسی شد",Toe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Noe():t==="fa"?zoe():Eoe()}),joe=()=>"Checked compute options",Aoe=()=>"已检查算力选项",Roe=()=>"گزینه‌های رایانشی بررسی شد",Moe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Aoe():t==="fa"?Roe():joe()}),Doe=()=>"Checked experiment status",Loe=()=>"已检查实验状态",Ooe=()=>"وضعیت آزمایش بررسی شد",eE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Loe():t==="fa"?Ooe():Doe()}),Ioe=()=>"Checked Git status",Boe=()=>"已检查 Git 状态",$oe=()=>"وضعیت Git بررسی شد",Poe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Boe():t==="fa"?$oe():Ioe()}),Foe=()=>"Checked local times",Hoe=()=>"已查询当地时间",qoe=()=>"زمان‌های محلی بررسی شد",Uoe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hoe():t==="fa"?qoe():Foe()}),Goe=()=>"Checked market data",Woe=()=>"已查询市场数据",Voe=()=>"داده‌های بازار بررسی شد",Koe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Woe():t==="fa"?Voe():Goe()}),Qoe=()=>"Checked sports data",Yoe=()=>"已查询体育数据",Xoe=()=>"داده‌های ورزشی بررسی شد",Zoe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yoe():t==="fa"?Xoe():Qoe()}),Joe=()=>"Checked the weather",ele=()=>"已查询天气",tle=()=>"آب‌وهوا بررسی شد",nle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ele():t==="fa"?tle():Joe()}),rle=()=>"Checked types",sle=()=>"已检查类型",ile=()=>"نوع‌ها بررسی شد",ale=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sle():t==="fa"?ile():rle()}),ole=()=>"Clear annotations",lle=()=>"清除批注",cle=()=>"پاک کردن یادداشت‌ها",tE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lle():t==="fa"?cle():ole()}),ule=()=>"Customize",fle=()=>"自定义",dle=()=>"سفارشی‌سازی",hle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fle():t==="fa"?dle():ule()}),_le=()=>"Data sources",ple=()=>"数据源",mle=()=>"منابع داده",f2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ple():t==="fa"?mle():_le()}),gle=()=>"Delegated a task to a new agent",vle=()=>"已将任务委派给新智能体",ble=()=>"وظیفه به عامل جدید واگذار شد",yle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vle():t==="fa"?ble():gle()}),xle=()=>"Delete",wle=()=>"删除",Sle=()=>"حذف",tD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wle():t==="fa"?Sle():xle()}),kle=()=>"Deny",Cle=()=>"拒绝",Ele=()=>"رد کردن",Nle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cle():t==="fa"?Ele():kle()}),zle=()=>"Edit and re-send",Tle=()=>"编辑并重新发送",jle=()=>"ویرایش و ارسال دوباره",nE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tle():t==="fa"?jle():zle()}),Ale=()=>"Edit message",Rle=()=>"编辑消息",Mle=()=>"ویرایش پیام",Dle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rle():t==="fa"?Mle():Ale()}),Lle=()=>"Edited a file",Ole=()=>"已编辑文件",Ile=()=>"فایل ویرایش شد",rE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ole():t==="fa"?Ile():Lle()}),Ble=()=>"Exit Bash mode",$le=()=>"退出 Bash 模式",Ple=()=>"خروج از حالت Bash",sE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$le():t==="fa"?Ple():Ble()}),Fle=()=>"Exit Plan mode",Hle=()=>"退出计划模式",qle=()=>"خروج از حالت طرح",iE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hle():t==="fa"?qle():Fle()}),Ule=()=>"Experiments",Gle=()=>"实验",Wle=()=>"آزمایش‌ها",Vle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Gle():t==="fa"?Wle():Ule()}),Kle=()=>"Failed:",Qle=()=>"失败:",Yle=()=>"ناموفق:",$3=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Qle():t==="fa"?Yle():Kle()}),Xle=()=>"Files",Zle=()=>"文件",Jle=()=>"فایل‌ها",ece=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zle():t==="fa"?Jle():Xle()}),tce=()=>"Filter sessions",nce=()=>"筛选会话",rce=()=>"فیلتر نشست‌ها",aE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nce():t==="fa"?rce():tce()}),sce=()=>"is unavailable.",ice=()=>"不可用。",ace=()=>"در دسترس نیست.",oce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ice():t==="fa"?ace():sce()}),lce=()=>"Later queued messages will wait until this is retried or removed.",cce=()=>"后续排队的消息会等待此消息重试或移除。",uce=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",fce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cce():t==="fa"?uce():lce()}),dce=()=>"Listed files",hce=()=>"已列出文件",_ce=()=>"فایل‌ها فهرست شد",oE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hce():t==="fa"?_ce():dce()}),pce=()=>"Listed project runs",mce=()=>"已列出项目运行",gce=()=>"اجراهای پروژه فهرست شد",vce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mce():t==="fa"?gce():pce()}),bce=()=>"Listed projects",yce=()=>"已列出项目",xce=()=>"پروژه‌ها فهرست شد",wce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yce():t==="fa"?xce():bce()}),Sce=()=>"Loading conversation…",kce=()=>"正在加载对话…",Cce=()=>"در حال بارگیری گفتگو…",Ece=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kce():t==="fa"?Cce():Sce()}),Nce=()=>"Next version",zce=()=>"下一版本",Tce=()=>"نسخهٔ بعدی",lE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zce():t==="fa"?Tce():Nce()}),jce=()=>"Open the session this agent spawned",Ace=()=>"打开此智能体创建的会话",Rce=()=>"باز کردن نشست ساخته‌شده توسط این عامل",Mce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ace():t==="fa"?Rce():jce()}),Dce=()=>"Opened web pages",Lce=()=>"已打开网页",Oce=()=>"صفحه‌های وب باز شد",Ice=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lce():t==="fa"?Oce():Dce()}),Bce=()=>"Plan",$ce=()=>"计划",Pce=()=>"طرح",Fce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$ce():t==="fa"?Pce():Bce()}),Hce=()=>"Plan approved",qce=()=>"计划已批准",Uce=()=>"طرح تأیید شد",Gce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qce():t==="fa"?Uce():Hce()}),Wce=()=>"Plan rejected",Vce=()=>"计划已拒绝",Kce=()=>"طرح رد شد",Qce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vce():t==="fa"?Kce():Wce()}),Yce=()=>"Plan resolved",Xce=()=>"计划已处理",Zce=()=>"طرح تعیین تکلیف شد",Jce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xce():t==="fa"?Zce():Yce()}),eue=()=>"Plan revision requested",tue=()=>"已请求修改计划",nue=()=>"درخواست بازنگری طرح ثبت شد",rue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tue():t==="fa"?nue():eue()}),sue=()=>"Previous version",iue=()=>"上一版本",aue=()=>"نسخهٔ قبلی",cE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iue():t==="fa"?aue():sue()}),oue=()=>"Ran a command",lue=()=>"已运行命令",cue=()=>"فرمان اجرا شد",uue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lue():t==="fa"?cue():oue()}),fue=()=>"Ran tests",due=()=>"已运行测试",hue=()=>"آزمون‌ها اجرا شد",_ue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?due():t==="fa"?hue():fue()}),pue=()=>"Read a file",mue=()=>"已读取文件",gue=()=>"فایل خوانده شد",vue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mue():t==="fa"?gue():pue()}),bue=()=>"Read Git history",yue=()=>"已读取 Git 历史",xue=()=>"تاریخچهٔ Git خوانده شد",wue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yue():t==="fa"?xue():bue()}),Sue=()=>"Read project details",kue=()=>"已读取项目详情",Cue=()=>"جزئیات پروژه خوانده شد",Eue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kue():t==="fa"?Cue():Sue()}),Nue=()=>"Reject",zue=()=>"拒绝",Tue=()=>"رد کردن",jue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zue():t==="fa"?Tue():Nue()}),Aue=()=>"Remove",Rue=()=>"移除",Mue=()=>"حذف",Due=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rue():t==="fa"?Mue():Aue()}),Lue=()=>"Remove annotation",Oue=()=>"移除批注",Iue=()=>"حذف یادداشت",Bue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Oue():t==="fa"?Iue():Lue()}),$ue=()=>"Remove file",Pue=()=>"移除文件",Fue=()=>"حذف فایل",uE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pue():t==="fa"?Fue():$ue()}),Hue=()=>"Remove image",que=()=>"移除图片",Uue=()=>"حذف تصویر",fE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?que():t==="fa"?Uue():Hue()}),Gue=()=>"Remove queued message",Wue=()=>"移除排队消息",Vue=()=>"حذف پیام صف",dE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wue():t==="fa"?Vue():Gue()}),Kue=()=>"Rename",Que=()=>"重命名",Yue=()=>"تغییر نام",nD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Que():t==="fa"?Yue():Kue()}),Xue=()=>"Reviewed code changes",Zue=()=>"已审查代码更改",Jue=()=>"تغییرات کد بازبینی شد",efe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zue():t==="fa"?Jue():Xue()}),tfe=()=>"Run",nfe=()=>"运行",rfe=()=>"اجرا",hE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nfe():t==="fa"?rfe():tfe()}),sfe=()=>"Selected chat text",ife=()=>"已选聊天文本",afe=()=>"متن انتخاب‌شدهٔ گفتگو",ofe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ife():t==="fa"?afe():sfe()}),lfe=()=>"Selected text:",cfe=()=>"已选文本:",ufe=()=>"متن انتخاب‌شده:",ffe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cfe():t==="fa"?ufe():lfe()}),dfe=()=>"Send",hfe=()=>"发送",_fe=()=>"ارسال",p4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hfe():t==="fa"?_fe():dfe()}),pfe=()=>"Session options",mfe=()=>"会话选项",gfe=()=>"گزینه‌های نشست",_E=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mfe():t==="fa"?gfe():pfe()}),vfe=()=>"Session title",bfe=()=>"会话标题",yfe=()=>"عنوان نشست",xfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bfe():t==="fa"?yfe():vfe()}),wfe=()=>"Show sidebar",Sfe=()=>"显示侧边栏",kfe=()=>"نمایش نوار کناری",pE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sfe():t==="fa"?kfe():wfe()}),Cfe=()=>"Started an experiment run",Efe=()=>"已启动实验运行",Nfe=()=>"اجرای آزمایش آغاز شد",zfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Efe():t==="fa"?Nfe():Cfe()}),Tfe=()=>"Reading the project to suggest where to start…",jfe=()=>"正在阅读项目以建议从哪里开始…",Afe=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",Rfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jfe():t==="fa"?Afe():Tfe()}),Mfe=()=>"Starter prompts",Dfe=()=>"入门提示",Lfe=()=>"پیشنهادهای شروع",Ofe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Dfe():t==="fa"?Lfe():Mfe()}),Ife=()=>"Stop",Bfe=()=>"停止",$fe=()=>"توقف",mE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bfe():t==="fa"?$fe():Ife()}),Pfe=()=>"Submit",Ffe=()=>"提交",Hfe=()=>"ارسال",qfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ffe():t==="fa"?Hfe():Pfe()}),Ufe=()=>"Task",Gfe=()=>"任务",Wfe=()=>"وظیفه",Vfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Gfe():t==="fa"?Wfe():Ufe()}),Kfe=()=>"Tool failed",Qfe=()=>"工具失败",Yfe=()=>"ابزار ناموفق بود",Xfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Qfe():t==="fa"?Yfe():Kfe()}),Zfe=()=>"Used tools",Jfe=()=>"已使用工具",ede=()=>"ابزارها استفاده شد",rD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Jfe():t==="fa"?ede():Zfe()}),tde=()=>"View full plan",nde=()=>"查看完整计划",rde=()=>"مشاهدهٔ طرح کامل",sde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nde():t==="fa"?rde():tde()}),ide=()=>"Waited for an experiment run",ade=()=>"已等待实验运行",ode=()=>"برای اجرای آزمایش صبر شد",lde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ade():t==="fa"?ode():ide()}),cde=()=>"Waiting for your input…",ude=()=>"正在等待你的输入…",fde=()=>"منتظر ورودی شما…",dde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ude():t==="fa"?fde():cde()}),hde=()=>"What should we research?",_de=()=>"我们应该研究什么?",pde=()=>"چه چیزی را پژوهش کنیم؟",mde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_de():t==="fa"?pde():hde()}),gde=()=>"You, mid-task",vde=()=>"你(任务进行中)",bde=()=>"شما، هنگام انجام وظیفه",yde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vde():t==="fa"?bde():gde()}),xde=()=>"Pasted image",wde=()=>"粘贴的图片",Sde=()=>"تصویر جای‌گذاری‌شده",kde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wde():t==="fa"?Sde():xde()}),Cde=()=>"Plan",Ede=()=>"计划",Nde=()=>"طرح",sD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ede():t==="fa"?Nde():Cde()}),zde=()=>"Plan mode — ready to proceed?",Tde=()=>"计划模式 — 准备好继续了吗?",jde=()=>"حالت طرح — آماده‌اید ادامه دهید؟",Ade=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tde():t==="fa"?jde():zde()}),Rde=()=>"Proposed plan",Mde=()=>"提议的计划",Dde=()=>"طرح پیشنهادی",gE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mde():t==="fa"?Dde():Rde()}),Lde=()=>"Question",Ode=()=>"问题",Ide=()=>"پرسش",Bde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ode():t==="fa"?Ide():Lde()}),$de=()=>"Queued",Pde=()=>"已排队",Fde=()=>"در صف",Hde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pde():t==="fa"?Fde():$de()}),qde=()=>"Recents",Ude=()=>"最近",Gde=()=>"اخیر",iD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ude():t==="fa"?Gde():qde()}),Wde=()=>"Re-check its setup.",Vde=()=>"请重新检查其设置。",Kde=()=>"راه‌اندازی آن را دوباره بررسی کنید.",Qde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vde():t==="fa"?Kde():Wde()}),Yde=()=>"Could not recover this turn. Try again.",Xde=()=>"无法恢复本轮。请重试。",Zde=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",Jde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xde():t==="fa"?Zde():Yde()}),ehe=()=>"Could not remove the queued message. Try again.",the=()=>"无法移除排队消息。请重试。",nhe=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",rhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?the():t==="fa"?nhe():ehe()}),she=e=>`Could not re-send: ${e==null?void 0:e.error}`,ihe=e=>`无法重新发送:${e==null?void 0:e.error}`,ahe=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,ohe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?ihe(e):t==="fa"?ahe(e):she(e)}),lhe=()=>"Resolved",che=()=>"已处理",uhe=()=>"رسیدگی شد",fhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?che():t==="fa"?uhe():lhe()}),dhe=()=>"Could not retry the queued message. Try again.",hhe=()=>"无法重试排队消息。请重试。",_he=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",phe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hhe():t==="fa"?_he():dhe()}),mhe=()=>"run logs",ghe=()=>"运行日志",vhe=()=>"گزارش‌های اجرا",bhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ghe():t==="fa"?vhe():mhe()}),yhe=()=>"Scroll to bottom",xhe=()=>"滚动到底部",whe=()=>"رفتن به پایین گفتگو",vE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xhe():t==="fa"?whe():yhe()}),She=()=>"The selected harness is unavailable",khe=()=>"所选智能体工具不可用",Che=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",d2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?khe():t==="fa"?Che():She()}),Ehe=()=>"The chat session was not created",Nhe=()=>"未能创建聊天会话",zhe=()=>"نشست گفت‌وگو ایجاد نشد",The=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nhe():t==="fa"?zhe():Ehe()}),jhe=()=>"Show full conversation",Ahe=()=>"显示完整对话",Rhe=()=>"نمایش کامل گفتگو",Mhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ahe():t==="fa"?Rhe():jhe()}),Dhe=()=>" · Spawned by another agent",Lhe=()=>" · 由另一个智能体创建",Ohe=()=>" · ساخته‌شده به‌دست عامل دیگر",Ihe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lhe():t==="fa"?Ohe():Dhe()}),Bhe=()=>"Starting…",$he=()=>"正在启动…",Phe=()=>"در حال شروع…",Fhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$he():t==="fa"?Phe():Bhe()}),Hhe=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,qhe=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,Uhe=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,Ghe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?qhe(e):t==="fa"?Uhe(e):Hhe(e)}),Whe=()=>"Could not stop the turn. Try again.",Vhe=()=>"无法停止本轮。请重试。",Khe=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",Qhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vhe():t==="fa"?Khe():Whe()}),Yhe=e=>`Could not switch fork: ${e==null?void 0:e.error}`,Xhe=e=>`无法切换分支:${e==null?void 0:e.error}`,Zhe=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,Jhe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Xhe(e):t==="fa"?Zhe(e):Yhe(e)}),e_e=()=>"The agent",t_e=()=>"智能体",n_e=()=>"عامل",r_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?t_e():t==="fa"?n_e():e_e()}),s_e=()=>"Thinking",i_e=()=>"正在思考",a_e=()=>"در حال فکر کردن",o_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?i_e():t==="fa"?a_e():s_e()}),l_e=()=>"Could not toggle Plan mode. Try again.",c_e=()=>"无法切换计划模式。请重试。",u_e=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",bE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?c_e():t==="fa"?u_e():l_e()}),f_e=()=>"This turn did not finish.",d_e=()=>"本轮未完成。",h_e=()=>"این نوبت کامل نشد.",__e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?d_e():t==="fa"?h_e():f_e()}),p_e=()=>"Type a custom answer…",m_e=()=>"输入自定义回答…",g_e=()=>"پاسخ دلخواه را بنویسید…",v_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?m_e():t==="fa"?g_e():p_e()}),b_e=()=>"Unarchive",y_e=()=>"取消归档",x_e=()=>"خارج کردن از بایگانی",w_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?y_e():t==="fa"?x_e():b_e()}),S_e=()=>"Untitled",k_e=()=>"未命名",C_e=()=>"بدون عنوان",wg=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?k_e():t==="fa"?C_e():S_e()}),E_e=()=>"Could not update permissions. Try again.",N_e=()=>"无法更新权限。请重试。",z_e=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",T_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?N_e():t==="fa"?z_e():E_e()}),j_e=()=>"Working…",A_e=()=>"正在工作…",R_e=()=>"در حال کار…",P3=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?A_e():t==="fa"?R_e():j_e()}),M_e=()=>"Close tab",D_e=()=>"关闭标签页",L_e=()=>"بستن زبانه",O_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?D_e():t==="fa"?L_e():M_e()}),I_e=()=>"Changes",B_e=()=>"更改",$_e=()=>"تغییرات",P_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?B_e():t==="fa"?$_e():I_e()}),F_e=()=>"Code browser view",H_e=()=>"代码浏览器视图",q_e=()=>"نمای مرورگر کد",U_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?H_e():t==="fa"?q_e():F_e()}),G_e=()=>"Files",W_e=()=>"文件",V_e=()=>"فایل‌ها",K_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?W_e():t==="fa"?V_e():G_e()}),Q_e=()=>"Refresh",Y_e=()=>"刷新",X_e=()=>"تازه‌سازی",yE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Y_e():t==="fa"?X_e():Q_e()}),Z_e=()=>"listing truncated",J_e=()=>"列表已截断",e0e=()=>"فهرست کوتاه شده است",t0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?J_e():t==="fa"?e0e():Z_e()}),n0e=()=>"No files.",r0e=()=>"没有文件。",s0e=()=>"فایلی وجود ندارد.",i0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?r0e():t==="fa"?s0e():n0e()}),a0e=()=>"Refresh failed:",o0e=()=>"刷新失败:",l0e=()=>"تازه‌سازی ناموفق بود:",c0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?o0e():t==="fa"?l0e():a0e()}),u0e=()=>"Cancelling…",f0e=()=>"正在取消…",d0e=()=>"در حال لغو…",h0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?f0e():t==="fa"?d0e():u0e()}),_0e=()=>"Checking…",p0e=()=>"正在检查…",m0e=()=>"در حال بررسی…",Ea=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?p0e():t==="fa"?m0e():_0e()}),g0e=()=>"Copied",v0e=()=>"已复制",b0e=()=>"کپی شد",V0=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?v0e():t==="fa"?b0e():g0e()}),y0e=e=>`Failed to load: ${e==null?void 0:e.error}`,x0e=e=>`加载失败:${e==null?void 0:e.error}`,w0e=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,aD=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?x0e(e):t==="fa"?w0e(e):y0e(e)}),S0e=()=>"Loading…",k0e=()=>"正在加载…",C0e=()=>"در حال بارگیری…",oD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?k0e():t==="fa"?C0e():S0e()}),E0e=e=>`+ ${e==null?void 0:e.count} more`,N0e=e=>`另有 ${e==null?void 0:e.count} 项`,z0e=e=>`${e==null?void 0:e.count}+ مورد دیگر`,T0e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?N0e(e):t==="fa"?z0e(e):E0e(e)}),j0e=()=>"Rendered view",A0e=()=>"渲染视图",R0e=()=>"نمای رندرشده",Q1=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?A0e():t==="fa"?R0e():j0e()}),M0e=()=>"Save",D0e=()=>"保存",L0e=()=>"ذخیره",Po=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?D0e():t==="fa"?L0e():M0e()}),O0e=()=>"Saving…",I0e=()=>"正在保存…",B0e=()=>"در حال ذخیره…",Yi=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?I0e():t==="fa"?B0e():O0e()}),$0e=()=>"Show less",P0e=()=>"收起",F0e=()=>"نمایش کمتر",lD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?P0e():t==="fa"?F0e():$0e()}),H0e=()=>"Show more",q0e=()=>"展开",U0e=()=>"نمایش بیشتر",G0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?q0e():t==="fa"?U0e():H0e()}),W0e=()=>"Stop",V0e=()=>"停止",K0e=()=>"توقف",cD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?V0e():t==="fa"?K0e():W0e()}),Q0e=()=>"Stopping…",Y0e=()=>"正在停止…",X0e=()=>"در حال توقف…",Z0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Y0e():t==="fa"?X0e():Q0e()}),J0e=()=>"View source",epe=()=>"查看源代码",tpe=()=>"نمایش متن منبع",Zd=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?epe():t==="fa"?tpe():J0e()}),npe=()=>"Runs as a remote Hugging Face Job",rpe=()=>"作为远程 Hugging Face Job 运行",spe=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",ipe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rpe():t==="fa"?spe():npe()}),ape=()=>"Runs as a Job on your Kubernetes cluster",ope=()=>"作为 Kubernetes 集群上的 Job 运行",lpe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",cpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ope():t==="fa"?lpe():ape()}),upe=()=>"Runs directly on this computer",fpe=()=>"直接在此计算机上运行",dpe=()=>"مستقیماً روی این رایانه اجرا می‌شود",hpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fpe():t==="fa"?dpe():upe()}),_pe=()=>"Runs in a remote Modal sandbox",ppe=()=>"在远程 Modal 沙箱中运行",mpe=()=>"در sandbox دوردست Modal اجرا می‌شود",gpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ppe():t==="fa"?mpe():_pe()}),vpe=()=>"Runs on an ephemeral OpenResearch box",bpe=()=>"在临时 OpenResearch 主机上运行",ype=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",xpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bpe():t==="fa"?ype():vpe()}),wpe=()=>"Runs on the connected Ray cluster",Spe=()=>"在已连接的 Ray 集群上运行",kpe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",Cpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Spe():t==="fa"?kpe():wpe()}),Epe=()=>"Runs as a scheduled job on your Slurm cluster",Npe=()=>"作为 Slurm 集群上的调度作业运行",zpe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",Tpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Npe():t==="fa"?zpe():Epe()}),jpe=()=>"Runs on a host from your SSH config",Ape=()=>"在 SSH 配置中的主机上运行",Rpe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",Mpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ape():t==="fa"?Rpe():jpe()}),Dpe=()=>"Runs through Tinker’s remote compute",Lpe=()=>"通过 Tinker 远程算力运行",Ope=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",Ipe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lpe():t==="fa"?Ope():Dpe()}),Bpe=()=>"HF Jobs",$pe=()=>"HF Jobs",Ppe=()=>"HF Jobs",Fpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$pe():t==="fa"?Ppe():Bpe()}),Hpe=()=>"Kubernetes",qpe=()=>"Kubernetes",Upe=()=>"Kubernetes",Gpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qpe():t==="fa"?Upe():Hpe()}),Wpe=()=>"This machine",Vpe=()=>"此计算机",Kpe=()=>"این رایانه",uD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vpe():t==="fa"?Kpe():Wpe()}),Qpe=()=>"Modal",Ype=()=>"Modal",Xpe=()=>"Modal",Zpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ype():t==="fa"?Xpe():Qpe()}),Jpe=()=>"OpenResearch",eme=()=>"OpenResearch",tme=()=>"OpenResearch",nme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eme():t==="fa"?tme():Jpe()}),rme=()=>"Ray",sme=()=>"Ray",ime=()=>"Ray",ame=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sme():t==="fa"?ime():rme()}),ome=()=>"Slurm",lme=()=>"Slurm",cme=()=>"Slurm",ume=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lme():t==="fa"?cme():ome()}),fme=()=>"SSH",dme=()=>"SSH",hme=()=>"SSH",_me=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dme():t==="fa"?hme():fme()}),pme=()=>"Tinker",mme=()=>"Tinker",gme=()=>"Tinker",vme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mme():t==="fa"?gme():pme()}),bme=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",yme=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",xme=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",wme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yme():t==="fa"?xme():bme()}),Sme=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",kme=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",Cme=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",Eme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kme():t==="fa"?Cme():Sme()}),Nme=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",zme=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",Tme=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",jme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zme():t==="fa"?Tme():Nme()}),Ame=()=>"This computer must stay awake and online while Tinker runs.",Rme=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",Mme=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",Dme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rme():t==="fa"?Mme():Ame()}),Lme=()=>"Context window",Ome=()=>"上下文窗口",Ime=()=>"پنجرهٔ زمینه",Bme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ome():t==="fa"?Ime():Lme()}),$me=()=>"Context window used",Pme=()=>"已使用的上下文窗口",Fme=()=>"پنجرهٔ زمینهٔ استفاده‌شده",Hme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pme():t==="fa"?Fme():$me()}),qme=e=>`${e==null?void 0:e.value} tokens`,Ume=e=>`${e==null?void 0:e.value} 个 token`,Gme=e=>`${e==null?void 0:e.value} توکن`,Wme=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Ume(e):t==="fa"?Gme(e):qme(e)}),Vme=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,Kme=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,Qme=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,Yme=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Kme(e):t==="fa"?Qme(e):Vme(e)}),Xme=()=>"No runs yet — ask the agent to launch one.",Zme=()=>"尚无运行——让智能体启动一个。",Jme=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",ege=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zme():t==="fa"?Jme():Xme()}),tge=()=>"Run",nge=()=>"运行",rge=()=>"اجرا",xE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nge():t==="fa"?rge():tge()}),sge=()=>"Switch run",ige=()=>"切换运行",age=()=>"تغییر اجرا",oge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ige():t==="fa"?age():sge()}),lge=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,cge=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,uge=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,fge=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cge(e):t==="fa"?uge(e):lge(e)}),dge=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,hge=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,_ge=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,pge=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?hge(e):t==="fa"?_ge(e):dge(e)}),mge=e=>`${e==null?void 0:e.value}m`,gge=e=>`${e==null?void 0:e.value} 分钟`,vge=e=>`${e==null?void 0:e.value} دقیقه`,bge=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?gge(e):t==="fa"?vge(e):mge(e)}),yge=e=>`${e==null?void 0:e.value}s`,xge=e=>`${e==null?void 0:e.value} 秒`,wge=e=>`${e==null?void 0:e.value} ثانیه`,Sge=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?xge(e):t==="fa"?wge(e):yge(e)}),kge=()=>"Code",Cge=()=>"代码",Ege=()=>"کد",Nge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cge():t==="fa"?Ege():kge()}),zge=()=>"created",Tge=()=>"创建于",jge=()=>"ایجادشده",Age=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tge():t==="fa"?jge():zge()}),Rge=()=>"from",Mge=()=>"来自",Dge=()=>"از",Lge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mge():t==="fa"?Dge():Rge()}),Oge=()=>"Logs",Ige=()=>"日志",Bge=()=>"گزارش‌ها",$ge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ige():t==="fa"?Bge():Oge()}),Pge=()=>"Latest run",Fge=()=>"最新运行",Hge=()=>"آخرین اجرا",qge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Fge():t==="fa"?Hge():Pge()}),Uge=()=>"Code",Gge=()=>"代码",Wge=()=>"کد",Vge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Gge():t==="fa"?Wge():Uge()}),Kge=()=>"Commit",Qge=()=>"提交",Yge=()=>"کامیت",Xge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Qge():t==="fa"?Yge():Kge()}),Zge=()=>"created",Jge=()=>"创建于",e1e=()=>"ایجادشده",t1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Jge():t==="fa"?e1e():Zge()}),n1e=()=>"Description",r1e=()=>"说明",s1e=()=>"توضیحات",i1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?r1e():t==="fa"?s1e():n1e()}),a1e=()=>"Duration",o1e=()=>"时长",l1e=()=>"مدت",c1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?o1e():t==="fa"?l1e():a1e()}),u1e=()=>"exit",f1e=()=>"退出码",d1e=()=>"خروج",h1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?f1e():t==="fa"?d1e():u1e()}),_1e=()=>"from",p1e=()=>"来自",m1e=()=>"از",g1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?p1e():t==="fa"?m1e():_1e()}),v1e=()=>"Logs",b1e=()=>"日志",y1e=()=>"گزارش‌ها",x1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?b1e():t==="fa"?y1e():v1e()}),w1e=()=>"Run",S1e=()=>"运行",k1e=()=>"اجرا",C1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?S1e():t==="fa"?k1e():w1e()}),E1e=()=>"Run history",N1e=()=>"运行历史",z1e=()=>"تاریخچهٔ اجرا",T1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?N1e():t==="fa"?z1e():E1e()}),j1e=()=>"Started",A1e=()=>"开始时间",R1e=()=>"آغاز",M1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?A1e():t==="fa"?R1e():j1e()}),D1e=()=>"Runs",L1e=()=>"运行",O1e=()=>"اجراها",I1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?L1e():t==="fa"?O1e():D1e()}),B1e=()=>"No runs yet",$1e=()=>"还没有运行",P1e=()=>"هنوز اجرایی وجود ندارد",F1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$1e():t==="fa"?P1e():B1e()}),H1e=()=>"No experiments yet.",q1e=()=>"还没有实验。",U1e=()=>"هنوز آزمایشی وجود ندارد.",G1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?q1e():t==="fa"?U1e():H1e()}),W1e=()=>"Not run yet",V1e=()=>"尚未运行",K1e=()=>"هنوز اجرا نشده",Q1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?V1e():t==="fa"?K1e():W1e()}),Y1e=()=>"1 run",X1e=()=>"1 次运行",Z1e=()=>"۱ اجرا",J1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?X1e():t==="fa"?Z1e():Y1e()}),eve=()=>"Open logs",tve=()=>"打开日志",nve=()=>"باز کردن گزارش‌ها",rve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tve():t==="fa"?nve():eve()}),sve=e=>`${e==null?void 0:e.count} runs`,ive=e=>`${e==null?void 0:e.count} 次运行`,ave=e=>`${e==null?void 0:e.count} اجرا`,ove=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?ive(e):t==="fa"?ave(e):sve(e)}),lve=()=>"Stop requested",cve=()=>"已请求停止",uve=()=>"درخواست توقف ثبت شد",fve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cve():t==="fa"?uve():lve()}),dve=()=>"Stop run",hve=()=>"停止运行",_ve=()=>"توقف اجرا",pve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hve():t==="fa"?_ve():dve()}),mve=()=>"Code",gve=()=>"代码",vve=()=>"کد",bve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gve():t==="fa"?vve():mve()}),yve=()=>"Experiments",xve=()=>"实验",wve=()=>"آزمایش‌ها",Sve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xve():t==="fa"?wve():yve()}),kve=()=>"Logs",Cve=()=>"日志",Eve=()=>"گزارش‌ها",Nve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cve():t==="fa"?Eve():kve()}),zve=()=>"Stop failed:",Tve=()=>"停止失败:",jve=()=>"توقف ناموفق بود:",Ave=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tve():t==="fa"?jve():zve()}),Rve=()=>"Clipboard access is unavailable.",Mve=()=>"无法访问剪贴板。",Dve=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",Lve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mve():t==="fa"?Dve():Rve()}),Ove=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,Ive=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,Bve=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,$ve=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Ive(e):t==="fa"?Bve(e):Ove(e)}),Pve=()=>"Duplicate",Fve=()=>"创建副本",Hve=()=>"ایجاد نسخهٔ تکراری",qve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Fve():t==="fa"?Hve():Pve()}),Uve=e=>`File actions for ${e==null?void 0:e.path}`,Gve=e=>`${e==null?void 0:e.path} 的文件操作`,Wve=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,Vve=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Gve(e):t==="fa"?Wve(e):Uve(e)}),Kve=()=>"Open",Qve=()=>"打开",Yve=()=>"باز کردن",Xve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Qve():t==="fa"?Yve():Kve()}),Zve=e=>`Rename ${e==null?void 0:e.path}`,Jve=e=>`重命名 ${e==null?void 0:e.path}`,ebe=e=>`تغییر نام ${e==null?void 0:e.path}`,tbe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Jve(e):t==="fa"?ebe(e):Zve(e)}),nbe=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,rbe=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,sbe=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,ibe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?rbe(e):t==="fa"?sbe(e):nbe(e)}),abe=()=>"Binary file — no inline preview.",obe=()=>"二进制文件——无法内嵌预览。",lbe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",cbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?obe():t==="fa"?lbe():abe()}),ube=()=>"This file changed on disk. Your edits have not been overwritten.",fbe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",dbe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",wE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fbe():t==="fa"?dbe():ube()}),hbe=()=>"Compile failed",_be=()=>"编译失败",pbe=()=>"کامپایل ناموفق بود",mbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_be():t==="fa"?pbe():hbe()}),gbe=()=>"Compile PDF",vbe=()=>"编译 PDF",bbe=()=>"کامپایل PDF",SE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vbe():t==="fa"?bbe():gbe()}),ybe=()=>"Compiled, but the engine reported errors — check the output below.",xbe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",wbe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",Sbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xbe():t==="fa"?wbe():ybe()}),kbe=()=>"Copy command",Cbe=()=>"复制命令",Ebe=()=>"کپی فرمان",Nbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cbe():t==="fa"?Ebe():kbe()}),zbe=()=>"Copy install command",Tbe=()=>"复制安装命令",jbe=()=>"کپی فرمان نصب",Abe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tbe():t==="fa"?jbe():zbe()}),Rbe=()=>"This file was deleted on disk. Your edits have not been discarded.",Mbe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",Dbe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",kE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mbe():t==="fa"?Dbe():Rbe()}),Lbe=()=>"Discard my edits and reload",Obe=()=>"放弃我的编辑并重新加载",Ibe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",Bbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Obe():t==="fa"?Ibe():Lbe()}),$be=()=>"Discard unsaved changes and close this file?",Pbe=()=>"要丢弃未保存的更改并关闭此文件吗?",Fbe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",CE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pbe():t==="fa"?Fbe():$be()}),Hbe=()=>"Dismiss",qbe=()=>"关闭",Ube=()=>"بستن",Gbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qbe():t==="fa"?Ube():Hbe()}),Wbe=()=>"Dismiss compile message",Vbe=()=>"关闭编译消息",Kbe=()=>"بستن پیام کامپایل",Qbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vbe():t==="fa"?Kbe():Wbe()}),Ybe=()=>"Dismiss Overleaf message",Xbe=()=>"关闭 Overleaf 消息",Zbe=()=>"بستن پیام Overleaf",Jbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xbe():t==="fa"?Zbe():Ybe()}),eye=()=>"Download",tye=()=>"下载",nye=()=>"بارگیری",fD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tye():t==="fa"?nye():eye()}),rye=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,sye=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,iye=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,aye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?sye(e):t==="fa"?iye(e):rye(e)}),oye=()=>"Failed to load file:",lye=()=>"加载文件失败:",cye=()=>"بارگیری فایل ناموفق بود:",EE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lye():t==="fa"?cye():oye()}),uye=()=>"File truncated — showing the first 512 KB.",fye=()=>"文件已截断——仅显示前 512 KB。",dye=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",hye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fye():t==="fa"?dye():uye()}),_ye=()=>"The page below stops partway — the full file could not be loaded.",pye=()=>"下方页面在中途结束——无法加载完整文件。",mye=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",gye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pye():t==="fa"?mye():_ye()}),vye=e=>`Rendered HTML: ${e==null?void 0:e.name}`,bye=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,yye=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,xye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?bye(e):t==="fa"?yye(e):vye(e)}),wye=()=>"Loading…",Sye=()=>"正在加载…",kye=()=>"در حال بارگیری…",dD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sye():t==="fa"?kye():wye()}),Cye=()=>"File not found.",Eye=()=>"找不到文件。",Nye=()=>"فایل پیدا نشد.",zye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Eye():t==="fa"?Nye():Cye()}),Tye=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,jye=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,Aye=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,Rye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?jye(e):t==="fa"?Aye(e):Tye(e)}),Mye=e=>`File not found on branch ${e==null?void 0:e.branch}.`,Dye=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,Lye=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,Oye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Dye(e):t==="fa"?Lye(e):Mye(e)}),Iye=()=>"File not found on disk.",Bye=()=>"磁盘上找不到此文件。",$ye=()=>"فایل روی دیسک پیدا نشد.",Pye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bye():t==="fa"?$ye():Iye()}),Fye=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,Hye=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,qye=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,Uye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Hye(e):t==="fa"?qye(e):Fye(e)}),Gye=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,Wye=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,Vye=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,Kye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Wye(e):t==="fa"?Vye(e):Gye(e)}),Qye=()=>"Open in default editor",Yye=()=>"在默认编辑器中打开",Xye=()=>"باز کردن در ویرایشگر پیش‌فرض",NE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yye():t==="fa"?Xye():Qye()}),Zye=()=>"Overleaf's copy of this file was pulled while you had unsaved edits, so what you see is no longer what is on disk. Saving now sends this draft to Overleaf instead.",Jye=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",exe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",txe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Jye():t==="fa"?exe():Zye()}),nxe=()=>"Overwrite disk file",rxe=()=>"覆盖磁盘文件",sxe=()=>"بازنویسی فایل روی دیسک",ixe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rxe():t==="fa"?sxe():nxe()}),axe=()=>"Compiled PDF is out of date",oxe=()=>"已编译的 PDF 不是最新版本",lxe=()=>"PDF کامپایل‌شده به‌روز نیست",cxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oxe():t==="fa"?lxe():axe()}),uxe=()=>"project clone",fxe=()=>"项目克隆",dxe=()=>"کلون پروژه",Sg=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fxe():t==="fa"?dxe():uxe()}),hxe=()=>"Recompile PDF",_xe=()=>"重新编译 PDF",pxe=()=>"کامپایل دوبارهٔ PDF",zE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_xe():t==="fa"?pxe():hxe()}),mxe=()=>"Reload from disk",gxe=()=>"从磁盘重新加载",vxe=()=>"بارگذاری مجدد از دیسک",bxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gxe():t==="fa"?vxe():mxe()}),yxe=()=>"Save failed",xxe=()=>"保存失败",wxe=()=>"ذخیره ناموفق بود",Sxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xxe():t==="fa"?wxe():yxe()}),kxe=()=>"Saving…",Cxe=()=>"正在保存…",Exe=()=>"در حال ذخیره…",Nxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cxe():t==="fa"?Exe():kxe()}),zxe=()=>"Selected — press ⌘C",Txe=()=>"已选中 — 按 ⌘C 复制",jxe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",Axe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Txe():t==="fa"?jxe():zxe()}),Rxe=()=>"session’s worktree",Mxe=()=>"会话工作树",Dxe=()=>"درخت کاری نشست",kg=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mxe():t==="fa"?Dxe():Rxe()}),Lxe=()=>"Show compiled PDF",Oxe=()=>"显示已编译的 PDF",Ixe=()=>"نمایش PDF کامپایل‌شده",TE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Oxe():t==="fa"?Ixe():Lxe()}),Bxe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",$xe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",Pxe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",Fxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$xe():t==="fa"?Pxe():Bxe()}),Hxe=()=>"This session's worktree isn't available — showing the project clone's copy.",qxe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",Uxe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",Gxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qxe():t==="fa"?Uxe():Hxe()}),Wxe=()=>"Unsaved",Vxe=()=>"未保存",Kxe=()=>"ذخیره نشده",hD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vxe():t==="fa"?Kxe():Wxe()}),Qxe=()=>"Unsaved — ⌘S to save",Yxe=()=>"未保存 — 按 ⌘S 保存",Xxe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",Zxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yxe():t==="fa"?Xxe():Qxe()}),Jxe=()=>"Update orx on the remote machine to edit this file safely.",e2e=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",t2e=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",n2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?e2e():t==="fa"?t2e():Jxe()}),r2e=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",s2e=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",i2e=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",a2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?s2e():t==="fa"?i2e():r2e()}),o2e=()=>"Back to preview",l2e=()=>"返回预览",c2e=()=>"بازگشت به پیش‌نمایش",u2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?l2e():t==="fa"?c2e():o2e()}),f2e=e=>`${e==null?void 0:e.count} changed files`,d2e=e=>`${e==null?void 0:e.count} 个已更改文件`,h2e=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,_2e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?d2e(e):t==="fa"?h2e(e):f2e(e)}),p2e=()=>"Changed files",m2e=()=>"已更改文件",g2e=()=>"فایل‌های تغییرکرده",v2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?m2e():t==="fa"?g2e():p2e()}),b2e=()=>"Diff preview truncated",y2e=()=>"差异预览已截断",x2e=()=>"پیش‌نمایش تفاوت کوتاه شده است",w2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?y2e():t==="fa"?x2e():b2e()}),S2e=e=>`${e==null?void 0:e.count} files shown (partial)`,k2e=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,C2e=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,E2e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?k2e(e):t==="fa"?C2e(e):S2e(e)}),N2e=()=>"No changes.",z2e=()=>"没有更改。",T2e=()=>"تغییری وجود ندارد.",j2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?z2e():t==="fa"?T2e():N2e()}),A2e=()=>"No complete file preview was available before the cutoff.",R2e=()=>"在截断位置之前没有完整的文件预览。",M2e=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",D2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?R2e():t==="fa"?M2e():A2e()}),L2e=()=>"No textual diff for this file.",O2e=()=>"此文件没有文本差异。",I2e=()=>"برای این فایل تفاوت متنی وجود ندارد.",B2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?O2e():t==="fa"?I2e():L2e()}),$2e=()=>"1 changed file",P2e=()=>"1 个已更改文件",F2e=()=>"۱ فایل تغییرکرده",H2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?P2e():t==="fa"?F2e():$2e()}),q2e=()=>"1 file shown (partial)",U2e=()=>"显示 1 个文件(部分)",G2e=()=>"۱ فایل نمایش داده شده (ناقص)",W2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?U2e():t==="fa"?G2e():q2e()}),V2e=()=>"Unable to parse this diff.",K2e=()=>"无法解析此差异。",Q2e=()=>"خواندن این تفاوت ممکن نبود.",Y2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?K2e():t==="fa"?Q2e():V2e()}),X2e=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,Z2e=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,J2e=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,ewe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Z2e(e):t==="fa"?J2e(e):X2e(e)}),twe=()=>"View full diff",nwe=()=>"查看完整差异",rwe=()=>"نمایش تفاوت کامل",swe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nwe():t==="fa"?rwe():twe()}),iwe=()=>"Create a token ↗",awe=()=>"创建令牌 ↗",owe=()=>"ساخت توکن ↗",lwe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?awe():t==="fa"?owe():iwe()}),cwe=()=>"All projects",uwe=()=>"所有项目",fwe=()=>"همهٔ پروژه‌ها",jE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uwe():t==="fa"?fwe():cwe()}),dwe=()=>"Configure Repository",hwe=()=>"配置仓库",_we=()=>"پیکربندی مخزن",pwe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hwe():t==="fa"?_we():dwe()}),mwe=()=>"Create a new project",gwe=()=>"新建项目",vwe=()=>"ایجاد پروژهٔ جدید",bwe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gwe():t==="fa"?vwe():mwe()}),ywe=()=>"Hide sidebar",xwe=()=>"隐藏侧边栏",wwe=()=>"پنهان کردن نوار کناری",AE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xwe():t==="fa"?wwe():ywe()}),Swe=()=>"Project",kwe=()=>"项目",Cwe=()=>"پروژه",Ewe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kwe():t==="fa"?Cwe():Swe()}),Nwe=e=>`${e==null?void 0:e.count} cancelled`,zwe=e=>`${e==null?void 0:e.count} 次取消`,Twe=e=>`${e==null?void 0:e.count} لغوشده`,jwe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?zwe(e):t==="fa"?Twe(e):Nwe(e)}),Awe=e=>`${e==null?void 0:e.count} done`,Rwe=e=>`${e==null?void 0:e.count} 次完成`,Mwe=e=>`${e==null?void 0:e.count} تمام‌شده`,Dwe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Rwe(e):t==="fa"?Mwe(e):Awe(e)}),Lwe=e=>`${e==null?void 0:e.count} failed`,Owe=e=>`${e==null?void 0:e.count} 次失败`,Iwe=e=>`${e==null?void 0:e.count} ناموفق`,Bwe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Owe(e):t==="fa"?Iwe(e):Lwe(e)}),$we=e=>`${e==null?void 0:e.count} files`,Pwe=e=>`${e==null?void 0:e.count} 个文件`,Fwe=e=>`${e==null?void 0:e.count} فایل`,Hwe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Pwe(e):t==="fa"?Fwe(e):$we(e)}),qwe=e=>`${e==null?void 0:e.count}+ files`,Uwe=e=>`至少 ${e==null?void 0:e.count} 个文件`,Gwe=e=>`بیش از ${e==null?void 0:e.count} فایل`,Wwe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Uwe(e):t==="fa"?Gwe(e):qwe(e)}),Vwe=e=>`${e==null?void 0:e.count} live`,Kwe=e=>`${e==null?void 0:e.count} 次进行中`,Qwe=e=>`${e==null?void 0:e.count} فعال`,Ywe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Kwe(e):t==="fa"?Qwe(e):Vwe(e)}),Xwe=()=>"1 file",Zwe=()=>"1 个文件",Jwe=()=>"۱ فایل",e4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zwe():t==="fa"?Jwe():Xwe()}),t4e=()=>"1 run",n4e=()=>"1 次运行",r4e=()=>"۱ اجرا",s4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?n4e():t==="fa"?r4e():t4e()}),i4e=e=>`${e==null?void 0:e.count} runs`,a4e=e=>`${e==null?void 0:e.count} 次运行`,o4e=e=>`${e==null?void 0:e.count} اجرا`,l4e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?a4e(e):t==="fa"?o4e(e):i4e(e)}),c4e=()=>"No instances yet.",u4e=()=>"还没有实例。",f4e=()=>"هنوز نمونه‌ای وجود ندارد.",d4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?u4e():t==="fa"?f4e():c4e()}),h4e=()=>"Nothing running right now.",_4e=()=>"当前没有运行中的实例。",p4e=()=>"اکنون چیزی در حال اجرا نیست.",m4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_4e():t==="fa"?p4e():h4e()}),g4e=()=>"Select a project to see its history.",v4e=()=>"请选择一个项目以查看其历史记录。",b4e=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",y4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?v4e():t==="fa"?b4e():g4e()}),x4e=()=>"Select a project to see its runs.",w4e=()=>"请选择一个项目以查看其运行。",S4e=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",k4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?w4e():t==="fa"?S4e():x4e()}),C4e=()=>"View history",E4e=()=>"查看历史记录",N4e=()=>"مشاهدهٔ تاریخچه",z4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?E4e():t==="fa"?N4e():C4e()}),T4e=e=>`View history (${e==null?void 0:e.count})`,j4e=e=>`查看历史记录(${e==null?void 0:e.count})`,A4e=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,R4e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?j4e(e):t==="fa"?A4e(e):T4e(e)}),M4e=()=>"The engine exited without producing a PDF or a log.",D4e=()=>"引擎已退出,但没有生成 PDF 或日志。",L4e=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",O4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?D4e():t==="fa"?L4e():M4e()}),I4e=()=>"Loading…",B4e=()=>"正在加载…",$4e=()=>"در حال بارگیری…",P4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?B4e():t==="fa"?$4e():I4e()}),F4e=()=>"Copy",H4e=()=>"复制",q4e=()=>"کپی",_D=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?H4e():t==="fa"?q4e():F4e()}),U4e=()=>"Copy code",G4e=()=>"复制代码",W4e=()=>"کپی کد",V4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?G4e():t==="fa"?W4e():U4e()}),K4e=()=>"Download",Q4e=()=>"下载",Y4e=()=>"بارگیری",pD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Q4e():t==="fa"?Y4e():K4e()}),X4e=()=>"This browser can’t preview this media format.",Z4e=()=>"此浏览器无法预览该媒体格式。",J4e=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",e5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Z4e():t==="fa"?J4e():X4e()}),t5e=()=>" · CLI configuration",n5e=()=>" · CLI 配置",r5e=()=>" · پیکربندی CLI",mD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?n5e():t==="fa"?r5e():t5e()}),s5e=()=>"· Default",i5e=()=>"· 默认",a5e=()=>"· پیش‌فرض",gD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?i5e():t==="fa"?a5e():s5e()}),o5e=()=>"Default model",l5e=()=>"默认模型",c5e=()=>"مدل پیش‌فرض",RE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?l5e():t==="fa"?c5e():o5e()}),u5e=()=>"Detecting harnesses…",f5e=()=>"正在检测智能体工具…",d5e=()=>"در حال شناسایی ابزارهای عامل…",h5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?f5e():t==="fa"?d5e():u5e()}),_5e=()=>"Effort",p5e=()=>"推理强度",m5e=()=>"میزان استدلال",g5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?p5e():t==="fa"?m5e():_5e()}),v5e=()=>"Fast speed ·",b5e=()=>"快速 ·",y5e=()=>"سرعت بالا ·",x5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?b5e():t==="fa"?y5e():v5e()}),w5e=()=>"Mode",S5e=()=>"模式",k5e=()=>"حالت",ME=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?S5e():t==="fa"?k5e():w5e()}),C5e=()=>"Model",E5e=()=>"模型",N5e=()=>"مدل",h2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?E5e():t==="fa"?N5e():C5e()}),z5e=e=>`${e==null?void 0:e.count} more — search to find`,T5e=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,j5e=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,A5e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?T5e(e):t==="fa"?j5e(e):z5e(e)}),R5e=()=>"Not available",M5e=()=>"不可用",D5e=()=>"در دسترس نیست",L5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?M5e():t==="fa"?D5e():R5e()}),O5e=()=>"Search models…",I5e=()=>"搜索模型…",B5e=()=>"جست‌وجوی مدل‌ها…",$5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?I5e():t==="fa"?B5e():O5e()}),P5e=()=>"Sessions keep their harness. Start a new chat to switch.",F5e=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",H5e=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",q5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?F5e():t==="fa"?H5e():P5e()}),U5e=()=>"Speed",G5e=()=>"速度",W5e=()=>"سرعت",DE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?G5e():t==="fa"?W5e():U5e()}),V5e=()=>"Unavailable",K5e=()=>"不可用",Q5e=()=>"در دسترس نیست",Ol=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?K5e():t==="fa"?Q5e():V5e()}),Y5e=e=>`Use “${e==null?void 0:e.id}” as the model ID`,X5e=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,Z5e=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,J5e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?X5e(e):t==="fa"?Z5e(e):Y5e(e)}),e3e=()=>"Variant",t3e=()=>"变体",n3e=()=>"گونه",r3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?t3e():t==="fa"?n3e():e3e()}),s3e=()=>"Advanced",i3e=()=>"高级",a3e=()=>"پیشرفته",o3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?i3e():t==="fa"?a3e():s3e()}),l3e=()=>"Advanced · Connect GitHub",c3e=()=>"高级 · 连接 GitHub",u3e=()=>"پیشرفته · اتصال GitHub",f3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?c3e():t==="fa"?u3e():l3e()}),d3e=()=>"Advanced · GitHub sync on",h3e=()=>"高级 · GitHub 同步已开启",_3e=()=>"پیشرفته · همگام‌سازی GitHub روشن است",p3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?h3e():t==="fa"?_3e():d3e()}),m3e=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",g3e=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",v3e=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",b3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?g3e():t==="fa"?v3e():m3e()}),y3e=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,x3e=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,w3e=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,S3e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?x3e(e):t==="fa"?w3e(e):y3e(e)}),k3e=()=>"Choose an existing project folder",C3e=()=>"选择现有项目文件夹",E3e=()=>"انتخاب پوشهٔ موجود پروژه",LE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?C3e():t==="fa"?E3e():k3e()}),N3e=()=>"Choosing…",z3e=()=>"正在选择…",T3e=()=>"در حال انتخاب…",j3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?z3e():t==="fa"?T3e():N3e()}),A3e=()=>"Clone destination",R3e=()=>"克隆位置",M3e=()=>"مقصد کلون",D3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?R3e():t==="fa"?M3e():A3e()}),L3e=()=>"Clone paper project",O3e=()=>"克隆论文项目",I3e=()=>"کلون پروژهٔ مقاله",B3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?O3e():t==="fa"?I3e():L3e()}),$3e=()=>"Create project",P3e=()=>"创建项目",F3e=()=>"ایجاد پروژه",OE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?P3e():t==="fa"?F3e():$3e()}),H3e=()=>"Creating…",q3e=()=>"正在创建…",U3e=()=>"در حال ایجاد…",G3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?q3e():t==="fa"?U3e():H3e()}),W3e=()=>"Choose a different destination. This path is a file, not a folder.",V3e=()=>"请选择其他位置。此路径是文件,不是文件夹。",K3e=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",_2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?V3e():t==="fa"?K3e():W3e()}),Q3e=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Y3e=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",X3e=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",IE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Y3e():t==="fa"?X3e():Q3e()}),Z3e=()=>"Blank project",J3e=()=>"空白项目",e6e=()=>"پروژهٔ خالی",t6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?J3e():t==="fa"?e6e():Z3e()}),n6e=()=>"Cancel",r6e=()=>"取消",s6e=()=>"لغو",i6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?r6e():t==="fa"?s6e():n6e()}),a6e=()=>"Change",o6e=()=>"更改",l6e=()=>"تغییر",c6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?o6e():t==="fa"?l6e():a6e()}),u6e=()=>"Change selected paper",f6e=()=>"更改所选论文",d6e=()=>"تغییر مقالهٔ انتخاب‌شده",h6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?f6e():t==="fa"?d6e():u6e()}),_6e=()=>"Check out a Git branch before using this folder.",p6e=()=>"使用此文件夹前,请先检出一个 Git 分支。",m6e=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",g6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?p6e():t==="fa"?m6e():_6e()}),v6e=()=>"Checking project location.",b6e=()=>"正在检查项目位置。",y6e=()=>"در حال بررسی محل پروژه.",BE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?b6e():t==="fa"?y6e():v6e()}),x6e=()=>"Existing folder",w6e=()=>"现有文件夹",S6e=()=>"پوشهٔ موجود",k6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?w6e():t==="fa"?S6e():x6e()}),C6e=()=>"Experiment branches will be pushed to the remote GitHub repository.",E6e=()=>"实验分支将推送到远程 GitHub 仓库。",N6e=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",z6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?E6e():t==="fa"?N6e():C6e()}),T6e=()=>"From a paper",j6e=()=>"从论文创建",A6e=()=>"از یک مقاله",R6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?j6e():t==="fa"?A6e():T6e()}),M6e=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",D6e=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",L6e=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",O6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?D6e():t==="fa"?L6e():M6e()}),I6e=()=>"my-research",B6e=()=>"my-research",$6e=()=>"my-research",$E=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?B6e():t==="fa"?$6e():I6e()}),P6e=()=>"No papers found. Try an arXiv ID, URL, or a different title.",F6e=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",H6e=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",q6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?F6e():t==="fa"?H6e():P6e()}),U6e=()=>"No public repository found on alphaXiv",G6e=()=>"在 alphaXiv 上未找到公开仓库",W6e=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",V6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?G6e():t==="fa"?W6e():U6e()}),K6e=()=>"OpenResearch will start a blank project with this paper's PDF.",Q6e=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Y6e=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",X6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Q6e():t==="fa"?Y6e():K6e()}),Z6e=()=>"Paper",J6e=()=>"论文",eSe=()=>"مقاله",tSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?J6e():t==="fa"?eSe():Z6e()}),nSe=()=>"Project location",rSe=()=>"项目位置",sSe=()=>"محل پروژه",p2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rSe():t==="fa"?sSe():nSe()}),iSe=()=>"Project name",aSe=()=>"项目名称",oSe=()=>"نام پروژه",PE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aSe():t==="fa"?oSe():iSe()}),lSe=()=>"Search for a paper by arXiv ID, URL, or title",cSe=()=>"按 arXiv ID、网址或标题搜索论文",uSe=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",fSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cSe():t==="fa"?uSe():lSe()}),dSe=()=>"Sync experiments to GitHub",hSe=()=>"将实验同步到 GitHub",_Se=()=>"همگام‌سازی آزمایش‌ها با GitHub",pSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hSe():t==="fa"?_Se():dSe()}),mSe=()=>"That folder no longer exists. Choose it again.",gSe=()=>"该文件夹已不存在。请重新选择。",vSe=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",bSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gSe():t==="fa"?vSe():mSe()}),ySe=()=>"The selected folder contains an invalid Git repository.",xSe=()=>"所选文件夹包含无效的 Git 仓库。",wSe=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",SSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xSe():t==="fa"?wSe():ySe()}),kSe=()=>"The selected path is not a folder.",CSe=()=>"所选路径不是文件夹。",ESe=()=>"مسیر انتخاب‌شده پوشه نیست.",NSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CSe():t==="fa"?ESe():kSe()}),zSe=e=>`Checking ${e==null?void 0:e.repository}.`,TSe=e=>`正在检查 ${e==null?void 0:e.repository}。`,jSe=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,ASe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?TSe(e):t==="fa"?jSe(e):zSe(e)}),RSe=e=>`Creates ${e==null?void 0:e.repository}.`,MSe=e=>`将创建 ${e==null?void 0:e.repository}。`,DSe=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,LSe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?MSe(e):t==="fa"?DSe(e):RSe(e)}),OSe=e=>`Pushes to ${e==null?void 0:e.repository}.`,ISe=e=>`将推送到 ${e==null?void 0:e.repository}。`,BSe=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,$Se=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?ISe(e):t==="fa"?BSe(e):OSe(e)}),PSe=()=>"Project location is required.",FSe=()=>"必须填写项目位置。",HSe=()=>"محل پروژه الزامی است.",FE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FSe():t==="fa"?HSe():PSe()}),qSe=()=>"Choose a different destination. The paper repository needs a new or empty folder.",USe=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",GSe=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",HE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?USe():t==="fa"?GSe():qSe()}),WSe=()=>"A linked public code repository is cloned without credentials.",VSe=()=>"关联的公开代码仓库无需凭据即可克隆。",KSe=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",QSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VSe():t==="fa"?KSe():WSe()}),YSe=e=>`Run ${e==null?void 0:e.command} before creating the project.`,XSe=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,ZSe=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,JSe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?XSe(e):t==="fa"?ZSe(e):YSe(e)}),eke=()=>"Searching alphaXiv…",tke=()=>"正在搜索 alphaXiv…",nke=()=>"در حال جست‌وجوی alphaXiv…",rke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tke():t==="fa"?nke():eke()}),ske=()=>"Use folder",ike=()=>"使用文件夹",ake=()=>"استفاده از پوشه",oke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ike():t==="fa"?ake():ske()}),lke=()=>"Can’t reach OpenResearch. This page is no longer live.",cke=()=>"无法连接 OpenResearch。此页面已不再实时同步。",uke=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",m4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cke():t==="fa"?uke():lke()}),fke=()=>"A workspace for your research agents",dke=()=>"面向研究智能体的工作空间",hke=()=>"فضای کاری برای عامل‌های پژوهشی شما",_ke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dke():t==="fa"?hke():fke()}),pke=()=>"Add papers that represent your research interests, including papers by other authors.",mke=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",gke=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",vke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mke():t==="fa"?gke():pke()}),bke=()=>"API key",yke=()=>"API 密钥",xke=()=>"کلید API",F3=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yke():t==="fa"?xke():bke()}),wke=()=>"AI/ML",Ske=()=>"人工智能与机器学习",kke=()=>"هوش مصنوعی و یادگیری ماشین",Cke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ske():t==="fa"?kke():wke()}),Eke=()=>"Biology",Nke=()=>"生物学",zke=()=>"زیست‌شناسی",Tke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nke():t==="fa"?zke():Eke()}),jke=()=>"Other",Ake=()=>"其他",Rke=()=>"سایر",Mke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ake():t==="fa"?Rke():jke()}),Dke=()=>"Physics",Lke=()=>"物理学",Oke=()=>"فیزیک",Ike=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lke():t==="fa"?Oke():Dke()}),Bke=()=>"Back",$ke=()=>"返回",Pke=()=>"بازگشت",qE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$ke():t==="fa"?Pke():Bke()}),Fke=()=>"Check failed",Hke=()=>"检查失败",qke=()=>"بررسی ناموفق بود",Uke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hke():t==="fa"?qke():Fke()}),Gke=()=>"Checking",Wke=()=>"正在检查",Vke=()=>"در حال بررسی",Kke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wke():t==="fa"?Vke():Gke()}),Qke=()=>"Checking Git…",Yke=()=>"正在检查 Git…",Xke=()=>"در حال بررسی Git…",Zke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yke():t==="fa"?Xke():Qke()}),Jke=()=>"Choose a coding agent",e7e=()=>"选择编程智能体",t7e=()=>"یک عامل کدنویسی انتخاب کنید",n7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?e7e():t==="fa"?t7e():Jke()}),r7e=()=>"Choose a coding agent to continue.",s7e=()=>"选择一个编程智能体以继续。",i7e=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",a7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?s7e():t==="fa"?i7e():r7e()}),o7e=()=>"Choose at least one research area to continue.",l7e=()=>"请至少选择一个研究领域后再继续。",c7e=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",u7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?l7e():t==="fa"?c7e():o7e()}),f7e=()=>"Choose one or more.",d7e=()=>"请选择一项或多项。",h7e=()=>"یک یا چند مورد را انتخاب کنید.",_7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?d7e():t==="fa"?h7e():f7e()}),p7e=()=>"Choose your preferred coding agent",m7e=()=>"请选择首选编程智能体",g7e=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",v7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?m7e():t==="fa"?g7e():p7e()}),b7e=()=>"Consolidate your research",y7e=()=>"集中管理研究",x7e=()=>"پژوهش خود را یکپارچه کنید",w7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?y7e():t==="fa"?x7e():b7e()}),S7e=()=>"Continue",k7e=()=>"继续",C7e=()=>"ادامه",UE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?k7e():t==="fa"?C7e():S7e()}),E7e=()=>"Describe your research area to continue.",N7e=()=>"请描述你的研究领域后再继续。",z7e=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",T7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?N7e():t==="fa"?z7e():E7e()}),j7e=()=>"Detecting Claude Code, Codex, OpenCode…",A7e=()=>"正在检测 Claude Code、Codex、OpenCode…",R7e=()=>"در حال شناسایی Claude Code، Codex و OpenCode…",M7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?A7e():t==="fa"?R7e():j7e()}),D7e=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",L7e=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",O7e=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",I7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?L7e():t==="fa"?O7e():D7e()}),B7e=()=>"Everything stays local",$7e=()=>"一切都保留在本地",P7e=()=>"همه‌چیز محلی می‌ماند",F7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$7e():t==="fa"?P7e():B7e()}),H7e=()=>"Get started",q7e=()=>"开始使用",U7e=()=>"شروع",G7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?q7e():t==="fa"?U7e():H7e()}),W7e=()=>"Git is required for local experiments. Install Git, then re-check.",V7e=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",K7e=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",Q7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?V7e():t==="fa"?K7e():W7e()}),Y7e=()=>"Ground your agents",X7e=()=>"为智能体提供可靠依据",Z7e=()=>"عامل‌هایتان را به منابع متصل کنید",J7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?X7e():t==="fa"?Z7e():Y7e()}),eCe=()=>"Install broken",tCe=()=>"安装损坏",nCe=()=>"نصب خراب است",rCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tCe():t==="fa"?nCe():eCe()}),sCe=()=>"Install Git to continue",iCe=()=>"请安装 Git 后再继续",aCe=()=>"برای ادامه Git را نصب کنید",oCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iCe():t==="fa"?aCe():sCe()}),lCe=()=>"Local Git",cCe=()=>"本地 Git",uCe=()=>"Git محلی",fCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cCe():t==="fa"?uCe():lCe()}),dCe=()=>"Not detected",hCe=()=>"未检测到",_Ce=()=>"شناسایی نشد",GE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hCe():t==="fa"?_Ce():dCe()}),pCe=()=>"Not found",mCe=()=>"未找到",gCe=()=>"پیدا نشد",vD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mCe():t==="fa"?gCe():pCe()}),vCe=()=>"Not signed in",bCe=()=>"未登录",yCe=()=>"وارد نشده",xCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bCe():t==="fa"?yCe():vCe()}),wCe=()=>"OpenResearch uses a coding agent already installed on this machine.",SCe=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",kCe=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",CCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SCe():t==="fa"?kCe():wCe()}),ECe=()=>"Other research area",NCe=()=>"其他研究领域",zCe=()=>"حوزهٔ پژوهشی دیگر",TCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?NCe():t==="fa"?zCe():ECe()}),jCe=()=>"Re-check",ACe=()=>"重新检查",RCe=()=>"بررسی دوباره",MCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ACe():t==="fa"?RCe():jCe()}),DCe=()=>"Ready",LCe=()=>"已就绪",OCe=()=>"آماده",ICe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LCe():t==="fa"?OCe():DCe()}),BCe=()=>"Re-check Git before continuing",$Ce=()=>"请重新检查 Git 后再继续",PCe=()=>"پیش از ادامه Git را دوباره بررسی کنید",FCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ce():t==="fa"?PCe():BCe()}),HCe=()=>"Representative papers",qCe=()=>"代表性论文",UCe=()=>"مقاله‌های شاخص",GCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qCe():t==="fa"?UCe():HCe()}),WCe=()=>"Research background",VCe=()=>"研究背景",KCe=()=>"پیشینهٔ پژوهشی",QCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VCe():t==="fa"?KCe():WCe()}),YCe=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",XCe=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",ZCe=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",WE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XCe():t==="fa"?ZCe():YCe()}),JCe=()=>"Search alphaXiv by title to link a paper…",e8e=()=>"按标题搜索 alphaXiv 以关联论文…",t8e=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",n8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?e8e():t==="fa"?t8e():JCe()}),r8e=()=>"Searching alphaXiv…",s8e=()=>"正在搜索 alphaXiv…",i8e=()=>"در حال جست‌وجوی alphaXiv…",a8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?s8e():t==="fa"?i8e():r8e()}),o8e=()=>"Selected",l8e=()=>"已选择",c8e=()=>"انتخاب‌شده",u8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?l8e():t==="fa"?c8e():o8e()}),f8e=()=>"Setting things up…",d8e=()=>"正在设置…",h8e=()=>"در حال راه‌اندازی…",_8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?d8e():t==="fa"?h8e():f8e()}),p8e=()=>"Sign in to at least one coding agent to continue",m8e=()=>"请至少登录一个编程智能体后再继续",g8e=()=>"برای ادامه، وارد دست‌کم یک عامل برنامه‌نویسی شوید",v8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?m8e():t==="fa"?g8e():p8e()}),b8e=()=>"Sign in to at least one agent to continue.",y8e=()=>"请登录至少一个智能体以继续。",x8e=()=>"برای ادامه دست‌کم به یک عامل وارد شوید.",w8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?y8e():t==="fa"?x8e():b8e()}),S8e=()=>"Signed in",k8e=()=>"已登录",C8e=()=>"وارد شده",E8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?k8e():t==="fa"?C8e():S8e()}),N8e=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",z8e=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",T8e=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",j8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?z8e():t==="fa"?T8e():N8e()}),A8e=()=>"· Step 1 of 2",R8e=()=>"· 第 1 步,共 2 步",M8e=()=>"· مرحلهٔ ۱ از ۲",D8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?R8e():t==="fa"?M8e():A8e()}),L8e=()=>"· Step 2 of 2",O8e=()=>"· 第 2 步,共 2 步",I8e=()=>"· مرحلهٔ ۲ از ۲",B8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?O8e():t==="fa"?I8e():L8e()}),$8e=()=>"Tell us about your research",P8e=()=>"介绍一下你的研究",F8e=()=>"از پژوهش خود بگویید",H8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?P8e():t==="fa"?F8e():$8e()}),q8e=()=>"Tell us your other research area",U8e=()=>"告诉我们你的其他研究领域",G8e=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",W8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?U8e():t==="fa"?G8e():q8e()}),V8e=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",K8e=()=>"在一处跟踪实验、产物、算力、技能和代码。",Q8e=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",Y8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?K8e():t==="fa"?Q8e():V8e()}),X8e=()=>"Unable to verify",Z8e=()=>"无法验证",J8e=()=>"تأیید ممکن نیست",e9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Z8e():t==="fa"?J8e():X8e()}),t9e=()=>"Update required",n9e=()=>"需要更新",r9e=()=>"نیازمند به‌روزرسانی",s9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?n9e():t==="fa"?r9e():t9e()}),i9e=()=>"Waiting for the Git check",a9e=()=>"正在等待 Git 检查",o9e=()=>"در انتظار بررسی Git",l9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?a9e():t==="fa"?o9e():i9e()}),c9e=()=>"Waiting for the local tool checks",u9e=()=>"正在等待本地工具检查",f9e=()=>"در انتظار بررسی ابزارهای محلی",d9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?u9e():t==="fa"?f9e():c9e()}),h9e=()=>"What areas are you interested in?",_9e=()=>"你对哪些领域感兴趣?",p9e=()=>"به چه حوزه‌هایی علاقه دارید؟",m9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_9e():t==="fa"?p9e():h9e()}),g9e=()=>"Your code, data, and experiment history stay on your machine.",v9e=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",b9e=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",y9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?v9e():t==="fa"?b9e():g9e()}),x9e=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",w9e=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",S9e=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",k9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?w9e():t==="fa"?S9e():x9e()}),C9e=()=>"Add cookie",E9e=()=>"添加 cookie",N9e=()=>"افزودن کوکی",z9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?E9e():t==="fa"?N9e():C9e()}),T9e=()=>"Changed here and on Overleaf — choose which copy to keep",j9e=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",A9e=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",R9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?j9e():t==="fa"?A9e():T9e()}),M9e=()=>"Create a token ↗",D9e=()=>"创建令牌 ↗",L9e=()=>"ساخت توکن ↗",O9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?D9e():t==="fa"?L9e():M9e()}),I9e=()=>"Overleaf Git token",B9e=()=>"Overleaf Git 令牌",$9e=()=>"توکن Git در Overleaf",VE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?B9e():t==="fa"?$9e():I9e()}),P9e=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",F9e=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",H9e=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",q9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?F9e():t==="fa"?H9e():P9e()}),U9e=()=>"Import from browser",G9e=()=>"从浏览器导入",W9e=()=>"وارد کردن از مرورگر",V9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?G9e():t==="fa"?W9e():U9e()}),K9e=()=>"In step with Overleaf",Q9e=()=>"已与 Overleaf 同步",Y9e=()=>"با Overleaf همگام است",bD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Q9e():t==="fa"?Y9e():K9e()}),X9e=()=>"The last sync did not finish.",Z9e=()=>"上次同步未完成。",J9e=()=>"آخرین همگام‌سازی کامل نشد.",eEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Z9e():t==="fa"?J9e():X9e()}),tEe=()=>"Link and sync",nEe=()=>"关联并同步",rEe=()=>"پیوند و همگام‌سازی",sEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nEe():t==="fa"?rEe():tEe()}),iEe=()=>"Connecting to Overleaf…",aEe=()=>"正在连接 Overleaf…",oEe=()=>"در حال اتصال به Overleaf…",lEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aEe():t==="fa"?oEe():iEe()}),cEe=()=>"Edits are live on Overleaf",uEe=()=>"编辑已在 Overleaf 实时同步",fEe=()=>"ویرایش‌ها روی Overleaf زنده‌اند",dEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uEe():t==="fa"?fEe():cEe()}),hEe=()=>"Retry",_Ee=()=>"重试",pEe=()=>"تلاش دوباره",mEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_Ee():t==="fa"?pEe():hEe()}),gEe=()=>"Live sync stopped.",vEe=()=>"实时同步已停止。",bEe=()=>"همگام‌سازی زنده متوقف شد.",yEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vEe():t==="fa"?bEe():gEe()}),xEe=()=>"Live sync starts once the paper is in step with Overleaf.",wEe=()=>"论文与 Overleaf 同步后,实时同步即会开始。",SEe=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",kEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wEe():t==="fa"?SEe():xEe()}),CEe=()=>"My projects ↗",EEe=()=>"我的项目 ↗",NEe=()=>"پروژه‌های من ↗",KE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?EEe():t==="fa"?NEe():CEe()}),zEe=()=>"Nothing could be synced.",TEe=()=>"没有内容可以同步。",jEe=()=>"هیچ موردی قابل همگام‌سازی نبود.",AEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TEe():t==="fa"?jEe():zEe()}),REe=()=>"Open Overleaf ↗",MEe=()=>"打开 Overleaf ↗",DEe=()=>"باز کردن Overleaf ↗",LEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MEe():t==="fa"?DEe():REe()}),OEe=()=>"Cancel",IEe=()=>"取消",BEe=()=>"لغو",yD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IEe():t==="fa"?BEe():OEe()}),$Ee=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",PEe=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",FEe=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",HEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PEe():t==="fa"?FEe():$Ee()}),qEe=()=>"Keep this copy",UEe=()=>"保留此副本",GEe=()=>"نگه داشتن این نسخه",WEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UEe():t==="fa"?GEe():qEe()}),VEe=()=>"Open in Overleaf",KEe=()=>"在 Overleaf 中打开",QEe=()=>"باز کردن در Overleaf",YEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KEe():t==="fa"?QEe():VEe()}),XEe=()=>"Replace the Overleaf token",ZEe=()=>"替换 Overleaf 令牌",JEe=()=>"جایگزینی توکن Overleaf",QE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZEe():t==="fa"?JEe():XEe()}),eNe=()=>"Sync files",tNe=()=>"同步文件",nNe=()=>"همگام‌سازی فایل‌ها",rNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tNe():t==="fa"?nNe():eNe()}),sNe=()=>"Unlink",iNe=()=>"取消关联",aNe=()=>"قطع پیوند",oNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iNe():t==="fa"?aNe():sNe()}),lNe=()=>"Upload a copy as a new project ↗",cNe=()=>"上传副本作为新项目 ↗",uNe=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",xD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cNe():t==="fa"?uNe():lNe()}),fNe=()=>"Use Overleaf's",dNe=()=>"使用 Overleaf 的副本",hNe=()=>"استفاده از نسخهٔ Overleaf",_Ne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dNe():t==="fa"?hNe():fNe()}),pNe=()=>"This paper stays in step with Overleaf.",mNe=()=>"此论文将与 Overleaf 保持同步。",gNe=()=>"این مقاله با Overleaf همگام می‌ماند.",vNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mNe():t==="fa"?gNe():pNe()}),bNe=()=>"Paste it instead",yNe=()=>"改为粘贴",xNe=()=>"به‌جایش بچسبانید",wNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yNe():t==="fa"?xNe():bNe()}),SNe=e=>`Pulled ${e==null?void 0:e.paths}.`,kNe=e=>`已拉取 ${e==null?void 0:e.paths}。`,CNe=e=>`${e==null?void 0:e.paths} دریافت شد.`,ENe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?kNe(e):t==="fa"?CNe(e):SNe(e)}),NNe=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,zNe=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,TNe=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,jNe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?zNe(e):t==="fa"?TNe(e):NNe(e)}),ANe=e=>`Pushed ${e==null?void 0:e.paths}.`,RNe=e=>`已推送 ${e==null?void 0:e.paths}。`,MNe=e=>`${e==null?void 0:e.paths} ارسال شد.`,DNe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?RNe(e):t==="fa"?MNe(e):ANe(e)}),LNe=()=>"Add a fresh Overleaf session cookie to start following again.",ONe=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",INe=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",BNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ONe():t==="fa"?INe():LNe()}),$Ne=()=>"Save the file first",PNe=()=>"请先保存文件",FNe=()=>"ابتدا فایل را ذخیره کنید",HNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PNe():t==="fa"?FNe():$Ne()}),qNe=()=>"Save this file to sync it with Overleaf",UNe=()=>"保存此文件以与 Overleaf 同步",GNe=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",wD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UNe():t==="fa"?GNe():qNe()}),WNe=()=>"Save token",VNe=()=>"保存令牌",KNe=()=>"ذخیرهٔ توکن",QNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VNe():t==="fa"?KNe():WNe()}),YNe=()=>"Send this paper to Overleaf",XNe=()=>"将此论文发送到 Overleaf",ZNe=()=>"ارسال مقاله به Overleaf",JNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XNe():t==="fa"?ZNe():YNe()}),eze=()=>"Overleaf session cookie",tze=()=>"Overleaf 会话 cookie",nze=()=>"کوکی نشست Overleaf",g4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tze():t==="fa"?nze():eze()}),rze=()=>"To follow Overleaf as people type, paste your Overleaf session cookie: in a browser signed in to Overleaf, open the developer tools, find the overleaf_session2 cookie, and copy its value. It stays on this machine.",sze=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",ize=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",aze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sze():t==="fa"?ize():rze()}),oze=()=>"Overleaf sync failed",lze=()=>"Overleaf 同步失败",cze=()=>"همگام‌سازی با Overleaf ناموفق بود",v4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lze():t==="fa"?cze():oze()}),uze=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",fze=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",dze=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",hze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fze():t==="fa"?dze():uze()}),_ze=()=>"Syncing with Overleaf…",pze=()=>"正在与 Overleaf 同步…",mze=()=>"در حال همگام‌سازی با Overleaf…",SD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pze():t==="fa"?mze():_ze()}),gze=()=>"Paste an Overleaf Git authentication token to keep this paper in step with an Overleaf project. Create one in Overleaf under Account Settings — Git integration comes with a paid Overleaf plan.",vze=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",bze=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",yze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vze():t==="fa"?bze():gze()}),xze=()=>"Paste the URL of the Overleaf project this paper belongs to. Overleaf cannot create one over Git, so open or create the project there first.",wze=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",Sze=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",kze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wze():t==="fa"?Sze():xze()}),Cze=()=>"Toggle Plan mode for this chat",Eze=()=>"切换此聊天的计划模式",Nze=()=>"تغییر حالت طرح این گفت‌وگو",zze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Eze():t==="fa"?Nze():Cze()}),Tze=()=>"Accept and auto mode",jze=()=>"接受并使用自动模式",Aze=()=>"پذیرش و حالت خودکار",Rze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jze():t==="fa"?Aze():Tze()}),Mze=()=>"Accept and bypass all",Dze=()=>"接受并跳过所有审批",Lze=()=>"پذیرش و عبور از همهٔ تأییدها",Oze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Dze():t==="fa"?Lze():Mze()}),Ize=()=>"Accept plan",Bze=()=>"接受计划",$ze=()=>"پذیرش طرح",Pze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bze():t==="fa"?$ze():Ize()}),Fze=e=>`${e==null?void 0:e.agent} proposed a plan`,Hze=e=>`${e==null?void 0:e.agent} 提出了一个计划`,qze=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,Uze=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Hze(e):t==="fa"?qze(e):Fze(e)}),Gze=e=>`${e==null?void 0:e.agent} is ready to proceed`,Wze=e=>`${e==null?void 0:e.agent} 已准备好继续`,Vze=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,Kze=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Wze(e):t==="fa"?Vze(e):Gze(e)}),Qze=()=>"Back",Yze=()=>"返回",Xze=()=>"بازگشت",Zze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yze():t==="fa"?Xze():Qze()}),Jze=()=>"More approval options",eTe=()=>"更多批准选项",tTe=()=>"گزینه‌های تأیید بیشتر",nTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eTe():t==="fa"?tTe():Jze()}),rTe=()=>"Open plan",sTe=()=>"打开计划",iTe=()=>"باز کردن طرح",aTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sTe():t==="fa"?iTe():rTe()}),oTe=()=>"Reject",lTe=()=>"拒绝",cTe=()=>"رد کردن",uTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lTe():t==="fa"?cTe():oTe()}),fTe=()=>"Revise",dTe=()=>"修改",hTe=()=>"بازنگری",_Te=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dTe():t==="fa"?hTe():fTe()}),pTe=()=>"Revise…",mTe=()=>"修改…",gTe=()=>"بازنگری…",vTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mTe():t==="fa"?gTe():pTe()}),bTe=()=>"What should change? (optional)",yTe=()=>"需要更改什么?(可选)",xTe=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",wTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yTe():t==="fa"?xTe():bTe()}),STe=e=>`${e==null?void 0:e.count} active`,kTe=e=>`${e==null?void 0:e.count} 个活跃`,CTe=e=>`${e==null?void 0:e.count} فعال`,ETe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?kTe(e):t==="fa"?CTe(e):STe(e)}),NTe=e=>`${e==null?void 0:e.count} total agents`,zTe=e=>`共 ${e==null?void 0:e.count} 个智能体`,TTe=e=>`در مجموع ${e==null?void 0:e.count} عامل`,jTe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?zTe(e):t==="fa"?TTe(e):NTe(e)}),ATe=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,RTe=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,MTe=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,DTe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?RTe(e):t==="fa"?MTe(e):ATe(e)}),LTe=()=>"Agents",OTe=()=>"智能体",ITe=()=>"عامل‌ها",YE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OTe():t==="fa"?ITe():LTe()}),BTe=()=>"arXiv paper ID:",$Te=()=>"arXiv 论文 ID:",PTe=()=>"شناسهٔ مقالهٔ arXiv:",FTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Te():t==="fa"?PTe():BTe()}),HTe=()=>"Cancel",qTe=()=>"取消",UTe=()=>"لغو",GTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qTe():t==="fa"?UTe():HTe()}),WTe=()=>"Created",VTe=()=>"创建时间",KTe=()=>"ایجادشده",QTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VTe():t==="fa"?KTe():WTe()}),YTe=()=>"Delete project?",XTe=()=>"删除项目?",ZTe=()=>"پروژه حذف شود؟",JTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XTe():t==="fa"?ZTe():YTe()}),eje=()=>"Delete project",tje=()=>"删除项目",nje=()=>"حذف پروژه",rje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tje():t==="fa"?nje():eje()}),sje=()=>"Deleting…",ije=()=>"正在删除…",aje=()=>"در حال حذف…",oje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ije():t==="fa"?aje():sje()}),lje=()=>"Experiments",cje=()=>"实验",uje=()=>"آزمایش‌ها",XE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cje():t==="fa"?uje():lje()}),fje=()=>"The local folder and linked GitHub repository are kept.",dje=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",hje=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",_je=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dje():t==="fa"?hje():fje()}),pje=()=>"The local folder is kept.",mje=()=>"本地文件夹会保留。",gje=()=>"پوشهٔ محلی نگه داشته می‌شود.",vje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mje():t==="fa"?gje():pje()}),bje=()=>"New project",yje=()=>"新建项目",xje=()=>"پروژهٔ جدید",kD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yje():t==="fa"?xje():bje()}),wje=()=>"No projects yet — create one to get started.",Sje=()=>"尚无项目——新建一个即可开始。",kje=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",Cje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sje():t==="fa"?kje():wje()}),Eje=()=>"Project",Nje=()=>"项目",zje=()=>"پروژه",Tje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nje():t==="fa"?zje():Eje()}),jje=()=>"Projects",Aje=()=>"项目",Rje=()=>"پروژه‌ها",Mje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Aje():t==="fa"?Rje():jje()}),Dje=()=>"Repository",Lje=()=>"仓库",Oje=()=>"مخزن",ZE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lje():t==="fa"?Oje():Dje()}),Ije=()=>"Idle",Bje=()=>"空闲",$je=()=>"بیکار",Pje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bje():t==="fa"?$je():Ije()}),Fje=()=>"Local",Hje=()=>"本地",qje=()=>"محلی",CD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hje():t==="fa"?qje():Fje()}),Uje=()=>"1 total agent",Gje=()=>"共 1 个智能体",Wje=()=>"در مجموع ۱ عامل",Vje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Gje():t==="fa"?Wje():Uje()}),Kje=e=>`${e==null?void 0:e.count} running`,Qje=e=>`${e==null?void 0:e.count} 个运行中`,Yje=e=>`${e==null?void 0:e.count} در حال اجرا`,Xje=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Qje(e):t==="fa"?Yje(e):Kje(e)}),Zje=e=>`${e==null?void 0:e.count} total`,Jje=e=>`共 ${e==null?void 0:e.count} 个`,eAe=e=>`در مجموع ${e==null?void 0:e.count}`,JE=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Jje(e):t==="fa"?eAe(e):Zje(e)}),tAe=e=>`${e==null?void 0:e.value}d`,nAe=e=>`${e==null?void 0:e.value} 天`,rAe=e=>`${e==null?void 0:e.value}ر`,sAe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?nAe(e):t==="fa"?rAe(e):tAe(e)}),iAe=e=>`${e==null?void 0:e.value}h`,aAe=e=>`${e==null?void 0:e.value} 小时`,oAe=e=>`${e==null?void 0:e.value}س`,lAe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?aAe(e):t==="fa"?oAe(e):iAe(e)}),cAe=e=>`${e==null?void 0:e.value}m`,uAe=e=>`${e==null?void 0:e.value} 分钟`,fAe=e=>`${e==null?void 0:e.value}د`,dAe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?uAe(e):t==="fa"?fAe(e):cAe(e)}),hAe=()=>"now",_Ae=()=>"现在",pAe=()=>"اکنون",mAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_Ae():t==="fa"?pAe():hAe()}),gAe=()=>"Installing the compatible binary. This may take a few minutes.",vAe=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",bAe=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",yAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vAe():t==="fa"?bAe():gAe()}),xAe=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,wAe=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,SAe=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,kAe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?wAe(e):t==="fa"?SAe(e):xAe(e)}),CAe=()=>"Check again",EAe=()=>"再次检查",NAe=()=>"بررسی دوباره",eN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?EAe():t==="fa"?NAe():CAe()}),zAe=()=>"Closing…",TAe=()=>"正在关闭…",jAe=()=>"در حال بستن…",AAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TAe():t==="fa"?jAe():zAe()}),RAe=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,MAe=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,DAe=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,LAe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?MAe(e):t==="fa"?DAe(e):RAe(e)}),OAe=()=>"Preparing your remote workspace…",IAe=()=>"正在准备远程工作区…",BAe=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",$Ae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IAe():t==="fa"?BAe():OAe()}),PAe=e=>`Connecting to ${e==null?void 0:e.host}`,FAe=e=>`正在连接到 ${e==null?void 0:e.host}`,HAe=e=>`در حال اتصال به ${e==null?void 0:e.host}`,qAe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?FAe(e):t==="fa"?HAe(e):PAe(e)}),UAe=()=>"Close remote host picker",GAe=()=>"关闭远程主机选择器",WAe=()=>"بستن انتخاب‌گر میزبان راه‌دور",VAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GAe():t==="fa"?WAe():UAe()}),KAe=()=>"Choose a configured SSH host.",QAe=()=>"选择已配置的 SSH 主机。",YAe=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",XAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QAe():t==="fa"?YAe():KAe()}),ZAe=()=>"Connect to remote",JAe=()=>"连接到远程主机",eRe=()=>"اتصال به میزبان راه‌دور",ED=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?JAe():t==="fa"?eRe():ZAe()}),tRe=()=>"Disconnect",nRe=()=>"断开连接",rRe=()=>"قطع اتصال",b4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nRe():t==="fa"?rRe():tRe()}),sRe=()=>"Your remote work is still running. Reconnect when you’re ready.",iRe=()=>"你的远程工作仍在运行。准备好后可以重新连接。",aRe=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",oRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iRe():t==="fa"?aRe():sRe()}),lRe=e=>`Disconnected from ${e==null?void 0:e.host}`,cRe=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,uRe=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,ND=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cRe(e):t==="fa"?uRe(e):lRe(e)}),fRe=e=>`Could not connect to ${e==null?void 0:e.host}`,dRe=e=>`无法连接到 ${e==null?void 0:e.host}`,hRe=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,_Re=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?dRe(e):t==="fa"?hRe(e):fRe(e)}),pRe=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",mRe=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",gRe=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",vRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mRe():t==="fa"?gRe():pRe()}),bRe=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",yRe=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",xRe=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",wRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yRe():t==="fa"?xRe():bRe()}),SRe=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,kRe=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,CRe=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,ERe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?kRe(e):t==="fa"?CRe(e):SRe(e)}),NRe=()=>"OpenResearch binary",zRe=()=>"OpenResearch 二进制文件",TRe=()=>"فایل اجرایی OpenResearch",jRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zRe():t==="fa"?TRe():NRe()}),ARe=()=>"Repository cache",RRe=()=>"仓库缓存",MRe=()=>"حافظهٔ نهان مخزن",DRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RRe():t==="fa"?MRe():ARe()}),LRe=()=>"OpenResearch Database",ORe=()=>"OpenResearch 数据库",IRe=()=>"پایگاه دادهٔ OpenResearch",BRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ORe():t==="fa"?IRe():LRe()}),$Re=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",PRe=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",FRe=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",HRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PRe():t==="fa"?FRe():$Re()}),qRe=()=>"Install OpenResearch?",URe=()=>"安装 OpenResearch?",GRe=()=>"OpenResearch نصب شود؟",WRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?URe():t==="fa"?GRe():qRe()}),VRe=()=>"Installing…",KRe=()=>"正在安装…",QRe=()=>"در حال نصب…",YRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KRe():t==="fa"?QRe():VRe()}),XRe=()=>"No matching SSH hosts",ZRe=()=>"没有匹配的 SSH 主机",JRe=()=>"میزبان SSH منطبقی پیدا نشد",eMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZRe():t==="fa"?JRe():XRe()}),tMe=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,nMe=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,rMe=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,sMe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?nMe(e):t==="fa"?rMe(e):tMe(e)}),iMe=()=>"Open remote",aMe=()=>"打开远程工作区",oMe=()=>"باز کردن راه‌دور",lMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aMe():t==="fa"?oMe():iMe()}),cMe=()=>"Closing this tab or disconnecting leaves agents and experiments running. Approval requests remain pending for up to 55 minutes. A host restart or administrator policy may stop OpenResearch.",uMe=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",fMe=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",dMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uMe():t==="fa"?fMe():cMe()}),hMe=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",_Me=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",pMe=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",mMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_Me():t==="fa"?pMe():hMe()}),gMe=()=>"Preparing remote workspace…",vMe=()=>"正在准备远程工作区…",bMe=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",yMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vMe():t==="fa"?bMe():gMe()}),xMe=()=>"Reconnect",wMe=()=>"重新连接",SMe=()=>"اتصال دوباره",tN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wMe():t==="fa"?SMe():xMe()}),kMe=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",CMe=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",EMe=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",NMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CMe():t==="fa"?EMe():kMe()}),zMe=e=>`Reconnecting to ${e==null?void 0:e.host}`,TMe=e=>`正在重新连接到 ${e==null?void 0:e.host}`,jMe=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,AMe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?TMe(e):t==="fa"?jMe(e):zMe(e)}),RMe=()=>"Search SSH hosts",MMe=()=>"搜索 SSH 主机",DMe=()=>"جستجوی میزبان‌های SSH",nN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MMe():t==="fa"?DMe():RMe()}),LMe=e=>`SSH: ${e==null?void 0:e.host}`,OMe=e=>`SSH:${e==null?void 0:e.host}`,IMe=e=>`SSH: ${e==null?void 0:e.host}`,m2=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?OMe(e):t==="fa"?IMe(e):LMe(e)}),BMe=()=>"Start a new OpenResearch host",$Me=()=>"启动新的 OpenResearch 主机",PMe=()=>"راه‌اندازی میزبان جدید OpenResearch",FMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Me():t==="fa"?PMe():BMe()}),HMe=e=>`End ${e==null?void 0:e.count} pending approvals.`,qMe=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,UMe=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,GMe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?qMe(e):t==="fa"?UMe(e):HMe(e)}),WMe=()=>"Stop OpenResearch",VMe=()=>"停止 OpenResearch",KMe=()=>"توقف OpenResearch",QMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VMe():t==="fa"?KMe():WMe()}),YMe=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,XMe=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,ZMe=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,JMe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?XMe(e):t==="fa"?ZMe(e):YMe(e)}),eDe=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,tDe=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,nDe=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,rDe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?tDe(e):t==="fa"?nDe(e):eDe(e)}),sDe=()=>"Stop OpenResearch on host",iDe=()=>"停止主机上的 OpenResearch",aDe=()=>"توقف OpenResearch روی میزبان",zD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iDe():t==="fa"?aDe():sDe()}),oDe=()=>"This will also:",lDe=()=>"这还将:",cDe=()=>"این کار همچنین:",uDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lDe():t==="fa"?cDe():oDe()}),fDe=()=>"End 1 pending approval.",dDe=()=>"结束 1 个待审批请求。",hDe=()=>"۱ تأیید در انتظار را پایان می‌دهد.",_De=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dDe():t==="fa"?hDe():fDe()}),pDe=()=>"Leave 1 submitted experiment running.",mDe=()=>"让 1 个已提交实验继续运行。",gDe=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",vDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mDe():t==="fa"?gDe():pDe()}),bDe=()=>"Disconnect 1 other client.",yDe=()=>"断开 1 个其他客户端。",xDe=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",wDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yDe():t==="fa"?xDe():bDe()}),SDe=()=>"Keep 1 queued message saved.",kDe=()=>"保留 1 条排队消息。",CDe=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",EDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kDe():t==="fa"?CDe():SDe()}),NDe=()=>"Interrupt 1 active agent turn.",zDe=()=>"中断 1 个活动代理任务。",TDe=()=>"۱ نوبت فعال عامل را قطع می‌کند.",jDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zDe():t==="fa"?TDe():NDe()}),ADe=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,RDe=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,MDe=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,DDe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?RDe(e):t==="fa"?MDe(e):ADe(e)}),LDe=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,ODe=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,IDe=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,BDe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?ODe(e):t==="fa"?IDe(e):LDe(e)}),$De=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,PDe=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,FDe=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,HDe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?PDe(e):t==="fa"?FDe(e):$De(e)}),qDe=()=>"Stopping host…",UDe=()=>"正在停止主机…",GDe=()=>"در حال توقف میزبان…",WDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UDe():t==="fa"?GDe():qDe()}),VDe=()=>"Update",KDe=()=>"更新",QDe=()=>"به‌روزرسانی",rN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KDe():t==="fa"?QDe():VDe()}),YDe=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,XDe=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,ZDe=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,JDe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?XDe(e):t==="fa"?ZDe(e):YDe(e)}),eLe=()=>"Update OpenResearch?",tLe=()=>"更新 OpenResearch?",nLe=()=>"OpenResearch به‌روزرسانی شود؟",rLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tLe():t==="fa"?nLe():eLe()}),sLe=()=>"Updating…",iLe=()=>"正在更新…",aLe=()=>"در حال به‌روزرسانی…",oLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iLe():t==="fa"?aLe():sLe()}),lLe=()=>"Disable syncing",cLe=()=>"关闭同步",uLe=()=>"غیرفعال کردن همگام‌سازی",fLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cLe():t==="fa"?uLe():lLe()}),dLe=()=>"Enable GitHub syncing",hLe=()=>"启用 GitHub 同步",_Le=()=>"فعال‌سازی همگام‌سازی GitHub",pLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hLe():t==="fa"?_Le():dLe()}),mLe=()=>"Enabling…",gLe=()=>"正在启用…",vLe=()=>"در حال فعال‌سازی…",bLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gLe():t==="fa"?vLe():mLe()}),yLe=()=>"Updating…",xLe=()=>"正在更新…",wLe=()=>"در حال به‌روزرسانی…",SLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xLe():t==="fa"?wLe():yLe()}),kLe=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,CLe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,ELe=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,NLe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?CLe(e):t==="fa"?ELe(e):kLe(e)}),zLe=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,TLe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,jLe=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,ALe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?TLe(e):t==="fa"?jLe(e):zLe(e)}),RLe=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · next attempt in ${e==null?void 0:e.seconds}s`,MLe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,DLe=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,LLe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?MLe(e):t==="fa"?DLe(e):RLe(e)}),OLe=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,ILe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,BLe=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,$Le=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?ILe(e):t==="fa"?BLe(e):OLe(e)}),PLe=()=>"CLI is retrying…",FLe=()=>"CLI 正在重试…",HLe=()=>"CLI در حال تلاش دوباره است…",qLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FLe():t==="fa"?HLe():PLe()}),ULe=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,GLe=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,WLe=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,VLe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?GLe(e):t==="fa"?WLe(e):ULe(e)}),KLe=()=>"Sending again…",QLe=()=>"正在重新发送…",YLe=()=>"در حال ارسال دوباره…",XLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QLe():t==="fa"?YLe():KLe()}),ZLe=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,JLe=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,eOe=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,tOe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?JLe(e):t==="fa"?eOe(e):ZLe(e)}),nOe=()=>"Retrying…",rOe=()=>"正在重试…",sOe=()=>"در حال تلاش دوباره…",TD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rOe():t==="fa"?sOe():nOe()}),iOe=()=>"Default speed",aOe=()=>"默认速度",oOe=()=>"سرعت پیش‌فرض",lOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aOe():t==="fa"?oOe():iOe()}),cOe=()=>"Standard",uOe=()=>"标准",fOe=()=>"استاندارد",dOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uOe():t==="fa"?fOe():cOe()}),hOe=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,_Oe=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,pOe=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,mOe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?_Oe(e):t==="fa"?pOe(e):hOe(e)}),gOe=()=>"Appearance",vOe=()=>"外观",bOe=()=>"ظاهر",yOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vOe():t==="fa"?bOe():gOe()}),xOe=()=>"Check",wOe=()=>"检查",SOe=()=>"بررسی",kOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wOe():t==="fa"?SOe():xOe()}),COe=()=>"Check again",EOe=()=>"再次检查",NOe=()=>"بررسی دوباره",Hp=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?EOe():t==="fa"?NOe():COe()}),zOe=()=>"Check for updates",TOe=()=>"检查更新",jOe=()=>"بررسی به‌روزرسانی",AOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TOe():t==="fa"?jOe():zOe()}),ROe=()=>"Check now",MOe=()=>"立即检查",DOe=()=>"اکنون بررسی کن",LOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MOe():t==="fa"?DOe():ROe()}),OOe=()=>"Check setup",IOe=()=>"检查设置",BOe=()=>"بررسی راه‌اندازی",$Oe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IOe():t==="fa"?BOe():OOe()}),POe=()=>"orx checks a few times a day on its own.",FOe=()=>"orx 每天会自动检查几次。",HOe=()=>"orx روزی چند بار خودکار بررسی می‌کند.",qOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FOe():t==="fa"?HOe():POe()}),UOe=()=>"Choose a flavor",GOe=()=>"选择配置",WOe=()=>"انتخاب پیکربندی",VOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GOe():t==="fa"?WOe():UOe()}),KOe=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,QOe=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,YOe=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,XOe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?QOe(e):t==="fa"?YOe(e):KOe(e)}),ZOe=()=>"clean",JOe=()=>"无更改",eIe=()=>"بدون تغییر",tIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?JOe():t==="fa"?eIe():ZOe()}),nIe=e=>`Already linked at ${e==null?void 0:e.link}.`,rIe=e=>`已链接到 ${e==null?void 0:e.link}。`,sIe=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,iIe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?rIe(e):t==="fa"?sIe(e):nIe(e)}),aIe=e=>`Linked ${e==null?void 0:e.link}.`,oIe=e=>`已链接 ${e==null?void 0:e.link}。`,lIe=e=>`${e==null?void 0:e.link} پیوند شد.`,cIe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?oIe(e):t==="fa"?lIe(e):aIe(e)}),uIe=()=>"Connect",fIe=()=>"连接",dIe=()=>"اتصال",H3=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fIe():t==="fa"?dIe():uIe()}),hIe=()=>"Connected via GitHub CLI",_Ie=()=>"已通过 GitHub CLI 连接",pIe=()=>"از طریق GitHub CLI متصل است",jD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_Ie():t==="fa"?pIe():hIe()}),mIe=()=>"Connecting…",gIe=()=>"正在连接…",vIe=()=>"در حال اتصال…",AD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gIe():t==="fa"?vIe():mIe()}),bIe=e=>`CPU cores: ${e==null?void 0:e.count}`,yIe=e=>`${e==null?void 0:e.count} 个 CPU 核心`,xIe=e=>`${e==null?void 0:e.count} هستهٔ CPU`,wIe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?yIe(e):t==="fa"?xIe(e):bIe(e)}),SIe=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",kIe=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",CIe=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",EIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kIe():t==="fa"?CIe():SIe()}),NIe=()=>"the current project",zIe=()=>"当前项目",TIe=()=>"پروژهٔ فعلی",jIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zIe():t==="fa"?TIe():NIe()}),AIe=e=>`${e==null?void 0:e.value} (custom)`,RIe=e=>`${e==null?void 0:e.value}(自定义)`,MIe=e=>`${e==null?void 0:e.value} (سفارشی)`,DIe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?RIe(e):t==="fa"?MIe(e):AIe(e)}),LIe=()=>"detached",OIe=()=>"分离头指针",IIe=()=>"جدا از شاخه",RD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OIe():t==="fa"?IIe():LIe()}),BIe=()=>"Disconnected",$Ie=()=>"已断开连接",PIe=()=>"قطع اتصال",MD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ie():t==="fa"?PIe():BIe()}),FIe=()=>"Environment tab",HIe=()=>"环境标签页",qIe=()=>"زبانهٔ محیط",UIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?HIe():t==="fa"?qIe():FIe()}),GIe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,WIe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,VIe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,KIe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?WIe(e):t==="fa"?VIe(e):GIe(e)}),QIe=()=>"GitHub rejected the push because this repository is archived and read-only. The local project is still available. Unarchive the repository on GitHub, then enable syncing here.",YIe=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",XIe=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",ZIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YIe():t==="fa"?XIe():QIe()}),JIe=()=>"GitHub contains changes that are not in this local project. Pull the latest GitHub changes and resolve any conflicts in Git, then try enabling syncing again.",eBe=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",tBe=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",nBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eBe():t==="fa"?tBe():JIe()}),rBe=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",sBe=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",iBe=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",aBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sBe():t==="fa"?iBe():rBe()}),oBe=e=>`GPU × ${e==null?void 0:e.count}`,lBe=e=>`${e==null?void 0:e.count} 个 GPU`,cBe=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,uBe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?lBe(e):t==="fa"?cBe(e):oBe(e)}),fBe=()=>"has changes",dBe=()=>"有更改",hBe=()=>"دارای تغییر",_Be=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dBe():t==="fa"?hBe():fBe()}),pBe=e=>`This token is valid but does not report whether it can launch Jobs; OAuth tokens from ${e==null?void 0:e.login} never do. Launches may still work. For a definitive check, save a write-scoped token from ${e==null?void 0:e.url}.`,mBe=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,gBe=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,vBe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?mBe(e):t==="fa"?gBe(e):pBe(e)}),bBe=()=>"This token is valid, but cannot submit Hugging Face Jobs. Create a token with Jobs write permission in Hugging Face token settings, then replace it here.",yBe=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",xBe=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",wBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yBe():t==="fa"?xBe():bBe()}),SBe=()=>"Install",kBe=()=>"安装",CBe=()=>"نصب",EBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kBe():t==="fa"?CBe():SBe()}),NBe=e=>`Adds ${e==null?void 0:e.command} to your terminal, pointing at this app, so the CLI and app are always the same version.`,zBe=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,TBe=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,jBe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?zBe(e):t==="fa"?TBe(e):NBe(e)}),ABe=e=>`Install the ${e==null?void 0:e.command} command`,RBe=e=>`安装 ${e==null?void 0:e.command} 命令`,MBe=e=>`نصب فرمان ${e==null?void 0:e.command}`,DBe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?RBe(e):t==="fa"?MBe(e):ABe(e)}),LBe=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",OBe=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",IBe=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",BBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OBe():t==="fa"?IBe():LBe()}),$Be=()=>"Install the new release now instead of waiting for the background update.",PBe=()=>"立即安装新版本,无需等待后台更新。",FBe=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",HBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PBe():t==="fa"?FBe():$Be()}),qBe=()=>"Discard your unsaved Kubernetes changes?",UBe=()=>"要放弃未保存的 Kubernetes 更改吗?",GBe=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",WBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UBe():t==="fa"?GBe():qBe()}),VBe=()=>"Key from",KBe=()=>"密钥来自",QBe=()=>"کلید از",YBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KBe():t==="fa"?QBe():VBe()}),XBe=()=>"Use current kubectl context",ZBe=()=>"使用当前 kubectl 上下文",JBe=()=>"استفاده از کانتکست فعلی kubectl",e$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZBe():t==="fa"?JBe():XBe()}),t$e=e=>`Use current context (${e==null?void 0:e.context})`,n$e=e=>`使用当前上下文(${e==null?void 0:e.context})`,r$e=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,s$e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?n$e(e):t==="fa"?r$e(e):t$e(e)}),i$e=()=>"Language",a$e=()=>"语言",o$e=()=>"زبان",l$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?a$e():t==="fa"?o$e():i$e()}),c$e=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,u$e=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,f$e=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,d$e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?u$e(e):t==="fa"?f$e(e):c$e(e)}),h$e=()=>"Make default",_$e=()=>"设为默认值",p$e=()=>"پیش‌فرض شود",m$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_$e():t==="fa"?p$e():h$e()}),g$e=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",v$e=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",b$e=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",y$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?v$e():t==="fa"?b$e():g$e()}),x$e=()=>"Replace token ID",w$e=()=>"替换令牌 ID",S$e=()=>"جایگزینی شناسهٔ توکن",k$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?w$e():t==="fa"?S$e():x$e()}),C$e=()=>"Replace token secret",E$e=()=>"替换令牌密钥",N$e=()=>"جایگزینی رمز توکن",z$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?E$e():t==="fa"?N$e():C$e()}),T$e=()=>"How to get a Modal token",j$e=()=>"如何获取 Modal 令牌",A$e=()=>"روش دریافت توکن Modal",R$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?j$e():t==="fa"?A$e():T$e()}),M$e=()=>"Token ID",D$e=()=>"令牌 ID",L$e=()=>"شناسهٔ توکن",O$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?D$e():t==="fa"?L$e():M$e()}),I$e=()=>"Token secret",B$e=()=>"令牌密钥",$$e=()=>"رمز توکن",P$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?B$e():t==="fa"?$$e():I$e()}),F$e=e=>`${e==null?void 0:e.count} available — ${e==null?void 0:e.models}`,H$e=e=>`${e==null?void 0:e.count} 个可用 — ${e==null?void 0:e.models}`,q$e=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,U$e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?H$e(e):t==="fa"?q$e(e):F$e(e)}),G$e=e=>`Needs ${e==null?void 0:e.tool}`,W$e=e=>`需要 ${e==null?void 0:e.tool}`,V$e=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,K$e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?W$e(e):t==="fa"?V$e(e):G$e(e)}),Q$e=()=>"Needs tools",Y$e=()=>"缺少工具",X$e=()=>"به ابزارها نیاز دارد",Z$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Y$e():t==="fa"?X$e():Q$e()}),J$e=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,ePe=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,tPe=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,nPe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?ePe(e):t==="fa"?tPe(e):J$e(e)}),rPe=()=>"New runs use SSH; choose a host when launching.",sPe=()=>"新运行将使用 SSH;启动时请选择主机。",iPe=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",aPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sPe():t==="fa"?iPe():rPe()}),oPe=()=>"New token",lPe=()=>"新令牌",cPe=()=>"توکن جدید",uPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lPe():t==="fa"?cPe():oPe()}),fPe=()=>"No default flavor",dPe=()=>"不设默认配置",hPe=()=>"بدون پیکربندی پیش‌فرض",_Pe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dPe():t==="fa"?hPe():fPe()}),pPe=()=>"none",mPe=()=>"无",gPe=()=>"هیچ‌کدام",q3=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mPe():t==="fa"?gPe():pPe()}),vPe=()=>"Not connected",bPe=()=>"未连接",yPe=()=>"متصل نیست",DD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bPe():t==="fa"?yPe():vPe()}),xPe=()=>"not found on PATH",wPe=()=>"在 PATH 中未找到",SPe=()=>"در PATH پیدا نشد",kPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wPe():t==="fa"?SPe():xPe()}),CPe=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,EPe=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,NPe=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,zPe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?EPe(e):t==="fa"?NPe(e):CPe(e)}),TPe=()=>"not initialized",jPe=()=>"尚未初始化",APe=()=>"راه‌اندازی نشده",RPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jPe():t==="fa"?APe():TPe()}),MPe=()=>"Not set",DPe=()=>"未设置",LPe=()=>"تنظیم نشده",sN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?DPe():t==="fa"?LPe():MPe()}),OPe=()=>"OAuth (subscription login)",IPe=()=>"OAuth(订阅登录)",BPe=()=>"OAuth (ورود با اشتراک)",$Pe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IPe():t==="fa"?BPe():OPe()}),PPe=e=>`The old copy was left at ${e==null?void 0:e.path} on a different disk. You can delete it after confirming everything works.`,FPe=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,HPe=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,qPe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?FPe(e):t==="fa"?HPe(e):PPe(e)}),UPe=()=>"Setting up…",GPe=()=>"正在设置…",WPe=()=>"در حال راه‌اندازی…",VPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GPe():t==="fa"?WPe():UPe()}),KPe=()=>"Account",QPe=()=>"账户",YPe=()=>"حساب",U3=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QPe():t==="fa"?YPe():KPe()}),XPe=()=>"Add one with",ZPe=()=>"使用以下命令添加:",JPe=()=>"یکی با این فرمان اضافه کنید:",eFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZPe():t==="fa"?JPe():XPe()}),tFe=()=>"Add variable",nFe=()=>"添加变量",rFe=()=>"افزودن متغیر",sFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nFe():t==="fa"?rFe():tFe()}),iFe=()=>"Agent models",aFe=()=>"智能体模型",oFe=()=>"مدل‌های عامل",lFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aFe():t==="fa"?oFe():iFe()}),cFe=()=>"Anonymous usage analytics",uFe=()=>"匿名使用情况分析",fFe=()=>"تحلیل ناشناس استفاده",iN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uFe():t==="fa"?fFe():cFe()}),dFe=()=>"Auth",hFe=()=>"身份验证",_Fe=()=>"احراز هویت",pFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hFe():t==="fa"?_Fe():dFe()}),mFe=()=>"Authentication",gFe=()=>"身份验证",vFe=()=>"احراز هویت",bFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gFe():t==="fa"?vFe():mFe()}),yFe=()=>"Back to Compute",xFe=()=>"返回算力设置",wFe=()=>"بازگشت به رایانش",LD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xFe():t==="fa"?wFe():yFe()}),SFe=()=>"Backend",kFe=()=>"后端",CFe=()=>"بک‌اند",EFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kFe():t==="fa"?CFe():SFe()}),NFe=()=>"Baseline",zFe=()=>"基线",TFe=()=>"خط مبنا",jFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zFe():t==="fa"?TFe():NFe()}),AFe=()=>"Binary",RFe=()=>"可执行文件",MFe=()=>"فایل اجرایی",DFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RFe():t==="fa"?MFe():AFe()}),LFe=()=>"Cancel",OFe=()=>"取消",IFe=()=>"لغو",qp=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OFe():t==="fa"?IFe():LFe()}),BFe=()=>"Cancel new variable",$Fe=()=>"取消新变量",PFe=()=>"لغو متغیر جدید",FFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Fe():t==="fa"?PFe():BFe()}),HFe=()=>"Checking compute targets…",qFe=()=>"正在检查算力目标…",UFe=()=>"در حال بررسی مقصدهای رایانشی…",GFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qFe():t==="fa"?UFe():HFe()}),WFe=()=>"Checking kubectl…",VFe=()=>"正在检查 kubectl…",KFe=()=>"در حال بررسی kubectl…",QFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VFe():t==="fa"?KFe():WFe()}),YFe=()=>"Checking Modal…",XFe=()=>"正在检查 Modal…",ZFe=()=>"در حال بررسی Modal…",JFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XFe():t==="fa"?ZFe():YFe()}),eHe=()=>"Choose a preset flavor",tHe=()=>"选择预设规格",nHe=()=>"یک پیکربندی آماده انتخاب کنید",aN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tHe():t==="fa"?nHe():eHe()}),rHe=()=>"cluster default",sHe=()=>"集群默认值",iHe=()=>"پیش‌فرض خوشه",oN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sHe():t==="fa"?iHe():rHe()}),aHe=()=>"cluster default (e.g. 4h, 30m)",oHe=()=>"集群默认值(例如 4h、30m)",lHe=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",cHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oHe():t==="fa"?lHe():aHe()}),uHe=()=>"Cluster unreachable",fHe=()=>"无法连接集群",dHe=()=>"خوشه در دسترس نیست",hHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fHe():t==="fa"?dHe():uHe()}),_He=()=>"Compute",pHe=()=>"算力",mHe=()=>"رایانش",OD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pHe():t==="fa"?mHe():_He()}),gHe=()=>"Connect compute backends and choose where new runs execute.",vHe=()=>"连接算力后端,并选择新运行的执行位置。",bHe=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",yHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vHe():t==="fa"?bHe():gHe()}),xHe=()=>"Connected",wHe=()=>"已连接",SHe=()=>"متصل",kHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wHe():t==="fa"?SHe():xHe()}),CHe=()=>"Context",EHe=()=>"上下文",NHe=()=>"زمینه",zHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?EHe():t==="fa"?NHe():CHe()}),THe=()=>"Current",jHe=()=>"当前",AHe=()=>"فعلی",RHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jHe():t==="fa"?AHe():THe()}),MHe=()=>"Currently off:",DHe=()=>"当前已关闭:",LHe=()=>"اکنون خاموش است:",OHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?DHe():t==="fa"?LHe():MHe()}),IHe=()=>"Custom flavor",BHe=()=>"自定义规格",$He=()=>"پیکربندی سفارشی",PHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?BHe():t==="fa"?$He():IHe()}),FHe=()=>"Custom flavor…",HHe=()=>"自定义规格…",qHe=()=>"پیکربندی سفارشی…",UHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?HHe():t==="fa"?qHe():FHe()}),GHe=()=>"Data directory",WHe=()=>"数据目录",VHe=()=>"پوشهٔ داده",KHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?WHe():t==="fa"?VHe():GHe()}),QHe=()=>"default",YHe=()=>"默认",XHe=()=>"پیش‌فرض",ZHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YHe():t==="fa"?XHe():QHe()}),JHe=()=>"Default",eqe=()=>"默认",tqe=()=>"پیش‌فرض",ID=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eqe():t==="fa"?tqe():JHe()}),nqe=()=>"Default destination",rqe=()=>"默认目标",sqe=()=>"مقصد پیش‌فرض",iqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rqe():t==="fa"?sqe():nqe()}),aqe=()=>"Detecting hardware…",oqe=()=>"正在检测硬件…",lqe=()=>"در حال شناسایی سخت‌افزار…",cqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oqe():t==="fa"?lqe():aqe()}),uqe=()=>"Detecting harnesses…",fqe=()=>"正在检测智能体工具…",dqe=()=>"در حال شناسایی ابزارهای عامل…",hqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fqe():t==="fa"?dqe():uqe()}),_qe=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",pqe=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",mqe=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",gqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pqe():t==="fa"?mqe():_qe()}),vqe=()=>"Effective URL",bqe=()=>"实际使用的网址",yqe=()=>"نشانی مؤثر",xqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bqe():t==="fa"?yqe():vqe()}),wqe=()=>"Enable GitHub syncing for new projects",Sqe=()=>"为新项目启用 GitHub 同步",kqe=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",lN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sqe():t==="fa"?kqe():wqe()}),Cqe=()=>"Environment",Eqe=()=>"环境",Nqe=()=>"محیط",BD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Eqe():t==="fa"?Nqe():Cqe()}),zqe=()=>"Failed",Tqe=()=>"失败",jqe=()=>"ناموفق",G3=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tqe():t==="fa"?jqe():zqe()}),Aqe=()=>"General",Rqe=()=>"常规",Mqe=()=>"عمومی",Dqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rqe():t==="fa"?Mqe():Aqe()}),Lqe=()=>"GitHub publishing",Oqe=()=>"GitHub 发布",Iqe=()=>"انتشار در GitHub",Bqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Oqe():t==="fa"?Iqe():Lqe()}),$qe=()=>"Git token",Pqe=()=>"Git 令牌",Fqe=()=>"توکن Git",Hqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pqe():t==="fa"?Fqe():$qe()}),qqe=()=>"Harnesses",Uqe=()=>"智能体工具",Gqe=()=>"ابزارهای عامل",Wqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Uqe():t==="fa"?Gqe():qqe()}),Vqe=()=>"hf_…",Kqe=()=>"hf_…",Qqe=()=>"hf_…",Yqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kqe():t==="fa"?Qqe():Vqe()}),Xqe=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",Zqe=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",Jqe=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",eUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zqe():t==="fa"?Jqe():Xqe()}),tUe=()=>"Initialize Git",nUe=()=>"初始化 Git",rUe=()=>"راه‌اندازی Git",sUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nUe():t==="fa"?rUe():tUe()}),iUe=()=>"Install",aUe=()=>"安装",oUe=()=>"نصب",$D=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aUe():t==="fa"?oUe():iUe()}),lUe=()=>"Install broken",cUe=()=>"安装损坏",uUe=()=>"نصب خراب است",fUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cUe():t==="fa"?uUe():lUe()}),dUe=()=>"Install GitHub CLI",hUe=()=>"安装 GitHub CLI",_Ue=()=>"نصب GitHub CLI",pUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hUe():t==="fa"?_Ue():dUe()}),mUe=()=>"Install updates automatically",gUe=()=>"自动安装更新",vUe=()=>"نصب خودکار به‌روزرسانی‌ها",cN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gUe():t==="fa"?vUe():mUe()}),bUe=()=>"Instance history",yUe=()=>"实例历史",xUe=()=>"تاریخچهٔ نمونه‌ها",wUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yUe():t==="fa"?xUe():bUe()}),SUe=()=>"Invalid Token",kUe=()=>"令牌无效",CUe=()=>"توکن نامعتبر",EUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kUe():t==="fa"?CUe():SUe()}),NUe=()=>"Jobs / Dashboard URL",zUe=()=>"Jobs / 控制台网址",TUe=()=>"نشانی Jobs / داشبورد",jUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zUe():t==="fa"?TUe():NUe()}),AUe=()=>"kubectl not found",RUe=()=>"未找到 kubectl",MUe=()=>"kubectl پیدا نشد",DUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RUe():t==="fa"?MUe():AUe()}),LUe=()=>"Latest",OUe=()=>"最新版本",IUe=()=>"جدیدترین",BUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OUe():t==="fa"?IUe():LUe()}),$Ue=()=>"Loading…",PUe=()=>"正在加载…",FUe=()=>"در حال بارگیری…",vu=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PUe():t==="fa"?FUe():$Ue()}),HUe=()=>"Loading Ray settings…",qUe=()=>"正在加载 Ray 设置…",UUe=()=>"در حال بارگیری تنظیمات Ray…",GUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qUe():t==="fa"?UUe():HUe()}),WUe=()=>"Loading slurm settings…",VUe=()=>"正在加载 Slurm 设置…",KUe=()=>"در حال بارگیری تنظیمات Slurm…",QUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VUe():t==="fa"?KUe():WUe()}),YUe=()=>"Loading status…",XUe=()=>"正在加载状态…",ZUe=()=>"در حال بارگیری وضعیت…",JUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XUe():t==="fa"?ZUe():YUe()}),eGe=()=>"Local only",tGe=()=>"仅本地",nGe=()=>"فقط محلی",rGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tGe():t==="fa"?nGe():eGe()}),sGe=()=>"Local repository",iGe=()=>"本地仓库",aGe=()=>"مخزن محلی",oGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iGe():t==="fa"?aGe():sGe()}),lGe=()=>"Login node",cGe=()=>"登录节点",uGe=()=>"گرهٔ ورود",fGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cGe():t==="fa"?uGe():lGe()}),dGe=()=>"Make GitHub syncing the default?",hGe=()=>"将 GitHub 同步设为默认值?",_Ge=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",pGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hGe():t==="fa"?_Ge():dGe()}),mGe=()=>"Missing bash/tar",gGe=()=>"缺少 bash/tar",vGe=()=>"bash/tar موجود نیست",bGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gGe():t==="fa"?vGe():mGe()}),yGe=()=>"More compute options",xGe=()=>"更多算力选项",wGe=()=>"گزینه‌های رایانشی بیشتر",SGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xGe():t==="fa"?wGe():yGe()}),kGe=()=>"Move failed:",CGe=()=>"移动失败:",EGe=()=>"انتقال ناموفق بود:",NGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CGe():t==="fa"?EGe():kGe()}),zGe=()=>"Moved. orx is now using the new location.",TGe=()=>"已移动。orx 现在使用新位置。",jGe=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",AGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TGe():t==="fa"?jGe():zGe()}),RGe=()=>"Namespace",MGe=()=>"命名空间",DGe=()=>"فضای نام",LGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MGe():t==="fa"?DGe():RGe()}),OGe=()=>"New location",IGe=()=>"新位置",BGe=()=>"محل جدید",$Ge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IGe():t==="fa"?BGe():OGe()}),PGe=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",FGe=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",HGe=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",qGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FGe():t==="fa"?HGe():PGe()}),UGe=()=>"New variable key",GGe=()=>"新变量键名",WGe=()=>"کلید متغیر جدید",VGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GGe():t==="fa"?WGe():UGe()}),KGe=()=>"New variable value",QGe=()=>"新变量值",YGe=()=>"مقدار متغیر جدید",XGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QGe():t==="fa"?YGe():KGe()}),ZGe=()=>"No code, prompts, file contents, or account identifiers are sent.",JGe=()=>"不会发送代码、提示词、文件内容或账户标识符。",eWe=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",tWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?JGe():t==="fa"?eWe():ZGe()}),nWe=()=>"No hosts found in ~/.ssh/config.",rWe=()=>"在 ~/.ssh/config 中未找到主机。",sWe=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",iWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rWe():t==="fa"?sWe():nWe()}),aWe=()=>"No job-create permission",oWe=()=>"没有创建 Job 的权限",lWe=()=>"مجوز ساخت Job وجود ندارد",cWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oWe():t==="fa"?lWe():aWe()}),uWe=()=>"No Write Permissions",fWe=()=>"无写入权限",dWe=()=>"بدون مجوز نوشتن",hWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fWe():t==="fa"?dWe():uWe()}),_We=()=>"No key on this computer to register — load a registered key with",pWe=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",mWe=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",gWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pWe():t==="fa"?mWe():_We()}),vWe=()=>"No key on this computer yet — create one with",bWe=()=>"此计算机上还没有密钥——使用以下命令创建:",yWe=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",xWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bWe():t==="fa"?yWe():vWe()}),wWe=()=>"No Slurm CLI",SWe=()=>"无 Slurm CLI",kWe=()=>"بدون CLI اسلورم",CWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SWe():t==="fa"?kWe():wWe()}),EWe=()=>"None registered",NWe=()=>"未注册任何密钥",zWe=()=>"هیچ‌کدام ثبت نشده",TWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?NWe():t==="fa"?zWe():EWe()}),jWe=()=>"Not checked",AWe=()=>"未检查",RWe=()=>"بررسی نشده",PD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?AWe():t==="fa"?RWe():jWe()}),MWe=()=>"Not configured",DWe=()=>"未配置",LWe=()=>"پیکربندی نشده",Qv=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?DWe():t==="fa"?LWe():MWe()}),OWe=()=>"Not installed",IWe=()=>"未安装",BWe=()=>"نصب نیست",$We=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IWe():t==="fa"?BWe():OWe()}),PWe=()=>"Not now",FWe=()=>"暂不",HWe=()=>"اکنون نه",qWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FWe():t==="fa"?HWe():PWe()}),UWe=()=>"Not on this computer",GWe=()=>"不在此计算机上",WWe=()=>"روی این رایانه نیست",VWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GWe():t==="fa"?WWe():UWe()}),KWe=()=>"Not set (pass --host per launch)",QWe=()=>"未设置(每次启动时传入 --host)",YWe=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",XWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QWe():t==="fa"?YWe():KWe()}),ZWe=()=>"Not signed in",JWe=()=>"未登录",eVe=()=>"وارد نشده",FD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?JWe():t==="fa"?eVe():ZWe()}),tVe=()=>"On this computer",nVe=()=>"在此计算机上",rVe=()=>"روی این رایانه",sVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nVe():t==="fa"?rVe():tVe()}),iVe=()=>"Open a project to inspect its repository and GitHub publication state.",aVe=()=>"打开项目以查看其仓库和 GitHub 发布状态。",oVe=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",lVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aVe():t==="fa"?oVe():iVe()}),cVe=()=>"Open job page",uVe=()=>"打开作业页面",fVe=()=>"باز کردن صفحهٔ کار",uN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uVe():t==="fa"?fVe():cVe()}),dVe=()=>"Open on GitHub",hVe=()=>"在 GitHub 上打开",_Ve=()=>"باز کردن در GitHub",fN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hVe():t==="fa"?_Ve():dVe()}),pVe=()=>", or create one with",mVe=()=>",或使用以下命令创建:",gVe=()=>"، یا با این فرمان یکی بسازید:",vVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mVe():t==="fa"?gVe():pVe()}),bVe=()=>"Org",yVe=()=>"组织",xVe=()=>"سازمان",wVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yVe():t==="fa"?xVe():bVe()}),SVe=()=>"Orgs",kVe=()=>"组织",CVe=()=>"سازمان‌ها",EVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kVe():t==="fa"?CVe():SVe()}),NVe=()=>"orx can't update this install",zVe=()=>"orx 无法更新此安装",TVe=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",jVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zVe():t==="fa"?TVe():NVe()}),AVe=()=>"Overleaf",RVe=()=>"Overleaf",MVe=()=>"Overleaf",HD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RVe():t==="fa"?MVe():AVe()}),DVe=()=>"Overleaf Git authentication token",LVe=()=>"Overleaf Git 身份验证令牌",OVe=()=>"توکن احراز هویت Git در Overleaf",IVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LVe():t==="fa"?OVe():DVe()}),BVe=()=>"Overridden by env",$Ve=()=>"已被环境变量覆盖",PVe=()=>"بازنویسی‌شده توسط محیط",FVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ve():t==="fa"?PVe():BVe()}),HVe=()=>"Partition",qVe=()=>"分区",UVe=()=>"پارتیشن",GVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qVe():t==="fa"?UVe():HVe()}),WVe=()=>"Path",VVe=()=>"路径",KVe=()=>"مسیر",QVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VVe():t==="fa"?KVe():WVe()}),YVe=()=>"Plan",XVe=()=>"方案",ZVe=()=>"سطح اشتراک",JVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XVe():t==="fa"?ZVe():YVe()}),eKe=()=>"Project",tKe=()=>"项目",nKe=()=>"پروژه",rKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tKe():t==="fa"?nKe():eKe()}),sKe=()=>"Ray version",iKe=()=>"Ray 版本",aKe=()=>"نسخهٔ Ray",oKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iKe():t==="fa"?aKe():sKe()}),lKe=()=>"Reachable",cKe=()=>"可访问",uKe=()=>"در دسترس",fKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cKe():t==="fa"?uKe():lKe()}),dKe=()=>"Reading ~/.ssh/config…",hKe=()=>"正在读取 ~/.ssh/config…",_Ke=()=>"در حال خواندن ‎~/.ssh/config…",qD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hKe():t==="fa"?_Ke():dKe()}),pKe=()=>"Ready",mKe=()=>"就绪",gKe=()=>"آماده",Up=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mKe():t==="fa"?gKe():pKe()}),vKe=()=>"Ready to move",bKe=()=>"可以移动",yKe=()=>"آمادهٔ انتقال",xKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bKe():t==="fa"?yKe():vKe()}),wKe=()=>"Configured",SKe=()=>"已配置",kKe=()=>"پیکربندی‌شده",W3=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SKe():t==="fa"?kKe():wKe()}),CKe=()=>"Refresh",EKe=()=>"刷新",NKe=()=>"تازه‌سازی",Gp=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?EKe():t==="fa"?NKe():CKe()}),zKe=()=>"Remotes",TKe=()=>"远程仓库",jKe=()=>"مخزن‌های دوردست",AKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TKe():t==="fa"?jKe():zKe()}),RKe=()=>"Repository",MKe=()=>"仓库",DKe=()=>"مخزن",LKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MKe():t==="fa"?DKe():RKe()}),OKe=()=>"Restart to finish updating",IKe=()=>"重新启动以完成更新",BKe=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",$Ke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IKe():t==="fa"?BKe():OKe()}),PKe=()=>"Running instances",FKe=()=>"正在运行的实例",HKe=()=>"نمونه‌های در حال اجرا",qKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FKe():t==="fa"?HKe():PKe()}),UKe=()=>"Runtime",GKe=()=>"运行时间",WKe=()=>"زمان اجرا",VKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GKe():t==="fa"?WKe():UKe()}),KKe=()=>". Save it under that key if it's meant for HF Jobs.",QKe=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",YKe=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",XKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QKe():t==="fa"?YKe():KKe()}),ZKe=()=>"Session cookie",JKe=()=>"会话 cookie",eQe=()=>"کوکی نشست",tQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?JKe():t==="fa"?eQe():ZKe()}),nQe=()=>"With a session cookie saved, a linked paper follows Overleaf as people type and sends saves straight back. Figures still move on the slower Git sync. Copy the overleaf_session2 cookie from a browser signed in to Overleaf; it stops working when that sign-in does.",rQe=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",sQe=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",iQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rQe():t==="fa"?sQe():nQe()}),aQe=()=>"Settings",oQe=()=>"设置",lQe=()=>"تنظیمات",V3=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oQe():t==="fa"?lQe():aQe()}),cQe=()=>"Signed in",uQe=()=>"已登录",fQe=()=>"وارد شده",dQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uQe():t==="fa"?fQe():cQe()}),hQe=()=>"Source",_Qe=()=>"来源",pQe=()=>"منبع",UD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_Qe():t==="fa"?pQe():hQe()}),mQe=()=>"SSH Key",gQe=()=>"SSH 密钥",vQe=()=>"کلید SSH",bQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gQe():t==="fa"?vQe():mQe()}),yQe=()=>"Started",xQe=()=>"开始时间",wQe=()=>"آغاز",SQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xQe():t==="fa"?wQe():yQe()}),kQe=()=>"State",CQe=()=>"状态",EQe=()=>"وضعیت",NQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CQe():t==="fa"?EQe():kQe()}),zQe=()=>"Status",TQe=()=>"状态",jQe=()=>"وضعیت",t_=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TQe():t==="fa"?jQe():zQe()}),AQe=()=>"Storage",RQe=()=>"存储",MQe=()=>"ذخیره‌سازی",DQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RQe():t==="fa"?MQe():AQe()}),LQe=()=>"Sync",OQe=()=>"同步",IQe=()=>"همگام‌سازی",BQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OQe():t==="fa"?IQe():LQe()}),$Qe=()=>"Syncing off",PQe=()=>"同步已关闭",FQe=()=>"همگام‌سازی خاموش",HQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PQe():t==="fa"?FQe():$Qe()}),qQe=()=>"Test connection",UQe=()=>"测试连接",GQe=()=>"آزمایش اتصال",WQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UQe():t==="fa"?GQe():qQe()}),VQe=()=>"Testing…",KQe=()=>"正在测试…",QQe=()=>"در حال آزمایش…",YQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KQe():t==="fa"?QQe():VQe()}),XQe=()=>", then add it with",ZQe=()=>",然后使用以下命令添加:",JQe=()=>"، سپس با این فرمان اضافه‌اش کنید:",eYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZQe():t==="fa"?JQe():XQe()}),tYe=()=>"This is useful when collaborators follow project changes on GitHub. New projects will enable syncing automatically, creating a private repository when needed and pushing experiment branches for visibility.",nYe=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",rYe=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",sYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nYe():t==="fa"?rYe():tYe()}),iYe=()=>"This saved destination is not configured. Set it up below or choose another backend.",aYe=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",oYe=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",lYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aYe():t==="fa"?oYe():iYe()}),cYe=()=>"This value looks like a Hugging Face token — compute runs only read it from",uYe=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",fYe=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",dYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uYe():t==="fa"?fYe():cYe()}),hYe=()=>"Time limit",_Ye=()=>"时间限制",pYe=()=>"محدودیت زمانی",mYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_Ye():t==="fa"?pYe():hYe()}),gYe=()=>"Unable to verify",vYe=()=>"无法验证",bYe=()=>"تأیید ممکن نیست",y4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vYe():t==="fa"?bYe():gYe()}),yYe=()=>"Unknown",xYe=()=>"未知",wYe=()=>"نامشخص",SYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xYe():t==="fa"?wYe():yYe()}),kYe=()=>"Update required",CYe=()=>"需要更新",EYe=()=>"نیازمند به‌روزرسانی",NYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CYe():t==="fa"?EYe():kYe()}),zYe=()=>"Updates",TYe=()=>"更新",jYe=()=>"به‌روزرسانی‌ها",dN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TYe():t==="fa"?jYe():zYe()}),AYe=()=>"Usage analytics",RYe=()=>"使用情况分析",MYe=()=>"تحلیل استفاده",DYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RYe():t==="fa"?MYe():AYe()}),LYe=()=>"value",OYe=()=>"值",IYe=()=>"مقدار",GD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OYe():t==="fa"?IYe():LYe()}),BYe=()=>"Variables available to runs and the research agent (API keys, tokens).",$Ye=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",PYe=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",FYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ye():t==="fa"?PYe():BYe()}),HYe=()=>"Version",qYe=()=>"版本",UYe=()=>"نسخه",WD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qYe():t==="fa"?UYe():HYe()}),GYe=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",WYe=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",VYe=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",KYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?WYe():t==="fa"?VYe():GYe()}),QYe=()=>"With a token saved, a paper opened in the dashboard can be kept in step with an Overleaf project, in both directions. Overleaf's Git integration comes with a paid Overleaf plan; without one, a paper can still be uploaded to Overleaf as a new project. The token stays on this machine and is not sent to compute backends.",YYe=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",XYe=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",ZYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YYe():t==="fa"?XYe():QYe()}),JYe=()=>"Pick a login node first",eXe=()=>"请先选择登录节点",tXe=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",nXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eXe():t==="fa"?tXe():JYe()}),rXe=()=>"Providers",sXe=()=>"提供商",iXe=()=>"ارائه‌دهندگان",aXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sXe():t==="fa"?iXe():rXe()}),oXe=()=>"Reconnect",lXe=()=>"重新连接",cXe=()=>"اتصال دوباره",VD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lXe():t==="fa"?cXe():oXe()}),uXe=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,fXe=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,dXe=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,hXe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?fXe(e):t==="fa"?dXe(e):uXe(e)}),_Xe=()=>"Reinstall with the orx installer to get automatic updates.",pXe=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",mXe=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",gXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pXe():t==="fa"?mXe():_Xe()}),vXe=()=>"Re-link",bXe=()=>"重新链接",yXe=()=>"پیوند دوباره",xXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bXe():t==="fa"?yXe():vXe()}),wXe=()=>"Remove cookie",SXe=()=>"移除 cookie",kXe=()=>"حذف کوکی",CXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SXe():t==="fa"?kXe():wXe()}),EXe=()=>"Remove token",NXe=()=>"移除令牌",zXe=()=>"حذف توکن",TXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?NXe():t==="fa"?zXe():EXe()}),jXe=()=>"Removing…",AXe=()=>"正在移除…",RXe=()=>"در حال حذف…",hN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?AXe():t==="fa"?RXe():jXe()}),MXe=()=>"Replace anyway",DXe=()=>"仍要替换",LXe=()=>"به‌هرحال جایگزین کن",OXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?DXe():t==="fa"?LXe():MXe()}),IXe=()=>"Replace key",BXe=()=>"替换密钥",$Xe=()=>"جایگزینی کلید",PXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?BXe():t==="fa"?$Xe():IXe()}),FXe=()=>"Replace token",HXe=()=>"替换令牌",qXe=()=>"جایگزینی توکن",UXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?HXe():t==="fa"?qXe():FXe()}),GXe=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,WXe=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,VXe=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,KXe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?WXe(e):t==="fa"?VXe(e):GXe(e)}),QXe=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,YXe=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,XXe=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,ZXe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?YXe(e):t==="fa"?XXe(e):QXe(e)}),JXe=()=>"Run `gh auth login` in your terminal.",eZe=()=>"请在终端中运行 `gh auth login`。",tZe=()=>"در پایانه `gh auth login` را اجرا کنید.",nZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eZe():t==="fa"?tZe():JXe()}),rZe=()=>"Saved",sZe=()=>"已保存",iZe=()=>"ذخیره شده",_N=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sZe():t==="fa"?iZe():rZe()}),aZe=()=>"Set up",oZe=()=>"设置",lZe=()=>"راه‌اندازی",cZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oZe():t==="fa"?lZe():aZe()}),uZe=()=>"Set up SSH key",fZe=()=>"设置 SSH 密钥",dZe=()=>"راه‌اندازی کلید SSH",hZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fZe():t==="fa"?dZe():uZe()}),_Ze=()=>"Sign in",pZe=()=>"登录",mZe=()=>"ورود",KD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pZe():t==="fa"?mZe():_Ze()}),gZe=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,vZe=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,bZe=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,QD=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?vZe(e):t==="fa"?bZe(e):gZe(e)}),yZe=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",xZe=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",wZe=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",SZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xZe():t==="fa"?wZe():yZe()}),kZe=()=>"The terminal disconnected before setup completed. Try again.",CZe=()=>"设置完成前终端连接已断开。请重试。",EZe=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",pN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CZe():t==="fa"?EZe():kZe()}),NZe=()=>"Dark",zZe=()=>"深色",TZe=()=>"تیره",jZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zZe():t==="fa"?TZe():NZe()}),AZe=()=>"Theme",RZe=()=>"主题",MZe=()=>"پوسته",mN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RZe():t==="fa"?MZe():AZe()}),DZe=()=>"Light",LZe=()=>"浅色",OZe=()=>"روشن",IZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LZe():t==="fa"?OZe():DZe()}),BZe=()=>"System",$Ze=()=>"系统",PZe=()=>"سیستم",FZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ze():t==="fa"?PZe():BZe()}),HZe=()=>"Set up billing in the Tinker console",qZe=()=>"在 Tinker 控制台设置账单",UZe=()=>"تنظیم پرداخت در کنسول Tinker",GZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qZe():t==="fa"?UZe():HZe()}),WZe=()=>"Billing setup required",VZe=()=>"需要设置账单",KZe=()=>"تنظیم پرداخت لازم است",QZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VZe():t==="fa"?KZe():WZe()}),YZe=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",XZe=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",ZZe=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",JZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XZe():t==="fa"?ZZe():YZe()}),eJe=()=>"Invalid Key",tJe=()=>"密钥无效",nJe=()=>"کلید نامعتبر",rJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tJe():t==="fa"?nJe():eJe()}),sJe=()=>"Token from",iJe=()=>"令牌来自",aJe=()=>"توکن از",oJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iJe():t==="fa"?aJe():sJe()}),lJe=()=>"Update now",cJe=()=>"立即更新",uJe=()=>"اکنون به‌روزرسانی کن",fJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cJe():t==="fa"?uJe():lJe()}),dJe=e=>`Update to ${e==null?void 0:e.version}`,hJe=e=>`更新到 ${e==null?void 0:e.version}`,_Je=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,pJe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?hJe(e):t==="fa"?_Je(e):dJe(e)}),mJe=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",gJe=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",vJe=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",bJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gJe():t==="fa"?vJe():mJe()}),yJe=()=>"Updating default destination…",xJe=()=>"正在更新默认运行位置…",wJe=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",SJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xJe():t==="fa"?wJe():yJe()}),kJe=()=>"Use this repository for automatic experiment-branch pushes when your connected account can write to it. Otherwise, OpenResearch creates a separate private repository for collaboration.",CJe=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",EJe=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",NJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CJe():t==="fa"?EJe():kJe()}),zJe=()=>"Validating…",TJe=()=>"正在验证…",jJe=()=>"در حال اعتبارسنجی…",YD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TJe():t==="fa"?jJe():zJe()}),AJe=()=>"View settings",RJe=()=>"查看设置",MJe=()=>"مشاهدهٔ تنظیمات",DJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RJe():t==="fa"?MJe():AJe()}),LJe=()=>"Skill",OJe=()=>"技能",IJe=()=>"مهارت",XD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OJe():t==="fa"?IJe():LJe()}),BJe=()=>"Loading skill…",$Je=()=>"正在加载技能…",PJe=()=>"در حال بارگیری مهارت…",FJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Je():t==="fa"?PJe():BJe()}),HJe=e=>`Delete the “${e==null?void 0:e.name}” skill?`,qJe=e=>`删除技能“${e==null?void 0:e.name}”?`,UJe=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,GJe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?qJe(e):t==="fa"?UJe(e):HJe(e)}),WJe=e=>`Delete skill ${e==null?void 0:e.name}`,VJe=e=>`删除技能 ${e==null?void 0:e.name}`,KJe=e=>`حذف مهارت ${e==null?void 0:e.name}`,QJe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?VJe(e):t==="fa"?KJe(e):WJe(e)}),YJe=e=>`Delete the “${e==null?void 0:e.name}” template?`,XJe=e=>`删除模板“${e==null?void 0:e.name}”?`,ZJe=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,JJe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?XJe(e):t==="fa"?ZJe(e):YJe(e)}),eet=e=>`Delete template ${e==null?void 0:e.name}`,tet=e=>`删除模板 ${e==null?void 0:e.name}`,net=e=>`حذف قالب ${e==null?void 0:e.name}`,ret=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?tet(e):t==="fa"?net(e):eet(e)}),set=()=>"SKILL.md folders the agent discovers on its own and you invoke with /name in chat. Skills installed in your coding agents are picked up automatically.",iet=()=>"智能体会自动发现的 SKILL.md 技能文件夹,你可以在聊天中通过 /name 调用。你的编码智能体中已安装的技能会自动纳入。",aet=()=>"پوشه‌های SKILL.md که عامل خودش پیدا می‌کند و شما با ‎/name در گفتگو فراخوانی می‌کنید. مهارت‌های نصب‌شده در عامل‌های کدنویسی شما به‌طور خودکار در نظر گرفته می‌شوند.",oet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iet():t==="fa"?aet():set()}),cet=()=>"Drop a SKILL.md or .zip here, or click to choose",uet=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",fet=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",det=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uet():t==="fa"?fet():cet()}),het=()=>"Drop a .tex or .zip here, or click to choose",_et=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",pet=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",met=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_et():t==="fa"?pet():het()}),get=()=>"File too large (max 20 MB).",vet=()=>"文件过大(最大 20 MB)。",bet=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",ZD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vet():t==="fa"?bet():get()}),yet=()=>" + 1 file",xet=()=>" + 1 个文件",wet=()=>" + ۱ فایل",ket=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xet():t==="fa"?wet():yet()}),Cet=()=>"What the agent brings to every session, in every project: the skills it can use, and the LaTeX templates it writes papers into.",Eet=()=>"智能体在每个项目的每个会话中都会携带的内容:可用的技能,以及撰写论文所用的 LaTeX 模板。",Net=()=>"آنچه عامل در هر نشست و در همهٔ پروژه‌ها همراه دارد: مهارت‌هایی که می‌تواند استفاده کند و قالب‌های LaTeX که مقاله‌ها را با آن‌ها می‌نویسد.",zet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Eet():t==="fa"?Net():Cet()}),Tet=e=>` + ${e==null?void 0:e.count} files`,jet=e=>` + ${e==null?void 0:e.count} 个文件`,Aet=e=>` + ${e==null?void 0:e.count} فایل`,Ret=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?jet(e):t==="fa"?Aet(e):Tet(e)}),Met=()=>"Could not load skills:",Det=()=>"无法加载技能:",Let=()=>"بارگیری مهارت‌ها ممکن نشد:",Oet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Det():t==="fa"?Let():Met()}),Iet=()=>"Could not load templates:",Bet=()=>"无法加载模板:",$et=()=>"بارگیری قالب‌ها ممکن نشد:",Pet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bet():t==="fa"?$et():Iet()}),Fet=()=>"Customize",Het=()=>"自定义",qet=()=>"سفارشی‌سازی",Uet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Het():t==="fa"?qet():Fet()}),Get=()=>"Delete skill",Wet=()=>"删除技能",Vet=()=>"حذف مهارت",Ket=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wet():t==="fa"?Vet():Get()}),Qet=()=>"Delete template",Yet=()=>"删除模板",Xet=()=>"حذف قالب",Zet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yet():t==="fa"?Xet():Qet()}),Jet=()=>"LaTeX templates",ett=()=>"LaTeX 模板",ttt=()=>"قالب‌های LaTeX",ntt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ett():t==="fa"?ttt():Jet()}),rtt=()=>"Loading skills…",stt=()=>"正在加载技能…",itt=()=>"در حال بارگیری مهارت‌ها…",att=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?stt():t==="fa"?itt():rtt()}),ott=()=>"Loading templates…",ltt=()=>"正在加载模板…",ctt=()=>"در حال بارگیری قالب‌ها…",utt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ltt():t==="fa"?ctt():ott()}),ftt=()=>"No skills yet.",dtt=()=>"尚无技能。",htt=()=>"هنوز مهارتی وجود ندارد.",_tt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dtt():t==="fa"?htt():ftt()}),ptt=()=>"No templates yet.",mtt=()=>"尚无模板。",gtt=()=>"هنوز قالبی وجود ندارد.",vtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mtt():t==="fa"?gtt():ptt()}),btt=()=>"Skills",ytt=()=>"技能",xtt=()=>"مهارت‌ها",wtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ytt():t==="fa"?xtt():btt()}),Stt=()=>"Uploading…",ktt=()=>"正在上传…",Ctt=()=>"در حال بارگذاری…",Ett=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ktt():t==="fa"?Ctt():Stt()}),Ntt=()=>"A conference class or house style the agent writes papers into instead of its default preamble. Upload a .tex file or a .zip containing its .cls and .sty files. With exactly one template available, the agent uses it without asking.",ztt=()=>"智能体会使用会议文档类或内部样式来撰写论文,而不是使用默认导言。请上传 .tex 文件,或包含 .cls 和 .sty 文件的 .zip 压缩包。当恰好只有一个模板可用时,智能体会直接使用,无需询问。",Ttt=()=>"عامل به‌جای مقدمهٔ پیش‌فرض، مقاله‌ها را با کلاس همایش یا سبک سازمانی می‌نویسد. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید. وقتی دقیقاً یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",jtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ztt():t==="fa"?Ttt():Ntt()}),Att=()=>"Upload a SKILL.md file or a .zip of a skill folder.",Rtt=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",Mtt=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",Dtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rtt():t==="fa"?Mtt():Att()}),Ltt=()=>"Upload a .tex file or a .zip of a template folder.",Ott=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",Itt=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",Btt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ott():t==="fa"?Itt():Ltt()}),$tt=()=>"Close SSH config",Ptt=()=>"关闭 SSH 配置",Ftt=()=>"بستن پیکربندی SSH",Htt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ptt():t==="fa"?Ftt():$tt()}),qtt=()=>"Discard your unsaved SSH config changes?",Utt=()=>"要放弃未保存的 SSH 配置更改吗?",Gtt=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",Wtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Utt():t==="fa"?Gtt():qtt()}),Vtt=()=>"Loading SSH config…",Ktt=()=>"正在加载 SSH 配置…",Qtt=()=>"در حال بارگیری پیکربندی SSH…",Ytt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ktt():t==="fa"?Qtt():Vtt()}),Xtt=()=>"SSH config saved",Ztt=()=>"SSH 配置已保存",Jtt=()=>"پیکربندی SSH ذخیره شد",ent=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ztt():t==="fa"?Jtt():Xtt()}),tnt=()=>"SSH config",nnt=()=>"SSH 配置",rnt=()=>"پیکربندی SSH",snt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nnt():t==="fa"?rnt():tnt()}),int=()=>"Configure SSH hosts…",ant=()=>"配置 SSH 主机…",ont=()=>"پیکربندی میزبان‌های SSH…",JD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ant():t==="fa"?ont():int()}),lnt=()=>"Cancelled",cnt=()=>"已取消",unt=()=>"لغوشده",fnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cnt():t==="fa"?unt():lnt()}),dnt=()=>"Cancelling",hnt=()=>"正在取消",_nt=()=>"در حال لغو",pnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hnt():t==="fa"?_nt():dnt()}),mnt=()=>"Done",gnt=()=>"已完成",vnt=()=>"انجام‌شده",bnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gnt():t==="fa"?vnt():mnt()}),ynt=()=>"Editing",xnt=()=>"正在编辑",wnt=()=>"در حال ویرایش",Snt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xnt():t==="fa"?wnt():ynt()}),knt=()=>"Failed",Cnt=()=>"失败",Ent=()=>"ناموفق",Nnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cnt():t==="fa"?Ent():knt()}),znt=()=>"Idle",Tnt=()=>"空闲",jnt=()=>"بی‌کار",Ant=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tnt():t==="fa"?jnt():znt()}),Rnt=()=>"Running",Mnt=()=>"运行中",Dnt=()=>"در حال اجرا",Lnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mnt():t==="fa"?Dnt():Rnt()}),Ont=()=>"Starting",Int=()=>"正在启动",Bnt=()=>"در حال آغاز",$nt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Int():t==="fa"?Bnt():Ont()}),Pnt=()=>"Copying…",Fnt=()=>"正在复制…",Hnt=()=>"در حال کپی…",qnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Fnt():t==="fa"?Hnt():Pnt()}),Unt=()=>"Finalizing…",Gnt=()=>"正在完成…",Wnt=()=>"در حال نهایی‌سازی…",Vnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Gnt():t==="fa"?Wnt():Unt()}),Knt=e=>`${e==null?void 0:e.size} free at target`,Qnt=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,Ynt=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,Xnt=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Qnt(e):t==="fa"?Ynt(e):Knt(e)}),Znt=e=>`Move all orx data to: -${e==null?void 0:e.path} - -The store is copied to the new location and activated there. Active runs or chats will block the move.`,Jnt=e=>`将所有 orx 数据移动到: -${e==null?void 0:e.path} - -存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,ert=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ -${e==null?void 0:e.path} - -مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,trt=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Jnt(e):t==="fa"?ert(e):Znt(e)}),nrt=()=>"Move data here",rrt=()=>"将数据移动到此处",srt=()=>"انتقال داده به اینجا",irt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rrt():t==="fa"?srt():nrt()}),art=()=>"Moving…",ort=()=>"正在移动…",lrt=()=>"در حال جابه‌جایی…",crt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ort():t==="fa"?lrt():art()}),urt=()=>"Preparing…",frt=()=>"正在准备…",drt=()=>"در حال آماده‌سازی…",hrt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?frt():t==="fa"?drt():urt()}),_rt=()=>" (same disk, instant)",prt=()=>"(同一磁盘,可立即完成)",mrt=()=>" (روی همان دیسک، فوری)",grt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?prt():t==="fa"?mrt():_rt()}),vrt=()=>"default location",brt=()=>"默认位置",yrt=()=>"محل پیش‌فرض",xrt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?brt():t==="fa"?yrt():vrt()}),wrt=()=>"ORX_DATA_DIR environment variable",Srt=()=>"ORX_DATA_DIR 环境变量",krt=()=>"متغیر محیطی ORX_DATA_DIR",Crt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Srt():t==="fa"?krt():wrt()}),Ert=()=>"your saved setting",Nrt=()=>"已保存的设置",zrt=()=>"تنظیم ذخیره‌شدهٔ شما",Trt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nrt():t==="fa"?zrt():Ert()}),jrt=()=>"XDG_DATA_HOME",Art=()=>"XDG_DATA_HOME",Rrt=()=>"XDG_DATA_HOME",Mrt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Art():t==="fa"?Rrt():jrt()}),Drt=()=>"Verifying…",Lrt=()=>"正在验证…",Ort=()=>"در حال بررسی…",Irt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lrt():t==="fa"?Ort():Drt()}),Brt=()=>"Loading…",$rt=()=>"正在加载…",Prt=()=>"در حال بارگیری…",Frt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$rt():t==="fa"?Prt():Brt()}),Hrt=()=>"This sub-agent is no longer available.",qrt=()=>"此子智能体已不可用。",Urt=()=>"این عامل فرعی دیگر در دسترس نیست.",Grt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qrt():t==="fa"?Urt():Hrt()}),Wrt=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,Vrt=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,Krt=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,Qrt=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Vrt(e):t==="fa"?Krt(e):Wrt(e)}),Yrt=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Xrt=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,Zrt=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Jrt=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Xrt(e):t==="fa"?Zrt(e):Yrt(e)}),est=()=>", a repo for training a mini-GPT from scratch.",tst=()=>",一个从零训练迷你 GPT 的仓库。",nst=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",rst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tst():t==="fa"?nst():est()}),sst=()=>"Close",ist=()=>"关闭",ast=()=>"بستن",ost=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ist():t==="fa"?ast():sst()}),lst=()=>"Create a new project",cst=()=>"新建项目",ust=()=>"ایجاد پروژهٔ جدید",fst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cst():t==="fa"?ust():lst()}),dst=()=>"Demo project",hst=()=>"演示项目",_st=()=>"پروژهٔ نمایشی",pst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hst():t==="fa"?_st():dst()}),mst=()=>"Explore the demo",gst=()=>"探索演示项目",vst=()=>"دیدن پروژهٔ نمایشی",bst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gst():t==="fa"?vst():mst()}),yst=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",xst=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",wst=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Sst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xst():t==="fa"?wst():yst()}),kst=()=>"nanochat",Cst=()=>"nanochat",Est=()=>"nanochat",Nst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cst():t==="fa"?Est():kst()}),zst=()=>"Couldn’t save your progress. Try again.",Tst=()=>"无法保存进度。请重试。",jst=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",Ast=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tst():t==="fa"?jst():zst()}),Rst=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",Mst=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",Dst=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",Lst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mst():t==="fa"?Dst():Rst()}),Ost=()=>"Welcome to OpenResearch",Ist=()=>"欢迎使用 OpenResearch",Bst=()=>"به OpenResearch خوش آمدید",$st=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ist():t==="fa"?Bst():Ost()}),Pst=()=>"Baseline",Fst=()=>"基线",Hst=()=>"مبنا",qst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Fst():t==="fa"?Hst():Pst()}),Ust=()=>"Experiment",Gst=()=>"实验",Wst=()=>"آزمایش",zl=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Gst():t==="fa"?Wst():Ust()}),Vst=e=>`${e==null?void 0:e.count} experiments`,Kst=e=>`${e==null?void 0:e.count} 个实验`,Qst=e=>`${e==null?void 0:e.count} آزمایش`,Yst=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Kst(e):t==="fa"?Qst(e):Vst(e)}),Xst=()=>"1 experiment",Zst=()=>"1 个实验",Jst=()=>"۱ آزمایش",eit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zst():t==="fa"?Jst():Xst()}),tit=()=>"Running",nit=()=>"运行中",rit=()=>"در حال اجرا",sit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nit():t==="fa"?rit():tit()}),iit=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",ait=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",oit=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",lit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ait():t==="fa"?oit():iit()}),cit=()=>"Ask the agent in chat to create and run your first experiment.",uit=()=>"在聊天中让智能体创建并运行你的第一个实验。",fit=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",dit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uit():t==="fa"?fit():cit()}),hit=()=>"Code",_it=()=>"代码",pit=()=>"کد",mit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_it():t==="fa"?pit():hit()}),git=()=>"Logs",vit=()=>"日志",bit=()=>"گزارش‌ها",eL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vit():t==="fa"?bit():git()}),yit=()=>"No experiments from the current task yet",xit=()=>"当前任务尚无实验",wit=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",Sit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xit():t==="fa"?wit():yit()}),kit=()=>"No experiments yet",Cit=()=>"尚无实验",Eit=()=>"هنوز آزمایشی وجود ندارد",Nit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cit():t==="fa"?Eit():kit()}),zit=()=>"no runs",Tit=()=>"无运行",jit=()=>"بدون اجرا",Ait=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tit():t==="fa"?jit():zit()}),Rit=()=>"Open logs",Mit=()=>"打开日志",Dit=()=>"باز کردن گزارش‌ها",Lit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mit():t==="fa"?Dit():Rit()}),Oit=()=>"other tasks",Iit=()=>"其他任务",Bit=()=>"وظایف دیگر",$it=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Iit():t==="fa"?Bit():Oit()}),Pit=()=>"Runs",Fit=()=>"运行",Hit=()=>"اجراها",qit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Fit():t==="fa"?Hit():Pit()}),Uit=()=>"Switch to Entire project to see all experiments",Git=()=>"切换到“整个项目”以查看所有实验",Wit=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Vit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Git():t==="fa"?Wit():Uit()}),Kit=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,Qit=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,Yit=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,Xit=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Qit(e):t==="fa"?Yit(e):Kit(e)}),Zit=()=>"Dismiss",Jit=()=>"关闭",eat=()=>"بستن",tat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Jit():t==="fa"?eat():Zit()}),nat=()=>"Restart now",rat=()=>"立即重新启动",sat=()=>"هم‌اکنون دوباره راه‌اندازی کن",tL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rat():t==="fa"?sat():nat()}),iat=e=>`Could not restart: ${e==null?void 0:e.error}`,aat=e=>`无法重新启动:${e==null?void 0:e.error}`,oat=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,nL=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?aat(e):t==="fa"?oat(e):iat(e)}),lat=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",cat=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",uat=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",fat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cat():t==="fa"?uat():lat()}),dat=()=>"Restarting…",hat=()=>"正在重新启动…",_at=()=>"در حال راه‌اندازی مجدد…",rL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hat():t==="fa"?_at():dat()}),pat=()=>"macOS app",mat=()=>"macOS 应用",gat=()=>"برنامهٔ macOS",vat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mat():t==="fa"?gat():pat()}),bat=()=>"Installed with cargo",yat=()=>"通过 cargo 安装",xat=()=>"نصب‌شده با cargo",wat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yat():t==="fa"?xat():bat()}),Sat=()=>"Installed with Homebrew",kat=()=>"通过 Homebrew 安装",Cat=()=>"نصب‌شده با Homebrew",Eat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kat():t==="fa"?Cat():Sat()}),Nat=()=>"Installed with the orx installer",zat=()=>"通过 orx 安装程序安装",Tat=()=>"نصب‌شده با نصب‌کنندهٔ orx",jat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zat():t==="fa"?Tat():Nat()}),Aat=()=>"Managed by Nix",Rat=()=>"由 Nix 管理",Mat=()=>"مدیریت‌شده با Nix",Dat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rat():t==="fa"?Mat():Aat()}),Lat=()=>"Unknown install",Oat=()=>"未知安装方式",Iat=()=>"روش نصب نامشخص",Bat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Oat():t==="fa"?Iat():Lat()}),$at=()=>"Re-run your cargo install to update.",Pat=()=>"重新运行 cargo 安装命令以更新。",Fat=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",Hat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pat():t==="fa"?Fat():$at()}),qat=()=>"Run brew upgrade to update.",Uat=()=>"运行 brew upgrade 以更新。",Gat=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",Wat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Uat():t==="fa"?Gat():qat()}),Vat=()=>"Update it through your Nix configuration.",Kat=()=>"通过 Nix 配置进行更新。",Qat=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Yat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kat():t==="fa"?Qat():Vat()}),Xat=e=>`Current worktree · ${e==null?void 0:e.branch}`,Zat=e=>`当前工作树 · ${e==null?void 0:e.branch}`,Jat=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,eot=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Zat(e):t==="fa"?Jat(e):Xat(e)}),tot=e=>`Default branch · ${e==null?void 0:e.branch}`,not=e=>`默认分支 · ${e==null?void 0:e.branch}`,rot=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,sot=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?not(e):t==="fa"?rot(e):tot(e)}),iot=e=>`detached at ${e==null?void 0:e.branch}`,aot=e=>`分离于 ${e==null?void 0:e.branch}`,oot=e=>`جدا در ${e==null?void 0:e.branch}`,lot=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?aot(e):t==="fa"?oot(e):iot(e)}),cot=()=>"Listing truncated.",uot=()=>"列表已截断。",fot=()=>"فهرست کوتاه شده است.",dot=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uot():t==="fa"?fot():cot()}),hot=()=>"Loading…",_ot=()=>"正在加载…",pot=()=>"در حال بارگیری…",mot=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_ot():t==="fa"?pot():hot()}),got=()=>"No changes yet.",vot=()=>"尚无更改。",bot=()=>"هنوز تغییری وجود ندارد.",yot=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vot():t==="fa"?bot():got()}),xot=()=>"No files.",wot=()=>"没有文件。",Sot=()=>"فایلی وجود ندارد.",kot=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wot():t==="fa"?Sot():xot()}),Cot=()=>"Refresh failed:",Eot=()=>"刷新失败:",Not=()=>"تازه‌سازی ناموفق بود:",zot=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Eot():t==="fa"?Not():Cot()}),ze=e=>`⁦${e}⁩`,Ro=e=>`⁨${e}⁩`,nn=e=>new Intl.NumberFormat(T()).format(e),g2="demo_nanochat_v1",Gc=e=>e.startsWith("demo_"),T0="chat_demo_nanochat_v1",K3="chat_demo_nanochat_figures_v1",Q3="chat_demo_nanochat_literature_v1",Tot={[T0]:"cpu_end_to_end",[K3]:"figures",[Q3]:"literature"},v1="cpu-apple-silicon-pipeline-results.md",jot="Run the Muon matrix LR 2× probe experiment. When it finishes, compare its step-100 and step-200 val_bpb against the baseline and tell me whether doubling the matrix learning rate helps early training.";class x4 extends Error{constructor(t,r,s){super(t);Os(this,"currentVersion");Os(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function Sa(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}const sL=new WeakMap;async function xi(e){if(!e.ok){const r=await e.text().catch(()=>"");let s=r;try{const i=JSON.parse(r);if(typeof i=="object"&&i!==null&&("error"in i&&typeof i.error=="string"&&(s=i.error),e.status===409&&"code"in i&&i.code==="fileChanged"&&"exists"in i&&typeof i.exists=="boolean")){const o="currentVersion"in i&&typeof i.currentVersion=="string"?i.currentVersion:null;throw new x4(s,o,i.exists)}}catch(i){if(i instanceof x4)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=sL.get(e);if(t&&!Mn(t))throw new DOMException("Workspace changed","AbortError");return n}const Tt=(e,n)=>fetch(e,{signal:n}).then(t=>xi(t));async function za(e,n){const t=Ca(),r=await fetch(e,n);if(!Mn(t))throw new DOMException("Workspace changed","AbortError");return sL.set(r,t),r.ok&&hV(e,t),r}const Nt=(e,n,t=!1)=>za(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>xi(r)),n_=(e,n)=>za(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>xi(t)),iL=(e,n)=>za(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>xi(t)),Aot=e=>Tt("/api/projects",e).then(n=>n.projects),Rot=e=>Tt("/api/projects/activity",e).then(n=>n.activity),Mot=e=>Tt("/api/settings/ui-state",e),Dot=(e,n)=>Tt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),Lot=(e,n,t=!1)=>Nt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),Oot=(e,n=!1)=>Nt("/api/settings/ui-state",{workspace:e},n),Iot=e=>Nt("/api/settings/ui-state",e),Bot=(e,n)=>Nt("/api/onboarding/complete",{...e,...n}),$ot=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return Tt(`/api/project-path/status${t}`,n)},Pot=()=>Nt("/api/project-path/pick").then(e=>e.path),Fot=e=>Nt("/api/projects",e),Hot=(e,n)=>Tt(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),qot=e=>Tt("/api/github/account",e),Uot=(e,n)=>Tt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),Got=(e,n,t)=>Tt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),Wot=(e,n)=>Tt(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),Vot=e=>Nt("/api/projects/starter-prompts/prewarm",e),Kot=(e,n,t,r,s)=>Tt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),Qot=e=>Nt(`/api/projects/${e}/open`).then(n=>n.project),Yot=e=>za(`/api/projects/${e}`,{method:"DELETE"}).then(async n=>{if(!n.ok){const t=await n.json().catch(()=>null);throw new Error((t==null?void 0:t.error)??`delete failed (${n.status})`)}fV(e)}),Xot=(e,n)=>Tt(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),Zot=(e,n)=>Tt(`/api/projects/${e}/runs`,n).then(t=>t.runs),aL=e=>Nt(`/api/runs/${e}/cancel`).then(()=>{}),Jot=(e,n)=>Tt(`/api/runs/${e}/log?offset=${n}`),elt=(e,n)=>Tt(`/api/runs/${e}/diff`,n),tlt=(e,n)=>Tt(`/api/experiments/${e}/diff`,n),bu=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),nlt=(e,n,t={},r)=>Tt(`/api/projects/${e}/file?${bu(t,new URLSearchParams({path:n}))}`,r),gN=(e,n,t={})=>`/api/projects/${e}/file/raw?${bu(t,new URLSearchParams({path:n}))}`,rlt=(e,n)=>Tt(`/api/files/abs?path=${encodeURIComponent(e)}`,n),slt=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,ilt=(e,n,t,r)=>iL(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),alt=(e,n,t,r={})=>n_(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),olt=(e,n,t={})=>Nt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),llt=e=>Tt("/api/latex/engine",e),clt=(e,n,t={})=>Nt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),ult=e=>Tt("/api/overleaf/settings",e),oL=e=>Nt("/api/overleaf/token",{token:e}),flt=()=>za("/api/overleaf/token",{method:"DELETE"}).then(e=>xi(e)),lL=(e,n={})=>Nt("/api/overleaf/session",{session:e,host:n.host}),dlt=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>xi(e)),hlt=(e={})=>Nt("/api/overleaf/session/import",{host:e.host}),_lt=(e,n,t={})=>Nt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),plt=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${bu(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>xi(r)),mlt=(e,n,t={},r)=>Tt(`/api/projects/${e}/file/overleaf?${bu(t,new URLSearchParams({path:n}))}`,r),glt=(e,n,t)=>Nt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),vlt=(e,n,t={})=>za(`/api/projects/${e}/file/overleaf?${bu(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>xi(r)),blt=(e,n,t={})=>Nt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),ylt=(e,n,t={},r)=>Tt(`/api/projects/${e}/file/overleaf/status?${bu(t,new URLSearchParams({path:n}))}`,r),xlt=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${bu(t,new URLSearchParams({path:n}))}`,wlt=(e,n={},t)=>{const r=bu(n).toString();return Tt(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},Slt=(e,n)=>Tt(`/api/chat/sessions/${e}/worktree`,n),Yv=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,klt=e=>Tt("/api/settings/hf",e),Clt=e=>Nt("/api/settings/hf",{token:e}),Elt=e=>Tt("/api/settings/tinker",e),Nlt=e=>Nt("/api/settings/tinker",{key:e}),zlt=e=>Tt("/api/update",e),Tlt=()=>Nt("/api/update/apply"),jlt=()=>Nt("/api/update/restart"),Alt=e=>Nt("/api/update/auto",{enabled:e}),Rlt=(e=!1)=>Nt("/api/update/install-cli",{force:e}),Mlt=e=>Tt("/api/settings/k8s",e),Dlt=e=>Nt("/api/settings/k8s",e),Llt=e=>Tt("/api/settings/modal",e),Olt=(e,n)=>Nt("/api/settings/modal",{tokenId:e,tokenSecret:n}),Ilt=e=>Tt("/api/settings/env",e).then(n=>n.vars),cL=(e,n)=>Nt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),Blt=e=>za(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>xi(n)).then(n=>n.vars),$lt=e=>Tt("/api/settings/data-dir",e),Plt=e=>Nt("/api/settings/data-dir/validate",{path:e}),Flt=e=>Nt("/api/settings/data-dir/move",{path:e}),Hlt=e=>Tt("/api/settings/ssh",e).then(n=>n.hosts),qlt=e=>Tt("/api/settings/ssh/config",e),Ult=(e,n)=>iL("/api/settings/ssh/config",{content:e,previousContent:n}),Glt=(e,n)=>Tt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),Wlt=e=>Tt("/_orx/runtime",e),Vlt=e=>Tt("/api/remote/sessions",e).then(n=>n.sessions),Klt=(e,n)=>Nt("/api/remote/sessions",{host:e,uiPreferences:n}),Qlt=e=>Nt("/_orx/install",e),Ylt=()=>Nt("/_orx/reconnect"),uL=()=>Nt("/_orx/disconnect"),Xlt=()=>Nt("/_orx/start-host"),fL=()=>Tt("/_orx/stop-host"),dL=e=>Nt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),Zlt=e=>Tt("/api/settings/slurm",e),Jlt=e=>Nt("/api/settings/slurm",e),ect=e=>Tt("/api/settings/ray",e),tct=e=>Nt("/api/settings/ray",e),nct=e=>Nt("/api/settings/ray/preflight",{address:e??null}),rct=(e,n)=>Tt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),sct=e=>Nt("/api/settings/compute/default",e),ict=e=>Tt("/api/settings/local",e),act=e=>Tt("/api/settings/openresearch",e),oct=(e,n)=>Tt(`/api/projects/${e}/files`,n),lct=(e,n)=>za(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>xi(t)),cct=(e,n,t)=>n_(`/api/projects/${e}/files`,{path:n,...t}),Oh=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,hL=512e3,uct=(e,n)=>{const t=new Uint8Array(e);if(t.includes(0))return{content:"",binary:!0,truncated:n};try{return{content:new TextDecoder("utf-8",{fatal:!0}).decode(t,{stream:n}),binary:!1,truncated:n}}catch{return{content:"",binary:!0,truncated:n}}},fct=(e,n,t)=>fetch(Oh(e,n),{signal:t,headers:{Range:`bytes=0-${hL-1}`}}).then(r=>{var i;if(r.status===404)return null;if(r.status===416&&r.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=Number((i=r.headers.get("content-range"))==null?void 0:i.split("/").pop());return r.arrayBuffer().then(o=>uct(o,Number.isFinite(s)&&s>o.byteLength))}),dct=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",hct=(e,n,t)=>fetch(Oh(e,n),{signal:t,method:"HEAD"}).then(r=>{if(r.status===404)return null;if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=r.headers.get("x-openresearch-presentation");return{size:Number(r.headers.get("content-length"))||0,presentation:dct(s)?s:"download"}}),_ct=e=>Tt("/api/settings/profile",e),pct=e=>Tt("/api/settings/lit-sources",e),mct=e=>Nt("/api/settings/lit-sources",e),gct=e=>Tt("/api/settings/projects",e),_L=(e,n)=>Nt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),vct=(e,n)=>Tt(`/api/projects/${e}/git`,n),bct=e=>Nt(`/api/projects/${e}/git/init`),yct=e=>Nt(`/api/projects/${e}/github`),xct=e=>Nt(`/api/projects/${e}/github/disable`),wct=e=>Tt("/api/settings/telemetry",e),Sct=e=>Nt("/api/settings/telemetry",{enabled:e}),of=e=>{Nt("/api/telemetry/event",e).catch(()=>{})},Y1=e=>e.displayName??vL(e.id),X1="default";function Xv(e,n){var o,a,l;const t=e==null?void 0:e.models.find(u=>u.id===n),r=(t==null?void 0:t.reasoningLevels)??((o=e==null?void 0:e.options)==null?void 0:o.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,i=s&&r.some(u=>u.id===s)?s:r.some(u=>u.id===X1)?X1:((a=e==null?void 0:e.options)==null?void 0:a.defaultReasoningLevel)??((l=r[0])==null?void 0:l.id)??null;return{choices:r,defaultId:i}}const w4="default";function pL(e,n){var r;if((e==null?void 0:e.id)!=="codex")return[];const t=(r=e.models.find(s=>s.id===n))==null?void 0:r.serviceTiers;return t!=null&&t.length?[{id:w4,label:dOe(),description:lOe()},...t]:[]}function Z1(e,n,t){var i;if(!e)return t??null;if(e.id!=="codex"||((i=e.models.find(o=>o.id===n))==null?void 0:i.serviceTiers)===void 0)return null;const s=pL(e,n);return s.length===0?w4:t!=null&&s.some(o=>o.id===t)?t:w4}function mL(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Xv(e,n);return r.length===0?X1:t&&r.some(i=>i.id===t)?t:s}const gL=(e=!1,n=!1,t)=>{const r=new URLSearchParams;e&&r.set("refresh","1"),n&&r.set("retry","1");const s=r.size>0?`?${r.toString()}`:"";return Tt(`/api/harnesses${s}`,t).then(i=>i.harnesses)},kct=e=>Tt("/api/skills",e).then(n=>n.skills),Cct=(e,n,t)=>Tt(`/api/skills/${encodeURIComponent(e)}${n?`?project=${encodeURIComponent(n)}`:""}`,t).then(r=>r.content),Ect=e=>Tt("/api/latex-templates",e).then(n=>n.templates),Nct=e=>Nt("/api/latex-templates",e).then(n=>n.template),zct=e=>za(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>xi(n)),Tct=e=>Tt("/api/user-skills",e).then(n=>n.skills),jct=e=>Nt("/api/user-skills",e).then(n=>n.skill),Act=e=>za(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>xi(n));function vL(e){const n=(e.split("/").pop()??e).replace(/^~/,"").replace(/^claude-/,""),t=[],r=[];for(const s of n.split("-"))/^\d+(\.\d+)?$/.test(s)?r.push(s):(r.length&&t.push(r.splice(0).join(".")),t.push(s==="gpt"?"GPT":s.charAt(0).toUpperCase()+s.slice(1)));return r.length&&t.push(r.join(".")),t.join(" ")}const Rct=(e,n)=>Tt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),Mct=(e,n,t={})=>Nt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),Dct=e=>za(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>xi(n).then(t=>(Kv(e),t))),Lct=(e,n)=>n_(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),Oct=(e,n)=>n_(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),Ict=(e,n)=>n_(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),Bct=(e,n)=>n_(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),$ct=(e,n)=>Tt(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),Pct=(e,n)=>za(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>xi(t)),Fct=(e,n)=>Nt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),Hct=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,vN=(e,n,t={},r,s,i,o)=>Nt(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:i,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:o}),qct=(e,n)=>Nt(`/api/chat/sessions/${e}/shell`,{command:n}),Uct=(e,n,t,r={})=>Nt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),Gct=(e,n,t)=>Nt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),Wct=(e,n)=>Nt(`/api/chat/sessions/${e}/branch`,{leafId:n}),Vct=e=>Nt(`/api/chat/sessions/${e}/interrupt`),Kct=(e,n)=>Nt(`/api/chat/sessions/${e}/respond`,n);function Lo(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(T(),{numeric:"always",style:"narrow"});if(n<60)return t.format(-n,"second");const r=Math.floor(n/60);if(r<60)return t.format(-r,"minute");const s=Math.floor(r/60);return s<24?t.format(-s,"hour"):t.format(-Math.floor(s/24),"day")}function J1(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return Sge({value:nn(n)});const t=Math.floor(n/60);if(t<60)return bge({value:nn(t)});const r=Math.floor(t/60);return r<24?pge({hours:nn(r),minutes:nn(t%60)}):fge({days:nn(Math.floor(r/24)),hours:nn(r%24)})}function Il(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&r({queryKey:Et("getHfSettings"),queryFn:({signal:e})=>klt(e),staleTime:3e5}),yN=()=>({queryKey:Et("getTinkerSettings"),queryFn:({signal:e})=>Elt(e),staleTime:3e5}),xN=()=>({queryKey:Et("getK8sSettings"),queryFn:({signal:e})=>Mlt(e),staleTime:3e4}),wN=()=>({queryKey:Et("getModalSettings"),queryFn:({signal:e})=>Llt(e),staleTime:3e5}),Yct=()=>({queryKey:Et("getSlurmSettings"),queryFn:({signal:e})=>Zlt(e),staleTime:3e5}),Xct=()=>({queryKey:Et("getRaySettings"),queryFn:({signal:e})=>ect(e),staleTime:3e5}),Zct=e=>({queryKey:Et("getComputeSettings",e??null),queryFn:({signal:n})=>rct(e,n),staleTime:3e4}),Jct=()=>({queryKey:Et("getLocalMachine"),queryFn:({signal:e})=>ict(e),staleTime:3e5}),eut=()=>({queryKey:Et("getOpenResearchSettings"),queryFn:({signal:e})=>act(e),staleTime:3e4}),tut=()=>({queryKey:Et("getEnvVars"),queryFn:({signal:e})=>Ilt(e),staleTime:3e5}),nut=()=>({queryKey:Et("getDataDir"),queryFn:({signal:e})=>$lt(e),staleTime:3e5}),bL=()=>({queryKey:Et("getSshHosts"),queryFn:({signal:e})=>Hlt(e),staleTime:3e5}),rut=()=>({queryKey:Et("getSshConfig"),queryFn:({signal:e})=>qlt(e),staleTime:3e5}),SN=e=>({queryKey:Et("getSshMasterStatus",e),queryFn:({signal:n})=>Glt(e,n),staleTime:5e3}),sut=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>Wlt(e),staleTime:2e3}),iut=()=>({queryKey:Et("listRemoteSessions"),queryFn:({signal:e})=>Vlt(e),staleTime:3e4}),ev=()=>({queryKey:Et("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>e_(n,t,()=>zlt(e)),staleTime:3e4}),aut=()=>({queryKey:Et("getProfile"),queryFn:({signal:e})=>_ct(e),staleTime:3e5}),out=()=>({queryKey:Et("getLitSources"),queryFn:({signal:e})=>pct(e),staleTime:3e5}),X3=()=>({queryKey:Et("getProjectDefaults"),queryFn:({signal:e})=>gct(e),staleTime:3e5}),lut=e=>({queryKey:Et("getProjectGitStatus",e),queryFn:({signal:n})=>vct(e,n),staleTime:3e4}),cut=()=>({queryKey:Et("getTelemetry"),queryFn:({signal:e})=>wct(e),staleTime:3e5}),Wp=()=>({queryKey:Et("getHarnesses"),queryFn:({signal:e})=>gL(!1,!1,e),staleTime:3e5}),uut=()=>({queryKey:Et("getSkills"),queryFn:({signal:e})=>kct(e),staleTime:3e5}),fut=(e,n)=>({queryKey:Et("getSkillContent",e,n??null),queryFn:({signal:t})=>Cct(e,n,t),staleTime:3e5}),dut=()=>({queryKey:Et("listLatexTemplates"),queryFn:({signal:e})=>Ect(e),staleTime:3e5}),hut=()=>({queryKey:Et("listUserSkills"),queryFn:({signal:e})=>Tct(e),staleTime:3e5});async function Z3(e=!1,n=!1){const t=Wp();if(!e&&!n)return Je.fetchQuery(t);await Je.cancelQueries(t);const r=await gL(e,n);return Mn(t.queryKey)&&Je.setQueryData(t.queryKey,r),r}const ka=e=>({queryKey:Et("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>e_(t,r,async()=>{const s=await Rct(e,n),i=t.getQueryData(r);return s.filter(o=>!cu.has(o.id)).map(o=>{var a;return{...o,contextUsage:o.contextUsage??((a=i==null?void 0:i.find(l=>l.id===o.id))==null?void 0:a.contextUsage)}})},Fp),staleTime:3e4}),Hl=e=>({queryKey:Et("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var _;const s=t.getQueryData(r),i=await e_(t,r,()=>$ct(e,n),(f,p,m)=>{if(!p)return f;const x=new Set([...m].filter(S=>S.startsWith("message:")).map(S=>S.slice(8)));return{messages:Fp(f.messages,p.messages,x,!1),queued:m.has("queued")?p.queued:f.queued,activeLeafId:m.has("branch")||x.size?p.activeLeafId:f.activeLeafId}});n.throwIfAborted();const o=t.getQueryData(r),l=s!==void 0&&i.messages.some(f=>f.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===f.id)))?[]:(o==null?void 0:o.messages.filter(f=>f.id.startsWith("local-")))??[],u=l.some(f=>f.id===(o==null?void 0:o.activeLeafId));return{...i,messages:[...i.messages,...l.filter(f=>!i.messages.some(p=>p.id===f.id))],activeLeafId:o&&(u||!((_=o.activeLeafId)!=null&&_.startsWith("local-"))&&o.activeLeafId!==(s==null?void 0:s.activeLeafId))?o.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),zf="local-",yL="bash";function kN(e,n){const t=e.findIndex(r=>r.id===n.id);if(t>=0){const r=e.slice();return r[t]=n,r}return n.role!=="user"?[...e,n]:[...e.filter(r=>!r.id.startsWith(zf)),n]}function _ut(e,n){switch(n.type){case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(a=>a.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,i=n.message.role==="user"&&s!==null&&s.startsWith(zf),o=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:kN(t,n.message)},activeLeafBySession:r&&!i&&!o?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${zf}senderr-${Date.now()}`,role:"assistant",parts:[{id:"p0",type:"tool",tool:"error",state:{status:"error",error:n.text}}],createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,r]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:r.id}}}case"localShell":{const t=e.messagesBySession[n.sessionId]??[],r=t.find(i=>i.id===n.id),s={id:n.id,role:"user",parts:[{id:"p0",type:"tool",tool:yL,state:{status:n.error===void 0?"running":"error",input:{command:n.command},error:n.error}}],createdAt:(r==null?void 0:r.createdAt)??Date.now(),parentId:r?r.parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:r?kN(t,s):[...t,s]},activeLeafBySession:r?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"activeLeaf":return{...e,activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.leafId}};case"optimisticUser":{const t=e.messagesBySession[n.sessionId]??[],r=n.text?[{id:"p0",type:"text",text:n.text}]:[];n.attachments.forEach((i,o)=>r.push({id:`img${o}`,type:"image",text:i.url,name:i.name})),n.annotations.forEach((i,o)=>r.push({id:`annotation${o}`,type:"annotation",text:i.text}));const s={id:`${zf}${Date.now()}`,role:"user",parts:r,createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,s]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}}}}let xL=0;function wL(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}Je.getQueryCache().subscribe(e=>{wL(e)&&xL++});const put=e=>Je.getQueryCache().subscribe(n=>{wL(n)&&e()}),mut=()=>xL;function gut(e,n){const t=Je.getQueryData(ka(e).queryKey)??[],r=new Set(t.filter(o=>o.busy).map(o=>o.id)),s={messagesBySession:{},queuedBySession:{},activeLeafBySession:{},busySessions:r},i=new Set(r);n&&i.add(n);for(const o of i){const a=Je.getQueryData(Hl(o).queryKey);a&&(s.messagesBySession[o]=a.messages,s.queuedBySession[o]=a.queued,s.activeLeafBySession[o]=a.activeLeafId)}return s}function SL(e,n,t=!1){if(n.type==="busy"){Ga(Je,ka(e).queryKey,n.sessionId),Je.setQueryData(ka(e).queryKey,l=>l==null?void 0:l.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=Hl(n.sessionId);if(cu.has(n.sessionId))return;Ga(Je,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=Je.getQueryData(r.queryKey);if(t&&!s)return;const i={messagesBySession:s?{[n.sessionId]:s.messages}:{},queuedBySession:s?{[n.sessionId]:s.queued}:{},activeLeafBySession:s?{[n.sessionId]:s.activeLeafId}:{},busySessions:new Set},o=_ut(i,n),a={messages:o.messagesBySession[n.sessionId]??[],queued:o.queuedBySession[n.sessionId]??[],activeLeafId:o.activeLeafBySession[n.sessionId]??null};Je.setQueryData(r.queryKey,a)}function vut(e,n){const t=!!n&&!cu.has(n??""),r=ht({...Hl(n??""),enabled:t,subscribed:t}),s=M.useSyncExternalStore(put,mut),i=M.useMemo(()=>gut(e,n),[e,n,s]),o=Ca()[1],a=M.useCallback(l=>{Mn(["workspace",o])&&SL(e,l)},[e,o]);return[i,a,r]}const b1=new Map;function but(e,n){let t=b1.get(e);return t||(t=new Set,b1.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&b1.delete(e)}}function yut(e){var n;(n=b1.get(e.runId))==null||n.forEach(t=>t(e))}const S4=new Set;function tv(e){return S4.add(e),()=>{S4.delete(e)}}function xl(e){S4.forEach(n=>n(e))}const k4=new Set;function xut(e){return k4.add(e),()=>{k4.delete(e)}}function wl(){k4.forEach(e=>e())}const C4=new Set;function wut(e){return C4.add(e),()=>{C4.delete(e)}}function CN(e){C4.forEach(n=>n(e))}const E4=new Set;function kL(e){return E4.add(e),()=>{E4.delete(e)}}function v2(e){E4.forEach(n=>n(e))}const N4=new Set;function Sut(e){return N4.add(e),()=>{N4.delete(e)}}function EN(e){N4.forEach(n=>n(e))}const z4=new Set;function kut(e){return z4.add(e),()=>{z4.delete(e)}}function Cut(e){z4.forEach(n=>n(e))}let T4=!0;const j4=new Set;function Eut(e){return j4.add(e),()=>{j4.delete(e)}}function NN(){return T4}function zN(e){e!==T4&&(T4=e,j4.forEach(n=>n()))}const Nut=8e3,zut=3e3;function Tut(e){const n=M.useRef(e);n.current=e,M.useEffect(()=>{let t=null,r=!1,s,i,o=!1;const a=()=>{t==null||t.close();const l=new EventSource("/api/events");t=l,l.onerror=()=>{r||(o=!0,s??(s=window.setTimeout(()=>zN(!1),Nut)),l.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,a()},zut)))},l.onopen=()=>{var _,f;r||(window.clearTimeout(s),s=void 0,zN(!0),o&&(xl({type:"reconnected"}),wl(),CN({harness:"*",authState:"unknown"}),(f=(_=n.current).onReconnect)==null||f.call(_)),o=!0)};const u=_=>{try{return JSON.parse(_.data)}catch{return null}};l.addEventListener("resync.required",()=>{var _,f;xl({type:"reconnected"}),wl(),(f=(_=n.current).onReconnect)==null||f.call(_)}),l.addEventListener("run.updated",_=>{const f=u(_);f!=null&&f.run&&(wl(),n.current.onRun(f.run))}),l.addEventListener("experiment.updated",_=>{var p,m;const f=u(_);f!=null&&f.experiment&&(wl(),(m=(p=n.current).onExperiment)==null||m.call(p,f.experiment))}),l.addEventListener("project.updated",_=>{var p,m;const f=u(_);f!=null&&f.project&&(wl(),(m=(p=n.current).onProject)==null||m.call(p,f.project))}),l.addEventListener("files.updated",_=>{var p,m;const f=u(_);f!=null&&f.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,f.projectId))}),l.addEventListener("run.log",_=>{const f=u(_);f!=null&&f.runId&&yut(f)}),l.addEventListener("chat.session",_=>{const f=u(_);f!=null&&f.session&&(wl(),xl({type:"session",session:f.session}))}),l.addEventListener("chat.session.deleted",_=>{const f=u(_);f!=null&&f.sessionId&&(wl(),xl({type:"sessionDeleted",sessionId:f.sessionId}))}),l.addEventListener("chat.message",_=>{const f=u(_);f!=null&&f.message&&(wl(),xl({type:"message",sessionId:f.sessionId,message:f.message}))}),l.addEventListener("chat.busy",_=>{const f=u(_);f!=null&&f.sessionId&&(wl(),xl({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),l.addEventListener("chat.usage",_=>{const f=u(_);f!=null&&f.sessionId&&f.usage&&xl({type:"usage",sessionId:f.sessionId,usage:f.usage})}),l.addEventListener("chat.queued",_=>{const f=u(_);f!=null&&f.sessionId&&xl({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),l.addEventListener("chat.branch",_=>{const f=u(_);f!=null&&f.sessionId&&xl({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),l.addEventListener("harness.auth",_=>{const f=u(_);f!=null&&f.harness&&f.authState&&CN(f)}),l.addEventListener("datadir.move.progress",_=>{const f=u(_);f&&v2({type:"progress",...f})}),l.addEventListener("datadir.move.done",_=>{const f=u(_);f&&v2({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),l.addEventListener("datadir.move.error",_=>{const f=u(_);f&&v2({type:"error",error:f.error})}),l.addEventListener("update.status",_=>{const f=u(_);f&&Cut(f)}),l.addEventListener("overleaf.live",_=>{const f=u(_);f!=null&&f.key&&f.status&&EN({type:"live",key:f.key,status:f.status})}),l.addEventListener("overleaf.pulled",_=>{const f=u(_);f!=null&&f.key&&Array.isArray(f.paths)&&EN({type:"pulled",key:f.key,paths:f.paths})})};return a(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const nv=new Set;function jut(e){const n=M.useRef(e);n.current=e,M.useEffect(()=>{const t={onRun:r=>n.current.onRun(r),onReconnect:()=>{var r,s;return(s=(r=n.current).onReconnect)==null?void 0:s.call(r)}};return nv.add(t),()=>{nv.delete(t)}},[])}const TN={onRun:e=>nv.forEach(n=>n.onRun(e)),onReconnect:()=>nv.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},K0=()=>({queryKey:Et("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>e_(n,t,()=>Aot(e),Fp),staleTime:3e4}),Aut=()=>({queryKey:Et("listProjectActivity"),queryFn:({signal:e})=>Rot(e),staleTime:3e4}),Vp=()=>({queryKey:Et("getUiState"),queryFn:({signal:e})=>Mot(e),staleTime:3e5}),J3=e=>({queryKey:Et("getProjectUiState",e),queryFn:({signal:n})=>Dot(e,n),staleTime:3e5}),j0=(e="")=>({queryKey:Et("getProjectPathStatus",e),queryFn:({signal:n})=>$ot(e,n),staleTime:3e4}),CL=e=>({queryKey:Et("searchPapers",e),queryFn:({signal:n})=>Hot(e,n),staleTime:3e5}),Rut=()=>({queryKey:Et("githubAccount"),queryFn:({signal:e})=>qot(e),staleTime:3e5}),Mut=e=>({queryKey:Et("githubProjectRepoPreview",e),queryFn:({signal:n})=>Uot(e,n),staleTime:3e4}),jN=(e,n)=>({queryKey:Et("repoAccess",e,n),queryFn:({signal:t})=>Got(e,n,t),staleTime:3e4}),A4=e=>({queryKey:Et("resolvePaper",e),queryFn:({signal:n})=>Wot(e,n),staleTime:36e5}),Dut=(e,n,t,r)=>({queryKey:Et("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>Kot(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),R4=e=>({queryKey:Et("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>e_(t,r,()=>Xot(e,n),Fp),staleTime:3e4}),ru=e=>({queryKey:Et("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>e_(t,r,()=>Zot(e,n),Fp),staleTime:3e4});function Eg(e,n){if(!e)return;const t=e.find(r=>r.id===n.id);return t&&t.updatedAt>n.updatedAt?e:t?e.map(r=>r.id===n.id?n:r):[...e,n]}function AN(){const e=Ca();return Tut({onRun(n){var r;if(!Mn(e))return;const t=(r=Je.getQueryData(ru(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);Ga(Je,ru(n.projectId).queryKey,n.id),Je.setQueryData(ru(n.projectId).queryKey,s=>Eg(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(va(["getRunDiff"],e,s=>s.queryKey[3]===n.id),va(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),TN.onRun(n)},onExperiment(n){Mn(e)&&(Ga(Je,R4(n.projectId).queryKey,n.id),Je.setQueryData(R4(n.projectId).queryKey,t=>Eg(t,n)),va(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),va(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),va(["getRunDiff"],e,t=>{var r;return((r=Je.getQueryData(ru(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){Mn(e)&&(Ga(Je,K0().queryKey,n.id),Je.setQueryData(K0().queryKey,t=>Eg(t,n)))},onArtifacts(n){Mn(e)&&(va(L3,e,t=>t.queryKey[3]===n),va(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){Mn(e)&&(va(cV,e),TN.onReconnect())}}),M.useEffect(()=>{let n;const t=xut(()=>{n??(n=setTimeout(()=>{n=void 0,va(["listProjectActivity"],e)},100))}),r=kL(a=>{a.type==="done"&&va(["getDataDir"],e)}),s=tv(a=>{Mn(e)&&(a.type==="session"?Ga(Je,ka(a.session.projectId).queryKey,a.session.id):(a.type==="busy"||a.type==="usage")&&Ga(Je,[...e,"listChatSessions"],a.sessionId),(a.type==="message"||a.type==="queued"||a.type==="branch")&&SL("",a.type==="message"?{type:"upsertMessage",sessionId:a.sessionId,message:a.message}:a.type==="queued"?{type:"setQueued",sessionId:a.sessionId,items:a.items}:{type:"activeLeaf",sessionId:a.sessionId,leafId:a.activeLeafId},!0),a.type==="session"&&!cu.has(a.session.id)?Je.setQueryData(ka(a.session.projectId).queryKey,l=>{if(!l)return;const u=l.find(_=>_.id===a.session.id);return u?Eg(l,{...a.session,contextUsage:a.session.contextUsage??u.contextUsage}):[a.session,...l]}):a.type==="sessionDeleted"?Kv(a.sessionId):(a.type==="busy"||a.type==="usage")&&Je.setQueriesData({queryKey:[...e,"listChatSessions"]},l=>l==null?void 0:l.map(u=>u.id!==a.sessionId?u:a.type==="busy"?{...u,busy:a.busy}:{...u,contextUsage:a.usage})))}),i=wut(()=>{Mn(e)&&Z3(!0).catch(()=>{})}),o=kut(a=>{Mn(e)&&(Ga(Je,ev().queryKey),Je.setQueryData(ev().queryKey,a))});return()=>{clearTimeout(n),t(),r(),s(),i(),o()}},[e[1]]),null}const M4=new Set;function EL(e){if(e!==T()){UM(e,{reload:!1}),document.documentElement.lang=e;for(const n of M4)n()}}function Lut(e){return M4.add(e),()=>M4.delete(e)}function Kf(){return M.useSyncExternalStore(Lut,T,T)}const NL="orx:theme";function Out(){try{const e=localStorage.getItem(NL);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Ih=Out();const D4=new Set;function Iut(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function e6(){document.documentElement.dataset.theme=Iut(Ih)}function zL(e){Ih=e;try{localStorage.setItem(NL,e)}catch{}e6();for(const n of D4)n()}function But(){return Ih}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Ih==="system"&&e6()});e6();function $ut(e){return D4.add(e),()=>D4.delete(e)}function TL(){return[M.useSyncExternalStore($ut,()=>Ih,()=>Ih),zL]}const Put=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),jL=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),rv="-",RN=[],Hut="arbitrary..",qut=e=>{const n=Gut(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Uut(o);const a=o.split(rv),l=a[0]===""&&a.length>1?1:0;return AL(a,l,n)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=r[o],u=t[o];return l?u?Put(u,l):l:u||RN}return t[o]||RN}}},AL=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=AL(e,n+1,i);if(u)return u}const o=t.validators;if(o===null)return;const a=n===0?e.join(rv):e.slice(n).join(rv),l=o.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?Hut+r:void 0})(),Gut=e=>{const{theme:n,classGroups:t}=e;return Wut(t,n)},Wut=(e,n)=>{const t=jL();for(const r in e){const s=e[r];t6(s,t,r,n)}return t},t6=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){Kut(e,n,t);return}if(typeof e=="function"){Qut(e,n,t,r);return}Yut(e,n,t,r)},Kut=(e,n,t)=>{const r=e===""?n:RL(n,e);r.classGroupId=t},Qut=(e,n,t,r)=>{if(Xut(e)){t6(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(Fut(t,e))},Yut=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let o=0;o{let t=e;const r=n.split(rv),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,Zut=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(i,o)=>{t[i]=o,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(i){let o=t[i];if(o!==void 0)return o;if((o=r[i])!==void 0)return s(i,o),o},set(i,o){i in t?t[i]=o:s(i,o)}}},L4="!",MN=":",Jut=[],DN=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),eft=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let o=0,a=0,l=0,u;const _=s.length;for(let S=0;S<_;S++){const b=s[S];if(o===0&&a===0){if(b===MN){i.push(s.slice(l,S)),l=S+1;continue}if(b==="/"){u=S;continue}}b==="["?o++:b==="]"?o--:b==="("?a++:b===")"&&a--}const f=i.length===0?s:s.slice(l);let p=f,m=!1;f.endsWith(L4)?(p=f.slice(0,-1),m=!0):f.startsWith(L4)&&(p=f.slice(1),m=!0);const x=u&&u>l?u-l:void 0;return DN(i,m,p,x)};if(n){const s=n+MN,i=r;r=o=>o.startsWith(s)?i(o.slice(s.length)):DN(Jut,!1,o,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},tft=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let i=0;i0&&(s.sort(),r.push(...s),s=[]),r.push(o)):s.push(o)}return s.length>0&&(s.sort(),r.push(...s)),r}},nft=e=>({cache:Zut(e.cacheSize),parseClassName:eft(e),sortModifiers:tft(e),postfixLookupClassGroupIds:rft(e),...qut(e)}),rft=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i,postfixLookupClassGroupIds:o}=n,a=[],l=e.trim().split(sft);let u="";for(let _=l.length-1;_>=0;_-=1){const f=l[_],{isExternal:p,modifiers:m,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:b}=t(f);if(p){u=f+(u.length>0?" "+u:u);continue}let v=!!b,y;if(v){const j=S.substring(0,b);y=r(j);const z=y&&o[y]?r(S):void 0;z&&z!==y&&(y=z,v=!1)}else y=r(S);if(!y){if(!v){u=f+(u.length>0?" "+u:u);continue}if(y=r(S),!y){u=f+(u.length>0?" "+u:u);continue}v=!1}const w=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=x?w+L4:w,N=C+y;if(a.indexOf(N)>-1)continue;a.push(N);const E=s(y,v);for(let j=0;j0?" "+u:u)}return u},aft=(...e)=>{let n=0,t,r,s="";for(;n{if(typeof e=="string")return e;let n,t="";for(let r=0;r{let t,r,s,i;const o=l=>{const u=n.reduce((_,f)=>f(_),e());return t=nft(u),r=t.cache.get,s=t.cache.set,i=a,a(l)},a=l=>{const u=r(l);if(u)return u;const _=ift(l,t);return s(l,_),_};return i=o,(...l)=>i(aft(...l))},oft=[],us=e=>{const n=t=>t[e]||oft;return n.isThemeGetter=!0,n},DL=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,LL=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lft=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,cft=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uft=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fft=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dft=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hft=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oc=e=>lft.test(e),un=e=>!!e&&!Number.isNaN(Number(e)),go=e=>!!e&&Number.isInteger(Number(e)),b2=e=>e.endsWith("%")&&un(e.slice(0,-1)),Sl=e=>cft.test(e),OL=()=>!0,_ft=e=>uft.test(e)&&!fft.test(e),n6=()=>!1,pft=e=>dft.test(e),mft=e=>hft.test(e),gft=e=>!ct(e)&&!dt(e),vft=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),bft=e=>yu(e,$L,n6),ct=e=>DL.test(e),Yu=e=>yu(e,PL,_ft),ON=e=>yu(e,Nft,un),yft=e=>yu(e,HL,OL),xft=e=>yu(e,FL,n6),IN=e=>yu(e,IL,n6),wft=e=>yu(e,BL,mft),Ng=e=>yu(e,qL,pft),dt=e=>LL.test(e),r0=e=>Qf(e,PL),Sft=e=>Qf(e,FL),BN=e=>Qf(e,IL),kft=e=>Qf(e,$L),Cft=e=>Qf(e,BL),zg=e=>Qf(e,qL,!0),Eft=e=>Qf(e,HL,!0),yu=(e,n,t)=>{const r=DL.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Qf=(e,n,t=!1)=>{const r=LL.exec(e);return r?r[1]?n(r[1]):t:!1},IL=e=>e==="position"||e==="percentage",BL=e=>e==="image"||e==="url",$L=e=>e==="length"||e==="size"||e==="bg-size",PL=e=>e==="length",Nft=e=>e==="number",FL=e=>e==="family-name",HL=e=>e==="number"||e==="weight",qL=e=>e==="shadow",$N=()=>{const e=us("color"),n=us("font"),t=us("text"),r=us("font-weight"),s=us("tracking"),i=us("leading"),o=us("breakpoint"),a=us("container"),l=us("spacing"),u=us("radius"),_=us("shadow"),f=us("inset-shadow"),p=us("text-shadow"),m=us("drop-shadow"),x=us("blur"),S=us("perspective"),b=us("aspect"),v=us("ease"),y=us("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...C(),dt,ct],E=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],z=()=>[dt,ct,l],R=()=>[Oc,"full","auto",...z()],O=()=>[go,"none","subgrid",dt,ct],I=()=>["auto",{span:["full",go,dt,ct]},go,dt,ct],F=()=>[go,"auto",dt,ct],U=()=>["auto","min","max","fr",dt,ct],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...z()],Z=()=>[Oc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],te=()=>[Oc,"screen","full","dvw","lvw","svw","min","max","fit",...z()],P=()=>[Oc,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],L=()=>[e,dt,ct],$=()=>[...C(),BN,IN,{position:[dt,ct]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",kft,bft,{size:[dt,ct]}],ne=()=>[b2,r0,Yu],oe=()=>["","none","full",u,dt,ct],le=()=>["",un,r0,Yu],se=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[un,b2,BN,IN],ee=()=>["","none",x,dt,ct],ue=()=>["none",un,dt,ct],de=()=>["none",un,dt,ct],ye=()=>[un,dt,ct],Ae=()=>[Oc,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Sl],breakpoint:[Sl],color:[OL],container:[Sl],"drop-shadow":[Sl],ease:["in","out","in-out"],font:[gft],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Sl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Sl],shadow:[Sl],spacing:["px",un],text:[Sl],"text-shadow":[Sl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Oc,ct,dt,b]}],container:["container"],"container-type":[{"@container":["","normal","size",dt,ct]}],"container-named":[vft],columns:[{columns:[un,ct,dt,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[go,"auto",dt,ct]}],basis:[{basis:[Oc,"full","auto",a,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[un,Oc,"auto","initial","none",ct]}],grow:[{grow:["",un,dt,ct]}],shrink:[{shrink:["",un,dt,ct]}],order:[{order:[go,"first","last","none",dt,ct]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[a,"screen",...Z()]}],"min-w":[{"min-w":[a,"screen","none",...Z()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",t,r0,Yu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Eft,yft]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",b2,ct]}],"font-family":[{font:[Sft,xft,n]}],"font-features":[{"font-features":[ct]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,dt,ct]}],"line-clamp":[{"line-clamp":[un,"none",dt,ON]}],leading:[{leading:[i,...z()]}],"list-image":[{"list-image":["none",dt,ct]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",dt,ct]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[un,"from-font","auto",dt,Yu]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[un,"auto",dt,ct]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"tab-size":[{tab:[go,dt,ct]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",dt,ct]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",dt,ct]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},go,dt,ct],radial:["",dt,ct],conic:[go,dt,ct]},Cft,wft]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-bs":[{"border-bs":le()}],"border-w-be":[{"border-be":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":le()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[un,dt,ct]}],"outline-w":[{outline:["",un,r0,Yu]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",_,zg,Ng]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,zg,Ng]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[un,Yu]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,zg,Ng]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[un,dt,ct]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[un]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[dt,ct]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[un]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",dt,ct]}],filter:[{filter:["","none",dt,ct]}],blur:[{blur:ee()}],brightness:[{brightness:[un,dt,ct]}],contrast:[{contrast:[un,dt,ct]}],"drop-shadow":[{"drop-shadow":["","none",m,zg,Ng]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",un,dt,ct]}],"hue-rotate":[{"hue-rotate":[un,dt,ct]}],invert:[{invert:["",un,dt,ct]}],saturate:[{saturate:[un,dt,ct]}],sepia:[{sepia:["",un,dt,ct]}],"backdrop-filter":[{"backdrop-filter":["","none",dt,ct]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[un,dt,ct]}],"backdrop-contrast":[{"backdrop-contrast":[un,dt,ct]}],"backdrop-grayscale":[{"backdrop-grayscale":["",un,dt,ct]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[un,dt,ct]}],"backdrop-invert":[{"backdrop-invert":["",un,dt,ct]}],"backdrop-opacity":[{"backdrop-opacity":[un,dt,ct]}],"backdrop-saturate":[{"backdrop-saturate":[un,dt,ct]}],"backdrop-sepia":[{"backdrop-sepia":["",un,dt,ct]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",dt,ct]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[un,"initial",dt,ct]}],ease:[{ease:["linear","initial",v,dt,ct]}],delay:[{delay:[un,dt,ct]}],animate:[{animate:["none",y,dt,ct]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,dt,ct]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[dt,ct,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ae()}],"translate-x":[{"translate-x":Ae()}],"translate-y":[{"translate-y":Ae()}],"translate-z":[{"translate-z":Ae()}],"translate-none":["translate-none"],zoom:[{zoom:[go,dt,ct]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",dt,ct]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",dt,ct]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[un,r0,Yu,ON]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},zft=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(Wd(e,"cacheSize",n),Wd(e,"prefix",t),Wd(e,"experimentalParseClassName",r),Tg(e.theme,i.theme),Tg(e.classGroups,i.classGroups),Tg(e.conflictingClassGroups,i.conflictingClassGroups),Tg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Wd(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),Wd(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),jg(e.theme,s.theme),jg(e.classGroups,s.classGroups),jg(e.conflictingClassGroups,s.conflictingClassGroups),jg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),O4(e,s,"postfixLookupClassGroups"),O4(e,s,"orderSensitiveModifiers"),e),Wd=(e,n,t)=>{t!==void 0&&(e[n]=t)},Tg=(e,n)=>{if(n)for(const t in n)Wd(e,t,n[t])},jg=(e,n)=>{if(n)for(const t in n)O4(e,n,t)},O4=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},Tft=(e,...n)=>typeof e=="function"?LN($N,e,...n):LN(()=>zft($N(),e),...n),jft=Tft({extend:{theme:{text:["menu"]}}});function Ts(...e){return jft(...e)}const Aft={default:"border-transparent bg-surface text-subtext",success:"border-accent-green bg-accent-green-subtle text-accent-green",error:"border-accent-red bg-accent-red-subtle text-accent-red",warning:"border-accent-amber bg-accent-amber-subtle text-accent-amber"};function Pt({variant:e="default",className:n,...t}){return h.jsx("span",{className:Ts("badge inline-flex items-center rounded-full border px-2 py-px font-sans text-sm font-medium",Aft[e],n),...t})}const Rft=["btn inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap border font-medium","transition-[background,border-color,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),Mft={default:"border-border bg-background text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight",primary:"border-primary bg-primary text-background [&:hover:not(:disabled)]:border-primary-hover [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:border-primary-active [&:active:not(:disabled)]:bg-primary-active",ghost:"border-transparent bg-transparent text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-muted",danger:"border-border bg-background text-accent-red [&:hover:not(:disabled)]:bg-danger-hover [&:active:not(:disabled)]:bg-danger-active",warning:"border-accent-amber bg-background text-accent-amber [&:hover:not(:disabled)]:bg-accent-amber-subtle [&:active:not(:disabled)]:bg-highlight"},Dft={default:"h-8 rounded-md px-3.5 text-sm",small:"h-7 rounded-sm px-2.5 text-sm",large:"h-14 rounded-lg px-7 text-xl"};function UL(e,n,t,r){return Ts(Rft,Mft[e],Dft[n],t&&"active",r)}function Oe({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("button",{className:UL(n,t,e,r),...s})}function Q0({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("a",{className:UL(n,t,e,r),...s})}const Lft=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45","[.chat-header.rail-hidden_>_&:first-child]:me-3"].join(" "),Oft={default:"text-subtext [&:hover:not(:disabled)]:bg-surface [&:hover:not(:disabled)]:text-text [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-primary",primary:"bg-primary text-background [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:bg-primary-active",stop:"bg-surface text-text [&:hover:not(:disabled)]:bg-stop-hover [&:active:not(:disabled)]:bg-highlight"},Ift={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function GL(e,n,t,r){return Ts(Lft,Oft[e],Ift[n],t&&"active",r)}const tn=M.forwardRef(function({active:n=!1,size:t="default",variant:r="default",className:s,...i},o){return h.jsx("button",{ref:o,className:GL(r,t,n,s),...i})});function Zv({active:e=!1,size:n="default",variant:t="default",className:r,...s}){return h.jsx("a",{className:GL(t,n,e,r),...s})}const Bft={default:"h-8 rounded-md border border-border bg-background px-2.5 py-1.5 focus:border-text",inline:"h-8 rounded-none border-x-0 border-t-0 border-b border-transparent bg-transparent px-0 py-0 focus:border-text"};function zs({variant:e="default",className:n,...t}){return h.jsx("input",{className:Ts("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",Bft[e],n),...t})}function Ur({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return h.jsx("button",{className:Ts("model-item flex w-full items-center justify-between gap-2 rounded-sm px-2 text-start transition-[background,color] duration-120 ease-standard hover:bg-surface focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-45 [&_.model-id]:block [&_.model-id]:text-xs [&_.model-id]:text-muted",t==="compact"?"min-h-6 py-0.5 text-menu":"min-h-8 py-1.5 text-sm",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",r),...s})}function Ot({className:e,...n}){return h.jsx("span",{className:Ts("spinner h-[13px] w-[13px] shrink-0 animate-[spin_0.8s_linear_infinite] rounded-full border-2 border-border border-t-primary",e),...n})}function rs({className:e,...n}){return h.jsx("div",{className:Ts("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const $ft={success:"text-accent-green",danger:"text-accent-red",info:"text-accent-teal",warning:"text-accent-amber",caution:"text-accent-orange",accent:"text-accent-purple",neutral:"text-muted"};function r6({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return h.jsxs("span",{className:Ts("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[h.jsx("span",{className:Ts("h-[7px] w-[7px] shrink-0 rounded-full bg-current",$ft[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const Pft=["relative h-5.5 w-9.5 flex-none rounded-full border border-border bg-surface","transition-[background,border-color] duration-120 ease-standard","[&_span]:absolute [&_span]:start-[3px] [&_span]:top-[3px] [&_span]:h-3.5 [&_span]:w-3.5","[&_span]:rounded-full [&_span]:bg-muted [&_span]:transition-[translate,background] [&_span]:duration-120 [&_span]:ease-standard","hover:border-border-strong","disabled:cursor-default disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2"].join(" ");function WL(e,n){return Ts(Pft,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function s6({checked:e=!1,className:n,children:t,...r}){return h.jsx("button",{role:"switch","aria-checked":e,className:WL(e,n),...r,children:t??h.jsx("span",{})})}function Fft({checked:e=!1,className:n,...t}){return h.jsx("span",{className:WL(e,n),...t,children:h.jsx("span",{})})}var Fo=oM();const Hft=$p(Fo);function qft(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",n.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const Uft=e=>{switch(e){case"success":return Vft;case"info":return Qft;case"warning":return Kft;case"error":return Yft;default:return null}},Gft=Array(12).fill(0),Wft=({visible:e,className:n})=>Xe.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Xe.createElement("div",{className:"sonner-spinner"},Gft.map((t,r)=>Xe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Vft=Xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Xe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Kft=Xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Xe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Qft=Xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Xe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Yft=Xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Xe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Xft=Xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},Xe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Xe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Zft=()=>{const[e,n]=Xe.useState(document.hidden);return Xe.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let Jft=1;const edt=100,PN=e=>{var n;return typeof(e==null?void 0:e.id)=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:Jft++};class tdt{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(t=>n(t)),()=>{const t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)}),this.publish=n=>{this.subscribers.forEach(t=>t(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-edt;n<=0||(this.toasts=this.toasts.filter(t=>n>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),n--,!1):!0))},this.create=n=>{const{message:t,...r}=n,s=PN(n),i=this.pendingDismissals.get(s);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const o=this.dismissedToasts.has(s),a=n.dismissible===void 0?!0:n.dismissible;return o&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(u=>u.id!==s)),(o?void 0:this.toasts.find(u=>u.id===s))?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...n,id:s,title:t}),{...u,...n,id:s,dismissible:a,title:t}):u):this.addToast({title:t,...r,dismissible:a,id:s}),s},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const t=this.pendingDismissals.get(n);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(r=>r({id:n,dismiss:!0}))})),n},this.message=(n,t)=>this.create({...t,message:n,type:void 0}),this.error=(n,t)=>this.create({...t,message:n,type:"error"}),this.success=(n,t)=>this.create({...t,type:"success",message:n}),this.info=(n,t)=>this.create({...t,type:"info",message:n}),this.warning=(n,t)=>this.create({...t,type:"warning",message:n}),this.loading=(n,t)=>this.create({...t,type:"loading",message:n}),this.promise=(n,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let i=r!==void 0,o;const a=s.then(async u=>{if(o=["resolve",u],Xe.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(rdt(u)&&!u.ok){i=!1;const f=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,x=typeof f=="object"&&!Xe.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...x})}else if(u instanceof Error){i=!1;const f=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof f=="object"&&!Xe.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...x})}else if(t.success!==void 0){i=!1;const f=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof f=="object"&&!Xe.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:p,...x})}}).catch(async u=>{if(o=["reject",u],t.error!==void 0){i=!1;const _=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof _=="object"&&!Xe.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:f,...m})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),l=()=>new Promise((u,_)=>a.then(()=>o[0]==="reject"?_(o[1]):u(o[1])).catch(_));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(n,t)=>{const r=PN(t);return this.create({...t,jsx:n(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const gi=new tdt,ndt=(e,n)=>gi.message(e,n),rdt=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",sdt=ndt,idt=()=>gi.toasts,adt=()=>gi.getActiveToasts(),odt=Object.assign(sdt,{success:gi.success,info:gi.info,warning:gi.warning,error:gi.error,custom:gi.custom,message:gi.message,promise:gi.promise,dismiss:gi.dismiss,loading:gi.loading},{getHistory:idt,getToasts:adt});qft("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ag(e){return e.label!==void 0}const ldt=3,cdt="24px",udt="16px",FN=4e3,fdt=356,ddt=14,hdt=45,_dt=200;function vo(...e){return e.filter(Boolean).join(" ")}function pdt(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const mdt=e=>{var n,t,r,s,i,o,a,l,u;const{invert:_,toast:f,unstyled:p,interacting:m,setHeights:x,visibleToasts:S,heights:b,index:v,toasts:y,expanded:w,removeToast:C,defaultRichColors:N,closeButton:E,style:j,cancelButtonStyle:z,actionButtonStyle:R,className:O="",descriptionClassName:I="",duration:F,position:U,gap:q,expandByDefault:Y,classNames:V,icons:Z,closeButtonAriaLabel:te="Close toast"}=e,[P,L]=Xe.useState(null),[$,H]=Xe.useState(null),[G,ne]=Xe.useState(!1),[oe,le]=Xe.useState(!1),[se,Q]=Xe.useState(!1),[ce,ee]=Xe.useState(!1),[ue,de]=Xe.useState(!1),[ye,Ae]=Xe.useState(0),[Ve,Ge]=Xe.useState(0),$e=Xe.useRef(f.duration||F||FN),ut=Xe.useRef(null),pt=Xe.useRef(null),Ut=v===0,It=v+1<=S,$t=f.type,tt=$t??"default",mt=f.dismissible!==!1,At=f.className||"",ke=f.descriptionClassName||"",De=Xe.useMemo(()=>b.findIndex(yt=>yt.toastId===f.id)||0,[b,f.id]),We=Xe.useMemo(()=>{var yt;return(yt=f.closeButton)!=null?yt:E},[f.closeButton,E]),rt=Xe.useMemo(()=>f.duration||F||FN,[f.duration,F]),bt=Xe.useRef(0),Wt=Xe.useRef(0),Pe=Xe.useRef(0),Dt=Xe.useRef(null),[ln,kn]=U.split("-"),Jt=Xe.useMemo(()=>b.reduce((yt,fn,wn)=>wn>=De?yt:yt+fn.height,0),[b,De]),Gn=Zft(),Gt=Xe.useMemo(()=>{var yt;return(yt=e.swipeDirections)!=null?yt:pdt(U)},[e.swipeDirections,U]),sn=f.invert||_,Wn=$t==="loading";Wt.current=Xe.useMemo(()=>De*q+Jt,[De,Jt]),Xe.useEffect(()=>{$e.current=rt},[rt]),Xe.useEffect(()=>{ne(!0)},[]),Xe.useEffect(()=>{const yt=pt.current;if(yt){const fn=yt.getBoundingClientRect().height;return Ge(fn),x(wn=>[{toastId:f.id,height:fn,position:f.position},...wn]),()=>x(wn=>wn.filter(Xt=>Xt.toastId!==f.id))}},[x,f.id]),Xe.useLayoutEffect(()=>{if(!G)return;const yt=pt.current,fn=yt.style.height;yt.style.height="auto";const wn=yt.getBoundingClientRect().height;yt.style.height=fn,Ge(wn),x(Xt=>Xt.find(cn=>cn.toastId===f.id)?Xt.map(cn=>cn.toastId===f.id?{...cn,height:wn}:cn):[{toastId:f.id,height:wn,position:f.position},...Xt])},[G,f.title,f.description,x,f.id,f.jsx,f.action,f.cancel]);const Tn=Xe.useCallback(()=>{le(!0),Ae(Wt.current),x(yt=>yt.filter(fn=>fn.toastId!==f.id)),setTimeout(()=>{C(f)},_dt)},[f,C,x,Wt]);Xe.useEffect(()=>{if(f.promise&&$t==="loading"||f.duration===1/0||f.type==="loading")return;let yt;return w||m||Gn?(()=>{if(Pe.current{$e.current!==1/0&&(bt.current=new Date().getTime(),yt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),Tn()},$e.current))})(),()=>clearTimeout(yt)},[w,m,f,$t,Gn,Tn]),Xe.useEffect(()=>{f.delete&&(Tn(),f.onDismiss==null||f.onDismiss.call(f,f))},[Tn,f.delete]);function Er(){var yt;if(Z!=null&&Z.loading){var fn;return Xe.createElement("div",{className:vo(V==null?void 0:V.loader,f==null||(fn=f.classNames)==null?void 0:fn.loader,"sonner-loader"),"data-visible":$t==="loading"},Z.loading)}return Xe.createElement(Wft,{className:vo(V==null?void 0:V.loader,f==null||(yt=f.classNames)==null?void 0:yt.loader),visible:$t==="loading"})}const rr=f.icon||(Z==null?void 0:Z[$t])||Uft($t);var Or,Nr;return Xe.createElement("li",{tabIndex:0,ref:pt,className:vo(O,At,V==null?void 0:V.toast,f==null||(n=f.classNames)==null?void 0:n.toast,V==null?void 0:V[tt],f==null||(t=f.classNames)==null?void 0:t[tt]),"data-sonner-toast":"","data-rich-colors":(Or=f.richColors)!=null?Or:N,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":G,"data-promise":!!f.promise,"data-swiped":ue,"data-removed":oe,"data-visible":It,"data-y-position":ln,"data-x-position":kn,"data-index":v,"data-front":Ut,"data-swiping":se,"data-dismissible":mt,"data-type":$t,"data-invert":sn,"data-swipe-out":ce,"data-swipe-direction":$,"data-expanded":!!(w||Y&&G),"data-testid":f.testId,style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${oe?ye:Wt.current}px`,"--initial-height":Y?"auto":`${Ve}px`,...j,...f.style},onDragEnd:()=>{Q(!1),L(null),Dt.current=null},onPointerDown:yt=>{yt.button!==2&&(Wn||!mt||(ut.current=new Date,Ae(Wt.current),yt.target.setPointerCapture(yt.pointerId),yt.target.tagName!=="BUTTON"&&(Q(!0),Dt.current={x:yt.clientX,y:yt.clientY})))},onPointerUp:()=>{var yt,fn,wn;if(ce||!mt)return;Dt.current=null;const Xt=Number(((yt=pt.current)==null?void 0:yt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ar=Number(((fn=pt.current)==null?void 0:fn.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),cn=new Date().getTime()-((wn=ut.current)==null?void 0:wn.getTime()),hn=P==="x"?Xt:ar,Pn=Math.abs(hn)/cn;if((P==="x"?Gt.includes(Xt>0?"right":"left"):Gt.includes(ar>0?"bottom":"top"))&&(Math.abs(hn)>=hdt||Pn>.11)){Ae(Wt.current),f.onDismiss==null||f.onDismiss.call(f,f),H(P==="x"?Xt>0?"right":"left":ar>0?"down":"up"),Tn(),ee(!0);return}else{var vt,qe;(vt=pt.current)==null||vt.style.setProperty("--swipe-amount-x","0px"),(qe=pt.current)==null||qe.style.setProperty("--swipe-amount-y","0px")}de(!1),Q(!1),L(null)},onPointerMove:yt=>{var fn,wn,Xt;if(!Dt.current||!mt||((fn=window.getSelection())==null?void 0:fn.toString().length)>0)return;const cn=yt.clientY-Dt.current.y,hn=yt.clientX-Dt.current.x;!P&&(Math.abs(hn)>1||Math.abs(cn)>1)&&L(Math.abs(hn)>Math.abs(cn)?"x":"y");let Pn={x:0,y:0};const gt=vt=>1/(1.5+Math.abs(vt)/20);if(P==="y"){if(Gt.includes("top")||Gt.includes("bottom"))if(Gt.includes("top")&&cn<0||Gt.includes("bottom")&&cn>0)Pn.y=cn;else{const vt=cn*gt(cn);Pn.y=Math.abs(vt)0)Pn.x=hn;else{const vt=hn*gt(hn);Pn.x=Math.abs(vt)0||Math.abs(Pn.y)>0)&&de(!0),(wn=pt.current)==null||wn.style.setProperty("--swipe-amount-x",`${Pn.x}px`),(Xt=pt.current)==null||Xt.style.setProperty("--swipe-amount-y",`${Pn.y}px`)}},We&&!f.jsx&&$t!=="loading"?Xe.createElement("button",{"aria-label":te,"data-disabled":Wn,"data-close-button":!0,onClick:Wn||!mt?()=>{}:()=>{Tn(),f.onDismiss==null||f.onDismiss.call(f,f)},className:vo(V==null?void 0:V.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(Nr=Z==null?void 0:Z.close)!=null?Nr:Xft):null,($t||f.icon||f.promise)&&f.icon!==null&&((Z==null?void 0:Z[$t])!==null||f.icon)?Xe.createElement("div",{"data-icon":"",className:vo(V==null?void 0:V.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},$t==="loading"?f.icon||Er():f.promise?Er():null,$t!=="loading"?rr:null):null,Xe.createElement("div",{"data-content":"",className:vo(V==null?void 0:V.content,f==null||(i=f.classNames)==null?void 0:i.content)},Xe.createElement("div",{"data-title":"",className:vo(V==null?void 0:V.title,f==null||(o=f.classNames)==null?void 0:o.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?Xe.createElement("div",{"data-description":"",className:vo(I,ke,V==null?void 0:V.description,f==null||(a=f.classNames)==null?void 0:a.description)},typeof f.description=="function"?f.description():f.description):null),Xe.isValidElement(f.cancel)?f.cancel:f.cancel&&Ag(f.cancel)?Xe.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||z,onClick:yt=>{Ag(f.cancel)&&mt&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,yt),Tn())},className:vo(V==null?void 0:V.cancelButton,f==null||(l=f.classNames)==null?void 0:l.cancelButton)},f.cancel.label):null,Xe.isValidElement(f.action)?f.action:f.action&&Ag(f.action)?Xe.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||R,onClick:yt=>{Ag(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,yt),!yt.defaultPrevented&&Tn())},className:vo(V==null?void 0:V.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function HN(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function gdt(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,o=i?"--mobile-offset":"--offset",a=i?udt:cdt;function l(u){["top","right","bottom","left"].forEach(_=>{t[`${o}-${_}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?t[`${o}-${u}`]=a:t[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),t}const vdt=Xe.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:l,className:u,offset:_,mobileOffset:f,theme:p="light",richColors:m,duration:x,style:S,visibleToasts:b=ldt,toastOptions:v,dir:y=HN(),gap:w=ddt,icons:C,customAriaLabel:N,containerAriaLabel:E="Notifications"}=n,[j,z]=Xe.useState([]),R=Xe.useMemo(()=>r?j.filter(ne=>ne.toasterId===r):j.filter(ne=>!ne.toasterId),[j,r]),O=Xe.useMemo(()=>Array.from(new Set([i].concat(R.filter(ne=>ne.position).map(ne=>ne.position)))),[R,i]),[I,F]=Xe.useState([]),[U,q]=Xe.useState(!1),[Y,V]=Xe.useState(!1),[Z,te]=Xe.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),P=Xe.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=Xe.useRef(null),H=Xe.useRef(!1),G=Xe.useCallback(ne=>{z(oe=>{var le;return(le=oe.find(se=>se.id===ne.id))!=null&&le.delete||gi.dismiss(ne.id),oe.filter(({id:se})=>se!==ne.id)})},[]);return Xe.useEffect(()=>gi.subscribe(ne=>{if(ne.dismiss){requestAnimationFrame(()=>{z(oe=>oe.map(le=>le.id===ne.id?{...le,delete:!0}:le))});return}setTimeout(()=>{Hft.flushSync(()=>{z(oe=>{const le=oe.findIndex(se=>se.id===ne.id);return le!==-1?[...oe.slice(0,le),{...oe[le],...ne},...oe.slice(le+1)]:[ne,...oe]})})})}),[]),Xe.useEffect(()=>{if(p!=="system"){te(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?te("dark"):te("light")),typeof window>"u")return;const ne=window.matchMedia("(prefers-color-scheme: dark)");try{ne.addEventListener("change",({matches:oe})=>{te(oe?"dark":"light")})}catch{ne.addListener(({matches:le})=>{try{te(le?"dark":"light")}catch(se){console.error(se)}})}},[p]),Xe.useEffect(()=>{j.length<=1&&q(!1)},[j]),Xe.useEffect(()=>{const ne=oe=>{var le;if(o.length>0&&o.every(ce=>oe[ce]||oe.code===ce)){var Q;q(!0),(Q=P.current)==null||Q.focus()}oe.code==="Escape"&&(document.activeElement===P.current||(le=P.current)!=null&&le.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[o]),Xe.useEffect(()=>{if(P.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,H.current=!1)}},[P.current]),Xe.createElement("section",{ref:t,"aria-label":N??`${E} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},O.map((ne,oe)=>{var le;const[se,Q]=ne.split("-");return R.length?Xe.createElement("ol",{key:ne,dir:y==="auto"?HN():y,tabIndex:-1,ref:P,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":se,"data-x-position":Q,style:{"--front-toast-height":`${((le=I[0])==null?void 0:le.height)||0}px`,"--width":`${fdt}px`,"--gap":`${w}px`,...S,...gdt(_,f)},onBlur:ce=>{H.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(H.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||H.current||(H.current=!0,$.current=ce.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{Y||q(!1)},onDragEnd:()=>q(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},R.filter(ce=>!ce.position&&oe===0||ce.position===ne).map((ce,ee)=>{var ue,de;return Xe.createElement(mdt,{key:ce.id,icons:C,index:ee,toast:ce,defaultRichColors:m,duration:(ue=v==null?void 0:v.duration)!=null?ue:x,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:s,visibleToasts:b,closeButton:(de=v==null?void 0:v.closeButton)!=null?de:l,interacting:Y,position:ne,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:G,toasts:R.filter(ye=>ye.position==ce.position),heights:I.filter(ye=>ye.position==ce.position),setHeights:F,expandByDefault:a,gap:w,expanded:U,swipeDirections:n.swipeDirections})})):null}))});function bdt(e){const[n]=TL();return h.jsx(vdt,{theme:n,...e})}function ir(e,n,t){odt[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function i6({content:e,children:n,className:t}){const r=M.useRef(null),s=M.useRef(null);function i(){const a=r.current,l=s.current;if(!a||!l)return;l.matches(":popover-open")||l.showPopover();const u=a.getBoundingClientRect(),_=l.getBoundingClientRect(),f=Math.max(8,Math.min(u.left+u.width/2-_.width/2,window.innerWidth-_.width-8));l.style.left=`${f}px`,l.style.top=`${Math.max(8,u.top-_.height-6)}px`}function o(){var a,l;(a=r.current)!=null&&a.matches(":hover, :focus")||(l=s.current)==null||l.hidePopover()}return M.useEffect(()=>{const a=()=>{var l;return(l=s.current)==null?void 0:l.hidePopover()};return window.addEventListener("scroll",a,!0),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a,!0),window.removeEventListener("resize",a)}},[]),h.jsxs("span",{ref:r,className:Ts("group relative inline-flex cursor-help rounded-full outline-none focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2",t),tabIndex:0,role:"img","aria-label":e,onMouseEnter:i,onMouseLeave:o,onFocus:i,onBlur:o,onKeyDown:a=>{var l;a.key==="Escape"&&((l=s.current)!=null&&l.matches(":popover-open"))&&(a.preventDefault(),a.stopPropagation(),s.current.hidePopover())},children:[n,h.jsx("span",{ref:s,popover:"manual",role:"tooltip",className:"pointer-events-none fixed inset-auto m-0 w-max max-w-64 whitespace-normal rounded-sm border-0 bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background shadow-control-subtle",children:e})]})}const ydt='button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function a6(e,n,t="[data-initial-focus]"){const r=M.useRef(n);r.current=n,M.useEffect(()=>{const s=e.current;if(!s)return;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...s.querySelectorAll(ydt)];(s.querySelector(t)??o()[0]??s).focus();const a=l=>{if(l.key==="Escape"){l.preventDefault(),l.stopPropagation(),r.current();return}if(l.key!=="Tab")return;const u=o(),_=u[0],f=u.at(-1);!_||!f?(l.preventDefault(),s.focus()):l.shiftKey&&document.activeElement===_?(l.preventDefault(),f.focus()):!l.shiftKey&&document.activeElement===f&&(l.preventDefault(),_.focus())};return document.addEventListener("keydown",a,!0),()=>{document.removeEventListener("keydown",a,!0),i==null||i.focus()}},[e,t])}function VL({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:i}){const o=M.useRef(null),a=Math.max(0,n.attachmentCount-(t?1:0)),l=[];return n.activeTurnCount>0&&l.push(n.activeTurnCount===1?jDe():HDe({count:nn(n.activeTurnCount)})),n.pendingPermissionCount>0&&l.push(n.pendingPermissionCount===1?_De():GMe({count:nn(n.pendingPermissionCount)})),a>0&&l.push(a===1?wDe():DDe({count:nn(a)})),n.queuedMessageCount>0&&l.push(n.queuedMessageCount===1?EDe():BDe({count:nn(n.queuedMessageCount)})),n.activeRunCount>0&&l.push(n.activeRunCount===1?vDe():rDe({count:nn(n.activeRunCount)})),a6(o,s),Fo.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:u=>{!r&&u.target===u.currentTarget&&s()},children:h.jsxs("div",{ref:o,className:"w-120 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-stop-dialog-title","aria-describedby":l.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[h.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:JMe({host:ze(e)})}),l.length>0&&h.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[h.jsx("p",{className:"m-0 font-medium",children:uDe()}),h.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:l.map(u=>h.jsx("li",{children:u},u))})]}),h.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[h.jsx(Oe,{disabled:r,onClick:s,children:qp()}),h.jsx(Oe,{variant:"danger",disabled:r,onClick:i,children:r?WDe():QMe()})]})]})}),document.body)}var y2={exports:{}},qN;function xdt(){return qN||(qN=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={};return(()=>{var r=t;Object.defineProperty(r,"__esModule",{value:!0}),r.FitAddon=void 0,r.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const i=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(i._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,i=s._renderService.dimensions;if(i.css.cell.width===0||i.css.cell.height===0)return;const o=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(a.getPropertyValue("height")),u=Math.max(0,parseInt(a.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),f=l-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),p=u-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(p/i.css.cell.width)),rows:Math.max(1,Math.floor(f/i.css.cell.height))}}}})(),t})()))})(y2)),y2.exports}var wdt=xdt(),x2={exports:{}},UN;function Sdt(){return UN||(UN=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(o,a)=>{function l(_){try{const f=new URL(_),p=f.password&&f.username?`${f.protocol}//${f.username}:${f.password}@${f.host}`:f.username?`${f.protocol}//${f.username}@${f.host}`:`${f.protocol}//${f.host}`;return _.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(_,f,p,m={}){this._terminal=_,this._regex=f,this._handler=p,this._options=m}provideLinks(_,f){const p=u.computeLink(_,this._regex,this._terminal,this._handler);f(this._addCallbacks(p))}_addCallbacks(_){return _.map((f=>(f.leave=this._options.leave,f.hover=(p,m)=>{if(this._options.hover){const{range:x}=f;this._options.hover(p,m,x)}},f)))}};class u{static computeLink(f,p,m,x){const S=new RegExp(p.source,(p.flags||"")+"g"),[b,v]=u._getWindowedLineStrings(f-1,m),y=b.join("");let w;const C=[];for(;w=S.exec(y);){const N=w[0];if(!l(N))continue;const[E,j]=u._mapStrIdx(m,v,0,w.index),[z,R]=u._mapStrIdx(m,E,j,N.length);if(E===-1||j===-1||z===-1||R===-1)continue;const O={start:{x:j+1,y:E+1},end:{x:R,y:z+1}};C.push({range:O,text:N,activate:x})}return C}static _getWindowedLineStrings(f,p){let m,x=f,S=f,b=0,v="";const y=[];if(m=p.buffer.active.getLine(f)){const w=m.translateToString(!0);if(m.isWrapped&&w[0]!==" "){for(b=0;(m=p.buffer.active.getLine(--x))&&b<2048&&(v=m.translateToString(!0),b+=v.length,y.push(v),m.isWrapped&&v.indexOf(" ")===-1););y.reverse()}for(y.push(w),b=0;(m=p.buffer.active.getLine(++S))&&m.isWrapped&&b<2048&&(v=m.translateToString(!0),b+=v.length,y.push(v),v.indexOf(" ")===-1););}return[y,x]}static _mapStrIdx(f,p,m,x){const S=f.buffer.active,b=S.getNullCell();let v=m;for(;x;){const y=S.getLine(p);if(!y)return[-1,-1];for(let w=v;w{var o=i;Object.defineProperty(o,"__esModule",{value:!0}),o.WebLinksAddon=void 0;const a=s(6),l=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(_,f){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=f}else console.warn("Opening link blocked as opener could not be cleared")}o.WebLinksAddon=class{constructor(_=u,f={}){this._handler=_,this._options=f}activate(_){this._terminal=_;const f=this._options,p=f.urlRegex||l;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,p,this._handler,f))}dispose(){var _;(_=this._linkProvider)==null||_.dispose()}}})(),i})()))})(x2)),x2.exports}var kdt=Sdt(),w2={exports:{}},GN;function Cdt(){return GN||(GN=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(o,a,l){var u=this&&this.__decorate||function(y,w,C,N){var E,j=arguments.length,z=j<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,w,C,N);else for(var R=y.length-1;R>=0;R--)(E=y[R])&&(z=(j<3?E(z):j>3?E(w,C,z):E(w,C))||z);return j>3&&z&&Object.defineProperty(w,C,z),z},_=this&&this.__param||function(y,w){return function(C,N){w(C,N,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const f=l(9042),p=l(9924),m=l(844),x=l(4725),S=l(2585),b=l(3656);let v=a.AccessibilityManager=class extends m.Disposable{constructor(y,w,C,N){super(),this._terminal=y,this._coreBrowserService=C,this._renderService=N,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 E=0;Ethis._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,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((E=>this._handleResize(E.rows)))),this.register(this._terminal.onRender((E=>this._refreshRows(E.start,E.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((E=>this._handleChar(E)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` -`)))),this.register(this._terminal.onA11yTab((E=>this._handleTab(E)))),this.register(this._terminal.onKey((E=>this._handleKey(E.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,b.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,m.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(y){for(let w=0;w0?this._charsToConsume.shift()!==y&&(this._charsToAnnounce+=y):this._charsToAnnounce+=y,y===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(y){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(y)||this._charsToConsume.push(y)}_refreshRows(y,w){this._liveRegionDebouncer.refresh(y,w,this._terminal.rows)}_renderRows(y,w){const C=this._terminal.buffer,N=C.lines.length.toString();for(let E=y;E<=w;E++){const j=C.lines.get(C.ydisp+E),z=[],R=(j==null?void 0:j.translateToString(!0,void 0,void 0,z))||"",O=(C.ydisp+E+1).toString(),I=this._rowElements[E];I&&(R.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=R,this._rowColumns.set(I,z)),I.setAttribute("aria-posinset",O),I.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(y,w){const C=y.target,N=this._rowElements[w===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(w===0?"1":`${this._terminal.buffer.lines.length}`)||y.relatedTarget!==N)return;let E,j;if(w===0?(E=C,j=this._rowElements.pop(),this._rowContainer.removeChild(j)):(E=this._rowElements.shift(),j=C,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),j.removeEventListener("focus",this._bottomBoundaryFocusListener),w===0){const z=this._createAccessibilityTreeNode();this._rowElements.unshift(z),this._rowContainer.insertAdjacentElement("afterbegin",z)}else{const z=this._createAccessibilityTreeNode();this._rowElements.push(z),this._rowContainer.appendChild(z)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(w===0?-1:1),this._rowElements[w===0?1:this._rowElements.length-2].focus(),y.preventDefault(),y.stopImmediatePropagation()}_handleSelectionChange(){var R;if(this._rowElements.length===0)return;const y=document.getSelection();if(!y)return;if(y.isCollapsed)return void(this._rowContainer.contains(y.anchorNode)&&this._terminal.clearSelection());if(!y.anchorNode||!y.focusNode)return void console.error("anchorNode and/or focusNode are null");let w={node:y.anchorNode,offset:y.anchorOffset},C={node:y.focusNode,offset:y.focusOffset};if((w.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||w.node===C.node&&w.offset>C.offset)&&([w,C]=[C,w]),w.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(w={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(w.node))return;const N=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(N)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:N,offset:((R=N.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(C.node))return;const E=({node:O,offset:I})=>{const F=O instanceof Text?O.parentNode:O;let U=parseInt(F==null?void 0:F.getAttribute("aria-posinset"),10)-1;if(isNaN(U))return console.warn("row is invalid. Race condition?"),null;const q=this._rowColumns.get(F);if(!q)return console.warn("columns is null. Race condition?"),null;let Y=I=this._terminal.cols&&(++U,Y=0),{row:U,column:Y}},j=E(w),z=E(C);if(j&&z){if(j.row>z.row||j.row===z.row&&j.column>=z.column)throw new Error("invalid range");this._terminal.select(j.column,j.row,(z.row-j.row)*this._terminal.cols-j.column+z.column)}}_handleResize(y){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let w=this._rowContainer.children.length;wy;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const y=this._coreBrowserService.mainDocument.createElement("div");return y.setAttribute("role","listitem"),y.tabIndex=-1,this._refreshRowDimensions(y),y}_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 y=0;y{function l(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function _(p,m,x,S){p=u(p=l(p),x.decPrivateModes.bracketedPasteMode&&S.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(p,!0),m.value=""}function f(p,m,x){const S=x.getBoundingClientRect(),b=p.clientX-S.left-10,v=p.clientY-S.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${b}px`,m.style.top=`${v}px`,m.style.zIndex="1000",m.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=l,a.bracketTextForPaste=u,a.copyHandler=function(p,m){p.clipboardData&&p.clipboardData.setData("text/plain",m.selectionText),p.preventDefault()},a.handlePasteEvent=function(p,m,x,S){p.stopPropagation(),p.clipboardData&&_(p.clipboardData.getData("text/plain"),m,x,S)},a.paste=_,a.moveTextAreaUnderMouseCursor=f,a.rightClickHandler=function(p,m,x,S,b){f(p,m,x),b&&S.rightClickSelect(p),m.value=S.selectionText,m.select()}},7239:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const u=l(1505);a.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(_,f,p){this._css.set(_,f,p)}getCss(_,f){return this._css.get(_,f)}setColor(_,f,p){this._color.set(_,f,p)}getColor(_,f){return this._color.get(_,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(l,u,_,f){l.addEventListener(u,_,f);let p=!1;return{dispose:()=>{p||(p=!0,l.removeEventListener(u,_,f))}}}},3551:function(o,a,l){var u=this&&this.__decorate||function(v,y,w,C){var N,E=arguments.length,j=E<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,y,w,C);else for(var z=v.length-1;z>=0;z--)(N=v[z])&&(j=(E<3?N(j):E>3?N(y,w,j):N(y,w))||j);return E>3&&j&&Object.defineProperty(y,w,j),j},_=this&&this.__param||function(v,y){return function(w,C){y(w,C,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const f=l(3656),p=l(8460),m=l(844),x=l(2585),S=l(4725);let b=a.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(v,y,w,C,N){super(),this._element=v,this._mouseService=y,this._renderService=w,this._bufferService=C,this._linkProviderService=N,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,m.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,m.toDisposable)((()=>{var E;this._lastMouseEvent=void 0,(E=this._activeProviderReplies)==null||E.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(v){this._lastMouseEvent=v;const y=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!y)return;this._isMouseOut=!1;const w=v.composedPath();for(let C=0;C{E==null||E.forEach((j=>{j.link.dispose&&j.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=v.y);let w=!1;for(const[E,j]of this._linkProviderService.linkProviders.entries())y?(N=this._activeProviderReplies)!=null&&N.get(E)&&(w=this._checkLinkProviderResult(E,v,w)):j.provideLinks(v.y,(z=>{var O,I;if(this._isMouseOut)return;const R=z==null?void 0:z.map((F=>({link:F})));(O=this._activeProviderReplies)==null||O.set(E,R),w=this._checkLinkProviderResult(E,v,w),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)}))}_removeIntersectingLinks(v,y){const w=new Set;for(let C=0;Cv?this._bufferService.cols:j.link.range.end.x;for(let O=z;O<=R;O++){if(w.has(O)){N.splice(E--,1);break}w.add(O)}}}}_checkLinkProviderResult(v,y,w){var E;if(!this._activeProviderReplies)return w;const C=this._activeProviderReplies.get(v);let N=!1;for(let j=0;jthis._linkAtPosition(z.link,y)));j&&(w=!0,this._handleNewLink(j))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!w)for(let j=0;jthis._linkAtPosition(R.link,y)));if(z){w=!0,this._handleNewLink(z);break}}return w}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const y=this._positionFromMouseEvent(v,this._element,this._mouseService);y&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,y)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,y){this._currentLink&&this._lastMouseEvent&&(!v||!y||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=y)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._linkAtPosition(v.link,y)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var w,C;return(C=(w=this._currentLink)==null?void 0:w.state)==null?void 0:C.decorations.pointerCursor},set:w=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==w&&(this._currentLink.state.decorations.pointerCursor=w,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",w))}},underline:{get:()=>{var w,C;return(C=(w=this._currentLink)==null?void 0:w.state)==null?void 0:C.decorations.underline},set:w=>{var C,N,E;(C=this._currentLink)!=null&&C.state&&((E=(N=this._currentLink)==null?void 0:N.state)==null?void 0:E.decorations.underline)!==w&&(this._currentLink.state.decorations.underline=w,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.link,w))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((w=>{if(!this._currentLink)return;const C=w.start===0?0:w.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+w.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}}))))}_linkHover(v,y,w){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),y.hover&&y.hover(w,y.text)}_fireUnderlineEvent(v,y){const w=v.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(w.start.x-1,w.start.y-C-1,w.end.x,w.end.y-C-1,void 0);(y?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(v,y,w){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),y.leave&&y.leave(w,y.text)}_linkAtPosition(v,y){const w=v.range.start.y*this._bufferService.cols+v.range.start.x,C=v.range.end.y*this._bufferService.cols+v.range.end.x,N=y.y*this._bufferService.cols+y.x;return w<=N&&N<=C}_positionFromMouseEvent(v,y,w){const C=w.getCoords(v,y,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,y,w,C,N){return{x1:v,y1:y,x2:w,y2:C,cols:this._bufferService.cols,fg:N}}};a.Linkifier=b=u([_(1,S.IMouseService),_(2,S.IRenderService),_(3,x.IBufferService),_(4,S.ILinkProviderService)],b)},9042:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(o,a,l){var u=this&&this.__decorate||function(S,b,v,y){var w,C=arguments.length,N=C<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,v):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(S,b,v,y);else for(var E=S.length-1;E>=0;E--)(w=S[E])&&(N=(C<3?w(N):C>3?w(b,v,N):w(b,v))||N);return C>3&&N&&Object.defineProperty(b,v,N),N},_=this&&this.__param||function(S,b){return function(v,y){b(v,y,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const f=l(511),p=l(2585);let m=a.OscLinkProvider=class{constructor(S,b,v){this._bufferService=S,this._optionsService=b,this._oscLinkService=v}provideLinks(S,b){var R;const v=this._bufferService.buffer.lines.get(S-1);if(!v)return void b(void 0);const y=[],w=this._optionsService.rawOptions.linkHandler,C=new f.CellData,N=v.getTrimmedLength();let E=-1,j=-1,z=!1;for(let O=0;Ow?w.activate(q,Y,F):x(0,Y),hover:(q,Y)=>{var V;return(V=w==null?void 0:w.hover)==null?void 0:V.call(w,q,Y,F)},leave:(q,Y)=>{var V;return(V=w==null?void 0:w.leave)==null?void 0:V.call(w,q,Y,F)}})}z=!1,C.hasExtendedAttrs()&&C.extended.urlId?(j=O,E=C.extended.urlId):(j=-1,E=-1)}}b(y)}};function x(S,b){if(confirm(`Do you want to navigate to ${b}? - -WARNING: This link could potentially be dangerous`)){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=m=u([_(0,p.IBufferService),_(1,p.IOptionsService),_(2,p.IOscLinkService)],m)},6193:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(l,u){this._renderCallback=l,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(l){return this._refreshCallbacks.push(l),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(l,u,_){this._rowCount=_,l=l!==void 0?l:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const l=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const l of this._refreshCallbacks)l(0);this._refreshCallbacks=[]}}},3236:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const u=l(3614),_=l(3656),f=l(3551),p=l(9042),m=l(3730),x=l(1680),S=l(3107),b=l(5744),v=l(2950),y=l(1296),w=l(428),C=l(4269),N=l(5114),E=l(8934),j=l(3230),z=l(9312),R=l(4725),O=l(6731),I=l(8055),F=l(8969),U=l(8460),q=l(844),Y=l(6114),V=l(8437),Z=l(2584),te=l(7399),P=l(5941),L=l(9074),$=l(2585),H=l(5435),G=l(4567),ne=l(779);class oe extends F.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(se={}){super(se),this.browser=Y,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new q.MutableDisposable),this._onCursorMove=this.register(new U.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new U.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new U.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new U.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new U.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new U.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new U.EventEmitter),this._onBlur=this.register(new U.EventEmitter),this._onA11yCharEmitter=this.register(new U.EventEmitter),this._onA11yTabEmitter=this.register(new U.EventEmitter),this._onWillOpen=this.register(new U.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService($.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ne.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(m.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((Q,ce)=>this.refresh(Q,ce)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((Q=>this._reportWindowsOptions(Q)))),this.register(this._inputHandler.onColor((Q=>this._handleColorEvent(Q)))),this.register((0,U.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,U.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((Q=>this._afterResize(Q.cols,Q.rows)))),this.register((0,q.toDisposable)((()=>{var Q,ce;this._customKeyEventHandler=void 0,(ce=(Q=this.element)==null?void 0:Q.parentNode)==null||ce.removeChild(this.element)})))}_handleColorEvent(se){if(this._themeService)for(const Q of se){let ce,ee="";switch(Q.index){case 256:ce="foreground",ee="10";break;case 257:ce="background",ee="11";break;case 258:ce="cursor",ee="12";break;default:ce="ansi",ee="4;"+Q.index}switch(Q.type){case 0:const ue=I.color.toColorRGB(ce==="ansi"?this._themeService.colors.ansi[Q.index]:this._themeService.colors[ce]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${ee};${(0,P.toRgbString)(ue)}${Z.C1_ESCAPED.ST}`);break;case 1:if(ce==="ansi")this._themeService.modifyColors((de=>de.ansi[Q.index]=I.channels.toColor(...Q.color)));else{const de=ce;this._themeService.modifyColors((ye=>ye[de]=I.channels.toColor(...Q.color)))}break;case 2:this._themeService.restoreColor(Q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(se){se?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var se;return(se=this.textarea)==null?void 0:se.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const se=this.buffer.ybase+this.buffer.y,Q=this.buffer.lines.get(se);if(!Q)return;const ce=Math.min(this.buffer.x,this.cols-1),ee=this._renderService.dimensions.css.cell.height,ue=Q.getWidth(ce),de=this._renderService.dimensions.css.cell.width*ue,ye=this.buffer.y*this._renderService.dimensions.css.cell.height,Ae=ce*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ae+"px",this.textarea.style.top=ye+"px",this.textarea.style.width=de+"px",this.textarea.style.height=ee+"px",this.textarea.style.lineHeight=ee+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(Q=>{this.hasSelection()&&(0,u.copyHandler)(Q,this._selectionService)})));const se=Q=>(0,u.handlePasteEvent)(Q,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,_.addDisposableDomListener)(this.element,"paste",se)),Y.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(Q=>{Q.button===2&&(0,u.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(Q=>{(0,u.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Y.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(Q=>{Q.button===1&&(0,u.moveTextAreaUnderMouseCursor)(Q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(se=>this._keyUp(se)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(se=>this._keyDown(se)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(se=>this._keyPress(se)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(se=>this._compositionHelper.compositionupdate(se)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(se=>this._inputEvent(se)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(se){var ce;if(!se)throw new Error("Terminal requires a parent element.");if(se.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ce=this.element)==null?void 0:ce.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=se.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),se.appendChild(this.element);const Q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,_.addDisposableDomListener)(this.screenElement,"mousemove",(ee=>this.updateCursorStyle(ee)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Y.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(N.CoreBrowserService,this.textarea,se.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(ee=>this._handleTextAreaFocus(ee)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(w.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(j.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ee=>this._onRender.fire(ee)))),this.onResize((ee=>this._renderService.resize(ee.cols,ee.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(Q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(x.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(z.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ee=>this._renderService.handleSelectionChanged(ee.start,ee.end,ee.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ee=>{this.textarea.value=ee,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ee=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(S.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(ee=>this._selectionService.handleMouseDown(ee)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ee=>this._handleScreenReaderModeOptionChange(ee)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ee=>{!this._overviewRulerRenderer&&ee&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(y.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,Q=this.element;function ce(de){const ye=se._mouseService.getMouseReportCoords(de,se.screenElement);if(!ye)return!1;let Ae,Ve;switch(de.overrideType||de.type){case"mousemove":Ve=32,de.buttons===void 0?(Ae=3,de.button!==void 0&&(Ae=de.button<3?de.button:3)):Ae=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":Ve=0,Ae=de.button<3?de.button:3;break;case"mousedown":Ve=1,Ae=de.button<3?de.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(de)===!1||se.viewport.getLinesScrolled(de)===0)return!1;Ve=de.deltaY<0?0:1,Ae=4;break;default:return!1}return!(Ve===void 0||Ae===void 0||Ae>4)&&se.coreMouseService.triggerMouseEvent({col:ye.col,row:ye.row,x:ye.x,y:ye.y,button:Ae,action:Ve,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const ee={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ue={mouseup:de=>(ce(de),de.buttons||(this._document.removeEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.removeEventListener("mousemove",ee.mousedrag)),this.cancel(de)),wheel:de=>(ce(de),this.cancel(de,!0)),mousedrag:de=>{de.buttons&&ce(de)},mousemove:de=>{de.buttons||ce(de)}};this.register(this.coreMouseService.onProtocolChange((de=>{de?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(de)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&de?ee.mousemove||(Q.addEventListener("mousemove",ue.mousemove),ee.mousemove=ue.mousemove):(Q.removeEventListener("mousemove",ee.mousemove),ee.mousemove=null),16&de?ee.wheel||(Q.addEventListener("wheel",ue.wheel,{passive:!1}),ee.wheel=ue.wheel):(Q.removeEventListener("wheel",ee.wheel),ee.wheel=null),2&de?ee.mouseup||(ee.mouseup=ue.mouseup):(this._document.removeEventListener("mouseup",ee.mouseup),ee.mouseup=null),4&de?ee.mousedrag||(ee.mousedrag=ue.mousedrag):(this._document.removeEventListener("mousemove",ee.mousedrag),ee.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(Q,"mousedown",(de=>{if(de.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(de))return ce(de),ee.mouseup&&this._document.addEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.addEventListener("mousemove",ee.mousedrag),this.cancel(de)}))),this.register((0,_.addDisposableDomListener)(Q,"wheel",(de=>{if(!ee.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const ye=this.viewport.getLinesScrolled(de);if(ye===0)return;const Ae=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let Ve="";for(let Ge=0;Ge{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(Q,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{passive:!1}))}refresh(se,Q){var ce;(ce=this._renderService)==null||ce.refreshRows(se,Q)}updateCursorStyle(se){var Q;(Q=this._selectionService)!=null&&Q.shouldColumnSelect(se)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(se,Q,ce=0){var ee;ce===1?(super.scrollLines(se,Q,ce),this.refresh(0,this.rows-1)):(ee=this.viewport)==null||ee.scrollLines(se)}paste(se){(0,u.paste)(se,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(se){this._customKeyEventHandler=se}attachCustomWheelEventHandler(se){this._customWheelEventHandler=se}registerLinkProvider(se){return this._linkProviderService.registerLinkProvider(se)}registerCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const Q=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),Q}deregisterCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(se)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(se){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+se)}registerDecoration(se){return this._decorationService.registerDecoration(se)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(se,Q,ce){this._selectionService.setSelection(se,Q,ce)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var se;(se=this._selectionService)==null||se.clearSelection()}selectAll(){var se;(se=this._selectionService)==null||se.selectAll()}selectLines(se,Q){var ce;(ce=this._selectionService)==null||ce.selectLines(se,Q)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const Q=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!Q&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Q||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ce=(0,te.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),ce.type===3||ce.type===2){const ee=this.rows-1;return this.scrollLines(ce.type===2?-ee:ee),this.cancel(se,!0)}return ce.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(ce.cancel&&this.cancel(se,!0),!ce.key||!!(se.key&&!se.ctrlKey&&!se.altKey&&!se.metaKey&&se.key.length===1&&se.key.charCodeAt(0)>=65&&se.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ce.key!==Z.C0.ETX&&ce.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ce.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(ce.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,Q){const ce=se.isMac&&!this.options.macOptionIsMeta&&Q.altKey&&!Q.ctrlKey&&!Q.metaKey||se.isWindows&&Q.altKey&&Q.ctrlKey&&!Q.metaKey||se.isWindows&&Q.getModifierState("AltGraph");return Q.type==="keypress"?ce:ce&&(!Q.keyCode||Q.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||((function(Q){return Q.keyCode===16||Q.keyCode===17||Q.keyCode===18})(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let Q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)Q=se.charCode;else if(se.which===null||se.which===void 0)Q=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;Q=se.which}return!(!Q||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(Q=String.fromCharCode(Q),this._onKey.fire({key:Q,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(Q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(se){if(se.data&&se.inputType==="insertText"&&(!se.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const Q=se.data;return this.coreService.triggerDataEvent(Q,!0),this.cancel(se),!0}return!1}resize(se,Q){se!==this.cols||Q!==this.rows?super.resize(se,Q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,Q){var ce,ee;(ce=this._charSizeService)==null||ce.measure(),(ee=this.viewport)==null||ee.syncScrollArea(!0)}clear(){var se;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let Q=1;Q{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(l,u=1e3){this._renderCallback=l,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(l,u,_){this._rowCount=_,l=l!==void 0?l:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=f-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),m)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const l=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,u)}}},1680:function(o,a,l){var u=this&&this.__decorate||function(v,y,w,C){var N,E=arguments.length,j=E<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,y,w,C);else for(var z=v.length-1;z>=0;z--)(N=v[z])&&(j=(E<3?N(j):E>3?N(y,w,j):N(y,w))||j);return E>3&&j&&Object.defineProperty(y,w,j),j},_=this&&this.__param||function(v,y){return function(w,C){y(w,C,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const f=l(3656),p=l(4725),m=l(8460),x=l(844),S=l(2585);let b=a.Viewport=class extends x.Disposable{constructor(v,y,w,C,N,E,j,z){super(),this._viewportElement=v,this._scrollArea=y,this._bufferService=w,this._optionsService=C,this._charSizeService=N,this._renderService=E,this._coreBrowserService=j,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((R=>this._renderDimensions=R))),this._handleThemeChange(z.colors),this.register(z.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(v){this._viewportElement.style.backgroundColor=v.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(v){if(v)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const y=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==y&&(this._lastRecordedBufferHeight=y,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const v=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==v&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=v),this._refreshAnimationFrame=null}syncScrollArea(v=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(v)}_handleScroll(v){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const y=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:y,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const v=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(v*(this._smoothScrollState.target-this._smoothScrollState.origin)),v<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(v,y){const w=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(y<0&&this._viewportElement.scrollTop!==0||y>0&&w0&&(w=F),C=""}}return{bufferElements:N,cursorElement:w}}getLinesScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let y=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(y/=this._currentRowHeight+0,this._wheelPartialScroll+=y,y=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(y*=this._bufferService.rows),y}_applyScrollModifier(v,y){const w=this._optionsService.rawOptions.fastScrollModifier;return w==="alt"&&y.altKey||w==="ctrl"&&y.ctrlKey||w==="shift"&&y.shiftKey?v*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:v*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(v){this._lastTouchY=v.touches[0].pageY}handleTouchMove(v){const y=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,y!==0&&(this._viewportElement.scrollTop+=y,this._bubbleScroll(v,y))}};a.Viewport=b=u([_(2,S.IBufferService),_(3,S.IOptionsService),_(4,p.ICharSizeService),_(5,p.IRenderService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],b)},3107:function(o,a,l){var u=this&&this.__decorate||function(S,b,v,y){var w,C=arguments.length,N=C<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,v):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(S,b,v,y);else for(var E=S.length-1;E>=0;E--)(w=S[E])&&(N=(C<3?w(N):C>3?w(b,v,N):w(b,v))||N);return C>3&&N&&Object.defineProperty(b,v,N),N},_=this&&this.__param||function(S,b){return function(v,y){b(v,y,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const f=l(4725),p=l(844),m=l(2585);let x=a.BufferDecorationRenderer=class extends p.Disposable{constructor(S,b,v,y,w){super(),this._screenElement=S,this._bufferService=b,this._coreBrowserService=v,this._decorationService=y,this._renderService=w,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((C=>this._removeDecoration(C)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const S of this._decorationService.decorations)this._renderDecoration(S);this._dimensionsChanged=!1}_renderDecoration(S){this._refreshStyle(S),this._dimensionsChanged&&this._refreshXPosition(S)}_createElement(S){var y;const b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",((y=S==null?void 0:S.options)==null?void 0:y.layer)==="top"),b.style.width=`${Math.round((S.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=(S.options.height||1)*this._renderService.dimensions.css.cell.height+"px",b.style.top=(S.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=S.options.x??0;return v&&v>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(S,b),b}_refreshStyle(S){const b=S.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)S.element&&(S.element.style.display="none",S.onRenderEmitter.fire(S.element));else{let v=this._decorationElements.get(S);v||(v=this._createElement(S),S.element=v,this._decorationElements.set(S,v),this._container.appendChild(v),S.onDispose((()=>{this._decorationElements.delete(S),v.remove()}))),v.style.top=b*this._renderService.dimensions.css.cell.height+"px",v.style.display=this._altBufferIsActive?"none":"block",S.onRenderEmitter.fire(v)}}_refreshXPosition(S,b=S.element){if(!b)return;const v=S.options.x??0;(S.options.anchor||"left")==="right"?b.style.right=v?v*this._renderService.dimensions.css.cell.width+"px":"":b.style.left=v?v*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(S){var b;(b=this._decorationElements.get(S))==null||b.remove(),this._decorationElements.delete(S),S.dispose()}};a.BufferDecorationRenderer=x=u([_(1,m.IBufferService),_(2,f.ICoreBrowserService),_(3,m.IDecorationService),_(4,f.IRenderService)],x)},5871:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(l){if(l.options.overviewRulerOptions){for(const u of this._zones)if(u.color===l.options.overviewRulerOptions.color&&u.position===l.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,l.marker.line))return;if(this._lineAdjacentToZone(u,l.marker.line,l.options.overviewRulerOptions.position))return void this._addLineToZone(u,l.marker.line)}if(this._zonePoolIndex=l.startBufferLine&&u<=l.endBufferLine}_lineAdjacentToZone(l,u,_){return u>=l.startBufferLine-this._linePadding[_||"full"]&&u<=l.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(l,u){l.startBufferLine=Math.min(l.startBufferLine,u),l.endBufferLine=Math.max(l.endBufferLine,u)}}},5744:function(o,a,l){var u=this&&this.__decorate||function(w,C,N,E){var j,z=arguments.length,R=z<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,N):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(w,C,N,E);else for(var O=w.length-1;O>=0;O--)(j=w[O])&&(R=(z<3?j(R):z>3?j(C,N,R):j(C,N))||R);return z>3&&R&&Object.defineProperty(C,N,R),R},_=this&&this.__param||function(w,C){return function(N,E){C(N,E,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const f=l(5871),p=l(4725),m=l(844),x=l(2585),S={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0};let y=a.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(w,C,N,E,j,z,R){var I;super(),this._viewportElement=w,this._screenElement=C,this._bufferService=N,this._decorationService=E,this._renderService=j,this._optionsService=z,this._coreBrowserService=R,this._colorZoneStore=new f.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var F;(F=this._canvas)==null||F.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const w=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);b.full=this._canvas.width,b.left=w,b.center=C,b.right=w,this._refreshDrawHeightConstants(),v.full=0,v.left=0,v.center=b.left,v.right=b.left+b.center}_refreshDrawHeightConstants(){S.full=Math.round(2*this._coreBrowserService.dpr);const w=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(w,12),6)*this._coreBrowserService.dpr);S.left=C,S.center=C,S.right=C}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const C of this._decorationService.decorations)this._colorZoneStore.addDecoration(C);this._ctx.lineWidth=1;const w=this._colorZoneStore.zones;for(const C of w)C.position!=="full"&&this._renderColorZone(C);for(const C of w)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(w){this._ctx.fillStyle=w.color,this._ctx.fillRect(v[w.position||"full"],Math.round((this._canvas.height-1)*(w.startBufferLine/this._bufferService.buffers.active.lines.length)-S[w.position||"full"]/2),b[w.position||"full"],Math.round((this._canvas.height-1)*((w.endBufferLine-w.startBufferLine)/this._bufferService.buffers.active.lines.length)+S[w.position||"full"]))}_queueRefresh(w,C){this._shouldUpdateDimensions=w||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=y=u([_(2,x.IBufferService),_(3,x.IDecorationService),_(4,p.IRenderService),_(5,x.IOptionsService),_(6,p.ICoreBrowserService)],y)},2950:function(o,a,l){var u=this&&this.__decorate||function(S,b,v,y){var w,C=arguments.length,N=C<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,v):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(S,b,v,y);else for(var E=S.length-1;E>=0;E--)(w=S[E])&&(N=(C<3?w(N):C>3?w(b,v,N):w(b,v))||N);return C>3&&N&&Object.defineProperty(b,v,N),N},_=this&&this.__param||function(S,b){return function(v,y){b(v,y,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const f=l(4725),p=l(2585),m=l(2584);let x=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(S,b,v,y,w,C){this._textarea=S,this._compositionView=b,this._bufferService=v,this._optionsService=y,this._coreService=w,this._renderService=C,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(S){this._compositionView.textContent=S.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(S){if(this._isComposing||this._isSendingComposition){if(S.keyCode===229||S.keyCode===16||S.keyCode===17||S.keyCode===18)return!1;this._finalizeComposition(!1)}return S.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(S){if(this._compositionView.classList.remove("active"),this._isComposing=!1,S){const b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let v;this._isSendingComposition=!1,b.start+=this._dataAlreadySent.length,v=this._isComposing?this._textarea.value.substring(b.start,b.end):this._textarea.value.substring(b.start),v.length>0&&this._coreService.triggerDataEvent(v,!0)}}),0)}else{this._isSendingComposition=!1;const b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}}_handleAnyTextareaChanges(){const S=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const b=this._textarea.value,v=b.replace(S,"");this._dataAlreadySent=v,b.length>S.length?this._coreService.triggerDataEvent(v,!0):b.lengththis.updateCompositionElements(!0)),0)}}};a.CompositionHelper=x=u([_(2,p.IBufferService),_(3,p.IOptionsService),_(4,p.ICoreService),_(5,f.IRenderService)],x)},9806:(o,a)=>{function l(u,_,f){const p=f.getBoundingClientRect(),m=u.getComputedStyle(f),x=parseInt(m.getPropertyValue("padding-left")),S=parseInt(m.getPropertyValue("padding-top"));return[_.clientX-p.left-x,_.clientY-p.top-S]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=l,a.getCoords=function(u,_,f,p,m,x,S,b,v){if(!x)return;const y=l(u,_,f);return y?(y[0]=Math.ceil((y[0]+(v?S/2:0))/S),y[1]=Math.ceil(y[1]/b),y[0]=Math.min(Math.max(y[0],1),p+(v?1:0)),y[1]=Math.min(Math.max(y[1],1),m),y):void 0}},9504:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const u=l(2584);function _(b,v,y,w){const C=b-f(b,y),N=v-f(v,y),E=Math.abs(C-N)-(function(j,z,R){let O=0;const I=j-f(j,R),F=z-f(z,R);for(let U=0;U=0&&bv?"A":"B"}function m(b,v,y,w,C,N){let E=b,j=v,z="";for(;E!==y||j!==w;)E+=C?1:-1,C&&E>N.cols-1?(z+=N.buffer.translateBufferLineToString(j,!1,b,E),E=0,b=0,j++):!C&&E<0&&(z+=N.buffer.translateBufferLineToString(j,!1,0,b+1),E=N.cols-1,b=E,j--);return z+N.buffer.translateBufferLineToString(j,!1,b,E)}function x(b,v){const y=v?"O":"[";return u.C0.ESC+y+b}function S(b,v){b=Math.floor(b);let y="";for(let w=0;w0?I-f(I,F):R;const Y=I,V=(function(Z,te,P,L,$,H){let G;return G=_(P,L,$,H).length>0?L-f(L,$):te,Z=P&&Gb?"D":"C",S(Math.abs(C-b),x(E,w));E=N>v?"D":"C";const j=Math.abs(N-v);return S((function(z,R){return R.cols-z})(N>v?b:C,y)+(j-1)*y.cols+1+((N>v?C:b)-1),x(E,w))}},1296:function(o,a,l){var u=this&&this.__decorate||function(U,q,Y,V){var Z,te=arguments.length,P=te<3?q:V===null?V=Object.getOwnPropertyDescriptor(q,Y):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(U,q,Y,V);else for(var L=U.length-1;L>=0;L--)(Z=U[L])&&(P=(te<3?Z(P):te>3?Z(q,Y,P):Z(q,Y))||P);return te>3&&P&&Object.defineProperty(q,Y,P),P},_=this&&this.__param||function(U,q){return function(Y,V){q(Y,V,U)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const f=l(3787),p=l(2550),m=l(2223),x=l(6171),S=l(6052),b=l(4725),v=l(8055),y=l(8460),w=l(844),C=l(2585),N="xterm-dom-renderer-owner-",E="xterm-rows",j="xterm-fg-",z="xterm-bg-",R="xterm-focus",O="xterm-selection";let I=1,F=a.DomRenderer=class extends w.Disposable{constructor(U,q,Y,V,Z,te,P,L,$,H,G,ne,oe){super(),this._terminal=U,this._document=q,this._element=Y,this._screenElement=V,this._viewportElement=Z,this._helperContainer=te,this._linkifier2=P,this._charSizeService=$,this._optionsService=H,this._bufferService=G,this._coreBrowserService=ne,this._themeService=oe,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,S.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new y.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,x.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((le=>this._injectCss(le)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((le=>this._handleLinkHover(le)))),this.register(this._linkifier2.onHideLinkUnderline((le=>this._handleLinkLeave(le)))),this.register((0,w.toDisposable)((()=>{this._element.classList.remove(N+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const U=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*U,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*U),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/U),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/U),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const Y of this._rowElements)Y.style.width=`${this.dimensions.css.canvas.width}px`,Y.style.height=`${this.dimensions.css.cell.height}px`,Y.style.lineHeight=`${this.dimensions.css.cell.height}px`,Y.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const q=`${this._terminalSelector} .${E} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=q,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(U){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let q=`${this._terminalSelector} .${E} { color: ${U.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;q+=`${this._terminalSelector} .${E} .xterm-dim { color: ${v.color.multiplyOpacity(U.foreground,.5).css};}`,q+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const Y=`blink_underline_${this._terminalClass}`,V=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;q+=`@keyframes ${Y} { 50% { border-bottom-style: hidden; }}`,q+=`@keyframes ${V} { 50% { box-shadow: none; }}`,q+=`@keyframes ${Z} { 0% { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css}; } 50% { background-color: inherit; color: ${U.cursor.css}; }}`,q+=`${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${E}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${U.cursor.css} !important; color: ${U.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${U.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${U.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${U.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,q+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${U.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${U.selectionInactiveBackgroundOpaque.css};}`;for(const[te,P]of U.ansi.entries())q+=`${this._terminalSelector} .${j}${te} { color: ${P.css}; }${this._terminalSelector} .${j}${te}.xterm-dim { color: ${v.color.multiplyOpacity(P,.5).css}; }${this._terminalSelector} .${z}${te} { background-color: ${P.css}; }`;q+=`${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR} { color: ${v.color.opaque(U.background).css}; }${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${v.color.multiplyOpacity(v.color.opaque(U.background),.5).css}; }${this._terminalSelector} .${z}${m.INVERTED_DEFAULT_COLOR} { background-color: ${U.foreground.css}; }`,this._themeStyleElement.textContent=q}_setDefaultSpacing(){const U=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${U}px`,this._rowFactory.defaultSpacing=U}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(U,q){for(let Y=this._rowElements.length;Y<=q;Y++){const V=this._document.createElement("div");this._rowContainer.appendChild(V),this._rowElements.push(V)}for(;this._rowElements.length>q;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(U,q){this._refreshRowElements(U,q),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(U,q,Y){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(U,q,Y),this.renderRows(0,this._bufferService.rows-1),!U||!q)return;this._selectionRenderModel.update(this._terminal,U,q,Y);const V=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,te=this._selectionRenderModel.viewportCappedStartRow,P=this._selectionRenderModel.viewportCappedEndRow;if(te>=this._bufferService.rows||P<0)return;const L=this._document.createDocumentFragment();if(Y){const $=U[0]>q[0];L.appendChild(this._createSelectionElement(te,$?q[0]:U[0],$?U[0]:q[0],P-te+1))}else{const $=V===te?U[0]:0,H=te===Z?q[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(te,$,H));const G=P-te-1;if(L.appendChild(this._createSelectionElement(te+1,0,this._bufferService.cols,G)),te!==P){const ne=Z===P?q[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(P,0,ne))}}this._selectionContainer.appendChild(L)}_createSelectionElement(U,q,Y,V=1){const Z=this._document.createElement("div"),te=q*this.dimensions.css.cell.width;let P=this.dimensions.css.cell.width*(Y-q);return te+P>this.dimensions.css.canvas.width&&(P=this.dimensions.css.canvas.width-te),Z.style.height=V*this.dimensions.css.cell.height+"px",Z.style.top=U*this.dimensions.css.cell.height+"px",Z.style.left=`${te}px`,Z.style.width=`${P}px`,Z}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const U of this._rowElements)U.replaceChildren()}renderRows(U,q){const Y=this._bufferService.buffer,V=Y.ybase+Y.y,Z=Math.min(Y.x,this._bufferService.cols-1),te=this._optionsService.rawOptions.cursorBlink,P=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let $=U;$<=q;$++){const H=$+Y.ydisp,G=this._rowElements[$],ne=Y.lines.get(H);if(!G||!ne)break;G.replaceChildren(...this._rowFactory.createRow(ne,H,H===V,P,L,Z,te,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!0)}_handleLinkLeave(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!1)}_setCellUnderline(U,q,Y,V,Z,te){Y<0&&(U=0),V<0&&(q=0);const P=this._bufferService.rows-1;Y=Math.max(Math.min(Y,P),0),V=Math.max(Math.min(V,P),0),Z=Math.min(Z,this._bufferService.cols);const L=this._bufferService.buffer,$=L.ybase+L.y,H=Math.min(L.x,Z-1),G=this._optionsService.rawOptions.cursorBlink,ne=this._optionsService.rawOptions.cursorStyle,oe=this._optionsService.rawOptions.cursorInactiveStyle;for(let le=Y;le<=V;++le){const se=le+L.ydisp,Q=this._rowElements[le],ce=L.lines.get(se);if(!Q||!ce)break;Q.replaceChildren(...this._rowFactory.createRow(ce,se,se===$,ne,oe,H,G,this.dimensions.css.cell.width,this._widthCache,te?le===Y?U:0:-1,te?(le===V?q:Z)-1:-1))}}};a.DomRenderer=F=u([_(7,C.IInstantiationService),_(8,b.ICharSizeService),_(9,C.IOptionsService),_(10,C.IBufferService),_(11,b.ICoreBrowserService),_(12,b.IThemeService)],F)},3787:function(o,a,l){var u=this&&this.__decorate||function(E,j,z,R){var O,I=arguments.length,F=I<3?j:R===null?R=Object.getOwnPropertyDescriptor(j,z):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(E,j,z,R);else for(var U=E.length-1;U>=0;U--)(O=E[U])&&(F=(I<3?O(F):I>3?O(j,z,F):O(j,z))||F);return I>3&&F&&Object.defineProperty(j,z,F),F},_=this&&this.__param||function(E,j){return function(z,R){j(z,R,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const f=l(2223),p=l(643),m=l(511),x=l(2585),S=l(8055),b=l(4725),v=l(4269),y=l(6171),w=l(3734);let C=a.DomRendererRowFactory=class{constructor(E,j,z,R,O,I,F){this._document=E,this._characterJoinerService=j,this._optionsService=z,this._coreBrowserService=R,this._coreService=O,this._decorationService=I,this._themeService=F,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,j,z){this._selectionStart=E,this._selectionEnd=j,this._columnSelectMode=z}createRow(E,j,z,R,O,I,F,U,q,Y,V){const Z=[],te=this._characterJoinerService.getJoinedCharacters(j),P=this._themeService.colors;let L,$=E.getNoBgTrimmedLength();z&&$0&&ye===te[0][0]){Ve=!0;const Pe=te.shift();$e=new v.JoinedCellData(this._workCell,E.translateToString(!0,Pe[0],Pe[1]),Pe[1]-Pe[0]),Ge=Pe[1]-1,Ae=$e.getWidth()}const ut=this._isCellInSelection(ye,j),pt=z&&ye===I,Ut=de&&ye>=Y&&ye<=V;let It=!1;this._decorationService.forEachDecorationAtCell(ye,j,void 0,(Pe=>{It=!0}));let $t=$e.getChars()||p.WHITESPACE_CELL_CHAR;if($t===" "&&($e.isUnderline()||$e.isOverline())&&($t=" "),ee=Ae*U-q.get($t,$e.isBold(),$e.isItalic()),L){if(H&&(ut&&ce||!ut&&!ce&&$e.bg===ne)&&(ut&&ce&&P.selectionForeground||$e.fg===oe)&&$e.extended.ext===le&&Ut===se&&ee===Q&&!pt&&!Ve&&!It){$e.isInvisible()?G+=p.WHITESPACE_CELL_CHAR:G+=$t,H++;continue}H&&(L.textContent=G),L=this._document.createElement("span"),H=0,G=""}else L=this._document.createElement("span");if(ne=$e.bg,oe=$e.fg,le=$e.extended.ext,se=Ut,Q=ee,ce=ut,Ve&&I>=ye&&I<=Ge&&(I=ye),!this._coreService.isCursorHidden&&pt&&this._coreService.isCursorInitialized){if(ue.push("xterm-cursor"),this._coreBrowserService.isFocused)F&&ue.push("xterm-cursor-blink"),ue.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":ue.push("xterm-cursor-outline");break;case"block":ue.push("xterm-cursor-block");break;case"bar":ue.push("xterm-cursor-bar");break;case"underline":ue.push("xterm-cursor-underline")}}if($e.isBold()&&ue.push("xterm-bold"),$e.isItalic()&&ue.push("xterm-italic"),$e.isDim()&&ue.push("xterm-dim"),G=$e.isInvisible()?p.WHITESPACE_CELL_CHAR:$e.getChars()||p.WHITESPACE_CELL_CHAR,$e.isUnderline()&&(ue.push(`xterm-underline-${$e.extended.underlineStyle}`),G===" "&&(G=" "),!$e.isUnderlineColorDefault()))if($e.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${w.AttributeData.toColorRGB($e.getUnderlineColor()).join(",")})`;else{let Pe=$e.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&$e.isBold()&&Pe<8&&(Pe+=8),L.style.textDecorationColor=P.ansi[Pe].css}$e.isOverline()&&(ue.push("xterm-overline"),G===" "&&(G=" ")),$e.isStrikethrough()&&ue.push("xterm-strikethrough"),Ut&&(L.style.textDecoration="underline");let tt=$e.getFgColor(),mt=$e.getFgColorMode(),At=$e.getBgColor(),ke=$e.getBgColorMode();const De=!!$e.isInverse();if(De){const Pe=tt;tt=At,At=Pe;const Dt=mt;mt=ke,ke=Dt}let We,rt,bt,Wt=!1;switch(this._decorationService.forEachDecorationAtCell(ye,j,void 0,(Pe=>{Pe.options.layer!=="top"&&Wt||(Pe.backgroundColorRGB&&(ke=50331648,At=Pe.backgroundColorRGB.rgba>>8&16777215,We=Pe.backgroundColorRGB),Pe.foregroundColorRGB&&(mt=50331648,tt=Pe.foregroundColorRGB.rgba>>8&16777215,rt=Pe.foregroundColorRGB),Wt=Pe.options.layer==="top")})),!Wt&&ut&&(We=this._coreBrowserService.isFocused?P.selectionBackgroundOpaque:P.selectionInactiveBackgroundOpaque,At=We.rgba>>8&16777215,ke=50331648,Wt=!0,P.selectionForeground&&(mt=50331648,tt=P.selectionForeground.rgba>>8&16777215,rt=P.selectionForeground)),Wt&&ue.push("xterm-decoration-top"),ke){case 16777216:case 33554432:bt=P.ansi[At],ue.push(`xterm-bg-${At}`);break;case 50331648:bt=S.channels.toColor(At>>16,At>>8&255,255&At),this._addStyle(L,`background-color:#${N((At>>>0).toString(16),"0",6)}`);break;default:De?(bt=P.foreground,ue.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):bt=P.background}switch(We||$e.isDim()&&(We=S.color.multiplyOpacity(bt,.5)),mt){case 16777216:case 33554432:$e.isBold()&&tt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(tt+=8),this._applyMinimumContrast(L,bt,P.ansi[tt],$e,We,void 0)||ue.push(`xterm-fg-${tt}`);break;case 50331648:const Pe=S.channels.toColor(tt>>16&255,tt>>8&255,255&tt);this._applyMinimumContrast(L,bt,Pe,$e,We,rt)||this._addStyle(L,`color:#${N(tt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,bt,P.foreground,$e,We,rt)||De&&ue.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}ue.length&&(L.className=ue.join(" "),ue.length=0),pt||Ve||It?L.textContent=G:H++,ee!==this.defaultSpacing&&(L.style.letterSpacing=`${ee}px`),Z.push(L),ye=Ge}return L&&H&&(L.textContent=G),Z}_applyMinimumContrast(E,j,z,R,O,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,y.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const F=this._getContrastCache(R);let U;if(O||I||(U=F.getColor(j.rgba,z.rgba)),U===void 0){const q=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);U=S.color.ensureContrastRatio(O||j,I||z,q),F.setColor((O||j).rgba,(I||z).rgba,U??null)}return!!U&&(this._addStyle(E,`color:${U.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,j){E.setAttribute("style",`${E.getAttribute("style")||""}${j};`)}_isCellInSelection(E,j){const z=this._selectionStart,R=this._selectionEnd;return!(!z||!R)&&(this._columnSelectMode?z[0]<=R[0]?E>=z[0]&&j>=z[1]&&E=z[1]&&E>=R[0]&&j<=R[1]:j>z[1]&&j=z[0]&&E=z[0])}};function N(E,j,z){for(;E.length{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(l,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=l.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const _=l.createElement("span");_.classList.add("xterm-char-measure-element");const f=l.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const p=l.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=l.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[_,f,p,m],this._container.appendChild(_),this._container.appendChild(f),this._container.appendChild(p),this._container.appendChild(m),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(l,u,_,f){l===this._font&&u===this._fontSize&&_===this._weight&&f===this._weightBold||(this._font=l,this._fontSize=u,this._weight=_,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(l,u,_){let f=0;if(!u&&!_&&l.length===1&&(f=l.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const x=this._measure(l,0);return x>0&&(this._flat[f]=x),x}let p=l;u&&(p+="B"),_&&(p+="I");let m=this._holey.get(p);if(m===void 0){let x=0;u&&(x|=1),_&&(x|=2),m=this._measure(l,x),m>0&&this._holey.set(p,m)}return m}_measure(l,u){const _=this._measureElements[u];return _.textContent=l.repeat(32),_.offsetWidth/32}}},2223:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const u=l(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(o,a)=>{function l(_){return 57508<=_&&_<=57558}function u(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},a.isPowerlineGlyph=l,a.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},a.isEmoji=u,a.allowRescaling=function(_,f,p,m){return f===1&&p>Math.ceil(1.5*m)&&_!==void 0&&_>255&&!u(_)&&!l(_)&&!(function(x){return 57344<=x&&x<=63743})(_)},a.treatGlyphAsBackgroundColor=function(_){return l(_)||(function(f){return 9472<=f&&f<=9631})(_)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(_,f,p=0){return(_-(2*Math.round(f)-p))%(2*Math.round(f))}},6052:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class l{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(_,f,p,m=!1){if(this.selectionStart=f,this.selectionEnd=p,!f||!p||f[0]===p[0]&&f[1]===p[1])return void this.clear();const x=_.buffers.active.ydisp,S=f[1]-x,b=p[1]-x,v=Math.max(S,0),y=Math.min(b,_.rows-1);v>=_.rows||y<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=S,this.viewportEndRow=b,this.viewportCappedStartRow=v,this.viewportCappedEndRow=y,this.startCol=f[0],this.endCol=p[0])}isCellSelected(_,f,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&p>=this.viewportCappedStartRow&&f=this.viewportCappedStartRow&&f>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&f=this.startCol)}}a.createSelectionRenderModel=function(){return new l}},456:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(l){this._bufferService=l,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[Math.max(l,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const l=this.selectionStart,u=this.selectionEnd;return!(!l||!u)&&(l[1]>u[1]||l[1]===u[1]&&l[0]>u[0])}handleTrim(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(o,a,l){var u=this&&this.__decorate||function(y,w,C,N){var E,j=arguments.length,z=j<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,w,C,N);else for(var R=y.length-1;R>=0;R--)(E=y[R])&&(z=(j<3?E(z):j>3?E(w,C,z):E(w,C))||z);return j>3&&z&&Object.defineProperty(w,C,z),z},_=this&&this.__param||function(y,w){return function(C,N){w(C,N,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const f=l(2585),p=l(8460),m=l(844);let x=a.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(y,w,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new v(this._optionsService))}catch{this._measureStrategy=this.register(new b(y,w,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const y=this._measureStrategy.measure();y.width===this.width&&y.height===this.height||(this.width=y.width,this.height=y.height,this._onCharSizeChange.fire())}};a.CharSizeService=x=u([_(2,f.IOptionsService)],x);class S extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(w,C){w!==void 0&&w>0&&C!==void 0&&C>0&&(this._result.width=w,this._result.height=C)}}class b extends S{constructor(w,C,N){super(),this._document=w,this._parentElement=C,this._optionsService=N,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class v extends S{constructor(w){super(),this._optionsService=w,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const C=this._ctx.measureText("W");if(!("width"in C&&"fontBoundingBoxAscent"in C&&"fontBoundingBoxDescent"in C))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const w=this._ctx.measureText("W");return this._validateAndSet(w.width,w.fontBoundingBoxAscent+w.fontBoundingBoxDescent),this._result}}},4269:function(o,a,l){var u=this&&this.__decorate||function(v,y,w,C){var N,E=arguments.length,j=E<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,y,w,C);else for(var z=v.length-1;z>=0;z--)(N=v[z])&&(j=(E<3?N(j):E>3?N(y,w,j):N(y,w))||j);return E>3&&j&&Object.defineProperty(y,w,j),j},_=this&&this.__param||function(v,y){return function(w,C){y(w,C,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const f=l(3734),p=l(643),m=l(511),x=l(2585);class S extends f.AttributeData{constructor(y,w,C){super(),this.content=0,this.combinedData="",this.fg=y.fg,this.bg=y.bg,this.combinedData=w,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(y){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=S;let b=a.CharacterJoinerService=class KL{constructor(y){this._bufferService=y,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(y){const w={id:this._nextCharacterJoinerId++,handler:y};return this._characterJoiners.push(w),w.id}deregister(y){for(let w=0;w1){const F=this._getJoinedRanges(N,z,j,w,E);for(let U=0;U1){const I=this._getJoinedRanges(N,z,j,w,E);for(let F=0;F{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const u=l(844),_=l(8460),f=l(3656);class p extends u.Disposable{constructor(S,b,v){super(),this._textarea=S,this._window=b,this.mainDocument=v,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((y=>this._screenDprMonitor.setWindow(y)))),this.register((0,_.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(S){this._window!==S&&(this._window=S,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=p;class m extends u.Disposable{constructor(S){super(),this._parentWindow=S,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(S){this._parentWindow=S,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var S;this._outerListener&&((S=this._resolutionMediaMatchList)==null||S.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const u=l(844);class _ extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const m=this.linkProviders.indexOf(p);m!==-1&&this.linkProviders.splice(m,1)}}}}a.LinkProviderService=_},8934:function(o,a,l){var u=this&&this.__decorate||function(x,S,b,v){var y,w=arguments.length,C=w<3?S:v===null?v=Object.getOwnPropertyDescriptor(S,b):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(x,S,b,v);else for(var N=x.length-1;N>=0;N--)(y=x[N])&&(C=(w<3?y(C):w>3?y(S,b,C):y(S,b))||C);return w>3&&C&&Object.defineProperty(S,b,C),C},_=this&&this.__param||function(x,S){return function(b,v){S(b,v,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const f=l(4725),p=l(9806);let m=a.MouseService=class{constructor(x,S){this._renderService=x,this._charSizeService=S}getCoords(x,S,b,v,y){return(0,p.getCoords)(window,x,S,b,v,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,y)}getMouseReportCoords(x,S){const b=(0,p.getCoordsRelativeToElement)(window,x,S);if(this._charSizeService.hasValidSize)return b[0]=Math.min(Math.max(b[0],0),this._renderService.dimensions.css.canvas.width-1),b[1]=Math.min(Math.max(b[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(b[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(b[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(b[0]),y:Math.floor(b[1])}}};a.MouseService=m=u([_(0,f.IRenderService),_(1,f.ICharSizeService)],m)},3230:function(o,a,l){var u=this&&this.__decorate||function(y,w,C,N){var E,j=arguments.length,z=j<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,w,C,N);else for(var R=y.length-1;R>=0;R--)(E=y[R])&&(z=(j<3?E(z):j>3?E(w,C,z):E(w,C))||z);return j>3&&z&&Object.defineProperty(w,C,z),z},_=this&&this.__param||function(y,w){return function(C,N){w(C,N,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const f=l(6193),p=l(4725),m=l(8460),x=l(844),S=l(7226),b=l(2585);let v=a.RenderService=class extends x.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(y,w,C,N,E,j,z,R){super(),this._rowCount=y,this._charSizeService=N,this._renderer=this.register(new x.MutableDisposable),this._pausedResizeTask=new S.DebouncedIdleTask,this._observerDisposable=this.register(new x.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((O,I)=>this._renderRows(O,I)),z),this.register(this._renderDebouncer),this.register(z.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(j.onResize((()=>this._fullRefresh()))),this.register(j.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(E.onDecorationRegistered((()=>this._fullRefresh()))),this.register(E.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(j.cols,j.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(j.buffer.y,j.buffer.y,!0)))),this.register(R.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(z.window,w),this.register(z.onWindowChange((O=>this._registerIntersectionObserver(O,w))))}_registerIntersectionObserver(y,w){if("IntersectionObserver"in y){const C=new y.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(w),this._observerDisposable.value=(0,x.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(y){this._isPaused=y.isIntersecting===void 0?y.intersectionRatio===0:!y.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(y,w,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(y,w,this._rowCount))}_renderRows(y,w){this._renderer.value&&(y=Math.min(y,this._rowCount-1),w=Math.min(w,this._rowCount-1),this._renderer.value.renderRows(y,w),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:y,end:w}),this._onRender.fire({start:y,end:w}),this._isNextRenderRedrawOnly=!0)}resize(y,w){this._rowCount=w,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(y){this._renderer.value=y,this._renderer.value&&(this._renderer.value.onRequestRedraw((w=>this.refreshRows(w.start,w.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(y){return this._renderDebouncer.addRefreshCallback(y)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var y,w;this._renderer.value&&((w=(y=this._renderer.value).clearTextureAtlas)==null||w.call(y),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(y,w){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(y,w)})):this._renderer.value.handleResize(y,w),this._fullRefresh())}handleCharSizeChanged(){var y;(y=this._renderer.value)==null||y.handleCharSizeChanged()}handleBlur(){var y;(y=this._renderer.value)==null||y.handleBlur()}handleFocus(){var y;(y=this._renderer.value)==null||y.handleFocus()}handleSelectionChanged(y,w,C){var N;this._selectionState.start=y,this._selectionState.end=w,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(y,w,C)}handleCursorMove(){var y;(y=this._renderer.value)==null||y.handleCursorMove()}clear(){var y;(y=this._renderer.value)==null||y.clear()}};a.RenderService=v=u([_(2,b.IOptionsService),_(3,p.ICharSizeService),_(4,b.IDecorationService),_(5,b.IBufferService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],v)},9312:function(o,a,l){var u=this&&this.__decorate||function(z,R,O,I){var F,U=arguments.length,q=U<3?R:I===null?I=Object.getOwnPropertyDescriptor(R,O):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(z,R,O,I);else for(var Y=z.length-1;Y>=0;Y--)(F=z[Y])&&(q=(U<3?F(q):U>3?F(R,O,q):F(R,O))||q);return U>3&&q&&Object.defineProperty(R,O,q),q},_=this&&this.__param||function(z,R){return function(O,I){R(O,I,z)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const f=l(9806),p=l(9504),m=l(456),x=l(4725),S=l(8460),b=l(844),v=l(6114),y=l(4841),w=l(511),C=l(2585),N=" ",E=new RegExp(N,"g");let j=a.SelectionService=class extends b.Disposable{constructor(z,R,O,I,F,U,q,Y,V){super(),this._element=z,this._screenElement=R,this._linkifier=O,this._bufferService=I,this._coreService=F,this._mouseService=U,this._optionsService=q,this._renderService=Y,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new w.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new S.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new S.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new S.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=Z=>this._handleMouseMove(Z),this._mouseUpListener=Z=>this._handleMouseUp(Z),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((Z=>this._handleTrim(Z))),this.register(this._bufferService.buffers.onBufferActivate((Z=>this._handleBufferActivate(Z)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,b.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const z=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!z||!R||z[0]===R[0]&&z[1]===R[1])}get selectionText(){const z=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!z||!R)return"";const O=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(z[0]===R[0])return"";const F=z[0]F.replace(E," "))).join(v.isWindows?`\r -`:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(z){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),v.isLinux&&z&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(z){const R=this._getMouseBufferCoords(z),O=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(O&&I&&R)&&this._areCoordsInSelection(R,O,I)}isCellInSelection(z,R){const O=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!O||!I)&&this._areCoordsInSelection([z,R],O,I)}_areCoordsInSelection(z,R,O){return z[1]>R[1]&&z[1]=R[0]&&z[0]=R[0]}_selectWordAtCursor(z,R){var F,U;const O=(U=(F=this._linkifier.currentLink)==null?void 0:F.link)==null?void 0:U.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(z);return!!I&&(this._selectWordAt(I,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(z,R){this._model.clearSelection(),z=Math.max(z,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,z],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(z){this._model.handleTrim(z)&&this.refresh()}_getMouseBufferCoords(z){const R=this._mouseService.getCoords(z,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(z){let R=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,z,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=O?0:(R>O&&(R-=O),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(z){return v.isMac?z.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:z.shiftKey}handleMouseDown(z){if(this._mouseDownTimeStamp=z.timeStamp,(z.button!==2||!this.hasSelection)&&z.button===0){if(!this._enabled){if(!this.shouldForceSelection(z))return;z.stopPropagation()}z.preventDefault(),this._dragScrollAmount=0,this._enabled&&z.shiftKey?this._handleIncrementalClick(z):z.detail===1?this._handleSingleClick(z):z.detail===2?this._handleDoubleClick(z):z.detail===3&&this._handleTripleClick(z),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(z){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(z))}_handleSingleClick(z){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(z)?3:0,this._model.selectionStart=this._getMouseBufferCoords(z),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(z){this._selectWordAtCursor(z,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(z){const R=this._getMouseBufferCoords(z);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(z){return z.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(z){if(z.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(z),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const O=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(z.ydisp+this._bufferService.rows,z.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=z.ydisp),this.refresh()}}_handleMouseUp(z){const R=z.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&z.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(z,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const I=(0,p.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const z=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,O=!(!z||!R||z[0]===R[0]&&z[1]===R[1]);O?z&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&z[0]===this._oldSelectionStart[0]&&z[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(z,R,O)):this._oldHasSelection&&this._fireOnSelectionChange(z,R,O)}_fireOnSelectionChange(z,R,O){this._oldSelectionStart=z,this._oldSelectionEnd=R,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(z){this.clearSelection(),this._trimListener.dispose(),this._trimListener=z.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(z,R){let O=R;for(let I=0;R>=I;I++){const F=z.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:F>1&&R!==I&&(O+=F-1)}return O}setSelection(z,R,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[z,R],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(z){this._isClickInSelection(z)||(this._selectWordAtCursor(z,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(z,R,O=!0,I=!0){if(z[0]>=this._bufferService.cols)return;const F=this._bufferService.buffer,U=F.lines.get(z[1]);if(!U)return;const q=F.translateBufferLineToString(z[1],!1);let Y=this._convertViewportColToCharacterIndex(U,z[0]),V=Y;const Z=z[0]-Y;let te=0,P=0,L=0,$=0;if(q.charAt(Y)===" "){for(;Y>0&&q.charAt(Y-1)===" ";)Y--;for(;V1&&($+=le-1,V+=le-1);ne>0&&Y>0&&!this._isCharWordSeparator(U.loadCell(ne-1,this._workCell));){U.loadCell(ne-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(te++,ne--):se>1&&(L+=se-1,Y-=se-1),Y--,ne--}for(;oe1&&($+=se-1,V+=se-1),V++,oe++}}V++;let H=Y+Z-te+L,G=Math.min(this._bufferService.cols,V-Y+te+P-L-$);if(R||q.slice(Y,V).trim()!==""){if(O&&H===0&&U.getCodePoint(0)!==32){const ne=F.lines.get(z[1]-1);if(ne&&U.isWrapped&&ne.getCodePoint(this._bufferService.cols-1)!==32){const oe=this._getWordAt([this._bufferService.cols-1,z[1]-1],!1,!0,!1);if(oe){const le=this._bufferService.cols-oe.start;H-=le,G+=le}}}if(I&&H+G===this._bufferService.cols&&U.getCodePoint(this._bufferService.cols-1)!==32){const ne=F.lines.get(z[1]+1);if(ne!=null&&ne.isWrapped&&ne.getCodePoint(0)!==32){const oe=this._getWordAt([0,z[1]+1],!1,!1,!0);oe&&(G+=oe.length)}}return{start:H,length:G}}}_selectWordAt(z,R){const O=this._getWordAt(z,R);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,z[1]--;this._model.selectionStart=[O.start,z[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(z){const R=this._getWordAt(z,!0);if(R){let O=z[1];for(;R.start<0;)R.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,O]}}_isCharWordSeparator(z){return z.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(z.getChars())>=0}_selectLineAt(z){const R=this._bufferService.buffer.getWrappedRangeForLine(z),O={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,y.getRangeLength)(O,this._bufferService.cols)}};a.SelectionService=j=u([_(3,C.IBufferService),_(4,C.ICoreService),_(5,x.IMouseService),_(6,C.IOptionsService),_(7,x.IRenderService),_(8,x.ICoreBrowserService)],j)},4725:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const u=l(8343);a.ICharSizeService=(0,u.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),a.IMouseService=(0,u.createDecorator)("MouseService"),a.IRenderService=(0,u.createDecorator)("RenderService"),a.ISelectionService=(0,u.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,u.createDecorator)("ThemeService"),a.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(o,a,l){var u=this&&this.__decorate||function(j,z,R,O){var I,F=arguments.length,U=F<3?z:O===null?O=Object.getOwnPropertyDescriptor(z,R):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(j,z,R,O);else for(var q=j.length-1;q>=0;q--)(I=j[q])&&(U=(F<3?I(U):F>3?I(z,R,U):I(z,R))||U);return F>3&&U&&Object.defineProperty(z,R,U),U},_=this&&this.__param||function(j,z){return function(R,O){z(R,O,j)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const f=l(7239),p=l(8055),m=l(8460),x=l(844),S=l(2585),b=p.css.toColor("#ffffff"),v=p.css.toColor("#000000"),y=p.css.toColor("#ffffff"),w=p.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const j=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],z=[0,95,135,175,215,255];for(let R=0;R<216;R++){const O=z[R/36%6|0],I=z[R/6%6|0],F=z[R%6];j.push({css:p.channels.toCss(O,I,F),rgba:p.channels.toRgba(O,I,F)})}for(let R=0;R<24;R++){const O=8+10*R;j.push({css:p.channels.toCss(O,O,O),rgba:p.channels.toRgba(O,O,O)})}return j})());let N=a.ThemeService=class extends x.Disposable{get colors(){return this._colors}constructor(j){super(),this._optionsService=j,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:b,background:v,cursor:y,cursorAccent:w,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(v,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(v,C),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(j={}){const z=this._colors;if(z.foreground=E(j.foreground,b),z.background=E(j.background,v),z.cursor=E(j.cursor,y),z.cursorAccent=E(j.cursorAccent,w),z.selectionBackgroundTransparent=E(j.selectionBackground,C),z.selectionBackgroundOpaque=p.color.blend(z.background,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundTransparent=E(j.selectionInactiveBackground,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundOpaque=p.color.blend(z.background,z.selectionInactiveBackgroundTransparent),z.selectionForeground=j.selectionForeground?E(j.selectionForeground,p.NULL_COLOR):void 0,z.selectionForeground===p.NULL_COLOR&&(z.selectionForeground=void 0),p.color.isOpaque(z.selectionBackgroundTransparent)&&(z.selectionBackgroundTransparent=p.color.opacity(z.selectionBackgroundTransparent,.3)),p.color.isOpaque(z.selectionInactiveBackgroundTransparent)&&(z.selectionInactiveBackgroundTransparent=p.color.opacity(z.selectionInactiveBackgroundTransparent,.3)),z.ansi=a.DEFAULT_ANSI_COLORS.slice(),z.ansi[0]=E(j.black,a.DEFAULT_ANSI_COLORS[0]),z.ansi[1]=E(j.red,a.DEFAULT_ANSI_COLORS[1]),z.ansi[2]=E(j.green,a.DEFAULT_ANSI_COLORS[2]),z.ansi[3]=E(j.yellow,a.DEFAULT_ANSI_COLORS[3]),z.ansi[4]=E(j.blue,a.DEFAULT_ANSI_COLORS[4]),z.ansi[5]=E(j.magenta,a.DEFAULT_ANSI_COLORS[5]),z.ansi[6]=E(j.cyan,a.DEFAULT_ANSI_COLORS[6]),z.ansi[7]=E(j.white,a.DEFAULT_ANSI_COLORS[7]),z.ansi[8]=E(j.brightBlack,a.DEFAULT_ANSI_COLORS[8]),z.ansi[9]=E(j.brightRed,a.DEFAULT_ANSI_COLORS[9]),z.ansi[10]=E(j.brightGreen,a.DEFAULT_ANSI_COLORS[10]),z.ansi[11]=E(j.brightYellow,a.DEFAULT_ANSI_COLORS[11]),z.ansi[12]=E(j.brightBlue,a.DEFAULT_ANSI_COLORS[12]),z.ansi[13]=E(j.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),z.ansi[14]=E(j.brightCyan,a.DEFAULT_ANSI_COLORS[14]),z.ansi[15]=E(j.brightWhite,a.DEFAULT_ANSI_COLORS[15]),j.extendedAnsi){const R=Math.min(z.ansi.length-16,j.extendedAnsi.length);for(let O=0;O{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const u=l(8460),_=l(844);class f extends _.Disposable{constructor(m){super(),this._maxLength=m,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(m){if(this._maxLength===m)return;const x=new Array(m);for(let S=0;Sthis._length)for(let x=this._length;x=m;b--)this._array[this._getCyclicIndex(b+S.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;bthis._maxLength){const b=this._length+S.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=S.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,x,S){if(!(x<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+S<0)throw new Error("Cannot shift elements in list beyond index 0");if(S>0){for(let v=x-1;v>=0;v--)this.set(m+v+S,this.get(m+v));const b=m+x+S-this._length;if(b>0)for(this._length+=b;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let b=0;b{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function l(u,_=5){if(typeof u!="object")return u;const f=Array.isArray(u)?[]:{};for(const p in u)f[p]=_<=1?u[p]:u[p]&&l(u[p],_-1);return f}},8055:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let l=0,u=0,_=0,f=0;var p,m,x,S,b;function v(w){const C=w.toString(16);return C.length<2?"0"+C:C}function y(w,C){return w>>0},w.toColor=function(C,N,E,j){return{css:w.toCss(C,N,E,j),rgba:w.toRgba(C,N,E,j)}}})(p||(a.channels=p={})),(function(w){function C(N,E){return f=Math.round(255*E),[l,u,_]=b.toChannels(N.rgba),{css:p.toCss(l,u,_,f),rgba:p.toRgba(l,u,_,f)}}w.blend=function(N,E){if(f=(255&E.rgba)/255,f===1)return{css:E.css,rgba:E.rgba};const j=E.rgba>>24&255,z=E.rgba>>16&255,R=E.rgba>>8&255,O=N.rgba>>24&255,I=N.rgba>>16&255,F=N.rgba>>8&255;return l=O+Math.round((j-O)*f),u=I+Math.round((z-I)*f),_=F+Math.round((R-F)*f),{css:p.toCss(l,u,_),rgba:p.toRgba(l,u,_)}},w.isOpaque=function(N){return(255&N.rgba)==255},w.ensureContrastRatio=function(N,E,j){const z=b.ensureContrastRatio(N.rgba,E.rgba,j);if(z)return p.toColor(z>>24&255,z>>16&255,z>>8&255)},w.opaque=function(N){const E=(255|N.rgba)>>>0;return[l,u,_]=b.toChannels(E),{css:p.toCss(l,u,_),rgba:E}},w.opacity=C,w.multiplyOpacity=function(N,E){return f=255&N.rgba,C(N,f*E/255)},w.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(a.color=m={})),(function(w){let C,N;try{const E=document.createElement("canvas");E.width=1,E.height=1;const j=E.getContext("2d",{willReadFrequently:!0});j&&(C=j,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}w.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return l=parseInt(E.slice(1,2).repeat(2),16),u=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),p.toColor(l,u,_);case 5:return l=parseInt(E.slice(1,2).repeat(2),16),u=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),f=parseInt(E.slice(4,5).repeat(2),16),p.toColor(l,u,_,f);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const j=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(j)return l=parseInt(j[1]),u=parseInt(j[2]),_=parseInt(j[3]),f=Math.round(255*(j[5]===void 0?1:parseFloat(j[5]))),p.toColor(l,u,_,f);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=E,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[l,u,_,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(l,u,_,f),css:E}}})(x||(a.css=x={})),(function(w){function C(N,E,j){const z=N/255,R=E/255,O=j/255;return .2126*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}w.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},w.relativeLuminance2=C})(S||(a.rgb=S={})),(function(w){function C(E,j,z){const R=E>>24&255,O=E>>16&255,I=E>>8&255;let F=j>>24&255,U=j>>16&255,q=j>>8&255,Y=y(S.relativeLuminance2(F,U,q),S.relativeLuminance2(R,O,I));for(;Y0||U>0||q>0);)F-=Math.max(0,Math.ceil(.1*F)),U-=Math.max(0,Math.ceil(.1*U)),q-=Math.max(0,Math.ceil(.1*q)),Y=y(S.relativeLuminance2(F,U,q),S.relativeLuminance2(R,O,I));return(F<<24|U<<16|q<<8|255)>>>0}function N(E,j,z){const R=E>>24&255,O=E>>16&255,I=E>>8&255;let F=j>>24&255,U=j>>16&255,q=j>>8&255,Y=y(S.relativeLuminance2(F,U,q),S.relativeLuminance2(R,O,I));for(;Y>>0}w.blend=function(E,j){if(f=(255&j)/255,f===1)return j;const z=j>>24&255,R=j>>16&255,O=j>>8&255,I=E>>24&255,F=E>>16&255,U=E>>8&255;return l=I+Math.round((z-I)*f),u=F+Math.round((R-F)*f),_=U+Math.round((O-U)*f),p.toRgba(l,u,_)},w.ensureContrastRatio=function(E,j,z){const R=S.relativeLuminance(E>>8),O=S.relativeLuminance(j>>8);if(y(R,O)>8));if(qy(R,S.relativeLuminance(Y>>8))?U:Y}return U}const I=N(E,j,z),F=y(R,S.relativeLuminance(I>>8));if(Fy(R,S.relativeLuminance(U>>8))?I:U}return I}},w.reduceLuminance=C,w.increaseLuminance=N,w.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}})(b||(a.rgba=b={})),a.toPaddedHex=v,a.contrastRatio=y},8969:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const u=l(844),_=l(2585),f=l(4348),p=l(7866),m=l(744),x=l(7302),S=l(6975),b=l(8460),v=l(1753),y=l(1480),w=l(7994),C=l(9282),N=l(5435),E=l(5981),j=l(2660);let z=!1;class R extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new b.EventEmitter),this._onScroll.event((I=>{var F;(F=this._onScrollApi)==null||F.fire(I.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(I){for(const F in I)this.optionsService.options[F]=I[F]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new b.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new b.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new b.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new x.OptionsService(I)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(S.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(y.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(w.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(j.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new N.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,b.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,b.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,b.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,b.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((F=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((F=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new E.WriteBuffer(((F,U)=>this._inputHandler.parse(F,U)))),this.register((0,b.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,F){this._writeBuffer.write(I,F)}writeSync(I,F){this._logService.logLevel<=_.LogLevelEnum.WARN&&!z&&(this._logService.warn("writeSync is unreliable and will be removed soon."),z=!0),this._writeBuffer.writeSync(I,F)}input(I,F=!0){this.coreService.triggerDataEvent(I,F)}resize(I,F){isNaN(I)||isNaN(F)||(I=Math.max(I,m.MINIMUM_COLS),F=Math.max(F,m.MINIMUM_ROWS),this._bufferService.resize(I,F))}scroll(I,F=!1){this._bufferService.scroll(I,F)}scrollLines(I,F,U){this._bufferService.scrollLines(I,F,U)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const F=I-this._bufferService.buffer.ydisp;F!==0&&this.scrollLines(F)}registerEscHandler(I,F){return this._inputHandler.registerEscHandler(I,F)}registerDcsHandler(I,F){return this._inputHandler.registerDcsHandler(I,F)}registerCsiHandler(I,F){return this._inputHandler.registerCsiHandler(I,F)}registerOscHandler(I,F){return this._inputHandler.registerOscHandler(I,F)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const F=this.optionsService.rawOptions.windowsPty;F&&F.buildNumber!==void 0&&F.buildNumber!==void 0?I=F.backend==="conpty"&&F.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const F of I)F.dispose()}))}}}a.CoreTerminal=R},8460:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(_)))},a.runAndSubscribe=function(l,u){return u(void 0),l((_=>u(_)))}},5435:function(o,a,l){var u=this&&this.__decorate||function(te,P,L,$){var H,G=arguments.length,ne=G<3?P:$===null?$=Object.getOwnPropertyDescriptor(P,L):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(te,P,L,$);else for(var oe=te.length-1;oe>=0;oe--)(H=te[oe])&&(ne=(G<3?H(ne):G>3?H(P,L,ne):H(P,L))||ne);return G>3&&ne&&Object.defineProperty(P,L,ne),ne},_=this&&this.__param||function(te,P){return function(L,$){P(L,$,te)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const f=l(2584),p=l(7116),m=l(2015),x=l(844),S=l(482),b=l(8437),v=l(8460),y=l(643),w=l(511),C=l(3734),N=l(2585),E=l(1480),j=l(6242),z=l(6351),R=l(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function F(te,P){if(te>24)return P.setWinLines||!1;switch(te){case 1:return!!P.restoreWin;case 2:return!!P.minimizeWin;case 3:return!!P.setWinPosition;case 4:return!!P.setWinSizePixels;case 5:return!!P.raiseWin;case 6:return!!P.lowerWin;case 7:return!!P.refreshWin;case 8:return!!P.setWinSizeChars;case 9:return!!P.maximizeWin;case 10:return!!P.fullscreenWin;case 11:return!!P.getWinState;case 13:return!!P.getWinPosition;case 14:return!!P.getWinSizePixels;case 15:return!!P.getScreenSizePixels;case 16:return!!P.getCellSizePixels;case 18:return!!P.getWinSizeChars;case 19:return!!P.getScreenSizeChars;case 20:return!!P.getIconTitle;case 21:return!!P.getWinTitle;case 22:return!!P.pushTitle;case 23:return!!P.popTitle;case 24:return!!P.setWinLines}return!1}var U;(function(te){te[te.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",te[te.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(U||(a.WindowsOptionsReportType=U={}));let q=0;class Y extends x.Disposable{getAttrData(){return this._curAttrData}constructor(P,L,$,H,G,ne,oe,le,se=new m.EscapeSequenceParser){super(),this._bufferService=P,this._charsetService=L,this._coreService=$,this._logService=H,this._optionsService=G,this._oscLinkService=ne,this._coreMouseService=oe,this._unicodeService=le,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new S.StringToUtf32,this._utf8Decoder=new S.Utf8ToUtf32,this._workCell=new w.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new V(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((Q=>this._activeBuffer=Q.activeBuffer))),this._parser.setCsiHandlerFallback(((Q,ce)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(Q),params:ce.toArray()})})),this._parser.setEscHandlerFallback((Q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(Q)})})),this._parser.setExecuteHandlerFallback((Q=>{this._logService.debug("Unknown EXECUTE code: ",{code:Q})})),this._parser.setOscHandlerFallback(((Q,ce,ee)=>{this._logService.debug("Unknown OSC code: ",{identifier:Q,action:ce,data:ee})})),this._parser.setDcsHandlerFallback(((Q,ce,ee)=>{ce==="HOOK"&&(ee=ee.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(Q),action:ce,payload:ee})})),this._parser.setPrintHandler(((Q,ce,ee)=>this.print(Q,ce,ee))),this._parser.registerCsiHandler({final:"@"},(Q=>this.insertChars(Q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(Q=>this.scrollLeft(Q))),this._parser.registerCsiHandler({final:"A"},(Q=>this.cursorUp(Q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(Q=>this.scrollRight(Q))),this._parser.registerCsiHandler({final:"B"},(Q=>this.cursorDown(Q))),this._parser.registerCsiHandler({final:"C"},(Q=>this.cursorForward(Q))),this._parser.registerCsiHandler({final:"D"},(Q=>this.cursorBackward(Q))),this._parser.registerCsiHandler({final:"E"},(Q=>this.cursorNextLine(Q))),this._parser.registerCsiHandler({final:"F"},(Q=>this.cursorPrecedingLine(Q))),this._parser.registerCsiHandler({final:"G"},(Q=>this.cursorCharAbsolute(Q))),this._parser.registerCsiHandler({final:"H"},(Q=>this.cursorPosition(Q))),this._parser.registerCsiHandler({final:"I"},(Q=>this.cursorForwardTab(Q))),this._parser.registerCsiHandler({final:"J"},(Q=>this.eraseInDisplay(Q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(Q=>this.eraseInDisplay(Q,!0))),this._parser.registerCsiHandler({final:"K"},(Q=>this.eraseInLine(Q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(Q=>this.eraseInLine(Q,!0))),this._parser.registerCsiHandler({final:"L"},(Q=>this.insertLines(Q))),this._parser.registerCsiHandler({final:"M"},(Q=>this.deleteLines(Q))),this._parser.registerCsiHandler({final:"P"},(Q=>this.deleteChars(Q))),this._parser.registerCsiHandler({final:"S"},(Q=>this.scrollUp(Q))),this._parser.registerCsiHandler({final:"T"},(Q=>this.scrollDown(Q))),this._parser.registerCsiHandler({final:"X"},(Q=>this.eraseChars(Q))),this._parser.registerCsiHandler({final:"Z"},(Q=>this.cursorBackwardTab(Q))),this._parser.registerCsiHandler({final:"`"},(Q=>this.charPosAbsolute(Q))),this._parser.registerCsiHandler({final:"a"},(Q=>this.hPositionRelative(Q))),this._parser.registerCsiHandler({final:"b"},(Q=>this.repeatPrecedingCharacter(Q))),this._parser.registerCsiHandler({final:"c"},(Q=>this.sendDeviceAttributesPrimary(Q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(Q=>this.sendDeviceAttributesSecondary(Q))),this._parser.registerCsiHandler({final:"d"},(Q=>this.linePosAbsolute(Q))),this._parser.registerCsiHandler({final:"e"},(Q=>this.vPositionRelative(Q))),this._parser.registerCsiHandler({final:"f"},(Q=>this.hVPosition(Q))),this._parser.registerCsiHandler({final:"g"},(Q=>this.tabClear(Q))),this._parser.registerCsiHandler({final:"h"},(Q=>this.setMode(Q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(Q=>this.setModePrivate(Q))),this._parser.registerCsiHandler({final:"l"},(Q=>this.resetMode(Q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(Q=>this.resetModePrivate(Q))),this._parser.registerCsiHandler({final:"m"},(Q=>this.charAttributes(Q))),this._parser.registerCsiHandler({final:"n"},(Q=>this.deviceStatus(Q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(Q=>this.deviceStatusPrivate(Q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(Q=>this.softReset(Q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(Q=>this.setCursorStyle(Q))),this._parser.registerCsiHandler({final:"r"},(Q=>this.setScrollRegion(Q))),this._parser.registerCsiHandler({final:"s"},(Q=>this.saveCursor(Q))),this._parser.registerCsiHandler({final:"t"},(Q=>this.windowOptions(Q))),this._parser.registerCsiHandler({final:"u"},(Q=>this.restoreCursor(Q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(Q=>this.insertColumns(Q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(Q=>this.deleteColumns(Q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(Q=>this.selectProtected(Q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(Q=>this.requestMode(Q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(Q=>this.requestMode(Q,!1))),this._parser.setExecuteHandler(f.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(f.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(f.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(f.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(f.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(f.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(f.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(f.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(f.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new j.OscHandler((Q=>(this.setTitle(Q),this.setIconName(Q),!0)))),this._parser.registerOscHandler(1,new j.OscHandler((Q=>this.setIconName(Q)))),this._parser.registerOscHandler(2,new j.OscHandler((Q=>this.setTitle(Q)))),this._parser.registerOscHandler(4,new j.OscHandler((Q=>this.setOrReportIndexedColor(Q)))),this._parser.registerOscHandler(8,new j.OscHandler((Q=>this.setHyperlink(Q)))),this._parser.registerOscHandler(10,new j.OscHandler((Q=>this.setOrReportFgColor(Q)))),this._parser.registerOscHandler(11,new j.OscHandler((Q=>this.setOrReportBgColor(Q)))),this._parser.registerOscHandler(12,new j.OscHandler((Q=>this.setOrReportCursorColor(Q)))),this._parser.registerOscHandler(104,new j.OscHandler((Q=>this.restoreIndexedColor(Q)))),this._parser.registerOscHandler(110,new j.OscHandler((Q=>this.restoreFgColor(Q)))),this._parser.registerOscHandler(111,new j.OscHandler((Q=>this.restoreBgColor(Q)))),this._parser.registerOscHandler(112,new j.OscHandler((Q=>this.restoreCursorColor(Q)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const Q in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:Q},(()=>this.selectCharset("("+Q))),this._parser.registerEscHandler({intermediates:")",final:Q},(()=>this.selectCharset(")"+Q))),this._parser.registerEscHandler({intermediates:"*",final:Q},(()=>this.selectCharset("*"+Q))),this._parser.registerEscHandler({intermediates:"+",final:Q},(()=>this.selectCharset("+"+Q))),this._parser.registerEscHandler({intermediates:"-",final:Q},(()=>this.selectCharset("-"+Q))),this._parser.registerEscHandler({intermediates:".",final:Q},(()=>this.selectCharset("."+Q))),this._parser.registerEscHandler({intermediates:"/",final:Q},(()=>this.selectCharset("/"+Q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((Q=>(this._logService.error("Parsing error: ",Q),Q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new z.DcsHandler(((Q,ce)=>this.requestStatusString(Q,ce))))}_preserveStack(P,L,$,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=P,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=$,this._parseStack.position=H}_logSlowResolvingAsync(P){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([P,new Promise(((L,$)=>setTimeout((()=>$("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(P,L){let $,H=this._activeBuffer.x,G=this._activeBuffer.y,ne=0;const oe=this._parseStack.paused;if(oe){if($=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync($),$;H=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,P.length>I&&(ne=this._parseStack.position+I)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof P=="string"?` "${P}"`:` "${Array.prototype.map.call(P,(Q=>String.fromCharCode(Q))).join("")}"`),typeof P=="string"?P.split("").map((Q=>Q.charCodeAt(0))):P),this._parseBuffer.lengthI)for(let Q=ne;Q0&&ee.getWidth(this._activeBuffer.x-1)===2&&ee.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ce);let ue=this._parser.precedingJoinState;for(let de=L;de<$;++de){if(H=P[de],H<127&&ne){const Ge=ne[String.fromCharCode(H)];Ge&&(H=Ge.charCodeAt(0))}const ye=this._unicodeService.charProperties(H,ue);G=E.UnicodeService.extractWidth(ye);const Ae=E.UnicodeService.extractShouldJoin(ye),Ve=Ae?E.UnicodeService.extractWidth(ue):0;if(ue=ye,oe&&this._onA11yChar.fire((0,S.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+G-Ve>le){if(se){const Ge=ee;let $e=this._activeBuffer.x-Ve;for(this._activeBuffer.x=Ve,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ve>0&&ee instanceof b.BufferLine&&ee.copyCellsFrom(Ge,$e,0,Ve,!1);$e=0;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}else if(Q&&(ee.insertCells(this._activeBuffer.x,G-Ve,this._activeBuffer.getNullCell(ce)),ee.getWidth(le-1)===2&&ee.setCellFromCodepoint(le-1,y.NULL_CELL_CODE,y.NULL_CELL_WIDTH,ce)),ee.setCellFromCodepoint(this._activeBuffer.x++,H,G,ce),G>0)for(;--G;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}this._parser.precedingJoinState=ue,this._activeBuffer.x0&&ee.getWidth(this._activeBuffer.x)===0&&!ee.hasContent(this._activeBuffer.x)&&ee.setCellFromCodepoint(this._activeBuffer.x,0,1,ce),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(P,L){return P.final!=="t"||P.prefix||P.intermediates?this._parser.registerCsiHandler(P,L):this._parser.registerCsiHandler(P,($=>!F($.params[0],this._optionsService.rawOptions.windowOptions)||L($)))}registerDcsHandler(P,L){return this._parser.registerDcsHandler(P,new z.DcsHandler(L))}registerEscHandler(P,L){return this._parser.registerEscHandler(P,L)}registerOscHandler(P,L){return this._parser.registerOscHandler(P,new j.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var P;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((P=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&P.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const P=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-P),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(P=this._bufferService.cols-1){this._activeBuffer.x=Math.min(P,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(P,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=P,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=P,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(P,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+P,this._activeBuffer.y+L)}cursorUp(P){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,P.params[0]||1)):this._moveCursor(0,-(P.params[0]||1)),!0}cursorDown(P){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,P.params[0]||1)):this._moveCursor(0,P.params[0]||1),!0}cursorForward(P){return this._moveCursor(P.params[0]||1,0),!0}cursorBackward(P){return this._moveCursor(-(P.params[0]||1),0),!0}cursorNextLine(P){return this.cursorDown(P),this._activeBuffer.x=0,!0}cursorPrecedingLine(P){return this.cursorUp(P),this._activeBuffer.x=0,!0}cursorCharAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(P){return this._setCursor(P.length>=2?(P.params[1]||1)-1:0,(P.params[0]||1)-1),!0}charPosAbsolute(P){return this._setCursor((P.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(P){return this._moveCursor(P.params[0]||1,0),!0}linePosAbsolute(P){return this._setCursor(this._activeBuffer.x,(P.params[0]||1)-1),!0}vPositionRelative(P){return this._moveCursor(0,P.params[0]||1),!0}hVPosition(P){return this.cursorPosition(P),!0}tabClear(P){const L=P.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(P){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=P.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(P){const L=P.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(P,L,$,H=!1,G=!1){const ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);ne.replaceCells(L,$,this._activeBuffer.getNullCell(this._eraseAttrData()),G),H&&(ne.isWrapped=!1)}_resetBufferLine(P,L=!1){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);$&&($.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+P),$.isWrapped=!1)}eraseInDisplay(P,L=!1){let $;switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:for($=this._activeBuffer.y,this._dirtyRowTracker.markDirty($),this._eraseInBufferLine($++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);$=this._bufferService.cols&&(this._activeBuffer.lines.get($+1).isWrapped=!1);$--;)this._resetBufferLine($,L);this._dirtyRowTracker.markDirty(0);break;case 2:for($=this._bufferService.rows,this._dirtyRowTracker.markDirty($-1);$--;)this._resetBufferLine($,L);this._dirtyRowTracker.markDirty(0);break;case 3:const H=this._activeBuffer.lines.length-this._bufferService.rows;H>0&&(this._activeBuffer.lines.trimStart(H),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-H,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-H,0),this._onScroll.fire(0))}return!0}eraseInLine(P,L=!1){switch(this._restrictCursor(this._bufferService.cols),P.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(P){this._restrictCursor();let L=P.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let se=le;for(let Q=1;Q<$;++Q)oe.copyWithin(se,0,le),se+=le;return this.print(oe,0,se),!0}sendDeviceAttributesPrimary(P){return P.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(P){return P.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(P.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(P){return(this._optionsService.rawOptions.termName+"").indexOf(P)===0}setMode(P){for(let L=0;LAe?1:2,ue=P.params[0];return de=ue,ye=L?ue===2?4:ue===4?ee(ne.modes.insertMode):ue===12?3:ue===20?ee(ce.convertEol):0:ue===1?ee($.applicationCursorKeys):ue===3?ce.windowOptions.setWinLines?le===80?2:le===132?1:0:0:ue===6?ee($.origin):ue===7?ee($.wraparound):ue===8?3:ue===9?ee(H==="X10"):ue===12?ee(ce.cursorBlink):ue===25?ee(!ne.isCursorHidden):ue===45?ee($.reverseWraparound):ue===66?ee($.applicationKeypad):ue===67?4:ue===1e3?ee(H==="VT200"):ue===1002?ee(H==="DRAG"):ue===1003?ee(H==="ANY"):ue===1004?ee($.sendFocus):ue===1005?4:ue===1006?ee(G==="SGR"):ue===1015?4:ue===1016?ee(G==="SGR_PIXELS"):ue===1048?1:ue===47||ue===1047||ue===1049?ee(se===Q):ue===2004?ee($.bracketedPasteMode):0,ne.triggerDataEvent(`${f.C0.ESC}[${L?"":"?"}${de};${ye}$y`),!0;var de,ye}_updateAttrColor(P,L,$,H,G){return L===2?(P|=50331648,P&=-16777216,P|=C.AttributeData.fromColorRGB([$,H,G])):L===5&&(P&=-50331904,P|=33554432|255&$),P}_extractColor(P,L,$){const H=[0,0,-1,0,0,0];let G=0,ne=0;do{if(H[ne+G]=P.params[L+ne],P.hasSubParams(L+ne)){const oe=P.getSubParams(L+ne);let le=0;do H[1]===5&&(G=1),H[ne+le+1+G]=oe[le];while(++le=2||H[1]===2&&ne+G>=5)break;H[1]&&(G=1)}while(++ne+L5)&&(P=1),L.extended.underlineStyle=P,L.fg|=268435456,P===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(P){P.fg=b.DEFAULT_ATTR_DATA.fg,P.bg=b.DEFAULT_ATTR_DATA.bg,P.extended=P.extended.clone(),P.extended.underlineStyle=0,P.extended.underlineColor&=-67108864,P.updateExtended()}charAttributes(P){if(P.length===1&&P.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=P.length;let $;const H=this._curAttrData;for(let G=0;G=30&&$<=37?(H.fg&=-50331904,H.fg|=16777216|$-30):$>=40&&$<=47?(H.bg&=-50331904,H.bg|=16777216|$-40):$>=90&&$<=97?(H.fg&=-50331904,H.fg|=16777224|$-90):$>=100&&$<=107?(H.bg&=-50331904,H.bg|=16777224|$-100):$===0?this._processSGR0(H):$===1?H.fg|=134217728:$===3?H.bg|=67108864:$===4?(H.fg|=268435456,this._processUnderline(P.hasSubParams(G)?P.getSubParams(G)[0]:1,H)):$===5?H.fg|=536870912:$===7?H.fg|=67108864:$===8?H.fg|=1073741824:$===9?H.fg|=2147483648:$===2?H.bg|=134217728:$===21?this._processUnderline(2,H):$===22?(H.fg&=-134217729,H.bg&=-134217729):$===23?H.bg&=-67108865:$===24?(H.fg&=-268435457,this._processUnderline(0,H)):$===25?H.fg&=-536870913:$===27?H.fg&=-67108865:$===28?H.fg&=-1073741825:$===29?H.fg&=2147483647:$===39?(H.fg&=-67108864,H.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):$===49?(H.bg&=-67108864,H.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):$===38||$===48||$===58?G+=this._extractColor(P,G,H):$===53?H.bg|=1073741824:$===55?H.bg&=-1073741825:$===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):$===100?(H.fg&=-67108864,H.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",$);return!0}deviceStatus(P){switch(P.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,$=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${$}R`)}return!0}deviceStatusPrivate(P){if(P.params[0]===6){const L=this._activeBuffer.y+1,$=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${$}R`)}return!0}softReset(P){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(P){const L=P.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const $=L%2==1;return this._optionsService.options.cursorBlink=$,!0}setScrollRegion(P){const L=P.params[0]||1;let $;return(P.length<2||($=P.params[1])>this._bufferService.rows||$===0)&&($=this._bufferService.rows),$>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=$-1,this._setCursor(0,0)),!0}windowOptions(P){if(!F(P.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=P.length>1?P.params[1]:0;switch(P.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(U.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(U.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(P){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(P){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(P){return this._windowTitle=P,this._onTitleChange.fire(P),!0}setIconName(P){return this._iconName=P,!0}setOrReportIndexedColor(P){const L=[],$=P.split(";");for(;$.length>1;){const H=$.shift(),G=$.shift();if(/^\d+$/.exec(H)){const ne=parseInt(H);if(Z(ne))if(G==="?")L.push({type:0,index:ne});else{const oe=(0,R.parseColor)(G);oe&&L.push({type:1,index:ne,color:oe})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(P){const L=P.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(P,L){this._getCurrentLinkId()&&this._finishHyperlink();const $=P.split(":");let H;const G=$.findIndex((ne=>ne.startsWith("id=")));return G!==-1&&(H=$[G].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:H,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(P,L){const $=P.split(";");for(let H=0;H<$.length&&!(L>=this._specialColors.length);++H,++L)if($[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const G=(0,R.parseColor)($[H]);G&&this._onColor.fire([{type:1,index:this._specialColors[L],color:G}])}return!0}setOrReportFgColor(P){return this._setOrReportSpecialColor(P,0)}setOrReportBgColor(P){return this._setOrReportSpecialColor(P,1)}setOrReportCursorColor(P){return this._setOrReportSpecialColor(P,2)}restoreIndexedColor(P){if(!P)return this._onColor.fire([{type:2}]),!0;const L=[],$=P.split(";");for(let H=0;H<$.length;++H)if(/^\d+$/.exec($[H])){const G=parseInt($[H]);Z(G)&&L.push({type:2,index:G})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(P){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(P){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(P){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(P){return P.length!==2?(this.selectDefaultCharset(),!0):(P[0]==="/"||this._charsetService.setgCharset(O[P[0]],p.CHARSETS[P[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const P=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,P,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(P){return this._charsetService.setgLevel(P),!0}screenAlignmentPattern(){const P=new w.CellData;P.content=4194373,P.fg=this._curAttrData.fg,P.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${f.C0.ESC}${G}${f.C0.ESC}\\`),!0))(P==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:P==='"p'?'P1$r61;1"p':P==="r"?`P1$r${$.scrollTop+1};${$.scrollBottom+1}r`:P==="m"?"P1$r0m":P===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(P,L){this._dirtyRowTracker.markRangeDirty(P,L)}}a.InputHandler=Y;let V=class{constructor(te){this._bufferService=te,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(te){tethis.end&&(this.end=te)}markRangeDirty(te,P){te>P&&(q=te,te=P,P=q),tethis.end&&(this.end=P)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(te){return 0<=te&&te<256}V=u([_(0,N.IBufferService)],V)},844:(o,a)=>{function l(u){for(const _ of u)_.dispose();u.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const _=this._disposables.indexOf(u);_!==-1&&this._disposables.splice(_,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var _;this._isDisposed||u===this._value||((_=this._value)==null||_.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},a.toDisposable=function(u){return{dispose:u}},a.disposeArray=l,a.getDisposeArrayDisposable=function(u){return{dispose:()=>l(u)}}},1505:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(_,f,p){this._data[_]||(this._data[_]={}),this._data[_][f]=p}get(_,f){return this._data[_]?this._data[_][f]:void 0}clear(){this._data={}}}a.TwoKeyMap=l,a.FourKeyMap=class{constructor(){this._data=new l}set(u,_,f,p,m){this._data.get(u,_)||this._data.set(u,_,new l),this._data.get(u,_).set(f,p,m)}get(u,_,f,p){var m;return(m=this._data.get(u,_))==null?void 0:m.get(f,p)}clear(){this._data.clear()}}},6114:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const l=a.isNode?"node":navigator.userAgent,u=a.isNode?"node":navigator.platform;a.isFirefox=l.includes("Firefox"),a.isLegacyEdge=l.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(l),a.getSafariVersion=function(){if(!a.isSafari)return 0;const _=l.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),a.isIpad=u==="iPad",a.isIphone=u==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),a.isLinux=u.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(l)},6106:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let l=0;a.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(l=this._search(this._getKey(u)),this._array.splice(l,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const _=this._getKey(u);if(_===void 0||(l=this._search(_),l===-1)||this._getKey(this._array[l])!==_)return!1;do if(this._array[l]===u)return this._array.splice(l,1),!0;while(++l=this._array.length)&&this._getKey(this._array[l])===u))do yield this._array[l];while(++l=this._array.length)&&this._getKey(this._array[l])===u))do _(this._array[l]);while(++l=_;){let p=_+f>>1;const m=this._getKey(this._array[p]);if(m>u)f=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}_=p+1}}return _}}},7226:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const u=l(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._iv)return b-x<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(b-x))}ms`),void this._start();b=v}this.clear()}}class f extends _{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const x=Date.now()+m;return{timeRemaining:()=>Math.max(0,x-Date.now())}}}a.PriorityTaskQueue=f,a.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:f,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const u=l(643);a.updateWindowsModeWrappedState=function(_){const f=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),p=f==null?void 0:f.get(_.cols-1),m=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);m&&p&&(m.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new l;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=l;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,p=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=u},9092:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const u=l(6349),_=l(7226),f=l(3734),p=l(8437),m=l(4634),x=l(511),S=l(643),b=l(4863),v=l(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(y,w,C){this._hasScrollback=y,this._optionsService=w,this._bufferService=C,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=x.CellData.fromCharData([0,S.NULL_CELL_CHAR,S.NULL_CELL_WIDTH,S.NULL_CELL_CODE]),this._whitespaceCell=x.CellData.fromCharData([0,S.WHITESPACE_CELL_CHAR,S.WHITESPACE_CELL_WIDTH,S.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(y){return y?(this._nullCell.fg=y.fg,this._nullCell.bg=y.bg,this._nullCell.extended=y.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(y){return y?(this._whitespaceCell.fg=y.fg,this._whitespaceCell.bg=y.bg,this._whitespaceCell.extended=y.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(y,w){return new p.BufferLine(this._bufferService.cols,this.getNullCell(y),w)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const y=this.ybase+this.y-this.ydisp;return y>=0&&ya.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:w}fillViewportRows(y){if(this.lines.length===0){y===void 0&&(y=p.DEFAULT_ATTR_DATA);let w=this._rows;for(;w--;)this.lines.push(this.getBlankLine(y))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(y,w){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const E=this._getCorrectBufferLength(w);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+j+1?(this.ybase--,j++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(y,C)));else for(let z=this._rows;z>w;z--)this.lines.length>w+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E0&&(this.lines.trimStart(z),this.ybase=Math.max(this.ybase-z,0),this.ydisp=Math.max(this.ydisp-z,0),this.savedY=Math.max(this.savedY-z,0)),this.lines.maxLength=E}this.x=Math.min(this.x,y-1),this.y=Math.min(this.y,w-1),j&&(this.y+=j),this.savedX=Math.min(this.savedX,y-1),this.scrollTop=0}if(this.scrollBottom=w-1,this._isReflowEnabled&&(this._reflow(y,w),this._cols>y))for(let j=0;j.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let y=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,y=!1);let w=0;for(;this._memoryCleanupPosition100)return!0;return y}get _isReflowEnabled(){const y=this._optionsService.rawOptions.windowsPty;return y&&y.buildNumber?this._hasScrollback&&y.backend==="conpty"&&y.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(y,w){this._cols!==y&&(y>this._cols?this._reflowLarger(y,w):this._reflowSmaller(y,w))}_reflowLarger(y,w){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,y,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(C.length>0){const N=(0,m.reflowLargerCreateNewLayout)(this.lines,C);(0,m.reflowLargerApplyNewLayout)(this.lines,N.layout),this._reflowLargerAdjustViewport(y,w,N.countRemoved)}}_reflowLargerAdjustViewport(y,w,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=C;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;j--){let z=this.lines.get(j);if(!z||!z.isWrapped&&z.getTrimmedLength()<=y)continue;const R=[z];for(;z.isWrapped&&j>0;)z=this.lines.get(--j),R.unshift(z);const O=this.ybase+this.y;if(O>=j&&O0&&(N.push({start:j+R.length+E,newLines:Y}),E+=Y.length),R.push(...Y);let V=F.length-1,Z=F[V];Z===0&&(V--,Z=F[V]);let te=R.length-U-1,P=I;for(;te>=0;){const $=Math.min(P,Z);if(R[V]===void 0)break;if(R[V].copyCellsFrom(R[te],P-$,Z-$,$,!0),Z-=$,Z===0&&(V--,Z=F[V]),P-=$,P===0){te--;const H=Math.max(te,0);P=(0,m.getWrappedLineTrimmedLength)(R,H,this._cols)}}for(let $=0;$0;)this.ybase===0?this.y0){const j=[],z=[];for(let V=0;V=0;V--)if(F&&F.start>O+U){for(let Z=F.newLines.length-1;Z>=0;Z--)this.lines.set(V--,F.newLines[Z]);V++,j.push({index:O+1,amount:F.newLines.length}),U+=F.newLines.length,F=N[++I]}else this.lines.set(V,z[O--]);let q=0;for(let V=j.length-1;V>=0;V--)j[V].index+=q,this.lines.onInsertEmitter.fire(j[V]),q+=j[V].amount;const Y=Math.max(0,R+E-this.lines.maxLength);Y>0&&this.lines.onTrimEmitter.fire(Y)}}translateBufferLineToString(y,w,C=0,N){const E=this.lines.get(y);return E?E.translateToString(w,C,N):""}getWrappedRangeForLine(y){let w=y,C=y;for(;w>0&&this.lines.get(w).isWrapped;)w--;for(;C+10;);return y>=this._cols?this._cols-1:y<0?0:y}nextStop(y){for(y==null&&(y=this.x);!this.tabs[++y]&&y=this._cols?this._cols-1:y<0?0:y}clearMarkers(y){this._isClearing=!0;for(let w=0;w{w.line-=C,w.line<0&&w.dispose()}))),w.register(this.lines.onInsert((C=>{w.line>=C.index&&(w.line+=C.amount)}))),w.register(this.lines.onDelete((C=>{w.line>=C.index&&w.lineC.index&&(w.line-=C.amount)}))),w.register(w.onDispose((()=>this._removeMarker(w)))),w}_removeMarker(y){this._isClearing||this.markers.splice(this.markers.indexOf(y),1)}}},8437:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const u=l(3734),_=l(511),f=l(643),p=l(482);a.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class x{constructor(b,v,y=!1){this.isWrapped=y,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*b);const w=v||_.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):y]}set(b,v){this._data[3*b+1]=v[f.CHAR_DATA_ATTR_INDEX],v[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[b]=v[1],this._data[3*b+0]=2097152|b|v[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*b+0]=v[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(b){return this._data[3*b+0]>>22}hasWidth(b){return 12582912&this._data[3*b+0]}getFg(b){return this._data[3*b+1]}getBg(b){return this._data[3*b+2]}hasContent(b){return 4194303&this._data[3*b+0]}getCodePoint(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):2097151&v}isCombined(b){return 2097152&this._data[3*b+0]}getString(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b]:2097151&v?(0,p.stringFromCodePoint)(2097151&v):""}isProtected(b){return 536870912&this._data[3*b+2]}loadCell(b,v){return m=3*b,v.content=this._data[m+0],v.fg=this._data[m+1],v.bg=this._data[m+2],2097152&v.content&&(v.combinedData=this._combined[b]),268435456&v.bg&&(v.extended=this._extendedAttrs[b]),v}setCell(b,v){2097152&v.content&&(this._combined[b]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[b]=v.extended),this._data[3*b+0]=v.content,this._data[3*b+1]=v.fg,this._data[3*b+2]=v.bg}setCellFromCodepoint(b,v,y,w){268435456&w.bg&&(this._extendedAttrs[b]=w.extended),this._data[3*b+0]=v|y<<22,this._data[3*b+1]=w.fg,this._data[3*b+2]=w.bg}addCodepointToCell(b,v,y){let w=this._data[3*b+0];2097152&w?this._combined[b]+=(0,p.stringFromCodePoint)(v):2097151&w?(this._combined[b]=(0,p.stringFromCodePoint)(2097151&w)+(0,p.stringFromCodePoint)(v),w&=-2097152,w|=2097152):w=v|4194304,y&&(w&=-12582913,w|=y<<22),this._data[3*b+0]=w}insertCells(b,v,y){if((b%=this.length)&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,y),v=0;--C)this.setCell(b+v+C,this.loadCell(b+C,w));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*y)this._data=new Uint32Array(this._data.buffer,0,y);else{const w=new Uint32Array(y);w.set(this._data),this._data=w}for(let w=this.length;w=b&&delete this._combined[E]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=b&&delete this._extendedAttrs[E]}}return this.length=b,4*y*2=0;--b)if(4194303&this._data[3*b+0])return b+(this._data[3*b+0]>>22);return 0}getNoBgTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0]||50331648&this._data[3*b+2])return b+(this._data[3*b+0]>>22);return 0}copyCellsFrom(b,v,y,w,C){const N=b._data;if(C)for(let j=w-1;j>=0;j--){for(let z=0;z<3;z++)this._data[3*(y+j)+z]=N[3*(v+j)+z];268435456&N[3*(v+j)+2]&&(this._extendedAttrs[y+j]=b._extendedAttrs[v+j])}else for(let j=0;j=v&&(this._combined[z-v+y]=b._combined[z])}}translateToString(b,v,y,w){v=v??0,y=y??this.length,b&&(y=Math.min(y,this.getTrimmedLength())),w&&(w.length=0);let C="";for(;v>22||1}return w&&w.push(v),C}}a.BufferLine=x},4841:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(l,u){if(l.start.y>l.end.y)throw new Error(`Buffer range end (${l.end.x}, ${l.end.y}) cannot be before start (${l.start.x}, ${l.start.y})`);return u*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(o,a)=>{function l(u,_,f){if(_===u.length-1)return u[_].getTrimmedLength();const p=!u[_].hasContent(f-1)&&u[_].getWidth(f-1)===1,m=u[_+1].getWidth(0)===2;return p&&m?f-1:f}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(u,_,f,p,m){const x=[];for(let S=0;S=S&&p0&&(z>w||y[z].getTrimmedLength()===0);z--)j++;j>0&&(x.push(S+y.length-j),x.push(j)),S+=y.length-1}return x},a.reflowLargerCreateNewLayout=function(u,_){const f=[];let p=0,m=_[p],x=0;for(let S=0;Sl(u,y,_))).reduce(((v,y)=>v+y));let x=0,S=0,b=0;for(;bv&&(x-=v,S++);const y=u[S].getWidth(x-1)===2;y&&x--;const w=y?f-1:f;p.push(w),b+=w}return p},a.getWrappedLineTrimmedLength=l},5295:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const u=l(8460),_=l(844),f=l(9092);class p extends _.Disposable{constructor(x,S){super(),this._optionsService=x,this._bufferService=S,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(x){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(x),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(x,S){this._normal.resize(x,S),this._alt.resize(x,S),this.setupTabStops(x)}setupTabStops(x){this._normal.setupTabStops(x),this._alt.setupTabStops(x)}}a.BufferSet=p},511:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const u=l(482),_=l(643),f=l(3734);class p extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(x){const S=new p;return S.setFromCharData(x),S}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(x){this.fg=x[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let S=!1;if(x[_.CHAR_DATA_CHAR_INDEX].length>2)S=!0;else if(x[_.CHAR_DATA_CHAR_INDEX].length===2){const b=x[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=b&&b<=56319){const v=x[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(b-55296)+v-56320+65536|x[_.CHAR_DATA_WIDTH_INDEX]<<22:S=!0}else S=!0}else this.content=x[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|x[_.CHAR_DATA_WIDTH_INDEX]<<22;S&&(this.combinedData=x[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|x[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=p},643:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const u=l(8460),_=l(844);class f{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}a.Marker=f,f._nextId=1},7116:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(o,a)=>{var l,u,_;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=` -`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""})(l||(a.C0=l={})),(function(f){f.PAD="€",f.HOP="",f.BPH="‚",f.NBH="ƒ",f.IND="„",f.NEL="…",f.SSA="†",f.ESA="‡",f.HTS="ˆ",f.HTJ="‰",f.VTS="Š",f.PLD="‹",f.PLU="Œ",f.RI="",f.SS2="Ž",f.SS3="",f.DCS="",f.PU1="‘",f.PU2="’",f.STS="“",f.CCH="”",f.MW="•",f.SPA="–",f.EPA="—",f.SOS="˜",f.SGCI="™",f.SCI="š",f.CSI="›",f.ST="œ",f.OSC="",f.PM="ž",f.APC="Ÿ"})(u||(a.C1=u={})),(function(f){f.ST=`${l.ESC}\\`})(_||(a.C1_ESCAPED=_={}))},7399:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const u=l(2584),_={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(f,p,m,x){const S={type:0,cancel:!1,key:void 0},b=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?S.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?S.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?S.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(S.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:S.key=f.ctrlKey?"\b":u.C0.DEL,f.altKey&&(S.key=u.C0.ESC+S.key);break;case 9:if(f.shiftKey){S.key=u.C0.ESC+"[Z";break}S.key=u.C0.HT,S.cancel=!0;break;case 13:S.key=f.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,S.cancel=!0;break;case 27:S.key=u.C0.ESC,f.altKey&&(S.key=u.C0.ESC+u.C0.ESC),S.cancel=!0;break;case 37:if(f.metaKey)break;b?(S.key=u.C0.ESC+"[1;"+(b+1)+"D",S.key===u.C0.ESC+"[1;3D"&&(S.key=u.C0.ESC+(m?"b":"[1;5D"))):S.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(f.metaKey)break;b?(S.key=u.C0.ESC+"[1;"+(b+1)+"C",S.key===u.C0.ESC+"[1;3C"&&(S.key=u.C0.ESC+(m?"f":"[1;5C"))):S.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(f.metaKey)break;b?(S.key=u.C0.ESC+"[1;"+(b+1)+"A",m||S.key!==u.C0.ESC+"[1;3A"||(S.key=u.C0.ESC+"[1;5A")):S.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(f.metaKey)break;b?(S.key=u.C0.ESC+"[1;"+(b+1)+"B",m||S.key!==u.C0.ESC+"[1;3B"||(S.key=u.C0.ESC+"[1;5B")):S.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(S.key=u.C0.ESC+"[2~");break;case 46:S.key=b?u.C0.ESC+"[3;"+(b+1)+"~":u.C0.ESC+"[3~";break;case 36:S.key=b?u.C0.ESC+"[1;"+(b+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:S.key=b?u.C0.ESC+"[1;"+(b+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:f.shiftKey?S.type=2:f.ctrlKey?S.key=u.C0.ESC+"[5;"+(b+1)+"~":S.key=u.C0.ESC+"[5~";break;case 34:f.shiftKey?S.type=3:f.ctrlKey?S.key=u.C0.ESC+"[6;"+(b+1)+"~":S.key=u.C0.ESC+"[6~";break;case 112:S.key=b?u.C0.ESC+"[1;"+(b+1)+"P":u.C0.ESC+"OP";break;case 113:S.key=b?u.C0.ESC+"[1;"+(b+1)+"Q":u.C0.ESC+"OQ";break;case 114:S.key=b?u.C0.ESC+"[1;"+(b+1)+"R":u.C0.ESC+"OR";break;case 115:S.key=b?u.C0.ESC+"[1;"+(b+1)+"S":u.C0.ESC+"OS";break;case 116:S.key=b?u.C0.ESC+"[15;"+(b+1)+"~":u.C0.ESC+"[15~";break;case 117:S.key=b?u.C0.ESC+"[17;"+(b+1)+"~":u.C0.ESC+"[17~";break;case 118:S.key=b?u.C0.ESC+"[18;"+(b+1)+"~":u.C0.ESC+"[18~";break;case 119:S.key=b?u.C0.ESC+"[19;"+(b+1)+"~":u.C0.ESC+"[19~";break;case 120:S.key=b?u.C0.ESC+"[20;"+(b+1)+"~":u.C0.ESC+"[20~";break;case 121:S.key=b?u.C0.ESC+"[21;"+(b+1)+"~":u.C0.ESC+"[21~";break;case 122:S.key=b?u.C0.ESC+"[23;"+(b+1)+"~":u.C0.ESC+"[23~";break;case 123:S.key=b?u.C0.ESC+"[24;"+(b+1)+"~":u.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(m&&!x||!f.altKey||f.metaKey)!m||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?S.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(S.key=u.C0.US),f.key==="@"&&(S.key=u.C0.NUL)):f.keyCode===65&&(S.type=1);else{const v=_[f.keyCode],y=v==null?void 0:v[f.shiftKey?1:0];if(y)S.key=u.C0.ESC+y;else if(f.keyCode>=65&&f.keyCode<=90){const w=f.ctrlKey?f.keyCode-64:f.keyCode+32;let C=String.fromCharCode(w);f.shiftKey&&(C=C.toUpperCase()),S.key=u.C0.ESC+C}else if(f.keyCode===32)S.key=u.C0.ESC+(f.ctrlKey?u.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let w=f.code.slice(3,4);f.shiftKey||(w=w.toLowerCase()),S.key=u.C0.ESC+w,S.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?S.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?S.key=u.C0.NUL:f.keyCode>=51&&f.keyCode<=55?S.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?S.key=u.C0.DEL:f.keyCode===219?S.key=u.C0.ESC:f.keyCode===220?S.key=u.C0.FS:f.keyCode===221&&(S.key=u.C0.GS)}return S}},482:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},a.utf32ToString=function(l,u=0,_=l.length){let f="";for(let p=u;p<_;++p){let m=l[p];m>65535?(m-=65536,f+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):f+=String.fromCharCode(m)}return f},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,u){const _=l.length;if(!_)return 0;let f=0,p=0;if(this._interim){const m=l.charCodeAt(p++);56320<=m&&m<=57343?u[f++]=1024*(this._interim-55296)+m-56320+65536:(u[f++]=this._interim,u[f++]=m),this._interim=0}for(let m=p;m<_;++m){const x=l.charCodeAt(m);if(55296<=x&&x<=56319){if(++m>=_)return this._interim=x,f;const S=l.charCodeAt(m);56320<=S&&S<=57343?u[f++]=1024*(x-55296)+S-56320+65536:(u[f++]=x,u[f++]=S)}else x!==65279&&(u[f++]=x)}return f}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,u){const _=l.length;if(!_)return 0;let f,p,m,x,S=0,b=0,v=0;if(this.interim[0]){let C=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let E,j=0;for(;(E=63&this.interim[++j])&&j<4;)N<<=6,N|=E;const z=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=z-j;for(;v=_)return 0;if(E=l[v++],(192&E)!=128){v--,C=!0;break}this.interim[j++]=E,N<<=6,N|=63&E}C||(z===2?N<128?v--:u[S++]=N:z===3?N<2048||N>=55296&&N<=57343||N===65279||(u[S++]=N):N<65536||N>1114111||(u[S++]=N)),this.interim.fill(0)}const y=_-4;let w=v;for(;w<_;){for(;!(!(w=_)return this.interim[0]=f,S;if(p=l[w++],(192&p)!=128){w--;continue}if(b=(31&f)<<6|63&p,b<128){w--;continue}u[S++]=b}else if((240&f)==224){if(w>=_)return this.interim[0]=f,S;if(p=l[w++],(192&p)!=128){w--;continue}if(w>=_)return this.interim[0]=f,this.interim[1]=p,S;if(m=l[w++],(192&m)!=128){w--;continue}if(b=(15&f)<<12|(63&p)<<6|63&m,b<2048||b>=55296&&b<=57343||b===65279)continue;u[S++]=b}else if((248&f)==240){if(w>=_)return this.interim[0]=f,S;if(p=l[w++],(192&p)!=128){w--;continue}if(w>=_)return this.interim[0]=f,this.interim[1]=p,S;if(m=l[w++],(192&m)!=128){w--;continue}if(w>=_)return this.interim[0]=f,this.interim[1]=p,this.interim[2]=m,S;if(x=l[w++],(192&x)!=128){w--;continue}if(b=(7&f)<<18|(63&p)<<12|(63&m)<<6|63&x,b<65536||b>1114111)continue;u[S++]=b}}return S}}},225:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const u=l(1480),_=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],f=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;a.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let m=0;m<_.length;++m)p.fill(0,_[m][0],_[m][1]+1)}}wcwidth(m){return m<32?0:m<127?1:m<65536?p[m]:(function(x,S){let b,v=0,y=S.length-1;if(xS[y][1])return!1;for(;y>=v;)if(b=v+y>>1,x>S[b][1])v=b+1;else{if(!(x=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,x){let S=this.wcwidth(m),b=S===0&&x!==0;if(b){const v=u.UnicodeService.extractWidth(x);v===0?b=!1:v>S&&(S=v)}return u.UnicodeService.createPropertyValue(0,S,b)}}},5981:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const u=l(8460),_=l(844);class f extends _.Disposable{constructor(m){super(),this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(m,x){if(x!==void 0&&this._syncCalls>x)return void(this._syncCalls=0);if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let S;for(this._isSyncWriting=!0;S=this._writeBuffer.shift();){this._action(S);const b=this._callbacks.shift();b&&b()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(m,x){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(x),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(x)}_innerWrite(m=0,x=!0){const S=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const b=this._writeBuffer[this._bufferOffset],v=this._action(b,x);if(v){const w=C=>Date.now()-S>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(S,C);return void v.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(w)}const y=this._callbacks[this._bufferOffset];if(y&&y(),this._bufferOffset++,this._pendingData-=b.length,Date.now()-S>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=f},5941:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const l=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function _(f,p){const m=f.toString(16),x=m.length<2?"0"+m:m;switch(p){case 4:return m[0];case 8:return x;case 12:return(x+x).slice(0,3);default:return x+x}}a.parseColor=function(f){if(!f)return;let p=f.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=l.exec(p);if(m){const x=m[1]?15:m[4]?255:m[7]?4095:65535;return[Math.round(parseInt(m[1]||m[4]||m[7]||m[10],16)/x*255),Math.round(parseInt(m[2]||m[5]||m[8]||m[11],16)/x*255),Math.round(parseInt(m[3]||m[6]||m[9]||m[12],16)/x*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const m=p.length/3,x=[0,0,0];for(let S=0;S<3;++S){const b=parseInt(p.slice(m*S,m*S+m),16);x[S]=m===1?b<<4:m===2?b:m===3?b>>4:b>>8}return x}},a.toRgbString=function(f,p=16){const[m,x,S]=f;return`rgb:${_(m,p)}/${_(x,p)}/${_(S,p)}`}},5770:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const u=l(482),_=l(8742),f=l(5770),p=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(x,S){this._handlers[x]===void 0&&(this._handlers[x]=[]);const b=this._handlers[x];return b.push(S),{dispose:()=>{const v=b.indexOf(S);v!==-1&&b.splice(v,1)}}}clearHandler(x){this._handlers[x]&&delete this._handlers[x]}setHandlerFallback(x){this._handlerFb=x}reset(){if(this._active.length)for(let x=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;x>=0;--x)this._active[x].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(x,S){if(this.reset(),this._ident=x,this._active=this._handlers[x]||p,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].hook(S);else this._handlerFb(this._ident,"HOOK",S)}put(x,S,b){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(x,S,b);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(x,S,b))}unhook(x,S=!0){if(this._active.length){let b=!1,v=this._active.length-1,y=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,b=S,y=this._stack.fallThrough,this._stack.paused=!1),!y&&b===!1){for(;v>=0&&(b=this._active[v].unhook(x),b!==!0);v--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,b;v--}for(;v>=0;v--)if(b=this._active[v].unhook(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,b}else this._handlerFb(this._ident,"UNHOOK",x);this._active=p,this._ident=0}};const m=new _.Params;m.addParam(0),a.DcsHandler=class{constructor(x){this._handler=x,this._data="",this._params=m,this._hitLimit=!1}hook(x){this._params=x.length>1||x.params[0]?x.clone():m,this._data="",this._hitLimit=!1}put(x,S,b){this._hitLimit||(this._data+=(0,u.utf32ToString)(x,S,b),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(x){let S=!1;if(this._hitLimit)S=!1;else if(x&&(S=this._handler(this._data,this._params),S instanceof Promise))return S.then((b=>(this._params=m,this._data="",this._hitLimit=!1,b)));return this._params=m,this._data="",this._hitLimit=!1,S}}},2015:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const u=l(844),_=l(8742),f=l(6242),p=l(6351);class m{constructor(v){this.table=new Uint8Array(v)}setDefault(v,y){this.table.fill(v<<4|y)}add(v,y,w,C){this.table[y<<8|v]=w<<4|C}addMany(v,y,w,C){for(let N=0;Nz)),y=(j,z)=>v.slice(j,z),w=y(32,127),C=y(0,24);C.push(25),C.push.apply(C,y(28,32));const N=y(0,14);let E;for(E in b.setDefault(1,0),b.addMany(w,0,2,0),N)b.addMany([24,26,153,154],E,3,0),b.addMany(y(128,144),E,3,0),b.addMany(y(144,152),E,3,0),b.add(156,E,0,0),b.add(27,E,11,1),b.add(157,E,4,8),b.addMany([152,158,159],E,0,7),b.add(155,E,11,3),b.add(144,E,11,9);return b.addMany(C,0,3,0),b.addMany(C,1,3,1),b.add(127,1,0,1),b.addMany(C,8,0,8),b.addMany(C,3,3,3),b.add(127,3,0,3),b.addMany(C,4,3,4),b.add(127,4,0,4),b.addMany(C,6,3,6),b.addMany(C,5,3,5),b.add(127,5,0,5),b.addMany(C,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(w,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(y(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(w,7,0,7),b.addMany(C,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(y(64,127),3,7,0),b.addMany(y(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(y(48,60),4,8,4),b.addMany(y(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(y(32,64),6,0,6),b.add(127,6,0,6),b.addMany(y(64,127),6,0,0),b.addMany(y(32,48),3,9,5),b.addMany(y(32,48),5,9,5),b.addMany(y(48,64),5,0,6),b.addMany(y(64,127),5,7,0),b.addMany(y(32,48),4,9,5),b.addMany(y(32,48),1,9,2),b.addMany(y(32,48),2,9,2),b.addMany(y(48,127),2,10,0),b.addMany(y(48,80),1,10,0),b.addMany(y(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(y(96,127),1,10,0),b.add(80,1,11,9),b.addMany(C,9,0,9),b.add(127,9,0,9),b.addMany(y(28,32),9,0,9),b.addMany(y(32,48),9,9,12),b.addMany(y(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(C,11,0,11),b.addMany(y(32,128),11,0,11),b.addMany(y(28,32),11,0,11),b.addMany(C,10,0,10),b.add(127,10,0,10),b.addMany(y(28,32),10,0,10),b.addMany(y(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(y(32,48),10,9,12),b.addMany(C,12,0,12),b.add(127,12,0,12),b.addMany(y(28,32),12,0,12),b.addMany(y(32,48),12,9,12),b.addMany(y(48,64),12,0,11),b.addMany(y(64,127),12,12,13),b.addMany(y(64,127),10,12,13),b.addMany(y(64,127),9,12,13),b.addMany(C,13,13,13),b.addMany(w,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(x,0,2,0),b.add(x,8,5,8),b.add(x,6,0,6),b.add(x,11,0,11),b.add(x,13,13,13),b})();class S extends u.Disposable{constructor(v=a.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(y,w,C)=>{},this._executeHandlerFb=y=>{},this._csiHandlerFb=(y,w)=>{},this._escHandlerFb=y=>{},this._errorHandlerFb=y=>y,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(v,y=[64,126]){let w=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(w=v.prefix.charCodeAt(0),w&&60>w||w>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;NE||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");w<<=8,w|=E}}if(v.final.length!==1)throw new Error("final must be a single byte");const C=v.final.charCodeAt(0);if(y[0]>C||C>y[1])throw new Error(`final must be in range ${y[0]} .. ${y[1]}`);return w<<=8,w|=C,w}identToString(v){const y=[];for(;v;)y.push(String.fromCharCode(255&v)),v>>=8;return y.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,y){const w=this._identifier(v,[48,126]);this._escHandlers[w]===void 0&&(this._escHandlers[w]=[]);const C=this._escHandlers[w];return C.push(y),{dispose:()=>{const N=C.indexOf(y);N!==-1&&C.splice(N,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,y){this._executeHandlers[v.charCodeAt(0)]=y}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,y){const w=this._identifier(v);this._csiHandlers[w]===void 0&&(this._csiHandlers[w]=[]);const C=this._csiHandlers[w];return C.push(y),{dispose:()=>{const N=C.indexOf(y);N!==-1&&C.splice(N,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,y){return this._dcsParser.registerHandler(this._identifier(v),y)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,y){return this._oscParser.registerHandler(v,y)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(v,y,w,C,N){this._parseStack.state=v,this._parseStack.handlers=y,this._parseStack.handlerPos=w,this._parseStack.transition=C,this._parseStack.chunkPos=N}parse(v,y,w){let C,N=0,E=0,j=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,j=this._parseStack.chunkPos+1;else{if(w===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const z=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(w===!1&&R>-1){for(;R>=0&&(C=z[R](this._params),C!==!0);R--)if(C instanceof Promise)return this._parseStack.handlerPos=R,C}this._parseStack.handlers=[];break;case 4:if(w===!1&&R>-1){for(;R>=0&&(C=z[R](),C!==!0);R--)if(C instanceof Promise)return this._parseStack.handlerPos=R,C}this._parseStack.handlers=[];break;case 6:if(N=v[this._parseStack.chunkPos],C=this._dcsParser.unhook(N!==24&&N!==26,w),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=v[this._parseStack.chunkPos],C=this._oscParser.end(N!==24&&N!==26,w),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,j=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let z=j;z>4){case 2:for(let U=z+1;;++U){if(U>=y||(N=v[U])<32||N>126&&N=y||(N=v[U])<32||N>126&&N=y||(N=v[U])<32||N>126&&N=y||(N=v[U])<32||N>126&&N=0&&(C=R[O](this._params),C!==!0);O--)if(C instanceof Promise)return this._preserveStack(3,R,O,E,z),C;O<0&&this._csiHandlerFb(this._collect<<8|N,this._params),this.precedingJoinState=0;break;case 8:do switch(N){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(N-48)}while(++z47&&N<60);z--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const I=this._escHandlers[this._collect<<8|N];let F=I?I.length-1:-1;for(;F>=0&&(C=I[F](),C!==!0);F--)if(C instanceof Promise)return this._preserveStack(4,I,F,E,z),C;F<0&&this._escHandlerFb(this._collect<<8|N),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|N,this._params);break;case 13:for(let U=z+1;;++U)if(U>=y||(N=v[U])===24||N===26||N===27||N>127&&N=y||(N=v[U])<32||N>127&&N{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const u=l(5770),_=l(482),f=[];a.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,m){this._handlers[p]===void 0&&(this._handlers[p]=[]);const x=this._handlers[p];return x.push(m),{dispose:()=>{const S=x.indexOf(m);S!==-1&&x.splice(S,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,m,x){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(p,m,x);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(p,m,x))}start(){this.reset(),this._state=1}put(p,m,x){if(this._state!==3){if(this._state===1)for(;m0&&this._put(p,m,x)}}end(p,m=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let x=!1,S=this._active.length-1,b=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,x=m,b=this._stack.fallThrough,this._stack.paused=!1),!b&&x===!1){for(;S>=0&&(x=this._active[S].end(p),x!==!0);S--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,x;S--}for(;S>=0;S--)if(x=this._active[S].end(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,x}else this._handlerFb(this._id,"END",p);this._active=f,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,m,x){this._hitLimit||(this._data+=(0,_.utf32ToString)(p,m,x),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let m=!1;if(this._hitLimit)m=!1;else if(p&&(m=this._handler(this._data),m instanceof Promise))return m.then((x=>(this._data="",this._hitLimit=!1,x)));return this._data="",this._hitLimit=!1,m}}},8742:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const l=2147483647;class u{static fromArray(f){const p=new u;if(!f.length)return p;for(let m=Array.isArray(f[0])?1:0;m256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new u(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&f.push(Array.prototype.slice.call(this._subParams,m,x))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>l?l:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>l?l:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const p=this._subParamsIdx[f]>>8,m=255&this._subParamsIdx[f];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const f={};for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&(f[p]=this._subParams.slice(m,x))}return f}addDigit(f){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const m=this._digitIsSub?this._subParams:this.params,x=m[p-1];m[p-1]=~x?Math.min(10*x+f,l):f}}a.Params=u},5741:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()}loadAddon(l,u){const _={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(_),u.dispose=()=>this._wrappedAddonDispose(_),u.activate(l)}_wrappedAddonDispose(l){if(l.isDisposed)return;let u=-1;for(let _=0;_{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const u=l(3785),_=l(511);a.BufferApiView=class{constructor(f,p){this._buffer=f,this.type=p}init(f){return this._buffer=f,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(f){const p=this._buffer.lines.get(f);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new _.CellData}}},3785:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const u=l(511);a.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,f){if(!(_<0||_>=this._line.length))return f?(this._line.loadCell(_,f),f):this._line.loadCell(_,new u.CellData)}translateToString(_,f,p){return this._line.translateToString(_,f,p)}}},8285:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const u=l(8771),_=l(8460),f=l(844);class p extends f.Disposable{constructor(x){super(),this._core=x,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=p},7975:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(l){this._core=l}registerCsiHandler(l,u){return this._core.registerCsiHandler(l,(_=>u(_.toArray())))}addCsiHandler(l,u){return this.registerCsiHandler(l,u)}registerDcsHandler(l,u){return this._core.registerDcsHandler(l,((_,f)=>u(_,f.toArray())))}addDcsHandler(l,u){return this.registerDcsHandler(l,u)}registerEscHandler(l,u){return this._core.registerEscHandler(l,u)}addEscHandler(l,u){return this.registerEscHandler(l,u)}registerOscHandler(l,u){return this._core.registerOscHandler(l,u)}addOscHandler(l,u){return this.registerOscHandler(l,u)}}},7090:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(l){this._core=l}register(l){this._core.unicodeService.register(l)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(l){this._core.unicodeService.activeVersion=l}}},744:function(o,a,l){var u=this&&this.__decorate||function(b,v,y,w){var C,N=arguments.length,E=N<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,y):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,y,w);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(N<3?C(E):N>3?C(v,y,E):C(v,y))||E);return N>3&&E&&Object.defineProperty(v,y,E),E},_=this&&this.__param||function(b,v){return function(y,w){v(y,w,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const f=l(8460),p=l(844),m=l(5295),x=l(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let S=a.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(b){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(b.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(b.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(b,this))}resize(b,v){this.cols=b,this.rows=v,this.buffers.resize(b,v),this._onResize.fire({cols:b,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(b,v=!1){const y=this.buffer;let w;w=this._cachedBlankLine,w&&w.length===this.cols&&w.getFg(0)===b.fg&&w.getBg(0)===b.bg||(w=y.getBlankLine(b,v),this._cachedBlankLine=w),w.isWrapped=v;const C=y.ybase+y.scrollTop,N=y.ybase+y.scrollBottom;if(y.scrollTop===0){const E=y.lines.isFull;N===y.lines.length-1?E?y.lines.recycle().copyFrom(w):y.lines.push(w.clone()):y.lines.splice(N+1,0,w.clone()),E?this.isUserScrolling&&(y.ydisp=Math.max(y.ydisp-1,0)):(y.ybase++,this.isUserScrolling||y.ydisp++)}else{const E=N-C+1;y.lines.shiftElements(C+1,E-1,-1),y.lines.set(N,w.clone())}this.isUserScrolling||(y.ydisp=y.ybase),this._onScroll.fire(y.ydisp)}scrollLines(b,v,y){const w=this.buffer;if(b<0){if(w.ydisp===0)return;this.isUserScrolling=!0}else b+w.ydisp>=w.ybase&&(this.isUserScrolling=!1);const C=w.ydisp;w.ydisp=Math.max(Math.min(w.ydisp+b,w.ybase),0),C!==w.ydisp&&(v||this._onScroll.fire(w.ydisp))}};a.BufferService=S=u([_(0,x.IOptionsService)],S)},7994:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(l){this.glevel=l,this.charset=this._charsets[l]}setgCharset(l,u){this._charsets[l]=u,this.glevel===l&&(this.charset=u)}}},1753:function(o,a,l){var u=this&&this.__decorate||function(w,C,N,E){var j,z=arguments.length,R=z<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,N):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(w,C,N,E);else for(var O=w.length-1;O>=0;O--)(j=w[O])&&(R=(z<3?j(R):z>3?j(C,N,R):j(C,N))||R);return z>3&&R&&Object.defineProperty(C,N,R),R},_=this&&this.__param||function(w,C){return function(N,E){C(N,E,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const f=l(2585),p=l(8460),m=l(844),x={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:w=>w.button!==4&&w.action===1&&(w.ctrl=!1,w.alt=!1,w.shift=!1,!0)},VT200:{events:19,restrict:w=>w.action!==32},DRAG:{events:23,restrict:w=>w.action!==32||w.button!==3},ANY:{events:31,restrict:w=>!0}};function S(w,C){let N=(w.ctrl?16:0)|(w.shift?4:0)|(w.alt?8:0);return w.button===4?(N|=64,N|=w.action):(N|=3&w.button,4&w.button&&(N|=64),8&w.button&&(N|=128),w.action===32?N|=32:w.action!==0||C||(N|=3)),N}const b=String.fromCharCode,v={DEFAULT:w=>{const C=[S(w,!1)+32,w.col+32,w.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${b(C[0])}${b(C[1])}${b(C[2])}`},SGR:w=>{const C=w.action===0&&w.button!==4?"m":"M";return`\x1B[<${S(w,!0)};${w.col};${w.row}${C}`},SGR_PIXELS:w=>{const C=w.action===0&&w.button!==4?"m":"M";return`\x1B[<${S(w,!0)};${w.x};${w.y}${C}`}};let y=a.CoreMouseService=class extends m.Disposable{constructor(w,C){super(),this._bufferService=w,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const N of Object.keys(x))this.addProtocol(N,x[N]);for(const N of Object.keys(v))this.addEncoding(N,v[N]);this.reset()}addProtocol(w,C){this._protocols[w]=C}addEncoding(w,C){this._encodings[w]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(w){if(!this._protocols[w])throw new Error(`unknown protocol "${w}"`);this._activeProtocol=w,this._onProtocolChange.fire(this._protocols[w].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(w){if(!this._encodings[w])throw new Error(`unknown encoding "${w}"`);this._activeEncoding=w}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(w){if(w.col<0||w.col>=this._bufferService.cols||w.row<0||w.row>=this._bufferService.rows||w.button===4&&w.action===32||w.button===3&&w.action!==32||w.button!==4&&(w.action===2||w.action===3)||(w.col++,w.row++,w.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,w,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(w))return!1;const C=this._encodings[this._activeEncoding](w);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=w,!0}explainEvents(w){return{down:!!(1&w),up:!!(2&w),drag:!!(4&w),move:!!(8&w),wheel:!!(16&w)}}_equalEvents(w,C,N){if(N){if(w.x!==C.x||w.y!==C.y)return!1}else if(w.col!==C.col||w.row!==C.row)return!1;return w.button===C.button&&w.action===C.action&&w.ctrl===C.ctrl&&w.alt===C.alt&&w.shift===C.shift}};a.CoreMouseService=y=u([_(0,f.IBufferService),_(1,f.ICoreService)],y)},6975:function(o,a,l){var u=this&&this.__decorate||function(y,w,C,N){var E,j=arguments.length,z=j<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,w,C,N);else for(var R=y.length-1;R>=0;R--)(E=y[R])&&(z=(j<3?E(z):j>3?E(w,C,z):E(w,C))||z);return j>3&&z&&Object.defineProperty(w,C,z),z},_=this&&this.__param||function(y,w){return function(C,N){w(C,N,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const f=l(1439),p=l(8460),m=l(844),x=l(2585),S=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=a.CoreService=class extends m.Disposable{constructor(y,w,C){super(),this._bufferService=y,this._logService=w,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(S),this.decPrivateModes=(0,f.clone)(b)}reset(){this.modes=(0,f.clone)(S),this.decPrivateModes=(0,f.clone)(b)}triggerDataEvent(y,w=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;w&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),w&&this._onUserInput.fire(),this._logService.debug(`sending data "${y}"`,(()=>y.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(y)}triggerBinaryEvent(y){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${y}"`,(()=>y.split("").map((w=>w.charCodeAt(0))))),this._onBinary.fire(y))}};a.CoreService=v=u([_(0,x.IBufferService),_(1,x.ILogService),_(2,x.IOptionsService)],v)},9074:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const u=l(8055),_=l(8460),f=l(844),p=l(6106);let m=0,x=0;class S extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((y=>y==null?void 0:y.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(y){if(y.marker.isDisposed)return;const w=new b(y);if(w){const C=w.marker.onDispose((()=>w.dispose()));w.onDispose((()=>{w&&(this._decorations.delete(w)&&this._onDecorationRemoved.fire(w),C.dispose())})),this._decorations.insert(w),this._onDecorationRegistered.fire(w)}return w}reset(){for(const y of this._decorations.values())y.dispose();this._decorations.clear()}*getDecorationsAtCell(y,w,C){let N=0,E=0;for(const j of this._decorations.getKeyIterator(w))N=j.options.x??0,E=N+(j.options.width??1),y>=N&&y{m=E.options.x??0,x=m+(E.options.width??1),y>=m&&y{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const u=l(2585),_=l(8343);class f{constructor(...m){this._entries=new Map;for(const[x,S]of m)this.set(x,S)}set(m,x){const S=this._entries.get(m);return this._entries.set(m,x),S}forEach(m){for(const[x,S]of this._entries.entries())m(x,S)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}a.ServiceCollection=f,a.InstantiationService=class{constructor(){this._services=new f,this._services.set(u.IInstantiationService,this)}setService(p,m){this._services.set(p,m)}getService(p){return this._services.get(p)}createInstance(p,...m){const x=(0,_.getServiceDependencies)(p).sort(((v,y)=>v.index-y.index)),S=[];for(const v of x){const y=this._services.get(v.id);if(!y)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${v.id}.`);S.push(y)}const b=x.length>0?x[0].index:m.length;if(m.length!==b)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${b+1} conflicts with ${m.length} static arguments`);return new p(...m,...S)}}},7866:function(o,a,l){var u=this&&this.__decorate||function(b,v,y,w){var C,N=arguments.length,E=N<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,y):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,y,w);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(N<3?C(E):N>3?C(v,y,E):C(v,y))||E);return N>3&&E&&Object.defineProperty(v,y,E),E},_=this&&this.__param||function(b,v){return function(y,w){v(y,w,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const f=l(844),p=l(2585),m={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let x,S=a.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(b){super(),this._optionsService=b,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),x=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(b){for(let v=0;vJSON.stringify(E))).join(", ")})`);const N=w.apply(this,C);return x.trace(`GlyphRenderer#${w.name} return`,N),N}}},7302:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const u=l(8460),_=l(844),f=l(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class m extends _.Disposable{constructor(S){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const b={...a.DEFAULT_OPTIONS};for(const v in S)if(v in b)try{const y=S[v];b[v]=this._sanitizeAndValidateOption(v,y)}catch(y){console.error(y)}this.rawOptions=b,this.options={...b},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(S,b){return this.onOptionChange((v=>{v===S&&b(this.rawOptions[S])}))}onMultipleOptionChange(S,b){return this.onOptionChange((v=>{S.indexOf(v)!==-1&&b()}))}_setupOptions(){const S=v=>{if(!(v in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},b=(v,y)=>{if(!(v in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);y=this._sanitizeAndValidateOption(v,y),this.rawOptions[v]!==y&&(this.rawOptions[v]=y,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const y={get:S.bind(this,v),set:b.bind(this,v)};Object.defineProperty(this.options,v,y)}}_sanitizeAndValidateOption(S,b){switch(S){case"cursorStyle":if(b||(b=a.DEFAULT_OPTIONS[S]),!(function(v){return v==="block"||v==="underline"||v==="bar"})(b))throw new Error(`"${b}" is not a valid value for ${S}`);break;case"wordSeparator":b||(b=a.DEFAULT_OPTIONS[S]);break;case"fontWeight":case"fontWeightBold":if(typeof b=="number"&&1<=b&&b<=1e3)break;b=p.includes(b)?b:a.DEFAULT_OPTIONS[S];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw new Error(`${S} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,4294967295))<0)throw new Error(`${S} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw new Error(`${S} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&b!==0)throw new Error(`${S} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}}a.OptionsService=m},2660:function(o,a,l){var u=this&&this.__decorate||function(m,x,S,b){var v,y=arguments.length,w=y<3?x:b===null?b=Object.getOwnPropertyDescriptor(x,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,x,S,b);else for(var C=m.length-1;C>=0;C--)(v=m[C])&&(w=(y<3?v(w):y>3?v(x,S,w):v(x,S))||w);return y>3&&w&&Object.defineProperty(x,S,w),w},_=this&&this.__param||function(m,x){return function(S,b){x(S,b,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const f=l(2585);let p=a.OscLinkService=class{constructor(m){this._bufferService=m,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(m){const x=this._bufferService.buffer;if(m.id===void 0){const C=x.addMarker(x.ybase+x.y),N={data:m,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(N,C))),this._dataByLinkId.set(N.id,N),N.id}const S=m,b=this._getEntryIdKey(S),v=this._entriesWithId.get(b);if(v)return this.addLineToLink(v.id,x.ybase+x.y),v.id;const y=x.addMarker(x.ybase+x.y),w={id:this._nextId++,key:this._getEntryIdKey(S),data:S,lines:[y]};return y.onDispose((()=>this._removeMarkerFromLink(w,y))),this._entriesWithId.set(w.key,w),this._dataByLinkId.set(w.id,w),w.id}addLineToLink(m,x){const S=this._dataByLinkId.get(m);if(S&&S.lines.every((b=>b.line!==x))){const b=this._bufferService.buffer.addMarker(x);S.lines.push(b),b.onDispose((()=>this._removeMarkerFromLink(S,b)))}}getLinkData(m){var x;return(x=this._dataByLinkId.get(m))==null?void 0:x.data}_getEntryIdKey(m){return`${m.id};;${m.uri}`}_removeMarkerFromLink(m,x){const S=m.lines.indexOf(x);S!==-1&&(m.lines.splice(S,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};a.OscLinkService=p=u([_(0,f.IBufferService)],p)},8343:(o,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const l="di$target",u="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(_){return _[u]||[]},a.createDecorator=function(_){if(a.serviceRegistry.has(_))return a.serviceRegistry.get(_);const f=function(p,m,x){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(S,b,v){b[l]===b?b[u].push({id:S,index:v}):(b[u]=[{id:S,index:v}],b[l]=b)})(f,p,x)};return f.toString=()=>_,a.serviceRegistry.set(_,f),f}},2585:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const u=l(8343);var _;a.IBufferService=(0,u.createDecorator)("BufferService"),a.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),a.ICoreService=(0,u.createDecorator)("CoreService"),a.ICharsetService=(0,u.createDecorator)("CharsetService"),a.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(_||(a.LogLevelEnum=_={})),a.ILogService=(0,u.createDecorator)("LogService"),a.IOptionsService=(0,u.createDecorator)("OptionsService"),a.IOscLinkService=(0,u.createDecorator)("OscLinkService"),a.IUnicodeService=(0,u.createDecorator)("UnicodeService"),a.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(o,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const u=l(8460),_=l(225);class f{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,x,S=!1){return(16777215&m)<<3|(3&x)<<1|(S?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new _.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(m){if(!this._providers[m])throw new Error(`unknown Unicode version "${m}"`);this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)}register(m){this._providers[m.version]=m}wcwidth(m){return this._activeProvider.wcwidth(m)}getStringCellWidth(m){let x=0,S=0;const b=m.length;for(let v=0;v=b)return x+this.wcwidth(y);const N=m.charCodeAt(v);56320<=N&&N<=57343?y=1024*(y-55296)+N-56320+65536:x+=this.wcwidth(N)}const w=this.charProperties(y,S);let C=f.extractWidth(w);f.extractShouldJoin(w)&&(C-=f.extractWidth(S)),x+=C,S=w}return x}charProperties(m,x){return this._activeProvider.charProperties(m,x)}}a.UnicodeService=f}},r={};function s(o){var a=r[o];if(a!==void 0)return a.exports;var l=r[o]={exports:{}};return t[o].call(l.exports,l,l.exports,s),l.exports}var i={};return(()=>{var o=i;Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const a=s(9042),l=s(3236),u=s(844),_=s(5741),f=s(8285),p=s(7975),m=s(7090),x=["cols","rows"];class S extends u.Disposable{constructor(v){super(),this._core=this.register(new l.Terminal(v)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const y=C=>this._core.options[C],w=(C,N)=>{this._checkReadonlyOptions(C),this._core.options[C]=N};for(const C in this._core.options){const N={get:y.bind(this,C),set:w.bind(this,C)};Object.defineProperty(this._publicOptions,C,N)}}_checkReadonlyOptions(v){if(x.includes(v))throw new Error(`Option "${v}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new m.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const v=this._core.coreService.decPrivateModes;let y="none";switch(this._core.coreMouseService.activeProtocol){case"X10":y="x10";break;case"VT200":y="vt200";break;case"DRAG":y="drag";break;case"ANY":y="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:y,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const y in v)this._publicOptions[y]=v[y]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,y=!0){this._core.input(v,y)}resize(v,y){this._verifyIntegers(v,y),this._core.resize(v,y)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){return this._checkProposedApi(),this._verifyPositiveIntegers(v.x??0,v.width??0,v.height??0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,y,w){this._verifyIntegers(v,y,w),this._core.select(v,y,w)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,y){this._verifyIntegers(v,y),this._core.selectLines(v,y)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,y){this._core.write(v,y)}writeln(v,y){this._core.write(v),this._core.write(`\r -`,y)}paste(v){this._core.paste(v)}refresh(v,y){this._verifyIntegers(v,y),this._core.refresh(v,y)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return a}_verifyIntegers(...v){for(const y of v)if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const y of v)if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}o.Terminal=S})(),i})()))})(w2)),w2.exports}var Edt=Cdt();function o6(e,n,t=!1){const r=getComputedStyle(document.documentElement),s=new Edt.Terminal({convertEol:!0,disableStdin:n,fontSize:12,fontFamily:r.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:{background:r.getPropertyValue("--term-bg").trim(),foreground:r.getPropertyValue("--term-foreground").trim(),cursor:n?r.getPropertyValue("--term-bg").trim():r.getPropertyValue("--term-foreground").trim(),selectionBackground:r.getPropertyValue("--term-selection").trim()}}),i=new wdt.FitAddon;s.loadAddon(i),t&&s.loadAddon(new kdt.WebLinksAddon((l,u)=>{let _;try{_=new URL(u)}catch{return}(_.protocol==="http:"||_.protocol==="https:")&&window.open(_,"_blank","noopener,noreferrer")})),s.open(e);const o=()=>{try{i.fit()}catch{}};o();const a=new ResizeObserver(o);return a.observe(e),{terminal:s,dispose(){a.disconnect(),s.dispose()}}}const QL="overflow-hidden rounded-md bg-terminal p-2";function Kp(e){return typeof e=="object"&&e!==null}function YL(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function Ndt(e){return Kp(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||YL(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function zdt(e){return Kp(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&YL(e.partitions)&&(e.error===null||typeof e.error=="string")}function Tdt(e){return!Kp(e)||e.type!=="complete"?null:e.backend==="ssh"&&Ndt(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&zdt(e.result)?{backend:"slurm",result:e.result}:null}function jdt(e){return Kp(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function l6({host:e,backend:n,path:t="/api/settings/ssh/connect",active:r=!0,onComplete:s,onError:i}){const o=new URLSearchParams({host:e,backend:n});return h.jsx(XL,{path:`${t}?${o}`,label:QD({host:ze(e)}),active:r,onError:i,onComplete:a=>{const l=Tdt(a);return l?(s(l),!0):!1}})}function Adt({login:e,onComplete:n,onError:t}){return h.jsx(XL,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-80",onError:t,onComplete:r=>!Kp(r)||r.type!=="complete"?!1:(n(),!0)})}function XL({path:e,label:n,heightClass:t="h-40",active:r=!0,onComplete:s,onError:i}){const o=M.useRef(null),a=M.useRef(null),l=M.useRef(s),u=M.useRef(i),[_,f]=M.useState(null);return l.current=s,u.current=i,M.useEffect(()=>{const p=o.current;if(!p)return;const{terminal:m,dispose:x}=o6(p,!1,!0);a.current=m,m.focus();const S=location.protocol==="https:"?"wss:":"ws:",b=new URL(e,`${S}//${location.host}`),v=new WebSocket(b);v.binaryType="arraybuffer";let y=!1,w=!1,C=!1;const N=z=>{var R;w||(w=!0,C||m.writeln(z),m.options.disableStdin=!0,m.blur(),f(z),(R=u.current)==null||R.call(u,z))},E=m.onData(z=>{v.readyState===WebSocket.OPEN&&v.send(new TextEncoder().encode(z))}),j=m.onResize(({cols:z,rows:R})=>{v.readyState===WebSocket.OPEN&&v.send(JSON.stringify({type:"resize",cols:z,rows:R}))});return v.onopen=()=>{v.send(JSON.stringify({type:"resize",cols:m.cols,rows:m.rows}))},v.onmessage=z=>{if(z.data instanceof ArrayBuffer){C=!0,m.write(new Uint8Array(z.data));return}if(typeof z.data!="string")return;let R;try{R=JSON.parse(z.data)}catch{return}if(l.current(R)){y=!0,v.close();return}const O=jdt(R);O&&N(O)},v.onerror=()=>N(pN()),v.onclose=()=>{!y&&!w&&N(pN())},()=>{v.onopen=null,v.onmessage=null,v.onerror=null,v.onclose=null,E.dispose(),j.dispose(),v.close(),a.current=null,x()}},[e]),M.useEffect(()=>{const p=a.current;p&&(p.options.disableStdin=!r||_!==null,r&&_===null?p.focus():p.blur())},[r,_]),h.jsxs("div",{className:"mt-3",children:[h.jsx("div",{className:`${t} ${QL}`,role:"group","aria-label":n,children:h.jsx("div",{ref:o,className:"h-full overflow-hidden"})}),_?h.jsx("p",{role:"alert",className:"sr-only",children:_}):null]})}function Rdt({host:e,transcript:n}){const t=M.useRef(null);return M.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=o6(r,!0,!0);return s.write(n),i},[n]),h.jsx("div",{className:`mt-3 h-40 ${QL}`,role:"group","aria-label":QD({host:ze(e)}),children:h.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}function ou(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const Mdt=["settings","harnesses","projects","compute","instances","environment","git","storage"],Ddt=e=>Mdt.some(n=>n===e),Ldt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Oi=e=>typeof e=="string"&&e.length>0,Rg=e=>e==null||Oi(e);function c6(e){if(!Ldt(e))return;const n=(...t)=>Object.keys(e).every(r=>t.includes(r));switch(e.kind){case"home":if(n("kind","view")&&(e.view==="experiments"||e.view==="files"||e.view==="artifacts"))return{kind:"home",view:e.view};break;case"experiment":if(n("kind","experimentId","view","runId")&&Oi(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&Rg(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...Oi(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&Oi(e.path)&&Rg(e.sessionId)&&Rg(e.ref)&&Rg(e.branchLabel)&&(e.source==null||e.source==="repo"||e.source==="artifacts"||e.source==="abs")&&(e.line==null||typeof e.line=="number"&&Number.isSafeInteger(e.line)&&e.line>0))return{kind:"file",path:e.path,...e.source?{source:e.source}:{},...Oi(e.sessionId)?{sessionId:e.sessionId}:{},...Oi(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...Oi(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&Oi(e.experimentId)&&Oi(e.branch)&&(e.view==="files"||e.view==="changes"))return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};break;case"plan":if(n("kind","sessionId","promptId")&&Oi(e.sessionId)&&Oi(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&Oi(e.sessionId)&&Oi(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function Df(e){if(e==="/projects")return{kind:"home"};const n=e.split("/");if(n[0]!==""||n[1]!=="projects"||!n[2])return null;let t,r;try{t=decodeURIComponent(n[2]),r=decodeURIComponent(n[4]??"")}catch{return null}const s=i=>i.length>0&&i!=="."&&i!==".."&&!/[\\/?#\u0000-\u001f\u007f-\u009f]/.test(i);return s(t)?n.length===3||n.length===4&&n[3]===""?{kind:"resume",projectId:t}:n.length===4&&n[3]==="skills"?{kind:"skills",projectId:t}:n.length===5&&n[3]==="tasks"&&s(r)?{kind:"task",projectId:t,...r==="new"?{}:{sessionId:r}}:n.length===5&&n[3]==="settings"&&Ddt(r)?{kind:"settings",projectId:t,section:r}:null:null}function Jv(e){if(typeof e!="string"||!e.startsWith("/")||e.startsWith("//")||/[\\#\u0000-\u001f\u007f-\u009f]/.test(e))return null;const n=e.indexOf("?"),t=n===-1?e:e.slice(0,n),r=n===-1?"":e.slice(n+1),s=Df(t);if(!s||s.kind==="resume")return null;const i=new URLSearchParams(r);if([...i.keys()].some(o=>o!=="pane")||i.getAll("pane").length>1)return null;if(i.has("pane"))try{if(!c6(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function y1(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const WN=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function ZL(e,n){let t,r,s=!1,i=!1,o;async function a(l=!1){if(clearTimeout(o),i||(i=l),s||t===void 0)return;s=!0;const u=t;t=void 0;const _=i;i=!1;try{await e(u,_),r=void 0}catch(f){r=u,n(f)}finally{s=!1,t!==void 0&&a()}}return{queue(l,u=0){t=l,clearTimeout(o),o=setTimeout(()=>void a(),u)},flush:a,retry(){return!s&&t===void 0&&(t=r),a()}}}let sv=null,b0=0;const u6=()=>sv;function JL(){const e=b0;return ZL(async(n,t)=>{if(e!==b0)return;const r=await Oot(n,t);e===b0&&Je.setQueryData(Vp().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===b0&&ir(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:Hi(),onClick:()=>void eb.retry()}})})}let x1=JL();function Odt(){b0++,sv=null,x1=JL()}const eb={flush:(e=!1)=>x1.flush(e),retry:()=>x1.retry(),queue(e,n=0){const t=sv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(sv=e,x1.queue(e,n))}};window.addEventListener("pagehide",()=>void eb.flush(!0));function Bl(e,n){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=n===void 0?e.runId:n;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function Wa(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function eO(e,n,t){const r=[];e.filesTabOpen&&r.push("files"),e.artifactsTabOpen&&r.push("artifacts"),e.experimentsTabOpen&&r.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.codeTabs],i=new Map(s.map(u=>[St(u),u])),o=e.contentTabOrder.flatMap(u=>{const _=i.get(u);return _?[_]:[]}),a=St(e.rightTab);return{tabs:[...r,...o].map(u=>Bl(u,St(u)===a?e.selectedRunId:void 0)),active:e.panelOpen?Bl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?St(e.previewTab):null,history:e.tabHistory.map(St),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[St(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax}}function Idt(e,n){const t=d6();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax);const r=[...(e==null?void 0:e.tabs)??[]];if(n){const i=r.findIndex(o=>St(Wa(o))===St(Wa(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const o=Wa(i);if(typeof o=="string"){o==="experiments"&&(t.experimentsTabOpen=!0),o==="files"&&(t.filesTabOpen=!0),o==="artifacts"&&(t.artifactsTabOpen=!0);continue}"code"in o?(o.toggled=new Set((e==null?void 0:e.expanded[St(o)])??[]),t.codeTabs.push(o)):"path"in o?t.fileTabs.push(o):"kind"in o?o.kind==="plan"?t.planTabs.push(o):t.subagentTabs.push(o):t.expTabs.push(o),t.contentTabOrder.push(St(o))}const s=new Map(r.map(i=>{const o=Wa(i);return[St(o),o]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(i=>{const o=s.get(i);return o?[o]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=n?Wa(n):e!=null&&e.active?Wa(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,nO(t,n)}const S2=(e,n)=>e.id===n.id&&e.view===n.view,Xu=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,f6=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,Ns=(e,n,t)=>`${e}:${n??""}:${f6(t)}`,tO=e=>({...e,lineScrollRequest:void 0});function Mg(e){return typeof e=="object"&&"path"in e?tO(e):e}const Bd=(e,n)=>e.branch===n.branch;function St(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${f6(e)}`:`experiment:${e.id}:${e.view}`}function s0(e,n){const t=e.filter(r=>St(r)!==n);return t.length===e.length?e:t}function Bdt(e){return e!==void 0}function d6(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1};if(e===T0&&n){const r={path:v1,source:"artifacts"},s="experiments";return{...t,rightTab:s,tabHistory:[r,s],experimentsTabOpen:!0,fileTabs:[r],contentTabOrder:[St(r)],panelOpen:!0}}if(e===K3){const r=[{path:"nanochat-base-training-curves.svg",source:"artifacts"},{path:"nanochat-sft-training-curves.svg",source:"artifacts"},{path:"nanochat-training-throughput.svg",source:"artifacts"},{path:"nanochat-core-evaluation.svg",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[...r.slice(1),r[0]],fileTabs:r,contentTabOrder:r.map(St),panelOpen:!0}}if(e===Q3){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(St),panelOpen:!0}}return t}function h6(e,n){const t=d6(e,n);return t.panelOpen?eO(t,{},{}):void 0}function nO(e,n){if(!n)return e;const t=Wa(n),r=St(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs].find(l=>St(l)===r),i=(l,u)=>{const _=l.findIndex(f=>St(f)===r);return _<0?[...l,u]:JSON.stringify(Bl(l[_]))===JSON.stringify(Bl(u))?l:l.map((f,p)=>p===_?{...f,...u}:f)},o={...e};typeof t=="string"?t==="files"?o.filesTabOpen=!0:t==="artifacts"?o.artifactsTabOpen=!0:o.experimentsTabOpen=!0:("path"in t?o.fileTabs=i(e.fileTabs,t):"id"in t?o.expTabs=i(e.expTabs,{...t,runId:n.kind==="experiment"?n.runId:void 0}):"code"in t?o.codeTabs=i(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?o.planTabs=i(e.planTabs,t):o.subagentTabs=i(e.subagentTabs,t),e.contentTabOrder.includes(r)||(o.contentTabOrder=[...e.contentTabOrder,r]));const a=e.tabHistory.at(-1);return a&&St(a)===r&&JSON.stringify(Bl(a))===JSON.stringify(Bl(t))||(o.tabHistory=[...e.tabHistory.filter(l=>St(l)!==r),t]),o}let Va=0;const Y0=new Map,iv=new Map,I4=new Set,B4=()=>{for(const e of I4)e()},$dt=e=>(I4.add(e),()=>{I4.delete(e)}),X0=new Map,Ka=new Map,rO=e=>Ka.get(e);function Pdt(){Va++,Ka.clear(),X0.clear(),Y0.clear(),iv.clear(),B4()}function Fdt(e,n){const t=Ka.get(e);if(!(t!=null&&t.tasks.new)||ou(t,n))return;const r=t.tasks.new,s=o=>Object.fromEntries(r.tabs.flatMap(a=>{if(a.kind!=="file")return[];const l=Wa(a);if(typeof l=="string"||!("path"in l))return[];const u=Ns(e,null,l);return u in o?[[Ns(e,n,l),o[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,X0.set(e,n),Ka.set(e,{...t,tasks:i})}function Hdt(e){let n=Y0.get(e);if(!n){const t=Va;n=ZL(async(r,s)=>{if(t!==Va)return;const i=await Lot(e,r,s);t===Va&&Je.setQueryData(J3(e).queryKey,i),t===Va&&iv.delete(e)&&B4()},r=>{t===Va&&(iv.set(e,r instanceof Error?r.message:String(r)),B4())}),Y0.set(e,n)}return n}function k2(e,n,t,r){const s=Ka.get(e);if(!s||t==="new"&&X0.has(e))return;const i=Jv(n)??s.lastLocation,o=t?t==="new"?null:t:s.lastTaskId,a=t?ou(s,t):void 0;if(i===s.lastLocation&&o===s.lastTaskId&&(!r||JSON.stringify(r)===JSON.stringify(a)))return;const l={...s,lastLocation:i,lastTaskId:o,tasks:t&&r?{...s.tasks,[t]:r}:s.tasks},u=a&&r&&i===s.lastLocation&&JSON.stringify({...a,scroll:{},sourceModes:{}})===JSON.stringify({...r,scroll:{},sourceModes:{}});Ka.set(e,l),Hdt(e).queue(l,u?250:0)}function VN(e,n,t,r){const s=new Set(e.state.fileTabs.map(_=>Ns(t,r==="new"?null:r,_))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([_])=>s.has(_))),o=Object.fromEntries(Object.entries(e.sourceModes).filter(([_])=>s.has(_))),a=eO(e.state,i,o),l=e.pane??(n==null?void 0:n.active),u=l?St(Wa(l)):null;return a.active=a.tabs.find(_=>St(Wa(_))===u)??null,a}function qdt(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,demoOverview:o,state:a,apply:l,getScroll:u,sourceModes:_,revision:f}=e,p=M.useRef(WN()),m=M.useSyncExternalStore($dt,()=>n?iv.get(n)??null:null),[x,S]=M.useState(null),[b,v]=M.useState(0),[y,w]=M.useState(null),[C,N]=M.useState(null),E=M.useRef(null),j=M.useRef(null),z=M.useRef(null),R=M.useRef(e);R.current=e;const O=JSON.stringify([n,t,i]),I=JSON.stringify(s??null),F=M.useCallback(()=>{const q=z.current;if(!q)return;const Y=VN({...R.current,state:q.state,pane:q.pane},ou(Ka.get(q.projectId),q.taskKey),q.projectId,q.taskKey);k2(q.projectId,q.location,q.taskKey,Y)},[]);M.useEffect(()=>{let q=!0;const Y=Va;if(S(null),w(null),!!n)return Ka.has(n)?w(n):Je.fetchQuery(J3(n)).then(V=>{!q||Y!==Va||(Ka.set(n,V??WN()),w(n))}).catch(V=>{q&&Y===Va&&S(V instanceof Error?V.message:String(V))}),()=>{q=!1}},[n,b]),M.useLayoutEffect(()=>{if(z.current&&z.current.scope!==O){const V=z.current.projectId;F(),X0.get(V)===t&&X0.delete(V),z.current=null}if(!n||y!==n)return;const q=Ka.get(n);if(!q)return;if(p.current=q,E.current!==O){if(E.current=O,j.current=I,i){const V=ou(q,t)??(Gc(n)?h6(t,o):void 0);l(Idt(V,s),V,!0)}N(O);return}if(C!==O)return;let Y=a;j.current!==I&&(j.current=I,i&&s&&(Y=nO(a,s),l(Y,void 0,!1))),i?(k2(n,r,t,VN({state:Y,pane:s,getScroll:u,sourceModes:_},ou(q,t),n,t)),z.current={projectId:n,taskKey:t,scope:O,location:r,pane:s,state:Y}):k2(n,r),p.current=Ka.get(n)??q},[n,t,r,s,I,i,o,a,l,u,_,f,y,O,C,F]),M.useEffect(()=>{const q=Va,Y=Z=>{if(q===Va){F();for(const te of Y0.values())te.flush(Z)}},V=()=>Y(!0);return window.addEventListener("pagehide",V),()=>{window.removeEventListener("pagehide",V),Y(!1)}},[F]);const U=M.useCallback(()=>{var q;n&&(x?v(Y=>Y+1):(q=Y0.get(n))==null||q.retry())},[n,x]);return{ready:n===null||y===n&&C===O,loaded:n===null||y===n,error:x??m,retry:U,capture:F,workspace:p}}const Udt="data:image/svg+xml,"+encodeURIComponent(''),$4=M.createContext(null);function Gdt(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function sO(){const e=M.useContext($4);if(!e)throw new Error("Runtime is not connected");return e}function Wdt(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?Udt:"/favicon.svg")}function KN(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function Vdt(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!KN("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&zL(n),!KN("orx:locale")&&t&&GM(t)&&EL(t)}function Kdt(e){return e.includes("ssh ")&&e.includes("failed")}function QN({host:e,overlay:n=!1}){return h.jsx("div",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:h.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[h.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:ND({host:ze(e)})}),h.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:m4()}),h.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:vRe()})]})})}function YN({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var R,O,I;const{session:s}=e,[i,o]=M.useState(s.installPaths),[a,l]=M.useState(!1),[u,_]=M.useState(null);M.useEffect(()=>o(s.installPaths),[(R=s.installPaths)==null?void 0:R.binary,(O=s.installPaths)==null?void 0:O.database,(I=s.installPaths)==null?void 0:I.cache]);async function f(){if(i){l(!0);try{await Qlt(i)}catch(F){ir(F instanceof Error?F.message:String(F),"error")}finally{l(!1)}}}async function p(F=!1){r(F?s.error:null),l(!0);try{await Ylt()}catch(U){ir(U instanceof Error?U.message:String(U),"error")}finally{l(!1)}}async function m(){l(!0);try{await uL()}catch(F){ir(F instanceof Error?F.message:String(F),"error")}finally{l(!1)}}async function x(){l(!0);try{_(await fL())}catch(F){ir(F instanceof Error?F.message:String(F),"error")}finally{l(!1)}}async function S(){if(u){l(!0);try{await dL(u),_(null)}catch(F){_(null),ir(F instanceof Error?F.message:String(F),"error")}finally{l(!1)}}}async function b(){l(!0);try{await Xlt()}catch(F){ir(F instanceof Error?F.message:String(F),"error")}finally{l(!1)}}const v=s.status==="applying"||a,y=s.status==="needsInstall",w=s.status==="needsUpdate",C=i&&y,N=["connecting","applying","reconnecting"].includes(s.status),E=s.status==="disconnected"&&s.error!==null&&Kdt(s.error)&&t!==s.error&&!s.canStartNewHost,j=y?WRe():w?rLe():s.status==="applying"?kAe({host:ze(s.host)}):s.status==="reconnecting"?AMe({host:ze(s.host)}):s.status==="disconnected"?s.error?_Re({host:ze(s.host)}):s.canStartNewHost?ERe({host:ze(s.host)}):ND({host:ze(s.host)}):qAe({host:ze(s.host)}),z=s.error??(s.canStartNewHost?wRe():y?sMe({user:ze(s.user??""),host:ze(s.host)}):w?JDe({host:ze(s.host)}):s.status==="applying"?yAe():s.status==="reconnecting"?NMe():s.status==="disconnected"?oRe():$Ae());return h.jsxs(h.Fragment,{children:[h.jsx("main",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:h.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[h.jsxs("div",{className:"flex items-start gap-3",children:[N&&h.jsx(Ot,{className:"mt-2"}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:j}),!E&&h.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z})]})]}),E&&h.jsx(l6,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),C&&h.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[h.jsx("p",{className:"m-0 text-sm text-subtext",children:HRe()}),[["binary",jRe()],["database",BRe()],["cache",DRe()]].map(([F,U])=>h.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[U,h.jsx(zs,{value:i[F],onChange:q=>o({...i,[F]:q.target.value}),disabled:v,dir:"ltr"})]},F)),!s.error&&h.jsx("div",{className:"flex justify-end pt-1",children:h.jsx(Oe,{variant:"primary",disabled:v,onClick:()=>void f(),children:v?h.jsxs(h.Fragment,{children:[h.jsx(Ot,{})," ",YRe()]}):w?rN():$D()})})]}),w&&i&&h.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&h.jsx(Oe,{variant:"primary",disabled:v,onClick:()=>void f(),children:v?h.jsxs(h.Fragment,{children:[h.jsx(Ot,{})," ",oLe()]}):rN()})}),s.status==="disconnected"&&h.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?h.jsxs(Oe,{variant:"primary",disabled:a,onClick:()=>void b(),children:[a?h.jsx(Ot,{}):null,s.error?tN():FMe()]}):h.jsxs(Oe,{variant:"primary",disabled:a,onClick:()=>void p(),children:[a?h.jsx(Ot,{}):null,tN()]})}),(s.status==="connecting"||s.status==="reconnecting")&&h.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:h.jsx(Oe,{disabled:a,onClick:()=>void m(),children:b4()})}),w&&s.error&&h.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[h.jsx(Oe,{disabled:a,onClick:()=>void m(),children:b4()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[a?h.jsx(Ot,{}):null,eN()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid x(),children:[a?h.jsx(Ot,{}):null,zD()]})]}),y&&s.error&&h.jsx("div",{className:"mt-6 flex justify-end",children:h.jsxs(Oe,{variant:"primary",disabled:a,onClick:()=>void p(),children:[a?h.jsx(Ot,{}):null,eN()]})})]})}),u&&h.jsx(VL,{host:s.host,preview:u,currentClientAttached:!1,stopping:a,onClose:()=>{a||_(null)},onConfirm:()=>void S()})]})}function Qdt({children:e}){const n=M.useRef(null);return M.useEffect(()=>{var t;return(t=n.current)==null?void 0:t.focus()},[]),h.jsx("div",{ref:n,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function Ydt(){M.useSyncExternalStore(Q8,rG),M.useEffect(()=>Q8(()=>{Odt(),Pdt()}),[]);const e=lV({select:x=>x.pathname==="/remote-launch"}),[n,t]=M.useState(null),[r,s]=M.useState(null),i=M.useRef(!1),o=M.useRef(!1),a=M.useRef(!1),l=M.useRef(null),[u,_]=M.useState(null),f=ht({...sut(),enabled:!e,refetchInterval:x=>{var S;return x.state.status==="error"||((S=x.state.data)==null?void 0:S.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(M.useEffect(()=>{var b,v;if(e)return;const x=f.data;if(!x){s(((b=f.error)==null?void 0:b.message)??null);return}const S=Gdt(x);sG(S),l.current!==null&&l.current!==S&&(i.current=!1,o.current=!1,a.current=!1),l.current=S,x.kind==="ssh"&&(a.current||(a.current=!0,Vdt(x)),x.session.status==="connected"?(i.current=!0,o.current=!0,_(null)):x.session.status==="disconnected"&&x.session.error===null&&(o.current=!1)),t(x),s(((v=f.error)==null?void 0:v.message)??null)},[e,f.data,f.error]),M.useEffect(()=>{const x=(n==null?void 0:n.kind)==="ssh";Wdt(x),x&&(!i.current||n.session.status==="disconnected"&&!n.session.error)&&(document.title="OpenResearch")},[n]),e)return h.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[h.jsx(Ot,{})," ",yMe()]});if(!n)return h.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:r?h.jsxs(h.Fragment,{children:[h.jsx("span",{children:r}),h.jsx(Oe,{onClick:()=>location.reload(),children:Hi()})]}):h.jsx(Ot,{})});if(n.kind==="local")return h.jsxs($4,{value:n,children:[h.jsx(AN,{}),h.jsx(U0,{})]},Ca()[1]);if(!(o.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?h.jsx(QN,{host:n.session.host}):h.jsx(YN,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:_});const m=n.session.status!=="connected"||r!==null;return h.jsxs("div",{className:"relative h-full",children:[h.jsx("div",{className:"h-full",inert:m,children:h.jsxs($4,{value:n,children:[h.jsx(AN,{}),h.jsx(U0,{})]},Ca()[1])}),m&&h.jsx(Qdt,{children:r?h.jsx(QN,{host:n.session.host,overlay:!0}):h.jsx(YN,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:_})})]})}const tb=GW()({component:Ydt}),_6="orx:demo-read-sessions";function iO(){try{const e=JSON.parse(sessionStorage.getItem(_6)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function Xdt(e){try{const n=iO();n.add(e),sessionStorage.setItem(_6,JSON.stringify([...n]))}catch{}}function Zdt(){try{sessionStorage.removeItem(_6)}catch{}}function aO(e,n){const t=Df(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function Jdt(e=Je){var i;const[n,t]=await Promise.all([e.fetchQuery(Vp()),e.fetchQuery(K0())]),r=Jv((i=u6()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=Df(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(o=>o.id===s.projectId)||s.sessionId&&!aO(r,await e.fetchQuery(ka(s.projectId)))?"/projects":r}async function eht(e,n=Je){var _;const[t,r]=await Promise.all([n.fetchQuery(J3(e)),n.fetchQuery(ka(e))]),s=rO(e)??t,i=Jv(s==null?void 0:s.lastLocation);if(i&&((_=Df(i.split("?")[0]))==null?void 0:_.projectId)===e&&aO(i,r))return i;const o=r.find(f=>!f.archived),a=Gc(e)?h6(o==null?void 0:o.id,!(await n.fetchQuery(Vp())).tourCompleted):void 0,l=ou(s,(o==null?void 0:o.id)??"new"),u=l?l.active:a==null?void 0:a.active;return y1(e,(o==null?void 0:o.id)??null,u)}/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oO=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tht=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nht=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XN=e=>{const n=nht(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var C2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rht=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},sht=M.createContext({}),iht=()=>M.useContext(sht),aht=M.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>{const{size:u=24,strokeWidth:_=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:m=""}=iht()??{},x=r??f?Number(t??_)*24/Number(n??u):t??_;return M.createElement("svg",{ref:l,...C2,width:n??u??C2.width,height:n??u??C2.height,stroke:e??p,strokeWidth:x,className:oO("lucide",m,s),...!i&&!rht(a)&&{"aria-hidden":"true"},...a},[...o.map(([S,b])=>M.createElement(S,b)),...Array.isArray(i)?i:[i]])});/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const it=(e,n)=>{const t=M.forwardRef(({className:r,...s},i)=>M.createElement(aht,{ref:i,iconNode:n,className:oO(`lucide-${tht(XN(e))}`,`lucide-${e}`,r),...s}));return t.displayName=XN(e),t};/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oht=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],lht=it("arrow-down",oht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cht=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Z0=it("arrow-left",cht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uht=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],w1=it("arrow-right",uht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fht=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],dht=it("arrow-up-right",fht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hht=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],lO=it("blocks",hht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _ht=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],cO=it("book-open",_ht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pht=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],mht=it("calendar-days",pht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ght=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],vht=it("chart-spline",ght);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bht=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],qi=it("check",bht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yht=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ho=it("chevron-down",yht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xht=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],uO=it("chevron-left",xht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wht=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qo=it("chevron-right",wht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Sht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],fO=it("circle-alert",Sht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Cht=it("circle-question-mark",kht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Eht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],dO=it("circle-stop",Eht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Nht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],hO=it("circle-x",Nht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Tht=it("clock-3",zht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Aht=it("clock",jht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rht=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Mht=it("cloud-upload",Rht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Dht=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],P4=it("code",Dht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lht=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],nb=it("copy",Lht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Oht=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],_O=it("corner-down-left",Oht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Iht=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Bht=it("cpu",Iht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $ht=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Pht=it("download",$ht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Fht=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],p6=it("ellipsis",Fht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Hht=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Lf=it("external-link",Hht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qht=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],pO=it("file-code",qht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Uht=[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],Ght=it("file-output",Uht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Wht=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],rb=it("file-text",Wht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Vht=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],m6=it("flask-conical",Vht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kht=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],mO=it("folder-git-2",Kht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Qht=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],J0=it("folder-open",Qht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yht=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Xht=it("folder-plus",Yht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zht=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],sb=it("folder-tree",Zht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Jht=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],e_t=it("funnel",Jht);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const t_t=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],ib=it("git-branch",t_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const n_t=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],r_t=it("git-commit-horizontal",n_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const s_t=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],i_t=it("globe",s_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const a_t=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],o_t=it("history",a_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const l_t=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],g6=it("info",l_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const c_t=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],u_t=it("laptop",c_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const f_t=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],d_t=it("lightbulb",f_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const h_t=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],ZN=it("lock",h_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const __t=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],p_t=it("maximize-2",__t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const m_t=[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]],gO=it("message-square-quote",m_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const g_t=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],v_t=it("minimize-2",g_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const b_t=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],y_t=it("monitor",b_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const x_t=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],w_t=it("moon",x_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const S_t=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],k_t=it("mouse-pointer-click",S_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const C_t=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],v6=it("package",C_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const E_t=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],vO=it("panel-left",E_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const N_t=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],bO=it("panel-right",N_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const z_t=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],T_t=it("paperclip",z_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const j_t=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],b6=it("pencil",j_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const A_t=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],y6=it("plus",A_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const R_t=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ro=it("refresh-cw",R_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const M_t=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],D_t=it("rotate-cw",M_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const L_t=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],x6=it("scroll-text",L_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const O_t=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yO=it("search",O_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const I_t=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],JN=it("server",I_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const B_t=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],$_t=it("settings-2",B_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const P_t=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],xO=it("settings",P_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const F_t=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],wO=it("sliders-horizontal",F_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const H_t=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],r_=it("square-terminal",H_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const q_t=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],U_t=it("sun",q_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const G_t=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Bh=it("terminal",G_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const W_t=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],V_t=it("toggle-right",W_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const K_t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s_=it("trash-2",K_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Q_t=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],SO=it("triangle-alert",Q_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Y_t=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],X_t=it("upload",Y_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Z_t=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],w6=it("users",Z_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const J_t=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],es=it("x",J_t);/** - * @license lucide-react v1.23.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const e0t=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],t0t=it("zap",e0t);function S6(){return h.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[h.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),h.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function E2(){return h.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[h.jsx(S6,{}),"OpenResearch"]})}function n0t({cmd:e}){const[n,t]=M.useState(!1);return h.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[h.jsx("code",{className:"font-mono text-sm",children:e}),h.jsx("button",{type:"button",className:"cmd-inline-copy inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text",onClick:()=>{navigator.clipboard.writeText(e).then(()=>{t(!0),setTimeout(()=>t(!1),1500)}).catch(()=>{})},"aria-label":n?V0():iK({value:ze(e)}),title:n?V0():_D(),children:n?h.jsx(qi,{size:11,strokeWidth:3}):h.jsx(nb,{size:11})})]})}function Qp(e){return e?e.split(/`([^`]+)`/).map((n,t)=>t%2===1?h.jsx(n0t,{cmd:n},t):n):null}function F4({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:h.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):h.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}const r0t={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function ep({variant:e="list",className:n,...t}){return h.jsx("span",{className:Ts("title",r0t[e],n),...t})}const ez=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),tp=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-panel","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),tz=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),kO=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),nz=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),s0t=[{id:"AI/ML",label:Cke},{id:"Biology",label:Tke},{id:"Physics",label:Ike},{id:"Other",label:Mke}],i0t=["welcome","environment","profile"];function a0t({onDone:e,preferredAgent:n}){var ce;const t=Cn({mutationFn:ee=>Bot(...ee)}),[r,s]=M.useState(0);M.useEffect(()=>{const ee=i0t[r];ee&&of({name:"onboarding_step_viewed",step:ee})},[r]);const i=ht(Wp()),o=ht(j0()),a=i.data??null,l=(ce=o.data)==null?void 0:ce.gitVersion,[u,_]=M.useState(!1),[f,p]=M.useState(null),[m,x]=M.useState(null),[S,b]=M.useState(!1),[v,y]=M.useState([]),[w,C]=M.useState(""),[N,E]=M.useState(""),[j,z]=M.useState([]),[R,O]=M.useState(""),[I,F]=M.useState([]),[U,q]=M.useState(!1),Y=M.useRef(0),[V,Z]=M.useState(!1),[te,P]=M.useState(!1),L=(a==null?void 0:a.some(ee=>ee.agentReady))??!1,$=l!=null,H=M.useRef(0),G=(ee,ue=!1)=>{const de=++H.current;b(!0),Z(!1),P(!1);const ye=()=>de===H.current;Promise.allSettled([Z3(ee,ue),Je.fetchQuery({...j0(),staleTime:ee?0:3e4})]).then(([Ae,Ve])=>{ye()&&(Ae.status==="rejected"&&Z(!0),Ve.status==="rejected"&&P(!0))}).finally(()=>ye()&&b(!1))};M.useEffect(()=>G(!1),[]),M.useEffect(()=>{if(a===null)return;const ee=a.filter(ue=>ue.agentReady);x(ue=>{var ye;if(ue&&ee.some(Ae=>Ae.id===ue))return ue;const de=n&&ee.find(Ae=>Ae.id===n.harness);return(de==null?void 0:de.id)??((ye=ee[0])==null?void 0:ye.id)??null})},[a,n]),M.useEffect(()=>Z(i.isError),[i.isError,i.dataUpdatedAt]),M.useEffect(()=>P(o.isError),[o.isError,o.dataUpdatedAt]),M.useEffect(()=>{Je.fetchQuery(aut()).then(ee=>{y(ee.researchAreas),C(ee.otherArea??""),E(ee.background??""),z(ee.papers)}).catch(()=>{})},[]),M.useEffect(()=>{const ee=R.trim();if(ee.length<3){F([]),q(!1);return}const ue=++Y.current;q(!0);const de=setTimeout(()=>{Je.fetchQuery(CL(ee)).then(ye=>ue===Y.current&&F(ye)).catch(()=>ue===Y.current&&F([])).finally(()=>ue===Y.current&&q(!1))},350);return()=>clearTimeout(de)},[R]);const ne=ee=>{const ue=j.some(de=>de.paperId===ee.paperId);z(de=>de.some(ye=>ye.paperId===ee.paperId)?de:[...de,{paperId:ee.paperId,title:rz(ee.title)}]),O(""),F([]),ue||Je.fetchQuery(A4(ee.paperId)).then(de=>{var Ae;const ye=(Ae=de.title)==null?void 0:Ae.trim();ye&&z(Ve=>Ve.map(Ge=>Ge.paperId===ee.paperId?{...Ge,title:ye}:Ge))}).catch(()=>{})},oe=ee=>z(ue=>ue.filter(de=>de.paperId!==ee)),le=ee=>{y(ue=>ue.includes(ee)?ue.filter(de=>de!==ee):[...ue,ee])},se=v.length>0&&(!v.includes("Other")||w.trim().length>0),Q=async()=>{const ee=a==null?void 0:a.find(de=>de.id===m&&de.agentReady);if(!ee||u)return;const ue=l0t(ee);_(!0),p(null);try{const de=await t.mutateAsync([ue,{researchAreas:v,otherArea:v.includes("Other")?w:null,background:N||null,papers:j}]);e(de.project,de.selection)}catch(de){p(de instanceof Error?de.message:String(de))}finally{_(!1)}};return h.jsx("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${r===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:h.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${r===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:r===0?h.jsxs("div",{className:"onb-intro relative flex min-h-dvh flex-col justify-center gap-4 py-12 min-[1120px]:grid min-[1120px]:grid-cols-[minmax(0,_1.1fr)_minmax(28rem,_1fr)] min-[1120px]:grid-rows-[auto_auto] min-[1120px]:content-center min-[1120px]:gap-x-20 min-[1120px]:gap-y-10",children:[h.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[h.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:h.jsx(E2,{})}),h.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:_ke()})]}),h.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[h.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),h.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:w7e()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Y8e()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:J7e()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:j8e()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:F7e()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:y9e()})]})})]})]}),h.jsx("div",{className:"onb-intro-actions relative z-10 mt-8 flex justify-end min-[1120px]:col-start-2 min-[1120px]:row-start-2 min-[1120px]:mt-0 min-[1120px]:self-start",children:h.jsxs(Oe,{variant:"primary",size:"large",onClick:()=>s(1),children:[UE()," ",h.jsx(w1,{size:20})]})})]}):r===1?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(E2,{}),h.jsx("span",{children:D8e()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:n7e()}),h.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:CCe()}),a!==null&&!L&&h.jsx("p",{className:ez,children:w8e()}),a!==null&&L&&m===null&&h.jsx("p",{className:ez,children:a7e()}),h.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:a!==null?a.map(ee=>h.jsx(u0t,{h:ee,selected:m===ee.id,onSelect:()=>x(ee.id)},ee.id)):V?h.jsx("div",{className:tp,children:WE()}):h.jsxs(rs,{className:"py-2",children:[h.jsx(Ot,{})," ",M7e()]})}),(l===null||te)&&h.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[h.jsx(f0t,{gitVersion:l,error:te}),te?h.jsx("p",{className:tz,children:WE()}):h.jsx("p",{className:tz,children:Q7e()})]}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Oe,{variant:"ghost",onClick:()=>s(0),children:[h.jsx(Z0,{size:12})," ",qE()]}),(V||te||l===null||a!==null&&!L)&&h.jsxs(Oe,{variant:"ghost",onClick:()=>G(!0,!0),disabled:S,children:[h.jsx(ro,{size:12,className:S?"animate-[spin_0.9s_linear_infinite]":""})," ",MCe()]}),h.jsx("div",{className:"flex-1"}),h.jsxs(Oe,{variant:"primary",onClick:()=>s(2),disabled:S||!L||m===null||!$,title:S?d9e():L?m===null?v7e():te?FCe():l===void 0?l9e():l===null?oCe():void 0:v8e(),children:[UE()," ",h.jsx(w1,{size:13})]})]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(E2,{}),h.jsx("span",{children:B8e()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:H8e()}),h.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:h.jsxs("div",{className:kO,children:[h.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[h.jsx("legend",{children:m9e()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:_7e()}),h.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:s0t.map(ee=>h.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[h.jsx("input",{type:"checkbox",checked:v.includes(ee.id),onChange:()=>le(ee.id),disabled:u}),h.jsx("span",{children:ee.label()})]},ee.id))}),v.includes("Other")&&h.jsx("input",{className:"onb-other-area w-full mt-2",value:w,onChange:ee=>C(ee.target.value),disabled:u,placeholder:W8e(),"aria-label":TCe()})]}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:QCe()}),h.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:N,onChange:ee=>E(ee.target.value),disabled:u,rows:4,placeholder:I7e()}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:GCe()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:vke()}),h.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[h.jsx("input",{id:"onb-paper-search",value:R,onChange:ee=>O(ee.target.value),disabled:u,placeholder:n8e()}),U?h.jsx("div",{className:tp,children:a8e()}):I.length>0?h.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:I.map(ee=>h.jsxs("button",{type:"button",onClick:()=>ne(ee),disabled:u,children:[h.jsx(ep,{children:rz(ee.title)}),h.jsx("span",{className:"id",children:ee.paperId})]},ee.paperId))}):null]}),j.length>0&&h.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:j.map(ee=>h.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[h.jsx(ep,{children:ee.title||ee.paperId}),h.jsx("span",{className:"id",children:ee.paperId}),h.jsx("button",{type:"button","aria-label":bQ({name:ze(ee.paperId)}),onClick:()=>oe(ee.paperId),disabled:u,children:h.jsx(es,{size:12})})]},ee.paperId))})]})}),!se&&h.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:v.length===0?u7e():T7e()}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Oe,{variant:"ghost",onClick:()=>s(1),disabled:u,children:[h.jsx(Z0,{size:12})," ",qE()]}),h.jsx("div",{className:"flex-1"}),h.jsx(Oe,{variant:"primary",onClick:()=>void Q(),disabled:u||m===null||!se,children:u?h.jsxs(h.Fragment,{children:[h.jsx(Ot,{})," ",_8e()]}):h.jsxs(h.Fragment,{children:[G7e()," ",h.jsx(w1,{size:13})]})})]}),m===null&&h.jsx("p",{className:nz,children:k9e()}),f&&h.jsx("p",{className:nz,children:f})]})})})}function rz(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function o0t(e){return e.agentReady?{tone:"success",label:E8e()}:e.installed?e.installBroken?{tone:"warning",label:rCe()}:e.authState==="unknown"?{tone:"warning",label:e9e()}:e.authState==="unsupported"?{tone:"warning",label:s9e()}:e.installed?{tone:"warning",label:xCe()}:{tone:"neutral",label:GE()}:{tone:"neutral",label:GE()}}function l0t(e){var t,r;const n=((t=e.models[0])==null?void 0:t.id)??null;return{harness:e.id,model:n,permissionMode:((r=e.options)==null?void 0:r.defaultPermissionMode)??null,reasoningLevel:Xv(e,n).defaultId}}function c0t({harness:e}){return h.jsx(F4,{harness:e,size:26})}function u0t({h:e,selected:n,onSelect:t}){var l;const r=o0t(e),s=n?{tone:"success",label:u8e()}:r,o=[(l=e.version)==null?void 0:l.replace(/\s*\(.*\)$/,""),e.models.length>0&&`${e.models.length} model${e.models.length===1?"":"s"} — ${e.models.slice(0,3).map(u=>Y1(u)).join(", ")}${e.models.length>3?", …":""}`].filter(Boolean).join(" · "),a=h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[h.jsx(c0t,{harness:e.id}),h.jsx("span",{className:"onb-card-name text-lg font-semibold tracking-[-0.01em]",children:e.name})]}),h.jsx(r6,{tone:s.tone,children:s.label})]});return e.agentReady?h.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${n?" selected":""}`,"aria-pressed":n,onClick:t,children:[a,h.jsxs("div",{className:"onb-card-detail text-sm",children:[e.account??F3(),e.plan?` · ${e.plan}`:""]}),h.jsx("div",{className:`${tp} w-full overflow-hidden text-ellipsis whitespace-nowrap`,title:o,children:o})]}):h.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[a,h.jsx("div",{className:tp,children:Qp(e.agentNote)})]})}function f0t({gitVersion:e,error:n}){return h.jsxs("div",{className:kO,children:[h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsx("span",{className:"onb-card-name font-semibold text-base",children:fCe()}),h.jsx(r6,{tone:e?"success":n||e===null?"danger":"warning",children:e?ICe():n?Uke():e===null?vD():Kke()})]}),(e||!n&&e===void 0)&&h.jsx("div",{className:tp,children:e??Zke()})]})}const d0t="/assets/slurm-logo-aGSXVZcE.svg",h0t="/assets/thinking-machines-BOdslTfm.png";function _0t(e){switch(e){case"modal_job":return"Modal";case"hf_job":return"Hugging Face";case"k8s_job":return"Kubernetes";case"ssh_job":return"SSH";case"slurm_job":return"Slurm";case"ray_job":return"Ray";case"openresearch_job":return"OpenResearch";case"local_job":return uD();case"tinker_job":return"Tinker";default:return e||"—"}}function p0t({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[h.jsx("path",{d:"M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z",fill:"#FF9D0B"}),h.jsx("path",{d:"M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z",fill:"#FFD21E"}),h.jsx("path",{d:"M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-0.576-.393-.394-1.023-.089-0.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-0.586 0 1.107.79 3.263 3.25 3.263h-.003z",fill:"#FF323D"}),h.jsx("path",{d:"M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003z",fill:"#3A3B45"}),h.jsx("path",{d:"M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8z",fill:"#3A3B45"}),h.jsx("path",{d:"M4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-0.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-0.553.718-.694.244-.162.523-.265.814-.3l.176-.012z",fill:"#FF9D0B"}),h.jsx("path",{d:"M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-0.573.534-.375-.677-1.405-2.416-1.94-2.751-0.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-0.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-0.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-0.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-0.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-0.522z",fill:"#FFD21E"})]})}function m0t({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M121.683 75.25L149.997 124L91.4816 224.75C90.3128 226.757 88.155 228 85.8174 228H32.9664C31.7976 228 30.6778 227.691 29.697 227.131C28.7161 226.57 27.8906 225.758 27.3021 224.75L0.876625 179.25C-0.292208 177.243 -0.292208 174.765 0.876625 172.75L57.512 75.25C58.0923 74.2425 58.9259 73.43 59.9068 72.8694C60.8876 72.3088 62.0074 72 63.1762 72H116.027C118.365 72 120.523 73.2431 121.692 75.25H121.683ZM299.125 172.75L242.49 75.25C241.91 74.2425 241.076 73.43 240.095 72.8694C239.114 72.3088 237.995 72 236.826 72H183.975C181.637 72 179.479 73.2431 178.311 75.25L149.997 124L208.512 224.75C209.681 226.757 211.839 228 214.177 228H267.027C268.196 228 269.316 227.691 270.297 227.131C271.278 226.57 272.103 225.758 272.692 224.75L299.117 179.25C300.286 177.243 300.286 174.765 299.117 172.75H299.125Z",fill:"#62DE61"}),h.jsx("path",{d:"M89.6018 124H150.005L121.692 75.25C120.523 73.2431 118.365 72 116.027 72H63.1763C62.0074 72 60.8876 72.3088 59.9068 72.8694L89.6018 124Z",fill:"url(#orxModalA)"}),h.jsx("path",{d:"M89.6018 124L59.9068 72.8694C58.9259 73.43 58.1005 74.2425 57.512 75.25L0.876625 172.75C-0.292208 174.765 -0.292208 177.235 0.876625 179.25L27.3021 224.75C27.8825 225.758 28.7161 226.57 29.697 227.131L89.5936 124H89.6018Z",fill:"url(#orxModalB)"}),h.jsx("path",{d:"M149.997 124H89.5936L29.697 227.131C30.6778 227.691 31.7976 228 32.9664 228H85.8174C88.155 228 90.3128 226.757 91.4816 224.75L149.997 124Z",fill:"#09AF58"}),h.jsx("path",{d:"M299.125 179.25C299.706 178.243 300 177.121 300 176H240.61L210.915 227.131C211.896 227.691 213.016 228 214.185 228H267.036C269.373 228 271.531 226.757 272.7 224.75L299.125 179.25Z",fill:"#09AF58"}),h.jsx("path",{d:"M183.975 72C182.806 72 181.686 72.3088 180.705 72.8694L240.602 176H299.992C299.992 174.879 299.698 173.758 299.117 172.75L242.49 75.25C241.321 73.2431 239.163 72 236.826 72H183.967H183.975Z",fill:"url(#orxModalC)"}),h.jsx("path",{d:"M210.907 227.131L240.602 176L180.705 72.8694C179.725 73.43 178.899 74.2425 178.311 75.25L149.997 124L208.512 224.75C209.093 225.758 209.926 226.57 210.907 227.131Z",fill:"url(#orxModalD)"}),h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),h.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function g0t({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:h.jsx("path",{d:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-0.5-.623h-.804l-0.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-0.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-0.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-0.52.123-.736-.172-.216-0.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-0.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-0.555-0.5-0.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-0.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-0.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-0.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z"})})}function v0t({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:h.jsx("path",{d:"M16.153 12.826c-.63-.183-1.03.15-1.378.846-0.58 1.13-1.643 1.644-2.888 1.594-1.245-.05-2.257-.63-2.788-1.776-.233-.498-.498-.664-1.046-.68-.93-.017-1.643.016-2.174 1.062-.631 1.261-2.258 1.693-3.619 1.261a3.234 3.234 0 0 1-2.257-3.22 3.198 3.198 0 0 1 2.29-3.02 3.276 3.276 0 0 1 3.702 1.327c.216.315.216.863.597.93.648.1 1.328.033 1.992.033.299 0 .316-.266.399-.465.58-1.295 1.61-1.959 2.987-1.975 1.361-.017 2.39.647 2.955 1.892.215.465.48.598.946.548.166-.017.332.016.498 0 .464-.083 1.062.282 1.344-.448.282-.73-.382-.913-.68-1.245-.847-.946-1.81-1.793-2.673-2.706-.415-.465-.763-.614-1.41-.415-1.876.614-3.619-.431-4.15-2.357-.448-1.676.714-3.535 2.44-3.917a3.293 3.293 0 0 1 3.95 2.457c.017.05.017.083.033.133.117.564.117 1.145-.132 1.626-.283.531-.133.83.249 1.195a152.61 152.61 0 0 1 3.286 3.27c.299.299.498.349.913.2 1.51-0.565 2.97-.1 3.884 1.161a3.266 3.266 0 0 1-.067 3.801c-.896 1.195-2.357 1.643-3.834 1.079-.381-.15-0.58-.1-.846.182a163.619 163.619 0 0 1-3.403 3.386c-.299.3-.415.532-.232.98a3.198 3.198 0 0 1-1.278 3.917A3.298 3.298 0 0 1 9.646 23c-1.062-1.062-1.228-2.688-.415-4.033a3.196 3.196 0 0 1 3.835-1.294c.498.182.78.083 1.145-.283 1.012-1.045 2.058-2.058 3.087-3.103.266-.266.68-.449.432-1.03-.233-0.547-.631-.414-1.03-.431zM11.97 4.942c.913.016 1.643-.714 1.66-1.627v-.05a1.646 1.646 0 0 0-1.76-1.56 1.63 1.63 0 0 0-1.543 1.527 1.638 1.638 0 0 0 1.577 1.71zm.033 5.41a1.658 1.658 0 0 0-1.676 1.61v.084a1.73 1.73 0 0 0 1.643 1.66c.847.016 1.643-.78 1.677-1.627a1.648 1.648 0 0 0-1.577-1.71c-.017-.016-.05-.016-.067-.016zm7.088 1.694c.016.896.747 1.61 1.626 1.643a1.723 1.723 0 0 0 1.66-1.726 1.666 1.666 0 0 0-1.66-1.61 1.623 1.623 0 0 0-1.643 1.577c.017.05.017.083.017.116zM3.24 10.353a1.692 1.692 0 0 0-1.66 1.626c-.017.847.863 1.727 1.693 1.71a1.687 1.687 0 0 0 1.626-1.743 1.615 1.615 0 0 0-1.643-1.593Zm8.68 12c.98.033 1.71-.647 1.727-1.593a1.646 1.646 0 0 0-1.51-1.793 1.646 1.646 0 0 0-1.793 1.51v.233a1.609 1.609 0 0 0 1.543 1.66c0-.017.017-.017.033-.017z"})})}function b0t({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[h.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),h.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function y0t({size:e=16}){return h.jsx("img",{className:"tinker-logo block flex-none object-contain",src:h0t,width:e,height:e,style:{transform:e>=48?`translateX(${Math.round(e*.18)}px) scale(1.65)`:"scale(1.22)"},alt:"","aria-hidden":"true"})}function x0t({size:e=16}){return h.jsx("img",{className:"block flex-none object-contain",src:d0t,width:e,height:e,alt:"","aria-hidden":"true"})}function ab({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-0.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-0.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})})}function Yp({kind:e,size:n=16}){switch(e){case"modal_job":return h.jsx(m0t,{size:n});case"hf_job":return h.jsx(p0t,{size:n});case"k8s_job":return h.jsx(g0t,{size:n});case"ssh_job":return h.jsx(JN,{size:n,strokeWidth:1.5});case"slurm_job":return h.jsx(x0t,{size:n});case"ray_job":return h.jsx(v0t,{size:n});case"openresearch_job":return h.jsx(b0t,{size:n});case"tinker_job":return h.jsx(y0t,{size:n});case"local_job":return h.jsx(u_t,{size:n,strokeWidth:1.5});default:return h.jsx(JN,{size:n})}}function k6({backend:e}){const n=Y3(e),t=Qct(e);return n?h.jsxs("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted",children:[h.jsx(Yp,{kind:n}),h.jsx("span",{className:"backend-name",children:_0t(n)}),t&&h.jsx("span",{className:"backend-detail text-sm",children:t})]}):h.jsx("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted muted text-muted",children:"—"})}function N2(e,n){const[t,r]=M.useState(e);return M.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function Dg(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function w0t(e){const t=(e.trim().split(/[?#]/)[0].split("/").filter(Boolean).pop()??"").replace(/\.(pdf|md)$/i,"");return/^\d{4}\.\d{4,5}(v\d+)?$/.test(t)?t:null}function S0t(e){const n=e==null?void 0:e.trim().match(/github\.com[/:]([^/]+)\/([^/?#]+)/i);return n?{owner:n[1],repo:n[2].replace(/\.git$/,"")}:null}function k0t(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function C0t({onCreated:e,onCancel:n,remote:t=!1}){var ar,cn,hn,Pn;const[r,s]=M.useState("blank"),[i,o]=M.useState(""),[a,l]=M.useState(!1),[u,_]=M.useState(""),[f,p]=M.useState(!1),[m,x]=M.useState(!1),[S,b]=M.useState(!1),[v,y]=M.useState(null),[w,C]=M.useState(!1),[N,E]=M.useState(!1),[j,z]=M.useState(""),[R,O]=M.useState(null),[I,F]=M.useState(!1),U=M.useRef(0),q=M.useRef(0),Y=M.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),V=r==="paper"?S0t(R==null?void 0:R.repoUrl):null,Z=i.trim()?`~/OpenResearch/${Dg(i,48)}`:"",te=`~/OpenResearch/${Dg(i||(R==null?void 0:R.title)||(R==null?void 0:R.paperId)||"")}`,P=r==="blank"&&!f?Z:r==="paper"&&R&&!f?te:u,L=N2(P.trim(),200),$=ht({...j0(L),enabled:!!L&&L===P.trim()}),H=L===P.trim()?$.data??null:null,G=L===P.trim()?((ar=$.error)==null?void 0:ar.message)??null:null,ne=!!P.trim()&&(L!==P.trim()||$.isFetching),oe=V??(r==="folder"&&(H!=null&&H.githubOwner)&&H.githubRepo?{owner:H.githubOwner,repo:H.githubRepo}:null),le=ht(Rut()),se=((cn=le.data)==null?void 0:cn.login)??(le.isPending?void 0:null),Q=ht(X3()),ce=M.useRef(!1);M.useEffect(()=>{ce.current||!Q.data||(ce.current=!0,E(Q.data.githubForNewProjects))},[Q.data]);const ee=N2(i.trim(),150),ue=ht({...Mut(ee),enabled:ee===i.trim()}),de=ee===i.trim()?((hn=ue.data)==null?void 0:hn.repo)??Dg(i,48):Dg(i,48),ye=ee!==i.trim()||ue.isFetching,Ae=ht({...jN((oe==null?void 0:oe.owner)??"",(oe==null?void 0:oe.repo)??""),enabled:!!oe,subscribed:!!oe}),Ve=!!oe&&Ae.isFetching,Ge=oe&&((Pn=Ae.data)!=null&&Pn.canPush)?`github.com/${oe.owner}/${oe.repo}`:null,$e=N2(j.trim(),350),ut=w0t($e),pt=r==="paper"&&!R&&$e===j.trim(),Ut=ht({...CL($e),enabled:pt&&!ut&&$e.length>=3,subscribed:pt&&!ut&&$e.length>=3}),It=ht({...A4(ut??""),enabled:pt&&!!ut,subscribed:pt&&!!ut}),$t=pt&&!ut?Ut.data??[]:[],tt=pt&&Ut.isSuccess?$e:"",mt=I||r==="paper"&&!R&&($e!==j.trim()||(ut?It.isFetching:Ut.isFetching));M.useEffect(()=>{var gt;!pt||!ut||!It.data||(O(It.data),a||o(((gt=It.data.title)==null?void 0:gt.trim())||It.data.paperId))},[pt,ut,It.data,a]),M.useEffect(()=>{const gt=ut?It.error:Ut.error;pt&>&&y(gt.message)},[pt,ut,It.error,Ut.error]);const At=Cn({mutationFn:Fot});async function ke(gt){var qe;const vt=++U.current;F(!0),y(null);try{const ft=await Je.fetchQuery(A4(gt));if(vt!==U.current)return;O(ft),a||o(((qe=ft.title)==null?void 0:qe.trim())||ft.paperId)}catch(ft){vt===U.current&&y(ft instanceof Error?ft.message:String(ft))}finally{vt===U.current&&F(!1)}}function De(){U.current+=1,q.current+=1,O(null),z(""),F(!1),x(!1),_(""),p(!1),Y.current.paper={name:a?i:"",nameTouched:a,path:"",pathTouched:!1},a||o("")}function We(gt){if(gt===r)return;U.current+=1,q.current+=1,Y.current[r]={name:i,nameTouched:a,path:u,pathTouched:f};const vt=Y.current[gt];s(gt),y(null),F(!1),x(!1),o(vt.name),l(vt.nameTouched),_(vt.path),p(vt.pathTouched)}async function rt(){if(m)return;const gt=++q.current;x(!0),y(null);try{const vt=await Pot();if(gt!==q.current||!vt)return;if(p(!0),_(vt),Je.invalidateQueries(j0(vt)),r==="folder"&&!a){const qe=vt.replace(/[\\/]+$/,"").split(/[\\/]/).pop();qe&&o(qe)}}catch(vt){gt===q.current&&y(vt instanceof Error?vt.message:String(vt))}finally{gt===q.current&&x(!1)}}async function bt(gt){if(gt.preventDefault(),!!yt){b(!0),y(null);try{const vt=await Je.fetchQuery({...j0(P.trim()),staleTime:0});if(vt.exists&&vt.directory===!1)throw new Error(_2());if(r==="blank"&&vt.exists)throw new Error(IE());if(r==="paper"&&vt.empty===!1)throw new Error(HE());N&&oe&&await Je.fetchQuery({...jN(oe.owner,oe.repo),staleTime:0}).catch(()=>null);const qe=await At.mutateAsync({name:i.trim(),path:P.trim(),createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:N,locale:T(),...r==="paper"&&R?{paperId:R.paperId,cloneUrl:R.repoUrl??void 0}:{}});e(qe.project,qe.githubPublicationError)}catch(vt){y(vt instanceof Error?vt.message:String(vt))}finally{b(!1)}}}const Wt=i.trim(),Pe=r==="paper"&&R&&!R.repoUrl?R.paperId:null,Dt=r==="folder"&&(H==null?void 0:H.gitState)==="ready"?H.resolvedPath??null:null,ln=Wt!==""&&(r==="blank"||Pe!==null||Dt!==null);M.useEffect(()=>{if(!ln)return;const gt=window.setTimeout(()=>{Vot({name:Wt,paperId:Pe??void 0,path:Dt??void 0,locale:T()}).catch(()=>{})},1200);return()=>window.clearTimeout(gt)},[ln,Wt,Pe,Dt]);const kn=(H==null?void 0:H.gitVersion)===null,Jt=r==="folder"&&!!P.trim()&&H!==null&&H.exists===!1,Gn=r==="blank"&&(H==null?void 0:H.exists)===!0,Gt=!!P.trim()&&(H==null?void 0:H.exists)===!0&&H.directory===!1,sn=r==="paper"&&!!(R!=null&&R.repoUrl)&&(H==null?void 0:H.empty)===!1,Wn=r==="paper"&&!!R&&!(R!=null&&R.repoUrl)&&(H==null?void 0:H.empty)===!1,Tn=r==="folder"&&((H==null?void 0:H.gitState)==="detached"||(H==null?void 0:H.gitState)==="invalid"),Er=f&&!P.trim()||Gt||sn||Wn,rr=f&&!P.trim()||Gt||Gn,Or=f&&!P.trim()?FE():Gt?_2():Gn?IE():null,Nr=f&&!P.trim()?FE():Gt?_2():sn?HE():Wn?b3e():null,yt=!!(i.trim()&&P.trim())&&!S&&!m&&!ne&&H!==null&&!G&&!kn&&!Jt&&!Gn&&!Gt&&!sn&&!Wn&&!Tn&&(r!=="paper"||!!R)&&(!N||typeof se=="string"&&!ye&&!Ve),fn=Ge??`github.com/${se??"you"}/${de}`,wn=se===void 0||ye||Ve,Xt=r==="paper"&&!R&&j.trim().length>=3&&tt===j.trim()&&!mt&&$t.length===0&&!v;return h.jsxs("form",{className:"form [&_.form-seg]:self-start [&_.form-seg]:mb-0.5 [&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3 [&_.repo-hint]:font-normal [&_.repo-hint]:text-sm [&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal [&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center [&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full [&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5 [&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background [&_.folder-picker-control]:border [&_.folder-picker-control]:border-border [&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer [&_.folder-picker-control]:text-start [&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard [&_.folder-picker-control:hover:not(:disabled)]:border-muted [&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle [&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text [&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1 [&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden [&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap [&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none [&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none [&_.folder-picker-chevron]:text-muted [&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext [&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm [&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4] [&_.project-location-field]:flex [&_.project-location-field]:flex-col [&_.project-location-field]:gap-2 [&_.project-location-label]:text-text [&_.project-location-label]:text-base [&_.project-location-label]:font-medium [&_.project-field-label]:text-text [&_.project-field-label]:text-base [&_.project-field-label]:font-medium [&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65 [&_.paper-destination]:flex [&_.paper-destination]:items-center [&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3 [&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md [&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1 [&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden [&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm [&_.paper-destination_code]:font-normal [&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap [&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px] [&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant [&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface [&_.project-path-notice]:text-subtext [&_.project-path-notice]:text-sm [&_.project-path-notice]:leading-[1.4] [&_.project-path-notice.error]:border-danger-notice-border [&_.paper-results]:flex [&_.paper-results]:flex-col [&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md [&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto [&_.paper-results_button]:flex [&_.paper-results_button]:flex-col [&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5 [&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent [&_.paper-results_button]:border-0 [&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant [&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit] [&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer [&_.paper-results_button:last-child]:border-b-0 [&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm [&_.paper-results_.title]:font-medium [&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted [&_.paper-pick_.id]:text-xs [&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center [&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3 [&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md [&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0 [&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium flex flex-col [&_label]:flex [&_label]:flex-col [&_label]:gap-1 [&_label]:text-sm [&_label]:text-text [&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2 [&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end [&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start [&_.new-project-actions]:mt-2.5 [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap new-project-form gap-4.5 [&_>_label]:gap-2",onSubmit:bt,children:[h.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default form-seg",children:[h.jsx("button",{type:"button",className:r==="blank"?"active":"","aria-pressed":r==="blank",onClick:()=>We("blank"),children:t6e()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="paper"?"":" invisible"}`}),h.jsx("button",{type:"button",className:r==="folder"?"active":"","aria-pressed":r==="folder",onClick:()=>We("folder"),children:k6e()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="blank"?"":" invisible"}`}),h.jsx("button",{type:"button",className:r==="paper"?"active":"","aria-pressed":r==="paper",onClick:()=>We("paper"),children:R6e()})]}),r==="paper"&&!R&&h.jsxs("label",{className:"!font-normal",children:[tSe(),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:j,onChange:gt=>{y(null),z(gt.target.value)},placeholder:fSe()}),!Xt&&h.jsx("span",{className:"repo-hint",children:mt?rke():QSe()}),Xt&&h.jsx("span",{className:"project-path-notice block",children:q6e()}),$t.length>0&&h.jsx("div",{className:"paper-results",children:$t.map(gt=>h.jsxs("button",{type:"button",onClick:()=>void ke(gt.paperId),children:[h.jsx(ep,{children:gt.title}),h.jsx("span",{className:"id",children:gt.paperId})]},gt.paperId))})]}),R&&r==="paper"&&h.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[h.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[h.jsxs("div",{className:"meta",children:[h.jsx(ep,{className:"block",children:R.title||R.paperId}),R.repoUrl&&h.jsx("div",{className:"id",children:k0t(R.repoUrl)})]}),h.jsx(Oe,{size:"small",type:"button","aria-label":h6e(),onClick:De,children:c6e()})]}),!R.repoUrl&&h.jsxs("div",{className:"flex w-full flex-col items-start gap-1 rounded-md border border-border-variant bg-background px-[9px] py-1 text-sm font-normal text-subtext",children:[h.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[h.jsx(fO,{size:16})," ",V6e()]}),h.jsx("span",{className:"text-sm font-normal text-accent-amber",children:X6e()})]})]}),(r!=="paper"||R)&&h.jsxs(h.Fragment,{children:[r==="blank"&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:PE()}),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:gt=>{l(!0),o(gt.target.value)},placeholder:$E()})]}),r==="paper"?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:R!=null&&R.repoUrl?D3e():p2()}),h.jsx("input",{className:"text-sm font-normal",value:P,onChange:gt=>{p(!0),_(gt.target.value)},"aria-describedby":Er?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),ne&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:BE()}),Er&&h.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Nr})]}):r==="folder"&&!t?h.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?S3e({path:ze(u)}):LE(),disabled:m,title:u||void 0,onClick:()=>void rt(),children:[h.jsx(J0,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),h.jsx("span",{className:u?"text-sm":"placeholder",children:m?j3e():u||LE()}),h.jsx(qo,{className:"folder-picker-chevron",size:15})]}):r==="folder"?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:p2()}),h.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:gt=>{p(!0),_(gt.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):i.trim()?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:p2()}),h.jsx("input",{className:"text-sm font-normal",value:P,onChange:gt=>{p(!0),_(gt.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":rr?"blank-destination-description":void 0,spellCheck:!1}),ne&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:BE()}),rr&&h.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Or})]}):null,r!=="blank"&&P&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:PE()}),h.jsx("input",{className:"text-sm font-normal",value:i,onChange:gt=>{l(!0),o(gt.target.value)},placeholder:$E()})]}),kn&&h.jsx("div",{className:"project-path-notice error",children:O6e()}),!kn&&r==="folder"&&u.trim()&&!ne&&(H==null?void 0:H.exists)===!1&&h.jsx("div",{className:"project-path-notice error",children:bSe()}),!kn&&r==="folder"&&u.trim()&&!ne&&Gt&&h.jsx("div",{className:"project-path-notice error",children:NSe()}),!kn&&r==="folder"&&!ne&&(H==null?void 0:H.gitState)==="detached"&&h.jsx("div",{className:"project-path-notice error",children:g6e()}),!kn&&r==="folder"&&!ne&&(H==null?void 0:H.gitState)==="invalid"&&h.jsx("div",{className:"project-path-notice error",children:SSe()}),G&&h.jsx("div",{className:"project-path-notice error",role:"alert",children:G})]}),v&&h.jsx("div",{className:"error",role:"alert",children:v}),(r!=="paper"||R)&&P&&(r!=="blank"||i.trim())&&h.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[h.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium${N&&se===null?" text-accent-red":" text-text"}`,"aria-expanded":w,"aria-controls":"new-project-advanced-settings",onClick:()=>C(gt=>!gt),children:[N?se===null?f3e():p3e():o3e(),h.jsx(Ho,{className:w?"rotate-180":"",size:16})]}),w&&h.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[h.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[h.jsx("input",{className:"m-0",type:"checkbox",checked:N,onChange:gt=>E(gt.target.checked),disabled:S}),h.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:pSe()})]}),h.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[h.jsx("span",{children:wn?ASe({repository:ze(fn)}):Ge?$Se({repository:ze(fn)}):LSe({repository:ze(fn)})}),h.jsx("span",{children:z6e()}),se===null&&h.jsx("span",{children:JSe({command:ze("gh auth login")})})]})]})]}),h.jsxs("div",{className:"actions new-project-actions",children:[n&&h.jsx(Oe,{type:"button",onClick:n,children:i6e()}),h.jsx(Oe,{variant:"primary",className:"ms-auto",disabled:!yt,children:S?G3e():r==="paper"?R!=null&&R.repoUrl?B3e():OE():r==="folder"?oke():OE()})]})]})}function CO({onClose:e,onCreated:n,remote:t=!1}){const r=M.useRef(null),s=M.useRef(e);return s.current=e,M.useEffect(()=>{const i=r.current;if(!i)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...i.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(i.querySelector("[data-initial-focus]")??a()[0]??i).focus();const l=u=>{if(u.key==="Escape"){u.preventDefault(),u.stopPropagation(),s.current();return}if(u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&!u.altKey&&u.shiftKey){u.preventDefault(),u.stopPropagation();return}if(u.key!=="Tab")return;const _=a();if(_.length===0){u.preventDefault(),i.focus();return}const f=_[0],p=_[_.length-1];u.shiftKey&&document.activeElement===f?(u.preventDefault(),p.focus()):!u.shiftKey&&document.activeElement===p&&(u.preventDefault(),f.focus())};return document.addEventListener("keydown",l,!0),()=>{document.removeEventListener("keydown",l,!0),o==null||o.focus()}},[]),h.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-start justify-center p-5 [--new-project-modal-top:clamp(4rem,20vh,24rem)] pt-[var(--new-project-modal-top)] overflow-y-auto z-100",onClick:i=>{i.target===i.currentTarget&&e()},children:h.jsxs("div",{ref:r,className:"modal w-120 max-w-full max-h-[calc(100vh_-_var(--new-project-modal-top)_-_1.25rem)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl [&_h2]:font-medium",role:"dialog","aria-modal":"true","aria-labelledby":"new-project-dialog-title",tabIndex:-1,children:[h.jsx("h2",{id:"new-project-dialog-title",children:kD()}),h.jsx(C0t,{onCancel:e,onCreated:n,remote:t})]})})}function E0t({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=M.useRef(null),o=M.useRef(r),a=M.useRef(n);o.current=r,a.current=n,M.useEffect(()=>{const u=i.current;if(!u)return;const _=document.activeElement instanceof HTMLElement?document.activeElement:null,f=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(f()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),a.current||o.current();return}if(m.key!=="Tab")return;const x=f();if(x.length===0){m.preventDefault(),u.focus();return}const S=x[0],b=x[x.length-1];m.shiftKey&&document.activeElement===S?(m.preventDefault(),b.focus()):!m.shiftKey&&document.activeElement===b&&(m.preventDefault(),S.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),_==null||_.focus()}},[]);const l=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return h.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:u=>{!n&&u.target===u.currentTarget&&r()},children:h.jsxs("div",{ref:i,className:"modal w-110 max-w-full bg-background border border-border rounded-xl shadow-modal p-6",role:"dialog","aria-modal":"true","aria-labelledby":"delete-project-dialog-title","aria-describedby":"delete-project-dialog-description",tabIndex:-1,children:[h.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:JTe()}),h.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[h.jsx("p",{className:"m-0",children:DTe({name:Ro(e.name)})}),h.jsx("p",{className:"m-0",children:l?_je():vje()}),t&&h.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),h.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h.jsx(Oe,{disabled:n,onClick:r,children:GTe()}),h.jsx(Oe,{variant:"danger",disabled:n,onClick:s,children:n?oje():rje()})]})]})})}function sz(){return h.jsx("span",{className:"activity-pulse h-2 w-2 shrink-0 rounded-full bg-accent-teal animate-[or-pulse_1.2s_ease-in-out_infinite]"})}function N0t({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,o]=M.useState(!1),[a,l]=M.useState(null),[u,_]=M.useState(null),[f,p]=M.useState(null),m=ht(Aut()),x=Object.fromEntries((m.data??[]).map(b=>[b.projectId,b]));async function S(b){l(b.id),_(null);try{await Yot(b.id),_(null),p(null),r(b.id)}catch(v){_(v instanceof Error?v.message:String(v))}finally{l(null)}}return h.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[h.jsxs("div",{className:"home-inner max-w-290 my-0 mx-auto pt-12 px-6 pb-16 [@media((max-width:_960px))]:pt-6 [@media((max-width:_960px))]:px-4",children:[h.jsxs("div",{className:"home-head flex items-center justify-between gap-3 mb-4.5 [&_h2]:m-0 [&_h2]:text-4xl [&_h2]:tracking-[-0.02em] [@media((max-width:_520px))]:items-start [@media((max-width:_520px))]:flex-col",children:[h.jsx("h2",{children:Mje()}),h.jsxs(Oe,{onClick:()=>o(!0),children:[h.jsx(y6,{size:15})," ",kD()]})]}),h.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:h.jsxs("div",{children:[h.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border bg-background py-2.5 ps-4 pe-2 text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:hidden",children:[h.jsx("span",{children:Tje()}),h.jsx("span",{children:YE()}),h.jsx("span",{children:XE()}),h.jsx("span",{children:ZE()})]}),e.length===0?h.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:Cje()}):[...e].sort((b,v)=>{var C,N;const y=((C=x[b.id])==null?void 0:C.lastMessageAt)??b.createdAt;return(((N=x[v.id])==null?void 0:N.lastMessageAt)??v.createdAt)-y||b.name.localeCompare(v.name)}).map(b=>{const v=x[b.id],y=b.githubEnabled?b.githubUrl??(b.githubOwner&&b.githubRepo?`https://github.com/${b.githubOwner}/${b.githubRepo}`:null):null,w=y?b.githubOwner&&b.githubRepo?`${b.githubOwner}/${b.githubRepo}`:y.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):CD(),C=v?v.activeAgents>0?ETe({count:nn(v.activeAgents)}):Pje():"—",N=v?v.totalAgents===1?Vje():jTe({count:nn(v.totalAgents)}):"—",E=v?v.runningExperiments>0?Xje({count:nn(v.runningExperiments)}):v.totalExperiments===0?q3():JE({count:nn(v.totalExperiments)}):"—",j=v&&v.runningExperiments>0?JE({count:nn(v.totalExperiments)}):null;return h.jsxs("div",{className:"group project-row relative grid cursor-pointer grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border-variant py-4 ps-4 pe-2 text-start transition-colors duration-120 ease-standard last:border-b-0 hover:bg-surface-bright focus-within:bg-surface-bright [@media((max-width:_960px))]:grid-cols-[minmax(0,0.8fr)_minmax(0,0.8fr)_minmax(0,1.4fr)] [@media((max-width:_960px))]:items-start [@media((max-width:_960px))]:gap-x-4 [@media((max-width:_960px))]:gap-y-3 [@media((max-width:_960px))]:py-4 [@media((max-width:_960px))]:px-4 [@media((max-width:_600px))]:grid-cols-2",children:[h.jsx("button",{className:"project-row-open absolute inset-0 z-0 cursor-pointer rounded-[inherit] focus-visible:outline focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-[-2px]","aria-label":WK({name:Ro(b.name)}),onClick:()=>n(b.id)}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none [@media((max-width:_960px))]:col-span-3 [@media((max-width:_600px))]:col-span-2",children:[h.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:b.name}),h.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[h.jsxs("span",{children:[QTe()," ",Lo(b.createdAt)]}),b.paperId&&h.jsx("span",{"aria-hidden":"true",children:"·"}),b.paperId&&h.jsxs("span",{children:[FTe()," ",ze(b.paperId)]}),h.jsx("button",{className:"project-row-secondary project-row-delete inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm leading-0 text-muted opacity-0 pointer-events-none transition-opacity hover:bg-surface hover:text-accent-red group-hover:opacity-100 group-hover:pointer-events-auto group-focus-within:opacity-100 group-focus-within:pointer-events-auto focus:opacity-100 focus:pointer-events-auto focus-visible:outline focus-visible:outline-2 focus-visible:outline-text","aria-label":_4({name:Ro(b.name)}),disabled:a===b.id,onClick:z=>{z.stopPropagation(),_(null),p(b)},children:h.jsx(s_,{size:14})})]})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:YE()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[v&&v.activeAgents>0&&h.jsx(sz,{}),C]}),h.jsx("span",{className:"text-xs text-muted",children:N})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:XE()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[v&&v.runningExperiments>0&&h.jsx(sz,{}),E]}),j&&h.jsx("span",{className:"text-xs text-muted",children:j})]}),h.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:mb-1 [@media((max-width:_960px))]:block",children:ZE()}),y?h.jsxs("a",{className:"project-row-secondary inline-flex max-w-full items-center gap-2 text-sm text-text no-underline pointer-events-auto hover:underline underline-offset-2",href:y,target:"_blank",rel:"noreferrer","aria-label":V1({name:Ro(b.name)}),children:[h.jsx("span",{className:"inline-flex shrink-0",children:h.jsx(ab,{size:14})}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:ze(w)})]}):h.jsx("span",{className:"text-sm text-text pointer-events-none",children:w})]})]},b.id)})]})})]}),i&&h.jsx(CO,{remote:s,onClose:()=>o(!1),onCreated:(b,v)=>{o(!1),t(b,v)}}),f&&h.jsx(E0t,{project:f,deleting:a===f.id,error:u,onClose:()=>{_(null),p(null)},onConfirm:()=>void S(f)})]})}function EO(){const e=M.useSyncExternalStore(Eut,NN,NN);return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":m4()}),!e&&h.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[h.jsx(fO,{size:13,className:"shrink-0 text-accent-amber"}),h.jsx("span",{dir:"auto",className:"min-w-0",children:m4()})]})]})}const NO=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),iz=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-panel [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),y0={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode"};function z0t(e){var r,s;const n=e.find(i=>i.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:Z1(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Xv(n,t).defaultId}}function so(e){const[n,t]=M.useState(!1),r=M.useRef(null);return M.useEffect(()=>{if(!n)return;const s=o=>{var a,l;o.target instanceof Node&&!((a=r.current)!=null&&a.contains(o.target))&&!((l=e==null?void 0:e.current)!=null&&l.contains(o.target))&&t(!1)},i=o=>{var a;o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),t(!1),(a=e==null?void 0:e.current)==null||a.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",i,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function T0t({value:e,onSelect:n,permissionChoices:t=[],defaultPermissionId:r,onSelectPermission:s,reasoningChoices:i=[],defaultReasoningId:o,onSelectReasoning:a,lockHarness:l=!1,className:u}){var ne,oe,le,se,Q,ce;const{data:_=j0t}=ht(Wp()),f=M.useRef(null),p=M.useRef(null),{open:m,setOpen:x,ref:S}=so(f),[b,v]=M.useState(""),[y,w]=M.useState("root"),C=()=>{x(!1),w("root"),v("")};M.useEffect(()=>{var ee;m&&(y==="reasoning"||y==="speed"||y==="permissions")&&((ee=p.current)==null||ee.focus())},[m,y]);const N=M.useMemo(()=>{const ee=b.trim().toLowerCase();return(l&&e?_.filter(de=>de.id===e.harness):_).map(de=>{let ye=de.models;return ee?ye=ye.filter(Ae=>Ae.id.toLowerCase().includes(ee)):de.id==="opencode"&&(ye=ye.slice(0,6)),{harness:de,models:ye,hidden:ee?0:de.models.length-ye.length}})},[_,b,l,e]),E=(ee,ue)=>{var ye;const de=(e==null?void 0:e.harness)===ee.id;n({harness:ee.id,model:ue,serviceTier:Z1(ee,ue,de?e==null?void 0:e.serviceTier:null),permissionMode:de?e.permissionMode:((ye=ee.options)==null?void 0:ye.defaultPermissionMode)??null,reasoningLevel:mL(ee,ue,de?e.reasoningLevel:null)}),C()},j=(e==null?void 0:e.model)!=null?(ne=_.find(ee=>ee.id===e.harness))==null?void 0:ne.models.find(ee=>ee.id===e.model):void 0,z=e?e.model?j?Y1(j):vL(e.model):RE():h2(),R=(e==null?void 0:e.reasoningLevel)??o??((oe=i[0])==null?void 0:oe.id),O=(le=i.find(ee=>ee.id===R))==null?void 0:le.label,I=(e==null?void 0:e.permissionMode)??r??((se=t[0])==null?void 0:se.id),F=(Q=t.find(ee=>ee.id===I))==null?void 0:Q.label,U=(e==null?void 0:e.harness)==="opencode"?r3e():g5e(),q=_.find(ee=>ee.id===(e==null?void 0:e.harness)),Y=pL(q,e==null?void 0:e.model),V=Z1(q,e==null?void 0:e.model,e==null?void 0:e.serviceTier),Z=(ce=Y.find(ee=>ee.id===V))==null?void 0:ce.label,te=ee=>{a==null||a(ee),C()},P=ee=>{s==null||s(ee),C()},L=ee=>{e&&n({...e,serviceTier:ee}),C()},$=(ee,ue,de)=>h.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>w(de),children:[h.jsx("span",{className:"flex-1",children:ee}),ue&&h.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:ue}),h.jsx(qo,{size:14,className:"shrink-0 text-muted"})]}),H=ee=>h.jsxs("button",{ref:p,type:"button",className:"model-submenu-header flex w-full items-center gap-2 border-0 border-b border-solid border-b-border-variant bg-transparent px-2 py-2 text-start text-sm font-medium text-text hover:bg-surface",onClick:()=>{w("root"),v("")},children:[h.jsx(uO,{size:15}),ee]}),G=(ee,ue,de,ye)=>h.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:ee.map(Ae=>h.jsxs(Ur,{onClick:()=>ye(Ae.id),children:[h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[Ae.label,Ae.id===de&&h.jsxs("span",{className:"font-normal text-muted",children:[" ",gD()]})]}),Ae.description&&h.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Ae.description})]}),Ae.id===ue&&h.jsx(qi,{size:13})]},Ae.id))});return h.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:S,children:[h.jsxs("button",{ref:f,type:"button",className:Ts("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",u),title:qV({label:`${z}${O?` · ${O}`:""}${Z?` · ${Z}`:""}`}),"aria-haspopup":"menu","aria-expanded":m,onClick:()=>{m?C():(w("root"),x(!0))},children:[V==="priority"?h.jsx(t0t,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?h.jsx(F4,{harness:e.harness,size:14}):null,V==="priority"&&h.jsxs("span",{className:"sr-only",children:[x5e()," "]}),h.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[z,O&&h.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:O})]}),h.jsx(Ho,{size:14,className:"shrink-0 text-muted"})]}),m&&h.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[y==="root"&&h.jsxs("div",{className:"model-root-menu p-1",children:[$(h2(),z,"models"),i.length>0&&$(U,O,"reasoning"),Y.length>0&&$(DE(),Z,"speed"),t.length>0&&$(ME(),F,"permissions")]}),y==="models"&&h.jsxs(h.Fragment,{children:[H(h2()),h.jsx("input",{autoFocus:!0,type:"text",placeholder:$5e(),value:b,onChange:ee=>v(ee.target.value)}),h.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[N.map(({harness:ee,models:ue,hidden:de})=>h.jsxs("div",{className:"[&_.model-item]:ps-6",children:[h.jsxs("div",{className:NO,children:[h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(F4,{harness:ee.id,size:14}),ee.name]}),!ee.agentReady&&h.jsxs("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:[h.jsx(ZN,{size:10})," ",Ol()]})]}),ee.agentReady?h.jsxs(h.Fragment,{children:[ee.models.length===0&&h.jsxs(Ur,{onClick:()=>E(ee,null),children:[h.jsxs("span",{children:[RE(),h.jsx("span",{className:"model-id",children:mD()})]}),(e==null?void 0:e.harness)===ee.id&&(e==null?void 0:e.model)===null&&h.jsx(qi,{size:13})]}),ue.map(ye=>h.jsxs(Ur,{title:ye.id,onClick:()=>E(ee,ye.id),children:[h.jsx("span",{children:Y1(ye)}),(e==null?void 0:e.harness)===ee.id&&(e==null?void 0:e.model)===ye.id&&h.jsx(qi,{size:13})]},ye.id)),de>0&&h.jsx("div",{className:iz,children:A5e({count:nn(de)})}),b.trim().length>0&&!ee.models.some(ye=>ye.id===b.trim())&&h.jsx(Ur,{onClick:()=>E(ee,b.trim()),children:h.jsx("span",{children:J5e({id:ze(b.trim())})})})]}):h.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:ee.agentNote?Qp(ee.agentNote):L5e()})]},ee.id)),_.length===0&&h.jsx("div",{className:iz,children:h5e()})]}),l&&e&&_.length>1&&h.jsxs("div",{className:"model-locked-note flex items-center gap-1.5 py-[7px] px-3 text-sm text-muted border-t border-t-border-variant [&_svg]:shrink-0",children:[h.jsx(ZN,{size:11}),q5e()]})]}),y==="reasoning"&&h.jsxs(h.Fragment,{children:[H(U),G(i,R,o,te)]}),y==="permissions"&&h.jsxs(h.Fragment,{children:[H(ME()),G(t,I,r,P)]}),y==="speed"&&h.jsxs(h.Fragment,{children:[H(DE()),G(Y,V??void 0,"default",L)]})]})]})}function np({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:i=!1,disabled:o=!1,variant:a="pill",title:l,numbered:u=!1,renderIcon:_,onSelect:f,className:p}){var j,z;const{open:m,setOpen:x,ref:S}=so();if(e.length===0)return null;const b=n??t??((j=e[0])==null?void 0:j.id)??null,v=e.find(R=>R.id===b),y=e.find(R=>R.id===t),w=a==="bare"&&(y==null?void 0:y.id)===X1?y:void 0,C=w?e.filter(R=>R.id!==w.id):e,N=(v==null?void 0:v.label)??((z=e[0])==null?void 0:z.label)??"",E=R=>{f(R),x(!1)};return h.jsxs("div",{className:`option-picker relative inline-flex${a==="field"?" w-full":""}`,ref:S,children:[h.jsxs("button",{type:"button",className:Ts(a==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${a==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,p),title:l,"aria-haspopup":"menu","aria-expanded":m,disabled:o,onClick:()=>x(R=>!R),children:[h.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[v&&(_==null?void 0:_(v)),h.jsx("span",{className:"truncate",children:N})]}),h.jsx(Ho,{size:12})]}),m&&h.jsxs("div",{className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(R=>R.description)?"min-w-80":""} ${a==="field"?"min-w-full":""} ${s==="right"?"align-right":""} ${i?"drop-down":""}`,children:[r&&h.jsx("div",{className:NO,children:r}),w&&h.jsxs(h.Fragment,{children:[h.jsxs(Ur,{type:"button",onClick:()=>E(w.id),children:[h.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(w),h.jsxs("span",{children:[w.label,h.jsx("span",{className:"option-default text-muted font-normal",children:mD()})]})]}),b===w.id&&h.jsx(qi,{size:13})]}),h.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),C.map((R,O)=>h.jsxs(Ur,{type:"button",onClick:()=>E(R.id),children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(R),h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[R.label,!w&&R.id===t&&h.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",gD()]})]}),R.description&&h.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:R.description})]})]}),b===R.id?h.jsx(qi,{size:13}):u&&h.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:O+1})]},R.id))]})]})}const j0t=[];function H4({size:e=16,className:n}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[h.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),h.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}function av({runtime:e,corner:n=!1}){const[t,r]=M.useState(!1),[s,i]=M.useState(!1),[o,a]=M.useState(!1),[l,u]=M.useState(null),_=so();async function f(){if(l){a(!0);try{await dL(l),u(null)}catch(p){u(null),ir(p instanceof Error?p.message:String(p),"error")}finally{a(!1)}}}return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:_.ref,children:[_.open&&h.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[h.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[h.jsx("div",{className:"text-sm font-medium text-text",children:LAe({host:ze(e.session.host),user:ze(e.session.user??"")})}),h.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",ze(e.session.version??"…")]})]}),h.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[h.jsx(Ur,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await uL(),_.setOpen(!1)}catch(p){ir(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?AAe():b4()}),h.jsx(i6,{content:dMe(),className:"me-2 shrink-0 text-subtext",children:h.jsx(g6,{size:15})})]}),h.jsx(Ur,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await fL()),_.setOpen(!1)}catch(p){ir(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:zD()})]}),n?h.jsxs(Oe,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":_.open,onClick:()=>_.setOpen(p=>!p),children:[h.jsx(H4,{size:14,className:"shrink-0"}),h.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:m2({host:ze(e.session.host)})})]}):h.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[h.jsx(tn,{size:"small","aria-label":m2({host:ze(e.session.host)}),"aria-haspopup":"menu","aria-expanded":_.open,onClick:()=>_.setOpen(p=>!p),children:h.jsx(H4,{size:14,className:"shrink-0"})}),h.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[h.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:m2({host:ze(e.session.host)})}),h.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",ze(e.session.version??"…")]})]})]})]}),l&&h.jsx(VL,{host:e.session.host,preview:l,currentClientAttached:e.session.status==="connected",stopping:o,onClose:()=>{o||u(null)},onConfirm:()=>void f()})]})}function C6(e=!0){var r;const n=ev(),t=ht({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>Wr(n.queryKey,s)}}const A0t=6e4,R0t=500;function zO(e){const[n,t]=M.useState(!1),[r,s]=M.useState(null),i=M.useRef(!1);M.useEffect(()=>(i.current=!1,()=>{i.current=!0}),[]);const o=e!=null&&e.restartRequired?e.instance:null;return{restarting:n,error:r,restart:()=>{if(!o||n)return;const l=ev(),u=()=>i.current||!Mn(l.queryKey);t(!0),s(null),(async()=>{try{if(await jlt(),u())return;const _=Date.now()+A0t;for(;Date.now()<_;){if(await new Promise(p=>setTimeout(p,R0t)),u())return;const f=await Je.fetchQuery({...l,staleTime:0}).catch(()=>null);if(u())return;if(f&&f.instance!==o){window.location.reload();return}}throw new Error(fat())}catch(_){if(u())return;s(_ instanceof Error?_.message:String(_)),t(!1)}})()}}}function TO({status:e}){const[n,t]=M.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:o}=zO(e);return!r||n===r?null:h.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-surface border-b border-b-border",role:"status",children:[h.jsx(ro,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),h.jsx("span",{className:"min-w-0",children:i?nL({error:i}):Xit({version:ze(r)})}),(e==null?void 0:e.canRestart)&&h.jsx(Oe,{type:"button",size:"small",disabled:s,onClick:o,children:s?rL():tL()}),h.jsx(tn,{type:"button",size:"small",className:"ms-auto","aria-label":tat(),disabled:s,onClick:()=>t(r),children:h.jsx(es,{size:13})})]})}function E6(){return h.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:h.jsx(Ot,{})})}function M0t(){return h.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[h.jsx("p",{children:Ol()}),h.jsx(Wv,{to:"/projects",children:z0()})]})}function N6({error:e,reset:n}){return h.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[h.jsx("p",{role:"alert",children:e.message}),h.jsx(Oe,{onClick:n,children:Hi()}),h.jsx(Wv,{to:"/projects",children:z0()})]})}function jO({projectId:e}){const{queryClient:n}=D3({from:"__root__"}),t=Gv(),[r,s]=M.useState(null),[i,o]=M.useState(0);return M.useEffect(()=>{let a=!0;return s(null),(e?eht(e,n):Jdt(n)).then(l=>{a&&t({href:l,replace:!0})}).catch(l=>{a&&(FU(l)?o(u=>u+1):s(l instanceof Error?l:new Error(String(l))))}),()=>{a=!1}},[e,i,t,n]),r?h.jsx(N6,{error:r,reset:()=>o(a=>a+1)}):h.jsx(E6,{})}function D0t(){return h.jsx(jO,{})}function L0t({projectId:e}){return h.jsx(jO,{projectId:e})}function O0t(){const e=sO(),n=Gv(),t=K0(),r=ht(t),s=ht(Vp()),i=r.data,o=s.data,a=r.error??s.error,l=()=>{r.refetch(),s.refetch()},{status:u}=C6(e.kind==="local");M.useEffect(()=>{document.title="OpenResearch",o&&eb.queue({...u6()??o.workspace??{railOpen:!0,panelWidth:760,experimentsView:"table"},lastLocation:"/projects"})},[o]);const _=f=>void n({to:"/projects/$projectId",params:{projectId:f}});return h.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&h.jsxs(h.Fragment,{children:[h.jsx(EO,{}),h.jsx(TO,{status:u})]}),a&&(!i||!o)?h.jsx(N6,{error:a,reset:l}):!i||!o?h.jsx(E6,{}):i.length===0&&!o.onboardingCompleted?h.jsx(a0t,{preferredAgent:o.preferredAgent,onDone:f=>{Zdt(),_(f.id)}}):h.jsx(N0t,{remote:e.kind==="ssh",projects:i,onOpen:_,onCreated:(f,p)=>{p?(ir(p,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:f.id,tab:"git"}})):_(f.id)},onDeleted:f=>Wr(t.queryKey,p=>p==null?void 0:p.filter(m=>m.id!==f))}),e.kind==="ssh"&&h.jsx(av,{runtime:e,corner:!0})]})}const I0t=$o()({component:D0t}),B0t=$o()({component:U0}),$0t=$o()({}),P0t=$o()({component:O0t}),F0t=e=>({queryKey:Et("getRunDiff",e),queryFn:({signal:n})=>elt(e,n),staleTime:3e4}),AO=e=>({queryKey:Et("getExperimentDiff",e),queryFn:({signal:n})=>tlt(e,n),staleTime:3e4}),ov=(e,n,t={})=>({queryKey:Et("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>nlt(e,n,t,r),staleTime:t.ref?Lh(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),RO=e=>({queryKey:Et("getAbsoluteFile",e),queryFn:({signal:n})=>rlt(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),MO=(e,n={})=>({queryKey:Et("getCodeTree",e,{...n}),queryFn:({signal:t})=>wlt(e,n,t),staleTime:n.ref&&Lh(n.ref)?1/0:3e4}),q4=e=>({queryKey:Et("getSessionWorktree",e),queryFn:({signal:n})=>Slt(e,n),staleTime:3e4}),H0t=e=>({queryKey:Et("getArtifacts",e),queryFn:({signal:n})=>oct(e,n),staleTime:3e4}),z6=(e,n)=>({queryKey:Et("getArtifactFileText",e,n),queryFn:({signal:t})=>fct(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),DO=(e,n)=>({queryKey:Et("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>hct(e,n,t),staleTime:2e3}),q0t=()=>({queryKey:Et("getLatexEngine"),queryFn:({signal:e})=>llt(e),staleTime:3e5}),U0t=()=>({queryKey:Et("getOverleafSettings"),queryFn:({signal:e})=>ult(e),staleTime:3e5}),G0t=(e,n,t={})=>({queryKey:Et("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>mlt(e,n,t,r),staleTime:3e5}),W0t=(e,n,t={})=>({queryKey:Et("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>ylt(e,n,t,r),staleTime:3e4}),LO=(e,n,t,r,s)=>({queryKey:Et("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!Lh(s)?3e4:1/0,refetchOnMount:s?!0:"always",refetchOnWindowFocus:s?!0:"always",queryFn:async({signal:i,client:o})=>{const a=async m=>{i.throwIfAborted();const x=await o.fetchQuery({...m,staleTime:s?m.staleTime:0});return i.throwIfAborted(),x},l=t==="abs",u=t==="artifacts",_=async()=>{const m=await a(DO(e,n)),x=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",S=m&&x?await a(z6(e,n)):null,b=m===null||x&&S===null;return{path:n,content:(S==null?void 0:S.content)??"",truncated:(S==null?void 0:S.truncated)??!1,binary:(S==null?void 0:S.binary)??(m==null?void 0:m.presentation)==="download",notFound:b,presentation:S?S.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},f=async()=>{for(const m of[`artifacts/${n}`,n]){const x=await a(ov(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(x&&!x.notFound)return x}return null},p=await(l?a(RO(n)).then(m=>({source:"absolute",file:m})):u?_().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const x=await f();return x?{source:"checkout",file:x}:{source:"artifact",file:m}}):a(ov(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?_().then(x=>x.notFound?{source:"checkout",file:m}:{source:"artifact",file:x,checkoutRoot:m.root}):{source:"checkout",file:m}));return i.throwIfAborted(),p}});async function V0t(e,n,t,r,s){if(Lh(s))return;const i=LO(e,n,t,r,s),o=[i.queryKey,...t==="abs"?[RO(n).queryKey]:[ov(e,n,{sessionId:r,ref:s}).queryKey,ov(e,`artifacts/${n}`,{sessionId:r}).queryKey,z6(e,n).queryKey,DO(e,n).queryKey]];await Promise.all(o.map(a=>Je.cancelQueries({queryKey:a,exact:!0}))),await Promise.all(o.map(a=>Je.invalidateQueries({queryKey:a,exact:!0,refetchType:"none"}))),await Je.invalidateQueries({queryKey:i.queryKey,exact:!0})}function K0t(e,n,t){const r=new Array(e);return new Proxy(r,{get(s,i,o){if(typeof i=="string"){const a=i.charCodeAt(0);if(a>=48&&a<=57){const l=+i;if(Number.isInteger(l)&&l>=0&&lr[_]!==u))&&(r=a,s=n(...a),t!=null&&t.onChange&&!(i&&t.skipInitialOnChange)&&t.onChange(s),i=!1),s}return o.updateDeps=a=>{r=a},o}function az(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const Q0t=(e,n)=>Math.abs(e-n)<1.01,Y0t=(e,n,t)=>{let r;return Object.assign(function(...s){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,s),t)},{cancel:()=>{e.clearTimeout(r)}})};let i0;const z2=()=>{if(i0!==void 0)return i0;if(typeof navigator>"u")return i0=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return i0=!0;const e=navigator.maxTouchPoints;return i0=navigator.platform==="MacIntel"&&e!==void 0&&e>0},oz=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},X0t=e=>e,OO=e=>{const n=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1)-n+1,s=new Array(r);for(let i=0;i{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const s=o=>{const{width:a,height:l}=o;n({width:Math.round(a),height:Math.round(l)})};if(s(oz(t)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(o=>{const a=()=>{const l=o[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(oz(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},lv={passive:!0},J0t=typeof window>"u"?!0:"onscrollend"in window,ept=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&J0t;let o=0;const a=i?null:Y0t(s,()=>n(o,!1),e.options.isScrollingResetDelay),l=f=>()=>{o=t(r),a==null||a(),n(o,f)},u=l(!0),_=l(!1);return r.addEventListener("scroll",u,lv),i&&r.addEventListener("scrollend",_,lv),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",_),a==null||a.cancel()}},tpt=(e,n)=>ept(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),npt=(e,n,t)=>{if(t.options.useCachedMeasurements){const r=t.indexFromElement(e),s=t.options.getItemKey(r);return t.itemSizeCache.get(s)??t.options.estimateSize(r)}if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}if(!n){const r=t.indexFromElement(e),s=t.options.getItemKey(r),i=t.itemSizeCache.get(s);if(i!==void 0)return i}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},rpt=(e,{adjustments:n=0,behavior:t},r)=>{var s,i;(i=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[r.options.horizontal?"left":"top"]:e+n,behavior:t})},spt=rpt;class ipt{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,r,s;return((s=(r=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const o=()=>{const a=i.target,l=this.indexFromElement(a);if(!a.isConnected){this.observer.unobserve(a);for(const[u,_]of this.elementsCache)if(_===a){this.elementsCache.delete(u);break}return}this.isIndexInRange(l)&&this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(a,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),t=null},observe:s=>{var i;return(i=r())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=r())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var r,s;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:X0t,rangeExtractor:OO,onChange:()=>{},measureElement:npt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in t){const m=t[p];m!==void 0&&(i[p]=m)}const o=this.options;let a=null,l=null,u=!1;if(o!==void 0&&o.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const p=o.count,m=i.count,x=this.getMeasurements(),S=p>0?((r=x[0])==null?void 0:r.key)??o.getItemKey(0):null,b=p>0?((s=x[p-1])==null?void 0:s.key)??o.getItemKey(p-1):null;if(m!==p||p>0&&m>0&&(i.getItemKey(0)!==S||i.getItemKey(m-1)!==b)){u=!0;const w=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??x[0]:null;w&&(a=[w.key,this.getScrollOffset()-w.start]);const C=i.followOnAppend===!0?"auto":i.followOnAppend||null;C&&m>p&&this.isAtEnd(o.scrollEndThreshold)&&(p===0||i.getItemKey(m-1)!==b)&&(l=C)}}this.options=i,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let _=!1,f=0;if(a&&this.scrollOffset!==null){const[p,m]=a,x=this.getMeasurements(),{count:S,getItemKey:b}=this.options;let v=0;for(;v{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=$d(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{if(o&&this._intendedScrollOffset===null&&i===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(i-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const a=this.getScrollOffset();this.scrollDirection=o?a===i?this.scrollDirection:a{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},a=()=>{this._iosTouching=!1,!(!z2()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",o,lv),i.addEventListener("touchend",a,lv),this.unsubs.push(()=>{i.removeEventListener("touchstart",o),i.removeEventListener("touchend",a),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[i,o,a,l]=s;i!==null&&!a&&(z2()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),a&&this.scrollToEnd({behavior:a})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:r}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>r+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),r=this.getMaxScrollOffset();if(t<0||t>r)return;if(this._iosDeferredAdjustment<0&&t>=r-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=$d(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,r,s,i,o,a,l,u)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:o,lanes:a,laneAssignmentMode:l,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:o,lanes:a,laneAssignmentMode:l,gap:u},_)=>{const f=this.itemSizeCache;if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const v of this.laneAssignments.keys())v>=t&&this.laneAssignments.delete(v);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(v=>{this.itemSizeCache.set(v.key,v.size)}));const p=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),a===1){const v=t*2;let y=this._flatMeasurements;if(!y||y.length0&&N.set(y.subarray(0,p*2)),y=N,this._flatMeasurements=y}let w;if(p===0)w=r+s;else{const N=p-1;w=y[N*2]+y[N*2+1]+u}for(let N=p;N1){C=w;const O=x[C],I=O!==void 0?m[O]:void 0;N=I?I.end+u:r+s}else if(b===a){let O=0,I=S[0],F=x[0];for(let U=1;Uthis.options.debug}),this.calculateRange=$d(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=opt(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=$d(()=>{let t=null,r=null;const s=this.calculateRange();return s&&(t=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,r]},(t,r,s,i,o)=>i===null||o===null?[]:t({startIndex:i,endIndex:o,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,s=t.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),o=Math.max(0,s-i),a=Math.min(this.options.count-1,s+i);return t>=o&&t<=a}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((o,a)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(a))});return}const r=this.indexFromElement(t);if(!this.isIndexInRange(r))return;const s=this.options.getItemKey(r),i=this.elementsCache.get(s);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,r)=>{var s,i;if(!this.isIndexInRange(t))return;let o,a,l;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)l=this.options.getItemKey(t),a=u[t*2],o=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;l=p.key,a=p.start,o=p.size}const _=this.itemSizeCache.get(l)??o,f=r-_;if(f!==0){const p=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=p?this.getTotalSize():0,x=this.getScrollOffset()+this.scrollAdjustments,b=!this.itemSizeCache.has(l)?a[this.getVirtualIndexes(),this.getMeasurements()],(t,r)=>{const s=[];for(let i=0,o=t.length;ithis.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length===0)return;const s=this._flatMeasurements,i=this.options.lanes===1&&s!=null,o=IO(0,r.length-1,i?a=>s[a*2]:a=>az(r[a]).start,t);return az(r[o])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,r,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),o=this.getScrollOffset();r==="auto"&&(r=t>=o+i?"end":"start"),r==="center"?t+=(s-i)/2:r==="end"&&(t-=i);const a=this.getMaxScrollOffset();return Math.max(Math.min(a,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),i=this.getScrollOffset(),o=this.measurementsCache[t];if(!o)return;if(r==="auto")if(o.end>=i+s-this.options.scrollPaddingEnd)r="end";else if(o.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];if(r==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),r];const a=r==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r,o.size),r]},this.scrollToOffset=(t,{align:r="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const i=this.getOffsetForAlignment(t,r),o=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:r="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const i=this.getOffsetForIndex(t,r);if(!i)return;const[o,a]=i,l=this.now();this.scrollState={index:t,align:a,behavior:s,startedAt:l,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+t,i=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const i=r.length-1,o=this._flatMeasurements;o!=null?s=o[i*2]+o[i*2+1]:s=((t=r[i])==null?void 0:t.end)??0}else{const i=Array(this.options.lanes).fill(null);let o=r.length-1;for(;o>=0&&i.some(a=>a===null);){const a=r[o];i[a.lane]===null&&(i[a.lane]=a.end),o--}s=Math.max(...i.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const r=this.getMeasurements();for(const s of r)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:r,behavior:s})=>{this._intendedScrollOffset=t+(r??0),this.options.scrollToFn(t,{behavior:s,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(n)}applyScrollAdjustment(n,t){if(n===0)return!1;if(z2()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=n,!1;{const r=this.getScrollOffset()+this.scrollAdjustments+n,s=this.scrollElement,i=s!==null&&("scrollHeight"in s||"document"in s)?this.getMaxScrollOffset():null;return this._clampedAdjustment=i!==null&&r>i+.5?{target:r,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,i=1,o=s!==this.scrollState.lastTargetOffset;if(!o&&Q0t(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,o){const a=this.getSize()||600,l=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&l>a;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const IO=(e,n,t,r)=>{for(;e<=n;){const s=(e+n)/2|0,i=t(s);if(ir)n=s-1;else return s}return e>0?e-1:0};function apt(e,n,t){let r=0;for(;r<=n;){const s=(r+n)/2|0,i=e[s*2];if(it)n=s-1;else return s}return r>0?r-1:0}function opt(e,n,t,r,s){const i=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:i};if(r===1&&s!==null){const u=apt(s,i,t);let _=u;const f=t+n;for(;_e[u].start,t),l=a;if(r===1)for(;l1){const u=Array(r).fill(0);for(;lf=0&&_.some(f=>f>=t);){const f=e[a];_[f.lane]=f.start,a--}a=Math.max(0,a-a%r),l=Math.min(i,l+(r-1-l%r))}return{startIndex:a,endIndex:l}}const T2=typeof document<"u"?M.useLayoutEffect:M.useEffect;function lpt({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=M.useReducer(_=>_+1,0)[1],i=M.useRef({enabled:n,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=n,i.current.mode=t;const o=_=>{const f=i.current;if(!f.enabled||!f.container)return;const p=_.getTotalSize();if(p!==f.lastSize){f.lastSize=p;const m=_.options.horizontal?"width":"height";f.container.style[m]=`${p}px`}},a=_=>{const f=i.current;if(!f.enabled||!f.container)return;o(_);const p=!!_.options.horizontal,m=f.mode==="transform",x=p?"left":"top",S=_.options.scrollMargin,b=_.getVirtualItems();for(const v of b){const y=v.start-S,w=_.elementsCache.get(v.key);w&&f.lastPositions.get(w)!==y&&(f.lastPositions.set(w,y),m?w.style.transform=p?`translate3d(${y}px, 0, 0)`:`translate3d(0, ${y}px, 0)`:w.style[x]=`${y}px`)}},l={...r,onChange:(_,f)=>{var p;const m=i.current;let x=!0;if(m.enabled){a(_);const S=_.range,b=m.prevRange;x=!b||b.isScrolling!==_.isScrolling||b.startIndex!==(S==null?void 0:S.startIndex)||b.endIndex!==(S==null?void 0:S.endIndex),x&&(m.prevRange=S?{startIndex:S.startIndex,endIndex:S.endIndex,isScrolling:_.isScrolling}:null)}x&&(e&&f?Fo.flushSync(s):s()),(p=r.onChange)==null||p.call(r,_,f)}},[u]=M.useState(()=>{const _=new ipt(l);return Object.assign(_,{containerRef:f=>{const p=i.current;if(p.container=f,p.lastSize=null,f&&p.enabled){const m=_.getTotalSize();p.lastSize=m;const x=_.options.horizontal?"width":"height";f.style[x]=`${m}px`}}})});return u.setOptions(l),T2(()=>u._didMount(),[]),T2(()=>(o(u),u._willUpdate())),T2(()=>{a(u)}),u}function cpt(e){return lpt({observeElementRect:Z0t,observeElementOffset:tpt,scrollToFn:spt,...e})}function upt(e,n){if(!n)return e;const t=new Map(e.map(i=>[i.id,i]));let r=t.get(n);if(!r)return e;const s=[];for(;r;)s.push(r),r=r.parentId?t.get(r.parentId):void 0;return s.reverse()}function fpt(e,n,t){var o;let r=e;for(;r&&r.role!=="user";)r=r.parentId?n.get(r.parentId):void 0;const s=e.role==="user"?e.parentId??null:(r==null?void 0:r.id)??null,i=(o=t.get(s))==null?void 0:o.filter(a=>a.role===e.role);return i!=null&&i.length?i:[e]}function dpt(e,n,t,r){const s=e.filter(u=>!r(u.id)),i=new Map(s.map(u=>[u.id,u])),o=new Map;for(const u of s){const _=u.parentId??null,f=o.get(_);f?f.push(u):o.set(_,[u])}const a=new Set(n.map(u=>u.id)),l=new Map;for(const u of t){const _=fpt(u,i,o),f=_.findIndex(p=>a.has(p.id));l.set(u.id,{count:_.length,index:f,prevId:f>0?_[f-1].id:void 0,nextId:f<_.length-1?_[f+1].id:void 0})}return l}function cv(e,n){var t;if(e.type==="tool"&&((t=e.tool)==null?void 0:t.toLowerCase())==="interrupted")return!1;if(e.type==="prompt"){if(!e.prompt)return!1;if(e.prompt.kind==="permission"){if(e.prompt.resolved)return!1;if(n!==void 0)return e.id===n}return!0}return e.type==="reasoning"?!1:e.type==="text"?!!e.text:!0}function Xp(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function BO(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||Xp(r)||!cv(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function $O(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=BO(n.parts);return t?{messageId:n.id,toolId:t}:null}function hpt(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return!1;for(let t=n.parts.length-1;t>=0;t--){const r=n.parts[t];if(!(r.type==="steer"||Xp(r)))return r.type==="text"&&!!r.text}return!1}const yo=e=>new Intl.NumberFormat(T()).format(e);function _pt(e,n){const t=typeof e.nextRetryAt=="number"?Math.max(0,Math.ceil((e.nextRetryAt-n)/1e3)):null;return e.retryOwner==="native"&&e.maximum==null&&t==null?qLe():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?LLe({attempt:yo(e.attempt),maximum:yo(e.maximum),seconds:yo(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?ALe({attempt:yo(e.attempt),maximum:yo(e.maximum)}):typeof e.attempt=="number"&&t!=null?$Le({attempt:yo(e.attempt),seconds:yo(t)}):typeof e.attempt=="number"?NLe({attempt:yo(e.attempt)}):t!=null?VLe({seconds:yo(t)}):TD()}function ppt(e,n){if(typeof e!="number")return XLe();const t=Math.max(0,Math.ceil((e-n)/1e3));return tOe({seconds:yo(t)})}function PO(e){return e==="retry"||e==="continue"?e:null}function mpt(e){const n={};return e.model!==void 0&&(n.model=e.model),e.serviceTier!==void 0&&(n.serviceTier=e.serviceTier),e.permissionMode!==void 0&&(n.permissionMode=e.permissionMode),e.planMode!==void 0&&(n.planMode=e.planMode),e.reasoningLevel!==void 0&&(n.reasoningLevel=e.reasoningLevel),n}function gpt(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function lz(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function vpt(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";const r=n.match(/10\.\d+\/\S+/);if(r)return r[0].startsWith("10.1101/")?"biorxiv":"openalex";const s=n.split("/").pop()??"";return/^W\d+$/i.test(s)?"openalex":"alphaxiv"}function T6(e){const n=[];let t="",r=!1,s=null;const i=()=>{r&&n.push(t),t="",r=!1};for(let o=0;o"||a==="&")break;/\s/.test(a)?i():(t+=a,r=!0)}return i(),n}function bpt(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=T6(e);if(t.length===1)return t[0]}return e}function ypt(e){var t,r,s;let n=0;for(;["do","then","else","if","while","until"].includes(e[n]);)n++;for(;/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="env")for(n++;(t=e[n])!=null&&t.startsWith("-")||/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="command"){if(n++,["-v","-V"].includes(e[n]))return null;for(;(r=e[n])!=null&&r.startsWith("-");)n++}return((s=e[n])==null?void 0:s.split("/").pop())!=="orx"?null:e.slice(n+1)}function $h(e){return ypt(typeof e=="string"?T6(e):e)}function xpt(e){var t;const n=(t=e[0])==null?void 0:t.split("/").pop();return!n||!["sh","bash","zsh"].includes(n)||e[1]!=="-lc"?null:e[2]??null}function wpt(e,n){const t=$h(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function Spt(e){var l;const n=$h(e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],i=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let u=1;u - - - - -`,Cpt='',Ept=` - - -`,FO={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv"},Npt={alphaxiv:kpt,openalex:Ept,biorxiv:Cpt};function HO({source:e,size:n=16,decorative:t=!1,className:r=""}){return h.jsx("span",{className:`lit-logo flex-none inline-flex items-center justify-center p-[1.5px] box-border bg-white rounded-[3px] shadow-logo [&_svg]:w-full [&_svg]:h-full [&_svg]:block ${r}`,style:{width:n,height:n},...t?{"aria-hidden":!0}:{role:"img","aria-label":FO[e]},dangerouslySetInnerHTML:{__html:Npt[e]}})}function zpt(e){const t=e.trim().replace(/^https?:\/\/doi\.org\//i,"").replace(/^doi:/i,"").match(/10\.\d+\/[^\s?#]+/);return t?t[0].replace(/[.,)]+$/,"").replace(/v\d+(\.[a-z][a-z-]*)*$/i,""):null}function Tpt(e,n){const t=n.trim();if(e==="alphaxiv"){const i=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(i)}`}const r=zpt(t);if(r)return`https://doi.org/${r}`;if(e==="openalex"){const s=t.split("/").pop()||t;return`https://openalex.org/${encodeURIComponent(s)}`}return`https://doi.org/${t}`}const jpt=["alphaxiv","openalex","biorxiv"];function Apt(){const e=out(),{data:n}=ht(e),t=Cn({mutationFn:mct,onSuccess:i=>Wr(e.queryKey,i)}),r=t.isPending,s=i=>{n&&!r&&t.mutate({...n,[i]:!n[i]})};return n?h.jsx("div",{className:"flex flex-col",children:jpt.map(i=>{const o=n[i];return h.jsxs(Ur,{type:"button",role:"switch","aria-checked":o,disabled:r,onClick:()=>s(i),children:[h.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[h.jsx(HO,{source:i,size:16,decorative:!0}),FO[i]]}),h.jsx(Fft,{checked:o,"aria-hidden":"true"})]},i)})}):h.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:P4e()})}function j2(e,n){if(!e)throw new Error("Assertion Error")}function Zu(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function Rpt(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Mpt(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` -`}]}function Dpt(e,n){const t=n.value?n.value+` -`:"",r={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function Lpt(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Opt(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const ti=xu(/[A-Za-z]/),Hs=xu(/[\dA-Za-z]/),Ipt=xu(/[#-'*+\--9=?A-Z^-~]/);function uv(e){return e!==null&&(e<32||e===127)}const U4=xu(/\d/),Bpt=xu(/[\dA-Fa-f]/),$pt=xu(/[!-/:-@[-`{-~]/);function wt(e){return e!==null&&e<-2}function tr(e){return e!==null&&(e<0||e===32)}function mn(e){return e===-2||e===-1||e===32}const ob=xu(new RegExp("\\p{P}|\\p{S}","u")),Of=xu(/\s/);function xu(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function i_(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&i<57344){const a=e.charCodeAt(t+1);i<56320&&a>56319&&a<57344?(o=String.fromCharCode(i,a),s=1):o="�"}else o=String.fromCharCode(i);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+s+1,o=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function Ppt(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=i_(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=i+1,a+=1,e.footnoteCounts.set(r,a);const l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(n,u),e.applyData(n,u)}function Fpt(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Hpt(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function qO(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const s=e.all(n),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=r:s.push({type:"text",value:r}),s}function qpt(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return qO(e,n);const s={src:i_(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,i),e.applyData(n,i)}function Upt(e,n){const t={src:i_(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Gpt(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Wpt(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return qO(e,n);const s={href:i_(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Vpt(e,n){const t={href:i_(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Kpt(e,n,t){const r=e.all(n),s=t?Qpt(t):UO(n),i={},o=[];if(typeof n.checked=="boolean"){const _=r[0];let f;_&&_.type==="element"&&_.tagName==="p"?f=_:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a1}function Ypt(e,n){const t={},r=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++s0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function emt(e){const n=j6(e),t=GO(e);if(n&&t)return{start:n,end:t}}function tmt(e,n){const t=e.all(n),r=t.shift(),s=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),s.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=j6(n.children[1]),l=GO(n.children[n.children.length-1]);a&&l&&(o.position={start:a,end:l}),s.push(o)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,i),e.applyData(n,i)}function nmt(e,n,t){const r=t?t.children:void 0,i=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,a=o?o.length:n.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return i.push(fz(n.slice(s),s>0,!1)),i.join("")}function fz(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===cz||i===uz;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===cz||i===uz;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function imt(e,n){const t={type:"text",value:smt(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function amt(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const omt={blockquote:Rpt,break:Mpt,code:Dpt,delete:Lpt,emphasis:Opt,footnoteReference:Ppt,heading:Fpt,html:Hpt,imageReference:qpt,image:Upt,inlineCode:Gpt,linkReference:Wpt,link:Vpt,listItem:Kpt,list:Ypt,paragraph:Xpt,root:Zpt,strong:Jpt,table:tmt,tableCell:rmt,tableRow:nmt,text:imt,thematicBreak:amt,toml:Lg,yaml:Lg,definition:Lg,footnoteDefinition:Lg};function Lg(){}const VO=-1,lb=0,A0=1,fv=2,A6=3,R6=4,M6=5,D6=6,KO=7,QO=8,lmt=typeof self=="object"?self:globalThis,dz=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new lmt[e](n)},cmt=(e,n)=>{const t=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,o]=n[s];switch(i){case lb:case VO:return t(o,s);case A0:{const a=t([],s);for(const l of o)a.push(r(l));return a}case fv:{const a=t({},s);for(const[l,u]of o)a[r(l)]=r(u);return a}case A6:return t(new Date(o),s);case R6:{const{source:a,flags:l}=o;return t(new RegExp(a,l),s)}case M6:{const a=t(new Map,s);for(const[l,u]of o)a.set(r(l),r(u));return a}case D6:{const a=t(new Set,s);for(const l of o)a.add(r(l));return a}case KO:{const{name:a,message:l}=o;return t(dz(a,l),s)}case QO:return t(BigInt(o),s);case"BigInt":return t(Object(BigInt(o)),s);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(dz(i,o),s)};return r},hz=e=>cmt(new Map,e)(0),nf="",{toString:umt}={},{keys:fmt}=Object,a0=e=>{const n=typeof e;if(n!=="object"||!e)return[lb,n];const t=umt.call(e).slice(8,-1);switch(t){case"Array":return[A0,nf];case"Object":return[fv,nf];case"Date":return[A6,nf];case"RegExp":return[R6,nf];case"Map":return[M6,nf];case"Set":return[D6,nf];case"DataView":return[A0,t]}return t.includes("Array")?[A0,t]:t.includes("Error")?[KO,t]:[fv,t]},Og=([e,n])=>e===lb&&(n==="function"||n==="symbol"),dmt=(e,n,t,r)=>{const s=(o,a)=>{const l=r.push(o)-1;return t.set(a,l),l},i=o=>{if(t.has(o))return t.get(o);let[a,l]=a0(o);switch(a){case lb:{let _=o;switch(l){case"bigint":a=QO,_=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);_=null;break;case"undefined":return s([VO],o)}return s([a,_],o)}case A0:{if(l){let p=o;return l==="DataView"?p=new Uint8Array(o.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(o)),s([l,[...p]],o)}const _=[],f=s([a,_],o);for(const p of o)_.push(i(p));return f}case fv:{if(l)switch(l){case"BigInt":return s([l,o.toString()],o);case"Boolean":case"Number":case"String":return s([l,o.valueOf()],o)}if(n&&"toJSON"in o)return i(o.toJSON());const _=[],f=s([a,_],o);for(const p of fmt(o))(e||!Og(a0(o[p])))&&_.push([i(p),i(o[p])]);return f}case A6:return s([a,isNaN(o.getTime())?nf:o.toISOString()],o);case R6:{const{source:_,flags:f}=o;return s([a,{source:_,flags:f}],o)}case M6:{const _=[],f=s([a,_],o);for(const[p,m]of o)(e||!(Og(a0(p))||Og(a0(m))))&&_.push([i(p),i(m)]);return f}case D6:{const _=[],f=s([a,_],o);for(const p of o)(e||!Og(a0(p)))&&_.push(i(p));return f}}const{message:u}=o;return s([a,{name:l,message:u}],o)};return i},_z=(e,{json:n,lossy:t}={})=>{const r=[];return dmt(!(n||t),!!n,new Map,r)(e),r},dv=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?hz(_z(e,n)):structuredClone(e):(e,n)=>hz(_z(e,n));function hmt(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function _mt(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function pmt(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||hmt,r=e.options.footnoteBackLabel||_mt,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l0&&x.push({type:"text",value:" "});let y=typeof t=="string"?t:t(l,m);typeof y=="string"&&(y={type:"text",value:y}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,m),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const b=_[_.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const y=b.children[b.children.length-1];y&&y.type==="text"?y.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...x)}else _.push(...x);const v={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(_,!0)};e.patch(u,v),a.push(v)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...dv(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:` -`}]}}const Zp=(function(e){if(e==null)return bmt;if(typeof e=="function")return cb(e);if(typeof e=="object")return Array.isArray(e)?mmt(e):gmt(e);if(typeof e=="string")return vmt(e);throw new Error("Expected function, string, or object as test")});function mmt(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let m=YO,x,S,b;if((!n||i(l,u,_[_.length-1]||void 0))&&(m=wmt(t(l,_)),m[0]===G4))return m;if("children"in l&&l.children){const v=l;if(v.children&&m[0]!==XO)for(S=(r?v.children.length:-1)+o,b=_.concat(v);S>-1&&S0&&t.push({type:"text",value:` -`}),t}function pz(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function mz(e,n){const t=kmt(e,n),r=t.one(e,void 0),s=pmt(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` -`},s),i}function hv(e,n){return e&&"run"in e?async function(t,r){const s=mz(t,{file:r,...n});await e.run(s,r)}:function(t,r){return mz(t,{file:r,...e||n})}}function gz(e){if(e)throw e}var A2,vz;function Tmt(){if(vz)return A2;vz=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},i=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var _=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!_&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},o=function(u,_){t&&_.name==="__proto__"?t(u,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):u[_.name]=_.newValue},a=function(u,_){if(_==="__proto__")if(e.call(u,_)){if(r)return r(u,_).value}else return;return u[_]};return A2=function l(){var u,_,f,p,m,x,S=arguments[0],b=1,v=arguments.length,y=!1;for(typeof S=="boolean"&&(y=S,S=arguments[1]||{},b=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});bo.length;let l;a&&o.push(s);try{l=e.apply(this,o)}catch(u){const _=u;if(a&&t)throw _;return s(_)}a||(l&&l.then&&typeof l.then=="function"?l.then(i,s):l instanceof Error?s(l):i(l))}function s(o,...a){t||(t=!0,n(o,...a))}function i(o){s(null,o)}}function R0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bz(e.position):"start"in e||"end"in e?bz(e):"line"in e||"column"in e?K4(e):""}function K4(e){return yz(e&&e.line)+":"+yz(e&&e.column)}function bz(e){return K4(e&&e.start)+"-"+K4(e&&e.end)}function yz(e){return e&&typeof e=="number"?e:1}class Us extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",i={},o=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof n=="string"?s=n:!i.cause&&n&&(o=!0,s=n.message,i.cause=n),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=a?a.line:void 0,this.name=R0(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Us.prototype.file="";Us.prototype.name="";Us.prototype.reason="";Us.prototype.message="";Us.prototype.stack="";Us.prototype.column=void 0;Us.prototype.line=void 0;Us.prototype.ancestors=void 0;Us.prototype.cause=void 0;Us.prototype.fatal=void 0;Us.prototype.place=void 0;Us.prototype.ruleId=void 0;Us.prototype.source=void 0;const xo={basename:Mmt,dirname:Dmt,extname:Lmt,join:Omt,sep:"/"};function Mmt(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Jp(e);let t=0,r=-1,s=e.length,i;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else o<0&&(i=!0,o=s+1),a>-1&&(e.codePointAt(s)===n.codePointAt(a--)?a<0&&(r=s):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function Dmt(e){if(Jp(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Lmt(e){Jp(e);let n=e.length,t=-1,r=0,s=-1,i=0,o;for(;n--;){const a=e.codePointAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?s<0?s=n:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||t<0||i===0||i===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function Omt(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Bmt(e,n){let t="",r=0,s=-1,i=0,o=-1,a,l;for(;++o<=e.length;){if(o2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",r=0):(t=t.slice(0,l),r=t.length-1-t.lastIndexOf("/")),s=o,i=0;continue}}else if(t.length>0){t="",r=0,s=o,i=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,o):t=e.slice(s+1,o),r=o-s-1;s=o,i=0}else a===46&&i>-1?i++:i=-1}return t}function Jp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const $mt={cwd:Pmt};function Pmt(){return"/"}function Q4(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Fmt(e){if(typeof e=="string")e=new URL(e);else if(!Q4(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Hmt(e)}function Hmt(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[m,...x]=_;const S=r[p][1];V4(S)&&V4(m)&&(m=R2(!0,S,m)),r[p]=[u,m,...x]}}}}const B6=new I6().freeze();function O2(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function I2(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function B2(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wz(e){if(!V4(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Sz(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Ig(e){return Wmt(e)?e:new ZO(e)}function Wmt(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Vmt(e){return typeof e=="string"||Kmt(e)}function Kmt(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var kz=Object.prototype.hasOwnProperty;function Cz(e,n,t){for(t of e.keys())if(M0(t,n))return t}function M0(e,n){var t,r,s;if(e===n)return!0;if(e&&n&&(t=e.constructor)===n.constructor){if(t===Date)return e.getTime()===n.getTime();if(t===RegExp)return e.toString()===n.toString();if(t===Array){if((r=e.length)===n.length)for(;r--&&M0(e[r],n[r]););return r===-1}if(t===Set){if(e.size!==n.size)return!1;for(r of e)if(s=r,s&&typeof s=="object"&&(s=Cz(n,s),!s)||!n.has(s))return!1;return!0}if(t===Map){if(e.size!==n.size)return!1;for(r of e)if(s=r[0],s&&typeof s=="object"&&(s=Cz(n,s),!s)||!M0(r[1],n.get(s)))return!1;return!0}if(t===ArrayBuffer)e=new Uint8Array(e),n=new Uint8Array(n);else if(t===DataView){if((r=e.byteLength)===n.byteLength)for(;r--&&e.getInt8(r)===n.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===n.byteLength)for(;r--&&e[r]===n[r];);return r===-1}if(!t||typeof e=="object"){r=0;for(t in e)if(kz.call(e,t)&&++r&&!kz.call(n,t)||!(t in n)||!M0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}function Ez(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,i=!1;for(;!i;){r===-1&&(r=t.length,i=!0);const o=t.slice(s,r).trim();(o||!i)&&n.push(o),s=r+1,r=t.indexOf(",",s)}return n}function Qmt(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Ymt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xmt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zmt={};function Nz(e,n){return(Zmt.jsx?Xmt:Ymt).test(e)}const Jmt=/[ \t\n\f\r]/g;function egt(e){return typeof e=="object"?e.type==="text"?zz(e.value):!1:zz(e)}function zz(e){return e.replace(Jmt,"")===""}class em{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}em.prototype.normal={};em.prototype.property={};em.prototype.space=void 0;function JO(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new em(t,r,n)}function rp(e){return e.toLowerCase()}class wi{constructor(n,t){this.attribute=t,this.property=n}}wi.prototype.attribute="";wi.prototype.booleanish=!1;wi.prototype.boolean=!1;wi.prototype.commaOrSpaceSeparated=!1;wi.prototype.commaSeparated=!1;wi.prototype.defined=!1;wi.prototype.mustUseProperty=!1;wi.prototype.number=!1;wi.prototype.overloadedBoolean=!1;wi.prototype.property="";wi.prototype.spaceSeparated=!1;wi.prototype.space=void 0;let tgt=0;const Qt=Yf(),Jr=Yf(),Y4=Yf(),Ke=Yf(),er=Yf(),Tf=Yf(),Ii=Yf();function Yf(){return 2**++tgt}const X4=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qt,booleanish:Jr,commaOrSpaceSeparated:Ii,commaSeparated:Tf,number:Ke,overloadedBoolean:Y4,spaceSeparated:er},Symbol.toStringTag,{value:"Module"})),$2=Object.keys(X4);class $6 extends wi{constructor(n,t,r,s){let i=-1;if(super(n,t),Tz(this,"space",s),typeof r=="number")for(;++i<$2.length;){const o=$2[i];Tz(this,$2[i],(r&X4[o])===X4[o])}}}$6.prototype.defined=!0;function Tz(e,n,t){t&&(e[n]=t)}function a_(e){const n={},t={};for(const[r,s]of Object.entries(e.properties)){const i=new $6(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),n[r]=i,t[rp(r)]=r,t[rp(i.attribute)]=r}return new em(n,t,e.space)}const eI=a_({properties:{ariaActiveDescendant:null,ariaAtomic:Jr,ariaAutoComplete:null,ariaBusy:Jr,ariaChecked:Jr,ariaColCount:Ke,ariaColIndex:Ke,ariaColSpan:Ke,ariaControls:er,ariaCurrent:null,ariaDescribedBy:er,ariaDetails:null,ariaDisabled:Jr,ariaDropEffect:er,ariaErrorMessage:null,ariaExpanded:Jr,ariaFlowTo:er,ariaGrabbed:Jr,ariaHasPopup:null,ariaHidden:Jr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:er,ariaLevel:Ke,ariaLive:null,ariaModal:Jr,ariaMultiLine:Jr,ariaMultiSelectable:Jr,ariaOrientation:null,ariaOwns:er,ariaPlaceholder:null,ariaPosInSet:Ke,ariaPressed:Jr,ariaReadOnly:Jr,ariaRelevant:null,ariaRequired:Jr,ariaRoleDescription:er,ariaRowCount:Ke,ariaRowIndex:Ke,ariaRowSpan:Ke,ariaSelected:Jr,ariaSetSize:Ke,ariaSort:null,ariaValueMax:Ke,ariaValueMin:Ke,ariaValueNow:Ke,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function tI(e,n){return n in e?e[n]:n}function nI(e,n){return tI(e,n.toLowerCase())}const ngt=a_({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Tf,acceptCharset:er,accessKey:er,action:null,allow:null,allowFullScreen:Qt,allowPaymentRequest:Qt,allowUserMedia:Qt,alpha:Qt,alt:null,as:null,async:Qt,autoCapitalize:null,autoComplete:er,autoFocus:Qt,autoPlay:Qt,blocking:er,capture:null,charSet:null,checked:Qt,cite:null,className:er,closedBy:null,colorSpace:null,cols:Ke,colSpan:Ke,command:null,commandFor:null,content:null,contentEditable:Jr,controls:Qt,controlsList:er,coords:Ke|Tf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qt,defer:Qt,dir:null,dirName:null,disabled:Qt,download:Y4,draggable:Jr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qt,formTarget:null,headers:er,height:Ke,hidden:Y4,high:Ke,href:null,hrefLang:null,htmlFor:er,httpEquiv:er,id:null,imageSizes:null,imageSrcSet:null,inert:Qt,inputMode:null,integrity:null,is:null,isMap:Qt,itemId:null,itemProp:er,itemRef:er,itemScope:Qt,itemType:er,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qt,low:Ke,manifest:null,max:null,maxLength:Ke,media:null,method:null,min:null,minLength:Ke,multiple:Qt,muted:Qt,name:null,nonce:null,noModule:Qt,noValidate:Qt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Qt,optimum:Ke,pattern:null,ping:er,placeholder:null,playsInline:Qt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qt,referrerPolicy:null,rel:er,required:Qt,reversed:Qt,rows:Ke,rowSpan:Ke,sandbox:er,scope:null,scoped:Qt,seamless:Qt,selected:Qt,shadowRootClonable:Qt,shadowRootCustomElementRegistry:Qt,shadowRootDelegatesFocus:Qt,shadowRootMode:null,shadowRootSerializable:Qt,shape:null,size:Ke,sizes:null,slot:null,span:Ke,spellCheck:Jr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ke,step:null,style:null,tabIndex:Ke,target:null,title:null,translate:null,type:null,typeMustMatch:Qt,useMap:null,value:Jr,width:Ke,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:er,axis:null,background:null,bgColor:null,border:Ke,borderColor:null,bottomMargin:Ke,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qt,declare:Qt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ke,leftMargin:Ke,link:null,longDesc:null,lowSrc:null,marginHeight:Ke,marginWidth:Ke,noResize:Qt,noHref:Qt,noShade:Qt,noWrap:Qt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ke,rules:null,scheme:null,scrolling:Jr,standby:null,summary:null,text:null,topMargin:Ke,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ke,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Qt,disablePictureInPicture:Qt,disableRemotePlayback:Qt,exportParts:Tf,part:er,prefix:null,property:null,results:Ke,security:null,unselectable:null},space:"html",transform:nI}),rgt=a_({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ii,accentHeight:Ke,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ke,amplitude:Ke,arabicForm:null,ascent:Ke,attributeName:null,attributeType:null,azimuth:Ke,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ke,by:null,calcMode:null,capHeight:Ke,className:er,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ke,diffuseConstant:Ke,direction:null,display:null,dur:null,divisor:Ke,dominantBaseline:null,download:Qt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ke,enableBackground:null,end:null,event:null,exponent:Ke,externalResourcesRequired:null,fill:null,fillOpacity:Ke,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Tf,g2:Tf,glyphName:Tf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ke,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ke,horizOriginX:Ke,horizOriginY:Ke,id:null,ideographic:Ke,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ke,k:Ke,k1:Ke,k2:Ke,k3:Ke,k4:Ke,kernelMatrix:Ii,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ke,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ke,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ke,overlineThickness:Ke,paintOrder:null,panose1:null,path:null,pathLength:Ke,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:er,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ke,pointsAtY:Ke,pointsAtZ:Ke,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ii,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ii,rev:Ii,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ii,requiredFeatures:Ii,requiredFonts:Ii,requiredFormats:Ii,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ke,specularExponent:Ke,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ke,strikethroughThickness:Ke,string:null,stroke:null,strokeDashArray:Ii,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ke,strokeOpacity:Ke,strokeWidth:null,style:null,surfaceScale:Ke,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ii,tabIndex:Ke,tableValues:null,target:null,targetX:Ke,targetY:Ke,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ii,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ke,underlineThickness:Ke,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ke,values:null,vAlphabetic:Ke,vMathematical:Ke,vectorEffect:null,vHanging:Ke,vIdeographic:Ke,version:null,vertAdvY:Ke,vertOriginX:Ke,vertOriginY:Ke,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ke,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:tI}),rI=a_({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),sI=a_({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:nI}),iI=a_({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),sgt={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},igt=/[A-Z]/g,jz=/-[a-z]/g,agt=/^data[-\w.:]+$/i;function aI(e,n){const t=rp(n);let r=n,s=wi;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&agt.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(jz,lgt);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!jz.test(i)){let o=i.replace(igt,ogt);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}s=$6}return new s(r,n)}function ogt(e){return"-"+e.toLowerCase()}function lgt(e){return e.charAt(1).toUpperCase()}const oI=JO([eI,ngt,rI,sI,iI],"html"),ub=JO([eI,rgt,rI,sI,iI],"svg");function Az(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function cgt(e){return e.join(" ").trim()}var Pd={},P2,Rz;function ugt(){if(Rz)return P2;Rz=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,l=` -`,u="/",_="*",f="",p="comment",m="declaration";function x(b,v){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];v=v||{};var y=1,w=1;function C(q){var Y=q.match(n);Y&&(y+=Y.length);var V=q.lastIndexOf(l);w=~V?q.length-V:w+q.length}function N(){var q={line:y,column:w};return function(Y){return Y.position=new E(q),R(),Y}}function E(q){this.start=q,this.end={line:y,column:w},this.source=v.source}E.prototype.content=b;function j(q){var Y=new Error(v.source+":"+y+":"+w+": "+q);if(Y.reason=q,Y.filename=v.source,Y.line=y,Y.column=w,Y.source=b,!v.silent)throw Y}function z(q){var Y=q.exec(b);if(Y){var V=Y[0];return C(V),b=b.slice(V.length),Y}}function R(){z(t)}function O(q){var Y;for(q=q||[];Y=I();)Y!==!1&&q.push(Y);return q}function I(){var q=N();if(!(u!=b.charAt(0)||_!=b.charAt(1))){for(var Y=2;f!=b.charAt(Y)&&(_!=b.charAt(Y)||u!=b.charAt(Y+1));)++Y;if(Y+=2,f===b.charAt(Y-1))return j("End of comment missing");var V=b.slice(2,Y-2);return w+=2,C(V),b=b.slice(Y),w+=2,q({type:p,comment:V})}}function F(){var q=N(),Y=z(r);if(Y){if(I(),!z(s))return j("property missing ':'");var V=z(i),Z=q({type:m,property:S(Y[0].replace(e,f)),value:V?S(V[0].replace(e,f)):f});return z(o),Z}}function U(){var q=[];O(q);for(var Y;Y=F();)Y!==!1&&(q.push(Y),O(q));return q}return R(),U()}function S(b){return b?b.replace(a,f):f}return P2=x,P2}var Mz;function fgt(){if(Mz)return Pd;Mz=1;var e=Pd&&Pd.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Pd,"__esModule",{value:!0}),Pd.default=t;const n=e(ugt());function t(r,s){let i=null;if(!r||typeof r!="string")return i;const o=(0,n.default)(r),a=typeof s=="function";return o.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:_}=l;a?s(u,_,l):_&&(i=i||{},i[u]=_)}),i}return Pd}var o0={},Dz;function dgt(){if(Dz)return o0;Dz=1,Object.defineProperty(o0,"__esModule",{value:!0}),o0.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||t.test(u)||e.test(u)},o=function(u,_){return _.toUpperCase()},a=function(u,_){return"".concat(_,"-")},l=function(u,_){return _===void 0&&(_={}),i(u)?u:(u=u.toLowerCase(),_.reactCompat?u=u.replace(s,a):u=u.replace(r,a),u.replace(n,o))};return o0.camelCase=l,o0}var l0,Lz;function hgt(){if(Lz)return l0;Lz=1;var e=l0&&l0.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(fgt()),t=dgt();function r(s,i){var o={};return!s||typeof s!="string"||(0,n.default)(s,function(a,l){a&&l&&(o[(0,t.camelCase)(a,i)]=l)}),o}return r.default=r,l0=r,l0}var _gt=hgt();const pgt=$p(_gt),P6={}.hasOwnProperty,mgt=new Map,ggt=/[A-Z]/g,vgt=new Set(["table","tbody","thead","tfoot","tr"]),bgt=new Set(["td","th"]),lI="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cI(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ngt(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Egt(t,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?ub:oI,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=uI(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function uI(e,n,t){if(n.type==="element")return ygt(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return xgt(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Sgt(e,n,t);if(n.type==="mdxjsEsm")return wgt(e,n);if(n.type==="root")return kgt(e,n,t);if(n.type==="text")return Cgt(e,n)}function ygt(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ub,e.schema=s),e.ancestors.push(n);const i=dI(e,n.tagName,!1),o=zgt(e,n);let a=H6(e,n);return vgt.has(n.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!egt(l):!0})),fI(e,o,i,n),F6(o,a),e.ancestors.pop(),e.schema=r,e.create(n,i,o,t)}function xgt(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}sp(e,n.position)}function wgt(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);sp(e,n.position)}function Sgt(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=ub,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:dI(e,n.name,!0),o=Tgt(e,n),a=H6(e,n);return fI(e,o,i,n),F6(o,a),e.ancestors.pop(),e.schema=r,e.create(n,i,o,t)}function kgt(e,n,t){const r={};return F6(r,H6(e,n)),e.create(n,e.Fragment,r,t)}function Cgt(e,n){return n.value}function fI(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function F6(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Egt(e,n,t){return r;function r(s,i,o,a){const u=Array.isArray(o.children)?t:n;return a?u(i,o,a):u(i,o)}}function Ngt(e,n){return t;function t(r,s,i,o){const a=Array.isArray(i.children),l=j6(r);return n(s,i,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function zgt(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&P6.call(n.properties,s)){const i=jgt(e,s,n.properties[s]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&bgt.has(n.tagName)?r=a:t[o]=a}}if(r){const i=t.style||(t.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Tgt(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else sp(e,n.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,i=e.evaluater.evaluateExpression(a.expression)}else sp(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function H6(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:mgt;for(;++rw.key).filter(w=>w!==void 0));let u=0;for(;u=e.children.length-_&&(E=s.length-(e.children.length-w)),E>=0&&(N=((v=s[E])==null?void 0:v.key)??N);N&&l.has(N)&&((y=s[E])==null?void 0:y.key)!==N;)N=`${N}+`;N&&l.add(N);const j=hI(C,s[E]??null,t,N);i.push(j),j.react!==void 0&&o.push(j.react)}const f=n!==null&&Bgt(e,n.node);if(n&&n.key===r&&f&&s.length===i.length&&i.every((w,C)=>w===s[C]))return n;const p=e.type==="element"&&Lgt.has(e.tagName)?o.filter(w=>typeof w!="string"||!Ogt.test(w)):o,m=p.length>0?p.length===1?p[0]:p:null;let x=f?n==null?void 0:n.shell:null;if(!x){const w=cI({...e,children:[]},t);x={props:w.props,type:w.type}}return{children:i,key:r,node:e,react:h.jsx(x.type,{...x.props,children:m},r),shell:x}}function Bgt(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:o,...a}=n;return M0(s,a)}function oh(e,n){if(e===n)return!0;if(Array.isArray(e)||Array.isArray(n)){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;for(let o=0;os?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);i0?(Ui(e,e.length,0,n),e):n}const Bz={}.hasOwnProperty;function pI(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Ja(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function dn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(l){return mn(l)?(e.enter(t),a(l)):n(l)}function a(l){return mn(l)&&i++o))return;const j=n.events.length;let z=j,R,O;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){if(R){O=n.events[z][1].end;break}R=!0}for(v(r),E=j;Ew;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=w}function y(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function Vgt(e,n,t){return dn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ph(e){if(e===null||tr(e)||Of(e))return 1;if(ob(e))return 2}function fb(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[t][1].start};Pz(f,-l),Pz(p,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ya(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=ya(u,[["enter",s,n],["enter",o,n],["exit",o,n],["enter",i,n]]),u=ya(u,fb(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=ya(u,[["exit",i,n],["enter",a,n],["exit",a,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(_=2,u=ya(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):_=0,Ui(e,r-1,t-r+3,u),t=r+u.length-_-2;break}}for(t=-1;++t0&&mn(E)?dn(e,y,"linePrefix",i+1)(E):y(E)}function y(E){return E===null||wt(E)?e.check(Fz,S,C)(E):(e.enter("codeFlowValue"),w(E))}function w(E){return E===null||wt(E)?(e.exit("codeFlowValue"),y(E)):(e.consume(E),w)}function C(E){return e.exit("codeFenced"),n(E)}function N(E,j,z){let R=0;return O;function O(Y){return E.enter("lineEnding"),E.consume(Y),E.exit("lineEnding"),I}function I(Y){return E.enter("codeFencedFence"),mn(Y)?dn(E,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):F(Y)}function F(Y){return Y===a?(E.enter("codeFencedFenceSequence"),U(Y)):z(Y)}function U(Y){return Y===a?(R++,E.consume(Y),U):R>=o?(E.exit("codeFencedFenceSequence"),mn(Y)?dn(E,q,"whitespace")(Y):q(Y)):z(Y)}function q(Y){return Y===null||wt(Y)?(E.exit("codeFencedFence"),j(Y)):z(Y)}}}function i1t(e,n,t){const r=this;return s;function s(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const F2={name:"codeIndented",tokenize:o1t},a1t={partial:!0,tokenize:l1t};function o1t(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),dn(e,i,"linePrefix",5)(u)}function i(u){const _=r.events[r.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?o(u):t(u)}function o(u){return u===null?l(u):wt(u)?e.attempt(a1t,o,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||wt(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),n(u)}}function l1t(e,n,t){const r=this;return s;function s(o){return r.parser.lazy[r.now().line]?t(o):wt(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):dn(e,i,"linePrefix",5)(o)}function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):wt(o)?s(o):t(o)}}const c1t={name:"codeText",previous:f1t,resolve:u1t,tokenize:d1t};function u1t(e){let n=e.length-4,t=3,r,s;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const s=t||0;this.setCursor(Math.trunc(n));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&c0(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),c0(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),c0(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function xI(e,n,t,r,s,i,o,a,l){const u=l||Number.POSITIVE_INFINITY;let _=0;return f;function f(v){return v===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(v),e.exit(i),p):v===null||v===32||v===41||uv(v)?t(v):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),S(v))}function p(v){return v===62?(e.enter(i),e.consume(v),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===62?(e.exit("chunkString"),e.exit(a),p(v)):v===null||v===60||wt(v)?t(v):(e.consume(v),v===92?x:m)}function x(v){return v===60||v===62||v===92?(e.consume(v),m):m(v)}function S(v){return!_&&(v===null||v===41||tr(v))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(v)):_999||m===null||m===91||m===93&&!l||m===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(m):m===93?(e.exit(i),e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):wt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),_):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||wt(m)||a++>999?(e.exit("chunkString"),_(m)):(e.consume(m),l||(l=!mn(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function SI(e,n,t,r,s,i){let o;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(s),e.consume(p),e.exit(s),o=p===40?41:p,l):t(p)}function l(p){return p===o?(e.enter(s),e.consume(p),e.exit(s),e.exit(r),n):(e.enter(i),u(p))}function u(p){return p===o?(e.exit(i),l(o)):p===null?t(p):wt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),dn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),_(p))}function _(p){return p===o||p===null||wt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:_)}function f(p){return p===o||p===92?(e.consume(p),_):_(p)}}function D0(e,n){let t;return r;function r(s){return wt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):mn(s)?dn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const y1t={name:"definition",tokenize:w1t},x1t={partial:!0,tokenize:S1t};function w1t(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),o(m)}function o(m){return wI.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function a(m){return s=Ja(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):t(m)}function l(m){return tr(m)?D0(e,u)(m):u(m)}function u(m){return xI(e,_,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function _(m){return e.attempt(x1t,f,f)(m)}function f(m){return mn(m)?dn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||wt(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function S1t(e,n,t){return r;function r(a){return tr(a)?D0(e,s)(a):t(a)}function s(a){return SI(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return mn(a)?dn(e,o,"whitespace")(a):o(a)}function o(a){return a===null||wt(a)?n(a):t(a)}}const k1t={name:"hardBreakEscape",tokenize:C1t};function C1t(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return wt(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const E1t={name:"headingAtx",resolve:N1t,tokenize:z1t};function N1t(e,n){let t=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},i={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Ui(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function z1t(e,n,t){let r=0;return s;function s(_){return e.enter("atxHeading"),i(_)}function i(_){return e.enter("atxHeadingSequence"),o(_)}function o(_){return _===35&&r++<6?(e.consume(_),o):_===null||tr(_)?(e.exit("atxHeadingSequence"),a(_)):t(_)}function a(_){return _===35?(e.enter("atxHeadingSequence"),l(_)):_===null||wt(_)?(e.exit("atxHeading"),n(_)):mn(_)?dn(e,a,"whitespace")(_):(e.enter("atxHeadingText"),u(_))}function l(_){return _===35?(e.consume(_),l):(e.exit("atxHeadingSequence"),a(_))}function u(_){return _===null||_===35||tr(_)?(e.exit("atxHeadingText"),a(_)):(e.consume(_),u)}}const T1t=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qz=["pre","script","style","textarea"],j1t={concrete:!0,name:"htmlFlow",resolveTo:M1t,tokenize:D1t},A1t={partial:!0,tokenize:O1t},R1t={partial:!0,tokenize:L1t};function M1t(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function D1t(e,n,t){const r=this;let s,i,o,a,l;return u;function u(G){return _(G)}function _(G){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(G),f}function f(G){return G===33?(e.consume(G),p):G===47?(e.consume(G),i=!0,S):G===63?(e.consume(G),s=3,r.interrupt?n:L):ti(G)?(e.consume(G),o=String.fromCharCode(G),b):t(G)}function p(G){return G===45?(e.consume(G),s=2,m):G===91?(e.consume(G),s=5,a=0,x):ti(G)?(e.consume(G),s=4,r.interrupt?n:L):t(G)}function m(G){return G===45?(e.consume(G),r.interrupt?n:L):t(G)}function x(G){const ne="CDATA[";return G===ne.charCodeAt(a++)?(e.consume(G),a===ne.length?r.interrupt?n:F:x):t(G)}function S(G){return ti(G)?(e.consume(G),o=String.fromCharCode(G),b):t(G)}function b(G){if(G===null||G===47||G===62||tr(G)){const ne=G===47,oe=o.toLowerCase();return!ne&&!i&&qz.includes(oe)?(s=1,r.interrupt?n(G):F(G)):T1t.includes(o.toLowerCase())?(s=6,ne?(e.consume(G),v):r.interrupt?n(G):F(G)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(G):i?y(G):w(G))}return G===45||Hs(G)?(e.consume(G),o+=String.fromCharCode(G),b):t(G)}function v(G){return G===62?(e.consume(G),r.interrupt?n:F):t(G)}function y(G){return mn(G)?(e.consume(G),y):O(G)}function w(G){return G===47?(e.consume(G),O):G===58||G===95||ti(G)?(e.consume(G),C):mn(G)?(e.consume(G),w):O(G)}function C(G){return G===45||G===46||G===58||G===95||Hs(G)?(e.consume(G),C):N(G)}function N(G){return G===61?(e.consume(G),E):mn(G)?(e.consume(G),N):w(G)}function E(G){return G===null||G===60||G===61||G===62||G===96?t(G):G===34||G===39?(e.consume(G),l=G,j):mn(G)?(e.consume(G),E):z(G)}function j(G){return G===l?(e.consume(G),l=null,R):G===null||wt(G)?t(G):(e.consume(G),j)}function z(G){return G===null||G===34||G===39||G===47||G===60||G===61||G===62||G===96||tr(G)?N(G):(e.consume(G),z)}function R(G){return G===47||G===62||mn(G)?w(G):t(G)}function O(G){return G===62?(e.consume(G),I):t(G)}function I(G){return G===null||wt(G)?F(G):mn(G)?(e.consume(G),I):t(G)}function F(G){return G===45&&s===2?(e.consume(G),V):G===60&&s===1?(e.consume(G),Z):G===62&&s===4?(e.consume(G),$):G===63&&s===3?(e.consume(G),L):G===93&&s===5?(e.consume(G),P):wt(G)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(A1t,H,U)(G)):G===null||wt(G)?(e.exit("htmlFlowData"),U(G)):(e.consume(G),F)}function U(G){return e.check(R1t,q,H)(G)}function q(G){return e.enter("lineEnding"),e.consume(G),e.exit("lineEnding"),Y}function Y(G){return G===null||wt(G)?U(G):(e.enter("htmlFlowData"),F(G))}function V(G){return G===45?(e.consume(G),L):F(G)}function Z(G){return G===47?(e.consume(G),o="",te):F(G)}function te(G){if(G===62){const ne=o.toLowerCase();return qz.includes(ne)?(e.consume(G),$):F(G)}return ti(G)&&o.length<8?(e.consume(G),o+=String.fromCharCode(G),te):F(G)}function P(G){return G===93?(e.consume(G),L):F(G)}function L(G){return G===62?(e.consume(G),$):G===45&&s===2?(e.consume(G),L):F(G)}function $(G){return G===null||wt(G)?(e.exit("htmlFlowData"),H(G)):(e.consume(G),$)}function H(G){return e.exit("htmlFlow"),n(G)}}function L1t(e,n,t){const r=this;return s;function s(o){return wt(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):t(o)}function i(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function O1t(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(tm,n,t)}}const I1t={name:"htmlText",tokenize:B1t};function B1t(e,n,t){const r=this;let s,i,o;return a;function a(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),N):L===63?(e.consume(L),w):ti(L)?(e.consume(L),z):t(L)}function u(L){return L===45?(e.consume(L),_):L===91?(e.consume(L),i=0,x):ti(L)?(e.consume(L),y):t(L)}function _(L){return L===45?(e.consume(L),m):t(L)}function f(L){return L===null?t(L):L===45?(e.consume(L),p):wt(L)?(o=f,Z(L)):(e.consume(L),f)}function p(L){return L===45?(e.consume(L),m):f(L)}function m(L){return L===62?V(L):L===45?p(L):f(L)}function x(L){const $="CDATA[";return L===$.charCodeAt(i++)?(e.consume(L),i===$.length?S:x):t(L)}function S(L){return L===null?t(L):L===93?(e.consume(L),b):wt(L)?(o=S,Z(L)):(e.consume(L),S)}function b(L){return L===93?(e.consume(L),v):S(L)}function v(L){return L===62?V(L):L===93?(e.consume(L),v):S(L)}function y(L){return L===null||L===62?V(L):wt(L)?(o=y,Z(L)):(e.consume(L),y)}function w(L){return L===null?t(L):L===63?(e.consume(L),C):wt(L)?(o=w,Z(L)):(e.consume(L),w)}function C(L){return L===62?V(L):w(L)}function N(L){return ti(L)?(e.consume(L),E):t(L)}function E(L){return L===45||Hs(L)?(e.consume(L),E):j(L)}function j(L){return wt(L)?(o=j,Z(L)):mn(L)?(e.consume(L),j):V(L)}function z(L){return L===45||Hs(L)?(e.consume(L),z):L===47||L===62||tr(L)?R(L):t(L)}function R(L){return L===47?(e.consume(L),V):L===58||L===95||ti(L)?(e.consume(L),O):wt(L)?(o=R,Z(L)):mn(L)?(e.consume(L),R):V(L)}function O(L){return L===45||L===46||L===58||L===95||Hs(L)?(e.consume(L),O):I(L)}function I(L){return L===61?(e.consume(L),F):wt(L)?(o=I,Z(L)):mn(L)?(e.consume(L),I):R(L)}function F(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,U):wt(L)?(o=F,Z(L)):mn(L)?(e.consume(L),F):(e.consume(L),q)}function U(L){return L===s?(e.consume(L),s=void 0,Y):L===null?t(L):wt(L)?(o=U,Z(L)):(e.consume(L),U)}function q(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||tr(L)?R(L):(e.consume(L),q)}function Y(L){return L===47||L===62||tr(L)?R(L):t(L)}function V(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function Z(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),te}function te(L){return mn(L)?dn(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):P(L)}function P(L){return e.enter("htmlTextData"),o(L)}}const U6={name:"labelEnd",resolveAll:H1t,resolveTo:q1t,tokenize:U1t},$1t={tokenize:G1t},P1t={tokenize:W1t},F1t={tokenize:V1t};function H1t(e){let n=-1;const t=[];for(;++n=3&&(u===null||wt(u))?(e.exit("thematicBreak"),n(u)):t(u)}function l(u){return u===s?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),mn(u)?dn(e,a,"whitespace")(u):a(u))}}const pi={continuation:{tokenize:rvt},exit:ivt,name:"list",tokenize:nvt},evt={partial:!0,tokenize:avt},tvt={partial:!0,tokenize:svt};function nvt(e,n,t){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return a;function a(m){const x=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:U4(m)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(S1,t,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return t(m)}function l(m){return U4(m)&&++o<10?(e.consume(m),l):(!r.interrupt||o<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):t(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(tm,r.interrupt?t:_,e.attempt(evt,p,f))}function _(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function f(m){return mn(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):t(m)}function p(m){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(m)}}function rvt(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(tm,s,i);function s(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,dn(e,n,"listItemIndent",r.containerState.size+1)(a)}function i(a){return r.containerState.furtherBlankLines||!mn(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(tvt,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,dn(e,e.attempt(pi,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function svt(e,n,t){const r=this;return dn(e,s,"listItemIndent",r.containerState.size+1);function s(i){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(i):t(i)}}function ivt(e){e.exit(this.containerState.type)}function avt(e,n,t){const r=this;return dn(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const o=r.events[r.events.length-1];return!mn(i)&&o&&o[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const Uz={name:"setextUnderline",resolveTo:ovt,tokenize:lvt};function ovt(e,n){let t=e.length,r,s,i;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(s=t)}else e[t][1].type==="content"&&e.splice(t,1),!i&&e[t][1].type==="definition"&&(i=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",o,n]),e.splice(i+1,0,["exit",e[r][1],n]),e[r][1].end={...e[i][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function lvt(e,n,t){const r=this;let s;return i;function i(u){let _=r.events.length,f;for(;_--;)if(r.events[_][1].type!=="lineEnding"&&r.events[_][1].type!=="linePrefix"&&r.events[_][1].type!=="content"){f=r.events[_][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),s=u,o(u)):t(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===s?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),mn(u)?dn(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||wt(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const cvt={tokenize:uvt};function uvt(e){const n=this,t=e.attempt(tm,r,e.attempt(this.parser.constructs.flowInitial,s,dn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(p1t,s)),"linePrefix")));return t;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const fvt={resolveAll:CI()},dvt=kI("string"),hvt=kI("text");function kI(e){return{resolveAll:CI(e==="text"?_vt:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],i=t.attempt(s,o,a);return o;function o(_){return u(_)?i(_):a(_)}function a(_){if(_===null){t.consume(_);return}return t.enter("data"),t.consume(_),l}function l(_){return u(_)?(t.exit("data"),i(_)):(t.consume(_),l)}function u(_){if(_===null)return!0;const f=s[_];let p=-1;if(f)for(;++p-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}i>0&&o.push(e[s].slice(0,i))}return o}function Nvt(e,n){let t=-1;const r=[];let s;for(;++t0){const Wt=We.tokenStack[We.tokenStack.length-1];(Wt[1]||Wz).call(We,void 0,Wt[0])}for(De.position={start:Ic(ke.length>0?ke[0][1].start:{line:1,column:1,offset:0}),end:Ic(ke.length>0?ke[ke.length-2][1].end:{line:1,column:1,offset:0})},bt=-1;++bt0&&(Fe(this,tu,fe(this,tu)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=Vz(t)),fe(this,tu)+Qvt(t,r)}}tu=new WeakMap;const Bvt=new Set(["*","**","_","__"]);function Vz(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tt){t=s-1;continue}if(n.exclusive)continue;if(Kvt(n)){Kz(n,t,r);continue}const i=qvt(n,e,t);if(i>t){t=i-1;continue}const o=Uvt(n,e,t);if(o>t){t=o-1;continue}eo(e,t)||Kz(n,t,r)}return n}function $vt(e,n,t){const r=n[t];return r==="`"?Pvt(e,n,t):r==="$"?Fvt(e,n,t):r==="~"?Hvt(e,n,t):t}function Pvt(e,n,t){const r=W6(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&_v(n,t)&&!eo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!eo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||eo(n,t)?t+r:r>=3&&_v(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function Fvt(e,n,t){const r=W6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!eo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||eo(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function Hvt(e,n,t){const r=W6(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(_v(n,t)&&!eo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!_v(n,t)||eo(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function qvt(e,n,t){if(n[t]!=="<"||eo(n,t))return t;const r=n[t+1];if(r!==void 0&&!jI(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` -`)return e.pendingHtml=null,s+1;return n.length}function Uvt(e,n,t){const r=Gvt(n,t);if(!r)return t;if(eo(n,t))return t+r.length;const s=e.delims.findLastIndex(i=>i.token===r);return s!==-1?(e.delims.splice(s,1),t+r.length):t+r.length===n.length?(e.pendingDelim={start:t,token:r},t+r.length):(Wvt(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function Gvt(e,n){const t=e[n];if(t==="*")return e.startsWith("***",n)?"***":e.startsWith("**",n)?"**":"*";if(t==="_")return e.startsWith("__",n)?"__":"_";if(t==="~"&&e.startsWith("~~",n))return"~~"}function Wvt(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!Xz(s)||!Xz(r)}function Kz(e,n,t){const r=e.links.at(-1);if(t==="["){e.links.push({phase:"text",start:n});return}if(t==="]"&&(r==null?void 0:r.phase)==="text"){e.links[e.links.length-1]={phase:"url_wait",start:r.start,textEnd:n};return}if(t==="("&&(r==null?void 0:r.phase)==="url_wait"){e.links[e.links.length-1]={phase:"url",start:r.start,textEnd:r.textEnd,parenDepth:0};return}if(t==="("&&(r==null?void 0:r.phase)==="url"){r.parenDepth+=1;return}if(t===")"&&(r==null?void 0:r.phase)==="url"){if(r.parenDepth>0){r.parenDepth-=1;return}e.links.pop()}}function Vvt(e){var n,t;e.delims.length=0,e.links.length=0,((n=e.exclusive)==null?void 0:n.kind)!=="fence"&&(((t=e.exclusive)==null?void 0:t.kind)==="math"&&e.exclusive.token==="$$"||(e.exclusive=null))}function Kvt(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function Qvt(e,n){n.pendingHtml!==null&&(e=e.slice(0,Zvt(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return bo(Yvt(e,t));const r=Xvt(n);if(r)return bo(Jd(e,r));const s=tbt(n);return s?s.kind==="delim"?bo(J4(e,s.start,s.token.length)?zI(e,s.token):e.slice(0,s.start)):J4(e,s.start,s.token.length)?s.kind==="fence"?bo(e):s.kind==="code"?bo(Jd(e,s.token)):s.token==="$$"?bo(Jd(e,(e.endsWith(` -`)?"":` -`)+"$$")):/\s/.test(e[e.length-1]??"")?bo(e):bo(Jd(e,"$")):bo(s.kind==="fence"?e:e.slice(0,s.start)):bo(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function Yvt(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return J4(e,n.start,1)?t+e.slice(n.start+1):t;const r=e.slice(n.start+1,n.textEnd);return n.phase==="url_wait"?t+r+e.slice(n.textEnd+1):t+r}function Xvt(e){const n=[];if(e.exclusive){if(e.exclusive.kind!=="code")return;n.push(e.exclusive.token)}for(let t=e.delims.length-1;t>=0;t--){const r=e.delims[t].token;if(!Bvt.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function Zvt(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!Jvt(e,s,r))break;t=s,r=s}return t}function Jvt(e,n,t){if(e[t-1]!==">"||eo(e,n))return!1;const r=e[n+1];if(r!==void 0&&!jI(r))return!1;for(let s=n+1;s"||i===` -`)return!1}return!0}function bo(e){var b;const n=e.lastIndexOf(` - -`),t=n===-1?0:n+2,r=e.slice(0,t),s=e.slice(t),i=s.indexOf(` -`),o=i===-1?s:s.slice(0,i),a=(b=o.match(/^( *)\|/))==null?void 0:b[1];if(a===void 0)return e;if(Qz(o)<2&&!nbt(o,a))return r;const l=o.trimEnd().endsWith("|")?o:zI(o," |"),u=Qz(l),_=u<2?0:l.trimEnd().endsWith("|")?u-1:u;if(_===0)return e;const f=i===-1?"":s.slice(i+1),p=Yz(a,Array.from({length:_},()=>"-"));if(f.length===0)return r+l+` -`+p;const m=f.indexOf(` -`),x=m===-1?f:f.slice(0,m),S=m===-1?"":f.slice(m);if(rbt(x,a,_))return e;if(x.startsWith(a+"|")&&/^[ |:\-\t]*$/.test(x.slice(a.length))){const v=TI(x,a).map(y=>{const w=y.trim();if(w.length===0)return"-";let C=0;for(let N=0;N1&&w.endsWith(":")?":":"")});for(;v.length<_;)v.push("-");return r+l+` -`+Yz(a,v)+S}return r+l+` -`+p+` -`+f}function Jd(e,n){return e+n.slice(ebt(e,n))}function zI(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return Jd(e,n);const r=e.slice(0,-t.length);return Jd(r,n)+t}function ebt(e,n){for(let t=Math.min(e.length,n.length);t>0;t-=1)if(e.endsWith(n.slice(0,t)))return t;return 0}function tbt(e){const n=e.delims.at(-1);return e.exclusive&&(!n||e.exclusive.start>n.start)?e.exclusive:n?{kind:"delim",start:n.start,token:n.token}:e.exclusive}function Qz(e){let n=0;for(let t=0;t0}function Yz(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function TI(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function rbt(e,n,t){if(!e.startsWith(n))return!1;const r=e.slice(n.length).trim();if(!r.startsWith("|")||!r.endsWith("|"))return!1;const s=TI(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function W6(e,n){let t=n+1;for(;tn+t}function _v(e,n){return n===0||e[n-1]===` -`}function eo(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function Xz(e){return!!e&&/[A-Za-z0-9]/.test(e)}function jI(e){return!!e&&/[A-Za-z]/.test(e)}const AI=B6().use(G6);var Dp,Th,jh,kf,Ah,Lp,Op,Ip,Cf,Bp,Ef;class sbt{constructor(){nt(this,Dp,AI);nt(this,Th,null);nt(this,jh,{});nt(this,kf,null);nt(this,Ah,"");nt(this,Lp,[]);nt(this,Op,[]);nt(this,Ip,[]);nt(this,Cf,0);nt(this,Bp,[]);nt(this,Ef,[])}reconfigure(n,t,r){fe(this,Th)!==null&&fe(this,Dp)===n&&RI(fe(this,jh),r)&&!!fe(this,kf)===t||(Fe(this,Dp,n),n.attachers.some(s=>s[0]===hv)||(n=n(),n.use(hv),n.freeze()),Fe(this,Th,n),Fe(this,jh,r),Fe(this,Ah,""),Fe(this,Lp,[]),Fe(this,Op,[]),Fe(this,Ip,[]),Fe(this,Cf,0),Fe(this,Bp,[]),Fe(this,kf,t?new Ivt:null))}update(n){fe(this,kf)&&(n=fe(this,kf).update(n));let t=fe(this,Ah);if(n===t)return fe(this,Ef);const r=fe(this,Lp),s=ibt(n,t);let i=r.length-1;for(;i>=0&&!(s>=r[i]);i-=1);let o=r[i]??0;i===-1&&(i=0);const a=Zu(fe(this,Th)),l=fe(this,Op),u=l.slice(i).some(E=>E.some(e5));let _=a.parse(n.slice(o)),f=_.children.map(E=>Zu(Zu(E.position).start.offset)+o);Fe(this,Ah,n),j2(r.length===l.length),r.splice(i,r.length-i,...f);{const E=q2(_,f,o);j2(E.length===f.length),l.splice(i,l.length-i,...E)}if(u||e5(_)){i=0,o=0,_=a.parse(n),f=_.children.map(j=>Zu(Zu(j.position).start.offset)+o),r.splice(0,r.length,...f);const E=q2(_,f,o);j2(E.length===f.length),l.splice(0,l.length,...E)}const p=q2(a.runSync(_),f,o),m=fe(this,Ip),x=fe(this,Bp),S=fe(this,Ef),b=x.length;let v=null,y=0;for(;yb&&(m.length=x.length=r.length);for(let E=r.length=C?R=b-(r.length-j):j=b){m[j]=String(fe(this,Cf)),Fe(this,Cf,fe(this,Cf)+1),x[j]=null,v&&(v[j]=void 0);continue}m[j]=m[R]??String(X_(this,Cf)._++),x[j]=x[R]??null,v&&(v[j]=S[R])}r.length[]);let s=0;for(const o of e.children){const a=(i=o.position)==null?void 0:i.start.offset;if(a!==void 0){for(;s+1s||t!==-1&&n>t||r!==-1&&n>r||dbt.test(e.slice(0,n))?e:""}const tT=/[#.]/g;function vbt(e,n){const t=e||"",r={};let s=0,i,o;for(;su&&(u=_):_&&(u!==void 0&&u>-1&&l.push(` -`.repeat(u)||" "),u=-1,l.push(_))}return l.join("")}function $I(e,n,t){return e.type==="element"?Pbt(e,n,t):e.type==="text"?t.whitespace==="normal"?PI(e,t):Fbt(e):[]}function Pbt(e,n,t){const r=FI(e,t),s=e.children||[];let i=-1,o=[];if(Bbt(e))return o;let a,l;for(n5(e)||lT(e)&&sT(n,e,lT)?l=` -`:Ibt(e)?(a=2,l=2):BI(e)&&(a=1,l=1);++i15?u="…"+a.slice(s-15,s):u=a.slice(0,s);var _;i+15e.replace(Wbt,"-$1").toLowerCase(),Kbt={"&":"&",">":">","<":"<",'"':""","'":"'"},Qbt=/[&><"']/g,qs=e=>String(e).replace(Qbt,n=>Kbt[n]),k1=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?k1(e.body[0]):e:e.type==="font"?k1(e.body):e,Ybt=new Set(["mathord","textord","atom"]),Ql=e=>Ybt.has(k1(e).type),Xbt=e=>{var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},r5={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,n)=>(n.push(e),n)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Zbt(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function Jbt(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return Zbt(n)}function eyt(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:Jbt(r)}class K6{constructor(n){n===void 0&&(n={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,n=n||{};for(var t of Object.keys(r5)){var r=r5[t];r&&eyt(this,t,n,r)}}reportNonstrict(n,t,r){var s=this.strict;if(typeof s=="function"&&(s=s(n,t,r)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new Qe("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+n+"]"),r);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]"))}}useStrictBehavior(n,t,r){var s=this.strict;if(typeof s=="function")try{s=s(n,t,r)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]")),!1)}isTrusted(n){if("url"in n&&n.url&&!n.protocol){var t=Xbt(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class Bc{constructor(n,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=n,this.size=t,this.cramped=r}sup(){return No[tyt[this.id]]}sub(){return No[nyt[this.id]]}fracNum(){return No[ryt[this.id]]}fracDen(){return No[syt[this.id]]}cramp(){return No[iyt[this.id]]}text(){return No[ayt[this.id]]}isTight(){return this.size>=2}}var Q6=0,pv=1,lh=2,ql=3,ap=4,xa=5,Fh=6,ni=7,No=[new Bc(Q6,0,!1),new Bc(pv,0,!0),new Bc(lh,1,!1),new Bc(ql,1,!0),new Bc(ap,2,!1),new Bc(xa,2,!0),new Bc(Fh,3,!1),new Bc(ni,3,!0)],tyt=[ap,xa,ap,xa,Fh,ni,Fh,ni],nyt=[xa,xa,xa,xa,ni,ni,ni,ni],ryt=[lh,ql,ap,xa,Fh,ni,Fh,ni],syt=[ql,ql,xa,xa,ni,ni,ni,ni],iyt=[pv,pv,ql,ql,xa,xa,ni,ni],ayt=[Q6,pv,lh,ql,lh,ql,lh,ql],Yt={DISPLAY:No[Q6],TEXT:No[lh],SCRIPT:No[ap],SCRIPTSCRIPT:No[Fh]},s5=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function oyt(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var C1=[];s5.forEach(e=>e.blocks.forEach(n=>C1.push(...n)));function HI(e){for(var n=0;n=C1[n]&&e<=C1[n+1])return!0;return!1}var ds=e=>e+" "+e,Fd=80,lyt=function(n,t){return"M95,"+(622+n+t)+` -c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 -c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 -c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 -s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 -c69,-144,104.5,-217.7,106.5,-221 -l`+n/2.075+" -"+n+` -c5.3,-9.3,12,-14,20,-14 -H400000v`+(40+n)+`H845.2724 -s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 -c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},cyt=function(n,t){return"M263,"+(601+n+t)+`c0.7,0,18,39.7,52,119 -c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 -c340,-704.7,510.7,-1060.3,512,-1067 -l`+n/2.084+" -"+n+` -c4.7,-7.3,11,-11,19,-11 -H40000v`+(40+n)+`H1012.3 -s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 -c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 -s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 -c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},uyt=function(n,t){return"M983 "+(10+n+t)+` -l`+n/3.13+" -"+n+` -c4,-6.7,10,-10,18,-10 H400000v`+(40+n)+` -H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 -s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 -c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 -c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 -c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 -c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},fyt=function(n,t){return"M424,"+(2398+n+t)+` -c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 -c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 -s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 -s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 -l`+n/4.223+" -"+n+`c4,-6.7,10,-10,18,-10 H400000 -v`+(40+n)+`H1014.6 -s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 -c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2z M`+(1001+n)+" "+t+` -h400000v`+(40+n)+"h-400000z"},dyt=function(n,t){return"M473,"+(2713+n+t)+` -c339.3,-1799.3,509.3,-2700,510,-2702 l`+n/5.298+" -"+n+` -c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+n)+`H1017.7 -s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 -c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 -s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+n)+" "+t+"h400000v"+(40+n)+"H1017.7z"},hyt=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},_yt=function(n,t,r){var s=r-54-t-n;return"M702 "+(n+t)+"H400000"+(40+n)+` -H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 -h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 -c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},pyt=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=lyt(t,Fd);break;case"sqrtSize1":s=cyt(t,Fd);break;case"sqrtSize2":s=uyt(t,Fd);break;case"sqrtSize3":s=fyt(t,Fd);break;case"sqrtSize4":s=dyt(t,Fd);break;case"sqrtTall":s=_yt(t,Fd,r)}return s},myt=function(n,t){switch(n){case"⎜":return ds("M291 0 H417 V"+t+" H291z");case"∣":return ds("M145 0 H188 V"+t+" H145z");case"∥":return ds("M145 0 H188 V"+t+" H145z")+ds("M367 0 H410 V"+t+" H367z");case"⎟":return ds("M457 0 H583 V"+t+" H457z");case"⎢":return ds("M319 0 H403 V"+t+" H319z");case"⎥":return ds("M263 0 H347 V"+t+" H263z");case"⎪":return ds("M384 0 H504 V"+t+" H384z");case"⏐":return ds("M312 0 H355 V"+t+" H312z");case"‖":return ds("M257 0 H300 V"+t+" H257z")+ds("M478 0 H521 V"+t+" H478z");default:return""}},cT={doubleleftarrow:`M262 157 -l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 - 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 - 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 -c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 - 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 --86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 --2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z -m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l --10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 - 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 --33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 --17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 --13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 -c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 --107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 - 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 --5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 -c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 - 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 - 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 - l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 --45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 - 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 - 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 - 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 --331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 -H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 - 435 0h399565z`,leftgroupunder:`M400000 262 -H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 - 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 --3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 --18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 --196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 - 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 --4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 --10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z -m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 - 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 - 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 --152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 - 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 --2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 -v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 --83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 --68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:ds("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:ds("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:ds("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:ds("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 --.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 -c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:ds("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 -c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 --53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 - 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 - 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 -c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 - 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 - 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 --5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 --320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z -m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 -60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 --451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z -m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 -c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 --480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z -m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 -85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 --707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z -m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 -c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 --16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 - 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 - 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 --40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 - 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l --6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 -s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 -c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 - 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 --174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 - 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 - 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 --3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 --10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 - 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 --18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 - 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z -m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 - 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 --7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 --27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 - 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 - 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 --64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z -m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 - 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 --13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:ds("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:ds("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:ds("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 - 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 --52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 --167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 - 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 --70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 --40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 --37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 - 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 -c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 - 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 - 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 --19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 - 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 --2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 - 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 - 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 --68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 --8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 - 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 -c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 - 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 --11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 - 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 - 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 - -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 --11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 - 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 - 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 - -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 -3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 -10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 --1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 --7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 -H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 -c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 -c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, --5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 -c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 -c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 -s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 -121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 -s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 -c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z -M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 --27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 -13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 --84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 --119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 -151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 -c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 -c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 -c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z -M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, -1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, --152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z -M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},gyt=function(n,t){switch(n){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84 -H403z M403 1759 V0 H319 V1759 v`+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z -M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z -M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z -MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z -MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z -M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z -M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 -c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, --36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, -949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 -c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, --544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 -l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, --210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, -63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 -c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` -c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 -c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 -c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 -c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 -l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function vyt(e){return"toText"in e}class o_{constructor(n){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=n,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(n){return this.classes.includes(n)}toNode(){for(var n=document.createDocumentFragment(),t=0;t{if(vyt(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var i5={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},byt={ex:!0,em:!0,mu:!0},qI=function(n){return typeof n!="string"&&(n=n.unit),n in i5||n in byt||n==="ex"},Cr=function(n,t){var r;if(n.unit in i5)r=i5[n.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(n.unit==="mu")r=t.fontMetrics().cssEmPerMu;else{var s;if(t.style.isTight()?s=t.havingStyle(t.style.text()):s=t,n.unit==="ex")r=s.fontMetrics().xHeight;else if(n.unit==="em")r=s.fontMetrics().quad;else throw new Qe("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},Ze=function(n){return+n.toFixed(4)+"em"},fu=function(n){return n.filter(t=>t).join(" ")},Y6=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=Vbt(r)+":"+s+";")}return t},UI=function(n,t,r){if(this.classes=n||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},GI=function(n){var t=document.createElement(n);t.className=fu(this.classes),Object.assign(t.style,this.style);for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s/=\x00-\x1f]/,WI=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+qs(fu(this.classes))+'"');var r=Y6(this.style);r&&(t+=' style="'+qs(r)+'"');for(var s of Object.keys(this.attributes)){if(yyt.test(s))throw new Qe("Invalid attribute name '"+s+"'");t+=" "+s+'="'+qs(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class l_{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,UI.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return GI.call(this,"span")}toMarkup(){return WI.call(this,"span")}}class db{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,UI.call(this,t,s),this.children=r||[],this.setAttribute("href",n)}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return GI.call(this,"a")}toMarkup(){return WI.call(this,"a")}}class xyt{constructor(n,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=n,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(n){return this.classes.includes(n)}toNode(){var n=document.createElement("img");return n.src=this.src,n.alt=this.alt,n.className="mord",Object.assign(n.style,this.style),n}toMarkup(){var n=''+qs(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=Ze(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=fu(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(n),t):n}toMarkup(){var n=!1,t="0&&(r+="margin-right:"+Ze(this.italic)+";"),r+=Y6(this.style),r&&(n=!0,t+=' style="'+qs(r)+'"');var s=qs(this.text);return n?(t+=">",t+=s,t+="",t):s}}class Wl{constructor(n,t){this.children=void 0,this.attributes=void 0,this.children=n||[],this.attributes=t||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"svg");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s':''}}class a5{constructor(n){this.attributes=void 0,this.attributes=n||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"line");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);return t}toMarkup(){var n=" but got "+String(e)+".")}var Cyt=e=>e instanceof l_||e instanceof db||e instanceof o_,To={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Bg={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},uT={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Eyt(e,n){To[e]=n}function X6(e,n,t){if(!To[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=To[n][r];if(!s&&e[0]in uT&&(r=uT[e[0]].charCodeAt(0),s=To[n][r]),!s&&t==="text"&&HI(r)&&(s=To[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var W2={};function Nyt(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!W2[n]){var t=W2[n]={cssEmPerMu:Bg.quad[n]/18};for(var r in Bg)Bg.hasOwnProperty(r)&&(t[r]=Bg[r][n])}return W2[n]}var gr={math:{},text:{}};function B(e,n,t,r,s,i){gr[e][s]={font:n,group:t,replace:r},i&&r&&(gr[e][r]=gr[e][s])}var W="math",He="text",J="main",he="ams",br="accent-token",lt="bin",si="close",c_="inner",Lt="mathord",ss="op-token",Xi="open",nm="punct",_e="rel",Yl="spacing",ve="textord";B(W,J,_e,"≡","\\equiv",!0);B(W,J,_e,"≺","\\prec",!0);B(W,J,_e,"≻","\\succ",!0);B(W,J,_e,"∼","\\sim",!0);B(W,J,_e,"⊥","\\perp");B(W,J,_e,"⪯","\\preceq",!0);B(W,J,_e,"⪰","\\succeq",!0);B(W,J,_e,"≃","\\simeq",!0);B(W,J,_e,"∣","\\mid",!0);B(W,J,_e,"≪","\\ll",!0);B(W,J,_e,"≫","\\gg",!0);B(W,J,_e,"≍","\\asymp",!0);B(W,J,_e,"∥","\\parallel");B(W,J,_e,"⋈","\\bowtie",!0);B(W,J,_e,"⌣","\\smile",!0);B(W,J,_e,"⊑","\\sqsubseteq",!0);B(W,J,_e,"⊒","\\sqsupseteq",!0);B(W,J,_e,"≐","\\doteq",!0);B(W,J,_e,"⌢","\\frown",!0);B(W,J,_e,"∋","\\ni",!0);B(W,J,_e,"∝","\\propto",!0);B(W,J,_e,"⊢","\\vdash",!0);B(W,J,_e,"⊣","\\dashv",!0);B(W,J,_e,"∋","\\owns");B(W,J,nm,".","\\ldotp");B(W,J,nm,"⋅","\\cdotp");B(W,J,nm,"⋅","·");B(He,J,ve,"⋅","·");B(W,J,ve,"#","\\#");B(He,J,ve,"#","\\#");B(W,J,ve,"&","\\&");B(He,J,ve,"&","\\&");B(W,J,ve,"ℵ","\\aleph",!0);B(W,J,ve,"∀","\\forall",!0);B(W,J,ve,"ℏ","\\hbar",!0);B(W,J,ve,"∃","\\exists",!0);B(W,J,ve,"∇","\\nabla",!0);B(W,J,ve,"♭","\\flat",!0);B(W,J,ve,"ℓ","\\ell",!0);B(W,J,ve,"♮","\\natural",!0);B(W,J,ve,"♣","\\clubsuit",!0);B(W,J,ve,"℘","\\wp",!0);B(W,J,ve,"♯","\\sharp",!0);B(W,J,ve,"♢","\\diamondsuit",!0);B(W,J,ve,"ℜ","\\Re",!0);B(W,J,ve,"♡","\\heartsuit",!0);B(W,J,ve,"ℑ","\\Im",!0);B(W,J,ve,"♠","\\spadesuit",!0);B(W,J,ve,"§","\\S",!0);B(He,J,ve,"§","\\S");B(W,J,ve,"¶","\\P",!0);B(He,J,ve,"¶","\\P");B(W,J,ve,"†","\\dag");B(He,J,ve,"†","\\dag");B(He,J,ve,"†","\\textdagger");B(W,J,ve,"‡","\\ddag");B(He,J,ve,"‡","\\ddag");B(He,J,ve,"‡","\\textdaggerdbl");B(W,J,si,"⎱","\\rmoustache",!0);B(W,J,Xi,"⎰","\\lmoustache",!0);B(W,J,si,"⟯","\\rgroup",!0);B(W,J,Xi,"⟮","\\lgroup",!0);B(W,J,lt,"∓","\\mp",!0);B(W,J,lt,"⊖","\\ominus",!0);B(W,J,lt,"⊎","\\uplus",!0);B(W,J,lt,"⊓","\\sqcap",!0);B(W,J,lt,"∗","\\ast");B(W,J,lt,"⊔","\\sqcup",!0);B(W,J,lt,"◯","\\bigcirc",!0);B(W,J,lt,"∙","\\bullet",!0);B(W,J,lt,"‡","\\ddagger");B(W,J,lt,"≀","\\wr",!0);B(W,J,lt,"⨿","\\amalg");B(W,J,lt,"&","\\And");B(W,J,_e,"⟵","\\longleftarrow",!0);B(W,J,_e,"⇐","\\Leftarrow",!0);B(W,J,_e,"⟸","\\Longleftarrow",!0);B(W,J,_e,"⟶","\\longrightarrow",!0);B(W,J,_e,"⇒","\\Rightarrow",!0);B(W,J,_e,"⟹","\\Longrightarrow",!0);B(W,J,_e,"↔","\\leftrightarrow",!0);B(W,J,_e,"⟷","\\longleftrightarrow",!0);B(W,J,_e,"⇔","\\Leftrightarrow",!0);B(W,J,_e,"⟺","\\Longleftrightarrow",!0);B(W,J,_e,"↦","\\mapsto",!0);B(W,J,_e,"⟼","\\longmapsto",!0);B(W,J,_e,"↗","\\nearrow",!0);B(W,J,_e,"↩","\\hookleftarrow",!0);B(W,J,_e,"↪","\\hookrightarrow",!0);B(W,J,_e,"↘","\\searrow",!0);B(W,J,_e,"↼","\\leftharpoonup",!0);B(W,J,_e,"⇀","\\rightharpoonup",!0);B(W,J,_e,"↙","\\swarrow",!0);B(W,J,_e,"↽","\\leftharpoondown",!0);B(W,J,_e,"⇁","\\rightharpoondown",!0);B(W,J,_e,"↖","\\nwarrow",!0);B(W,J,_e,"⇌","\\rightleftharpoons",!0);B(W,he,_e,"≮","\\nless",!0);B(W,he,_e,"","\\@nleqslant");B(W,he,_e,"","\\@nleqq");B(W,he,_e,"⪇","\\lneq",!0);B(W,he,_e,"≨","\\lneqq",!0);B(W,he,_e,"","\\@lvertneqq");B(W,he,_e,"⋦","\\lnsim",!0);B(W,he,_e,"⪉","\\lnapprox",!0);B(W,he,_e,"⊀","\\nprec",!0);B(W,he,_e,"⋠","\\npreceq",!0);B(W,he,_e,"⋨","\\precnsim",!0);B(W,he,_e,"⪹","\\precnapprox",!0);B(W,he,_e,"≁","\\nsim",!0);B(W,he,_e,"","\\@nshortmid");B(W,he,_e,"∤","\\nmid",!0);B(W,he,_e,"⊬","\\nvdash",!0);B(W,he,_e,"⊭","\\nvDash",!0);B(W,he,_e,"⋪","\\ntriangleleft");B(W,he,_e,"⋬","\\ntrianglelefteq",!0);B(W,he,_e,"⊊","\\subsetneq",!0);B(W,he,_e,"","\\@varsubsetneq");B(W,he,_e,"⫋","\\subsetneqq",!0);B(W,he,_e,"","\\@varsubsetneqq");B(W,he,_e,"≯","\\ngtr",!0);B(W,he,_e,"","\\@ngeqslant");B(W,he,_e,"","\\@ngeqq");B(W,he,_e,"⪈","\\gneq",!0);B(W,he,_e,"≩","\\gneqq",!0);B(W,he,_e,"","\\@gvertneqq");B(W,he,_e,"⋧","\\gnsim",!0);B(W,he,_e,"⪊","\\gnapprox",!0);B(W,he,_e,"⊁","\\nsucc",!0);B(W,he,_e,"⋡","\\nsucceq",!0);B(W,he,_e,"⋩","\\succnsim",!0);B(W,he,_e,"⪺","\\succnapprox",!0);B(W,he,_e,"≆","\\ncong",!0);B(W,he,_e,"","\\@nshortparallel");B(W,he,_e,"∦","\\nparallel",!0);B(W,he,_e,"⊯","\\nVDash",!0);B(W,he,_e,"⋫","\\ntriangleright");B(W,he,_e,"⋭","\\ntrianglerighteq",!0);B(W,he,_e,"","\\@nsupseteqq");B(W,he,_e,"⊋","\\supsetneq",!0);B(W,he,_e,"","\\@varsupsetneq");B(W,he,_e,"⫌","\\supsetneqq",!0);B(W,he,_e,"","\\@varsupsetneqq");B(W,he,_e,"⊮","\\nVdash",!0);B(W,he,_e,"⪵","\\precneqq",!0);B(W,he,_e,"⪶","\\succneqq",!0);B(W,he,_e,"","\\@nsubseteqq");B(W,he,lt,"⊴","\\unlhd");B(W,he,lt,"⊵","\\unrhd");B(W,he,_e,"↚","\\nleftarrow",!0);B(W,he,_e,"↛","\\nrightarrow",!0);B(W,he,_e,"⇍","\\nLeftarrow",!0);B(W,he,_e,"⇏","\\nRightarrow",!0);B(W,he,_e,"↮","\\nleftrightarrow",!0);B(W,he,_e,"⇎","\\nLeftrightarrow",!0);B(W,he,_e,"△","\\vartriangle");B(W,he,ve,"ℏ","\\hslash");B(W,he,ve,"▽","\\triangledown");B(W,he,ve,"◊","\\lozenge");B(W,he,ve,"Ⓢ","\\circledS");B(W,he,ve,"®","\\circledR");B(He,he,ve,"®","\\circledR");B(W,he,ve,"∡","\\measuredangle",!0);B(W,he,ve,"∄","\\nexists");B(W,he,ve,"℧","\\mho");B(W,he,ve,"Ⅎ","\\Finv",!0);B(W,he,ve,"⅁","\\Game",!0);B(W,he,ve,"‵","\\backprime");B(W,he,ve,"▲","\\blacktriangle");B(W,he,ve,"▼","\\blacktriangledown");B(W,he,ve,"■","\\blacksquare");B(W,he,ve,"⧫","\\blacklozenge");B(W,he,ve,"★","\\bigstar");B(W,he,ve,"∢","\\sphericalangle",!0);B(W,he,ve,"∁","\\complement",!0);B(W,he,ve,"ð","\\eth",!0);B(He,J,ve,"ð","ð");B(W,he,ve,"╱","\\diagup");B(W,he,ve,"╲","\\diagdown");B(W,he,ve,"□","\\square");B(W,he,ve,"□","\\Box");B(W,he,ve,"◊","\\Diamond");B(W,he,ve,"¥","\\yen",!0);B(He,he,ve,"¥","\\yen",!0);B(W,he,ve,"✓","\\checkmark",!0);B(He,he,ve,"✓","\\checkmark");B(W,he,ve,"ℶ","\\beth",!0);B(W,he,ve,"ℸ","\\daleth",!0);B(W,he,ve,"ℷ","\\gimel",!0);B(W,he,ve,"ϝ","\\digamma",!0);B(W,he,ve,"ϰ","\\varkappa");B(W,he,Xi,"┌","\\@ulcorner",!0);B(W,he,si,"┐","\\@urcorner",!0);B(W,he,Xi,"└","\\@llcorner",!0);B(W,he,si,"┘","\\@lrcorner",!0);B(W,he,_e,"≦","\\leqq",!0);B(W,he,_e,"⩽","\\leqslant",!0);B(W,he,_e,"⪕","\\eqslantless",!0);B(W,he,_e,"≲","\\lesssim",!0);B(W,he,_e,"⪅","\\lessapprox",!0);B(W,he,_e,"≊","\\approxeq",!0);B(W,he,lt,"⋖","\\lessdot");B(W,he,_e,"⋘","\\lll",!0);B(W,he,_e,"≶","\\lessgtr",!0);B(W,he,_e,"⋚","\\lesseqgtr",!0);B(W,he,_e,"⪋","\\lesseqqgtr",!0);B(W,he,_e,"≑","\\doteqdot");B(W,he,_e,"≓","\\risingdotseq",!0);B(W,he,_e,"≒","\\fallingdotseq",!0);B(W,he,_e,"∽","\\backsim",!0);B(W,he,_e,"⋍","\\backsimeq",!0);B(W,he,_e,"⫅","\\subseteqq",!0);B(W,he,_e,"⋐","\\Subset",!0);B(W,he,_e,"⊏","\\sqsubset",!0);B(W,he,_e,"≼","\\preccurlyeq",!0);B(W,he,_e,"⋞","\\curlyeqprec",!0);B(W,he,_e,"≾","\\precsim",!0);B(W,he,_e,"⪷","\\precapprox",!0);B(W,he,_e,"⊲","\\vartriangleleft");B(W,he,_e,"⊴","\\trianglelefteq");B(W,he,_e,"⊨","\\vDash",!0);B(W,he,_e,"⊪","\\Vvdash",!0);B(W,he,_e,"⌣","\\smallsmile");B(W,he,_e,"⌢","\\smallfrown");B(W,he,_e,"≏","\\bumpeq",!0);B(W,he,_e,"≎","\\Bumpeq",!0);B(W,he,_e,"≧","\\geqq",!0);B(W,he,_e,"⩾","\\geqslant",!0);B(W,he,_e,"⪖","\\eqslantgtr",!0);B(W,he,_e,"≳","\\gtrsim",!0);B(W,he,_e,"⪆","\\gtrapprox",!0);B(W,he,lt,"⋗","\\gtrdot");B(W,he,_e,"⋙","\\ggg",!0);B(W,he,_e,"≷","\\gtrless",!0);B(W,he,_e,"⋛","\\gtreqless",!0);B(W,he,_e,"⪌","\\gtreqqless",!0);B(W,he,_e,"≖","\\eqcirc",!0);B(W,he,_e,"≗","\\circeq",!0);B(W,he,_e,"≜","\\triangleq",!0);B(W,he,_e,"∼","\\thicksim");B(W,he,_e,"≈","\\thickapprox");B(W,he,_e,"⫆","\\supseteqq",!0);B(W,he,_e,"⋑","\\Supset",!0);B(W,he,_e,"⊐","\\sqsupset",!0);B(W,he,_e,"≽","\\succcurlyeq",!0);B(W,he,_e,"⋟","\\curlyeqsucc",!0);B(W,he,_e,"≿","\\succsim",!0);B(W,he,_e,"⪸","\\succapprox",!0);B(W,he,_e,"⊳","\\vartriangleright");B(W,he,_e,"⊵","\\trianglerighteq");B(W,he,_e,"⊩","\\Vdash",!0);B(W,he,_e,"∣","\\shortmid");B(W,he,_e,"∥","\\shortparallel");B(W,he,_e,"≬","\\between",!0);B(W,he,_e,"⋔","\\pitchfork",!0);B(W,he,_e,"∝","\\varpropto");B(W,he,_e,"◀","\\blacktriangleleft");B(W,he,_e,"∴","\\therefore",!0);B(W,he,_e,"∍","\\backepsilon");B(W,he,_e,"▶","\\blacktriangleright");B(W,he,_e,"∵","\\because",!0);B(W,he,_e,"⋘","\\llless");B(W,he,_e,"⋙","\\gggtr");B(W,he,lt,"⊲","\\lhd");B(W,he,lt,"⊳","\\rhd");B(W,he,_e,"≂","\\eqsim",!0);B(W,J,_e,"⋈","\\Join");B(W,he,_e,"≑","\\Doteq",!0);B(W,he,lt,"∔","\\dotplus",!0);B(W,he,lt,"∖","\\smallsetminus");B(W,he,lt,"⋒","\\Cap",!0);B(W,he,lt,"⋓","\\Cup",!0);B(W,he,lt,"⩞","\\doublebarwedge",!0);B(W,he,lt,"⊟","\\boxminus",!0);B(W,he,lt,"⊞","\\boxplus",!0);B(W,he,lt,"⋇","\\divideontimes",!0);B(W,he,lt,"⋉","\\ltimes",!0);B(W,he,lt,"⋊","\\rtimes",!0);B(W,he,lt,"⋋","\\leftthreetimes",!0);B(W,he,lt,"⋌","\\rightthreetimes",!0);B(W,he,lt,"⋏","\\curlywedge",!0);B(W,he,lt,"⋎","\\curlyvee",!0);B(W,he,lt,"⊝","\\circleddash",!0);B(W,he,lt,"⊛","\\circledast",!0);B(W,he,lt,"⋅","\\centerdot");B(W,he,lt,"⊺","\\intercal",!0);B(W,he,lt,"⋒","\\doublecap");B(W,he,lt,"⋓","\\doublecup");B(W,he,lt,"⊠","\\boxtimes",!0);B(W,he,_e,"⇢","\\dashrightarrow",!0);B(W,he,_e,"⇠","\\dashleftarrow",!0);B(W,he,_e,"⇇","\\leftleftarrows",!0);B(W,he,_e,"⇆","\\leftrightarrows",!0);B(W,he,_e,"⇚","\\Lleftarrow",!0);B(W,he,_e,"↞","\\twoheadleftarrow",!0);B(W,he,_e,"↢","\\leftarrowtail",!0);B(W,he,_e,"↫","\\looparrowleft",!0);B(W,he,_e,"⇋","\\leftrightharpoons",!0);B(W,he,_e,"↶","\\curvearrowleft",!0);B(W,he,_e,"↺","\\circlearrowleft",!0);B(W,he,_e,"↰","\\Lsh",!0);B(W,he,_e,"⇈","\\upuparrows",!0);B(W,he,_e,"↿","\\upharpoonleft",!0);B(W,he,_e,"⇃","\\downharpoonleft",!0);B(W,J,_e,"⊶","\\origof",!0);B(W,J,_e,"⊷","\\imageof",!0);B(W,he,_e,"⊸","\\multimap",!0);B(W,he,_e,"↭","\\leftrightsquigarrow",!0);B(W,he,_e,"⇉","\\rightrightarrows",!0);B(W,he,_e,"⇄","\\rightleftarrows",!0);B(W,he,_e,"↠","\\twoheadrightarrow",!0);B(W,he,_e,"↣","\\rightarrowtail",!0);B(W,he,_e,"↬","\\looparrowright",!0);B(W,he,_e,"↷","\\curvearrowright",!0);B(W,he,_e,"↻","\\circlearrowright",!0);B(W,he,_e,"↱","\\Rsh",!0);B(W,he,_e,"⇊","\\downdownarrows",!0);B(W,he,_e,"↾","\\upharpoonright",!0);B(W,he,_e,"⇂","\\downharpoonright",!0);B(W,he,_e,"⇝","\\rightsquigarrow",!0);B(W,he,_e,"⇝","\\leadsto");B(W,he,_e,"⇛","\\Rrightarrow",!0);B(W,he,_e,"↾","\\restriction");B(W,J,ve,"‘","`");B(W,J,ve,"$","\\$");B(He,J,ve,"$","\\$");B(He,J,ve,"$","\\textdollar");B(W,J,ve,"%","\\%");B(He,J,ve,"%","\\%");B(W,J,ve,"_","\\_");B(He,J,ve,"_","\\_");B(He,J,ve,"_","\\textunderscore");B(W,J,ve,"∠","\\angle",!0);B(W,J,ve,"∞","\\infty",!0);B(W,J,ve,"′","\\prime");B(W,J,ve,"△","\\triangle");B(W,J,ve,"Γ","\\Gamma",!0);B(W,J,ve,"Δ","\\Delta",!0);B(W,J,ve,"Θ","\\Theta",!0);B(W,J,ve,"Λ","\\Lambda",!0);B(W,J,ve,"Ξ","\\Xi",!0);B(W,J,ve,"Π","\\Pi",!0);B(W,J,ve,"Σ","\\Sigma",!0);B(W,J,ve,"Υ","\\Upsilon",!0);B(W,J,ve,"Φ","\\Phi",!0);B(W,J,ve,"Ψ","\\Psi",!0);B(W,J,ve,"Ω","\\Omega",!0);B(W,J,ve,"A","Α");B(W,J,ve,"B","Β");B(W,J,ve,"E","Ε");B(W,J,ve,"Z","Ζ");B(W,J,ve,"H","Η");B(W,J,ve,"I","Ι");B(W,J,ve,"K","Κ");B(W,J,ve,"M","Μ");B(W,J,ve,"N","Ν");B(W,J,ve,"O","Ο");B(W,J,ve,"P","Ρ");B(W,J,ve,"T","Τ");B(W,J,ve,"X","Χ");B(W,J,ve,"¬","\\neg",!0);B(W,J,ve,"¬","\\lnot");B(W,J,ve,"⊤","\\top");B(W,J,ve,"⊥","\\bot");B(W,J,ve,"∅","\\emptyset");B(W,he,ve,"∅","\\varnothing");B(W,J,Lt,"α","\\alpha",!0);B(W,J,Lt,"β","\\beta",!0);B(W,J,Lt,"γ","\\gamma",!0);B(W,J,Lt,"δ","\\delta",!0);B(W,J,Lt,"ϵ","\\epsilon",!0);B(W,J,Lt,"ζ","\\zeta",!0);B(W,J,Lt,"η","\\eta",!0);B(W,J,Lt,"θ","\\theta",!0);B(W,J,Lt,"ι","\\iota",!0);B(W,J,Lt,"κ","\\kappa",!0);B(W,J,Lt,"λ","\\lambda",!0);B(W,J,Lt,"μ","\\mu",!0);B(W,J,Lt,"ν","\\nu",!0);B(W,J,Lt,"ξ","\\xi",!0);B(W,J,Lt,"ο","\\omicron",!0);B(W,J,Lt,"π","\\pi",!0);B(W,J,Lt,"ρ","\\rho",!0);B(W,J,Lt,"σ","\\sigma",!0);B(W,J,Lt,"τ","\\tau",!0);B(W,J,Lt,"υ","\\upsilon",!0);B(W,J,Lt,"ϕ","\\phi",!0);B(W,J,Lt,"χ","\\chi",!0);B(W,J,Lt,"ψ","\\psi",!0);B(W,J,Lt,"ω","\\omega",!0);B(W,J,Lt,"ε","\\varepsilon",!0);B(W,J,Lt,"ϑ","\\vartheta",!0);B(W,J,Lt,"ϖ","\\varpi",!0);B(W,J,Lt,"ϱ","\\varrho",!0);B(W,J,Lt,"ς","\\varsigma",!0);B(W,J,Lt,"φ","\\varphi",!0);B(W,J,lt,"∗","*",!0);B(W,J,lt,"+","+");B(W,J,lt,"−","-",!0);B(W,J,lt,"⋅","\\cdot",!0);B(W,J,lt,"∘","\\circ",!0);B(W,J,lt,"÷","\\div",!0);B(W,J,lt,"±","\\pm",!0);B(W,J,lt,"×","\\times",!0);B(W,J,lt,"∩","\\cap",!0);B(W,J,lt,"∪","\\cup",!0);B(W,J,lt,"∖","\\setminus",!0);B(W,J,lt,"∧","\\land");B(W,J,lt,"∨","\\lor");B(W,J,lt,"∧","\\wedge",!0);B(W,J,lt,"∨","\\vee",!0);B(W,J,ve,"√","\\surd");B(W,J,Xi,"⟨","\\langle",!0);B(W,J,Xi,"∣","\\lvert");B(W,J,Xi,"∥","\\lVert");B(W,J,si,"?","?");B(W,J,si,"!","!");B(W,J,si,"⟩","\\rangle",!0);B(W,J,si,"∣","\\rvert");B(W,J,si,"∥","\\rVert");B(W,J,_e,"=","=");B(W,J,_e,":",":");B(W,J,_e,"≈","\\approx",!0);B(W,J,_e,"≅","\\cong",!0);B(W,J,_e,"≥","\\ge");B(W,J,_e,"≥","\\geq",!0);B(W,J,_e,"←","\\gets");B(W,J,_e,">","\\gt",!0);B(W,J,_e,"∈","\\in",!0);B(W,J,_e,"","\\@not");B(W,J,_e,"⊂","\\subset",!0);B(W,J,_e,"⊃","\\supset",!0);B(W,J,_e,"⊆","\\subseteq",!0);B(W,J,_e,"⊇","\\supseteq",!0);B(W,he,_e,"⊈","\\nsubseteq",!0);B(W,he,_e,"⊉","\\nsupseteq",!0);B(W,J,_e,"⊨","\\models");B(W,J,_e,"←","\\leftarrow",!0);B(W,J,_e,"≤","\\le");B(W,J,_e,"≤","\\leq",!0);B(W,J,_e,"<","\\lt",!0);B(W,J,_e,"→","\\rightarrow",!0);B(W,J,_e,"→","\\to");B(W,he,_e,"≱","\\ngeq",!0);B(W,he,_e,"≰","\\nleq",!0);B(W,J,Yl," ","\\ ");B(W,J,Yl," ","\\space");B(W,J,Yl," ","\\nobreakspace");B(He,J,Yl," ","\\ ");B(He,J,Yl," "," ");B(He,J,Yl," ","\\space");B(He,J,Yl," ","\\nobreakspace");B(W,J,Yl,"","\\nobreak");B(W,J,Yl,"","\\allowbreak");B(W,J,nm,",",",");B(W,J,nm,";",";");B(W,he,lt,"⊼","\\barwedge",!0);B(W,he,lt,"⊻","\\veebar",!0);B(W,J,lt,"⊙","\\odot",!0);B(W,J,lt,"⊕","\\oplus",!0);B(W,J,lt,"⊗","\\otimes",!0);B(W,J,ve,"∂","\\partial",!0);B(W,J,lt,"⊘","\\oslash",!0);B(W,he,lt,"⊚","\\circledcirc",!0);B(W,he,lt,"⊡","\\boxdot",!0);B(W,J,lt,"△","\\bigtriangleup");B(W,J,lt,"▽","\\bigtriangledown");B(W,J,lt,"†","\\dagger");B(W,J,lt,"⋄","\\diamond");B(W,J,lt,"⋆","\\star");B(W,J,lt,"◃","\\triangleleft");B(W,J,lt,"▹","\\triangleright");B(W,J,Xi,"{","\\{");B(He,J,ve,"{","\\{");B(He,J,ve,"{","\\textbraceleft");B(W,J,si,"}","\\}");B(He,J,ve,"}","\\}");B(He,J,ve,"}","\\textbraceright");B(W,J,Xi,"{","\\lbrace");B(W,J,si,"}","\\rbrace");B(W,J,Xi,"[","\\lbrack",!0);B(He,J,ve,"[","\\lbrack",!0);B(W,J,si,"]","\\rbrack",!0);B(He,J,ve,"]","\\rbrack",!0);B(W,J,Xi,"(","\\lparen",!0);B(W,J,si,")","\\rparen",!0);B(He,J,ve,"<","\\textless",!0);B(He,J,ve,">","\\textgreater",!0);B(W,J,Xi,"⌊","\\lfloor",!0);B(W,J,si,"⌋","\\rfloor",!0);B(W,J,Xi,"⌈","\\lceil",!0);B(W,J,si,"⌉","\\rceil",!0);B(W,J,ve,"\\","\\backslash");B(W,J,ve,"∣","|");B(W,J,ve,"∣","\\vert");B(He,J,ve,"|","\\textbar",!0);B(W,J,ve,"∥","\\|");B(W,J,ve,"∥","\\Vert");B(He,J,ve,"∥","\\textbardbl");B(He,J,ve,"~","\\textasciitilde");B(He,J,ve,"\\","\\textbackslash");B(He,J,ve,"^","\\textasciicircum");B(W,J,_e,"↑","\\uparrow",!0);B(W,J,_e,"⇑","\\Uparrow",!0);B(W,J,_e,"↓","\\downarrow",!0);B(W,J,_e,"⇓","\\Downarrow",!0);B(W,J,_e,"↕","\\updownarrow",!0);B(W,J,_e,"⇕","\\Updownarrow",!0);B(W,J,ss,"∐","\\coprod");B(W,J,ss,"⋁","\\bigvee");B(W,J,ss,"⋀","\\bigwedge");B(W,J,ss,"⨄","\\biguplus");B(W,J,ss,"⋂","\\bigcap");B(W,J,ss,"⋃","\\bigcup");B(W,J,ss,"∫","\\int");B(W,J,ss,"∫","\\intop");B(W,J,ss,"∬","\\iint");B(W,J,ss,"∭","\\iiint");B(W,J,ss,"∏","\\prod");B(W,J,ss,"∑","\\sum");B(W,J,ss,"⨂","\\bigotimes");B(W,J,ss,"⨁","\\bigoplus");B(W,J,ss,"⨀","\\bigodot");B(W,J,ss,"∮","\\oint");B(W,J,ss,"∯","\\oiint");B(W,J,ss,"∰","\\oiiint");B(W,J,ss,"⨆","\\bigsqcup");B(W,J,ss,"∫","\\smallint");B(He,J,c_,"…","\\textellipsis");B(W,J,c_,"…","\\mathellipsis");B(He,J,c_,"…","\\ldots",!0);B(W,J,c_,"…","\\ldots",!0);B(W,J,c_,"⋯","\\@cdots",!0);B(W,J,c_,"⋱","\\ddots",!0);B(W,J,ve,"⋮","\\varvdots");B(He,J,ve,"⋮","\\varvdots");B(W,J,br,"ˊ","\\acute");B(W,J,br,"ˋ","\\grave");B(W,J,br,"¨","\\ddot");B(W,J,br,"~","\\tilde");B(W,J,br,"ˉ","\\bar");B(W,J,br,"˘","\\breve");B(W,J,br,"ˇ","\\check");B(W,J,br,"^","\\hat");B(W,J,br,"⃗","\\vec");B(W,J,br,"˙","\\dot");B(W,J,br,"˚","\\mathring");B(W,J,Lt,"","\\@imath");B(W,J,Lt,"","\\@jmath");B(W,J,ve,"ı","ı");B(W,J,ve,"ȷ","ȷ");B(He,J,ve,"ı","\\i",!0);B(He,J,ve,"ȷ","\\j",!0);B(He,J,ve,"ß","\\ss",!0);B(He,J,ve,"æ","\\ae",!0);B(He,J,ve,"œ","\\oe",!0);B(He,J,ve,"ø","\\o",!0);B(He,J,ve,"Æ","\\AE",!0);B(He,J,ve,"Œ","\\OE",!0);B(He,J,ve,"Ø","\\O",!0);B(He,J,br,"ˊ","\\'");B(He,J,br,"ˋ","\\`");B(He,J,br,"ˆ","\\^");B(He,J,br,"˜","\\~");B(He,J,br,"ˉ","\\=");B(He,J,br,"˘","\\u");B(He,J,br,"˙","\\.");B(He,J,br,"¸","\\c");B(He,J,br,"˚","\\r");B(He,J,br,"ˇ","\\v");B(He,J,br,"¨",'\\"');B(He,J,br,"˝","\\H");B(He,J,br,"◯","\\textcircled");var VI={"--":!0,"---":!0,"``":!0,"''":!0};B(He,J,ve,"–","--",!0);B(He,J,ve,"–","\\textendash");B(He,J,ve,"—","---",!0);B(He,J,ve,"—","\\textemdash");B(He,J,ve,"‘","`",!0);B(He,J,ve,"‘","\\textquoteleft");B(He,J,ve,"’","'",!0);B(He,J,ve,"’","\\textquoteright");B(He,J,ve,"“","``",!0);B(He,J,ve,"“","\\textquotedblleft");B(He,J,ve,"”","''",!0);B(He,J,ve,"”","\\textquotedblright");B(W,J,ve,"°","\\degree",!0);B(He,J,ve,"°","\\degree");B(He,J,ve,"°","\\textdegree",!0);B(W,J,ve,"£","\\pounds");B(W,J,ve,"£","\\mathsterling",!0);B(He,J,ve,"£","\\pounds");B(He,J,ve,"£","\\textsterling",!0);B(W,he,ve,"✠","\\maltese");B(He,he,ve,"✠","\\maltese");var fT='0123456789/@."';for(var V2=0;V2{var n=e.charCodeAt(0),t=e.charCodeAt(1),r=(n-55296)*1024+(t-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return xT[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return Tyt[i]}else{if(r===120485||r===120486)return xT[0];if(120486{if(fu(e.classes)!==fu(n.classes)||e.skew!==n.skew||e.maxFontSize!==n.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var t=e.classes[0];if(t==="mbin"||t==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==n.style[r])return!1;for(var s of Object.keys(n.style))if(e.style[s]!==n.style[s])return!1;return!0},KI=e=>{for(var n=0;nt&&(t=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>s&&(s=o.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},Ue=function(n,t,r,s){var i=new l_(n,t,r,s);return J6(i),i},hu=(e,n,t,r)=>new l_(e,n,t,r),Hh=function(n,t,r){var s=Ue([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=Ze(s.height),s.maxFontSize=1,s},Myt=function(n,t,r,s){var i=new db(n,t,r,s);return J6(i),i},Xl=function(n){var t=new o_(n);return J6(t),t},qh=function(n,t){return n instanceof o_?Ue([],[n],t):n},Dyt=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,i=s,o=1;o{var t=Ue(["mspace"],[],n),r=Cr(e,n);return t.style.marginRight=Ze(r),t},Fg=(e,n,t)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return n==="textbf"&&t==="textit"?s="BoldItalic":n==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",r+"-"+s},d5={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},YI={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},XI=function(n,t){var[r,s,i]=YI[n],o=new du(r),a=new Wl([o],{width:Ze(s),height:Ze(i),style:"width:"+Ze(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=hu(["overlay"],[a],t);return l.height=i,l.style.height=Ze(i),l.style.width=Ze(s),l},Sr={number:3,unit:"mu"},ef={number:4,unit:"mu"},kl={number:5,unit:"mu"},Lyt={mord:{mop:Sr,mbin:ef,mrel:kl,minner:Sr},mop:{mord:Sr,mop:Sr,mrel:kl,minner:Sr},mbin:{mord:ef,mop:ef,mopen:ef,minner:ef},mrel:{mord:kl,mop:kl,mopen:kl,minner:kl},mopen:{},mclose:{mop:Sr,mbin:ef,mrel:kl,minner:Sr},mpunct:{mord:Sr,mop:Sr,mrel:kl,mopen:Sr,mclose:Sr,mpunct:Sr,minner:Sr},minner:{mord:Sr,mop:Sr,mbin:ef,mrel:kl,mopen:Sr,mpunct:Sr,minner:Sr}},Oyt={mord:{mop:Sr},mop:{mord:Sr,mop:Sr},mbin:{},mrel:{},mopen:{},mclose:{mop:Sr},mpunct:{},minner:{mop:Sr}},ZI={},gv={},vv={};function at(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:o}=e,a={type:n,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:s},l=0;l{var b=S.classes[0],v=x.classes[0];b==="mbin"&&Byt.has(v)?S.classes[0]="mord":v==="mbin"&&Iyt.has(b)&&(x.classes[0]="mord")},{node:f},p,m),h5(i,(x,S)=>{var b,v,y=p5(S),w=p5(x),C=y&&w?x.hasClass("mtight")?(b=Oyt[y])==null?void 0:b[w]:(v=Lyt[y])==null?void 0:v[w]:null;if(C)return QI(C,u)},{node:f},p,m),i},h5=function(n,t,r,s,i){s&&n.push(s);for(var o=0;op=>{n.splice(f+1,0,p),o++})(o)}s&&n.pop()},JI=function(n){return n instanceof o_||n instanceof db||n instanceof l_&&n.hasClass("enclosing")?n:null},_5=function(n,t){var r=JI(n);if(r){var s=r.children;if(s.length){if(t==="right")return _5(s[s.length-1],"right");if(t==="left")return _5(s[0],"left")}}return n},p5=function(n,t){if(!n)return null;t&&(n=_5(n,t));var r=n.classes[0];return Pyt[r]||null},op=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Ue(t.concat(r))},In=function(n,t,r){if(!n)return Ue();if(gv[n.type]){var s=gv[n.type](n,t);if(r&&t.size!==r.size){s=Ue(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Qe("Got group of unknown type: '"+n.type+"'")};function Hg(e,n){var t=Ue(["base"],e,n),r=Ue(["strut"]);return r.style.height=Ze(t.height+t.depth),t.depth&&(r.style.verticalAlign=Ze(-t.depth)),t.children.unshift(r),t}function m5(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=hs(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],o=[],a=0;a0&&(i.push(Hg(o,n)),o=[]),i.push(r[a]));o.length>0&&i.push(Hg(o,n));var u;t?(u=Hg(hs(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var _=Ue(["katex-html"],i);if(_.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=Ze(_.height+_.depth),_.depth&&(f.style.verticalAlign=Ze(-_.depth))}return _}function eB(e){return new o_(e)}class Ye{constructor(n,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=n,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(n,t){this.attributes[n]=t}getAttribute(n){return this.attributes[n]}toNode(){var n=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&n.setAttribute(t,this.attributes[t]);this.classes.length>0&&(n.className=fu(this.classes));for(var r=0;r0&&(n+=' class ="'+qs(fu(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class ns{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return qs(this.toText())}toText(){return this.text}}class tB{constructor(n){this.width=void 0,this.character=void 0,this.width=n,n>=.05555&&n<=.05556?this.character=" ":n>=.1666&&n<=.1667?this.character=" ":n>=.2222&&n<=.2223?this.character=" ":n>=.2777&&n<=.2778?this.character="  ":n>=-.05556&&n<=-.05555?this.character=" ⁣":n>=-.1667&&n<=-.1666?this.character=" ⁣":n>=-.2223&&n<=-.2222?this.character=" ⁣":n>=-.2778&&n<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var n=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return n.setAttribute("width",Ze(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Fyt=new Set(["\\imath","\\jmath"]),Hyt=new Set(["mrow","mtable"]),Na=function(n,t,r){return gr[t][n]&&gr[t][n].replace&&n.charCodeAt(0)!==55349&&!(VI.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=gr[t][n].replace),new ns(n)},eS=function(n){return n.length===1?n[0]:new Ye("mrow",n)},qyt={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},tS=(e,n)=>{if(e.mode==="text"){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold"}var t=n.font;if(!t||t==="mathnormal")return null;var r=e.mode,s=qyt[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(Fyt.has(i))return null;if(gr[r][i]){var o=gr[r][i].replace;o&&(i=o)}var a=d5[t].fontName;return X6(i,a,r)?d5[t].variant:null};function X2(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof ns&&n.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var t=e.children[0];return t instanceof ns&&t.text===","}else return!1}var Zi=function(n,t,r){if(n.length===1){var s=nr(n[0],t);return r&&s instanceof Ye&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],o,a=0;a=1&&(o.type==="mn"||X2(o))){var u=l.children[0];u instanceof Ye&&u.type==="mn"&&(u.children=[...o.children,...u.children],i.pop())}else if(o.type==="mi"&&o.children.length===1){var _=o.children[0];if(_ instanceof ns&&_.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof ns&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(l),o=l}return i},_u=function(n,t,r){return eS(Zi(n,t,r))},nr=function(n,t){if(!n)return new Ye("mrow");if(vv[n.type])return vv[n.type](n,t);throw new Qe("Got group of unknown type: '"+n.type+"'")};function wT(e,n,t,r,s){var i=Zi(e,t),o;i.length===1&&i[0]instanceof Ye&&Hyt.has(i[0].type)?o=i[0]:o=new Ye("mrow",i);var a=new Ye("annotation",[new ns(n)]);a.setAttribute("encoding","application/x-tex");var l=new Ye("semantics",[o,a]),u=new Ye("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var _=s?"katex":"katex-mathml";return Ue([_],[u])}var Uyt=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],ST=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],kT=function(n,t){return t.size<2?n:Uyt[n-1][t.size-1]};class Tl{constructor(n){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=n.style,this.color=n.color,this.size=n.size||Tl.BASESIZE,this.textSize=n.textSize||this.size,this.phantom=!!n.phantom,this.font=n.font||"",this.fontFamily=n.fontFamily||"",this.fontWeight=n.fontWeight||"",this.fontShape=n.fontShape||"",this.sizeMultiplier=ST[this.size-1],this.maxSize=n.maxSize,this.minRuleThickness=n.minRuleThickness,this._fontMetrics=void 0}extend(n){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,n),new Tl(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:kT(this.textSize,n)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(n){return this.size===n&&this.textSize===n?this:this.extend({style:this.style.text(),size:n,textSize:n,sizeMultiplier:ST[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=kT(Tl.BASESIZE,n);return this.size===t&&this.textSize===Tl.BASESIZE&&this.style===n?this:this.extend({style:n,size:t})}havingBaseSizing(){var n;switch(this.style.id){case 4:case 5:n=3;break;case 6:case 7:n=1;break;default:n=6}return this.extend({style:this.style.text(),size:n})}withColor(n){return this.extend({color:n})}withPhantom(){return this.extend({phantom:!0})}withFont(n){return this.extend({font:n})}withTextFontFamily(n){return this.extend({fontFamily:n,font:""})}withTextFontWeight(n){return this.extend({fontWeight:n,font:""})}withTextFontShape(n){return this.extend({fontShape:n,font:""})}sizingClasses(n){return n.size!==this.size?["sizing","reset-size"+n.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Tl.BASESIZE?["sizing","reset-size"+this.size,"size"+Tl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Nyt(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Tl.BASESIZE=6;var nB=function(n){return new Tl({style:n.displayMode?Yt.DISPLAY:Yt.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},rB=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Ue(r,[n])}return n},Gyt=function(n,t,r){var s=nB(r),i;if(r.output==="mathml")return wT(n,t,s,r.displayMode,!0);if(r.output==="html"){var o=m5(n,s);i=Ue(["katex"],[o])}else{var a=wT(n,t,s,r.displayMode,!1),l=m5(n,s);i=Ue(["katex"],[a,l])}return rB(i,r)},Wyt=function(n,t,r){var s=nB(r),i=m5(n,s),o=Ue(["katex"],[i]);return rB(o,r)},Vyt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},pb=function(n){var t=new Ye("mo",[new ns(Vyt[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Kyt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Qyt=new Set(["widehat","widecheck","widetilde","utilde"]),mb=function(n,t){function r(){var a=4e5,l=n.label.slice(1);if(Qyt.has(l)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,_,f,p;if(u>5)l==="widehat"||l==="widecheck"?(_=420,a=2364,p=.42,f=l+"4"):(_=312,a=2340,p=.34,f="tilde4");else{var m=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(a=[0,1062,2364,2364,2364][m],_=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],f=l+m):(a=[0,600,1033,2339,2340][m],_=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],f="tilde"+m)}var x=new du(f),S=new Wl([x],{width:"100%",height:Ze(p),viewBox:"0 0 "+a+" "+_,preserveAspectRatio:"none"});return{span:hu([],[S],t),minWidth:0,height:p}}else{var b=[],v=Kyt[l];if(!v)throw new Error('No SVG data for "'+l+'".');var[y,w,C]=v,N=C/1e3,E=y.length,j,z;if(E===1){if(v.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');j=["hide-tail"],z=[v[3]]}else if(E===2)j=["halfarrow-left","halfarrow-right"],z=["xMinYMin","xMaxYMin"];else if(E===3)j=["brace-left","brace-center","brace-right"],z=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+E+" children.");for(var R=0;R0&&(s.style.minWidth=Ze(i)),s},Yyt=function(n,t,r,s,i){var o,a=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(o=Ue(["stretchy",t],[],i),t==="fbox"){var l=i.color&&i.getColor();l&&(o.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new a5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new a5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var _=new Wl(u,{width:"100%",height:Ze(a)});o=hu([],[_],i)}return o.height=a,o.style.height=Ze(a),o},Xyt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Zyt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function Jyt(e){return e in Xyt}function on(e,n){if(!e||e.type!==n)throw new Error("Expected node of type "+n+", but got "+(e?"node of type "+e.type:String(e)));return e}function gb(e){var n=vb(e);if(!n)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return n}function vb(e){return e&&(e.type==="atom"||Zyt.hasOwnProperty(e.type))?e:null}var sB=e=>{if(e instanceof Vi)return e;if(Cyt(e)&&e.children.length===1)return sB(e.children[0])},nS=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=on(e.base,"accent"),t=r.base,e.base=t,s=kyt(In(e,n)),e.base=r):(r=on(e,"accent"),t=r.base);var i=In(t,n.havingCrampedStyle()),o=r.isShifty&&Ql(t),a=0;if(o){var l,u;a=(l=(u=sB(i))==null?void 0:u.skew)!=null?l:0}var _=r.label==="\\c",f=_?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=mb(r,n),p=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:a>0?{width:"calc(100% - "+Ze(2*a)+")",marginLeft:Ze(2*a)}:void 0}]});else{var m,x;r.label==="\\vec"?(m=XI("vec",n),x=YI.vec[1]):(m=_b({mode:r.mode,text:r.label},n,"textord"),m=Syt(m),m.italic=0,x=m.width,_&&(f+=m.depth)),p=Ue(["accent-body"],[m]);var S=r.label==="\\textcircled";S&&(p.classes.push("accent-full"),f=i.height);var b=a;S||(b-=x/2),p.style.left=Ze(b),r.label==="\\textcircled"&&(p.style.top=".2em"),p=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]})}var v=Ue(["mord","accent"],[p],n);return s?(s.children[0]=v,s.height=Math.max(v.height,s.height),s.classes[0]="mord",s):v},iB=(e,n)=>{var t=e.isStretchy?pb(e.label):new Ye("mo",[Na(e.label,e.mode)]),r=new Ye("mover",[nr(e.base,n),t]);return r.setAttribute("accent","true"),r},ext=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));at({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,n)=>{var t=bv(n[0]),r=!ext.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:t}},htmlBuilder:nS,mathmlBuilder:iB});at({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,n)=>{var t=n[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:nS,mathmlBuilder:iB});at({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"accentUnder",mode:t.mode,label:r,base:s}},htmlBuilder:(e,n)=>{var t=In(e.base,n),r=mb(e,n),s=e.label==="\\utilde"?.12:0,i=Dn({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Ue(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=pb(e.label),r=new Ye("munder",[nr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var qg=e=>{var n=new Ye("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};at({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:n[0],below:t[0]}},htmlBuilder(e,n){var t=n.style,r=n.havingStyle(t.sup()),s=qh(In(e.body,r,n),n),i=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var o;e.below&&(r=n.havingStyle(t.sub()),o=qh(In(e.below,r,n),n),o.classes.push(i+"-arrow-pad"));var a=mb(e,n),l=-n.fontMetrics().axisHeight+.5*a.height,u=-n.fontMetrics().axisHeight-.5*a.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var _;if(o){var f=-n.fontMetrics().axisHeight+o.height+.5*a.height+.111;_=Dn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:a,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:o,shift:f}]})}else _=Dn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:a,shift:l,wrapperClasses:["svg-align"]}]});return Ue(["mrel","x-arrow"],[_],n)},mathmlBuilder(e,n){var t=pb(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=qg(nr(e.body,n));if(e.below){var i=qg(nr(e.below,n));r=new Ye("munderover",[t,i,s])}else r=new Ye("mover",[t,s])}else if(e.below){var o=qg(nr(e.below,n));r=new Ye("munder",[t,o])}else r=qg(),r=new Ye("mover",[t,r]);return r}});function aB(e,n){var t=hs(e.body,n,!0);return Ue([e.mclass],t,n)}function oB(e,n){var t,r=Zi(e.body,n);return e.mclass==="minner"?t=new Ye("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Ye("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Ye("mo",r),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}at({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:ts(s),isCharacterBox:Ql(s)}},htmlBuilder:aB,mathmlBuilder:oB});var bb=e=>{var n=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return n.type==="atom"&&(n.family==="bin"||n.family==="rel")?"m"+n.family:"mord"};at({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:bb(n[0]),body:ts(n[1]),isCharacterBox:Ql(n[1])}}});at({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],i=n[0],o;r!=="\\stackrel"?o=bb(s):o="mrel";var a={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ts(s)},l={type:"supsub",mode:i.mode,base:a,sup:r==="\\underset"?null:i,sub:r==="\\underset"?i:null};return{type:"mclass",mode:t.mode,mclass:o,body:[l],isCharacterBox:Ql(l)}},htmlBuilder:aB,mathmlBuilder:oB});at({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:bb(n[0]),body:ts(n[0])}},htmlBuilder(e,n){var t=hs(e.body,n,!0),r=Ue([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=Zi(e.body,n),r=new Ye("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var txt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},CT=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),ET=e=>e.type==="textord"&&e.text==="@",nxt=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function rxt(e,n,t){var r=txt[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(r,[n[0]],[n[1]]);case"\\uparrow":case"\\downarrow":{var s=t.callFunction("\\\\cdleft",[n[0]],[]),i={type:"atom",text:r,mode:"math",family:"rel"},o=t.callFunction("\\Big",[i],[]),a=t.callFunction("\\\\cdright",[n[1]],[]),l={type:"ordgroup",mode:"math",body:[s,o,a]};return t.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function sxt(e){var n=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){n.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var t=e.fetch().text;if(t==="&"||t==="\\\\")e.consume();else if(t==="\\end"){n[n.length-1].length===0&&n.pop();break}else throw new Qe("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],i=0;iAV".includes(u))for(var f=0;f<2;f++){for(var p=!0,m=l+1;mAV=|." after @',o[l]);var x=rxt(u,_,e),S={type:"styling",body:[x],mode:"math",style:"display",resetFont:!0};r.push(S),a=CT()}i%2===0?r.push(a):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var b=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}at({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:n[0]}},htmlBuilder(e,n){var t=n.havingStyle(n.style.sup()),r=qh(In(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=Ze(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Ye("mrow",[nr(e.label,n)]);return t=new Ye("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ye("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});at({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,n){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:n[0]}},htmlBuilder(e,n){var t=qh(In(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Ye("mrow",[nr(e.fragment,n)])}});at({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=on(n[0],"ordgroup"),s=r.body,i="",o=0;o=1114111)throw new Qe("\\@char with invalid code point "+i);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var lB=(e,n)=>{var t=hs(e.body,n.withColor(e.color),!1);return Xl(t)},cB=(e,n)=>{var t=Zi(e.body,n.withColor(e.color)),r=new Ye("mstyle",t);return r.setAttribute("mathcolor",e.color),r};at({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=on(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:ts(s)}},htmlBuilder:lB,mathmlBuilder:cB});at({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=on(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var i=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:i}},htmlBuilder:lB,mathmlBuilder:cB});at({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,n,t){var{parser:r}=e,s=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,i=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:i,size:s&&on(s,"size").value}},htmlBuilder(e,n){var t=Ue(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=Ze(Cr(e.size,n)))),t},mathmlBuilder(e,n){var t=new Ye("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",Ze(Cr(e.size,n)))),t}});var g5={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},uB=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Qe("Expected a control sequence",e);return n},ixt=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},fB=(e,n,t,r)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(n,s,r)};at({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:n,funcName:t}=e;n.consumeSpaces();var r=n.fetch();if(g5[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=g5[r.text]),on(n.parseFunction(),"internal");throw new Qe("Invalid token after macro prefix",r)}});at({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=n.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new Qe("Expected a control sequence",r);for(var i=0,o,a=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){o=n.gullet.future(),a[i].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Qe('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Qe('Argument number "'+r.text+'" out of order');i++,a.push([])}else{if(r.text==="EOF")throw new Qe("Expected a macro definition");a[i].push(r.text)}var{tokens:l}=n.gullet.consumeArg();return o&&l.unshift(o),(t==="\\edef"||t==="\\xdef")&&(l=n.gullet.expandTokens(l),l.reverse()),n.gullet.macros.set(s,{tokens:l,numArgs:i,delimiters:a},t===g5[t]),{type:"internal",mode:n.mode}}});at({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=uB(n.gullet.popToken());n.gullet.consumeSpaces();var s=ixt(n);return fB(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});at({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=uB(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return fB(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var x0=function(n,t,r){var s=gr.math[n]&&gr.math[n].replace,i=X6(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},rS=function(n,t,r,s){var i=r.havingBaseStyle(t),o=Ue(s.concat(i.sizingClasses(r)),[n],r),a=i.sizeMultiplier/r.sizeMultiplier;return o.height*=a,o.depth*=a,o.maxFontSize=i.sizeMultiplier,o},dB=function(n,t,r){var s=t.havingBaseStyle(r),i=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=Ze(i),n.height-=i,n.depth+=i},axt=function(n,t,r,s,i,o){var a=ei(n,"Main-Regular",i,s),l=rS(a,t,s,o);return dB(l,s,t),l},oxt=function(n,t,r,s){return ei(n,"Size"+t+"-Regular",r,s)},hB=function(n,t,r,s,i,o){var a=oxt(n,t,i,s),l=rS(Ue(["delimsizing","size"+t],[a],s),Yt.TEXT,s,o);return r&&dB(l,s,Yt.TEXT),l},Z2=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=Ue(["delimsizinginner",s],[Ue([],[ei(n,t,r)])]);return{type:"elem",elem:i}},J2=function(n,t,r){var s=To["Size4-Regular"][n.charCodeAt(0)]?To["Size4-Regular"][n.charCodeAt(0)][4]:To["Size1-Regular"][n.charCodeAt(0)][4],i=new du("inner",myt(n,Math.round(1e3*t))),o=new Wl([i],{width:Ze(s),height:Ze(t),style:"width:"+Ze(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),a=hu([],[o],r);return a.height=t,a.style.height=Ze(t),a.style.width=Ze(s),{type:"elem",elem:a}},v5=.008,Ug={type:"kern",size:-1*v5},lxt=new Set(["|","\\lvert","\\rvert","\\vert"]),cxt=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),_B=function(n,t,r,s,i,o){var a,l,u,_,f="",p=0;a=u=_=n,l=null;var m="Size1-Regular";n==="\\uparrow"?u=_="⏐":n==="\\Uparrow"?u=_="‖":n==="\\downarrow"?a=u="⏐":n==="\\Downarrow"?a=u="‖":n==="\\updownarrow"?(a="\\uparrow",u="⏐",_="\\downarrow"):n==="\\Updownarrow"?(a="\\Uparrow",u="‖",_="\\Downarrow"):lxt.has(n)?(u="∣",f="vert",p=333):cxt.has(n)?(u="∥",f="doublevert",p=556):n==="["||n==="\\lbrack"?(a="⎡",u="⎢",_="⎣",m="Size4-Regular",f="lbrack",p=667):n==="]"||n==="\\rbrack"?(a="⎤",u="⎥",_="⎦",m="Size4-Regular",f="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=a="⎢",_="⎣",m="Size4-Regular",f="lfloor",p=667):n==="\\lceil"||n==="⌈"?(a="⎡",u=_="⎢",m="Size4-Regular",f="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=a="⎥",_="⎦",m="Size4-Regular",f="rfloor",p=667):n==="\\rceil"||n==="⌉"?(a="⎤",u=_="⎥",m="Size4-Regular",f="rceil",p=667):n==="("||n==="\\lparen"?(a="⎛",u="⎜",_="⎝",m="Size4-Regular",f="lparen",p=875):n===")"||n==="\\rparen"?(a="⎞",u="⎟",_="⎠",m="Size4-Regular",f="rparen",p=875):n==="\\{"||n==="\\lbrace"?(a="⎧",l="⎨",_="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(a="⎫",l="⎬",_="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(a="⎧",_="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(a="⎫",_="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(a="⎧",_="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(a="⎫",_="⎩",u="⎪",m="Size4-Regular");var x=x0(a,m,i),S=x.height+x.depth,b=x0(u,m,i),v=b.height+b.depth,y=x0(_,m,i),w=y.height+y.depth,C=0,N=1;if(l!==null){var E=x0(l,m,i);C=E.height+E.depth,N=2}var j=S+w+C,z=Math.max(0,Math.ceil((t-j)/(N*v))),R=j+z*N*v,O=s.fontMetrics().axisHeight;r&&(O*=s.sizeMultiplier);var I=R/2-O,F=[];if(f.length>0){var U=R-S-w,q=Math.round(R*1e3),Y=gyt(f,Math.round(U*1e3)),V=new du(f,Y),Z=Ze(p/1e3),te=Ze(q/1e3),P=new Wl([V],{width:Z,height:te,viewBox:"0 0 "+p+" "+q}),L=hu([],[P],s);L.height=q/1e3,L.style.width=Z,L.style.height=te,F.push({type:"elem",elem:L})}else{if(F.push(Z2(_,m,i)),F.push(Ug),l===null){var $=R-S-w+2*v5;F.push(J2(u,$,s))}else{var H=(R-S-w-C)/2+2*v5;F.push(J2(u,H,s)),F.push(Ug),F.push(Z2(l,m,i)),F.push(Ug),F.push(J2(u,H,s))}F.push(Ug),F.push(Z2(a,m,i))}var G=s.havingBaseStyle(Yt.TEXT),ne=Dn({positionType:"bottom",positionData:I,children:F});return rS(Ue(["delimsizing","mult"],[ne],G),Yt.TEXT,s,o)},ew=80,tw=.08,nw=function(n,t,r,s,i){var o=pyt(n,s,r),a=new du(n,o),l=new Wl([a],{width:"400em",height:Ze(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return hu(["hide-tail"],[l],i)},uxt=function(n,t){var r=t.havingBaseSizing(),s=bB("\\surd",n*r.sizeMultiplier,vB,r),i=r.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),a,l,u,_,f;return s.type==="small"?(_=1e3+1e3*o+ew,n<1?i=1:n<1.4&&(i=.7),l=(1+o+tw)/i,u=(1+o)/i,a=nw("sqrtMain",l,_,o,t),a.style.minWidth="0.853em",f=.833/i):s.type==="large"?(_=(1e3+ew)*L0[s.size],u=(L0[s.size]+o)/i,l=(L0[s.size]+o+tw)/i,a=nw("sqrtSize"+s.size,l,_,o,t),a.style.minWidth="1.02em",f=1/i):(l=n+o+tw,u=n+o,_=Math.floor(1e3*n+o)+ew,a=nw("sqrtTall",l,_,o,t),a.style.minWidth="0.742em",f=1.056),a.height=u,a.style.height=Ze(l),{span:a,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*i}},pB=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),fxt=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),mB=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),L0=[0,1.2,1.8,2.4,3],gB=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),pB.has(n)||mB.has(n))return hB(n,t,!1,r,s,i);if(fxt.has(n))return _B(n,L0[t],!1,r,s,i);throw new Qe("Illegal delimiter: '"+n+"'")},dxt=[{type:"small",style:Yt.SCRIPTSCRIPT},{type:"small",style:Yt.SCRIPT},{type:"small",style:Yt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],hxt=[{type:"small",style:Yt.SCRIPTSCRIPT},{type:"small",style:Yt.SCRIPT},{type:"small",style:Yt.TEXT},{type:"stack"}],vB=[{type:"small",style:Yt.SCRIPTSCRIPT},{type:"small",style:Yt.SCRIPT},{type:"small",style:Yt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],_xt=function(n){if(n.type==="small")return"Main-Regular";if(n.type==="large")return"Size"+n.size+"-Regular";if(n.type==="stack")return"Size4-Regular";var t=n.type;throw new Error("Add support for delim type '"+t+"' here.")},bB=function(n,t,r,s){for(var i=Math.min(2,3-s.style.size),o=i;ot)return a}return r[r.length-1]},b5=function(n,t,r,s,i,o){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var a;mB.has(n)?a=dxt:pB.has(n)?a=vB:a=hxt;var l=bB(n,t,a,s);return l.type==="small"?axt(n,l.style,r,s,i,o):l.type==="large"?hB(n,l.size,r,s,i,o):_B(n,t,r,s,i,o)},rw=function(n,t,r,s,i,o){var a=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,u=5/s.fontMetrics().ptPerEm,_=Math.max(t-a,r+a),f=Math.max(_/500*l,2*_-u);return b5(n,f,!0,s,i,o)},NT={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},pxt=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function zT(e){return"isMiddle"in e}function yb(e,n){var t=vb(e);if(t&&pxt.has(t.text))return t;throw t?new Qe("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Qe("Invalid delimiter type '"+e.type+"'",e)}at({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,n)=>{var t=yb(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:NT[e.funcName].size,mclass:NT[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Ue([e.mclass]):gB(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Na(e.delim,e.mode));var t=new Ye("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=Ze(L0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function TT(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}at({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new Qe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:yb(n[0],e).text,color:t}}});at({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=yb(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=on(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{TT(e);for(var t=hs(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,o=0;o{TT(e);var t=Zi(e.body,n);if(e.left!=="."){var r=new Ye("mo",[Na(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Ye("mo",[Na(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return eS(t)}});at({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=yb(n[0],e);if(!e.parser.leftrightDepth)throw new Qe("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=op(n,[]):(t=gB(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Na("|","text"):Na(e.delim,e.mode),r=new Ye("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var xb=(e,n)=>{var t=qh(In(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,o,a=Ql(e.body);if(r==="sout")i=Ue(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,o=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var l=Cr({number:.6,unit:"pt"},n),u=Cr({number:.35,unit:"ex"},n),_=n.havingBaseSizing();s=s/_.sizeMultiplier;var f=t.height+t.depth+l+u;t.style.paddingLeft=Ze(f/2+l);var p=Math.floor(1e3*f*s),m=hyt(p),x=new Wl([new du("phase",m)],{width:"400em",height:Ze(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=hu(["hide-tail"],[x],n),i.style.height=Ze(f),o=t.depth+l+u}else{/cancel/.test(r)?a||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var S,b,v=0;/box/.test(r)?(v=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),S=n.fontMetrics().fboxsep+(r==="colorbox"?0:v),b=S):r==="angl"?(v=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),S=4*v,b=Math.max(0,.25-t.depth)):(S=a?.2:0,b=S),i=Yyt(t,r,S,b,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=Ze(v)):r==="angl"&&v!==.049&&(i.style.borderTopWidth=Ze(v),i.style.borderRightWidth=Ze(v)),o=t.depth+b,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var y;if(e.backgroundColor)y=Dn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:o},{type:"elem",elem:t,shift:0}]});else{var w=/cancel|phase/.test(r)?["svg-align"]:[];y=Dn({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:o,wrapperClasses:w}]})}return/cancel/.test(r)&&(y.height=t.height,y.depth=t.depth),/cancel/.test(r)&&!a?Ue(["mord","cancel-lap"],[y],n):Ue(["mord"],[y],n)},wb=(e,n)=>{var t,r=new Ye(e.label.includes("colorbox")?"mpadded":"menclose",[nr(e.body,n)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=n.fontMetrics().fboxsep*n.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*t+"pt"),r.setAttribute("height","+"+2*t+"pt"),r.setAttribute("lspace",t+"pt"),r.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness);r.setAttribute("style","border: "+Ze(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};at({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=on(n[0],"color-token").color,o=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:o}},htmlBuilder:xb,mathmlBuilder:wb});at({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=on(n[0],"color-token").color,o=on(n[1],"color-token").color,a=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:o,borderColor:i,body:a}},htmlBuilder:xb,mathmlBuilder:wb});at({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:n[0]}}});at({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:xb,mathmlBuilder:wb});at({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:xb,mathmlBuilder:wb});at({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:n[0]}}});var yB={};function Uo(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:o}=e,a={type:n,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},l=0;l{var n=e.parser.settings;if(!n.displayMode)throw new Qe("{"+e.envName+"} can be used only in display mode.")},mxt=new Set(["gather","gather*"]);function sS(e){if(!e.includes("ed"))return!e.includes("*")}function wu(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:u,emptySingleRow:_,maxNumCols:f,leqno:p}=n;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)o=1;else if(o=parseFloat(m),!o||o<0)throw new Qe("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var x=[],S=[x],b=[],v=[],y=l!=null?[]:void 0;function w(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new to("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(w(),v.push(jT(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var E={type:"ordgroup",mode:e.mode,body:N};t&&(E={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[E]}),x.push(E);var j=e.fetch().text;if(j==="&"){if(f&&x.length===f){if(u||a)throw new Qe("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(j==="\\end"){C(),x.length===1&&E.type==="styling"&&E.body.length===1&&E.body[0].type==="ordgroup"&&E.body[0].body.length===0&&(S.length>1||!_)&&S.pop(),v.length0&&(w+=.25),u.push({pos:w,isDashed:We[rt]})}for(C(o[0]),r=0;r0&&(I+=y,jWe))for(r=0;r=a)){var ce=void 0;if(s>0||n.hskipBeforeAndAfter){var ee,ue;ce=(ee=(ue=G)==null?void 0:ue.pregap)!=null?ee:p,ce!==0&&(Y=Ue(["arraycolsep"],[]),Y.style.width=Ze(ce),q.push(Y))}var de=[];for(r=0;r0){for(var It=Hh("hline",t,_),$t=Hh("hdashline",t,_),tt=[{type:"elem",elem:Ut,shift:0}];u.length>0;){var mt=u.pop(),At=mt.pos-F;mt.isDashed?tt.push({type:"elem",elem:$t,shift:At}):tt.push({type:"elem",elem:It,shift:At})}Ut=Dn({positionType:"individualShift",children:tt})}if(Z.length===0)return Ue(["mord"],[Ut],t);var ke=Dn({positionType:"individualShift",children:Z}),De=Ue(["tag"],[ke],t);return Xl([Ut,De])},gxt={c:"center ",l:"left ",r:"right "},Wo=function(n,t){for(var r=[],s=new Ye("mtd",[],["mtr-glue"]),i=new Ye("mtd",[],["mml-eqn-num"]),o=0;o0){var x=n.cols,S="",b=!1,v=0,y=x.length;x[0].type==="separator"&&(p+="top ",v=1),x[x.length-1].type==="separator"&&(p+="bottom ",y-=1);for(var w=v;w0?"left ":"",p+=R[R.length-1].length>0?"right ":"";for(var O=1;O0&&m&&(b=1),r[x]={type:"align",align:S,pregap:b,postgap:0}}return o.colSeparationType=m?"align":"alignat",o};Uo({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=vb(n[0]),r=t?[n[0]]:on(n[0],"ordgroup").body,s=r.map(function(o){var a=gb(o),l=a.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Qe("Unknown column alignment: "+l,o)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return wu(e.parser,i,iS(e.envName))},htmlBuilder:Go,mathmlBuilder:Wo});Uo({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var n={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],t="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),t=s.fetch().text,!"lcr".includes(t))throw new Qe("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=wu(e.parser,r,iS(e.envName)),o=Math.max(0,...i.body.map(a=>a.length));return i.cols=new Array(o).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[i],left:n[0],right:n[1],rightColor:void 0}:i},htmlBuilder:Go,mathmlBuilder:Wo});Uo({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=wu(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:Go,mathmlBuilder:Wo});Uo({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=vb(n[0]),r=t?[n[0]]:on(n[0],"ordgroup").body,s=r.map(function(a){var l=gb(a),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new Qe("Unknown column alignment: "+u,a)});if(s.length>1)throw new Qe("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},o=wu(e.parser,i,"script");if(o.body.length>0&&o.body[0].length>1)throw new Qe("{subarray} can contain only one column");return o},htmlBuilder:Go,mathmlBuilder:Wo});Uo({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var n={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=wu(e.parser,n,iS(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Go,mathmlBuilder:Wo});Uo({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:SB,htmlBuilder:Go,mathmlBuilder:Wo});Uo({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){mxt.has(e.envName)&&Sb(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:sS(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return wu(e.parser,n,"display")},htmlBuilder:Go,mathmlBuilder:Wo});Uo({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:SB,htmlBuilder:Go,mathmlBuilder:Wo});Uo({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Sb(e);var n={autoTag:sS(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return wu(e.parser,n,"display")},htmlBuilder:Go,mathmlBuilder:Wo});Uo({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Sb(e),sxt(e.parser)},htmlBuilder:Go,mathmlBuilder:Wo});ie("\\nonumber","\\gdef\\@eqnsw{0}");ie("\\notag","\\nonumber");at({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Qe(e.funcName+" valid only within array environment")}});var AT=yB;at({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];if(s.type!=="ordgroup")throw new Qe("Invalid environment name",s);for(var i="",o=0;o{var t=e.font,r=n.withFont(t);return In(e.body,r)},CB=(e,n)=>{var t=e.font,r=n.withFont(t);return nr(e.body,r)},RT={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};at({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=bv(n[0]),i=r;return i in RT&&(i=RT[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:kB,mathmlBuilder:CB});at({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"mclass",mode:t.mode,mclass:bb(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:Ql(r)}}});at({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r,breakOnTokenText:s}=e,{mode:i}=t,o=t.parseExpression(!0,s);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:o}}},htmlBuilder:kB,mathmlBuilder:CB});var vxt=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var o=In(e.numer,i,n);if(e.continued){var a=8.5/n.fontMetrics().ptPerEm,l=3.5/n.fontMetrics().ptPerEm;o.height=o.height0?x=3*p:x=7*p,S=n.fontMetrics().denom1):(f>0?(m=n.fontMetrics().num2,x=p):(m=n.fontMetrics().num3,x=3*p),S=n.fontMetrics().denom2);var b;if(_){var y=n.fontMetrics().axisHeight;m-o.depth-(y+.5*f){var t=new Ye("mfrac",[nr(e.numer,n),nr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=Cr(e.barSize,n);t.setAttribute("linethickness",Ze(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new Ye("mo",[new ns(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var o=new Ye("mo",[new ns(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}return eS(s)}return t},EB=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};at({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=n[1],o,a=null,l=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,a="(",l=")";break;case"\\\\bracefrac":o=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var u=r==="\\cfrac",_=null;return u||r.startsWith("\\d")?_="display":r.startsWith("\\t")&&(_="text"),EB({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:o,leftDelim:a,rightDelim:l,barSize:null},_)},htmlBuilder:vxt,mathmlBuilder:bxt});at({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:n,funcName:t,token:r}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:s,token:r}}});var MT=["display","text","script","scriptscript"],DT=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};at({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,n){var{parser:t}=e,r=n[4],s=n[5],i=bv(n[0]),o=i.type==="atom"&&i.family==="open"?DT(i.text):null,a=bv(n[1]),l=a.type==="atom"&&a.family==="close"?DT(a.text):null,u=on(n[2],"size"),_,f=null;u.isBlank?_=!0:(f=u.value,_=f.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var x=on(m.body[0],"textord");p=MT[Number(x.text)]}}else m=on(m,"textord"),p=MT[Number(m.text)];return EB({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:_,barSize:f,leftDelim:o,rightDelim:l},p)}});at({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,n){var{parser:t,funcName:r,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:on(n[0],"size").value,token:s}}});at({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=on(n[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var o=n[2],a=i.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:o,continued:!1,hasBarLine:a,barSize:i,leftDelim:null,rightDelim:null}}});var NB=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?In(e.sup,n.havingStyle(t.sup()),n):In(e.sub,n.havingStyle(t.sub()),n),s=on(e.base,"horizBrace")):s=on(e,"horizBrace");var i=In(s.base,n.havingBaseStyle(Yt.DISPLAY)),o=mb(s,n),a;if(s.isOver?a=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:o,wrapperClasses:["svg-align"]}]}):a=Dn({positionType:"bottom",positionData:i.depth+.1+o.height,children:[{type:"elem",elem:o,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),r){var l=Ue(["minner",s.isOver?"mover":"munder"],[a],n);s.isOver?a=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):a=Dn({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Ue(["minner",s.isOver?"mover":"munder"],[a],n)},yxt=(e,n)=>{var t=pb(e.label);return new Ye(e.isOver?"mover":"munder",[nr(e.base,n),t])};at({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"horizBrace",mode:t.mode,label:r,isOver:r.includes("\\over"),base:n[0]}},htmlBuilder:NB,mathmlBuilder:yxt});at({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=on(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:ts(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=hs(e.body,n,!1);return Myt(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=_u(e.body,n);return t instanceof Ye||(t=new Ye("mrow",[t])),t.setAttribute("href",e.href),t}});at({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=on(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],i=0;i{var{parser:t,funcName:r,token:s}=e,i=on(n[0],"raw").string,o=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var a,l={};switch(r){case"\\htmlClass":l.class=i,a={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,a={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,a={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),_=0;_{var t=hs(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Ue(r,t,n);for(var i in e.attributes)i!=="class"&&e.attributes.hasOwnProperty(i)&&s.setAttribute(i,e.attributes[i]);return s},mathmlBuilder:(e,n)=>_u(e.body,n)});at({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:ts(n[0]),mathml:ts(n[1])}},htmlBuilder:(e,n)=>{var t=hs(e.html,n,!1);return Xl(t)},mathmlBuilder:(e,n)=>_u(e.mathml,n)});var sw=function(n){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(n))return{number:+n,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n);if(!t)throw new Qe("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!qI(r))throw new Qe("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};at({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,n,t)=>{var{parser:r}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},o={number:0,unit:"em"},a="";if(t[0])for(var l=on(t[0],"raw").string,u=l.split(","),_=0;_{var t=Cr(e.height,n),r=0;e.totalheight.number>0&&(r=Cr(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=Cr(e.width,n));var i={height:Ze(t+r)};s>0&&(i.width=Ze(s)),r>0&&(i.verticalAlign=Ze(-r));var o=new xyt(e.src,e.alt,i);return o.height=t,o.depth=r,o},mathmlBuilder:(e,n)=>{var t=new Ye("mglyph",[]);t.setAttribute("alt",e.alt);var r=Cr(e.height,n),s=0;if(e.totalheight.number>0&&(s=Cr(e.totalheight,n)-r,t.setAttribute("valign",Ze(-s))),t.setAttribute("height",Ze(r+s)),e.width.number>0){var i=Cr(e.width,n);t.setAttribute("width",Ze(i))}return t.setAttribute("src",e.src),t}});at({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=on(n[0],"size");if(t.settings.strict){var i=r[1]==="m",o=s.value.unit==="mu";i?(o||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):o&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:s.value}},htmlBuilder(e,n){return QI(e.dimension,n)},mathmlBuilder(e,n){var t=Cr(e.dimension,n);return new tB(t)}});at({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,n)=>{var t;e.alignment==="clap"?(t=Ue([],[In(e.body,n)]),t=Ue(["inner"],[t],n)):t=Ue(["inner"],[In(e.body,n)]);var r=Ue(["fix"],[]),s=Ue([e.alignment],[t,r],n),i=Ue(["strut"]);return i.style.height=Ze(s.height+s.depth),s.depth&&(i.style.verticalAlign=Ze(-s.depth)),s.children.unshift(i),s=Ue(["thinbox"],[s],n),Ue(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Ye("mpadded",[nr(e.body,n)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",r+"width")}return t.setAttribute("width","0px"),t}});at({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){var{funcName:t,parser:r}=e,s=r.mode;r.switchMode("math");var i=t==="\\("?"\\)":"$",o=r.parseExpression(!1,i);return r.expect(i),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:o}}});at({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Qe("Mismatched "+e.funcName)}});var LT=(e,n)=>{switch(n.style.size){case Yt.DISPLAY.size:return e.display;case Yt.TEXT.size:return e.text;case Yt.SCRIPT.size:return e.script;case Yt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};at({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:ts(n[0]),text:ts(n[1]),script:ts(n[2]),scriptscript:ts(n[3])}},htmlBuilder:(e,n)=>{var t=LT(e,n),r=hs(t,n,!1);return Xl(r)},mathmlBuilder:(e,n)=>{var t=LT(e,n);return _u(t,n)}});var zB=(e,n,t,r,s,i,o)=>{e=Ue([],[e]);var a=t&&Ql(t),l,u;if(n){var _=In(n,r.havingStyle(s.sup()),r);u={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-_.depth)}}if(t){var f=In(t,r.havingStyle(s.sub()),r);l={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var p;if(u&&l){var m=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;p=Dn({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ze(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Ze(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var x=e.height-o;p=Dn({positionType:"top",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ze(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var S=e.depth+o;p=Dn({positionType:"bottom",positionData:S,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Ze(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var b=[p];if(l&&i!==0&&!a){var v=Ue(["mspace"],[],r);v.style.marginRight=Ze(i),b.unshift(v)}return Ue(["mop","op-limits"],b,r)},TB=new Set(["\\smallint"]),u_=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=on(e.base,"op"),s=!0):i=on(e,"op");var o=n.style,a=!1;o.size===Yt.DISPLAY.size&&i.symbol&&!TB.has(i.name)&&(a=!0);var l,u;if(i.symbol){var _=a?"Size2-Regular":"Size1-Regular",f="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(f=i.name.slice(1),i.name=f==="oiint"?"\\iint":"\\iiint"),l=ei(i.name,_,"math",n,["mop","op-symbol",a?"large-op":"small-op"]),u=l.italic,f.length>0){var p=XI(f+"Size"+(a?"2":"1"),n);l=Dn({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:a?.08:0}]}),i.name="\\"+f,l.classes.unshift("mop"),l.italic=u}}else if(i.body){var m=hs(i.body,n,!0);m.length===1&&m[0]instanceof Vi?(l=m[0],l.classes[0]="mop"):l=Ue(["mop"],m,n)}else{for(var x=[],S=1;S{var t;if(e.symbol)t=new Ye("mo",[Na(e.name,e.mode)]),TB.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Ye("mo",Zi(e.body,n));else{t=new Ye("mi",[new ns(e.name.slice(1))]);var r=new Ye("mo",[Na("⁡","text")]);e.parentIsSupSub?t=new Ye("mrow",[t,r]):t=eB([t,r])}return t},xxt={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};at({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=r;return s.length===1&&(s=xxt[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:u_,mathmlBuilder:rm});at({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ts(r)}},htmlBuilder:u_,mathmlBuilder:rm});var wxt={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};at({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:u_,mathmlBuilder:rm});at({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:u_,mathmlBuilder:rm});at({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:n,funcName:t}=e,r=t;return r.length===1&&(r=wxt[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:u_,mathmlBuilder:rm});var jB=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=on(e.base,"operatorname"),s=!0):i=on(e,"operatorname");var o;if(i.body.length>0){for(var a=i.body.map(f=>{var p="text"in f?f.text:void 0;return typeof p=="string"?{type:"textord",mode:f.mode,text:p}:f}),l=hs(a,n.withFont("mathrm"),!0),u=0;u{for(var t=Zi(e.body,n.withFont("mathrm")),r=!0,s=0;s_.toText()).join("");t=[new ns(a)]}var l=new Ye("mi",t);l.setAttribute("mathvariant","normal");var u=new Ye("mo",[Na("⁡","text")]);return e.parentIsSupSub?new Ye("mrow",[l,u]):eB([l,u])};at({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"operatorname",mode:t.mode,body:ts(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:jB,mathmlBuilder:Sxt});ie("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Zf({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?Xl(hs(e.body,n,!1)):Ue(["mord"],hs(e.body,n,!0),n)},mathmlBuilder(e,n){return _u(e.body,n,!0)}});at({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,n){var{parser:t}=e,r=n[0];return{type:"overline",mode:t.mode,body:r}},htmlBuilder(e,n){var t=In(e.body,n.havingCrampedStyle()),r=Hh("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Ue(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new Ye("mo",[new ns("‾")]);t.setAttribute("stretchy","true");var r=new Ye("mover",[nr(e.body,n),t]);return r.setAttribute("accent","true"),r}});at({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"phantom",mode:t.mode,body:ts(r)}},htmlBuilder:(e,n)=>{var t=hs(e.body,n.withPhantom(),!1);return Xl(t)},mathmlBuilder:(e,n)=>{var t=Zi(e.body,n);return new Ye("mphantom",t)}});ie("\\hphantom","\\smash{\\phantom{#1}}");at({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"vphantom",mode:t.mode,body:r}},htmlBuilder:(e,n)=>{var t=Ue(["inner"],[In(e.body,n.withPhantom())]),r=Ue(["fix"],[]);return Ue(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=Zi(ts(e.body),n),r=new Ye("mphantom",t),s=new Ye("mpadded",[r]);return s.setAttribute("width","0px"),s}});at({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=on(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=In(e.body,n),r=Cr(e.dy,n);return Dn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ye("mpadded",[nr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});at({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});at({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,n,t){var{parser:r}=e,s=t[0],i=on(n[0],"size"),o=on(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&on(s,"size").value,width:i.value,height:o.value}},htmlBuilder(e,n){var t=Ue(["mord","rule"],[],n),r=Cr(e.width,n),s=Cr(e.height,n),i=e.shift?Cr(e.shift,n):0;return t.style.borderRightWidth=Ze(r),t.style.borderTopWidth=Ze(s),t.style.bottom=Ze(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=Cr(e.width,n),r=Cr(e.height,n),s=e.shift?Cr(e.shift,n):0,i=n.color&&n.getColor()||"black",o=new Ye("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",Ze(t)),o.setAttribute("height",Ze(r));var a=new Ye("mpadded",[o]);return s>=0?a.setAttribute("height",Ze(s)):(a.setAttribute("height",Ze(s)),a.setAttribute("depth",Ze(-s))),a.setAttribute("voffset",Ze(s)),a}});function AB(e,n,t){for(var r=hs(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return AB(e.body,t,n)};at({type:"sizing",names:OT,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:OT.indexOf(r)+1,body:i}},htmlBuilder:kxt,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=Zi(e.body,t),s=new Ye("mstyle",r);return s.setAttribute("mathsize",Ze(t.sizeMultiplier)),s}});at({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,i=!1,o=t[0]&&on(t[0],"ordgroup");if(o)for(var a,l=0;l{var t=Ue([],[In(e.body,n)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return Ue(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Ye("mpadded",[nr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});at({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],i=n[0];return{type:"sqrt",mode:r.mode,body:i,index:s}},htmlBuilder(e,n){var t=In(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=qh(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,i=s;n.style.idt.height+t.depth+o&&(o=(o+f-t.height-t.depth)/2);var p=l.height-t.height-o-u;t.style.paddingLeft=Ze(_);var m=Dn({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:l},{type:"kern",size:u}]});if(e.index){var x=n.havingStyle(Yt.SCRIPTSCRIPT),S=In(e.index,x,n),b=.6*(m.height-m.depth),v=Dn({positionType:"shift",positionData:-b,children:[{type:"elem",elem:S}]}),y=Ue(["root"],[v]);return Ue(["mord","sqrt"],[y,m],n)}else return Ue(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Ye("mroot",[nr(t,n),nr(r,n)]):new Ye("msqrt",[nr(t,n)])}});var y5={display:Yt.DISPLAY,text:Yt.TEXT,script:Yt.SCRIPT,scriptscript:Yt.SCRIPTSCRIPT};function Cxt(e){return e in y5}at({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,n){var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!0,t),o=r.slice(1,r.length-5);if(!Cxt(o))throw new Error("Unknown style: "+o);return{type:"styling",mode:s.mode,style:o,body:i}},htmlBuilder(e,n){var t=y5[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),AB(e.body,r,n)},mathmlBuilder(e,n){var t=y5[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=Zi(e.body,r),i=new Ye("mstyle",s),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},a=o[e.style];return i.setAttribute("scriptlevel",a[0]),i.setAttribute("displaystyle",a[1]),i}});var Ext=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===Yt.DISPLAY.size||r.alwaysHandleSupSub);return s?u_:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===Yt.DISPLAY.size||r.limits);return i?jB:null}else{if(r.type==="accent")return Ql(r.base)?nS:null;if(r.type==="horizBrace"){var o=!n.sub;return o===r.isOver?NB:null}else return null}else return null};Zf({type:"supsub",htmlBuilder(e,n){var t=Ext(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,o=In(r,n),a,l,u=n.fontMetrics(),_=0,f=0,p=r&&Ql(r);if(s){var m=n.havingStyle(n.style.sup());a=In(s,m,n),p||(_=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var x=n.havingStyle(n.style.sub());l=In(i,x,n),p||(f=o.depth+x.fontMetrics().subDrop*x.sizeMultiplier/n.sizeMultiplier)}var S;n.style===Yt.DISPLAY?S=u.sup1:n.style.cramped?S=u.sup3:S=u.sup2;var b=n.sizeMultiplier,v=Ze(.5/u.ptPerEm/b),y=null;if(l){var w=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(o instanceof Vi||w){var C;y=Ze(-((C=o.italic)!=null?C:0))}}var N;if(a&&l){_=Math.max(_,S,a.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var E=u.defaultRuleThickness,j=4*E;if(_-a.depth-(l.height-f)0&&(_+=z,f-=z)}var R=[{type:"elem",elem:l,shift:f,marginRight:v,marginLeft:y},{type:"elem",elem:a,shift:-_,marginRight:v}];N=Dn({positionType:"individualShift",children:R})}else if(l){f=Math.max(f,u.sub1,l.height-.8*u.xHeight);var O=[{type:"elem",elem:l,marginLeft:y,marginRight:v}];N=Dn({positionType:"shift",positionData:f,children:O})}else if(a)_=Math.max(_,S,a.depth+.25*u.xHeight),N=Dn({positionType:"shift",positionData:-_,children:[{type:"elem",elem:a,marginRight:v}]});else throw new Error("supsub must have either sup or sub.");var I=p5(o,"right")||"mord";return Ue([I],[o,Ue(["msupsub"],[N])],n)},mathmlBuilder(e,n){var t=!1,r,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(t=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var i=[nr(e.base,n)];e.sub&&i.push(nr(e.sub,n)),e.sup&&i.push(nr(e.sup,n));var o;if(t)o=r?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&n.style===Yt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===Yt.DISPLAY||u.limits)?o="munderover":o="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(n.style===Yt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||n.style===Yt.DISPLAY)?o="munder":o="msub"}else{var a=e.base;a&&a.type==="op"&&a.limits&&(n.style===Yt.DISPLAY||a.alwaysHandleSupSub)||a&&a.type==="operatorname"&&a.alwaysHandleSupSub&&(a.limits||n.style===Yt.DISPLAY)?o="mover":o="msup"}return new Ye(o,i)}});Zf({type:"atom",htmlBuilder(e,n){return Z6(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Ye("mo",[Na(e.text,e.mode)]);if(e.family==="bin"){var r=tS(e,n);r==="bold-italic"&&t.setAttribute("mathvariant",r)}else e.family==="punct"?t.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&t.setAttribute("stretchy","false");return t}});var RB={mi:"italic",mn:"normal",mtext:"normal"};Zf({type:"mathord",htmlBuilder(e,n){return _b(e,n,"mathord")},mathmlBuilder(e,n){var t=new Ye("mi",[Na(e.text,e.mode,n)]),r=tS(e,n)||"italic";return r!==RB[t.type]&&t.setAttribute("mathvariant",r),t}});Zf({type:"textord",htmlBuilder(e,n){return _b(e,n,"textord")},mathmlBuilder(e,n){var t=Na(e.text,e.mode,n),r=tS(e,n)||"normal",s;return e.mode==="text"?s=new Ye("mtext",[t]):/[0-9]/.test(e.text)?s=new Ye("mn",[t]):e.text==="\\prime"?s=new Ye("mo",[t]):s=new Ye("mi",[t]),r!==RB[s.type]&&s.setAttribute("mathvariant",r),s}});var iw={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},aw={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Zf({type:"spacing",htmlBuilder(e,n){if(aw.hasOwnProperty(e.text)){var t=aw[e.text].className||"";if(e.mode==="text"){var r=_b(e,n,"textord");return r.classes.push(t),r}else return Ue(["mspace",t],[Z6(e.text,e.mode,n)],n)}else{if(iw.hasOwnProperty(e.text))return Ue(["mspace",iw[e.text]],[],n);throw new Qe('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(aw.hasOwnProperty(e.text))t=new Ye("mtext",[new ns(" ")]);else{if(iw.hasOwnProperty(e.text))return new Ye("mspace");throw new Qe('Unknown type of space "'+e.text+'"')}return t}});var IT=()=>{var e=new Ye("mtd",[]);return e.setAttribute("width","50%"),e};Zf({type:"tag",mathmlBuilder(e,n){var t=new Ye("mtable",[new Ye("mtr",[IT(),new Ye("mtd",[_u(e.body,n)]),IT(),new Ye("mtd",[_u(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var BT={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},$T={"\\textbf":"textbf","\\textmd":"textmd"},Nxt={"\\textit":"textit","\\textup":"textup"},PT=(e,n)=>{var t=e.font;if(t){if(BT[t])return n.withTextFontFamily(BT[t]);if($T[t])return n.withTextFontWeight($T[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(Nxt[t])};at({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"text",mode:t.mode,body:ts(s),font:r}},htmlBuilder(e,n){var t=PT(e,n),r=hs(e.body,t,!0);return Ue(["mord","text"],r,t)},mathmlBuilder(e,n){var t=PT(e,n);return _u(e.body,t)}});at({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"underline",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=In(e.body,n),r=Hh("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=Dn({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Ue(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new Ye("mo",[new ns("‾")]);t.setAttribute("stretchy","true");var r=new Ye("munder",[nr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});at({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=In(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return Dn({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ye("mpadded",[nr(e.body,n)],["vcenter"]);return new Ye("mrow",[t])}});at({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Qe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=FT(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),su=ZI,MB=`[ \r - ]`,zxt="\\\\[a-zA-Z@]+",Txt="\\\\[^\uD800-\uDFFF]",jxt="("+zxt+")"+MB+"*",Axt=`\\\\( -|[ \r ]+ -?)[ \r ]*`,x5="[̀-ͯ]",Rxt=new RegExp(x5+"+$"),Mxt="("+MB+"+)|"+(Axt+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(x5+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(x5+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+jxt)+("|"+Txt+")");class HT{constructor(n,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=n,this.settings=t,this.tokenRegex=new RegExp(Mxt,"g"),this.catcodes={"%":14,"~":13}}setCatcode(n,t){this.catcodes[n]=t}lex(){var n=this.input,t=this.tokenRegex.lastIndex;if(t===n.length)return new to("EOF",new vi(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Qe("Unexpected character: '"+n[t]+"'",new to(n[t],new vi(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var i=n.indexOf(` -`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=n.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new to(s,new vi(this,t,this.tokenRegex.lastIndex))}}class Dxt{constructor(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=n,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Qe("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var n=this.undefStack.pop();for(var t in n)n.hasOwnProperty(t)&&(n[t]==null?delete this.current[t]:this.current[t]=n[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(n){return this.current.hasOwnProperty(n)||this.builtins.hasOwnProperty(n)}get(n){return this.current.hasOwnProperty(n)?this.current[n]:this.builtins[n]}set(n,t,r){if(r===void 0&&(r=!1),r){for(var s=0;s0&&(this.undefStack[this.undefStack.length-1][n]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(n)&&(i[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var Lxt=xB;ie("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ie("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ie("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ie("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ie("\\@ifnextchar",function(e){var n=e.consumeArgs(3);e.consumeSpaces();var t=e.future();return n[0].length===1&&n[0][0].text===t.text?{tokens:n[1],numArgs:0}:{tokens:n[2],numArgs:0}});ie("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ie("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var qT={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ie("\\char",function(e){var n=e.popToken(),t,r=0;if(n.text==="'")t=8,n=e.popToken();else if(n.text==='"')t=16,n=e.popToken();else if(n.text==="`")if(n=e.popToken(),n.text[0]==="\\")r=n.text.charCodeAt(1);else{if(n.text==="EOF")throw new Qe("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=qT[n.text],r==null||r>=t)throw new Qe("Invalid base-"+t+" digit "+n.text);for(var s;(s=qT[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Qe("\\newcommand's first argument must be a macro name");var i=s[0].text,o=e.isDefined(i);if(o&&!n)throw new Qe("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!o&&!t)throw new Qe("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var a=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Qe("Invalid number of arguments: "+l);a=parseInt(l),s=e.consumeArg().tokens}return o&&r||e.macros.set(i,{tokens:s,numArgs:a}),""};ie("\\newcommand",e=>aS(e,!1,!0,!1));ie("\\renewcommand",e=>aS(e,!0,!1,!1));ie("\\providecommand",e=>aS(e,!0,!0,!0));ie("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ie("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ie("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),su[t],gr.math[t],gr.text[t]),""});ie("\\bgroup","{");ie("\\egroup","}");ie("~","\\nobreakspace");ie("\\lq","`");ie("\\rq","'");ie("\\aa","\\r a");ie("\\AA","\\r A");ie("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ie("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ie("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ie("ℬ","\\mathscr{B}");ie("ℰ","\\mathscr{E}");ie("ℱ","\\mathscr{F}");ie("ℋ","\\mathscr{H}");ie("ℐ","\\mathscr{I}");ie("ℒ","\\mathscr{L}");ie("ℳ","\\mathscr{M}");ie("ℛ","\\mathscr{R}");ie("ℭ","\\mathfrak{C}");ie("ℌ","\\mathfrak{H}");ie("ℨ","\\mathfrak{Z}");ie("\\Bbbk","\\Bbb{k}");ie("\\llap","\\mathllap{\\textrm{#1}}");ie("\\rlap","\\mathrlap{\\textrm{#1}}");ie("\\clap","\\mathclap{\\textrm{#1}}");ie("\\mathstrut","\\vphantom{(}");ie("\\underbar","\\underline{\\text{#1}}");ie("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ie("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ie("\\ne","\\neq");ie("≠","\\neq");ie("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ie("∉","\\notin");ie("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ie("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ie("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ie("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ie("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ie("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ie("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ie("⟂","\\perp");ie("‼","\\mathclose{!\\mkern-0.8mu!}");ie("∌","\\notni");ie("⌜","\\ulcorner");ie("⌝","\\urcorner");ie("⌞","\\llcorner");ie("⌟","\\lrcorner");ie("©","\\copyright");ie("®","\\textregistered");ie("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ie("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ie("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ie("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ie("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ie("⋮","\\vdots");ie("\\varGamma","\\mathit{\\Gamma}");ie("\\varDelta","\\mathit{\\Delta}");ie("\\varTheta","\\mathit{\\Theta}");ie("\\varLambda","\\mathit{\\Lambda}");ie("\\varXi","\\mathit{\\Xi}");ie("\\varPi","\\mathit{\\Pi}");ie("\\varSigma","\\mathit{\\Sigma}");ie("\\varUpsilon","\\mathit{\\Upsilon}");ie("\\varPhi","\\mathit{\\Phi}");ie("\\varPsi","\\mathit{\\Psi}");ie("\\varOmega","\\mathit{\\Omega}");ie("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ie("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ie("\\boxed","\\fbox{$\\displaystyle{#1}$}");ie("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ie("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ie("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ie("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ie("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var UT={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},Oxt=new Set(["bin","rel"]);ie("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in UT?n=UT[t]:(t.slice(0,4)==="\\not"||t in gr.math&&Oxt.has(gr.math[t].group))&&(n="\\dotsb"),n});var oS={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};ie("\\dotso",function(e){var n=e.future().text;return n in oS?"\\ldots\\,":"\\ldots"});ie("\\dotsc",function(e){var n=e.future().text;return n in oS&&n!==","?"\\ldots\\,":"\\ldots"});ie("\\cdots",function(e){var n=e.future().text;return n in oS?"\\@cdots\\,":"\\@cdots"});ie("\\dotsb","\\cdots");ie("\\dotsm","\\cdots");ie("\\dotsi","\\!\\cdots");ie("\\dotsx","\\ldots\\,");ie("\\DOTSI","\\relax");ie("\\DOTSB","\\relax");ie("\\DOTSX","\\relax");ie("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ie("\\,","\\tmspace+{3mu}{.1667em}");ie("\\thinspace","\\,");ie("\\>","\\mskip{4mu}");ie("\\:","\\tmspace+{4mu}{.2222em}");ie("\\medspace","\\:");ie("\\;","\\tmspace+{5mu}{.2777em}");ie("\\thickspace","\\;");ie("\\!","\\tmspace-{3mu}{.1667em}");ie("\\negthinspace","\\!");ie("\\negmedspace","\\tmspace-{4mu}{.2222em}");ie("\\negthickspace","\\tmspace-{5mu}{.277em}");ie("\\enspace","\\kern.5em ");ie("\\enskip","\\hskip.5em\\relax");ie("\\quad","\\hskip1em\\relax");ie("\\qquad","\\hskip2em\\relax");ie("\\tag","\\@ifstar\\tag@literal\\tag@paren");ie("\\tag@paren","\\tag@literal{({#1})}");ie("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Qe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ie("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ie("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ie("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ie("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ie("\\newline","\\\\\\relax");ie("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var DB=Ze(To["Main-Regular"][84][1]-.7*To["Main-Regular"][65][1]);ie("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+DB+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ie("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+DB+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ie("\\hspace","\\@ifstar\\@hspacer\\@hspace");ie("\\@hspace","\\hskip #1\\relax");ie("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ie("\\ordinarycolon",":");ie("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ie("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ie("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ie("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ie("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ie("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ie("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ie("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ie("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ie("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ie("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ie("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ie("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ie("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ie("∷","\\dblcolon");ie("∹","\\eqcolon");ie("≔","\\coloneqq");ie("≕","\\eqqcolon");ie("⩴","\\Coloneqq");ie("\\ratio","\\vcentcolon");ie("\\coloncolon","\\dblcolon");ie("\\colonequals","\\coloneqq");ie("\\coloncolonequals","\\Coloneqq");ie("\\equalscolon","\\eqqcolon");ie("\\equalscoloncolon","\\Eqqcolon");ie("\\colonminus","\\coloneq");ie("\\coloncolonminus","\\Coloneq");ie("\\minuscolon","\\eqcolon");ie("\\minuscoloncolon","\\Eqcolon");ie("\\coloncolonapprox","\\Colonapprox");ie("\\coloncolonsim","\\Colonsim");ie("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ie("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ie("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ie("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ie("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ie("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ie("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ie("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ie("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ie("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ie("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ie("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ie("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ie("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ie("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ie("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ie("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ie("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ie("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ie("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ie("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ie("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ie("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ie("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ie("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ie("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ie("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ie("\\imath","\\html@mathml{\\@imath}{ı}");ie("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ie("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ie("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ie("⟦","\\llbracket");ie("⟧","\\rrbracket");ie("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ie("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ie("⦃","\\lBrace");ie("⦄","\\rBrace");ie("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ie("⦵","\\minuso");ie("\\darr","\\downarrow");ie("\\dArr","\\Downarrow");ie("\\Darr","\\Downarrow");ie("\\lang","\\langle");ie("\\rang","\\rangle");ie("\\uarr","\\uparrow");ie("\\uArr","\\Uparrow");ie("\\Uarr","\\Uparrow");ie("\\N","\\mathbb{N}");ie("\\R","\\mathbb{R}");ie("\\Z","\\mathbb{Z}");ie("\\alef","\\aleph");ie("\\alefsym","\\aleph");ie("\\Alpha","\\mathrm{A}");ie("\\Beta","\\mathrm{B}");ie("\\bull","\\bullet");ie("\\Chi","\\mathrm{X}");ie("\\clubs","\\clubsuit");ie("\\cnums","\\mathbb{C}");ie("\\Complex","\\mathbb{C}");ie("\\Dagger","\\ddagger");ie("\\diamonds","\\diamondsuit");ie("\\empty","\\emptyset");ie("\\Epsilon","\\mathrm{E}");ie("\\Eta","\\mathrm{H}");ie("\\exist","\\exists");ie("\\harr","\\leftrightarrow");ie("\\hArr","\\Leftrightarrow");ie("\\Harr","\\Leftrightarrow");ie("\\hearts","\\heartsuit");ie("\\image","\\Im");ie("\\infin","\\infty");ie("\\Iota","\\mathrm{I}");ie("\\isin","\\in");ie("\\Kappa","\\mathrm{K}");ie("\\larr","\\leftarrow");ie("\\lArr","\\Leftarrow");ie("\\Larr","\\Leftarrow");ie("\\lrarr","\\leftrightarrow");ie("\\lrArr","\\Leftrightarrow");ie("\\Lrarr","\\Leftrightarrow");ie("\\Mu","\\mathrm{M}");ie("\\natnums","\\mathbb{N}");ie("\\Nu","\\mathrm{N}");ie("\\Omicron","\\mathrm{O}");ie("\\plusmn","\\pm");ie("\\rarr","\\rightarrow");ie("\\rArr","\\Rightarrow");ie("\\Rarr","\\Rightarrow");ie("\\real","\\Re");ie("\\reals","\\mathbb{R}");ie("\\Reals","\\mathbb{R}");ie("\\Rho","\\mathrm{P}");ie("\\sdot","\\cdot");ie("\\sect","\\S");ie("\\spades","\\spadesuit");ie("\\sub","\\subset");ie("\\sube","\\subseteq");ie("\\supe","\\supseteq");ie("\\Tau","\\mathrm{T}");ie("\\thetasym","\\vartheta");ie("\\weierp","\\wp");ie("\\Zeta","\\mathrm{Z}");ie("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ie("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ie("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ie("\\bra","\\mathinner{\\langle{#1}|}");ie("\\ket","\\mathinner{|{#1}\\rangle}");ie("\\braket","\\mathinner{\\langle{#1}\\rangle}");ie("\\Bra","\\left\\langle#1\\right|");ie("\\Ket","\\left|#1\\right\\rangle");var LB=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,i=n.consumeArg().tokens,o=n.macros.get("|"),a=n.macros.get("\\|");n.macros.beginGroup();var l=f=>p=>{e&&(p.macros.set("|",o),s.length&&p.macros.set("\\|",a));var m=f;if(!f&&s.length){var x=p.future();x.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:r,numArgs:0}};n.macros.set("|",l(!1)),s.length&&n.macros.set("\\|",l(!0));var u=n.consumeArg().tokens,_=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:_.reverse(),numArgs:0}};ie("\\bra@ket",LB(!1));ie("\\bra@set",LB(!0));ie("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ie("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ie("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ie("\\angln","{\\angl n}");ie("\\blue","\\textcolor{##6495ed}{#1}");ie("\\orange","\\textcolor{##ffa500}{#1}");ie("\\pink","\\textcolor{##ff00af}{#1}");ie("\\red","\\textcolor{##df0030}{#1}");ie("\\green","\\textcolor{##28ae7b}{#1}");ie("\\gray","\\textcolor{gray}{#1}");ie("\\purple","\\textcolor{##9d38bd}{#1}");ie("\\blueA","\\textcolor{##ccfaff}{#1}");ie("\\blueB","\\textcolor{##80f6ff}{#1}");ie("\\blueC","\\textcolor{##63d9ea}{#1}");ie("\\blueD","\\textcolor{##11accd}{#1}");ie("\\blueE","\\textcolor{##0c7f99}{#1}");ie("\\tealA","\\textcolor{##94fff5}{#1}");ie("\\tealB","\\textcolor{##26edd5}{#1}");ie("\\tealC","\\textcolor{##01d1c1}{#1}");ie("\\tealD","\\textcolor{##01a995}{#1}");ie("\\tealE","\\textcolor{##208170}{#1}");ie("\\greenA","\\textcolor{##b6ffb0}{#1}");ie("\\greenB","\\textcolor{##8af281}{#1}");ie("\\greenC","\\textcolor{##74cf70}{#1}");ie("\\greenD","\\textcolor{##1fab54}{#1}");ie("\\greenE","\\textcolor{##0d923f}{#1}");ie("\\goldA","\\textcolor{##ffd0a9}{#1}");ie("\\goldB","\\textcolor{##ffbb71}{#1}");ie("\\goldC","\\textcolor{##ff9c39}{#1}");ie("\\goldD","\\textcolor{##e07d10}{#1}");ie("\\goldE","\\textcolor{##a75a05}{#1}");ie("\\redA","\\textcolor{##fca9a9}{#1}");ie("\\redB","\\textcolor{##ff8482}{#1}");ie("\\redC","\\textcolor{##f9685d}{#1}");ie("\\redD","\\textcolor{##e84d39}{#1}");ie("\\redE","\\textcolor{##bc2612}{#1}");ie("\\maroonA","\\textcolor{##ffbde0}{#1}");ie("\\maroonB","\\textcolor{##ff92c6}{#1}");ie("\\maroonC","\\textcolor{##ed5fa6}{#1}");ie("\\maroonD","\\textcolor{##ca337c}{#1}");ie("\\maroonE","\\textcolor{##9e034e}{#1}");ie("\\purpleA","\\textcolor{##ddd7ff}{#1}");ie("\\purpleB","\\textcolor{##c6b9fc}{#1}");ie("\\purpleC","\\textcolor{##aa87ff}{#1}");ie("\\purpleD","\\textcolor{##7854ab}{#1}");ie("\\purpleE","\\textcolor{##543b78}{#1}");ie("\\mintA","\\textcolor{##f5f9e8}{#1}");ie("\\mintB","\\textcolor{##edf2df}{#1}");ie("\\mintC","\\textcolor{##e0e5cc}{#1}");ie("\\grayA","\\textcolor{##f6f7f7}{#1}");ie("\\grayB","\\textcolor{##f0f1f2}{#1}");ie("\\grayC","\\textcolor{##e3e5e6}{#1}");ie("\\grayD","\\textcolor{##d6d8da}{#1}");ie("\\grayE","\\textcolor{##babec2}{#1}");ie("\\grayF","\\textcolor{##888d93}{#1}");ie("\\grayG","\\textcolor{##626569}{#1}");ie("\\grayH","\\textcolor{##3b3e40}{#1}");ie("\\grayI","\\textcolor{##21242c}{#1}");ie("\\kaBlue","\\textcolor{##314453}{#1}");ie("\\kaGreen","\\textcolor{##71B307}{#1}");var OB={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Ixt{constructor(n,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(n),this.macros=new Dxt(Lxt,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new HT(n,this.settings)}switchMode(n){this.mode=n}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(n){this.stack.push(n)}pushTokens(n){this.stack.push(...n)}scanArgument(n){var t,r,s;if(n){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:s,end:r}=this.consumeArg(["]"])}else({tokens:s,start:t,end:r}=this.consumeArg());return this.pushToken(new to("EOF",r.loc)),this.pushTokens(s),new to("",vi.range(t,r))}consumeSpaces(){for(;;){var n=this.future();if(n.text===" ")this.stack.pop();else break}}consumeArg(n){var t=[],r=n&&n.length>0;r||this.consumeSpaces();var s=this.future(),i,o=0,a=0;do{if(i=this.popToken(),t.push(i),i.text==="{")++o;else if(i.text==="}"){if(--o,o===-1)throw new Qe("Extra }",i)}else if(i.text==="EOF")throw new Qe("Unexpected end of input in a macro argument, expected '"+(n&&r?n[a]:"}")+"'",i);if(n&&r)if((o===0||o===1&&n[a]==="{")&&i.text===n[a]){if(++a,a===n.length){t.splice(-a,a);break}}else a=0}while(o!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:i}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new Qe("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Qe("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(n){var t=this.popToken(),r=t.text,s=t.noexpand?null:this._getExpansion(r);if(s==null||n&&s.unexpandable){if(n&&s==null&&r[0]==="\\"&&!this.isDefined(r))throw new Qe("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=s.tokens,o=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){i=i.slice();for(var a=i.length-1;a>=0;--a){var l=i[a];if(l.text==="#"){if(a===0)throw new Qe("Incomplete placeholder at end of macro body",l);if(l=i[--a],l.text==="#")i.splice(a+1,1);else if(/^[1-9]$/.test(l.text))i.splice(a,2,...o[+l.text-1]);else throw new Qe("Not a valid argument number",l)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var n=this.stack.pop();return n.treatAsRelax&&(n.text="\\relax"),n}}expandMacro(n){return this.macros.has(n)?this.expandTokens([new to(n)]):void 0}expandTokens(n){var t=[],r=this.stack.length;for(this.pushTokens(n);this.stack.length>r;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),t.push(s)}return this.countExpansion(t.length),t}expandMacroAsText(n){var t=this.expandMacro(n);return t&&t.map(r=>r.text).join("")}_getExpansion(n){var t=this.macros.get(n);if(t==null)return t;if(n.length===1){var r=this.lexer.catcodes[n];if(r!=null&&r!==13)return}var s=typeof t=="function"?t(this):t;if(typeof s=="string"){var i=0;if(s.includes("#"))for(var o=s.replace(/##/g,"");o.includes("#"+(i+1));)++i;for(var a=new HT(s,this.settings),l=[],u=a.lex();u.text!=="EOF";)l.push(u),u=a.lex();l.reverse();var _={tokens:l,numArgs:i};return _}return s}isDefined(n){return this.macros.has(n)||su.hasOwnProperty(n)||gr.math.hasOwnProperty(n)||gr.text.hasOwnProperty(n)||OB.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:su.hasOwnProperty(n)&&!su[n].primitive}}var GT=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Gg=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),ow={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},WT={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class kb{constructor(n,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Ixt(n,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(n,t){if(t===void 0&&(t=!0),this.fetch().text!==n)throw new Qe("Expected '"+n+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(n){this.mode=n,this.gullet.switchMode(n)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var n=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),n}finally{this.gullet.endGroups()}}subparse(n){var t=this.nextToken;this.consume(),this.gullet.pushToken(new to("}")),this.gullet.pushTokens(n);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(n,t){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(kb.endOfExpression.has(s.text)||t&&s.text===t||n&&su[s.text]&&su[s.text].infix)break;var i=this.parseAtom(t);if(i){if(i.type==="internal")continue}else break;r.push(i)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&(HI(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',n):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),n)),o={type:"textord",mode:"text",loc:vi.range(n),text:t};else return null;if(this.consume(),i)for(var _=0;_0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=C+1:(x!==C&&y.push({type:"text",value:u.value.slice(x,C)}),Array.isArray(E)?y.push(...E):E&&y.push(E),x=C+w[0].length,v=!0),!p.global)break;w=p.exec(u.value)}return v?(x?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=KT(e,"(");let i=KT(e,")");for(;r!==-1&&s>i;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),i++;return[e,t]}function PB(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Of(t)||ob(t))&&(!n||t!==47)}FB.peek=m2t;function l2t(){this.buffer()}function c2t(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function u2t(){this.buffer()}function f2t(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function d2t(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ja(this.sliceSerialize(e)).toLowerCase(),t.label=n}function h2t(e){this.exit(e)}function _2t(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ja(this.sliceSerialize(e)).toLowerCase(),t.label=n}function p2t(e){this.exit(e)}function m2t(){return"["}function FB(e,n,t,r){const s=t.createTracker(r);let i=s.move("[^");const o=t.enter("footnoteReference"),a=t.enter("reference");return i+=s.move(t.safe(t.associationId(e),{after:"]",before:i})),a(),o(),i+=s.move("]"),i}function g2t(){return{enter:{gfmFootnoteCallString:l2t,gfmFootnoteCall:c2t,gfmFootnoteDefinitionLabelString:u2t,gfmFootnoteDefinition:f2t},exit:{gfmFootnoteCallString:d2t,gfmFootnoteCall:h2t,gfmFootnoteDefinitionLabelString:_2t,gfmFootnoteDefinition:p2t}}}function v2t(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:FB},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,i,o){const a=i.createTracker(o);let l=a.move("[^");const u=i.enter("footnoteDefinition"),_=i.enter("label");return l+=a.move(i.safe(i.associationId(r),{before:l,after:"]"})),_(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((n?` -`:" ")+i.indentLines(i.containerFlow(r,a.current()),n?HB:b2t))),u(),l}}function b2t(e,n,t){return n===0?e:HB(e,n,t)}function HB(e,n,t){return(t?"":" ")+e}const y2t=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qB.peek=C2t;function x2t(){return{canContainEols:["delete"],enter:{strikethrough:S2t},exit:{strikethrough:k2t}}}function w2t(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:y2t}],handlers:{delete:qB}}}function S2t(e){this.enter({type:"delete",children:[]},e)}function k2t(e){this.exit(e)}function qB(e,n,t,r){const s=t.createTracker(r),i=t.enter("strikethrough");let o=s.move("~~");return o+=t.containerPhrasing(e,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),i(),o}function C2t(){return"~"}function E2t(e){return e.length}function N2t(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||E2t,i=[],o=[],a=[],l=[];let u=0,_=-1;for(;++_u&&(u=e[_].length);++vl[v])&&(l[v]=w)}S.push(y)}o[_]=S,a[_]=b}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fl[f]&&(l[f]=y),m[f]=y),p[f]=w}o.splice(1,0,p),a.splice(1,0,m),_=-1;const x=[];for(;++_ "),i.shift(2);const o=t.indentLines(t.containerFlow(e,i.current()),j2t);return s(),o}function j2t(e,n,t){return">"+(t?"":" ")+e}function A2t(e,n){return YT(e,n.inConstruct,!0)&&!YT(e,n.notInConstruct,!1)}function YT(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ro&&(o=i):i=1,s=r+n.length,r=t.indexOf(n,s);return o}function R2t(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function M2t(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function D2t(e,n,t,r){const s=M2t(t),i=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if(R2t(e,t)){const f=t.enter("codeIndented"),p=t.indentLines(i,L2t);return f(),p}const a=t.createTracker(r),l=s.repeat(Math.max(UB(i,s)+1,3)),u=t.enter("codeFenced");let _=a.move(l);if(e.lang){const f=t.enter(`codeFencedLang${o}`);_+=a.move(t.safe(e.lang,{before:_,after:" ",encode:["`"],...a.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${o}`);_+=a.move(" "),_+=a.move(t.safe(e.meta,{before:_,after:` -`,encode:["`"],...a.current()})),f()}return _+=a.move(` -`),i&&(_+=a.move(i+` -`)),_+=a.move(l),u(),_}function L2t(e,n,t){return(t?"":" ")+e}function uS(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function O2t(e,n,t,r){const s=uS(t),i=s==='"'?"Quote":"Apostrophe",o=t.enter("definition");let a=t.enter("label");const l=t.createTracker(r);let u=l.move("[");return u+=l.move(t.safe(t.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":` -`,...l.current()}))),a(),e.title&&(a=t.enter(`title${i}`),u+=l.move(" "+s),u+=l.move(t.safe(e.title,{before:u,after:s,...l.current()})),u+=l.move(s),a()),o(),u}function I2t(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function lp(e){return"&#x"+e.toString(16).toUpperCase()+";"}function yv(e,n,t){const r=Ph(e),s=Ph(n);return r===void 0?s===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}GB.peek=B2t;function GB(e,n,t,r){const s=I2t(t),i=t.enter("emphasis"),o=t.createTracker(r),a=o.move(s);let l=o.move(t.containerPhrasing(e,{after:s,before:a,...o.current()}));const u=l.charCodeAt(0),_=yv(r.before.charCodeAt(r.before.length-1),u,s);_.inside&&(l=lp(u)+l.slice(1));const f=l.charCodeAt(l.length-1),p=yv(r.after.charCodeAt(0),f,s);p.inside&&(l=l.slice(0,-1)+lp(f));const m=o.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:_.outside},a+l+m}function B2t(e,n,t){return t.options.emphasis||"*"}function $2t(e,n){let t=!1;return O6(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,G4}),!!((!e.depth||e.depth<3)&&q6(e)&&(n.options.setext||t))}function P2t(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if($2t(e,t)){const _=t.enter("headingSetext"),f=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` -`,after:` -`});return f(),_(),p+` -`+(s===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` -`))+1))}const o="#".repeat(s),a=t.enter("headingAtx"),l=t.enter("phrasing");i.move(o+" ");let u=t.containerPhrasing(e,{before:"# ",after:` -`,...i.current()});return/^[\t ]/.test(u)&&(u=lp(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,t.options.closeAtx&&(u+=" "+o),l(),a(),u}WB.peek=F2t;function WB(e){return e.value||""}function F2t(){return"<"}VB.peek=H2t;function VB(e,n,t,r){const s=uS(t),i=s==='"'?"Quote":"Apostrophe",o=t.enter("image");let a=t.enter("label");const l=t.createTracker(r);let u=l.move("![");return u+=l.move(t.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=t.enter(`title${i}`),u+=l.move(" "+s),u+=l.move(t.safe(e.title,{before:u,after:s,...l.current()})),u+=l.move(s),a()),u+=l.move(")"),o(),u}function H2t(){return"!"}KB.peek=q2t;function KB(e,n,t,r){const s=e.referenceType,i=t.enter("imageReference");let o=t.enter("label");const a=t.createTracker(r);let l=a.move("![");const u=t.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),o();const _=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(e),{before:l,after:"]",...a.current()});return o(),t.stack=_,i(),s==="full"||!u||u!==f?l+=a.move(f+"]"):s==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function q2t(){return"!"}QB.peek=U2t;function QB(e,n,t){let r=e.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i\u007F]/.test(e.url))}XB.peek=G2t;function XB(e,n,t,r){const s=uS(t),i=s==='"'?"Quote":"Apostrophe",o=t.createTracker(r);let a,l;if(YB(e,t)){const _=t.stack;t.stack=[],a=t.enter("autolink");let f=o.move("<");return f+=o.move(t.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),a(),t.stack=_,f}a=t.enter("link"),l=t.enter("label");let u=o.move("[");return u+=o.move(t.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(t.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=t.enter("destinationRaw"),u+=o.move(t.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=t.enter(`title${i}`),u+=o.move(" "+s),u+=o.move(t.safe(e.title,{before:u,after:s,...o.current()})),u+=o.move(s),l()),u+=o.move(")"),a(),u}function G2t(e,n,t){return YB(e,t)?"<":"["}ZB.peek=W2t;function ZB(e,n,t,r){const s=e.referenceType,i=t.enter("linkReference");let o=t.enter("label");const a=t.createTracker(r);let l=a.move("[");const u=t.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),o();const _=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(e),{before:l,after:"]",...a.current()});return o(),t.stack=_,i(),s==="full"||!u||u!==f?l+=a.move(f+"]"):s==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function W2t(){return"["}function fS(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function V2t(e){const n=fS(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function K2t(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function JB(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Q2t(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let o=e.ordered?K2t(t):fS(t);const a=e.ordered?o==="."?")":".":V2t(t);let l=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const _=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&_&&(!_.children||!_.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),JB(t)===o&&_){let f=-1;for(;++f-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+i);let o=i.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const a=t.createTracker(r);a.move(i+" ".repeat(o-i.length)),a.shift(o);const l=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,a.current()),_);return l(),u;function _(f,p,m){return p?(m?"":" ".repeat(o))+f:(m?i:i+" ".repeat(o-i.length))+f}}function Z2t(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),o=t.containerPhrasing(e,r);return i(),s(),o}const J2t=Zp(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ewt(e,n,t,r){return(e.children.some(function(o){return J2t(o)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function twt(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}e$.peek=nwt;function e$(e,n,t,r){const s=twt(t),i=t.enter("strong"),o=t.createTracker(r),a=o.move(s+s);let l=o.move(t.containerPhrasing(e,{after:s,before:a,...o.current()}));const u=l.charCodeAt(0),_=yv(r.before.charCodeAt(r.before.length-1),u,s);_.inside&&(l=lp(u)+l.slice(1));const f=l.charCodeAt(l.length-1),p=yv(r.after.charCodeAt(0),f,s);p.inside&&(l=l.slice(0,-1)+lp(f));const m=o.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:_.outside},a+l+m}function nwt(e,n,t){return t.options.strong||"*"}function rwt(e,n,t,r){return t.safe(e.value,r)}function swt(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function iwt(e,n,t){const r=(JB(t)+(t.options.ruleSpaces?" ":"")).repeat(swt(t));return t.options.ruleSpaces?r.slice(0,-1):r}const t$={blockquote:T2t,break:XT,code:D2t,definition:O2t,emphasis:GB,hardBreak:XT,heading:P2t,html:WB,image:VB,imageReference:KB,inlineCode:QB,link:XB,linkReference:ZB,list:Q2t,listItem:X2t,paragraph:Z2t,root:ewt,strong:e$,text:rwt,thematicBreak:iwt};function awt(){return{enter:{table:owt,tableData:ZT,tableHeader:ZT,tableRow:cwt},exit:{codeText:uwt,table:lwt,tableData:fw,tableHeader:fw,tableRow:fw}}}function owt(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function lwt(e){this.exit(e),this.data.inTable=void 0}function cwt(e){this.enter({type:"tableRow",children:[]},e)}function fw(e){this.exit(e)}function ZT(e){this.enter({type:"tableCell",children:[]},e)}function uwt(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,fwt));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function fwt(e,n){return n==="|"?n:e}function dwt(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:l,tableRow:a}};function o(m,x,S,b){return u(_(m,S,b),m.align)}function a(m,x,S,b){const v=f(m,S,b),y=u([v]);return y.slice(0,y.indexOf(` -`))}function l(m,x,S,b){const v=S.enter("tableCell"),y=S.enter("phrasing"),w=S.containerPhrasing(m,{...b,before:i,after:i});return y(),v(),w}function u(m,x){return N2t(m,{align:x,alignDelimiters:r,padding:t,stringLength:s})}function _(m,x,S){const b=m.children;let v=-1;const y=[],w=x.enter("table");for(;++v0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const jwt={tokenize:Bwt,partial:!0};function Awt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Lwt,continuation:{tokenize:Owt},exit:Iwt}},text:{91:{name:"gfmFootnoteCall",tokenize:Dwt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Rwt,resolveTo:Mwt}}}}function Rwt(e,n,t){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;s--;){const l=r.events[s][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!o||!o._balanced)return t(l);const u=Ja(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?t(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),n(l))}}function Mwt(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function Dwt(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return a;function a(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?t(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(i>999||f===93&&!o||f===null||f===91||tr(f))return t(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(Ja(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(f)}return tr(f)||(o=!0),i++,e.consume(f),f===92?_:u}function _(f){return f===91||f===92||f===93?(e.consume(f),i++,u):u(f)}}function Lwt(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,a;return l;function l(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",_):t(x)}function _(x){if(o>999||x===93&&!a||x===null||x===91||tr(x))return t(x);if(x===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return i=Ja(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return tr(x)||(a=!0),o++,e.consume(x),x===92?f:_}function f(x){return x===91||x===92||x===93?(e.consume(x),o++,_):_(x)}function p(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(i)||s.push(i),dn(e,m,"gfmFootnoteDefinitionWhitespace")):t(x)}function m(x){return n(x)}}function Owt(e,n,t){return e.check(tm,n,e.attempt(jwt,n,t))}function Iwt(e){e.exit("gfmFootnoteDefinition")}function Bwt(e,n,t){const r=this;return dn(e,s,"gfmFootnoteDefinitionIndent",5);function s(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(i):t(i)}}function $wt(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(o,a){let l=-1;for(;++l1?l(x):(o.consume(x),f++,m);if(f<2&&!t)return l(x);const b=o.exit("strikethroughSequenceTemporary"),v=Ph(x);return b._open=!v||v===2&&!!S,b._close=!S||S===2&&!!v,a(x)}}}class Pwt{constructor(){this.map=[]}add(n,t,r){Fwt(this,n,t,r)}consume(n){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let s=r.pop();for(;s;){for(const i of s)n.push(i);s=r.pop()}this.map.length=0}}function Fwt(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const q=r.events[I][1].type;if(q==="lineEnding"||q==="linePrefix")I--;else break}const F=I>-1?r.events[I][1].type:null,U=F==="tableHead"||F==="tableRow"?E:l;return U===E&&r.parser.lazy[r.now().line]?t(O):U(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),u(O)}function u(O){return O===124||(o=!0,i+=1),_(O)}function _(O){return O===null?t(O):wt(O)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),m):t(O):mn(O)?dn(e,_,"whitespace")(O):(i+=1,o&&(o=!1,s+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,_):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||tr(O)?(e.exit("data"),_(O)):(e.consume(O),O===92?p:f)}function p(O){return O===92||O===124?(e.consume(O),f):f(O)}function m(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(O):(e.enter("tableDelimiterRow"),o=!1,mn(O)?dn(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):x(O))}function x(O){return O===45||O===58?b(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),S):N(O)}function S(O){return mn(O)?dn(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):O===45?(i+=1,v(O)):O===null||wt(O)?C(O):N(O)}function v(O){return O===45?(e.enter("tableDelimiterFiller"),y(O)):N(O)}function y(O){return O===45?(e.consume(O),y):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(O))}function w(O){return mn(O)?dn(e,C,"whitespace")(O):C(O)}function C(O){return O===124?x(O):O===null||wt(O)?!o||s!==i?N(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(O)):N(O)}function N(O){return t(O)}function E(O){return e.enter("tableRow"),j(O)}function j(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),j):O===null||wt(O)?(e.exit("tableRow"),n(O)):mn(O)?dn(e,j,"whitespace")(O):(e.enter("data"),z(O))}function z(O){return O===null||O===124||tr(O)?(e.exit("data"),j(O)):(e.consume(O),O===92?R:z)}function R(O){return O===92||O===124?(e.consume(O),z):z(O)}}function Gwt(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,u,_,f;const p=new Pwt;for(;++tt[2]+1){const x=t[2]+1,S=t[3]-t[2]-1;e.add(x,S,[])}}e.add(t[3]+1,0,[["exit",f,n]])}return s!==void 0&&(i.end=Object.assign({},Vd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function ej(e,n,t,r,s){const i=[],o=Vd(n.events,t);s&&(s.end=Object.assign({},o),i.push(["exit",s,n])),r.end=Object.assign({},o),i.push(["exit",r,n]),e.add(t+1,0,i)}function Vd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Wwt={name:"tasklistCheck",tokenize:Kwt};function Vwt(){return{text:{91:Wwt}}}function Kwt(e,n,t){const r=this;return s;function s(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return tr(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):t(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(l)}function a(l){return wt(l)?n(l):mn(l)?e.check({tokenize:Qwt},n,t)(l):t(l)}}function Qwt(e,n,t){return dn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function Ywt(e){return pI([xwt(),Awt(),$wt(e),qwt(),Vwt()])}const Xwt={};function u$(e){const n=this,t=e||Xwt,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Ywt(t)),i.push(gwt()),o.push(vwt(t))}function Zwt(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:i},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:a,mathText:o,mathTextData:a}};function e(l){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},l)}function n(){this.buffer()}function t(){const l=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=l}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(l){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),_=this.stack[this.stack.length-1];_.type,this.exit(l),_.value=u;const f=_.data.hChildren[0];f.type,f.tagName,f.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function i(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function o(l){const u=this.resume(),_=this.stack[this.stack.length-1];_.type,this.exit(l),_.value=u,_.data.hChildren.push({type:"text",value:u})}function a(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function Jwt(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),r.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` -`,inConstruct:"mathFlowMeta"},{character:"$",after:n?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:r}};function t(i,o,a,l){const u=i.value||"",_=a.createTracker(l),f="$".repeat(Math.max(UB(u,"$")+1,2)),p=a.enter("mathFlow");let m=_.move(f);if(i.meta){const x=a.enter("mathFlowMeta");m+=_.move(a.safe(i.meta,{after:` -`,before:m,encode:["$"],..._.current()})),x()}return m+=_.move(` -`),u&&(m+=_.move(u+` -`)),m+=_.move(f),p(),m}function r(i,o,a){let l=i.value||"",u=1;for(n||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(l);)u++;const _="$".repeat(u);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let f=-1;for(;++f]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}sm.displayName="c";sm.aliases=[];function sm(e){e.register(Ko),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}Cb.displayName="cpp";Cb.aliases=[];function Cb(e){e.register(sm),(function(n){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(e)}_S.displayName="arduino";_S.aliases=["ino"];function _S(e){e.register(Cb),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}pS.displayName="bash";pS.aliases=["sh","shell"];function pS(e){(function(n){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};n.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=n.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=s.variable[1].inside,a=0;a>/g,function(H,G){return"(?:"+$[+G]+")"})}function r(L,$,H){return RegExp(t(L,$),"")}function s(L,$){for(var H=0;H<$;H++)L=L.replace(/<>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function o(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var a=o(i.typeDeclaration),l=RegExp(o(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=o(i.typeDeclaration+" "+i.contextual+" "+i.other),_=o(i.type+" "+i.typeDeclaration+" "+i.other),f=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,x=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),S=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,x]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[S,b]),y=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,p,b]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,S,b]),N={keyword:l,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,j=/"(?:\\.|[^\\"\r\n])*"/.source,z=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[z]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[S]),lookbehind:!0,inside:N},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,C]),lookbehind:!0,inside:N},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[a,x]),lookbehind:!0,inside:N},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[S]),lookbehind:!0,inside:N},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,_,m]),inside:N}],keyword:l,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),n.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),n.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:N},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,S]),inside:N,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:N,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:N}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[a,x,m,C,l.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[x,p]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:l,"class-name":{pattern:RegExp(C),greedy:!0,inside:N},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var R=j+"|"+E,O=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[R]),I=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),F=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,U=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[S,I]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[F,U]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[F]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[I]),inside:n.languages.csharp},"class-name":{pattern:RegExp(S),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var q=/:[^}\r\n]+/.source,Y=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),V=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Y,q]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[R]),2),te=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,q]);function P(L,$){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[$,q]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:n.languages.csharp}}},string:/[\s\S]+/}}n.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[V]),lookbehind:!0,greedy:!0,inside:P(V,Y)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[te]),lookbehind:!0,greedy:!0,inside:P(te,Z)}],char:{pattern:RegExp(E),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}im.displayName="markup";im.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function im(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},s.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:s}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}f_.displayName="css";f_.aliases=[];function f_(e){(function(n){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var r=n.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}gS.displayName="diff";gS.aliases=[];function gS(e){(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(r){var s=t[r],i=[];/^\w+$/.test(r)||i.push(/\w+/.exec(r)[0]),r==="diff"&&i.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r -?| -|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:t})})(e)}vS.displayName="go";vS.aliases=[];function vS(e){e.register(Ko),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}bS.displayName="ini";bS.aliases=[];function bS(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}yS.displayName="java";yS.aliases=[];function yS(e){e.register(Ko),(function(n){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}xS.displayName="regex";xS.aliases=[];function xS(e){(function(n){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o="(?:[^\\\\-]|"+r.source+")",a=RegExp(o+"-"+o),l={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};n.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:a,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":i,escape:r}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":l}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}wS.displayName="json";wS.aliases=["webmanifest"];function wS(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}SS.displayName="kotlin";SS.aliases=["kt","kts"];function SS(e){e.register(Ko),(function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin})(e)}kS.displayName="less";kS.aliases=[];function kS(e){e.register(f_),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}CS.displayName="lua";CS.aliases=[];function CS(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}ES.displayName="makefile";ES.aliases=[];function ES(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}NS.displayName="yaml";NS.aliases=["yml"];function NS(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function a(l,u){u=(u||"").replace(/m/g,"")+"m";var _=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return l});return RegExp(_,u)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+i+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:a(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:a(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:a(o),lookbehind:!0,greedy:!0},number:{pattern:a(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(e)}zS.displayName="markdown";zS.aliases=["md"];function zS(e){e.register(im),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(a){return a=a.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+a+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(a){["url","bold","italic","strike","code-snippet"].forEach(function(l){a!==l&&(n.languages.markdown[a].inside.content.inside[l]=n.languages.markdown[l])})}),n.hooks.add("after-tokenize",function(a){if(a.language!=="markdown"&&a.language!=="md")return;function l(u){if(!(!u||typeof u=="string"))for(var _=0,f=u.length;_]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}jS.displayName="perl";jS.aliases=[];function jS(e){(function(n){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;n.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}Nb.displayName="markup-templating";Nb.aliases=[];function Nb(e){e.register(im),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,i,o){if(r.language===s){var a=r.tokenStack=[];r.code=r.code.replace(i,function(l){if(typeof o=="function"&&!o(l))return l;for(var u=a.length,_;r.code.indexOf(_=t(s,u))!==-1;)++u;return a[u]=l,_}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var i=0,o=Object.keys(r.tokenStack);function a(l){for(var u=0;u=o.length);u++){var _=l[u];if(typeof _=="string"||_.content&&typeof _.content=="string"){var f=o[i],p=r.tokenStack[f],m=typeof _=="string"?_:_.content,x=t(s,f),S=m.indexOf(x);if(S>-1){++i;var b=m.substring(0,S),v=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),y=m.substring(S+x.length),w=[];b&&w.push.apply(w,a([b])),w.push(v),y&&w.push.apply(w,a([y])),typeof _=="string"?l.splice.apply(l,[u,1].concat(w)):_.content=w}}else _.content&&a(_.content)}return l}a(r.tokens)}}})})(e)}AS.displayName="php";AS.aliases=[];function AS(e){e.register(Nb),(function(n){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;n.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:i,punctuation:o};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:n.languages.php},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];n.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:s,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var _=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",_)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}RS.displayName="python";RS.aliases=["py"];function RS(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}MS.displayName="r";MS.aliases=[];function MS(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}DS.displayName="ruby";DS.aliases=["rb"];function DS(e){e.register(Ko),(function(n){n.languages.ruby=n.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),n.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:n.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete n.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;n.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),n.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete n.languages.ruby.string,n.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),n.languages.rb=n.languages.ruby})(e)}LS.displayName="rust";LS.aliases=[];function LS(e){(function(n){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(e)}OS.displayName="sass";OS.aliases=[];function OS(e){e.register(f_),(function(n){n.languages.sass=n.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete n.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];n.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:r,important:n.languages.sass.important}}}),delete n.languages.sass.property,delete n.languages.sass.important,n.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}IS.displayName="scss";IS.aliases=[];function IS(e){e.register(f_),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}BS.displayName="sql";BS.aliases=[];function BS(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}$S.displayName="swift";$S.aliases=[];function $S(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=e.languages.swift})}PS.displayName="typescript";PS.aliases=["ts"];function PS(e){e.register(Eb),(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var t=n.languages.extend("typescript",{});delete t["class-name"],n.languages.typescript["class-name"].inside=t,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),n.languages.ts=n.languages.typescript})(e)}zb.displayName="basic";zb.aliases=[];function zb(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}FS.displayName="vbnet";FS.aliases=[];function FS(e){e.register(zb),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}const u4t=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],nj={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function d$(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=48&&n<=57}function f4t(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function d4t(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function rj(e){return d4t(e)||d$(e)}const h4t=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function _4t(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let i=0,o=-1,a="",l,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,l=t.position.start):l=t.position);let _=(l?l.line:0)||1,f=(l?l.column:0)||1,p=x(),m;for(i--;++i<=e.length;)if(m===10&&(f=(u?u[o]:0)||1),m=e.charCodeAt(i),m===38){const v=e.charCodeAt(i+1);if(v===9||v===10||v===12||v===32||v===38||v===60||Number.isNaN(v)||r&&v===r){a+=String.fromCharCode(m),f++;continue}const y=i+1;let w=y,C=y,N;if(v===35){C=++w;const U=e.charCodeAt(C);U===88||U===120?(N="hexadecimal",C=++w):N="decimal"}else N="named";let E="",j="",z="";const R=N==="named"?rj:N==="decimal"?d$:f4t;for(C--;++C<=e.length;){const U=e.charCodeAt(C);if(!R(U))break;z+=String.fromCharCode(U),N==="named"&&u4t.includes(z)&&(E=z,j=ip(z))}let O=e.charCodeAt(C)===59;if(O){C++;const U=N==="named"?ip(z):!1;U&&(E=z,j=U)}let I=1+C-y,F="";if(!(!O&&t.nonTerminated===!1))if(!z)N!=="named"&&S(4,I);else if(N==="named"){if(O&&!j)S(5,1);else if(E!==z&&(C=w+E.length,I=1+C-w,O=!1),!O){const U=E?1:3;if(t.attribute){const q=e.charCodeAt(C);q===61?(S(U,I),j=""):rj(q)?j="":S(U,I)}else S(U,I)}F=j}else{O||S(2,I);let U=Number.parseInt(z,N==="hexadecimal"?16:10);if(p4t(U))S(7,I),F="�";else if(U in nj)S(6,I),F=nj[U];else{let q="";m4t(U)&&S(6,I),U>65535&&(U-=65536,q+=String.fromCharCode(U>>>10|55296),U=56320|U&1023),F=q+String.fromCharCode(U)}}if(F){b(),p=x(),i=C-1,f+=C-y+1,s.push(F);const U=x();U.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,F,{start:p,end:U},e.slice(y-1,C)),p=U}else z=e.slice(y-1,C),a+=z,f+=z.length,i=C-1}else m===10&&(_++,o++,f=0),Number.isNaN(m)?b():(a+=String.fromCharCode(m),f++);return s.join("");function x(){return{line:_,column:f,offset:i+((l?l.offset:0)||0)}}function S(v,y){let w;t.warning&&(w=x(),w.column+=y,w.offset+=y,t.warning.call(t.warningContext||void 0,h4t[v],w,v))}function b(){a&&(s.push(a),t.text&&t.text.call(t.textContext||void 0,a,{start:p,end:x()}),a="")}}function p4t(e){return e>=55296&&e<=57343||e>1114111}function m4t(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var g4t=0,Vg={},gs={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++g4t}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(gs.util.type(n)){case"Object":if(s=gs.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var i in n)n.hasOwnProperty(i)&&(r[i]=e(n[i],t));return r;case"Array":return s=gs.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(o,a){r[a]=e(o,t)}),r);default:return n}}},languages:{plain:Vg,plaintext:Vg,text:Vg,txt:Vg,extend:function(e,n){var t=gs.util.clone(gs.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||gs.languages;var s=r[e],i={};for(var o in s)if(s.hasOwnProperty(o)){if(o==n)for(var a in t)t.hasOwnProperty(a)&&(i[a]=t[a]);t.hasOwnProperty(o)||(i[o]=s[o])}var l=r[e];return r[e]=i,gs.languages.DFS(gs.languages,function(u,_){_===l&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=gs.util.objId;for(var o in n)if(n.hasOwnProperty(o)){t.call(n,o,n[o],r||o);var a=n[o],l=gs.util.type(a);l==="Object"&&!s[i(a)]?(s[i(a)]=!0,e(a,t,null,s)):l==="Array"&&!s[i(a)]&&(s[i(a)]=!0,e(a,t,o,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(gs.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=gs.tokenize(r.code,r.grammar),gs.hooks.run("after-tokenize",r),O0.stringify(gs.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var s=new v4t;return E1(s,s.head,e),h$(e,s,n,s.head,0),y4t(s)},hooks:{all:{},add:function(e,n){var t=gs.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=gs.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:O0};function O0(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function sj(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var i=s[1].length;s.index+=i,s[0]=s[0].slice(i)}return s}function h$(e,n,t,r,s,i){for(var o in t)if(!(!t.hasOwnProperty(o)||!t[o])){var a=t[o];a=Array.isArray(a)?a:[a];for(var l=0;l=i.reach);v+=b.value.length,b=b.next){var y=b.value;if(n.length>e.length)return;if(!(y instanceof O0)){var w=1,C;if(p){if(C=sj(S,v,e,f),!C||C.index>=e.length)break;var z=C.index,N=C.index+C[0].length,E=v;for(E+=b.value.length;z>=E;)b=b.next,E+=b.value.length;if(E-=b.value.length,v=E,b.value instanceof O0)continue;for(var j=b;j!==n.tail&&(Ei.reach&&(i.reach=F);var U=b.prev;O&&(U=E1(n,U,O),v+=O.length),b4t(n,U,w);var q=new O0(o,_?gs.tokenize(R,_):R,m,R);if(b=E1(n,U,q),I&&E1(n,b,I),w>1){var Y={cause:o+","+l,reach:F};h$(e,n,t,b.prev,v,Y),i&&Y.reach>i.reach&&(i.reach=Y.reach)}}}}}}function v4t(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function E1(e,n,t){var r=n.next,s={value:t,prev:n,next:r};return n.next=s,r.prev=s,e.length++,s}function b4t(e,n,t){for(var r=n.next,s=0;st)return null;try{return Ct.highlight(e,n).children}catch{return null}}function g$(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:h.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(g$)},n)}function z4t(e,n,t=3e5){var r;return((r=m$(e,n,t))==null?void 0:r.map(g$))??e}function v$(e,n,t=3e5){const r=m$(e,n,t);if(!r)return e.split(` -`);const s=[];let i=[];const o=[];let a=0;const l=_=>{let f=_;for(let p=o.length-1;p>=0;p--)f=h.jsx("span",{className:o[p],children:f},a++);i.push(f)},u=_=>{var f;if(_.type==="text"){(_.value??"").split(` -`).forEach((p,m)=>{m>0&&(s.push(i),i=[]),p&&l(p)});return}_.type==="element"&&(o.push((((f=_.properties)==null?void 0:f.className)??[]).join(" ")),(_.children??[]).forEach(u),o.pop())};return r.forEach(u),s.push(i),s}function b$(e){return Array.isArray(e)?e.length===0:e===""}const ij=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function Uh(e,n,t){let r=n;for(;e[r]===t;)r+=1;return r-n}function cp(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function C5(e){var o;let n=!1,t=0,r=0,s=0;for(;r[ \t]?/.exec(e.slice(r));if(a){r+=a[0].length,s+=1;continue}const l=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(r));if(!l)break;r+=l[0].length,t+=l[0].length,n=!0}const i=((o=/^[ \t]*/.exec(e.slice(r)))==null?void 0:o[0].length)??0;return{hasListMarker:n,indentation:i,listIndent:t,offset:r+i,quoteDepth:s}}function T4t(e,n){const t=e[n];if(t!=="`"&&t!=="~"||cp(e,n)||Uh(e,n,t)<3)return!1;const r=e.lastIndexOf(` -`,n-1)+1,s=e.indexOf(` -`,n),i=e.slice(r,s===-1?e.length:s),o=C5(i);return o.indentation<=3&&r+o.offset===n}function j4t(e,n){const t=e[n],r=Uh(e,n,t),s=e.lastIndexOf(` -`,n-1)+1,i=e.indexOf(` -`,n),o=C5(e.slice(s,i===-1?e.length:i));let a=e.indexOf(` -`,n+r);if(a===-1)return e.length;for(a+=1;a=o.listIndent&&f.indentation<=o.listIndent+3&&m>=r&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return l===-1?e.length:l+1;if(l===-1)return e.length;a=l+1}return e.length}function A4t(e,n,t){const r=Uh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function M4t(e){const n=[];for(let t=0;t|()[\]-]+$/.test(t)?/^[eE][+-]?\d+$/.test(t)||/[+*/=^_{}\\<>|()]/.test(t)?!0:/^[A-Za-z][A-Za-z0-9]*$/.test(t):!1:!0}function L4t(e,{predictMath:n=!1}={}){const t=M4t(e),r=new Set,s=new Set;for(let u=0;u`$$${s}$$`).replace(/\\\(([\s\S]+?)\\\)/g,(r,s)=>`$$${s}$$`);return n.predictMath&&(t=t.replace(/\\\[([\s\S]*)$/,(r,s)=>`$$${s}`).replace(/\\\(([\s\S]*)$/,(r,s)=>`$$${s}`)),L4t(t,n)}function y$(e,n={}){let t="",r=0,s=0;for(;ss!==n);return{order:e.order.filter(s=>s!==n),previewKey:e.previewKey===n?null:e.previewKey,fallbackKey:r[r.length-1]??null}}function B4t(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function Gr(e,n={}){const t=r=>{n.stopPropagation&&r.stopPropagation()};return{onClick:r=>{t(r),e("preview")},onDoubleClick:r=>{t(r),e("keepOpen")},onAuxClick:r=>{r.button===1&&(r.preventDefault(),t(r),e("keepOpen"))},onKeyDown:r=>{const s=B4t(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const $4t=1e5;function P4t({code:e,lang:n}){const[t,r]=M.useState(!1),s=()=>{var i;(i=navigator.clipboard)==null||i.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return h.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[h.jsx(tn,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:_D(),"aria-label":V4e(),onClick:s,children:t?h.jsx(qi,{size:13}):h.jsx(nb,{size:13})}),h.jsx("pre",{children:h.jsx("code",{children:z4t(e,n,$4t)})})]})}function F4t(e){const n={};for(const t of e.matchAll(/([\w-]+)=(["'])(.*?)\2/g)){const r=t[1];r&&(n[r.toLowerCase()]=t[3]??"")}return n}function oj(e,n,t){let r=n.line,s=n.column;for(let i=0;i]*?)\/?>/gi,r=[];let s=0,i=!1;for(const o of n.matchAll(t)){const a=(o[1]??"").toLowerCase(),l=F4t(o[2]??"");if(!l[a==="run"?"id":"path"])continue;i=!0,o.index>s&&r.push({type:"text",value:n.slice(s,o.index),position:dw(e,s,o.index)});const _=o.index+o[0].length;r.push({children:[],data:{hName:a==="run"?"run-mention":"file-mention",hProperties:l},position:dw(e,o.index,_),type:a==="run"?"runMention":"fileMention"}),s=_}return i?(sx$(e)}function q4t(){return e=>{const n=t=>{var r;for(const s of["href","src"])t.properties&&Object.hasOwn(t.properties,s)&&(t.properties[s]=MI(String(t.properties[s]||"")));(r=t.children)==null||r.forEach(n)};n(e)}}function cj({path:e,lines:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,i=n&&Number.parseInt(n,10)||void 0,o=i!=null?`${s}:${i}`:s;return h.jsxs("button",{className:"file-chip",title:r?HK({path:ze(e)}):e,...Gr(a=>r==null?void 0:r(e,i,t,void 0,a)),disabled:!r,children:[h.jsx(pO,{size:12}),h.jsx("span",{className:"file-chip-label",children:o}),h.jsx(bO,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function U4t({id:e,label:n,onOpenRun:t}){return h.jsxs("button",{className:"file-chip run-chip",title:t?rQ({id:ze(e)}):AQ({id:ze(e)}),...Gr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[h.jsx(x6,{size:12}),h.jsx("span",{className:"file-chip-label",children:n||eL()}),h.jsx(bO,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const w$={singleDollarTextMath:!0},G4t=B6().use(G6).use(u$).use(f$,w$).use(H4t).use(hv).use(q4t).use($B);function W4t(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const S$={code:({node:e,className:n,children:t,...r})=>{const s=n??"",i=/language-(\w+)/.exec(s),o=String(t??"").replace(/\n$/,"");if(!(i!=null||o.includes(` -`)))return h.jsx("code",{className:s,...r,children:t});const l=i?S5(i[1]):null;return h.jsx(P4t,{code:o,lang:l})},pre:({children:e})=>h.jsx(h.Fragment,{children:e})},Oo=M.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:i,predict:o=!1}){Kf();const a=M.useMemo(()=>({"file-mention":l=>h.jsx(cj,{path:l.path,lines:l.lines,exp:l.exp,onOpenFile:t}),"run-mention":l=>h.jsx(U4t,{id:l.id,label:l.label,onOpenRun:r}),a:({node:l,href:u,children:_,...f})=>{if(u&&W4t(u)&&t){let p;try{p=decodeURI(u)}catch{return h.jsx("span",{children:_})}const m=s?s(p):p;return m?h.jsx(cj,{path:m,onOpenFile:t}):h.jsx("span",{children:_})}return h.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",...f,children:_})},th:({node:l,...u})=>h.jsx("th",{dir:"auto",...u}),td:({node:l,...u})=>h.jsx("td",{dir:"auto",...u}),img:({node:l,src:u,alt:_,className:f,...p})=>{if(!u||typeof u!="string")return null;const m=i?i(u):u;return m?h.jsx("img",{...p,src:m,alt:_??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border ${f??""}`}):null},...S$}),[t,r,s,i]);return h.jsx("div",{dir:"auto","data-streaming":o||void 0,className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:text-prose-emphasis [&_h1]:font-semibold [&_h1]:mt-3 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h2]:text-text [&_h2]:text-prose-emphasis [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mx-0 [&_h2]:mb-1.5 [&_h3]:text-text [&_h3]:text-prose-emphasis [&_h3]:font-semibold [&_h3]:mt-3 [&_h3]:mx-0 [&_h3]:mb-1.5 [&_h4]:text-text [&_h4]:text-prose-emphasis [&_h4]:font-semibold [&_h4]:mt-3 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_table]:overflow-x-auto [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text",children:h.jsx(obt,{content:y$(n,{predictMath:o}),processor:G4t,components:a,predict:o})})}),uj="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function V4t({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:o}){const[a,l]=M.useState(!1),u=M.useRef(null),[_,f]=M.useState(!1),[p,m]=M.useState(""),x=M.useRef(null);M.useEffect(()=>{if(!a)return;const b=v=>{u.current&&!u.current.contains(v.target)&&l(!1)};return window.addEventListener("pointerdown",b),()=>window.removeEventListener("pointerdown",b)},[a]),M.useEffect(()=>{var b;_&&((b=x.current)==null||b.focus())},[_]);const S=()=>{o(p.trim()||"no specific feedback — use your judgment"),m(""),f(!1)};return h.jsxs("div",{className:"plan-strip relative w-full mt-0 mx-0 mb-2.5 py-[11px] px-[13px] flex flex-col items-stretch gap-2.5 border border-border border-s-[3px] border-s-accent-blue rounded-md bg-surface shadow-plan",children:[h.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[h.jsx(x6,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),h.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?Kze({agent:ze(n)}):Uze({agent:ze(n)})}),h.jsx("button",{className:"plan-strip-open ms-auto p-0 border-0 bg-none bg-transparent text-accent-blue text-sm cursor-pointer whitespace-nowrap shrink-0 [&:hover]:underline",...Gr(t),children:aTe()})]}),_?h.jsxs(h.Fragment,{children:[h.jsx("textarea",{dir:"auto",ref:x,className:"plan-strip-revise-input w-full resize-none border border-border rounded-md py-[9px] px-[11px] text-sm font-[inherit] bg-background text-text [&:focus]:border-accent-blue",placeholder:wTe(),rows:2,value:p,onChange:b=>m(b.target.value),onKeyDown:b=>{b.key==="Escape"?(b.preventDefault(),m(""),f(!1)):b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),S())}}),h.jsxs("div",{className:uj,children:[h.jsx(Oe,{size:"small",onClick:()=>{m(""),f(!1)},children:Zze()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),h.jsxs(Oe,{size:"small",variant:"primary",onClick:S,children:[_Te(),h.jsx(_O,{size:13})]})]})]}):h.jsxs("div",{className:uj,children:[h.jsx(Oe,{size:"small",onClick:i,children:uTe()}),h.jsx(Oe,{size:"small",onClick:()=>f(!0),children:vTe()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),s?h.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[h.jsx(Oe,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:Rze()}),h.jsx(Oe,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":nTe(),onClick:()=>l(b=>!b),children:h.jsx(Ho,{size:13})}),a&&h.jsx("div",{className:"plan-strip-menu absolute end-0 bottom-[calc(100%_+_4px)] flex min-w-47.5 flex-col rounded-md border border-border bg-surface p-1 shadow-plan-menu z-6",children:h.jsx(Ur,{onClick:()=>{l(!1),r("bypassPermissions")},children:Oze()})})]}):h.jsx(Oe,{size:"small",variant:"primary",onClick:()=>r(),children:Pze()})]})]})}function fj({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,o]=M.useState(""),[a,l]=M.useState(!1),[u,_]=M.useState(null);async function f(p){if(p.preventDefault(),!(a||!i.trim())){l(!0),_(null);try{n(await e(i.trim())),o("")}catch(m){_(m instanceof Error?m.message:String(m))}finally{l(!1)}}}return h.jsxs("form",{className:"onb-token-form flex items-center flex-wrap gap-2 mt-2 [&_input]:flex-1 [&_input]:min-w-55 [&_input]:text-sm [&_a]:text-sm [&_a]:text-subtext [&_a]:whitespace-nowrap [&_.error]:basis-full [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap",onSubmit:f,children:[h.jsx("input",{type:"password",value:i,onChange:p=>o(p.target.value),placeholder:t,autoComplete:"off"}),h.jsx(Oe,{type:"submit",disabled:a||!i.trim(),children:a?Yi():Po()}),h.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??lwe()}),u&&h.jsx("div",{className:"error",children:u})]})}function k$({value:e,max:n,label:t,caption:r,fillColor:s}){const i=n>0?Math.min(100,Math.round(e/n*100)):0;return h.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:[h.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:h.jsx("div",{className:"progress-fill h-full bg-accent rounded-full transition-[width] duration-200 ease-standard",style:{width:`${i}%`,background:s}})}),(t!==void 0||r!==void 0)&&h.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[h.jsx("span",{children:t??`${i}%`}),r]})]})}const dj={done:{tone:"success",live:!1},failed:{tone:"danger",live:!1},running:{tone:"info",live:!0},starting:{tone:"warning",live:!0},cancelling:{tone:"caution",live:!0},cancelled:{tone:"caution",live:!1},editing:{tone:"accent",live:!0},idle:{tone:"neutral",live:!1}};function K4t(e){return dj[e]??dj.idle}const Q4t={done:bnt,failed:Nnt,running:Lnt,starting:$nt,cancelling:pnt,cancelled:fnt,editing:Snt,idle:Ant};function C$(e){const n=Q4t[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function Ul({status:e,label:n,className:t}){const r=K4t(e);return h.jsx(r6,{tone:r.tone,live:r.live,className:t,children:n??C$(e)})}const xv="font-mono text-sm leading-[1.55] [tab-size:4]",E$="whitespace-pre-wrap break-words",N$="file-view-gutter text-right text-muted select-none";function z$(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}function T$({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:o,scrollRequest:a,onScrollRequestHandled:l,scrollPosition:u,onScrollPositionChange:_}){const f=M.useMemo(()=>v$(e,hS(i)),[e,i]),{ruleCh:p,codeCh:m}=z$(f.length),x=M.useRef(null),S=M.useRef(null),b=()=>{const C=x.current;C&&S.current&&(S.current.scrollTop=C.scrollTop)},v=M.useRef(u);M.useLayoutEffect(()=>{const C=x.current;!C||!v.current||(C.scrollTop=v.current.top,C.scrollLeft=v.current.left,b())},[i]),M.useLayoutEffect(b,[e]),M.useLayoutEffect(()=>{var R;const C=x.current;if(!C||!o||a===void 0)return;const N=e.split(` -`),E=Math.min(Math.max(Math.trunc(o),1),N.length);let j=0;for(let O=0;O{if(!s){if((C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="s"){C.preventDefault(),t();return}if(C.key==="Tab"){C.preventDefault();const N=C.currentTarget,{selectionStart:E,selectionEnd:j}=N,z=e.slice(0,E)+" "+e.slice(j);n(z),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=E+1})}}},w=`absolute inset-0 m-0 py-3.5 pe-4 ${xv} ${E$} [scrollbar-gutter:stable]`;return h.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${xv}`,children:[h.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${p}ch`},"aria-hidden":"true"}),h.jsx("div",{ref:S,className:`file-view-code ${w} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:f.map((C,N)=>h.jsxs("div",{"data-line":N+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[h.jsx("span",{className:`${N$} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),b$(C)?h.jsx("br",{}):C]},N))}),h.jsx("textarea",{ref:x,className:`file-view-editarea ${w} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${m}ch`},value:e,onChange:C=>{s||n(C.target.value)},onScroll:C=>{b(),_==null||_({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:y,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function j$({onClose:e,onSaved:n}){const t=rut(),r=ht(t),[s,i]=M.useState(()=>r.data??null),[o,a]=M.useState(()=>{var w;return((w=r.data)==null?void 0:w.content)??""}),l=!s&&r.error?r.error.message:null,u=Cn({mutationFn:({content:w,previous:C})=>Ult(w,C)}),[_,f]=M.useState(!1),p=M.useRef(null),m=M.useRef(e),x=s!==null&&o!==s.content,S=M.useRef(x),b=M.useRef(_);S.current=x,b.current=_,m.current=e,M.useEffect(()=>{!r.data||S.current||b.current||(i(r.data),a(r.data.content))},[r.data]);const v=()=>{b.current||S.current&&!window.confirm(Wtt())||m.current()};a6(p,v,"textarea");async function y(){if(!(!s||!x||_)){f(!0);try{if(await u.mutateAsync({content:o,previous:s.content}),!Mn(t.queryKey))return;Wr(t.queryKey,{...s,content:o}),i({...s,content:o}),n==null||n(),ir(ent(),"success")}catch(w){ir(w instanceof Error?w.message:String(w),"error")}finally{f(!1)}}}return Fo.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:w=>{w.target===w.currentTarget&&v()},children:h.jsxs("div",{ref:p,className:"relative flex h-[min(48rem,calc(100vh-2.5rem))] w-200 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ssh-config-dialog-title",tabIndex:-1,children:[h.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[h.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:snt()}),h.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),h.jsx(tn,{className:"absolute end-3.5 top-3.5","aria-label":Htt(),onClick:v,disabled:_,children:h.jsx(es,{size:16})}),h.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:l?h.jsx("p",{className:"m-5 text-sm text-accent-red",children:l}):s===null?h.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[h.jsx(Ot,{})," ",Ytt()]}):h.jsx(T$,{value:o,onChange:a,onSave:()=>void y(),path:s.path})}),h.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[h.jsx(Oe,{onClick:v,disabled:_,children:qp()}),h.jsx(Oe,{variant:"primary",onClick:()=>void y(),disabled:!x||_,children:_?Yi():Po()})]})]})}),document.body)}const Io=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5","[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text","[&_.settings-sub]:mb-3 [&_.kv]:gap-y-1.5 [&_.kv]:gap-x-4.5","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0"].join(" "),If=["kv grid grid-cols-[auto_1fr] items-baseline gap-y-[3px] gap-x-3.5 text-base","[&_.k]:text-sm [&_.k]:text-subtext [&_.v]:text-base [&_.v]:text-text","[&_.v]:break-all"].join(" "),Y4t=["grid grid-cols-[9rem_minmax(0,1fr)] items-center gap-x-5 gap-y-2.5 font-sans text-base text-text","[&_.k]:font-medium [&_.k]:text-sm [&_.k]:text-text","[&_.v]:min-w-0 [&_.v]:flex [&_.v]:items-center [&_.v]:flex-wrap [&_.v]:gap-2","[&_.v]:font-sans [&_.v]:text-base [&_.v]:text-text [&_.v]:break-words"].join(" "),Tb="mt-3 mx-0 mb-0 ps-3 border-s-2 border-s-accent-red font-sans text-base leading-relaxed text-text whitespace-pre-wrap",wa=["settings-note mt-2.5 mx-0 mb-0 text-base py-2 px-2.5","border border-accent-amber rounded-md bg-accent-amber-subtle","text-accent-amber font-medium"].join(" "),qS=["form font-sans text-sm text-text [&_.form-seg]:self-start [&_.form-seg]:mb-0.5","[&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3","[&_.repo-hint]:font-normal [&_.repo-hint]:text-sm","[&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal","[&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center","[&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full","[&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5","[&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background","[&_.folder-picker-control]:border [&_.folder-picker-control]:border-border","[&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer","[&_.folder-picker-control]:text-start","[&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard","[&_.folder-picker-control:hover:not(:disabled)]:border-muted","[&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle","[&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text","[&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1","[&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden","[&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap","[&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none","[&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none","[&_.folder-picker-chevron]:text-muted","[&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext","[&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm","[&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4]","[&_.project-location-field]:flex [&_.project-location-field]:flex-col","[&_.project-location-field]:gap-2 [&_.project-location-label]:text-text","[&_.project-location-label]:text-base","[&_.project-location-label]:font-medium [&_.project-field-label]:text-text","[&_.project-field-label]:text-base [&_.project-field-label]:font-medium","[&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65","[&_.paper-destination]:flex [&_.paper-destination]:items-center","[&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3","[&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md","[&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1","[&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden","[&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm","[&_.paper-destination_code]:font-normal","[&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap","[&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px]","[&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant","[&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface","[&_.project-path-notice]:text-base [&_.project-path-notice]:leading-relaxed [&_.project-path-notice]:text-text","[&_.project-path-notice]:leading-[1.4]","[&_.project-path-notice.error]:border-danger-notice-border","[&_.paper-results]:flex [&_.paper-results]:flex-col","[&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md","[&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto","[&_.paper-results_button]:flex [&_.paper-results_button]:flex-col","[&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5","[&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent","[&_.paper-results_button]:border-0","[&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant","[&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit]","[&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer","[&_.paper-results_button:last-child]:border-b-0","[&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm","[&_.paper-results_.title]:font-medium","[&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted","[&_.paper-pick_.id]:text-xs","[&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center","[&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3","[&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md","[&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0","[&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium","flex flex-col gap-2.5 [&_label]:flex [&_label]:flex-col","[&_label]:gap-1 [&_label]:text-sm [&_label]:text-text","[&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2","[&_input]:font-sans [&_input]:text-sm [&_input]:font-normal [&_input]:text-text [&_input::placeholder]:text-subtext","[&_select]:font-sans [&_select]:text-sm [&_select]:font-normal [&_select]:text-text","[&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end","[&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start","[&_.new-project-actions]:mt-2.5","[&_.error]:text-accent-red [&_.error]:text-base [&_.error]:whitespace-pre-wrap","settings-form mt-3.5 pt-3.5 border-t border-t-border"].join(" "),$l=["project-default-row flex items-center justify-between gap-6","pt-3.5 border-t border-t-border-variant [&_p]:mt-[3px] [&_p]:mx-0 [&_p]:mb-0","[&_.project-default-title]:text-base [&_p]:text-sm [&_p]:leading-relaxed [&_p]:text-text"].join(" "),E5=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base","[&_h3]:font-semibold [&_h3]:text-text [&_.settings-sub]:mb-3","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0","git-settings-card py-3.5 px-4 [&_h3]:mb-3","[&_.kv]:grid-cols-[132px_minmax(0,_1fr)] [&_.kv]:items-center [&_.kv]:gap-y-[9px] [&_.kv]:gap-x-4.5","[&_.kv_.k]:text-sm [&_.kv_.v]:flex [&_.kv_.v]:items-center","[&_.kv_.v]:flex-wrap [&_.kv_.v]:gap-[7px] [&_.kv_.v]:min-w-0 [&_.kv_.v]:font-sans","[&_.kv_.v]:text-base [&_.kv_.v]:break-normal","[@media((max-width:_640px))]:[&_.kv]:grid-cols-1","[@media((max-width:_640px))]:[&_.kv]:gap-[3px] [@media((max-width:_640px))]:[&_.kv_.v_+_.k]:mt-[7px]"].join(" "),I0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),Hd=["settings-stack-section [&_+_.settings-stack-section]:mt-6 [&_>_:last-child]:mb-0","[&_>_h2]:mt-0 [&_>_h2]:mx-0 [&_>_h2]:mb-1.5 [&_>_h2]:text-xl"].join(" ");function hw(e){return e.agentReady?{cls:"ok",variant:"success",label:dQe()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:fUe()}:e.authState==="unknown"?{cls:"warn",variant:"warning",label:y4()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:NYe()}:{cls:"warn",variant:"warning",label:FD()}:{cls:"warn",variant:"warning",label:$We()}}function X4t({h:e}){return e.authMethod?h.jsx(h.Fragment,{children:e.authMethod==="oauth"?$Pe():F3()}):h.jsx(h.Fragment,{children:"—"})}function Z4t(){const e=Wp(),{data:n=null}=ht(e),[t,r]=M.useState("claude-code"),[s,i]=M.useState(!1),o=(l,u=!1)=>{i(!0),Z3(l,u).catch(()=>{}).finally(()=>i(!1))},a=n==null?void 0:n.find(l=>l.id===t);return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:Wqe()}),h.jsx("div",{className:"harness-tabs mt-3 flex gap-1 mb-3.5 border-b border-b-border-variant [&_button]:inline-flex [&_button]:items-center [&_button]:gap-[7px] [&_button]:py-[7px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:border-b-2 [&_button]:border-b-transparent [&_button]:-mb-px [&_button:hover]:text-text [&_button.active]:border-b-primary",children:(n??[]).map(l=>h.jsxs("button",{className:l.id===t?"active":"",onClick:()=>r(l.id),children:[l.name,h.jsx("span",{className:`w-[7px] h-[7px] rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${hw(l).cls}`})]},l.id))}),n?a?h.jsxs("div",{className:Io,children:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx(Pt,{variant:hw(a).variant,children:hw(a).label}),h.jsx("div",{className:"spacer flex-1"}),h.jsxs(Oe,{size:"small",onClick:()=>o(!0,!0),disabled:s,children:[h.jsx(ro,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Gp()]})]}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:DFe()}),h.jsx("span",{className:"v",children:a.binPath??kPe()}),h.jsx("span",{className:"k",children:WD()}),h.jsx("span",{className:"v",children:a.version??"—"}),h.jsx("span",{className:"k",children:pFe()}),h.jsx("span",{className:"v",children:h.jsx(X4t,{h:a})}),a.account&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:a.id==="opencode"?aXe():U3()}),h.jsx("span",{className:"v",children:a.account})]}),a.org&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:wVe()}),h.jsx("span",{className:"v",children:a.org})]}),a.plan&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:JVe()}),h.jsx("span",{className:"v",children:a.plan})]}),h.jsx("span",{className:"k",children:lFe()}),h.jsx("span",{className:"v",children:a.models.length>0?U$e({count:nn(a.models.length),models:new Intl.ListFormat(T()).format(a.models.slice(0,4).map(l=>ze(Y1(l))))}):q3()})]}),a.agentNote&&h.jsx("p",{className:wa,children:Qp(a.agentNote)})]}):null:h.jsxs(rs,{children:[h.jsx(Ot,{})," ",hqe()]})]})}function J4t({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?h.jsx(Pt,{variant:"success",children:kHe()}):h.jsx(Pt,{variant:"error",children:cWe()}):h.jsx(Pt,{variant:"error",children:hHe()}):h.jsx(Pt,{variant:"error",children:DUe()})}function e5t({onEditState:e}){var j;const n=Cn({mutationFn:Dlt}),t=xN(),r=ht(t),s=r.data??null,i=z=>{Wr(t.queryKey,R=>(typeof z=="function"?z(R??null):z)??void 0)},o=s?null:((j=r.error)==null?void 0:j.message)??null,[a,l]=M.useState(""),[u,_]=M.useState(""),[f,p]=M.useState(!1),[m,x]=M.useState(!1),[S,b]=M.useState(null),v=z=>{i(z),l(z.context??""),_(z.namespace)},y=M.useRef(null);M.useEffect(()=>{const z=y.current;y.current=s,s&&(!z||a===(z.context??"")&&u.trim()===z.namespace)&&(l(s.context??""),_(s.namespace??""))},[s,a,u]);const w=s!==null&&a===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!w;M.useEffect(()=>{e==null||e({dirty:C,saving:f})},[C,f,e]);async function N(){if(!(m||f||!w)){x(!0);try{await Je.fetchQuery({...xN(),staleTime:0})}catch(z){ir(z instanceof Error?z.message:String(z),"error")}finally{x(!1)}}}async function E(z){if(z.preventDefault(),!(f||m)){p(!0),b(null);try{v(await n.mutateAsync({context:a,namespace:u.trim()}))}catch(R){b(R instanceof Error?R.message:String(R))}finally{p(!1)}}}return h.jsx(h.Fragment,{children:o?h.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:o}):s?h.jsxs(h.Fragment,{children:[h.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[h.jsx("dt",{className:"text-subtext",children:t_()}),h.jsx("dd",{className:"m-0",children:m||f?h.jsx(Pt,{children:Ea()}):C?h.jsx(Pt,{children:hD()}):h.jsx(J4t,{s})})]}),w&&!m&&!f&&s.preflight.error&&h.jsx("p",{className:`${Tb} break-words`,children:s.preflight.error}),h.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:E,children:[h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[zHe(),h.jsx(np,{choices:[{id:"",label:s.currentContext?s$e({context:ze(s.currentContext)}):e$e()},...a&&!s.contexts.includes(a)?[{id:a,label:zPe({context:ze(a)})}]:[],...s.contexts.map(z=>({id:z,label:z}))],value:a,variant:"field",dropDown:!0,disabled:f||m,onSelect:l})]}),h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[LGe(),h.jsx(zs,{type:"text",value:u,disabled:f||m,onChange:z=>_(z.target.value),placeholder:ZHe(),autoComplete:"off",spellCheck:!1})]}),S&&h.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:S}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsxs(Oe,{type:"button",onClick:()=>void N(),disabled:f||m||!w,children:[h.jsx(ro,{size:13})," ",m?Ea():Hp()]}),h.jsx(Oe,{variant:"primary",type:"submit",disabled:f||m||w,children:f?Yi():Po()})]})]})]}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",QFe()]})})}function t5t(){var w;const e=Cn({mutationFn:C=>Olt(...C)}),n=wN(),t=ht(n),r=t.data??null,s=C=>{Wr(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,o]=M.useState(null),a=i??((w=t.error)==null?void 0:w.message)??null,[l,u]=M.useState(""),[_,f]=M.useState(""),[p,m]=M.useState(!1),x=t.isPending||p,[S,b]=M.useState(!1);async function v(){if(!(x||S)){m(!0),o(null);try{await Je.fetchQuery({...wN(),staleTime:0})}catch(C){o(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function y(C){if(C.preventDefault(),!(!l.trim()||!_.trim()||x||S||r!=null&&r.processEnv)){b(!0),o(null);try{s(await e.mutateAsync([l.trim(),_.trim()])),u(""),f("")}catch(N){o(N instanceof Error?N.message:String(N))}finally{b(!1)}}}return h.jsxs(h.Fragment,{children:[!r&&x?h.jsxs(rs,{children:[h.jsx(Ot,{})," ",JFe()]}):r&&h.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[h.jsx("dt",{className:"font-medium text-subtext",children:t_()}),h.jsx("dd",{className:"m-0",children:h.jsx(Pt,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?W3():Qv()})})]}),(r==null?void 0:r.processEnv)&&h.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:y$e()}),h.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:y,children:[h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?k$e():O$e(),h.jsx(zs,{type:"password",value:l,onChange:C=>u(C.target.value),placeholder:(r==null?void 0:r.maskedTokenId)??"ak-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?z$e():P$e(),h.jsx(zs,{type:"password",value:_,onChange:C=>f(C.target.value),placeholder:(r==null?void 0:r.maskedTokenSecret)??"as-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),h.jsx("a",{className:"self-start text-sm text-subtext underline",href:"https://modal.com/docs/sdk/py/latest/config",target:"_blank",rel:"noreferrer",children:R$e()}),a&&h.jsx("p",{className:"m-0 text-sm text-accent-red",children:a}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsxs(Oe,{type:"button",disabled:x||S,onClick:()=>void v(),children:[h.jsx(ro,{size:13})," ",Gp()]}),h.jsx(Oe,{variant:"primary",type:"submit",disabled:!l.trim()||!_.trim()||x||S||(r==null?void 0:r.processEnv),children:S?Yi():Po()})]})]})]})}const A$="rounded-sm border-border-strong bg-surface text-subtext",R$="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",n5t=5e3;function M$(e){const n=Ca(),t=e.map(o=>SN(o)),r=eG({queries:t.map(o=>({...o,refetchInterval:n5t}))});return[Object.fromEntries(e.flatMap((o,a)=>r[a].data?[[o,r[a].data.running]]:[])),o=>{Mn(n)&&Wr(SN(o).queryKey,{running:!0})}]}function r5t({test:e,connecting:n,masterRunning:t}){if(n)return h.jsx("span",{role:"status",children:h.jsx(Pt,{className:R$,children:AD()})});if(e===void 0)return h.jsx(Pt,{className:A$,children:PD()});const r=e.missingTools??[],s=e.reachable&&e.toolsFound&&t===!1,i=e.reachable?e.toolsFound?s?h.jsx(Pt,{className:"rounded-sm",variant:"warning",children:MD()}):h.jsx(Pt,{className:"rounded-sm",variant:"success",children:Up()}):h.jsx(Pt,{className:"rounded-sm",variant:"error",children:r.length===1?K$e({tool:ze(r[0])}):Z$e()}):h.jsx(Pt,{className:"rounded-sm",variant:"error",children:G3()});return h.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[i,!s&&h.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:Lo(e.testedAt)})]})}function s5t({remote:e=!1}){const n=bL(),t=ht(n),r=t.data??(t.isError?[]:null),[s,i]=M.useState(!1),[o,a]=M.useState({}),[l,u]=M.useState({}),[_,f]=M.useState(null),[p,m]=M.useState(!1),[x,S]=M.useState(0),b=e?[]:(r==null?void 0:r.filter(E=>{const j=o[E.host]??E.lastTest;return(j==null?void 0:j.reachable)&&j.toolsFound}).map(E=>E.host))??[],[v,y]=M$(b);function w(E){m(!1),S(j=>j+1),f(E),u(j=>({...j,[E]:!0}))}function C(){m(!1),f(null)}function N(E,j){u(z=>({...z,[E]:!j}))}return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"mb-3 flex justify-end",children:h.jsxs(Oe,{variant:"ghost",onClick:()=>i(!0),children:[h.jsx(xO,{size:14})," ",JD()]})}),r===null?h.jsxs(rs,{children:[h.jsx(Ot,{})," ",qD()]}):r.length===0?h.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:iWe()}):h.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:r.map(E=>{const j=o[E.host]??E.lastTest,z=_===E.host,R=l[E.host]??!1,O=!e&&(z||(j==null?void 0:j.reachable)===!1),I=`${E.user?`${E.user}@`:""}${E.hostname??E.host}${E.port?`:${E.port}`:""}`;return h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-3 py-3 px-2",children:[h.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[O?h.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":R,"aria-label":R?VV({name:ze(E.host)}):pK({name:ze(E.host)}),onClick:F=>{F.stopPropagation(),N(E.host,R)},children:h.jsx(Ho,{size:15,className:`text-muted transition-transform duration-120 ease-standard${R?" rotate-180":""}`})}):h.jsx("span",{className:"w-5 flex-none","aria-hidden":"true"}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"truncate text-base font-medium text-text",title:E.host,children:E.host}),h.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:I,children:I})]})]}),!e&&h.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[h.jsx("div",{className:"text-start",children:h.jsx(r5t,{test:j,connecting:z&&!p,masterRunning:v[E.host]})}),h.jsx(Oe,{size:"small",type:"button",className:"justify-self-end",onClick:F=>{F.stopPropagation(),z&&!p?C():w(E.host)},disabled:!z&&_!==null&&!p,children:z?p?Hi():qp():(j==null?void 0:j.reachable)===!1?Hi():j?VD():H3()})]})]}),O&&(R||z)&&h.jsxs("div",{className:`border-t border-t-border-variant py-3 pe-2 ps-10${R?"":" hidden"}`,children:[!z&&(j==null?void 0:j.error)&&h.jsx(Rdt,{host:E.host,transcript:j.error}),z&&h.jsx(l6,{host:E.host,backend:"ssh",active:R,onComplete:F=>{F.backend==="ssh"&&(a(U=>({...U,[E.host]:F.result})),y(E.host),m(!1),f(null))},onError:F=>{m(!0),a(U=>({...U,[E.host]:{reachable:!1,toolsFound:!1,missingTools:[],error:F,testedAt:Date.now()}}))}},x)]})]},E.host)})}),s&&h.jsx(j$,{onClose:()=>i(!1)})]})}function i5t({test:e,connecting:n,masterRunning:t}){return n?h.jsx(Pt,{className:R$,children:AD()}):e===null?h.jsx(Pt,{className:A$,children:PD()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?h.jsx(Pt,{className:"rounded-sm",variant:"warning",children:MD()}):h.jsx(Pt,{className:"rounded-sm",variant:"success",children:Up()}):h.jsx(Pt,{className:"rounded-sm",variant:"error",children:bGe()}):h.jsx(Pt,{className:"rounded-sm",variant:"error",children:CWe()}):h.jsx(Pt,{className:"rounded-sm",variant:"error",children:G3()})}function a5t({remote:e=!1}){var P;const n=Cn({mutationFn:Jlt}),t=Yct(),r=ht(t),s=r.data??null,i=L=>{Wr(t.queryKey,$=>(typeof L=="function"?L($??null):L)??void 0)},o=s?null:((P=r.error)==null?void 0:P.message)??null,[a,l]=M.useState(""),[u,_]=M.useState(""),[f,p]=M.useState(""),[m,x]=M.useState(""),[S,b]=M.useState(!1),[v,y]=M.useState(null),[w,C]=M.useState(null),[N,E]=M.useState(!1),[j,z]=M.useState(!1),[R,O]=M.useState(0),I=!e&&a&&(w!=null&&w.reachable)&&w.slurmFound&&w.toolsFound?[a]:[],[F,U]=M$(I);function q(){z(!1),O(L=>L+1),E(!0)}const Y=L=>{i(L),l(L.host??""),_(L.partition??""),p(L.account??""),x(L.timeLimit??"")},V=M.useRef(null);M.useEffect(()=>{const L=V.current;V.current=s,s&&(!L||a===(L.host??"")&&u.trim()===(L.partition??"")&&f.trim()===(L.account??"")&&m.trim()===(L.timeLimit??""))&&(l(s.host??""),_(s.partition??""),p(s.account??""),x(s.timeLimit??""))},[s,a,u,f,m]);const Z=s!==null&&a===(s.host??"")&&u.trim()===(s.partition??"")&&f.trim()===(s.account??"")&&m.trim()===(s.timeLimit??"");async function te(L){if(L.preventDefault(),!S){b(!0),y(null);try{Y(await n.mutateAsync({host:a,partition:u.trim(),account:f.trim(),timeLimit:m.trim()}))}catch($){y($ instanceof Error?$.message:String($))}finally{b(!1)}}}return h.jsx(h.Fragment,{children:o?h.jsx("div",{className:"error",children:o}):s?h.jsxs(h.Fragment,{children:[!N&&(w==null?void 0:w.error)&&h.jsx("p",{className:Tb,children:w.error}),h.jsxs("form",{className:qS,onSubmit:te,children:[h.jsx("div",{className:"max-w-xl",children:h.jsxs("label",{children:[fGe(),h.jsx(np,{choices:[{id:"",label:XWe()},...a&&!s.hosts.some(L=>L.host===a)?[{id:a,label:`${a} (not in ~/.ssh/config)`}]:[],...s.hosts.map(L=>({id:L.host,label:L.host}))],value:a,variant:"field",dropDown:!0,disabled:S||N,onSelect:L=>{l(L),C(null),E(!1),z(!1)}})]})}),h.jsxs("div",{className:"actions",children:[!e&&h.jsx(Oe,{type:"button",onClick:()=>{N&&!j?(z(!1),E(!1)):q()},disabled:!a,title:a?void 0:nXe(),children:N?j?Hi():qp():w?VD():H3()}),h.jsx("span",{role:"status",children:h.jsx(i5t,{test:w,connecting:N&&!j,masterRunning:F[a]})})]}),h.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[GVe(),h.jsx(zs,{type:"text",list:"slurm-partitions",value:u,onChange:L=>_(L.target.value),placeholder:oN(),autoComplete:"off",spellCheck:!1}),h.jsx("datalist",{id:"slurm-partitions",children:w==null?void 0:w.partitions.map(L=>h.jsx("option",{value:L},L))})]}),h.jsxs("label",{children:[U3(),h.jsx(zs,{type:"text",value:f,onChange:L=>p(L.target.value),placeholder:oN(),autoComplete:"off",spellCheck:!1})]})]}),h.jsxs("label",{className:"mt-3 block max-w-xl",children:[mYe(),h.jsx(zs,{type:"text",value:m,onChange:L=>x(L.target.value),placeholder:cHe(),autoComplete:"off",spellCheck:!1})]})]}),v&&h.jsx("div",{className:"error",children:v}),h.jsx("div",{className:"actions",children:h.jsx(Oe,{variant:"primary",type:"submit",disabled:S||Z||N,children:S?Yi():Po()})})]}),!e&&N&&h.jsx(l6,{host:a,backend:"slurm",onComplete:L=>{L.backend==="slurm"&&(C(L.result),U(a),z(!1),E(!1))},onError:L=>{z(!0),C({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:L})}},R)]}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",QUe()]})})}function o5t(){var C;const e=Cn({mutationFn:tct}),n=Xct(),t=ht(n),r=t.data??null,s=N=>{Wr(n.queryKey,E=>(typeof N=="function"?N(E??null):N)??void 0)},i=r?null:((C=t.error)==null?void 0:C.message)??null,[o,a]=M.useState(""),[l,u]=M.useState(!1),[_,f]=M.useState(null),[p,m]=M.useState(null),x=p!==null&&p!=="testing"?p:null,S=N=>{s(N),a(N.address??"")},b=M.useRef(null);M.useEffect(()=>{const N=b.current;b.current=r,r&&(!N||o===(N.address??""))&&a(r.address??"")},[r,o]);const v=r!==null&&o===(r.address??"");async function y(N){if(N.preventDefault(),!l){u(!0),f(null);try{S(await e.mutateAsync({address:o}))}catch(E){f(E instanceof Error?E.message:String(E))}finally{u(!1)}}}async function w(){m("testing");try{m(await nct(o.trim()||void 0))}catch(N){m({reachable:!1,address:o.trim()||"(unknown)",rayVersion:null,error:N instanceof Error?N.message:String(N)})}}return h.jsx(h.Fragment,{children:i?h.jsx("div",{className:"error",children:i}):r?h.jsxs(h.Fragment,{children:[(x==null?void 0:x.error)&&h.jsx("p",{className:Tb,children:x.error}),h.jsxs("form",{className:qS,onSubmit:y,children:[h.jsxs("label",{children:[jUe(),h.jsx(zs,{type:"text",value:o,onChange:N=>{a(N.target.value),m(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),h.jsxs("p",{className:"m-0 text-sm text-subtext",children:[xqe(),": ",ze(r.resolvedAddress)," · ",UD(),": ",r.source]}),_&&h.jsx("div",{className:"error",children:_}),h.jsxs("div",{className:"actions",children:[h.jsx(Oe,{variant:"primary",type:"submit",disabled:l||v,children:l?Yi():Po()}),h.jsx(Oe,{type:"button",onClick:()=>void w(),disabled:p==="testing",children:WQe()}),h.jsx(l5t,{test:p})]}),(x==null?void 0:x.reachable)&&x.rayVersion&&h.jsxs("p",{className:"m-0 text-sm text-subtext",children:[oKe(),": ",x.rayVersion]})]})]}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",GUe()]})})}function l5t({test:e}){return e===null?null:e==="testing"?h.jsx(Pt,{children:YQe()}):e.reachable?h.jsx(Pt,{variant:"success",children:fKe()}):h.jsx(Pt,{variant:"error",children:G3()})}function c5t(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:Il(e.memBytes),r=e.gpus.length===0?null:uBe({count:e.gpus.length});return[n,e.cpuCount>0?wIe({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function u5t({remote:e}){var p;const n=ht(eut()),t=n.data,r=(p=n.error)==null?void 0:p.message,s=n.isFetching,[i,o]=M.useState(0),[a,l]=M.useState(!0),[u,_]=M.useState(!1),f=()=>n.refetch();return h.jsxs(h.Fragment,{children:[r&&!t?h.jsx("div",{className:"error",children:r}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Y4t,children:[h.jsx("span",{className:"k",children:t_()}),h.jsx("span",{className:"v",children:!t&&s||u?h.jsxs(Pt,{className:"gap-1.5",role:"status",children:[h.jsx(Ot,{}),u?VPe():Ea()]}):r?h.jsx(Pt,{variant:"warning",children:y4()}):t?t.loggedIn?t.sshKeyStatus==="matched"?h.jsx(Pt,{variant:"success",children:Up()}):t.sshKeyStatus==="unknown"?h.jsx(Pt,{variant:"warning",children:y4()}):h.jsx(Pt,{variant:"warning",children:Qv()}):h.jsx(Pt,{variant:"warning",children:FD()}):null}),h.jsx("span",{className:"k",children:EVe()}),h.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),h.jsx("span",{className:"k",children:bQe()}),h.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?h.jsx(Pt,{variant:"success",children:sVe()}):t.sshKeyStatus==="no_local_match"?h.jsx(Pt,{variant:"warning",children:VWe()}):t.sshKeyStatus==="none_registered"?h.jsx(Pt,{variant:"error",children:TWe()}):h.jsx(Pt,{children:SYe()}):"—"})]}),e&&t&&!t.loggedIn&&h.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:d$e({command:ze("orx login")})}),!e&&i>0&&h.jsx(Adt,{login:a,onComplete:()=>{_(!1),o(0),f()},onError:m=>{_(!1),ir(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?h.jsxs("p",{dir:"auto",className:wa,children:[eFe()," ",h.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):h.jsxs("p",{dir:"auto",className:wa,children:[xWe()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),eYe()," ",h.jsx("code",{children:"orx ssh-key add"}),"."]})),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="no_local_match"&&(t.sshKeyPath?h.jsx("p",{dir:"auto",className:wa,children:hXe({register:ze(`orx ssh-key add ${t.sshKeyPath}`),load:ze("ssh-add")})}):h.jsxs("p",{dir:"auto",className:wa,children:[gWe()," ",h.jsx("code",{children:"ssh-add"}),vVe()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),!s&&(r||(t==null?void 0:t.error))&&h.jsx("p",{dir:"auto",className:"mt-4 mb-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:r||(t==null?void 0:t.error)})]}),h.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[h.jsxs(Oe,{onClick:()=>void f(),disabled:s||u,children:[h.jsx(ro,{size:13})," ",s?Ea():Hp()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&h.jsxs(Oe,{variant:"primary",disabled:s||u,onClick:()=>{l(!t.loggedIn),_(!0),o(m=>m+1)},children:[u?h.jsx(Ot,{}):h.jsx(r_,{size:13})," ",t.loggedIn?hZe():KD()]})]})]})}const Gh={local:uD,tinker:vme,hf:Fpe,modal:Zpe,k8s:Gpe,ssh:_me,slurm:ume,ray:ame,openresearch:nme},f5t={local:hpe,ssh:Mpe,tinker:Ipe,hf:ipe,modal:gpe,k8s:cpe,slurm:Tpe,ray:Cpe,openresearch:xpe},jb={local:"local_job",tinker:"tinker_job",hf:"hf_job",modal:"modal_job",k8s:"k8s_job",ssh:"ssh_job",slurm:"slurm_job",ray:"ray_job",openresearch:"openresearch_job"},hj=["hf","modal","slurm","ray","openresearch"],_w=["hf","modal","openresearch"],D$={hf:["cpu-basic","t4-small","a10g-small","a10g-large","a100-large","h100","h200"],modal:["cpu","t4","l4","a10g","a100","a100-80gb","l40s","h100","h100:2"],slurm:["gpu","h100:1","h100:2","a100:4"],ray:["cpu","cpu:2","gpu","gpu:1","gpu:1,cpu:4","gpu:1,mem:8GiB"],openresearch:["h100_sxm","h100_sxm:2","cpu5c","cpu5g","cpu5m"]},N5=["tinker","hf","modal","ray","k8s"],d5t={tinker:Dme,hf:wme,modal:Eme,openresearch:jme},_j="__custom__";function u0(e,n){return!!(n&&!(D$[e]??[]).includes(n))}function h5t({settings:e,projectId:n,onSaved:t}){const r=Cn({mutationFn:sct}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[o,a]=M.useState(s),[l,u]=M.useState(i),[_,f]=M.useState(u0(s,i)),[p,m]=M.useState(!1),[x,S]=M.useState(null),b=e.targets.find(F=>F.id===o),v=e.targets.filter(F=>F.configured||F.id===s),y=hj.includes(o),w=_w.includes(o),C=D$[o]??[],N=o===s&&(!y||l.trim()===i),E=Gh[o](),j=d5t[o],z=p?SJe():w&&!l.trim()?XOe({destination:E}):o==="ssh"?aPe():nPe({destination:E});M.useEffect(()=>{a(s),u(i),f(u0(s,i))},[s,i]);async function R(F,U){const q=hj.includes(F);if(!(p||_w.includes(F)&&!U.trim())){m(!0),S(null);try{t(await r.mutateAsync({backend:F,flavor:q&&U.trim()||null,projectId:n}))}catch(Y){S(Y instanceof Error?Y.message:String(Y)),a(s),u(i),f(u0(s,i))}finally{m(!1)}}}function O(F){const U=e.targets.find(Y=>Y.id===F);if(!U)return;a(U.id);const q=U.id===s?i:"";u(q),f(u0(U.id,q)),_w.includes(U.id)||R(U.id,q)}function I(F){if(F===_j){f(!0);return}f(!1),u(F),(!w||F)&&R(o,F)}return h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:iqe()}),h.jsxs("div",{children:[h.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:F=>{F.preventDefault(),N||R(o,l)},children:[h.jsx(np,{choices:v.map(F=>({id:F.id,label:Gh[F.id]()})),value:o,variant:"field",dropDown:!0,disabled:p,renderIcon:F=>{const U=e.targets.find(q=>q.id===F.id);return U?h.jsx(Yp,{kind:jb[U.id],size:16}):null},onSelect:O}),y&&h.jsx("div",{children:_?h.jsxs("div",{className:"relative",children:[h.jsx("input",{className:"h-9 w-full rounded-md border border-border bg-background py-0 pe-10 ps-3 font-sans text-sm text-text outline-none focus:border-text",type:"text",value:l,onChange:F=>u(F.target.value),onBlur:()=>{if(w&&!l.trim()){o===s&&(u(i),f(u0(s,i)));return}N||R(o,l)},placeholder:PHe(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:p}),h.jsx("button",{type:"button",className:"absolute inset-y-0 end-0 inline-flex w-9 items-center justify-center text-muted hover:text-text","aria-label":aN(),title:aN(),onMouseDown:F=>F.preventDefault(),onClick:()=>f(!1),children:h.jsx(Ho,{size:12})})]}):h.jsx(np,{choices:[{id:"",label:w?VOe():_Pe()},...l&&!C.includes(l)?[{id:l,label:DIe({value:ze(l)})}]:[],...C.map(F=>({id:F,label:F})),{id:_j,label:UHe()}],value:l,variant:"field",dropDown:!0,disabled:p,onSelect:I})})]}),x&&h.jsx("div",{className:"error mt-2.5",children:x}),b&&!b.configured&&h.jsx("p",{className:wa,children:lYe()})]}),h.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:z}),j&&h.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:j()})]})}function _5t({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,o=e.unverified?$Oe():e.id==="openresearch"?KD():e.id==="ray"?H3():cZe();return h.jsxs("div",{className:`group relative flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans ${r&&e.enabled?"transition-colors duration-120 ease-standard hover:border-text hover:bg-surface":""} ${e.enabled?"":"opacity-52"}`,children:[r&&h.jsx("button",{type:"button",className:"absolute inset-0 z-10 rounded-lg focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default",onClick:r,disabled:!e.enabled,"aria-label":Gh[e.id](),"aria-describedby":i,"aria-haspopup":N5.includes(e.id)?"dialog":void 0}),h.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:h.jsx(Yp,{kind:jb[e.id],size:48})}),h.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:Gh[e.id]()}),h.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:f5t[e.id]()}),h.jsx("span",{id:i,className:"mt-2 line-clamp-2 min-h-8 text-xs leading-normal text-subtext",children:e.fromEnvironmentTab?h.jsxs(h.Fragment,{children:[e.id==="tinker"?YBe():oJe()," ",h.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:UIe()})]}):t??e.summary}),h.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[h.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?ID():e.configured?!r||N5.includes(e.id)?W3():DJe():o}),r&&h.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:h.jsx(w1,{size:16})})]})]})}function p5t({target:e,isDefault:n,onBack:t,remote:r}){return h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",className:"settings-back mb-6 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[h.jsx(Z0,{size:16})," ",LD()]}),h.jsxs("div",{className:"flex items-center justify-between gap-6",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[h.jsx("span",{className:"flex h-10 w-10 flex-none items-center justify-center",children:h.jsx(Yp,{kind:jb[e.id],size:36})}),h.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:Gh[e.id]()})]}),n&&h.jsx(Pt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:ID()})]}),h.jsxs("div",{className:"mt-6 font-sans text-base text-text [&_.settings-card]:mb-0 [&_.settings-form]:mt-6 [&_.settings-form]:border-t-0 [&_.settings-form]:pt-0 [&>.settings-form:first-child]:mt-0 [&>div:first-child]:border-t-0",children:[e.id==="ssh"&&h.jsx(s5t,{remote:r}),e.id==="slurm"&&h.jsx(a5t,{remote:r}),e.id==="openresearch"&&h.jsx(u5t,{remote:r})]})]})}function m5t({target:e,onClose:n}){const t=M.useRef(null),[r,s]=M.useState({dirty:!1,saving:!1});M.useEffect(()=>{const o=t.current;return o==null||o.showModal(),()=>o==null?void 0:o.close()},[]);const i=()=>{r.saving||r.dirty&&!window.confirm(WBe())||n()};return h.jsxs("dialog",{ref:t,className:"m-auto w-140 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"compute-quick-setup-title",onKeyDown:o=>{o.key==="Escape"&&(o.preventDefault(),i())},onCancel:o=>{o.preventDefault(),i()},children:[h.jsxs("div",{className:"mb-5 flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[h.jsx(Yp,{kind:jb[e.id],size:32}),h.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:Gh[e.id]()})]}),h.jsx(tn,{title:K1(),"aria-label":K1(),onClick:i,disabled:r.saving,children:h.jsx(es,{size:14})})]}),e.id==="tinker"&&h.jsx(v5t,{target:e}),e.id==="hf"&&h.jsx(y5t,{}),e.id==="modal"&&h.jsx(t5t,{}),e.id==="ray"&&h.jsx(o5t,{}),e.id==="k8s"&&h.jsx(e5t,{onEditState:s})]})}function g5t({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var R,O;const s=Zct(e==null?void 0:e.id),i=ht(s),o=i.data??null,a=I=>{Wr(s.queryKey,F=>(typeof I=="function"?I(F??null):I)??void 0)},l=o?null:((R=i.error)==null?void 0:R.message)??null,[u,_]=M.useState(null),[f,p]=M.useState(null),m=Jct(),x=ht(m),S=x.data??null,b=((O=x.error)==null?void 0:O.message)??null;M.useEffect(()=>{_(null),p(null)},[e==null?void 0:e.id]);const v=I=>{a(I),p(null)},y=o?o.targets:null,w=(o==null?void 0:o.configuredDefaultBackend)??(o==null?void 0:o.defaultBackend),C=y?[...y].sort((I,F)=>+(F.id===w)-+(I.id===w)):null,N=(C==null?void 0:C.filter(I=>I.configured))??[],E=(C==null?void 0:C.filter(I=>!I.configured))??[],j=I=>h.jsx(_5t,{target:I,isDefault:w===I.id,summary:I.id==="local"?S?c5t(S):b??cqe():void 0,onOpen:I.id==="local"?void 0:()=>_(I.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${I.id}`),z=u?o==null?void 0:o.targets.find(I=>I.id===u):null;return z&&!N5.includes(z.id)?h.jsx(p5t,{target:z,isDefault:w===z.id,onBack:()=>_(null),remote:r}):h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:OD()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:yHe()}),h.jsx(I5t,{projectId:e==null?void 0:e.id,onViewHistory:n}),l?h.jsx("div",{className:"error",children:l}):o?h.jsxs(h.Fragment,{children:[f&&h.jsx("div",{className:"error",children:f}),h.jsx(h5t,{settings:o,projectId:e==null?void 0:e.id,onSaved:v}),h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:W3()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(j)})]}),E.length>0&&h.jsxs("section",{className:"mb-3.5",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:SGe()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:E.map(j)})]}),z&&h.jsx(m5t,{target:z,onClose:()=>_(null)})]}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",GFe()]})]})}function v5t({target:e}){var y;const n=Cn({mutationFn:Nlt}),[t,r]=M.useState(""),[s,i]=M.useState(!1),[o,a]=M.useState(null),l=yN(),u=ht(l),_=u.data??null,f=o??((y=u.error)==null?void 0:y.message)??null,p=w=>{Wr(l.queryKey,C=>(typeof w=="function"?w(C??null):w)??void 0)},[m,x]=M.useState(!1),S=u.isPending||m;async function b(){if(!(S||s)){x(!0),a(null);try{await Je.fetchQuery({...yN(),staleTime:0})}catch(w){a(w instanceof Error?w.message:String(w))}finally{x(!1)}}}async function v(w){if(w.preventDefault(),!(!t.trim()||s||S)){i(!0),a(null);try{p(await n.mutateAsync(t.trim())),r("")}catch(C){a(C instanceof Error?C.message:String(C))}finally{i(!1)}}}return h.jsxs(h.Fragment,{children:[!_&&S?h.jsxs(rs,{children:[h.jsx(Ot,{})," ",Ea()]}):_&&h.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[h.jsx("dt",{className:"font-medium text-subtext",children:t_()}),h.jsx("dd",{className:"m-0",children:h.jsx(Pt,{variant:_.validationStatus==="valid"?"success":_.validationStatus==="invalid"?"error":"warning",children:_.validationStatus==="valid"?Up():_.validationStatus==="invalid"?rJe():_.validationStatus==="billingRequired"?QZe():Qv()})})]}),(_==null?void 0:_.validationStatus)==="billingRequired"&&h.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:h.jsx("a",{className:"underline",href:"https://tinker.thinkingmachines.ai/",target:"_blank",rel:"noreferrer",children:GZe()})}),(_==null?void 0:_.processEnv)&&h.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:JZe()}),h.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:v,children:[h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||_!==null&&_.validationStatus!=="missing"?PXe():F3(),h.jsx(zs,{type:"password",value:t,placeholder:(_==null?void 0:_.maskedKey)??"",onChange:w=>r(w.target.value),autoComplete:"new-password"})]}),f&&h.jsx("p",{className:"m-0 text-sm text-accent-red",children:f}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsxs(Oe,{type:"button",disabled:s||S,onClick:()=>void b(),children:[h.jsx(ro,{size:13})," ",S?Ea():Hp()]}),h.jsx(Oe,{variant:"primary",type:"submit",disabled:!t.trim()||s||S,children:s?YD():Po()})]})]})]})}function b5t({settings:e}){return e.validationStatus==="missing"?h.jsx(Pt,{variant:"warning",children:Qv()}):e.validationStatus==="invalid"?h.jsx(Pt,{variant:"error",children:EUe()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?h.jsx(Pt,{variant:"success",children:Up()}):e.jobsWrite===!1?h.jsxs("span",{className:"inline-flex items-center gap-2",children:[h.jsx(Pt,{variant:"warning",children:hWe()}),h.jsx(i6,{content:wBe(),className:"text-subtext",children:h.jsx(g6,{size:15})})]}):null}function y5t(){var b;const e=Cn({mutationFn:Clt}),n=bN(),t=ht(n),r=t.data??null,s=v=>{Wr(n.queryKey,y=>(typeof v=="function"?v(y??null):v)??void 0)},i=r?null:((b=t.error)==null?void 0:b.message)??null,[o,a]=M.useState(""),[l,u]=M.useState(!1),[_,f]=M.useState(!1),[p,m]=M.useState(null);async function x(){if(!(l||_||!r&&!i)){f(!0),m(null);try{await Je.fetchQuery({...bN(),staleTime:0})}catch(v){m(v instanceof Error?v.message:String(v))}finally{f(!1)}}}async function S(v){if(v.preventDefault(),!(!o.trim()||l||_||!r&&!i)){u(!0),m(null);try{const y=await e.mutateAsync(o.trim());s(y),m(null),a("")}catch(y){m(y instanceof Error?y.message:String(y))}finally{u(!1)}}}return h.jsxs(h.Fragment,{children:[i?h.jsx("div",{className:"error",children:i}):r?h.jsxs(h.Fragment,{children:[h.jsxs("dl",{className:"m-0 flex flex-col gap-3 text-sm",children:[r.username&&h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsx("dt",{className:"font-medium text-subtext",children:U3()}),h.jsx("dd",{className:"m-0 text-text",children:r.username})]}),(r.validationStatus==="missing"||r.validationStatus==="invalid"||r.validationStatus==="valid"&&r.jobsWrite!==null)&&h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsx("dt",{className:"font-medium text-subtext",children:t_()}),h.jsx("dd",{className:"m-0 text-text",children:h.jsx(b5t,{settings:r})})]})]}),r.validationStatus==="unreachable"&&r.validationError&&h.jsx("p",{className:Tb,children:r.validationError}),r.source==="env"&&h.jsx("p",{className:wa,children:eUe()}),r.validationStatus==="valid"&&r.jobsWrite===null&&h.jsx("p",{className:wa,children:vBe({login:ze("hf auth login"),url:ze("huggingface.co/settings/tokens")})})]}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",JUe()]}),h.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:S,children:[h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.configured?UXe():uPe(),h.jsx(zs,{type:"password",value:o,onChange:v=>a(v.target.value),placeholder:(r==null?void 0:r.maskedToken)??Yqe(),autoComplete:"off"})]}),p&&h.jsx("div",{className:"error",children:p}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsxs(Oe,{type:"button",disabled:l||_||!r&&!i,onClick:()=>void x(),children:[h.jsx(ro,{size:13})," ",_?Ea():Hp()]}),h.jsx(Oe,{variant:"primary",type:"submit",disabled:!o.trim()||l||_||!r&&!i,children:l?YD():Po()})]})]})]})}const L$=/^hf_[A-Za-z0-9]{10,}$/;function O$(){return h.jsx("tr",{children:h.jsx("td",{colSpan:3,children:h.jsxs("p",{dir:"auto",className:wa,children:[dYe()," ",h.jsx("code",{children:"HF_TOKEN"}),XKe()]})})})}const pj=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function z5(e,n){const t=n instanceof Error?n.message:String(n);ir(t.includes(e)?t:`${e}: ${t}`,"error")}function x5t({name:e,entry:n,onVars:t}){const r=Cn({mutationFn:f=>cL(...f)}),s=Cn({mutationFn:Blt}),[i,o]=M.useState(""),[a,l]=M.useState(!1);async function u(){if(!(!i.trim()||a)){l(!0);try{t(await r.mutateAsync([e,i.trim()])),o("")}catch(f){z5(e,f)}finally{l(!1)}}}async function _(){if(!a){l(!0);try{t(await s.mutateAsync(e))}catch(f){z5(e,f)}finally{l(!1)}}}return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{className:"font-mono text-sm",children:e}),h.jsx("td",{className:"text-base text-subtext",children:n?h.jsxs(h.Fragment,{children:[n.maskedValue,n.inProcessEnv&&h.jsx(Pt,{children:FVe()})]}):h.jsx(zs,{variant:"inline",className:"text-base",type:"password",value:i,onChange:f=>o(f.target.value),onKeyDown:f=>{f.key==="Enter"&&(f.preventDefault(),u()),f.key==="Escape"&&!a&&o("")},placeholder:GD(),"aria-label":VQ({name:ze(e)}),autoComplete:"new-password",disabled:a})}),h.jsx("td",{children:n?h.jsx(tn,{className:"[&:hover:not(:disabled)]:text-accent-red",title:_4({name:ze(e)}),"aria-label":_4({name:ze(e)}),onClick:()=>void _(),disabled:a,children:h.jsx(s_,{size:13})}):i.trim()&&h.jsx(Oe,{size:"small",onClick:()=>void u(),disabled:a,children:a?Yi():Po()})})]}),!n&&e!=="HF_TOKEN"&&L$.test(i.trim())&&h.jsx(O$,{})]})}function w5t({onVars:e,onDone:n}){const t=Cn({mutationFn:f=>cL(...f)}),[r,s]=M.useState(""),[i,o]=M.useState(""),[a,l]=M.useState(!1);async function u(){if(!(!r.trim()||!i.trim()||a)){l(!0);try{e(await t.mutateAsync([r.trim(),i.trim()])),n()}catch(f){z5(r.trim(),f)}finally{l(!1)}}}const _=f=>{f.key==="Enter"&&(f.preventDefault(),u()),f.key==="Escape"&&!a&&n()};return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{children:h.jsx(zs,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:f=>s(f.target.value),onKeyDown:_,placeholder:"MY_API_KEY","aria-label":VGe(),autoComplete:"off",spellCheck:!1,disabled:a})}),h.jsx("td",{children:h.jsx(zs,{variant:"inline",className:"text-base",type:"password",value:i,onChange:f=>o(f.target.value),onKeyDown:_,placeholder:GD(),"aria-label":XGe(),autoComplete:"new-password",disabled:a})}),h.jsxs("td",{children:[h.jsx(Oe,{size:"small",onClick:()=>void u(),disabled:a||!r.trim()||!i.trim(),children:a?Yi():Po()}),h.jsx(tn,{title:qp(),"aria-label":FFe(),onClick:n,disabled:a,children:h.jsx(es,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&L$.test(i.trim())&&h.jsx(O$,{})]})}function S5t(){var u;const e=tut(),n=ht(e),t=n.data??null,r=_=>{Wr(e.queryKey,f=>(typeof _=="function"?_(f??null):_)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,o]=M.useState(!1),a=t===null?[]:t.map(_=>_.key).filter(_=>!pj.includes(_)),l=[...pj,...a];return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[h.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:FYe()}),h.jsxs(Oe,{size:"small",className:"shrink-0",onClick:()=>o(!0),disabled:i||t===null,children:[h.jsx(y6,{size:12})," ",sFe()]})]}),h.jsx("div",{className:Io,children:s?h.jsx("div",{className:"error",children:s}):t===null?h.jsxs(rs,{children:[h.jsx(Ot,{})," ",vu()]}):h.jsx("table",{className:"env-table w-full table-fixed border-collapse text-base [&_td:first-child]:w-[32%] [&_td:first-child]:wrap-anywhere [&_.badge]:ms-2 [&_td]:h-12 [&_td]:pt-0 [&_td]:pe-2.5 [&_td]:pb-0 [&_td]:ps-0 [&_td]:align-middle [&_td]:border-b [&_td]:border-b-border-variant [&_td:last-child]:w-29 [&_td:last-child]:whitespace-nowrap [&_td:last-child]:text-end [&_td[colspan]]:whitespace-normal [&_td[colspan]]:text-start [&_.icon-btn]:ms-2 [&_.icon-btn]:align-middle",children:h.jsxs("tbody",{children:[l.map(_=>h.jsx(x5t,{name:_,entry:t.find(f=>f.key===_),onVars:r},_)),i&&h.jsx(w5t,{onVars:r,onDone:()=>o(!1)})]})})})]})}const f0=[{value:"system",label:FZe,icon:y_t},{value:"light",label:IZe,icon:U_t},{value:"dark",label:jZe,icon:w_t}],k5t=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"}];function C5t(){const e=Kf(),[n,t]=TL(),r=s=>{var _;const i=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!i)return;s.preventDefault();const o=[...s.currentTarget.querySelectorAll('[role="radio"]')],a=o.findIndex(f=>f===document.activeElement),u=((a===-1?f0.findIndex(f=>f.value===n):a)+i+f0.length)%f0.length;t(f0[u].value),(_=o[u])==null||_.focus()};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:yOe()}),h.jsxs("div",{className:`${Io} mt-3`,children:[h.jsxs("div",{className:`${$l} pb-3.5`,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:mN()}),h.jsx("div",{className:"theme-segmented inline-flex flex-none gap-0.5 p-0.5 border border-border rounded-md bg-surface",role:"radiogroup","aria-label":mN(),onKeyDown:r,children:f0.map(({value:s,label:i,icon:o})=>h.jsxs("button",{type:"button",role:"radio","aria-checked":n===s,tabIndex:n===s?0:-1,className:`theme-segment inline-flex items-center gap-1.5 py-[5px] px-2.5 rounded-sm text-subtext text-sm cursor-pointer transition-[background,color] duration-120 ease-standard [&:hover:not(.on)]:text-text [&:hover:not(.on)]:bg-highlight [&.on]:text-background [&.on]:bg-primary [&:focus-visible]:outline-2 [&:focus-visible]:outline-solid [&:focus-visible]:outline-text [&:focus-visible]:outline-offset-2 ${n===s?"on":""}`,onClick:()=>t(s),children:[h.jsx(o,{size:14}),i()]},s))})]}),h.jsxs("div",{className:$l,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:l$e()}),h.jsx("div",{className:"w-52 flex-none",children:h.jsx(np,{choices:k5t,value:e,variant:"field",dropDown:!0,onSelect:s=>{GM(s)&&EL(s)}})})]})]})]})}const E5t={installer:jat,"app-bundle":vat,cargo:wat,homebrew:Eat,nix:Dat,unknown:Bat},pw={cargo:Hat,homebrew:Wat,nix:Yat};function N5t(){var f;const e=Cn({mutationFn:p=>Alt(...p)}),{status:n,error:t,apply:r}=C6(),[s,i]=M.useState(null),[o,a]=M.useState(null),l=zO(n),u=s!==null||l.restarting;if(!n)return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:dN()}),t?h.jsx("div",{className:Io,children:h.jsx("div",{className:"error",children:t})}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",vu()]})]});const _=async(p,m)=>{i(p),a(null);try{await m()}catch(x){a(x instanceof Error?x.message:String(x))}finally{i(null)}};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:dN()}),h.jsxs("div",{className:`${Io} mt-3`,children:[h.jsxs("div",{className:`${If} pb-3.5`,children:[h.jsx("div",{className:"k",children:WD()}),h.jsx("div",{className:"v",children:n.current}),h.jsx("div",{className:"k",children:BUe()}),h.jsx("div",{className:"v",children:n.latest??"—"}),h.jsx("div",{className:"k",children:$D()}),h.jsx("div",{className:"v",children:E5t[n.channel]()})]}),n.restartRequired&&h.jsxs("div",{className:$l,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:$Ke()}),h.jsx("p",{children:l.error?nL({error:l.error}):ZXe({installed:ze(n.installedVersion??"—"),current:ze(n.current??n.installedVersion??"—")})})]}),n.canRestart&&h.jsx(Oe,{size:"small",type:"button",disabled:u,onClick:l.restart,children:l.restarting?rL():tL()})]}),n.selfUpdates?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:$l,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:cN()}),h.jsxs("p",{children:[qGe(),n.envDisabled&&bJe()]})]}),h.jsx(s6,{type:"button",checked:n.autoUpdate,"aria-label":cN(),disabled:u,onClick:()=>void _("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),h.jsxs("div",{className:$l,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?pJe({version:ze(n.latest??"—")}):AOe()}),h.jsx("p",{children:n.updateAvailable?HBe():qOe()})]}),h.jsx(Oe,{size:"small",type:"button",disabled:u,onClick:()=>void _("apply",()=>Tlt().then(r)),children:s==="apply"?P3():n.updateAvailable?fJe():LOe()})]})]}):h.jsx("div",{className:$l,children:h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:jVe()}),h.jsx("p",{children:((f=pw[n.channel])==null?void 0:f.call(pw))??gXe()})]})}),n.channel==="app-bundle"&&h.jsx(T5t,{busy:s,disabled:u,run:_}),o&&h.jsx("div",{className:"error",children:o})]})]})}function z5t(){var f;const e=Cn({mutationFn:Sct}),n=cut(),t=ht(n),r=t.data??null,s=p=>{Wr(n.queryKey,m=>(typeof p=="function"?p(m??null):p)??void 0)},[i,o]=M.useState(!1),[a,l]=M.useState(null),u=a??((f=t.error)==null?void 0:f.message)??null,_=()=>{!r||i||(o(!0),l(null),e.mutateAsync(!r.preferenceEnabled).then(s).catch(p=>l(p instanceof Error?p.message:String(p))).finally(()=>o(!1)))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:DYe()}),r?h.jsxs("div",{className:`${Io} mt-3`,children:[h.jsxs("div",{className:$l,children:[h.jsxs("div",{children:[h.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[iN(),r.locked&&r.reason&&h.jsx(i6,{content:`${OHe()} ${r.reason}.`,className:"text-subtext",children:h.jsx(g6,{size:15})})]}),h.jsx("p",{children:tWe()})]}),h.jsx(s6,{type:"button",checked:r.enabled,"aria-label":iN(),disabled:i||r.locked,onClick:_})]}),u&&h.jsx("div",{className:"error",children:u})]}):u?h.jsx("div",{className:"error",children:u}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",vu()]})]})}function T5t({busy:e,disabled:n,run:t}){const r=Cn({mutationFn:Rlt}),[s,i]=M.useState(null),[o,a]=M.useState(!1),l=u=>void t("cli",()=>r.mutateAsync(u).then(_=>{i(_),a(!1)}).catch(_=>{throw a(!u&&String((_==null?void 0:_.message)??_).includes("--force")),_}));return h.jsxs("div",{className:$l,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:DBe({command:ze("orx")})}),s?h.jsxs("p",{children:[s.alreadyCurrent?iIe({link:ze(s.link)}):cIe({link:ze(s.link)}),!s.onPath&&mOe({directory:ze(s.dir)})]}):h.jsx("p",{children:jBe({command:ze("orx")})})]}),h.jsx(Oe,{size:"small",type:"button",disabled:n,onClick:()=>l(o),children:e==="cli"?P3():o?OXe():s?xXe():EBe()})]})}function j5t(){var p;const e=Cn({mutationFn:m=>_L(...m)}),n=X3(),t=ht(n),r=t.data??null,s=m=>{Wr(n.queryKey,x=>(typeof m=="function"?m(x??null):m)??void 0)},[i,o]=M.useState(!1),[a,l]=M.useState(null),u=a??((p=t.error)==null?void 0:p.message)??null,_=async()=>{await t.refetch({cancelRefetch:!1})},f=()=>{if(!r||i)return;const m=!r.githubForNewProjects;o(!0),l(null),e.mutateAsync([m,!0]).then(s).catch(x=>l(x instanceof Error?x.message:String(x))).finally(()=>o(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:Dqe()}),r?h.jsxs("div",{className:`${Io} mt-3 project-defaults-card [&_.settings-card-head]:justify-between [&_.settings-card-head]:mb-0 [&_.settings-card-head]:pb-3 [&_.settings-card-head_h3]:m-0`,children:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx("h3",{children:Bqe()}),h.jsx(Pt,{variant:r.githubAuthenticated?"success":r.ghInstalled?"warning":"error",children:r.githubAuthenticated?jD():DD()})]}),h.jsxs("div",{className:$l,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:lN()}),h.jsx("p",{children:KYe()})]}),h.jsx(s6,{type:"button",checked:r.githubForNewProjects,"aria-label":lN(),disabled:i||!r.githubAuthenticated&&!r.githubForNewProjects,onClick:f})]}),!r.githubAuthenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(I$,{ghInstalled:r.ghInstalled,onCheck:_})}),u&&h.jsx("div",{className:"error",children:u})]}):u?h.jsx("div",{className:"error",children:u}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",vu()]})]})}function I$({ghInstalled:e,onCheck:n}){const[t,r]=M.useState(!1),s=()=>{r(!0),n().finally(()=>r(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper m-0 text-sm leading-relaxed text-text",children:Qp(e?nZe():BBe())}),h.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&h.jsxs(Q0,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[pUe()," ",h.jsx(Lf,{size:12})]}),h.jsx(Oe,{type:"button",variant:e?"warning":"default",disabled:t,onClick:s,children:t?Ea():Hp()})]})]})}function A5t(){var m,x,S;const e=Cn({mutationFn:flt}),n=Cn({mutationFn:dlt}),t=U0t(),r=ht(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((x=r.data)==null?void 0:x.hasSession)??null,o=b=>Wr(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...b}),a=b=>o({hasToken:b}),[l,u]=M.useState(!1),[_,f]=M.useState(null),p=_??((S=r.error)==null?void 0:S.message);return h.jsxs("div",{className:E5,children:[h.jsx("h3",{children:HD()}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:Hqe()}),h.jsx("span",{className:"v",children:h.jsx(Pt,{variant:s?"success":"default",children:s===null?p?Ol():Ea():s?_N():sN()})})]}),h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:ZYe()}),s?h.jsx("div",{className:I0,children:h.jsx(Oe,{disabled:l,onClick:()=>{u(!0),f(null),e.mutateAsync().then(b=>a(b.hasToken)).catch(b=>f(b instanceof Error?b.message:String(b))).finally(()=>u(!1))},children:l?hN():TXe()})}):h.jsx(fj,{save:oL,onSaved:b=>a(b.hasToken),placeholder:IVe(),createHref:"https://www.overleaf.com/user/settings"}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:tQe()}),h.jsx("span",{className:"v",children:h.jsx(Pt,{variant:i?"success":"default",children:i===null?p?Ol():Ea():i?_N():sN()})})]}),h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:iQe()}),i?h.jsx("div",{className:I0,children:h.jsx(Oe,{disabled:l,onClick:()=>{u(!0),f(null),n.mutateAsync().then(b=>o({hasSession:b.hasSession})).catch(b=>f(b instanceof Error?b.message:String(b))).finally(()=>u(!1))},children:l?hN():CXe()})}):h.jsx(fj,{save:b=>lL(b),onSaved:b=>o({hasSession:b.hasSession}),placeholder:g4(),createHref:"https://www.overleaf.com/project",createLabel:LEe()}),p&&h.jsx("div",{className:"error",children:p})]})}function R5t({project:e,onProjectUpdate:n}){var j;const t=Cn({mutationFn:z=>_L(...z)}),r={...lut((e==null?void 0:e.id)??""),enabled:!!e},s=ht(r),i=s.data??null,o=z=>{Wr(r.queryKey,R=>(typeof z=="function"?z(R??null):z)??void 0)},[a,l]=M.useState(!1),[u,_]=M.useState(null),f=u??((j=s.error)==null?void 0:j.message)??null,[p,m]=M.useState(!1),[x,S]=M.useState(!1),[b,v]=M.useState(null),y=!!(i!=null&&i.github.owner&&i.github.repo),w=async()=>{await s.refetch({cancelRefetch:!1})},C=z=>{const R=z instanceof Error?z.message:String(z);return R.toLowerCase().includes("archived")?ZIe():R.includes("(fetch first)")||R.includes("non-fast-forward")?nBe():R.includes("403")||R.toLowerCase().includes("permission denied")?aBe():R},N=()=>{e&&(l(!0),_(null),yct(e.id).then(z=>{o(z.git),n(z.project),Je.fetchQuery(X3()).then(R=>{!R.githubForNewProjects&&!R.githubDefaultPromptSeen&&m(!0)}).catch(()=>{})}).catch(z=>_(C(z))).finally(()=>l(!1)))},E=z=>{S(!0),v(null),t.mutateAsync([z,!0]).then(()=>m(!1)).catch(R=>v(R instanceof Error?R.message:String(R))).finally(()=>S(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:LKe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:KXe({project:(e==null?void 0:e.name)??jIe()})}),e?f&&!i?h.jsx("div",{className:"error",children:f}):i?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:E5,children:[h.jsx("h3",{children:oGe()}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:QVe()}),h.jsx("span",{className:"v",children:i.path}),h.jsx("span",{className:"k",children:"Git"}),h.jsx("span",{className:"v",children:i.gitVersion??vD()}),h.jsx("span",{className:"k",children:NQe()}),h.jsx("span",{className:"v",children:i.initialized?KIe({branch:ze(i.currentBranch??RD()),state:i.clean?tIe():_Be()}):RPe()}),h.jsx("span",{className:"k",children:jFe()}),h.jsx("span",{className:"v",children:i.baselineBranch}),h.jsx("span",{className:"k",children:AKe()}),h.jsx("span",{className:"v",children:i.remotes.length?i.remotes.map(z=>`${z.name}: ${z.url}`).join(" · "):q3()})]}),!i.initialized&&h.jsx("div",{className:I0,children:h.jsx(Oe,{variant:"primary",onClick:()=>void bct(e.id).then(o).catch(z=>_(String(z))),children:sUe()})})]}),h.jsxs("div",{className:E5,children:[h.jsx("h3",{children:"GitHub"}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:bFe()}),h.jsx("span",{className:"v",children:h.jsx(Pt,{variant:i.github.authenticated?"success":i.github.ghInstalled?"warning":"error",children:i.github.authenticated?jD():DD()})}),h.jsx("span",{className:"k",children:rKe()}),h.jsx("span",{className:"v",children:y?h.jsxs(h.Fragment,{children:[h.jsxs("span",{children:[i.github.owner,"/",i.github.repo]}),!i.github.enabled&&h.jsx(Pt,{children:HQe()})]}):h.jsx(Pt,{children:rGe()})}),i.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:BQe()}),h.jsx("span",{className:"v",children:i.github.syncStatus})]})]}),!i.github.authenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(I$,{ghInstalled:i.github.ghInstalled,onCheck:()=>w()})}),i.github.authenticated&&!i.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:y?NJe():EIe()}),h.jsxs("div",{className:I0,children:[y&&i.github.url&&h.jsxs(Q0,{href:i.github.url,target:"_blank",rel:"noreferrer",children:[fN()," ",h.jsx(Lf,{size:12})]}),h.jsx(Oe,{variant:"primary",disabled:a,onClick:N,children:a?bLe():pLe()})]})]}),i.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:gqe()}),h.jsxs("div",{className:I0,children:[i.github.url&&h.jsxs(Q0,{href:i.github.url,target:"_blank",rel:"noreferrer",children:[fN()," ",h.jsx(Lf,{size:12})]}),h.jsx(Oe,{disabled:a,onClick:()=>{l(!0),xct(e.id).then(z=>{o(z.git),n(z.project)}).catch(z=>_(z instanceof Error?z.message:String(z))).finally(()=>l(!1))},children:a?SLe():fLe()})]})]})]}),h.jsx(A5t,{}),f&&h.jsx("div",{className:"error",children:C(f)})]}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",vu()]}):h.jsx("div",{className:Io,children:h.jsx("p",{className:wa,children:lVe()})}),p&&h.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop-light flex items-start justify-center pt-[var(--modal-top)] px-4 pb-6 overflow-y-auto z-100",onClick:()=>E(!1),children:h.jsxs("div",{className:"modal max-w-[94vw] max-h-[calc(100vh_-_var(--modal-top)_-_48px)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl github-default-modal w-110 [&_>_p]:m-0 [&_>_p]:text-sm [&_>_p]:leading-relaxed [&_>_p]:text-text [&_>_.error]:mt-3.5",role:"dialog","aria-modal":"true","aria-labelledby":"github-default-title",onClick:z=>z.stopPropagation(),children:[h.jsx("h2",{id:"github-default-title",children:pGe()}),h.jsx("p",{children:sYe()}),b&&h.jsx("div",{className:"error",children:b}),h.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[h.jsx(Oe,{disabled:x,onClick:()=>E(!1),children:qWe()}),h.jsx(Oe,{variant:"primary",disabled:x,onClick:()=>E(!0),children:x?Yi():m$e()})]})]})})]})}const M5t={env:Crt,config:Trt,xdg:Mrt,default:xrt},mw={preparing:hrt,copying:qnt,verifying:Irt,finalizing:Vnt},D5t=e=>{var n;return((n=mw[e])==null?void 0:n.call(mw))??e};function L5t(){var w;const e=nut(),n=ht(e),t=n.data??null,r=t?null:((w=n.error)==null?void 0:w.message)??null,[s,i]=M.useState(""),[o,a]=M.useState(!1),[l,u]=M.useState(null),[_,f]=M.useState({kind:"idle"}),[p,m]=M.useState(null);M.useEffect(()=>{t&&i(C=>C||t.current)},[t]),M.useEffect(()=>kL(C=>{C.type==="progress"?f(N=>{const E=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||E}}):C.type==="done"?(f({kind:"done",oldPathLeft:C.oldPathLeft}),u(null),i("")):C.type==="error"&&f({kind:"error",message:C.error})}),[]);const x=(t==null?void 0:t.source)==="env",S=s.trim(),b=t!==null&&S===t.current;async function v(){if(!(o||!S)){a(!0),m(null),u(null);try{u(await Plt(S))}catch(C){m(C instanceof Error?C.message:String(C))}finally{a(!1)}}}async function y(C){if(C.preventDefault(),!(_.kind==="moving"||!S||b)&&(m(null),!!window.confirm(trt({path:ze(S)})))){f({kind:"moving",phase:"preparing",copied:0,total:(l==null?void 0:l.treeBytes)??0});try{await Flt(S)}catch(N){f({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:DQe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:SZe()}),r?h.jsx("div",{className:Io,children:h.jsx("div",{className:"error",children:r})}):t?h.jsxs("div",{className:Io,children:[h.jsx("div",{className:"settings-card-head mb-3",children:h.jsx("h3",{children:KHe()})}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:RHe()}),h.jsx("span",{className:"v",children:t.current}),h.jsx("span",{className:"k",children:UD()}),h.jsx("span",{className:"v",children:M5t[t.source]()})]}),!x&&h.jsxs("form",{className:qS,onSubmit:y,children:[h.jsxs("label",{children:[$Ge(),h.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{i(C.target.value),u(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:_.kind==="moving"})]}),l&&!l.error&&l.ok&&h.jsxs("p",{className:wa,children:[xKe()," ",Il(l.treeBytes??0),l.freeBytes!=null&&` — ${Xnt({size:ze(Il(l.freeBytes))})}`,l.sameFilesystem?grt():"","."]}),l&&l.ok===!1&&l.error&&h.jsx("div",{className:"error",children:l.error}),p&&h.jsx("div",{className:"error",children:p}),_.kind==="moving"&&h.jsx(k$,{value:_.copied,max:_.total,label:D5t(_.phase),caption:_.total>0?h.jsxs("span",{className:"text-sm",children:[Il(_.copied)," / ",Il(_.total)]}):void 0}),_.kind==="done"&&h.jsxs("p",{className:wa,children:[AGe(),_.oldPathLeft&&h.jsxs(h.Fragment,{children:[" ",qPe({path:ze(_.oldPathLeft)})]})]}),_.kind==="error"&&h.jsxs("div",{className:"error",children:[NGe()," ",_.message]}),h.jsxs("div",{className:"actions",children:[h.jsx(Oe,{type:"button",onClick:v,disabled:o||!S||b||_.kind==="moving",children:o?Ea():kOe()}),h.jsx(Oe,{variant:"primary",type:"submit",disabled:!S||b||_.kind==="moving",children:_.kind==="moving"?crt():irt()})]})]})]}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",vu()]})]})}const T5=e=>e==="running"||e==="starting";function O5t(e){return T5(e.status)?J1(Date.now()-e.createdAt):e.endedAt?J1(e.endedAt-e.createdAt):"—"}function B$({instances:e,emptyLabel:n}){return e.length===0?h.jsx("p",{className:"instances-empty m-0 rounded-lg border border-border bg-background py-3.5 px-4 text-base text-subtext",children:n}):h.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:h.jsxs("table",{className:"runs-table w-full border-collapse bg-background text-base [&_th]:text-start [&_th]:text-text [&_th]:text-sm [&_th]:font-medium [&_th]:py-2 [&_th]:px-3 [&_th]:border-b [&_th]:border-b-border [&_th]:sticky [&_th]:top-0 [&_th]:bg-background [&_th]:z-1 [&_td]:py-2 [&_td]:px-3 [&_td]:border-b [&_td]:border-b-divider-faint [&_td]:whitespace-nowrap [&_tr:last-child_td]:border-b-0 [&_tr.clickable]:cursor-pointer [&_tr.clickable:hover_td]:bg-canvas",children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:EFe()}),h.jsx("th",{children:t_()}),h.jsx("th",{children:SQe()}),h.jsx("th",{children:VKe()})]})}),h.jsx("tbody",{children:e.map(t=>{var s;const r=typeof((s=t.backend)==null?void 0:s.url)=="string"?t.backend.url:void 0;return h.jsxs("tr",{children:[h.jsx("td",{children:h.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[h.jsx(k6,{backend:t.backend}),r&&h.jsx(Zv,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:uN(),"aria-label":uN(),onClick:i=>i.stopPropagation(),children:h.jsx(Lf,{size:12})})]})}),h.jsx("td",{children:h.jsx(Ul,{status:Sa(t)})}),h.jsx("td",{children:Lo(t.createdAt)}),h.jsx("td",{children:O5t(t)})]},t.id)})})]})})}function I5t({projectId:e,onViewHistory:n}){var f;const t=ht({...ru(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(f=t.error)==null?void 0:f.message,i=t.isFetching,[,o]=M.useState(0);M.useEffect(()=>{const p=setInterval(()=>o(m=>m+1),3e4);return()=>clearInterval(p)},[]);const a=()=>{e&&t.refetch()},l=(p,m)=>m.createdAt-p.createdAt,u=r==null?void 0:r.filter(p=>T5(p.status)).sort(l),_=r==null?void 0:r.filter(p=>!T5(p.status)).sort(l);return h.jsxs("section",{className:"compute-activity [&_.count-badge]:inline-flex [&_.count-badge]:items-center [&_.count-badge]:justify-center [&_.count-badge]:min-w-4.5 [&_.count-badge]:h-4.5 [&_.count-badge]:py-0 [&_.count-badge]:px-[5px] [&_.count-badge]:rounded-md [&_.count-badge]:bg-canvas [&_.count-badge]:border [&_.count-badge]:border-border [&_.count-badge]:text-xs [&_.count-badge]:font-medium [&_.count-badge]:text-text mt-5.5 mx-0 mb-8",children:[h.jsxs("div",{className:"compute-activity-head flex items-start justify-between gap-5 mb-3.5 [&_h2]:flex [&_h2]:items-center [&_h2]:gap-2 [&_h2]:m-0 [&_h2]:text-lg [@media((max-width:_640px))]:items-stretch [@media((max-width:_640px))]:flex-col",children:[h.jsx("div",{children:h.jsxs("h2",{children:[qKe(),u&&u.length>0&&h.jsx("span",{className:"count-badge",children:u.length})]})}),h.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[h.jsxs(Oe,{size:"small",onClick:a,disabled:i,children:[h.jsx(ro,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Gp()]}),h.jsx(Oe,{size:"small",onClick:n,children:_!=null&&_.length?R4e({count:nn(_.length)}):z4e()})]})]}),s&&h.jsx("div",{className:"error",children:s}),!u||!_?h.jsxs(rs,{children:[h.jsx(Ot,{})," ",vu()]}):h.jsx(B$,{instances:u,emptyLabel:e?m4e():k4e()})]})}function B5t({projectId:e,onBack:n}){var l;const t=ht({...ru(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(l=t.error)==null?void 0:l.message,i=t.isFetching,[,o]=M.useState(0);M.useEffect(()=>{const u=setInterval(()=>o(_=>_+1),3e4);return()=>clearInterval(u)},[]);const a=()=>{e&&t.refetch()};return h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",className:"settings-back inline-flex items-center gap-1.5 mt-0 mx-0 mb-4.5 text-subtext text-sm font-medium [&:hover]:text-text",onClick:n,children:[h.jsx(Z0,{size:14})," ",LD()]}),h.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[h.jsx("h1",{children:wUe()}),h.jsxs(Oe,{size:"small",onClick:a,disabled:i,children:[h.jsx(ro,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Gp()]})]}),s&&h.jsx("div",{className:"error",children:s}),r?h.jsx(B$,{instances:[...r].sort((u,_)=>_.createdAt-u.createdAt),emptyLabel:e?d4e():y4e()}):h.jsxs(rs,{children:[h.jsx(Ot,{})," ",vu()]})]})}const $$=["projects","harnesses","storage"],$5t=[{id:"compute",label:OD,icon:h.jsx(Bht,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:BD,icon:h.jsx(r_,{size:15}),activeTabs:["environment"]},{id:"settings",label:V3,icon:h.jsx(xO,{size:15}),activeTabs:["settings",...$$]}];function P5t(e){return $$.includes(e)}function F5t({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||P5t(e),o=M.useRef(null);return M.useLayoutEffect(()=>{const a=o.current,l=a==null?void 0:a.parentElement;if(!a||!l)return;const u=()=>a.scrollIntoView({block:"start"}),_=new ResizeObserver(u);_.observe(l),u();const f=()=>_.disconnect(),p=["wheel","touchstart","pointerdown","keydown"];for(const m of p)window.addEventListener(m,f,{passive:!0});return()=>{f();for(const m of p)window.removeEventListener(m,f)}},[e,n==null?void 0:n.id]),h.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl [&_>_.error]:text-accent-red [&_>_.error]:text-base [&_>_.error]:whitespace-pre-wrap [&_>_.error]:mt-0 [&_>_.error]:mx-0 [&_>_.error]:mb-3",children:[i&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:V3()}),h.jsxs("div",{className:"settings-stack mt-4.5",children:[h.jsx("section",{className:Hd,children:h.jsx(C5t,{})}),h.jsx("section",{ref:e==="projects"?o:void 0,className:Hd,children:h.jsx(j5t,{})}),h.jsx("section",{ref:e==="harnesses"?o:void 0,className:Hd,children:h.jsx(Z4t,{})}),!s&&h.jsx("section",{ref:e==="storage"?o:void 0,className:Hd,children:h.jsx(L5t,{})}),h.jsx("section",{className:Hd,children:h.jsx(z5t,{})}),!s&&h.jsx("section",{className:Hd,children:h.jsx(N5t,{})})]})]}),e==="compute"&&h.jsx(g5t,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&h.jsx(B5t,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:BD()}),h.jsx(S5t,{})]}),e==="git"&&h.jsx(R5t,{project:n,onProjectUpdate:t})]})}function H5t({skills:e,activeIndex:n,onPick:t,onHover:r}){return h.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 min-w-85 max-w-full p-1.5 bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden",children:e.map((s,i)=>h.jsxs("button",{type:"button",className:`skill-item flex flex-col gap-0.5 w-full text-start py-[7px] px-2 rounded-sm [&.active]:bg-surface [&_.skill-name]:text-sm [&_.skill-desc]:text-sm [&_.skill-desc]:text-subtext ${i===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(s)},onMouseEnter:()=>r(i),children:[h.jsxs("span",{className:"skill-name flex items-center gap-1.5",children:["/",s.name,s.source!=="command"&&h.jsx(Pt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:XD()})]}),h.jsx("span",{className:"skill-desc",children:s.description})]},s.name))})}const mj={name:"plan",get description(){return zze()},source:"command"};function gw(e,n){if(n<0||n>e.length)return null;let t=n;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="/")return null;let r=n;for(;r1&&/[ \t]$/.test(i)&&(i=i.replace(/[ \t]+$/,_=>_.includes(" ")||_.length>=r?_:s));let o=e.slice(n.end);if(!o)o=s;else if(!o.startsWith(` -`)){const _=(l=/^[ \t]+/.exec(o))==null?void 0:l[0];o=_?`${_.length>=r?_:s}${o.slice(_.length)}`:s+o}const a=((u=/^[ \t]+/.exec(o))==null?void 0:u[0].length)??0;return{text:`${i}/${t}${o}`,cursor:i.length+t.length+1+a}}function vj(e,n){let t=e.slice(0,n.start),r=e.slice(n.end);return t?r?/\s$/.test(t)&&/^\s/.test(r)&&(r=r.slice(1)):t=t.replace(/\s$/,""):r=r.replace(/^\s/,""),{text:t+r,cursor:t.length}}function U5t(e,n){const t=e.filter(r=>r.name.toLowerCase()!==mj.name);return n?[mj,...t]:t}function G5t(e,n){if(!n)return null;const t=/(^|\s)\/plan(?=\s|$)/gi;return t.test(e)?{prompt:e.replace(t,"").trim()}:null}function bj(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const W5t=["font-family","font-size","font-weight","font-style","font-variant","line-height","letter-spacing","word-spacing","text-transform","direction","unicode-bidi","tab-size","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width"];function P$(e,n,t,r,s,i=!1){let o=0;return q5t(e,n).map((a,l)=>{const u=o+a.text.length;o=u;const _=a.text.slice(1).toLowerCase();return a.command&&s?s(a.text,_,u,l):a.command?h.jsxs("span",{className:t,onMouseDown:void 0,children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),a.text.slice(1)]},l):i?h.jsx("span",{"aria-hidden":"true",children:a.text},l):h.jsx(M.Fragment,{children:a.text},l)})}function V5t({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:i}){const o=M.useRef(null),a=M.useRef(null),l=M.useRef(null),u=M.useId(),[_,f]=M.useState(!1),p=ht({...fut(n,s),enabled:_,subscribed:_}),m=p.data??null,x=p.isFetching,[S,b]=M.useState({}),v=()=>{l.current!==null&&window.clearTimeout(l.current),l.current=null},y=()=>{const N=o.current;if(!N)return;const E=N.getBoundingClientRect(),j=Math.min(420,window.innerWidth-32),z=Math.max(16,Math.min(E.left-4,window.innerWidth-j-16));b(E.top>300?{bottom:window.innerHeight-E.top+12,left:z,width:j}:{left:z,top:E.bottom+12,width:j})},w=()=>{v(),y(),f(!0)},C=()=>{v(),l.current=window.setTimeout(()=>f(!1),120)};return M.useEffect(()=>()=>v(),[]),M.useEffect(()=>{if(!_)return;const N=()=>y();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[_]),h.jsxs(M.Fragment,{children:[h.jsxs("span",{ref:o,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":_,"aria-label":fQ({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:w,onMouseLeave:C,onFocus:w,onBlur:C,onKeyDown:N=>{var E,j;if(N.key==="Escape"){f(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),w();return}_&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(E=a.current)==null||E.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),_&&(N.key==="ArrowUp"||N.key==="PageUp")&&(N.preventDefault(),(j=a.current)==null||j.scrollBy({top:N.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:N=>{var E,j;N.preventDefault(),(E=i.current)==null||E.focus(),(j=i.current)==null||j.setSelectionRange(t,t),v()},children:[h.jsx("span",{className:"pointer-events-none absolute -inset-[7px] z-0 rounded-md bg-skill-blue-subtle opacity-0 transition-opacity group-hover/skill:opacity-100"}),h.jsxs("span",{className:"relative z-1",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),e.slice(1)]})]}),_&&Fo.createPortal(h.jsxs("div",{id:u,ref:a,role:"dialog","aria-label":qQ({name:n}),style:{...S,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:v,onMouseLeave:C,onFocus:v,onBlur:C,onMouseDown:N=>N.stopPropagation(),children:[h.jsxs("div",{className:"sticky top-0 z-1 flex items-center gap-2 border-b border-border-variant bg-background px-4 py-3",children:[h.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),h.jsx(Pt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:XD()})]}),h.jsx("div",{className:"p-4 text-sm text-text",children:x&&m===null?h.jsx("span",{className:"text-muted",children:FJe()}):h.jsx(Oo,{text:m??r.description})})]}),document.body)]})}function K5t({text:e,isCommand:n}){return h.jsx(h.Fragment,{children:P$(e,n,"skill-chip mx-1 inline-flex items-center rounded-md px-2 py-1 font-medium text-skill-blue transition-colors hover:bg-skill-blue-subtle")})}function Q5t({text:e,isCommand:n,skills:t,projectId:r,textareaRef:s}){const i=M.useRef(null);return M.useLayoutEffect(()=>{const o=s.current,a=i.current;if(!o||!a)return;const l=()=>{const _=getComputedStyle(o);for(const f of W5t)a.style.setProperty(f,_.getPropertyValue(f));a.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};l();const u=new ResizeObserver(l);return u.observe(o),()=>u.disconnect()},[e,s]),M.useLayoutEffect(()=>{const o=s.current;if(!o)return;const a=()=>{i.current&&(i.current.scrollTop=o.scrollTop)};return a(),o.addEventListener("scroll",a),()=>o.removeEventListener("scroll",a)},[s,e]),h.jsxs("div",{ref:i,className:"composer-chips pointer-events-none absolute inset-y-0 start-0 z-2 box-border overflow-hidden whitespace-pre-wrap break-words border-solid border-transparent text-transparent select-none",children:[P$(e,n,"",void 0,(o,a,l,u)=>{const _=t.find(f=>f.name===a);return _&&_.source!=="command"?h.jsx(V5t,{label:o,name:a,end:l,skill:_,projectId:r,textareaRef:s},`${u}:${l}`):h.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${u}:${l}`)},!0),"​"]})}function Y5t(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const j5=6.5,yj=2*Math.PI*j5;function X5t({usage:e}){return!e||e.usedTokens<=0?null:h.jsx(Z5t,{usage:e})}function Z5t({usage:e}){const{open:n,setOpen:t,ref:r}=so(),{usedTokens:s,contextWindow:i}=e,o=i&&i>0?Math.min(100,Math.round(s/i*100)):null,a=o===null?"var(--accent)":Y5t(o),l=o===null?"":new Intl.NumberFormat(T(),{style:"percent"}).format(o/100);return h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[h.jsx("button",{type:"button",className:`${o===null?"inline-flex h-8 items-center rounded-md px-1 transition-[background,color] duration-150 ease-standard hover:bg-surface":"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-text transition-[background,color] duration-150 ease-standard hover:bg-surface"} composer-bare context-ring text-sm text-text`,title:Hme(),onClick:()=>t(u=>!u),children:o===null?Cg(s):h.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:j5,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),h.jsx("circle",{cx:"8",cy:"8",r:j5,fill:"none",stroke:a,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${yj*Math.max(o,2)/100} ${yj}`,transform:"rotate(-90 8 8)"})]})}),n&&h.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 align-right context-meter-menu w-70 pt-2.5 px-3 pb-3 [&_.progress]:mt-2 [&_.progress]:mx-0 [&_.progress]:mb-0 [&_.progress-track]:h-[5px] [&_.progress-track]:border-0 [&_.progress-track]:bg-border",children:[h.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[h.jsx("span",{children:Bme()}),h.jsx("span",{className:"context-meter-value text-text tabular-nums",children:o===null?Wme({value:ze(Cg(s))}):Yme({used:ze(Cg(s)),total:ze(Cg(i)),percent:ze(l)})})]}),o!==null&&h.jsx(k$,{value:s,max:i,fillColor:a})]})]})}const wv="!";function xj(e){return e.startsWith(wv)?e.slice(wv.length).trim():null}function J5t(e){return e.startsWith(wv)?e.slice(wv.length):e}function e3t(e){return e.replace(/([\\`*_[\]<>$~])/g,"\\$1").replace(/(^|\n)(\s*)(#{1,6}|>|[-+]|\d+\.)\s/g,"$1$2\\$3 ").replace(/(^|\n)(\s*)(=+|-{1,2})(?=\s*(?:\n|$))/g,"$1$2\\$3").replace(/(^|\n)(\s*)(-{3,})(?=\s*(?:\n|$))/g,"$1$2\\$3")}function t3t(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),s=>s[0].length)),t="`".repeat(n+1),r=/^[\s`]|[\s`]$/.test(e)?` ${e} `:e;return`${t}${r}${t}`}function n3t(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` - -${t} -${e.replace(/^\n|\n$/g,"")} -${t} - -`}function A5(e,n){return n?` - -\\[ -${e} -\\] - -`:`\\(${e}\\)`}function r3t(e,n){const t=n.trim().split(` -`),r=" ".repeat(e.length+1);return[`${e} ${t[0]??""}`,...t.slice(1).map(s=>s?`${r}${s}`:"")].join(` -`)}function s3t(e,n){if(e.length===0)return"";const t=Math.max(...e.map(o=>o.length)),r=o=>`| ${Array.from({length:t},(a,l)=>o[l]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),i=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...i.map(r)].join(` -`)}function i3t(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function a3t(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function o3t(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const F$="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",US="tool-output py-1.5 px-2.5 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere max-h-65 overflow-y-auto bg-background border border-border-variant rounded-sm",pu=256,H$=1024,q$=2e4,vw=8,Kg="chat-annotations";function ff(e){return e instanceof Element?e:e.parentElement}function wj(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function bw(e,n){return wj(e).compareBoundaryPoints(Range.START_TO_START,wj(n))<0}function Sj(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const l3t=new Set(["A","B","CODE","EM","I","STRONG"]);function c3t(e,n){var s,i;const t=ff(e.endContainer);if(Array.from(n.childNodes).every(o=>o.nodeType===Node.TEXT_NODE)){let o=ff(e.startContainer);for(;o&&o.matches(".md *")&&o.contains(t);){if(l3t.has(o.tagName)){const a=o.cloneNode(!1);a instanceof HTMLElement&&(a.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(a))}o=o.parentElement}}const r=(s=ff(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const o=(i=r.querySelector("code"))==null?void 0:i.cloneNode(!1),a=r.cloneNode(!1);a instanceof HTMLElement&&o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),a.replaceChildren(o),n.replaceChildren(a))}}function u3t(e){e.querySelectorAll("button").forEach(n=>{n.replaceWith(document.createTextNode(n.textContent??""))}),e.querySelectorAll("script, style, iframe, object, embed, input, textarea, select").forEach(n=>n.remove()),e.querySelectorAll("*").forEach(n=>{for(const t of Array.from(n.attributes))(t.name.toLowerCase().startsWith("on")||t.name==="contenteditable"||t.name==="tabindex")&&n.removeAttribute(t.name)})}function f3t(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const i=Array.from(n.querySelectorAll(".katex")).filter(o=>e.intersectsNode(o));for(const o of i){const a=o.closest(".katex-display")??o,l=document.createRange();l.selectNode(a);const u={container:l.startContainer,offset:l.startOffset},_={container:l.endContainer,offset:l.endOffset};if(bw(s,u)&&t.append(Sj(s,u)),t.append(a.cloneNode(!0)),s=_,!bw(s,r))break}return i.length===0?t.append(e.cloneContents()):bw(s,r)&&t.append(Sj(s,r)),c3t(e,t),u3t(t),t}function d3t(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>up(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` - -${s3t(n,!!e.querySelector("tr:first-child th"))} - -`:""}function U$(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const i=[];for(const o of Array.from(e.children).filter(a=>a instanceof HTMLElement&&a.tagName==="LI")){const a=o.getAttribute("value"),l=a===null?s:Number(a),u=Number.isFinite(l)?l:s;s=u+1;const _=Array.from(o.childNodes).map(f=>f instanceof HTMLElement&&f.matches("UL, OL")?` -${U$(f).trim()} -`:up(f)).join("").trim();i.push(r3t(n?`${u}.`:"-",_))}return` - -${i.join(` -`)} - -`}function up(e){var r,s,i,o,a;if(e.nodeType===Node.TEXT_NODE)return e3t(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(up).join("");if(e.matches(".katex-display")){const l=(s=(r=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:r.textContent)==null?void 0:s.trim();return l?A5(l,!0):""}if(e.matches(".katex")){const l=(o=(i=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:i.textContent)==null?void 0:o.trim();return l?A5(l,!1):""}if(e.tagName==="BR")return` -`;if(e.tagName==="TABLE")return d3t(e);if(e.matches("UL, OL"))return U$(e);if(e.tagName==="CODE"&&((a=e.parentElement)==null?void 0:a.tagName)!=="PRE")return t3t(e.textContent??"");if(e.tagName==="PRE")return n3t(e.textContent??"");const n=Array.from(e.childNodes).map(up).join("");if(!n)return"";if(e.matches("strong, b"))return`**${n}**`;if(e.matches("em, i"))return`*${n}*`;if(e.tagName==="A"){const l=e.getAttribute("href");return l?`[${n}](${l})`:n}if(e.tagName==="LI")return`${n.trim()} -`;if(e.matches("TH, TD"))return`${n.trim()} | `;if(e.tagName==="TR")return`${n.replace(/ \| $/,"")} -`;if(e.tagName==="BLOCKQUOTE")return` - -${n.trim().split(` -`).map(l=>`> ${l}`).join(` -`)} - -`;const t=i3t(e.tagName,n);return t?` - -${t} - -`:e.matches("P, DIV, UL, OL, TABLE")?` - -${n.trim()} - -`:n}function h3t(e,n){return up(e).replace(/\r\n?/g,` -`).replace(/[ \t]+\n/g,` -`).replace(/\n{3,}/g,` - -`).trim()||n}function kj(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function _3t(e,n){var s,i,o,a;if(!a3t(e))return;const t=kj(e);if(t.length<8)return;let r;for(const l of n.querySelectorAll(".msg-assistant > .md .katex")){const _=[(s=l.querySelector(".katex-mathml"))==null?void 0:s.textContent,(i=l.querySelector(".katex-html"))==null?void 0:i.textContent,l.textContent].filter(x=>!!x).map(kj).find(x=>o3t(x,t));if(!_)continue;const f=(a=(o=l.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:o.textContent)==null?void 0:a.trim();if(!f)continue;const p=!!l.closest(".katex-display"),m={markdown:A5(f,p).trim(),delta:Math.abs(_.length-t.length)};(!r||m.deltaz.width>0&&z.height>0),x=m[0]??t.getBoundingClientRect(),S=m.filter(z=>z.topx.top),b=S.length>0?S:[x],v=Math.min(...b.map(z=>z.left)),y=Math.max(...b.map(z=>z.right)),w=Math.min(...b.map(z=>z.top)),C=Math.max(...b.map(z=>z.bottom)),N=34,E=74,j=w>=N+vw?w-N-vw:C+vw;return{text:h3t(p,f),range:t.cloneRange(),x:Math.min(window.innerWidth-E,Math.max(E,v+(y-v)/2)),top:j}}function m3t(e,n){const[t,r]=M.useState(null),s=M.useRef(!1),i=M.useCallback(()=>{const l=e.current;r(l?p3t(l):null)},[e]);M.useEffect(()=>{let l=null;const u=()=>{s.current||i()},_=p=>{const m=e.current,x=p.target;!p.isPrimary||p.button!==0||!m||!(x instanceof Node)||!m.contains(x)||(s.current=!0,r(null))},f=p=>{!p.isPrimary||!s.current||(s.current=!1,l=window.requestAnimationFrame(i))};return document.addEventListener("selectionchange",u),document.addEventListener("pointerdown",_,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",_,!0),window.removeEventListener("pointerup",f,!0),window.removeEventListener("pointercancel",f,!0),l!==null&&window.cancelAnimationFrame(l),s.current=!1}},[i]),M.useEffect(()=>{if(!t)return;const l=u=>{const _=u.target;_ instanceof Element&&_.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",l,!0),window.addEventListener("resize",i),()=>{document.removeEventListener("mousedown",l,!0),window.removeEventListener("resize",i)}},[t,i]);const o=M.useCallback(()=>{var l;t&&(n({text:t.text,range:t.range}),r(null),(l=window.getSelection())==null||l.removeAllRanges())},[t,n]),a=M.useCallback(()=>r(null),[]);return{action:t,add:o,dismiss:a}}function g3t(e){M.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const n=e.flatMap(r=>r.range?[r.range]:[]);if(n.length===0){CSS.highlights.delete(Kg);return}const t=new Highlight(...n);return CSS.highlights.set(Kg,t),()=>{CSS.highlights.get(Kg)===t&&CSS.highlights.delete(Kg)}},[e])}function v3t({annotation:e}){const n=M.useRef(null),[t,r]=M.useState();return M.useLayoutEffect(()=>{var i;const s=(i=n.current)==null?void 0:i.closest(".chat-thread-inner");r(s?_3t(e.text,s):void 0)},[e.id,e.text]),h.jsx("div",{ref:n,children:h.jsx(Oo,{text:t??e.text})})}function b3t({annotations:e,onRemove:n}){return e.map((t,r)=>h.jsxs("div",{className:`annotation-item grid gap-2 py-2 px-1 [&+&]:border-t [&+&]:border-border-variant ${n?"grid-cols-[24px_minmax(0,_1fr)_28px]":"grid-cols-[24px_minmax(0,_1fr)]"}`,children:[h.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-sm text-muted mb-1",children:ffe()}),h.jsx(v3t,{annotation:t})]}),n&&h.jsx(tn,{type:"button",size:"small","data-annotation-remove":!0,title:Bue(),"aria-label":pQ({number:nn(r+1)}),onClick:()=>n(t.id),children:h.jsx(es,{size:13})})]},t.id))}function GS({annotations:e,variant:n,onClear:t,onRemove:r}){const s=M.useRef(null),i=M.useRef(null),o=M.useId(),a=so(s),l=n==="sent",u=M.useRef(null),_=()=>{u.current!==null&&window.clearTimeout(u.current),u.current=null,a.setOpen(!0)},f=()=>{u.current=window.setTimeout(()=>{var x;(x=i.current)!=null&&x.contains(document.activeElement)||a.setOpen(!1)},160)},p=()=>{const x=l||!a.open;a.setOpen(x),x&&window.requestAnimationFrame(()=>{var S;return(S=i.current)==null?void 0:S.focus()})},m=x=>{r==null||r(x),window.requestAnimationFrame(()=>{var b,v;(v=((b=i.current)==null?void 0:b.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||v.focus()})};return M.useEffect(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]),h.jsxs("div",{className:l?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:a.ref,onMouseEnter:l?_:void 0,onMouseLeave:l?f:void 0,children:[h.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${l?"rounded-full":"rounded-sm"}`,children:[h.jsxs("button",{ref:s,type:"button",className:`inline-flex items-center gap-1.5 py-1 text-sm font-medium text-text [&:hover]:bg-surface ${l?"px-2.5":"ps-2 pe-1.5"}`,"aria-expanded":a.open,"aria-haspopup":"dialog","aria-controls":o,onClick:p,children:[h.jsx(gO,{size:l?13:14,className:"text-muted"}),e.length===1?mae():Ese({count:nn(e.length)})]}),t&&h.jsx("button",{type:"button",className:"inline-flex items-center justify-center self-stretch w-6.5 text-muted border-s border-border [&:hover]:bg-surface [&:hover]:text-text",title:tE(),"aria-label":tE(),onClick:t,children:h.jsx(es,{size:13})})]}),a.open&&h.jsx("div",{id:o,ref:i,tabIndex:-1,className:`annotation-menu absolute bottom-[calc(100%_+_8px)] z-50 w-[min(440px,_calc(100vw_-_48px))] max-h-80 overflow-y-auto overscroll-contain bg-background border border-border rounded-lg shadow-popover p-2 text-start ${l?"end-0 after:absolute after:top-full after:start-0 after:end-0 after:h-2 after:content-['']":"start-3"}`,role:"dialog","aria-label":ofe(),children:h.jsx(b3t,{annotations:e,onRemove:r?m:void 0})})]})}function y3t(e){return h.jsx(GS,{...e,variant:"composer"})}const x3t=["prompt-collapsed text-muted text-base font-[375] my-3.5 mx-0 [&_summary]:flex","[&_summary]:items-center [&_summary]:gap-2 [&_summary]:cursor-pointer","[&_summary]:list-none [&_summary]:select-none [&_summary::-webkit-details-marker]:hidden","[&_summary::after]:content-['›'] [&_summary::after]:text-muted","[&_summary::after]:transition-transform [&_summary::after]:duration-80 [&_summary::after]:ease-standard [&[open]_summary::after]:rotate-90"].join(" "),Cj=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),w3t=["prompt-collapsed plan-resolved text-subtext my-3.5 mx-0","[&_summary]:flex [&_summary]:items-center [&_summary]:gap-2 [&_summary]:w-fit [&_summary]:max-w-full","[&_summary]:py-[3px] [&_summary]:px-1 [&_summary]:cursor-pointer [&_summary]:rounded-sm","[&_summary]:list-none [&_summary]:select-none [&_summary:hover]:bg-surface","[&_summary::-webkit-details-marker]:hidden","[&_summary_.plan-chevron]:transition-transform [&_summary_.plan-chevron]:duration-120","[&_summary_.plan-chevron]:ease-standard [&[open]_summary_.plan-chevron]:rotate-90"].join(" "),S3t=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),R5="prompt-actions flex flex-wrap gap-2",Ej=[],k3t=[],d0={};function C3t(e){if(!e)return"";const n=Math.max(0,Math.floor((Date.now()-e)/1e3));if(n<60)return mAe();const t=Math.floor(n/60);if(t<60)return dAe({value:nn(t)});const r=Math.floor(t/60);return r<24?lAe({value:nn(r)}):sAe({value:nn(Math.floor(r/24))})}function rf(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function yw(e){var t;const n=e.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return((t=n.at(-1))==null?void 0:t.toLowerCase())!=="skill.md"?null:n.at(-2)??null}function E3t(e,n){return/^orx-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(n)?e==="Skill"?`.claude/skills/${n}/SKILL.md`:e==="skill"?`.opencode/skills/${n}/SKILL.md`:null:null}function Ps(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function xw(e,n,t){const r=e[n];if(!Array.isArray(r))return null;for(const s of r){if(!s||typeof s!="object"||!(t in s))continue;const i=s[t];if(typeof i=="string"&&i)return i}return null}function ww(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=pu));s++);return r}function N3t(e,n){const t=e[n];if(!Array.isArray(t))return null;const r=[];for(const s of t){if(typeof s!="string")return null;r.push(s)}return r}function ch(...e){const n=new Set,t=new RegExp(`^${jf}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=pu||r++>=H$)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function Ab(e){return e.replace(/^Exit code \d+\s*/i,"").split(` -`).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` -`).trim()}function z3t(e){const n=e.changes;if(!Array.isArray(n))return null;for(const t of n){if(!t||typeof t!="object"||!("path"in t)||typeof t.path!="string")continue;const r="kind"in t?t.kind:null,s=r&&typeof r=="object"&&"type"in r&&typeof r.type=="string"?r.type:null;return{path:t.path,type:s}}return null}function T3t(e){const n=e.trim(),t=n.match(/^\/bin\/(?:ba|z)?sh\s+-lc\s+([\s\S]+)$/);let r=((t==null?void 0:t[1])??n).trim();return r=bpt(r),G$(r)}function G$(e){return A3t(e).replace(/[\t\r ]+/g," ").trim()}function j3t(e){let n=null,t=!1;for(let r=0;r!i.startsWith("-")&&i.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&V$(s)?{ref:r,path:s}:null}function D3t(e){const n=e.match(/\b(?:rg|grep)\b(?:\s+-[^\s]+)*\s+(?:"([^"]+)"|'([^']+)'|([^\s]+))/);return(n==null?void 0:n[1])??(n==null?void 0:n[2])??(n==null?void 0:n[3])??null}function Nj(e,n){if(/[$`~]/.test(e)||/[$`~]/.test(n))return null;const t=n.startsWith("/")||!n.startsWith("/")&&e.startsWith("/"),r=n.startsWith("/")?[]:e.split("/").filter(Boolean);for(const i of n.split("/"))if(!(!i||i===".")){if(i===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(i);continue}r.push(i)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function L3t(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let i=0;i!u.startsWith("-"));if(!a)return null;const l=Nj(s,a);if(!l)return null;s=l}return s?Nj(s,e):e}const wo="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",O3t=new RegExp(`\\bchat_(${wo})\\b`,"gi"),jf=`(?:${wo}|[0-9a-f]{8})`;function uh(e){const n=[];let t="",r="",s=null,i=!1;const o=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},a=u=>{let _=1,f=null,p=!1;for(let m=u;m{let _=!1;for(let f=u;fwpt(t.raw,n))}function ga(e,n){return Rb(e,n).length>0}function I3t(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,q$).matchAll(O3t))if(n.add(t[0].toLowerCase()),n.size>=pu)break;return[...n]}function M5(e,n){if(!e)return[];const t=new Set,r=e.slice(0,q$),s=n==="runs"?[new RegExp(`/runs/(${wo})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${wo})`,"gi"),new RegExp(`^\\s*RUN\\s+(${wo})\\b`,"gim"),new RegExp(`={3,}\\s*(${wo})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${wo})`,"gi"),new RegExp(`^\\s*id:\\s*(${wo})`,"gim"),new RegExp(`={3,}\\s*(${wo})\\s*={3,}`,"gi")];for(const o of s)for(const a of r.matchAll(o))if(t.add(a[1]),t.size>=pu)return[...t];const i=new RegExp(`^\\s*(${wo})(?:\\s|$)`,"gim");for(const o of r.matchAll(i))if(t.add(o[1]),t.size>=pu)break;return[...t]}function Q$(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),i=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,i+r.raw.length),{invocation:r,offset:Math.max(0,i)}})}function Y$(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let i="";for(const o of e.matchAll(s)){if((o.index??0)>=t)break;i=o[1]??o[2]??o[3]??""}return[...i.matchAll(new RegExp(r,"gi"))].map(o=>o[0])}function X$(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let i="";for(const o of e.matchAll(s)){const a=o.index??0;if(a>=t)break;const l=a+o[0].length;l<=t&&/\bdone\b/.test(e.slice(l,t))||(i=o[1])}return/\$\(|`/.test(i)?[]:[...i.matchAll(new RegExp(r,"gi"))].map(o=>o[0])}function B3t(e,n,t=[],r=[]){const s=Rb(e,"logs"),i=new Set;if(s.length===0){if(!ga(e,"logs"))return[];const a=t.length>0?[]:M5(n,"runs");for(const l of t.length>0?t:a.length>0?a:r)if(i.add(l),i.size>=pu)break;return ch([...i])}let o=!1;for(const{invocation:a,offset:l}of Q$(e,s)){const u=$h(a.raw);if((u==null?void 0:u[0])!=="logs")continue;const _=u.slice(1);let f=null;for(let b=0;b<_.length;b++){const v=_[b];if(v!=="--head"){if(v==="--bytes"||v==="--range"){b++;continue}if(!(v.startsWith("--bytes=")||v.startsWith("--range="))){f=v;break}}}if(!f){o=!0;continue}if(new RegExp(`^${jf}$`,"i").test(f)){i.add(f);continue}const p=/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(f);if(!p){o=!0;continue}const m=p[1],x=Y$(e,m,l,jf);for(const b of x)i.add(b);const S=X$(e,m,l,jf);for(const b of S)i.add(b);x.length===0&&S.length===0&&(o=!0)}if(i.size===0||o){const a=t.length>0?[]:M5(n,"runs"),l=t.length>0?t:a.length>0?a:r;for(const u of l)if(i.add(u),i.size>=pu)break}return ch([...i])}function qd(e,n,t=[],r=[]){const s=Rb(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let o=!1;for(const{invocation:a,offset:l}of Q$(e,s)){const u=$h(a.raw),_=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let f=!1;_&&new RegExp(`^${jf}$`,"i").test(_)&&(i.add(_),f=!0);const p=_?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(_):null;if(p){const m=p[1],x=Y$(e,m,l,jf);if(x.length>0){for(const b of x)i.add(b);f=!0}const S=X$(e,m,l,jf);for(const b of S)i.add(b);S.length>0&&(f=!0)}f||(o=!0)}if(i.size===0||o){const a=t.length>0?[]:M5(n,"experiments"),l=t.length>0?t:a.length>0?a:r;for(const u of l)if(i.add(u),i.size>=pu)break}return ch([...i])}const zj=new WeakMap;function Bf(e){const n=T(),t=zj.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=$3t(e);return zj.set(e,{locale:n,activity:r}),r}function $3t(e){var v,y,w,C;const n=e.tool??"tool",t=((v=e.state)==null?void 0:v.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},o=Ps(i,"command","cmd"),a=N3t(i,"commandArgv"),l=((y=e.state)==null?void 0:y.output)||((w=e.state)==null?void 0:w.error),u=ch(ww(i,"targetIds")),_=ch(ww(i,"runTargetIds")),f=ch(ww(i,"experimentTargetIds")),p=Ps(i,"filePath","file_path","notebookPath","notebook_path","path"),m=Ps(i,"description"),x=n.toLowerCase().split(/(?::|\.|__)+/),S=x.at(-1)??n.toLowerCase();if(S==="run"&&x.includes("web")){const N=xw(i,"search_query","q"),E=xw(i,"image_query","q"),j=xw(i,"find","pattern");return N?{kind:"web",label:B9({query:N})}:E?{kind:"web",label:aJ({query:E})}:j?{kind:"web",label:kJ({pattern:j})}:Array.isArray(i.open)?{kind:"web",label:Ice()}:Array.isArray(i.weather)?{kind:"web",label:nle()}:Array.isArray(i.finance)?{kind:"web",label:Koe()}:Array.isArray(i.sports)?{kind:"web",label:Zoe()}:Array.isArray(i.time)?{kind:"web",label:Uoe()}:{kind:"web",label:J9()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["subagentactivity","subagent"]]).get(S)??S){case"bash":{if(!o&&!(a!=null&&a.length))return{kind:"command",label:uue()};const N=T3t(o??(a==null?void 0:a.join(" "))??""),E=uh(N);let j=E.map(le=>le.raw);if(a!=null&&a.length){const le=xpt(a);j=le===null?[a]:uh(G$(le)).map(se=>se.raw)}let z=null;for(const le of j)if(z=Spt(le),z)break;const R=j.some(le=>{const se=$h(le);return se!==null&&se[0]!=="discover"&&se[0]!=="paper"});if(z&&!R){const le=z.kind==="discover"?{keyword:HZ(),embedding:WZ(),openalex:gJ(),biorxiv:YZ()}[z.strategy]:null,se=z.kind==="discover"?z.query?JY({activity:le??I9(),query:z.query}):le??I9():z.id?n0({target:ze(z.id)}):qX();return{kind:z.kind==="paper"?"read":"search",label:se,litCall:z}}if(ga(N,"agent\\s+spawn"))return{kind:"agent",label:yle(),spawnedSessionIds:I3t(l),litCall:z??void 0};const O=E.map(le=>K$(le.raw)),I=ga(N,"exp\\s+status"),F=ga(N,"exp\\s+desc"),U=Rb(N,"exp\\s+desc").some(le=>($h(le.raw)??[]).some(Q=>Q==="--set"||Q.startsWith("--set=")||Q==="--stdin")),q=U?ZJ():$X(),Y=U?cY():SZ();if(ga(N,"logs")){const le=B3t(N,l,_,u);return{kind:"project",label:le.length===1?pZ():bZ(),runIds:le,litCall:z??void 0}}if(ga(N,"exp\\s+run"))return{kind:"project",label:zfe(),litCall:z??void 0};if(ga(N,"exp\\s+wait"))return{kind:"project",label:lde(),litCall:z??void 0};if(ga(N,"exp\\s+cancel"))return{kind:"project",label:Coe(),litCall:z??void 0};const V=ga(N,"project\\s+view");if(V&&I&&F)return{kind:"project",label:Y,experimentIds:qd(N,l,f,u),litCall:z??void 0};if(V&&F)return{kind:"project",label:q,experimentIds:qd(N,l,f,u),litCall:z??void 0};if(V&&I)return{kind:"project",label:eE(),experimentIds:qd(N,l,f,u),litCall:z??void 0};if(V)return{kind:"project",label:Eue(),litCall:z??void 0};if(I&&F)return{kind:"project",label:Y,experimentIds:qd(N,l,f,u),litCall:z??void 0};if(I)return{kind:"project",label:eE(),experimentIds:qd(N,l,f,u),litCall:z??void 0};if(F)return{kind:"project",label:q,experimentIds:qd(N,l,f,u),litCall:z??void 0};if(ga(N,"runs?"))return{kind:"project",label:vce(),litCall:z??void 0};if(ga(N,"projects"))return{kind:"project",label:wce(),litCall:z??void 0};if(ga(N,"compute"))return{kind:"project",label:Moe(),litCall:z??void 0};const Z=O.map(M3t).find(le=>le!=null);if(Z){const le=yw(Z.path);return{kind:le?"skill":"read",label:le?l2({name:ze(le)}):n0({target:ze(rf(Z.path))}),filePath:Z.path,fileRef:Z.ref,labelTarget:le?`${le} skill`:rf(Z.path)}}const te=O.findIndex(le=>le!=null&&["sed","cat","head","tail"].includes(le.name)),P=te>=0?O[te]:null,L=P?R3t(P):null,$=L?L3t(L,E,te,Ps(i,"cwd","workdir")):null;if(L&&$){const le=yw($);return{kind:le?"skill":"read",label:le?l2({name:ze(le)}):n0({target:ze(rf(L))}),filePath:$,labelTarget:le?`${le} skill`:rf(L)}}if(O.some(le=>(le==null?void 0:le.name)==="find"||(le==null?void 0:le.name)==="ls"||(le==null?void 0:le.name)==="rg"&&le.args.includes("--files")))return{kind:"search",label:oE()};const H=O.findIndex(le=>(le==null?void 0:le.name)==="rg"||(le==null?void 0:le.name)==="grep");if(H>=0){const le=D3t(E[H].raw);return{kind:"search",label:le?u2({pattern:ze(le)}):c2(),searchPattern:le??void 0}}const G=O.find(le=>(le==null?void 0:le.name)==="git"),ne=G==null?void 0:G.args[0];if(ne==="grep"){const le=G==null?void 0:G.args.slice(1).find(se=>!se.startsWith("-"));return{kind:"search",label:le?u2({pattern:ze(le)}):c2(),searchPattern:le}}if(ne==="status")return{kind:"command",label:Poe()};if(ne==="diff")return{kind:"command",label:efe()};if(ne==="log")return{kind:"command",label:wue()};const oe=le=>O.some(se=>!se||!["cargo","pnpm","npm","yarn"].includes(se.name)?!1:se.args[0]===le||se.args[0]==="run"&&se.args[1]===le);return oe("test")?{kind:"command",label:_ue()}:O.some(le=>(le==null?void 0:le.name)==="tsc")||oe("typecheck")?{kind:"command",label:ale()}:oe("lint")?{kind:"command",label:Toe()}:oe("build")?{kind:"command",label:goe()}:{kind:"command",label:NX({command:ze(N)})}}case"skill":{const N=Ps(i,"skill","name"),E=N?E3t(n,N):null;return{kind:"skill",label:N?pX({name:ze(N)}):fX(),filePath:E??void 0,labelTarget:E&&N?`${N} skill`:void 0}}case"read":{const N=p?rf(p):null,E=p?yw(p):null;return E?{kind:"skill",label:l2({name:ze(E)}),filePath:p??void 0,labelTarget:`${E} skill`}:N?{kind:"read",label:n0({target:ze(N)}),filePath:p??void 0,labelTarget:N}:{kind:"read",label:vue()}}case"edit":case"write":case"notebookedit":{const N=z3t(i),E=p??(N==null?void 0:N.path)??null,j=E?rf(E):null,z=j?(N==null?void 0:N.type)==="add"?CY({target:ze(j)}):(N==null?void 0:N.type)==="delete"?IY({target:ze(j)}):GY({target:ze(j)}):null;return j?{kind:"edit",label:z??rE(),filePath:E??void 0,labelTarget:j}:{kind:"edit",label:rE()}}case"grep":{const N=Ps(i,"pattern");return{kind:"search",label:N?u2({pattern:ze(N)}):c2(),searchPattern:N??void 0}}case"glob":{const N=Ps(i,"pattern");return{kind:"search",label:N?rX({pattern:ze(N)}):oE()}}case"websearch":{const N=Ps(i,"query"),E=Ps(i,"url"),j=Ps(i,"pattern");return N?{kind:"web",label:B9({query:N})}:j&&E?{kind:"web",label:hJ({pattern:j})}:E?{kind:"web",label:SX({target:ze(E)})}:{kind:"web",label:m??J9()}}case"webfetch":{const N=Ps(i,"url");return{kind:"web",label:N?n0({target:ze(N)}):m??JX()}}case"task":return{kind:"agent",label:m??AX()};case"subagent":return{kind:"agent",label:P3t(i)};case"error":return{kind:"command",label:Xfe()};case"contextcompaction":return{kind:"command",label:gY(),progressLabel:xY()};default:{const N=m??p??o??((C=e.state)==null?void 0:C.title)??"";return{kind:"command",label:N?`${n}: ${N}`:n}}}}function P3t(e){const n=typeof e.nickname=="string"&&e.nickname?e.nickname.replace(/[_-]+/g," "):"",t=n&&n.charAt(0).toUpperCase()+n.slice(1);if(t)return t;switch(typeof e.tool=="string"?e.tool:""){case"spawnAgent":return OJ();case"sendInput":return RJ();case"resumeAgent":return oZ();case"wait":return nee();case"closeAgent":return hY()}switch(typeof e.kind=="string"?e.kind:""){case"started":return KJ();case"interacted":return XQ();case"interrupted":return UJ()}return PJ()}function Sv({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=h.jsx(r_,{...t});if(e.litCall)r=h.jsx(HO,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=h.jsx(lO,{...t});break;case"read":case"project":r=h.jsx(cO,{...t});break;case"search":r=h.jsx(yO,{...t});break;case"edit":r=h.jsx(b6,{...t});break;case"web":r=h.jsx(i_t,{...t});break;case"agent":r=h.jsx(w6,{...t});break}return h.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function Sw({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,i]=M.useState(!1),o=M.useRef(null),a=M.useRef(!1);return M.useEffect(()=>{var l,u;!s||!a.current||(a.current=!1,(u=(l=o.current)==null?void 0:l.querySelector("button"))==null||u.focus())},[s]),h.jsxs("span",{className:"tool-target-overflow inline",children:[s&&h.jsx("span",{className:"tool-target-reveal",ref:o,children:e.map((l,u)=>h.jsxs("span",{children:[u>0&&", ",n||t?h.jsx("button",{className:"tool-target",...n?Gr(_=>n(l.id,_),{stopPropagation:!0}):{onClick:_=>{_.stopPropagation(),t==null||t(l.id)}},children:l.label}):h.jsx("span",{children:l.label})]},l.id))}),s&&", ",h.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?bK({target:r}):$Q({count:nn(e.length),target:r}),onClick:l=>{l.preventDefault(),l.stopPropagation(),a.current=!s&&l.detail===0,i(u=>!u)},children:s?lD():T0e({count:nn(e.length)})})]})}function D5({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:o}){var a,l,u,_;if(e.searchPattern)return e.label;if(((a=e.litCall)==null?void 0:a.kind)==="paper"&&e.litCall.id)return h.jsxs("a",{className:"tool-target",href:Tpt(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,h.jsx(dht,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const f=e.filePath;return h.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...Gr(p=>n(f,void 0,void 0,e.fileRef,p),{stopPropagation:!0}),children:e.label})}if((l=e.spawnedSessionIds)!=null&&l.length&&r){const f=e.spawnedSessionIds,p=f.slice(0,3),m=f.slice(p.length).map((x,S)=>({id:x,label:V9({number:nn(p.length+S+1)})}));return h.jsxs(h.Fragment,{children:[e.label," — ",p.map((x,S)=>h.jsxs("span",{children:[S>0&&", ",h.jsx("button",{className:"tool-target",title:Mce(),onClick:b=>{b.preventDefault(),b.stopPropagation(),r(x)},children:V9({number:nn(S+1)})})]},x)),m.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Sw,{items:m,onSelect:r,targetType:bse()})]})]})}if((u=e.runIds)!=null&&u.length){const f=s?e.runIds.filter(x=>!!s(x)):e.runIds;if(f.length===0)return e.label;const p=f.slice(0,3),m=f.slice(p.length).map(x=>({id:x,label:(s==null?void 0:s(x))||zl()}));return h.jsxs(h.Fragment,{children:[e.label," — ",p.map((x,S)=>h.jsxs("span",{children:[S>0&&", ",t?h.jsx("button",{className:"tool-target",title:YK({run:ze(x)}),...Gr(b=>t(x,b),{stopPropagation:!0}),children:(s==null?void 0:s(x))||zl()}):h.jsx("span",{children:(s==null?void 0:s(x))||zl()})]},x)),m.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Sw,{items:m,onOpen:t,targetType:bhe()})]})]})}if((_=e.experimentIds)!=null&&_.length){const f=o?e.experimentIds.filter(x=>!!o(x)):e.experimentIds;if(f.length===0)return e.label;const p=f.slice(0,3),m=f.slice(p.length).map(x=>({id:x,label:(o==null?void 0:o(x))||zl()}));return h.jsxs(h.Fragment,{children:[e.label," — ",p.map((x,S)=>h.jsxs("span",{children:[S>0&&", ",i?h.jsx("button",{className:"tool-target",title:BK({name:(o==null?void 0:o(x))||ze(x)}),...Gr(b=>i(x,b),{stopPropagation:!0}),children:(o==null?void 0:o(x))||zl()}):h.jsx("span",{children:(o==null?void 0:o(x))||zl()})]},x)),m.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Sw,{items:m,onOpen:i,targetType:Lie()})]})]})}return e.label}function WS(e){const n=e.progressLabel??{skill:bX(),read:rZ(),search:zJ(),edit:QY(),project:NZ(),web:iY(),agent:MY(),command:YM()}[e.kind];return{...e,label:n}}function Z$(e,n){const t=Bf({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:oX(),read:LX(),search:BZ(),edit:FY(),project:fZ(),web:tY(),agent:TY(),command:AZ()}[t.kind]}function F3t(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const H3t=250;function q3t(e,n){const[t,r]=M.useState(e),s=M.useRef(Date.now()),i=M.useRef(e);return M.useEffect(()=>{if(i.current=e,(e==null?void 0:e.label)===(t==null?void 0:t.label)||n&&e!=null&&t!=null)return;if(e==null||t==null){s.current=Date.now(),r(e);return}const o=H3t-(Date.now()-s.current);if(o<=0){s.current=Date.now(),r(e);return}const a=window.setTimeout(()=>{s.current=Date.now(),r(i.current)},o);return()=>window.clearTimeout(a)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const U3t=160;function J$(e){const[n,t]=M.useState(!1);return M.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),U3t);return()=>window.clearTimeout(r)},[e]),e&&n}function G3t(e){const n=["skill","read","search","edit","project","web","command","agent"];for(const t of n){const r=e.find(s=>s.kind===t);if(r)return r}return e[0]??{kind:"command",label:rD()}}function W3t(e,n){var t,r;return((t=e.state)==null?void 0:t.status)!=="completed"?null:JSON.stringify([n.kind,n.label,n.filePath??null,n.fileRef??null,((r=n.litCall)==null?void 0:r.kind)==="paper"?n.litCall.id??null:null,n.runIds??null,n.experimentIds??null,n.spawnedSessionIds??null])}function V3t(e){const n=[];let t=null;for(const r of e){const s=Bf(r),i=W3t(r,s),o=n[n.length-1];i&&o&&t===i?o.count++:n.push({part:r,activity:s,count:1}),t=i}return n}function K3t({part:e,busy:n,recovering:t,onRecover:r}){var p,m;const s=(p=e.state)==null?void 0:p.input,i=(s==null?void 0:s.nextRetryAt)??null,[o,a]=M.useState(Date.now());if(M.useEffect(()=>{if(typeof i!="number"||(a(Date.now()),i<=Date.now()))return;const x=window.setInterval(()=>{const S=Date.now();a(S),S>=i&&window.clearInterval(x)},1e3);return()=>window.clearInterval(x)},[i]),e.id==="turn-retry"){const x=_pt(s??{},o);return h.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[h.jsx(Ot,{}),h.jsx("span",{children:x})]})}const l=PO(s==null?void 0:s.recoveryAction),u=s==null?void 0:s.turnId;if(l!=="retry"&&l!=="continue"||!u)return null;const _=l==="retry"?Hi():pie(),f=Ab(((m=e.state)==null?void 0:m.error)||__e());return h.jsxs("div",{className:"turn-recovery-row flex items-center justify-between gap-2 py-1.5 px-2.5 border border-border rounded-md bg-background",children:[h.jsx("span",{className:"min-w-0 truncate text-sm text-accent-red",title:f,children:f}),h.jsx(Oe,{type:"button",size:"small",disabled:n||t,onClick:()=>r==null?void 0:r(u,l),children:t?Fhe():_})]})}function Tj({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:o,onOpenExperiment:a,experimentName:l}){const u=e.state,_=(u==null?void 0:u.status)==="error",f=Ab((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=_&&!!f,[m,x]=M.useState(!1),S=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`,b=h.jsxs(h.Fragment,{children:[_&&h.jsxs("span",{className:"sr-only",children:[$3()," "]}),_?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(hO,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):h.jsx(Sv,{activity:n,className:"text-muted"}),h.jsxs("span",{className:`${F$} ${_?"text-accent-red":"text-subtext"}`,children:[h.jsx(D5,{activity:n,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:o,onOpenExperiment:a,experimentName:l}),t>1&&h.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:NK({count:nn(t)}),children:["×",t]})]})]});return p?h.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[h.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[b,h.jsx("button",{type:"button",className:"tool-row-detail-toggle inline-flex h-6 shrink-0 items-center justify-center p-0.5 rounded-sm cursor-pointer hover:bg-surface","aria-expanded":m,"aria-controls":S,"aria-label":m?SK({activity:n.label}):LQ({activity:n.label}),onClick:()=>x(v=>!v),children:h.jsx(qo,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${m?"rotate-90":""}`})})]}),m&&h.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:S,children:h.jsx("div",{className:US,children:f.slice(0,2e4)})})]}):h.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:b})}function Q3t({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:o,experimentName:a}){var z,R,O,I;const[l,u]=M.useState(!1),[_,f]=M.useState(!1),p=()=>{f(!0),u(F=>!F)},m=V3t(e),x=m.map(({activity:F})=>F),S=n?m.at(-1):void 0,b=S==null?void 0:S.part,v=S==null?void 0:S.activity,y=((z=b==null?void 0:b.state)==null?void 0:z.status)!=="error"?(v&&WS(v))??null:null,w=!!b&&((R=b.state)==null?void 0:R.status)==="running"&&!(y!=null&&y.progressLabel)&&(F3t((O=b.state)==null?void 0:O.input)||(y==null?void 0:y.kind)==="command"&&!Ps(((I=b.state)==null?void 0:I.input)??{},"command","cmd")),C=q3t(y,w),N=J$(C!=null),E=C??G3t(x),j=C?C.label:rD();return e.length===1?C?h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[h.jsx(Sv,{activity:C,className:N?"tool-running-shimmer-icon":"text-muted"}),h.jsx("span",{className:`${N?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:j,children:h.jsx(D5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:o,experimentName:a})})]})}):h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsx(Tj,{part:e[0],activity:m[0].activity,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:o,experimentName:a})}):h.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[h.jsxs("div",{className:"tool-group-summary flex items-start gap-2 w-fit max-w-full py-[3px] px-1 text-base leading-6 text-subtext text-start",children:[h.jsx(Sv,{activity:E,className:N?"tool-running-shimmer-icon":"text-muted"}),C?h.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${N?"tool-running-shimmer":""}`,title:j,children:h.jsx(D5,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:o,experimentName:a})}):h.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:p,"aria-expanded":l,children:j}),h.jsx("button",{type:"button",className:"tool-group-chevron-button inline-flex h-6 shrink-0 items-center justify-center p-px cursor-pointer rounded-sm",onClick:p,"aria-expanded":l,"aria-label":l?fie():Aie(),children:h.jsx(qo,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${l?"open":""}`})})]}),h.jsx("div",{className:`tool-group-disclosure ${l?"open":""}`,"aria-hidden":!l,inert:!l,children:h.jsx("div",{className:"tool-group-disclosure-inner",children:h.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:_&&m.map(({part:F,count:U,activity:q})=>h.jsx(Tj,{part:F,repeatCount:U,activity:q,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:o,experimentName:a},F.id))})})})]})}function Y3t({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var _;const s=e.prompt,[i,o]=M.useState([]),a=!n,l=f=>n==null?void 0:n({promptId:e.id,...f});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const m=s.approved===!0?{label:Gce(),icon:qi,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:rue(),icon:b6,iconClass:"text-accent-amber"}:s.approved===!1?{label:Qce(),icon:es,iconClass:"text-accent-red"}:{label:Jce(),icon:rb,iconClass:"text-muted"},x=m.icon;return h.jsxs("details",{className:w3t,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?sD():gE()}),h.jsx(x,{size:17,strokeWidth:1.8,className:`shrink-0 ${m.iconClass}`}),h.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:m.label}),h.jsx(qo,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),h.jsxs("div",{className:`${Cj} ms-6`,children:[h.jsx(Oo,{text:s.plan??"",onOpenFile:t}),s.note&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const f=(s.answers??[]).join(", ")||s.note||"",p=(s.annotations??[]).map((m,x)=>({id:`${e.id}-annotation-${x}`,text:m.text}));return h.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[p.length>0&&h.jsx(GS,{annotations:p,variant:"sent"}),h.jsxs("details",{className:x3t,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||Bde()}),h.jsx("span",{className:`prompt-outcome font-[375] text-subtext wrap-anywhere [&.approved]:text-accent-green [&.chosen]:text-accent-green [&.approved::before]:content-['✓_'] [&.chosen::before]:content-['✓_'] [&.revised]:text-accent-amber [&.rejected]:text-accent-amber ${f?"chosen":""}`,children:f||fhe()})]}),h.jsxs("div",{className:Cj,children:[s.header&&s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&h.jsx("ul",{className:"prompt-collapsed-options mt-1.5 mx-0 mb-0 ps-4.5 [&_.sel]:text-text [&_.sel]:font-medium",children:(s.options??[]).map(m=>{var x;return h.jsx("li",{className:(x=s.answers)!=null&&x.includes(m.label)?"sel":"",children:m.label},m.label)})}),s.note&&s.note!==f&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const f=!!r;return h.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 plan ${a?"readonly":""}`,children:[h.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?Ade():gE()}),h.jsx("div",{className:`prompt-plan text-base leading-[1.6] text-text max-h-85 overflow-y-auto [&.clamped]:max-h-[9.5em] [&.clamped]:overflow-hidden [&.clamped]:relative [&.clamped::after]:content-[''] [&.clamped::after]:absolute [&.clamped::after]:inset-x-0 [&.clamped::after]:bottom-0 [&.clamped::after]:top-auto [&.clamped::after]:h-8.5 [&.clamped::after]:bg-[linear-gradient(to_bottom,_transparent,_var(--surface))] [&.clamped::after]:pointer-events-none ${f?"clamped":""}`,children:h.jsx(Oo,{text:s.plan??"",onOpenFile:t})}),f&&h.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...Gr(p=>r(s.plan??"",e.id,p)),children:sde()}),!a&&!f&&h.jsxs("div",{className:R5,children:[h.jsx(Oe,{size:"small",variant:"primary",onClick:()=>l({approve:!0,resumeMode:"auto"}),children:Nae()}),h.jsx(Oe,{size:"small",onClick:()=>l({approve:!0,resumeMode:"bypassPermissions"}),children:Aae()}),h.jsx(Oe,{size:"small",onClick:()=>l({approve:!1}),children:jue()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},p=Ps(f,"command","cmd","filePath","file_path","path")||"",m=typeof((_=s.toolInput)==null?void 0:_.reason)=="string"&&s.toolInput.reason||"",x=Ps(f,"description")||"",S=m||x||Z$(s.tool,f),b=`permission-heading-${e.id}`;return h.jsxs("div",{className:`prompt-card permission my-3 w-full max-w-2xl overflow-hidden rounded-md border border-border bg-background shadow-hairline [&.readonly]:opacity-60 ${a?"readonly":""}`,role:"group","aria-labelledby":b,children:[h.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[h.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:h.jsx(SO,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),h.jsx("span",{id:b,className:"text-base font-semibold text-text",children:Vae()})]}),h.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[h.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:S}),p&&h.jsx("code",{className:"prompt-command block max-h-36 overflow-auto whitespace-pre-wrap wrap-anywhere rounded-md border border-border-variant bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-text",children:p}),!a&&h.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[h.jsx(Oe,{size:"small",variant:"ghost",onClick:()=>l({approve:!1}),children:Nle()}),h.jsx(Oe,{size:"small",variant:"primary",onClick:()=>l({approve:!0}),children:qae()})]})]})]})}const u=f=>o(p=>s.multiSelect?p.includes(f)?p.filter(m=>m!==f):[...p,f]:[f]);return h.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 question ${a?"readonly":""}`,children:[s.header&&h.jsx("div",{className:S3t,children:s.header}),s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),h.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(f=>{const p=i.includes(f.label);return h.jsxs("button",{className:`prompt-option flex flex-col items-start gap-0.5 w-full py-2 px-[11px] text-start border border-border rounded-sm bg-background text-text cursor-pointer transition-[border-color,background] duration-80 ease-standard [&:hover:not(:disabled)]:border-border-strong [&:hover:not(:disabled)]:bg-surface [&.sel]:border-primary [&.sel]:bg-primary-subtle [&:disabled]:cursor-default ${p?"sel":""}`,disabled:a,onClick:()=>a?void 0:s.multiSelect?u(f.label):l({answers:[f.label]}),children:[h.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:f.label}),f.description&&h.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:f.description})]},f.label)})}),s.multiSelect&&!a&&h.jsx("div",{className:R5,children:h.jsx(Oe,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>l({answers:i}),children:qfe()})})]})}function X3t(e,n){return e.role==="user"?!0:e.parts.some(t=>cv(t,n))}function Z3t(e){const n=e.text??"",t=n.startsWith("data:")?n:Hct(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",i=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:i,name:s}}function J3t({count:e,index:n,prevId:t,nextId:r,onSelect:s,pagerDisabled:i,onEdit:o,editDisabled:a}){const l=e>1;return h.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${l?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[l&&h.jsxs(h.Fragment,{children:[h.jsx(tn,{size:"small",title:cE(),"aria-label":cE(),disabled:i||!t,onClick:()=>t&&s(t),children:h.jsx(uO,{size:14})}),h.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[n+1,"/",e]}),h.jsx(tn,{size:"small",title:lE(),"aria-label":lE(),disabled:i||!r,onClick:()=>r&&s(r),children:h.jsx(qo,{size:14})})]}),h.jsx(tn,{size:"small",title:nE(),"aria-label":nE(),disabled:a,onClick:o,children:h.jsx(b6,{size:13})})]})}const e6t=M.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:o,runExperimentName:a,onOpenExperiment:l,experimentName:u,onRespond:_,onOpenPlan:f,onOpenSubagent:p,busy:m=!1,recoveringTurnId:x,onRecover:S,skills:b,predictTextTail:v=!1,forkCount:y,forkIndex:w=0,forkPrevId:C,forkNextId:N,forkDisabled:E,branchDisabled:j,onFork:z,onSelectFork:R}){var Y,V;Kf();const[O,I]=M.useState(null),F=t6t(n);if(F)return h.jsx(n6t,{part:F});if(n.role==="user"){const Z=n.parts.filter(G=>G.type==="text").map(G=>G.text??"").join(` -`),te=G=>!!(b!=null&&b.some(ne=>ne.name===G)),P=n.parts.filter(G=>G.type==="image"&&G.text).map(Z3t),L=P.filter(G=>!G.isPdf),$=P.filter(G=>G.isPdf),H=n.parts.filter(G=>G.type==="annotation"&&G.text).map(G=>({id:G.id,text:G.text??""}));if(O!==null){const G=()=>{const ne=O.trim();!ne||E||(I(null),z(n.id,ne))};return h.jsx("div",{className:"msg-user-group self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:h.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[h.jsx("textarea",{dir:"auto",className:"w-full bg-transparent text-base text-text resize-none outline-none field-sizing-content min-h-16","aria-label":Dle(),value:O,autoFocus:!0,onChange:ne=>I(ne.target.value),onKeyDown:ne=>{ne.key==="Escape"?(ne.preventDefault(),I(null)):ne.key==="Enter"&&!ne.shiftKey&&!ne.nativeEvent.isComposing&&(ne.preventDefault(),G())}}),h.jsxs("div",{className:`${R5} justify-end`,children:[h.jsx(Oe,{size:"small",onClick:()=>I(null),children:xoe()}),h.jsx(Oe,{size:"small",variant:"primary",onClick:G,disabled:E||!O.trim(),children:p4()})]})]})})}return h.jsxs("div",{className:"msg-user-group group/turn self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[H.length>0&&h.jsx(GS,{annotations:H,variant:"sent"}),h.jsxs("div",{dir:"auto",className:"msg-user max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere [&_.skill-chip]:me-0.5 [&_.skill-chip]:align-baseline",children:[h.jsx(K5t,{text:Z,isCommand:te}),L.length>0&&h.jsx("div",{className:"msg-images flex flex-wrap gap-1.5 mt-2 [&_img]:max-w-55 [&_img]:max-h-40 [&_img]:border [&_img]:border-border-variant [&_img]:rounded-xs [&_img]:block",children:L.map((G,ne)=>h.jsx("a",{href:G.src,target:"_blank",rel:"noreferrer",children:h.jsx("img",{src:G.src,alt:Hse()})},ne))}),$.length>0&&h.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:$.map((G,ne)=>h.jsxs("a",{className:"msg-file inline-flex items-center gap-1.5 max-w-60 py-1.5 px-2.5 border border-border-variant rounded-sm text-text no-underline [&:hover]:border-text [&_span]:overflow-hidden [&_span]:text-ellipsis [&_span]:whitespace-nowrap",href:G.src,target:"_blank",rel:"noreferrer",children:[h.jsx(rb,{size:15}),h.jsx("span",{children:G.name})]},ne))})]}),y!==void 0&&h.jsx(J3t,{count:y,index:w,prevId:C,nextId:N,onSelect:R,pagerDisabled:j,onEdit:()=>I(Z),editDisabled:E})]})}const U=n.parts.find(Xp),q=U?n.parts.filter(Z=>Z!==U):n.parts;return h.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[eP(q,{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:o,runExperimentName:a,onOpenExperiment:l,experimentName:u,onRespond:_,onOpenPlan:f,onOpenSubagent:p,predictTextTail:v}),U&&h.jsx(K3t,{part:U,busy:m,recovering:x===((V=(Y=U.state)==null?void 0:Y.input)==null?void 0:V.turnId),onRecover:S})]})});function t6t(e){const n=e.parts.length===1?e.parts[0]:void 0;return e.role==="user"&&(n==null?void 0:n.type)==="tool"&&n.tool===yL?n:null}function n6t({part:e}){var l;const n=e.state,t=Ps((n==null?void 0:n.input)??{},"command")??"",r=(n==null?void 0:n.status)==="running",s=(n==null?void 0:n.status)==="error",i=typeof((l=n==null?void 0:n.input)==null?void 0:l.exitCode)=="number"?n.input.exitCode:null,o=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` -`),a=r?YM():s&&i!==null?sie({code:nn(i)}):null;return h.jsx("div",{className:"msg-shell self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:h.jsxs("div",{dir:"ltr",className:"max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base",children:[h.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[h.jsxs("span",{className:"sr-only",children:[eD()," "]}),h.jsx(r_,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),h.jsx("span",{children:t})]}),o&&h.jsx("div",{className:`${US} mt-2`,children:o.slice(0,2e4)}),a&&h.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:a})]})})}function eP(e,n){var y,w;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:o,runExperimentName:a,onOpenExperiment:l,experimentName:u,onRespond:_,onOpenPlan:f,onOpenSubagent:p,predictTextTail:m=!1}=n,x=e.filter(C=>C.type!=="steer"&&cv(C,t)).at(-1),S=[];let b=[];const v=()=>{b.length!==0&&(S.push(h.jsx(Q3t,{parts:b,pendingTail:b.some(C=>C.id===r),onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:o,runExperimentName:a,onOpenExperiment:l,experimentName:u},`tg-${b[0].id}`)),b=[])};for(const C of e)if(cv(C,t)){if(C.type==="tool"&&(s6t(C.tool)||(((y=C.children)==null?void 0:y.length)??0)>0)){v(),S.push(h.jsx(a6t,{part:C,pendingTail:m&&((w=C.state)==null?void 0:w.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){b.push(C);continue}v(),C.type==="text"?S.push(h.jsx(Oo,{text:C.text,onOpenFile:s,onOpenRun:i,predict:m&&C.id===(x==null?void 0:x.id)},C.id)):C.type==="steer"?S.push(h.jsx("div",{dir:"auto",role:"note","aria-label":yde(),className:"msg-steer my-2 ms-auto w-fit max-w-[88%] bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere",children:C.text},C.id)):C.type==="prompt"&&C.prompt&&S.push(h.jsx(Y3t,{part:C,onRespond:_,onOpenFile:s,onOpenPlan:f},C.id))}return v(),S}function r6t(e){return Bf(e).label}function s6t(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function tP(e){var t,r;const n=((t=e.state)==null?void 0:t.status)==="completed"?((r=e.state)==null?void 0:r.output)??"":"";return n.startsWith("Async agent launched")?"":n}function kv(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&kv(t.children,n);if(r)return r}return null}function i6t({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:o}){var x,S,b,v;const a=e.children??[],l=((x=e.state)==null?void 0:x.status)==="running",u=((S=e.state)==null?void 0:S.status)==="error",_=u?Ab(((b=e.state)==null?void 0:b.error)||((v=e.state)==null?void 0:v.output)||""):"",f=eP(a,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:o,predictTextTail:l,pendingTailToolId:l?BO(a):null}),m=a.some(y=>y.type==="text"&&!!y.text)?"":tP(e);return h.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[u&&h.jsxs("span",{className:"sr-only",children:[$3()," "]}),_&&h.jsx("div",{className:US,children:_.slice(0,2e4)}),f.length===0&&!m&&!_?h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:l?P3():sae()}):h.jsxs(h.Fragment,{children:[f,m&&h.jsx(Oo,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function a6t({part:e,pendingTail:n,onOpenSubagent:t}){var u,_,f,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=Ab(((_=e.state)==null?void 0:_.error)||((f=e.state)==null?void 0:f.output)||""),i=n&&!r?WS(Bf(e)):Bf(e),o=J$(!!(n&&!r)),a=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!tP(e),l=h.jsxs(h.Fragment,{children:[r&&h.jsxs("span",{className:"sr-only",children:[$3()," "]}),r?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(hO,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):h.jsx(Sv,{activity:i,className:`subagent-icon ${o?"tool-running-shimmer-icon":"text-muted"}`}),h.jsx("span",{className:`${F$} ${o?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:i.label})]});return a?h.jsx("div",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 text-text text-base text-start rounded-sm",children:l}):h.jsxs("button",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 cursor-pointer text-text text-base text-start rounded-sm [&:hover:not(:disabled)]:bg-surface [&:disabled]:cursor-default",title:r&&s?s:yae(),...Gr(m=>t==null?void 0:t(e.id,i.label,m)),disabled:!t,children:[l,h.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:h.jsx(qo,{size:12})})]})}function o6t(e){const n=new Map;let t;for(let s=e.length-1;s>=0;s--)if(e[s].role==="assistant"){t=e[s];break}if(!t)return{messageId:"",states:n};const r=(s,i)=>{var o,a;for(const l of s){const u=`${i}/${l.id}`;l.type==="tool"&&((o=l.state)!=null&&o.status)&&n.set(u,{status:l.state.status,part:l}),(a=l.children)!=null&&a.length&&r(l.children,u)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function VS(e){const n=(t,r)=>{var s;for(const i of t){const o=i.prompt;if(i.type==="prompt"&&(o==null?void 0:o.kind)==="permission"&&!o.resolved){const a=o.toolInput??{},u=Ps(a,"reason","description")||Z$(o.tool,a);return{id:i.id,path:`${r}/${i.id}`,label:u}}if((s=i.children)!=null&&s.length){const a=n(i.children,`${r}/${i.id}`);if(a)return a}}return null};for(const t of e){if(t.role!=="assistant")continue;const r=n(t.parts,t.id);if(r)return r}return null}function l6t(e){const[n,t]=M.useState({text:"",sequence:0}),r=M.useRef(null);return M.useEffect(()=>{var x,S,b,v,y;const s=((x=e[0])==null?void 0:x.id)??"",{messageId:i,states:o}=o6t(e),a=VS(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:i,states:o,permissionPath:(a==null?void 0:a.path)??null},t(w=>({text:a?$9({label:Ro(a.label)}):"",sequence:w.sequence+1}));return}const l=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,_=[...o].filter(([w,C])=>{var N;return((N=l.get(w))==null?void 0:N.status)!==C.status});if(r.current={transcript:s,messageId:i,states:o,permissionPath:(a==null?void 0:a.path)??null},a&&a.path!==u){t(w=>({text:$9({label:Ro(a.label)}),sequence:w.sequence+1}));return}const f=(S=_.find(([,w])=>Xp(w.part)))==null?void 0:S[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const w=PO((v=(b=f.state)==null?void 0:b.input)==null?void 0:v.recoveryAction);t(C=>({text:`${Iee()}${w?` ${w==="retry"?gee():hee()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(w=>({text:cee(),sequence:w.sequence+1}));return}const p=_.filter(([,w])=>w.status==="error");if(p.length>0){const w=p.slice(0,2).map(([,C])=>Bf(C.part).label).join(", ");t(C=>({text:p.length===1?Tee({labels:w}):Mee({count:nn(p.length),labels:w}),sequence:C.sequence+1}));return}const m=_.filter(([,w])=>w.status==="running");if(m.length>0){const w=(y=m.at(-1))==null?void 0:y[1].part;t(C=>({text:w?WS(Bf(w)).label:xee(),sequence:C.sequence+1}));return}_.some(([,w])=>w.status==="completed")&&t(w=>({text:Cee(),sequence:w.sequence+1}))},[e]),n}const c6t=M.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,onPinToBottom:s,allMessages:i,canFork:o,onFork:a,onSelectFork:l,busy:u,onOpenFile:_,onOpenRun:f,onOpenSpawnedSession:p,runExperimentName:m,onOpenExperiment:x,experimentName:S,onRespond:b,onOpenPlan:v,onOpenSubagent:y,recoveringTurnId:w,onRecover:C,skills:N}){var te,P,L;Kf();const E=((te=VS(n))==null?void 0:te.id)??null,j=M.useMemo(()=>n.filter($=>X3t($,E)),[n,E]),z=M.useMemo(()=>{const $=j.filter(H=>H.role==="user"&&!H.id.startsWith(zf));return dpt(i,n,$,H=>H.startsWith(zf))},[n,j,i]),R=M.useRef(new Set),[O,I]=M.useState(!1),F=M.useCallback($=>j[$].id,[j]),U=M.useCallback($=>{if(O)return j.map((G,ne)=>ne);const H=new Set(OO($));return j.forEach((G,ne)=>{R.current.has(G.id)&&H.add(ne)}),[...H].sort((G,ne)=>G-ne)},[j,O]),q=cpt({count:j.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:F,estimateSize:()=>400,overscan:1,initialRect:{width:((P=t.current)==null?void 0:P.clientWidth)??0,height:((L=t.current)==null?void 0:L.clientHeight)??0},initialOffset:()=>{var $;return Math.max(0,j.length*400-((($=t.current)==null?void 0:$.clientHeight)??0))},anchorTo:"end",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:U});M.useLayoutEffect(()=>{const $=()=>q.scrollToEnd();return r.current=$,s(),()=>{r.current=null}},[q,r,s]),M.useEffect(()=>{const $=()=>{var ne;const H=window.getSelection();if(!H||H.isCollapsed||!H.rangeCount)return;const G=H.getRangeAt(0);for(const oe of((ne=t.current)==null?void 0:ne.querySelectorAll("[data-message-id]"))??[])G.intersectsNode(oe)&&oe.dataset.messageId&&R.current.add(oe.dataset.messageId)};return document.addEventListener("selectionchange",$),()=>document.removeEventListener("selectionchange",$)},[t]);const Y=j.at(-1),V=l6t(n),Z=u?$O(n):null;return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:h.jsx("span",{children:V.text},V.sequence)}),h.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":O,onClick:()=>I($=>!$),children:Mhe()}),h.jsx("div",{className:"relative",style:{height:q.getTotalSize()},children:q.getVirtualItems().map($=>{var le,se,Q,ce,ee,ue;const H=j[$.index],G=H.parts.find(Xp),ne=(se=(le=G==null?void 0:G.state)==null?void 0:le.input)==null?void 0:se.turnId,oe=G?u||w!==null:!1;return h.jsx("div",{"data-index":$.index,"data-message-id":H.id,ref:q.measureElement,className:"absolute left-0 w-full pb-4",style:{top:$.start},onPointerDownCapture:()=>R.current.add(H.id),onFocusCapture:()=>R.current.add(H.id),children:h.jsx(e6t,{message:H,forkCount:(Q=z.get(H.id))==null?void 0:Q.count,forkIndex:(ce=z.get(H.id))==null?void 0:ce.index,forkPrevId:(ee=z.get(H.id))==null?void 0:ee.prevId,forkNextId:(ue=z.get(H.id))==null?void 0:ue.nextId,forkDisabled:!o,branchDisabled:u,onFork:a,onSelectFork:l,activePermissionId:E,pendingTailToolId:(Z==null?void 0:Z.messageId)===H.id?Z.toolId:null,onOpenFile:_,onOpenRun:f,onOpenSpawnedSession:p,runExperimentName:m,onOpenExperiment:x,experimentName:S,onRespond:b,onOpenPlan:v,onOpenSubagent:y,busy:oe,recoveringTurnId:ne===w?w:null,onRecover:C,skills:N,predictTextTail:u&&H===Y&&H.role==="assistant"})},H.id)})})]})}),u6t=(e,n)=>e==="all"?!0:e==="archived"?n:!n,nP=[{id:"active",label:Lae,railLabel:iD},{id:"archived",label:X9,railLabel:X9},{id:"all",label:$ae,railLabel:JM}];function f6t({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=so();return h.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[h.jsx(tn,{size:"small",className:"rail-filter-btn",active:e!=="active",title:aE(),"aria-label":aE(),onClick:()=>r(i=>!i),children:h.jsx(wO,{size:13})}),t&&h.jsx("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right",children:nP.map(i=>h.jsxs(Ur,{onClick:()=>{n(i.id),r(!1)},children:[h.jsx("span",{children:i.label()}),e===i.id&&h.jsx(qi,{size:13})]},i.id))})]})}const d6t=14,h6t=500,_6t=1200;function rP({title:e,animate:n}){return n?h.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?h.jsx("span",{"aria-hidden":!0,children:t},r):h.jsx("span",{"aria-hidden":!0,className:"title-reveal-char inline-block animate-[title-char-in_240ms_ease-out_both] [@media((prefers-reduced-motion:_reduce))]:animate-none",style:{animationDelay:`${Math.min(r*d6t,h6t)}ms`},children:t},r))}):h.jsx(h.Fragment,{children:e})}function p6t({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:o,onRename:a,onSetArchived:l,onDelete:u}){var N;const{open:_,setOpen:f,ref:p}=so(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[x,S]=M.useState(!1),[b,v]=M.useState(""),y=M.useRef(null);function w(){var E;v(((E=e.title)==null?void 0:E.trim())||""),S(!0)}function C(){var j;const E=b.trim();S(!1),E&&E!==(((j=e.title)==null?void 0:j.trim())||"")&&a(E)}return M.useEffect(()=>{var E,j;x&&((E=y.current)==null||E.focus(),(j=y.current)==null||j.select())},[x]),h.jsxs("div",{ref:p,role:"button",tabIndex:0,className:`session-row relative flex items-center gap-2 w-full text-start py-[7px] px-2.5 rounded-md text-sm text-text cursor-pointer select-none [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium [&_.session-dot]:w-3.5 [&_.session-dot]:inline-flex [&_.session-dot]:items-center [&_.session-dot]:justify-center [&_.session-dot]:shrink-0 [&_.session-title]:flex-1 [&_.session-title]:min-w-0 [&_.session-title]:overflow-hidden [&_.session-title]:text-ellipsis [&_.session-title]:whitespace-nowrap [&.unread_.session-title]:font-semibold [&_.session-time]:text-xs [&_.session-time]:text-muted [&_.session-time]:shrink-0 [&_.session-menu-btn]:hidden [&_.session-menu-btn]:items-center [&_.session-menu-btn]:justify-center [&_.session-menu-btn]:w-4 [&_.session-menu-btn]:h-4 [&_.session-menu-btn]:-my-0.5 [&_.session-menu-btn]:mx-0 [&_.session-menu-btn]:rounded-sm [&_.session-menu-btn]:text-muted [&_.session-menu-btn]:shrink-0 [&_.session-menu-btn:hover]:text-text [&_.session-menu-btn:hover]:bg-panel [&:hover_.session-menu-btn]:inline-flex [&:focus-within_.session-menu-btn]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-time]:hidden [&:focus-within_.session-time]:hidden [&.menu-open_.session-time]:hidden [&_.busy-dot]:w-[7px] [&_.busy-dot]:h-[7px] [&_.busy-dot]:rounded-full [&_.busy-dot]:bg-primary [&_.busy-dot]:animate-[or-pulse_1.2s_infinite] [&_.busy-dot]:shrink-0 [&_.unread-dot]:w-[7px] [&_.unread-dot]:h-[7px] [&_.unread-dot]:rounded-full [&_.unread-dot]:bg-primary [&_.unread-dot]:shrink-0 [&_.busy-dot.waiting]:animate-none [&_.session-title-input]:flex-1 [&_.session-title-input]:min-w-0 [&_.session-title-input]:py-px [&_.session-title-input]:px-[5px] [&_.session-title-input]:-my-0.5 [&_.session-title-input]:mx-0 [&_.session-title-input]:[font:inherit] [&_.session-title-input]:text-text [&_.session-title-input]:bg-background [&_.session-title-input]:border [&_.session-title-input]:border-primary [&_.session-title-input]:rounded-sm [&_.session-title-input]:outline-none [&.editing]:bg-surface [&.editing]:cursor-default [&.editing_.session-menu-btn]:hidden [&.editing_.session-time]:hidden ${n?"active":""} ${t?"unread":""} ${_?"menu-open":""} ${x?"editing":""}`,title:`${y0[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?Ihe():""}`,onClick:()=>{x||(_?f(!1):o())},onKeyDown:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),_?f(!1):o())},children:[h.jsx("span",{className:"session-dot",children:r?h.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&h.jsx("span",{className:"unread-dot"})}),e.parentSessionId&&!x&&h.jsx(w6,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),x?h.jsx("input",{ref:y,className:"session-title-input","aria-label":xfe(),value:b,onChange:E=>v(E.target.value),onClick:E=>E.stopPropagation(),onBlur:C,onKeyDown:E=>{E.stopPropagation(),E.key==="Enter"?(E.preventDefault(),C()):E.key==="Escape"&&(E.preventDefault(),S(!1))}}):h.jsx("span",{className:"session-title",children:h.jsx(rP,{title:m,animate:i!==void 0},i??"static")}),h.jsx("span",{className:"session-time",children:C3t(e.updatedAt)}),h.jsx("button",{className:"session-menu-btn",title:_E(),"aria-label":_E(),onClick:E=>{E.stopPropagation(),f(j=>!j)},children:h.jsx(p6,{size:14})}),_&&h.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down session-menu",children:[h.jsx(Ur,{onClick:E=>{E.stopPropagation(),f(!1),w()},children:h.jsx("span",{children:nD()})}),h.jsx(Ur,{onClick:E=>{E.stopPropagation(),f(!1),l(!e.archived)},children:h.jsx("span",{children:e.archived?w_e():jse()})}),h.jsx(Ur,{danger:!0,onClick:E=>{E.stopPropagation(),f(!1),u()},children:h.jsx("span",{children:tD()})})]})]})}const jj=[cO,yO,r_,m6],kw=[{box:"border-accent-blue/45",icon:"text-accent-blue"},{box:"border-accent-green/45",icon:"text-accent-green"},{box:"border-accent-amber/45",icon:"text-accent-amber"},{box:"border-primary/45",icon:"text-primary"}],Aj="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function m6t({onClose:e,onConfigureSsh:n}){var b,v;const t=Cn({mutationFn:y=>Klt(...y)}),r=ht(bL()),s=ht(iut()),i=r.data??null,o=s.data??[],[a,l]=M.useState(""),u=i?null:((b=r.error)==null?void 0:b.message)??((v=s.error)==null?void 0:v.message)??null,[_,f]=M.useState(null),p=M.useRef(null);a6(p,e);async function m(y){const w=window.open("/remote-launch","_blank");if(!w){ir(mMe(),"error");return}f(y);try{const C=await t.mutateAsync([y,{theme:But(),locale:T()}]);w.location.replace(C.gatewayUrl),e()}catch(C){w.close(),ir(C instanceof Error?C.message:String(C),"error")}finally{f(null)}}const x=i==null?void 0:i.filter(y=>y.host.toLocaleLowerCase().includes(a.trim().toLocaleLowerCase())),S=new Map(o.map(y=>[y.host,y]));return Fo.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&e()},children:h.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[h.jsx(tn,{className:"absolute end-3.5 top-3.5","aria-label":VAe(),onClick:e,children:h.jsx(es,{size:16})}),h.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[h.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:ED()}),h.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:XAe()}),h.jsx(zs,{"data-initial-focus":!0,className:"mt-4",value:a,onChange:y=>l(y.target.value),placeholder:nN(),"aria-label":nN()})]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?h.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):i===null?h.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[h.jsx(Ot,{})," ",qD()]}):(x==null?void 0:x.length)===0?h.jsx("p",{className:"m-3 text-sm text-subtext",children:eMe()}):x==null?void 0:x.map(y=>{const w=S.get(y.host);return h.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:_===y.host,onClick:()=>void m(y.host),children:[h.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:y.host}),_===y.host?h.jsx(Ot,{}):w?h.jsx("span",{className:"text-sm text-subtext",children:lMe()}):null]},y.host)})}),h.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:h.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[h.jsx(wO,{size:15}),JD()]})})]})}),document.body)}function g6t({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:o,experimentsActive:a,filesActive:l,artifactsActive:u,onOpenExperiments:_,onOpenArtifacts:f,onOpenFile:p,onOpenRun:m,runExperimentName:x,onOpenExperiment:S,experimentName:b,onOpenPlan:v,onOpenSubagent:y,onOpenWorktree:w,runtime:C,onOpenDemoWelcome:N,composerPrefill:E=null,activeSessionId:j,onActiveSessionChange:z,preferredAgent:R,onPreferredAgentChange:O,children:I}){var Ia,uo,Du,oa,fo;const F=Cn({mutationFn:ae=>Bct(...ae)}),U=Cn({mutationFn:ae=>Ict(...ae)}),q=Cn({mutationFn:ae=>Mct(...ae)}),Y=Cn({mutationFn:ae=>Lct(...ae)}),V=Cn({mutationFn:ae=>Oct(...ae)}),Z=Cn({mutationFn:Dct}),te=M.useMemo(()=>ka(e),[e]),{data:P=k3t}=ht(te),L=M.useCallback(ae=>{Wr(te.queryKey,be=>{if(!be)return;const je=typeof ae=="function"?ae(be):ae,Be=new Map(be.map(X=>[X.id,X]));for(const X of je)Be.get(X.id)!==X&&Ga(Je,te.queryKey,X.id),Be.delete(X.id);for(const X of Be.keys())Ga(Je,te.queryKey,X);return je})},[te]),[$,H]=M.useState(!1),[G,ne]=M.useState(!1),oe=j,le=M.useRef(z);le.current=z;const se=M.useRef({projectId:e});se.current.projectId!==e&&(se.current={projectId:e});const[Q,ce]=M.useState(new Set),[ee,ue]=M.useState("active"),[de,ye]=M.useState(""),[Ae,Ve]=M.useState([]),Ge=M.useRef(0),$e=M.useRef({projectId:e,activeId:oe,mainView:i});($e.current.projectId!==e||$e.current.activeId!==oe||$e.current.mainView!==i)&&($e.current={projectId:e,activeId:oe,mainView:i});const[ut,pt]=M.useState([]),[Ut,It]=M.useState(null),[$t,tt]=M.useState(null),mt=M.useRef(Promise.resolve()),At=M.useRef(0),ke=M.useRef(0),[De,We]=M.useState(null),rt=M.useRef(null),bt=M.useRef(!1),Wt=M.useRef(null),[Pe,Dt,ln]=vut(e,i==="chat"?oe:null),{data:kn=b6t}=ht(Wp()),[Jt,Gn]=M.useState(R);M.useEffect(()=>Gn(R),[R]);const[Gt,sn]=M.useState({}),[Wn,Tn]=M.useState(d0),[Er,rr]=M.useState(null),Or=M.useRef(!1),Nr=M.useRef(null),[yt,fn]=M.useState(null),wn=M.useRef(!1),Xt=M.useRef(null),[ar,cn]=M.useState(new Map),hn=M.useRef(new Map),Pn=M.useRef(null),gt=M.useRef(null),vt=M.useRef(null),qe=M.useRef(!0),[ft,dr]=M.useState(!0),Rt=M.useRef(null),Vt=so(),sr=M.useCallback(ae=>{var be;Ge.current+=1,Ve(je=>[...je,{id:`annotation-${Ge.current}`,...ae}]),(be=Rt.current)==null||be.focus()},[]),jn=m3t(gt,sr);g3t(Ae),M.useEffect(()=>{Ve([]),jn.dismiss()},[oe,e,jn.dismiss]);const{data:Ji=v6t}=ht(uut()),[ku,ea]=M.useState(0),[Ta,vs]=M.useState(!1),[ii,zr]=M.useState(0),js=M.useRef(!1);function Tr(ae){if(!Fn)return;if(ae.source==="command"&&ae.name==="plan"){nc(de,Fn);return}const be=gj(de,Fn,ae.name,2);ye(be.text),window.requestAnimationFrame(()=>{var je,Be;(je=Rt.current)==null||je.focus(),(Be=Rt.current)==null||Be.setSelectionRange(be.cursor,be.cursor),zr(be.cursor)})}function Bn(ae){const be=ae.selectionStart;if(js.current||be!==ae.selectionEnd)return!1;const je=gw(de,be);if(!je||je.end!==be||!as(je.query))return!1;const Be=vj(de,je);return ye(Be.text),zr(Be.cursor),window.requestAnimationFrame(()=>ae.setSelectionRange(Be.cursor,Be.cursor)),!0}function Si(ae){It(null);let Be=ut.reduce((X,pe)=>X+pe.size,0);for(const X of ae){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(X.type))continue;if(X.size>31457280){It(Wse({name:ze(X.name)}));continue}if(Be+X.size>41943040){It(Yse());continue}Be+=X.size;const pe=new FileReader;pe.onload=()=>{const we=pe.result;pt(Me=>[...Me,{dataUrl:we,mediaType:X.type,name:X.name,size:X.size}])},pe.readAsDataURL(X)}}function ja(ae){const be=Array.from(ae.clipboardData.items).filter(je=>je.kind==="file"&&(je.type.startsWith("image/")||je.type==="application/pdf")).map(je=>je.getAsFile()).filter(je=>je!==null);be.length>0&&(ae.preventDefault(),Si(be))}const en=P.find(ae=>ae.id===oe),Gs=Jt??z0t(kn),bs=en?{harness:en.harness,model:Gt.model??en.model,serviceTier:Gt.serviceTier!==void 0?Gt.serviceTier:en.serviceTier,permissionMode:Gt.permissionMode??en.permissionMode,reasoningLevel:Gt.reasoningLevel??en.reasoningLevel}:Gs?{...Gs,...Gt}:null,st=bs?kn.find(ae=>ae.id===bs.harness):void 0,Ft=st==null?void 0:st.options,ki=M.useMemo(()=>U5t(Ji,Ft==null?void 0:Ft.planActivation),[Ji,Ft==null?void 0:Ft.planActivation]),jr=xj(de),As=jr!==null,Fn=gw(de,ii),Xn=(Fn==null?void 0:Fn.query)??null,ys=Xn===null?[]:ki.filter(ae=>ae.name.startsWith(Xn)),or=!As&&Xn!==null&&(Fn==null?void 0:Fn.end)===ii&&ys.some(ae=>ae.name!==Xn)&&!Ta?ys:[],Ir=or.length>0,Br=Math.min(ku,Math.max(0,or.length-1));M.useEffect(()=>ea(0),[Xn]);const $r=bs&&st&&st.models.length>0&&!st.models.some(ae=>ae.id===bs.model)?st.models[0].id:(bs==null?void 0:bs.model)??null,jt=bs&&{...bs,model:$r,serviceTier:Z1(st,$r,bs.serviceTier),reasoningLevel:mL(st,$r,bs.reasoningLevel)},Aa=Xv(st,jt==null?void 0:jt.model),ta=ae=>{if(!jt)return;const be={...jt,...ae},je={};ae.model!==void 0&&ae.model!==jt.model&&(je.model=ae.model),ae.serviceTier!==void 0&&ae.serviceTier!==jt.serviceTier&&(je.serviceTier=ae.serviceTier),ae.permissionMode!==void 0&&ae.permissionMode!==jt.permissionMode&&(je.permissionMode=ae.permissionMode),ae.reasoningLevel!==void 0&&ae.reasoningLevel!==jt.reasoningLevel&&(je.reasoningLevel=ae.reasoningLevel),Tn(Be=>({...Be,...je})),Gn(be),O(be).catch(()=>{}),en?sn(Be=>({...Be,...ae})):ae.harness&&ae.harness!==jt.harness&&sn({})},Vr=M.useCallback(ae=>{const be=mt.current.catch(()=>{}).then(()=>{if(!Mn(te.queryKey))throw new DOMException("Workspace changed","AbortError");return ae()});return mt.current=be.then(()=>{},()=>{}),be},[te]),Rs=ae=>{if(ae==="plan"&&(st==null?void 0:st.id)==="claude-code"?(Tn(Be=>({...Be,permissionMode:ae})),sn(Be=>({...Be,permissionMode:ae}))):(sn(Be=>{const X={...Be};return delete X.permissionMode,X}),ta({permissionMode:ae})),!en)return;const be=en.id,je=++At.current;tt(null),Vr(()=>F.mutateAsync([be,ae])).then(Be=>{L(X=>X.map(pe=>pe.id===Be.id?Be:pe)),At.current===je&&sn(X=>{const pe={...X};return delete pe.permissionMode,pe})}).catch(()=>{At.current===je&&(sn(Be=>{const X={...Be};return delete X.permissionMode,X}),tt(T_e()))})},Yo=ae=>ta({reasoningLevel:ae}),Ci=(jt==null?void 0:jt.harness)==="claude-code"?jt.permissionMode==="plan":(Ft==null?void 0:Ft.planActivation)==="command"?De??(en==null?void 0:en.planMode)??!1:!1;M.useEffect(()=>{De===null||(en==null?void 0:en.planMode)!==De||(rt.current=null,We(null))},[en==null?void 0:en.planMode,De]);async function na(ae){if(Tn(Be=>({...Be,planMode:ae})),rt.current=ae,We(ae),!en)return;const be=en.id,je=++ke.current;tt(null);try{const Be=await Vr(()=>U.mutateAsync([be,ae]));L(X=>X.map(pe=>pe.id===Be.id?Be:pe)),ke.current===je&&(rt.current=null,We(null),tt(null))}catch(Be){throw ke.current===je&&(rt.current=null,We(null)),Be}}async function tc(){if((jt==null?void 0:jt.harness)==="claude-code"){Rs("auto");return}if(en)try{await na(!1)}catch{tt(Nie())}}async function Eu(){const ae=!Ci;try{if((jt==null?void 0:jt.harness)==="claude-code")Rs(ae?"plan":"auto");else if((Ft==null?void 0:Ft.planActivation)==="command")await na(ae);else throw new Error(d2())}catch{tt(bE())}}function nc(ae,be){const je=vj(ae,be);ye(je.text),vs(!0),Eu(),window.requestAnimationFrame(()=>{var Be,X;(Be=Rt.current)==null||Be.focus(),(X=Rt.current)==null||X.setSelectionRange(je.cursor,je.cursor),zr(je.cursor)})}const xs=M.useCallback(async(ae=!1)=>{const be=se.current;if(be.projectId!==e||!Mn(te.queryKey))return null;const je=(Je.getQueryData(te.queryKey)??[]).map(Be=>Be.id);try{const Be=await Je.fetchQuery({...te,...ae?{staleTime:0}:{}});if(se.current!==be||!Mn(te.queryKey))return null;const X=Be.filter(we=>!cu.has(we.id)),pe=new Set(X.map(we=>we.id));for(const we of je)pe.has(we)||Ru(we);return hn.current=new Map(X.map(we=>[we.id,we.title])),X}catch{return null}},[e]),ao=M.useCallback(async ae=>{se.current.projectId!==e||!Mn(te.queryKey)||await Promise.all([Je.fetchQuery({...Hl(ae),staleTime:0}),xs(!0)]).catch(()=>{})},[e,xs]);M.useEffect(()=>{const ae=iO();ce(e===g2?new Set([K3,Q3].filter(je=>!ae.has(je))):new Set),ye(""),pt([]),cn(new Map),hn.current=new Map,xs();const be=se.current;return()=>{se.current===be&&(se.current={projectId:e})}},[e,xs]),M.useEffect(()=>{Tn(d0),Xt.current=null},[oe]),M.useEffect(()=>tv(ae=>{switch(ae.type){case"session":{if(ae.session.projectId!==e||cu.has(ae.session.id))return;const be=hn.current.has(ae.session.id),je=hn.current.get(ae.session.id)!==ae.session.title;hn.current.set(ae.session.id,ae.session.title),be&&je&&ae.session.titleSource==="generated"&&(cn(Be=>{const X=new Map(Be);return X.set(ae.session.id,(Be.get(ae.session.id)??0)+1),X}),window.setTimeout(()=>{cn(Be=>{if(!Be.has(ae.session.id))return Be;const X=new Map(Be);return X.delete(ae.session.id),X})},_6t));break}case"sessionDeleted":Ru(ae.sessionId);break}}),[e]),M.useEffect(()=>tv(ae=>{ae.type==="reconnected"&&xs(!0)}),[xs]);const rc=oe?Pe.messagesBySession[oe]??Ej:Ej,Ra=oe?Pe.activeLeafBySession[oe]??null:null;Nr.current=Ra;const hr=M.useMemo(()=>upt(rc,Ra),[rc,Ra]),lr=oe?Pe.busySessions.has(oe):!1,Xo=!lr&&!!(st!=null&&st.agentReady),ra=lr&&$O(hr)!=null,oo=lr&&hpt(hr),Kt=oe?Pe.queuedBySession[oe]??[]:[],Ei=Kt.some(ae=>ae.dispatchState==="retrying"),lo=Kt.findIndex(ae=>ae.dispatchState==="blocked"),Ws=Kt.reduce((ae,be)=>be.dispatchState!=="retrying"||typeof be.nextRetryAt!="number"?ae:ae===null?be.nextRetryAt:Math.min(ae,be.nextRetryAt),null),[Ni,Zo]=M.useState(()=>Date.now());M.useEffect(()=>{if(!Ei||Ws===null||(Zo(Date.now()),Ws<=Date.now()))return;const ae=window.setInterval(()=>{const be=Date.now();Zo(be),be>=Ws&&window.clearInterval(ae)},1e3);return()=>window.clearInterval(ae)},[Ei,Ws]),M.useEffect(()=>{const ae=Kt.reduce((be,je)=>je.planMode??be,void 0);ae!==void 0?(bt.current=!0,rt.current=ae,We(ae)):bt.current&&(bt.current=!1,rt.current=null,We(null))},[Kt]);const Ma=!!oe&&!(oe in Pe.messagesBySession)&&ln.isPending,Vs=M.useMemo(()=>{const ae=new Set;for(const be of Pe.busySessions)(Pe.messagesBySession[be]??[]).some(je=>je.parts.some(Be=>Be.type==="prompt"&&Be.prompt&&!Be.prompt.resolved&&Be.prompt.nativeId))&&ae.add(be);return ae},[Pe.busySessions,Pe.messagesBySession]),Jo=oe?Vs.has(oe):!1,Hn=en,Nu=Hn?ar.get(Hn.id):void 0,Kr=M.useMemo(()=>{var ae;for(let be=hr.length-1;be>=0;be--)for(const je of hr[be].parts)if(je.type==="prompt"&&((ae=je.prompt)==null?void 0:ae.kind)==="plan"&&!je.prompt.resolved)return{promptId:je.id,plan:je.prompt.plan??"",synthesized:!!je.prompt.synthesized};return null},[hr]),xr=M.useMemo(()=>{const ae=Hn==null?void 0:Hn.harness;if(!oe||ae!=="claude-code"&&ae!=="codex")return null;for(let be=hr.length-1;be>=0;be--)for(const je of hr[be].parts)if(!(je.type!=="prompt"||!je.prompt||je.prompt.resolved)&&je.prompt.kind==="question")return je.prompt.nativeId&&!Pe.busySessions.has(oe)?null:je.id;return null},[hr,Hn==null?void 0:Hn.harness,oe,Pe.busySessions]),ai=As&&!xr,as=ae=>!xr&&!As&&ki.some(be=>be.name===ae),[Ar,el]=M.useState(null),sa=Ar&&Ar.sessionId===oe?Ar:null;M.useEffect(()=>{if(!Ar)return;const ae=Pe.busySessions.has(Ar.sessionId),be=Ar.sessionId===oe&&Kr&&Kr.promptId!==Ar.promptId;(!ae||be)&&el(null)},[Ar,Kr,Pe.busySessions,oe]);const td=M.useMemo(()=>VS(hr),[hr]),tl=lr&&!!(st!=null&&st.supportsSteering)&&!!(st!=null&&st.agentReady)&&!Kr&&!xr&&!td&&ut.length===0&&Ae.length===0,Da=M.useMemo(()=>v&&oe?(ae,be,je)=>v(ae,oe,be,je):void 0,[v,oe]),nl=M.useMemo(()=>y&&oe?(ae,be,je)=>y(oe,ae,be,je):void 0,[y,oe]),zi=M.useMemo(()=>p&&((ae,be,je,Be,X)=>p(ae,oe??void 0,be,je,Be,X)),[p,oe]);M.useEffect(()=>{At.current+=1,ke.current+=1;const ae=(oe?Pe.queuedBySession[oe]??[]:[]).reduce((be,je)=>je.planMode??be,void 0);bt.current=ae!==void 0,rt.current=ae??null,We(ae??null),sn({}),tt(null)},[oe]);const ia=i==="chat"&&(hr.length>0||lr),La=(jt==null?void 0:jt.harness)??null,__=(jt==null?void 0:jt.model)??null,sc=ln.data?null:ln.error,Ms=i==="chat"&&!ia&&!Ma&&!sc,nd=ht({...Dut(e,La??"claude-code",__,T()),enabled:Ms&&La!==null,subscribed:Ms&&La!==null}),zu=((Ia=nd.data)==null?void 0:Ia.prompts)??null,p_=La!==null&&nd.isPending,rd=e===g2?"demo":"project",sd=ae=>{ye(ae),vs(!1),window.requestAnimationFrame(()=>{const be=Rt.current;be&&(be.focus(),be.setSelectionRange(ae.length,ae.length),zr(ae.length))})};M.useEffect(()=>{E&&(ye(E),vs(!1),zr(E.length))},[E]);const ic=M.useCallback(ae=>{const be=ae.scrollHeight-ae.scrollTop-ae.clientHeight<60;qe.current=be,dr(be)},[]),aa=M.useCallback(()=>{var ae;qe.current=!0,dr(!0),(ae=vt.current)==null||ae.call(vt)},[]);M.useEffect(()=>{const ae=Pn.current,be=gt.current;if(!ae||!be)return;const je=new ResizeObserver(()=>{var Be;qe.current?(Be=vt.current)==null||Be.call(vt):ic(ae)});return je.observe(ae),je.observe(be),()=>je.disconnect()},[ia,ic]);const id=M.useCallback(ae=>{ae.currentTarget.blur(),aa()},[aa]);async function ac({queue:ae=!1}={}){var ld,hm,il,cd,hc,ud;if(of({name:"first_action",surface:rd,action:"typed_prompt"}),wn.current)return;const be=de.trim(),je=xr?null:G5t(be,Ft==null?void 0:Ft.planActivation),Be=!!je,X=!Ci,pe=bj(Ft==null?void 0:Ft.planActivation,Be?X:void 0,rt.current),we=Be&&(st==null?void 0:st.id)==="claude-code"?X?"plan":"auto":void 0,Me=je?je.prompt:be,Ce=ut,et=Ae,ot=et.map(An=>({text:An.text})),Ht=e,Vn=i;let Ls=oe;const _r=()=>{const An=$e.current;return Mn(te.queryKey)&&An.projectId===Ht&&An.activeId===Ls&&An.mainView===Vn},ws=()=>{_r()&&(ye(An=>An||be),pt(An=>An.length?An:Ce),Ve(An=>An.length?An:et))};if(Be&&!Me&&Ce.length===0&&et.length===0){ye(""),vs(!1);try{if((st==null?void 0:st.id)==="claude-code")Rs(X?"plan":"auto");else if((Ft==null?void 0:Ft.planActivation)==="command")await na(X);else throw new Error(d2())}catch{tt(bE()),ws()}return}const Zn=jt?{...jt,...we?{permissionMode:we}:{}}:null;we&&Rs(we);let Pr=null;const li=rt.current;Be&&(Ft==null?void 0:Ft.planActivation)==="command"&&(Pr=++ke.current,rt.current=X,We(X));const la=()=>{!_r()||Pr===null||ke.current!==Pr||(rt.current=li,We(li))};if(!Me&&Ce.length===0&&et.length===0)return;if((Me||et.length>0)&&xr&&Ce.length===0){ye(""),Ve([]),oi({promptId:xr,answers:[],note:Me||void 0,annotations:ot}).then(An=>{An||ws()});return}const sl=JSON.stringify({text:Me,images:Ce.map(An=>({mediaType:An.mediaType,name:An.name,dataUrl:An.dataUrl})),annotations:ot,settings:Zn?{model:Zn.model,serviceTier:Zn.serviceTier,permissionMode:Zn.permissionMode,planMode:pe,reasoningLevel:Zn.reasoningLevel}:null}),dc=((ld=Xt.current)==null?void 0:ld.signature)===sl?Xt.current.id:`ct_${crypto.randomUUID()}`;if(Xt.current={signature:sl,id:dc},lr){if(!oe||!(st!=null&&st.agentReady)){la();return}const An=oe;ye(""),pt([]),Ve([]),It(null);const Ks=Zn?{model:Zn.model,serviceTier:Zn.serviceTier,permissionMode:Zn.permissionMode,planMode:(Ft==null?void 0:Ft.planActivation)==="command"?pe??(en==null?void 0:en.planMode):pe,reasoningLevel:Zn.reasoningLevel}:{};_r()&&sn({});const ci=Ce.map(Fr=>({mediaType:Fr.mediaType,dataBase64:Fr.dataUrl.slice(Fr.dataUrl.indexOf(",")+1),name:Fr.name}));try{(hm=(await Vr(()=>vN(An,Me,Ks,ci.length?ci:void 0,ot,dc,tl&&!ae&&!Be?"steer":void 0))).turn)!=null&&hm.existing&&await ao(An),_r()&&Tn(d0),((il=Xt.current)==null?void 0:il.id)===dc&&(Xt.current=null)}catch{la(),ws()}return}if(!(st!=null&&st.agentReady)){la();return}if(!Zn){la();return}let Ti=oe;try{wn.current=!0;try{if(!Ti){const v_=await Tu(Zn,pe);Ti=v_.id,Ls=v_.id}if(!Mn(te.queryKey))return;const $n=Hl(Ti);await Je.fetchQuery({...$n,...((cd=Je.getQueryState($n.queryKey))==null?void 0:cd.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{wn.current=!1}if(!Mn(te.queryKey))return;_r()&&(ye($n=>$n===de?"":$n),pt($n=>$n===Ce?[]:$n),Ve($n=>$n===et?[]:$n),It(null)),Dt({type:"optimisticUser",sessionId:Ti,text:Me||Bse(),attachments:Ce.map($n=>({url:$n.dataUrl,mediaType:$n.mediaType,name:$n.name})),annotations:et}),Dt({type:"busy",sessionId:Ti,busy:!0}),_r()&&aa(),_r()&&ee==="archived"&&ue("active");const An=Zn?{model:Zn.model,serviceTier:Zn.serviceTier,permissionMode:Zn.permissionMode,planMode:pe,reasoningLevel:Zn.reasoningLevel}:{};_r()&&sn({});const Ks=Ce.map($n=>({mediaType:$n.mediaType,dataBase64:$n.dataUrl.slice($n.dataUrl.indexOf(",")+1),name:$n.name})),ci=Ti;if(!ci)throw new Error(The());(hc=(await Vr(()=>vN(ci,Me,An,Ks.length?Ks:void 0,ot,dc))).turn)!=null&&hc.existing&&await ao(ci),_r()&&Tn(d0),((ud=Xt.current)==null?void 0:ud.id)===dc&&(Xt.current=null)}catch(An){if(!Mn(te.queryKey)||(ws(),la(),!Ti))return;const Ks=An instanceof Error?An.message:String(An);if(!/session is busy/i.test(Ks)&&await Je.fetchQuery({...ka(e),staleTime:0}).then(Fr=>{var Lu;return!!((Lu=Fr.find($n=>$n.id===Ti))!=null&&Lu.busy)}).catch(()=>!1)){_r()&&(ye(Fr=>Fr===Me?"":Fr),pt(Fr=>Fr===Ce?[]:Fr),Ve(Fr=>Fr===et?[]:Fr));return}Dt({type:"busy",sessionId:Ti,busy:!1}),Dt({type:"localError",sessionId:Ti,text:Vie({error:ze(Ks)})})}}async function Tu(ae,be){const je=$e.current,Be=se.current,X=await q.mutateAsync([e,ae.harness,{model:ae.model,serviceTier:ae.serviceTier,permissionMode:ae.permissionMode,planMode:be,reasoningLevel:ae.reasoningLevel}]);return se.current===Be&&(L(pe=>[X,...pe.filter(we=>we.id!==X.id)]),Je.getQueryData(te.queryKey)||xs(!0)),se.current===Be&&$e.current===je&&(le.current(X.id,{replace:!0}),$e.current={...je,activeId:X.id}),X}function ju(){const ae=J5t(de);ye(ae),window.requestAnimationFrame(()=>{var be,je;(be=Rt.current)==null||be.focus(),(je=Rt.current)==null||je.setSelectionRange(ae.length,ae.length),zr(ae.length)})}async function ad(){const ae=jr;if(!ae)return;if(tt(null),lr){tt(eie());return}const be=de,je=$e.current;let Be=oe;const X=()=>{const Ce=$e.current;return Ce.projectId===je.projectId&&Ce.activeId===Be&&Ce.mainView===je.mainView},pe=()=>{X()&&ye(Ce=>Ce||be)};ye(""),vs(!1);let we=oe;if(!we){if(!(st!=null&&st.agentReady)||!jt){pe(),tt(d2());return}try{const Ce=bj(Ft==null?void 0:Ft.planActivation,void 0,rt.current);we=(await Tu(jt,Ce)).id,Be=we,X()&&sn({})}catch(Ce){pe();const et=Ce instanceof Error?Ce.message:String(Ce);X()&&tt(K9({error:ze(et)}));return}}X()&&ee==="archived"&&ue("active");const Me=`${zf}shell-${Date.now()}`;Dt({type:"localShell",sessionId:we,id:Me,command:ae}),X()&&aa();try{const{message:Ce}=await qct(we,ae);Dt({type:"upsertMessage",sessionId:we,message:Ce})}catch(Ce){const et=Ce instanceof Error?Ce.message:String(Ce);Dt({type:"localShell",sessionId:we,id:Me,command:ae,error:K9({error:ze(et)})})}}function oc(){oe&&Vct(oe).catch(()=>{tt(Qhe())})}const m_=M.useCallback(async(ae,be)=>{if(!(!oe||Or.current)){Or.current=!0,tt(null),rr(ae);try{const je=mpt({model:Wn.model,serviceTier:Wn.serviceTier,permissionMode:Wn.permissionMode,planMode:Wn.planMode,reasoningLevel:Wn.reasoningLevel}),Be=oe;(await Uct(Be,ae,be,je)).turn.existing&&await ao(Be),Tn(d0)}catch{tt(Jde())}finally{Or.current=!1,rr(null)}}},[oe,Wn,ao]),od=M.useCallback((ae,be)=>{if(!oe||lr||!(st!=null&&st.agentReady))return;const je=oe;Dt({type:"busy",sessionId:je,busy:!0}),aa(),Vr(()=>Gct(je,ae,be)).catch(Be=>{Dt({type:"busy",sessionId:je,busy:!1});const X=Be instanceof Error?Be.message:String(Be);Dt({type:"localError",sessionId:je,text:ohe({error:ze(X)})})})},[oe,lr,st==null?void 0:st.agentReady,aa,Vr]),Ds=M.useCallback(ae=>{if(!oe||lr)return;const be=oe,je=Nr.current;Dt({type:"activeLeaf",sessionId:be,leafId:ae}),Vr(()=>Wct(be,ae)).catch(Be=>{Dt({type:"activeLeaf",sessionId:be,leafId:je});const X=Be instanceof Error?Be.message:String(Be);Dt({type:"localError",sessionId:be,text:Jhe({error:ze(X)})})})},[oe,lr,Vr]);function En(ae){if(!oe)return;const be=oe;Pct(be,ae).then(({removed:je})=>{if(je)return ao(be)}).catch(()=>tt(rhe()))}async function Au(ae){if(!oe||yt)return;const be=oe;tt(null),fn(ae);try{await Fct(be,ae),await ao(be)}catch{tt(phe())}finally{fn(null)}}M.useEffect(()=>{if(!lr||i!=="chat")return;function ae(be){var je;be.key!=="Escape"||be.defaultPrevented||(be.preventDefault(),oc(),(je=Rt.current)==null||je.focus())}return document.addEventListener("keydown",ae),()=>document.removeEventListener("keydown",ae)},[lr,oe,i]);function Ru(ae){Kv(ae),$e.current.projectId===e&&$e.current.activeId===ae&&$e.current.mainView==="chat"&&le.current(null,{replace:!0}),ce(be=>{if(!be.has(ae))return be;const je=new Set(be);return je.delete(ae),je}),hn.current.delete(ae)}function lc(ae,be){const je=ae.archived;L(Be=>Be.map(X=>X.id===ae.id?{...X,archived:be}:X)),Y.mutateAsync([ae.id,be]).catch(()=>{L(Be=>Be.map(X=>X.id===ae.id?{...X,archived:je}:X))})}function g_(ae,be){const je=ae.title;L(Be=>Be.map(X=>X.id===ae.id?{...X,title:be}:X)),V.mutateAsync([ae.id,be]).catch(()=>{L(Be=>Be.map(X=>X.id===ae.id?{...X,title:je}:X))})}async function ps(ae){var je;const be=((je=ae.title)==null?void 0:je.trim())||wg();if(window.confirm(bie({title:Ro(be)}))){try{await Z.mutateAsync(ae.id)}catch(Be){ir(Sie({title:Ro(be),error:ze(Be instanceof Error?Be.message:String(Be))}),"error");return}Ru(ae.id)}}const oi=M.useCallback(ae=>{if(!oe)return Promise.resolve(!1);const be=oe;return Dt({type:"busy",sessionId:be,busy:!0}),Vr(()=>Kct(be,ae)).then(()=>!0).catch(()=>!1).finally(()=>{Mn(te.queryKey)&&(Je.fetchQuery({...Hl(be),staleTime:0}).catch(()=>{}),Je.fetchQuery({...ka(e),staleTime:0}).catch(()=>{}))})},[oe,e,Vr,te]),co=P.filter(ae=>u6t(ee,ae.archived)),rl=/Mac|iPhone|iPad/.test(navigator.platform),Oa=rl?"⌘ ⇧ Enter":"Ctrl + Shift + Enter",cc=rl?"⌘ Enter":"Ctrl + Enter",os=M.useCallback(()=>{ue("active"),z(null)},[z]),uc=M.useCallback(ae=>{ue("all"),z(ae)},[z]);M.useEffect(()=>{const ae=be=>{be.repeat||be.key!=="Enter"||!be.metaKey&&!be.ctrlKey||be.altKey||!be.shiftKey||(be.preventDefault(),os())};return document.addEventListener("keydown",ae),()=>document.removeEventListener("keydown",ae)},[os]);const ls=h.jsxs("aside",{className:"session-rail w-68 shrink-0 flex flex-col mt-5 me-3.5 mb-5 ms-0 bg-background min-h-0 [&_.rail-body]:flex-1 [&_.rail-body]:min-h-0 [&_.rail-body]:overflow-y-auto [&_.rail-body]:py-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,h.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[h.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${l?"active":""}`,onClick:w,children:[h.jsx(J0,{size:15}),ece()]}),h.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${u?"active":""}`,"data-onboarding":"nav-artifacts",onClick:f,children:[h.jsx(v6,{size:15}),eoe()]}),h.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${a?"active":""}`,onClick:_,children:[h.jsx(m6,{size:15}),Vle()]}),h.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${i==="skills"?"active":""}`,onClick:()=>o("skills"),children:[h.jsx(lO,{size:15}),hle()]}),$5t.map(ae=>h.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${i!=="chat"&&i!=="skills"&&ae.activeTabs.includes(i)?"active":""}`,"data-onboarding":ae.id==="compute"?"nav-compute":void 0,onClick:()=>o(ae.id),children:[ae.icon,ae.label()]},ae.id))]}),h.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-1.5 ps-4.5",children:[h.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((uo=nP.find(ae=>ae.id===ee))==null?void 0:uo.railLabel())??iD()}),h.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[h.jsxs("button",{className:"rail-section-new inline-flex items-center gap-1 py-[3px] px-1.5 rounded-sm text-subtext text-sm font-medium [&:hover]:text-text [&:hover]:bg-surface tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":Oa,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:os,children:[h.jsx(y6,{size:13}),Vfe()]}),h.jsx(f6t,{value:ee,onChange:ue})]})]}),h.jsxs("div",{className:"rail-body",children:[co.map(ae=>h.jsx(p6t,{session:ae,active:ae.id===oe&&i==="chat",unread:Q.has(ae.id),busy:Pe.busySessions.has(ae.id),waiting:Vs.has(ae.id),revealTitle:ar.get(ae.id),onOpen:()=>{if(z(ae.id),e===g2){Xdt(ae.id);const be=Tot[ae.id];be&&(of({name:"demo_experiment_started",kind:"curated",experiment:be}),of({name:"first_action",surface:"demo",action:"open_experiment"}))}ce(be=>{if(!be.has(ae.id))return be;const je=new Set(be);return je.delete(ae.id),je})},onRename:be=>g_(ae,be),onSetArchived:be=>lc(ae,be),onDelete:()=>void ps(ae)},ae.id)),co.length===0&&h.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:ee==="archived"?lae():P.length>0?eae():dae()})]}),C.kind==="ssh"?h.jsx(av,{runtime:C}):h.jsx("div",{className:"relative shrink-0 border-t border-border",children:h.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[h.jsx(tn,{size:"small","aria-label":ED(),"aria-haspopup":"dialog",onClick:()=>H(!0),children:h.jsx(H4,{size:14,className:"shrink-0"})}),h.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[h.jsx("span",{className:"truncate text-sm leading-tight",children:CD()}),h.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",ze(C.version)]})]})]})}),$&&h.jsx(m6t,{onClose:()=>H(!1),onConfigureSsh:()=>{H(!1),ne(!0)}}),G&&h.jsx(j$,{onClose:()=>{ne(!1),H(!0)}})]}),fc=`chat-header flex items-center gap-2 py-0 px-4 bg-background shrink-0 h-12 relative z-4 w-full max-w-readable my-0 mx-auto [&.rail-hidden]:max-w-none [&.rail-hidden]:py-0 [&.rail-hidden]:px-0.5 [&::after]:content-[''] [&::after]:absolute [&::after]:top-full [&::after]:start-0 [&::after]:end-0 [&::after]:h-6 [&::after]:bg-[linear-gradient(to_bottom,_var(--base),_transparent)] [&::after]:pointer-events-none${r?"":" rail-hidden"}`,Mu=!r&&h.jsx(tn,{title:pE(),"aria-label":pE(),onClick:s,children:h.jsx(vO,{size:15})});return i!=="chat"?h.jsxs(h.Fragment,{children:[r&&ls,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&h.jsx("div",{className:fc,children:Mu}),h.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:I})]})]}):h.jsxs(h.Fragment,{children:[r&&ls,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[h.jsxs("div",{className:fc,children:[Mu,h.jsx(ep,{variant:"header",title:Hn?((Du=Hn.title)==null?void 0:Du.trim())||wg():Q9(),children:Hn?h.jsx(rP,{title:((oa=Hn.title)==null?void 0:oa.trim())||wg(),animate:Nu!==void 0},Nu??"static"):Q9()}),N&&h.jsx(tn,{"data-tip":Y9(),"aria-label":Y9(),onClick:N,children:h.jsx(Cht,{size:15})})]}),sc?h.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[h.jsx("p",{children:sc.message}),h.jsx(Oe,{onClick:()=>void ln.refetch(),children:Hi()})]}):Ma?h.jsxs("div",{className:"chat-loading flex-1 flex items-center justify-center gap-3 text-subtext text-xl p-5 [&_.spinner]:w-5.5 [&_.spinner]:h-5.5 [&_.spinner]:border-[3px]","aria-live":"polite","aria-busy":"true",children:[h.jsx(Ot,{}),h.jsx("span",{children:Ece()})]}):ia?h.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:Pn,tabIndex:0,role:"region","aria-label":((fo=Hn==null?void 0:Hn.title)==null?void 0:fo.trim())||wg(),onScroll:ae=>{ic(ae.currentTarget),jn.dismiss()},children:h.jsxs("div",{className:"chat-thread-inner max-w-readable my-0 mx-auto pt-4 px-4 pb-8 flex flex-col gap-4",ref:gt,children:[h.jsx(c6t,{scrollRef:Pn,scrollToEndRef:vt,onPinToBottom:aa,messages:hr,allMessages:rc,canFork:Xo,onFork:od,onSelectFork:Ds,busy:lr,onOpenFile:zi,onOpenRun:m,onOpenSpawnedSession:uc,runExperimentName:x,onOpenExperiment:S,experimentName:b,onRespond:oi,onOpenPlan:Da,onOpenSubagent:nl,recoveringTurnId:Er,onRecover:m_,skills:ki},oe),lr&&Jo&&h.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:dde()}),lr&&!Jo&&!ra&&!oo&&h.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:h.jsx("span",{className:"tool-running-shimmer",children:o_e()})})]})}):h.jsxs("div",{className:"chat-empty flex-1 flex flex-col items-center justify-center text-text p-8 text-center [&_h2]:m-0 [&_h2]:text-5xl [&_h2]:font-medium [&_h2]:tracking-[-0.015em] [&_h2]:text-text",children:[h.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:h.jsx(S6,{})}),h.jsx("h2",{children:mde()}),h.jsxs("div",{className:"chat-empty-project inline-flex items-center gap-[7px] mt-3 py-1.5 px-3 border border-border rounded-full text-subtext bg-surface text-lg font-medium",children:[h.jsx(J0,{size:19}),h.jsx("span",{children:n})]}),p_&&h.jsx("div",{className:Aj,role:"status","aria-live":"polite","aria-label":Rfe(),"aria-busy":"true",children:jj.map((ae,be)=>h.jsxs("div",{className:`flex min-h-22 animate-pulse flex-col items-start justify-center gap-2.5 rounded-xl border bg-background px-5 py-4 ${kw[be].box}`,children:[h.jsxs("span",{className:`flex w-full items-center gap-2.5 ${kw[be].icon}`,children:[h.jsx(ae,{size:17}),h.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),h.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},be))}),zu&&zu.length>0&&h.jsx("div",{className:Aj,role:"group","aria-label":Ofe(),children:zu.map((ae,be)=>{const je=jj[be],Be=kw[be];return h.jsxs("button",{type:"button",className:`flex min-h-22 w-full min-w-0 cursor-pointer flex-col items-start justify-center gap-1.5 rounded-xl border bg-background px-5 py-4 text-start font-sans transition-colors duration-120 ease-standard hover:bg-surface ${Be.box}`,onClick:()=>{of({name:"project_starter_clicked",slot:be+1}),of({name:"first_action",surface:rd,action:"starter_click"}),sd(ae.prompt)},children:[h.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[h.jsx(je,{size:17,className:Be.icon}),ae.title]}),h.jsx("span",{className:"w-full truncate text-sm text-subtext",children:ae.prompt})]},be)})})]}),jn.action&&h.jsxs(Oe,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:jn.action.x,top:jn.action.top,transform:"translateX(-50%)"},onMouseDown:ae=>ae.preventDefault(),onClick:jn.add,children:[h.jsx(gO,{size:14}),soe()]}),h.jsxs("div",{className:"composer px-3 pb-5 shrink-0 relative z-4 bg-background w-full max-w-readable my-0 mx-auto [&_textarea]:border-0 [&_textarea]:bg-none [&_textarea]:bg-transparent [&_textarea]:resize-none [&_textarea]:pt-2.5 [&_textarea]:px-3 [&_textarea]:pb-1 [&_textarea]:text-base [&_textarea]:field-sizing-content [&_textarea]:min-h-18 [&_textarea]:max-h-45",children:[ia&&h.jsx(tn,{className:`absolute bottom-full left-1/2 z-5 mb-6 h-9 w-9 -translate-x-1/2 rounded-full border border-border bg-background shadow-control transition-opacity duration-150 ease-standard ${ft?"opacity-0":"opacity-100"}`,title:vE(),"aria-label":vE(),inert:ft,onClick:id,children:lr&&!Jo?h.jsx(p6,{size:18,className:"tool-running-shimmer-icon"}):h.jsx(lht,{size:16})}),Kr&&!(sa&&Kr.promptId===sa.promptId)&&h.jsx(V4t,{synthesized:Kr.synthesized,agentLabel:Hn?y0[Hn.harness]:r_e(),showResumeModes:(Hn==null?void 0:Hn.harness)==="claude-code",onView:ae=>Da==null?void 0:Da(Kr.plan,Kr.promptId,ae),onApprove:ae=>oi({promptId:Kr.promptId,approve:!0,...ae?{resumeMode:ae}:{}}),onReject:()=>oi({promptId:Kr.promptId,approve:!1}),onRevise:ae=>{oe&&el({sessionId:oe,promptId:Kr.promptId}),oi({promptId:Kr.promptId,approve:!1,note:ae})}}),Kt.length>0&&h.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Kt.map((ae,be)=>h.jsxs("div",{className:"queued-chip flex flex-wrap items-center gap-x-2 gap-y-1 py-1.5 px-2.5 text-sm text-subtext bg-background border border-border rounded-sm",title:ae.error?`${ae.text} - -${ae.error}`:ae.text,children:[ae.dispatchState==="blocked"?h.jsx(SO,{size:13,className:"shrink-0 text-accent-amber"}):h.jsx(Aht,{size:13,className:"shrink-0 text-muted"}),h.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:ae.text}),ae.dispatchState!=="blocked"&&h.jsx("span",{className:"shrink-0 text-sm text-muted",children:ae.dispatchState==="retrying"?ppt(ae.nextRetryAt,Ni):Hde()}),ae.dispatchState==="blocked"?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>void Au(ae.id),"aria-label":NQ({text:ae.text}),disabled:yt!==null,className:"shrink-0 px-1.5 py-0.5 border border-border rounded-sm text-sm text-text bg-background cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:border-text",children:yt===ae.id?TD():Hi()}),h.jsx("button",{onClick:()=>En(ae.id),"aria-label":SQ({text:ae.text}),disabled:yt!==null,className:"shrink-0 px-1.5 py-0.5 border-0 text-sm text-muted bg-transparent cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:text-text",children:Due()}),be===lo&&beEn(ae.id),className:"shrink-0 inline-flex items-center justify-center w-4 h-4 p-0 border-0 rounded-full text-muted cursor-pointer [&:hover]:bg-text [&:hover]:text-background",children:h.jsx(es,{size:11})})]},ae.id))}),h.jsxs("div",{className:`composer-box relative flex flex-col border ${ai?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[st&&!st.agentReady&&h.jsxs("div",{className:"composer-harness-warning py-2 px-3 text-subtext text-sm leading-normal border-b border-b-border-variant [&_strong]:text-accent-amber [&_strong]:font-medium [&_code]:font-mono [&_code]:text-text",children:[h.jsxs("strong",{children:[st.name," ",oce()]})," ",st.agentNote?Qp(st.agentNote):Qde()]}),Ir&&h.jsx(H5t,{skills:or,activeIndex:Br,onPick:Tr,onHover:ea}),Ae.length>0&&h.jsx(y3t,{annotations:Ae,onClear:()=>{Ve([]),window.requestAnimationFrame(()=>{var ae;return(ae=Rt.current)==null?void 0:ae.focus()})},onRemove:ae=>{const be=Ae.filter(je=>je.id!==ae);Ve(be),be.length===0&&window.requestAnimationFrame(()=>{var je;return(je=Rt.current)==null?void 0:je.focus()})}}),ut.length>0&&h.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:ut.map((ae,be)=>{const je=()=>pt(Be=>Be.filter((X,pe)=>pe!==be));return ae.mediaType==="application/pdf"?h.jsxs("div",{className:"attachment-file [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background relative inline-flex items-center gap-2 max-w-55 py-2 px-2.5 border border-border rounded-sm text-text bg-surface [&_svg]:shrink-0 [&_svg]:text-muted",title:ae.name,children:[h.jsx(rb,{size:22}),h.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:ae.name??"document.pdf"}),h.jsx("button",{title:uE(),"aria-label":uE(),onClick:je,children:h.jsx(es,{size:11})})]},be):h.jsxs("div",{className:"attachment-thumb relative [&_img]:w-13 [&_img]:h-13 [&_img]:object-cover [&_img]:border [&_img]:border-border [&_img]:rounded-sm [&_img]:block [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background",children:[h.jsx("img",{src:ae.dataUrl,alt:kde()}),h.jsx("button",{title:fE(),"aria-label":fE(),onClick:je,children:h.jsx(es,{size:11})})]},be)})}),Ut&&h.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Ut}),$t&&h.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:$t}),h.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${ai?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[h.jsx("textarea",{dir:"auto",ref:Rt,className:"relative z-1 bg-transparent",value:de,placeholder:xr?v_e():tl&&st?Ghe({harness:ze(y0[st.id]),shortcut:ze(cc)}):jt?st!=null&&st.agentReady?qie({harness:ze(y0[jt.harness])}):$ie({harness:ze(y0[jt.harness])}):Dse(),rows:2,onPaste:ja,onDragOver:ae=>{ae.dataTransfer.types.includes("Files")&&ae.preventDefault()},onDrop:ae=>{ae.dataTransfer.files.length!==0&&(ae.preventDefault(),Si(Array.from(ae.dataTransfer.files)))},onChange:ae=>{const be=ae.target.value,je=ae.target.selectionStart;zr(je);const Be=je>0&&/\s/.test(be[je-1])&&!xr&&!js.current&&xj(be)===null?gw(be,je-1):null;if((Be==null?void 0:Be.query)==="plan"&&(Ft!=null&&Ft.planActivation)){nc(be,Be);return}const X=Be?ki.find(pe=>pe.source!=="command"&&pe.name===Be.query):void 0;if(X&&Be){const pe=gj(be,Be,X.name,2);ye(pe.text),window.requestAnimationFrame(()=>{var we;(we=Rt.current)==null||we.setSelectionRange(pe.cursor,pe.cursor),zr(pe.cursor)});return}ye(be),vs(!1)},onSelect:ae=>zr(ae.currentTarget.selectionStart),onCompositionStart:()=>{js.current=!0},onCompositionEnd:()=>{js.current=!1},onKeyDown:ae=>{if(Ir){if(ae.key==="ArrowDown"||ae.key==="ArrowUp"){ae.preventDefault();const be=ae.key==="ArrowDown"?1:-1;ea((Br+be+or.length)%or.length);return}if(ae.key==="Tab"||ae.key==="Enter"){ae.preventDefault(),Tr(or[Br]);return}if(ae.key==="Escape"){ae.preventDefault(),vs(!0);return}}if(ae.key==="Backspace"&&Bn(ae.currentTarget)){ae.preventDefault();return}if(ae.key==="Enter"&&!ae.shiftKey&&!ae.nativeEvent.isComposing){if(ae.preventDefault(),ai){ad();return}ac({queue:ae.metaKey||ae.ctrlKey})}}}),h.jsx(Q5t,{text:de,isCommand:as,skills:ki,projectId:e,textareaRef:Rt})]}),h.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:Vt.ref,children:[h.jsx(tn,{type:"button",className:"composer-bare",title:f2(),"aria-label":f2(),"aria-haspopup":"dialog","aria-expanded":Vt.open,onClick:()=>Vt.setOpen(ae=>!ae),children:h.jsx(V_t,{size:16})}),Vt.open&&h.jsxs("div",{className:"composer-sources-menu absolute bottom-[calc(100%_+_8px)] start-0 z-50 flex min-w-55 flex-col gap-1 rounded-md border border-border bg-background p-2 shadow-dropdown",children:[h.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:f2()}),h.jsx(Apt,{})]})]}),h.jsx("input",{ref:Wt,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:ae=>{Si(Array.from(ae.target.files??[])),ae.target.value=""}}),h.jsx(tn,{type:"button",className:"composer-attach",title:Z9(),"aria-label":Z9(),onClick:()=>{var ae;return(ae=Wt.current)==null?void 0:ae.click()},children:h.jsx(T_t,{size:16})}),Ci&&h.jsxs(Oe,{type:"button",variant:"ghost",active:!0,className:"group",title:iE(),"aria-label":iE(),onClick:()=>void tc(),children:[h.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[h.jsx(d_t,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),h.jsx(es,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),h.jsx("span",{children:Fce()})]}),ai&&h.jsxs(Oe,{type:"button",variant:"ghost",active:!0,className:"group",title:sE(),"aria-label":sE(),onClick:ju,children:[h.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[h.jsx(r_,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),h.jsx(es,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),h.jsx("span",{children:eD()})]}),h.jsx("div",{className:"min-w-0 flex-1"}),h.jsxs("div",{className:"flex min-w-0 items-center",children:[h.jsx(T0t,{value:jt,onSelect:ta,permissionChoices:st!=null&&st.agentReady?(Ft==null?void 0:Ft.permissionModes)??[]:[],defaultPermissionId:(Ft==null?void 0:Ft.defaultPermissionMode)??null,onSelectPermission:Rs,reasoningChoices:st!=null&&st.agentReady?Aa.choices:[],defaultReasoningId:Aa.defaultId,onSelectReasoning:Yo,lockHarness:!!en}),h.jsx(X5t,{usage:en==null?void 0:en.contextUsage})]}),lr&&!xr?h.jsx(tn,{className:"send-btn",variant:"stop",title:mE(),"aria-label":mE(),onClick:oc,children:h.jsx(es,{size:16})}):h.jsx(tn,{className:"send-btn",variant:"primary",title:ai?hE():p4(),"aria-label":ai?hE():p4(),onClick:()=>void(ai?ad():ac()),disabled:ai?!jr||!oe&&!(st!=null&&st.agentReady):!(st!=null&&st.agentReady)||!de.trim()&&ut.length===0&&Ae.length===0,children:h.jsx(_O,{size:16})})]})]})]})]})]})}const v6t=[],b6t=[];function Fa({className:e,...n}){return h.jsx("div",{className:Ts("relative flex min-h-0 flex-1 flex-col",e),...n})}function fh({className:e,...n}){return h.jsx("div",{className:Ts("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Qa({className:e,...n}){return h.jsx("div",{className:Ts("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const Rj=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function y6t({sessionId:e,spawnPartId:n,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:i,experimentName:o,onOpenSubagent:a}){var x;const l=ht(Hl(e)),u=((x=l.data)==null?void 0:x.messages)??(l.isError?[]:null),_=M.useRef(null),f=M.useRef(null),p=M.useRef(!0);if(M.useLayoutEffect(()=>{p.current=!0;const S=_.current;S&&(S.scrollTop=S.scrollHeight)},[e,n]),M.useLayoutEffect(()=>{const S=_.current;S&&p.current&&(S.scrollTop=S.scrollHeight)},[u]),M.useEffect(()=>{const S=_.current,b=f.current;if(!S||!b)return;const v=new ResizeObserver(()=>{p.current&&(S.scrollTop=S.scrollHeight)});return v.observe(b),v.observe(S),()=>v.disconnect()},[u===null]),u===null)return h.jsx(Fa,{children:h.jsx("div",{className:Rj,children:h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:Frt()})})});let m=null;for(const S of u)if(m=kv(S.parts,n),m)break;return h.jsx(Fa,{children:h.jsx("div",{className:Rj,ref:_,onScroll:S=>{const b=S.currentTarget;p.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:h.jsx("div",{ref:f,children:m?h.jsx(i6t,{spawn:m,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:i,experimentName:o,onOpenSubagent:a}):h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:Grt()})})})})}function Mj(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,r)}return t}function Ln(e){for(var n=1;n=0||(_[l]=o[l]);return _})(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function xn(e,n){return iP(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var i,o,a,l,u=[],_=!0,f=!1;try{if(a=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;_=!1}else for(;!(_=(i=a.call(s)).done)&&(u.push(i.value),u.length!==r);_=!0);}catch(p){f=!0,o=p}finally{try{if(!_&&s.return!=null&&(l=s.return(),Object(l)!==l))return}finally{if(f)throw o}}return u}})(e,n)||Mb(e,n)||oP()}function sP(e){return iP(e)||aP(e)||Mb(e)||oP()}function Gi(e){return(function(n){if(Array.isArray(n))return O5(n)})(e)||aP(e)||Mb(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function iP(e){if(Array.isArray(e))return e}function aP(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mb(e,n){if(e){if(typeof e=="string")return O5(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?O5(e,n):void 0}}function O5(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var l=t.next();return o=l.done,l},e:function(l){a=!0,i=l},f:function(){try{o||t.return==null||t.return()}finally{if(a)throw i}}}}var Qg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function am(e,n){return e(n={exports:{}},n.exports),n.exports}var Fi=am((function(e){/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(){var n={}.hasOwnProperty;function t(){for(var r=[],s=0;s-1?v.slice(0,w):C;switch(C){case"diff":S--;break e;case"deleted":case"new":var N=v.slice(w+1);N.indexOf("file mode")===0&&(o[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":o.similarity=parseInt(v.split(" ")[2],10);break;case"index":var E=v.slice(w+1).split(" "),j=E[0].split("..");o.oldRevision=j[0],o.newRevision=j[1],E[1]&&(o.oldMode=o.newMode=E[1]);break;case"copy":case"rename":var z=v.slice(w+1);z.indexOf("from")===0?o.oldPath=z.slice(5):o.newPath=z.slice(3),y=C;break;case"---":var R=v.slice(w+1),O=m[++S].slice(4);R==="/dev/null"?(O=O.slice(2),y="add"):O==="/dev/null"?(R=R.slice(2),y="delete"):(y="modify",R=R.slice(2),O=O.slice(2)),R&&(o.oldPath=R),O&&(o.newPath=O),p=5;break e}}o.type=y||"modify"}else if(b.indexOf("Binary")===0)o.isBinary=!0,o.type=b.indexOf("/dev/null and")>=0?"add":b.indexOf("and /dev/null")>=0?"delete":"modify",p=2,o=null;else if(p===5)if(b.indexOf("@@")===0){var I=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(b);a={content:b,oldStart:I[1]-0,newStart:I[4]-0,oldLines:I[3]-0||1,newLines:I[6]-0||1,changes:[]},o.hunks.push(a),l=a.oldStart,u=a.newStart}else{var F=b.slice(0,1),U={content:b.slice(1)};switch(F){case"+":U.type="insert",U.isInsert=!0,U.lineNumber=u,u++;break;case"-":U.type="delete",U.isDelete=!0,U.lineNumber=l,l++;break;case" ":U.type="normal",U.isNormal=!0,U.oldLineNumber=l,U.newLineNumber=u,l++,u++;break;case"\\":var q=a.changes[a.changes.length-1];q.isDelete||(o.newEndingNewLine=!1),q.isInsert||(o.oldEndingNewLine=!1)}U.type&&a.changes.push(U)}S++}return f}};e.exports=s})()}));function Su(e){return e.type==="insert"}function Wi(e){return e.type==="delete"}function Vl(e){return e.type==="normal"}function k6t(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,o,a){var l=xn(i,3),u=l[0],_=l[1],f=l[2];return _?Su(o)&&f>=0?(u.splice(f+1,0,o),[u,o,f+2]):(u.push(o),[u,o,Wi(o)&&Wi(_)?f:a]):(u.push(o),[u,o,Wi(o)?a:-1])}),[[],null,-1]);return xn(s,1)[0]})(e.changes):e.changes;return Ln(Ln({},e),{},{isPlain:!1,changes:t})}function I5(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(function(r){if(r.startsWith("diff --git"))return r;var s=r.indexOf(` -`),i=r.indexOf(` -`,s+1),o=r.slice(0,s),a=r.slice(s+1,i),l=o.split(" ").slice(1,-3).join(" "),u=a.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(l," b/").concat(u),"index 1111111..2222222 100644","--- a/".concat(l),"+++ b/".concat(u),r.slice(i+1)].join(` -`)})(e.trimStart());return S6t.parse(t).map((function(r){return(function(s,i){var o=s.hunks.map((function(a){return k6t(a,i)}));return Ln(Ln({},s),{},{hunks:o})})(r,n)}))}function C6t(e){return e[0]}function E6t(e){return e[e.length-1]}function B5(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function fp(e){return e==="old"?function(n){return Su(n)?-1:Vl(n)?n.oldLineNumber:n.lineNumber}:function(n){return Wi(n)?-1:Vl(n)?n.newLineNumber:n.lineNumber}}function cP(e,n){return function(t,r){var s=t[e],i=s+t[n];return r>=s&&r=i&&s-1},D6t=function(e,n){var t=this.__data__,r=Db(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Kd(e){var n=-1,t=e==null?0:e.length;for(this.clear();++na))return!1;var u=i.get(e),_=i.get(n);if(u&&_)return u==n&&_==e;var f=-1,p=!0,m=2&t?new gSt:void 0;for(i.set(e,n),i.set(n,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},fr={};fr["[object Float32Array]"]=fr["[object Float64Array]"]=fr["[object Int8Array]"]=fr["[object Int16Array]"]=fr["[object Int32Array]"]=fr["[object Uint8Array]"]=fr["[object Uint8ClampedArray]"]=fr["[object Uint16Array]"]=fr["[object Uint32Array]"]=!0,fr["[object Arguments]"]=fr["[object Array]"]=fr["[object ArrayBuffer]"]=fr["[object Boolean]"]=fr["[object DataView]"]=fr["[object Date]"]=fr["[object Error]"]=fr["[object Function]"]=fr["[object Map]"]=fr["[object Number]"]=fr["[object Object]"]=fr["[object RegExp]"]=fr["[object Set]"]=fr["[object String]"]=fr["[object WeakMap]"]=!1;var MSt=function(e){return Wh(e)&&YS(e.length)&&!!fr[d_(e)]},DSt=function(e){return function(n){return e(n)}},Fj=am((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&dP.process,i=(function(){try{var o=r&&r.require&&r.require("util").types;return o||s&&s.binding&&s.binding("util")}catch{}})();e.exports=i})),Hj=Fj&&Fj.isTypedArray,XS=Hj?DSt(Hj):MSt,LSt=Object.prototype.hasOwnProperty,OSt=function(e,n){var t=Ki(e),r=!t&&Bb(e),s=!t&&!r&&Cv(e),i=!t&&!r&&!s&&XS(e),o=t||r||s||i,a=o?zSt(e.length,String):[],l=a.length;for(var u in e)!LSt.call(e,u)||o&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||vP(u,l))||a.push(u);return a},ISt=Object.prototype,bP=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||ISt)},BSt=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),$St=Object.prototype.hasOwnProperty,yP=function(e){if(!bP(e))return BSt(e);var n=[];for(var t in Object(e))$St.call(e,t)&&t!="constructor"&&n.push(t);return n},$b=function(e){return e!=null&&YS(e.length)&&!_P(e)},ZS=function(e){return $b(e)?OSt(e):yP(e)},qj=function(e){return SSt(e,ZS,NSt)},PSt=Object.prototype.hasOwnProperty,FSt=function(e,n,t,r,s,i){var o=1&t,a=qj(e),l=a.length;if(l!=qj(n).length&&!o)return!1;for(var u=l;u--;){var _=a[u];if(!(o?_ in n:PSt.call(n,_)))return!1}var f=i.get(e),p=i.get(n);if(f&&p)return f==n&&p==e;var m=!0;i.set(e,n),i.set(n,e);for(var x=o;++u1)return!1;if(e.length===1){var n=xn(e,1)[0];return n.type==="text"&&!n.value}return!0}function Tkt(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=mu(e,Nkt),o=s?function(a,l){return s(a,Kj,l)}:Kj;return h.jsx("td",Ln(Ln({},i),{},{"data-change-key":n,children:r?zkt(r)?" ":r.map(o):t||" "}))}var zP=M.memo(Tkt);function TP(e,n){return function(){var t=n==="old"?Ub(e):Gb(e);return t===-1?void 0:t}}function jP(e,n){return function(t){return e&&t?h.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function Ev(e,n){return n?function(t){e(),n(t)}:e}function Qj(e,n,t,r){return M.useMemo((function(){var s=NP(e,(function(i){return function(o){return i&&i(n,o)}}));return s.onMouseEnter=Ev(t,s.onMouseEnter),s.onMouseLeave=Ev(r,s.onMouseLeave),s}),[e,t,r,n])}function Yj(e,n,t,r,s,i,o,a,l){var u={change:n,side:r,inHoverState:a,renderDefault:TP(n,r),wrapInAnchor:jP(s,i)};return h.jsx("td",Ln(Ln({className:e},o),{},{"data-change-key":t,children:l(u)}))}function jkt(e){var n,t,r,s=e.change,i=e.selected,o=e.tokens,a=e.className,l=e.generateLineClassName,u=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.gutterAnchor,S=e.generateAnchorID,b=e.renderToken,v=e.renderGutter,y=s.type,w=s.content,C=lu(s),N=(n=xn(M.useState(!1),2),t=n[0],r=n[1],[t,M.useCallback((function(){return r(!0)}),[]),M.useCallback((function(){return r(!1)}),[])]),E=xn(N,3),j=E[0],z=E[1],R=E[2],O=M.useMemo((function(){return{change:s}}),[s]),I=Qj(f,O,z,R),F=Qj(p,O,z,R),U=S(s),q=l({changes:[s],defaultGenerate:function(){return a}}),Y=Fi("diff-gutter","diff-gutter-".concat(y),u,{"diff-gutter-selected":i}),V=Fi("diff-code","diff-code-".concat(y),_,{"diff-code-selected":i});return h.jsxs("tr",{id:U,className:Fi("diff-line",q),children:[!m&&Yj(Y,s,C,"old",x,U,I,j,v),!m&&Yj(Y,s,C,"new",x,U,I,j,v),h.jsx(zP,Ln({className:V,changeKey:C,text:w,tokens:o,renderToken:b},F))]})}var Akt=M.memo(jkt);function Rkt(e){var n=e.hideGutter,t=e.element;return h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var Mkt=["hideGutter","selectedChanges","tokens","lineClassName"],Dkt=["hunk","widgets","className"];function Lkt(e){var n=e.hunk,t=e.widgets,r=e.className,s=mu(e,Dkt),i=(function(o,a){return o.reduce((function(l,u){var _=lu(u);l.push(["change",_,u]);var f=a[_];return f&&l.push(["widget",_,f]),l}),[])})(n.changes,t);return h.jsx("tbody",{className:Fi("diff-hunk",r),children:i.map((function(o){return(function(a,l){var u=xn(a,3),_=u[0],f=u[1],p=u[2],m=l.hideGutter,x=l.selectedChanges,S=l.tokens,b=l.lineClassName,v=mu(l,Mkt);if(_==="change"){var y=Wi(p)?"old":"new",w=Wi(p)?Ub(p):Gb(p),C=S?S[y][w-1]:null;return h.jsx(Akt,Ln({className:b,change:p,hideGutter:m,selected:x.includes(f),tokens:C},v),"change".concat(f))}return _==="widget"?h.jsx(Rkt,{hideGutter:m,element:p},"widget".concat(f)):null})(o,s)}))})}var AP=0;function Xg(e,n,t,r){var s=M.useCallback((function(){return n(e)}),[e,n]),i=M.useCallback((function(){return n("")}),[n]);return M.useMemo((function(){var o=NP(r,(function(a){return function(l){return a&&a({side:e,change:t},l)}}));return o.onMouseEnter=Ev(s,o.onMouseEnter),o.onMouseLeave=Ev(i,o.onMouseLeave),o}),[t,r,s,e,i])}function Nw(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,i=e.gutterClassName,o=e.codeClassName,a=e.gutterEvents,l=e.codeEvents,u=e.anchorID,_=e.gutterAnchor,f=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,x=e.renderToken,S=e.renderGutter;if(!n){var b=Fi("diff-gutter","diff-gutter-omit",i),v=Fi("diff-code","diff-code-omit",o);return[!p&&h.jsx("td",{className:b},"gutter"),h.jsx("td",{className:v},"code")]}var y=n.type,w=n.content,C=lu(n),N=t===AP?"old":"new",E=Ln({id:u||void 0,className:Fi("diff-gutter","diff-gutter-".concat(y),L5({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:S({change:n,side:N,inHoverState:m,renderDefault:TP(n,N),wrapInAnchor:jP(_,f)})},a),j=Fi("diff-code","diff-code-".concat(y),L5({"diff-code-selected":r},"diff-line-hover-"+N,m),o);return[!p&&h.jsx("td",Ln(Ln({},E),{},{"data-change-key":C}),"gutter"),h.jsx(zP,Ln({className:j,changeKey:C,text:w,tokens:s,renderToken:x},l),"code")]}function Okt(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,i=e.newSelected,o=e.oldTokens,a=e.newTokens,l=e.monotonous,u=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.generateAnchorID,S=e.generateLineClassName,b=e.gutterAnchor,v=e.renderToken,y=e.renderGutter,w=xn(M.useState(""),2),C=w[0],N=w[1],E=Xg("old",N,t,f),j=Xg("new",N,r,f),z=Xg("old",N,t,p),R=Xg("new",N,r,p),O=t&&x(t),I=r&&x(r),F=S({changes:[t,r],defaultGenerate:function(){return n}}),U={monotonous:l,hideGutter:m,gutterClassName:u,codeClassName:_,gutterEvents:f,codeEvents:p,renderToken:v,renderGutter:y},q=Ln(Ln({},U),{},{change:t,side:AP,selected:s,tokens:o,gutterEvents:E,codeEvents:z,anchorID:O,gutterAnchor:b,gutterAnchorTarget:O,hover:C==="old"}),Y=Ln(Ln({},U),{},{change:r,side:1,selected:i,tokens:a,gutterEvents:j,codeEvents:R,anchorID:t===r?null:I,gutterAnchor:b,gutterAnchorTarget:t===r?O:I,hover:C==="new"});if(l)return h.jsx("tr",{className:Fi("diff-line",F),children:Nw(t?q:Y)});var V=(function(Z,te){return Z&&!te?"diff-line-old-only":!Z&&te?"diff-line-new-only":Z===te?"diff-line-normal":"diff-line-compare"})(t,r);return h.jsxs("tr",{className:Fi("diff-line",V,F),children:[Nw(q),Nw(Y)]})}var Ikt=M.memo(Okt);function Bkt(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):h.jsxs("tr",{className:"diff-widget",children:[h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var $kt=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],Pkt=["hunk","widgets","className"];function Zg(e,n){return(e?lu(e):"00")+(n?lu(n):"00")}function Fkt(e){var n=e.hunk,t=e.widgets,r=e.className,s=mu(e,Pkt),i=(function(o,a){for(var l=function(v){if(!v)return null;var y=lu(v);return a[y]||null},u=[],_=0;_=(i==null?void 0:i.value.length))return[e];var a=function(f,p){var m=i.value.slice(f,p);return[].concat(Gi(s),[Ln(Ln({},i),{},{value:m})])};if(n>0){var l=a(0,n);o.push(eh(l))}var u=a(Math.max(n,0),t);if(o.push(r?(function(f,p){return[p].concat(Gi(eh(f)))})(u,r):eh(u)),t1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.children){var r=e.children,s=mu(e,o7t);t.push(s);var i,o=KS(r);try{for(o.s();!(i=o.n()).done;)LP(i.value,n,t)}catch(a){o.e(a)}finally{o.f()}t.pop()}else n.push(eh([].concat(Gi(t.slice(1)),[e])));return n}function l7t(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(l){var u=rk(l);return u.value.includes(` -`)?u.value.split(` -`).map((function(_){return s7t(l,Ln(Ln({},u),{},{value:_}))})):[l]})(t),i=sP(s),o=i[0],a=i.slice(1);return[].concat(Gi(n.slice(0,-1)),[[].concat(Gi(r),[o])],Gi(a.map((function(l){return[l]}))))}),[[]])}function eA(e){return l7t(LP(e))}var c7t=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?Pb(e,n,void 0,t):!!r},u7t=function(e,n){return Pb(e,n)},f7t=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function d7t(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=f7t(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&c7t(t,r,(function(i,o,a){return a==="chlidren"||u7t(i,o)}))))?e.children[e.children.length-1]=(function(i,o){return"value"in i&&"value"in o?Ln(Ln({},i),{},{value:"".concat(i.value).concat(o.value)}):i})(s,n):e.children.push(n),e.children[e.children.length-1]}function tA(e){var n,t={type:"root",children:[]},r=KS(e);try{var s=function(){var i=n.value;i.reduce((function(o,a,l){return d7t(o,l===i.length-1?Ln({},a):Ln(Ln({},a),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(i){r.e(i)}finally{r.f()}return t}var h7t=Object.prototype.hasOwnProperty,_7t=MP((function(e,n,t){h7t.call(e,t)?e[t].push(n):tk(e,t,[n])})),p7t=Object.prototype.hasOwnProperty,m7t=function(e){if(e==null)return!0;if($b(e)&&(Ki(e)||typeof e=="string"||typeof e.splice=="function"||Cv(e)||XS(e)||Bb(e)))return!e.length;var n=q5(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(bP(e))return!yP(e).length;for(var t in e)if(p7t.call(e,t))return!1;return!0},g7t=function(e,n){var t=n.start,r=n.length,s=t+r,i=e.reduce((function(o,a){var l=xn(o,2),u=l[0],_=l[1],f=_+rk(a).value.length;if(_>s||fr.length?t:r,l=t.length>r.length?r:t,u=a.indexOf(l);if(u!=-1)return o=[new n.Diff(1,a.substring(0,u)),new n.Diff(0,l),new n.Diff(1,a.substring(u+l.length))],t.length>r.length&&(o[0][0]=o[2][0]=-1),o;if(l.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var _=this.diff_halfMatch_(t,r);if(_){var f=_[0],p=_[1],m=_[2],x=_[3],S=_[4],b=this.diff_main(f,m,s,i),v=this.diff_main(p,x,s,i);return b.concat([new n.Diff(0,S)],v)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,i):this.diff_bisect_(t,r,i)},n.prototype.diff_lineMode_=function(t,r,s){var i=this.diff_linesToChars_(t,r);t=i.chars1,r=i.chars2;var o=i.lineArray,a=this.diff_main(t,r,!1,s);this.diff_charsToLines_(a,o),this.diff_cleanupSemantic(a),a.push(new n.Diff(0,""));for(var l=0,u=0,_=0,f="",p="";l=1&&_>=1){a.splice(l-u-_,u+_),l=l-u-_;for(var m=this.diff_main(f,p,!1,s),x=m.length-1;x>=0;x--)a.splice(l,0,m[x]);l+=m.length}_=0,u=0,f="",p=""}l++}return a.pop(),a},n.prototype.diff_bisect_=function(t,r,s){for(var i=t.length,o=r.length,a=Math.ceil((i+o)/2),l=a,u=2*a,_=new Array(u),f=new Array(u),p=0;ps);w++){for(var C=-w+S;C<=w-b;C+=2){for(var N=l+C,E=(I=C==-w||C!=w&&_[N-1]<_[N+1]?_[N+1]:_[N-1]+1)-C;Ii)b+=2;else if(E>o)S+=2;else if(x&&(R=l+m-C)>=0&&R=(z=i-f[R]))return this.diff_bisectSplit_(t,r,I,E,s)}for(var j=-w+v;j<=w-y;j+=2){for(var z,R=l+j,O=(z=j==-w||j!=w&&f[R-1]i)y+=2;else if(O>o)v+=2;else if(!x&&(N=l+m-j)>=0&&N=(z=i-z))return this.diff_bisectSplit_(t,r,I,E,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,i,o){var a=t.substring(0,s),l=r.substring(0,i),u=t.substring(s),_=r.substring(i),f=this.diff_main(a,l,!1,o),p=this.diff_main(u,_,!1,o);return f.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function o(u){for(var _="",f=0,p=-1,m=s.length;pi?t=t.substring(s-i):sr.length?t:r,i=t.length>r.length?r:t;if(s.length<4||2*i.length=S.length?[y,w,C,N,z]:null}var l,u,_,f,p,m=a(s,i,Math.ceil(s.length/4)),x=a(s,i,Math.ceil(s.length/2));return m||x?(l=x?m&&m[4].length>x[4].length?m:x:m,t.length>r.length?(u=l[0],_=l[1],f=l[2],p=l[3]):(f=l[0],p=l[1],u=l[2],_=l[3]),[u,_,f,p,l[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],i=0,o=null,a=0,l=0,u=0,_=0,f=0;a0?s[i-1]:-1,l=0,u=0,_=0,f=0,o=null,r=!0)),a++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),a=1;a=S?(x>=p.length/2||x>=m.length/2)&&(t.splice(a,0,new n.Diff(0,m.substring(0,x))),t[a-1][1]=p.substring(0,p.length-x),t[a+1][1]=m.substring(x),a++):(S>=p.length/2||S>=m.length/2)&&(t.splice(a,0,new n.Diff(0,p.substring(0,S))),t[a-1][0]=1,t[a-1][1]=m.substring(0,m.length-S),t[a+1][0]=-1,t[a+1][1]=p.substring(S),a++),a++}a++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(S,b){if(!S||!b)return 6;var v=S.charAt(S.length-1),y=b.charAt(0),w=v.match(n.nonAlphaNumericRegex_),C=y.match(n.nonAlphaNumericRegex_),N=w&&v.match(n.whitespaceRegex_),E=C&&y.match(n.whitespaceRegex_),j=N&&v.match(n.linebreakRegex_),z=E&&y.match(n.linebreakRegex_),R=j&&S.match(n.blanklineEndRegex_),O=z&&b.match(n.blanklineStartRegex_);return R||O?5:j||z?4:w&&!N&&E?3:N||E?2:w||C?1:0}for(var s=1;s=m&&(m=x,_=i,f=o,p=a)}t[s-1][1]!=_&&(_?t[s-1][1]=_:(t.splice(s-1,1),s--),t[s][1]=f,p?t[s+1][1]=p:(t.splice(s+1,1),s--))}s++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(t){for(var r=!1,s=[],i=0,o=null,a=0,l=!1,u=!1,_=!1,f=!1;a0?s[i-1]:-1,_=f=!1),r=!0)),a++;r&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push(new n.Diff(0,""));for(var r,s=0,i=0,o=0,a="",l="";s1?(i!==0&&o!==0&&((r=this.diff_commonPrefix(l,a))!==0&&(s-i-o>0&&t[s-i-o-1][0]==0?t[s-i-o-1][1]+=l.substring(0,r):(t.splice(0,0,new n.Diff(0,l.substring(0,r))),s++),l=l.substring(r),a=a.substring(r)),(r=this.diff_commonSuffix(l,a))!==0&&(t[s][1]=l.substring(l.length-r)+t[s][1],l=l.substring(0,l.length-r),a=a.substring(0,a.length-r))),s-=i+o,t.splice(s,i+o),a.length&&(t.splice(s,0,new n.Diff(-1,a)),s++),l.length&&(t.splice(s,0,new n.Diff(1,l)),s++),s++):s!==0&&t[s-1][0]==0?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,o=0,i=0,a="",l=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sr));s++)a=i,l=o;return t.length!=s&&t[s][0]===-1?l:l+(r-a)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,i=//g,a=/\n/g,l=0;l");switch(u){case 1:r[l]=''+_+"";break;case-1:r[l]=''+_+"";break;case 0:r[l]=""+_+""}}return r.join("")},n.prototype.diff_text1=function(t){for(var r=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(r),o=this;function a(E,j){var z=E/r.length,R=Math.abs(s-j);return o.Match_Distance?z+R/o.Match_Distance:R?1:z}var l=this.Match_Threshold,u=t.indexOf(r,s);u!=-1&&(l=Math.min(a(0,u),l),(u=t.lastIndexOf(r,s+r.length))!=-1&&(l=Math.min(a(0,u),l)));var _,f,p=1<=b;w--){var C=i[t.charAt(w-1)];if(y[w]=S===0?(y[w+1]<<1|1)&C:(y[w+1]<<1|1)&C|(m[w+1]|m[w])<<1|1|m[w+1],y[w]&p){var N=a(S,w-1);if(N<=l){if(l=N,!((u=w-1)>s))break;b=Math.max(1,2*s-u)}}}if(a(S+1,s)>l)break;m=y}return u},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)o=t,i=this.diff_text1(o);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)i=t,o=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");i=t,o=s}if(o.length===0)return[];for(var a=[],l=new n.patch_obj,u=0,_=0,f=0,p=i,m=i,x=0;x=2*this.Patch_Margin&&u&&(this.patch_addContext_(l,p),a.push(l),l=new n.patch_obj,u=0,p=m,_=f)}S!==1&&(_+=b.length),S!==-1&&(f+=b.length)}return u&&(this.patch_addContext_(l,p),a.push(l)),a},n.prototype.patch_deepCopy=function(t){for(var r=[],s=0;sthis.Match_MaxBits?(l=this.match_main(r,f.substring(0,this.Match_MaxBits),_))!=-1&&((p=this.match_main(r,f.substring(f.length-this.Match_MaxBits),_+f.length-this.Match_MaxBits))==-1||l>=p)&&(l=-1):l=this.match_main(r,f,_),l==-1)o[a]=!1,i-=t[a].length2-t[a].length1;else if(o[a]=!0,i=l-_,f==(u=p==-1?r.substring(l,l+f.length):r.substring(l,p+this.Match_MaxBits)))r=r.substring(0,l)+this.diff_text2(t[a].diffs)+r.substring(l+f.length);else{var m=this.diff_main(f,u,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(m)/f.length>this.Patch_DeleteThreshold)o[a]=!1;else{this.diff_cleanupSemanticLossless(m);for(var x,S=0,b=0;ba[0][1].length){var l=r-a[0][1].length;a[0][1]=s.substring(a[0][1].length)+a[0][1],o.start1-=l,o.start2-=l,o.length1+=l,o.length2+=l}return(a=(o=t[t.length-1]).diffs).length==0||a[a.length-1][0]!=0?(a.push(new n.Diff(0,s)),o.length1+=r,o.length2+=r):r>a[a.length-1][1].length&&(l=r-a[a.length-1][1].length,a[a.length-1][1]+=s.substring(0,l),o.length1+=l,o.length2+=l),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(u.length1+=p.length,o+=p.length,_=!1,u.diffs.push(new n.Diff(f,p)),i.diffs.shift()):(p=p.substring(0,r-u.length1-this.Patch_Margin),u.length1+=p.length,o+=p.length,f===0?(u.length2+=p.length,a+=p.length):_=!1,u.diffs.push(new n.Diff(f,p)),p==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(p.length))}l=(l=this.diff_text2(u.diffs)).substring(l.length-this.Patch_Margin);var m=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);m!==""&&(u.length1+=m.length,u.length2+=m.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===0?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new n.Diff(0,m))),_||t.splice(++s,0,u)}}},n.prototype.patch_toText=function(t){for(var r=[],s=0;s1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(n===void 0?"block":n)==="block"?S7t:k7t,r=nk(e.map((function(a){return a.changes})),OP).map(t).reduce((function(a,l){var u=xn(a,2),_=u[0],f=u[1],p=xn(l,2),m=p[0],x=p[1];return[_.concat(m),f.concat(x)]}),[[],[]]),s=xn(r,2),i=s[0],o=s[1];return v7t(rA(i),rA(o))}var E7t=["enhancers"],oA=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=xn(r7t(e,mu(t,E7t)),2),o=i[0],a=i[1],l=[eA(o),eA(a)],u=(n=[l[0],l[1]],s.reduce((function(S,b){return b(S)}),n)),_=xn(u,2),f=_[0],p=_[1],m=[f.map(tA),p.map(tA)],x=m[1];return{old:m[0].map((function(S){var b;return(b=S.children)!==null&&b!==void 0?b:[]})),new:x.map((function(S){var b;return(b=S.children)!==null&&b!==void 0?b:[]}))}};const G5=["openresearch-diff flex flex-col gap-4","[&_.openresearch-diff-file]:[--diff-background-color:var(--base)]","[&_.openresearch-diff-file]:[--diff-text-color:var(--text)]","[&_.openresearch-diff-file]:[--diff-font-family:var(--mono)]","[&_.openresearch-diff-file]:[--diff-selection-text-color:var(--primary)]","[&_.openresearch-diff-file]:[--diff-selection-background-color:var(--color-diff-selection)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)]","[&_.openresearch-diff-file]:[--diff-code-selected-text-color:var(--diff-selection-text-color)]","[&_.openresearch-diff-file]:[--diff-code-selected-background-color:var(--diff-selection-background-color)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-text-color:var(--accent-green)]","[&_.openresearch-diff-file]:[--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-text-color:var(--accent-red)]","[&_.openresearch-diff-file]:[--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)]","[&_.openresearch-diff-file]:[--diff-code-insert-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-background-color:var(--color-diff-insert-code)]","[&_.openresearch-diff-file]:[--diff-code-delete-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-background-color:var(--color-diff-delete-code)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-text-color:var(--diff-text-color)]","[&_.openresearch-diff-file]:[--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)]","[&_.openresearch-diff-file]:[--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)]","[&_.openresearch-diff-file]:w-full [&_.openresearch-diff-file]:text-sm","[&_.openresearch-diff-file]:leading-[1.55] [&_.openresearch-diff-file.diff-unified]:table-auto","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:collapse","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:first-child]:w-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[1%]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:hidden","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:sticky","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:start-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:z-1","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[1%]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line]:leading-[1.55]","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:px-4","[&_.openresearch-diff-file_.diff-code]:whitespace-pre","[&_.openresearch-diff-file_.diff-code]:break-normal","[&_.openresearch-diff-file_.diff-code]:wrap-normal","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),N7t=2e3,z7t={highlight(e,n){return Ct.highlight(e,n).children}};function T7t(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function sk(e){let n=0,t=0;for(const r of e.hunks)for(const s of r.changes)s.type==="insert"?n++:s.type==="delete"&&t++;return{additions:n,deletions:t}}function j7t(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function W5(e){switch(e.type){case"delete":return e.oldPath;case"add":case"modify":return e.newPath;case"rename":case"copy":return`${e.oldPath} → ${e.newPath}`}}function A7t(e){const n=[C7t(e.hunks,{type:"line"})],t=hS(j7t(e));return t&&Ct.registered(t)?oA(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:z7t}):oA(e.hunks,{enhancers:n,highlight:!1})}function R7t(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:I5(e,{nearbySequences:"zip"}),failed:!1}}catch{if(n){const t=Array.from(e.matchAll(/^diff --git /gm),s=>s.index),r=t[t.length-1];if(t.length>1&&r!==void 0)try{return{files:I5(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const M7t=({change:e,side:n})=>n==="old"?null:T7t(e);function BP({bytesRead:e,byteLimit:n}){return h.jsxs("div",{className:"truncated-notice border border-accent-amber rounded-md bg-accent-amber-subtle py-3 px-3.5 text-sm [&_h4]:mt-0 [&_h4]:mx-0 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:text-accent-amber [&_p]:m-0 [&_p]:text-subtext",children:[h.jsx("h4",{children:w2e()}),h.jsx("p",{children:ewe({limit:ze(Il(n)),read:ze(Il(e))})})]})}function $P({file:e,defaultExpanded:n}){const[t,r]=M.useState(n),{additions:s,deletions:i}=M.useMemo(()=>sk(e),[e]),o=t&&s+i<=N7t,a=M.useMemo(()=>{if(o)try{return A7t(e)}catch{return}},[e,o]);return h.jsxs("section",{className:`diff-file-card overflow-hidden border border-border rounded-md bg-background [&.expanded_.diff-file-header]:border-b [&.expanded_.diff-file-header]:border-b-border ${t?"expanded":""}`,children:[h.jsxs("button",{className:"diff-file-header sticky top-0 z-10 flex items-center justify-between gap-3 w-full text-start py-2 px-3 bg-canvas cursor-pointer [&_.chev]:text-muted [&_.chev]:text-xs [&_.chev]:shrink-0 [&_.chev]:w-3 [&_.path]:flex [&_.path]:items-center [&_.path]:gap-2 [&_.path]:min-w-0 [&_.path]:flex-1 [&_.path_code]:min-w-0 [&_.path_code]:flex-1 [&_.path_code]:overflow-hidden [&_.path_code]:text-ellipsis [&_.path_code]:whitespace-nowrap [&_.path_code]:font-mono [&_.path_code]:text-xs [&_.path_code]:font-semibold [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>r(l=>!l),children:[h.jsx("span",{className:"chev",children:t?h.jsx(Ho,{size:14}):h.jsx(qo,{size:14})}),h.jsx("span",{className:"path",children:h.jsx("code",{children:W5(e)})}),h.jsxs("span",{className:"stats",children:[h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",i]})]})]}),t&&(e.hunks.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:B2e()}):h.jsx("div",{className:"diff-file-body overflow-x-auto bg-background",children:h.jsx(Vkt,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:M7t,tokens:a,viewType:"unified"})}))]})}function D7t({files:e,className:n}){return h.jsx("div",{className:n?`${G5} ${n}`:G5,children:e.map((t,r)=>h.jsx($P,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function L7t(e){switch(e.type){case"add":return"A";case"delete":return"D";case"rename":return"R";case"copy":return"C";case"modify":return"M"}}function PP({diff:e,partial:n=!1}){var p;const t=M.useMemo(()=>R7t(e,n),[e,n]),r=t.files,s=M.useMemo(()=>r.map((m,x)=>({file:m,key:`${m.oldPath}→${m.newPath}#${x}`,changes:sk(m)})),[r]),[i,o]=M.useState(null),[a,l]=M.useState(!1),u=a&&!n,_=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,f=s.find(m=>m.key===_)??null;return t.failed?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?D2e():Y2e()}):s.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:j2e()}):h.jsxs("div",{className:"diff-explorer @container",children:[h.jsxs("div",{className:"diff-explorer-toolbar flex items-center justify-between gap-3 mb-2.5 text-sm [&_button]:py-0.5 [&_button]:px-0 [&_button]:text-muted [&_button]:text-sm [&_button]:font-medium [&_button:hover]:text-text [&_button:hover]:underline [&_button:hover]:underline-offset-2",children:[h.jsx("strong",{children:n?s.length===1?W2e():E2e({count:nn(s.length)}):s.length===1?H2e():_2e({count:nn(s.length)})}),!n&&h.jsx("button",{type:"button",onClick:()=>l(m=>!m),children:u?u2e():swe()})]}),u?h.jsx(D7t,{files:r}):h.jsxs("div",{className:"diff-explorer-layout grid grid-cols-[minmax(180px,_260px)_minmax(0,_1fr)] items-start gap-3.5 [@container((max-width:_960px))]:grid-cols-1",children:[h.jsx("div",{className:"diff-explorer-files sticky top-0 max-h-[min(70vh,_720px)] overflow-auto border border-border rounded-md bg-background [&_button]:grid [&_button]:grid-cols-[18px_minmax(0,_1fr)_auto_auto] [&_button]:items-center [&_button]:gap-[7px] [&_button]:w-full [&_button]:py-2 [&_button]:px-[9px] [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_button.active]:bg-surface [&_button.active]:shadow-diff-active [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap [&_code]:text-xs [@container((max-width:_960px))]:static [@container((max-width:_960px))]:max-h-55","aria-label":v2e(),children:s.map(m=>h.jsxs("button",{type:"button",className:m.key===_?"active":"","aria-pressed":m.key===_,onClick:()=>o(m.key),children:[h.jsx("span",{className:`diff-file-status font-mono text-xs font-medium text-muted [&.status-add]:text-accent-green [&.status-delete]:text-accent-red [&.status-rename]:text-accent-blue [&.status-copy]:text-accent-blue status-${m.file.type}`,children:L7t(m.file)}),h.jsx("code",{title:W5(m.file),children:W5(m.file)}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),h.jsx("div",{className:`${G5} diff-explorer-preview min-w-0`,children:f&&h.jsx($P,{file:f.file,defaultExpanded:!0},f.key)})]})]})}function O7t({experiment:e}){var s;const n=ht(AO(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return h.jsx(fh,{className:"branch-changes [&_>_.changes-note]:mx-4 [&_>_.changes-note]:my-3.5 [&_>_.diff-explorer]:mx-4 [&_>_.diff-explorer]:mb-0 [&_>_.diff-explorer]:mt-3.5 [&_>_.openresearch-diff]:mx-4 [&_>_.openresearch-diff]:mb-0 [&_>_.openresearch-diff]:mt-3.5 [&_>_.truncated-notice]:mx-4 [&_>_.truncated-notice]:mb-0 [&_>_.truncated-notice]:mt-3.5",children:r&&!t?h.jsxs(Qa,{children:[sse()," ",ze(r)]}):t?t.diff.trim()?h.jsxs(h.Fragment,{children:[t.truncated&&h.jsx(BP,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),h.jsx(PP,{diff:t.diff,partial:t.truncated})]}):h.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?dse():ese()}):h.jsx(Qa,{children:lse()})})}function FP({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:i,githubTitle:o,refreshing:a,onRefresh:l}){return h.jsxs("div",{className:"code-tab-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant shrink-0 [&_>_.seg]:p-0.5 [&_>_.seg]:rounded-sm [&_>_.seg_button]:py-0.5 [&_>_.seg_button]:px-2 [&_>_.seg_button]:text-sm [&_>_.seg_button]:font-medium",children:[t&&h.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default",role:"group","aria-label":U_e(),children:[h.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:K_e()}),h.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:P_e()})]}),r&&h.jsxs("span",{className:"wt-branch-chip inline-flex items-center gap-1 min-w-0 py-0.5 px-2 rounded-full bg-hover-muted text-subtext text-xs [&_>_svg]:shrink-0",title:s,children:[h.jsx(ib,{size:12}),h.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&h.jsx(Zv,{href:i,target:"_blank",rel:"noopener noreferrer",title:o,"aria-label":o,children:h.jsx(ab,{size:13})}),h.jsx("span",{className:"flex-1"}),h.jsx(tn,{title:yE(),"aria-label":yE(),onClick:l,children:a?h.jsx(Ot,{}):h.jsx(D_t,{size:13})})]})}const I7t=/\.(md|mdx|markdown)$/i,B7t=/\.tex$/i,$7t=/\.html?$/i,P7t=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,F7t=/\.(csv|tsv|xlsx?|ods)$/i,H7t=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,q7t=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,U7t=/\.pdf$/i,G7t=/\.(docx?|log|rtf|txt)$/i;function W7t(e){return P7t.test(e)}function ik(e){return I7t.test(e)}function HP(e){return B7t.test(e)}function V7t(e){return $7t.test(e)}function Vh({name:e}){const n=ik(e)?"markdown":W7t(e)?"image":F7t.test(e)?"spreadsheet":H7t.test(e)?"code":q7t.test(e)?"archive":U7t.test(e)?"pdf":G7t.test(e)||HP(e)?"document":"file";let t;return n==="markdown"?t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),h.jsx("path",{d:"M2.6 10.5v-5h1.2l1.6 2 1.6-2h1.2v5H6.8V7.6L5.4 9.3 4 7.6v2.9H2.6Zm8.5-5v2.4h1.3L10.5 10 8.6 7.9h1.3V5.5h1.2Z",fill:"currentColor"})]}):n==="image"?t=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),h.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),h.jsx("path",{d:"m2.8 12 3.3-3.5 2.2 2 2.1-2.5 2.8 4H2.8Z",fill:"currentColor"})]}):n==="spreadsheet"?t=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=h.jsx("path",{d:"M6.2 3 1.8 8l4.4 5 1.3-1.2L4.2 8l3.3-3.8L6.2 3Zm3.6 0-1.3 1.2L11.8 8l-3.3 3.8 1.3 1.2 4.4-5-4.4-5Z",fill:"currentColor"}):n==="archive"?t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),h.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),h.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),h.jsx("svg",{className:`file-tree-icon w-[15px] h-[15px] shrink-0 text-muted overflow-visible [&.markdown]:text-accent-blue [&.image]:text-accent-purple [&.spreadsheet]:text-accent-green [&.code]:text-accent-orange [&.archive]:text-accent-amber [&.pdf]:text-accent-red [&.document]:text-subtext ${n}`,viewBox:"0 0 16 16","aria-hidden":"true",children:t})}function qP(e,n){const t=navigator.clipboard;if(!t){ir(Lve(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>ir(V0(),"success")).catch(r=>ir(r instanceof Error?r.message:String(r),"error"))}function UP({name:e,onCommit:n,onCancel:t}){const[r,s]=M.useState(e),i=M.useRef(!1),o=()=>{if(i.current)return;i.current=!0;const a=r.trim();!a||a===e?t():n(a)};return h.jsx(zs,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":tbe({path:ze(e)}),onFocus:a=>{const l=e.lastIndexOf(".");a.currentTarget.setSelectionRange(0,l>0?l:e.length)},onChange:a=>s(a.target.value),onClick:a=>a.stopPropagation(),onDoubleClick:a=>a.stopPropagation(),onBlur:o,onKeyDown:a=>{a.stopPropagation(),a.key==="Enter"?(a.preventDefault(),a.currentTarget.blur()):a.key==="Escape"&&(a.preventDefault(),i.current=!0,t())}})}function GP(e,n){const t=e.currentTarget.getBoundingClientRect(),r="clientX"in e?e.clientX:0,s="clientY"in e?e.clientY:0;return{path:n,x:r||t.left+16,y:s||t.top+t.height}}function WP({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onClose:o}){const a=M.useRef(null),l=M.useRef(o);l.current=o;const[u,_]=M.useState({x:e.x,y:e.y});M.useLayoutEffect(()=>{var S;const m=a.current;if(!m)return;const x=document.activeElement instanceof HTMLElement?document.activeElement:null;return _({x:Math.max(8,Math.min(e.x,window.innerWidth-m.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-m.offsetHeight-8))}),(S=m.querySelector("button"))==null||S.focus(),()=>{m.contains(document.activeElement)&&(x==null||x.focus())}},[e]),M.useEffect(()=>{const m=()=>l.current(),x=b=>{var v;(v=a.current)!=null&&v.contains(b.target instanceof Node?b.target:null)||l.current()},S=b=>{if(b.key==="Tab"){b.preventDefault(),l.current();return}b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),l.current())};return document.addEventListener("pointerdown",x),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",S,!0),()=>{document.removeEventListener("pointerdown",x),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",S,!0)}},[]);const f=m=>{l.current(),m()},p=(m,x,S=!1)=>h.jsx(Ur,{size:"compact",role:"menuitem",danger:S,onClick:()=>f(x),children:h.jsx("span",{children:m})});return Fo.createPortal(h.jsxs("div",{ref:a,role:"menu","aria-label":Vve({path:ze(e.path)}),className:"option-menu fixed z-100 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 shadow-menu",style:{left:u.x,top:u.y},onContextMenu:m=>m.preventDefault(),onKeyDown:m=>{var v,y;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const x=[...((v=a.current)==null?void 0:v.querySelectorAll("button"))??[]],S=x.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:x[0]),b=m.key==="ArrowDown"?1:-1;(y=x[(S+b+x.length)%x.length])==null||y.focus()},children:[p(Xve(),n),t&&p(nD(),t),r&&p(qve(),r),p(XM(),s),i&&p(tD(),i,!0)]}),document.body)}const V5=["file-tree-row flex items-center gap-1.5 w-full py-[3px] px-2.5 border-0","bg-transparent text-text text-start cursor-pointer font-[inherit]","[&:hover]:bg-panel [&_>_svg]:shrink-0","[&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted"].join(" "),lA=["file-tree-chevron text-muted shrink-0 [button&]:inline-flex","[button&]:items-center [button&]:justify-center [button&]:w-[13px]","[button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent","[button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90"].join(" ");function cA(){return{dirs:new Map,files:[]}}function VP(e){const n=cA();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?h.jsx(Ho,{size:13,className:lA}):h.jsx(qo,{size:13,className:lA}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&h.jsx(ak,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:o,renamingPath:a,onContextMenu:l,onRename:u,onCancelRename:_})]})}function ak({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:o,onContextMenu:a,onRename:l,onCancelRename:u}){const _=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),f=[...e.files].sort((p,m)=>p.localeCompare(m));return h.jsxs(h.Fragment,{children:[_.map(p=>{const m=n?`${n}/${p}`:p;return h.jsx(K7t,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:o,onContextMenu:a,onRename:l,onCancelRename:u},`d:${m}`)}),f.map(p=>{const m=n?`${n}/${p}`:p;if(o===m&&l&&u)return h.jsxs("div",{className:V5,style:{paddingInlineStart:8+t*14},children:[h.jsx(Vh,{name:p}),h.jsx(UP,{name:p,onCommit:S=>l(m,S),onCancel:u})]},`f:${m}`);const x=Gr(S=>i(m,S));return h.jsxs("button",{type:"button",className:V5,style:{paddingInlineStart:8+t*14},...x,onContextMenu:S=>{a&&(S.preventDefault(),a(S,m))},onKeyDown:S=>{if(a&&(S.key==="ContextMenu"||S.shiftKey&&S.key==="F10")){S.preventDefault(),a(S,m);return}x.onKeyDown(S)},title:AK({name:ze(m)}),children:[h.jsx(Vh,{name:p}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function Q7t({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:o,onOpenFile:a}){var N,E;const l=t.branchName,u=ht({...MO(e,{ref:l}),enabled:r==="files",subscribed:r==="files"}),_=ht({...q4(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),f=u.data,p=(N=u.error)==null?void 0:N.message,m=u.isFetching,x=AO(t.id),S=nG({queryKey:x.queryKey})>0,b=(E=_.data)!=null&&E.exists&&_.data.branch===l?t.chatSessionId??void 0:void 0,v=()=>{u.refetch()},y=M.useMemo(()=>f?VP(f.entries):null,[f]),w=r==="files"?m:S,C=M.useCallback(j=>{const z=new Set(s);z.has(j)?z.delete(j):z.add(j),o(z)},[s,o]);return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[h.jsx(FP,{view:r,onViewChange:i,branchLabel:l,branchTitle:`Committed branch ${l}`,githubHref:n.githubEnabled?Yv(n.githubOwner,n.githubRepo,l):void 0,githubTitle:QM({branch:ze(l)}),refreshing:w,onRefresh:()=>r==="files"?v():void Je.invalidateQueries(x)}),r==="changes"?h.jsx(O7t,{experiment:t},t.id):h.jsxs(h.Fragment,{children:[(f==null?void 0:f.truncated)&&h.jsx(Qa,{children:t0e()}),p&&y&&h.jsxs(Qa,{children:[c0e()," ",ze(p)]}),h.jsx(fh,{children:y?y.dirs.size===0&&y.files.length===0?h.jsx(Qa,{children:i0e()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(ak,{node:y,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(j,z)=>b?a(j,b,void 0,z):a(j,void 0,l,z)})}):h.jsx(Qa,{children:p?aD({error:ze(p)}):oD()})})]})]})}function Y7t({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:o,canRenameFile:a}){var P,L,$;const l=n.id,_=((P=ht(ka(l)).data)==null?void 0:P.some(H=>H.id===e&&H.busy))??!1,f=ht({...q4(e??""),enabled:!!e,refetchInterval:_?5e3:!1}),p=f.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},x=ht({...MO(l,m),enabled:!e||f.isSuccess,refetchInterval:_?5e3:!1}),S=x.data,b=(L=f.error??x.error)==null?void 0:L.message,v=f.isFetching||x.isFetching,[y,w]=M.useState(null),[C,N]=M.useState(null),E=M.useCallback(()=>{e&&Je.invalidateQueries(q4(e)),Je.invalidateQueries({queryKey:Et("getCodeTree",l),predicate:H=>!FM(H)})},[e,l]),j=M.useRef(_);M.useEffect(()=>{j.current&&!_&&E(),j.current=_},[_,E]);const z=M.useMemo(()=>S?VP(S.entries):null,[S]),R=M.useCallback(H=>{const G=new Set(r);G.has(H)?G.delete(H):G.add(H),i(G)},[r,i]),O=e&&(p!=null&&p.exists)?p:null,I=(O==null?void 0:O.branch)??(O!=null&&O.baselineBranch?lot({branch:ze(O.baselineBranch)}):RD()),F=(($=O==null?void 0:O.files)==null?void 0:$.length)??0,U=O?eot({branch:ze(`${I}${F>0?"*":""}`)}):sot({branch:ze(n.baselineBranch)}),q=O?O.branch:n.baselineBranch,Y=(H,G)=>O?o(H,e,void 0,G):o(H,void 0,n.baselineBranch,G),V=(S==null?void 0:S.root)==="worktree",Z=async(H,G)=>{try{await alt(l,H,G,{sessionId:e}),E()}catch(ne){ir(ne instanceof Error?ne.message:String(ne),"error")}},te=H=>{const G=(S==null?void 0:S.path)??n.repoPath;qP(G,H)};return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[h.jsx(FP,{view:O?t:"files",onViewChange:s,showViewToggle:!!O,branchLabel:U,branchTitle:U,githubHref:n.githubEnabled&&q?Yv(n.githubOwner,n.githubRepo,q):void 0,githubTitle:q?QM({branch:ze(q)}):void 0,refreshing:v,onRefresh:E}),b&&(p||S)&&h.jsxs(Qa,{children:[zot()," ",ze(b)]}),!S||e&&!p?h.jsx(fh,{children:h.jsx(Qa,{children:b?aD({error:ze(b)}):oD()})}):O&&t==="changes"?h.jsx(fh,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:F===0||!O.diff?h.jsx("div",{className:"changes-note text-sm text-muted",children:yot()}):h.jsxs(h.Fragment,{children:[O.diff.truncated&&h.jsx(BP,{bytesRead:O.diff.bytesRead,byteLimit:O.diff.byteLimit}),h.jsx(PP,{diff:O.diff.diff,partial:O.diff.truncated})]})}):h.jsxs(fh,{children:[S.truncated&&h.jsx(Qa,{children:dot()}),z?z.dirs.size===0&&z.files.length===0?h.jsx(Qa,{children:kot()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(ak,{node:z,parentPath:"",depth:0,toggled:r,onToggle:R,onOpenFile:Y,renamingPath:C,onContextMenu:(H,G)=>{w(GP(H,G))},onRename:(H,G)=>{N(null),Z(H,{action:"rename",newName:G})},onCancelRename:()=>N(null)})}):h.jsx(Qa,{children:mot()})]}),y&&h.jsx(WP,{target:y,onOpen:()=>Y(y.path,"keepOpen"),onRename:V&&a(y.path)?()=>N(y.path):void 0,onDuplicate:V?()=>void Z(y.path,{action:"duplicate"}):void 0,onCopyPath:()=>te(y.path),onDelete:V?()=>{window.confirm($ve({path:ze(y.path)}))&&Z(y.path,{action:"delete"})}:void 0,onClose:()=>w(null)})]})}function KP({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=M.useMemo(()=>{if(!e)return[];const _=e.replace(/\r\n?/g,` -`),f=v$(_,hS(n));return _.endsWith(` -`)?f.slice(0,-1):f},[e,n]),o=t&&i.length>0?Math.min(Math.max(Math.trunc(t),1),i.length):void 0,a=M.useRef(null);M.useEffect(()=>{var _;r!==void 0&&(o?((_=a.current)==null||_.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,o]);const{ruleCh:l}=z$(i.length),u=M.useMemo(()=>i.map((_,f)=>h.jsxs("div",{ref:f+1===o?a:void 0,className:`file-view-line flex items-stretch ${f+1===o?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[h.jsx("span",{"data-line":f+1,className:`${N$} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${l}ch`},"aria-hidden":"true"}),h.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${xv} ${E$}`,children:b$(_)?h.jsx("br",{}):_})]},f)),[i,l,o]);return h.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${xv}`,children:[i.length>0&&h.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${l}ch`},"aria-hidden":"true"}),u]})}function QP(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function uA({url:e,name:n}){return h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[e5e()," ",h.jsxs("a",{href:e,download:n,children:[pD()," ",ze(n)]})]})}function K5({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,i]=M.useState(!1);if(M.useEffect(()=>i(!1),[e,n]),s)return h.jsx(uA,{url:n,name:t});let o;return e==="image"?o=h.jsx("div",{className:"fpreview-image flex min-h-0 flex-1 items-start justify-center overflow-auto p-6 [&_img]:max-w-full [&_img]:h-auto [&_img]:border [&_img]:border-border [&_img]:rounded-sm",children:h.jsx("img",{src:n,alt:t,onError:()=>i(!0)})}):e==="audio"?o=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):e==="video"?o=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):o=h.jsx("object",{className:"fpreview-pdf block min-h-0 flex-1 w-full border-0","aria-label":t,data:n,type:"application/pdf",onError:()=>i(!0),children:h.jsx(uA,{url:n,name:t})}),h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[o,r&&h.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:h.jsxs("a",{href:n,download:t,children:[pD()," ",t]})})]})}const X7t=e=>({queryKey:Et("fileVersion",e),staleTime:2e3,refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:2e3,queryFn:async({signal:n})=>{const t=await fetch(e,{method:"HEAD",cache:"no-store",signal:n});if(t.status===404)return"missing";if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.headers.get("etag")??t.headers.get("content-length")}});function YP(e,n=!0){return ht({...X7t(e),enabled:n,subscribed:n}).data??null}const fA="tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]";function Z7t(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function J7t(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),i=r===-1?"":t.slice(r),o=s.indexOf("?"),a=o===-1?s:s.slice(0,o),l=o===-1?"":s.slice(o+1),u=a.startsWith("/")?[]:n.split("/").filter(m=>m.length>0);for(const m of a.split("/"))if(!(!m||m==="."))if(m===".."){if(u.length===0)return null;u.pop()}else u.push(m);const _=u.join("/");if(!_)return null;const f=new URLSearchParams(l);f.delete("path");const p=f.toString();return{path:_,url:`${Oh(e,_)}${p?`&${p}`:""}${i}`}}function eCt(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ----`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const XP="orx:files-tree-width",ZP="orx:artifacts-collapsed:",JP=180,eF=320,tCt=8,nCt=280;function rCt(){try{const e=Number(localStorage.getItem(XP));if(Number.isFinite(e)&&e>=JP&&e<=eF)return e}catch{}return nCt}function sCt(e){try{const n=localStorage.getItem(`${ZP}${e}`);if(!n)return new Set;const t=JSON.parse(n);return Array.isArray(t)?new Set(t.filter(r=>typeof r=="string")):new Set}catch{return new Set}}function pp(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=pp(t.children??[],n);if(r)return r}}return null}function tF({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(Z7t(i))return i;const o=J7t(e,n,i);if(!o)return null;const a=pp(r,o.path);if(!a)return o.url;const l=o.url.indexOf("#"),u=l===-1?o.url:o.url.slice(0,l),_=l===-1?"":o.url.slice(l);return`${u}&v=${a.modifiedAt}:${a.size}${_}`};return h.jsx("div",{className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:font-semibold [&_h2]:text-text [&_h2]:font-semibold [&_h3]:text-text [&_h3]:font-semibold [&_h4]:text-text [&_h4]:font-semibold [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text artifact-md text-lg [&_h1]:text-4xl [&_h1]:leading-[1.18] [&_h1]:mt-7 [&_h1]:mx-0 [&_h1]:mb-3.5 [&_h2]:text-3xl [&_h2]:leading-tight [&_h2]:mt-7 [&_h2]:mx-0 [&_h2]:mb-2.5 [&_h3]:text-xl [&_h3]:leading-[1.35] [&_h3]:mt-5.5 [&_h3]:mx-0 [&_h3]:mb-2 [&_h4]:text-lg [&_h4]:leading-[1.4] [&_h4]:mt-4.5 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:overflow-x-auto [&_.artifact-img]:block [&_.artifact-img]:my-3 [&_.artifact-img]:mx-0 [&_.artifact-img_img]:max-w-full [&_.artifact-img_img]:h-auto [&_.artifact-img_img]:border [&_.artifact-img_img]:border-border [&_.artifact-img_img]:rounded-sm [&_.artifact-img-caption]:block [&_.artifact-img-caption]:mt-1 [&_.artifact-img-caption]:text-center [&_.artifact-img-caption]:text-sm [&_.artifact-img-caption]:text-subtext",children:h.jsx(_bt,{remarkPlugins:[u$,[f$,w$]],rehypePlugins:[$B],components:{a:({href:i,children:o,...a})=>{const l=!i||i.startsWith("#"),u=l?i:s(i);return u?h.jsx("a",{...a,href:u,...l?{}:{target:"_blank",rel:"noopener noreferrer"},children:o}):h.jsx("span",{children:o})},img:({src:i,alt:o})=>{if(!i||typeof i!="string")return null;const a=s(i);return a?h.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[h.jsx("img",{src:a,alt:o??"",loading:"lazy"}),o&&h.jsx("span",{className:"artifact-img-caption",children:o})]}):null},...S$},children:y$(eCt(t))})})}function iCt(e){return e.presentation==="text"&&ik(e.name)?"markdown":QP(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function aCt(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=hL,i=z6(e,n.path),o=ht({...i,enabled:s,subscribed:s}),a=M.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});M.useEffect(()=>{const _=a.current;a.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&_.projectId===e&&_.path===n.path&&(_.modifiedAt!==n.modifiedAt||_.size!==n.size||_.version!==null&&_.version!==r)&&Je.invalidateQueries({queryKey:i.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const l=o.data;return{text:l&&!l.binary?l.content:null,binary:(l==null?void 0:l.binary)??!1,truncated:(l==null?void 0:l.truncated)??!1,error:l?null:((u=o.error)==null?void 0:u.message)??(l===null?Une():null),wantsText:s}}function oCt({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=iCt(n),i=YP(Oh(e,n.path)),{text:o,binary:a,truncated:l,error:u,wantsText:_}=aCt(e,n,s,i),[f,p]=M.useState(!1),m=s==="markdown",x=n.path.split("/").slice(0,-1).join("/"),S=`${Oh(e,n.path)}&v=${encodeURIComponent(i??`${n.modifiedAt}:${n.size}`)}`;let b;return s==="image"||s==="audio"||s==="video"||s==="pdf"?b=h.jsx(K5,{kind:s,url:S,name:n.name}):s==="download"||!_||a?b=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||a?Ine():Yre()," ",h.jsx("a",{href:S,...s==="download"||a?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||a?fD():Kne()})]}):u?b=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[hre()," ",ze(u)]}):o===null?b=h.jsxs(rs,{children:[h.jsx(Ot,{})," ",ZM()]}):m&&!f?b=h.jsx(tF,{projectId:e,folder:x,markdown:o,entries:r}):b=h.jsx(KP,{text:o,path:n.path}),h.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0 [@container((max-width:_720px))]:hidden",children:[h.jsxs("div",{className:"fpreview-head flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-subtext shrink-0",children:[h.jsx(Vh,{name:n.name}),h.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":ze(n.path),children:n.name}),h.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[Rre()," ",new Date(n.modifiedAt).toLocaleString(T(),{dateStyle:"medium",timeStyle:"short"})]}),(s==="text"||s==="download")&&h.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:Il(n.size)}),m&&h.jsx(tn,{size:"small",active:f,"data-tip":f?Q1():Zd(),"data-tip-align":"end","aria-label":f?Q1():Zd(),onClick:()=>p(v=>!v),children:h.jsx(P4,{size:13})}),h.jsx(Zv,{size:"small",href:S,target:"_blank",rel:"noopener noreferrer","data-tip":G9(),"data-tip-align":"end","aria-label":G9(),children:h.jsx(Lf,{size:13})}),h.jsx(tn,{size:"small","data-tip":U9(),"data-tip-align":"end","aria-label":U9(),onClick:()=>{window.confirm(B3({path:ze(n.path)}))&&t(n.path)},children:h.jsx(s_,{size:13})})]}),h.jsxs("div",{className:`fpreview-body flex-1 min-h-0 overflow-auto [&.doc]:pt-4.5 [&.doc]:px-7 [&.doc]:pb-12 [&.doc_.artifact-md]:max-w-readable [&.doc_.artifact-md]:my-0 [&.doc_.artifact-md]:mx-auto ${m&&!f?"doc":""}`,children:[b,l&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:gre()})]})]})}function nF({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:o,onDelete:a,renamingPath:l,onContextMenu:u,onRename:_,onCancelRename:f}){return h.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(p=>{var x;const m={paddingInlineStart:8+Math.min(n,tCt)*14};if(p.isDir){const S=!t.has(p.path);return h.jsxs("div",{className:"min-w-0 max-w-full",children:[h.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100",style:m,onClick:()=>s(p.path),children:[h.jsx("button",{className:"file-tree-chevron text-muted shrink-0 [button&]:inline-flex [button&]:items-center [button&]:justify-center [button&]:w-[13px] [button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent [button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90","aria-label":S?wne({name:ze(p.name)}):Mne({name:ze(p.name)}),onClick:b=>{b.stopPropagation(),s(p.path)},children:h.jsx(qo,{size:13,className:S?"open":""})}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),h.jsx(tn,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":cre(),"data-tip-align":"end","aria-label":Tne({name:ze(p.name)}),onClick:b=>{b.stopPropagation(),window.confirm(B3({path:ze(p.path)}))&&a(p.path)},children:h.jsx(s_,{size:12})})]}),S&&(((x=p.children)==null?void 0:x.length)??0)>0&&h.jsx(nF,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:o,onDelete:a,renamingPath:l,onContextMenu:u,onRename:_,onCancelRename:f})]},p.path)}return l===p.path?h.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start font-[inherit] artifact-tree-row",style:m,children:[h.jsx(Vh,{name:p.name}),h.jsx(UP,{name:p.name,onCommit:S=>_(p.path,S),onCancel:f})]},p.path):h.jsxs("button",{type:"button",className:`file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100 ${r===p.path?"selected":""}`,style:m,title:RV({path:ze(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>i(p.path),onDoubleClick:()=>o(p.path),onContextMenu:S=>{S.preventDefault(),i(p.path),u(S,p.path)},onAuxClick:S=>{S.button===1&&(S.preventDefault(),i(p.path),o(p.path))},onKeyDown:S=>{if(S.key==="ContextMenu"||S.shiftKey&&S.key==="F10"){S.preventDefault(),i(p.path),u(S,p.path);return}if(S.key===" "){S.preventDefault(),S.stopPropagation(),i(p.path);return}S.key==="Enter"&&(S.preventDefault(),S.stopPropagation(),i(p.path),o(p.path))},children:[h.jsx(Vh,{name:p.name}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function lCt({dir:e,onOpenStorage:n}){const[t,r]=M.useState(!1);return h.jsxs("div",{className:"ftree-footer shrink-0 flex items-center gap-0.5 py-[5px] px-2 border-t border-t-border-variant [&_code]:flex-1 [&_code]:min-w-0 [&_code]:[direction:rtl] [&_code]:text-left [&_code]:font-mono [&_code]:text-xs [&_code]:text-muted [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:ze(e),children:[h.jsx("code",{className:"path-front-ellipsis",children:e}),h.jsx(tn,{size:"small",className:fA,"data-tip":t?V0():XM(),"aria-label":nre(),onClick:()=>{var s;(s=navigator.clipboard)==null||s.writeText(e),r(!0),setTimeout(()=>r(!1),1200)},children:t?h.jsx(qi,{size:12}):h.jsx(nb,{size:12})}),n&&h.jsx(tn,{size:"small",className:fA,"data-tip":W9(),"data-tip-align":"end","aria-label":W9(),onClick:n,children:h.jsx($_t,{size:12})})]})}function cCt({project:e,artifacts:n,onOpenFile:t,canRenameFile:r,onOpenStorage:s}){const[i,o]=M.useState(null),[a,l]=M.useState(()=>sCt(e.id)),[u,_]=M.useState(rCt),[f,p]=M.useState(null),[m,x]=M.useState(null),S=M.useRef(null);M.useEffect(()=>{try{localStorage.setItem(`${ZP}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const b=j=>{var F;j.preventDefault(),j.currentTarget.setPointerCapture(j.pointerId);const z=(F=S.current)==null?void 0:F.getBoundingClientRect(),R=document.body.style.userSelect;document.body.style.userSelect="none";const O=U=>{const q=Math.round(U.clientX-((z==null?void 0:z.left)??0)),Y=Math.min(Math.max(q,JP),eF);_(Y);try{localStorage.setItem(XP,String(Y))}catch{}},I=()=>{window.removeEventListener("pointermove",O),window.removeEventListener("pointerup",I),window.removeEventListener("pointercancel",I),document.body.style.userSelect=R};window.addEventListener("pointermove",O),window.addEventListener("pointerup",I),window.addEventListener("pointercancel",I)};M.useEffect(()=>{if(!i||!n)return;const j=pp(n.entries,i);(!j||j.isDir)&&o(null)},[i,n]);const v=j=>l(z=>{const R=new Set(z);return R.has(j)?R.delete(j):R.add(j),R}),y=j=>{(i===j||i!=null&&i.startsWith(j+"/"))&&o(null),lct(e.id,j).catch(()=>{})},w=async(j,z)=>{try{await cct(e.id,j,z),z.action==="rename"&&i===j&&o(null)}catch(R){ir(R instanceof Error?R.message:String(R),"error")}},C=j=>{n&&qP(n.dir,j)};if(!n)return h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs(rs,{className:"p-5",children:[h.jsx(Ot,{})," ",zre()]})});const N=j=>h.jsx(nF,{entries:j,depth:0,collapsed:a,selected:i,onToggle:v,onSelect:o,onOpenFile:t,onDelete:y,renamingPath:m,onContextMenu:(z,R)=>{p(GP(z,R))},onRename:(z,R)=>{x(null),w(z,{action:"rename",newName:R})},onCancelRename:()=>x(null)}),E=i?pp(n.entries,i):null;return n.entries.length===0?h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs("div",{className:"files-empty-state flex-1 flex flex-col items-center justify-center gap-1.5 p-6 text-center text-muted [&_h3]:mt-1.5 [&_h3]:mx-0 [&_h3]:mb-0 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text [&_p]:m-0 [&_p]:max-w-105 [&_p]:text-sm [&_p]:leading-[1.55] [&_p]:text-subtext [&_.ftree-footer]:mt-2.5 [&_.ftree-footer]:max-w-full [&_.ftree-footer]:border [&_.ftree-footer]:border-border [&_.ftree-footer]:rounded-md [&_.ftree-footer]:py-1.5 [&_.ftree-footer]:px-2.5 [&_.ftree-footer]:bg-background [&_.ftree-footer_code]:max-w-95",children:[h.jsx(v6,{size:28,strokeWidth:1.5}),h.jsx("h3",{children:Ore()}),h.jsx("p",{children:Wre()}),h.jsx(lCt,{dir:n.dir,onOpenStorage:s})]})}):h.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[h.jsxs("div",{className:"ftree-pane relative shrink-0 flex flex-col min-h-0 border-s border-s-border-variant border-e border-e-border-variant bg-background [@container((max-width:_720px))]:!w-full",ref:S,style:{width:u},children:[h.jsx("div",{className:"ftree-resizer absolute -end-[3px] top-0 bottom-0 w-1.5 cursor-col-resize z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover [@container((max-width:_720px))]:hidden",onPointerDown:b}),h.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[N(n.entries),n.truncated&&h.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:xre()})]})]}),E?h.jsx(oCt,{projectId:e.id,entry:E,onDelete:y,artifactEntries:n.entries},E.path):h.jsxs("div",{className:"fpreview flex-1 min-w-0 flex flex-col min-h-0 bg-background fpreview-none items-center justify-center gap-2 text-sm text-muted [@container((max-width:_720px))]:hidden",children:[h.jsx(k_t,{size:22,strokeWidth:1.5}),h.jsx("span",{children:Zne()})]}),f&&h.jsx(WP,{target:f,onOpen:()=>t(f.path),onRename:r(f.path)?()=>x(f.path):void 0,onDuplicate:()=>void w(f.path,{action:"duplicate"}),onCopyPath:()=>C(f.path),onDelete:()=>{window.confirm(B3({path:ze(f.path)}))&&y(f.path)},onClose:()=>p(null)})]})}const rF=20*1024*1024,sF="bg-background border border-border rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text",iF="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",aF="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",uCt="font-mono text-base font-medium text-text",fCt="mt-1 mb-0 text-sm leading-relaxed text-text";function oF(e){return new Promise((n,t)=>{const r=new FileReader;r.onload=()=>{const s=r.result;if(typeof s!="string"){t(new Error("could not read file"));return}const i=s.indexOf(",");n(i>=0?s.slice(i+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function dCt(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function lF({accept:e,busy:n,prompt:t,onFile:r}){const[s,i]=M.useState(!1),o=M.useRef(null);return h.jsxs("div",{className:`flex flex-col items-center justify-center gap-2 py-6.5 px-4.5 border-[1.5px] border-dashed rounded-md text-center text-sm text-text transition-[border-color,background] duration-120 ${n?"cursor-default":"cursor-pointer"} ${s?"border-primary bg-surface text-text":"border-border-variant bg-surface [&:hover]:border-primary"}`,onDragOver:a=>{a.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:a=>{var u;if(a.preventDefault(),i(!1),n)return;const l=(u=a.dataTransfer.files)==null?void 0:u[0];l&&r(l)},onClick:()=>{var a;n||(a=o.current)==null||a.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:a=>{var l;(a.key==="Enter"||a.key===" ")&&!n&&(a.preventDefault(),(l=o.current)==null||l.click())},children:[h.jsx("input",{ref:o,type:"file",accept:e,hidden:!0,onChange:a=>{var u;const l=(u=a.target.files)==null?void 0:u[0];l&&r(l),a.target.value=""}}),n?h.jsxs(h.Fragment,{children:[h.jsx(Ot,{}),h.jsx("span",{children:Ett()})]}):h.jsxs(h.Fragment,{children:[h.jsx(X_t,{size:20,strokeWidth:1.5}),h.jsx("span",{children:t})]})]})}function cF({bytes:e,updatedAt:n}){return h.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Il(e),n>0&&h.jsxs("span",{className:"text-muted",children:[" · ",Lo(n)]})]})}function hCt({skill:e,onError:n}){const t=Cn({mutationFn:Act}),r=t.isPending;return h.jsxs("div",{className:aF,children:[h.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[h.jsxs("code",{className:uCt,children:["/",e.name]}),e.origin&&h.jsx(Pt,{children:e.origin})]}),h.jsx(cF,{bytes:e.bytes,updatedAt:e.updatedAt}),!e.origin&&h.jsx(tn,{"data-tip":Ket(),"data-tip-align":"end","aria-label":QJe({name:ze(e.name)}),disabled:r,onClick:()=>{window.confirm(GJe({name:ze(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:h.jsx(s_,{size:13})})]})}function _Ct({template:e,onError:n}){const t=Cn({mutationFn:zct}),r=t.isPending,s=e.supportFiles.length;return h.jsxs("div",{className:aF,children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("span",{className:"text-base font-medium text-text",children:e.name}),h.jsxs("p",{className:fCt,children:[e.entry,s>0&&(s===1?ket():Ret({count:nn(s)}))]})]}),h.jsx(cF,{bytes:e.bytes,updatedAt:e.updatedAt}),h.jsx(tn,{"data-tip":Zet(),"data-tip-align":"end","aria-label":ret({name:ze(e.name)}),disabled:r,onClick:()=>{window.confirm(JJe({name:ze(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:h.jsx(s_,{size:13})})]})}function pCt(){var p;const e=Cn({mutationFn:jct}),n=ht(hut()),t=n.data,r=n.isFetching,s=(p=n.error)==null?void 0:p.message,[i,o]=M.useState(!1),[a,l]=M.useState(null),u=()=>{n.refetch()},_=M.useRef(!1),f=M.useCallback(async m=>{if(!_.current){if(l(null),!dCt(m.name)){l(Dtt());return}if(m.size>rF){l(ZD());return}_.current=!0,o(!0);try{await e.mutateAsync({filename:m.name,contentBase64:await oF(m)})}catch(x){l(x instanceof Error?x.message:String(x))}finally{_.current=!1,o(!1)}}},[]);return h.jsxs("section",{className:sF,children:[h.jsxs("div",{className:"flex items-baseline gap-2.5",children:[h.jsx("h3",{children:wtt()}),h.jsxs(Oe,{className:"ms-auto",size:"small",onClick:u,disabled:r,children:[h.jsx(ro,{size:12,className:r?"animate-[spin_0.9s_linear_infinite]":""})," ",Gp()]})]}),h.jsx("p",{className:iF,children:oet()}),h.jsx(lF,{accept:".md,.markdown,.zip",busy:i,prompt:det(),onFile:m=>void f(m)}),a&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),s&&h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Oet()," ",s]}),t===void 0?s?null:h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(Ot,{})," ",att()]}):t.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:_tt()}):h.jsx("div",{className:"flex flex-col mt-1",children:t.map(m=>h.jsx(hCt,{skill:m,onError:l},m.name))})]})}function mCt(){var _;const e=Cn({mutationFn:Nct}),n=ht(dut()),t=n.data,r=(_=n.error)==null?void 0:_.message,[s,i]=M.useState(!1),[o,a]=M.useState(null),l=M.useRef(!1),u=M.useCallback(async f=>{if(l.current)return;a(null);const p=f.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){a(Btt());return}if(f.size>rF){a(ZD());return}l.current=!0,i(!0);try{await e.mutateAsync({filename:f.name,contentBase64:await oF(f)})}catch(m){a(m instanceof Error?m.message:String(m))}finally{l.current=!1,i(!1)}},[]);return h.jsxs("section",{className:sF,children:[h.jsx("h3",{children:ntt()}),h.jsx("p",{className:iF,children:jtt()}),h.jsx(lF,{accept:".tex,.zip",busy:s,prompt:met(),onFile:f=>void u(f)}),o&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:o}),r&&h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Pet()," ",r]}),t===void 0?r?null:h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(Ot,{})," ",utt()]}):t.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:vtt()}):h.jsx("div",{className:"flex flex-col mt-1",children:t.map(f=>h.jsx(_Ct,{template:f,onError:a},f.name))})]})}function gCt(){return h.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl",children:[h.jsx("h1",{children:Uet()}),h.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:zet()}),h.jsx(pCt,{}),h.jsx(mCt,{})]})}const vCt="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Pc({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:i,onPromote:o,onClose:a}){return h.jsxs("button",{className:`tab [&.closable]:max-w-60 [&.closable]:pe-0.5 [&_.tab-label]:grid [&_.tab-label]:grid-cols-[minmax(0,_1fr)] [&_.tab-label]:min-w-0 [&_.tab-label]:overflow-hidden [&_.tab-label_>_span]:[grid-area:1_/_1] [&_.tab-label_>_span]:overflow-hidden [&_.tab-label_>_span]:text-ellipsis [&_.tab-label_>_span]:whitespace-nowrap [&_.tab-label::after]:[grid-area:1_/_1] [&_.tab-label::after]:overflow-hidden [&_.tab-label::after]:text-ellipsis [&_.tab-label::after]:whitespace-nowrap [&_.tab-label::after]:content-[attr(data-label)] [&_.tab-label::after]:invisible [&_.tab-label::after]:font-medium [&_.tab-close]:inline-flex [&_.tab-close]:items-center [&_.tab-close]:justify-center [&_.tab-close]:w-3.5 [&_.tab-close]:h-3.5 [&_.tab-close]:rounded-xs [&_.tab-close]:text-muted [&_.tab-close]:shrink-0 [&_.tab-close:hover]:bg-hover-strong [&_.tab-close:hover]:text-text relative inline-flex items-center gap-[5px] h-8 py-0 px-2 border border-transparent border-b-0 rounded-[var(--radius-md)_var(--radius-md)_0_0] text-sm font-normal text-subtext whitespace-nowrap select-none min-w-24 [&:hover]:bg-surface [&:hover]:text-text [&:not(.active)_+_.tab:not(.active)::before]:content-[''] [&:not(.active)_+_.tab:not(.active)::before]:absolute [&:not(.active)_+_.tab:not(.active)::before]:top-2.5 [&:not(.active)_+_.tab:not(.active)::before]:bottom-2.5 [&:not(.active)_+_.tab:not(.active)::before]:-start-px [&:not(.active)_+_.tab:not(.active)::before]:w-px [&:not(.active)_+_.tab:not(.active)::before]:bg-border [&.active]:border-border [&.active]:bg-background [&.active]:text-text [&.active]:font-medium [&.active::after]:content-[''] [&.active::after]:absolute [&.active::after]:end-0 [&.active::after]:-bottom-px [&.active::after]:start-0 [&.active::after]:h-px [&.active::after]:bg-background closable ${e?"active":""} ${s?vCt:""}`,onClick:i,onDoubleClick:o,title:s?Jrt({label:n}):n,"aria-label":s?Qrt({label:n}):n,children:[t,h.jsx("span",{className:"tab-label","data-label":n,children:h.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),h.jsx("span",{role:"button",className:"tab-close",title:O_e(),onPointerDown:l=>l.preventDefault(),onClick:l=>{l.stopPropagation(),a()},children:h.jsx(es,{size:12})})]})}const dA=["files-pill inline-flex items-center gap-2 min-w-0 border border-border","rounded-md py-[7px] px-[11px] bg-background text-text","no-underline [&_code]:font-mono [&_code]:text-sm","[&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap","[&_>_svg]:shrink-0 [&_>_svg]:text-muted [a&:hover]:border-muted"].join(" ");function bCt({owner:e,repo:n,branch:t}){return!e||!n?h.jsx("span",{className:dA,children:h.jsx("code",{children:t})}):h.jsxs("a",{className:dA,href:Yv(e,n,t),target:"_blank",rel:"noopener noreferrer",title:V1({name:ze(t)}),children:[h.jsx("code",{children:t}),h.jsx(ab,{size:12})]})}const zw=["experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant","[&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm","[&_h2]:font-semibold"].join(" "),hA=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function _A(e){return new Date(e).toLocaleString(T(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function pA(e,n){return J1((e.endedAt??n)-e.createdAt)}function yCt({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const o=r[0]??null,a=r.some(_=>_.status==="running"||_.status==="starting"),[l,u]=M.useState(()=>Date.now());return M.useEffect(()=>{if(!a)return;u(Date.now());const _=window.setInterval(()=>u(Date.now()),1e3);return()=>window.clearInterval(_)},[a]),h.jsx("div",{className:"experiment-overview absolute inset-0 overflow-y-auto bg-background [&_h1]:m-0 [&_h1]:text-text [&_h1]:text-xl [&_h1]:leading-tight",children:h.jsxs("div",{className:"experiment-overview-inner w-full max-w-230 my-0 mx-auto pt-6.5 px-7 pb-10 [@media((max-width:_720px))]:pt-5 [@media((max-width:_720px))]:px-4.5 [@media((max-width:_720px))]:pb-8",children:[h.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[h.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[h.jsx("h1",{children:e.title||e.slug}),h.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),h.jsx(Ul,{status:o?Sa(o):"idle"})]}),h.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[o&&h.jsxs(Oe,{...Gr(_=>s(o.id,_)),children:[h.jsx(Bh,{size:15}),x1e()]}),h.jsxs(Oe,{...Gr(i),children:[h.jsx(sb,{size:15}),Vge()]})]}),e.description&&h.jsxs("section",{className:"experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm [&_h2]:font-semibold overview-description [&_.md]:text-text [&_.md]:leading-[1.65]",children:[h.jsx("h2",{children:i1e()}),h.jsx(Oo,{text:e.description})]}),h.jsxs("section",{className:zw,children:[h.jsx("h2",{children:o?qge():I1e()}),o&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap gap-y-2.5 gap-x-4.5 text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs",children:[h.jsx(Ul,{status:Sa(o)}),h.jsx(k6,{backend:o.backend}),h.jsxs("span",{title:M1e(),children:[h.jsx(mht,{size:13}),_A(o.createdAt)]}),h.jsxs("span",{title:c1e(),children:[h.jsx(Tht,{size:13}),pA(o,l)]}),o.commitSha&&h.jsxs("span",{title:Xge(),children:[h.jsx(r_t,{size:14}),h.jsx("code",{children:o.commitSha.slice(0,7)})]}),o.exitCode!==null&&o.exitCode!==void 0&&o.exitCode!==0&&h.jsxs("span",{children:[h1e()," ",o.exitCode]})]}),o.command&&h.jsxs("code",{className:hA,children:["$ ",o.command]}),o.resultMarkdown&&h.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${o.status==="failed"?"failed":""}`,children:h.jsx(Oo,{text:o.resultMarkdown})})]})]}),h.jsxs("section",{className:zw,children:[h.jsx("h2",{children:"Git"}),h.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs experiment-overview-git-meta gap-y-[9px] gap-x-3.5 [&_.files-pill]:py-[5px] [&_.files-pill]:px-2 [&_.files-pill]:rounded-sm [&_.files-pill_code]:text-xs",children:[h.jsx(bCt,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&h.jsxs("span",{children:[g1e()," ",h.jsx("code",{children:n.slug})]}),h.jsxs("span",{title:_A(e.createdAt),children:[t1e()," ",Lo(e.createdAt)]})]}),e.runCommand!==(o==null?void 0:o.command)&&h.jsxs("code",{className:hA,children:["$ ",e.runCommand]})]}),r.length>0&&h.jsxs("section",{className:zw,children:[h.jsx("h2",{children:T1e()}),h.jsx("div",{className:"experiment-run-history border-t border-t-border-variant [&_button]:w-full [&_button]:grid [&_button]:grid-cols-[minmax(72px,_0.7fr)_minmax(100px,_1fr)_minmax(70px,_0.7fr)_60px_16px] [&_button]:items-center [&_button]:gap-3.5 [&_button]:py-[11px] [&_button]:px-0.5 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button]:text-sm [&_button:hover]:bg-surface [@media((max-width:_720px))]:[&_button]:grid-cols-[65px_1fr_60px_16px] [@media((max-width:_720px))]:[&_button_>_:nth-child(3)]:hidden",children:r.map((_,f)=>h.jsxs("button",{...Gr(p=>s(_.id,p)),children:[h.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[C1e()," ",r.length-f]}),h.jsx(Ul,{status:Sa(_)}),h.jsx("span",{children:Lo(_.createdAt)}),h.jsx("span",{children:pA(_,l)}),h.jsx(Bh,{size:13})]},_.id))})]})]})})}function mA(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r{const t=n.current;if(!t)return;const{terminal:r,dispose:s}=o6(t,!0);let i=!1,o=0,a=!1,l=!1;async function u(){if(a){l=!0;return}a=!0;try{for(;;){const f=await Jot(e,o);if(i)return;if(f.dataBase64&&r.write(mA(f.dataBase64)),o=f.nextOffset,f.eof)break}}catch{}finally{a=!1,l&&!i&&(l=!1,u())}}const _=but(e,f=>{if(i)return;const p=mA(f.dataBase64);!a&&f.offset===o?(r.write(p),o+=p.length):f.offset+p.length>o&&u()});return u(),()=>{i=!0,_(),s()}},[e]),h.jsx("div",{ref:n,className:"h-full w-full"})}function wCt({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:o,onOpenView:a,onOpenCode:l}){const u=r.filter(_=>_.experimentId===e.id).sort((_,f)=>f.createdAt-_.createdAt);return t==="overview"?h.jsx(yCt,{experiment:e,parentExperiment:o,project:n,runs:u,onOpenLogs:(_,f)=>a("terminal",_,f),onOpenCode:_=>l("files",_)}):h.jsx(SCt,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function SCt({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=M.useState(null),[o,a]=M.useState(null),[l,u]=M.useState(!1),_=M.useRef(null),f=t?n.find(b=>b.id===t)??null:n[0]??null,p=(f==null?void 0:f.status)==="running"||(f==null?void 0:f.status)==="starting",m=!!(f&&p&&(f.cancelRequested||o===f.id)),x=b=>{const v=n.findIndex(y=>y.id===b);return v===-1?n.length:n.length-v};M.useEffect(()=>{if(!l)return;const b=v=>{var y;(y=_.current)!=null&&y.contains(v.target)||u(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[l]);async function S(){if(f){i(null),a(f.id);try{await aL(f.id)}catch(b){a(null),i(b instanceof Error?b.message:String(b))}}}return h.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[h.jsxs("div",{className:"term-bar flex items-center gap-2 h-10 py-0 px-2.5 border-b border-b-border shrink-0 [&_.error]:text-sm [&_.error]:text-accent-red [&_.btn]:inline-flex [&_.btn]:items-center [&_.btn]:gap-[5px]",children:[h.jsx("div",{className:"term-title min-w-0 text-sm font-semibold text-text overflow-hidden text-ellipsis whitespace-nowrap",title:e.title||e.slug,children:e.title||e.slug}),h.jsx("span",{className:"flex-1"}),s&&h.jsx("span",{className:"error",role:"alert",children:s}),p&&h.jsxs(Oe,{size:"small",variant:"ghost",disabled:m,onClick:()=>void S(),children:[h.jsx(dO,{size:13}),m?h0e():cD()]}),n.length>0&&f&&h.jsxs("div",{className:"run-history relative shrink-0",ref:_,children:[h.jsxs(Oe,{title:oge(),"aria-expanded":l,onClick:()=>u(b=>!b),children:[h.jsxs("span",{children:[xE()," ",x(f.id)]}),h.jsx(Ul,{status:m?"cancelling":Sa(f)}),h.jsx(Ho,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),l&&h.jsx("div",{className:"history-menu absolute top-[calc(100%_+_6px)] end-0 min-w-57.5 max-h-80 overflow-y-auto bg-background border border-border rounded-lg shadow-menu p-[5px] z-50",children:n.map(b=>h.jsxs(Ur,{className:"justify-start",active:b.id===(f==null?void 0:f.id),onClick:()=>{r(b.id),u(!1)},children:[h.jsxs("span",{className:"font-medium",children:[xE()," ",x(b.id)]}),h.jsx(Ul,{status:Sa(b)}),h.jsx("span",{className:"ms-auto text-xs text-muted",children:Lo(b.createdAt)})]},b.id))})]})]}),h.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:f?h.jsx(xCt,{runId:f.id},f.id):h.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?Ol():ege()})})]})}let Q5=!1;function gA(e){Q5=!0;try{return window.confirm(e)}finally{Q5=!1}}const Y5=e=>e.replace(/\r\n/g,` -`),vA=(e,n,t)=>{const r=Y5(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r -`),conflict:null}},Nl=e=>e.draft!==e.baseline,kCt=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),CCt=e=>e.crlf?e.draft.replace(/\n/g,`\r -`):e.draft;function ECt(e,n,t){return!Nl(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class NCt{constructor(){Os(this,"buffer",null);Os(this,"listeners",new Set);Os(this,"saving",!1);Os(this,"saveError",null);Os(this,"revision",0);Os(this,"saveRevision",0);Os(this,"getSnapshot",()=>this.buffer);Os(this,"getRevision",()=>this.revision);Os(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));Os(this,"set",n=>{this.buffer=n,this.notify()});Os(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});Os(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});Os(this,"setSaveError",n=>{this.saveError=n,this.notify()})}notify(){this.revision++;for(const n of this.listeners)n()}get needsProtection(){return this.saving||this.buffer!==null&&(Nl(this.buffer)||this.buffer.conflict!==null)}}function zCt({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:o,source:a}){var Z,te,P;const l=ht({...q0t(),enabled:r,subscribed:r}),u=((Z=l.data)==null?void 0:Z.engine)??(l.isPending?void 0:null),_=((te=l.data)==null?void 0:te.hint)??null,f=((P=l.data)==null?void 0:P.installCommand)??null,[p,m]=M.useState(!1),[x,S]=M.useState(null),[b,v]=M.useState(null),[y,w]=M.useState(!1),[C,N]=M.useState(null),[E,j]=M.useState(null),[z,R]=M.useState(!1),[O,I]=M.useState(0),F=M.useCallback(L=>{R(L),L&&I($=>$+1)},[]),U=M.useRef(a);U.current=a;const q=M.useRef(!1),Y=M.useRef(null),V=M.useCallback(()=>{if(q.current)return;Y.current=n,q.current=!0,m(!0);const L=U.current;j(null),v(null),N(null),clt(e,n,{sessionId:t}).then($=>{var G,ne;const H=$.pdfPath;if($.ok&&H){S(oe=>({path:H,version:((oe==null?void 0:oe.version)??0)+1,source:L})),w($.hadErrors),N($.note),$.hadErrors&&v(((G=$.log)==null?void 0:G.trim())||null),F(!0);return}S(null),w(!1),N($.note),R(!1),v(((ne=$.log)==null?void 0:ne.trim())||O4e())}).catch($=>{S(null),w(!1),N(null),R(!1),j($ instanceof Error?$.message:String($))}).finally(()=>{q.current=!1,m(!1)})},[e,n,t,F]);return M.useEffect(()=>{!r||!s||!o||!u||Y.current!==n&&V()},[r,s,o,u,n,V]),{engine:u,installHint:_,installCommand:f,compiling:p,compiled:x,stale:x!==null&&x.source!==a,log:b,builtWithErrors:y,note:C,error:E,showPdf:z,setShowPdf:F,viewNonce:O,compile:()=>{i==null||i(),V()},dismiss:()=>{j(null),v(null)}}}const TCt=3e4,jCt=3e4,ACt=5*6e4;function RCt({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:o,dirty:a,onPulled:l}){var le,se,Q,ce;const u=M.useMemo(()=>G0t(e,n,{sessionId:t}),[e,n,t]),_=ht({...u,enabled:r,subscribed:r}),f=((le=_.data)==null?void 0:le.hasToken)??!1,p=((se=_.data)==null?void 0:se.hasSession)??!1,m=((Q=_.data)==null?void 0:Q.link)??null,x=!_.isPending,[S,b]=M.useState(null),[v,y]=M.useState(0),[w,C]=M.useState(!1),[N,E]=M.useState(null),[j,z]=M.useState(null),[R,O]=M.useState(!1),I=M.useCallback(ee=>{Mn(u.queryKey)&&Je.setQueryData(u.queryKey,ue=>ue&&{...ue,hasSession:ee})},[u]),F=M.useCallback(ee=>{Mn(u.queryKey)&&Je.setQueryData(u.queryKey,ee)},[u]);M.useEffect(()=>{E(null),y(0),L.current=!1,z(null),O(!1),V.current=!1},[r,e,n,t]),M.useEffect(()=>{O(!1)},[o]);const U=M.useRef(!1),q=M.useRef(l);q.current=l;const Y=M.useRef(a);Y.current=a;const V=M.useRef(!1),Z=M.useCallback(ee=>!f||!m||U.current||Y.current?!1:(U.current=!0,C(!0),z(null),blt(e,n,{sessionId:t,resolve:ee}).then(ue=>{V.current=!1,E(ue),ue.pulled.includes(n)&&(Y.current?O(!0):q.current(ue.pulled))}).catch(ue=>{V.current=!0,E(null),z(ue instanceof Error?ue.message:String(ue))}).finally(()=>{U.current=!1,C(!1)}),!0),[e,n,t,f,m]),te=M.useRef(null),P=(S==null?void 0:S.state)==="live";M.useEffect(()=>{if(!r||!s||!x||!f||!m||a||P)return;const ee=`${n}:${m.projectId}:${o}`;te.current!==ee&&Z()&&(te.current=ee)},[r,s,x,f,m,n,o,a,w,Z,P]);const L=M.useRef(!1);!w&&N&&N.conflicts.length===0&&!j&&(L.current=!0);const $=r&&x&&!!m&&f&&p&&L.current,H=M.useRef(null),G=M.useRef(Promise.resolve()),ne=M.useRef(!1);ne.current=(S==null?void 0:S.state)==="stopped"&&S.error!=null;const oe=M.useRef(!1);return M.useEffect(()=>{if(!$)return;let ee=!1;const ue=()=>{const ye=oe.current;oe.current=!1,!(!ye&&ne.current)&&(G.current=G.current.then(()=>{if(!ee)return _lt(e,n,{sessionId:t,retry:ye}).then(Ae=>{var Ve;ee||((H.current===null||((Ve=Ae.status)==null?void 0:Ve.state)==="stopped")&&b(Ae.status),H.current=Ae.key)}).catch(Ae=>{ee||b({state:"stopped",error:Ae instanceof Error?Ae.message:String(Ae),needsSession:!1,note:null})})}))};ue();const de=setInterval(ue,jCt);return()=>{ee=!0,clearInterval(de),H.current=null,b(null),G.current=G.current.then(()=>plt(e,n,{sessionId:t})).catch(()=>{})}},[$,v,e,n,t]),M.useEffect(()=>Sut(ee=>{if(ee.key===H.current){if(ee.type==="live"){b(ee.status);return}ee.paths.includes(n)&&(Y.current?O(!0):q.current(ee.paths))}}),[n]),M.useEffect(()=>{if(!r||!s||!x||!f||!m||a||P)return;const ee=setInterval(()=>{U.current||V.current||Je.fetchQuery({...W0t(e,n,{sessionId:t}),staleTime:0}).then(ue=>{ue.remoteChanged&&Z()}).catch(ue=>{V.current=!0,z(ue instanceof Error?ue.message:String(ue))})},TCt);return()=>clearInterval(ee)},[r,s,x,f,m,a,e,n,t,Z,P]),M.useEffect(()=>{if(!r||!s||!x||!f||!m||!P)return;const ee=setInterval(Z,ACt);return()=>clearInterval(ee)},[r,s,x,f,m,P,Z]),{hasToken:f,hasSession:p,live:S,retryLive:()=>{oe.current=!0,y(ee=>ee+1)},link:m,loaded:x,syncing:w,last:N,error:j??((ce=_.error)==null?void 0:ce.message)??null,blocked:a,staleOnDisk:R,reloaded:()=>O(!1),uploadUrl:xlt(e,n,{sessionId:t}),saveToken:async ee=>{const ue=await oL(ee);te.current=null,V.current=!1,z(null),Mn(u.queryKey)&&Je.setQueryData(u.queryKey,de=>de&&{...de,hasToken:ue.hasToken})},saveSession:async ee=>{const ue=await lL(ee,{host:m==null?void 0:m.host});I(ue.hasSession),oe.current=!0,y(de=>de+1)},importSession:async()=>{const ee=await hlt({host:m==null?void 0:m.host});return I(ee.hasSession),oe.current=!0,y(ue=>ue+1),ee.source},linkProject:async ee=>{E(null),b(null),L.current=!1,te.current=null,F(await glt(e,n,{project:ee,sessionId:t})),i==null||i()},unlink:async()=>{F(await vlt(e,n,{sessionId:t})),te.current=null,V.current=!1,E(null),z(null)},sync:ee=>{V.current=!1,Z(ee)&&(te.current=`${n}:${m==null?void 0:m.projectId}:${o}`,i==null||i())}}}function uF(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function bA(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),i=r===-1?"":n.slice(r),o=s.indexOf("?"),a=o===-1?s:s.slice(0,o),l=o===-1?"":s.slice(o+1);let u;try{u=decodeURI(a)}catch{return null}if(!u||u.includes("\0"))return null;const _=u.startsWith("/"),f=_?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(f.length===0)return null;f.pop();continue}f.push(p)}return f.length===0?null:{path:`${t&&(_||e.startsWith("/"))?"/":""}${f.join("/")}`,query:l,hash:i}}function MCt(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}const yA=[{selector:"img[src]",attribute:"src",typePrefixes:["image/"]},{selector:"source[src]",attribute:"src",typePrefixes:["image/","audio/","video/"]},{selector:"video[poster]",attribute:"poster",typePrefixes:["image/"]},{selector:"video[src]",attribute:"src",typePrefixes:["video/"]},{selector:"audio[src]",attribute:"src",typePrefixes:["audio/"]},{selector:'link[rel~="stylesheet"][href]',attribute:"href",typePrefixes:["text/css"]},{selector:"script[src]",attribute:"src",typePrefixes:["text/javascript"]}],DCt=4e6,LCt=200,xA=16e6,OCt=e=>new Promise(n=>{const t=new FileReader;t.onload=()=>n(typeof t.result=="string"?t.result:null),t.onerror=()=>n(null),t.readAsDataURL(e)}),wA=e=>e.startsWith("//")?`https:${e}`:e;async function ICt(e,n){var s;let t=DCt;const r=new Map;for(const{element:i,attribute:o,url:a,typePrefixes:l}of e){if(r.has(a)){const x=r.get(a);x&&i.setAttribute(o,x);continue}if(n.aborted)return;if(r.size>=LCt)continue;r.set(a,null);const u=await fetch(a,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const _=u.headers.get("content-type")??"",f=Number(u.headers.get("content-length"));if(!l.some(x=>_.startsWith(x))||!(Number.isFinite(f)&&f>0&&f<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await OCt(p);!p||!m||(t-=p.size,r.set(a,m),i.setAttribute(o,m))}}async function BCt(e,n,t){var o;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const a of r.querySelectorAll(yA.map(l=>l.selector).join(", ")))for(const{selector:l,attribute:u,typePrefixes:_}of yA){if(!a.matches(l))continue;const f=a.getAttribute(u);if(!f)continue;const p=n(f);p&&(p===f?a.setAttribute(u,wA(f)):s.push({element:a,attribute:u,url:p,typePrefixes:_}))}await ICt(s,t);for(const a of r.querySelectorAll("a[href]")){const l=a.getAttribute("href");!l||!uF(l)||(a.setAttribute("href",wA(l)),a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"))}const i=((o=r.querySelector("base[href]"))==null?void 0:o.getAttribute("href"))??"";if(!/^https?:\/\//i.test(i)){const a=r.createElement("base");a.setAttribute("href","about:srcdoc"),r.head.prepend(a)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function $Ct(e,n,t,r){var a;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${xA-1}`}}).catch(()=>null),i=s!=null&&s.ok?await s.text().catch(()=>null):null;if(i===null)return{text:e,partial:!0};const o=Number((a=s==null?void 0:s.headers.get("content-range"))==null?void 0:a.split("/").pop());return{text:i,partial:Number.isFinite(o)&&o>xA}}function PCt({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[i,o]=M.useState(null);return M.useEffect(()=>{let a=!1;const l=new AbortController;return o(null),$Ct(e,n,t,l.signal).then(async({text:u,partial:_})=>({source:await BCt(u,s,l.signal),partial:_})).then(u=>{a||o(u)}),()=>{a=!0,l.abort()}},[e,n,t,s]),i===null?h.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[h.jsx(Ot,{})," ",dD()]}):h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i.partial&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:gye()}),h.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:xye({name:ze(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function FCt({overleaf:e}){var f;const n=M.useRef(null),{open:t,setOpen:r,ref:s}=so(n),i=M.useId(),[o,a]=M.useState({top:0,left:0,maxHeight:0}),l=((f=e.last)==null?void 0:f.conflicts.length)??0,u=e.hasToken&&!!e.error,_=u?v4():l?R9e():!e.hasToken||!e.link?JNe():e.syncing?SD():e.blocked?wD():bD();return M.useEffect(()=>{l&&r(!0)},[l,r]),M.useEffect(()=>{u&&ir(v4(),"error",{id:i,duration:5e3})},[u,e.error,i]),M.useLayoutEffect(()=>{if(!t||!n.current||!s.current)return;const p=n.current.getBoundingClientRect(),m=Math.min(384,window.innerWidth-16),x=Math.min(p.bottom+6,window.innerHeight-80);a({top:x,left:Math.max(8,Math.min(p.right-m,window.innerWidth-m-8)),maxHeight:window.innerHeight-x-8}),(s.current.querySelector("input")??s.current).focus();const S=()=>r(!1),b=v=>{var y;v.target instanceof Node&&!((y=s.current)!=null&&y.contains(v.target))&&S()};return window.addEventListener("resize",S),window.addEventListener("scroll",b,!0),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",b,!0)}},[t,s,r]),h.jsxs(h.Fragment,{children:[h.jsx(tn,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":_,"data-tip-align":"end","aria-label":oQ({status:_}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?h.jsx(Ot,{}):h.jsx(Mht,{size:13,className:u||l?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&Fo.createPortal(h.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":HD(),tabIndex:-1,className:"fixed z-100 w-96 max-w-[calc(100vw-1rem)] overflow-auto rounded-lg border border-border bg-background p-4 text-text shadow-popover",style:o,onBlur:p=>{var m;p.relatedTarget instanceof Node&&!p.currentTarget.contains(p.relatedTarget)&&!((m=n.current)!=null&&m.contains(p.relatedTarget))&&r(!1)},children:[h.jsx("div",{className:"absolute end-3 top-3",children:h.jsx(tn,{size:"small","aria-label":Jbe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:h.jsx(es,{size:13})})}),h.jsx(WCt,{overleaf:e})]}),document.body)]})}const e1=e=>Ro(new Intl.ListFormat(T()).format(e.map(ze)));function HCt(e){if(e.error)return eEe();if(e.syncing)return SD();if(e.blocked)return wD();const n=e.last;return n?n.pulled.length&&n.pushed.length?jNe({pulled:e1(n.pulled),pushed:e1(n.pushed)}):n.pulled.length?ENe({paths:e1(n.pulled)}):n.pushed.length?DNe({paths:e1(n.pushed)}):n.conflicts.length?AEe():bD():vNe()}function qCt({href:e}){return h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:xD()})}function UCt(e){return e.state==="live"?dEe():e.state==="connecting"?lEe():e.error??yEe()}function SA({overleaf:e,replacing:n}){const[t,r]=M.useState(""),[s,i]=M.useState(!1),[o,a]=M.useState(!1),[l,u]=M.useState(null),_=p=>{s||(i(!0),u(null),p().then(()=>a(!1)).catch(m=>{u(m instanceof Error?m.message:String(m)),a(!0)}).finally(()=>i(!1)))},f=o?aze():n?BNe():q9e();return h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsx("p",{className:"text-sm text-subtext",children:f}),o&&h.jsx(zs,{className:"basis-full min-w-0","aria-label":g4(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:g4(),autoComplete:"off"}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&h.jsx(Ot,{}),o?h.jsx(Oe,{type:"button",disabled:s||!t.trim(),onClick:()=>_(()=>e.saveSession(t.trim())),children:s?Yi():z9e()}):h.jsx(Oe,{type:"button",disabled:s,onClick:()=>_(e.importSession),children:V9e()}),h.jsx(Oe,{variant:"ghost",type:"button",disabled:s,onClick:()=>a(!o),children:o?yD():wNe()})]}),l&&h.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:l})]})}function GCt({overleaf:e}){if(!e.hasSession)return h.jsx(SA,{overleaf:e});const n=e.live;if(!n)return h.jsx("p",{className:"text-sm text-subtext",children:kEe()});const t=n.state==="stopped"&&n.needsSession,r=n.state==="live"?"bg-accent-green":n.state==="connecting"?"bg-accent-amber":"bg-accent-red";return h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsxs("div",{role:n.error?"alert":"status",className:`flex items-center gap-2 text-sm ${n.error?"text-accent-red":"text-subtext"}`,children:[h.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${r}`}),h.jsx("span",{className:"min-w-0 break-words",children:UCt(n)})]}),n.note&&h.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&h.jsx("div",{children:h.jsx(Oe,{onClick:e.retryLive,children:mEe()})}),t&&h.jsx(SA,{overleaf:e,replacing:!0})]})}function WCt({overleaf:e}){var p,m,x;const[n,t]=M.useState(""),[r,s]=M.useState(!1),[i,o]=M.useState(null),[a,l]=M.useState(!1),u=()=>{t(""),o(null),l(!0)},_=!e.hasToken||a;async function f(S){S.preventDefault();const b=n.trim();if(!(r||!b)){s(!0),o(null);try{_?(await e.saveToken(b),l(!1)):await e.linkProject(b),t("")}catch(v){o(v instanceof Error?v.message:String(v))}finally{s(!1)}}}if(e.link&&!_){const S=((p=e.last)==null?void 0:p.conflicts)??[];return h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsxs("div",{className:"space-y-1.5 pe-8",role:e.error?"alert":"status",children:[h.jsxs("div",{className:`flex items-center gap-2 text-sm font-medium ${e.error?"text-accent-red":"text-text"}`,children:[e.syncing&&h.jsx(Ot,{}),e.error?v4():HCt(e)]}),e.error&&h.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),h.jsx(GCt,{overleaf:e}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx(Oe,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?HNe():((m=e.live)==null?void 0:m.state)==="live"?hze():void 0,onClick:()=>e.sync(),children:e.error?Hi():rNe()}),h.jsxs(Q0,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[YEe()," ",h.jsx(Lf,{size:12})]})]}),S.map(b=>h.jsxs("div",{className:"space-y-2 text-sm",children:[h.jsxs("p",{className:"break-words text-accent-red",children:[h.jsx("code",{className:"font-mono",children:b})," ",HEe()]}),h.jsxs("div",{className:"flex flex-wrap gap-2",children:[h.jsx(Oe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[b]:"keep-local"}),children:WEe()}),h.jsx(Oe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[b]:"take-overleaf"}),children:_Ne()})]})]},b)),((x=e.last)==null?void 0:x.note)&&h.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),i&&h.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i}),h.jsxs("details",{className:"border-t border-border pt-3",children:[h.jsx("summary",{className:"cursor-pointer text-sm font-semibold text-text focus-visible:outline-2 focus-visible:outline-text",children:h.jsx("span",{className:"ms-2",children:V3()})}),h.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[h.jsx(Oe,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:QE()}),h.jsx(Q0,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:xD()}),h.jsx(Oe,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(b=>{o(b instanceof Error?b.message:String(b))}),children:oNe()})]})]})]})}return h.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[h.jsx("div",{className:"pe-8 text-sm text-subtext",children:_?yze():kze()}),h.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[h.jsx(zs,{className:"basis-full min-w-0","aria-label":_?VE():KE(),"aria-invalid":!!i,type:_?"password":"text",value:n,onChange:S=>t(S.target.value),placeholder:_?VE():"https://www.overleaf.com/project/…",autoComplete:"off"}),h.jsx(Oe,{type:"submit",disabled:r||!n.trim(),children:r?_?Yi():Ea():_?QNe():sEe()}),h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:_?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:_?O9e():KE()})]}),(i||e.error)&&h.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i||e.error}),h.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[h.jsx(qCt,{href:e.uploadUrl}),a?h.jsx(Oe,{variant:"ghost",type:"button",onClick:()=>l(!1),children:yD()}):e.hasToken&&h.jsx(Oe,{variant:"ghost",type:"button",onClick:u,children:QE()})]})]})}function VCt({command:e}){const[n,t]=M.useState("idle"),r=M.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const i=r.current;if(i){const o=document.createRange();o.selectNodeContents(i);const a=window.getSelection();a==null||a.removeAllRanges(),a==null||a.addRange(o)}t("select"),setTimeout(()=>t("idle"),4e3)}};return h.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[h.jsx("code",{ref:r,className:"font-mono text-xs text-text bg-panel border border-border-variant rounded-xs py-1 px-2",children:e}),h.jsx(tn,{"data-tip":n==="copied"?V0():n==="select"?Axe():Nbe(),"aria-label":Abe(),onClick:()=>void s(),children:n==="copied"?h.jsx(qi,{size:13}):h.jsx(nb,{size:13})})]})}function KCt({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:o,onOpenFile:a,scrollPosition:l,onScrollPositionChange:u,lineScrollRequest:_,onLineScrollRequestHandled:f,onEdit:p,artifactVersion:m,artifactEntries:x=[],bufferSession:S,remote:b=!1,restored:v=!1,onRestoreActivated:y,showSource:w=!1,onShowSourceChange:C}){var gt,vt;const N=LO(e,n,t??"repo",r,s),E=ht({...N,enabled:!S.saving}),j=E.data??null,z=((gt=E.error)==null?void 0:gt.message)??null,R=qe=>{Wr(N.queryKey,ft=>(typeof qe=="function"?qe(ft??null):qe)??void 0)},[O,I]=M.useState(0),F=t==="artifacts",U=t==="abs",q=ik(n),Y=HP(n),V=V7t(n),Z=q||V,[te,P]=M.useState(!1),L=!v||te,$=()=>{P(!0),y==null||y()};M.useSyncExternalStore(S.subscribe,S.getRevision);const H=S.getSnapshot(),G=S.set,ne=S.saving,oe=S.setSaving,le=S.saveRevision,se=S.saveError,Q=S.setSaveError,ce=M.useRef(null),ee=M.useRef(l),ue=(j==null?void 0:j.file)??null,de=H&&Nl(H)?H.path:(j==null?void 0:j.source)==="checkout"?j.file.path:n,ye=de.split("/").slice(0,-1).join("/"),Ae=(j==null?void 0:j.source)==="artifact",Ve=M.useCallback(qe=>{var ft;return((ft=bA(ye,qe,U))==null?void 0:ft.path)??null},[U,ye]),Ge=M.useCallback(qe=>U?slt(qe):Ae?Oh(e,qe):gN(e,qe,{sessionId:r,ref:s}),[Ae,s,U,e,r]),$e=M.useCallback(qe=>{if(uF(qe))return qe;const ft=bA(ye,qe,U);return ft?MCt(Ge(ft.path),ft):null},[U,ye,Ge]),ut=QP(ue==null?void 0:ue.presentation),pt=(j==null?void 0:j.source)==="artifact"&&!F,Ut=F&&(j==null?void 0:j.source)==="checkout",It=!s&&(j==null?void 0:j.source)==="checkout"&&ue!=null&&!ue.notFound,$t=r!=null&&(j==null?void 0:j.source)==="checkout"&&j.file.root==="clone",tt=It&&ue!=null&&!ue.binary&&!ue.truncated&&!ut&&!$t,mt=tt&&ue.version===void 0,At=H!==null&&Nl(H),ke=!mt&&(tt&&typeof ue.version=="string"||At),De=(H==null?void 0:H.draft)??Y5((ue==null?void 0:ue.content)??""),We=(H==null?void 0:H.baseline)??Y5((ue==null?void 0:ue.content)??""),rt=ke&&H!==null&&Nl(H),bt=async qe=>{const ft=S.getSnapshot();if(!ke||!ft||!Nl(ft))return!0;if(S.saving)return!1;if(ft.conflict&&qe===void 0)return Q(ft.conflict.exists?wE():kE()),!1;const dr=ft.draft,Rt=CCt(ft);oe(!0),Q(null);try{await Je.cancelQueries(N);const Vt=await ilt(e,de,Rt,{sessionId:r,expectedVersion:qe??ft.version});return S.getSnapshot()?(S.saved(dr,Vt.version),R(jn=>jn&&jn.source==="checkout"?{source:"checkout",file:{...jn.file,content:Rt,version:Vt.version}}:jn),!0):!1}catch(Vt){if(Vt instanceof x4){const sr=S.getSnapshot();return!sr||!Nl(sr)||G({...sr,conflict:{currentVersion:Vt.currentVersion,exists:Vt.exists}}),!1}return Q(Vt instanceof Error?Vt.message:String(Vt)),!1}finally{oe(!1)}},Wt=Y&&It&&!$t,Pe=zCt({projectId:e,filePath:de,sessionId:r,enabled:Wt,autoRun:L,onManualAction:$,ready:ue!=null&&!ue.notFound,source:ke?De:(ue==null?void 0:ue.content)??""}),Dt=RCt({projectId:e,filePath:de,sessionId:r,enabled:Wt,autoRun:L,onManualAction:$,savedSource:We,dirty:rt,onPulled:M.useCallback(qe=>{qe.includes(de)&&I(ft=>ft+1)},[de])}),ln=Y&&Pe.showPdf&&Pe.compiled!=null,kn=mt&&At,Jt=(ke||kn)&&!(Z&&!w)&&!ln,Gn=Pe.compiled?`${gN(e,Pe.compiled.path,{sessionId:r})}&v=${Pe.compiled.version}`:null,Gt=Gn?`${Gn}&view=${Pe.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,sn=Pe.compiled?Pe.compiled.path.split("/").pop()??Pe.compiled.path:null,Wn=async()=>{rt&&!await bt()||Y&&Pe.engine&&Pe.compile()},Tn=async()=>{rt&&(L?await Wn():await bt())},[Er,rr]=M.useState(!1),[Or,Nr]=M.useState(null),yt=async()=>{rr(!0),Nr(null);try{await olt(e,de,{sessionId:r})}catch(qe){Nr(qe instanceof Error?qe.message:String(qe))}finally{rr(!1)}},fn=M.useCallback(()=>{S.saving||I(qe=>qe+1)},[S]),wn=()=>{G(null),Q(null),fn()},Xt=YP(Ge(de),!s&&!ne);M.useEffect(()=>{if(!z||s)return;const qe=window.setInterval(()=>{document.visibilityState!=="hidden"&&fn()},2e3);return()=>window.clearInterval(qe)},[z,s,fn]);const ar=`${Ge(de)}&v=${encodeURIComponent(Xt??m??"")}&reload=${O}`;M.useEffect(()=>{var dr,Rt;if(!j||S.saving)return;const qe=j,ft=S.getSnapshot();if(ft&&Nl(ft)){const Vt=qe.source==="checkout"?qe.file:null,sr=Vt!==null&&Vt.path===ft.path&&(!r||Vt.root==="worktree"),jn=ECt(ft,sr&&typeof Vt.version=="string"?Vt.version:null,sr&&!Vt.notFound);jn&&(jn.currentVersion!==((dr=ft.conflict)==null?void 0:dr.currentVersion)||jn.exists!==((Rt=ft.conflict)==null?void 0:Rt.exists))?G({...ft,conflict:jn}):!jn&&ft.conflict&&G({...ft,conflict:null})}(!ft||!Nl(ft))&&qe.source==="checkout"&&!qe.file.notFound&&!qe.file.binary&&!qe.file.truncated&&typeof qe.file.version=="string"&&(G(vA(qe.file.path,qe.file.content,qe.file.version)),Q(null))},[j,S,r,ne,le]);const cn=JSON.stringify(N.queryKey),hn=M.useRef({sourceKey:cn,nonce:O,artifactVersion:m,diskVersion:Xt});M.useEffect(()=>{const qe=hn.current;hn.current={sourceKey:cn,nonce:O,artifactVersion:m,diskVersion:Xt},qe.sourceKey===cn&&(qe.nonce!==O||qe.diskVersion!==null&&qe.diskVersion!==Xt||qe.artifactVersion!=null&&qe.artifactVersion!==m)&&V0t(e,n,t??"repo",r,s)},[cn,O,m,Xt,e,n,t,r,s]),M.useLayoutEffect(()=>{const qe=ce.current,ft=ee.current;!qe||!ue||!ft||(qe.scrollTop=ft.top,qe.scrollLeft=ft.left)},[ue]);const Pn=qe=>{if(qe.source==="absolute")return Pye();if(F)return Rye({root:r?kg():Sg()});if(s)return Oye({branch:ze(s)});if(r&&qe.source==="checkout"&&qe.file.root==="clone")return a2e();const ft=qe.source==="checkout"?qe.file.root:qe.checkoutRoot;return Uye({root:ft==="worktree"?kg():Sg()})};return h.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",children:[h.jsxs("div",{className:"file-view-header flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-text shrink-0",children:[h.jsx(Vh,{name:de}),h.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":ze(de),children:de.split("/").pop()||de}),o&&h.jsxs("span",{className:"file-view-branch inline-flex items-center gap-1 min-w-0 text-xs text-muted border border-border-variant rounded-sm py-px px-1.5 max-w-65 overflow-hidden text-ellipsis whitespace-nowrap shrink-0 [&_svg]:flex-none",title:OV({branch:ze(o)}),children:[h.jsx(ib,{size:11}),o]}),Jt&&(ne||rt||se)&&h.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${se?"text-accent-red":"text-muted"}`,title:se??(ne?Yi():Zxe()),children:ne?h.jsxs(h.Fragment,{children:[h.jsx(Ot,{})," ",Nxe()]}):se?Sxe():hD()}),Y&&Pe.compiled&&h.jsx(tn,{size:"small",active:!Pe.showPdf,"data-tip":Pe.stale&&Pe.showPdf?cxe():Pe.showPdf?Zd():TE(),"data-tip-align":"end","aria-label":Pe.showPdf?Zd():TE(),onClick:()=>Pe.setShowPdf(!Pe.showPdf),children:Pe.showPdf?h.jsx(P4,{size:13}):h.jsx(rb,{size:13,className:Pe.stale?"text-accent-amber":void 0})}),Y&&Gn&&sn&&h.jsx(Zv,{size:"small","data-tip":Pe.stale?aye({name:ze(sn)}):O9({name:ze(sn)}),"data-tip-align":"end","aria-label":O9({name:ze(sn)}),href:Gn,download:sn,children:h.jsx(Pht,{size:13,className:Pe.stale?"text-accent-amber":void 0})}),Wt&&h.jsx(FCt,{overleaf:Dt}),Y&&It&&h.jsx(tn,{size:"small","data-tip":Pe.compiled?zE():SE(),"data-tip-align":"end","aria-label":Pe.compiled?zE():SE(),disabled:Pe.compiling||!Pe.engine,onClick:()=>void Wn(),children:Pe.compiling?h.jsx(Ot,{}):h.jsx(Ght,{size:13})}),Z&&h.jsx(tn,{size:"small",active:w,"data-tip":w?Q1():Zd(),"data-tip-align":"end","aria-label":w?Q1():Zd(),onClick:()=>C==null?void 0:C(!w),children:h.jsx(P4,{size:13})}),It&&!b&&h.jsx(tn,{size:"small","data-tip":Or??NE(),"data-tip-align":"end","aria-label":NE(),disabled:Er,onClick:()=>void yt(),children:Er?h.jsx(Ot,{}):h.jsx(Lf,{size:13})})]}),!z&&Ut&&(j==null?void 0:j.source)==="checkout"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:Kye({root:j.file.root==="worktree"?kg():Sg()})}),mt&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-amber",children:n2e()}),z&&ue!==null&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-red",children:[EE()," ",ze(z)]}),(H==null?void 0:H.conflict)&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[h.jsx("span",{className:"flex-1 min-w-0",role:"status",children:H.conflict.exists?wE():kE()}),((vt=H==null?void 0:H.conflict)==null?void 0:vt.exists)&&H.conflict.currentVersion&&h.jsx(Oe,{disabled:ne,onPointerDown:qe=>qe.preventDefault(),onClick:()=>{var qe;return void bt(((qe=H.conflict)==null?void 0:qe.currentVersion)??void 0)},children:ixe()}),h.jsx(Oe,{disabled:ne,onPointerDown:qe=>qe.preventDefault(),onClick:wn,children:bxe()})]}),(Pe.error||Pe.log)&&h.jsxs("div",{className:"file-view-note shrink-0 max-h-45 overflow-auto border-b border-b-border-variant py-2.5 px-4",children:[h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx("span",{className:`flex-1 min-w-0 text-sm ${Pe.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Pe.error??(Pe.builtWithErrors?Sbe():mbe())}),h.jsx(tn,{"data-tip":Gbe(),"data-tip-align":"end","aria-label":Qbe(),onClick:Pe.dismiss,children:h.jsx(es,{size:13})})]}),Pe.log&&h.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Pe.log})]}),Wt&&Dt.staleOnDisk&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[h.jsx("span",{className:"flex-1 min-w-0",children:txe()}),h.jsx(Oe,{onClick:()=>{Dt.reloaded(),I(qe=>qe+1)},children:Bbe()})]}),Y&&It&&Pe.engine===null&&Pe.installHint&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[Pe.installHint,Pe.installCommand&&h.jsx(VCt,{command:Pe.installCommand})]}),Pe.note&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:Pe.note}),ln&&Pe.stale&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:Fxe()}),h.jsxs("div",{ref:ce,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:qe=>{const ft={top:Math.max(0,qe.currentTarget.scrollTop),left:Math.max(0,qe.currentTarget.scrollLeft)};ee.current=ft,u==null||u(ft)},children:[!Jt&&!z&&!F&&(j==null?void 0:j.source)==="checkout"&&!j.file.notFound&&!s&&r&&j.file.root==="clone"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Gxe()}),!Jt&&!z&&(j==null?void 0:j.source)==="artifact"&&!j.file.notFound&&pt&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:ibe({root:j.checkoutRoot==="worktree"?kg():Sg()})}),z&&ue===null?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[EE()," ",ze(z)]}):ue===null?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:dD()}):Jt?h.jsx(T$,{value:De,onChange:qe=>{const ft=S.getSnapshot()??(ue&&typeof ue.version=="string"?vA(ue.path,ue.content,ue.version):null);ft&&G(kCt(ft,qe)),p==null||p(),se&&Q(null)},onSave:()=>void Tn(),onBlur:()=>{Q5||Tn()},readOnly:kn,path:n,highlightLine:i,scrollRequest:_,onScrollRequestHandled:f,scrollPosition:ee.current,onScrollPositionChange:qe=>{ee.current=qe,u==null||u(qe)}}):ue.notFound?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:j?Pn(j):zye()}):ut?h.jsx(K5,{kind:ut,url:ar,name:n.split("/").pop()??n}):ue.binary?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[cbe()," ",h.jsx("a",{href:ar,download:n.split("/").pop()??n,children:fD()})]}):ln&&Gt&&sn?h.jsx(K5,{kind:"pdf",url:Gt,name:sn,downloadBar:!1},Gt):q&&!w?h.jsx("div",{className:"file-view-md max-w-readable pt-4.5 px-5 pb-8 [&_.md]:text-base [&_.md_h1]:text-2xl [&_.md_h1]:mt-4.5 [&_.md_h1]:mx-0 [&_.md_h1]:mb-2 [&_.md_h2]:text-xl [&_.md_h2]:mt-4 [&_.md_h2]:mx-0 [&_.md_h2]:mb-2 [&_.md_h3]:text-lg",children:Ae?h.jsx(tF,{projectId:e,folder:ye,markdown:ue.content,entries:x}):h.jsx(Oo,{text:ue.content,resolveFilePath:Ve,resolveImageSrc:$e,onOpenFile:a&&((qe,ft,dr,Rt,Vt)=>a(qe,r,s,Vt))})}):V&&!w?h.jsx(PCt,{html:ue.content,truncated:ue.truncated,url:ar,name:de,resolveSrc:$e}):h.jsxs(h.Fragment,{children:[h.jsx(KP,{text:ue.content,path:n,highlightLine:i,scrollRequest:_,onScrollRequestHandled:f}),ue.truncated&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:hye()})]})]})]})}const Tw=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function QCt({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:o,ref:a}=so(),l=M.useRef(null);return M.useEffect(()=>{if(!i)return;const u=_=>{var f;_.key==="Escape"&&((f=l.current)==null||f.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),h.jsxs("div",{className:"rail-brand flex items-center gap-1 h-16 p-2 border-b border-b-border shrink-0 [&_.project-switcher]:relative [&_.project-switcher]:flex-1 [&_.project-switcher]:self-stretch [&_.project-switcher]:min-w-0 [&_.project-back]:shrink-0 [&_.brand]:flex [&_.brand]:items-center [&_.brand]:justify-between [&_.brand]:gap-2 [&_.brand]:w-full [&_.brand]:h-full [&_.brand]:min-w-0 [&_.brand]:font-semibold [&_.brand]:text-base [&_.brand]:text-text [&_.brand]:py-1 [&_.brand]:px-1.5 [&_.brand]:border [&_.brand]:border-transparent [&_.brand]:rounded-sm [&_.brand:hover]:bg-surface [&_.brand:hover]:border-border [&_.brand.open]:bg-surface [&_.brand.open]:border-border [&_.brand_svg]:shrink-0 [&_.brand-project-copy]:flex [&_.brand-project-copy]:flex-col [&_.brand-project-copy]:gap-[3px] [&_.brand-project-copy]:min-w-0 [&_.brand-project-copy]:leading-[1.15] [&_.brand-project-copy]:text-start [&_.brand-project-label]:text-muted [&_.brand-project-label]:text-xs [&_.brand-project-label]:font-medium [&_.brand-project-label]:tracking-[0.04em] [&_.brand-project-label]:uppercase [&_.brand_.brand-project]:min-w-0 [&_.brand_.brand-project]:overflow-hidden [&_.brand_.brand-project]:text-ellipsis [&_.brand_.brand-project]:whitespace-nowrap [&_.brand_.brand-project]:text-xl [&_.project-chevron]:text-muted [&_.project-chevron]:opacity-0 [&_.project-chevron]:transition-transform [&_.project-chevron]:duration-120 [&_.project-chevron]:ease-standard [&_.brand:hover_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:rotate-180 [&_.project-menu]:start-0 [&_.project-menu]:w-52.5 [&_.project-menu]:z-70",children:[h.jsx(tn,{className:"project-back text-text","aria-label":jE(),onClick:n,children:h.jsx(Z0,{size:18})}),h.jsxs("div",{className:"project-switcher",ref:a,children:[h.jsxs("button",{ref:l,className:`brand${i?" open":""}`,onClick:()=>o(u=>!u),"aria-expanded":i,children:[h.jsxs("span",{className:"brand-project-copy",children:[h.jsx("span",{className:"brand-project-label",children:Ewe()}),h.jsx("span",{className:"brand-project",children:e})]}),h.jsx(Ho,{className:"project-chevron",size:14})]}),i&&h.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down project-menu",children:[h.jsx(Ur,{onClick:()=>{o(!1),r()},children:h.jsxs("span",{className:Tw,children:[h.jsx(mO,{size:14}),pwe()]})}),h.jsx(Ur,{onClick:()=>{o(!1),n()},children:h.jsxs("span",{className:Tw,children:[h.jsx(o_t,{size:14}),jE()]})}),h.jsx(Ur,{onClick:()=>{var u;(u=l.current)==null||u.focus(),o(!1),t()},children:h.jsxs("span",{className:Tw,children:[h.jsx(Xht,{size:14}),bwe()]})})]})]}),s&&h.jsx(tn,{"data-tip":AE(),"data-tip-align":"end","aria-label":AE(),onClick:s,children:h.jsx(vO,{size:15})})]})}function YCt({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:i,onCancel:o}){const[a,l]=M.useState(new Set),[u,_]=M.useState(null),f=new Map;for(const x of e){const S=f.get(x.experimentId);S?S.push(x):f.set(x.experimentId,[x])}for(const x of f.values())x.sort((S,b)=>b.createdAt-S.createdAt);const p=[...n].sort((x,S)=>{var y,w,C,N;const b=((w=(y=f.get(x.id))==null?void 0:y[0])==null?void 0:w.createdAt)??x.createdAt;return(((N=(C=f.get(S.id))==null?void 0:C[0])==null?void 0:N.createdAt)??S.createdAt)-b});if(p.length===0)return h.jsx("div",{className:"empty-state absolute inset-0 flex flex-col items-center justify-center gap-2.5 p-6 text-center text-subtext [&_p]:max-w-[46ch] [&_p]:m-0 [&_p]:leading-normal [&_p]:text-balance [&_p.empty-state-title]:text-2xl [&_p.empty-state-title]:font-normal [&_p.empty-state-title]:text-text [&_p.empty-state-hint]:text-lg [&_p.empty-state-hint]:text-subtext experiments-empty-state [&_p]:text-2xl",children:h.jsx("p",{children:t??G1e()})});async function m(x){_(null),l(S=>new Set(S).add(x));try{await o(x)}catch(S){l(b=>{const v=new Set(b);return v.delete(x),v}),_(S instanceof Error?S.message:String(S))}}return h.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[u&&h.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[Ave()," ",u]}),h.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":Sve(),children:p.map(x=>{const S=f.get(x.id)??[],b=S[0]??null,v=S.find(N=>N.status==="running"||N.status==="starting"),y=v??b,w=!!(v&&(v.cancelRequested||a.has(v.id))),C=v?w?"cancelling":Sa(v):b?Sa(b):"idle";return h.jsxs("div",{className:"experiment-table-group grid grid-cols-[minmax(0,_1fr)_auto] [grid-template-areas:'name_meta'_'actions_actions'] gap-x-8 items-center py-4 px-5 gap-y-[7px] border-b border-b-divider-subtle bg-background cursor-pointer [&:hover]:bg-canvas [&:last-child]:border-b-0 [@container((max-width:_560px))]:grid-cols-[minmax(0,_1fr)_auto] [@container((max-width:_560px))]:gap-x-3.5 [@container((max-width:_560px))]:gap-y-[9px] [@container((max-width:_400px))]:grid-cols-[minmax(0,_1fr)] [@container((max-width:_400px))]:[grid-template-areas:'name'_'meta'_'actions']",role:"listitem",onClick:()=>r(x,"preview"),onDoubleClick:()=>r(x,"keepOpen"),onAuxClick:N=>{N.button===1&&(N.preventDefault(),r(x,"keepOpen"))},children:[h.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[h.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...Gr(N=>r(x,N),{stopPropagation:!0}),children:x.title||x.slug}),h.jsxs("span",{className:"experiment-table-subtitle flex items-center min-w-0 gap-1.5 mt-1 overflow-hidden text-subtext text-sm [&_>_svg]:shrink-0 [&_code]:min-w-0 [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:x.branchName,children:[h.jsx(ib,{size:14,"aria-hidden":"true"}),h.jsx("code",{children:x.branchName})]})]}),h.jsxs("div",{className:"experiment-table-meta [grid-area:meta] self-start flex items-center justify-end gap-4.5 whitespace-nowrap [@container((max-width:_560px))]:flex-col [@container((max-width:_560px))]:items-end [@container((max-width:_560px))]:gap-1.5 [@container((max-width:_400px))]:!flex-row [@container((max-width:_400px))]:!items-center [@container((max-width:_400px))]:flex-wrap [@container((max-width:_400px))]:justify-start [@container((max-width:_400px))]:gap-3",children:[h.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:h.jsx(Ul,{status:C})}),h.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:h.jsx("span",{children:S.length===1?J1e():ove({count:nn(S.length)})})}),h.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:h.jsx("span",{children:b?Lo(b.createdAt):Q1e()})})]}),h.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":zV({name:x.title||x.slug}),onClick:N=>N.stopPropagation(),onDoubleClick:N=>N.stopPropagation(),onAuxClick:N=>N.stopPropagation(),children:[h.jsxs(Oe,{size:"small",disabled:!y,title:y?rve():F1e(),...Gr(N=>{y&&s(x.id,y.id,N)},{stopPropagation:!0}),children:[h.jsx(Bh,{size:15}),Nve()]}),h.jsxs(Oe,{size:"small",title:KM({branch:ze(x.branchName)}),...Gr(N=>i(x.id,N),{stopPropagation:!0}),children:[h.jsx(sb,{size:15}),bve()]}),v&&h.jsxs(Oe,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:w,title:w?fve():pve(),onClick:()=>void m(v.id),children:[h.jsx(dO,{size:15}),w?Z0e():cD()]})]})]},x.id)})})]})}function XCt({onClose:e,onCreateProject:n}){const[t,r]=M.useState(!1),[s,i]=M.useState(null),o=M.useRef(null),a=M.useCallback(l=>{t||(r(!0),i(null),l().catch(()=>i(Ast())).finally(()=>r(!1)))},[t]);return M.useEffect(()=>{const l=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),a(e))};return document.addEventListener("keydown",l,!0),()=>document.removeEventListener("keydown",l,!0)},[e,a]),M.useEffect(()=>{const l=o.current;if(!l)return;const u=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...l.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(_()[0]??l).focus();const f=p=>{if(p.key!=="Tab")return;const m=_();if(m.length===0){p.preventDefault(),l.focus();return}const x=m[0],S=m[m.length-1];p.shiftKey&&document.activeElement===x?(p.preventDefault(),S.focus()):!p.shiftKey&&document.activeElement===S&&(p.preventDefault(),x.focus())};return document.addEventListener("keydown",f,!0),()=>{document.removeEventListener("keydown",f,!0),u==null||u.focus()}},[]),Fo.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:h.jsxs("div",{ref:o,className:"relative w-110 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"demo-welcome-title",tabIndex:-1,children:[h.jsx(tn,{className:"absolute end-3.5 top-3.5","aria-label":ost(),onClick:()=>a(e),disabled:t,children:h.jsx(es,{size:16})}),h.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[h.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:h.jsx(S6,{})}),h.jsxs("div",{children:[h.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:pst()}),h.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:$st()})]})]}),h.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[h.jsxs("p",{dir:"auto",children:[Lst()," ",h.jsx("a",{dir:"ltr",href:"https://github.com/karpathy/nanochat",target:"_blank",rel:"noreferrer",className:"font-medium text-primary underline decoration-border-strong underline-offset-3 hover:decoration-primary",children:Nst()}),rst()]}),h.jsx("p",{dir:"auto",children:Sst()})]}),s&&h.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),h.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[h.jsx(Oe,{onClick:()=>a(n),disabled:t,children:fst()}),h.jsx(Oe,{variant:"primary",onClick:()=>a(e),disabled:t,children:t?Yi():bst()})]})]})}),document.body)}function is(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Vb(){for(var e=0,n=arguments.length,t={},r;e=0&&(r=t.slice(s+1),t=t.slice(0,s)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}T1.prototype=Vb.prototype={constructor:T1,on:function(e,n){var t=this._,r=JCt(e+"",t),s,i=-1,o=r.length;if(arguments.length<2){for(;++i0)for(var t=new Array(s),r=0,s,i;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),CA.hasOwnProperty(n)?{space:CA[n],local:e}:e}function t8t(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===X5&&n.documentElement.namespaceURI===X5?n.createElement(e):n.createElementNS(t,e)}}function n8t(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function fF(e){var n=Kb(e);return(n.local?n8t:t8t)(n)}function r8t(){}function ok(e){return e==null?r8t:function(){return this.querySelector(e)}}function s8t(e){typeof e!="function"&&(e=ok(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=w&&(w=y+1);!(N=b[w])&&++w=0;)(o=r[s])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function T8t(e){e||(e=j8t);function n(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var t=this._groups,r=t.length,s=new Array(r),i=0;in?1:e>=n?0:NaN}function A8t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function R8t(){return Array.from(this)}function M8t(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?U8t:typeof n=="function"?W8t:G8t)(e,n,t??"")):Kh(this.node(),e)}function Kh(e,n){return e.style.getPropertyValue(n)||mF(e).getComputedStyle(e,null).getPropertyValue(n)}function K8t(e){return function(){delete this[e]}}function Q8t(e,n){return function(){this[e]=n}}function Y8t(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function X8t(e,n){return arguments.length>1?this.each((n==null?K8t:typeof n=="function"?Y8t:Q8t)(e,n)):this.node()[e]}function gF(e){return e.trim().split(/^|\s+/)}function lk(e){return e.classList||new vF(e)}function vF(e){this._node=e,this._names=gF(e.getAttribute("class")||"")}vF.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function bF(e,n){for(var t=lk(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function C9t(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function Z5(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:o,y:a,dx:l,dy:u,dispatch:_}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:_}})}Z5.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function L9t(e){return!e.ctrlKey&&!e.button}function O9t(){return this.parentNode}function I9t(e,n){return n??{x:e.x,y:e.y}}function B9t(){return navigator.maxTouchPoints||"ontouchstart"in this}function CF(){var e=L9t,n=O9t,t=I9t,r=B9t,s={},i=Vb("start","drag","end"),o=0,a,l,u,_,f=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",b).on("touchmove.drag",v,D9t).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(_||!e.call(this,C,N))){var E=w(this,n.call(this,C,N),C,N,"mouse");E&&($i(C.view).on("mousemove.drag",x,mp).on("mouseup.drag",S,mp),SF(C.view),jw(C),u=!1,a=C.clientX,l=C.clientY,E("start",C))}}function x(C){if(dh(C),!u){var N=C.clientX-a,E=C.clientY-l;u=N*N+E*E>f}s.mouse("drag",C)}function S(C){$i(C.view).on("mousemove.drag mouseup.drag",null),kF(C.view,u),dh(C),s.mouse("end",C)}function b(C,N){if(e.call(this,C,N)){var E=C.changedTouches,j=n.call(this,C,N),z=E.length,R,O;for(R=0;R>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?n1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?n1(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=P9t.exec(e))?new yi(n[1],n[2],n[3],1):(n=F9t.exec(e))?new yi(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=H9t.exec(e))?n1(n[1],n[2],n[3],n[4]):(n=q9t.exec(e))?n1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=U9t.exec(e))?RA(n[1],n[2]/100,n[3]/100,1):(n=G9t.exec(e))?RA(n[1],n[2]/100,n[3]/100,n[4]):EA.hasOwnProperty(e)?TA(EA[e]):e==="transparent"?new yi(NaN,NaN,NaN,0):null}function TA(e){return new yi(e>>16&255,e>>8&255,e&255,1)}function n1(e,n,t,r){return r<=0&&(e=n=t=NaN),new yi(e,n,t,r)}function K9t(e){return e instanceof lm||(e=$f(e)),e?(e=e.rgb(),new yi(e.r,e.g,e.b,e.opacity)):new yi}function J5(e,n,t,r){return arguments.length===1?K9t(e):new yi(e,n,t,r??1)}function yi(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}ck(yi,J5,EF(lm,{brighter(e){return e=e==null?zv:Math.pow(zv,e),new yi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?gp:Math.pow(gp,e),new yi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yi(Af(this.r),Af(this.g),Af(this.b),Tv(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:jA,formatHex:jA,formatHex8:Q9t,formatRgb:AA,toString:AA}));function jA(){return`#${df(this.r)}${df(this.g)}${df(this.b)}`}function Q9t(){return`#${df(this.r)}${df(this.g)}${df(this.b)}${df((isNaN(this.opacity)?1:this.opacity)*255)}`}function AA(){const e=Tv(this.opacity);return`${e===1?"rgb(":"rgba("}${Af(this.r)}, ${Af(this.g)}, ${Af(this.b)}${e===1?")":`, ${e})`}`}function Tv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Af(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function df(e){return e=Af(e),(e<16?"0":"")+e.toString(16)}function RA(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Ya(e,n,t,r)}function NF(e){if(e instanceof Ya)return new Ya(e.h,e.s,e.l,e.opacity);if(e instanceof lm||(e=$f(e)),!e)return new Ya;if(e instanceof Ya)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),i=Math.max(n,t,r),o=NaN,a=i-s,l=(i+s)/2;return a?(n===i?o=(t-r)/a+(t0&&l<1?0:o,new Ya(o,a,l,e.opacity)}function Y9t(e,n,t,r){return arguments.length===1?NF(e):new Ya(e,n,t,r??1)}function Ya(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}ck(Ya,Y9t,EF(lm,{brighter(e){return e=e==null?zv:Math.pow(zv,e),new Ya(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?gp:Math.pow(gp,e),new Ya(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*n,s=2*t-r;return new yi(Aw(e>=240?e-240:e+120,s,r),Aw(e,s,r),Aw(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Ya(MA(this.h),r1(this.s),r1(this.l),Tv(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Tv(this.opacity);return`${e===1?"hsl(":"hsla("}${MA(this.h)}, ${r1(this.s)*100}%, ${r1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function MA(e){return e=(e||0)%360,e<0?e+360:e}function r1(e){return Math.max(0,Math.min(1,e||0))}function Aw(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const uk=e=>()=>e;function X9t(e,n){return function(t){return e+t*n}}function Z9t(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(r){return Math.pow(e+r*n,t)}}function J9t(e){return(e=+e)==1?zF:function(n,t){return t-n?Z9t(n,t,e):uk(isNaN(n)?t:n)}}function zF(e,n){var t=n-e;return t?X9t(e,t):uk(isNaN(e)?n:e)}const jv=(function e(n){var t=J9t(n);function r(s,i){var o=t((s=J5(s)).r,(i=J5(i)).r),a=t(s.g,i.g),l=t(s.b,i.b),u=zF(s.opacity,i.opacity);return function(_){return s.r=o(_),s.g=a(_),s.b=l(_),s.opacity=u(_),s+""}}return r.gamma=e,r})(1);function eEt(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(i){for(s=0;st&&(i=n.slice(t,i),a[o]?a[o]+=i:a[++o]=i),(r=r[0])===(s=s[0])?a[o]?a[o]+=s:a[++o]=s:(a[++o]=null,l.push({i:o,x:zo(r,s)})),t=Rw.lastIndex;return t180?_+=360:_-u>180&&(u+=360),p.push({i:f.push(s(f)+"rotate(",null,r)-2,x:zo(u,_)})):_&&f.push(s(f)+"rotate("+_+r)}function a(u,_,f,p){u!==_?p.push({i:f.push(s(f)+"skewX(",null,r)-2,x:zo(u,_)}):_&&f.push(s(f)+"skewX("+_+r)}function l(u,_,f,p,m,x){if(u!==f||_!==p){var S=m.push(s(m)+"scale(",null,",",null,")");x.push({i:S-4,x:zo(u,f)},{i:S-2,x:zo(_,p)})}else(f!==1||p!==1)&&m.push(s(m)+"scale("+f+","+p+")")}return function(u,_){var f=[],p=[];return u=e(u),_=e(_),i(u.translateX,u.translateY,_.translateX,_.translateY,f,p),o(u.rotate,_.rotate,f,p),a(u.skewX,_.skewX,f,p),l(u.scaleX,u.scaleY,_.scaleX,_.scaleY,f,p),u=_=null,function(m){for(var x=-1,S=p.length,b;++x=0&&e._call.call(void 0,n),e=e._next;--Qh}function OA(){Pf=(Rv=bp.now())+Qb,Qh=w0=0;try{pEt()}finally{Qh=0,gEt(),Pf=0}}function mEt(){var e=bp.now(),n=e-Rv;n>RF&&(Qb-=n,Rv=e)}function gEt(){for(var e,n=Av,t,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Av=t);S0=e,n3(r)}function n3(e){if(!Qh){w0&&(w0=clearTimeout(w0));var n=e-Pf;n>24?(e<1/0&&(w0=setTimeout(OA,e-bp.now()-Qb)),_0&&(_0=clearInterval(_0))):(_0||(Rv=bp.now(),_0=setInterval(mEt,RF)),Qh=1,MF(OA))}}function IA(e,n,t){var r=new Mv;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var vEt=Vb("start","end","cancel","interrupt"),bEt=[],LF=0,BA=1,r3=2,A1=3,$A=4,s3=5,R1=6;function Yb(e,n,t,r,s,i){var o=e.__transition;if(!o)e.__transition={};else if(t in o)return;yEt(e,t,{name:n,index:r,group:s,on:vEt,tween:bEt,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:LF})}function dk(e,n){var t=io(e,n);if(t.state>LF)throw new Error("too late; already scheduled");return t}function Qo(e,n){var t=io(e,n);if(t.state>A1)throw new Error("too late; already running");return t}function io(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function yEt(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=DF(i,0,t.time);function i(u){t.state=BA,t.timer.restart(o,t.delay,t.time),t.delay<=u&&o(u-t.delay)}function o(u){var _,f,p,m;if(t.state!==BA)return l();for(_ in r)if(m=r[_],m.name===t.name){if(m.state===A1)return IA(o);m.state===$A?(m.state=R1,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[_]):+_r3&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function YEt(e,n,t){var r,s,i=QEt(n)?dk:Qo;return function(){var o=i(this,e),a=o.on;a!==r&&(s=(r=a).copy()).on(n,t),o.on=s}}function XEt(e,n){var t=this._id;return arguments.length<2?io(this.node(),t).on.on(e):this.each(YEt(t,e,n))}function ZEt(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function JEt(){return this.on("end.remove",ZEt(this._id))}function eNt(e){var n=this._name,t=this._id;typeof e!="function"&&(e=ok(e));for(var r=this._groups,s=r.length,i=new Array(s),o=0;o()=>e;function CNt(e,{sourceEvent:n,target:t,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function Pl(e,n,t){this.k=e,this.x=n,this.y=t}Pl.prototype={constructor:Pl,scale:function(e){return e===1?this:new Pl(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Pl(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Xb=new Pl(1,0,0);$F.prototype=Pl.prototype;function $F(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Xb;return e.__zoom}function Mw(e){e.stopImmediatePropagation()}function p0(e){e.preventDefault(),e.stopImmediatePropagation()}function ENt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function NNt(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function PA(){return this.__zoom||Xb}function zNt(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function TNt(){return navigator.maxTouchPoints||"ontouchstart"in this}function jNt(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],i=e.invertY(n[0][1])-t[0][1],o=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o))}function PF(){var e=ENt,n=NNt,t=jNt,r=zNt,s=TNt,i=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,l=j1,u=Vb("start","zoom","end"),_,f,p,m=500,x=150,S=0,b=10;function v(q){q.property("__zoom",PA).on("wheel.zoom",z,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",O).filter(s).on("touchstart.zoom",I).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(q,Y,V,Z){var te=q.selection?q.selection():q;te.property("__zoom",PA),q!==te?N(q,Y,V,Z):te.interrupt().each(function(){E(this,arguments).event(Z).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},v.scaleBy=function(q,Y,V,Z){v.scaleTo(q,function(){var te=this.__zoom.k,P=typeof Y=="function"?Y.apply(this,arguments):Y;return te*P},V,Z)},v.scaleTo=function(q,Y,V,Z){v.transform(q,function(){var te=n.apply(this,arguments),P=this.__zoom,L=V==null?C(te):typeof V=="function"?V.apply(this,arguments):V,$=P.invert(L),H=typeof Y=="function"?Y.apply(this,arguments):Y;return t(w(y(P,H),L,$),te,o)},V,Z)},v.translateBy=function(q,Y,V,Z){v.transform(q,function(){return t(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof V=="function"?V.apply(this,arguments):V),n.apply(this,arguments),o)},null,Z)},v.translateTo=function(q,Y,V,Z,te){v.transform(q,function(){var P=n.apply(this,arguments),L=this.__zoom,$=Z==null?C(P):typeof Z=="function"?Z.apply(this,arguments):Z;return t(Xb.translate($[0],$[1]).scale(L.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof V=="function"?-V.apply(this,arguments):-V),P,o)},Z,te)};function y(q,Y){return Y=Math.max(i[0],Math.min(i[1],Y)),Y===q.k?q:new Pl(Y,q.x,q.y)}function w(q,Y,V){var Z=Y[0]-V[0]*q.k,te=Y[1]-V[1]*q.k;return Z===q.x&&te===q.y?q:new Pl(q.k,Z,te)}function C(q){return[(+q[0][0]+ +q[1][0])/2,(+q[0][1]+ +q[1][1])/2]}function N(q,Y,V,Z){q.on("start.zoom",function(){E(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(Z).end()}).tween("zoom",function(){var te=this,P=arguments,L=E(te,P).event(Z),$=n.apply(te,P),H=V==null?C($):typeof V=="function"?V.apply(te,P):V,G=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),ne=te.__zoom,oe=typeof Y=="function"?Y.apply(te,P):Y,le=l(ne.invert(H).concat(G/ne.k),oe.invert(H).concat(G/oe.k));return function(se){if(se===1)se=oe;else{var Q=le(se),ce=G/Q[2];se=new Pl(ce,H[0]-Q[0]*ce,H[1]-Q[1]*ce)}L.zoom(null,se)}})}function E(q,Y,V){return!V&&q.__zooming||new j(q,Y)}function j(q,Y){this.that=q,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=n.apply(q,Y),this.taps=0}j.prototype={event:function(q){return q&&(this.sourceEvent=q),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(q,Y){return this.mouse&&q!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&q!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&q!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(q){var Y=$i(this.that).datum();u.call(q,this.that,new CNt(q,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:u}),Y)}};function z(q,...Y){if(!e.apply(this,arguments))return;var V=E(this,Y).event(q),Z=this.__zoom,te=Math.max(i[0],Math.min(i[1],Z.k*Math.pow(2,r.apply(this,arguments)))),P=Ua(q);if(V.wheel)(V.mouse[0][0]!==P[0]||V.mouse[0][1]!==P[1])&&(V.mouse[1]=Z.invert(V.mouse[0]=P)),clearTimeout(V.wheel);else{if(Z.k===te)return;V.mouse=[P,Z.invert(P)],M1(this),V.start()}p0(q),V.wheel=setTimeout(L,x),V.zoom("mouse",t(w(y(Z,te),V.mouse[0],V.mouse[1]),V.extent,o));function L(){V.wheel=null,V.end()}}function R(q,...Y){if(p||!e.apply(this,arguments))return;var V=q.currentTarget,Z=E(this,Y,!0).event(q),te=$i(q.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",G,!0),P=Ua(q,V),L=q.clientX,$=q.clientY;SF(q.view),Mw(q),Z.mouse=[P,this.__zoom.invert(P)],M1(this),Z.start();function H(ne){if(p0(ne),!Z.moved){var oe=ne.clientX-L,le=ne.clientY-$;Z.moved=oe*oe+le*le>S}Z.event(ne).zoom("mouse",t(w(Z.that.__zoom,Z.mouse[0]=Ua(ne,V),Z.mouse[1]),Z.extent,o))}function G(ne){te.on("mousemove.zoom mouseup.zoom",null),kF(ne.view,Z.moved),p0(ne),Z.event(ne).end()}}function O(q,...Y){if(e.apply(this,arguments)){var V=this.__zoom,Z=Ua(q.changedTouches?q.changedTouches[0]:q,this),te=V.invert(Z),P=V.k*(q.shiftKey?.5:2),L=t(w(y(V,P),Z,te),n.apply(this,Y),o);p0(q),a>0?$i(this).transition().duration(a).call(N,L,Z,q):$i(this).call(v.transform,L,Z,q)}}function I(q,...Y){if(e.apply(this,arguments)){var V=q.touches,Z=V.length,te=E(this,Y,q.changedTouches.length===Z).event(q),P,L,$,H;for(Mw(q),L=0;L`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:n,sourceHandle:t,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?t:r}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},yp=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],FF=["Enter"," ","Escape"],HF={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:n,y:t})=>`Moved selected node ${e}. New position, x: ${n}, y: ${t}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Yh;(function(e){e.Strict="strict",e.Loose="loose"})(Yh||(Yh={}));var Rf;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Rf||(Rf={}));var xp;(function(e){e.Partial="partial",e.Full="full"})(xp||(xp={}));const qF={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Wc;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Wc||(Wc={}));var Dv;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Dv||(Dv={}));var kt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(kt||(kt={}));const FA={[kt.Left]:kt.Right,[kt.Right]:kt.Left,[kt.Top]:kt.Bottom,[kt.Bottom]:kt.Top};function UF(e){return e===null?null:e?"valid":"invalid"}const GF=e=>"id"in e&&"source"in e&&"target"in e,ANt=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),_k=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),cm=(e,n=[0,0])=>{const{width:t,height:r}=ec(e),s=e.origin??n,i=t*s[0],o=r*s[1];return{x:e.position.x-i,y:e.position.y-o}},RNt=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const t=e.reduce((r,s)=>{const i=typeof s=="string";let o=!n.nodeLookup&&!i?s:void 0;n.nodeLookup&&(o=i?n.nodeLookup.get(s):_k(s)?s:n.nodeLookup.get(s.id));const a=o?Lv(o,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Zb(r,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Jb(t)},um=(e,n={})=>{let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(s=>{(n.filter===void 0||n.filter(s))&&(t=Zb(t,Lv(s)),r=!0)}),r?Jb(t):{x:0,y:0,width:0,height:0}},pk=(e,n,[t,r,s]=[0,0,1],i=!1,o=!1)=>{const a=(n.x-t)/s,l=(n.y-r)/s,u=n.width/s,_=n.height/s,f=[];for(const p of e.values()){const{measured:m,selectable:x=!0,hidden:S=!1}=p;if(o&&!x||S)continue;const b=m.width??p.width??p.initialWidth??0,v=m.height??p.height??p.initialHeight??0,{x:y,y:w}=p.internals.positionAbsolute,C=QF(a,l,u,_,y,w,b,v),N=b*v,E=i&&C>0;(!p.internals.handleBounds||E||C>=N||p.dragging)&&f.push(p)}return f},MNt=(e,n)=>{const t=new Set;return e.forEach(r=>{t.add(r.id)}),n.filter(r=>t.has(r.source)||t.has(r.target))};function DNt(e,n){const t=new Map,r=n!=null&&n.nodes?new Set(n.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&t.set(s.id,s)}),t}async function LNt({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},o){if(e.size===0)return!0;const a=DNt(e,o),l=um(a),u=gk(l,n,t,(o==null?void 0:o.minZoom)??s,(o==null?void 0:o.maxZoom)??i,(o==null?void 0:o.padding)??.1);return await r.setViewport(u,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),!0}function WF({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:i}){const o=t.get(e),a=o.parentId?t.get(o.parentId):void 0,{x:l,y:u}=a?a.internals.positionAbsolute:{x:0,y:0},_=o.origin??r;let f=o.extent||s;if(o.extent==="parent"&&!o.expandParent)if(!a)i==null||i("005",no.error005());else{const m=a.measured.width,x=a.measured.height;m&&x&&(f=[[l,u],[l+m,u+x]])}else a&&Hf(o.extent)&&(f=[[o.extent[0][0]+l,o.extent[0][1]+u],[o.extent[1][0]+l,o.extent[1][1]+u]]);const p=Hf(f)?Ff(n,f,o.measured):n;return(o.measured.width===void 0||o.measured.height===void 0)&&(i==null||i("015",no.error015())),{position:{x:p.x-l+(o.measured.width??0)*_[0],y:p.y-u+(o.measured.height??0)*_[1]},positionAbsolute:p}}async function ONt({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const i=new Set(e.map(p=>p.id)),o=[];for(const p of t){if(p.deletable===!1)continue;const m=i.has(p.id),x=!m&&p.parentId&&o.find(S=>S.id===p.parentId);(m||x)&&o.push(p)}const a=new Set(n.map(p=>p.id)),l=r.filter(p=>p.deletable!==!1),_=MNt(o,l);for(const p of l)a.has(p.id)&&!_.find(x=>x.id===p.id)&&_.push(p);if(!s)return{edges:_,nodes:o};const f=await s({nodes:o,edges:_});return typeof f=="boolean"?f?{edges:_,nodes:o}:{edges:[],nodes:[]}:f}const Xh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Ff=(e={x:0,y:0},n,t)=>({x:Xh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:Xh(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function VF(e,n,t){const{width:r,height:s}=ec(t),{x:i,y:o}=t.internals.positionAbsolute;return Ff(e,[[i,o],[i+r,o+s]],n)}const HA=(e,n,t)=>et?-Xh(Math.abs(e-t),1,n)/n:0,mk=(e,n,t=15,r=40)=>{const s=HA(e.x,r,n.width-r)*t,i=HA(e.y,r,n.height-r)*t;return[s,i]},Zb=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),i3=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Jb=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),wp=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=_k(e)?e.internals.positionAbsolute:cm(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Lv=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=_k(e)?e.internals.positionAbsolute:cm(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},KF=(e,n)=>Jb(Zb(i3(e),i3(n))),QF=(e,n,t,r,s,i,o,a)=>{const l=Math.max(0,Math.min(e+t,s+o)-Math.max(e,s)),u=Math.max(0,Math.min(n+r,i+a)-Math.max(n,i));return Math.ceil(l*u)},Ov=(e,n)=>QF(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),qA=e=>Xa(e.width)&&Xa(e.height)&&Xa(e.x)&&Xa(e.y),Xa=e=>!isNaN(e)&&isFinite(e),YF=(e,n)=>(t,r)=>{},fm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),dm=({x:e,y:n},[t,r,s],i=!1,o=[1,1])=>{const a={x:(e-t)/s,y:(n-r)/s};return i?fm(a,o):a},Zh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function Ud(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e=="string"&&e.endsWith("%")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(n*t*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function INt(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=Ud(e,t),s=Ud(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Ud(e.top??e.y??0,t),s=Ud(e.bottom??e.y??0,t),i=Ud(e.left??e.x??0,n),o=Ud(e.right??e.x??0,n);return{top:r,right:o,bottom:s,left:i,x:i+o,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function BNt(e,n,t,r,s,i){const{x:o,y:a}=Zh(e,[n,t,r]),{x:l,y:u}=Zh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),_=s-l,f=i-u;return{left:Math.floor(o),top:Math.floor(a),right:Math.floor(_),bottom:Math.floor(f)}}const gk=(e,n,t,r,s,i)=>{const o=INt(i,n,t),a=(n-o.x)/e.width,l=(t-o.y)/e.height,u=Math.min(a,l),_=Xh(u,r,s),f=e.x+e.width/2,p=e.y+e.height/2,m=n/2-f*_,x=t/2-p*_,S=BNt(e,m,x,_,n,t),b={left:Math.min(S.left-o.left,0),top:Math.min(S.top-o.top,0),right:Math.min(S.right-o.right,0),bottom:Math.min(S.bottom-o.bottom,0)};return{x:m-b.left+b.right,y:x-b.top+b.bottom,zoom:_}},Sp=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Hf(e){return e!=null&&e!=="parent"}function ec(e){var n,t;return{width:((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth??0,height:((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight??0}}function XF(e){var n,t;return(((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth)!==void 0&&(((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight)!==void 0}function ZF(e,n={width:0,height:0},t,r,s){const i={...e},o=r.get(t);if(o){const a=o.origin||s;i.x+=o.internals.positionAbsolute.x-(n.width??0)*a[0],i.y+=o.internals.positionAbsolute.y-(n.height??0)*a[1]}return i}function UA(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function $Nt(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function PNt(e){return{...HF,...e||{}}}function $0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:o}=Za(e),a=dm({x:i-((s==null?void 0:s.left)??0),y:o-((s==null?void 0:s.top)??0)},r),{x:l,y:u}=t?fm(a,n):a;return{xSnapped:l,ySnapped:u,...a}}const vk=e=>({width:e.offsetWidth,height:e.offsetHeight}),JF=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},FNt=["INPUT","SELECT","TEXTAREA"];function eH(e){var r,s;const n=((s=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:s[0])||e.target;return(n==null?void 0:n.nodeType)!==1?!1:FNt.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const tH=e=>"clientX"in e,Za=(e,n)=>{var i,o;const t=tH(e),r=t?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,s=t?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},GA=(e,n,t,r,s)=>{const i=n.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(o=>{const a=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:s,position:o.getAttribute("data-handlepos"),x:(a.left-t.left)/r,y:(a.top-t.top)/r,...vk(o)}})};function nH({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:i,targetControlX:o,targetControlY:a}){const l=e*.125+s*.375+o*.375+t*.125,u=n*.125+i*.375+a*.375+r*.125,_=Math.abs(l-e),f=Math.abs(u-n);return[l,u,_,f]}function a1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function WA({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case kt.Left:return[n-a1(n-r,i),t];case kt.Right:return[n+a1(r-n,i),t];case kt.Top:return[n,t-a1(t-s,i)];case kt.Bottom:return[n,t+a1(s-t,i)]}}function rH({sourceX:e,sourceY:n,sourcePosition:t=kt.Bottom,targetX:r,targetY:s,targetPosition:i=kt.Top,curvature:o=.25}){const[a,l]=WA({pos:t,x1:e,y1:n,x2:r,y2:s,c:o}),[u,_]=WA({pos:i,x1:r,y1:s,x2:e,y2:n,c:o}),[f,p,m,x]=nH({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:a,sourceControlY:l,targetControlX:u,targetControlY:_});return[`M${e},${n} C${a},${l} ${u},${_} ${r},${s}`,f,p,m,x]}function sH({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const UNt=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,GNt=(e,n)=>n.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),WNt=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",no.error006()),n;const r=t.getEdgeId||UNt;let s;return GF(e)?s={...e}:s={...e,id:r(e)},GNt(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function iH({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,o,a]=sH({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,o,a]}const VA={[kt.Left]:{x:-1,y:0},[kt.Right]:{x:1,y:0},[kt.Top]:{x:0,y:-1},[kt.Bottom]:{x:0,y:1}},VNt=({source:e,sourcePosition:n=kt.Bottom,target:t})=>n===kt.Left||n===kt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function KNt({source:e,sourcePosition:n=kt.Bottom,target:t,targetPosition:r=kt.Top,center:s,offset:i,stepPosition:o}){const a=VA[n],l=VA[r],u={x:e.x+a.x*i,y:e.y+a.y*i},_={x:t.x+l.x*i,y:t.y+l.y*i},f=VNt({source:u,sourcePosition:n,target:_}),p=f.x!==0?"x":"y",m=f[p];let x=[],S,b;const v={x:0,y:0},y={x:0,y:0},[,,w,C]=sH({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(a[p]*l[p]===-1){p==="x"?(S=s.x??u.x+(_.x-u.x)*o,b=s.y??(u.y+_.y)/2):(S=s.x??(u.x+_.x)/2,b=s.y??u.y+(_.y-u.y)*o);const z=[{x:S,y:u.y},{x:S,y:_.y}],R=[{x:u.x,y:b},{x:_.x,y:b}];a[p]===m?x=p==="x"?z:R:x=p==="x"?R:z}else{const z=[{x:u.x,y:_.y}],R=[{x:_.x,y:u.y}];if(p==="x"?x=a.x===m?R:z:x=a.y===m?z:R,n===r){const q=Math.abs(e[p]-t[p]);if(q<=i){const Y=Math.min(i-1,i-q);a[p]===m?v[p]=(u[p]>e[p]?-1:1)*Y:y[p]=(_[p]>t[p]?-1:1)*Y}}if(n!==r){const q=p==="x"?"y":"x",Y=a[p]===l[q],V=u[q]>_[q],Z=u[q]<_[q];(a[p]===1&&(!Y&&V||Y&&Z)||a[p]!==1&&(!Y&&Z||Y&&V))&&(x=p==="x"?z:R)}const O={x:u.x+v.x,y:u.y+v.y},I={x:_.x+y.x,y:_.y+y.y},F=Math.max(Math.abs(O.x-x[0].x),Math.abs(I.x-x[0].x)),U=Math.max(Math.abs(O.y-x[0].y),Math.abs(I.y-x[0].y));F>=U?(S=(O.x+I.x)/2,b=x[0].y):(S=x[0].x,b=(O.y+I.y)/2)}const N={x:u.x+v.x,y:u.y+v.y},E={x:_.x+y.x,y:_.y+y.y};return[[e,...N.x!==x[0].x||N.y!==x[0].y?[N]:[],...x,...E.x!==x[x.length-1].x||E.y!==x[x.length-1].y?[E]:[],t],S,b,w,C]}function QNt(e,n,t,r){const s=Math.min(KA(e,n)/2,KA(n,t)/2,r),{x:i,y:o}=n;if(e.x===i&&i===t.x||e.y===o&&o===t.y)return`L${i} ${o}`;if(e.y===o){const u=e.xt.id===n):e[0])||null}function o3(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function XNt(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const i=new Set;return e.reduce((o,a)=>([a.markerStart||r,a.markerEnd||s].forEach(l=>{if(l&&typeof l=="object"){const u=o3(l,n);i.has(u)||(o.push({id:u,color:l.color||t,...l}),i.add(u))}}),o),[]).sort((o,a)=>o.id.localeCompare(a.id))}const aH=1e3,ZNt=10,bk={nodeOrigin:[0,0],nodeExtent:yp,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},JNt={...bk,checkEquality:!0};function yk(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function ezt(e,n,t){const r=yk(bk,t);for(const s of e.values())if(s.parentId)wk(s,e,n,r);else{const i=cm(s,r.nodeOrigin),o=Hf(s.extent)?s.extent:r.nodeExtent,a=Ff(i,o,ec(s));s.internals.positionAbsolute=a}}function tzt(e,n){if(!e.handles)return e.measured?n==null?void 0:n.internals.handleBounds:void 0;const t=[],r=[];for(const s of e.handles){const i={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?t.push(i):s.type==="target"&&r.push(i)}return{source:t,target:r}}function xk(e){return e==="manual"}function l3(e,n,t,r={}){var _,f;const s=yk(JNt,r),i={i:0},o=new Map(n),a=s!=null&&s.elevateNodesOnSelect&&!xk(s.zIndexMode)?aH:0;let l=e.length>0,u=!1;n.clear(),t.clear();for(const p of e){let m=o.get(p.id);if(s.checkEquality&&p===(m==null?void 0:m.internals.userNode))n.set(p.id,m);else{const x=cm(p,s.nodeOrigin),S=Hf(p.extent)?p.extent:s.nodeExtent,b=Ff(x,S,ec(p));m={...s.defaults,...p,measured:{width:(_=p.measured)==null?void 0:_.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:b,handleBounds:tzt(p,m),z:oH(p,a,s.zIndexMode),userNode:p}},n.set(p.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(l=!1),p.parentId&&wk(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:l,hasSelectedNodes:u}}function nzt(e,n){if(!e.parentId)return;const t=n.get(e.parentId);t?t.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function wk(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:o,nodeExtent:a,zIndexMode:l}=yk(bk,r),u=e.parentId,_=n.get(u);if(!_){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}nzt(e,t),s&&!_.parentId&&_.internals.rootParentIndex===void 0&&l==="auto"&&(_.internals.rootParentIndex=++s.i,_.internals.z=_.internals.z+s.i*ZNt),s&&_.internals.rootParentIndex!==void 0&&(s.i=_.internals.rootParentIndex);const f=i&&!xk(l)?aH:0,{x:p,y:m,z:x}=rzt(e,_,o,a,f,l),{positionAbsolute:S}=e.internals,b=p!==S.x||m!==S.y;(b||x!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:p,y:m}:S,z:x}})}function oH(e,n,t){const r=Xa(e.zIndex)?e.zIndex:0;return xk(t)?r:r+(e.selected?n:0)}function rzt(e,n,t,r,s,i){const{x:o,y:a}=n.internals.positionAbsolute,l=ec(e),u=cm(e,t),_=Hf(e.extent)?Ff(u,e.extent,l):u;let f=Ff({x:o+_.x,y:a+_.y},r,l);e.extent==="parent"&&(f=VF(f,l,n));const p=oH(e,s,i),m=n.internals.z??0;return{x:f.x,y:f.y,z:m>=p?m+1:p}}function Sk(e,n,t,r=[0,0]){var o;const s=[],i=new Map;for(const a of e){const l=n.get(a.parentId);if(!l)continue;const u=((o=i.get(a.parentId))==null?void 0:o.expandedRect)??wp(l),_=KF(u,a.rect);i.set(a.parentId,{expandedRect:_,parent:l})}return i.size>0&&i.forEach(({expandedRect:a,parent:l},u)=>{var w;const _=l.internals.positionAbsolute,f=ec(l),p=l.origin??r,m=a.x<_.x?Math.round(Math.abs(_.x-a.x)):0,x=a.y<_.y?Math.round(Math.abs(_.y-a.y)):0,S=Math.max(f.width,Math.round(a.width)),b=Math.max(f.height,Math.round(a.height)),v=(S-f.width)*p[0],y=(b-f.height)*p[1];(m>0||x>0||v||y)&&(s.push({id:u,type:"position",position:{x:l.position.x-m+v,y:l.position.y-x+y}}),(w=t.get(u))==null||w.forEach(C=>{e.some(N=>N.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+m,y:C.position.y+x}})})),(f.width0){const m=Sk(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:l}}async function izt({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:i}){if(!n||!e.x&&!e.y)return!1;const o=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,i]],r);return!!o&&(o.x!==t[0]||o.y!==t[1]||o.k!==t[2])}function ZA(e,n,t,r,s,i){let o=s;const a=r.get(o)||new Map;r.set(o,a.set(t,n)),o=`${s}-${e}`;const l=r.get(o)||new Map;if(r.set(o,l.set(t,n)),i){o=`${s}-${e}-${i}`;const u=r.get(o)||new Map;r.set(o,u.set(t,n))}}function lH(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:i,sourceHandle:o=null,targetHandle:a=null}=r,l={edgeId:r.id,source:s,target:i,sourceHandle:o,targetHandle:a},u=`${s}-${o}--${i}-${a}`,_=`${i}-${a}--${s}-${o}`;ZA("source",l,_,e,s,o),ZA("target",l,u,e,i,a),n.set(r.id,r)}}function cH(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:cH(t,n):!1}function JA(e,n,t){var s;let r=e;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,n))return!0;if(r===t)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function azt(e,n,t,r){const s=new Map;for(const[i,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!cH(o,e))&&(o.draggable||n&&typeof o.draggable>"u")){const a=e.get(i);a&&s.set(i,{id:i,position:a.position||{x:0,y:0},distance:{x:t.x-a.internals.positionAbsolute.x,y:t.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return s}function Dw({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var o,a,l;const s=[];for(const[u,_]of n){const f=(o=t.get(u))==null?void 0:o.internals.userNode;f&&s.push({...f,position:_.position,dragging:r})}if(!e)return[s[0],s];const i=(a=t.get(e))==null?void 0:a.internals.userNode;return[i?{...i,position:((l=n.get(e))==null?void 0:l.position)||i.position,dragging:r}:s[0],s]}function ozt({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const i={x:t-s.distance.x,y:r-s.distance.y},o=fm(i,n);return{x:o.x-i.x,y:o.y-i.y}}function lzt({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let i={x:null,y:null},o=0,a=new Map,l=!1,u={x:0,y:0},_=null,f=!1,p=null,m=!1,x=!1,S=null;function b({noDragClassName:y,handleSelector:w,domNode:C,isSelectable:N,nodeId:E,nodeClickDistance:j=0}){p=$i(C);function z({x:F,y:U}){const{nodeLookup:q,nodeExtent:Y,snapGrid:V,snapToGrid:Z,nodeOrigin:te,onNodeDrag:P,onSelectionDrag:L,onError:$,updateNodePositions:H}=n();i={x:F,y:U};let G=!1;const ne=a.size>1,oe=ne&&Y?i3(um(a)):null,le=ne&&Z?ozt({dragItems:a,snapGrid:V,x:F,y:U}):null;for(const[se,Q]of a){if(!q.has(se))continue;let ce={x:F-Q.distance.x,y:U-Q.distance.y};Z&&(ce=le?{x:Math.round(ce.x+le.x),y:Math.round(ce.y+le.y)}:fm(ce,V));let ee=null;if(ne&&Y&&!Q.extent&&oe){const{positionAbsolute:ye}=Q.internals,Ae=ye.x-oe.x+Y[0][0],Ve=ye.x+Q.measured.width-oe.x2+Y[1][0],Ge=ye.y-oe.y+Y[0][1],$e=ye.y+Q.measured.height-oe.y2+Y[1][1];ee=[[Ae,Ge],[Ve,$e]]}const{position:ue,positionAbsolute:de}=WF({nodeId:se,nextPosition:ce,nodeLookup:q,nodeExtent:ee||Y,nodeOrigin:te,onError:$});G=G||Q.position.x!==ue.x||Q.position.y!==ue.y,Q.position=ue,Q.internals.positionAbsolute=de}if(x=x||G,!!G&&(H(a,!0),S&&(r||P||!E&&L))){const[se,Q]=Dw({nodeId:E,dragItems:a,nodeLookup:q});r==null||r(S,a,se,Q),P==null||P(S,se,Q),E||L==null||L(S,Q)}}async function R(){if(!_)return;const{transform:F,panBy:U,autoPanSpeed:q,autoPanOnNodeDrag:Y}=n();if(!Y){l=!1,cancelAnimationFrame(o);return}const[V,Z]=mk(u,_,q);(V!==0||Z!==0)&&(i.x=(i.x??0)-V/F[2],i.y=(i.y??0)-Z/F[2],await U({x:V,y:Z})&&z(i)),o=requestAnimationFrame(R)}function O(F){var ne;const{nodeLookup:U,multiSelectionActive:q,nodesDraggable:Y,transform:V,snapGrid:Z,snapToGrid:te,selectNodesOnDrag:P,onNodeDragStart:L,onSelectionDragStart:$,unselectNodesAndEdges:H}=n();f=!0,(!P||!N)&&!q&&E&&((ne=U.get(E))!=null&&ne.selected||H()),N&&P&&E&&(e==null||e(E));const G=$0(F.sourceEvent,{transform:V,snapGrid:Z,snapToGrid:te,containerBounds:_});if(i=G,a=azt(U,Y,G,E),a.size>0&&(t||L||!E&&$)){const[oe,le]=Dw({nodeId:E,dragItems:a,nodeLookup:U});t==null||t(F.sourceEvent,a,oe,le),L==null||L(F.sourceEvent,oe,le),E||$==null||$(F.sourceEvent,le)}}const I=CF().clickDistance(j).on("start",F=>{const{domNode:U,nodeDragThreshold:q,transform:Y,snapGrid:V,snapToGrid:Z}=n();_=(U==null?void 0:U.getBoundingClientRect())||null,m=!1,x=!1,S=F.sourceEvent,q===0&&O(F),i=$0(F.sourceEvent,{transform:Y,snapGrid:V,snapToGrid:Z,containerBounds:_}),u=Za(F.sourceEvent,_)}).on("drag",F=>{const{autoPanOnNodeDrag:U,transform:q,snapGrid:Y,snapToGrid:V,nodeDragThreshold:Z,nodeLookup:te}=n(),P=$0(F.sourceEvent,{transform:q,snapGrid:Y,snapToGrid:V,containerBounds:_});if(S=F.sourceEvent,(F.sourceEvent.type==="touchmove"&&F.sourceEvent.touches.length>1||E&&!te.has(E))&&(m=!0),!m){if(!l&&U&&f&&(l=!0,R()),!f){const L=Za(F.sourceEvent,_),$=L.x-u.x,H=L.y-u.y;Math.sqrt($*$+H*H)>Z&&O(F)}(i.x!==P.xSnapped||i.y!==P.ySnapped)&&a&&f&&(u=Za(F.sourceEvent,_),z(P))}}).on("end",F=>{if(!f||m){m&&a.size>0&&n().updateNodePositions(a,!1);return}if(l=!1,f=!1,cancelAnimationFrame(o),a.size>0){const{nodeLookup:U,updateNodePositions:q,onNodeDragStop:Y,onSelectionDragStop:V}=n();if(x&&(q(a,!1),x=!1),s||Y||!E&&V){const[Z,te]=Dw({nodeId:E,dragItems:a,nodeLookup:U,dragging:!1});s==null||s(F.sourceEvent,a,Z,te),Y==null||Y(F.sourceEvent,Z,te),E||V==null||V(F.sourceEvent,te)}}}).filter(F=>{const U=F.target;return!F.button&&(!y||!JA(U,`.${y}`,C))&&(!w||JA(U,w,C))});p.call(I)}function v(){p==null||p.on(".drag",null)}return{update:b,destroy:v}}function czt(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const i of n.values())Ov(s,wp(i))>0&&r.push(i);return r}const uzt=250;function fzt(e,n,t,r){var a,l;let s=[],i=1/0;const o=czt(e,t,n+uzt);for(const u of o){const _=[...((a=u.internals.handleBounds)==null?void 0:a.source)??[],...((l=u.internals.handleBounds)==null?void 0:l.target)??[]];for(const f of _){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:p,y:m}=qf(u,f,f.position,!0),x=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));x>n||(x1){const u=r.type==="source"?"target":"source";return s.find(_=>_.type===u)??s[0]}return s[0]}function uH(e,n,t,r,s,i=!1){var u,_,f;const o=r.get(e);if(!o)return null;const a=s==="strict"?(u=o.internals.handleBounds)==null?void 0:u[n]:[...((_=o.internals.handleBounds)==null?void 0:_.source)??[],...((f=o.internals.handleBounds)==null?void 0:f.target)??[]],l=(t?a==null?void 0:a.find(p=>p.id===t):a==null?void 0:a[0])??null;return l&&i?{...l,...qf(o,l,l.position,!0)}:l}function fH(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function dzt(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const dH=()=>!0;function hzt(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:o,domNode:a,nodeLookup:l,lib:u,autoPanOnConnect:_,flowId:f,panBy:p,cancelConnection:m,onConnectStart:x,onConnect:S,onConnectEnd:b,isValidConnection:v=dH,onReconnectEnd:y,updateConnection:w,getTransform:C,getFromHandle:N,autoPanSpeed:E,dragThreshold:j=1,handleDomNode:z}){const R=JF(e.target);let O=0,I;const{x:F,y:U}=Za(e),q=fH(i,z),Y=a==null?void 0:a.getBoundingClientRect();let V=!1;if(!Y||!q)return;const Z=uH(s,q,r,l,n);if(!Z)return;let te=Za(e,Y),P=!1,L=null,$=!1,H=null;function G(){if(!_||!Y)return;const[ue,de]=mk(te,Y,E);p({x:ue,y:de}),O=requestAnimationFrame(G)}const ne={...Z,nodeId:s,type:q,position:Z.position},oe=l.get(s);let se={inProgress:!0,isValid:null,from:qf(oe,ne,kt.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:oe,to:te,toHandle:null,toPosition:FA[ne.position],toNode:null,pointer:te};function Q(){V=!0,w(se),x==null||x(e,{nodeId:s,handleId:r,handleType:q})}j===0&&Q();function ce(ue){if(!V){const{x:$e,y:ut}=Za(ue),pt=$e-F,Ut=ut-U;if(!(pt*pt+Ut*Ut>j*j))return;Q()}if(!N()||!ne){ee(ue);return}const de=C();te=Za(ue,Y),I=fzt(dm(te,de,!1,[1,1]),t,l,ne),P||(G(),P=!0);const ye=hH(ue,{handle:I,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:o?"target":"source",isValidConnection:v,doc:R,lib:u,flowId:f,nodeLookup:l});H=ye.handleDomNode,L=ye.connection,$=dzt(!!I,ye.isValid);const Ae=l.get(s),Ve=Ae?qf(Ae,ne,kt.Left,!0):se.from,Ge={...se,from:Ve,isValid:$,to:ye.toHandle&&$?Zh({x:ye.toHandle.x,y:ye.toHandle.y},de):te,toHandle:ye.toHandle,toPosition:$&&ye.toHandle?ye.toHandle.position:FA[ne.position],toNode:ye.toHandle?l.get(ye.toHandle.nodeId):null,pointer:te};w(Ge),se=Ge}function ee(ue){if(!("touches"in ue&&ue.touches.length>0)){if(V){(I||H)&&L&&$&&(S==null||S(L));const{inProgress:de,...ye}=se,Ae={...ye,toPosition:se.toHandle?se.toPosition:null};b==null||b(ue,Ae),i&&(y==null||y(ue,Ae))}m(),cancelAnimationFrame(O),P=!1,$=!1,L=null,H=null,R.removeEventListener("mousemove",ce),R.removeEventListener("mouseup",ee),R.removeEventListener("touchmove",ce),R.removeEventListener("touchend",ee)}}R.addEventListener("mousemove",ce),R.addEventListener("mouseup",ee),R.addEventListener("touchmove",ce),R.addEventListener("touchend",ee)}function hH(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:o,lib:a,flowId:l,isValidConnection:u=dH,nodeLookup:_}){const f=i==="target",p=n?o.querySelector(`.${a}-flow__handle[data-id="${l}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:x}=Za(e),S=o.elementFromPoint(m,x),b=S!=null&&S.classList.contains(`${a}-flow__handle`)?S:p,v={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const y=fH(void 0,b),w=b.getAttribute("data-nodeid"),C=b.getAttribute("data-handleid"),N=b.classList.contains("connectable"),E=b.classList.contains("connectableend");if(!w||!y)return v;const j={source:f?w:r,sourceHandle:f?C:s,target:f?r:w,targetHandle:f?s:C};v.connection=j;const R=N&&E&&(t===Yh.Strict?f&&y==="source"||!f&&y==="target":w!==r||C!==s);v.isValid=R&&u(j),v.toHandle=uH(w,y,C,_,t,!0)}return v}const c3={onPointerDown:hzt,isValid:hH};function _zt({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=$i(e);function i({translateExtent:a,width:l,height:u,zoomStep:_=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const x=w=>{if(w.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=w.sourceEvent.ctrlKey&&Sp()?10:1,E=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*_,j=C[2]*Math.pow(2,E*N);n.scaleTo(j)};let S=[0,0];const b=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(S=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},v=w=>{const C=t();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!n)return;const N=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],E=[N[0]-S[0],N[1]-S[1]];S=N;const j=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),z={x:C[0]-E[0]*j,y:C[1]-E[1]*j},R=[[0,0],[l,u]];n.setViewportConstrained({x:z.x,y:z.y,zoom:C[2]},R,a)},y=PF().on("start",b).on("zoom",f?v:null).on("zoom.wheel",p?x:null);s.call(y,{})}function o(){s.on("zoom",null)}return{update:i,destroy:o,pointer:Ua}}const ey=e=>({x:e.x,y:e.y,zoom:e.k}),Lw=({x:e,y:n,zoom:t})=>Xb.translate(e,n).scale(t),th=(e,n)=>e.target.closest(`.${n}`),_H=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),pzt=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Ow=(e,n=0,t=pzt,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},pH=e=>{const n=e.ctrlKey&&Sp()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function mzt({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:o,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:u}){return _=>{if(th(_,n))return _.ctrlKey&&_.preventDefault(),!1;_.preventDefault(),_.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(_.ctrlKey&&o){const b=Ua(_),v=pH(_),y=f*Math.pow(2,v);r.scaleTo(t,y,b,_);return}const p=_.deltaMode===1?20:1;let m=s===Rf.Vertical?0:_.deltaX*p,x=s===Rf.Horizontal?0:_.deltaY*p;!Sp()&&_.shiftKey&&s!==Rf.Vertical&&(m=_.deltaY*p,x=0),r.translateBy(t,-(m/f)*i,-(x/f)*i,{internal:!0});const S=ey(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l==null||l(_,S),e.panScrollTimeout=setTimeout(()=>{u==null||u(_,S),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,a==null||a(_,S))}}function gzt({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",o=!n&&i&&!r.ctrlKey,a=th(r,e);if(r.ctrlKey&&i&&a&&r.preventDefault(),o||a)return null;r.preventDefault(),t.call(this,r,s)}}function vzt({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,o,a;if((i=r.sourceEvent)!=null&&i.internal)return;const s=ey(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((a=r.sourceEvent)==null?void 0:a.type)==="mousedown"&&n(!0),t&&(t==null||t(r.sourceEvent,s))}}function bzt({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var o,a;e.usedRightMouseButton=!!(t&&_H(n,e.mouseButton??0)),(o=i.sourceEvent)!=null&&o.sync||r([i.transform.x,i.transform.y,i.transform.k]),s&&!((a=i.sourceEvent)!=null&&a.internal)&&(s==null||s(i.sourceEvent,ey(i.transform)))}}function yzt({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:i}){return o=>{var a;if(!((a=o.sourceEvent)!=null&&a.internal)&&(e.isZoomingOrPanning=!1,i&&_H(n,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&i(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const l=ey(o.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(o.sourceEvent,l)},t?150:0)}}}function xzt({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:o,noWheelClassName:a,noPanClassName:l,lib:u,connectionInProgress:_}){return f=>{var b;const p=e||n,m=t&&f.ctrlKey,x=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(th(f,`${u}-flow__node`)||th(f,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||o||_&&!x||th(f,a)&&x||th(f,l)&&(!x||s&&x&&!e)||!t&&f.ctrlKey&&x)return!1;if(!t&&f.type==="touchstart"&&((b=f.touches)==null?void 0:b.length)>1)return f.preventDefault(),!1;if(!p&&!s&&!m&&x||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const S=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||x)&&S}}function wzt({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:i,onPanZoomStart:o,onPanZoomEnd:a,onDraggingChange:l}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},_=e.getBoundingClientRect(),f=PF().scaleExtent([n,t]).translateExtent(r),p=$i(e).call(f);y({x:s.x,y:s.y,zoom:Xh(s.zoom,n,t)},[[0,0],[_.width,_.height]],r);const m=p.on("wheel.zoom"),x=p.on("dblclick.zoom");f.wheelDelta(pH);async function S(I,F){return p?new Promise(U=>{f==null||f.interpolate((F==null?void 0:F.interpolate)==="linear"?B0:j1).transform(Ow(p,F==null?void 0:F.duration,F==null?void 0:F.ease,()=>U(!0)),I)}):!1}function b({noWheelClassName:I,noPanClassName:F,onPaneContextMenu:U,userSelectionActive:q,panOnScroll:Y,panOnDrag:V,panOnScrollMode:Z,panOnScrollSpeed:te,preventScrolling:P,zoomOnPinch:L,zoomOnScroll:$,zoomOnDoubleClick:H,zoomActivationKeyPressed:G,lib:ne,onTransformChange:oe,connectionInProgress:le,paneClickDistance:se,selectionOnDrag:Q}){q&&!u.isZoomingOrPanning&&v();const ce=Y&&!G&&!q;f.clickDistance(Q?1/0:!Xa(se)||se<0?0:se);const ee=ce?mzt({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:f,panOnScrollMode:Z,panOnScrollSpeed:te,zoomOnPinch:L,onPanZoomStart:o,onPanZoom:i,onPanZoomEnd:a}):gzt({noWheelClassName:I,preventScrolling:P,d3ZoomHandler:m});p.on("wheel.zoom",ee,{passive:!1});const ue=vzt({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:o});f.on("start",ue);const de=bzt({zoomPanValues:u,panOnDrag:V,onPaneContextMenu:!!U,onPanZoom:i,onTransformChange:oe});f.on("zoom",de);const ye=yzt({zoomPanValues:u,panOnDrag:V,panOnScroll:Y,onPaneContextMenu:U,onPanZoomEnd:a,onDraggingChange:l});f.on("end",ye);const Ae=xzt({zoomActivationKeyPressed:G,panOnDrag:V,zoomOnScroll:$,panOnScroll:Y,zoomOnDoubleClick:H,zoomOnPinch:L,userSelectionActive:q,noPanClassName:F,noWheelClassName:I,lib:ne,connectionInProgress:le});f.filter(Ae),H?p.on("dblclick.zoom",x):p.on("dblclick.zoom",null)}function v(){f.on("zoom",null)}async function y(I,F,U){const q=Lw(I),Y=f==null?void 0:f.constrain()(q,F,U);return Y&&await S(Y),Y}async function w(I,F){const U=Lw(I);return await S(U,F),U}function C(I){if(p){const F=Lw(I),U=p.property("__zoom");(U.k!==I.zoom||U.x!==I.x||U.y!==I.y)&&(f==null||f.transform(p,F,null,{sync:!0}))}}function N(){const I=p?$F(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function E(I,F){return p?new Promise(U=>{f==null||f.interpolate((F==null?void 0:F.interpolate)==="linear"?B0:j1).scaleTo(Ow(p,F==null?void 0:F.duration,F==null?void 0:F.ease,()=>U(!0)),I)}):!1}async function j(I,F){return p?new Promise(U=>{f==null||f.interpolate((F==null?void 0:F.interpolate)==="linear"?B0:j1).scaleBy(Ow(p,F==null?void 0:F.duration,F==null?void 0:F.ease,()=>U(!0)),I)}):!1}function z(I){f==null||f.scaleExtent(I)}function R(I){f==null||f.translateExtent(I)}function O(I){const F=!Xa(I)||I<0?0:I;f==null||f.clickDistance(F)}return{update:b,destroy:v,setViewport:w,setViewportConstrained:y,getViewport:N,scaleTo:E,scaleBy:j,setScaleExtent:z,setTranslateExtent:R,syncViewport:C,setClickDistance:O}}var Jh;(function(e){e.Line="line",e.Handle="handle"})(Jh||(Jh={}));function Szt({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:i}){const o=e-n,a=t-r,l=[o>0?1:o<0?-1:0,a>0?1:a<0?-1:0];return o&&s&&(l[0]=l[0]*-1),a&&i&&(l[1]=l[1]*-1),l}function eR(e){const n=e.includes("right")||e.includes("left"),t=e.includes("bottom")||e.includes("top"),r=e.includes("left"),s=e.includes("top");return{isHorizontal:n,isVertical:t,affectsX:r,affectsY:s}}function Fc(e,n){return Math.max(0,n-e)}function Hc(e,n){return Math.max(0,e-n)}function o1(e,n,t){return Math.max(0,n-e,e-t)}function tR(e,n){return e?!n:n}function kzt(e,n,t,r,s,i,o,a){let{affectsX:l,affectsY:u}=n;const{isHorizontal:_,isVertical:f}=n,p=_&&f,{xSnapped:m,ySnapped:x}=t,{minWidth:S,maxWidth:b,minHeight:v,maxHeight:y}=r,{x:w,y:C,width:N,height:E,aspectRatio:j}=e;let z=Math.floor(_?m-e.pointerX:0),R=Math.floor(f?x-e.pointerY:0);const O=N+(l?-z:z),I=E+(u?-R:R),F=-i[0]*N,U=-i[1]*E;let q=o1(O,S,b),Y=o1(I,v,y);if(o){let te=0,P=0;l&&z<0?te=Fc(w+z+F,o[0][0]):!l&&z>0&&(te=Hc(w+O+F,o[1][0])),u&&R<0?P=Fc(C+R+U,o[0][1]):!u&&R>0&&(P=Hc(C+I+U,o[1][1])),q=Math.max(q,te),Y=Math.max(Y,P)}if(a){let te=0,P=0;l&&z>0?te=Hc(w+z,a[0][0]):!l&&z<0&&(te=Fc(w+O,a[1][0])),u&&R>0?P=Hc(C+R,a[0][1]):!u&&R<0&&(P=Fc(C+I,a[1][1])),q=Math.max(q,te),Y=Math.max(Y,P)}if(s){if(_){const te=o1(O/j,v,y)*j;if(q=Math.max(q,te),o){let P=0;!l&&!u||l&&!u&&p?P=Hc(C+U+O/j,o[1][1])*j:P=Fc(C+U+(l?z:-z)/j,o[0][1])*j,q=Math.max(q,P)}if(a){let P=0;!l&&!u||l&&!u&&p?P=Fc(C+O/j,a[1][1])*j:P=Hc(C+(l?z:-z)/j,a[0][1])*j,q=Math.max(q,P)}}if(f){const te=o1(I*j,S,b)/j;if(Y=Math.max(Y,te),o){let P=0;!l&&!u||u&&!l&&p?P=Hc(w+I*j+F,o[1][0])/j:P=Fc(w+(u?R:-R)*j+F,o[0][0])/j,Y=Math.max(Y,P)}if(a){let P=0;!l&&!u||u&&!l&&p?P=Fc(w+I*j,a[1][0])/j:P=Hc(w+(u?R:-R)*j,a[0][0])/j,Y=Math.max(Y,P)}}}R=R+(R<0?Y:-Y),z=z+(z<0?q:-q),s&&(p?O>I*j?R=(tR(l,u)?-z:z)/j:z=(tR(l,u)?-R:R)*j:_?(R=z/j,u=l):(z=R*j,l=u));const V=l?w+z:w,Z=u?C+R:C;return{width:N+(l?-z:z),height:E+(u?-R:R),x:i[0]*z*(l?-1:1)+V,y:i[1]*R*(u?-1:1)+Z}}const mH={width:0,height:0,x:0,y:0},Czt={...mH,pointerX:0,pointerY:0,aspectRatio:1};function Ezt(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,i=e.measured.width??0,o=e.measured.height??0,a=t[0]*i,l=t[1]*o;return[[r-a,s-l],[r+i-a,s+o-l]]}function Nzt({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=$i(e);let o={controlDirection:eR("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function a({controlPosition:u,boundaries:_,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:x,onResizeEnd:S,shouldResize:b}){let v={...mH},y={...Czt};o={boundaries:_,resizeDirection:p,keepAspectRatio:f,controlDirection:eR(u)};let w,C=null,N=[],E,j,z,R=!1;const O=CF().on("start",I=>{const{nodeLookup:F,transform:U,snapGrid:q,snapToGrid:Y,nodeOrigin:V,paneDomNode:Z}=t();if(w=F.get(n),!w)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:te,ySnapped:P}=$0(I.sourceEvent,{transform:U,snapGrid:q,snapToGrid:Y,containerBounds:C});v={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},y={...v,pointerX:te,pointerY:P,aspectRatio:v.width/v.height},E=void 0,j=Hf(w.extent)?w.extent:void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(E=F.get(w.parentId)),E&&w.extent==="parent"&&(j=[[0,0],[E.measured.width,E.measured.height]]),N=[],z=void 0;for(const[L,$]of F)if($.parentId===n&&(N.push({id:L,position:{...$.position},extent:$.extent}),$.extent==="parent"||$.expandParent)){const H=Ezt($,w,$.origin??V);z?z=[[Math.min(H[0][0],z[0][0]),Math.min(H[0][1],z[0][1])],[Math.max(H[1][0],z[1][0]),Math.max(H[1][1],z[1][1])]]:z=H}m==null||m(I,{...v})}).on("drag",I=>{const{transform:F,snapGrid:U,snapToGrid:q,nodeOrigin:Y}=t(),V=$0(I.sourceEvent,{transform:F,snapGrid:U,snapToGrid:q,containerBounds:C}),Z=[];if(!w)return;const{x:te,y:P,width:L,height:$}=v,H={},G=w.origin??Y,{width:ne,height:oe,x:le,y:se}=kzt(y,o.controlDirection,V,o.boundaries,o.keepAspectRatio,G,j,z),Q=ne!==L,ce=oe!==$,ee=le!==te&&Q,ue=se!==P&&ce;if(!ee&&!ue&&!Q&&!ce)return;if((ee||ue||G[0]===1||G[1]===1)&&(H.x=ee?le:v.x,H.y=ue?se:v.y,v.x=H.x,v.y=H.y,N.length>0)){const Ve=le-te,Ge=se-P;for(const $e of N)$e.position={x:$e.position.x-Ve+G[0]*(ne-L),y:$e.position.y-Ge+G[1]*(oe-$)},Z.push($e)}if((Q||ce)&&(H.width=Q&&(!o.resizeDirection||o.resizeDirection==="horizontal")?ne:v.width,H.height=ce&&(!o.resizeDirection||o.resizeDirection==="vertical")?oe:v.height,v.width=H.width,v.height=H.height),E&&w.expandParent){const Ve=G[0]*(H.width??0);H.x&&H.x{R&&(S==null||S(I,{...v}),s==null||s({...v}),R=!1)});i.call(O)}function l(){i.on(".drag",null)}return{update:a,destroy:l}}const zzt={},nR=e=>{let n;const t=new Set,r=(_,f)=>{const p=typeof _=="function"?_(n):_;if(!Object.is(p,n)){const m=n;n=f??(typeof p!="object"||p===null)?p:Object.assign({},n,p),t.forEach(x=>x(n,m))}},s=()=>n,l={setState:r,getState:s,getInitialState:()=>u,subscribe:_=>(t.add(_),()=>t.delete(_)),destroy:()=>{(zzt?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),t.clear()}},u=n=e(r,s,l);return l},Tzt=e=>e?nR(e):nR,{useDebugValue:jzt}=Xe,{useSyncExternalStoreWithSelector:Azt}=RW,Rzt=e=>e;function gH(e,n=Rzt,t){const r=Azt(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return jzt(r),r}const rR=(e,n)=>{const t=Tzt(e),r=(s,i=n)=>gH(t,s,i);return Object.assign(r,t),r},Mzt=(e,n)=>e?rR(e,n):rR;function vr(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[r,s]of e)if(!Object.is(s,n.get(r)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}const t=Object.keys(e);if(t.length!==Object.keys(n).length)return!1;for(const r of t)if(!Object.prototype.hasOwnProperty.call(n,r)||!Object.is(e[r],n[r]))return!1;return!0}const ty=M.createContext(null),Dzt=ty.Provider,vH=no.error001("react");function Sn(e,n){const t=M.useContext(ty);if(t===null)throw new Error(vH);return gH(t,e,n)}function yr(){const e=M.useContext(ty);if(e===null)throw new Error(vH);return M.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const sR={display:"none"},Lzt={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},bH="react-flow__node-desc",yH="react-flow__edge-desc",Ozt="react-flow__aria-live",Izt=e=>e.ariaLiveMessage,Bzt=e=>e.ariaLabelConfig;function $zt({rfId:e}){const n=Sn(Izt);return h.jsx("div",{id:`${Ozt}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Lzt,children:n})}function Pzt({rfId:e,disableKeyboardA11y:n}){const t=Sn(Bzt);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:`${bH}-${e}`,style:sR,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),h.jsx("div",{id:`${yH}-${e}`,style:sR,children:t["edge.a11yDescription.default"]}),!n&&h.jsx($zt,{rfId:e})]})}const ny=M.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const o=`${e}`.split("-");return h.jsx("div",{className:is(["react-flow__panel",t,...o]),style:r,ref:i,...s,children:n})});ny.displayName="Panel";const iR="https://reactflow.dev?utm_source=attribution";function Fzt({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:h.jsx(ny,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${iR}`,children:h.jsx("a",{href:iR,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Hzt=e=>{const n=[],t=[];for(const[,r]of e.nodeLookup)r.selected&&n.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&t.push(r);return{selectedNodes:n,selectedEdges:t}},l1=e=>e.id;function qzt(e,n){return vr(e.selectedNodes.map(l1),n.selectedNodes.map(l1))&&vr(e.selectedEdges.map(l1),n.selectedEdges.map(l1))}function Uzt({onSelectionChange:e}){const n=yr(),{selectedNodes:t,selectedEdges:r}=Sn(Hzt,qzt);return M.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(i=>i(s))},[t,r,e]),null}const Gzt=e=>!!e.onSelectionChangeHandlers;function Wzt({onSelectionChange:e}){const n=Sn(Gzt);return e||n?h.jsx(Uzt,{onSelectionChange:e}):null}const xH=[0,0],Vzt={x:0,y:0,zoom:1},Kzt=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],aR=[...Kzt,"rfId"],Qzt=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),oR={translateExtent:yp,nodeOrigin:xH,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Yzt(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:o,reset:a,setDefaultNodesAndEdges:l}=Sn(Qzt,vr),u=yr();M.useEffect(()=>(l(e.defaultNodes,e.defaultEdges),()=>{_.current=oR,a()}),[]);const _=M.useRef(oR);return M.useEffect(()=>{for(const f of aR){const p=e[f],m=_.current[f];p!==m&&(typeof e[f]>"u"||(f==="nodes"?n(p):f==="edges"?t(p):f==="minZoom"?r(p):f==="maxZoom"?s(p):f==="translateExtent"?i(p):f==="nodeExtent"?o(p):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:PNt(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}_.current=e},aR.map(f=>e[f])),null}function lR(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Xzt(e){var r;const[n,t]=M.useState(e==="system"?null:e);return M.useEffect(()=>{if(e!=="system"){t(e);return}const s=lR(),i=()=>t(s!=null&&s.matches?"dark":"light");return i(),s==null||s.addEventListener("change",i),()=>{s==null||s.removeEventListener("change",i)}},[e]),n!==null?n:(r=lR())!=null&&r.matches?"dark":"light"}const cR=typeof document<"u"?document:null;function kp(e=null,n={target:cR,actInsideInputWithModifier:!0}){const[t,r]=M.useState(!1),s=M.useRef(!1),i=M.useRef(new Set([])),[o,a]=M.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` -`).replace(` - -`,` -+`).split(` -`)),_=u.reduce((f,p)=>f.concat(...p),[]);return[u,_]}return[[],[]]},[e]);return M.useEffect(()=>{const l=(n==null?void 0:n.target)??cR,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const _=m=>{var b,v;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&eH(m))return!1;const S=fR(m.code,a);if(i.current.add(m[S]),uR(o,i.current,!1)){const y=((v=(b=m.composedPath)==null?void 0:b.call(m))==null?void 0:v[0])||m.target,w=(y==null?void 0:y.nodeName)==="BUTTON"||(y==null?void 0:y.nodeName)==="A";n.preventDefault!==!1&&(s.current||!w)&&m.preventDefault(),r(!0)}},f=m=>{const x=fR(m.code,a);uR(o,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(m[x]),m.key==="Meta"&&i.current.clear(),s.current=!1},p=()=>{i.current.clear(),r(!1)};return l==null||l.addEventListener("keydown",_),l==null||l.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{l==null||l.removeEventListener("keydown",_),l==null||l.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function uR(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function fR(e,n){return n.includes(e)?"code":"key"}const Zzt=()=>{const e=yr();return M.useMemo(()=>({zoomIn:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1.2,n):!1},zoomOut:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1/1.2,n):!1},zoomTo:async(n,t)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(n,t):!1},getZoom:()=>e.getState().transform[2],setViewport:async(n,t)=>{const{transform:[r,s,i],panZoom:o}=e.getState();return o?(await o.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??i},t),!0):!1},getViewport:()=>{const[n,t,r]=e.getState().transform;return{x:n,y:t,zoom:r}},setCenter:async(n,t,r)=>e.getState().setCenter(n,t,r),fitBounds:async(n,t)=>{const{width:r,height:s,minZoom:i,maxZoom:o,panZoom:a}=e.getState(),l=gk(n,r,s,i,o,(t==null?void 0:t.padding)??.1);return a?(await a.setViewport(l,{duration:t==null?void 0:t.duration,ease:t==null?void 0:t.ease,interpolate:t==null?void 0:t.interpolate}),!0):!1},screenToFlowPosition:(n,t={})=>{const{transform:r,snapGrid:s,snapToGrid:i,domNode:o}=e.getState();if(!o)return n;const{x:a,y:l}=o.getBoundingClientRect(),u={x:n.x-a,y:n.y-l},_=t.snapGrid??s,f=t.snapToGrid??i;return dm(u,r,f,_)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),o=Zh(n,t);return{x:o.x+s,y:o.y+i}}}),[])};function wH(e,n){const t=[],r=new Map,s=[];for(const i of e)if(i.type==="add"){s.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const o=r.get(i.id);o?o.push(i):r.set(i.id,[i])}for(const i of n){const o=r.get(i.id);if(!o){t.push(i);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){t.push({...o[0].item});continue}const a={...i};for(const l of o)Jzt(l,a);t.push(a)}return s.length&&s.forEach(i=>{i.index!==void 0?t.splice(i.index,0,{...i.item}):t.push({...i.item})}),t}function Jzt(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function eTt(e,n){return wH(e,n)}function tTt(e,n){return wH(e,n)}function af(e,n){return{id:e,type:"select",selected:n}}function nh(e,n=new Set,t=!1){const r=[];for(const[s,i]of e){const o=n.has(s);!(i.selected===void 0&&!o)&&i.selected!==o&&(t&&(i.selected=o),r.push(af(i.id,o)))}return r}function dR({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,o]of e.entries()){const a=n.get(o.id),l=((s=a==null?void 0:a.internals)==null?void 0:s.userNode)??a;l!==void 0&&l!==o&&t.push({id:o.id,item:o,type:"replace"}),l===void 0&&t.push({item:o,type:"add",index:i})}for(const[i]of n)r.get(i)===void 0&&t.push({id:i,type:"remove"});return t}function hR(e){return{id:e.id,type:"remove"}}const nTt=YF();function rTt(e,n,t={}){return WNt(e,n,{...t,onError:t.onError??nTt})}const _R=e=>ANt(e),sTt=e=>GF(e);function SH(e){return M.forwardRef(e)}const iTt=typeof window<"u"?M.useLayoutEffect:M.useEffect;function pR(e){const[n,t]=M.useState(BigInt(0)),[r]=M.useState(()=>aTt(()=>t(s=>s+BigInt(1))));return iTt(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function aTt(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const kH=M.createContext(null);function oTt({children:e}){const n=yr(),t=M.useCallback(a=>{const{nodes:l=[],setNodes:u,hasDefaultNodes:_,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:x}=n.getState();let S=l;for(const v of a)S=typeof v=="function"?v(S):v;let b=dR({items:S,lookup:p});for(const v of x.values())b=v(b);_&&u(S),b.length>0?f==null||f(b):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:y,setNodes:w}=n.getState();v&&w(y)})},[]),r=pR(t),s=M.useCallback(a=>{const{edges:l=[],setEdges:u,hasDefaultEdges:_,onEdgesChange:f,edgeLookup:p}=n.getState();let m=l;for(const x of a)m=typeof x=="function"?x(m):x;_?u(m):f&&f(dR({items:m,lookup:p}))},[]),i=pR(s),o=M.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return h.jsx(kH.Provider,{value:o,children:e})}function lTt(){const e=M.useContext(kH);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const cTt=e=>!!e.panZoom;function kk(){const e=Zzt(),n=yr(),t=lTt(),r=Sn(cTt),s=M.useMemo(()=>{const i=f=>n.getState().nodeLookup.get(f),o=f=>{t.nodeQueue.push(f)},a=f=>{t.edgeQueue.push(f)},l=f=>{var v,y;const{nodeLookup:p,nodeOrigin:m}=n.getState(),x=_R(f)?f:p.get(f.id),S=x.parentId?ZF(x.position,x.measured,x.parentId,p,m):x.position,b={...x,position:S,width:((v=x.measured)==null?void 0:v.width)??x.width,height:((y=x.measured)==null?void 0:y.height)??x.height};return wp(b)},u=(f,p,m={replace:!1})=>{o(x=>x.map(S=>{if(S.id===f){const b=typeof p=="function"?p(S):p;return m.replace&&_R(b)?b:{...S,...b}}return S}))},_=(f,p,m={replace:!1})=>{a(x=>x.map(S=>{if(S.id===f){const b=typeof p=="function"?p(S):p;return m.replace&&sTt(b)?b:{...S,...b}}return S}))};return{getNodes:()=>n.getState().nodes.map(f=>({...f})),getNode:f=>{var p;return(p=i(f))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:f=[]}=n.getState();return f.map(p=>({...p}))},getEdge:f=>n.getState().edgeLookup.get(f),setNodes:o,setEdges:a,addNodes:f=>{const p=Array.isArray(f)?f:[f];t.nodeQueue.push(m=>[...m,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];t.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:m}=n.getState(),[x,S,b]=m;return{nodes:f.map(v=>({...v})),edges:p.map(v=>({...v})),viewport:{x,y:S,zoom:b}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:x,onNodesDelete:S,onEdgesDelete:b,triggerNodeChanges:v,triggerEdgeChanges:y,onDelete:w,onBeforeDelete:C}=n.getState(),{nodes:N,edges:E}=await ONt({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:x,onBeforeDelete:C}),j=E.length>0,z=N.length>0;if(j){const R=E.map(hR);b==null||b(E),y(R)}if(z){const R=N.map(hR);S==null||S(N),v(R)}return(z||j)&&(w==null||w({nodes:N,edges:E})),{deletedNodes:N,deletedEdges:E}},getIntersectingNodes:(f,p=!0,m)=>{const x=qA(f),S=x?f:l(f),b=m!==void 0;return S?(m||n.getState().nodes).filter(v=>{const y=n.getState().nodeLookup.get(v.id);if(y&&!x&&(v.id===f.id||!y.internals.positionAbsolute))return!1;const w=wp(b?v:y),C=Ov(w,S);return p&&C>0||C>=w.width*w.height||C>=S.width*S.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const S=qA(f)?f:l(f);if(!S)return!1;const b=Ov(S,p);return m&&b>0||b>=p.width*p.height||b>=S.width*S.height},updateNode:u,updateNodeData:(f,p,m={replace:!1})=>{u(f,x=>{const S=typeof p=="function"?p(x):p;return m.replace?{...x,data:S}:{...x,data:{...x.data,...S}}},m)},updateEdge:_,updateEdgeData:(f,p,m={replace:!1})=>{_(f,x=>{const S=typeof p=="function"?p(x):p;return m.replace?{...x,data:S}:{...x,data:{...x.data,...S}}},m)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return RNt(f,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:f,id:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}-${f}${p?`-${p}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:f,handleId:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}${f?p?`-${f}-${p}`:`-${f}`:""}`))==null?void 0:x.values())??[])},fitView:async f=>{const p=n.getState().fitViewResolver??$Nt();return n.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),t.nodeQueue.push(m=>[...m]),p.promise}}},[]);return M.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const mR=e=>e.selected,uTt=typeof window<"u"?window:void 0;function fTt({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=yr(),{deleteElements:r}=kk(),s=kp(e,{actInsideInputWithModifier:!1}),i=kp(n,{target:uTt});M.useEffect(()=>{if(s){const{edges:o,nodes:a}=t.getState();r({nodes:a.filter(mR),edges:o.filter(mR)}),t.setState({nodesSelectionActive:!1})}},[s]),M.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function dTt(e){const n=yr();M.useEffect(()=>{const t=()=>{var s,i,o,a;if(!e.current||!(((i=(s=e.current).checkVisibility)==null?void 0:i.call(s))??!0))return!1;const r=vk(e.current);(r.height===0||r.width===0)&&((a=(o=n.getState()).onError)==null||a.call(o,"004",no.error004())),n.setState({width:r.width||500,height:r.height||500})};if(e.current){t(),window.addEventListener("resize",t);const r=new ResizeObserver(()=>t());return r.observe(e.current),()=>{window.removeEventListener("resize",t),r&&e.current&&r.unobserve(e.current)}}},[])}const ry={position:"absolute",width:"100%",height:"100%",top:0,left:0},hTt=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function _Tt({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=Rf.Free,zoomOnDoubleClick:o=!0,panOnDrag:a=!0,defaultViewport:l,translateExtent:u,minZoom:_,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:x,noWheelClassName:S,noPanClassName:b,onViewportChange:v,isControlledViewport:y,paneClickDistance:w,selectionOnDrag:C}){const N=yr(),E=M.useRef(null),{userSelectionActive:j,lib:z,connectionInProgress:R}=Sn(hTt,vr),O=kp(p),I=M.useRef();dTt(E);const F=M.useCallback(U=>{v==null||v({x:U[0],y:U[1],zoom:U[2]}),y||N.setState({transform:U})},[v,y]);return M.useEffect(()=>{if(E.current){I.current=wzt({domNode:E.current,minZoom:_,maxZoom:f,translateExtent:u,viewport:l,onDraggingChange:V=>N.setState(Z=>Z.paneDragging===V?Z:{paneDragging:V}),onPanZoomStart:(V,Z)=>{const{onViewportChangeStart:te,onMoveStart:P}=N.getState();P==null||P(V,Z),te==null||te(Z)},onPanZoom:(V,Z)=>{const{onViewportChange:te,onMove:P}=N.getState();P==null||P(V,Z),te==null||te(Z)},onPanZoomEnd:(V,Z)=>{const{onViewportChangeEnd:te,onMoveEnd:P}=N.getState();P==null||P(V,Z),te==null||te(Z)}});const{x:U,y:q,zoom:Y}=I.current.getViewport();return N.setState({panZoom:I.current,transform:[U,q,Y],domNode:E.current.closest(".react-flow")}),()=>{var V;(V=I.current)==null||V.destroy()}}},[]),M.useEffect(()=>{var U;(U=I.current)==null||U.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:i,zoomOnDoubleClick:o,panOnDrag:a,zoomActivationKeyPressed:O,preventScrolling:m,noPanClassName:b,userSelectionActive:j,noWheelClassName:S,lib:z,onTransformChange:F,connectionInProgress:R,selectionOnDrag:C,paneClickDistance:w})},[e,n,t,r,s,i,o,a,O,m,b,j,S,z,F,R,C,w]),h.jsx("div",{className:"react-flow__renderer",ref:E,style:ry,children:x})}const pTt=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function mTt(){const{userSelectionActive:e,userSelectionRect:n}=Sn(pTt,vr);return e&&n?h.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const Iw=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},gTt=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function vTt({isSelecting:e,selectionKeyPressed:n,selectionMode:t=xp.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:o,onSelectionStart:a,onSelectionEnd:l,onPaneClick:u,onPaneContextMenu:_,onPaneScroll:f,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:x,children:S}){const b=M.useRef(0),v=yr(),{userSelectionActive:y,elementsSelectable:w,dragging:C,panBy:N,autoPanSpeed:E}=Sn(gTt,vr),j=w&&(e||y),z=M.useRef(null),R=M.useRef(),O=M.useRef(new Set),I=M.useRef(new Set),F=M.useRef(!1),U=M.useRef(!1),q=M.useRef({x:0,y:0}),Y=M.useRef(!1),V=Q=>{if(U.current||F.current||v.getState().connection.inProgress){U.current=!1,F.current=!1;return}u==null||u(Q),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},Z=Q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){Q.preventDefault();return}_==null||_(Q)},te=f?Q=>f(Q):void 0,P=Q=>{U.current&&(Q.stopPropagation(),U.current=!1)},L=Q=>{var $e,ut;const{domNode:ce,transform:ee}=v.getState();if(R.current=ce==null?void 0:ce.getBoundingClientRect(),!R.current)return;const ue=Q.target===z.current;if(!ue&&!!Q.target.closest(".nokey")||!e||!(o&&ue||n)||Q.button!==0||!Q.isPrimary)return;(ut=($e=Q.target)==null?void 0:$e.setPointerCapture)==null||ut.call($e,Q.pointerId),U.current=!1;const{x:Ae,y:Ve}=Za(Q.nativeEvent,R.current),Ge=dm({x:Ae,y:Ve},ee);v.setState({userSelectionRect:{width:0,height:0,startX:Ge.x,startY:Ge.y,x:Ae,y:Ve}}),ue||(Q.stopPropagation(),Q.preventDefault())};function $(Q,ce){const{userSelectionRect:ee}=v.getState();if(!ee)return;const{transform:ue,nodeLookup:de,edgeLookup:ye,connectionLookup:Ae,triggerNodeChanges:Ve,triggerEdgeChanges:Ge,defaultEdgeOptions:$e}=v.getState(),ut={x:ee.startX,y:ee.startY},{x:pt,y:Ut}=Zh(ut,ue),It={startX:ut.x,startY:ut.y,x:QAt.id)),I.current=new Set;const mt=($e==null?void 0:$e.selectable)??!0;for(const At of O.current){const ke=Ae.get(At);if(ke)for(const{edgeId:De}of ke.values()){const We=ye.get(De);We&&(We.selectable??mt)&&I.current.add(De)}}if(!UA($t,O.current)){const At=nh(de,O.current,!0);Ve(At)}if(!UA(tt,I.current)){const At=nh(ye,I.current);Ge(At)}v.setState({userSelectionRect:It,userSelectionActive:!0,nodesSelectionActive:!1})}function H(){if(!s||!R.current)return;const[Q,ce]=mk(q.current,R.current,E);N({x:Q,y:ce}).then(ee=>{if(!U.current||!ee){b.current=requestAnimationFrame(H);return}const{x:ue,y:de}=q.current;$(ue,de),b.current=requestAnimationFrame(H)})}const G=()=>{cancelAnimationFrame(b.current),b.current=0,Y.current=!1};M.useEffect(()=>()=>G(),[]);const ne=Q=>{const{userSelectionRect:ce,transform:ee,resetSelectedElements:ue}=v.getState();if(!R.current||!ce)return;const{x:de,y:ye}=Za(Q.nativeEvent,R.current);q.current={x:de,y:ye};const Ae=Zh({x:ce.startX,y:ce.startY},ee);if(!U.current){const Ve=n?0:i;if(Math.hypot(de-Ae.x,ye-Ae.y)<=Ve)return;ue(),a==null||a(Q)}U.current=!0,Y.current||(H(),Y.current=!0),$(de,ye)},oe=Q=>{var ce,ee;if(!j){Q.target===z.current&&v.getState().connection.inProgress&&(F.current=!0);return}Q.button===0&&((ee=(ce=Q.target)==null?void 0:ce.releasePointerCapture)==null||ee.call(ce,Q.pointerId),!y&&Q.target===z.current&&v.getState().userSelectionRect&&(V==null||V(Q)),v.setState({userSelectionActive:!1,userSelectionRect:null}),U.current&&(l==null||l(Q),v.setState({nodesSelectionActive:O.current.size>0})),G())},le=Q=>{var ce,ee;(ee=(ce=Q.target)==null?void 0:ce.releasePointerCapture)==null||ee.call(ce,Q.pointerId),G()},se=r===!0||Array.isArray(r)&&r.includes(0);return h.jsxs("div",{className:is(["react-flow__pane",{draggable:se,dragging:C,selection:e}]),onClick:j?void 0:Iw(V,z),onContextMenu:Iw(Z,z),onWheel:Iw(te,z),onPointerEnter:j?void 0:p,onPointerMove:j?ne:m,onPointerUp:oe,onPointerCancel:j?le:void 0,onPointerDownCapture:j?L:void 0,onClickCapture:j?P:void 0,onPointerLeave:x,ref:z,style:ry,children:[S,h.jsx(mTt,{})]})}function u3({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:i,multiSelectionActive:o,nodeLookup:a,onError:l}=n.getState(),u=a.get(e);if(!u){l==null||l("012",no.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&o)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var _;return(_=r==null?void 0:r.current)==null?void 0:_.blur()})):s([e])}function CH({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:o}){const a=yr(),[l,u]=M.useState(!1),_=M.useRef();return M.useEffect(()=>{_.current=lzt({getStoreItems:()=>a.getState(),onNodeMouseDown:f=>{u3({id:f,store:a,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),M.useEffect(()=>{if(!(n||!e.current||!_.current))return _.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:o}),()=>{var f;(f=_.current)==null||f.destroy()}},[t,r,n,i,e,s,o]),l}const bTt=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function EH(){const e=yr();return M.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:o,onError:a,updateNodePositions:l,nodeLookup:u,nodeOrigin:_}=e.getState(),f=new Map,p=bTt(o),m=s?i[0]:5,x=s?i[1]:5,S=t.direction.x*m*t.factor,b=t.direction.y*x*t.factor;for(const[,v]of u){if(!p(v))continue;let y={x:v.internals.positionAbsolute.x+S,y:v.internals.positionAbsolute.y+b};s&&(y=fm(y,i));const{position:w,positionAbsolute:C}=WF({nodeId:v.id,nextPosition:y,nodeLookup:u,nodeExtent:r,nodeOrigin:_,onError:a});v.position=w,v.internals.positionAbsolute=C,f.set(v.id,v)}l(f)},[])}const Ck=M.createContext(null),yTt=Ck.Provider;Ck.Consumer;const NH=()=>M.useContext(Ck),xTt=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),zH=M.createContext(null);function wTt({children:e}){const n=Sn(xTt,vr);return h.jsx(zH.Provider,{value:n,children:e})}function STt(){const e=M.useContext(zH);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const kTt={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},CTt=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:o}=r,{fromHandle:a,toHandle:l,isValid:u}=o;if(!a&&!s)return kTt;const _=(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===t;return{connectingFrom:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===n&&(a==null?void 0:a.type)===t,connectingTo:_,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===Yh.Strict?(a==null?void 0:a.type)!==t:e!==(a==null?void 0:a.nodeId)||n!==(a==null?void 0:a.id),connectionInProcess:!!a,clickConnectionInProcess:!!s,valid:_&&u}};function ETt({type:e="source",position:n=kt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:o,onConnect:a,children:l,className:u,onMouseDown:_,onTouchStart:f,...p},m){var Y,V;const x=o||null,S=e==="target",b=yr(),v=NH(),{connectOnClick:y,noPanClassName:w,rfId:C}=STt(),{connectingFrom:N,connectingTo:E,clickConnecting:j,isPossibleEndHandle:z,connectionInProcess:R,clickConnectionInProcess:O,valid:I}=Sn(CTt(v,x,e),vr);v||(V=(Y=b.getState()).onError)==null||V.call(Y,"010",no.error010());const F=Z=>{const{defaultEdgeOptions:te,onConnect:P,hasDefaultEdges:L}=b.getState(),$={...te,...Z};if(L){const{edges:H,setEdges:G,onError:ne}=b.getState();G(rTt($,H,{onError:ne}))}P==null||P($),a==null||a($)},U=Z=>{if(!v)return;const te=tH(Z.nativeEvent);if(s&&(te&&Z.button===0||!te)){const P=b.getState();c3.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:P.autoPanOnConnect,connectionMode:P.connectionMode,connectionRadius:P.connectionRadius,domNode:P.domNode,nodeLookup:P.nodeLookup,lib:P.lib,isTarget:S,handleId:x,nodeId:v,flowId:P.rfId,panBy:P.panBy,cancelConnection:P.cancelConnection,onConnectStart:P.onConnectStart,onConnectEnd:(...L)=>{var $,H;return(H=($=b.getState()).onConnectEnd)==null?void 0:H.call($,...L)},updateConnection:P.updateConnection,onConnect:F,isValidConnection:t||((...L)=>{var $,H;return((H=($=b.getState()).isValidConnection)==null?void 0:H.call($,...L))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:P.autoPanSpeed,dragThreshold:P.connectionDragThreshold})}te?_==null||_(Z):f==null||f(Z)},q=Z=>{const{onClickConnectStart:te,onClickConnectEnd:P,connectionClickStartHandle:L,connectionMode:$,isValidConnection:H,lib:G,rfId:ne,nodeLookup:oe,connection:le}=b.getState();if(!v||!L&&!s)return;if(!L){te==null||te(Z.nativeEvent,{nodeId:v,handleId:x,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:v,type:e,id:x}});return}const se=JF(Z.target),Q=t||H,{connection:ce,isValid:ee}=c3.isValid(Z.nativeEvent,{handle:{nodeId:v,id:x,type:e},connectionMode:$,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:Q,flowId:ne,doc:se,lib:G,nodeLookup:oe});ee&&ce&&F(ce);const ue=structuredClone(le);delete ue.inProgress,ue.toPosition=ue.toHandle?ue.toHandle.position:null,P==null||P(Z,ue),b.setState({connectionClickStartHandle:null})};return h.jsx("div",{"data-handleid":x,"data-nodeid":v,"data-handlepos":n,"data-id":`${C}-${v}-${x}-${e}`,className:is(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",w,u,{source:!S,target:S,connectable:r,connectablestart:s,connectableend:i,clickconnecting:j,connectingfrom:N,connectingto:E,valid:I,connectionindicator:r&&(!R||z)&&(R||O?i:s)}]),onMouseDown:U,onTouchStart:U,onClick:y?q:void 0,ref:m,...p,children:l})}const gu=M.memo(SH(ETt));function NTt({data:e,isConnectable:n,sourcePosition:t=kt.Bottom}){return h.jsxs(h.Fragment,{children:[e==null?void 0:e.label,h.jsx(gu,{type:"source",position:t,isConnectable:n})]})}function zTt({data:e,isConnectable:n,targetPosition:t=kt.Top,sourcePosition:r=kt.Bottom}){return h.jsxs(h.Fragment,{children:[h.jsx(gu,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,h.jsx(gu,{type:"source",position:r,isConnectable:n})]})}function TTt(){return null}function jTt({data:e,isConnectable:n,targetPosition:t=kt.Top}){return h.jsxs(h.Fragment,{children:[h.jsx(gu,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Iv={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},gR={input:NTt,default:zTt,output:jTt,group:TTt};function ATt(e){var n,t,r,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((n=e.style)==null?void 0:n.width),height:e.height??e.initialHeight??((t=e.style)==null?void 0:t.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const RTt=e=>{const{width:n,height:t,x:r,y:s}=um(e.nodeLookup,{filter:i=>!!i.selected});return{width:Xa(n)?n:null,height:Xa(t)?t:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${s}px)`}};function MTt({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=yr(),{width:s,height:i,transformString:o,userSelectionActive:a}=Sn(RTt,vr),l=EH(),u=M.useRef(null);M.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const _=!a&&s!==null&&i!==null;if(CH({nodeRef:u,disabled:!_}),!_)return null;const f=e?m=>{const x=r.getState().nodes.filter(S=>S.selected);e(m,x)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Iv,m.key)&&(m.preventDefault(),l({direction:Iv[m.key],factor:m.shiftKey?4:1}))};return h.jsx("div",{className:is(["react-flow__nodesselection","react-flow__container",n]),style:{transform:o},children:h.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:t?void 0:-1,onKeyDown:t?void 0:p,style:{width:s,height:i}})})}const vR=typeof window<"u"?window:void 0,DTt=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function TH({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:o,paneClickDistance:a,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:_,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:S,zoomActivationKeyCode:b,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:w,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:z,autoPanOnSelection:R,defaultViewport:O,translateExtent:I,minZoom:F,maxZoom:U,preventScrolling:q,onSelectionContextMenu:Y,noWheelClassName:V,noPanClassName:Z,disableKeyboardA11y:te,onViewportChange:P,isControlledViewport:L}){const{nodesSelectionActive:$,userSelectionActive:H}=Sn(DTt,vr),G=kp(u,{target:vR}),ne=kp(S,{target:vR}),oe=ne||z,le=ne||C,se=_&&oe!==!0,Q=G||H||se;return fTt({deleteKeyCode:l,multiSelectionKeyCode:x}),h.jsx(_Tt,{onPaneContextMenu:i,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:w,panOnScroll:le,panOnScrollSpeed:N,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:!G&&oe,defaultViewport:O,translateExtent:I,minZoom:F,maxZoom:U,zoomActivationKeyCode:b,preventScrolling:q,noWheelClassName:V,noPanClassName:Z,onViewportChange:P,isControlledViewport:L,paneClickDistance:a,selectionOnDrag:se,children:h.jsxs(vTt,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:o,panOnDrag:oe,autoPanOnSelection:R,isSelecting:!!Q,selectionMode:f,selectionKeyPressed:G,paneClickDistance:a,selectionOnDrag:se,children:[e,$&&h.jsx(MTt,{onSelectionContextMenu:Y,noPanClassName:Z,disableKeyboardA11y:te})]})})}TH.displayName="FlowRenderer";const LTt=M.memo(TH),OTt=e=>n=>e?pk(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(t=>t.id):Array.from(n.nodeLookup.keys());function ITt(e){return Sn(M.useCallback(OTt(e),[e]),vr)}const BTt=e=>e.updateNodeInternals;function $Tt(){const e=Sn(BTt),[n]=M.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const i=s.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:s.target,force:!0})}),e(r)}));return M.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function PTt({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=yr(),i=M.useRef(null),o=M.useRef(null),a=M.useRef(e.sourcePosition),l=M.useRef(e.targetPosition),u=M.useRef(n),_=t&&!!e.internals.handleBounds;return M.useEffect(()=>{i.current&&!e.hidden&&(!_||o.current!==i.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(i.current),o.current=i.current)},[_,e.hidden]),M.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),M.useEffect(()=>{if(i.current){const f=u.current!==n,p=a.current!==e.sourcePosition,m=l.current!==e.targetPosition;(f||p||m)&&(u.current=n,a.current=e.sourcePosition,l.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),i}function FTt({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:o,nodesDraggable:a,elementsSelectable:l,nodesConnectable:u,nodesFocusable:_,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:x,rfId:S,nodeTypes:b,nodeClickDistance:v,onError:y}){const{node:w,internals:C,isParent:N}=Sn(Q=>{const ce=Q.nodeLookup.get(e),ee=Q.parentLookup.has(e);return{node:ce,internals:ce.internals,isParent:ee}},vr);let E=w.type||"default",j=(b==null?void 0:b[E])||gR[E];j===void 0&&(y==null||y("003",no.error003(E)),E="default",j=(b==null?void 0:b.default)||gR.default);const z=!!(w.draggable||a&&typeof w.draggable>"u"),R=!!(w.selectable||l&&typeof w.selectable>"u"),O=!!(w.connectable||u&&typeof w.connectable>"u"),I=!!(w.focusable||_&&typeof w.focusable>"u"),F=yr(),U=XF(w),q=PTt({node:w,nodeType:E,hasDimensions:U,resizeObserver:f}),Y=CH({nodeRef:q,disabled:w.hidden||!z,noDragClassName:p,handleSelector:w.dragHandle,nodeId:e,isSelectable:R,nodeClickDistance:v}),V=EH();if(w.hidden)return null;const Z=ec(w),te=ATt(w),P=R||z||n||t||r||s,L=t?Q=>t(Q,{...C.userNode}):void 0,$=r?Q=>r(Q,{...C.userNode}):void 0,H=s?Q=>s(Q,{...C.userNode}):void 0,G=i?Q=>i(Q,{...C.userNode}):void 0,ne=o?Q=>o(Q,{...C.userNode}):void 0,oe=Q=>{const{selectNodesOnDrag:ce,nodeDragThreshold:ee}=F.getState();R&&(!ce||!z||ee>0)&&u3({id:e,store:F,nodeRef:q}),n&&n(Q,{...C.userNode})},le=Q=>{if(!(eH(Q.nativeEvent)||x)){if(FF.includes(Q.key)&&R){const ce=Q.key==="Escape";u3({id:e,store:F,unselect:ce,nodeRef:q})}else if(z&&w.selected&&Object.prototype.hasOwnProperty.call(Iv,Q.key)){Q.preventDefault();const{ariaLabelConfig:ce}=F.getState();F.setState({ariaLiveMessage:ce["node.a11yDescription.ariaLiveMessage"]({direction:Q.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),V({direction:Iv[Q.key],factor:Q.shiftKey?4:1})}}},se=()=>{var Ae;if(x||!((Ae=q.current)!=null&&Ae.matches(":focus-visible")))return;const{transform:Q,width:ce,height:ee,autoPanOnNodeFocus:ue,setCenter:de}=F.getState();if(!ue)return;pk(new Map([[e,w]]),{x:0,y:0,width:ce,height:ee},Q,!0).length>0||de(w.position.x+Z.width/2,w.position.y+Z.height/2,{zoom:Q[2]})};return h.jsx("div",{className:is(["react-flow__node",`react-flow__node-${E}`,{[m]:z},w.className,{selected:w.selected,selectable:R,parent:N,draggable:z,dragging:Y}]),ref:q,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:U?"visible":"hidden",...w.style,...te},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:$,onMouseLeave:H,onContextMenu:G,onClick:oe,onDoubleClick:ne,onKeyDown:I?le:void 0,tabIndex:I?0:void 0,onFocus:I?se:void 0,role:w.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${bH}-${S}`,"aria-label":w.ariaLabel,...w.domAttributes,children:h.jsx(yTt,{value:e,children:h.jsx(j,{id:e,data:w.data,type:E,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:w.selected??!1,selectable:R,draggable:z,deletable:w.deletable??!0,isConnectable:O,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:Y,dragHandle:w.dragHandle,zIndex:C.z,parentId:w.parentId,...Z})})})}var HTt=M.memo(FTt);const qTt=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function jH(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=Sn(qTt,vr),o=ITt(e.onlyRenderVisibleElements),a=$Tt();return h.jsx("div",{className:"react-flow__nodes",style:ry,children:o.map(l=>h.jsx(HTt,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:a,nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:i},l))})}jH.displayName="NodeRenderer";const UTt=M.memo(jH);function GTt(e){return Sn(M.useCallback(t=>{if(!e)return t.edges.map(s=>s.id);const r=[];if(t.width&&t.height)for(const s of t.edges){const i=t.nodeLookup.get(s.source),o=t.nodeLookup.get(s.target);i&&o&&qNt({sourceNode:i,targetNode:o,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),vr)}const WTt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return h.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},VTt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return h.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},bR={[Dv.Arrow]:WTt,[Dv.ArrowClosed]:VTt};function KTt(e){const n=yr();return M.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(bR,e)?bR[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",no.error009(e)),null)},[e])}const QTt=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:i="strokeWidth",strokeWidth:o,orient:a="auto-start-reverse"})=>{const l=KTt(n);return l?h.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:a,refX:"0",refY:"0",children:h.jsx(l,{color:t,strokeWidth:o})}):null},AH=({defaultColor:e,rfId:n})=>{const t=Sn(i=>i.edges),r=Sn(i=>i.defaultEdgeOptions),s=M.useMemo(()=>XNt(t,{id:n,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[t,r,n,e]);return s.length?h.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:h.jsx("defs",{children:s.map(i=>h.jsx(QTt,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};AH.displayName="MarkerDefinitions";var YTt=M.memo(AH);function RH({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:o=[2,4],labelBgBorderRadius:a=2,children:l,className:u,..._}){const[f,p]=M.useState({x:1,y:0,width:0,height:0}),m=is(["react-flow__edge-textwrapper",u]),x=M.useRef(null);return M.useEffect(()=>{if(x.current){const S=x.current.getBBox();p({x:S.x,y:S.y,width:S.width,height:S.height})}},[t]),t?h.jsxs("g",{transform:`translate(${e-f.width/2} ${n-f.height/2})`,className:m,visibility:f.width?"visible":"hidden",..._,children:[s&&h.jsx("rect",{width:f.width+2*o[0],x:-o[0],y:-o[1],height:f.height+2*o[1],className:"react-flow__edge-textbg",style:i,rx:a,ry:a}),h.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:x,style:r,children:t}),l]}):null}RH.displayName="EdgeText";const XTt=M.memo(RH);function sy({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:o,labelBgPadding:a,labelBgBorderRadius:l,interactionWidth:u=20,..._}){return h.jsxs(h.Fragment,{children:[h.jsx("path",{..._,d:e,fill:"none",className:is(["react-flow__edge-path",_.className])}),u?h.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&Xa(n)&&Xa(t)?h.jsx(XTt,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:o,labelBgPadding:a,labelBgBorderRadius:l}):null]})}function yR({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===kt.Left||e===kt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function MH({sourceX:e,sourceY:n,sourcePosition:t=kt.Bottom,targetX:r,targetY:s,targetPosition:i=kt.Top}){const[o,a]=yR({pos:t,x1:e,y1:n,x2:r,y2:s}),[l,u]=yR({pos:i,x1:r,y1:s,x2:e,y2:n}),[_,f,p,m]=nH({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:a,targetControlX:l,targetControlY:u});return[`M${e},${n} C${o},${a} ${l},${u} ${r},${s}`,_,f,p,m]}function DH(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:o,targetPosition:a,label:l,labelStyle:u,labelShowBg:_,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:S,markerStart:b,interactionWidth:v})=>{const[y,w,C]=MH({sourceX:t,sourceY:r,sourcePosition:o,targetX:s,targetY:i,targetPosition:a}),N=e.isInternal?void 0:n;return h.jsx(sy,{id:N,path:y,labelX:w,labelY:C,label:l,labelStyle:u,labelShowBg:_,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:S,markerStart:b,interactionWidth:v})})}const ZTt=DH({isInternal:!1}),LH=DH({isInternal:!0});ZTt.displayName="SimpleBezierEdge";LH.displayName="SimpleBezierEdgeInternal";function OH(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:_,labelBgBorderRadius:f,style:p,sourcePosition:m=kt.Bottom,targetPosition:x=kt.Top,markerEnd:S,markerStart:b,pathOptions:v,interactionWidth:y})=>{const[w,C,N]=a3({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:x,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),E=e.isInternal?void 0:n;return h.jsx(sy,{id:E,path:w,labelX:C,labelY:N,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:_,labelBgBorderRadius:f,style:p,markerEnd:S,markerStart:b,interactionWidth:y})})}const IH=OH({isInternal:!1}),BH=OH({isInternal:!0});IH.displayName="SmoothStepEdge";BH.displayName="SmoothStepEdgeInternal";function $H(e){return M.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return h.jsx(IH,{...t,id:r,pathOptions:M.useMemo(()=>{var i;return{borderRadius:0,offset:(i=t.pathOptions)==null?void 0:i.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const JTt=$H({isInternal:!1}),PH=$H({isInternal:!0});JTt.displayName="StepEdge";PH.displayName="StepEdgeInternal";function FH(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:_,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:x,interactionWidth:S})=>{const[b,v,y]=iH({sourceX:t,sourceY:r,targetX:s,targetY:i}),w=e.isInternal?void 0:n;return h.jsx(sy,{id:w,path:b,labelX:v,labelY:y,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:_,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:x,interactionWidth:S})})}const ejt=FH({isInternal:!1}),HH=FH({isInternal:!0});ejt.displayName="StraightEdge";HH.displayName="StraightEdgeInternal";function qH(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:o=kt.Bottom,targetPosition:a=kt.Top,label:l,labelStyle:u,labelShowBg:_,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:S,markerStart:b,pathOptions:v,interactionWidth:y})=>{const[w,C,N]=rH({sourceX:t,sourceY:r,sourcePosition:o,targetX:s,targetY:i,targetPosition:a,curvature:v==null?void 0:v.curvature}),E=e.isInternal?void 0:n;return h.jsx(sy,{id:E,path:w,labelX:C,labelY:N,label:l,labelStyle:u,labelShowBg:_,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:S,markerStart:b,interactionWidth:y})})}const tjt=qH({isInternal:!1}),UH=qH({isInternal:!0});tjt.displayName="BezierEdge";UH.displayName="BezierEdgeInternal";const xR={default:UH,straight:HH,step:PH,smoothstep:BH,simplebezier:LH},wR={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},njt=(e,n,t)=>t===kt.Left?e-n:t===kt.Right?e+n:e,rjt=(e,n,t)=>t===kt.Top?e-n:t===kt.Bottom?e+n:e,SR="react-flow__edgeupdater";function kR({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:i,onMouseOut:o,type:a}){return h.jsx("circle",{onMouseDown:s,onMouseEnter:i,onMouseOut:o,className:is([SR,`${SR}-${a}`]),cx:njt(n,r,e),cy:rjt(t,r,e),r,stroke:"transparent",fill:"transparent"})}function sjt({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:o,sourcePosition:a,targetPosition:l,onReconnect:u,onReconnectStart:_,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const x=yr(),S=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:E,domNode:j,connectionMode:z,connectionRadius:R,lib:O,onConnectStart:I,cancelConnection:F,nodeLookup:U,rfId:q,panBy:Y,updateConnection:V}=x.getState(),Z=N.type==="target",te=($,H)=>{p(!1),f==null||f($,t,N.type,H)},P=$=>u==null?void 0:u(t,$),L=($,H)=>{p(!0),_==null||_(C,t,N.type),I==null||I($,H)};c3.onPointerDown(C.nativeEvent,{autoPanOnConnect:E,connectionMode:z,connectionRadius:R,domNode:j,handleId:N.id,nodeId:N.nodeId,nodeLookup:U,isTarget:Z,edgeUpdaterType:N.type,lib:O,flowId:q,cancelConnection:F,panBy:Y,isValidConnection:(...$)=>{var H,G;return((G=(H=x.getState()).isValidConnection)==null?void 0:G.call(H,...$))??!0},onConnect:P,onConnectStart:L,onConnectEnd:(...$)=>{var H,G;return(G=(H=x.getState()).onConnectEnd)==null?void 0:G.call(H,...$)},onReconnectEnd:te,updateConnection:V,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},b=C=>S(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),v=C=>S(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),y=()=>m(!0),w=()=>m(!1);return h.jsxs(h.Fragment,{children:[(e===!0||e==="source")&&h.jsx(kR,{position:a,centerX:r,centerY:s,radius:n,onMouseDown:b,onMouseEnter:y,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&h.jsx(kR,{position:l,centerX:i,centerY:o,radius:n,onMouseDown:v,onMouseEnter:y,onMouseOut:w,type:"target"})]})}function ijt({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:o,onMouseEnter:a,onMouseMove:l,onMouseLeave:u,reconnectRadius:_,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:x,edgeTypes:S,noPanClassName:b,onError:v,disableKeyboardA11y:y}){let w=Sn(de=>de.edgeLookup.get(e));const C=Sn(de=>de.defaultEdgeOptions);w=C?{...C,...w}:w;let N=w.type||"default",E=(S==null?void 0:S[N])||xR[N];E===void 0&&(v==null||v("011",no.error011(N)),N="default",E=(S==null?void 0:S.default)||xR.default);const j=!!(w.focusable||n&&typeof w.focusable>"u"),z=typeof f<"u"&&(w.reconnectable||t&&typeof w.reconnectable>"u"),R=!!(w.selectable||r&&typeof w.selectable>"u"),O=M.useRef(null),[I,F]=M.useState(!1),[U,q]=M.useState(!1),Y=yr(),{zIndex:V=w.zIndex,sourceX:Z,sourceY:te,targetX:P,targetY:L,sourcePosition:$,targetPosition:H}=Sn(M.useCallback(de=>{const ye=de.nodeLookup.get(w.source),Ae=de.nodeLookup.get(w.target);if(!ye||!Ae)return wR;const Ve=YNt({id:e,sourceNode:ye,targetNode:Ae,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:de.connectionMode,onError:v}),Ge=HNt({selected:w.selected,zIndex:w.zIndex,sourceNode:ye,targetNode:Ae,elevateOnSelect:de.elevateEdgesOnSelect,zIndexMode:de.zIndexMode});return{...Ve||wR,zIndex:Ge}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),vr),G=M.useMemo(()=>w.markerStart?`url('#${o3(w.markerStart,x)}')`:void 0,[w.markerStart,x]),ne=M.useMemo(()=>w.markerEnd?`url('#${o3(w.markerEnd,x)}')`:void 0,[w.markerEnd,x]);if(w.hidden||Z===null||te===null||P===null||L===null)return null;const oe=de=>{var Ge;const{addSelectedEdges:ye,unselectNodesAndEdges:Ae,multiSelectionActive:Ve}=Y.getState();R&&(Y.setState({nodesSelectionActive:!1}),w.selected&&Ve?(Ae({nodes:[],edges:[w]}),(Ge=O.current)==null||Ge.blur()):ye([e])),s&&s(de,w)},le=i?de=>{i(de,{...w})}:void 0,se=o?de=>{o(de,{...w})}:void 0,Q=a?de=>{a(de,{...w})}:void 0,ce=l?de=>{l(de,{...w})}:void 0,ee=u?de=>{u(de,{...w})}:void 0,ue=de=>{var ye;if(!y&&FF.includes(de.key)&&R){const{unselectNodesAndEdges:Ae,addSelectedEdges:Ve}=Y.getState();de.key==="Escape"?((ye=O.current)==null||ye.blur(),Ae({edges:[w]})):Ve([e])}};return h.jsx("svg",{style:{zIndex:V},children:h.jsxs("g",{className:is(["react-flow__edge",`react-flow__edge-${N}`,w.className,b,{selected:w.selected,animated:w.animated,inactive:!R&&!s,updating:I,selectable:R}]),onClick:oe,onDoubleClick:le,onContextMenu:se,onMouseEnter:Q,onMouseMove:ce,onMouseLeave:ee,onKeyDown:j?ue:void 0,tabIndex:j?0:void 0,role:w.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":j?`${yH}-${x}`:void 0,ref:O,...w.domAttributes,children:[!U&&h.jsx(E,{id:e,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:R,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:Z,sourceY:te,targetX:P,targetY:L,sourcePosition:$,targetPosition:H,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:G,markerEnd:ne,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),z&&h.jsx(sjt,{edge:w,isReconnectable:z,reconnectRadius:_,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:Z,sourceY:te,targetX:P,targetY:L,sourcePosition:$,targetPosition:H,setUpdateHover:F,setReconnecting:q})]})})}var ajt=M.memo(ijt);const ojt=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function GH({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:o,onEdgeMouseEnter:a,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:_,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,disableKeyboardA11y:S}){const{edgesFocusable:b,edgesReconnectable:v,elementsSelectable:y,onError:w}=Sn(ojt,vr),C=GTt(n);return h.jsxs("div",{className:"react-flow__edges",children:[h.jsx(YTt,{defaultColor:e,rfId:t}),C.map(N=>h.jsx(ajt,{id:N,edgesFocusable:b,edgesReconnectable:v,elementsSelectable:y,noPanClassName:s,onReconnect:i,onContextMenu:o,onMouseEnter:a,onMouseMove:l,onMouseLeave:u,onClick:_,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,rfId:t,onError:w,edgeTypes:r,disableKeyboardA11y:S},N))]})}GH.displayName="EdgeRenderer";const ljt=M.memo(GH),cjt=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function ujt({children:e}){const n=Sn(cjt);return h.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function fjt(e){const n=kk(),t=M.useRef(!1);M.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const djt=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function hjt(e){const n=Sn(djt),t=yr();return M.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function _jt(e){return e.connection.inProgress?{...e.connection,to:dm(e.connection.to,e.transform)}:{...e.connection}}function pjt(e){return _jt}function mjt(e){const n=pjt();return Sn(n,vr)}const gjt=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function vjt({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:o,isValid:a,inProgress:l}=Sn(gjt,vr);return!(i&&s&&l)?null:h.jsx("svg",{style:e,width:i,height:o,className:"react-flow__connectionline react-flow__container",children:h.jsx("g",{className:is(["react-flow__connection",UF(a)]),children:h.jsx(WH,{style:n,type:t,CustomComponent:r,isValid:a})})})}const WH=({style:e,type:n=Wc.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:o,fromHandle:a,fromPosition:l,to:u,toNode:_,toHandle:f,toPosition:p,pointer:m}=mjt();if(!s)return;if(t)return h.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:o,fromHandle:a,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:p,connectionStatus:UF(r),toNode:_,toHandle:f,pointer:m});let x="";const S={sourceX:i.x,sourceY:i.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case Wc.Bezier:[x]=rH(S);break;case Wc.SimpleBezier:[x]=MH(S);break;case Wc.Step:[x]=a3({...S,borderRadius:0});break;case Wc.SmoothStep:[x]=a3(S);break;default:[x]=iH(S)}return h.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};WH.displayName="ConnectionLine";const bjt={};function CR(e=bjt){M.useRef(e),yr(),M.useEffect(()=>{},[e])}function yjt(){yr(),M.useRef(!1),M.useEffect(()=>{},[])}function VH({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:o,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:_,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:x,connectionLineStyle:S,connectionLineComponent:b,connectionLineContainerStyle:v,selectionKeyCode:y,selectionOnDrag:w,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:E,zoomActivationKeyCode:j,deleteKeyCode:z,onlyRenderVisibleElements:R,elementsSelectable:O,defaultViewport:I,translateExtent:F,minZoom:U,maxZoom:q,preventScrolling:Y,defaultMarkerColor:V,zoomOnScroll:Z,zoomOnPinch:te,panOnScroll:P,panOnScrollSpeed:L,panOnScrollMode:$,zoomOnDoubleClick:H,panOnDrag:G,autoPanOnSelection:ne,onPaneClick:oe,onPaneMouseEnter:le,onPaneMouseMove:se,onPaneMouseLeave:Q,onPaneScroll:ce,onPaneContextMenu:ee,paneClickDistance:ue,nodeClickDistance:de,onEdgeContextMenu:ye,onEdgeMouseEnter:Ae,onEdgeMouseMove:Ve,onEdgeMouseLeave:Ge,reconnectRadius:$e,onReconnect:ut,onReconnectStart:pt,onReconnectEnd:Ut,noDragClassName:It,noWheelClassName:$t,noPanClassName:tt,disableKeyboardA11y:mt,nodeExtent:At,rfId:ke,viewport:De,onViewportChange:We}){return CR(e),CR(n),yjt(),fjt(t),hjt(De),h.jsx(LTt,{onPaneClick:oe,onPaneMouseEnter:le,onPaneMouseMove:se,onPaneMouseLeave:Q,onPaneContextMenu:ee,onPaneScroll:ce,paneClickDistance:ue,deleteKeyCode:z,selectionKeyCode:y,selectionOnDrag:w,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:E,zoomActivationKeyCode:j,elementsSelectable:O,zoomOnScroll:Z,zoomOnPinch:te,zoomOnDoubleClick:H,panOnScroll:P,panOnScrollSpeed:L,panOnScrollMode:$,panOnDrag:G,autoPanOnSelection:ne,defaultViewport:I,translateExtent:F,minZoom:U,maxZoom:q,onSelectionContextMenu:f,preventScrolling:Y,noDragClassName:It,noWheelClassName:$t,noPanClassName:tt,disableKeyboardA11y:mt,onViewportChange:We,isControlledViewport:!!De,children:h.jsxs(ujt,{children:[h.jsx(ljt,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:o,onReconnect:ut,onReconnectStart:pt,onReconnectEnd:Ut,onlyRenderVisibleElements:R,onEdgeContextMenu:ye,onEdgeMouseEnter:Ae,onEdgeMouseMove:Ve,onEdgeMouseLeave:Ge,reconnectRadius:$e,defaultMarkerColor:V,noPanClassName:tt,disableKeyboardA11y:mt,rfId:ke}),h.jsx(vjt,{style:S,type:x,component:b,containerStyle:v}),h.jsx("div",{className:"react-flow__edgelabel-renderer"}),h.jsx(UTt,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:_,nodeClickDistance:de,onlyRenderVisibleElements:R,noPanClassName:tt,noDragClassName:It,disableKeyboardA11y:mt,nodeExtent:At,rfId:ke}),h.jsx("div",{className:"react-flow__viewport-portal"})]})})}VH.displayName="GraphView";const xjt=M.memo(VH),wjt=YF(),ER=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:o,fitViewOptions:a,minZoom:l=.5,maxZoom:u=2,nodeOrigin:_,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,x=new Map,S=new Map,b=new Map,v=r??n??[],y=t??e??[],w=_??[0,0],C=f??yp;lH(S,b,v);const{nodesInitialized:N}=l3(y,m,x,{nodeOrigin:w,nodeExtent:C,zIndexMode:p});let E=[0,0,1];if(o&&s&&i){const j=um(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:z,y:R,zoom:O}=gk(j,s,i,l,u,(a==null?void 0:a.padding)??.1);E=[z,R,O]}return{rfId:"1",width:s??0,height:i??0,transform:E,nodes:y,nodesInitialized:N,nodeLookup:m,parentLookup:x,edges:v,edgeLookup:b,connectionLookup:S,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:l,maxZoom:u,translateExtent:yp,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Yh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:a,fitViewResolver:null,connection:{...qF},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:wjt,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:HF,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Sjt=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:o,fitViewOptions:a,minZoom:l,maxZoom:u,nodeOrigin:_,nodeExtent:f,zIndexMode:p})=>Mzt((m,x)=>{async function S(){const{nodeLookup:b,panZoom:v,fitViewOptions:y,fitViewResolver:w,width:C,height:N,minZoom:E,maxZoom:j}=x();v&&(await LNt({nodes:b,width:C,height:N,panZoom:v,minZoom:E,maxZoom:j},y),w==null||w.resolve(!0),m({fitViewResolver:null}))}return{...ER({nodes:e,edges:n,width:s,height:i,fitView:o,fitViewOptions:a,minZoom:l,maxZoom:u,nodeOrigin:_,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:b=>{const{nodeLookup:v,parentLookup:y,nodeOrigin:w,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:E,nodesSelectionActive:j}=x(),{nodesInitialized:z,hasSelectedNodes:R}=l3(b,v,y,{nodeOrigin:w,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:E}),O=j&&R;N&&z?(S(),m({nodes:b,nodesInitialized:z,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:O})):m({nodes:b,nodesInitialized:z,nodesSelectionActive:O})},setEdges:b=>{const{connectionLookup:v,edgeLookup:y}=x();lH(v,y,b),m({edges:b})},setDefaultNodesAndEdges:(b,v)=>{if(b){const{setNodes:y}=x();y(b),m({hasDefaultNodes:!0})}if(v){const{setEdges:y}=x();y(v),m({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:v,nodeLookup:y,parentLookup:w,domNode:C,nodeOrigin:N,nodeExtent:E,debug:j,fitViewQueued:z,zIndexMode:R}=x(),{changes:O,updatedInternals:I}=szt(b,y,w,C,N,E,R);I&&(ezt(y,w,{nodeOrigin:N,nodeExtent:E,zIndexMode:R}),z?(S(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(O==null?void 0:O.length)>0&&(j&&console.log("React Flow: trigger node changes",O),v==null||v(O)))},updateNodePositions:(b,v=!1)=>{const y=[];let w=[];const{nodeLookup:C,triggerNodeChanges:N,connection:E,updateConnection:j,onNodesChangeMiddlewareMap:z}=x();for(const[R,O]of b){const I=C.get(R),F=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(O!=null&&O.position)),U={id:R,type:"position",position:F?{x:Math.max(0,O.position.x),y:Math.max(0,O.position.y)}:O.position,dragging:v};if(I&&E.inProgress&&E.fromNode.id===I.id){const q=qf(I,E.fromHandle,kt.Left,!0);j({...E,from:q})}F&&I.parentId&&y.push({id:R,parentId:I.parentId,rect:{...O.internals.positionAbsolute,width:O.measured.width??0,height:O.measured.height??0}}),w.push(U)}if(y.length>0){const{parentLookup:R,nodeOrigin:O}=x(),I=Sk(y,C,R,O);w.push(...I)}for(const R of z.values())w=R(w);N(w)},triggerNodeChanges:b=>{const{onNodesChange:v,setNodes:y,nodes:w,hasDefaultNodes:C,debug:N}=x();if(b!=null&&b.length){if(C){const E=eTt(b,w);y(E)}N&&console.log("React Flow: trigger node changes",b),v==null||v(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:v,setEdges:y,edges:w,hasDefaultEdges:C,debug:N}=x();if(b!=null&&b.length){if(C){const E=tTt(b,w);y(E)}N&&console.log("React Flow: trigger edge changes",b),v==null||v(b)}},addSelectedNodes:b=>{const{multiSelectionActive:v,edgeLookup:y,nodeLookup:w,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(v){const E=b.map(j=>af(j,!0));C(E);return}C(nh(w,new Set([...b]),!0)),N(nh(y))},addSelectedEdges:b=>{const{multiSelectionActive:v,edgeLookup:y,nodeLookup:w,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(v){const E=b.map(j=>af(j,!0));N(E);return}N(nh(y,new Set([...b]))),C(nh(w,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:v}={})=>{const{edges:y,nodes:w,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:E}=x(),j=b||w,z=v||y,R=[];for(const I of j){if(!I.selected)continue;const F=C.get(I.id);F&&(F.selected=!1),R.push(af(I.id,!1))}const O=[];for(const I of z)I.selected&&O.push(af(I.id,!1));N(R),E(O)},setMinZoom:b=>{const{panZoom:v,maxZoom:y}=x();v==null||v.setScaleExtent([b,y]),m({minZoom:b})},setMaxZoom:b=>{const{panZoom:v,minZoom:y}=x();v==null||v.setScaleExtent([y,b]),m({maxZoom:b})},setTranslateExtent:b=>{var v;(v=x().panZoom)==null||v.setTranslateExtent(b),m({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:v,triggerNodeChanges:y,triggerEdgeChanges:w,elementsSelectable:C}=x();if(!C)return;const N=v.reduce((j,z)=>z.selected?[...j,af(z.id,!1)]:j,[]),E=b.reduce((j,z)=>z.selected?[...j,af(z.id,!1)]:j,[]);y(N),w(E)},setNodeExtent:b=>{const{nodes:v,nodeLookup:y,parentLookup:w,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:E,zIndexMode:j}=x();b[0][0]===E[0][0]&&b[0][1]===E[0][1]&&b[1][0]===E[1][0]&&b[1][1]===E[1][1]||(l3(v,y,w,{nodeOrigin:C,nodeExtent:b,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:j}),m({nodeExtent:b}))},panBy:b=>{const{transform:v,width:y,height:w,panZoom:C,translateExtent:N}=x();return izt({delta:b,panZoom:C,transform:v,translateExtent:N,width:y,height:w})},setCenter:async(b,v,y)=>{const{width:w,height:C,maxZoom:N,panZoom:E}=x();if(!E)return!1;const j=typeof(y==null?void 0:y.zoom)<"u"?y.zoom:N;return await E.setViewport({x:w/2-b*j,y:C/2-v*j,zoom:j},{duration:y==null?void 0:y.duration,ease:y==null?void 0:y.ease,interpolate:y==null?void 0:y.interpolate}),!0},cancelConnection:()=>{m({connection:{...qF}})},updateConnection:b=>{m({connection:b})},reset:()=>m({...ER()})}},Object.is);function kjt({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:o,initialMaxZoom:a,initialFitViewOptions:l,fitView:u,nodeOrigin:_,nodeExtent:f,zIndexMode:p,children:m}){const[x]=M.useState(()=>Sjt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:o,maxZoom:a,fitViewOptions:l,nodeOrigin:_,nodeExtent:f,zIndexMode:p}));return h.jsx(Dzt,{value:x,children:h.jsx(oTt,{children:h.jsx(wTt,{children:m})})})}function Cjt({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:o,fitView:a,fitViewOptions:l,minZoom:u,maxZoom:_,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return M.useContext(ty)?h.jsx(h.Fragment,{children:e}):h.jsx(kjt,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:o,fitView:a,initialFitViewOptions:l,initialMinZoom:u,initialMaxZoom:_,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const Ejt={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Njt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:o,onNodeClick:a,onEdgeClick:l,onInit:u,onMove:_,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:x,onConnectEnd:S,onClickConnectStart:b,onClickConnectEnd:v,onNodeMouseEnter:y,onNodeMouseMove:w,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:E,onNodeDragStart:j,onNodeDrag:z,onNodeDragStop:R,onNodesDelete:O,onEdgesDelete:I,onDelete:F,onSelectionChange:U,onSelectionDragStart:q,onSelectionDrag:Y,onSelectionDragStop:V,onSelectionContextMenu:Z,onSelectionStart:te,onSelectionEnd:P,onBeforeDelete:L,connectionMode:$,connectionLineType:H=Wc.Bezier,connectionLineStyle:G,connectionLineComponent:ne,connectionLineContainerStyle:oe,deleteKeyCode:le="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:Q=!1,selectionMode:ce=xp.Full,panActivationKeyCode:ee="Space",multiSelectionKeyCode:ue=Sp()?"Meta":"Control",zoomActivationKeyCode:de=Sp()?"Meta":"Control",snapToGrid:ye,snapGrid:Ae,onlyRenderVisibleElements:Ve=!1,selectNodesOnDrag:Ge,nodesDraggable:$e,autoPanOnNodeFocus:ut,nodesConnectable:pt,nodesFocusable:Ut,nodeOrigin:It=xH,edgesFocusable:$t,edgesReconnectable:tt,elementsSelectable:mt=!0,defaultViewport:At=Vzt,minZoom:ke=.5,maxZoom:De=2,translateExtent:We=yp,preventScrolling:rt=!0,nodeExtent:bt,defaultMarkerColor:Wt="#b1b1b7",zoomOnScroll:Pe=!0,zoomOnPinch:Dt=!0,panOnScroll:ln=!1,panOnScrollSpeed:kn=.5,panOnScrollMode:Jt=Rf.Free,zoomOnDoubleClick:Gn=!0,panOnDrag:Gt=!0,onPaneClick:sn,onPaneMouseEnter:Wn,onPaneMouseMove:Tn,onPaneMouseLeave:Er,onPaneScroll:rr,onPaneContextMenu:Or,paneClickDistance:Nr=1,nodeClickDistance:yt=0,children:fn,onReconnect:wn,onReconnectStart:Xt,onReconnectEnd:ar,onEdgeContextMenu:cn,onEdgeDoubleClick:hn,onEdgeMouseEnter:Pn,onEdgeMouseMove:gt,onEdgeMouseLeave:vt,reconnectRadius:qe=10,onNodesChange:ft,onEdgesChange:dr,noDragClassName:Rt="nodrag",noWheelClassName:Vt="nowheel",noPanClassName:sr="nopan",fitView:jn,fitViewOptions:Ji,connectOnClick:ku,attributionPosition:ea,proOptions:Ta,defaultEdgeOptions:vs,elevateNodesOnSelect:ii=!0,elevateEdgesOnSelect:zr=!1,disableKeyboardA11y:js=!1,autoPanOnConnect:Tr,autoPanOnNodeDrag:Bn,autoPanOnSelection:Si=!0,autoPanSpeed:ja,connectionRadius:en,isValidConnection:Gs,onError:bs,style:st,id:Ft,nodeDragThreshold:ki,connectionDragThreshold:jr,viewport:As,onViewportChange:Fn,width:Xn,height:ys,colorMode:Cu="light",debug:or,onScroll:Ir,ariaLabelConfig:Br,zIndexMode:$r="basic",...jt},Aa){const ta=Ft||"1",Vr=Xzt(Cu),Rs=M.useCallback(Yo=>{Yo.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ir==null||Ir(Yo)},[Ir]);return h.jsx("div",{"data-testid":"rf__wrapper",...jt,onScroll:Rs,style:{...st,...Ejt},ref:Aa,className:is(["react-flow",s,Vr]),id:Ft,role:"application",children:h.jsxs(Cjt,{nodes:e,edges:n,width:Xn,height:ys,fitView:jn,fitViewOptions:Ji,minZoom:ke,maxZoom:De,nodeOrigin:It,nodeExtent:bt,zIndexMode:$r,children:[h.jsx(Yzt,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:x,onConnectEnd:S,onClickConnectStart:b,onClickConnectEnd:v,nodesDraggable:$e,autoPanOnNodeFocus:ut,nodesConnectable:pt,nodesFocusable:Ut,edgesFocusable:$t,edgesReconnectable:tt,elementsSelectable:mt,elevateNodesOnSelect:ii,elevateEdgesOnSelect:zr,minZoom:ke,maxZoom:De,nodeExtent:bt,onNodesChange:ft,onEdgesChange:dr,snapToGrid:ye,snapGrid:Ae,connectionMode:$,translateExtent:We,connectOnClick:ku,defaultEdgeOptions:vs,fitView:jn,fitViewOptions:Ji,onNodesDelete:O,onEdgesDelete:I,onDelete:F,onNodeDragStart:j,onNodeDrag:z,onNodeDragStop:R,onSelectionDrag:Y,onSelectionDragStart:q,onSelectionDragStop:V,onMove:_,onMoveStart:f,onMoveEnd:p,noPanClassName:sr,nodeOrigin:It,rfId:ta,autoPanOnConnect:Tr,autoPanOnNodeDrag:Bn,autoPanSpeed:ja,onError:bs,connectionRadius:en,isValidConnection:Gs,selectNodesOnDrag:Ge,nodeDragThreshold:ki,connectionDragThreshold:jr,onBeforeDelete:L,debug:or,ariaLabelConfig:Br,zIndexMode:$r}),h.jsx(xjt,{onInit:u,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:y,onNodeMouseMove:w,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:E,nodeTypes:i,edgeTypes:o,connectionLineType:H,connectionLineStyle:G,connectionLineComponent:ne,connectionLineContainerStyle:oe,selectionKeyCode:se,selectionOnDrag:Q,selectionMode:ce,deleteKeyCode:le,multiSelectionKeyCode:ue,panActivationKeyCode:ee,zoomActivationKeyCode:de,onlyRenderVisibleElements:Ve,defaultViewport:At,translateExtent:We,minZoom:ke,maxZoom:De,preventScrolling:rt,zoomOnScroll:Pe,zoomOnPinch:Dt,zoomOnDoubleClick:Gn,panOnScroll:ln,panOnScrollSpeed:kn,panOnScrollMode:Jt,panOnDrag:Gt,autoPanOnSelection:Si,onPaneClick:sn,onPaneMouseEnter:Wn,onPaneMouseMove:Tn,onPaneMouseLeave:Er,onPaneScroll:rr,onPaneContextMenu:Or,paneClickDistance:Nr,nodeClickDistance:yt,onSelectionContextMenu:Z,onSelectionStart:te,onSelectionEnd:P,onReconnect:wn,onReconnectStart:Xt,onReconnectEnd:ar,onEdgeContextMenu:cn,onEdgeDoubleClick:hn,onEdgeMouseEnter:Pn,onEdgeMouseMove:gt,onEdgeMouseLeave:vt,reconnectRadius:qe,defaultMarkerColor:Wt,noDragClassName:Rt,noWheelClassName:Vt,noPanClassName:sr,rfId:ta,disableKeyboardA11y:js,nodeExtent:bt,viewport:As,onViewportChange:Fn}),h.jsx(Wzt,{onSelectionChange:U}),fn,h.jsx(Fzt,{proOptions:Ta,position:ea}),h.jsx(Pzt,{rfId:ta,disableKeyboardA11y:js})]})})}var zjt=SH(Njt);function Tjt({dimensions:e,lineWidth:n,variant:t,className:r}){return h.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:is(["react-flow__background-pattern",t,r])})}function jjt({radius:e,className:n}){return h.jsx("circle",{cx:e,cy:e,r:e,className:is(["react-flow__background-pattern","dots",n])})}var Gl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Gl||(Gl={}));const Ajt={[Gl.Dots]:1,[Gl.Lines]:1,[Gl.Cross]:6},Rjt=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function KH({id:e,variant:n=Gl.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:o,bgColor:a,style:l,className:u,patternClassName:_}){const f=M.useRef(null),{transform:p,patternId:m}=Sn(Rjt,vr),x=r||Ajt[n],S=n===Gl.Dots,b=n===Gl.Cross,v=Array.isArray(t)?t:[t,t],y=[v[0]*p[2]||1,v[1]*p[2]||1],w=x*p[2],C=Array.isArray(i)?i:[i,i],N=b?[w,w]:y,E=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],j=`${m}${e||""}`;return h.jsxs("svg",{className:is(["react-flow__background",u]),style:{...l,...ry,"--xy-background-color-props":a,"--xy-background-pattern-color-props":o},ref:f,"data-testid":"rf__background",children:[h.jsx("pattern",{id:j,x:p[0]%y[0],y:p[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:S?h.jsx(jjt,{radius:w/2,className:_}):h.jsx(Tjt,{dimensions:N,lineWidth:s,variant:n,className:_})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}KH.displayName="Background";const Mjt=M.memo(KH);function Djt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:h.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Ljt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:h.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Ojt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:h.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Ijt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Bjt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function c1({children:e,className:n,...t}){return h.jsx("button",{type:"button",className:is(["react-flow__controls-button",n]),...t,children:e})}const $jt=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function QH({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:o,onFitView:a,onInteractiveChange:l,className:u,children:_,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const x=yr(),{isInteractive:S,minZoomReached:b,maxZoomReached:v,ariaLabelConfig:y}=Sn($jt,vr),{zoomIn:w,zoomOut:C,fitView:N}=kk(),E=()=>{w(),i==null||i()},j=()=>{C(),o==null||o()},z=()=>{N(s),a==null||a()},R=()=>{x.setState({nodesDraggable:!S,nodesConnectable:!S,elementsSelectable:!S}),l==null||l(!S)},O=p==="horizontal"?"horizontal":"vertical";return h.jsxs(ny,{className:is(["react-flow__controls",O,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??y["controls.ariaLabel"],children:[n&&h.jsxs(h.Fragment,{children:[h.jsx(c1,{onClick:E,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:v,children:h.jsx(Djt,{})}),h.jsx(c1,{onClick:j,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:b,children:h.jsx(Ljt,{})})]}),t&&h.jsx(c1,{className:"react-flow__controls-fitview",onClick:z,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:h.jsx(Ojt,{})}),r&&h.jsx(c1,{className:"react-flow__controls-interactive",onClick:R,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:S?h.jsx(Bjt,{}):h.jsx(Ijt,{})}),_]})}QH.displayName="Controls";M.memo(QH);function Pjt({id:e,x:n,y:t,width:r,height:s,style:i,color:o,strokeColor:a,strokeWidth:l,className:u,borderRadius:_,shapeRendering:f,selected:p,onClick:m}){const{background:x,backgroundColor:S}=i||{},b=o||x||S;return h.jsx("rect",{className:is(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:_,ry:_,width:r,height:s,style:{fill:b,stroke:a,strokeWidth:l},shapeRendering:f,onClick:m?v=>m(v,e):void 0})}const Fjt=M.memo(Pjt),Hjt=e=>e.nodes.map(n=>n.id),Bw=e=>e instanceof Function?e:()=>e;function qjt({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=Fjt,onClick:o}){const a=Sn(Hjt,vr),l=Bw(n),u=Bw(e),_=Bw(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return h.jsx(h.Fragment,{children:a.map(p=>h.jsx(Gjt,{id:p,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:_,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:o,shapeRendering:f},p))})}function Ujt({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:o,NodeComponent:a,onClick:l}){const{node:u,x:_,y:f,width:p,height:m}=Sn(x=>{const S=x.nodeLookup.get(e);if(!S)return{node:void 0,x:0,y:0,width:0,height:0};const b=S.internals.userNode,{x:v,y}=S.internals.positionAbsolute,{width:w,height:C}=ec(b);return{node:b,x:v,y,width:w,height:C}},vr);return!u||u.hidden||!XF(u)?null:h.jsx(a,{x:_,y:f,width:p,height:m,style:u.style,selected:!!u.selected,className:r(u),color:n(u),borderRadius:s,strokeColor:t(u),strokeWidth:i,shapeRendering:o,onClick:l,id:u.id})}const Gjt=M.memo(Ujt);var Wjt=M.memo(qjt);const Vjt=200,Kjt=150,Qjt=e=>!e.hidden,Yjt=e=>{const n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:e.nodeLookup.size>0?KF(um(e.nodeLookup,{filter:Qjt}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Xjt="react-flow__minimap-desc";function YH({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:o,nodeComponent:a,bgColor:l,maskColor:u,maskStrokeColor:_,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:x,pannable:S=!1,zoomable:b=!1,ariaLabel:v,inversePan:y,zoomStep:w=1,offsetScale:C=5}){const N=yr(),E=M.useRef(null),{boundingRect:j,viewBB:z,rfId:R,panZoom:O,translateExtent:I,flowWidth:F,flowHeight:U,ariaLabelConfig:q}=Sn(Yjt,vr),Y=(e==null?void 0:e.width)??Vjt,V=(e==null?void 0:e.height)??Kjt,Z=j.width/Y,te=j.height/V,P=Math.max(Z,te),L=P*Y,$=P*V,H=C*P,G=j.x-(L-j.width)/2-H,ne=j.y-($-j.height)/2-H,oe=L+H*2,le=$+H*2,se=`${Xjt}-${R}`,Q=M.useRef(0),ce=M.useRef();Q.current=P,M.useEffect(()=>{if(E.current&&O)return ce.current=_zt({domNode:E.current,panZoom:O,getTransform:()=>N.getState().transform,getViewScale:()=>Q.current}),()=>{var ye;(ye=ce.current)==null||ye.destroy()}},[O]),M.useEffect(()=>{var ye;(ye=ce.current)==null||ye.update({translateExtent:I,width:F,height:U,inversePan:y,pannable:S,zoomStep:w,zoomable:b})},[S,b,y,w,I,F,U]);const ee=m?ye=>{var Ge;const[Ae,Ve]=((Ge=ce.current)==null?void 0:Ge.pointer(ye))||[0,0];m(ye,{x:Ae,y:Ve})}:void 0,ue=x?M.useCallback((ye,Ae)=>{const Ve=N.getState().nodeLookup.get(Ae).internals.userNode;x(ye,Ve)},[]):void 0,de=v??q["minimap.ariaLabel"];return h.jsx(ny,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof _=="string"?_:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*P:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof t=="string"?t:void 0,"--xy-minimap-node-stroke-width-props":typeof o=="number"?o:void 0},className:is(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:h.jsxs("svg",{width:Y,height:V,viewBox:`${G} ${ne} ${oe} ${le}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:E,onClick:ee,children:[de&&h.jsx("title",{id:se,children:de}),h.jsx(Wjt,{onClick:ue,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:o,nodeComponent:a}),h.jsx("path",{className:"react-flow__minimap-mask",d:`M${G-H},${ne-H}h${oe+H*2}v${le+H*2}h${-oe-H*2}z - M${z.x},${z.y}h${z.width}v${z.height}h${-z.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}YH.displayName="MiniMap";M.memo(YH);const Zjt=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,Jjt={[Jh.Line]:"right",[Jh.Handle]:"bottom-right"};function eAt({nodeId:e,position:n,variant:t=Jh.Handle,className:r,style:s=void 0,children:i,color:o,minWidth:a=10,minHeight:l=10,maxWidth:u=Number.MAX_VALUE,maxHeight:_=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:x,onResizeStart:S,onResize:b,onResizeEnd:v}){const y=NH(),w=typeof e=="string"?e:y,C=yr(),N=M.useRef(null),E=t===Jh.Handle,j=Sn(M.useCallback(Zjt(E&&m),[E,m]),vr),z=M.useRef(null),R=n??Jjt[t];M.useEffect(()=>{if(!(!N.current||!w))return z.current||(z.current=Nzt({domNode:N.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:I,transform:F,snapGrid:U,snapToGrid:q,nodeOrigin:Y,domNode:V}=C.getState();return{nodeLookup:I,transform:F,snapGrid:U,snapToGrid:q,nodeOrigin:Y,paneDomNode:V}},onChange:(I,F)=>{const{triggerNodeChanges:U,nodeLookup:q,parentLookup:Y,nodeOrigin:V}=C.getState(),Z=[],te={x:I.x,y:I.y},P=q.get(w);if(P&&P.expandParent&&P.parentId){const L=P.origin??V,$=I.width??P.measured.width??0,H=I.height??P.measured.height??0,G={id:P.id,parentId:P.parentId,rect:{width:$,height:H,...ZF({x:I.x??P.position.x,y:I.y??P.position.y},{width:$,height:H},P.parentId,q,L)}},ne=Sk([G],q,Y,V);Z.push(...ne),te.x=I.x?Math.max(L[0]*$,I.x):void 0,te.y=I.y?Math.max(L[1]*H,I.y):void 0}if(te.x!==void 0&&te.y!==void 0){const L={id:w,type:"position",position:{...te}};Z.push(L)}if(I.width!==void 0&&I.height!==void 0){const $={id:w,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};Z.push($)}for(const L of F){const $={...L,type:"position"};Z.push($)}U(Z)},onEnd:({width:I,height:F})=>{const U={id:w,type:"dimensions",resizing:!1,dimensions:{width:I,height:F}};C.getState().triggerNodeChanges([U])}})),z.current.update({controlPosition:R,boundaries:{minWidth:a,minHeight:l,maxWidth:u,maxHeight:_},keepAspectRatio:f,resizeDirection:p,onResizeStart:S,onResize:b,onResizeEnd:v,shouldResize:x}),()=>{var I;(I=z.current)==null||I.destroy()}},[R,a,l,u,_,f,S,b,v,x]);const O=R.split("-");return h.jsx("div",{className:is(["react-flow__resize-control","nodrag",...O,t,r]),ref:N,style:{...s,scale:j,...o&&{[E?"backgroundColor":"borderColor"]:o}},children:i})}M.memo(eAt);function tAt(){const[e,n]=M.useState(0),[t,r]=M.useState(0);return{ref:M.useCallback(i=>{if(!i)return;function o(){n(i.offsetWidth),r(i.offsetHeight)}const a=new ResizeObserver(o),l=new MutationObserver(o);return a.observe(i),l.observe(i,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),o(),()=>{a.disconnect(),l.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const u1=8;function nAt(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},o]=M.useState({viewWidth:0,viewHeight:0});M.useEffect(()=>{function _(){o({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",_),_(),()=>window.removeEventListener("resize",_)},[]);let a=0,l=0,u=0;if(e){const{distance:_}=e;switch(e.anchor){case"left":a=e.x-t-_,l=e.y+e.height/2-r/2;break;case"right":a=e.x+e.width+_,l=e.y+e.height/2-r/2;break;case"below":a=e.x+e.width/2-t/2,l=e.y+e.height+_;break;case"above":a=e.x+e.width/2-t/2,l=e.y-r-_;break}const f=a,p=l;a=Math.min(Math.max(a,u1),i-t-u1),l=Math.min(Math.max(l,u1),s-r-u1),u=e.anchor==="left"||e.anchor==="right"?p-l:f-a}return{x:a,y:l,arrowAdjustment:u}}const $w=380,Pw=12,rAt=350,sAt=150,f3=new EventTarget;function iAt(){f3.dispatchEvent(new Event("move"))}function aAt(e,n){const[t,r]=M.useState(null),s=M.useRef(void 0),i=M.useRef(void 0);M.useEffect(()=>{const u=()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),r(null)};return f3.addEventListener("move",u),()=>{f3.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),M.useEffect(()=>{r(u=>{var f;if(!u)return u;const _=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return _&&u.x===_.x&&u.y===_.y&&u.width===_.width&&u.height===_.height?u:_})},[e,n]);const o=M.useCallback(()=>{window.clearTimeout(i.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var u;r(((u=e.current)==null?void 0:u.getBoundingClientRect())??null)},rAt)},[e]),a=M.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),sAt)},[]),l=M.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:o,onMouseLeave:a,keepOpen:l}}function oAt(e){const n=new Date(e),t=n.getFullYear()===new Date().getFullYear()?{month:"short",day:"numeric"}:{month:"short",day:"numeric",year:"numeric"};return n.toLocaleDateString(T(),t)}function lAt({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:o,onMouseEnter:a,onMouseLeave:l}){const u=tAt(),_=s.right+Pw+$w<=window.innerWidth,f=s.x-Pw-$w>=0,p=_?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:x}=nAt({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:Pw},u),S=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:b}=ht({...F0t(S??""),enabled:!!S,subscribed:!!S}),v=M.useMemo(()=>{if(!b)return null;const I=b;let F=I.diff;if(I.truncated){const V=F.lastIndexOf(` -diff --git `);F=V!==-1?F.slice(0,V+1):F.slice(0,F.lastIndexOf(` -`)+1)}let U=[];try{U=F.trim()?I5(F):[]}catch{return null}if(I.truncated&&U.every(V=>V.hunks.length===0))return null;let q=0,Y=0;for(const V of U){const Z=sk(V);q+=Z.additions,Y+=Z.deletions}return{fileCount:U.length,additions:q,deletions:Y,truncated:I.truncated}},[b]),y={done:0,failed:0,cancelled:0,live:0};for(const I of n)I.status==="done"?y.done+=1:I.status==="failed"?y.failed+=1:I.status==="cancelled"?y.cancelled+=1:y.live+=1;const w=t?J1((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,N=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,E=M.useRef(null),[j,z]=M.useState(!1),[R,O]=M.useState(!1);return M.useEffect(()=>{z(!1)},[N]),M.useEffect(()=>{const I=E.current;I&&O(I.scrollHeight>I.clientHeight+1)},[N,j]),Fo.createPortal(h.jsxs("div",{ref:u.ref,className:"exp-hover-card fixed z-60 bg-background border border-border rounded-lg shadow-menu py-3.5 px-4 text-sm text-text [&_.hc-head]:flex [&_.hc-head]:items-baseline [&_.hc-head]:justify-between [&_.hc-head]:gap-2.5 [&_.hc-slug]:text-sm [&_.hc-slug]:font-semibold [&_.hc-slug]:min-w-0 [&_.hc-slug]:overflow-hidden [&_.hc-slug]:text-ellipsis [&_.hc-slug]:whitespace-nowrap [&_.hc-title]:mt-[3px] [&_.hc-title]:text-text [&_.hc-actions]:flex [&_.hc-actions]:items-center [&_.hc-actions]:gap-1.5 [&_.hc-actions]:mt-2.5 [&_.hc-actions_button]:inline-flex [&_.hc-actions_button]:items-center [&_.hc-actions_button]:justify-center [&_.hc-actions_button]:gap-[5px] [&_.hc-actions_button]:min-w-21 [&_.hc-actions_button]:py-1.5 [&_.hc-actions_button]:px-2.5 [&_.hc-actions_button]:border [&_.hc-actions_button]:border-border [&_.hc-actions_button]:rounded-md [&_.hc-actions_button]:bg-background [&_.hc-actions_button]:text-text [&_.hc-actions_button]:text-sm [&_.hc-actions_button]:font-medium [&_.hc-actions_button:hover]:border-border-hover-strong [&_.hc-actions_button:hover]:bg-canvas [&_.hc-body]:mt-2.5 [&_.hc-body]:border-t [&_.hc-body]:border-t-border-variant [&_.hc-body]:pt-2.5 [&_.hc-body]:leading-[1.6] [&_.hc-body]:whitespace-pre-line [&_.hc-body]:line-clamp-10 [&_.hc-body.expanded]:block [&_.hc-body.expanded]:line-clamp-none [&_.hc-body.expanded]:max-h-[45vh] [&_.hc-body.expanded]:overflow-y-auto [&_.hc-body.expanded]:overflow-x-hidden [&_.hc-body.expanded]:pb-1 [&_.hc-toggle]:mt-1 [&_.hc-toggle]:text-sm [&_.hc-toggle]:font-medium [&_.hc-toggle]:text-muted [&_.hc-toggle:hover]:text-text [&_.hc-failure]:mt-2 [&_.hc-failure]:text-accent-red [&_.hc-failure]:line-clamp-3 [&_.hc-stats]:mt-2.5 [&_.hc-stats]:border-t [&_.hc-stats]:border-t-border-variant [&_.hc-stats]:pt-2.5 [&_.hc-stats]:flex [&_.hc-stats]:items-center [&_.hc-stats]:gap-3 [&_.hc-stats]:flex-wrap [&_.hc-stats]:text-xs [&_.hc-stats]:text-text [&_.hc-git]:mt-2.5 [&_.hc-git]:pt-2 [&_.hc-git]:border-t [&_.hc-git]:border-t-border-variant [&_.hc-git]:text-xs [&_.hc-git]:text-text [&_.hc-git]:flex [&_.hc-git]:flex-col [&_.hc-git]:gap-1 [&_.hc-git-row]:flex [&_.hc-git-row]:items-center [&_.hc-git-row]:gap-2.5 [&_.hc-git-row]:flex-wrap [&_.hc-git-row]:min-w-0 [&_.hc-branch]:inline-flex [&_.hc-branch]:items-center [&_.hc-branch]:gap-1 [&_.hc-branch]:min-w-0 [&_.hc-branch]:overflow-hidden [&_.hc-branch]:text-ellipsis [&_.hc-branch]:whitespace-nowrap [&_.hc-foot]:mt-2 [&_.hc-foot]:flex [&_.hc-foot]:items-center [&_.hc-foot]:justify-between [&_.hc-foot]:gap-2.5 [&_.hc-foot]:text-xs [&_.hc-foot]:text-muted [&_.hc-foot_.hc-command]:min-w-0 [&_.hc-foot_.hc-command]:overflow-hidden [&_.hc-foot_.hc-command]:text-ellipsis [&_.hc-foot_.hc-command]:whitespace-nowrap",style:{width:$w,left:m,top:x,visibility:u.offsetHeight===0?"hidden":void 0},onMouseEnter:a,onMouseLeave:l,children:[h.jsxs("div",{className:"hc-head",children:[h.jsx("span",{className:"hc-slug",children:e.slug}),h.jsx(Ul,{status:t?Sa(t):"idle"})]}),e.title&&h.jsx("div",{className:"hc-title",children:e.title}),h.jsxs("div",{className:"hc-actions",children:[i&&h.jsxs("button",{type:"button",...Gr(i),children:[h.jsx(Bh,{size:13}),$ge()]}),h.jsxs("button",{type:"button",...Gr(o),children:[h.jsx(sb,{size:13}),Nge()]})]}),N&&h.jsx("div",{className:`hc-body${j?" expanded":""}`,ref:E,children:N}),N&&(R||j)&&h.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>z(I=>!I),children:j?lD():G0e()}),C&&h.jsx("div",{className:"hc-failure",children:C}),h.jsxs("div",{className:"hc-stats",children:[h.jsx("span",{children:new Intl.ListFormat(T(),{style:"short"}).format([n.length===1?s4e():l4e({count:nn(n.length)}),...y.done>0?[Dwe({count:nn(y.done)})]:[],...y.failed>0?[Bwe({count:nn(y.failed)})]:[],...y.cancelled>0?[jwe({count:nn(y.cancelled)})]:[],...y.live>0?[Ywe({count:nn(y.live)})]:[]])}),t&&Y3(t.backend)&&h.jsx(k6,{backend:t.backend}),w&&h.jsx("span",{children:w}),t&&h.jsx("span",{children:Lo(t.createdAt)})]}),h.jsxs("div",{className:"hc-git",children:[h.jsxs("div",{className:"hc-git-row",children:[h.jsxs("span",{className:"hc-branch",title:e.branchName,children:[h.jsx(ib,{size:12}),e.branchName]}),r&&h.jsxs("span",{children:[Lge()," ",h.jsx("span",{children:r})]})]}),v&&v.fileCount>0&&h.jsx("div",{className:"hc-git-row",title:v.truncated?tK({parent:ze(r??"parent")}):XV({parent:ze(r??"parent")}),children:h.jsxs("span",{children:[v.truncated&&"≥ ",h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",v.additions]})," ",h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",v.deletions]})," · ",v.fileCount===1&&!v.truncated?e4e():v.truncated?Wwe({count:nn(v.fileCount)}):Hwe({count:nn(v.fileCount)})]})})]}),h.jsxs("div",{className:"hc-foot",children:[h.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),h.jsxs("span",{children:[Age()," ",oAt(e.createdAt)]})]})]}),document.body)}const NR=["empty-state absolute inset-0 flex flex-col items-center","justify-center p-6 text-center text-subtext [&_p]:max-w-[46ch]","[&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal [&_p]:text-balance","[&_p.empty-state-title]:text-2xl [&_p.empty-state-title]:font-normal","[&_p.empty-state-title]:text-text [&_p.empty-state-hint]:text-lg","[&_p.empty-state-hint]:text-subtext empty-state-cta gap-1.5"].join(" "),cAt=264,zR=132,D1=44,uAt=72,fAt=148,dAt=44;function hAt(e){const n=new Map(e.map(i=>[i.id,{exp:i,children:[]}])),t=[];for(const i of e){const o=n.get(i.id),a=i.parentExperimentId?n.get(i.parentExperimentId):void 0;a?a.children.push(o):t.push(o)}const r=(i,o)=>i.exp.createdAt-o.exp.createdAt,s=i=>{i.children.sort(r),i.children.forEach(s)};return t.sort(r),t.forEach(s),t}function _At(e,n){const t=new Map,r=a=>{const l=t.get(a)??1+a.children.reduce((u,_)=>u+r(_),0);return t.set(a,l),l},s=new Map,i=a=>{const l=s.get(a)??(n(a)||a.children.some(i));return s.set(a,l),l};function o(a){if(n(a)){const _=[];let f=0;for(const p of a.children)i(p)?_.push(...o(p)):f+=r(p);return f>0&&_.push({kind:"elided",id:`el-${a.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:a.exp,children:_}]}if(!i(a))return[];let l=0;const u=[];return(function _(f){l+=1;for(const p of f.children)n(p)?u.push(...o(p)):i(p)?_(p):l+=r(p)})(a),[{kind:"elided",id:`el-${a.exp.id}`,count:l,children:u}]}return e.flatMap(o)}function d3(e){return e.kind==="exp"?cAt:fAt}function f1(e){return e.kind==="exp"?e.exp.id:e.id}function L1(e){if(e.children.length===0)return d3(e);const n=e.children.reduce((t,r)=>t+L1(r),0)+D1*(e.children.length-1);return Math.max(d3(e),n)}function pAt(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const mAt=M.memo(function({data:n}){Kf();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:o,githubOwner:a,githubRepo:l,onOpenView:u,onOpenCode:_}=n,f=r?Sa(r):void 0,p=f==="running"||f==="starting"||f==="cancelling",m=i?qst():p?sit():zl(),x=s.slice(-8),S=M.useRef(null),b=aAt(S,n);return h.jsxs("div",{ref:S,className:`exp-node w-66 border border-border rounded-md bg-background py-2.5 px-3 shadow-tree text-sm transition-[box-shadow] duration-120 ease-standard [&:hover]:shadow-tree-hover [&.live]:border-accent-teal [&.live]:shadow-tree-live [&_.node-overview-link]:block [&_.node-overview-link]:w-full [&_.node-overview-link]:p-0 [&_.node-overview-link]:border-0 [&_.node-overview-link]:bg-transparent [&_.node-overview-link]:text-inherit [&_.node-overview-link]:[font:inherit] [&_.node-overview-link]:text-start [&_.node-overview-link]:cursor-pointer [&_.node-overview-link:hover_.node-slug]:underline [&_.node-overview-link:hover_.node-slug]:underline-offset-[3px] [&_.node-overview-link:focus-visible]:outline-2 [&_.node-overview-link:focus-visible]:outline-solid [&_.node-overview-link:focus-visible]:outline-accent [&_.node-overview-link:focus-visible]:outline-offset-4 [&_.node-overview-link:focus-visible]:rounded-xs [&_.node-eyebrow]:flex [&_.node-eyebrow]:items-center [&_.node-eyebrow]:justify-between [&_.node-eyebrow]:gap-2 [&_.node-eyebrow]:mb-1.5 [&_.node-eyebrow]:text-xs [&_.node-eyebrow]:font-medium [&_.node-eyebrow]:text-muted [&_.node-head]:flex [&_.node-head]:items-center [&_.node-head]:gap-[7px] [&_.node-head]:min-w-0 [&_.node-status]:w-2 [&_.node-status]:h-2 [&_.node-status]:rounded-full [&_.node-status]:shrink-0 [&_.node-slug]:text-sm [&_.node-slug]:font-semibold [&_.node-slug]:text-text [&_.node-slug]:flex-1 [&_.node-slug]:min-w-0 [&_.node-slug]:overflow-hidden [&_.node-slug]:text-ellipsis [&_.node-slug]:whitespace-nowrap [&_.node-title]:mt-1 [&_.node-title]:text-text [&_.node-title]:text-sm [&_.node-title]:line-clamp-2 [&_.node-meta]:mt-2 [&_.node-meta]:flex [&_.node-meta]:items-center [&_.node-meta]:gap-2 [&_.node-meta]:text-xs [&_.node-meta]:text-muted [&_.node-actions]:mt-2 [&_.node-actions]:pt-1.5 [&_.node-actions]:border-t [&_.node-actions]:border-t-border-variant [&_.node-actions]:flex [&_.node-actions]:items-center [&_.node-actions]:gap-[3px] [&_.node-action]:inline-flex [&_.node-action]:items-center [&_.node-action]:gap-[5px] [&_.node-action]:py-[3px] [&_.node-action]:px-1.5 [&_.node-action]:text-sm [&_.node-action]:font-medium [&_.node-action]:text-text [&_.node-action]:rounded-sm [&_.node-action]:no-underline [&_.node-action:hover]:text-text [&_.node-action:hover]:bg-surface [&_.node-action-ext]:ms-auto [&_.node-action-ext]:py-[3px] [&_.node-action-ext]:px-[5px] ${p?"live":""}`,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,children:[h.jsx(gu,{type:"target",position:kt.Top}),h.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...Gr(v=>u(t.id,"overview",v)),children:[h.jsxs("div",{className:"node-eyebrow",children:[h.jsx("span",{children:m}),h.jsx(Ul,{status:f??"idle"})]}),h.jsx("div",{className:"node-head",children:h.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&h.jsx("div",{className:"node-title",children:t.title||t.description}),h.jsxs("div",{className:"node-meta",children:[h.jsx("span",{children:qit()}),x.length>0?h.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:x.map(v=>h.jsx("span",{className:`run-sq w-[9px] h-[9px] shrink-0 [&.pass]:bg-accent-green [&.fail]:border-[1.5px] [&.fail]:border-danger-outline [&.live]:bg-accent-teal [&.live]:animate-[or-pulse_1.2s_ease-in-out_infinite] [&.other]:border-[1.5px] [&.other]:border-border ${pAt(Sa(v))}`,title:C$(Sa(v))},v.id))}):h.jsx("span",{children:Ait()}),h.jsx("span",{className:"flex-1"}),r&&h.jsx("span",{children:Lo(r.createdAt)})]})]}),h.jsxs("div",{className:"node-actions",onClick:v=>v.stopPropagation(),children:[s.length>0&&h.jsxs("button",{className:"node-action",title:Lit(),...Gr(v=>u(t.id,"terminal",v)),children:[h.jsx(Bh,{size:13}),eL()]}),h.jsxs("button",{className:"node-action",title:KM({branch:ze(t.branchName)}),...Gr(v=>_(t.id,t.branchName,"files",v)),children:[h.jsx(sb,{size:13}),mit()]}),a&&l&&h.jsx("a",{className:"node-action node-action-ext",title:V1({name:ze(t.branchName)}),"aria-label":V1({name:ze(t.branchName)}),href:Yv(a,l,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:h.jsx(ab,{size:13})})]}),h.jsx(gu,{type:"source",position:kt.Bottom}),b.rect&&h.jsx(lAt,{exp:t,runs:s,latestRun:r,parentSlug:o,anchor:b.rect,onOpenLogs:s.length>0?v=>u(t.id,"terminal",v):void 0,onOpenCode:v=>_(t.id,t.branchName,"files",v),onMouseEnter:b.keepOpen,onMouseLeave:b.onMouseLeave})]})}),gAt=M.memo(function({data:n}){Kf();const{count:t,onShowProjectScope:r}=n;return h.jsxs("div",{className:"elided-node w-37 h-11 flex items-center gap-2 py-1.5 px-2.5 border border-dashed border-border rounded-md bg-hover-faint text-muted text-sm font-medium text-start transition-[border-color,color] duration-120 ease-standard [&:hover]:border-text [&:hover]:text-text [&_.elided-node-label]:flex [&_.elided-node-label]:flex-col [&_.elided-node-label]:leading-[1.3] [&_.elided-node-sub]:text-muted",role:"button",tabIndex:0,title:Vit(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[h.jsx(gu,{type:"target",position:kt.Top}),h.jsx(p6,{size:14}),h.jsxs("span",{className:"elided-node-label",children:[t===1?eit():Yst({count:nn(t)}),h.jsx("span",{className:"elided-node-sub",children:$it()})]}),h.jsx(gu,{type:"source",position:kt.Bottom})]})}),vAt={exp:mAt,elided:gAt},XH={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},bAt={...XH.style,strokeDasharray:"4 4"};function yAt({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:i,onShowProjectScope:o}){const{nodes:a,edges:l}=M.useMemo(()=>{const u=new Map;for(const v of n){const y=u.get(v.experimentId);y?y.push(v):u.set(v.experimentId,[v])}for(const v of u.values())v.sort((y,w)=>y.createdAt-w.createdAt);const _=[],f=[],p=v=>!i||v.exp.chatSessionId===i,m=_At(hAt(e),p),x=new Map(e.map(v=>[v.id,v.slug]));function S(v,y,w){const C=y-d3(v)/2;if(v.kind==="exp"){const j=u.get(v.exp.id)??[];_.push({id:v.exp.id,type:"exp",position:{x:C,y:w},data:{exp:v.exp,latestRun:j[j.length-1]??null,runs:j,isBaseline:!v.exp.parentExperimentId,parentSlug:v.exp.parentExperimentId?x.get(v.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else _.push({id:v.id,type:"elided",position:{x:C,y:w+(zR-dAt)/2},data:{count:v.count,onShowProjectScope:o}});if(v.children.length===0)return;const N=v.children.reduce((j,z)=>j+L1(z),0)+D1*(v.children.length-1);let E=y-N/2;for(const j of v.children){const z=L1(j),R=v.kind==="elided"||j.kind==="elided";f.push({id:`e-${f1(v)}-${f1(j)}`,source:f1(v),target:f1(j),...R?{style:bAt}:{}}),S(j,E+z/2,w+zR+uAt),E+=z+D1}}let b=0;for(const v of m){const y=L1(v);S(v,b+y/2,0),b+=y+D1}return{nodes:_,edges:f}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,i,o]);return e.length===0?h.jsxs("div",{className:NR,children:[h.jsx("p",{className:"empty-state-title",children:Nit()}),h.jsx("p",{className:"empty-state-hint",children:dit()})]}):a.length===0&&i?h.jsxs("div",{className:NR,children:[h.jsx("p",{className:"empty-state-title",children:Sit()}),h.jsx("p",{className:"empty-state-hint",children:lit()})]}):h.jsx(zjt,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.react-flow\\_\\_node.react-flow\\_\\_node-elided.selectable]:cursor-pointer [&_.react-flow\\_\\_handle]:opacity-0 [&_.react-flow\\_\\_handle]:pointer-events-none [&_.react-flow\\_\\_attribution]:hidden!",nodes:a,edges:l,nodeTypes:vAt,defaultEdgeOptions:XH,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:iAt,minZoom:.15,fitView:!0,fitViewOptions:{padding:.25,maxZoom:1},children:h.jsx(Mjt,{variant:Gl.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},i??"project")}const m0=["empty-state absolute inset-0 flex flex-col items-center","justify-center gap-2.5 p-6 text-center text-subtext","[&_p]:max-w-[46ch] [&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal","[&_p]:text-balance [&_p.empty-state-title]:text-2xl","[&_p.empty-state-title]:font-normal [&_p.empty-state-title]:text-text","[&_p.empty-state-hint]:text-lg [&_p.empty-state-hint]:text-subtext"].join(" ");function xAt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wAt(e,n,t,r,s){let i=e,o;const a=n==null?void 0:n.replace(/\/+$/,""),l=r==null?void 0:r.replace(/\/+$/,"");if(i.startsWith("artifacts/"))return i=i.slice(10),i?{path:i,source:"artifacts"}:null;if(i==="~"||i.startsWith("~/"))return{path:i,source:"abs"};const u=p=>{const m=b=>b.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[x,S]=[m(i),m(p)];return x===S?"":x.startsWith(`${S}/`)?x.slice(S.length).replace(/^\/+/,""):null},_=i.startsWith("/")&&l?u(l):null,f=i.startsWith("/")&&a?u(a):null;if(!i.startsWith("/"))o=t;else{if(_!==null)return _?{path:_,source:"artifacts"}:null;if(f!==null)i=f;else{const p=s?xAt(s):"[^/]+",m=i.match(new RegExp(`/files/${p}/(.+)$`)),x=m?null:i.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),S=m||x?null:i.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(m)return{path:m[1],source:"artifacts"};x?(o=x[1],i=x[2]):S&&(i=S[1])}}return i?i.startsWith("/")?{path:i,source:"abs"}:{path:i,sessionId:o}:null}function SAt(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const Bv=360,kAt=10,CAt=272,EAt=380,NAt=CAt+56,zAt=80,TAt=48;function k0(){return Math.max(Bv,window.innerWidth-NAt-EAt)}function jAt(){const e=k0();return Math.max(Bv,Math.min(760,e,Math.round(window.innerWidth*.4)))}function TR(e,n){const t=e.findIndex(s=>s.id===n.id);if(t<0)return[...e,n];const r=e.slice();return r[t]=n,r}function jR(e){const n=M.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function AAt({runtime:e,projectId:n,pane:t}){var je,Be;const r=Cn({mutationFn:Iot}),s=ri(),i=PM({select:X=>X.location}),o=Df(i.pathname),a=(o==null?void 0:o.kind)==="skills"?"skills":(o==null?void 0:o.kind)==="settings"?o.section??"settings":"chat",l=M.useRef(null),u=(o==null?void 0:o.kind)==="task"?o.sessionId??null:l.current;(o==null?void 0:o.kind)==="task"&&(l.current=u);const _=t!==void 0,f=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=M.useState(null),[x,S]=M.useState(0),b=M.useRef({href:"",jump:0,value:0});(b.current.href!==i.href||b.current.jump!==x)&&(b.current={href:i.href,jump:x,value:b.current.value+1});const v=M.useMemo(()=>{const X=t?Wa(t):"experiments";return typeof X=="object"&&"path"in X&&X.line&&p!==b.current.value?{...X,lineScrollRequest:b.current.value}:X},[t,p,i.href,x]),y=ht(ka(n)),w=M.useMemo(()=>{var X;return((X=y.data)==null?void 0:X.map(pe=>pe.id))??null},[y.data]),C=M.useRef(new Set),N=M.useRef(new Set),E=M.useRef({}),[j,z]=M.useState(0),R=M.useRef({projectId:n,activeSessionId:u,pane:t,isTask:(o==null?void 0:o.kind)==="task"});R.current={projectId:n,activeSessionId:u,pane:t,isTask:(o==null?void 0:o.kind)==="task"};const O=M.useCallback((X,pe=!1)=>{const we=R.current;we.projectId&&s.navigate({href:y1(we.projectId,we.activeSessionId,X),replace:pe})},[s]),I=M.useCallback(X=>{const pe=Bl(X);O(pe.kind==="file"?{...pe,line:void 0}:pe)},[O]),F=M.useCallback(()=>O(void 0),[O]),U=M.useCallback(X=>{(t==null?void 0:t.kind)==="experiment"&&O({...t,runId:X??void 0})},[t,O]),q=M.useCallback(X=>{s.navigate({href:X?`/projects/${encodeURIComponent(X)}`:"/projects"})},[s]),Y=M.useCallback(X=>{var pe;if(n)if(X==="chat"){const we=l.current;s.navigate({href:y1(n,we,(pe=ou(xs.current,we??"new"))==null?void 0:pe.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${X==="skills"?"skills":`settings/${X}`}`})},[s,n]),V=Kf(),{status:Z}=C6(e.kind==="local"),te=M.useMemo(()=>K0(),[n]),P=ht(te),L=P.data??null,$=M.useCallback(X=>{Wr(te.queryKey,pe=>(typeof X=="function"?X(pe??null):X)??void 0)},[te]),H=M.useMemo(()=>Vp(),[n]),G=ht(H),ne=G.data??null,oe=M.useCallback(X=>{Wr(H.queryKey,pe=>(typeof X=="function"?X(pe??null):X)??void 0)},[H]),le=M.useRef(void 0);le.current=ne==null?void 0:ne.tourCompleted;const se=[!y.data&&y.error?JM():null,!P.data&&P.error?z0():null,!G.data&&G.error?nne():null].filter(X=>X!==null),Q=se.length?ane({items:new Intl.ListFormat(V).format(se)}):null,ce=M.useRef(null),ee=ht(R4(n)),ue=ee.data??[],de=!ee.isPending,[ye,Ae]=M.useState(!1),Ge=ht(ru(n)).data??[],$e=M.useRef(Ge);$e.current=Ge;const ut=M.useRef(new Map),pt=M.useRef(new Set),Ut=M.useRef(null),It=M.useRef(!1),$t=M.useRef(new Map),tt=M.useRef(new Map),mt=M.useRef(0),At=M.useRef(ue);At.current=ue;const De=ht(H0t(n)).data??null,[We,rt]=M.useState("table"),[bt,Wt]=M.useState("project"),Pe=M.useRef(null),{open:Dt,setOpen:ln,ref:kn}=so(Pe),[Jt,Gn]=M.useState(!1),Gt=ue.every(X=>X.chatSessionId),sn=u&&Gt?bt:"project",Wn=M.useMemo(()=>sn!=="agent"?ue:ue.filter(X=>X.chatSessionId===u),[ue,sn,u]),Tn=M.useMemo(()=>{if(sn!=="agent")return Ge;const X=new Set(Wn.map(pe=>pe.id));return Ge.filter(pe=>X.has(pe.experimentId))},[Ge,Wn,sn]),[Er,rr]=M.useState([]),[Or,Nr]=M.useState(!1),[yt,fn]=M.useState(!1),[wn,Xt]=M.useState(!1),[ar,cn]=M.useState([]),[hn,Pn]=M.useState([]),gt=M.useRef(new Map),vt=M.useRef(new Map),qe=X=>{let pe=vt.current.get(X);return pe||(pe=new NCt,vt.current.set(X,pe)),pe},[ft,dr]=M.useState([]),[Rt,Vt]=M.useState([]),[sr,jn]=M.useState([]),[Ji,ku]=M.useState([]),[ea,Ta]=M.useState(null),[vs,ii]=M.useState("files"),[zr,js]=M.useState(new Set),[Tr,Bn]=M.useState(!1),[Si,ja]=M.useState(jAt),[en,Gs]=M.useState(!0),[bs,st]=M.useState(!1),Ft=M.useRef(d6()),ki=M.useRef(u);ki.current=u;const jr=M.useRef(Er);jr.current=Er;const As=M.useRef(Ji);As.current=Ji;const Fn=M.useRef(null),Xn=M.useCallback(X=>{const pe=[...X];As.current=pe,ku(pe)},[]),ys=M.useCallback(X=>{Fn.current=X,Ta(X)},[]),Cu=M.useCallback(X=>{const pe=St(X);cn(Ce=>s0(Ce,pe)),Pn(Ce=>s0(Ce,pe)),dr(Ce=>s0(Ce,pe)),Vt(Ce=>s0(Ce,pe)),jn(Ce=>s0(Ce,pe));const we=Ei.current;if(we&&"path"in X){const Ce=Ns(we,ki.current,X);gt.current.delete(Ce),vt.current.delete(Ce),N.current.delete(Ce),C.current.delete(Ce)}const Me=jr.current.filter(Ce=>St(Ce)!==pe);jr.current=Me,rr(Me)},[]),or=M.useCallback(X=>{const pe=St(X),we=[...jr.current.filter(Me=>St(Me)!==pe),Mg(X)];jr.current=we,rr(we),I(X)},[I]),Ir=M.useCallback((X,pe,we)=>{const Me=St(X),Ce=Fn.current,et=O4t({order:As.current,previewKey:Ce?St(Ce):null},Me,pe);et.replacedKey&&Ce&&typeof Ce!="string"&&St(Ce)===et.replacedKey&&Cu(Ce),Xn(et.order),et.previewKey===null?ys(null):et.previewKey===Me&&ys(Mg(X));const ot=[...jr.current.filter(Ht=>St(Ht)!==Me),Mg(X)];jr.current=ot,rr(ot),O(Bl(X,we))},[Cu,Xn,ys,O]),Br=M.useCallback(X=>{const pe=Fn.current;pe&&St(pe)===St(X)&&ys(null)},[ys]);M.useEffect(()=>{let X=!1;const pe=Me=>{const Ce=Fn.current,et=Me.target;if(et instanceof Element&&et.closest("input, textarea, [contenteditable='true']")!==null){X=!1;return}if(Ce&&St(Ce)===St(Ft.current.rightTab)&&(Me.metaKey||Me.ctrlKey)&&!Me.altKey&&!Me.shiftKey&&Me.key.toLowerCase()==="k"){Me.preventDefault(),X=!0;return}if(X&&Me.key==="Enter"){Me.preventDefault(),X=!1;const Ht=Fn.current;Ht&&Br(Ht);return}X=!1},we=()=>{X=!1};return window.addEventListener("keydown",pe),window.addEventListener("blur",we),window.addEventListener("pointerdown",we),()=>{window.removeEventListener("keydown",pe),window.removeEventListener("blur",we),window.removeEventListener("pointerdown",we)}},[Br]);const $r=M.useCallback((X,pe)=>{const we=St(X),Me=Fn.current;Me&&St(Me)===we&&ys(null);const Ce=I4t({order:As.current,previewKey:Me?St(Me):null},we,jr.current.map(St));Xn(Ce.order);const et=jr.current.filter(Ht=>St(Ht)!==we);if(jr.current=et,rr(et),!pe)return;const ot=Ce.fallbackKey?et.find(Ht=>St(Ht)===Ce.fallbackKey):void 0;ot?I(ot):(F(),Bn(!1))},[Xn,ys,I,F]),jt=Y,Aa=M.useMemo(()=>({rightTab:Mg(v),tabHistory:Er,experimentsTabOpen:Or,filesTabOpen:yt,artifactsTabOpen:wn,expTabs:ar,fileTabs:hn,planTabs:ft,subagentTabs:Rt,codeTabs:sr,contentTabOrder:As.current,previewTab:Fn.current,filesView:vs,filesToggled:zr,selectedRunId:f,scope:bt,panelOpen:_,panelMax:Tr}),[v,Er,Or,yt,wn,ar,hn,ft,Rt,sr,Ji,ea,vs,zr,f,bt,_,Tr]);Ft.current=Aa;const ta=M.useCallback(()=>Object.fromEntries(gt.current),[]),Vr=M.useRef(void 0),Rs=M.useCallback(()=>{clearTimeout(Vr.current),Vr.current=setTimeout(()=>z(X=>X+1),200)},[]);M.useEffect(()=>()=>clearTimeout(Vr.current),[]);const Yo=M.useCallback((X,pe,we)=>{if(rr(X.tabHistory),jr.current=X.tabHistory,Nr(X.experimentsTabOpen),fn(X.filesTabOpen),Xt(X.artifactsTabOpen),cn(X.expTabs),Pn(X.fileTabs),dr(Ce=>Ce===X.planTabs?Ce:X.planTabs.map(et=>{var ot;return{...et,plan:((ot=Ce.find(Ht=>Ht.sessionId===et.sessionId&&Ht.promptId===et.promptId))==null?void 0:ot.plan)??""}})),Vt(X.subagentTabs),jn(X.codeTabs),Xn(X.contentTabOrder),ys(X.previewTab),ii(X.filesView),js(X.filesToggled),Wt(X.scope),Bn(X.panelMax),Gn(R.current.activeSessionId===T0&&X.fileTabs.some(Ce=>Xu(Ce,{path:v1,source:"artifacts"}))),we){for(const[Ce,et]of Object.entries((pe==null?void 0:pe.scroll)??{}))gt.current.set(Ce,et);Object.assign(E.current,pe==null?void 0:pe.sourceModes)}const Me=R.current;if(Me.projectId)for(const Ce of X.fileTabs){const et=Ns(Me.projectId,Me.activeSessionId,Ce);N.current.has(et)||C.current.add(et)}},[Xn,ys]),{ready:Ci,loaded:na,error:tc,retry:Eu,capture:nc,workspace:xs}=qdt({projectId:ne&&w!==null&&((o==null?void 0:o.kind)!=="task"||!u||w.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(o==null?void 0:o.kind)==="task",demoOverview:(ne==null?void 0:ne.tourCompleted)===!1,state:Aa,apply:Yo,getScroll:ta,sourceModes:E.current,revision:j}),ao=M.useCallback((X,pe)=>{var et;if(!n)return;X&&pe!=null&&pe.replace&&u===null&&(nc(),Fdt(n,X));const we=ou(rO(n),X??"new"),Me=we?we.active:Gc(n)?(et=h6(X??void 0,le.current===!1))==null?void 0:et.active:void 0,Ce=pe!=null&&pe.replace&&X&&u===null?R.current.pane:Me;s.navigate({href:y1(n,X,Ce),replace:pe==null?void 0:pe.replace})},[s,n,u,nc]);M.useEffect(()=>{Ci&&(o==null?void 0:o.kind)!=="task"&&!l.current&&xs.current.lastTaskId&&(w!=null&&w.includes(xs.current.lastTaskId))&&(l.current=xs.current.lastTaskId,z(X=>X+1))},[Ci,o==null?void 0:o.kind,xs,w]),oV({shouldBlockFn:({next:X})=>{var pe;return((pe=Df(X.pathname))==null?void 0:pe.projectId)!==n&&[...vt.current.values()].some(we=>we.needsProtection)&&!gA(CE())},enableBeforeUnload:()=>[...vt.current.values()].some(X=>X.needsProtection)});const rc=M.useRef(null);M.useEffect(()=>{const X=Jv(i.href);!ne||!Ci||!X||(eb.queue({lastLocation:X,railOpen:en,panelWidth:Si,experimentsView:We},rc.current===X?250:0),rc.current=X)},[i.href,ne,Ci,en,Si,We]);const Ra=(ne==null?void 0:ne.onboardingCompleted)??!1,[hr,lr]=M.useState(!1),Xo=M.useCallback(()=>lr(!0),[]),ra=M.useCallback(async()=>{const X=await r.mutateAsync({tourCompleted:!0});oe(pe=>pe&&{...pe,tourCompleted:X.tourCompleted}),lr(!1)},[]),oo=M.useCallback(async()=>{await ra(),st(!0)},[ra]);M.useEffect(()=>{!n||!Gc(n)||!Ra||ne!=null&&ne.tourCompleted||Xo()},[n,Ra,Xo,ne==null?void 0:ne.tourCompleted]);const Kt=(L==null?void 0:L.find(X=>X.id===n))??null;M.useEffect(()=>{const X=Q||ne===null?null:Kt==null?void 0:Kt.name;document.title=X?`${Ro(X)} — OpenResearch`:"OpenResearch"},[Q,ne,Kt]);const Ei=M.useRef(n);Ei.current=n;const lo=M.useCallback(X=>{n&&of({name:"first_action",surface:Gc(n)?"demo":"project",action:X})},[n]);M.useEffect(()=>{a!=="chat"&&a!=="skills"&&lo("open_settings")},[a,lo]);const Ws=M.useCallback((X=!1)=>{X&&(!R.current.isTask||R.current.pane)||(lo("open_experiment"),Nr(!0),O({kind:"home",view:"experiments"},X))},[O,lo]),Ni=()=>{P.refetch(),G.refetch(),y.refetch()},Zo=M.useRef(!1);M.useEffect(()=>{if(!ne||Zo.current)return;Zo.current=!0,ce.current=ne.preferredAgent;const X=u6()??ne.workspace;X&&(Gs(X.railOpen),ja(Math.min(X.panelWidth,k0())),rt(X.experimentsView))},[ne]),M.useEffect(()=>{w&&l.current&&!w.includes(l.current)&&(l.current=null)},[w]);const Ma=M.useRef(Promise.resolve()),Vs=M.useRef(0),Jo=M.useCallback(X=>{const pe=++Vs.current;oe(Me=>Me&&{...Me,preferredAgent:X});const we=Ma.current.then(()=>r.mutateAsync({preferredAgent:X})).then(Me=>{ce.current=Me.preferredAgent,pe===Vs.current&&oe(Ce=>Ce&&{...Ce,preferredAgent:Me.preferredAgent})}).catch(Me=>{throw pe===Vs.current&&oe(Ce=>Ce&&{...Ce,preferredAgent:ce.current}),Me});return Ma.current=we.catch(()=>{}),we},[]);M.useEffect(()=>{const X=()=>ja(pe=>Math.min(pe,k0()));return window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[]);const Hn=M.useCallback(X=>{It.current=!1,$t.current.clear(),tt.current.clear();const pe=++mt.current;Je.fetchQuery(ru(X)).then(we=>{if(Ei.current!==X||Ut.current!==X||mt.current!==pe)return;$t.current=new Map(we.map(Ce=>[Ce.id,Ce]));const Me=[...tt.current.values()].some(Ce=>{const et=$t.current.get(Ce.id);return!et||et.status!=="running"&&et.updatedAt<=Ce.updatedAt});tt.current.clear();for(const Ce of we){const et=ut.current.get(Ce.id);(!et||et.updatedAt{mt.current===pe&&(tt.current.clear(),Ae(!0))})},[Ws]);M.useEffect(()=>{if(n)return Ut.current=n,ut.current.clear(),pt.current.clear(),Qot(n).catch(()=>{}),Hn(n),()=>{mt.current++}},[Hn,n]);const Nu=M.useCallback(()=>{Xt(!0),or("artifacts")},[or]);jut({onReconnect:()=>{const X=Ei.current;X&&(Ut.current=X,ut.current.clear(),pt.current.clear(),Hn(X))},onRun:X=>{if(X.projectId!==Ei.current||X.projectId!==Ut.current)return;const pe=ut.current.get(X.id),we=pt.current.has(X.id);if(pe&&pe.updatedAt>X.updatedAt||(ut.current.set(X.id,X),pt.current.add(X.id),X.status!=="running"||(pe==null?void 0:pe.status)==="running"))return;const Me=$t.current.get(X.id),Ce=It.current&&(!Me||Me.status!=="running"&&Me.updatedAt<=X.updatedAt);we&&pe||Ce?Ws(!0):It.current||tt.current.set(X.id,X)}});const Kr=M.useCallback(()=>Wt("project"),[]),xr=M.useCallback((X,pe="overview",we="preview",Me)=>{lo("open_experiment");const Ce={id:X,view:pe};cn(et=>et.some(ot=>S2(ot,Ce))?et:[...et,Ce]),Ir(Ce,we,Me)},[Ir]),ai=M.useCallback((X,pe="preview")=>{const we=$e.current.filter(Ce=>Ce.id===X||Ce.id.startsWith(X)),Me=we.length===1?we[0]:null;Me&&xr(Me.experimentId,"terminal",pe,Me.id)},[xr]),as=M.useMemo(()=>new Map(ue.map(X=>{var pe;return[X.id,((pe=X.title)==null?void 0:pe.trim())||X.slug||zl()]})),[ue,V]),Ar=jR(as),el=M.useMemo(()=>{const X=new Map;for(const pe of Ge)X.set(pe.id,Ar.get(pe.experimentId)??zl());return X},[Ar,Ge,V]),sa=jR(el),td=M.useCallback(X=>{const pe=sa.get(X);if(pe)return pe;const we=[...sa].filter(([Me])=>Me.startsWith(X));return we.length===1?we[0][1]:""},[sa]),tl=M.useCallback(X=>{const pe=Ar.get(X);if(pe)return pe;const we=[...Ar].filter(([Me])=>Me.startsWith(X));return we.length===1?we[0][1]:""},[Ar]),Da=M.useCallback((X,pe="preview")=>{const we=At.current.filter(Me=>Me.id===X||Me.id.startsWith(X));we.length===1&&xr(we[0].id,"overview",pe)},[xr]),nl=M.useCallback(X=>{const pe=ar.findIndex(we=>S2(we,X));pe!==-1&&(cn(we=>we.filter((Me,Ce)=>Ce!==pe)),$r(X,St(v)===St(X)))},[ar,$r,v]),zi=M.useCallback((X,pe="preview")=>{X.line!=null&&S(Ce=>Ce+1);const we=Ei.current;if(we){const Ce=Ns(we,ki.current,X);Ft.current.fileTabs.some(et=>Xu(et,X))||C.current.delete(Ce),N.current.add(Ce)}const Me=tO(X);Pn(Ce=>{const et=Ce.findIndex(Ht=>Xu(Ht,X));if(et===-1)return[...Ce,Me];const ot=Ce.slice();return ot[et]=Me,ot}),Ir(X,pe)},[Ir]),ia=M.useCallback((X,pe,we,Me,Ce,et)=>{const ot=L==null?void 0:L.find(ws=>ws.id===n),Ht=wAt(X,ot==null?void 0:ot.repoPath,pe,(ot==null?void 0:ot.artifactsDir)??(ot==null?void 0:ot.filesDir),ot==null?void 0:ot.slug);if(!Ht)return null;const Vn=Ce?At.current.find(ws=>ws.id===Ce||Ce.length>=6&&ws.id.startsWith(Ce)):void 0,Ls=we??(Vn==null?void 0:Vn.branchName),_r=Ht.source==null||Ht.source==="repo";return Ls&&_r&&(Ht.ref=Ls),et&&!Ht.ref&&_r&&(Ht.branchLabel=et),Me!=null&&(Ht.line=Me),Ht},[L,n]),La=M.useCallback((X,pe,we,Me,Ce,et,ot="preview")=>{const Ht=ia(X,pe,we,Me,Ce,et);Ht&&zi(Ht,ot)},[zi,ia]),__=M.useCallback(X=>zi({path:X,source:"artifacts"},"keepOpen"),[zi]),sc=M.useCallback((X,pe,we,Me,Ce,et="preview")=>{const ot=ia(X,pe,Ce,we,Me);ot&&zi(ot,et)},[zi,ia]),Ms=M.useCallback((X,pe)=>{Br(X),pe()},[Br]),nd=M.useCallback(X=>{var Me;const pe=hn.findIndex(Ce=>Xu(Ce,X));if(pe===-1)return;const we=n?Ns(n,u,X):null;we&&((Me=vt.current.get(we))!=null&&Me.needsProtection)&&!gA(CE())||(Pn(Ce=>Ce.filter((et,ot)=>ot!==pe)),we&&(gt.current.delete(we),vt.current.delete(we),N.current.delete(we),C.current.delete(we),delete E.current[we]),u===T0&&Xu(X,{path:v1,source:"artifacts"})&&Gn(!1),$r(X,St(v)===St(X)))},[u,hn,$r,n,v]),zu=M.useCallback(X=>{X.lineScrollRequest!==void 0&&m(X.lineScrollRequest)},[]),p_=M.useCallback((X,pe,we,Me="preview")=>{const Ce={kind:"plan",sessionId:pe,promptId:we,plan:X};dr(et=>{const ot=et.findIndex(Vn=>Vn.promptId===we);if(ot===-1)return[...et,Ce];const Ht=et.slice();return Ht[ot]=Ce,Ht}),Ir(Ce,Me)},[Ir]),rd=M.useCallback(X=>{const pe=ft.findIndex(we=>we.promptId===X.promptId);pe!==-1&&(dr(we=>we.filter((Me,Ce)=>Ce!==pe)),$r(X,St(v)===St(X)))},[$r,ft,v]),sd=M.useCallback((X,pe,we,Me="preview")=>{const Ce={kind:"subagent",sessionId:X,spawnPartId:pe,label:we};Vt(et=>et.some(ot=>ot.spawnPartId===pe)?et:[...et,Ce]),Ir(Ce,Me)},[Ir]),ic=M.useCallback(X=>{const pe=Rt.findIndex(we=>we.spawnPartId===X.spawnPartId);pe!==-1&&(Vt(we=>we.filter((Me,Ce)=>Ce!==pe)),$r(X,St(v)===St(X)))},[$r,v,Rt]),[aa,id]=M.useState({});M.useEffect(()=>{if(id(ot=>{const Ht=new Set(Rt.map(Vn=>Vn.spawnPartId));return Object.keys(ot).every(Vn=>Ht.has(Vn))?ot:Object.fromEntries(Object.entries(ot).filter(([Vn])=>Ht.has(Vn)))}),Rt.length===0)return;let X=!0;const pe=new Set,we=(ot,Ht,Vn)=>{id(Ls=>{var ws;let _r=Ls;for(const Zn of Ht)if(!(Vn&&pe.has(Zn.spawnPartId)))for(const Pr of ot){const li=kv(Pr.parts,Zn.spawnPartId);if(!li)continue;Vn||pe.add(Zn.spawnPartId);const la={label:r6t(li),running:((ws=li.state)==null?void 0:ws.status)==="running"},sl=_r[Zn.spawnPartId];(!sl||sl.label!==la.label||sl.running!==la.running)&&(_r===Ls&&(_r={...Ls}),_r[Zn.spawnPartId]=la);break}return _r})};let Me=0;const Ce=()=>{const ot=++Me;for(const Ht of new Set(Rt.map(Vn=>Vn.sessionId)))Je.fetchQuery({...Hl(Ht),staleTime:0}).then(({messages:Vn})=>{X&&ot===Me&&we(Vn,Rt.filter(Ls=>Ls.sessionId===Ht),!0)}).catch(()=>{})};Ce();const et=tv(ot=>{if(ot.type==="reconnected"){pe.clear(),Ce();return}if(ot.type!=="message")return;const Ht=Rt.filter(Vn=>Vn.sessionId===ot.sessionId);Ht.length&&we([ot.message],Ht,!1)});return()=>{X=!1,et()}},[Rt]);const ac=M.useCallback((X,pe,we="files",Me="preview")=>{const Ce={code:!0,experimentId:X,branch:pe,view:we,toggled:new Set};jn(et=>et.some(ot=>Bd(ot,Ce))?et.map(ot=>Bd(ot,Ce)?{...ot,experimentId:X,view:we}:ot):[...et,Ce]),Ir(Ce,Me)},[Ir]),Tu=M.useCallback((X,pe)=>{jn(we=>we.map(Me=>Bd(Me,X)?{...Me,...pe}:Me)),pe.view&&O(Bl({...X,...pe}))},[]),ju=M.useCallback(X=>{const pe=sr.findIndex(we=>Bd(we,X));pe!==-1&&(jn(we=>we.filter((Me,Ce)=>Ce!==pe)),$r(X,St(v)===St(X)))},[sr,$r,v]),ad=M.useCallback(()=>{fn(!0),or("files")},[or]),oc=M.useCallback(X=>{X==="experiments"?Nr(!1):X==="files"?fn(!1):Xt(!1),$r(X,v===X)},[$r,v]),m_=X=>{X.preventDefault(),X.currentTarget.setPointerCapture(X.pointerId);const we=document.body.style.userSelect;document.body.style.userSelect="none";const Me=Tr,Ce=X.clientX,et=Si;let ot=!1;function Ht(){window.removeEventListener("pointermove",Vn),window.removeEventListener("pointerup",Ht),window.removeEventListener("pointercancel",Ht),document.body.style.userSelect=we}function Vn(Ls){if(Me){const Pr=Ls.clientX-Ce;if(ot||Prws+zAt){Bn(!0);return}Bn(!1);const Zn=Math.min(Math.max(_r,Bv),ws);ja(Zn)}window.addEventListener("pointermove",Vn),window.addEventListener("pointerup",Ht),window.addEventListener("pointercancel",Ht)},od=(X,pe)=>{$(we=>we?TR(we,X):[X]),s.navigate({href:`/projects/${encodeURIComponent(X.id)}${pe?"/settings/git":""}`}),pe&&ir(pe,"error")},Ds=typeof v=="object"&&"id"in v?v:null,En=typeof v=="object"&&"path"in v?v:null,Au=(En==null?void 0:En.source)==="artifacts"&&De?pp(De.entries,En.path):null,Ru=Au?`${Au.modifiedAt}:${Au.size}`:null,lc=u===T0&&Jt?hn.find(X=>Xu(X,{path:v1,source:"artifacts"})):void 0,g_=lc?[lc]:[],ps=typeof v=="object"&&"kind"in v&&v.kind==="plan"?v:null,oi=ps==null?void 0:ps.sessionId,co=ps==null?void 0:ps.promptId,rl=!!(oi&&co&&(w!=null&&w.includes(oi))),Oa=ht({...Hl(oi??""),enabled:rl,subscribed:rl}),cc=M.useMemo(()=>{var pe;if(!oi||!co||!Oa.data)return null;const X=Oa.data.messages.flatMap(we=>{const Me=kv(we.parts,co);return Me?[Me]:[]})[0];return{key:`${oi}:${co}`,text:((pe=X==null?void 0:X.prompt)==null?void 0:pe.plan)??null}},[oi,co,Oa.data]),os=typeof v=="object"&&"kind"in v&&v.kind==="subagent"?v:null,uc=typeof v=="object"&&"code"in v?v:null,ls=uc?sr.find(X=>Bd(X,uc))??null:null,fc=new Map;for(const X of[...ar,...hn,...ft,...Rt,...sr])fc.set(St(X),X);const Mu=lc?St(lc):null,Ia=Ji.filter(X=>X!==Mu).map(X=>fc.get(X)).filter(Bdt),uo=X=>ea!==null&&St(ea)===St(X),Du=X=>h.jsx(Pc,{active:En!==null&&Xu(En,X),label:X.path.split("/").pop()||X.path,icon:h.jsx(pO,{size:12,className:"shrink-0"}),preview:uo(X),onSelect:()=>or(X),onPromote:()=>Br(X),onClose:()=>nd(X)},`file:${f6(X)}`),oa=Ds?ue.find(X=>X.id===Ds.id)??null:null,fo=ls?ue.find(X=>X.id===ls.experimentId&&X.branchName===ls.branch)??null:null,ae=X=>{var we,Me;if("path"in X)return Du(X);if("id"in X){const Ce=ue.find(et=>et.id===X.id);return h.jsx(Pc,{active:Ds!==null&&S2(Ds,X),label:Ce?Ce.title||Ce.slug:"…",icon:X.view==="overview"?h.jsx(vht,{size:12,className:"shrink-0"}):h.jsx(Bh,{size:12,className:"shrink-0"}),preview:uo(X),onSelect:()=>or(X),onPromote:()=>Br(X),onClose:()=>nl(X)},St(X))}if("kind"in X&&X.kind==="plan")return h.jsx(Pc,{active:ps!==null&&ps.promptId===X.promptId,label:sD(),icon:h.jsx(x6,{size:12,className:"shrink-0"}),preview:uo(X),onSelect:()=>or(X),onPromote:()=>Br(X),onClose:()=>rd(X)},St(X));if("kind"in X)return h.jsx(Pc,{active:os!==null&&os.spawnPartId===X.spawnPartId,label:((we=aa[X.spawnPartId])==null?void 0:we.label)??X.label??une(),shimmer:((Me=aa[X.spawnPartId])==null?void 0:Me.running)??!1,icon:h.jsx(w6,{size:12,className:"shrink-0"}),preview:uo(X),onSelect:()=>or(X),onPromote:()=>Br(X),onClose:()=>ic(X)},St(X));const pe=ue.find(Ce=>Ce.id===X.experimentId);return h.jsx(Pc,{active:ls!==null&&Bd(ls,X),label:(pe==null?void 0:pe.slug)??X.branch,icon:h.jsx(J0,{size:12,className:"shrink-0"}),preview:uo(X),onSelect:()=>or(X),onPromote:()=>Br(X),onClose:()=>ju(X)},St(X))};if(!o||o.kind==="resume")return null;if(Q)return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsxs("div",{className:m0,children:[h.jsx("p",{children:Q}),h.jsx(Oe,{variant:"primary",onClick:Ni,children:Hi()})]}),e.kind==="ssh"&&h.jsx(av,{runtime:e,corner:!0})]});if(L&&!Kt)return h.jsxs("div",{className:m0,children:[Ol(),h.jsx(Oe,{onClick:()=>q(null),children:z0()})]});if(tc&&!Ci)return h.jsxs("div",{className:m0,children:[h.jsx("p",{role:"alert",children:tc}),h.jsx(Oe,{onClick:Eu,children:Hi()})]});if(L===null||ne===null||!na||w===null)return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsx("div",{className:m0,children:h.jsx(Ot,{})}),e.kind==="ssh"&&h.jsx(av,{runtime:e,corner:!0})]});if(!Kt||(o==null?void 0:o.kind)==="task"&&u&&!(w!=null&&w.includes(u)))return h.jsxs("div",{className:m0,children:[Ol(),h.jsx(Oe,{onClick:()=>q(null),children:z0()})]});const be=h.jsx(QCt,{projectName:((je=L.find(X=>X.id===n))==null?void 0:je.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>st(!0),onRepository:()=>jt("git"),onCollapse:()=>Gs(!1)});return h.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&h.jsx(EO,{}),e.kind==="local"&&h.jsx(TO,{status:Z}),tc&&h.jsxs("div",{role:"alert",className:"flex items-center gap-2 px-4 py-2 text-subtext",children:[h.jsx("span",{children:tc}),h.jsx(Oe,{onClick:Eu,children:Hi()})]}),h.jsxs("div",{className:"app-body flex flex-1 min-h-0 py-0 px-3.5",children:[n&&h.jsx(g6t,{projectId:n,projectName:(Kt==null?void 0:Kt.name)??"",railHeader:be,railOpen:en,onShowRail:()=>Gs(!0),mainView:a,onSelectMainView:jt,experimentsActive:a==="chat"&&_&&v==="experiments",filesActive:a==="chat"&&_&&v==="files",artifactsActive:a==="chat"&&_&&v==="artifacts",onOpenExperiments:()=>Ws(),onOpenArtifacts:Nu,onOpenFile:sc,onOpenRun:ai,runExperimentName:td,onOpenExperiment:Da,experimentName:tl,onOpenPlan:p_,onOpenSubagent:sd,onOpenWorktree:ad,composerPrefill:Kt&&Gc(Kt.id)&&(ne==null?void 0:ne.tourCompleted)===!1?jot:null,runtime:e,onOpenDemoWelcome:Kt&&Gc(Kt.id)?Xo:void 0,activeSessionId:u,onActiveSessionChange:ao,preferredAgent:ne.preferredAgent,onPreferredAgentChange:Jo,children:a==="skills"?h.jsx(gCt,{}):a!=="chat"?h.jsx(F5t,{remote:e.kind==="ssh",tab:a,project:Kt,onProjectUpdate:X=>{$(pe=>pe?TR(pe,X):[X])},onSelectTab:jt}):null}),a==="chat"&&_&&h.jsxs("aside",{className:`right-pane relative shrink-0 min-w-0 flex flex-col mt-5 me-0 mb-5 ms-3.5 bg-canvas [&.max]:fixed [&.max]:inset-2.5 [&.max]:m-0 [&.max]:z-60 [&.max]:shadow-panel-max border border-border rounded-lg overflow-hidden shadow-elevated ${Tr?"max":""}`,style:Tr?void 0:{width:Si},"data-onboarding":"experiments",children:[h.jsx("div",{className:`panel-resizer absolute start-0 top-0 bottom-0 w-1.5 z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover ${Tr?"cursor-e-resize":"cursor-col-resize"}`,title:Tr?tte():Xee(),onPointerDown:m_}),h.jsxs("div",{className:"tabs flex items-end gap-0 pt-1 pe-1.5 pb-0 ps-2 h-10 border-b border-b-border bg-background shrink-0",children:[h.jsxs("div",{className:"tab-strip flex items-end gap-0.5 flex-1 min-w-0 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[g_.map(Du),yt&&h.jsx(Pc,{active:v==="files",label:Ste(),icon:h.jsx(J0,{size:12,className:"shrink-0"}),onSelect:()=>or("files"),onClose:()=>oc("files")}),wn&&h.jsx(Pc,{active:v==="artifacts",label:Fee(),icon:h.jsx(v6,{size:12,className:"shrink-0"}),onSelect:()=>or("artifacts"),onClose:()=>oc("artifacts")}),Or&&h.jsx(Pc,{active:v==="experiments",label:bte(),icon:h.jsx(m6,{size:12,className:"shrink-0"}),onSelect:()=>or("experiments"),onClose:()=>oc("experiments")}),Ia.map(ae)]}),h.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[h.jsx(tn,{title:Tr?q9():H9(),"aria-label":Tr?q9():H9(),onClick:()=>Bn(X=>!X),children:Tr?h.jsx(v_t,{size:14}):h.jsx(p_t,{size:14})}),h.jsx(tn,{title:K1(),"aria-label":K1(),onClick:()=>{F(),Bn(!1)},children:h.jsx(es,{size:14})})]})]}),!Ci||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!de||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!ye?h.jsx(Fa,{children:h.jsx(Ot,{})}):Ds&&(!oa||f&&!Ge.some(X=>X.id===f&&X.experimentId===Ds.id))||uc&&!fo||t&&"sessionId"in t&&t.sessionId&&!(w!=null&&w.includes(t.sessionId))?h.jsx(Fa,{children:h.jsx("div",{className:"p-6 text-subtext",children:Ol()})}):v==="artifacts"?h.jsx(Fa,{children:Kt&&h.jsx(cCt,{project:Kt,artifacts:De,onOpenFile:__,canRenameFile:X=>{var pe;return!((pe=vt.current.get(Ns(Kt.id,u,{path:X,source:"artifacts"})))!=null&&pe.needsProtection)},onOpenStorage:e.kind==="ssh"?void 0:()=>jt("storage")},Kt.id)}):v==="experiments"?h.jsxs(Fa,{children:[h.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[h.jsx("span",{className:"flex-1"}),h.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[h.jsxs("div",{className:"option-picker relative inline-flex",ref:kn,children:[h.jsx(tn,{size:"small",ref:Pe,className:"experiment-scope-trigger",active:sn==="agent",title:fte({scope:sn==="agent"?P9():F9()}),"aria-label":Nte(),"aria-expanded":Dt,onClick:()=>ln(X=>!X),children:h.jsx(e_t,{size:16,strokeWidth:2.5})}),Dt&&h.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right experiment-scope-menu [&_.model-item]:whitespace-nowrap [&_.model-item:disabled]:text-muted [&_.model-item:disabled]:cursor-default [&_.model-item:disabled:hover]:bg-transparent",children:[h.jsxs(Ur,{"aria-pressed":sn==="agent",disabled:!u||!Gt,title:u?Gt?void 0:Ate():$te(),onClick:()=>{Wt("agent"),ln(!1)},children:[h.jsx("span",{children:P9()}),sn==="agent"&&h.jsx(qi,{size:13})]}),h.jsxs(Ur,{"aria-pressed":sn==="project",onClick:()=>{Wt("project"),ln(!1)},children:[h.jsx("span",{children:F9()}),sn==="project"&&h.jsx(qi,{size:13})]})]})]}),h.jsxs("div",{className:"seg inline-flex items-center gap-0.5 rounded-md bg-hover-subtle [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default experiments-view-toggle p-0.5 [&_button]:py-0.5 [&_button]:px-2 [&_button]:text-sm",role:"group","aria-label":pte(),children:[h.jsx("button",{className:We==="table"?"active":"","aria-pressed":We==="table",onClick:()=>rt("table"),children:_ne()}),h.jsx("button",{className:We==="tree"?"active":"","aria-pressed":We==="tree",onClick:()=>rt("tree"),children:vne()})]})]})]}),h.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:We==="tree"?Kt&&h.jsx(yAt,{experiments:ue,runs:Tn,project:Kt,onOpenView:xr,onOpenCode:ac,agentSessionId:sn==="agent"?u:null,onShowProjectScope:Kr}):h.jsx(YCt,{runs:Tn,emptyHint:sn==="agent"&&ue.length>0?Lte():void 0,experiments:Wn,onOpen:(X,pe)=>{xr(X.id,"overview",pe)},onOpenLogs:(X,pe,we)=>{xr(X,"terminal",we,pe)},onOpenCode:(X,pe)=>{const we=ue.find(Me=>Me.id===X);we&&ac(we.id,we.branchName,"files",pe)},onCancel:aL})})]}):v==="files"?h.jsx(Fa,{children:Kt?h.jsx(Y7t,{sessionId:u??void 0,project:Kt,view:vs,toggled:zr,onViewChange:ii,onToggledChange:js,canRenameFile:X=>{var pe;return!((pe=vt.current.get(Ns(Kt.id,u,{path:X,source:"repo",sessionId:u??void 0})))!=null&&pe.needsProtection)},onOpenFile:(X,pe,we,Me)=>La(X,pe,we,void 0,void 0,void 0,Me)},`files:${u??`project:${Kt.id}`}`):h.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:h.jsx(fh,{children:h.jsxs("div",{className:"wt-empty flex flex-col items-center gap-2.5 py-12 px-6 text-center text-muted [&_>_svg]:text-subtext [&_p]:m-0 [&_p]:max-w-80 [&_p]:text-sm",children:[h.jsx(mO,{size:22}),h.jsx("p",{children:Zte()})]})})})}):En?h.jsx(Fa,{children:n&&h.jsx(KCt,{remote:e.kind==="ssh",restored:C.current.has(Ns(n,u,En)),onRestoreActivated:()=>{const X=Ns(n,u,En);C.current.delete(X),N.current.add(X)},showSource:E.current[Ns(n,u,En)]??!1,onShowSourceChange:X=>{E.current[Ns(n,u,En)]=X,z(pe=>pe+1)},projectId:n,path:En.path,source:En.source,sessionId:En.source==="artifacts"?u??void 0:En.sessionId,gitRef:En.ref,line:En.line,branchLabel:SAt(En,Kt==null?void 0:Kt.baselineBranch),artifactVersion:Ru,artifactEntries:En.source==="artifacts"?De==null?void 0:De.entries:void 0,bufferSession:qe(Ns(n,u,En)),onOpenFile:(X,pe,we,Me)=>Ms(En,()=>La(X,pe,we,void 0,void 0,void 0,Me)),scrollPosition:gt.current.get(Ns(n,u,En)),onScrollPositionChange:X=>{gt.current.set(Ns(n,u,En),X),Rs()},lineScrollRequest:En.lineScrollRequest,onLineScrollRequestHandled:()=>zu(En),onEdit:()=>Br(En)},Ns(n,u,En))}):ps?h.jsx(Fa,{children:h.jsx("div",{className:"pane-content flex-1 min-h-0 relative plan-tab-content overflow-y-auto bg-background py-4.5 px-6 [&_.md]:max-w-readable",children:h.jsx(Oo,{text:(cc==null?void 0:cc.key)===`${ps.sessionId}:${ps.promptId}`?cc.text??Ol():((Be=ft.find(X=>X.promptId===ps.promptId))==null?void 0:Be.plan)||ZM(),onOpenFile:(X,pe,we,Me,Ce)=>Ms(ps,()=>La(X,ps.sessionId,Me,pe,we,void 0,Ce))})})}):os?h.jsx(y6t,{sessionId:os.sessionId,spawnPartId:os.spawnPartId,onOpenFile:(X,pe,we,Me,Ce)=>Ms(os,()=>sc(X,os.sessionId,pe,we,Me,Ce)),onOpenRun:(X,pe)=>Ms(os,()=>ai(X,pe)),runExperimentName:td,onOpenExperiment:(X,pe)=>Ms(os,()=>Da(X,pe)),experimentName:tl,onOpenSubagent:(X,pe,we)=>Ms(os,()=>sd(os.sessionId,X,pe,we))},os.spawnPartId):ls?h.jsx(Fa,{children:n&&Kt&&ls&&fo&&h.jsx(Q7t,{projectId:n,project:Kt,experiment:fo,view:ls.view,toggled:ls.toggled,onViewChange:X=>Tu(ls,{view:X}),onToggledChange:X=>Tu(ls,{toggled:X}),onOpenFile:(X,pe,we,Me)=>Ms(ls,()=>La(X,pe,we,void 0,void 0,fo.branchName,Me))},`code:${ls.branch}`)}):h.jsx(Fa,{children:Ds&&oa&&Kt&&h.jsx(wCt,{experiment:oa,project:Kt,view:Ds.view,runs:Ge,selectedRunId:f,onSelectRun:U,parentExperiment:ue.find(X=>X.id===oa.parentExperimentId)??null,onOpenView:(X,pe,we)=>{Ms(Ds,()=>xr(oa.id,X,we,pe))},onOpenCode:(X,pe)=>Ms(Ds,()=>ac(oa.id,oa.branchName,X,pe))},`${Ds.id}:${Ds.view}`)})]})]}),bs&&h.jsx(CO,{remote:e.kind==="ssh",onClose:()=>st(!1),onCreated:(X,pe)=>{st(!1),od(X,pe)}}),hr&&Kt&&Gc(Kt.id)&&h.jsx(XCt,{onClose:ra,onCreateProject:oo})]})}const h3=$o()({validateSearch:e=>({pane:c6(e.pane)}),beforeLoad:({location:e})=>{if(!Df(e.pathname))throw DG()},component:RAt});function RAt(){const{projectId:e}=h3.useParams(),{pane:n}=h3.useSearch(),t=ri(),r=PM({select:s=>s.location});return M.useEffect(()=>{const s=MAt(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),h.jsxs(h.Fragment,{children:[h.jsx(U0,{}),h.jsx(AAt,{projectId:e,pane:n,runtime:sO()},e)]})}function MAt(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&c6(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const ZH=$o()({component:DAt});function DAt(){const{projectId:e}=ZH.useParams();return h.jsx(L0t,{projectId:e})}const LAt=$o()({}),OAt=$o()({}),IAt=$o()({}),BAt=$o()({}),$At=I0t.update({id:"/",path:"/",getParentRoute:()=>tb}),Ek=B0t.update({id:"/projects",path:"/projects",getParentRoute:()=>tb}),PAt=$0t.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>tb}),FAt=P0t.update({id:"/",path:"/",getParentRoute:()=>Ek}),h_=h3.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>Ek}),HAt=ZH.update({id:"/",path:"/",getParentRoute:()=>h_}),qAt=LAt.update({id:"/skills",path:"/skills",getParentRoute:()=>h_}),UAt=OAt.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>h_}),GAt=IAt.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>h_}),WAt=BAt.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>h_}),VAt={ProjectsProjectIdSkillsRoute:qAt,ProjectsProjectIdIndexRoute:HAt,ProjectsProjectIdSettingsTabRoute:UAt,ProjectsProjectIdTasksSessionIdRoute:GAt,ProjectsProjectIdTasksNewRoute:WAt},KAt=h_._addFileChildren(VAt),QAt={ProjectsProjectIdRoute:KAt,ProjectsIndexRoute:FAt},YAt=Ek._addFileChildren(QAt),XAt={IndexRoute:$At,ProjectsRoute:YAt,RemoteLaunchRoute:PAt},ZAt=tb._addFileChildren(XAt)._addFileTypes(),JAt=nV({routeTree:ZAt,context:{queryClient:Je},trailingSlash:"never",defaultPendingComponent:E6,defaultErrorComponent:N6,defaultNotFoundComponent:M0t}),eRt=T();document.documentElement.lang=eRt;document.documentElement.dir="ltr";uG.createRoot(document.getElementById("root")).render(h.jsxs(M.StrictMode,{children:[h.jsx(kU,{client:Je,children:h.jsx(iV,{router:JAt})}),h.jsx(bdt,{})]})); diff --git a/ui/dist/assets/index-CKPCs98X.css b/ui/dist/assets/index-CKPCs98X.css new file mode 100644 index 00000000..999afc57 --- /dev/null +++ b/ui/dist/assets/index-CKPCs98X.css @@ -0,0 +1 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--spacing:.25rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:6px;--radius-md:8px;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-diff-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-selection:color-mix(in oklab, var(--surface) 76%, var(--primary))}}:root,:host{--color-diff-gutter-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-gutter-selection:color-mix(in oklab, var(--surface) 68%, var(--primary))}}:root,:host{--color-diff-insert-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-gutter:color-mix(in oklab, var(--base) 84%, var(--accent-green))}}:root,:host{--color-diff-delete-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-gutter:color-mix(in oklab, var(--base) 86%, var(--accent-red))}}:root,:host{--color-diff-insert-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-code:color-mix(in oklab, var(--base) 91%, var(--accent-green))}}:root,:host{--color-diff-delete-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-code:color-mix(in oklab, var(--base) 92%, var(--accent-red))}}:root,:host{--color-diff-insert-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-edit:color-mix(in oklab, var(--base) 72%, var(--accent-green))}}:root,:host{--color-diff-delete-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-edit:color-mix(in oklab, var(--base) 78%, var(--accent-red))}}:root,:host{--color-diff-omit-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-omit-gutter:color-mix(in oklab, var(--base) 86%, var(--text))}}}@layer base{*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--base);color:var(--text);font-family:var(--sans);font-size:1rem;line-height:1.45;overflow:hidden}::selection{background:var(--highlight)}.chat-thread-inner ::selection{background:var(--chat-annotation-highlight)}::highlight(chat-annotations){background:var(--chat-annotation-highlight)}.file-view-editarea::selection{background:var(--editor-selection)}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:none;padding:0}input,textarea,select{font:inherit;color:var(--text);background:var(--base);border:1px solid var(--border);border-radius:var(--radius-md);outline:none;padding:6px 10px}input:focus,textarea:focus,select:focus{border-color:var(--text)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--border);border-radius:var(--radius-sm);background-clip:padding-box;border:2px solid #0000}::-webkit-scrollbar-track{background:0 0}}@layer vendor{.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-color-default:inherit;--xy-node-border-default:1px solid #1a192b;--xy-node-background-color-default:#fff;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #00000014;--xy-node-boxshadow-selected-default:0 0 0 .5px #1a192b;--xy-node-border-radius-default:3px;--xy-handle-background-color-default:#1a192b;--xy-handle-border-color-default:#fff;--xy-selection-background-color-default:#0059dc14;--xy-selection-border-default:1px dotted #0059dccc;--xy-controls-button-background-color-default:#fefefe;--xy-controls-button-background-color-hover-default:#f4f4f4;--xy-controls-button-color-default:inherit;--xy-controls-button-color-hover-default:inherit;--xy-controls-button-border-color-default:#eee;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#fff;--xy-edge-label-color-default:inherit;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8;--xy-node-border-default:1px solid #3c3c3c;--xy-node-background-color-default:#1e1e1e;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #ffffff14;--xy-node-boxshadow-selected-default:0 0 0 .5px #999;--xy-handle-background-color-default:#bebebe;--xy-handle-border-color-default:#1e1e1e;--xy-selection-background-color-default:#c8c8dc14;--xy-selection-border-default:1px dotted #c8c8dccc;--xy-controls-button-background-color-default:#2b2b2b;--xy-controls-button-background-color-hover-default:#3e3e3e;--xy-controls-button-color-default:#f8f8f8;--xy-controls-button-color-hover-default:#fff;--xy-controls-button-border-color-default:#5b5b5b;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#141414;--xy-edge-label-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color,var(--xy-handle-border-color-default));border-radius:100%;width:6px;min-width:5px;height:6px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{box-shadow:var(--xy-controls-box-shadow,var(--xy-controls-box-shadow-default));flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{background:var(--xy-controls-button-background-color,var(--xy-controls-button-background-color-default));border:none;border-bottom:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)));width:26px;height:26px;color:var(--xy-controls-button-color-props,var(--xy-controls-button-color,var(--xy-controls-button-color-default)));cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border-radius:var(--xy-node-border-radius,var(--xy-node-border-radius-default));width:150px;color:var(--xy-node-color,var(--xy-node-color-default));text-align:center;border:var(--xy-node-border,var(--xy-node-border-default));background-color:var(--xy-node-background-color,var(--xy-node-background-color-default));padding:10px;font-size:12px}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover,var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected,var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color,var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var(--xy-controls-button-background-color-hover-props,var(--xy-controls-button-background-color-hover,var(--xy-controls-button-background-color-hover-default)));color:var(--xy-controls-button-color-hover-props,var(--xy-controls-button-color-hover,var(--xy-controls-button-color-hover-default)))}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)))}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color,var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color,var(--xy-edge-label-color-default))}.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2)format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff)format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff)format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff)format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2)format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff)format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2)format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff)format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2)format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff)format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2)format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff)format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2)format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff)format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2)format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff)format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff)format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff)format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff)format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2)format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff)format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2)format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff)format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2)format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff)format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC)format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff)format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2)format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff)format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2)format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff)format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif;position:relative}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{clip-path:inset(50%);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{line-height:0;display:inline}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo}:root{--diff-background-color:initial;--diff-text-color:initial;--diff-font-family:Consolas,Courier,monospace;--diff-selection-background-color:#b3d7ff;--diff-selection-text-color:var(--diff-text-color);--diff-gutter-insert-background-color:#d6fedb;--diff-gutter-insert-text-color:var(--diff-text-color);--diff-gutter-delete-background-color:#fadde0;--diff-gutter-delete-text-color:var(--diff-text-color);--diff-gutter-selected-background-color:#fffce0;--diff-gutter-selected-text-color:var(--diff-text-color);--diff-code-insert-background-color:#eaffee;--diff-code-insert-text-color:var(--diff-text-color);--diff-code-delete-background-color:#fdeff0;--diff-code-delete-text-color:var(--diff-text-color);--diff-code-insert-edit-background-color:#c0dc91;--diff-code-insert-edit-text-color:var(--diff-text-color);--diff-code-delete-edit-background-color:#f39ea2;--diff-code-delete-edit-text-color:var(--diff-text-color);--diff-code-selected-background-color:#fffce0;--diff-code-selected-text-color:var(--diff-text-color);--diff-omit-gutter-line-color:#cb2a1d}.diff{background-color:var(--diff-background-color);border-collapse:collapse;color:var(--diff-text-color);table-layout:fixed;width:100%}.diff::selection{background-color:#b3d7ff;background-color:var(--diff-selection-background-color);color:var(--diff-selection-text-color)}.diff td{vertical-align:top;padding-top:0;padding-bottom:0}.diff-line{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);line-height:1.5}.diff-gutter>a{color:inherit;display:block}.diff-gutter{cursor:pointer;text-align:right;-webkit-user-select:none;user-select:none;padding:0 1ch}.diff-gutter-insert{background-color:#d6fedb;background-color:var(--diff-gutter-insert-background-color);color:var(--diff-gutter-insert-text-color)}.diff-gutter-delete{background-color:#fadde0;background-color:var(--diff-gutter-delete-background-color);color:var(--diff-gutter-delete-text-color)}.diff-gutter-omit{cursor:default}.diff-gutter-selected{background-color:#fffce0;background-color:var(--diff-gutter-selected-background-color);color:var(--diff-gutter-selected-text-color)}.diff-code{word-wrap:break-word;white-space:pre-wrap;word-break:break-all;padding:0 0 0 .5em}.diff-code-edit{color:inherit}.diff-code-insert{background-color:#eaffee;background-color:var(--diff-code-insert-background-color);color:var(--diff-code-insert-text-color)}.diff-code-insert .diff-code-edit{background-color:#c0dc91;background-color:var(--diff-code-insert-edit-background-color);color:var(--diff-code-insert-edit-text-color)}.diff-code-delete{background-color:#fdeff0;background-color:var(--diff-code-delete-background-color);color:var(--diff-code-delete-text-color)}.diff-code-delete .diff-code-edit{background-color:#f39ea2;background-color:var(--diff-code-delete-edit-background-color);color:var(--diff-code-delete-edit-text-color)}.diff-code-selected{background-color:#fffce0;background-color:var(--diff-code-selected-background-color);color:var(--diff-code-selected-text-color)}.diff-widget-content{vertical-align:top}.diff-gutter-col{width:7ch}.diff-gutter-omit{height:0}.diff-gutter-omit:before{background-color:#cb2a1d;background-color:var(--diff-omit-gutter-line-color);content:" ";white-space:pre;width:2px;height:100%;margin-left:4.6ch;display:block;overflow:hidden}.diff-decoration{-webkit-user-select:none;user-select:none;line-height:1.5}.diff-decoration-content{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);padding:0}}@layer components;@layer utilities{.\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-14{inset:calc(var(--spacing) * -14)}.-inset-\[7px\]{top:-7px;right:-7px;bottom:-7px;left:-7px}.inset-0{top:0;right:0;bottom:0;left:0}.inset-auto{inset:auto}.inset-y-0{inset-block:0}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.start-2{inset-inline-start:calc(var(--spacing) * 2)}.start-3{inset-inline-start:calc(var(--spacing) * 3)}.-end-\[3px\]{inset-inline-end:-3px}.end-0{inset-inline-end:calc(var(--spacing) * 0)}.end-1\.5{inset-inline-end:calc(var(--spacing) * 1.5)}.end-3{inset-inline-end:calc(var(--spacing) * 3)}.end-3\.5{inset-inline-end:calc(var(--spacing) * 3.5)}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-3{top:calc(var(--spacing) * 3)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-7{top:calc(var(--spacing) * 7)}.top-\[calc\(100\%_\+_6px\)\]{top:calc(100% + 6px)}.bottom-0{bottom:0}.bottom-\[calc\(100\%_\+_4px\)\]{bottom:calc(100% + 4px)}.bottom-\[calc\(100\%_\+_6px\)\]{bottom:calc(100% + 6px)}.bottom-\[calc\(100\%_\+_8px\)\]{bottom:calc(100% + 8px)}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-2{z-index:2}.z-4{z-index:4}.z-5{z-index:5}.z-6{z-index:6}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-60{z-index:60}.z-70{z-index:70}.z-100{z-index:100}.z-200{z-index:200}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.m-3{margin:calc(var(--spacing) * 3)}.m-5{margin:calc(var(--spacing) * 5)}.m-auto{margin:auto}.mx-0{margin-inline:0}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.-my-0\.5{margin-block:calc(var(--spacing) * -.5)}.my-0{margin-block:0}.my-2{margin-block:calc(var(--spacing) * 2)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-3\.5{margin-block:calc(var(--spacing) * 3.5)}.my-\[5px\]{margin-block:5px}.ms-0{margin-inline-start:0}.ms-1{margin-inline-start:var(--spacing)}.ms-2{margin-inline-start:calc(var(--spacing) * 2)}.ms-3\.5{margin-inline-start:calc(var(--spacing) * 3.5)}.ms-6{margin-inline-start:calc(var(--spacing) * 6)}.ms-auto{margin-inline-start:auto}.me-0{margin-inline-end:0}.me-2{margin-inline-end:calc(var(--spacing) * 2)}.me-3\.5{margin-inline-end:calc(var(--spacing) * 3.5)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-4\.5{margin-top:calc(var(--spacing) * 4.5)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-5\.5{margin-top:calc(var(--spacing) * 5.5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\[5px\]{margin-top:5px}.mt-\[13px\]{margin-top:13px}.mt-auto{margin-top:auto}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-4\.5{margin-bottom:calc(var(--spacing) * 4.5)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-5\.5{margin-bottom:calc(var(--spacing) * 5.5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.box-border{box-sizing:border-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.field-sizing-content{field-sizing:content}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-10\.5{height:calc(var(--spacing) * 10.5)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-40{height:calc(var(--spacing) * 40)}.h-80{height:calc(var(--spacing) * 80)}.h-\[7px\]{height:7px}.h-\[9px\]{height:9px}.h-\[13px\]{height:13px}.h-\[15px\]{height:15px}.h-\[min\(42rem\,calc\(100vh-2\.5rem\)\)\]{height:min(42rem,100vh - 2.5rem)}.h-\[min\(48rem\,calc\(100vh-2\.5rem\)\)\]{height:min(48rem,100vh - 2.5rem)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-45{max-height:calc(var(--spacing) * 45)}.max-h-50{max-height:calc(var(--spacing) * 50)}.max-h-65{max-height:calc(var(--spacing) * 65)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-85{max-height:calc(var(--spacing) * 85)}.max-h-95{max-height:calc(var(--spacing) * 95)}.max-h-100{max-height:calc(var(--spacing) * 100)}.max-h-\[calc\(100vh_-_40px\)\]{max-height:calc(100vh - 40px)}.max-h-\[calc\(100vh_-_var\(--modal-top\)_-_48px\)\]{max-height:calc(100vh - var(--modal-top) - 48px)}.max-h-\[calc\(100vh_-_var\(--new-project-modal-top\)_-_1\.25rem\)\]{max-height:calc(100vh - var(--new-project-modal-top) - 1.25rem)}.max-h-\[min\(70vh\,_720px\)\]{max-height:min(70vh,720px)}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-19\.5{min-height:calc(var(--spacing) * 19.5)}.min-h-22{min-height:calc(var(--spacing) * 22)}.min-h-41{min-height:calc(var(--spacing) * 41)}.min-h-dvh{min-height:100dvh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\/5{width:40%}.w-4{width:calc(var(--spacing) * 4)}.w-4\/5{width:80%}.w-5{width:calc(var(--spacing) * 5)}.w-6\.5{width:calc(var(--spacing) * 6.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-9\.5{width:calc(var(--spacing) * 9.5)}.w-10{width:calc(var(--spacing) * 10)}.w-10\.5{width:calc(var(--spacing) * 10.5)}.w-37{width:calc(var(--spacing) * 37)}.w-40{width:calc(var(--spacing) * 40)}.w-52{width:calc(var(--spacing) * 52)}.w-52\.5{width:calc(var(--spacing) * 52.5)}.w-60{width:calc(var(--spacing) * 60)}.w-66{width:calc(var(--spacing) * 66)}.w-68{width:calc(var(--spacing) * 68)}.w-70{width:calc(var(--spacing) * 70)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-110{width:calc(var(--spacing) * 110)}.w-120{width:calc(var(--spacing) * 120)}.w-140{width:calc(var(--spacing) * 140)}.w-160{width:calc(var(--spacing) * 160)}.w-200{width:calc(var(--spacing) * 200)}.w-\[7px\]{width:7px}.w-\[9px\]{width:9px}.w-\[13px\]{width:13px}.w-\[15px\]{width:15px}.w-\[min\(440px\,_calc\(100vw_-_48px\)\)\]{width:min(440px,100vw - 48px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-36{max-width:calc(var(--spacing) * 36)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-55{max-width:calc(var(--spacing) * 55)}.max-w-60{max-width:calc(var(--spacing) * 60)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-65{max-width:calc(var(--spacing) * 65)}.max-w-68{max-width:calc(var(--spacing) * 68)}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-105{max-width:calc(var(--spacing) * 105)}.max-w-120{max-width:calc(var(--spacing) * 120)}.max-w-155{max-width:calc(var(--spacing) * 155)}.max-w-160{max-width:calc(var(--spacing) * 160)}.max-w-230{max-width:calc(var(--spacing) * 230)}.max-w-290{max-width:calc(var(--spacing) * 290)}.max-w-\[88\%\]{max-width:88%}.max-w-\[94vw\]{max-width:94vw}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-\[calc\(100vw_-_40px\)\]{max-width:calc(100vw - 40px)}.max-w-full{max-width:100%}.max-w-readable{max-width:var(--readable-col)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-47\.5{min-width:calc(var(--spacing) * 47.5)}.min-w-55{min-width:calc(var(--spacing) * 55)}.min-w-57\.5{min-width:calc(var(--spacing) * 57.5)}.min-w-60{min-width:calc(var(--spacing) * 60)}.min-w-80{min-width:calc(var(--spacing) * 80)}.min-w-85{min-width:calc(var(--spacing) * 85)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[or-pulse_1\.2s_ease-in-out_infinite\]{animation:1.2s ease-in-out infinite or-pulse}.animate-\[spin_0\.8s_linear_infinite\]{animation:.8s linear infinite spin}.animate-\[spin_0\.9s_linear_infinite\]{animation:.9s linear infinite spin}.animate-\[title-char-in_240ms_ease-out_both\]{animation:.24s ease-out both title-char-in}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-e-resize{cursor:e-resize}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.\[scrollbar-width\:none\]{scrollbar-width:none}.\[scrollbar-gutter\:stable\]{scrollbar-gutter:stable}.\[scrollbar-gutter\:stable_both-edges\]{scrollbar-gutter:stable both-edges}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[2rem_minmax\(0\,1fr\)_2rem\]{grid-template-columns:2rem minmax(0,1fr) 2rem}.grid-cols-\[8\.5rem_5rem\]{grid-template-columns:8.5rem 5rem}.grid-cols-\[9rem_minmax\(0\,1fr\)\]{grid-template-columns:9rem minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)\]{grid-template-columns:24px minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)_28px\]{grid-template-columns:24px minmax(0,1fr) 28px}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[minmax\(0\,1fr\)_9rem_9rem_minmax\(18rem\,max-content\)\]{grid-template-columns:minmax(0,1fr) 9rem 9rem minmax(18rem,max-content)}.grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(12rem\,18rem\)_minmax\(12rem\,18rem\)\]{grid-template-columns:minmax(12rem,18rem) minmax(12rem,18rem)}.grid-cols-\[minmax\(180px\,_260px\)_minmax\(0\,_1fr\)\]{grid-template-columns:minmax(180px,260px) minmax(0,1fr)}.grid-cols-\[repeat\(2\,_minmax\(0\,_1fr\)\)\]{grid-template-columns:repeat(2,minmax(0,1fr))}.\!flex-col{flex-direction:column!important}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.\!items-stretch{align-items:stretch!important}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-4\.5{gap:calc(var(--spacing) * 4.5)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\[0\.4em\]{gap:.4em}.gap-\[3px\]{gap:3px}.gap-\[5px\]{gap:5px}.gap-\[7px\]{gap:7px}.gap-\[9px\]{gap:9px}.gap-px{gap:1px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.gap-x-4\.5{column-gap:calc(var(--spacing) * 4.5)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-x-12{column-gap:calc(var(--spacing) * 12)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2\.5{row-gap:calc(var(--spacing) * 2.5)}.gap-y-\[3px\]{row-gap:3px}.gap-y-\[7px\]{row-gap:7px}.gap-y-\[9px\]{row-gap:9px}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border-variant>:not(:last-child)){border-color:var(--border-variant)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[3px\]{border-radius:3px}.rounded-\[16px\]{border-radius:16px}.rounded-\[inherit\]{border-radius:inherit}.rounded-\[var\(--radius-md\)_var\(--radius-md\)_0_0\]{border-radius:var(--radius-md) var(--radius-md) 0 0}.rounded-full{border-radius:999px}.rounded-lg{border-radius:10px}.rounded-md{border-radius:8px}.rounded-none{border-radius:0}.rounded-sm{border-radius:6px}.rounded-xl{border-radius:12px}.rounded-xs{border-radius:4px}.rounded-s-none{border-start-start-radius:0;border-end-start-radius:0}.rounded-e-none{border-start-end-radius:0;border-end-end-radius:0}.rounded-b-lg{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-x-0{border-inline-style:var(--tw-border-style);border-inline-width:0}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-s-\[3px\]{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-solid{--tw-border-style:solid;border-style:solid}.border-accent-amber,.border-accent-amber\/45{border-color:var(--accent-amber)}@supports (color:color-mix(in lab,red,red)){.border-accent-amber\/45{border-color:color-mix(in oklab,var(--accent-amber) 45%,transparent)}}.border-accent-blue,.border-accent-blue\/45{border-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.border-accent-blue\/45{border-color:color-mix(in oklab,var(--accent-blue) 45%,transparent)}}.border-accent-green,.border-accent-green\/45{border-color:var(--accent-green)}@supports (color:color-mix(in lab,red,red)){.border-accent-green\/45{border-color:color-mix(in oklab,var(--accent-green) 45%,transparent)}}.border-accent-red{border-color:var(--accent-red)}.border-border{border-color:var(--border)}.border-border-strong{border-color:var(--border-strong)}.border-border-variant{border-color:var(--border-variant)}.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.border-primary,.border-primary\/45{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,var(--primary) 45%,transparent)}}.border-transparent{border-color:#0000}.border-s-accent-blue{border-inline-start-color:var(--accent-blue)}.border-s-accent-red{border-inline-start-color:var(--accent-red)}.border-s-border{border-inline-start-color:var(--border)}.border-s-border-variant{border-inline-start-color:var(--border-variant)}.border-s-plan-caret{border-inline-start-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.border-s-plan-caret{border-inline-start-color:color-mix(in oklab,var(--base) 35%,var(--text))}}.border-e-border-variant{border-inline-end-color:var(--border-variant)}.border-t-border{border-top-color:var(--border)}.border-t-border-variant{border-top-color:var(--border-variant)}.border-t-primary{border-top-color:var(--primary)}.border-b-accent-amber{border-bottom-color:var(--accent-amber)}.border-b-border{border-bottom-color:var(--border)}.border-b-border-variant{border-bottom-color:var(--border-variant)}.border-b-divider-subtle{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.border-b-divider-subtle{border-bottom-color:color-mix(in oklab,var(--text) 7%,transparent)}}.bg-accent{background-color:var(--accent)}.bg-accent-amber{background-color:var(--accent-amber)}.bg-accent-amber-subtle{background-color:var(--accent-amber-subtle)}.bg-accent-blue{background-color:var(--accent-blue)}.bg-accent-blue-subtle{background-color:var(--accent-blue-subtle)}.bg-accent-green{background-color:var(--accent-green)}.bg-accent-green-subtle{background-color:var(--accent-green-subtle)}.bg-accent-red{background-color:var(--accent-red)}.bg-accent-red-subtle{background-color:var(--accent-red-subtle)}.bg-accent-teal{background-color:var(--accent-teal)}.bg-background{background-color:var(--base)}.bg-border-variant{background-color:var(--border-variant)}.bg-canvas{background-color:var(--canvas)}.bg-current{background-color:currentColor}.bg-hover-faint{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-faint{background-color:color-mix(in oklab,var(--text) 3%,transparent)}}.bg-hover-muted{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-muted{background-color:color-mix(in oklab,var(--text) 8%,transparent)}}.bg-hover-subtle{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-subtle{background-color:color-mix(in oklab,var(--text) 10%,transparent)}}.bg-modal-backdrop{background-color:#1d1b1a6b}.bg-modal-backdrop-light{background-color:#1d1b1a66}.bg-muted{background-color:var(--muted)}.bg-panel{background-color:var(--panel)}.bg-primary{background-color:var(--primary)}.bg-primary-subtle{background-color:var(--primary-subtle)}.bg-skill-blue-subtle{background-color:var(--skill-blue-subtle)}.bg-surface{background-color:var(--surface)}.bg-surface-bright{background-color:var(--surface-bright)}.bg-terminal{background-color:var(--term-bg)}.bg-text{background-color:var(--text)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.bg-none{background-image:none}.object-contain{object-fit:contain}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.p-\[1\.5px\]{padding:1.5px}.p-\[3px\]{padding:3px}.p-\[5px\]{padding:5px}.p-px{padding:1px}.px-0{padding-inline:0}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[9px\]{padding-inline:9px}.px-\[11px\]{padding-inline:11px}.px-\[13px\]{padding-inline:13px}.px-\[15px\]{padding-inline:15px}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-4\.5{padding-block:calc(var(--spacing) * 4.5)}.py-5\.5{padding-block:calc(var(--spacing) * 5.5)}.py-6\.5{padding-block:calc(var(--spacing) * 6.5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-\[3px\]{padding-block:3px}.py-\[5px\]{padding-block:5px}.py-\[7px\]{padding-block:7px}.py-\[9px\]{padding-block:9px}.py-\[11px\]{padding-block:11px}.py-px{padding-block:1px}.ps-1{padding-inline-start:var(--spacing)}.ps-1\.5{padding-inline-start:calc(var(--spacing) * 1.5)}.ps-2{padding-inline-start:calc(var(--spacing) * 2)}.ps-2\.5{padding-inline-start:calc(var(--spacing) * 2.5)}.ps-3{padding-inline-start:calc(var(--spacing) * 3)}.ps-4{padding-inline-start:calc(var(--spacing) * 4)}.ps-4\.5{padding-inline-start:calc(var(--spacing) * 4.5)}.ps-5{padding-inline-start:calc(var(--spacing) * 5)}.ps-\[2ch\]{padding-inline-start:2ch}.ps-\[31px\]{padding-inline-start:31px}.pe-0{padding-inline-end:0}.pe-1{padding-inline-end:var(--spacing)}.pe-1\.5{padding-inline-end:calc(var(--spacing) * 1.5)}.pe-2{padding-inline-end:calc(var(--spacing) * 2)}.pe-2\.5{padding-inline-end:calc(var(--spacing) * 2.5)}.pe-4{padding-inline-end:calc(var(--spacing) * 4)}.pe-8{padding-inline-end:calc(var(--spacing) * 8)}.pe-10{padding-inline-end:calc(var(--spacing) * 10)}.pe-14{padding-inline-end:calc(var(--spacing) * 14)}.pe-\[1ch\]{padding-inline-end:1ch}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-4\.5{padding-top:calc(var(--spacing) * 4.5)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-6\.5{padding-top:calc(var(--spacing) * 6.5)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pt-\[var\(--modal-top\)\]{padding-top:var(--modal-top)}.pt-\[var\(--new-project-modal-top\)\]{padding-top:var(--new-project-modal-top)}.pb-0{padding-bottom:0}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-15{padding-bottom:calc(var(--spacing) * 15)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.pl-\[2ch\]{padding-left:2ch}.text-center{text-align:center}.text-end{text-align:end}.text-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.font-\[inherit\]{font-family:inherit}.font-mono{font-family:var(--mono)}.font-sans{font-family:var(--sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-menu{font-size:.8125rem;line-height:var(--tw-leading,1.25rem)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-0{--tw-leading:0px;line-height:0}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[1\.3\]{--tw-leading:1.3;line-height:1.3}.leading-\[1\.4\]{--tw-leading:1.4;line-height:1.4}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.08\]{--tw-leading:1.08;line-height:1.08}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-\[1\.55\]{--tw-leading:1.55;line-height:1.55}.leading-\[1\.62\]{--tw-leading:1.62;line-height:1.62}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\!font-medium{--tw-font-weight:var(--font-weight-medium)!important;font-weight:var(--font-weight-medium)!important}.\!font-normal{--tw-font-weight:var(--font-weight-normal)!important;font-weight:var(--font-weight-normal)!important}.font-\[375\]{--tw-font-weight:375;font-weight:375}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.01em\]{--tw-tracking:-.01em;letter-spacing:-.01em}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[-0\.015em\]{--tw-tracking:-.015em;letter-spacing:-.015em}.tracking-\[-0\.035em\]{--tw-tracking:-.035em;letter-spacing:-.035em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-accent-red{color:var(--accent-red)!important}.text-accent-amber{color:var(--accent-amber)}.text-accent-blue{color:var(--accent-blue)}.text-accent-green{color:var(--accent-green)}.text-accent-orange{color:var(--accent-orange)}.text-accent-purple{color:var(--accent-purple)}.text-accent-red{color:var(--accent-red)}.text-accent-teal{color:var(--accent-teal)}.text-background{color:var(--base)}.text-inherit{color:inherit}.text-muted{color:var(--muted)}.text-primary{color:var(--primary)}.text-skill-blue{color:var(--skill-blue)}.text-skill-blue-slash{color:var(--skill-blue-slash)}.text-subtext{color:var(--subtext)}.text-text{color:var(--text)}.text-transparent{color:#0000}.text-white{color:#fff}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-border-strong{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.underline-offset-2{text-underline-offset:2px}.underline-offset-3{text-underline-offset:3px}.caret-text{caret-color:var(--text)}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-50{opacity:.5}.opacity-52{opacity:.52}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,color-mix(in oklab, var(--text) 6%, transparent))}}.shadow-card{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control-subtle{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-dropdown{--tw-shadow:0 10px 26px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,var(--text)), 0 1px 4px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,color-mix(in oklab, var(--text) 5%, transparent)), 0 1px 4px var(--tw-shadow-color,color-mix(in oklab, var(--text) 4%, transparent))}}.shadow-elevated{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-file-line{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--accent-blue));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-floating{--tw-shadow:0 8px 24px var(--tw-shadow-color,#00000024);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-hairline{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-logo{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-menu{--tw-shadow:0 12px 32px var(--tw-shadow-color,#0000002e);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-modal{--tw-shadow:0 24px 60px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan{--tw-shadow:0 2px 10px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan-menu{--tw-shadow:0 6px 20px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-popover{--tw-shadow:0 4px 16px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-tree{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\,color\]{transition-property:background,border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\]{transition-property:background,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,color\]{transition-property:background,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,background\]{transition-property:border-color,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,box-shadow\]{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,color\]{transition-property:border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[box-shadow\]{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,color\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-80{--tw-duration:80ms;transition-duration:80ms}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-standard{--tw-ease:ease;transition-timing-function:ease}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[--new-project-modal-top\:clamp\(4rem\,20vh\,24rem\)\]{--new-project-modal-top:clamp(4rem, 20vh, 24rem)}.\[font\:inherit\]{font:inherit}.\[grid-area\:actions\]{grid-area:actions}.\[grid-area\:meta\]{grid-area:meta}.\[grid-area\:name\]{grid-area:name}.\[grid-template-areas\:\'name_meta\'_\'actions_actions\'\]{grid-template-areas:"name meta""actions actions"}.group-focus-within\:pointer-events-auto:is(:where(.group):focus-within *){pointer-events:auto}.group-focus-within\:opacity-100:is(:where(.group):focus-within *),.group-focus-within\/turn\:opacity-100:is(:where(.group\/turn):focus-within *){opacity:1}@media(hover:hover){.group-hover\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/skill\:opacity-100:is(:where(.group\/skill):hover *),.group-hover\/turn\:opacity-100:is(:where(.group\/turn):hover *){opacity:1}}.group-focus-visible\:opacity-0:is(:where(.group):focus-visible *){opacity:0}.group-focus-visible\:opacity-100:is(:where(.group):focus-visible *){opacity:1}.placeholder\:text-muted::placeholder{color:var(--muted)}.backdrop\:bg-modal-backdrop-light::backdrop{background-color:#1d1b1a66}.before\:content-\[attr\(data-line\)\]:before{--tw-content:attr(data-line);content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-0:after{content:var(--tw-content);inset-inline-start:calc(var(--spacing) * 0)}.after\:end-0:after{content:var(--tw-content);inset-inline-end:calc(var(--spacing) * 0)}.after\:top-full:after{content:var(--tw-content);top:100%}.after\:h-2:after{content:var(--tw-content);height:calc(var(--spacing) * 2)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:bg-surface-bright:focus-within{background-color:var(--surface-bright)}@media(hover:hover){.hover\:border-border-strong:hover{border-color:var(--border-strong)}.hover\:border-text:hover{border-color:var(--text)}.hover\:bg-skill-blue-subtle:hover{background-color:var(--skill-blue-subtle)}.hover\:bg-surface:hover{background-color:var(--surface)}.hover\:bg-surface-bright:hover{background-color:var(--surface-bright)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-accent-red:hover{color:var(--accent-red)}.hover\:text-primary-hover:hover{color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary-hover:hover{color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.hover\:text-text:hover{color:var(--text)}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-primary:hover{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}}.focus\:pointer-events-auto:focus{pointer-events:auto}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:border-text:focus{border-color:var(--text)}.focus\:opacity-100:focus,.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-text:focus-visible{outline-color:var(--text)}.focus-visible\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.disabled\:cursor-default:disabled{cursor:default}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:1120px){.min-\[1120px\]\:col-start-1{grid-column-start:1}.min-\[1120px\]\:col-start-2{grid-column-start:2}.min-\[1120px\]\:row-start-1{grid-row-start:1}.min-\[1120px\]\:row-start-2{grid-row-start:2}.min-\[1120px\]\:mt-0{margin-top:0}.min-\[1120px\]\:grid{display:grid}.min-\[1120px\]\:grid-cols-\[minmax\(0\,_1\.1fr\)_minmax\(28rem\,_1fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(28rem,1fr)}.min-\[1120px\]\:grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.min-\[1120px\]\:content-center{align-content:center}.min-\[1120px\]\:gap-x-20{column-gap:calc(var(--spacing) * 20)}.min-\[1120px\]\:gap-y-10{row-gap:calc(var(--spacing) * 10)}.min-\[1120px\]\:self-end{align-self:flex-end}.min-\[1120px\]\:self-start{align-self:flex-start}}@media(min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-12{padding-inline:calc(var(--spacing) * 12)}}@media(min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&_\+_\.settings-stack-section\]\:mt-6+.settings-stack-section{margin-top:calc(var(--spacing) * 6)}.\[\&_\.actions\]\:mt-1\.5 .actions{margin-top:calc(var(--spacing) * 1.5)}.\[\&_\.actions\]\:flex .actions{display:flex}.\[\&_\.actions\]\:justify-end .actions{justify-content:flex-end}.\[\&_\.actions\]\:gap-2\.5 .actions{gap:calc(var(--spacing) * 2.5)}.\[\&_\.artifact-img\]\:mx-0 .artifact-img{margin-inline:0}.\[\&_\.artifact-img\]\:my-3 .artifact-img{margin-block:calc(var(--spacing) * 3)}.\[\&_\.artifact-img\]\:block .artifact-img{display:block}.\[\&_\.artifact-img_img\]\:h-auto .artifact-img img{height:auto}.\[\&_\.artifact-img_img\]\:max-w-full .artifact-img img{max-width:100%}.\[\&_\.artifact-img_img\]\:rounded-sm .artifact-img img{border-radius:6px}.\[\&_\.artifact-img_img\]\:border .artifact-img img{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.artifact-img_img\]\:border-border .artifact-img img{border-color:var(--border)}.\[\&_\.artifact-img-caption\]\:mt-1 .artifact-img-caption{margin-top:var(--spacing)}.\[\&_\.artifact-img-caption\]\:block .artifact-img-caption{display:block}.\[\&_\.artifact-img-caption\]\:text-center .artifact-img-caption{text-align:center}.\[\&_\.artifact-img-caption\]\:text-sm .artifact-img-caption{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.artifact-img-caption\]\:text-subtext .artifact-img-caption{color:var(--subtext)}.\[\&_\.backend-badge\]\:text-text .backend-badge{color:var(--text)}.\[\&_\.backend-detail\]\:text-muted .backend-detail{color:var(--muted)}.\[\&_\.backend-name\]\:font-medium .backend-name{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.badge\]\:ms-2 .badge{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.btn\]\:inline-flex .btn{display:inline-flex}.\[\&_\.btn\]\:items-center .btn{align-items:center}.\[\&_\.btn\]\:gap-\[5px\] .btn{gap:5px}.\[\&_\.busy-dot\]\:h-\[7px\] .busy-dot{height:7px}.\[\&_\.busy-dot\]\:w-\[7px\] .busy-dot{width:7px}.\[\&_\.busy-dot\]\:shrink-0 .busy-dot{flex-shrink:0}.\[\&_\.busy-dot\]\:animate-\[or-pulse_1\.2s_infinite\] .busy-dot{animation:1.2s infinite or-pulse}.\[\&_\.busy-dot\]\:rounded-full .busy-dot{border-radius:999px}.\[\&_\.busy-dot\]\:bg-primary .busy-dot{background-color:var(--primary)}.\[\&_\.busy-dot\.waiting\]\:animate-none .busy-dot.waiting{animation:none}.\[\&_\.chev\]\:w-3 .chev{width:calc(var(--spacing) * 3)}.\[\&_\.chev\]\:shrink-0 .chev{flex-shrink:0}.\[\&_\.chev\]\:text-xs .chev{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.chev\]\:text-muted .chev{color:var(--muted)}.\[\&_\.count-badge\]\:inline-flex .count-badge{display:inline-flex}.\[\&_\.count-badge\]\:h-4\.5 .count-badge{height:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:min-w-4\.5 .count-badge{min-width:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:items-center .count-badge{align-items:center}.\[\&_\.count-badge\]\:justify-center .count-badge{justify-content:center}.\[\&_\.count-badge\]\:rounded-md .count-badge{border-radius:8px}.\[\&_\.count-badge\]\:border .count-badge{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.count-badge\]\:border-border .count-badge{border-color:var(--border)}.\[\&_\.count-badge\]\:bg-canvas .count-badge{background-color:var(--canvas)}.\[\&_\.count-badge\]\:px-\[5px\] .count-badge{padding-inline:5px}.\[\&_\.count-badge\]\:py-0 .count-badge{padding-block:0}.\[\&_\.count-badge\]\:text-xs .count-badge{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.count-badge\]\:font-medium .count-badge{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.count-badge\]\:text-text .count-badge{color:var(--text)}.\[\&_\.elided-node-label\]\:flex .elided-node-label{display:flex}.\[\&_\.elided-node-label\]\:flex-col .elided-node-label{flex-direction:column}.\[\&_\.elided-node-label\]\:leading-\[1\.3\] .elided-node-label{--tw-leading:1.3;line-height:1.3}.\[\&_\.elided-node-sub\]\:text-muted .elided-node-sub{color:var(--muted)}.\[\&_\.error\]\:basis-full .error{flex-basis:100%}.\[\&_\.error\]\:text-base .error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.error\]\:text-sm .error{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.error\]\:whitespace-pre-wrap .error{white-space:pre-wrap}.\[\&_\.error\]\:text-accent-red .error{color:var(--accent-red)}.\[\&_\.file-chip\]\:mx-px .file-chip{margin-inline:1px}.\[\&_\.file-chip\]\:my-0 .file-chip{margin-block:0}.\[\&_\.file-chip\]\:inline-flex .file-chip{display:inline-flex}.\[\&_\.file-chip\]\:max-w-full .file-chip{max-width:100%}.\[\&_\.file-chip\]\:cursor-pointer .file-chip{cursor:pointer}.\[\&_\.file-chip\]\:items-center .file-chip{align-items:center}.\[\&_\.file-chip\]\:gap-1 .file-chip{gap:var(--spacing)}.\[\&_\.file-chip\]\:rounded-xs .file-chip{border-radius:4px}.\[\&_\.file-chip\]\:border .file-chip{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.file-chip\]\:border-border-variant .file-chip{border-color:var(--border-variant)}.\[\&_\.file-chip\]\:bg-panel .file-chip{background-color:var(--panel)}.\[\&_\.file-chip\]\:px-1\.5 .file-chip{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.file-chip\]\:py-0 .file-chip{padding-block:0}.\[\&_\.file-chip\]\:align-baseline .file-chip{vertical-align:baseline}.\[\&_\.file-chip\]\:font-mono .file-chip{font-family:var(--mono)}.\[\&_\.file-chip\]\:text-sm .file-chip{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.file-chip\]\:font-medium .file-chip{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.file-chip\]\:text-text .file-chip{color:var(--text)}.\[\&_\.file-chip_svg\]\:flex-none .file-chip svg{flex:none}.\[\&_\.file-chip_svg\]\:opacity-60 .file-chip svg{opacity:.6}.\[\&_\.file-chip-label\]\:max-w-65 .file-chip-label{max-width:calc(var(--spacing) * 65)}.\[\&_\.file-chip-label\]\:overflow-hidden .file-chip-label{overflow:hidden}.\[\&_\.file-chip-label\]\:text-ellipsis .file-chip-label{text-overflow:ellipsis}.\[\&_\.file-chip-label\]\:whitespace-nowrap .file-chip-label{white-space:nowrap}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:bg-surface .file-chip:hover:not(:disabled){background-color:var(--surface)}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:text-primary .file-chip:hover:not(:disabled){color:var(--primary)}.\[\&_\.files-pill\]\:rounded-sm .files-pill{border-radius:6px}.\[\&_\.files-pill\]\:px-2 .files-pill{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.files-pill\]\:py-\[5px\] .files-pill{padding-block:5px}.\[\&_\.files-pill_code\]\:text-xs .files-pill code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.folder-picker-chevron\]\:flex-none .folder-picker-chevron{flex:none}.\[\&_\.folder-picker-chevron\]\:text-muted .folder-picker-chevron{color:var(--muted)}.\[\&_\.folder-picker-control\]\:flex .folder-picker-control{display:flex}.\[\&_\.folder-picker-control\]\:w-full .folder-picker-control{width:100%}.\[\&_\.folder-picker-control\]\:min-w-0 .folder-picker-control{min-width:0}.\[\&_\.folder-picker-control\]\:cursor-pointer .folder-picker-control{cursor:pointer}.\[\&_\.folder-picker-control\]\:items-center .folder-picker-control{align-items:center}.\[\&_\.folder-picker-control\]\:gap-\[9px\] .folder-picker-control{gap:9px}.\[\&_\.folder-picker-control\]\:overflow-hidden .folder-picker-control{overflow:hidden}.\[\&_\.folder-picker-control\]\:rounded-md .folder-picker-control{border-radius:8px}.\[\&_\.folder-picker-control\]\:border .folder-picker-control{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.folder-picker-control\]\:border-border .folder-picker-control{border-color:var(--border)}.\[\&_\.folder-picker-control\]\:bg-background .folder-picker-control{background-color:var(--base)}.\[\&_\.folder-picker-control\]\:px-2\.5 .folder-picker-control{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.folder-picker-control\]\:py-2 .folder-picker-control{padding-block:calc(var(--spacing) * 2)}.\[\&_\.folder-picker-control\]\:text-start .folder-picker-control{text-align:start}.\[\&_\.folder-picker-control\]\:transition-\[border-color\,box-shadow\] .folder-picker-control{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_\.folder-picker-control\]\:duration-120 .folder-picker-control{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.folder-picker-control\]\:ease-standard .folder-picker-control{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.folder-picker-control_\.placeholder\]\:text-muted .folder-picker-control .placeholder{color:var(--muted)}.\[\&_\.folder-picker-control_span\]\:min-w-0 .folder-picker-control span{min-width:0}.\[\&_\.folder-picker-control_span\]\:flex-1 .folder-picker-control span{flex:1}.\[\&_\.folder-picker-control_span\]\:overflow-hidden .folder-picker-control span{overflow:hidden}.\[\&_\.folder-picker-control_span\]\:text-ellipsis .folder-picker-control span{text-overflow:ellipsis}.\[\&_\.folder-picker-control_span\]\:whitespace-nowrap .folder-picker-control span{white-space:nowrap}.\[\&_\.folder-picker-control\:disabled\]\:cursor-default .folder-picker-control:disabled{cursor:default}.\[\&_\.folder-picker-control\:disabled\]\:opacity-65 .folder-picker-control:disabled{opacity:.65}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-2 .folder-picker-control:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-offset-2 .folder-picker-control:focus-visible{outline-offset:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-text .folder-picker-control:focus-visible{outline-color:var(--text)}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-solid .folder-picker-control:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:border-muted .folder-picker-control:hover:not(:disabled){border-color:var(--muted)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:shadow-control-subtle .folder-picker-control:hover:not(:disabled){--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)_\.folder-picker-chevron\]\:text-subtext .folder-picker-control:hover:not(:disabled) .folder-picker-chevron{color:var(--subtext)}.\[\&_\.folder-picker-hint\]\:text-sm .folder-picker-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.folder-picker-hint\]\:leading-\[1\.4\] .folder-picker-hint{--tw-leading:1.4;line-height:1.4}.\[\&_\.folder-picker-hint\]\:font-normal .folder-picker-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.folder-picker-hint\]\:text-subtext .folder-picker-hint{color:var(--subtext)}.\[\&_\.folder-picker-icon\]\:flex-none .folder-picker-icon{flex:none}.\[\&_\.folder-picker-icon\]\:text-current .folder-picker-icon{color:currentColor}.\[\&_\.form-seg\]\:mb-0\.5 .form-seg{margin-bottom:calc(var(--spacing) * .5)}.\[\&_\.form-seg\]\:self-start .form-seg{align-self:flex-start}.\[\&_\.form-seg_button\]\:px-3 .form-seg button{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.form-seg_button\]\:py-\[5px\] .form-seg button{padding-block:5px}.\[\&_\.hc-actions\]\:mt-2\.5 .hc-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions\]\:flex .hc-actions{display:flex}.\[\&_\.hc-actions\]\:items-center .hc-actions{align-items:center}.\[\&_\.hc-actions\]\:gap-1\.5 .hc-actions{gap:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:inline-flex .hc-actions button{display:inline-flex}.\[\&_\.hc-actions_button\]\:min-w-21 .hc-actions button{min-width:calc(var(--spacing) * 21)}.\[\&_\.hc-actions_button\]\:items-center .hc-actions button{align-items:center}.\[\&_\.hc-actions_button\]\:justify-center .hc-actions button{justify-content:center}.\[\&_\.hc-actions_button\]\:gap-\[5px\] .hc-actions button{gap:5px}.\[\&_\.hc-actions_button\]\:rounded-md .hc-actions button{border-radius:8px}.\[\&_\.hc-actions_button\]\:border .hc-actions button{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.hc-actions_button\]\:border-border .hc-actions button{border-color:var(--border)}.\[\&_\.hc-actions_button\]\:bg-background .hc-actions button{background-color:var(--base)}.\[\&_\.hc-actions_button\]\:px-2\.5 .hc-actions button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions_button\]\:py-1\.5 .hc-actions button{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:text-sm .hc-actions button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-actions_button\]\:font-medium .hc-actions button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-actions_button\]\:text-text .hc-actions button{color:var(--text)}.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:color-mix(in oklab,var(--border) 55%,var(--text))}}.\[\&_\.hc-actions_button\:hover\]\:bg-canvas .hc-actions button:hover{background-color:var(--canvas)}.\[\&_\.hc-body\]\:mt-2\.5 .hc-body{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:line-clamp-10 .hc-body{-webkit-line-clamp:10;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-body\]\:border-t .hc-body{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-body\]\:border-t-border-variant .hc-body{border-top-color:var(--border-variant)}.\[\&_\.hc-body\]\:pt-2\.5 .hc-body{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:leading-\[1\.6\] .hc-body{--tw-leading:1.6;line-height:1.6}.\[\&_\.hc-body\]\:whitespace-pre-line .hc-body{white-space:pre-line}.\[\&_\.hc-body\.expanded\]\:line-clamp-none .hc-body.expanded{-webkit-line-clamp:unset;-webkit-box-orient:horizontal;display:block;overflow:visible}.\[\&_\.hc-body\.expanded\]\:block .hc-body.expanded{display:block}.\[\&_\.hc-body\.expanded\]\:max-h-\[45vh\] .hc-body.expanded{max-height:45vh}.\[\&_\.hc-body\.expanded\]\:overflow-x-hidden .hc-body.expanded{overflow-x:hidden}.\[\&_\.hc-body\.expanded\]\:overflow-y-auto .hc-body.expanded{overflow-y:auto}.\[\&_\.hc-body\.expanded\]\:pb-1 .hc-body.expanded{padding-bottom:var(--spacing)}.\[\&_\.hc-branch\]\:inline-flex .hc-branch{display:inline-flex}.\[\&_\.hc-branch\]\:min-w-0 .hc-branch{min-width:0}.\[\&_\.hc-branch\]\:items-center .hc-branch{align-items:center}.\[\&_\.hc-branch\]\:gap-1 .hc-branch{gap:var(--spacing)}.\[\&_\.hc-branch\]\:overflow-hidden .hc-branch{overflow:hidden}.\[\&_\.hc-branch\]\:text-ellipsis .hc-branch{text-overflow:ellipsis}.\[\&_\.hc-branch\]\:whitespace-nowrap .hc-branch{white-space:nowrap}.\[\&_\.hc-failure\]\:mt-2 .hc-failure{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-failure\]\:line-clamp-3 .hc-failure{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-failure\]\:text-accent-red .hc-failure{color:var(--accent-red)}.\[\&_\.hc-foot\]\:mt-2 .hc-foot{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-foot\]\:flex .hc-foot{display:flex}.\[\&_\.hc-foot\]\:items-center .hc-foot{align-items:center}.\[\&_\.hc-foot\]\:justify-between .hc-foot{justify-content:space-between}.\[\&_\.hc-foot\]\:gap-2\.5 .hc-foot{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-foot\]\:text-xs .hc-foot{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-foot\]\:text-muted .hc-foot{color:var(--muted)}.\[\&_\.hc-foot_\.hc-command\]\:min-w-0 .hc-foot .hc-command{min-width:0}.\[\&_\.hc-foot_\.hc-command\]\:overflow-hidden .hc-foot .hc-command{overflow:hidden}.\[\&_\.hc-foot_\.hc-command\]\:text-ellipsis .hc-foot .hc-command{text-overflow:ellipsis}.\[\&_\.hc-foot_\.hc-command\]\:whitespace-nowrap .hc-foot .hc-command{white-space:nowrap}.\[\&_\.hc-git\]\:mt-2\.5 .hc-git{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-git\]\:flex .hc-git{display:flex}.\[\&_\.hc-git\]\:flex-col .hc-git{flex-direction:column}.\[\&_\.hc-git\]\:gap-1 .hc-git{gap:var(--spacing)}.\[\&_\.hc-git\]\:border-t .hc-git{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-git\]\:border-t-border-variant .hc-git{border-top-color:var(--border-variant)}.\[\&_\.hc-git\]\:pt-2 .hc-git{padding-top:calc(var(--spacing) * 2)}.\[\&_\.hc-git\]\:text-xs .hc-git{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-git\]\:text-text .hc-git{color:var(--text)}.\[\&_\.hc-git-row\]\:flex .hc-git-row{display:flex}.\[\&_\.hc-git-row\]\:min-w-0 .hc-git-row{min-width:0}.\[\&_\.hc-git-row\]\:flex-wrap .hc-git-row{flex-wrap:wrap}.\[\&_\.hc-git-row\]\:items-center .hc-git-row{align-items:center}.\[\&_\.hc-git-row\]\:gap-2\.5 .hc-git-row{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-head\]\:flex .hc-head{display:flex}.\[\&_\.hc-head\]\:items-baseline .hc-head{align-items:baseline}.\[\&_\.hc-head\]\:justify-between .hc-head{justify-content:space-between}.\[\&_\.hc-head\]\:gap-2\.5 .hc-head{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-slug\]\:min-w-0 .hc-slug{min-width:0}.\[\&_\.hc-slug\]\:overflow-hidden .hc-slug{overflow:hidden}.\[\&_\.hc-slug\]\:text-sm .hc-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-slug\]\:font-semibold .hc-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.hc-slug\]\:text-ellipsis .hc-slug{text-overflow:ellipsis}.\[\&_\.hc-slug\]\:whitespace-nowrap .hc-slug{white-space:nowrap}.\[\&_\.hc-stats\]\:mt-2\.5 .hc-stats{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:flex .hc-stats{display:flex}.\[\&_\.hc-stats\]\:flex-wrap .hc-stats{flex-wrap:wrap}.\[\&_\.hc-stats\]\:items-center .hc-stats{align-items:center}.\[\&_\.hc-stats\]\:gap-3 .hc-stats{gap:calc(var(--spacing) * 3)}.\[\&_\.hc-stats\]\:border-t .hc-stats{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-stats\]\:border-t-border-variant .hc-stats{border-top-color:var(--border-variant)}.\[\&_\.hc-stats\]\:pt-2\.5 .hc-stats{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:text-xs .hc-stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-stats\]\:text-text .hc-stats{color:var(--text)}.\[\&_\.hc-title\]\:mt-\[3px\] .hc-title{margin-top:3px}.\[\&_\.hc-title\]\:text-text .hc-title{color:var(--text)}.\[\&_\.hc-toggle\]\:mt-1 .hc-toggle{margin-top:var(--spacing)}.\[\&_\.hc-toggle\]\:text-sm .hc-toggle{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-toggle\]\:font-medium .hc-toggle{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-toggle\]\:text-muted .hc-toggle{color:var(--muted)}.\[\&_\.hc-toggle\:hover\]\:text-text .hc-toggle:hover{color:var(--text)}.\[\&_\.home-inner\]\:max-w-140 .home-inner{max-width:calc(var(--spacing) * 140)}.\[\&_\.home-inner\]\:max-w-300 .home-inner{max-width:calc(var(--spacing) * 300)}.\[\&_\.home-inner\]\:pt-0 .home-inner{padding-top:0}.\[\&_\.home-inner\]\:pt-24 .home-inner{padding-top:calc(var(--spacing) * 24)}.\[\&_\.home-inner\]\:pb-0 .home-inner{padding-bottom:0}.\[\&_\.icon-btn\]\:ms-2 .icon-btn{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.icon-btn\]\:align-middle .icon-btn{vertical-align:middle}.\[\&_\.id\]\:text-xs .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.id\]\:text-muted .id{color:var(--muted)}.\[\&_\.k\]\:text-sm .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.k\]\:font-medium .k{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.k\]\:text-subtext .k{color:var(--subtext)}.\[\&_\.k\]\:text-text .k{color:var(--text)}.\[\&_\.katex\]\:text-prose-emphasis .katex{font-size:1.05em}.\[\&_\.katex-display\]\:mx-0 .katex-display{margin-inline:0}.\[\&_\.katex-display\]\:my-3 .katex-display{margin-block:calc(var(--spacing) * 3)}.\[\&_\.katex-display\]\:overflow-x-auto .katex-display{overflow-x:auto}.\[\&_\.katex-display\]\:overflow-y-hidden .katex-display{overflow-y:hidden}.\[\&_\.katex-display\]\:px-0 .katex-display{padding-inline:0}.\[\&_\.katex-display\]\:py-0\.5 .katex-display{padding-block:calc(var(--spacing) * .5)}.\[\&_\.kv\]\:grid-cols-\[132px_minmax\(0\,_1fr\)\] .kv{grid-template-columns:132px minmax(0,1fr)}.\[\&_\.kv\]\:items-center .kv{align-items:center}.\[\&_\.kv\]\:gap-x-4\.5 .kv{column-gap:calc(var(--spacing) * 4.5)}.\[\&_\.kv\]\:gap-y-1\.5 .kv{row-gap:calc(var(--spacing) * 1.5)}.\[\&_\.kv\]\:gap-y-\[9px\] .kv{row-gap:9px}.\[\&_\.kv_\.k\]\:text-sm .kv .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.kv_\.v\]\:flex .kv .v{display:flex}.\[\&_\.kv_\.v\]\:min-w-0 .kv .v{min-width:0}.\[\&_\.kv_\.v\]\:flex-wrap .kv .v{flex-wrap:wrap}.\[\&_\.kv_\.v\]\:items-center .kv .v{align-items:center}.\[\&_\.kv_\.v\]\:gap-\[7px\] .kv .v{gap:7px}.\[\&_\.kv_\.v\]\:font-sans .kv .v{font-family:var(--sans)}.\[\&_\.kv_\.v\]\:text-base .kv .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.kv_\.v\]\:break-normal .kv .v{overflow-wrap:normal;word-break:normal}.\[\&_\.md\]\:max-w-readable .md{max-width:var(--readable-col)}.\[\&_\.md\]\:text-base .md{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.md\]\:leading-\[1\.65\] .md{--tw-leading:1.65;line-height:1.65}.\[\&_\.md\]\:text-text .md{color:var(--text)}.\[\&_\.md_h1\]\:mx-0 .md h1{margin-inline:0}.\[\&_\.md_h1\]\:mt-4\.5 .md h1{margin-top:calc(var(--spacing) * 4.5)}.\[\&_\.md_h1\]\:mb-2 .md h1{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h1\]\:text-2xl .md h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_\.md_h2\]\:mx-0 .md h2{margin-inline:0}.\[\&_\.md_h2\]\:mt-4 .md h2{margin-top:calc(var(--spacing) * 4)}.\[\&_\.md_h2\]\:mb-2 .md h2{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h2\]\:text-xl .md h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.md_h3\]\:text-lg .md h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_\.model-id\]\:block .model-id{display:block}.\[\&_\.model-id\]\:text-xs .model-id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.model-id\]\:text-muted .model-id{color:var(--muted)}.\[\&_\.model-item\]\:ps-6 .model-item{padding-inline-start:calc(var(--spacing) * 6)}.\[\&_\.model-item\]\:whitespace-nowrap .model-item{white-space:nowrap}.\[\&_\.model-item\:disabled\]\:cursor-default .model-item:disabled{cursor:default}.\[\&_\.model-item\:disabled\]\:text-muted .model-item:disabled{color:var(--muted)}.\[\&_\.model-item\:disabled\:hover\]\:bg-transparent .model-item:disabled:hover{background-color:#0000}.\[\&_\.new-project-actions\]\:mt-2\.5 .new-project-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.new-project-actions\]\:justify-start .new-project-actions{justify-content:flex-start}.\[\&_\.node-action\]\:inline-flex .node-action{display:inline-flex}.\[\&_\.node-action\]\:items-center .node-action{align-items:center}.\[\&_\.node-action\]\:gap-\[5px\] .node-action{gap:5px}.\[\&_\.node-action\]\:rounded-sm .node-action{border-radius:6px}.\[\&_\.node-action\]\:px-1\.5 .node-action{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.node-action\]\:py-\[3px\] .node-action{padding-block:3px}.\[\&_\.node-action\]\:text-sm .node-action{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-action\]\:font-medium .node-action{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-action\]\:text-text .node-action{color:var(--text)}.\[\&_\.node-action\]\:no-underline .node-action{text-decoration-line:none}.\[\&_\.node-action-ext\]\:ms-auto .node-action-ext{margin-inline-start:auto}.\[\&_\.node-action-ext\]\:px-\[5px\] .node-action-ext{padding-inline:5px}.\[\&_\.node-action-ext\]\:py-\[3px\] .node-action-ext{padding-block:3px}.\[\&_\.node-action\:hover\]\:bg-surface .node-action:hover{background-color:var(--surface)}.\[\&_\.node-action\:hover\]\:text-text .node-action:hover{color:var(--text)}.\[\&_\.node-actions\]\:mt-2 .node-actions{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-actions\]\:flex .node-actions{display:flex}.\[\&_\.node-actions\]\:items-center .node-actions{align-items:center}.\[\&_\.node-actions\]\:gap-\[3px\] .node-actions{gap:3px}.\[\&_\.node-actions\]\:border-t .node-actions{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.node-actions\]\:border-t-border-variant .node-actions{border-top-color:var(--border-variant)}.\[\&_\.node-actions\]\:pt-1\.5 .node-actions{padding-top:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:mb-1\.5 .node-eyebrow{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:flex .node-eyebrow{display:flex}.\[\&_\.node-eyebrow\]\:items-center .node-eyebrow{align-items:center}.\[\&_\.node-eyebrow\]\:justify-between .node-eyebrow{justify-content:space-between}.\[\&_\.node-eyebrow\]\:gap-2 .node-eyebrow{gap:calc(var(--spacing) * 2)}.\[\&_\.node-eyebrow\]\:text-xs .node-eyebrow{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-eyebrow\]\:font-medium .node-eyebrow{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-eyebrow\]\:text-muted .node-eyebrow{color:var(--muted)}.\[\&_\.node-head\]\:flex .node-head{display:flex}.\[\&_\.node-head\]\:min-w-0 .node-head{min-width:0}.\[\&_\.node-head\]\:items-center .node-head{align-items:center}.\[\&_\.node-head\]\:gap-\[7px\] .node-head{gap:7px}.\[\&_\.node-meta\]\:mt-2 .node-meta{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:flex .node-meta{display:flex}.\[\&_\.node-meta\]\:items-center .node-meta{align-items:center}.\[\&_\.node-meta\]\:gap-2 .node-meta{gap:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:text-xs .node-meta{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-meta\]\:text-muted .node-meta{color:var(--muted)}.\[\&_\.node-overview-link\]\:block .node-overview-link{display:block}.\[\&_\.node-overview-link\]\:w-full .node-overview-link{width:100%}.\[\&_\.node-overview-link\]\:cursor-pointer .node-overview-link{cursor:pointer}.\[\&_\.node-overview-link\]\:border-0 .node-overview-link{border-style:var(--tw-border-style);border-width:0}.\[\&_\.node-overview-link\]\:bg-transparent .node-overview-link{background-color:#0000}.\[\&_\.node-overview-link\]\:p-0 .node-overview-link{padding:0}.\[\&_\.node-overview-link\]\:text-start .node-overview-link{text-align:start}.\[\&_\.node-overview-link\]\:text-inherit .node-overview-link{color:inherit}.\[\&_\.node-overview-link\]\:\[font\:inherit\] .node-overview-link{font:inherit}.\[\&_\.node-overview-link\:focus-visible\]\:rounded-xs .node-overview-link:focus-visible{border-radius:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-2 .node-overview-link:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-offset-4 .node-overview-link:focus-visible{outline-offset:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-accent .node-overview-link:focus-visible{outline-color:var(--accent)}.\[\&_\.node-overview-link\:focus-visible\]\:outline-solid .node-overview-link:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline .node-overview-link:hover .node-slug{text-decoration-line:underline}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline-offset-\[3px\] .node-overview-link:hover .node-slug{text-underline-offset:3px}.\[\&_\.node-slug\]\:min-w-0 .node-slug{min-width:0}.\[\&_\.node-slug\]\:flex-1 .node-slug{flex:1}.\[\&_\.node-slug\]\:overflow-hidden .node-slug{overflow:hidden}.\[\&_\.node-slug\]\:text-sm .node-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-slug\]\:font-semibold .node-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.node-slug\]\:text-ellipsis .node-slug{text-overflow:ellipsis}.\[\&_\.node-slug\]\:whitespace-nowrap .node-slug{white-space:nowrap}.\[\&_\.node-slug\]\:text-text .node-slug{color:var(--text)}.\[\&_\.node-status\]\:h-2 .node-status{height:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:w-2 .node-status{width:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:shrink-0 .node-status{flex-shrink:0}.\[\&_\.node-status\]\:rounded-full .node-status{border-radius:999px}.\[\&_\.node-title\]\:mt-1 .node-title{margin-top:var(--spacing)}.\[\&_\.node-title\]\:line-clamp-2 .node-title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.node-title\]\:text-sm .node-title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-title\]\:text-text .node-title{color:var(--text)}.\[\&_\.openresearch-diff-file\]\:w-full .openresearch-diff-file{width:100%}.\[\&_\.openresearch-diff-file\]\:\[--diff-background-color\:var\(--base\)\] .openresearch-diff-file{--diff-background-color:var(--base)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-background-color\:var\(--color-diff-delete-code\)\] .openresearch-diff-file{--diff-code-delete-background-color:var(--color-diff-delete-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-background-color\:var\(--color-diff-delete-edit\)\] .openresearch-diff-file{--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-background-color\:var\(--color-diff-insert-code\)\] .openresearch-diff-file{--diff-code-insert-background-color:var(--color-diff-insert-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-background-color\:var\(--color-diff-insert-edit\)\] .openresearch-diff-file{--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-background-color\:var\(--diff-selection-background-color\)\] .openresearch-diff-file{--diff-code-selected-background-color:var(--diff-selection-background-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-code-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-font-family\:var\(--mono\)\] .openresearch-diff-file{--diff-font-family:var(--mono)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-background-color\:var\(--color-diff-delete-gutter\)\] .openresearch-diff-file{--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-text-color\:var\(--accent-red\)\] .openresearch-diff-file{--diff-gutter-delete-text-color:var(--accent-red)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-background-color\:var\(--color-diff-insert-gutter\)\] .openresearch-diff-file{--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-text-color\:var\(--accent-green\)\] .openresearch-diff-file{--diff-gutter-insert-text-color:var(--accent-green)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-background-color\:var\(--color-diff-gutter-selection\)\] .openresearch-diff-file{--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-gutter-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-omit-gutter-line-color\:var\(--color-diff-omit-gutter\)\] .openresearch-diff-file{--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-background-color\:var\(--color-diff-selection\)\] .openresearch-diff-file{--diff-selection-background-color:var(--color-diff-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-text-color\:var\(--primary\)\] .openresearch-diff-file{--diff-selection-text-color:var(--primary)}.\[\&_\.openresearch-diff-file\]\:\[--diff-text-color\:var\(--text\)\] .openresearch-diff-file{--diff-text-color:var(--text)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:py-0 .openresearch-diff-file .diff-code{padding-block:0}.\[\&_\.openresearch-diff-file_\.diff-code\]\:ps-\[2ch\] .openresearch-diff-file .diff-code{padding-inline-start:2ch}.\[\&_\.openresearch-diff-file_\.diff-code\]\:pe-4 .openresearch-diff-file .diff-code{padding-inline-end:calc(var(--spacing) * 4)}.\[\&_\.openresearch-diff-file_\.diff-hunk_\+_\.diff-hunk_\.diff-line\:first-child_\>_td\]\:border-t .openresearch-diff-file .diff-hunk+.diff-hunk .diff-line:first-child>td{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.openresearch-diff-file_\.diff-hunk_\+_\.diff-hunk_\.diff-line\:first-child_\>_td\]\:border-t-border .openresearch-diff-file .diff-hunk+.diff-hunk .diff-line:first-child>td{border-top-color:var(--border)}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:color-mix(in oklab,var(--base) 92%,var(--accent-red))}}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:color-mix(in oklab,var(--base) 91%,var(--accent-green))}}.\[\&_\.openresearch-diff-file\.diff-unified\]\:table-fixed .openresearch-diff-file.diff-unified{table-layout:fixed}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:first-child\]\:p-0 .openresearch-diff-file.diff-unified .diff-line>td:first-child{padding:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:w-\[7ch\] .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){width:7ch}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:cursor-default .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){cursor:default}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:border-e .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:border-e-border .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){border-inline-end-color:var(--border)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:ps-3\.5 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-inline-start:calc(var(--spacing) * 3.5)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pe-2\.5 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pt-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-top:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pb-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-bottom:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-end .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){text-align:end}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:whitespace-nowrap .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){white-space:nowrap}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-diff-gutter-text .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-diff-gutter-text .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){color:color-mix(in oklab,var(--text) 45%,var(--base))}}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:select-none .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){-webkit-user-select:none;user-select:none}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:collapse .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{visibility:collapse}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:w-0 .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{width:0}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:nth-child\(2\)\]\:w-\[7ch\] .openresearch-diff-file.diff-unified col.diff-gutter-col:nth-child(2){width:7ch}.\[\&_\.paper-destination\]\:flex .paper-destination{display:flex}.\[\&_\.paper-destination\]\:items-center .paper-destination{align-items:center}.\[\&_\.paper-destination\]\:gap-2\.5 .paper-destination{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-destination\]\:rounded-md .paper-destination{border-radius:8px}.\[\&_\.paper-destination\]\:border .paper-destination{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-destination\]\:border-border .paper-destination{border-color:var(--border)}.\[\&_\.paper-destination\]\:bg-background .paper-destination{background-color:var(--base)}.\[\&_\.paper-destination\]\:ps-3 .paper-destination{padding-inline-start:calc(var(--spacing) * 3)}.\[\&_\.paper-destination\]\:pe-2 .paper-destination{padding-inline-end:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pt-2 .paper-destination{padding-top:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pb-2 .paper-destination{padding-bottom:calc(var(--spacing) * 2)}.\[\&_\.paper-destination_\.btn\]\:flex-none .paper-destination .btn{flex:none}.\[\&_\.paper-destination_code\]\:min-w-0 .paper-destination code{min-width:0}.\[\&_\.paper-destination_code\]\:flex-1 .paper-destination code{flex:1}.\[\&_\.paper-destination_code\]\:overflow-hidden .paper-destination code{overflow:hidden}.\[\&_\.paper-destination_code\]\:text-sm .paper-destination code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-destination_code\]\:font-normal .paper-destination code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.paper-destination_code\]\:text-ellipsis .paper-destination code{text-overflow:ellipsis}.\[\&_\.paper-destination_code\]\:whitespace-nowrap .paper-destination code{white-space:nowrap}.\[\&_\.paper-destination_code\]\:text-text .paper-destination code{color:var(--text)}.\[\&_\.paper-pick\]\:flex .paper-pick{display:flex}.\[\&_\.paper-pick\]\:items-center .paper-pick{align-items:center}.\[\&_\.paper-pick\]\:justify-between .paper-pick{justify-content:space-between}.\[\&_\.paper-pick\]\:gap-2\.5 .paper-pick{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick\]\:rounded-md .paper-pick{border-radius:8px}.\[\&_\.paper-pick\]\:border .paper-pick{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-pick\]\:border-border .paper-pick{border-color:var(--border)}.\[\&_\.paper-pick\]\:bg-surface .paper-pick{background-color:var(--surface)}.\[\&_\.paper-pick\]\:px-3 .paper-pick{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.paper-pick\]\:py-2\.5 .paper-pick{padding-block:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick_\.id\]\:text-xs .paper-pick .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-pick_\.id\]\:text-muted .paper-pick .id{color:var(--muted)}.\[\&_\.paper-pick_\.meta\]\:min-w-0 .paper-pick .meta{min-width:0}.\[\&_\.paper-pick_\.title\]\:text-sm .paper-pick .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-pick_\.title\]\:font-medium .paper-pick .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results\]\:flex .paper-results{display:flex}.\[\&_\.paper-results\]\:max-h-60 .paper-results{max-height:calc(var(--spacing) * 60)}.\[\&_\.paper-results\]\:flex-col .paper-results{flex-direction:column}.\[\&_\.paper-results\]\:overflow-y-auto .paper-results{overflow-y:auto}.\[\&_\.paper-results\]\:rounded-md .paper-results{border-radius:8px}.\[\&_\.paper-results\]\:border .paper-results{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-results\]\:border-border .paper-results{border-color:var(--border)}.\[\&_\.paper-results_\.id\]\:text-xs .paper-results .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-results_\.id\]\:text-muted .paper-results .id{color:var(--muted)}.\[\&_\.paper-results_\.title\]\:text-sm .paper-results .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-results_\.title\]\:font-medium .paper-results .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results_button\]\:flex .paper-results button{display:flex}.\[\&_\.paper-results_button\]\:cursor-pointer .paper-results button{cursor:pointer}.\[\&_\.paper-results_button\]\:flex-col .paper-results button{flex-direction:column}.\[\&_\.paper-results_button\]\:items-start .paper-results button{align-items:flex-start}.\[\&_\.paper-results_button\]\:gap-0\.5 .paper-results button{gap:calc(var(--spacing) * .5)}.\[\&_\.paper-results_button\]\:border-0 .paper-results button{border-style:var(--tw-border-style);border-width:0}.\[\&_\.paper-results_button\]\:border-b .paper-results button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_\.paper-results_button\]\:border-b-border-variant .paper-results button{border-bottom-color:var(--border-variant)}.\[\&_\.paper-results_button\]\:bg-transparent .paper-results button{background-color:#0000}.\[\&_\.paper-results_button\]\:bg-none .paper-results button{background-image:none}.\[\&_\.paper-results_button\]\:px-2\.5 .paper-results button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.paper-results_button\]\:py-2 .paper-results button{padding-block:calc(var(--spacing) * 2)}.\[\&_\.paper-results_button\]\:text-start .paper-results button{text-align:start}.\[\&_\.paper-results_button\]\:text-text .paper-results button{color:var(--text)}.\[\&_\.paper-results_button\]\:\[font\:inherit\] .paper-results button{font:inherit}.\[\&_\.paper-results_button\:hover\]\:bg-surface .paper-results button:hover{background-color:var(--surface)}.\[\&_\.paper-results_button\:last-child\]\:border-b-0 .paper-results button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_\.path\]\:flex .path{display:flex}.\[\&_\.path\]\:min-w-0 .path{min-width:0}.\[\&_\.path\]\:flex-1 .path{flex:1}.\[\&_\.path\]\:items-center .path{align-items:center}.\[\&_\.path\]\:gap-2 .path{gap:calc(var(--spacing) * 2)}.\[\&_\.path_code\]\:min-w-0 .path code{min-width:0}.\[\&_\.path_code\]\:flex-1 .path code{flex:1}.\[\&_\.path_code\]\:overflow-hidden .path code{overflow:hidden}.\[\&_\.path_code\]\:font-mono .path code{font-family:var(--mono)}.\[\&_\.path_code\]\:text-xs .path code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.path_code\]\:font-medium .path code{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.path_code\]\:text-ellipsis .path code{text-overflow:ellipsis}.\[\&_\.path_code\]\:whitespace-nowrap .path code{white-space:nowrap}.\[\&_\.path_code\]\:text-text .path code{color:var(--text)}.\[\&_\.progress\]\:mx-0 .progress{margin-inline:0}.\[\&_\.progress\]\:mt-2 .progress{margin-top:calc(var(--spacing) * 2)}.\[\&_\.progress\]\:mb-0 .progress{margin-bottom:0}.\[\&_\.progress-track\]\:h-\[5px\] .progress-track{height:5px}.\[\&_\.progress-track\]\:border-0 .progress-track{border-style:var(--tw-border-style);border-width:0}.\[\&_\.progress-track\]\:bg-border .progress-track{background-color:var(--border)}.\[\&_\.project-default-title\]\:text-base .project-default-title,.\[\&_\.project-field-label\]\:text-base .project-field-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-field-label\]\:font-medium .project-field-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-field-label\]\:text-text .project-field-label{color:var(--text)}.\[\&_\.project-location-field\]\:flex .project-location-field{display:flex}.\[\&_\.project-location-field\]\:flex-col .project-location-field{flex-direction:column}.\[\&_\.project-location-field\]\:gap-2 .project-location-field{gap:calc(var(--spacing) * 2)}.\[\&_\.project-location-label\]\:text-base .project-location-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-location-label\]\:font-medium .project-location-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-location-label\]\:text-text .project-location-label{color:var(--text)}.\[\&_\.project-path-notice\]\:rounded-sm .project-path-notice{border-radius:6px}.\[\&_\.project-path-notice\]\:border .project-path-notice{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.project-path-notice\]\:border-border-variant .project-path-notice{border-color:var(--border-variant)}.\[\&_\.project-path-notice\]\:bg-surface .project-path-notice{background-color:var(--surface)}.\[\&_\.project-path-notice\]\:px-\[11px\] .project-path-notice{padding-inline:11px}.\[\&_\.project-path-notice\]\:py-\[9px\] .project-path-notice{padding-block:9px}.\[\&_\.project-path-notice\]\:text-base .project-path-notice{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-path-notice\]\:text-sm .project-path-notice{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.project-path-notice\]\:leading-\[1\.4\] .project-path-notice{--tw-leading:1.4;line-height:1.4}.\[\&_\.project-path-notice\]\:leading-relaxed .project-path-notice{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\.project-path-notice\]\:text-subtext .project-path-notice{color:var(--subtext)}.\[\&_\.project-path-notice\]\:text-text .project-path-notice{color:var(--text)}.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:color-mix(in srgb,var(--accent-red) 35%,var(--border-variant))}}.\[\&_\.rail-body\]\:min-h-0 .rail-body{min-height:0}.\[\&_\.rail-body\]\:flex-1 .rail-body{flex:1}.\[\&_\.rail-body\]\:overflow-y-auto .rail-body{overflow-y:auto}.\[\&_\.rail-body\]\:px-2 .rail-body{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.rail-body\]\:pt-0 .rail-body{padding-top:0}.\[\&_\.rail-body\]\:pb-1 .rail-body{padding-bottom:var(--spacing)}.\[\&_\.react-flow\\_\\_attribution\]\:hidden\! .react-flow__attribution{display:none!important}.\[\&_\.react-flow\\_\\_handle\]\:pointer-events-none .react-flow__handle{pointer-events:none}.\[\&_\.react-flow\\_\\_handle\]\:opacity-0 .react-flow__handle{opacity:0}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-elided\.selectable\]\:cursor-pointer .react-flow__node.react-flow__node-elided.selectable{cursor:pointer}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-exp\.selectable\]\:cursor-default .react-flow__node.react-flow__node-exp.selectable{cursor:default}.\[\&_\.repo-hint\]\:text-sm .repo-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.repo-hint\]\:font-normal .repo-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.repo-hint\]\:text-muted .repo-hint{color:var(--muted)}.\[\&_\.repo-hint\.ok\]\:text-accent-teal .repo-hint.ok{color:var(--accent-teal)}.\[\&_\.row2\]\:grid .row2{display:grid}.\[\&_\.row2\]\:grid-cols-2 .row2{grid-template-columns:repeat(2,minmax(0,1fr))}.\[\&_\.row2\]\:gap-2\.5 .row2{gap:calc(var(--spacing) * 2.5)}.\[\&_\.run-chip_svg\]\:text-primary .run-chip svg{color:var(--primary)}.\[\&_\.run-chip_svg\]\:opacity-100 .run-chip svg{opacity:1}.\[\&_\.sel\]\:font-medium .sel{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.sel\]\:text-text .sel{color:var(--text)}.\[\&_\.session-dot\]\:inline-flex .session-dot{display:inline-flex}.\[\&_\.session-dot\]\:w-4 .session-dot{width:calc(var(--spacing) * 4)}.\[\&_\.session-dot\]\:shrink-0 .session-dot{flex-shrink:0}.\[\&_\.session-dot\]\:items-center .session-dot{align-items:center}.\[\&_\.session-dot\]\:justify-center .session-dot{justify-content:center}.\[\&_\.session-dot\:empty\]\:hidden .session-dot:empty{display:none}.\[\&_\.session-menu-btn\]\:mx-0 .session-menu-btn{margin-inline:0}.\[\&_\.session-menu-btn\]\:-my-0\.5 .session-menu-btn{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-menu-btn\]\:hidden .session-menu-btn{display:none}.\[\&_\.session-menu-btn\]\:h-4 .session-menu-btn{height:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:w-4 .session-menu-btn{width:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:shrink-0 .session-menu-btn{flex-shrink:0}.\[\&_\.session-menu-btn\]\:items-center .session-menu-btn{align-items:center}.\[\&_\.session-menu-btn\]\:justify-center .session-menu-btn{justify-content:center}.\[\&_\.session-menu-btn\]\:rounded-sm .session-menu-btn{border-radius:6px}.\[\&_\.session-menu-btn\]\:text-muted .session-menu-btn{color:var(--muted)}.\[\&_\.session-menu-btn\:focus-visible\]\:inline-flex .session-menu-btn:focus-visible{display:inline-flex}.\[\&_\.session-menu-btn\:hover\]\:bg-panel .session-menu-btn:hover{background-color:var(--panel)}.\[\&_\.session-menu-btn\:hover\]\:text-text .session-menu-btn:hover{color:var(--text)}.\[\&_\.session-title\]\:min-w-0 .session-title{min-width:0}.\[\&_\.session-title\]\:flex-1 .session-title{flex:1}.\[\&_\.session-title\]\:overflow-hidden .session-title{overflow:hidden}.\[\&_\.session-title\]\:\[mask-image\:linear-gradient\(to_right\,black_calc\(100\%_-_16px\)\,transparent\)\] .session-title{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000);mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000)}.\[\&_\.session-title\]\:whitespace-nowrap .session-title{white-space:nowrap}.\[\&_\.session-title-input\]\:mx-0 .session-title-input{margin-inline:0}.\[\&_\.session-title-input\]\:-my-0\.5 .session-title-input{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-title-input\]\:min-w-0 .session-title-input{min-width:0}.\[\&_\.session-title-input\]\:flex-1 .session-title-input{flex:1}.\[\&_\.session-title-input\]\:rounded-sm .session-title-input{border-radius:6px}.\[\&_\.session-title-input\]\:border .session-title-input{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.session-title-input\]\:border-primary .session-title-input{border-color:var(--primary)}.\[\&_\.session-title-input\]\:bg-background .session-title-input{background-color:var(--base)}.\[\&_\.session-title-input\]\:px-\[5px\] .session-title-input{padding-inline:5px}.\[\&_\.session-title-input\]\:py-px .session-title-input{padding-block:1px}.\[\&_\.session-title-input\]\:text-text .session-title-input{color:var(--text)}.\[\&_\.session-title-input\]\:outline-none .session-title-input{--tw-outline-style:none;outline-style:none}.\[\&_\.session-title-input\]\:\[font\:inherit\] .session-title-input{font:inherit}.\[\&_\.settings-card\]\:mb-0 .settings-card,.\[\&_\.settings-card-head\]\:mb-0 .settings-card-head{margin-bottom:0}.\[\&_\.settings-card-head\]\:justify-between .settings-card-head{justify-content:space-between}.\[\&_\.settings-card-head\]\:pb-3 .settings-card-head{padding-bottom:calc(var(--spacing) * 3)}.\[\&_\.settings-card-head_h3\]\:m-0 .settings-card-head h3{margin:0}.\[\&_\.settings-form\]\:mt-6 .settings-form{margin-top:calc(var(--spacing) * 6)}.\[\&_\.settings-form\]\:border-t-0 .settings-form{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\.settings-form\]\:pt-0 .settings-form{padding-top:0}.\[\&_\.settings-sub\]\:mb-3 .settings-sub{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\.skill-chip\]\:me-0\.5 .skill-chip{margin-inline-end:calc(var(--spacing) * .5)}.\[\&_\.skill-chip\]\:align-baseline .skill-chip{vertical-align:baseline}.\[\&_\.skill-desc\]\:text-sm .skill-desc{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.skill-desc\]\:text-subtext .skill-desc{color:var(--subtext)}.\[\&_\.skill-name\]\:text-sm .skill-name{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.spinner\]\:h-5\.5 .spinner{height:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:w-5\.5 .spinner{width:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:border-\[3px\] .spinner{border-style:var(--tw-border-style);border-width:3px}.\[\&_\.stats\]\:flex .stats{display:flex}.\[\&_\.stats\]\:shrink-0 .stats{flex-shrink:0}.\[\&_\.stats\]\:items-center .stats{align-items:center}.\[\&_\.stats\]\:gap-2 .stats{gap:calc(var(--spacing) * 2)}.\[\&_\.stats\]\:font-mono .stats{font-family:var(--mono)}.\[\&_\.stats\]\:text-xs .stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.stats\]\:font-medium .stats{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.stats\]\:tabular-nums .stats{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.\[\&_\.status-badge\]\:text-text .status-badge{color:var(--text)}.\[\&_\.tab-close\]\:inline-flex .tab-close{display:inline-flex}.\[\&_\.tab-close\]\:h-3\.5 .tab-close{height:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:w-3\.5 .tab-close{width:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:shrink-0 .tab-close{flex-shrink:0}.\[\&_\.tab-close\]\:items-center .tab-close{align-items:center}.\[\&_\.tab-close\]\:justify-center .tab-close{justify-content:center}.\[\&_\.tab-close\]\:rounded-xs .tab-close{border-radius:4px}.\[\&_\.tab-close\]\:text-muted .tab-close{color:var(--muted)}.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:color-mix(in oklab,var(--text) 15%,transparent)}}.\[\&_\.tab-close\:hover\]\:text-text .tab-close:hover{color:var(--text)}.\[\&_\.tab-label\]\:grid .tab-label{display:grid}.\[\&_\.tab-label\]\:min-w-0 .tab-label{min-width:0}.\[\&_\.tab-label\]\:grid-cols-\[minmax\(0\,_1fr\)\] .tab-label{grid-template-columns:minmax(0,1fr)}.\[\&_\.tab-label\]\:overflow-hidden .tab-label,.\[\&_\.tab-label_\>_span\]\:overflow-hidden .tab-label>span{overflow:hidden}.\[\&_\.tab-label_\>_span\]\:pe-1 .tab-label>span{padding-inline-end:var(--spacing)}.\[\&_\.tab-label_\>_span\]\:text-ellipsis .tab-label>span{text-overflow:ellipsis}.\[\&_\.tab-label_\>_span\]\:whitespace-nowrap .tab-label>span{white-space:nowrap}.\[\&_\.tab-label_\>_span\]\:\[grid-area\:1_\/_1\] .tab-label>span{grid-area:1/1}.\[\&_\.tab-label\:\:after\]\:invisible .tab-label:after{visibility:hidden}.\[\&_\.tab-label\:\:after\]\:overflow-hidden .tab-label:after{overflow:hidden}.\[\&_\.tab-label\:\:after\]\:pe-1 .tab-label:after{padding-inline-end:var(--spacing)}.\[\&_\.tab-label\:\:after\]\:font-medium .tab-label:after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.tab-label\:\:after\]\:text-ellipsis .tab-label:after{text-overflow:ellipsis}.\[\&_\.tab-label\:\:after\]\:whitespace-nowrap .tab-label:after{white-space:nowrap}.\[\&_\.tab-label\:\:after\]\:content-\[attr\(data-label\)\] .tab-label:after{--tw-content:attr(data-label);content:var(--tw-content)}.\[\&_\.tab-label\:\:after\]\:\[grid-area\:1_\/_1\] .tab-label:after{grid-area:1/1}.\[\&_\.title\]\:max-w-60 .title{max-width:calc(var(--spacing) * 60)}.\[\&_\.title\]\:overflow-hidden .title{overflow:hidden}.\[\&_\.title\]\:text-sm .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.title\]\:font-medium .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.title\]\:text-ellipsis .title{text-overflow:ellipsis}.\[\&_\.title\]\:whitespace-nowrap .title{white-space:nowrap}.\[\&_\.unread-dot\]\:h-\[7px\] .unread-dot{height:7px}.\[\&_\.unread-dot\]\:w-\[7px\] .unread-dot{width:7px}.\[\&_\.unread-dot\]\:shrink-0 .unread-dot{flex-shrink:0}.\[\&_\.unread-dot\]\:rounded-full .unread-dot{border-radius:999px}.\[\&_\.unread-dot\]\:bg-primary .unread-dot{background-color:var(--primary)}.\[\&_\.v\]\:flex .v{display:flex}.\[\&_\.v\]\:min-w-0 .v{min-width:0}.\[\&_\.v\]\:flex-wrap .v{flex-wrap:wrap}.\[\&_\.v\]\:items-center .v{align-items:center}.\[\&_\.v\]\:gap-2 .v{gap:calc(var(--spacing) * 2)}.\[\&_\.v\]\:font-sans .v{font-family:var(--sans)}.\[\&_\.v\]\:text-base .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.v\]\:break-words .v{overflow-wrap:break-word}.\[\&_\.v\]\:break-all .v{word-break:break-all}.\[\&_\.v\]\:text-text .v{color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\]\:relative :where([data-tip]){position:relative}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:pointer-events-none :where([data-tip]):after{pointer-events:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:invisible :where([data-tip]):after{visibility:hidden}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:absolute :where([data-tip]):after{position:absolute}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:top-\[calc\(100\%_\+_6px\)\] :where([data-tip]):after{top:calc(100% + 6px)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:left-1\/2 :where([data-tip]):after{left:50%}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:z-\[9999\] :where([data-tip]):after{z-index:9999}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:w-max :where([data-tip]):after{width:max-content}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:max-w-none :where([data-tip]):after{max-width:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:-translate-x-1\/2 :where([data-tip]):after{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:rounded-sm :where([data-tip]):after{border-radius:6px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:bg-text :where([data-tip]):after{background-color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:px-2 :where([data-tip]):after{padding-inline:calc(var(--spacing) * 2)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:py-\[5px\] :where([data-tip]):after{padding-block:5px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-xs :where([data-tip]):after{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:leading-none :where([data-tip]):after{--tw-leading:1;line-height:1}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:font-medium :where([data-tip]):after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:whitespace-nowrap :where([data-tip]):after{white-space:nowrap}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-background :where([data-tip]):after{color:var(--base)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:opacity-0 :where([data-tip]):after{opacity:0}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:content-\[attr\(data-tip\)\] :where([data-tip]):after{--tw-content:attr(data-tip);content:var(--tw-content)}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:visible :where([data-tip]):is(:hover,:focus-visible):after{visibility:visible}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:opacity-100 :where([data-tip]):is(:hover,:focus-visible):after{opacity:1}.\[\&_\>_\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&_\>_\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_\.changes-note\]\:mx-4>.changes-note{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.changes-note\]\:my-3\.5>.changes-note{margin-block:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mx-4>.diff-explorer{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.diff-explorer\]\:mt-3\.5>.diff-explorer{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mb-0>.diff-explorer{margin-bottom:0}.\[\&_\>_\.error\]\:mx-0>.error{margin-inline:0}.\[\&_\>_\.error\]\:mt-0>.error{margin-top:0}.\[\&_\>_\.error\]\:mt-3\.5>.error{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.error\]\:mb-3>.error{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\>_\.error\]\:text-base>.error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\>_\.error\]\:whitespace-pre-wrap>.error{white-space:pre-wrap}.\[\&_\>_\.error\]\:text-accent-red>.error{color:var(--accent-red)}.\[\&_\>_\.openresearch-diff\]\:mx-4>.openresearch-diff{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.openresearch-diff\]\:mt-3\.5>.openresearch-diff{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.openresearch-diff\]\:mb-0>.openresearch-diff{margin-bottom:0}.\[\&_\>_\.project-default-row\:first-child\]\:border-t-0>.project-default-row:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\>_\.project-default-row\:first-child\]\:pt-0>.project-default-row:first-child{padding-top:0}.\[\&_\>_\.seg\]\:rounded-sm>.seg{border-radius:6px}.\[\&_\>_\.seg\]\:p-0\.5>.seg{padding:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:px-2>.seg button{padding-inline:calc(var(--spacing) * 2)}.\[\&_\>_\.seg_button\]\:py-0\.5>.seg button{padding-block:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:text-sm>.seg button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_\.seg_button\]\:font-medium>.seg button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\>_\.truncated-notice\]\:mx-4>.truncated-notice{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.truncated-notice\]\:mt-3\.5>.truncated-notice{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.truncated-notice\]\:mb-0>.truncated-notice{margin-bottom:0}.\[\&_\>_\:first-child\]\:mt-3\.5>:first-child{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_h2\]\:mx-0>h2{margin-inline:0}.\[\&_\>_h2\]\:mt-0>h2{margin-top:0}.\[\&_\>_h2\]\:mb-1\.5>h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\>_h2\]\:text-xl>h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\>_label\]\:gap-2>label{gap:calc(var(--spacing) * 2)}.\[\&_\>_p\]\:m-0>p{margin:0}.\[\&_\>_p\]\:text-sm>p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_p\]\:leading-relaxed>p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\>_p\]\:text-text>p{color:var(--text)}.\[\&_\>_span\]\:inline-flex>span{display:inline-flex}.\[\&_\>_span\]\:items-center>span{align-items:center}.\[\&_\>_span\]\:gap-\[5px\]>span{gap:5px}.\[\&_\>_svg\]\:shrink-0>svg{flex-shrink:0}.\[\&_\>_svg\]\:text-muted>svg{color:var(--muted)}.\[\&_\>_svg\]\:text-subtext>svg{color:var(--subtext)}.\[\&_\>_svg\.file-tree-chevron\]\:text-muted>svg.file-tree-chevron{color:var(--muted)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:start-auto [data-tip-align=end]:after{inset-inline-start:auto}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:end-0 [data-tip-align=end]:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:translate-none [data-tip-align=end]:after{translate:none}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:start-0 [data-tip-align=start]:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:translate-none [data-tip-align=start]:after{translate:none}.\[\&_a\]\:text-sm a{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_a\]\:whitespace-nowrap a{white-space:nowrap}.\[\&_a\]\:text-primary a{color:var(--primary)}.\[\&_a\]\:text-subtext a{color:var(--subtext)}.\[\&_blockquote\]\:mx-0 blockquote{margin-inline:0}.\[\&_blockquote\]\:my-1\.5 blockquote{margin-block:calc(var(--spacing) * 1.5)}.\[\&_blockquote\]\:border-s-\[3px\] blockquote{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.\[\&_blockquote\]\:border-s-border blockquote{border-inline-start-color:var(--border)}.\[\&_blockquote\]\:ps-2\.5 blockquote{padding-inline-start:calc(var(--spacing) * 2.5)}.\[\&_blockquote\]\:pe-0 blockquote{padding-inline-end:0}.\[\&_blockquote\]\:pt-0\.5 blockquote{padding-top:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:pb-0\.5 blockquote{padding-bottom:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:text-subtext blockquote{color:var(--subtext)}.\[\&_button\]\:absolute button{position:absolute}.\[\&_button\]\:-top-\[5px\] button{top:-5px}.\[\&_button\]\:-right-\[5px\] button{right:-5px}.\[\&_button\]\:-mb-px button{margin-bottom:-1px}.\[\&_button\]\:flex button{display:flex}.\[\&_button\]\:grid button{display:grid}.\[\&_button\]\:inline-flex button{display:inline-flex}.\[\&_button\]\:h-4 button{height:calc(var(--spacing) * 4)}.\[\&_button\]\:w-4 button{width:calc(var(--spacing) * 4)}.\[\&_button\]\:w-full button{width:100%}.\[\&_button\]\:cursor-pointer button{cursor:pointer}.\[\&_button\]\:grid-cols-\[18px_minmax\(0\,_1fr\)_auto_auto\] button{grid-template-columns:18px minmax(0,1fr) auto auto}.\[\&_button\]\:grid-cols-\[minmax\(72px\,_0\.7fr\)_minmax\(100px\,_1fr\)_minmax\(70px\,_0\.7fr\)_60px_16px\] button{grid-template-columns:minmax(72px,.7fr) minmax(100px,1fr) minmax(70px,.7fr) 60px 16px}.\[\&_button\]\:flex-col button{flex-direction:column}.\[\&_button\]\:items-center button{align-items:center}.\[\&_button\]\:items-start button{align-items:flex-start}.\[\&_button\]\:justify-center button{justify-content:center}.\[\&_button\]\:gap-0\.5 button{gap:calc(var(--spacing) * .5)}.\[\&_button\]\:gap-3\.5 button{gap:calc(var(--spacing) * 3.5)}.\[\&_button\]\:gap-\[7px\] button{gap:7px}.\[\&_button\]\:rounded-full button{border-radius:999px}.\[\&_button\]\:rounded-sm button{border-radius:6px}.\[\&_button\]\:rounded-xs button{border-radius:4px}.\[\&_button\]\:border button{border-style:var(--tw-border-style);border-width:1px}.\[\&_button\]\:border-0 button{border-style:var(--tw-border-style);border-width:0}.\[\&_button\]\:border-b button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_button\]\:border-b-2 button{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.\[\&_button\]\:border-border button{border-color:var(--border)}.\[\&_button\]\:border-b-border-variant button{border-bottom-color:var(--border-variant)}.\[\&_button\]\:border-b-transparent button{border-bottom-color:#0000}.\[\&_button\]\:bg-surface button{background-color:var(--surface)}.\[\&_button\]\:bg-transparent button{background-color:#0000}.\[\&_button\]\:bg-none button{background-image:none}.\[\&_button\]\:p-0 button{padding:0}.\[\&_button\]\:p-0\.5 button{padding:calc(var(--spacing) * .5)}.\[\&_button\]\:px-0 button{padding-inline:0}.\[\&_button\]\:px-0\.5 button{padding-inline:calc(var(--spacing) * .5)}.\[\&_button\]\:px-2 button{padding-inline:calc(var(--spacing) * 2)}.\[\&_button\]\:px-2\.5 button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_button\]\:px-3 button{padding-inline:calc(var(--spacing) * 3)}.\[\&_button\]\:px-\[9px\] button{padding-inline:9px}.\[\&_button\]\:py-0\.5 button{padding-block:calc(var(--spacing) * .5)}.\[\&_button\]\:py-2 button{padding-block:calc(var(--spacing) * 2)}.\[\&_button\]\:py-\[3px\] button{padding-block:3px}.\[\&_button\]\:py-\[7px\] button{padding-block:7px}.\[\&_button\]\:py-\[11px\] button{padding-block:11px}.\[\&_button\]\:text-start button{text-align:start}.\[\&_button\]\:text-sm button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_button\]\:font-medium button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_button\]\:text-muted button{color:var(--muted)}.\[\&_button\]\:text-text button{color:var(--text)}.\[\&_button\]\:\[font\:inherit\] button{font:inherit}.\[\&_button\.active\]\:border-b-primary button.active{border-bottom-color:var(--primary)}.\[\&_button\.active\]\:bg-background button.active{background-color:var(--base)}.\[\&_button\.active\]\:bg-surface button.active{background-color:var(--surface)}.\[\&_button\.active\]\:shadow-diff-active button.active{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--text));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,color-mix(in oklab, var(--text) 25%, transparent))}}.\[\&_button\.active\]\:shadow-segment button.active{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\:disabled\]\:cursor-default button:disabled{cursor:default}.\[\&_button\:disabled\]\:text-muted button:disabled{color:var(--muted)}.\[\&_button\:hover\]\:bg-panel button:hover{background-color:var(--panel)}.\[\&_button\:hover\]\:bg-surface button:hover{background-color:var(--surface)}.\[\&_button\:hover\]\:bg-text button:hover{background-color:var(--text)}.\[\&_button\:hover\]\:text-background button:hover{color:var(--base)}.\[\&_button\:hover\]\:text-text button:hover{color:var(--text)}.\[\&_button\:hover\]\:underline button:hover{text-decoration-line:underline}.\[\&_button\:hover\]\:underline-offset-2 button:hover{text-underline-offset:2px}.\[\&_button\:last-child\]\:border-b-0 button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_button\:not\(\:disabled\)\:hover\]\:text-text button:not(:disabled):hover{color:var(--text)}.\[\&_code\]\:min-w-0 code{min-width:0}.\[\&_code\]\:overflow-hidden code{overflow:hidden}.\[\&_code\]\:rounded-xs code{border-radius:4px}.\[\&_code\]\:border code{border-style:var(--tw-border-style);border-width:1px}.\[\&_code\]\:border-border-variant code{border-color:var(--border-variant)}.\[\&_code\]\:bg-panel code{background-color:var(--panel)}.\[\&_code\]\:px-\[5px\] code{padding-inline:5px}.\[\&_code\]\:py-px code{padding-block:1px}.\[\&_code\]\:font-mono code{font-family:var(--mono)}.\[\&_code\]\:text-sm code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_code\]\:font-medium code{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_code\]\:text-ellipsis code{text-overflow:ellipsis}.\[\&_code\]\:whitespace-nowrap code{white-space:nowrap}.\[\&_code\]\:text-primary code{color:var(--primary)}.\[\&_code\]\:text-text code{color:var(--text)}.\[\&_h1\]\:m-0 h1{margin:0}.\[\&_h1\]\:mx-0 h1{margin-inline:0}.\[\&_h1\]\:mt-0 h1{margin-top:0}.\[\&_h1\]\:mt-3 h1{margin-top:calc(var(--spacing) * 3)}.\[\&_h1\]\:mt-7 h1{margin-top:calc(var(--spacing) * 7)}.\[\&_h1\]\:mb-1\.5 h1{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h1\]\:mb-3\.5 h1{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h1\]\:text-3xl h1{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h1\]\:text-4xl h1{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h1\]\:text-xl h1{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h1\]\:text-prose-emphasis h1{font-size:1.05em}.\[\&_h1\]\:leading-\[1\.18\] h1{--tw-leading:1.18;line-height:1.18}.\[\&_h1\]\:leading-tight h1{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h1\]\:font-semibold h1{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h1\]\:text-text h1{color:var(--text)}.\[\&_h2\]\:m-0 h2{margin:0}.\[\&_h2\]\:mx-0 h2{margin-inline:0}.\[\&_h2\]\:mt-0 h2{margin-top:0}.\[\&_h2\]\:mt-3 h2{margin-top:calc(var(--spacing) * 3)}.\[\&_h2\]\:mt-7 h2{margin-top:calc(var(--spacing) * 7)}.\[\&_h2\]\:mb-1\.5 h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h2\]\:mb-2\.5 h2{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h2\]\:mb-3\.5 h2{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h2\]\:flex h2{display:flex}.\[\&_h2\]\:items-center h2{align-items:center}.\[\&_h2\]\:gap-2 h2{gap:calc(var(--spacing) * 2)}.\[\&_h2\]\:text-3xl h2{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h2\]\:text-4xl h2{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h2\]\:text-5xl h2{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.\[\&_h2\]\:text-lg h2{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h2\]\:text-sm h2{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h2\]\:text-xl h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h2\]\:text-prose-emphasis h2{font-size:1.05em}.\[\&_h2\]\:leading-tight h2{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h2\]\:font-medium h2{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_h2\]\:font-semibold h2{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h2\]\:tracking-\[-0\.02em\] h2{--tw-tracking:-.02em;letter-spacing:-.02em}.\[\&_h2\]\:tracking-\[-0\.015em\] h2{--tw-tracking:-.015em;letter-spacing:-.015em}.\[\&_h2\]\:text-text h2{color:var(--text)}.\[\&_h3\]\:mx-0 h3{margin-inline:0}.\[\&_h3\]\:mt-0 h3{margin-top:0}.\[\&_h3\]\:mt-3 h3{margin-top:calc(var(--spacing) * 3)}.\[\&_h3\]\:mt-5\.5 h3{margin-top:calc(var(--spacing) * 5.5)}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mb-2 h3{margin-bottom:calc(var(--spacing) * 2)}.\[\&_h3\]\:mb-2\.5 h3{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h3\]\:mb-3 h3{margin-bottom:calc(var(--spacing) * 3)}.\[\&_h3\]\:text-base h3{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_h3\]\:text-xl h3{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h3\]\:text-prose-emphasis h3{font-size:1.05em}.\[\&_h3\]\:leading-\[1\.35\] h3{--tw-leading:1.35;line-height:1.35}.\[\&_h3\]\:font-semibold h3{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h3\]\:text-text h3{color:var(--text)}.\[\&_h4\]\:mx-0 h4{margin-inline:0}.\[\&_h4\]\:mt-0 h4{margin-top:0}.\[\&_h4\]\:mt-3 h4{margin-top:calc(var(--spacing) * 3)}.\[\&_h4\]\:mt-4\.5 h4{margin-top:calc(var(--spacing) * 4.5)}.\[\&_h4\]\:mb-1 h4{margin-bottom:var(--spacing)}.\[\&_h4\]\:mb-1\.5 h4{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h4\]\:text-lg h4{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h4\]\:text-sm h4{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h4\]\:text-prose-emphasis h4{font-size:1.05em}.\[\&_h4\]\:leading-\[1\.4\] h4{--tw-leading:1.4;line-height:1.4}.\[\&_h4\]\:font-semibold h4{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h4\]\:text-accent-amber h4{color:var(--accent-amber)}.\[\&_h4\]\:text-text h4{color:var(--text)}.\[\&_img\]\:block img{display:block}.\[\&_img\]\:h-13 img{height:calc(var(--spacing) * 13)}.\[\&_img\]\:h-auto img{height:auto}.\[\&_img\]\:max-h-40 img{max-height:calc(var(--spacing) * 40)}.\[\&_img\]\:w-13 img{width:calc(var(--spacing) * 13)}.\[\&_img\]\:max-w-55 img{max-width:calc(var(--spacing) * 55)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_img\]\:rounded-sm img{border-radius:6px}.\[\&_img\]\:rounded-xs img{border-radius:4px}.\[\&_img\]\:border img{border-style:var(--tw-border-style);border-width:1px}.\[\&_img\]\:border-border img{border-color:var(--border)}.\[\&_img\]\:border-border-variant img{border-color:var(--border-variant)}.\[\&_img\]\:object-cover img{object-fit:cover}.\[\&_input\]\:m-0 input{margin:0}.\[\&_input\]\:w-full input{width:100%}.\[\&_input\]\:min-w-55 input{min-width:calc(var(--spacing) * 55)}.\[\&_input\]\:flex-1 input{flex:1}.\[\&_input\]\:rounded-none input{border-radius:0}.\[\&_input\]\:border-0 input{border-style:var(--tw-border-style);border-width:0}.\[\&_input\]\:border-b input{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_input\]\:border-b-border-variant input{border-bottom-color:var(--border-variant)}.\[\&_input\]\:bg-transparent input{background-color:#0000}.\[\&_input\]\:bg-none input{background-image:none}.\[\&_input\]\:px-2\.5 input{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_input\]\:py-2 input{padding-block:calc(var(--spacing) * 2)}.\[\&_input\]\:font-sans input{font-family:var(--sans)}.\[\&_input\]\:text-sm input{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_input\]\:font-normal input{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_input\]\:text-text input{color:var(--text)}.\[\&_input\]\:outline-none input{--tw-outline-style:none;outline-style:none}.\[\&_input\:\:placeholder\]\:text-subtext input::placeholder{color:var(--subtext)}.\[\&_label\]\:flex label{display:flex}.\[\&_label\]\:flex-col label{flex-direction:column}.\[\&_label\]\:gap-1 label{gap:var(--spacing)}.\[\&_label\]\:text-sm label{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_label\]\:font-medium label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_label\]\:text-text label{color:var(--text)}.\[\&_legend\]\:mb-1\.5 legend{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_legend\]\:text-base legend{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_legend\]\:font-medium legend{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_li\:\:marker\]\:text-primary li::marker{color:var(--primary)}.\[\&_ol\]\:mx-0 ol{margin-inline:0}.\[\&_ol\]\:my-1\.5 ol{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ol\]\:ps-5\.5 ol{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&_p\]\:m-0 p{margin:0}.\[\&_p\]\:mx-0 p{margin-inline:0}.\[\&_p\]\:my-2\.5 p{margin-block:calc(var(--spacing) * 2.5)}.\[\&_p\]\:mt-\[3px\] p{margin-top:3px}.\[\&_p\]\:mb-0 p{margin-bottom:0}.\[\&_p\]\:max-w-80 p{max-width:calc(var(--spacing) * 80)}.\[\&_p\]\:max-w-\[46ch\] p{max-width:46ch}.\[\&_p\]\:text-sm p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_p\]\:leading-normal p{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_p\]\:text-balance p{text-wrap:balance}.\[\&_p\]\:text-subtext p{color:var(--subtext)}.\[\&_p\]\:text-text p{color:var(--text)}.\[\&_p_\+_p\]\:mt-3 p+p{margin-top:calc(var(--spacing) * 3)}.\[\&_p\.empty-state-hint\]\:text-lg p.empty-state-hint{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_p\.empty-state-hint\]\:text-subtext p.empty-state-hint{color:var(--subtext)}.\[\&_p\.empty-state-title\]\:text-2xl p.empty-state-title{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\.empty-state-title\]\:font-normal p.empty-state-title{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_p\.empty-state-title\]\:text-text p.empty-state-title{color:var(--text)}.\[\&_pre\]\:m-0 pre{margin:0}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-md pre{border-radius:8px}.\[\&_pre\]\:border pre{border-style:var(--tw-border-style);border-width:1px}.\[\&_pre\]\:border-border-muted pre{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_pre\]\:border-border-muted pre{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.\[\&_pre\]\:bg-surface pre{background-color:var(--surface)}.\[\&_pre\]\:px-3 pre{padding-inline:calc(var(--spacing) * 3)}.\[\&_pre\]\:py-2 pre{padding-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:text-sm pre{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_pre\]\:text-text pre{color:var(--text)}.\[\&_pre_code\]\:border-0 pre code{border-style:var(--tw-border-style);border-width:0}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:bg-none pre code{background-image:none}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_pre_code\]\:font-normal pre code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_pre_code\]\:text-inherit pre code{color:inherit}.\[\&_select\]\:font-sans select{font-family:var(--sans)}.\[\&_select\]\:text-sm select{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_select\]\:font-normal select{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_select\]\:text-text select{color:var(--text)}.\[\&_span\]\:absolute span{position:absolute}.\[\&_span\]\:start-\[3px\] span{inset-inline-start:3px}.\[\&_span\]\:top-\[3px\] span{top:3px}.\[\&_span\]\:h-3\.5 span{height:calc(var(--spacing) * 3.5)}.\[\&_span\]\:w-3\.5 span{width:calc(var(--spacing) * 3.5)}.\[\&_span\]\:translate-x-4 span{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_span\]\:overflow-hidden span{overflow:hidden}.\[\&_span\]\:rounded-full span{border-radius:999px}.\[\&_span\]\:bg-background span{background-color:var(--base)}.\[\&_span\]\:bg-muted span{background-color:var(--muted)}.\[\&_span\]\:text-ellipsis span{text-overflow:ellipsis}.\[\&_span\]\:whitespace-nowrap span{white-space:nowrap}.\[\&_span\]\:transition-\[translate\,background\] span{transition-property:translate,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_span\]\:duration-120 span{--tw-duration:.12s;transition-duration:.12s}.\[\&_span\]\:ease-standard span{--tw-ease:ease;transition-timing-function:ease}.\[\&_strong\]\:font-medium strong{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_strong\]\:text-accent-amber strong{color:var(--accent-amber)}.\[\&_strong\]\:text-text strong{color:var(--text)}.\[\&_summary\]\:flex summary{display:flex}.\[\&_summary\]\:w-fit summary{width:fit-content}.\[\&_summary\]\:max-w-full summary{max-width:100%}.\[\&_summary\]\:cursor-pointer summary{cursor:pointer}.\[\&_summary\]\:list-none summary{list-style-type:none}.\[\&_summary\]\:items-center summary{align-items:center}.\[\&_summary\]\:gap-2 summary{gap:calc(var(--spacing) * 2)}.\[\&_summary\]\:rounded-sm summary{border-radius:6px}.\[\&_summary\]\:px-1 summary{padding-inline:var(--spacing)}.\[\&_summary\]\:py-\[3px\] summary{padding-block:3px}.\[\&_summary\]\:select-none summary{-webkit-user-select:none;user-select:none}.\[\&_summary_\.plan-chevron\]\:transition-transform summary .plan-chevron{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary_\.plan-chevron\]\:duration-120 summary .plan-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_summary_\.plan-chevron\]\:ease-standard summary .plan-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:-webkit-details-marker\]\:hidden summary::-webkit-details-marker{display:none}.\[\&_summary\:\:after\]\:text-muted summary:after{color:var(--muted)}.\[\&_summary\:\:after\]\:transition-transform summary:after{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary\:\:after\]\:duration-80 summary:after{--tw-duration:80ms;transition-duration:80ms}.\[\&_summary\:\:after\]\:ease-standard summary:after{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:after\]\:content-\[\'›\'\] summary:after{--tw-content:"›";content:var(--tw-content)}.\[\&_summary\:hover\]\:bg-surface summary:hover{background-color:var(--surface)}.\[\&_svg\]\:block svg{display:block}.\[\&_svg\]\:h-\[1em\] svg{height:1em}.\[\&_svg\]\:h-full svg{height:100%}.\[\&_svg\]\:w-\[1em\] svg{width:1em}.\[\&_svg\]\:w-full svg{width:100%}.\[\&_svg\]\:flex-none svg{flex:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\]\:text-muted svg{color:var(--muted)}.\[\&_table\]\:mx-0 table{margin-inline:0}.\[\&_table\]\:my-2\.5 table{margin-block:calc(var(--spacing) * 2.5)}.\[\&_table\]\:block table{display:block}.\[\&_table\]\:w-max table{width:max-content}.\[\&_table\]\:max-w-full table{max-width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:overflow-x-auto table{overflow-x:auto}.\[\&_table\]\:rounded-md table{border-radius:8px}.\[\&_table\]\:border table{border-style:var(--tw-border-style);border-width:1px}.\[\&_table\]\:border-border table{border-color:var(--border)}.\[\&_table\]\:text-sm table{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_tbody_tr\:hover_td\]\:bg-surface-bright tbody tr:hover td{background-color:var(--surface-bright)}.\[\&_td\]\:h-12 td{height:calc(var(--spacing) * 12)}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:border-b-border-variant td{border-bottom-color:var(--border-variant)}.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:color-mix(in oklab,var(--text) 6%,transparent)}}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:px-3\.5 td{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_td\]\:py-2 td{padding-block:calc(var(--spacing) * 2)}.\[\&_td\]\:ps-0 td{padding-inline-start:0}.\[\&_td\]\:pe-2\.5 td{padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_td\]\:pt-0 td{padding-top:0}.\[\&_td\]\:pb-0 td{padding-bottom:0}.\[\&_td\]\:text-start td{text-align:start}.\[\&_td\]\:align-middle td{vertical-align:middle}.\[\&_td\]\:break-normal td{overflow-wrap:normal;word-break:normal}.\[\&_td\]\:break-words td{overflow-wrap:break-word}.\[\&_td\]\:whitespace-nowrap td{white-space:nowrap}.\[\&_td\]\:text-text td{color:var(--text)}.\[\&_td\:first-child\]\:w-\[32\%\] td:first-child{width:32%}.\[\&_td\:first-child\]\:wrap-anywhere td:first-child{overflow-wrap:anywhere}.\[\&_td\:last-child\]\:w-29 td:last-child{width:calc(var(--spacing) * 29)}.\[\&_td\:last-child\]\:text-end td:last-child{text-align:end}.\[\&_td\:last-child\]\:whitespace-nowrap td:last-child{white-space:nowrap}.\[\&_td\[colspan\]\]\:text-start td[colspan]{text-align:start}.\[\&_td\[colspan\]\]\:whitespace-normal td[colspan]{white-space:normal}.\[\&_textarea\]\:field-sizing-content textarea{field-sizing:content}.\[\&_textarea\]\:max-h-45 textarea{max-height:calc(var(--spacing) * 45)}.\[\&_textarea\]\:min-h-18 textarea{min-height:calc(var(--spacing) * 18)}.\[\&_textarea\]\:flex-1 textarea{flex:1}.\[\&_textarea\]\:resize-none textarea{resize:none}.\[\&_textarea\]\:border-0 textarea{border-style:var(--tw-border-style);border-width:0}.\[\&_textarea\]\:bg-transparent textarea{background-color:#0000}.\[\&_textarea\]\:bg-none textarea{background-image:none}.\[\&_textarea\]\:px-3 textarea{padding-inline:calc(var(--spacing) * 3)}.\[\&_textarea\]\:pt-2\.5 textarea{padding-top:calc(var(--spacing) * 2.5)}.\[\&_textarea\]\:pb-1 textarea{padding-bottom:var(--spacing)}.\[\&_textarea\]\:font-mono textarea{font-family:var(--mono)}.\[\&_textarea\]\:text-base textarea{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_textarea\]\:text-sm textarea{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:sticky th{position:sticky}.\[\&_th\]\:top-0 th{top:0}.\[\&_th\]\:z-1 th{z-index:1}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:border-b-border th{border-bottom-color:var(--border)}.\[\&_th\]\:border-b-border-variant th{border-bottom-color:var(--border-variant)}.\[\&_th\]\:bg-background th{background-color:var(--base)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:px-3\.5 th{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_th\]\:py-2 th{padding-block:calc(var(--spacing) * 2)}.\[\&_th\]\:text-start th{text-align:start}.\[\&_th\]\:text-sm th{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:font-medium th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_th\]\:break-normal th{overflow-wrap:normal;word-break:normal}.\[\&_th\]\:break-words th{overflow-wrap:break-word}.\[\&_th\]\:text-text th{color:var(--text)}.\[\&_thead_th\]\:border-b thead th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_thead_th\]\:border-b-border thead th{border-bottom-color:var(--border)}.\[\&_thead_th\]\:bg-surface thead th{background-color:var(--surface)}.\[\&_thead_th\]\:font-medium thead th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_thead_th\]\:text-text thead th{color:var(--text)}.\[\&_tr\.clickable\]\:cursor-pointer tr.clickable{cursor:pointer}.\[\&_tr\.clickable\:hover_td\]\:bg-canvas tr.clickable:hover td{background-color:var(--canvas)}.\[\&_tr\:last-child_td\]\:border-b-0 tr:last-child td{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_ul\]\:mx-0 ul{margin-inline:0}.\[\&_ul\]\:my-1\.5 ul{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ul\]\:ps-5\.5 ul{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&\+\&\]\:border-t+.\[\&\+\&\]\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&\+\&\]\:border-border-variant+.\[\&\+\&\]\:border-border-variant{border-color:var(--border-variant)}.\[\&\.active\]\:border-border.active{border-color:var(--border)}.\[\&\.active\]\:bg-background.active{background-color:var(--base)}.\[\&\.active\]\:bg-panel.active{background-color:var(--panel)}.\[\&\.active\]\:bg-surface.active{background-color:var(--surface)}.\[\&\.active\]\:font-medium.active{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&\.active\]\:text-muted.active{color:var(--muted)}.\[\&\.active\]\:text-primary.active{color:var(--primary)}.\[\&\.active\]\:text-text.active{color:var(--text)}.\[\&\.active\:\:after\]\:absolute.active:after{position:absolute}.\[\&\.active\:\:after\]\:start-0.active:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:end-0.active:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:-bottom-px.active:after{bottom:-1px}.\[\&\.active\:\:after\]\:h-px.active:after{height:1px}.\[\&\.active\:\:after\]\:bg-background.active:after{background-color:var(--base)}.\[\&\.active\:\:after\]\:content-\[\'\'\].active:after{--tw-content:"";content:var(--tw-content)}.\[\&\.align-right\]\:start-auto.align-right{inset-inline-start:auto}.\[\&\.align-right\]\:end-0.align-right{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.approved\]\:text-accent-green.approved{color:var(--accent-green)}.\[\&\.approved\:\:before\]\:content-\[\'✓_\'\].approved:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.archive\]\:text-accent-amber.archive{color:var(--accent-amber)}.\[\&\.chosen\]\:text-accent-green.chosen{color:var(--accent-green)}.\[\&\.chosen\:\:before\]\:content-\[\'✓_\'\].chosen:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.clamped\]\:relative.clamped{position:relative}.\[\&\.clamped\]\:max-h-\[9\.5em\].clamped{max-height:9.5em}.\[\&\.clamped\]\:overflow-hidden.clamped{overflow:hidden}.\[\&\.clamped\:\:after\]\:pointer-events-none.clamped:after{pointer-events:none}.\[\&\.clamped\:\:after\]\:absolute.clamped:after{position:absolute}.\[\&\.clamped\:\:after\]\:inset-x-0.clamped:after{inset-inline:0}.\[\&\.clamped\:\:after\]\:top-auto.clamped:after{top:auto}.\[\&\.clamped\:\:after\]\:bottom-0.clamped:after{bottom:0}.\[\&\.clamped\:\:after\]\:h-8\.5.clamped:after{height:calc(var(--spacing) * 8.5)}.\[\&\.clamped\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_transparent\,_var\(--surface\)\)\].clamped:after{background-image:linear-gradient(to bottom,transparent,var(--surface))}.\[\&\.clamped\:\:after\]\:content-\[\'\'\].clamped:after{--tw-content:"";content:var(--tw-content)}.\[\&\.closable\]\:max-w-60.closable{max-width:calc(var(--spacing) * 60)}.\[\&\.closable\]\:pe-0\.5.closable{padding-inline-end:calc(var(--spacing) * .5)}.\[\&\.code\]\:text-accent-orange.code{color:var(--accent-orange)}.\[\&\.doc\]\:px-7.doc{padding-inline:calc(var(--spacing) * 7)}.\[\&\.doc\]\:pt-4\.5.doc{padding-top:calc(var(--spacing) * 4.5)}.\[\&\.doc\]\:pb-12.doc{padding-bottom:calc(var(--spacing) * 12)}.\[\&\.doc_\.artifact-md\]\:mx-auto.doc .artifact-md{margin-inline:auto}.\[\&\.doc_\.artifact-md\]\:my-0.doc .artifact-md{margin-block:0}.\[\&\.doc_\.artifact-md\]\:max-w-readable.doc .artifact-md{max-width:var(--readable-col)}.\[\&\.document\]\:text-subtext.document{color:var(--subtext)}.\[\&\.drop-down\]\:top-\[calc\(100\%_\+_4px\)\].drop-down{top:calc(100% + 4px)}.\[\&\.drop-down\]\:bottom-auto.drop-down{bottom:auto}.\[\&\.editing\]\:cursor-default.editing{cursor:default}.\[\&\.editing\]\:bg-surface.editing{background-color:var(--surface)}.\[\&\.editing_\.session-dot\]\:hidden.editing .session-dot,.\[\&\.editing_\.session-menu-btn\]\:hidden.editing .session-menu-btn{display:none}.\[\&\.err\]\:bg-accent-red.err{background-color:var(--accent-red)}.\[\&\.expanded_\.diff-file-header\]\:border-b.expanded .diff-file-header{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&\.expanded_\.diff-file-header\]\:border-b-border.expanded .diff-file-header{border-bottom-color:var(--border)}.\[\&\.fail\]\:border-\[1\.5px\].fail{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.fail\]\:border-danger-outline.fail{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\.fail\]\:border-danger-outline.fail{border-color:color-mix(in oklab,var(--accent-red) 55%,transparent)}}.\[\&\.failed\]\:text-accent-red.failed{color:var(--accent-red)}.\[\&\.image\]\:text-accent-purple.image{color:var(--accent-purple)}.\[\&\.live\]\:animate-\[or-pulse_1\.2s_ease-in-out_infinite\].live{animation:1.2s ease-in-out infinite or-pulse}.\[\&\.live\]\:border-accent-teal.live{border-color:var(--accent-teal)}.\[\&\.live\]\:bg-accent-teal.live{background-color:var(--accent-teal)}.\[\&\.live\]\:shadow-tree-live.live{--tw-shadow:0 2px 12px var(--tw-shadow-color,#209a8433);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.markdown\]\:text-accent-blue.markdown{color:var(--accent-blue)}.\[\&\.max\]\:fixed.max{position:fixed}.\[\&\.max\]\:inset-2\.5.max{inset:calc(var(--spacing) * 2.5)}.\[\&\.max\]\:z-60.max{z-index:60}.\[\&\.max\]\:m-0.max{margin:0}.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,color-mix(in oklab, var(--text) 22%, transparent))}}.\[\&\.max\]\:shadow-panel-max.max{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.menu-open_\.session-dot\]\:hidden.menu-open .session-dot{display:none}.\[\&\.menu-open_\.session-menu-btn\]\:inline-flex.menu-open .session-menu-btn{display:inline-flex}.\[\&\.muted\]\:text-muted.muted{color:var(--muted)}.\[\&\.ok\]\:bg-accent-green.ok{background-color:var(--accent-green)}.\[\&\.on\]\:bg-primary.on{background-color:var(--primary)}.\[\&\.on\]\:text-background.on{color:var(--base)}.\[\&\.open\]\:rotate-90.open{rotate:90deg}.\[\&\.other\]\:border-\[1\.5px\].other{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.other\]\:border-border.other{border-color:var(--border)}.\[\&\.pass\]\:bg-accent-green.pass{background-color:var(--accent-green)}.\[\&\.pdf\]\:text-accent-red.pdf{color:var(--accent-red)}.\[\&\.permission\]\:border-s-accent-amber.permission{border-inline-start-color:var(--accent-amber)}.\[\&\.plan\]\:border-s-accent-blue.plan{border-inline-start-color:var(--accent-blue)}.\[\&\.question\]\:border-s-accent-purple.question{border-inline-start-color:var(--accent-purple)}.\[\&\.readonly\]\:opacity-60.readonly{opacity:.6}.\[\&\.rejected\]\:text-accent-amber.rejected,.\[\&\.revised\]\:text-accent-amber.revised{color:var(--accent-amber)}.\[\&\.sel\]\:border-primary.sel{border-color:var(--primary)}.\[\&\.sel\]\:bg-primary-subtle.sel{background-color:var(--primary-subtle)}.\[\&\.selected\]\:border-accent.selected{border-color:var(--accent)}.\[\&\.selected\]\:bg-panel.selected{background-color:var(--panel)}.\[\&\.selected\]\:shadow-selected.selected{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--accent));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.selected\:hover\]\:bg-panel.selected:hover{background-color:var(--panel)}.\[\&\.session-menu\]\:start-auto.session-menu{inset-inline-start:auto}.\[\&\.session-menu\]\:end-1\.5.session-menu{inset-inline-end:calc(var(--spacing) * 1.5)}.\[\&\.session-menu\]\:top-\[calc\(100\%_-_2px\)\].session-menu{top:calc(100% - 2px)}.\[\&\.session-menu\]\:min-w-35.session-menu{min-width:calc(var(--spacing) * 35)}.\[\&\.spreadsheet\]\:text-accent-green.spreadsheet,.\[\&\.status-add\]\:text-accent-green.status-add{color:var(--accent-green)}.\[\&\.status-copy\]\:text-accent-blue.status-copy{color:var(--accent-blue)}.\[\&\.status-delete\]\:text-accent-red.status-delete{color:var(--accent-red)}.\[\&\.status-rename\]\:text-accent-blue.status-rename{color:var(--accent-blue)}.\[\&\.warn\]\:bg-accent-amber.warn{background-color:var(--accent-amber)}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:\:after\]\:pointer-events-none:after{pointer-events:none}.\[\&\:\:after\]\:absolute:after{position:absolute}.\[\&\:\:after\]\:start-0:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:end-0:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:top-full:after{top:100%}.\[\&\:\:after\]\:h-6:after{height:calc(var(--spacing) * 6)}.\[\&\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_var\(--base\)\,_transparent\)\]:after{background-image:linear-gradient(to bottom,var(--base),transparent)}.\[\&\:\:after\]\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.\[\&\:active\]\:bg-resizer-hover:active{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\]\:bg-resizer-hover:active{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 14%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:bg-highlight:active:not(:disabled){background-color:var(--highlight)}.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:disabled\]\:cursor-default:disabled{cursor:default}.\[\&\:focus\]\:border-accent-blue:focus{border-color:var(--accent-blue)}.\[\&\:focus-visible\]\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&\:focus-visible\]\:outline-offset-2:focus-visible{outline-offset:2px}.\[\&\:focus-visible\]\:outline-text:focus-visible{outline-color:var(--text)}.\[\&\:focus-visible\]\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&\:focus-visible_\.session-dot\]\:hidden:focus-visible .session-dot{display:none}.\[\&\:focus-visible_\.session-menu-btn\]\:inline-flex:focus-visible .session-menu-btn{display:inline-flex}.\[\&\:has\(\.session-menu-btn\:focus-visible\)_\.session-dot\]\:hidden:has(.session-menu-btn:focus-visible) .session-dot{display:none}.\[\&\:has\(input\:checked\)\]\:border-accent:has(input:checked){border-color:var(--accent)}.\[\&\:has\(input\:checked\)\]\:bg-primary-subtle:has(input:checked){background-color:var(--primary-subtle)}.\[\&\:hover\]\:border-primary:hover{border-color:var(--primary)}.\[\&\:hover\]\:border-text:hover{border-color:var(--text)}.\[\&\:hover\]\:bg-canvas:hover{background-color:var(--canvas)}.\[\&\:hover\]\:bg-panel:hover{background-color:var(--panel)}.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:hover\]\:bg-surface:hover{background-color:var(--surface)}.\[\&\:hover\]\:bg-text:hover{background-color:var(--text)}.\[\&\:hover\]\:text-background:hover{color:var(--base)}.\[\&\:hover\]\:text-text:hover{color:var(--text)}.\[\&\:hover\]\:underline:hover{text-decoration-line:underline}.\[\&\:hover\]\:shadow-tree-hover:hover{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\:hover_\.ft-row-delete\]\:opacity-100:hover .ft-row-delete,.\[\&\:hover_\.md-code-copy\]\:opacity-100:hover .md-code-copy{opacity:1}.\[\&\:hover_\.session-dot\]\:hidden:hover .session-dot{display:none}.\[\&\:hover_\.session-menu-btn\]\:inline-flex:hover .session-menu-btn{display:inline-flex}.\[\&\:hover\:not\(\.active\)\]\:bg-surface:hover:not(.active){background-color:var(--surface)}.\[\&\:hover\:not\(\.on\)\]\:bg-highlight:hover:not(.on){background-color:var(--highlight)}.\[\&\:hover\:not\(\.on\)\]\:text-text:hover:not(.on){color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:border-accent-blue:hover:not(:disabled){border-color:var(--accent-blue)}.\[\&\:hover\:not\(\:disabled\)\]\:border-border-strong:hover:not(:disabled){border-color:var(--border-strong)}.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:border-text:hover:not(:disabled){border-color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-amber-subtle:hover:not(:disabled){background-color:var(--accent-amber-subtle)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-blue) 90%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 8%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:var(--surface)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--surface) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-surface:hover:not(:disabled){background-color:var(--surface)}.\[\&\:hover\:not\(\:disabled\)\]\:text-accent-red:hover:not(:disabled){color:var(--accent-red)}.\[\&\:hover\:not\(\:disabled\)\]\:text-text:hover:not(:disabled){color:var(--text)}.\[\&\:last-child\]\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:absolute:not(.active)+.tab:not(.active):before{position:absolute}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:-start-px:not(.active)+.tab:not(.active):before{inset-inline-start:-1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:top-2\.5:not(.active)+.tab:not(.active):before{top:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bottom-2\.5:not(.active)+.tab:not(.active):before{bottom:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:w-px:not(.active)+.tab:not(.active):before{width:1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bg-border:not(.active)+.tab:not(.active):before{background-color:var(--border)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:content-\[\'\'\]:not(.active)+.tab:not(.active):before{--tw-content:"";content:var(--tw-content)}.\[\&\>\.settings-form\:first-child\]\:mt-0>.settings-form:first-child{margin-top:0}.\[\&\>div\:first-child\]\:border-t-0>div:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&\[data-tip\]\:\:after\]\:top-auto[data-tip]:after{top:auto}.\[\&\[data-tip\]\:\:after\]\:bottom-\[calc\(100\%_\+_6px\)\][data-tip]:after{bottom:calc(100% + 6px)}.\[\&\[open\]_summary_\.plan-chevron\]\:rotate-90[open] summary .plan-chevron,.\[\&\[open\]_summary\:\:after\]\:rotate-90[open] summary:after{rotate:90deg}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.atrule\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.atrule{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-name\]\:text-syntax-green,.openresearch-diff,.file-view) .token.attr-name{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-value\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.attr-value,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.boolean\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.boolean{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.builtin\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.builtin{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.cdata{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:italic,.openresearch-diff,.file-view) .token.cdata{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.char\]\:text-syntax-green,.openresearch-diff,.file-view) .token.char{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.class-name\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.class-name{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.comment{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:italic,.openresearch-diff,.file-view) .token.comment{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.constant\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.constant{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.decorator\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.decorator,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.def\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.def{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.deleted\]\:text-syntax-red,.openresearch-diff,.file-view) .token.deleted{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.entity\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.entity{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.function\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.function{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.important\]\:text-syntax-red,.openresearch-diff,.file-view) .token.important{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.inserted\]\:text-syntax-green,.openresearch-diff,.file-view) .token.inserted{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.keyword\]\:text-syntax-purple,.openresearch-diff,.file-view) .token.keyword{color:var(--syntax-purple)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.namespace\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.namespace{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.number\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.number{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.operator\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.operator{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.parameter\]\:text-syntax-text,.openresearch-diff,.file-view) .token.parameter{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.prolog{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:italic,.openresearch-diff,.file-view) .token.prolog{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.property\]\:text-syntax-red,.openresearch-diff,.file-view) .token.property{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.punctuation\]\:text-syntax-text,.openresearch-diff,.file-view) .token.punctuation{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.regex\]\:text-syntax-green,.openresearch-diff,.file-view) .token.regex,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.selector\]\:text-syntax-green,.openresearch-diff,.file-view) .token.selector,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.string\]\:text-syntax-green,.openresearch-diff,.file-view) .token.string{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.symbol\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.symbol{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.tag\]\:text-syntax-red,.openresearch-diff,.file-view) .token.tag{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.url\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.url{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.variable\]\:text-syntax-red,.openresearch-diff,.file-view) .token.variable{color:var(--syntax-red)}@container (max-width:400px){.\[\@container\(\(max-width\:_400px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)\]{grid-template-columns:minmax(0,1fr)}.\[\@container\(\(max-width\:_400px\)\)\]\:\!flex-row{flex-direction:row!important}.\[\@container\(\(max-width\:_400px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@container\(\(max-width\:_400px\)\)\]\:\!items-center{align-items:center!important}.\[\@container\(\(max-width\:_400px\)\)\]\:justify-start{justify-content:flex-start}.\[\@container\(\(max-width\:_400px\)\)\]\:gap-3{gap:calc(var(--spacing) * 3)}.\[\@container\(\(max-width\:_400px\)\)\]\:\[grid-template-areas\:\'name\'_\'meta\'_\'actions\'\]{grid-template-areas:"name""meta""actions"}}@container (max-width:560px){.\[\@container\(\(max-width\:_560px\)\)\]\:ms-auto{margin-inline-start:auto}.\[\@container\(\(max-width\:_560px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.\[\@container\(\(max-width\:_560px\)\)\]\:flex-col{flex-direction:column}.\[\@container\(\(max-width\:_560px\)\)\]\:items-end{align-items:flex-end}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-1\.5{gap:calc(var(--spacing) * 1.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-y-\[9px\]{row-gap:9px}}@container (max-width:720px){.\[\@container\(\(max-width\:_720px\)\)\]\:hidden{display:none}.\[\@container\(\(max-width\:_720px\)\)\]\:\!w-full{width:100%!important}}@container (max-width:960px){.\[\@container\(\(max-width\:_960px\)\)\]\:static{position:static}.\[\@container\(\(max-width\:_960px\)\)\]\:max-h-55{max-height:calc(var(--spacing) * 55)}.\[\@container\(\(max-width\:_960px\)\)\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:520px){.\[\@media\(\(max-width\:_520px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_520px\)\)\]\:items-start{align-items:flex-start}}@media(max-width:600px){.\[\@media\(\(max-width\:_600px\)\)\]\:col-span-2{grid-column:span 2/span 2}.\[\@media\(\(max-width\:_600px\)\)\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.\[\@media\(\(max-width\:_640px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_640px\)\)\]\:items-stretch{align-items:stretch}.\[\@media\(\(max-width\:_640px\)\)\]\:justify-start{justify-content:flex-start}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:grid-cols-1 .kv{grid-template-columns:repeat(1,minmax(0,1fr))}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:gap-\[3px\] .kv{gap:3px}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv_\.v_\+_\.k\]\:mt-\[7px\] .kv .v+.k{margin-top:7px}}@media(max-width:720px){.\[\@media\(\(max-width\:_720px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_720px\)\)\]\:px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pt-5{padding-top:calc(var(--spacing) * 5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button\]\:grid-cols-\[65px_1fr_60px_16px\] button{grid-template-columns:65px 1fr 60px 16px}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button_\>_\:nth-child\(3\)\]\:hidden button>:nth-child(3){display:none}}@media(max-width:960px){.\[\@media\(\(max-width\:_960px\)\)\]\:col-span-3{grid-column:span 3/span 3}.\[\@media\(\(max-width\:_960px\)\)\]\:mb-1{margin-bottom:var(--spacing)}.\[\@media\(\(max-width\:_960px\)\)\]\:block{display:block}.\[\@media\(\(max-width\:_960px\)\)\]\:hidden{display:none}.\[\@media\(\(max-width\:_960px\)\)\]\:grid-cols-\[minmax\(0\,0\.8fr\)_minmax\(0\,0\.8fr\)_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.4fr)}.\[\@media\(\(max-width\:_960px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_960px\)\)\]\:items-start{align-items:flex-start}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-x-4{column-gap:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-y-3{row-gap:calc(var(--spacing) * 3)}.\[\@media\(\(max-width\:_960px\)\)\]\:px-4{padding-inline:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:py-4{padding-block:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:pt-6{padding-top:calc(var(--spacing) * 6)}.\[\@media\(\(max-width\:_960px\)\)\]\:break-all{word-break:break-all}.\[\@media\(\(max-width\:_960px\)\)\]\:whitespace-normal{white-space:normal}}@media(prefers-reduced-motion:reduce){.\[\@media\(\(prefers-reduced-motion\:_reduce\)\)\]\:animate-none{animation:none}}a.\[a\&\:hover\]\:border-muted:hover{border-color:var(--muted)}button.\[button\&\]\:inline-flex{display:inline-flex}button.\[button\&\]\:h-\[13px\]{height:13px}button.\[button\&\]\:w-\[13px\]{width:13px}button.\[button\&\]\:cursor-pointer{cursor:pointer}button.\[button\&\]\:items-center{align-items:center}button.\[button\&\]\:justify-center{justify-content:center}button.\[button\&\]\:border-0{border-style:var(--tw-border-style);border-width:0}button.\[button\&\]\:bg-transparent{background-color:#0000}button.\[button\&\]\:p-0{padding:0}button.\[button\&_\>_svg\]\:transition-transform>svg{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}button.\[button\&_\>_svg\]\:duration-120>svg{--tw-duration:.12s;transition-duration:.12s}button.\[button\&_\>_svg\]\:ease-standard>svg{--tw-ease:ease;transition-timing-function:ease}button.\[button\&_\>_svg\.open\]\:rotate-90>svg.open{rotate:90deg}button.\[button\&\:hover\]\:border-muted:hover{border-color:var(--muted)}}:root{--base:#fff;--canvas:#faf8f4;--panel:#f3f0ea;--surface:#faf7f2;--surface-bright:#fdfbfb;--highlight:#fdf3f1;--chat-annotation-highlight:#b8d4ff;--text:#1d1b1a;--subtext:#737373;--muted:#a1a1a1;--primary:#9a2036;--primary-subtle:#f7e9ec;--border:#d4d4d4;--border-variant:#e5e5e5;--accent-orange:#da642c;--accent-red:#d94654;--accent-teal:#209a84;--accent-blue:#3a8dff;--accent-amber:#da9100;--accent-green:#5eb64c;--accent-purple:#9c5cff;--accent-green-subtle:#e7f4e5;--accent-amber-subtle:#fff3e1;--accent-teal-subtle:#e1f3f0;--accent-red-subtle:#fbe9ea;--accent-blue-subtle:#e5f0ff;--skill-blue:#184f91;--skill-blue-subtle:#d9e9fb;--skill-blue-slash:#7fa6d2;--accent-purple-subtle:#f1e8ff;--dots-muted:#e3ded5;--dots-strong:#bdb6a8;--mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;--sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;--modal-top:min(30vh, 260px);--term-bg:#1a1a1a;--term-foreground:#e6e1e0;--term-selection:#2c3441;--tool-shimmer:var(--text)}@supports (color:color-mix(in lab,red,red)){:root{--tool-shimmer:color-mix(in srgb, var(--text) 58%, var(--subtext))}}:root{--editor-selection:var(--primary)}@supports (color:color-mix(in lab,red,red)){:root{--editor-selection:color-mix(in oklab, var(--primary) 22%, transparent)}}:root{--readable-col:840px;--border-strong:var(--border);--accent:var(--primary);--teal:var(--accent-teal);--green:var(--accent-green);--red:var(--accent-red);--amber:var(--accent-amber);--syntax-comment:#a0a1a7;--syntax-text:#383a42;--syntax-red:#e45649;--syntax-orange:#986801;--syntax-green:#50a14f;--syntax-yellow:#c18401;--syntax-cyan:#56b6c2;--syntax-purple:#a626a4;--syntax-blue:#4078f2;color-scheme:light}:root[data-theme=dark]{--base:#0e0c0c;--canvas:#141110;--panel:#221f1e;--surface:#1d1b1a;--surface-bright:#130f0f;--highlight:#393433;--chat-annotation-highlight:#244e7a;--text:#e6e1e0;--subtext:#a68e8b;--muted:#737373;--primary:#ffb3ad;--primary-subtle:#33191b;--border:#525252;--border-variant:#404040;--accent-amber:#e67e22;--accent-green-subtle:#1c2b18;--accent-amber-subtle:#33260f;--accent-teal-subtle:#12332d;--accent-red-subtle:#331418;--accent-blue-subtle:#10233a;--skill-blue:#79adf0;--skill-blue-subtle:#183452;--skill-blue-slash:#527ca8;--accent-purple-subtle:#251933;--dots-muted:#2a2523;--dots-strong:#555;--syntax-comment:#7f848e;--syntax-text:#abb2bf;--syntax-red:#e06c75;--syntax-orange:#d19a66;--syntax-green:#98c379;--syntax-yellow:#e5c07b;--syntax-purple:#c678dd;--syntax-blue:#61afef;color-scheme:dark}.tinker-logo{clip-path:inset(34% 9%)}:root[data-theme=dark] .tinker-logo{filter:invert();mix-blend-mode:screen}:root[lang=fa] #root :where(p,h1,h2,h3,h4,h5,h6,button,label,li,th,td,dt,dd,[role=status],[role=alert]),.md :where(p,h1,h2,h3,h4,li,th,td,blockquote),:root[lang=fa] #root .file-view-note{unicode-bidi:plaintext}:where(pre,code,.font-mono,.code-source-text,.xterm,.openresearch-diff){direction:ltr;unicode-bidi:isolate}@keyframes or-pulse{50%{opacity:.35}}@keyframes tool-target-reveal{0%{opacity:0;filter:blur(1.5px)}to{opacity:1;filter:blur()}}@keyframes tool-running-shimmer{0%{background-position:200% 0}to{background-position:-100% 0}}@keyframes tool-running-shimmer-icon{0%,to{color:var(--muted);opacity:.35}50%{color:var(--tool-shimmer);opacity:1}}.tool-running-shimmer{color:#0000;background:linear-gradient(100deg,var(--muted) 12%,var(--subtext) 34%,var(--tool-shimmer) 50%,var(--subtext) 66%,var(--muted) 88%);-webkit-text-fill-color:transparent;background-size:300% 100%;-webkit-background-clip:text;background-clip:text;animation:1.75s linear infinite tool-running-shimmer}.tool-running-shimmer::selection{color:var(--text);-webkit-text-fill-color:var(--text)}.tool-running-shimmer-icon{color:var(--muted);animation:1.75s ease-in-out infinite tool-running-shimmer-icon}.tool-group-summary .tool-group-label{transition:color .12s}.tool-group-summary:hover .tool-group-label,.tool-group-summary:hover .tool-chevron{color:var(--text)}.tool-group-disclosure{grid-template-rows:0fr;transition:grid-template-rows .22s cubic-bezier(.2,.75,.25,1);display:grid}.tool-group-disclosure.open{grid-template-rows:1fr}.tool-group-disclosure-inner{min-height:0;position:relative;overflow:hidden}.tool-target-reveal{animation:.18s cubic-bezier(.2,.75,.25,1) tool-target-reveal}.tool-target,.tool-target-more{color:inherit;cursor:pointer;font-weight:inherit;text-align:inherit;text-underline-offset:3px;-webkit-text-decoration-skip-ink:auto;text-decoration-skip-ink:auto;text-decoration-line:underline;text-decoration-thickness:.6px;transition:color .14s,text-decoration-color .14s;display:inline}.tool-line,.tool-group-summary{font-weight:375}.tool-group-rows .tool-line{font-size:var(--text-sm)}.msg-assistant .md table{margin-block:14px;margin-inline:auto}.msg-assistant .md th,.msg-assistant .md td{padding-block:10px}.msg-assistant .md figure{width:fit-content;max-width:100%;margin-inline:auto}.md .file-chip{padding-block:.5px;line-height:1.3}.md .file-chip .file-chip-open{color:currentColor;opacity:.6}.md .file-chip .file-chip-label{text-decoration-line:underline;-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);text-underline-offset:2px;text-decoration-thickness:.6px}.md .file-chip:hover:not(:disabled) .file-chip-label,.md .file-chip:focus-visible .file-chip-label{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}.md .file-chip:disabled .file-chip-label{text-decoration-line:none}.md .file-chip:disabled .file-chip-open{display:none}.msg-assistant .md img{max-width:100%;height:auto;margin-inline:auto;display:block}.md[data-streaming=true] .katex-error{visibility:hidden}.tool-target{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target-more{text-decoration-color:#0000}.project-row:hover .project-row-title{text-underline-offset:2px;text-decoration-line:underline}.project-row:has(.project-row-secondary:hover) .project-row-title{text-decoration-line:none}@media(hover:none){.project-row-delete{opacity:1;pointer-events:auto}}.tool-target:hover,.tool-target-more:hover{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target:focus-visible,.tool-target-more:focus-visible{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);outline:1px solid var(--border-strong);outline-offset:2px}@media(prefers-reduced-motion:reduce){.activity-pulse{animation:none}.tool-group-disclosure{transition:none}.tool-target-reveal{animation:none}.tool-running-shimmer{color:var(--subtext);-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer-icon{animation:none}}@media(forced-colors:active){.tool-running-shimmer{color:canvastext;-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer::selection{color:highlighttext;-webkit-text-fill-color:HighlightText}.tool-running-shimmer-icon{color:canvastext;animation:none}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes title-char-in{0%{opacity:0;filter:blur(4px);transform:translateY(.15em)}}.workspace-body .chat-header{padding-inline-end:8.5rem}.workspace-card-visible .chat-pane{padding-inline-end:16rem}.workspace-card-visible .chat-header{padding-inline-end:1rem}.workspace-card-visible .workspace-tools{top:1.25rem}.code-source-text,.openresearch-diff .diff-line{font-family:var(--mono);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:1.55;-moz-tab-size:4;tab-size:4;line-height:1.55}.code-source-wrap,.openresearch-diff .diff-code{overflow-wrap:normal;word-break:normal;overflow-wrap:break-word;white-space:pre-wrap}@property --tw-leading{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes pulse{50%{opacity:.5}} diff --git a/ui/dist/assets/index-D8CernQ2.css b/ui/dist/assets/index-D8CernQ2.css deleted file mode 100644 index 4da5b327..00000000 --- a/ui/dist/assets/index-D8CernQ2.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--spacing:.25rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:6px;--radius-md:8px;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-diff-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-selection:color-mix(in oklab, var(--surface) 76%, var(--primary))}}:root,:host{--color-diff-gutter-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-gutter-selection:color-mix(in oklab, var(--surface) 68%, var(--primary))}}:root,:host{--color-diff-insert-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-gutter:color-mix(in oklab, var(--base) 84%, var(--accent-green))}}:root,:host{--color-diff-delete-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-gutter:color-mix(in oklab, var(--base) 86%, var(--accent-red))}}:root,:host{--color-diff-insert-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-code:color-mix(in oklab, var(--base) 91%, var(--accent-green))}}:root,:host{--color-diff-delete-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-code:color-mix(in oklab, var(--base) 92%, var(--accent-red))}}:root,:host{--color-diff-insert-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-edit:color-mix(in oklab, var(--base) 72%, var(--accent-green))}}:root,:host{--color-diff-delete-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-edit:color-mix(in oklab, var(--base) 78%, var(--accent-red))}}:root,:host{--color-diff-omit-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-omit-gutter:color-mix(in oklab, var(--base) 86%, var(--text))}}}@layer base{*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--base);color:var(--text);font-family:var(--sans);font-size:1rem;line-height:1.45;overflow:hidden}::selection{background:var(--highlight)}.chat-thread-inner ::selection{background:var(--chat-annotation-highlight)}::highlight(chat-annotations){background:var(--chat-annotation-highlight)}.file-view-editarea::selection{background:var(--editor-selection)}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:none;padding:0}input,textarea,select{font:inherit;color:var(--text);background:var(--base);border:1px solid var(--border);border-radius:var(--radius-md);outline:none;padding:6px 10px}input:focus,textarea:focus,select:focus{border-color:var(--text)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--border);border-radius:var(--radius-sm);background-clip:padding-box;border:2px solid #0000}::-webkit-scrollbar-track{background:0 0}}@layer vendor{.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-color-default:inherit;--xy-node-border-default:1px solid #1a192b;--xy-node-background-color-default:#fff;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #00000014;--xy-node-boxshadow-selected-default:0 0 0 .5px #1a192b;--xy-node-border-radius-default:3px;--xy-handle-background-color-default:#1a192b;--xy-handle-border-color-default:#fff;--xy-selection-background-color-default:#0059dc14;--xy-selection-border-default:1px dotted #0059dccc;--xy-controls-button-background-color-default:#fefefe;--xy-controls-button-background-color-hover-default:#f4f4f4;--xy-controls-button-color-default:inherit;--xy-controls-button-color-hover-default:inherit;--xy-controls-button-border-color-default:#eee;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#fff;--xy-edge-label-color-default:inherit;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8;--xy-node-border-default:1px solid #3c3c3c;--xy-node-background-color-default:#1e1e1e;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #ffffff14;--xy-node-boxshadow-selected-default:0 0 0 .5px #999;--xy-handle-background-color-default:#bebebe;--xy-handle-border-color-default:#1e1e1e;--xy-selection-background-color-default:#c8c8dc14;--xy-selection-border-default:1px dotted #c8c8dccc;--xy-controls-button-background-color-default:#2b2b2b;--xy-controls-button-background-color-hover-default:#3e3e3e;--xy-controls-button-color-default:#f8f8f8;--xy-controls-button-color-hover-default:#fff;--xy-controls-button-border-color-default:#5b5b5b;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#141414;--xy-edge-label-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color,var(--xy-handle-border-color-default));border-radius:100%;width:6px;min-width:5px;height:6px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{box-shadow:var(--xy-controls-box-shadow,var(--xy-controls-box-shadow-default));flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{background:var(--xy-controls-button-background-color,var(--xy-controls-button-background-color-default));border:none;border-bottom:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)));width:26px;height:26px;color:var(--xy-controls-button-color-props,var(--xy-controls-button-color,var(--xy-controls-button-color-default)));cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border-radius:var(--xy-node-border-radius,var(--xy-node-border-radius-default));width:150px;color:var(--xy-node-color,var(--xy-node-color-default));text-align:center;border:var(--xy-node-border,var(--xy-node-border-default));background-color:var(--xy-node-background-color,var(--xy-node-background-color-default));padding:10px;font-size:12px}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover,var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected,var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color,var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var(--xy-controls-button-background-color-hover-props,var(--xy-controls-button-background-color-hover,var(--xy-controls-button-background-color-hover-default)));color:var(--xy-controls-button-color-hover-props,var(--xy-controls-button-color-hover,var(--xy-controls-button-color-hover-default)))}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)))}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color,var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color,var(--xy-edge-label-color-default))}.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2)format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff)format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff)format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff)format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2)format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff)format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2)format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff)format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2)format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff)format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2)format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff)format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2)format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff)format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2)format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff)format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff)format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff)format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff)format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2)format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff)format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2)format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff)format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2)format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff)format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC)format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff)format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2)format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff)format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2)format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff)format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif;position:relative}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{clip-path:inset(50%);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{line-height:0;display:inline}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo}:root{--diff-background-color:initial;--diff-text-color:initial;--diff-font-family:Consolas,Courier,monospace;--diff-selection-background-color:#b3d7ff;--diff-selection-text-color:var(--diff-text-color);--diff-gutter-insert-background-color:#d6fedb;--diff-gutter-insert-text-color:var(--diff-text-color);--diff-gutter-delete-background-color:#fadde0;--diff-gutter-delete-text-color:var(--diff-text-color);--diff-gutter-selected-background-color:#fffce0;--diff-gutter-selected-text-color:var(--diff-text-color);--diff-code-insert-background-color:#eaffee;--diff-code-insert-text-color:var(--diff-text-color);--diff-code-delete-background-color:#fdeff0;--diff-code-delete-text-color:var(--diff-text-color);--diff-code-insert-edit-background-color:#c0dc91;--diff-code-insert-edit-text-color:var(--diff-text-color);--diff-code-delete-edit-background-color:#f39ea2;--diff-code-delete-edit-text-color:var(--diff-text-color);--diff-code-selected-background-color:#fffce0;--diff-code-selected-text-color:var(--diff-text-color);--diff-omit-gutter-line-color:#cb2a1d}.diff{background-color:var(--diff-background-color);border-collapse:collapse;color:var(--diff-text-color);table-layout:fixed;width:100%}.diff::selection{background-color:#b3d7ff;background-color:var(--diff-selection-background-color);color:var(--diff-selection-text-color)}.diff td{vertical-align:top;padding-top:0;padding-bottom:0}.diff-line{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);line-height:1.5}.diff-gutter>a{color:inherit;display:block}.diff-gutter{cursor:pointer;text-align:right;-webkit-user-select:none;user-select:none;padding:0 1ch}.diff-gutter-insert{background-color:#d6fedb;background-color:var(--diff-gutter-insert-background-color);color:var(--diff-gutter-insert-text-color)}.diff-gutter-delete{background-color:#fadde0;background-color:var(--diff-gutter-delete-background-color);color:var(--diff-gutter-delete-text-color)}.diff-gutter-omit{cursor:default}.diff-gutter-selected{background-color:#fffce0;background-color:var(--diff-gutter-selected-background-color);color:var(--diff-gutter-selected-text-color)}.diff-code{word-wrap:break-word;white-space:pre-wrap;word-break:break-all;padding:0 0 0 .5em}.diff-code-edit{color:inherit}.diff-code-insert{background-color:#eaffee;background-color:var(--diff-code-insert-background-color);color:var(--diff-code-insert-text-color)}.diff-code-insert .diff-code-edit{background-color:#c0dc91;background-color:var(--diff-code-insert-edit-background-color);color:var(--diff-code-insert-edit-text-color)}.diff-code-delete{background-color:#fdeff0;background-color:var(--diff-code-delete-background-color);color:var(--diff-code-delete-text-color)}.diff-code-delete .diff-code-edit{background-color:#f39ea2;background-color:var(--diff-code-delete-edit-background-color);color:var(--diff-code-delete-edit-text-color)}.diff-code-selected{background-color:#fffce0;background-color:var(--diff-code-selected-background-color);color:var(--diff-code-selected-text-color)}.diff-widget-content{vertical-align:top}.diff-gutter-col{width:7ch}.diff-gutter-omit{height:0}.diff-gutter-omit:before{background-color:#cb2a1d;background-color:var(--diff-omit-gutter-line-color);content:" ";white-space:pre;width:2px;height:100%;margin-left:4.6ch;display:block;overflow:hidden}.diff-decoration{-webkit-user-select:none;user-select:none;line-height:1.5}.diff-decoration-content{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);padding:0}}@layer components;@layer utilities{.\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-14{inset:calc(var(--spacing) * -14)}.-inset-\[7px\]{top:-7px;right:-7px;bottom:-7px;left:-7px}.inset-0{top:0;right:0;bottom:0;left:0}.inset-auto{inset:auto}.inset-y-0{inset-block:0}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.start-2{inset-inline-start:calc(var(--spacing) * 2)}.start-3{inset-inline-start:calc(var(--spacing) * 3)}.-end-\[3px\]{inset-inline-end:-3px}.end-0{inset-inline-end:calc(var(--spacing) * 0)}.end-1\.5{inset-inline-end:calc(var(--spacing) * 1.5)}.end-3{inset-inline-end:calc(var(--spacing) * 3)}.end-3\.5{inset-inline-end:calc(var(--spacing) * 3.5)}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-3{top:calc(var(--spacing) * 3)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-\[calc\(100\%_\+_6px\)\]{top:calc(100% + 6px)}.bottom-0{bottom:0}.bottom-\[calc\(100\%_\+_4px\)\]{bottom:calc(100% + 4px)}.bottom-\[calc\(100\%_\+_6px\)\]{bottom:calc(100% + 6px)}.bottom-\[calc\(100\%_\+_8px\)\]{bottom:calc(100% + 8px)}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-2{z-index:2}.z-4{z-index:4}.z-5{z-index:5}.z-6{z-index:6}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-60{z-index:60}.z-100{z-index:100}.z-200{z-index:200}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.m-3{margin:calc(var(--spacing) * 3)}.m-5{margin:calc(var(--spacing) * 5)}.m-auto{margin:auto}.mx-0{margin-inline:0}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.-my-0\.5{margin-block:calc(var(--spacing) * -.5)}.my-0{margin-block:0}.my-2{margin-block:calc(var(--spacing) * 2)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-3\.5{margin-block:calc(var(--spacing) * 3.5)}.my-\[5px\]{margin-block:5px}.ms-0{margin-inline-start:0}.ms-1{margin-inline-start:var(--spacing)}.ms-2{margin-inline-start:calc(var(--spacing) * 2)}.ms-3\.5{margin-inline-start:calc(var(--spacing) * 3.5)}.ms-6{margin-inline-start:calc(var(--spacing) * 6)}.ms-auto{margin-inline-start:auto}.me-0{margin-inline-end:0}.me-2{margin-inline-end:calc(var(--spacing) * 2)}.me-3\.5{margin-inline-end:calc(var(--spacing) * 3.5)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-4\.5{margin-top:calc(var(--spacing) * 4.5)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-5\.5{margin-top:calc(var(--spacing) * 5.5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\[5px\]{margin-top:5px}.mt-\[13px\]{margin-top:13px}.mt-auto{margin-top:auto}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-4\.5{margin-bottom:calc(var(--spacing) * 4.5)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-5\.5{margin-bottom:calc(var(--spacing) * 5.5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.box-border{box-sizing:border-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.field-sizing-content{field-sizing:content}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-10\.5{height:calc(var(--spacing) * 10.5)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-40{height:calc(var(--spacing) * 40)}.h-80{height:calc(var(--spacing) * 80)}.h-\[7px\]{height:7px}.h-\[9px\]{height:9px}.h-\[13px\]{height:13px}.h-\[15px\]{height:15px}.h-\[min\(42rem\,calc\(100vh-2\.5rem\)\)\]{height:min(42rem,100vh - 2.5rem)}.h-\[min\(48rem\,calc\(100vh-2\.5rem\)\)\]{height:min(48rem,100vh - 2.5rem)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-45{max-height:calc(var(--spacing) * 45)}.max-h-50{max-height:calc(var(--spacing) * 50)}.max-h-65{max-height:calc(var(--spacing) * 65)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-85{max-height:calc(var(--spacing) * 85)}.max-h-95{max-height:calc(var(--spacing) * 95)}.max-h-100{max-height:calc(var(--spacing) * 100)}.max-h-\[calc\(100vh_-_40px\)\]{max-height:calc(100vh - 40px)}.max-h-\[calc\(100vh_-_var\(--modal-top\)_-_48px\)\]{max-height:calc(100vh - var(--modal-top) - 48px)}.max-h-\[calc\(100vh_-_var\(--new-project-modal-top\)_-_1\.25rem\)\]{max-height:calc(100vh - var(--new-project-modal-top) - 1.25rem)}.max-h-\[min\(70vh\,_720px\)\]{max-height:min(70vh,720px)}.max-h-full{max-height:100%}.min-h-0{min-height:0}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-19\.5{min-height:calc(var(--spacing) * 19.5)}.min-h-22{min-height:calc(var(--spacing) * 22)}.min-h-41{min-height:calc(var(--spacing) * 41)}.min-h-dvh{min-height:100dvh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\/5{width:40%}.w-4{width:calc(var(--spacing) * 4)}.w-4\/5{width:80%}.w-5{width:calc(var(--spacing) * 5)}.w-6\.5{width:calc(var(--spacing) * 6.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-9\.5{width:calc(var(--spacing) * 9.5)}.w-10{width:calc(var(--spacing) * 10)}.w-10\.5{width:calc(var(--spacing) * 10.5)}.w-37{width:calc(var(--spacing) * 37)}.w-40{width:calc(var(--spacing) * 40)}.w-52{width:calc(var(--spacing) * 52)}.w-66{width:calc(var(--spacing) * 66)}.w-68{width:calc(var(--spacing) * 68)}.w-70{width:calc(var(--spacing) * 70)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-110{width:calc(var(--spacing) * 110)}.w-120{width:calc(var(--spacing) * 120)}.w-140{width:calc(var(--spacing) * 140)}.w-160{width:calc(var(--spacing) * 160)}.w-200{width:calc(var(--spacing) * 200)}.w-\[7px\]{width:7px}.w-\[9px\]{width:9px}.w-\[13px\]{width:13px}.w-\[15px\]{width:15px}.w-\[min\(440px\,_calc\(100vw_-_48px\)\)\]{width:min(440px,100vw - 48px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-36{max-width:calc(var(--spacing) * 36)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-55{max-width:calc(var(--spacing) * 55)}.max-w-60{max-width:calc(var(--spacing) * 60)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-65{max-width:calc(var(--spacing) * 65)}.max-w-68{max-width:calc(var(--spacing) * 68)}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-120{max-width:calc(var(--spacing) * 120)}.max-w-155{max-width:calc(var(--spacing) * 155)}.max-w-160{max-width:calc(var(--spacing) * 160)}.max-w-230{max-width:calc(var(--spacing) * 230)}.max-w-290{max-width:calc(var(--spacing) * 290)}.max-w-\[88\%\]{max-width:88%}.max-w-\[94vw\]{max-width:94vw}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-\[calc\(100vw_-_40px\)\]{max-width:calc(100vw - 40px)}.max-w-full{max-width:100%}.max-w-readable{max-width:var(--readable-col)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-47\.5{min-width:calc(var(--spacing) * 47.5)}.min-w-55{min-width:calc(var(--spacing) * 55)}.min-w-57\.5{min-width:calc(var(--spacing) * 57.5)}.min-w-60{min-width:calc(var(--spacing) * 60)}.min-w-80{min-width:calc(var(--spacing) * 80)}.min-w-85{min-width:calc(var(--spacing) * 85)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[or-pulse_1\.2s_ease-in-out_infinite\]{animation:1.2s ease-in-out infinite or-pulse}.animate-\[spin_0\.8s_linear_infinite\]{animation:.8s linear infinite spin}.animate-\[spin_0\.9s_linear_infinite\]{animation:.9s linear infinite spin}.animate-\[title-char-in_240ms_ease-out_both\]{animation:.24s ease-out both title-char-in}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-e-resize{cursor:e-resize}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.\[scrollbar-width\:none\]{scrollbar-width:none}.\[scrollbar-gutter\:stable\]{scrollbar-gutter:stable}.\[scrollbar-gutter\:stable_both-edges\]{scrollbar-gutter:stable both-edges}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[8\.5rem_5rem\]{grid-template-columns:8.5rem 5rem}.grid-cols-\[9rem_minmax\(0\,1fr\)\]{grid-template-columns:9rem minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)\]{grid-template-columns:24px minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)_28px\]{grid-template-columns:24px minmax(0,1fr) 28px}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[minmax\(0\,1fr\)_9rem_9rem_minmax\(18rem\,max-content\)\]{grid-template-columns:minmax(0,1fr) 9rem 9rem minmax(18rem,max-content)}.grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(12rem\,18rem\)_minmax\(12rem\,18rem\)\]{grid-template-columns:minmax(12rem,18rem) minmax(12rem,18rem)}.grid-cols-\[minmax\(180px\,_260px\)_minmax\(0\,_1fr\)\]{grid-template-columns:minmax(180px,260px) minmax(0,1fr)}.grid-cols-\[repeat\(2\,_minmax\(0\,_1fr\)\)\]{grid-template-columns:repeat(2,minmax(0,1fr))}.\!flex-col{flex-direction:column!important}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.\!items-stretch{align-items:stretch!important}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-4\.5{gap:calc(var(--spacing) * 4.5)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\[0\.4em\]{gap:.4em}.gap-\[3px\]{gap:3px}.gap-\[5px\]{gap:5px}.gap-\[7px\]{gap:7px}.gap-\[9px\]{gap:9px}.gap-px{gap:1px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.gap-x-4\.5{column-gap:calc(var(--spacing) * 4.5)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-x-12{column-gap:calc(var(--spacing) * 12)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2\.5{row-gap:calc(var(--spacing) * 2.5)}.gap-y-\[3px\]{row-gap:3px}.gap-y-\[7px\]{row-gap:7px}.gap-y-\[9px\]{row-gap:9px}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border-variant>:not(:last-child)){border-color:var(--border-variant)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[3px\]{border-radius:3px}.rounded-\[16px\]{border-radius:16px}.rounded-\[inherit\]{border-radius:inherit}.rounded-\[var\(--radius-md\)_var\(--radius-md\)_0_0\]{border-radius:var(--radius-md) var(--radius-md) 0 0}.rounded-full{border-radius:999px}.rounded-lg{border-radius:10px}.rounded-md{border-radius:8px}.rounded-none{border-radius:0}.rounded-sm{border-radius:6px}.rounded-xl{border-radius:12px}.rounded-xs{border-radius:4px}.rounded-s-none{border-start-start-radius:0;border-end-start-radius:0}.rounded-e-none{border-start-end-radius:0;border-end-end-radius:0}.rounded-b-lg{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-x-0{border-inline-style:var(--tw-border-style);border-inline-width:0}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-s-\[3px\]{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-solid{--tw-border-style:solid;border-style:solid}.border-accent-amber,.border-accent-amber\/45{border-color:var(--accent-amber)}@supports (color:color-mix(in lab,red,red)){.border-accent-amber\/45{border-color:color-mix(in oklab,var(--accent-amber) 45%,transparent)}}.border-accent-blue,.border-accent-blue\/45{border-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.border-accent-blue\/45{border-color:color-mix(in oklab,var(--accent-blue) 45%,transparent)}}.border-accent-green,.border-accent-green\/45{border-color:var(--accent-green)}@supports (color:color-mix(in lab,red,red)){.border-accent-green\/45{border-color:color-mix(in oklab,var(--accent-green) 45%,transparent)}}.border-accent-red{border-color:var(--accent-red)}.border-border{border-color:var(--border)}.border-border-strong{border-color:var(--border-strong)}.border-border-variant{border-color:var(--border-variant)}.border-primary,.border-primary\/45{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,var(--primary) 45%,transparent)}}.border-transparent{border-color:#0000}.border-s-accent-blue{border-inline-start-color:var(--accent-blue)}.border-s-accent-red{border-inline-start-color:var(--accent-red)}.border-s-border{border-inline-start-color:var(--border)}.border-s-border-variant{border-inline-start-color:var(--border-variant)}.border-s-plan-caret{border-inline-start-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.border-s-plan-caret{border-inline-start-color:color-mix(in oklab,var(--base) 35%,var(--text))}}.border-e-border-variant{border-inline-end-color:var(--border-variant)}.border-t-border{border-top-color:var(--border)}.border-t-border-variant{border-top-color:var(--border-variant)}.border-t-primary{border-top-color:var(--primary)}.border-b-accent-amber{border-bottom-color:var(--accent-amber)}.border-b-border{border-bottom-color:var(--border)}.border-b-border-variant{border-bottom-color:var(--border-variant)}.border-b-divider-subtle{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.border-b-divider-subtle{border-bottom-color:color-mix(in oklab,var(--text) 7%,transparent)}}.bg-accent{background-color:var(--accent)}.bg-accent-amber{background-color:var(--accent-amber)}.bg-accent-amber-subtle{background-color:var(--accent-amber-subtle)}.bg-accent-blue{background-color:var(--accent-blue)}.bg-accent-blue-subtle{background-color:var(--accent-blue-subtle)}.bg-accent-green{background-color:var(--accent-green)}.bg-accent-green-subtle{background-color:var(--accent-green-subtle)}.bg-accent-red{background-color:var(--accent-red)}.bg-accent-red-subtle{background-color:var(--accent-red-subtle)}.bg-accent-teal{background-color:var(--accent-teal)}.bg-background{background-color:var(--base)}.bg-border-variant{background-color:var(--border-variant)}.bg-canvas{background-color:var(--canvas)}.bg-current{background-color:currentColor}.bg-hover-faint{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-faint{background-color:color-mix(in oklab,var(--text) 3%,transparent)}}.bg-hover-muted{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-muted{background-color:color-mix(in oklab,var(--text) 8%,transparent)}}.bg-hover-subtle{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-subtle{background-color:color-mix(in oklab,var(--text) 10%,transparent)}}.bg-modal-backdrop{background-color:#1d1b1a6b}.bg-modal-backdrop-light{background-color:#1d1b1a66}.bg-muted{background-color:var(--muted)}.bg-panel{background-color:var(--panel)}.bg-primary{background-color:var(--primary)}.bg-primary-subtle{background-color:var(--primary-subtle)}.bg-skill-blue-subtle{background-color:var(--skill-blue-subtle)}.bg-surface{background-color:var(--surface)}.bg-surface-bright{background-color:var(--surface-bright)}.bg-terminal{background-color:var(--term-bg)}.bg-text{background-color:var(--text)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.bg-none{background-image:none}.object-contain{object-fit:contain}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.p-\[1\.5px\]{padding:1.5px}.p-\[3px\]{padding:3px}.p-\[5px\]{padding:5px}.p-px{padding:1px}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[9px\]{padding-inline:9px}.px-\[11px\]{padding-inline:11px}.px-\[13px\]{padding-inline:13px}.px-\[15px\]{padding-inline:15px}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-4\.5{padding-block:calc(var(--spacing) * 4.5)}.py-5\.5{padding-block:calc(var(--spacing) * 5.5)}.py-6\.5{padding-block:calc(var(--spacing) * 6.5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-\[3px\]{padding-block:3px}.py-\[5px\]{padding-block:5px}.py-\[7px\]{padding-block:7px}.py-\[9px\]{padding-block:9px}.py-\[11px\]{padding-block:11px}.py-px{padding-block:1px}.ps-1{padding-inline-start:var(--spacing)}.ps-1\.5{padding-inline-start:calc(var(--spacing) * 1.5)}.ps-2{padding-inline-start:calc(var(--spacing) * 2)}.ps-2\.5{padding-inline-start:calc(var(--spacing) * 2.5)}.ps-3{padding-inline-start:calc(var(--spacing) * 3)}.ps-4{padding-inline-start:calc(var(--spacing) * 4)}.ps-4\.5{padding-inline-start:calc(var(--spacing) * 4.5)}.ps-5{padding-inline-start:calc(var(--spacing) * 5)}.ps-\[2ch\]{padding-inline-start:2ch}.pe-0{padding-inline-end:0}.pe-1{padding-inline-end:var(--spacing)}.pe-1\.5{padding-inline-end:calc(var(--spacing) * 1.5)}.pe-2{padding-inline-end:calc(var(--spacing) * 2)}.pe-2\.5{padding-inline-end:calc(var(--spacing) * 2.5)}.pe-4{padding-inline-end:calc(var(--spacing) * 4)}.pe-8{padding-inline-end:calc(var(--spacing) * 8)}.pe-10{padding-inline-end:calc(var(--spacing) * 10)}.pe-14{padding-inline-end:calc(var(--spacing) * 14)}.pe-\[1ch\]{padding-inline-end:1ch}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-4\.5{padding-top:calc(var(--spacing) * 4.5)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-6\.5{padding-top:calc(var(--spacing) * 6.5)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pt-\[var\(--modal-top\)\]{padding-top:var(--modal-top)}.pt-\[var\(--new-project-modal-top\)\]{padding-top:var(--new-project-modal-top)}.pb-0{padding-bottom:0}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-15{padding-bottom:calc(var(--spacing) * 15)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.pl-\[2ch\]{padding-left:2ch}.text-center{text-align:center}.text-end{text-align:end}.text-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.font-\[inherit\]{font-family:inherit}.font-mono{font-family:var(--mono)}.font-sans{font-family:var(--sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-menu{font-size:.8125rem;line-height:var(--tw-leading,1.25rem)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-0{--tw-leading:0px;line-height:0}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[1\.3\]{--tw-leading:1.3;line-height:1.3}.leading-\[1\.4\]{--tw-leading:1.4;line-height:1.4}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.08\]{--tw-leading:1.08;line-height:1.08}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-\[1\.55\]{--tw-leading:1.55;line-height:1.55}.leading-\[1\.62\]{--tw-leading:1.62;line-height:1.62}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\!font-medium{--tw-font-weight:var(--font-weight-medium)!important;font-weight:var(--font-weight-medium)!important}.\!font-normal{--tw-font-weight:var(--font-weight-normal)!important;font-weight:var(--font-weight-normal)!important}.font-\[375\]{--tw-font-weight:375;font-weight:375}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.01em\]{--tw-tracking:-.01em;letter-spacing:-.01em}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[-0\.015em\]{--tw-tracking:-.015em;letter-spacing:-.015em}.tracking-\[-0\.035em\]{--tw-tracking:-.035em;letter-spacing:-.035em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\[tab-size\:4\]{-moz-tab-size:4;tab-size:4}.\!text-accent-red{color:var(--accent-red)!important}.text-accent-amber{color:var(--accent-amber)}.text-accent-blue{color:var(--accent-blue)}.text-accent-green{color:var(--accent-green)}.text-accent-orange{color:var(--accent-orange)}.text-accent-purple{color:var(--accent-purple)}.text-accent-red{color:var(--accent-red)}.text-accent-teal{color:var(--accent-teal)}.text-background{color:var(--base)}.text-inherit{color:inherit}.text-muted{color:var(--muted)}.text-primary{color:var(--primary)}.text-skill-blue{color:var(--skill-blue)}.text-skill-blue-slash{color:var(--skill-blue-slash)}.text-subtext{color:var(--subtext)}.text-text{color:var(--text)}.text-transparent{color:#0000}.text-white{color:#fff}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-border-strong{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.underline-offset-2{text-underline-offset:2px}.underline-offset-3{text-underline-offset:3px}.caret-text{caret-color:var(--text)}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-50{opacity:.5}.opacity-52{opacity:.52}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,color-mix(in oklab, var(--text) 6%, transparent))}}.shadow-card{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control-subtle{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-dropdown{--tw-shadow:0 10px 26px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,var(--text)), 0 1px 4px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,color-mix(in oklab, var(--text) 5%, transparent)), 0 1px 4px var(--tw-shadow-color,color-mix(in oklab, var(--text) 4%, transparent))}}.shadow-elevated{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-file-line{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--accent-blue));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-floating{--tw-shadow:0 8px 24px var(--tw-shadow-color,#00000024);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-hairline{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-logo{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-menu{--tw-shadow:0 12px 32px var(--tw-shadow-color,#0000002e);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-modal{--tw-shadow:0 24px 60px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan{--tw-shadow:0 2px 10px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan-menu{--tw-shadow:0 6px 20px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-popover{--tw-shadow:0 4px 16px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-tree{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\,color\]{transition-property:background,border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\]{transition-property:background,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,color\]{transition-property:background,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,background\]{transition-property:border-color,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,box-shadow\]{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,color\]{transition-property:border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[box-shadow\]{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,color\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-80{--tw-duration:80ms;transition-duration:80ms}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-standard{--tw-ease:ease;transition-timing-function:ease}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[--new-project-modal-top\:clamp\(4rem\,20vh\,24rem\)\]{--new-project-modal-top:clamp(4rem, 20vh, 24rem)}.\[font\:inherit\]{font:inherit}.\[grid-area\:actions\]{grid-area:actions}.\[grid-area\:meta\]{grid-area:meta}.\[grid-area\:name\]{grid-area:name}.\[grid-template-areas\:\'name_meta\'_\'actions_actions\'\]{grid-template-areas:"name meta""actions actions"}.group-focus-within\:pointer-events-auto:is(:where(.group):focus-within *){pointer-events:auto}.group-focus-within\:opacity-100:is(:where(.group):focus-within *),.group-focus-within\/turn\:opacity-100:is(:where(.group\/turn):focus-within *){opacity:1}@media(hover:hover){.group-hover\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/skill\:opacity-100:is(:where(.group\/skill):hover *),.group-hover\/turn\:opacity-100:is(:where(.group\/turn):hover *){opacity:1}}.group-focus-visible\:opacity-0:is(:where(.group):focus-visible *){opacity:0}.group-focus-visible\:opacity-100:is(:where(.group):focus-visible *){opacity:1}.placeholder\:text-muted::placeholder{color:var(--muted)}.backdrop\:bg-modal-backdrop-light::backdrop{background-color:#1d1b1a66}.before\:content-\[attr\(data-line\)\]:before{--tw-content:attr(data-line);content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-0:after{content:var(--tw-content);inset-inline-start:calc(var(--spacing) * 0)}.after\:end-0:after{content:var(--tw-content);inset-inline-end:calc(var(--spacing) * 0)}.after\:top-full:after{content:var(--tw-content);top:100%}.after\:h-2:after{content:var(--tw-content);height:calc(var(--spacing) * 2)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:bg-surface-bright:focus-within{background-color:var(--surface-bright)}@media(hover:hover){.hover\:border-border-strong:hover{border-color:var(--border-strong)}.hover\:border-text:hover{border-color:var(--text)}.hover\:bg-skill-blue-subtle:hover{background-color:var(--skill-blue-subtle)}.hover\:bg-surface:hover{background-color:var(--surface)}.hover\:bg-surface-bright:hover{background-color:var(--surface-bright)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-accent-red:hover{color:var(--accent-red)}.hover\:text-primary-hover:hover{color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary-hover:hover{color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.hover\:text-text:hover{color:var(--text)}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-primary:hover{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}}.focus\:pointer-events-auto:focus{pointer-events:auto}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:border-text:focus{border-color:var(--text)}.focus\:opacity-100:focus,.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-text:focus-visible{outline-color:var(--text)}.focus-visible\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.disabled\:cursor-default:disabled{cursor:default}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:1120px){.min-\[1120px\]\:col-start-1{grid-column-start:1}.min-\[1120px\]\:col-start-2{grid-column-start:2}.min-\[1120px\]\:row-start-1{grid-row-start:1}.min-\[1120px\]\:row-start-2{grid-row-start:2}.min-\[1120px\]\:mt-0{margin-top:0}.min-\[1120px\]\:grid{display:grid}.min-\[1120px\]\:grid-cols-\[minmax\(0\,_1\.1fr\)_minmax\(28rem\,_1fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(28rem,1fr)}.min-\[1120px\]\:grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.min-\[1120px\]\:content-center{align-content:center}.min-\[1120px\]\:gap-x-20{column-gap:calc(var(--spacing) * 20)}.min-\[1120px\]\:gap-y-10{row-gap:calc(var(--spacing) * 10)}.min-\[1120px\]\:self-end{align-self:flex-end}.min-\[1120px\]\:self-start{align-self:flex-start}}@media(min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-12{padding-inline:calc(var(--spacing) * 12)}}@media(min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&_\+_\.settings-stack-section\]\:mt-6+.settings-stack-section{margin-top:calc(var(--spacing) * 6)}.\[\&_\.actions\]\:mt-1\.5 .actions{margin-top:calc(var(--spacing) * 1.5)}.\[\&_\.actions\]\:flex .actions{display:flex}.\[\&_\.actions\]\:justify-end .actions{justify-content:flex-end}.\[\&_\.actions\]\:gap-2\.5 .actions{gap:calc(var(--spacing) * 2.5)}.\[\&_\.artifact-img\]\:mx-0 .artifact-img{margin-inline:0}.\[\&_\.artifact-img\]\:my-3 .artifact-img{margin-block:calc(var(--spacing) * 3)}.\[\&_\.artifact-img\]\:block .artifact-img{display:block}.\[\&_\.artifact-img_img\]\:h-auto .artifact-img img{height:auto}.\[\&_\.artifact-img_img\]\:max-w-full .artifact-img img{max-width:100%}.\[\&_\.artifact-img_img\]\:rounded-sm .artifact-img img{border-radius:6px}.\[\&_\.artifact-img_img\]\:border .artifact-img img{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.artifact-img_img\]\:border-border .artifact-img img{border-color:var(--border)}.\[\&_\.artifact-img-caption\]\:mt-1 .artifact-img-caption{margin-top:var(--spacing)}.\[\&_\.artifact-img-caption\]\:block .artifact-img-caption{display:block}.\[\&_\.artifact-img-caption\]\:text-center .artifact-img-caption{text-align:center}.\[\&_\.artifact-img-caption\]\:text-sm .artifact-img-caption{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.artifact-img-caption\]\:text-subtext .artifact-img-caption{color:var(--subtext)}.\[\&_\.backend-badge\]\:text-text .backend-badge{color:var(--text)}.\[\&_\.backend-detail\]\:text-muted .backend-detail{color:var(--muted)}.\[\&_\.backend-name\]\:font-medium .backend-name{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.badge\]\:ms-2 .badge{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.brand\]\:flex .brand{display:flex}.\[\&_\.brand\]\:h-full .brand{height:100%}.\[\&_\.brand\]\:w-full .brand{width:100%}.\[\&_\.brand\]\:min-w-0 .brand{min-width:0}.\[\&_\.brand\]\:items-center .brand{align-items:center}.\[\&_\.brand\]\:justify-between .brand{justify-content:space-between}.\[\&_\.brand\]\:gap-2 .brand{gap:calc(var(--spacing) * 2)}.\[\&_\.brand\]\:rounded-sm .brand{border-radius:6px}.\[\&_\.brand\]\:border .brand{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.brand\]\:border-transparent .brand{border-color:#0000}.\[\&_\.brand\]\:px-1\.5 .brand{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.brand\]\:py-1 .brand{padding-block:var(--spacing)}.\[\&_\.brand\]\:text-base .brand{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.brand\]\:font-semibold .brand{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.brand\]\:text-text .brand{color:var(--text)}.\[\&_\.brand_\.brand-project\]\:min-w-0 .brand .brand-project{min-width:0}.\[\&_\.brand_\.brand-project\]\:overflow-hidden .brand .brand-project{overflow:hidden}.\[\&_\.brand_\.brand-project\]\:text-xl .brand .brand-project{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.brand_\.brand-project\]\:text-ellipsis .brand .brand-project{text-overflow:ellipsis}.\[\&_\.brand_\.brand-project\]\:whitespace-nowrap .brand .brand-project{white-space:nowrap}.\[\&_\.brand_svg\]\:shrink-0 .brand svg{flex-shrink:0}.\[\&_\.brand-project-copy\]\:flex .brand-project-copy{display:flex}.\[\&_\.brand-project-copy\]\:min-w-0 .brand-project-copy{min-width:0}.\[\&_\.brand-project-copy\]\:flex-col .brand-project-copy{flex-direction:column}.\[\&_\.brand-project-copy\]\:gap-\[3px\] .brand-project-copy{gap:3px}.\[\&_\.brand-project-copy\]\:text-start .brand-project-copy{text-align:start}.\[\&_\.brand-project-copy\]\:leading-\[1\.15\] .brand-project-copy{--tw-leading:1.15;line-height:1.15}.\[\&_\.brand-project-label\]\:text-xs .brand-project-label{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.brand-project-label\]\:font-medium .brand-project-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.brand-project-label\]\:tracking-\[0\.04em\] .brand-project-label{--tw-tracking:.04em;letter-spacing:.04em}.\[\&_\.brand-project-label\]\:text-muted .brand-project-label{color:var(--muted)}.\[\&_\.brand-project-label\]\:uppercase .brand-project-label{text-transform:uppercase}.\[\&_\.brand\.open\]\:border-border .brand.open{border-color:var(--border)}.\[\&_\.brand\.open\]\:bg-surface .brand.open{background-color:var(--surface)}.\[\&_\.brand\.open_\.project-chevron\]\:rotate-180 .brand.open .project-chevron{rotate:180deg}.\[\&_\.brand\.open_\.project-chevron\]\:opacity-100 .brand.open .project-chevron{opacity:1}.\[\&_\.brand\:hover\]\:border-border .brand:hover{border-color:var(--border)}.\[\&_\.brand\:hover\]\:bg-surface .brand:hover{background-color:var(--surface)}.\[\&_\.brand\:hover_\.project-chevron\]\:opacity-100 .brand:hover .project-chevron{opacity:1}.\[\&_\.btn\]\:inline-flex .btn{display:inline-flex}.\[\&_\.btn\]\:items-center .btn{align-items:center}.\[\&_\.btn\]\:gap-\[5px\] .btn{gap:5px}.\[\&_\.busy-dot\]\:h-\[7px\] .busy-dot{height:7px}.\[\&_\.busy-dot\]\:w-\[7px\] .busy-dot{width:7px}.\[\&_\.busy-dot\]\:shrink-0 .busy-dot{flex-shrink:0}.\[\&_\.busy-dot\]\:animate-\[or-pulse_1\.2s_infinite\] .busy-dot{animation:1.2s infinite or-pulse}.\[\&_\.busy-dot\]\:rounded-full .busy-dot{border-radius:999px}.\[\&_\.busy-dot\]\:bg-primary .busy-dot{background-color:var(--primary)}.\[\&_\.busy-dot\.waiting\]\:animate-none .busy-dot.waiting{animation:none}.\[\&_\.chev\]\:w-3 .chev{width:calc(var(--spacing) * 3)}.\[\&_\.chev\]\:shrink-0 .chev{flex-shrink:0}.\[\&_\.chev\]\:text-xs .chev{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.chev\]\:text-muted .chev{color:var(--muted)}.\[\&_\.count-badge\]\:inline-flex .count-badge{display:inline-flex}.\[\&_\.count-badge\]\:h-4\.5 .count-badge{height:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:min-w-4\.5 .count-badge{min-width:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:items-center .count-badge{align-items:center}.\[\&_\.count-badge\]\:justify-center .count-badge{justify-content:center}.\[\&_\.count-badge\]\:rounded-md .count-badge{border-radius:8px}.\[\&_\.count-badge\]\:border .count-badge{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.count-badge\]\:border-border .count-badge{border-color:var(--border)}.\[\&_\.count-badge\]\:bg-canvas .count-badge{background-color:var(--canvas)}.\[\&_\.count-badge\]\:px-\[5px\] .count-badge{padding-inline:5px}.\[\&_\.count-badge\]\:py-0 .count-badge{padding-block:0}.\[\&_\.count-badge\]\:text-xs .count-badge{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.count-badge\]\:font-medium .count-badge{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.count-badge\]\:text-text .count-badge{color:var(--text)}.\[\&_\.elided-node-label\]\:flex .elided-node-label{display:flex}.\[\&_\.elided-node-label\]\:flex-col .elided-node-label{flex-direction:column}.\[\&_\.elided-node-label\]\:leading-\[1\.3\] .elided-node-label{--tw-leading:1.3;line-height:1.3}.\[\&_\.elided-node-sub\]\:text-muted .elided-node-sub{color:var(--muted)}.\[\&_\.error\]\:basis-full .error{flex-basis:100%}.\[\&_\.error\]\:text-base .error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.error\]\:text-sm .error{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.error\]\:whitespace-pre-wrap .error{white-space:pre-wrap}.\[\&_\.error\]\:text-accent-red .error{color:var(--accent-red)}.\[\&_\.file-chip\]\:mx-px .file-chip{margin-inline:1px}.\[\&_\.file-chip\]\:my-0 .file-chip{margin-block:0}.\[\&_\.file-chip\]\:inline-flex .file-chip{display:inline-flex}.\[\&_\.file-chip\]\:max-w-full .file-chip{max-width:100%}.\[\&_\.file-chip\]\:cursor-pointer .file-chip{cursor:pointer}.\[\&_\.file-chip\]\:items-center .file-chip{align-items:center}.\[\&_\.file-chip\]\:gap-1 .file-chip{gap:var(--spacing)}.\[\&_\.file-chip\]\:rounded-xs .file-chip{border-radius:4px}.\[\&_\.file-chip\]\:border .file-chip{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.file-chip\]\:border-border-variant .file-chip{border-color:var(--border-variant)}.\[\&_\.file-chip\]\:bg-panel .file-chip{background-color:var(--panel)}.\[\&_\.file-chip\]\:px-1\.5 .file-chip{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.file-chip\]\:py-0 .file-chip{padding-block:0}.\[\&_\.file-chip\]\:align-baseline .file-chip{vertical-align:baseline}.\[\&_\.file-chip\]\:font-mono .file-chip{font-family:var(--mono)}.\[\&_\.file-chip\]\:text-sm .file-chip{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.file-chip\]\:font-medium .file-chip{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.file-chip\]\:text-text .file-chip{color:var(--text)}.\[\&_\.file-chip_svg\]\:flex-none .file-chip svg{flex:none}.\[\&_\.file-chip_svg\]\:opacity-60 .file-chip svg{opacity:.6}.\[\&_\.file-chip-label\]\:max-w-65 .file-chip-label{max-width:calc(var(--spacing) * 65)}.\[\&_\.file-chip-label\]\:overflow-hidden .file-chip-label{overflow:hidden}.\[\&_\.file-chip-label\]\:text-ellipsis .file-chip-label{text-overflow:ellipsis}.\[\&_\.file-chip-label\]\:whitespace-nowrap .file-chip-label{white-space:nowrap}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:bg-surface .file-chip:hover:not(:disabled){background-color:var(--surface)}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:text-primary .file-chip:hover:not(:disabled){color:var(--primary)}.\[\&_\.files-pill\]\:rounded-sm .files-pill{border-radius:6px}.\[\&_\.files-pill\]\:px-2 .files-pill{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.files-pill\]\:py-\[5px\] .files-pill{padding-block:5px}.\[\&_\.files-pill_code\]\:text-xs .files-pill code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.folder-picker-chevron\]\:flex-none .folder-picker-chevron{flex:none}.\[\&_\.folder-picker-chevron\]\:text-muted .folder-picker-chevron{color:var(--muted)}.\[\&_\.folder-picker-control\]\:flex .folder-picker-control{display:flex}.\[\&_\.folder-picker-control\]\:w-full .folder-picker-control{width:100%}.\[\&_\.folder-picker-control\]\:min-w-0 .folder-picker-control{min-width:0}.\[\&_\.folder-picker-control\]\:cursor-pointer .folder-picker-control{cursor:pointer}.\[\&_\.folder-picker-control\]\:items-center .folder-picker-control{align-items:center}.\[\&_\.folder-picker-control\]\:gap-\[9px\] .folder-picker-control{gap:9px}.\[\&_\.folder-picker-control\]\:overflow-hidden .folder-picker-control{overflow:hidden}.\[\&_\.folder-picker-control\]\:rounded-md .folder-picker-control{border-radius:8px}.\[\&_\.folder-picker-control\]\:border .folder-picker-control{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.folder-picker-control\]\:border-border .folder-picker-control{border-color:var(--border)}.\[\&_\.folder-picker-control\]\:bg-background .folder-picker-control{background-color:var(--base)}.\[\&_\.folder-picker-control\]\:px-2\.5 .folder-picker-control{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.folder-picker-control\]\:py-2 .folder-picker-control{padding-block:calc(var(--spacing) * 2)}.\[\&_\.folder-picker-control\]\:text-start .folder-picker-control{text-align:start}.\[\&_\.folder-picker-control\]\:transition-\[border-color\,box-shadow\] .folder-picker-control{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_\.folder-picker-control\]\:duration-120 .folder-picker-control{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.folder-picker-control\]\:ease-standard .folder-picker-control{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.folder-picker-control_\.placeholder\]\:text-muted .folder-picker-control .placeholder{color:var(--muted)}.\[\&_\.folder-picker-control_span\]\:min-w-0 .folder-picker-control span{min-width:0}.\[\&_\.folder-picker-control_span\]\:flex-1 .folder-picker-control span{flex:1}.\[\&_\.folder-picker-control_span\]\:overflow-hidden .folder-picker-control span{overflow:hidden}.\[\&_\.folder-picker-control_span\]\:text-ellipsis .folder-picker-control span{text-overflow:ellipsis}.\[\&_\.folder-picker-control_span\]\:whitespace-nowrap .folder-picker-control span{white-space:nowrap}.\[\&_\.folder-picker-control\:disabled\]\:cursor-default .folder-picker-control:disabled{cursor:default}.\[\&_\.folder-picker-control\:disabled\]\:opacity-65 .folder-picker-control:disabled{opacity:.65}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-2 .folder-picker-control:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-offset-2 .folder-picker-control:focus-visible{outline-offset:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-text .folder-picker-control:focus-visible{outline-color:var(--text)}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-solid .folder-picker-control:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:border-muted .folder-picker-control:hover:not(:disabled){border-color:var(--muted)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:shadow-control-subtle .folder-picker-control:hover:not(:disabled){--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)_\.folder-picker-chevron\]\:text-subtext .folder-picker-control:hover:not(:disabled) .folder-picker-chevron{color:var(--subtext)}.\[\&_\.folder-picker-hint\]\:text-sm .folder-picker-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.folder-picker-hint\]\:leading-\[1\.4\] .folder-picker-hint{--tw-leading:1.4;line-height:1.4}.\[\&_\.folder-picker-hint\]\:font-normal .folder-picker-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.folder-picker-hint\]\:text-subtext .folder-picker-hint{color:var(--subtext)}.\[\&_\.folder-picker-icon\]\:flex-none .folder-picker-icon{flex:none}.\[\&_\.folder-picker-icon\]\:text-current .folder-picker-icon{color:currentColor}.\[\&_\.form-seg\]\:mb-0\.5 .form-seg{margin-bottom:calc(var(--spacing) * .5)}.\[\&_\.form-seg\]\:self-start .form-seg{align-self:flex-start}.\[\&_\.form-seg_button\]\:px-3 .form-seg button{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.form-seg_button\]\:py-\[5px\] .form-seg button{padding-block:5px}.\[\&_\.ftree-footer\]\:mt-2\.5 .ftree-footer{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.ftree-footer\]\:max-w-full .ftree-footer{max-width:100%}.\[\&_\.ftree-footer\]\:rounded-md .ftree-footer{border-radius:8px}.\[\&_\.ftree-footer\]\:border .ftree-footer{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.ftree-footer\]\:border-border .ftree-footer{border-color:var(--border)}.\[\&_\.ftree-footer\]\:bg-background .ftree-footer{background-color:var(--base)}.\[\&_\.ftree-footer\]\:px-2\.5 .ftree-footer{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.ftree-footer\]\:py-1\.5 .ftree-footer{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.ftree-footer_code\]\:max-w-95 .ftree-footer code{max-width:calc(var(--spacing) * 95)}.\[\&_\.hc-actions\]\:mt-2\.5 .hc-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions\]\:flex .hc-actions{display:flex}.\[\&_\.hc-actions\]\:items-center .hc-actions{align-items:center}.\[\&_\.hc-actions\]\:gap-1\.5 .hc-actions{gap:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:inline-flex .hc-actions button{display:inline-flex}.\[\&_\.hc-actions_button\]\:min-w-21 .hc-actions button{min-width:calc(var(--spacing) * 21)}.\[\&_\.hc-actions_button\]\:items-center .hc-actions button{align-items:center}.\[\&_\.hc-actions_button\]\:justify-center .hc-actions button{justify-content:center}.\[\&_\.hc-actions_button\]\:gap-\[5px\] .hc-actions button{gap:5px}.\[\&_\.hc-actions_button\]\:rounded-md .hc-actions button{border-radius:8px}.\[\&_\.hc-actions_button\]\:border .hc-actions button{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.hc-actions_button\]\:border-border .hc-actions button{border-color:var(--border)}.\[\&_\.hc-actions_button\]\:bg-background .hc-actions button{background-color:var(--base)}.\[\&_\.hc-actions_button\]\:px-2\.5 .hc-actions button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions_button\]\:py-1\.5 .hc-actions button{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:text-sm .hc-actions button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-actions_button\]\:font-medium .hc-actions button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-actions_button\]\:text-text .hc-actions button{color:var(--text)}.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:color-mix(in oklab,var(--border) 55%,var(--text))}}.\[\&_\.hc-actions_button\:hover\]\:bg-canvas .hc-actions button:hover{background-color:var(--canvas)}.\[\&_\.hc-body\]\:mt-2\.5 .hc-body{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:line-clamp-10 .hc-body{-webkit-line-clamp:10;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-body\]\:border-t .hc-body{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-body\]\:border-t-border-variant .hc-body{border-top-color:var(--border-variant)}.\[\&_\.hc-body\]\:pt-2\.5 .hc-body{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:leading-\[1\.6\] .hc-body{--tw-leading:1.6;line-height:1.6}.\[\&_\.hc-body\]\:whitespace-pre-line .hc-body{white-space:pre-line}.\[\&_\.hc-body\.expanded\]\:line-clamp-none .hc-body.expanded{-webkit-line-clamp:unset;-webkit-box-orient:horizontal;display:block;overflow:visible}.\[\&_\.hc-body\.expanded\]\:block .hc-body.expanded{display:block}.\[\&_\.hc-body\.expanded\]\:max-h-\[45vh\] .hc-body.expanded{max-height:45vh}.\[\&_\.hc-body\.expanded\]\:overflow-x-hidden .hc-body.expanded{overflow-x:hidden}.\[\&_\.hc-body\.expanded\]\:overflow-y-auto .hc-body.expanded{overflow-y:auto}.\[\&_\.hc-body\.expanded\]\:pb-1 .hc-body.expanded{padding-bottom:var(--spacing)}.\[\&_\.hc-branch\]\:inline-flex .hc-branch{display:inline-flex}.\[\&_\.hc-branch\]\:min-w-0 .hc-branch{min-width:0}.\[\&_\.hc-branch\]\:items-center .hc-branch{align-items:center}.\[\&_\.hc-branch\]\:gap-1 .hc-branch{gap:var(--spacing)}.\[\&_\.hc-branch\]\:overflow-hidden .hc-branch{overflow:hidden}.\[\&_\.hc-branch\]\:text-ellipsis .hc-branch{text-overflow:ellipsis}.\[\&_\.hc-branch\]\:whitespace-nowrap .hc-branch{white-space:nowrap}.\[\&_\.hc-failure\]\:mt-2 .hc-failure{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-failure\]\:line-clamp-3 .hc-failure{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-failure\]\:text-accent-red .hc-failure{color:var(--accent-red)}.\[\&_\.hc-foot\]\:mt-2 .hc-foot{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-foot\]\:flex .hc-foot{display:flex}.\[\&_\.hc-foot\]\:items-center .hc-foot{align-items:center}.\[\&_\.hc-foot\]\:justify-between .hc-foot{justify-content:space-between}.\[\&_\.hc-foot\]\:gap-2\.5 .hc-foot{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-foot\]\:text-xs .hc-foot{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-foot\]\:text-muted .hc-foot{color:var(--muted)}.\[\&_\.hc-foot_\.hc-command\]\:min-w-0 .hc-foot .hc-command{min-width:0}.\[\&_\.hc-foot_\.hc-command\]\:overflow-hidden .hc-foot .hc-command{overflow:hidden}.\[\&_\.hc-foot_\.hc-command\]\:text-ellipsis .hc-foot .hc-command{text-overflow:ellipsis}.\[\&_\.hc-foot_\.hc-command\]\:whitespace-nowrap .hc-foot .hc-command{white-space:nowrap}.\[\&_\.hc-git\]\:mt-2\.5 .hc-git{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-git\]\:flex .hc-git{display:flex}.\[\&_\.hc-git\]\:flex-col .hc-git{flex-direction:column}.\[\&_\.hc-git\]\:gap-1 .hc-git{gap:var(--spacing)}.\[\&_\.hc-git\]\:border-t .hc-git{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-git\]\:border-t-border-variant .hc-git{border-top-color:var(--border-variant)}.\[\&_\.hc-git\]\:pt-2 .hc-git{padding-top:calc(var(--spacing) * 2)}.\[\&_\.hc-git\]\:text-xs .hc-git{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-git\]\:text-text .hc-git{color:var(--text)}.\[\&_\.hc-git-row\]\:flex .hc-git-row{display:flex}.\[\&_\.hc-git-row\]\:min-w-0 .hc-git-row{min-width:0}.\[\&_\.hc-git-row\]\:flex-wrap .hc-git-row{flex-wrap:wrap}.\[\&_\.hc-git-row\]\:items-center .hc-git-row{align-items:center}.\[\&_\.hc-git-row\]\:gap-2\.5 .hc-git-row{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-head\]\:flex .hc-head{display:flex}.\[\&_\.hc-head\]\:items-baseline .hc-head{align-items:baseline}.\[\&_\.hc-head\]\:justify-between .hc-head{justify-content:space-between}.\[\&_\.hc-head\]\:gap-2\.5 .hc-head{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-slug\]\:min-w-0 .hc-slug{min-width:0}.\[\&_\.hc-slug\]\:overflow-hidden .hc-slug{overflow:hidden}.\[\&_\.hc-slug\]\:text-sm .hc-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-slug\]\:font-semibold .hc-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.hc-slug\]\:text-ellipsis .hc-slug{text-overflow:ellipsis}.\[\&_\.hc-slug\]\:whitespace-nowrap .hc-slug{white-space:nowrap}.\[\&_\.hc-stats\]\:mt-2\.5 .hc-stats{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:flex .hc-stats{display:flex}.\[\&_\.hc-stats\]\:flex-wrap .hc-stats{flex-wrap:wrap}.\[\&_\.hc-stats\]\:items-center .hc-stats{align-items:center}.\[\&_\.hc-stats\]\:gap-3 .hc-stats{gap:calc(var(--spacing) * 3)}.\[\&_\.hc-stats\]\:border-t .hc-stats{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-stats\]\:border-t-border-variant .hc-stats{border-top-color:var(--border-variant)}.\[\&_\.hc-stats\]\:pt-2\.5 .hc-stats{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:text-xs .hc-stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-stats\]\:text-text .hc-stats{color:var(--text)}.\[\&_\.hc-title\]\:mt-\[3px\] .hc-title{margin-top:3px}.\[\&_\.hc-title\]\:text-text .hc-title{color:var(--text)}.\[\&_\.hc-toggle\]\:mt-1 .hc-toggle{margin-top:var(--spacing)}.\[\&_\.hc-toggle\]\:text-sm .hc-toggle{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-toggle\]\:font-medium .hc-toggle{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-toggle\]\:text-muted .hc-toggle{color:var(--muted)}.\[\&_\.hc-toggle\:hover\]\:text-text .hc-toggle:hover{color:var(--text)}.\[\&_\.home-inner\]\:max-w-140 .home-inner{max-width:calc(var(--spacing) * 140)}.\[\&_\.home-inner\]\:max-w-300 .home-inner{max-width:calc(var(--spacing) * 300)}.\[\&_\.home-inner\]\:pt-0 .home-inner{padding-top:0}.\[\&_\.home-inner\]\:pt-24 .home-inner{padding-top:calc(var(--spacing) * 24)}.\[\&_\.home-inner\]\:pb-0 .home-inner{padding-bottom:0}.\[\&_\.icon-btn\]\:ms-2 .icon-btn{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.icon-btn\]\:align-middle .icon-btn{vertical-align:middle}.\[\&_\.id\]\:text-xs .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.id\]\:text-muted .id{color:var(--muted)}.\[\&_\.k\]\:text-sm .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.k\]\:font-medium .k{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.k\]\:text-subtext .k{color:var(--subtext)}.\[\&_\.k\]\:text-text .k{color:var(--text)}.\[\&_\.katex\]\:text-prose-emphasis .katex{font-size:1.05em}.\[\&_\.katex-display\]\:mx-0 .katex-display{margin-inline:0}.\[\&_\.katex-display\]\:my-3 .katex-display{margin-block:calc(var(--spacing) * 3)}.\[\&_\.katex-display\]\:overflow-x-auto .katex-display{overflow-x:auto}.\[\&_\.katex-display\]\:overflow-y-hidden .katex-display{overflow-y:hidden}.\[\&_\.katex-display\]\:px-0 .katex-display{padding-inline:0}.\[\&_\.katex-display\]\:py-0\.5 .katex-display{padding-block:calc(var(--spacing) * .5)}.\[\&_\.kv\]\:grid-cols-\[132px_minmax\(0\,_1fr\)\] .kv{grid-template-columns:132px minmax(0,1fr)}.\[\&_\.kv\]\:items-center .kv{align-items:center}.\[\&_\.kv\]\:gap-x-4\.5 .kv{column-gap:calc(var(--spacing) * 4.5)}.\[\&_\.kv\]\:gap-y-1\.5 .kv{row-gap:calc(var(--spacing) * 1.5)}.\[\&_\.kv\]\:gap-y-\[9px\] .kv{row-gap:9px}.\[\&_\.kv_\.k\]\:text-sm .kv .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.kv_\.v\]\:flex .kv .v{display:flex}.\[\&_\.kv_\.v\]\:min-w-0 .kv .v{min-width:0}.\[\&_\.kv_\.v\]\:flex-wrap .kv .v{flex-wrap:wrap}.\[\&_\.kv_\.v\]\:items-center .kv .v{align-items:center}.\[\&_\.kv_\.v\]\:gap-\[7px\] .kv .v{gap:7px}.\[\&_\.kv_\.v\]\:font-sans .kv .v{font-family:var(--sans)}.\[\&_\.kv_\.v\]\:text-base .kv .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.kv_\.v\]\:break-normal .kv .v{overflow-wrap:normal;word-break:normal}.\[\&_\.md\]\:max-w-readable .md{max-width:var(--readable-col)}.\[\&_\.md\]\:text-base .md{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.md\]\:leading-\[1\.65\] .md{--tw-leading:1.65;line-height:1.65}.\[\&_\.md\]\:text-text .md{color:var(--text)}.\[\&_\.md_h1\]\:mx-0 .md h1{margin-inline:0}.\[\&_\.md_h1\]\:mt-4\.5 .md h1{margin-top:calc(var(--spacing) * 4.5)}.\[\&_\.md_h1\]\:mb-2 .md h1{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h1\]\:text-2xl .md h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_\.md_h2\]\:mx-0 .md h2{margin-inline:0}.\[\&_\.md_h2\]\:mt-4 .md h2{margin-top:calc(var(--spacing) * 4)}.\[\&_\.md_h2\]\:mb-2 .md h2{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h2\]\:text-xl .md h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.md_h3\]\:text-lg .md h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_\.model-id\]\:block .model-id{display:block}.\[\&_\.model-id\]\:text-xs .model-id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.model-id\]\:text-muted .model-id{color:var(--muted)}.\[\&_\.model-item\]\:ps-6 .model-item{padding-inline-start:calc(var(--spacing) * 6)}.\[\&_\.model-item\]\:whitespace-nowrap .model-item{white-space:nowrap}.\[\&_\.model-item\:disabled\]\:cursor-default .model-item:disabled{cursor:default}.\[\&_\.model-item\:disabled\]\:text-muted .model-item:disabled{color:var(--muted)}.\[\&_\.model-item\:disabled\:hover\]\:bg-transparent .model-item:disabled:hover{background-color:#0000}.\[\&_\.new-project-actions\]\:mt-2\.5 .new-project-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.new-project-actions\]\:justify-start .new-project-actions{justify-content:flex-start}.\[\&_\.node-action\]\:inline-flex .node-action{display:inline-flex}.\[\&_\.node-action\]\:items-center .node-action{align-items:center}.\[\&_\.node-action\]\:gap-\[5px\] .node-action{gap:5px}.\[\&_\.node-action\]\:rounded-sm .node-action{border-radius:6px}.\[\&_\.node-action\]\:px-1\.5 .node-action{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.node-action\]\:py-\[3px\] .node-action{padding-block:3px}.\[\&_\.node-action\]\:text-sm .node-action{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-action\]\:font-medium .node-action{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-action\]\:text-text .node-action{color:var(--text)}.\[\&_\.node-action\]\:no-underline .node-action{text-decoration-line:none}.\[\&_\.node-action-ext\]\:ms-auto .node-action-ext{margin-inline-start:auto}.\[\&_\.node-action-ext\]\:px-\[5px\] .node-action-ext{padding-inline:5px}.\[\&_\.node-action-ext\]\:py-\[3px\] .node-action-ext{padding-block:3px}.\[\&_\.node-action\:hover\]\:bg-surface .node-action:hover{background-color:var(--surface)}.\[\&_\.node-action\:hover\]\:text-text .node-action:hover{color:var(--text)}.\[\&_\.node-actions\]\:mt-2 .node-actions{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-actions\]\:flex .node-actions{display:flex}.\[\&_\.node-actions\]\:items-center .node-actions{align-items:center}.\[\&_\.node-actions\]\:gap-\[3px\] .node-actions{gap:3px}.\[\&_\.node-actions\]\:border-t .node-actions{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.node-actions\]\:border-t-border-variant .node-actions{border-top-color:var(--border-variant)}.\[\&_\.node-actions\]\:pt-1\.5 .node-actions{padding-top:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:mb-1\.5 .node-eyebrow{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:flex .node-eyebrow{display:flex}.\[\&_\.node-eyebrow\]\:items-center .node-eyebrow{align-items:center}.\[\&_\.node-eyebrow\]\:justify-between .node-eyebrow{justify-content:space-between}.\[\&_\.node-eyebrow\]\:gap-2 .node-eyebrow{gap:calc(var(--spacing) * 2)}.\[\&_\.node-eyebrow\]\:text-xs .node-eyebrow{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-eyebrow\]\:font-medium .node-eyebrow{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-eyebrow\]\:text-muted .node-eyebrow{color:var(--muted)}.\[\&_\.node-head\]\:flex .node-head{display:flex}.\[\&_\.node-head\]\:min-w-0 .node-head{min-width:0}.\[\&_\.node-head\]\:items-center .node-head{align-items:center}.\[\&_\.node-head\]\:gap-\[7px\] .node-head{gap:7px}.\[\&_\.node-meta\]\:mt-2 .node-meta{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:flex .node-meta{display:flex}.\[\&_\.node-meta\]\:items-center .node-meta{align-items:center}.\[\&_\.node-meta\]\:gap-2 .node-meta{gap:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:text-xs .node-meta{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-meta\]\:text-muted .node-meta{color:var(--muted)}.\[\&_\.node-overview-link\]\:block .node-overview-link{display:block}.\[\&_\.node-overview-link\]\:w-full .node-overview-link{width:100%}.\[\&_\.node-overview-link\]\:cursor-pointer .node-overview-link{cursor:pointer}.\[\&_\.node-overview-link\]\:border-0 .node-overview-link{border-style:var(--tw-border-style);border-width:0}.\[\&_\.node-overview-link\]\:bg-transparent .node-overview-link{background-color:#0000}.\[\&_\.node-overview-link\]\:p-0 .node-overview-link{padding:0}.\[\&_\.node-overview-link\]\:text-start .node-overview-link{text-align:start}.\[\&_\.node-overview-link\]\:text-inherit .node-overview-link{color:inherit}.\[\&_\.node-overview-link\]\:\[font\:inherit\] .node-overview-link{font:inherit}.\[\&_\.node-overview-link\:focus-visible\]\:rounded-xs .node-overview-link:focus-visible{border-radius:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-2 .node-overview-link:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-offset-4 .node-overview-link:focus-visible{outline-offset:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-accent .node-overview-link:focus-visible{outline-color:var(--accent)}.\[\&_\.node-overview-link\:focus-visible\]\:outline-solid .node-overview-link:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline .node-overview-link:hover .node-slug{text-decoration-line:underline}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline-offset-\[3px\] .node-overview-link:hover .node-slug{text-underline-offset:3px}.\[\&_\.node-slug\]\:min-w-0 .node-slug{min-width:0}.\[\&_\.node-slug\]\:flex-1 .node-slug{flex:1}.\[\&_\.node-slug\]\:overflow-hidden .node-slug{overflow:hidden}.\[\&_\.node-slug\]\:text-sm .node-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-slug\]\:font-semibold .node-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.node-slug\]\:text-ellipsis .node-slug{text-overflow:ellipsis}.\[\&_\.node-slug\]\:whitespace-nowrap .node-slug{white-space:nowrap}.\[\&_\.node-slug\]\:text-text .node-slug{color:var(--text)}.\[\&_\.node-status\]\:h-2 .node-status{height:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:w-2 .node-status{width:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:shrink-0 .node-status{flex-shrink:0}.\[\&_\.node-status\]\:rounded-full .node-status{border-radius:999px}.\[\&_\.node-title\]\:mt-1 .node-title{margin-top:var(--spacing)}.\[\&_\.node-title\]\:line-clamp-2 .node-title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.node-title\]\:text-sm .node-title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-title\]\:text-text .node-title{color:var(--text)}.\[\&_\.openresearch-diff-file\]\:w-full .openresearch-diff-file{width:100%}.\[\&_\.openresearch-diff-file\]\:text-sm .openresearch-diff-file{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.openresearch-diff-file\]\:leading-\[1\.55\] .openresearch-diff-file{--tw-leading:1.55;line-height:1.55}.\[\&_\.openresearch-diff-file\]\:\[--diff-background-color\:var\(--base\)\] .openresearch-diff-file{--diff-background-color:var(--base)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-background-color\:var\(--color-diff-delete-code\)\] .openresearch-diff-file{--diff-code-delete-background-color:var(--color-diff-delete-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-background-color\:var\(--color-diff-delete-edit\)\] .openresearch-diff-file{--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-background-color\:var\(--color-diff-insert-code\)\] .openresearch-diff-file{--diff-code-insert-background-color:var(--color-diff-insert-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-background-color\:var\(--color-diff-insert-edit\)\] .openresearch-diff-file{--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-background-color\:var\(--diff-selection-background-color\)\] .openresearch-diff-file{--diff-code-selected-background-color:var(--diff-selection-background-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-code-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-font-family\:var\(--mono\)\] .openresearch-diff-file{--diff-font-family:var(--mono)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-background-color\:var\(--color-diff-delete-gutter\)\] .openresearch-diff-file{--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-text-color\:var\(--accent-red\)\] .openresearch-diff-file{--diff-gutter-delete-text-color:var(--accent-red)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-background-color\:var\(--color-diff-insert-gutter\)\] .openresearch-diff-file{--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-text-color\:var\(--accent-green\)\] .openresearch-diff-file{--diff-gutter-insert-text-color:var(--accent-green)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-background-color\:var\(--color-diff-gutter-selection\)\] .openresearch-diff-file{--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-gutter-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-omit-gutter-line-color\:var\(--color-diff-omit-gutter\)\] .openresearch-diff-file{--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-background-color\:var\(--color-diff-selection\)\] .openresearch-diff-file{--diff-selection-background-color:var(--color-diff-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-text-color\:var\(--primary\)\] .openresearch-diff-file{--diff-selection-text-color:var(--primary)}.\[\&_\.openresearch-diff-file\]\:\[--diff-text-color\:var\(--text\)\] .openresearch-diff-file{--diff-text-color:var(--text)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:px-4 .openresearch-diff-file .diff-code{padding-inline:calc(var(--spacing) * 4)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:py-0 .openresearch-diff-file .diff-code{padding-block:0}.\[\&_\.openresearch-diff-file_\.diff-code\]\:break-normal .openresearch-diff-file .diff-code{overflow-wrap:normal;word-break:normal}.\[\&_\.openresearch-diff-file_\.diff-code\]\:wrap-normal .openresearch-diff-file .diff-code{overflow-wrap:normal}.\[\&_\.openresearch-diff-file_\.diff-code\]\:whitespace-pre .openresearch-diff-file .diff-code{white-space:pre}.\[\&_\.openresearch-diff-file_\.diff-hunk_\+_\.diff-hunk_\.diff-line\:first-child_\>_td\]\:border-t .openresearch-diff-file .diff-hunk+.diff-hunk .diff-line:first-child>td{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.openresearch-diff-file_\.diff-hunk_\+_\.diff-hunk_\.diff-line\:first-child_\>_td\]\:border-t-border .openresearch-diff-file .diff-hunk+.diff-hunk .diff-line:first-child>td{border-top-color:var(--border)}.\[\&_\.openresearch-diff-file_\.diff-line\]\:leading-\[1\.55\] .openresearch-diff-file .diff-line{--tw-leading:1.55;line-height:1.55}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:color-mix(in oklab,var(--base) 92%,var(--accent-red))}}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:color-mix(in oklab,var(--base) 91%,var(--accent-green))}}.\[\&_\.openresearch-diff-file\.diff-unified\]\:table-auto .openresearch-diff-file.diff-unified{table-layout:auto}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:first-child\]\:hidden .openresearch-diff-file.diff-unified .diff-line>td:first-child{display:none}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:sticky .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){position:sticky}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:start-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:z-1 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){z-index:1}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:w-\[1\%\] .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){width:1%}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:cursor-default .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){cursor:default}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:border-e .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:border-e-border .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){border-inline-end-color:var(--border)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:ps-3\.5 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-inline-start:calc(var(--spacing) * 3.5)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pe-2\.5 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pt-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-top:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pb-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-bottom:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-end .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){text-align:end}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:whitespace-nowrap .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){white-space:nowrap}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-diff-gutter-text .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:text-diff-gutter-text .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){color:color-mix(in oklab,var(--text) 45%,var(--base))}}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:select-none .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){-webkit-user-select:none;user-select:none}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:collapse .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{visibility:collapse}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:w-0 .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{width:0}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:nth-child\(2\)\]\:w-\[1\%\] .openresearch-diff-file.diff-unified col.diff-gutter-col:nth-child(2){width:1%}.\[\&_\.paper-destination\]\:flex .paper-destination{display:flex}.\[\&_\.paper-destination\]\:items-center .paper-destination{align-items:center}.\[\&_\.paper-destination\]\:gap-2\.5 .paper-destination{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-destination\]\:rounded-md .paper-destination{border-radius:8px}.\[\&_\.paper-destination\]\:border .paper-destination{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-destination\]\:border-border .paper-destination{border-color:var(--border)}.\[\&_\.paper-destination\]\:bg-background .paper-destination{background-color:var(--base)}.\[\&_\.paper-destination\]\:ps-3 .paper-destination{padding-inline-start:calc(var(--spacing) * 3)}.\[\&_\.paper-destination\]\:pe-2 .paper-destination{padding-inline-end:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pt-2 .paper-destination{padding-top:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pb-2 .paper-destination{padding-bottom:calc(var(--spacing) * 2)}.\[\&_\.paper-destination_\.btn\]\:flex-none .paper-destination .btn{flex:none}.\[\&_\.paper-destination_code\]\:min-w-0 .paper-destination code{min-width:0}.\[\&_\.paper-destination_code\]\:flex-1 .paper-destination code{flex:1}.\[\&_\.paper-destination_code\]\:overflow-hidden .paper-destination code{overflow:hidden}.\[\&_\.paper-destination_code\]\:text-sm .paper-destination code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-destination_code\]\:font-normal .paper-destination code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.paper-destination_code\]\:text-ellipsis .paper-destination code{text-overflow:ellipsis}.\[\&_\.paper-destination_code\]\:whitespace-nowrap .paper-destination code{white-space:nowrap}.\[\&_\.paper-destination_code\]\:text-text .paper-destination code{color:var(--text)}.\[\&_\.paper-pick\]\:flex .paper-pick{display:flex}.\[\&_\.paper-pick\]\:items-center .paper-pick{align-items:center}.\[\&_\.paper-pick\]\:justify-between .paper-pick{justify-content:space-between}.\[\&_\.paper-pick\]\:gap-2\.5 .paper-pick{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick\]\:rounded-md .paper-pick{border-radius:8px}.\[\&_\.paper-pick\]\:border .paper-pick{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-pick\]\:border-border .paper-pick{border-color:var(--border)}.\[\&_\.paper-pick\]\:bg-surface .paper-pick{background-color:var(--surface)}.\[\&_\.paper-pick\]\:px-3 .paper-pick{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.paper-pick\]\:py-2\.5 .paper-pick{padding-block:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick_\.id\]\:text-xs .paper-pick .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-pick_\.id\]\:text-muted .paper-pick .id{color:var(--muted)}.\[\&_\.paper-pick_\.meta\]\:min-w-0 .paper-pick .meta{min-width:0}.\[\&_\.paper-pick_\.title\]\:text-sm .paper-pick .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-pick_\.title\]\:font-medium .paper-pick .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results\]\:flex .paper-results{display:flex}.\[\&_\.paper-results\]\:max-h-60 .paper-results{max-height:calc(var(--spacing) * 60)}.\[\&_\.paper-results\]\:flex-col .paper-results{flex-direction:column}.\[\&_\.paper-results\]\:overflow-y-auto .paper-results{overflow-y:auto}.\[\&_\.paper-results\]\:rounded-md .paper-results{border-radius:8px}.\[\&_\.paper-results\]\:border .paper-results{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-results\]\:border-border .paper-results{border-color:var(--border)}.\[\&_\.paper-results_\.id\]\:text-xs .paper-results .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-results_\.id\]\:text-muted .paper-results .id{color:var(--muted)}.\[\&_\.paper-results_\.title\]\:text-sm .paper-results .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-results_\.title\]\:font-medium .paper-results .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results_button\]\:flex .paper-results button{display:flex}.\[\&_\.paper-results_button\]\:cursor-pointer .paper-results button{cursor:pointer}.\[\&_\.paper-results_button\]\:flex-col .paper-results button{flex-direction:column}.\[\&_\.paper-results_button\]\:items-start .paper-results button{align-items:flex-start}.\[\&_\.paper-results_button\]\:gap-0\.5 .paper-results button{gap:calc(var(--spacing) * .5)}.\[\&_\.paper-results_button\]\:border-0 .paper-results button{border-style:var(--tw-border-style);border-width:0}.\[\&_\.paper-results_button\]\:border-b .paper-results button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_\.paper-results_button\]\:border-b-border-variant .paper-results button{border-bottom-color:var(--border-variant)}.\[\&_\.paper-results_button\]\:bg-transparent .paper-results button{background-color:#0000}.\[\&_\.paper-results_button\]\:bg-none .paper-results button{background-image:none}.\[\&_\.paper-results_button\]\:px-2\.5 .paper-results button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.paper-results_button\]\:py-2 .paper-results button{padding-block:calc(var(--spacing) * 2)}.\[\&_\.paper-results_button\]\:text-start .paper-results button{text-align:start}.\[\&_\.paper-results_button\]\:text-text .paper-results button{color:var(--text)}.\[\&_\.paper-results_button\]\:\[font\:inherit\] .paper-results button{font:inherit}.\[\&_\.paper-results_button\:hover\]\:bg-surface .paper-results button:hover{background-color:var(--surface)}.\[\&_\.paper-results_button\:last-child\]\:border-b-0 .paper-results button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_\.path\]\:flex .path{display:flex}.\[\&_\.path\]\:min-w-0 .path{min-width:0}.\[\&_\.path\]\:flex-1 .path{flex:1}.\[\&_\.path\]\:items-center .path{align-items:center}.\[\&_\.path\]\:gap-2 .path{gap:calc(var(--spacing) * 2)}.\[\&_\.path_code\]\:min-w-0 .path code{min-width:0}.\[\&_\.path_code\]\:flex-1 .path code{flex:1}.\[\&_\.path_code\]\:overflow-hidden .path code{overflow:hidden}.\[\&_\.path_code\]\:font-mono .path code{font-family:var(--mono)}.\[\&_\.path_code\]\:text-xs .path code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.path_code\]\:font-semibold .path code{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.path_code\]\:text-ellipsis .path code{text-overflow:ellipsis}.\[\&_\.path_code\]\:whitespace-nowrap .path code{white-space:nowrap}.\[\&_\.path_code\]\:text-text .path code{color:var(--text)}.\[\&_\.progress\]\:mx-0 .progress{margin-inline:0}.\[\&_\.progress\]\:mt-2 .progress{margin-top:calc(var(--spacing) * 2)}.\[\&_\.progress\]\:mb-0 .progress{margin-bottom:0}.\[\&_\.progress-track\]\:h-\[5px\] .progress-track{height:5px}.\[\&_\.progress-track\]\:border-0 .progress-track{border-style:var(--tw-border-style);border-width:0}.\[\&_\.progress-track\]\:bg-border .progress-track{background-color:var(--border)}.\[\&_\.project-back\]\:shrink-0 .project-back{flex-shrink:0}.\[\&_\.project-chevron\]\:text-muted .project-chevron{color:var(--muted)}.\[\&_\.project-chevron\]\:opacity-0 .project-chevron{opacity:0}.\[\&_\.project-chevron\]\:transition-transform .project-chevron{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_\.project-chevron\]\:duration-120 .project-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.project-chevron\]\:ease-standard .project-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.project-default-title\]\:text-base .project-default-title,.\[\&_\.project-field-label\]\:text-base .project-field-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-field-label\]\:font-medium .project-field-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-field-label\]\:text-text .project-field-label{color:var(--text)}.\[\&_\.project-location-field\]\:flex .project-location-field{display:flex}.\[\&_\.project-location-field\]\:flex-col .project-location-field{flex-direction:column}.\[\&_\.project-location-field\]\:gap-2 .project-location-field{gap:calc(var(--spacing) * 2)}.\[\&_\.project-location-label\]\:text-base .project-location-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-location-label\]\:font-medium .project-location-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-location-label\]\:text-text .project-location-label{color:var(--text)}.\[\&_\.project-menu\]\:start-0 .project-menu{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\.project-menu\]\:z-70 .project-menu{z-index:70}.\[\&_\.project-menu\]\:w-52\.5 .project-menu{width:calc(var(--spacing) * 52.5)}.\[\&_\.project-path-notice\]\:rounded-sm .project-path-notice{border-radius:6px}.\[\&_\.project-path-notice\]\:border .project-path-notice{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.project-path-notice\]\:border-border-variant .project-path-notice{border-color:var(--border-variant)}.\[\&_\.project-path-notice\]\:bg-surface .project-path-notice{background-color:var(--surface)}.\[\&_\.project-path-notice\]\:px-\[11px\] .project-path-notice{padding-inline:11px}.\[\&_\.project-path-notice\]\:py-\[9px\] .project-path-notice{padding-block:9px}.\[\&_\.project-path-notice\]\:text-base .project-path-notice{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-path-notice\]\:text-sm .project-path-notice{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.project-path-notice\]\:leading-\[1\.4\] .project-path-notice{--tw-leading:1.4;line-height:1.4}.\[\&_\.project-path-notice\]\:leading-relaxed .project-path-notice{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\.project-path-notice\]\:text-subtext .project-path-notice{color:var(--subtext)}.\[\&_\.project-path-notice\]\:text-text .project-path-notice{color:var(--text)}.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:color-mix(in srgb,var(--accent-red) 35%,var(--border-variant))}}.\[\&_\.project-switcher\]\:relative .project-switcher{position:relative}.\[\&_\.project-switcher\]\:min-w-0 .project-switcher{min-width:0}.\[\&_\.project-switcher\]\:flex-1 .project-switcher{flex:1}.\[\&_\.project-switcher\]\:self-stretch .project-switcher{align-self:stretch}.\[\&_\.rail-body\]\:min-h-0 .rail-body{min-height:0}.\[\&_\.rail-body\]\:flex-1 .rail-body{flex:1}.\[\&_\.rail-body\]\:overflow-y-auto .rail-body{overflow-y:auto}.\[\&_\.rail-body\]\:px-2 .rail-body{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.rail-body\]\:py-1 .rail-body{padding-block:var(--spacing)}.\[\&_\.react-flow\\_\\_attribution\]\:hidden\! .react-flow__attribution{display:none!important}.\[\&_\.react-flow\\_\\_handle\]\:pointer-events-none .react-flow__handle{pointer-events:none}.\[\&_\.react-flow\\_\\_handle\]\:opacity-0 .react-flow__handle{opacity:0}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-elided\.selectable\]\:cursor-pointer .react-flow__node.react-flow__node-elided.selectable{cursor:pointer}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-exp\.selectable\]\:cursor-default .react-flow__node.react-flow__node-exp.selectable{cursor:default}.\[\&_\.repo-hint\]\:text-sm .repo-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.repo-hint\]\:font-normal .repo-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.repo-hint\]\:text-muted .repo-hint{color:var(--muted)}.\[\&_\.repo-hint\.ok\]\:text-accent-teal .repo-hint.ok{color:var(--accent-teal)}.\[\&_\.row2\]\:grid .row2{display:grid}.\[\&_\.row2\]\:grid-cols-2 .row2{grid-template-columns:repeat(2,minmax(0,1fr))}.\[\&_\.row2\]\:gap-2\.5 .row2{gap:calc(var(--spacing) * 2.5)}.\[\&_\.run-chip_svg\]\:text-primary .run-chip svg{color:var(--primary)}.\[\&_\.run-chip_svg\]\:opacity-100 .run-chip svg{opacity:1}.\[\&_\.sel\]\:font-medium .sel{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.sel\]\:text-text .sel{color:var(--text)}.\[\&_\.session-dot\]\:inline-flex .session-dot{display:inline-flex}.\[\&_\.session-dot\]\:w-3\.5 .session-dot{width:calc(var(--spacing) * 3.5)}.\[\&_\.session-dot\]\:shrink-0 .session-dot{flex-shrink:0}.\[\&_\.session-dot\]\:items-center .session-dot{align-items:center}.\[\&_\.session-dot\]\:justify-center .session-dot{justify-content:center}.\[\&_\.session-menu-btn\]\:mx-0 .session-menu-btn{margin-inline:0}.\[\&_\.session-menu-btn\]\:-my-0\.5 .session-menu-btn{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-menu-btn\]\:hidden .session-menu-btn{display:none}.\[\&_\.session-menu-btn\]\:h-4 .session-menu-btn{height:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:w-4 .session-menu-btn{width:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:shrink-0 .session-menu-btn{flex-shrink:0}.\[\&_\.session-menu-btn\]\:items-center .session-menu-btn{align-items:center}.\[\&_\.session-menu-btn\]\:justify-center .session-menu-btn{justify-content:center}.\[\&_\.session-menu-btn\]\:rounded-sm .session-menu-btn{border-radius:6px}.\[\&_\.session-menu-btn\]\:text-muted .session-menu-btn{color:var(--muted)}.\[\&_\.session-menu-btn\:hover\]\:bg-panel .session-menu-btn:hover{background-color:var(--panel)}.\[\&_\.session-menu-btn\:hover\]\:text-text .session-menu-btn:hover{color:var(--text)}.\[\&_\.session-time\]\:shrink-0 .session-time{flex-shrink:0}.\[\&_\.session-time\]\:text-xs .session-time{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.session-time\]\:text-muted .session-time{color:var(--muted)}.\[\&_\.session-title\]\:min-w-0 .session-title{min-width:0}.\[\&_\.session-title\]\:flex-1 .session-title{flex:1}.\[\&_\.session-title\]\:overflow-hidden .session-title{overflow:hidden}.\[\&_\.session-title\]\:text-ellipsis .session-title{text-overflow:ellipsis}.\[\&_\.session-title\]\:whitespace-nowrap .session-title{white-space:nowrap}.\[\&_\.session-title-input\]\:mx-0 .session-title-input{margin-inline:0}.\[\&_\.session-title-input\]\:-my-0\.5 .session-title-input{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-title-input\]\:min-w-0 .session-title-input{min-width:0}.\[\&_\.session-title-input\]\:flex-1 .session-title-input{flex:1}.\[\&_\.session-title-input\]\:rounded-sm .session-title-input{border-radius:6px}.\[\&_\.session-title-input\]\:border .session-title-input{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.session-title-input\]\:border-primary .session-title-input{border-color:var(--primary)}.\[\&_\.session-title-input\]\:bg-background .session-title-input{background-color:var(--base)}.\[\&_\.session-title-input\]\:px-\[5px\] .session-title-input{padding-inline:5px}.\[\&_\.session-title-input\]\:py-px .session-title-input{padding-block:1px}.\[\&_\.session-title-input\]\:text-text .session-title-input{color:var(--text)}.\[\&_\.session-title-input\]\:outline-none .session-title-input{--tw-outline-style:none;outline-style:none}.\[\&_\.session-title-input\]\:\[font\:inherit\] .session-title-input{font:inherit}.\[\&_\.settings-card\]\:mb-0 .settings-card,.\[\&_\.settings-card-head\]\:mb-0 .settings-card-head{margin-bottom:0}.\[\&_\.settings-card-head\]\:justify-between .settings-card-head{justify-content:space-between}.\[\&_\.settings-card-head\]\:pb-3 .settings-card-head{padding-bottom:calc(var(--spacing) * 3)}.\[\&_\.settings-card-head_h3\]\:m-0 .settings-card-head h3{margin:0}.\[\&_\.settings-form\]\:mt-6 .settings-form{margin-top:calc(var(--spacing) * 6)}.\[\&_\.settings-form\]\:border-t-0 .settings-form{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\.settings-form\]\:pt-0 .settings-form{padding-top:0}.\[\&_\.settings-sub\]\:mb-3 .settings-sub{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\.skill-chip\]\:me-0\.5 .skill-chip{margin-inline-end:calc(var(--spacing) * .5)}.\[\&_\.skill-chip\]\:align-baseline .skill-chip{vertical-align:baseline}.\[\&_\.skill-desc\]\:text-sm .skill-desc{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.skill-desc\]\:text-subtext .skill-desc{color:var(--subtext)}.\[\&_\.skill-name\]\:text-sm .skill-name{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.spinner\]\:h-5\.5 .spinner{height:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:w-5\.5 .spinner{width:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:border-\[3px\] .spinner{border-style:var(--tw-border-style);border-width:3px}.\[\&_\.stats\]\:flex .stats{display:flex}.\[\&_\.stats\]\:shrink-0 .stats{flex-shrink:0}.\[\&_\.stats\]\:items-center .stats{align-items:center}.\[\&_\.stats\]\:gap-2 .stats{gap:calc(var(--spacing) * 2)}.\[\&_\.stats\]\:font-mono .stats{font-family:var(--mono)}.\[\&_\.stats\]\:text-xs .stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.stats\]\:font-medium .stats{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.stats\]\:tabular-nums .stats{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.\[\&_\.status-badge\]\:text-text .status-badge{color:var(--text)}.\[\&_\.tab-close\]\:inline-flex .tab-close{display:inline-flex}.\[\&_\.tab-close\]\:h-3\.5 .tab-close{height:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:w-3\.5 .tab-close{width:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:shrink-0 .tab-close{flex-shrink:0}.\[\&_\.tab-close\]\:items-center .tab-close{align-items:center}.\[\&_\.tab-close\]\:justify-center .tab-close{justify-content:center}.\[\&_\.tab-close\]\:rounded-xs .tab-close{border-radius:4px}.\[\&_\.tab-close\]\:text-muted .tab-close{color:var(--muted)}.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:color-mix(in oklab,var(--text) 15%,transparent)}}.\[\&_\.tab-close\:hover\]\:text-text .tab-close:hover{color:var(--text)}.\[\&_\.tab-label\]\:grid .tab-label{display:grid}.\[\&_\.tab-label\]\:min-w-0 .tab-label{min-width:0}.\[\&_\.tab-label\]\:grid-cols-\[minmax\(0\,_1fr\)\] .tab-label{grid-template-columns:minmax(0,1fr)}.\[\&_\.tab-label\]\:overflow-hidden .tab-label,.\[\&_\.tab-label_\>_span\]\:overflow-hidden .tab-label>span{overflow:hidden}.\[\&_\.tab-label_\>_span\]\:pe-1 .tab-label>span{padding-inline-end:var(--spacing)}.\[\&_\.tab-label_\>_span\]\:text-ellipsis .tab-label>span{text-overflow:ellipsis}.\[\&_\.tab-label_\>_span\]\:whitespace-nowrap .tab-label>span{white-space:nowrap}.\[\&_\.tab-label_\>_span\]\:\[grid-area\:1_\/_1\] .tab-label>span{grid-area:1/1}.\[\&_\.tab-label\:\:after\]\:invisible .tab-label:after{visibility:hidden}.\[\&_\.tab-label\:\:after\]\:overflow-hidden .tab-label:after{overflow:hidden}.\[\&_\.tab-label\:\:after\]\:pe-1 .tab-label:after{padding-inline-end:var(--spacing)}.\[\&_\.tab-label\:\:after\]\:font-medium .tab-label:after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.tab-label\:\:after\]\:text-ellipsis .tab-label:after{text-overflow:ellipsis}.\[\&_\.tab-label\:\:after\]\:whitespace-nowrap .tab-label:after{white-space:nowrap}.\[\&_\.tab-label\:\:after\]\:content-\[attr\(data-label\)\] .tab-label:after{--tw-content:attr(data-label);content:var(--tw-content)}.\[\&_\.tab-label\:\:after\]\:\[grid-area\:1_\/_1\] .tab-label:after{grid-area:1/1}.\[\&_\.title\]\:max-w-60 .title{max-width:calc(var(--spacing) * 60)}.\[\&_\.title\]\:overflow-hidden .title{overflow:hidden}.\[\&_\.title\]\:text-sm .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.title\]\:font-medium .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.title\]\:text-ellipsis .title{text-overflow:ellipsis}.\[\&_\.title\]\:whitespace-nowrap .title{white-space:nowrap}.\[\&_\.unread-dot\]\:h-\[7px\] .unread-dot{height:7px}.\[\&_\.unread-dot\]\:w-\[7px\] .unread-dot{width:7px}.\[\&_\.unread-dot\]\:shrink-0 .unread-dot{flex-shrink:0}.\[\&_\.unread-dot\]\:rounded-full .unread-dot{border-radius:999px}.\[\&_\.unread-dot\]\:bg-primary .unread-dot{background-color:var(--primary)}.\[\&_\.v\]\:flex .v{display:flex}.\[\&_\.v\]\:min-w-0 .v{min-width:0}.\[\&_\.v\]\:flex-wrap .v{flex-wrap:wrap}.\[\&_\.v\]\:items-center .v{align-items:center}.\[\&_\.v\]\:gap-2 .v{gap:calc(var(--spacing) * 2)}.\[\&_\.v\]\:font-sans .v{font-family:var(--sans)}.\[\&_\.v\]\:text-base .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.v\]\:break-words .v{overflow-wrap:break-word}.\[\&_\.v\]\:break-all .v{word-break:break-all}.\[\&_\.v\]\:text-text .v{color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\]\:relative :where([data-tip]){position:relative}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:pointer-events-none :where([data-tip]):after{pointer-events:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:invisible :where([data-tip]):after{visibility:hidden}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:absolute :where([data-tip]):after{position:absolute}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:top-\[calc\(100\%_\+_6px\)\] :where([data-tip]):after{top:calc(100% + 6px)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:left-1\/2 :where([data-tip]):after{left:50%}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:z-\[9999\] :where([data-tip]):after{z-index:9999}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:w-max :where([data-tip]):after{width:max-content}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:max-w-none :where([data-tip]):after{max-width:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:-translate-x-1\/2 :where([data-tip]):after{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:rounded-sm :where([data-tip]):after{border-radius:6px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:bg-text :where([data-tip]):after{background-color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:px-2 :where([data-tip]):after{padding-inline:calc(var(--spacing) * 2)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:py-\[5px\] :where([data-tip]):after{padding-block:5px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-xs :where([data-tip]):after{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:leading-none :where([data-tip]):after{--tw-leading:1;line-height:1}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:font-medium :where([data-tip]):after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:whitespace-nowrap :where([data-tip]):after{white-space:nowrap}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-background :where([data-tip]):after{color:var(--base)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:opacity-0 :where([data-tip]):after{opacity:0}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:content-\[attr\(data-tip\)\] :where([data-tip]):after{--tw-content:attr(data-tip);content:var(--tw-content)}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:visible :where([data-tip]):is(:hover,:focus-visible):after{visibility:visible}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:opacity-100 :where([data-tip]):is(:hover,:focus-visible):after{opacity:1}.\[\&_\>_\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&_\>_\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_\.changes-note\]\:mx-4>.changes-note{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.changes-note\]\:my-3\.5>.changes-note{margin-block:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mx-4>.diff-explorer{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.diff-explorer\]\:mt-3\.5>.diff-explorer{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mb-0>.diff-explorer{margin-bottom:0}.\[\&_\>_\.error\]\:mx-0>.error{margin-inline:0}.\[\&_\>_\.error\]\:mt-0>.error{margin-top:0}.\[\&_\>_\.error\]\:mt-3\.5>.error{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.error\]\:mb-3>.error{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\>_\.error\]\:text-base>.error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\>_\.error\]\:whitespace-pre-wrap>.error{white-space:pre-wrap}.\[\&_\>_\.error\]\:text-accent-red>.error{color:var(--accent-red)}.\[\&_\>_\.openresearch-diff\]\:mx-4>.openresearch-diff{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.openresearch-diff\]\:mt-3\.5>.openresearch-diff{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.openresearch-diff\]\:mb-0>.openresearch-diff{margin-bottom:0}.\[\&_\>_\.project-default-row\:first-child\]\:border-t-0>.project-default-row:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\>_\.project-default-row\:first-child\]\:pt-0>.project-default-row:first-child{padding-top:0}.\[\&_\>_\.seg\]\:rounded-sm>.seg{border-radius:6px}.\[\&_\>_\.seg\]\:p-0\.5>.seg{padding:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:px-2>.seg button{padding-inline:calc(var(--spacing) * 2)}.\[\&_\>_\.seg_button\]\:py-0\.5>.seg button{padding-block:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:text-sm>.seg button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_\.seg_button\]\:font-medium>.seg button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\>_\.truncated-notice\]\:mx-4>.truncated-notice{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.truncated-notice\]\:mt-3\.5>.truncated-notice{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.truncated-notice\]\:mb-0>.truncated-notice{margin-bottom:0}.\[\&_\>_\:first-child\]\:mt-3\.5>:first-child{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_h2\]\:mx-0>h2{margin-inline:0}.\[\&_\>_h2\]\:mt-0>h2{margin-top:0}.\[\&_\>_h2\]\:mb-1\.5>h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\>_h2\]\:text-xl>h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\>_label\]\:gap-2>label{gap:calc(var(--spacing) * 2)}.\[\&_\>_p\]\:m-0>p{margin:0}.\[\&_\>_p\]\:text-sm>p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_p\]\:leading-relaxed>p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\>_p\]\:text-text>p{color:var(--text)}.\[\&_\>_span\]\:inline-flex>span{display:inline-flex}.\[\&_\>_span\]\:items-center>span{align-items:center}.\[\&_\>_span\]\:gap-\[5px\]>span{gap:5px}.\[\&_\>_svg\]\:shrink-0>svg{flex-shrink:0}.\[\&_\>_svg\]\:text-muted>svg{color:var(--muted)}.\[\&_\>_svg\]\:text-subtext>svg{color:var(--subtext)}.\[\&_\>_svg\.file-tree-chevron\]\:text-muted>svg.file-tree-chevron{color:var(--muted)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:start-auto [data-tip-align=end]:after{inset-inline-start:auto}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:end-0 [data-tip-align=end]:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:translate-none [data-tip-align=end]:after{translate:none}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:start-0 [data-tip-align=start]:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:translate-none [data-tip-align=start]:after{translate:none}.\[\&_a\]\:text-sm a{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_a\]\:whitespace-nowrap a{white-space:nowrap}.\[\&_a\]\:text-primary a{color:var(--primary)}.\[\&_a\]\:text-subtext a{color:var(--subtext)}.\[\&_blockquote\]\:mx-0 blockquote{margin-inline:0}.\[\&_blockquote\]\:my-1\.5 blockquote{margin-block:calc(var(--spacing) * 1.5)}.\[\&_blockquote\]\:border-s-\[3px\] blockquote{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.\[\&_blockquote\]\:border-s-border blockquote{border-inline-start-color:var(--border)}.\[\&_blockquote\]\:ps-2\.5 blockquote{padding-inline-start:calc(var(--spacing) * 2.5)}.\[\&_blockquote\]\:pe-0 blockquote{padding-inline-end:0}.\[\&_blockquote\]\:pt-0\.5 blockquote{padding-top:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:pb-0\.5 blockquote{padding-bottom:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:text-subtext blockquote{color:var(--subtext)}.\[\&_button\]\:absolute button{position:absolute}.\[\&_button\]\:-top-\[5px\] button{top:-5px}.\[\&_button\]\:-right-\[5px\] button{right:-5px}.\[\&_button\]\:-mb-px button{margin-bottom:-1px}.\[\&_button\]\:flex button{display:flex}.\[\&_button\]\:grid button{display:grid}.\[\&_button\]\:inline-flex button{display:inline-flex}.\[\&_button\]\:h-4 button{height:calc(var(--spacing) * 4)}.\[\&_button\]\:w-4 button{width:calc(var(--spacing) * 4)}.\[\&_button\]\:w-full button{width:100%}.\[\&_button\]\:cursor-pointer button{cursor:pointer}.\[\&_button\]\:grid-cols-\[18px_minmax\(0\,_1fr\)_auto_auto\] button{grid-template-columns:18px minmax(0,1fr) auto auto}.\[\&_button\]\:grid-cols-\[minmax\(72px\,_0\.7fr\)_minmax\(100px\,_1fr\)_minmax\(70px\,_0\.7fr\)_60px_16px\] button{grid-template-columns:minmax(72px,.7fr) minmax(100px,1fr) minmax(70px,.7fr) 60px 16px}.\[\&_button\]\:flex-col button{flex-direction:column}.\[\&_button\]\:items-center button{align-items:center}.\[\&_button\]\:items-start button{align-items:flex-start}.\[\&_button\]\:justify-center button{justify-content:center}.\[\&_button\]\:gap-0\.5 button{gap:calc(var(--spacing) * .5)}.\[\&_button\]\:gap-3\.5 button{gap:calc(var(--spacing) * 3.5)}.\[\&_button\]\:gap-\[7px\] button{gap:7px}.\[\&_button\]\:rounded-full button{border-radius:999px}.\[\&_button\]\:rounded-sm button{border-radius:6px}.\[\&_button\]\:rounded-xs button{border-radius:4px}.\[\&_button\]\:border button{border-style:var(--tw-border-style);border-width:1px}.\[\&_button\]\:border-0 button{border-style:var(--tw-border-style);border-width:0}.\[\&_button\]\:border-b button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_button\]\:border-b-2 button{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.\[\&_button\]\:border-border button{border-color:var(--border)}.\[\&_button\]\:border-b-border-variant button{border-bottom-color:var(--border-variant)}.\[\&_button\]\:border-b-transparent button{border-bottom-color:#0000}.\[\&_button\]\:bg-surface button{background-color:var(--surface)}.\[\&_button\]\:bg-transparent button{background-color:#0000}.\[\&_button\]\:bg-none button{background-image:none}.\[\&_button\]\:p-0 button{padding:0}.\[\&_button\]\:p-0\.5 button{padding:calc(var(--spacing) * .5)}.\[\&_button\]\:px-0 button{padding-inline:0}.\[\&_button\]\:px-0\.5 button{padding-inline:calc(var(--spacing) * .5)}.\[\&_button\]\:px-2 button{padding-inline:calc(var(--spacing) * 2)}.\[\&_button\]\:px-2\.5 button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_button\]\:px-3 button{padding-inline:calc(var(--spacing) * 3)}.\[\&_button\]\:px-\[9px\] button{padding-inline:9px}.\[\&_button\]\:py-0\.5 button{padding-block:calc(var(--spacing) * .5)}.\[\&_button\]\:py-2 button{padding-block:calc(var(--spacing) * 2)}.\[\&_button\]\:py-\[3px\] button{padding-block:3px}.\[\&_button\]\:py-\[7px\] button{padding-block:7px}.\[\&_button\]\:py-\[11px\] button{padding-block:11px}.\[\&_button\]\:text-start button{text-align:start}.\[\&_button\]\:text-sm button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_button\]\:font-medium button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_button\]\:text-muted button{color:var(--muted)}.\[\&_button\]\:text-text button{color:var(--text)}.\[\&_button\]\:\[font\:inherit\] button{font:inherit}.\[\&_button\.active\]\:border-b-primary button.active{border-bottom-color:var(--primary)}.\[\&_button\.active\]\:bg-background button.active{background-color:var(--base)}.\[\&_button\.active\]\:bg-surface button.active{background-color:var(--surface)}.\[\&_button\.active\]\:shadow-diff-active button.active{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--text));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,color-mix(in oklab, var(--text) 25%, transparent))}}.\[\&_button\.active\]\:shadow-segment button.active{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\:disabled\]\:cursor-default button:disabled{cursor:default}.\[\&_button\:disabled\]\:text-muted button:disabled{color:var(--muted)}.\[\&_button\:hover\]\:bg-panel button:hover{background-color:var(--panel)}.\[\&_button\:hover\]\:bg-surface button:hover{background-color:var(--surface)}.\[\&_button\:hover\]\:bg-text button:hover{background-color:var(--text)}.\[\&_button\:hover\]\:text-background button:hover{color:var(--base)}.\[\&_button\:hover\]\:text-text button:hover{color:var(--text)}.\[\&_button\:hover\]\:underline button:hover{text-decoration-line:underline}.\[\&_button\:hover\]\:underline-offset-2 button:hover{text-underline-offset:2px}.\[\&_button\:last-child\]\:border-b-0 button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_button\:not\(\:disabled\)\:hover\]\:text-text button:not(:disabled):hover{color:var(--text)}.\[\&_code\]\:min-w-0 code{min-width:0}.\[\&_code\]\:flex-1 code{flex:1}.\[\&_code\]\:overflow-hidden code{overflow:hidden}.\[\&_code\]\:rounded-xs code{border-radius:4px}.\[\&_code\]\:border code{border-style:var(--tw-border-style);border-width:1px}.\[\&_code\]\:border-border-variant code{border-color:var(--border-variant)}.\[\&_code\]\:bg-panel code{background-color:var(--panel)}.\[\&_code\]\:px-\[5px\] code{padding-inline:5px}.\[\&_code\]\:py-px code{padding-block:1px}.\[\&_code\]\:text-left code{text-align:left}.\[\&_code\]\:font-mono code{font-family:var(--mono)}.\[\&_code\]\:text-sm code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_code\]\:font-medium code{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_code\]\:text-ellipsis code{text-overflow:ellipsis}.\[\&_code\]\:whitespace-nowrap code{white-space:nowrap}.\[\&_code\]\:text-muted code{color:var(--muted)}.\[\&_code\]\:text-primary code{color:var(--primary)}.\[\&_code\]\:text-text code{color:var(--text)}.\[\&_code\]\:\[direction\:rtl\] code{direction:rtl}.\[\&_h1\]\:m-0 h1{margin:0}.\[\&_h1\]\:mx-0 h1{margin-inline:0}.\[\&_h1\]\:mt-0 h1{margin-top:0}.\[\&_h1\]\:mt-3 h1{margin-top:calc(var(--spacing) * 3)}.\[\&_h1\]\:mt-7 h1{margin-top:calc(var(--spacing) * 7)}.\[\&_h1\]\:mb-1\.5 h1{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h1\]\:mb-3\.5 h1{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h1\]\:text-3xl h1{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h1\]\:text-4xl h1{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h1\]\:text-xl h1{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h1\]\:text-prose-emphasis h1{font-size:1.05em}.\[\&_h1\]\:leading-\[1\.18\] h1{--tw-leading:1.18;line-height:1.18}.\[\&_h1\]\:leading-tight h1{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h1\]\:font-semibold h1{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h1\]\:text-text h1{color:var(--text)}.\[\&_h2\]\:m-0 h2{margin:0}.\[\&_h2\]\:mx-0 h2{margin-inline:0}.\[\&_h2\]\:mt-0 h2{margin-top:0}.\[\&_h2\]\:mt-3 h2{margin-top:calc(var(--spacing) * 3)}.\[\&_h2\]\:mt-7 h2{margin-top:calc(var(--spacing) * 7)}.\[\&_h2\]\:mb-1\.5 h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h2\]\:mb-2\.5 h2{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h2\]\:mb-3\.5 h2{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h2\]\:flex h2{display:flex}.\[\&_h2\]\:items-center h2{align-items:center}.\[\&_h2\]\:gap-2 h2{gap:calc(var(--spacing) * 2)}.\[\&_h2\]\:text-3xl h2{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h2\]\:text-4xl h2{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h2\]\:text-5xl h2{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.\[\&_h2\]\:text-lg h2{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h2\]\:text-sm h2{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h2\]\:text-xl h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h2\]\:text-prose-emphasis h2{font-size:1.05em}.\[\&_h2\]\:leading-tight h2{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h2\]\:font-medium h2{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_h2\]\:font-semibold h2{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h2\]\:tracking-\[-0\.02em\] h2{--tw-tracking:-.02em;letter-spacing:-.02em}.\[\&_h2\]\:tracking-\[-0\.015em\] h2{--tw-tracking:-.015em;letter-spacing:-.015em}.\[\&_h2\]\:text-text h2{color:var(--text)}.\[\&_h3\]\:mx-0 h3{margin-inline:0}.\[\&_h3\]\:mt-0 h3{margin-top:0}.\[\&_h3\]\:mt-1\.5 h3{margin-top:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mt-3 h3{margin-top:calc(var(--spacing) * 3)}.\[\&_h3\]\:mt-5\.5 h3{margin-top:calc(var(--spacing) * 5.5)}.\[\&_h3\]\:mb-0 h3{margin-bottom:0}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mb-2 h3{margin-bottom:calc(var(--spacing) * 2)}.\[\&_h3\]\:mb-2\.5 h3{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h3\]\:mb-3 h3{margin-bottom:calc(var(--spacing) * 3)}.\[\&_h3\]\:text-base h3{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_h3\]\:text-xl h3{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h3\]\:text-prose-emphasis h3{font-size:1.05em}.\[\&_h3\]\:leading-\[1\.35\] h3{--tw-leading:1.35;line-height:1.35}.\[\&_h3\]\:font-semibold h3{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h3\]\:text-text h3{color:var(--text)}.\[\&_h4\]\:mx-0 h4{margin-inline:0}.\[\&_h4\]\:mt-0 h4{margin-top:0}.\[\&_h4\]\:mt-3 h4{margin-top:calc(var(--spacing) * 3)}.\[\&_h4\]\:mt-4\.5 h4{margin-top:calc(var(--spacing) * 4.5)}.\[\&_h4\]\:mb-1 h4{margin-bottom:var(--spacing)}.\[\&_h4\]\:mb-1\.5 h4{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h4\]\:text-lg h4{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h4\]\:text-sm h4{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h4\]\:text-prose-emphasis h4{font-size:1.05em}.\[\&_h4\]\:leading-\[1\.4\] h4{--tw-leading:1.4;line-height:1.4}.\[\&_h4\]\:font-semibold h4{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h4\]\:text-accent-amber h4{color:var(--accent-amber)}.\[\&_h4\]\:text-text h4{color:var(--text)}.\[\&_img\]\:block img{display:block}.\[\&_img\]\:h-13 img{height:calc(var(--spacing) * 13)}.\[\&_img\]\:h-auto img{height:auto}.\[\&_img\]\:max-h-40 img{max-height:calc(var(--spacing) * 40)}.\[\&_img\]\:w-13 img{width:calc(var(--spacing) * 13)}.\[\&_img\]\:max-w-55 img{max-width:calc(var(--spacing) * 55)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_img\]\:rounded-sm img{border-radius:6px}.\[\&_img\]\:rounded-xs img{border-radius:4px}.\[\&_img\]\:border img{border-style:var(--tw-border-style);border-width:1px}.\[\&_img\]\:border-border img{border-color:var(--border)}.\[\&_img\]\:border-border-variant img{border-color:var(--border-variant)}.\[\&_img\]\:object-cover img{object-fit:cover}.\[\&_input\]\:m-0 input{margin:0}.\[\&_input\]\:w-full input{width:100%}.\[\&_input\]\:min-w-55 input{min-width:calc(var(--spacing) * 55)}.\[\&_input\]\:flex-1 input{flex:1}.\[\&_input\]\:rounded-none input{border-radius:0}.\[\&_input\]\:border-0 input{border-style:var(--tw-border-style);border-width:0}.\[\&_input\]\:border-b input{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_input\]\:border-b-border-variant input{border-bottom-color:var(--border-variant)}.\[\&_input\]\:bg-transparent input{background-color:#0000}.\[\&_input\]\:bg-none input{background-image:none}.\[\&_input\]\:px-2\.5 input{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_input\]\:py-2 input{padding-block:calc(var(--spacing) * 2)}.\[\&_input\]\:font-sans input{font-family:var(--sans)}.\[\&_input\]\:text-sm input{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_input\]\:font-normal input{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_input\]\:text-text input{color:var(--text)}.\[\&_input\]\:outline-none input{--tw-outline-style:none;outline-style:none}.\[\&_input\:\:placeholder\]\:text-subtext input::placeholder{color:var(--subtext)}.\[\&_label\]\:flex label{display:flex}.\[\&_label\]\:flex-col label{flex-direction:column}.\[\&_label\]\:gap-1 label{gap:var(--spacing)}.\[\&_label\]\:text-sm label{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_label\]\:font-medium label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_label\]\:text-text label{color:var(--text)}.\[\&_legend\]\:mb-1\.5 legend{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_legend\]\:text-base legend{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_legend\]\:font-medium legend{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_li\:\:marker\]\:text-primary li::marker{color:var(--primary)}.\[\&_ol\]\:mx-0 ol{margin-inline:0}.\[\&_ol\]\:my-1\.5 ol{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ol\]\:ps-5\.5 ol{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&_p\]\:m-0 p{margin:0}.\[\&_p\]\:mx-0 p{margin-inline:0}.\[\&_p\]\:my-2\.5 p{margin-block:calc(var(--spacing) * 2.5)}.\[\&_p\]\:mt-\[3px\] p{margin-top:3px}.\[\&_p\]\:mb-0 p{margin-bottom:0}.\[\&_p\]\:max-w-80 p{max-width:calc(var(--spacing) * 80)}.\[\&_p\]\:max-w-105 p{max-width:calc(var(--spacing) * 105)}.\[\&_p\]\:max-w-\[46ch\] p{max-width:46ch}.\[\&_p\]\:text-2xl p{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\]\:text-sm p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_p\]\:leading-\[1\.55\] p{--tw-leading:1.55;line-height:1.55}.\[\&_p\]\:leading-normal p{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_p\]\:text-balance p{text-wrap:balance}.\[\&_p\]\:text-subtext p{color:var(--subtext)}.\[\&_p\]\:text-text p{color:var(--text)}.\[\&_p_\+_p\]\:mt-3 p+p{margin-top:calc(var(--spacing) * 3)}.\[\&_p\.empty-state-hint\]\:text-lg p.empty-state-hint{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_p\.empty-state-hint\]\:text-subtext p.empty-state-hint{color:var(--subtext)}.\[\&_p\.empty-state-title\]\:text-2xl p.empty-state-title{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\.empty-state-title\]\:font-normal p.empty-state-title{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_p\.empty-state-title\]\:text-text p.empty-state-title{color:var(--text)}.\[\&_pre\]\:m-0 pre{margin:0}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-md pre{border-radius:8px}.\[\&_pre\]\:border pre{border-style:var(--tw-border-style);border-width:1px}.\[\&_pre\]\:border-border-muted pre{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_pre\]\:border-border-muted pre{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.\[\&_pre\]\:bg-surface pre{background-color:var(--surface)}.\[\&_pre\]\:px-3 pre{padding-inline:calc(var(--spacing) * 3)}.\[\&_pre\]\:py-2 pre{padding-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:text-sm pre{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_pre\]\:text-text pre{color:var(--text)}.\[\&_pre_code\]\:border-0 pre code{border-style:var(--tw-border-style);border-width:0}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:bg-none pre code{background-image:none}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_pre_code\]\:font-normal pre code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_pre_code\]\:text-inherit pre code{color:inherit}.\[\&_select\]\:font-sans select{font-family:var(--sans)}.\[\&_select\]\:text-sm select{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_select\]\:font-normal select{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_select\]\:text-text select{color:var(--text)}.\[\&_span\]\:absolute span{position:absolute}.\[\&_span\]\:start-\[3px\] span{inset-inline-start:3px}.\[\&_span\]\:top-\[3px\] span{top:3px}.\[\&_span\]\:h-3\.5 span{height:calc(var(--spacing) * 3.5)}.\[\&_span\]\:w-3\.5 span{width:calc(var(--spacing) * 3.5)}.\[\&_span\]\:translate-x-4 span{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_span\]\:overflow-hidden span{overflow:hidden}.\[\&_span\]\:rounded-full span{border-radius:999px}.\[\&_span\]\:bg-background span{background-color:var(--base)}.\[\&_span\]\:bg-muted span{background-color:var(--muted)}.\[\&_span\]\:text-ellipsis span{text-overflow:ellipsis}.\[\&_span\]\:whitespace-nowrap span{white-space:nowrap}.\[\&_span\]\:transition-\[translate\,background\] span{transition-property:translate,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_span\]\:duration-120 span{--tw-duration:.12s;transition-duration:.12s}.\[\&_span\]\:ease-standard span{--tw-ease:ease;transition-timing-function:ease}.\[\&_strong\]\:font-medium strong{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_strong\]\:text-accent-amber strong{color:var(--accent-amber)}.\[\&_strong\]\:text-text strong{color:var(--text)}.\[\&_summary\]\:flex summary{display:flex}.\[\&_summary\]\:w-fit summary{width:fit-content}.\[\&_summary\]\:max-w-full summary{max-width:100%}.\[\&_summary\]\:cursor-pointer summary{cursor:pointer}.\[\&_summary\]\:list-none summary{list-style-type:none}.\[\&_summary\]\:items-center summary{align-items:center}.\[\&_summary\]\:gap-2 summary{gap:calc(var(--spacing) * 2)}.\[\&_summary\]\:rounded-sm summary{border-radius:6px}.\[\&_summary\]\:px-1 summary{padding-inline:var(--spacing)}.\[\&_summary\]\:py-\[3px\] summary{padding-block:3px}.\[\&_summary\]\:select-none summary{-webkit-user-select:none;user-select:none}.\[\&_summary_\.plan-chevron\]\:transition-transform summary .plan-chevron{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary_\.plan-chevron\]\:duration-120 summary .plan-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_summary_\.plan-chevron\]\:ease-standard summary .plan-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:-webkit-details-marker\]\:hidden summary::-webkit-details-marker{display:none}.\[\&_summary\:\:after\]\:text-muted summary:after{color:var(--muted)}.\[\&_summary\:\:after\]\:transition-transform summary:after{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary\:\:after\]\:duration-80 summary:after{--tw-duration:80ms;transition-duration:80ms}.\[\&_summary\:\:after\]\:ease-standard summary:after{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:after\]\:content-\[\'›\'\] summary:after{--tw-content:"›";content:var(--tw-content)}.\[\&_summary\:hover\]\:bg-surface summary:hover{background-color:var(--surface)}.\[\&_svg\]\:block svg{display:block}.\[\&_svg\]\:h-\[1em\] svg{height:1em}.\[\&_svg\]\:h-full svg{height:100%}.\[\&_svg\]\:w-\[1em\] svg{width:1em}.\[\&_svg\]\:w-full svg{width:100%}.\[\&_svg\]\:flex-none svg{flex:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\]\:text-muted svg{color:var(--muted)}.\[\&_table\]\:mx-0 table{margin-inline:0}.\[\&_table\]\:my-2\.5 table{margin-block:calc(var(--spacing) * 2.5)}.\[\&_table\]\:block table{display:block}.\[\&_table\]\:w-max table{width:max-content}.\[\&_table\]\:max-w-full table{max-width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:overflow-x-auto table{overflow-x:auto}.\[\&_table\]\:rounded-md table{border-radius:8px}.\[\&_table\]\:border table{border-style:var(--tw-border-style);border-width:1px}.\[\&_table\]\:border-border table{border-color:var(--border)}.\[\&_table\]\:text-sm table{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_tbody_tr\:hover_td\]\:bg-surface-bright tbody tr:hover td{background-color:var(--surface-bright)}.\[\&_td\]\:h-12 td{height:calc(var(--spacing) * 12)}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:border-b-border-variant td{border-bottom-color:var(--border-variant)}.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:color-mix(in oklab,var(--text) 6%,transparent)}}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:px-3\.5 td{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_td\]\:py-2 td{padding-block:calc(var(--spacing) * 2)}.\[\&_td\]\:ps-0 td{padding-inline-start:0}.\[\&_td\]\:pe-2\.5 td{padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_td\]\:pt-0 td{padding-top:0}.\[\&_td\]\:pb-0 td{padding-bottom:0}.\[\&_td\]\:text-start td{text-align:start}.\[\&_td\]\:align-middle td{vertical-align:middle}.\[\&_td\]\:break-normal td{overflow-wrap:normal;word-break:normal}.\[\&_td\]\:break-words td{overflow-wrap:break-word}.\[\&_td\]\:whitespace-nowrap td{white-space:nowrap}.\[\&_td\]\:text-text td{color:var(--text)}.\[\&_td\:first-child\]\:w-\[32\%\] td:first-child{width:32%}.\[\&_td\:first-child\]\:wrap-anywhere td:first-child{overflow-wrap:anywhere}.\[\&_td\:last-child\]\:w-29 td:last-child{width:calc(var(--spacing) * 29)}.\[\&_td\:last-child\]\:text-end td:last-child{text-align:end}.\[\&_td\:last-child\]\:whitespace-nowrap td:last-child{white-space:nowrap}.\[\&_td\[colspan\]\]\:text-start td[colspan]{text-align:start}.\[\&_td\[colspan\]\]\:whitespace-normal td[colspan]{white-space:normal}.\[\&_textarea\]\:field-sizing-content textarea{field-sizing:content}.\[\&_textarea\]\:max-h-45 textarea{max-height:calc(var(--spacing) * 45)}.\[\&_textarea\]\:min-h-18 textarea{min-height:calc(var(--spacing) * 18)}.\[\&_textarea\]\:flex-1 textarea{flex:1}.\[\&_textarea\]\:resize-none textarea{resize:none}.\[\&_textarea\]\:border-0 textarea{border-style:var(--tw-border-style);border-width:0}.\[\&_textarea\]\:bg-transparent textarea{background-color:#0000}.\[\&_textarea\]\:bg-none textarea{background-image:none}.\[\&_textarea\]\:px-3 textarea{padding-inline:calc(var(--spacing) * 3)}.\[\&_textarea\]\:pt-2\.5 textarea{padding-top:calc(var(--spacing) * 2.5)}.\[\&_textarea\]\:pb-1 textarea{padding-bottom:var(--spacing)}.\[\&_textarea\]\:font-mono textarea{font-family:var(--mono)}.\[\&_textarea\]\:text-base textarea{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_textarea\]\:text-sm textarea{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:sticky th{position:sticky}.\[\&_th\]\:top-0 th{top:0}.\[\&_th\]\:z-1 th{z-index:1}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:border-b-border th{border-bottom-color:var(--border)}.\[\&_th\]\:border-b-border-variant th{border-bottom-color:var(--border-variant)}.\[\&_th\]\:bg-background th{background-color:var(--base)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:px-3\.5 th{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_th\]\:py-2 th{padding-block:calc(var(--spacing) * 2)}.\[\&_th\]\:text-start th{text-align:start}.\[\&_th\]\:text-sm th{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:font-medium th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_th\]\:break-normal th{overflow-wrap:normal;word-break:normal}.\[\&_th\]\:break-words th{overflow-wrap:break-word}.\[\&_th\]\:text-text th{color:var(--text)}.\[\&_thead_th\]\:border-b thead th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_thead_th\]\:border-b-border thead th{border-bottom-color:var(--border)}.\[\&_thead_th\]\:bg-surface thead th{background-color:var(--surface)}.\[\&_thead_th\]\:font-medium thead th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_thead_th\]\:text-text thead th{color:var(--text)}.\[\&_tr\.clickable\]\:cursor-pointer tr.clickable{cursor:pointer}.\[\&_tr\.clickable\:hover_td\]\:bg-canvas tr.clickable:hover td{background-color:var(--canvas)}.\[\&_tr\:last-child_td\]\:border-b-0 tr:last-child td{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_ul\]\:mx-0 ul{margin-inline:0}.\[\&_ul\]\:my-1\.5 ul{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ul\]\:ps-5\.5 ul{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&\+\&\]\:border-t+.\[\&\+\&\]\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&\+\&\]\:border-border-variant+.\[\&\+\&\]\:border-border-variant{border-color:var(--border-variant)}.\[\&\.active\]\:border-border.active{border-color:var(--border)}.\[\&\.active\]\:bg-background.active{background-color:var(--base)}.\[\&\.active\]\:bg-panel.active{background-color:var(--panel)}.\[\&\.active\]\:bg-surface.active{background-color:var(--surface)}.\[\&\.active\]\:font-medium.active{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&\.active\]\:text-muted.active{color:var(--muted)}.\[\&\.active\]\:text-primary.active{color:var(--primary)}.\[\&\.active\]\:text-text.active{color:var(--text)}.\[\&\.active\:\:after\]\:absolute.active:after{position:absolute}.\[\&\.active\:\:after\]\:start-0.active:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:end-0.active:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:-bottom-px.active:after{bottom:-1px}.\[\&\.active\:\:after\]\:h-px.active:after{height:1px}.\[\&\.active\:\:after\]\:bg-background.active:after{background-color:var(--base)}.\[\&\.active\:\:after\]\:content-\[\'\'\].active:after{--tw-content:"";content:var(--tw-content)}.\[\&\.align-right\]\:start-auto.align-right{inset-inline-start:auto}.\[\&\.align-right\]\:end-0.align-right{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.approved\]\:text-accent-green.approved{color:var(--accent-green)}.\[\&\.approved\:\:before\]\:content-\[\'✓_\'\].approved:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.archive\]\:text-accent-amber.archive{color:var(--accent-amber)}.\[\&\.chosen\]\:text-accent-green.chosen{color:var(--accent-green)}.\[\&\.chosen\:\:before\]\:content-\[\'✓_\'\].chosen:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.clamped\]\:relative.clamped{position:relative}.\[\&\.clamped\]\:max-h-\[9\.5em\].clamped{max-height:9.5em}.\[\&\.clamped\]\:overflow-hidden.clamped{overflow:hidden}.\[\&\.clamped\:\:after\]\:pointer-events-none.clamped:after{pointer-events:none}.\[\&\.clamped\:\:after\]\:absolute.clamped:after{position:absolute}.\[\&\.clamped\:\:after\]\:inset-x-0.clamped:after{inset-inline:0}.\[\&\.clamped\:\:after\]\:top-auto.clamped:after{top:auto}.\[\&\.clamped\:\:after\]\:bottom-0.clamped:after{bottom:0}.\[\&\.clamped\:\:after\]\:h-8\.5.clamped:after{height:calc(var(--spacing) * 8.5)}.\[\&\.clamped\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_transparent\,_var\(--surface\)\)\].clamped:after{background-image:linear-gradient(to bottom,transparent,var(--surface))}.\[\&\.clamped\:\:after\]\:content-\[\'\'\].clamped:after{--tw-content:"";content:var(--tw-content)}.\[\&\.closable\]\:max-w-60.closable{max-width:calc(var(--spacing) * 60)}.\[\&\.closable\]\:pe-0\.5.closable{padding-inline-end:calc(var(--spacing) * .5)}.\[\&\.code\]\:text-accent-orange.code{color:var(--accent-orange)}.\[\&\.doc\]\:px-7.doc{padding-inline:calc(var(--spacing) * 7)}.\[\&\.doc\]\:pt-4\.5.doc{padding-top:calc(var(--spacing) * 4.5)}.\[\&\.doc\]\:pb-12.doc{padding-bottom:calc(var(--spacing) * 12)}.\[\&\.doc_\.artifact-md\]\:mx-auto.doc .artifact-md{margin-inline:auto}.\[\&\.doc_\.artifact-md\]\:my-0.doc .artifact-md{margin-block:0}.\[\&\.doc_\.artifact-md\]\:max-w-readable.doc .artifact-md{max-width:var(--readable-col)}.\[\&\.document\]\:text-subtext.document{color:var(--subtext)}.\[\&\.drop-down\]\:top-\[calc\(100\%_\+_4px\)\].drop-down{top:calc(100% + 4px)}.\[\&\.drop-down\]\:bottom-auto.drop-down{bottom:auto}.\[\&\.editing\]\:cursor-default.editing{cursor:default}.\[\&\.editing\]\:bg-surface.editing{background-color:var(--surface)}.\[\&\.editing_\.session-menu-btn\]\:hidden.editing .session-menu-btn,.\[\&\.editing_\.session-time\]\:hidden.editing .session-time{display:none}.\[\&\.err\]\:bg-accent-red.err{background-color:var(--accent-red)}.\[\&\.expanded_\.diff-file-header\]\:border-b.expanded .diff-file-header{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&\.expanded_\.diff-file-header\]\:border-b-border.expanded .diff-file-header{border-bottom-color:var(--border)}.\[\&\.fail\]\:border-\[1\.5px\].fail{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.fail\]\:border-danger-outline.fail{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\.fail\]\:border-danger-outline.fail{border-color:color-mix(in oklab,var(--accent-red) 55%,transparent)}}.\[\&\.failed\]\:text-accent-red.failed{color:var(--accent-red)}.\[\&\.image\]\:text-accent-purple.image{color:var(--accent-purple)}.\[\&\.live\]\:animate-\[or-pulse_1\.2s_ease-in-out_infinite\].live{animation:1.2s ease-in-out infinite or-pulse}.\[\&\.live\]\:border-accent-teal.live{border-color:var(--accent-teal)}.\[\&\.live\]\:bg-accent-teal.live{background-color:var(--accent-teal)}.\[\&\.live\]\:shadow-tree-live.live{--tw-shadow:0 2px 12px var(--tw-shadow-color,#209a8433);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.markdown\]\:text-accent-blue.markdown{color:var(--accent-blue)}.\[\&\.max\]\:fixed.max{position:fixed}.\[\&\.max\]\:inset-2\.5.max{inset:calc(var(--spacing) * 2.5)}.\[\&\.max\]\:z-60.max{z-index:60}.\[\&\.max\]\:m-0.max{margin:0}.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,color-mix(in oklab, var(--text) 22%, transparent))}}.\[\&\.max\]\:shadow-panel-max.max{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.menu-open_\.session-menu-btn\]\:inline-flex.menu-open .session-menu-btn{display:inline-flex}.\[\&\.menu-open_\.session-time\]\:hidden.menu-open .session-time{display:none}.\[\&\.muted\]\:text-muted.muted{color:var(--muted)}.\[\&\.ok\]\:bg-accent-green.ok{background-color:var(--accent-green)}.\[\&\.on\]\:bg-primary.on{background-color:var(--primary)}.\[\&\.on\]\:text-background.on{color:var(--base)}.\[\&\.open\]\:rotate-90.open{rotate:90deg}.\[\&\.other\]\:border-\[1\.5px\].other{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.other\]\:border-border.other{border-color:var(--border)}.\[\&\.pass\]\:bg-accent-green.pass{background-color:var(--accent-green)}.\[\&\.pdf\]\:text-accent-red.pdf{color:var(--accent-red)}.\[\&\.permission\]\:border-s-accent-amber.permission{border-inline-start-color:var(--accent-amber)}.\[\&\.plan\]\:border-s-accent-blue.plan{border-inline-start-color:var(--accent-blue)}.\[\&\.question\]\:border-s-accent-purple.question{border-inline-start-color:var(--accent-purple)}.\[\&\.rail-hidden\]\:max-w-none.rail-hidden{max-width:none}.\[\&\.rail-hidden\]\:px-0\.5.rail-hidden{padding-inline:calc(var(--spacing) * .5)}.\[\&\.rail-hidden\]\:py-0.rail-hidden{padding-block:0}.\[\&\.readonly\]\:opacity-60.readonly{opacity:.6}.\[\&\.rejected\]\:text-accent-amber.rejected,.\[\&\.revised\]\:text-accent-amber.revised{color:var(--accent-amber)}.\[\&\.sel\]\:border-primary.sel{border-color:var(--primary)}.\[\&\.sel\]\:bg-primary-subtle.sel{background-color:var(--primary-subtle)}.\[\&\.selected\]\:border-accent.selected{border-color:var(--accent)}.\[\&\.selected\]\:bg-panel.selected{background-color:var(--panel)}.\[\&\.selected\]\:shadow-selected.selected{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--accent));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.selected\:hover\]\:bg-panel.selected:hover{background-color:var(--panel)}.\[\&\.session-menu\]\:start-auto.session-menu{inset-inline-start:auto}.\[\&\.session-menu\]\:end-1\.5.session-menu{inset-inline-end:calc(var(--spacing) * 1.5)}.\[\&\.session-menu\]\:top-\[calc\(100\%_-_2px\)\].session-menu{top:calc(100% - 2px)}.\[\&\.session-menu\]\:min-w-35.session-menu{min-width:calc(var(--spacing) * 35)}.\[\&\.spreadsheet\]\:text-accent-green.spreadsheet,.\[\&\.status-add\]\:text-accent-green.status-add{color:var(--accent-green)}.\[\&\.status-copy\]\:text-accent-blue.status-copy{color:var(--accent-blue)}.\[\&\.status-delete\]\:text-accent-red.status-delete{color:var(--accent-red)}.\[\&\.status-rename\]\:text-accent-blue.status-rename{color:var(--accent-blue)}.\[\&\.unread_\.session-title\]\:font-semibold.unread .session-title{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&\.warn\]\:bg-accent-amber.warn{background-color:var(--accent-amber)}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:\:after\]\:absolute:after{position:absolute}.\[\&\:\:after\]\:start-0:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:end-0:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:top-full:after{top:100%}.\[\&\:\:after\]\:h-6:after{height:calc(var(--spacing) * 6)}.\[\&\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_var\(--base\)\,_transparent\)\]:after{background-image:linear-gradient(to bottom,var(--base),transparent)}.\[\&\:\:after\]\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.\[\&\:active\]\:bg-resizer-hover:active{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\]\:bg-resizer-hover:active{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 14%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:bg-highlight:active:not(:disabled){background-color:var(--highlight)}.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:disabled\]\:cursor-default:disabled{cursor:default}.\[\&\:focus\]\:border-accent-blue:focus{border-color:var(--accent-blue)}.\[\&\:focus-visible\]\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&\:focus-visible\]\:outline-offset-2:focus-visible{outline-offset:2px}.\[\&\:focus-visible\]\:outline-text:focus-visible{outline-color:var(--text)}.\[\&\:focus-visible\]\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&\:focus-within_\.session-menu-btn\]\:inline-flex:focus-within .session-menu-btn{display:inline-flex}.\[\&\:focus-within_\.session-time\]\:hidden:focus-within .session-time{display:none}.\[\&\:has\(input\:checked\)\]\:border-accent:has(input:checked){border-color:var(--accent)}.\[\&\:has\(input\:checked\)\]\:bg-primary-subtle:has(input:checked){background-color:var(--primary-subtle)}.\[\&\:hover\]\:border-primary:hover{border-color:var(--primary)}.\[\&\:hover\]\:border-text:hover{border-color:var(--text)}.\[\&\:hover\]\:bg-canvas:hover{background-color:var(--canvas)}.\[\&\:hover\]\:bg-panel:hover{background-color:var(--panel)}.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:hover\]\:bg-surface:hover{background-color:var(--surface)}.\[\&\:hover\]\:bg-text:hover{background-color:var(--text)}.\[\&\:hover\]\:text-background:hover{color:var(--base)}.\[\&\:hover\]\:text-text:hover{color:var(--text)}.\[\&\:hover\]\:underline:hover{text-decoration-line:underline}.\[\&\:hover\]\:shadow-tree-hover:hover{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\:hover_\.ft-row-delete\]\:opacity-100:hover .ft-row-delete,.\[\&\:hover_\.md-code-copy\]\:opacity-100:hover .md-code-copy{opacity:1}.\[\&\:hover_\.session-menu-btn\]\:inline-flex:hover .session-menu-btn{display:inline-flex}.\[\&\:hover_\.session-time\]\:hidden:hover .session-time{display:none}.\[\&\:hover\:not\(\.active\)\]\:bg-surface:hover:not(.active){background-color:var(--surface)}.\[\&\:hover\:not\(\.on\)\]\:bg-highlight:hover:not(.on){background-color:var(--highlight)}.\[\&\:hover\:not\(\.on\)\]\:text-text:hover:not(.on){color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:border-accent-blue:hover:not(:disabled){border-color:var(--accent-blue)}.\[\&\:hover\:not\(\:disabled\)\]\:border-border-strong:hover:not(:disabled){border-color:var(--border-strong)}.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:border-text:hover:not(:disabled){border-color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-amber-subtle:hover:not(:disabled){background-color:var(--accent-amber-subtle)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-blue) 90%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 8%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:var(--surface)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--surface) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-surface:hover:not(:disabled){background-color:var(--surface)}.\[\&\:hover\:not\(\:disabled\)\]\:text-accent-red:hover:not(:disabled){color:var(--accent-red)}.\[\&\:hover\:not\(\:disabled\)\]\:text-text:hover:not(:disabled){color:var(--text)}.\[\&\:last-child\]\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:absolute:not(.active)+.tab:not(.active):before{position:absolute}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:-start-px:not(.active)+.tab:not(.active):before{inset-inline-start:-1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:top-2\.5:not(.active)+.tab:not(.active):before{top:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bottom-2\.5:not(.active)+.tab:not(.active):before{bottom:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:w-px:not(.active)+.tab:not(.active):before{width:1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bg-border:not(.active)+.tab:not(.active):before{background-color:var(--border)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:content-\[\'\'\]:not(.active)+.tab:not(.active):before{--tw-content:"";content:var(--tw-content)}.\[\&\>\.settings-form\:first-child\]\:mt-0>.settings-form:first-child{margin-top:0}.\[\&\>div\:first-child\]\:border-t-0>div:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&\[data-tip\]\:\:after\]\:top-auto[data-tip]:after{top:auto}.\[\&\[data-tip\]\:\:after\]\:bottom-\[calc\(100\%_\+_6px\)\][data-tip]:after{bottom:calc(100% + 6px)}.\[\&\[open\]_summary_\.plan-chevron\]\:rotate-90[open] summary .plan-chevron,.\[\&\[open\]_summary\:\:after\]\:rotate-90[open] summary:after{rotate:90deg}.chat-header.rail-hidden>.\[\.chat-header\.rail-hidden_\>_\&\:first-child\]\:me-3:first-child{margin-inline-end:calc(var(--spacing) * 3)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.atrule\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.atrule{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-name\]\:text-syntax-green,.openresearch-diff,.file-view) .token.attr-name{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-value\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.attr-value,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.boolean\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.boolean{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.builtin\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.builtin{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.cdata{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:italic,.openresearch-diff,.file-view) .token.cdata{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.char\]\:text-syntax-green,.openresearch-diff,.file-view) .token.char{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.class-name\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.class-name{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.comment{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:italic,.openresearch-diff,.file-view) .token.comment{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.constant\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.constant{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.decorator\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.decorator,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.def\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.def{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.deleted\]\:text-syntax-red,.openresearch-diff,.file-view) .token.deleted{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.entity\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.entity{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.function\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.function{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.important\]\:text-syntax-red,.openresearch-diff,.file-view) .token.important{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.inserted\]\:text-syntax-green,.openresearch-diff,.file-view) .token.inserted{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.keyword\]\:text-syntax-purple,.openresearch-diff,.file-view) .token.keyword{color:var(--syntax-purple)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.namespace\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.namespace{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.number\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.number{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.operator\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.operator{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.parameter\]\:text-syntax-text,.openresearch-diff,.file-view) .token.parameter{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.prolog{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:italic,.openresearch-diff,.file-view) .token.prolog{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.property\]\:text-syntax-red,.openresearch-diff,.file-view) .token.property{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.punctuation\]\:text-syntax-text,.openresearch-diff,.file-view) .token.punctuation{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.regex\]\:text-syntax-green,.openresearch-diff,.file-view) .token.regex,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.selector\]\:text-syntax-green,.openresearch-diff,.file-view) .token.selector,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.string\]\:text-syntax-green,.openresearch-diff,.file-view) .token.string{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.symbol\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.symbol{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.tag\]\:text-syntax-red,.openresearch-diff,.file-view) .token.tag{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.url\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.url{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.variable\]\:text-syntax-red,.openresearch-diff,.file-view) .token.variable{color:var(--syntax-red)}@container (max-width:400px){.\[\@container\(\(max-width\:_400px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)\]{grid-template-columns:minmax(0,1fr)}.\[\@container\(\(max-width\:_400px\)\)\]\:\!flex-row{flex-direction:row!important}.\[\@container\(\(max-width\:_400px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@container\(\(max-width\:_400px\)\)\]\:\!items-center{align-items:center!important}.\[\@container\(\(max-width\:_400px\)\)\]\:justify-start{justify-content:flex-start}.\[\@container\(\(max-width\:_400px\)\)\]\:gap-3{gap:calc(var(--spacing) * 3)}.\[\@container\(\(max-width\:_400px\)\)\]\:\[grid-template-areas\:\'name\'_\'meta\'_\'actions\'\]{grid-template-areas:"name""meta""actions"}}@container (max-width:560px){.\[\@container\(\(max-width\:_560px\)\)\]\:ms-auto{margin-inline-start:auto}.\[\@container\(\(max-width\:_560px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.\[\@container\(\(max-width\:_560px\)\)\]\:flex-col{flex-direction:column}.\[\@container\(\(max-width\:_560px\)\)\]\:items-end{align-items:flex-end}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-1\.5{gap:calc(var(--spacing) * 1.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-y-\[9px\]{row-gap:9px}}@container (max-width:720px){.\[\@container\(\(max-width\:_720px\)\)\]\:hidden{display:none}.\[\@container\(\(max-width\:_720px\)\)\]\:\!w-full{width:100%!important}}@container (max-width:960px){.\[\@container\(\(max-width\:_960px\)\)\]\:static{position:static}.\[\@container\(\(max-width\:_960px\)\)\]\:max-h-55{max-height:calc(var(--spacing) * 55)}.\[\@container\(\(max-width\:_960px\)\)\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:520px){.\[\@media\(\(max-width\:_520px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_520px\)\)\]\:items-start{align-items:flex-start}}@media(max-width:600px){.\[\@media\(\(max-width\:_600px\)\)\]\:col-span-2{grid-column:span 2/span 2}.\[\@media\(\(max-width\:_600px\)\)\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.\[\@media\(\(max-width\:_640px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_640px\)\)\]\:items-stretch{align-items:stretch}.\[\@media\(\(max-width\:_640px\)\)\]\:justify-start{justify-content:flex-start}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:grid-cols-1 .kv{grid-template-columns:repeat(1,minmax(0,1fr))}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:gap-\[3px\] .kv{gap:3px}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv_\.v_\+_\.k\]\:mt-\[7px\] .kv .v+.k{margin-top:7px}}@media(max-width:720px){.\[\@media\(\(max-width\:_720px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_720px\)\)\]\:px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pt-5{padding-top:calc(var(--spacing) * 5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button\]\:grid-cols-\[65px_1fr_60px_16px\] button{grid-template-columns:65px 1fr 60px 16px}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button_\>_\:nth-child\(3\)\]\:hidden button>:nth-child(3){display:none}}@media(max-width:960px){.\[\@media\(\(max-width\:_960px\)\)\]\:col-span-3{grid-column:span 3/span 3}.\[\@media\(\(max-width\:_960px\)\)\]\:mb-1{margin-bottom:var(--spacing)}.\[\@media\(\(max-width\:_960px\)\)\]\:block{display:block}.\[\@media\(\(max-width\:_960px\)\)\]\:hidden{display:none}.\[\@media\(\(max-width\:_960px\)\)\]\:grid-cols-\[minmax\(0\,0\.8fr\)_minmax\(0\,0\.8fr\)_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.4fr)}.\[\@media\(\(max-width\:_960px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_960px\)\)\]\:items-start{align-items:flex-start}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-x-4{column-gap:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-y-3{row-gap:calc(var(--spacing) * 3)}.\[\@media\(\(max-width\:_960px\)\)\]\:px-4{padding-inline:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:py-4{padding-block:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:pt-6{padding-top:calc(var(--spacing) * 6)}.\[\@media\(\(max-width\:_960px\)\)\]\:break-all{word-break:break-all}.\[\@media\(\(max-width\:_960px\)\)\]\:whitespace-normal{white-space:normal}}@media(prefers-reduced-motion:reduce){.\[\@media\(\(prefers-reduced-motion\:_reduce\)\)\]\:animate-none{animation:none}}a.\[a\&\:hover\]\:border-muted:hover{border-color:var(--muted)}button.\[button\&\]\:inline-flex{display:inline-flex}button.\[button\&\]\:h-\[13px\]{height:13px}button.\[button\&\]\:w-\[13px\]{width:13px}button.\[button\&\]\:cursor-pointer{cursor:pointer}button.\[button\&\]\:items-center{align-items:center}button.\[button\&\]\:justify-center{justify-content:center}button.\[button\&\]\:border-0{border-style:var(--tw-border-style);border-width:0}button.\[button\&\]\:bg-transparent{background-color:#0000}button.\[button\&\]\:p-0{padding:0}button.\[button\&_\>_svg\]\:transition-transform>svg{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}button.\[button\&_\>_svg\]\:duration-120>svg{--tw-duration:.12s;transition-duration:.12s}button.\[button\&_\>_svg\]\:ease-standard>svg{--tw-ease:ease;transition-timing-function:ease}button.\[button\&_\>_svg\.open\]\:rotate-90>svg.open{rotate:90deg}button.\[button\&\:hover\]\:border-muted:hover{border-color:var(--muted)}}:root{--base:#fff;--canvas:#faf8f4;--panel:#f3f0ea;--surface:#faf7f2;--surface-bright:#fdfbfb;--highlight:#fdf3f1;--chat-annotation-highlight:#b8d4ff;--text:#1d1b1a;--subtext:#737373;--muted:#a1a1a1;--primary:#9a2036;--primary-subtle:#f7e9ec;--border:#d4d4d4;--border-variant:#e5e5e5;--accent-orange:#da642c;--accent-red:#d94654;--accent-teal:#209a84;--accent-blue:#3a8dff;--accent-amber:#da9100;--accent-green:#5eb64c;--accent-purple:#9c5cff;--accent-green-subtle:#e7f4e5;--accent-amber-subtle:#fff3e1;--accent-teal-subtle:#e1f3f0;--accent-red-subtle:#fbe9ea;--accent-blue-subtle:#e5f0ff;--skill-blue:#184f91;--skill-blue-subtle:#d9e9fb;--skill-blue-slash:#7fa6d2;--accent-purple-subtle:#f1e8ff;--dots-muted:#e3ded5;--dots-strong:#bdb6a8;--mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;--sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;--modal-top:min(30vh, 260px);--term-bg:#1a1a1a;--term-foreground:#e6e1e0;--term-selection:#2c3441;--tool-shimmer:var(--text)}@supports (color:color-mix(in lab,red,red)){:root{--tool-shimmer:color-mix(in srgb, var(--text) 58%, var(--subtext))}}:root{--editor-selection:var(--primary)}@supports (color:color-mix(in lab,red,red)){:root{--editor-selection:color-mix(in oklab, var(--primary) 22%, transparent)}}:root{--readable-col:840px;--border-strong:var(--border);--accent:var(--primary);--teal:var(--accent-teal);--green:var(--accent-green);--red:var(--accent-red);--amber:var(--accent-amber);--syntax-comment:#a0a1a7;--syntax-text:#383a42;--syntax-red:#e45649;--syntax-orange:#986801;--syntax-green:#50a14f;--syntax-yellow:#c18401;--syntax-cyan:#56b6c2;--syntax-purple:#a626a4;--syntax-blue:#4078f2;color-scheme:light}:root[data-theme=dark]{--base:#0e0c0c;--canvas:#141110;--panel:#221f1e;--surface:#1d1b1a;--surface-bright:#130f0f;--highlight:#393433;--chat-annotation-highlight:#244e7a;--text:#e6e1e0;--subtext:#a68e8b;--muted:#737373;--primary:#ffb3ad;--primary-subtle:#33191b;--border:#525252;--border-variant:#404040;--accent-amber:#e67e22;--accent-green-subtle:#1c2b18;--accent-amber-subtle:#33260f;--accent-teal-subtle:#12332d;--accent-red-subtle:#331418;--accent-blue-subtle:#10233a;--skill-blue:#79adf0;--skill-blue-subtle:#183452;--skill-blue-slash:#527ca8;--accent-purple-subtle:#251933;--dots-muted:#2a2523;--dots-strong:#555;--syntax-comment:#7f848e;--syntax-text:#abb2bf;--syntax-red:#e06c75;--syntax-orange:#d19a66;--syntax-green:#98c379;--syntax-yellow:#e5c07b;--syntax-purple:#c678dd;--syntax-blue:#61afef;color-scheme:dark}.tinker-logo{clip-path:inset(34% 9%)}:root[data-theme=dark] .tinker-logo{filter:invert();mix-blend-mode:screen}:root[lang=fa] #root :where(p,h1,h2,h3,h4,h5,h6,button,label,li,th,td,dt,dd,[role=status],[role=alert]),.md :where(p,h1,h2,h3,h4,li,th,td,blockquote),:root[lang=fa] #root .file-view-note{unicode-bidi:plaintext}:where(pre,code:not(.path-front-ellipsis),.font-mono,.xterm,.openresearch-diff){direction:ltr;unicode-bidi:isolate}.path-front-ellipsis{unicode-bidi:isolate}@keyframes or-pulse{50%{opacity:.35}}@keyframes tool-target-reveal{0%{opacity:0;filter:blur(1.5px)}to{opacity:1;filter:blur()}}@keyframes tool-running-shimmer{0%{background-position:200% 0}to{background-position:-100% 0}}@keyframes tool-running-shimmer-icon{0%,to{color:var(--muted);opacity:.35}50%{color:var(--tool-shimmer);opacity:1}}.tool-running-shimmer{color:#0000;background:linear-gradient(100deg,var(--muted) 12%,var(--subtext) 34%,var(--tool-shimmer) 50%,var(--subtext) 66%,var(--muted) 88%);-webkit-text-fill-color:transparent;background-size:300% 100%;-webkit-background-clip:text;background-clip:text;animation:1.75s linear infinite tool-running-shimmer}.tool-running-shimmer::selection{color:var(--text);-webkit-text-fill-color:var(--text)}.tool-running-shimmer-icon{color:var(--muted);animation:1.75s ease-in-out infinite tool-running-shimmer-icon}.tool-group-summary .tool-group-label{transition:color .12s}.tool-group-summary:hover .tool-group-label,.tool-group-summary:hover .tool-chevron{color:var(--text)}.tool-group-disclosure{grid-template-rows:0fr;transition:grid-template-rows .22s cubic-bezier(.2,.75,.25,1);display:grid}.tool-group-disclosure.open{grid-template-rows:1fr}.tool-group-disclosure-inner{min-height:0;position:relative;overflow:hidden}.tool-target-reveal{animation:.18s cubic-bezier(.2,.75,.25,1) tool-target-reveal}.tool-target,.tool-target-more{color:inherit;cursor:pointer;font-weight:inherit;text-align:inherit;text-underline-offset:3px;-webkit-text-decoration-skip-ink:auto;text-decoration-skip-ink:auto;text-decoration-line:underline;text-decoration-thickness:.6px;transition:color .14s,text-decoration-color .14s;display:inline}.tool-line,.tool-group-summary{font-weight:375}.tool-group-rows .tool-line{font-size:var(--text-sm)}.msg-assistant .md table{margin-block:14px;margin-inline:auto}.msg-assistant .md th,.msg-assistant .md td{padding-block:10px}.msg-assistant .md figure{width:fit-content;max-width:100%;margin-inline:auto}.md .file-chip{padding-block:.5px;line-height:1.3}.md .file-chip .file-chip-open{color:currentColor;opacity:.6}.md .file-chip .file-chip-label{text-decoration-line:underline;-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);text-underline-offset:2px;text-decoration-thickness:.6px}.md .file-chip:hover:not(:disabled) .file-chip-label,.md .file-chip:focus-visible .file-chip-label{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}.md .file-chip:disabled .file-chip-label{text-decoration-line:none}.md .file-chip:disabled .file-chip-open{display:none}.msg-assistant .md img{max-width:100%;height:auto;margin-inline:auto;display:block}.md[data-streaming=true] .katex-error{visibility:hidden}.tool-target{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target-more{text-decoration-color:#0000}.project-row:hover .project-row-title{text-underline-offset:2px;text-decoration-line:underline}.project-row:has(.project-row-secondary:hover) .project-row-title{text-decoration-line:none}@media(hover:none){.project-row-delete{opacity:1;pointer-events:auto}}.tool-target:hover,.tool-target-more:hover{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target:focus-visible,.tool-target-more:focus-visible{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);outline:1px solid var(--border-strong);outline-offset:2px}@media(prefers-reduced-motion:reduce){.activity-pulse{animation:none}.tool-group-disclosure{transition:none}.tool-target-reveal{animation:none}.tool-running-shimmer{color:var(--subtext);-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer-icon{animation:none}}@media(forced-colors:active){.tool-running-shimmer{color:canvastext;-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer::selection{color:highlighttext;-webkit-text-fill-color:HighlightText}.tool-running-shimmer-icon{color:canvastext;animation:none}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes title-char-in{0%{opacity:0;filter:blur(4px);transform:translateY(.15em)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes pulse{50%{opacity:.5}} diff --git a/ui/dist/assets/index-DSeSaoW_.js b/ui/dist/assets/index-DSeSaoW_.js new file mode 100644 index 00000000..de1838d1 --- /dev/null +++ b/ui/dist/assets/index-DSeSaoW_.js @@ -0,0 +1,1051 @@ +var NU=Object.defineProperty;var $8=e=>{throw TypeError(e)};var zU=(e,n,t)=>n in e?NU(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Ms=(e,n,t)=>zU(e,typeof n!="symbol"?n+"":n,t),Vx=(e,n,t)=>n.has(e)||$8("Cannot "+t);var ue=(e,n,t)=>(Vx(e,n,"read from private field"),t?t.call(e):n.get(e)),nt=(e,n,t)=>n.has(e)?$8("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Pe=(e,n,t,r)=>(Vx(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Rt=(e,n,t)=>(Vx(e,n,"access private method"),t);var X_=(e,n,t,r)=>({set _(s){Pe(e,n,s,t)},get _(){return ue(e,n,r)}});(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function t(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=t(s);fetch(s.href,i)}})();function Ip(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kx={exports:{}},Z_={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var P8;function TU(){if(P8)return Z_;P8=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var o in s)o!=="key"&&(i[o]=s[o])}else i=s;return s=i.ref,{$$typeof:e,type:r,key:a,ref:s!==void 0?s:null,props:i}}return Z_.Fragment=n,Z_.jsx=t,Z_.jsxs=t,Z_}var F8;function jU(){return F8||(F8=1,Kx.exports=TU()),Kx.exports}var h=jU(),Qx={exports:{}},Qt={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var H8;function AU(){if(H8)return Qt;H8=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;function m($){return $===null||typeof $!="object"?null:($=p&&$[p]||$["@@iterator"],typeof $=="function"?$:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function v($,q,G){this.props=$,this.context=q,this.refs=b,this.updater=G||x}v.prototype.isReactComponent={},v.prototype.setState=function($,q){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,q,"setState")},v.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function y(){}y.prototype=v.prototype;function w($,q,G){this.props=$,this.context=q,this.refs=b,this.updater=G||x}var C=w.prototype=new y;C.constructor=w,S(C,v.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function E(){}var j={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function M($,q,G){var te=G.ref;return{$$typeof:e,type:$,key:q,ref:te!==void 0?te:null,props:G}}function O($,q){return M($.type,q,$.props)}function B($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function F($){var q={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(G){return q[G]})}var U=/\/+/g;function H($,q){return typeof $=="object"&&$!==null&&$.key!=null?F(""+$.key):q.toString(36)}function Y($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(E,E):($.status="pending",$.then(function(q){$.status==="pending"&&($.status="fulfilled",$.value=q)},function(q){$.status==="pending"&&($.status="rejected",$.reason=q)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function V($,q,G,te,fe){var oe=typeof $;(oe==="undefined"||oe==="boolean")&&($=null);var ne=!1;if($===null)ne=!0;else switch(oe){case"bigint":case"string":case"number":ne=!0;break;case"object":switch($.$$typeof){case e:case n:ne=!0;break;case _:return ne=$._init,V(ne($._payload),q,G,te,fe)}}if(ne)return fe=fe($),ne=te===""?"."+H($,0):te,N(fe)?(G="",ne!=null&&(G=ne.replace(U,"$&/")+"/"),V(fe,q,G,"",function(ee){return ee})):fe!=null&&(B(fe)&&(fe=O(fe,G+(fe.key==null||$&&$.key===fe.key?"":(""+fe.key).replace(U,"$&/")+"/")+ne)),q.push(fe)),1;ne=0;var Q=te===""?".":te+":";if(N($))for(var ce=0;ce<$.length;ce++)te=$[ce],oe=Q+H(te,ce),ne+=V(te,q,G,oe,fe);else if(ce=m($),typeof ce=="function")for($=ce.call($),ce=0;!(te=$.next()).done;)te=te.value,oe=Q+H(te,ce++),ne+=V(te,q,G,oe,fe);else if(oe==="object"){if(typeof $.then=="function")return V(Y($),q,G,te,fe);throw q=String($),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ne}function X($,q,G){if($==null)return $;var te=[],fe=0;return V($,te,"","",function(oe){return q.call(G,oe,fe++)}),te}function ie($){if($._status===-1){var q=$._result;q=q(),q.then(function(G){($._status===0||$._status===-1)&&($._status=1,$._result=G)},function(G){($._status===0||$._status===-1)&&($._status=2,$._result=G)}),$._status===-1&&($._status=0,$._result=q)}if($._status===1)return $._result.default;throw $._result}var I=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},L={map:X,forEach:function($,q,G){X($,function(){q.apply(this,arguments)},G)},count:function($){var q=0;return X($,function(){q++}),q},toArray:function($){return X($,function(q){return q})||[]},only:function($){if(!B($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return Qt.Activity=f,Qt.Children=L,Qt.Component=v,Qt.Fragment=t,Qt.Profiler=s,Qt.PureComponent=w,Qt.StrictMode=r,Qt.Suspense=l,Qt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Qt.__COMPILER_RUNTIME={__proto__:null,c:function($){return j.H.useMemoCache($)}},Qt.cache=function($){return function(){return $.apply(null,arguments)}},Qt.cacheSignal=function(){return null},Qt.cloneElement=function($,q,G){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var te=S({},$.props),fe=$.key;if(q!=null)for(oe in q.key!==void 0&&(fe=""+q.key),q)!z.call(q,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&q.ref===void 0||(te[oe]=q[oe]);var oe=arguments.length-2;if(oe===1)te.children=G;else if(1{const n=R.useContext(VR);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},RU=({client:e,children:n})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(VR.Provider,{value:e,children:n})),MU={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var Gc,g5,LR,DU=(LR=class{constructor(){nt(this,Gc,MU);nt(this,g5,!1)}setTimeoutProvider(e){Pe(this,Gc,e)}setTimeout(e,n){return ue(this,Gc).setTimeout(e,n)}clearTimeout(e){ue(this,Gc).clearTimeout(e)}setInterval(e,n){return ue(this,Gc).setInterval(e,n)}clearInterval(e){ue(this,Gc).clearInterval(e)}},Gc=new WeakMap,g5=new WeakMap,LR);const of=new DU;function LU(e){setTimeout(e,0)}const OU=typeof window>"u"||"Deno"in globalThis;function Bs(){}function IU(e,n){return typeof e=="function"?e(n):e}function KR(e){return typeof e=="number"&&e>=0&&e!==1/0}function QR(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Br(e,n){return typeof e=="function"?e(n):e}function U8(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==v5(a,n.options))return!1}else if(!Mh(n.queryKey,a))return!1}if(t!=="all"){const l=n.isActive();if(t==="active"&&!l||t==="inactive"&&l)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||s&&s!==n.state.fetchStatus||i&&!i(n))}function G8(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(Af(n.options.mutationKey)!==Af(i))return!1}else if(!Mh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function v5(e,n){return((n==null?void 0:n.queryKeyHashFn)||Af)(e)}function Af(e){return JSON.stringify(e,(n,t)=>qw(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function Mh(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){for(let r=0;r500)return n;const r=W8(e)&&W8(n);if(!r&&!(qw(e)&&qw(n)))return n;const s=(r?e:Object.keys(e)).length,i=r?n:Object.keys(n),a=i.length,o=r?new Array(a):{};let l=0;for(let u=0;u{of.setTimeout(n,e)})}function Uw(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?b5(e,n):n}function PU(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function FU(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const y5=Symbol();function YR(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===y5?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function x5(e,n){return typeof e=="function"?e(...n):!!e}function HU(e,n,t){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=n()),r||(r=!0,s.aborted?t():s.addEventListener("abort",t,{once:!0})),s)}),e}let qU=()=>OU;const w5=()=>qU();var Uf=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ff,Wc,ph,OR,UU=(OR=class extends Uf{constructor(){super();nt(this,ff);nt(this,Wc);nt(this,ph);Pe(this,ph,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){ue(this,Wc)||this.setEventListener(ue(this,ph))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,Wc))==null||n.call(this),Pe(this,Wc,void 0))}setEventListener(n){var t;Pe(this,ph,n),(t=ue(this,Wc))==null||t.call(this),Pe(this,Wc,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){ue(this,ff)!==n&&(Pe(this,ff,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof ue(this,ff)=="boolean"?ue(this,ff):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},ff=new WeakMap,Wc=new WeakMap,ph=new WeakMap,OR);const S5=new UU,GU=LU;function WU(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=GU;const i=o=>{n?e.push(o):s(()=>{t(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{r(()=>{o.forEach(l=>{t(l)})})})};return{batch:o=>{let l;n++;try{l=o()}finally{n--,n||a()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{t=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}const Ar=WU();var mh,Vc,gh,IR,VU=(IR=class extends Uf{constructor(){super();nt(this,mh,!0);nt(this,Vc);nt(this,gh);Pe(this,gh,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){ue(this,Vc)||this.setEventListener(ue(this,gh))}onUnsubscribe(){var n;this.hasListeners()||((n=ue(this,Vc))==null||n.call(this),Pe(this,Vc,void 0))}setEventListener(n){var t;Pe(this,gh,n),(t=ue(this,Vc))==null||t.call(this),Pe(this,Vc,n(this.setOnline.bind(this)))}setOnline(n){ue(this,mh)!==n&&(Pe(this,mh,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return ue(this,mh)}},mh=new WeakMap,Vc=new WeakMap,gh=new WeakMap,IR);const M1=new VU;function KU(e){return Math.min(1e3*2**e,3e4)}function XR(e){return(e??"online")==="online"?M1.isOnline():!0}var D1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function QU(e){return e instanceof D1}function ZR(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((y,w)=>{i=y,a=w});o.catch(Bs);const l=()=>s!=="pending",u=y=>{var w;if(!l()){const C=new D1(y);S(C),(w=e.onCancel)==null||w.call(e,C)}},_=()=>{n=!0},f=()=>{n=!1},p=()=>S5.isFocused()&&(e.networkMode==="always"||M1.isOnline())&&e.canRun(),m=()=>XR(e.networkMode)&&e.canRun(),x=y=>{l()||(r==null||r(),s="resolved",i(y))},S=y=>{l()||(r==null||r(),s="rejected",a(y))},b=()=>new Promise(y=>{var w;r=C=>{(l()||p())&&y(C)},(w=e.onPause)==null||w.call(e)}).then(()=>{var y;r=void 0,l()||(y=e.onContinue)==null||y.call(e)}),v=()=>{if(l())return;let y;const w=t===0?e.initialPromise:void 0;try{y=w??e.fn()}catch(C){y=Promise.reject(C)}Promise.resolve(y).then(x).catch(C=>{var M;if(l())return;const N=e.retry??(w5()?0:3),E=e.retryDelay??KU,j=typeof E=="function"?E(t,C):E,z=N===!0||typeof N=="number"&&tp()?void 0:b()).then(()=>{n?S(C):v()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:_,continueRetry:f,canStart:m,start:()=>(m()?v():b().then(v),o)}}var df,BR,JR=(BR=class{constructor(){nt(this,df)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),KR(this.gcTime)&&Pe(this,df,of.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(w5()?1/0:3e5))}clearGcTimeout(){ue(this,df)!==void 0&&(of.clearTimeout(ue(this,df)),Pe(this,df,void 0))}},df=new WeakMap,BR);function YU(e){return{onFetch:(n,t)=>{var _,f,p,m,x;const r=n.options,s=(p=(f=(_=n.fetchOptions)==null?void 0:_.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,i=((m=n.state.data)==null?void 0:m.pages)||[],a=((x=n.state.data)==null?void 0:x.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const u=async()=>{let S=!1;const b=w=>{HU(w,()=>n.signal,()=>S=!0)},v=YR(n.options,n.fetchOptions),y=async(w,C,N)=>{if(S)return Promise.reject(n.signal.reason);if(C==null&&w.pages.length)return Promise.resolve(w);const j=(()=>{const B={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return b(B),B})(),z=await v(j),{maxPages:M}=n.options,O=N?FU:PU;return{pages:O(w.pages,z,M),pageParams:O(w.pageParams,C,M)}};if(s&&i.length){const w=s==="backward",C=w?XU:K8,N={pages:i,pageParams:a};o=await y(N,C(r,N),w)}else{const w=e??i.length;do{const C=l===0?a[0]??r.initialPageParam:K8(r,o);if(l>0&&C==null)break;o=await y(o,C),l++}while(l{var S,b;return(b=(S=n.options).persister)==null?void 0:b.call(S,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function K8(e,{pages:n,pageParams:t}){const r=n.length-1;return n.length>0?e.getNextPageParam(n[r],n,t[r],t):void 0}function XU(e,{pages:n,pageParams:t}){var r;return n.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,n[0],n,t[0],t):void 0}var vh,hf,bh,ba,_f,_s,Sp,pf,$a,Al,$R,ZU=($R=class extends JR{constructor(n){super();nt(this,$a);nt(this,vh);nt(this,hf);nt(this,bh);nt(this,ba);nt(this,_f);nt(this,_s);nt(this,Sp);nt(this,pf);Pe(this,pf,!1),Pe(this,Sp,n.defaultOptions),this.setOptions(n.options),this.observers=[],Pe(this,_f,n.client),Pe(this,ba,ue(this,_f).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Pe(this,hf,Y8(this.options)),this.state=n.state??ue(this,hf),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ue(this,vh)}get promise(){var n;return(n=ue(this,_s))==null?void 0:n.promise}setOptions(n){if(this.options={...ue(this,Sp),...n},n!=null&&n._type&&Pe(this,vh,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Y8(this.options);t.data!==void 0&&(this.setState(Q8(t.data,t.dataUpdatedAt)),Pe(this,hf,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,ba).remove(this)}setData(n,t){const r=Uw(this.state.data,n,this.options);return Rt(this,$a,Al).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Rt(this,$a,Al).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=ue(this,_s))==null?void 0:r.promise;return(s=ue(this,_s))==null||s.cancel(n),t?t.then(Bs).catch(Bs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ue(this,hf)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Br(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===y5||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Br(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!QR(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,_s))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=ue(this,_s))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),ue(this,ba).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){const t=this.observers.indexOf(n);t!==-1&&(this.observers.splice(t,1),this.observers.length||(ue(this,_s)&&(ue(this,pf)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?ue(this,_s).cancel({revert:!0}):ue(this,_s).cancelRetry()),this.scheduleGc()),ue(this,ba).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Rt(this,$a,Al).call(this,{type:"invalidate"})}async fetch(n,t){var u,_,f,p,m,x,S,b,v,y,w,C;if(this.state.fetchStatus!=="idle"&&((u=ue(this,_s))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(ue(this,_s))return ue(this,_s).continueRetry(),ue(this,_s).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(E=>E.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Pe(this,pf,!0),r.signal)})},i=()=>{const N=YR(this.options,t),j=(()=>{const z={client:ue(this,_f),queryKey:this.queryKey,meta:this.meta};return s(z),z})();return Pe(this,pf,!1),this.options.persister?this.options.persister(N,j,this):N(j)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:ue(this,_f),state:this.state,fetchFn:i};return s(N),N})();(_=ue(this,vh)==="infinite"?YU(this.options.pages):this.options.behavior)==null||_.onFetch(o,this),Pe(this,bh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Rt(this,$a,Al).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const l=Pe(this,_s,ZR({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof D1&&N.revert&&this.setState({...ue(this,bh),fetchStatus:"idle"}),r.abort()},onFail:(N,E)=>{Rt(this,$a,Al).call(this,{type:"failed",failureCount:N,error:E})},onPause:()=>{Rt(this,$a,Al).call(this,{type:"pause"})},onContinue:()=>{Rt(this,$a,Al).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const N=await l.start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(x=(m=ue(this,ba).config).onSuccess)==null||x.call(m,N,this),(b=(S=ue(this,ba).config).onSettled)==null||b.call(S,N,this.state.error,this),N}catch(N){if(N instanceof D1){if(N.silent)return ue(this,_s).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Rt(this,$a,Al).call(this,{type:"error",error:N}),(y=(v=ue(this,ba).config).onError)==null||y.call(v,N,this),(C=(w=ue(this,ba).config).onSettled)==null||C.call(w,this.state.data,N,this),N}finally{ue(this,_s)===l&&Pe(this,_s,void 0),this.scheduleGc()}}},vh=new WeakMap,hf=new WeakMap,bh=new WeakMap,ba=new WeakMap,_f=new WeakMap,_s=new WeakMap,Sp=new WeakMap,pf=new WeakMap,$a=new WeakSet,Al=function(n){const t=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...eM(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...Q8(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Pe(this,bh,n.manual?s:void 0),s;case"error":const i=n.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=t(this.state),Ar.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),ue(this,ba).notify({query:this,type:"updated",action:n})})},$R);function eM(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:XR(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Q8(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Y8(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,t=n!==void 0,r=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Xs,Cn,kp,Zs,mf,yh,Ll,Cp,xh,wh,gf,vf,Kc,Sh,Gn,g0,Gw,Ww,Vw,Kw,Qw,Yw,Xw,Zw,PR,k5=(PR=class extends Uf{constructor(n,t){super();nt(this,Gn);nt(this,Xs);nt(this,Cn);nt(this,kp);nt(this,Zs);nt(this,mf);nt(this,yh);nt(this,Ll);nt(this,Cp);nt(this,xh);nt(this,wh);nt(this,gf);nt(this,vf);nt(this,Kc);nt(this,Sh,new Set);this.options=t,Pe(this,Xs,n),Pe(this,Ll,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ue(this,Cn).addObserver(this),X8(ue(this,Cn),this.options)?Rt(this,Gn,g0).call(this):this.updateResult(),Rt(this,Gn,Qw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jw(ue(this,Cn),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jw(ue(this,Cn),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Rt(this,Gn,Yw).call(this),Rt(this,Gn,Xw).call(this),ue(this,Cn).removeObserver(this)}setOptions(n){const t=this.options,r=ue(this,Cn);if(this.options=ue(this,Xs).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Br(this.options.enabled,ue(this,Cn))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Rt(this,Gn,Zw).call(this),ue(this,Cn).setOptions(this.options),t._defaulted&&!C0(this.options,t)&&ue(this,Xs).getQueryCache().notify({type:"observerOptionsUpdated",query:ue(this,Cn),observer:this});const s=this.hasListeners();s&&Z8(ue(this,Cn),r,this.options,t)&&Rt(this,Gn,g0).call(this),this.updateResult(),s&&(ue(this,Cn)!==r||Br(this.options.enabled,ue(this,Cn))!==Br(t.enabled,ue(this,Cn))||Br(this.options.staleTime,ue(this,Cn))!==Br(t.staleTime,ue(this,Cn)))&&Rt(this,Gn,Ww).call(this);const i=Rt(this,Gn,Vw).call(this);s&&(ue(this,Cn)!==r||Br(this.options.enabled,ue(this,Cn))!==Br(t.enabled,ue(this,Cn))||i!==ue(this,Kc))&&Rt(this,Gn,Kw).call(this,i)}getOptimisticResult(n){const t=ue(this,Xs).getQueryCache().build(ue(this,Xs),n),r=this.createResult(t,n);return C0(this.getCurrentResult(),r)||(Pe(this,Zs,r),Pe(this,yh,this.options),Pe(this,mf,ue(this,Cn).state)),r}getCurrentResult(){return ue(this,Zs)}trackResult(n,t){return new Proxy(n,{get:(r,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(r,s))})}trackProp(n){ue(this,Sh).add(n)}getCurrentQuery(){return ue(this,Cn)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=ue(this,Xs).defaultQueryOptions(n),r=ue(this,Xs).getQueryCache().build(ue(this,Xs),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=ue(this,Xs).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===r.queryHash&&r.state.data!==void 0&&(s(),o(this.createResult(r,t)))})});return Promise.race([r.fetch().then(()=>{const o=this.createResult(r,t);return i==null||i(o),o}).finally(()=>{s()}),a])}fetch(n){return Rt(this,Gn,g0).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),ue(this,Zs)))}createResult(n,t){var E;const r=ue(this,Cn),s=this.options,i=ue(this,Zs),a=ue(this,mf),o=ue(this,yh),l=n!==r?n.state:ue(this,kp),{state:u}=n;let _={...u},f=!1,p;if(t._optimisticResults){const j=this.hasListeners(),z=!j&&X8(n,t),M=j&&Z8(n,r,t,s);(z||M)&&(_={..._,...eM(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(_.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:S}=_;p=_.data;let b=!1;if(t.placeholderData!==void 0&&p===void 0&&S==="pending"){let j;i!=null&&i.isPlaceholderData&&t.placeholderData===(o==null?void 0:o.placeholderData)?(j=i.data,b=!0):j=typeof t.placeholderData=="function"?t.placeholderData((E=ue(this,wh))==null?void 0:E.state.data,ue(this,wh)):t.placeholderData,j!==void 0&&(S="success",p=Uw(i==null?void 0:i.data,j,t),f=!0)}if(t.select&&p!==void 0&&!b)if(i&&p===(a==null?void 0:a.data)&&t.select===ue(this,Cp))p=ue(this,xh);else try{Pe(this,Cp,t.select),p=t.select(p),p=Uw(i==null?void 0:i.data,p,t),Pe(this,xh,p),Pe(this,Ll,null)}catch(j){Pe(this,Ll,j)}else p===void 0&&Pe(this,Ll,null);ue(this,Ll)&&(m=ue(this,Ll),p=ue(this,xh),x=Date.now(),S="error",f=!1);const v=_.fetchStatus==="fetching",y=S==="pending",w=S==="error",C=y&&v,N=p!==void 0;return{status:S,fetchStatus:_.fetchStatus,isPending:y,isSuccess:S==="success",isError:w,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:_.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:_.fetchFailureCount,failureReason:_.fetchFailureReason,errorUpdateCount:_.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:_.dataUpdateCount>l.dataUpdateCount||_.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!y,isLoadingError:w&&!N,isPaused:_.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&N,isStale:C5(n,t),refetch:this.refetch,isEnabled:Br(t.enabled,n)!==!1}}updateResult(){const n=ue(this,Zs),t=this.createResult(ue(this,Cn),this.options);if(Pe(this,mf,ue(this,Cn).state),Pe(this,yh,this.options),ue(this,mf).data!==void 0&&Pe(this,wh,ue(this,Cn)),C0(t,n))return;Pe(this,Zs,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ue(this,Sh).size)return!0;const o=new Set(a??ue(this,Sh));return this.options.throwOnError&&o.add("error"),Object.keys(ue(this,Zs)).some(l=>{const u=l;return ue(this,Zs)[u]!==n[u]&&o.has(u)})})();Ar.batch(()=>{s&&this.listeners.forEach(i=>{i(ue(this,Zs))}),ue(this,Xs).getQueryCache().notify({query:ue(this,Cn),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Rt(this,Gn,Qw).call(this)}},Xs=new WeakMap,Cn=new WeakMap,kp=new WeakMap,Zs=new WeakMap,mf=new WeakMap,yh=new WeakMap,Ll=new WeakMap,Cp=new WeakMap,xh=new WeakMap,wh=new WeakMap,gf=new WeakMap,vf=new WeakMap,Kc=new WeakMap,Sh=new WeakMap,Gn=new WeakSet,g0=function(n){Rt(this,Gn,Zw).call(this);let t=ue(this,Cn).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(Bs)),t},Gw=function(n){return!w5()&&Br(this.options.enabled,ue(this,Cn))!==!1&&KR(n)},Ww=function(){Rt(this,Gn,Yw).call(this);const n=Br(this.options.staleTime,ue(this,Cn));if(ue(this,Zs).isStale||!Rt(this,Gn,Gw).call(this,n))return;const t=QR(ue(this,Zs).dataUpdatedAt,n)+1;Pe(this,gf,of.setTimeout(()=>{ue(this,Zs).isStale||this.updateResult()},t))},Vw=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ue(this,Cn)):this.options.refetchInterval)??!1},Kw=function(n){Rt(this,Gn,Xw).call(this),Pe(this,Kc,n),!(ue(this,Kc)===0||!Rt(this,Gn,Gw).call(this,ue(this,Kc)))&&Pe(this,vf,of.setInterval(()=>{(this.options.refetchIntervalInBackground||S5.isFocused())&&Rt(this,Gn,g0).call(this)},ue(this,Kc)))},Qw=function(){Rt(this,Gn,Ww).call(this),Rt(this,Gn,Kw).call(this,Rt(this,Gn,Vw).call(this))},Yw=function(){ue(this,gf)!==void 0&&(of.clearTimeout(ue(this,gf)),Pe(this,gf,void 0))},Xw=function(){ue(this,vf)!==void 0&&(of.clearInterval(ue(this,vf)),Pe(this,vf,void 0))},Zw=function(){const n=ue(this,Xs).getQueryCache().build(ue(this,Xs),this.options);if(n===ue(this,Cn))return;const t=ue(this,Cn);Pe(this,Cn,n),Pe(this,kp,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},PR);function JU(e,n){return Br(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Br(n.retryOnMount,e)===!1)}function X8(e,n){return JU(e,n)||e.state.data!==void 0&&Jw(e,n,n.refetchOnMount)}function Jw(e,n,t){if(Br(n.enabled,e)!==!1&&Br(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&C5(e,n)}return!1}function Z8(e,n,t,r){return(e!==n||Br(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&C5(e,t)}function C5(e,n){return Br(n.enabled,e)!==!1&&e.isStaleByTime(Br(n.staleTime,e))}var Ep,Eo,Ls,bf,No,Fc,FR,eG=(FR=class extends JR{constructor(n){super();nt(this,No);nt(this,Ep);nt(this,Eo);nt(this,Ls);nt(this,bf);Pe(this,Ep,n.client),this.mutationId=n.mutationId,Pe(this,Ls,n.mutationCache),Pe(this,Eo,[]),this.state=n.state||tM(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){ue(this,Eo).includes(n)||(ue(this,Eo).push(n),this.clearGcTimeout(),ue(this,Ls).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Pe(this,Eo,ue(this,Eo).filter(t=>t!==n)),this.scheduleGc(),ue(this,Ls).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){ue(this,Eo).length||(this.state.status==="pending"?this.scheduleGc():ue(this,Ls).remove(this))}continue(){var n;return((n=ue(this,bf))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,l,u,_,f,p,m,x,S,b,v,y,w,C,N,E,j,z;const t=()=>{Rt(this,No,Fc).call(this,{type:"continue"})},r={client:ue(this,Ep),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Pe(this,bf,ZR({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,O)=>{Rt(this,No,Fc).call(this,{type:"failed",failureCount:M,error:O})},onPause:()=>{Rt(this,No,Fc).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,Ls).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{Rt(this,No,Fc).call(this,{type:"pending",variables:n,isPaused:a}),ue(this,Ls).config.onMutate&&await ue(this,Ls).config.onMutate(n,this,r);const O=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,n,r));O!==this.state.context&&Rt(this,No,Fc).call(this,{type:"pending",context:O,variables:n,isPaused:a})}const M=await s.start();return await((_=(u=ue(this,Ls).config).onSuccess)==null?void 0:_.call(u,M,n,this.state.context,this,r)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,M,n,this.state.context,r)),await((x=(m=ue(this,Ls).config).onSettled)==null?void 0:x.call(m,M,null,this.state.variables,this.state.context,this,r)),await((b=(S=this.options).onSettled)==null?void 0:b.call(S,M,null,n,this.state.context,r)),Rt(this,No,Fc).call(this,{type:"success",data:M}),M}catch(M){try{await((y=(v=ue(this,Ls).config).onError)==null?void 0:y.call(v,M,n,this.state.context,this,r))}catch(O){Promise.reject(O)}try{await((C=(w=this.options).onError)==null?void 0:C.call(w,M,n,this.state.context,r))}catch(O){Promise.reject(O)}try{await((E=(N=ue(this,Ls).config).onSettled)==null?void 0:E.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(O){Promise.reject(O)}try{await((z=(j=this.options).onSettled)==null?void 0:z.call(j,void 0,M,n,this.state.context,r))}catch(O){Promise.reject(O)}throw Rt(this,No,Fc).call(this,{type:"error",error:M}),M}finally{ue(this,bf)===s&&Pe(this,bf,void 0),ue(this,Ls).runNext(this)}}},Ep=new WeakMap,Eo=new WeakMap,Ls=new WeakMap,bf=new WeakMap,No=new WeakSet,Fc=function(n){const t=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ar.batch(()=>{ue(this,Eo).forEach(r=>{r.onMutationUpdate(n)}),ue(this,Ls).notify({mutation:this,type:"updated",action:n})})},FR);function tM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ol,Pa,Np,HR,tG=(HR=class extends Uf{constructor(n={}){super();nt(this,Ol);nt(this,Pa);nt(this,Np);this.config=n,Pe(this,Ol,new Set),Pe(this,Pa,new Map),Pe(this,Np,0)}build(n,t,r){const s=new eG({client:n,mutationCache:this,mutationId:++X_(this,Np)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){ue(this,Ol).add(n);const t=hg(n);if(typeof t=="string"){const r=ue(this,Pa).get(t);r?r.push(n):ue(this,Pa).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(ue(this,Ol).delete(n)){const t=hg(n);if(typeof t=="string"){const r=ue(this,Pa).get(t);if(r)if(r.length>1){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}else r[0]===n&&ue(this,Pa).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=hg(n);if(typeof t=="string"){const s=(r=ue(this,Pa).get(t))==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===n}else return!0}runNext(n){var r,s;const t=hg(n);return typeof t=="string"?((s=(r=ue(this,Pa).get(t))==null?void 0:r.find(i=>i!==n&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){Ar.batch(()=>{ue(this,Ol).forEach(n=>{this.notify({type:"removed",mutation:n})}),ue(this,Ol).clear(),ue(this,Pa).clear()})}getAll(){return Array.from(ue(this,Ol))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>G8(t,r))}findAll(n={}){return this.getAll().filter(t=>G8(n,t))}notify(n){Ar.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Ar.batch(()=>Promise.all(n.map(t=>t.continue().catch(Bs))))}},Ol=new WeakMap,Pa=new WeakMap,Np=new WeakMap,HR);function hg(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Il,Qc,Os,Bl,Do,v0,e4,qR,nG=(qR=class extends Uf{constructor(t,r){super();nt(this,Do);nt(this,Il);nt(this,Qc);nt(this,Os);nt(this,Bl);Pe(this,Il,t),this.setOptions(r),this.bindMethods(),Rt(this,Do,v0).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const r=this.options;this.options=ue(this,Il).defaultMutationOptions(t),C0(this.options,r)||ue(this,Il).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ue(this,Os),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Af(r.mutationKey)!==Af(this.options.mutationKey)?this.reset():((s=ue(this,Os))==null?void 0:s.state.status)==="pending"&&ue(this,Os).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&ue(this,Os)&&(ue(this,Os).addObserver(this),Rt(this,Do,v0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=ue(this,Os))==null||t.removeObserver(this)}onMutationUpdate(t){Rt(this,Do,v0).call(this),Rt(this,Do,e4).call(this,t)}getCurrentResult(){return ue(this,Qc)}reset(){var t;(t=ue(this,Os))==null||t.removeObserver(this),Pe(this,Os,void 0),Rt(this,Do,v0).call(this),Rt(this,Do,e4).call(this)}mutate(t,r){var s;return Pe(this,Bl,r),(s=ue(this,Os))==null||s.removeObserver(this),Pe(this,Os,ue(this,Il).getMutationCache().build(ue(this,Il),this.options)),ue(this,Os).addObserver(this),ue(this,Os).execute(t)}},Il=new WeakMap,Qc=new WeakMap,Os=new WeakMap,Bl=new WeakMap,Do=new WeakSet,v0=function(){var r;const t=((r=ue(this,Os))==null?void 0:r.state)??tM();Pe(this,Qc,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},e4=function(t){Ar.batch(()=>{var r,s,i,a,o,l,u,_;if(ue(this,Bl)&&this.hasListeners()){const f=ue(this,Qc).variables,p=ue(this,Qc).context,m={client:ue(this,Il),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=ue(this,Bl)).onSuccess)==null||s.call(r,t.data,f,p,m)}catch(x){Promise.reject(x)}try{(a=(i=ue(this,Bl)).onSettled)==null||a.call(i,t.data,null,f,p,m)}catch(x){Promise.reject(x)}}else if((t==null?void 0:t.type)==="error"){try{(l=(o=ue(this,Bl)).onError)==null||l.call(o,t.error,f,p,m)}catch(x){Promise.reject(x)}try{(_=(u=ue(this,Bl)).onSettled)==null||_.call(u,void 0,t.error,f,p,m)}catch(x){Promise.reject(x)}}}this.listeners.forEach(f=>{f(ue(this,Qc))})})},qR);function J8(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var kh,Js,Ch,yf,$i,xf,zp,Tp,jp,Ap,gs,t4,n4,nM,r4,s4,i4,UR,rG=(UR=class extends Uf{constructor(n,t,r){super();nt(this,gs);nt(this,kh);nt(this,Js);nt(this,Ch);nt(this,yf);nt(this,$i);nt(this,xf);nt(this,zp);nt(this,Tp);nt(this,jp);nt(this,Ap,[]);Pe(this,kh,n),Pe(this,yf,r),Pe(this,Ch,[]),Pe(this,$i,[]),Pe(this,Js,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&ue(this,$i).forEach(n=>{n.subscribe(t=>{Rt(this,gs,s4).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,ue(this,$i).forEach(n=>{n.destroy()})}setQueries(n,t){Pe(this,Ch,n),Pe(this,yf,t),Ar.batch(()=>{const r=ue(this,$i),s=Rt(this,gs,r4).call(this,ue(this,Ch));s.forEach(f=>f.observer.setOptions(f.defaultedQueryOptions));const i=s.map(f=>f.observer),a=i.map(f=>f.getCurrentResult()),o=r.length!==i.length,l=i.some((f,p)=>f!==r[p]),u=o||l,_=u?!0:a.some((f,p)=>{const m=ue(this,Js)[p];return!m||!C0(f,m)});!u&&!_||(u&&(Pe(this,Ap,s),Pe(this,$i,i)),Pe(this,Js,a),this.hasListeners()&&(u&&(J8(r,i).forEach(f=>{f.destroy()}),J8(i,r).forEach(f=>{f.subscribe(p=>{Rt(this,gs,s4).call(this,f,p)})})),Rt(this,gs,i4).call(this)))})}getCurrentResult(){return ue(this,Js)}getQueries(){return ue(this,$i).map(n=>n.getCurrentQuery())}getObservers(){return ue(this,$i)}getOptimisticResult(n,t){const r=Rt(this,gs,r4).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Rt(this,gs,n4).call(this,a??s,t,i),()=>Rt(this,gs,t4).call(this,s,r)]}},kh=new WeakMap,Js=new WeakMap,Ch=new WeakMap,yf=new WeakMap,$i=new WeakMap,xf=new WeakMap,zp=new WeakMap,Tp=new WeakMap,jp=new WeakMap,Ap=new WeakMap,gs=new WeakSet,t4=function(n,t){const r=new Set;return t.map((s,i)=>{const a=n[i];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,o=>{r.has(o)||(r.add(o),t.forEach(l=>{l.observer.trackProp(o)}))})})},n4=function(n,t,r){if(t){const s=ue(this,jp),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(ue(this,Js)!==ue(this,Tp)||i||t!==ue(this,zp))&&(Pe(this,zp,t),Pe(this,Tp,ue(this,Js)),r!==void 0&&Pe(this,jp,r),Pe(this,xf,b5(ue(this,xf),t(n)))),ue(this,xf)}return n},nM=function(){var n;return!((n=ue(this,yf))!=null&&n.combine)||ue(this,$i).some((t,r)=>{var s;return t.options.suspense&&((s=ue(this,Js)[r])==null?void 0:s.data)===void 0})},r4=function(n){const t=new Map;ue(this,$i).forEach(s=>{const i=s.options.queryHash;if(!i)return;const a=t.get(i);a?a.push(s):t.set(i,[s])});const r=[];return n.forEach(s=>{var o;const i=ue(this,kh).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new k5(ue(this,kh),i);r.push({defaultedQueryOptions:i,observer:a})}),r},s4=function(n,t){const r=ue(this,$i).indexOf(n);r!==-1&&(Pe(this,Js,ue(this,Js).slice()),ue(this,Js)[r]=t,Rt(this,gs,i4).call(this))},i4=function(){var n;if(this.hasListeners()){const t=Rt(this,gs,nM).call(this),r=ue(this,xf),s=t?r:Rt(this,gs,n4).call(this,Rt(this,gs,t4).call(this,ue(this,Js),ue(this,Ap)),(n=ue(this,yf))==null?void 0:n.combine);(t||r!==s)&&Ar.batch(()=>{this.listeners.forEach(i=>{i(ue(this,Js))})})}},UR),zo,GR,sG=(GR=class extends Uf{constructor(n={}){super();nt(this,zo);this.config=n,Pe(this,zo,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??v5(s,t);let a=this.get(i);return a||(a=new ZU({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){ue(this,zo).has(n.queryHash)||(ue(this,zo).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=ue(this,zo).get(n.queryHash);t&&(n.destroy(),t===n&&ue(this,zo).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Ar.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return ue(this,zo).get(n)}getAll(){return[...ue(this,zo).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>U8(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>U8(n,r)):t}notify(n){Ar.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Ar.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Ar.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},zo=new WeakMap,GR),Tr,Yc,Xc,Eh,Nh,Zc,zh,Th,WR,iG=(WR=class{constructor(e={}){nt(this,Tr);nt(this,Yc);nt(this,Xc);nt(this,Eh);nt(this,Nh);nt(this,Zc);nt(this,zh);nt(this,Th);Pe(this,Tr,e.queryCache||new sG),Pe(this,Yc,e.mutationCache||new tG),Pe(this,Xc,e.defaultOptions||{}),Pe(this,Eh,new Map),Pe(this,Nh,new Map),Pe(this,Zc,0)}mount(){X_(this,Zc)._++,ue(this,Zc)===1&&(Pe(this,zh,S5.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Tr).onFocus())})),Pe(this,Th,M1.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,Tr).onOnline())})))}unmount(){var e,n;X_(this,Zc)._--,ue(this,Zc)===0&&((e=ue(this,zh))==null||e.call(this),Pe(this,zh,void 0),(n=ue(this,Th))==null||n.call(this),Pe(this,Th,void 0))}isFetching(e){return ue(this,Tr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,Yc).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Tr).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=ue(this,Tr).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Br(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return ue(this,Tr).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var a;const r=this.defaultQueryOptions({queryKey:e}),s=(a=ue(this,Tr).get(r.queryHash))==null?void 0:a.state.data,i=IU(n,s);if(i!==void 0)return ue(this,Tr).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Ar.batch(()=>ue(this,Tr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=ue(this,Tr).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=ue(this,Tr);Ar.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=ue(this,Tr);return Ar.batch(()=>{const r=t.findAll(e),s=new Set(r);return r.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>s.has(i)},n)})}cancelQueries(e,n={}){const t={revert:!0,...n},r=Ar.batch(()=>ue(this,Tr).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(Bs).catch(Bs)}invalidateQueries(e,n={}){return Ar.batch(()=>(ue(this,Tr).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const t={...n,cancelRefetch:n.cancelRefetch??!0},r=Ar.batch(()=>ue(this,Tr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(Bs)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Bs)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Tr).build(this,n),r=t.isStaleByTime(Br(n.staleTime,t))?await t.fetch(n):t.state.data,s=n.select;return s?s(r):r}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=ue(this,Tr).build(this,n);return t.isStaleByTime(Br(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Bs).catch(Bs)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Bs).catch(Bs)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return M1.isOnline()?ue(this,Yc).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,Tr)}getMutationCache(){return ue(this,Yc)}getDefaultOptions(){return ue(this,Xc)}setDefaultOptions(e){Pe(this,Xc,e)}setQueryDefaults(e,n){ue(this,Eh).set(Af(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...ue(this,Eh).values()],t={};return n.forEach(r=>{Mh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){ue(this,Nh).set(Af(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...ue(this,Nh).values()],t={};return n.forEach(r=>{Mh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...ue(this,Xc).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=v5(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===y5&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,Xc).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,Tr).clear(),ue(this,Yc).clear()}},Tr=new WeakMap,Yc=new WeakMap,Xc=new WeakMap,Eh=new WeakMap,Nh=new WeakMap,Zc=new WeakMap,zh=new WeakMap,Th=new WeakMap,WR);const rM=R.createContext(!1),sM=()=>R.useContext(rM);rM.Provider;function aG(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const oG=R.createContext(aG()),iM=()=>R.useContext(oG),aM=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?x5(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},oM=e=>{R.useEffect(()=>{e.clearReset()},[e])},lM=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||x5(t,[e.error,r])),cM=e=>{if(e.suspense){const t=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>t(r(...s)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},a4=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,uM=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function lG({queries:e,...n},t){const r=Bv(),s=sM(),i=iM(),a=n.subscribed!==!1,o=R.useMemo(()=>e.map(S=>{const b=r.defaultQueryOptions(S);return b._optimisticResults=s?"isRestoring":a?"optimistic":void 0,b}),[e,r,s,a]);o.forEach(S=>{cM(S);const b=r.getQueryCache().get(S.queryHash);aM(S,i,b)}),oM(i);const[l]=R.useState(()=>new rG(r,o,n)),[u,_,f]=l.getOptimisticResult(o,n.combine),p=!s&&a;R.useSyncExternalStore(R.useCallback(S=>p?l.subscribe(Ar.batchCalls(S)):Bs,[l,p]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),R.useEffect(()=>{l.setQueries(o,n)},[o,n,l]);const m=u.some((S,b)=>a4(o[b],S))?u.flatMap((S,b)=>{const v=o[b];if(v&&a4(v,S)){const y=new k5(r,v);return uM(v,y,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const x=u.find((S,b)=>{const v=o[b];return v&&lM({result:S,errorResetBoundary:i,throwOnError:v.throwOnError,query:r.getQueryCache().get(v.queryHash),suspense:v.suspense})});if(x)throw x.error;return _(f())}function cG(e,n,t){const r=sM(),s=iM(),i=Bv(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),l=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":l?"optimistic":void 0,cM(a),aM(a,s,o),oM(s);const[u]=R.useState(()=>new n(i,a)),_=u.getOptimisticResult(a),f=!r&&l;if(R.useSyncExternalStore(R.useCallback(p=>{const m=f?u.subscribe(Ar.batchCalls(p)):Bs;return u.updateResult(),m},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),R.useEffect(()=>{u.setOptions(a)},[a,u]),a4(a,_))throw uM(a,u,s);if(lM({result:_,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw _.error;return a.notifyOnChangeProps?_:u.trackResult(_)}function ct(e,n){return cG(e,k5)}function uG(e,n){const t=Bv(),r=t.getQueryCache();return R.useSyncExternalStore(R.useCallback(s=>r.subscribe(Ar.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function Rn(e,n){const t=Bv(),[r]=R.useState(()=>new nG(t,e));R.useEffect(()=>{r.setOptions(e)},[r,e]);const s=R.useSyncExternalStore(R.useCallback(a=>r.subscribe(Ar.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=R.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(Bs)},[r]);if(s.error&&x5(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const tt=new iG({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),ou=new Set;let e9=null,$v=0;const o4=new Set,fG=()=>$v,t9=e=>(o4.add(e),()=>{o4.delete(e)}),Ca=()=>["workspace",$v],zt=(e,...n)=>[...Ca(),e,...n];function dG(e,n=!1){if(e9===e&&!n)return!1;const t=Ca();return e9=e,$v++,ou.clear(),E5({queryKey:t}),o4.forEach(r=>r()),!0}const Hn=e=>e[1]===$v;async function E5(e){await tt.cancelQueries(e,{revert:!1}),tt.removeQueries(e)}function Ur(e,n){if(Hn(e))return tt.setQueryData(e,n)}var Yx={exports:{}},J_={},Xx={exports:{}},Zx={};/** + * @license React + * scheduler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var n9;function hG(){return n9||(n9=1,(function(e){function n(V,X){var ie=V.length;V.push(X);e:for(;0>>1,L=V[I];if(0>>1;I<$;){var q=2*(I+1)-1,G=V[q],te=q+1,fe=V[te];if(0>s(G,ie))tes(fe,G)?(V[I]=fe,V[te]=ie,I=te):(V[I]=G,V[q]=ie,I=q);else if(tes(fe,ie))V[I]=fe,V[te]=ie,I=te;else break e}}return X}function s(V,X){var ie=V.sortIndex-X.sortIndex;return ie!==0?ie:V.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],u=[],_=1,f=null,p=3,m=!1,x=!1,S=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function C(V){for(var X=t(u);X!==null;){if(X.callback===null)r(u);else if(X.startTime<=V)r(u),X.sortIndex=X.expirationTime,n(l,X);else break;X=t(u)}}function N(V){if(S=!1,C(V),!x)if(t(l)!==null)x=!0,E||(E=!0,F());else{var X=t(u);X!==null&&Y(N,X.startTime-V)}}var E=!1,j=-1,z=5,M=-1;function O(){return b?!0:!(e.unstable_now()-MV&&O());){var I=f.callback;if(typeof I=="function"){f.callback=null,p=f.priorityLevel;var L=I(f.expirationTime<=V);if(V=e.unstable_now(),typeof L=="function"){f.callback=L,C(V),X=!0;break t}f===t(l)&&r(l),C(V)}else r(l);f=t(l)}if(f!==null)X=!0;else{var $=t(u);$!==null&&Y(N,$.startTime-V),X=!1}}break e}finally{f=null,p=ie,m=!1}X=void 0}}finally{X?F():E=!1}}}var F;if(typeof w=="function")F=function(){w(B)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,H=U.port2;U.port1.onmessage=B,F=function(){H.postMessage(null)}}else F=function(){v(B,0)};function Y(V,X){j=v(function(){V(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125I?(V.sortIndex=ie,n(u,V),t(l)===null&&V===t(u)&&(S?(y(j),j=-1):S=!0,Y(N,ie-I))):(V.sortIndex=L,n(l,V),x||m||(x=!0,E||(E=!0,F()))),V},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(V){var X=p;return function(){var ie=p;p=X;try{return V.apply(this,arguments)}finally{p=ie}}}})(Zx)),Zx}var r9;function _G(){return r9||(r9=1,Xx.exports=hG()),Xx.exports}var Jx={exports:{}},Ds={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var s9;function pG(){if(s9)return Ds;s9=1;var e=Bp();function n(l){var u="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Jx.exports=pG(),Jx.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var a9;function mG(){if(a9)return J_;a9=1;var e=_G(),n=Bp(),t=fM();function r(c){var d="https://react.dev/errors/"+c;if(1L||(c.current=I[L],I[L]=null,L--)}function G(c,d){L++,I[L]=c.current,c.current=d}var te=$(null),fe=$(null),oe=$(null),ne=$(null);function Q(c,d){switch(G(oe,d),G(fe,c),G(te,null),d.nodeType){case 9:case 11:c=(c=d.documentElement)&&(c=c.namespaceURI)?l8(c):0;break;default:if(c=d.tagName,d=d.namespaceURI)d=l8(d),c=c8(d,c);else switch(c){case"svg":c=1;break;case"math":c=2;break;default:c=0}}q(te),G(te,c)}function ce(){q(te),q(fe),q(oe)}function ee(c){c.memoizedState!==null&&G(ne,c);var d=te.current,g=c8(d,c.type);d!==g&&(G(fe,c),G(te,g))}function le(c){fe.current===c&&(q(te),q(fe)),ne.current===c&&(q(ne),V_._currentValue=ie)}var he,xe;function Te(c){if(he===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);he=d&&d[1]||"",xe=-1)":-1A||pe[k]!==ke[A]){var De=` +`+pe[k].replace(" at new "," at ");return c.displayName&&De.includes("")&&(De=De.replace("",c.displayName)),De}while(1<=k&&0<=A);break}}}finally{Ze=!1,Error.prepareStackTrace=g}return(g=c?c.displayName||c.name:"")?Te(g):""}function Ie(c,d){switch(c.tag){case 26:case 27:case 5:return Te(c.type);case 16:return Te("Lazy");case 13:return c.child!==d&&d!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return Ue(c.type,!1);case 11:return Ue(c.type.render,!1);case 1:return Ue(c.type,!0);case 31:return Te("Activity");default:return""}}function vt(c){try{var d="",g=null;do d+=Ie(c,g),g=c,c=c.return;while(c);return d}catch(k){return` +Error generating stack: `+k.message+` +`+k.stack}}var bt=Object.prototype.hasOwnProperty,It=e.unstable_scheduleCallback,Bt=e.unstable_cancelCallback,Et=e.unstable_shouldYield,rt=e.unstable_requestPaint,ft=e.unstable_now,Lt=e.unstable_getCurrentPriorityLevel,we=e.unstable_ImmediatePriority,Ae=e.unstable_UserBlockingPriority,Xe=e.unstable_NormalPriority,dt=e.unstable_LowPriority,xt=e.unstable_IdlePriority,Ut=e.log,We=e.unstable_setDisableYieldValue,Ht=null,ln=null;function _n(c){if(typeof Ut=="function"&&We(c),ln&&typeof ln.setStrictMode=="function")try{ln.setStrictMode(Ht,c)}catch{}}var Yt=Math.clz32?Math.clz32:jn,Xn=Math.log,Xt=Math.LN2;function jn(c){return c>>>=0,c===0?32:31-(Xn(c)/Xt|0)|0}var or=256,lr=262144,vr=4194304;function Mn(c){var d=c&42;if(d!==0)return d;switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return c&261888;case 262144:case 524288:case 1048576:case 2097152:return c&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return c&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return c}}function Gr(c,d,g){var k=c.pendingLanes;if(k===0)return 0;var A=0,D=c.suspendedLanes,K=c.pingedLanes;c=c.warmLanes;var se=k&134217727;return se!==0?(k=se&~D,k!==0?A=Mn(k):(K&=se,K!==0?A=Mn(K):g||(g=se&~c,g!==0&&(A=Mn(g))))):(se=k&~D,se!==0?A=Mn(se):K!==0?A=Mn(K):g||(g=k&~c,g!==0&&(A=Mn(g)))),A===0?0:d!==0&&d!==A&&(d&D)===0&&(D=A&-A,g=d&-d,D>=g||D===32&&(g&4194048)!==0)?d:A}function Er(c,d){return(c.pendingLanes&~(c.suspendedLanes&~c.pingedLanes)&d)===0}function gt(c,d){switch(c){case 1:case 2:case 4:case 8:case 64:return d+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dn(){var c=vr;return vr<<=1,(vr&62914560)===0&&(vr=4194304),c}function Nn(c){for(var d=[],g=0;31>g;g++)d.push(c);return d}function Zt(c,d){c.pendingLanes|=d,d!==268435456&&(c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0)}function cr(c,d,g,k,A,D){var K=c.pendingLanes;c.pendingLanes=g,c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0,c.expiredLanes&=g,c.entangledLanes&=g,c.errorRecoveryDisabledLanes&=g,c.shellSuspendCounter=0;var se=c.entanglements,pe=c.expirationTimes,ke=c.hiddenUpdates;for(g=K&~g;0"u")return null;try{return c.activeElement||c.body}catch{return c.body}}var cs=/[\n"\\]/g;function Kn(c){return c.replace(cs,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function Wr(c,d,g,k,A,D,K,se){c.name="",K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?c.type=K:c.removeAttribute("type"),d!=null?K==="number"?(d===0&&c.value===""||c.value!=d)&&(c.value=""+Vn(d)):c.value!==""+Vn(d)&&(c.value=""+Vn(d)):K!=="submit"&&K!=="reset"||c.removeAttribute("value"),d!=null?na(c,K,Vn(d)):g!=null?na(c,K,Vn(g)):k!=null&&c.removeAttribute("value"),A==null&&D!=null&&(c.defaultChecked=!!D),A!=null&&(c.checked=A&&typeof A!="function"&&typeof A!="symbol"),se!=null&&typeof se!="function"&&typeof se!="symbol"&&typeof se!="boolean"?c.name=""+Vn(se):c.removeAttribute("name")}function $r(c,d,g,k,A,D,K,se){if(D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(c.type=D),d!=null||g!=null){if(!(D!=="submit"&&D!=="reset"||d!=null)){As(c);return}g=g!=null?""+Vn(g):"",d=d!=null?""+Vn(d):g,se||d===c.value||(c.value=d),c.defaultValue=d}k=k??A,k=typeof k!="function"&&typeof k!="symbol"&&!!k,c.checked=se?c.checked:!!k,c.defaultChecked=!!k,K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"&&(c.name=K),As(c)}function na(c,d,g){d==="number"&&Gs(c.ownerDocument)===c||c.defaultValue===""+g||(c.defaultValue=""+g)}function ci(c,d,g,k){if(c=c.options,d){d={};for(var A=0;A"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ia=!1;if(gn)try{var br={};Object.defineProperty(br,"passive",{get:function(){ia=!0}}),window.addEventListener("test",br,br),window.removeEventListener("test",br,br)}catch{ia=!1}var Kr=null,Vs=null,ro=null;function Ks(){if(ro)return ro;var c,d=Vs,g=d.length,k,A="value"in Kr?Kr.value:Kr.textContent,D=A.length;for(c=0;c=ui),ll=" ",uo=!1;function bs(c,d){switch(c){case"keyup":return v_.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cl(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var re=!1;function be(c,d){switch(c){case"compositionend":return cl(d);case"keypress":return d.which!==32?null:(uo=!0,ll);case"textInput":return c=d.data,c===ll&&uo?null:c;default:return null}}function Re(c,d){if(re)return c==="compositionend"||!Pr&&bs(c,d)?(c=Ks(),ro=Vs=Kr=null,re=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:g,offset:d-c};c=k}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=Rs(g)}}function ul(c,d){return c&&d?c===d?!0:c&&c.nodeType===3?!1:d&&d.nodeType===3?ul(c,d.parentNode):"contains"in c?c.contains(d):c.compareDocumentPosition?!!(c.compareDocumentPosition(d)&16):!1:!1}function Ma(c){c=c!=null&&c.ownerDocument!=null&&c.ownerDocument.defaultView!=null?c.ownerDocument.defaultView:window;for(var d=Gs(c.document);d instanceof c.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)c=d.contentWindow;else break;d=Gs(c.document)}return d}function ho(c){var d=c&&c.nodeName&&c.nodeName.toLowerCase();return d&&(d==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||d==="textarea"||c.contentEditable==="true")}var zn=gn&&"documentMode"in document&&11>=document.documentMode,fi=null,Da=null,zr=null,fc=!1;function _r(c,d,g){var k=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;fc||fi==null||fi!==Gs(k)||(k=fi,"selectionStart"in k&&ho(k)?k={start:k.selectionStart,end:k.selectionEnd}:(k=(k.ownerDocument&&k.ownerDocument.defaultView||window).getSelection(),k={anchorNode:k.anchorNode,anchorOffset:k.anchorOffset,focusNode:k.focusNode,focusOffset:k.focusOffset}),zr&&Qr(zr,k)||(zr=k,k=Zm(Da,"onSelect"),0>=K,A-=K,po=1<<32-Yt(d)+A|g<cn?(Sn=yt,yt=null):Sn=yt.sibling;var $n=Ce(ye,yt,Se[cn],Le);if($n===null){yt===null&&(yt=Sn);break}c&&yt&&$n.alternate===null&&d(ye,yt),ge=D($n,ge,cn),Bn===null?jt=$n:Bn.sibling=$n,Bn=$n,yt=Sn}if(cn===Se.length)return g(ye,yt),kn&&dl(ye,cn),jt;if(yt===null){for(;cncn?(Sn=yt,yt=null):Sn=yt.sibling;var Mc=Ce(ye,yt,$n.value,Le);if(Mc===null){yt===null&&(yt=Sn);break}c&&yt&&Mc.alternate===null&&d(ye,yt),ge=D(Mc,ge,cn),Bn===null?jt=Mc:Bn.sibling=Mc,Bn=Mc,yt=Sn}if($n.done)return g(ye,yt),kn&&dl(ye,cn),jt;if(yt===null){for(;!$n.done;cn++,$n=Se.next())$n=Be(ye,$n.value,Le),$n!==null&&(ge=D($n,ge,cn),Bn===null?jt=$n:Bn.sibling=$n,Bn=$n);return kn&&dl(ye,cn),jt}for(yt=k(yt);!$n.done;cn++,$n=Se.next())$n=Ne(yt,ye,cn,$n.value,Le),$n!==null&&(c&&$n.alternate!==null&&yt.delete($n.key===null?cn:$n.key),ge=D($n,ge,cn),Bn===null?jt=$n:Bn.sibling=$n,Bn=$n);return c&&yt.forEach(function(EU){return d(ye,EU)}),kn&&dl(ye,cn),jt}function tr(ye,ge,Se,Le){if(typeof Se=="object"&&Se!==null&&Se.type===S&&Se.key===null&&(Se=Se.props.children),typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case m:e:{for(var jt=Se.key;ge!==null;){if(ge.key===jt){if(jt=Se.type,jt===S){if(ge.tag===7){g(ye,ge.sibling),Le=A(ge,Se.props.children),Le.return=ye,ye=Le;break e}}else if(ge.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===z&&Pu(jt)===ge.type){g(ye,ge.sibling),Le=A(ge,Se.props),k_(Le,Se),Le.return=ye,ye=Le;break e}g(ye,ge);break}else d(ye,ge);ge=ge.sibling}Se.type===S?(Le=Lu(Se.props.children,ye.mode,Le,Se.key),Le.return=ye,ye=Le):(Le=pm(Se.type,Se.key,Se.props,null,ye.mode,Le),k_(Le,Se),Le.return=ye,ye=Le)}return K(ye);case x:e:{for(jt=Se.key;ge!==null;){if(ge.key===jt)if(ge.tag===4&&ge.stateNode.containerInfo===Se.containerInfo&&ge.stateNode.implementation===Se.implementation){g(ye,ge.sibling),Le=A(ge,Se.children||[]),Le.return=ye,ye=Le;break e}else{g(ye,ge);break}else d(ye,ge);ge=ge.sibling}Le=fy(Se,ye.mode,Le),Le.return=ye,ye=Le}return K(ye);case z:return Se=Pu(Se),tr(ye,ge,Se,Le)}if(Y(Se))return mt(ye,ge,Se,Le);if(F(Se)){if(jt=F(Se),typeof jt!="function")throw Error(r(150));return Se=jt.call(Se),Ot(ye,ge,Se,Le)}if(typeof Se.then=="function")return tr(ye,ge,wm(Se),Le);if(Se.$$typeof===w)return tr(ye,ge,vm(ye,Se),Le);Sm(ye,Se)}return typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint"?(Se=""+Se,ge!==null&&ge.tag===6?(g(ye,ge.sibling),Le=A(ge,Se),Le.return=ye,ye=Le):(g(ye,ge),Le=uy(Se,ye.mode,Le),Le.return=ye,ye=Le),K(ye)):g(ye,ge)}return function(ye,ge,Se,Le){try{S_=0;var jt=tr(ye,ge,Se,Le);return xd=null,jt}catch(yt){if(yt===yd||yt===ym)throw yt;var Bn=Ai(29,yt,null,ye.mode);return Bn.lanes=Le,Bn.return=ye,Bn}finally{}}}var Hu=Jk(!0),e7=Jk(!1),mc=!1;function Sy(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ky(c,d){c=c.updateQueue,d.updateQueue===c&&(d.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,callbacks:null})}function gc(c){return{lane:c,tag:0,payload:null,callback:null,next:null}}function vc(c,d,g){var k=c.updateQueue;if(k===null)return null;if(k=k.shared,(Fn&2)!==0){var A=k.pending;return A===null?d.next=d:(d.next=A.next,A.next=d),k.pending=d,d=_m(c),Ik(c,null,g),d}return hm(c,k,d,g),_m(c)}function C_(c,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var k=d.lanes;k&=c.pendingLanes,g|=k,d.lanes=g,An(c,g)}}function Cy(c,d){var g=c.updateQueue,k=c.alternate;if(k!==null&&(k=k.updateQueue,g===k)){var A=null,D=null;if(g=g.firstBaseUpdate,g!==null){do{var K={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};D===null?A=D=K:D=D.next=K,g=g.next}while(g!==null);D===null?A=D=d:D=D.next=d}else A=D=d;g={baseState:k.baseState,firstBaseUpdate:A,lastBaseUpdate:D,shared:k.shared,callbacks:k.callbacks},c.updateQueue=g;return}c=g.lastBaseUpdate,c===null?g.firstBaseUpdate=d:c.next=d,g.lastBaseUpdate=d}var Ey=!1;function E_(){if(Ey){var c=bd;if(c!==null)throw c}}function N_(c,d,g,k){Ey=!1;var A=c.updateQueue;mc=!1;var D=A.firstBaseUpdate,K=A.lastBaseUpdate,se=A.shared.pending;if(se!==null){A.shared.pending=null;var pe=se,ke=pe.next;pe.next=null,K===null?D=ke:K.next=ke,K=pe;var De=c.alternate;De!==null&&(De=De.updateQueue,se=De.lastBaseUpdate,se!==K&&(se===null?De.firstBaseUpdate=ke:se.next=ke,De.lastBaseUpdate=pe))}if(D!==null){var Be=A.baseState;K=0,De=ke=pe=null,se=D;do{var Ce=se.lane&-536870913,Ne=Ce!==se.lane;if(Ne?(wn&Ce)===Ce:(k&Ce)===Ce){Ce!==0&&Ce===vd&&(Ey=!0),De!==null&&(De=De.next={lane:0,tag:se.tag,payload:se.payload,callback:null,next:null});e:{var mt=c,Ot=se;Ce=d;var tr=g;switch(Ot.tag){case 1:if(mt=Ot.payload,typeof mt=="function"){Be=mt.call(tr,Be,Ce);break e}Be=mt;break e;case 3:mt.flags=mt.flags&-65537|128;case 0:if(mt=Ot.payload,Ce=typeof mt=="function"?mt.call(tr,Be,Ce):mt,Ce==null)break e;Be=f({},Be,Ce);break e;case 2:mc=!0}}Ce=se.callback,Ce!==null&&(c.flags|=64,Ne&&(c.flags|=8192),Ne=A.callbacks,Ne===null?A.callbacks=[Ce]:Ne.push(Ce))}else Ne={lane:Ce,tag:se.tag,payload:se.payload,callback:se.callback,next:null},De===null?(ke=De=Ne,pe=Be):De=De.next=Ne,K|=Ce;if(se=se.next,se===null){if(se=A.shared.pending,se===null)break;Ne=se,se=Ne.next,Ne.next=null,A.lastBaseUpdate=Ne,A.shared.pending=null}}while(!0);De===null&&(pe=Be),A.baseState=pe,A.firstBaseUpdate=ke,A.lastBaseUpdate=De,D===null&&(A.shared.lanes=0),Sc|=K,c.lanes=K,c.memoizedState=Be}}function t7(c,d){if(typeof c!="function")throw Error(r(191,c));c.call(d)}function n7(c,d){var g=c.callbacks;if(g!==null)for(c.callbacks=null,c=0;cD?D:8;var K=V.T,se={};V.T=se,Gy(c,!1,d,g);try{var pe=A(),ke=V.S;if(ke!==null&&ke(se,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var De=pq(pe,k);j_(c,d,De,Oi(c))}else j_(c,d,k,Oi(c))}catch(Be){j_(c,d,{then:function(){},status:"rejected",reason:Be},Oi())}finally{X.p=D,K!==null&&se.types!==null&&(K.types=se.types),V.T=K}}function xq(){}function qy(c,d,g,k){if(c.tag!==5)throw Error(r(476));var A=D7(c).queue;M7(c,A,d,ie,g===null?xq:function(){return L7(c),g(k)})}function D7(c){var d=c.memoizedState;if(d!==null)return d;d={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ml,lastRenderedState:ie},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ml,lastRenderedState:g},next:null},c.memoizedState=d,c=c.alternate,c!==null&&(c.memoizedState=d),d}function L7(c){var d=D7(c);d.next===null&&(d=c.alternate.memoizedState),j_(c,d.next.queue,{},Oi())}function Uy(){return ks(V_)}function O7(){return Hr().memoizedState}function I7(){return Hr().memoizedState}function wq(c){for(var d=c.return;d!==null;){switch(d.tag){case 24:case 3:var g=Oi();c=gc(g);var k=vc(d,c,g);k!==null&&(mi(k,d,g),C_(k,d,g)),d={cache:by()},c.payload=d;return}d=d.return}}function Sq(c,d,g){var k=Oi();g={lane:k,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Mm(c)?$7(d,g):(g=ly(c,d,g,k),g!==null&&(mi(g,c,k),P7(g,d,k)))}function B7(c,d,g){var k=Oi();j_(c,d,g,k)}function j_(c,d,g,k){var A={lane:k,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(Mm(c))$7(d,A);else{var D=c.alternate;if(c.lanes===0&&(D===null||D.lanes===0)&&(D=d.lastRenderedReducer,D!==null))try{var K=d.lastRenderedState,se=D(K,g);if(A.hasEagerState=!0,A.eagerState=se,xn(se,K))return hm(c,d,A,0),rr===null&&dm(),!1}catch{}finally{}if(g=ly(c,d,A,k),g!==null)return mi(g,c,k),P7(g,d,k),!0}return!1}function Gy(c,d,g,k){if(k={lane:2,revertLane:Sx(),gesture:null,action:k,hasEagerState:!1,eagerState:null,next:null},Mm(c)){if(d)throw Error(r(479))}else d=ly(c,g,k,2),d!==null&&mi(d,c,2)}function Mm(c){var d=c.alternate;return c===an||d!==null&&d===an}function $7(c,d){Sd=Em=!0;var g=c.pending;g===null?d.next=d:(d.next=g.next,g.next=d),c.pending=d}function P7(c,d,g){if((g&4194048)!==0){var k=d.lanes;k&=c.pendingLanes,g|=k,d.lanes=g,An(c,g)}}var A_={readContext:ks,use:Tm,useCallback:Lr,useContext:Lr,useEffect:Lr,useImperativeHandle:Lr,useLayoutEffect:Lr,useInsertionEffect:Lr,useMemo:Lr,useReducer:Lr,useRef:Lr,useState:Lr,useDebugValue:Lr,useDeferredValue:Lr,useTransition:Lr,useSyncExternalStore:Lr,useId:Lr,useHostTransitionStatus:Lr,useFormState:Lr,useActionState:Lr,useOptimistic:Lr,useMemoCache:Lr,useCacheRefresh:Lr};A_.useEffectEvent=Lr;var F7={readContext:ks,use:Tm,useCallback:function(c,d){return Qs().memoizedState=[c,d===void 0?null:d],c},useContext:ks,useEffect:k7,useImperativeHandle:function(c,d,g){g=g!=null?g.concat([c]):null,Am(4194308,4,z7.bind(null,d,c),g)},useLayoutEffect:function(c,d){return Am(4194308,4,c,d)},useInsertionEffect:function(c,d){Am(4,2,c,d)},useMemo:function(c,d){var g=Qs();d=d===void 0?null:d;var k=c();if(qu){_n(!0);try{c()}finally{_n(!1)}}return g.memoizedState=[k,d],k},useReducer:function(c,d,g){var k=Qs();if(g!==void 0){var A=g(d);if(qu){_n(!0);try{g(d)}finally{_n(!1)}}}else A=d;return k.memoizedState=k.baseState=A,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:A},k.queue=c,c=c.dispatch=Sq.bind(null,an,c),[k.memoizedState,c]},useRef:function(c){var d=Qs();return c={current:c},d.memoizedState=c},useState:function(c){c=By(c);var d=c.queue,g=B7.bind(null,an,d);return d.dispatch=g,[c.memoizedState,g]},useDebugValue:Fy,useDeferredValue:function(c,d){var g=Qs();return Hy(g,c,d)},useTransition:function(){var c=By(!1);return c=M7.bind(null,an,c.queue,!0,!1),Qs().memoizedState=c,[!1,c]},useSyncExternalStore:function(c,d,g){var k=an,A=Qs();if(kn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),rr===null)throw Error(r(349));(wn&127)!==0||l7(k,d,g)}A.memoizedState=g;var D={value:g,getSnapshot:d};return A.queue=D,k7(u7.bind(null,k,D,c),[c]),k.flags|=2048,Cd(9,{destroy:void 0},c7.bind(null,k,D,g,d),null),g},useId:function(){var c=Qs(),d=rr.identifierPrefix;if(kn){var g=mo,k=po;g=(k&~(1<<32-Yt(k)-1)).toString(32)+g,d="_"+d+"R_"+g,g=Nm++,0<\/script>",D=D.removeChild(D.firstChild);break;case"select":D=typeof k.is=="string"?K.createElement("select",{is:k.is}):K.createElement("select"),k.multiple?D.multiple=!0:k.size&&(D.size=k.size);break;default:D=typeof k.is=="string"?K.createElement(A,{is:k.is}):K.createElement(A)}}D[nn]=d,D[rn]=k;e:for(K=d.child;K!==null;){if(K.tag===5||K.tag===6)D.appendChild(K.stateNode);else if(K.tag!==4&&K.tag!==27&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===d)break e;for(;K.sibling===null;){if(K.return===null||K.return===d)break e;K=K.return}K.sibling.return=K.return,K=K.sibling}d.stateNode=D;e:switch(Es(D,A,k),A){case"button":case"input":case"select":case"textarea":k=!!k.autoFocus;break e;case"img":k=!0;break e;default:k=!1}k&&vl(d)}}return mr(d),ix(d,d.type,c===null?null:c.memoizedProps,d.pendingProps,g),null;case 6:if(c&&d.stateNode!=null)c.memoizedProps!==k&&vl(d);else{if(typeof k!="string"&&d.stateNode===null)throw Error(r(166));if(c=oe.current,md(d)){if(c=d.stateNode,g=d.memoizedProps,k=null,A=Ss,A!==null)switch(A.tag){case 27:case 5:k=A.memoizedProps}c[nn]=d,c=!!(c.nodeValue===g||k!==null&&k.suppressHydrationWarning===!0||a8(c.nodeValue,g)),c||_c(d,!0)}else c=Jm(c).createTextNode(k),c[nn]=d,d.stateNode=c}return mr(d),null;case 31:if(g=d.memoizedState,c===null||c.memoizedState!==null){if(k=md(d),g!==null){if(c===null){if(!k)throw Error(r(318));if(c=d.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(557));c[nn]=d}else Ou(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;mr(d),c=!1}else g=py(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=g),c=!0;if(!c)return d.flags&256?(Mi(d),d):(Mi(d),null);if((d.flags&128)!==0)throw Error(r(558))}return mr(d),null;case 13:if(k=d.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(A=md(d),k!==null&&k.dehydrated!==null){if(c===null){if(!A)throw Error(r(318));if(A=d.memoizedState,A=A!==null?A.dehydrated:null,!A)throw Error(r(317));A[nn]=d}else Ou(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;mr(d),A=!1}else A=py(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=A),A=!0;if(!A)return d.flags&256?(Mi(d),d):(Mi(d),null)}return Mi(d),(d.flags&128)!==0?(d.lanes=g,d):(g=k!==null,c=c!==null&&c.memoizedState!==null,g&&(k=d.child,A=null,k.alternate!==null&&k.alternate.memoizedState!==null&&k.alternate.memoizedState.cachePool!==null&&(A=k.alternate.memoizedState.cachePool.pool),D=null,k.memoizedState!==null&&k.memoizedState.cachePool!==null&&(D=k.memoizedState.cachePool.pool),D!==A&&(k.flags|=2048)),g!==c&&g&&(d.child.flags|=8192),Bm(d,d.updateQueue),mr(d),null);case 4:return ce(),c===null&&Nx(d.stateNode.containerInfo),mr(d),null;case 10:return _l(d.type),mr(d),null;case 19:if(q(Fr),k=d.memoizedState,k===null)return mr(d),null;if(A=(d.flags&128)!==0,D=k.rendering,D===null)if(A)M_(k,!1);else{if(Or!==0||c!==null&&(c.flags&128)!==0)for(c=d.child;c!==null;){if(D=Cm(c),D!==null){for(d.flags|=128,M_(k,!1),c=D.updateQueue,d.updateQueue=c,Bm(d,c),d.subtreeFlags=0,c=g,g=d.child;g!==null;)Bk(g,c),g=g.sibling;return G(Fr,Fr.current&1|2),kn&&dl(d,k.treeForkCount),d.child}c=c.sibling}k.tail!==null&&ft()>qm&&(d.flags|=128,A=!0,M_(k,!1),d.lanes=4194304)}else{if(!A)if(c=Cm(D),c!==null){if(d.flags|=128,A=!0,c=c.updateQueue,d.updateQueue=c,Bm(d,c),M_(k,!0),k.tail===null&&k.tailMode==="hidden"&&!D.alternate&&!kn)return mr(d),null}else 2*ft()-k.renderingStartTime>qm&&g!==536870912&&(d.flags|=128,A=!0,M_(k,!1),d.lanes=4194304);k.isBackwards?(D.sibling=d.child,d.child=D):(c=k.last,c!==null?c.sibling=D:d.child=D,k.last=D)}return k.tail!==null?(c=k.tail,k.rendering=c,k.tail=c.sibling,k.renderingStartTime=ft(),c.sibling=null,g=Fr.current,G(Fr,A?g&1|2:g&1),kn&&dl(d,k.treeForkCount),c):(mr(d),null);case 22:case 23:return Mi(d),zy(),k=d.memoizedState!==null,c!==null?c.memoizedState!==null!==k&&(d.flags|=8192):k&&(d.flags|=8192),k?(g&536870912)!==0&&(d.flags&128)===0&&(mr(d),d.subtreeFlags&6&&(d.flags|=8192)):mr(d),g=d.updateQueue,g!==null&&Bm(d,g.retryQueue),g=null,c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),k=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(k=d.memoizedState.cachePool.pool),k!==g&&(d.flags|=2048),c!==null&&q($u),null;case 24:return g=null,c!==null&&(g=c.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),_l(Yr),mr(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function zq(c,d){switch(hy(d),d.tag){case 1:return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 3:return _l(Yr),ce(),c=d.flags,(c&65536)!==0&&(c&128)===0?(d.flags=c&-65537|128,d):null;case 26:case 27:case 5:return le(d),null;case 31:if(d.memoizedState!==null){if(Mi(d),d.alternate===null)throw Error(r(340));Ou()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 13:if(Mi(d),c=d.memoizedState,c!==null&&c.dehydrated!==null){if(d.alternate===null)throw Error(r(340));Ou()}return c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 19:return q(Fr),null;case 4:return ce(),null;case 10:return _l(d.type),null;case 22:case 23:return Mi(d),zy(),c!==null&&q($u),c=d.flags,c&65536?(d.flags=c&-65537|128,d):null;case 24:return _l(Yr),null;case 25:return null;default:return null}}function fC(c,d){switch(hy(d),d.tag){case 3:_l(Yr),ce();break;case 26:case 27:case 5:le(d);break;case 4:ce();break;case 31:d.memoizedState!==null&&Mi(d);break;case 13:Mi(d);break;case 19:q(Fr);break;case 10:_l(d.type);break;case 22:case 23:Mi(d),zy(),c!==null&&q($u);break;case 24:_l(Yr)}}function D_(c,d){try{var g=d.updateQueue,k=g!==null?g.lastEffect:null;if(k!==null){var A=k.next;g=A;do{if((g.tag&c)===c){k=void 0;var D=g.create,K=g.inst;k=D(),K.destroy=k}g=g.next}while(g!==A)}}catch(se){Yn(d,d.return,se)}}function xc(c,d,g){try{var k=d.updateQueue,A=k!==null?k.lastEffect:null;if(A!==null){var D=A.next;k=D;do{if((k.tag&c)===c){var K=k.inst,se=K.destroy;if(se!==void 0){K.destroy=void 0,A=d;var pe=g,ke=se;try{ke()}catch(De){Yn(A,pe,De)}}}k=k.next}while(k!==D)}}catch(De){Yn(d,d.return,De)}}function dC(c){var d=c.updateQueue;if(d!==null){var g=c.stateNode;try{n7(d,g)}catch(k){Yn(c,c.return,k)}}}function hC(c,d,g){g.props=Uu(c.type,c.memoizedProps),g.state=c.memoizedState;try{g.componentWillUnmount()}catch(k){Yn(c,d,k)}}function L_(c,d){try{var g=c.ref;if(g!==null){switch(c.tag){case 26:case 27:case 5:var k=c.stateNode;break;case 30:k=c.stateNode;break;default:k=c.stateNode}typeof g=="function"?c.refCleanup=g(k):g.current=k}}catch(A){Yn(c,d,A)}}function go(c,d){var g=c.ref,k=c.refCleanup;if(g!==null)if(typeof k=="function")try{k()}catch(A){Yn(c,d,A)}finally{c.refCleanup=null,c=c.alternate,c!=null&&(c.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(A){Yn(c,d,A)}else g.current=null}function _C(c){var d=c.type,g=c.memoizedProps,k=c.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":g.autoFocus&&k.focus();break e;case"img":g.src?k.src=g.src:g.srcSet&&(k.srcset=g.srcSet)}}catch(A){Yn(c,c.return,A)}}function ax(c,d,g){try{var k=c.stateNode;Yq(k,c.type,g,d),k[rn]=d}catch(A){Yn(c,c.return,A)}}function pC(c){return c.tag===5||c.tag===3||c.tag===26||c.tag===27&&zc(c.type)||c.tag===4}function ox(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||pC(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.tag===27&&zc(c.type)||c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function lx(c,d,g){var k=c.tag;if(k===5||k===6)c=c.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(c,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(c),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=Vr));else if(k!==4&&(k===27&&zc(c.type)&&(g=c.stateNode,d=null),c=c.child,c!==null))for(lx(c,d,g),c=c.sibling;c!==null;)lx(c,d,g),c=c.sibling}function $m(c,d,g){var k=c.tag;if(k===5||k===6)c=c.stateNode,d?g.insertBefore(c,d):g.appendChild(c);else if(k!==4&&(k===27&&zc(c.type)&&(g=c.stateNode),c=c.child,c!==null))for($m(c,d,g),c=c.sibling;c!==null;)$m(c,d,g),c=c.sibling}function mC(c){var d=c.stateNode,g=c.memoizedProps;try{for(var k=c.type,A=d.attributes;A.length;)d.removeAttributeNode(A[0]);Es(d,k,g),d[nn]=c,d[rn]=g}catch(D){Yn(c,c.return,D)}}var bl=!1,Jr=!1,cx=!1,gC=typeof WeakSet=="function"?WeakSet:Set,ys=null;function Tq(c,d){if(c=c.containerInfo,jx=ag,c=Ma(c),ho(c)){if("selectionStart"in c)var g={start:c.selectionStart,end:c.selectionEnd};else e:{g=(g=c.ownerDocument)&&g.defaultView||window;var k=g.getSelection&&g.getSelection();if(k&&k.rangeCount!==0){g=k.anchorNode;var A=k.anchorOffset,D=k.focusNode;k=k.focusOffset;try{g.nodeType,D.nodeType}catch{g=null;break e}var K=0,se=-1,pe=-1,ke=0,De=0,Be=c,Ce=null;t:for(;;){for(var Ne;Be!==g||A!==0&&Be.nodeType!==3||(se=K+A),Be!==D||k!==0&&Be.nodeType!==3||(pe=K+k),Be.nodeType===3&&(K+=Be.nodeValue.length),(Ne=Be.firstChild)!==null;)Ce=Be,Be=Ne;for(;;){if(Be===c)break t;if(Ce===g&&++ke===A&&(se=K),Ce===D&&++De===k&&(pe=K),(Ne=Be.nextSibling)!==null)break;Be=Ce,Ce=Be.parentNode}Be=Ne}g=se===-1||pe===-1?null:{start:se,end:pe}}else g=null}g=g||{start:0,end:0}}else g=null;for(Ax={focusedElem:c,selectionRange:g},ag=!1,ys=d;ys!==null;)if(d=ys,c=d.child,(d.subtreeFlags&1028)!==0&&c!==null)c.return=d,ys=c;else for(;ys!==null;){switch(d=ys,D=d.alternate,c=d.flags,d.tag){case 0:if((c&4)!==0&&(c=d.updateQueue,c=c!==null?c.events:null,c!==null))for(g=0;g title"))),Es(D,k,g),D[nn]=c,Ve(D),k=D;break e;case"link":var K=S8("link","href",A).get(k+(g.href||""));if(K){for(var se=0;setr&&(K=tr,tr=Ot,Ot=K);var ye=ji(se,Ot),ge=ji(se,tr);if(ye&&ge&&(Ne.rangeCount!==1||Ne.anchorNode!==ye.node||Ne.anchorOffset!==ye.offset||Ne.focusNode!==ge.node||Ne.focusOffset!==ge.offset)){var Se=Be.createRange();Se.setStart(ye.node,ye.offset),Ne.removeAllRanges(),Ot>tr?(Ne.addRange(Se),Ne.extend(ge.node,ge.offset)):(Se.setEnd(ge.node,ge.offset),Ne.addRange(Se))}}}}for(Be=[],Ne=se;Ne=Ne.parentNode;)Ne.nodeType===1&&Be.push({element:Ne,left:Ne.scrollLeft,top:Ne.scrollTop});for(typeof se.focus=="function"&&se.focus(),se=0;seg?32:g,V.T=null,g=mx,mx=null;var D=Cc,K=kl;if(ds=0,jd=Cc=null,kl=0,(Fn&6)!==0)throw Error(r(331));var se=Fn;if(Fn|=4,zC(D.current),CC(D,D.current,K,g),Fn=se,F_(0,!1),ln&&typeof ln.onPostCommitFiberRoot=="function")try{ln.onPostCommitFiberRoot(Ht,D)}catch{}return!0}finally{X.p=A,V.T=k,WC(c,d)}}function KC(c,d,g){d=ua(g,d),d=Qy(c.stateNode,d,2),c=vc(c,d,2),c!==null&&(Zt(c,2),vo(c))}function Yn(c,d,g){if(c.tag===3)KC(c,c,g);else for(;d!==null;){if(d.tag===3){KC(d,c,g);break}else if(d.tag===1){var k=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof k.componentDidCatch=="function"&&(kc===null||!kc.has(k))){c=ua(g,c),g=Q7(2),k=vc(d,g,2),k!==null&&(Y7(g,k,d,c),Zt(k,2),vo(k));break}}d=d.return}}function yx(c,d,g){var k=c.pingCache;if(k===null){k=c.pingCache=new Rq;var A=new Set;k.set(d,A)}else A=k.get(d),A===void 0&&(A=new Set,k.set(d,A));A.has(g)||(dx=!0,A.add(g),c=Iq.bind(null,c,d,g),d.then(c,c))}function Iq(c,d,g){var k=c.pingCache;k!==null&&k.delete(d),c.pingedLanes|=c.suspendedLanes&g,c.warmLanes&=~g,rr===c&&(wn&g)===g&&(Or===4||Or===3&&(wn&62914560)===wn&&300>ft()-Hm?(Fn&2)===0&&Ad(c,0):hx|=g,Td===wn&&(Td=0)),vo(c)}function QC(c,d){d===0&&(d=dn()),c=Du(c,d),c!==null&&(Zt(c,d),vo(c))}function Bq(c){var d=c.memoizedState,g=0;d!==null&&(g=d.retryLane),QC(c,g)}function $q(c,d){var g=0;switch(c.tag){case 31:case 13:var k=c.stateNode,A=c.memoizedState;A!==null&&(g=A.retryLane);break;case 19:k=c.stateNode;break;case 22:k=c.stateNode._retryCache;break;default:throw Error(r(314))}k!==null&&k.delete(d),QC(c,g)}function Pq(c,d){return It(c,d)}var Qm=null,Md=null,xx=!1,Ym=!1,wx=!1,Nc=0;function vo(c){c!==Md&&c.next===null&&(Md===null?Qm=Md=c:Md=Md.next=c),Ym=!0,xx||(xx=!0,Hq())}function F_(c,d){if(!wx&&Ym){wx=!0;do for(var g=!1,k=Qm;k!==null;){if(c!==0){var A=k.pendingLanes;if(A===0)var D=0;else{var K=k.suspendedLanes,se=k.pingedLanes;D=(1<<31-Yt(42|c)+1)-1,D&=A&~(K&~se),D=D&201326741?D&201326741|1:D?D|2:0}D!==0&&(g=!0,JC(k,D))}else D=wn,D=Gr(k,k===rr?D:0,k.cancelPendingCommit!==null||k.timeoutHandle!==-1),(D&3)===0||Er(k,D)||(g=!0,JC(k,D));k=k.next}while(g);wx=!1}}function Fq(){YC()}function YC(){Ym=xx=!1;var c=0;Nc!==0&&Zq()&&(c=Nc);for(var d=ft(),g=null,k=Qm;k!==null;){var A=k.next,D=XC(k,d);D===0?(k.next=null,g===null?Qm=A:g.next=A,A===null&&(Md=g)):(g=k,(c!==0||(D&3)!==0)&&(Ym=!0)),k=A}ds!==0&&ds!==5||F_(c),Nc!==0&&(Nc=0)}function XC(c,d){for(var g=c.suspendedLanes,k=c.pingedLanes,A=c.expirationTimes,D=c.pendingLanes&-62914561;0se)break;var De=pe.transferSize,Be=pe.initiatorType;De&&o8(Be)&&(pe=pe.responseEnd,K+=De*(pe"u"?null:document;function b8(c,d,g){var k=Dd;if(k&&typeof d=="string"&&d){var A=Kn(d);A='link[rel="'+c+'"][href="'+A+'"]',typeof g=="string"&&(A+='[crossorigin="'+g+'"]'),v8.has(A)||(v8.add(A),c={rel:c,crossOrigin:g,href:d},k.querySelector(A)===null&&(d=k.createElement("link"),Es(d,"link",c),Ve(d),k.head.appendChild(d)))}}function oU(c){Cl.D(c),b8("dns-prefetch",c,null)}function lU(c,d){Cl.C(c,d),b8("preconnect",c,d)}function cU(c,d,g){Cl.L(c,d,g);var k=Dd;if(k&&c&&d){var A='link[rel="preload"][as="'+Kn(d)+'"]';d==="image"&&g&&g.imageSrcSet?(A+='[imagesrcset="'+Kn(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(A+='[imagesizes="'+Kn(g.imageSizes)+'"]')):A+='[href="'+Kn(c)+'"]';var D=A;switch(d){case"style":D=Ld(c);break;case"script":D=Od(c)}ma.has(D)||(c=f({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:c,as:d},g),ma.set(D,c),k.querySelector(A)!==null||d==="style"&&k.querySelector(G_(D))||d==="script"&&k.querySelector(W_(D))||(d=k.createElement("link"),Es(d,"link",c),Ve(d),k.head.appendChild(d)))}}function uU(c,d){Cl.m(c,d);var g=Dd;if(g&&c){var k=d&&typeof d.as=="string"?d.as:"script",A='link[rel="modulepreload"][as="'+Kn(k)+'"][href="'+Kn(c)+'"]',D=A;switch(k){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":D=Od(c)}if(!ma.has(D)&&(c=f({rel:"modulepreload",href:c},d),ma.set(D,c),g.querySelector(A)===null)){switch(k){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(W_(D)))return}k=g.createElement("link"),Es(k,"link",c),Ve(k),g.head.appendChild(k)}}}function fU(c,d,g){Cl.S(c,d,g);var k=Dd;if(k&&c){var A=Pn(k).hoistableStyles,D=Ld(c);d=d||"default";var K=A.get(D);if(!K){var se={loading:0,preload:null};if(K=k.querySelector(G_(D)))se.loading=5;else{c=f({rel:"stylesheet",href:c,"data-precedence":d},g),(g=ma.get(D))&&Bx(c,g);var pe=K=k.createElement("link");Ve(pe),Es(pe,"link",c),pe._p=new Promise(function(ke,De){pe.onload=ke,pe.onerror=De}),pe.addEventListener("load",function(){se.loading|=1}),pe.addEventListener("error",function(){se.loading|=2}),se.loading|=4,tg(K,d,k)}K={type:"stylesheet",instance:K,count:1,state:se},A.set(D,K)}}}function dU(c,d){Cl.X(c,d);var g=Dd;if(g&&c){var k=Pn(g).hoistableScripts,A=Od(c),D=k.get(A);D||(D=g.querySelector(W_(A)),D||(c=f({src:c,async:!0},d),(d=ma.get(A))&&$x(c,d),D=g.createElement("script"),Ve(D),Es(D,"link",c),g.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},k.set(A,D))}}function hU(c,d){Cl.M(c,d);var g=Dd;if(g&&c){var k=Pn(g).hoistableScripts,A=Od(c),D=k.get(A);D||(D=g.querySelector(W_(A)),D||(c=f({src:c,async:!0,type:"module"},d),(d=ma.get(A))&&$x(c,d),D=g.createElement("script"),Ve(D),Es(D,"link",c),g.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},k.set(A,D))}}function y8(c,d,g,k){var A=(A=oe.current)?eg(A):null;if(!A)throw Error(r(446));switch(c){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(d=Ld(g.href),g=Pn(A).hoistableStyles,k=g.get(d),k||(k={type:"style",instance:null,count:0,state:null},g.set(d,k)),k):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){c=Ld(g.href);var D=Pn(A).hoistableStyles,K=D.get(c);if(K||(A=A.ownerDocument||A,K={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},D.set(c,K),(D=A.querySelector(G_(c)))&&!D._p&&(K.instance=D,K.state.loading=5),ma.has(c)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},ma.set(c,g),D||_U(A,c,g,K.state))),d&&k===null)throw Error(r(528,""));return K}if(d&&k!==null)throw Error(r(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=Od(g),g=Pn(A).hoistableScripts,k=g.get(d),k||(k={type:"script",instance:null,count:0,state:null},g.set(d,k)),k):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,c))}}function Ld(c){return'href="'+Kn(c)+'"'}function G_(c){return'link[rel="stylesheet"]['+c+"]"}function x8(c){return f({},c,{"data-precedence":c.precedence,precedence:null})}function _U(c,d,g,k){c.querySelector('link[rel="preload"][as="style"]['+d+"]")?k.loading=1:(d=c.createElement("link"),k.preload=d,d.addEventListener("load",function(){return k.loading|=1}),d.addEventListener("error",function(){return k.loading|=2}),Es(d,"link",g),Ve(d),c.head.appendChild(d))}function Od(c){return'[src="'+Kn(c)+'"]'}function W_(c){return"script[async]"+c}function w8(c,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var k=c.querySelector('style[data-href~="'+Kn(g.href)+'"]');if(k)return d.instance=k,Ve(k),k;var A=f({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return k=(c.ownerDocument||c).createElement("style"),Ve(k),Es(k,"style",A),tg(k,g.precedence,c),d.instance=k;case"stylesheet":A=Ld(g.href);var D=c.querySelector(G_(A));if(D)return d.state.loading|=4,d.instance=D,Ve(D),D;k=x8(g),(A=ma.get(A))&&Bx(k,A),D=(c.ownerDocument||c).createElement("link"),Ve(D);var K=D;return K._p=new Promise(function(se,pe){K.onload=se,K.onerror=pe}),Es(D,"link",k),d.state.loading|=4,tg(D,g.precedence,c),d.instance=D;case"script":return D=Od(g.src),(A=c.querySelector(W_(D)))?(d.instance=A,Ve(A),A):(k=g,(A=ma.get(D))&&(k=f({},g),$x(k,A)),c=c.ownerDocument||c,A=c.createElement("script"),Ve(A),Es(A,"link",k),c.head.appendChild(A),d.instance=A);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(k=d.instance,d.state.loading|=4,tg(k,g.precedence,c));return d.instance}function tg(c,d,g){for(var k=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),A=k.length?k[k.length-1]:null,D=A,K=0;K title"):null)}function pU(c,d,g){if(g===1||d.itemProp!=null)return!1;switch(c){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return c=d.disabled,typeof d.precedence=="string"&&c==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function C8(c){return!(c.type==="stylesheet"&&(c.state.loading&3)===0)}function mU(c,d,g,k){if(g.type==="stylesheet"&&(typeof k.media!="string"||matchMedia(k.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var A=Ld(k.href),D=d.querySelector(G_(A));if(D){d=D._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(c.count++,c=rg.bind(c),d.then(c,c)),g.state.loading|=4,g.instance=D,Ve(D);return}D=d.ownerDocument||d,k=x8(k),(A=ma.get(A))&&Bx(k,A),D=D.createElement("link"),Ve(D);var K=D;K._p=new Promise(function(se,pe){K.onload=se,K.onerror=pe}),Es(D,"link",k),g.instance=D}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(c.count++,g=rg.bind(c),d.addEventListener("load",g),d.addEventListener("error",g))}}var Px=0;function gU(c,d){return c.stylesheets&&c.count===0&&ig(c,c.stylesheets),0Px?50:800)+d);return c.unsuspend=g,function(){c.unsuspend=null,clearTimeout(k),clearTimeout(A)}}:null}function rg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ig(this,this.stylesheets);else if(this.unsuspend){var c=this.unsuspend;this.unsuspend=null,c()}}}var sg=null;function ig(c,d){c.stylesheets=null,c.unsuspend!==null&&(c.count++,sg=new Map,d.forEach(vU,c),sg=null,rg.call(c))}function vU(c,d){if(!(d.state.loading&4)){var g=sg.get(c);if(g)var k=g.get(null);else{g=new Map,sg.set(c,g);for(var A=c.querySelectorAll("link[data-precedence],style[data-precedence]"),D=0;D"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Yx.exports=mG(),Yx.exports}var vG=gG();const bG=!1;var dM=R.useLayoutEffect;function yG(e,n,t){R.useEffect(()=>{if(!e.current||t||typeof IntersectionObserver!="function")return()=>n();const r=new IntersectionObserver(s=>{n(s.pop())},{rootMargin:"100px"});return r.observe(e.current),()=>{r.disconnect(),n()}},[n,t,e])}function xG(e){const n=R.useRef(null);return R.useImperativeHandle(e,()=>n.current,[]),n}function P0(e){return e[e.length-1]}function Dh(e,n){return typeof e=="function"?e(n):e}const hM=Object.prototype.hasOwnProperty,wG=Object.prototype.propertyIsEnumerable;function _M(e){for(const n in e)if(hM.call(e,n))return!0;return!1}const SG=()=>Object.create(null),Vu=(e,n)=>lf(e,n,SG);function lf(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=u9(e)&&u9(s);if(!i&&!(L1(e)&&L1(s)))return s;const a=i?e:l9(e);if(!a)return s;const o=i?s:l9(s);if(!o)return s;const l=a.length,u=o.length,_=i?new Array(u):t();let f=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!c9(t)||!t.hasOwnProperty("isPrototypeOf"))}function c9(e){return Object.prototype.toString.call(e)==="[object Object]"}function u9(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ru(e,n,t){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let r=0,s=e.length;rs||!ru(e[a],n[a],t)))return!1;return s===i}return!1}const kG=/[\x00-\x1f\x7f"<>`{}]/g;function CG(e){return e.replace(kG,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function f9(e){let n;try{n=decodeURI(e)}catch{n=e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}return CG(n)}const EG=["http:","https:","mailto:","tel:"];function O1(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function e0(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const n=/%25|%5C/gi;let t=0,r="",s;for(;(s=n.exec(e))!==null;)r+=f9(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+f9(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function NG(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function zG(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,t=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const a=n.get(i);if(a)return s(a),a.value},set(i,a){if(n.size>=e&&t){const l=t;n.delete(l.key),l.next&&(t=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const o=n.get(i);if(o)o.value=a,s(o);else{const l={key:i,value:a,prev:r};r&&(r.next=l),r=l,t||(t=l),n.set(i,l)}},clear(){n.clear(),t=void 0,r=void 0}}}const eu=4,pM=5;function mM(e,n,t=new Uint16Array(6)){const r=e.indexOf("/",n),s=r===-1?e.length:r,i=e.substring(n,s);if(!i||!i.includes("$"))return t[0]=0,t[1]=n,t[2]=n,t[3]=s,t[4]=s,t[5]=s,t;if(i==="$"){const l=e.length;return t[0]=2,t[1]=n,t[2]=n,t[3]=l,t[4]=l,t[5]=l,t}if(i.charCodeAt(0)===36)return t[0]=1,t[1]=n,t[2]=n+1,t[3]=s,t[4]=s,t[5]=s,t;const a=i.indexOf("{");let o;if(a!==-1&&a+1!B.parse&&B.caseSensitive===z&&B.prefix===E&&B.suffix===j));if(O)y=O;else{const B=TG(N,f,z,E,j);y=B,B.parent=s,B.depth=i;let F;N===1?F=s.dynamic??(s.dynamic=[]):N===3?F=s.optional??(s.optional=[]):F=s.wildcard??(s.wildcard=[]),F.push(B),F.length===2&&(a==null||a.push(F))}break}}s=y}if(S&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const v=sh(f);v.kind=pM,v.parent=s,i++,v.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(v),s=v}const b=(t.path||!t.children)&&!t.isRoot;if(b&&f.endsWith("/")){const v=sh(f);v.kind=eu,v.parent=s,i++,v.depth=i,s.index=v,s=v}s.parse=S??null,s.priority=((_=p==null?void 0:p.params)==null?void 0:_.priority)??0,b&&!s.route&&(s.route=t,s.fullPath=f)}if(t.children)for(const f of t.children)Pv(e,n,f,l,s,i,a,o)}function gM(e,n){if(e.parse&&!n.parse)return-1;if(!e.parse&&n.parse)return 1;if(e.parse&&n.parse&&(e.priority||n.priority))return n.priority-e.priority;if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function sh(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function TG(e,n,t,r,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0,caseSensitive:t,prefix:r,suffix:s}}function jG(e,n){const t=sh("/"),r=new Uint16Array(6),s=[];for(const i of e)Pv(!1,r,i,1,t,0,s);for(const i of s)i.sort(gM);n.masksTree=t,n.flatCache=I1(1e3)}function AG(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=z5(e,n.masksTree);return n.flatCache.set(e,r),r}function RG(e,n,t,r,s){e||(e="/"),r||(r="/");const i=n?`case\0${e}`:e;let a=s.singleCache.get(i);return a||(a=sh("/"),Pv(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),z5(r,a,t)}function MG(e,n,t=!1){const r=t?e:`nofuzz\0${e}`,s=n.matchCache.get(r);if(s!==void 0)return s;e||(e="/");let i;try{i=z5(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=bM(i.route)),n.matchCache.set(r,i),i}function DG(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function LG(e,n=!1,t){const r=sh(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let l=0;Pv(n,s,e,1,r,0,i,u=>{if(t==null||t(u,l),u.id in a&&N5(),a[u.id]=u,l!==0&&u.path){const _=DG(u.fullPath);(!o[_]||u.fullPath.endsWith("/"))&&(o[_]=u)}l++});for(const u of i)u.sort(gM);return{processedTree:{segmentTree:r,singleCache:I1(1e3),matchCache:I1(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function z5(e,n,t=!1){const r=e.split("/"),s=IG(e,r,n,t);if(!s)return null;const[i]=vM(e,r,s);return{route:s.node.route,rawParams:i}}function vM(e,n,t){var _,f,p,m;const r=OG(t.node);let s=null;const i=Object.create(null);let a=((_=t.extract)==null?void 0:_.part)??0,o=((f=t.extract)==null?void 0:f.node)??0,l=((p=t.extract)==null?void 0:p.path)??0,u=((m=t.extract)==null?void 0:m.segment)??0;for(;o=0;E--){const j=f.wildcard[E],{prefix:z,suffix:M}=j;if(!(z&&(w||!(j.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(z)))){if(M){if(w)continue;const O=n.slice(p).join("/"),B=O.slice(-M.length);if((j.caseSensitive?B:B.toLowerCase())!==M||O.length-M.length=0;j--){const z=f.optional[j];o.push({node:z,index:p,skipped:E,statics:x,dynamics:S,optionals:b,extract:v,rawParams:y})}if(!w)for(let j=f.optional.length-1;j>=0;j--){const z=f.optional[j],{prefix:M,suffix:O}=z;if(M||O){const B=z.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!B.startsWith(M)||O&&B.indexOf(O,B.length-O.length)=0;E--){const j=f.dynamic[E],{prefix:z,suffix:M}=j;if(z||M){const O=j.caseSensitive?C:N??(N=C.toLowerCase());if(z&&!O.startsWith(z)||M&&O.indexOf(M,O.length-M.length)=0;E--){const j=f.pathless[E];o.push({node:j,index:p,skipped:m,statics:x,dynamics:S,optionals:b,extract:v,rawParams:y})}}if(u)return u;if(r&&l){let _=l.index;for(let p=0;pe.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&(n.optionals>e.optionals||n.optionals===e.optionals&&((n.node.kind===eu)>(e.node.kind===eu)||n.node.kind===eu==(e.node.kind===eu)&&n.node.depth>e.node.depth))):!0}function c1(e){return u1(e.filter(n=>n!==void 0).join("/"))}function u1(e){return e.replace(/\/{2,}/g,"/")}function yM(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function $l(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function xM(e){return $l(yM(e))}function B1(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function $G(e,n,t){return B1(e,t)===B1(n,t)}function PG({base:e,to:n,trailingSlash:t="never",cache:r}){if(n.includes("//")&&(n=u1(n)),n.startsWith("/"))return n.length===1||t==="preserve"?n:t==="always"?n.endsWith("/")?n:`${n}/`:n.endsWith("/")?n.slice(0,-1):n;const s=n===".";let i;if(r){i=s?e:e+"\0"+n;const u=r.get(i);if(u)return u}let a;if(s)a=e.split("/");else{for(e.includes("//")&&(e=u1(e)),a=e.split("/");a.length>1&&P0(a)==="";)a.pop();const u=n.split("/");for(let _=0,f=u.length;_1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(P0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),l=(s?u1(o):o)||"/";return i&&r&&r.set(i,l),l}function FG(e){const n=new Map(e.map(s=>[encodeURIComponent(s),s])),t=Array.from(n.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(t,"g");return s=>s.replace(r,i=>n.get(i)??i)}function e2(e,n,t){const r=n[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>_9(s,t)).join("/"):_9(r,t)}function h9({path:e,params:n,decoder:t,...r}){let s=!1;const i=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:s};const a=e.length;let o=0,l,u="";for(;oe.state.__TSR_key||e.href;function KG(e){const n=e.getAttribute(p9);if(n)return`[${p9}="${n}"]`;let t="",r=e,s;for(;s=r.parentNode;){let i=1,a=r;for(;a=a.previousElementSibling;)i++;const o=`${r.localName}:nth-child(${i})`;t=t?`${o} > ${t}`:o,r=s}return t}let mg=!1;const f1="window";function l4(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function m9(e){const n=new Set;for(const t of e){if(t===f1)continue;const r=l4(t);r&&n.add(r)}return n}function QG(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||VG,i=new Set,a=o=>{const l=Hc[o]||(Hc[o]={});for(const u of i)u===document?l[f1]={scrollX,scrollY}:u.isConnected&&(l[KG(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,mg=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{mg||i.add(o.target)},!0),e.subscribe("onBeforeLoad",o=>{o.fromLocation&&a(s(o.fromLocation)),i.clear()}),addEventListener("pagehide",()=>{a(s(e.stores.resolvedLocation.get()??e.stores.location.get())),WG()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var S;const l=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,_=r.next,f=r.hash;let p;if(i.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=s(o.toLocation),x=o.fromLocation&&s(o.fromLocation);if(r.restoring&&x&&x!==m){const b=Hc[x];if(b){let v=Hc[m];for(const y in b){if(y===f1){if(_)continue}else{const w=l4(y);if(!w||_&&u&&(p??(p=m9(u)),p.has(w)))continue}v||(v=Hc[m]={}),v[y]??(v[y]=b[y])}}}mg=!0;try{const b=o.toLocation.hash,v=o.toLocation.state.__hashScrollIntoViewOptions??!0;let y=!1;if(_){!b&&u&&(p??(p=m9(u)));const w=b&&v&&f,C=r.restoring?Hc[m]:void 0;if(C)for(const N in C){const{scrollX:E,scrollY:j}=C[N];if(N===f1){if(w)continue;scrollTo({top:j,left:E,behavior:l}),y=!0}else{const z=l4(N);z&&(z.scrollLeft=E,z.scrollTop=j,p==null||p.delete(z))}}if(!b){const N={top:0,left:0,behavior:l};if(y||scrollTo(N),p)for(const E of p)E.scrollTo(N)}}!y&&b&&v&&((S=document.getElementById(b))==null||S.scrollIntoView(v))}finally{mg=!1}}))}function YG(e,n=String){const t=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&t.set(r,n(s))}return t.toString()}function t2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function XG(e){const n=new URLSearchParams(e),t=Object.create(null);for(const[r,s]of n.entries()){const i=t[r];i==null?t[r]=t2(s):Array.isArray(i)?i.push(t2(s)):t[r]=[i,t2(s)]}return t}const ZG=/^(?:\s|["[{\d-]|fa|nu|tr)/,JG=tW(JSON.parse),eW=nW(JSON.stringify,JSON.parse);function tW(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=XG(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function nW(e,n){const t=n===JSON.parse;function r(s){if(s&&typeof s=="object")try{return e(s)}catch{}else if(n&&typeof s=="string"){if(t&&!ZG.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=YG(s,r);return i?`?${i}`:""}}const ah="__root__";function rW(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:n});if(t.options=e,e.throw)throw t;return t}function wM(e){return e instanceof Response&&!!e.options}function sW(e){return{input:({url:n})=>{for(const t of e)n=c4(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=SM(e[t],n);return n}}}function iW(e){const n=xM(e.basepath),t=`/${n}`,r=e.caseSensitive?t:t.toLowerCase(),s=`${r}/`;return{input:({url:i})=>{const a=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return a===r?i.pathname="/":a.startsWith(s)&&(i.pathname=i.pathname.slice(t.length)),i},output:({url:i})=>(i.pathname=c1(["/",n,i.pathname]),i)}}function c4(e,n){var r;const t=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function SM(e,n){var r;const t=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function aW(e,n){const{createMutableStore:t,createReadonlyStore:r,batch:s}=n,i=new Map,a=t("idle"),o=t(e),l=t(void 0),u=t([]),_=r(()=>u.get().map(S=>i.get(S).get())),f=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:_.get(),location:o.get(),resolvedLocation:l.get()}));function p(S){let b=i.get(S);return b||(b=t(void 0),i.set(S,b)),b}const m={status:a,location:o,resolvedLocation:l,ids:u,matches:_,byRoute:i,__store:f,getMatchStore:p,setMatches:x};function x(S){const b=u.get(),v=S.map(y=>y.routeId);s(()=>{zG(b,v)||u.set(v);for(const y of b)v.includes(y)||i.get(y).set(()=>{});for(const y of S){const w=p(y.routeId);w.get()!==y&&w.set(y)}})}return m}var su="__TSR_index",g9="popstate",v9="beforeunload";function oW(e){let n=e.getLocation();const t=new Set,r=a=>{n=e.getLocation(),t.forEach(o=>o({location:n,action:a}))},s=a=>{e.notifyOnIndexChange??!0?r(a):n=e.getLocation()},i=async({task:a,navigateOpts:o,...l})=>{var f,p;if((o==null?void 0:o.ignoreBlocker)??!1){a();return}const u=((f=e.getBlockers)==null?void 0:f.call(e))??[],_=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&_)for(const m of u){const x=$1(l.path,l.state);if(await m.blockerFn({currentLocation:n,nextLocation:x,action:l.type})){(p=e.onBlocked)==null||p.call(e);return}}a()};return{get location(){return n},get length(){return e.getLength()},subscribers:t,subscribe:a=>(t.add(a),()=>{t.delete(a)}),push:(a,o,l)=>{const u=n.state[su];o=b9(u+1,o),i({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:a,state:o})},replace:(a,o,l)=>{const u=n.state[su];o=b9(u,o),i({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:a,state:o})},go:(a,o)=>{i({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{i({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>n.state[su]!==0,createHref:a=>e.createHref(a),block:a=>{var l;if(!e.setBlockers)return()=>{};const o=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...o,a]),()=>{var _,f;const u=((_=e.getBlockers)==null?void 0:_.call(e))??[];(f=e.setBlockers)==null||f.call(e,u.filter(p=>p!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:r}}function b9(e,n){n||(n={});const t=T5();return{...n,key:t,__TSR_key:t,[su]:e}}function lW(e){var j,z;const n=typeof document<"u"?window:void 0,t=n.history.pushState,r=n.history.replaceState;let s=[];const i=()=>s,a=M=>s=M,o=(M=>M),l=(()=>$1(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((j=n.history.state)!=null&&j.__TSR_key)&&!((z=n.history.state)!=null&&z.key)){const M=T5();n.history.replaceState({[su]:0,key:M,__TSR_key:M},"")}let u=l(),_,f=!1,p=!1,m=!1,x=!1;const S=()=>u;let b;const v=()=>{b&&(E._ignoreSubscribers=!0,(b[2]?n.history.pushState:n.history.replaceState)(b[1],"",b[0]),E._ignoreSubscribers=!1,b=void 0,_=void 0)},y=(M,O,B)=>{const F=o(O),U=!!b;U||(_=u),u=$1(O,B),b=[F,B,(b==null?void 0:b[2])||M],U||queueMicrotask(()=>v())},w=M=>{u=l(),E.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=l(),O=M.state[su]-u.state[su],B=O===1,F=O===-1,U=!B&&!F||f;f=!1;const H=U?"GO":F?"BACK":"FORWARD",Y=U?{type:"GO",index:O}:{type:F?"BACK":"FORWARD"};if(m)m=!1;else{const V=i();if(typeof document<"u"&&V.length){for(const X of V)if(await X.blockerFn({currentLocation:u,nextLocation:M,action:H})){p=!0,n.history.go(1),E.notify(Y);return}}}u=l(),E.notify(Y)},N=M=>{if(x){x=!1;return}let O=!1;const B=i();if(typeof document<"u"&&B.length)for(const F of B){const U=F.enableBeforeUnload??!0;if(U===!0){O=!0;break}if(typeof U=="function"&&U()===!0){O=!0;break}}if(O)return M.preventDefault(),M.returnValue=""},E=oW({getLocation:S,getLength:()=>n.history.length,pushState:(M,O)=>y(!0,M,O),replaceState:(M,O)=>y(!1,M,O),back:M=>(M&&(m=!0),x=!0,n.history.back()),forward:M=>{M&&(m=!0),x=!0,n.history.forward()},go:M=>{f=!0,n.history.go(M)},createHref:M=>o(M),flush:v,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(v9,N,{capture:!0}),n.removeEventListener(g9,C)},onBlocked:()=>{_&&u!==_&&(u=_)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(v9,N,{capture:!0}),n.addEventListener(g9,C),n.history.pushState=function(...M){const O=t.apply(n.history,M);return E._ignoreSubscribers||w("PUSH"),O},n.history.replaceState=function(...M){const O=r.apply(n.history,M);return E._ignoreSubscribers||w("REPLACE"),O},E}function cW(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function $1(e,n){const t=cW(e),r=t.indexOf("#"),s=t.indexOf("?"),i=T5();return{href:t,pathname:t.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:t.length),hash:r>-1?t.substring(r):"",search:s>-1?t.slice(s,r===-1?void 0:r):"",state:n||{[su]:0,key:i,__TSR_key:i}}}function T5(){return(Math.random()+1).toString(36).substring(7)}function y9(e){var n,t;return e.options.loader||e.options.beforeLoad||e.lazyFn||((n=e.options.component)==null?void 0:n.preload)||((t=e.options.pendingComponent)==null?void 0:t.preload)}function Fv(e,n){return{fromLocation:n,toLocation:e,pathChanged:(n==null?void 0:n.pathname)!==e.pathname,hrefChanged:(n==null?void 0:n.href)!==e.href,hashChanged:(n==null?void 0:n.hash)!==e.hash}}function x9({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function uW(e,n,t,r){var s,i,a,o;for(const l of n){if(r&&e._tx!==r)return;t.some(u=>u.routeId===l.routeId)||(i=(s=e.routesById[l.routeId].options).onLeave)==null||i.call(s,l)}for(const l of t){if(r&&e._tx!==r)return;(o=(a=e.routesById[l.routeId].options)[n.some(u=>u.routeId===l.routeId)?"onStay":"onEnter"])==null||o.call(a,l)}}var fW=class{constructor(e,n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async t=>(t(),!1),this.update=t=>{const r=this.options,s=this.basepath??(r==null?void 0:r.basepath)??"/",i=this.basepath===void 0,a=r==null?void 0:r.rewrite;if(this.options={...r,...t},this.isServer=this.options.isServer??bG??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=FG(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=lW()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let u;this.resolvePathCache=I1(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=aW(this.latestLocation,u),QG(this)}const o=this.options.basepath??"/",l=this.options.rewrite;if(i||s!==o||a!==l){this.basepath=o;const u=[],_=xM(o);_&&_!=="/"&&u.push(iW({basepath:o})),l&&u.push(l),this.rewrite=u.length===0?void 0:u.length===1?u[0]:sW(u),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const t=LG(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&jG(this.options.routeMasks,t.processedTree),t},this.subscribe=(t,r)=>{const s={eventType:t,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=t=>{for(const r of this.subscribers)if(r.eventType===t.type)try{r.fn(t)}catch(s){console.error(s)}},this.parseLocation=(t,r)=>{const s=({pathname:l,search:u,hash:_,href:f,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const v=this.options.parseSearch(u),y=this.options.stringifySearch(v);return{href:l+y+_,publicHref:l+y+_,pathname:e0(l).path,external:!1,searchStr:y,search:Vu(r==null?void 0:r.search,v),hash:e0(_.slice(1)).path,state:lf(r==null?void 0:r.state,p)}}const m=new URL(f,this.origin),x=c4(this.rewrite,m),S=this.options.parseSearch(x.search),b=this.options.stringifySearch(S);return x.search=b,{href:x.href.replace(x.origin,""),publicHref:f,pathname:e0(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:b,search:Vu(r==null?void 0:r.search,S),hash:e0(x.hash.slice(1)).path,state:lf(r==null?void 0:r.state,p)}},i=s(t),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const l=s(a);return l.state.key=i.state.key,l.state.__TSR_key=i.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:i}}return i},this.resolvePathWithBase=(t,r)=>PG({base:t,to:r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,r,s)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:r},s):this.matchRoutesInternal(t,r),this.getMatchedRoutes=t=>{const r=Object.create(null),s=MG($l(t),this.processedTree,!0);return s&&Object.assign(r,s.rawParams),[(s==null?void 0:s.branch)||[this.routesById.__root__],r,s==null?void 0:s.route]},this.buildLocation=t=>{const r=(i={})=>{var M,O;if(i.href){const B=$1(i.href,{});i={...i,to:c4(this.rewrite,new URL(B.pathname,this.origin)).pathname,search:this.options.parseSearch(B.search),hash:B.hash.slice(1)}}const a=i._fromLocation||this._pendingLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const l=i.unsafeRelative==="path"?a.pathname:i.from??o[1],u=o[2],_=o[3],f=this.resolvePathWithBase(l,i.to?`${i.to}`:".");let p=w9(i.params,_);const m=this.routesByPath[$l(f)];let x;if(m)x=this.getRouteBranch(m);else if(f.includes("$"))x=[];else{const[B,F,U]=this.getMatchedRoutes(f);x=B,this.options.notFoundRoute&&(!U||U.path!=="/"&&F["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&_M(p))for(const B of x){const F=((M=B.options.params)==null?void 0:M.stringify)??B.options.stringifyParams;if(F){p===_&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,F(p))}catch{}}}const S=t.leaveParams?f:e0(h9({path:f,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let b=u;if(t._includeValidateSearch&&((O=this.options.search)!=null&&O.strict)){const B={};x.forEach(F=>{if(F.options.validateSearch)try{Object.assign(B,d1(F.options.validateSearch,{...B,...b}))}catch{}}),b=B}b=hW(b,i,x,t._includeValidateSearch),b=Vu(u,b);const v=this.options.stringifySearch(b),y=i.hash===!0?a.hash:i.hash?Dh(i.hash,a.hash):void 0,w=y?`#${y}`:"";let C=i.state===!0?a.state:i.state?Dh(i.state,a.state):{};i.state&&(C=lf(a.state,C));const N=`${S}${v}${w}`;let E,j,z=!1;if(this.rewrite){const B=new URL(N,this.origin),F=SM(this.rewrite,B);E=B.href.replace(B.origin,""),F.origin!==this.origin?(j=F.href,z=!0):j=F.pathname+F.search+F.hash}else E=NG(N),j=E;return{publicHref:j,href:E,pathname:S,search:b,searchStr:v,state:C,hash:y??"",external:z,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=AG(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:l,...u}=i.route,_=w9(l,a);s.maskedLocation=r({from:t.from,...u,params:_})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=$l(this.latestLocation.href)===$l(s.href)&&ru(x9(s.state),x9(this.latestLocation.state)),o=this._commitPromise;let l;const u=new Promise(_=>{l=_});if(u.resolve=()=>{l(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:_,hashScrollIntoView:f,...p}=s;_&&(p={..._,state:{..._.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,i=s.replace?"REPLACE":"PUSH",this.history[i==="REPLACE"?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=s.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:t,resetScroll:r,hashScrollIntoView:s,viewTransition:i,ignoreBlocker:a,...o}={})=>{const l=this.buildLocation({...o,_includeValidateSearch:!0});this._pendingLocation=l;const u=this.commitLocation({...l,viewTransition:i,replace:t,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return queueMicrotask(()=>{this._pendingLocation===l&&(this._pendingLocation=void 0)}),u},this.navigate=async({to:t,reloadDocument:r,href:s,publicHref:i,...a})=>{var l,u;let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!r&&(r=!0),r){if(t!==void 0||!s){const f=this.buildLocation({to:t,...a});s=s??f.publicHref,i=i??f.publicHref}const _=!o&&i?i:s;if(O1(_,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=((u=(l=this.history).getBlockers)==null?void 0:u.call(l))??[];for(const p of f)if(p!=null&&p.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(_):window.location.href=_;return}return this.buildAndCommitLocation({...a,href:s,to:t,_isNavigate:!0})},this.load=async t=>{this.updateLatestLocation(),t!=null&&t.action&&(this._scroll.hash=t.action.type==="PUSH"||t.action.type==="REPLACE"),await wW(this,t)},this.startViewTransition=t=>{var s,i;const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&((i=(s=window.CSS)==null?void 0:s.supports)!=null&&i.call(s,"selector(:active-view-transition-type(a))"))){const o=this.latestLocation,l=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(Fv(o,l)):r.types;if(u===!1)return t();a={update:t,types:u}}else a=t;return document.startViewTransition(a).updateCallbackDone}return t()},this.invalidate=t=>{var u,_;const r=this._committed,s=t==null?void 0:t.filter,i=this._preloads,a=new Set([...r,...this._cache.values(),...[...(i==null?void 0:i.values())??[]].flat(),...((u=this._tx)==null?void 0:u[3])??[]].filter(f=>!s||s(f)).map(f=>f.id)),o=[];for(const[f,p]of i??[])p.some(m=>a.has(m.id))&&(i.delete(f),o.push(f));const l=f=>{if(a.has(f.id)){const p=this.routesById[f.routeId],m={...f,invalid:!0,...(t!=null&&t.forcePending||f.status==="error"||f.status==="notFound")&&y9(p)?{status:"pending",error:void 0}:void 0};return f._flight=void 0,m}return f};this._committed=r.map(l);for(const[f,p]of this._cache)a.has(f)&&(p.invalid=!0,t!=null&&t.forcePending&&(p.status="pending"));for(const f of a)(_=this._flights)==null||_.delete(f);for(const f of o)f.abort();return this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.resolveRedirect=t=>{const r=t.headers.get("Location");if(t.options.href){if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const i=s.pathname+s.search+s.hash;t.options.href=i,t.headers.set("Location",i)}}catch{}}else{const s=this.buildLocation(t.options).publicHref||"/";t.options.href=s,t.headers.set("Location",s)}if(t.options.href&&O1(t.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{var u;const r=this._cache,s=this._preloads,i=t==null?void 0:t.filter,a=[],o=[];for(const[_,f]of r)(!i||i(f))&&(o.push(_),a.push(f));const l=[];for(const[_,f]of s??[])(!i||f.some(i))&&(l.push(_),a.push(...f));for(const _ of o)r.delete(_);for(const _ of l)s.delete(_);for(const _ of a){const f=_._flight;_._flight=void 0,f&&!--f[2]&&(((u=this._flights)==null?void 0:u.get(_.id))===f&&this._flights.delete(_.id),l.push(f[1]))}for(const _ of l)_.abort()},this.loadRouteChunk=oh,this.preloadRoute=t=>SW(this,t),this.matchRoute=(t,r)=>{const s={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},i=this.buildLocation(s),a=this.stores.status.get()==="pending";if(r!=null&&r.pending&&!a)return!1;const o=(r==null?void 0:r.pending)??!a?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=RG(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!l||t.params&&!ru(l.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?ru(o.search,i.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.getStoreConfig=n,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??eW,parseSearch:e.parseSearch??JG,protocolAllowlist:e.protocolAllowlist??EG}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:n,processedTree:t}){this.routesById=e,this.routesByPath=n,this.processedTree=t;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let n=this.routeBranchCache.get(e);return n||(n=bM(e),this.routeBranchCache.set(e,n)),n}matchRoutesInternal(e,n){var p,m;const[t,r,s]=this.getMatchedRoutes(e.pathname);let i=t,a=!1;(s?s.path!=="/"&&r["**"]:$l(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?_W(this.options.notFoundMode,i):void 0,l=new Array(i.length),u=this._committed,_=(x,S)=>{const b=u[S];return(b==null?void 0:b.routeId)===x.id?b:x===this.options.notFoundRoute?u.find(v=>v.routeId===x.id):void 0};let f;for(let x=0;x{const m=p(l.preSearchFilters?l.preSearchFilters.reduce((x,S)=>S(x),f):f);return l.postSearchFilters?l.postSearchFilters.reduce((x,S)=>S(x),m):m};s.push(_)}const u=l.validateSearch;if(r&&u){const _=({search:f,next:p,meta:m})=>{const x=p(f);try{const S=d1(u,x);if(m&&S)for(const b in S)b in x||(m.defaulted||(m.defaulted=new Map)).set(b,S[b]);return{...x,...S}}catch{}return x};s.push(_)}}const i=(o,l,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return l;const f=Dh(n.search,l);return u&&(u.explicit=f),f}const _=(f,p)=>{if(p){const m=u||{};return{search:i(o+1,f,m),meta:m}}return i(o+1,f,u)};return s[o]({search:l,next:_,meta:u})};return i(0,e)}function _W(e,n){if(e!=="root"){let t;for(let r=n.length-1;r>=0;r--){const s=n[r];if(s.options.notFoundComponent)return s.id;t||(t=s.children&&s.id)}if(t)return t}return ah}function w9(e,n){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return n;const t=Object.assign(Object.create(null),n);return Object.assign(t,Dh(e,t))}function S9(e,n){var r;const t=((r=e.options.params)==null?void 0:r.parse)??e.options.parseParams;t&&Object.assign(n,t(n))}function u4(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function pW(e,n){const t=u4(e,"component");let r=u4(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function oh(e,n,t){const r=()=>n===!1?void 0:n?u4(e,n):pW(e,t),s=e._lazy;if(s)return s===!0?r():s.then(r);if(!e.lazyFn)return r();const i=e.lazyFn().then(a=>{{const{id:o,...l}=a.options;Object.assign(e.options,l),e._lazy=!0}},a=>{throw e._lazy=void 0,a});return e._lazy=i,i.then(r)}function j5(e){const n=e.findIndex(t=>t.status!=="success"||t._notFound)+1;return n&&n{const s=()=>r(n);n.addEventListener("abort",s,{once:!0}),Promise.resolve(e).then(t,r).finally(()=>n.removeEventListener("abort",s))})}function Wf(e,n){return e.routesById[n.routeId]}function H0(e,n,t){return wM(e)?[Fi,e]:Lh(e)?(e.routeId||(e.routeId=t),[Hv,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[Gl,e]):[Lo,e]}function A5(e,n){var r,s;let t=H0(n,!0,e.id);if(t[0]!==Gl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=H0(i,!0,e.id)}return t}function E0(e,n,t,r,s){return s[0].signal.aborted?lu:D5(e,n,t,A5(t,r),s)}async function mW(e,n,t,r,s,i){var _,f;const[a,o]=n,l=t[0].signal,u=!!t[3];for(let p=t[6]??0;pe.navigate({...C,_fromLocation:a}),buildLocation:e.buildLocation,cause:u?"preload":m.cause,abortController:t[0],preload:u,matches:o,routeId:x.id};try{const C=m._ctx||(m._ctx=x.options.context?x.options.context({...b,deps:m.loaderDeps,context:S})||{}:void 0);m.context={...S,...C}}catch(C){return Pl(e,m),[p,E0(e,n,x,C,t)]}if(l.aborted)return[p,lu];const v=m.paramsError??m.searchError;if(v!==void 0)return Pl(e,m),[p,E0(e,n,x,v,t)];const y=x.options.beforeLoad;if(!y)continue;const w=m.status;p>=i&&(m.status="pending",(f=t[7])==null||f.call(t));try{q0(e,m,"beforeLoad",t[0]);const C=await Gf(y({...b,search:m.search,context:m.context,...e.options.additionalContext}),l);if(l.aborted)return[p,lu];const N=D5(e,n,x,H0(C,!1,x.id),t);if(N[0]!==Lo)return Pl(e,m),[p,N];m.context={...m.context,...C}}catch(C){return Pl(e,m),[p,E0(e,n,x,C,t)]}finally{m.status=w,q0(e,m,!1,t[0])}}s()}function R5(e,n,t){var r;if(!(!t||--t[2])){if(((r=e._flights)==null?void 0:r.get(n.id))===t){const s=e._tx;if(s&&!s[0].signal.aborted&&!s[3].includes(n)&&s[3].some(i=>i.id===n.id)&&s[3].some(i=>i.isFetching==="beforeLoad"))return;e._flights.delete(n.id)}return t[1]}}function Pl(e,n){var r;const t=n._flight;n._flight=void 0,(r=R5(e,n,t))==null||r.abort()}function xi(e,n,t,r){var i;const s=[];for(const a of n)if(!(t!=null&&t.includes(a))){const o=a._flight;if(a._flight=void 0,r&&(o==null?void 0:o[2])===1&&((i=e._flights)==null?void 0:i.get(a.id))===o&&(t!=null&&t.some(l=>l.id===a.id)))o[2]=0;else{const l=R5(e,a,o);l&&s.push(l)}}for(const a of s)a.abort()}function M5(e){for(const n of e){const t=n._flight;t&&t[2]++}}function q0(e,n,t,r){var a;if(n.isFetching=t,r&&((a=e._tx)==null?void 0:a[0])!==r)return;const s=e.stores.byRoute.get(n.routeId),i=s==null?void 0:s.get();(i==null?void 0:i.id)===n.id&&s.set({...i,isFetching:t})}function kM(e,n,t,r,s,i,a){const o=n[0];return{params:t.params,location:o,navigate:l=>e.navigate({...l,_fromLocation:o}),cause:a?"preload":t.cause,abortController:s,preload:a,deps:t.loaderDeps,parentMatchPromise:i,context:t.context,route:r,...e.options.additionalContext}}async function k9(e,n,t,r,s,i,a){const o=a[0],l=o.signal;if(l.aborted)return lu;if(!s)return[Lo,void 0];let u=t._flight;q0(e,t,"loader",o);try{if(!u){const _=new AbortController;u=[Promise.resolve().then(()=>s(kM(e,n,t,r,_,i,!!a[3]))).then(f=>H0(f,!1,r.id),f=>H0(f,!0,r.id)).then(f=>{var p;return f[0]!==Lo&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||_.abort()),f[0]===Gl&&u[2]?A5(r,f[1]):f}),_,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],D5(e,n,r,await Gf(u[0],l),a)}catch(_){if(_!==l||!l.aborted)throw _;return Pl(e,t),lu}finally{q0(e,t,!1,o)}}function C9(e,n,t){n[0]!==Fi&&(e.status="success",e.error=void 0,n[0]===Lo?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function gW(e,n,t){const r=e._cache.get(n.id);if(r!==t||e._committed.some(i=>i.id===n.id&&i._flight===n._flight))return;const s={...n,_notFound:void 0,context:{}};s._flight&&s._flight[2]++,e._cache.set(n.id,s),r&&Pl(e,r)}function E9(e,n){return n[0]===Gl||n[0]===Hv?{...e,status:n[0]===Gl?"error":"notFound",error:n[1],_flight:void 0}:e}function vW(e,n,t,r,s,i,a){var F,U;const o=n[1][t],l=Wf(e,o),u=!!i[3],_=e._cache.get(o.id);let f,p=!1,m;try{if(o.status==="success"&&(f=l.options.shouldReload,typeof f=="function"&&(f=f(kM(e,n,o,l,i[0],s,u))),i[0].signal.aborted&&(m=lu)),!m)if(o.status!=="success")p=!0;else{const H=u||o.preload?l.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.options.defaultStaleTime??0;p=!!(o.invalid||f||f===void 0&&Date.now()-o.updatedAt>=H&&(i[5]||o.cause==="enter"||i[2].some(Y=>Y.routeId===o.routeId&&Y.id!==o.id)))}}catch(H){o.invalid=!0,Pl(e,o),m=E0(e,n,l,H,i)}const x=l.options.loader,S=typeof x=="function",b=S?x:x==null?void 0:x.handler,v=!u||l.options.preload!==!1;let y=v&&x?(F=e._flights)==null?void 0:F.get(o.id):void 0;y===o._flight||m?y=void 0:y&&!p&&!u&&f===void 0?p=!0:p||(y=void 0);const w=!!(x&&p&&o.status==="success"&&!u&&!i[4]&&((S?void 0:x.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&v,N=C&&!w&&(o.status!=="success"||!!x),E=t>=a?i[7]:void 0,j=l.lazyFn&&l._lazy!==!0?E:void 0;if(C&&!x&&(o.invalid=!1,o.updatedAt=Date.now()),y&&y[2]++,N){const H=o._flight;o._flight=y,(U=R5(e,o,H))==null||U.abort(),t>=a&&(o.status="pending"),E==null||E()}C||(o.isFetching=!1);const z=(m?Promise.resolve(m):N?k9(e,n,o,l,b,s,i):Promise.resolve([Lo,o.loaderData])).then(H=>(N&&(C9(o,H,u),H[0]===Lo&&(x&&!i[0].signal.aborted&&gW(e,o,_),t>=a&&(o.status="pending"))),H)),M=Gf(Promise.resolve().then(()=>oh(l,void 0,j)),i[0].signal).then(()=>{},H=>n[1].some((Y,V)=>V<=t&&(Y.status==="error"||Y.status==="notFound"||Y._notFound))?void 0:[t,E0(e,n,l,H,i)]).then(H=>z.then(Y=>(N&&!H&&Y[0]===Lo&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",E==null||E()),H)));if(r.push([t,z,M]),!w)return z.then(H=>E9(o,H));const O={...o,status:"pending",preload:!1,_flight:y};o.invalid=!1,o.isFetching="loader";const B=k9(e,n,O,l,b,s,i).then(H=>(o.isFetching=!1,C9(O,H,!1),H));return(n[2]??(n[2]=[])).push([t,B,M,O]),B.then(H=>E9(O,H))}async function f4(e,n,t,r,s=0){const i=t==null?void 0:t[1][1];let a=i!=null&&i.routeId?n.findIndex(o=>o.routeId===i.routeId):(t==null?void 0:t[0])??n.length-1;a<0&&(a=0);for(let o=a;o>=0;o--){const l=Wf(e,n[o]);try{const u=oh(l,!1);u&&await Gf(u,r)}catch(u){if(u===r&&r.aborted)throw u}if(l.options.notFoundComponent)return o}return i!=null&&i.routeId?a:s}function Cf(e,n){n[2]&&(xi(e,n[2].map(t=>t[3])),n[2]=void 0)}async function N9(e,n,t,r){let s;try{await Promise.all(e.map(i=>i[1].then(async a=>{const o=i[0];if(!(r&&o>=await r)){if(a[0]>=Fi)throw[o,a];!s&&a[0]!==Lo&&(s=[o,a],await Promise.all((t??[]).map(l=>{if(!(l[0]<=o))return l[1].then(u=>{if(u[0]===Fi)throw[l[0],u]})})))}})))}catch(i){return i}return n??s}function D5(e,n,t,r,s,i){for(;r[0]===Fi;){const a=r[1],o=a.options;if(o.reloadDocument?s[3]:s[1]>=20)return r;try{return o.href&&o.reloadDocument?(e.resolveRedirect(a),r):[Fi,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(l){r=i?[Gl,l]:A5(t,l),i=!0}}return r}async function CM(e,n,t,r,s,i){const a=n[1];let o=await s,l=!1;const u=a.findIndex(m=>m._notFound),_=m=>m[1][0]===Hv?f4(e,a,m,r.signal):m[0];let f=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=Fi)f=0;else if(o){f=o[2]??(o[2]=await _(o));for(const m of t){if(m[0]>=f)break;const x=await m[1];if(x[0]!==Lo&&x[0]=f)break;const x=await m[2];if(x){o=x;break}}if(((o==null?void 0:o[1][0])??0)>=Fi){const m=o[1];if(m[0]!==Fi||m[1].options.reloadDocument||m[2])return Cf(e,n),m;l=!0,o=[0,[Gl,new Error("Too many redirects")]]}const p=o?o[2]??await _(o):u;if(p>=0){const m=o==null?void 0:o[1],x=m==null?void 0:m[0],S=a[p],b=m==null?void 0:m[1],v=()=>{m&&(S._notFound=void 0,x===Gl?S.status="error":(b.routeId=S.routeId,S.routeId===e.routeTree.id?(S.status="success",S._notFound=!0):S.status="notFound"),S.error=b,S.isFetching=!1)};v(),m||i==null||i();const y=Wf(e,S);try{await Gf(m?Promise.resolve().then(()=>oh(y,x===Gl?"errorComponent":"notFoundComponent")):Promise.all([oh(y),oh(y,"notFoundComponent")]),r.signal)}catch(w){if(w===r.signal&&r.signal.aborted)return Cf(e,n),lu}m?l&&(r.abort(),await Promise.all([...t.map(w=>w[1]),...t.map(w=>w[2]),...(n[2]??[]).map(w=>w[1])]),Cf(e,n),xi(e,a),v()):S.status="success"}return n}async function EM(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let l=r;ly._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const y=await f4(e,t,void 0,i,u);t[u]._notFound=void 0,t[y]._notFound=!0,u=y}let _=u<0?t.length:u+1,f=0;for(;f<_&&f!==u;){const y=t[f],w=r[2][f],C=l[f];if((w==null?void 0:w.id)!==y.id||w.status!=="success"||w._notFound||y.preload||(C==null?void 0:C.id)!==y.id||C.status!=="success"||C._notFound)break;f++}const p=[],m=r[6]??0;let x=m?Promise.resolve(t[m-1]):void 0;const S=()=>{for(let y=m;y<_&&!i.aborted;y++)x=vW(e,s,y,p,x,r,f)},b=await mW(e,s,r,_,S,f);if(b){if(r[4]=!0,_=b[0],b[1][0]===Hv){const y=await f4(e,t,b,i);b[2]=y,_=Math.min(_,y+1)}else b[1][0]>=Fi&&(_=0);S()}if(!i.aborted&&!r[3]){const y=[];for(const[w,C]of e._flights??[])C[2]||(e._flights.delete(w),y.push(C[1]));for(const w of y)w.abort()}const v=CM(e,s,p,r[0],N9(p,b,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=N9(s[2],void 0,void 0,v.then(y=>F0(y)?0:j5(t).length,()=>0))),a=await v}catch(l){if(Cf(e,s),l===i&&i.aborted)return lu;throw l}return F0(a)?a:EM(e,a,i,r[6]===t.length?r[6]:0)}function d4(e,n){var i,a;if(e._tx!==n)return;const t=n[3],r=e.stores.matches.get();let s=e._pending;for(let o=0;o0){s[3]=setTimeout(()=>d4(e,n),y);return}s[2]=0}const b=t.map(y=>({...y,_flight:void 0}));b[o].status="pending";const v=s[4]=e.startTransition(()=>e.stores.setMatches(b),b).then(y=>(y&&e._pending===s&&s[4]===v&&!s[2]&&(s[2]=Date.now()+x),y));return}}function t0(e,n){var r;const t=e._pending;(e._tx===n||!((r=e._tx)!=null&&r[3].some(s=>s.id===(t==null?void 0:t[1]))))&&(clearTimeout(t==null?void 0:t[3]),e._pending=void 0)}async function z9(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!j5(n[3]).some(i=>i.id===t[1]))return;let s;try{await Gf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function zM(e,n){e._committed=n,e.stores.setMatches(n)}function bW(e,n,t,r){const s=e._committed,i=e._cache;for(const l of t)l.preload=!1,r&&(l._assetEnd=void 0);const a=j5(t).length,o=new Map;{const l=Date.now();for(const u of[...s,...i.values()]){if(u.status!=="success"||t.some((f,p)=>f.id===u.id&&(p=(u.preload?_.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:_.options.gcTime??e.options.defaultGcTime??3e5)||o.set(u.id,i.get(u.id)===u?u:{...u,_flight:void 0,isFetching:!1,context:{}})}}n[3]=[],e._cache=o,zM(e,t),xi(e,[...i.values(),...s],[...t,...o.values()]),uW(e,s,t,n)}async function gg(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function TM(e,n,t){const r=t[1].options,s=t[2];if(!s)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:s.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});s._redirects=n[1]+1,e._pendingLocation=s;const i=e.commitLocation({...s,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===s&&(e._pendingLocation=void 0)}),i}async function yW(e,n,t,r,s){const i=t.map(l=>({...l}));M5(i);for(const l of r)Pl(e,i[l[0]]),i[l[0]]=l[3];const a=[n[2],i];let o;try{o=await CM(e,a,r,n[0],s)}catch(l){throw xi(e,i),l}if(F0(o)){xi(e,i),o[0]===Fi&&e._tx===n&&e._committed===t&&await TM(e,n,o);return}if(await EM(e,o,n[0].signal),e._tx!==n||e._committed!==t){xi(e,i);return}for(const l of i){const u=e._cache.get(l.id);u!=null&&u._flight&&u._flight===l._flight&&(e._cache.delete(l.id),Pl(e,u))}zM(e,i),xi(e,t,i)}async function xW(e,n,t,r,s,i){const a=await NM(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(F0(a)){const f=a[0]===Fi&&e._tx===n;if((!f||a[1].options.reloadDocument)&&t0(e,n),xi(e,n[3]),n[3]=[],!f)return;if(e._tx!==n){t0(e,n);return}await TM(e,n,a);return}const o=a[1];if(e._tx===n&&await z9(e,n),e._tx!==n){t0(e,n),xi(e,o),Cf(e,a);return}const l=n[2],u=Fv(l,e.stores.resolvedLocation.get()),_=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await z9(e,n),e._tx!==n){t0(e,n),xi(e,o),Cf(e,a);return}const f=()=>{t0(e,n),bW(e,n,o,i),e._tx===n&&(e.emit({type:"onLoad",...u}),e._tx===n&&e.emit({type:"onBeforeRouteMount",...u}))},p=await e.startTransition(f,o);if(e._tx!==n){Cf(e,a);return}_!=null&&_.length&&yW(e,n,o,_,a[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(l),e.stores.status.set("idle"),e._tx===n&&e.emit({type:"onResolved",...u}),p&&e._tx===n&&e.emit({type:"onRendered",...u})}),e._tx===n&&((m=e._commitPromise)==null||m.resolve(),e._commitPromise=void 0)})}async function wW(e,n){var C;const t=e._tx,r=e.stores.resolvedLocation.get(),s=r??e.stores.location.get(),i=e.latestLocation,a=e._pendingLocation,o=(a==null?void 0:a.href)===i.href?a._redirects??0:0,l=e._handoff,u=l==null?void 0:l[0](),_=new AbortController,f=e._preflight;if(e._preflight=_,u||l==null||l[1](),f==null||f.abort(),!_.signal.aborted){const N=Fv(i,r);e.emit({type:"onBeforeNavigate",...N}),_.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(_.signal.aborted){await gg(e,t);return}const p=s.href===i.href;let m=_;const x=e.matchRoutes(i,{_controller:_});M5(x);const S=u?l[1](x):void 0;if(S?m=u:u==null||u.abort(),_.signal.aborted){xi(e,x),await gg(e,t);return}e._preflight=void 0;let b;const v=()=>xW(e,w,p,()=>d4(e,w),n==null?void 0:n.sync,S),y=n!=null&&n.sync?new Promise(N=>b=N):Promise.resolve().then(v).then(),w=[m,o,i,x,Date.now(),y];if(e._tx=w,t){for(const N of e.stores.matches.get()){if(e._tx!==w)break;N.isFetching&&q0(e,N,!1)}t[0].abort(),xi(e,t[3],w[3],!0)}if(e._tx!==w){xi(e,w[3]),w[3]=[],b==null||b(),await gg(e,w);return}e.batch(()=>{e.stores.status.set("pending"),e.stores.location.set(i)}),(S||!e._committed.length&&((C=x[0])==null?void 0:C.status)!=="success"&&!x.some(N=>N._notFound))&&d4(e,w),b==null||b(v()),await y,await gg(e,w)}async function SW(e,n){let t=e.buildLocation(n);for(let r=0;;r++){const s=e._committed,i=new AbortController;let a,o,l;try{try{a=e.matchRoutes(t,{_controller:i}),M5(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),l=await NM(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),xi(e,a)),i.abort()}if(!F0(l))return l[1];if(!o||l.length<3)return;t=l[2]}catch(u){Lh(u)||console.error(u);return}}}const kW="Error preloading route! ☝️";var jM=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=n=>{var l,u;this.originalIndex=n.originalIndex;const t=this.options,r=!(t!=null&&t.path)&&!(t!=null&&t.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),r?this._path=ah:this.parentRoute||N5();let s=r?ah:t==null?void 0:t.path;s&&s!=="/"&&(s=yM(s));const i=(t==null?void 0:t.id)||s;let a=r?ah:c1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=c1(["/",a]));const o=a==="__root__"?"/":c1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=$l(o)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>rW({from:this.fullPath,...n}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},CW=class extends jM{constructor(e){super(e)}},L5=class extends R.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,n){const t=e.getResetKey();return n.error&&n.resetKey!==t?{resetKey:t,error:null}:{resetKey:t}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,n){var t,r;(r=(t=this.props).onCatch)==null||r.call(t,e,n)}render(){const e=this.state.error;return e?R.createElement(this.props.errorComponent??EW,{error:e,reset:this.reset}):this.props.children}};function EW({error:e}){const[n,t]=R.useState(!1);return h.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[h.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),h.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(r=>!r),children:n?"Hide Error":"Show Error"})]}),h.jsx("div",{style:{height:".25rem"}}),n?h.jsx("div",{children:h.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?h.jsx("code",{children:e.message}):null})}):null]})}function NW({children:e,fallback:n=null}){return h.jsx(Je.Fragment,{children:AM()?e:n})}function AM(){return Je.useSyncExternalStore(zW,()=>!0,()=>!1)}function zW(){return()=>{}}var RM=R.createContext(null);function ri(e){return R.useContext(RM)}var qv=R.createContext(void 0),TW=R.createContext(void 0),xr=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(xr||{});function jW({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,_,f){const p=_.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:_.deps;if(m!==void 0&&m.dep===u){m.version=f,_.depsTail=m;return}const x=u.subsTail;if(x!==void 0&&x.version===f&&x.sub===_)return;const S=_.depsTail=u.subsTail={version:f,dep:u,sub:_,prevDep:p,nextDep:m,prevSub:x,nextSub:void 0};m!==void 0&&(m.prevDep=S),p!==void 0?p.nextDep=S:_.deps=S,x!==void 0?x.nextSub=S:u.subs=S}function s(u,_=u.sub){const f=u.dep,p=u.prevDep,m=u.nextDep,x=u.nextSub,S=u.prevSub;return m!==void 0?m.prevDep=p:_.depsTail=p,p!==void 0?p.nextDep=m:_.deps=m,x!==void 0?x.prevSub=S:f.subsTail=S,S!==void 0?S.nextSub=x:(f.subs=x)===void 0&&t(f),m}function i(u){let _=u.nextSub,f;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&l(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&n(p),m&1){const x=p.subs;if(x!==void 0){const S=(u=x).nextSub;S!==void 0&&(f={value:_,prev:f},_=S);continue}}if((u=_)!==void 0){_=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){_=u.nextSub;continue e}break}while(!0)}function a(u,_){let f,p=0,m=!1;e:do{const x=u.dep,S=x.flags;if(_.flags&16)m=!0;else if((S&17)===17){if(e(x)){const b=x.subs;b.nextSub!==void 0&&o(b),m=!0}}else if((S&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(f={value:u,prev:f}),u=x.deps,_=x,++p;continue}if(!m){const b=u.nextDep;if(b!==void 0){u=b;continue}}for(;p--;){const b=_.subs,v=b.nextSub!==void 0;if(v?(u=f.value,f=f.prev):u=b,m){if(e(_)){v&&o(b),_=u.sub;continue}m=!1}else _.flags&=-33;_=u.sub;const y=u.nextDep;if(y!==void 0){u=y;continue e}}return m}while(!0)}function o(u){do{const _=u.sub,f=_.flags;(f&48)===32&&(_.flags=f|16,(f&6)===2&&n(_))}while((u=u.nextSub)!==void 0)}function l(u,_){let f=_.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function AW(e,n,t){var i,a,o;const r=typeof e=="object",s=r?e:void 0;return{next:(i=r?e.next:e)==null?void 0:i.bind(s),error:(a=r?e.error:n)==null?void 0:a.bind(s),complete:(o=r?e.complete:t)==null?void 0:o.bind(s)}}const h4=[];let h1=0;const{link:T9,unlink:RW,propagate:MW,checkDirty:MM,shallowPropagate:j9}=jW({update(e){return e._update()},notify(e){h4[_4++]=e,e.flags&=~xr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=xr.Mutable|xr.Dirty,F1(e))}});let vg=0,_4=0,Co,p4=0;function DW(e){try{++p4,e()}finally{--p4||DM()}}function F1(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=RW(t,e)}function DM(){if(!(p4>0)){for(;vg<_4;){const e=h4[vg];h4[vg++]=void 0,e.notify()}vg=0,_4=0}}function A9(e,n){const t=typeof e=="function",r=e,s={_snapshot:t?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:t?xr.None:xr.Mutable,get(){return Co!==void 0&&T9(s,Co,h1),s._snapshot},subscribe(i){const a=AW(i),o={current:!1},l=LW(()=>{var u;s.get(),o.current?(u=a.next)==null||u.call(a,s._snapshot):o.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(i){const a=Co,o=(n==null?void 0:n.compare)??Object.is;if(t)Co=s,++h1,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=xr.Mutable|xr.RecursedCheck);try{const l=s._snapshot,u=typeof i=="function"?i(l):i===void 0&&t?r(l):i;return l===void 0||!o(l,u)?(s._snapshot=u,!0):!1}finally{Co=a,t&&(s.flags&=~xr.RecursedCheck),F1(s)}}};return t?(s.flags=xr.Mutable|xr.Dirty,s.get=function(){const i=s.flags;if(i&xr.Dirty||i&xr.Pending&&MM(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&j9(a)}}else i&xr.Pending&&(s.flags=i&~xr.Pending);return Co!==void 0&&T9(s,Co,h1),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(MW(a),j9(a),DM())}},s}function LW(e){const n=()=>{const r=Co;Co=t,++h1,t.depsTail=void 0,t.flags=xr.Watching|xr.RecursedCheck;try{return e()}finally{Co=r,t.flags&=~xr.RecursedCheck,F1(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:xr.Watching|xr.RecursedCheck,notify(){const r=this.flags;r&xr.Dirty||r&xr.Pending&&MM(this.deps,this)?n():this.flags=xr.Watching},stop(){this.flags=xr.None,this.depsTail=void 0,F1(this)}};return n(),t}var n2={exports:{}},r2={},s2={exports:{}},i2={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var R9;function OW(){if(R9)return i2;R9=1;var e=Bp();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function o(f,p){var m=p(),x=r({inst:{value:m,getSnapshot:p}}),S=x[0].inst,b=x[1];return i(function(){S.value=m,S.getSnapshot=p,l(S)&&b({inst:S})},[f,m,p]),s(function(){return l(S)&&b({inst:S}),f(function(){l(S)&&b({inst:S})})},[f]),a(m),m}function l(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!t(f,m)}catch{return!0}}function u(f,p){return p()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return i2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,i2}var M9;function IW(){return M9||(M9=1,s2.exports=OW()),s2.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var D9;function BW(){if(D9)return r2;D9=1;var e=Bp(),n=IW();function t(u,_){return u===_&&(u!==0||1/u===1/_)||u!==u&&_!==_}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;return r2.useSyncExternalStoreWithSelector=function(u,_,f,p,m){var x=i(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=o(function(){function v(E){if(!y){if(y=!0,w=E,E=p(E),m!==void 0&&S.hasValue){var j=S.value;if(m(j,E))return C=j}return C=E}if(j=C,r(w,E))return j;var z=p(E);return m!==void 0&&m(j,z)?(w=E,j):(w=E,C=z)}var y=!1,w,C,N=f===void 0?null:f;return[function(){return v(_())},N===null?void 0:function(){return v(N())}]},[_,f,p,m]);var b=s(u,x[0],x[1]);return a(function(){S.hasValue=!0,S.value=b},[b]),l(b),b},r2}var L9;function $W(){return L9||(L9=1,n2.exports=BW()),n2.exports}var LM=$W();const PW=Ip(LM);function FW(e,n){return e===n}function Bo(e,n,t=FW){const r=R.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:o}=e.subscribe(a);return o},[e]),s=R.useCallback(()=>e==null?void 0:e.get(),[e]);return LM.useSyncExternalStoreWithSelector(r,s,s,n,t)}var O9={};function O5(e,n){const t=R.useRef();return r=>{const s=e!=null&&e.select?e.select(r):r;return(e==null?void 0:e.structuralSharing)??n.options.defaultStructuralSharing?t.current=lf(t.current,s):s}}function Vf(e){const n=ri(),t=R.useContext(e.from?TW:qv),r=e.from??t,s=n.stores.getMatchStore(r),i=O5(e,n),a=Bo(s,o=>o?i(o):O9);if(a!==O9)return a;(e.shouldThrow??!0)&&N5()}function OM(e){return Vf({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function IM(e){const{select:n,...t}=e;return Vf({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function BM(e){return Vf({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const t=e.strict===!1?n.params:n._strictParams;return e.select?e.select(t):t}})}function $M(e){return Vf({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Uv(e){const n=ri();return R.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function I5(e){return Vf({...e,select:n=>e.select?e.select(n.context):n.context})}function a2(e){const n=R.useRef(e);return ru(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function HW(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function qW(e,n,t){if(e!=null&&e.external)return O1(e.href,t)?void 0:e.href;if(!YW(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),O1(n,t)?void 0:n}catch{}}function UW(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!$G(e.pathname,n.pathname,r))return!1}else{const a=B1(e.pathname,r),o=B1(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!ru(e.search,n.search,{partial:!(t!=null&&t.exact),ignoreUndefined:!(t!=null&&t.explicitUndefined)})?!1:t!=null&&t.includeHash?s&&e.hash===n.hash:!0}function GW(e,n){const t=ri(),r=xG(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:l,preloadDelay:u,preloadIntentProximity:_,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:x,viewTransition:S,children:b,target:v,disabled:y,style:w,className:C,onClick:N,onBlur:E,onFocus:j,onMouseEnter:z,onMouseLeave:M,onTouchStart:O,ignoreBlocker:B,params:F,search:U,hash:H,state:Y,mask:V,reloadDocument:X,unsafeRelative:ie,from:I,_fromLocation:L,...$}=e,q=AM(),G=a2(e.search),te=a2(e.params),fe=a2(a),oe=R.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,G,te,e.state,e.mask,e.unsafeRelative]),ne=R.useCallback(rt=>{const ft=t.buildLocation({_fromLocation:rt,...oe}),Lt=QW(ft.maskedLocation?ft.maskedLocation.publicHref:ft.publicHref,ft.maskedLocation?ft.maskedLocation.external:ft.external,t.history,y),we=qW(Lt,o,t.protocolAllowlist);return[Lt==null?void 0:Lt.href,we,UW(rt,ft,fe,t.basepath,q,we!==void 0)]},[fe,y,q,oe,t,o]),[Q,ce,ee]=Bo(t.stores.location,ne,HW),le=ee?Dh(s,{})??WW:o2,he=ee?o2:Dh(i,{})??o2,xe=[C,le.className,he.className].filter(Boolean).join(" "),Te=(w||le.style||he.style)&&{...w,...le.style,...he.style},Ze=R.useRef(!1),Ue=e.reloadDocument||ce||y?!1:l??t.options.defaultPreload,Ie=u??t.options.defaultPreloadDelay??0,vt=R.useCallback(()=>{t.preloadRoute(oe).catch(rt=>{console.warn(rt),console.warn(kW)})},[t,oe]),bt=R.useCallback(rt=>{if(!rt){l2(r);return}if(!(rt.isIntersecting??Ue==="intent")){rt.isIntersecting===!1&&l2(r);return}if(!Ie){vt();return}N0.has(r)||N0.set(r,setTimeout(()=>{N0.delete(r),vt()},Ie))},[vt,r,Ue,Ie]);yG(r,bt,Ue!=="viewport"),R.useEffect(()=>{Ze.current||Ue==="render"&&(vt(),Ze.current=!0)},[vt,Ue]);const It=rt=>{const ft=rt.currentTarget.getAttribute("target"),Lt=v!==void 0?v:ft;!y&&!(rt.metaKey||rt.altKey||rt.ctrlKey||rt.shiftKey)&&!rt.defaultPrevented&&(!Lt||Lt==="_self")&&rt.button===0&&(rt.preventDefault(),t.navigate({...oe,replace:p,resetScroll:x,hashScrollIntoView:f,startTransition:m,viewTransition:S,ignoreBlocker:B}))};if(ce)return{...$,ref:r,href:ce,...b&&{children:b},...v&&{target:v},...y&&{disabled:y},...w&&{style:w},...C&&{className:C},...N&&{onClick:N},...E&&{onBlur:E},...j&&{onFocus:j},...z&&{onMouseEnter:z},...M&&{onMouseLeave:M},...O&&{onTouchStart:O}};const Bt=()=>{Ue==="intent"&&vt()},Et=()=>{Ue==="intent"&&l2(r)};return{...$,...le,...he,href:Q,ref:r,onClick:Bd([N,It]),onBlur:Bd([E,Et]),onFocus:Bd([j,bt]),onMouseEnter:Bd([z,bt]),onMouseLeave:Bd([M,Et]),onTouchStart:Bd([O,Bt]),disabled:!!y,target:v,...Te&&{style:Te},...xe&&{className:xe},...y&&VW,...ee&&KW}}var o2={},WW={className:"active"},VW={role:"link","aria-disabled":!0},KW={"data-status":"active","aria-current":"page"},N0=new WeakMap,l2=e=>{clearTimeout(N0.get(e)),N0.delete(e)},Bd=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function QW(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function YW(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var Gv=R.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=GW(r,n),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!t){const{disabled:o,...l}=i;return R.createElement("a",l,a)}return R.createElement(t,i,a)}),XW=class extends jM{constructor(n){super(n),this.useMatch=t=>Vf({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>I5({...t,from:this.id}),this.useSearch=t=>$M({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>BM({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>IM({...t,from:this.id}),this.useLoaderData=t=>OM({...t,from:this.id}),this.useNavigate=()=>Uv({from:this.fullPath}),this.Link=Je.forwardRef((t,r)=>h.jsx(Gv,{ref:r,from:this.fullPath,...t}))}};function ZW(e){return new XW(e)}function JW(){return e=>tV(e)}var eV=class extends CW{constructor(e){super(e),this.useMatch=n=>Vf({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>I5({...n,from:this.id}),this.useSearch=n=>$M({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>BM({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>IM({...n,from:this.id}),this.useLoaderData=n=>OM({...n,from:this.id}),this.useNavigate=()=>Uv({from:this.fullPath}),this.Link=Je.forwardRef((n,t)=>h.jsx(Gv,{ref:t,from:this.fullPath,...n}))}};function tV(e){return new eV(e)}function qo(e){return n=>{const t=ZW(n);return t.isRoot=!1,t}}function nV(e){const n=ri(),t=`not-found-${Bo(n.stores.location,r=>r.pathname)}-${Bo(n.stores.status,r=>r)}`;return h.jsx(L5,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(Lh(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Lh(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function rV(){return h.jsx("p",{children:"Not Found"})}function Wd(e){return h.jsx(h.Fragment,{children:e.children})}function PM(e,n,t){return n.options.notFoundComponent?h.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?h.jsx(e.options.defaultNotFoundComponent,{...t}):h.jsx(rV,{})}function Wv(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?h.jsx(t,{}):null}var sV=(e,n)=>e[0]===n[0]&&e[1]===n[1],FM=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,HM=R.memo(function({routeId:n}){const t=ri();return h.jsx(iV,{router:t,match:Bo(t.stores.getMatchStore(n),r=>r)})});function iV({router:e,match:n}){var f,p;const t=e.routesById[n.routeId],r=Wv(e,t),s=t.options.errorComponent??e.options.defaultErrorComponent,i=t.options.onCatch??e.options.defaultOnCatch,a=t.isRoot?t.options.notFoundComponent??((f=e.options.notFoundRoute)==null?void 0:f.options.component):t.options.notFoundComponent,o=n.ssr===!1||n.ssr==="data-only",l=FM(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?R.Suspense:Wd,u=s?L5:Wd,_=a?nV:Wd;return h.jsxs(t.isRoot?t.options.shellComponent??Wd:Wd,{children:[h.jsx(qv.Provider,{value:n.routeId,children:h.jsx(l,{fallback:r,children:h.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,x)=>{if(Lh(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,x)},children:h.jsx(_,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return R.createElement(a,m)},children:o?h.jsx(NW,{fallback:r,children:h.jsx(I9,{match:n})}):h.jsx(I9,{match:n})})})})}),null]})}var I9=R.memo(function({match:n}){const t=ri(),r=n.routeId,s=t.routesById[r],i=R.useMemo(()=>{var l;const o=(l=s.options.remountDeps??t.options.defaultRemountDeps)==null?void 0:l({routeId:r,loaderDeps:n.loaderDeps,params:n._strictParams,search:n._strictSearch});return o?JSON.stringify(o):void 0},[r,n.loaderDeps,n._strictParams,n._strictSearch,s.options.remountDeps,t.options.defaultRemountDeps]),a=R.useMemo(()=>{const o=s.options.component??t.options.defaultComponent;return o?h.jsx(o,{},i):h.jsx(U0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!FM(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return Wv(t,s)}if(n.status==="notFound")return PM(t,s,n.error);if(n.status==="error")throw n.error;return a}),U0=R.memo(function(){const n=ri(),t=R.useContext(qv);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=Bo(o,l=>[!!l._notFound,l.error],sV),i=Bo(n.stores.ids,l=>l[l.indexOf(t)+1])}if(r)return PM(n,n.routesById[t],s);if(!i)return null;const a=h.jsx(HM,{routeId:i});return t===ah?h.jsx(R.Suspense,{fallback:Wv(n),children:a}):a});function qM(e,n){const t=e[1];e.length=0,t==null||t(n)}function aV({t:e}){const n=ri(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{qM(t,!1),t.push(s,i),e(n),R.startTransition(r)}),dM(()=>{const r=n.history.subscribe(n.load);n.updateLatestLocation();const s=n.latestLocation,i=n.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if($l(s.publicHref)!==$l(i.publicHref))return n.commitLocation({...i,replace:!0,ignoreBlocker:!0}),r;const a=n.stores.resolvedLocation.get();return(a==null?void 0:a.href)===s.href&&a.state.__TSR_key===s.state.__TSR_key?t.push(n.stores.matches.get(),o=>{o&&n.emit({type:"onRendered",...Fv(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function oV(){const e=ri(),n=e.routesById[ah],t=Wv(e,n),r=e.ssr?Wd:R.Suspense,s=h.jsxs(h.Fragment,{children:[h.jsx(aV,{t:R.useState()[1]}),h.jsx(r,{fallback:t,children:h.jsx(lV,{})})]});return e.options.InnerWrap?h.jsx(e.options.InnerWrap,{children:s}):s}function lV(){const e=ri(),n=e._rendered,t=Bo(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;dM(()=>{n[0]===t&&qM(n,!0)},[n,t]);const i=s?h.jsx(HM,{routeId:s}):null;return h.jsx(qv.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:h.jsx(L5,{getResetKey:()=>r,onCatch:void 0,children:i})})}var cV=e=>({createMutableStore:A9,createReadonlyStore:A9,batch:DW}),uV=e=>new fV(e),fV=class extends fW{constructor(e){super(e,cV)}};function dV({router:e,children:n,...t}){_M(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=h.jsx(RM.Provider,{value:e,children:n});return e.options.Wrap?h.jsx(e.options.Wrap,{children:r}):r}function hV({router:e,...n}){return h.jsx(dV,{router:e,...n,children:h.jsx(oV,{})})}function _V(e,n){if(e===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in e)return e;if(typeof e=="function")return{shouldBlockFn:async()=>await e(),enableBeforeUnload:!0,withResolver:!1};const t=!!(e.condition??!0),r=e.blockerFn;return{shouldBlockFn:async()=>t&&r!==void 0?await r():t,enableBeforeUnload:t,withResolver:r===void 0}}function pV(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=_V(e),a=ri(),{history:o}=a,[l,u]=R.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return R.useEffect(()=>{const _=async f=>{function p(v){const y=a.parseLocation(v),[,w,C]=a.getMatchedRoutes(y.pathname);return C===void 0?{routeId:"__notFound__",fullPath:y.pathname,pathname:y.pathname,params:w,search:a.options.parseSearch(v.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:y.pathname,params:w,search:a.options.parseSearch(v.search)}}const m=p(f.currentLocation),x=p(f.nextLocation);if(m.routeId==="__notFound__"&&x.routeId!=="__notFound__")return!1;const S=await t({action:f.action,current:m,next:x});if(!i)return S;if(!S)return!1;const b=await new Promise(v=>{u({status:"blocked",current:m,next:x,action:f.action,proceed:()=>v(!1),reset:()=>v(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),b};return s?void 0:o.block({blockerFn:_,enableBeforeUnload:r})},[t,r,s,i,o,a]),l}function UM(e){const n=ri({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return Bo(t.stores.__store,O5(e,t))}function mV(e){const n=ri();return Bo(n.stores.location,O5(e,n))}const H1=new WeakMap,_1=new WeakMap;function Ha(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))H1.set(s,(H1.get(s)??0)+1),(r=_1.get(s))==null||r.add(t)}function $p(e,n,t,r=!0){if(!n)return e;const s=new Map(n.map(l=>[l.id,l])),i=new Set(e.map(l=>l.id)),a=n.filter(l=>t.has(l.id)&&!i.has(l.id)),o=e.filter(l=>!t.has(l.id)||s.has(l.id)).map(l=>t.has(l.id)?s.get(l.id)??l:l);return r?[...a,...o]:[...o,...a]}async function e_(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?H1.get(s):void 0,a=await t();if(!s||H1.get(s)===i||s.state.fetchStatus!=="fetching"||e.getQueryCache().find({queryKey:n,exact:!0})!==s)return a;e.setQueryData(n,l=>l??a);const o=new Set;_1.set(s,o);try{const l=await t();return o.size?r(l,e.getQueryData(n),o):l}finally{_1.get(s)===o&&_1.delete(s)}}const Oh=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function GM(e){const n=e.queryKey[2];if(n==="resolvedFile")return Oh(e.queryKey[7]);const t=n==="getProjectFile"?e.queryKey[5]:n==="getCodeTree"?e.queryKey[4]:null;return typeof t=="object"&&t!==null&&"ref"in t&&Oh(t.ref)}function va(e,n=Ca(),t,r=!1){if(!Hn(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!GM(i)&&(!t||t(i))};r?tt.cancelQueries(s).then(()=>{Hn(n)&&tt.invalidateQueries(s)}):tt.invalidateQueries(s)}const WM=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],B5=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],gV=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...B5,...WM,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function vV(e,n=Ca(),t=!1){const r=tt.getQueryData([...n,"listChatSessions",e])??[],s=tt.getQueryData([...n,"listRuns",e])??[],i=tt.getQueryData([...n,"listExperiments",e])??[];va([...WM,...B5,"getRunDiff","getExperimentDiff","getCodeTree","getSessionWorktree","fileVersion","getProjectGitStatus","getOverleafState","getOverleafStatus"],n,a=>{const o=a.queryKey[2];return o==="getRunDiff"?s.some(l=>l.id===a.queryKey[3]):o==="getExperimentDiff"?i.some(l=>l.id===a.queryKey[3]):o==="getSessionWorktree"?r.some(l=>l.id===a.queryKey[3]):o==="fileVersion"?typeof a.queryKey[3]=="string"&&a.queryKey[3].startsWith(`/api/projects/${e}/`):a.queryKey[3]===e},t)}function Vv(e){const n=Ca();ou.add(e),Ha(tt,[...n,"listChatSessions"],e),tt.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])E5({queryKey:[...n,t,e]})}function bV(e){const n=Ca(),t=tt.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])Vv(r.id);E5({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const yV={hf:["getHfSettings","getComputeSettings","getEnvVars"],tinker:["getTinkerSettings","getComputeSettings","getEnvVars"],k8s:["getK8sSettings","getComputeSettings"],modal:["getModalSettings","getComputeSettings","getEnvVars"],slurm:["getSlurmSettings","getComputeSettings"],ray:["getRaySettings","getComputeSettings"],env:["getEnvVars","getHfSettings","getTinkerSettings","getModalSettings","getSlurmSettings","getRaySettings","getK8sSettings","getOpenResearchSettings","getComputeSettings","getHarnesses"],"data-dir":["getDataDir"],ssh:["getSshHosts","getSshConfig","getSshMasterStatus","getComputeSettings"],compute:["getComputeSettings"],git:["githubAccount","repoAccess","getProjectGitStatus"],profile:["getProfile"],"lit-sources":["getLitSources"],projects:["getProjectDefaults","getProjectGitStatus"],telemetry:["getTelemetry"]};function xV(e,n){var a;if(!Hn(n))return;const t=(o,l=n,u)=>va(o,l,u,!0),r=e.split("?")[0];if(/\/(ui-state|open|prewarm|validate|preflight)$/.test(r))return;const s=(a=/^\/api\/settings\/([^/]+)/.exec(r))==null?void 0:a[1];if(s){t(yV[s]??[],n);return}if(r==="/api/user-skills"){t(["listUserSkills","getSkills","getSkillContent"],n);return}if(r==="/api/latex-templates"){t(["listLatexTemplates"],n);return}if(r==="/api/overleaf/token"){t(["getOverleafSettings","getOverleafState","getOverleafStatus"],n);return}if(r.startsWith("/api/update/")){t(["getUpdateStatus","getLocalMachine"],n);return}if(r.startsWith("/api/remote/")||r.startsWith("/_orx/")){t(["listRemoteSessions"],n),tt.invalidateQueries({queryKey:["gateway","runtime"]});return}if(r.startsWith("/api/chat/")){r==="/api/chat/sessions"&&t(["getProjectStarterPrompts","listProjectActivity"],n);return}const i=/^\/api\/projects\/([^/]+)(.*)$/.exec(r);if(i){const[,o,l]=i;if(l.startsWith("/file")){vV(o,n,!0);return}t(["listProjects","listProjectActivity"],n),t(["getProjectGitStatus","getCodeTree","getProjectStarterPrompts"],n,u=>u.queryKey[3]===o);return}(r==="/api/projects"||r==="/api/onboarding/complete")&&t(["listProjects","listProjectActivity","getUiState","getProfile"],n)}const wV={},SV="en",$5=["en","zh-CN","fa"],VM="orx:locale",P5=["localStorage","preferredLanguage","baseLocale"],B9=[],G0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let $9=!1,T=()=>{var t;let e=P5;!G0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=YM(window.location.href));const n=kV(e);if(n)return $9||($9=!0,KM(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function kV(e,n){let t;for(const r of e){if(r==="baseLocale")t=SV;else if(r==="preferredLanguage"&&!G0)t=TV();else if(r==="localStorage"&&!G0)t=localStorage.getItem(VM)??void 0;else if(XM(r)&&q1.has(r)){const i=q1.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return NV(a)}}const s=W0(t);if(s)return s}}const CV=e=>{window.location.reload()};let KM=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=T()}catch{}const s=[];let i=P5;!G0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=YM(window.location.href));for(const l of i)if(l!=="baseLocale"){if(l==="localStorage"&&typeof window<"u")localStorage.setItem(VM,e);else if(XM(l)&&q1.has(l)){const u=q1.get(l);if(u){let _=u.setLocale(e);_ instanceof Promise&&(_=_.catch(f=>{throw new Error(`Custom strategy "${l}" setLocale failed.`,{cause:f})}),s.push(_))}}}const a=()=>{!G0&&t.reload&&window.location&&e!==r&&CV()};if(s.length)return Promise.all(s).then(()=>{a()});a()},EV=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function W0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of $5)if(t.toLowerCase()===n)return t}function QM(e){return!!e&&$5.some(n=>n===e)}function NV(e){const n=W0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${$5.join(", ")}`)}function zV(e,n){return e.exec(n.href)}function TV(){var n;if(!((n=navigator==null?void 0:navigator.languages)!=null&&n.length))return;const e=navigator.languages.map(t=>({fullTag:t,baseTag:t.split("-")[0]}));for(const t of e){const r=W0(t.fullTag);if(r)return r;const s=W0(t.baseTag);if(s)return s}}function jV(e){return AV(e)}function AV(e){const n=typeof e=="string"?new URL(e,EV()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&W0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let P9,F9;function RV(e){if(B9.length===0)return;const n=typeof e=="string"?e:e.href;if(P9===n)return F9;const t=new URL(n,"http://example.com"),r=jV(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of B9){const l=new wV(o.match,a.href);if(zV(l,a)){i=o;break}}if(i)break}return P9=n,F9=i,i}function YM(e){const n=RV(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:P5}const q1=new Map;function XM(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const MV=e=>`Actions for ${e==null?void 0:e.name}`,DV=e=>`${e==null?void 0:e.name} 的操作`,LV=e=>`عملیات ${e==null?void 0:e.name}`,OV=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?DV(e):t==="fa"?LV(e):MV(e)}),IV=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,BV=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,$V=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,PV=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?BV(e):t==="fa"?$V(e):IV(e)}),FV=e=>`Branch: ${e==null?void 0:e.branch}`,HV=e=>`分支:${e==null?void 0:e.branch}`,qV=e=>`شاخه: ${e==null?void 0:e.branch}`,UV=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?HV(e):t==="fa"?qV(e):FV(e)}),GV=e=>`Browse code on ${e==null?void 0:e.branch}`,WV=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,VV=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,ZM=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?WV(e):t==="fa"?VV(e):GV(e)}),KV=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,QV=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,YV=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,XV=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?QV(e):t==="fa"?YV(e):KV(e)}),ZV=e=>`Collapse ${e==null?void 0:e.name}`,JV=e=>`折叠 ${e==null?void 0:e.name}`,eK=e=>`بستن ${e==null?void 0:e.name}`,tK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?JV(e):t==="fa"?eK(e):ZV(e)}),nK=e=>`Committed changes versus ${e==null?void 0:e.parent}`,rK=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,sK=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,iK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?rK(e):t==="fa"?sK(e):nK(e)}),aK=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,oK=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,lK=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,cK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?oK(e):t==="fa"?lK(e):aK(e)}),uK=e=>`Copy ${e==null?void 0:e.value}`,fK=e=>`复制 ${e==null?void 0:e.value}`,dK=e=>`کپی ${e==null?void 0:e.value}`,hK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?fK(e):t==="fa"?dK(e):uK(e)}),_K=e=>`Delete ${e==null?void 0:e.name}`,pK=e=>`删除 ${e==null?void 0:e.name}`,mK=e=>`حذف ${e==null?void 0:e.name}`,m4=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?pK(e):t==="fa"?mK(e):_K(e)}),gK=e=>`Download ${e==null?void 0:e.name}`,vK=e=>`下载 ${e==null?void 0:e.name}`,bK=e=>`بارگیری ${e==null?void 0:e.name}`,H9=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?vK(e):t==="fa"?bK(e):gK(e)}),yK=e=>`Expand ${e==null?void 0:e.name}`,xK=e=>`展开 ${e==null?void 0:e.name}`,wK=e=>`باز کردن ${e==null?void 0:e.name}`,SK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?xK(e):t==="fa"?wK(e):yK(e)}),kK=e=>`Hide additional ${e==null?void 0:e.target}`,CK=e=>`隐藏其余${e==null?void 0:e.target}`,EK=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,NK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?CK(e):t==="fa"?EK(e):kK(e)}),zK=e=>`Hide error details for ${e==null?void 0:e.activity}`,TK=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,jK=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,AK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?TK(e):t==="fa"?jK(e):zK(e)}),RK=e=>`${e==null?void 0:e.count} consecutive identical calls`,MK=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,DK=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,LK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?MK(e):t==="fa"?DK(e):RK(e)}),OK=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,IK=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,BK=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,$K=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?IK(e):t==="fa"?BK(e):OK(e)}),PK=e=>`Open ${e==null?void 0:e.branch} on GitHub`,FK=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,HK=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,JM=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?FK(e):t==="fa"?HK(e):PK(e)}),qK=e=>`Open experiment ${e==null?void 0:e.name}`,UK=e=>`打开实验 ${e==null?void 0:e.name}`,GK=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,WK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?UK(e):t==="fa"?GK(e):qK(e)}),VK=e=>`Open ${e==null?void 0:e.path} in the right pane`,KK=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,QK=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,YK=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?KK(e):t==="fa"?QK(e):VK(e)}),XK=e=>`Open ${e==null?void 0:e.name}`,ZK=e=>`打开 ${e==null?void 0:e.name}`,JK=e=>`باز کردن ${e==null?void 0:e.name}`,eQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?ZK(e):t==="fa"?JK(e):XK(e)}),tQ=e=>`Open logs for run ${e==null?void 0:e.run}`,nQ=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,rQ=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,sQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?nQ(e):t==="fa"?rQ(e):tQ(e)}),iQ=e=>`Open ${e==null?void 0:e.name} on GitHub`,aQ=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,oQ=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,U1=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?aQ(e):t==="fa"?oQ(e):iQ(e)}),lQ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,cQ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,uQ=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,fQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cQ(e):t==="fa"?uQ(e):lQ(e)}),dQ=e=>`Overleaf — ${e==null?void 0:e.status}`,hQ=e=>`Overleaf — ${e==null?void 0:e.status}`,_Q=e=>`Overleaf — ${e==null?void 0:e.status}`,pQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?hQ(e):t==="fa"?_Q(e):dQ(e)}),mQ=e=>`Preview /${e==null?void 0:e.name} skill`,gQ=e=>`预览 /${e==null?void 0:e.name} 技能`,vQ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,bQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?gQ(e):t==="fa"?vQ(e):mQ(e)}),yQ=e=>`Remove annotation ${e==null?void 0:e.number}`,xQ=e=>`移除批注 ${e==null?void 0:e.number}`,wQ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,SQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?xQ(e):t==="fa"?wQ(e):yQ(e)}),kQ=e=>`Remove ${e==null?void 0:e.name}`,CQ=e=>`移除 ${e==null?void 0:e.name}`,EQ=e=>`حذف ${e==null?void 0:e.name}`,NQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?CQ(e):t==="fa"?EQ(e):kQ(e)}),zQ=e=>`Remove queued message: ${e==null?void 0:e.text}`,TQ=e=>`移除排队消息:${e==null?void 0:e.text}`,jQ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,AQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?TQ(e):t==="fa"?jQ(e):zQ(e)}),RQ=e=>`Retry queued message: ${e==null?void 0:e.text}`,MQ=e=>`重试排队消息:${e==null?void 0:e.text}`,DQ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,LQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?MQ(e):t==="fa"?DQ(e):RQ(e)}),OQ=e=>`Run ${e==null?void 0:e.id}`,IQ=e=>`运行 ${e==null?void 0:e.id}`,BQ=e=>`اجرای ${e==null?void 0:e.id}`,$Q=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?IQ(e):t==="fa"?BQ(e):OQ(e)}),PQ=e=>`Show error details for ${e==null?void 0:e.activity}`,FQ=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,HQ=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,qQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?FQ(e):t==="fa"?HQ(e):PQ(e)}),UQ=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,GQ=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,WQ=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,VQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?GQ(e):t==="fa"?WQ(e):UQ(e)}),KQ=e=>`${e==null?void 0:e.name} skill`,QQ=e=>`${e==null?void 0:e.name} 技能`,YQ=e=>`مهارت ${e==null?void 0:e.name}`,XQ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?QQ(e):t==="fa"?YQ(e):KQ(e)}),ZQ=e=>`Value for ${e==null?void 0:e.name}`,JQ=e=>`${e==null?void 0:e.name} 的值`,eY=e=>`مقدار ${e==null?void 0:e.name}`,tY=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?JQ(e):t==="fa"?eY(e):ZQ(e)}),nY=()=>"Agent reported back",rY=()=>"智能体已返回结果",sY=()=>"عامل نتیجه را گزارش کرد",iY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rY():t==="fa"?sY():nY()}),aY=()=>"Browse",oY=()=>"浏览",lY=()=>"مرور",cY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oY():t==="fa"?lY():aY()}),uY=()=>"Browsing…",fY=()=>"正在浏览…",dY=()=>"در حال مرور…",hY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fY():t==="fa"?dY():uY()}),_Y=()=>"Checked experiment status and updated notes",pY=()=>"已检查实验状态并更新笔记",mY=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",gY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pY():t==="fa"?mY():_Y()}),vY=()=>"Closed an agent",bY=()=>"已关闭智能体",yY=()=>"عامل بسته شد",xY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bY():t==="fa"?yY():vY()}),wY=()=>"Compacted context",SY=()=>"上下文已压缩",kY=()=>"زمینه فشرده شد",CY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SY():t==="fa"?kY():wY()}),EY=()=>"Compacting context…",NY=()=>"正在压缩上下文…",zY=()=>"در حال فشرده‌سازی زمینه…",TY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?NY():t==="fa"?zY():EY()}),jY=e=>`Created ${e==null?void 0:e.target}`,AY=e=>`已创建 ${e==null?void 0:e.target}`,RY=e=>`${e==null?void 0:e.target} ایجاد شد`,MY=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?AY(e):t==="fa"?RY(e):jY(e)}),DY=()=>"Delegate",LY=()=>"委派",OY=()=>"واگذاری",IY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LY():t==="fa"?OY():DY()}),BY=()=>"Delegating…",$Y=()=>"正在委派…",PY=()=>"در حال واگذاری…",FY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Y():t==="fa"?PY():BY()}),HY=e=>`Deleted ${e==null?void 0:e.target}`,qY=e=>`已删除 ${e==null?void 0:e.target}`,UY=e=>`${e==null?void 0:e.target} حذف شد`,GY=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?qY(e):t==="fa"?UY(e):HY(e)}),WY=()=>"Edit",VY=()=>"编辑",KY=()=>"ویرایش",QY=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VY():t==="fa"?KY():WY()}),YY=e=>`Edited ${e==null?void 0:e.target}`,XY=e=>`已编辑 ${e==null?void 0:e.target}`,ZY=e=>`${e==null?void 0:e.target} ویرایش شد`,JY=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?XY(e):t==="fa"?ZY(e):YY(e)}),eX=()=>"Editing…",tX=()=>"正在编辑…",nX=()=>"در حال ویرایش…",rX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tX():t==="fa"?nX():eX()}),sX=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,iX=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,aX=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,oX=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?iX(e):t==="fa"?aX(e):sX(e)}),lX=e=>`Listed files matching ${e==null?void 0:e.pattern}`,cX=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,uX=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,fX=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cX(e):t==="fa"?uX(e):lX(e)}),dX=()=>"Load",hX=()=>"加载",_X=()=>"بارگیری",pX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hX():t==="fa"?_X():dX()}),mX=()=>"Loaded a skill",gX=()=>"已加载技能",vX=()=>"یک مهارت بارگیری شد",bX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gX():t==="fa"?vX():mX()}),yX=e=>`Loaded ${e==null?void 0:e.name} skill`,xX=e=>`已加载技能 ${e==null?void 0:e.name}`,wX=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,SX=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?xX(e):t==="fa"?wX(e):yX(e)}),kX=()=>"Loading…",CX=()=>"正在加载…",EX=()=>"در حال بارگیری…",NX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CX():t==="fa"?EX():kX()}),zX=e=>`Opened ${e==null?void 0:e.target}`,TX=e=>`已打开 ${e==null?void 0:e.target}`,jX=e=>`${e==null?void 0:e.target} باز شد`,AX=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?TX(e):t==="fa"?jX(e):zX(e)}),RX=e=>`Ran ${e==null?void 0:e.command}`,MX=e=>`已运行 ${e==null?void 0:e.command}`,DX=e=>`${e==null?void 0:e.command} اجرا شد`,LX=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?MX(e):t==="fa"?DX(e):RX(e)}),OX=()=>"Ran a sub-agent",IX=()=>"已运行子智能体",BX=()=>"یک عامل فرعی اجرا شد",$X=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IX():t==="fa"?BX():OX()}),PX=()=>"Read",FX=()=>"读取",HX=()=>"خواندن",qX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FX():t==="fa"?HX():PX()}),UX=()=>"Read experiment notes",GX=()=>"已读取实验笔记",WX=()=>"یادداشت‌های آزمایش خوانده شد",VX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GX():t==="fa"?WX():UX()}),KX=()=>"Read a paper",QX=()=>"已读取论文",YX=()=>"یک مقاله خوانده شد",XX=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QX():t==="fa"?YX():KX()}),ZX=e=>`Read ${e==null?void 0:e.name} skill`,JX=e=>`已读取技能 ${e==null?void 0:e.name}`,eZ=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,c2=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?JX(e):t==="fa"?eZ(e):ZX(e)}),tZ=e=>`Read ${e==null?void 0:e.target}`,nZ=e=>`已读取 ${e==null?void 0:e.target}`,rZ=e=>`${e==null?void 0:e.target} خوانده شد`,n0=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?nZ(e):t==="fa"?rZ(e):tZ(e)}),sZ=()=>"Read a web page",iZ=()=>"已读取网页",aZ=()=>"یک صفحهٔ وب خوانده شد",oZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iZ():t==="fa"?aZ():sZ()}),lZ=()=>"Reading…",cZ=()=>"正在读取…",uZ=()=>"در حال خواندن…",fZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cZ():t==="fa"?uZ():lZ()}),dZ=()=>"Resumed an agent",hZ=()=>"已恢复智能体",_Z=()=>"عامل از سر گرفته شد",pZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hZ():t==="fa"?_Z():dZ()}),mZ=()=>"Review",gZ=()=>"查看",vZ=()=>"بازبینی",bZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gZ():t==="fa"?vZ():mZ()}),yZ=()=>"Reviewed run log",xZ=()=>"已查看运行日志",wZ=()=>"گزارش اجرا بازبینی شد",SZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xZ():t==="fa"?wZ():yZ()}),kZ=()=>"Reviewed run logs",CZ=()=>"已查看运行日志",EZ=()=>"گزارش‌های اجرا بازبینی شد",NZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CZ():t==="fa"?EZ():kZ()}),zZ=()=>"Reviewed experiment status and notes",TZ=()=>"已查看实验状态和笔记",jZ=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",AZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TZ():t==="fa"?jZ():zZ()}),RZ=()=>"Reviewing…",MZ=()=>"正在查看…",DZ=()=>"در حال بازبینی…",LZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MZ():t==="fa"?DZ():RZ()}),OZ=()=>"Run",IZ=()=>"运行",BZ=()=>"اجرا",$Z=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IZ():t==="fa"?BZ():OZ()}),PZ=()=>"Running…",FZ=()=>"正在运行…",HZ=()=>"در حال اجرا…",eD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FZ():t==="fa"?HZ():PZ()}),qZ=()=>"Search",UZ=()=>"搜索",GZ=()=>"جست‌وجو",WZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UZ():t==="fa"?GZ():qZ()}),VZ=()=>"Searched alphaXiv full text",KZ=()=>"已搜索 alphaXiv 全文",QZ=()=>"متن کامل alphaXiv جست‌وجو شد",YZ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KZ():t==="fa"?QZ():VZ()}),XZ=()=>"Searched alphaXiv semantically",ZZ=()=>"已对 alphaXiv 进行语义搜索",JZ=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",eJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZZ():t==="fa"?JZ():XZ()}),tJ=()=>"Searched bioRxiv",nJ=()=>"已搜索 bioRxiv",rJ=()=>"bioRxiv جست‌وجو شد",sJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nJ():t==="fa"?rJ():tJ()}),iJ=()=>"Searched code",aJ=()=>"已搜索代码",oJ=()=>"کد جست‌وجو شد",u2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aJ():t==="fa"?oJ():iJ()}),lJ=e=>`Searched code for “${e==null?void 0:e.pattern}”`,cJ=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,uJ=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,f2=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cJ(e):t==="fa"?uJ(e):lJ(e)}),fJ=e=>`Searched images for “${e==null?void 0:e.query}”`,dJ=e=>`已搜索图片“${e==null?void 0:e.query}”`,hJ=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,_J=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?dJ(e):t==="fa"?hJ(e):fJ(e)}),pJ=()=>"Searched the literature",mJ=()=>"已搜索文献",gJ=()=>"منابع علمی جست‌وجو شد",q9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mJ():t==="fa"?gJ():pJ()}),vJ=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,bJ=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,yJ=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,xJ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?bJ(e):t==="fa"?yJ(e):vJ(e)}),wJ=()=>"Searched OpenAlex",SJ=()=>"已搜索 OpenAlex",kJ=()=>"OpenAlex جست‌وجو شد",CJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SJ():t==="fa"?kJ():wJ()}),EJ=e=>`Searched the web for “${e==null?void 0:e.query}”`,NJ=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,zJ=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,U9=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?NJ(e):t==="fa"?zJ(e):EJ(e)}),TJ=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,jJ=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,AJ=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,RJ=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?jJ(e):t==="fa"?AJ(e):TJ(e)}),MJ=()=>"Searching…",DJ=()=>"正在搜索…",LJ=()=>"در حال جست‌وجو…",OJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?DJ():t==="fa"?LJ():MJ()}),IJ=()=>"Sent input to an agent",BJ=()=>"已向智能体发送输入",$J=()=>"ورودی به عامل فرستاده شد",PJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?BJ():t==="fa"?$J():IJ()}),FJ=()=>"Spawned an agent",HJ=()=>"已创建智能体",qJ=()=>"یک عامل ساخته شد",UJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?HJ():t==="fa"?qJ():FJ()}),GJ=()=>"Sub-agent",WJ=()=>"子智能体",VJ=()=>"عامل فرعی",KJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?WJ():t==="fa"?VJ():GJ()}),QJ=()=>"Sub-agent interrupted",YJ=()=>"子智能体已中断",XJ=()=>"عامل فرعی متوقف شد",ZJ=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YJ():t==="fa"?XJ():QJ()}),JJ=()=>"Sub-agent started",eee=()=>"子智能体已启动",tee=()=>"عامل فرعی آغاز شد",nee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eee():t==="fa"?tee():JJ()}),ree=()=>"Updated experiment notes",see=()=>"已更新实验笔记",iee=()=>"یادداشت‌های آزمایش به‌روز شد",aee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?see():t==="fa"?iee():ree()}),oee=()=>"Waiting on an agent",lee=()=>"正在等待智能体",cee=()=>"در انتظار عامل",uee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lee():t==="fa"?cee():oee()}),fee=e=>`Approval required: ${e==null?void 0:e.label}`,dee=e=>`需要批准:${e==null?void 0:e.label}`,hee=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,G9=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?dee(e):t==="fa"?hee(e):fee(e)}),_ee=()=>"The CLI is retrying the turn.",pee=()=>"CLI 正在重试本轮。",mee=()=>"CLI در حال تلاش دوباره برای این نوبت است.",gee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pee():t==="fa"?mee():_ee()}),vee=()=>"Continue is available.",bee=()=>"可以继续。",yee=()=>"ادامه در دسترس است.",xee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bee():t==="fa"?yee():vee()}),wee=()=>"Retry is available.",See=()=>"可以重试。",kee=()=>"تلاش دوباره در دسترس است.",Cee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?See():t==="fa"?kee():wee()}),Eee=()=>"Running a tool",Nee=()=>"正在运行工具",zee=()=>"در حال اجرای ابزار",Tee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nee():t==="fa"?zee():Eee()}),jee=()=>"Tool activity completed",Aee=()=>"工具活动已完成",Ree=()=>"فعالیت ابزار کامل شد",Mee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Aee():t==="fa"?Ree():jee()}),Dee=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,Lee=e=>`工具活动失败:${e==null?void 0:e.labels}`,Oee=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,Iee=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Lee(e):t==="fa"?Oee(e):Dee(e)}),Bee=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,$ee=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,Pee=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,Fee=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?$ee(e):t==="fa"?Pee(e):Bee(e)}),Hee=()=>"Turn did not finish.",qee=()=>"本轮未完成。",Uee=()=>"این نوبت کامل نشد.",Gee=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qee():t==="fa"?Uee():Hee()}),Wee=()=>"Artifacts",Vee=()=>"产物",Kee=()=>"خروجی‌ها",tD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vee():t==="fa"?Kee():Wee()}),Qee=()=>"Close panel",Yee=()=>"关闭面板",Xee=()=>"بستن پنل",G1=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yee():t==="fa"?Xee():Qee()}),Zee=()=>"Current task",Jee=()=>"当前任务",ete=()=>"وظیفهٔ فعلی",W9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Jee():t==="fa"?ete():Zee()}),tte=()=>"Drag to resize panel",nte=()=>"拖动以调整面板大小",rte=()=>"برای تغییر اندازهٔ پنل بکشید",ste=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nte():t==="fa"?rte():tte()}),ite=()=>"Drag toward the center to restore panel",ate=()=>"向中央拖动以恢复面板",ote=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",lte=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ate():t==="fa"?ote():ite()}),cte=()=>"Entire project",ute=()=>"整个项目",fte=()=>"کل پروژه",V9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ute():t==="fa"?fte():cte()}),dte=()=>"Expand panel",hte=()=>"展开面板",_te=()=>"گسترش پنل",K9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hte():t==="fa"?_te():dte()}),pte=e=>`Experiment filter: ${e==null?void 0:e.scope}`,mte=e=>`实验筛选:${e==null?void 0:e.scope}`,gte=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,vte=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?mte(e):t==="fa"?gte(e):pte(e)}),bte=()=>"Experiment view",yte=()=>"实验视图",xte=()=>"نمای آزمایش",wte=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yte():t==="fa"?xte():bte()}),Ste=()=>"Experiments",kte=()=>"实验",Cte=()=>"آزمایش‌ها",nD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kte():t==="fa"?Cte():Ste()}),Ete=()=>"Files",Nte=()=>"文件",zte=()=>"فایل‌ها",g4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nte():t==="fa"?zte():Ete()}),Tte=()=>"Filter experiments",jte=()=>"筛选实验",Ate=()=>"فیلتر آزمایش‌ها",Rte=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jte():t==="fa"?Ate():Tte()}),Mte=()=>"Current task filtering is unavailable for unattributed experiments",Dte=()=>"存在无法归属的实验时,不能按当前任务筛选",Lte=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",Ote=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Dte():t==="fa"?Lte():Mte()}),Ite=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",Bte=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",$te=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Pte=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bte():t==="fa"?$te():Ite()}),Fte=()=>"Open a task to filter to its experiments",Hte=()=>"请打开一个任务以筛选其实验",qte=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",Ute=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hte():t==="fa"?qte():Fte()}),Gte=()=>"projects",Wte=()=>"项目",Vte=()=>"پروژه‌ها",z0=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wte():t==="fa"?Vte():Gte()}),Kte=()=>"Restore panel",Qte=()=>"还原面板",Yte=()=>"بازگرداندن اندازهٔ پنل",Q9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Qte():t==="fa"?Yte():Kte()}),Xte=()=>"Retry",Zte=()=>"重试",Jte=()=>"تلاش دوباره",qi=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zte():t==="fa"?Jte():Xte()}),ene=()=>"Select a project to browse its files.",tne=()=>"选择一个项目以浏览其文件。",nne=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",rne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tne():t==="fa"?nne():ene()}),sne=()=>"settings",ine=()=>"设置",ane=()=>"تنظیمات",one=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ine():t==="fa"?ane():sne()}),lne=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,cne=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,une=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,fne=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cne(e):t==="fa"?une(e):lne(e)}),dne=()=>"Sub-agent",hne=()=>"子智能体",_ne=()=>"عامل فرعی",pne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hne():t==="fa"?_ne():dne()}),mne=()=>"Table",gne=()=>"表格",vne=()=>"جدول",bne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gne():t==="fa"?vne():mne()}),yne=()=>"Tree",xne=()=>"树状图",wne=()=>"درخت",Sne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xne():t==="fa"?wne():yne()}),kne=e=>`Collapse ${e==null?void 0:e.name}`,Cne=e=>`折叠 ${e==null?void 0:e.name}`,Ene=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,Nne=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Cne(e):t==="fa"?Ene(e):kne(e)}),zne=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,Tne=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,jne=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,F5=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Tne(e):t==="fa"?jne(e):zne(e)}),Ane=e=>`Delete folder ${e==null?void 0:e.name}`,Rne=e=>`删除文件夹 ${e==null?void 0:e.name}`,Mne=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,Dne=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Rne(e):t==="fa"?Mne(e):Ane(e)}),Lne=e=>`Expand ${e==null?void 0:e.name}`,One=e=>`展开 ${e==null?void 0:e.name}`,Ine=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,Bne=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?One(e):t==="fa"?Ine(e):Lne(e)}),$ne=()=>"Binary or unsupported file — no inline preview.",Pne=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",Fne=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",Hne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pne():t==="fa"?Fne():$ne()}),qne=()=>"Copy path",Une=()=>"复制路径",Gne=()=>"کپی مسیر",Wne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Une():t==="fa"?Gne():qne()}),Vne=()=>"Artifact not found",Kne=()=>"找不到产物",Qne=()=>"خروجی پیدا نشد",Yne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kne():t==="fa"?Qne():Vne()}),Xne=()=>"Open raw",Zne=()=>"打开原始文件",Jne=()=>"باز کردن فایل خام",ere=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zne():t==="fa"?Jne():Xne()}),tre=()=>"Click an artifact to view it",nre=()=>"点击产物即可查看",rre=()=>"برای مشاهده، یک خروجی را انتخاب کنید",sre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nre():t==="fa"?rre():tre()}),ire=()=>"Delete artifact",are=()=>"删除产物",ore=()=>"حذف خروجی",Y9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?are():t==="fa"?ore():ire()}),lre=()=>"Delete folder",cre=()=>"删除文件夹",ure=()=>"حذف پوشه",fre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cre():t==="fa"?ure():lre()}),dre=()=>"Failed to load:",hre=()=>"加载失败:",_re=()=>"بارگیری ناموفق بود:",pre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hre():t==="fa"?_re():dre()}),mre=()=>"File truncated — showing the first 512 KB.",gre=()=>"文件已截断——仅显示前 512 KB。",vre=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",bre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gre():t==="fa"?vre():mre()}),yre=()=>"Listing truncated — the folder has more artifacts.",xre=()=>"列表已截断——文件夹中还有更多产物。",wre=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",Sre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xre():t==="fa"?wre():yre()}),kre=()=>"Loading…",Cre=()=>"正在加载…",Ere=()=>"در حال بارگیری…",rD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cre():t==="fa"?Ere():kre()}),Nre=()=>"Loading artifacts…",zre=()=>"正在加载产物…",Tre=()=>"در حال بارگیری خروجی‌ها…",jre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zre():t==="fa"?Tre():Nre()}),Are=()=>"Modified",Rre=()=>"修改时间",Mre=()=>"ویرایش‌شده",Dre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rre():t==="fa"?Mre():Are()}),Lre=()=>"No artifacts yet",Ore=()=>"尚无产物",Ire=()=>"هنوز خروجی‌ای وجود ندارد",Bre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ore():t==="fa"?Ire():Lre()}),$re=()=>"Open raw in new tab",Pre=()=>"在新标签页中打开原始文件",Fre=()=>"باز کردن فایل خام در زبانهٔ جدید",X9=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pre():t==="fa"?Fre():$re()}),Hre=()=>"This is the project's durable output space for reports, figures, images, CSVs, PDFs, and other research artifacts. Ask the agent for a write-up or add your own files.",qre=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",Ure=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",Gre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qre():t==="fa"?Ure():Hre()}),Wre=()=>"File too large to preview inline.",Vre=()=>"文件太大,无法内嵌预览。",Kre=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",Qre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vre():t==="fa"?Kre():Wre()}),Yre=()=>"This is the baseline branch, so there is no parent comparison.",Xre=()=>"这是基线分支,因此没有父分支可供比较。",Zre=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",Jre=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xre():t==="fa"?Zre():Yre()}),ese=()=>"Failed to load changes:",tse=()=>"加载更改失败:",nse=()=>"بارگیری تغییرات ناموفق بود:",rse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tse():t==="fa"?nse():ese()}),sse=()=>"Loading changes…",ise=()=>"正在加载更改…",ase=()=>"در حال بارگیری تغییرات…",ose=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ise():t==="fa"?ase():sse()}),lse=()=>"No committed changes from the parent branch.",cse=()=>"与父分支相比没有已提交的更改。",use=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",fse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cse():t==="fa"?use():lse()}),dse=e=>`agent ${e==null?void 0:e.number}`,hse=e=>`智能体 ${e==null?void 0:e.number}`,_se=e=>`عامل ${e==null?void 0:e.number}`,Z9=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?hse(e):t==="fa"?_se(e):dse(e)}),pse=()=>"agent sessions",mse=()=>"智能体会话",gse=()=>"نشست‌های عامل‌ها",vse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mse():t==="fa"?gse():pse()}),bse=()=>"All sessions",yse=()=>"所有会话",xse=()=>"همهٔ نشست‌ها",sD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yse():t==="fa"?xse():bse()}),wse=e=>`${e==null?void 0:e.count} annotations`,Sse=e=>`${e==null?void 0:e.count} 条批注`,kse=e=>`${e==null?void 0:e.count} یادداشت`,Cse=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Sse(e):t==="fa"?kse(e):wse(e)}),Ese=()=>"Archive",Nse=()=>"归档",zse=()=>"بایگانی",Tse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nse():t==="fa"?zse():Ese()}),jse=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",Ase=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",Rse=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",Mse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ase():t==="fa"?Rse():jse()}),Dse=()=>"Asked about selected text",Lse=()=>"已询问所选文本",Ose=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",Ise=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lse():t==="fa"?Ose():Dse()}),Bse=()=>"Attachment",$se=()=>"附件",Pse=()=>"پیوست",Fse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$se():t==="fa"?Pse():Bse()}),Hse=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,qse=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,Use=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,Gse=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?qse(e):t==="fa"?Use(e):Hse(e)}),Wse=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",Vse=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",Kse=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",Qse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vse():t==="fa"?Kse():Wse()}),Yse=()=>"Wait for the turn to finish before running a command.",Xse=()=>"请等待本轮结束后再运行命令。",Zse=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",Jse=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xse():t==="fa"?Zse():Yse()}),eie=e=>`Exited with code ${e==null?void 0:e.code}`,tie=e=>`退出码 ${e==null?void 0:e.code}`,nie=e=>`با کد ${e==null?void 0:e.code} خارج شد`,rie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?tie(e):t==="fa"?nie(e):eie(e)}),sie=e=>`Command not run: ${e==null?void 0:e.error}`,iie=e=>`命令未运行:${e==null?void 0:e.error}`,aie=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,J9=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?iie(e):t==="fa"?aie(e):sie(e)}),oie=()=>"Collapse tool activity",lie=()=>"折叠工具活动",cie=()=>"بستن فعالیت ابزارها",uie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lie():t==="fa"?cie():oie()}),fie=()=>"Continue",die=()=>"继续",hie=()=>"ادامه",_ie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?die():t==="fa"?hie():fie()}),pie=e=>`Delete “${e==null?void 0:e.title}”? + +Its transcript will be permanently removed.`,mie=e=>`删除“${e==null?void 0:e.title}”? + +其对话记录将被永久移除。`,gie=e=>`«${e==null?void 0:e.title}» حذف شود؟ + +رونوشت آن برای همیشه حذف خواهد شد.`,vie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?mie(e):t==="fa"?gie(e):pie(e)}),bie=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,yie=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,xie=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,wie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?yie(e):t==="fa"?xie(e):bie(e)}),Sie=()=>"Could not exit Plan mode. Try again.",kie=()=>"无法退出计划模式。请重试。",Cie=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",Eie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kie():t==="fa"?Cie():Sie()}),Nie=()=>"Expand tool activity",zie=()=>"展开工具活动",Tie=()=>"باز کردن فعالیت ابزارها",jie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zie():t==="fa"?Tie():Nie()}),Aie=()=>"experiments",Rie=()=>"实验",Mie=()=>"آزمایش‌ها",Die=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rie():t==="fa"?Mie():Aie()}),Lie=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,Oie=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,Iie=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,Bie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Oie(e):t==="fa"?Iie(e):Lie(e)}),$ie=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,Pie=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,Fie=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,Hie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Pie(e):t==="fa"?Fie(e):$ie(e)}),qie=e=>`Message not sent: ${e==null?void 0:e.error}`,Uie=e=>`消息未发送:${e==null?void 0:e.error}`,Gie=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,Wie=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Uie(e):t==="fa"?Gie(e):qie(e)}),Vie=()=>"New session",Kie=()=>"新会话",Qie=()=>"نشست جدید",eE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kie():t==="fa"?Qie():Vie()}),Yie=()=>"No active sessions",Xie=()=>"没有活跃会话",Zie=()=>"نشست فعالی وجود ندارد",Jie=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xie():t==="fa"?Zie():Yie()}),eae=()=>"No activity",tae=()=>"无活动",nae=()=>"بدون فعالیت",rae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tae():t==="fa"?nae():eae()}),sae=()=>"No archived sessions",iae=()=>"没有已归档的会话",aae=()=>"نشست بایگانی‌شده‌ای وجود ندارد",oae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iae():t==="fa"?aae():sae()}),lae=()=>"No sessions yet",cae=()=>"还没有会话",uae=()=>"هنوز نشستی وجود ندارد",fae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cae():t==="fa"?uae():lae()}),dae=()=>"1 annotation",hae=()=>"1 条批注",_ae=()=>"۱ یادداشت",pae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hae():t==="fa"?_ae():dae()}),mae=()=>"Open sub-agent transcript",gae=()=>"打开子智能体记录",vae=()=>"باز کردن متن گفت‌وگوی عامل فرعی",bae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gae():t==="fa"?vae():mae()}),yae=()=>"About this demo",xae=()=>"关于此演示",wae=()=>"دربارهٔ این نسخهٔ نمایشی",tE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xae():t==="fa"?wae():yae()}),Sae=()=>"Accept and auto mode",kae=()=>"接受并使用自动模式",Cae=()=>"پذیرش و حالت خودکار",Eae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kae():t==="fa"?Cae():Sae()}),Nae=()=>"Accept and bypass all",zae=()=>"接受并跳过所有审批",Tae=()=>"پذیرش و عبور از همهٔ تأییدها",jae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zae():t==="fa"?Tae():Nae()}),Aae=()=>"Active",Rae=()=>"活跃",Mae=()=>"فعال",Dae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rae():t==="fa"?Mae():Aae()}),Lae=()=>"All",Oae=()=>"全部",Iae=()=>"همه",Bae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Oae():t==="fa"?Iae():Lae()}),$ae=()=>"Allow",Pae=()=>"允许",Fae=()=>"اجازه دادن",Hae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pae():t==="fa"?Fae():$ae()}),qae=()=>"Approval required",Uae=()=>"需要批准",Gae=()=>"نیازمند تأیید",Wae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Uae():t==="fa"?Gae():qae()}),Vae=()=>"Archived",Kae=()=>"已归档",Qae=()=>"بایگانی‌شده",nE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kae():t==="fa"?Qae():Vae()}),Yae=()=>"Ask about this",Xae=()=>"询问此内容",Zae=()=>"دربارهٔ این بپرسید",Jae=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xae():t==="fa"?Zae():Yae()}),eoe=()=>"Attach a PDF or image",toe=()=>"附加 PDF 或图片",noe=()=>"پیوست PDF یا تصویر",rE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?toe():t==="fa"?noe():eoe()}),roe=()=>"Bash",soe=()=>"Bash",ioe=()=>"Bash",iD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?soe():t==="fa"?ioe():roe()}),aoe=()=>"Browsed the web",ooe=()=>"已浏览网页",loe=()=>"وب مرور شد",sE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ooe():t==="fa"?loe():aoe()}),coe=()=>"Built the project",uoe=()=>"已构建项目",foe=()=>"پروژه ساخته شد",doe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uoe():t==="fa"?foe():coe()}),hoe=()=>"Cancel",_oe=()=>"取消",poe=()=>"لغو",moe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_oe():t==="fa"?poe():hoe()}),goe=()=>"Cancelled an experiment run",voe=()=>"已取消实验运行",boe=()=>"اجرای آزمایش لغو شد",yoe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?voe():t==="fa"?boe():goe()}),xoe=()=>"Checked code style",woe=()=>"已检查代码风格",Soe=()=>"سبک کد بررسی شد",koe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?woe():t==="fa"?Soe():xoe()}),Coe=()=>"Checked compute options",Eoe=()=>"已检查算力选项",Noe=()=>"گزینه‌های رایانشی بررسی شد",zoe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Eoe():t==="fa"?Noe():Coe()}),Toe=()=>"Checked experiment status",joe=()=>"已检查实验状态",Aoe=()=>"وضعیت آزمایش بررسی شد",iE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?joe():t==="fa"?Aoe():Toe()}),Roe=()=>"Checked Git status",Moe=()=>"已检查 Git 状态",Doe=()=>"وضعیت Git بررسی شد",Loe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Moe():t==="fa"?Doe():Roe()}),Ooe=()=>"Checked local times",Ioe=()=>"已查询当地时间",Boe=()=>"زمان‌های محلی بررسی شد",$oe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ioe():t==="fa"?Boe():Ooe()}),Poe=()=>"Checked market data",Foe=()=>"已查询市场数据",Hoe=()=>"داده‌های بازار بررسی شد",qoe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Foe():t==="fa"?Hoe():Poe()}),Uoe=()=>"Checked sports data",Goe=()=>"已查询体育数据",Woe=()=>"داده‌های ورزشی بررسی شد",Voe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Goe():t==="fa"?Woe():Uoe()}),Koe=()=>"Checked the weather",Qoe=()=>"已查询天气",Yoe=()=>"آب‌وهوا بررسی شد",Xoe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Qoe():t==="fa"?Yoe():Koe()}),Zoe=()=>"Checked types",Joe=()=>"已检查类型",ele=()=>"نوع‌ها بررسی شد",tle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Joe():t==="fa"?ele():Zoe()}),nle=()=>"Clear annotations",rle=()=>"清除批注",sle=()=>"پاک کردن یادداشت‌ها",aE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rle():t==="fa"?sle():nle()}),ile=()=>"Customize",ale=()=>"自定义",ole=()=>"سفارشی‌سازی",lle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ale():t==="fa"?ole():ile()}),cle=()=>"Data sources",ule=()=>"数据源",fle=()=>"منابع داده",d2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ule():t==="fa"?fle():cle()}),dle=()=>"Delegated a task to a new agent",hle=()=>"已将任务委派给新智能体",_le=()=>"وظیفه به عامل جدید واگذار شد",ple=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hle():t==="fa"?_le():dle()}),mle=()=>"Delete",gle=()=>"删除",vle=()=>"حذف",aD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gle():t==="fa"?vle():mle()}),ble=()=>"Deny",yle=()=>"拒绝",xle=()=>"رد کردن",wle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yle():t==="fa"?xle():ble()}),Sle=()=>"Edit and re-send",kle=()=>"编辑并重新发送",Cle=()=>"ویرایش و ارسال دوباره",oE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kle():t==="fa"?Cle():Sle()}),Ele=()=>"Edit message",Nle=()=>"编辑消息",zle=()=>"ویرایش پیام",Tle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nle():t==="fa"?zle():Ele()}),jle=()=>"Edited a file",Ale=()=>"已编辑文件",Rle=()=>"فایل ویرایش شد",lE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ale():t==="fa"?Rle():jle()}),Mle=()=>"Exit Bash mode",Dle=()=>"退出 Bash 模式",Lle=()=>"خروج از حالت Bash",cE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Dle():t==="fa"?Lle():Mle()}),Ole=()=>"Exit Plan mode",Ile=()=>"退出计划模式",Ble=()=>"خروج از حالت طرح",uE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ile():t==="fa"?Ble():Ole()}),$le=()=>"Failed:",Ple=()=>"失败:",Fle=()=>"ناموفق:",H5=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ple():t==="fa"?Fle():$le()}),Hle=()=>"Filter sessions",qle=()=>"筛选会话",Ule=()=>"فیلتر نشست‌ها",fE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qle():t==="fa"?Ule():Hle()}),Gle=()=>"is unavailable.",Wle=()=>"不可用。",Vle=()=>"در دسترس نیست.",Kle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wle():t==="fa"?Vle():Gle()}),Qle=()=>"Later queued messages will wait until this is retried or removed.",Yle=()=>"后续排队的消息会等待此消息重试或移除。",Xle=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",Zle=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yle():t==="fa"?Xle():Qle()}),Jle=()=>"Listed files",ece=()=>"已列出文件",tce=()=>"فایل‌ها فهرست شد",dE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ece():t==="fa"?tce():Jle()}),nce=()=>"Listed project runs",rce=()=>"已列出项目运行",sce=()=>"اجراهای پروژه فهرست شد",ice=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rce():t==="fa"?sce():nce()}),ace=()=>"Listed projects",oce=()=>"已列出项目",lce=()=>"پروژه‌ها فهرست شد",cce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oce():t==="fa"?lce():ace()}),uce=()=>"Loading conversation…",fce=()=>"正在加载对话…",dce=()=>"در حال بارگیری گفتگو…",hce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fce():t==="fa"?dce():uce()}),_ce=()=>"New Chat",pce=()=>"新对话",mce=()=>"گفتگوی جدید",gce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pce():t==="fa"?mce():_ce()}),vce=()=>"Next version",bce=()=>"下一版本",yce=()=>"نسخهٔ بعدی",hE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bce():t==="fa"?yce():vce()}),xce=()=>"Open the session this agent spawned",wce=()=>"打开此智能体创建的会话",Sce=()=>"باز کردن نشست ساخته‌شده توسط این عامل",kce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wce():t==="fa"?Sce():xce()}),Cce=()=>"Opened web pages",Ece=()=>"已打开网页",Nce=()=>"صفحه‌های وب باز شد",zce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ece():t==="fa"?Nce():Cce()}),Tce=()=>"Plan",jce=()=>"计划",Ace=()=>"طرح",Rce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jce():t==="fa"?Ace():Tce()}),Mce=()=>"Plan approved",Dce=()=>"计划已批准",Lce=()=>"طرح تأیید شد",Oce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Dce():t==="fa"?Lce():Mce()}),Ice=()=>"Plan rejected",Bce=()=>"计划已拒绝",$ce=()=>"طرح رد شد",Pce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bce():t==="fa"?$ce():Ice()}),Fce=()=>"Plan resolved",Hce=()=>"计划已处理",qce=()=>"طرح تعیین تکلیف شد",Uce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hce():t==="fa"?qce():Fce()}),Gce=()=>"Plan revision requested",Wce=()=>"已请求修改计划",Vce=()=>"درخواست بازنگری طرح ثبت شد",Kce=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wce():t==="fa"?Vce():Gce()}),Qce=()=>"Previous version",Yce=()=>"上一版本",Xce=()=>"نسخهٔ قبلی",_E=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yce():t==="fa"?Xce():Qce()}),Zce=()=>"Ran a command",Jce=()=>"已运行命令",eue=()=>"فرمان اجرا شد",tue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Jce():t==="fa"?eue():Zce()}),nue=()=>"Ran tests",rue=()=>"已运行测试",sue=()=>"آزمون‌ها اجرا شد",iue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rue():t==="fa"?sue():nue()}),aue=()=>"Read a file",oue=()=>"已读取文件",lue=()=>"فایل خوانده شد",cue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oue():t==="fa"?lue():aue()}),uue=()=>"Read Git history",fue=()=>"已读取 Git 历史",due=()=>"تاریخچهٔ Git خوانده شد",hue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fue():t==="fa"?due():uue()}),_ue=()=>"Read project details",pue=()=>"已读取项目详情",mue=()=>"جزئیات پروژه خوانده شد",gue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pue():t==="fa"?mue():_ue()}),vue=()=>"Reject",bue=()=>"拒绝",yue=()=>"رد کردن",xue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bue():t==="fa"?yue():vue()}),wue=()=>"Remove",Sue=()=>"移除",kue=()=>"حذف",Cue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sue():t==="fa"?kue():wue()}),Eue=()=>"Remove annotation",Nue=()=>"移除批注",zue=()=>"حذف یادداشت",Tue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nue():t==="fa"?zue():Eue()}),jue=()=>"Remove file",Aue=()=>"移除文件",Rue=()=>"حذف فایل",pE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Aue():t==="fa"?Rue():jue()}),Mue=()=>"Remove image",Due=()=>"移除图片",Lue=()=>"حذف تصویر",mE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Due():t==="fa"?Lue():Mue()}),Oue=()=>"Remove queued message",Iue=()=>"移除排队消息",Bue=()=>"حذف پیام صف",gE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Iue():t==="fa"?Bue():Oue()}),$ue=()=>"Rename",Pue=()=>"重命名",Fue=()=>"تغییر نام",oD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pue():t==="fa"?Fue():$ue()}),Hue=()=>"Reviewed code changes",que=()=>"已审查代码更改",Uue=()=>"تغییرات کد بازبینی شد",Gue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?que():t==="fa"?Uue():Hue()}),Wue=()=>"Run",Vue=()=>"运行",Kue=()=>"اجرا",vE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vue():t==="fa"?Kue():Wue()}),Que=()=>"Selected chat text",Yue=()=>"已选聊天文本",Xue=()=>"متن انتخاب‌شدهٔ گفتگو",Zue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yue():t==="fa"?Xue():Que()}),Jue=()=>"Selected text:",efe=()=>"已选文本:",tfe=()=>"متن انتخاب‌شده:",nfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?efe():t==="fa"?tfe():Jue()}),rfe=()=>"Send",sfe=()=>"发送",ife=()=>"ارسال",v4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sfe():t==="fa"?ife():rfe()}),afe=()=>"Session options",ofe=()=>"会话选项",lfe=()=>"گزینه‌های نشست",bE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ofe():t==="fa"?lfe():afe()}),cfe=()=>"Session title",ufe=()=>"会话标题",ffe=()=>"عنوان نشست",dfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ufe():t==="fa"?ffe():cfe()}),hfe=()=>"Show sidebar",_fe=()=>"显示侧边栏",pfe=()=>"نمایش نوار کناری",yE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_fe():t==="fa"?pfe():hfe()}),mfe=()=>"Started an experiment run",gfe=()=>"已启动实验运行",vfe=()=>"اجرای آزمایش آغاز شد",bfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gfe():t==="fa"?vfe():mfe()}),yfe=()=>"Reading the project to suggest where to start…",xfe=()=>"正在阅读项目以建议从哪里开始…",wfe=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",Sfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xfe():t==="fa"?wfe():yfe()}),kfe=()=>"Starter prompts",Cfe=()=>"入门提示",Efe=()=>"پیشنهادهای شروع",Nfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cfe():t==="fa"?Efe():kfe()}),zfe=()=>"Stop",Tfe=()=>"停止",jfe=()=>"توقف",xE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tfe():t==="fa"?jfe():zfe()}),Afe=()=>"Submit",Rfe=()=>"提交",Mfe=()=>"ارسال",Dfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rfe():t==="fa"?Mfe():Afe()}),Lfe=()=>"Tool failed",Ofe=()=>"工具失败",Ife=()=>"ابزار ناموفق بود",Bfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ofe():t==="fa"?Ife():Lfe()}),$fe=()=>"Used tools",Pfe=()=>"已使用工具",Ffe=()=>"ابزارها استفاده شد",lD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pfe():t==="fa"?Ffe():$fe()}),Hfe=()=>"View full plan",qfe=()=>"查看完整计划",Ufe=()=>"مشاهدهٔ طرح کامل",Gfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qfe():t==="fa"?Ufe():Hfe()}),Wfe=()=>"Waited for an experiment run",Vfe=()=>"已等待实验运行",Kfe=()=>"برای اجرای آزمایش صبر شد",Qfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vfe():t==="fa"?Kfe():Wfe()}),Yfe=()=>"Waiting for your input…",Xfe=()=>"正在等待你的输入…",Zfe=()=>"منتظر ورودی شما…",Jfe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xfe():t==="fa"?Zfe():Yfe()}),ede=()=>"What should we research?",tde=()=>"我们应该研究什么?",nde=()=>"چه چیزی را پژوهش کنیم؟",rde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tde():t==="fa"?nde():ede()}),sde=()=>"You, mid-task",ide=()=>"你(任务进行中)",ade=()=>"شما، هنگام انجام وظیفه",ode=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ide():t==="fa"?ade():sde()}),lde=()=>"Pasted image",cde=()=>"粘贴的图片",ude=()=>"تصویر جای‌گذاری‌شده",fde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cde():t==="fa"?ude():lde()}),dde=()=>"Plan",hde=()=>"计划",_de=()=>"طرح",cD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hde():t==="fa"?_de():dde()}),pde=()=>"Plan mode — ready to proceed?",mde=()=>"计划模式 — 准备好继续了吗?",gde=()=>"حالت طرح — آماده‌اید ادامه دهید؟",vde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mde():t==="fa"?gde():pde()}),bde=()=>"Proposed plan",yde=()=>"提议的计划",xde=()=>"طرح پیشنهادی",wE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yde():t==="fa"?xde():bde()}),wde=()=>"Question",Sde=()=>"问题",kde=()=>"پرسش",Cde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sde():t==="fa"?kde():wde()}),Ede=()=>"Queued",Nde=()=>"已排队",zde=()=>"در صف",Tde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nde():t==="fa"?zde():Ede()}),jde=()=>"Recents",Ade=()=>"最近",Rde=()=>"اخیر",uD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ade():t==="fa"?Rde():jde()}),Mde=()=>"Re-check its setup.",Dde=()=>"请重新检查其设置。",Lde=()=>"راه‌اندازی آن را دوباره بررسی کنید.",Ode=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Dde():t==="fa"?Lde():Mde()}),Ide=()=>"Could not recover this turn. Try again.",Bde=()=>"无法恢复本轮。请重试。",$de=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",Pde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bde():t==="fa"?$de():Ide()}),Fde=()=>"Could not remove the queued message. Try again.",Hde=()=>"无法移除排队消息。请重试。",qde=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",Ude=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hde():t==="fa"?qde():Fde()}),Gde=e=>`Could not re-send: ${e==null?void 0:e.error}`,Wde=e=>`无法重新发送:${e==null?void 0:e.error}`,Vde=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,Kde=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Wde(e):t==="fa"?Vde(e):Gde(e)}),Qde=()=>"Resolved",Yde=()=>"已处理",Xde=()=>"رسیدگی شد",Zde=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yde():t==="fa"?Xde():Qde()}),Jde=()=>"Could not retry the queued message. Try again.",ehe=()=>"无法重试排队消息。请重试。",the=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",nhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ehe():t==="fa"?the():Jde()}),rhe=()=>"run logs",she=()=>"运行日志",ihe=()=>"گزارش‌های اجرا",ahe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?she():t==="fa"?ihe():rhe()}),ohe=()=>"Scroll to bottom",lhe=()=>"滚动到底部",che=()=>"رفتن به پایین گفتگو",SE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lhe():t==="fa"?che():ohe()}),uhe=()=>"The selected harness is unavailable",fhe=()=>"所选智能体工具不可用",dhe=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",h2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fhe():t==="fa"?dhe():uhe()}),hhe=()=>"The chat session was not created",_he=()=>"未能创建聊天会话",phe=()=>"نشست گفت‌وگو ایجاد نشد",mhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_he():t==="fa"?phe():hhe()}),ghe=()=>"Show full conversation",vhe=()=>"显示完整对话",bhe=()=>"نمایش کامل گفتگو",yhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vhe():t==="fa"?bhe():ghe()}),xhe=()=>" · Spawned by another agent",whe=()=>" · 由另一个智能体创建",She=()=>" · ساخته‌شده به‌دست عامل دیگر",khe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?whe():t==="fa"?She():xhe()}),Che=()=>"Starting…",Ehe=()=>"正在启动…",Nhe=()=>"در حال شروع…",zhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ehe():t==="fa"?Nhe():Che()}),The=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,jhe=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,Ahe=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,Rhe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?jhe(e):t==="fa"?Ahe(e):The(e)}),Mhe=()=>"Could not stop the turn. Try again.",Dhe=()=>"无法停止本轮。请重试。",Lhe=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",Ohe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Dhe():t==="fa"?Lhe():Mhe()}),Ihe=e=>`Could not switch fork: ${e==null?void 0:e.error}`,Bhe=e=>`无法切换分支:${e==null?void 0:e.error}`,$he=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,Phe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Bhe(e):t==="fa"?$he(e):Ihe(e)}),Fhe=()=>"The agent",Hhe=()=>"智能体",qhe=()=>"عامل",Uhe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hhe():t==="fa"?qhe():Fhe()}),Ghe=()=>"Thinking",Whe=()=>"正在思考",Vhe=()=>"در حال فکر کردن",Khe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Whe():t==="fa"?Vhe():Ghe()}),Qhe=()=>"Could not toggle Plan mode. Try again.",Yhe=()=>"无法切换计划模式。请重试。",Xhe=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",kE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yhe():t==="fa"?Xhe():Qhe()}),Zhe=()=>"This turn did not finish.",Jhe=()=>"本轮未完成。",e_e=()=>"این نوبت کامل نشد.",t_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Jhe():t==="fa"?e_e():Zhe()}),n_e=()=>"Type a custom answer…",r_e=()=>"输入自定义回答…",s_e=()=>"پاسخ دلخواه را بنویسید…",i_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?r_e():t==="fa"?s_e():n_e()}),a_e=()=>"Unarchive",o_e=()=>"取消归档",l_e=()=>"خارج کردن از بایگانی",c_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?o_e():t==="fa"?l_e():a_e()}),u_e=()=>"Untitled",f_e=()=>"未命名",d_e=()=>"بدون عنوان",bg=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?f_e():t==="fa"?d_e():u_e()}),h_e=()=>"Could not update permissions. Try again.",__e=()=>"无法更新权限。请重试。",p_e=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",m_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?__e():t==="fa"?p_e():h_e()}),g_e=()=>"Working…",v_e=()=>"正在工作…",b_e=()=>"در حال کار…",q5=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?v_e():t==="fa"?b_e():g_e()}),y_e=()=>"Close tab",x_e=()=>"关闭标签页",w_e=()=>"بستن زبانه",S_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?x_e():t==="fa"?w_e():y_e()}),k_e=()=>"Changes",C_e=()=>"更改",E_e=()=>"تغییرات",fD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?C_e():t==="fa"?E_e():k_e()}),N_e=()=>"Code browser view",z_e=()=>"代码浏览器视图",T_e=()=>"نمای مرورگر کد",j_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?z_e():t==="fa"?T_e():N_e()}),A_e=()=>"Files",R_e=()=>"文件",M_e=()=>"فایل‌ها",D_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?R_e():t==="fa"?M_e():A_e()}),L_e=()=>"Refresh",O_e=()=>"刷新",I_e=()=>"تازه‌سازی",CE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?O_e():t==="fa"?I_e():L_e()}),B_e=()=>"listing truncated",$_e=()=>"列表已截断",P_e=()=>"فهرست کوتاه شده است",F_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$_e():t==="fa"?P_e():B_e()}),H_e=()=>"No files.",q_e=()=>"没有文件。",U_e=()=>"فایلی وجود ندارد.",G_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?q_e():t==="fa"?U_e():H_e()}),W_e=()=>"Refresh failed:",V_e=()=>"刷新失败:",K_e=()=>"تازه‌سازی ناموفق بود:",Q_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?V_e():t==="fa"?K_e():W_e()}),Y_e=()=>"Cancelling…",X_e=()=>"正在取消…",Z_e=()=>"در حال لغو…",J_e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?X_e():t==="fa"?Z_e():Y_e()}),e0e=()=>"Checking…",t0e=()=>"正在检查…",n0e=()=>"در حال بررسی…",Ea=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?t0e():t==="fa"?n0e():e0e()}),r0e=()=>"Copied",s0e=()=>"已复制",i0e=()=>"کپی شد",W1=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?s0e():t==="fa"?i0e():r0e()}),a0e=e=>`Failed to load: ${e==null?void 0:e.error}`,o0e=e=>`加载失败:${e==null?void 0:e.error}`,l0e=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,dD=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?o0e(e):t==="fa"?l0e(e):a0e(e)}),c0e=()=>"Loading…",u0e=()=>"正在加载…",f0e=()=>"در حال بارگیری…",hD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?u0e():t==="fa"?f0e():c0e()}),d0e=e=>`+ ${e==null?void 0:e.count} more`,h0e=e=>`另有 ${e==null?void 0:e.count} 项`,_0e=e=>`${e==null?void 0:e.count}+ مورد دیگر`,p0e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?h0e(e):t==="fa"?_0e(e):d0e(e)}),m0e=()=>"Rendered view",g0e=()=>"渲染视图",v0e=()=>"نمای رندرشده",V1=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?g0e():t==="fa"?v0e():m0e()}),b0e=()=>"Save",y0e=()=>"保存",x0e=()=>"ذخیره",Uo=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?y0e():t==="fa"?x0e():b0e()}),w0e=()=>"Saving…",S0e=()=>"正在保存…",k0e=()=>"در حال ذخیره…",Zi=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?S0e():t==="fa"?k0e():w0e()}),C0e=()=>"Show less",E0e=()=>"收起",N0e=()=>"نمایش کمتر",_D=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?E0e():t==="fa"?N0e():C0e()}),z0e=()=>"Show more",T0e=()=>"展开",j0e=()=>"نمایش بیشتر",A0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?T0e():t==="fa"?j0e():z0e()}),R0e=()=>"Stop",M0e=()=>"停止",D0e=()=>"توقف",pD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?M0e():t==="fa"?D0e():R0e()}),L0e=()=>"Stopping…",O0e=()=>"正在停止…",I0e=()=>"در حال توقف…",B0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?O0e():t==="fa"?I0e():L0e()}),$0e=()=>"View source",P0e=()=>"查看源代码",F0e=()=>"نمایش متن منبع",Jd=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?P0e():t==="fa"?F0e():$0e()}),H0e=()=>"Runs as a remote Hugging Face Job",q0e=()=>"作为远程 Hugging Face Job 运行",U0e=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",G0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?q0e():t==="fa"?U0e():H0e()}),W0e=()=>"Runs as a Job on your Kubernetes cluster",V0e=()=>"作为 Kubernetes 集群上的 Job 运行",K0e=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",Q0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?V0e():t==="fa"?K0e():W0e()}),Y0e=()=>"Runs directly on this computer",X0e=()=>"直接在此计算机上运行",Z0e=()=>"مستقیماً روی این رایانه اجرا می‌شود",J0e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?X0e():t==="fa"?Z0e():Y0e()}),epe=()=>"Runs in a remote Modal sandbox",tpe=()=>"在远程 Modal 沙箱中运行",npe=()=>"در sandbox دوردست Modal اجرا می‌شود",rpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tpe():t==="fa"?npe():epe()}),spe=()=>"Runs on an ephemeral OpenResearch box",ipe=()=>"在临时 OpenResearch 主机上运行",ape=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",ope=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ipe():t==="fa"?ape():spe()}),lpe=()=>"Runs on the connected Ray cluster",cpe=()=>"在已连接的 Ray 集群上运行",upe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",fpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cpe():t==="fa"?upe():lpe()}),dpe=()=>"Runs as a scheduled job on your Slurm cluster",hpe=()=>"作为 Slurm 集群上的调度作业运行",_pe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",ppe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hpe():t==="fa"?_pe():dpe()}),mpe=()=>"Runs on a host from your SSH config",gpe=()=>"在 SSH 配置中的主机上运行",vpe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",bpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gpe():t==="fa"?vpe():mpe()}),ype=()=>"Runs through Tinker’s remote compute",xpe=()=>"通过 Tinker 远程算力运行",wpe=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",Spe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xpe():t==="fa"?wpe():ype()}),kpe=()=>"HF Jobs",Cpe=()=>"HF Jobs",Epe=()=>"HF Jobs",Npe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Cpe():t==="fa"?Epe():kpe()}),zpe=()=>"Kubernetes",Tpe=()=>"Kubernetes",jpe=()=>"Kubernetes",Ape=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tpe():t==="fa"?jpe():zpe()}),Rpe=()=>"This machine",Mpe=()=>"此计算机",Dpe=()=>"این رایانه",mD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mpe():t==="fa"?Dpe():Rpe()}),Lpe=()=>"Modal",Ope=()=>"Modal",Ipe=()=>"Modal",Bpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ope():t==="fa"?Ipe():Lpe()}),$pe=()=>"OpenResearch",Ppe=()=>"OpenResearch",Fpe=()=>"OpenResearch",Hpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ppe():t==="fa"?Fpe():$pe()}),qpe=()=>"Ray",Upe=()=>"Ray",Gpe=()=>"Ray",Wpe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Upe():t==="fa"?Gpe():qpe()}),Vpe=()=>"Slurm",Kpe=()=>"Slurm",Qpe=()=>"Slurm",Ype=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kpe():t==="fa"?Qpe():Vpe()}),Xpe=()=>"SSH",Zpe=()=>"SSH",Jpe=()=>"SSH",eme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zpe():t==="fa"?Jpe():Xpe()}),tme=()=>"Tinker",nme=()=>"Tinker",rme=()=>"Tinker",sme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nme():t==="fa"?rme():tme()}),ime=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",ame=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",ome=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",lme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ame():t==="fa"?ome():ime()}),cme=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",ume=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",fme=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",dme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ume():t==="fa"?fme():cme()}),hme=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",_me=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",pme=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",mme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_me():t==="fa"?pme():hme()}),gme=()=>"This computer must stay awake and online while Tinker runs.",vme=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",bme=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",yme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vme():t==="fa"?bme():gme()}),xme=()=>"Context window",wme=()=>"上下文窗口",Sme=()=>"پنجرهٔ زمینه",kme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wme():t==="fa"?Sme():xme()}),Cme=()=>"Context window used",Eme=()=>"已使用的上下文窗口",Nme=()=>"پنجرهٔ زمینهٔ استفاده‌شده",zme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Eme():t==="fa"?Nme():Cme()}),Tme=e=>`${e==null?void 0:e.value} tokens`,jme=e=>`${e==null?void 0:e.value} 个 token`,Ame=e=>`${e==null?void 0:e.value} توکن`,Rme=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?jme(e):t==="fa"?Ame(e):Tme(e)}),Mme=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,Dme=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,Lme=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,Ome=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Dme(e):t==="fa"?Lme(e):Mme(e)}),Ime=()=>"No runs yet — ask the agent to launch one.",Bme=()=>"尚无运行——让智能体启动一个。",$me=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",Pme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bme():t==="fa"?$me():Ime()}),Fme=()=>"Run",Hme=()=>"运行",qme=()=>"اجرا",EE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hme():t==="fa"?qme():Fme()}),Ume=()=>"Switch run",Gme=()=>"切换运行",Wme=()=>"تغییر اجرا",Vme=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Gme():t==="fa"?Wme():Ume()}),Kme=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,Qme=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,Yme=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,Xme=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Qme(e):t==="fa"?Yme(e):Kme(e)}),Zme=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,Jme=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,ege=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,tge=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Jme(e):t==="fa"?ege(e):Zme(e)}),nge=e=>`${e==null?void 0:e.value}m`,rge=e=>`${e==null?void 0:e.value} 分钟`,sge=e=>`${e==null?void 0:e.value} دقیقه`,ige=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?rge(e):t==="fa"?sge(e):nge(e)}),age=e=>`${e==null?void 0:e.value}s`,oge=e=>`${e==null?void 0:e.value} 秒`,lge=e=>`${e==null?void 0:e.value} ثانیه`,cge=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?oge(e):t==="fa"?lge(e):age(e)}),uge=()=>"Code",fge=()=>"代码",dge=()=>"کد",hge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fge():t==="fa"?dge():uge()}),_ge=()=>"created",pge=()=>"创建于",mge=()=>"ایجادشده",gge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pge():t==="fa"?mge():_ge()}),vge=()=>"from",bge=()=>"来自",yge=()=>"از",xge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bge():t==="fa"?yge():vge()}),wge=()=>"Logs",Sge=()=>"日志",kge=()=>"گزارش‌ها",Cge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sge():t==="fa"?kge():wge()}),Ege=()=>"Latest run",Nge=()=>"最新运行",zge=()=>"آخرین اجرا",Tge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nge():t==="fa"?zge():Ege()}),jge=()=>"Code",Age=()=>"代码",Rge=()=>"کد",Mge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Age():t==="fa"?Rge():jge()}),Dge=()=>"Commit",Lge=()=>"提交",Oge=()=>"کامیت",Ige=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lge():t==="fa"?Oge():Dge()}),Bge=()=>"created",$ge=()=>"创建于",Pge=()=>"ایجادشده",Fge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$ge():t==="fa"?Pge():Bge()}),Hge=()=>"Description",qge=()=>"说明",Uge=()=>"توضیحات",Gge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qge():t==="fa"?Uge():Hge()}),Wge=()=>"Duration",Vge=()=>"时长",Kge=()=>"مدت",Qge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vge():t==="fa"?Kge():Wge()}),Yge=()=>"exit",Xge=()=>"退出码",Zge=()=>"خروج",Jge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xge():t==="fa"?Zge():Yge()}),e1e=()=>"from",t1e=()=>"来自",n1e=()=>"از",r1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?t1e():t==="fa"?n1e():e1e()}),s1e=()=>"Logs",i1e=()=>"日志",a1e=()=>"گزارش‌ها",o1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?i1e():t==="fa"?a1e():s1e()}),l1e=()=>"Run",c1e=()=>"运行",u1e=()=>"اجرا",f1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?c1e():t==="fa"?u1e():l1e()}),d1e=()=>"Run history",h1e=()=>"运行历史",_1e=()=>"تاریخچهٔ اجرا",p1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?h1e():t==="fa"?_1e():d1e()}),m1e=()=>"Started",g1e=()=>"开始时间",v1e=()=>"آغاز",b1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?g1e():t==="fa"?v1e():m1e()}),y1e=()=>"Runs",x1e=()=>"运行",w1e=()=>"اجراها",S1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?x1e():t==="fa"?w1e():y1e()}),k1e=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",C1e=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",E1e=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",N1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?C1e():t==="fa"?E1e():k1e()}),z1e=()=>"No runs yet",T1e=()=>"还没有运行",j1e=()=>"هنوز اجرایی وجود ندارد",A1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?T1e():t==="fa"?j1e():z1e()}),R1e=()=>"No experiments yet.",M1e=()=>"还没有实验。",D1e=()=>"هنوز آزمایشی وجود ندارد.",L1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?M1e():t==="fa"?D1e():R1e()}),O1e=()=>"Not run yet",I1e=()=>"尚未运行",B1e=()=>"هنوز اجرا نشده",$1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?I1e():t==="fa"?B1e():O1e()}),P1e=()=>"1 run",F1e=()=>"1 次运行",H1e=()=>"۱ اجرا",q1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?F1e():t==="fa"?H1e():P1e()}),U1e=()=>"Open logs",G1e=()=>"打开日志",W1e=()=>"باز کردن گزارش‌ها",V1e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?G1e():t==="fa"?W1e():U1e()}),K1e=e=>`${e==null?void 0:e.count} runs`,Q1e=e=>`${e==null?void 0:e.count} 次运行`,Y1e=e=>`${e==null?void 0:e.count} اجرا`,X1e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Q1e(e):t==="fa"?Y1e(e):K1e(e)}),Z1e=()=>"Stop requested",J1e=()=>"已请求停止",eve=()=>"درخواست توقف ثبت شد",tve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?J1e():t==="fa"?eve():Z1e()}),nve=()=>"Stop run",rve=()=>"停止运行",sve=()=>"توقف اجرا",ive=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rve():t==="fa"?sve():nve()}),ave=()=>"Code",ove=()=>"代码",lve=()=>"کد",cve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ove():t==="fa"?lve():ave()}),uve=()=>"Experiments",fve=()=>"实验",dve=()=>"آزمایش‌ها",hve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fve():t==="fa"?dve():uve()}),_ve=()=>"Logs",pve=()=>"日志",mve=()=>"گزارش‌ها",gve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pve():t==="fa"?mve():_ve()}),vve=()=>"Stop failed:",bve=()=>"停止失败:",yve=()=>"توقف ناموفق بود:",xve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bve():t==="fa"?yve():vve()}),wve=()=>"Clipboard access is unavailable.",Sve=()=>"无法访问剪贴板。",kve=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",Cve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sve():t==="fa"?kve():wve()}),Eve=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,Nve=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,zve=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,Tve=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Nve(e):t==="fa"?zve(e):Eve(e)}),jve=()=>"Duplicate",Ave=()=>"创建副本",Rve=()=>"ایجاد نسخهٔ تکراری",Mve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ave():t==="fa"?Rve():jve()}),Dve=e=>`File actions for ${e==null?void 0:e.path}`,Lve=e=>`${e==null?void 0:e.path} 的文件操作`,Ove=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,Ive=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Lve(e):t==="fa"?Ove(e):Dve(e)}),Bve=()=>"Open",$ve=()=>"打开",Pve=()=>"باز کردن",Fve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$ve():t==="fa"?Pve():Bve()}),Hve=e=>`Rename ${e==null?void 0:e.path}`,qve=e=>`重命名 ${e==null?void 0:e.path}`,Uve=e=>`تغییر نام ${e==null?void 0:e.path}`,Gve=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?qve(e):t==="fa"?Uve(e):Hve(e)}),Wve=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,Vve=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,Kve=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,Qve=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Vve(e):t==="fa"?Kve(e):Wve(e)}),Yve=()=>"Binary file — no inline preview.",Xve=()=>"二进制文件——无法内嵌预览。",Zve=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",Jve=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xve():t==="fa"?Zve():Yve()}),ebe=()=>"This file changed on disk. Your edits have not been overwritten.",tbe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",nbe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",NE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tbe():t==="fa"?nbe():ebe()}),rbe=()=>"Compile failed",sbe=()=>"编译失败",ibe=()=>"کامپایل ناموفق بود",abe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sbe():t==="fa"?ibe():rbe()}),obe=()=>"Compile PDF",lbe=()=>"编译 PDF",cbe=()=>"کامپایل PDF",zE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lbe():t==="fa"?cbe():obe()}),ube=()=>"Compiled, but the engine reported errors — check the output below.",fbe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",dbe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",hbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fbe():t==="fa"?dbe():ube()}),_be=()=>"Copy command",pbe=()=>"复制命令",mbe=()=>"کپی فرمان",gbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pbe():t==="fa"?mbe():_be()}),vbe=()=>"Copy install command",bbe=()=>"复制安装命令",ybe=()=>"کپی فرمان نصب",xbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bbe():t==="fa"?ybe():vbe()}),wbe=()=>"This file was deleted on disk. Your edits have not been discarded.",Sbe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",kbe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",TE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sbe():t==="fa"?kbe():wbe()}),Cbe=()=>"Discard my edits and reload",Ebe=()=>"放弃我的编辑并重新加载",Nbe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",zbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ebe():t==="fa"?Nbe():Cbe()}),Tbe=()=>"Discard unsaved changes and close this file?",jbe=()=>"要丢弃未保存的更改并关闭此文件吗?",Abe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",jE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jbe():t==="fa"?Abe():Tbe()}),Rbe=()=>"Dismiss",Mbe=()=>"关闭",Dbe=()=>"بستن",Lbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mbe():t==="fa"?Dbe():Rbe()}),Obe=()=>"Dismiss compile message",Ibe=()=>"关闭编译消息",Bbe=()=>"بستن پیام کامپایل",$be=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ibe():t==="fa"?Bbe():Obe()}),Pbe=()=>"Dismiss Overleaf message",Fbe=()=>"关闭 Overleaf 消息",Hbe=()=>"بستن پیام Overleaf",qbe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Fbe():t==="fa"?Hbe():Pbe()}),Ube=()=>"Download",Gbe=()=>"下载",Wbe=()=>"بارگیری",gD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Gbe():t==="fa"?Wbe():Ube()}),Vbe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,Kbe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,Qbe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,Ybe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Kbe(e):t==="fa"?Qbe(e):Vbe(e)}),Xbe=()=>"Failed to load file:",Zbe=()=>"加载文件失败:",Jbe=()=>"بارگیری فایل ناموفق بود:",AE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zbe():t==="fa"?Jbe():Xbe()}),eye=()=>"File truncated — showing the first 512 KB.",tye=()=>"文件已截断——仅显示前 512 KB。",nye=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",rye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tye():t==="fa"?nye():eye()}),sye=()=>"The page below stops partway — the full file could not be loaded.",iye=()=>"下方页面在中途结束——无法加载完整文件。",aye=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",oye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iye():t==="fa"?aye():sye()}),lye=e=>`Rendered HTML: ${e==null?void 0:e.name}`,cye=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,uye=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,fye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cye(e):t==="fa"?uye(e):lye(e)}),dye=()=>"Loading…",hye=()=>"正在加载…",_ye=()=>"در حال بارگیری…",vD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hye():t==="fa"?_ye():dye()}),pye=()=>"File not found.",mye=()=>"找不到文件。",gye=()=>"فایل پیدا نشد.",vye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mye():t==="fa"?gye():pye()}),bye=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,yye=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,xye=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,wye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?yye(e):t==="fa"?xye(e):bye(e)}),Sye=e=>`File not found on branch ${e==null?void 0:e.branch}.`,kye=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,Cye=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,Eye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?kye(e):t==="fa"?Cye(e):Sye(e)}),Nye=()=>"File not found on disk.",zye=()=>"磁盘上找不到此文件。",Tye=()=>"فایل روی دیسک پیدا نشد.",jye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zye():t==="fa"?Tye():Nye()}),Aye=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,Rye=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,Mye=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,Dye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Rye(e):t==="fa"?Mye(e):Aye(e)}),Lye=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,Oye=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,Iye=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,Bye=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Oye(e):t==="fa"?Iye(e):Lye(e)}),$ye=()=>"Open in default editor",Pye=()=>"在默认编辑器中打开",Fye=()=>"باز کردن در ویرایشگر پیش‌فرض",RE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pye():t==="fa"?Fye():$ye()}),Hye=()=>"Overleaf's copy of this file was pulled while you had unsaved edits, so what you see is no longer what is on disk. Saving now sends this draft to Overleaf instead.",qye=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",Uye=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",Gye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qye():t==="fa"?Uye():Hye()}),Wye=()=>"Overwrite disk file",Vye=()=>"覆盖磁盘文件",Kye=()=>"بازنویسی فایل روی دیسک",Qye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vye():t==="fa"?Kye():Wye()}),Yye=()=>"Compiled PDF is out of date",Xye=()=>"已编译的 PDF 不是最新版本",Zye=()=>"PDF کامپایل‌شده به‌روز نیست",Jye=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xye():t==="fa"?Zye():Yye()}),exe=()=>"project clone",txe=()=>"项目克隆",nxe=()=>"کلون پروژه",yg=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?txe():t==="fa"?nxe():exe()}),rxe=()=>"Recompile PDF",sxe=()=>"重新编译 PDF",ixe=()=>"کامپایل دوبارهٔ PDF",ME=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sxe():t==="fa"?ixe():rxe()}),axe=()=>"Reload from disk",oxe=()=>"从磁盘重新加载",lxe=()=>"بارگذاری مجدد از دیسک",cxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oxe():t==="fa"?lxe():axe()}),uxe=()=>"Save failed",fxe=()=>"保存失败",dxe=()=>"ذخیره ناموفق بود",hxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fxe():t==="fa"?dxe():uxe()}),_xe=()=>"Saving…",pxe=()=>"正在保存…",mxe=()=>"در حال ذخیره…",gxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pxe():t==="fa"?mxe():_xe()}),vxe=()=>"Selected — press ⌘C",bxe=()=>"已选中 — 按 ⌘C 复制",yxe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",xxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bxe():t==="fa"?yxe():vxe()}),wxe=()=>"session’s worktree",Sxe=()=>"会话工作树",kxe=()=>"درخت کاری نشست",xg=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sxe():t==="fa"?kxe():wxe()}),Cxe=()=>"Show compiled PDF",Exe=()=>"显示已编译的 PDF",Nxe=()=>"نمایش PDF کامپایل‌شده",DE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Exe():t==="fa"?Nxe():Cxe()}),zxe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",Txe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",jxe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",Axe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Txe():t==="fa"?jxe():zxe()}),Rxe=()=>"This session's worktree isn't available — showing the project clone's copy.",Mxe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",Dxe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",Lxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mxe():t==="fa"?Dxe():Rxe()}),Oxe=()=>"Unsaved",Ixe=()=>"未保存",Bxe=()=>"ذخیره نشده",bD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ixe():t==="fa"?Bxe():Oxe()}),$xe=()=>"Unsaved — ⌘S to save",Pxe=()=>"未保存 — 按 ⌘S 保存",Fxe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",Hxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pxe():t==="fa"?Fxe():$xe()}),qxe=()=>"Update orx on the remote machine to edit this file safely.",Uxe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",Gxe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",Wxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Uxe():t==="fa"?Gxe():qxe()}),Vxe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",Kxe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",Qxe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",Yxe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kxe():t==="fa"?Qxe():Vxe()}),Xxe=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",Zxe=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",Jxe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",e2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Zxe():t==="fa"?Jxe():Xxe()}),t2e=()=>"Back to preview",n2e=()=>"返回预览",r2e=()=>"بازگشت به پیش‌نمایش",s2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?n2e():t==="fa"?r2e():t2e()}),i2e=e=>`${e==null?void 0:e.count} changed files`,a2e=e=>`${e==null?void 0:e.count} 个已更改文件`,o2e=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,yD=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?a2e(e):t==="fa"?o2e(e):i2e(e)}),l2e=()=>"Changed files",c2e=()=>"已更改文件",u2e=()=>"فایل‌های تغییرکرده",f2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?c2e():t==="fa"?u2e():l2e()}),d2e=()=>"Diff preview truncated",h2e=()=>"差异预览已截断",_2e=()=>"پیش‌نمایش تفاوت کوتاه شده است",p2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?h2e():t==="fa"?_2e():d2e()}),m2e=e=>`${e==null?void 0:e.count} files shown (partial)`,g2e=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,v2e=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,b2e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?g2e(e):t==="fa"?v2e(e):m2e(e)}),y2e=()=>"No changes.",x2e=()=>"没有更改。",w2e=()=>"تغییری وجود ندارد.",S2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?x2e():t==="fa"?w2e():y2e()}),k2e=()=>"No complete file preview was available before the cutoff.",C2e=()=>"在截断位置之前没有完整的文件预览。",E2e=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",N2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?C2e():t==="fa"?E2e():k2e()}),z2e=()=>"No textual diff for this file.",T2e=()=>"此文件没有文本差异。",j2e=()=>"برای این فایل تفاوت متنی وجود ندارد.",A2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?T2e():t==="fa"?j2e():z2e()}),R2e=()=>"1 changed file",M2e=()=>"1 个已更改文件",D2e=()=>"۱ فایل تغییرکرده",xD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?M2e():t==="fa"?D2e():R2e()}),L2e=()=>"1 file shown (partial)",O2e=()=>"显示 1 个文件(部分)",I2e=()=>"۱ فایل نمایش داده شده (ناقص)",B2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?O2e():t==="fa"?I2e():L2e()}),$2e=()=>"Unable to parse this diff.",P2e=()=>"无法解析此差异。",F2e=()=>"خواندن این تفاوت ممکن نبود.",H2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?P2e():t==="fa"?F2e():$2e()}),q2e=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,U2e=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,G2e=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,W2e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?U2e(e):t==="fa"?G2e(e):q2e(e)}),V2e=()=>"View full diff",K2e=()=>"查看完整差异",Q2e=()=>"نمایش تفاوت کامل",Y2e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?K2e():t==="fa"?Q2e():V2e()}),X2e=()=>"Create a token ↗",Z2e=()=>"创建令牌 ↗",J2e=()=>"ساخت توکن ↗",ewe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Z2e():t==="fa"?J2e():X2e()}),twe=()=>"All projects",nwe=()=>"所有项目",rwe=()=>"همهٔ پروژه‌ها",LE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nwe():t==="fa"?rwe():twe()}),swe=()=>"Configure Repository",iwe=()=>"配置仓库",awe=()=>"پیکربندی مخزن",owe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iwe():t==="fa"?awe():swe()}),lwe=()=>"Create a new project",cwe=()=>"新建项目",uwe=()=>"ایجاد پروژهٔ جدید",fwe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cwe():t==="fa"?uwe():lwe()}),dwe=()=>"Hide sidebar",hwe=()=>"隐藏侧边栏",_we=()=>"پنهان کردن نوار کناری",OE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hwe():t==="fa"?_we():dwe()}),pwe=()=>"Project",mwe=()=>"项目",gwe=()=>"پروژه",vwe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mwe():t==="fa"?gwe():pwe()}),bwe=e=>`${e==null?void 0:e.count} cancelled`,ywe=e=>`${e==null?void 0:e.count} 次取消`,xwe=e=>`${e==null?void 0:e.count} لغوشده`,wwe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?ywe(e):t==="fa"?xwe(e):bwe(e)}),Swe=e=>`${e==null?void 0:e.count} done`,kwe=e=>`${e==null?void 0:e.count} 次完成`,Cwe=e=>`${e==null?void 0:e.count} تمام‌شده`,Ewe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?kwe(e):t==="fa"?Cwe(e):Swe(e)}),Nwe=e=>`${e==null?void 0:e.count} failed`,zwe=e=>`${e==null?void 0:e.count} 次失败`,Twe=e=>`${e==null?void 0:e.count} ناموفق`,jwe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?zwe(e):t==="fa"?Twe(e):Nwe(e)}),Awe=e=>`${e==null?void 0:e.count} files`,Rwe=e=>`${e==null?void 0:e.count} 个文件`,Mwe=e=>`${e==null?void 0:e.count} فایل`,Dwe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Rwe(e):t==="fa"?Mwe(e):Awe(e)}),Lwe=e=>`${e==null?void 0:e.count}+ files`,Owe=e=>`至少 ${e==null?void 0:e.count} 个文件`,Iwe=e=>`بیش از ${e==null?void 0:e.count} فایل`,Bwe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Owe(e):t==="fa"?Iwe(e):Lwe(e)}),$we=e=>`${e==null?void 0:e.count} live`,Pwe=e=>`${e==null?void 0:e.count} 次进行中`,Fwe=e=>`${e==null?void 0:e.count} فعال`,Hwe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Pwe(e):t==="fa"?Fwe(e):$we(e)}),qwe=()=>"1 file",Uwe=()=>"1 个文件",Gwe=()=>"۱ فایل",Wwe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Uwe():t==="fa"?Gwe():qwe()}),Vwe=()=>"1 run",Kwe=()=>"1 次运行",Qwe=()=>"۱ اجرا",Ywe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kwe():t==="fa"?Qwe():Vwe()}),Xwe=e=>`${e==null?void 0:e.count} runs`,Zwe=e=>`${e==null?void 0:e.count} 次运行`,Jwe=e=>`${e==null?void 0:e.count} اجرا`,e4e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Zwe(e):t==="fa"?Jwe(e):Xwe(e)}),t4e=()=>"No instances yet.",n4e=()=>"还没有实例。",r4e=()=>"هنوز نمونه‌ای وجود ندارد.",s4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?n4e():t==="fa"?r4e():t4e()}),i4e=()=>"Nothing running right now.",a4e=()=>"当前没有运行中的实例。",o4e=()=>"اکنون چیزی در حال اجرا نیست.",l4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?a4e():t==="fa"?o4e():i4e()}),c4e=()=>"Select a project to see its history.",u4e=()=>"请选择一个项目以查看其历史记录。",f4e=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",d4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?u4e():t==="fa"?f4e():c4e()}),h4e=()=>"Select a project to see its runs.",_4e=()=>"请选择一个项目以查看其运行。",p4e=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",m4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_4e():t==="fa"?p4e():h4e()}),g4e=()=>"View history",v4e=()=>"查看历史记录",b4e=()=>"مشاهدهٔ تاریخچه",y4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?v4e():t==="fa"?b4e():g4e()}),x4e=e=>`View history (${e==null?void 0:e.count})`,w4e=e=>`查看历史记录(${e==null?void 0:e.count})`,S4e=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,k4e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?w4e(e):t==="fa"?S4e(e):x4e(e)}),C4e=()=>"The engine exited without producing a PDF or a log.",E4e=()=>"引擎已退出,但没有生成 PDF 或日志。",N4e=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",z4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?E4e():t==="fa"?N4e():C4e()}),T4e=()=>"Loading…",j4e=()=>"正在加载…",A4e=()=>"در حال بارگیری…",R4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?j4e():t==="fa"?A4e():T4e()}),M4e=()=>"Copy",D4e=()=>"复制",L4e=()=>"کپی",wD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?D4e():t==="fa"?L4e():M4e()}),O4e=()=>"Copy code",I4e=()=>"复制代码",B4e=()=>"کپی کد",$4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?I4e():t==="fa"?B4e():O4e()}),P4e=()=>"Download",F4e=()=>"下载",H4e=()=>"بارگیری",SD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?F4e():t==="fa"?H4e():P4e()}),q4e=()=>"This browser can’t preview this media format.",U4e=()=>"此浏览器无法预览该媒体格式。",G4e=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",W4e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?U4e():t==="fa"?G4e():q4e()}),V4e=()=>" · CLI configuration",K4e=()=>" · CLI 配置",Q4e=()=>" · پیکربندی CLI",kD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?K4e():t==="fa"?Q4e():V4e()}),Y4e=()=>"· Default",X4e=()=>"· 默认",Z4e=()=>"· پیش‌فرض",CD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?X4e():t==="fa"?Z4e():Y4e()}),J4e=()=>"Default model",e3e=()=>"默认模型",t3e=()=>"مدل پیش‌فرض",IE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?e3e():t==="fa"?t3e():J4e()}),n3e=()=>"Detecting harnesses…",r3e=()=>"正在检测智能体工具…",s3e=()=>"در حال شناسایی ابزارهای عامل…",i3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?r3e():t==="fa"?s3e():n3e()}),a3e=()=>"Effort",o3e=()=>"推理强度",l3e=()=>"میزان استدلال",c3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?o3e():t==="fa"?l3e():a3e()}),u3e=()=>"Fast speed ·",f3e=()=>"快速 ·",d3e=()=>"سرعت بالا ·",h3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?f3e():t==="fa"?d3e():u3e()}),_3e=()=>"Mode",p3e=()=>"模式",m3e=()=>"حالت",BE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?p3e():t==="fa"?m3e():_3e()}),g3e=()=>"Model",v3e=()=>"模型",b3e=()=>"مدل",_2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?v3e():t==="fa"?b3e():g3e()}),y3e=e=>`${e==null?void 0:e.count} more — search to find`,x3e=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,w3e=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,S3e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?x3e(e):t==="fa"?w3e(e):y3e(e)}),k3e=()=>"Not available",C3e=()=>"不可用",E3e=()=>"در دسترس نیست",N3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?C3e():t==="fa"?E3e():k3e()}),z3e=()=>"Search models…",T3e=()=>"搜索模型…",j3e=()=>"جست‌وجوی مدل‌ها…",A3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?T3e():t==="fa"?j3e():z3e()}),R3e=()=>"Sessions keep their harness. Start a new chat to switch.",M3e=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",D3e=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",L3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?M3e():t==="fa"?D3e():R3e()}),O3e=()=>"Speed",I3e=()=>"速度",B3e=()=>"سرعت",$E=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?I3e():t==="fa"?B3e():O3e()}),$3e=()=>"Unavailable",P3e=()=>"不可用",F3e=()=>"در دسترس نیست",Ao=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?P3e():t==="fa"?F3e():$3e()}),H3e=e=>`Use “${e==null?void 0:e.id}” as the model ID`,q3e=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,U3e=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,G3e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?q3e(e):t==="fa"?U3e(e):H3e(e)}),W3e=()=>"Variant",V3e=()=>"变体",K3e=()=>"گونه",Q3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?V3e():t==="fa"?K3e():W3e()}),Y3e=()=>"Advanced",X3e=()=>"高级",Z3e=()=>"پیشرفته",J3e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?X3e():t==="fa"?Z3e():Y3e()}),e5e=()=>"Advanced · Connect GitHub",t5e=()=>"高级 · 连接 GitHub",n5e=()=>"پیشرفته · اتصال GitHub",r5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?t5e():t==="fa"?n5e():e5e()}),s5e=()=>"Advanced · GitHub sync on",i5e=()=>"高级 · GitHub 同步已开启",a5e=()=>"پیشرفته · همگام‌سازی GitHub روشن است",o5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?i5e():t==="fa"?a5e():s5e()}),l5e=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",c5e=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",u5e=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",f5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?c5e():t==="fa"?u5e():l5e()}),d5e=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,h5e=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,_5e=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,p5e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?h5e(e):t==="fa"?_5e(e):d5e(e)}),m5e=()=>"Choose an existing project folder",g5e=()=>"选择现有项目文件夹",v5e=()=>"انتخاب پوشهٔ موجود پروژه",PE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?g5e():t==="fa"?v5e():m5e()}),b5e=()=>"Choosing…",y5e=()=>"正在选择…",x5e=()=>"در حال انتخاب…",w5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?y5e():t==="fa"?x5e():b5e()}),S5e=()=>"Clone destination",k5e=()=>"克隆位置",C5e=()=>"مقصد کلون",E5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?k5e():t==="fa"?C5e():S5e()}),N5e=()=>"Clone paper project",z5e=()=>"克隆论文项目",T5e=()=>"کلون پروژهٔ مقاله",j5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?z5e():t==="fa"?T5e():N5e()}),A5e=()=>"Create project",R5e=()=>"创建项目",M5e=()=>"ایجاد پروژه",FE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?R5e():t==="fa"?M5e():A5e()}),D5e=()=>"Creating…",L5e=()=>"正在创建…",O5e=()=>"در حال ایجاد…",I5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?L5e():t==="fa"?O5e():D5e()}),B5e=()=>"Choose a different destination. This path is a file, not a folder.",$5e=()=>"请选择其他位置。此路径是文件,不是文件夹。",P5e=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",p2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$5e():t==="fa"?P5e():B5e()}),F5e=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",H5e=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",q5e=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",HE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?H5e():t==="fa"?q5e():F5e()}),U5e=()=>"Blank project",G5e=()=>"空白项目",W5e=()=>"پروژهٔ خالی",V5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?G5e():t==="fa"?W5e():U5e()}),K5e=()=>"Cancel",Q5e=()=>"取消",Y5e=()=>"لغو",X5e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Q5e():t==="fa"?Y5e():K5e()}),Z5e=()=>"Change",J5e=()=>"更改",e6e=()=>"تغییر",t6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?J5e():t==="fa"?e6e():Z5e()}),n6e=()=>"Change selected paper",r6e=()=>"更改所选论文",s6e=()=>"تغییر مقالهٔ انتخاب‌شده",i6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?r6e():t==="fa"?s6e():n6e()}),a6e=()=>"Check out a Git branch before using this folder.",o6e=()=>"使用此文件夹前,请先检出一个 Git 分支。",l6e=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",c6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?o6e():t==="fa"?l6e():a6e()}),u6e=()=>"Checking project location.",f6e=()=>"正在检查项目位置。",d6e=()=>"در حال بررسی محل پروژه.",qE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?f6e():t==="fa"?d6e():u6e()}),h6e=()=>"Existing folder",_6e=()=>"现有文件夹",p6e=()=>"پوشهٔ موجود",m6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_6e():t==="fa"?p6e():h6e()}),g6e=()=>"Experiment branches will be pushed to the remote GitHub repository.",v6e=()=>"实验分支将推送到远程 GitHub 仓库。",b6e=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",y6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?v6e():t==="fa"?b6e():g6e()}),x6e=()=>"From a paper",w6e=()=>"从论文创建",S6e=()=>"از یک مقاله",k6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?w6e():t==="fa"?S6e():x6e()}),C6e=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",E6e=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",N6e=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",z6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?E6e():t==="fa"?N6e():C6e()}),T6e=()=>"my-research",j6e=()=>"my-research",A6e=()=>"my-research",UE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?j6e():t==="fa"?A6e():T6e()}),R6e=()=>"No papers found. Try an arXiv ID, URL, or a different title.",M6e=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",D6e=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",L6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?M6e():t==="fa"?D6e():R6e()}),O6e=()=>"No public repository found on alphaXiv",I6e=()=>"在 alphaXiv 上未找到公开仓库",B6e=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",$6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?I6e():t==="fa"?B6e():O6e()}),P6e=()=>"OpenResearch will start a blank project with this paper's PDF.",F6e=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",H6e=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",q6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?F6e():t==="fa"?H6e():P6e()}),U6e=()=>"Paper",G6e=()=>"论文",W6e=()=>"مقاله",V6e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?G6e():t==="fa"?W6e():U6e()}),K6e=()=>"Project location",Q6e=()=>"项目位置",Y6e=()=>"محل پروژه",m2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Q6e():t==="fa"?Y6e():K6e()}),X6e=()=>"Project name",Z6e=()=>"项目名称",J6e=()=>"نام پروژه",GE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Z6e():t==="fa"?J6e():X6e()}),eSe=()=>"Search for a paper by arXiv ID, URL, or title",tSe=()=>"按 arXiv ID、网址或标题搜索论文",nSe=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",rSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tSe():t==="fa"?nSe():eSe()}),sSe=()=>"Sync experiments to GitHub",iSe=()=>"将实验同步到 GitHub",aSe=()=>"همگام‌سازی آزمایش‌ها با GitHub",oSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iSe():t==="fa"?aSe():sSe()}),lSe=()=>"That folder no longer exists. Choose it again.",cSe=()=>"该文件夹已不存在。请重新选择。",uSe=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",fSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cSe():t==="fa"?uSe():lSe()}),dSe=()=>"The selected folder contains an invalid Git repository.",hSe=()=>"所选文件夹包含无效的 Git 仓库。",_Se=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",pSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hSe():t==="fa"?_Se():dSe()}),mSe=()=>"The selected path is not a folder.",gSe=()=>"所选路径不是文件夹。",vSe=()=>"مسیر انتخاب‌شده پوشه نیست.",bSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gSe():t==="fa"?vSe():mSe()}),ySe=e=>`Checking ${e==null?void 0:e.repository}.`,xSe=e=>`正在检查 ${e==null?void 0:e.repository}。`,wSe=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,SSe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?xSe(e):t==="fa"?wSe(e):ySe(e)}),kSe=e=>`Creates ${e==null?void 0:e.repository}.`,CSe=e=>`将创建 ${e==null?void 0:e.repository}。`,ESe=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,NSe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?CSe(e):t==="fa"?ESe(e):kSe(e)}),zSe=e=>`Pushes to ${e==null?void 0:e.repository}.`,TSe=e=>`将推送到 ${e==null?void 0:e.repository}。`,jSe=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,ASe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?TSe(e):t==="fa"?jSe(e):zSe(e)}),RSe=()=>"Project location is required.",MSe=()=>"必须填写项目位置。",DSe=()=>"محل پروژه الزامی است.",WE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MSe():t==="fa"?DSe():RSe()}),LSe=()=>"Choose a different destination. The paper repository needs a new or empty folder.",OSe=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",ISe=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",VE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OSe():t==="fa"?ISe():LSe()}),BSe=()=>"A linked public code repository is cloned without credentials.",$Se=()=>"关联的公开代码仓库无需凭据即可克隆。",PSe=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",FSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Se():t==="fa"?PSe():BSe()}),HSe=e=>`Run ${e==null?void 0:e.command} before creating the project.`,qSe=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,USe=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,GSe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?qSe(e):t==="fa"?USe(e):HSe(e)}),WSe=()=>"Searching alphaXiv…",VSe=()=>"正在搜索 alphaXiv…",KSe=()=>"در حال جست‌وجوی alphaXiv…",QSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VSe():t==="fa"?KSe():WSe()}),YSe=()=>"Use folder",XSe=()=>"使用文件夹",ZSe=()=>"استفاده از پوشه",JSe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XSe():t==="fa"?ZSe():YSe()}),eke=()=>"Can’t reach OpenResearch. This page is no longer live.",tke=()=>"无法连接 OpenResearch。此页面已不再实时同步。",nke=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",b4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tke():t==="fa"?nke():eke()}),rke=()=>"A workspace for your research agents",ske=()=>"面向研究智能体的工作空间",ike=()=>"فضای کاری برای عامل‌های پژوهشی شما",ake=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ske():t==="fa"?ike():rke()}),oke=()=>"Add papers that represent your research interests, including papers by other authors.",lke=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",cke=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",uke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lke():t==="fa"?cke():oke()}),fke=()=>"API key",dke=()=>"API 密钥",hke=()=>"کلید API",U5=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dke():t==="fa"?hke():fke()}),_ke=()=>"AI/ML",pke=()=>"人工智能与机器学习",mke=()=>"هوش مصنوعی و یادگیری ماشین",gke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pke():t==="fa"?mke():_ke()}),vke=()=>"Biology",bke=()=>"生物学",yke=()=>"زیست‌شناسی",xke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bke():t==="fa"?yke():vke()}),wke=()=>"Other",Ske=()=>"其他",kke=()=>"سایر",Cke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ske():t==="fa"?kke():wke()}),Eke=()=>"Physics",Nke=()=>"物理学",zke=()=>"فیزیک",Tke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nke():t==="fa"?zke():Eke()}),jke=()=>"Back",Ake=()=>"返回",Rke=()=>"بازگشت",KE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ake():t==="fa"?Rke():jke()}),Mke=()=>"Check failed",Dke=()=>"检查失败",Lke=()=>"بررسی ناموفق بود",Oke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Dke():t==="fa"?Lke():Mke()}),Ike=()=>"Checking",Bke=()=>"正在检查",$ke=()=>"در حال بررسی",Pke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bke():t==="fa"?$ke():Ike()}),Fke=()=>"Checking Git…",Hke=()=>"正在检查 Git…",qke=()=>"در حال بررسی Git…",Uke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hke():t==="fa"?qke():Fke()}),Gke=()=>"Choose a coding agent",Wke=()=>"选择编程智能体",Vke=()=>"یک عامل کدنویسی انتخاب کنید",Kke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wke():t==="fa"?Vke():Gke()}),Qke=()=>"Choose a coding agent to continue.",Yke=()=>"选择一个编程智能体以继续。",Xke=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",Zke=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yke():t==="fa"?Xke():Qke()}),Jke=()=>"Choose at least one research area to continue.",e7e=()=>"请至少选择一个研究领域后再继续。",t7e=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",n7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?e7e():t==="fa"?t7e():Jke()}),r7e=()=>"Choose one or more.",s7e=()=>"请选择一项或多项。",i7e=()=>"یک یا چند مورد را انتخاب کنید.",a7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?s7e():t==="fa"?i7e():r7e()}),o7e=()=>"Choose your preferred coding agent",l7e=()=>"请选择首选编程智能体",c7e=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",u7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?l7e():t==="fa"?c7e():o7e()}),f7e=()=>"Consolidate your research",d7e=()=>"集中管理研究",h7e=()=>"پژوهش خود را یکپارچه کنید",_7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?d7e():t==="fa"?h7e():f7e()}),p7e=()=>"Continue",m7e=()=>"继续",g7e=()=>"ادامه",QE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?m7e():t==="fa"?g7e():p7e()}),v7e=()=>"Describe your research area to continue.",b7e=()=>"请描述你的研究领域后再继续。",y7e=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",x7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?b7e():t==="fa"?y7e():v7e()}),w7e=()=>"Detecting Claude Code, Codex, OpenCode…",S7e=()=>"正在检测 Claude Code、Codex、OpenCode…",k7e=()=>"در حال شناسایی Claude Code، Codex و OpenCode…",C7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?S7e():t==="fa"?k7e():w7e()}),E7e=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",N7e=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",z7e=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",T7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?N7e():t==="fa"?z7e():E7e()}),j7e=()=>"Everything stays local",A7e=()=>"一切都保留在本地",R7e=()=>"همه‌چیز محلی می‌ماند",M7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?A7e():t==="fa"?R7e():j7e()}),D7e=()=>"Get started",L7e=()=>"开始使用",O7e=()=>"شروع",I7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?L7e():t==="fa"?O7e():D7e()}),B7e=()=>"Git is required for local experiments. Install Git, then re-check.",$7e=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",P7e=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",F7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$7e():t==="fa"?P7e():B7e()}),H7e=()=>"Ground your agents",q7e=()=>"为智能体提供可靠依据",U7e=()=>"عامل‌هایتان را به منابع متصل کنید",G7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?q7e():t==="fa"?U7e():H7e()}),W7e=()=>"Install broken",V7e=()=>"安装损坏",K7e=()=>"نصب خراب است",Q7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?V7e():t==="fa"?K7e():W7e()}),Y7e=()=>"Install Git to continue",X7e=()=>"请安装 Git 后再继续",Z7e=()=>"برای ادامه Git را نصب کنید",J7e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?X7e():t==="fa"?Z7e():Y7e()}),eCe=()=>"Local Git",tCe=()=>"本地 Git",nCe=()=>"Git محلی",rCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tCe():t==="fa"?nCe():eCe()}),sCe=()=>"Not detected",iCe=()=>"未检测到",aCe=()=>"شناسایی نشد",YE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iCe():t==="fa"?aCe():sCe()}),oCe=()=>"Not found",lCe=()=>"未找到",cCe=()=>"پیدا نشد",ED=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lCe():t==="fa"?cCe():oCe()}),uCe=()=>"Not signed in",fCe=()=>"未登录",dCe=()=>"وارد نشده",hCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fCe():t==="fa"?dCe():uCe()}),_Ce=()=>"OpenResearch uses a coding agent already installed on this machine.",pCe=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",mCe=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",gCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pCe():t==="fa"?mCe():_Ce()}),vCe=()=>"Other research area",bCe=()=>"其他研究领域",yCe=()=>"حوزهٔ پژوهشی دیگر",xCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bCe():t==="fa"?yCe():vCe()}),wCe=()=>"Re-check",SCe=()=>"重新检查",kCe=()=>"بررسی دوباره",CCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SCe():t==="fa"?kCe():wCe()}),ECe=()=>"Ready",NCe=()=>"已就绪",zCe=()=>"آماده",TCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?NCe():t==="fa"?zCe():ECe()}),jCe=()=>"Re-check Git before continuing",ACe=()=>"请重新检查 Git 后再继续",RCe=()=>"پیش از ادامه Git را دوباره بررسی کنید",MCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ACe():t==="fa"?RCe():jCe()}),DCe=()=>"Representative papers",LCe=()=>"代表性论文",OCe=()=>"مقاله‌های شاخص",ICe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LCe():t==="fa"?OCe():DCe()}),BCe=()=>"Research background",$Ce=()=>"研究背景",PCe=()=>"پیشینهٔ پژوهشی",FCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ce():t==="fa"?PCe():BCe()}),HCe=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",qCe=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",UCe=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",XE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qCe():t==="fa"?UCe():HCe()}),GCe=()=>"Search alphaXiv by title to link a paper…",WCe=()=>"按标题搜索 alphaXiv 以关联论文…",VCe=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",KCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?WCe():t==="fa"?VCe():GCe()}),QCe=()=>"Searching alphaXiv…",YCe=()=>"正在搜索 alphaXiv…",XCe=()=>"در حال جست‌وجوی alphaXiv…",ZCe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YCe():t==="fa"?XCe():QCe()}),JCe=()=>"Selected",e8e=()=>"已选择",t8e=()=>"انتخاب‌شده",n8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?e8e():t==="fa"?t8e():JCe()}),r8e=()=>"Setting things up…",s8e=()=>"正在设置…",i8e=()=>"در حال راه‌اندازی…",a8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?s8e():t==="fa"?i8e():r8e()}),o8e=()=>"Sign in to at least one coding agent to continue",l8e=()=>"请至少登录一个编程智能体后再继续",c8e=()=>"برای ادامه، وارد دست‌کم یک عامل برنامه‌نویسی شوید",u8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?l8e():t==="fa"?c8e():o8e()}),f8e=()=>"Sign in to at least one agent to continue.",d8e=()=>"请登录至少一个智能体以继续。",h8e=()=>"برای ادامه دست‌کم به یک عامل وارد شوید.",_8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?d8e():t==="fa"?h8e():f8e()}),p8e=()=>"Signed in",m8e=()=>"已登录",g8e=()=>"وارد شده",v8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?m8e():t==="fa"?g8e():p8e()}),b8e=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",y8e=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",x8e=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",w8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?y8e():t==="fa"?x8e():b8e()}),S8e=()=>"· Step 1 of 2",k8e=()=>"· 第 1 步,共 2 步",C8e=()=>"· مرحلهٔ ۱ از ۲",E8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?k8e():t==="fa"?C8e():S8e()}),N8e=()=>"· Step 2 of 2",z8e=()=>"· 第 2 步,共 2 步",T8e=()=>"· مرحلهٔ ۲ از ۲",j8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?z8e():t==="fa"?T8e():N8e()}),A8e=()=>"Tell us about your research",R8e=()=>"介绍一下你的研究",M8e=()=>"از پژوهش خود بگویید",D8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?R8e():t==="fa"?M8e():A8e()}),L8e=()=>"Tell us your other research area",O8e=()=>"告诉我们你的其他研究领域",I8e=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",B8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?O8e():t==="fa"?I8e():L8e()}),$8e=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",P8e=()=>"在一处跟踪实验、产物、算力、技能和代码。",F8e=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",H8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?P8e():t==="fa"?F8e():$8e()}),q8e=()=>"Unable to verify",U8e=()=>"无法验证",G8e=()=>"تأیید ممکن نیست",W8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?U8e():t==="fa"?G8e():q8e()}),V8e=()=>"Update required",K8e=()=>"需要更新",Q8e=()=>"نیازمند به‌روزرسانی",Y8e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?K8e():t==="fa"?Q8e():V8e()}),X8e=()=>"Waiting for the Git check",Z8e=()=>"正在等待 Git 检查",J8e=()=>"در انتظار بررسی Git",e9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Z8e():t==="fa"?J8e():X8e()}),t9e=()=>"Waiting for the local tool checks",n9e=()=>"正在等待本地工具检查",r9e=()=>"در انتظار بررسی ابزارهای محلی",s9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?n9e():t==="fa"?r9e():t9e()}),i9e=()=>"What areas are you interested in?",a9e=()=>"你对哪些领域感兴趣?",o9e=()=>"به چه حوزه‌هایی علاقه دارید؟",l9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?a9e():t==="fa"?o9e():i9e()}),c9e=()=>"Your code, data, and experiment history stay on your machine.",u9e=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",f9e=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",d9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?u9e():t==="fa"?f9e():c9e()}),h9e=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",_9e=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",p9e=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",m9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_9e():t==="fa"?p9e():h9e()}),g9e=()=>"Add cookie",v9e=()=>"添加 cookie",b9e=()=>"افزودن کوکی",y9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?v9e():t==="fa"?b9e():g9e()}),x9e=()=>"Changed here and on Overleaf — choose which copy to keep",w9e=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",S9e=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",k9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?w9e():t==="fa"?S9e():x9e()}),C9e=()=>"Create a token ↗",E9e=()=>"创建令牌 ↗",N9e=()=>"ساخت توکن ↗",z9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?E9e():t==="fa"?N9e():C9e()}),T9e=()=>"Overleaf Git token",j9e=()=>"Overleaf Git 令牌",A9e=()=>"توکن Git در Overleaf",ZE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?j9e():t==="fa"?A9e():T9e()}),R9e=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",M9e=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",D9e=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",L9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?M9e():t==="fa"?D9e():R9e()}),O9e=()=>"Import from browser",I9e=()=>"从浏览器导入",B9e=()=>"وارد کردن از مرورگر",$9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?I9e():t==="fa"?B9e():O9e()}),P9e=()=>"In step with Overleaf",F9e=()=>"已与 Overleaf 同步",H9e=()=>"با Overleaf همگام است",ND=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?F9e():t==="fa"?H9e():P9e()}),q9e=()=>"The last sync did not finish.",U9e=()=>"上次同步未完成。",G9e=()=>"آخرین همگام‌سازی کامل نشد.",W9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?U9e():t==="fa"?G9e():q9e()}),V9e=()=>"Link and sync",K9e=()=>"关联并同步",Q9e=()=>"پیوند و همگام‌سازی",Y9e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?K9e():t==="fa"?Q9e():V9e()}),X9e=()=>"Connecting to Overleaf…",Z9e=()=>"正在连接 Overleaf…",J9e=()=>"در حال اتصال به Overleaf…",eEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Z9e():t==="fa"?J9e():X9e()}),tEe=()=>"Edits are live on Overleaf",nEe=()=>"编辑已在 Overleaf 实时同步",rEe=()=>"ویرایش‌ها روی Overleaf زنده‌اند",sEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nEe():t==="fa"?rEe():tEe()}),iEe=()=>"Retry",aEe=()=>"重试",oEe=()=>"تلاش دوباره",lEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aEe():t==="fa"?oEe():iEe()}),cEe=()=>"Live sync stopped.",uEe=()=>"实时同步已停止。",fEe=()=>"همگام‌سازی زنده متوقف شد.",dEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uEe():t==="fa"?fEe():cEe()}),hEe=()=>"Live sync starts once the paper is in step with Overleaf.",_Ee=()=>"论文与 Overleaf 同步后,实时同步即会开始。",pEe=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",mEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_Ee():t==="fa"?pEe():hEe()}),gEe=()=>"My projects ↗",vEe=()=>"我的项目 ↗",bEe=()=>"پروژه‌های من ↗",JE=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vEe():t==="fa"?bEe():gEe()}),yEe=()=>"Nothing could be synced.",xEe=()=>"没有内容可以同步。",wEe=()=>"هیچ موردی قابل همگام‌سازی نبود.",SEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xEe():t==="fa"?wEe():yEe()}),kEe=()=>"Open Overleaf ↗",CEe=()=>"打开 Overleaf ↗",EEe=()=>"باز کردن Overleaf ↗",NEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CEe():t==="fa"?EEe():kEe()}),zEe=()=>"Cancel",TEe=()=>"取消",jEe=()=>"لغو",zD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TEe():t==="fa"?jEe():zEe()}),AEe=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",REe=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",MEe=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",DEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?REe():t==="fa"?MEe():AEe()}),LEe=()=>"Keep this copy",OEe=()=>"保留此副本",IEe=()=>"نگه داشتن این نسخه",BEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OEe():t==="fa"?IEe():LEe()}),$Ee=()=>"Open in Overleaf",PEe=()=>"在 Overleaf 中打开",FEe=()=>"باز کردن در Overleaf",HEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PEe():t==="fa"?FEe():$Ee()}),qEe=()=>"Replace the Overleaf token",UEe=()=>"替换 Overleaf 令牌",GEe=()=>"جایگزینی توکن Overleaf",eN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UEe():t==="fa"?GEe():qEe()}),WEe=()=>"Sync files",VEe=()=>"同步文件",KEe=()=>"همگام‌سازی فایل‌ها",QEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VEe():t==="fa"?KEe():WEe()}),YEe=()=>"Unlink",XEe=()=>"取消关联",ZEe=()=>"قطع پیوند",JEe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XEe():t==="fa"?ZEe():YEe()}),eNe=()=>"Upload a copy as a new project ↗",tNe=()=>"上传副本作为新项目 ↗",nNe=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",TD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tNe():t==="fa"?nNe():eNe()}),rNe=()=>"Use Overleaf's",sNe=()=>"使用 Overleaf 的副本",iNe=()=>"استفاده از نسخهٔ Overleaf",aNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sNe():t==="fa"?iNe():rNe()}),oNe=()=>"This paper stays in step with Overleaf.",lNe=()=>"此论文将与 Overleaf 保持同步。",cNe=()=>"این مقاله با Overleaf همگام می‌ماند.",uNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lNe():t==="fa"?cNe():oNe()}),fNe=()=>"Paste it instead",dNe=()=>"改为粘贴",hNe=()=>"به‌جایش بچسبانید",_Ne=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dNe():t==="fa"?hNe():fNe()}),pNe=e=>`Pulled ${e==null?void 0:e.paths}.`,mNe=e=>`已拉取 ${e==null?void 0:e.paths}。`,gNe=e=>`${e==null?void 0:e.paths} دریافت شد.`,vNe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?mNe(e):t==="fa"?gNe(e):pNe(e)}),bNe=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,yNe=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,xNe=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,wNe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?yNe(e):t==="fa"?xNe(e):bNe(e)}),SNe=e=>`Pushed ${e==null?void 0:e.paths}.`,kNe=e=>`已推送 ${e==null?void 0:e.paths}。`,CNe=e=>`${e==null?void 0:e.paths} ارسال شد.`,ENe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?kNe(e):t==="fa"?CNe(e):SNe(e)}),NNe=()=>"Add a fresh Overleaf session cookie to start following again.",zNe=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",TNe=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",jNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zNe():t==="fa"?TNe():NNe()}),ANe=()=>"Save the file first",RNe=()=>"请先保存文件",MNe=()=>"ابتدا فایل را ذخیره کنید",DNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RNe():t==="fa"?MNe():ANe()}),LNe=()=>"Save this file to sync it with Overleaf",ONe=()=>"保存此文件以与 Overleaf 同步",INe=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",jD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ONe():t==="fa"?INe():LNe()}),BNe=()=>"Save token",$Ne=()=>"保存令牌",PNe=()=>"ذخیرهٔ توکن",FNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ne():t==="fa"?PNe():BNe()}),HNe=()=>"Send this paper to Overleaf",qNe=()=>"将此论文发送到 Overleaf",UNe=()=>"ارسال مقاله به Overleaf",GNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qNe():t==="fa"?UNe():HNe()}),WNe=()=>"Overleaf session cookie",VNe=()=>"Overleaf 会话 cookie",KNe=()=>"کوکی نشست Overleaf",y4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VNe():t==="fa"?KNe():WNe()}),QNe=()=>"To follow Overleaf as people type, paste your Overleaf session cookie: in a browser signed in to Overleaf, open the developer tools, find the overleaf_session2 cookie, and copy its value. It stays on this machine.",YNe=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",XNe=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",ZNe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YNe():t==="fa"?XNe():QNe()}),JNe=()=>"Overleaf sync failed",eze=()=>"Overleaf 同步失败",tze=()=>"همگام‌سازی با Overleaf ناموفق بود",x4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eze():t==="fa"?tze():JNe()}),nze=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",rze=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",sze=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",ize=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rze():t==="fa"?sze():nze()}),aze=()=>"Syncing with Overleaf…",oze=()=>"正在与 Overleaf 同步…",lze=()=>"در حال همگام‌سازی با Overleaf…",AD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oze():t==="fa"?lze():aze()}),cze=()=>"Paste an Overleaf Git authentication token to keep this paper in step with an Overleaf project. Create one in Overleaf under Account Settings — Git integration comes with a paid Overleaf plan.",uze=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",fze=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",dze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uze():t==="fa"?fze():cze()}),hze=()=>"Paste the URL of the Overleaf project this paper belongs to. Overleaf cannot create one over Git, so open or create the project there first.",_ze=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",pze=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",mze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_ze():t==="fa"?pze():hze()}),gze=()=>"Toggle Plan mode for this chat",vze=()=>"切换此聊天的计划模式",bze=()=>"تغییر حالت طرح این گفت‌وگو",yze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vze():t==="fa"?bze():gze()}),xze=()=>"Accept and auto mode",wze=()=>"接受并使用自动模式",Sze=()=>"پذیرش و حالت خودکار",kze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wze():t==="fa"?Sze():xze()}),Cze=()=>"Accept and bypass all",Eze=()=>"接受并跳过所有审批",Nze=()=>"پذیرش و عبور از همهٔ تأییدها",zze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Eze():t==="fa"?Nze():Cze()}),Tze=()=>"Accept plan",jze=()=>"接受计划",Aze=()=>"پذیرش طرح",Rze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jze():t==="fa"?Aze():Tze()}),Mze=e=>`${e==null?void 0:e.agent} proposed a plan`,Dze=e=>`${e==null?void 0:e.agent} 提出了一个计划`,Lze=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,Oze=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Dze(e):t==="fa"?Lze(e):Mze(e)}),Ize=e=>`${e==null?void 0:e.agent} is ready to proceed`,Bze=e=>`${e==null?void 0:e.agent} 已准备好继续`,$ze=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,Pze=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Bze(e):t==="fa"?$ze(e):Ize(e)}),Fze=()=>"Back",Hze=()=>"返回",qze=()=>"بازگشت",Uze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Hze():t==="fa"?qze():Fze()}),Gze=()=>"More approval options",Wze=()=>"更多批准选项",Vze=()=>"گزینه‌های تأیید بیشتر",Kze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wze():t==="fa"?Vze():Gze()}),Qze=()=>"Open plan",Yze=()=>"打开计划",Xze=()=>"باز کردن طرح",Zze=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yze():t==="fa"?Xze():Qze()}),Jze=()=>"Reject",eTe=()=>"拒绝",tTe=()=>"رد کردن",nTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eTe():t==="fa"?tTe():Jze()}),rTe=()=>"Revise",sTe=()=>"修改",iTe=()=>"بازنگری",aTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sTe():t==="fa"?iTe():rTe()}),oTe=()=>"Revise…",lTe=()=>"修改…",cTe=()=>"بازنگری…",uTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lTe():t==="fa"?cTe():oTe()}),fTe=()=>"What should change? (optional)",dTe=()=>"需要更改什么?(可选)",hTe=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",_Te=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dTe():t==="fa"?hTe():fTe()}),pTe=e=>`${e==null?void 0:e.count} active`,mTe=e=>`${e==null?void 0:e.count} 个活跃`,gTe=e=>`${e==null?void 0:e.count} فعال`,vTe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?mTe(e):t==="fa"?gTe(e):pTe(e)}),bTe=e=>`${e==null?void 0:e.count} total agents`,yTe=e=>`共 ${e==null?void 0:e.count} 个智能体`,xTe=e=>`در مجموع ${e==null?void 0:e.count} عامل`,wTe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?yTe(e):t==="fa"?xTe(e):bTe(e)}),STe=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,kTe=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,CTe=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,ETe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?kTe(e):t==="fa"?CTe(e):STe(e)}),NTe=()=>"Agents",zTe=()=>"智能体",TTe=()=>"عامل‌ها",tN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zTe():t==="fa"?TTe():NTe()}),jTe=()=>"arXiv paper ID:",ATe=()=>"arXiv 论文 ID:",RTe=()=>"شناسهٔ مقالهٔ arXiv:",MTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ATe():t==="fa"?RTe():jTe()}),DTe=()=>"Cancel",LTe=()=>"取消",OTe=()=>"لغو",ITe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LTe():t==="fa"?OTe():DTe()}),BTe=()=>"Created",$Te=()=>"创建时间",PTe=()=>"ایجادشده",FTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Te():t==="fa"?PTe():BTe()}),HTe=()=>"Delete project?",qTe=()=>"删除项目?",UTe=()=>"پروژه حذف شود؟",GTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qTe():t==="fa"?UTe():HTe()}),WTe=()=>"Delete project",VTe=()=>"删除项目",KTe=()=>"حذف پروژه",QTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VTe():t==="fa"?KTe():WTe()}),YTe=()=>"Deleting…",XTe=()=>"正在删除…",ZTe=()=>"در حال حذف…",JTe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XTe():t==="fa"?ZTe():YTe()}),eje=()=>"Experiments",tje=()=>"实验",nje=()=>"آزمایش‌ها",nN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tje():t==="fa"?nje():eje()}),rje=()=>"The local folder and linked GitHub repository are kept.",sje=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",ije=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",aje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sje():t==="fa"?ije():rje()}),oje=()=>"The local folder is kept.",lje=()=>"本地文件夹会保留。",cje=()=>"پوشهٔ محلی نگه داشته می‌شود.",uje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lje():t==="fa"?cje():oje()}),fje=()=>"New project",dje=()=>"新建项目",hje=()=>"پروژهٔ جدید",RD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dje():t==="fa"?hje():fje()}),_je=()=>"No projects yet — create one to get started.",pje=()=>"尚无项目——新建一个即可开始。",mje=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",gje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pje():t==="fa"?mje():_je()}),vje=()=>"Project",bje=()=>"项目",yje=()=>"پروژه",xje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bje():t==="fa"?yje():vje()}),wje=()=>"Projects",Sje=()=>"项目",kje=()=>"پروژه‌ها",Cje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Sje():t==="fa"?kje():wje()}),Eje=()=>"Repository",Nje=()=>"仓库",zje=()=>"مخزن",rN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Nje():t==="fa"?zje():Eje()}),Tje=()=>"Idle",jje=()=>"空闲",Aje=()=>"بیکار",Rje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jje():t==="fa"?Aje():Tje()}),Mje=()=>"Local",Dje=()=>"本地",Lje=()=>"محلی",MD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Dje():t==="fa"?Lje():Mje()}),Oje=()=>"1 total agent",Ije=()=>"共 1 个智能体",Bje=()=>"در مجموع ۱ عامل",$je=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ije():t==="fa"?Bje():Oje()}),Pje=e=>`${e==null?void 0:e.count} running`,Fje=e=>`${e==null?void 0:e.count} 个运行中`,Hje=e=>`${e==null?void 0:e.count} در حال اجرا`,qje=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Fje(e):t==="fa"?Hje(e):Pje(e)}),Uje=e=>`${e==null?void 0:e.count} total`,Gje=e=>`共 ${e==null?void 0:e.count} 个`,Wje=e=>`در مجموع ${e==null?void 0:e.count}`,sN=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Gje(e):t==="fa"?Wje(e):Uje(e)}),Vje=()=>"Installing the compatible binary. This may take a few minutes.",Kje=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",Qje=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",Yje=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kje():t==="fa"?Qje():Vje()}),Xje=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,Zje=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,Jje=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,eAe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Zje(e):t==="fa"?Jje(e):Xje(e)}),tAe=()=>"Check again",nAe=()=>"再次检查",rAe=()=>"بررسی دوباره",iN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nAe():t==="fa"?rAe():tAe()}),sAe=()=>"Closing…",iAe=()=>"正在关闭…",aAe=()=>"در حال بستن…",oAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iAe():t==="fa"?aAe():sAe()}),lAe=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,cAe=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,uAe=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,fAe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cAe(e):t==="fa"?uAe(e):lAe(e)}),dAe=()=>"Preparing your remote workspace…",hAe=()=>"正在准备远程工作区…",_Ae=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",pAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hAe():t==="fa"?_Ae():dAe()}),mAe=e=>`Connecting to ${e==null?void 0:e.host}`,gAe=e=>`正在连接到 ${e==null?void 0:e.host}`,vAe=e=>`در حال اتصال به ${e==null?void 0:e.host}`,bAe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?gAe(e):t==="fa"?vAe(e):mAe(e)}),yAe=()=>"Close remote host picker",xAe=()=>"关闭远程主机选择器",wAe=()=>"بستن انتخاب‌گر میزبان راه‌دور",SAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xAe():t==="fa"?wAe():yAe()}),kAe=()=>"Choose a configured SSH host.",CAe=()=>"选择已配置的 SSH 主机。",EAe=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",NAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CAe():t==="fa"?EAe():kAe()}),zAe=()=>"Connect to remote",TAe=()=>"连接到远程主机",jAe=()=>"اتصال به میزبان راه‌دور",DD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TAe():t==="fa"?jAe():zAe()}),AAe=()=>"Disconnect",RAe=()=>"断开连接",MAe=()=>"قطع اتصال",w4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RAe():t==="fa"?MAe():AAe()}),DAe=()=>"Your remote work is still running. Reconnect when you’re ready.",LAe=()=>"你的远程工作仍在运行。准备好后可以重新连接。",OAe=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",IAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LAe():t==="fa"?OAe():DAe()}),BAe=e=>`Disconnected from ${e==null?void 0:e.host}`,$Ae=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,PAe=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,LD=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ae(e):t==="fa"?PAe(e):BAe(e)}),FAe=e=>`Could not connect to ${e==null?void 0:e.host}`,HAe=e=>`无法连接到 ${e==null?void 0:e.host}`,qAe=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,UAe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?HAe(e):t==="fa"?qAe(e):FAe(e)}),GAe=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",WAe=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",VAe=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",KAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?WAe():t==="fa"?VAe():GAe()}),QAe=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",YAe=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",XAe=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",ZAe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YAe():t==="fa"?XAe():QAe()}),JAe=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,eRe=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,tRe=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,nRe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?eRe(e):t==="fa"?tRe(e):JAe(e)}),rRe=()=>"OpenResearch binary",sRe=()=>"OpenResearch 二进制文件",iRe=()=>"فایل اجرایی OpenResearch",aRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sRe():t==="fa"?iRe():rRe()}),oRe=()=>"Repository cache",lRe=()=>"仓库缓存",cRe=()=>"حافظهٔ نهان مخزن",uRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lRe():t==="fa"?cRe():oRe()}),fRe=()=>"OpenResearch Database",dRe=()=>"OpenResearch 数据库",hRe=()=>"پایگاه دادهٔ OpenResearch",_Re=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dRe():t==="fa"?hRe():fRe()}),pRe=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",mRe=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",gRe=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",vRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mRe():t==="fa"?gRe():pRe()}),bRe=()=>"Install OpenResearch?",yRe=()=>"安装 OpenResearch?",xRe=()=>"OpenResearch نصب شود؟",wRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yRe():t==="fa"?xRe():bRe()}),SRe=()=>"Installing…",kRe=()=>"正在安装…",CRe=()=>"در حال نصب…",ERe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kRe():t==="fa"?CRe():SRe()}),NRe=()=>"No matching SSH hosts",zRe=()=>"没有匹配的 SSH 主机",TRe=()=>"میزبان SSH منطبقی پیدا نشد",jRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zRe():t==="fa"?TRe():NRe()}),ARe=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,RRe=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,MRe=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,DRe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?RRe(e):t==="fa"?MRe(e):ARe(e)}),LRe=()=>"Open remote",ORe=()=>"打开远程工作区",IRe=()=>"باز کردن راه‌دور",BRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ORe():t==="fa"?IRe():LRe()}),$Re=()=>"Closing this tab or disconnecting leaves agents and experiments running. Approval requests remain pending for up to 55 minutes. A host restart or administrator policy may stop OpenResearch.",PRe=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",FRe=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",HRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PRe():t==="fa"?FRe():$Re()}),qRe=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",URe=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",GRe=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",WRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?URe():t==="fa"?GRe():qRe()}),VRe=()=>"Preparing remote workspace…",KRe=()=>"正在准备远程工作区…",QRe=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",YRe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KRe():t==="fa"?QRe():VRe()}),XRe=()=>"Reconnect",ZRe=()=>"重新连接",JRe=()=>"اتصال دوباره",aN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZRe():t==="fa"?JRe():XRe()}),eMe=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",tMe=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",nMe=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",rMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tMe():t==="fa"?nMe():eMe()}),sMe=e=>`Reconnecting to ${e==null?void 0:e.host}`,iMe=e=>`正在重新连接到 ${e==null?void 0:e.host}`,aMe=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,oMe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?iMe(e):t==="fa"?aMe(e):sMe(e)}),lMe=()=>"Search SSH hosts",cMe=()=>"搜索 SSH 主机",uMe=()=>"جستجوی میزبان‌های SSH",oN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cMe():t==="fa"?uMe():lMe()}),fMe=e=>`SSH: ${e==null?void 0:e.host}`,dMe=e=>`SSH:${e==null?void 0:e.host}`,hMe=e=>`SSH: ${e==null?void 0:e.host}`,g2=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?dMe(e):t==="fa"?hMe(e):fMe(e)}),_Me=()=>"Start a new OpenResearch host",pMe=()=>"启动新的 OpenResearch 主机",mMe=()=>"راه‌اندازی میزبان جدید OpenResearch",gMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pMe():t==="fa"?mMe():_Me()}),vMe=e=>`End ${e==null?void 0:e.count} pending approvals.`,bMe=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,yMe=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,xMe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?bMe(e):t==="fa"?yMe(e):vMe(e)}),wMe=()=>"Stop OpenResearch",SMe=()=>"停止 OpenResearch",kMe=()=>"توقف OpenResearch",CMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SMe():t==="fa"?kMe():wMe()}),EMe=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,NMe=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,zMe=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,TMe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?NMe(e):t==="fa"?zMe(e):EMe(e)}),jMe=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,AMe=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,RMe=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,MMe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?AMe(e):t==="fa"?RMe(e):jMe(e)}),DMe=()=>"Stop OpenResearch on host",LMe=()=>"停止主机上的 OpenResearch",OMe=()=>"توقف OpenResearch روی میزبان",OD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LMe():t==="fa"?OMe():DMe()}),IMe=()=>"This will also:",BMe=()=>"这还将:",$Me=()=>"این کار همچنین:",PMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?BMe():t==="fa"?$Me():IMe()}),FMe=()=>"End 1 pending approval.",HMe=()=>"结束 1 个待审批请求。",qMe=()=>"۱ تأیید در انتظار را پایان می‌دهد.",UMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?HMe():t==="fa"?qMe():FMe()}),GMe=()=>"Leave 1 submitted experiment running.",WMe=()=>"让 1 个已提交实验继续运行。",VMe=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",KMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?WMe():t==="fa"?VMe():GMe()}),QMe=()=>"Disconnect 1 other client.",YMe=()=>"断开 1 个其他客户端。",XMe=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",ZMe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YMe():t==="fa"?XMe():QMe()}),JMe=()=>"Keep 1 queued message saved.",eDe=()=>"保留 1 条排队消息。",tDe=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",nDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eDe():t==="fa"?tDe():JMe()}),rDe=()=>"Interrupt 1 active agent turn.",sDe=()=>"中断 1 个活动代理任务。",iDe=()=>"۱ نوبت فعال عامل را قطع می‌کند.",aDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sDe():t==="fa"?iDe():rDe()}),oDe=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,lDe=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,cDe=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,uDe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?lDe(e):t==="fa"?cDe(e):oDe(e)}),fDe=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,dDe=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,hDe=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,_De=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?dDe(e):t==="fa"?hDe(e):fDe(e)}),pDe=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,mDe=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,gDe=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,vDe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?mDe(e):t==="fa"?gDe(e):pDe(e)}),bDe=()=>"Stopping host…",yDe=()=>"正在停止主机…",xDe=()=>"در حال توقف میزبان…",wDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yDe():t==="fa"?xDe():bDe()}),SDe=()=>"Update",kDe=()=>"更新",CDe=()=>"به‌روزرسانی",lN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kDe():t==="fa"?CDe():SDe()}),EDe=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,NDe=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,zDe=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,TDe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?NDe(e):t==="fa"?zDe(e):EDe(e)}),jDe=()=>"Update OpenResearch?",ADe=()=>"更新 OpenResearch?",RDe=()=>"OpenResearch به‌روزرسانی شود؟",MDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ADe():t==="fa"?RDe():jDe()}),DDe=()=>"Updating…",LDe=()=>"正在更新…",ODe=()=>"در حال به‌روزرسانی…",IDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LDe():t==="fa"?ODe():DDe()}),BDe=()=>"Disable syncing",$De=()=>"关闭同步",PDe=()=>"غیرفعال کردن همگام‌سازی",FDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$De():t==="fa"?PDe():BDe()}),HDe=()=>"Enable GitHub syncing",qDe=()=>"启用 GitHub 同步",UDe=()=>"فعال‌سازی همگام‌سازی GitHub",GDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qDe():t==="fa"?UDe():HDe()}),WDe=()=>"Enabling…",VDe=()=>"正在启用…",KDe=()=>"در حال فعال‌سازی…",QDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VDe():t==="fa"?KDe():WDe()}),YDe=()=>"Updating…",XDe=()=>"正在更新…",ZDe=()=>"در حال به‌روزرسانی…",JDe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XDe():t==="fa"?ZDe():YDe()}),eLe=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,tLe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,nLe=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,rLe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?tLe(e):t==="fa"?nLe(e):eLe(e)}),sLe=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,iLe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,aLe=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,oLe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?iLe(e):t==="fa"?aLe(e):sLe(e)}),lLe=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · next attempt in ${e==null?void 0:e.seconds}s`,cLe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,uLe=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,fLe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?cLe(e):t==="fa"?uLe(e):lLe(e)}),dLe=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,hLe=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,_Le=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,pLe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?hLe(e):t==="fa"?_Le(e):dLe(e)}),mLe=()=>"CLI is retrying…",gLe=()=>"CLI 正在重试…",vLe=()=>"CLI در حال تلاش دوباره است…",bLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gLe():t==="fa"?vLe():mLe()}),yLe=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,xLe=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,wLe=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,SLe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?xLe(e):t==="fa"?wLe(e):yLe(e)}),kLe=()=>"Sending again…",CLe=()=>"正在重新发送…",ELe=()=>"در حال ارسال دوباره…",NLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CLe():t==="fa"?ELe():kLe()}),zLe=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,TLe=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,jLe=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,ALe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?TLe(e):t==="fa"?jLe(e):zLe(e)}),RLe=()=>"Retrying…",MLe=()=>"正在重试…",DLe=()=>"در حال تلاش دوباره…",ID=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MLe():t==="fa"?DLe():RLe()}),LLe=()=>"Default speed",OLe=()=>"默认速度",ILe=()=>"سرعت پیش‌فرض",BLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OLe():t==="fa"?ILe():LLe()}),$Le=()=>"Standard",PLe=()=>"标准",FLe=()=>"استاندارد",HLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PLe():t==="fa"?FLe():$Le()}),qLe=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,ULe=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,GLe=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,WLe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?ULe(e):t==="fa"?GLe(e):qLe(e)}),VLe=()=>"Appearance",KLe=()=>"外观",QLe=()=>"ظاهر",YLe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KLe():t==="fa"?QLe():VLe()}),XLe=()=>"Check",ZLe=()=>"检查",JLe=()=>"بررسی",eOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZLe():t==="fa"?JLe():XLe()}),tOe=()=>"Check again",nOe=()=>"再次检查",rOe=()=>"بررسی دوباره",Pp=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nOe():t==="fa"?rOe():tOe()}),sOe=()=>"Check for updates",iOe=()=>"检查更新",aOe=()=>"بررسی به‌روزرسانی",oOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iOe():t==="fa"?aOe():sOe()}),lOe=()=>"Check now",cOe=()=>"立即检查",uOe=()=>"اکنون بررسی کن",fOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cOe():t==="fa"?uOe():lOe()}),dOe=()=>"Check setup",hOe=()=>"检查设置",_Oe=()=>"بررسی راه‌اندازی",pOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hOe():t==="fa"?_Oe():dOe()}),mOe=()=>"orx checks a few times a day on its own.",gOe=()=>"orx 每天会自动检查几次。",vOe=()=>"orx روزی چند بار خودکار بررسی می‌کند.",bOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gOe():t==="fa"?vOe():mOe()}),yOe=()=>"Choose a flavor",xOe=()=>"选择配置",wOe=()=>"انتخاب پیکربندی",SOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xOe():t==="fa"?wOe():yOe()}),kOe=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,COe=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,EOe=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,NOe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?COe(e):t==="fa"?EOe(e):kOe(e)}),zOe=()=>"clean",TOe=()=>"无更改",jOe=()=>"بدون تغییر",AOe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TOe():t==="fa"?jOe():zOe()}),ROe=e=>`Already linked at ${e==null?void 0:e.link}.`,MOe=e=>`已链接到 ${e==null?void 0:e.link}。`,DOe=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,LOe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?MOe(e):t==="fa"?DOe(e):ROe(e)}),OOe=e=>`Linked ${e==null?void 0:e.link}.`,IOe=e=>`已链接 ${e==null?void 0:e.link}。`,BOe=e=>`${e==null?void 0:e.link} پیوند شد.`,$Oe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?IOe(e):t==="fa"?BOe(e):OOe(e)}),POe=()=>"Connect",FOe=()=>"连接",HOe=()=>"اتصال",G5=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FOe():t==="fa"?HOe():POe()}),qOe=()=>"Connected via GitHub CLI",UOe=()=>"已通过 GitHub CLI 连接",GOe=()=>"از طریق GitHub CLI متصل است",BD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UOe():t==="fa"?GOe():qOe()}),WOe=()=>"Connecting…",VOe=()=>"正在连接…",KOe=()=>"در حال اتصال…",$D=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VOe():t==="fa"?KOe():WOe()}),QOe=e=>`CPU cores: ${e==null?void 0:e.count}`,YOe=e=>`${e==null?void 0:e.count} 个 CPU 核心`,XOe=e=>`${e==null?void 0:e.count} هستهٔ CPU`,ZOe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?YOe(e):t==="fa"?XOe(e):QOe(e)}),JOe=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",eIe=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",tIe=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",nIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eIe():t==="fa"?tIe():JOe()}),rIe=()=>"the current project",sIe=()=>"当前项目",iIe=()=>"پروژهٔ فعلی",aIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sIe():t==="fa"?iIe():rIe()}),oIe=e=>`${e==null?void 0:e.value} (custom)`,lIe=e=>`${e==null?void 0:e.value}(自定义)`,cIe=e=>`${e==null?void 0:e.value} (سفارشی)`,uIe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?lIe(e):t==="fa"?cIe(e):oIe(e)}),fIe=()=>"detached",dIe=()=>"分离头指针",hIe=()=>"جدا از شاخه",W5=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dIe():t==="fa"?hIe():fIe()}),_Ie=()=>"Disconnected",pIe=()=>"已断开连接",mIe=()=>"قطع اتصال",PD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pIe():t==="fa"?mIe():_Ie()}),gIe=()=>"Environment tab",vIe=()=>"环境标签页",bIe=()=>"زبانهٔ محیط",yIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vIe():t==="fa"?bIe():gIe()}),xIe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,wIe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,SIe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,kIe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?wIe(e):t==="fa"?SIe(e):xIe(e)}),CIe=()=>"GitHub rejected the push because this repository is archived and read-only. The local project is still available. Unarchive the repository on GitHub, then enable syncing here.",EIe=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",NIe=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",zIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?EIe():t==="fa"?NIe():CIe()}),TIe=()=>"GitHub contains changes that are not in this local project. Pull the latest GitHub changes and resolve any conflicts in Git, then try enabling syncing again.",jIe=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",AIe=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",RIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jIe():t==="fa"?AIe():TIe()}),MIe=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",DIe=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",LIe=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",OIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?DIe():t==="fa"?LIe():MIe()}),IIe=e=>`GPU × ${e==null?void 0:e.count}`,BIe=e=>`${e==null?void 0:e.count} 个 GPU`,$Ie=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,PIe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?BIe(e):t==="fa"?$Ie(e):IIe(e)}),FIe=()=>"has changes",HIe=()=>"有更改",qIe=()=>"دارای تغییر",UIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?HIe():t==="fa"?qIe():FIe()}),GIe=e=>`This token is valid but does not report whether it can launch Jobs; OAuth tokens from ${e==null?void 0:e.login} never do. Launches may still work. For a definitive check, save a write-scoped token from ${e==null?void 0:e.url}.`,WIe=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,VIe=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,KIe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?WIe(e):t==="fa"?VIe(e):GIe(e)}),QIe=()=>"This token is valid, but cannot submit Hugging Face Jobs. Create a token with Jobs write permission in Hugging Face token settings, then replace it here.",YIe=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",XIe=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",ZIe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YIe():t==="fa"?XIe():QIe()}),JIe=()=>"Install",eBe=()=>"安装",tBe=()=>"نصب",nBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eBe():t==="fa"?tBe():JIe()}),rBe=e=>`Adds ${e==null?void 0:e.command} to your terminal, pointing at this app, so the CLI and app are always the same version.`,sBe=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,iBe=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,aBe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?sBe(e):t==="fa"?iBe(e):rBe(e)}),oBe=e=>`Install the ${e==null?void 0:e.command} command`,lBe=e=>`安装 ${e==null?void 0:e.command} 命令`,cBe=e=>`نصب فرمان ${e==null?void 0:e.command}`,uBe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?lBe(e):t==="fa"?cBe(e):oBe(e)}),fBe=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",dBe=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",hBe=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",_Be=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dBe():t==="fa"?hBe():fBe()}),pBe=()=>"Install the new release now instead of waiting for the background update.",mBe=()=>"立即安装新版本,无需等待后台更新。",gBe=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",vBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mBe():t==="fa"?gBe():pBe()}),bBe=()=>"Discard your unsaved Kubernetes changes?",yBe=()=>"要放弃未保存的 Kubernetes 更改吗?",xBe=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",wBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yBe():t==="fa"?xBe():bBe()}),SBe=()=>"Key from",kBe=()=>"密钥来自",CBe=()=>"کلید از",EBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kBe():t==="fa"?CBe():SBe()}),NBe=()=>"Use current kubectl context",zBe=()=>"使用当前 kubectl 上下文",TBe=()=>"استفاده از کانتکست فعلی kubectl",jBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zBe():t==="fa"?TBe():NBe()}),ABe=e=>`Use current context (${e==null?void 0:e.context})`,RBe=e=>`使用当前上下文(${e==null?void 0:e.context})`,MBe=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,DBe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?RBe(e):t==="fa"?MBe(e):ABe(e)}),LBe=()=>"Language",OBe=()=>"语言",IBe=()=>"زبان",BBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OBe():t==="fa"?IBe():LBe()}),$Be=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,PBe=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,FBe=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,HBe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?PBe(e):t==="fa"?FBe(e):$Be(e)}),qBe=()=>"Make default",UBe=()=>"设为默认值",GBe=()=>"پیش‌فرض شود",WBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UBe():t==="fa"?GBe():qBe()}),VBe=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",KBe=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",QBe=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",YBe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KBe():t==="fa"?QBe():VBe()}),XBe=()=>"Replace token ID",ZBe=()=>"替换令牌 ID",JBe=()=>"جایگزینی شناسهٔ توکن",e$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZBe():t==="fa"?JBe():XBe()}),t$e=()=>"Replace token secret",n$e=()=>"替换令牌密钥",r$e=()=>"جایگزینی رمز توکن",s$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?n$e():t==="fa"?r$e():t$e()}),i$e=()=>"How to get a Modal token",a$e=()=>"如何获取 Modal 令牌",o$e=()=>"روش دریافت توکن Modal",l$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?a$e():t==="fa"?o$e():i$e()}),c$e=()=>"Token ID",u$e=()=>"令牌 ID",f$e=()=>"شناسهٔ توکن",d$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?u$e():t==="fa"?f$e():c$e()}),h$e=()=>"Token secret",_$e=()=>"令牌密钥",p$e=()=>"رمز توکن",m$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_$e():t==="fa"?p$e():h$e()}),g$e=e=>`${e==null?void 0:e.count} available — ${e==null?void 0:e.models}`,v$e=e=>`${e==null?void 0:e.count} 个可用 — ${e==null?void 0:e.models}`,b$e=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,y$e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?v$e(e):t==="fa"?b$e(e):g$e(e)}),x$e=e=>`Needs ${e==null?void 0:e.tool}`,w$e=e=>`需要 ${e==null?void 0:e.tool}`,S$e=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,k$e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?w$e(e):t==="fa"?S$e(e):x$e(e)}),C$e=()=>"Needs tools",E$e=()=>"缺少工具",N$e=()=>"به ابزارها نیاز دارد",z$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?E$e():t==="fa"?N$e():C$e()}),T$e=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,j$e=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,A$e=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,R$e=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?j$e(e):t==="fa"?A$e(e):T$e(e)}),M$e=()=>"New runs use SSH; choose a host when launching.",D$e=()=>"新运行将使用 SSH;启动时请选择主机。",L$e=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",O$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?D$e():t==="fa"?L$e():M$e()}),I$e=()=>"New token",B$e=()=>"新令牌",$$e=()=>"توکن جدید",P$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?B$e():t==="fa"?$$e():I$e()}),F$e=()=>"No default flavor",H$e=()=>"不设默认配置",q$e=()=>"بدون پیکربندی پیش‌فرض",U$e=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?H$e():t==="fa"?q$e():F$e()}),G$e=()=>"none",W$e=()=>"无",V$e=()=>"هیچ‌کدام",V5=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?W$e():t==="fa"?V$e():G$e()}),K$e=()=>"Not connected",Q$e=()=>"未连接",Y$e=()=>"متصل نیست",FD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Q$e():t==="fa"?Y$e():K$e()}),X$e=()=>"not found on PATH",Z$e=()=>"在 PATH 中未找到",J$e=()=>"در PATH پیدا نشد",ePe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Z$e():t==="fa"?J$e():X$e()}),tPe=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,nPe=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,rPe=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,sPe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?nPe(e):t==="fa"?rPe(e):tPe(e)}),iPe=()=>"not initialized",aPe=()=>"尚未初始化",oPe=()=>"راه‌اندازی نشده",lPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aPe():t==="fa"?oPe():iPe()}),cPe=()=>"Not set",uPe=()=>"未设置",fPe=()=>"تنظیم نشده",S4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uPe():t==="fa"?fPe():cPe()}),dPe=()=>"OAuth (subscription login)",hPe=()=>"OAuth(订阅登录)",_Pe=()=>"OAuth (ورود با اشتراک)",pPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hPe():t==="fa"?_Pe():dPe()}),mPe=e=>`The old copy was left at ${e==null?void 0:e.path} on a different disk. You can delete it after confirming everything works.`,gPe=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,vPe=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,bPe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?gPe(e):t==="fa"?vPe(e):mPe(e)}),yPe=()=>"Setting up…",xPe=()=>"正在设置…",wPe=()=>"در حال راه‌اندازی…",SPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xPe():t==="fa"?wPe():yPe()}),kPe=()=>"Account",CPe=()=>"账户",EPe=()=>"حساب",K5=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CPe():t==="fa"?EPe():kPe()}),NPe=()=>"Add one with",zPe=()=>"使用以下命令添加:",TPe=()=>"یکی با این فرمان اضافه کنید:",jPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zPe():t==="fa"?TPe():NPe()}),APe=()=>"Add variable",RPe=()=>"添加变量",MPe=()=>"افزودن متغیر",DPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RPe():t==="fa"?MPe():APe()}),LPe=()=>"Agent models",OPe=()=>"智能体模型",IPe=()=>"مدل‌های عامل",BPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OPe():t==="fa"?IPe():LPe()}),$Pe=()=>"Anonymous usage analytics",PPe=()=>"匿名使用情况分析",FPe=()=>"تحلیل ناشناس استفاده",cN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PPe():t==="fa"?FPe():$Pe()}),HPe=()=>"Auth",qPe=()=>"身份验证",UPe=()=>"احراز هویت",GPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qPe():t==="fa"?UPe():HPe()}),WPe=()=>"Authentication",VPe=()=>"身份验证",KPe=()=>"احراز هویت",QPe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VPe():t==="fa"?KPe():WPe()}),YPe=()=>"Back to Compute",XPe=()=>"返回算力设置",ZPe=()=>"بازگشت به رایانش",HD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XPe():t==="fa"?ZPe():YPe()}),JPe=()=>"Backend",eFe=()=>"后端",tFe=()=>"بک‌اند",nFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eFe():t==="fa"?tFe():JPe()}),rFe=()=>"Baseline",sFe=()=>"基线",iFe=()=>"خط مبنا",aFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sFe():t==="fa"?iFe():rFe()}),oFe=()=>"Binary",lFe=()=>"可执行文件",cFe=()=>"فایل اجرایی",uFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lFe():t==="fa"?cFe():oFe()}),fFe=()=>"Cancel",dFe=()=>"取消",hFe=()=>"لغو",Fp=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dFe():t==="fa"?hFe():fFe()}),_Fe=()=>"Cancel new variable",pFe=()=>"取消新变量",mFe=()=>"لغو متغیر جدید",gFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pFe():t==="fa"?mFe():_Fe()}),vFe=()=>"Checking compute targets…",bFe=()=>"正在检查算力目标…",yFe=()=>"در حال بررسی مقصدهای رایانشی…",xFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bFe():t==="fa"?yFe():vFe()}),wFe=()=>"Checking kubectl…",SFe=()=>"正在检查 kubectl…",kFe=()=>"در حال بررسی kubectl…",CFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SFe():t==="fa"?kFe():wFe()}),EFe=()=>"Checking Modal…",NFe=()=>"正在检查 Modal…",zFe=()=>"در حال بررسی Modal…",TFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?NFe():t==="fa"?zFe():EFe()}),jFe=()=>"Choose a preset flavor",AFe=()=>"选择预设规格",RFe=()=>"یک پیکربندی آماده انتخاب کنید",uN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?AFe():t==="fa"?RFe():jFe()}),MFe=()=>"cluster default",DFe=()=>"集群默认值",LFe=()=>"پیش‌فرض خوشه",fN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?DFe():t==="fa"?LFe():MFe()}),OFe=()=>"cluster default (e.g. 4h, 30m)",IFe=()=>"集群默认值(例如 4h、30m)",BFe=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",$Fe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IFe():t==="fa"?BFe():OFe()}),PFe=()=>"Cluster unreachable",FFe=()=>"无法连接集群",HFe=()=>"خوشه در دسترس نیست",qFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FFe():t==="fa"?HFe():PFe()}),UFe=()=>"Compute",GFe=()=>"算力",WFe=()=>"رایانش",qD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GFe():t==="fa"?WFe():UFe()}),VFe=()=>"Connect compute backends and choose where new runs execute.",KFe=()=>"连接算力后端,并选择新运行的执行位置。",QFe=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",YFe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KFe():t==="fa"?QFe():VFe()}),XFe=()=>"Connected",ZFe=()=>"已连接",JFe=()=>"متصل",eHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ZFe():t==="fa"?JFe():XFe()}),tHe=()=>"Context",nHe=()=>"上下文",rHe=()=>"زمینه",sHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nHe():t==="fa"?rHe():tHe()}),iHe=()=>"Current",aHe=()=>"当前",oHe=()=>"فعلی",lHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?aHe():t==="fa"?oHe():iHe()}),cHe=()=>"Currently off:",uHe=()=>"当前已关闭:",fHe=()=>"اکنون خاموش است:",dHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uHe():t==="fa"?fHe():cHe()}),hHe=()=>"Custom flavor",_He=()=>"自定义规格",pHe=()=>"پیکربندی سفارشی",mHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_He():t==="fa"?pHe():hHe()}),gHe=()=>"Custom flavor…",vHe=()=>"自定义规格…",bHe=()=>"پیکربندی سفارشی…",yHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vHe():t==="fa"?bHe():gHe()}),xHe=()=>"Data directory",wHe=()=>"数据目录",SHe=()=>"پوشهٔ داده",kHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wHe():t==="fa"?SHe():xHe()}),CHe=()=>"default",EHe=()=>"默认",NHe=()=>"پیش‌فرض",zHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?EHe():t==="fa"?NHe():CHe()}),THe=()=>"Default",jHe=()=>"默认",AHe=()=>"پیش‌فرض",UD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jHe():t==="fa"?AHe():THe()}),RHe=()=>"Default destination",MHe=()=>"默认目标",DHe=()=>"مقصد پیش‌فرض",LHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MHe():t==="fa"?DHe():RHe()}),OHe=()=>"Detecting hardware…",IHe=()=>"正在检测硬件…",BHe=()=>"در حال شناسایی سخت‌افزار…",$He=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IHe():t==="fa"?BHe():OHe()}),PHe=()=>"Detecting harnesses…",FHe=()=>"正在检测智能体工具…",HHe=()=>"در حال شناسایی ابزارهای عامل…",qHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FHe():t==="fa"?HHe():PHe()}),UHe=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",GHe=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",WHe=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",VHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GHe():t==="fa"?WHe():UHe()}),KHe=()=>"Effective URL",QHe=()=>"实际使用的网址",YHe=()=>"نشانی مؤثر",XHe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QHe():t==="fa"?YHe():KHe()}),ZHe=()=>"Enable GitHub syncing for new projects",JHe=()=>"为新项目启用 GitHub 同步",eqe=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",dN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?JHe():t==="fa"?eqe():ZHe()}),tqe=()=>"Environment",nqe=()=>"环境",rqe=()=>"محیط",GD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nqe():t==="fa"?rqe():tqe()}),sqe=()=>"Failed",iqe=()=>"失败",aqe=()=>"ناموفق",Q5=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iqe():t==="fa"?aqe():sqe()}),oqe=()=>"General",lqe=()=>"常规",cqe=()=>"عمومی",uqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lqe():t==="fa"?cqe():oqe()}),fqe=()=>"GitHub publishing",dqe=()=>"GitHub 发布",hqe=()=>"انتشار در GitHub",_qe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dqe():t==="fa"?hqe():fqe()}),pqe=()=>"Git token",mqe=()=>"Git 令牌",gqe=()=>"توکن Git",vqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mqe():t==="fa"?gqe():pqe()}),bqe=()=>"Harnesses",yqe=()=>"智能体工具",xqe=()=>"ابزارهای عامل",wqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yqe():t==="fa"?xqe():bqe()}),Sqe=()=>"hf_…",kqe=()=>"hf_…",Cqe=()=>"hf_…",Eqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kqe():t==="fa"?Cqe():Sqe()}),Nqe=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",zqe=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",Tqe=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",jqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zqe():t==="fa"?Tqe():Nqe()}),Aqe=()=>"Initialize Git",Rqe=()=>"初始化 Git",Mqe=()=>"راه‌اندازی Git",Dqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rqe():t==="fa"?Mqe():Aqe()}),Lqe=()=>"Install",Oqe=()=>"安装",Iqe=()=>"نصب",WD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Oqe():t==="fa"?Iqe():Lqe()}),Bqe=()=>"Install broken",$qe=()=>"安装损坏",Pqe=()=>"نصب خراب است",Fqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$qe():t==="fa"?Pqe():Bqe()}),Hqe=()=>"Install GitHub CLI",qqe=()=>"安装 GitHub CLI",Uqe=()=>"نصب GitHub CLI",Gqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qqe():t==="fa"?Uqe():Hqe()}),Wqe=()=>"Install updates automatically",Vqe=()=>"自动安装更新",Kqe=()=>"نصب خودکار به‌روزرسانی‌ها",hN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vqe():t==="fa"?Kqe():Wqe()}),Qqe=()=>"Instance history",Yqe=()=>"实例历史",Xqe=()=>"تاریخچهٔ نمونه‌ها",Zqe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yqe():t==="fa"?Xqe():Qqe()}),Jqe=()=>"Invalid Token",eUe=()=>"令牌无效",tUe=()=>"توکن نامعتبر",nUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eUe():t==="fa"?tUe():Jqe()}),rUe=()=>"Jobs / Dashboard URL",sUe=()=>"Jobs / 控制台网址",iUe=()=>"نشانی Jobs / داشبورد",aUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sUe():t==="fa"?iUe():rUe()}),oUe=()=>"kubectl not found",lUe=()=>"未找到 kubectl",cUe=()=>"kubectl پیدا نشد",uUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lUe():t==="fa"?cUe():oUe()}),fUe=()=>"Latest",dUe=()=>"最新版本",hUe=()=>"جدیدترین",_Ue=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dUe():t==="fa"?hUe():fUe()}),pUe=()=>"Loading…",mUe=()=>"正在加载…",gUe=()=>"در حال بارگیری…",mu=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mUe():t==="fa"?gUe():pUe()}),vUe=()=>"Loading Ray settings…",bUe=()=>"正在加载 Ray 设置…",yUe=()=>"در حال بارگیری تنظیمات Ray…",xUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bUe():t==="fa"?yUe():vUe()}),wUe=()=>"Loading slurm settings…",SUe=()=>"正在加载 Slurm 设置…",kUe=()=>"در حال بارگیری تنظیمات Slurm…",CUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SUe():t==="fa"?kUe():wUe()}),EUe=()=>"Loading status…",NUe=()=>"正在加载状态…",zUe=()=>"در حال بارگیری وضعیت…",TUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?NUe():t==="fa"?zUe():EUe()}),jUe=()=>"Local only",AUe=()=>"仅本地",RUe=()=>"فقط محلی",MUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?AUe():t==="fa"?RUe():jUe()}),DUe=()=>"Local repository",LUe=()=>"本地仓库",OUe=()=>"مخزن محلی",IUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LUe():t==="fa"?OUe():DUe()}),BUe=()=>"Login node",$Ue=()=>"登录节点",PUe=()=>"گرهٔ ورود",FUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ue():t==="fa"?PUe():BUe()}),HUe=()=>"Make GitHub syncing the default?",qUe=()=>"将 GitHub 同步设为默认值?",UUe=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",GUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qUe():t==="fa"?UUe():HUe()}),WUe=()=>"Missing bash/tar",VUe=()=>"缺少 bash/tar",KUe=()=>"bash/tar موجود نیست",QUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VUe():t==="fa"?KUe():WUe()}),YUe=()=>"More compute options",XUe=()=>"更多算力选项",ZUe=()=>"گزینه‌های رایانشی بیشتر",JUe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XUe():t==="fa"?ZUe():YUe()}),eGe=()=>"Move failed:",tGe=()=>"移动失败:",nGe=()=>"انتقال ناموفق بود:",rGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tGe():t==="fa"?nGe():eGe()}),sGe=()=>"Moved. orx is now using the new location.",iGe=()=>"已移动。orx 现在使用新位置。",aGe=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",oGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iGe():t==="fa"?aGe():sGe()}),lGe=()=>"Namespace",cGe=()=>"命名空间",uGe=()=>"فضای نام",fGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cGe():t==="fa"?uGe():lGe()}),dGe=()=>"New location",hGe=()=>"新位置",_Ge=()=>"محل جدید",pGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hGe():t==="fa"?_Ge():dGe()}),mGe=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",gGe=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",vGe=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",bGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gGe():t==="fa"?vGe():mGe()}),yGe=()=>"New variable key",xGe=()=>"新变量键名",wGe=()=>"کلید متغیر جدید",SGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xGe():t==="fa"?wGe():yGe()}),kGe=()=>"New variable value",CGe=()=>"新变量值",EGe=()=>"مقدار متغیر جدید",NGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CGe():t==="fa"?EGe():kGe()}),zGe=()=>"No code, prompts, file contents, or account identifiers are sent.",TGe=()=>"不会发送代码、提示词、文件内容或账户标识符。",jGe=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",AGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TGe():t==="fa"?jGe():zGe()}),RGe=()=>"No hosts found in ~/.ssh/config.",MGe=()=>"在 ~/.ssh/config 中未找到主机。",DGe=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",LGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MGe():t==="fa"?DGe():RGe()}),OGe=()=>"No job-create permission",IGe=()=>"没有创建 Job 的权限",BGe=()=>"مجوز ساخت Job وجود ندارد",$Ge=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IGe():t==="fa"?BGe():OGe()}),PGe=()=>"No Write Permissions",FGe=()=>"无写入权限",HGe=()=>"بدون مجوز نوشتن",qGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FGe():t==="fa"?HGe():PGe()}),UGe=()=>"No key on this computer to register — load a registered key with",GGe=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",WGe=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",VGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GGe():t==="fa"?WGe():UGe()}),KGe=()=>"No key on this computer yet — create one with",QGe=()=>"此计算机上还没有密钥——使用以下命令创建:",YGe=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",XGe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QGe():t==="fa"?YGe():KGe()}),ZGe=()=>"No Slurm CLI",JGe=()=>"无 Slurm CLI",eWe=()=>"بدون CLI اسلورم",tWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?JGe():t==="fa"?eWe():ZGe()}),nWe=()=>"None registered",rWe=()=>"未注册任何密钥",sWe=()=>"هیچ‌کدام ثبت نشده",iWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rWe():t==="fa"?sWe():nWe()}),aWe=()=>"Not checked",oWe=()=>"未检查",lWe=()=>"بررسی نشده",VD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oWe():t==="fa"?lWe():aWe()}),cWe=()=>"Not configured",uWe=()=>"未配置",fWe=()=>"پیکربندی نشده",Kv=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uWe():t==="fa"?fWe():cWe()}),dWe=()=>"Not installed",hWe=()=>"未安装",_We=()=>"نصب نیست",pWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hWe():t==="fa"?_We():dWe()}),mWe=()=>"Not now",gWe=()=>"暂不",vWe=()=>"اکنون نه",bWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gWe():t==="fa"?vWe():mWe()}),yWe=()=>"Not on this computer",xWe=()=>"不在此计算机上",wWe=()=>"روی این رایانه نیست",SWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xWe():t==="fa"?wWe():yWe()}),kWe=()=>"Not set (pass --host per launch)",CWe=()=>"未设置(每次启动时传入 --host)",EWe=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",NWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CWe():t==="fa"?EWe():kWe()}),zWe=()=>"Not signed in",TWe=()=>"未登录",jWe=()=>"وارد نشده",KD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TWe():t==="fa"?jWe():zWe()}),AWe=()=>"On this computer",RWe=()=>"在此计算机上",MWe=()=>"روی این رایانه",DWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RWe():t==="fa"?MWe():AWe()}),LWe=()=>"Open a project to inspect its repository and GitHub publication state.",OWe=()=>"打开项目以查看其仓库和 GitHub 发布状态。",IWe=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",BWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OWe():t==="fa"?IWe():LWe()}),$We=()=>"Open job page",PWe=()=>"打开作业页面",FWe=()=>"باز کردن صفحهٔ کار",_N=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PWe():t==="fa"?FWe():$We()}),HWe=()=>"Open on GitHub",qWe=()=>"在 GitHub 上打开",UWe=()=>"باز کردن در GitHub",pN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qWe():t==="fa"?UWe():HWe()}),GWe=()=>", or create one with",WWe=()=>",或使用以下命令创建:",VWe=()=>"، یا با این فرمان یکی بسازید:",KWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?WWe():t==="fa"?VWe():GWe()}),QWe=()=>"Org",YWe=()=>"组织",XWe=()=>"سازمان",ZWe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YWe():t==="fa"?XWe():QWe()}),JWe=()=>"Orgs",eVe=()=>"组织",tVe=()=>"سازمان‌ها",nVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eVe():t==="fa"?tVe():JWe()}),rVe=()=>"orx can't update this install",sVe=()=>"orx 无法更新此安装",iVe=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",aVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sVe():t==="fa"?iVe():rVe()}),oVe=()=>"Overleaf",lVe=()=>"Overleaf",cVe=()=>"Overleaf",QD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lVe():t==="fa"?cVe():oVe()}),uVe=()=>"Overleaf Git authentication token",fVe=()=>"Overleaf Git 身份验证令牌",dVe=()=>"توکن احراز هویت Git در Overleaf",hVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fVe():t==="fa"?dVe():uVe()}),_Ve=()=>"Overridden by env",pVe=()=>"已被环境变量覆盖",mVe=()=>"بازنویسی‌شده توسط محیط",gVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pVe():t==="fa"?mVe():_Ve()}),vVe=()=>"Partition",bVe=()=>"分区",yVe=()=>"پارتیشن",xVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bVe():t==="fa"?yVe():vVe()}),wVe=()=>"Path",SVe=()=>"路径",kVe=()=>"مسیر",CVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SVe():t==="fa"?kVe():wVe()}),EVe=()=>"Plan",NVe=()=>"方案",zVe=()=>"سطح اشتراک",TVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?NVe():t==="fa"?zVe():EVe()}),jVe=()=>"Project",AVe=()=>"项目",RVe=()=>"پروژه",MVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?AVe():t==="fa"?RVe():jVe()}),DVe=()=>"Ray version",LVe=()=>"Ray 版本",OVe=()=>"نسخهٔ Ray",IVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LVe():t==="fa"?OVe():DVe()}),BVe=()=>"Reachable",$Ve=()=>"可访问",PVe=()=>"در دسترس",FVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ve():t==="fa"?PVe():BVe()}),HVe=()=>"Reading ~/.ssh/config…",qVe=()=>"正在读取 ~/.ssh/config…",UVe=()=>"در حال خواندن ‎~/.ssh/config…",YD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qVe():t==="fa"?UVe():HVe()}),GVe=()=>"Ready",WVe=()=>"就绪",VVe=()=>"آماده",Hp=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?WVe():t==="fa"?VVe():GVe()}),KVe=()=>"Ready to move",QVe=()=>"可以移动",YVe=()=>"آمادهٔ انتقال",XVe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QVe():t==="fa"?YVe():KVe()}),ZVe=()=>"Configured",JVe=()=>"已配置",eKe=()=>"پیکربندی‌شده",Y5=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?JVe():t==="fa"?eKe():ZVe()}),tKe=()=>"Refresh",nKe=()=>"刷新",rKe=()=>"تازه‌سازی",qp=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?nKe():t==="fa"?rKe():tKe()}),sKe=()=>"Remotes",iKe=()=>"远程仓库",aKe=()=>"مخزن‌های دوردست",oKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iKe():t==="fa"?aKe():sKe()}),lKe=()=>"Repository",cKe=()=>"仓库",uKe=()=>"مخزن",fKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cKe():t==="fa"?uKe():lKe()}),dKe=()=>"Restart to finish updating",hKe=()=>"重新启动以完成更新",_Ke=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",pKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hKe():t==="fa"?_Ke():dKe()}),mKe=()=>"Running instances",gKe=()=>"正在运行的实例",vKe=()=>"نمونه‌های در حال اجرا",bKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gKe():t==="fa"?vKe():mKe()}),yKe=()=>"Runtime",xKe=()=>"运行时间",wKe=()=>"زمان اجرا",SKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xKe():t==="fa"?wKe():yKe()}),kKe=()=>". Save it under that key if it's meant for HF Jobs.",CKe=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",EKe=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",NKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?CKe():t==="fa"?EKe():kKe()}),zKe=()=>"Session cookie",TKe=()=>"会话 cookie",jKe=()=>"کوکی نشست",AKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?TKe():t==="fa"?jKe():zKe()}),RKe=()=>"With a session cookie saved, a linked paper follows Overleaf as people type and sends saves straight back. Figures still move on the slower Git sync. Copy the overleaf_session2 cookie from a browser signed in to Overleaf; it stops working when that sign-in does.",MKe=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",DKe=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",LKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?MKe():t==="fa"?DKe():RKe()}),OKe=()=>"Settings",IKe=()=>"设置",BKe=()=>"تنظیمات",X5=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IKe():t==="fa"?BKe():OKe()}),$Ke=()=>"Signed in",PKe=()=>"已登录",FKe=()=>"وارد شده",HKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PKe():t==="fa"?FKe():$Ke()}),qKe=()=>"Source",UKe=()=>"来源",GKe=()=>"منبع",XD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UKe():t==="fa"?GKe():qKe()}),WKe=()=>"SSH Key",VKe=()=>"SSH 密钥",KKe=()=>"کلید SSH",QKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VKe():t==="fa"?KKe():WKe()}),YKe=()=>"Started",XKe=()=>"开始时间",ZKe=()=>"آغاز",JKe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XKe():t==="fa"?ZKe():YKe()}),eQe=()=>"State",tQe=()=>"状态",nQe=()=>"وضعیت",rQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tQe():t==="fa"?nQe():eQe()}),sQe=()=>"Status",iQe=()=>"状态",aQe=()=>"وضعیت",t_=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iQe():t==="fa"?aQe():sQe()}),oQe=()=>"Storage",lQe=()=>"存储",cQe=()=>"ذخیره‌سازی",uQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lQe():t==="fa"?cQe():oQe()}),fQe=()=>"Sync",dQe=()=>"同步",hQe=()=>"همگام‌سازی",_Qe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dQe():t==="fa"?hQe():fQe()}),pQe=()=>"Syncing off",mQe=()=>"同步已关闭",gQe=()=>"همگام‌سازی خاموش",vQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mQe():t==="fa"?gQe():pQe()}),bQe=()=>"Test connection",yQe=()=>"测试连接",xQe=()=>"آزمایش اتصال",wQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yQe():t==="fa"?xQe():bQe()}),SQe=()=>"Testing…",kQe=()=>"正在测试…",CQe=()=>"در حال آزمایش…",EQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kQe():t==="fa"?CQe():SQe()}),NQe=()=>", then add it with",zQe=()=>",然后使用以下命令添加:",TQe=()=>"، سپس با این فرمان اضافه‌اش کنید:",jQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zQe():t==="fa"?TQe():NQe()}),AQe=()=>"This is useful when collaborators follow project changes on GitHub. New projects will enable syncing automatically, creating a private repository when needed and pushing experiment branches for visibility.",RQe=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",MQe=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",DQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?RQe():t==="fa"?MQe():AQe()}),LQe=()=>"This saved destination is not configured. Set it up below or choose another backend.",OQe=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",IQe=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",BQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?OQe():t==="fa"?IQe():LQe()}),$Qe=()=>"This value looks like a Hugging Face token — compute runs only read it from",PQe=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",FQe=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",HQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?PQe():t==="fa"?FQe():$Qe()}),qQe=()=>"Time limit",UQe=()=>"时间限制",GQe=()=>"محدودیت زمانی",WQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?UQe():t==="fa"?GQe():qQe()}),VQe=()=>"Unable to verify",KQe=()=>"无法验证",QQe=()=>"تأیید ممکن نیست",k4=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?KQe():t==="fa"?QQe():VQe()}),YQe=()=>"Unknown",XQe=()=>"未知",ZQe=()=>"نامشخص",JQe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XQe():t==="fa"?ZQe():YQe()}),eYe=()=>"Update required",tYe=()=>"需要更新",nYe=()=>"نیازمند به‌روزرسانی",rYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tYe():t==="fa"?nYe():eYe()}),sYe=()=>"Updates",iYe=()=>"更新",aYe=()=>"به‌روزرسانی‌ها",mN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iYe():t==="fa"?aYe():sYe()}),oYe=()=>"Usage analytics",lYe=()=>"使用情况分析",cYe=()=>"تحلیل استفاده",uYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lYe():t==="fa"?cYe():oYe()}),fYe=()=>"value",dYe=()=>"值",hYe=()=>"مقدار",ZD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dYe():t==="fa"?hYe():fYe()}),_Ye=()=>"Variables available to runs and the research agent (API keys, tokens).",pYe=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",mYe=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",gYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pYe():t==="fa"?mYe():_Ye()}),vYe=()=>"Version",bYe=()=>"版本",yYe=()=>"نسخه",JD=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bYe():t==="fa"?yYe():vYe()}),xYe=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",wYe=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",SYe=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",kYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?wYe():t==="fa"?SYe():xYe()}),CYe=()=>"With a token saved, a paper opened in the dashboard can be kept in step with an Overleaf project, in both directions. Overleaf's Git integration comes with a paid Overleaf plan; without one, a paper can still be uploaded to Overleaf as a new project. The token stays on this machine and is not sent to compute backends.",EYe=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",NYe=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",zYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?EYe():t==="fa"?NYe():CYe()}),TYe=()=>"Pick a login node first",jYe=()=>"请先选择登录节点",AYe=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",RYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jYe():t==="fa"?AYe():TYe()}),MYe=()=>"Providers",DYe=()=>"提供商",LYe=()=>"ارائه‌دهندگان",OYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?DYe():t==="fa"?LYe():MYe()}),IYe=()=>"Reconnect",BYe=()=>"重新连接",$Ye=()=>"اتصال دوباره",eL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?BYe():t==="fa"?$Ye():IYe()}),PYe=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,FYe=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,HYe=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,qYe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?FYe(e):t==="fa"?HYe(e):PYe(e)}),UYe=()=>"Reinstall with the orx installer to get automatic updates.",GYe=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",WYe=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",VYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GYe():t==="fa"?WYe():UYe()}),KYe=()=>"Re-link",QYe=()=>"重新链接",YYe=()=>"پیوند دوباره",XYe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?QYe():t==="fa"?YYe():KYe()}),ZYe=()=>"Remove cookie",JYe=()=>"移除 cookie",eXe=()=>"حذف کوکی",tXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?JYe():t==="fa"?eXe():ZYe()}),nXe=()=>"Remove token",rXe=()=>"移除令牌",sXe=()=>"حذف توکن",iXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rXe():t==="fa"?sXe():nXe()}),aXe=()=>"Removing…",oXe=()=>"正在移除…",lXe=()=>"در حال حذف…",gN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?oXe():t==="fa"?lXe():aXe()}),cXe=()=>"Replace anyway",uXe=()=>"仍要替换",fXe=()=>"به‌هرحال جایگزین کن",dXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?uXe():t==="fa"?fXe():cXe()}),hXe=()=>"Replace key",_Xe=()=>"替换密钥",pXe=()=>"جایگزینی کلید",mXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?_Xe():t==="fa"?pXe():hXe()}),gXe=()=>"Replace token",vXe=()=>"替换令牌",bXe=()=>"جایگزینی توکن",yXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?vXe():t==="fa"?bXe():gXe()}),xXe=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,wXe=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,SXe=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,kXe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?wXe(e):t==="fa"?SXe(e):xXe(e)}),CXe=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,EXe=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,NXe=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,zXe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?EXe(e):t==="fa"?NXe(e):CXe(e)}),TXe=()=>"Run `gh auth login` in your terminal.",jXe=()=>"请在终端中运行 `gh auth login`。",AXe=()=>"در پایانه `gh auth login` را اجرا کنید.",RXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jXe():t==="fa"?AXe():TXe()}),MXe=()=>"Saved",DXe=()=>"已保存",LXe=()=>"ذخیره شده",vN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?DXe():t==="fa"?LXe():MXe()}),OXe=()=>"Set up",IXe=()=>"设置",BXe=()=>"راه‌اندازی",$Xe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?IXe():t==="fa"?BXe():OXe()}),PXe=()=>"Set up SSH key",FXe=()=>"设置 SSH 密钥",HXe=()=>"راه‌اندازی کلید SSH",qXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?FXe():t==="fa"?HXe():PXe()}),UXe=()=>"Sign in",GXe=()=>"登录",WXe=()=>"ورود",tL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?GXe():t==="fa"?WXe():UXe()}),VXe=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,KXe=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,QXe=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,nL=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?KXe(e):t==="fa"?QXe(e):VXe(e)}),YXe=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",XXe=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",ZXe=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",JXe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XXe():t==="fa"?ZXe():YXe()}),eZe=()=>"The terminal disconnected before setup completed. Try again.",tZe=()=>"设置完成前终端连接已断开。请重试。",nZe=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",bN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tZe():t==="fa"?nZe():eZe()}),rZe=()=>"Dark",sZe=()=>"深色",iZe=()=>"تیره",aZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sZe():t==="fa"?iZe():rZe()}),oZe=()=>"Theme",lZe=()=>"主题",cZe=()=>"پوسته",yN=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lZe():t==="fa"?cZe():oZe()}),uZe=()=>"Light",fZe=()=>"浅色",dZe=()=>"روشن",hZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?fZe():t==="fa"?dZe():uZe()}),_Ze=()=>"System",pZe=()=>"系统",mZe=()=>"سیستم",gZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pZe():t==="fa"?mZe():_Ze()}),vZe=()=>"Set up billing in the Tinker console",bZe=()=>"在 Tinker 控制台设置账单",yZe=()=>"تنظیم پرداخت در کنسول Tinker",xZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?bZe():t==="fa"?yZe():vZe()}),wZe=()=>"Billing setup required",SZe=()=>"需要设置账单",kZe=()=>"تنظیم پرداخت لازم است",CZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?SZe():t==="fa"?kZe():wZe()}),EZe=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",NZe=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",zZe=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",TZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?NZe():t==="fa"?zZe():EZe()}),jZe=()=>"Invalid Key",AZe=()=>"密钥无效",RZe=()=>"کلید نامعتبر",MZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?AZe():t==="fa"?RZe():jZe()}),DZe=()=>"Token from",LZe=()=>"令牌来自",OZe=()=>"توکن از",IZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LZe():t==="fa"?OZe():DZe()}),BZe=()=>"Update now",$Ze=()=>"立即更新",PZe=()=>"اکنون به‌روزرسانی کن",FZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Ze():t==="fa"?PZe():BZe()}),HZe=e=>`Update to ${e==null?void 0:e.version}`,qZe=e=>`更新到 ${e==null?void 0:e.version}`,UZe=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,GZe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?qZe(e):t==="fa"?UZe(e):HZe(e)}),WZe=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",VZe=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",KZe=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",QZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VZe():t==="fa"?KZe():WZe()}),YZe=()=>"Updating default destination…",XZe=()=>"正在更新默认运行位置…",ZZe=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",JZe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?XZe():t==="fa"?ZZe():YZe()}),eJe=()=>"Use this repository for automatic experiment-branch pushes when your connected account can write to it. Otherwise, OpenResearch creates a separate private repository for collaboration.",tJe=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",nJe=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",rJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tJe():t==="fa"?nJe():eJe()}),sJe=()=>"Validating…",iJe=()=>"正在验证…",aJe=()=>"در حال اعتبارسنجی…",rL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iJe():t==="fa"?aJe():sJe()}),oJe=()=>"View settings",lJe=()=>"查看设置",cJe=()=>"مشاهدهٔ تنظیمات",uJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lJe():t==="fa"?cJe():oJe()}),fJe=()=>"Skill",dJe=()=>"技能",hJe=()=>"مهارت",sL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dJe():t==="fa"?hJe():fJe()}),_Je=()=>"Loading skill…",pJe=()=>"正在加载技能…",mJe=()=>"در حال بارگیری مهارت…",gJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?pJe():t==="fa"?mJe():_Je()}),vJe=e=>`Delete the “${e==null?void 0:e.name}” skill?`,bJe=e=>`删除技能“${e==null?void 0:e.name}”?`,yJe=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,xJe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?bJe(e):t==="fa"?yJe(e):vJe(e)}),wJe=e=>`Delete skill ${e==null?void 0:e.name}`,SJe=e=>`删除技能 ${e==null?void 0:e.name}`,kJe=e=>`حذف مهارت ${e==null?void 0:e.name}`,CJe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?SJe(e):t==="fa"?kJe(e):wJe(e)}),EJe=e=>`Delete the “${e==null?void 0:e.name}” template?`,NJe=e=>`删除模板“${e==null?void 0:e.name}”?`,zJe=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,TJe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?NJe(e):t==="fa"?zJe(e):EJe(e)}),jJe=e=>`Delete template ${e==null?void 0:e.name}`,AJe=e=>`删除模板 ${e==null?void 0:e.name}`,RJe=e=>`حذف قالب ${e==null?void 0:e.name}`,MJe=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?AJe(e):t==="fa"?RJe(e):jJe(e)}),DJe=()=>"SKILL.md folders the agent discovers on its own and you invoke with /name in chat. Skills installed in your coding agents are picked up automatically.",LJe=()=>"智能体会自动发现的 SKILL.md 技能文件夹,你可以在聊天中通过 /name 调用。你的编码智能体中已安装的技能会自动纳入。",OJe=()=>"پوشه‌های SKILL.md که عامل خودش پیدا می‌کند و شما با ‎/name در گفتگو فراخوانی می‌کنید. مهارت‌های نصب‌شده در عامل‌های کدنویسی شما به‌طور خودکار در نظر گرفته می‌شوند.",IJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?LJe():t==="fa"?OJe():DJe()}),BJe=()=>"Drop a SKILL.md or .zip here, or click to choose",$Je=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",PJe=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",FJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$Je():t==="fa"?PJe():BJe()}),HJe=()=>"Drop a .tex or .zip here, or click to choose",qJe=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",UJe=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",GJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qJe():t==="fa"?UJe():HJe()}),WJe=()=>"File too large (max 20 MB).",VJe=()=>"文件过大(最大 20 MB)。",KJe=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",iL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?VJe():t==="fa"?KJe():WJe()}),QJe=()=>" + 1 file",YJe=()=>" + 1 个文件",XJe=()=>" + ۱ فایل",ZJe=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?YJe():t==="fa"?XJe():QJe()}),JJe=()=>"What the agent brings to every session, in every project: the skills it can use, and the LaTeX templates it writes papers into.",eet=()=>"智能体在每个项目的每个会话中都会携带的内容:可用的技能,以及撰写论文所用的 LaTeX 模板。",tet=()=>"آنچه عامل در هر نشست و در همهٔ پروژه‌ها همراه دارد: مهارت‌هایی که می‌تواند استفاده کند و قالب‌های LaTeX که مقاله‌ها را با آن‌ها می‌نویسد.",net=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eet():t==="fa"?tet():JJe()}),ret=e=>` + ${e==null?void 0:e.count} files`,set=e=>` + ${e==null?void 0:e.count} 个文件`,iet=e=>` + ${e==null?void 0:e.count} فایل`,aet=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?set(e):t==="fa"?iet(e):ret(e)}),oet=()=>"Could not load skills:",cet=()=>"无法加载技能:",uet=()=>"بارگیری مهارت‌ها ممکن نشد:",fet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cet():t==="fa"?uet():oet()}),det=()=>"Could not load templates:",het=()=>"无法加载模板:",_et=()=>"بارگیری قالب‌ها ممکن نشد:",pet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?het():t==="fa"?_et():det()}),met=()=>"Customize",get=()=>"自定义",vet=()=>"سفارشی‌سازی",bet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?get():t==="fa"?vet():met()}),yet=()=>"Delete skill",xet=()=>"删除技能",wet=()=>"حذف مهارت",ket=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xet():t==="fa"?wet():yet()}),Cet=()=>"Delete template",Eet=()=>"删除模板",Net=()=>"حذف قالب",zet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Eet():t==="fa"?Net():Cet()}),Tet=()=>"LaTeX templates",jet=()=>"LaTeX 模板",Aet=()=>"قالب‌های LaTeX",Ret=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?jet():t==="fa"?Aet():Tet()}),Met=()=>"Loading skills…",Det=()=>"正在加载技能…",Let=()=>"در حال بارگیری مهارت‌ها…",Oet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Det():t==="fa"?Let():Met()}),Iet=()=>"Loading templates…",Bet=()=>"正在加载模板…",$et=()=>"در حال بارگیری قالب‌ها…",Pet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Bet():t==="fa"?$et():Iet()}),Fet=()=>"No skills yet.",Het=()=>"尚无技能。",qet=()=>"هنوز مهارتی وجود ندارد.",Uet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Het():t==="fa"?qet():Fet()}),Get=()=>"No templates yet.",Wet=()=>"尚无模板。",Vet=()=>"هنوز قالبی وجود ندارد.",Ket=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wet():t==="fa"?Vet():Get()}),Qet=()=>"Skills",Yet=()=>"技能",Xet=()=>"مهارت‌ها",Zet=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yet():t==="fa"?Xet():Qet()}),Jet=()=>"Uploading…",ett=()=>"正在上传…",ttt=()=>"در حال بارگذاری…",ntt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ett():t==="fa"?ttt():Jet()}),rtt=()=>"A conference class or house style the agent writes papers into instead of its default preamble. Upload a .tex file or a .zip containing its .cls and .sty files. With exactly one template available, the agent uses it without asking.",stt=()=>"智能体会使用会议文档类或内部样式来撰写论文,而不是使用默认导言。请上传 .tex 文件,或包含 .cls 和 .sty 文件的 .zip 压缩包。当恰好只有一个模板可用时,智能体会直接使用,无需询问。",itt=()=>"عامل به‌جای مقدمهٔ پیش‌فرض، مقاله‌ها را با کلاس همایش یا سبک سازمانی می‌نویسد. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید. وقتی دقیقاً یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",att=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?stt():t==="fa"?itt():rtt()}),ott=()=>"Upload a SKILL.md file or a .zip of a skill folder.",ltt=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",ctt=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",utt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ltt():t==="fa"?ctt():ott()}),ftt=()=>"Upload a .tex file or a .zip of a template folder.",dtt=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",htt=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",_tt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dtt():t==="fa"?htt():ftt()}),ptt=()=>"Close SSH config",mtt=()=>"关闭 SSH 配置",gtt=()=>"بستن پیکربندی SSH",vtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mtt():t==="fa"?gtt():ptt()}),btt=()=>"Discard your unsaved SSH config changes?",ytt=()=>"要放弃未保存的 SSH 配置更改吗?",xtt=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",wtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ytt():t==="fa"?xtt():btt()}),Stt=()=>"Loading SSH config…",ktt=()=>"正在加载 SSH 配置…",Ctt=()=>"در حال بارگیری پیکربندی SSH…",Ett=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ktt():t==="fa"?Ctt():Stt()}),Ntt=()=>"SSH config saved",ztt=()=>"SSH 配置已保存",Ttt=()=>"پیکربندی SSH ذخیره شد",jtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ztt():t==="fa"?Ttt():Ntt()}),Att=()=>"SSH config",Rtt=()=>"SSH 配置",Mtt=()=>"پیکربندی SSH",Dtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rtt():t==="fa"?Mtt():Att()}),Ltt=()=>"Configure SSH hosts…",Ott=()=>"配置 SSH 主机…",Itt=()=>"پیکربندی میزبان‌های SSH…",aL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ott():t==="fa"?Itt():Ltt()}),Btt=()=>"Cancelled",$tt=()=>"已取消",Ptt=()=>"لغوشده",Ftt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$tt():t==="fa"?Ptt():Btt()}),Htt=()=>"Cancelling",qtt=()=>"正在取消",Utt=()=>"در حال لغو",Gtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qtt():t==="fa"?Utt():Htt()}),Wtt=()=>"Done",Vtt=()=>"已完成",Ktt=()=>"انجام‌شده",Qtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vtt():t==="fa"?Ktt():Wtt()}),Ytt=()=>"Editing",Xtt=()=>"正在编辑",Ztt=()=>"در حال ویرایش",Jtt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xtt():t==="fa"?Ztt():Ytt()}),ent=()=>"Failed",tnt=()=>"失败",nnt=()=>"ناموفق",rnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tnt():t==="fa"?nnt():ent()}),snt=()=>"Idle",int=()=>"空闲",ant=()=>"بی‌کار",ont=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?int():t==="fa"?ant():snt()}),lnt=()=>"Running",cnt=()=>"运行中",unt=()=>"در حال اجرا",fnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cnt():t==="fa"?unt():lnt()}),dnt=()=>"Starting",hnt=()=>"正在启动",_nt=()=>"در حال آغاز",pnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hnt():t==="fa"?_nt():dnt()}),mnt=()=>"Copying…",gnt=()=>"正在复制…",vnt=()=>"در حال کپی…",bnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gnt():t==="fa"?vnt():mnt()}),ynt=()=>"Finalizing…",xnt=()=>"正在完成…",wnt=()=>"در حال نهایی‌سازی…",Snt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xnt():t==="fa"?wnt():ynt()}),knt=e=>`${e==null?void 0:e.size} free at target`,Cnt=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,Ent=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,Nnt=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Cnt(e):t==="fa"?Ent(e):knt(e)}),znt=e=>`Move all orx data to: +${e==null?void 0:e.path} + +The store is copied to the new location and activated there. Active runs or chats will block the move.`,Tnt=e=>`将所有 orx 数据移动到: +${e==null?void 0:e.path} + +存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,jnt=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ +${e==null?void 0:e.path} + +مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,Ant=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Tnt(e):t==="fa"?jnt(e):znt(e)}),Rnt=()=>"Move data here",Mnt=()=>"将数据移动到此处",Dnt=()=>"انتقال داده به اینجا",Lnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mnt():t==="fa"?Dnt():Rnt()}),Ont=()=>"Moving…",Int=()=>"正在移动…",Bnt=()=>"در حال جابه‌جایی…",$nt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Int():t==="fa"?Bnt():Ont()}),Pnt=()=>"Preparing…",Fnt=()=>"正在准备…",Hnt=()=>"در حال آماده‌سازی…",qnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Fnt():t==="fa"?Hnt():Pnt()}),Unt=()=>" (same disk, instant)",Gnt=()=>"(同一磁盘,可立即完成)",Wnt=()=>" (روی همان دیسک، فوری)",Vnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Gnt():t==="fa"?Wnt():Unt()}),Knt=()=>"default location",Qnt=()=>"默认位置",Ynt=()=>"محل پیش‌فرض",Xnt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Qnt():t==="fa"?Ynt():Knt()}),Znt=()=>"ORX_DATA_DIR environment variable",Jnt=()=>"ORX_DATA_DIR 环境变量",ert=()=>"متغیر محیطی ORX_DATA_DIR",trt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Jnt():t==="fa"?ert():Znt()}),nrt=()=>"your saved setting",rrt=()=>"已保存的设置",srt=()=>"تنظیم ذخیره‌شدهٔ شما",irt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?rrt():t==="fa"?srt():nrt()}),art=()=>"XDG_DATA_HOME",ort=()=>"XDG_DATA_HOME",lrt=()=>"XDG_DATA_HOME",crt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ort():t==="fa"?lrt():art()}),urt=()=>"Verifying…",frt=()=>"正在验证…",drt=()=>"در حال بررسی…",hrt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?frt():t==="fa"?drt():urt()}),_rt=()=>"Loading…",prt=()=>"正在加载…",mrt=()=>"در حال بارگیری…",grt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?prt():t==="fa"?mrt():_rt()}),vrt=()=>"This sub-agent is no longer available.",brt=()=>"此子智能体已不可用。",yrt=()=>"این عامل فرعی دیگر در دسترس نیست.",xrt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?brt():t==="fa"?yrt():vrt()}),wrt=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,Srt=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,krt=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,Crt=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Srt(e):t==="fa"?krt(e):wrt(e)}),Ert=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Nrt=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,zrt=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Trt=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Nrt(e):t==="fa"?zrt(e):Ert(e)}),jrt=()=>", a repo for training a mini-GPT from scratch.",Art=()=>",一个从零训练迷你 GPT 的仓库。",Rrt=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",Mrt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Art():t==="fa"?Rrt():jrt()}),Drt=()=>"Close",Lrt=()=>"关闭",Ort=()=>"بستن",Irt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Lrt():t==="fa"?Ort():Drt()}),Brt=()=>"Create a new project",$rt=()=>"新建项目",Prt=()=>"ایجاد پروژهٔ جدید",Frt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$rt():t==="fa"?Prt():Brt()}),Hrt=()=>"Demo project",qrt=()=>"演示项目",Urt=()=>"پروژهٔ نمایشی",Grt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qrt():t==="fa"?Urt():Hrt()}),Wrt=()=>"Explore the demo",Vrt=()=>"探索演示项目",Krt=()=>"دیدن پروژهٔ نمایشی",Qrt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Vrt():t==="fa"?Krt():Wrt()}),Yrt=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Xrt=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Zrt=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Jrt=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xrt():t==="fa"?Zrt():Yrt()}),est=()=>"nanochat",tst=()=>"nanochat",nst=()=>"nanochat",rst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tst():t==="fa"?nst():est()}),sst=()=>"Couldn’t save your progress. Try again.",ist=()=>"无法保存进度。请重试。",ast=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",ost=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?ist():t==="fa"?ast():sst()}),lst=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",cst=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",ust=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",fst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cst():t==="fa"?ust():lst()}),dst=()=>"Welcome to OpenResearch",hst=()=>"欢迎使用 OpenResearch",_st=()=>"به OpenResearch خوش آمدید",pst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hst():t==="fa"?_st():dst()}),mst=()=>"Baseline",gst=()=>"基线",vst=()=>"مبنا",bst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?gst():t==="fa"?vst():mst()}),yst=()=>"Experiment",xst=()=>"实验",wst=()=>"آزمایش",Ml=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xst():t==="fa"?wst():yst()}),Sst=e=>`${e==null?void 0:e.count} experiments`,kst=e=>`${e==null?void 0:e.count} 个实验`,Cst=e=>`${e==null?void 0:e.count} آزمایش`,Est=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?kst(e):t==="fa"?Cst(e):Sst(e)}),Nst=()=>"1 experiment",zst=()=>"1 个实验",Tst=()=>"۱ آزمایش",jst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zst():t==="fa"?Tst():Nst()}),Ast=()=>"Running",Rst=()=>"运行中",Mst=()=>"در حال اجرا",Dst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rst():t==="fa"?Mst():Ast()}),Lst=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",Ost=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",Ist=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Bst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ost():t==="fa"?Ist():Lst()}),$st=()=>"Ask the agent in chat to create and run your first experiment.",Pst=()=>"在聊天中让智能体创建并运行你的第一个实验。",Fst=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",Hst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pst():t==="fa"?Fst():$st()}),qst=()=>"Code",Ust=()=>"代码",Gst=()=>"کد",Wst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Ust():t==="fa"?Gst():qst()}),Vst=()=>"Logs",Kst=()=>"日志",Qst=()=>"گزارش‌ها",oL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Kst():t==="fa"?Qst():Vst()}),Yst=()=>"No experiments from the current task yet",Xst=()=>"当前任务尚无实验",Zst=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",Jst=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Xst():t==="fa"?Zst():Yst()}),eit=()=>"No experiments yet",tit=()=>"尚无实验",nit=()=>"هنوز آزمایشی وجود ندارد",rit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tit():t==="fa"?nit():eit()}),sit=()=>"no runs",iit=()=>"无运行",ait=()=>"بدون اجرا",oit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iit():t==="fa"?ait():sit()}),lit=()=>"Open logs",cit=()=>"打开日志",uit=()=>"باز کردن گزارش‌ها",fit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cit():t==="fa"?uit():lit()}),dit=()=>"other tasks",hit=()=>"其他任务",_it=()=>"وظایف دیگر",pit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hit():t==="fa"?_it():dit()}),mit=()=>"Runs",git=()=>"运行",vit=()=>"اجراها",bit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?git():t==="fa"?vit():mit()}),yit=()=>"Switch to Entire project to see all experiments",xit=()=>"切换到“整个项目”以查看所有实验",wit=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Sit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?xit():t==="fa"?wit():yit()}),kit=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,Cit=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,Eit=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,Nit=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Cit(e):t==="fa"?Eit(e):kit(e)}),zit=()=>"Dismiss",Tit=()=>"关闭",jit=()=>"بستن",Ait=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Tit():t==="fa"?jit():zit()}),Rit=()=>"Restart now",Mit=()=>"立即重新启动",Dit=()=>"هم‌اکنون دوباره راه‌اندازی کن",lL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Mit():t==="fa"?Dit():Rit()}),Lit=e=>`Could not restart: ${e==null?void 0:e.error}`,Oit=e=>`无法重新启动:${e==null?void 0:e.error}`,Iit=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,cL=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Oit(e):t==="fa"?Iit(e):Lit(e)}),Bit=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",$it=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",Pit=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",Fit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?$it():t==="fa"?Pit():Bit()}),Hit=()=>"Restarting…",qit=()=>"正在重新启动…",Uit=()=>"در حال راه‌اندازی مجدد…",uL=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?qit():t==="fa"?Uit():Hit()}),Git=()=>"macOS app",Wit=()=>"macOS 应用",Vit=()=>"برنامهٔ macOS",Kit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Wit():t==="fa"?Vit():Git()}),Qit=()=>"Installed with cargo",Yit=()=>"通过 cargo 安装",Xit=()=>"نصب‌شده با cargo",Zit=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Yit():t==="fa"?Xit():Qit()}),Jit=()=>"Installed with Homebrew",eat=()=>"通过 Homebrew 安装",tat=()=>"نصب‌شده با Homebrew",nat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?eat():t==="fa"?tat():Jit()}),rat=()=>"Installed with the orx installer",sat=()=>"通过 orx 安装程序安装",iat=()=>"نصب‌شده با نصب‌کنندهٔ orx",aat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?sat():t==="fa"?iat():rat()}),oat=()=>"Managed by Nix",lat=()=>"由 Nix 管理",cat=()=>"مدیریت‌شده با Nix",uat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?lat():t==="fa"?cat():oat()}),fat=()=>"Unknown install",dat=()=>"未知安装方式",hat=()=>"روش نصب نامشخص",_at=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?dat():t==="fa"?hat():fat()}),pat=()=>"Re-run your cargo install to update.",mat=()=>"重新运行 cargo 安装命令以更新。",gat=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",vat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?mat():t==="fa"?gat():pat()}),bat=()=>"Run brew upgrade to update.",yat=()=>"运行 brew upgrade 以更新。",xat=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",wat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?yat():t==="fa"?xat():bat()}),Sat=()=>"Update it through your Nix configuration.",kat=()=>"通过 Nix 配置进行更新。",Cat=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Eat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?kat():t==="fa"?Cat():Sat()}),Nat=()=>"Active Experiments",zat=()=>"活跃实验",Tat=()=>"آزمایش‌های فعال",jat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?zat():t==="fa"?Tat():Nat()}),Aat=()=>"Default compute",Rat=()=>"默认计算目标",Mat=()=>"محاسبات پیش‌فرض",Dat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Rat():t==="fa"?Mat():Aat()}),Lat=()=>"This worktree",Oat=()=>"当前工作树",Iat=()=>"این درخت کاری",Bat=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Oat():t==="fa"?Iat():Lat()}),$at=()=>"Workspace",Pat=()=>"工作区",Fat=()=>"فضای کاری",v2=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?Pat():t==="fa"?Fat():$at()}),Hat=e=>`Current worktree · ${e==null?void 0:e.branch}`,qat=e=>`当前工作树 · ${e==null?void 0:e.branch}`,Uat=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,Gat=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?qat(e):t==="fa"?Uat(e):Hat(e)}),Wat=e=>`Default branch · ${e==null?void 0:e.branch}`,Vat=e=>`默认分支 · ${e==null?void 0:e.branch}`,Kat=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,Qat=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Vat(e):t==="fa"?Kat(e):Wat(e)}),Yat=e=>`detached at ${e==null?void 0:e.branch}`,Xat=e=>`分离于 ${e==null?void 0:e.branch}`,Zat=e=>`جدا در ${e==null?void 0:e.branch}`,Jat=((e,n={})=>{const t=n.locale??T();return t==="zh-CN"?Xat(e):t==="fa"?Zat(e):Yat(e)}),eot=()=>"Listing truncated.",tot=()=>"列表已截断。",not=()=>"فهرست کوتاه شده است.",rot=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?tot():t==="fa"?not():eot()}),sot=()=>"Loading…",iot=()=>"正在加载…",aot=()=>"در حال بارگیری…",oot=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?iot():t==="fa"?aot():sot()}),lot=()=>"No changes yet.",cot=()=>"尚无更改。",uot=()=>"هنوز تغییری وجود ندارد.",fot=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?cot():t==="fa"?uot():lot()}),dot=()=>"No files.",hot=()=>"没有文件。",_ot=()=>"فایلی وجود ندارد.",pot=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?hot():t==="fa"?_ot():dot()}),mot=()=>"Refresh failed:",got=()=>"刷新失败:",vot=()=>"تازه‌سازی ناموفق بود:",bot=((e={},n={})=>{const t=n.locale??T();return t==="zh-CN"?got():t==="fa"?vot():mot()}),Ee=e=>`⁦${e}⁩`,Oo=e=>`⁨${e}⁩`,tn=e=>new Intl.NumberFormat(T()).format(e),b2="demo_nanochat_v1",qc=e=>e.startsWith("demo_"),T0="chat_demo_nanochat_v1",Z5="chat_demo_nanochat_figures_v1",J5="chat_demo_nanochat_literature_v1",yot={[T0]:"cpu_end_to_end",[Z5]:"figures",[J5]:"literature"},p1="cpu-apple-silicon-pipeline-results.md",xot="Run the Muon matrix LR 2× probe experiment. When it finishes, compare its step-100 and step-200 val_bpb against the baseline and tell me whether doubling the matrix learning rate helps early training.";class C4 extends Error{constructor(t,r,s){super(t);Ms(this,"currentVersion");Ms(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function Ui(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}const fL=new WeakMap;async function Si(e){if(!e.ok){const r=await e.text().catch(()=>"");let s=r;try{const i=JSON.parse(r);if(typeof i=="object"&&i!==null&&("error"in i&&typeof i.error=="string"&&(s=i.error),e.status===409&&"code"in i&&i.code==="fileChanged"&&"exists"in i&&typeof i.exists=="boolean")){const a="currentVersion"in i&&typeof i.currentVersion=="string"?i.currentVersion:null;throw new C4(s,a,i.exists)}}catch(i){if(i instanceof C4)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=fL.get(e);if(t&&!Hn(t))throw new DOMException("Workspace changed","AbortError");return n}const At=(e,n)=>fetch(e,{signal:n}).then(t=>Si(t));async function za(e,n){const t=Ca(),r=await fetch(e,n);if(!Hn(t))throw new DOMException("Workspace changed","AbortError");return fL.set(r,t),r.ok&&xV(e,t),r}const Tt=(e,n,t=!1)=>za(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>Si(r)),n_=(e,n)=>za(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Si(t)),dL=(e,n)=>za(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Si(t)),wot=e=>At("/api/projects",e).then(n=>n.projects),Sot=e=>At("/api/projects/activity",e).then(n=>n.activity),kot=e=>At("/api/settings/ui-state",e),Cot=(e,n)=>At(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),Eot=(e,n,t=!1)=>Tt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),Not=(e,n=!1)=>Tt("/api/settings/ui-state",{workspace:e},n),zot=e=>Tt("/api/settings/ui-state",e),Tot=(e,n)=>Tt("/api/onboarding/complete",{...e,...n}),jot=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return At(`/api/project-path/status${t}`,n)},Aot=()=>Tt("/api/project-path/pick").then(e=>e.path),Rot=e=>Tt("/api/projects",e),Mot=(e,n)=>At(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),Dot=e=>At("/api/github/account",e),Lot=(e,n)=>At(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),Oot=(e,n,t)=>At(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),Iot=(e,n)=>At(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),Bot=e=>Tt("/api/projects/starter-prompts/prewarm",e),$ot=(e,n,t,r,s)=>At(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),Pot=e=>Tt(`/api/projects/${e}/open`).then(n=>n.project),Fot=e=>za(`/api/projects/${e}`,{method:"DELETE"}).then(async n=>{if(!n.ok){const t=await n.json().catch(()=>null);throw new Error((t==null?void 0:t.error)??`delete failed (${n.status})`)}bV(e)}),Hot=(e,n)=>At(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),qot=(e,n)=>At(`/api/projects/${e}/runs`,n).then(t=>t.runs),hL=e=>Tt(`/api/runs/${e}/cancel`).then(()=>{}),Uot=(e,n)=>At(`/api/runs/${e}/log?offset=${n}`),Got=(e,n)=>At(`/api/runs/${e}/diff`,n),Wot=(e,n)=>At(`/api/experiments/${e}/diff`,n),gu=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),Vot=(e,n,t={},r)=>At(`/api/projects/${e}/file?${gu(t,new URLSearchParams({path:n}))}`,r),xN=(e,n,t={})=>`/api/projects/${e}/file/raw?${gu(t,new URLSearchParams({path:n}))}`,Kot=(e,n)=>At(`/api/files/abs?path=${encodeURIComponent(e)}`,n),Qot=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,Yot=(e,n,t,r)=>dL(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),Xot=(e,n,t,r={})=>n_(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),Zot=(e,n,t={})=>Tt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),Jot=e=>At("/api/latex/engine",e),elt=(e,n,t={})=>Tt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),tlt=e=>At("/api/overleaf/settings",e),_L=e=>Tt("/api/overleaf/token",{token:e}),nlt=()=>za("/api/overleaf/token",{method:"DELETE"}).then(e=>Si(e)),pL=(e,n={})=>Tt("/api/overleaf/session",{session:e,host:n.host}),rlt=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>Si(e)),slt=(e={})=>Tt("/api/overleaf/session/import",{host:e.host}),ilt=(e,n,t={})=>Tt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),alt=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${gu(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Si(r)),olt=(e,n,t={},r)=>At(`/api/projects/${e}/file/overleaf?${gu(t,new URLSearchParams({path:n}))}`,r),llt=(e,n,t)=>Tt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),clt=(e,n,t={})=>za(`/api/projects/${e}/file/overleaf?${gu(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Si(r)),ult=(e,n,t={})=>Tt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),flt=(e,n,t={},r)=>At(`/api/projects/${e}/file/overleaf/status?${gu(t,new URLSearchParams({path:n}))}`,r),dlt=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${gu(t,new URLSearchParams({path:n}))}`,hlt=(e,n={},t)=>{const r=gu(n).toString();return At(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},_lt=(e,n)=>At(`/api/chat/sessions/${e}/worktree`,n),Qv=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,plt=e=>At("/api/settings/hf",e),mlt=e=>Tt("/api/settings/hf",{token:e}),glt=e=>At("/api/settings/tinker",e),vlt=e=>Tt("/api/settings/tinker",{key:e}),blt=e=>At("/api/update",e),ylt=()=>Tt("/api/update/apply"),xlt=()=>Tt("/api/update/restart"),wlt=e=>Tt("/api/update/auto",{enabled:e}),Slt=(e=!1)=>Tt("/api/update/install-cli",{force:e}),klt=e=>At("/api/settings/k8s",e),Clt=e=>Tt("/api/settings/k8s",e),Elt=e=>At("/api/settings/modal",e),Nlt=(e,n)=>Tt("/api/settings/modal",{tokenId:e,tokenSecret:n}),zlt=e=>At("/api/settings/env",e).then(n=>n.vars),mL=(e,n)=>Tt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),Tlt=e=>za(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Si(n)).then(n=>n.vars),jlt=e=>At("/api/settings/data-dir",e),Alt=e=>Tt("/api/settings/data-dir/validate",{path:e}),Rlt=e=>Tt("/api/settings/data-dir/move",{path:e}),Mlt=e=>At("/api/settings/ssh",e).then(n=>n.hosts),Dlt=e=>At("/api/settings/ssh/config",e),Llt=(e,n)=>dL("/api/settings/ssh/config",{content:e,previousContent:n}),Olt=(e,n)=>At(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),Ilt=e=>At("/_orx/runtime",e),Blt=e=>At("/api/remote/sessions",e).then(n=>n.sessions),$lt=(e,n)=>Tt("/api/remote/sessions",{host:e,uiPreferences:n}),Plt=e=>Tt("/_orx/install",e),Flt=()=>Tt("/_orx/reconnect"),gL=()=>Tt("/_orx/disconnect"),Hlt=()=>Tt("/_orx/start-host"),vL=()=>At("/_orx/stop-host"),bL=e=>Tt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),qlt=e=>At("/api/settings/slurm",e),Ult=e=>Tt("/api/settings/slurm",e),Glt=e=>At("/api/settings/ray",e),Wlt=e=>Tt("/api/settings/ray",e),Vlt=e=>Tt("/api/settings/ray/preflight",{address:e??null}),Klt=(e,n)=>At(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),Qlt=e=>Tt("/api/settings/compute/default",e),Ylt=e=>At("/api/settings/local",e),Xlt=e=>At("/api/settings/openresearch",e),Zlt=(e,n)=>At(`/api/projects/${e}/files`,n),Jlt=(e,n)=>za(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Si(t)),ect=(e,n,t)=>n_(`/api/projects/${e}/files`,{path:n,...t}),Ih=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,yL=512e3,tct=(e,n)=>{const t=new Uint8Array(e);if(t.includes(0))return{content:"",binary:!0,truncated:n};try{return{content:new TextDecoder("utf-8",{fatal:!0}).decode(t,{stream:n}),binary:!1,truncated:n}}catch{return{content:"",binary:!0,truncated:n}}},nct=(e,n,t)=>fetch(Ih(e,n),{signal:t,headers:{Range:`bytes=0-${yL-1}`}}).then(r=>{var i;if(r.status===404)return null;if(r.status===416&&r.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=Number((i=r.headers.get("content-range"))==null?void 0:i.split("/").pop());return r.arrayBuffer().then(a=>tct(a,Number.isFinite(s)&&s>a.byteLength))}),rct=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",sct=(e,n,t)=>fetch(Ih(e,n),{signal:t,method:"HEAD"}).then(r=>{if(r.status===404)return null;if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=r.headers.get("x-openresearch-presentation");return{size:Number(r.headers.get("content-length"))||0,presentation:rct(s)?s:"download"}}),ict=e=>At("/api/settings/profile",e),act=e=>At("/api/settings/lit-sources",e),oct=e=>Tt("/api/settings/lit-sources",e),lct=e=>At("/api/settings/projects",e),xL=(e,n)=>Tt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),cct=(e,n)=>At(`/api/projects/${e}/git`,n),uct=e=>Tt(`/api/projects/${e}/git/init`),fct=e=>Tt(`/api/projects/${e}/github`),dct=e=>Tt(`/api/projects/${e}/github/disable`),hct=e=>At("/api/settings/telemetry",e),_ct=e=>Tt("/api/settings/telemetry",{enabled:e}),sf=e=>{Tt("/api/telemetry/event",e).catch(()=>{})},K1=e=>e.displayName??CL(e.id),Q1="default";function Yv(e,n){var a,o,l;const t=e==null?void 0:e.models.find(u=>u.id===n),r=(t==null?void 0:t.reasoningLevels)??((a=e==null?void 0:e.options)==null?void 0:a.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,i=s&&r.some(u=>u.id===s)?s:r.some(u=>u.id===Q1)?Q1:((o=e==null?void 0:e.options)==null?void 0:o.defaultReasoningLevel)??((l=r[0])==null?void 0:l.id)??null;return{choices:r,defaultId:i}}const E4="default";function wL(e,n){var r;if((e==null?void 0:e.id)!=="codex")return[];const t=(r=e.models.find(s=>s.id===n))==null?void 0:r.serviceTiers;return t!=null&&t.length?[{id:E4,label:HLe(),description:BLe()},...t]:[]}function Y1(e,n,t){var i;if(!e)return t??null;if(e.id!=="codex"||((i=e.models.find(a=>a.id===n))==null?void 0:i.serviceTiers)===void 0)return null;const s=wL(e,n);return s.length===0?E4:t!=null&&s.some(a=>a.id===t)?t:E4}function SL(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Yv(e,n);return r.length===0?Q1:t&&r.some(i=>i.id===t)?t:s}const kL=(e=!1,n=!1,t)=>{const r=new URLSearchParams;e&&r.set("refresh","1"),n&&r.set("retry","1");const s=r.size>0?`?${r.toString()}`:"";return At(`/api/harnesses${s}`,t).then(i=>i.harnesses)},pct=e=>At("/api/skills",e).then(n=>n.skills),mct=(e,n,t)=>At(`/api/skills/${encodeURIComponent(e)}${n?`?project=${encodeURIComponent(n)}`:""}`,t).then(r=>r.content),gct=e=>At("/api/latex-templates",e).then(n=>n.templates),vct=e=>Tt("/api/latex-templates",e).then(n=>n.template),bct=e=>za(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Si(n)),yct=e=>At("/api/user-skills",e).then(n=>n.skills),xct=e=>Tt("/api/user-skills",e).then(n=>n.skill),wct=e=>za(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Si(n));function CL(e){const n=(e.split("/").pop()??e).replace(/^~/,"").replace(/^claude-/,""),t=[],r=[];for(const s of n.split("-"))/^\d+(\.\d+)?$/.test(s)?r.push(s):(r.length&&t.push(r.splice(0).join(".")),t.push(s==="gpt"?"GPT":s.charAt(0).toUpperCase()+s.slice(1)));return r.length&&t.push(r.join(".")),t.join(" ")}const Sct=(e,n)=>At(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),kct=(e,n,t={})=>Tt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),Cct=e=>za(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>Si(n).then(t=>(Vv(e),t))),Ect=(e,n)=>n_(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),Nct=(e,n)=>n_(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),zct=(e,n)=>n_(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),Tct=(e,n)=>n_(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),jct=(e,n)=>At(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),Act=(e,n)=>za(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Si(t)),Rct=(e,n)=>Tt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),Mct=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,wN=(e,n,t={},r,s,i,a)=>Tt(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:i,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:a}),Dct=(e,n)=>Tt(`/api/chat/sessions/${e}/shell`,{command:n}),Lct=(e,n,t,r={})=>Tt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),Oct=(e,n,t)=>Tt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),Ict=(e,n)=>Tt(`/api/chat/sessions/${e}/branch`,{leafId:n}),Bct=e=>Tt(`/api/chat/sessions/${e}/interrupt`),$ct=(e,n)=>Tt(`/api/chat/sessions/${e}/respond`,n);function $o(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(T(),{numeric:"always",style:"narrow"});if(n<60)return t.format(-n,"second");const r=Math.floor(n/60);if(r<60)return t.format(-r,"minute");const s=Math.floor(r/60);return s<24?t.format(-s,"hour"):t.format(-Math.floor(s/24),"day")}function X1(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return cge({value:tn(n)});const t=Math.floor(n/60);if(t<60)return ige({value:tn(t)});const r=Math.floor(t/60);return r<24?tge({hours:tn(r),minutes:tn(t%60)}):Xme({days:tn(Math.floor(r/24)),hours:tn(r%24)})}function Fl(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&r({queryKey:zt("getHfSettings"),queryFn:({signal:e})=>plt(e),staleTime:3e5}),kN=()=>({queryKey:zt("getTinkerSettings"),queryFn:({signal:e})=>glt(e),staleTime:3e5}),CN=()=>({queryKey:zt("getK8sSettings"),queryFn:({signal:e})=>klt(e),staleTime:3e4}),EN=()=>({queryKey:zt("getModalSettings"),queryFn:({signal:e})=>Elt(e),staleTime:3e5}),Fct=()=>({queryKey:zt("getSlurmSettings"),queryFn:({signal:e})=>qlt(e),staleTime:3e5}),Hct=()=>({queryKey:zt("getRaySettings"),queryFn:({signal:e})=>Glt(e),staleTime:3e5}),EL=e=>({queryKey:zt("getComputeSettings",e??null),queryFn:({signal:n})=>Klt(e,n),staleTime:3e4}),qct=()=>({queryKey:zt("getLocalMachine"),queryFn:({signal:e})=>Ylt(e),staleTime:3e5}),Uct=()=>({queryKey:zt("getOpenResearchSettings"),queryFn:({signal:e})=>Xlt(e),staleTime:3e4}),Gct=()=>({queryKey:zt("getEnvVars"),queryFn:({signal:e})=>zlt(e),staleTime:3e5}),Wct=()=>({queryKey:zt("getDataDir"),queryFn:({signal:e})=>jlt(e),staleTime:3e5}),NL=()=>({queryKey:zt("getSshHosts"),queryFn:({signal:e})=>Mlt(e),staleTime:3e5}),Vct=()=>({queryKey:zt("getSshConfig"),queryFn:({signal:e})=>Dlt(e),staleTime:3e5}),NN=e=>({queryKey:zt("getSshMasterStatus",e),queryFn:({signal:n})=>Olt(e,n),staleTime:5e3}),Kct=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>Ilt(e),staleTime:2e3}),Qct=()=>({queryKey:zt("listRemoteSessions"),queryFn:({signal:e})=>Blt(e),staleTime:3e4}),Z1=()=>({queryKey:zt("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>e_(n,t,()=>blt(e)),staleTime:3e4}),Yct=()=>({queryKey:zt("getProfile"),queryFn:({signal:e})=>ict(e),staleTime:3e5}),Xct=()=>({queryKey:zt("getLitSources"),queryFn:({signal:e})=>act(e),staleTime:3e5}),t6=()=>({queryKey:zt("getProjectDefaults"),queryFn:({signal:e})=>lct(e),staleTime:3e5}),Zct=e=>({queryKey:zt("getProjectGitStatus",e),queryFn:({signal:n})=>cct(e,n),staleTime:3e4}),Jct=()=>({queryKey:zt("getTelemetry"),queryFn:({signal:e})=>hct(e),staleTime:3e5}),Up=()=>({queryKey:zt("getHarnesses"),queryFn:({signal:e})=>kL(!1,!1,e),staleTime:3e5}),eut=()=>({queryKey:zt("getSkills"),queryFn:({signal:e})=>pct(e),staleTime:3e5}),tut=(e,n)=>({queryKey:zt("getSkillContent",e,n??null),queryFn:({signal:t})=>mct(e,n,t),staleTime:3e5}),nut=()=>({queryKey:zt("listLatexTemplates"),queryFn:({signal:e})=>gct(e),staleTime:3e5}),rut=()=>({queryKey:zt("listUserSkills"),queryFn:({signal:e})=>yct(e),staleTime:3e5});async function n6(e=!1,n=!1){const t=Up();if(!e&&!n)return tt.fetchQuery(t);await tt.cancelQueries(t);const r=await kL(e,n);return Hn(t.queryKey)&&tt.setQueryData(t.queryKey,r),r}const Sa=e=>({queryKey:zt("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>e_(t,r,async()=>{const s=await Sct(e,n),i=t.getQueryData(r);return s.filter(a=>!ou.has(a.id)).map(a=>{var o;return{...a,contextUsage:a.contextUsage??((o=i==null?void 0:i.find(l=>l.id===a.id))==null?void 0:o.contextUsage)}})},$p),staleTime:3e4}),Wl=e=>({queryKey:zt("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var _;const s=t.getQueryData(r),i=await e_(t,r,()=>jct(e,n),(f,p,m)=>{if(!p)return f;const x=new Set([...m].filter(S=>S.startsWith("message:")).map(S=>S.slice(8)));return{messages:$p(f.messages,p.messages,x,!1),queued:m.has("queued")?p.queued:f.queued,activeLeafId:m.has("branch")||x.size?p.activeLeafId:f.activeLeafId}});n.throwIfAborted();const a=t.getQueryData(r),l=s!==void 0&&i.messages.some(f=>f.role==="user"&&!(s!=null&&s.messages.some(p=>p.id===f.id)))?[]:(a==null?void 0:a.messages.filter(f=>f.id.startsWith("local-")))??[],u=l.some(f=>f.id===(a==null?void 0:a.activeLeafId));return{...i,messages:[...i.messages,...l.filter(f=>!i.messages.some(p=>p.id===f.id))],activeLeafId:a&&(u||!((_=a.activeLeafId)!=null&&_.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),Ef="local-",zL="bash";function zN(e,n){const t=e.findIndex(r=>r.id===n.id);if(t>=0){const r=e.slice();return r[t]=n,r}return n.role!=="user"?[...e,n]:[...e.filter(r=>!r.id.startsWith(Ef)),n]}function sut(e,n){switch(n.type){case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(o=>o.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,i=n.message.role==="user"&&s!==null&&s.startsWith(Ef),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:zN(t,n.message)},activeLeafBySession:r&&!i&&!a?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${Ef}senderr-${Date.now()}`,role:"assistant",parts:[{id:"p0",type:"tool",tool:"error",state:{status:"error",error:n.text}}],createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,r]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:r.id}}}case"localShell":{const t=e.messagesBySession[n.sessionId]??[],r=t.find(i=>i.id===n.id),s={id:n.id,role:"user",parts:[{id:"p0",type:"tool",tool:zL,state:{status:n.error===void 0?"running":"error",input:{command:n.command},error:n.error}}],createdAt:(r==null?void 0:r.createdAt)??Date.now(),parentId:r?r.parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:r?zN(t,s):[...t,s]},activeLeafBySession:r?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"activeLeaf":return{...e,activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.leafId}};case"optimisticUser":{const t=e.messagesBySession[n.sessionId]??[],r=n.text?[{id:"p0",type:"text",text:n.text}]:[];n.attachments.forEach((i,a)=>r.push({id:`img${a}`,type:"image",text:i.url,name:i.name})),n.annotations.forEach((i,a)=>r.push({id:`annotation${a}`,type:"annotation",text:i.text}));const s={id:`${Ef}${Date.now()}`,role:"user",parts:r,createdAt:Date.now(),parentId:e.activeLeafBySession[n.sessionId]??null};return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:[...t,s]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:s.id}}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}}}}let TL=0;function jL(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}tt.getQueryCache().subscribe(e=>{jL(e)&&TL++});const iut=e=>tt.getQueryCache().subscribe(n=>{jL(n)&&e()}),aut=()=>TL;function out(e,n){const t=tt.getQueryData(Sa(e).queryKey)??[],r=new Set(t.filter(a=>a.busy).map(a=>a.id)),s={messagesBySession:{},queuedBySession:{},activeLeafBySession:{},busySessions:r},i=new Set(r);n&&i.add(n);for(const a of i){const o=tt.getQueryData(Wl(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function AL(e,n,t=!1){if(n.type==="busy"){Ha(tt,Sa(e).queryKey,n.sessionId),tt.setQueryData(Sa(e).queryKey,l=>l==null?void 0:l.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=Wl(n.sessionId);if(ou.has(n.sessionId))return;Ha(tt,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=tt.getQueryData(r.queryKey);if(t&&!s)return;const i={messagesBySession:s?{[n.sessionId]:s.messages}:{},queuedBySession:s?{[n.sessionId]:s.queued}:{},activeLeafBySession:s?{[n.sessionId]:s.activeLeafId}:{},busySessions:new Set},a=sut(i,n),o={messages:a.messagesBySession[n.sessionId]??[],queued:a.queuedBySession[n.sessionId]??[],activeLeafId:a.activeLeafBySession[n.sessionId]??null};tt.setQueryData(r.queryKey,o)}function lut(e,n){const t=!!n&&!ou.has(n??""),r=ct({...Wl(n??""),enabled:t,subscribed:t}),s=R.useSyncExternalStore(iut,aut),i=R.useMemo(()=>out(e,n),[e,n,s]),a=Ca()[1],o=R.useCallback(l=>{Hn(["workspace",a])&&AL(e,l)},[e,a]);return[i,o,r]}const m1=new Map;function cut(e,n){let t=m1.get(e);return t||(t=new Set,m1.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&m1.delete(e)}}function uut(e){var n;(n=m1.get(e.runId))==null||n.forEach(t=>t(e))}const N4=new Set;function J1(e){return N4.add(e),()=>{N4.delete(e)}}function El(e){N4.forEach(n=>n(e))}const z4=new Set;function fut(e){return z4.add(e),()=>{z4.delete(e)}}function Nl(){z4.forEach(e=>e())}const T4=new Set;function dut(e){return T4.add(e),()=>{T4.delete(e)}}function TN(e){T4.forEach(n=>n(e))}const j4=new Set;function RL(e){return j4.add(e),()=>{j4.delete(e)}}function y2(e){j4.forEach(n=>n(e))}const A4=new Set;function hut(e){return A4.add(e),()=>{A4.delete(e)}}function jN(e){A4.forEach(n=>n(e))}const R4=new Set;function _ut(e){return R4.add(e),()=>{R4.delete(e)}}function put(e){R4.forEach(n=>n(e))}let M4=!0;const D4=new Set;function mut(e){return D4.add(e),()=>{D4.delete(e)}}function AN(){return M4}function RN(e){e!==M4&&(M4=e,D4.forEach(n=>n()))}const gut=8e3,vut=3e3;function but(e){const n=R.useRef(e);n.current=e,R.useEffect(()=>{let t=null,r=!1,s,i,a=!1;const o=()=>{t==null||t.close();const l=new EventSource("/api/events");t=l,l.onerror=()=>{r||(a=!0,s??(s=window.setTimeout(()=>RN(!1),gut)),l.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},vut)))},l.onopen=()=>{var _,f;r||(window.clearTimeout(s),s=void 0,RN(!0),a&&(El({type:"reconnected"}),Nl(),TN({harness:"*",authState:"unknown"}),(f=(_=n.current).onReconnect)==null||f.call(_)),a=!0)};const u=_=>{try{return JSON.parse(_.data)}catch{return null}};l.addEventListener("resync.required",()=>{var _,f;El({type:"reconnected"}),Nl(),(f=(_=n.current).onReconnect)==null||f.call(_)}),l.addEventListener("run.updated",_=>{const f=u(_);f!=null&&f.run&&(Nl(),n.current.onRun(f.run))}),l.addEventListener("experiment.updated",_=>{var p,m;const f=u(_);f!=null&&f.experiment&&(Nl(),(m=(p=n.current).onExperiment)==null||m.call(p,f.experiment))}),l.addEventListener("project.updated",_=>{var p,m;const f=u(_);f!=null&&f.project&&(Nl(),(m=(p=n.current).onProject)==null||m.call(p,f.project))}),l.addEventListener("files.updated",_=>{var p,m;const f=u(_);f!=null&&f.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,f.projectId))}),l.addEventListener("run.log",_=>{const f=u(_);f!=null&&f.runId&&uut(f)}),l.addEventListener("chat.session",_=>{const f=u(_);f!=null&&f.session&&(Nl(),El({type:"session",session:f.session}))}),l.addEventListener("chat.session.deleted",_=>{const f=u(_);f!=null&&f.sessionId&&(Nl(),El({type:"sessionDeleted",sessionId:f.sessionId}))}),l.addEventListener("chat.message",_=>{const f=u(_);f!=null&&f.message&&(Nl(),El({type:"message",sessionId:f.sessionId,message:f.message}))}),l.addEventListener("chat.busy",_=>{const f=u(_);f!=null&&f.sessionId&&(Nl(),El({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),l.addEventListener("chat.usage",_=>{const f=u(_);f!=null&&f.sessionId&&f.usage&&El({type:"usage",sessionId:f.sessionId,usage:f.usage})}),l.addEventListener("chat.queued",_=>{const f=u(_);f!=null&&f.sessionId&&El({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),l.addEventListener("chat.branch",_=>{const f=u(_);f!=null&&f.sessionId&&El({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),l.addEventListener("harness.auth",_=>{const f=u(_);f!=null&&f.harness&&f.authState&&TN(f)}),l.addEventListener("datadir.move.progress",_=>{const f=u(_);f&&y2({type:"progress",...f})}),l.addEventListener("datadir.move.done",_=>{const f=u(_);f&&y2({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),l.addEventListener("datadir.move.error",_=>{const f=u(_);f&&y2({type:"error",error:f.error})}),l.addEventListener("update.status",_=>{const f=u(_);f&&put(f)}),l.addEventListener("overleaf.live",_=>{const f=u(_);f!=null&&f.key&&f.status&&jN({type:"live",key:f.key,status:f.status})}),l.addEventListener("overleaf.pulled",_=>{const f=u(_);f!=null&&f.key&&Array.isArray(f.paths)&&jN({type:"pulled",key:f.key,paths:f.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const ev=new Set;function yut(e){const n=R.useRef(e);n.current=e,R.useEffect(()=>{const t={onRun:r=>n.current.onRun(r),onReconnect:()=>{var r,s;return(s=(r=n.current).onReconnect)==null?void 0:s.call(r)}};return ev.add(t),()=>{ev.delete(t)}},[])}const MN={onRun:e=>ev.forEach(n=>n.onRun(e)),onReconnect:()=>ev.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},V0=()=>({queryKey:zt("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>e_(n,t,()=>wot(e),$p),staleTime:3e4}),xut=()=>({queryKey:zt("listProjectActivity"),queryFn:({signal:e})=>Sot(e),staleTime:3e4}),Gp=()=>({queryKey:zt("getUiState"),queryFn:({signal:e})=>kot(e),staleTime:3e5}),r6=e=>({queryKey:zt("getProjectUiState",e),queryFn:({signal:n})=>Cot(e,n),staleTime:3e5}),j0=(e="")=>({queryKey:zt("getProjectPathStatus",e),queryFn:({signal:n})=>jot(e,n),staleTime:3e4}),ML=e=>({queryKey:zt("searchPapers",e),queryFn:({signal:n})=>Mot(e,n),staleTime:3e5}),wut=()=>({queryKey:zt("githubAccount"),queryFn:({signal:e})=>Dot(e),staleTime:3e5}),Sut=e=>({queryKey:zt("githubProjectRepoPreview",e),queryFn:({signal:n})=>Lot(e,n),staleTime:3e4}),DN=(e,n)=>({queryKey:zt("repoAccess",e,n),queryFn:({signal:t})=>Oot(e,n,t),staleTime:3e4}),L4=e=>({queryKey:zt("resolvePaper",e),queryFn:({signal:n})=>Iot(e,n),staleTime:36e5}),kut=(e,n,t,r)=>({queryKey:zt("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>$ot(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),O4=e=>({queryKey:zt("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>e_(t,r,()=>Hot(e,n),$p),staleTime:3e4}),tu=e=>({queryKey:zt("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>e_(t,r,()=>qot(e,n),$p),staleTime:3e4});function Sg(e,n){if(!e)return;const t=e.find(r=>r.id===n.id);return t&&t.updatedAt>n.updatedAt?e:t?e.map(r=>r.id===n.id?n:r):[...e,n]}function LN(){const e=Ca();return but({onRun(n){var r;if(!Hn(e))return;const t=(r=tt.getQueryData(tu(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);Ha(tt,tu(n.projectId).queryKey,n.id),tt.setQueryData(tu(n.projectId).queryKey,s=>Sg(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(va(["getRunDiff"],e,s=>s.queryKey[3]===n.id),va(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),MN.onRun(n)},onExperiment(n){Hn(e)&&(Ha(tt,O4(n.projectId).queryKey,n.id),tt.setQueryData(O4(n.projectId).queryKey,t=>Sg(t,n)),va(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),va(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),va(["getRunDiff"],e,t=>{var r;return((r=tt.getQueryData(tu(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){Hn(e)&&(Ha(tt,V0().queryKey,n.id),tt.setQueryData(V0().queryKey,t=>Sg(t,n)))},onArtifacts(n){Hn(e)&&(va(B5,e,t=>t.queryKey[3]===n),va(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){Hn(e)&&(va(gV,e),MN.onReconnect())}}),R.useEffect(()=>{let n;const t=fut(()=>{n??(n=setTimeout(()=>{n=void 0,va(["listProjectActivity"],e)},100))}),r=RL(o=>{o.type==="done"&&va(["getDataDir"],e)}),s=J1(o=>{Hn(e)&&(o.type==="session"?Ha(tt,Sa(o.session.projectId).queryKey,o.session.id):(o.type==="busy"||o.type==="usage")&&Ha(tt,[...e,"listChatSessions"],o.sessionId),(o.type==="message"||o.type==="queued"||o.type==="branch")&&AL("",o.type==="message"?{type:"upsertMessage",sessionId:o.sessionId,message:o.message}:o.type==="queued"?{type:"setQueued",sessionId:o.sessionId,items:o.items}:{type:"activeLeaf",sessionId:o.sessionId,leafId:o.activeLeafId},!0),o.type==="session"&&!ou.has(o.session.id)?tt.setQueryData(Sa(o.session.projectId).queryKey,l=>{if(!l)return;const u=l.find(_=>_.id===o.session.id);return u?Sg(l,{...o.session,contextUsage:o.session.contextUsage??u.contextUsage}):[o.session,...l]}):o.type==="sessionDeleted"?Vv(o.sessionId):(o.type==="busy"||o.type==="usage")&&tt.setQueriesData({queryKey:[...e,"listChatSessions"]},l=>l==null?void 0:l.map(u=>u.id!==o.sessionId?u:o.type==="busy"?{...u,busy:o.busy}:{...u,contextUsage:o.usage})))}),i=dut(()=>{Hn(e)&&n6(!0).catch(()=>{})}),a=_ut(o=>{Hn(e)&&(Ha(tt,Z1().queryKey),tt.setQueryData(Z1().queryKey,o))});return()=>{clearTimeout(n),t(),r(),s(),i(),a()}},[e[1]]),null}const I4=new Set;function DL(e){if(e!==T()){KM(e,{reload:!1}),document.documentElement.lang=e;for(const n of I4)n()}}function Cut(e){return I4.add(e),()=>I4.delete(e)}function Kf(){return R.useSyncExternalStore(Cut,T,T)}const LL="orx:theme";function Eut(){try{const e=localStorage.getItem(LL);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Bh=Eut();const B4=new Set;function Nut(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function s6(){document.documentElement.dataset.theme=Nut(Bh)}function OL(e){Bh=e;try{localStorage.setItem(LL,e)}catch{}s6();for(const n of B4)n()}function zut(){return Bh}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Bh==="system"&&s6()});s6();function Tut(e){return B4.add(e),()=>B4.delete(e)}function IL(){return[R.useSyncExternalStore(Tut,()=>Bh,()=>Bh),OL]}const jut=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),BL=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),tv="-",ON=[],Rut="arbitrary..",Mut=e=>{const n=Lut(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Dut(a);const o=a.split(tv),l=o[0]===""&&o.length>1?1:0;return $L(o,l,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=r[a],u=t[a];return l?u?jut(u,l):l:u||ON}return t[a]||ON}}},$L=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=$L(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(tv):e.slice(n).join(tv),l=a.length;for(let u=0;ue.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?Rut+r:void 0})(),Lut=e=>{const{theme:n,classGroups:t}=e;return Out(t,n)},Out=(e,n)=>{const t=BL();for(const r in e){const s=e[r];i6(s,t,r,n)}return t},i6=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){But(e,n,t);return}if(typeof e=="function"){$ut(e,n,t,r);return}Put(e,n,t,r)},But=(e,n,t)=>{const r=e===""?n:PL(n,e);r.classGroupId=t},$ut=(e,n,t,r)=>{if(Fut(e)){i6(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(Aut(t,e))},Put=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(tv),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,Hut=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(i,a)=>{t[i]=a,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(i){let a=t[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return s(i,a),a},set(i,a){i in t?t[i]=a:s(i,a)}}},$4="!",IN=":",qut=[],BN=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),Uut=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,l=0,u;const _=s.length;for(let S=0;S<_;S++){const b=s[S];if(a===0&&o===0){if(b===IN){i.push(s.slice(l,S)),l=S+1;continue}if(b==="/"){u=S;continue}}b==="["?a++:b==="]"?a--:b==="("?o++:b===")"&&o--}const f=i.length===0?s:s.slice(l);let p=f,m=!1;f.endsWith($4)?(p=f.slice(0,-1),m=!0):f.startsWith($4)&&(p=f.slice(1),m=!0);const x=u&&u>l?u-l:void 0;return BN(i,m,p,x)};if(n){const s=n+IN,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):BN(qut,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},Gut=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let i=0;i0&&(s.sort(),r.push(...s),s=[]),r.push(a)):s.push(a)}return s.length>0&&(s.sort(),r.push(...s)),r}},Wut=e=>({cache:Hut(e.cacheSize),parseClassName:Uut(e),sortModifiers:Gut(e),postfixLookupClassGroupIds:Vut(e),...Mut(e)}),Vut=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i,postfixLookupClassGroupIds:a}=n,o=[],l=e.trim().split(Kut);let u="";for(let _=l.length-1;_>=0;_-=1){const f=l[_],{isExternal:p,modifiers:m,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:b}=t(f);if(p){u=f+(u.length>0?" "+u:u);continue}let v=!!b,y;if(v){const j=S.substring(0,b);y=r(j);const z=y&&a[y]?r(S):void 0;z&&z!==y&&(y=z,v=!1)}else y=r(S);if(!y){if(!v){u=f+(u.length>0?" "+u:u);continue}if(y=r(S),!y){u=f+(u.length>0?" "+u:u);continue}v=!1}const w=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=x?w+$4:w,N=C+y;if(o.indexOf(N)>-1)continue;o.push(N);const E=s(y,v);for(let j=0;j0?" "+u:u)}return u},Yut=(...e)=>{let n=0,t,r,s="";for(;n{if(typeof e=="string")return e;let n,t="";for(let r=0;r{let t,r,s,i;const a=l=>{const u=n.reduce((_,f)=>f(_),e());return t=Wut(u),r=t.cache.get,s=t.cache.set,i=o,o(l)},o=l=>{const u=r(l);if(u)return u;const _=Qut(l,t);return s(l,_),_};return i=a,(...l)=>i(Yut(...l))},Xut=[],hs=e=>{const n=t=>t[e]||Xut;return n.isThemeGetter=!0,n},HL=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qL=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Zut=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Jut=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eft=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,tft=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nft=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rft=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dc=e=>Zut.test(e),hn=e=>!!e&&!Number.isNaN(Number(e)),bo=e=>!!e&&Number.isInteger(Number(e)),x2=e=>e.endsWith("%")&&hn(e.slice(0,-1)),zl=e=>Jut.test(e),UL=()=>!0,sft=e=>eft.test(e)&&!tft.test(e),a6=()=>!1,ift=e=>nft.test(e),aft=e=>rft.test(e),oft=e=>!ut(e)&&!_t(e),lft=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),cft=e=>vu(e,VL,a6),ut=e=>HL.test(e),Ku=e=>vu(e,KL,sft),PN=e=>vu(e,gft,hn),uft=e=>vu(e,YL,UL),fft=e=>vu(e,QL,a6),FN=e=>vu(e,GL,a6),dft=e=>vu(e,WL,aft),kg=e=>vu(e,XL,ift),_t=e=>qL.test(e),r0=e=>Qf(e,KL),hft=e=>Qf(e,QL),HN=e=>Qf(e,GL),_ft=e=>Qf(e,VL),pft=e=>Qf(e,WL),Cg=e=>Qf(e,XL,!0),mft=e=>Qf(e,YL,!0),vu=(e,n,t)=>{const r=HL.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Qf=(e,n,t=!1)=>{const r=qL.exec(e);return r?r[1]?n(r[1]):t:!1},GL=e=>e==="position"||e==="percentage",WL=e=>e==="image"||e==="url",VL=e=>e==="length"||e==="size"||e==="bg-size",KL=e=>e==="length",gft=e=>e==="number",QL=e=>e==="family-name",YL=e=>e==="number"||e==="weight",XL=e=>e==="shadow",qN=()=>{const e=hs("color"),n=hs("font"),t=hs("text"),r=hs("font-weight"),s=hs("tracking"),i=hs("leading"),a=hs("breakpoint"),o=hs("container"),l=hs("spacing"),u=hs("radius"),_=hs("shadow"),f=hs("inset-shadow"),p=hs("text-shadow"),m=hs("drop-shadow"),x=hs("blur"),S=hs("perspective"),b=hs("aspect"),v=hs("ease"),y=hs("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...C(),_t,ut],E=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],z=()=>[_t,ut,l],M=()=>[Dc,"full","auto",...z()],O=()=>[bo,"none","subgrid",_t,ut],B=()=>["auto",{span:["full",bo,_t,ut]},bo,_t,ut],F=()=>[bo,"auto",_t,ut],U=()=>["auto","min","max","fr",_t,ut],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...z()],X=()=>[Dc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],ie=()=>[Dc,"screen","full","dvw","lvw","svw","min","max","fit",...z()],I=()=>[Dc,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],L=()=>[e,_t,ut],$=()=>[...C(),HN,FN,{position:[_t,ut]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",_ft,cft,{size:[_t,ut]}],te=()=>[x2,r0,Ku],fe=()=>["","none","full",u,_t,ut],oe=()=>["",hn,r0,Ku],ne=()=>["solid","dashed","dotted","double"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[hn,x2,HN,FN],ee=()=>["","none",x,_t,ut],le=()=>["none",hn,_t,ut],he=()=>["none",hn,_t,ut],xe=()=>[hn,_t,ut],Te=()=>[Dc,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[zl],breakpoint:[zl],color:[UL],container:[zl],"drop-shadow":[zl],ease:["in","out","in-out"],font:[oft],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[zl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[zl],shadow:[zl],spacing:["px",hn],text:[zl],"text-shadow":[zl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dc,ut,_t,b]}],container:["container"],"container-type":[{"@container":["","normal","size",_t,ut]}],"container-named":[lft],columns:[{columns:[hn,ut,_t,o]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[bo,"auto",_t,ut]}],basis:[{basis:[Dc,"full","auto",o,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[hn,Dc,"auto","initial","none",ut]}],grow:[{grow:["",hn,_t,ut]}],shrink:[{shrink:["",hn,_t,ut]}],order:[{order:[bo,"first","last","none",_t,ut]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...ie()]}],"min-inline-size":[{"min-inline":["auto",...ie()]}],"max-inline-size":[{"max-inline":["none",...ie()]}],"block-size":[{block:["auto",...I()]}],"min-block-size":[{"min-block":["auto",...I()]}],"max-block-size":[{"max-block":["none",...I()]}],w:[{w:[o,"screen",...X()]}],"min-w":[{"min-w":[o,"screen","none",...X()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",t,r0,Ku]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,mft,uft]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",x2,ut]}],"font-family":[{font:[hft,fft,n]}],"font-features":[{"font-features":[ut]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,_t,ut]}],"line-clamp":[{"line-clamp":[hn,"none",_t,PN]}],leading:[{leading:[i,...z()]}],"list-image":[{"list-image":["none",_t,ut]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_t,ut]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[hn,"from-font","auto",_t,Ku]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[hn,"auto",_t,ut]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"tab-size":[{tab:[bo,_t,ut]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_t,ut]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_t,ut]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},bo,_t,ut],radial:["",_t,ut],conic:[bo,_t,ut]},pft,dft]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[hn,_t,ut]}],"outline-w":[{outline:["",hn,r0,Ku]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",_,Cg,kg]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,Cg,kg]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[hn,Ku]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,Cg,kg]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[hn,_t,ut]}],"mix-blend":[{"mix-blend":[...Q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[hn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[_t,ut]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[hn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_t,ut]}],filter:[{filter:["","none",_t,ut]}],blur:[{blur:ee()}],brightness:[{brightness:[hn,_t,ut]}],contrast:[{contrast:[hn,_t,ut]}],"drop-shadow":[{"drop-shadow":["","none",m,Cg,kg]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",hn,_t,ut]}],"hue-rotate":[{"hue-rotate":[hn,_t,ut]}],invert:[{invert:["",hn,_t,ut]}],saturate:[{saturate:[hn,_t,ut]}],sepia:[{sepia:["",hn,_t,ut]}],"backdrop-filter":[{"backdrop-filter":["","none",_t,ut]}],"backdrop-blur":[{"backdrop-blur":ee()}],"backdrop-brightness":[{"backdrop-brightness":[hn,_t,ut]}],"backdrop-contrast":[{"backdrop-contrast":[hn,_t,ut]}],"backdrop-grayscale":[{"backdrop-grayscale":["",hn,_t,ut]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[hn,_t,ut]}],"backdrop-invert":[{"backdrop-invert":["",hn,_t,ut]}],"backdrop-opacity":[{"backdrop-opacity":[hn,_t,ut]}],"backdrop-saturate":[{"backdrop-saturate":[hn,_t,ut]}],"backdrop-sepia":[{"backdrop-sepia":["",hn,_t,ut]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_t,ut]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[hn,"initial",_t,ut]}],ease:[{ease:["linear","initial",v,_t,ut]}],delay:[{delay:[hn,_t,ut]}],animate:[{animate:["none",y,_t,ut]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,_t,ut]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[_t,ut,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Te()}],"translate-x":[{"translate-x":Te()}],"translate-y":[{"translate-y":Te()}],"translate-z":[{"translate-z":Te()}],"translate-none":["translate-none"],zoom:[{zoom:[bo,_t,ut]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_t,ut]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_t,ut]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[hn,r0,Ku,PN]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},vft=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(Vd(e,"cacheSize",n),Vd(e,"prefix",t),Vd(e,"experimentalParseClassName",r),Eg(e.theme,i.theme),Eg(e.classGroups,i.classGroups),Eg(e.conflictingClassGroups,i.conflictingClassGroups),Eg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Vd(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),Vd(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),Ng(e.theme,s.theme),Ng(e.classGroups,s.classGroups),Ng(e.conflictingClassGroups,s.conflictingClassGroups),Ng(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),P4(e,s,"postfixLookupClassGroups"),P4(e,s,"orderSensitiveModifiers"),e),Vd=(e,n,t)=>{t!==void 0&&(e[n]=t)},Eg=(e,n)=>{if(n)for(const t in n)Vd(e,t,n[t])},Ng=(e,n)=>{if(n)for(const t in n)P4(e,n,t)},P4=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},bft=(e,...n)=>typeof e=="function"?$N(qN,e,...n):$N(()=>vft(qN(),e),...n),yft=bft({extend:{theme:{text:["menu"]}}});function Ts(...e){return yft(...e)}const xft={default:"border-transparent bg-surface text-subtext",success:"border-accent-green bg-accent-green-subtle text-accent-green",error:"border-accent-red bg-accent-red-subtle text-accent-red",warning:"border-accent-amber bg-accent-amber-subtle text-accent-amber"};function Pt({variant:e="default",className:n,...t}){return h.jsx("span",{className:Ts("badge inline-flex items-center rounded-full border px-2 py-px font-sans text-sm font-medium",xft[e],n),...t})}const wft=["btn inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap border font-medium","transition-[background,border-color,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),Sft={default:"border-border bg-background text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight",primary:"border-primary bg-primary text-background [&:hover:not(:disabled)]:border-primary-hover [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:border-primary-active [&:active:not(:disabled)]:bg-primary-active",ghost:"border-transparent bg-transparent text-text [&:hover:not(:disabled)]:bg-surface [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-muted",danger:"border-border bg-background text-accent-red [&:hover:not(:disabled)]:bg-danger-hover [&:active:not(:disabled)]:bg-danger-active",warning:"border-accent-amber bg-background text-accent-amber [&:hover:not(:disabled)]:bg-accent-amber-subtle [&:active:not(:disabled)]:bg-highlight"},kft={default:"h-8 rounded-md px-3.5 text-sm",small:"h-7 rounded-sm px-2.5 text-sm",large:"h-14 rounded-lg px-7 text-xl"};function ZL(e,n,t,r){return Ts(wft,Sft[e],kft[n],t&&"active",r)}function Oe({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("button",{className:ZL(n,t,e,r),...s})}function K0({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("a",{className:ZL(n,t,e,r),...s})}const Cft=["icon-btn relative inline-flex shrink-0 items-center justify-center","transition-[background,color] duration-120 ease-standard","focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2","disabled:cursor-default disabled:opacity-45"].join(" "),Eft={default:"text-subtext [&:hover:not(:disabled)]:bg-surface [&:hover:not(:disabled)]:text-text [&:active:not(:disabled)]:bg-highlight [&.active]:bg-surface [&.active]:text-primary",primary:"bg-primary text-background [&:hover:not(:disabled)]:bg-primary-hover [&:active:not(:disabled)]:bg-primary-active",stop:"bg-surface text-text [&:hover:not(:disabled)]:bg-stop-hover [&:active:not(:disabled)]:bg-highlight"},Nft={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function JL(e,n,t,r){return Ts(Cft,Eft[e],Nft[n],t&&"active",r)}const on=R.forwardRef(function({active:n=!1,size:t="default",variant:r="default",className:s,...i},a){return h.jsx("button",{ref:a,className:JL(r,t,n,s),...i})});function Xv({active:e=!1,size:n="default",variant:t="default",className:r,...s}){return h.jsx("a",{className:JL(t,n,e,r),...s})}const zft={default:"h-8 rounded-md border border-border bg-background px-2.5 py-1.5 focus:border-text",inline:"h-8 rounded-none border-x-0 border-t-0 border-b border-transparent bg-transparent px-0 py-0 focus:border-text"};function zs({variant:e="default",className:n,...t}){return h.jsx("input",{className:Ts("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",zft[e],n),...t})}function dr({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return h.jsx("button",{className:Ts("model-item flex w-full items-center justify-between gap-2 rounded-sm px-2 text-start transition-[background,color] duration-120 ease-standard hover:bg-surface focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-45 [&_.model-id]:block [&_.model-id]:text-xs [&_.model-id]:text-muted",t==="compact"?"min-h-6 py-0.5 text-menu":"min-h-8 py-1.5 text-sm",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",r),...s})}function Dt({className:e,...n}){return h.jsx("span",{className:Ts("spinner h-[13px] w-[13px] shrink-0 animate-[spin_0.8s_linear_infinite] rounded-full border-2 border-border border-t-primary",e),...n})}function ss({className:e,...n}){return h.jsx("div",{className:Ts("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const Tft={success:"text-accent-green",danger:"text-accent-red",info:"text-accent-teal",warning:"text-accent-amber",caution:"text-accent-orange",accent:"text-accent-purple",neutral:"text-muted"};function Zv({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return h.jsxs("span",{className:Ts("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[h.jsx("span",{className:Ts("h-[7px] w-[7px] shrink-0 rounded-full bg-current",Tft[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const jft=["relative h-5.5 w-9.5 flex-none rounded-full border border-border bg-surface","transition-[background,border-color] duration-120 ease-standard","[&_span]:absolute [&_span]:start-[3px] [&_span]:top-[3px] [&_span]:h-3.5 [&_span]:w-3.5","[&_span]:rounded-full [&_span]:bg-muted [&_span]:transition-[translate,background] [&_span]:duration-120 [&_span]:ease-standard","hover:border-border-strong","disabled:cursor-default disabled:opacity-45 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-text focus-visible:outline-offset-2"].join(" ");function eO(e,n){return Ts(jft,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function o6({checked:e=!1,className:n,children:t,...r}){return h.jsx("button",{role:"switch","aria-checked":e,className:eO(e,n),...r,children:t??h.jsx("span",{})})}function Aft({checked:e=!1,className:n,...t}){return h.jsx("span",{className:eO(e,n),...t,children:h.jsx("span",{})})}var Go=fM();const Rft=Ip(Go);function Mft(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",n.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const Dft=e=>{switch(e){case"success":return Ift;case"info":return $ft;case"warning":return Bft;case"error":return Pft;default:return null}},Lft=Array(12).fill(0),Oft=({visible:e,className:n})=>Je.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Je.createElement("div",{className:"sonner-spinner"},Lft.map((t,r)=>Je.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Ift=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Je.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Bft=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Je.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),$ft=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Je.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Pft=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Je.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Fft=Je.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},Je.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Je.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Hft=()=>{const[e,n]=Je.useState(document.hidden);return Je.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let qft=1;const Uft=100,UN=e=>{var n;return typeof(e==null?void 0:e.id)=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:qft++};class Gft{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(t=>n(t)),()=>{const t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)}),this.publish=n=>{this.subscribers.forEach(t=>t(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-Uft;n<=0||(this.toasts=this.toasts.filter(t=>n>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),n--,!1):!0))},this.create=n=>{const{message:t,...r}=n,s=UN(n),i=this.pendingDismissals.get(s);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const a=this.dismissedToasts.has(s),o=n.dismissible===void 0?!0:n.dismissible;return a&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(u=>u.id!==s)),(a?void 0:this.toasts.find(u=>u.id===s))?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...n,id:s,title:t}),{...u,...n,id:s,dismissible:o,title:t}):u):this.addToast({title:t,...r,dismissible:o,id:s}),s},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const t=this.pendingDismissals.get(n);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(r=>r({id:n,dismiss:!0}))})),n},this.message=(n,t)=>this.create({...t,message:n,type:void 0}),this.error=(n,t)=>this.create({...t,message:n,type:"error"}),this.success=(n,t)=>this.create({...t,type:"success",message:n}),this.info=(n,t)=>this.create({...t,type:"info",message:n}),this.warning=(n,t)=>this.create({...t,type:"warning",message:n}),this.loading=(n,t)=>this.create({...t,type:"loading",message:n}),this.promise=(n,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let i=r!==void 0,a;const o=s.then(async u=>{if(a=["resolve",u],Je.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(Vft(u)&&!u.ok){i=!1;const f=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,p=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,x=typeof f=="object"&&!Je.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...x})}else if(u instanceof Error){i=!1;const f=typeof t.error=="function"?await t.error(u):t.error,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof f=="object"&&!Je.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...x})}else if(t.success!==void 0){i=!1;const f=typeof t.success=="function"?await t.success(u):t.success,p=typeof t.description=="function"?await t.description(u):t.description,x=typeof f=="object"&&!Je.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:p,...x})}}).catch(async u=>{if(a=["reject",u],t.error!==void 0){i=!1;const _=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof _=="object"&&!Je.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:f,...m})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),l=()=>new Promise((u,_)=>o.then(()=>a[0]==="reject"?_(a[1]):u(a[1])).catch(_));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(n,t)=>{const r=UN(t);return this.create({...t,jsx:n(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const bi=new Gft,Wft=(e,n)=>bi.message(e,n),Vft=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Kft=Wft,Qft=()=>bi.toasts,Yft=()=>bi.getActiveToasts(),Xft=Object.assign(Kft,{success:bi.success,info:bi.info,warning:bi.warning,error:bi.error,custom:bi.custom,message:bi.message,promise:bi.promise,dismiss:bi.dismiss,loading:bi.loading},{getHistory:Qft,getToasts:Yft});Mft("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function zg(e){return e.label!==void 0}const Zft=3,Jft="24px",edt="16px",GN=4e3,tdt=356,ndt=14,rdt=45,sdt=200;function yo(...e){return e.filter(Boolean).join(" ")}function idt(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const adt=e=>{var n,t,r,s,i,a,o,l,u;const{invert:_,toast:f,unstyled:p,interacting:m,setHeights:x,visibleToasts:S,heights:b,index:v,toasts:y,expanded:w,removeToast:C,defaultRichColors:N,closeButton:E,style:j,cancelButtonStyle:z,actionButtonStyle:M,className:O="",descriptionClassName:B="",duration:F,position:U,gap:H,expandByDefault:Y,classNames:V,icons:X,closeButtonAriaLabel:ie="Close toast"}=e,[I,L]=Je.useState(null),[$,q]=Je.useState(null),[G,te]=Je.useState(!1),[fe,oe]=Je.useState(!1),[ne,Q]=Je.useState(!1),[ce,ee]=Je.useState(!1),[le,he]=Je.useState(!1),[xe,Te]=Je.useState(0),[Ze,Ue]=Je.useState(0),Ie=Je.useRef(f.duration||F||GN),vt=Je.useRef(null),bt=Je.useRef(null),It=v===0,Bt=v+1<=S,Et=f.type,rt=Et??"default",ft=f.dismissible!==!1,Lt=f.className||"",we=f.descriptionClassName||"",Ae=Je.useMemo(()=>b.findIndex(gt=>gt.toastId===f.id)||0,[b,f.id]),Xe=Je.useMemo(()=>{var gt;return(gt=f.closeButton)!=null?gt:E},[f.closeButton,E]),dt=Je.useMemo(()=>f.duration||F||GN,[f.duration,F]),xt=Je.useRef(0),Ut=Je.useRef(0),We=Je.useRef(0),Ht=Je.useRef(null),[ln,_n]=U.split("-"),Yt=Je.useMemo(()=>b.reduce((gt,dn,Nn)=>Nn>=Ae?gt:gt+dn.height,0),[b,Ae]),Xn=Hft(),Xt=Je.useMemo(()=>{var gt;return(gt=e.swipeDirections)!=null?gt:idt(U)},[e.swipeDirections,U]),jn=f.invert||_,or=Et==="loading";Ut.current=Je.useMemo(()=>Ae*H+Yt,[Ae,Yt]),Je.useEffect(()=>{Ie.current=dt},[dt]),Je.useEffect(()=>{te(!0)},[]),Je.useEffect(()=>{const gt=bt.current;if(gt){const dn=gt.getBoundingClientRect().height;return Ue(dn),x(Nn=>[{toastId:f.id,height:dn,position:f.position},...Nn]),()=>x(Nn=>Nn.filter(Zt=>Zt.toastId!==f.id))}},[x,f.id]),Je.useLayoutEffect(()=>{if(!G)return;const gt=bt.current,dn=gt.style.height;gt.style.height="auto";const Nn=gt.getBoundingClientRect().height;gt.style.height=dn,Ue(Nn),x(Zt=>Zt.find(pn=>pn.toastId===f.id)?Zt.map(pn=>pn.toastId===f.id?{...pn,height:Nn}:pn):[{toastId:f.id,height:Nn,position:f.position},...Zt])},[G,f.title,f.description,x,f.id,f.jsx,f.action,f.cancel]);const lr=Je.useCallback(()=>{oe(!0),Te(Ut.current),x(gt=>gt.filter(dn=>dn.toastId!==f.id)),setTimeout(()=>{C(f)},sdt)},[f,C,x,Ut]);Je.useEffect(()=>{if(f.promise&&Et==="loading"||f.duration===1/0||f.type==="loading")return;let gt;return w||m||Xn?(()=>{if(We.current{Ie.current!==1/0&&(xt.current=new Date().getTime(),gt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),lr()},Ie.current))})(),()=>clearTimeout(gt)},[w,m,f,Et,Xn,lr]),Je.useEffect(()=>{f.delete&&(lr(),f.onDismiss==null||f.onDismiss.call(f,f))},[lr,f.delete]);function vr(){var gt;if(X!=null&&X.loading){var dn;return Je.createElement("div",{className:yo(V==null?void 0:V.loader,f==null||(dn=f.classNames)==null?void 0:dn.loader,"sonner-loader"),"data-visible":Et==="loading"},X.loading)}return Je.createElement(Oft,{className:yo(V==null?void 0:V.loader,f==null||(gt=f.classNames)==null?void 0:gt.loader),visible:Et==="loading"})}const Mn=f.icon||(X==null?void 0:X[Et])||Dft(Et);var Gr,Er;return Je.createElement("li",{tabIndex:0,ref:bt,className:yo(O,Lt,V==null?void 0:V.toast,f==null||(n=f.classNames)==null?void 0:n.toast,V==null?void 0:V[rt],f==null||(t=f.classNames)==null?void 0:t[rt]),"data-sonner-toast":"","data-rich-colors":(Gr=f.richColors)!=null?Gr:N,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":G,"data-promise":!!f.promise,"data-swiped":le,"data-removed":fe,"data-visible":Bt,"data-y-position":ln,"data-x-position":_n,"data-index":v,"data-front":It,"data-swiping":ne,"data-dismissible":ft,"data-type":Et,"data-invert":jn,"data-swipe-out":ce,"data-swipe-direction":$,"data-expanded":!!(w||Y&&G),"data-testid":f.testId,style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${fe?xe:Ut.current}px`,"--initial-height":Y?"auto":`${Ze}px`,...j,...f.style},onDragEnd:()=>{Q(!1),L(null),Ht.current=null},onPointerDown:gt=>{gt.button!==2&&(or||!ft||(vt.current=new Date,Te(Ut.current),gt.target.setPointerCapture(gt.pointerId),gt.target.tagName!=="BUTTON"&&(Q(!0),Ht.current={x:gt.clientX,y:gt.clientY})))},onPointerUp:()=>{var gt,dn,Nn;if(ce||!ft)return;Ht.current=null;const Zt=Number(((gt=bt.current)==null?void 0:gt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),cr=Number(((dn=bt.current)==null?void 0:dn.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),pn=new Date().getTime()-((Nn=vt.current)==null?void 0:Nn.getTime()),An=I==="x"?Zt:cr,fn=Math.abs(An)/pn;if((I==="x"?Xt.includes(Zt>0?"right":"left"):Xt.includes(cr>0?"bottom":"top"))&&(Math.abs(An)>=rdt||fn>.11)){Te(Ut.current),f.onDismiss==null||f.onDismiss.call(f,f),q(I==="x"?Zt>0?"right":"left":cr>0?"down":"up"),lr(),ee(!0);return}else{var St,He;(St=bt.current)==null||St.style.setProperty("--swipe-amount-x","0px"),(He=bt.current)==null||He.style.setProperty("--swipe-amount-y","0px")}he(!1),Q(!1),L(null)},onPointerMove:gt=>{var dn,Nn,Zt;if(!Ht.current||!ft||((dn=window.getSelection())==null?void 0:dn.toString().length)>0)return;const pn=gt.clientY-Ht.current.y,An=gt.clientX-Ht.current.x;!I&&(Math.abs(An)>1||Math.abs(pn)>1)&&L(Math.abs(An)>Math.abs(pn)?"x":"y");let fn={x:0,y:0};const pt=St=>1/(1.5+Math.abs(St)/20);if(I==="y"){if(Xt.includes("top")||Xt.includes("bottom"))if(Xt.includes("top")&&pn<0||Xt.includes("bottom")&&pn>0)fn.y=pn;else{const St=pn*pt(pn);fn.y=Math.abs(St)0)fn.x=An;else{const St=An*pt(An);fn.x=Math.abs(St)0||Math.abs(fn.y)>0)&&he(!0),(Nn=bt.current)==null||Nn.style.setProperty("--swipe-amount-x",`${fn.x}px`),(Zt=bt.current)==null||Zt.style.setProperty("--swipe-amount-y",`${fn.y}px`)}},Xe&&!f.jsx&&Et!=="loading"?Je.createElement("button",{"aria-label":ie,"data-disabled":or,"data-close-button":!0,onClick:or||!ft?()=>{}:()=>{lr(),f.onDismiss==null||f.onDismiss.call(f,f)},className:yo(V==null?void 0:V.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(Er=X==null?void 0:X.close)!=null?Er:Fft):null,(Et||f.icon||f.promise)&&f.icon!==null&&((X==null?void 0:X[Et])!==null||f.icon)?Je.createElement("div",{"data-icon":"",className:yo(V==null?void 0:V.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},Et==="loading"?f.icon||vr():f.promise?vr():null,Et!=="loading"?Mn:null):null,Je.createElement("div",{"data-content":"",className:yo(V==null?void 0:V.content,f==null||(i=f.classNames)==null?void 0:i.content)},Je.createElement("div",{"data-title":"",className:yo(V==null?void 0:V.title,f==null||(a=f.classNames)==null?void 0:a.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?Je.createElement("div",{"data-description":"",className:yo(B,we,V==null?void 0:V.description,f==null||(o=f.classNames)==null?void 0:o.description)},typeof f.description=="function"?f.description():f.description):null),Je.isValidElement(f.cancel)?f.cancel:f.cancel&&zg(f.cancel)?Je.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||z,onClick:gt=>{zg(f.cancel)&&ft&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,gt),lr())},className:yo(V==null?void 0:V.cancelButton,f==null||(l=f.classNames)==null?void 0:l.cancelButton)},f.cancel.label):null,Je.isValidElement(f.action)?f.action:f.action&&zg(f.action)?Je.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||M,onClick:gt=>{zg(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,gt),!gt.defaultPrevented&&lr())},className:yo(V==null?void 0:V.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function WN(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function odt(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?edt:Jft;function l(u){["top","right","bottom","left"].forEach(_=>{t[`${a}-${_}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?t[`${a}-${u}`]=o:t[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(o)}),t}const ldt=Je.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:l,className:u,offset:_,mobileOffset:f,theme:p="light",richColors:m,duration:x,style:S,visibleToasts:b=Zft,toastOptions:v,dir:y=WN(),gap:w=ndt,icons:C,customAriaLabel:N,containerAriaLabel:E="Notifications"}=n,[j,z]=Je.useState([]),M=Je.useMemo(()=>r?j.filter(te=>te.toasterId===r):j.filter(te=>!te.toasterId),[j,r]),O=Je.useMemo(()=>Array.from(new Set([i].concat(M.filter(te=>te.position).map(te=>te.position)))),[M,i]),[B,F]=Je.useState([]),[U,H]=Je.useState(!1),[Y,V]=Je.useState(!1),[X,ie]=Je.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=Je.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=Je.useRef(null),q=Je.useRef(!1),G=Je.useCallback(te=>{z(fe=>{var oe;return(oe=fe.find(ne=>ne.id===te.id))!=null&&oe.delete||bi.dismiss(te.id),fe.filter(({id:ne})=>ne!==te.id)})},[]);return Je.useEffect(()=>bi.subscribe(te=>{if(te.dismiss){requestAnimationFrame(()=>{z(fe=>fe.map(oe=>oe.id===te.id?{...oe,delete:!0}:oe))});return}setTimeout(()=>{Rft.flushSync(()=>{z(fe=>{const oe=fe.findIndex(ne=>ne.id===te.id);return oe!==-1?[...fe.slice(0,oe),{...fe[oe],...te},...fe.slice(oe+1)]:[te,...fe]})})})}),[]),Je.useEffect(()=>{if(p!=="system"){ie(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ie("dark"):ie("light")),typeof window>"u")return;const te=window.matchMedia("(prefers-color-scheme: dark)");try{te.addEventListener("change",({matches:fe})=>{ie(fe?"dark":"light")})}catch{te.addListener(({matches:oe})=>{try{ie(oe?"dark":"light")}catch(ne){console.error(ne)}})}},[p]),Je.useEffect(()=>{j.length<=1&&H(!1)},[j]),Je.useEffect(()=>{const te=fe=>{var oe;if(a.length>0&&a.every(ce=>fe[ce]||fe.code===ce)){var Q;H(!0),(Q=I.current)==null||Q.focus()}fe.code==="Escape"&&(document.activeElement===I.current||(oe=I.current)!=null&&oe.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[a]),Je.useEffect(()=>{if(I.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,q.current=!1)}},[I.current]),Je.createElement("section",{ref:t,"aria-label":N??`${E} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},O.map((te,fe)=>{var oe;const[ne,Q]=te.split("-");return M.length?Je.createElement("ol",{key:te,dir:y==="auto"?WN():y,tabIndex:-1,ref:I,className:u,"data-sonner-toaster":!0,"data-sonner-theme":X,"data-y-position":ne,"data-x-position":Q,style:{"--front-toast-height":`${((oe=B[0])==null?void 0:oe.height)||0}px`,"--width":`${tdt}px`,"--gap":`${w}px`,...S,...odt(_,f)},onBlur:ce=>{q.current&&!ce.currentTarget.contains(ce.relatedTarget)&&(q.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||q.current||(q.current=!0,$.current=ce.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Y||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ce=>{ce.target instanceof HTMLElement&&ce.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},M.filter(ce=>!ce.position&&fe===0||ce.position===te).map((ce,ee)=>{var le,he;return Je.createElement(adt,{key:ce.id,icons:C,index:ee,toast:ce,defaultRichColors:m,duration:(le=v==null?void 0:v.duration)!=null?le:x,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:s,visibleToasts:b,closeButton:(he=v==null?void 0:v.closeButton)!=null?he:l,interacting:Y,position:te,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:G,toasts:M.filter(xe=>xe.position==ce.position),heights:B.filter(xe=>xe.position==ce.position),setHeights:F,expandByDefault:o,gap:w,expanded:U,swipeDirections:n.swipeDirections})})):null}))});function cdt(e){const[n]=IL();return h.jsx(ldt,{theme:n,...e})}function fr(e,n,t){Xft[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function l6({content:e,children:n,className:t}){const r=R.useRef(null),s=R.useRef(null);function i(){const o=r.current,l=s.current;if(!o||!l)return;l.matches(":popover-open")||l.showPopover();const u=o.getBoundingClientRect(),_=l.getBoundingClientRect(),f=Math.max(8,Math.min(u.left+u.width/2-_.width/2,window.innerWidth-_.width-8));l.style.left=`${f}px`,l.style.top=`${Math.max(8,u.top-_.height-6)}px`}function a(){var o,l;(o=r.current)!=null&&o.matches(":hover, :focus")||(l=s.current)==null||l.hidePopover()}return R.useEffect(()=>{const o=()=>{var l;return(l=s.current)==null?void 0:l.hidePopover()};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[]),h.jsxs("span",{ref:r,className:Ts("group relative inline-flex cursor-help rounded-full outline-none focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2",t),tabIndex:0,role:"img","aria-label":e,onMouseEnter:i,onMouseLeave:a,onFocus:i,onBlur:a,onKeyDown:o=>{var l;o.key==="Escape"&&((l=s.current)!=null&&l.matches(":popover-open"))&&(o.preventDefault(),o.stopPropagation(),s.current.hidePopover())},children:[n,h.jsx("span",{ref:s,popover:"manual",role:"tooltip",className:"pointer-events-none fixed inset-auto m-0 w-max max-w-64 whitespace-normal rounded-sm border-0 bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background shadow-control-subtle",children:e})]})}const udt='button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function c6(e,n,t="[data-initial-focus]"){const r=R.useRef(n);r.current=n,R.useEffect(()=>{const s=e.current;if(!s)return;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,a=()=>[...s.querySelectorAll(udt)];(s.querySelector(t)??a()[0]??s).focus();const o=l=>{if(l.key==="Escape"){l.preventDefault(),l.stopPropagation(),r.current();return}if(l.key!=="Tab")return;const u=a(),_=u[0],f=u.at(-1);!_||!f?(l.preventDefault(),s.focus()):l.shiftKey&&document.activeElement===_?(l.preventDefault(),f.focus()):!l.shiftKey&&document.activeElement===f&&(l.preventDefault(),_.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function tO({host:e,preview:n,currentClientAttached:t,stopping:r,onClose:s,onConfirm:i}){const a=R.useRef(null),o=Math.max(0,n.attachmentCount-(t?1:0)),l=[];return n.activeTurnCount>0&&l.push(n.activeTurnCount===1?aDe():vDe({count:tn(n.activeTurnCount)})),n.pendingPermissionCount>0&&l.push(n.pendingPermissionCount===1?UMe():xMe({count:tn(n.pendingPermissionCount)})),o>0&&l.push(o===1?ZMe():uDe({count:tn(o)})),n.queuedMessageCount>0&&l.push(n.queuedMessageCount===1?nDe():_De({count:tn(n.queuedMessageCount)})),n.activeRunCount>0&&l.push(n.activeRunCount===1?KMe():MMe({count:tn(n.activeRunCount)})),c6(a,s),Go.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:u=>{!r&&u.target===u.currentTarget&&s()},children:h.jsxs("div",{ref:a,className:"w-120 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-stop-dialog-title","aria-describedby":l.length>0?"remote-stop-dialog-impact":void 0,tabIndex:-1,children:[h.jsx("h2",{id:"remote-stop-dialog-title",className:"m-0 text-xl font-medium text-text",children:TMe({host:Ee(e)})}),l.length>0&&h.jsxs("div",{id:"remote-stop-dialog-impact",className:"mt-4 text-sm text-text",children:[h.jsx("p",{className:"m-0 font-medium",children:PMe()}),h.jsx("ul",{className:"mt-2 mb-0 space-y-1 ps-5",children:l.map(u=>h.jsx("li",{children:u},u))})]}),h.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[h.jsx(Oe,{disabled:r,onClick:s,children:Fp()}),h.jsx(Oe,{variant:"danger",disabled:r,onClick:i,children:r?wDe():CMe()})]})]})}),document.body)}var w2={exports:{}},VN;function fdt(){return VN||(VN=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={};return(()=>{var r=t;Object.defineProperty(r,"__esModule",{value:!0}),r.FitAddon=void 0,r.FitAddon=class{activate(s){this._terminal=s}dispose(){}fit(){const s=this.proposeDimensions();if(!s||!this._terminal||isNaN(s.cols)||isNaN(s.rows))return;const i=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(i._renderService.clear(),this._terminal.resize(s.cols,s.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const s=this._terminal._core,i=s._renderService.dimensions;if(i.css.cell.width===0||i.css.cell.height===0)return;const a=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),l=parseInt(o.getPropertyValue("height")),u=Math.max(0,parseInt(o.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),f=l-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),p=u-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-a;return{cols:Math.max(2,Math.floor(p/i.css.cell.width)),rows:Math.max(1,Math.floor(f/i.css.cell.height))}}}})(),t})()))})(w2)),w2.exports}var ddt=fdt(),S2={exports:{}},KN;function hdt(){return KN||(KN=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function l(_){try{const f=new URL(_),p=f.password&&f.username?`${f.protocol}//${f.username}:${f.password}@${f.host}`:f.username?`${f.protocol}//${f.username}@${f.host}`:`${f.protocol}//${f.host}`;return _.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(_,f,p,m={}){this._terminal=_,this._regex=f,this._handler=p,this._options=m}provideLinks(_,f){const p=u.computeLink(_,this._regex,this._terminal,this._handler);f(this._addCallbacks(p))}_addCallbacks(_){return _.map((f=>(f.leave=this._options.leave,f.hover=(p,m)=>{if(this._options.hover){const{range:x}=f;this._options.hover(p,m,x)}},f)))}};class u{static computeLink(f,p,m,x){const S=new RegExp(p.source,(p.flags||"")+"g"),[b,v]=u._getWindowedLineStrings(f-1,m),y=b.join("");let w;const C=[];for(;w=S.exec(y);){const N=w[0];if(!l(N))continue;const[E,j]=u._mapStrIdx(m,v,0,w.index),[z,M]=u._mapStrIdx(m,E,j,N.length);if(E===-1||j===-1||z===-1||M===-1)continue;const O={start:{x:j+1,y:E+1},end:{x:M,y:z+1}};C.push({range:O,text:N,activate:x})}return C}static _getWindowedLineStrings(f,p){let m,x=f,S=f,b=0,v="";const y=[];if(m=p.buffer.active.getLine(f)){const w=m.translateToString(!0);if(m.isWrapped&&w[0]!==" "){for(b=0;(m=p.buffer.active.getLine(--x))&&b<2048&&(v=m.translateToString(!0),b+=v.length,y.push(v),m.isWrapped&&v.indexOf(" ")===-1););y.reverse()}for(y.push(w),b=0;(m=p.buffer.active.getLine(++S))&&m.isWrapped&&b<2048&&(v=m.translateToString(!0),b+=v.length,y.push(v),v.indexOf(" ")===-1););}return[y,x]}static _mapStrIdx(f,p,m,x){const S=f.buffer.active,b=S.getNullCell();let v=m;for(;x;){const y=S.getLine(p);if(!y)return[-1,-1];for(let w=v;w{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.WebLinksAddon=void 0;const o=s(6),l=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function u(_,f){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=f}else console.warn("Opening link blocked as opener could not be cleared")}a.WebLinksAddon=class{constructor(_=u,f={}){this._handler=_,this._options=f}activate(_){this._terminal=_;const f=this._options,p=f.urlRegex||l;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,f))}dispose(){var _;(_=this._linkProvider)==null||_.dispose()}}})(),i})()))})(S2)),S2.exports}var _dt=hdt(),k2={exports:{}},QN;function pdt(){return QN||(QN=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,l){var u=this&&this.__decorate||function(y,w,C,N){var E,j=arguments.length,z=j<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,w,C,N);else for(var M=y.length-1;M>=0;M--)(E=y[M])&&(z=(j<3?E(z):j>3?E(w,C,z):E(w,C))||z);return j>3&&z&&Object.defineProperty(w,C,z),z},_=this&&this.__param||function(y,w){return function(C,N){w(C,N,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const f=l(9042),p=l(9924),m=l(844),x=l(4725),S=l(2585),b=l(3656);let v=o.AccessibilityManager=class extends m.Disposable{constructor(y,w,C,N){super(),this._terminal=y,this._coreBrowserService=C,this._renderService=N,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 E=0;Ethis._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,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((E=>this._handleResize(E.rows)))),this.register(this._terminal.onRender((E=>this._refreshRows(E.start,E.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((E=>this._handleChar(E)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` +`)))),this.register(this._terminal.onA11yTab((E=>this._handleTab(E)))),this.register(this._terminal.onKey((E=>this._handleKey(E.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,b.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,m.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(y){for(let w=0;w0?this._charsToConsume.shift()!==y&&(this._charsToAnnounce+=y):this._charsToAnnounce+=y,y===` +`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(y){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(y)||this._charsToConsume.push(y)}_refreshRows(y,w){this._liveRegionDebouncer.refresh(y,w,this._terminal.rows)}_renderRows(y,w){const C=this._terminal.buffer,N=C.lines.length.toString();for(let E=y;E<=w;E++){const j=C.lines.get(C.ydisp+E),z=[],M=(j==null?void 0:j.translateToString(!0,void 0,void 0,z))||"",O=(C.ydisp+E+1).toString(),B=this._rowElements[E];B&&(M.length===0?(B.innerText=" ",this._rowColumns.set(B,[0,1])):(B.textContent=M,this._rowColumns.set(B,z)),B.setAttribute("aria-posinset",O),B.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(y,w){const C=y.target,N=this._rowElements[w===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(w===0?"1":`${this._terminal.buffer.lines.length}`)||y.relatedTarget!==N)return;let E,j;if(w===0?(E=C,j=this._rowElements.pop(),this._rowContainer.removeChild(j)):(E=this._rowElements.shift(),j=C,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),j.removeEventListener("focus",this._bottomBoundaryFocusListener),w===0){const z=this._createAccessibilityTreeNode();this._rowElements.unshift(z),this._rowContainer.insertAdjacentElement("afterbegin",z)}else{const z=this._createAccessibilityTreeNode();this._rowElements.push(z),this._rowContainer.appendChild(z)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(w===0?-1:1),this._rowElements[w===0?1:this._rowElements.length-2].focus(),y.preventDefault(),y.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const y=document.getSelection();if(!y)return;if(y.isCollapsed)return void(this._rowContainer.contains(y.anchorNode)&&this._terminal.clearSelection());if(!y.anchorNode||!y.focusNode)return void console.error("anchorNode and/or focusNode are null");let w={node:y.anchorNode,offset:y.anchorOffset},C={node:y.focusNode,offset:y.focusOffset};if((w.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||w.node===C.node&&w.offset>C.offset)&&([w,C]=[C,w]),w.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(w={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(w.node))return;const N=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(N)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:N,offset:((M=N.textContent)==null?void 0:M.length)??0}),!this._rowContainer.contains(C.node))return;const E=({node:O,offset:B})=>{const F=O instanceof Text?O.parentNode:O;let U=parseInt(F==null?void 0:F.getAttribute("aria-posinset"),10)-1;if(isNaN(U))return console.warn("row is invalid. Race condition?"),null;const H=this._rowColumns.get(F);if(!H)return console.warn("columns is null. Race condition?"),null;let Y=B=this._terminal.cols&&(++U,Y=0),{row:U,column:Y}},j=E(w),z=E(C);if(j&&z){if(j.row>z.row||j.row===z.row&&j.column>=z.column)throw new Error("invalid range");this._terminal.select(j.column,j.row,(z.row-j.row)*this._terminal.cols-j.column+z.column)}}_handleResize(y){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let w=this._rowContainer.children.length;wy;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const y=this._coreBrowserService.mainDocument.createElement("div");return y.setAttribute("role","listitem"),y.tabIndex=-1,this._refreshRowDimensions(y),y}_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 y=0;y{function l(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function _(p,m,x,S){p=u(p=l(p),x.decPrivateModes.bracketedPasteMode&&S.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(p,!0),m.value=""}function f(p,m,x){const S=x.getBoundingClientRect(),b=p.clientX-S.left-10,v=p.clientY-S.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${b}px`,m.style.top=`${v}px`,m.style.zIndex="1000",m.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=l,o.bracketTextForPaste=u,o.copyHandler=function(p,m){p.clipboardData&&p.clipboardData.setData("text/plain",m.selectionText),p.preventDefault()},o.handlePasteEvent=function(p,m,x,S){p.stopPropagation(),p.clipboardData&&_(p.clipboardData.getData("text/plain"),m,x,S)},o.paste=_,o.moveTextAreaUnderMouseCursor=f,o.rightClickHandler=function(p,m,x,S,b){f(p,m,x),b&&S.rightClickSelect(p),m.value=S.selectionText,m.select()}},7239:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const u=l(1505);o.ColorContrastCache=class{constructor(){this._color=new u.TwoKeyMap,this._css=new u.TwoKeyMap}setCss(_,f,p){this._css.set(_,f,p)}getCss(_,f){return this._css.get(_,f)}setColor(_,f,p){this._color.set(_,f,p)}getColor(_,f){return this._color.get(_,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(l,u,_,f){l.addEventListener(u,_,f);let p=!1;return{dispose:()=>{p||(p=!0,l.removeEventListener(u,_,f))}}}},3551:function(a,o,l){var u=this&&this.__decorate||function(v,y,w,C){var N,E=arguments.length,j=E<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,y,w,C);else for(var z=v.length-1;z>=0;z--)(N=v[z])&&(j=(E<3?N(j):E>3?N(y,w,j):N(y,w))||j);return E>3&&j&&Object.defineProperty(y,w,j),j},_=this&&this.__param||function(v,y){return function(w,C){y(w,C,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const f=l(3656),p=l(8460),m=l(844),x=l(2585),S=l(4725);let b=o.Linkifier=class extends m.Disposable{get currentLink(){return this._currentLink}constructor(v,y,w,C,N){super(),this._element=v,this._mouseService=y,this._renderService=w,this._bufferService=C,this._linkProviderService=N,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,m.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,m.toDisposable)((()=>{var E;this._lastMouseEvent=void 0,(E=this._activeProviderReplies)==null||E.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(v){this._lastMouseEvent=v;const y=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!y)return;this._isMouseOut=!1;const w=v.composedPath();for(let C=0;C{E==null||E.forEach((j=>{j.link.dispose&&j.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=v.y);let w=!1;for(const[E,j]of this._linkProviderService.linkProviders.entries())y?(N=this._activeProviderReplies)!=null&&N.get(E)&&(w=this._checkLinkProviderResult(E,v,w)):j.provideLinks(v.y,(z=>{var O,B;if(this._isMouseOut)return;const M=z==null?void 0:z.map((F=>({link:F})));(O=this._activeProviderReplies)==null||O.set(E,M),w=this._checkLinkProviderResult(E,v,w),((B=this._activeProviderReplies)==null?void 0:B.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)}))}_removeIntersectingLinks(v,y){const w=new Set;for(let C=0;Cv?this._bufferService.cols:j.link.range.end.x;for(let O=z;O<=M;O++){if(w.has(O)){N.splice(E--,1);break}w.add(O)}}}}_checkLinkProviderResult(v,y,w){var E;if(!this._activeProviderReplies)return w;const C=this._activeProviderReplies.get(v);let N=!1;for(let j=0;jthis._linkAtPosition(z.link,y)));j&&(w=!0,this._handleNewLink(j))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!w)for(let j=0;jthis._linkAtPosition(M.link,y)));if(z){w=!0,this._handleNewLink(z);break}}return w}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const y=this._positionFromMouseEvent(v,this._element,this._mouseService);y&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,y)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,y){this._currentLink&&this._lastMouseEvent&&(!v||!y||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=y)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._linkAtPosition(v.link,y)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var w,C;return(C=(w=this._currentLink)==null?void 0:w.state)==null?void 0:C.decorations.pointerCursor},set:w=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==w&&(this._currentLink.state.decorations.pointerCursor=w,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",w))}},underline:{get:()=>{var w,C;return(C=(w=this._currentLink)==null?void 0:w.state)==null?void 0:C.decorations.underline},set:w=>{var C,N,E;(C=this._currentLink)!=null&&C.state&&((E=(N=this._currentLink)==null?void 0:N.state)==null?void 0:E.decorations.underline)!==w&&(this._currentLink.state.decorations.underline=w,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.link,w))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((w=>{if(!this._currentLink)return;const C=w.start===0?0:w.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+w.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}}))))}_linkHover(v,y,w){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),y.hover&&y.hover(w,y.text)}_fireUnderlineEvent(v,y){const w=v.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(w.start.x-1,w.start.y-C-1,w.end.x,w.end.y-C-1,void 0);(y?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(v,y,w){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),y.leave&&y.leave(w,y.text)}_linkAtPosition(v,y){const w=v.range.start.y*this._bufferService.cols+v.range.start.x,C=v.range.end.y*this._bufferService.cols+v.range.end.x,N=y.y*this._bufferService.cols+y.x;return w<=N&&N<=C}_positionFromMouseEvent(v,y,w){const C=w.getCoords(v,y,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,y,w,C,N){return{x1:v,y1:y,x2:w,y2:C,cols:this._bufferService.cols,fg:N}}};o.Linkifier=b=u([_(1,S.IMouseService),_(2,S.IRenderService),_(3,x.IBufferService),_(4,S.ILinkProviderService)],b)},9042:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(a,o,l){var u=this&&this.__decorate||function(S,b,v,y){var w,C=arguments.length,N=C<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,v):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(S,b,v,y);else for(var E=S.length-1;E>=0;E--)(w=S[E])&&(N=(C<3?w(N):C>3?w(b,v,N):w(b,v))||N);return C>3&&N&&Object.defineProperty(b,v,N),N},_=this&&this.__param||function(S,b){return function(v,y){b(v,y,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const f=l(511),p=l(2585);let m=o.OscLinkProvider=class{constructor(S,b,v){this._bufferService=S,this._optionsService=b,this._oscLinkService=v}provideLinks(S,b){var M;const v=this._bufferService.buffer.lines.get(S-1);if(!v)return void b(void 0);const y=[],w=this._optionsService.rawOptions.linkHandler,C=new f.CellData,N=v.getTrimmedLength();let E=-1,j=-1,z=!1;for(let O=0;Ow?w.activate(H,Y,F):x(0,Y),hover:(H,Y)=>{var V;return(V=w==null?void 0:w.hover)==null?void 0:V.call(w,H,Y,F)},leave:(H,Y)=>{var V;return(V=w==null?void 0:w.leave)==null?void 0:V.call(w,H,Y,F)}})}z=!1,C.hasExtendedAttrs()&&C.extended.urlId?(j=O,E=C.extended.urlId):(j=-1,E=-1)}}b(y)}};function x(S,b){if(confirm(`Do you want to navigate to ${b}? + +WARNING: This link could potentially be dangerous`)){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([_(0,p.IBufferService),_(1,p.IOptionsService),_(2,p.IOscLinkService)],m)},6193:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(l,u){this._renderCallback=l,this._coreBrowserService=u,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(l){return this._refreshCallbacks.push(l),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(l,u,_){this._rowCount=_,l=l!==void 0?l:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const l=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,u),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const l of this._refreshCallbacks)l(0);this._refreshCallbacks=[]}}},3236:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const u=l(3614),_=l(3656),f=l(3551),p=l(9042),m=l(3730),x=l(1680),S=l(3107),b=l(5744),v=l(2950),y=l(1296),w=l(428),C=l(4269),N=l(5114),E=l(8934),j=l(3230),z=l(9312),M=l(4725),O=l(6731),B=l(8055),F=l(8969),U=l(8460),H=l(844),Y=l(6114),V=l(8437),X=l(2584),ie=l(7399),I=l(5941),L=l(9074),$=l(2585),q=l(5435),G=l(4567),te=l(779);class fe extends F.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(ne={}){super(ne),this.browser=Y,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new H.MutableDisposable),this._onCursorMove=this.register(new U.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new U.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new U.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new U.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new U.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new U.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new U.EventEmitter),this._onBlur=this.register(new U.EventEmitter),this._onA11yCharEmitter=this.register(new U.EventEmitter),this._onA11yTabEmitter=this.register(new U.EventEmitter),this._onWillOpen=this.register(new U.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService($.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(te.LinkProviderService),this._instantiationService.setService(M.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(m.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((Q,ce)=>this.refresh(Q,ce)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((Q=>this._reportWindowsOptions(Q)))),this.register(this._inputHandler.onColor((Q=>this._handleColorEvent(Q)))),this.register((0,U.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,U.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,U.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((Q=>this._afterResize(Q.cols,Q.rows)))),this.register((0,H.toDisposable)((()=>{var Q,ce;this._customKeyEventHandler=void 0,(ce=(Q=this.element)==null?void 0:Q.parentNode)==null||ce.removeChild(this.element)})))}_handleColorEvent(ne){if(this._themeService)for(const Q of ne){let ce,ee="";switch(Q.index){case 256:ce="foreground",ee="10";break;case 257:ce="background",ee="11";break;case 258:ce="cursor",ee="12";break;default:ce="ansi",ee="4;"+Q.index}switch(Q.type){case 0:const le=B.color.toColorRGB(ce==="ansi"?this._themeService.colors.ansi[Q.index]:this._themeService.colors[ce]);this.coreService.triggerDataEvent(`${X.C0.ESC}]${ee};${(0,I.toRgbString)(le)}${X.C1_ESCAPED.ST}`);break;case 1:if(ce==="ansi")this._themeService.modifyColors((he=>he.ansi[Q.index]=B.channels.toColor(...Q.color)));else{const he=ce;this._themeService.modifyColors((xe=>xe[he]=B.channels.toColor(...Q.color)))}break;case 2:this._themeService.restoreColor(Q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ne){ne?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ne){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var ne;return(ne=this.textarea)==null?void 0:ne.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const ne=this.buffer.ybase+this.buffer.y,Q=this.buffer.lines.get(ne);if(!Q)return;const ce=Math.min(this.buffer.x,this.cols-1),ee=this._renderService.dimensions.css.cell.height,le=Q.getWidth(ce),he=this._renderService.dimensions.css.cell.width*le,xe=this.buffer.y*this._renderService.dimensions.css.cell.height,Te=ce*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Te+"px",this.textarea.style.top=xe+"px",this.textarea.style.width=he+"px",this.textarea.style.height=ee+"px",this.textarea.style.lineHeight=ee+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(Q=>{this.hasSelection()&&(0,u.copyHandler)(Q,this._selectionService)})));const ne=Q=>(0,u.handlePasteEvent)(Q,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",ne)),this.register((0,_.addDisposableDomListener)(this.element,"paste",ne)),Y.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(Q=>{Q.button===2&&(0,u.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(Q=>{(0,u.rightClickHandler)(Q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Y.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(Q=>{Q.button===1&&(0,u.moveTextAreaUnderMouseCursor)(Q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(ne=>this._keyUp(ne)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(ne=>this._keyDown(ne)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(ne=>this._keyPress(ne)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(ne=>this._compositionHelper.compositionupdate(ne)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(ne=>this._inputEvent(ne)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(ne){var ce;if(!ne)throw new Error("Terminal requires a parent element.");if(ne.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ce=this.element)==null?void 0:ce.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=ne.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),ne.appendChild(this.element);const Q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,_.addDisposableDomListener)(this.screenElement,"mousemove",(ee=>this.updateCursorStyle(ee)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),Y.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(N.CoreBrowserService,this.textarea,ne.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(ee=>this._handleTextAreaFocus(ee)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(w.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(M.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(M.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(M.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(j.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(M.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ee=>this._onRender.fire(ee)))),this.onResize((ee=>this._renderService.resize(ee.cols,ee.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(Q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(x.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(z.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ee=>this.scrollLines(ee.amount,ee.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ee=>this._renderService.handleSelectionChanged(ee.start,ee.end,ee.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ee=>{this.textarea.value=ee,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ee=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(S.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(ee=>this._selectionService.handleMouseDown(ee)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ee=>this._handleScreenReaderModeOptionChange(ee)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ee=>{!this._overviewRulerRenderer&&ee&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(y.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const ne=this,Q=this.element;function ce(he){const xe=ne._mouseService.getMouseReportCoords(he,ne.screenElement);if(!xe)return!1;let Te,Ze;switch(he.overrideType||he.type){case"mousemove":Ze=32,he.buttons===void 0?(Te=3,he.button!==void 0&&(Te=he.button<3?he.button:3)):Te=1&he.buttons?0:4&he.buttons?1:2&he.buttons?2:3;break;case"mouseup":Ze=0,Te=he.button<3?he.button:3;break;case"mousedown":Ze=1,Te=he.button<3?he.button:3;break;case"wheel":if(ne._customWheelEventHandler&&ne._customWheelEventHandler(he)===!1||ne.viewport.getLinesScrolled(he)===0)return!1;Ze=he.deltaY<0?0:1,Te=4;break;default:return!1}return!(Ze===void 0||Te===void 0||Te>4)&&ne.coreMouseService.triggerMouseEvent({col:xe.col,row:xe.row,x:xe.x,y:xe.y,button:Te,action:Ze,ctrl:he.ctrlKey,alt:he.altKey,shift:he.shiftKey})}const ee={mouseup:null,wheel:null,mousedrag:null,mousemove:null},le={mouseup:he=>(ce(he),he.buttons||(this._document.removeEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.removeEventListener("mousemove",ee.mousedrag)),this.cancel(he)),wheel:he=>(ce(he),this.cancel(he,!0)),mousedrag:he=>{he.buttons&&ce(he)},mousemove:he=>{he.buttons||ce(he)}};this.register(this.coreMouseService.onProtocolChange((he=>{he?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(he)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&he?ee.mousemove||(Q.addEventListener("mousemove",le.mousemove),ee.mousemove=le.mousemove):(Q.removeEventListener("mousemove",ee.mousemove),ee.mousemove=null),16&he?ee.wheel||(Q.addEventListener("wheel",le.wheel,{passive:!1}),ee.wheel=le.wheel):(Q.removeEventListener("wheel",ee.wheel),ee.wheel=null),2&he?ee.mouseup||(ee.mouseup=le.mouseup):(this._document.removeEventListener("mouseup",ee.mouseup),ee.mouseup=null),4&he?ee.mousedrag||(ee.mousedrag=le.mousedrag):(this._document.removeEventListener("mousemove",ee.mousedrag),ee.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(Q,"mousedown",(he=>{if(he.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(he))return ce(he),ee.mouseup&&this._document.addEventListener("mouseup",ee.mouseup),ee.mousedrag&&this._document.addEventListener("mousemove",ee.mousedrag),this.cancel(he)}))),this.register((0,_.addDisposableDomListener)(Q,"wheel",(he=>{if(!ee.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(he)===!1)return!1;if(!this.buffer.hasScrollback){const xe=this.viewport.getLinesScrolled(he);if(xe===0)return;const Te=X.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(he.deltaY<0?"A":"B");let Ze="";for(let Ue=0;Ue{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(he),this.cancel(he)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(Q,"touchmove",(he=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(he)?void 0:this.cancel(he)}),{passive:!1}))}refresh(ne,Q){var ce;(ce=this._renderService)==null||ce.refreshRows(ne,Q)}updateCursorStyle(ne){var Q;(Q=this._selectionService)!=null&&Q.shouldColumnSelect(ne)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(ne,Q,ce=0){var ee;ce===1?(super.scrollLines(ne,Q,ce),this.refresh(0,this.rows-1)):(ee=this.viewport)==null||ee.scrollLines(ne)}paste(ne){(0,u.paste)(ne,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ne){this._customKeyEventHandler=ne}attachCustomWheelEventHandler(ne){this._customWheelEventHandler=ne}registerLinkProvider(ne){return this._linkProviderService.registerLinkProvider(ne)}registerCharacterJoiner(ne){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const Q=this._characterJoinerService.register(ne);return this.refresh(0,this.rows-1),Q}deregisterCharacterJoiner(ne){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ne)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ne){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ne)}registerDecoration(ne){return this._decorationService.registerDecoration(ne)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ne,Q,ce){this._selectionService.setSelection(ne,Q,ce)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var ne;(ne=this._selectionService)==null||ne.clearSelection()}selectAll(){var ne;(ne=this._selectionService)==null||ne.selectAll()}selectLines(ne,Q){var ce;(ce=this._selectionService)==null||ce.selectLines(ne,Q)}_keyDown(ne){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ne)===!1)return!1;const Q=this.browser.isMac&&this.options.macOptionIsMeta&&ne.altKey;if(!Q&&!this._compositionHelper.keydown(ne))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;Q||ne.key!=="Dead"&&ne.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ce=(0,ie.evaluateKeyboardEvent)(ne,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ne),ce.type===3||ce.type===2){const ee=this.rows-1;return this.scrollLines(ce.type===2?-ee:ee),this.cancel(ne,!0)}return ce.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ne)||(ce.cancel&&this.cancel(ne,!0),!ce.key||!!(ne.key&&!ne.ctrlKey&&!ne.altKey&&!ne.metaKey&&ne.key.length===1&&ne.key.charCodeAt(0)>=65&&ne.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ce.key!==X.C0.ETX&&ce.key!==X.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ce.key,domEvent:ne}),this._showCursor(),this.coreService.triggerDataEvent(ce.key,!0),!this.optionsService.rawOptions.screenReaderMode||ne.altKey||ne.ctrlKey?this.cancel(ne,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ne,Q){const ce=ne.isMac&&!this.options.macOptionIsMeta&&Q.altKey&&!Q.ctrlKey&&!Q.metaKey||ne.isWindows&&Q.altKey&&Q.ctrlKey&&!Q.metaKey||ne.isWindows&&Q.getModifierState("AltGraph");return Q.type==="keypress"?ce:ce&&(!Q.keyCode||Q.keyCode>47)}_keyUp(ne){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ne)===!1||((function(Q){return Q.keyCode===16||Q.keyCode===17||Q.keyCode===18})(ne)||this.focus(),this.updateCursorStyle(ne),this._keyPressHandled=!1)}_keyPress(ne){let Q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ne)===!1)return!1;if(this.cancel(ne),ne.charCode)Q=ne.charCode;else if(ne.which===null||ne.which===void 0)Q=ne.keyCode;else{if(ne.which===0||ne.charCode===0)return!1;Q=ne.which}return!(!Q||(ne.altKey||ne.ctrlKey||ne.metaKey)&&!this._isThirdLevelShift(this.browser,ne)||(Q=String.fromCharCode(Q),this._onKey.fire({key:Q,domEvent:ne}),this._showCursor(),this.coreService.triggerDataEvent(Q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ne){if(ne.data&&ne.inputType==="insertText"&&(!ne.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const Q=ne.data;return this.coreService.triggerDataEvent(Q,!0),this.cancel(ne),!0}return!1}resize(ne,Q){ne!==this.cols||Q!==this.rows?super.resize(ne,Q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ne,Q){var ce,ee;(ce=this._charSizeService)==null||ce.measure(),(ee=this.viewport)==null||ee.syncScrollArea(!0)}clear(){var ne;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let Q=1;Q{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(l,u=1e3){this._renderCallback=l,this._debounceThresholdMS=u,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(l,u,_){this._rowCount=_,l=l!==void 0?l:0,u=u!==void 0?u:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,l):l,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,u):u;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=f-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),m)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const l=Math.max(this._rowStart,0),u=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(l,u)}}},1680:function(a,o,l){var u=this&&this.__decorate||function(v,y,w,C){var N,E=arguments.length,j=E<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,y,w,C);else for(var z=v.length-1;z>=0;z--)(N=v[z])&&(j=(E<3?N(j):E>3?N(y,w,j):N(y,w))||j);return E>3&&j&&Object.defineProperty(y,w,j),j},_=this&&this.__param||function(v,y){return function(w,C){y(w,C,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const f=l(3656),p=l(4725),m=l(8460),x=l(844),S=l(2585);let b=o.Viewport=class extends x.Disposable{constructor(v,y,w,C,N,E,j,z){super(),this._viewportElement=v,this._scrollArea=y,this._bufferService=w,this._optionsService=C,this._charSizeService=N,this._renderService=E,this._coreBrowserService=j,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new m.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((M=>this._activeBuffer=M.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((M=>this._renderDimensions=M))),this._handleThemeChange(z.colors),this.register(z.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(v){this._viewportElement.style.backgroundColor=v.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(v){if(v)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const y=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==y&&(this._lastRecordedBufferHeight=y,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const v=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==v&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=v),this._refreshAnimationFrame=null}syncScrollArea(v=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(v)}_handleScroll(v){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const y=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:y,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const v=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(v*(this._smoothScrollState.target-this._smoothScrollState.origin)),v<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(v,y){const w=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(y<0&&this._viewportElement.scrollTop!==0||y>0&&w0&&(w=F),C=""}}return{bufferElements:N,cursorElement:w}}getLinesScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let y=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(y/=this._currentRowHeight+0,this._wheelPartialScroll+=y,y=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(y*=this._bufferService.rows),y}_applyScrollModifier(v,y){const w=this._optionsService.rawOptions.fastScrollModifier;return w==="alt"&&y.altKey||w==="ctrl"&&y.ctrlKey||w==="shift"&&y.shiftKey?v*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:v*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(v){this._lastTouchY=v.touches[0].pageY}handleTouchMove(v){const y=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,y!==0&&(this._viewportElement.scrollTop+=y,this._bubbleScroll(v,y))}};o.Viewport=b=u([_(2,S.IBufferService),_(3,S.IOptionsService),_(4,p.ICharSizeService),_(5,p.IRenderService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],b)},3107:function(a,o,l){var u=this&&this.__decorate||function(S,b,v,y){var w,C=arguments.length,N=C<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,v):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(S,b,v,y);else for(var E=S.length-1;E>=0;E--)(w=S[E])&&(N=(C<3?w(N):C>3?w(b,v,N):w(b,v))||N);return C>3&&N&&Object.defineProperty(b,v,N),N},_=this&&this.__param||function(S,b){return function(v,y){b(v,y,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const f=l(4725),p=l(844),m=l(2585);let x=o.BufferDecorationRenderer=class extends p.Disposable{constructor(S,b,v,y,w){super(),this._screenElement=S,this._bufferService=b,this._coreBrowserService=v,this._decorationService=y,this._renderService=w,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((C=>this._removeDecoration(C)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const S of this._decorationService.decorations)this._renderDecoration(S);this._dimensionsChanged=!1}_renderDecoration(S){this._refreshStyle(S),this._dimensionsChanged&&this._refreshXPosition(S)}_createElement(S){var y;const b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",((y=S==null?void 0:S.options)==null?void 0:y.layer)==="top"),b.style.width=`${Math.round((S.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=(S.options.height||1)*this._renderService.dimensions.css.cell.height+"px",b.style.top=(S.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=S.options.x??0;return v&&v>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(S,b),b}_refreshStyle(S){const b=S.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)S.element&&(S.element.style.display="none",S.onRenderEmitter.fire(S.element));else{let v=this._decorationElements.get(S);v||(v=this._createElement(S),S.element=v,this._decorationElements.set(S,v),this._container.appendChild(v),S.onDispose((()=>{this._decorationElements.delete(S),v.remove()}))),v.style.top=b*this._renderService.dimensions.css.cell.height+"px",v.style.display=this._altBufferIsActive?"none":"block",S.onRenderEmitter.fire(v)}}_refreshXPosition(S,b=S.element){if(!b)return;const v=S.options.x??0;(S.options.anchor||"left")==="right"?b.style.right=v?v*this._renderService.dimensions.css.cell.width+"px":"":b.style.left=v?v*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(S){var b;(b=this._decorationElements.get(S))==null||b.remove(),this._decorationElements.delete(S),S.dispose()}};o.BufferDecorationRenderer=x=u([_(1,m.IBufferService),_(2,f.ICoreBrowserService),_(3,m.IDecorationService),_(4,f.IRenderService)],x)},5871:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(l){if(l.options.overviewRulerOptions){for(const u of this._zones)if(u.color===l.options.overviewRulerOptions.color&&u.position===l.options.overviewRulerOptions.position){if(this._lineIntersectsZone(u,l.marker.line))return;if(this._lineAdjacentToZone(u,l.marker.line,l.options.overviewRulerOptions.position))return void this._addLineToZone(u,l.marker.line)}if(this._zonePoolIndex=l.startBufferLine&&u<=l.endBufferLine}_lineAdjacentToZone(l,u,_){return u>=l.startBufferLine-this._linePadding[_||"full"]&&u<=l.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(l,u){l.startBufferLine=Math.min(l.startBufferLine,u),l.endBufferLine=Math.max(l.endBufferLine,u)}}},5744:function(a,o,l){var u=this&&this.__decorate||function(w,C,N,E){var j,z=arguments.length,M=z<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,N):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(w,C,N,E);else for(var O=w.length-1;O>=0;O--)(j=w[O])&&(M=(z<3?j(M):z>3?j(C,N,M):j(C,N))||M);return z>3&&M&&Object.defineProperty(C,N,M),M},_=this&&this.__param||function(w,C){return function(N,E){C(N,E,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const f=l(5871),p=l(4725),m=l(844),x=l(2585),S={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0};let y=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(w,C,N,E,j,z,M){var B;super(),this._viewportElement=w,this._screenElement=C,this._bufferService=N,this._decorationService=E,this._renderService=j,this._optionsService=z,this._coreBrowserService=M,this._colorZoneStore=new f.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(B=this._viewportElement.parentElement)==null||B.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,m.toDisposable)((()=>{var F;(F=this._canvas)==null||F.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const w=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);b.full=this._canvas.width,b.left=w,b.center=C,b.right=w,this._refreshDrawHeightConstants(),v.full=0,v.left=0,v.center=b.left,v.right=b.left+b.center}_refreshDrawHeightConstants(){S.full=Math.round(2*this._coreBrowserService.dpr);const w=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(w,12),6)*this._coreBrowserService.dpr);S.left=C,S.center=C,S.right=C}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*S.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const C of this._decorationService.decorations)this._colorZoneStore.addDecoration(C);this._ctx.lineWidth=1;const w=this._colorZoneStore.zones;for(const C of w)C.position!=="full"&&this._renderColorZone(C);for(const C of w)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(w){this._ctx.fillStyle=w.color,this._ctx.fillRect(v[w.position||"full"],Math.round((this._canvas.height-1)*(w.startBufferLine/this._bufferService.buffers.active.lines.length)-S[w.position||"full"]/2),b[w.position||"full"],Math.round((this._canvas.height-1)*((w.endBufferLine-w.startBufferLine)/this._bufferService.buffers.active.lines.length)+S[w.position||"full"]))}_queueRefresh(w,C){this._shouldUpdateDimensions=w||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};o.OverviewRulerRenderer=y=u([_(2,x.IBufferService),_(3,x.IDecorationService),_(4,p.IRenderService),_(5,x.IOptionsService),_(6,p.ICoreBrowserService)],y)},2950:function(a,o,l){var u=this&&this.__decorate||function(S,b,v,y){var w,C=arguments.length,N=C<3?b:y===null?y=Object.getOwnPropertyDescriptor(b,v):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(S,b,v,y);else for(var E=S.length-1;E>=0;E--)(w=S[E])&&(N=(C<3?w(N):C>3?w(b,v,N):w(b,v))||N);return C>3&&N&&Object.defineProperty(b,v,N),N},_=this&&this.__param||function(S,b){return function(v,y){b(v,y,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const f=l(4725),p=l(2585),m=l(2584);let x=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(S,b,v,y,w,C){this._textarea=S,this._compositionView=b,this._bufferService=v,this._optionsService=y,this._coreService=w,this._renderService=C,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(S){this._compositionView.textContent=S.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(S){if(this._isComposing||this._isSendingComposition){if(S.keyCode===229||S.keyCode===16||S.keyCode===17||S.keyCode===18)return!1;this._finalizeComposition(!1)}return S.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(S){if(this._compositionView.classList.remove("active"),this._isComposing=!1,S){const b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let v;this._isSendingComposition=!1,b.start+=this._dataAlreadySent.length,v=this._isComposing?this._textarea.value.substring(b.start,b.end):this._textarea.value.substring(b.start),v.length>0&&this._coreService.triggerDataEvent(v,!0)}}),0)}else{this._isSendingComposition=!1;const b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}}_handleAnyTextareaChanges(){const S=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const b=this._textarea.value,v=b.replace(S,"");this._dataAlreadySent=v,b.length>S.length?this._coreService.triggerDataEvent(v,!0):b.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=x=u([_(2,p.IBufferService),_(3,p.IOptionsService),_(4,p.ICoreService),_(5,f.IRenderService)],x)},9806:(a,o)=>{function l(u,_,f){const p=f.getBoundingClientRect(),m=u.getComputedStyle(f),x=parseInt(m.getPropertyValue("padding-left")),S=parseInt(m.getPropertyValue("padding-top"));return[_.clientX-p.left-x,_.clientY-p.top-S]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=l,o.getCoords=function(u,_,f,p,m,x,S,b,v){if(!x)return;const y=l(u,_,f);return y?(y[0]=Math.ceil((y[0]+(v?S/2:0))/S),y[1]=Math.ceil(y[1]/b),y[0]=Math.min(Math.max(y[0],1),p+(v?1:0)),y[1]=Math.min(Math.max(y[1],1),m),y):void 0}},9504:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=l(2584);function _(b,v,y,w){const C=b-f(b,y),N=v-f(v,y),E=Math.abs(C-N)-(function(j,z,M){let O=0;const B=j-f(j,M),F=z-f(z,M);for(let U=0;U=0&&bv?"A":"B"}function m(b,v,y,w,C,N){let E=b,j=v,z="";for(;E!==y||j!==w;)E+=C?1:-1,C&&E>N.cols-1?(z+=N.buffer.translateBufferLineToString(j,!1,b,E),E=0,b=0,j++):!C&&E<0&&(z+=N.buffer.translateBufferLineToString(j,!1,0,b+1),E=N.cols-1,b=E,j--);return z+N.buffer.translateBufferLineToString(j,!1,b,E)}function x(b,v){const y=v?"O":"[";return u.C0.ESC+y+b}function S(b,v){b=Math.floor(b);let y="";for(let w=0;w0?B-f(B,F):M;const Y=B,V=(function(X,ie,I,L,$,q){let G;return G=_(I,L,$,q).length>0?L-f(L,$):ie,X=I&&Gb?"D":"C",S(Math.abs(C-b),x(E,w));E=N>v?"D":"C";const j=Math.abs(N-v);return S((function(z,M){return M.cols-z})(N>v?b:C,y)+(j-1)*y.cols+1+((N>v?C:b)-1),x(E,w))}},1296:function(a,o,l){var u=this&&this.__decorate||function(U,H,Y,V){var X,ie=arguments.length,I=ie<3?H:V===null?V=Object.getOwnPropertyDescriptor(H,Y):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate(U,H,Y,V);else for(var L=U.length-1;L>=0;L--)(X=U[L])&&(I=(ie<3?X(I):ie>3?X(H,Y,I):X(H,Y))||I);return ie>3&&I&&Object.defineProperty(H,Y,I),I},_=this&&this.__param||function(U,H){return function(Y,V){H(Y,V,U)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const f=l(3787),p=l(2550),m=l(2223),x=l(6171),S=l(6052),b=l(4725),v=l(8055),y=l(8460),w=l(844),C=l(2585),N="xterm-dom-renderer-owner-",E="xterm-rows",j="xterm-fg-",z="xterm-bg-",M="xterm-focus",O="xterm-selection";let B=1,F=o.DomRenderer=class extends w.Disposable{constructor(U,H,Y,V,X,ie,I,L,$,q,G,te,fe){super(),this._terminal=U,this._document=H,this._element=Y,this._screenElement=V,this._viewportElement=X,this._helperContainer=ie,this._linkifier2=I,this._charSizeService=$,this._optionsService=q,this._bufferService=G,this._coreBrowserService=te,this._themeService=fe,this._terminalClass=B++,this._rowElements=[],this._selectionRenderModel=(0,S.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new y.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,x.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((oe=>this._injectCss(oe)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((oe=>this._handleLinkHover(oe)))),this.register(this._linkifier2.onHideLinkUnderline((oe=>this._handleLinkLeave(oe)))),this.register((0,w.toDisposable)((()=>{this._element.classList.remove(N+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const U=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*U,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*U),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/U),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/U),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const Y of this._rowElements)Y.style.width=`${this.dimensions.css.canvas.width}px`,Y.style.height=`${this.dimensions.css.cell.height}px`,Y.style.lineHeight=`${this.dimensions.css.cell.height}px`,Y.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const H=`${this._terminalSelector} .${E} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=H,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(U){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let H=`${this._terminalSelector} .${E} { color: ${U.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;H+=`${this._terminalSelector} .${E} .xterm-dim { color: ${v.color.multiplyOpacity(U.foreground,.5).css};}`,H+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const Y=`blink_underline_${this._terminalClass}`,V=`blink_bar_${this._terminalClass}`,X=`blink_block_${this._terminalClass}`;H+=`@keyframes ${Y} { 50% { border-bottom-style: hidden; }}`,H+=`@keyframes ${V} { 50% { box-shadow: none; }}`,H+=`@keyframes ${X} { 0% { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css}; } 50% { background-color: inherit; color: ${U.cursor.css}; }}`,H+=`${this._terminalSelector} .${E}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Y} 1s step-end infinite;}${this._terminalSelector} .${E}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${E}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${U.cursor.css}; color: ${U.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${U.cursor.css} !important; color: ${U.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${U.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${U.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${U.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,H+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${U.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${U.selectionInactiveBackgroundOpaque.css};}`;for(const[ie,I]of U.ansi.entries())H+=`${this._terminalSelector} .${j}${ie} { color: ${I.css}; }${this._terminalSelector} .${j}${ie}.xterm-dim { color: ${v.color.multiplyOpacity(I,.5).css}; }${this._terminalSelector} .${z}${ie} { background-color: ${I.css}; }`;H+=`${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR} { color: ${v.color.opaque(U.background).css}; }${this._terminalSelector} .${j}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${v.color.multiplyOpacity(v.color.opaque(U.background),.5).css}; }${this._terminalSelector} .${z}${m.INVERTED_DEFAULT_COLOR} { background-color: ${U.foreground.css}; }`,this._themeStyleElement.textContent=H}_setDefaultSpacing(){const U=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${U}px`,this._rowFactory.defaultSpacing=U}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(U,H){for(let Y=this._rowElements.length;Y<=H;Y++){const V=this._document.createElement("div");this._rowContainer.appendChild(V),this._rowElements.push(V)}for(;this._rowElements.length>H;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(U,H){this._refreshRowElements(U,H),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(M),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(M),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(U,H,Y){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(U,H,Y),this.renderRows(0,this._bufferService.rows-1),!U||!H)return;this._selectionRenderModel.update(this._terminal,U,H,Y);const V=this._selectionRenderModel.viewportStartRow,X=this._selectionRenderModel.viewportEndRow,ie=this._selectionRenderModel.viewportCappedStartRow,I=this._selectionRenderModel.viewportCappedEndRow;if(ie>=this._bufferService.rows||I<0)return;const L=this._document.createDocumentFragment();if(Y){const $=U[0]>H[0];L.appendChild(this._createSelectionElement(ie,$?H[0]:U[0],$?U[0]:H[0],I-ie+1))}else{const $=V===ie?U[0]:0,q=ie===X?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(ie,$,q));const G=I-ie-1;if(L.appendChild(this._createSelectionElement(ie+1,0,this._bufferService.cols,G)),ie!==I){const te=X===I?H[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(I,0,te))}}this._selectionContainer.appendChild(L)}_createSelectionElement(U,H,Y,V=1){const X=this._document.createElement("div"),ie=H*this.dimensions.css.cell.width;let I=this.dimensions.css.cell.width*(Y-H);return ie+I>this.dimensions.css.canvas.width&&(I=this.dimensions.css.canvas.width-ie),X.style.height=V*this.dimensions.css.cell.height+"px",X.style.top=U*this.dimensions.css.cell.height+"px",X.style.left=`${ie}px`,X.style.width=`${I}px`,X}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const U of this._rowElements)U.replaceChildren()}renderRows(U,H){const Y=this._bufferService.buffer,V=Y.ybase+Y.y,X=Math.min(Y.x,this._bufferService.cols-1),ie=this._optionsService.rawOptions.cursorBlink,I=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let $=U;$<=H;$++){const q=$+Y.ydisp,G=this._rowElements[$],te=Y.lines.get(q);if(!G||!te)break;G.replaceChildren(...this._rowFactory.createRow(te,q,q===V,I,L,X,ie,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!0)}_handleLinkLeave(U){this._setCellUnderline(U.x1,U.x2,U.y1,U.y2,U.cols,!1)}_setCellUnderline(U,H,Y,V,X,ie){Y<0&&(U=0),V<0&&(H=0);const I=this._bufferService.rows-1;Y=Math.max(Math.min(Y,I),0),V=Math.max(Math.min(V,I),0),X=Math.min(X,this._bufferService.cols);const L=this._bufferService.buffer,$=L.ybase+L.y,q=Math.min(L.x,X-1),G=this._optionsService.rawOptions.cursorBlink,te=this._optionsService.rawOptions.cursorStyle,fe=this._optionsService.rawOptions.cursorInactiveStyle;for(let oe=Y;oe<=V;++oe){const ne=oe+L.ydisp,Q=this._rowElements[oe],ce=L.lines.get(ne);if(!Q||!ce)break;Q.replaceChildren(...this._rowFactory.createRow(ce,ne,ne===$,te,fe,q,G,this.dimensions.css.cell.width,this._widthCache,ie?oe===Y?U:0:-1,ie?(oe===V?H:X)-1:-1))}}};o.DomRenderer=F=u([_(7,C.IInstantiationService),_(8,b.ICharSizeService),_(9,C.IOptionsService),_(10,C.IBufferService),_(11,b.ICoreBrowserService),_(12,b.IThemeService)],F)},3787:function(a,o,l){var u=this&&this.__decorate||function(E,j,z,M){var O,B=arguments.length,F=B<3?j:M===null?M=Object.getOwnPropertyDescriptor(j,z):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(E,j,z,M);else for(var U=E.length-1;U>=0;U--)(O=E[U])&&(F=(B<3?O(F):B>3?O(j,z,F):O(j,z))||F);return B>3&&F&&Object.defineProperty(j,z,F),F},_=this&&this.__param||function(E,j){return function(z,M){j(z,M,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const f=l(2223),p=l(643),m=l(511),x=l(2585),S=l(8055),b=l(4725),v=l(4269),y=l(6171),w=l(3734);let C=o.DomRendererRowFactory=class{constructor(E,j,z,M,O,B,F){this._document=E,this._characterJoinerService=j,this._optionsService=z,this._coreBrowserService=M,this._coreService=O,this._decorationService=B,this._themeService=F,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,j,z){this._selectionStart=E,this._selectionEnd=j,this._columnSelectMode=z}createRow(E,j,z,M,O,B,F,U,H,Y,V){const X=[],ie=this._characterJoinerService.getJoinedCharacters(j),I=this._themeService.colors;let L,$=E.getNoBgTrimmedLength();z&&$0&&xe===ie[0][0]){Ze=!0;const We=ie.shift();Ie=new v.JoinedCellData(this._workCell,E.translateToString(!0,We[0],We[1]),We[1]-We[0]),Ue=We[1]-1,Te=Ie.getWidth()}const vt=this._isCellInSelection(xe,j),bt=z&&xe===B,It=he&&xe>=Y&&xe<=V;let Bt=!1;this._decorationService.forEachDecorationAtCell(xe,j,void 0,(We=>{Bt=!0}));let Et=Ie.getChars()||p.WHITESPACE_CELL_CHAR;if(Et===" "&&(Ie.isUnderline()||Ie.isOverline())&&(Et=" "),ee=Te*U-H.get(Et,Ie.isBold(),Ie.isItalic()),L){if(q&&(vt&&ce||!vt&&!ce&&Ie.bg===te)&&(vt&&ce&&I.selectionForeground||Ie.fg===fe)&&Ie.extended.ext===oe&&It===ne&&ee===Q&&!bt&&!Ze&&!Bt){Ie.isInvisible()?G+=p.WHITESPACE_CELL_CHAR:G+=Et,q++;continue}q&&(L.textContent=G),L=this._document.createElement("span"),q=0,G=""}else L=this._document.createElement("span");if(te=Ie.bg,fe=Ie.fg,oe=Ie.extended.ext,ne=It,Q=ee,ce=vt,Ze&&B>=xe&&B<=Ue&&(B=xe),!this._coreService.isCursorHidden&&bt&&this._coreService.isCursorInitialized){if(le.push("xterm-cursor"),this._coreBrowserService.isFocused)F&&le.push("xterm-cursor-blink"),le.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":le.push("xterm-cursor-outline");break;case"block":le.push("xterm-cursor-block");break;case"bar":le.push("xterm-cursor-bar");break;case"underline":le.push("xterm-cursor-underline")}}if(Ie.isBold()&&le.push("xterm-bold"),Ie.isItalic()&&le.push("xterm-italic"),Ie.isDim()&&le.push("xterm-dim"),G=Ie.isInvisible()?p.WHITESPACE_CELL_CHAR:Ie.getChars()||p.WHITESPACE_CELL_CHAR,Ie.isUnderline()&&(le.push(`xterm-underline-${Ie.extended.underlineStyle}`),G===" "&&(G=" "),!Ie.isUnderlineColorDefault()))if(Ie.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${w.AttributeData.toColorRGB(Ie.getUnderlineColor()).join(",")})`;else{let We=Ie.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ie.isBold()&&We<8&&(We+=8),L.style.textDecorationColor=I.ansi[We].css}Ie.isOverline()&&(le.push("xterm-overline"),G===" "&&(G=" ")),Ie.isStrikethrough()&&le.push("xterm-strikethrough"),It&&(L.style.textDecoration="underline");let rt=Ie.getFgColor(),ft=Ie.getFgColorMode(),Lt=Ie.getBgColor(),we=Ie.getBgColorMode();const Ae=!!Ie.isInverse();if(Ae){const We=rt;rt=Lt,Lt=We;const Ht=ft;ft=we,we=Ht}let Xe,dt,xt,Ut=!1;switch(this._decorationService.forEachDecorationAtCell(xe,j,void 0,(We=>{We.options.layer!=="top"&&Ut||(We.backgroundColorRGB&&(we=50331648,Lt=We.backgroundColorRGB.rgba>>8&16777215,Xe=We.backgroundColorRGB),We.foregroundColorRGB&&(ft=50331648,rt=We.foregroundColorRGB.rgba>>8&16777215,dt=We.foregroundColorRGB),Ut=We.options.layer==="top")})),!Ut&&vt&&(Xe=this._coreBrowserService.isFocused?I.selectionBackgroundOpaque:I.selectionInactiveBackgroundOpaque,Lt=Xe.rgba>>8&16777215,we=50331648,Ut=!0,I.selectionForeground&&(ft=50331648,rt=I.selectionForeground.rgba>>8&16777215,dt=I.selectionForeground)),Ut&&le.push("xterm-decoration-top"),we){case 16777216:case 33554432:xt=I.ansi[Lt],le.push(`xterm-bg-${Lt}`);break;case 50331648:xt=S.channels.toColor(Lt>>16,Lt>>8&255,255&Lt),this._addStyle(L,`background-color:#${N((Lt>>>0).toString(16),"0",6)}`);break;default:Ae?(xt=I.foreground,le.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):xt=I.background}switch(Xe||Ie.isDim()&&(Xe=S.color.multiplyOpacity(xt,.5)),ft){case 16777216:case 33554432:Ie.isBold()&&rt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(rt+=8),this._applyMinimumContrast(L,xt,I.ansi[rt],Ie,Xe,void 0)||le.push(`xterm-fg-${rt}`);break;case 50331648:const We=S.channels.toColor(rt>>16&255,rt>>8&255,255&rt);this._applyMinimumContrast(L,xt,We,Ie,Xe,dt)||this._addStyle(L,`color:#${N(rt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,xt,I.foreground,Ie,Xe,dt)||Ae&&le.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}le.length&&(L.className=le.join(" "),le.length=0),bt||Ze||Bt?L.textContent=G:q++,ee!==this.defaultSpacing&&(L.style.letterSpacing=`${ee}px`),X.push(L),xe=Ue}return L&&q&&(L.textContent=G),X}_applyMinimumContrast(E,j,z,M,O,B){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,y.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const F=this._getContrastCache(M);let U;if(O||B||(U=F.getColor(j.rgba,z.rgba)),U===void 0){const H=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);U=S.color.ensureContrastRatio(O||j,B||z,H),F.setColor((O||j).rgba,(B||z).rgba,U??null)}return!!U&&(this._addStyle(E,`color:${U.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,j){E.setAttribute("style",`${E.getAttribute("style")||""}${j};`)}_isCellInSelection(E,j){const z=this._selectionStart,M=this._selectionEnd;return!(!z||!M)&&(this._columnSelectMode?z[0]<=M[0]?E>=z[0]&&j>=z[1]&&E=z[1]&&E>=M[0]&&j<=M[1]:j>z[1]&&j=z[0]&&E=z[0])}};function N(E,j,z){for(;E.length{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(l,u){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=l.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const _=l.createElement("span");_.classList.add("xterm-char-measure-element");const f=l.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const p=l.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const m=l.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold",m.style.fontStyle="italic",this._measureElements=[_,f,p,m],this._container.appendChild(_),this._container.appendChild(f),this._container.appendChild(p),this._container.appendChild(m),u.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(l,u,_,f){l===this._font&&u===this._fontSize&&_===this._weight&&f===this._weightBold||(this._font=l,this._fontSize=u,this._weight=_,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(l,u,_){let f=0;if(!u&&!_&&l.length===1&&(f=l.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const x=this._measure(l,0);return x>0&&(this._flat[f]=x),x}let p=l;u&&(p+="B"),_&&(p+="I");let m=this._holey.get(p);if(m===void 0){let x=0;u&&(x|=1),_&&(x|=2),m=this._measure(l,x),m>0&&this._holey.set(p,m)}return m}_measure(l,u){const _=this._measureElements[u];return _.textContent=l.repeat(32),_.offsetWidth/32}}},2223:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const u=l(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=u.isFirefox||u.isLegacyEdge?"bottom":"ideographic"},6171:(a,o)=>{function l(_){return 57508<=_&&_<=57558}function u(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},o.isPowerlineGlyph=l,o.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},o.isEmoji=u,o.allowRescaling=function(_,f,p,m){return f===1&&p>Math.ceil(1.5*m)&&_!==void 0&&_>255&&!u(_)&&!l(_)&&!(function(x){return 57344<=x&&x<=63743})(_)},o.treatGlyphAsBackgroundColor=function(_){return l(_)||(function(f){return 9472<=f&&f<=9631})(_)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},o.computeNextVariantOffset=function(_,f,p=0){return(_-(2*Math.round(f)-p))%(2*Math.round(f))}},6052:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class l{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(_,f,p,m=!1){if(this.selectionStart=f,this.selectionEnd=p,!f||!p||f[0]===p[0]&&f[1]===p[1])return void this.clear();const x=_.buffers.active.ydisp,S=f[1]-x,b=p[1]-x,v=Math.max(S,0),y=Math.min(b,_.rows-1);v>=_.rows||y<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=S,this.viewportEndRow=b,this.viewportCappedStartRow=v,this.viewportCappedEndRow=y,this.startCol=f[0],this.endCol=p[0])}isCellSelected(_,f,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&p>=this.viewportCappedStartRow&&f=this.viewportCappedStartRow&&f>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p=this.startCol&&f=this.startCol)}}o.createSelectionRenderModel=function(){return new l}},456:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(l){this._bufferService=l,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?l%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)-1]:[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[l,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const l=this.selectionStart[0]+this.selectionStartLength;return l>this._bufferService.cols?[l%this._bufferService.cols,this.selectionStart[1]+Math.floor(l/this._bufferService.cols)]:[Math.max(l,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const l=this.selectionStart,u=this.selectionEnd;return!(!l||!u)&&(l[1]>u[1]||l[1]===u[1]&&l[0]>u[0])}handleTrim(l){return this.selectionStart&&(this.selectionStart[1]-=l),this.selectionEnd&&(this.selectionEnd[1]-=l),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(a,o,l){var u=this&&this.__decorate||function(y,w,C,N){var E,j=arguments.length,z=j<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,w,C,N);else for(var M=y.length-1;M>=0;M--)(E=y[M])&&(z=(j<3?E(z):j>3?E(w,C,z):E(w,C))||z);return j>3&&z&&Object.defineProperty(w,C,z),z},_=this&&this.__param||function(y,w){return function(C,N){w(C,N,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const f=l(2585),p=l(8460),m=l(844);let x=o.CharSizeService=class extends m.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(y,w,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new v(this._optionsService))}catch{this._measureStrategy=this.register(new b(y,w,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const y=this._measureStrategy.measure();y.width===this.width&&y.height===this.height||(this.width=y.width,this.height=y.height,this._onCharSizeChange.fire())}};o.CharSizeService=x=u([_(2,f.IOptionsService)],x);class S extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(w,C){w!==void 0&&w>0&&C!==void 0&&C>0&&(this._result.width=w,this._result.height=C)}}class b extends S{constructor(w,C,N){super(),this._document=w,this._parentElement=C,this._optionsService=N,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class v extends S{constructor(w){super(),this._optionsService=w,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const C=this._ctx.measureText("W");if(!("width"in C&&"fontBoundingBoxAscent"in C&&"fontBoundingBoxDescent"in C))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const w=this._ctx.measureText("W");return this._validateAndSet(w.width,w.fontBoundingBoxAscent+w.fontBoundingBoxDescent),this._result}}},4269:function(a,o,l){var u=this&&this.__decorate||function(v,y,w,C){var N,E=arguments.length,j=E<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,w):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,y,w,C);else for(var z=v.length-1;z>=0;z--)(N=v[z])&&(j=(E<3?N(j):E>3?N(y,w,j):N(y,w))||j);return E>3&&j&&Object.defineProperty(y,w,j),j},_=this&&this.__param||function(v,y){return function(w,C){y(w,C,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const f=l(3734),p=l(643),m=l(511),x=l(2585);class S extends f.AttributeData{constructor(y,w,C){super(),this.content=0,this.combinedData="",this.fg=y.fg,this.bg=y.bg,this.combinedData=w,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(y){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=S;let b=o.CharacterJoinerService=class nO{constructor(y){this._bufferService=y,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(y){const w={id:this._nextCharacterJoinerId++,handler:y};return this._characterJoiners.push(w),w.id}deregister(y){for(let w=0;w1){const F=this._getJoinedRanges(N,z,j,w,E);for(let U=0;U1){const B=this._getJoinedRanges(N,z,j,w,E);for(let F=0;F{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=l(844),_=l(8460),f=l(3656);class p extends u.Disposable{constructor(S,b,v){super(),this._textarea=S,this._window=b,this.mainDocument=v,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((y=>this._screenDprMonitor.setWindow(y)))),this.register((0,_.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(S){this._window!==S&&(this._window=S,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}o.CoreBrowserService=p;class m extends u.Disposable{constructor(S){super(),this._parentWindow=S,this._windowResizeListener=this.register(new u.MutableDisposable),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,u.toDisposable)((()=>this.clearListener())))}setWindow(S){this._parentWindow=S,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var S;this._outerListener&&((S=this._resolutionMediaMatchList)==null||S.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const u=l(844);class _ extends u.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,u.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const m=this.linkProviders.indexOf(p);m!==-1&&this.linkProviders.splice(m,1)}}}}o.LinkProviderService=_},8934:function(a,o,l){var u=this&&this.__decorate||function(x,S,b,v){var y,w=arguments.length,C=w<3?S:v===null?v=Object.getOwnPropertyDescriptor(S,b):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(x,S,b,v);else for(var N=x.length-1;N>=0;N--)(y=x[N])&&(C=(w<3?y(C):w>3?y(S,b,C):y(S,b))||C);return w>3&&C&&Object.defineProperty(S,b,C),C},_=this&&this.__param||function(x,S){return function(b,v){S(b,v,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const f=l(4725),p=l(9806);let m=o.MouseService=class{constructor(x,S){this._renderService=x,this._charSizeService=S}getCoords(x,S,b,v,y){return(0,p.getCoords)(window,x,S,b,v,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,y)}getMouseReportCoords(x,S){const b=(0,p.getCoordsRelativeToElement)(window,x,S);if(this._charSizeService.hasValidSize)return b[0]=Math.min(Math.max(b[0],0),this._renderService.dimensions.css.canvas.width-1),b[1]=Math.min(Math.max(b[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(b[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(b[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(b[0]),y:Math.floor(b[1])}}};o.MouseService=m=u([_(0,f.IRenderService),_(1,f.ICharSizeService)],m)},3230:function(a,o,l){var u=this&&this.__decorate||function(y,w,C,N){var E,j=arguments.length,z=j<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,w,C,N);else for(var M=y.length-1;M>=0;M--)(E=y[M])&&(z=(j<3?E(z):j>3?E(w,C,z):E(w,C))||z);return j>3&&z&&Object.defineProperty(w,C,z),z},_=this&&this.__param||function(y,w){return function(C,N){w(C,N,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const f=l(6193),p=l(4725),m=l(8460),x=l(844),S=l(7226),b=l(2585);let v=o.RenderService=class extends x.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(y,w,C,N,E,j,z,M){super(),this._rowCount=y,this._charSizeService=N,this._renderer=this.register(new x.MutableDisposable),this._pausedResizeTask=new S.DebouncedIdleTask,this._observerDisposable=this.register(new x.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new m.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new m.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new m.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new m.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((O,B)=>this._renderRows(O,B)),z),this.register(this._renderDebouncer),this.register(z.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(j.onResize((()=>this._fullRefresh()))),this.register(j.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(E.onDecorationRegistered((()=>this._fullRefresh()))),this.register(E.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(j.cols,j.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(j.buffer.y,j.buffer.y,!0)))),this.register(M.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(z.window,w),this.register(z.onWindowChange((O=>this._registerIntersectionObserver(O,w))))}_registerIntersectionObserver(y,w){if("IntersectionObserver"in y){const C=new y.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(w),this._observerDisposable.value=(0,x.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(y){this._isPaused=y.isIntersecting===void 0?y.intersectionRatio===0:!y.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(y,w,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(y,w,this._rowCount))}_renderRows(y,w){this._renderer.value&&(y=Math.min(y,this._rowCount-1),w=Math.min(w,this._rowCount-1),this._renderer.value.renderRows(y,w),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:y,end:w}),this._onRender.fire({start:y,end:w}),this._isNextRenderRedrawOnly=!0)}resize(y,w){this._rowCount=w,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(y){this._renderer.value=y,this._renderer.value&&(this._renderer.value.onRequestRedraw((w=>this.refreshRows(w.start,w.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(y){return this._renderDebouncer.addRefreshCallback(y)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var y,w;this._renderer.value&&((w=(y=this._renderer.value).clearTextureAtlas)==null||w.call(y),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(y,w){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(y,w)})):this._renderer.value.handleResize(y,w),this._fullRefresh())}handleCharSizeChanged(){var y;(y=this._renderer.value)==null||y.handleCharSizeChanged()}handleBlur(){var y;(y=this._renderer.value)==null||y.handleBlur()}handleFocus(){var y;(y=this._renderer.value)==null||y.handleFocus()}handleSelectionChanged(y,w,C){var N;this._selectionState.start=y,this._selectionState.end=w,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(y,w,C)}handleCursorMove(){var y;(y=this._renderer.value)==null||y.handleCursorMove()}clear(){var y;(y=this._renderer.value)==null||y.clear()}};o.RenderService=v=u([_(2,b.IOptionsService),_(3,p.ICharSizeService),_(4,b.IDecorationService),_(5,b.IBufferService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],v)},9312:function(a,o,l){var u=this&&this.__decorate||function(z,M,O,B){var F,U=arguments.length,H=U<3?M:B===null?B=Object.getOwnPropertyDescriptor(M,O):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(z,M,O,B);else for(var Y=z.length-1;Y>=0;Y--)(F=z[Y])&&(H=(U<3?F(H):U>3?F(M,O,H):F(M,O))||H);return U>3&&H&&Object.defineProperty(M,O,H),H},_=this&&this.__param||function(z,M){return function(O,B){M(O,B,z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const f=l(9806),p=l(9504),m=l(456),x=l(4725),S=l(8460),b=l(844),v=l(6114),y=l(4841),w=l(511),C=l(2585),N=" ",E=new RegExp(N,"g");let j=o.SelectionService=class extends b.Disposable{constructor(z,M,O,B,F,U,H,Y,V){super(),this._element=z,this._screenElement=M,this._linkifier=O,this._bufferService=B,this._coreService=F,this._mouseService=U,this._optionsService=H,this._renderService=Y,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new w.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new S.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new S.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new S.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=X=>this._handleMouseMove(X),this._mouseUpListener=X=>this._handleMouseUp(X),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((X=>this._handleTrim(X))),this.register(this._bufferService.buffers.onBufferActivate((X=>this._handleBufferActivate(X)))),this.enable(),this._model=new m.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,b.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!z||!M||z[0]===M[0]&&z[1]===M[1])}get selectionText(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!z||!M)return"";const O=this._bufferService.buffer,B=[];if(this._activeSelectionMode===3){if(z[0]===M[0])return"";const F=z[0]F.replace(E," "))).join(v.isWindows?`\r +`:` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(z){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),v.isLinux&&z&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(z){const M=this._getMouseBufferCoords(z),O=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!!(O&&B&&M)&&this._areCoordsInSelection(M,O,B)}isCellInSelection(z,M){const O=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!O||!B)&&this._areCoordsInSelection([z,M],O,B)}_areCoordsInSelection(z,M,O){return z[1]>M[1]&&z[1]=M[0]&&z[0]=M[0]}_selectWordAtCursor(z,M){var F,U;const O=(U=(F=this._linkifier.currentLink)==null?void 0:F.link)==null?void 0:U.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const B=this._getMouseBufferCoords(z);return!!B&&(this._selectWordAt(B,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(z,M){this._model.clearSelection(),z=Math.max(z,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,z],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(z){this._model.handleTrim(z)&&this.refresh()}_getMouseBufferCoords(z){const M=this._mouseService.getCoords(z,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(z){let M=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,z,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=O?0:(M>O&&(M-=O),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(z){return v.isMac?z.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:z.shiftKey}handleMouseDown(z){if(this._mouseDownTimeStamp=z.timeStamp,(z.button!==2||!this.hasSelection)&&z.button===0){if(!this._enabled){if(!this.shouldForceSelection(z))return;z.stopPropagation()}z.preventDefault(),this._dragScrollAmount=0,this._enabled&&z.shiftKey?this._handleIncrementalClick(z):z.detail===1?this._handleSingleClick(z):z.detail===2?this._handleDoubleClick(z):z.detail===3&&this._handleTripleClick(z),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(z){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(z))}_handleSingleClick(z){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(z)?3:0,this._model.selectionStart=this._getMouseBufferCoords(z),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(z){this._selectWordAtCursor(z,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(z){const M=this._getMouseBufferCoords(z);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(z){return z.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(z){if(z.stopImmediatePropagation(),!this._model.selectionStart)return;const M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(z),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const O=this._bufferService.buffer;if(this._model.selectionEnd[1]0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(z.ydisp+this._bufferService.rows,z.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=z.ydisp),this.refresh()}}_handleMouseUp(z){const M=z.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&z.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(z,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const B=(0,p.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(B,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,O=!(!z||!M||z[0]===M[0]&&z[1]===M[1]);O?z&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&z[0]===this._oldSelectionStart[0]&&z[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(z,M,O)):this._oldHasSelection&&this._fireOnSelectionChange(z,M,O)}_fireOnSelectionChange(z,M,O){this._oldSelectionStart=z,this._oldSelectionEnd=M,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(z){this.clearSelection(),this._trimListener.dispose(),this._trimListener=z.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(z,M){let O=M;for(let B=0;M>=B;B++){const F=z.loadCell(B,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:F>1&&M!==B&&(O+=F-1)}return O}setSelection(z,M,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[z,M],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(z){this._isClickInSelection(z)||(this._selectWordAtCursor(z,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(z,M,O=!0,B=!0){if(z[0]>=this._bufferService.cols)return;const F=this._bufferService.buffer,U=F.lines.get(z[1]);if(!U)return;const H=F.translateBufferLineToString(z[1],!1);let Y=this._convertViewportColToCharacterIndex(U,z[0]),V=Y;const X=z[0]-Y;let ie=0,I=0,L=0,$=0;if(H.charAt(Y)===" "){for(;Y>0&&H.charAt(Y-1)===" ";)Y--;for(;V1&&($+=oe-1,V+=oe-1);te>0&&Y>0&&!this._isCharWordSeparator(U.loadCell(te-1,this._workCell));){U.loadCell(te-1,this._workCell);const ne=this._workCell.getChars().length;this._workCell.getWidth()===0?(ie++,te--):ne>1&&(L+=ne-1,Y-=ne-1),Y--,te--}for(;fe1&&($+=ne-1,V+=ne-1),V++,fe++}}V++;let q=Y+X-ie+L,G=Math.min(this._bufferService.cols,V-Y+ie+I-L-$);if(M||H.slice(Y,V).trim()!==""){if(O&&q===0&&U.getCodePoint(0)!==32){const te=F.lines.get(z[1]-1);if(te&&U.isWrapped&&te.getCodePoint(this._bufferService.cols-1)!==32){const fe=this._getWordAt([this._bufferService.cols-1,z[1]-1],!1,!0,!1);if(fe){const oe=this._bufferService.cols-fe.start;q-=oe,G+=oe}}}if(B&&q+G===this._bufferService.cols&&U.getCodePoint(this._bufferService.cols-1)!==32){const te=F.lines.get(z[1]+1);if(te!=null&&te.isWrapped&&te.getCodePoint(0)!==32){const fe=this._getWordAt([0,z[1]+1],!1,!1,!0);fe&&(G+=fe.length)}}return{start:q,length:G}}}_selectWordAt(z,M){const O=this._getWordAt(z,M);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,z[1]--;this._model.selectionStart=[O.start,z[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(z){const M=this._getWordAt(z,!0);if(M){let O=z[1];for(;M.start<0;)M.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,O]}}_isCharWordSeparator(z){return z.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(z.getChars())>=0}_selectLineAt(z){const M=this._bufferService.buffer.getWrappedRangeForLine(z),O={start:{x:0,y:M.first},end:{x:this._bufferService.cols-1,y:M.last}};this._model.selectionStart=[0,M.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,y.getRangeLength)(O,this._bufferService.cols)}};o.SelectionService=j=u([_(3,C.IBufferService),_(4,C.ICoreService),_(5,x.IMouseService),_(6,C.IOptionsService),_(7,x.IRenderService),_(8,x.ICoreBrowserService)],j)},4725:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const u=l(8343);o.ICharSizeService=(0,u.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,u.createDecorator)("CoreBrowserService"),o.IMouseService=(0,u.createDecorator)("MouseService"),o.IRenderService=(0,u.createDecorator)("RenderService"),o.ISelectionService=(0,u.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,u.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,u.createDecorator)("ThemeService"),o.ILinkProviderService=(0,u.createDecorator)("LinkProviderService")},6731:function(a,o,l){var u=this&&this.__decorate||function(j,z,M,O){var B,F=arguments.length,U=F<3?z:O===null?O=Object.getOwnPropertyDescriptor(z,M):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(j,z,M,O);else for(var H=j.length-1;H>=0;H--)(B=j[H])&&(U=(F<3?B(U):F>3?B(z,M,U):B(z,M))||U);return F>3&&U&&Object.defineProperty(z,M,U),U},_=this&&this.__param||function(j,z){return function(M,O){z(M,O,j)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const f=l(7239),p=l(8055),m=l(8460),x=l(844),S=l(2585),b=p.css.toColor("#ffffff"),v=p.css.toColor("#000000"),y=p.css.toColor("#ffffff"),w=p.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const j=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],z=[0,95,135,175,215,255];for(let M=0;M<216;M++){const O=z[M/36%6|0],B=z[M/6%6|0],F=z[M%6];j.push({css:p.channels.toCss(O,B,F),rgba:p.channels.toRgba(O,B,F)})}for(let M=0;M<24;M++){const O=8+10*M;j.push({css:p.channels.toCss(O,O,O),rgba:p.channels.toRgba(O,O,O)})}return j})());let N=o.ThemeService=class extends x.Disposable{get colors(){return this._colors}constructor(j){super(),this._optionsService=j,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new m.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:b,background:v,cursor:y,cursorAccent:w,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(v,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(v,C),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(j={}){const z=this._colors;if(z.foreground=E(j.foreground,b),z.background=E(j.background,v),z.cursor=E(j.cursor,y),z.cursorAccent=E(j.cursorAccent,w),z.selectionBackgroundTransparent=E(j.selectionBackground,C),z.selectionBackgroundOpaque=p.color.blend(z.background,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundTransparent=E(j.selectionInactiveBackground,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundOpaque=p.color.blend(z.background,z.selectionInactiveBackgroundTransparent),z.selectionForeground=j.selectionForeground?E(j.selectionForeground,p.NULL_COLOR):void 0,z.selectionForeground===p.NULL_COLOR&&(z.selectionForeground=void 0),p.color.isOpaque(z.selectionBackgroundTransparent)&&(z.selectionBackgroundTransparent=p.color.opacity(z.selectionBackgroundTransparent,.3)),p.color.isOpaque(z.selectionInactiveBackgroundTransparent)&&(z.selectionInactiveBackgroundTransparent=p.color.opacity(z.selectionInactiveBackgroundTransparent,.3)),z.ansi=o.DEFAULT_ANSI_COLORS.slice(),z.ansi[0]=E(j.black,o.DEFAULT_ANSI_COLORS[0]),z.ansi[1]=E(j.red,o.DEFAULT_ANSI_COLORS[1]),z.ansi[2]=E(j.green,o.DEFAULT_ANSI_COLORS[2]),z.ansi[3]=E(j.yellow,o.DEFAULT_ANSI_COLORS[3]),z.ansi[4]=E(j.blue,o.DEFAULT_ANSI_COLORS[4]),z.ansi[5]=E(j.magenta,o.DEFAULT_ANSI_COLORS[5]),z.ansi[6]=E(j.cyan,o.DEFAULT_ANSI_COLORS[6]),z.ansi[7]=E(j.white,o.DEFAULT_ANSI_COLORS[7]),z.ansi[8]=E(j.brightBlack,o.DEFAULT_ANSI_COLORS[8]),z.ansi[9]=E(j.brightRed,o.DEFAULT_ANSI_COLORS[9]),z.ansi[10]=E(j.brightGreen,o.DEFAULT_ANSI_COLORS[10]),z.ansi[11]=E(j.brightYellow,o.DEFAULT_ANSI_COLORS[11]),z.ansi[12]=E(j.brightBlue,o.DEFAULT_ANSI_COLORS[12]),z.ansi[13]=E(j.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),z.ansi[14]=E(j.brightCyan,o.DEFAULT_ANSI_COLORS[14]),z.ansi[15]=E(j.brightWhite,o.DEFAULT_ANSI_COLORS[15]),j.extendedAnsi){const M=Math.min(z.ansi.length-16,j.extendedAnsi.length);for(let O=0;O{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const u=l(8460),_=l(844);class f extends _.Disposable{constructor(m){super(),this._maxLength=m,this.onDeleteEmitter=this.register(new u.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new u.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new u.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(m){if(this._maxLength===m)return;const x=new Array(m);for(let S=0;Sthis._length)for(let x=this._length;x=m;b--)this._array[this._getCyclicIndex(b+S.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;bthis._maxLength){const b=this._length+S.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=S.length}trimStart(m){m>this._length&&(m=this._length),this._startIndex+=m,this._length-=m,this.onTrimEmitter.fire(m)}shiftElements(m,x,S){if(!(x<=0)){if(m<0||m>=this._length)throw new Error("start argument out of range");if(m+S<0)throw new Error("Cannot shift elements in list beyond index 0");if(S>0){for(let v=x-1;v>=0;v--)this.set(m+v+S,this.get(m+v));const b=m+x+S-this._length;if(b>0)for(this._length+=b;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let b=0;b{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function l(u,_=5){if(typeof u!="object")return u;const f=Array.isArray(u)?[]:{};for(const p in u)f[p]=_<=1?u[p]:u[p]&&l(u[p],_-1);return f}},8055:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let l=0,u=0,_=0,f=0;var p,m,x,S,b;function v(w){const C=w.toString(16);return C.length<2?"0"+C:C}function y(w,C){return w>>0},w.toColor=function(C,N,E,j){return{css:w.toCss(C,N,E,j),rgba:w.toRgba(C,N,E,j)}}})(p||(o.channels=p={})),(function(w){function C(N,E){return f=Math.round(255*E),[l,u,_]=b.toChannels(N.rgba),{css:p.toCss(l,u,_,f),rgba:p.toRgba(l,u,_,f)}}w.blend=function(N,E){if(f=(255&E.rgba)/255,f===1)return{css:E.css,rgba:E.rgba};const j=E.rgba>>24&255,z=E.rgba>>16&255,M=E.rgba>>8&255,O=N.rgba>>24&255,B=N.rgba>>16&255,F=N.rgba>>8&255;return l=O+Math.round((j-O)*f),u=B+Math.round((z-B)*f),_=F+Math.round((M-F)*f),{css:p.toCss(l,u,_),rgba:p.toRgba(l,u,_)}},w.isOpaque=function(N){return(255&N.rgba)==255},w.ensureContrastRatio=function(N,E,j){const z=b.ensureContrastRatio(N.rgba,E.rgba,j);if(z)return p.toColor(z>>24&255,z>>16&255,z>>8&255)},w.opaque=function(N){const E=(255|N.rgba)>>>0;return[l,u,_]=b.toChannels(E),{css:p.toCss(l,u,_),rgba:E}},w.opacity=C,w.multiplyOpacity=function(N,E){return f=255&N.rgba,C(N,f*E/255)},w.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(w){let C,N;try{const E=document.createElement("canvas");E.width=1,E.height=1;const j=E.getContext("2d",{willReadFrequently:!0});j&&(C=j,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}w.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return l=parseInt(E.slice(1,2).repeat(2),16),u=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),p.toColor(l,u,_);case 5:return l=parseInt(E.slice(1,2).repeat(2),16),u=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),f=parseInt(E.slice(4,5).repeat(2),16),p.toColor(l,u,_,f);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const j=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(j)return l=parseInt(j[1]),u=parseInt(j[2]),_=parseInt(j[3]),f=Math.round(255*(j[5]===void 0?1:parseFloat(j[5]))),p.toColor(l,u,_,f);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=E,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[l,u,_,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(l,u,_,f),css:E}}})(x||(o.css=x={})),(function(w){function C(N,E,j){const z=N/255,M=E/255,O=j/255;return .2126*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}w.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},w.relativeLuminance2=C})(S||(o.rgb=S={})),(function(w){function C(E,j,z){const M=E>>24&255,O=E>>16&255,B=E>>8&255;let F=j>>24&255,U=j>>16&255,H=j>>8&255,Y=y(S.relativeLuminance2(F,U,H),S.relativeLuminance2(M,O,B));for(;Y0||U>0||H>0);)F-=Math.max(0,Math.ceil(.1*F)),U-=Math.max(0,Math.ceil(.1*U)),H-=Math.max(0,Math.ceil(.1*H)),Y=y(S.relativeLuminance2(F,U,H),S.relativeLuminance2(M,O,B));return(F<<24|U<<16|H<<8|255)>>>0}function N(E,j,z){const M=E>>24&255,O=E>>16&255,B=E>>8&255;let F=j>>24&255,U=j>>16&255,H=j>>8&255,Y=y(S.relativeLuminance2(F,U,H),S.relativeLuminance2(M,O,B));for(;Y>>0}w.blend=function(E,j){if(f=(255&j)/255,f===1)return j;const z=j>>24&255,M=j>>16&255,O=j>>8&255,B=E>>24&255,F=E>>16&255,U=E>>8&255;return l=B+Math.round((z-B)*f),u=F+Math.round((M-F)*f),_=U+Math.round((O-U)*f),p.toRgba(l,u,_)},w.ensureContrastRatio=function(E,j,z){const M=S.relativeLuminance(E>>8),O=S.relativeLuminance(j>>8);if(y(M,O)>8));if(Hy(M,S.relativeLuminance(Y>>8))?U:Y}return U}const B=N(E,j,z),F=y(M,S.relativeLuminance(B>>8));if(Fy(M,S.relativeLuminance(U>>8))?B:U}return B}},w.reduceLuminance=C,w.increaseLuminance=N,w.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}})(b||(o.rgba=b={})),o.toPaddedHex=v,o.contrastRatio=y},8969:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=l(844),_=l(2585),f=l(4348),p=l(7866),m=l(744),x=l(7302),S=l(6975),b=l(8460),v=l(1753),y=l(1480),w=l(7994),C=l(9282),N=l(5435),E=l(5981),j=l(2660);let z=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new b.EventEmitter),this._onScroll.event((B=>{var F;(F=this._onScrollApi)==null||F.fire(B.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(B){for(const F in B)this.optionsService.options[F]=B[F]}constructor(B){super(),this._windowsWrappingHeuristics=this.register(new u.MutableDisposable),this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new b.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new b.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new b.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new x.OptionsService(B)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(S.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(y.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(w.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(j.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new N.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,b.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,b.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,b.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,b.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((F=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((F=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new E.WriteBuffer(((F,U)=>this._inputHandler.parse(F,U)))),this.register((0,b.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(B,F){this._writeBuffer.write(B,F)}writeSync(B,F){this._logService.logLevel<=_.LogLevelEnum.WARN&&!z&&(this._logService.warn("writeSync is unreliable and will be removed soon."),z=!0),this._writeBuffer.writeSync(B,F)}input(B,F=!0){this.coreService.triggerDataEvent(B,F)}resize(B,F){isNaN(B)||isNaN(F)||(B=Math.max(B,m.MINIMUM_COLS),F=Math.max(F,m.MINIMUM_ROWS),this._bufferService.resize(B,F))}scroll(B,F=!1){this._bufferService.scroll(B,F)}scrollLines(B,F,U){this._bufferService.scrollLines(B,F,U)}scrollPages(B){this.scrollLines(B*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(B){const F=B-this._bufferService.buffer.ydisp;F!==0&&this.scrollLines(F)}registerEscHandler(B,F){return this._inputHandler.registerEscHandler(B,F)}registerDcsHandler(B,F){return this._inputHandler.registerDcsHandler(B,F)}registerCsiHandler(B,F){return this._inputHandler.registerCsiHandler(B,F)}registerOscHandler(B,F){return this._inputHandler.registerOscHandler(B,F)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let B=!1;const F=this.optionsService.rawOptions.windowsPty;F&&F.buildNumber!==void 0&&F.buildNumber!==void 0?B=F.backend==="conpty"&&F.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(B=!0),B?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const B=[];B.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),B.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const F of B)F.dispose()}))}}}o.CoreTerminal=M},8460:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=l=>(this._listeners.push(l),{dispose:()=>{if(!this._disposed){for(let u=0;uu.fire(_)))},o.runAndSubscribe=function(l,u){return u(void 0),l((_=>u(_)))}},5435:function(a,o,l){var u=this&&this.__decorate||function(ie,I,L,$){var q,G=arguments.length,te=G<3?I:$===null?$=Object.getOwnPropertyDescriptor(I,L):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")te=Reflect.decorate(ie,I,L,$);else for(var fe=ie.length-1;fe>=0;fe--)(q=ie[fe])&&(te=(G<3?q(te):G>3?q(I,L,te):q(I,L))||te);return G>3&&te&&Object.defineProperty(I,L,te),te},_=this&&this.__param||function(ie,I){return function(L,$){I(L,$,ie)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const f=l(2584),p=l(7116),m=l(2015),x=l(844),S=l(482),b=l(8437),v=l(8460),y=l(643),w=l(511),C=l(3734),N=l(2585),E=l(1480),j=l(6242),z=l(6351),M=l(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},B=131072;function F(ie,I){if(ie>24)return I.setWinLines||!1;switch(ie){case 1:return!!I.restoreWin;case 2:return!!I.minimizeWin;case 3:return!!I.setWinPosition;case 4:return!!I.setWinSizePixels;case 5:return!!I.raiseWin;case 6:return!!I.lowerWin;case 7:return!!I.refreshWin;case 8:return!!I.setWinSizeChars;case 9:return!!I.maximizeWin;case 10:return!!I.fullscreenWin;case 11:return!!I.getWinState;case 13:return!!I.getWinPosition;case 14:return!!I.getWinSizePixels;case 15:return!!I.getScreenSizePixels;case 16:return!!I.getCellSizePixels;case 18:return!!I.getWinSizeChars;case 19:return!!I.getScreenSizeChars;case 20:return!!I.getIconTitle;case 21:return!!I.getWinTitle;case 22:return!!I.pushTitle;case 23:return!!I.popTitle;case 24:return!!I.setWinLines}return!1}var U;(function(ie){ie[ie.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ie[ie.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(U||(o.WindowsOptionsReportType=U={}));let H=0;class Y extends x.Disposable{getAttrData(){return this._curAttrData}constructor(I,L,$,q,G,te,fe,oe,ne=new m.EscapeSequenceParser){super(),this._bufferService=I,this._charsetService=L,this._coreService=$,this._logService=q,this._optionsService=G,this._oscLinkService=te,this._coreMouseService=fe,this._unicodeService=oe,this._parser=ne,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new S.StringToUtf32,this._utf8Decoder=new S.Utf8ToUtf32,this._workCell=new w.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new V(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((Q=>this._activeBuffer=Q.activeBuffer))),this._parser.setCsiHandlerFallback(((Q,ce)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(Q),params:ce.toArray()})})),this._parser.setEscHandlerFallback((Q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(Q)})})),this._parser.setExecuteHandlerFallback((Q=>{this._logService.debug("Unknown EXECUTE code: ",{code:Q})})),this._parser.setOscHandlerFallback(((Q,ce,ee)=>{this._logService.debug("Unknown OSC code: ",{identifier:Q,action:ce,data:ee})})),this._parser.setDcsHandlerFallback(((Q,ce,ee)=>{ce==="HOOK"&&(ee=ee.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(Q),action:ce,payload:ee})})),this._parser.setPrintHandler(((Q,ce,ee)=>this.print(Q,ce,ee))),this._parser.registerCsiHandler({final:"@"},(Q=>this.insertChars(Q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(Q=>this.scrollLeft(Q))),this._parser.registerCsiHandler({final:"A"},(Q=>this.cursorUp(Q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(Q=>this.scrollRight(Q))),this._parser.registerCsiHandler({final:"B"},(Q=>this.cursorDown(Q))),this._parser.registerCsiHandler({final:"C"},(Q=>this.cursorForward(Q))),this._parser.registerCsiHandler({final:"D"},(Q=>this.cursorBackward(Q))),this._parser.registerCsiHandler({final:"E"},(Q=>this.cursorNextLine(Q))),this._parser.registerCsiHandler({final:"F"},(Q=>this.cursorPrecedingLine(Q))),this._parser.registerCsiHandler({final:"G"},(Q=>this.cursorCharAbsolute(Q))),this._parser.registerCsiHandler({final:"H"},(Q=>this.cursorPosition(Q))),this._parser.registerCsiHandler({final:"I"},(Q=>this.cursorForwardTab(Q))),this._parser.registerCsiHandler({final:"J"},(Q=>this.eraseInDisplay(Q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(Q=>this.eraseInDisplay(Q,!0))),this._parser.registerCsiHandler({final:"K"},(Q=>this.eraseInLine(Q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(Q=>this.eraseInLine(Q,!0))),this._parser.registerCsiHandler({final:"L"},(Q=>this.insertLines(Q))),this._parser.registerCsiHandler({final:"M"},(Q=>this.deleteLines(Q))),this._parser.registerCsiHandler({final:"P"},(Q=>this.deleteChars(Q))),this._parser.registerCsiHandler({final:"S"},(Q=>this.scrollUp(Q))),this._parser.registerCsiHandler({final:"T"},(Q=>this.scrollDown(Q))),this._parser.registerCsiHandler({final:"X"},(Q=>this.eraseChars(Q))),this._parser.registerCsiHandler({final:"Z"},(Q=>this.cursorBackwardTab(Q))),this._parser.registerCsiHandler({final:"`"},(Q=>this.charPosAbsolute(Q))),this._parser.registerCsiHandler({final:"a"},(Q=>this.hPositionRelative(Q))),this._parser.registerCsiHandler({final:"b"},(Q=>this.repeatPrecedingCharacter(Q))),this._parser.registerCsiHandler({final:"c"},(Q=>this.sendDeviceAttributesPrimary(Q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(Q=>this.sendDeviceAttributesSecondary(Q))),this._parser.registerCsiHandler({final:"d"},(Q=>this.linePosAbsolute(Q))),this._parser.registerCsiHandler({final:"e"},(Q=>this.vPositionRelative(Q))),this._parser.registerCsiHandler({final:"f"},(Q=>this.hVPosition(Q))),this._parser.registerCsiHandler({final:"g"},(Q=>this.tabClear(Q))),this._parser.registerCsiHandler({final:"h"},(Q=>this.setMode(Q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(Q=>this.setModePrivate(Q))),this._parser.registerCsiHandler({final:"l"},(Q=>this.resetMode(Q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(Q=>this.resetModePrivate(Q))),this._parser.registerCsiHandler({final:"m"},(Q=>this.charAttributes(Q))),this._parser.registerCsiHandler({final:"n"},(Q=>this.deviceStatus(Q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(Q=>this.deviceStatusPrivate(Q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(Q=>this.softReset(Q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(Q=>this.setCursorStyle(Q))),this._parser.registerCsiHandler({final:"r"},(Q=>this.setScrollRegion(Q))),this._parser.registerCsiHandler({final:"s"},(Q=>this.saveCursor(Q))),this._parser.registerCsiHandler({final:"t"},(Q=>this.windowOptions(Q))),this._parser.registerCsiHandler({final:"u"},(Q=>this.restoreCursor(Q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(Q=>this.insertColumns(Q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(Q=>this.deleteColumns(Q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(Q=>this.selectProtected(Q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(Q=>this.requestMode(Q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(Q=>this.requestMode(Q,!1))),this._parser.setExecuteHandler(f.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(f.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(f.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(f.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(f.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(f.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(f.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(f.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(f.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(f.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new j.OscHandler((Q=>(this.setTitle(Q),this.setIconName(Q),!0)))),this._parser.registerOscHandler(1,new j.OscHandler((Q=>this.setIconName(Q)))),this._parser.registerOscHandler(2,new j.OscHandler((Q=>this.setTitle(Q)))),this._parser.registerOscHandler(4,new j.OscHandler((Q=>this.setOrReportIndexedColor(Q)))),this._parser.registerOscHandler(8,new j.OscHandler((Q=>this.setHyperlink(Q)))),this._parser.registerOscHandler(10,new j.OscHandler((Q=>this.setOrReportFgColor(Q)))),this._parser.registerOscHandler(11,new j.OscHandler((Q=>this.setOrReportBgColor(Q)))),this._parser.registerOscHandler(12,new j.OscHandler((Q=>this.setOrReportCursorColor(Q)))),this._parser.registerOscHandler(104,new j.OscHandler((Q=>this.restoreIndexedColor(Q)))),this._parser.registerOscHandler(110,new j.OscHandler((Q=>this.restoreFgColor(Q)))),this._parser.registerOscHandler(111,new j.OscHandler((Q=>this.restoreBgColor(Q)))),this._parser.registerOscHandler(112,new j.OscHandler((Q=>this.restoreCursorColor(Q)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const Q in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:Q},(()=>this.selectCharset("("+Q))),this._parser.registerEscHandler({intermediates:")",final:Q},(()=>this.selectCharset(")"+Q))),this._parser.registerEscHandler({intermediates:"*",final:Q},(()=>this.selectCharset("*"+Q))),this._parser.registerEscHandler({intermediates:"+",final:Q},(()=>this.selectCharset("+"+Q))),this._parser.registerEscHandler({intermediates:"-",final:Q},(()=>this.selectCharset("-"+Q))),this._parser.registerEscHandler({intermediates:".",final:Q},(()=>this.selectCharset("."+Q))),this._parser.registerEscHandler({intermediates:"/",final:Q},(()=>this.selectCharset("/"+Q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((Q=>(this._logService.error("Parsing error: ",Q),Q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new z.DcsHandler(((Q,ce)=>this.requestStatusString(Q,ce))))}_preserveStack(I,L,$,q){this._parseStack.paused=!0,this._parseStack.cursorStartX=I,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=$,this._parseStack.position=q}_logSlowResolvingAsync(I){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([I,new Promise(((L,$)=>setTimeout((()=>$("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(I,L){let $,q=this._activeBuffer.x,G=this._activeBuffer.y,te=0;const fe=this._parseStack.paused;if(fe){if($=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync($),$;q=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,I.length>B&&(te=this._parseStack.position+B)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof I=="string"?` "${I}"`:` "${Array.prototype.map.call(I,(Q=>String.fromCharCode(Q))).join("")}"`),typeof I=="string"?I.split("").map((Q=>Q.charCodeAt(0))):I),this._parseBuffer.lengthB)for(let Q=te;Q0&&ee.getWidth(this._activeBuffer.x-1)===2&&ee.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ce);let le=this._parser.precedingJoinState;for(let he=L;he<$;++he){if(q=I[he],q<127&&te){const Ue=te[String.fromCharCode(q)];Ue&&(q=Ue.charCodeAt(0))}const xe=this._unicodeService.charProperties(q,le);G=E.UnicodeService.extractWidth(xe);const Te=E.UnicodeService.extractShouldJoin(xe),Ze=Te?E.UnicodeService.extractWidth(le):0;if(le=xe,fe&&this._onA11yChar.fire((0,S.stringFromCodePoint)(q)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+G-Ze>oe){if(ne){const Ue=ee;let Ie=this._activeBuffer.x-Ze;for(this._activeBuffer.x=Ze,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ze>0&&ee instanceof b.BufferLine&&ee.copyCellsFrom(Ue,Ie,0,Ze,!1);Ie=0;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}else if(Q&&(ee.insertCells(this._activeBuffer.x,G-Ze,this._activeBuffer.getNullCell(ce)),ee.getWidth(oe-1)===2&&ee.setCellFromCodepoint(oe-1,y.NULL_CELL_CODE,y.NULL_CELL_WIDTH,ce)),ee.setCellFromCodepoint(this._activeBuffer.x++,q,G,ce),G>0)for(;--G;)ee.setCellFromCodepoint(this._activeBuffer.x++,0,0,ce)}this._parser.precedingJoinState=le,this._activeBuffer.x0&&ee.getWidth(this._activeBuffer.x)===0&&!ee.hasContent(this._activeBuffer.x)&&ee.setCellFromCodepoint(this._activeBuffer.x,0,1,ce),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(I,L){return I.final!=="t"||I.prefix||I.intermediates?this._parser.registerCsiHandler(I,L):this._parser.registerCsiHandler(I,($=>!F($.params[0],this._optionsService.rawOptions.windowOptions)||L($)))}registerDcsHandler(I,L){return this._parser.registerDcsHandler(I,new z.DcsHandler(L))}registerEscHandler(I,L){return this._parser.registerEscHandler(I,L)}registerOscHandler(I,L){return this._parser.registerOscHandler(I,new j.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var I;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&I.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const I=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-I),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(I=this._bufferService.cols-1){this._activeBuffer.x=Math.min(I,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(I,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=I,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=I,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(I,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+I,this._activeBuffer.y+L)}cursorUp(I){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,I.params[0]||1)):this._moveCursor(0,-(I.params[0]||1)),!0}cursorDown(I){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,I.params[0]||1)):this._moveCursor(0,I.params[0]||1),!0}cursorForward(I){return this._moveCursor(I.params[0]||1,0),!0}cursorBackward(I){return this._moveCursor(-(I.params[0]||1),0),!0}cursorNextLine(I){return this.cursorDown(I),this._activeBuffer.x=0,!0}cursorPrecedingLine(I){return this.cursorUp(I),this._activeBuffer.x=0,!0}cursorCharAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(I){return this._setCursor(I.length>=2?(I.params[1]||1)-1:0,(I.params[0]||1)-1),!0}charPosAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(I){return this._moveCursor(I.params[0]||1,0),!0}linePosAbsolute(I){return this._setCursor(this._activeBuffer.x,(I.params[0]||1)-1),!0}vPositionRelative(I){return this._moveCursor(0,I.params[0]||1),!0}hVPosition(I){return this.cursorPosition(I),!0}tabClear(I){const L=I.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(I){const L=I.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(I,L,$,q=!1,G=!1){const te=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);te.replaceCells(L,$,this._activeBuffer.getNullCell(this._eraseAttrData()),G),q&&(te.isWrapped=!1)}_resetBufferLine(I,L=!1){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);$&&($.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+I),$.isWrapped=!1)}eraseInDisplay(I,L=!1){let $;switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:for($=this._activeBuffer.y,this._dirtyRowTracker.markDirty($),this._eraseInBufferLine($++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);$=this._bufferService.cols&&(this._activeBuffer.lines.get($+1).isWrapped=!1);$--;)this._resetBufferLine($,L);this._dirtyRowTracker.markDirty(0);break;case 2:for($=this._bufferService.rows,this._dirtyRowTracker.markDirty($-1);$--;)this._resetBufferLine($,L);this._dirtyRowTracker.markDirty(0);break;case 3:const q=this._activeBuffer.lines.length-this._bufferService.rows;q>0&&(this._activeBuffer.lines.trimStart(q),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-q,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-q,0),this._onScroll.fire(0))}return!0}eraseInLine(I,L=!1){switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.ythis._activeBuffer.scrollBottom||this._activeBuffer.y65535?2:1}let ne=oe;for(let Q=1;Q<$;++Q)fe.copyWithin(ne,0,oe),ne+=oe;return this.print(fe,0,ne),!0}sendDeviceAttributesPrimary(I){return I.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(I){return I.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(I.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(I){return(this._optionsService.rawOptions.termName+"").indexOf(I)===0}setMode(I){for(let L=0;LTe?1:2,le=I.params[0];return he=le,xe=L?le===2?4:le===4?ee(te.modes.insertMode):le===12?3:le===20?ee(ce.convertEol):0:le===1?ee($.applicationCursorKeys):le===3?ce.windowOptions.setWinLines?oe===80?2:oe===132?1:0:0:le===6?ee($.origin):le===7?ee($.wraparound):le===8?3:le===9?ee(q==="X10"):le===12?ee(ce.cursorBlink):le===25?ee(!te.isCursorHidden):le===45?ee($.reverseWraparound):le===66?ee($.applicationKeypad):le===67?4:le===1e3?ee(q==="VT200"):le===1002?ee(q==="DRAG"):le===1003?ee(q==="ANY"):le===1004?ee($.sendFocus):le===1005?4:le===1006?ee(G==="SGR"):le===1015?4:le===1016?ee(G==="SGR_PIXELS"):le===1048?1:le===47||le===1047||le===1049?ee(ne===Q):le===2004?ee($.bracketedPasteMode):0,te.triggerDataEvent(`${f.C0.ESC}[${L?"":"?"}${he};${xe}$y`),!0;var he,xe}_updateAttrColor(I,L,$,q,G){return L===2?(I|=50331648,I&=-16777216,I|=C.AttributeData.fromColorRGB([$,q,G])):L===5&&(I&=-50331904,I|=33554432|255&$),I}_extractColor(I,L,$){const q=[0,0,-1,0,0,0];let G=0,te=0;do{if(q[te+G]=I.params[L+te],I.hasSubParams(L+te)){const fe=I.getSubParams(L+te);let oe=0;do q[1]===5&&(G=1),q[te+oe+1+G]=fe[oe];while(++oe=2||q[1]===2&&te+G>=5)break;q[1]&&(G=1)}while(++te+L5)&&(I=1),L.extended.underlineStyle=I,L.fg|=268435456,I===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(I){I.fg=b.DEFAULT_ATTR_DATA.fg,I.bg=b.DEFAULT_ATTR_DATA.bg,I.extended=I.extended.clone(),I.extended.underlineStyle=0,I.extended.underlineColor&=-67108864,I.updateExtended()}charAttributes(I){if(I.length===1&&I.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=I.length;let $;const q=this._curAttrData;for(let G=0;G=30&&$<=37?(q.fg&=-50331904,q.fg|=16777216|$-30):$>=40&&$<=47?(q.bg&=-50331904,q.bg|=16777216|$-40):$>=90&&$<=97?(q.fg&=-50331904,q.fg|=16777224|$-90):$>=100&&$<=107?(q.bg&=-50331904,q.bg|=16777224|$-100):$===0?this._processSGR0(q):$===1?q.fg|=134217728:$===3?q.bg|=67108864:$===4?(q.fg|=268435456,this._processUnderline(I.hasSubParams(G)?I.getSubParams(G)[0]:1,q)):$===5?q.fg|=536870912:$===7?q.fg|=67108864:$===8?q.fg|=1073741824:$===9?q.fg|=2147483648:$===2?q.bg|=134217728:$===21?this._processUnderline(2,q):$===22?(q.fg&=-134217729,q.bg&=-134217729):$===23?q.bg&=-67108865:$===24?(q.fg&=-268435457,this._processUnderline(0,q)):$===25?q.fg&=-536870913:$===27?q.fg&=-67108865:$===28?q.fg&=-1073741825:$===29?q.fg&=2147483647:$===39?(q.fg&=-67108864,q.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):$===49?(q.bg&=-67108864,q.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):$===38||$===48||$===58?G+=this._extractColor(I,G,q):$===53?q.bg|=1073741824:$===55?q.bg&=-1073741825:$===59?(q.extended=q.extended.clone(),q.extended.underlineColor=-1,q.updateExtended()):$===100?(q.fg&=-67108864,q.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,q.bg&=-67108864,q.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",$);return!0}deviceStatus(I){switch(I.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,$=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${$}R`)}return!0}deviceStatusPrivate(I){if(I.params[0]===6){const L=this._activeBuffer.y+1,$=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${$}R`)}return!0}softReset(I){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(I){const L=I.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const $=L%2==1;return this._optionsService.options.cursorBlink=$,!0}setScrollRegion(I){const L=I.params[0]||1;let $;return(I.length<2||($=I.params[1])>this._bufferService.rows||$===0)&&($=this._bufferService.rows),$>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=$-1,this._setCursor(0,0)),!0}windowOptions(I){if(!F(I.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=I.length>1?I.params[1]:0;switch(I.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(U.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(U.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(I){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(I){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(I){return this._windowTitle=I,this._onTitleChange.fire(I),!0}setIconName(I){return this._iconName=I,!0}setOrReportIndexedColor(I){const L=[],$=I.split(";");for(;$.length>1;){const q=$.shift(),G=$.shift();if(/^\d+$/.exec(q)){const te=parseInt(q);if(X(te))if(G==="?")L.push({type:0,index:te});else{const fe=(0,M.parseColor)(G);fe&&L.push({type:1,index:te,color:fe})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(I){const L=I.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(I,L){this._getCurrentLinkId()&&this._finishHyperlink();const $=I.split(":");let q;const G=$.findIndex((te=>te.startsWith("id=")));return G!==-1&&(q=$[G].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:q,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(I,L){const $=I.split(";");for(let q=0;q<$.length&&!(L>=this._specialColors.length);++q,++L)if($[q]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const G=(0,M.parseColor)($[q]);G&&this._onColor.fire([{type:1,index:this._specialColors[L],color:G}])}return!0}setOrReportFgColor(I){return this._setOrReportSpecialColor(I,0)}setOrReportBgColor(I){return this._setOrReportSpecialColor(I,1)}setOrReportCursorColor(I){return this._setOrReportSpecialColor(I,2)}restoreIndexedColor(I){if(!I)return this._onColor.fire([{type:2}]),!0;const L=[],$=I.split(";");for(let q=0;q<$.length;++q)if(/^\d+$/.exec($[q])){const G=parseInt($[q]);X(G)&&L.push({type:2,index:G})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(I){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(I){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(I){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(I){return I.length!==2?(this.selectDefaultCharset(),!0):(I[0]==="/"||this._charsetService.setgCharset(O[I[0]],p.CHARSETS[I[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const I=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,I,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(I){return this._charsetService.setgLevel(I),!0}screenAlignmentPattern(){const I=new w.CellData;I.content=4194373,I.fg=this._curAttrData.fg,I.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${f.C0.ESC}${G}${f.C0.ESC}\\`),!0))(I==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:I==='"p'?'P1$r61;1"p':I==="r"?`P1$r${$.scrollTop+1};${$.scrollBottom+1}r`:I==="m"?"P1$r0m":I===" q"?`P1$r${{block:2,underline:4,bar:6}[q.cursorStyle]-(q.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(I,L){this._dirtyRowTracker.markRangeDirty(I,L)}}o.InputHandler=Y;let V=class{constructor(ie){this._bufferService=ie,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ie){iethis.end&&(this.end=ie)}markRangeDirty(ie,I){ie>I&&(H=ie,ie=I,I=H),iethis.end&&(this.end=I)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function X(ie){return 0<=ie&&ie<256}V=u([_(0,N.IBufferService)],V)},844:(a,o)=>{function l(u){for(const _ of u)_.dispose();u.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const u of this._disposables)u.dispose();this._disposables.length=0}register(u){return this._disposables.push(u),u}unregister(u){const _=this._disposables.indexOf(u);_!==-1&&this._disposables.splice(_,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var _;this._isDisposed||u===this._value||((_=this._value)==null||_.dispose(),this._value=u)}clear(){this.value=void 0}dispose(){var u;this._isDisposed=!0,(u=this._value)==null||u.dispose(),this._value=void 0}},o.toDisposable=function(u){return{dispose:u}},o.disposeArray=l,o.getDisposeArrayDisposable=function(u){return{dispose:()=>l(u)}}},1505:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class l{constructor(){this._data={}}set(_,f,p){this._data[_]||(this._data[_]={}),this._data[_][f]=p}get(_,f){return this._data[_]?this._data[_][f]:void 0}clear(){this._data={}}}o.TwoKeyMap=l,o.FourKeyMap=class{constructor(){this._data=new l}set(u,_,f,p,m){this._data.get(u,_)||this._data.set(u,_,new l),this._data.get(u,_).set(f,p,m)}get(u,_,f,p){var m;return(m=this._data.get(u,_))==null?void 0:m.get(f,p)}clear(){this._data.clear()}}},6114:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const l=o.isNode?"node":navigator.userAgent,u=o.isNode?"node":navigator.platform;o.isFirefox=l.includes("Firefox"),o.isLegacyEdge=l.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(l),o.getSafariVersion=function(){if(!o.isSafari)return 0;const _=l.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),o.isIpad=u==="iPad",o.isIphone=u==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),o.isLinux=u.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(l)},6106:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let l=0;o.SortedList=class{constructor(u){this._getKey=u,this._array=[]}clear(){this._array.length=0}insert(u){this._array.length!==0?(l=this._search(this._getKey(u)),this._array.splice(l,0,u)):this._array.push(u)}delete(u){if(this._array.length===0)return!1;const _=this._getKey(u);if(_===void 0||(l=this._search(_),l===-1)||this._getKey(this._array[l])!==_)return!1;do if(this._array[l]===u)return this._array.splice(l,1),!0;while(++l=this._array.length)&&this._getKey(this._array[l])===u))do yield this._array[l];while(++l=this._array.length)&&this._getKey(this._array[l])===u))do _(this._array[l]);while(++l=_;){let p=_+f>>1;const m=this._getKey(this._array[p]);if(m>u)f=p-1;else{if(!(m0&&this._getKey(this._array[p-1])===u;)p--;return p}_=p+1}}return _}}},7226:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=l(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._iv)return b-x<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(b-x))}ms`),void this._start();b=v}this.clear()}}class f extends _{_requestCallback(m){return setTimeout((()=>m(this._createDeadline(16))))}_cancelCallback(m){clearTimeout(m)}_createDeadline(m){const x=Date.now()+m;return{timeRemaining:()=>Math.max(0,x-Date.now())}}}o.PriorityTaskQueue=f,o.IdleTaskQueue=!u.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:f,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const u=l(643);o.updateWindowsModeWrappedState=function(_){const f=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),p=f==null?void 0:f.get(_.cols-1),m=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);m&&p&&(m.isWrapped=p[u.CHAR_DATA_CODE_INDEX]!==u.NULL_CELL_CODE&&p[u.CHAR_DATA_CODE_INDEX]!==u.WHITESPACE_CELL_CODE)}},3734:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class l{constructor(){this.fg=0,this.bg=0,this.extended=new u}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new l;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=l;class u{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,p=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=p}clone(){return new u(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=u},9092:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const u=l(6349),_=l(7226),f=l(3734),p=l(8437),m=l(4634),x=l(511),S=l(643),b=l(4863),v=l(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(y,w,C){this._hasScrollback=y,this._optionsService=w,this._bufferService=C,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=x.CellData.fromCharData([0,S.NULL_CELL_CHAR,S.NULL_CELL_WIDTH,S.NULL_CELL_CODE]),this._whitespaceCell=x.CellData.fromCharData([0,S.WHITESPACE_CELL_CHAR,S.WHITESPACE_CELL_WIDTH,S.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(y){return y?(this._nullCell.fg=y.fg,this._nullCell.bg=y.bg,this._nullCell.extended=y.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(y){return y?(this._whitespaceCell.fg=y.fg,this._whitespaceCell.bg=y.bg,this._whitespaceCell.extended=y.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(y,w){return new p.BufferLine(this._bufferService.cols,this.getNullCell(y),w)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const y=this.ybase+this.y-this.ydisp;return y>=0&&yo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:w}fillViewportRows(y){if(this.lines.length===0){y===void 0&&(y=p.DEFAULT_ATTR_DATA);let w=this._rows;for(;w--;)this.lines.push(this.getBlankLine(y))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new u.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(y,w){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const E=this._getCorrectBufferLength(w);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+j+1?(this.ybase--,j++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(y,C)));else for(let z=this._rows;z>w;z--)this.lines.length>w+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E0&&(this.lines.trimStart(z),this.ybase=Math.max(this.ybase-z,0),this.ydisp=Math.max(this.ydisp-z,0),this.savedY=Math.max(this.savedY-z,0)),this.lines.maxLength=E}this.x=Math.min(this.x,y-1),this.y=Math.min(this.y,w-1),j&&(this.y+=j),this.savedX=Math.min(this.savedX,y-1),this.scrollTop=0}if(this.scrollBottom=w-1,this._isReflowEnabled&&(this._reflow(y,w),this._cols>y))for(let j=0;j.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let y=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,y=!1);let w=0;for(;this._memoryCleanupPosition100)return!0;return y}get _isReflowEnabled(){const y=this._optionsService.rawOptions.windowsPty;return y&&y.buildNumber?this._hasScrollback&&y.backend==="conpty"&&y.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(y,w){this._cols!==y&&(y>this._cols?this._reflowLarger(y,w):this._reflowSmaller(y,w))}_reflowLarger(y,w){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,y,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(C.length>0){const N=(0,m.reflowLargerCreateNewLayout)(this.lines,C);(0,m.reflowLargerApplyNewLayout)(this.lines,N.layout),this._reflowLargerAdjustViewport(y,w,N.countRemoved)}}_reflowLargerAdjustViewport(y,w,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let E=C;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;j--){let z=this.lines.get(j);if(!z||!z.isWrapped&&z.getTrimmedLength()<=y)continue;const M=[z];for(;z.isWrapped&&j>0;)z=this.lines.get(--j),M.unshift(z);const O=this.ybase+this.y;if(O>=j&&O0&&(N.push({start:j+M.length+E,newLines:Y}),E+=Y.length),M.push(...Y);let V=F.length-1,X=F[V];X===0&&(V--,X=F[V]);let ie=M.length-U-1,I=B;for(;ie>=0;){const $=Math.min(I,X);if(M[V]===void 0)break;if(M[V].copyCellsFrom(M[ie],I-$,X-$,$,!0),X-=$,X===0&&(V--,X=F[V]),I-=$,I===0){ie--;const q=Math.max(ie,0);I=(0,m.getWrappedLineTrimmedLength)(M,q,this._cols)}}for(let $=0;$0;)this.ybase===0?this.y0){const j=[],z=[];for(let V=0;V=0;V--)if(F&&F.start>O+U){for(let X=F.newLines.length-1;X>=0;X--)this.lines.set(V--,F.newLines[X]);V++,j.push({index:O+1,amount:F.newLines.length}),U+=F.newLines.length,F=N[++B]}else this.lines.set(V,z[O--]);let H=0;for(let V=j.length-1;V>=0;V--)j[V].index+=H,this.lines.onInsertEmitter.fire(j[V]),H+=j[V].amount;const Y=Math.max(0,M+E-this.lines.maxLength);Y>0&&this.lines.onTrimEmitter.fire(Y)}}translateBufferLineToString(y,w,C=0,N){const E=this.lines.get(y);return E?E.translateToString(w,C,N):""}getWrappedRangeForLine(y){let w=y,C=y;for(;w>0&&this.lines.get(w).isWrapped;)w--;for(;C+10;);return y>=this._cols?this._cols-1:y<0?0:y}nextStop(y){for(y==null&&(y=this.x);!this.tabs[++y]&&y=this._cols?this._cols-1:y<0?0:y}clearMarkers(y){this._isClearing=!0;for(let w=0;w{w.line-=C,w.line<0&&w.dispose()}))),w.register(this.lines.onInsert((C=>{w.line>=C.index&&(w.line+=C.amount)}))),w.register(this.lines.onDelete((C=>{w.line>=C.index&&w.lineC.index&&(w.line-=C.amount)}))),w.register(w.onDispose((()=>this._removeMarker(w)))),w}_removeMarker(y){this._isClearing||this.markers.splice(this.markers.indexOf(y),1)}}},8437:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=l(3734),_=l(511),f=l(643),p=l(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class x{constructor(b,v,y=!1){this.isWrapped=y,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*b);const w=v||_.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):y]}set(b,v){this._data[3*b+1]=v[f.CHAR_DATA_ATTR_INDEX],v[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[b]=v[1],this._data[3*b+0]=2097152|b|v[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*b+0]=v[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(b){return this._data[3*b+0]>>22}hasWidth(b){return 12582912&this._data[3*b+0]}getFg(b){return this._data[3*b+1]}getBg(b){return this._data[3*b+2]}hasContent(b){return 4194303&this._data[3*b+0]}getCodePoint(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):2097151&v}isCombined(b){return 2097152&this._data[3*b+0]}getString(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b]:2097151&v?(0,p.stringFromCodePoint)(2097151&v):""}isProtected(b){return 536870912&this._data[3*b+2]}loadCell(b,v){return m=3*b,v.content=this._data[m+0],v.fg=this._data[m+1],v.bg=this._data[m+2],2097152&v.content&&(v.combinedData=this._combined[b]),268435456&v.bg&&(v.extended=this._extendedAttrs[b]),v}setCell(b,v){2097152&v.content&&(this._combined[b]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[b]=v.extended),this._data[3*b+0]=v.content,this._data[3*b+1]=v.fg,this._data[3*b+2]=v.bg}setCellFromCodepoint(b,v,y,w){268435456&w.bg&&(this._extendedAttrs[b]=w.extended),this._data[3*b+0]=v|y<<22,this._data[3*b+1]=w.fg,this._data[3*b+2]=w.bg}addCodepointToCell(b,v,y){let w=this._data[3*b+0];2097152&w?this._combined[b]+=(0,p.stringFromCodePoint)(v):2097151&w?(this._combined[b]=(0,p.stringFromCodePoint)(2097151&w)+(0,p.stringFromCodePoint)(v),w&=-2097152,w|=2097152):w=v|4194304,y&&(w&=-12582913,w|=y<<22),this._data[3*b+0]=w}insertCells(b,v,y){if((b%=this.length)&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,y),v=0;--C)this.setCell(b+v+C,this.loadCell(b+C,w));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*y)this._data=new Uint32Array(this._data.buffer,0,y);else{const w=new Uint32Array(y);w.set(this._data),this._data=w}for(let w=this.length;w=b&&delete this._combined[E]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=b&&delete this._extendedAttrs[E]}}return this.length=b,4*y*2=0;--b)if(4194303&this._data[3*b+0])return b+(this._data[3*b+0]>>22);return 0}getNoBgTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0]||50331648&this._data[3*b+2])return b+(this._data[3*b+0]>>22);return 0}copyCellsFrom(b,v,y,w,C){const N=b._data;if(C)for(let j=w-1;j>=0;j--){for(let z=0;z<3;z++)this._data[3*(y+j)+z]=N[3*(v+j)+z];268435456&N[3*(v+j)+2]&&(this._extendedAttrs[y+j]=b._extendedAttrs[v+j])}else for(let j=0;j=v&&(this._combined[z-v+y]=b._combined[z])}}translateToString(b,v,y,w){v=v??0,y=y??this.length,b&&(y=Math.min(y,this.getTrimmedLength())),w&&(w.length=0);let C="";for(;v>22||1}return w&&w.push(v),C}}o.BufferLine=x},4841:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(l,u){if(l.start.y>l.end.y)throw new Error(`Buffer range end (${l.end.x}, ${l.end.y}) cannot be before start (${l.start.x}, ${l.start.y})`);return u*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(a,o)=>{function l(u,_,f){if(_===u.length-1)return u[_].getTrimmedLength();const p=!u[_].hasContent(f-1)&&u[_].getWidth(f-1)===1,m=u[_+1].getWidth(0)===2;return p&&m?f-1:f}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(u,_,f,p,m){const x=[];for(let S=0;S=S&&p0&&(z>w||y[z].getTrimmedLength()===0);z--)j++;j>0&&(x.push(S+y.length-j),x.push(j)),S+=y.length-1}return x},o.reflowLargerCreateNewLayout=function(u,_){const f=[];let p=0,m=_[p],x=0;for(let S=0;Sl(u,y,_))).reduce(((v,y)=>v+y));let x=0,S=0,b=0;for(;bv&&(x-=v,S++);const y=u[S].getWidth(x-1)===2;y&&x--;const w=y?f-1:f;p.push(w),b+=w}return p},o.getWrappedLineTrimmedLength=l},5295:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=l(8460),_=l(844),f=l(9092);class p extends _.Disposable{constructor(x,S){super(),this._optionsService=x,this._bufferService=S,this._onBufferActivate=this.register(new u.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(x){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(x),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(x,S){this._normal.resize(x,S),this._alt.resize(x,S),this.setupTabStops(x)}setupTabStops(x){this._normal.setupTabStops(x),this._alt.setupTabStops(x)}}o.BufferSet=p},511:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const u=l(482),_=l(643),f=l(3734);class p extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(x){const S=new p;return S.setFromCharData(x),S}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,u.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(x){this.fg=x[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let S=!1;if(x[_.CHAR_DATA_CHAR_INDEX].length>2)S=!0;else if(x[_.CHAR_DATA_CHAR_INDEX].length===2){const b=x[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=b&&b<=56319){const v=x[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(b-55296)+v-56320+65536|x[_.CHAR_DATA_WIDTH_INDEX]<<22:S=!0}else S=!0}else this.content=x[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|x[_.CHAR_DATA_WIDTH_INDEX]<<22;S&&(this.combinedData=x[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|x[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=p},643:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const u=l(8460),_=l(844);class f{get id(){return this._id}constructor(m){this.line=m,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new u.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(m){return this._disposables.push(m),m}}o.Marker=f,f._nextId=1},7116:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(a,o)=>{var l,u,_;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=` +`,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""})(l||(o.C0=l={})),(function(f){f.PAD="€",f.HOP="",f.BPH="‚",f.NBH="ƒ",f.IND="„",f.NEL="…",f.SSA="†",f.ESA="‡",f.HTS="ˆ",f.HTJ="‰",f.VTS="Š",f.PLD="‹",f.PLU="Œ",f.RI="",f.SS2="Ž",f.SS3="",f.DCS="",f.PU1="‘",f.PU2="’",f.STS="“",f.CCH="”",f.MW="•",f.SPA="–",f.EPA="—",f.SOS="˜",f.SGCI="™",f.SCI="š",f.CSI="›",f.ST="œ",f.OSC="",f.PM="ž",f.APC="Ÿ"})(u||(o.C1=u={})),(function(f){f.ST=`${l.ESC}\\`})(_||(o.C1_ESCAPED=_={}))},7399:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const u=l(2584),_={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(f,p,m,x){const S={type:0,cancel:!1,key:void 0},b=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?S.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?S.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?S.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(S.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B");break;case 8:S.key=f.ctrlKey?"\b":u.C0.DEL,f.altKey&&(S.key=u.C0.ESC+S.key);break;case 9:if(f.shiftKey){S.key=u.C0.ESC+"[Z";break}S.key=u.C0.HT,S.cancel=!0;break;case 13:S.key=f.altKey?u.C0.ESC+u.C0.CR:u.C0.CR,S.cancel=!0;break;case 27:S.key=u.C0.ESC,f.altKey&&(S.key=u.C0.ESC+u.C0.ESC),S.cancel=!0;break;case 37:if(f.metaKey)break;b?(S.key=u.C0.ESC+"[1;"+(b+1)+"D",S.key===u.C0.ESC+"[1;3D"&&(S.key=u.C0.ESC+(m?"b":"[1;5D"))):S.key=p?u.C0.ESC+"OD":u.C0.ESC+"[D";break;case 39:if(f.metaKey)break;b?(S.key=u.C0.ESC+"[1;"+(b+1)+"C",S.key===u.C0.ESC+"[1;3C"&&(S.key=u.C0.ESC+(m?"f":"[1;5C"))):S.key=p?u.C0.ESC+"OC":u.C0.ESC+"[C";break;case 38:if(f.metaKey)break;b?(S.key=u.C0.ESC+"[1;"+(b+1)+"A",m||S.key!==u.C0.ESC+"[1;3A"||(S.key=u.C0.ESC+"[1;5A")):S.key=p?u.C0.ESC+"OA":u.C0.ESC+"[A";break;case 40:if(f.metaKey)break;b?(S.key=u.C0.ESC+"[1;"+(b+1)+"B",m||S.key!==u.C0.ESC+"[1;3B"||(S.key=u.C0.ESC+"[1;5B")):S.key=p?u.C0.ESC+"OB":u.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(S.key=u.C0.ESC+"[2~");break;case 46:S.key=b?u.C0.ESC+"[3;"+(b+1)+"~":u.C0.ESC+"[3~";break;case 36:S.key=b?u.C0.ESC+"[1;"+(b+1)+"H":p?u.C0.ESC+"OH":u.C0.ESC+"[H";break;case 35:S.key=b?u.C0.ESC+"[1;"+(b+1)+"F":p?u.C0.ESC+"OF":u.C0.ESC+"[F";break;case 33:f.shiftKey?S.type=2:f.ctrlKey?S.key=u.C0.ESC+"[5;"+(b+1)+"~":S.key=u.C0.ESC+"[5~";break;case 34:f.shiftKey?S.type=3:f.ctrlKey?S.key=u.C0.ESC+"[6;"+(b+1)+"~":S.key=u.C0.ESC+"[6~";break;case 112:S.key=b?u.C0.ESC+"[1;"+(b+1)+"P":u.C0.ESC+"OP";break;case 113:S.key=b?u.C0.ESC+"[1;"+(b+1)+"Q":u.C0.ESC+"OQ";break;case 114:S.key=b?u.C0.ESC+"[1;"+(b+1)+"R":u.C0.ESC+"OR";break;case 115:S.key=b?u.C0.ESC+"[1;"+(b+1)+"S":u.C0.ESC+"OS";break;case 116:S.key=b?u.C0.ESC+"[15;"+(b+1)+"~":u.C0.ESC+"[15~";break;case 117:S.key=b?u.C0.ESC+"[17;"+(b+1)+"~":u.C0.ESC+"[17~";break;case 118:S.key=b?u.C0.ESC+"[18;"+(b+1)+"~":u.C0.ESC+"[18~";break;case 119:S.key=b?u.C0.ESC+"[19;"+(b+1)+"~":u.C0.ESC+"[19~";break;case 120:S.key=b?u.C0.ESC+"[20;"+(b+1)+"~":u.C0.ESC+"[20~";break;case 121:S.key=b?u.C0.ESC+"[21;"+(b+1)+"~":u.C0.ESC+"[21~";break;case 122:S.key=b?u.C0.ESC+"[23;"+(b+1)+"~":u.C0.ESC+"[23~";break;case 123:S.key=b?u.C0.ESC+"[24;"+(b+1)+"~":u.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(m&&!x||!f.altKey||f.metaKey)!m||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?S.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(S.key=u.C0.US),f.key==="@"&&(S.key=u.C0.NUL)):f.keyCode===65&&(S.type=1);else{const v=_[f.keyCode],y=v==null?void 0:v[f.shiftKey?1:0];if(y)S.key=u.C0.ESC+y;else if(f.keyCode>=65&&f.keyCode<=90){const w=f.ctrlKey?f.keyCode-64:f.keyCode+32;let C=String.fromCharCode(w);f.shiftKey&&(C=C.toUpperCase()),S.key=u.C0.ESC+C}else if(f.keyCode===32)S.key=u.C0.ESC+(f.ctrlKey?u.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let w=f.code.slice(3,4);f.shiftKey||(w=w.toLowerCase()),S.key=u.C0.ESC+w,S.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?S.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?S.key=u.C0.NUL:f.keyCode>=51&&f.keyCode<=55?S.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?S.key=u.C0.DEL:f.keyCode===219?S.key=u.C0.ESC:f.keyCode===220?S.key=u.C0.FS:f.keyCode===221&&(S.key=u.C0.GS)}return S}},482:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(l){return l>65535?(l-=65536,String.fromCharCode(55296+(l>>10))+String.fromCharCode(l%1024+56320)):String.fromCharCode(l)},o.utf32ToString=function(l,u=0,_=l.length){let f="";for(let p=u;p<_;++p){let m=l[p];m>65535?(m-=65536,f+=String.fromCharCode(55296+(m>>10))+String.fromCharCode(m%1024+56320)):f+=String.fromCharCode(m)}return f},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(l,u){const _=l.length;if(!_)return 0;let f=0,p=0;if(this._interim){const m=l.charCodeAt(p++);56320<=m&&m<=57343?u[f++]=1024*(this._interim-55296)+m-56320+65536:(u[f++]=this._interim,u[f++]=m),this._interim=0}for(let m=p;m<_;++m){const x=l.charCodeAt(m);if(55296<=x&&x<=56319){if(++m>=_)return this._interim=x,f;const S=l.charCodeAt(m);56320<=S&&S<=57343?u[f++]=1024*(x-55296)+S-56320+65536:(u[f++]=x,u[f++]=S)}else x!==65279&&(u[f++]=x)}return f}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(l,u){const _=l.length;if(!_)return 0;let f,p,m,x,S=0,b=0,v=0;if(this.interim[0]){let C=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let E,j=0;for(;(E=63&this.interim[++j])&&j<4;)N<<=6,N|=E;const z=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=z-j;for(;v=_)return 0;if(E=l[v++],(192&E)!=128){v--,C=!0;break}this.interim[j++]=E,N<<=6,N|=63&E}C||(z===2?N<128?v--:u[S++]=N:z===3?N<2048||N>=55296&&N<=57343||N===65279||(u[S++]=N):N<65536||N>1114111||(u[S++]=N)),this.interim.fill(0)}const y=_-4;let w=v;for(;w<_;){for(;!(!(w=_)return this.interim[0]=f,S;if(p=l[w++],(192&p)!=128){w--;continue}if(b=(31&f)<<6|63&p,b<128){w--;continue}u[S++]=b}else if((240&f)==224){if(w>=_)return this.interim[0]=f,S;if(p=l[w++],(192&p)!=128){w--;continue}if(w>=_)return this.interim[0]=f,this.interim[1]=p,S;if(m=l[w++],(192&m)!=128){w--;continue}if(b=(15&f)<<12|(63&p)<<6|63&m,b<2048||b>=55296&&b<=57343||b===65279)continue;u[S++]=b}else if((248&f)==240){if(w>=_)return this.interim[0]=f,S;if(p=l[w++],(192&p)!=128){w--;continue}if(w>=_)return this.interim[0]=f,this.interim[1]=p,S;if(m=l[w++],(192&m)!=128){w--;continue}if(w>=_)return this.interim[0]=f,this.interim[1]=p,this.interim[2]=m,S;if(x=l[w++],(192&x)!=128){w--;continue}if(b=(7&f)<<18|(63&p)<<12|(63&m)<<6|63&x,b<65536||b>1114111)continue;u[S++]=b}}return S}}},225:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const u=l(1480),_=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],f=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;o.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let m=0;m<_.length;++m)p.fill(0,_[m][0],_[m][1]+1)}}wcwidth(m){return m<32?0:m<127?1:m<65536?p[m]:(function(x,S){let b,v=0,y=S.length-1;if(xS[y][1])return!1;for(;y>=v;)if(b=v+y>>1,x>S[b][1])v=b+1;else{if(!(x=131072&&m<=196605||m>=196608&&m<=262141?2:1}charProperties(m,x){let S=this.wcwidth(m),b=S===0&&x!==0;if(b){const v=u.UnicodeService.extractWidth(x);v===0?b=!1:v>S&&(S=v)}return u.UnicodeService.createPropertyValue(0,S,b)}}},5981:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const u=l(8460),_=l(844);class f extends _.Disposable{constructor(m){super(),this._action=m,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(m,x){if(x!==void 0&&this._syncCalls>x)return void(this._syncCalls=0);if(this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let S;for(this._isSyncWriting=!0;S=this._writeBuffer.shift();){this._action(S);const b=this._callbacks.shift();b&&b()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(m,x){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(x),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=m.length,this._writeBuffer.push(m),this._callbacks.push(x)}_innerWrite(m=0,x=!0){const S=m||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const b=this._writeBuffer[this._bufferOffset],v=this._action(b,x);if(v){const w=C=>Date.now()-S>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(S,C);return void v.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(w)}const y=this._callbacks[this._bufferOffset];if(y&&y(),this._bufferOffset++,this._pendingData-=b.length,Date.now()-S>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=f},5941:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const l=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,u=/^[\da-f]+$/;function _(f,p){const m=f.toString(16),x=m.length<2?"0"+m:m;switch(p){case 4:return m[0];case 8:return x;case 12:return(x+x).slice(0,3);default:return x+x}}o.parseColor=function(f){if(!f)return;let p=f.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const m=l.exec(p);if(m){const x=m[1]?15:m[4]?255:m[7]?4095:65535;return[Math.round(parseInt(m[1]||m[4]||m[7]||m[10],16)/x*255),Math.round(parseInt(m[2]||m[5]||m[8]||m[11],16)/x*255),Math.round(parseInt(m[3]||m[6]||m[9]||m[12],16)/x*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),u.exec(p)&&[3,6,9,12].includes(p.length))){const m=p.length/3,x=[0,0,0];for(let S=0;S<3;++S){const b=parseInt(p.slice(m*S,m*S+m),16);x[S]=m===1?b<<4:m===2?b:m===3?b>>4:b>>8}return x}},o.toRgbString=function(f,p=16){const[m,x,S]=f;return`rgb:${_(m,p)}/${_(x,p)}/${_(S,p)}`}},5770:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const u=l(482),_=l(8742),f=l(5770),p=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(x,S){this._handlers[x]===void 0&&(this._handlers[x]=[]);const b=this._handlers[x];return b.push(S),{dispose:()=>{const v=b.indexOf(S);v!==-1&&b.splice(v,1)}}}clearHandler(x){this._handlers[x]&&delete this._handlers[x]}setHandlerFallback(x){this._handlerFb=x}reset(){if(this._active.length)for(let x=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;x>=0;--x)this._active[x].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(x,S){if(this.reset(),this._ident=x,this._active=this._handlers[x]||p,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].hook(S);else this._handlerFb(this._ident,"HOOK",S)}put(x,S,b){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(x,S,b);else this._handlerFb(this._ident,"PUT",(0,u.utf32ToString)(x,S,b))}unhook(x,S=!0){if(this._active.length){let b=!1,v=this._active.length-1,y=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,b=S,y=this._stack.fallThrough,this._stack.paused=!1),!y&&b===!1){for(;v>=0&&(b=this._active[v].unhook(x),b!==!0);v--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,b;v--}for(;v>=0;v--)if(b=this._active[v].unhook(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,b}else this._handlerFb(this._ident,"UNHOOK",x);this._active=p,this._ident=0}};const m=new _.Params;m.addParam(0),o.DcsHandler=class{constructor(x){this._handler=x,this._data="",this._params=m,this._hitLimit=!1}hook(x){this._params=x.length>1||x.params[0]?x.clone():m,this._data="",this._hitLimit=!1}put(x,S,b){this._hitLimit||(this._data+=(0,u.utf32ToString)(x,S,b),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(x){let S=!1;if(this._hitLimit)S=!1;else if(x&&(S=this._handler(this._data,this._params),S instanceof Promise))return S.then((b=>(this._params=m,this._data="",this._hitLimit=!1,b)));return this._params=m,this._data="",this._hitLimit=!1,S}}},2015:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const u=l(844),_=l(8742),f=l(6242),p=l(6351);class m{constructor(v){this.table=new Uint8Array(v)}setDefault(v,y){this.table.fill(v<<4|y)}add(v,y,w,C){this.table[y<<8|v]=w<<4|C}addMany(v,y,w,C){for(let N=0;Nz)),y=(j,z)=>v.slice(j,z),w=y(32,127),C=y(0,24);C.push(25),C.push.apply(C,y(28,32));const N=y(0,14);let E;for(E in b.setDefault(1,0),b.addMany(w,0,2,0),N)b.addMany([24,26,153,154],E,3,0),b.addMany(y(128,144),E,3,0),b.addMany(y(144,152),E,3,0),b.add(156,E,0,0),b.add(27,E,11,1),b.add(157,E,4,8),b.addMany([152,158,159],E,0,7),b.add(155,E,11,3),b.add(144,E,11,9);return b.addMany(C,0,3,0),b.addMany(C,1,3,1),b.add(127,1,0,1),b.addMany(C,8,0,8),b.addMany(C,3,3,3),b.add(127,3,0,3),b.addMany(C,4,3,4),b.add(127,4,0,4),b.addMany(C,6,3,6),b.addMany(C,5,3,5),b.add(127,5,0,5),b.addMany(C,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(w,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(y(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(w,7,0,7),b.addMany(C,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(y(64,127),3,7,0),b.addMany(y(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(y(48,60),4,8,4),b.addMany(y(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(y(32,64),6,0,6),b.add(127,6,0,6),b.addMany(y(64,127),6,0,0),b.addMany(y(32,48),3,9,5),b.addMany(y(32,48),5,9,5),b.addMany(y(48,64),5,0,6),b.addMany(y(64,127),5,7,0),b.addMany(y(32,48),4,9,5),b.addMany(y(32,48),1,9,2),b.addMany(y(32,48),2,9,2),b.addMany(y(48,127),2,10,0),b.addMany(y(48,80),1,10,0),b.addMany(y(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(y(96,127),1,10,0),b.add(80,1,11,9),b.addMany(C,9,0,9),b.add(127,9,0,9),b.addMany(y(28,32),9,0,9),b.addMany(y(32,48),9,9,12),b.addMany(y(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(C,11,0,11),b.addMany(y(32,128),11,0,11),b.addMany(y(28,32),11,0,11),b.addMany(C,10,0,10),b.add(127,10,0,10),b.addMany(y(28,32),10,0,10),b.addMany(y(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(y(32,48),10,9,12),b.addMany(C,12,0,12),b.add(127,12,0,12),b.addMany(y(28,32),12,0,12),b.addMany(y(32,48),12,9,12),b.addMany(y(48,64),12,0,11),b.addMany(y(64,127),12,12,13),b.addMany(y(64,127),10,12,13),b.addMany(y(64,127),9,12,13),b.addMany(C,13,13,13),b.addMany(w,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(x,0,2,0),b.add(x,8,5,8),b.add(x,6,0,6),b.add(x,11,0,11),b.add(x,13,13,13),b})();class S extends u.Disposable{constructor(v=o.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(y,w,C)=>{},this._executeHandlerFb=y=>{},this._csiHandlerFb=(y,w)=>{},this._escHandlerFb=y=>{},this._errorHandlerFb=y=>y,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,u.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(v,y=[64,126]){let w=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(w=v.prefix.charCodeAt(0),w&&60>w||w>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;NE||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");w<<=8,w|=E}}if(v.final.length!==1)throw new Error("final must be a single byte");const C=v.final.charCodeAt(0);if(y[0]>C||C>y[1])throw new Error(`final must be in range ${y[0]} .. ${y[1]}`);return w<<=8,w|=C,w}identToString(v){const y=[];for(;v;)y.push(String.fromCharCode(255&v)),v>>=8;return y.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,y){const w=this._identifier(v,[48,126]);this._escHandlers[w]===void 0&&(this._escHandlers[w]=[]);const C=this._escHandlers[w];return C.push(y),{dispose:()=>{const N=C.indexOf(y);N!==-1&&C.splice(N,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,y){this._executeHandlers[v.charCodeAt(0)]=y}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,y){const w=this._identifier(v);this._csiHandlers[w]===void 0&&(this._csiHandlers[w]=[]);const C=this._csiHandlers[w];return C.push(y),{dispose:()=>{const N=C.indexOf(y);N!==-1&&C.splice(N,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,y){return this._dcsParser.registerHandler(this._identifier(v),y)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,y){return this._oscParser.registerHandler(v,y)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(v,y,w,C,N){this._parseStack.state=v,this._parseStack.handlers=y,this._parseStack.handlerPos=w,this._parseStack.transition=C,this._parseStack.chunkPos=N}parse(v,y,w){let C,N=0,E=0,j=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,j=this._parseStack.chunkPos+1;else{if(w===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const z=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(w===!1&&M>-1){for(;M>=0&&(C=z[M](this._params),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 4:if(w===!1&&M>-1){for(;M>=0&&(C=z[M](),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 6:if(N=v[this._parseStack.chunkPos],C=this._dcsParser.unhook(N!==24&&N!==26,w),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=v[this._parseStack.chunkPos],C=this._oscParser.end(N!==24&&N!==26,w),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,j=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let z=j;z>4){case 2:for(let U=z+1;;++U){if(U>=y||(N=v[U])<32||N>126&&N=y||(N=v[U])<32||N>126&&N=y||(N=v[U])<32||N>126&&N=y||(N=v[U])<32||N>126&&N=0&&(C=M[O](this._params),C!==!0);O--)if(C instanceof Promise)return this._preserveStack(3,M,O,E,z),C;O<0&&this._csiHandlerFb(this._collect<<8|N,this._params),this.precedingJoinState=0;break;case 8:do switch(N){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(N-48)}while(++z47&&N<60);z--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const B=this._escHandlers[this._collect<<8|N];let F=B?B.length-1:-1;for(;F>=0&&(C=B[F](),C!==!0);F--)if(C instanceof Promise)return this._preserveStack(4,B,F,E,z),C;F<0&&this._escHandlerFb(this._collect<<8|N),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|N,this._params);break;case 13:for(let U=z+1;;++U)if(U>=y||(N=v[U])===24||N===26||N===27||N>127&&N=y||(N=v[U])<32||N>127&&N{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const u=l(5770),_=l(482),f=[];o.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,m){this._handlers[p]===void 0&&(this._handlers[p]=[]);const x=this._handlers[p];return x.push(m),{dispose:()=>{const S=x.indexOf(m);S!==-1&&x.splice(S,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,m,x){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(p,m,x);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(p,m,x))}start(){this.reset(),this._state=1}put(p,m,x){if(this._state!==3){if(this._state===1)for(;m0&&this._put(p,m,x)}}end(p,m=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let x=!1,S=this._active.length-1,b=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,x=m,b=this._stack.fallThrough,this._stack.paused=!1),!b&&x===!1){for(;S>=0&&(x=this._active[S].end(p),x!==!0);S--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,x;S--}for(;S>=0;S--)if(x=this._active[S].end(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,x}else this._handlerFb(this._id,"END",p);this._active=f,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,m,x){this._hitLimit||(this._data+=(0,_.utf32ToString)(p,m,x),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let m=!1;if(this._hitLimit)m=!1;else if(p&&(m=this._handler(this._data),m instanceof Promise))return m.then((x=>(this._data="",this._hitLimit=!1,x)));return this._data="",this._hitLimit=!1,m}}},8742:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const l=2147483647;class u{static fromArray(f){const p=new u;if(!f.length)return p;for(let m=Array.isArray(f[0])?1:0;m256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new u(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&f.push(Array.prototype.slice.call(this._subParams,m,x))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>l?l:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>l?l:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const p=this._subParamsIdx[f]>>8,m=255&this._subParamsIdx[f];return m-p>0?this._subParams.subarray(p,m):null}getSubParamsAll(){const f={};for(let p=0;p>8,x=255&this._subParamsIdx[p];x-m>0&&(f[p]=this._subParams.slice(m,x))}return f}addDigit(f){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const m=this._digitIsSub?this._subParams:this.params,x=m[p-1];m[p-1]=~x?Math.min(10*x+f,l):f}}o.Params=u},5741:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let l=this._addons.length-1;l>=0;l--)this._addons[l].instance.dispose()}loadAddon(l,u){const _={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(_),u.dispose=()=>this._wrappedAddonDispose(_),u.activate(l)}_wrappedAddonDispose(l){if(l.isDisposed)return;let u=-1;for(let _=0;_{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const u=l(3785),_=l(511);o.BufferApiView=class{constructor(f,p){this._buffer=f,this.type=p}init(f){return this._buffer=f,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(f){const p=this._buffer.lines.get(f);if(p)return new u.BufferLineApiView(p)}getNullCell(){return new _.CellData}}},3785:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const u=l(511);o.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,f){if(!(_<0||_>=this._line.length))return f?(this._line.loadCell(_,f),f):this._line.loadCell(_,new u.CellData)}translateToString(_,f,p){return this._line.translateToString(_,f,p)}}},8285:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const u=l(8771),_=l(8460),f=l(844);class p extends f.Disposable{constructor(x){super(),this._core=x,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new u.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new u.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=p},7975:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(l){this._core=l}registerCsiHandler(l,u){return this._core.registerCsiHandler(l,(_=>u(_.toArray())))}addCsiHandler(l,u){return this.registerCsiHandler(l,u)}registerDcsHandler(l,u){return this._core.registerDcsHandler(l,((_,f)=>u(_,f.toArray())))}addDcsHandler(l,u){return this.registerDcsHandler(l,u)}registerEscHandler(l,u){return this._core.registerEscHandler(l,u)}addEscHandler(l,u){return this.registerEscHandler(l,u)}registerOscHandler(l,u){return this._core.registerOscHandler(l,u)}addOscHandler(l,u){return this.registerOscHandler(l,u)}}},7090:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(l){this._core=l}register(l){this._core.unicodeService.register(l)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(l){this._core.unicodeService.activeVersion=l}}},744:function(a,o,l){var u=this&&this.__decorate||function(b,v,y,w){var C,N=arguments.length,E=N<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,y):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,y,w);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(N<3?C(E):N>3?C(v,y,E):C(v,y))||E);return N>3&&E&&Object.defineProperty(v,y,E),E},_=this&&this.__param||function(b,v){return function(y,w){v(y,w,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const f=l(8460),p=l(844),m=l(5295),x=l(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let S=o.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(b){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(b.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(b.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new m.BufferSet(b,this))}resize(b,v){this.cols=b,this.rows=v,this.buffers.resize(b,v),this._onResize.fire({cols:b,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(b,v=!1){const y=this.buffer;let w;w=this._cachedBlankLine,w&&w.length===this.cols&&w.getFg(0)===b.fg&&w.getBg(0)===b.bg||(w=y.getBlankLine(b,v),this._cachedBlankLine=w),w.isWrapped=v;const C=y.ybase+y.scrollTop,N=y.ybase+y.scrollBottom;if(y.scrollTop===0){const E=y.lines.isFull;N===y.lines.length-1?E?y.lines.recycle().copyFrom(w):y.lines.push(w.clone()):y.lines.splice(N+1,0,w.clone()),E?this.isUserScrolling&&(y.ydisp=Math.max(y.ydisp-1,0)):(y.ybase++,this.isUserScrolling||y.ydisp++)}else{const E=N-C+1;y.lines.shiftElements(C+1,E-1,-1),y.lines.set(N,w.clone())}this.isUserScrolling||(y.ydisp=y.ybase),this._onScroll.fire(y.ydisp)}scrollLines(b,v,y){const w=this.buffer;if(b<0){if(w.ydisp===0)return;this.isUserScrolling=!0}else b+w.ydisp>=w.ybase&&(this.isUserScrolling=!1);const C=w.ydisp;w.ydisp=Math.max(Math.min(w.ydisp+b,w.ybase),0),C!==w.ydisp&&(v||this._onScroll.fire(w.ydisp))}};o.BufferService=S=u([_(0,x.IOptionsService)],S)},7994:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(l){this.glevel=l,this.charset=this._charsets[l]}setgCharset(l,u){this._charsets[l]=u,this.glevel===l&&(this.charset=u)}}},1753:function(a,o,l){var u=this&&this.__decorate||function(w,C,N,E){var j,z=arguments.length,M=z<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,N):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(w,C,N,E);else for(var O=w.length-1;O>=0;O--)(j=w[O])&&(M=(z<3?j(M):z>3?j(C,N,M):j(C,N))||M);return z>3&&M&&Object.defineProperty(C,N,M),M},_=this&&this.__param||function(w,C){return function(N,E){C(N,E,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const f=l(2585),p=l(8460),m=l(844),x={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:w=>w.button!==4&&w.action===1&&(w.ctrl=!1,w.alt=!1,w.shift=!1,!0)},VT200:{events:19,restrict:w=>w.action!==32},DRAG:{events:23,restrict:w=>w.action!==32||w.button!==3},ANY:{events:31,restrict:w=>!0}};function S(w,C){let N=(w.ctrl?16:0)|(w.shift?4:0)|(w.alt?8:0);return w.button===4?(N|=64,N|=w.action):(N|=3&w.button,4&w.button&&(N|=64),8&w.button&&(N|=128),w.action===32?N|=32:w.action!==0||C||(N|=3)),N}const b=String.fromCharCode,v={DEFAULT:w=>{const C=[S(w,!1)+32,w.col+32,w.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${b(C[0])}${b(C[1])}${b(C[2])}`},SGR:w=>{const C=w.action===0&&w.button!==4?"m":"M";return`\x1B[<${S(w,!0)};${w.col};${w.row}${C}`},SGR_PIXELS:w=>{const C=w.action===0&&w.button!==4?"m":"M";return`\x1B[<${S(w,!0)};${w.x};${w.y}${C}`}};let y=o.CoreMouseService=class extends m.Disposable{constructor(w,C){super(),this._bufferService=w,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const N of Object.keys(x))this.addProtocol(N,x[N]);for(const N of Object.keys(v))this.addEncoding(N,v[N]);this.reset()}addProtocol(w,C){this._protocols[w]=C}addEncoding(w,C){this._encodings[w]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(w){if(!this._protocols[w])throw new Error(`unknown protocol "${w}"`);this._activeProtocol=w,this._onProtocolChange.fire(this._protocols[w].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(w){if(!this._encodings[w])throw new Error(`unknown encoding "${w}"`);this._activeEncoding=w}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(w){if(w.col<0||w.col>=this._bufferService.cols||w.row<0||w.row>=this._bufferService.rows||w.button===4&&w.action===32||w.button===3&&w.action!==32||w.button!==4&&(w.action===2||w.action===3)||(w.col++,w.row++,w.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,w,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(w))return!1;const C=this._encodings[this._activeEncoding](w);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=w,!0}explainEvents(w){return{down:!!(1&w),up:!!(2&w),drag:!!(4&w),move:!!(8&w),wheel:!!(16&w)}}_equalEvents(w,C,N){if(N){if(w.x!==C.x||w.y!==C.y)return!1}else if(w.col!==C.col||w.row!==C.row)return!1;return w.button===C.button&&w.action===C.action&&w.ctrl===C.ctrl&&w.alt===C.alt&&w.shift===C.shift}};o.CoreMouseService=y=u([_(0,f.IBufferService),_(1,f.ICoreService)],y)},6975:function(a,o,l){var u=this&&this.__decorate||function(y,w,C,N){var E,j=arguments.length,z=j<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,w,C,N);else for(var M=y.length-1;M>=0;M--)(E=y[M])&&(z=(j<3?E(z):j>3?E(w,C,z):E(w,C))||z);return j>3&&z&&Object.defineProperty(w,C,z),z},_=this&&this.__param||function(y,w){return function(C,N){w(C,N,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const f=l(1439),p=l(8460),m=l(844),x=l(2585),S=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=o.CoreService=class extends m.Disposable{constructor(y,w,C){super(),this._bufferService=y,this._logService=w,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(S),this.decPrivateModes=(0,f.clone)(b)}reset(){this.modes=(0,f.clone)(S),this.decPrivateModes=(0,f.clone)(b)}triggerDataEvent(y,w=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;w&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),w&&this._onUserInput.fire(),this._logService.debug(`sending data "${y}"`,(()=>y.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(y)}triggerBinaryEvent(y){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${y}"`,(()=>y.split("").map((w=>w.charCodeAt(0))))),this._onBinary.fire(y))}};o.CoreService=v=u([_(0,x.IBufferService),_(1,x.ILogService),_(2,x.IOptionsService)],v)},9074:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const u=l(8055),_=l(8460),f=l(844),p=l(6106);let m=0,x=0;class S extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((y=>y==null?void 0:y.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(y){if(y.marker.isDisposed)return;const w=new b(y);if(w){const C=w.marker.onDispose((()=>w.dispose()));w.onDispose((()=>{w&&(this._decorations.delete(w)&&this._onDecorationRemoved.fire(w),C.dispose())})),this._decorations.insert(w),this._onDecorationRegistered.fire(w)}return w}reset(){for(const y of this._decorations.values())y.dispose();this._decorations.clear()}*getDecorationsAtCell(y,w,C){let N=0,E=0;for(const j of this._decorations.getKeyIterator(w))N=j.options.x??0,E=N+(j.options.width??1),y>=N&&y{m=E.options.x??0,x=m+(E.options.width??1),y>=m&&y{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const u=l(2585),_=l(8343);class f{constructor(...m){this._entries=new Map;for(const[x,S]of m)this.set(x,S)}set(m,x){const S=this._entries.get(m);return this._entries.set(m,x),S}forEach(m){for(const[x,S]of this._entries.entries())m(x,S)}has(m){return this._entries.has(m)}get(m){return this._entries.get(m)}}o.ServiceCollection=f,o.InstantiationService=class{constructor(){this._services=new f,this._services.set(u.IInstantiationService,this)}setService(p,m){this._services.set(p,m)}getService(p){return this._services.get(p)}createInstance(p,...m){const x=(0,_.getServiceDependencies)(p).sort(((v,y)=>v.index-y.index)),S=[];for(const v of x){const y=this._services.get(v.id);if(!y)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${v.id}.`);S.push(y)}const b=x.length>0?x[0].index:m.length;if(m.length!==b)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${b+1} conflicts with ${m.length} static arguments`);return new p(...m,...S)}}},7866:function(a,o,l){var u=this&&this.__decorate||function(b,v,y,w){var C,N=arguments.length,E=N<3?v:w===null?w=Object.getOwnPropertyDescriptor(v,y):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,y,w);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(N<3?C(E):N>3?C(v,y,E):C(v,y))||E);return N>3&&E&&Object.defineProperty(v,y,E),E},_=this&&this.__param||function(b,v){return function(y,w){v(y,w,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const f=l(844),p=l(2585),m={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let x,S=o.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(b){super(),this._optionsService=b,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),x=this}_updateLogLevel(){this._logLevel=m[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(b){for(let v=0;vJSON.stringify(E))).join(", ")})`);const N=w.apply(this,C);return x.trace(`GlyphRenderer#${w.name} return`,N),N}}},7302:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const u=l(8460),_=l(844),f=l(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class m extends _.Disposable{constructor(S){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const b={...o.DEFAULT_OPTIONS};for(const v in S)if(v in b)try{const y=S[v];b[v]=this._sanitizeAndValidateOption(v,y)}catch(y){console.error(y)}this.rawOptions=b,this.options={...b},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(S,b){return this.onOptionChange((v=>{v===S&&b(this.rawOptions[S])}))}onMultipleOptionChange(S,b){return this.onOptionChange((v=>{S.indexOf(v)!==-1&&b()}))}_setupOptions(){const S=v=>{if(!(v in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},b=(v,y)=>{if(!(v in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);y=this._sanitizeAndValidateOption(v,y),this.rawOptions[v]!==y&&(this.rawOptions[v]=y,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const y={get:S.bind(this,v),set:b.bind(this,v)};Object.defineProperty(this.options,v,y)}}_sanitizeAndValidateOption(S,b){switch(S){case"cursorStyle":if(b||(b=o.DEFAULT_OPTIONS[S]),!(function(v){return v==="block"||v==="underline"||v==="bar"})(b))throw new Error(`"${b}" is not a valid value for ${S}`);break;case"wordSeparator":b||(b=o.DEFAULT_OPTIONS[S]);break;case"fontWeight":case"fontWeightBold":if(typeof b=="number"&&1<=b&&b<=1e3)break;b=p.includes(b)?b:o.DEFAULT_OPTIONS[S];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw new Error(`${S} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,4294967295))<0)throw new Error(`${S} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw new Error(`${S} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&b!==0)throw new Error(`${S} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}}o.OptionsService=m},2660:function(a,o,l){var u=this&&this.__decorate||function(m,x,S,b){var v,y=arguments.length,w=y<3?x:b===null?b=Object.getOwnPropertyDescriptor(x,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,x,S,b);else for(var C=m.length-1;C>=0;C--)(v=m[C])&&(w=(y<3?v(w):y>3?v(x,S,w):v(x,S))||w);return y>3&&w&&Object.defineProperty(x,S,w),w},_=this&&this.__param||function(m,x){return function(S,b){x(S,b,m)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const f=l(2585);let p=o.OscLinkService=class{constructor(m){this._bufferService=m,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(m){const x=this._bufferService.buffer;if(m.id===void 0){const C=x.addMarker(x.ybase+x.y),N={data:m,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(N,C))),this._dataByLinkId.set(N.id,N),N.id}const S=m,b=this._getEntryIdKey(S),v=this._entriesWithId.get(b);if(v)return this.addLineToLink(v.id,x.ybase+x.y),v.id;const y=x.addMarker(x.ybase+x.y),w={id:this._nextId++,key:this._getEntryIdKey(S),data:S,lines:[y]};return y.onDispose((()=>this._removeMarkerFromLink(w,y))),this._entriesWithId.set(w.key,w),this._dataByLinkId.set(w.id,w),w.id}addLineToLink(m,x){const S=this._dataByLinkId.get(m);if(S&&S.lines.every((b=>b.line!==x))){const b=this._bufferService.buffer.addMarker(x);S.lines.push(b),b.onDispose((()=>this._removeMarkerFromLink(S,b)))}}getLinkData(m){var x;return(x=this._dataByLinkId.get(m))==null?void 0:x.data}_getEntryIdKey(m){return`${m.id};;${m.uri}`}_removeMarkerFromLink(m,x){const S=m.lines.indexOf(x);S!==-1&&(m.lines.splice(S,1),m.lines.length===0&&(m.data.id!==void 0&&this._entriesWithId.delete(m.key),this._dataByLinkId.delete(m.id)))}};o.OscLinkService=p=u([_(0,f.IBufferService)],p)},8343:(a,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const l="di$target",u="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(_){return _[u]||[]},o.createDecorator=function(_){if(o.serviceRegistry.has(_))return o.serviceRegistry.get(_);const f=function(p,m,x){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(S,b,v){b[l]===b?b[u].push({id:S,index:v}):(b[u]=[{id:S,index:v}],b[l]=b)})(f,p,x)};return f.toString=()=>_,o.serviceRegistry.set(_,f),f}},2585:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const u=l(8343);var _;o.IBufferService=(0,u.createDecorator)("BufferService"),o.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),o.ICoreService=(0,u.createDecorator)("CoreService"),o.ICharsetService=(0,u.createDecorator)("CharsetService"),o.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"})(_||(o.LogLevelEnum=_={})),o.ILogService=(0,u.createDecorator)("LogService"),o.IOptionsService=(0,u.createDecorator)("OptionsService"),o.IOscLinkService=(0,u.createDecorator)("OscLinkService"),o.IUnicodeService=(0,u.createDecorator)("UnicodeService"),o.IDecorationService=(0,u.createDecorator)("DecorationService")},1480:(a,o,l)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const u=l(8460),_=l(225);class f{static extractShouldJoin(m){return(1&m)!=0}static extractWidth(m){return m>>1&3}static extractCharKind(m){return m>>3}static createPropertyValue(m,x,S=!1){return(16777215&m)<<3|(3&x)<<1|(S?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new u.EventEmitter,this.onChange=this._onChange.event;const m=new _.UnicodeV6;this.register(m),this._active=m.version,this._activeProvider=m}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(m){if(!this._providers[m])throw new Error(`unknown Unicode version "${m}"`);this._active=m,this._activeProvider=this._providers[m],this._onChange.fire(m)}register(m){this._providers[m.version]=m}wcwidth(m){return this._activeProvider.wcwidth(m)}getStringCellWidth(m){let x=0,S=0;const b=m.length;for(let v=0;v=b)return x+this.wcwidth(y);const N=m.charCodeAt(v);56320<=N&&N<=57343?y=1024*(y-55296)+N-56320+65536:x+=this.wcwidth(N)}const w=this.charProperties(y,S);let C=f.extractWidth(w);f.extractShouldJoin(w)&&(C-=f.extractWidth(S)),x+=C,S=w}return x}charProperties(m,x){return this._activeProvider.charProperties(m,x)}}o.UnicodeService=f}},r={};function s(a){var o=r[a];if(o!==void 0)return o.exports;var l=r[a]={exports:{}};return t[a].call(l.exports,l,l.exports,s),l.exports}var i={};return(()=>{var a=i;Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const o=s(9042),l=s(3236),u=s(844),_=s(5741),f=s(8285),p=s(7975),m=s(7090),x=["cols","rows"];class S extends u.Disposable{constructor(v){super(),this._core=this.register(new l.Terminal(v)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const y=C=>this._core.options[C],w=(C,N)=>{this._checkReadonlyOptions(C),this._core.options[C]=N};for(const C in this._core.options){const N={get:y.bind(this,C),set:w.bind(this,C)};Object.defineProperty(this._publicOptions,C,N)}}_checkReadonlyOptions(v){if(x.includes(v))throw new Error(`Option "${v}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new m.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const v=this._core.coreService.decPrivateModes;let y="none";switch(this._core.coreMouseService.activeProtocol){case"X10":y="x10";break;case"VT200":y="vt200";break;case"DRAG":y="drag";break;case"ANY":y="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:y,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const y in v)this._publicOptions[y]=v[y]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,y=!0){this._core.input(v,y)}resize(v,y){this._verifyIntegers(v,y),this._core.resize(v,y)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){return this._checkProposedApi(),this._verifyPositiveIntegers(v.x??0,v.width??0,v.height??0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,y,w){this._verifyIntegers(v,y,w),this._core.select(v,y,w)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,y){this._verifyIntegers(v,y),this._core.selectLines(v,y)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,y){this._core.write(v,y)}writeln(v,y){this._core.write(v),this._core.write(`\r +`,y)}paste(v){this._core.paste(v)}refresh(v,y){this._verifyIntegers(v,y),this._core.refresh(v,y)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return o}_verifyIntegers(...v){for(const y of v)if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const y of v)if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}a.Terminal=S})(),i})()))})(k2)),k2.exports}var mdt=pdt();function u6(e,n,t=!1){const r=getComputedStyle(document.documentElement),s=new mdt.Terminal({convertEol:!0,disableStdin:n,fontSize:12,fontFamily:r.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:{background:r.getPropertyValue("--term-bg").trim(),foreground:r.getPropertyValue("--term-foreground").trim(),cursor:n?r.getPropertyValue("--term-bg").trim():r.getPropertyValue("--term-foreground").trim(),selectionBackground:r.getPropertyValue("--term-selection").trim()}}),i=new ddt.FitAddon;s.loadAddon(i),t&&s.loadAddon(new _dt.WebLinksAddon((l,u)=>{let _;try{_=new URL(u)}catch{return}(_.protocol==="http:"||_.protocol==="https:")&&window.open(_,"_blank","noopener,noreferrer")})),s.open(e);const a=()=>{try{i.fit()}catch{}};a();const o=new ResizeObserver(a);return o.observe(e),{terminal:s,dispose(){o.disconnect(),s.dispose()}}}const rO="overflow-hidden rounded-md bg-terminal p-2";function Wp(e){return typeof e=="object"&&e!==null}function sO(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function gdt(e){return Wp(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||sO(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function vdt(e){return Wp(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&sO(e.partitions)&&(e.error===null||typeof e.error=="string")}function bdt(e){return!Wp(e)||e.type!=="complete"?null:e.backend==="ssh"&&gdt(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&vdt(e.result)?{backend:"slurm",result:e.result}:null}function ydt(e){return Wp(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function f6({host:e,backend:n,path:t="/api/settings/ssh/connect",active:r=!0,onComplete:s,onError:i}){const a=new URLSearchParams({host:e,backend:n});return h.jsx(iO,{path:`${t}?${a}`,label:nL({host:Ee(e)}),active:r,onError:i,onComplete:o=>{const l=bdt(o);return l?(s(l),!0):!1}})}function xdt({login:e,onComplete:n,onError:t}){return h.jsx(iO,{path:e?"/api/settings/openresearch/login":"/api/settings/openresearch/ssh-key",label:e?"orx login":"orx ssh-key add",heightClass:"h-80",onError:t,onComplete:r=>!Wp(r)||r.type!=="complete"?!1:(n(),!0)})}function iO({path:e,label:n,heightClass:t="h-40",active:r=!0,onComplete:s,onError:i}){const a=R.useRef(null),o=R.useRef(null),l=R.useRef(s),u=R.useRef(i),[_,f]=R.useState(null);return l.current=s,u.current=i,R.useEffect(()=>{const p=a.current;if(!p)return;const{terminal:m,dispose:x}=u6(p,!1,!0);o.current=m,m.focus();const S=location.protocol==="https:"?"wss:":"ws:",b=new URL(e,`${S}//${location.host}`),v=new WebSocket(b);v.binaryType="arraybuffer";let y=!1,w=!1,C=!1;const N=z=>{var M;w||(w=!0,C||m.writeln(z),m.options.disableStdin=!0,m.blur(),f(z),(M=u.current)==null||M.call(u,z))},E=m.onData(z=>{v.readyState===WebSocket.OPEN&&v.send(new TextEncoder().encode(z))}),j=m.onResize(({cols:z,rows:M})=>{v.readyState===WebSocket.OPEN&&v.send(JSON.stringify({type:"resize",cols:z,rows:M}))});return v.onopen=()=>{v.send(JSON.stringify({type:"resize",cols:m.cols,rows:m.rows}))},v.onmessage=z=>{if(z.data instanceof ArrayBuffer){C=!0,m.write(new Uint8Array(z.data));return}if(typeof z.data!="string")return;let M;try{M=JSON.parse(z.data)}catch{return}if(l.current(M)){y=!0,v.close();return}const O=ydt(M);O&&N(O)},v.onerror=()=>N(bN()),v.onclose=()=>{!y&&!w&&N(bN())},()=>{v.onopen=null,v.onmessage=null,v.onerror=null,v.onclose=null,E.dispose(),j.dispose(),v.close(),o.current=null,x()}},[e]),R.useEffect(()=>{const p=o.current;p&&(p.options.disableStdin=!r||_!==null,r&&_===null?p.focus():p.blur())},[r,_]),h.jsxs("div",{className:"mt-3",children:[h.jsx("div",{className:`${t} ${rO}`,role:"group","aria-label":n,children:h.jsx("div",{ref:a,className:"h-full overflow-hidden"})}),_?h.jsx("p",{role:"alert",className:"sr-only",children:_}):null]})}function wdt({host:e,transcript:n}){const t=R.useRef(null);return R.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=u6(r,!0,!0);return s.write(n),i},[n]),h.jsx("div",{className:`mt-3 h-40 ${rO}`,role:"group","aria-label":nL({host:Ee(e)}),children:h.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}function iu(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const Sdt=["settings","harnesses","projects","compute","instances","environment","git","storage"],kdt=e=>Sdt.some(n=>n===e),Cdt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ii=e=>typeof e=="string"&&e.length>0,Tg=e=>e==null||Ii(e);function d6(e){if(!Cdt(e))return;const n=(...t)=>Object.keys(e).every(r=>t.includes(r));switch(e.kind){case"home":if(n("kind","view")&&(e.view==="experiments"||e.view==="files"||e.view==="artifacts"))return{kind:"home",view:e.view};break;case"experiment":if(n("kind","experimentId","view","runId")&&Ii(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&Tg(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...Ii(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&Ii(e.path)&&Tg(e.sessionId)&&Tg(e.ref)&&Tg(e.branchLabel)&&(e.source==null||e.source==="repo"||e.source==="artifacts"||e.source==="abs")&&(e.line==null||typeof e.line=="number"&&Number.isSafeInteger(e.line)&&e.line>0))return{kind:"file",path:e.path,...e.source?{source:e.source}:{},...Ii(e.sessionId)?{sessionId:e.sessionId}:{},...Ii(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...Ii(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&Ii(e.experimentId)&&Ii(e.branch)&&(e.view==="files"||e.view==="changes"))return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};break;case"plan":if(n("kind","sessionId","promptId")&&Ii(e.sessionId)&&Ii(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&Ii(e.sessionId)&&Ii(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function Rf(e){if(e==="/projects")return{kind:"home"};const n=e.split("/");if(n[0]!==""||n[1]!=="projects"||!n[2])return null;let t,r;try{t=decodeURIComponent(n[2]),r=decodeURIComponent(n[4]??"")}catch{return null}const s=i=>i.length>0&&i!=="."&&i!==".."&&!/[\\/?#\u0000-\u001f\u007f-\u009f]/.test(i);return s(t)?n.length===3||n.length===4&&n[3]===""?{kind:"resume",projectId:t}:n.length===4&&n[3]==="skills"?{kind:"skills",projectId:t}:n.length===5&&n[3]==="tasks"&&s(r)?{kind:"task",projectId:t,...r==="new"?{}:{sessionId:r}}:n.length===5&&n[3]==="settings"&&kdt(r)?{kind:"settings",projectId:t,section:r}:null:null}function Jv(e){if(typeof e!="string"||!e.startsWith("/")||e.startsWith("//")||/[\\#\u0000-\u001f\u007f-\u009f]/.test(e))return null;const n=e.indexOf("?"),t=n===-1?e:e.slice(0,n),r=n===-1?"":e.slice(n+1),s=Rf(t);if(!s||s.kind==="resume")return null;const i=new URLSearchParams(r);if([...i.keys()].some(a=>a!=="pane")||i.getAll("pane").length>1)return null;if(i.has("pane"))try{if(!d6(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function g1(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const YN=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function aO(e,n){let t,r,s=!1,i=!1,a;async function o(l=!1){if(clearTimeout(a),i||(i=l),s||t===void 0)return;s=!0;const u=t;t=void 0;const _=i;i=!1;try{await e(u,_),r=void 0}catch(f){r=u,n(f)}finally{s=!1,t!==void 0&&o()}}return{queue(l,u=0){t=l,clearTimeout(a),a=setTimeout(()=>void o(),u)},flush:o,retry(){return!s&&t===void 0&&(t=r),o()}}}let nv=null,b0=0;const h6=()=>nv;function oO(){const e=b0;return aO(async(n,t)=>{if(e!==b0)return;const r=await Not(n,t);e===b0&&tt.setQueryData(Gp().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===b0&&fr(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:qi(),onClick:()=>void eb.retry()}})})}let v1=oO();function Edt(){b0++,nv=null,v1=oO()}const eb={flush:(e=!1)=>v1.flush(e),retry:()=>v1.retry(),queue(e,n=0){const t=nv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(nv=e,v1.queue(e,n))}};window.addEventListener("pagehide",()=>void eb.flush(!0));function Hl(e,n){if(typeof e=="string")return{kind:"home",view:e};if("code"in e)return{kind:"code",experimentId:e.experimentId,branch:e.branch,view:e.view};if("kind"in e)return e.kind==="plan"?{kind:"plan",sessionId:e.sessionId,promptId:e.promptId}:{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};if("path"in e)return{kind:"file",path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};const t=n===void 0?e.runId:n;return{kind:"experiment",experimentId:e.id,view:e.view,...t?{runId:t}:{}}}function qa(e){switch(e.kind){case"home":return e.view;case"experiment":return{id:e.experimentId,view:e.view,...e.runId?{runId:e.runId}:{}};case"file":return{path:e.path,source:e.source,sessionId:e.sessionId,ref:e.ref,line:e.line,branchLabel:e.branchLabel};case"code":return{code:!0,experimentId:e.experimentId,branch:e.branch,view:e.view,toggled:new Set};case"plan":return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId,plan:""};case"subagent":return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId}}}function lO(e,n,t){const r=[];e.filesTabOpen&&r.push("files"),e.artifactsTabOpen&&r.push("artifacts"),e.experimentsTabOpen&&r.push("experiments");const s=[...e.expTabs,...e.fileTabs,...e.planTabs,...e.subagentTabs,...e.codeTabs],i=new Map(s.map(u=>[kt(u),u])),a=e.contentTabOrder.flatMap(u=>{const _=i.get(u);return _?[_]:[]}),o=kt(e.rightTab);return{tabs:[...r,...a].map(u=>Hl(u,kt(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?Hl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?kt(e.previewTab):null,history:e.tabHistory.map(kt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[kt(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax}}function Ndt(e,n){const t=p6();e&&(t.filesView=e.filesView,t.filesToggled=new Set(e.expanded.files??[]),t.scope=e.scope,t.panelMax=e.panelMax);const r=[...(e==null?void 0:e.tabs)??[]];if(n){const i=r.findIndex(a=>kt(qa(a))===kt(qa(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=qa(i);if(typeof a=="string"){a==="experiments"&&(t.experimentsTabOpen=!0),a==="files"&&(t.filesTabOpen=!0),a==="artifacts"&&(t.artifactsTabOpen=!0);continue}"code"in a?(a.toggled=new Set((e==null?void 0:e.expanded[kt(a)])??[]),t.codeTabs.push(a)):"path"in a?t.fileTabs.push(a):"kind"in a?a.kind==="plan"?t.planTabs.push(a):t.subagentTabs.push(a):t.expTabs.push(a),t.contentTabOrder.push(kt(a))}const s=new Map(r.map(i=>{const a=qa(i);return[kt(a),a]}));return t.tabHistory=((e==null?void 0:e.history)??[]).flatMap(i=>{const a=s.get(i);return a?[a]:[]}),t.previewTab=e!=null&&e.previewKey?s.get(e.previewKey)??null:null,t.rightTab=n?qa(n):e!=null&&e.active?qa(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,uO(t,n)}const C2=(e,n)=>e.id===n.id&&e.view===n.view,Qu=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,_6=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,Ns=(e,n,t)=>`${e}:${n??""}:${_6(t)}`,cO=e=>({...e,lineScrollRequest:void 0});function jg(e){return typeof e=="object"&&"path"in e?cO(e):e}const $d=(e,n)=>e.branch===n.branch;function kt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${_6(e)}`:`experiment:${e.id}:${e.view}`}function s0(e,n){const t=e.filter(r=>kt(r)!==n);return t.length===e.length?e:t}function zdt(e){return e!==void 0}function p6(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1};if(e===T0&&n){const r={path:p1,source:"artifacts"},s="experiments";return{...t,rightTab:s,tabHistory:[r,s],experimentsTabOpen:!0,fileTabs:[r],contentTabOrder:[kt(r)],panelOpen:!0}}if(e===Z5){const r=[{path:"nanochat-base-training-curves.svg",source:"artifacts"},{path:"nanochat-sft-training-curves.svg",source:"artifacts"},{path:"nanochat-training-throughput.svg",source:"artifacts"},{path:"nanochat-core-evaluation.svg",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[...r.slice(1),r[0]],fileTabs:r,contentTabOrder:r.map(kt),panelOpen:!0}}if(e===J5){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(kt),panelOpen:!0}}return t}function m6(e,n){const t=p6(e,n);return t.panelOpen?lO(t,{},{}):void 0}function uO(e,n){if(!n)return e;const t=qa(n),r=kt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs].find(l=>kt(l)===r),i=(l,u)=>{const _=l.findIndex(f=>kt(f)===r);return _<0?[...l,u]:JSON.stringify(Hl(l[_]))===JSON.stringify(Hl(u))?l:l.map((f,p)=>p===_?{...f,...u}:f)},a={...e};typeof t=="string"?t==="files"?a.filesTabOpen=!0:t==="artifacts"?a.artifactsTabOpen=!0:a.experimentsTabOpen=!0:("path"in t?a.fileTabs=i(e.fileTabs,t):"id"in t?a.expTabs=i(e.expTabs,{...t,runId:n.kind==="experiment"?n.runId:void 0}):"code"in t?a.codeTabs=i(e.codeTabs,{...t,toggled:s&&"code"in s?s.toggled:t.toggled}):t.kind==="plan"?a.planTabs=i(e.planTabs,t):a.subagentTabs=i(e.subagentTabs,t),e.contentTabOrder.includes(r)||(a.contentTabOrder=[...e.contentTabOrder,r]));const o=e.tabHistory.at(-1);return o&&kt(o)===r&&JSON.stringify(Hl(o))===JSON.stringify(Hl(t))||(a.tabHistory=[...e.tabHistory.filter(l=>kt(l)!==r),t]),a}let Ua=0;const Q0=new Map,rv=new Map,F4=new Set,H4=()=>{for(const e of F4)e()},Tdt=e=>(F4.add(e),()=>{F4.delete(e)}),Y0=new Map,Ga=new Map,fO=e=>Ga.get(e);function jdt(){Ua++,Ga.clear(),Y0.clear(),Q0.clear(),rv.clear(),H4()}function Adt(e,n){const t=Ga.get(e);if(!(t!=null&&t.tasks.new)||iu(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const l=qa(o);if(typeof l=="string"||!("path"in l))return[];const u=Ns(e,null,l);return u in a?[[Ns(e,n,l),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,Y0.set(e,n),Ga.set(e,{...t,tasks:i})}function Rdt(e){let n=Q0.get(e);if(!n){const t=Ua;n=aO(async(r,s)=>{if(t!==Ua)return;const i=await Eot(e,r,s);t===Ua&&tt.setQueryData(r6(e).queryKey,i),t===Ua&&rv.delete(e)&&H4()},r=>{t===Ua&&(rv.set(e,r instanceof Error?r.message:String(r)),H4())}),Q0.set(e,n)}return n}function E2(e,n,t,r){const s=Ga.get(e);if(!s||t==="new"&&Y0.has(e))return;const i=Jv(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?iu(s,t):void 0;if(i===s.lastLocation&&a===s.lastTaskId&&(!r||JSON.stringify(r)===JSON.stringify(o)))return;const l={...s,lastLocation:i,lastTaskId:a,tasks:t&&r?{...s.tasks,[t]:r}:s.tasks},u=o&&r&&i===s.lastLocation&&JSON.stringify({...o,scroll:{},sourceModes:{}})===JSON.stringify({...r,scroll:{},sourceModes:{}});Ga.set(e,l),Rdt(e).queue(l,u?250:0)}function XN(e,n,t,r){const s=new Set(e.state.fileTabs.map(_=>Ns(t,r==="new"?null:r,_))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([_])=>s.has(_))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([_])=>s.has(_))),o=lO(e.state,i,a),l=e.pane??(n==null?void 0:n.active),u=l?kt(qa(l)):null;return o.active=o.tabs.find(_=>kt(qa(_))===u)??null,o}function Mdt(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,demoOverview:a,state:o,apply:l,getScroll:u,sourceModes:_,revision:f}=e,p=R.useRef(YN()),m=R.useSyncExternalStore(Tdt,()=>n?rv.get(n)??null:null),[x,S]=R.useState(null),[b,v]=R.useState(0),[y,w]=R.useState(null),[C,N]=R.useState(null),E=R.useRef(null),j=R.useRef(null),z=R.useRef(null),M=R.useRef(e);M.current=e;const O=JSON.stringify([n,t,i]),B=JSON.stringify(s??null),F=R.useCallback(()=>{const H=z.current;if(!H)return;const Y=XN({...M.current,state:H.state,pane:H.pane},iu(Ga.get(H.projectId),H.taskKey),H.projectId,H.taskKey);E2(H.projectId,H.location,H.taskKey,Y)},[]);R.useEffect(()=>{let H=!0;const Y=Ua;if(S(null),w(null),!!n)return Ga.has(n)?w(n):tt.fetchQuery(r6(n)).then(V=>{!H||Y!==Ua||(Ga.set(n,V??YN()),w(n))}).catch(V=>{H&&Y===Ua&&S(V instanceof Error?V.message:String(V))}),()=>{H=!1}},[n,b]),R.useLayoutEffect(()=>{if(z.current&&z.current.scope!==O){const V=z.current.projectId;F(),Y0.get(V)===t&&Y0.delete(V),z.current=null}if(!n||y!==n)return;const H=Ga.get(n);if(!H)return;if(p.current=H,E.current!==O){if(E.current=O,j.current=B,i){const V=iu(H,t)??(qc(n)?m6(t,a):void 0);l(Ndt(V,s),V,!0)}N(O);return}if(C!==O)return;let Y=o;j.current!==B&&(j.current=B,i&&s&&(Y=uO(o,s),l(Y,void 0,!1))),i?(E2(n,r,t,XN({state:Y,pane:s,getScroll:u,sourceModes:_},iu(H,t),n,t)),z.current={projectId:n,taskKey:t,scope:O,location:r,pane:s,state:Y}):E2(n,r),p.current=Ga.get(n)??H},[n,t,r,s,B,i,a,o,l,u,_,f,y,O,C,F]),R.useEffect(()=>{const H=Ua,Y=X=>{if(H===Ua){F();for(const ie of Q0.values())ie.flush(X)}},V=()=>Y(!0);return window.addEventListener("pagehide",V),()=>{window.removeEventListener("pagehide",V),Y(!1)}},[F]);const U=R.useCallback(()=>{var H;n&&(x?v(Y=>Y+1):(H=Q0.get(n))==null||H.retry())},[n,x]);return{ready:n===null||y===n&&C===O,loaded:n===null||y===n,error:x??m,retry:U,capture:F,workspace:p}}const Ddt="data:image/svg+xml,"+encodeURIComponent(''),q4=R.createContext(null);function Ldt(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function dO(){const e=R.useContext(q4);if(!e)throw new Error("Runtime is not connected");return e}function Odt(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?Ddt:"/favicon.svg")}function ZN(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function Idt(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!ZN("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&OL(n),!ZN("orx:locale")&&t&&QM(t)&&DL(t)}function Bdt(e){return e.includes("ssh ")&&e.includes("failed")}function JN({host:e,overlay:n=!1}){return h.jsx("div",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:h.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[h.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:LD({host:Ee(e)})}),h.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:b4()}),h.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:KAe()})]})})}function ez({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,O,B;const{session:s}=e,[i,a]=R.useState(s.installPaths),[o,l]=R.useState(!1),[u,_]=R.useState(null);R.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(O=s.installPaths)==null?void 0:O.database,(B=s.installPaths)==null?void 0:B.cache]);async function f(){if(i){l(!0);try{await Plt(i)}catch(F){fr(F instanceof Error?F.message:String(F),"error")}finally{l(!1)}}}async function p(F=!1){r(F?s.error:null),l(!0);try{await Flt()}catch(U){fr(U instanceof Error?U.message:String(U),"error")}finally{l(!1)}}async function m(){l(!0);try{await gL()}catch(F){fr(F instanceof Error?F.message:String(F),"error")}finally{l(!1)}}async function x(){l(!0);try{_(await vL())}catch(F){fr(F instanceof Error?F.message:String(F),"error")}finally{l(!1)}}async function S(){if(u){l(!0);try{await bL(u),_(null)}catch(F){_(null),fr(F instanceof Error?F.message:String(F),"error")}finally{l(!1)}}}async function b(){l(!0);try{await Hlt()}catch(F){fr(F instanceof Error?F.message:String(F),"error")}finally{l(!1)}}const v=s.status==="applying"||o,y=s.status==="needsInstall",w=s.status==="needsUpdate",C=i&&y,N=["connecting","applying","reconnecting"].includes(s.status),E=s.status==="disconnected"&&s.error!==null&&Bdt(s.error)&&t!==s.error&&!s.canStartNewHost,j=y?wRe():w?MDe():s.status==="applying"?eAe({host:Ee(s.host)}):s.status==="reconnecting"?oMe({host:Ee(s.host)}):s.status==="disconnected"?s.error?UAe({host:Ee(s.host)}):s.canStartNewHost?nRe({host:Ee(s.host)}):LD({host:Ee(s.host)}):bAe({host:Ee(s.host)}),z=s.error??(s.canStartNewHost?ZAe():y?DRe({user:Ee(s.user??""),host:Ee(s.host)}):w?TDe({host:Ee(s.host)}):s.status==="applying"?Yje():s.status==="reconnecting"?rMe():s.status==="disconnected"?IAe():pAe());return h.jsxs(h.Fragment,{children:[h.jsx("main",{className:n?"w-full max-w-2xl":"app flex h-full items-center justify-center bg-background p-6",children:h.jsxs("section",{className:"w-full max-w-2xl rounded-xl border border-border bg-background p-7 shadow-modal",children:[h.jsxs("div",{className:"flex items-start gap-3",children:[N&&h.jsx(Dt,{className:"mt-2"}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("h1",{id:"remote-setup-title",className:"m-0 text-2xl font-semibold text-text",children:j}),!E&&h.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z})]})]}),E&&h.jsx(f6,{host:s.host,backend:"ssh",path:"/_orx/ssh/connect",onComplete:()=>void p(!0)}),C&&h.jsxs("div",{className:"mt-6 grid gap-4 border-t border-border-variant pt-5",children:[h.jsx("p",{className:"m-0 text-sm text-subtext",children:vRe()}),[["binary",aRe()],["database",_Re()],["cache",uRe()]].map(([F,U])=>h.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[U,h.jsx(zs,{value:i[F],onChange:H=>a({...i,[F]:H.target.value}),disabled:v,dir:"ltr"})]},F)),!s.error&&h.jsx("div",{className:"flex justify-end pt-1",children:h.jsx(Oe,{variant:"primary",disabled:v,onClick:()=>void f(),children:v?h.jsxs(h.Fragment,{children:[h.jsx(Dt,{})," ",ERe()]}):w?lN():WD()})})]}),w&&i&&h.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&h.jsx(Oe,{variant:"primary",disabled:v,onClick:()=>void f(),children:v?h.jsxs(h.Fragment,{children:[h.jsx(Dt,{})," ",IDe()]}):lN()})}),s.status==="disconnected"&&h.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?h.jsxs(Oe,{variant:"primary",disabled:o,onClick:()=>void b(),children:[o?h.jsx(Dt,{}):null,s.error?aN():gMe()]}):h.jsxs(Oe,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?h.jsx(Dt,{}):null,aN()]})}),(s.status==="connecting"||s.status==="reconnecting")&&h.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:h.jsx(Oe,{disabled:o,onClick:()=>void m(),children:w4()})}),w&&s.error&&h.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[h.jsx(Oe,{disabled:o,onClick:()=>void m(),children:w4()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?h.jsx(Dt,{}):null,iN()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid x(),children:[o?h.jsx(Dt,{}):null,OD()]})]}),y&&s.error&&h.jsx("div",{className:"mt-6 flex justify-end",children:h.jsxs(Oe,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?h.jsx(Dt,{}):null,iN()]})})]})}),u&&h.jsx(tO,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||_(null)},onConfirm:()=>void S()})]})}function $dt({children:e}){const n=R.useRef(null);return R.useEffect(()=>{var t;return(t=n.current)==null?void 0:t.focus()},[]),h.jsx("div",{ref:n,role:"alertdialog","aria-modal":"true","aria-labelledby":"remote-setup-title",tabIndex:-1,className:"absolute inset-0 z-100 flex items-center justify-center bg-modal-backdrop p-6",children:e})}function Pdt(){R.useSyncExternalStore(t9,fG),R.useEffect(()=>t9(()=>{Edt(),jdt()}),[]);const e=mV({select:x=>x.pathname==="/remote-launch"}),[n,t]=R.useState(null),[r,s]=R.useState(null),i=R.useRef(!1),a=R.useRef(!1),o=R.useRef(!1),l=R.useRef(null),[u,_]=R.useState(null),f=ct({...Kct(),enabled:!e,refetchInterval:x=>{var S;return x.state.status==="error"||((S=x.state.data)==null?void 0:S.kind)==="ssh"?2e3:!1},refetchIntervalInBackground:!0});if(R.useEffect(()=>{var b,v;if(e)return;const x=f.data;if(!x){s(((b=f.error)==null?void 0:b.message)??null);return}const S=Ldt(x);dG(S),l.current!==null&&l.current!==S&&(i.current=!1,a.current=!1,o.current=!1),l.current=S,x.kind==="ssh"&&(o.current||(o.current=!0,Idt(x)),x.session.status==="connected"?(i.current=!0,a.current=!0,_(null)):x.session.status==="disconnected"&&x.session.error===null&&(a.current=!1)),t(x),s(((v=f.error)==null?void 0:v.message)??null)},[e,f.data,f.error]),R.useEffect(()=>{const x=(n==null?void 0:n.kind)==="ssh";Odt(x),x&&(!i.current||n.session.status==="disconnected"&&!n.session.error)&&(document.title="OpenResearch")},[n]),e)return h.jsxs("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:[h.jsx(Dt,{})," ",YRe()]});if(!n)return h.jsx("main",{className:"app flex h-full items-center justify-center gap-3 bg-background text-base text-text",children:r?h.jsxs(h.Fragment,{children:[h.jsx("span",{children:r}),h.jsx(Oe,{onClick:()=>location.reload(),children:qi()})]}):h.jsx(Dt,{})});if(n.kind==="local")return h.jsxs(q4,{value:n,children:[h.jsx(LN,{}),h.jsx(U0,{})]},Ca()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?h.jsx(JN,{host:n.session.host}):h.jsx(ez,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:_});const m=n.session.status!=="connected"||r!==null;return h.jsxs("div",{className:"relative h-full",children:[h.jsx("div",{className:"h-full",inert:m,children:h.jsxs(q4,{value:n,children:[h.jsx(LN,{}),h.jsx(U0,{})]},Ca()[1])}),m&&h.jsx($dt,{children:r?h.jsx(JN,{host:n.session.host,overlay:!0}):h.jsx(ez,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:_})})]})}const tb=JW()({component:Pdt}),g6="orx:demo-read-sessions";function hO(){try{const e=JSON.parse(sessionStorage.getItem(g6)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function Fdt(e){try{const n=hO();n.add(e),sessionStorage.setItem(g6,JSON.stringify([...n]))}catch{}}function Hdt(){try{sessionStorage.removeItem(g6)}catch{}}function _O(e,n){const t=Rf(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function qdt(e=tt){var i;const[n,t]=await Promise.all([e.fetchQuery(Gp()),e.fetchQuery(V0())]),r=Jv((i=h6()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=Rf(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(a=>a.id===s.projectId)||s.sessionId&&!_O(r,await e.fetchQuery(Sa(s.projectId)))?"/projects":r}async function Udt(e,n=tt){var _;const[t,r]=await Promise.all([n.fetchQuery(r6(e)),n.fetchQuery(Sa(e))]),s=fO(e)??t,i=Jv(s==null?void 0:s.lastLocation);if(i&&((_=Rf(i.split("?")[0]))==null?void 0:_.projectId)===e&&_O(i,r))return i;const a=r.find(f=>!f.archived),o=qc(e)?m6(a==null?void 0:a.id,!(await n.fetchQuery(Gp())).tourCompleted):void 0,l=iu(s,(a==null?void 0:a.id)??"new"),u=l?l.active:o==null?void 0:o.active;return g1(e,(a==null?void 0:a.id)??null,u)}/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pO=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Gdt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wdt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tz=e=>{const n=Wdt(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var N2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vdt=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},Kdt=R.createContext({}),Qdt=()=>R.useContext(Kdt),Ydt=R.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},l)=>{const{size:u=24,strokeWidth:_=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:m=""}=Qdt()??{},x=r??f?Number(t??_)*24/Number(n??u):t??_;return R.createElement("svg",{ref:l,...N2,width:n??u??N2.width,height:n??u??N2.height,stroke:e??p,strokeWidth:x,className:pO("lucide",m,s),...!i&&!Vdt(o)&&{"aria-hidden":"true"},...o},[...a.map(([S,b])=>R.createElement(S,b)),...Array.isArray(i)?i:[i]])});/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const st=(e,n)=>{const t=R.forwardRef(({className:r,...s},i)=>R.createElement(Ydt,{ref:i,iconNode:n,className:pO(`lucide-${Gdt(tz(e))}`,`lucide-${e}`,r),...s}));return t.displayName=tz(e),t};/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xdt=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Zdt=st("arrow-down",Xdt);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jdt=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],X0=st("arrow-left",Jdt);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eht=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],b1=st("arrow-right",eht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tht=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],nht=st("arrow-up-right",tht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rht=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],mO=st("blocks",rht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sht=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],gO=st("book-open",sht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iht=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],aht=st("calendar-days",iht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oht=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7",key:"lw07rv"}]],lht=st("chart-spline",oht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cht=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ka=st("check",cht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uht=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Wo=st("chevron-down",uht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fht=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],vO=st("chevron-left",fht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dht=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vo=st("chevron-right",dht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],bO=st("circle-alert",hht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _ht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],pht=st("circle-question-mark",_ht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],yO=st("circle-stop",mht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ght=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],xO=st("circle-x",ght);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],bht=st("clock-3",vht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],xht=st("clock",yht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wht=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Sht=st("cloud-upload",wht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kht=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],U4=st("code",kht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cht=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],v6=st("copy",Cht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Eht=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],wO=st("corner-down-left",Eht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nht=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],SO=st("cpu",Nht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zht=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Tht=st("download",zht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jht=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],b6=st("ellipsis",jht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Aht=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Mf=st("external-link",Aht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Rht=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],kO=st("file-code",Rht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mht=[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],Dht=st("file-output",Mht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lht=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],nb=st("file-text",Lht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Oht=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],rb=st("flask-conical",Oht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Iht=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],CO=st("folder-git-2",Iht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Bht=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Df=st("folder-open",Bht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $ht=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Pht=st("folder-plus",$ht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fht=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],sb=st("folder-tree",Fht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Hht=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],qht=st("funnel",Hht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Uht=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],Vp=st("git-branch",Uht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ght=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Wht=st("git-commit-horizontal",Ght);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Kht=st("globe",Vht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qht=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Yht=st("history",Qht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xht=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],y6=st("info",Xht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zht=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],Jht=st("laptop",Zht);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e_t=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],t_t=st("lightbulb",e_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const n_t=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],nz=st("lock",n_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r_t=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],s_t=st("maximize-2",r_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const i_t=[["path",{d:"M14 14a2 2 0 0 0 2-2V8h-2",key:"1r06pg"}],["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M8 14a2 2 0 0 0 2-2V8H8",key:"1jzu5j"}]],EO=st("message-square-quote",i_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a_t=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],o_t=st("minimize-2",a_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l_t=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],c_t=st("monitor",l_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const u_t=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],f_t=st("moon",u_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d_t=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],h_t=st("mouse-pointer-click",d_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const __t=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],x6=st("package",__t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const p_t=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],NO=st("panel-left",p_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m_t=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],zO=st("panel-right",m_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const g_t=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],v_t=st("paperclip",g_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b_t=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],w6=st("pencil",b_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y_t=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],S6=st("plus",y_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const x_t=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Za=st("refresh-cw",x_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w_t=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],S_t=st("rotate-cw",w_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const k_t=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],k6=st("scroll-text",k_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const C_t=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],TO=st("search",C_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E_t=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],rz=st("server",E_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const N_t=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],jO=st("settings",N_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const z_t=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],AO=st("sliders-horizontal",z_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T_t=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],r_=st("square-terminal",T_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const j_t=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],A_t=st("sun",j_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const R_t=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],$h=st("terminal",R_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const M_t=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],D_t=st("toggle-right",M_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const L_t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s_=st("trash-2",L_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O_t=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],RO=st("triangle-alert",O_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const I_t=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],B_t=st("upload",I_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $_t=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],C6=st("users",$_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const P_t=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ts=st("x",P_t);/** + * @license lucide-react v1.23.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const F_t=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],H_t=st("zap",F_t);function E6(){return h.jsxs("svg",{viewBox:"0 0 100 100","aria-hidden":"true",children:[h.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),h.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function z2(){return h.jsxs("span",{className:"wordmark inline-flex items-center gap-[0.4em] text-text [&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:shrink-0",children:[h.jsx(E6,{}),"OpenResearch"]})}function q_t({cmd:e}){const[n,t]=R.useState(!1);return h.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[h.jsx("code",{className:"font-mono text-sm",children:e}),h.jsx("button",{type:"button",className:"cmd-inline-copy inline-flex items-center p-0.5 border-0 rounded-xs bg-none bg-transparent text-muted cursor-pointer [&:hover]:bg-surface [&:hover]:text-text",onClick:()=>{navigator.clipboard.writeText(e).then(()=>{t(!0),setTimeout(()=>t(!1),1500)}).catch(()=>{})},"aria-label":n?W1():hK({value:Ee(e)}),title:n?W1():wD(),children:n?h.jsx(ka,{size:11,strokeWidth:3}):h.jsx(v6,{size:11})})]})}function Kp(e){return e?e.split(/`([^`]+)`/).map((n,t)=>t%2===1?h.jsx(q_t,{cmd:n},t):n):null}function G4({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:h.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):e==="opencode"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):h.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z"})})}const U_t={header:"min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-base font-semibold text-text",list:"text-sm font-medium text-text"};function Z0({variant:e="list",className:n,...t}){return h.jsx("span",{className:Ts("title",U_t[e],n),...t})}const sz=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),J0=["onb-card-meta text-sm text-subtext [&_code]:font-mono","[&_code]:text-xs [&_code]:bg-panel","[&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs","[&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap"].join(" "),iz=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),MO=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),az=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),G_t=[{id:"AI/ML",label:gke},{id:"Biology",label:xke},{id:"Physics",label:Tke},{id:"Other",label:Cke}],W_t=["welcome","environment","profile"];function V_t({onDone:e,preferredAgent:n}){var ce;const t=Rn({mutationFn:ee=>Tot(...ee)}),[r,s]=R.useState(0);R.useEffect(()=>{const ee=W_t[r];ee&&sf({name:"onboarding_step_viewed",step:ee})},[r]);const i=ct(Up()),a=ct(j0()),o=i.data??null,l=(ce=a.data)==null?void 0:ce.gitVersion,[u,_]=R.useState(!1),[f,p]=R.useState(null),[m,x]=R.useState(null),[S,b]=R.useState(!1),[v,y]=R.useState([]),[w,C]=R.useState(""),[N,E]=R.useState(""),[j,z]=R.useState([]),[M,O]=R.useState(""),[B,F]=R.useState([]),[U,H]=R.useState(!1),Y=R.useRef(0),[V,X]=R.useState(!1),[ie,I]=R.useState(!1),L=(o==null?void 0:o.some(ee=>ee.agentReady))??!1,$=l!=null,q=R.useRef(0),G=(ee,le=!1)=>{const he=++q.current;b(!0),X(!1),I(!1);const xe=()=>he===q.current;Promise.allSettled([n6(ee,le),tt.fetchQuery({...j0(),staleTime:ee?0:3e4})]).then(([Te,Ze])=>{xe()&&(Te.status==="rejected"&&X(!0),Ze.status==="rejected"&&I(!0))}).finally(()=>xe()&&b(!1))};R.useEffect(()=>G(!1),[]),R.useEffect(()=>{if(o===null)return;const ee=o.filter(le=>le.agentReady);x(le=>{var xe;if(le&&ee.some(Te=>Te.id===le))return le;const he=n&&ee.find(Te=>Te.id===n.harness);return(he==null?void 0:he.id)??((xe=ee[0])==null?void 0:xe.id)??null})},[o,n]),R.useEffect(()=>X(i.isError),[i.isError,i.dataUpdatedAt]),R.useEffect(()=>I(a.isError),[a.isError,a.dataUpdatedAt]),R.useEffect(()=>{tt.fetchQuery(Yct()).then(ee=>{y(ee.researchAreas),C(ee.otherArea??""),E(ee.background??""),z(ee.papers)}).catch(()=>{})},[]),R.useEffect(()=>{const ee=M.trim();if(ee.length<3){F([]),H(!1);return}const le=++Y.current;H(!0);const he=setTimeout(()=>{tt.fetchQuery(ML(ee)).then(xe=>le===Y.current&&F(xe)).catch(()=>le===Y.current&&F([])).finally(()=>le===Y.current&&H(!1))},350);return()=>clearTimeout(he)},[M]);const te=ee=>{const le=j.some(he=>he.paperId===ee.paperId);z(he=>he.some(xe=>xe.paperId===ee.paperId)?he:[...he,{paperId:ee.paperId,title:oz(ee.title)}]),O(""),F([]),le||tt.fetchQuery(L4(ee.paperId)).then(he=>{var Te;const xe=(Te=he.title)==null?void 0:Te.trim();xe&&z(Ze=>Ze.map(Ue=>Ue.paperId===ee.paperId?{...Ue,title:xe}:Ue))}).catch(()=>{})},fe=ee=>z(le=>le.filter(he=>he.paperId!==ee)),oe=ee=>{y(le=>le.includes(ee)?le.filter(he=>he!==ee):[...le,ee])},ne=v.length>0&&(!v.includes("Other")||w.trim().length>0),Q=async()=>{const ee=o==null?void 0:o.find(he=>he.id===m&&he.agentReady);if(!ee||u)return;const le=Q_t(ee);_(!0),p(null);try{const he=await t.mutateAsync([le,{researchAreas:v,otherArea:v.includes("Other")?w:null,background:N||null,papers:j}]);e(he.project,he.selection)}catch(he){p(he instanceof Error?he.message:String(he))}finally{_(!1)}};return h.jsx("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${r===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:h.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${r===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:r===0?h.jsxs("div",{className:"onb-intro relative flex min-h-dvh flex-col justify-center gap-4 py-12 min-[1120px]:grid min-[1120px]:grid-cols-[minmax(0,_1.1fr)_minmax(28rem,_1fr)] min-[1120px]:grid-rows-[auto_auto] min-[1120px]:content-center min-[1120px]:gap-x-20 min-[1120px]:gap-y-10",children:[h.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[h.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:h.jsx(z2,{})}),h.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:ake()})]}),h.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[h.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),h.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:_7e()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:H8e()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:G7e()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:w8e()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:M7e()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:d9e()})]})})]})]}),h.jsx("div",{className:"onb-intro-actions relative z-10 mt-8 flex justify-end min-[1120px]:col-start-2 min-[1120px]:row-start-2 min-[1120px]:mt-0 min-[1120px]:self-start",children:h.jsxs(Oe,{variant:"primary",size:"large",onClick:()=>s(1),children:[QE()," ",h.jsx(b1,{size:20})]})})]}):r===1?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(z2,{}),h.jsx("span",{children:E8e()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:Kke()}),h.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:gCe()}),o!==null&&!L&&h.jsx("p",{className:sz,children:_8e()}),o!==null&&L&&m===null&&h.jsx("p",{className:sz,children:Zke()}),h.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:o!==null?o.map(ee=>h.jsx(X_t,{h:ee,selected:m===ee.id,onSelect:()=>x(ee.id)},ee.id)):V?h.jsx("div",{className:J0,children:XE()}):h.jsxs(ss,{className:"py-2",children:[h.jsx(Dt,{})," ",C7e()]})}),(l===null||ie)&&h.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[h.jsx(Z_t,{gitVersion:l,error:ie}),ie?h.jsx("p",{className:iz,children:XE()}):h.jsx("p",{className:iz,children:F7e()})]}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Oe,{variant:"ghost",onClick:()=>s(0),children:[h.jsx(X0,{size:12})," ",KE()]}),(V||ie||l===null||o!==null&&!L)&&h.jsxs(Oe,{variant:"ghost",onClick:()=>G(!0,!0),disabled:S,children:[h.jsx(Za,{size:12,className:S?"animate-[spin_0.9s_linear_infinite]":""})," ",CCe()]}),h.jsx("div",{className:"flex-1"}),h.jsxs(Oe,{variant:"primary",onClick:()=>s(2),disabled:S||!L||m===null||!$,title:S?s9e():L?m===null?u7e():ie?MCe():l===void 0?e9e():l===null?J7e():void 0:u8e(),children:[QE()," ",h.jsx(b1,{size:13})]})]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(z2,{}),h.jsx("span",{children:j8e()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:D8e()}),h.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:h.jsxs("div",{className:MO,children:[h.jsxs("fieldset",{className:"onb-fieldset border-0 mt-0 mx-0 mb-4.5 p-0 [&_legend]:text-base [&_legend]:font-medium [&_legend]:mb-1.5",children:[h.jsx("legend",{children:l9e()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:a7e()}),h.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:G_t.map(ee=>h.jsxs("label",{className:"onb-area-option flex items-center gap-2 border border-border rounded-md cursor-pointer py-[9px] px-2.5 [&:has(input:checked)]:border-accent [&:has(input:checked)]:bg-primary-subtle [&_input]:m-0",children:[h.jsx("input",{type:"checkbox",checked:v.includes(ee.id),onChange:()=>oe(ee.id),disabled:u}),h.jsx("span",{children:ee.label()})]},ee.id))}),v.includes("Other")&&h.jsx("input",{className:"onb-other-area w-full mt-2",value:w,onChange:ee=>C(ee.target.value),disabled:u,placeholder:B8e(),"aria-label":xCe()})]}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:FCe()}),h.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:N,onChange:ee=>E(ee.target.value),disabled:u,rows:4,placeholder:T7e()}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:ICe()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:uke()}),h.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[h.jsx("input",{id:"onb-paper-search",value:M,onChange:ee=>O(ee.target.value),disabled:u,placeholder:KCe()}),U?h.jsx("div",{className:J0,children:ZCe()}):B.length>0?h.jsx("div",{className:"onb-paper-results flex flex-col border border-border rounded-md max-h-50 overflow-y-auto [&_button]:flex [&_button]:flex-col [&_button]:items-start [&_button]:gap-0.5 [&_button]:py-2 [&_button]:px-2.5 [&_button]:bg-none [&_button]:bg-transparent [&_button]:border-0 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-start [&_button]:[font:inherit] [&_button]:text-text [&_button]:cursor-pointer [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_.title]:text-sm [&_.title]:font-medium [&_.id]:text-xs [&_.id]:text-muted",children:B.map(ee=>h.jsxs("button",{type:"button",onClick:()=>te(ee),disabled:u,children:[h.jsx(Z0,{children:oz(ee.title)}),h.jsx("span",{className:"id",children:ee.paperId})]},ee.paperId))}):null]}),j.length>0&&h.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:j.map(ee=>h.jsxs("span",{className:"onb-paper-chip inline-flex items-center gap-1.5 pt-1 pe-1 pb-1 ps-2.5 border border-border rounded-sm bg-surface text-sm max-w-full [&_.title]:font-medium [&_.title]:overflow-hidden [&_.title]:text-ellipsis [&_.title]:whitespace-nowrap [&_.title]:max-w-60 [&_.id]:text-xs [&_.id]:text-muted [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:p-0.5 [&_button]:border-0 [&_button]:bg-none [&_button]:bg-transparent [&_button]:text-muted [&_button]:cursor-pointer [&_button]:rounded-xs [&_button:hover]:text-text [&_button:hover]:bg-panel",children:[h.jsx(Z0,{children:ee.title||ee.paperId}),h.jsx("span",{className:"id",children:ee.paperId}),h.jsx("button",{type:"button","aria-label":NQ({name:Ee(ee.paperId)}),onClick:()=>fe(ee.paperId),disabled:u,children:h.jsx(ts,{size:12})})]},ee.paperId))})]})}),!ne&&h.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:v.length===0?n7e():x7e()}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Oe,{variant:"ghost",onClick:()=>s(1),disabled:u,children:[h.jsx(X0,{size:12})," ",KE()]}),h.jsx("div",{className:"flex-1"}),h.jsx(Oe,{variant:"primary",onClick:()=>void Q(),disabled:u||m===null||!ne,children:u?h.jsxs(h.Fragment,{children:[h.jsx(Dt,{})," ",a8e()]}):h.jsxs(h.Fragment,{children:[I7e()," ",h.jsx(b1,{size:13})]})})]}),m===null&&h.jsx("p",{className:az,children:m9e()}),f&&h.jsx("p",{className:az,children:f})]})})})}function oz(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function K_t(e){return e.agentReady?{tone:"success",label:v8e()}:e.installed?e.installBroken?{tone:"warning",label:Q7e()}:e.authState==="unknown"?{tone:"warning",label:W8e()}:e.authState==="unsupported"?{tone:"warning",label:Y8e()}:e.installed?{tone:"warning",label:hCe()}:{tone:"neutral",label:YE()}:{tone:"neutral",label:YE()}}function Q_t(e){var t,r;const n=((t=e.models[0])==null?void 0:t.id)??null;return{harness:e.id,model:n,permissionMode:((r=e.options)==null?void 0:r.defaultPermissionMode)??null,reasoningLevel:Yv(e,n).defaultId}}function Y_t({harness:e}){return h.jsx(G4,{harness:e,size:26})}function X_t({h:e,selected:n,onSelect:t}){var l;const r=K_t(e),s=n?{tone:"success",label:n8e()}:r,a=[(l=e.version)==null?void 0:l.replace(/\s*\(.*\)$/,""),e.models.length>0&&`${e.models.length} model${e.models.length===1?"":"s"} — ${e.models.slice(0,3).map(u=>K1(u)).join(", ")}${e.models.length>3?", …":""}`].filter(Boolean).join(" · "),o=h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[h.jsx(Y_t,{harness:e.id}),h.jsx("span",{className:"onb-card-name text-lg font-semibold tracking-[-0.01em]",children:e.name})]}),h.jsx(Zv,{tone:s.tone,children:s.label})]});return e.agentReady?h.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected${n?" selected":""}`,"aria-pressed":n,onClick:t,children:[o,h.jsxs("div",{className:"onb-card-detail text-sm",children:[e.account??U5(),e.plan?` · ${e.plan}`:""]}),h.jsx("div",{className:`${J0} w-full overflow-hidden text-ellipsis whitespace-nowrap`,title:a,children:a})]}):h.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 onb-agent-choice w-full text-inherit [font:inherit] text-start transition-[border-color,box-shadow] duration-120 ease-standard [button&]:cursor-pointer [button&:hover]:border-muted [&.selected]:border-accent [&.selected]:shadow-selected",children:[o,h.jsx("div",{className:J0,children:Kp(e.agentNote)})]})}function Z_t({gitVersion:e,error:n}){return h.jsxs("div",{className:MO,children:[h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsx("span",{className:"onb-card-name font-semibold text-base",children:rCe()}),h.jsx(Zv,{tone:e?"success":n||e===null?"danger":"warning",children:e?TCe():n?Oke():e===null?ED():Pke()})]}),(e||!n&&e===void 0)&&h.jsx("div",{className:J0,children:e??Uke()})]})}const J_t="/assets/slurm-logo-aGSXVZcE.svg",e0t="/assets/thinking-machines-BOdslTfm.png";function t0t(e){switch(e){case"modal_job":return"Modal";case"hf_job":return"Hugging Face";case"k8s_job":return"Kubernetes";case"ssh_job":return"SSH";case"slurm_job":return"Slurm";case"ray_job":return"Ray";case"openresearch_job":return"OpenResearch";case"local_job":return mD();case"tinker_job":return"Tinker";default:return e||"—"}}function n0t({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[h.jsx("path",{d:"M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z",fill:"#FF9D0B"}),h.jsx("path",{d:"M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z",fill:"#FFD21E"}),h.jsx("path",{d:"M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-0.576-.393-.394-1.023-.089-0.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-0.586 0 1.107.79 3.263 3.25 3.263h-.003z",fill:"#FF323D"}),h.jsx("path",{d:"M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003z",fill:"#3A3B45"}),h.jsx("path",{d:"M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8z",fill:"#3A3B45"}),h.jsx("path",{d:"M4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-0.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-0.553.718-.694.244-.162.523-.265.814-.3l.176-.012z",fill:"#FF9D0B"}),h.jsx("path",{d:"M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-0.573.534-.375-.677-1.405-2.416-1.94-2.751-0.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-0.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-0.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-0.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-0.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-0.522z",fill:"#FFD21E"})]})}function r0t({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M121.683 75.25L149.997 124L91.4816 224.75C90.3128 226.757 88.155 228 85.8174 228H32.9664C31.7976 228 30.6778 227.691 29.697 227.131C28.7161 226.57 27.8906 225.758 27.3021 224.75L0.876625 179.25C-0.292208 177.243 -0.292208 174.765 0.876625 172.75L57.512 75.25C58.0923 74.2425 58.9259 73.43 59.9068 72.8694C60.8876 72.3088 62.0074 72 63.1762 72H116.027C118.365 72 120.523 73.2431 121.692 75.25H121.683ZM299.125 172.75L242.49 75.25C241.91 74.2425 241.076 73.43 240.095 72.8694C239.114 72.3088 237.995 72 236.826 72H183.975C181.637 72 179.479 73.2431 178.311 75.25L149.997 124L208.512 224.75C209.681 226.757 211.839 228 214.177 228H267.027C268.196 228 269.316 227.691 270.297 227.131C271.278 226.57 272.103 225.758 272.692 224.75L299.117 179.25C300.286 177.243 300.286 174.765 299.117 172.75H299.125Z",fill:"#62DE61"}),h.jsx("path",{d:"M89.6018 124H150.005L121.692 75.25C120.523 73.2431 118.365 72 116.027 72H63.1763C62.0074 72 60.8876 72.3088 59.9068 72.8694L89.6018 124Z",fill:"url(#orxModalA)"}),h.jsx("path",{d:"M89.6018 124L59.9068 72.8694C58.9259 73.43 58.1005 74.2425 57.512 75.25L0.876625 172.75C-0.292208 174.765 -0.292208 177.235 0.876625 179.25L27.3021 224.75C27.8825 225.758 28.7161 226.57 29.697 227.131L89.5936 124H89.6018Z",fill:"url(#orxModalB)"}),h.jsx("path",{d:"M149.997 124H89.5936L29.697 227.131C30.6778 227.691 31.7976 228 32.9664 228H85.8174C88.155 228 90.3128 226.757 91.4816 224.75L149.997 124Z",fill:"#09AF58"}),h.jsx("path",{d:"M299.125 179.25C299.706 178.243 300 177.121 300 176H240.61L210.915 227.131C211.896 227.691 213.016 228 214.185 228H267.036C269.373 228 271.531 226.757 272.7 224.75L299.125 179.25Z",fill:"#09AF58"}),h.jsx("path",{d:"M183.975 72C182.806 72 181.686 72.3088 180.705 72.8694L240.602 176H299.992C299.992 174.879 299.698 173.758 299.117 172.75L242.49 75.25C241.321 73.2431 239.163 72 236.826 72H183.967H183.975Z",fill:"url(#orxModalC)"}),h.jsx("path",{d:"M210.907 227.131L240.602 176L180.705 72.8694C179.725 73.43 178.899 74.2425 178.311 75.25L149.997 124L208.512 224.75C209.093 225.758 209.926 226.57 210.907 227.131Z",fill:"url(#orxModalD)"}),h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),h.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function s0t({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:h.jsx("path",{d:"M10.204 14.35l.007.01-.999 2.413a5.171 5.171 0 0 1-2.075-2.597l2.578-.437.004.005a.44.44 0 0 1 .484.606zm-.833-2.129a.44.44 0 0 0 .173-.756l.002-.011L7.585 9.7a5.143 5.143 0 0 0-.73 3.255l2.514-.725.002-.009zm1.145-1.98a.44.44 0 0 0 .699-.337l.01-.005.15-2.62a5.144 5.144 0 0 0-3.01 1.442l2.147 1.523.004-.002zm.76 2.75l.723.349.722-.347.18-.78-0.5-.623h-.804l-0.5.623.179.779zm1.5-3.095a.44.44 0 0 0 .7.336l.008.003 2.134-1.513a5.188 5.188 0 0 0-2.992-1.442l.148 2.615.002.001zm10.876 5.97l-5.773 7.181a1.6 1.6 0 0 1-1.248.594l-9.261.003a1.6 1.6 0 0 1-1.247-0.596l-5.776-7.18a1.583 1.583 0 0 1-.307-1.34L2.1 5.573c.108-.47.425-.864.863-1.073L11.305.513a1.606 1.606 0 0 1 1.385 0l8.345 3.985c.438.209.755.604.863 1.073l2.062 8.955c.108.47-.005.963-.308 1.34zm-3.289-2.057c-.042-.01-.103-.026-.145-.034-.174-.033-.315-.025-.479-.038-.35-.037-.638-.067-.895-.148-.105-.04-.18-.165-.216-.216l-.201-.059a6.45 6.45 0 0 0-.105-2.332 6.465 6.465 0 0 0-.936-2.163c.052-.047.15-.133.177-.159.008-.09.001-.183.094-.282.197-.185.444-.338.743-0.522.142-.084.273-.137.415-.242.032-.024.076-.062.11-.089.24-.191.295-0.52.123-.736-.172-.216-0.506-.236-.745-.045-.034.027-.08.062-.111.088-.134.116-.217.23-.33.35-.246.25-.45.458-.673.609-.097.056-.239.037-.303.033l-.19.135a6.545 6.545 0 0 0-4.146-2.003l-.012-.223c-.065-.062-.143-.115-.163-.25-.022-.268.015-0.557.057-.905.023-.163.061-.298.068-.475.001-.04-.001-.099-.001-.142 0-.306-.224-0.555-0.5-0.555-.275 0-.499.249-.499.555l.001.014c0 .041-.002.092 0 .128.006.177.044.312.067.475.042.348.078.637.056.906a.545.545 0 0 1-.162.258l-.012.211a6.424 6.424 0 0 0-4.166 2.003 8.373 8.373 0 0 1-.18-.128c-.09.012-.18.04-.297-.029-.223-.15-.427-.358-.673-.608-.113-.12-.195-.234-.329-.349-.03-.026-.077-.062-.111-.088a.594.594 0 0 0-.348-.132.481.481 0 0 0-.398.176c-.172.216-.117.546.123.737l.007.005.104.083c.142.105.272.159.414.242.299.185.546.338.743.522.076.082.09.226.1.288l.16.143a6.462 6.462 0 0 0-1.02 4.506l-.208.06c-.055.072-.133.184-.215.217-.257.081-0.546.11-.895.147-.164.014-.305.006-.48.039-.037.007-.09.02-.133.03l-.004.002-.007.002c-.295.071-.484.342-.423.608.061.267.349.429.645.365l.007-.001.01-.003.129-.029c.17-.046.294-.113.448-.172.33-.118.604-.217.87-.256.112-.009.23.069.288.101l.217-.037a6.5 6.5 0 0 0 2.88 3.596l-.09.218c.033.084.069.199.044.282-.097.252-.263.517-.452.813-.091.136-.185.242-.268.399-.02.037-.045.095-.064.134-.128.275-.034.591.213.71.248.12.556-.007.69-.282v-.002c.02-.039.046-.09.062-.127.07-.162.094-.301.144-.458.132-.332.205-.68.387-.897.05-.06.13-.082.215-.105l.113-.205a6.453 6.453 0 0 0 4.609.012l.106.192c.086.028.18.042.256.155.136.232.229.507.342.84.05.156.074.295.145.457.016.037.043.09.062.129.133.276.442.402.69.282.247-.118.341-.435.213-.71-.02-.039-.045-.096-.065-.134-.083-.156-.177-.261-.268-.398-.19-.296-.346-0.541-.443-.793-.04-.13.007-.21.038-.294-.018-.022-.059-.144-.083-.202a6.499 6.499 0 0 0 2.88-3.622c.064.01.176.03.213.038.075-.05.144-.114.28-.104.266.039.54.138.87.256.154.06.277.128.448.173.036.01.088.019.13.028l.009.003.007.001c.297.064.584-.098.645-.365.06-.266-.128-0.537-.423-.608zM16.4 9.701l-1.95 1.746v.005a.44.44 0 0 0 .173.757l.003.01 2.526.728a5.199 5.199 0 0 0-.108-1.674A5.208 5.208 0 0 0 16.4 9.7zm-4.013 5.325a.437.437 0 0 0-.404-.232.44.44 0 0 0-.372.233h-.002l-1.268 2.292a5.164 5.164 0 0 0 3.326.003l-1.27-2.296h-.01zm1.888-1.293a.44.44 0 0 0-.27.036.44.44 0 0 0-.214.572l-.003.004 1.01 2.438a5.15 5.15 0 0 0 2.081-2.615l-2.6-.44-.004.005z"})})}function i0t({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:h.jsx("path",{d:"M16.153 12.826c-.63-.183-1.03.15-1.378.846-0.58 1.13-1.643 1.644-2.888 1.594-1.245-.05-2.257-.63-2.788-1.776-.233-.498-.498-.664-1.046-.68-.93-.017-1.643.016-2.174 1.062-.631 1.261-2.258 1.693-3.619 1.261a3.234 3.234 0 0 1-2.257-3.22 3.198 3.198 0 0 1 2.29-3.02 3.276 3.276 0 0 1 3.702 1.327c.216.315.216.863.597.93.648.1 1.328.033 1.992.033.299 0 .316-.266.399-.465.58-1.295 1.61-1.959 2.987-1.975 1.361-.017 2.39.647 2.955 1.892.215.465.48.598.946.548.166-.017.332.016.498 0 .464-.083 1.062.282 1.344-.448.282-.73-.382-.913-.68-1.245-.847-.946-1.81-1.793-2.673-2.706-.415-.465-.763-.614-1.41-.415-1.876.614-3.619-.431-4.15-2.357-.448-1.676.714-3.535 2.44-3.917a3.293 3.293 0 0 1 3.95 2.457c.017.05.017.083.033.133.117.564.117 1.145-.132 1.626-.283.531-.133.83.249 1.195a152.61 152.61 0 0 1 3.286 3.27c.299.299.498.349.913.2 1.51-0.565 2.97-.1 3.884 1.161a3.266 3.266 0 0 1-.067 3.801c-.896 1.195-2.357 1.643-3.834 1.079-.381-.15-0.58-.1-.846.182a163.619 163.619 0 0 1-3.403 3.386c-.299.3-.415.532-.232.98a3.198 3.198 0 0 1-1.278 3.917A3.298 3.298 0 0 1 9.646 23c-1.062-1.062-1.228-2.688-.415-4.033a3.196 3.196 0 0 1 3.835-1.294c.498.182.78.083 1.145-.283 1.012-1.045 2.058-2.058 3.087-3.103.266-.266.68-.449.432-1.03-.233-0.547-.631-.414-1.03-.431zM11.97 4.942c.913.016 1.643-.714 1.66-1.627v-.05a1.646 1.646 0 0 0-1.76-1.56 1.63 1.63 0 0 0-1.543 1.527 1.638 1.638 0 0 0 1.577 1.71zm.033 5.41a1.658 1.658 0 0 0-1.676 1.61v.084a1.73 1.73 0 0 0 1.643 1.66c.847.016 1.643-.78 1.677-1.627a1.648 1.648 0 0 0-1.577-1.71c-.017-.016-.05-.016-.067-.016zm7.088 1.694c.016.896.747 1.61 1.626 1.643a1.723 1.723 0 0 0 1.66-1.726 1.666 1.666 0 0 0-1.66-1.61 1.623 1.623 0 0 0-1.643 1.577c.017.05.017.083.017.116zM3.24 10.353a1.692 1.692 0 0 0-1.66 1.626c-.017.847.863 1.727 1.693 1.71a1.687 1.687 0 0 0 1.626-1.743 1.615 1.615 0 0 0-1.643-1.593Zm8.68 12c.98.033 1.71-.647 1.727-1.593a1.646 1.646 0 0 0-1.51-1.793 1.646 1.646 0 0 0-1.793 1.51v.233a1.609 1.609 0 0 0 1.543 1.66c0-.017.017-.017.033-.017z"})})}function a0t({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[h.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),h.jsx("path",{d:"M15.375 16.782v63.843a4 4 0 0 0 4 4h63.843c3.564 0 5.348-4.309 2.829-6.828L22.203 13.953c-2.52-2.52-6.828-.735-6.828 2.829",fill:"#fff"})]})}function o0t({size:e=16}){return h.jsx("img",{className:"tinker-logo block flex-none object-contain",src:e0t,width:e,height:e,style:{transform:e>=48?`translateX(${Math.round(e*.18)}px) scale(1.65)`:"scale(1.22)"},alt:"","aria-hidden":"true"})}function l0t({size:e=16}){return h.jsx("img",{className:"block flex-none object-contain",src:J_t,width:e,height:e,alt:"","aria-hidden":"true"})}function ib({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-0.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-0.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"})})}function i_({kind:e,size:n=16}){switch(e){case"modal_job":return h.jsx(r0t,{size:n});case"hf_job":return h.jsx(n0t,{size:n});case"k8s_job":return h.jsx(s0t,{size:n});case"ssh_job":return h.jsx(rz,{size:n,strokeWidth:1.5});case"slurm_job":return h.jsx(l0t,{size:n});case"ray_job":return h.jsx(i0t,{size:n});case"openresearch_job":return h.jsx(a0t,{size:n});case"tinker_job":return h.jsx(o0t,{size:n});case"local_job":return h.jsx(Jht,{size:n,strokeWidth:1.5});default:return h.jsx(rz,{size:n})}}function N6({backend:e}){const n=e6(e),t=Pct(e);return n?h.jsxs("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted",children:[h.jsx(i_,{kind:n}),h.jsx("span",{className:"backend-name",children:t0t(n)}),t&&h.jsx("span",{className:"backend-detail text-sm",children:t})]}):h.jsx("span",{className:"backend-badge inline-flex items-center gap-[7px] [&_svg]:flex-none [&_svg]:block [&_.backend-name]:font-medium [&_.backend-detail]:text-muted [&.muted]:text-muted muted text-muted",children:"—"})}function T2(e,n){const[t,r]=R.useState(e);return R.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function Ag(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function c0t(e){const t=(e.trim().split(/[?#]/)[0].split("/").filter(Boolean).pop()??"").replace(/\.(pdf|md)$/i,"");return/^\d{4}\.\d{4,5}(v\d+)?$/.test(t)?t:null}function u0t(e){const n=e==null?void 0:e.trim().match(/github\.com[/:]([^/]+)\/([^/?#]+)/i);return n?{owner:n[1],repo:n[2].replace(/\.git$/,"")}:null}function f0t(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function d0t({onCreated:e,onCancel:n,remote:t=!1}){var cr,pn,An,fn;const[r,s]=R.useState("blank"),[i,a]=R.useState(""),[o,l]=R.useState(!1),[u,_]=R.useState(""),[f,p]=R.useState(!1),[m,x]=R.useState(!1),[S,b]=R.useState(!1),[v,y]=R.useState(null),[w,C]=R.useState(!1),[N,E]=R.useState(!1),[j,z]=R.useState(""),[M,O]=R.useState(null),[B,F]=R.useState(!1),U=R.useRef(0),H=R.useRef(0),Y=R.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),V=r==="paper"?u0t(M==null?void 0:M.repoUrl):null,X=i.trim()?`~/OpenResearch/${Ag(i,48)}`:"",ie=`~/OpenResearch/${Ag(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,I=r==="blank"&&!f?X:r==="paper"&&M&&!f?ie:u,L=T2(I.trim(),200),$=ct({...j0(L),enabled:!!L&&L===I.trim()}),q=L===I.trim()?$.data??null:null,G=L===I.trim()?((cr=$.error)==null?void 0:cr.message)??null:null,te=!!I.trim()&&(L!==I.trim()||$.isFetching),fe=V??(r==="folder"&&(q!=null&&q.githubOwner)&&q.githubRepo?{owner:q.githubOwner,repo:q.githubRepo}:null),oe=ct(wut()),ne=((pn=oe.data)==null?void 0:pn.login)??(oe.isPending?void 0:null),Q=ct(t6()),ce=R.useRef(!1);R.useEffect(()=>{ce.current||!Q.data||(ce.current=!0,E(Q.data.githubForNewProjects))},[Q.data]);const ee=T2(i.trim(),150),le=ct({...Sut(ee),enabled:ee===i.trim()}),he=ee===i.trim()?((An=le.data)==null?void 0:An.repo)??Ag(i,48):Ag(i,48),xe=ee!==i.trim()||le.isFetching,Te=ct({...DN((fe==null?void 0:fe.owner)??"",(fe==null?void 0:fe.repo)??""),enabled:!!fe,subscribed:!!fe}),Ze=!!fe&&Te.isFetching,Ue=fe&&((fn=Te.data)!=null&&fn.canPush)?`github.com/${fe.owner}/${fe.repo}`:null,Ie=T2(j.trim(),350),vt=c0t(Ie),bt=r==="paper"&&!M&&Ie===j.trim(),It=ct({...ML(Ie),enabled:bt&&!vt&&Ie.length>=3,subscribed:bt&&!vt&&Ie.length>=3}),Bt=ct({...L4(vt??""),enabled:bt&&!!vt,subscribed:bt&&!!vt}),Et=bt&&!vt?It.data??[]:[],rt=bt&&It.isSuccess?Ie:"",ft=B||r==="paper"&&!M&&(Ie!==j.trim()||(vt?Bt.isFetching:It.isFetching));R.useEffect(()=>{var pt;!bt||!vt||!Bt.data||(O(Bt.data),o||a(((pt=Bt.data.title)==null?void 0:pt.trim())||Bt.data.paperId))},[bt,vt,Bt.data,o]),R.useEffect(()=>{const pt=vt?Bt.error:It.error;bt&&pt&&y(pt.message)},[bt,vt,Bt.error,It.error]);const Lt=Rn({mutationFn:Rot});async function we(pt){var He;const St=++U.current;F(!0),y(null);try{const ht=await tt.fetchQuery(L4(pt));if(St!==U.current)return;O(ht),o||a(((He=ht.title)==null?void 0:He.trim())||ht.paperId)}catch(ht){St===U.current&&y(ht instanceof Error?ht.message:String(ht))}finally{St===U.current&&F(!1)}}function Ae(){U.current+=1,H.current+=1,O(null),z(""),F(!1),x(!1),_(""),p(!1),Y.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function Xe(pt){if(pt===r)return;U.current+=1,H.current+=1,Y.current[r]={name:i,nameTouched:o,path:u,pathTouched:f};const St=Y.current[pt];s(pt),y(null),F(!1),x(!1),a(St.name),l(St.nameTouched),_(St.path),p(St.pathTouched)}async function dt(){if(m)return;const pt=++H.current;x(!0),y(null);try{const St=await Aot();if(pt!==H.current||!St)return;if(p(!0),_(St),tt.invalidateQueries(j0(St)),r==="folder"&&!o){const He=St.replace(/[\\/]+$/,"").split(/[\\/]/).pop();He&&a(He)}}catch(St){pt===H.current&&y(St instanceof Error?St.message:String(St))}finally{pt===H.current&&x(!1)}}async function xt(pt){if(pt.preventDefault(),!!gt){b(!0),y(null);try{const St=await tt.fetchQuery({...j0(I.trim()),staleTime:0});if(St.exists&&St.directory===!1)throw new Error(p2());if(r==="blank"&&St.exists)throw new Error(HE());if(r==="paper"&&St.empty===!1)throw new Error(VE());N&&fe&&await tt.fetchQuery({...DN(fe.owner,fe.repo),staleTime:0}).catch(()=>null);const He=await Lt.mutateAsync({name:i.trim(),path:I.trim(),createFolder:r!=="folder",requireNewFolder:r==="blank",initializeGit:!0,githubSyncEnabled:N,locale:T(),...r==="paper"&&M?{paperId:M.paperId,cloneUrl:M.repoUrl??void 0}:{}});e(He.project,He.githubPublicationError)}catch(St){y(St instanceof Error?St.message:String(St))}finally{b(!1)}}}const Ut=i.trim(),We=r==="paper"&&M&&!M.repoUrl?M.paperId:null,Ht=r==="folder"&&(q==null?void 0:q.gitState)==="ready"?q.resolvedPath??null:null,ln=Ut!==""&&(r==="blank"||We!==null||Ht!==null);R.useEffect(()=>{if(!ln)return;const pt=window.setTimeout(()=>{Bot({name:Ut,paperId:We??void 0,path:Ht??void 0,locale:T()}).catch(()=>{})},1200);return()=>window.clearTimeout(pt)},[ln,Ut,We,Ht]);const _n=(q==null?void 0:q.gitVersion)===null,Yt=r==="folder"&&!!I.trim()&&q!==null&&q.exists===!1,Xn=r==="blank"&&(q==null?void 0:q.exists)===!0,Xt=!!I.trim()&&(q==null?void 0:q.exists)===!0&&q.directory===!1,jn=r==="paper"&&!!(M!=null&&M.repoUrl)&&(q==null?void 0:q.empty)===!1,or=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(q==null?void 0:q.empty)===!1,lr=r==="folder"&&((q==null?void 0:q.gitState)==="detached"||(q==null?void 0:q.gitState)==="invalid"),vr=f&&!I.trim()||Xt||jn||or,Mn=f&&!I.trim()||Xt||Xn,Gr=f&&!I.trim()?WE():Xt?p2():Xn?HE():null,Er=f&&!I.trim()?WE():Xt?p2():jn?VE():or?f5e():null,gt=!!(i.trim()&&I.trim())&&!S&&!m&&!te&&q!==null&&!G&&!_n&&!Yt&&!Xn&&!Xt&&!jn&&!or&&!lr&&(r!=="paper"||!!M)&&(!N||typeof ne=="string"&&!xe&&!Ze),dn=Ue??`github.com/${ne??"you"}/${he}`,Nn=ne===void 0||xe||Ze,Zt=r==="paper"&&!M&&j.trim().length>=3&&rt===j.trim()&&!ft&&Et.length===0&&!v;return h.jsxs("form",{className:"form [&_.form-seg]:self-start [&_.form-seg]:mb-0.5 [&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3 [&_.repo-hint]:font-normal [&_.repo-hint]:text-sm [&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal [&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center [&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full [&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5 [&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background [&_.folder-picker-control]:border [&_.folder-picker-control]:border-border [&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer [&_.folder-picker-control]:text-start [&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard [&_.folder-picker-control:hover:not(:disabled)]:border-muted [&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle [&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text [&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1 [&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden [&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap [&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none [&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none [&_.folder-picker-chevron]:text-muted [&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext [&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm [&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4] [&_.project-location-field]:flex [&_.project-location-field]:flex-col [&_.project-location-field]:gap-2 [&_.project-location-label]:text-text [&_.project-location-label]:text-base [&_.project-location-label]:font-medium [&_.project-field-label]:text-text [&_.project-field-label]:text-base [&_.project-field-label]:font-medium [&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65 [&_.paper-destination]:flex [&_.paper-destination]:items-center [&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3 [&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md [&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1 [&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden [&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm [&_.paper-destination_code]:font-normal [&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap [&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px] [&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant [&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface [&_.project-path-notice]:text-subtext [&_.project-path-notice]:text-sm [&_.project-path-notice]:leading-[1.4] [&_.project-path-notice.error]:border-danger-notice-border [&_.paper-results]:flex [&_.paper-results]:flex-col [&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md [&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto [&_.paper-results_button]:flex [&_.paper-results_button]:flex-col [&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5 [&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent [&_.paper-results_button]:border-0 [&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant [&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit] [&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer [&_.paper-results_button:last-child]:border-b-0 [&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm [&_.paper-results_.title]:font-medium [&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted [&_.paper-pick_.id]:text-xs [&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center [&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3 [&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md [&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0 [&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium flex flex-col [&_label]:flex [&_label]:flex-col [&_label]:gap-1 [&_label]:text-sm [&_label]:text-text [&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2 [&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end [&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start [&_.new-project-actions]:mt-2.5 [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap new-project-form gap-4.5 [&_>_label]:gap-2",onSubmit:xt,children:[h.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default form-seg",children:[h.jsx("button",{type:"button",className:r==="blank"?"active":"","aria-pressed":r==="blank",onClick:()=>Xe("blank"),children:V5e()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="paper"?"":" invisible"}`}),h.jsx("button",{type:"button",className:r==="folder"?"active":"","aria-pressed":r==="folder",onClick:()=>Xe("folder"),children:m6e()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${r==="blank"?"":" invisible"}`}),h.jsx("button",{type:"button",className:r==="paper"?"active":"","aria-pressed":r==="paper",onClick:()=>Xe("paper"),children:k6e()})]}),r==="paper"&&!M&&h.jsxs("label",{className:"!font-normal",children:[V6e(),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:j,onChange:pt=>{y(null),z(pt.target.value)},placeholder:rSe()}),!Zt&&h.jsx("span",{className:"repo-hint",children:ft?QSe():FSe()}),Zt&&h.jsx("span",{className:"project-path-notice block",children:L6e()}),Et.length>0&&h.jsx("div",{className:"paper-results",children:Et.map(pt=>h.jsxs("button",{type:"button",onClick:()=>void we(pt.paperId),children:[h.jsx(Z0,{children:pt.title}),h.jsx("span",{className:"id",children:pt.paperId})]},pt.paperId))})]}),M&&r==="paper"&&h.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[h.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[h.jsxs("div",{className:"meta",children:[h.jsx(Z0,{className:"block",children:M.title||M.paperId}),M.repoUrl&&h.jsx("div",{className:"id",children:f0t(M.repoUrl)})]}),h.jsx(Oe,{size:"small",type:"button","aria-label":i6e(),onClick:Ae,children:t6e()})]}),!M.repoUrl&&h.jsxs("div",{className:"flex w-full flex-col items-start gap-1 rounded-md border border-border-variant bg-background px-[9px] py-1 text-sm font-normal text-subtext",children:[h.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[h.jsx(bO,{size:16})," ",$6e()]}),h.jsx("span",{className:"text-sm font-normal text-accent-amber",children:q6e()})]})]}),(r!=="paper"||M)&&h.jsxs(h.Fragment,{children:[r==="blank"&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:GE()}),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:pt=>{l(!0),a(pt.target.value)},placeholder:UE()})]}),r==="paper"?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?E5e():m2()}),h.jsx("input",{className:"text-sm font-normal",value:I,onChange:pt=>{p(!0),_(pt.target.value)},"aria-describedby":vr?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),te&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:qE()}),vr&&h.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Er})]}):r==="folder"&&!t?h.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?p5e({path:Ee(u)}):PE(),disabled:m,title:u||void 0,onClick:()=>void dt(),children:[h.jsx(Df,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),h.jsx("span",{className:u?"text-sm":"placeholder",children:m?w5e():u||PE()}),h.jsx(Vo,{className:"folder-picker-chevron",size:15})]}):r==="folder"?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:m2()}),h.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:pt=>{p(!0),_(pt.target.value)},placeholder:"/home/user/project",spellCheck:!1,dir:"ltr"})]}):i.trim()?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:m2()}),h.jsx("input",{className:"text-sm font-normal",value:I,onChange:pt=>{p(!0),_(pt.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":Mn?"blank-destination-description":void 0,spellCheck:!1}),te&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:qE()}),Mn&&h.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Gr})]}):null,r!=="blank"&&I&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:GE()}),h.jsx("input",{className:"text-sm font-normal",value:i,onChange:pt=>{l(!0),a(pt.target.value)},placeholder:UE()})]}),_n&&h.jsx("div",{className:"project-path-notice error",children:z6e()}),!_n&&r==="folder"&&u.trim()&&!te&&(q==null?void 0:q.exists)===!1&&h.jsx("div",{className:"project-path-notice error",children:fSe()}),!_n&&r==="folder"&&u.trim()&&!te&&Xt&&h.jsx("div",{className:"project-path-notice error",children:bSe()}),!_n&&r==="folder"&&!te&&(q==null?void 0:q.gitState)==="detached"&&h.jsx("div",{className:"project-path-notice error",children:c6e()}),!_n&&r==="folder"&&!te&&(q==null?void 0:q.gitState)==="invalid"&&h.jsx("div",{className:"project-path-notice error",children:pSe()}),G&&h.jsx("div",{className:"project-path-notice error",role:"alert",children:G})]}),v&&h.jsx("div",{className:"error",role:"alert",children:v}),(r!=="paper"||M)&&I&&(r!=="blank"||i.trim())&&h.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[h.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium${N&&ne===null?" text-accent-red":" text-text"}`,"aria-expanded":w,"aria-controls":"new-project-advanced-settings",onClick:()=>C(pt=>!pt),children:[N?ne===null?r5e():o5e():J3e(),h.jsx(Wo,{className:w?"rotate-180":"",size:16})]}),w&&h.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[h.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[h.jsx("input",{className:"m-0",type:"checkbox",checked:N,onChange:pt=>E(pt.target.checked),disabled:S}),h.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:oSe()})]}),h.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[h.jsx("span",{children:Nn?SSe({repository:Ee(dn)}):Ue?ASe({repository:Ee(dn)}):NSe({repository:Ee(dn)})}),h.jsx("span",{children:y6e()}),ne===null&&h.jsx("span",{children:GSe({command:Ee("gh auth login")})})]})]})]}),h.jsxs("div",{className:"actions new-project-actions",children:[n&&h.jsx(Oe,{type:"button",onClick:n,children:X5e()}),h.jsx(Oe,{variant:"primary",className:"ms-auto",disabled:!gt,children:S?I5e():r==="paper"?M!=null&&M.repoUrl?j5e():FE():r==="folder"?JSe():FE()})]})]})}function DO({onClose:e,onCreated:n,remote:t=!1}){const r=R.useRef(null),s=R.useRef(e);return s.current=e,R.useEffect(()=>{const i=r.current;if(!i)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...i.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(i.querySelector("[data-initial-focus]")??o()[0]??i).focus();const l=u=>{if(u.key==="Escape"){u.preventDefault(),u.stopPropagation(),s.current();return}if(u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&!u.altKey&&u.shiftKey){u.preventDefault(),u.stopPropagation();return}if(u.key!=="Tab")return;const _=o();if(_.length===0){u.preventDefault(),i.focus();return}const f=_[0],p=_[_.length-1];u.shiftKey&&document.activeElement===f?(u.preventDefault(),p.focus()):!u.shiftKey&&document.activeElement===p&&(u.preventDefault(),f.focus())};return document.addEventListener("keydown",l,!0),()=>{document.removeEventListener("keydown",l,!0),a==null||a.focus()}},[]),h.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-start justify-center p-5 [--new-project-modal-top:clamp(4rem,20vh,24rem)] pt-[var(--new-project-modal-top)] overflow-y-auto z-100",onClick:i=>{i.target===i.currentTarget&&e()},children:h.jsxs("div",{ref:r,className:"modal w-120 max-w-full max-h-[calc(100vh_-_var(--new-project-modal-top)_-_1.25rem)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl [&_h2]:font-medium",role:"dialog","aria-modal":"true","aria-labelledby":"new-project-dialog-title",tabIndex:-1,children:[h.jsx("h2",{id:"new-project-dialog-title",children:RD()}),h.jsx(d0t,{onCancel:e,onCreated:n,remote:t})]})})}function h0t({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=R.useRef(null),a=R.useRef(r),o=R.useRef(n);a.current=r,o.current=n,R.useEffect(()=>{const u=i.current;if(!u)return;const _=document.activeElement instanceof HTMLElement?document.activeElement:null,f=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(f()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),o.current||a.current();return}if(m.key!=="Tab")return;const x=f();if(x.length===0){m.preventDefault(),u.focus();return}const S=x[0],b=x[x.length-1];m.shiftKey&&document.activeElement===S?(m.preventDefault(),b.focus()):!m.shiftKey&&document.activeElement===b&&(m.preventDefault(),S.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),_==null||_.focus()}},[]);const l=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return h.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:u=>{!n&&u.target===u.currentTarget&&r()},children:h.jsxs("div",{ref:i,className:"modal w-110 max-w-full bg-background border border-border rounded-xl shadow-modal p-6",role:"dialog","aria-modal":"true","aria-labelledby":"delete-project-dialog-title","aria-describedby":"delete-project-dialog-description",tabIndex:-1,children:[h.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:GTe()}),h.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[h.jsx("p",{className:"m-0",children:ETe({name:Oo(e.name)})}),h.jsx("p",{className:"m-0",children:l?aje():uje()}),t&&h.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),h.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h.jsx(Oe,{disabled:n,onClick:r,children:ITe()}),h.jsx(Oe,{variant:"danger",disabled:n,onClick:s,children:n?JTe():QTe()})]})]})})}function lz(){return h.jsx("span",{className:"activity-pulse h-2 w-2 shrink-0 rounded-full bg-accent-teal animate-[or-pulse_1.2s_ease-in-out_infinite]"})}function _0t({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,a]=R.useState(!1),[o,l]=R.useState(null),[u,_]=R.useState(null),[f,p]=R.useState(null),m=ct(xut()),x=Object.fromEntries((m.data??[]).map(b=>[b.projectId,b]));async function S(b){l(b.id),_(null);try{await Fot(b.id),_(null),p(null),r(b.id)}catch(v){_(v instanceof Error?v.message:String(v))}finally{l(null)}}return h.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[h.jsxs("div",{className:"home-inner max-w-290 my-0 mx-auto pt-12 px-6 pb-16 [@media((max-width:_960px))]:pt-6 [@media((max-width:_960px))]:px-4",children:[h.jsxs("div",{className:"home-head flex items-center justify-between gap-3 mb-4.5 [&_h2]:m-0 [&_h2]:text-4xl [&_h2]:tracking-[-0.02em] [@media((max-width:_520px))]:items-start [@media((max-width:_520px))]:flex-col",children:[h.jsx("h2",{children:Cje()}),h.jsxs(Oe,{onClick:()=>a(!0),children:[h.jsx(S6,{size:15})," ",RD()]})]}),h.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:h.jsxs("div",{children:[h.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border bg-background py-2.5 ps-4 pe-2 text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:hidden",children:[h.jsx("span",{children:xje()}),h.jsx("span",{children:tN()}),h.jsx("span",{children:nN()}),h.jsx("span",{children:rN()})]}),e.length===0?h.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:gje()}):[...e].sort((b,v)=>{var C,N;const y=((C=x[b.id])==null?void 0:C.lastMessageAt)??b.createdAt;return(((N=x[v.id])==null?void 0:N.lastMessageAt)??v.createdAt)-y||b.name.localeCompare(v.name)}).map(b=>{const v=x[b.id],y=b.githubEnabled?b.githubUrl??(b.githubOwner&&b.githubRepo?`https://github.com/${b.githubOwner}/${b.githubRepo}`:null):null,w=y?b.githubOwner&&b.githubRepo?`${b.githubOwner}/${b.githubRepo}`:y.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):MD(),C=v?v.activeAgents>0?vTe({count:tn(v.activeAgents)}):Rje():"—",N=v?v.totalAgents===1?$je():wTe({count:tn(v.totalAgents)}):"—",E=v?v.runningExperiments>0?qje({count:tn(v.runningExperiments)}):v.totalExperiments===0?V5():sN({count:tn(v.totalExperiments)}):"—",j=v&&v.runningExperiments>0?sN({count:tn(v.totalExperiments)}):null;return h.jsxs("div",{className:"group project-row relative grid cursor-pointer grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border-variant py-4 ps-4 pe-2 text-start transition-colors duration-120 ease-standard last:border-b-0 hover:bg-surface-bright focus-within:bg-surface-bright [@media((max-width:_960px))]:grid-cols-[minmax(0,0.8fr)_minmax(0,0.8fr)_minmax(0,1.4fr)] [@media((max-width:_960px))]:items-start [@media((max-width:_960px))]:gap-x-4 [@media((max-width:_960px))]:gap-y-3 [@media((max-width:_960px))]:py-4 [@media((max-width:_960px))]:px-4 [@media((max-width:_600px))]:grid-cols-2",children:[h.jsx("button",{className:"project-row-open absolute inset-0 z-0 cursor-pointer rounded-[inherit] focus-visible:outline focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-[-2px]","aria-label":eQ({name:Oo(b.name)}),onClick:()=>n(b.id)}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none [@media((max-width:_960px))]:col-span-3 [@media((max-width:_600px))]:col-span-2",children:[h.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:b.name}),h.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[h.jsxs("span",{children:[FTe()," ",$o(b.createdAt)]}),b.paperId&&h.jsx("span",{"aria-hidden":"true",children:"·"}),b.paperId&&h.jsxs("span",{children:[MTe()," ",Ee(b.paperId)]}),h.jsx("button",{className:"project-row-secondary project-row-delete inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm leading-0 text-muted opacity-0 pointer-events-none transition-opacity hover:bg-surface hover:text-accent-red group-hover:opacity-100 group-hover:pointer-events-auto group-focus-within:opacity-100 group-focus-within:pointer-events-auto focus:opacity-100 focus:pointer-events-auto focus-visible:outline focus-visible:outline-2 focus-visible:outline-text","aria-label":m4({name:Oo(b.name)}),disabled:o===b.id,onClick:z=>{z.stopPropagation(),_(null),p(b)},children:h.jsx(s_,{size:14})})]})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:tN()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[v&&v.activeAgents>0&&h.jsx(lz,{}),C]}),h.jsx("span",{className:"text-xs text-muted",children:N})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:nN()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[v&&v.runningExperiments>0&&h.jsx(lz,{}),E]}),j&&h.jsx("span",{className:"text-xs text-muted",children:j})]}),h.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:mb-1 [@media((max-width:_960px))]:block",children:rN()}),y?h.jsxs("a",{className:"project-row-secondary inline-flex max-w-full items-center gap-2 text-sm text-text no-underline pointer-events-auto hover:underline underline-offset-2",href:y,target:"_blank",rel:"noreferrer","aria-label":U1({name:Oo(b.name)}),children:[h.jsx("span",{className:"inline-flex shrink-0",children:h.jsx(ib,{size:14})}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ee(w)})]}):h.jsx("span",{className:"text-sm text-text pointer-events-none",children:w})]})]},b.id)})]})})]}),i&&h.jsx(DO,{remote:s,onClose:()=>a(!1),onCreated:(b,v)=>{a(!1),t(b,v)}}),f&&h.jsx(h0t,{project:f,deleting:o===f.id,error:u,onClose:()=>{_(null),p(null)},onConfirm:()=>void S(f)})]})}function LO(){const e=R.useSyncExternalStore(mut,AN,AN);return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":b4()}),!e&&h.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[h.jsx(bO,{size:13,className:"shrink-0 text-accent-amber"}),h.jsx("span",{dir:"auto",className:"min-w-0",children:b4()})]})]})}const OO=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),cz=["model-more [&_code]:font-mono [&_code]:text-xs","[&_code]:bg-panel [&_code]:border [&_code]:border-border-variant","[&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap","pt-1 px-2 pb-2 text-sm text-muted"].join(" "),y0={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode"};function p0t(e){var r,s;const n=e.find(i=>i.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:Y1(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Yv(n,t).defaultId}}function Ja(e){const[n,t]=R.useState(!1),r=R.useRef(null);return R.useEffect(()=>{if(!n)return;const s=a=>{var o,l;a.target instanceof Node&&!((o=r.current)!=null&&o.contains(a.target))&&!((l=e==null?void 0:e.current)!=null&&l.contains(a.target))&&t(!1)},i=a=>{var o;a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t(!1),(o=e==null?void 0:e.current)==null||o.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",i,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",i,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function m0t({value:e,onSelect:n,permissionChoices:t=[],defaultPermissionId:r,onSelectPermission:s,reasoningChoices:i=[],defaultReasoningId:a,onSelectReasoning:o,lockHarness:l=!1,className:u}){var te,fe,oe,ne,Q,ce;const{data:_=g0t}=ct(Up()),f=R.useRef(null),p=R.useRef(null),{open:m,setOpen:x,ref:S}=Ja(f),[b,v]=R.useState(""),[y,w]=R.useState("root"),C=()=>{x(!1),w("root"),v("")};R.useEffect(()=>{var ee;m&&(y==="reasoning"||y==="speed"||y==="permissions")&&((ee=p.current)==null||ee.focus())},[m,y]);const N=R.useMemo(()=>{const ee=b.trim().toLowerCase();return(l&&e?_.filter(he=>he.id===e.harness):_).map(he=>{let xe=he.models;return ee?xe=xe.filter(Te=>Te.id.toLowerCase().includes(ee)):he.id==="opencode"&&(xe=xe.slice(0,6)),{harness:he,models:xe,hidden:ee?0:he.models.length-xe.length}})},[_,b,l,e]),E=(ee,le)=>{var xe;const he=(e==null?void 0:e.harness)===ee.id;n({harness:ee.id,model:le,serviceTier:Y1(ee,le,he?e==null?void 0:e.serviceTier:null),permissionMode:he?e.permissionMode:((xe=ee.options)==null?void 0:xe.defaultPermissionMode)??null,reasoningLevel:SL(ee,le,he?e.reasoningLevel:null)}),C()},j=(e==null?void 0:e.model)!=null?(te=_.find(ee=>ee.id===e.harness))==null?void 0:te.models.find(ee=>ee.id===e.model):void 0,z=e?e.model?j?K1(j):CL(e.model):IE():_2(),M=(e==null?void 0:e.reasoningLevel)??a??((fe=i[0])==null?void 0:fe.id),O=(oe=i.find(ee=>ee.id===M))==null?void 0:oe.label,B=(e==null?void 0:e.permissionMode)??r??((ne=t[0])==null?void 0:ne.id),F=(Q=t.find(ee=>ee.id===B))==null?void 0:Q.label,U=(e==null?void 0:e.harness)==="opencode"?Q3e():c3e(),H=_.find(ee=>ee.id===(e==null?void 0:e.harness)),Y=wL(H,e==null?void 0:e.model),V=Y1(H,e==null?void 0:e.model,e==null?void 0:e.serviceTier),X=(ce=Y.find(ee=>ee.id===V))==null?void 0:ce.label,ie=ee=>{o==null||o(ee),C()},I=ee=>{s==null||s(ee),C()},L=ee=>{e&&n({...e,serviceTier:ee}),C()},$=(ee,le,he)=>h.jsxs("button",{type:"button",className:"model-root-row flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm text-text hover:bg-surface","aria-haspopup":"menu",onClick:()=>w(he),children:[h.jsx("span",{className:"flex-1",children:ee}),le&&h.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:le}),h.jsx(Vo,{size:14,className:"shrink-0 text-muted"})]}),q=ee=>h.jsxs("button",{ref:p,type:"button",className:"model-submenu-header flex w-full items-center gap-2 border-0 border-b border-solid border-b-border-variant bg-transparent px-2 py-2 text-start text-sm font-medium text-text hover:bg-surface",onClick:()=>{w("root"),v("")},children:[h.jsx(vO,{size:15}),ee]}),G=(ee,le,he,xe)=>h.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:ee.map(Te=>h.jsxs(dr,{onClick:()=>xe(Te.id),children:[h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[Te.label,Te.id===he&&h.jsxs("span",{className:"font-normal text-muted",children:[" ",CD()]})]}),Te.description&&h.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Te.description})]}),Te.id===le&&h.jsx(ka,{size:13})]},Te.id))});return h.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:S,children:[h.jsxs("button",{ref:f,type:"button",className:Ts("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",u),title:XV({label:`${z}${O?` · ${O}`:""}${X?` · ${X}`:""}`}),"aria-haspopup":"menu","aria-expanded":m,onClick:()=>{m?C():(w("root"),x(!0))},children:[V==="priority"?h.jsx(H_t,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?h.jsx(G4,{harness:e.harness,size:14}):null,V==="priority"&&h.jsxs("span",{className:"sr-only",children:[h3e()," "]}),h.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[z,O&&h.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:O})]}),h.jsx(Wo,{size:14,className:"shrink-0 text-muted"})]}),m&&h.jsxs("div",{className:"model-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-100 flex flex-col bg-background border border-border rounded-md shadow-dropdown z-50 overflow-hidden w-72 [&.align-right]:start-auto [&.align-right]:end-0 [&_input]:rounded-none [&_input]:border-0 [&_input]:border-b [&_input]:border-b-border-variant [&_input]:bg-none [&_input]:bg-transparent [&_input]:py-2 [&_input]:px-2.5 [&_input]:text-sm [&_input]:outline-none align-right",children:[y==="root"&&h.jsxs("div",{className:"model-root-menu p-1",children:[$(_2(),z,"models"),i.length>0&&$(U,O,"reasoning"),Y.length>0&&$($E(),X,"speed"),t.length>0&&$(BE(),F,"permissions")]}),y==="models"&&h.jsxs(h.Fragment,{children:[q(_2()),h.jsx("input",{autoFocus:!0,type:"text",placeholder:A3e(),value:b,onChange:ee=>v(ee.target.value)}),h.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[N.map(({harness:ee,models:le,hidden:he})=>h.jsxs("div",{className:"[&_.model-item]:ps-6",children:[h.jsxs("div",{className:OO,children:[h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(G4,{harness:ee.id,size:14}),ee.name]}),!ee.agentReady&&h.jsxs("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:[h.jsx(nz,{size:10})," ",Ao()]})]}),ee.agentReady?h.jsxs(h.Fragment,{children:[ee.models.length===0&&h.jsxs(dr,{onClick:()=>E(ee,null),children:[h.jsxs("span",{children:[IE(),h.jsx("span",{className:"model-id",children:kD()})]}),(e==null?void 0:e.harness)===ee.id&&(e==null?void 0:e.model)===null&&h.jsx(ka,{size:13})]}),le.map(xe=>h.jsxs(dr,{title:xe.id,onClick:()=>E(ee,xe.id),children:[h.jsx("span",{children:K1(xe)}),(e==null?void 0:e.harness)===ee.id&&(e==null?void 0:e.model)===xe.id&&h.jsx(ka,{size:13})]},xe.id)),he>0&&h.jsx("div",{className:cz,children:S3e({count:tn(he)})}),b.trim().length>0&&!ee.models.some(xe=>xe.id===b.trim())&&h.jsx(dr,{onClick:()=>E(ee,b.trim()),children:h.jsx("span",{children:G3e({id:Ee(b.trim())})})})]}):h.jsx("div",{className:"model-more [&_code]:font-mono [&_code]:text-xs [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_code]:whitespace-nowrap pt-1 px-2 pb-2 text-sm text-muted model-unavailable leading-normal border-b border-b-border-variant",children:ee.agentNote?Kp(ee.agentNote):N3e()})]},ee.id)),_.length===0&&h.jsx("div",{className:cz,children:i3e()})]}),l&&e&&_.length>1&&h.jsxs("div",{className:"model-locked-note flex items-center gap-1.5 py-[7px] px-3 text-sm text-muted border-t border-t-border-variant [&_svg]:shrink-0",children:[h.jsx(nz,{size:11}),L3e()]})]}),y==="reasoning"&&h.jsxs(h.Fragment,{children:[q(U),G(i,M,a,ie)]}),y==="permissions"&&h.jsxs(h.Fragment,{children:[q(BE()),G(t,B,r,I)]}),y==="speed"&&h.jsxs(h.Fragment,{children:[q($E()),G(Y,V??void 0,"default",L)]})]})]})}function ep({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:i=!1,disabled:a=!1,variant:o="pill",title:l,numbered:u=!1,renderIcon:_,onSelect:f,className:p}){var j,z;const{open:m,setOpen:x,ref:S}=Ja();if(e.length===0)return null;const b=n??t??((j=e[0])==null?void 0:j.id)??null,v=e.find(M=>M.id===b),y=e.find(M=>M.id===t),w=o==="bare"&&(y==null?void 0:y.id)===Q1?y:void 0,C=w?e.filter(M=>M.id!==w.id):e,N=(v==null?void 0:v.label)??((z=e[0])==null?void 0:z.label)??"",E=M=>{f(M),x(!1)};return h.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:S,children:[h.jsxs("button",{type:"button",className:Ts(o==="field"?"inline-flex h-9 w-full items-center justify-between gap-2 rounded-md border border-border bg-background px-3 text-sm font-normal text-text transition-colors duration-120 ease-standard hover:bg-surface disabled:opacity-45":`inline-flex h-8 items-center rounded-md transition-[background,color] duration-150 ease-standard hover:bg-surface ${o==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,p),title:l,"aria-haspopup":"menu","aria-expanded":m,disabled:a,onClick:()=>x(M=>!M),children:[h.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[v&&(_==null?void 0:_(v)),h.jsx("span",{className:"truncate",children:N})]}),h.jsx(Wo,{size:12})]}),m&&h.jsxs("div",{className:`option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 ${e.some(M=>M.description)?"min-w-80":""} ${o==="field"?"min-w-full":""} ${s==="right"?"align-right":""} ${i?"drop-down":""}`,children:[r&&h.jsx("div",{className:OO,children:r}),w&&h.jsxs(h.Fragment,{children:[h.jsxs(dr,{type:"button",onClick:()=>E(w.id),children:[h.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(w),h.jsxs("span",{children:[w.label,h.jsx("span",{className:"option-default text-muted font-normal",children:kD()})]})]}),b===w.id&&h.jsx(ka,{size:13})]}),h.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),C.map((M,O)=>h.jsxs(dr,{type:"button",onClick:()=>E(M.id),children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(M),h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[M.label,!w&&M.id===t&&h.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",CD()]})]}),M.description&&h.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:M.description})]})]}),b===M.id?h.jsx(ka,{size:13}):u&&h.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:O+1})]},M.id))]})]})}const g0t=[];function W4({size:e=16,className:n}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":"true",children:[h.jsx("path",{d:"M3.14573 5.14704C3.34064 4.95221 3.65776 4.95237 3.85277 5.14704L7.85277 9.14704L7.85374 9.14606C8.04873 9.34105 8.0487 9.65809 7.85374 9.8531L3.85374 13.8531C3.7558 13.951 3.62815 13.9995 3.50023 13.9996C3.37223 13.9996 3.24373 13.9501 3.14573 13.8531C2.95103 13.6581 2.95083 13.341 3.14573 13.1461L6.79222 9.50056L3.14573 5.85407C2.95104 5.65905 2.95084 5.34194 3.14573 5.14704Z"}),h.jsx("path",{d:"M12.1457 1.14704C12.3406 0.952206 12.6578 0.952371 12.8528 1.14704C13.0477 1.34202 13.0477 1.65907 12.8528 1.85407L9.20726 5.50056L12.8537 9.14704C13.0487 9.34202 13.0487 9.65907 12.8537 9.85407C12.7558 9.95101 12.6282 10.0005 12.5002 10.0006C12.3722 10.0006 12.2437 9.95207 12.1457 9.85407L8.14573 5.85407C7.95104 5.65905 7.95084 5.34194 8.14573 5.14704L12.1457 1.14704Z"})]})}function sv({runtime:e,corner:n=!1}){const[t,r]=R.useState(!1),[s,i]=R.useState(!1),[a,o]=R.useState(!1),[l,u]=R.useState(null),_=Ja();async function f(){if(l){o(!0);try{await bL(l),u(null)}catch(p){u(null),fr(p instanceof Error?p.message:String(p),"error")}finally{o(!1)}}}return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:n?"fixed bottom-0 start-0 z-50":"relative shrink-0 rounded-b-lg border-t border-border bg-background",ref:_.ref,children:[_.open&&h.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_6px)] start-2 z-50 min-w-60 rounded-lg border border-border bg-background p-1.5 shadow-menu",children:[h.jsxs("div",{className:"border-b border-border-variant px-2 pt-1 pb-2",children:[h.jsx("div",{className:"text-sm font-medium text-text",children:fAe({host:Ee(e.session.host),user:Ee(e.session.user??"")})}),h.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ee(e.session.version??"…")]})]}),h.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[h.jsx(dr,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await gL(),_.setOpen(!1)}catch(p){fr(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?oAe():w4()}),h.jsx(l6,{content:HRe(),className:"me-2 shrink-0 text-subtext",children:h.jsx(y6,{size:15})})]}),h.jsx(dr,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await vL()),_.setOpen(!1)}catch(p){fr(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:OD()})]}),n?h.jsxs(Oe,{variant:"default",className:"h-auto w-auto max-w-48 justify-start rounded-none border-accent-blue bg-accent-blue px-2.5 py-1.5 font-normal text-white [&:hover:not(:disabled)]:border-accent-blue [&:hover:not(:disabled)]:bg-accent-blue/90","aria-haspopup":"menu","aria-expanded":_.open,onClick:()=>_.setOpen(p=>!p),children:[h.jsx(W4,{size:14,className:"shrink-0"}),h.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:g2({host:Ee(e.session.host)})})]}):h.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[h.jsx(on,{size:"small","aria-label":g2({host:Ee(e.session.host)}),"aria-haspopup":"menu","aria-expanded":_.open,onClick:()=>_.setOpen(p=>!p),children:h.jsx(W4,{size:14,className:"shrink-0"})}),h.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[h.jsx("span",{className:"-my-0.5 max-w-full self-start truncate rounded-sm bg-accent-blue px-1.5 py-0.5 text-sm leading-tight text-white",children:g2({host:Ee(e.session.host)})}),h.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ee(e.session.version??"…")]})]})]})]}),l&&h.jsx(tO,{host:e.session.host,preview:l,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void f()})]})}function z6(e=!0){var r;const n=Z1(),t=ct({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>Ur(n.queryKey,s)}}const v0t=6e4,b0t=500;function IO(e){const[n,t]=R.useState(!1),[r,s]=R.useState(null),i=R.useRef(!1);R.useEffect(()=>(i.current=!1,()=>{i.current=!0}),[]);const a=e!=null&&e.restartRequired?e.instance:null;return{restarting:n,error:r,restart:()=>{if(!a||n)return;const l=Z1(),u=()=>i.current||!Hn(l.queryKey);t(!0),s(null),(async()=>{try{if(await xlt(),u())return;const _=Date.now()+v0t;for(;Date.now()<_;){if(await new Promise(p=>setTimeout(p,b0t)),u())return;const f=await tt.fetchQuery({...l,staleTime:0}).catch(()=>null);if(u())return;if(f&&f.instance!==a){window.location.reload();return}}throw new Error(Fit())}catch(_){if(u())return;s(_ instanceof Error?_.message:String(_)),t(!1)}})()}}}function BO({status:e}){const[n,t]=R.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=IO(e);return!r||n===r?null:h.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-surface border-b border-b-border",role:"status",children:[h.jsx(Za,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),h.jsx("span",{className:"min-w-0",children:i?cL({error:i}):Nit({version:Ee(r)})}),(e==null?void 0:e.canRestart)&&h.jsx(Oe,{type:"button",size:"small",disabled:s,onClick:a,children:s?uL():lL()}),h.jsx(on,{type:"button",size:"small",className:"ms-auto","aria-label":Ait(),disabled:s,onClick:()=>t(r),children:h.jsx(ts,{size:13})})]})}function T6(){return h.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:h.jsx(Dt,{})})}function y0t(){return h.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[h.jsx("p",{children:Ao()}),h.jsx(Gv,{to:"/projects",children:z0()})]})}function j6({error:e,reset:n}){return h.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[h.jsx("p",{role:"alert",children:e.message}),h.jsx(Oe,{onClick:n,children:qi()}),h.jsx(Gv,{to:"/projects",children:z0()})]})}function $O({projectId:e}){const{queryClient:n}=I5({from:"__root__"}),t=Uv(),[r,s]=R.useState(null),[i,a]=R.useState(0);return R.useEffect(()=>{let o=!0;return s(null),(e?Udt(e,n):qdt(n)).then(l=>{o&&t({href:l,replace:!0})}).catch(l=>{o&&(QU(l)?a(u=>u+1):s(l instanceof Error?l:new Error(String(l))))}),()=>{o=!1}},[e,i,t,n]),r?h.jsx(j6,{error:r,reset:()=>a(o=>o+1)}):h.jsx(T6,{})}function x0t(){return h.jsx($O,{})}function w0t({projectId:e}){return h.jsx($O,{projectId:e})}function S0t(){const e=dO(),n=Uv(),t=V0(),r=ct(t),s=ct(Gp()),i=r.data,a=s.data,o=r.error??s.error,l=()=>{r.refetch(),s.refetch()},{status:u}=z6(e.kind==="local");R.useEffect(()=>{document.title="OpenResearch",a&&eb.queue({...h6()??a.workspace??{railOpen:!0,panelWidth:760,experimentsView:"table"},lastLocation:"/projects"})},[a]);const _=f=>void n({to:"/projects/$projectId",params:{projectId:f}});return h.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&h.jsxs(h.Fragment,{children:[h.jsx(LO,{}),h.jsx(BO,{status:u})]}),o&&(!i||!a)?h.jsx(j6,{error:o,reset:l}):!i||!a?h.jsx(T6,{}):i.length===0&&!a.onboardingCompleted?h.jsx(V_t,{preferredAgent:a.preferredAgent,onDone:f=>{Hdt(),_(f.id)}}):h.jsx(_0t,{remote:e.kind==="ssh",projects:i,onOpen:_,onCreated:(f,p)=>{p?(fr(p,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:f.id,tab:"git"}})):_(f.id)},onDeleted:f=>Ur(t.queryKey,p=>p==null?void 0:p.filter(m=>m.id!==f))}),e.kind==="ssh"&&h.jsx(sv,{runtime:e,corner:!0})]})}const k0t=qo()({component:x0t}),C0t=qo()({component:U0}),E0t=qo()({}),N0t=qo()({component:S0t}),z0t=e=>({queryKey:zt("getRunDiff",e),queryFn:({signal:n})=>Got(e,n),staleTime:3e4}),PO=e=>({queryKey:zt("getExperimentDiff",e),queryFn:({signal:n})=>Wot(e,n),staleTime:3e4}),iv=(e,n,t={})=>({queryKey:zt("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>Vot(e,n,t,r),staleTime:t.ref?Oh(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),FO=e=>({queryKey:zt("getAbsoluteFile",e),queryFn:({signal:n})=>Kot(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),HO=(e,n={})=>({queryKey:zt("getCodeTree",e,{...n}),queryFn:({signal:t})=>hlt(e,n,t),staleTime:n.ref&&Oh(n.ref)?1/0:3e4}),av=e=>({queryKey:zt("getSessionWorktree",e),queryFn:({signal:n})=>_lt(e,n),staleTime:3e4}),T0t=e=>({queryKey:zt("getArtifacts",e),queryFn:({signal:n})=>Zlt(e,n),staleTime:3e4}),A6=(e,n)=>({queryKey:zt("getArtifactFileText",e,n),queryFn:({signal:t})=>nct(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),qO=(e,n)=>({queryKey:zt("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>sct(e,n,t),staleTime:2e3}),j0t=()=>({queryKey:zt("getLatexEngine"),queryFn:({signal:e})=>Jot(e),staleTime:3e5}),A0t=()=>({queryKey:zt("getOverleafSettings"),queryFn:({signal:e})=>tlt(e),staleTime:3e5}),R0t=(e,n,t={})=>({queryKey:zt("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>olt(e,n,t,r),staleTime:3e5}),M0t=(e,n,t={})=>({queryKey:zt("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>flt(e,n,t,r),staleTime:3e4}),UO=(e,n,t,r,s)=>({queryKey:zt("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!Oh(s)?3e4:1/0,refetchOnMount:s?!0:"always",refetchOnWindowFocus:s?!0:"always",queryFn:async({signal:i,client:a})=>{const o=async m=>{i.throwIfAborted();const x=await a.fetchQuery({...m,staleTime:s?m.staleTime:0});return i.throwIfAborted(),x},l=t==="abs",u=t==="artifacts",_=async()=>{const m=await o(qO(e,n)),x=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",S=m&&x?await o(A6(e,n)):null,b=m===null||x&&S===null;return{path:n,content:(S==null?void 0:S.content)??"",truncated:(S==null?void 0:S.truncated)??!1,binary:(S==null?void 0:S.binary)??(m==null?void 0:m.presentation)==="download",notFound:b,presentation:S?S.binary?"download":"text":(m==null?void 0:m.presentation)??"download"}},f=async()=>{for(const m of[`artifacts/${n}`,n]){const x=await o(iv(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(x&&!x.notFound)return x}return null},p=await(l?o(FO(n)).then(m=>({source:"absolute",file:m})):u?_().then(async m=>{if(!m.notFound)return{source:"artifact",file:m};const x=await f();return x?{source:"checkout",file:x}:{source:"artifact",file:m}}):o(iv(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?_().then(x=>x.notFound?{source:"checkout",file:m}:{source:"artifact",file:x,checkoutRoot:m.root}):{source:"checkout",file:m}));return i.throwIfAborted(),p}});async function D0t(e,n,t,r,s){if(Oh(s))return;const i=UO(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[FO(n).queryKey]:[iv(e,n,{sessionId:r,ref:s}).queryKey,iv(e,`artifacts/${n}`,{sessionId:r}).queryKey,A6(e,n).queryKey,qO(e,n).queryKey]];await Promise.all(a.map(o=>tt.cancelQueries({queryKey:o,exact:!0}))),await Promise.all(a.map(o=>tt.invalidateQueries({queryKey:o,exact:!0,refetchType:"none"}))),await tt.invalidateQueries({queryKey:i.queryKey,exact:!0})}function L0t(e,n,t){return t?n.flatMap(r=>{if(r.status!=="starting"&&r.status!=="running")return[];const s=e.find(i=>i.id===r.experimentId&&i.chatSessionId===t);return s?[{experiment:s,run:r}]:[]}):[]}const uz={done:{tone:"success",live:!1},failed:{tone:"danger",live:!1},running:{tone:"info",live:!0},starting:{tone:"warning",live:!0},cancelling:{tone:"caution",live:!0},cancelled:{tone:"caution",live:!1},editing:{tone:"accent",live:!0},idle:{tone:"neutral",live:!1}};function O0t(e){return uz[e]??uz.idle}const I0t={done:Qtt,failed:rnt,running:fnt,starting:pnt,cancelling:Gtt,cancelled:Ftt,editing:Jtt,idle:ont};function R6(e){const n=I0t[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function Vl({status:e,label:n,className:t}){const r=O0t(e);return h.jsx(Zv,{tone:r.tone,live:r.live,className:t,children:n??R6(e)})}const Lf={local:mD,tinker:sme,hf:Npe,modal:Bpe,k8s:Ape,ssh:eme,slurm:Ype,ray:Wpe,openresearch:Hpe};function fz(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,r)}return t}function qn(e){for(var n=1;n=0||(_[l]=a[l]);return _})(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function En(e,n){return WO(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var i,a,o,l,u=[],_=!0,f=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;_=!1}else for(;!(_=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);_=!0);}catch(p){f=!0,a=p}finally{try{if(!_&&s.return!=null&&(l=s.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}})(e,n)||ab(e,n)||KO()}function GO(e){return WO(e)||VO(e)||ab(e)||KO()}function Gi(e){return(function(n){if(Array.isArray(n))return K4(n)})(e)||VO(e)||ab(e)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function WO(e){if(Array.isArray(e))return e}function VO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ab(e,n){if(e){if(typeof e=="string")return K4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?K4(e,n):void 0}}function K4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,o=!1;return{s:function(){t=t.call(e)},n:function(){var l=t.next();return a=l.done,l},e:function(l){o=!0,i=l},f:function(){try{a||t.return==null||t.return()}finally{if(o)throw i}}}}var Rg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qp(e,n){return e(n={exports:{}},n.exports),n.exports}var Hi=Qp((function(e){/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(){var n={}.hasOwnProperty;function t(){for(var r=[],s=0;s-1?v.slice(0,w):C;switch(C){case"diff":S--;break e;case"deleted":case"new":var N=v.slice(w+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(v.split(" ")[2],10);break;case"index":var E=v.slice(w+1).split(" "),j=E[0].split("..");a.oldRevision=j[0],a.newRevision=j[1],E[1]&&(a.oldMode=a.newMode=E[1]);break;case"copy":case"rename":var z=v.slice(w+1);z.indexOf("from")===0?a.oldPath=z.slice(5):a.newPath=z.slice(3),y=C;break;case"---":var M=v.slice(w+1),O=m[++S].slice(4);M==="/dev/null"?(O=O.slice(2),y="add"):O==="/dev/null"?(M=M.slice(2),y="delete"):(y="modify",M=M.slice(2),O=O.slice(2)),M&&(a.oldPath=M),O&&(a.newPath=O),p=5;break e}}a.type=y||"modify"}else if(b.indexOf("Binary")===0)a.isBinary=!0,a.type=b.indexOf("/dev/null and")>=0?"add":b.indexOf("and /dev/null")>=0?"delete":"modify",p=2,a=null;else if(p===5)if(b.indexOf("@@")===0){var B=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(b);o={content:b,oldStart:B[1]-0,newStart:B[4]-0,oldLines:B[3]-0||1,newLines:B[6]-0||1,changes:[]},a.hunks.push(o),l=o.oldStart,u=o.newStart}else{var F=b.slice(0,1),U={content:b.slice(1)};switch(F){case"+":U.type="insert",U.isInsert=!0,U.lineNumber=u,u++;break;case"-":U.type="delete",U.isDelete=!0,U.lineNumber=l,l++;break;case" ":U.type="normal",U.isNormal=!0,U.oldLineNumber=l,U.newLineNumber=u,l++,u++;break;case"\\":var H=o.changes[o.changes.length-1];H.isDelete||(a.newEndingNewLine=!1),H.isInsert||(a.oldEndingNewLine=!1)}U.type&&o.changes.push(U)}S++}return f}};e.exports=s})()}));function bu(e){return e.type==="insert"}function Wi(e){return e.type==="delete"}function Yl(e){return e.type==="normal"}function F0t(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var l=En(i,3),u=l[0],_=l[1],f=l[2];return _?bu(a)&&f>=0?(u.splice(f+1,0,a),[u,a,f+2]):(u.push(a),[u,a,Wi(a)&&Wi(_)?f:o]):(u.push(a),[u,a,Wi(a)?o:-1])}),[[],null,-1]);return En(s,1)[0]})(e.changes):e.changes;return qn(qn({},e),{},{isPlain:!1,changes:t})}function Q4(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=(function(r){if(r.startsWith("diff --git"))return r;var s=r.indexOf(` +`),i=r.indexOf(` +`,s+1),a=r.slice(0,s),o=r.slice(s+1,i),l=a.split(" ").slice(1,-3).join(" "),u=o.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(l," b/").concat(u),"index 1111111..2222222 100644","--- a/".concat(l),"+++ b/".concat(u),r.slice(i+1)].join(` +`)})(e.trimStart());return P0t.parse(t).map((function(r){return(function(s,i){var a=s.hunks.map((function(o){return F0t(o,i)}));return qn(qn({},s),{},{hunks:a})})(r,n)}))}function H0t(e){return e[0]}function q0t(e){return e[e.length-1]}function Y4(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function tp(e){return e==="old"?function(n){return bu(n)?-1:Yl(n)?n.oldLineNumber:n.lineNumber}:function(n){return Wi(n)?-1:Yl(n)?n.newLineNumber:n.lineNumber}}function YO(e,n){return function(t,r){var s=t[e],i=s+t[n];return r>=s&&r=i&&s-1},X0t=function(e,n){var t=this.__data__,r=ob(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Kd(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),_=i.get(n);if(u&&_)return u==n&&_==e;var f=-1,p=!0,m=2&t?new Dpt:void 0;for(i.set(e,n),i.set(n,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},gr={};gr["[object Float32Array]"]=gr["[object Float64Array]"]=gr["[object Int8Array]"]=gr["[object Int16Array]"]=gr["[object Int32Array]"]=gr["[object Uint8Array]"]=gr["[object Uint8ClampedArray]"]=gr["[object Uint16Array]"]=gr["[object Uint32Array]"]=!0,gr["[object Arguments]"]=gr["[object Array]"]=gr["[object ArrayBuffer]"]=gr["[object Boolean]"]=gr["[object DataView]"]=gr["[object Date]"]=gr["[object Error]"]=gr["[object Function]"]=gr["[object Map]"]=gr["[object Number]"]=gr["[object Object]"]=gr["[object RegExp]"]=gr["[object Set]"]=gr["[object String]"]=gr["[object WeakMap]"]=!1;var Ypt=function(e){return Ph(e)&&L6(e.length)&&!!gr[a_(e)]},Xpt=function(e){return function(n){return e(n)}},bz=Qp((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&JO.process,i=(function(){try{var a=r&&r.require&&r.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}})();e.exports=i})),yz=bz&&bz.isTypedArray,O6=yz?Xpt(yz):Ypt,Zpt=Object.prototype.hasOwnProperty,Jpt=function(e,n){var t=Qi(e),r=!t&&fb(e),s=!t&&!r&&ov(e),i=!t&&!r&&!s&&O6(e),a=t||r||s||i,o=a?Gpt(e.length,String):[],l=o.length;for(var u in e)!Zpt.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||iI(u,l))||o.push(u);return o},emt=Object.prototype,aI=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||emt)},tmt=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),nmt=Object.prototype.hasOwnProperty,oI=function(e){if(!aI(e))return tmt(e);var n=[];for(var t in Object(e))nmt.call(e,t)&&t!="constructor"&&n.push(t);return n},db=function(e){return e!=null&&L6(e.length)&&!tI(e)},I6=function(e){return db(e)?Jpt(e):oI(e)},xz=function(e){return Ppt(e,I6,Upt)},rmt=Object.prototype.hasOwnProperty,smt=function(e,n,t,r,s,i){var a=1&t,o=xz(e),l=o.length;if(l!=xz(n).length&&!a)return!1;for(var u=l;u--;){var _=o[u];if(!(a?_ in n:rmt.call(n,_)))return!1}var f=i.get(e),p=i.get(n);if(f&&p)return f==n&&p==e;var m=!0;i.set(e,n),i.set(n,e);for(var x=a;++u1)return!1;if(e.length===1){var n=En(e,1)[0];return n.type==="text"&&!n.value}return!0}function Wmt(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=cu(e,Umt),a=s?function(o,l){return s(o,Ez,l)}:Ez;return h.jsx("td",qn(qn({},i),{},{"data-change-key":n,children:r?Gmt(r)?" ":r.map(a):t||" "}))}var pI=R.memo(Wmt);function mI(e,n){return function(){var t=n==="old"?gb(e):vb(e);return t===-1?void 0:t}}function gI(e,n){return function(t){return e&&t?h.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function lv(e,n){return n?function(t){e(),n(t)}:e}function Nz(e,n,t,r){return R.useMemo((function(){var s=_I(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=lv(t,s.onMouseEnter),s.onMouseLeave=lv(r,s.onMouseLeave),s}),[e,t,r,n])}function zz(e,n,t,r,s,i,a,o,l){var u={change:n,side:r,inHoverState:o,renderDefault:mI(n,r),wrapInAnchor:gI(s,i)};return h.jsx("td",qn(qn({className:e},a),{},{"data-change-key":t,children:l(u)}))}function Vmt(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,l=e.generateLineClassName,u=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.gutterAnchor,S=e.generateAnchorID,b=e.renderToken,v=e.renderGutter,y=s.type,w=s.content,C=au(s),N=(n=En(R.useState(!1),2),t=n[0],r=n[1],[t,R.useCallback((function(){return r(!0)}),[]),R.useCallback((function(){return r(!1)}),[])]),E=En(N,3),j=E[0],z=E[1],M=E[2],O=R.useMemo((function(){return{change:s}}),[s]),B=Nz(f,O,z,M),F=Nz(p,O,z,M),U=S(s),H=l({changes:[s],defaultGenerate:function(){return o}}),Y=Hi("diff-gutter","diff-gutter-".concat(y),u,{"diff-gutter-selected":i}),V=Hi("diff-code","diff-code-".concat(y),_,{"diff-code-selected":i});return h.jsxs("tr",{id:U,className:Hi("diff-line",H),children:[!m&&zz(Y,s,C,"old",x,U,B,j,v),!m&&zz(Y,s,C,"new",x,U,B,j,v),h.jsx(pI,qn({className:V,changeKey:C,text:w,tokens:a,renderToken:b},F))]})}var Kmt=R.memo(Vmt);function Qmt(e){var n=e.hideGutter,t=e.element;return h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var Ymt=["hideGutter","selectedChanges","tokens","lineClassName"],Xmt=["hunk","widgets","className"];function Zmt(e){var n=e.hunk,t=e.widgets,r=e.className,s=cu(e,Xmt),i=(function(a,o){return a.reduce((function(l,u){var _=au(u);l.push(["change",_,u]);var f=o[_];return f&&l.push(["widget",_,f]),l}),[])})(n.changes,t);return h.jsx("tbody",{className:Hi("diff-hunk",r),children:i.map((function(a){return(function(o,l){var u=En(o,3),_=u[0],f=u[1],p=u[2],m=l.hideGutter,x=l.selectedChanges,S=l.tokens,b=l.lineClassName,v=cu(l,Ymt);if(_==="change"){var y=Wi(p)?"old":"new",w=Wi(p)?gb(p):vb(p),C=S?S[y][w-1]:null;return h.jsx(Kmt,qn({className:b,change:p,hideGutter:m,selected:x.includes(f),tokens:C},v),"change".concat(f))}return _==="widget"?h.jsx(Qmt,{hideGutter:m,element:p},"widget".concat(f)):null})(a,s)}))})}var vI=0;function Dg(e,n,t,r){var s=R.useCallback((function(){return n(e)}),[e,n]),i=R.useCallback((function(){return n("")}),[n]);return R.useMemo((function(){var a=_I(r,(function(o){return function(l){return o&&o({side:e,change:t},l)}}));return a.onMouseEnter=lv(s,a.onMouseEnter),a.onMouseLeave=lv(i,a.onMouseLeave),a}),[t,r,s,e,i])}function R2(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,i=e.gutterClassName,a=e.codeClassName,o=e.gutterEvents,l=e.codeEvents,u=e.anchorID,_=e.gutterAnchor,f=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,x=e.renderToken,S=e.renderGutter;if(!n){var b=Hi("diff-gutter","diff-gutter-omit",i),v=Hi("diff-code","diff-code-omit",a);return[!p&&h.jsx("td",{className:b},"gutter"),h.jsx("td",{className:v},"code")]}var y=n.type,w=n.content,C=au(n),N=t===vI?"old":"new",E=qn({id:u||void 0,className:Hi("diff-gutter","diff-gutter-".concat(y),V4({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:S({change:n,side:N,inHoverState:m,renderDefault:mI(n,N),wrapInAnchor:gI(_,f)})},o),j=Hi("diff-code","diff-code-".concat(y),V4({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&h.jsx("td",qn(qn({},E),{},{"data-change-key":C}),"gutter"),h.jsx(pI,qn({className:j,changeKey:C,text:w,tokens:s,renderToken:x},l),"code")]}function Jmt(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,i=e.newSelected,a=e.oldTokens,o=e.newTokens,l=e.monotonous,u=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,x=e.generateAnchorID,S=e.generateLineClassName,b=e.gutterAnchor,v=e.renderToken,y=e.renderGutter,w=En(R.useState(""),2),C=w[0],N=w[1],E=Dg("old",N,t,f),j=Dg("new",N,r,f),z=Dg("old",N,t,p),M=Dg("new",N,r,p),O=t&&x(t),B=r&&x(r),F=S({changes:[t,r],defaultGenerate:function(){return n}}),U={monotonous:l,hideGutter:m,gutterClassName:u,codeClassName:_,gutterEvents:f,codeEvents:p,renderToken:v,renderGutter:y},H=qn(qn({},U),{},{change:t,side:vI,selected:s,tokens:a,gutterEvents:E,codeEvents:z,anchorID:O,gutterAnchor:b,gutterAnchorTarget:O,hover:C==="old"}),Y=qn(qn({},U),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:j,codeEvents:M,anchorID:t===r?null:B,gutterAnchor:b,gutterAnchorTarget:t===r?O:B,hover:C==="new"});if(l)return h.jsx("tr",{className:Hi("diff-line",F),children:R2(t?H:Y)});var V=(function(X,ie){return X&&!ie?"diff-line-old-only":!X&&ie?"diff-line-new-only":X===ie?"diff-line-normal":"diff-line-compare"})(t,r);return h.jsxs("tr",{className:Hi("diff-line",V,F),children:[R2(H),R2(Y)]})}var egt=R.memo(Jmt);function tgt(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):h.jsxs("tr",{className:"diff-widget",children:[h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var ngt=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],rgt=["hunk","widgets","className"];function Lg(e,n){return(e?au(e):"00")+(n?au(n):"00")}function sgt(e){var n=e.hunk,t=e.widgets,r=e.className,s=cu(e,rgt),i=(function(a,o){for(var l=function(v){if(!v)return null;var y=au(v);return o[y]||null},u=[],_=0;_=(i==null?void 0:i.value.length))return[e];var o=function(f,p){var m=i.value.slice(f,p);return[].concat(Gi(s),[qn(qn({},i),{},{value:m})])};if(n>0){var l=o(0,n);a.push(eh(l))}var u=o(Math.max(n,0),t);if(a.push(r?(function(f,p){return[p].concat(Gi(eh(f)))})(u,r):eh(u)),t1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.children){var r=e.children,s=cu(e,kgt);t.push(s);var i,a=M6(r);try{for(a.s();!(i=a.n()).done;)wI(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(eh([].concat(Gi(t.slice(1)),[e])));return n}function Cgt(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(l){var u=H6(l);return u.value.includes(` +`)?u.value.split(` +`).map((function(_){return xgt(l,qn(qn({},u),{},{value:_}))})):[l]})(t),i=GO(s),a=i[0],o=i.slice(1);return[].concat(Gi(n.slice(0,-1)),[[].concat(Gi(r),[a])],Gi(o.map((function(l){return[l]}))))}),[[]])}function Rz(e){return Cgt(wI(e))}var Egt=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?hb(e,n,void 0,t):!!r},Ngt=function(e,n){return hb(e,n)},zgt=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function Tgt(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=zgt(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&Egt(t,r,(function(i,a,o){return o==="chlidren"||Ngt(i,a)}))))?e.children[e.children.length-1]=(function(i,a){return"value"in i&&"value"in a?qn(qn({},i),{},{value:"".concat(i.value).concat(a.value)}):i})(s,n):e.children.push(n),e.children[e.children.length-1]}function Mz(e){var n,t={type:"root",children:[]},r=M6(e);try{var s=function(){var i=n.value;i.reduce((function(a,o,l){return Tgt(a,l===i.length-1?qn({},o):qn(qn({},o),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(i){r.e(i)}finally{r.f()}return t}var jgt=Object.prototype.hasOwnProperty,Agt=yI((function(e,n,t){jgt.call(e,t)?e[t].push(n):P6(e,t,[n])})),Rgt=Object.prototype.hasOwnProperty,Mgt=function(e){if(e==null)return!0;if(db(e)&&(Qi(e)||typeof e=="string"||typeof e.splice=="function"||ov(e)||O6(e)||fb(e)))return!e.length;var n=t3(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(aI(e))return!oI(e).length;for(var t in e)if(Rgt.call(e,t))return!1;return!0},Dgt=function(e,n){var t=n.start,r=n.length,s=t+r,i=e.reduce((function(a,o){var l=En(a,2),u=l[0],_=l[1],f=_+H6(o).value.length;if(_>s||fr.length?t:r,l=t.length>r.length?r:t,u=o.indexOf(l);if(u!=-1)return a=[new n.Diff(1,o.substring(0,u)),new n.Diff(0,l),new n.Diff(1,o.substring(u+l.length))],t.length>r.length&&(a[0][0]=a[2][0]=-1),a;if(l.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var _=this.diff_halfMatch_(t,r);if(_){var f=_[0],p=_[1],m=_[2],x=_[3],S=_[4],b=this.diff_main(f,m,s,i),v=this.diff_main(p,x,s,i);return b.concat([new n.Diff(0,S)],v)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,i):this.diff_bisect_(t,r,i)},n.prototype.diff_lineMode_=function(t,r,s){var i=this.diff_linesToChars_(t,r);t=i.chars1,r=i.chars2;var a=i.lineArray,o=this.diff_main(t,r,!1,s);this.diff_charsToLines_(o,a),this.diff_cleanupSemantic(o),o.push(new n.Diff(0,""));for(var l=0,u=0,_=0,f="",p="";l=1&&_>=1){o.splice(l-u-_,u+_),l=l-u-_;for(var m=this.diff_main(f,p,!1,s),x=m.length-1;x>=0;x--)o.splice(l,0,m[x]);l+=m.length}_=0,u=0,f="",p=""}l++}return o.pop(),o},n.prototype.diff_bisect_=function(t,r,s){for(var i=t.length,a=r.length,o=Math.ceil((i+a)/2),l=o,u=2*o,_=new Array(u),f=new Array(u),p=0;ps);w++){for(var C=-w+S;C<=w-b;C+=2){for(var N=l+C,E=(B=C==-w||C!=w&&_[N-1]<_[N+1]?_[N+1]:_[N-1]+1)-C;Bi)b+=2;else if(E>a)S+=2;else if(x&&(M=l+m-C)>=0&&M=(z=i-f[M]))return this.diff_bisectSplit_(t,r,B,E,s)}for(var j=-w+v;j<=w-y;j+=2){for(var z,M=l+j,O=(z=j==-w||j!=w&&f[M-1]i)y+=2;else if(O>a)v+=2;else if(!x&&(N=l+m-j)>=0&&N=(z=i-z))return this.diff_bisectSplit_(t,r,B,E,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,i,a){var o=t.substring(0,s),l=r.substring(0,i),u=t.substring(s),_=r.substring(i),f=this.diff_main(o,l,!1,a),p=this.diff_main(u,_,!1,a);return f.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var _="",f=0,p=-1,m=s.length;pi?t=t.substring(s-i):sr.length?t:r,i=t.length>r.length?r:t;if(s.length<4||2*i.length=S.length?[y,w,C,N,z]:null}var l,u,_,f,p,m=o(s,i,Math.ceil(s.length/4)),x=o(s,i,Math.ceil(s.length/2));return m||x?(l=x?m&&m[4].length>x[4].length?m:x:m,t.length>r.length?(u=l[0],_=l[1],f=l[2],p=l[3]):(f=l[0],p=l[1],u=l[2],_=l[3]),[u,_,f,p,l[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],i=0,a=null,o=0,l=0,u=0,_=0,f=0;o0?s[i-1]:-1,l=0,u=0,_=0,f=0,a=null,r=!0)),o++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o=S?(x>=p.length/2||x>=m.length/2)&&(t.splice(o,0,new n.Diff(0,m.substring(0,x))),t[o-1][1]=p.substring(0,p.length-x),t[o+1][1]=m.substring(x),o++):(S>=p.length/2||S>=m.length/2)&&(t.splice(o,0,new n.Diff(0,p.substring(0,S))),t[o-1][0]=1,t[o-1][1]=m.substring(0,m.length-S),t[o+1][0]=-1,t[o+1][1]=p.substring(S),o++),o++}o++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(S,b){if(!S||!b)return 6;var v=S.charAt(S.length-1),y=b.charAt(0),w=v.match(n.nonAlphaNumericRegex_),C=y.match(n.nonAlphaNumericRegex_),N=w&&v.match(n.whitespaceRegex_),E=C&&y.match(n.whitespaceRegex_),j=N&&v.match(n.linebreakRegex_),z=E&&y.match(n.linebreakRegex_),M=j&&S.match(n.blanklineEndRegex_),O=z&&b.match(n.blanklineStartRegex_);return M||O?5:j||z?4:w&&!N&&E?3:N||E?2:w||C?1:0}for(var s=1;s=m&&(m=x,_=i,f=a,p=o)}t[s-1][1]!=_&&(_?t[s-1][1]=_:(t.splice(s-1,1),s--),t[s][1]=f,p?t[s+1][1]=p:(t.splice(s+1,1),s--))}s++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(t){for(var r=!1,s=[],i=0,a=null,o=0,l=!1,u=!1,_=!1,f=!1;o0?s[i-1]:-1,_=f=!1),r=!0)),o++;r&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push(new n.Diff(0,""));for(var r,s=0,i=0,a=0,o="",l="";s1?(i!==0&&a!==0&&((r=this.diff_commonPrefix(l,o))!==0&&(s-i-a>0&&t[s-i-a-1][0]==0?t[s-i-a-1][1]+=l.substring(0,r):(t.splice(0,0,new n.Diff(0,l.substring(0,r))),s++),l=l.substring(r),o=o.substring(r)),(r=this.diff_commonSuffix(l,o))!==0&&(t[s][1]=l.substring(l.length-r)+t[s][1],l=l.substring(0,l.length-r),o=o.substring(0,o.length-r))),s-=i+a,t.splice(s,i+a),o.length&&(t.splice(s,0,new n.Diff(-1,o)),s++),l.length&&(t.splice(s,0,new n.Diff(1,l)),s++),s++):s!==0&&t[s-1][0]==0?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,a=0,i=0,o="",l=""}t[t.length-1][1]===""&&t.pop();var u=!1;for(s=1;sr));s++)o=i,l=a;return t.length!=s&&t[s][0]===-1?l:l+(r-o)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,i=//g,o=/\n/g,l=0;l");switch(u){case 1:r[l]=''+_+"";break;case-1:r[l]=''+_+"";break;case 0:r[l]=""+_+""}}return r.join("")},n.prototype.diff_text1=function(t){for(var r=[],s=0;sthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(r),a=this;function o(E,j){var z=E/r.length,M=Math.abs(s-j);return a.Match_Distance?z+M/a.Match_Distance:M?1:z}var l=this.Match_Threshold,u=t.indexOf(r,s);u!=-1&&(l=Math.min(o(0,u),l),(u=t.lastIndexOf(r,s+r.length))!=-1&&(l=Math.min(o(0,u),l)));var _,f,p=1<=b;w--){var C=i[t.charAt(w-1)];if(y[w]=S===0?(y[w+1]<<1|1)&C:(y[w+1]<<1|1)&C|(m[w+1]|m[w])<<1|1|m[w+1],y[w]&p){var N=o(S,w-1);if(N<=l){if(l=N,!((u=w-1)>s))break;b=Math.max(1,2*s-u)}}}if(o(S+1,s)>l)break;m=y}return u},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)a=t,i=this.diff_text1(a);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)i=t,a=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");i=t,a=s}if(a.length===0)return[];for(var o=[],l=new n.patch_obj,u=0,_=0,f=0,p=i,m=i,x=0;x=2*this.Patch_Margin&&u&&(this.patch_addContext_(l,p),o.push(l),l=new n.patch_obj,u=0,p=m,_=f)}S!==1&&(_+=b.length),S!==-1&&(f+=b.length)}return u&&(this.patch_addContext_(l,p),o.push(l)),o},n.prototype.patch_deepCopy=function(t){for(var r=[],s=0;sthis.Match_MaxBits?(l=this.match_main(r,f.substring(0,this.Match_MaxBits),_))!=-1&&((p=this.match_main(r,f.substring(f.length-this.Match_MaxBits),_+f.length-this.Match_MaxBits))==-1||l>=p)&&(l=-1):l=this.match_main(r,f,_),l==-1)a[o]=!1,i-=t[o].length2-t[o].length1;else if(a[o]=!0,i=l-_,f==(u=p==-1?r.substring(l,l+f.length):r.substring(l,p+this.Match_MaxBits)))r=r.substring(0,l)+this.diff_text2(t[o].diffs)+r.substring(l+f.length);else{var m=this.diff_main(f,u,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(m)/f.length>this.Patch_DeleteThreshold)a[o]=!1;else{this.diff_cleanupSemanticLossless(m);for(var x,S=0,b=0;bo[0][1].length){var l=r-o[0][1].length;o[0][1]=s.substring(o[0][1].length)+o[0][1],a.start1-=l,a.start2-=l,a.length1+=l,a.length2+=l}return(o=(a=t[t.length-1]).diffs).length==0||o[o.length-1][0]!=0?(o.push(new n.Diff(0,s)),a.length1+=r,a.length2+=r):r>o[o.length-1][1].length&&(l=r-o[o.length-1][1].length,o[o.length-1][1]+=s.substring(0,l),a.length1+=l,a.length2+=l),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(u.length1+=p.length,a+=p.length,_=!1,u.diffs.push(new n.Diff(f,p)),i.diffs.shift()):(p=p.substring(0,r-u.length1-this.Patch_Margin),u.length1+=p.length,a+=p.length,f===0?(u.length2+=p.length,o+=p.length):_=!1,u.diffs.push(new n.Diff(f,p)),p==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(p.length))}l=(l=this.diff_text2(u.diffs)).substring(l.length-this.Patch_Margin);var m=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);m!==""&&(u.length1+=m.length,u.length2+=m.length,u.diffs.length!==0&&u.diffs[u.diffs.length-1][0]===0?u.diffs[u.diffs.length-1][1]+=m:u.diffs.push(new n.Diff(0,m))),_||t.splice(++s,0,u)}}},n.prototype.patch_toText=function(t){for(var r=[],s=0;s1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(n===void 0?"block":n)==="block"?Pgt:Fgt,r=F6(e.map((function(o){return o.changes})),SI).map(t).reduce((function(o,l){var u=En(o,2),_=u[0],f=u[1],p=En(l,2),m=p[0],x=p[1];return[_.concat(m),f.concat(x)]}),[[],[]]),s=En(r,2),i=s[0],a=s[1];return Lgt(Lz(i),Lz(a))}var qgt=["enhancers"],$z=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=En(ygt(e,cu(t,qgt)),2),a=i[0],o=i[1],l=[Rz(a),Rz(o)],u=(n=[l[0],l[1]],s.reduce((function(S,b){return b(S)}),n)),_=En(u,2),f=_[0],p=_[1],m=[f.map(Mz),p.map(Mz)],x=m[1];return{old:m[0].map((function(S){var b;return(b=S.children)!==null&&b!==void 0?b:[]})),new:x.map((function(S){var b;return(b=S.children)!==null&&b!==void 0?b:[]}))}};Ko.displayName="clike";Ko.aliases=[];function Ko(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}Yp.displayName="c";Yp.aliases=[];function Yp(e){e.register(Ko),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}yb.displayName="cpp";yb.aliases=[];function yb(e){e.register(Yp),(function(n){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,r=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});n.languages.cpp=n.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),n.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return r})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),n.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n.languages.cpp}}}}),n.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),n.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:n.languages.extend("cpp",{})}}),n.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},n.languages.cpp["base-clause"])})(e)}q6.displayName="arduino";q6.aliases=["ino"];function q6(e){e.register(yb),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}U6.displayName="bash";U6.aliases=["sh","shell"];function U6(e){(function(n){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};n.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=n.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=s.variable[1].inside,o=0;o>/g,function(q,G){return"(?:"+$[+G]+")"})}function r(L,$,q){return RegExp(t(L,$),"")}function s(L,$){for(var q=0;q<$;q++)L=L.replace(/<>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var i={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function a(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var o=a(i.typeDeclaration),l=RegExp(a(i.type+" "+i.typeDeclaration+" "+i.contextual+" "+i.other)),u=a(i.typeDeclaration+" "+i.contextual+" "+i.other),_=a(i.type+" "+i.typeDeclaration+" "+i.other),f=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),p=s(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,x=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),S=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,x]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[S,b]),y=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,p,b]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,S,b]),N={keyword:l,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,j=/"(?:\\.|[^\\"\r\n])*"/.source,z=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[z]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[S]),lookbehind:!0,inside:N},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,C]),lookbehind:!0,inside:N},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[o,x]),lookbehind:!0,inside:N},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[S]),lookbehind:!0,inside:N},{pattern:r(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,_,m]),inside:N}],keyword:l,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),n.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),n.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:N},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,S]),inside:N,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:N,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:r(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:N}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[o,x,m,C,l.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[x,p]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:l,"class-name":{pattern:RegExp(C),greedy:!0,inside:N},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=j+"|"+E,O=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),B=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),F=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,U=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[S,B]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[F,U]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[F]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[B]),inside:n.languages.csharp},"class-name":{pattern:RegExp(S),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var H=/:[^}\r\n]+/.source,Y=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),V=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Y,H]),X=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),ie=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[X,H]);function I(L,$){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[$,H]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:n.languages.csharp}}},string:/[\s\S]+/}}n.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[V]),lookbehind:!0,greedy:!0,inside:I(V,Y)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[ie]),lookbehind:!0,greedy:!0,inside:I(ie,X)}],char:{pattern:RegExp(E),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}Xp.displayName="markup";Xp.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Xp(e){e.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(t,r){var s={};s["language-"+r]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[r]},s.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:s}};i["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(n,t){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:e.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}o_.displayName="css";o_.aliases=[];function o_(e){(function(n){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var r=n.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}W6.displayName="diff";W6.aliases=[];function W6(e){(function(n){n.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(r){var s=t[r],i=[];/^\w+$/.test(r)||i.push(/\w+/.exec(r)[0]),r==="diff"&&i.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r +?| +|(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(r)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:t})})(e)}V6.displayName="go";V6.aliases=[];function V6(e){e.register(Ko),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}K6.displayName="ini";K6.aliases=[];function K6(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}Q6.displayName="java";Q6.aliases=[];function Q6(e){e.register(Ko),(function(n){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};n.languages.java=n.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[n.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),n.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),n.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}Y6.displayName="regex";Y6.aliases=[];function Y6(e){(function(n){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},r=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,s={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},i={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},a="(?:[^\\\\-]|"+r.source+")",o=RegExp(a+"-"+a),l={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};n.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:o,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":i,escape:r}},"special-escape":t,"char-set":s,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":l}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:r,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}X6.displayName="json";X6.aliases=["webmanifest"];function X6(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}Z6.displayName="kotlin";Z6.aliases=["kt","kts"];function Z6(e){e.register(Ko),(function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:n.languages.kotlin}};n.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete n.languages.kotlin.string,n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin})(e)}J6.displayName="less";J6.aliases=[];function J6(e){e.register(o_),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}eS.displayName="lua";eS.aliases=[];function eS(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}tS.displayName="makefile";tS.aliases=[];function tS(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}nS.displayName="yaml";nS.aliases=["yml"];function nS(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(l,u){u=(u||"").replace(/m/g,"")+"m";var _=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return l});return RegExp(_,u)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(e)}rS.displayName="markdown";rS.aliases=["md"];function rS(e){e.register(Xp),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(o){return o=o.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+o+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;n.languages.markdown=n.languages.extend("markup",{}),n.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:n.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:n.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:r(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:r(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:r(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:r(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(o){["url","bold","italic","strike","code-snippet"].forEach(function(l){o!==l&&(n.languages.markdown[o].inside.content.inside[l]=n.languages.markdown[l])})}),n.hooks.add("after-tokenize",function(o){if(o.language!=="markdown"&&o.language!=="md")return;function l(u){if(!(!u||typeof u=="string"))for(var _=0,f=u.length;_]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}iS.displayName="perl";iS.aliases=[];function iS(e){(function(n){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;n.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}wb.displayName="markup-templating";wb.aliases=[];function wb(e){e.register(Xp),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,i,a){if(r.language===s){var o=r.tokenStack=[];r.code=r.code.replace(i,function(l){if(typeof a=="function"&&!a(l))return l;for(var u=o.length,_;r.code.indexOf(_=t(s,u))!==-1;)++u;return o[u]=l,_}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var i=0,a=Object.keys(r.tokenStack);function o(l){for(var u=0;u=a.length);u++){var _=l[u];if(typeof _=="string"||_.content&&typeof _.content=="string"){var f=a[i],p=r.tokenStack[f],m=typeof _=="string"?_:_.content,x=t(s,f),S=m.indexOf(x);if(S>-1){++i;var b=m.substring(0,S),v=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),y=m.substring(S+x.length),w=[];b&&w.push.apply(w,o([b])),w.push(v),y&&w.push.apply(w,o([y])),typeof _=="string"?l.splice.apply(l,[u,1].concat(w)):_.content=w}}else _.content&&o(_.content)}return l}o(r.tokens)}}})})(e)}aS.displayName="php";aS.aliases=[];function aS(e){e.register(wb),(function(n){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,r=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],s=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;n.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:s,operator:i,punctuation:a};var o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:n.languages.php},l=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}];n.languages.insertBefore("php","variable",{string:l,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:l,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:r,number:s,operator:i,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(u){if(/<\?/.test(u.code)){var _=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",_)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}oS.displayName="python";oS.aliases=["py"];function oS(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}lS.displayName="r";lS.aliases=[];function lS(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}cS.displayName="ruby";cS.aliases=["rb"];function cS(e){e.register(Ko),(function(n){n.languages.ruby=n.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),n.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:n.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete n.languages.ruby.function;var r="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",s=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;n.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+r+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+s),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+s+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),n.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+r),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+r),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete n.languages.ruby.string,n.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),n.languages.rb=n.languages.ruby})(e)}uS.displayName="rust";uS.aliases=[];function uS(e){(function(n){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,r=0;r<2;r++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),n.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},n.languages.rust["closure-params"].inside.rest=n.languages.rust,n.languages.rust.attribute.inside.string=n.languages.rust.string})(e)}fS.displayName="sass";fS.aliases=[];function fS(e){e.register(o_),(function(n){n.languages.sass=n.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete n.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,r=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];n.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:r}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:r,important:n.languages.sass.important}}}),delete n.languages.sass.property,delete n.languages.sass.important,n.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}dS.displayName="scss";dS.aliases=[];function dS(e){e.register(o_),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}hS.displayName="sql";hS.aliases=[];function hS(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}_S.displayName="swift";_S.aliases=[];function _S(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(n){n.inside.interpolation.inside=e.languages.swift})}pS.displayName="typescript";pS.aliases=["ts"];function pS(e){e.register(xb),(function(n){n.languages.typescript=n.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),n.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete n.languages.typescript.parameter,delete n.languages.typescript["literal-property"];var t=n.languages.extend("typescript",{});delete t["class-name"],n.languages.typescript["class-name"].inside=t,n.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),n.languages.ts=n.languages.typescript})(e)}Sb.displayName="basic";Sb.aliases=[];function Sb(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}mS.displayName="vbnet";mS.aliases=[];function mS(e){e.register(Sb),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class Zp{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Zp.prototype.normal={};Zp.prototype.property={};Zp.prototype.space=void 0;function CI(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new Zp(t,r,n)}function ip(e){return e.toLowerCase()}class ki{constructor(n,t){this.attribute=t,this.property=n}}ki.prototype.attribute="";ki.prototype.booleanish=!1;ki.prototype.boolean=!1;ki.prototype.commaOrSpaceSeparated=!1;ki.prototype.commaSeparated=!1;ki.prototype.defined=!1;ki.prototype.mustUseProperty=!1;ki.prototype.number=!1;ki.prototype.overloadedBoolean=!1;ki.prototype.property="";ki.prototype.spaceSeparated=!1;ki.prototype.space=void 0;let Ugt=0;const Wt=Zf(),es=Zf(),r3=Zf(),Ke=Zf(),sr=Zf(),Nf=Zf(),Bi=Zf();function Zf(){return 2**++Ugt}const s3=Object.freeze(Object.defineProperty({__proto__:null,boolean:Wt,booleanish:es,commaOrSpaceSeparated:Bi,commaSeparated:Nf,number:Ke,overloadedBoolean:r3,spaceSeparated:sr},Symbol.toStringTag,{value:"Module"})),M2=Object.keys(s3);class gS extends ki{constructor(n,t,r,s){let i=-1;if(super(n,t),Pz(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&Qgt.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(Fz,Xgt);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!Fz.test(i)){let a=i.replace(Kgt,Ygt);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=gS}return new s(r,n)}function Ygt(e){return"-"+e.toLowerCase()}function Xgt(e){return e.charAt(1).toUpperCase()}const MI=CI([EI,Ggt,TI,jI,AI],"html"),kb=CI([EI,Wgt,TI,jI,AI],"svg");function Hz(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,i=!1;for(;!i;){r===-1&&(r=t.length,i=!0);const a=t.slice(s,r).trim();(a||!i)&&n.push(a),s=r+1,r=t.indexOf(",",s)}return n}function Zgt(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const qz=/[#.]/g;function Jgt(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function l1t(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function c1t(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function Vz(e){return c1t(e)||OI(e)}const Kz=document.createElement("i");function ap(e){const n="&"+e+";";Kz.innerHTML=n;const t=Kz.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const u1t=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function f1t(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let i=0,a=-1,o="",l,u;t.position&&("start"in t.position||"indent"in t.position?(u=t.position.indent,l=t.position.start):l=t.position);let _=(l?l.line:0)||1,f=(l?l.column:0)||1,p=x(),m;for(i--;++i<=e.length;)if(m===10&&(f=(u?u[a]:0)||1),m=e.charCodeAt(i),m===38){const v=e.charCodeAt(i+1);if(v===9||v===10||v===12||v===32||v===38||v===60||Number.isNaN(v)||r&&v===r){o+=String.fromCharCode(m),f++;continue}const y=i+1;let w=y,C=y,N;if(v===35){C=++w;const U=e.charCodeAt(C);U===88||U===120?(N="hexadecimal",C=++w):N="decimal"}else N="named";let E="",j="",z="";const M=N==="named"?Vz:N==="decimal"?OI:l1t;for(C--;++C<=e.length;){const U=e.charCodeAt(C);if(!M(U))break;z+=String.fromCharCode(U),N==="named"&&o1t.includes(z)&&(E=z,j=ap(z))}let O=e.charCodeAt(C)===59;if(O){C++;const U=N==="named"?ap(z):!1;U&&(E=z,j=U)}let B=1+C-y,F="";if(!(!O&&t.nonTerminated===!1))if(!z)N!=="named"&&S(4,B);else if(N==="named"){if(O&&!j)S(5,1);else if(E!==z&&(C=w+E.length,B=1+C-w,O=!1),!O){const U=E?1:3;if(t.attribute){const H=e.charCodeAt(C);H===61?(S(U,B),j=""):Vz(H)?j="":S(U,B)}else S(U,B)}F=j}else{O||S(2,B);let U=Number.parseInt(z,N==="hexadecimal"?16:10);if(d1t(U))S(7,B),F="�";else if(U in Wz)S(6,B),F=Wz[U];else{let H="";h1t(U)&&S(6,B),U>65535&&(U-=65536,H+=String.fromCharCode(U>>>10|55296),U=56320|U&1023),F=H+String.fromCharCode(U)}}if(F){b(),p=x(),i=C-1,f+=C-y+1,s.push(F);const U=x();U.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,F,{start:p,end:U},e.slice(y-1,C)),p=U}else z=e.slice(y-1,C),o+=z,f+=z.length,i=C-1}else m===10&&(_++,a++,f=0),Number.isNaN(m)?b():(o+=String.fromCharCode(m),f++);return s.join("");function x(){return{line:_,column:f,offset:i+((l?l.offset:0)||0)}}function S(v,y){let w;t.warning&&(w=x(),w.column+=y,w.offset+=y,t.warning.call(t.warningContext||void 0,u1t[v],w,v))}function b(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:x()}),o="")}}function d1t(e){return e>=55296&&e<=57343||e>1114111}function h1t(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var _1t=0,Ig={},xs={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++_1t}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(xs.util.type(n)){case"Object":if(s=xs.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var i in n)n.hasOwnProperty(i)&&(r[i]=e(n[i],t));return r;case"Array":return s=xs.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(a,o){r[o]=e(a,t)}),r);default:return n}}},languages:{plain:Ig,plaintext:Ig,text:Ig,txt:Ig,extend:function(e,n){var t=xs.util.clone(xs.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||xs.languages;var s=r[e],i={};for(var a in s)if(s.hasOwnProperty(a)){if(a==n)for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);t.hasOwnProperty(a)||(i[a]=s[a])}var l=r[e];return r[e]=i,xs.languages.DFS(xs.languages,function(u,_){_===l&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=xs.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],l=xs.util.type(o);l==="Object"&&!s[i(o)]?(s[i(o)]=!0,e(o,t,null,s)):l==="Array"&&!s[i(o)]&&(s[i(o)]=!0,e(o,t,a,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(xs.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=xs.tokenize(r.code,r.grammar),xs.hooks.run("after-tokenize",r),A0.stringify(xs.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var s=new p1t;return w1(s,s.head,e),II(e,s,n,s.head,0),g1t(s)},hooks:{all:{},add:function(e,n){var t=xs.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=xs.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:A0};function A0(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function Qz(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var i=s[1].length;s.index+=i,s[0]=s[0].slice(i)}return s}function II(e,n,t,r,s,i){for(var a in t)if(!(!t.hasOwnProperty(a)||!t[a])){var o=t[a];o=Array.isArray(o)?o:[o];for(var l=0;l=i.reach);v+=b.value.length,b=b.next){var y=b.value;if(n.length>e.length)return;if(!(y instanceof A0)){var w=1,C;if(p){if(C=Qz(S,v,e,f),!C||C.index>=e.length)break;var z=C.index,N=C.index+C[0].length,E=v;for(E+=b.value.length;z>=E;)b=b.next,E+=b.value.length;if(E-=b.value.length,v=E,b.value instanceof A0)continue;for(var j=b;j!==n.tail&&(Ei.reach&&(i.reach=F);var U=b.prev;O&&(U=w1(n,U,O),v+=O.length),m1t(n,U,w);var H=new A0(a,_?xs.tokenize(M,_):M,m,M);if(b=w1(n,U,H),B&&w1(n,b,B),w>1){var Y={cause:a+","+l,reach:F};II(e,n,t,b.prev,v,Y),i&&Y.reach>i.reach&&(i.reach=Y.reach)}}}}}}function p1t(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function w1(e,n,t){var r=n.next,s={value:t,prev:n,next:r};return n.next=s,r.prev=s,e.length++,s}function m1t(e,n,t){for(var r=n.next,s=0;s_td:first-child]:p-0","[&_.openresearch-diff-file.diff-unified_col.diff-gutter-col:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[7ch]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pt-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pe-2.5 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:pb-0 [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:ps-3.5","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:whitespace-nowrap","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-end","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:text-diff-gutter-text","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e [&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:border-e-border","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:select-none","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:cursor-default","[&_.openresearch-diff-file_.diff-line:has(.diff-code-insert)]:bg-diff-insert-code","[&_.openresearch-diff-file_.diff-line:has(.diff-code-delete)]:bg-diff-delete-code","[&_.openresearch-diff-file_.diff-code]:py-0 [&_.openresearch-diff-file_.diff-code]:ps-[2ch] [&_.openresearch-diff-file_.diff-code]:pe-4","[&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t [&_.openresearch-diff-file_.diff-hunk_+_.diff-hunk_.diff-line:first-child_>_td]:border-t-border"].join(" "),N1t=2e3,z1t={highlight(e,n){return Nt.highlight(e,n).children}};function T1t(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Cb(e){let n=0,t=0;for(const r of e.hunks)for(const s of r.changes)s.type==="insert"?n++:s.type==="delete"&&t++;return{additions:n,deletions:t}}function j1t(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function c3(e){switch(e.type){case"delete":return e.oldPath;case"add":case"modify":return e.newPath;case"rename":case"copy":return`${e.oldPath} → ${e.newPath}`}}function A1t(e){const n=[Hgt(e.hunks,{type:"line"})],t=vS(j1t(e));return t&&Nt.registered(t)?$z(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:z1t}):$z(e.hunks,{enhancers:n,highlight:!1})}function PI(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:Q4(e,{nearbySequences:"zip"}),failed:!1}}catch{if(n){const t=Array.from(e.matchAll(/^diff --git /gm),s=>s.index),r=t[t.length-1];if(t.length>1&&r!==void 0)try{return{files:Q4(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const R1t=({change:e,side:n})=>n==="old"?null:T1t(e);function FI({bytesRead:e,byteLimit:n}){return h.jsxs("div",{className:"truncated-notice border border-accent-amber rounded-md bg-accent-amber-subtle py-3 px-3.5 text-sm [&_h4]:mt-0 [&_h4]:mx-0 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:text-accent-amber [&_p]:m-0 [&_p]:text-subtext",children:[h.jsx("h4",{children:p2e()}),h.jsx("p",{children:W2e({limit:Ee(Fl(n)),read:Ee(Fl(e))})})]})}function HI({file:e,defaultExpanded:n}){const[t,r]=R.useState(n),{additions:s,deletions:i}=R.useMemo(()=>Cb(e),[e]),a=t&&s+i<=N1t,o=R.useMemo(()=>{if(a)try{return A1t(e)}catch{return}},[e,a]);return h.jsxs("section",{className:`diff-file-card overflow-hidden border border-border rounded-md bg-background [&.expanded_.diff-file-header]:border-b [&.expanded_.diff-file-header]:border-b-border ${t?"expanded":""}`,children:[h.jsxs("button",{className:"diff-file-header sticky top-0 z-10 flex items-center justify-between gap-3 w-full text-start py-2 px-3 bg-canvas cursor-pointer [&_.chev]:text-muted [&_.chev]:text-xs [&_.chev]:shrink-0 [&_.chev]:w-3 [&_.path]:flex [&_.path]:items-center [&_.path]:gap-2 [&_.path]:min-w-0 [&_.path]:flex-1 [&_.path_code]:min-w-0 [&_.path_code]:flex-1 [&_.path_code]:overflow-hidden [&_.path_code]:text-ellipsis [&_.path_code]:whitespace-nowrap [&_.path_code]:font-mono [&_.path_code]:text-xs [&_.path_code]:font-medium [&_.path_code]:text-text [&_.stats]:flex [&_.stats]:items-center [&_.stats]:gap-2 [&_.stats]:shrink-0 [&_.stats]:font-mono [&_.stats]:text-xs [&_.stats]:font-medium [&_.stats]:tabular-nums","aria-expanded":t,onClick:()=>r(l=>!l),children:[h.jsx("span",{className:"chev",children:t?h.jsx(Wo,{size:14}):h.jsx(Vo,{size:14})}),h.jsx("span",{className:"path",children:h.jsx("code",{children:c3(e)})}),h.jsxs("span",{className:"stats",children:[h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",i]})]})]}),t&&(e.hunks.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:A2e()}):h.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:h.jsx(ugt,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:R1t,tokens:o,viewType:"unified"})}))]})}function M1t({files:e,className:n}){return h.jsx("div",{className:n?`${l3} ${n}`:l3,children:e.map((t,r)=>h.jsx(HI,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function D1t(e){switch(e.type){case"add":return"A";case"delete":return"D";case"rename":return"R";case"copy":return"C";case"modify":return"M"}}function qI({diff:e,partial:n=!1}){var p;const t=R.useMemo(()=>PI(e,n),[e,n]),r=t.files,s=R.useMemo(()=>r.map((m,x)=>({file:m,key:`${m.oldPath}→${m.newPath}#${x}`,changes:Cb(m)})),[r]),[i,a]=R.useState(null),[o,l]=R.useState(!1),u=o&&!n,_=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,f=s.find(m=>m.key===_)??null;return t.failed?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?N2e():H2e()}):s.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:S2e()}):h.jsxs("div",{className:"diff-explorer @container",children:[h.jsxs("div",{className:"diff-explorer-toolbar flex items-center justify-between gap-3 mb-2.5 text-sm [&_button]:py-0.5 [&_button]:px-0 [&_button]:text-muted [&_button]:text-sm [&_button]:font-medium [&_button:hover]:text-text [&_button:hover]:underline [&_button:hover]:underline-offset-2",children:[h.jsx("strong",{className:"font-medium",children:n?s.length===1?B2e():b2e({count:tn(s.length)}):s.length===1?xD():yD({count:tn(s.length)})}),!n&&h.jsx("button",{type:"button",onClick:()=>l(m=>!m),children:u?s2e():Y2e()})]}),u?h.jsx(M1t,{files:r}):h.jsxs("div",{className:"diff-explorer-layout grid grid-cols-[minmax(180px,_260px)_minmax(0,_1fr)] items-start gap-3.5 [@container((max-width:_960px))]:grid-cols-1",children:[h.jsx("div",{className:"diff-explorer-files sticky top-0 max-h-[min(70vh,_720px)] overflow-auto border border-border rounded-md bg-background [&_button]:grid [&_button]:grid-cols-[18px_minmax(0,_1fr)_auto_auto] [&_button]:items-center [&_button]:gap-[7px] [&_button]:w-full [&_button]:py-2 [&_button]:px-[9px] [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button:last-child]:border-b-0 [&_button:hover]:bg-surface [&_button.active]:bg-surface [&_button.active]:shadow-diff-active [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap [&_code]:text-xs [@container((max-width:_960px))]:static [@container((max-width:_960px))]:max-h-55","aria-label":f2e(),children:s.map(m=>h.jsxs("button",{type:"button",className:m.key===_?"active":"","aria-pressed":m.key===_,onClick:()=>a(m.key),children:[h.jsx("span",{className:`diff-file-status font-mono text-xs font-medium text-muted [&.status-add]:text-accent-green [&.status-delete]:text-accent-red [&.status-rename]:text-accent-blue [&.status-copy]:text-accent-blue status-${m.file.type}`,children:D1t(m.file)}),h.jsx("code",{title:c3(m.file),children:c3(m.file)}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",m.changes.additions]}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",m.changes.deletions]})]},m.key))}),h.jsx("div",{className:`${l3} diff-explorer-preview min-w-0`,children:f&&h.jsx(HI,{file:f.file,defaultExpanded:!0},f.key)})]})]})}function L1t({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:l,busy:u,onChanges:_,onFiles:f,onArtifacts:p,onExperiments:m}){var w,C;const x=L0t(n,t,l),S=ct({...EL(a),enabled:e}),b=((w=S.data)==null?void 0:w.configuredDefaultBackend)??((C=S.data)==null?void 0:C.defaultBackend),v=b?Lf[b]():S.isPending?"…":S.isError?Ao():S4(),y=[{id:"files",label:g4(),Icon:Df,onClick:f},{id:"artifacts",label:tD(),Icon:x6,onClick:p},{id:"experiments",label:nD(),Icon:rb,onClick:m}];return h.jsx("div",{className:"workspace-tools absolute end-3.5 top-7 z-30",style:{insetInlineEnd:s},children:e?h.jsxs("nav",{"aria-label":v2(),className:"workspace-tools-card flex w-60 flex-col gap-0.5 rounded-xl border border-border bg-background px-1.5 py-2 shadow-elevated",children:[h.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:v2()}),y.filter(N=>N.id!=="files").map(({id:N,label:E,Icon:j,onClick:z})=>h.jsx(dr,{className:"min-h-7 py-1","data-onboarding":N==="artifacts"?"nav-artifacts":void 0,onClick:z,children:h.jsxs("span",{className:"flex items-center gap-4",children:[h.jsx(j,{size:15}),E]})},N)),h.jsx(dr,{className:"py-1",onClick:o,children:h.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[h.jsxs("span",{className:"flex items-center gap-4 text-sm text-text",children:[h.jsx(SO,{size:15,className:"shrink-0"}),Dat()]}),h.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[b&&h.jsx(i_,{kind:`${b}_job`,size:12}),h.jsx("span",{className:"wrap-anywhere",children:v})]})]})}),h.jsxs("div",{className:"mt-2 border-t border-border/50 pt-3",children:[h.jsx("h2",{className:"m-0 px-2 pt-1 pb-2 text-sm font-normal text-subtext",children:Bat()}),h.jsx(dr,{className:"min-h-7 py-1",onClick:f,children:h.jsxs("span",{className:"flex items-center gap-4",children:[h.jsx(Df,{size:15}),g4()]})}),l&&h.jsx(O1t,{sessionId:l,busy:u,onChanges:_},l),x.length>0&&h.jsxs("div",{children:[h.jsxs("h2",{className:"m-0 flex items-center gap-4 px-2 py-1 text-sm font-normal text-text",children:[h.jsx("span",{className:"flex w-[15px] shrink-0 justify-center",children:h.jsx(Zv,{tone:"success",live:!0})}),h.jsx("span",{children:jat()})]}),x.map(N=>h.jsx(dr,{className:"min-h-7 py-1",onClick:()=>r(N.experiment.id,N.run.id),children:h.jsx("span",{className:"min-w-0 truncate ps-[31px] text-menu text-subtext",title:`${N.experiment.title||N.experiment.slug} · ${R6(Ui(N.run))}`,children:N.experiment.title||N.experiment.slug})},N.run.id))]})]})]}):h.jsx("nav",{"aria-label":v2(),className:"flex items-center justify-end gap-3",children:y.map(({id:N,label:E,Icon:j,onClick:z})=>h.jsx(on,{active:i===N,className:"text-text [&.active]:text-text","data-tip":E,"data-tip-align":N==="experiments"?"end":void 0,"aria-label":E,"aria-pressed":i===N,onClick:z,children:h.jsx(j,{size:15})},N))})})}function O1t({sessionId:e,busy:n,onChanges:t}){var l,u;const r=ct({...av(e),refetchInterval:n?5e3:!1}),s=R.useRef(n),{refetch:i}=r;R.useEffect(()=>{s.current&&!n&&i(),s.current=n},[n,i]);const a=r.data,o=R.useMemo(()=>{if(!(a!=null&&a.diff)||a.diff.truncated)return null;const _=PI(a.diff.diff,!1);return _.failed?null:_.files.map(Cb).reduce((f,p)=>({additions:f.additions+p.additions,deletions:f.deletions+p.deletions}),{additions:0,deletions:0})},[a==null?void 0:a.diff]);return a!=null&&a.exists?h.jsxs(dr,{className:"min-h-7 py-1",onClick:t,title:a.branch??W5(),children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[h.jsx(Vp,{size:15,className:"shrink-0"}),h.jsx("span",{children:fD()})]}),o?h.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[h.jsxs("span",{className:"text-accent-green",children:["+",tn(o.additions)]}),h.jsxs("span",{className:"text-accent-red",children:["−",tn(o.deletions)]})]}):h.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((l=a.files)==null?void 0:l.length)===1?xD():yD({count:tn(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function I1t(e,n,t){const r=new Array(e);return new Proxy(r,{get(s,i,a){if(typeof i=="string"){const o=i.charCodeAt(0);if(o>=48&&o<=57){const l=+i;if(Number.isInteger(l)&&l>=0&&lr[_]!==u))&&(r=o,s=n(...o),t!=null&&t.onChange&&!(i&&t.skipInitialOnChange)&&t.onChange(s),i=!1),s}return a.updateDeps=o=>{r=o},a}function Yz(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const B1t=(e,n)=>Math.abs(e-n)<1.01,$1t=(e,n,t)=>{let r;return Object.assign(function(...s){e.clearTimeout(r),r=e.setTimeout(()=>n.apply(this,s),t)},{cancel:()=>{e.clearTimeout(r)}})};let a0;const D2=()=>{if(a0!==void 0)return a0;if(typeof navigator>"u")return a0=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return a0=!0;const e=navigator.maxTouchPoints;return a0=navigator.platform==="MacIntel"&&e!==void 0&&e>0},Xz=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},P1t=e=>e,UI=e=>{const n=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1)-n+1,s=new Array(r);for(let i=0;i{const t=e.scrollElement;if(!t)return;const r=e.targetWindow;if(!r)return;const s=a=>{const{width:o,height:l}=a;n({width:Math.round(o),height:Math.round(l)})};if(s(Xz(t)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(a=>{const o=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){s({width:u.inlineSize,height:u.blockSize});return}}s(Xz(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},cv={passive:!0},H1t=typeof window>"u"?!0:"onscrollend"in window,q1t=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&H1t;let a=0;const o=i?null:$1t(s,()=>n(a,!1),e.options.isScrollingResetDelay),l=f=>()=>{a=t(r),o==null||o(),n(a,f)},u=l(!0),_=l(!1);return r.addEventListener("scroll",u,cv),i&&r.addEventListener("scrollend",_,cv),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",_),o==null||o.cancel()}},U1t=(e,n)=>q1t(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),G1t=(e,n,t)=>{if(t.options.useCachedMeasurements){const r=t.indexFromElement(e),s=t.options.getItemKey(r);return t.itemSizeCache.get(s)??t.options.estimateSize(r)}if(n!=null&&n.borderBoxSize){const r=n.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}if(!n){const r=t.indexFromElement(e),s=t.options.getItemKey(r),i=t.itemSizeCache.get(s);if(i!==void 0)return i}return e[t.options.horizontal?"offsetWidth":"offsetHeight"]},W1t=(e,{adjustments:n=0,behavior:t},r)=>{var s,i;(i=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[r.options.horizontal?"left":"top"]:e+n,behavior:t})},V1t=W1t;class K1t{constructor(n){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,r,s;return((s=(r=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const a=()=>{const o=i.target,l=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);for(const[u,_]of this.elementsCache)if(_===o){this.elementsCache.delete(u);break}return}this.isIndexInRange(l)&&this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(o,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),t=null},observe:s=>{var i;return(i=r())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=r())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var r,s;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:P1t,rangeExtractor:UI,onChange:()=>{},measureElement:G1t,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const p in t){const m=t[p];m!==void 0&&(i[p]=m)}const a=this.options;let o=null,l=null,u=!1;if(a!==void 0&&a.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const p=a.count,m=i.count,x=this.getMeasurements(),S=p>0?((r=x[0])==null?void 0:r.key)??a.getItemKey(0):null,b=p>0?((s=x[p-1])==null?void 0:s.key)??a.getItemKey(p-1):null;if(m!==p||p>0&&m>0&&(i.getItemKey(0)!==S||i.getItemKey(m-1)!==b)){u=!0;const w=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??x[0]:null;w&&(o=[w.key,this.getScrollOffset()-w.start]);const C=i.followOnAppend===!0?"auto":i.followOnAppend||null;C&&m>p&&this.isAtEnd(a.scrollEndThreshold)&&(p===0||i.getItemKey(m-1)!==b)&&(l=C)}}this.options=i,u&&(this.pendingMin=0,this.itemSizeCacheVersion++);let _=!1,f=0;if(o&&this.scrollOffset!==null){const[p,m]=o,x=this.getMeasurements(),{count:S,getItemKey:b}=this.options;let v=0;for(;v{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=Pd(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}if(this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{if(a&&this._intendedScrollOffset===null&&i===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(i-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const o=this.getScrollOffset();this.scrollDirection=a?o===i?this.scrollDirection:o{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},o=()=>{this._iosTouching=!1,!(!D2()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,cv),i.addEventListener("touchend",o,cv),this.unsubs.push(()=>{i.removeEventListener("touchstart",a),i.removeEventListener("touchend",o),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[i,a,o,l]=s;i!==null&&!o&&(D2()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?l!==0&&(this._iosDeferredAdjustment+=l):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),o&&this.scrollToEnd({behavior:o})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:t,maxAtWrite:r}=this._clampedAdjustment,s=this.getMaxScrollOffset();s>r+.5&&(this._clampedAdjustment=t>s+.5?{target:t,maxAtWrite:s}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),r=this.getMaxScrollOffset();if(t<0||t>r)return;if(this._iosDeferredAdjustment<0&&t>=r-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=Pd(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,r,s,i,a,o,l,u)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:a,lanes:o,laneAssignmentMode:l,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:a,lanes:o,laneAssignmentMode:l,gap:u},_)=>{const f=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const v of this.laneAssignments.keys())v>=t&&this.laneAssignments.delete(v);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(v=>{this.itemSizeCache.set(v.key,v.size)}));const p=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),o===1){const v=t*2;let y=this._flatMeasurements;if(!y||y.length0&&N.set(y.subarray(0,p*2)),y=N,this._flatMeasurements=y}let w;if(p===0)w=r+s;else{const N=p-1;w=y[N*2]+y[N*2+1]+u}for(let N=p;N1){C=w;const O=x[C],B=O!==void 0?m[O]:void 0;N=B?B.end+u:r+s}else if(b===o){let O=0,B=S[0],F=x[0];for(let U=1;Uthis.options.debug}),this.calculateRange=Pd(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=Y1t(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Pd(()=>{let t=null,r=null;const s=this.calculateRange();return s&&(t=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,r]},(t,r,s,i,a)=>i===null||a===null?[]:t({startIndex:i,endIndex:a,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,s=t.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,s-i),o=Math.min(this.options.count-1,s+i);return t>=a&&t<=o}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((a,o)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(o))});return}const r=this.indexFromElement(t);if(!this.isIndexInRange(r))return;const s=this.options.getItemKey(r),i=this.elementsCache.get(s);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,r)=>{var s,i;if(!this.isIndexInRange(t))return;let a,o,l;const u=this._flatMeasurements;if(this.options.lanes===1&&u!==null)l=this.options.getItemKey(t),o=u[t*2],a=u[t*2+1];else{const p=this.measurementsCache[t];if(!p)return;l=p.key,o=p.start,a=p.size}const _=this.itemSizeCache.get(l)??a,f=r-_;if(f!==0){const p=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=p?this.getTotalSize():0,x=this.getScrollOffset()+this.scrollAdjustments,b=!this.itemSizeCache.has(l)?o[this.getVirtualIndexes(),this.getMeasurements()],(t,r)=>{const s=[];for(let i=0,a=t.length;ithis.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length===0)return;const s=this._flatMeasurements,i=this.options.lanes===1&&s!=null,a=GI(0,r.length-1,i?o=>s[o*2]:o=>Yz(r[o]).start,t);return Yz(r[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,r,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=t>=a+i?"end":"start"),r==="center"?t+=(s-i)/2:r==="end"&&(t-=i);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),i=this.getScrollOffset(),a=this.measurementsCache[t];if(!a)return;if(r==="auto")if(a.end>=i+s-this.options.scrollPaddingEnd)r="end";else if(a.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];if(r==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),r];const o=r==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,r,a.size),r]},this.scrollToOffset=(t,{align:r="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const i=this.getOffsetForAlignment(t,r),a=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:r="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const i=this.getOffsetForIndex(t,r);if(!i)return;const[a,o]=i,l=this.now();this.scrollState={index:t,align:o,behavior:s,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+t,i=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const i=r.length-1,a=this._flatMeasurements;a!=null?s=a[i*2]+a[i*2+1]:s=((t=r[i])==null?void 0:t.end)??0}else{const i=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&i.some(o=>o===null);){const o=r[a];i[o.lane]===null&&(i[o.lane]=o.end),a--}s=Math.max(...i.filter(o=>o!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const r=this.getMeasurements();for(const s of r)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:r,behavior:s})=>{this._intendedScrollOffset=t+(r??0),this.options.scrollToFn(t,{behavior:s,adjustments:r},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(n)}applyScrollAdjustment(n,t){if(n===0)return!1;if(D2()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=n,!1;{const r=this.getScrollOffset()+this.scrollAdjustments+n,s=this.scrollElement,i=s!==null&&("scrollHeight"in s||"document"in s)?this.getMaxScrollOffset():null;return this._clampedAdjustment=i!==null&&r>i+.5?{target:r,maxAtWrite:i}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,i=1,a=s!==this.scrollState.lastTargetOffset;if(!a&&B1t(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.getScrollOffset()!==s&&this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const o=this.getSize()||600,l=Math.abs(s-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&l>o;this.scrollState.lastTargetOffset=s,u||(this.scrollState.behavior="auto"),this._scrollToOffset(s,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}}const GI=(e,n,t,r)=>{for(;e<=n;){const s=(e+n)/2|0,i=t(s);if(ir)n=s-1;else return s}return e>0?e-1:0};function Q1t(e,n,t){let r=0;for(;r<=n;){const s=(r+n)/2|0,i=e[s*2];if(it)n=s-1;else return s}return r>0?r-1:0}function Y1t(e,n,t,r,s){const i=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:i};if(r===1&&s!==null){const u=Q1t(s,i,t);let _=u;const f=t+n;for(;_e[u].start,t),l=o;if(r===1)for(;l1){const u=Array(r).fill(0);for(;lf=0&&_.some(f=>f>=t);){const f=e[o];_[f.lane]=f.start,o--}o=Math.max(0,o-o%r),l=Math.min(i,l+(r-1-l%r))}return{startIndex:o,endIndex:l}}const L2=typeof document<"u"?R.useLayoutEffect:R.useEffect;function X1t({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=R.useReducer(_=>_+1,0)[1],i=R.useRef({enabled:n,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});i.current.enabled=n,i.current.mode=t;const a=_=>{const f=i.current;if(!f.enabled||!f.container)return;const p=_.getTotalSize();if(p!==f.lastSize){f.lastSize=p;const m=_.options.horizontal?"width":"height";f.container.style[m]=`${p}px`}},o=_=>{const f=i.current;if(!f.enabled||!f.container)return;a(_);const p=!!_.options.horizontal,m=f.mode==="transform",x=p?"left":"top",S=_.options.scrollMargin,b=_.getVirtualItems();for(const v of b){const y=v.start-S,w=_.elementsCache.get(v.key);w&&f.lastPositions.get(w)!==y&&(f.lastPositions.set(w,y),m?w.style.transform=p?`translate3d(${y}px, 0, 0)`:`translate3d(0, ${y}px, 0)`:w.style[x]=`${y}px`)}},l={...r,onChange:(_,f)=>{var p;const m=i.current;let x=!0;if(m.enabled){o(_);const S=_.range,b=m.prevRange;x=!b||b.isScrolling!==_.isScrolling||b.startIndex!==(S==null?void 0:S.startIndex)||b.endIndex!==(S==null?void 0:S.endIndex),x&&(m.prevRange=S?{startIndex:S.startIndex,endIndex:S.endIndex,isScrolling:_.isScrolling}:null)}x&&(e&&f?Go.flushSync(s):s()),(p=r.onChange)==null||p.call(r,_,f)}},[u]=R.useState(()=>{const _=new K1t(l);return Object.assign(_,{containerRef:f=>{const p=i.current;if(p.container=f,p.lastSize=null,f&&p.enabled){const m=_.getTotalSize();p.lastSize=m;const x=_.options.horizontal?"width":"height";f.style[x]=`${m}px`}}})});return u.setOptions(l),L2(()=>u._didMount(),[]),L2(()=>(a(u),u._willUpdate())),L2(()=>{o(u)}),u}function Z1t(e){return X1t({observeElementRect:F1t,observeElementOffset:U1t,scrollToFn:V1t,...e})}function J1t(e,n){if(!n)return e;const t=new Map(e.map(i=>[i.id,i]));let r=t.get(n);if(!r)return e;const s=[];for(;r;)s.push(r),r=r.parentId?t.get(r.parentId):void 0;return s.reverse()}function evt(e,n,t){var a;let r=e;for(;r&&r.role!=="user";)r=r.parentId?n.get(r.parentId):void 0;const s=e.role==="user"?e.parentId??null:(r==null?void 0:r.id)??null,i=(a=t.get(s))==null?void 0:a.filter(o=>o.role===e.role);return i!=null&&i.length?i:[e]}function tvt(e,n,t,r){const s=e.filter(u=>!r(u.id)),i=new Map(s.map(u=>[u.id,u])),a=new Map;for(const u of s){const _=u.parentId??null,f=a.get(_);f?f.push(u):a.set(_,[u])}const o=new Set(n.map(u=>u.id)),l=new Map;for(const u of t){const _=evt(u,i,a),f=_.findIndex(p=>o.has(p.id));l.set(u.id,{count:_.length,index:f,prevId:f>0?_[f-1].id:void 0,nextId:f<_.length-1?_[f+1].id:void 0})}return l}function uv(e,n){var t;if(e.type==="tool"&&((t=e.tool)==null?void 0:t.toLowerCase())==="interrupted")return!1;if(e.type==="prompt"){if(!e.prompt)return!1;if(e.prompt.kind==="permission"){if(e.prompt.resolved)return!1;if(n!==void 0)return e.id===n}return!0}return e.type==="reasoning"?!1:e.type==="text"?!!e.text:!0}function Jp(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function WI(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||Jp(r)||!uv(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function VI(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=WI(n.parts);return t?{messageId:n.id,toolId:t}:null}function nvt(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return!1;for(let t=n.parts.length-1;t>=0;t--){const r=n.parts[t];if(!(r.type==="steer"||Jp(r)))return r.type==="text"&&!!r.text}return!1}function rvt(e,n,t,r,s){const i=[...n].filter(o=>!t.has(o)&&r.some(l=>l.id===o)&&o!==s);if(i.length===0&&!(s&&e.has(s)))return e;const a=new Set(e);for(const o of i)a.add(o);return s&&a.delete(s),a}const wo=e=>new Intl.NumberFormat(T()).format(e);function svt(e,n){const t=typeof e.nextRetryAt=="number"?Math.max(0,Math.ceil((e.nextRetryAt-n)/1e3)):null;return e.retryOwner==="native"&&e.maximum==null&&t==null?bLe():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?fLe({attempt:wo(e.attempt),maximum:wo(e.maximum),seconds:wo(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?oLe({attempt:wo(e.attempt),maximum:wo(e.maximum)}):typeof e.attempt=="number"&&t!=null?pLe({attempt:wo(e.attempt),seconds:wo(t)}):typeof e.attempt=="number"?rLe({attempt:wo(e.attempt)}):t!=null?SLe({seconds:wo(t)}):ID()}function ivt(e,n){if(typeof e!="number")return NLe();const t=Math.max(0,Math.ceil((e-n)/1e3));return ALe({seconds:wo(t)})}function KI(e){return e==="retry"||e==="continue"?e:null}function avt(e){const n={};return e.model!==void 0&&(n.model=e.model),e.serviceTier!==void 0&&(n.serviceTier=e.serviceTier),e.permissionMode!==void 0&&(n.permissionMode=e.permissionMode),e.planMode!==void 0&&(n.planMode=e.planMode),e.reasoningLevel!==void 0&&(n.reasoningLevel=e.reasoningLevel),n}function ovt(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function Zz(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function lvt(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";const r=n.match(/10\.\d+\/\S+/);if(r)return r[0].startsWith("10.1101/")?"biorxiv":"openalex";const s=n.split("/").pop()??"";return/^W\d+$/i.test(s)?"openalex":"alphaxiv"}function bS(e){const n=[];let t="",r=!1,s=null;const i=()=>{r&&n.push(t),t="",r=!1};for(let a=0;a"||o==="&")break;/\s/.test(o)?i():(t+=o,r=!0)}return i(),n}function cvt(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=bS(e);if(t.length===1)return t[0]}return e}function uvt(e){var t,r,s;let n=0;for(;["do","then","else","if","while","until"].includes(e[n]);)n++;for(;/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="env")for(n++;(t=e[n])!=null&&t.startsWith("-")||/^[A-Za-z_][A-Za-z0-9_]*=/.test(e[n]??"");)n++;if(e[n]==="command"){if(n++,["-v","-V"].includes(e[n]))return null;for(;(r=e[n])!=null&&r.startsWith("-");)n++}return((s=e[n])==null?void 0:s.split("/").pop())!=="orx"?null:e.slice(n+1)}function Fh(e){return uvt(typeof e=="string"?bS(e):e)}function fvt(e){var t;const n=(t=e[0])==null?void 0:t.split("/").pop();return!n||!["sh","bash","zsh"].includes(n)||e[1]!=="-lc"?null:e[2]??null}function dvt(e,n){const t=Fh(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function hvt(e){var l;const n=Fh(e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],i=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let u=1;u + + + + +`,pvt='',mvt=` + + +`,QI={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv"},gvt={alphaxiv:_vt,openalex:mvt,biorxiv:pvt};function YI({source:e,size:n=16,decorative:t=!1,className:r=""}){return h.jsx("span",{className:`lit-logo flex-none inline-flex items-center justify-center p-[1.5px] box-border bg-white rounded-[3px] shadow-logo [&_svg]:w-full [&_svg]:h-full [&_svg]:block ${r}`,style:{width:n,height:n},...t?{"aria-hidden":!0}:{role:"img","aria-label":QI[e]},dangerouslySetInnerHTML:{__html:gvt[e]}})}function vvt(e){const t=e.trim().replace(/^https?:\/\/doi\.org\//i,"").replace(/^doi:/i,"").match(/10\.\d+\/[^\s?#]+/);return t?t[0].replace(/[.,)]+$/,"").replace(/v\d+(\.[a-z][a-z-]*)*$/i,""):null}function bvt(e,n){const t=n.trim();if(e==="alphaxiv"){const i=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(i)}`}const r=vvt(t);if(r)return`https://doi.org/${r}`;if(e==="openalex"){const s=t.split("/").pop()||t;return`https://openalex.org/${encodeURIComponent(s)}`}return`https://doi.org/${t}`}const yvt=["alphaxiv","openalex","biorxiv"];function xvt(){const e=Xct(),{data:n}=ct(e),t=Rn({mutationFn:oct,onSuccess:i=>Ur(e.queryKey,i)}),r=t.isPending,s=i=>{n&&!r&&t.mutate({...n,[i]:!n[i]})};return n?h.jsx("div",{className:"flex flex-col",children:yvt.map(i=>{const a=n[i];return h.jsxs(dr,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[h.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[h.jsx(YI,{source:i,size:16,decorative:!0}),QI[i]]}),h.jsx(Aft,{checked:a,"aria-hidden":"true"})]},i)})}):h.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:R4e()})}function O2(e,n){if(!e)throw new Error("Assertion Error")}function Yu(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function wvt(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Svt(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` +`}]}function kvt(e,n){const t=n.value?n.value+` +`:"",r={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function Cvt(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Evt(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const ti=yu(/[A-Za-z]/),$s=yu(/[\dA-Za-z]/),Nvt=yu(/[#-'*+\--9=?A-Z^-~]/);function fv(e){return e!==null&&(e<32||e===127)}const u3=yu(/\d/),zvt=yu(/[\dA-Fa-f]/),Tvt=yu(/[!-/:-@[-`{-~]/);function wt(e){return e!==null&&e<-2}function ir(e){return e!==null&&(e<0||e===32)}function yn(e){return e===-2||e===-1||e===32}const Eb=yu(new RegExp("\\p{P}|\\p{S}","u")),Of=yu(/\s/);function yu(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function c_(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&i<57344){const o=e.charCodeAt(t+1);i<56320&&o>56319&&o<57344?(a=String.fromCharCode(i,o),s=1):a="�"}else a=String.fromCharCode(i);a&&(n.push(e.slice(r,t),encodeURIComponent(a)),r=t+s+1,a=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function jvt(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=c_(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(n,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(n,u),e.applyData(n,u)}function Avt(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Rvt(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function XI(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const s=e.all(n),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=r:s.push({type:"text",value:r}),s}function Mvt(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return XI(e,n);const s={src:c_(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,i),e.applyData(n,i)}function Dvt(e,n){const t={src:c_(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Lvt(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Ovt(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return XI(e,n);const s={href:c_(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Ivt(e,n){const t={href:c_(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Bvt(e,n,t){const r=e.all(n),s=t?$vt(t):ZI(n),i={},a=[];if(typeof n.checked=="boolean"){const _=r[0];let f;_&&_.type==="element"&&_.tagName==="p"?f=_:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++o1}function Pvt(e,n){const t={},r=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++s0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Uvt(e){const n=yS(e),t=JI(e);if(n&&t)return{start:n,end:t}}function Gvt(e,n){const t=e.all(n),r=t.shift(),s=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],a),s.push(a)}if(t.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},o=yS(n.children[1]),l=JI(n.children[n.children.length-1]);o&&l&&(a.position={start:o,end:l}),s.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,i),e.applyData(n,i)}function Wvt(e,n,t){const r=t?t.children:void 0,i=(r?r.indexOf(n):1)===0?"th":"td",a=t&&t.type==="table"?t.align:void 0,o=a?a.length:n.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return i.push(tT(n.slice(s),s>0,!1)),i.join("")}function tT(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===Jz||i===eT;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===Jz||i===eT;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function Qvt(e,n){const t={type:"text",value:Kvt(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Yvt(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Xvt={blockquote:wvt,break:Svt,code:kvt,delete:Cvt,emphasis:Evt,footnoteReference:jvt,heading:Avt,html:Rvt,imageReference:Mvt,image:Dvt,inlineCode:Lvt,linkReference:Ovt,link:Ivt,listItem:Bvt,list:Pvt,paragraph:Fvt,root:Hvt,strong:qvt,table:Gvt,tableCell:Vvt,tableRow:Wvt,text:Qvt,thematicBreak:Yvt,toml:Bg,yaml:Bg,definition:Bg,footnoteDefinition:Bg};function Bg(){}const tB=-1,Nb=0,R0=1,dv=2,xS=3,wS=4,SS=5,kS=6,nB=7,rB=8,Zvt=typeof self=="object"?self:globalThis,nT=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Zvt[e](n)},Jvt=(e,n)=>{const t=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,a]=n[s];switch(i){case Nb:case tB:return t(a,s);case R0:{const o=t([],s);for(const l of a)o.push(r(l));return o}case dv:{const o=t({},s);for(const[l,u]of a)o[r(l)]=r(u);return o}case xS:return t(new Date(a),s);case wS:{const{source:o,flags:l}=a;return t(new RegExp(o,l),s)}case SS:{const o=t(new Map,s);for(const[l,u]of a)o.set(r(l),r(u));return o}case kS:{const o=t(new Set,s);for(const l of a)o.add(r(l));return o}case nB:{const{name:o,message:l}=a;return t(nT(o,l),s)}case rB:return t(BigInt(a),s);case"BigInt":return t(Object(BigInt(a)),s);case"ArrayBuffer":return t(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return t(new DataView(o),a)}}return t(nT(i,a),s)};return r},rT=e=>Jvt(new Map,e)(0),tf="",{toString:ebt}={},{keys:tbt}=Object,o0=e=>{const n=typeof e;if(n!=="object"||!e)return[Nb,n];const t=ebt.call(e).slice(8,-1);switch(t){case"Array":return[R0,tf];case"Object":return[dv,tf];case"Date":return[xS,tf];case"RegExp":return[wS,tf];case"Map":return[SS,tf];case"Set":return[kS,tf];case"DataView":return[R0,t]}return t.includes("Array")?[R0,t]:t.includes("Error")?[nB,t]:[dv,t]},$g=([e,n])=>e===Nb&&(n==="function"||n==="symbol"),nbt=(e,n,t,r)=>{const s=(a,o)=>{const l=r.push(a)-1;return t.set(o,l),l},i=a=>{if(t.has(a))return t.get(a);let[o,l]=o0(a);switch(o){case Nb:{let _=a;switch(l){case"bigint":o=rB,_=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);_=null;break;case"undefined":return s([tB],a)}return s([o,_],a)}case R0:{if(l){let p=a;return l==="DataView"?p=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(a)),s([l,[...p]],a)}const _=[],f=s([o,_],a);for(const p of a)_.push(i(p));return f}case dv:{if(l)switch(l){case"BigInt":return s([l,a.toString()],a);case"Boolean":case"Number":case"String":return s([l,a.valueOf()],a)}if(n&&"toJSON"in a)return i(a.toJSON());const _=[],f=s([o,_],a);for(const p of tbt(a))(e||!$g(o0(a[p])))&&_.push([i(p),i(a[p])]);return f}case xS:return s([o,isNaN(a.getTime())?tf:a.toISOString()],a);case wS:{const{source:_,flags:f}=a;return s([o,{source:_,flags:f}],a)}case SS:{const _=[],f=s([o,_],a);for(const[p,m]of a)(e||!($g(o0(p))||$g(o0(m))))&&_.push([i(p),i(m)]);return f}case kS:{const _=[],f=s([o,_],a);for(const p of a)(e||!$g(o0(p)))&&_.push(i(p));return f}}const{message:u}=a;return s([o,{name:l,message:u}],a)};return i},sT=(e,{json:n,lossy:t}={})=>{const r=[];return nbt(!(n||t),!!n,new Map,r)(e),r},hv=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?rT(sT(e,n)):structuredClone(e):(e,n)=>rT(sT(e,n));function rbt(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function sbt(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function ibt(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||rbt,r=e.options.footnoteBackLabel||sbt,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l0&&x.push({type:"text",value:" "});let y=typeof t=="string"?t:t(l,m);typeof y=="string"&&(y={type:"text",value:y}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,m),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const b=_[_.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const y=b.children[b.children.length-1];y&&y.type==="text"?y.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...x)}else _.push(...x);const v={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(_,!0)};e.patch(u,v),o.push(v)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...hv(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:` +`}]}}const em=(function(e){if(e==null)return cbt;if(typeof e=="function")return zb(e);if(typeof e=="object")return Array.isArray(e)?abt(e):obt(e);if(typeof e=="string")return lbt(e);throw new Error("Expected function, string, or object as test")});function abt(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let m=sB,x,S,b;if((!n||i(l,u,_[_.length-1]||void 0))&&(m=dbt(t(l,_)),m[0]===f3))return m;if("children"in l&&l.children){const v=l;if(v.children&&m[0]!==iB)for(S=(r?v.children.length:-1)+a,b=_.concat(v);S>-1&&S0&&t.push({type:"text",value:` +`}),t}function iT(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function aT(e,n){const t=_bt(e,n),r=t.one(e,void 0),s=ibt(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` +`},s),i}function _v(e,n){return e&&"run"in e?async function(t,r){const s=aT(t,{file:r,...n});await e.run(s,r)}:function(t,r){return aT(t,{file:r,...e||n})}}function oT(e){if(e)throw e}var I2,lT;function bbt(){if(lT)return I2;lT=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},i=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var _=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!_&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,_){t&&_.name==="__proto__"?t(u,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):u[_.name]=_.newValue},o=function(u,_){if(_==="__proto__")if(e.call(u,_)){if(r)return r(u,_).value}else return;return u[_]};return I2=function l(){var u,_,f,p,m,x,S=arguments[0],b=1,v=arguments.length,y=!1;for(typeof S=="boolean"&&(y=S,S=arguments[1]||{},b=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});ba.length;let l;o&&a.push(s);try{l=e.apply(this,a)}catch(u){const _=u;if(o&&t)throw _;return s(_)}o||(l&&l.then&&typeof l.then=="function"?l.then(i,s):l instanceof Error?s(l):i(l))}function s(a,...o){t||(t=!0,n(a,...o))}function i(a){s(null,a)}}function M0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?cT(e.position):"start"in e||"end"in e?cT(e):"line"in e||"column"in e?_3(e):""}function _3(e){return uT(e&&e.line)+":"+uT(e&&e.column)}function cT(e){return _3(e&&e.start)+"-"+_3(e&&e.end)}function uT(e){return e&&typeof e=="number"?e:1}class Fs extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",i={},a=!1;if(t&&("line"in t&&"column"in t?i={place:t}:"start"in t&&"end"in t?i={place:t}:"type"in t?i={ancestors:[t],place:t.position}:i={...t}),typeof n=="string"?s=n:!i.cause&&n&&(a=!0,s=n.message,i.cause=n),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=o?o.line:void 0,this.name=M0(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Fs.prototype.file="";Fs.prototype.name="";Fs.prototype.reason="";Fs.prototype.message="";Fs.prototype.stack="";Fs.prototype.column=void 0;Fs.prototype.line=void 0;Fs.prototype.ancestors=void 0;Fs.prototype.cause=void 0;Fs.prototype.fatal=void 0;Fs.prototype.place=void 0;Fs.prototype.ruleId=void 0;Fs.prototype.source=void 0;const So={basename:Sbt,dirname:kbt,extname:Cbt,join:Ebt,sep:"/"};function Sbt(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');tm(e);let t=0,r=-1,s=e.length,i;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let a=-1,o=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){t=s+1;break}}else a<0&&(i=!0,a=s+1),o>-1&&(e.codePointAt(s)===n.codePointAt(o--)?o<0&&(r=s):(o=-1,r=a));return t===r?r=a:r<0&&(r=e.length),e.slice(t,r)}function kbt(e){if(tm(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Cbt(e){tm(e);let n=e.length,t=-1,r=0,s=-1,i=0,a;for(;n--;){const o=e.codePointAt(n);if(o===47){if(a){r=n+1;break}continue}t<0&&(a=!0,t=n+1),o===46?s<0?s=n:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||t<0||i===0||i===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function Ebt(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function zbt(e,n){let t="",r=0,s=-1,i=0,a=-1,o,l;for(;++a<=e.length;){if(a2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",r=0):(t=t.slice(0,l),r=t.length-1-t.lastIndexOf("/")),s=a,i=0;continue}}else if(t.length>0){t="",r=0,s=a,i=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,a):t=e.slice(s+1,a),r=a-s-1;s=a,i=0}else o===46&&i>-1?i++:i=-1}return t}function tm(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Tbt={cwd:jbt};function jbt(){return"/"}function p3(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Abt(e){if(typeof e=="string")e=new URL(e);else if(!p3(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Rbt(e)}function Rbt(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[m,...x]=_;const S=r[p][1];h3(S)&&h3(m)&&(m=B2(!0,S,m)),r[p]=[u,m,...x]}}}}const zS=new NS().freeze();function H2(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function q2(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function U2(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function dT(e){if(!h3(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hT(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Pg(e){return Obt(e)?e:new aB(e)}function Obt(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ibt(e){return typeof e=="string"||Bbt(e)}function Bbt(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var _T=Object.prototype.hasOwnProperty;function pT(e,n,t){for(t of e.keys())if(D0(t,n))return t}function D0(e,n){var t,r,s;if(e===n)return!0;if(e&&n&&(t=e.constructor)===n.constructor){if(t===Date)return e.getTime()===n.getTime();if(t===RegExp)return e.toString()===n.toString();if(t===Array){if((r=e.length)===n.length)for(;r--&&D0(e[r],n[r]););return r===-1}if(t===Set){if(e.size!==n.size)return!1;for(r of e)if(s=r,s&&typeof s=="object"&&(s=pT(n,s),!s)||!n.has(s))return!1;return!0}if(t===Map){if(e.size!==n.size)return!1;for(r of e)if(s=r[0],s&&typeof s=="object"&&(s=pT(n,s),!s)||!D0(r[1],n.get(s)))return!1;return!0}if(t===ArrayBuffer)e=new Uint8Array(e),n=new Uint8Array(n);else if(t===DataView){if((r=e.byteLength)===n.byteLength)for(;r--&&e.getInt8(r)===n.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===n.byteLength)for(;r--&&e[r]===n[r];);return r===-1}if(!t||typeof e=="object"){r=0;for(t in e)if(_T.call(e,t)&&++r&&!_T.call(n,t)||!(t in n)||!D0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const $bt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pbt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fbt={};function mT(e,n){return(Fbt.jsx?Pbt:$bt).test(e)}const Hbt=/[ \t\n\f\r]/g;function qbt(e){return typeof e=="object"?e.type==="text"?gT(e.value):!1:gT(e)}function gT(e){return e.replace(Hbt,"")===""}var Fd={},G2,vT;function Ubt(){if(vT)return G2;vT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=` +`,u="/",_="*",f="",p="comment",m="declaration";function x(b,v){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];v=v||{};var y=1,w=1;function C(H){var Y=H.match(n);Y&&(y+=Y.length);var V=H.lastIndexOf(l);w=~V?H.length-V:w+H.length}function N(){var H={line:y,column:w};return function(Y){return Y.position=new E(H),M(),Y}}function E(H){this.start=H,this.end={line:y,column:w},this.source=v.source}E.prototype.content=b;function j(H){var Y=new Error(v.source+":"+y+":"+w+": "+H);if(Y.reason=H,Y.filename=v.source,Y.line=y,Y.column=w,Y.source=b,!v.silent)throw Y}function z(H){var Y=H.exec(b);if(Y){var V=Y[0];return C(V),b=b.slice(V.length),Y}}function M(){z(t)}function O(H){var Y;for(H=H||[];Y=B();)Y!==!1&&H.push(Y);return H}function B(){var H=N();if(!(u!=b.charAt(0)||_!=b.charAt(1))){for(var Y=2;f!=b.charAt(Y)&&(_!=b.charAt(Y)||u!=b.charAt(Y+1));)++Y;if(Y+=2,f===b.charAt(Y-1))return j("End of comment missing");var V=b.slice(2,Y-2);return w+=2,C(V),b=b.slice(Y),w+=2,H({type:p,comment:V})}}function F(){var H=N(),Y=z(r);if(Y){if(B(),!z(s))return j("property missing ':'");var V=z(i),X=H({type:m,property:S(Y[0].replace(e,f)),value:V?S(V[0].replace(e,f)):f});return z(a),X}}function U(){var H=[];O(H);for(var Y;Y=F();)Y!==!1&&(H.push(Y),O(H));return H}return M(),U()}function S(b){return b?b.replace(o,f):f}return G2=x,G2}var bT;function Gbt(){if(bT)return Fd;bT=1;var e=Fd&&Fd.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fd,"__esModule",{value:!0}),Fd.default=t;const n=e(Ubt());function t(r,s){let i=null;if(!r||typeof r!="string")return i;const a=(0,n.default)(r),o=typeof s=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:_}=l;o?s(u,_,l):_&&(i=i||{},i[u]=_)}),i}return Fd}var l0={},yT;function Wbt(){if(yT)return l0;yT=1,Object.defineProperty(l0,"__esModule",{value:!0}),l0.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||t.test(u)||e.test(u)},a=function(u,_){return _.toUpperCase()},o=function(u,_){return"".concat(_,"-")},l=function(u,_){return _===void 0&&(_={}),i(u)?u:(u=u.toLowerCase(),_.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return l0.camelCase=l,l0}var c0,xT;function Vbt(){if(xT)return c0;xT=1;var e=c0&&c0.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(Gbt()),t=Wbt();function r(s,i){var a={};return!s||typeof s!="string"||(0,n.default)(s,function(o,l){o&&l&&(a[(0,t.camelCase)(o,i)]=l)}),a}return r.default=r,c0=r,c0}var Kbt=Vbt();const Qbt=Ip(Kbt),TS={}.hasOwnProperty,Ybt=new Map,Xbt=/[A-Z]/g,Zbt=new Set(["table","tbody","thead","tfoot","tr"]),Jbt=new Set(["td","th"]),oB="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function lB(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=oyt(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ayt(t,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?kb:MI,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=cB(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function cB(e,n,t){if(n.type==="element")return eyt(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return tyt(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return ryt(e,n,t);if(n.type==="mdxjsEsm")return nyt(e,n);if(n.type==="root")return syt(e,n,t);if(n.type==="text")return iyt(e,n)}function eyt(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=kb,e.schema=s),e.ancestors.push(n);const i=fB(e,n.tagName,!1),a=lyt(e,n);let o=AS(e,n);return Zbt.has(n.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!qbt(l):!0})),uB(e,a,i,n),jS(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function tyt(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}op(e,n.position)}function nyt(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);op(e,n.position)}function ryt(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=kb,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:fB(e,n.name,!0),a=cyt(e,n),o=AS(e,n);return uB(e,a,i,n),jS(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function syt(e,n,t){const r={};return jS(r,AS(e,n)),e.create(n,e.Fragment,r,t)}function iyt(e,n){return n.value}function uB(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function jS(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function ayt(e,n,t){return r;function r(s,i,a,o){const u=Array.isArray(a.children)?t:n;return o?u(i,a,o):u(i,a)}}function oyt(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),l=yS(r);return n(s,i,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function lyt(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&TS.call(n.properties,s)){const i=uyt(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&Jbt.has(n.tagName)?r=o:t[a]=o}}if(r){const i=t.style||(t.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function cyt(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const o=a.properties[0];o.type,Object.assign(t,e.evaluater.evaluateExpression(o.argument))}else op(e,n.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else op(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function AS(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:Ybt;for(;++rw.key).filter(w=>w!==void 0));let u=0;for(;u=e.children.length-_&&(E=s.length-(e.children.length-w)),E>=0&&(N=((v=s[E])==null?void 0:v.key)??N);N&&l.has(N)&&((y=s[E])==null?void 0:y.key)!==N;)N=`${N}+`;N&&l.add(N);const j=dB(C,s[E]??null,t,N);i.push(j),j.react!==void 0&&a.push(j.react)}const f=n!==null&&vyt(e,n.node);if(n&&n.key===r&&f&&s.length===i.length&&i.every((w,C)=>w===s[C]))return n;const p=e.type==="element"&&pyt.has(e.tagName)?a.filter(w=>typeof w!="string"||!myt.test(w)):a,m=p.length>0?p.length===1?p[0]:p:null;let x=f?n==null?void 0:n.shell:null;if(!x){const w=lB({...e,children:[]},t);x={props:w.props,type:w.type}}return{children:i,key:r,node:e,react:h.jsx(x.type,{...x.props,children:m},r),shell:x}}function vyt(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return D0(s,o)}function lh(e,n){if(e===n)return!0;if(Array.isArray(e)||Array.isArray(n)){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;for(let a=0;as?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);i0?(Vi(e,e.length,0,n),e):n}const ST={}.hasOwnProperty;function _B(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Qa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function mn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return yn(l)?(e.enter(t),o(l)):n(l)}function o(l){return yn(l)&&i++a))return;const j=n.events.length;let z=j,M,O;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){if(M){O=n.events[z][1].end;break}M=!0}for(v(r),E=j;Ew;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=w}function y(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function Nyt(e,n,t){return mn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hh(e){if(e===null||ir(e)||Of(e))return 1;if(Eb(e))return 2}function Tb(e,n,t){const r=[];let s=-1;for(;++s1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[t][1].start};CT(f,-l),CT(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[t][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ya(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=ya(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=ya(u,Tb(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=ya(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(_=2,u=ya(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):_=0,Vi(e,r-1,t-r+3,u),t=r+u.length-_-2;break}}for(t=-1;++t0&&yn(E)?mn(e,y,"linePrefix",i+1)(E):y(E)}function y(E){return E===null||wt(E)?e.check(ET,S,C)(E):(e.enter("codeFlowValue"),w(E))}function w(E){return E===null||wt(E)?(e.exit("codeFlowValue"),y(E)):(e.consume(E),w)}function C(E){return e.exit("codeFenced"),n(E)}function N(E,j,z){let M=0;return O;function O(Y){return E.enter("lineEnding"),E.consume(Y),E.exit("lineEnding"),B}function B(Y){return E.enter("codeFencedFence"),yn(Y)?mn(E,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):F(Y)}function F(Y){return Y===o?(E.enter("codeFencedFenceSequence"),U(Y)):z(Y)}function U(Y){return Y===o?(M++,E.consume(Y),U):M>=a?(E.exit("codeFencedFenceSequence"),yn(Y)?mn(E,H,"whitespace")(Y):H(Y)):z(Y)}function H(Y){return Y===null||wt(Y)?(E.exit("codeFencedFence"),j(Y)):z(Y)}}}function $yt(e,n,t){const r=this;return s;function s(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}const W2={name:"codeIndented",tokenize:Fyt},Pyt={partial:!0,tokenize:Hyt};function Fyt(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),mn(e,i,"linePrefix",5)(u)}function i(u){const _=r.events[r.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?l(u):wt(u)?e.attempt(Pyt,a,l)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||wt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function l(u){return e.exit("codeIndented"),n(u)}}function Hyt(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):wt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):mn(e,i,"linePrefix",5)(a)}function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(a):wt(a)?s(a):t(a)}}const qyt={name:"codeText",previous:Gyt,resolve:Uyt,tokenize:Wyt};function Uyt(e){let n=e.length-4,t=3,r,s;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const s=t||0;this.setCursor(Math.trunc(n));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&u0(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),u0(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),u0(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}function yB(e,n,t,r,s,i,a,o,l){const u=l||Number.POSITIVE_INFINITY;let _=0;return f;function f(v){return v===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(v),e.exit(i),p):v===null||v===32||v===41||fv(v)?t(v):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),S(v))}function p(v){return v===62?(e.enter(i),e.consume(v),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===62?(e.exit("chunkString"),e.exit(o),p(v)):v===null||v===60||wt(v)?t(v):(e.consume(v),v===92?x:m)}function x(v){return v===60||v===62||v===92?(e.consume(v),m):m(v)}function S(v){return!_&&(v===null||v===41||ir(v))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(v)):_999||m===null||m===91||m===93&&!l||m===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?t(m):m===93?(e.exit(i),e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):wt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),_):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||wt(m)||o++>999?(e.exit("chunkString"),_(m)):(e.consume(m),l||(l=!yn(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function wB(e,n,t,r,s,i){let a;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(s),e.consume(p),e.exit(s),a=p===40?41:p,l):t(p)}function l(p){return p===a?(e.enter(s),e.consume(p),e.exit(s),e.exit(r),n):(e.enter(i),u(p))}function u(p){return p===a?(e.exit(i),l(a)):p===null?t(p):wt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),mn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),_(p))}function _(p){return p===a||p===null||wt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:_)}function f(p){return p===a||p===92?(e.consume(p),_):_(p)}}function L0(e,n){let t;return r;function r(s){return wt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):yn(s)?mn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const ext={name:"definition",tokenize:nxt},txt={partial:!0,tokenize:rxt};function nxt(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return xB.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=Qa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):t(m)}function l(m){return ir(m)?L0(e,u)(m):u(m)}function u(m){return yB(e,_,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function _(m){return e.attempt(txt,f,f)(m)}function f(m){return yn(m)?mn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||wt(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function rxt(e,n,t){return r;function r(o){return ir(o)?L0(e,s)(o):t(o)}function s(o){return wB(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return yn(o)?mn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||wt(o)?n(o):t(o)}}const sxt={name:"hardBreakEscape",tokenize:ixt};function ixt(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return wt(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const axt={name:"headingAtx",resolve:oxt,tokenize:lxt};function oxt(e,n){let t=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},i={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},Vi(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function lxt(e,n,t){let r=0;return s;function s(_){return e.enter("atxHeading"),i(_)}function i(_){return e.enter("atxHeadingSequence"),a(_)}function a(_){return _===35&&r++<6?(e.consume(_),a):_===null||ir(_)?(e.exit("atxHeadingSequence"),o(_)):t(_)}function o(_){return _===35?(e.enter("atxHeadingSequence"),l(_)):_===null||wt(_)?(e.exit("atxHeading"),n(_)):yn(_)?mn(e,o,"whitespace")(_):(e.enter("atxHeadingText"),u(_))}function l(_){return _===35?(e.consume(_),l):(e.exit("atxHeadingSequence"),o(_))}function u(_){return _===null||_===35||ir(_)?(e.exit("atxHeadingText"),o(_)):(e.consume(_),u)}}const cxt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zT=["pre","script","style","textarea"],uxt={concrete:!0,name:"htmlFlow",resolveTo:hxt,tokenize:_xt},fxt={partial:!0,tokenize:mxt},dxt={partial:!0,tokenize:pxt};function hxt(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function _xt(e,n,t){const r=this;let s,i,a,o,l;return u;function u(G){return _(G)}function _(G){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(G),f}function f(G){return G===33?(e.consume(G),p):G===47?(e.consume(G),i=!0,S):G===63?(e.consume(G),s=3,r.interrupt?n:L):ti(G)?(e.consume(G),a=String.fromCharCode(G),b):t(G)}function p(G){return G===45?(e.consume(G),s=2,m):G===91?(e.consume(G),s=5,o=0,x):ti(G)?(e.consume(G),s=4,r.interrupt?n:L):t(G)}function m(G){return G===45?(e.consume(G),r.interrupt?n:L):t(G)}function x(G){const te="CDATA[";return G===te.charCodeAt(o++)?(e.consume(G),o===te.length?r.interrupt?n:F:x):t(G)}function S(G){return ti(G)?(e.consume(G),a=String.fromCharCode(G),b):t(G)}function b(G){if(G===null||G===47||G===62||ir(G)){const te=G===47,fe=a.toLowerCase();return!te&&!i&&zT.includes(fe)?(s=1,r.interrupt?n(G):F(G)):cxt.includes(a.toLowerCase())?(s=6,te?(e.consume(G),v):r.interrupt?n(G):F(G)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(G):i?y(G):w(G))}return G===45||$s(G)?(e.consume(G),a+=String.fromCharCode(G),b):t(G)}function v(G){return G===62?(e.consume(G),r.interrupt?n:F):t(G)}function y(G){return yn(G)?(e.consume(G),y):O(G)}function w(G){return G===47?(e.consume(G),O):G===58||G===95||ti(G)?(e.consume(G),C):yn(G)?(e.consume(G),w):O(G)}function C(G){return G===45||G===46||G===58||G===95||$s(G)?(e.consume(G),C):N(G)}function N(G){return G===61?(e.consume(G),E):yn(G)?(e.consume(G),N):w(G)}function E(G){return G===null||G===60||G===61||G===62||G===96?t(G):G===34||G===39?(e.consume(G),l=G,j):yn(G)?(e.consume(G),E):z(G)}function j(G){return G===l?(e.consume(G),l=null,M):G===null||wt(G)?t(G):(e.consume(G),j)}function z(G){return G===null||G===34||G===39||G===47||G===60||G===61||G===62||G===96||ir(G)?N(G):(e.consume(G),z)}function M(G){return G===47||G===62||yn(G)?w(G):t(G)}function O(G){return G===62?(e.consume(G),B):t(G)}function B(G){return G===null||wt(G)?F(G):yn(G)?(e.consume(G),B):t(G)}function F(G){return G===45&&s===2?(e.consume(G),V):G===60&&s===1?(e.consume(G),X):G===62&&s===4?(e.consume(G),$):G===63&&s===3?(e.consume(G),L):G===93&&s===5?(e.consume(G),I):wt(G)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(fxt,q,U)(G)):G===null||wt(G)?(e.exit("htmlFlowData"),U(G)):(e.consume(G),F)}function U(G){return e.check(dxt,H,q)(G)}function H(G){return e.enter("lineEnding"),e.consume(G),e.exit("lineEnding"),Y}function Y(G){return G===null||wt(G)?U(G):(e.enter("htmlFlowData"),F(G))}function V(G){return G===45?(e.consume(G),L):F(G)}function X(G){return G===47?(e.consume(G),a="",ie):F(G)}function ie(G){if(G===62){const te=a.toLowerCase();return zT.includes(te)?(e.consume(G),$):F(G)}return ti(G)&&a.length<8?(e.consume(G),a+=String.fromCharCode(G),ie):F(G)}function I(G){return G===93?(e.consume(G),L):F(G)}function L(G){return G===62?(e.consume(G),$):G===45&&s===2?(e.consume(G),L):F(G)}function $(G){return G===null||wt(G)?(e.exit("htmlFlowData"),q(G)):(e.consume(G),$)}function q(G){return e.exit("htmlFlow"),n(G)}}function pxt(e,n,t){const r=this;return s;function s(a){return wt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):t(a)}function i(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function mxt(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(nm,n,t)}}const gxt={name:"htmlText",tokenize:vxt};function vxt(e,n,t){const r=this;let s,i,a;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),l}function l(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),N):L===63?(e.consume(L),w):ti(L)?(e.consume(L),z):t(L)}function u(L){return L===45?(e.consume(L),_):L===91?(e.consume(L),i=0,x):ti(L)?(e.consume(L),y):t(L)}function _(L){return L===45?(e.consume(L),m):t(L)}function f(L){return L===null?t(L):L===45?(e.consume(L),p):wt(L)?(a=f,X(L)):(e.consume(L),f)}function p(L){return L===45?(e.consume(L),m):f(L)}function m(L){return L===62?V(L):L===45?p(L):f(L)}function x(L){const $="CDATA[";return L===$.charCodeAt(i++)?(e.consume(L),i===$.length?S:x):t(L)}function S(L){return L===null?t(L):L===93?(e.consume(L),b):wt(L)?(a=S,X(L)):(e.consume(L),S)}function b(L){return L===93?(e.consume(L),v):S(L)}function v(L){return L===62?V(L):L===93?(e.consume(L),v):S(L)}function y(L){return L===null||L===62?V(L):wt(L)?(a=y,X(L)):(e.consume(L),y)}function w(L){return L===null?t(L):L===63?(e.consume(L),C):wt(L)?(a=w,X(L)):(e.consume(L),w)}function C(L){return L===62?V(L):w(L)}function N(L){return ti(L)?(e.consume(L),E):t(L)}function E(L){return L===45||$s(L)?(e.consume(L),E):j(L)}function j(L){return wt(L)?(a=j,X(L)):yn(L)?(e.consume(L),j):V(L)}function z(L){return L===45||$s(L)?(e.consume(L),z):L===47||L===62||ir(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),V):L===58||L===95||ti(L)?(e.consume(L),O):wt(L)?(a=M,X(L)):yn(L)?(e.consume(L),M):V(L)}function O(L){return L===45||L===46||L===58||L===95||$s(L)?(e.consume(L),O):B(L)}function B(L){return L===61?(e.consume(L),F):wt(L)?(a=B,X(L)):yn(L)?(e.consume(L),B):M(L)}function F(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,U):wt(L)?(a=F,X(L)):yn(L)?(e.consume(L),F):(e.consume(L),H)}function U(L){return L===s?(e.consume(L),s=void 0,Y):L===null?t(L):wt(L)?(a=U,X(L)):(e.consume(L),U)}function H(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||ir(L)?M(L):(e.consume(L),H)}function Y(L){return L===47||L===62||ir(L)?M(L):t(L)}function V(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function X(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),ie}function ie(L){return yn(L)?mn(e,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):I(L)}function I(L){return e.enter("htmlTextData"),a(L)}}const MS={name:"labelEnd",resolveAll:wxt,resolveTo:Sxt,tokenize:kxt},bxt={tokenize:Cxt},yxt={tokenize:Ext},xxt={tokenize:Nxt};function wxt(e){let n=-1;const t=[];for(;++n=3&&(u===null||wt(u))?(e.exit("thematicBreak"),n(u)):t(u)}function l(u){return u===s?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),yn(u)?mn(e,o,"whitespace")(u):o(u))}}const vi={continuation:{tokenize:Ixt},exit:$xt,name:"list",tokenize:Oxt},Dxt={partial:!0,tokenize:Pxt},Lxt={partial:!0,tokenize:Bxt};function Oxt(e,n,t){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return o;function o(m){const x=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:u3(m)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(S1,t,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return t(m)}function l(m){return u3(m)&&++a<10?(e.consume(m),l):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):t(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(nm,r.interrupt?t:_,e.attempt(Dxt,p,f))}function _(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function f(m){return yn(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):t(m)}function p(m){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(m)}}function Ixt(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(nm,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,mn(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!yn(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Lxt,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,mn(e,e.attempt(vi,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Bxt(e,n,t){const r=this;return mn(e,s,"listItemIndent",r.containerState.size+1);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(i):t(i)}}function $xt(e){e.exit(this.containerState.type)}function Pxt(e,n,t){const r=this;return mn(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const a=r.events[r.events.length-1];return!yn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const TT={name:"setextUnderline",resolveTo:Fxt,tokenize:Hxt};function Fxt(e,n){let t=e.length,r,s,i;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(s=t)}else e[t][1].type==="content"&&e.splice(t,1),!i&&e[t][1].type==="definition"&&(i=t);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",a,n]),e.splice(i+1,0,["exit",e[r][1],n]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,n]),e}function Hxt(e,n,t){const r=this;let s;return i;function i(u){let _=r.events.length,f;for(;_--;)if(r.events[_][1].type!=="lineEnding"&&r.events[_][1].type!=="linePrefix"&&r.events[_][1].type!=="content"){f=r.events[_][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),s=u,a(u)):t(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===s?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),yn(u)?mn(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||wt(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const qxt={tokenize:Uxt};function Uxt(e){const n=this,t=e.attempt(nm,r,e.attempt(this.parser.constructs.flowInitial,s,mn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Qyt,s)),"linePrefix")));return t;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Gxt={resolveAll:kB()},Wxt=SB("string"),Vxt=SB("text");function SB(e){return{resolveAll:kB(e==="text"?Kxt:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],i=t.attempt(s,a,o);return a;function a(_){return u(_)?i(_):o(_)}function o(_){if(_===null){t.consume(_);return}return t.enter("data"),t.consume(_),l}function l(_){return u(_)?(t.exit("data"),i(_)):(t.consume(_),l)}function u(_){if(_===null)return!0;const f=s[_];let p=-1;if(f)for(;++p-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}i>0&&a.push(e[s].slice(0,i))}return a}function o2t(e,n){let t=-1;const r=[];let s;for(;++t0){const Ut=Xe.tokenStack[Xe.tokenStack.length-1];(Ut[1]||AT).call(Xe,void 0,Ut[0])}for(Ae.position={start:Lc(we.length>0?we[0][1].start:{line:1,column:1,offset:0}),end:Lc(we.length>0?we[we.length-2][1].end:{line:1,column:1,offset:0})},xt=-1;++xt0&&(Pe(this,Jc,ue(this,Jc)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=RT(t)),ue(this,Jc)+T2t(t,r)}}Jc=new WeakMap;const v2t=new Set(["*","**","_","__"]);function RT(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tt){t=s-1;continue}if(n.exclusive)continue;if(z2t(n)){MT(n,t,r);continue}const i=S2t(n,e,t);if(i>t){t=i-1;continue}const a=k2t(n,e,t);if(a>t){t=a-1;continue}Ya(e,t)||MT(n,t,r)}return n}function b2t(e,n,t){const r=n[t];return r==="`"?y2t(e,n,t):r==="$"?x2t(e,n,t):r==="~"?w2t(e,n,t):t}function y2t(e,n,t){const r=LS(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&pv(n,t)&&!Ya(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!Ya(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||Ya(n,t)?t+r:r>=3&&pv(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function x2t(e,n,t){const r=LS(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!Ya(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||Ya(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function w2t(e,n,t){const r=LS(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(pv(n,t)&&!Ya(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!pv(n,t)||Ya(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function S2t(e,n,t){if(n[t]!=="<"||Ya(n,t))return t;const r=n[t+1];if(r!==void 0&&!TB(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` +`)return e.pendingHtml=null,s+1;return n.length}function k2t(e,n,t){const r=C2t(n,t);if(!r)return t;if(Ya(n,t))return t+r.length;const s=e.delims.findLastIndex(i=>i.token===r);return s!==-1?(e.delims.splice(s,1),t+r.length):t+r.length===n.length?(e.pendingDelim={start:t,token:r},t+r.length):(E2t(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function C2t(e,n){const t=e[n];if(t==="*")return e.startsWith("***",n)?"***":e.startsWith("**",n)?"**":"*";if(t==="_")return e.startsWith("__",n)?"__":"_";if(t==="~"&&e.startsWith("~~",n))return"~~"}function E2t(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!OT(s)||!OT(r)}function MT(e,n,t){const r=e.links.at(-1);if(t==="["){e.links.push({phase:"text",start:n});return}if(t==="]"&&(r==null?void 0:r.phase)==="text"){e.links[e.links.length-1]={phase:"url_wait",start:r.start,textEnd:n};return}if(t==="("&&(r==null?void 0:r.phase)==="url_wait"){e.links[e.links.length-1]={phase:"url",start:r.start,textEnd:r.textEnd,parenDepth:0};return}if(t==="("&&(r==null?void 0:r.phase)==="url"){r.parenDepth+=1;return}if(t===")"&&(r==null?void 0:r.phase)==="url"){if(r.parenDepth>0){r.parenDepth-=1;return}e.links.pop()}}function N2t(e){var n,t;e.delims.length=0,e.links.length=0,((n=e.exclusive)==null?void 0:n.kind)!=="fence"&&(((t=e.exclusive)==null?void 0:t.kind)==="math"&&e.exclusive.token==="$$"||(e.exclusive=null))}function z2t(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function T2t(e,n){n.pendingHtml!==null&&(e=e.slice(0,R2t(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return xo(j2t(e,t));const r=A2t(n);if(r)return xo(th(e,r));const s=L2t(n);return s?s.kind==="delim"?xo(g3(e,s.start,s.token.length)?NB(e,s.token):e.slice(0,s.start)):g3(e,s.start,s.token.length)?s.kind==="fence"?xo(e):s.kind==="code"?xo(th(e,s.token)):s.token==="$$"?xo(th(e,(e.endsWith(` +`)?"":` +`)+"$$")):/\s/.test(e[e.length-1]??"")?xo(e):xo(th(e,"$")):xo(s.kind==="fence"?e:e.slice(0,s.start)):xo(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function j2t(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return g3(e,n.start,1)?t+e.slice(n.start+1):t;const r=e.slice(n.start+1,n.textEnd);return n.phase==="url_wait"?t+r+e.slice(n.textEnd+1):t+r}function A2t(e){const n=[];if(e.exclusive){if(e.exclusive.kind!=="code")return;n.push(e.exclusive.token)}for(let t=e.delims.length-1;t>=0;t--){const r=e.delims[t].token;if(!v2t.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function R2t(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!M2t(e,s,r))break;t=s,r=s}return t}function M2t(e,n,t){if(e[t-1]!==">"||Ya(e,n))return!1;const r=e[n+1];if(r!==void 0&&!TB(r))return!1;for(let s=n+1;s"||i===` +`)return!1}return!0}function xo(e){var b;const n=e.lastIndexOf(` + +`),t=n===-1?0:n+2,r=e.slice(0,t),s=e.slice(t),i=s.indexOf(` +`),a=i===-1?s:s.slice(0,i),o=(b=a.match(/^( *)\|/))==null?void 0:b[1];if(o===void 0)return e;if(DT(a)<2&&!O2t(a,o))return r;const l=a.trimEnd().endsWith("|")?a:NB(a," |"),u=DT(l),_=u<2?0:l.trimEnd().endsWith("|")?u-1:u;if(_===0)return e;const f=i===-1?"":s.slice(i+1),p=LT(o,Array.from({length:_},()=>"-"));if(f.length===0)return r+l+` +`+p;const m=f.indexOf(` +`),x=m===-1?f:f.slice(0,m),S=m===-1?"":f.slice(m);if(I2t(x,o,_))return e;if(x.startsWith(o+"|")&&/^[ |:\-\t]*$/.test(x.slice(o.length))){const v=zB(x,o).map(y=>{const w=y.trim();if(w.length===0)return"-";let C=0;for(let N=0;N1&&w.endsWith(":")?":":"")});for(;v.length<_;)v.push("-");return r+l+` +`+LT(o,v)+S}return r+l+` +`+p+` +`+f}function th(e,n){return e+n.slice(D2t(e,n))}function NB(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return th(e,n);const r=e.slice(0,-t.length);return th(r,n)+t}function D2t(e,n){for(let t=Math.min(e.length,n.length);t>0;t-=1)if(e.endsWith(n.slice(0,t)))return t;return 0}function L2t(e){const n=e.delims.at(-1);return e.exclusive&&(!n||e.exclusive.start>n.start)?e.exclusive:n?{kind:"delim",start:n.start,token:n.token}:e.exclusive}function DT(e){let n=0;for(let t=0;t0}function LT(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function zB(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function I2t(e,n,t){if(!e.startsWith(n))return!1;const r=e.slice(n.length).trim();if(!r.startsWith("|")||!r.endsWith("|"))return!1;const s=zB(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function LS(e,n){let t=n+1;for(;tn+t}function pv(e,n){return n===0||e[n-1]===` +`}function Ya(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function OT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function TB(e){return!!e&&/[A-Za-z]/.test(e)}const jB=zS().use(DS);var Rp,jh,Ah,wf,Rh,Mp,Dp,Lp,Sf,Op,kf;class B2t{constructor(){nt(this,Rp,jB);nt(this,jh,null);nt(this,Ah,{});nt(this,wf,null);nt(this,Rh,"");nt(this,Mp,[]);nt(this,Dp,[]);nt(this,Lp,[]);nt(this,Sf,0);nt(this,Op,[]);nt(this,kf,[])}reconfigure(n,t,r){ue(this,jh)!==null&&ue(this,Rp)===n&&AB(ue(this,Ah),r)&&!!ue(this,wf)===t||(Pe(this,Rp,n),n.attachers.some(s=>s[0]===_v)||(n=n(),n.use(_v),n.freeze()),Pe(this,jh,n),Pe(this,Ah,r),Pe(this,Rh,""),Pe(this,Mp,[]),Pe(this,Dp,[]),Pe(this,Lp,[]),Pe(this,Sf,0),Pe(this,Op,[]),Pe(this,wf,t?new g2t:null))}update(n){ue(this,wf)&&(n=ue(this,wf).update(n));let t=ue(this,Rh);if(n===t)return ue(this,kf);const r=ue(this,Mp),s=$2t(n,t);let i=r.length-1;for(;i>=0&&!(s>=r[i]);i-=1);let a=r[i]??0;i===-1&&(i=0);const o=Yu(ue(this,jh)),l=ue(this,Dp),u=l.slice(i).some(E=>E.some(v3));let _=o.parse(n.slice(a)),f=_.children.map(E=>Yu(Yu(E.position).start.offset)+a);Pe(this,Rh,n),O2(r.length===l.length),r.splice(i,r.length-i,...f);{const E=K2(_,f,a);O2(E.length===f.length),l.splice(i,l.length-i,...E)}if(u||v3(_)){i=0,a=0,_=o.parse(n),f=_.children.map(j=>Yu(Yu(j.position).start.offset)+a),r.splice(0,r.length,...f);const E=K2(_,f,a);O2(E.length===f.length),l.splice(0,l.length,...E)}const p=K2(o.runSync(_),f,a),m=ue(this,Lp),x=ue(this,Op),S=ue(this,kf),b=x.length;let v=null,y=0;for(;yb&&(m.length=x.length=r.length);for(let E=r.length=C?M=b-(r.length-j):j=b){m[j]=String(ue(this,Sf)),Pe(this,Sf,ue(this,Sf)+1),x[j]=null,v&&(v[j]=void 0);continue}m[j]=m[M]??String(X_(this,Sf)._++),x[j]=x[M]??null,v&&(v[j]=S[M])}r.length[]);let s=0;for(const a of e.children){const o=(i=a.position)==null?void 0:i.start.offset;if(o!==void 0){for(;s+1s||t!==-1&&n>t||r!==-1&&n>r||W2t.test(e.slice(0,n))?e:""}const Y2={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Z2t(e,n){return MB(e,{})||{type:"root",children:[]}}function MB(e,n){const t=J2t(e,n);return t&&n.afterTransform&&n.afterTransform(e,t),t}function J2t(e,n){switch(e.nodeType){case 1:return rwt(e,n);case 3:return twt(e);case 8:return nwt(e);case 9:return PT(e,n);case 10:return ewt();case 11:return PT(e,n);default:return}}function PT(e,n){return{type:"root",children:DB(e,n)}}function ewt(){return{type:"doctype"}}function twt(e){return{type:"text",value:e.nodeValue||""}}function nwt(e){return{type:"comment",value:e.nodeValue||""}}function rwt(e,n){const t=e.namespaceURI,r=t===Y2.svg?a1t:LI,s=t===Y2.html?e.tagName.toLowerCase():e.tagName,i=t===Y2.html&&s==="template"?e.content:e,a=e.getAttributeNames(),o={};let l=-1;for(;++lu&&(u=_):_&&(u!==void 0&&u>-1&&l.push(` +`.repeat(u)||" "),u=-1,l.push(_))}return l.join("")}function OB(e,n,t){return e.type==="element"?hwt(e,n,t):e.type==="text"?t.whitespace==="normal"?IB(e,t):_wt(e):[]}function hwt(e,n,t){const r=BB(e,t),s=e.children||[];let i=-1,a=[];if(fwt(e))return a;let o,l;for(b3(e)||GT(e)&&FT(n,e,GT)?l=` +`:uwt(e)?(o=2,l=2):LB(e)&&(o=1,l=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var _;i+15e.replace(bwt,"-$1").toLowerCase(),xwt={"&":"&",">":">","<":"<",'"':""","'":"'"},wwt=/[&><"']/g,Ps=e=>String(e).replace(wwt,n=>xwt[n]),k1=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?k1(e.body[0]):e:e.type==="font"?k1(e.body):e,Swt=new Set(["mathord","textord","atom"]),ec=e=>Swt.has(k1(e).type),kwt=e=>{var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},y3={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,n)=>(n.push(e),n)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Cwt(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function Ewt(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return Cwt(n)}function Nwt(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:Ewt(r)}class IS{constructor(n){n===void 0&&(n={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,n=n||{};for(var t of Object.keys(y3)){var r=y3[t];r&&Nwt(this,t,n,r)}}reportNonstrict(n,t,r){var s=this.strict;if(typeof s=="function"&&(s=s(n,t,r)),!(!s||s==="ignore")){if(s===!0||s==="error")throw new Qe("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+n+"]"),r);s==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]"))}}useStrictBehavior(n,t,r){var s=this.strict;if(typeof s=="function")try{s=s(n,t,r)}catch{s="error"}return!s||s==="ignore"?!1:s===!0||s==="error"?!0:s==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+n+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+s+"': "+t+" ["+n+"]")),!1)}isTrusted(n){if("url"in n&&n.url&&!n.protocol){var t=kwt(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class Oc{constructor(n,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=n,this.size=t,this.cramped=r}sup(){return To[zwt[this.id]]}sub(){return To[Twt[this.id]]}fracNum(){return To[jwt[this.id]]}fracDen(){return To[Awt[this.id]]}cramp(){return To[Rwt[this.id]]}text(){return To[Mwt[this.id]]}isTight(){return this.size>=2}}var BS=0,mv=1,ch=2,Kl=3,lp=4,xa=5,qh=6,ni=7,To=[new Oc(BS,0,!1),new Oc(mv,0,!0),new Oc(ch,1,!1),new Oc(Kl,1,!0),new Oc(lp,2,!1),new Oc(xa,2,!0),new Oc(qh,3,!1),new Oc(ni,3,!0)],zwt=[lp,xa,lp,xa,qh,ni,qh,ni],Twt=[xa,xa,xa,xa,ni,ni,ni,ni],jwt=[ch,Kl,lp,xa,qh,ni,qh,ni],Awt=[Kl,Kl,xa,xa,ni,ni,ni,ni],Rwt=[mv,mv,Kl,Kl,xa,xa,ni,ni],Mwt=[BS,mv,ch,Kl,ch,Kl,ch,Kl],Vt={DISPLAY:To[BS],TEXT:To[ch],SCRIPT:To[lp],SCRIPTSCRIPT:To[qh]},x3=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Dwt(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var C1=[];x3.forEach(e=>e.blocks.forEach(n=>C1.push(...n)));function $B(e){for(var n=0;n=C1[n]&&e<=C1[n+1])return!0;return!1}var ps=e=>e+" "+e,Hd=80,Lwt=function(n,t){return"M95,"+(622+n+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+n/2.075+" -"+n+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+n)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},Owt=function(n,t){return"M263,"+(601+n+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+n/2.084+" -"+n+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+n)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},Iwt=function(n,t){return"M983 "+(10+n+t)+` +l`+n/3.13+" -"+n+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+n)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},Bwt=function(n,t){return"M424,"+(2398+n+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+n/4.223+" -"+n+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+n)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+n)+" "+t+` +h400000v`+(40+n)+"h-400000z"},$wt=function(n,t){return"M473,"+(2713+n+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+n/5.298+" -"+n+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+n)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+n)+" "+t+"h400000v"+(40+n)+"H1017.7z"},Pwt=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},Fwt=function(n,t,r){var s=r-54-t-n;return"M702 "+(n+t)+"H400000"+(40+n)+` +H742v`+s+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},Hwt=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=Lwt(t,Hd);break;case"sqrtSize1":s=Owt(t,Hd);break;case"sqrtSize2":s=Iwt(t,Hd);break;case"sqrtSize3":s=Bwt(t,Hd);break;case"sqrtSize4":s=$wt(t,Hd);break;case"sqrtTall":s=Fwt(t,Hd,r)}return s},qwt=function(n,t){switch(n){case"⎜":return ps("M291 0 H417 V"+t+" H291z");case"∣":return ps("M145 0 H188 V"+t+" H145z");case"∥":return ps("M145 0 H188 V"+t+" H145z")+ps("M367 0 H410 V"+t+" H367z");case"⎟":return ps("M457 0 H583 V"+t+" H457z");case"⎢":return ps("M319 0 H403 V"+t+" H319z");case"⎥":return ps("M263 0 H347 V"+t+" H263z");case"⎪":return ps("M384 0 H504 V"+t+" H384z");case"⏐":return ps("M312 0 H355 V"+t+" H312z");case"‖":return ps("M257 0 H300 V"+t+" H257z")+ps("M478 0 H521 V"+t+" H478z");default:return""}},WT={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:ps("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:ps("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:ps("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:ps("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:ps("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:ps("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:ps("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:ps("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Uwt=function(n,t){switch(n){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 v84 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};function Gwt(e){return"toText"in e}class u_{constructor(n){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=n,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(n){return this.classes.includes(n)}toNode(){for(var n=document.createDocumentFragment(),t=0;t{if(Gwt(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var w3={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Wwt={ex:!0,em:!0,mu:!0},PB=function(n){return typeof n!="string"&&(n=n.unit),n in w3||n in Wwt||n==="ex"},Rr=function(n,t){var r;if(n.unit in w3)r=w3[n.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(n.unit==="mu")r=t.fontMetrics().cssEmPerMu;else{var s;if(t.style.isTight()?s=t.havingStyle(t.style.text()):s=t,n.unit==="ex")r=s.fontMetrics().xHeight;else if(n.unit==="em")r=s.fontMetrics().quad;else throw new Qe("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},et=function(n){return+n.toFixed(4)+"em"},uu=function(n){return n.filter(t=>t).join(" ")},$S=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=ywt(r)+":"+s+";")}return t},FB=function(n,t,r){if(this.classes=n||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var s=t.getColor();s&&(this.style.color=s)}},HB=function(n){var t=document.createElement(n);t.className=uu(this.classes),Object.assign(t.style,this.style);for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s/=\x00-\x1f]/,qB=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+Ps(uu(this.classes))+'"');var r=$S(this.style);r&&(t+=' style="'+Ps(r)+'"');for(var s of Object.keys(this.attributes)){if(Vwt.test(s))throw new Qe("Invalid attribute name '"+s+"'");t+=" "+s+'="'+Ps(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class f_{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,FB.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return HB.call(this,"span")}toMarkup(){return qB.call(this,"span")}}class jb{constructor(n,t,r,s){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,FB.call(this,t,s),this.children=r||[],this.setAttribute("href",n)}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return HB.call(this,"a")}toMarkup(){return qB.call(this,"a")}}class Kwt{constructor(n,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=n,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(n){return this.classes.includes(n)}toNode(){var n=document.createElement("img");return n.src=this.src,n.alt=this.alt,n.className="mord",Object.assign(n.style,this.style),n}toMarkup(){var n=''+Ps(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=et(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=uu(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(n),t):n}toMarkup(){var n=!1,t="0&&(r+="margin-right:"+et(this.italic)+";"),r+=$S(this.style),r&&(n=!0,t+=' style="'+Ps(r)+'"');var s=Ps(this.text);return n?(t+=">",t+=s,t+="",t):s}}class Xl{constructor(n,t){this.children=void 0,this.attributes=void 0,this.children=n||[],this.attributes=t||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"svg");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var s=0;s':''}}class S3{constructor(n){this.attributes=void 0,this.attributes=n||{}}toNode(){var n="http://www.w3.org/2000/svg",t=document.createElementNS(n,"line");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);return t}toMarkup(){var n=" but got "+String(e)+".")}var Zwt=e=>e instanceof f_||e instanceof jb||e instanceof u_,Ro={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Fg={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},VT={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Jwt(e,n){Ro[e]=n}function PS(e,n,t){if(!Ro[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Ro[n][r];if(!s&&e[0]in VT&&(r=VT[e[0]].charCodeAt(0),s=Ro[n][r]),!s&&t==="text"&&$B(r)&&(s=Ro[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var X2={};function e4t(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!X2[n]){var t=X2[n]={cssEmPerMu:Fg.quad[n]/18};for(var r in Fg)Fg.hasOwnProperty(r)&&(t[r]=Fg[r][n])}return X2[n]}var wr={math:{},text:{}};function P(e,n,t,r,s,i){wr[e][s]={font:n,group:t,replace:r},i&&r&&(wr[e][r]=wr[e][s])}var W="math",Fe="text",Z="main",de="ams",kr="accent-token",lt="bin",si="close",d_="inner",Mt="mathord",is="op-token",Ji="open",rm="punct",_e="rel",tc="spacing",ve="textord";P(W,Z,_e,"≡","\\equiv",!0);P(W,Z,_e,"≺","\\prec",!0);P(W,Z,_e,"≻","\\succ",!0);P(W,Z,_e,"∼","\\sim",!0);P(W,Z,_e,"⊥","\\perp");P(W,Z,_e,"⪯","\\preceq",!0);P(W,Z,_e,"⪰","\\succeq",!0);P(W,Z,_e,"≃","\\simeq",!0);P(W,Z,_e,"∣","\\mid",!0);P(W,Z,_e,"≪","\\ll",!0);P(W,Z,_e,"≫","\\gg",!0);P(W,Z,_e,"≍","\\asymp",!0);P(W,Z,_e,"∥","\\parallel");P(W,Z,_e,"⋈","\\bowtie",!0);P(W,Z,_e,"⌣","\\smile",!0);P(W,Z,_e,"⊑","\\sqsubseteq",!0);P(W,Z,_e,"⊒","\\sqsupseteq",!0);P(W,Z,_e,"≐","\\doteq",!0);P(W,Z,_e,"⌢","\\frown",!0);P(W,Z,_e,"∋","\\ni",!0);P(W,Z,_e,"∝","\\propto",!0);P(W,Z,_e,"⊢","\\vdash",!0);P(W,Z,_e,"⊣","\\dashv",!0);P(W,Z,_e,"∋","\\owns");P(W,Z,rm,".","\\ldotp");P(W,Z,rm,"⋅","\\cdotp");P(W,Z,rm,"⋅","·");P(Fe,Z,ve,"⋅","·");P(W,Z,ve,"#","\\#");P(Fe,Z,ve,"#","\\#");P(W,Z,ve,"&","\\&");P(Fe,Z,ve,"&","\\&");P(W,Z,ve,"ℵ","\\aleph",!0);P(W,Z,ve,"∀","\\forall",!0);P(W,Z,ve,"ℏ","\\hbar",!0);P(W,Z,ve,"∃","\\exists",!0);P(W,Z,ve,"∇","\\nabla",!0);P(W,Z,ve,"♭","\\flat",!0);P(W,Z,ve,"ℓ","\\ell",!0);P(W,Z,ve,"♮","\\natural",!0);P(W,Z,ve,"♣","\\clubsuit",!0);P(W,Z,ve,"℘","\\wp",!0);P(W,Z,ve,"♯","\\sharp",!0);P(W,Z,ve,"♢","\\diamondsuit",!0);P(W,Z,ve,"ℜ","\\Re",!0);P(W,Z,ve,"♡","\\heartsuit",!0);P(W,Z,ve,"ℑ","\\Im",!0);P(W,Z,ve,"♠","\\spadesuit",!0);P(W,Z,ve,"§","\\S",!0);P(Fe,Z,ve,"§","\\S");P(W,Z,ve,"¶","\\P",!0);P(Fe,Z,ve,"¶","\\P");P(W,Z,ve,"†","\\dag");P(Fe,Z,ve,"†","\\dag");P(Fe,Z,ve,"†","\\textdagger");P(W,Z,ve,"‡","\\ddag");P(Fe,Z,ve,"‡","\\ddag");P(Fe,Z,ve,"‡","\\textdaggerdbl");P(W,Z,si,"⎱","\\rmoustache",!0);P(W,Z,Ji,"⎰","\\lmoustache",!0);P(W,Z,si,"⟯","\\rgroup",!0);P(W,Z,Ji,"⟮","\\lgroup",!0);P(W,Z,lt,"∓","\\mp",!0);P(W,Z,lt,"⊖","\\ominus",!0);P(W,Z,lt,"⊎","\\uplus",!0);P(W,Z,lt,"⊓","\\sqcap",!0);P(W,Z,lt,"∗","\\ast");P(W,Z,lt,"⊔","\\sqcup",!0);P(W,Z,lt,"◯","\\bigcirc",!0);P(W,Z,lt,"∙","\\bullet",!0);P(W,Z,lt,"‡","\\ddagger");P(W,Z,lt,"≀","\\wr",!0);P(W,Z,lt,"⨿","\\amalg");P(W,Z,lt,"&","\\And");P(W,Z,_e,"⟵","\\longleftarrow",!0);P(W,Z,_e,"⇐","\\Leftarrow",!0);P(W,Z,_e,"⟸","\\Longleftarrow",!0);P(W,Z,_e,"⟶","\\longrightarrow",!0);P(W,Z,_e,"⇒","\\Rightarrow",!0);P(W,Z,_e,"⟹","\\Longrightarrow",!0);P(W,Z,_e,"↔","\\leftrightarrow",!0);P(W,Z,_e,"⟷","\\longleftrightarrow",!0);P(W,Z,_e,"⇔","\\Leftrightarrow",!0);P(W,Z,_e,"⟺","\\Longleftrightarrow",!0);P(W,Z,_e,"↦","\\mapsto",!0);P(W,Z,_e,"⟼","\\longmapsto",!0);P(W,Z,_e,"↗","\\nearrow",!0);P(W,Z,_e,"↩","\\hookleftarrow",!0);P(W,Z,_e,"↪","\\hookrightarrow",!0);P(W,Z,_e,"↘","\\searrow",!0);P(W,Z,_e,"↼","\\leftharpoonup",!0);P(W,Z,_e,"⇀","\\rightharpoonup",!0);P(W,Z,_e,"↙","\\swarrow",!0);P(W,Z,_e,"↽","\\leftharpoondown",!0);P(W,Z,_e,"⇁","\\rightharpoondown",!0);P(W,Z,_e,"↖","\\nwarrow",!0);P(W,Z,_e,"⇌","\\rightleftharpoons",!0);P(W,de,_e,"≮","\\nless",!0);P(W,de,_e,"","\\@nleqslant");P(W,de,_e,"","\\@nleqq");P(W,de,_e,"⪇","\\lneq",!0);P(W,de,_e,"≨","\\lneqq",!0);P(W,de,_e,"","\\@lvertneqq");P(W,de,_e,"⋦","\\lnsim",!0);P(W,de,_e,"⪉","\\lnapprox",!0);P(W,de,_e,"⊀","\\nprec",!0);P(W,de,_e,"⋠","\\npreceq",!0);P(W,de,_e,"⋨","\\precnsim",!0);P(W,de,_e,"⪹","\\precnapprox",!0);P(W,de,_e,"≁","\\nsim",!0);P(W,de,_e,"","\\@nshortmid");P(W,de,_e,"∤","\\nmid",!0);P(W,de,_e,"⊬","\\nvdash",!0);P(W,de,_e,"⊭","\\nvDash",!0);P(W,de,_e,"⋪","\\ntriangleleft");P(W,de,_e,"⋬","\\ntrianglelefteq",!0);P(W,de,_e,"⊊","\\subsetneq",!0);P(W,de,_e,"","\\@varsubsetneq");P(W,de,_e,"⫋","\\subsetneqq",!0);P(W,de,_e,"","\\@varsubsetneqq");P(W,de,_e,"≯","\\ngtr",!0);P(W,de,_e,"","\\@ngeqslant");P(W,de,_e,"","\\@ngeqq");P(W,de,_e,"⪈","\\gneq",!0);P(W,de,_e,"≩","\\gneqq",!0);P(W,de,_e,"","\\@gvertneqq");P(W,de,_e,"⋧","\\gnsim",!0);P(W,de,_e,"⪊","\\gnapprox",!0);P(W,de,_e,"⊁","\\nsucc",!0);P(W,de,_e,"⋡","\\nsucceq",!0);P(W,de,_e,"⋩","\\succnsim",!0);P(W,de,_e,"⪺","\\succnapprox",!0);P(W,de,_e,"≆","\\ncong",!0);P(W,de,_e,"","\\@nshortparallel");P(W,de,_e,"∦","\\nparallel",!0);P(W,de,_e,"⊯","\\nVDash",!0);P(W,de,_e,"⋫","\\ntriangleright");P(W,de,_e,"⋭","\\ntrianglerighteq",!0);P(W,de,_e,"","\\@nsupseteqq");P(W,de,_e,"⊋","\\supsetneq",!0);P(W,de,_e,"","\\@varsupsetneq");P(W,de,_e,"⫌","\\supsetneqq",!0);P(W,de,_e,"","\\@varsupsetneqq");P(W,de,_e,"⊮","\\nVdash",!0);P(W,de,_e,"⪵","\\precneqq",!0);P(W,de,_e,"⪶","\\succneqq",!0);P(W,de,_e,"","\\@nsubseteqq");P(W,de,lt,"⊴","\\unlhd");P(W,de,lt,"⊵","\\unrhd");P(W,de,_e,"↚","\\nleftarrow",!0);P(W,de,_e,"↛","\\nrightarrow",!0);P(W,de,_e,"⇍","\\nLeftarrow",!0);P(W,de,_e,"⇏","\\nRightarrow",!0);P(W,de,_e,"↮","\\nleftrightarrow",!0);P(W,de,_e,"⇎","\\nLeftrightarrow",!0);P(W,de,_e,"△","\\vartriangle");P(W,de,ve,"ℏ","\\hslash");P(W,de,ve,"▽","\\triangledown");P(W,de,ve,"◊","\\lozenge");P(W,de,ve,"Ⓢ","\\circledS");P(W,de,ve,"®","\\circledR");P(Fe,de,ve,"®","\\circledR");P(W,de,ve,"∡","\\measuredangle",!0);P(W,de,ve,"∄","\\nexists");P(W,de,ve,"℧","\\mho");P(W,de,ve,"Ⅎ","\\Finv",!0);P(W,de,ve,"⅁","\\Game",!0);P(W,de,ve,"‵","\\backprime");P(W,de,ve,"▲","\\blacktriangle");P(W,de,ve,"▼","\\blacktriangledown");P(W,de,ve,"■","\\blacksquare");P(W,de,ve,"⧫","\\blacklozenge");P(W,de,ve,"★","\\bigstar");P(W,de,ve,"∢","\\sphericalangle",!0);P(W,de,ve,"∁","\\complement",!0);P(W,de,ve,"ð","\\eth",!0);P(Fe,Z,ve,"ð","ð");P(W,de,ve,"╱","\\diagup");P(W,de,ve,"╲","\\diagdown");P(W,de,ve,"□","\\square");P(W,de,ve,"□","\\Box");P(W,de,ve,"◊","\\Diamond");P(W,de,ve,"¥","\\yen",!0);P(Fe,de,ve,"¥","\\yen",!0);P(W,de,ve,"✓","\\checkmark",!0);P(Fe,de,ve,"✓","\\checkmark");P(W,de,ve,"ℶ","\\beth",!0);P(W,de,ve,"ℸ","\\daleth",!0);P(W,de,ve,"ℷ","\\gimel",!0);P(W,de,ve,"ϝ","\\digamma",!0);P(W,de,ve,"ϰ","\\varkappa");P(W,de,Ji,"┌","\\@ulcorner",!0);P(W,de,si,"┐","\\@urcorner",!0);P(W,de,Ji,"└","\\@llcorner",!0);P(W,de,si,"┘","\\@lrcorner",!0);P(W,de,_e,"≦","\\leqq",!0);P(W,de,_e,"⩽","\\leqslant",!0);P(W,de,_e,"⪕","\\eqslantless",!0);P(W,de,_e,"≲","\\lesssim",!0);P(W,de,_e,"⪅","\\lessapprox",!0);P(W,de,_e,"≊","\\approxeq",!0);P(W,de,lt,"⋖","\\lessdot");P(W,de,_e,"⋘","\\lll",!0);P(W,de,_e,"≶","\\lessgtr",!0);P(W,de,_e,"⋚","\\lesseqgtr",!0);P(W,de,_e,"⪋","\\lesseqqgtr",!0);P(W,de,_e,"≑","\\doteqdot");P(W,de,_e,"≓","\\risingdotseq",!0);P(W,de,_e,"≒","\\fallingdotseq",!0);P(W,de,_e,"∽","\\backsim",!0);P(W,de,_e,"⋍","\\backsimeq",!0);P(W,de,_e,"⫅","\\subseteqq",!0);P(W,de,_e,"⋐","\\Subset",!0);P(W,de,_e,"⊏","\\sqsubset",!0);P(W,de,_e,"≼","\\preccurlyeq",!0);P(W,de,_e,"⋞","\\curlyeqprec",!0);P(W,de,_e,"≾","\\precsim",!0);P(W,de,_e,"⪷","\\precapprox",!0);P(W,de,_e,"⊲","\\vartriangleleft");P(W,de,_e,"⊴","\\trianglelefteq");P(W,de,_e,"⊨","\\vDash",!0);P(W,de,_e,"⊪","\\Vvdash",!0);P(W,de,_e,"⌣","\\smallsmile");P(W,de,_e,"⌢","\\smallfrown");P(W,de,_e,"≏","\\bumpeq",!0);P(W,de,_e,"≎","\\Bumpeq",!0);P(W,de,_e,"≧","\\geqq",!0);P(W,de,_e,"⩾","\\geqslant",!0);P(W,de,_e,"⪖","\\eqslantgtr",!0);P(W,de,_e,"≳","\\gtrsim",!0);P(W,de,_e,"⪆","\\gtrapprox",!0);P(W,de,lt,"⋗","\\gtrdot");P(W,de,_e,"⋙","\\ggg",!0);P(W,de,_e,"≷","\\gtrless",!0);P(W,de,_e,"⋛","\\gtreqless",!0);P(W,de,_e,"⪌","\\gtreqqless",!0);P(W,de,_e,"≖","\\eqcirc",!0);P(W,de,_e,"≗","\\circeq",!0);P(W,de,_e,"≜","\\triangleq",!0);P(W,de,_e,"∼","\\thicksim");P(W,de,_e,"≈","\\thickapprox");P(W,de,_e,"⫆","\\supseteqq",!0);P(W,de,_e,"⋑","\\Supset",!0);P(W,de,_e,"⊐","\\sqsupset",!0);P(W,de,_e,"≽","\\succcurlyeq",!0);P(W,de,_e,"⋟","\\curlyeqsucc",!0);P(W,de,_e,"≿","\\succsim",!0);P(W,de,_e,"⪸","\\succapprox",!0);P(W,de,_e,"⊳","\\vartriangleright");P(W,de,_e,"⊵","\\trianglerighteq");P(W,de,_e,"⊩","\\Vdash",!0);P(W,de,_e,"∣","\\shortmid");P(W,de,_e,"∥","\\shortparallel");P(W,de,_e,"≬","\\between",!0);P(W,de,_e,"⋔","\\pitchfork",!0);P(W,de,_e,"∝","\\varpropto");P(W,de,_e,"◀","\\blacktriangleleft");P(W,de,_e,"∴","\\therefore",!0);P(W,de,_e,"∍","\\backepsilon");P(W,de,_e,"▶","\\blacktriangleright");P(W,de,_e,"∵","\\because",!0);P(W,de,_e,"⋘","\\llless");P(W,de,_e,"⋙","\\gggtr");P(W,de,lt,"⊲","\\lhd");P(W,de,lt,"⊳","\\rhd");P(W,de,_e,"≂","\\eqsim",!0);P(W,Z,_e,"⋈","\\Join");P(W,de,_e,"≑","\\Doteq",!0);P(W,de,lt,"∔","\\dotplus",!0);P(W,de,lt,"∖","\\smallsetminus");P(W,de,lt,"⋒","\\Cap",!0);P(W,de,lt,"⋓","\\Cup",!0);P(W,de,lt,"⩞","\\doublebarwedge",!0);P(W,de,lt,"⊟","\\boxminus",!0);P(W,de,lt,"⊞","\\boxplus",!0);P(W,de,lt,"⋇","\\divideontimes",!0);P(W,de,lt,"⋉","\\ltimes",!0);P(W,de,lt,"⋊","\\rtimes",!0);P(W,de,lt,"⋋","\\leftthreetimes",!0);P(W,de,lt,"⋌","\\rightthreetimes",!0);P(W,de,lt,"⋏","\\curlywedge",!0);P(W,de,lt,"⋎","\\curlyvee",!0);P(W,de,lt,"⊝","\\circleddash",!0);P(W,de,lt,"⊛","\\circledast",!0);P(W,de,lt,"⋅","\\centerdot");P(W,de,lt,"⊺","\\intercal",!0);P(W,de,lt,"⋒","\\doublecap");P(W,de,lt,"⋓","\\doublecup");P(W,de,lt,"⊠","\\boxtimes",!0);P(W,de,_e,"⇢","\\dashrightarrow",!0);P(W,de,_e,"⇠","\\dashleftarrow",!0);P(W,de,_e,"⇇","\\leftleftarrows",!0);P(W,de,_e,"⇆","\\leftrightarrows",!0);P(W,de,_e,"⇚","\\Lleftarrow",!0);P(W,de,_e,"↞","\\twoheadleftarrow",!0);P(W,de,_e,"↢","\\leftarrowtail",!0);P(W,de,_e,"↫","\\looparrowleft",!0);P(W,de,_e,"⇋","\\leftrightharpoons",!0);P(W,de,_e,"↶","\\curvearrowleft",!0);P(W,de,_e,"↺","\\circlearrowleft",!0);P(W,de,_e,"↰","\\Lsh",!0);P(W,de,_e,"⇈","\\upuparrows",!0);P(W,de,_e,"↿","\\upharpoonleft",!0);P(W,de,_e,"⇃","\\downharpoonleft",!0);P(W,Z,_e,"⊶","\\origof",!0);P(W,Z,_e,"⊷","\\imageof",!0);P(W,de,_e,"⊸","\\multimap",!0);P(W,de,_e,"↭","\\leftrightsquigarrow",!0);P(W,de,_e,"⇉","\\rightrightarrows",!0);P(W,de,_e,"⇄","\\rightleftarrows",!0);P(W,de,_e,"↠","\\twoheadrightarrow",!0);P(W,de,_e,"↣","\\rightarrowtail",!0);P(W,de,_e,"↬","\\looparrowright",!0);P(W,de,_e,"↷","\\curvearrowright",!0);P(W,de,_e,"↻","\\circlearrowright",!0);P(W,de,_e,"↱","\\Rsh",!0);P(W,de,_e,"⇊","\\downdownarrows",!0);P(W,de,_e,"↾","\\upharpoonright",!0);P(W,de,_e,"⇂","\\downharpoonright",!0);P(W,de,_e,"⇝","\\rightsquigarrow",!0);P(W,de,_e,"⇝","\\leadsto");P(W,de,_e,"⇛","\\Rrightarrow",!0);P(W,de,_e,"↾","\\restriction");P(W,Z,ve,"‘","`");P(W,Z,ve,"$","\\$");P(Fe,Z,ve,"$","\\$");P(Fe,Z,ve,"$","\\textdollar");P(W,Z,ve,"%","\\%");P(Fe,Z,ve,"%","\\%");P(W,Z,ve,"_","\\_");P(Fe,Z,ve,"_","\\_");P(Fe,Z,ve,"_","\\textunderscore");P(W,Z,ve,"∠","\\angle",!0);P(W,Z,ve,"∞","\\infty",!0);P(W,Z,ve,"′","\\prime");P(W,Z,ve,"△","\\triangle");P(W,Z,ve,"Γ","\\Gamma",!0);P(W,Z,ve,"Δ","\\Delta",!0);P(W,Z,ve,"Θ","\\Theta",!0);P(W,Z,ve,"Λ","\\Lambda",!0);P(W,Z,ve,"Ξ","\\Xi",!0);P(W,Z,ve,"Π","\\Pi",!0);P(W,Z,ve,"Σ","\\Sigma",!0);P(W,Z,ve,"Υ","\\Upsilon",!0);P(W,Z,ve,"Φ","\\Phi",!0);P(W,Z,ve,"Ψ","\\Psi",!0);P(W,Z,ve,"Ω","\\Omega",!0);P(W,Z,ve,"A","Α");P(W,Z,ve,"B","Β");P(W,Z,ve,"E","Ε");P(W,Z,ve,"Z","Ζ");P(W,Z,ve,"H","Η");P(W,Z,ve,"I","Ι");P(W,Z,ve,"K","Κ");P(W,Z,ve,"M","Μ");P(W,Z,ve,"N","Ν");P(W,Z,ve,"O","Ο");P(W,Z,ve,"P","Ρ");P(W,Z,ve,"T","Τ");P(W,Z,ve,"X","Χ");P(W,Z,ve,"¬","\\neg",!0);P(W,Z,ve,"¬","\\lnot");P(W,Z,ve,"⊤","\\top");P(W,Z,ve,"⊥","\\bot");P(W,Z,ve,"∅","\\emptyset");P(W,de,ve,"∅","\\varnothing");P(W,Z,Mt,"α","\\alpha",!0);P(W,Z,Mt,"β","\\beta",!0);P(W,Z,Mt,"γ","\\gamma",!0);P(W,Z,Mt,"δ","\\delta",!0);P(W,Z,Mt,"ϵ","\\epsilon",!0);P(W,Z,Mt,"ζ","\\zeta",!0);P(W,Z,Mt,"η","\\eta",!0);P(W,Z,Mt,"θ","\\theta",!0);P(W,Z,Mt,"ι","\\iota",!0);P(W,Z,Mt,"κ","\\kappa",!0);P(W,Z,Mt,"λ","\\lambda",!0);P(W,Z,Mt,"μ","\\mu",!0);P(W,Z,Mt,"ν","\\nu",!0);P(W,Z,Mt,"ξ","\\xi",!0);P(W,Z,Mt,"ο","\\omicron",!0);P(W,Z,Mt,"π","\\pi",!0);P(W,Z,Mt,"ρ","\\rho",!0);P(W,Z,Mt,"σ","\\sigma",!0);P(W,Z,Mt,"τ","\\tau",!0);P(W,Z,Mt,"υ","\\upsilon",!0);P(W,Z,Mt,"ϕ","\\phi",!0);P(W,Z,Mt,"χ","\\chi",!0);P(W,Z,Mt,"ψ","\\psi",!0);P(W,Z,Mt,"ω","\\omega",!0);P(W,Z,Mt,"ε","\\varepsilon",!0);P(W,Z,Mt,"ϑ","\\vartheta",!0);P(W,Z,Mt,"ϖ","\\varpi",!0);P(W,Z,Mt,"ϱ","\\varrho",!0);P(W,Z,Mt,"ς","\\varsigma",!0);P(W,Z,Mt,"φ","\\varphi",!0);P(W,Z,lt,"∗","*",!0);P(W,Z,lt,"+","+");P(W,Z,lt,"−","-",!0);P(W,Z,lt,"⋅","\\cdot",!0);P(W,Z,lt,"∘","\\circ",!0);P(W,Z,lt,"÷","\\div",!0);P(W,Z,lt,"±","\\pm",!0);P(W,Z,lt,"×","\\times",!0);P(W,Z,lt,"∩","\\cap",!0);P(W,Z,lt,"∪","\\cup",!0);P(W,Z,lt,"∖","\\setminus",!0);P(W,Z,lt,"∧","\\land");P(W,Z,lt,"∨","\\lor");P(W,Z,lt,"∧","\\wedge",!0);P(W,Z,lt,"∨","\\vee",!0);P(W,Z,ve,"√","\\surd");P(W,Z,Ji,"⟨","\\langle",!0);P(W,Z,Ji,"∣","\\lvert");P(W,Z,Ji,"∥","\\lVert");P(W,Z,si,"?","?");P(W,Z,si,"!","!");P(W,Z,si,"⟩","\\rangle",!0);P(W,Z,si,"∣","\\rvert");P(W,Z,si,"∥","\\rVert");P(W,Z,_e,"=","=");P(W,Z,_e,":",":");P(W,Z,_e,"≈","\\approx",!0);P(W,Z,_e,"≅","\\cong",!0);P(W,Z,_e,"≥","\\ge");P(W,Z,_e,"≥","\\geq",!0);P(W,Z,_e,"←","\\gets");P(W,Z,_e,">","\\gt",!0);P(W,Z,_e,"∈","\\in",!0);P(W,Z,_e,"","\\@not");P(W,Z,_e,"⊂","\\subset",!0);P(W,Z,_e,"⊃","\\supset",!0);P(W,Z,_e,"⊆","\\subseteq",!0);P(W,Z,_e,"⊇","\\supseteq",!0);P(W,de,_e,"⊈","\\nsubseteq",!0);P(W,de,_e,"⊉","\\nsupseteq",!0);P(W,Z,_e,"⊨","\\models");P(W,Z,_e,"←","\\leftarrow",!0);P(W,Z,_e,"≤","\\le");P(W,Z,_e,"≤","\\leq",!0);P(W,Z,_e,"<","\\lt",!0);P(W,Z,_e,"→","\\rightarrow",!0);P(W,Z,_e,"→","\\to");P(W,de,_e,"≱","\\ngeq",!0);P(W,de,_e,"≰","\\nleq",!0);P(W,Z,tc," ","\\ ");P(W,Z,tc," ","\\space");P(W,Z,tc," ","\\nobreakspace");P(Fe,Z,tc," ","\\ ");P(Fe,Z,tc," "," ");P(Fe,Z,tc," ","\\space");P(Fe,Z,tc," ","\\nobreakspace");P(W,Z,tc,"","\\nobreak");P(W,Z,tc,"","\\allowbreak");P(W,Z,rm,",",",");P(W,Z,rm,";",";");P(W,de,lt,"⊼","\\barwedge",!0);P(W,de,lt,"⊻","\\veebar",!0);P(W,Z,lt,"⊙","\\odot",!0);P(W,Z,lt,"⊕","\\oplus",!0);P(W,Z,lt,"⊗","\\otimes",!0);P(W,Z,ve,"∂","\\partial",!0);P(W,Z,lt,"⊘","\\oslash",!0);P(W,de,lt,"⊚","\\circledcirc",!0);P(W,de,lt,"⊡","\\boxdot",!0);P(W,Z,lt,"△","\\bigtriangleup");P(W,Z,lt,"▽","\\bigtriangledown");P(W,Z,lt,"†","\\dagger");P(W,Z,lt,"⋄","\\diamond");P(W,Z,lt,"⋆","\\star");P(W,Z,lt,"◃","\\triangleleft");P(W,Z,lt,"▹","\\triangleright");P(W,Z,Ji,"{","\\{");P(Fe,Z,ve,"{","\\{");P(Fe,Z,ve,"{","\\textbraceleft");P(W,Z,si,"}","\\}");P(Fe,Z,ve,"}","\\}");P(Fe,Z,ve,"}","\\textbraceright");P(W,Z,Ji,"{","\\lbrace");P(W,Z,si,"}","\\rbrace");P(W,Z,Ji,"[","\\lbrack",!0);P(Fe,Z,ve,"[","\\lbrack",!0);P(W,Z,si,"]","\\rbrack",!0);P(Fe,Z,ve,"]","\\rbrack",!0);P(W,Z,Ji,"(","\\lparen",!0);P(W,Z,si,")","\\rparen",!0);P(Fe,Z,ve,"<","\\textless",!0);P(Fe,Z,ve,">","\\textgreater",!0);P(W,Z,Ji,"⌊","\\lfloor",!0);P(W,Z,si,"⌋","\\rfloor",!0);P(W,Z,Ji,"⌈","\\lceil",!0);P(W,Z,si,"⌉","\\rceil",!0);P(W,Z,ve,"\\","\\backslash");P(W,Z,ve,"∣","|");P(W,Z,ve,"∣","\\vert");P(Fe,Z,ve,"|","\\textbar",!0);P(W,Z,ve,"∥","\\|");P(W,Z,ve,"∥","\\Vert");P(Fe,Z,ve,"∥","\\textbardbl");P(Fe,Z,ve,"~","\\textasciitilde");P(Fe,Z,ve,"\\","\\textbackslash");P(Fe,Z,ve,"^","\\textasciicircum");P(W,Z,_e,"↑","\\uparrow",!0);P(W,Z,_e,"⇑","\\Uparrow",!0);P(W,Z,_e,"↓","\\downarrow",!0);P(W,Z,_e,"⇓","\\Downarrow",!0);P(W,Z,_e,"↕","\\updownarrow",!0);P(W,Z,_e,"⇕","\\Updownarrow",!0);P(W,Z,is,"∐","\\coprod");P(W,Z,is,"⋁","\\bigvee");P(W,Z,is,"⋀","\\bigwedge");P(W,Z,is,"⨄","\\biguplus");P(W,Z,is,"⋂","\\bigcap");P(W,Z,is,"⋃","\\bigcup");P(W,Z,is,"∫","\\int");P(W,Z,is,"∫","\\intop");P(W,Z,is,"∬","\\iint");P(W,Z,is,"∭","\\iiint");P(W,Z,is,"∏","\\prod");P(W,Z,is,"∑","\\sum");P(W,Z,is,"⨂","\\bigotimes");P(W,Z,is,"⨁","\\bigoplus");P(W,Z,is,"⨀","\\bigodot");P(W,Z,is,"∮","\\oint");P(W,Z,is,"∯","\\oiint");P(W,Z,is,"∰","\\oiiint");P(W,Z,is,"⨆","\\bigsqcup");P(W,Z,is,"∫","\\smallint");P(Fe,Z,d_,"…","\\textellipsis");P(W,Z,d_,"…","\\mathellipsis");P(Fe,Z,d_,"…","\\ldots",!0);P(W,Z,d_,"…","\\ldots",!0);P(W,Z,d_,"⋯","\\@cdots",!0);P(W,Z,d_,"⋱","\\ddots",!0);P(W,Z,ve,"⋮","\\varvdots");P(Fe,Z,ve,"⋮","\\varvdots");P(W,Z,kr,"ˊ","\\acute");P(W,Z,kr,"ˋ","\\grave");P(W,Z,kr,"¨","\\ddot");P(W,Z,kr,"~","\\tilde");P(W,Z,kr,"ˉ","\\bar");P(W,Z,kr,"˘","\\breve");P(W,Z,kr,"ˇ","\\check");P(W,Z,kr,"^","\\hat");P(W,Z,kr,"⃗","\\vec");P(W,Z,kr,"˙","\\dot");P(W,Z,kr,"˚","\\mathring");P(W,Z,Mt,"","\\@imath");P(W,Z,Mt,"","\\@jmath");P(W,Z,ve,"ı","ı");P(W,Z,ve,"ȷ","ȷ");P(Fe,Z,ve,"ı","\\i",!0);P(Fe,Z,ve,"ȷ","\\j",!0);P(Fe,Z,ve,"ß","\\ss",!0);P(Fe,Z,ve,"æ","\\ae",!0);P(Fe,Z,ve,"œ","\\oe",!0);P(Fe,Z,ve,"ø","\\o",!0);P(Fe,Z,ve,"Æ","\\AE",!0);P(Fe,Z,ve,"Œ","\\OE",!0);P(Fe,Z,ve,"Ø","\\O",!0);P(Fe,Z,kr,"ˊ","\\'");P(Fe,Z,kr,"ˋ","\\`");P(Fe,Z,kr,"ˆ","\\^");P(Fe,Z,kr,"˜","\\~");P(Fe,Z,kr,"ˉ","\\=");P(Fe,Z,kr,"˘","\\u");P(Fe,Z,kr,"˙","\\.");P(Fe,Z,kr,"¸","\\c");P(Fe,Z,kr,"˚","\\r");P(Fe,Z,kr,"ˇ","\\v");P(Fe,Z,kr,"¨",'\\"');P(Fe,Z,kr,"˝","\\H");P(Fe,Z,kr,"◯","\\textcircled");var UB={"--":!0,"---":!0,"``":!0,"''":!0};P(Fe,Z,ve,"–","--",!0);P(Fe,Z,ve,"–","\\textendash");P(Fe,Z,ve,"—","---",!0);P(Fe,Z,ve,"—","\\textemdash");P(Fe,Z,ve,"‘","`",!0);P(Fe,Z,ve,"‘","\\textquoteleft");P(Fe,Z,ve,"’","'",!0);P(Fe,Z,ve,"’","\\textquoteright");P(Fe,Z,ve,"“","``",!0);P(Fe,Z,ve,"“","\\textquotedblleft");P(Fe,Z,ve,"”","''",!0);P(Fe,Z,ve,"”","\\textquotedblright");P(W,Z,ve,"°","\\degree",!0);P(Fe,Z,ve,"°","\\degree");P(Fe,Z,ve,"°","\\textdegree",!0);P(W,Z,ve,"£","\\pounds");P(W,Z,ve,"£","\\mathsterling",!0);P(Fe,Z,ve,"£","\\pounds");P(Fe,Z,ve,"£","\\textsterling",!0);P(W,de,ve,"✠","\\maltese");P(Fe,de,ve,"✠","\\maltese");var KT='0123456789/@."';for(var Z2=0;Z2{var n=e.charCodeAt(0),t=e.charCodeAt(1),r=(n-55296)*1024+(t-56320)+65536;if(119808<=r&&r<120484){var s=Math.floor((r-119808)/26);return sj[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return n4t[i]}else{if(r===120485||r===120486)return sj[0];if(120486{if(uu(e.classes)!==uu(n.classes)||e.skew!==n.skew||e.maxFontSize!==n.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var t=e.classes[0];if(t==="mbin"||t==="mord")return!1}for(var r of Object.keys(e.style))if(e.style[r]!==n.style[r])return!1;for(var s of Object.keys(n.style))if(e.style[s]!==n.style[s])return!1;return!0},GB=e=>{for(var n=0;nt&&(t=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>s&&(s=a.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},Ge=function(n,t,r,s){var i=new f_(n,t,r,s);return HS(i),i},du=(e,n,t,r)=>new f_(e,n,t,r),Uh=function(n,t,r){var s=Ge([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=et(s.height),s.maxFontSize=1,s},a4t=function(n,t,r,s){var i=new jb(n,t,r,s);return HS(i),i},nc=function(n){var t=new u_(n);return HS(t),t},Gh=function(n,t){return n instanceof u_?Ge([],[n],t):n},o4t=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,i=s,a=1;a{var t=Ge(["mspace"],[],n),r=Rr(e,n);return t.style.marginRight=et(r),t},Ug=(e,n,t)=>{var r,s;switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return n==="textbf"&&t==="textit"?s="BoldItalic":n==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",r+"-"+s},T3={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},VB={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},KB=function(n,t){var[r,s,i]=VB[n],a=new fu(r),o=new Xl([a],{width:et(s),height:et(i),style:"width:"+et(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=du(["overlay"],[o],t);return l.height=i,l.style.height=et(i),l.style.width=et(s),l},jr={number:3,unit:"mu"},Zu={number:4,unit:"mu"},Tl={number:5,unit:"mu"},l4t={mord:{mop:jr,mbin:Zu,mrel:Tl,minner:jr},mop:{mord:jr,mop:jr,mrel:Tl,minner:jr},mbin:{mord:Zu,mop:Zu,mopen:Zu,minner:Zu},mrel:{mord:Tl,mop:Tl,mopen:Tl,minner:Tl},mopen:{},mclose:{mop:jr,mbin:Zu,mrel:Tl,minner:jr},mpunct:{mord:jr,mop:jr,mrel:Tl,mopen:jr,mclose:jr,mpunct:jr,minner:jr},minner:{mord:jr,mop:jr,mbin:Zu,mrel:Tl,mopen:jr,mpunct:jr,minner:jr}},c4t={mord:{mop:jr},mop:{mord:jr,mop:jr},mbin:{},mrel:{},mopen:{},mclose:{mop:jr},mpunct:{},minner:{mop:jr}},QB={},vv={},bv={};function it(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:n,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:s},l=0;l{var b=S.classes[0],v=x.classes[0];b==="mbin"&&f4t.has(v)?S.classes[0]="mord":v==="mbin"&&u4t.has(b)&&(x.classes[0]="mord")},{node:f},p,m),j3(i,(x,S)=>{var b,v,y=R3(S),w=R3(x),C=y&&w?x.hasClass("mtight")?(b=c4t[y])==null?void 0:b[w]:(v=l4t[y])==null?void 0:v[w]:null;if(C)return WB(C,u)},{node:f},p,m),i},j3=function(n,t,r,s,i){s&&n.push(s);for(var a=0;ap=>{n.splice(f+1,0,p),a++})(a)}s&&n.pop()},YB=function(n){return n instanceof u_||n instanceof jb||n instanceof f_&&n.hasClass("enclosing")?n:null},A3=function(n,t){var r=YB(n);if(r){var s=r.children;if(s.length){if(t==="right")return A3(s[s.length-1],"right");if(t==="left")return A3(s[0],"left")}}return n},R3=function(n,t){if(!n)return null;t&&(n=A3(n,t));var r=n.classes[0];return h4t[r]||null},cp=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Ge(t.concat(r))},Wn=function(n,t,r){if(!n)return Ge();if(vv[n.type]){var s=vv[n.type](n,t);if(r&&t.size!==r.size){s=Ge(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Qe("Got group of unknown type: '"+n.type+"'")};function Gg(e,n){var t=Ge(["base"],e,n),r=Ge(["strut"]);return r.style.height=et(t.height+t.depth),t.depth&&(r.style.verticalAlign=et(-t.depth)),t.children.unshift(r),t}function M3(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=ms(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(Gg(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(Gg(a,n));var u;t?(u=Gg(ms(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var _=Ge(["katex-html"],i);if(_.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=et(_.height+_.depth),_.depth&&(f.style.verticalAlign=et(-_.depth))}return _}function XB(e){return new u_(e)}class Ye{constructor(n,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=n,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(n,t){this.attributes[n]=t}getAttribute(n){return this.attributes[n]}toNode(){var n=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&n.setAttribute(t,this.attributes[t]);this.classes.length>0&&(n.className=uu(this.classes));for(var r=0;r0&&(n+=' class ="'+Ps(uu(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class rs{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return Ps(this.toText())}toText(){return this.text}}class ZB{constructor(n){this.width=void 0,this.character=void 0,this.width=n,n>=.05555&&n<=.05556?this.character=" ":n>=.1666&&n<=.1667?this.character=" ":n>=.2222&&n<=.2223?this.character=" ":n>=.2777&&n<=.2778?this.character="  ":n>=-.05556&&n<=-.05555?this.character=" ⁣":n>=-.1667&&n<=-.1666?this.character=" ⁣":n>=-.2223&&n<=-.2222?this.character=" ⁣":n>=-.2778&&n<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var n=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return n.setAttribute("width",et(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var _4t=new Set(["\\imath","\\jmath"]),p4t=new Set(["mrow","mtable"]),Na=function(n,t,r){return wr[t][n]&&wr[t][n].replace&&n.charCodeAt(0)!==55349&&!(UB.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=wr[t][n].replace),new rs(n)},qS=function(n){return n.length===1?n[0]:new Ye("mrow",n)},m4t={mathit:"italic",boldsymbol:e=>e.type==="textord"?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},US=(e,n)=>{if(e.mode==="text"){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold"}var t=n.font;if(!t||t==="mathnormal")return null;var r=e.mode,s=m4t[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(_4t.has(i))return null;if(wr[r][i]){var a=wr[r][i].replace;a&&(i=a)}var o=T3[t].fontName;return PS(i,o,r)?T3[t].variant:null};function nw(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof rs&&n.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var t=e.children[0];return t instanceof rs&&t.text===","}else return!1}var ea=function(n,t,r){if(n.length===1){var s=ar(n[0],t);return r&&s instanceof Ye&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||nw(a))){var u=l.children[0];u instanceof Ye&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var _=a.children[0];if(_ instanceof rs&&_.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var f=l.children[0];f instanceof rs&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(l),a=l}return i},hu=function(n,t,r){return qS(ea(n,t,r))},ar=function(n,t){if(!n)return new Ye("mrow");if(bv[n.type])return bv[n.type](n,t);throw new Qe("Got group of unknown type: '"+n.type+"'")};function ij(e,n,t,r,s){var i=ea(e,t),a;i.length===1&&i[0]instanceof Ye&&p4t.has(i[0].type)?a=i[0]:a=new Ye("mrow",i);var o=new Ye("annotation",[new rs(n)]);o.setAttribute("encoding","application/x-tex");var l=new Ye("semantics",[a,o]),u=new Ye("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var _=s?"katex":"katex-mathml";return Ge([_],[u])}var g4t=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],aj=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],oj=function(n,t){return t.size<2?n:g4t[n-1][t.size-1]};class Dl{constructor(n){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=n.style,this.color=n.color,this.size=n.size||Dl.BASESIZE,this.textSize=n.textSize||this.size,this.phantom=!!n.phantom,this.font=n.font||"",this.fontFamily=n.fontFamily||"",this.fontWeight=n.fontWeight||"",this.fontShape=n.fontShape||"",this.sizeMultiplier=aj[this.size-1],this.maxSize=n.maxSize,this.minRuleThickness=n.minRuleThickness,this._fontMetrics=void 0}extend(n){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,n),new Dl(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:oj(this.textSize,n)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(n){return this.size===n&&this.textSize===n?this:this.extend({style:this.style.text(),size:n,textSize:n,sizeMultiplier:aj[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=oj(Dl.BASESIZE,n);return this.size===t&&this.textSize===Dl.BASESIZE&&this.style===n?this:this.extend({style:n,size:t})}havingBaseSizing(){var n;switch(this.style.id){case 4:case 5:n=3;break;case 6:case 7:n=1;break;default:n=6}return this.extend({style:this.style.text(),size:n})}withColor(n){return this.extend({color:n})}withPhantom(){return this.extend({phantom:!0})}withFont(n){return this.extend({font:n})}withTextFontFamily(n){return this.extend({fontFamily:n,font:""})}withTextFontWeight(n){return this.extend({fontWeight:n,font:""})}withTextFontShape(n){return this.extend({fontShape:n,font:""})}sizingClasses(n){return n.size!==this.size?["sizing","reset-size"+n.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Dl.BASESIZE?["sizing","reset-size"+this.size,"size"+Dl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=e4t(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Dl.BASESIZE=6;var JB=function(n){return new Dl({style:n.displayMode?Vt.DISPLAY:Vt.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},e$=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Ge(r,[n])}return n},v4t=function(n,t,r){var s=JB(r),i;if(r.output==="mathml")return ij(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=M3(n,s);i=Ge(["katex"],[a])}else{var o=ij(n,t,s,r.displayMode,!1),l=M3(n,s);i=Ge(["katex"],[o,l])}return e$(i,r)},b4t=function(n,t,r){var s=JB(r),i=M3(n,s),a=Ge(["katex"],[i]);return e$(a,r)},y4t={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Mb=function(n){var t=new Ye("mo",[new rs(y4t[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},x4t={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},w4t=new Set(["widehat","widecheck","widetilde","utilde"]),Db=function(n,t){function r(){var o=4e5,l=n.label.slice(1);if(w4t.has(l)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,_,f,p;if(u>5)l==="widehat"||l==="widecheck"?(_=420,o=2364,p=.42,f=l+"4"):(_=312,o=2340,p=.34,f="tilde4");else{var m=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][m],_=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],f=l+m):(o=[0,600,1033,2339,2340][m],_=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],f="tilde"+m)}var x=new fu(f),S=new Xl([x],{width:"100%",height:et(p),viewBox:"0 0 "+o+" "+_,preserveAspectRatio:"none"});return{span:du([],[S],t),minWidth:0,height:p}}else{var b=[],v=x4t[l];if(!v)throw new Error('No SVG data for "'+l+'".');var[y,w,C]=v,N=C/1e3,E=y.length,j,z;if(E===1){if(v.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+l+'".');j=["hide-tail"],z=[v[3]]}else if(E===2)j=["halfarrow-left","halfarrow-right"],z=["xMinYMin","xMaxYMin"];else if(E===3)j=["brace-left","brace-center","brace-right"],z=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+E+" children.");for(var M=0;M0&&(s.style.minWidth=et(i)),s},S4t=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=Ge(["stretchy",t],[],i),t==="fbox"){var l=i.color&&i.getColor();l&&(a.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(t)&&u.push(new S3({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new S3({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var _=new Xl(u,{width:"100%",height:et(o)});a=du([],[_],i)}return a.height=o,a.style.height=et(o),a},k4t={bin:1,close:1,inner:1,open:1,punct:1,rel:1},C4t={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function E4t(e){return e in k4t}function un(e,n){if(!e||e.type!==n)throw new Error("Expected node of type "+n+", but got "+(e?"node of type "+e.type:String(e)));return e}function Lb(e){var n=Ob(e);if(!n)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return n}function Ob(e){return e&&(e.type==="atom"||C4t.hasOwnProperty(e.type))?e:null}var t$=e=>{if(e instanceof Yi)return e;if(Zwt(e)&&e.children.length===1)return t$(e.children[0])},GS=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=un(e.base,"accent"),t=r.base,e.base=t,s=Xwt(Wn(e,n)),e.base=r):(r=un(e,"accent"),t=r.base);var i=Wn(t,n.havingCrampedStyle()),a=r.isShifty&&ec(t),o=0;if(a){var l,u;o=(l=(u=t$(i))==null?void 0:u.skew)!=null?l:0}var _=r.label==="\\c",f=_?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=Db(r,n),p=Un({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+et(2*o)+")",marginLeft:et(2*o)}:void 0}]});else{var m,x;r.label==="\\vec"?(m=KB("vec",n),x=VB.vec[1]):(m=Rb({mode:r.mode,text:r.label},n,"textord"),m=Ywt(m),m.italic=0,x=m.width,_&&(f+=m.depth)),p=Ge(["accent-body"],[m]);var S=r.label==="\\textcircled";S&&(p.classes.push("accent-full"),f=i.height);var b=o;S||(b-=x/2),p.style.left=et(b),r.label==="\\textcircled"&&(p.style.top=".2em"),p=Un({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]})}var v=Ge(["mord","accent"],[p],n);return s?(s.children[0]=v,s.height=Math.max(v.height,s.height),s.classes[0]="mord",s):v},n$=(e,n)=>{var t=e.isStretchy?Mb(e.label):new Ye("mo",[Na(e.label,e.mode)]),r=new Ye("mover",[ar(e.base,n),t]);return r.setAttribute("accent","true"),r},N4t=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));it({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,n)=>{var t=yv(n[0]),r=!N4t.test(e.funcName),s=!r||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:s,base:t}},htmlBuilder:GS,mathmlBuilder:n$});it({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,n)=>{var t=n[0],r=e.parser.mode;return r==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:GS,mathmlBuilder:n$});it({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"accentUnder",mode:t.mode,label:r,base:s}},htmlBuilder:(e,n)=>{var t=Wn(e.base,n),r=Db(e,n),s=e.label==="\\utilde"?.12:0,i=Un({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Ge(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=Mb(e.label),r=new Ye("munder",[ar(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var Wg=e=>{var n=new Ye("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};it({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r,funcName:s}=e;return{type:"xArrow",mode:r.mode,label:s,body:n[0],below:t[0]}},htmlBuilder(e,n){var t=n.style,r=n.havingStyle(t.sup()),s=Gh(Wn(e.body,r,n),n),i=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(i+"-arrow-pad");var a;e.below&&(r=n.havingStyle(t.sub()),a=Gh(Wn(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=Db(e,n),l=-n.fontMetrics().axisHeight+.5*o.height,u=-n.fontMetrics().axisHeight-.5*o.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(u-=s.depth);var _;if(a){var f=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;_=Un({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]},{type:"elem",elem:a,shift:f}]})}else _=Un({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:l,wrapperClasses:["svg-align"]}]});return Ge(["mrel","x-arrow"],[_],n)},mathmlBuilder(e,n){var t=Mb(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=Wg(ar(e.body,n));if(e.below){var i=Wg(ar(e.below,n));r=new Ye("munderover",[t,i,s])}else r=new Ye("mover",[t,s])}else if(e.below){var a=Wg(ar(e.below,n));r=new Ye("munder",[t,a])}else r=Wg(),r=new Ye("mover",[t,r]);return r}});function r$(e,n){var t=ms(e.body,n,!0);return Ge([e.mclass],t,n)}function s$(e,n){var t,r=ea(e.body,n);return e.mclass==="minner"?t=new Ye("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Ye("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Ye("mo",r),e.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):e.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):e.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}it({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"mclass",mode:t.mode,mclass:"m"+r.slice(5),body:ns(s),isCharacterBox:ec(s)}},htmlBuilder:r$,mathmlBuilder:s$});var Ib=e=>{var n=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return n.type==="atom"&&(n.family==="bin"||n.family==="rel")?"m"+n.family:"mord"};it({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:Ib(n[0]),body:ns(n[1]),isCharacterBox:ec(n[1])}}});it({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],i=n[0],a;r!=="\\stackrel"?a=Ib(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ns(s)},l={type:"supsub",mode:i.mode,base:o,sup:r==="\\underset"?null:i,sub:r==="\\underset"?i:null};return{type:"mclass",mode:t.mode,mclass:a,body:[l],isCharacterBox:ec(l)}},htmlBuilder:r$,mathmlBuilder:s$});it({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:Ib(n[0]),body:ns(n[0])}},htmlBuilder(e,n){var t=ms(e.body,n,!0),r=Ge([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=ea(e.body,n),r=new Ye("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var z4t={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},lj=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),cj=e=>e.type==="textord"&&e.text==="@",T4t=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function j4t(e,n,t){var r=z4t[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(r,[n[0]],[n[1]]);case"\\uparrow":case"\\downarrow":{var s=t.callFunction("\\\\cdleft",[n[0]],[]),i={type:"atom",text:r,mode:"math",family:"rel"},a=t.callFunction("\\Big",[i],[]),o=t.callFunction("\\\\cdright",[n[1]],[]),l={type:"ordgroup",mode:"math",body:[s,a,o]};return t.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function A4t(e){var n=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){n.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var t=e.fetch().text;if(t==="&"||t==="\\\\")e.consume();else if(t==="\\end"){n[n.length-1].length===0&&n.pop();break}else throw new Qe("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],i=0;iAV".includes(u))for(var f=0;f<2;f++){for(var p=!0,m=l+1;mAV=|." after @',a[l]);var x=j4t(u,_,e),S={type:"styling",body:[x],mode:"math",style:"display",resetFont:!0};r.push(S),o=lj()}i%2===0?r.push(o):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var b=new Array(s[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:s,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}it({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:n[0]}},htmlBuilder(e,n){var t=n.havingStyle(n.style.sup()),r=Gh(Wn(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=et(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Ye("mrow",[ar(e.label,n)]);return t=new Ye("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ye("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});it({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,n){var{parser:t}=e;return{type:"cdlabelparent",mode:t.mode,fragment:n[0]}},htmlBuilder(e,n){var t=Gh(Wn(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Ye("mrow",[ar(e.fragment,n)])}});it({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=un(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new Qe("\\@char with invalid code point "+i);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:t.mode,text:u}}});var i$=(e,n)=>{var t=ms(e.body,n.withColor(e.color),!1);return nc(t)},a$=(e,n)=>{var t=ea(e.body,n.withColor(e.color)),r=new Ye("mstyle",t);return r.setAttribute("mathcolor",e.color),r};it({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=un(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:ns(s)}},htmlBuilder:i$,mathmlBuilder:a$});it({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=un(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var i=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:i}},htmlBuilder:i$,mathmlBuilder:a$});it({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,n,t){var{parser:r}=e,s=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,i=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:i,size:s&&un(s,"size").value}},htmlBuilder(e,n){var t=Ge(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=et(Rr(e.size,n)))),t},mathmlBuilder(e,n){var t=new Ye("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",et(Rr(e.size,n)))),t}});var D3={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},o$=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Qe("Expected a control sequence",e);return n},R4t=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},l$=(e,n,t,r)=>{var s=e.gullet.macros.get(t.text);s==null&&(t.noexpand=!0,s={tokens:[t],numArgs:0,unexpandable:!e.gullet.isExpandable(t.text)}),e.gullet.macros.set(n,s,r)};it({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:n,funcName:t}=e;n.consumeSpaces();var r=n.fetch();if(D3[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=D3[r.text]),un(n.parseFunction(),"internal");throw new Qe("Invalid token after macro prefix",r)}});it({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=n.gullet.popToken(),s=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new Qe("Expected a control sequence",r);for(var i=0,a,o=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){a=n.gullet.future(),o[i].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Qe('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Qe('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new Qe("Expected a macro definition");o[i].push(r.text)}var{tokens:l}=n.gullet.consumeArg();return a&&l.unshift(a),(t==="\\edef"||t==="\\xdef")&&(l=n.gullet.expandTokens(l),l.reverse()),n.gullet.macros.set(s,{tokens:l,numArgs:i,delimiters:o},t===D3[t]),{type:"internal",mode:n.mode}}});it({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=o$(n.gullet.popToken());n.gullet.consumeSpaces();var s=R4t(n);return l$(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});it({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=o$(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return l$(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var x0=function(n,t,r){var s=wr.math[n]&&wr.math[n].replace,i=PS(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},WS=function(n,t,r,s){var i=r.havingBaseStyle(t),a=Ge(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},c$=function(n,t,r){var s=t.havingBaseStyle(r),i=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=et(i),n.height-=i,n.depth+=i},M4t=function(n,t,r,s,i,a){var o=ei(n,"Main-Regular",i,s),l=WS(o,t,s,a);return c$(l,s,t),l},D4t=function(n,t,r,s){return ei(n,"Size"+t+"-Regular",r,s)},u$=function(n,t,r,s,i,a){var o=D4t(n,t,i,s),l=WS(Ge(["delimsizing","size"+t],[o],s),Vt.TEXT,s,a);return r&&c$(l,s,Vt.TEXT),l},rw=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=Ge(["delimsizinginner",s],[Ge([],[ei(n,t,r)])]);return{type:"elem",elem:i}},sw=function(n,t,r){var s=Ro["Size4-Regular"][n.charCodeAt(0)]?Ro["Size4-Regular"][n.charCodeAt(0)][4]:Ro["Size1-Regular"][n.charCodeAt(0)][4],i=new fu("inner",qwt(n,Math.round(1e3*t))),a=new Xl([i],{width:et(s),height:et(t),style:"width:"+et(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=du([],[a],r);return o.height=t,o.style.height=et(t),o.style.width=et(s),{type:"elem",elem:o}},L3=.008,Vg={type:"kern",size:-1*L3},L4t=new Set(["|","\\lvert","\\rvert","\\vert"]),O4t=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),f$=function(n,t,r,s,i,a){var o,l,u,_,f="",p=0;o=u=_=n,l=null;var m="Size1-Regular";n==="\\uparrow"?u=_="⏐":n==="\\Uparrow"?u=_="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",_="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",_="\\Downarrow"):L4t.has(n)?(u="∣",f="vert",p=333):O4t.has(n)?(u="∥",f="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",_="⎣",m="Size4-Regular",f="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",_="⎦",m="Size4-Regular",f="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",_="⎣",m="Size4-Regular",f="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=_="⎢",m="Size4-Regular",f="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",_="⎦",m="Size4-Regular",f="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=_="⎥",m="Size4-Regular",f="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",_="⎝",m="Size4-Regular",f="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",_="⎠",m="Size4-Regular",f="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",l="⎨",_="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",l="⎬",_="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",_="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",_="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",_="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",_="⎩",u="⎪",m="Size4-Regular");var x=x0(o,m,i),S=x.height+x.depth,b=x0(u,m,i),v=b.height+b.depth,y=x0(_,m,i),w=y.height+y.depth,C=0,N=1;if(l!==null){var E=x0(l,m,i);C=E.height+E.depth,N=2}var j=S+w+C,z=Math.max(0,Math.ceil((t-j)/(N*v))),M=j+z*N*v,O=s.fontMetrics().axisHeight;r&&(O*=s.sizeMultiplier);var B=M/2-O,F=[];if(f.length>0){var U=M-S-w,H=Math.round(M*1e3),Y=Uwt(f,Math.round(U*1e3)),V=new fu(f,Y),X=et(p/1e3),ie=et(H/1e3),I=new Xl([V],{width:X,height:ie,viewBox:"0 0 "+p+" "+H}),L=du([],[I],s);L.height=H/1e3,L.style.width=X,L.style.height=ie,F.push({type:"elem",elem:L})}else{if(F.push(rw(_,m,i)),F.push(Vg),l===null){var $=M-S-w+2*L3;F.push(sw(u,$,s))}else{var q=(M-S-w-C)/2+2*L3;F.push(sw(u,q,s)),F.push(Vg),F.push(rw(l,m,i)),F.push(Vg),F.push(sw(u,q,s))}F.push(Vg),F.push(rw(o,m,i))}var G=s.havingBaseStyle(Vt.TEXT),te=Un({positionType:"bottom",positionData:B,children:F});return WS(Ge(["delimsizing","mult"],[te],G),Vt.TEXT,s,a)},iw=80,aw=.08,ow=function(n,t,r,s,i){var a=Hwt(n,s,r),o=new fu(n,a),l=new Xl([o],{width:"400em",height:et(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return du(["hide-tail"],[l],i)},I4t=function(n,t){var r=t.havingBaseSizing(),s=m$("\\surd",n*r.sizeMultiplier,p$,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,l,u,_,f;return s.type==="small"?(_=1e3+1e3*a+iw,n<1?i=1:n<1.4&&(i=.7),l=(1+a+aw)/i,u=(1+a)/i,o=ow("sqrtMain",l,_,a,t),o.style.minWidth="0.853em",f=.833/i):s.type==="large"?(_=(1e3+iw)*O0[s.size],u=(O0[s.size]+a)/i,l=(O0[s.size]+a+aw)/i,o=ow("sqrtSize"+s.size,l,_,a,t),o.style.minWidth="1.02em",f=1/i):(l=n+a+aw,u=n+a,_=Math.floor(1e3*n+a)+iw,o=ow("sqrtTall",l,_,a,t),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=et(l),{span:o,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},d$=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),B4t=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),h$=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),O0=[0,1.2,1.8,2.4,3],_$=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),d$.has(n)||h$.has(n))return u$(n,t,!1,r,s,i);if(B4t.has(n))return f$(n,O0[t],!1,r,s,i);throw new Qe("Illegal delimiter: '"+n+"'")},$4t=[{type:"small",style:Vt.SCRIPTSCRIPT},{type:"small",style:Vt.SCRIPT},{type:"small",style:Vt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],P4t=[{type:"small",style:Vt.SCRIPTSCRIPT},{type:"small",style:Vt.SCRIPT},{type:"small",style:Vt.TEXT},{type:"stack"}],p$=[{type:"small",style:Vt.SCRIPTSCRIPT},{type:"small",style:Vt.SCRIPT},{type:"small",style:Vt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],F4t=function(n){if(n.type==="small")return"Main-Regular";if(n.type==="large")return"Size"+n.size+"-Regular";if(n.type==="stack")return"Size4-Regular";var t=n.type;throw new Error("Add support for delim type '"+t+"' here.")},m$=function(n,t,r,s){for(var i=Math.min(2,3-s.style.size),a=i;at)return o}return r[r.length-1]},O3=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;h$.has(n)?o=$4t:d$.has(n)?o=p$:o=P4t;var l=m$(n,t,o,s);return l.type==="small"?M4t(n,l.style,r,s,i,a):l.type==="large"?u$(n,l.size,r,s,i,a):f$(n,t,r,s,i,a)},lw=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,l=901,u=5/s.fontMetrics().ptPerEm,_=Math.max(t-o,r+o),f=Math.max(_/500*l,2*_-u);return O3(n,f,!0,s,i,a)},uj={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},H4t=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function fj(e){return"isMiddle"in e}function Bb(e,n){var t=Ob(e);if(t&&H4t.has(t.text))return t;throw t?new Qe("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Qe("Invalid delimiter type '"+e.type+"'",e)}it({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,n)=>{var t=Bb(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:uj[e.funcName].size,mclass:uj[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Ge([e.mclass]):_$(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Na(e.delim,e.mode));var t=new Ye("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=et(O0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function dj(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}it({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=e.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new Qe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Bb(n[0],e).text,color:t}}});it({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=Bb(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=un(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{dj(e);for(var t=ms(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{dj(e);var t=ea(e.body,n);if(e.left!=="."){var r=new Ye("mo",[Na(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Ye("mo",[Na(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return qS(t)}});it({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=Bb(n[0],e);if(!e.parser.leftrightDepth)throw new Qe("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=cp(n,[]):(t=_$(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Na("|","text"):Na(e.delim,e.mode),r=new Ye("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var $b=(e,n)=>{var t=Gh(Wn(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=ec(e.body);if(r==="sout")i=Ge(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var l=Rr({number:.6,unit:"pt"},n),u=Rr({number:.35,unit:"ex"},n),_=n.havingBaseSizing();s=s/_.sizeMultiplier;var f=t.height+t.depth+l+u;t.style.paddingLeft=et(f/2+l);var p=Math.floor(1e3*f*s),m=Pwt(p),x=new Xl([new fu("phase",m)],{width:"400em",height:et(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=du(["hide-tail"],[x],n),i.style.height=et(f),a=t.depth+l+u}else{/cancel/.test(r)?o||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var S,b,v=0;/box/.test(r)?(v=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),S=n.fontMetrics().fboxsep+(r==="colorbox"?0:v),b=S):r==="angl"?(v=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),S=4*v,b=Math.max(0,.25-t.depth)):(S=o?.2:0,b=S),i=S4t(t,r,S,b,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=et(v)):r==="angl"&&v!==.049&&(i.style.borderTopWidth=et(v),i.style.borderRightWidth=et(v)),a=t.depth+b,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var y;if(e.backgroundColor)y=Un({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var w=/cancel|phase/.test(r)?["svg-align"]:[];y=Un({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:w}]})}return/cancel/.test(r)&&(y.height=t.height,y.depth=t.depth),/cancel/.test(r)&&!o?Ge(["mord","cancel-lap"],[y],n):Ge(["mord"],[y],n)},Pb=(e,n)=>{var t,r=new Ye(e.label.includes("colorbox")?"mpadded":"menclose",[ar(e.body,n)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=n.fontMetrics().fboxsep*n.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*t+"pt"),r.setAttribute("height","+"+2*t+"pt"),r.setAttribute("lspace",t+"pt"),r.setAttribute("voffset",t+"pt"),e.label==="\\fcolorbox"){var s=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness);r.setAttribute("style","border: "+et(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};it({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=un(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:$b,mathmlBuilder:Pb});it({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=un(n[0],"color-token").color,a=un(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:$b,mathmlBuilder:Pb});it({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\fbox",body:n[0]}}});it({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:$b,mathmlBuilder:Pb});it({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e;t.mode==="math"&&t.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var s=n[0];return{type:"enclose",mode:t.mode,label:r,body:s}},htmlBuilder:$b,mathmlBuilder:Pb});it({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"enclose",mode:t.mode,label:"\\angl",body:n[0]}}});var g$={};function Qo(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:i,mathmlBuilder:a}=e,o={type:n,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:s},l=0;l{var n=e.parser.settings;if(!n.displayMode)throw new Qe("{"+e.envName+"} can be used only in display mode.")},q4t=new Set(["gather","gather*"]);function VS(e){if(!e.includes("ed"))return!e.includes("*")}function xu(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:l,singleRow:u,emptySingleRow:_,maxNumCols:f,leqno:p}=n;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)a=1;else if(a=parseFloat(m),!a||a<0)throw new Qe("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var x=[],S=[x],b=[],v=[],y=l!=null?[]:void 0;function w(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new Ki("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(w(),v.push(hj(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var E={type:"ordgroup",mode:e.mode,body:N};t&&(E={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[E]}),x.push(E);var j=e.fetch().text;if(j==="&"){if(f&&x.length===f){if(u||o)throw new Qe("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(j==="\\end"){C(),x.length===1&&E.type==="styling"&&E.body.length===1&&E.body[0].type==="ordgroup"&&E.body[0].body.length===0&&(S.length>1||!_)&&S.pop(),v.length0&&(w+=.25),u.push({pos:w,isDashed:Xe[dt]})}for(C(a[0]),r=0;r0&&(B+=y,jXe))for(r=0;r=o)){var ce=void 0;if(s>0||n.hskipBeforeAndAfter){var ee,le;ce=(ee=(le=G)==null?void 0:le.pregap)!=null?ee:p,ce!==0&&(Y=Ge(["arraycolsep"],[]),Y.style.width=et(ce),H.push(Y))}var he=[];for(r=0;r0){for(var Bt=Uh("hline",t,_),Et=Uh("hdashline",t,_),rt=[{type:"elem",elem:It,shift:0}];u.length>0;){var ft=u.pop(),Lt=ft.pos-F;ft.isDashed?rt.push({type:"elem",elem:Et,shift:Lt}):rt.push({type:"elem",elem:Bt,shift:Lt})}It=Un({positionType:"individualShift",children:rt})}if(X.length===0)return Ge(["mord"],[It],t);var we=Un({positionType:"individualShift",children:X}),Ae=Ge(["tag"],[we],t);return nc([It,Ae])},U4t={c:"center ",l:"left ",r:"right "},Xo=function(n,t){for(var r=[],s=new Ye("mtd",[],["mtr-glue"]),i=new Ye("mtd",[],["mml-eqn-num"]),a=0;a0){var x=n.cols,S="",b=!1,v=0,y=x.length;x[0].type==="separator"&&(p+="top ",v=1),x[x.length-1].type==="separator"&&(p+="bottom ",y-=1);for(var w=v;w0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var O=1;O0&&m&&(b=1),r[x]={type:"align",align:S,pregap:b,postgap:0}}return a.colSeparationType=m?"align":"alignat",a};Qo({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=Ob(n[0]),r=t?[n[0]]:un(n[0],"ordgroup").body,s=r.map(function(a){var o=Lb(a),l=o.text;if("lcr".includes(l))return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Qe("Unknown column alignment: "+l,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return xu(e.parser,i,KS(e.envName))},htmlBuilder:Yo,mathmlBuilder:Xo});Qo({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var n={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],t="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(e.envName.charAt(e.envName.length-1)==="*"){var s=e.parser;if(s.consumeSpaces(),s.fetch().text==="["){if(s.consume(),s.consumeSpaces(),t=s.fetch().text,!"lcr".includes(t))throw new Qe("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=xu(e.parser,r,KS(e.envName)),a=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(a).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[i],left:n[0],right:n[1],rightColor:void 0}:i},htmlBuilder:Yo,mathmlBuilder:Xo});Qo({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=xu(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:Yo,mathmlBuilder:Xo});Qo({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=Ob(n[0]),r=t?[n[0]]:un(n[0],"ordgroup").body,s=r.map(function(o){var l=Lb(o),u=l.text;if("lc".includes(u))return{type:"align",align:u};throw new Qe("Unknown column alignment: "+u,o)});if(s.length>1)throw new Qe("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=xu(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new Qe("{subarray} can contain only one column");return a},htmlBuilder:Yo,mathmlBuilder:Xo});Qo({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var n={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=xu(e.parser,n,KS(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Yo,mathmlBuilder:Xo});Qo({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:b$,htmlBuilder:Yo,mathmlBuilder:Xo});Qo({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){q4t.has(e.envName)&&Fb(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:VS(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return xu(e.parser,n,"display")},htmlBuilder:Yo,mathmlBuilder:Xo});Qo({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:b$,htmlBuilder:Yo,mathmlBuilder:Xo});Qo({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Fb(e);var n={autoTag:VS(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return xu(e.parser,n,"display")},htmlBuilder:Yo,mathmlBuilder:Xo});Qo({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Fb(e),A4t(e.parser)},htmlBuilder:Yo,mathmlBuilder:Xo});ae("\\nonumber","\\gdef\\@eqnsw{0}");ae("\\notag","\\nonumber");it({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Qe(e.funcName+" valid only within array environment")}});var _j=g$;it({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];if(s.type!=="ordgroup")throw new Qe("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return Wn(e.body,r)},x$=(e,n)=>{var t=e.font,r=n.withFont(t);return ar(e.body,r)},pj={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};it({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=yv(n[0]),i=r;return i in pj&&(i=pj[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:y$,mathmlBuilder:x$});it({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"mclass",mode:t.mode,mclass:Ib(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:ec(r)}}});it({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r,breakOnTokenText:s}=e,{mode:i}=t,a=t.parseExpression(!0,s);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:a}}},htmlBuilder:y$,mathmlBuilder:x$});var G4t=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=Wn(e.numer,i,n);if(e.continued){var o=8.5/n.fontMetrics().ptPerEm,l=3.5/n.fontMetrics().ptPerEm;a.height=a.height0?x=3*p:x=7*p,S=n.fontMetrics().denom1):(f>0?(m=n.fontMetrics().num2,x=p):(m=n.fontMetrics().num3,x=3*p),S=n.fontMetrics().denom2);var b;if(_){var y=n.fontMetrics().axisHeight;m-a.depth-(y+.5*f){var t=new Ye("mfrac",[ar(e.numer,n),ar(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=Rr(e.barSize,n);t.setAttribute("linethickness",et(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new Ye("mo",[new rs(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new Ye("mo",[new rs(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return qS(s)}return t},w$=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};it({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=n[1],a,o=null,l=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":a=!0;break;case"\\\\atopfrac":a=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":a=!1,o="(",l=")";break;case"\\\\bracefrac":a=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":a=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var u=r==="\\cfrac",_=null;return u||r.startsWith("\\d")?_="display":r.startsWith("\\t")&&(_="text"),w$({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:l,barSize:null},_)},htmlBuilder:G4t,mathmlBuilder:W4t});it({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:n,funcName:t,token:r}=e,s;switch(t){case"\\over":s="\\frac";break;case"\\choose":s="\\binom";break;case"\\atop":s="\\\\atopfrac";break;case"\\brace":s="\\\\bracefrac";break;case"\\brack":s="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:s,token:r}}});var mj=["display","text","script","scriptscript"],gj=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};it({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,n){var{parser:t}=e,r=n[4],s=n[5],i=yv(n[0]),a=i.type==="atom"&&i.family==="open"?gj(i.text):null,o=yv(n[1]),l=o.type==="atom"&&o.family==="close"?gj(o.text):null,u=un(n[2],"size"),_,f=null;u.isBlank?_=!0:(f=u.value,_=f.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var x=un(m.body[0],"textord");p=mj[Number(x.text)]}}else m=un(m,"textord"),p=mj[Number(m.text)];return w$({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:_,barSize:f,leftDelim:a,rightDelim:l},p)}});it({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,n){var{parser:t,funcName:r,token:s}=e;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:un(n[0],"size").value,token:s}}});it({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=un(n[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var a=n[2],o=i.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var S$=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?Wn(e.sup,n.havingStyle(t.sup()),n):Wn(e.sub,n.havingStyle(t.sub()),n),s=un(e.base,"horizBrace")):s=un(e,"horizBrace");var i=Wn(s.base,n.havingBaseStyle(Vt.DISPLAY)),a=Db(s,n),o;if(s.isOver?o=Un({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=Un({positionType:"bottom",positionData:i.depth+.1+a.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),r){var l=Ge(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=Un({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=Un({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Ge(["minner",s.isOver?"mover":"munder"],[o],n)},V4t=(e,n)=>{var t=Mb(e.label);return new Ye(e.isOver?"mover":"munder",[ar(e.base,n),t])};it({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,n){var{parser:t,funcName:r}=e;return{type:"horizBrace",mode:t.mode,label:r,isOver:r.includes("\\over"),base:n[0]}},htmlBuilder:S$,mathmlBuilder:V4t});it({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=un(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:ns(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=ms(e.body,n,!1);return a4t(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=hu(e.body,n);return t instanceof Ye||(t=new Ye("mrow",[t])),t.setAttribute("href",e.href),t}});it({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=un(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],i=0;i{var{parser:t,funcName:r,token:s}=e,i=un(n[0],"raw").string,a=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(r){case"\\htmlClass":l.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),_=0;_{var t=ms(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Ge(r,t,n);for(var i in e.attributes)i!=="class"&&e.attributes.hasOwnProperty(i)&&s.setAttribute(i,e.attributes[i]);return s},mathmlBuilder:(e,n)=>hu(e.body,n)});it({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"htmlmathml",mode:t.mode,html:ns(n[0]),mathml:ns(n[1])}},htmlBuilder:(e,n)=>{var t=ms(e.html,n,!1);return nc(t)},mathmlBuilder:(e,n)=>hu(e.mathml,n)});var cw=function(n){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(n))return{number:+n,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n);if(!t)throw new Qe("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!PB(r))throw new Qe("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};it({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,n,t)=>{var{parser:r}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},o="";if(t[0])for(var l=un(t[0],"raw").string,u=l.split(","),_=0;_{var t=Rr(e.height,n),r=0;e.totalheight.number>0&&(r=Rr(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=Rr(e.width,n));var i={height:et(t+r)};s>0&&(i.width=et(s)),r>0&&(i.verticalAlign=et(-r));var a=new Kwt(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new Ye("mglyph",[]);t.setAttribute("alt",e.alt);var r=Rr(e.height,n),s=0;if(e.totalheight.number>0&&(s=Rr(e.totalheight,n)-r,t.setAttribute("valign",et(-s))),t.setAttribute("height",et(r+s)),e.width.number>0){var i=Rr(e.width,n);t.setAttribute("width",et(i))}return t.setAttribute("src",e.src),t}});it({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=un(n[0],"size");if(t.settings.strict){var i=r[1]==="m",a=s.value.unit==="mu";i?(a||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+s.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):a&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:s.value}},htmlBuilder(e,n){return WB(e.dimension,n)},mathmlBuilder(e,n){var t=Rr(e.dimension,n);return new ZB(t)}});it({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:s}},htmlBuilder:(e,n)=>{var t;e.alignment==="clap"?(t=Ge([],[Wn(e.body,n)]),t=Ge(["inner"],[t],n)):t=Ge(["inner"],[Wn(e.body,n)]);var r=Ge(["fix"],[]),s=Ge([e.alignment],[t,r],n),i=Ge(["strut"]);return i.style.height=et(s.height+s.depth),s.depth&&(i.style.verticalAlign=et(-s.depth)),s.children.unshift(i),s=Ge(["thinbox"],[s],n),Ge(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Ye("mpadded",[ar(e.body,n)]);if(e.alignment!=="rlap"){var r=e.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",r+"width")}return t.setAttribute("width","0px"),t}});it({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){var{funcName:t,parser:r}=e,s=r.mode;r.switchMode("math");var i=t==="\\("?"\\)":"$",a=r.parseExpression(!1,i);return r.expect(i),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:a}}});it({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Qe("Mismatched "+e.funcName)}});var vj=(e,n)=>{switch(n.style.size){case Vt.DISPLAY.size:return e.display;case Vt.TEXT.size:return e.text;case Vt.SCRIPT.size:return e.script;case Vt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};it({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:ns(n[0]),text:ns(n[1]),script:ns(n[2]),scriptscript:ns(n[3])}},htmlBuilder:(e,n)=>{var t=vj(e,n),r=ms(t,n,!1);return nc(r)},mathmlBuilder:(e,n)=>{var t=vj(e,n);return hu(t,n)}});var k$=(e,n,t,r,s,i,a)=>{e=Ge([],[e]);var o=t&&ec(t),l,u;if(n){var _=Wn(n,r.havingStyle(s.sup()),r);u={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-_.depth)}}if(t){var f=Wn(t,r.havingStyle(s.sub()),r);l={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var p;if(u&&l){var m=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+a;p=Un({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:et(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:et(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(l){var x=e.height-a;p=Un({positionType:"top",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:et(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]})}else if(u){var S=e.depth+a;p=Un({positionType:"bottom",positionData:S,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:et(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var b=[p];if(l&&i!==0&&!o){var v=Ge(["mspace"],[],r);v.style.marginRight=et(i),b.unshift(v)}return Ge(["mop","op-limits"],b,r)},C$=new Set(["\\smallint"]),h_=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=un(e.base,"op"),s=!0):i=un(e,"op");var a=n.style,o=!1;a.size===Vt.DISPLAY.size&&i.symbol&&!C$.has(i.name)&&(o=!0);var l,u;if(i.symbol){var _=o?"Size2-Regular":"Size1-Regular",f="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(f=i.name.slice(1),i.name=f==="oiint"?"\\iint":"\\iiint"),l=ei(i.name,_,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=l.italic,f.length>0){var p=KB(f+"Size"+(o?"2":"1"),n);l=Un({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+f,l.classes.unshift("mop"),l.italic=u}}else if(i.body){var m=ms(i.body,n,!0);m.length===1&&m[0]instanceof Yi?(l=m[0],l.classes[0]="mop"):l=Ge(["mop"],m,n)}else{for(var x=[],S=1;S{var t;if(e.symbol)t=new Ye("mo",[Na(e.name,e.mode)]),C$.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Ye("mo",ea(e.body,n));else{t=new Ye("mi",[new rs(e.name.slice(1))]);var r=new Ye("mo",[Na("⁡","text")]);e.parentIsSupSub?t=new Ye("mrow",[t,r]):t=XB([t,r])}return t},K4t={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};it({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=r;return s.length===1&&(s=K4t[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:h_,mathmlBuilder:sm});it({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ns(r)}},htmlBuilder:h_,mathmlBuilder:sm});var Q4t={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};it({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:h_,mathmlBuilder:sm});it({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:n,funcName:t}=e;return{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:h_,mathmlBuilder:sm});it({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:n,funcName:t}=e,r=t;return r.length===1&&(r=Q4t[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:h_,mathmlBuilder:sm});var E$=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=un(e.base,"operatorname"),s=!0):i=un(e,"operatorname");var a;if(i.body.length>0){for(var o=i.body.map(f=>{var p="text"in f?f.text:void 0;return typeof p=="string"?{type:"textord",mode:f.mode,text:p}:f}),l=ms(o,n.withFont("mathrm"),!0),u=0;u{for(var t=ea(e.body,n.withFont("mathrm")),r=!0,s=0;s_.toText()).join("");t=[new rs(o)]}var l=new Ye("mi",t);l.setAttribute("mathvariant","normal");var u=new Ye("mo",[Na("⁡","text")]);return e.parentIsSupSub?new Ye("mrow",[l,u]):XB([l,u])};it({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0];return{type:"operatorname",mode:t.mode,body:ns(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:E$,mathmlBuilder:Y4t});ae("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");ed({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?nc(ms(e.body,n,!1)):Ge(["mord"],ms(e.body,n,!0),n)},mathmlBuilder(e,n){return hu(e.body,n,!0)}});it({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,n){var{parser:t}=e,r=n[0];return{type:"overline",mode:t.mode,body:r}},htmlBuilder(e,n){var t=Wn(e.body,n.havingCrampedStyle()),r=Uh("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=Un({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Ge(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new Ye("mo",[new rs("‾")]);t.setAttribute("stretchy","true");var r=new Ye("mover",[ar(e.body,n),t]);return r.setAttribute("accent","true"),r}});it({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"phantom",mode:t.mode,body:ns(r)}},htmlBuilder:(e,n)=>{var t=ms(e.body,n.withPhantom(),!1);return nc(t)},mathmlBuilder:(e,n)=>{var t=ea(e.body,n);return new Ye("mphantom",t)}});ae("\\hphantom","\\smash{\\phantom{#1}}");it({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[0];return{type:"vphantom",mode:t.mode,body:r}},htmlBuilder:(e,n)=>{var t=Ge(["inner"],[Wn(e.body,n.withPhantom())]),r=Ge(["fix"],[]);return Ge(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=ea(ns(e.body),n),r=new Ye("mphantom",t),s=new Ye("mpadded",[r]);return s.setAttribute("width","0px"),s}});it({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=un(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=Wn(e.body,n),r=Rr(e.dy,n);return Un({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ye("mpadded",[ar(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});it({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});it({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,n,t){var{parser:r}=e,s=t[0],i=un(n[0],"size"),a=un(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&un(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=Ge(["mord","rule"],[],n),r=Rr(e.width,n),s=Rr(e.height,n),i=e.shift?Rr(e.shift,n):0;return t.style.borderRightWidth=et(r),t.style.borderTopWidth=et(s),t.style.bottom=et(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=Rr(e.width,n),r=Rr(e.height,n),s=e.shift?Rr(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new Ye("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",et(t)),a.setAttribute("height",et(r));var o=new Ye("mpadded",[a]);return s>=0?o.setAttribute("height",et(s)):(o.setAttribute("height",et(s)),o.setAttribute("depth",et(-s))),o.setAttribute("voffset",et(s)),o}});function N$(e,n,t){for(var r=ms(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return N$(e.body,t,n)};it({type:"sizing",names:bj,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:bj.indexOf(r)+1,body:i}},htmlBuilder:X4t,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=ea(e.body,t),s=new Ye("mstyle",r);return s.setAttribute("mathsize",et(t.sizeMultiplier)),s}});it({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,i=!1,a=t[0]&&un(t[0],"ordgroup");if(a)for(var o,l=0;l{var t=Ge([],[Wn(e.body,n)]);if(!e.smashHeight&&!e.smashDepth)return t;if(e.smashHeight&&(t.height=0),e.smashDepth&&(t.depth=0),e.smashHeight&&e.smashDepth)return Ge(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Ye("mpadded",[ar(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});it({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],i=n[0];return{type:"sqrt",mode:r.mode,body:i,index:s}},htmlBuilder(e,n){var t=Wn(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=Gh(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,i=s;n.style.idt.height+t.depth+a&&(a=(a+f-t.height-t.depth)/2);var p=l.height-t.height-a-u;t.style.paddingLeft=et(_);var m=Un({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+p)},{type:"elem",elem:l},{type:"kern",size:u}]});if(e.index){var x=n.havingStyle(Vt.SCRIPTSCRIPT),S=Wn(e.index,x,n),b=.6*(m.height-m.depth),v=Un({positionType:"shift",positionData:-b,children:[{type:"elem",elem:S}]}),y=Ge(["root"],[v]);return Ge(["mord","sqrt"],[y,m],n)}else return Ge(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Ye("mroot",[ar(t,n),ar(r,n)]):new Ye("msqrt",[ar(t,n)])}});var I3={display:Vt.DISPLAY,text:Vt.TEXT,script:Vt.SCRIPT,scriptscript:Vt.SCRIPTSCRIPT};function Z4t(e){return e in I3}it({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,n){var{breakOnTokenText:t,funcName:r,parser:s}=e,i=s.parseExpression(!0,t),a=r.slice(1,r.length-5);if(!Z4t(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=I3[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),N$(e.body,r,n)},mathmlBuilder(e,n){var t=I3[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=ea(e.body,r),i=new Ye("mstyle",s),a={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=a[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var J4t=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===Vt.DISPLAY.size||r.alwaysHandleSupSub);return s?h_:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===Vt.DISPLAY.size||r.limits);return i?E$:null}else{if(r.type==="accent")return ec(r.base)?GS:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?S$:null}else return null}else return null};ed({type:"supsub",htmlBuilder(e,n){var t=J4t(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=Wn(r,n),o,l,u=n.fontMetrics(),_=0,f=0,p=r&&ec(r);if(s){var m=n.havingStyle(n.style.sup());o=Wn(s,m,n),p||(_=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var x=n.havingStyle(n.style.sub());l=Wn(i,x,n),p||(f=a.depth+x.fontMetrics().subDrop*x.sizeMultiplier/n.sizeMultiplier)}var S;n.style===Vt.DISPLAY?S=u.sup1:n.style.cramped?S=u.sup3:S=u.sup2;var b=n.sizeMultiplier,v=et(.5/u.ptPerEm/b),y=null;if(l){var w=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof Yi||w){var C;y=et(-((C=a.italic)!=null?C:0))}}var N;if(o&&l){_=Math.max(_,S,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var E=u.defaultRuleThickness,j=4*E;if(_-o.depth-(l.height-f)0&&(_+=z,f-=z)}var M=[{type:"elem",elem:l,shift:f,marginRight:v,marginLeft:y},{type:"elem",elem:o,shift:-_,marginRight:v}];N=Un({positionType:"individualShift",children:M})}else if(l){f=Math.max(f,u.sub1,l.height-.8*u.xHeight);var O=[{type:"elem",elem:l,marginLeft:y,marginRight:v}];N=Un({positionType:"shift",positionData:f,children:O})}else if(o)_=Math.max(_,S,o.depth+.25*u.xHeight),N=Un({positionType:"shift",positionData:-_,children:[{type:"elem",elem:o,marginRight:v}]});else throw new Error("supsub must have either sup or sub.");var B=R3(a,"right")||"mord";return Ge([B],[a,Ge(["msupsub"],[N])],n)},mathmlBuilder(e,n){var t=!1,r,s;e.base&&e.base.type==="horizBrace"&&(s=!!e.sup,s===e.base.isOver&&(t=!0,r=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var i=[ar(e.base,n)];e.sub&&i.push(ar(e.sub,n)),e.sup&&i.push(ar(e.sup,n));var a;if(t)a=r?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&n.style===Vt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===Vt.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(n.style===Vt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||n.style===Vt.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===Vt.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===Vt.DISPLAY)?a="mover":a="msup"}return new Ye(a,i)}});ed({type:"atom",htmlBuilder(e,n){return FS(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Ye("mo",[Na(e.text,e.mode)]);if(e.family==="bin"){var r=US(e,n);r==="bold-italic"&&t.setAttribute("mathvariant",r)}else e.family==="punct"?t.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&t.setAttribute("stretchy","false");return t}});var z$={mi:"italic",mn:"normal",mtext:"normal"};ed({type:"mathord",htmlBuilder(e,n){return Rb(e,n,"mathord")},mathmlBuilder(e,n){var t=new Ye("mi",[Na(e.text,e.mode,n)]),r=US(e,n)||"italic";return r!==z$[t.type]&&t.setAttribute("mathvariant",r),t}});ed({type:"textord",htmlBuilder(e,n){return Rb(e,n,"textord")},mathmlBuilder(e,n){var t=Na(e.text,e.mode,n),r=US(e,n)||"normal",s;return e.mode==="text"?s=new Ye("mtext",[t]):/[0-9]/.test(e.text)?s=new Ye("mn",[t]):e.text==="\\prime"?s=new Ye("mo",[t]):s=new Ye("mi",[t]),r!==z$[s.type]&&s.setAttribute("mathvariant",r),s}});var uw={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},fw={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ed({type:"spacing",htmlBuilder(e,n){if(fw.hasOwnProperty(e.text)){var t=fw[e.text].className||"";if(e.mode==="text"){var r=Rb(e,n,"textord");return r.classes.push(t),r}else return Ge(["mspace",t],[FS(e.text,e.mode,n)],n)}else{if(uw.hasOwnProperty(e.text))return Ge(["mspace",uw[e.text]],[],n);throw new Qe('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(fw.hasOwnProperty(e.text))t=new Ye("mtext",[new rs(" ")]);else{if(uw.hasOwnProperty(e.text))return new Ye("mspace");throw new Qe('Unknown type of space "'+e.text+'"')}return t}});var yj=()=>{var e=new Ye("mtd",[]);return e.setAttribute("width","50%"),e};ed({type:"tag",mathmlBuilder(e,n){var t=new Ye("mtable",[new Ye("mtr",[yj(),new Ye("mtd",[hu(e.body,n)]),yj(),new Ye("mtd",[hu(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var xj={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},wj={"\\textbf":"textbf","\\textmd":"textmd"},e3t={"\\textit":"textit","\\textup":"textup"},Sj=(e,n)=>{var t=e.font;if(t){if(xj[t])return n.withTextFontFamily(xj[t]);if(wj[t])return n.withTextFontWeight(wj[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(e3t[t])};it({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,n){var{parser:t,funcName:r}=e,s=n[0];return{type:"text",mode:t.mode,body:ns(s),font:r}},htmlBuilder(e,n){var t=Sj(e,n),r=ms(e.body,t,!0);return Ge(["mord","text"],r,t)},mathmlBuilder(e,n){var t=Sj(e,n);return hu(e.body,t)}});it({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"underline",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=Wn(e.body,n),r=Uh("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=Un({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Ge(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new Ye("mo",[new rs("‾")]);t.setAttribute("stretchy","true");var r=new Ye("munder",[ar(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});it({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,n){var{parser:t}=e;return{type:"vcenter",mode:t.mode,body:n[0]}},htmlBuilder(e,n){var t=Wn(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return Un({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ye("mpadded",[ar(e.body,n)],["vcenter"]);return new Ye("mrow",[t])}});it({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Qe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=kj(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),nu=QB,T$=`[ \r + ]`,t3t="\\\\[a-zA-Z@]+",n3t="\\\\[^\uD800-\uDFFF]",r3t="("+t3t+")"+T$+"*",s3t=`\\\\( +|[ \r ]+ +?)[ \r ]*`,B3="[̀-ͯ]",i3t=new RegExp(B3+"+$"),a3t="("+T$+"+)|"+(s3t+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(B3+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(B3+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+r3t)+("|"+n3t+")");class Cj{constructor(n,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=n,this.settings=t,this.tokenRegex=new RegExp(a3t,"g"),this.catcodes={"%":14,"~":13}}setCatcode(n,t){this.catcodes[n]=t}lex(){var n=this.input,t=this.tokenRegex.lastIndex;if(t===n.length)return new Ki("EOF",new yi(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Qe("Unexpected character: '"+n[t]+"'",new Ki(n[t],new yi(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var i=n.indexOf(` +`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=n.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new Ki(s,new yi(this,t,this.tokenRegex.lastIndex))}}class o3t{constructor(n,t){n===void 0&&(n={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=n,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Qe("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var n=this.undefStack.pop();for(var t in n)n.hasOwnProperty(t)&&(n[t]==null?delete this.current[t]:this.current[t]=n[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(n){return this.current.hasOwnProperty(n)||this.builtins.hasOwnProperty(n)}get(n){return this.current.hasOwnProperty(n)?this.current[n]:this.builtins[n]}set(n,t,r){if(r===void 0&&(r=!1),r){for(var s=0;s0&&(this.undefStack[this.undefStack.length-1][n]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(n)&&(i[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var l3t=v$;ae("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ae("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ae("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ae("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ae("\\@ifnextchar",function(e){var n=e.consumeArgs(3);e.consumeSpaces();var t=e.future();return n[0].length===1&&n[0][0].text===t.text?{tokens:n[1],numArgs:0}:{tokens:n[2],numArgs:0}});ae("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ae("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var Ej={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ae("\\char",function(e){var n=e.popToken(),t,r=0;if(n.text==="'")t=8,n=e.popToken();else if(n.text==='"')t=16,n=e.popToken();else if(n.text==="`")if(n=e.popToken(),n.text[0]==="\\")r=n.text.charCodeAt(1);else{if(n.text==="EOF")throw new Qe("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=Ej[n.text],r==null||r>=t)throw new Qe("Invalid base-"+t+" digit "+n.text);for(var s;(s=Ej[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Qe("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new Qe("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new Qe("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Qe("Invalid number of arguments: "+l);o=parseInt(l),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};ae("\\newcommand",e=>QS(e,!1,!0,!1));ae("\\renewcommand",e=>QS(e,!0,!1,!1));ae("\\providecommand",e=>QS(e,!0,!0,!0));ae("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ae("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ae("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),nu[t],wr.math[t],wr.text[t]),""});ae("\\bgroup","{");ae("\\egroup","}");ae("~","\\nobreakspace");ae("\\lq","`");ae("\\rq","'");ae("\\aa","\\r a");ae("\\AA","\\r A");ae("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ae("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ae("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ae("ℬ","\\mathscr{B}");ae("ℰ","\\mathscr{E}");ae("ℱ","\\mathscr{F}");ae("ℋ","\\mathscr{H}");ae("ℐ","\\mathscr{I}");ae("ℒ","\\mathscr{L}");ae("ℳ","\\mathscr{M}");ae("ℛ","\\mathscr{R}");ae("ℭ","\\mathfrak{C}");ae("ℌ","\\mathfrak{H}");ae("ℨ","\\mathfrak{Z}");ae("\\Bbbk","\\Bbb{k}");ae("\\llap","\\mathllap{\\textrm{#1}}");ae("\\rlap","\\mathrlap{\\textrm{#1}}");ae("\\clap","\\mathclap{\\textrm{#1}}");ae("\\mathstrut","\\vphantom{(}");ae("\\underbar","\\underline{\\text{#1}}");ae("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ae("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ae("\\ne","\\neq");ae("≠","\\neq");ae("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ae("∉","\\notin");ae("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ae("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ae("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ae("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ae("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ae("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ae("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ae("⟂","\\perp");ae("‼","\\mathclose{!\\mkern-0.8mu!}");ae("∌","\\notni");ae("⌜","\\ulcorner");ae("⌝","\\urcorner");ae("⌞","\\llcorner");ae("⌟","\\lrcorner");ae("©","\\copyright");ae("®","\\textregistered");ae("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ae("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ae("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ae("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ae("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ae("⋮","\\vdots");ae("\\varGamma","\\mathit{\\Gamma}");ae("\\varDelta","\\mathit{\\Delta}");ae("\\varTheta","\\mathit{\\Theta}");ae("\\varLambda","\\mathit{\\Lambda}");ae("\\varXi","\\mathit{\\Xi}");ae("\\varPi","\\mathit{\\Pi}");ae("\\varSigma","\\mathit{\\Sigma}");ae("\\varUpsilon","\\mathit{\\Upsilon}");ae("\\varPhi","\\mathit{\\Phi}");ae("\\varPsi","\\mathit{\\Psi}");ae("\\varOmega","\\mathit{\\Omega}");ae("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ae("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ae("\\boxed","\\fbox{$\\displaystyle{#1}$}");ae("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ae("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ae("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ae("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ae("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Nj={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},c3t=new Set(["bin","rel"]);ae("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in Nj?n=Nj[t]:(t.slice(0,4)==="\\not"||t in wr.math&&c3t.has(wr.math[t].group))&&(n="\\dotsb"),n});var YS={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};ae("\\dotso",function(e){var n=e.future().text;return n in YS?"\\ldots\\,":"\\ldots"});ae("\\dotsc",function(e){var n=e.future().text;return n in YS&&n!==","?"\\ldots\\,":"\\ldots"});ae("\\cdots",function(e){var n=e.future().text;return n in YS?"\\@cdots\\,":"\\@cdots"});ae("\\dotsb","\\cdots");ae("\\dotsm","\\cdots");ae("\\dotsi","\\!\\cdots");ae("\\dotsx","\\ldots\\,");ae("\\DOTSI","\\relax");ae("\\DOTSB","\\relax");ae("\\DOTSX","\\relax");ae("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ae("\\,","\\tmspace+{3mu}{.1667em}");ae("\\thinspace","\\,");ae("\\>","\\mskip{4mu}");ae("\\:","\\tmspace+{4mu}{.2222em}");ae("\\medspace","\\:");ae("\\;","\\tmspace+{5mu}{.2777em}");ae("\\thickspace","\\;");ae("\\!","\\tmspace-{3mu}{.1667em}");ae("\\negthinspace","\\!");ae("\\negmedspace","\\tmspace-{4mu}{.2222em}");ae("\\negthickspace","\\tmspace-{5mu}{.277em}");ae("\\enspace","\\kern.5em ");ae("\\enskip","\\hskip.5em\\relax");ae("\\quad","\\hskip1em\\relax");ae("\\qquad","\\hskip2em\\relax");ae("\\tag","\\@ifstar\\tag@literal\\tag@paren");ae("\\tag@paren","\\tag@literal{({#1})}");ae("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Qe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ae("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ae("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ae("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ae("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ae("\\newline","\\\\\\relax");ae("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var j$=et(Ro["Main-Regular"][84][1]-.7*Ro["Main-Regular"][65][1]);ae("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+j$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ae("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+j$+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ae("\\hspace","\\@ifstar\\@hspacer\\@hspace");ae("\\@hspace","\\hskip #1\\relax");ae("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ae("\\ordinarycolon",":");ae("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ae("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ae("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ae("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ae("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ae("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ae("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ae("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ae("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ae("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ae("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ae("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ae("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ae("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ae("∷","\\dblcolon");ae("∹","\\eqcolon");ae("≔","\\coloneqq");ae("≕","\\eqqcolon");ae("⩴","\\Coloneqq");ae("\\ratio","\\vcentcolon");ae("\\coloncolon","\\dblcolon");ae("\\colonequals","\\coloneqq");ae("\\coloncolonequals","\\Coloneqq");ae("\\equalscolon","\\eqqcolon");ae("\\equalscoloncolon","\\Eqqcolon");ae("\\colonminus","\\coloneq");ae("\\coloncolonminus","\\Coloneq");ae("\\minuscolon","\\eqcolon");ae("\\minuscoloncolon","\\Eqcolon");ae("\\coloncolonapprox","\\Colonapprox");ae("\\coloncolonsim","\\Colonsim");ae("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ae("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ae("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ae("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ae("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ae("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ae("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ae("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ae("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ae("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ae("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ae("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ae("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ae("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ae("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ae("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ae("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ae("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ae("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ae("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ae("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ae("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ae("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ae("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ae("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ae("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ae("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ae("\\imath","\\html@mathml{\\@imath}{ı}");ae("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ae("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ae("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ae("⟦","\\llbracket");ae("⟧","\\rrbracket");ae("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ae("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ae("⦃","\\lBrace");ae("⦄","\\rBrace");ae("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ae("⦵","\\minuso");ae("\\darr","\\downarrow");ae("\\dArr","\\Downarrow");ae("\\Darr","\\Downarrow");ae("\\lang","\\langle");ae("\\rang","\\rangle");ae("\\uarr","\\uparrow");ae("\\uArr","\\Uparrow");ae("\\Uarr","\\Uparrow");ae("\\N","\\mathbb{N}");ae("\\R","\\mathbb{R}");ae("\\Z","\\mathbb{Z}");ae("\\alef","\\aleph");ae("\\alefsym","\\aleph");ae("\\Alpha","\\mathrm{A}");ae("\\Beta","\\mathrm{B}");ae("\\bull","\\bullet");ae("\\Chi","\\mathrm{X}");ae("\\clubs","\\clubsuit");ae("\\cnums","\\mathbb{C}");ae("\\Complex","\\mathbb{C}");ae("\\Dagger","\\ddagger");ae("\\diamonds","\\diamondsuit");ae("\\empty","\\emptyset");ae("\\Epsilon","\\mathrm{E}");ae("\\Eta","\\mathrm{H}");ae("\\exist","\\exists");ae("\\harr","\\leftrightarrow");ae("\\hArr","\\Leftrightarrow");ae("\\Harr","\\Leftrightarrow");ae("\\hearts","\\heartsuit");ae("\\image","\\Im");ae("\\infin","\\infty");ae("\\Iota","\\mathrm{I}");ae("\\isin","\\in");ae("\\Kappa","\\mathrm{K}");ae("\\larr","\\leftarrow");ae("\\lArr","\\Leftarrow");ae("\\Larr","\\Leftarrow");ae("\\lrarr","\\leftrightarrow");ae("\\lrArr","\\Leftrightarrow");ae("\\Lrarr","\\Leftrightarrow");ae("\\Mu","\\mathrm{M}");ae("\\natnums","\\mathbb{N}");ae("\\Nu","\\mathrm{N}");ae("\\Omicron","\\mathrm{O}");ae("\\plusmn","\\pm");ae("\\rarr","\\rightarrow");ae("\\rArr","\\Rightarrow");ae("\\Rarr","\\Rightarrow");ae("\\real","\\Re");ae("\\reals","\\mathbb{R}");ae("\\Reals","\\mathbb{R}");ae("\\Rho","\\mathrm{P}");ae("\\sdot","\\cdot");ae("\\sect","\\S");ae("\\spades","\\spadesuit");ae("\\sub","\\subset");ae("\\sube","\\subseteq");ae("\\supe","\\supseteq");ae("\\Tau","\\mathrm{T}");ae("\\thetasym","\\vartheta");ae("\\weierp","\\wp");ae("\\Zeta","\\mathrm{Z}");ae("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ae("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ae("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ae("\\bra","\\mathinner{\\langle{#1}|}");ae("\\ket","\\mathinner{|{#1}\\rangle}");ae("\\braket","\\mathinner{\\langle{#1}\\rangle}");ae("\\Bra","\\left\\langle#1\\right|");ae("\\Ket","\\left|#1\\right\\rangle");var A$=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,i=n.consumeArg().tokens,a=n.macros.get("|"),o=n.macros.get("\\|");n.macros.beginGroup();var l=f=>p=>{e&&(p.macros.set("|",a),s.length&&p.macros.set("\\|",o));var m=f;if(!f&&s.length){var x=p.future();x.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?s:r,numArgs:0}};n.macros.set("|",l(!1)),s.length&&n.macros.set("\\|",l(!0));var u=n.consumeArg().tokens,_=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:_.reverse(),numArgs:0}};ae("\\bra@ket",A$(!1));ae("\\bra@set",A$(!0));ae("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ae("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ae("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ae("\\angln","{\\angl n}");ae("\\blue","\\textcolor{##6495ed}{#1}");ae("\\orange","\\textcolor{##ffa500}{#1}");ae("\\pink","\\textcolor{##ff00af}{#1}");ae("\\red","\\textcolor{##df0030}{#1}");ae("\\green","\\textcolor{##28ae7b}{#1}");ae("\\gray","\\textcolor{gray}{#1}");ae("\\purple","\\textcolor{##9d38bd}{#1}");ae("\\blueA","\\textcolor{##ccfaff}{#1}");ae("\\blueB","\\textcolor{##80f6ff}{#1}");ae("\\blueC","\\textcolor{##63d9ea}{#1}");ae("\\blueD","\\textcolor{##11accd}{#1}");ae("\\blueE","\\textcolor{##0c7f99}{#1}");ae("\\tealA","\\textcolor{##94fff5}{#1}");ae("\\tealB","\\textcolor{##26edd5}{#1}");ae("\\tealC","\\textcolor{##01d1c1}{#1}");ae("\\tealD","\\textcolor{##01a995}{#1}");ae("\\tealE","\\textcolor{##208170}{#1}");ae("\\greenA","\\textcolor{##b6ffb0}{#1}");ae("\\greenB","\\textcolor{##8af281}{#1}");ae("\\greenC","\\textcolor{##74cf70}{#1}");ae("\\greenD","\\textcolor{##1fab54}{#1}");ae("\\greenE","\\textcolor{##0d923f}{#1}");ae("\\goldA","\\textcolor{##ffd0a9}{#1}");ae("\\goldB","\\textcolor{##ffbb71}{#1}");ae("\\goldC","\\textcolor{##ff9c39}{#1}");ae("\\goldD","\\textcolor{##e07d10}{#1}");ae("\\goldE","\\textcolor{##a75a05}{#1}");ae("\\redA","\\textcolor{##fca9a9}{#1}");ae("\\redB","\\textcolor{##ff8482}{#1}");ae("\\redC","\\textcolor{##f9685d}{#1}");ae("\\redD","\\textcolor{##e84d39}{#1}");ae("\\redE","\\textcolor{##bc2612}{#1}");ae("\\maroonA","\\textcolor{##ffbde0}{#1}");ae("\\maroonB","\\textcolor{##ff92c6}{#1}");ae("\\maroonC","\\textcolor{##ed5fa6}{#1}");ae("\\maroonD","\\textcolor{##ca337c}{#1}");ae("\\maroonE","\\textcolor{##9e034e}{#1}");ae("\\purpleA","\\textcolor{##ddd7ff}{#1}");ae("\\purpleB","\\textcolor{##c6b9fc}{#1}");ae("\\purpleC","\\textcolor{##aa87ff}{#1}");ae("\\purpleD","\\textcolor{##7854ab}{#1}");ae("\\purpleE","\\textcolor{##543b78}{#1}");ae("\\mintA","\\textcolor{##f5f9e8}{#1}");ae("\\mintB","\\textcolor{##edf2df}{#1}");ae("\\mintC","\\textcolor{##e0e5cc}{#1}");ae("\\grayA","\\textcolor{##f6f7f7}{#1}");ae("\\grayB","\\textcolor{##f0f1f2}{#1}");ae("\\grayC","\\textcolor{##e3e5e6}{#1}");ae("\\grayD","\\textcolor{##d6d8da}{#1}");ae("\\grayE","\\textcolor{##babec2}{#1}");ae("\\grayF","\\textcolor{##888d93}{#1}");ae("\\grayG","\\textcolor{##626569}{#1}");ae("\\grayH","\\textcolor{##3b3e40}{#1}");ae("\\grayI","\\textcolor{##21242c}{#1}");ae("\\kaBlue","\\textcolor{##314453}{#1}");ae("\\kaGreen","\\textcolor{##71B307}{#1}");var R$={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class u3t{constructor(n,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(n),this.macros=new o3t(l3t,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new Cj(n,this.settings)}switchMode(n){this.mode=n}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(n){this.stack.push(n)}pushTokens(n){this.stack.push(...n)}scanArgument(n){var t,r,s;if(n){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:s,end:r}=this.consumeArg(["]"])}else({tokens:s,start:t,end:r}=this.consumeArg());return this.pushToken(new Ki("EOF",r.loc)),this.pushTokens(s),new Ki("",yi.range(t,r))}consumeSpaces(){for(;;){var n=this.future();if(n.text===" ")this.stack.pop();else break}}consumeArg(n){var t=[],r=n&&n.length>0;r||this.consumeSpaces();var s=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text==="{")++a;else if(i.text==="}"){if(--a,a===-1)throw new Qe("Extra }",i)}else if(i.text==="EOF")throw new Qe("Unexpected end of input in a macro argument, expected '"+(n&&r?n[o]:"}")+"'",i);if(n&&r)if((a===0||a===1&&n[o]==="{")&&i.text===n[o]){if(++o,o===n.length){t.splice(-o,o);break}}else o=0}while(a!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:i}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new Qe("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Qe("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(n){var t=this.popToken(),r=t.text,s=t.noexpand?null:this._getExpansion(r);if(s==null||n&&s.unexpandable){if(n&&s==null&&r[0]==="\\"&&!this.isDefined(r))throw new Qe("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=s.tokens,a=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var l=i[o];if(l.text==="#"){if(o===0)throw new Qe("Incomplete placeholder at end of macro body",l);if(l=i[--o],l.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(l.text))i.splice(o,2,...a[+l.text-1]);else throw new Qe("Not a valid argument number",l)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var n=this.stack.pop();return n.treatAsRelax&&(n.text="\\relax"),n}}expandMacro(n){return this.macros.has(n)?this.expandTokens([new Ki(n)]):void 0}expandTokens(n){var t=[],r=this.stack.length;for(this.pushTokens(n);this.stack.length>r;)if(this.expandOnce(!0)===!1){var s=this.stack.pop();s.treatAsRelax&&(s.noexpand=!1,s.treatAsRelax=!1),t.push(s)}return this.countExpansion(t.length),t}expandMacroAsText(n){var t=this.expandMacro(n);return t&&t.map(r=>r.text).join("")}_getExpansion(n){var t=this.macros.get(n);if(t==null)return t;if(n.length===1){var r=this.lexer.catcodes[n];if(r!=null&&r!==13)return}var s=typeof t=="function"?t(this):t;if(typeof s=="string"){var i=0;if(s.includes("#"))for(var a=s.replace(/##/g,"");a.includes("#"+(i+1));)++i;for(var o=new Cj(s,this.settings),l=[],u=o.lex();u.text!=="EOF";)l.push(u),u=o.lex();l.reverse();var _={tokens:l,numArgs:i};return _}return s}isDefined(n){return this.macros.has(n)||nu.hasOwnProperty(n)||wr.math.hasOwnProperty(n)||wr.text.hasOwnProperty(n)||R$.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:nu.hasOwnProperty(n)&&!nu[n].primitive}}var zj=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Kg=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),dw={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Tj={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Hb{constructor(n,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new u3t(n,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(n,t){if(t===void 0&&(t=!0),this.fetch().text!==n)throw new Qe("Expected '"+n+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(n){this.mode=n,this.gullet.switchMode(n)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var n=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),n}finally{this.gullet.endGroups()}}subparse(n){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Ki("}")),this.gullet.pushTokens(n);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(n,t){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var s=this.fetch();if(Hb.endOfExpression.has(s.text)||t&&s.text===t||n&&nu[s.text]&&nu[s.text].infix)break;var i=this.parseAtom(t);if(i){if(i.type==="internal")continue}else break;r.push(i)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&($B(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',n):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),n)),a={type:"textord",mode:"text",loc:yi.range(n),text:t};else return null;if(this.consume(),i)for(var _=0;_0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=C+1:(x!==C&&y.push({type:"text",value:u.value.slice(x,C)}),Array.isArray(E)?y.push(...E):E&&y.push(E),x=C+w[0].length,v=!0),!p.global)break;w=p.exec(u.value)}return v?(x?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=Aj(e,"(");let i=Aj(e,")");for(;r!==-1&&s>i;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),i++;return[e,t]}function O$(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Of(t)||Eb(t))&&(!n||t!==47)}I$.peek=q3t;function L3t(){this.buffer()}function O3t(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function I3t(){this.buffer()}function B3t(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function $3t(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Qa(this.sliceSerialize(e)).toLowerCase(),t.label=n}function P3t(e){this.exit(e)}function F3t(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Qa(this.sliceSerialize(e)).toLowerCase(),t.label=n}function H3t(e){this.exit(e)}function q3t(){return"["}function I$(e,n,t,r){const s=t.createTracker(r);let i=s.move("[^");const a=t.enter("footnoteReference"),o=t.enter("reference");return i+=s.move(t.safe(t.associationId(e),{after:"]",before:i})),o(),a(),i+=s.move("]"),i}function U3t(){return{enter:{gfmFootnoteCallString:L3t,gfmFootnoteCall:O3t,gfmFootnoteDefinitionLabelString:I3t,gfmFootnoteDefinition:B3t},exit:{gfmFootnoteCallString:$3t,gfmFootnoteCall:P3t,gfmFootnoteDefinitionLabelString:F3t,gfmFootnoteDefinition:H3t}}}function G3t(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:I$},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,i,a){const o=i.createTracker(a);let l=o.move("[^");const u=i.enter("footnoteDefinition"),_=i.enter("label");return l+=o.move(i.safe(i.associationId(r),{before:l,after:"]"})),_(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((n?` +`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?B$:W3t))),u(),l}}function W3t(e,n,t){return n===0?e:B$(e,n,t)}function B$(e,n,t){return(t?"":" ")+e}const V3t=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$$.peek=Z3t;function K3t(){return{canContainEols:["delete"],enter:{strikethrough:Y3t},exit:{strikethrough:X3t}}}function Q3t(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:V3t}],handlers:{delete:$$}}}function Y3t(e){this.enter({type:"delete",children:[]},e)}function X3t(e){this.exit(e)}function $$(e,n,t,r){const s=t.createTracker(r),i=t.enter("strikethrough");let a=s.move("~~");return a+=t.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),i(),a}function Z3t(){return"~"}function J3t(e){return e.length}function e5t(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||J3t,i=[],a=[],o=[],l=[];let u=0,_=-1;for(;++_u&&(u=e[_].length);++vl[v])&&(l[v]=w)}S.push(y)}a[_]=S,o[_]=b}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fl[f]&&(l[f]=y),m[f]=y),p[f]=w}a.splice(1,0,p),o.splice(1,0,m),_=-1;const x=[];for(;++_ "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),r5t);return s(),a}function r5t(e,n,t){return">"+(t?"":" ")+e}function s5t(e,n){return Mj(e,n.inConstruct,!0)&&!Mj(e,n.notInConstruct,!1)}function Mj(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ra&&(a=i):i=1,s=r+n.length,r=t.indexOf(n,s);return a}function i5t(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function a5t(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function o5t(e,n,t,r){const s=a5t(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(i5t(e,t)){const f=t.enter("codeIndented"),p=t.indentLines(i,l5t);return f(),p}const o=t.createTracker(r),l=s.repeat(Math.max(P$(i,s)+1,3)),u=t.enter("codeFenced");let _=o.move(l);if(e.lang){const f=t.enter(`codeFencedLang${a}`);_+=o.move(t.safe(e.lang,{before:_,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${a}`);_+=o.move(" "),_+=o.move(t.safe(e.meta,{before:_,after:` +`,encode:["`"],...o.current()})),f()}return _+=o.move(` +`),i&&(_+=o.move(i+` +`)),_+=o.move(l),u(),_}function l5t(e,n,t){return(t?"":" ")+e}function JS(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function c5t(e,n,t,r){const s=JS(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("definition");let o=t.enter("label");const l=t.createTracker(r);let u=l.move("[");return u+=l.move(t.safe(t.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":` +`,...l.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=l.move(" "+s),u+=l.move(t.safe(e.title,{before:u,after:s,...l.current()})),u+=l.move(s),o()),a(),u}function u5t(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function up(e){return"&#x"+e.toString(16).toUpperCase()+";"}function xv(e,n,t){const r=Hh(e),s=Hh(n);return r===void 0?s===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}F$.peek=f5t;function F$(e,n,t,r){const s=u5t(t),i=t.enter("emphasis"),a=t.createTracker(r),o=a.move(s);let l=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=l.charCodeAt(0),_=xv(r.before.charCodeAt(r.before.length-1),u,s);_.inside&&(l=up(u)+l.slice(1));const f=l.charCodeAt(l.length-1),p=xv(r.after.charCodeAt(0),f,s);p.inside&&(l=l.slice(0,-1)+up(f));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:_.outside},o+l+m}function f5t(e,n,t){return t.options.emphasis||"*"}function d5t(e,n){let t=!1;return ES(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,f3}),!!((!e.depth||e.depth<3)&&RS(e)&&(n.options.setext||t))}function h5t(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(d5t(e,t)){const _=t.enter("headingSetext"),f=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` +`,after:` +`});return f(),_(),p+` +`+(s===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` +`))+1))}const a="#".repeat(s),o=t.enter("headingAtx"),l=t.enter("phrasing");i.move(a+" ");let u=t.containerPhrasing(e,{before:"# ",after:` +`,...i.current()});return/^[\t ]/.test(u)&&(u=up(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),l(),o(),u}H$.peek=_5t;function H$(e){return e.value||""}function _5t(){return"<"}q$.peek=p5t;function q$(e,n,t,r){const s=JS(t),i=s==='"'?"Quote":"Apostrophe",a=t.enter("image");let o=t.enter("label");const l=t.createTracker(r);let u=l.move("![");return u+=l.move(t.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=t.enter(`title${i}`),u+=l.move(" "+s),u+=l.move(t.safe(e.title,{before:u,after:s,...l.current()})),u+=l.move(s),o()),u+=l.move(")"),a(),u}function p5t(){return"!"}U$.peek=m5t;function U$(e,n,t,r){const s=e.referenceType,i=t.enter("imageReference");let a=t.enter("label");const o=t.createTracker(r);let l=o.move("![");const u=t.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const _=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:l,after:"]",...o.current()});return a(),t.stack=_,i(),s==="full"||!u||u!==f?l+=o.move(f+"]"):s==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function m5t(){return"!"}G$.peek=g5t;function G$(e,n,t){let r=e.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i\u007F]/.test(e.url))}V$.peek=v5t;function V$(e,n,t,r){const s=JS(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,l;if(W$(e,t)){const _=t.stack;t.stack=[],o=t.enter("autolink");let f=a.move("<");return f+=a.move(t.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),o(),t.stack=_,f}o=t.enter("link"),l=t.enter("label");let u=a.move("[");return u+=a.move(t.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(t.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=t.enter("destinationRaw"),u+=a.move(t.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=t.enter(`title${i}`),u+=a.move(" "+s),u+=a.move(t.safe(e.title,{before:u,after:s,...a.current()})),u+=a.move(s),l()),u+=a.move(")"),o(),u}function v5t(e,n,t){return W$(e,t)?"<":"["}K$.peek=b5t;function K$(e,n,t,r){const s=e.referenceType,i=t.enter("linkReference");let a=t.enter("label");const o=t.createTracker(r);let l=o.move("[");const u=t.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(u+"]["),a();const _=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:l,after:"]",...o.current()});return a(),t.stack=_,i(),s==="full"||!u||u!==f?l+=o.move(f+"]"):s==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function b5t(){return"["}function ek(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function y5t(e){const n=ek(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function x5t(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Q$(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function w5t(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?x5t(t):ek(t);const o=e.ordered?a==="."?")":".":y5t(t);let l=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const _=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&_&&(!_.children||!_.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),Q$(t)===a&&_){let f=-1;for(;++f-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+i);let a=i.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=t.createTracker(r);o.move(i+" ".repeat(a-i.length)),o.shift(a);const l=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,o.current()),_);return l(),u;function _(f,p,m){return p?(m?"":" ".repeat(a))+f:(m?i:i+" ".repeat(a-i.length))+f}}function C5t(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const E5t=em(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function N5t(e,n,t,r){return(e.children.some(function(a){return E5t(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function z5t(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Y$.peek=T5t;function Y$(e,n,t,r){const s=z5t(t),i=t.enter("strong"),a=t.createTracker(r),o=a.move(s+s);let l=a.move(t.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=l.charCodeAt(0),_=xv(r.before.charCodeAt(r.before.length-1),u,s);_.inside&&(l=up(u)+l.slice(1));const f=l.charCodeAt(l.length-1),p=xv(r.after.charCodeAt(0),f,s);p.inside&&(l=l.slice(0,-1)+up(f));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:_.outside},o+l+m}function T5t(e,n,t){return t.options.strong||"*"}function j5t(e,n,t,r){return t.safe(e.value,r)}function A5t(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function R5t(e,n,t){const r=(Q$(t)+(t.options.ruleSpaces?" ":"")).repeat(A5t(t));return t.options.ruleSpaces?r.slice(0,-1):r}const X$={blockquote:n5t,break:Dj,code:o5t,definition:c5t,emphasis:F$,hardBreak:Dj,heading:h5t,html:H$,image:q$,imageReference:U$,inlineCode:G$,link:V$,linkReference:K$,list:w5t,listItem:k5t,paragraph:C5t,root:N5t,strong:Y$,text:j5t,thematicBreak:R5t};function M5t(){return{enter:{table:D5t,tableData:Lj,tableHeader:Lj,tableRow:O5t},exit:{codeText:I5t,table:L5t,tableData:mw,tableHeader:mw,tableRow:mw}}}function D5t(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function L5t(e){this.exit(e),this.data.inTable=void 0}function O5t(e){this.enter({type:"tableRow",children:[]},e)}function mw(e){this.exit(e)}function Lj(e){this.enter({type:"tableCell",children:[]},e)}function I5t(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,B5t));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function B5t(e,n){return n==="|"?n:e}function $5t(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:o}};function a(m,x,S,b){return u(_(m,S,b),m.align)}function o(m,x,S,b){const v=f(m,S,b),y=u([v]);return y.slice(0,y.indexOf(` +`))}function l(m,x,S,b){const v=S.enter("tableCell"),y=S.enter("phrasing"),w=S.containerPhrasing(m,{...b,before:i,after:i});return y(),v(),w}function u(m,x){return e5t(m,{align:x,alignDelimiters:r,padding:t,stringLength:s})}function _(m,x,S){const b=m.children;let v=-1;const y=[],w=x.enter("table");for(;++v0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const r6t={tokenize:f6t,partial:!0};function s6t(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:l6t,continuation:{tokenize:c6t},exit:u6t}},text:{91:{name:"gfmFootnoteCall",tokenize:o6t},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:i6t,resolveTo:a6t}}}}function i6t(e,n,t){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const l=r.events[s][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return t(l);const u=Qa(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?t(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),n(l))}}function a6t(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},o=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",i,n],["enter",a,n],["exit",a,n],["exit",i,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...o),e}function o6t(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?t(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(i>999||f===93&&!a||f===null||f===91||ir(f))return t(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(Qa(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(f)}return ir(f)||(a=!0),i++,e.consume(f),f===92?_:u}function _(f){return f===91||f===92||f===93?(e.consume(f),i++,u):u(f)}}function l6t(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,o;return l;function l(x){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(x){return x===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",_):t(x)}function _(x){if(a>999||x===93&&!o||x===null||x===91||ir(x))return t(x);if(x===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return i=Qa(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(x),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return ir(x)||(o=!0),a++,e.consume(x),x===92?f:_}function f(x){return x===91||x===92||x===93?(e.consume(x),a++,_):_(x)}function p(x){return x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),s.includes(i)||s.push(i),mn(e,m,"gfmFootnoteDefinitionWhitespace")):t(x)}function m(x){return n(x)}}function c6t(e,n,t){return e.check(nm,n,e.attempt(r6t,n,t))}function u6t(e){e.exit("gfmFootnoteDefinition")}function f6t(e,n,t){const r=this;return mn(e,s,"gfmFootnoteDefinitionIndent",5);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?n(i):t(i)}}function d6t(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(a,o){let l=-1;for(;++l1?l(x):(a.consume(x),f++,m);if(f<2&&!t)return l(x);const b=a.exit("strikethroughSequenceTemporary"),v=Hh(x);return b._open=!v||v===2&&!!S,b._close=!S||S===2&&!!v,o(x)}}}class h6t{constructor(){this.map=[]}add(n,t,r){_6t(this,n,t,r)}consume(n){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let s=r.pop();for(;s;){for(const i of s)n.push(i);s=r.pop()}this.map.length=0}}function _6t(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const H=r.events[B][1].type;if(H==="lineEnding"||H==="linePrefix")B--;else break}const F=B>-1?r.events[B][1].type:null,U=F==="tableHead"||F==="tableRow"?E:l;return U===E&&r.parser.lazy[r.now().line]?t(O):U(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),u(O)}function u(O){return O===124||(a=!0,i+=1),_(O)}function _(O){return O===null?t(O):wt(O)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),m):t(O):yn(O)?mn(e,_,"whitespace")(O):(i+=1,a&&(a=!1,s+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),a=!0,_):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||ir(O)?(e.exit("data"),_(O)):(e.consume(O),O===92?p:f)}function p(O){return O===92||O===124?(e.consume(O),f):f(O)}function m(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(O):(e.enter("tableDelimiterRow"),a=!1,yn(O)?mn(e,x,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):x(O))}function x(O){return O===45||O===58?b(O):O===124?(a=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),S):N(O)}function S(O){return yn(O)?mn(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):O===45?(i+=1,v(O)):O===null||wt(O)?C(O):N(O)}function v(O){return O===45?(e.enter("tableDelimiterFiller"),y(O)):N(O)}function y(O){return O===45?(e.consume(O),y):O===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(O))}function w(O){return yn(O)?mn(e,C,"whitespace")(O):C(O)}function C(O){return O===124?x(O):O===null||wt(O)?!a||s!==i?N(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(O)):N(O)}function N(O){return t(O)}function E(O){return e.enter("tableRow"),j(O)}function j(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),j):O===null||wt(O)?(e.exit("tableRow"),n(O)):yn(O)?mn(e,j,"whitespace")(O):(e.enter("data"),z(O))}function z(O){return O===null||O===124||ir(O)?(e.exit("data"),j(O)):(e.consume(O),O===92?M:z)}function M(O){return O===92||O===124?(e.consume(O),z):z(O)}}function v6t(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,u,_,f;const p=new h6t;for(;++tt[2]+1){const x=t[2]+1,S=t[3]-t[2]-1;e.add(x,S,[])}}e.add(t[3]+1,0,[["exit",f,n]])}return s!==void 0&&(i.end=Object.assign({},Zd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function Ij(e,n,t,r,s){const i=[],a=Zd(n.events,t);s&&(s.end=Object.assign({},a),i.push(["exit",s,n])),r.end=Object.assign({},a),i.push(["exit",r,n]),e.add(t+1,0,i)}function Zd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const b6t={name:"tasklistCheck",tokenize:x6t};function y6t(){return{text:{91:b6t}}}function x6t(e,n,t){const r=this;return s;function s(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return ir(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):t(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):t(l)}function o(l){return wt(l)?n(l):yn(l)?e.check({tokenize:w6t},n,t)(l):t(l)}}function w6t(e,n,t){return mn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function S6t(e){return _B([K5t(),s6t(),d6t(e),m6t(),y6t()])}const k6t={};function aP(e){const n=this,t=e||k6t,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(S6t(t)),i.push(U5t()),a.push(G5t(t))}function C6t(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:i},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:o,mathText:a,mathTextData:o}};function e(l){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},l)}function n(){this.buffer()}function t(){const l=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=l}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(l){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),_=this.stack[this.stack.length-1];_.type,this.exit(l),_.value=u;const f=_.data.hChildren[0];f.type,f.tagName,f.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function i(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function a(l){const u=this.resume(),_=this.stack[this.stack.length-1];_.type,this.exit(l),_.value=u,_.data.hChildren.push({type:"text",value:u})}function o(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function E6t(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),r.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`,inConstruct:"mathFlowMeta"},{character:"$",after:n?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:r}};function t(i,a,o,l){const u=i.value||"",_=o.createTracker(l),f="$".repeat(Math.max(P$(u,"$")+1,2)),p=o.enter("mathFlow");let m=_.move(f);if(i.meta){const x=o.enter("mathFlowMeta");m+=_.move(o.safe(i.meta,{after:` +`,before:m,encode:["$"],..._.current()})),x()}return m+=_.move(` +`),u&&(m+=_.move(u+` +`)),m+=_.move(f),p(),m}function r(i,a,o){let l=i.value||"",u=1;for(n||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(l);)u++;const _="$".repeat(u);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let f=-1;for(;++ft)return null;try{return Nt.highlight(e,n).children}catch{return null}}function cP(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:h.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(cP)},n)}function L6t(e,n,t=3e5){var r;return((r=lP(e,n,t))==null?void 0:r.map(cP))??e}function uP(e,n,t=3e5){const r=lP(e,n,t);if(!r)return e.split(` +`);const s=[];let i=[];const a=[];let o=0;const l=_=>{let f=_;for(let p=a.length-1;p>=0;p--)f=h.jsx("span",{className:a[p],children:f},o++);i.push(f)},u=_=>{var f;if(_.type==="text"){(_.value??"").split(` +`).forEach((p,m)=>{m>0&&(s.push(i),i=[]),p&&l(p)});return}_.type==="element"&&(a.push((((f=_.properties)==null?void 0:f.className)??[]).join(" ")),(_.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function fP(e){return Array.isArray(e)?e.length===0:e===""}const $j=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function Wh(e,n,t){let r=n;for(;e[r]===t;)r+=1;return r-n}function fp(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function P3(e){var a;let n=!1,t=0,r=0,s=0;for(;r[ \t]?/.exec(e.slice(r));if(o){r+=o[0].length,s+=1;continue}const l=/^ {0,3}(?:[-+*]|\d+[.)])[ \t]+/.exec(e.slice(r));if(!l)break;r+=l[0].length,t+=l[0].length,n=!0}const i=((a=/^[ \t]*/.exec(e.slice(r)))==null?void 0:a[0].length)??0;return{hasListMarker:n,indentation:i,listIndent:t,offset:r+i,quoteDepth:s}}function O6t(e,n){const t=e[n];if(t!=="`"&&t!=="~"||fp(e,n)||Wh(e,n,t)<3)return!1;const r=e.lastIndexOf(` +`,n-1)+1,s=e.indexOf(` +`,n),i=e.slice(r,s===-1?e.length:s),a=P3(i);return a.indentation<=3&&r+a.offset===n}function I6t(e,n){const t=e[n],r=Wh(e,n,t),s=e.lastIndexOf(` +`,n-1)+1,i=e.indexOf(` +`,n),a=P3(e.slice(s,i===-1?e.length:i));let o=e.indexOf(` +`,n+r);if(o===-1)return e.length;for(o+=1;o=a.listIndent&&f.indentation<=a.listIndent+3&&m>=r&&/^[ \t\r]*$/.test(e.slice(p+m,u)))return l===-1?e.length:l+1;if(l===-1)return e.length;o=l+1}return e.length}function B6t(e,n,t){const r=Wh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function P6t(e){const n=[];for(let t=0;t|()[\]-]+$/.test(t)?/^[eE][+-]?\d+$/.test(t)||/[+*/=^_{}\\<>|()]/.test(t)?!0:/^[A-Za-z][A-Za-z0-9]*$/.test(t):!1:!0}function H6t(e,{predictMath:n=!1}={}){const t=P6t(e),r=new Set,s=new Set;for(let u=0;u`$$${s}$$`).replace(/\\\(([\s\S]+?)\\\)/g,(r,s)=>`$$${s}$$`);return n.predictMath&&(t=t.replace(/\\\[([\s\S]*)$/,(r,s)=>`$$${s}`).replace(/\\\(([\s\S]*)$/,(r,s)=>`$$${s}`)),H6t(t,n)}function dP(e,n={}){let t="",r=0,s=0;for(;ss!==n);return{order:e.order.filter(s=>s!==n),previewKey:e.previewKey===n?null:e.previewKey,fallbackKey:r[r.length-1]??null}}function G6t(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function qr(e,n={}){const t=r=>{n.stopPropagation&&r.stopPropagation()};return{onClick:r=>{t(r),e("preview")},onDoubleClick:r=>{t(r),e("keepOpen")},onAuxClick:r=>{r.button===1&&(r.preventDefault(),t(r),e("keepOpen"))},onKeyDown:r=>{const s=G6t(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const W6t=1e5;function V6t({code:e,lang:n}){const[t,r]=R.useState(!1),s=()=>{var i;(i=navigator.clipboard)==null||i.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return h.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[h.jsx(on,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:wD(),"aria-label":$4e(),onClick:s,children:t?h.jsx(ka,{size:13}):h.jsx(v6,{size:13})}),h.jsx("pre",{children:h.jsx("code",{children:L6t(e,n,W6t)})})]})}function K6t(e){const n={};for(const t of e.matchAll(/([\w-]+)=(["'])(.*?)\2/g)){const r=t[1];r&&(n[r.toLowerCase()]=t[3]??"")}return n}function Fj(e,n,t){let r=n.line,s=n.column;for(let i=0;i]*?)\/?>/gi,r=[];let s=0,i=!1;for(const a of n.matchAll(t)){const o=(a[1]??"").toLowerCase(),l=K6t(a[2]??"");if(!l[o==="run"?"id":"path"])continue;i=!0,a.index>s&&r.push({type:"text",value:n.slice(s,a.index),position:gw(e,s,a.index)});const _=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:l},position:gw(e,a.index,_),type:o==="run"?"runMention":"fileMention"}),s=_}return i?(shP(e)}function Y6t(){return e=>{const n=t=>{var r;for(const s of["href","src"])t.properties&&Object.hasOwn(t.properties,s)&&(t.properties[s]=RB(String(t.properties[s]||"")));(r=t.children)==null||r.forEach(n)};n(e)}}function qj({path:e,lines:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,i=n&&Number.parseInt(n,10)||void 0,a=i!=null?`${s}:${i}`:s;return h.jsxs("button",{className:"file-chip",title:r?YK({path:Ee(e)}):e,...qr(o=>r==null?void 0:r(e,i,t,void 0,o)),disabled:!r,children:[h.jsx(kO,{size:12}),h.jsx("span",{className:"file-chip-label",children:a}),h.jsx(zO,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function X6t({id:e,label:n,onOpenRun:t}){return h.jsxs("button",{className:"file-chip run-chip",title:t?fQ({id:Ee(e)}):$Q({id:Ee(e)}),...qr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[h.jsx(k6,{size:12}),h.jsx("span",{className:"file-chip-label",children:n||oL()}),h.jsx(zO,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const _P={singleDollarTextMath:!0},Z6t=zS().use(DS).use(aP).use(oP,_P).use(Q6t).use(_v).use(Y6t).use(L$);function J6t(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const pP={code:({node:e,className:n,children:t,...r})=>{const s=n??"",i=/language-(\w+)/.exec(s),a=String(t??"").replace(/\n$/,"");if(!(i!=null||a.includes(` +`)))return h.jsx("code",{className:s,...r,children:t});const l=i?o3(i[1]):null;return h.jsx(V6t,{code:a,lang:l})},pre:({children:e})=>h.jsx(h.Fragment,{children:e})},Fo=R.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:i,predict:a=!1}){Kf();const o=R.useMemo(()=>({"file-mention":l=>h.jsx(qj,{path:l.path,lines:l.lines,exp:l.exp,onOpenFile:t}),"run-mention":l=>h.jsx(X6t,{id:l.id,label:l.label,onOpenRun:r}),a:({node:l,href:u,children:_,...f})=>{if(u&&J6t(u)&&t){let p;try{p=decodeURI(u)}catch{return h.jsx("span",{children:_})}const m=s?s(p):p;return m?h.jsx(qj,{path:m,onOpenFile:t}):h.jsx("span",{children:_})}return h.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",...f,children:_})},th:({node:l,...u})=>h.jsx("th",{dir:"auto",...u}),td:({node:l,...u})=>h.jsx("td",{dir:"auto",...u}),img:({node:l,src:u,alt:_,className:f,...p})=>{if(!u||typeof u!="string")return null;const m=i?i(u):u;return m?h.jsx("img",{...p,src:m,alt:_??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border ${f??""}`}):null},...pP}),[t,r,s,i]);return h.jsx("div",{dir:"auto","data-streaming":a||void 0,className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:text-prose-emphasis [&_h1]:font-semibold [&_h1]:mt-3 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h2]:text-text [&_h2]:text-prose-emphasis [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mx-0 [&_h2]:mb-1.5 [&_h3]:text-text [&_h3]:text-prose-emphasis [&_h3]:font-semibold [&_h3]:mt-3 [&_h3]:mx-0 [&_h3]:mb-1.5 [&_h4]:text-text [&_h4]:text-prose-emphasis [&_h4]:font-semibold [&_h4]:mt-3 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_table]:overflow-x-auto [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text",children:h.jsx(F2t,{content:dP(n,{predictMath:a}),processor:Z6t,components:o,predict:a})})}),Uj="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function eSt({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,l]=R.useState(!1),u=R.useRef(null),[_,f]=R.useState(!1),[p,m]=R.useState(""),x=R.useRef(null);R.useEffect(()=>{if(!o)return;const b=v=>{u.current&&!u.current.contains(v.target)&&l(!1)};return window.addEventListener("pointerdown",b),()=>window.removeEventListener("pointerdown",b)},[o]),R.useEffect(()=>{var b;_&&((b=x.current)==null||b.focus())},[_]);const S=()=>{a(p.trim()||"no specific feedback — use your judgment"),m(""),f(!1)};return h.jsxs("div",{className:"plan-strip relative w-full mt-0 mx-0 mb-2.5 py-[11px] px-[13px] flex flex-col items-stretch gap-2.5 border border-border border-s-[3px] border-s-accent-blue rounded-md bg-surface shadow-plan",children:[h.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[h.jsx(k6,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),h.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?Pze({agent:Ee(n)}):Oze({agent:Ee(n)})}),h.jsx("button",{className:"plan-strip-open ms-auto p-0 border-0 bg-none bg-transparent text-accent-blue text-sm cursor-pointer whitespace-nowrap shrink-0 [&:hover]:underline",...qr(t),children:Zze()})]}),_?h.jsxs(h.Fragment,{children:[h.jsx("textarea",{dir:"auto",ref:x,className:"plan-strip-revise-input w-full resize-none border border-border rounded-md py-[9px] px-[11px] text-sm font-[inherit] bg-background text-text [&:focus]:border-accent-blue",placeholder:_Te(),rows:2,value:p,onChange:b=>m(b.target.value),onKeyDown:b=>{b.key==="Escape"?(b.preventDefault(),m(""),f(!1)):b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),S())}}),h.jsxs("div",{className:Uj,children:[h.jsx(Oe,{size:"small",onClick:()=>{m(""),f(!1)},children:Uze()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),h.jsxs(Oe,{size:"small",variant:"primary",onClick:S,children:[aTe(),h.jsx(wO,{size:13})]})]})]}):h.jsxs("div",{className:Uj,children:[h.jsx(Oe,{size:"small",onClick:i,children:nTe()}),h.jsx(Oe,{size:"small",onClick:()=>f(!0),children:uTe()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),s?h.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[h.jsx(Oe,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:kze()}),h.jsx(Oe,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":Kze(),onClick:()=>l(b=>!b),children:h.jsx(Wo,{size:13})}),o&&h.jsx("div",{className:"plan-strip-menu absolute end-0 bottom-[calc(100%_+_4px)] flex min-w-47.5 flex-col rounded-md border border-border bg-surface p-1 shadow-plan-menu z-6",children:h.jsx(dr,{onClick:()=>{l(!1),r("bypassPermissions")},children:zze()})})]}):h.jsx(Oe,{size:"small",variant:"primary",onClick:()=>r(),children:Rze()})]})]})}function Gj({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=R.useState(""),[o,l]=R.useState(!1),[u,_]=R.useState(null);async function f(p){if(p.preventDefault(),!(o||!i.trim())){l(!0),_(null);try{n(await e(i.trim())),a("")}catch(m){_(m instanceof Error?m.message:String(m))}finally{l(!1)}}}return h.jsxs("form",{className:"onb-token-form flex items-center flex-wrap gap-2 mt-2 [&_input]:flex-1 [&_input]:min-w-55 [&_input]:text-sm [&_a]:text-sm [&_a]:text-subtext [&_a]:whitespace-nowrap [&_.error]:basis-full [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap",onSubmit:f,children:[h.jsx("input",{type:"password",value:i,onChange:p=>a(p.target.value),placeholder:t,autoComplete:"off"}),h.jsx(Oe,{type:"submit",disabled:o||!i.trim(),children:o?Zi():Uo()}),h.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??ewe()}),u&&h.jsx("div",{className:"error",children:u})]})}function mP({value:e,max:n,label:t,caption:r,fillColor:s}){const i=n>0?Math.min(100,Math.round(e/n*100)):0;return h.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:[h.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:h.jsx("div",{className:"progress-fill h-full bg-accent rounded-full transition-[width] duration-200 ease-standard",style:{width:`${i}%`,background:s}})}),(t!==void 0||r!==void 0)&&h.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[h.jsx("span",{children:t??`${i}%`}),r]})]})}const wv="code-source-text",gP="code-source-wrap",vP="file-view-gutter text-right text-muted select-none";function bP(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}function yP({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:l,scrollPosition:u,onScrollPositionChange:_}){const f=R.useMemo(()=>uP(e,vS(i)),[e,i]),{ruleCh:p,codeCh:m}=bP(f.length),x=R.useRef(null),S=R.useRef(null),b=()=>{const C=x.current;C&&S.current&&(S.current.scrollTop=C.scrollTop)},v=R.useRef(u);R.useLayoutEffect(()=>{const C=x.current;!C||!v.current||(C.scrollTop=v.current.top,C.scrollLeft=v.current.left,b())},[i]),R.useLayoutEffect(b,[e]),R.useLayoutEffect(()=>{var M;const C=x.current;if(!C||!a||o===void 0)return;const N=e.split(` +`),E=Math.min(Math.max(Math.trunc(a),1),N.length);let j=0;for(let O=0;O{if(!s){if((C.metaKey||C.ctrlKey)&&C.key.toLowerCase()==="s"){C.preventDefault(),t();return}if(C.key==="Tab"){C.preventDefault();const N=C.currentTarget,{selectionStart:E,selectionEnd:j}=N,z=e.slice(0,E)+" "+e.slice(j);n(z),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=E+1})}}},w=`absolute inset-0 m-0 py-3.5 pe-4 ${wv} ${gP} [scrollbar-gutter:stable]`;return h.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${wv}`,children:[h.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${p}ch`},"aria-hidden":"true"}),h.jsx("div",{ref:S,className:`file-view-code ${w} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:f.map((C,N)=>h.jsxs("div",{"data-line":N+1,className:"relative",style:{paddingInlineStart:`${m}ch`},children:[h.jsx("span",{className:`${vP} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),fP(C)?h.jsx("br",{}):C]},N))}),h.jsx("textarea",{ref:x,className:`file-view-editarea ${w} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${m}ch`},value:e,onChange:C=>{s||n(C.target.value)},onScroll:C=>{b(),_==null||_({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:y,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function xP({onClose:e,onSaved:n}){const t=Vct(),r=ct(t),[s,i]=R.useState(()=>r.data??null),[a,o]=R.useState(()=>{var w;return((w=r.data)==null?void 0:w.content)??""}),l=!s&&r.error?r.error.message:null,u=Rn({mutationFn:({content:w,previous:C})=>Llt(w,C)}),[_,f]=R.useState(!1),p=R.useRef(null),m=R.useRef(e),x=s!==null&&a!==s.content,S=R.useRef(x),b=R.useRef(_);S.current=x,b.current=_,m.current=e,R.useEffect(()=>{!r.data||S.current||b.current||(i(r.data),o(r.data.content))},[r.data]);const v=()=>{b.current||S.current&&!window.confirm(wtt())||m.current()};c6(p,v,"textarea");async function y(){if(!(!s||!x||_)){f(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!Hn(t.queryKey))return;Ur(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),fr(jtt(),"success")}catch(w){fr(w instanceof Error?w.message:String(w),"error")}finally{f(!1)}}}return Go.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:w=>{w.target===w.currentTarget&&v()},children:h.jsxs("div",{ref:p,className:"relative flex h-[min(48rem,calc(100vh-2.5rem))] w-200 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"ssh-config-dialog-title",tabIndex:-1,children:[h.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[h.jsx("h2",{id:"ssh-config-dialog-title",className:"m-0 text-xl font-medium",children:Dtt()}),h.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),h.jsx(on,{className:"absolute end-3.5 top-3.5","aria-label":vtt(),onClick:v,disabled:_,children:h.jsx(ts,{size:16})}),h.jsx("div",{className:"file-view min-h-0 flex-1 border-y border-border-variant bg-background",children:l?h.jsx("p",{className:"m-5 text-sm text-accent-red",children:l}):s===null?h.jsxs("div",{className:"flex items-center gap-2 p-5 text-sm text-subtext",children:[h.jsx(Dt,{})," ",Ett()]}):h.jsx(yP,{value:a,onChange:o,onSave:()=>void y(),path:s.path})}),h.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[h.jsx(Oe,{onClick:v,disabled:_,children:Fp()}),h.jsx(Oe,{variant:"primary",onClick:()=>void y(),disabled:!x||_,children:_?Zi():Uo()})]})]})}),document.body)}const Ho=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5","[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text","[&_.settings-sub]:mb-3 [&_.kv]:gap-y-1.5 [&_.kv]:gap-x-4.5","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0"].join(" "),If=["kv grid grid-cols-[auto_1fr] items-baseline gap-y-[3px] gap-x-3.5 text-base","[&_.k]:text-sm [&_.k]:text-subtext [&_.v]:text-base [&_.v]:text-text","[&_.v]:break-all"].join(" "),tSt=["grid grid-cols-[9rem_minmax(0,1fr)] items-center gap-x-5 gap-y-2.5 font-sans text-base text-text","[&_.k]:font-medium [&_.k]:text-sm [&_.k]:text-text","[&_.v]:min-w-0 [&_.v]:flex [&_.v]:items-center [&_.v]:flex-wrap [&_.v]:gap-2","[&_.v]:font-sans [&_.v]:text-base [&_.v]:text-text [&_.v]:break-words"].join(" "),qb="mt-3 mx-0 mb-0 ps-3 border-s-2 border-s-accent-red font-sans text-base leading-relaxed text-text whitespace-pre-wrap",wa=["settings-note mt-2.5 mx-0 mb-0 text-base py-2 px-2.5","border border-accent-amber rounded-md bg-accent-amber-subtle","text-accent-amber font-medium"].join(" "),rk=["form font-sans text-sm text-text [&_.form-seg]:self-start [&_.form-seg]:mb-0.5","[&_.form-seg_button]:py-[5px] [&_.form-seg_button]:px-3","[&_.repo-hint]:font-normal [&_.repo-hint]:text-sm","[&_.repo-hint]:text-muted [&_.repo-hint.ok]:text-accent-teal","[&_.folder-picker-control]:flex [&_.folder-picker-control]:items-center","[&_.folder-picker-control]:gap-[9px] [&_.folder-picker-control]:w-full","[&_.folder-picker-control]:min-w-0 [&_.folder-picker-control]:py-2 [&_.folder-picker-control]:px-2.5","[&_.folder-picker-control]:overflow-hidden [&_.folder-picker-control]:bg-background","[&_.folder-picker-control]:border [&_.folder-picker-control]:border-border","[&_.folder-picker-control]:rounded-md [&_.folder-picker-control]:cursor-pointer","[&_.folder-picker-control]:text-start","[&_.folder-picker-control]:transition-[border-color,box-shadow] [&_.folder-picker-control]:duration-120 [&_.folder-picker-control]:ease-standard","[&_.folder-picker-control:hover:not(:disabled)]:border-muted","[&_.folder-picker-control:hover:not(:disabled)]:shadow-control-subtle","[&_.folder-picker-control:focus-visible]:outline-2 [&_.folder-picker-control:focus-visible]:outline-solid [&_.folder-picker-control:focus-visible]:outline-text","[&_.folder-picker-control:focus-visible]:outline-offset-2 [&_.folder-picker-control_span]:flex-1","[&_.folder-picker-control_span]:min-w-0 [&_.folder-picker-control_span]:overflow-hidden","[&_.folder-picker-control_span]:text-ellipsis [&_.folder-picker-control_span]:whitespace-nowrap","[&_.folder-picker-control_.placeholder]:text-muted [&_.folder-picker-icon]:flex-none","[&_.folder-picker-icon]:text-current [&_.folder-picker-chevron]:flex-none","[&_.folder-picker-chevron]:text-muted","[&_.folder-picker-control:hover:not(:disabled)_.folder-picker-chevron]:text-subtext","[&_.folder-picker-hint]:text-subtext [&_.folder-picker-hint]:text-sm","[&_.folder-picker-hint]:font-normal [&_.folder-picker-hint]:leading-[1.4]","[&_.project-location-field]:flex [&_.project-location-field]:flex-col","[&_.project-location-field]:gap-2 [&_.project-location-label]:text-text","[&_.project-location-label]:text-base","[&_.project-location-label]:font-medium [&_.project-field-label]:text-text","[&_.project-field-label]:text-base [&_.project-field-label]:font-medium","[&_.folder-picker-control:disabled]:cursor-default [&_.folder-picker-control:disabled]:opacity-65","[&_.paper-destination]:flex [&_.paper-destination]:items-center","[&_.paper-destination]:gap-2.5 [&_.paper-destination]:pt-2 [&_.paper-destination]:pe-2 [&_.paper-destination]:pb-2 [&_.paper-destination]:ps-3","[&_.paper-destination]:border [&_.paper-destination]:border-border [&_.paper-destination]:rounded-md","[&_.paper-destination]:bg-background [&_.paper-destination_code]:flex-1","[&_.paper-destination_code]:min-w-0 [&_.paper-destination_code]:overflow-hidden","[&_.paper-destination_code]:text-text [&_.paper-destination_code]:text-sm","[&_.paper-destination_code]:font-normal","[&_.paper-destination_code]:text-ellipsis [&_.paper-destination_code]:whitespace-nowrap","[&_.paper-destination_.btn]:flex-none [&_.project-path-notice]:py-[9px] [&_.project-path-notice]:px-[11px]","[&_.project-path-notice]:border [&_.project-path-notice]:border-border-variant","[&_.project-path-notice]:rounded-sm [&_.project-path-notice]:bg-surface","[&_.project-path-notice]:text-base [&_.project-path-notice]:leading-relaxed [&_.project-path-notice]:text-text","[&_.project-path-notice]:leading-[1.4]","[&_.project-path-notice.error]:border-danger-notice-border","[&_.paper-results]:flex [&_.paper-results]:flex-col","[&_.paper-results]:border [&_.paper-results]:border-border [&_.paper-results]:rounded-md","[&_.paper-results]:max-h-60 [&_.paper-results]:overflow-y-auto","[&_.paper-results_button]:flex [&_.paper-results_button]:flex-col","[&_.paper-results_button]:items-start [&_.paper-results_button]:gap-0.5","[&_.paper-results_button]:py-2 [&_.paper-results_button]:px-2.5 [&_.paper-results_button]:bg-none [&_.paper-results_button]:bg-transparent","[&_.paper-results_button]:border-0","[&_.paper-results_button]:border-b [&_.paper-results_button]:border-b-border-variant","[&_.paper-results_button]:text-start [&_.paper-results_button]:[font:inherit]","[&_.paper-results_button]:text-text [&_.paper-results_button]:cursor-pointer","[&_.paper-results_button:last-child]:border-b-0","[&_.paper-results_button:hover]:bg-surface [&_.paper-results_.title]:text-sm","[&_.paper-results_.title]:font-medium","[&_.paper-results_.id]:text-xs [&_.paper-results_.id]:text-muted","[&_.paper-pick_.id]:text-xs","[&_.paper-pick_.id]:text-muted [&_.paper-pick]:flex [&_.paper-pick]:items-center","[&_.paper-pick]:justify-between [&_.paper-pick]:gap-2.5 [&_.paper-pick]:py-2.5 [&_.paper-pick]:px-3","[&_.paper-pick]:border [&_.paper-pick]:border-border [&_.paper-pick]:rounded-md","[&_.paper-pick]:bg-surface [&_.paper-pick_.meta]:min-w-0","[&_.paper-pick_.title]:text-sm [&_.paper-pick_.title]:font-medium","flex flex-col gap-2.5 [&_label]:flex [&_label]:flex-col","[&_label]:gap-1 [&_label]:text-sm [&_label]:text-text","[&_label]:font-medium [&_.row2]:grid [&_.row2]:grid-cols-2","[&_input]:font-sans [&_input]:text-sm [&_input]:font-normal [&_input]:text-text [&_input::placeholder]:text-subtext","[&_select]:font-sans [&_select]:text-sm [&_select]:font-normal [&_select]:text-text","[&_.row2]:gap-2.5 [&_.actions]:flex [&_.actions]:justify-end","[&_.actions]:gap-2.5 [&_.actions]:mt-1.5 [&_.new-project-actions]:justify-start","[&_.new-project-actions]:mt-2.5","[&_.error]:text-accent-red [&_.error]:text-base [&_.error]:whitespace-pre-wrap","settings-form mt-3.5 pt-3.5 border-t border-t-border"].join(" "),ql=["project-default-row flex items-center justify-between gap-6","pt-3.5 border-t border-t-border-variant [&_p]:mt-[3px] [&_p]:mx-0 [&_p]:mb-0","[&_.project-default-title]:text-base [&_p]:text-sm [&_p]:leading-relaxed [&_p]:text-text"].join(" "),F3=["settings-card [&_>_.error]:text-accent-red [&_>_.error]:text-base","[&_>_.error]:whitespace-pre-wrap bg-background border border-border","rounded-lg mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base","[&_h3]:font-semibold [&_h3]:text-text [&_.settings-sub]:mb-3","[&_>_.project-default-row:first-child]:pt-0 [&_>_.project-default-row:first-child]:border-t-0","git-settings-card py-3.5 px-4 [&_h3]:mb-3","[&_.kv]:grid-cols-[132px_minmax(0,_1fr)] [&_.kv]:items-center [&_.kv]:gap-y-[9px] [&_.kv]:gap-x-4.5","[&_.kv_.k]:text-sm [&_.kv_.v]:flex [&_.kv_.v]:items-center","[&_.kv_.v]:flex-wrap [&_.kv_.v]:gap-[7px] [&_.kv_.v]:min-w-0 [&_.kv_.v]:font-sans","[&_.kv_.v]:text-base [&_.kv_.v]:break-normal","[@media((max-width:_640px))]:[&_.kv]:grid-cols-1","[@media((max-width:_640px))]:[&_.kv]:gap-[3px] [@media((max-width:_640px))]:[&_.kv_.v_+_.k]:mt-[7px]"].join(" "),I0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),qd=["settings-stack-section [&_+_.settings-stack-section]:mt-6 [&_>_:last-child]:mb-0","[&_>_h2]:mt-0 [&_>_h2]:mx-0 [&_>_h2]:mb-1.5 [&_>_h2]:text-xl"].join(" ");function vw(e){return e.agentReady?{cls:"ok",variant:"success",label:HKe()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:Fqe()}:e.authState==="unknown"?{cls:"warn",variant:"warning",label:k4()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:rYe()}:{cls:"warn",variant:"warning",label:KD()}:{cls:"warn",variant:"warning",label:pWe()}}function nSt({h:e}){return e.authMethod?h.jsx(h.Fragment,{children:e.authMethod==="oauth"?pPe():U5()}):h.jsx(h.Fragment,{children:"—"})}function rSt(){const e=Up(),{data:n=null}=ct(e),[t,r]=R.useState("claude-code"),[s,i]=R.useState(!1),a=(l,u=!1)=>{i(!0),n6(l,u).catch(()=>{}).finally(()=>i(!1))},o=n==null?void 0:n.find(l=>l.id===t);return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:wqe()}),h.jsx("div",{className:"harness-tabs mt-3 flex gap-1 mb-3.5 border-b border-b-border-variant [&_button]:inline-flex [&_button]:items-center [&_button]:gap-[7px] [&_button]:py-[7px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:border-b-2 [&_button]:border-b-transparent [&_button]:-mb-px [&_button:hover]:text-text [&_button.active]:border-b-primary",children:(n??[]).map(l=>h.jsxs("button",{className:l.id===t?"active":"",onClick:()=>r(l.id),children:[l.name,h.jsx("span",{className:`w-[7px] h-[7px] rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${vw(l).cls}`})]},l.id))}),n?o?h.jsxs("div",{className:Ho,children:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx(Pt,{variant:vw(o).variant,children:vw(o).label}),h.jsx("div",{className:"spacer flex-1"}),h.jsxs(Oe,{size:"small",onClick:()=>a(!0,!0),disabled:s,children:[h.jsx(Za,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",qp()]})]}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:uFe()}),h.jsx("span",{className:"v",children:o.binPath??ePe()}),h.jsx("span",{className:"k",children:JD()}),h.jsx("span",{className:"v",children:o.version??"—"}),h.jsx("span",{className:"k",children:GPe()}),h.jsx("span",{className:"v",children:h.jsx(nSt,{h:o})}),o.account&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:o.id==="opencode"?OYe():K5()}),h.jsx("span",{className:"v",children:o.account})]}),o.org&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:ZWe()}),h.jsx("span",{className:"v",children:o.org})]}),o.plan&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:TVe()}),h.jsx("span",{className:"v",children:o.plan})]}),h.jsx("span",{className:"k",children:BPe()}),h.jsx("span",{className:"v",children:o.models.length>0?y$e({count:tn(o.models.length),models:new Intl.ListFormat(T()).format(o.models.slice(0,4).map(l=>Ee(K1(l))))}):V5()})]}),o.agentNote&&h.jsx("p",{className:wa,children:Kp(o.agentNote)})]}):null:h.jsxs(ss,{children:[h.jsx(Dt,{})," ",qHe()]})]})}function sSt({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?h.jsx(Pt,{variant:"success",children:eHe()}):h.jsx(Pt,{variant:"error",children:$Ge()}):h.jsx(Pt,{variant:"error",children:qFe()}):h.jsx(Pt,{variant:"error",children:uUe()})}function iSt({onEditState:e}){var j;const n=Rn({mutationFn:Clt}),t=CN(),r=ct(t),s=r.data??null,i=z=>{Ur(t.queryKey,M=>(typeof z=="function"?z(M??null):z)??void 0)},a=s?null:((j=r.error)==null?void 0:j.message)??null,[o,l]=R.useState(""),[u,_]=R.useState(""),[f,p]=R.useState(!1),[m,x]=R.useState(!1),[S,b]=R.useState(null),v=z=>{i(z),l(z.context??""),_(z.namespace)},y=R.useRef(null);R.useEffect(()=>{const z=y.current;y.current=s,s&&(!z||o===(z.context??"")&&u.trim()===z.namespace)&&(l(s.context??""),_(s.namespace??""))},[s,o,u]);const w=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!w;R.useEffect(()=>{e==null||e({dirty:C,saving:f})},[C,f,e]);async function N(){if(!(m||f||!w)){x(!0);try{await tt.fetchQuery({...CN(),staleTime:0})}catch(z){fr(z instanceof Error?z.message:String(z),"error")}finally{x(!1)}}}async function E(z){if(z.preventDefault(),!(f||m)){p(!0),b(null);try{v(await n.mutateAsync({context:o,namespace:u.trim()}))}catch(M){b(M instanceof Error?M.message:String(M))}finally{p(!1)}}}return h.jsx(h.Fragment,{children:a?h.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:a}):s?h.jsxs(h.Fragment,{children:[h.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[h.jsx("dt",{className:"text-subtext",children:t_()}),h.jsx("dd",{className:"m-0",children:m||f?h.jsx(Pt,{children:Ea()}):C?h.jsx(Pt,{children:bD()}):h.jsx(sSt,{s})})]}),w&&!m&&!f&&s.preflight.error&&h.jsx("p",{className:`${qb} break-words`,children:s.preflight.error}),h.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:E,children:[h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[sHe(),h.jsx(ep,{choices:[{id:"",label:s.currentContext?DBe({context:Ee(s.currentContext)}):jBe()},...o&&!s.contexts.includes(o)?[{id:o,label:sPe({context:Ee(o)})}]:[],...s.contexts.map(z=>({id:z,label:z}))],value:o,variant:"field",dropDown:!0,disabled:f||m,onSelect:l})]}),h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[fGe(),h.jsx(zs,{type:"text",value:u,disabled:f||m,onChange:z=>_(z.target.value),placeholder:zHe(),autoComplete:"off",spellCheck:!1})]}),S&&h.jsx("p",{className:"m-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:S}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsxs(Oe,{type:"button",onClick:()=>void N(),disabled:f||m||!w,children:[h.jsx(Za,{size:13})," ",m?Ea():Pp()]}),h.jsx(Oe,{variant:"primary",type:"submit",disabled:f||m||w,children:f?Zi():Uo()})]})]})]}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",CFe()]})})}function aSt(){var w;const e=Rn({mutationFn:C=>Nlt(...C)}),n=EN(),t=ct(n),r=t.data??null,s=C=>{Ur(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=R.useState(null),o=i??((w=t.error)==null?void 0:w.message)??null,[l,u]=R.useState(""),[_,f]=R.useState(""),[p,m]=R.useState(!1),x=t.isPending||p,[S,b]=R.useState(!1);async function v(){if(!(x||S)){m(!0),a(null);try{await tt.fetchQuery({...EN(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function y(C){if(C.preventDefault(),!(!l.trim()||!_.trim()||x||S||r!=null&&r.processEnv)){b(!0),a(null);try{s(await e.mutateAsync([l.trim(),_.trim()])),u(""),f("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{b(!1)}}}return h.jsxs(h.Fragment,{children:[!r&&x?h.jsxs(ss,{children:[h.jsx(Dt,{})," ",TFe()]}):r&&h.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[h.jsx("dt",{className:"font-medium text-subtext",children:t_()}),h.jsx("dd",{className:"m-0",children:h.jsx(Pt,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?Y5():Kv()})})]}),(r==null?void 0:r.processEnv)&&h.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:YBe()}),h.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:y,children:[h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?e$e():d$e(),h.jsx(zs,{type:"password",value:l,onChange:C=>u(C.target.value),placeholder:(r==null?void 0:r.maskedTokenId)??"ak-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.tokenConfigured?s$e():m$e(),h.jsx(zs,{type:"password",value:_,onChange:C=>f(C.target.value),placeholder:(r==null?void 0:r.maskedTokenSecret)??"as-…",autoComplete:"new-password",disabled:r==null?void 0:r.processEnv})]}),h.jsx("a",{className:"self-start text-sm text-subtext underline",href:"https://modal.com/docs/sdk/py/latest/config",target:"_blank",rel:"noreferrer",children:l$e()}),o&&h.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsxs(Oe,{type:"button",disabled:x||S,onClick:()=>void v(),children:[h.jsx(Za,{size:13})," ",qp()]}),h.jsx(Oe,{variant:"primary",type:"submit",disabled:!l.trim()||!_.trim()||x||S||(r==null?void 0:r.processEnv),children:S?Zi():Uo()})]})]})]})}const wP="rounded-sm border-border-strong bg-surface text-subtext",SP="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",oSt=5e3;function kP(e){const n=Ca(),t=e.map(a=>NN(a)),r=lG({queries:t.map(a=>({...a,refetchInterval:oSt}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{Hn(n)&&Ur(NN(a).queryKey,{running:!0})}]}function lSt({test:e,connecting:n,masterRunning:t}){if(n)return h.jsx("span",{role:"status",children:h.jsx(Pt,{className:SP,children:$D()})});if(e===void 0)return h.jsx(Pt,{className:wP,children:VD()});const r=e.missingTools??[],s=e.reachable&&e.toolsFound&&t===!1,i=e.reachable?e.toolsFound?s?h.jsx(Pt,{className:"rounded-sm",variant:"warning",children:PD()}):h.jsx(Pt,{className:"rounded-sm",variant:"success",children:Hp()}):h.jsx(Pt,{className:"rounded-sm",variant:"error",children:r.length===1?k$e({tool:Ee(r[0])}):z$e()}):h.jsx(Pt,{className:"rounded-sm",variant:"error",children:Q5()});return h.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[i,!s&&h.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:$o(e.testedAt)})]})}function cSt({remote:e=!1}){const n=NL(),t=ct(n),r=t.data??(t.isError?[]:null),[s,i]=R.useState(!1),[a,o]=R.useState({}),[l,u]=R.useState({}),[_,f]=R.useState(null),[p,m]=R.useState(!1),[x,S]=R.useState(0),b=e?[]:(r==null?void 0:r.filter(E=>{const j=a[E.host]??E.lastTest;return(j==null?void 0:j.reachable)&&j.toolsFound}).map(E=>E.host))??[],[v,y]=kP(b);function w(E){m(!1),S(j=>j+1),f(E),u(j=>({...j,[E]:!0}))}function C(){m(!1),f(null)}function N(E,j){u(z=>({...z,[E]:!j}))}return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"mb-3 flex justify-end",children:h.jsxs(Oe,{variant:"ghost",onClick:()=>i(!0),children:[h.jsx(jO,{size:14})," ",aL()]})}),r===null?h.jsxs(ss,{children:[h.jsx(Dt,{})," ",YD()]}):r.length===0?h.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:LGe()}):h.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:r.map(E=>{const j=a[E.host]??E.lastTest,z=_===E.host,M=l[E.host]??!1,O=!e&&(z||(j==null?void 0:j.reachable)===!1),B=`${E.user?`${E.user}@`:""}${E.hostname??E.host}${E.port?`:${E.port}`:""}`;return h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-3 py-3 px-2",children:[h.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[O?h.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":M,"aria-label":M?tK({name:Ee(E.host)}):SK({name:Ee(E.host)}),onClick:F=>{F.stopPropagation(),N(E.host,M)},children:h.jsx(Wo,{size:15,className:`text-muted transition-transform duration-120 ease-standard${M?" rotate-180":""}`})}):h.jsx("span",{className:"w-5 flex-none","aria-hidden":"true"}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"truncate text-base font-medium text-text",title:E.host,children:E.host}),h.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:B,children:B})]})]}),!e&&h.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[h.jsx("div",{className:"text-start",children:h.jsx(lSt,{test:j,connecting:z&&!p,masterRunning:v[E.host]})}),h.jsx(Oe,{size:"small",type:"button",className:"justify-self-end",onClick:F=>{F.stopPropagation(),z&&!p?C():w(E.host)},disabled:!z&&_!==null&&!p,children:z?p?qi():Fp():(j==null?void 0:j.reachable)===!1?qi():j?eL():G5()})]})]}),O&&(M||z)&&h.jsxs("div",{className:`border-t border-t-border-variant py-3 pe-2 ps-10${M?"":" hidden"}`,children:[!z&&(j==null?void 0:j.error)&&h.jsx(wdt,{host:E.host,transcript:j.error}),z&&h.jsx(f6,{host:E.host,backend:"ssh",active:M,onComplete:F=>{F.backend==="ssh"&&(o(U=>({...U,[E.host]:F.result})),y(E.host),m(!1),f(null))},onError:F=>{m(!0),o(U=>({...U,[E.host]:{reachable:!1,toolsFound:!1,missingTools:[],error:F,testedAt:Date.now()}}))}},x)]})]},E.host)})}),s&&h.jsx(xP,{onClose:()=>i(!1)})]})}function uSt({test:e,connecting:n,masterRunning:t}){return n?h.jsx(Pt,{className:SP,children:$D()}):e===null?h.jsx(Pt,{className:wP,children:VD()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?h.jsx(Pt,{className:"rounded-sm",variant:"warning",children:PD()}):h.jsx(Pt,{className:"rounded-sm",variant:"success",children:Hp()}):h.jsx(Pt,{className:"rounded-sm",variant:"error",children:QUe()}):h.jsx(Pt,{className:"rounded-sm",variant:"error",children:tWe()}):h.jsx(Pt,{className:"rounded-sm",variant:"error",children:Q5()})}function fSt({remote:e=!1}){var I;const n=Rn({mutationFn:Ult}),t=Fct(),r=ct(t),s=r.data??null,i=L=>{Ur(t.queryKey,$=>(typeof L=="function"?L($??null):L)??void 0)},a=s?null:((I=r.error)==null?void 0:I.message)??null,[o,l]=R.useState(""),[u,_]=R.useState(""),[f,p]=R.useState(""),[m,x]=R.useState(""),[S,b]=R.useState(!1),[v,y]=R.useState(null),[w,C]=R.useState(null),[N,E]=R.useState(!1),[j,z]=R.useState(!1),[M,O]=R.useState(0),B=!e&&o&&(w!=null&&w.reachable)&&w.slurmFound&&w.toolsFound?[o]:[],[F,U]=kP(B);function H(){z(!1),O(L=>L+1),E(!0)}const Y=L=>{i(L),l(L.host??""),_(L.partition??""),p(L.account??""),x(L.timeLimit??"")},V=R.useRef(null);R.useEffect(()=>{const L=V.current;V.current=s,s&&(!L||o===(L.host??"")&&u.trim()===(L.partition??"")&&f.trim()===(L.account??"")&&m.trim()===(L.timeLimit??""))&&(l(s.host??""),_(s.partition??""),p(s.account??""),x(s.timeLimit??""))},[s,o,u,f,m]);const X=s!==null&&o===(s.host??"")&&u.trim()===(s.partition??"")&&f.trim()===(s.account??"")&&m.trim()===(s.timeLimit??"");async function ie(L){if(L.preventDefault(),!S){b(!0),y(null);try{Y(await n.mutateAsync({host:o,partition:u.trim(),account:f.trim(),timeLimit:m.trim()}))}catch($){y($ instanceof Error?$.message:String($))}finally{b(!1)}}}return h.jsx(h.Fragment,{children:a?h.jsx("div",{className:"error",children:a}):s?h.jsxs(h.Fragment,{children:[!N&&(w==null?void 0:w.error)&&h.jsx("p",{className:qb,children:w.error}),h.jsxs("form",{className:rk,onSubmit:ie,children:[h.jsx("div",{className:"max-w-xl",children:h.jsxs("label",{children:[FUe(),h.jsx(ep,{choices:[{id:"",label:NWe()},...o&&!s.hosts.some(L=>L.host===o)?[{id:o,label:`${o} (not in ~/.ssh/config)`}]:[],...s.hosts.map(L=>({id:L.host,label:L.host}))],value:o,variant:"field",dropDown:!0,disabled:S||N,onSelect:L=>{l(L),C(null),E(!1),z(!1)}})]})}),h.jsxs("div",{className:"actions",children:[!e&&h.jsx(Oe,{type:"button",onClick:()=>{N&&!j?(z(!1),E(!1)):H()},disabled:!o,title:o?void 0:RYe(),children:N?j?qi():Fp():w?eL():G5()}),h.jsx("span",{role:"status",children:h.jsx(uSt,{test:w,connecting:N&&!j,masterRunning:F[o]})})]}),h.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[xVe(),h.jsx(zs,{type:"text",list:"slurm-partitions",value:u,onChange:L=>_(L.target.value),placeholder:fN(),autoComplete:"off",spellCheck:!1}),h.jsx("datalist",{id:"slurm-partitions",children:w==null?void 0:w.partitions.map(L=>h.jsx("option",{value:L},L))})]}),h.jsxs("label",{children:[K5(),h.jsx(zs,{type:"text",value:f,onChange:L=>p(L.target.value),placeholder:fN(),autoComplete:"off",spellCheck:!1})]})]}),h.jsxs("label",{className:"mt-3 block max-w-xl",children:[WQe(),h.jsx(zs,{type:"text",value:m,onChange:L=>x(L.target.value),placeholder:$Fe(),autoComplete:"off",spellCheck:!1})]})]}),v&&h.jsx("div",{className:"error",children:v}),h.jsx("div",{className:"actions",children:h.jsx(Oe,{variant:"primary",type:"submit",disabled:S||X||N,children:S?Zi():Uo()})})]}),!e&&N&&h.jsx(f6,{host:o,backend:"slurm",onComplete:L=>{L.backend==="slurm"&&(C(L.result),U(o),z(!1),E(!1))},onError:L=>{z(!0),C({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:L})}},M)]}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",CUe()]})})}function dSt(){var C;const e=Rn({mutationFn:Wlt}),n=Hct(),t=ct(n),r=t.data??null,s=N=>{Ur(n.queryKey,E=>(typeof N=="function"?N(E??null):N)??void 0)},i=r?null:((C=t.error)==null?void 0:C.message)??null,[a,o]=R.useState(""),[l,u]=R.useState(!1),[_,f]=R.useState(null),[p,m]=R.useState(null),x=p!==null&&p!=="testing"?p:null,S=N=>{s(N),o(N.address??"")},b=R.useRef(null);R.useEffect(()=>{const N=b.current;b.current=r,r&&(!N||a===(N.address??""))&&o(r.address??"")},[r,a]);const v=r!==null&&a===(r.address??"");async function y(N){if(N.preventDefault(),!l){u(!0),f(null);try{S(await e.mutateAsync({address:a}))}catch(E){f(E instanceof Error?E.message:String(E))}finally{u(!1)}}}async function w(){m("testing");try{m(await Vlt(a.trim()||void 0))}catch(N){m({reachable:!1,address:a.trim()||"(unknown)",rayVersion:null,error:N instanceof Error?N.message:String(N)})}}return h.jsx(h.Fragment,{children:i?h.jsx("div",{className:"error",children:i}):r?h.jsxs(h.Fragment,{children:[(x==null?void 0:x.error)&&h.jsx("p",{className:qb,children:x.error}),h.jsxs("form",{className:rk,onSubmit:y,children:[h.jsxs("label",{children:[aUe(),h.jsx(zs,{type:"text",value:a,onChange:N=>{o(N.target.value),m(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),h.jsxs("p",{className:"m-0 text-sm text-subtext",children:[XHe(),": ",Ee(r.resolvedAddress)," · ",XD(),": ",r.source]}),_&&h.jsx("div",{className:"error",children:_}),h.jsxs("div",{className:"actions",children:[h.jsx(Oe,{variant:"primary",type:"submit",disabled:l||v,children:l?Zi():Uo()}),h.jsx(Oe,{type:"button",onClick:()=>void w(),disabled:p==="testing",children:wQe()}),h.jsx(hSt,{test:p})]}),(x==null?void 0:x.reachable)&&x.rayVersion&&h.jsxs("p",{className:"m-0 text-sm text-subtext",children:[IVe(),": ",x.rayVersion]})]})]}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",xUe()]})})}function hSt({test:e}){return e===null?null:e==="testing"?h.jsx(Pt,{children:EQe()}):e.reachable?h.jsx(Pt,{variant:"success",children:FVe()}):h.jsx(Pt,{variant:"error",children:Q5()})}function _St(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:Fl(e.memBytes),r=e.gpus.length===0?null:PIe({count:e.gpus.length});return[n,e.cpuCount>0?ZOe({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function pSt({remote:e}){var p;const n=ct(Uct()),t=n.data,r=(p=n.error)==null?void 0:p.message,s=n.isFetching,[i,a]=R.useState(0),[o,l]=R.useState(!0),[u,_]=R.useState(!1),f=()=>n.refetch();return h.jsxs(h.Fragment,{children:[r&&!t?h.jsx("div",{className:"error",children:r}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:tSt,children:[h.jsx("span",{className:"k",children:t_()}),h.jsx("span",{className:"v",children:!t&&s||u?h.jsxs(Pt,{className:"gap-1.5",role:"status",children:[h.jsx(Dt,{}),u?SPe():Ea()]}):r?h.jsx(Pt,{variant:"warning",children:k4()}):t?t.loggedIn?t.sshKeyStatus==="matched"?h.jsx(Pt,{variant:"success",children:Hp()}):t.sshKeyStatus==="unknown"?h.jsx(Pt,{variant:"warning",children:k4()}):h.jsx(Pt,{variant:"warning",children:Kv()}):h.jsx(Pt,{variant:"warning",children:KD()}):null}),h.jsx("span",{className:"k",children:nVe()}),h.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),h.jsx("span",{className:"k",children:QKe()}),h.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?h.jsx(Pt,{variant:"success",children:DWe()}):t.sshKeyStatus==="no_local_match"?h.jsx(Pt,{variant:"warning",children:SWe()}):t.sshKeyStatus==="none_registered"?h.jsx(Pt,{variant:"error",children:iWe()}):h.jsx(Pt,{children:JQe()}):"—"})]}),e&&t&&!t.loggedIn&&h.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:HBe({command:Ee("orx login")})}),!e&&i>0&&h.jsx(xdt,{login:o,onComplete:()=>{_(!1),a(0),f()},onError:m=>{_(!1),fr(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?h.jsxs("p",{dir:"auto",className:wa,children:[jPe()," ",h.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):h.jsxs("p",{dir:"auto",className:wa,children:[XGe()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),jQe()," ",h.jsx("code",{children:"orx ssh-key add"}),"."]})),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="no_local_match"&&(t.sshKeyPath?h.jsx("p",{dir:"auto",className:wa,children:qYe({register:Ee(`orx ssh-key add ${t.sshKeyPath}`),load:Ee("ssh-add")})}):h.jsxs("p",{dir:"auto",className:wa,children:[VGe()," ",h.jsx("code",{children:"ssh-add"}),KWe()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),!s&&(r||(t==null?void 0:t.error))&&h.jsx("p",{dir:"auto",className:"mt-4 mb-0 text-sm text-accent-red whitespace-pre-wrap break-words",children:r||(t==null?void 0:t.error)})]}),h.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[h.jsxs(Oe,{onClick:()=>void f(),disabled:s||u,children:[h.jsx(Za,{size:13})," ",s?Ea():Pp()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&h.jsxs(Oe,{variant:"primary",disabled:s||u,onClick:()=>{l(!t.loggedIn),_(!0),a(m=>m+1)},children:[u?h.jsx(Dt,{}):h.jsx(r_,{size:13})," ",t.loggedIn?qXe():tL()]})]})]})}const mSt={local:J0e,ssh:bpe,tinker:Spe,hf:G0e,modal:rpe,k8s:Q0e,slurm:ppe,ray:fpe,openresearch:ope},Ub={local:"local_job",tinker:"tinker_job",hf:"hf_job",modal:"modal_job",k8s:"k8s_job",ssh:"ssh_job",slurm:"slurm_job",ray:"ray_job",openresearch:"openresearch_job"},Wj=["hf","modal","slurm","ray","openresearch"],bw=["hf","modal","openresearch"],CP={hf:["cpu-basic","t4-small","a10g-small","a10g-large","a100-large","h100","h200"],modal:["cpu","t4","l4","a10g","a100","a100-80gb","l40s","h100","h100:2"],slurm:["gpu","h100:1","h100:2","a100:4"],ray:["cpu","cpu:2","gpu","gpu:1","gpu:1,cpu:4","gpu:1,mem:8GiB"],openresearch:["h100_sxm","h100_sxm:2","cpu5c","cpu5g","cpu5m"]},H3=["tinker","hf","modal","ray","k8s"],gSt={tinker:yme,hf:lme,modal:dme,openresearch:mme},Vj="__custom__";function f0(e,n){return!!(n&&!(CP[e]??[]).includes(n))}function vSt({settings:e,projectId:n,onSaved:t}){const r=Rn({mutationFn:Qlt}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=R.useState(s),[l,u]=R.useState(i),[_,f]=R.useState(f0(s,i)),[p,m]=R.useState(!1),[x,S]=R.useState(null),b=e.targets.find(F=>F.id===a),v=e.targets.filter(F=>F.configured||F.id===s),y=Wj.includes(a),w=bw.includes(a),C=CP[a]??[],N=a===s&&(!y||l.trim()===i),E=Lf[a](),j=gSt[a],z=p?JZe():w&&!l.trim()?NOe({destination:E}):a==="ssh"?O$e():R$e({destination:E});R.useEffect(()=>{o(s),u(i),f(f0(s,i))},[s,i]);async function M(F,U){const H=Wj.includes(F);if(!(p||bw.includes(F)&&!U.trim())){m(!0),S(null);try{t(await r.mutateAsync({backend:F,flavor:H&&U.trim()||null,projectId:n}))}catch(Y){S(Y instanceof Error?Y.message:String(Y)),o(s),u(i),f(f0(s,i))}finally{m(!1)}}}function O(F){const U=e.targets.find(Y=>Y.id===F);if(!U)return;o(U.id);const H=U.id===s?i:"";u(H),f(f0(U.id,H)),bw.includes(U.id)||M(U.id,H)}function B(F){if(F===Vj){f(!0);return}f(!1),u(F),(!w||F)&&M(a,F)}return h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:LHe()}),h.jsxs("div",{children:[h.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:F=>{F.preventDefault(),N||M(a,l)},children:[h.jsx(ep,{choices:v.map(F=>({id:F.id,label:Lf[F.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:F=>{const U=e.targets.find(H=>H.id===F.id);return U?h.jsx(i_,{kind:Ub[U.id],size:16}):null},onSelect:O}),y&&h.jsx("div",{children:_?h.jsxs("div",{className:"relative",children:[h.jsx("input",{className:"h-9 w-full rounded-md border border-border bg-background py-0 pe-10 ps-3 font-sans text-sm text-text outline-none focus:border-text",type:"text",value:l,onChange:F=>u(F.target.value),onBlur:()=>{if(w&&!l.trim()){a===s&&(u(i),f(f0(s,i)));return}N||M(a,l)},placeholder:mHe(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:p}),h.jsx("button",{type:"button",className:"absolute inset-y-0 end-0 inline-flex w-9 items-center justify-center text-muted hover:text-text","aria-label":uN(),title:uN(),onMouseDown:F=>F.preventDefault(),onClick:()=>f(!1),children:h.jsx(Wo,{size:12})})]}):h.jsx(ep,{choices:[{id:"",label:w?SOe():U$e()},...l&&!C.includes(l)?[{id:l,label:uIe({value:Ee(l)})}]:[],...C.map(F=>({id:F,label:F})),{id:Vj,label:yHe()}],value:l,variant:"field",dropDown:!0,disabled:p,onSelect:B})})]}),x&&h.jsx("div",{className:"error mt-2.5",children:x}),b&&!b.configured&&h.jsx("p",{className:wa,children:BQe()})]}),h.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:z}),j&&h.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:j()})]})}function bSt({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?pOe():e.id==="openresearch"?tL():e.id==="ray"?G5():$Xe();return h.jsxs("div",{className:`group relative flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans ${r&&e.enabled?"transition-colors duration-120 ease-standard hover:border-text hover:bg-surface":""} ${e.enabled?"":"opacity-52"}`,children:[r&&h.jsx("button",{type:"button",className:"absolute inset-0 z-10 rounded-lg focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-2 disabled:cursor-default",onClick:r,disabled:!e.enabled,"aria-label":Lf[e.id](),"aria-describedby":i,"aria-haspopup":H3.includes(e.id)?"dialog":void 0}),h.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:h.jsx(i_,{kind:Ub[e.id],size:48})}),h.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:Lf[e.id]()}),h.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:mSt[e.id]()}),h.jsx("span",{id:i,className:"mt-2 line-clamp-2 min-h-8 text-xs leading-normal text-subtext",children:e.fromEnvironmentTab?h.jsxs(h.Fragment,{children:[e.id==="tinker"?EBe():IZe()," ",h.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:yIe()})]}):t??e.summary}),h.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[h.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?UD():e.configured?!r||H3.includes(e.id)?Y5():uJe():a}),r&&h.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:h.jsx(b1,{size:16})})]})]})}function ySt({target:e,isDefault:n,onBack:t,remote:r}){return h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",className:"settings-back mb-6 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[h.jsx(X0,{size:16})," ",HD()]}),h.jsxs("div",{className:"flex items-center justify-between gap-6",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[h.jsx("span",{className:"flex h-10 w-10 flex-none items-center justify-center",children:h.jsx(i_,{kind:Ub[e.id],size:36})}),h.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:Lf[e.id]()})]}),n&&h.jsx(Pt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:UD()})]}),h.jsxs("div",{className:"mt-6 font-sans text-base text-text [&_.settings-card]:mb-0 [&_.settings-form]:mt-6 [&_.settings-form]:border-t-0 [&_.settings-form]:pt-0 [&>.settings-form:first-child]:mt-0 [&>div:first-child]:border-t-0",children:[e.id==="ssh"&&h.jsx(cSt,{remote:r}),e.id==="slurm"&&h.jsx(fSt,{remote:r}),e.id==="openresearch"&&h.jsx(pSt,{remote:r})]})]})}function xSt({target:e,onClose:n}){const t=R.useRef(null),[r,s]=R.useState({dirty:!1,saving:!1});R.useEffect(()=>{const a=t.current;return a==null||a.showModal(),()=>a==null?void 0:a.close()},[]);const i=()=>{r.saving||r.dirty&&!window.confirm(wBe())||n()};return h.jsxs("dialog",{ref:t,className:"m-auto w-140 max-w-[calc(100vw_-_40px)] max-h-[calc(100vh_-_40px)] overflow-y-auto rounded-xl border border-border bg-background p-5 text-text shadow-modal backdrop:bg-modal-backdrop-light","aria-labelledby":"compute-quick-setup-title",onKeyDown:a=>{a.key==="Escape"&&(a.preventDefault(),i())},onCancel:a=>{a.preventDefault(),i()},children:[h.jsxs("div",{className:"mb-5 flex items-center justify-between gap-4",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[h.jsx(i_,{kind:Ub[e.id],size:32}),h.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:Lf[e.id]()})]}),h.jsx(on,{title:G1(),"aria-label":G1(),onClick:i,disabled:r.saving,children:h.jsx(ts,{size:14})})]}),e.id==="tinker"&&h.jsx(SSt,{target:e}),e.id==="hf"&&h.jsx(CSt,{}),e.id==="modal"&&h.jsx(aSt,{}),e.id==="ray"&&h.jsx(dSt,{}),e.id==="k8s"&&h.jsx(iSt,{onEditState:s})]})}function wSt({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,O;const s=EL(e==null?void 0:e.id),i=ct(s),a=i.data??null,o=B=>{Ur(s.queryKey,F=>(typeof B=="function"?B(F??null):B)??void 0)},l=a?null:((M=i.error)==null?void 0:M.message)??null,[u,_]=R.useState(null),[f,p]=R.useState(null),m=qct(),x=ct(m),S=x.data??null,b=((O=x.error)==null?void 0:O.message)??null;R.useEffect(()=>{_(null),p(null)},[e==null?void 0:e.id]);const v=B=>{o(B),p(null)},y=a?a.targets:null,w=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=y?[...y].sort((B,F)=>+(F.id===w)-+(B.id===w)):null,N=(C==null?void 0:C.filter(B=>B.configured))??[],E=(C==null?void 0:C.filter(B=>!B.configured))??[],j=B=>h.jsx(bSt,{target:B,isDefault:w===B.id,summary:B.id==="local"?S?_St(S):b??$He():void 0,onOpen:B.id==="local"?void 0:()=>_(B.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${B.id}`),z=u?a==null?void 0:a.targets.find(B=>B.id===u):null;return z&&!H3.includes(z.id)?h.jsx(ySt,{target:z,isDefault:w===z.id,onBack:()=>_(null),remote:r}):h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:qD()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:YFe()}),h.jsx(HSt,{projectId:e==null?void 0:e.id,onViewHistory:n}),l?h.jsx("div",{className:"error",children:l}):a?h.jsxs(h.Fragment,{children:[f&&h.jsx("div",{className:"error",children:f}),h.jsx(vSt,{settings:a,projectId:e==null?void 0:e.id,onSaved:v}),h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:Y5()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(j)})]}),E.length>0&&h.jsxs("section",{className:"mb-3.5",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:JUe()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:E.map(j)})]}),z&&h.jsx(xSt,{target:z,onClose:()=>_(null)})]}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",xFe()]})]})}function SSt({target:e}){var y;const n=Rn({mutationFn:vlt}),[t,r]=R.useState(""),[s,i]=R.useState(!1),[a,o]=R.useState(null),l=kN(),u=ct(l),_=u.data??null,f=a??((y=u.error)==null?void 0:y.message)??null,p=w=>{Ur(l.queryKey,C=>(typeof w=="function"?w(C??null):w)??void 0)},[m,x]=R.useState(!1),S=u.isPending||m;async function b(){if(!(S||s)){x(!0),o(null);try{await tt.fetchQuery({...kN(),staleTime:0})}catch(w){o(w instanceof Error?w.message:String(w))}finally{x(!1)}}}async function v(w){if(w.preventDefault(),!(!t.trim()||s||S)){i(!0),o(null);try{p(await n.mutateAsync(t.trim())),r("")}catch(C){o(C instanceof Error?C.message:String(C))}finally{i(!1)}}}return h.jsxs(h.Fragment,{children:[!_&&S?h.jsxs(ss,{children:[h.jsx(Dt,{})," ",Ea()]}):_&&h.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[h.jsx("dt",{className:"font-medium text-subtext",children:t_()}),h.jsx("dd",{className:"m-0",children:h.jsx(Pt,{variant:_.validationStatus==="valid"?"success":_.validationStatus==="invalid"?"error":"warning",children:_.validationStatus==="valid"?Hp():_.validationStatus==="invalid"?MZe():_.validationStatus==="billingRequired"?CZe():Kv()})})]}),(_==null?void 0:_.validationStatus)==="billingRequired"&&h.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:h.jsx("a",{className:"underline",href:"https://tinker.thinkingmachines.ai/",target:"_blank",rel:"noreferrer",children:xZe()})}),(_==null?void 0:_.processEnv)&&h.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:TZe()}),h.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:v,children:[h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||_!==null&&_.validationStatus!=="missing"?mXe():U5(),h.jsx(zs,{type:"password",value:t,placeholder:(_==null?void 0:_.maskedKey)??"",onChange:w=>r(w.target.value),autoComplete:"new-password"})]}),f&&h.jsx("p",{className:"m-0 text-sm text-accent-red",children:f}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsxs(Oe,{type:"button",disabled:s||S,onClick:()=>void b(),children:[h.jsx(Za,{size:13})," ",S?Ea():Pp()]}),h.jsx(Oe,{variant:"primary",type:"submit",disabled:!t.trim()||s||S,children:s?rL():Uo()})]})]})]})}function kSt({settings:e}){return e.validationStatus==="missing"?h.jsx(Pt,{variant:"warning",children:Kv()}):e.validationStatus==="invalid"?h.jsx(Pt,{variant:"error",children:nUe()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?h.jsx(Pt,{variant:"success",children:Hp()}):e.jobsWrite===!1?h.jsxs("span",{className:"inline-flex items-center gap-2",children:[h.jsx(Pt,{variant:"warning",children:qGe()}),h.jsx(l6,{content:ZIe(),className:"text-subtext",children:h.jsx(y6,{size:15})})]}):null}function CSt(){var b;const e=Rn({mutationFn:mlt}),n=SN(),t=ct(n),r=t.data??null,s=v=>{Ur(n.queryKey,y=>(typeof v=="function"?v(y??null):v)??void 0)},i=r?null:((b=t.error)==null?void 0:b.message)??null,[a,o]=R.useState(""),[l,u]=R.useState(!1),[_,f]=R.useState(!1),[p,m]=R.useState(null);async function x(){if(!(l||_||!r&&!i)){f(!0),m(null);try{await tt.fetchQuery({...SN(),staleTime:0})}catch(v){m(v instanceof Error?v.message:String(v))}finally{f(!1)}}}async function S(v){if(v.preventDefault(),!(!a.trim()||l||_||!r&&!i)){u(!0),m(null);try{const y=await e.mutateAsync(a.trim());s(y),m(null),o("")}catch(y){m(y instanceof Error?y.message:String(y))}finally{u(!1)}}}return h.jsxs(h.Fragment,{children:[i?h.jsx("div",{className:"error",children:i}):r?h.jsxs(h.Fragment,{children:[h.jsxs("dl",{className:"m-0 flex flex-col gap-3 text-sm",children:[r.username&&h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsx("dt",{className:"font-medium text-subtext",children:K5()}),h.jsx("dd",{className:"m-0 text-text",children:r.username})]}),(r.validationStatus==="missing"||r.validationStatus==="invalid"||r.validationStatus==="valid"&&r.jobsWrite!==null)&&h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsx("dt",{className:"font-medium text-subtext",children:t_()}),h.jsx("dd",{className:"m-0 text-text",children:h.jsx(kSt,{settings:r})})]})]}),r.validationStatus==="unreachable"&&r.validationError&&h.jsx("p",{className:qb,children:r.validationError}),r.source==="env"&&h.jsx("p",{className:wa,children:jqe()}),r.validationStatus==="valid"&&r.jobsWrite===null&&h.jsx("p",{className:wa,children:KIe({login:Ee("hf auth login"),url:Ee("huggingface.co/settings/tokens")})})]}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",TUe()]}),h.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:S,children:[h.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[r!=null&&r.configured?yXe():P$e(),h.jsx(zs,{type:"password",value:a,onChange:v=>o(v.target.value),placeholder:(r==null?void 0:r.maskedToken)??Eqe(),autoComplete:"off"})]}),p&&h.jsx("div",{className:"error",children:p}),h.jsxs("div",{className:"flex justify-end gap-2",children:[h.jsxs(Oe,{type:"button",disabled:l||_||!r&&!i,onClick:()=>void x(),children:[h.jsx(Za,{size:13})," ",_?Ea():Pp()]}),h.jsx(Oe,{variant:"primary",type:"submit",disabled:!a.trim()||l||_||!r&&!i,children:l?rL():Uo()})]})]})]})}const EP=/^hf_[A-Za-z0-9]{10,}$/;function NP(){return h.jsx("tr",{children:h.jsx("td",{colSpan:3,children:h.jsxs("p",{dir:"auto",className:wa,children:[HQe()," ",h.jsx("code",{children:"HF_TOKEN"}),NKe()]})})})}const Kj=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function q3(e,n){const t=n instanceof Error?n.message:String(n);fr(t.includes(e)?t:`${e}: ${t}`,"error")}function ESt({name:e,entry:n,onVars:t}){const r=Rn({mutationFn:f=>mL(...f)}),s=Rn({mutationFn:Tlt}),[i,a]=R.useState(""),[o,l]=R.useState(!1);async function u(){if(!(!i.trim()||o)){l(!0);try{t(await r.mutateAsync([e,i.trim()])),a("")}catch(f){q3(e,f)}finally{l(!1)}}}async function _(){if(!o){l(!0);try{t(await s.mutateAsync(e))}catch(f){q3(e,f)}finally{l(!1)}}}return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{className:"font-mono text-sm",children:e}),h.jsx("td",{className:"text-base text-subtext",children:n?h.jsxs(h.Fragment,{children:[n.maskedValue,n.inProcessEnv&&h.jsx(Pt,{children:gVe()})]}):h.jsx(zs,{variant:"inline",className:"text-base",type:"password",value:i,onChange:f=>a(f.target.value),onKeyDown:f=>{f.key==="Enter"&&(f.preventDefault(),u()),f.key==="Escape"&&!o&&a("")},placeholder:ZD(),"aria-label":tY({name:Ee(e)}),autoComplete:"new-password",disabled:o})}),h.jsx("td",{children:n?h.jsx(on,{className:"[&:hover:not(:disabled)]:text-accent-red",title:m4({name:Ee(e)}),"aria-label":m4({name:Ee(e)}),onClick:()=>void _(),disabled:o,children:h.jsx(s_,{size:13})}):i.trim()&&h.jsx(Oe,{size:"small",onClick:()=>void u(),disabled:o,children:o?Zi():Uo()})})]}),!n&&e!=="HF_TOKEN"&&EP.test(i.trim())&&h.jsx(NP,{})]})}function NSt({onVars:e,onDone:n}){const t=Rn({mutationFn:f=>mL(...f)}),[r,s]=R.useState(""),[i,a]=R.useState(""),[o,l]=R.useState(!1);async function u(){if(!(!r.trim()||!i.trim()||o)){l(!0);try{e(await t.mutateAsync([r.trim(),i.trim()])),n()}catch(f){q3(r.trim(),f)}finally{l(!1)}}}const _=f=>{f.key==="Enter"&&(f.preventDefault(),u()),f.key==="Escape"&&!o&&n()};return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{children:h.jsx(zs,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:f=>s(f.target.value),onKeyDown:_,placeholder:"MY_API_KEY","aria-label":SGe(),autoComplete:"off",spellCheck:!1,disabled:o})}),h.jsx("td",{children:h.jsx(zs,{variant:"inline",className:"text-base",type:"password",value:i,onChange:f=>a(f.target.value),onKeyDown:_,placeholder:ZD(),"aria-label":NGe(),autoComplete:"new-password",disabled:o})}),h.jsxs("td",{children:[h.jsx(Oe,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?Zi():Uo()}),h.jsx(on,{title:Fp(),"aria-label":gFe(),onClick:n,disabled:o,children:h.jsx(ts,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&EP.test(i.trim())&&h.jsx(NP,{})]})}function zSt(){var u;const e=Gct(),n=ct(e),t=n.data??null,r=_=>{Ur(e.queryKey,f=>(typeof _=="function"?_(f??null):_)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=R.useState(!1),o=t===null?[]:t.map(_=>_.key).filter(_=>!Kj.includes(_)),l=[...Kj,...o];return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[h.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:gYe()}),h.jsxs(Oe,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[h.jsx(S6,{size:12})," ",DPe()]})]}),h.jsx("div",{className:Ho,children:s?h.jsx("div",{className:"error",children:s}):t===null?h.jsxs(ss,{children:[h.jsx(Dt,{})," ",mu()]}):h.jsx("table",{className:"env-table w-full table-fixed border-collapse text-base [&_td:first-child]:w-[32%] [&_td:first-child]:wrap-anywhere [&_.badge]:ms-2 [&_td]:h-12 [&_td]:pt-0 [&_td]:pe-2.5 [&_td]:pb-0 [&_td]:ps-0 [&_td]:align-middle [&_td]:border-b [&_td]:border-b-border-variant [&_td:last-child]:w-29 [&_td:last-child]:whitespace-nowrap [&_td:last-child]:text-end [&_td[colspan]]:whitespace-normal [&_td[colspan]]:text-start [&_.icon-btn]:ms-2 [&_.icon-btn]:align-middle",children:h.jsxs("tbody",{children:[l.map(_=>h.jsx(ESt,{name:_,entry:t.find(f=>f.key===_),onVars:r},_)),i&&h.jsx(NSt,{onVars:r,onDone:()=>a(!1)})]})})})]})}const d0=[{value:"system",label:gZe,icon:c_t},{value:"light",label:hZe,icon:A_t},{value:"dark",label:aZe,icon:f_t}],TSt=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"}];function jSt(){const e=Kf(),[n,t]=IL(),r=s=>{var _;const i=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!i)return;s.preventDefault();const a=[...s.currentTarget.querySelectorAll('[role="radio"]')],o=a.findIndex(f=>f===document.activeElement),u=((o===-1?d0.findIndex(f=>f.value===n):o)+i+d0.length)%d0.length;t(d0[u].value),(_=a[u])==null||_.focus()};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:YLe()}),h.jsxs("div",{className:`${Ho} mt-3`,children:[h.jsxs("div",{className:`${ql} pb-3.5`,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:yN()}),h.jsx("div",{className:"theme-segmented inline-flex flex-none gap-0.5 p-0.5 border border-border rounded-md bg-surface",role:"radiogroup","aria-label":yN(),onKeyDown:r,children:d0.map(({value:s,label:i,icon:a})=>h.jsxs("button",{type:"button",role:"radio","aria-checked":n===s,tabIndex:n===s?0:-1,className:`theme-segment inline-flex items-center gap-1.5 py-[5px] px-2.5 rounded-sm text-subtext text-sm cursor-pointer transition-[background,color] duration-120 ease-standard [&:hover:not(.on)]:text-text [&:hover:not(.on)]:bg-highlight [&.on]:text-background [&.on]:bg-primary [&:focus-visible]:outline-2 [&:focus-visible]:outline-solid [&:focus-visible]:outline-text [&:focus-visible]:outline-offset-2 ${n===s?"on":""}`,onClick:()=>t(s),children:[h.jsx(a,{size:14}),i()]},s))})]}),h.jsxs("div",{className:ql,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:BBe()}),h.jsx("div",{className:"w-52 flex-none",children:h.jsx(ep,{choices:TSt,value:e,variant:"field",dropDown:!0,onSelect:s=>{QM(s)&&DL(s)}})})]})]})]})}const ASt={installer:aat,"app-bundle":Kit,cargo:Zit,homebrew:nat,nix:uat,unknown:_at},yw={cargo:vat,homebrew:wat,nix:Eat};function RSt(){var f;const e=Rn({mutationFn:p=>wlt(...p)}),{status:n,error:t,apply:r}=z6(),[s,i]=R.useState(null),[a,o]=R.useState(null),l=IO(n),u=s!==null||l.restarting;if(!n)return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:mN()}),t?h.jsx("div",{className:Ho,children:h.jsx("div",{className:"error",children:t})}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",mu()]})]});const _=async(p,m)=>{i(p),o(null);try{await m()}catch(x){o(x instanceof Error?x.message:String(x))}finally{i(null)}};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:mN()}),h.jsxs("div",{className:`${Ho} mt-3`,children:[h.jsxs("div",{className:`${If} pb-3.5`,children:[h.jsx("div",{className:"k",children:JD()}),h.jsx("div",{className:"v",children:n.current}),h.jsx("div",{className:"k",children:_Ue()}),h.jsx("div",{className:"v",children:n.latest??"—"}),h.jsx("div",{className:"k",children:WD()}),h.jsx("div",{className:"v",children:ASt[n.channel]()})]}),n.restartRequired&&h.jsxs("div",{className:ql,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:pKe()}),h.jsx("p",{children:l.error?cL({error:l.error}):zXe({installed:Ee(n.installedVersion??"—"),current:Ee(n.current??n.installedVersion??"—")})})]}),n.canRestart&&h.jsx(Oe,{size:"small",type:"button",disabled:u,onClick:l.restart,children:l.restarting?uL():lL()})]}),n.selfUpdates?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:ql,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:hN()}),h.jsxs("p",{children:[bGe(),n.envDisabled&&QZe()]})]}),h.jsx(o6,{type:"button",checked:n.autoUpdate,"aria-label":hN(),disabled:u,onClick:()=>void _("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),h.jsxs("div",{className:ql,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?GZe({version:Ee(n.latest??"—")}):oOe()}),h.jsx("p",{children:n.updateAvailable?vBe():bOe()})]}),h.jsx(Oe,{size:"small",type:"button",disabled:u,onClick:()=>void _("apply",()=>ylt().then(r)),children:s==="apply"?q5():n.updateAvailable?FZe():fOe()})]})]}):h.jsx("div",{className:ql,children:h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:aVe()}),h.jsx("p",{children:((f=yw[n.channel])==null?void 0:f.call(yw))??VYe()})]})}),n.channel==="app-bundle"&&h.jsx(DSt,{busy:s,disabled:u,run:_}),a&&h.jsx("div",{className:"error",children:a})]})]})}function MSt(){var f;const e=Rn({mutationFn:_ct}),n=Jct(),t=ct(n),r=t.data??null,s=p=>{Ur(n.queryKey,m=>(typeof p=="function"?p(m??null):p)??void 0)},[i,a]=R.useState(!1),[o,l]=R.useState(null),u=o??((f=t.error)==null?void 0:f.message)??null,_=()=>{!r||i||(a(!0),l(null),e.mutateAsync(!r.preferenceEnabled).then(s).catch(p=>l(p instanceof Error?p.message:String(p))).finally(()=>a(!1)))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:uYe()}),r?h.jsxs("div",{className:`${Ho} mt-3`,children:[h.jsxs("div",{className:ql,children:[h.jsxs("div",{children:[h.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[cN(),r.locked&&r.reason&&h.jsx(l6,{content:`${dHe()} ${r.reason}.`,className:"text-subtext",children:h.jsx(y6,{size:15})})]}),h.jsx("p",{children:AGe()})]}),h.jsx(o6,{type:"button",checked:r.enabled,"aria-label":cN(),disabled:i||r.locked,onClick:_})]}),u&&h.jsx("div",{className:"error",children:u})]}):u?h.jsx("div",{className:"error",children:u}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",mu()]})]})}function DSt({busy:e,disabled:n,run:t}){const r=Rn({mutationFn:Slt}),[s,i]=R.useState(null),[a,o]=R.useState(!1),l=u=>void t("cli",()=>r.mutateAsync(u).then(_=>{i(_),o(!1)}).catch(_=>{throw o(!u&&String((_==null?void 0:_.message)??_).includes("--force")),_}));return h.jsxs("div",{className:ql,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:uBe({command:Ee("orx")})}),s?h.jsxs("p",{children:[s.alreadyCurrent?LOe({link:Ee(s.link)}):$Oe({link:Ee(s.link)}),!s.onPath&&WLe({directory:Ee(s.dir)})]}):h.jsx("p",{children:aBe({command:Ee("orx")})})]}),h.jsx(Oe,{size:"small",type:"button",disabled:n,onClick:()=>l(a),children:e==="cli"?q5():a?dXe():s?XYe():nBe()})]})}function LSt(){var p;const e=Rn({mutationFn:m=>xL(...m)}),n=t6(),t=ct(n),r=t.data??null,s=m=>{Ur(n.queryKey,x=>(typeof m=="function"?m(x??null):m)??void 0)},[i,a]=R.useState(!1),[o,l]=R.useState(null),u=o??((p=t.error)==null?void 0:p.message)??null,_=async()=>{await t.refetch({cancelRefetch:!1})},f=()=>{if(!r||i)return;const m=!r.githubForNewProjects;a(!0),l(null),e.mutateAsync([m,!0]).then(s).catch(x=>l(x instanceof Error?x.message:String(x))).finally(()=>a(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:uqe()}),r?h.jsxs("div",{className:`${Ho} mt-3 project-defaults-card [&_.settings-card-head]:justify-between [&_.settings-card-head]:mb-0 [&_.settings-card-head]:pb-3 [&_.settings-card-head_h3]:m-0`,children:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx("h3",{children:_qe()}),h.jsx(Pt,{variant:r.githubAuthenticated?"success":r.ghInstalled?"warning":"error",children:r.githubAuthenticated?BD():FD()})]}),h.jsxs("div",{className:ql,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:dN()}),h.jsx("p",{children:kYe()})]}),h.jsx(o6,{type:"button",checked:r.githubForNewProjects,"aria-label":dN(),disabled:i||!r.githubAuthenticated&&!r.githubForNewProjects,onClick:f})]}),!r.githubAuthenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(zP,{ghInstalled:r.ghInstalled,onCheck:_})}),u&&h.jsx("div",{className:"error",children:u})]}):u?h.jsx("div",{className:"error",children:u}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",mu()]})]})}function zP({ghInstalled:e,onCheck:n}){const[t,r]=R.useState(!1),s=()=>{r(!0),n().finally(()=>r(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper m-0 text-sm leading-relaxed text-text",children:Kp(e?RXe():_Be())}),h.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&h.jsxs(K0,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[Gqe()," ",h.jsx(Mf,{size:12})]}),h.jsx(Oe,{type:"button",variant:e?"warning":"default",disabled:t,onClick:s,children:t?Ea():Pp()})]})]})}function OSt(){var m,x,S;const e=Rn({mutationFn:nlt}),n=Rn({mutationFn:rlt}),t=A0t(),r=ct(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((x=r.data)==null?void 0:x.hasSession)??null,a=b=>Ur(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...b}),o=b=>a({hasToken:b}),[l,u]=R.useState(!1),[_,f]=R.useState(null),p=_??((S=r.error)==null?void 0:S.message);return h.jsxs("div",{className:F3,children:[h.jsx("h3",{children:QD()}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:vqe()}),h.jsx("span",{className:"v",children:h.jsx(Pt,{variant:s?"success":"default",children:s===null?p?Ao():Ea():s?vN():S4()})})]}),h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:zYe()}),s?h.jsx("div",{className:I0,children:h.jsx(Oe,{disabled:l,onClick:()=>{u(!0),f(null),e.mutateAsync().then(b=>o(b.hasToken)).catch(b=>f(b instanceof Error?b.message:String(b))).finally(()=>u(!1))},children:l?gN():iXe()})}):h.jsx(Gj,{save:_L,onSaved:b=>o(b.hasToken),placeholder:hVe(),createHref:"https://www.overleaf.com/user/settings"}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:AKe()}),h.jsx("span",{className:"v",children:h.jsx(Pt,{variant:i?"success":"default",children:i===null?p?Ao():Ea():i?vN():S4()})})]}),h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:LKe()}),i?h.jsx("div",{className:I0,children:h.jsx(Oe,{disabled:l,onClick:()=>{u(!0),f(null),n.mutateAsync().then(b=>a({hasSession:b.hasSession})).catch(b=>f(b instanceof Error?b.message:String(b))).finally(()=>u(!1))},children:l?gN():tXe()})}):h.jsx(Gj,{save:b=>pL(b),onSaved:b=>a({hasSession:b.hasSession}),placeholder:y4(),createHref:"https://www.overleaf.com/project",createLabel:NEe()}),p&&h.jsx("div",{className:"error",children:p})]})}function ISt({project:e,onProjectUpdate:n}){var j;const t=Rn({mutationFn:z=>xL(...z)}),r={...Zct((e==null?void 0:e.id)??""),enabled:!!e},s=ct(r),i=s.data??null,a=z=>{Ur(r.queryKey,M=>(typeof z=="function"?z(M??null):z)??void 0)},[o,l]=R.useState(!1),[u,_]=R.useState(null),f=u??((j=s.error)==null?void 0:j.message)??null,[p,m]=R.useState(!1),[x,S]=R.useState(!1),[b,v]=R.useState(null),y=!!(i!=null&&i.github.owner&&i.github.repo),w=async()=>{await s.refetch({cancelRefetch:!1})},C=z=>{const M=z instanceof Error?z.message:String(z);return M.toLowerCase().includes("archived")?zIe():M.includes("(fetch first)")||M.includes("non-fast-forward")?RIe():M.includes("403")||M.toLowerCase().includes("permission denied")?OIe():M},N=()=>{e&&(l(!0),_(null),fct(e.id).then(z=>{a(z.git),n(z.project),tt.fetchQuery(t6()).then(M=>{!M.githubForNewProjects&&!M.githubDefaultPromptSeen&&m(!0)}).catch(()=>{})}).catch(z=>_(C(z))).finally(()=>l(!1)))},E=z=>{S(!0),v(null),t.mutateAsync([z,!0]).then(()=>m(!1)).catch(M=>v(M instanceof Error?M.message:String(M))).finally(()=>S(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:fKe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:kXe({project:(e==null?void 0:e.name)??aIe()})}),e?f&&!i?h.jsx("div",{className:"error",children:f}):i?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:F3,children:[h.jsx("h3",{children:IUe()}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:CVe()}),h.jsx("span",{className:"v",children:i.path}),h.jsx("span",{className:"k",children:"Git"}),h.jsx("span",{className:"v",children:i.gitVersion??ED()}),h.jsx("span",{className:"k",children:rQe()}),h.jsx("span",{className:"v",children:i.initialized?kIe({branch:Ee(i.currentBranch??W5()),state:i.clean?AOe():UIe()}):lPe()}),h.jsx("span",{className:"k",children:aFe()}),h.jsx("span",{className:"v",children:i.baselineBranch}),h.jsx("span",{className:"k",children:oKe()}),h.jsx("span",{className:"v",children:i.remotes.length?i.remotes.map(z=>`${z.name}: ${z.url}`).join(" · "):V5()})]}),!i.initialized&&h.jsx("div",{className:I0,children:h.jsx(Oe,{variant:"primary",onClick:()=>void uct(e.id).then(a).catch(z=>_(String(z))),children:Dqe()})})]}),h.jsxs("div",{className:F3,children:[h.jsx("h3",{children:"GitHub"}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:QPe()}),h.jsx("span",{className:"v",children:h.jsx(Pt,{variant:i.github.authenticated?"success":i.github.ghInstalled?"warning":"error",children:i.github.authenticated?BD():FD()})}),h.jsx("span",{className:"k",children:MVe()}),h.jsx("span",{className:"v",children:y?h.jsxs(h.Fragment,{children:[h.jsxs("span",{children:[i.github.owner,"/",i.github.repo]}),!i.github.enabled&&h.jsx(Pt,{children:vQe()})]}):h.jsx(Pt,{children:MUe()})}),i.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:_Qe()}),h.jsx("span",{className:"v",children:i.github.syncStatus})]})]}),!i.github.authenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(zP,{ghInstalled:i.github.ghInstalled,onCheck:()=>w()})}),i.github.authenticated&&!i.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:y?rJe():nIe()}),h.jsxs("div",{className:I0,children:[y&&i.github.url&&h.jsxs(K0,{href:i.github.url,target:"_blank",rel:"noreferrer",children:[pN()," ",h.jsx(Mf,{size:12})]}),h.jsx(Oe,{variant:"primary",disabled:o,onClick:N,children:o?QDe():GDe()})]})]}),i.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:VHe()}),h.jsxs("div",{className:I0,children:[i.github.url&&h.jsxs(K0,{href:i.github.url,target:"_blank",rel:"noreferrer",children:[pN()," ",h.jsx(Mf,{size:12})]}),h.jsx(Oe,{disabled:o,onClick:()=>{l(!0),dct(e.id).then(z=>{a(z.git),n(z.project)}).catch(z=>_(z instanceof Error?z.message:String(z))).finally(()=>l(!1))},children:o?JDe():FDe()})]})]})]}),h.jsx(OSt,{}),f&&h.jsx("div",{className:"error",children:C(f)})]}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",mu()]}):h.jsx("div",{className:Ho,children:h.jsx("p",{className:wa,children:BWe()})}),p&&h.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop-light flex items-start justify-center pt-[var(--modal-top)] px-4 pb-6 overflow-y-auto z-100",onClick:()=>E(!1),children:h.jsxs("div",{className:"modal max-w-[94vw] max-h-[calc(100vh_-_var(--modal-top)_-_48px)] overflow-y-auto bg-background border border-border rounded-xl shadow-modal p-6 [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-xl github-default-modal w-110 [&_>_p]:m-0 [&_>_p]:text-sm [&_>_p]:leading-relaxed [&_>_p]:text-text [&_>_.error]:mt-3.5",role:"dialog","aria-modal":"true","aria-labelledby":"github-default-title",onClick:z=>z.stopPropagation(),children:[h.jsx("h2",{id:"github-default-title",children:GUe()}),h.jsx("p",{children:DQe()}),b&&h.jsx("div",{className:"error",children:b}),h.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[h.jsx(Oe,{disabled:x,onClick:()=>E(!1),children:bWe()}),h.jsx(Oe,{variant:"primary",disabled:x,onClick:()=>E(!0),children:x?Zi():WBe()})]})]})})]})}const BSt={env:trt,config:irt,xdg:crt,default:Xnt},xw={preparing:qnt,copying:bnt,verifying:hrt,finalizing:Snt},$St=e=>{var n;return((n=xw[e])==null?void 0:n.call(xw))??e};function PSt(){var w;const e=Wct(),n=ct(e),t=n.data??null,r=t?null:((w=n.error)==null?void 0:w.message)??null,[s,i]=R.useState(""),[a,o]=R.useState(!1),[l,u]=R.useState(null),[_,f]=R.useState({kind:"idle"}),[p,m]=R.useState(null);R.useEffect(()=>{t&&i(C=>C||t.current)},[t]),R.useEffect(()=>RL(C=>{C.type==="progress"?f(N=>{const E=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||E}}):C.type==="done"?(f({kind:"done",oldPathLeft:C.oldPathLeft}),u(null),i("")):C.type==="error"&&f({kind:"error",message:C.error})}),[]);const x=(t==null?void 0:t.source)==="env",S=s.trim(),b=t!==null&&S===t.current;async function v(){if(!(a||!S)){o(!0),m(null),u(null);try{u(await Alt(S))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function y(C){if(C.preventDefault(),!(_.kind==="moving"||!S||b)&&(m(null),!!window.confirm(Ant({path:Ee(S)})))){f({kind:"moving",phase:"preparing",copied:0,total:(l==null?void 0:l.treeBytes)??0});try{await Rlt(S)}catch(N){f({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:uQe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:JXe()}),r?h.jsx("div",{className:Ho,children:h.jsx("div",{className:"error",children:r})}):t?h.jsxs("div",{className:Ho,children:[h.jsx("div",{className:"settings-card-head mb-3",children:h.jsx("h3",{children:kHe()})}),h.jsxs("div",{className:If,children:[h.jsx("span",{className:"k",children:lHe()}),h.jsx("span",{className:"v",children:t.current}),h.jsx("span",{className:"k",children:XD()}),h.jsx("span",{className:"v",children:BSt[t.source]()})]}),!x&&h.jsxs("form",{className:rk,onSubmit:y,children:[h.jsxs("label",{children:[pGe(),h.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{i(C.target.value),u(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:_.kind==="moving"})]}),l&&!l.error&&l.ok&&h.jsxs("p",{className:wa,children:[XVe()," ",Fl(l.treeBytes??0),l.freeBytes!=null&&` — ${Nnt({size:Ee(Fl(l.freeBytes))})}`,l.sameFilesystem?Vnt():"","."]}),l&&l.ok===!1&&l.error&&h.jsx("div",{className:"error",children:l.error}),p&&h.jsx("div",{className:"error",children:p}),_.kind==="moving"&&h.jsx(mP,{value:_.copied,max:_.total,label:$St(_.phase),caption:_.total>0?h.jsxs("span",{className:"text-sm",children:[Fl(_.copied)," / ",Fl(_.total)]}):void 0}),_.kind==="done"&&h.jsxs("p",{className:wa,children:[oGe(),_.oldPathLeft&&h.jsxs(h.Fragment,{children:[" ",bPe({path:Ee(_.oldPathLeft)})]})]}),_.kind==="error"&&h.jsxs("div",{className:"error",children:[rGe()," ",_.message]}),h.jsxs("div",{className:"actions",children:[h.jsx(Oe,{type:"button",onClick:v,disabled:a||!S||b||_.kind==="moving",children:a?Ea():eOe()}),h.jsx(Oe,{variant:"primary",type:"submit",disabled:!S||b||_.kind==="moving",children:_.kind==="moving"?$nt():Lnt()})]})]})]}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",mu()]})]})}const U3=e=>e==="running"||e==="starting";function FSt(e){return U3(e.status)?X1(Date.now()-e.createdAt):e.endedAt?X1(e.endedAt-e.createdAt):"—"}function TP({instances:e,emptyLabel:n}){return e.length===0?h.jsx("p",{className:"instances-empty m-0 rounded-lg border border-border bg-background py-3.5 px-4 text-base text-subtext",children:n}):h.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:h.jsxs("table",{className:"runs-table w-full border-collapse bg-background text-base [&_th]:text-start [&_th]:text-text [&_th]:text-sm [&_th]:font-medium [&_th]:py-2 [&_th]:px-3 [&_th]:border-b [&_th]:border-b-border [&_th]:sticky [&_th]:top-0 [&_th]:bg-background [&_th]:z-1 [&_td]:py-2 [&_td]:px-3 [&_td]:border-b [&_td]:border-b-divider-faint [&_td]:whitespace-nowrap [&_tr:last-child_td]:border-b-0 [&_tr.clickable]:cursor-pointer [&_tr.clickable:hover_td]:bg-canvas",children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:nFe()}),h.jsx("th",{children:t_()}),h.jsx("th",{children:JKe()}),h.jsx("th",{children:SKe()})]})}),h.jsx("tbody",{children:e.map(t=>{var s;const r=typeof((s=t.backend)==null?void 0:s.url)=="string"?t.backend.url:void 0;return h.jsxs("tr",{children:[h.jsx("td",{children:h.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[h.jsx(N6,{backend:t.backend}),r&&h.jsx(Xv,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:_N(),"aria-label":_N(),onClick:i=>i.stopPropagation(),children:h.jsx(Mf,{size:12})})]})}),h.jsx("td",{children:h.jsx(Vl,{status:Ui(t)})}),h.jsx("td",{children:$o(t.createdAt)}),h.jsx("td",{children:FSt(t)})]},t.id)})})]})})}function HSt({projectId:e,onViewHistory:n}){var f;const t=ct({...tu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(f=t.error)==null?void 0:f.message,i=t.isFetching,[,a]=R.useState(0);R.useEffect(()=>{const p=setInterval(()=>a(m=>m+1),3e4);return()=>clearInterval(p)},[]);const o=()=>{e&&t.refetch()},l=(p,m)=>m.createdAt-p.createdAt,u=r==null?void 0:r.filter(p=>U3(p.status)).sort(l),_=r==null?void 0:r.filter(p=>!U3(p.status)).sort(l);return h.jsxs("section",{className:"compute-activity [&_.count-badge]:inline-flex [&_.count-badge]:items-center [&_.count-badge]:justify-center [&_.count-badge]:min-w-4.5 [&_.count-badge]:h-4.5 [&_.count-badge]:py-0 [&_.count-badge]:px-[5px] [&_.count-badge]:rounded-md [&_.count-badge]:bg-canvas [&_.count-badge]:border [&_.count-badge]:border-border [&_.count-badge]:text-xs [&_.count-badge]:font-medium [&_.count-badge]:text-text mt-5.5 mx-0 mb-8",children:[h.jsxs("div",{className:"compute-activity-head flex items-start justify-between gap-5 mb-3.5 [&_h2]:flex [&_h2]:items-center [&_h2]:gap-2 [&_h2]:m-0 [&_h2]:text-lg [@media((max-width:_640px))]:items-stretch [@media((max-width:_640px))]:flex-col",children:[h.jsx("div",{children:h.jsxs("h2",{children:[bKe(),u&&u.length>0&&h.jsx("span",{className:"count-badge",children:u.length})]})}),h.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[h.jsxs(Oe,{size:"small",onClick:o,disabled:i,children:[h.jsx(Za,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",qp()]}),h.jsx(Oe,{size:"small",onClick:n,children:_!=null&&_.length?k4e({count:tn(_.length)}):y4e()})]})]}),s&&h.jsx("div",{className:"error",children:s}),!u||!_?h.jsxs(ss,{children:[h.jsx(Dt,{})," ",mu()]}):h.jsx(TP,{instances:u,emptyLabel:e?l4e():m4e()})]})}function qSt({projectId:e,onBack:n}){var l;const t=ct({...tu(e??""),enabled:!!e,subscribed:!!e}),r=e?t.data??(t.error?[]:null):[],s=(l=t.error)==null?void 0:l.message,i=t.isFetching,[,a]=R.useState(0);R.useEffect(()=>{const u=setInterval(()=>a(_=>_+1),3e4);return()=>clearInterval(u)},[]);const o=()=>{e&&t.refetch()};return h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",className:"settings-back inline-flex items-center gap-1.5 mt-0 mx-0 mb-4.5 text-subtext text-sm font-medium [&:hover]:text-text",onClick:n,children:[h.jsx(X0,{size:14})," ",HD()]}),h.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[h.jsx("h1",{children:Zqe()}),h.jsxs(Oe,{size:"small",onClick:o,disabled:i,children:[h.jsx(Za,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",qp()]})]}),s&&h.jsx("div",{className:"error",children:s}),r?h.jsx(TP,{instances:[...r].sort((u,_)=>_.createdAt-u.createdAt),emptyLabel:e?s4e():d4e()}):h.jsxs(ss,{children:[h.jsx(Dt,{})," ",mu()]})]})}const jP=["projects","harnesses","storage"],USt=[{id:"compute",label:qD,icon:h.jsx(SO,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:GD,icon:h.jsx(r_,{size:15}),activeTabs:["environment"]},{id:"settings",label:X5,icon:h.jsx(jO,{size:15}),activeTabs:["settings",...jP]}];function GSt(e){return jP.includes(e)}function WSt({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||GSt(e),a=R.useRef(null);return R.useLayoutEffect(()=>{const o=a.current,l=o==null?void 0:o.parentElement;if(!o||!l)return;const u=()=>o.scrollIntoView({block:"start"}),_=new ResizeObserver(u);_.observe(l),u();const f=()=>_.disconnect(),p=["wheel","touchstart","pointerdown","keydown"];for(const m of p)window.addEventListener(m,f,{passive:!0});return()=>{f();for(const m of p)window.removeEventListener(m,f)}},[e,n==null?void 0:n.id]),h.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl [&_>_.error]:text-accent-red [&_>_.error]:text-base [&_>_.error]:whitespace-pre-wrap [&_>_.error]:mt-0 [&_>_.error]:mx-0 [&_>_.error]:mb-3",children:[i&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:X5()}),h.jsxs("div",{className:"settings-stack mt-4.5",children:[h.jsx("section",{className:qd,children:h.jsx(jSt,{})}),h.jsx("section",{ref:e==="projects"?a:void 0,className:qd,children:h.jsx(LSt,{})}),h.jsx("section",{ref:e==="harnesses"?a:void 0,className:qd,children:h.jsx(rSt,{})}),!s&&h.jsx("section",{ref:e==="storage"?a:void 0,className:qd,children:h.jsx(PSt,{})}),h.jsx("section",{className:qd,children:h.jsx(MSt,{})}),!s&&h.jsx("section",{className:qd,children:h.jsx(RSt,{})})]})]}),e==="compute"&&h.jsx(wSt,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&h.jsx(qSt,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:GD()}),h.jsx(zSt,{})]}),e==="git"&&h.jsx(ISt,{project:n,onProjectUpdate:t})]})}function VSt({skills:e,activeIndex:n,onPick:t,onHover:r}){return h.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 min-w-85 max-w-full p-1.5 bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden",children:e.map((s,i)=>h.jsxs("button",{type:"button",className:`skill-item flex flex-col gap-0.5 w-full text-start py-[7px] px-2 rounded-sm [&.active]:bg-surface [&_.skill-name]:text-sm [&_.skill-desc]:text-sm [&_.skill-desc]:text-subtext ${i===n?"active":""}`,onMouseDown:a=>{a.preventDefault(),t(s)},onMouseEnter:()=>r(i),children:[h.jsxs("span",{className:"skill-name flex items-center gap-1.5",children:["/",s.name,s.source!=="command"&&h.jsx(Pt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:sL()})]}),h.jsx("span",{className:"skill-desc",children:s.description})]},s.name))})}const Qj={name:"plan",get description(){return yze()},source:"command"};function ww(e,n){if(n<0||n>e.length)return null;let t=n;for(;t>0&&!/\s/.test(e[t-1]);)t-=1;if(e[t]!=="/")return null;let r=n;for(;r1&&/[ \t]$/.test(i)&&(i=i.replace(/[ \t]+$/,_=>_.includes(" ")||_.length>=r?_:s));let a=e.slice(n.end);if(!a)a=s;else if(!a.startsWith(` +`)){const _=(l=/^[ \t]+/.exec(a))==null?void 0:l[0];a=_?`${_.length>=r?_:s}${a.slice(_.length)}`:s+a}const o=((u=/^[ \t]+/.exec(a))==null?void 0:u[0].length)??0;return{text:`${i}/${t}${a}`,cursor:i.length+t.length+1+o}}function Xj(e,n){let t=e.slice(0,n.start),r=e.slice(n.end);return t?r?/\s$/.test(t)&&/^\s/.test(r)&&(r=r.slice(1)):t=t.replace(/\s$/,""):r=r.replace(/^\s/,""),{text:t+r,cursor:t.length}}function QSt(e,n){const t=e.filter(r=>r.name.toLowerCase()!==Qj.name);return n?[Qj,...t]:t}function YSt(e,n){if(!n)return null;const t=/(^|\s)\/plan(?=\s|$)/gi;return t.test(e)?{prompt:e.replace(t,"").trim()}:null}function Zj(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const XSt=["font-family","font-size","font-weight","font-style","font-variant","line-height","letter-spacing","word-spacing","text-transform","direction","unicode-bidi","tab-size","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width"];function AP(e,n,t,r,s,i=!1){let a=0;return KSt(e,n).map((o,l)=>{const u=a+o.text.length;a=u;const _=o.text.slice(1).toLowerCase();return o.command&&s?s(o.text,_,u,l):o.command?h.jsxs("span",{className:t,onMouseDown:void 0,children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.text.slice(1)]},l):i?h.jsx("span",{"aria-hidden":"true",children:o.text},l):h.jsx(R.Fragment,{children:o.text},l)})}function ZSt({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:i}){const a=R.useRef(null),o=R.useRef(null),l=R.useRef(null),u=R.useId(),[_,f]=R.useState(!1),p=ct({...tut(n,s),enabled:_,subscribed:_}),m=p.data??null,x=p.isFetching,[S,b]=R.useState({}),v=()=>{l.current!==null&&window.clearTimeout(l.current),l.current=null},y=()=>{const N=a.current;if(!N)return;const E=N.getBoundingClientRect(),j=Math.min(420,window.innerWidth-32),z=Math.max(16,Math.min(E.left-4,window.innerWidth-j-16));b(E.top>300?{bottom:window.innerHeight-E.top+12,left:z,width:j}:{left:z,top:E.bottom+12,width:j})},w=()=>{v(),y(),f(!0)},C=()=>{v(),l.current=window.setTimeout(()=>f(!1),120)};return R.useEffect(()=>()=>v(),[]),R.useEffect(()=>{if(!_)return;const N=()=>y();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[_]),h.jsxs(R.Fragment,{children:[h.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":_,"aria-label":bQ({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:w,onMouseLeave:C,onFocus:w,onBlur:C,onKeyDown:N=>{var E,j;if(N.key==="Escape"){f(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),w();return}_&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(E=o.current)==null||E.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),_&&(N.key==="ArrowUp"||N.key==="PageUp")&&(N.preventDefault(),(j=o.current)==null||j.scrollBy({top:N.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:N=>{var E,j;N.preventDefault(),(E=i.current)==null||E.focus(),(j=i.current)==null||j.setSelectionRange(t,t),v()},children:[h.jsx("span",{className:"pointer-events-none absolute -inset-[7px] z-0 rounded-md bg-skill-blue-subtle opacity-0 transition-opacity group-hover/skill:opacity-100"}),h.jsxs("span",{className:"relative z-1",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),e.slice(1)]})]}),_&&Go.createPortal(h.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":XQ({name:n}),style:{...S,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:v,onMouseLeave:C,onFocus:v,onBlur:C,onMouseDown:N=>N.stopPropagation(),children:[h.jsxs("div",{className:"sticky top-0 z-1 flex items-center gap-2 border-b border-border-variant bg-background px-4 py-3",children:[h.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),h.jsx(Pt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:sL()})]}),h.jsx("div",{className:"p-4 text-sm text-text",children:x&&m===null?h.jsx("span",{className:"text-muted",children:gJe()}):h.jsx(Fo,{text:m??r.description})})]}),document.body)]})}function JSt({text:e,isCommand:n}){return h.jsx(h.Fragment,{children:AP(e,n,"skill-chip mx-1 inline-flex items-center rounded-md px-2 py-1 font-medium text-skill-blue transition-colors hover:bg-skill-blue-subtle")})}function ekt({text:e,isCommand:n,skills:t,projectId:r,textareaRef:s}){const i=R.useRef(null);return R.useLayoutEffect(()=>{const a=s.current,o=i.current;if(!a||!o)return;const l=()=>{const _=getComputedStyle(a);for(const f of XSt)o.style.setProperty(f,_.getPropertyValue(f));o.style.width=`${a.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};l();const u=new ResizeObserver(l);return u.observe(a),()=>u.disconnect()},[e,s]),R.useLayoutEffect(()=>{const a=s.current;if(!a)return;const o=()=>{i.current&&(i.current.scrollTop=a.scrollTop)};return o(),a.addEventListener("scroll",o),()=>a.removeEventListener("scroll",o)},[s,e]),h.jsxs("div",{ref:i,className:"composer-chips pointer-events-none absolute inset-y-0 start-0 z-2 box-border overflow-hidden whitespace-pre-wrap break-words border-solid border-transparent text-transparent select-none",children:[AP(e,n,"",void 0,(a,o,l,u)=>{const _=t.find(f=>f.name===o);return _&&_.source!=="command"?h.jsx(ZSt,{label:a,name:o,end:l,skill:_,projectId:r,textareaRef:s},`${u}:${l}`):h.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),a.slice(1)]},`${u}:${l}`)},!0),"​"]})}function tkt(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const G3=6.5,Jj=2*Math.PI*G3;function nkt({usage:e}){return!e||e.usedTokens<=0?null:h.jsx(rkt,{usage:e})}function rkt({usage:e}){const{open:n,setOpen:t,ref:r}=Ja(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":tkt(a),l=a===null?"":new Intl.NumberFormat(T(),{style:"percent"}).format(a/100);return h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[h.jsx("button",{type:"button",className:`${a===null?"inline-flex h-8 items-center rounded-md px-1 transition-[background,color] duration-150 ease-standard hover:bg-surface":"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-text transition-[background,color] duration-150 ease-standard hover:bg-surface"} composer-bare context-ring text-sm text-text`,title:zme(),onClick:()=>t(u=>!u),children:a===null?wg(s):h.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:G3,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),h.jsx("circle",{cx:"8",cy:"8",r:G3,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${Jj*Math.max(a,2)/100} ${Jj}`,transform:"rotate(-90 8 8)"})]})}),n&&h.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 align-right context-meter-menu w-70 pt-2.5 px-3 pb-3 [&_.progress]:mt-2 [&_.progress]:mx-0 [&_.progress]:mb-0 [&_.progress-track]:h-[5px] [&_.progress-track]:border-0 [&_.progress-track]:bg-border",children:[h.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[h.jsx("span",{children:kme()}),h.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?Rme({value:Ee(wg(s))}):Ome({used:Ee(wg(s)),total:Ee(wg(i)),percent:Ee(l)})})]}),a!==null&&h.jsx(mP,{value:s,max:i,fillColor:o})]})]})}const Sv="!";function eA(e){return e.startsWith(Sv)?e.slice(Sv.length).trim():null}function skt(e){return e.startsWith(Sv)?e.slice(Sv.length):e}function ikt(e){return e.replace(/([\\`*_[\]<>$~])/g,"\\$1").replace(/(^|\n)(\s*)(#{1,6}|>|[-+]|\d+\.)\s/g,"$1$2\\$3 ").replace(/(^|\n)(\s*)(=+|-{1,2})(?=\s*(?:\n|$))/g,"$1$2\\$3").replace(/(^|\n)(\s*)(-{3,})(?=\s*(?:\n|$))/g,"$1$2\\$3")}function akt(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),s=>s[0].length)),t="`".repeat(n+1),r=/^[\s`]|[\s`]$/.test(e)?` ${e} `:e;return`${t}${r}${t}`}function okt(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` + +${t} +${e.replace(/^\n|\n$/g,"")} +${t} + +`}function W3(e,n){return n?` + +\\[ +${e} +\\] + +`:`\\(${e}\\)`}function lkt(e,n){const t=n.trim().split(` +`),r=" ".repeat(e.length+1);return[`${e} ${t[0]??""}`,...t.slice(1).map(s=>s?`${r}${s}`:"")].join(` +`)}function ckt(e,n){if(e.length===0)return"";const t=Math.max(...e.map(a=>a.length)),r=a=>`| ${Array.from({length:t},(o,l)=>a[l]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),i=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...i.map(r)].join(` +`)}function ukt(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function fkt(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function dkt(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const RP="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",sk="tool-output py-1.5 px-2.5 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere max-h-65 overflow-y-auto bg-background border border-border-variant rounded-sm",_u=256,MP=1024,DP=2e4,Sw=8,Yg="chat-annotations";function cf(e){return e instanceof Element?e:e.parentElement}function tA(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function kw(e,n){return tA(e).compareBoundaryPoints(Range.START_TO_START,tA(n))<0}function nA(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const hkt=new Set(["A","B","CODE","EM","I","STRONG"]);function _kt(e,n){var s,i;const t=cf(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=cf(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(hkt.has(a.tagName)){const o=a.cloneNode(!1);o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(o))}a=a.parentElement}}const r=(s=cf(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const a=(i=r.querySelector("code"))==null?void 0:i.cloneNode(!1),o=r.cloneNode(!1);o instanceof HTMLElement&&a instanceof HTMLElement&&(a.replaceChildren(...Array.from(n.childNodes)),o.replaceChildren(a),n.replaceChildren(o))}}function pkt(e){e.querySelectorAll("button").forEach(n=>{n.replaceWith(document.createTextNode(n.textContent??""))}),e.querySelectorAll("script, style, iframe, object, embed, input, textarea, select").forEach(n=>n.remove()),e.querySelectorAll("*").forEach(n=>{for(const t of Array.from(n.attributes))(t.name.toLowerCase().startsWith("on")||t.name==="contenteditable"||t.name==="tabindex")&&n.removeAttribute(t.name)})}function mkt(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const i=Array.from(n.querySelectorAll(".katex")).filter(a=>e.intersectsNode(a));for(const a of i){const o=a.closest(".katex-display")??a,l=document.createRange();l.selectNode(o);const u={container:l.startContainer,offset:l.startOffset},_={container:l.endContainer,offset:l.endOffset};if(kw(s,u)&&t.append(nA(s,u)),t.append(o.cloneNode(!0)),s=_,!kw(s,r))break}return i.length===0?t.append(e.cloneContents()):kw(s,r)&&t.append(nA(s,r)),_kt(e,t),pkt(t),t}function gkt(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>dp(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` + +${ckt(n,!!e.querySelector("tr:first-child th"))} + +`:""}function LP(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const i=[];for(const a of Array.from(e.children).filter(o=>o instanceof HTMLElement&&o.tagName==="LI")){const o=a.getAttribute("value"),l=o===null?s:Number(o),u=Number.isFinite(l)?l:s;s=u+1;const _=Array.from(a.childNodes).map(f=>f instanceof HTMLElement&&f.matches("UL, OL")?` +${LP(f).trim()} +`:dp(f)).join("").trim();i.push(lkt(n?`${u}.`:"-",_))}return` + +${i.join(` +`)} + +`}function dp(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return ikt(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(dp).join("");if(e.matches(".katex-display")){const l=(s=(r=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:r.textContent)==null?void 0:s.trim();return l?W3(l,!0):""}if(e.matches(".katex")){const l=(a=(i=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:i.textContent)==null?void 0:a.trim();return l?W3(l,!1):""}if(e.tagName==="BR")return` +`;if(e.tagName==="TABLE")return gkt(e);if(e.matches("UL, OL"))return LP(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return akt(e.textContent??"");if(e.tagName==="PRE")return okt(e.textContent??"");const n=Array.from(e.childNodes).map(dp).join("");if(!n)return"";if(e.matches("strong, b"))return`**${n}**`;if(e.matches("em, i"))return`*${n}*`;if(e.tagName==="A"){const l=e.getAttribute("href");return l?`[${n}](${l})`:n}if(e.tagName==="LI")return`${n.trim()} +`;if(e.matches("TH, TD"))return`${n.trim()} | `;if(e.tagName==="TR")return`${n.replace(/ \| $/,"")} +`;if(e.tagName==="BLOCKQUOTE")return` + +${n.trim().split(` +`).map(l=>`> ${l}`).join(` +`)} + +`;const t=ukt(e.tagName,n);return t?` + +${t} + +`:e.matches("P, DIV, UL, OL, TABLE")?` + +${n.trim()} + +`:n}function vkt(e,n){return dp(e).replace(/\r\n?/g,` +`).replace(/[ \t]+\n/g,` +`).replace(/\n{3,}/g,` + +`).trim()||n}function rA(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function bkt(e,n){var s,i,a,o;if(!fkt(e))return;const t=rA(e);if(t.length<8)return;let r;for(const l of n.querySelectorAll(".msg-assistant > .md .katex")){const _=[(s=l.querySelector(".katex-mathml"))==null?void 0:s.textContent,(i=l.querySelector(".katex-html"))==null?void 0:i.textContent,l.textContent].filter(x=>!!x).map(rA).find(x=>dkt(x,t));if(!_)continue;const f=(o=(a=l.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();if(!f)continue;const p=!!l.closest(".katex-display"),m={markdown:W3(f,p).trim(),delta:Math.abs(_.length-t.length)};(!r||m.deltaz.width>0&&z.height>0),x=m[0]??t.getBoundingClientRect(),S=m.filter(z=>z.topx.top),b=S.length>0?S:[x],v=Math.min(...b.map(z=>z.left)),y=Math.max(...b.map(z=>z.right)),w=Math.min(...b.map(z=>z.top)),C=Math.max(...b.map(z=>z.bottom)),N=34,E=74,j=w>=N+Sw?w-N-Sw:C+Sw;return{text:vkt(p,f),range:t.cloneRange(),x:Math.min(window.innerWidth-E,Math.max(E,v+(y-v)/2)),top:j}}function xkt(e,n){const[t,r]=R.useState(null),s=R.useRef(!1),i=R.useCallback(()=>{const l=e.current;r(l?ykt(l):null)},[e]);R.useEffect(()=>{let l=null;const u=()=>{s.current||i()},_=p=>{const m=e.current,x=p.target;!p.isPrimary||p.button!==0||!m||!(x instanceof Node)||!m.contains(x)||(s.current=!0,r(null))},f=p=>{!p.isPrimary||!s.current||(s.current=!1,l=window.requestAnimationFrame(i))};return document.addEventListener("selectionchange",u),document.addEventListener("pointerdown",_,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",_,!0),window.removeEventListener("pointerup",f,!0),window.removeEventListener("pointercancel",f,!0),l!==null&&window.cancelAnimationFrame(l),s.current=!1}},[i]),R.useEffect(()=>{if(!t)return;const l=u=>{const _=u.target;_ instanceof Element&&_.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",l,!0),window.addEventListener("resize",i),()=>{document.removeEventListener("mousedown",l,!0),window.removeEventListener("resize",i)}},[t,i]);const a=R.useCallback(()=>{var l;t&&(n({text:t.text,range:t.range}),r(null),(l=window.getSelection())==null||l.removeAllRanges())},[t,n]),o=R.useCallback(()=>r(null),[]);return{action:t,add:a,dismiss:o}}function wkt(e){R.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const n=e.flatMap(r=>r.range?[r.range]:[]);if(n.length===0){CSS.highlights.delete(Yg);return}const t=new Highlight(...n);return CSS.highlights.set(Yg,t),()=>{CSS.highlights.get(Yg)===t&&CSS.highlights.delete(Yg)}},[e])}function Skt({annotation:e}){const n=R.useRef(null),[t,r]=R.useState();return R.useLayoutEffect(()=>{var i;const s=(i=n.current)==null?void 0:i.closest(".chat-thread-inner");r(s?bkt(e.text,s):void 0)},[e.id,e.text]),h.jsx("div",{ref:n,children:h.jsx(Fo,{text:t??e.text})})}function kkt({annotations:e,onRemove:n}){return e.map((t,r)=>h.jsxs("div",{className:`annotation-item grid gap-2 py-2 px-1 [&+&]:border-t [&+&]:border-border-variant ${n?"grid-cols-[24px_minmax(0,_1fr)_28px]":"grid-cols-[24px_minmax(0,_1fr)]"}`,children:[h.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-sm text-muted mb-1",children:nfe()}),h.jsx(Skt,{annotation:t})]}),n&&h.jsx(on,{type:"button",size:"small","data-annotation-remove":!0,title:Tue(),"aria-label":SQ({number:tn(r+1)}),onClick:()=>n(t.id),children:h.jsx(ts,{size:13})})]},t.id))}function ik({annotations:e,variant:n,onClear:t,onRemove:r}){const s=R.useRef(null),i=R.useRef(null),a=R.useId(),o=Ja(s),l=n==="sent",u=R.useRef(null),_=()=>{u.current!==null&&window.clearTimeout(u.current),u.current=null,o.setOpen(!0)},f=()=>{u.current=window.setTimeout(()=>{var x;(x=i.current)!=null&&x.contains(document.activeElement)||o.setOpen(!1)},160)},p=()=>{const x=l||!o.open;o.setOpen(x),x&&window.requestAnimationFrame(()=>{var S;return(S=i.current)==null?void 0:S.focus()})},m=x=>{r==null||r(x),window.requestAnimationFrame(()=>{var b,v;(v=((b=i.current)==null?void 0:b.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||v.focus()})};return R.useEffect(()=>()=>{u.current!==null&&window.clearTimeout(u.current)},[]),h.jsxs("div",{className:l?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:o.ref,onMouseEnter:l?_:void 0,onMouseLeave:l?f:void 0,children:[h.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${l?"rounded-full":"rounded-sm"}`,children:[h.jsxs("button",{ref:s,type:"button",className:`inline-flex items-center gap-1.5 py-1 text-sm font-medium text-text [&:hover]:bg-surface ${l?"px-2.5":"ps-2 pe-1.5"}`,"aria-expanded":o.open,"aria-haspopup":"dialog","aria-controls":a,onClick:p,children:[h.jsx(EO,{size:l?13:14,className:"text-muted"}),e.length===1?pae():Cse({count:tn(e.length)})]}),t&&h.jsx("button",{type:"button",className:"inline-flex items-center justify-center self-stretch w-6.5 text-muted border-s border-border [&:hover]:bg-surface [&:hover]:text-text",title:aE(),"aria-label":aE(),onClick:t,children:h.jsx(ts,{size:13})})]}),o.open&&h.jsx("div",{id:a,ref:i,tabIndex:-1,className:`annotation-menu absolute bottom-[calc(100%_+_8px)] z-50 w-[min(440px,_calc(100vw_-_48px))] max-h-80 overflow-y-auto overscroll-contain bg-background border border-border rounded-lg shadow-popover p-2 text-start ${l?"end-0 after:absolute after:top-full after:start-0 after:end-0 after:h-2 after:content-['']":"start-3"}`,role:"dialog","aria-label":Zue(),children:h.jsx(kkt,{annotations:e,onRemove:r?m:void 0})})]})}function Ckt(e){return h.jsx(ik,{...e,variant:"composer"})}const Ekt=["prompt-collapsed text-muted text-base font-[375] my-3.5 mx-0 [&_summary]:flex","[&_summary]:items-center [&_summary]:gap-2 [&_summary]:cursor-pointer","[&_summary]:list-none [&_summary]:select-none [&_summary::-webkit-details-marker]:hidden","[&_summary::after]:content-['›'] [&_summary::after]:text-muted","[&_summary::after]:transition-transform [&_summary::after]:duration-80 [&_summary::after]:ease-standard [&[open]_summary::after]:rotate-90"].join(" "),sA=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),Nkt=["prompt-collapsed plan-resolved text-subtext my-3.5 mx-0","[&_summary]:flex [&_summary]:items-center [&_summary]:gap-2 [&_summary]:w-fit [&_summary]:max-w-full","[&_summary]:py-[3px] [&_summary]:px-1 [&_summary]:cursor-pointer [&_summary]:rounded-sm","[&_summary]:list-none [&_summary]:select-none [&_summary:hover]:bg-surface","[&_summary::-webkit-details-marker]:hidden","[&_summary_.plan-chevron]:transition-transform [&_summary_.plan-chevron]:duration-120","[&_summary_.plan-chevron]:ease-standard [&[open]_summary_.plan-chevron]:rotate-90"].join(" "),zkt=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),V3="prompt-actions flex flex-wrap gap-2",iA=[],Tkt=[],h0={};function nf(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function Cw(e){var t;const n=e.replace(/\\/g,"/").replace(/\/+$/,"").split("/").filter(Boolean);return((t=n.at(-1))==null?void 0:t.toLowerCase())!=="skill.md"?null:n.at(-2)??null}function jkt(e,n){return/^orx-[a-z0-9]+(?:-[a-z0-9]+)*$/.test(n)?e==="Skill"?`.claude/skills/${n}/SKILL.md`:e==="skill"?`.opencode/skills/${n}/SKILL.md`:null:null}function Is(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function Ew(e,n,t){const r=e[n];if(!Array.isArray(r))return null;for(const s of r){if(!s||typeof s!="object"||!(t in s))continue;const i=s[t];if(typeof i=="string"&&i)return i}return null}function Nw(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=_u));s++);return r}function Akt(e,n){const t=e[n];if(!Array.isArray(t))return null;const r=[];for(const s of t){if(typeof s!="string")return null;r.push(s)}return r}function uh(...e){const n=new Set,t=new RegExp(`^${zf}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=_u||r++>=MP)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function Gb(e){return e.replace(/^Exit code \d+\s*/i,"").split(` +`).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` +`).trim()}function Rkt(e){const n=e.changes;if(!Array.isArray(n))return null;for(const t of n){if(!t||typeof t!="object"||!("path"in t)||typeof t.path!="string")continue;const r="kind"in t?t.kind:null,s=r&&typeof r=="object"&&"type"in r&&typeof r.type=="string"?r.type:null;return{path:t.path,type:s}}return null}function Mkt(e){const n=e.trim(),t=n.match(/^\/bin\/(?:ba|z)?sh\s+-lc\s+([\s\S]+)$/);let r=((t==null?void 0:t[1])??n).trim();return r=cvt(r),OP(r)}function OP(e){return Lkt(e).replace(/[\t\r ]+/g," ").trim()}function Dkt(e){let n=null,t=!1;for(let r=0;r!i.startsWith("-")&&i.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&BP(s)?{ref:r,path:s}:null}function Bkt(e){const n=e.match(/\b(?:rg|grep)\b(?:\s+-[^\s]+)*\s+(?:"([^"]+)"|'([^']+)'|([^\s]+))/);return(n==null?void 0:n[1])??(n==null?void 0:n[2])??(n==null?void 0:n[3])??null}function aA(e,n){if(/[$`~]/.test(e)||/[$`~]/.test(n))return null;const t=n.startsWith("/")||!n.startsWith("/")&&e.startsWith("/"),r=n.startsWith("/")?[]:e.split("/").filter(Boolean);for(const i of n.split("/"))if(!(!i||i===".")){if(i===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(i);continue}r.push(i)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function $kt(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let i=0;i!u.startsWith("-"));if(!o)return null;const l=aA(s,o);if(!l)return null;s=l}return s?aA(s,e):e}const ko="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",Pkt=new RegExp(`\\bchat_(${ko})\\b`,"gi"),zf=`(?:${ko}|[0-9a-f]{8})`;function fh(e){const n=[];let t="",r="",s=null,i=!1;const a=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},o=u=>{let _=1,f=null,p=!1;for(let m=u;m{let _=!1;for(let f=u;fdvt(t.raw,n))}function ga(e,n){return Wb(e,n).length>0}function Fkt(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,DP).matchAll(Pkt))if(n.add(t[0].toLowerCase()),n.size>=_u)break;return[...n]}function K3(e,n){if(!e)return[];const t=new Set,r=e.slice(0,DP),s=n==="runs"?[new RegExp(`/runs/(${ko})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${ko})`,"gi"),new RegExp(`^\\s*RUN\\s+(${ko})\\b`,"gim"),new RegExp(`={3,}\\s*(${ko})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${ko})`,"gi"),new RegExp(`^\\s*id:\\s*(${ko})`,"gim"),new RegExp(`={3,}\\s*(${ko})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=_u)return[...t];const i=new RegExp(`^\\s*(${ko})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=_u)break;return[...t]}function PP(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),i=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,i+r.raw.length),{invocation:r,offset:Math.max(0,i)}})}function FP(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let i="";for(const a of e.matchAll(s)){if((a.index??0)>=t)break;i=a[1]??a[2]??a[3]??""}return[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function HP(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let i="";for(const a of e.matchAll(s)){const o=a.index??0;if(o>=t)break;const l=o+a[0].length;l<=t&&/\bdone\b/.test(e.slice(l,t))||(i=a[1])}return/\$\(|`/.test(i)?[]:[...i.matchAll(new RegExp(r,"gi"))].map(a=>a[0])}function Hkt(e,n,t=[],r=[]){const s=Wb(e,"logs"),i=new Set;if(s.length===0){if(!ga(e,"logs"))return[];const o=t.length>0?[]:K3(n,"runs");for(const l of t.length>0?t:o.length>0?o:r)if(i.add(l),i.size>=_u)break;return uh([...i])}let a=!1;for(const{invocation:o,offset:l}of PP(e,s)){const u=Fh(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const _=u.slice(1);let f=null;for(let b=0;b<_.length;b++){const v=_[b];if(v!=="--head"){if(v==="--bytes"||v==="--range"){b++;continue}if(!(v.startsWith("--bytes=")||v.startsWith("--range="))){f=v;break}}}if(!f){a=!0;continue}if(new RegExp(`^${zf}$`,"i").test(f)){i.add(f);continue}const p=/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(f);if(!p){a=!0;continue}const m=p[1],x=FP(e,m,l,zf);for(const b of x)i.add(b);const S=HP(e,m,l,zf);for(const b of S)i.add(b);x.length===0&&S.length===0&&(a=!0)}if(i.size===0||a){const o=t.length>0?[]:K3(n,"runs"),l=t.length>0?t:o.length>0?o:r;for(const u of l)if(i.add(u),i.size>=_u)break}return uh([...i])}function Ud(e,n,t=[],r=[]){const s=Wb(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:l}of PP(e,s)){const u=Fh(o.raw),_=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let f=!1;_&&new RegExp(`^${zf}$`,"i").test(_)&&(i.add(_),f=!0);const p=_?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(_):null;if(p){const m=p[1],x=FP(e,m,l,zf);if(x.length>0){for(const b of x)i.add(b);f=!0}const S=HP(e,m,l,zf);for(const b of S)i.add(b);S.length>0&&(f=!0)}f||(a=!0)}if(i.size===0||a){const o=t.length>0?[]:K3(n,"experiments"),l=t.length>0?t:o.length>0?o:r;for(const u of l)if(i.add(u),i.size>=_u)break}return uh([...i])}const oA=new WeakMap;function Bf(e){const n=T(),t=oA.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=qkt(e);return oA.set(e,{locale:n,activity:r}),r}function qkt(e){var v,y,w,C;const n=e.tool??"tool",t=((v=e.state)==null?void 0:v.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=Is(i,"command","cmd"),o=Akt(i,"commandArgv"),l=((y=e.state)==null?void 0:y.output)||((w=e.state)==null?void 0:w.error),u=uh(Nw(i,"targetIds")),_=uh(Nw(i,"runTargetIds")),f=uh(Nw(i,"experimentTargetIds")),p=Is(i,"filePath","file_path","notebookPath","notebook_path","path"),m=Is(i,"description"),x=n.toLowerCase().split(/(?::|\.|__)+/),S=x.at(-1)??n.toLowerCase();if(S==="run"&&x.includes("web")){const N=Ew(i,"search_query","q"),E=Ew(i,"image_query","q"),j=Ew(i,"find","pattern");return N?{kind:"web",label:U9({query:N})}:E?{kind:"web",label:_J({query:E})}:j?{kind:"web",label:RJ({pattern:j})}:Array.isArray(i.open)?{kind:"web",label:zce()}:Array.isArray(i.weather)?{kind:"web",label:Xoe()}:Array.isArray(i.finance)?{kind:"web",label:qoe()}:Array.isArray(i.sports)?{kind:"web",label:Voe()}:Array.isArray(i.time)?{kind:"web",label:$oe()}:{kind:"web",label:sE()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["subagentactivity","subagent"]]).get(S)??S){case"bash":{if(!a&&!(o!=null&&o.length))return{kind:"command",label:tue()};const N=Mkt(a??(o==null?void 0:o.join(" "))??""),E=fh(N);let j=E.map(oe=>oe.raw);if(o!=null&&o.length){const oe=fvt(o);j=oe===null?[o]:fh(OP(oe)).map(ne=>ne.raw)}let z=null;for(const oe of j)if(z=hvt(oe),z)break;const M=j.some(oe=>{const ne=Fh(oe);return ne!==null&&ne[0]!=="discover"&&ne[0]!=="paper"});if(z&&!M){const oe=z.kind==="discover"?{keyword:YZ(),embedding:eJ(),openalex:CJ(),biorxiv:sJ()}[z.strategy]:null,ne=z.kind==="discover"?z.query?oX({activity:oe??q9(),query:z.query}):oe??q9():z.id?n0({target:Ee(z.id)}):XX();return{kind:z.kind==="paper"?"read":"search",label:ne,litCall:z}}if(ga(N,"agent\\s+spawn"))return{kind:"agent",label:ple(),spawnedSessionIds:Fkt(l),litCall:z??void 0};const O=E.map(oe=>$P(oe.raw)),B=ga(N,"exp\\s+status"),F=ga(N,"exp\\s+desc"),U=Wb(N,"exp\\s+desc").some(oe=>(Fh(oe.raw)??[]).some(Q=>Q==="--set"||Q.startsWith("--set=")||Q==="--stdin")),H=U?aee():VX(),Y=U?gY():AZ();if(ga(N,"logs")){const oe=Hkt(N,l,_,u);return{kind:"project",label:oe.length===1?SZ():NZ(),runIds:oe,litCall:z??void 0}}if(ga(N,"exp\\s+run"))return{kind:"project",label:bfe(),litCall:z??void 0};if(ga(N,"exp\\s+wait"))return{kind:"project",label:Qfe(),litCall:z??void 0};if(ga(N,"exp\\s+cancel"))return{kind:"project",label:yoe(),litCall:z??void 0};const V=ga(N,"project\\s+view");if(V&&B&&F)return{kind:"project",label:Y,experimentIds:Ud(N,l,f,u),litCall:z??void 0};if(V&&F)return{kind:"project",label:H,experimentIds:Ud(N,l,f,u),litCall:z??void 0};if(V&&B)return{kind:"project",label:iE(),experimentIds:Ud(N,l,f,u),litCall:z??void 0};if(V)return{kind:"project",label:gue(),litCall:z??void 0};if(B&&F)return{kind:"project",label:Y,experimentIds:Ud(N,l,f,u),litCall:z??void 0};if(B)return{kind:"project",label:iE(),experimentIds:Ud(N,l,f,u),litCall:z??void 0};if(F)return{kind:"project",label:H,experimentIds:Ud(N,l,f,u),litCall:z??void 0};if(ga(N,"runs?"))return{kind:"project",label:ice(),litCall:z??void 0};if(ga(N,"projects"))return{kind:"project",label:cce(),litCall:z??void 0};if(ga(N,"compute"))return{kind:"project",label:zoe(),litCall:z??void 0};const X=O.map(Ikt).find(oe=>oe!=null);if(X){const oe=Cw(X.path);return{kind:oe?"skill":"read",label:oe?c2({name:Ee(oe)}):n0({target:Ee(nf(X.path))}),filePath:X.path,fileRef:X.ref,labelTarget:oe?`${oe} skill`:nf(X.path)}}const ie=O.findIndex(oe=>oe!=null&&["sed","cat","head","tail"].includes(oe.name)),I=ie>=0?O[ie]:null,L=I?Okt(I):null,$=L?$kt(L,E,ie,Is(i,"cwd","workdir")):null;if(L&&$){const oe=Cw($);return{kind:oe?"skill":"read",label:oe?c2({name:Ee(oe)}):n0({target:Ee(nf(L))}),filePath:$,labelTarget:oe?`${oe} skill`:nf(L)}}if(O.some(oe=>(oe==null?void 0:oe.name)==="find"||(oe==null?void 0:oe.name)==="ls"||(oe==null?void 0:oe.name)==="rg"&&oe.args.includes("--files")))return{kind:"search",label:dE()};const q=O.findIndex(oe=>(oe==null?void 0:oe.name)==="rg"||(oe==null?void 0:oe.name)==="grep");if(q>=0){const oe=Bkt(E[q].raw);return{kind:"search",label:oe?f2({pattern:Ee(oe)}):u2(),searchPattern:oe??void 0}}const G=O.find(oe=>(oe==null?void 0:oe.name)==="git"),te=G==null?void 0:G.args[0];if(te==="grep"){const oe=G==null?void 0:G.args.slice(1).find(ne=>!ne.startsWith("-"));return{kind:"search",label:oe?f2({pattern:Ee(oe)}):u2(),searchPattern:oe}}if(te==="status")return{kind:"command",label:Loe()};if(te==="diff")return{kind:"command",label:Gue()};if(te==="log")return{kind:"command",label:hue()};const fe=oe=>O.some(ne=>!ne||!["cargo","pnpm","npm","yarn"].includes(ne.name)?!1:ne.args[0]===oe||ne.args[0]==="run"&&ne.args[1]===oe);return fe("test")?{kind:"command",label:iue()}:O.some(oe=>(oe==null?void 0:oe.name)==="tsc")||fe("typecheck")?{kind:"command",label:tle()}:fe("lint")?{kind:"command",label:koe()}:fe("build")?{kind:"command",label:doe()}:{kind:"command",label:LX({command:Ee(N)})}}case"skill":{const N=Is(i,"skill","name"),E=N?jkt(n,N):null;return{kind:"skill",label:N?SX({name:Ee(N)}):bX(),filePath:E??void 0,labelTarget:E&&N?`${N} skill`:void 0}}case"read":{const N=p?nf(p):null,E=p?Cw(p):null;return E?{kind:"skill",label:c2({name:Ee(E)}),filePath:p??void 0,labelTarget:`${E} skill`}:N?{kind:"read",label:n0({target:Ee(N)}),filePath:p??void 0,labelTarget:N}:{kind:"read",label:cue()}}case"edit":case"write":case"notebookedit":{const N=Rkt(i),E=p??(N==null?void 0:N.path)??null,j=E?nf(E):null,z=j?(N==null?void 0:N.type)==="add"?MY({target:Ee(j)}):(N==null?void 0:N.type)==="delete"?GY({target:Ee(j)}):JY({target:Ee(j)}):null;return j?{kind:"edit",label:z??lE(),filePath:E??void 0,labelTarget:j}:{kind:"edit",label:lE()}}case"grep":{const N=Is(i,"pattern");return{kind:"search",label:N?f2({pattern:Ee(N)}):u2(),searchPattern:N??void 0}}case"glob":{const N=Is(i,"pattern");return{kind:"search",label:N?fX({pattern:Ee(N)}):dE()}}case"websearch":{const N=Is(i,"query"),E=Is(i,"url"),j=Is(i,"pattern");return N?{kind:"web",label:U9({query:N})}:j&&E?{kind:"web",label:xJ({pattern:j})}:E?{kind:"web",label:AX({target:Ee(E)})}:{kind:"web",label:m??sE()}}case"webfetch":{const N=Is(i,"url");return{kind:"web",label:N?n0({target:Ee(N)}):m??oZ()}}case"task":return{kind:"agent",label:m??$X()};case"subagent":return{kind:"agent",label:Ukt(i)};case"error":return{kind:"command",label:Bfe()};case"contextcompaction":return{kind:"command",label:CY(),progressLabel:TY()};default:{const N=m??p??a??((C=e.state)==null?void 0:C.title)??"";return{kind:"command",label:N?`${n}: ${N}`:n}}}}function Ukt(e){const n=typeof e.nickname=="string"&&e.nickname?e.nickname.replace(/[_-]+/g," "):"",t=n&&n.charAt(0).toUpperCase()+n.slice(1);if(t)return t;switch(typeof e.tool=="string"?e.tool:""){case"spawnAgent":return UJ();case"sendInput":return PJ();case"resumeAgent":return pZ();case"wait":return uee();case"closeAgent":return xY()}switch(typeof e.kind=="string"?e.kind:""){case"started":return nee();case"interacted":return iY();case"interrupted":return ZJ()}return KJ()}function kv({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=h.jsx(r_,{...t});if(e.litCall)r=h.jsx(YI,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=h.jsx(mO,{...t});break;case"read":case"project":r=h.jsx(gO,{...t});break;case"search":r=h.jsx(TO,{...t});break;case"edit":r=h.jsx(w6,{...t});break;case"web":r=h.jsx(Kht,{...t});break;case"agent":r=h.jsx(C6,{...t});break}return h.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function zw({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,i]=R.useState(!1),a=R.useRef(null),o=R.useRef(!1);return R.useEffect(()=>{var l,u;!s||!o.current||(o.current=!1,(u=(l=a.current)==null?void 0:l.querySelector("button"))==null||u.focus())},[s]),h.jsxs("span",{className:"tool-target-overflow inline",children:[s&&h.jsx("span",{className:"tool-target-reveal",ref:a,children:e.map((l,u)=>h.jsxs("span",{children:[u>0&&", ",n||t?h.jsx("button",{className:"tool-target",...n?qr(_=>n(l.id,_),{stopPropagation:!0}):{onClick:_=>{_.stopPropagation(),t==null||t(l.id)}},children:l.label}):h.jsx("span",{children:l.label})]},l.id))}),s&&", ",h.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?NK({target:r}):VQ({count:tn(e.length),target:r}),onClick:l=>{l.preventDefault(),l.stopPropagation(),o.current=!s&&l.detail===0,i(u=>!u)},children:s?_D():p0e({count:tn(e.length)})})]})}function Q3({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,l,u,_;if(e.searchPattern)return e.label;if(((o=e.litCall)==null?void 0:o.kind)==="paper"&&e.litCall.id)return h.jsxs("a",{className:"tool-target",href:bvt(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,h.jsx(nht,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const f=e.filePath;return h.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...qr(p=>n(f,void 0,void 0,e.fileRef,p),{stopPropagation:!0}),children:e.label})}if((l=e.spawnedSessionIds)!=null&&l.length&&r){const f=e.spawnedSessionIds,p=f.slice(0,3),m=f.slice(p.length).map((x,S)=>({id:x,label:Z9({number:tn(p.length+S+1)})}));return h.jsxs(h.Fragment,{children:[e.label," — ",p.map((x,S)=>h.jsxs("span",{children:[S>0&&", ",h.jsx("button",{className:"tool-target",title:kce(),onClick:b=>{b.preventDefault(),b.stopPropagation(),r(x)},children:Z9({number:tn(S+1)})})]},x)),m.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(zw,{items:m,onSelect:r,targetType:vse()})]})]})}if((u=e.runIds)!=null&&u.length){const f=s?e.runIds.filter(x=>!!s(x)):e.runIds;if(f.length===0)return e.label;const p=f.slice(0,3),m=f.slice(p.length).map(x=>({id:x,label:(s==null?void 0:s(x))||Ml()}));return h.jsxs(h.Fragment,{children:[e.label," — ",p.map((x,S)=>h.jsxs("span",{children:[S>0&&", ",t?h.jsx("button",{className:"tool-target",title:sQ({run:Ee(x)}),...qr(b=>t(x,b),{stopPropagation:!0}),children:(s==null?void 0:s(x))||Ml()}):h.jsx("span",{children:(s==null?void 0:s(x))||Ml()})]},x)),m.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(zw,{items:m,onOpen:t,targetType:ahe()})]})]})}if((_=e.experimentIds)!=null&&_.length){const f=a?e.experimentIds.filter(x=>!!a(x)):e.experimentIds;if(f.length===0)return e.label;const p=f.slice(0,3),m=f.slice(p.length).map(x=>({id:x,label:(a==null?void 0:a(x))||Ml()}));return h.jsxs(h.Fragment,{children:[e.label," — ",p.map((x,S)=>h.jsxs("span",{children:[S>0&&", ",i?h.jsx("button",{className:"tool-target",title:WK({name:(a==null?void 0:a(x))||Ee(x)}),...qr(b=>i(x,b),{stopPropagation:!0}),children:(a==null?void 0:a(x))||Ml()}):h.jsx("span",{children:(a==null?void 0:a(x))||Ml()})]},x)),m.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(zw,{items:m,onOpen:i,targetType:Die()})]})]})}return e.label}function ak(e){const n=e.progressLabel??{skill:NX(),read:fZ(),search:OJ(),edit:rX(),project:LZ(),web:hY(),agent:FY(),command:eD()}[e.kind];return{...e,label:n}}function qP(e,n){const t=Bf({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:pX(),read:qX(),search:WZ(),edit:QY(),project:bZ(),web:cY(),agent:IY(),command:$Z()}[t.kind]}function Gkt(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const Wkt=250;function Vkt(e,n){const[t,r]=R.useState(e),s=R.useRef(Date.now()),i=R.useRef(e);return R.useEffect(()=>{if(i.current=e,(e==null?void 0:e.label)===(t==null?void 0:t.label)||n&&e!=null&&t!=null)return;if(e==null||t==null){s.current=Date.now(),r(e);return}const a=Wkt-(Date.now()-s.current);if(a<=0){s.current=Date.now(),r(e);return}const o=window.setTimeout(()=>{s.current=Date.now(),r(i.current)},a);return()=>window.clearTimeout(o)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const Kkt=160;function UP(e){const[n,t]=R.useState(!1);return R.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),Kkt);return()=>window.clearTimeout(r)},[e]),e&&n}function Qkt(e){const n=["skill","read","search","edit","project","web","command","agent"];for(const t of n){const r=e.find(s=>s.kind===t);if(r)return r}return e[0]??{kind:"command",label:lD()}}function Ykt(e,n){var t,r;return((t=e.state)==null?void 0:t.status)!=="completed"?null:JSON.stringify([n.kind,n.label,n.filePath??null,n.fileRef??null,((r=n.litCall)==null?void 0:r.kind)==="paper"?n.litCall.id??null:null,n.runIds??null,n.experimentIds??null,n.spawnedSessionIds??null])}function Xkt(e){const n=[];let t=null;for(const r of e){const s=Bf(r),i=Ykt(r,s),a=n[n.length-1];i&&a&&t===i?a.count++:n.push({part:r,activity:s,count:1}),t=i}return n}function Zkt({part:e,busy:n,recovering:t,onRecover:r}){var p,m;const s=(p=e.state)==null?void 0:p.input,i=(s==null?void 0:s.nextRetryAt)??null,[a,o]=R.useState(Date.now());if(R.useEffect(()=>{if(typeof i!="number"||(o(Date.now()),i<=Date.now()))return;const x=window.setInterval(()=>{const S=Date.now();o(S),S>=i&&window.clearInterval(x)},1e3);return()=>window.clearInterval(x)},[i]),e.id==="turn-retry"){const x=svt(s??{},a);return h.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[h.jsx(Dt,{}),h.jsx("span",{children:x})]})}const l=KI(s==null?void 0:s.recoveryAction),u=s==null?void 0:s.turnId;if(l!=="retry"&&l!=="continue"||!u)return null;const _=l==="retry"?qi():_ie(),f=Gb(((m=e.state)==null?void 0:m.error)||t_e());return h.jsxs("div",{className:"turn-recovery-row flex items-center justify-between gap-2 py-1.5 px-2.5 border border-border rounded-md bg-background",children:[h.jsx("span",{className:"min-w-0 truncate text-sm text-accent-red",title:f,children:f}),h.jsx(Oe,{type:"button",size:"small",disabled:n||t,onClick:()=>r==null?void 0:r(u,l),children:t?zhe():_})]})}function lA({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:l}){const u=e.state,_=(u==null?void 0:u.status)==="error",f=Gb((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=_&&!!f,[m,x]=R.useState(!1),S=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`,b=h.jsxs(h.Fragment,{children:[_&&h.jsxs("span",{className:"sr-only",children:[H5()," "]}),_?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(xO,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):h.jsx(kv,{activity:n,className:"text-muted"}),h.jsxs("span",{className:`${RP} ${_?"text-accent-red":"text-subtext"}`,children:[h.jsx(Q3,{activity:n,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:l}),t>1&&h.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:LK({count:tn(t)}),children:["×",t]})]})]});return p?h.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[h.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[b,h.jsx("button",{type:"button",className:"tool-row-detail-toggle inline-flex h-6 shrink-0 items-center justify-center p-0.5 rounded-sm cursor-pointer hover:bg-surface","aria-expanded":m,"aria-controls":S,"aria-label":m?AK({activity:n.label}):qQ({activity:n.label}),onClick:()=>x(v=>!v),children:h.jsx(Vo,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${m?"rotate-90":""}`})})]}),m&&h.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:S,children:h.jsx("div",{className:sk,children:f.slice(0,2e4)})})]}):h.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:b})}function Jkt({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var z,M,O,B;const[l,u]=R.useState(!1),[_,f]=R.useState(!1),p=()=>{f(!0),u(F=>!F)},m=Xkt(e),x=m.map(({activity:F})=>F),S=n?m.at(-1):void 0,b=S==null?void 0:S.part,v=S==null?void 0:S.activity,y=((z=b==null?void 0:b.state)==null?void 0:z.status)!=="error"?(v&&ak(v))??null:null,w=!!b&&((M=b.state)==null?void 0:M.status)==="running"&&!(y!=null&&y.progressLabel)&&(Gkt((O=b.state)==null?void 0:O.input)||(y==null?void 0:y.kind)==="command"&&!Is(((B=b.state)==null?void 0:B.input)??{},"command","cmd")),C=Vkt(y,w),N=UP(C!=null),E=C??Qkt(x),j=C?C.label:lD();return e.length===1?C?h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[h.jsx(kv,{activity:C,className:N?"tool-running-shimmer-icon":"text-muted"}),h.jsx("span",{className:`${N?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:j,children:h.jsx(Q3,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})})]})}):h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsx(lA,{part:e[0],activity:m[0].activity,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):h.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[h.jsxs("div",{className:"tool-group-summary flex items-start gap-2 w-fit max-w-full py-[3px] px-1 text-base leading-6 text-subtext text-start",children:[h.jsx(kv,{activity:E,className:N?"tool-running-shimmer-icon":"text-muted"}),C?h.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${N?"tool-running-shimmer":""}`,title:j,children:h.jsx(Q3,{activity:C,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o})}):h.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:p,"aria-expanded":l,children:j}),h.jsx("button",{type:"button",className:"tool-group-chevron-button inline-flex h-6 shrink-0 items-center justify-center p-px cursor-pointer rounded-sm",onClick:p,"aria-expanded":l,"aria-label":l?uie():jie(),children:h.jsx(Vo,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${l?"open":""}`})})]}),h.jsx("div",{className:`tool-group-disclosure ${l?"open":""}`,"aria-hidden":!l,inert:!l,children:h.jsx("div",{className:"tool-group-disclosure-inner",children:h.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:_&&m.map(({part:F,count:U,activity:H})=>h.jsx(lA,{part:F,repeatCount:U,activity:H,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},F.id))})})})]})}function e7t({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var _;const s=e.prompt,[i,a]=R.useState([]),o=!n,l=f=>n==null?void 0:n({promptId:e.id,...f});if(s.resolved){if(s.kind==="permission")return null;if(s.kind==="plan"){const m=s.approved===!0?{label:Oce(),icon:ka,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:Kce(),icon:w6,iconClass:"text-accent-amber"}:s.approved===!1?{label:Pce(),icon:ts,iconClass:"text-accent-red"}:{label:Uce(),icon:nb,iconClass:"text-muted"},x=m.icon;return h.jsxs("details",{className:Nkt,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?cD():wE()}),h.jsx(x,{size:17,strokeWidth:1.8,className:`shrink-0 ${m.iconClass}`}),h.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:m.label}),h.jsx(Vo,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),h.jsxs("div",{className:`${sA} ms-6`,children:[h.jsx(Fo,{text:s.plan??"",onOpenFile:t}),s.note&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const f=(s.answers??[]).join(", ")||s.note||"",p=(s.annotations??[]).map((m,x)=>({id:`${e.id}-annotation-${x}`,text:m.text}));return h.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[p.length>0&&h.jsx(ik,{annotations:p,variant:"sent"}),h.jsxs("details",{className:Ekt,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||Cde()}),h.jsx("span",{className:`prompt-outcome font-[375] text-subtext wrap-anywhere [&.approved]:text-accent-green [&.chosen]:text-accent-green [&.approved::before]:content-['✓_'] [&.chosen::before]:content-['✓_'] [&.revised]:text-accent-amber [&.rejected]:text-accent-amber ${f?"chosen":""}`,children:f||Zde()})]}),h.jsxs("div",{className:sA,children:[s.header&&s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&h.jsx("ul",{className:"prompt-collapsed-options mt-1.5 mx-0 mb-0 ps-4.5 [&_.sel]:text-text [&_.sel]:font-medium",children:(s.options??[]).map(m=>{var x;return h.jsx("li",{className:(x=s.answers)!=null&&x.includes(m.label)?"sel":"",children:m.label},m.label)})}),s.note&&s.note!==f&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const f=!!r;return h.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 plan ${o?"readonly":""}`,children:[h.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?vde():wE()}),h.jsx("div",{className:`prompt-plan text-base leading-[1.6] text-text max-h-85 overflow-y-auto [&.clamped]:max-h-[9.5em] [&.clamped]:overflow-hidden [&.clamped]:relative [&.clamped::after]:content-[''] [&.clamped::after]:absolute [&.clamped::after]:inset-x-0 [&.clamped::after]:bottom-0 [&.clamped::after]:top-auto [&.clamped::after]:h-8.5 [&.clamped::after]:bg-[linear-gradient(to_bottom,_transparent,_var(--surface))] [&.clamped::after]:pointer-events-none ${f?"clamped":""}`,children:h.jsx(Fo,{text:s.plan??"",onOpenFile:t})}),f&&h.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...qr(p=>r(s.plan??"",e.id,p)),children:Gfe()}),!o&&!f&&h.jsxs("div",{className:V3,children:[h.jsx(Oe,{size:"small",variant:"primary",onClick:()=>l({approve:!0,resumeMode:"auto"}),children:Eae()}),h.jsx(Oe,{size:"small",onClick:()=>l({approve:!0,resumeMode:"bypassPermissions"}),children:jae()}),h.jsx(Oe,{size:"small",onClick:()=>l({approve:!1}),children:xue()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},p=Is(f,"command","cmd","filePath","file_path","path")||"",m=typeof((_=s.toolInput)==null?void 0:_.reason)=="string"&&s.toolInput.reason||"",x=Is(f,"description")||"",S=m||x||qP(s.tool,f),b=`permission-heading-${e.id}`;return h.jsxs("div",{className:`prompt-card permission my-3 w-full max-w-2xl overflow-hidden rounded-md border border-border bg-background shadow-hairline [&.readonly]:opacity-60 ${o?"readonly":""}`,role:"group","aria-labelledby":b,children:[h.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[h.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:h.jsx(RO,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),h.jsx("span",{id:b,className:"text-base font-semibold text-text",children:Wae()})]}),h.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[h.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:S}),p&&h.jsx("code",{className:"prompt-command block max-h-36 overflow-auto whitespace-pre-wrap wrap-anywhere rounded-md border border-border-variant bg-surface px-3 py-2 font-mono text-sm leading-relaxed text-text",children:p}),!o&&h.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[h.jsx(Oe,{size:"small",variant:"ghost",onClick:()=>l({approve:!1}),children:wle()}),h.jsx(Oe,{size:"small",variant:"primary",onClick:()=>l({approve:!0}),children:Hae()})]})]})]})}const u=f=>a(p=>s.multiSelect?p.includes(f)?p.filter(m=>m!==f):[...p,f]:[f]);return h.jsxs("div",{className:`prompt-card my-2 mx-0 py-3 px-3.5 border border-border border-s-[3px] border-s-border rounded-sm bg-surface flex flex-col gap-[9px] [&.plan]:border-s-accent-blue [&.permission]:border-s-accent-amber [&.question]:border-s-accent-purple [&.readonly]:opacity-60 question ${o?"readonly":""}`,children:[s.header&&h.jsx("div",{className:zkt,children:s.header}),s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),h.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(f=>{const p=i.includes(f.label);return h.jsxs("button",{className:`prompt-option flex flex-col items-start gap-0.5 w-full py-2 px-[11px] text-start border border-border rounded-sm bg-background text-text cursor-pointer transition-[border-color,background] duration-80 ease-standard [&:hover:not(:disabled)]:border-border-strong [&:hover:not(:disabled)]:bg-surface [&.sel]:border-primary [&.sel]:bg-primary-subtle [&:disabled]:cursor-default ${p?"sel":""}`,disabled:o,onClick:()=>o?void 0:s.multiSelect?u(f.label):l({answers:[f.label]}),children:[h.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:f.label}),f.description&&h.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:f.description})]},f.label)})}),s.multiSelect&&!o&&h.jsx("div",{className:V3,children:h.jsx(Oe,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>l({answers:i}),children:Dfe()})})]})}function t7t(e,n){return e.role==="user"?!0:e.parts.some(t=>uv(t,n))}function n7t(e){const n=e.text??"",t=n.startsWith("data:")?n:Mct(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",i=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:i,name:s}}function r7t({count:e,index:n,prevId:t,nextId:r,onSelect:s,pagerDisabled:i,onEdit:a,editDisabled:o}){const l=e>1;return h.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${l?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[l&&h.jsxs(h.Fragment,{children:[h.jsx(on,{size:"small",title:_E(),"aria-label":_E(),disabled:i||!t,onClick:()=>t&&s(t),children:h.jsx(vO,{size:14})}),h.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[n+1,"/",e]}),h.jsx(on,{size:"small",title:hE(),"aria-label":hE(),disabled:i||!r,onClick:()=>r&&s(r),children:h.jsx(Vo,{size:14})})]}),h.jsx(on,{size:"small",title:oE(),"aria-label":oE(),disabled:o,onClick:a,children:h.jsx(w6,{size:13})})]})}const s7t=R.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u,onRespond:_,onOpenPlan:f,onOpenSubagent:p,busy:m=!1,recoveringTurnId:x,onRecover:S,skills:b,predictTextTail:v=!1,forkCount:y,forkIndex:w=0,forkPrevId:C,forkNextId:N,forkDisabled:E,branchDisabled:j,onFork:z,onSelectFork:M}){var Y,V;Kf();const[O,B]=R.useState(null),F=i7t(n);if(F)return h.jsx(a7t,{part:F});if(n.role==="user"){const X=n.parts.filter(G=>G.type==="text").map(G=>G.text??"").join(` +`),ie=G=>!!(b!=null&&b.some(te=>te.name===G)),I=n.parts.filter(G=>G.type==="image"&&G.text).map(n7t),L=I.filter(G=>!G.isPdf),$=I.filter(G=>G.isPdf),q=n.parts.filter(G=>G.type==="annotation"&&G.text).map(G=>({id:G.id,text:G.text??""}));if(O!==null){const G=()=>{const te=O.trim();!te||E||(B(null),z(n.id,te))};return h.jsx("div",{className:"msg-user-group ms-auto self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:h.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[h.jsx("textarea",{dir:"auto",className:"w-full bg-transparent text-base text-text resize-none outline-none field-sizing-content min-h-16","aria-label":Tle(),value:O,autoFocus:!0,onChange:te=>B(te.target.value),onKeyDown:te=>{te.key==="Escape"?(te.preventDefault(),B(null)):te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing&&(te.preventDefault(),G())}}),h.jsxs("div",{className:`${V3} justify-end`,children:[h.jsx(Oe,{size:"small",onClick:()=>B(null),children:moe()}),h.jsx(Oe,{size:"small",variant:"primary",onClick:G,disabled:E||!O.trim(),children:v4()})]})]})})}return h.jsxs("div",{className:"msg-user-group group/turn ms-auto self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[q.length>0&&h.jsx(ik,{annotations:q,variant:"sent"}),h.jsxs("div",{dir:"auto",className:"msg-user max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere [&_.skill-chip]:me-0.5 [&_.skill-chip]:align-baseline",children:[h.jsx(JSt,{text:X,isCommand:ie}),L.length>0&&h.jsx("div",{className:"msg-images flex flex-wrap gap-1.5 mt-2 [&_img]:max-w-55 [&_img]:max-h-40 [&_img]:border [&_img]:border-border-variant [&_img]:rounded-xs [&_img]:block",children:L.map((G,te)=>h.jsx("a",{href:G.src,target:"_blank",rel:"noreferrer",children:h.jsx("img",{src:G.src,alt:Fse()})},te))}),$.length>0&&h.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:$.map((G,te)=>h.jsxs("a",{className:"msg-file inline-flex items-center gap-1.5 max-w-60 py-1.5 px-2.5 border border-border-variant rounded-sm text-text no-underline [&:hover]:border-text [&_span]:overflow-hidden [&_span]:text-ellipsis [&_span]:whitespace-nowrap",href:G.src,target:"_blank",rel:"noreferrer",children:[h.jsx(nb,{size:15}),h.jsx("span",{children:G.name})]},te))})]}),y!==void 0&&h.jsx(r7t,{count:y,index:w,prevId:C,nextId:N,onSelect:M,pagerDisabled:j,onEdit:()=>B(X),editDisabled:E})]})}const U=n.parts.find(Jp),H=U?n.parts.filter(X=>X!==U):n.parts;return h.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[GP(H,{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u,onRespond:_,onOpenPlan:f,onOpenSubagent:p,predictTextTail:v}),U&&h.jsx(Zkt,{part:U,busy:m,recovering:x===((V=(Y=U.state)==null?void 0:Y.input)==null?void 0:V.turnId),onRecover:S})]})});function i7t(e){const n=e.parts.length===1?e.parts[0]:void 0;return e.role==="user"&&(n==null?void 0:n.type)==="tool"&&n.tool===zL?n:null}function a7t({part:e}){var l;const n=e.state,t=Is((n==null?void 0:n.input)??{},"command")??"",r=(n==null?void 0:n.status)==="running",s=(n==null?void 0:n.status)==="error",i=typeof((l=n==null?void 0:n.input)==null?void 0:l.exitCode)=="number"?n.input.exitCode:null,a=[n==null?void 0:n.output,n==null?void 0:n.error].filter(Boolean).join(` +`),o=r?eD():s&&i!==null?rie({code:tn(i)}):null;return h.jsx("div",{className:"msg-shell ms-auto self-end flex w-full max-w-[88%] flex-col items-stretch gap-1.5",children:h.jsxs("div",{dir:"ltr",className:"max-w-full bg-surface rounded-[16px] py-2.5 px-[15px] text-base",children:[h.jsxs("div",{className:"flex items-start gap-2 font-mono text-sm text-text whitespace-pre-wrap wrap-anywhere",children:[h.jsxs("span",{className:"sr-only",children:[iD()," "]}),h.jsx(r_,{size:16,strokeWidth:1.6,className:`mt-0.5 shrink-0 ${s?"text-accent-red":"text-muted"}`,"aria-hidden":"true"}),h.jsx("span",{children:t})]}),a&&h.jsx("div",{className:`${sk} mt-2`,children:a.slice(0,2e4)}),o&&h.jsx("div",{className:`mt-1.5 text-xs ${s?"text-accent-red":"text-muted"}`,children:o})]})})}function GP(e,n){var y,w;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u,onRespond:_,onOpenPlan:f,onOpenSubagent:p,predictTextTail:m=!1}=n,x=e.filter(C=>C.type!=="steer"&&uv(C,t)).at(-1),S=[];let b=[];const v=()=>{b.length!==0&&(S.push(h.jsx(Jkt,{parts:b,pendingTail:b.some(C=>C.id===r),onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:l,experimentName:u},`tg-${b[0].id}`)),b=[])};for(const C of e)if(uv(C,t)){if(C.type==="tool"&&(l7t(C.tool)||(((y=C.children)==null?void 0:y.length)??0)>0)){v(),S.push(h.jsx(u7t,{part:C,pendingTail:m&&((w=C.state)==null?void 0:w.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){b.push(C);continue}v(),C.type==="text"?S.push(h.jsx(Fo,{text:C.text,onOpenFile:s,onOpenRun:i,predict:m&&C.id===(x==null?void 0:x.id)},C.id)):C.type==="steer"?S.push(h.jsx("div",{dir:"auto",role:"note","aria-label":ode(),className:"msg-steer my-2 ms-auto w-fit max-w-[88%] bg-surface rounded-[16px] py-2.5 px-[15px] text-base whitespace-pre-wrap wrap-anywhere",children:C.text},C.id)):C.type==="prompt"&&C.prompt&&S.push(h.jsx(e7t,{part:C,onRespond:_,onOpenFile:s,onOpenPlan:f},C.id))}return v(),S}function o7t(e){return Bf(e).label}function l7t(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function WP(e){var t,r;const n=((t=e.state)==null?void 0:t.status)==="completed"?((r=e.state)==null?void 0:r.output)??"":"";return n.startsWith("Async agent launched")?"":n}function Cv(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&Cv(t.children,n);if(r)return r}return null}function c7t({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var x,S,b,v;const o=e.children??[],l=((x=e.state)==null?void 0:x.status)==="running",u=((S=e.state)==null?void 0:S.status)==="error",_=u?Gb(((b=e.state)==null?void 0:b.error)||((v=e.state)==null?void 0:v.output)||""):"",f=GP(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:l,pendingTailToolId:l?WI(o):null}),m=o.some(y=>y.type==="text"&&!!y.text)?"":WP(e);return h.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[u&&h.jsxs("span",{className:"sr-only",children:[H5()," "]}),_&&h.jsx("div",{className:sk,children:_.slice(0,2e4)}),f.length===0&&!m&&!_?h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:l?q5():rae()}):h.jsxs(h.Fragment,{children:[f,m&&h.jsx(Fo,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function u7t({part:e,pendingTail:n,onOpenSubagent:t}){var u,_,f,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=Gb(((_=e.state)==null?void 0:_.error)||((f=e.state)==null?void 0:f.output)||""),i=n&&!r?ak(Bf(e)):Bf(e),a=UP(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!WP(e),l=h.jsxs(h.Fragment,{children:[r&&h.jsxs("span",{className:"sr-only",children:[H5()," "]}),r?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(xO,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):h.jsx(kv,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),h.jsx("span",{className:`${RP} ${a?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:i.label})]});return o?h.jsx("div",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 text-text text-base text-start rounded-sm",children:l}):h.jsxs("button",{className:"subagent-row flex items-start gap-2 w-full my-3.5 mx-0 py-[3px] px-1 cursor-pointer text-text text-base text-start rounded-sm [&:hover:not(:disabled)]:bg-surface [&:disabled]:cursor-default",title:r&&s?s:bae(),...qr(m=>t==null?void 0:t(e.id,i.label,m)),disabled:!t,children:[l,h.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:h.jsx(Vo,{size:12})})]})}function f7t(e){const n=new Map;let t;for(let s=e.length-1;s>=0;s--)if(e[s].role==="assistant"){t=e[s];break}if(!t)return{messageId:"",states:n};const r=(s,i)=>{var a,o;for(const l of s){const u=`${i}/${l.id}`;l.type==="tool"&&((a=l.state)!=null&&a.status)&&n.set(u,{status:l.state.status,part:l}),(o=l.children)!=null&&o.length&&r(l.children,u)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function ok(e){const n=(t,r)=>{var s;for(const i of t){const a=i.prompt;if(i.type==="prompt"&&(a==null?void 0:a.kind)==="permission"&&!a.resolved){const o=a.toolInput??{},u=Is(o,"reason","description")||qP(a.tool,o);return{id:i.id,path:`${r}/${i.id}`,label:u}}if((s=i.children)!=null&&s.length){const o=n(i.children,`${r}/${i.id}`);if(o)return o}}return null};for(const t of e){if(t.role!=="assistant")continue;const r=n(t.parts,t.id);if(r)return r}return null}function d7t(e){const[n,t]=R.useState({text:"",sequence:0}),r=R.useRef(null);return R.useEffect(()=>{var x,S,b,v,y;const s=((x=e[0])==null?void 0:x.id)??"",{messageId:i,states:a}=f7t(e),o=ok(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:i,states:a,permissionPath:(o==null?void 0:o.path)??null},t(w=>({text:o?G9({label:Oo(o.label)}):"",sequence:w.sequence+1}));return}const l=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,_=[...a].filter(([w,C])=>{var N;return((N=l.get(w))==null?void 0:N.status)!==C.status});if(r.current={transcript:s,messageId:i,states:a,permissionPath:(o==null?void 0:o.path)??null},o&&o.path!==u){t(w=>({text:G9({label:Oo(o.label)}),sequence:w.sequence+1}));return}const f=(S=_.find(([,w])=>Jp(w.part)))==null?void 0:S[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const w=KI((v=(b=f.state)==null?void 0:b.input)==null?void 0:v.recoveryAction);t(C=>({text:`${Gee()}${w?` ${w==="retry"?Cee():xee()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(w=>({text:gee(),sequence:w.sequence+1}));return}const p=_.filter(([,w])=>w.status==="error");if(p.length>0){const w=p.slice(0,2).map(([,C])=>Bf(C.part).label).join(", ");t(C=>({text:p.length===1?Iee({labels:w}):Fee({count:tn(p.length),labels:w}),sequence:C.sequence+1}));return}const m=_.filter(([,w])=>w.status==="running");if(m.length>0){const w=(y=m.at(-1))==null?void 0:y[1].part;t(C=>({text:w?ak(Bf(w)).label:Tee(),sequence:C.sequence+1}));return}_.some(([,w])=>w.status==="completed")&&t(w=>({text:Mee(),sequence:w.sequence+1}))},[e]),n}const h7t=R.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,onPinToBottom:s,allMessages:i,canFork:a,onFork:o,onSelectFork:l,busy:u,onOpenFile:_,onOpenRun:f,onOpenSpawnedSession:p,runExperimentName:m,onOpenExperiment:x,experimentName:S,onRespond:b,onOpenPlan:v,onOpenSubagent:y,recoveringTurnId:w,onRecover:C,skills:N}){var ie,I,L;Kf();const E=((ie=ok(n))==null?void 0:ie.id)??null,j=R.useMemo(()=>n.filter($=>t7t($,E)),[n,E]),z=R.useMemo(()=>{const $=j.filter(q=>q.role==="user"&&!q.id.startsWith(Ef));return tvt(i,n,$,q=>q.startsWith(Ef))},[n,j,i]),M=R.useRef(new Set),[O,B]=R.useState(!1),F=R.useCallback($=>j[$].id,[j]),U=R.useCallback($=>{if(O)return j.map((G,te)=>te);const q=new Set(UI($));return j.forEach((G,te)=>{M.current.has(G.id)&&q.add(te)}),[...q].sort((G,te)=>G-te)},[j,O]),H=Z1t({count:j.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:F,estimateSize:()=>400,overscan:1,initialRect:{width:((I=t.current)==null?void 0:I.clientWidth)??0,height:((L=t.current)==null?void 0:L.clientHeight)??0},initialOffset:()=>{var $;return Math.max(0,j.length*400-((($=t.current)==null?void 0:$.clientHeight)??0))},anchorTo:"end",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:U});R.useLayoutEffect(()=>{const $=()=>H.scrollToEnd();return r.current=$,s(),()=>{r.current=null}},[H,r,s]),R.useEffect(()=>{const $=()=>{var te;const q=window.getSelection();if(!q||q.isCollapsed||!q.rangeCount)return;const G=q.getRangeAt(0);for(const fe of((te=t.current)==null?void 0:te.querySelectorAll("[data-message-id]"))??[])G.intersectsNode(fe)&&fe.dataset.messageId&&M.current.add(fe.dataset.messageId)};return document.addEventListener("selectionchange",$),()=>document.removeEventListener("selectionchange",$)},[t]);const Y=j.at(-1),V=d7t(n),X=u?VI(n):null;return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:h.jsx("span",{children:V.text},V.sequence)}),h.jsx("button",{type:"button",className:"sr-only focus:not-sr-only","aria-pressed":O,onClick:()=>B($=>!$),children:yhe()}),h.jsx("div",{className:"relative",style:{height:H.getTotalSize()},children:H.getVirtualItems().map($=>{var oe,ne,Q,ce,ee,le;const q=j[$.index],G=q.parts.find(Jp),te=(ne=(oe=G==null?void 0:G.state)==null?void 0:oe.input)==null?void 0:ne.turnId,fe=G?u||w!==null:!1;return h.jsx("div",{"data-index":$.index,"data-message-id":q.id,ref:H.measureElement,className:"absolute left-0 w-full pb-4",style:{top:$.start},onPointerDownCapture:()=>M.current.add(q.id),onFocusCapture:()=>M.current.add(q.id),children:h.jsx(s7t,{message:q,forkCount:(Q=z.get(q.id))==null?void 0:Q.count,forkIndex:(ce=z.get(q.id))==null?void 0:ce.index,forkPrevId:(ee=z.get(q.id))==null?void 0:ee.prevId,forkNextId:(le=z.get(q.id))==null?void 0:le.nextId,forkDisabled:!a,branchDisabled:u,onFork:o,onSelectFork:l,activePermissionId:E,pendingTailToolId:(X==null?void 0:X.messageId)===q.id?X.toolId:null,onOpenFile:_,onOpenRun:f,onOpenSpawnedSession:p,runExperimentName:m,onOpenExperiment:x,experimentName:S,onRespond:b,onOpenPlan:v,onOpenSubagent:y,busy:fe,recoveringTurnId:te===w?w:null,onRecover:C,skills:N,predictTextTail:u&&q===Y&&q.role==="assistant"})},q.id)})})]})}),_7t=(e,n)=>e==="all"?!0:e==="archived"?n:!n,VP=[{id:"active",label:Dae,railLabel:uD},{id:"archived",label:nE,railLabel:nE},{id:"all",label:Bae,railLabel:sD}];function p7t({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=Ja();return h.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[h.jsx(on,{size:"small",className:"rail-filter-btn",active:e!=="active",title:fE(),"aria-label":fE(),onClick:()=>r(i=>!i),children:h.jsx(AO,{size:13})}),t&&h.jsx("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right",children:VP.map(i=>h.jsxs(dr,{onClick:()=>{n(i.id),r(!1)},children:[h.jsx("span",{children:i.label()}),e===i.id&&h.jsx(ka,{size:13})]},i.id))})]})}const m7t=14,g7t=500,v7t=1200;function KP({title:e,animate:n}){return n?h.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?h.jsx("span",{"aria-hidden":!0,children:t},r):h.jsx("span",{"aria-hidden":!0,className:"title-reveal-char inline-block animate-[title-char-in_240ms_ease-out_both] [@media((prefers-reduced-motion:_reduce))]:animate-none",style:{animationDelay:`${Math.min(r*m7t,g7t)}ms`},children:t},r))}):h.jsx(h.Fragment,{children:e})}function b7t({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:l,onDelete:u}){var N;const{open:_,setOpen:f,ref:p}=Ja(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[x,S]=R.useState(!1),[b,v]=R.useState(""),y=R.useRef(null);function w(){var E;v(((E=e.title)==null?void 0:E.trim())||""),S(!0)}function C(){var j;const E=b.trim();S(!1),E&&E!==(((j=e.title)==null?void 0:j.trim())||"")&&o(E)}return R.useEffect(()=>{var E,j;x&&((E=y.current)==null||E.focus(),(j=y.current)==null||j.select())},[x]),h.jsxs("div",{ref:p,role:"button",tabIndex:0,className:`session-row relative flex items-center gap-2 w-full text-start py-[7px] px-2.5 rounded-md text-sm text-text cursor-pointer select-none [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium [&_.session-dot:empty]:hidden [&_.session-dot]:w-4 [&_.session-dot]:inline-flex [&_.session-dot]:items-center [&_.session-dot]:justify-center [&_.session-dot]:shrink-0 [&_.session-title]:flex-1 [&_.session-title]:min-w-0 [&_.session-title]:overflow-hidden [&_.session-title]:[mask-image:linear-gradient(to_right,black_calc(100%_-_16px),transparent)] [&_.session-title]:whitespace-nowrap [&_.session-menu-btn]:hidden [&_.session-menu-btn]:items-center [&_.session-menu-btn]:justify-center [&_.session-menu-btn]:w-4 [&_.session-menu-btn]:h-4 [&_.session-menu-btn]:-my-0.5 [&_.session-menu-btn]:mx-0 [&_.session-menu-btn]:rounded-sm [&_.session-menu-btn]:text-muted [&_.session-menu-btn]:shrink-0 [&_.session-menu-btn:hover]:text-text [&_.session-menu-btn:hover]:bg-panel [&:hover_.session-menu-btn]:inline-flex [&:focus-visible_.session-menu-btn]:inline-flex [&_.session-menu-btn:focus-visible]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-dot]:hidden [&:focus-visible_.session-dot]:hidden [&:has(.session-menu-btn:focus-visible)_.session-dot]:hidden [&.menu-open_.session-dot]:hidden [&_.busy-dot]:w-[7px] [&_.busy-dot]:h-[7px] [&_.busy-dot]:rounded-full [&_.busy-dot]:bg-primary [&_.busy-dot]:animate-[or-pulse_1.2s_infinite] [&_.busy-dot]:shrink-0 [&_.unread-dot]:w-[7px] [&_.unread-dot]:h-[7px] [&_.unread-dot]:rounded-full [&_.unread-dot]:bg-primary [&_.unread-dot]:shrink-0 [&_.busy-dot.waiting]:animate-none [&_.session-title-input]:flex-1 [&_.session-title-input]:min-w-0 [&_.session-title-input]:py-px [&_.session-title-input]:px-[5px] [&_.session-title-input]:-my-0.5 [&_.session-title-input]:mx-0 [&_.session-title-input]:[font:inherit] [&_.session-title-input]:text-text [&_.session-title-input]:bg-background [&_.session-title-input]:border [&_.session-title-input]:border-primary [&_.session-title-input]:rounded-sm [&_.session-title-input]:outline-none [&.editing]:bg-surface [&.editing]:cursor-default [&.editing_.session-menu-btn]:hidden [&.editing_.session-dot]:hidden ${n?"active":""} ${t?"unread":""} ${_?"menu-open":""} ${x?"editing":""}`,title:`${y0[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?khe():""}`,onClick:()=>{x||(_?f(!1):a())},onKeyDown:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),_?f(!1):a())},children:[e.parentSessionId&&!x&&h.jsx(C6,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),x?h.jsx("input",{ref:y,className:"session-title-input","aria-label":dfe(),value:b,onChange:E=>v(E.target.value),onClick:E=>E.stopPropagation(),onBlur:C,onKeyDown:E=>{E.stopPropagation(),E.key==="Enter"?(E.preventDefault(),C()):E.key==="Escape"&&(E.preventDefault(),S(!1))}}):h.jsx("span",{className:"session-title",children:h.jsx(KP,{title:m,animate:i!==void 0},i??"static")}),h.jsx("span",{className:"session-dot",children:r?h.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&h.jsx("span",{className:"unread-dot"})}),h.jsx("button",{className:"session-menu-btn",title:bE(),"aria-label":bE(),onClick:E=>{E.stopPropagation(),f(j=>!j)},children:h.jsx(b6,{size:14})}),_&&h.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down session-menu",children:[h.jsx(dr,{onClick:E=>{E.stopPropagation(),f(!1),w()},children:h.jsx("span",{children:oD()})}),h.jsx(dr,{onClick:E=>{E.stopPropagation(),f(!1),l(!e.archived)},children:h.jsx("span",{children:e.archived?c_e():Tse()})}),h.jsx(dr,{danger:!0,onClick:E=>{E.stopPropagation(),f(!1),u()},children:h.jsx("span",{children:aD()})})]})]})}const cA=[gO,TO,r_,rb],Tw=[{box:"border-accent-blue/45",icon:"text-accent-blue"},{box:"border-accent-green/45",icon:"text-accent-green"},{box:"border-accent-amber/45",icon:"text-accent-amber"},{box:"border-primary/45",icon:"text-primary"}],uA="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function y7t({onClose:e,onConfigureSsh:n}){var b,v;const t=Rn({mutationFn:y=>$lt(...y)}),r=ct(NL()),s=ct(Qct()),i=r.data??null,a=s.data??[],[o,l]=R.useState(""),u=i?null:((b=r.error)==null?void 0:b.message)??((v=s.error)==null?void 0:v.message)??null,[_,f]=R.useState(null),p=R.useRef(null);c6(p,e);async function m(y){const w=window.open("/remote-launch","_blank");if(!w){fr(WRe(),"error");return}f(y);try{const C=await t.mutateAsync([y,{theme:zut(),locale:T()}]);w.location.replace(C.gatewayUrl),e()}catch(C){w.close(),fr(C instanceof Error?C.message:String(C),"error")}finally{f(null)}}const x=i==null?void 0:i.filter(y=>y.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),S=new Map(a.map(y=>[y.host,y]));return Go.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:y=>{y.target===y.currentTarget&&e()},children:h.jsxs("div",{ref:p,className:"relative flex h-[min(42rem,calc(100vh-2.5rem))] w-160 max-w-full flex-col overflow-hidden rounded-xl border border-border bg-background shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"remote-host-dialog-title",tabIndex:-1,children:[h.jsx(on,{className:"absolute end-3.5 top-3.5","aria-label":SAe(),onClick:e,children:h.jsx(ts,{size:16})}),h.jsxs("div",{className:"shrink-0 px-6 pt-5 pb-4 pe-14",children:[h.jsx("h2",{id:"remote-host-dialog-title",className:"m-0 text-xl font-medium",children:DD()}),h.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:NAe()}),h.jsx(zs,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:y=>l(y.target.value),placeholder:oN(),"aria-label":oN()})]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto border-t border-border-variant p-2",children:u?h.jsx("p",{className:"m-3 text-sm text-accent-red",children:u}):i===null?h.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-subtext",children:[h.jsx(Dt,{})," ",YD()]}):(x==null?void 0:x.length)===0?h.jsx("p",{className:"m-3 text-sm text-subtext",children:jRe()}):x==null?void 0:x.map(y=>{const w=S.get(y.host);return h.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:_===y.host,onClick:()=>void m(y.host),children:[h.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:y.host}),_===y.host?h.jsx(Dt,{}):w?h.jsx("span",{className:"text-sm text-subtext",children:BRe()}):null]},y.host)})}),h.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:h.jsxs(Oe,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[h.jsx(AO,{size:15}),aL()]})})]})}),document.body)}function x7t({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:a,onOpenFile:o,onOpenRun:l,runExperimentName:u,onOpenExperiment:_,experimentName:f,onOpenPlan:p,onOpenSubagent:m,runtime:x,onOpenDemoWelcome:S,composerPrefill:b=null,activeSessionId:v,onActiveSessionChange:y,preferredAgent:w,onPreferredAgentChange:C,children:N}){var cc,ll,uo,bs,cl;const E=Rn({mutationFn:re=>Tct(...re)}),j=Rn({mutationFn:re=>zct(...re)}),z=Rn({mutationFn:re=>kct(...re)}),M=Rn({mutationFn:re=>Ect(...re)}),O=Rn({mutationFn:re=>Nct(...re)}),B=Rn({mutationFn:Cct}),F=R.useMemo(()=>Sa(e),[e]),{data:U=Tkt}=ct(F),H=R.useCallback(re=>{Ur(F.queryKey,be=>{if(!be)return;const Re=typeof re=="function"?re(be):re,$e=new Map(be.map(qe=>[qe.id,qe]));for(const qe of Re)$e.get(qe.id)!==qe&&Ha(tt,F.queryKey,qe.id),$e.delete(qe.id);for(const qe of $e.keys())Ha(tt,F.queryKey,qe);return Re})},[F]),[Y,V]=R.useState(!1),[X,ie]=R.useState(!1),I=v,L=R.useRef(y);L.current=y;const $=R.useRef({projectId:e});$.current.projectId!==e&&($.current={projectId:e});const[q,G]=R.useState(new Set),[te,fe]=R.useState("active"),[oe,ne]=R.useState(""),[Q,ce]=R.useState([]),ee=R.useRef(0),le=R.useRef({projectId:e,activeId:I,mainView:i});(le.current.projectId!==e||le.current.activeId!==I||le.current.mainView!==i)&&(le.current={projectId:e,activeId:I,mainView:i});const[he,xe]=R.useState([]),[Te,Ze]=R.useState(null),[Ue,Ie]=R.useState(null),vt=R.useRef(Promise.resolve()),bt=R.useRef(0),It=R.useRef(0),[Bt,Et]=R.useState(null),rt=R.useRef(null),ft=R.useRef(!1),Lt=R.useRef(null),[we,Ae,Xe]=lut(e,i==="chat"?I:null),{data:dt=S7t}=ct(Up()),[xt,Ut]=R.useState(w);R.useEffect(()=>Ut(w),[w]);const[We,Ht]=R.useState({}),[ln,_n]=R.useState(h0),[Yt,Xn]=R.useState(null),Xt=R.useRef(!1),jn=R.useRef(null),[or,lr]=R.useState(null),vr=R.useRef(!1),Mn=R.useRef(null),[Gr,Er]=R.useState(new Map),gt=R.useRef(new Map),dn=R.useRef(null),Nn=R.useRef(null),Zt=R.useRef(null),cr=R.useRef(!0),[pn,An]=R.useState(!0),fn=R.useRef(null),pt=Ja(),St=R.useCallback(re=>{var be;ee.current+=1,ce(Re=>[...Re,{id:`annotation-${ee.current}`,...re}]),(be=fn.current)==null||be.focus()},[]),He=xkt(Nn,St);wkt(Q),R.useEffect(()=>{ce([]),He.dismiss()},[I,e,He.dismiss]);const{data:ht=w7t}=ct(eut()),[Nr,nn]=R.useState(0),[rn,Dn]=R.useState(!1),[ur,os]=R.useState(0),to=R.useRef(!1);function Ta(re){if(!js)return;if(re.source==="command"&&re.name==="plan"){ci(oe,js);return}const be=Yj(oe,js,re.name,2);ne(be.text),window.requestAnimationFrame(()=>{var Re,$e;(Re=fn.current)==null||Re.focus(),($e=fn.current)==null||$e.setSelectionRange(be.cursor,be.cursor),os(be.cursor)})}function ja(re){const be=re.selectionStart;if(to.current||be!==re.selectionEnd)return!1;const Re=ww(oe,be);if(!Re||Re.end!==be||!ro(Re.query))return!1;const $e=Xj(oe,Re);return ne($e.text),os($e.cursor),window.requestAnimationFrame(()=>re.setSelectionRange($e.cursor,$e.cursor)),!0}function Ci(re){Ze(null);let $e=he.reduce((qe,Jt)=>qe+Jt.size,0);for(const qe of re){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(qe.type))continue;if(qe.size>31457280){Ze(Gse({name:Ee(qe.name)}));continue}if($e+qe.size>41943040){Ze(Qse());continue}$e+=qe.size;const Jt=new FileReader;Jt.onload=()=>{const en=Jt.result;xe(hr=>[...hr,{dataUrl:en,mediaType:qe.type,name:qe.name,size:qe.size}])},Jt.readAsDataURL(qe)}}function Hs(re){const be=Array.from(re.clipboardData.items).filter(Re=>Re.kind==="file"&&(Re.type.startsWith("image/")||Re.type==="application/pdf")).map(Re=>Re.getAsFile()).filter(Re=>Re!==null);be.length>0&&(re.preventDefault(),Ci(be))}const sn=U.find(re=>re.id===I),ii=xt??p0t(dt),Pn=sn?{harness:sn.harness,model:We.model??sn.model,serviceTier:We.serviceTier!==void 0?We.serviceTier:sn.serviceTier,permissionMode:We.permissionMode??sn.permissionMode,reasoningLevel:We.reasoningLevel??sn.reasoningLevel}:ii?{...ii,...We}:null,Ve=Pn?dt.find(re=>re.id===Pn.harness):void 0,$t=Ve==null?void 0:Ve.options,qs=R.useMemo(()=>QSt(ht,$t==null?void 0:$t.planActivation),[ht,$t==null?void 0:$t.planActivation]),Us=eA(oe),ai=Us!==null,js=ww(oe,ur),oi=(js==null?void 0:js.query)??null,ta=oi===null?[]:qs.filter(re=>re.name.startsWith(oi)),vs=!ai&&oi!==null&&(js==null?void 0:js.end)===ur&&ta.some(re=>re.name!==oi)&&!rn?ta:[],Ei=vs.length>0,ls=Math.min(Nr,Math.max(0,vs.length-1));R.useEffect(()=>nn(0),[oi]);const Vn=Pn&&Ve&&Ve.models.length>0&&!Ve.models.some(re=>re.id===Pn.model)?Ve.models[0].id:(Pn==null?void 0:Pn.model)??null,Gt=Pn&&{...Pn,model:Vn,serviceTier:Y1(Ve,Vn,Pn.serviceTier),reasoningLevel:SL(Ve,Vn,Pn.reasoningLevel)},li=Yv(Ve,Gt==null?void 0:Gt.model),As=re=>{if(!Gt)return;const be={...Gt,...re},Re={};re.model!==void 0&&re.model!==Gt.model&&(Re.model=re.model),re.serviceTier!==void 0&&re.serviceTier!==Gt.serviceTier&&(Re.serviceTier=re.serviceTier),re.permissionMode!==void 0&&re.permissionMode!==Gt.permissionMode&&(Re.permissionMode=re.permissionMode),re.reasoningLevel!==void 0&&re.reasoningLevel!==Gt.reasoningLevel&&(Re.reasoningLevel=re.reasoningLevel),_n($e=>({...$e,...Re})),Ut(be),C(be).catch(()=>{}),sn?Ht($e=>({...$e,...re})):re.harness&&re.harness!==Gt.harness&&Ht({})},Zn=R.useCallback(re=>{const be=vt.current.catch(()=>{}).then(()=>{if(!Hn(F.queryKey))throw new DOMException("Workspace changed","AbortError");return re()});return vt.current=be.then(()=>{},()=>{}),be},[F]),Gs=re=>{if(re==="plan"&&(Ve==null?void 0:Ve.id)==="claude-code"?(_n($e=>({...$e,permissionMode:re})),Ht($e=>({...$e,permissionMode:re}))):(Ht($e=>{const qe={...$e};return delete qe.permissionMode,qe}),As({permissionMode:re})),!sn)return;const be=sn.id,Re=++bt.current;Ie(null),Zn(()=>E.mutateAsync([be,re])).then($e=>{H(qe=>qe.map(Jt=>Jt.id===$e.id?$e:Jt)),bt.current===Re&&Ht(qe=>{const Jt={...qe};return delete Jt.permissionMode,Jt})}).catch(()=>{bt.current===Re&&(Ht($e=>{const qe={...$e};return delete qe.permissionMode,qe}),Ie(m_e()))})},cs=re=>As({reasoningLevel:re}),Kn=(Gt==null?void 0:Gt.harness)==="claude-code"?Gt.permissionMode==="plan":($t==null?void 0:$t.planActivation)==="command"?Bt??(sn==null?void 0:sn.planMode)??!1:!1;R.useEffect(()=>{Bt===null||(sn==null?void 0:sn.planMode)!==Bt||(rt.current=null,Et(null))},[sn==null?void 0:sn.planMode,Bt]);async function Wr(re){if(_n($e=>({...$e,planMode:re})),rt.current=re,Et(re),!sn)return;const be=sn.id,Re=++It.current;Ie(null);try{const $e=await Zn(()=>j.mutateAsync([be,re]));H(qe=>qe.map(Jt=>Jt.id===$e.id?$e:Jt)),It.current===Re&&(rt.current=null,Et(null),Ie(null))}catch($e){throw It.current===Re&&(rt.current=null,Et(null)),$e}}async function $r(){if((Gt==null?void 0:Gt.harness)==="claude-code"){Gs("auto");return}if(sn)try{await Wr(!1)}catch{Ie(Eie())}}async function na(){const re=!Kn;try{if((Gt==null?void 0:Gt.harness)==="claude-code")Gs(re?"plan":"auto");else if(($t==null?void 0:$t.planActivation)==="command")await Wr(re);else throw new Error(h2())}catch{Ie(kE())}}function ci(re,be){const Re=Xj(re,be);ne(Re.text),Dn(!0),na(),window.requestAnimationFrame(()=>{var $e,qe;($e=fn.current)==null||$e.focus(),(qe=fn.current)==null||qe.setSelectionRange(Re.cursor,Re.cursor),os(Re.cursor)})}const Ws=R.useCallback(async(re=!1)=>{const be=$.current;if(be.projectId!==e||!Hn(F.queryKey))return null;const Re=(tt.getQueryData(F.queryKey)??[]).map($e=>$e.id);try{const $e=await tt.fetchQuery({...F,...re?{staleTime:0}:{}});if($.current!==be||!Hn(F.queryKey))return null;const qe=$e.filter(en=>!ou.has(en.id)),Jt=new Set(qe.map(en=>en.id));for(const en of Re)Jt.has(en)||zu(en);return gt.current=new Map(qe.map(en=>[en.id,en.title])),qe}catch{return null}},[e]),Ni=R.useCallback(async re=>{$.current.projectId!==e||!Hn(F.queryKey)||await Promise.all([tt.fetchQuery({...Wl(re),staleTime:0}),Ws(!0)]).catch(()=>{})},[e,Ws]);R.useEffect(()=>{const re=hO();G(e===b2?new Set([Z5,J5].filter(Re=>!re.has(Re))):new Set),ne(""),xe([]),Er(new Map),gt.current=new Map,Ws();const be=$.current;return()=>{$.current===be&&($.current={projectId:e})}},[e,Ws]),R.useEffect(()=>{_n(h0),Mn.current=null},[I]),R.useEffect(()=>J1(re=>{switch(re.type){case"session":{if(re.session.projectId!==e||ou.has(re.session.id))return;const be=gt.current.has(re.session.id),Re=gt.current.get(re.session.id)!==re.session.title;gt.current.set(re.session.id,re.session.title),be&&Re&&re.session.titleSource==="generated"&&(Er($e=>{const qe=new Map($e);return qe.set(re.session.id,($e.get(re.session.id)??0)+1),qe}),window.setTimeout(()=>{Er($e=>{if(!$e.has(re.session.id))return $e;const qe=new Map($e);return qe.delete(re.session.id),qe})},v7t));break}case"sessionDeleted":zu(re.sessionId);break}}),[e]),R.useEffect(()=>J1(re=>{re.type==="reconnected"&&Ws(!0)}),[Ws]);const ra=I?we.messagesBySession[I]??iA:iA,wu=I?we.activeLeafBySession[I]??null:null;jn.current=wu;const Mr=R.useMemo(()=>J1t(ra,wu),[ra,wu]),Su=R.useRef({projectId:e,ids:we.busySessions});R.useEffect(()=>{const re=Su.current;Su.current={projectId:e,ids:we.busySessions},re.projectId===e&&G(be=>rvt(be,re.ids,we.busySessions,U,i==="chat"?I:null))},[e,we.busySessions,U,I,i]);const nr=I?we.busySessions.has(I):!1,nd=!nr&&!!(Ve!=null&&Ve.agentReady),rd=nr&&VI(Mr)!=null,sa=nr&&nvt(Mr),Vr=I?we.queuedBySession[I]??[]:[],el=Vr.some(re=>re.dispatchState==="retrying"),ic=Vr.findIndex(re=>re.dispatchState==="blocked"),zi=Vr.reduce((re,be)=>be.dispatchState!=="retrying"||typeof be.nextRetryAt!="number"?re:re===null?be.nextRetryAt:Math.min(re,be.nextRetryAt),null),[Aa,tl]=R.useState(()=>Date.now());R.useEffect(()=>{if(!el||zi===null||(tl(Date.now()),zi<=Date.now()))return;const re=window.setInterval(()=>{const be=Date.now();tl(be),be>=zi&&window.clearInterval(re)},1e3);return()=>window.clearInterval(re)},[el,zi]),R.useEffect(()=>{const re=Vr.reduce((be,Re)=>Re.planMode??be,void 0);re!==void 0?(ft.current=!0,rt.current=re,Et(re)):ft.current&&(ft.current=!1,rt.current=null,Et(null))},[Vr]);const no=!!I&&!(I in we.messagesBySession)&&Xe.isPending,ku=R.useMemo(()=>{const re=new Set;for(const be of we.busySessions)(we.messagesBySession[be]??[]).some(Re=>Re.parts.some($e=>$e.type==="prompt"&&$e.prompt&&!$e.prompt.resolved&&$e.prompt.nativeId))&&re.add(be);return re},[we.busySessions,we.messagesBySession]),Kt=I?ku.has(I):!1,gn=sn,ia=gn?Gr.get(gn.id):void 0,br=R.useMemo(()=>{var re;for(let be=Mr.length-1;be>=0;be--)for(const Re of Mr[be].parts)if(Re.type==="prompt"&&((re=Re.prompt)==null?void 0:re.kind)==="plan"&&!Re.prompt.resolved)return{promptId:Re.id,plan:Re.prompt.plan??"",synthesized:!!Re.prompt.synthesized};return null},[Mr]),Kr=R.useMemo(()=>{const re=gn==null?void 0:gn.harness;if(!I||re!=="claude-code"&&re!=="codex")return null;for(let be=Mr.length-1;be>=0;be--)for(const Re of Mr[be].parts)if(!(Re.type!=="prompt"||!Re.prompt||Re.prompt.resolved)&&Re.prompt.kind==="question")return Re.prompt.nativeId&&!we.busySessions.has(I)?null:Re.id;return null},[Mr,gn==null?void 0:gn.harness,I,we.busySessions]),Vs=ai&&!Kr,ro=re=>!Kr&&!ai&&qs.some(be=>be.name===re),[Ks,nl]=R.useState(null),Ra=Ks&&Ks.sessionId===I?Ks:null;R.useEffect(()=>{if(!Ks)return;const re=we.busySessions.has(Ks.sessionId),be=Ks.sessionId===I&&br&&br.promptId!==Ks.promptId;(!re||be)&&nl(null)},[Ks,br,we.busySessions,I]);const sd=R.useMemo(()=>ok(Mr),[Mr]),us=nr&&!!(Ve!=null&&Ve.supportsSteering)&&!!(Ve!=null&&Ve.agentReady)&&!br&&!Kr&&!sd&&he.length===0&&Q.length===0,Dr=R.useMemo(()=>p&&I?(re,be,Re)=>p(re,I,be,Re):void 0,[p,I]),rl=R.useMemo(()=>m&&I?(re,be,Re)=>m(I,re,be,Re):void 0,[m,I]),sl=R.useMemo(()=>o&&((re,be,Re,$e,qe)=>o(re,I??void 0,be,Re,$e,qe)),[o,I]);R.useEffect(()=>{bt.current+=1,It.current+=1;const re=(I?we.queuedBySession[I]??[]:[]).reduce((be,Re)=>Re.planMode??be,void 0);ft.current=re!==void 0,rt.current=re??null,Et(re??null),Ht({}),Ie(null)},[I]);const aa=i==="chat"&&(Mr.length>0||nr),so=(Gt==null?void 0:Gt.harness)??null,il=(Gt==null?void 0:Gt.model)??null,oa=Xe.data?null:Xe.error,io=i==="chat"&&!aa&&!no&&!oa,ac=ct({...kut(e,so??"claude-code",il,T()),enabled:io&&so!==null,subscribed:io&&so!==null}),Cu=((cc=ac.data)==null?void 0:cc.prompts)??null,ao=so!==null&&ac.isPending,al=e===b2?"demo":"project",oo=re=>{ne(re),Dn(!1),window.requestAnimationFrame(()=>{const be=fn.current;be&&(be.focus(),be.setSelectionRange(re.length,re.length),os(re.length))})};R.useEffect(()=>{b&&(ne(b),Dn(!1),os(b.length))},[b]);const Eu=R.useCallback(re=>{const be=re.scrollHeight-re.scrollTop-re.clientHeight<60;cr.current=be,An(be)},[]),la=R.useCallback(()=>{var re;cr.current=!0,An(!0),(re=Zt.current)==null||re.call(Zt)},[]);R.useEffect(()=>{const re=dn.current,be=Nn.current;if(!re||!be)return;const Re=new ResizeObserver(()=>{var $e;cr.current?($e=Zt.current)==null||$e.call(Zt):Eu(re)});return Re.observe(re),Re.observe(be),()=>Re.disconnect()},[aa,Eu]);const Ti=R.useCallback(re=>{re.currentTarget.blur(),la()},[la]);async function id({queue:re=!1}={}){var Qr,Rs,ji,ul,Ma,ho;if(sf({name:"first_action",surface:al,action:"typed_prompt"}),vr.current)return;const be=oe.trim(),Re=Kr?null:YSt(be,$t==null?void 0:$t.planActivation),$e=!!Re,qe=!Kn,Jt=Zj($t==null?void 0:$t.planActivation,$e?qe:void 0,rt.current),en=$e&&(Ve==null?void 0:Ve.id)==="claude-code"?qe?"plan":"auto":void 0,hr=Re?Re.prompt:be,On=he,fs=Q,fo=fs.map(zn=>({text:zn.text})),Ru=e,uc=i;let J=I;const me=()=>{const zn=le.current;return Hn(F.queryKey)&&zn.projectId===Ru&&zn.activeId===J&&zn.mainView===uc},ze=()=>{me()&&(ne(zn=>zn||be),xe(zn=>zn.length?zn:On),ce(zn=>zn.length?zn:fs))};if($e&&!hr&&On.length===0&&fs.length===0){ne(""),Dn(!1);try{if((Ve==null?void 0:Ve.id)==="claude-code")Gs(qe?"plan":"auto");else if(($t==null?void 0:$t.planActivation)==="command")await Wr(qe);else throw new Error(h2())}catch{Ie(kE()),ze()}return}const Me=Gt?{...Gt,...en?{permissionMode:en}:{}}:null;en&&Gs(en);let je=null;const at=rt.current;$e&&($t==null?void 0:$t.planActivation)==="command"&&(je=++It.current,rt.current=qe,Et(qe));const ot=()=>{!me()||je===null||It.current!==je||(rt.current=at,Et(at))};if(!hr&&On.length===0&&fs.length===0)return;if((hr||fs.length>0)&&Kr&&On.length===0){ne(""),ce([]),ol({promptId:Kr,answers:[],note:hr||void 0,annotations:fo}).then(zn=>{zn||ze()});return}const Ft=JSON.stringify({text:hr,images:On.map(zn=>({mediaType:zn.mediaType,name:zn.name,dataUrl:zn.dataUrl})),annotations:fo,settings:Me?{model:Me.model,serviceTier:Me.serviceTier,permissionMode:Me.permissionMode,planMode:Jt,reasoningLevel:Me.reasoningLevel}:null}),In=((Qr=Mn.current)==null?void 0:Qr.signature)===Ft?Mn.current.id:`ct_${crypto.randomUUID()}`;if(Mn.current={signature:Ft,id:In},nr){if(!I||!(Ve!=null&&Ve.agentReady)){ot();return}const zn=I;ne(""),xe([]),ce([]),Ze(null);const fi=Me?{model:Me.model,serviceTier:Me.serviceTier,permissionMode:Me.permissionMode,planMode:($t==null?void 0:$t.planActivation)==="command"?Jt??(sn==null?void 0:sn.planMode):Jt,reasoningLevel:Me.reasoningLevel}:{};me()&&Ht({});const Da=On.map(zr=>({mediaType:zr.mediaType,dataBase64:zr.dataUrl.slice(zr.dataUrl.indexOf(",")+1),name:zr.name}));try{(Rs=(await Zn(()=>wN(zn,hr,fi,Da.length?Da:void 0,fo,In,us&&!re&&!$e?"steer":void 0))).turn)!=null&&Rs.existing&&await Ni(zn),me()&&_n(h0),((ji=Mn.current)==null?void 0:ji.id)===In&&(Mn.current=null)}catch{ot(),ze()}return}if(!(Ve!=null&&Ve.agentReady)){ot();return}if(!Me){ot();return}let xn=I;try{vr.current=!0;try{if(!xn){const _o=await ad(Me,Jt);xn=_o.id,J=_o.id}if(!Hn(F.queryKey))return;const _r=Wl(xn);await tt.fetchQuery({..._r,...((ul=tt.getQueryState(_r.queryKey))==null?void 0:ul.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{vr.current=!1}if(!Hn(F.queryKey))return;me()&&(ne(_r=>_r===oe?"":_r),xe(_r=>_r===On?[]:_r),ce(_r=>_r===fs?[]:_r),Ze(null)),Ae({type:"optimisticUser",sessionId:xn,text:hr||Ise(),attachments:On.map(_r=>({url:_r.dataUrl,mediaType:_r.mediaType,name:_r.name})),annotations:fs}),Ae({type:"busy",sessionId:xn,busy:!0}),me()&&la(),me()&&te==="archived"&&fe("active");const zn=Me?{model:Me.model,serviceTier:Me.serviceTier,permissionMode:Me.permissionMode,planMode:Jt,reasoningLevel:Me.reasoningLevel}:{};me()&&Ht({});const fi=On.map(_r=>({mediaType:_r.mediaType,dataBase64:_r.dataUrl.slice(_r.dataUrl.indexOf(",")+1),name:_r.name})),Da=xn;if(!Da)throw new Error(mhe());(Ma=(await Zn(()=>wN(Da,hr,zn,fi.length?fi:void 0,fo,In))).turn)!=null&&Ma.existing&&await Ni(Da),me()&&_n(h0),((ho=Mn.current)==null?void 0:ho.id)===In&&(Mn.current=null)}catch(zn){if(!Hn(F.queryKey)||(ze(),ot(),!xn))return;const fi=zn instanceof Error?zn.message:String(zn);if(!/session is busy/i.test(fi)&&await tt.fetchQuery({...Sa(e),staleTime:0}).then(zr=>{var fc;return!!((fc=zr.find(_r=>_r.id===xn))!=null&&fc.busy)}).catch(()=>!1)){me()&&(ne(zr=>zr===hr?"":zr),xe(zr=>zr===On?[]:zr),ce(zr=>zr===fs?[]:zr));return}Ae({type:"busy",sessionId:xn,busy:!1}),Ae({type:"localError",sessionId:xn,text:Wie({error:Ee(fi)})})}}async function ad(re,be){const Re=le.current,$e=$.current,qe=await z.mutateAsync([e,re.harness,{model:re.model,serviceTier:re.serviceTier,permissionMode:re.permissionMode,planMode:be,reasoningLevel:re.reasoningLevel}]);return $.current===$e&&(H(Jt=>[qe,...Jt.filter(en=>en.id!==qe.id)]),tt.getQueryData(F.queryKey)||Ws(!0)),$.current===$e&&le.current===Re&&(L.current(qe.id,{replace:!0}),le.current={...Re,activeId:qe.id}),qe}function od(){const re=skt(oe);ne(re),window.requestAnimationFrame(()=>{var be,Re;(be=fn.current)==null||be.focus(),(Re=fn.current)==null||Re.setSelectionRange(re.length,re.length),os(re.length)})}async function ld(){const re=Us;if(!re)return;if(Ie(null),nr){Ie(Jse());return}const be=oe,Re=le.current;let $e=I;const qe=()=>{const On=le.current;return On.projectId===Re.projectId&&On.activeId===$e&&On.mainView===Re.mainView},Jt=()=>{qe()&&ne(On=>On||be)};ne(""),Dn(!1);let en=I;if(!en){if(!(Ve!=null&&Ve.agentReady)||!Gt){Jt(),Ie(h2());return}try{const On=Zj($t==null?void 0:$t.planActivation,void 0,rt.current);en=(await ad(Gt,On)).id,$e=en,qe()&&Ht({})}catch(On){Jt();const fs=On instanceof Error?On.message:String(On);qe()&&Ie(J9({error:Ee(fs)}));return}}qe()&&te==="archived"&&fe("active");const hr=`${Ef}shell-${Date.now()}`;Ae({type:"localShell",sessionId:en,id:hr,command:re}),qe()&&la();try{const{message:On}=await Dct(en,re);Ae({type:"upsertMessage",sessionId:en,message:On})}catch(On){const fs=On instanceof Error?On.message:String(On);Ae({type:"localShell",sessionId:en,id:hr,command:re,error:J9({error:Ee(fs)})})}}function Nu(){I&&Bct(I).catch(()=>{Ie(Ohe())})}const p_=R.useCallback(async(re,be)=>{if(!(!I||Xt.current)){Xt.current=!0,Ie(null),Xn(re);try{const Re=avt({model:ln.model,serviceTier:ln.serviceTier,permissionMode:ln.permissionMode,planMode:ln.planMode,reasoningLevel:ln.reasoningLevel}),$e=I;(await Lct($e,re,be,Re)).turn.existing&&await Ni($e),_n(h0)}catch{Ie(Pde())}finally{Xt.current=!1,Xn(null)}}},[I,ln,Ni]),cd=R.useCallback((re,be)=>{if(!I||nr||!(Ve!=null&&Ve.agentReady))return;const Re=I;Ae({type:"busy",sessionId:Re,busy:!0}),la(),Zn(()=>Oct(Re,re,be)).catch($e=>{Ae({type:"busy",sessionId:Re,busy:!1});const qe=$e instanceof Error?$e.message:String($e);Ae({type:"localError",sessionId:Re,text:Kde({error:Ee(qe)})})})},[I,nr,Ve==null?void 0:Ve.agentReady,la,Zn]),oc=R.useCallback(re=>{if(!I||nr)return;const be=I,Re=jn.current;Ae({type:"activeLeaf",sessionId:be,leafId:re}),Zn(()=>Ict(be,re)).catch($e=>{Ae({type:"activeLeaf",sessionId:be,leafId:Re});const qe=$e instanceof Error?$e.message:String($e);Ae({type:"localError",sessionId:be,text:Phe({error:Ee(qe)})})})},[I,nr,Zn]);function lc(re){if(!I)return;const be=I;Act(be,re).then(({removed:Re})=>{if(Re)return Ni(be)}).catch(()=>Ie(Ude()))}async function ud(re){if(!I||or)return;const be=I;Ie(null),lr(re);try{await Rct(be,re),await Ni(be)}catch{Ie(nhe())}finally{lr(null)}}R.useEffect(()=>{if(!nr||i!=="chat")return;function re(be){var Re;be.key!=="Escape"||be.defaultPrevented||(be.preventDefault(),Nu(),(Re=fn.current)==null||Re.focus())}return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[nr,I,i]);function zu(re){Vv(re),le.current.projectId===e&&le.current.activeId===re&&le.current.mainView==="chat"&&L.current(null,{replace:!0}),G(be=>{if(!be.has(re))return be;const Re=new Set(be);return Re.delete(re),Re}),gt.current.delete(re)}function Tu(re,be){const Re=re.archived;H($e=>$e.map(qe=>qe.id===re.id?{...qe,archived:be}:qe)),M.mutateAsync([re.id,be]).catch(()=>{H($e=>$e.map(qe=>qe.id===re.id?{...qe,archived:Re}:qe))})}function ju(re,be){const Re=re.title;H($e=>$e.map(qe=>qe.id===re.id?{...qe,title:be}:qe)),O.mutateAsync([re.id,be]).catch(()=>{H($e=>$e.map(qe=>qe.id===re.id?{...qe,title:Re}:qe))})}async function m_(re){var Re;const be=((Re=re.title)==null?void 0:Re.trim())||bg();if(window.confirm(vie({title:Oo(be)}))){try{await B.mutateAsync(re.id)}catch($e){fr(wie({title:Oo(be),error:Ee($e instanceof Error?$e.message:String($e))}),"error");return}zu(re.id)}}const ol=R.useCallback(re=>{if(!I)return Promise.resolve(!1);const be=I;return Ae({type:"busy",sessionId:be,busy:!0}),Zn(()=>$ct(be,re)).then(()=>!0).catch(()=>!1).finally(()=>{Hn(F.queryKey)&&(tt.fetchQuery({...Wl(be),staleTime:0}).catch(()=>{}),tt.fetchQuery({...Sa(e),staleTime:0}).catch(()=>{}))})},[I,e,Zn,F]),ws=U.filter(re=>_7t(te,re.archived)),Ln=/Mac|iPhone|iPad/.test(navigator.platform),Au=Ln?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",g_=Ln?"⌘ Enter":"Ctrl + Enter",lo=R.useCallback(()=>{fe("active"),y(null)},[y]),v_=R.useCallback(re=>{fe("all"),y(re)},[y]);R.useEffect(()=>{const re=be=>{be.repeat||be.key!=="Enter"||!be.metaKey&&!be.ctrlKey||be.altKey||!be.shiftKey||(be.preventDefault(),lo())};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[lo]);const Pr=h.jsxs("aside",{className:"session-rail w-68 shrink-0 flex flex-col mt-5 me-3.5 mb-5 ms-0 bg-background min-h-0 [&_.rail-body]:flex-1 [&_.rail-body]:min-h-0 [&_.rail-body]:overflow-y-auto [&_.rail-body]:pt-0 [&_.rail-body]:pb-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,h.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[h.jsxs("button",{className:"rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start hover:bg-surface [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":Au,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:lo,children:[h.jsx(S6,{size:15}),gce()]}),h.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${i==="skills"?"active":""}`,onClick:()=>a("skills"),children:[h.jsx(mO,{size:15}),lle()]}),USt.map(re=>h.jsxs("button",{className:`rail-nav-item flex items-center gap-2.5 py-[7px] px-2.5 text-base text-text rounded-md text-start [&:hover:not(.active)]:bg-surface [&.active]:bg-panel [&.active]:font-medium ${i!=="chat"&&i!=="skills"&&re.activeTabs.includes(i)?"active":""}`,"data-onboarding":re.id==="compute"?"nav-compute":void 0,onClick:()=>a(re.id),children:[re.icon,re.label()]},re.id))]}),h.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-0 ps-4.5",children:[h.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((ll=VP.find(re=>re.id===te))==null?void 0:ll.railLabel())??uD()}),h.jsx("div",{className:"rail-section-actions flex items-center gap-0.5",children:h.jsx(p7t,{value:te,onChange:fe})})]}),h.jsxs("div",{className:"rail-body",children:[ws.map(re=>h.jsx(b7t,{session:re,active:re.id===I&&i==="chat",unread:q.has(re.id),busy:we.busySessions.has(re.id),waiting:ku.has(re.id),revealTitle:Gr.get(re.id),onOpen:()=>{if(y(re.id),e===b2){Fdt(re.id);const be=yot[re.id];be&&(sf({name:"demo_experiment_started",kind:"curated",experiment:be}),sf({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:be=>ju(re,be),onSetArchived:be=>Tu(re,be),onDelete:()=>void m_(re)},re.id)),ws.length===0&&h.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:te==="archived"?oae():U.length>0?Jie():fae()})]}),x.kind==="ssh"?h.jsx(sv,{runtime:x}):h.jsx("div",{className:"relative shrink-0 border-t border-border",children:h.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[h.jsx(on,{size:"small","aria-label":DD(),"aria-haspopup":"dialog",onClick:()=>V(!0),children:h.jsx(W4,{size:14,className:"shrink-0"})}),h.jsxs("span",{className:"flex min-w-0 flex-col gap-1 text-start text-text",children:[h.jsx("span",{className:"truncate text-sm leading-tight",children:MD()}),h.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ee(x.version)]})]})]})}),Y&&h.jsx(y7t,{onClose:()=>V(!1),onConfigureSsh:()=>{V(!1),ie(!0)}}),X&&h.jsx(xP,{onClose:()=>{ie(!1),V(!0)}})]}),ui="chat-header flex items-center gap-2 py-0 px-4 bg-background shrink-0 h-12 relative z-4 w-full max-w-readable my-0 mx-auto [&::after]:content-[''] [&::after]:absolute [&::after]:top-full [&::after]:start-0 [&::after]:end-0 [&::after]:h-6 [&::after]:bg-[linear-gradient(to_bottom,_var(--base),_transparent)] [&::after]:pointer-events-none",co=!r&&h.jsx(on,{title:yE(),"aria-label":yE(),onClick:s,children:h.jsx(NO,{size:20})});return i!=="chat"?h.jsxs(h.Fragment,{children:[r&&Pr,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&h.jsx("div",{className:"flex h-12 shrink-0 items-center",children:co}),h.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:N})]})]}):h.jsxs(h.Fragment,{children:[r&&Pr,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 mt-5",children:[h.jsxs("div",{className:r?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] items-center",children:[co,h.jsxs("div",{className:ui,children:[h.jsx(Z0,{variant:"header",title:gn?((uo=gn.title)==null?void 0:uo.trim())||bg():eE(),children:gn?h.jsx(KP,{title:((bs=gn.title)==null?void 0:bs.trim())||bg(),animate:ia!==void 0},ia??"static"):eE()}),S&&h.jsx(on,{"data-tip":tE(),"aria-label":tE(),onClick:S,children:h.jsx(pht,{size:15})})]})]}),oa?h.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[h.jsx("p",{children:oa.message}),h.jsx(Oe,{onClick:()=>void Xe.refetch(),children:qi()})]}):no?h.jsxs("div",{className:"chat-loading flex-1 flex items-center justify-center gap-3 text-subtext text-xl p-5 [&_.spinner]:w-5.5 [&_.spinner]:h-5.5 [&_.spinner]:border-[3px]","aria-live":"polite","aria-busy":"true",children:[h.jsx(Dt,{}),h.jsx("span",{children:hce()})]}):aa?h.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:dn,tabIndex:0,role:"region","aria-label":((cl=gn==null?void 0:gn.title)==null?void 0:cl.trim())||bg(),onScroll:re=>{Eu(re.currentTarget),He.dismiss()},children:h.jsxs("div",{className:"chat-thread-inner max-w-readable my-0 mx-auto pt-4 px-4 pb-8 flex flex-col gap-4",ref:Nn,children:[h.jsx(h7t,{scrollRef:dn,scrollToEndRef:Zt,onPinToBottom:la,messages:Mr,allMessages:ra,canFork:nd,onFork:cd,onSelectFork:oc,busy:nr,onOpenFile:sl,onOpenRun:l,onOpenSpawnedSession:v_,runExperimentName:u,onOpenExperiment:_,experimentName:f,onRespond:ol,onOpenPlan:Dr,onOpenSubagent:rl,recoveringTurnId:Yt,onRecover:p_,skills:qs},I),nr&&Kt&&h.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:Jfe()}),nr&&!Kt&&!rd&&!sa&&h.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:h.jsx("span",{className:"tool-running-shimmer",children:Khe()})})]})}):h.jsxs("div",{className:"chat-empty flex-1 flex flex-col items-center justify-center text-text p-8 text-center [&_h2]:m-0 [&_h2]:text-5xl [&_h2]:font-medium [&_h2]:tracking-[-0.015em] [&_h2]:text-text",children:[h.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:h.jsx(E6,{})}),h.jsx("h2",{children:rde()}),h.jsxs("div",{className:"chat-empty-project inline-flex items-center gap-[7px] mt-3 py-1.5 px-3 border border-border rounded-full text-subtext bg-surface text-lg font-medium",children:[h.jsx(Df,{size:19}),h.jsx("span",{children:n})]}),ao&&h.jsx("div",{className:uA,role:"status","aria-live":"polite","aria-label":Sfe(),"aria-busy":"true",children:cA.map((re,be)=>h.jsxs("div",{className:`flex min-h-22 animate-pulse flex-col items-start justify-center gap-2.5 rounded-xl border bg-background px-5 py-4 ${Tw[be].box}`,children:[h.jsxs("span",{className:`flex w-full items-center gap-2.5 ${Tw[be].icon}`,children:[h.jsx(re,{size:17}),h.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),h.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},be))}),Cu&&Cu.length>0&&h.jsx("div",{className:uA,role:"group","aria-label":Nfe(),children:Cu.map((re,be)=>{const Re=cA[be],$e=Tw[be];return h.jsxs("button",{type:"button",className:`flex min-h-22 w-full min-w-0 cursor-pointer flex-col items-start justify-center gap-1.5 rounded-xl border bg-background px-5 py-4 text-start font-sans transition-colors duration-120 ease-standard hover:bg-surface ${$e.box}`,onClick:()=>{sf({name:"project_starter_clicked",slot:be+1}),sf({name:"first_action",surface:al,action:"starter_click"}),oo(re.prompt)},children:[h.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[h.jsx(Re,{size:17,className:$e.icon}),re.title]}),h.jsx("span",{className:"w-full truncate text-sm text-subtext",children:re.prompt})]},be)})})]}),He.action&&h.jsxs(Oe,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:He.action.x,top:He.action.top,transform:"translateX(-50%)"},onMouseDown:re=>re.preventDefault(),onClick:He.add,children:[h.jsx(EO,{size:14}),Jae()]}),h.jsxs("div",{className:"composer px-3 pb-5 shrink-0 relative z-4 bg-background w-full max-w-readable my-0 mx-auto [&_textarea]:border-0 [&_textarea]:bg-none [&_textarea]:bg-transparent [&_textarea]:resize-none [&_textarea]:pt-2.5 [&_textarea]:px-3 [&_textarea]:pb-1 [&_textarea]:text-base [&_textarea]:field-sizing-content [&_textarea]:min-h-18 [&_textarea]:max-h-45",children:[aa&&h.jsx(on,{className:`absolute bottom-full left-1/2 z-5 mb-6 h-9 w-9 -translate-x-1/2 rounded-full border border-border bg-background shadow-control transition-opacity duration-150 ease-standard ${pn?"opacity-0":"opacity-100"}`,title:SE(),"aria-label":SE(),inert:pn,onClick:Ti,children:nr&&!Kt?h.jsx(b6,{size:18,className:"tool-running-shimmer-icon"}):h.jsx(Zdt,{size:16})}),br&&!(Ra&&br.promptId===Ra.promptId)&&h.jsx(eSt,{synthesized:br.synthesized,agentLabel:gn?y0[gn.harness]:Uhe(),showResumeModes:(gn==null?void 0:gn.harness)==="claude-code",onView:re=>Dr==null?void 0:Dr(br.plan,br.promptId,re),onApprove:re=>ol({promptId:br.promptId,approve:!0,...re?{resumeMode:re}:{}}),onReject:()=>ol({promptId:br.promptId,approve:!1}),onRevise:re=>{I&&nl({sessionId:I,promptId:br.promptId}),ol({promptId:br.promptId,approve:!1,note:re})}}),Vr.length>0&&h.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:Vr.map((re,be)=>h.jsxs("div",{className:"queued-chip flex flex-wrap items-center gap-x-2 gap-y-1 py-1.5 px-2.5 text-sm text-subtext bg-background border border-border rounded-sm",title:re.error?`${re.text} + +${re.error}`:re.text,children:[re.dispatchState==="blocked"?h.jsx(RO,{size:13,className:"shrink-0 text-accent-amber"}):h.jsx(xht,{size:13,className:"shrink-0 text-muted"}),h.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:re.text}),re.dispatchState!=="blocked"&&h.jsx("span",{className:"shrink-0 text-sm text-muted",children:re.dispatchState==="retrying"?ivt(re.nextRetryAt,Aa):Tde()}),re.dispatchState==="blocked"?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>void ud(re.id),"aria-label":LQ({text:re.text}),disabled:or!==null,className:"shrink-0 px-1.5 py-0.5 border border-border rounded-sm text-sm text-text bg-background cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:border-text",children:or===re.id?ID():qi()}),h.jsx("button",{onClick:()=>lc(re.id),"aria-label":AQ({text:re.text}),disabled:or!==null,className:"shrink-0 px-1.5 py-0.5 border-0 text-sm text-muted bg-transparent cursor-pointer disabled:opacity-50 disabled:cursor-default [&:hover:not(:disabled)]:text-text",children:Cue()}),be===ic&&belc(re.id),className:"shrink-0 inline-flex items-center justify-center w-4 h-4 p-0 border-0 rounded-full text-muted cursor-pointer [&:hover]:bg-text [&:hover]:text-background",children:h.jsx(ts,{size:11})})]},re.id))}),h.jsxs("div",{className:`composer-box relative flex flex-col border ${Vs?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[Ve&&!Ve.agentReady&&h.jsxs("div",{className:"composer-harness-warning py-2 px-3 text-subtext text-sm leading-normal border-b border-b-border-variant [&_strong]:text-accent-amber [&_strong]:font-medium [&_code]:font-mono [&_code]:text-text",children:[h.jsxs("strong",{children:[Ve.name," ",Kle()]})," ",Ve.agentNote?Kp(Ve.agentNote):Ode()]}),Ei&&h.jsx(VSt,{skills:vs,activeIndex:ls,onPick:Ta,onHover:nn}),Q.length>0&&h.jsx(Ckt,{annotations:Q,onClear:()=>{ce([]),window.requestAnimationFrame(()=>{var re;return(re=fn.current)==null?void 0:re.focus()})},onRemove:re=>{const be=Q.filter(Re=>Re.id!==re);ce(be),be.length===0&&window.requestAnimationFrame(()=>{var Re;return(Re=fn.current)==null?void 0:Re.focus()})}}),he.length>0&&h.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:he.map((re,be)=>{const Re=()=>xe($e=>$e.filter((qe,Jt)=>Jt!==be));return re.mediaType==="application/pdf"?h.jsxs("div",{className:"attachment-file [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background relative inline-flex items-center gap-2 max-w-55 py-2 px-2.5 border border-border rounded-sm text-text bg-surface [&_svg]:shrink-0 [&_svg]:text-muted",title:re.name,children:[h.jsx(nb,{size:22}),h.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:re.name??"document.pdf"}),h.jsx("button",{title:pE(),"aria-label":pE(),onClick:Re,children:h.jsx(ts,{size:11})})]},be):h.jsxs("div",{className:"attachment-thumb relative [&_img]:w-13 [&_img]:h-13 [&_img]:object-cover [&_img]:border [&_img]:border-border [&_img]:rounded-sm [&_img]:block [&_button]:absolute [&_button]:-top-[5px] [&_button]:-right-[5px] [&_button]:inline-flex [&_button]:items-center [&_button]:justify-center [&_button]:w-4 [&_button]:h-4 [&_button]:p-0 [&_button]:border [&_button]:border-border [&_button]:rounded-full [&_button]:bg-surface [&_button]:text-text [&_button]:cursor-pointer [&_button:hover]:bg-text [&_button:hover]:text-background",children:[h.jsx("img",{src:re.dataUrl,alt:fde()}),h.jsx("button",{title:mE(),"aria-label":mE(),onClick:Re,children:h.jsx(ts,{size:11})})]},be)})}),Te&&h.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Te}),Ue&&h.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Ue}),h.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${Vs?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[h.jsx("textarea",{dir:"auto",ref:fn,className:"relative z-1 bg-transparent",value:oe,placeholder:Kr?i_e():us&&Ve?Rhe({harness:Ee(y0[Ve.id]),shortcut:Ee(g_)}):Gt?Ve!=null&&Ve.agentReady?Hie({harness:Ee(y0[Gt.harness])}):Bie({harness:Ee(y0[Gt.harness])}):Mse(),rows:2,onPaste:Hs,onDragOver:re=>{re.dataTransfer.types.includes("Files")&&re.preventDefault()},onDrop:re=>{re.dataTransfer.files.length!==0&&(re.preventDefault(),Ci(Array.from(re.dataTransfer.files)))},onChange:re=>{const be=re.target.value,Re=re.target.selectionStart;os(Re);const $e=Re>0&&/\s/.test(be[Re-1])&&!Kr&&!to.current&&eA(be)===null?ww(be,Re-1):null;if(($e==null?void 0:$e.query)==="plan"&&($t!=null&&$t.planActivation)){ci(be,$e);return}const qe=$e?qs.find(Jt=>Jt.source!=="command"&&Jt.name===$e.query):void 0;if(qe&&$e){const Jt=Yj(be,$e,qe.name,2);ne(Jt.text),window.requestAnimationFrame(()=>{var en;(en=fn.current)==null||en.setSelectionRange(Jt.cursor,Jt.cursor),os(Jt.cursor)});return}ne(be),Dn(!1)},onSelect:re=>os(re.currentTarget.selectionStart),onCompositionStart:()=>{to.current=!0},onCompositionEnd:()=>{to.current=!1},onKeyDown:re=>{if(Ei){if(re.key==="ArrowDown"||re.key==="ArrowUp"){re.preventDefault();const be=re.key==="ArrowDown"?1:-1;nn((ls+be+vs.length)%vs.length);return}if(re.key==="Tab"||re.key==="Enter"){re.preventDefault(),Ta(vs[ls]);return}if(re.key==="Escape"){re.preventDefault(),Dn(!0);return}}if(re.key==="Backspace"&&ja(re.currentTarget)){re.preventDefault();return}if(re.key==="Enter"&&!re.shiftKey&&!re.nativeEvent.isComposing){if(re.preventDefault(),Vs){ld();return}id({queue:re.metaKey||re.ctrlKey})}}}),h.jsx(ekt,{text:oe,isCommand:ro,skills:qs,projectId:e,textareaRef:fn})]}),h.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:pt.ref,children:[h.jsx(on,{type:"button",className:"composer-bare",title:d2(),"aria-label":d2(),"aria-haspopup":"dialog","aria-expanded":pt.open,onClick:()=>pt.setOpen(re=>!re),children:h.jsx(D_t,{size:16})}),pt.open&&h.jsxs("div",{className:"composer-sources-menu absolute bottom-[calc(100%_+_8px)] start-0 z-50 flex min-w-55 flex-col gap-1 rounded-md border border-border bg-background p-2 shadow-dropdown",children:[h.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:d2()}),h.jsx(xvt,{})]})]}),h.jsx("input",{ref:Lt,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:re=>{Ci(Array.from(re.target.files??[])),re.target.value=""}}),h.jsx(on,{type:"button",className:"composer-attach",title:rE(),"aria-label":rE(),onClick:()=>{var re;return(re=Lt.current)==null?void 0:re.click()},children:h.jsx(v_t,{size:16})}),Kn&&h.jsxs(Oe,{type:"button",variant:"ghost",active:!0,className:"group",title:uE(),"aria-label":uE(),onClick:()=>void $r(),children:[h.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[h.jsx(t_t,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),h.jsx(ts,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),h.jsx("span",{children:Rce()})]}),Vs&&h.jsxs(Oe,{type:"button",variant:"ghost",active:!0,className:"group",title:cE(),"aria-label":cE(),onClick:od,children:[h.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[h.jsx(r_,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),h.jsx(ts,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),h.jsx("span",{children:iD()})]}),h.jsx("div",{className:"min-w-0 flex-1"}),h.jsxs("div",{className:"flex min-w-0 items-center",children:[h.jsx(m0t,{value:Gt,onSelect:As,permissionChoices:Ve!=null&&Ve.agentReady?($t==null?void 0:$t.permissionModes)??[]:[],defaultPermissionId:($t==null?void 0:$t.defaultPermissionMode)??null,onSelectPermission:Gs,reasoningChoices:Ve!=null&&Ve.agentReady?li.choices:[],defaultReasoningId:li.defaultId,onSelectReasoning:cs,lockHarness:!!sn}),h.jsx(nkt,{usage:sn==null?void 0:sn.contextUsage})]}),nr&&!Kr?h.jsx(on,{className:"send-btn",variant:"stop",title:xE(),"aria-label":xE(),onClick:Nu,children:h.jsx(ts,{size:16})}):h.jsx(on,{className:"send-btn",variant:"primary",title:Vs?vE():v4(),"aria-label":Vs?vE():v4(),onClick:()=>void(Vs?ld():id()),disabled:Vs?!Us||!I&&!(Ve!=null&&Ve.agentReady):!(Ve!=null&&Ve.agentReady)||!oe.trim()&&he.length===0&&Q.length===0,children:h.jsx(wO,{size:16})})]})]})]})]})]})}const w7t=[],S7t=[];function Ba({className:e,...n}){return h.jsx("div",{className:Ts("relative flex min-h-0 flex-1 flex-col",e),...n})}function dh({className:e,...n}){return h.jsx("div",{className:Ts("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Mo({className:e,...n}){return h.jsx("div",{className:Ts("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const fA=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function k7t({sessionId:e,spawnPartId:n,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:i,experimentName:a,onOpenSubagent:o}){var x;const l=ct(Wl(e)),u=((x=l.data)==null?void 0:x.messages)??(l.isError?[]:null),_=R.useRef(null),f=R.useRef(null),p=R.useRef(!0);if(R.useLayoutEffect(()=>{p.current=!0;const S=_.current;S&&(S.scrollTop=S.scrollHeight)},[e,n]),R.useLayoutEffect(()=>{const S=_.current;S&&p.current&&(S.scrollTop=S.scrollHeight)},[u]),R.useEffect(()=>{const S=_.current,b=f.current;if(!S||!b)return;const v=new ResizeObserver(()=>{p.current&&(S.scrollTop=S.scrollHeight)});return v.observe(b),v.observe(S),()=>v.disconnect()},[u===null]),u===null)return h.jsx(Ba,{children:h.jsx("div",{className:fA,children:h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:grt()})})});let m=null;for(const S of u)if(m=Cv(S.parts,n),m)break;return h.jsx(Ba,{children:h.jsx("div",{className:fA,ref:_,onScroll:S=>{const b=S.currentTarget;p.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:h.jsx("div",{ref:f,children:m?h.jsx(c7t,{spawn:m,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:i,experimentName:a,onOpenSubagent:o}):h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:xrt()})})})})}function C7t({experiment:e}){var s;const n=ct(PO(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return h.jsx(dh,{className:"branch-changes [&_>_.changes-note]:mx-4 [&_>_.changes-note]:my-3.5 [&_>_.diff-explorer]:mx-4 [&_>_.diff-explorer]:mb-0 [&_>_.diff-explorer]:mt-3.5 [&_>_.openresearch-diff]:mx-4 [&_>_.openresearch-diff]:mb-0 [&_>_.openresearch-diff]:mt-3.5 [&_>_.truncated-notice]:mx-4 [&_>_.truncated-notice]:mb-0 [&_>_.truncated-notice]:mt-3.5",children:r&&!t?h.jsxs(Mo,{children:[rse()," ",Ee(r)]}):t?t.diff.trim()?h.jsxs(h.Fragment,{children:[t.truncated&&h.jsx(FI,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),h.jsx(qI,{diff:t.diff,partial:t.truncated})]}):h.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?fse():Jre()}):h.jsx(Mo,{children:ose()})})}function QP({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:i,githubTitle:a,refreshing:o,onRefresh:l}){return h.jsxs("div",{className:"code-tab-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant shrink-0 [&_>_.seg]:p-0.5 [&_>_.seg]:rounded-sm [&_>_.seg_button]:py-0.5 [&_>_.seg_button]:px-2 [&_>_.seg_button]:text-sm [&_>_.seg_button]:font-medium",children:[t&&h.jsxs("div",{className:"seg inline-flex items-center gap-0.5 p-[3px] rounded-md bg-hover-subtle [&_button]:py-[3px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default",role:"group","aria-label":j_e(),children:[h.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:D_e()}),h.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:fD()})]}),r&&h.jsxs("span",{className:"wt-branch-chip inline-flex items-center gap-1 min-w-0 py-0.5 px-2 rounded-full bg-hover-muted text-subtext text-xs [&_>_svg]:shrink-0",title:s,children:[h.jsx(Vp,{size:12}),h.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&h.jsx(Xv,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:h.jsx(ib,{size:13})}),h.jsx("span",{className:"flex-1"}),h.jsx(on,{title:CE(),"aria-label":CE(),onClick:l,children:o?h.jsx(Dt,{}):h.jsx(S_t,{size:13})})]})}const E7t=/\.(md|mdx|markdown)$/i,N7t=/\.tex$/i,z7t=/\.html?$/i,T7t=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,j7t=/\.(csv|tsv|xlsx?|ods)$/i,A7t=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,R7t=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,M7t=/\.pdf$/i,D7t=/\.(docx?|log|rtf|txt)$/i;function L7t(e){return T7t.test(e)}function lk(e){return E7t.test(e)}function YP(e){return N7t.test(e)}function O7t(e){return z7t.test(e)}function Vh({name:e}){const n=lk(e)?"markdown":L7t(e)?"image":j7t.test(e)?"spreadsheet":A7t.test(e)?"code":R7t.test(e)?"archive":M7t.test(e)?"pdf":D7t.test(e)||YP(e)?"document":"file";let t;return n==="markdown"?t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),h.jsx("path",{d:"M2.6 10.5v-5h1.2l1.6 2 1.6-2h1.2v5H6.8V7.6L5.4 9.3 4 7.6v2.9H2.6Zm8.5-5v2.4h1.3L10.5 10 8.6 7.9h1.3V5.5h1.2Z",fill:"currentColor"})]}):n==="image"?t=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),h.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),h.jsx("path",{d:"m2.8 12 3.3-3.5 2.2 2 2.1-2.5 2.8 4H2.8Z",fill:"currentColor"})]}):n==="spreadsheet"?t=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=h.jsx("path",{d:"M6.2 3 1.8 8l4.4 5 1.3-1.2L4.2 8l3.3-3.8L6.2 3Zm3.6 0-1.3 1.2L11.8 8l-3.3 3.8 1.3 1.2 4.4-5-4.4-5Z",fill:"currentColor"}):n==="archive"?t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),h.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),h.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),h.jsx("svg",{className:`file-tree-icon w-[15px] h-[15px] shrink-0 text-muted overflow-visible [&.markdown]:text-accent-blue [&.image]:text-accent-purple [&.spreadsheet]:text-accent-green [&.code]:text-accent-orange [&.archive]:text-accent-amber [&.pdf]:text-accent-red [&.document]:text-subtext ${n}`,viewBox:"0 0 16 16","aria-hidden":"true",children:t})}function XP(e,n){const t=navigator.clipboard;if(!t){fr(Cve(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>fr(W1(),"success")).catch(r=>fr(r instanceof Error?r.message:String(r),"error"))}function ZP({name:e,onCommit:n,onCancel:t}){const[r,s]=R.useState(e),i=R.useRef(!1),a=()=>{if(i.current)return;i.current=!0;const o=r.trim();!o||o===e?t():n(o)};return h.jsx(zs,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":Gve({path:Ee(e)}),onFocus:o=>{const l=e.lastIndexOf(".");o.currentTarget.setSelectionRange(0,l>0?l:e.length)},onChange:o=>s(o.target.value),onClick:o=>o.stopPropagation(),onDoubleClick:o=>o.stopPropagation(),onBlur:a,onKeyDown:o=>{o.stopPropagation(),o.key==="Enter"?(o.preventDefault(),o.currentTarget.blur()):o.key==="Escape"&&(o.preventDefault(),i.current=!0,t())}})}function JP(e,n){const t=e.currentTarget.getBoundingClientRect(),r="clientX"in e?e.clientX:0,s="clientY"in e?e.clientY:0;return{path:n,x:r||t.left+16,y:s||t.top+t.height}}function eF({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onClose:a}){const o=R.useRef(null),l=R.useRef(a);l.current=a;const[u,_]=R.useState({x:e.x,y:e.y});R.useLayoutEffect(()=>{var S;const m=o.current;if(!m)return;const x=document.activeElement instanceof HTMLElement?document.activeElement:null;return _({x:Math.max(8,Math.min(e.x,window.innerWidth-m.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-m.offsetHeight-8))}),(S=m.querySelector("button"))==null||S.focus(),()=>{m.contains(document.activeElement)&&(x==null||x.focus())}},[e]),R.useEffect(()=>{const m=()=>l.current(),x=b=>{var v;(v=o.current)!=null&&v.contains(b.target instanceof Node?b.target:null)||l.current()},S=b=>{if(b.key==="Tab"){b.preventDefault(),l.current();return}b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),l.current())};return document.addEventListener("pointerdown",x),window.addEventListener("blur",m),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),document.addEventListener("keydown",S,!0),()=>{document.removeEventListener("pointerdown",x),window.removeEventListener("blur",m),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0),document.removeEventListener("keydown",S,!0)}},[]);const f=m=>{l.current(),m()},p=(m,x,S=!1)=>h.jsx(dr,{size:"compact",role:"menuitem",danger:S,onClick:()=>f(x),children:h.jsx("span",{children:m})});return Go.createPortal(h.jsxs("div",{ref:o,role:"menu","aria-label":Ive({path:Ee(e.path)}),className:"option-menu fixed z-100 min-w-44 overflow-hidden rounded-md border border-border bg-background p-1 shadow-menu",style:{left:u.x,top:u.y},onContextMenu:m=>m.preventDefault(),onKeyDown:m=>{var v,y;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const x=[...((v=o.current)==null?void 0:v.querySelectorAll("button"))??[]],S=x.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:x[0]),b=m.key==="ArrowDown"?1:-1;(y=x[(S+b+x.length)%x.length])==null||y.focus()},children:[p(Fve(),n),t&&p(oD(),t),r&&p(Mve(),r),p(Wne(),s),i&&p(aD(),i,!0)]}),document.body)}const Y3=["file-tree-row flex items-center gap-1.5 w-full py-[3px] px-2.5 border-0","bg-transparent text-text text-start cursor-pointer font-[inherit]","[&:hover]:bg-panel [&_>_svg]:shrink-0","[&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted"].join(" "),dA=["file-tree-chevron text-muted shrink-0 [button&]:inline-flex","[button&]:items-center [button&]:justify-center [button&]:w-[13px]","[button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent","[button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90"].join(" ");function hA(){return{dirs:new Map,files:[]}}function tF(e){const n=hA();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?h.jsx(Wo,{size:13,className:dA}):h.jsx(Vo,{size:13,className:dA}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&h.jsx(ck,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:l,onRename:u,onCancelRename:_})]})}function ck({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:l,onCancelRename:u}){const _=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),f=[...e.files].sort((p,m)=>p.localeCompare(m));return h.jsxs(h.Fragment,{children:[_.map(p=>{const m=n?`${n}/${p}`:p;return h.jsx(I7t,{name:p,node:e.dirs.get(p),path:m,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:l,onCancelRename:u},`d:${m}`)}),f.map(p=>{const m=n?`${n}/${p}`:p;if(a===m&&l&&u)return h.jsxs("div",{className:Y3,style:{paddingInlineStart:8+t*14},children:[h.jsx(Vh,{name:p}),h.jsx(ZP,{name:p,onCommit:S=>l(m,S),onCancel:u})]},`f:${m}`);const x=qr(S=>i(m,S));return h.jsxs("button",{type:"button",className:Y3,style:{paddingInlineStart:8+t*14},...x,onContextMenu:S=>{o&&(S.preventDefault(),o(S,m))},onKeyDown:S=>{if(o&&(S.key==="ContextMenu"||S.shiftKey&&S.key==="F10")){S.preventDefault(),o(S,m);return}x.onKeyDown(S)},title:$K({name:Ee(m)}),children:[h.jsx(Vh,{name:p}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function B7t({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,E;const l=t.branchName,u=ct({...HO(e,{ref:l}),enabled:r==="files",subscribed:r==="files"}),_=ct({...av(t.chatSessionId??""),enabled:r==="files"&&!!t.chatSessionId,subscribed:r==="files"&&!!t.chatSessionId}),f=u.data,p=(N=u.error)==null?void 0:N.message,m=u.isFetching,x=PO(t.id),S=uG({queryKey:x.queryKey})>0,b=(E=_.data)!=null&&E.exists&&_.data.branch===l?t.chatSessionId??void 0:void 0,v=()=>{u.refetch()},y=R.useMemo(()=>f?tF(f.entries):null,[f]),w=r==="files"?m:S,C=R.useCallback(j=>{const z=new Set(s);z.has(j)?z.delete(j):z.add(j),a(z)},[s,a]);return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[h.jsx(QP,{view:r,onViewChange:i,branchLabel:l,branchTitle:`Committed branch ${l}`,githubHref:n.githubEnabled?Qv(n.githubOwner,n.githubRepo,l):void 0,githubTitle:JM({branch:Ee(l)}),refreshing:w,onRefresh:()=>r==="files"?v():void tt.invalidateQueries(x)}),r==="changes"?h.jsx(C7t,{experiment:t},t.id):h.jsxs(h.Fragment,{children:[(f==null?void 0:f.truncated)&&h.jsx(Mo,{children:F_e()}),p&&y&&h.jsxs(Mo,{children:[Q_e()," ",Ee(p)]}),h.jsx(dh,{children:y?y.dirs.size===0&&y.files.length===0?h.jsx(Mo,{children:G_e()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(ck,{node:y,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(j,z)=>b?o(j,b,void 0,z):o(j,void 0,l,z)})}):h.jsx(Mo,{children:p?dD({error:Ee(p)}):hD()})})]})]})}function uk({icon:e,title:n,description:t}){return h.jsxs("div",{className:"flex h-full w-full min-w-0 flex-1 flex-col items-center justify-center gap-1.5 bg-background p-6 text-center text-muted",children:[h.jsx(e,{size:36,strokeWidth:1.5,className:"shrink-0"}),h.jsx("h3",{className:"mt-1.5 mb-0 max-w-full wrap-anywhere text-xl font-medium text-text",children:n}),t&&h.jsx("p",{className:"m-0 w-full max-w-105 wrap-anywhere text-base leading-[1.55] text-subtext",children:t})]})}function $7t({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var I,L,$;const l=n.id,_=((I=ct(Sa(l)).data)==null?void 0:I.some(q=>q.id===e&&q.busy))??!1,f=ct({...av(e??""),enabled:!!e,refetchInterval:_?5e3:!1}),p=f.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},x=ct({...HO(l,m),enabled:!e||f.isSuccess,refetchInterval:_?5e3:!1}),S=x.data,b=(L=f.error??x.error)==null?void 0:L.message,v=f.isFetching||x.isFetching,[y,w]=R.useState(null),[C,N]=R.useState(null),E=R.useCallback(()=>{e&&tt.invalidateQueries(av(e)),tt.invalidateQueries({queryKey:zt("getCodeTree",l),predicate:q=>!GM(q)})},[e,l]),j=R.useRef(_);R.useEffect(()=>{j.current&&!_&&E(),j.current=_},[_,E]);const z=R.useMemo(()=>S?tF(S.entries):null,[S]),M=R.useCallback(q=>{const G=new Set(r);G.has(q)?G.delete(q):G.add(q),i(G)},[r,i]),O=e&&(p!=null&&p.exists)?p:null,B=(O==null?void 0:O.branch)??(O!=null&&O.baselineBranch?Jat({branch:Ee(O.baselineBranch)}):W5()),F=(($=O==null?void 0:O.files)==null?void 0:$.length)??0,U=O?Gat({branch:Ee(`${B}${F>0?"*":""}`)}):Qat({branch:Ee(n.baselineBranch)}),H=O?O.branch:n.baselineBranch,Y=(q,G)=>O?a(q,e,void 0,G):a(q,void 0,n.baselineBranch,G),V=(S==null?void 0:S.root)==="worktree",X=async(q,G)=>{try{await Xot(l,q,G,{sessionId:e}),E()}catch(te){fr(te instanceof Error?te.message:String(te),"error")}},ie=q=>{const G=(S==null?void 0:S.path)??n.repoPath;XP(G,q)};return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[h.jsx(QP,{view:O?t:"files",onViewChange:s,showViewToggle:!!O,branchLabel:U,branchTitle:U,githubHref:n.githubEnabled&&H?Qv(n.githubOwner,n.githubRepo,H):void 0,githubTitle:H?JM({branch:Ee(H)}):void 0,refreshing:v,onRefresh:E}),b&&(p||S)&&h.jsxs(Mo,{children:[bot()," ",Ee(b)]}),!S||e&&!p?h.jsx(dh,{children:h.jsx(Mo,{children:b?dD({error:Ee(b)}):hD()})}):O&&t==="changes"?h.jsx(dh,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:F===0||!O.diff?h.jsx("div",{className:"changes-note text-sm text-muted",children:fot()}):h.jsxs(h.Fragment,{children:[O.diff.truncated&&h.jsx(FI,{bytesRead:O.diff.bytesRead,byteLimit:O.diff.byteLimit}),h.jsx(qI,{diff:O.diff.diff,partial:O.diff.truncated})]})}):h.jsxs(dh,{children:[S.truncated&&h.jsx(Mo,{children:rot()}),z?z.dirs.size===0&&z.files.length===0?h.jsx(uk,{icon:Df,title:pot(),description:e2e()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(ck,{node:z,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Y,renamingPath:C,onContextMenu:(q,G)=>{w(JP(q,G))},onRename:(q,G)=>{N(null),X(q,{action:"rename",newName:G})},onCancelRename:()=>N(null)})}):h.jsx(Mo,{children:oot()})]}),y&&h.jsx(eF,{target:y,onOpen:()=>Y(y.path,"keepOpen"),onRename:V&&o(y.path)?()=>N(y.path):void 0,onDuplicate:V?()=>void X(y.path,{action:"duplicate"}):void 0,onCopyPath:()=>ie(y.path),onDelete:V?()=>{window.confirm(Tve({path:Ee(y.path)}))&&X(y.path,{action:"delete"})}:void 0,onClose:()=>w(null)})]})}function nF({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=R.useMemo(()=>{if(!e)return[];const _=e.replace(/\r\n?/g,` +`),f=uP(_,vS(n));return _.endsWith(` +`)?f.slice(0,-1):f},[e,n]),a=t&&i.length>0?Math.min(Math.max(Math.trunc(t),1),i.length):void 0,o=R.useRef(null);R.useEffect(()=>{var _;r!==void 0&&(a?((_=o.current)==null||_.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:l}=bP(i.length),u=R.useMemo(()=>i.map((_,f)=>h.jsxs("div",{ref:f+1===a?o:void 0,className:`file-view-line flex items-stretch ${f+1===a?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[h.jsx("span",{"data-line":f+1,className:`${vP} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${l}ch`},"aria-hidden":"true"}),h.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${wv} ${gP}`,children:fP(_)?h.jsx("br",{}):_})]},f)),[i,l,a]);return h.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${wv}`,children:[i.length>0&&h.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${l}ch`},"aria-hidden":"true"}),u]})}function rF(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function _A({url:e,name:n}){return h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[W4e()," ",h.jsxs("a",{href:e,download:n,children:[SD()," ",Ee(n)]})]})}function X3({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,i]=R.useState(!1);if(R.useEffect(()=>i(!1),[e,n]),s)return h.jsx(_A,{url:n,name:t});let a;return e==="image"?a=h.jsx("div",{className:"fpreview-image flex min-h-0 flex-1 items-start justify-center overflow-auto p-6 [&_img]:max-w-full [&_img]:h-auto [&_img]:border [&_img]:border-border [&_img]:rounded-sm",children:h.jsx("img",{src:n,alt:t,onError:()=>i(!0)})}):e==="audio"?a=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):e==="video"?a=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>i(!0)})}):a=h.jsx("object",{className:"fpreview-pdf block min-h-0 flex-1 w-full border-0","aria-label":t,data:n,type:"application/pdf",onError:()=>i(!0),children:h.jsx(_A,{url:n,name:t})}),h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a,r&&h.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:h.jsxs("a",{href:n,download:t,children:[SD()," ",t]})})]})}const P7t=e=>({queryKey:zt("fileVersion",e),staleTime:2e3,refetchOnMount:"always",refetchOnWindowFocus:"always",refetchInterval:2e3,queryFn:async({signal:n})=>{const t=await fetch(e,{method:"HEAD",cache:"no-store",signal:n});if(t.status===404)return"missing";if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.headers.get("etag")??t.headers.get("content-length")}});function sF(e,n=!0){return ct({...P7t(e),enabled:n,subscribed:n}).data??null}function F7t(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function H7t(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),i=r===-1?"":t.slice(r),a=s.indexOf("?"),o=a===-1?s:s.slice(0,a),l=a===-1?"":s.slice(a+1),u=o.startsWith("/")?[]:n.split("/").filter(m=>m.length>0);for(const m of o.split("/"))if(!(!m||m==="."))if(m===".."){if(u.length===0)return null;u.pop()}else u.push(m);const _=u.join("/");if(!_)return null;const f=new URLSearchParams(l);f.delete("path");const p=f.toString();return{path:_,url:`${Ih(e,_)}${p?`&${p}`:""}${i}`}}function q7t(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` +---`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const iF="orx:files-tree-width",aF="orx:artifacts-collapsed:",oF=180,lF=320,U7t=8,G7t=280;function W7t(){try{const e=Number(localStorage.getItem(iF));if(Number.isFinite(e)&&e>=oF&&e<=lF)return e}catch{}return G7t}function V7t(e){try{const n=localStorage.getItem(`${aF}${e}`);if(!n)return new Set;const t=JSON.parse(n);return Array.isArray(t)?new Set(t.filter(r=>typeof r=="string")):new Set}catch{return new Set}}function hp(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=hp(t.children??[],n);if(r)return r}}return null}function cF({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(F7t(i))return i;const a=H7t(e,n,i);if(!a)return null;const o=hp(r,a.path);if(!o)return a.url;const l=a.url.indexOf("#"),u=l===-1?a.url:a.url.slice(0,l),_=l===-1?"":a.url.slice(l);return`${u}&v=${o.modifiedAt}:${o.size}${_}`};return h.jsx("div",{className:"md min-w-0 wrap-anywhere text-text leading-[1.62] [&_>_*:first-child]:mt-0 [&_>_*:last-child]:mb-0 [&_p]:my-2.5 [&_p]:mx-0 [&_strong]:text-text [&_strong]:font-semibold [&_pre]:bg-surface [&_pre]:border [&_pre]:border-border-muted [&_pre]:rounded-md [&_pre]:py-2 [&_pre]:px-3 [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:text-text [&_code]:font-mono [&_code]:text-sm [&_code]:font-medium [&_code]:text-primary [&_code]:bg-panel [&_code]:border [&_code]:border-border-variant [&_code]:rounded-xs [&_code]:py-px [&_code]:px-[5px] [&_.katex]:text-prose-emphasis [&_.katex-display]:my-3 [&_.katex-display]:mx-0 [&_.katex-display]:overflow-x-auto [&_.katex-display]:overflow-y-hidden [&_.katex-display]:py-0.5 [&_.katex-display]:px-0 [&_.file-chip]:inline-flex [&_.file-chip]:items-center [&_.file-chip]:gap-1 [&_.file-chip]:max-w-full [&_.file-chip]:my-0 [&_.file-chip]:mx-px [&_.file-chip]:py-0 [&_.file-chip]:px-1.5 [&_.file-chip]:align-baseline [&_.file-chip]:font-mono [&_.file-chip]:text-sm [&_.file-chip]:font-medium [&_.file-chip]:text-text [&_.file-chip]:bg-panel [&_.file-chip]:border [&_.file-chip]:border-border-variant [&_.file-chip]:rounded-xs [&_.file-chip]:cursor-pointer [&_.file-chip:hover:not(:disabled)]:bg-surface [&_.file-chip:hover:not(:disabled)]:text-primary [&_.file-chip_svg]:flex-none [&_.file-chip_svg]:opacity-60 [&_.file-chip-label]:max-w-65 [&_.file-chip-label]:overflow-hidden [&_.file-chip-label]:text-ellipsis [&_.file-chip-label]:whitespace-nowrap [&_.run-chip_svg]:opacity-100 [&_.run-chip_svg]:text-primary [&_pre_code]:bg-none [&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:text-inherit [&_pre_code]:p-0 [&_pre_code]:font-normal [&_h1]:text-text [&_h1]:font-semibold [&_h2]:text-text [&_h2]:font-semibold [&_h3]:text-text [&_h3]:font-semibold [&_h4]:text-text [&_h4]:font-semibold [&_ul]:my-1.5 [&_ul]:mx-0 [&_ul]:ps-5.5 [&_ol]:my-1.5 [&_ol]:mx-0 [&_ol]:ps-5.5 [&_li::marker]:text-primary [&_a]:text-primary [&_table]:border-collapse [&_table]:text-sm [&_table]:my-2.5 [&_table]:mx-0 [&_table]:border [&_table]:border-border [&_table]:rounded-md [&_th]:border-b [&_th]:border-b-border-variant [&_th]:py-2 [&_th]:px-3.5 [&_th]:text-start [&_th]:text-text [&_th]:break-normal [&_th]:break-words [&_td]:border-b [&_td]:border-b-border-variant [&_td]:py-2 [&_td]:px-3.5 [&_td]:text-start [&_td]:text-text [&_td]:break-normal [&_td]:break-words [&_tr:last-child_td]:border-b-0 [&_thead_th]:bg-surface [&_thead_th]:font-medium [&_thead_th]:text-text [&_thead_th]:border-b [&_thead_th]:border-b-border [&_tbody_tr:hover_td]:bg-surface-bright [&_blockquote]:my-1.5 [&_blockquote]:mx-0 [&_blockquote]:pt-0.5 [&_blockquote]:pe-0 [&_blockquote]:pb-0.5 [&_blockquote]:ps-2.5 [&_blockquote]:border-s-[3px] [&_blockquote]:border-s-border [&_blockquote]:text-subtext [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:italic [:is(&,_.openresearch-diff,_.file-view)_.token.operator]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.entity]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.url]:text-syntax-cyan [:is(&,_.openresearch-diff,_.file-view)_.token.comment]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.prolog]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.cdata]:text-syntax-comment [:is(&,_.openresearch-diff,_.file-view)_.token.punctuation]:text-syntax-text [:is(&,_.openresearch-diff,_.file-view)_.token.property]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.tag]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.deleted]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.constant]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.symbol]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.boolean]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.number]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.selector]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.attr-name]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.char]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.inserted]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.string]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.builtin]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.atrule]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.attr-value]:text-syntax-orange [:is(&,_.openresearch-diff,_.file-view)_.token.keyword]:text-syntax-purple [:is(&,_.openresearch-diff,_.file-view)_.token.function]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.decorator]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.def]:text-syntax-blue [:is(&,_.openresearch-diff,_.file-view)_.token.class-name]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.namespace]:text-syntax-yellow [:is(&,_.openresearch-diff,_.file-view)_.token.regex]:text-syntax-green [:is(&,_.openresearch-diff,_.file-view)_.token.important]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.variable]:text-syntax-red [:is(&,_.openresearch-diff,_.file-view)_.token.parameter]:text-syntax-text artifact-md text-lg [&_h1]:text-4xl [&_h1]:leading-[1.18] [&_h1]:mt-7 [&_h1]:mx-0 [&_h1]:mb-3.5 [&_h2]:text-3xl [&_h2]:leading-tight [&_h2]:mt-7 [&_h2]:mx-0 [&_h2]:mb-2.5 [&_h3]:text-xl [&_h3]:leading-[1.35] [&_h3]:mt-5.5 [&_h3]:mx-0 [&_h3]:mb-2 [&_h4]:text-lg [&_h4]:leading-[1.4] [&_h4]:mt-4.5 [&_h4]:mx-0 [&_h4]:mb-1.5 [&_table]:block [&_table]:w-max [&_table]:max-w-full [&_table]:overflow-x-auto [&_.artifact-img]:block [&_.artifact-img]:my-3 [&_.artifact-img]:mx-0 [&_.artifact-img_img]:max-w-full [&_.artifact-img_img]:h-auto [&_.artifact-img_img]:border [&_.artifact-img_img]:border-border [&_.artifact-img_img]:rounded-sm [&_.artifact-img-caption]:block [&_.artifact-img-caption]:mt-1 [&_.artifact-img-caption]:text-center [&_.artifact-img-caption]:text-sm [&_.artifact-img-caption]:text-subtext",children:h.jsx(K2t,{remarkPlugins:[aP,[oP,_P]],rehypePlugins:[L$],components:{a:({href:i,children:a,...o})=>{const l=!i||i.startsWith("#"),u=l?i:s(i);return u?h.jsx("a",{...o,href:u,...l?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):h.jsx("span",{children:a})},img:({src:i,alt:a})=>{if(!i||typeof i!="string")return null;const o=s(i);return o?h.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[h.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&h.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...pP},children:dP(q7t(t))})})}function K7t(e){return e.presentation==="text"&&lk(e.name)?"markdown":rF(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function Q7t(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=yL,i=A6(e,n.path),a=ct({...i,enabled:s,subscribed:s}),o=R.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});R.useEffect(()=>{const _=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&_.projectId===e&&_.path===n.path&&(_.modifiedAt!==n.modifiedAt||_.size!==n.size||_.version!==null&&_.version!==r)&&tt.invalidateQueries({queryKey:i.queryKey,exact:!0})},[e,n.path,n.modifiedAt,n.size,r,s]);const l=a.data;return{text:l&&!l.binary?l.content:null,binary:(l==null?void 0:l.binary)??!1,truncated:(l==null?void 0:l.truncated)??!1,error:l?null:((u=a.error)==null?void 0:u.message)??(l===null?Yne():null),wantsText:s}}function Y7t({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=K7t(n),i=sF(Ih(e,n.path)),{text:a,binary:o,truncated:l,error:u,wantsText:_}=Q7t(e,n,s,i),[f,p]=R.useState(!1),m=s==="markdown",x=n.path.split("/").slice(0,-1).join("/"),S=`${Ih(e,n.path)}&v=${encodeURIComponent(i??`${n.modifiedAt}:${n.size}`)}`;let b;return s==="image"||s==="audio"||s==="video"||s==="pdf"?b=h.jsx(X3,{kind:s,url:S,name:n.name}):s==="download"||!_||o?b=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||o?Hne():Qre()," ",h.jsx("a",{href:S,...s==="download"||o?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||o?gD():ere()})]}):u?b=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[pre()," ",Ee(u)]}):a===null?b=h.jsxs(ss,{children:[h.jsx(Dt,{})," ",rD()]}):m&&!f?b=h.jsx(cF,{projectId:e,folder:x,markdown:a,entries:r}):b=h.jsx(nF,{text:a,path:n.path}),h.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0 [@container((max-width:_720px))]:hidden",children:[h.jsxs("div",{className:"fpreview-head flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-subtext shrink-0",children:[h.jsx(Vh,{name:n.name}),h.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ee(n.path),children:n.name}),h.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[Dre()," ",new Date(n.modifiedAt).toLocaleString(T(),{dateStyle:"medium",timeStyle:"short"})]}),(s==="text"||s==="download")&&h.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:Fl(n.size)}),m&&h.jsx(on,{size:"small",active:f,"data-tip":f?V1():Jd(),"data-tip-align":"end","aria-label":f?V1():Jd(),onClick:()=>p(v=>!v),children:h.jsx(U4,{size:13})}),h.jsx(Xv,{size:"small",href:S,target:"_blank",rel:"noopener noreferrer","data-tip":X9(),"data-tip-align":"end","aria-label":X9(),children:h.jsx(Mf,{size:13})}),h.jsx(on,{size:"small","data-tip":Y9(),"data-tip-align":"end","aria-label":Y9(),onClick:()=>{window.confirm(F5({path:Ee(n.path)}))&&t(n.path)},children:h.jsx(s_,{size:13})})]}),h.jsxs("div",{className:`fpreview-body flex-1 min-h-0 overflow-auto [&.doc]:pt-4.5 [&.doc]:px-7 [&.doc]:pb-12 [&.doc_.artifact-md]:max-w-readable [&.doc_.artifact-md]:my-0 [&.doc_.artifact-md]:mx-auto ${m&&!f?"doc":""}`,children:[b,l&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:bre()})]})]})}function uF({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:l,onContextMenu:u,onRename:_,onCancelRename:f}){return h.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(p=>{var x;const m={paddingInlineStart:8+Math.min(n,U7t)*14};if(p.isDir){const S=!t.has(p.path);return h.jsxs("div",{className:"min-w-0 max-w-full",children:[h.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100",style:m,onClick:()=>s(p.path),children:[h.jsx("button",{className:"file-tree-chevron text-muted shrink-0 [button&]:inline-flex [button&]:items-center [button&]:justify-center [button&]:w-[13px] [button&]:h-[13px] [button&]:p-0 [button&]:border-0 [button&]:bg-transparent [button&_>_svg]:transition-transform [button&_>_svg]:duration-120 [button&_>_svg]:ease-standard [button&_>_svg.open]:rotate-90","aria-label":S?Nne({name:Ee(p.name)}):Bne({name:Ee(p.name)}),onClick:b=>{b.stopPropagation(),s(p.path)},children:h.jsx(Vo,{size:13,className:S?"open":""})}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name}),h.jsx(on,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":fre(),"data-tip-align":"end","aria-label":Dne({name:Ee(p.name)}),onClick:b=>{b.stopPropagation(),window.confirm(F5({path:Ee(p.path)}))&&o(p.path)},children:h.jsx(s_,{size:12})})]}),S&&(((x=p.children)==null?void 0:x.length)??0)>0&&h.jsx(uF,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:l,onContextMenu:u,onRename:_,onCancelRename:f})]},p.path)}return l===p.path?h.jsxs("div",{className:"file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start font-[inherit] artifact-tree-row",style:m,children:[h.jsx(Vh,{name:p.name}),h.jsx(ZP,{name:p.name,onCommit:S=>_(p.path,S),onCancel:f})]},p.path):h.jsxs("button",{type:"button",className:`file-tree-row flex w-full min-w-0 items-center gap-1.5 py-[3px] px-2.5 border-0 bg-transparent text-text text-start cursor-pointer font-[inherit] [&:hover]:bg-panel [&_>_svg]:shrink-0 [&_>_svg]:text-subtext [&_>_svg.file-tree-chevron]:text-muted artifact-tree-row [&.selected]:bg-panel [&.selected:hover]:bg-panel [&:hover_.ft-row-delete]:opacity-100 ${r===p.path?"selected":""}`,style:m,title:PV({path:Ee(p.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===p.path,onClick:()=>i(p.path),onDoubleClick:()=>a(p.path),onContextMenu:S=>{S.preventDefault(),i(p.path),u(S,p.path)},onAuxClick:S=>{S.button===1&&(S.preventDefault(),i(p.path),a(p.path))},onKeyDown:S=>{if(S.key==="ContextMenu"||S.shiftKey&&S.key==="F10"){S.preventDefault(),i(p.path),u(S,p.path);return}if(S.key===" "){S.preventDefault(),S.stopPropagation(),i(p.path);return}S.key==="Enter"&&(S.preventDefault(),S.stopPropagation(),i(p.path),a(p.path))},children:[h.jsx(Vh,{name:p.name}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p.name})]},p.path)})})}function X7t({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,i]=R.useState(null),[a,o]=R.useState(()=>V7t(e.id)),[l,u]=R.useState(W7t),[_,f]=R.useState(null),[p,m]=R.useState(null),x=R.useRef(null);R.useEffect(()=>{try{localStorage.setItem(`${aF}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const S=E=>{var B;E.preventDefault(),E.currentTarget.setPointerCapture(E.pointerId);const j=(B=x.current)==null?void 0:B.getBoundingClientRect(),z=document.body.style.userSelect;document.body.style.userSelect="none";const M=F=>{const U=Math.round(F.clientX-((j==null?void 0:j.left)??0)),H=Math.min(Math.max(U,oF),lF);u(H);try{localStorage.setItem(iF,String(H))}catch{}},O=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",O),window.removeEventListener("pointercancel",O),document.body.style.userSelect=z};window.addEventListener("pointermove",M),window.addEventListener("pointerup",O),window.addEventListener("pointercancel",O)};R.useEffect(()=>{if(!s||!n)return;const E=hp(n.entries,s);(!E||E.isDir)&&i(null)},[s,n]);const b=E=>o(j=>{const z=new Set(j);return z.has(E)?z.delete(E):z.add(E),z}),v=E=>{(s===E||s!=null&&s.startsWith(E+"/"))&&i(null),Jlt(e.id,E).catch(()=>{})},y=async(E,j)=>{try{await ect(e.id,E,j),j.action==="rename"&&s===E&&i(null)}catch(z){fr(z instanceof Error?z.message:String(z),"error")}},w=E=>{n&&XP(n.dir,E)};if(!n)return h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs(ss,{className:"p-5",children:[h.jsx(Dt,{})," ",jre()]})});const C=E=>h.jsx(uF,{entries:E,depth:0,collapsed:a,selected:s,onToggle:b,onSelect:i,onOpenFile:t,onDelete:v,renamingPath:p,onContextMenu:(j,z)=>{f(JP(j,z))},onRename:(j,z)=>{m(null),y(j,{action:"rename",newName:z})},onCancelRename:()=>m(null)}),N=s?hp(n.entries,s):null;return n.entries.length===0?h.jsx(uk,{icon:x6,title:Bre(),description:Gre()}):h.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background @container",children:[h.jsxs("div",{className:"ftree-pane relative shrink-0 flex flex-col min-h-0 border-s border-s-border-variant border-e border-e-border-variant bg-background [@container((max-width:_720px))]:!w-full",ref:x,style:{width:l},children:[h.jsx("div",{className:"ftree-resizer absolute -end-[3px] top-0 bottom-0 w-1.5 cursor-col-resize z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover [@container((max-width:_720px))]:hidden",onPointerDown:S}),h.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[C(n.entries),n.truncated&&h.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:Sre()})]})]}),N?h.jsx(Y7t,{projectId:e.id,entry:N,onDelete:v,artifactEntries:n.entries},N.path):h.jsxs("div",{className:"fpreview flex-1 min-w-0 flex flex-col min-h-0 bg-background fpreview-none items-center justify-center gap-2 text-sm text-muted [@container((max-width:_720px))]:hidden",children:[h.jsx(h_t,{size:22,strokeWidth:1.5}),h.jsx("span",{children:sre()})]}),_&&h.jsx(eF,{target:_,onOpen:()=>t(_.path),onRename:r(_.path)?()=>m(_.path):void 0,onDuplicate:()=>void y(_.path,{action:"duplicate"}),onCopyPath:()=>w(_.path),onDelete:()=>{window.confirm(F5({path:Ee(_.path)}))&&v(_.path)},onClose:()=>f(null)})]})}const fF=20*1024*1024,dF="bg-background border border-border rounded-lg py-4 px-4.5 mb-4 [&_h3]:mt-0 [&_h3]:mx-0 [&_h3]:mb-2.5 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text",hF="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",_F="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",Z7t="font-mono text-base font-medium text-text",J7t="mt-1 mb-0 text-sm leading-relaxed text-text";function pF(e){return new Promise((n,t)=>{const r=new FileReader;r.onload=()=>{const s=r.result;if(typeof s!="string"){t(new Error("could not read file"));return}const i=s.indexOf(",");n(i>=0?s.slice(i+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function eCt(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function mF({accept:e,busy:n,prompt:t,onFile:r}){const[s,i]=R.useState(!1),a=R.useRef(null);return h.jsxs("div",{className:`flex flex-col items-center justify-center gap-2 py-6.5 px-4.5 border-[1.5px] border-dashed rounded-md text-center text-sm text-text transition-[border-color,background] duration-120 ${n?"cursor-default":"cursor-pointer"} ${s?"border-primary bg-surface text-text":"border-border-variant bg-surface [&:hover]:border-primary"}`,onDragOver:o=>{o.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:o=>{var u;if(o.preventDefault(),i(!1),n)return;const l=(u=o.dataTransfer.files)==null?void 0:u[0];l&&r(l)},onClick:()=>{var o;n||(o=a.current)==null||o.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:o=>{var l;(o.key==="Enter"||o.key===" ")&&!n&&(o.preventDefault(),(l=a.current)==null||l.click())},children:[h.jsx("input",{ref:a,type:"file",accept:e,hidden:!0,onChange:o=>{var u;const l=(u=o.target.files)==null?void 0:u[0];l&&r(l),o.target.value=""}}),n?h.jsxs(h.Fragment,{children:[h.jsx(Dt,{}),h.jsx("span",{children:ntt()})]}):h.jsxs(h.Fragment,{children:[h.jsx(B_t,{size:20,strokeWidth:1.5}),h.jsx("span",{children:t})]})]})}function gF({bytes:e,updatedAt:n}){return h.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Fl(e),n>0&&h.jsxs("span",{className:"text-muted",children:[" · ",$o(n)]})]})}function tCt({skill:e,onError:n}){const t=Rn({mutationFn:wct}),r=t.isPending;return h.jsxs("div",{className:_F,children:[h.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[h.jsxs("code",{className:Z7t,children:["/",e.name]}),e.origin&&h.jsx(Pt,{children:e.origin})]}),h.jsx(gF,{bytes:e.bytes,updatedAt:e.updatedAt}),!e.origin&&h.jsx(on,{"data-tip":ket(),"data-tip-align":"end","aria-label":CJe({name:Ee(e.name)}),disabled:r,onClick:()=>{window.confirm(xJe({name:Ee(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:h.jsx(s_,{size:13})})]})}function nCt({template:e,onError:n}){const t=Rn({mutationFn:bct}),r=t.isPending,s=e.supportFiles.length;return h.jsxs("div",{className:_F,children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("span",{className:"text-base font-medium text-text",children:e.name}),h.jsxs("p",{className:J7t,children:[e.entry,s>0&&(s===1?ZJe():aet({count:tn(s)}))]})]}),h.jsx(gF,{bytes:e.bytes,updatedAt:e.updatedAt}),h.jsx(on,{"data-tip":zet(),"data-tip-align":"end","aria-label":MJe({name:Ee(e.name)}),disabled:r,onClick:()=>{window.confirm(TJe({name:Ee(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:h.jsx(s_,{size:13})})]})}function rCt(){var p;const e=Rn({mutationFn:xct}),n=ct(rut()),t=n.data,r=n.isFetching,s=(p=n.error)==null?void 0:p.message,[i,a]=R.useState(!1),[o,l]=R.useState(null),u=()=>{n.refetch()},_=R.useRef(!1),f=R.useCallback(async m=>{if(!_.current){if(l(null),!eCt(m.name)){l(utt());return}if(m.size>fF){l(iL());return}_.current=!0,a(!0);try{await e.mutateAsync({filename:m.name,contentBase64:await pF(m)})}catch(x){l(x instanceof Error?x.message:String(x))}finally{_.current=!1,a(!1)}}},[]);return h.jsxs("section",{className:dF,children:[h.jsxs("div",{className:"flex items-baseline gap-2.5",children:[h.jsx("h3",{children:Zet()}),h.jsxs(Oe,{className:"ms-auto",size:"small",onClick:u,disabled:r,children:[h.jsx(Za,{size:12,className:r?"animate-[spin_0.9s_linear_infinite]":""})," ",qp()]})]}),h.jsx("p",{className:hF,children:IJe()}),h.jsx(mF,{accept:".md,.markdown,.zip",busy:i,prompt:FJe(),onFile:m=>void f(m)}),o&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:o}),s&&h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[fet()," ",s]}),t===void 0?s?null:h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(Dt,{})," ",Oet()]}):t.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:Uet()}):h.jsx("div",{className:"flex flex-col mt-1",children:t.map(m=>h.jsx(tCt,{skill:m,onError:l},m.name))})]})}function sCt(){var _;const e=Rn({mutationFn:vct}),n=ct(nut()),t=n.data,r=(_=n.error)==null?void 0:_.message,[s,i]=R.useState(!1),[a,o]=R.useState(null),l=R.useRef(!1),u=R.useCallback(async f=>{if(l.current)return;o(null);const p=f.name.toLowerCase();if(!p.endsWith(".tex")&&!p.endsWith(".zip")){o(_tt());return}if(f.size>fF){o(iL());return}l.current=!0,i(!0);try{await e.mutateAsync({filename:f.name,contentBase64:await pF(f)})}catch(m){o(m instanceof Error?m.message:String(m))}finally{l.current=!1,i(!1)}},[]);return h.jsxs("section",{className:dF,children:[h.jsx("h3",{children:Ret()}),h.jsx("p",{className:hF,children:att()}),h.jsx(mF,{accept:".tex,.zip",busy:s,prompt:GJe(),onFile:f=>void u(f)}),a&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:a}),r&&h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[pet()," ",r]}),t===void 0?r?null:h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(Dt,{})," ",Pet()]}):t.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:Ket()}):h.jsx("div",{className:"flex flex-col mt-1",children:t.map(f=>h.jsx(nCt,{template:f,onError:o},f.name))})]})}function iCt(){return h.jsxs("div",{className:"settings-view max-w-readable my-0 mx-auto pt-6 px-8 pb-15 [&_h1]:mt-0 [&_h1]:mx-0 [&_h1]:mb-1.5 [&_h1]:text-3xl",children:[h.jsx("h1",{children:bet()}),h.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:net()}),h.jsx(rCt,{}),h.jsx(sCt,{})]})}const aCt="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Bc({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:i,onPromote:a,onClose:o}){return h.jsxs("button",{className:`tab [&.closable]:max-w-60 [&.closable]:pe-0.5 [&_.tab-label]:grid [&_.tab-label]:grid-cols-[minmax(0,_1fr)] [&_.tab-label]:min-w-0 [&_.tab-label]:overflow-hidden [&_.tab-label_>_span]:[grid-area:1_/_1] [&_.tab-label_>_span]:overflow-hidden [&_.tab-label_>_span]:text-ellipsis [&_.tab-label_>_span]:whitespace-nowrap [&_.tab-label::after]:[grid-area:1_/_1] [&_.tab-label::after]:overflow-hidden [&_.tab-label::after]:text-ellipsis [&_.tab-label::after]:whitespace-nowrap [&_.tab-label::after]:content-[attr(data-label)] [&_.tab-label::after]:invisible [&_.tab-label::after]:font-medium [&_.tab-close]:inline-flex [&_.tab-close]:items-center [&_.tab-close]:justify-center [&_.tab-close]:w-3.5 [&_.tab-close]:h-3.5 [&_.tab-close]:rounded-xs [&_.tab-close]:text-muted [&_.tab-close]:shrink-0 [&_.tab-close:hover]:bg-hover-strong [&_.tab-close:hover]:text-text relative inline-flex items-center gap-[5px] h-8 py-0 px-2 border border-transparent border-b-0 rounded-[var(--radius-md)_var(--radius-md)_0_0] text-sm font-normal text-subtext whitespace-nowrap select-none min-w-0 [&:hover]:bg-surface [&:hover]:text-text [&:not(.active)_+_.tab:not(.active)::before]:content-[''] [&:not(.active)_+_.tab:not(.active)::before]:absolute [&:not(.active)_+_.tab:not(.active)::before]:top-2.5 [&:not(.active)_+_.tab:not(.active)::before]:bottom-2.5 [&:not(.active)_+_.tab:not(.active)::before]:-start-px [&:not(.active)_+_.tab:not(.active)::before]:w-px [&:not(.active)_+_.tab:not(.active)::before]:bg-border [&.active]:border-border [&.active]:bg-background [&.active]:text-text [&.active]:font-medium [&.active::after]:content-[''] [&.active::after]:absolute [&.active::after]:end-0 [&.active::after]:-bottom-px [&.active::after]:start-0 [&.active::after]:h-px [&.active::after]:bg-background closable ${e?"active":""} ${s?aCt:""}`,onClick:i,onDoubleClick:a,title:s?Trt({label:n}):n,"aria-label":s?Crt({label:n}):n,children:[t,h.jsx("span",{className:"tab-label","data-label":n,children:h.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),h.jsx("span",{role:"button",className:"tab-close",title:S_e(),onPointerDown:l=>l.preventDefault(),onClick:l=>{l.stopPropagation(),o()},children:h.jsx(ts,{size:12})})]})}const pA=["files-pill inline-flex items-center gap-2 min-w-0 border border-border","rounded-md py-[7px] px-[11px] bg-background text-text","no-underline [&_code]:font-mono [&_code]:text-sm","[&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap","[&_>_svg]:shrink-0 [&_>_svg]:text-muted [a&:hover]:border-muted"].join(" ");function oCt({owner:e,repo:n,branch:t}){return!e||!n?h.jsx("span",{className:pA,children:h.jsx("code",{children:t})}):h.jsxs("a",{className:pA,href:Qv(e,n,t),target:"_blank",rel:"noopener noreferrer",title:U1({name:Ee(t)}),children:[h.jsx("code",{children:t}),h.jsx(ib,{size:12})]})}const jw=["experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant","[&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm","[&_h2]:font-semibold"].join(" "),mA=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function gA(e){return new Date(e).toLocaleString(T(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function vA(e,n){return X1((e.endedAt??n)-e.createdAt)}function lCt({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=r.some(_=>_.status==="running"||_.status==="starting"),[l,u]=R.useState(()=>Date.now());return R.useEffect(()=>{if(!o)return;u(Date.now());const _=window.setInterval(()=>u(Date.now()),1e3);return()=>window.clearInterval(_)},[o]),h.jsx("div",{className:"experiment-overview absolute inset-0 overflow-y-auto bg-background [&_h1]:m-0 [&_h1]:text-text [&_h1]:text-xl [&_h1]:leading-tight",children:h.jsxs("div",{className:"experiment-overview-inner w-full max-w-230 my-0 mx-auto pt-6.5 px-7 pb-10 [@media((max-width:_720px))]:pt-5 [@media((max-width:_720px))]:px-4.5 [@media((max-width:_720px))]:pb-8",children:[h.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[h.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[h.jsx("h1",{children:e.title||e.slug}),h.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),h.jsx(Vl,{status:a?Ui(a):"idle"})]}),h.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&h.jsxs(Oe,{...qr(_=>s(a.id,_)),children:[h.jsx($h,{size:15}),o1e()]}),h.jsxs(Oe,{...qr(i),children:[h.jsx(sb,{size:15}),Mge()]})]}),e.description&&h.jsxs("section",{className:"experiment-overview-section mt-5.5 pt-4.5 border-t border-t-border-variant [&_h2]:mt-0 [&_h2]:mx-0 [&_h2]:mb-3.5 [&_h2]:text-text [&_h2]:text-sm [&_h2]:font-semibold overview-description [&_.md]:text-text [&_.md]:leading-[1.65]",children:[h.jsx("h2",{children:Gge()}),h.jsx(Fo,{text:e.description})]}),h.jsxs("section",{className:jw,children:[h.jsx("h2",{children:a?Tge():S1e()}),a&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap gap-y-2.5 gap-x-4.5 text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs",children:[h.jsx(Vl,{status:Ui(a)}),h.jsx(N6,{backend:a.backend}),h.jsxs("span",{title:b1e(),children:[h.jsx(aht,{size:13}),gA(a.createdAt)]}),h.jsxs("span",{title:Qge(),children:[h.jsx(bht,{size:13}),vA(a,l)]}),a.commitSha&&h.jsxs("span",{title:Ige(),children:[h.jsx(Wht,{size:14}),h.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&h.jsxs("span",{children:[Jge()," ",a.exitCode]})]}),a.command&&h.jsxs("code",{className:mA,children:["$ ",a.command]}),a.resultMarkdown&&h.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${a.status==="failed"?"failed":""}`,children:h.jsx(Fo,{text:a.resultMarkdown})})]})]}),h.jsxs("section",{className:jw,children:[h.jsx("h2",{children:"Git"}),h.jsxs("div",{className:"experiment-overview-meta flex items-center flex-wrap text-text text-sm [&_svg]:text-muted [&_.backend-badge]:text-text [&_.status-badge]:text-text [&_>_span]:inline-flex [&_>_span]:items-center [&_>_span]:gap-[5px] [&_code]:text-text [&_code]:text-xs experiment-overview-git-meta gap-y-[9px] gap-x-3.5 [&_.files-pill]:py-[5px] [&_.files-pill]:px-2 [&_.files-pill]:rounded-sm [&_.files-pill_code]:text-xs",children:[h.jsx(oCt,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&h.jsxs("span",{children:[r1e()," ",h.jsx("code",{children:n.slug})]}),h.jsxs("span",{title:gA(e.createdAt),children:[Fge()," ",$o(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&h.jsxs("code",{className:mA,children:["$ ",e.runCommand]})]}),r.length>0&&h.jsxs("section",{className:jw,children:[h.jsx("h2",{children:p1e()}),h.jsx("div",{className:"experiment-run-history border-t border-t-border-variant [&_button]:w-full [&_button]:grid [&_button]:grid-cols-[minmax(72px,_0.7fr)_minmax(100px,_1fr)_minmax(70px,_0.7fr)_60px_16px] [&_button]:items-center [&_button]:gap-3.5 [&_button]:py-[11px] [&_button]:px-0.5 [&_button]:border-b [&_button]:border-b-border-variant [&_button]:text-text [&_button]:text-start [&_button]:text-sm [&_button:hover]:bg-surface [@media((max-width:_720px))]:[&_button]:grid-cols-[65px_1fr_60px_16px] [@media((max-width:_720px))]:[&_button_>_:nth-child(3)]:hidden",children:r.map((_,f)=>h.jsxs("button",{...qr(p=>s(_.id,p)),children:[h.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[f1e()," ",r.length-f]}),h.jsx(Vl,{status:Ui(_)}),h.jsx("span",{children:$o(_.createdAt)}),h.jsx("span",{children:vA(_,l)}),h.jsx($h,{size:13})]},_.id))})]})]})})}function bA(e){const n=atob(e),t=new Uint8Array(n.length);for(let r=0;r{const t=n.current;if(!t)return;const{terminal:r,dispose:s}=u6(t,!0);let i=!1,a=0,o=!1,l=!1;async function u(){if(o){l=!0;return}o=!0;try{for(;;){const f=await Uot(e,a);if(i)return;if(f.dataBase64&&r.write(bA(f.dataBase64)),a=f.nextOffset,f.eof)break}}catch{}finally{o=!1,l&&!i&&(l=!1,u())}}const _=cut(e,f=>{if(i)return;const p=bA(f.dataBase64);!o&&f.offset===a?(r.write(p),a+=p.length):f.offset+p.length>a&&u()});return u(),()=>{i=!0,_(),s()}},[e]),h.jsx("div",{ref:n,className:"h-full w-full"})}function uCt({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:l}){const u=r.filter(_=>_.experimentId===e.id).sort((_,f)=>f.createdAt-_.createdAt);return t==="overview"?h.jsx(lCt,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(_,f)=>o("terminal",_,f),onOpenCode:_=>l("files",_)}):h.jsx(fCt,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function fCt({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=R.useState(null),[a,o]=R.useState(null),[l,u]=R.useState(!1),_=R.useRef(null),f=t?n.find(b=>b.id===t)??null:n[0]??null,p=(f==null?void 0:f.status)==="running"||(f==null?void 0:f.status)==="starting",m=!!(f&&p&&(f.cancelRequested||a===f.id)),x=b=>{const v=n.findIndex(y=>y.id===b);return v===-1?n.length:n.length-v};R.useEffect(()=>{if(!l)return;const b=v=>{var y;(y=_.current)!=null&&y.contains(v.target)||u(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[l]);async function S(){if(f){i(null),o(f.id);try{await hL(f.id)}catch(b){o(null),i(b instanceof Error?b.message:String(b))}}}return h.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[h.jsxs("div",{className:"term-bar flex items-center gap-2 h-10 py-0 px-2.5 border-b border-b-border shrink-0 [&_.error]:text-sm [&_.error]:text-accent-red [&_.btn]:inline-flex [&_.btn]:items-center [&_.btn]:gap-[5px]",children:[h.jsx("div",{className:"term-title min-w-0 text-sm font-semibold text-text overflow-hidden text-ellipsis whitespace-nowrap",title:e.title||e.slug,children:e.title||e.slug}),h.jsx("span",{className:"flex-1"}),s&&h.jsx("span",{className:"error",role:"alert",children:s}),p&&h.jsxs(Oe,{size:"small",variant:"ghost",disabled:m,onClick:()=>void S(),children:[h.jsx(yO,{size:13}),m?J_e():pD()]}),n.length>0&&f&&h.jsxs("div",{className:"run-history relative shrink-0",ref:_,children:[h.jsxs(Oe,{title:Vme(),"aria-expanded":l,onClick:()=>u(b=>!b),children:[h.jsxs("span",{children:[EE()," ",x(f.id)]}),h.jsx(Vl,{status:m?"cancelling":Ui(f)}),h.jsx(Wo,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),l&&h.jsx("div",{className:"history-menu absolute top-[calc(100%_+_6px)] end-0 min-w-57.5 max-h-80 overflow-y-auto bg-background border border-border rounded-lg shadow-menu p-[5px] z-50",children:n.map(b=>h.jsxs(dr,{className:"justify-start",active:b.id===(f==null?void 0:f.id),onClick:()=>{r(b.id),u(!1)},children:[h.jsxs("span",{className:"font-medium",children:[EE()," ",x(b.id)]}),h.jsx(Vl,{status:Ui(b)}),h.jsx("span",{className:"ms-auto text-xs text-muted",children:$o(b.createdAt)})]},b.id))})]})]}),h.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:f?h.jsx(cCt,{runId:f.id},f.id):h.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:t?Ao():Pme()})})]})}let Z3=!1;function yA(e){Z3=!0;try{return window.confirm(e)}finally{Z3=!1}}const J3=e=>e.replace(/\r\n/g,` +`),xA=(e,n,t)=>{const r=J3(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r +`),conflict:null}},Rl=e=>e.draft!==e.baseline,dCt=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),hCt=e=>e.crlf?e.draft.replace(/\n/g,`\r +`):e.draft;function _Ct(e,n,t){return!Rl(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class pCt{constructor(){Ms(this,"buffer",null);Ms(this,"listeners",new Set);Ms(this,"saving",!1);Ms(this,"saveError",null);Ms(this,"revision",0);Ms(this,"saveRevision",0);Ms(this,"getSnapshot",()=>this.buffer);Ms(this,"getRevision",()=>this.revision);Ms(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));Ms(this,"set",n=>{this.buffer=n,this.notify()});Ms(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});Ms(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});Ms(this,"setSaveError",n=>{this.saveError=n,this.notify()})}notify(){this.revision++;for(const n of this.listeners)n()}get needsProtection(){return this.saving||this.buffer!==null&&(Rl(this.buffer)||this.buffer.conflict!==null)}}function mCt({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var X,ie,I;const l=ct({...j0t(),enabled:r,subscribed:r}),u=((X=l.data)==null?void 0:X.engine)??(l.isPending?void 0:null),_=((ie=l.data)==null?void 0:ie.hint)??null,f=((I=l.data)==null?void 0:I.installCommand)??null,[p,m]=R.useState(!1),[x,S]=R.useState(null),[b,v]=R.useState(null),[y,w]=R.useState(!1),[C,N]=R.useState(null),[E,j]=R.useState(null),[z,M]=R.useState(!1),[O,B]=R.useState(0),F=R.useCallback(L=>{M(L),L&&B($=>$+1)},[]),U=R.useRef(o);U.current=o;const H=R.useRef(!1),Y=R.useRef(null),V=R.useCallback(()=>{if(H.current)return;Y.current=n,H.current=!0,m(!0);const L=U.current;j(null),v(null),N(null),elt(e,n,{sessionId:t}).then($=>{var G,te;const q=$.pdfPath;if($.ok&&q){S(fe=>({path:q,version:((fe==null?void 0:fe.version)??0)+1,source:L})),w($.hadErrors),N($.note),$.hadErrors&&v(((G=$.log)==null?void 0:G.trim())||null),F(!0);return}S(null),w(!1),N($.note),M(!1),v(((te=$.log)==null?void 0:te.trim())||z4e())}).catch($=>{S(null),w(!1),N(null),M(!1),j($ instanceof Error?$.message:String($))}).finally(()=>{H.current=!1,m(!1)})},[e,n,t,F]);return R.useEffect(()=>{!r||!s||!a||!u||Y.current!==n&&V()},[r,s,a,u,n,V]),{engine:u,installHint:_,installCommand:f,compiling:p,compiled:x,stale:x!==null&&x.source!==o,log:b,builtWithErrors:y,note:C,error:E,showPdf:z,setShowPdf:F,viewNonce:O,compile:()=>{i==null||i(),V()},dismiss:()=>{j(null),v(null)}}}const gCt=3e4,vCt=3e4,bCt=5*6e4;function yCt({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:l}){var oe,ne,Q,ce;const u=R.useMemo(()=>R0t(e,n,{sessionId:t}),[e,n,t]),_=ct({...u,enabled:r,subscribed:r}),f=((oe=_.data)==null?void 0:oe.hasToken)??!1,p=((ne=_.data)==null?void 0:ne.hasSession)??!1,m=((Q=_.data)==null?void 0:Q.link)??null,x=!_.isPending,[S,b]=R.useState(null),[v,y]=R.useState(0),[w,C]=R.useState(!1),[N,E]=R.useState(null),[j,z]=R.useState(null),[M,O]=R.useState(!1),B=R.useCallback(ee=>{Hn(u.queryKey)&&tt.setQueryData(u.queryKey,le=>le&&{...le,hasSession:ee})},[u]),F=R.useCallback(ee=>{Hn(u.queryKey)&&tt.setQueryData(u.queryKey,ee)},[u]);R.useEffect(()=>{E(null),y(0),L.current=!1,z(null),O(!1),V.current=!1},[r,e,n,t]),R.useEffect(()=>{O(!1)},[a]);const U=R.useRef(!1),H=R.useRef(l);H.current=l;const Y=R.useRef(o);Y.current=o;const V=R.useRef(!1),X=R.useCallback(ee=>!f||!m||U.current||Y.current?!1:(U.current=!0,C(!0),z(null),ult(e,n,{sessionId:t,resolve:ee}).then(le=>{V.current=!1,E(le),le.pulled.includes(n)&&(Y.current?O(!0):H.current(le.pulled))}).catch(le=>{V.current=!0,E(null),z(le instanceof Error?le.message:String(le))}).finally(()=>{U.current=!1,C(!1)}),!0),[e,n,t,f,m]),ie=R.useRef(null),I=(S==null?void 0:S.state)==="live";R.useEffect(()=>{if(!r||!s||!x||!f||!m||o||I)return;const ee=`${n}:${m.projectId}:${a}`;ie.current!==ee&&X()&&(ie.current=ee)},[r,s,x,f,m,n,a,o,w,X,I]);const L=R.useRef(!1);!w&&N&&N.conflicts.length===0&&!j&&(L.current=!0);const $=r&&x&&!!m&&f&&p&&L.current,q=R.useRef(null),G=R.useRef(Promise.resolve()),te=R.useRef(!1);te.current=(S==null?void 0:S.state)==="stopped"&&S.error!=null;const fe=R.useRef(!1);return R.useEffect(()=>{if(!$)return;let ee=!1;const le=()=>{const xe=fe.current;fe.current=!1,!(!xe&&te.current)&&(G.current=G.current.then(()=>{if(!ee)return ilt(e,n,{sessionId:t,retry:xe}).then(Te=>{var Ze;ee||((q.current===null||((Ze=Te.status)==null?void 0:Ze.state)==="stopped")&&b(Te.status),q.current=Te.key)}).catch(Te=>{ee||b({state:"stopped",error:Te instanceof Error?Te.message:String(Te),needsSession:!1,note:null})})}))};le();const he=setInterval(le,vCt);return()=>{ee=!0,clearInterval(he),q.current=null,b(null),G.current=G.current.then(()=>alt(e,n,{sessionId:t})).catch(()=>{})}},[$,v,e,n,t]),R.useEffect(()=>hut(ee=>{if(ee.key===q.current){if(ee.type==="live"){b(ee.status);return}ee.paths.includes(n)&&(Y.current?O(!0):H.current(ee.paths))}}),[n]),R.useEffect(()=>{if(!r||!s||!x||!f||!m||o||I)return;const ee=setInterval(()=>{U.current||V.current||tt.fetchQuery({...M0t(e,n,{sessionId:t}),staleTime:0}).then(le=>{le.remoteChanged&&X()}).catch(le=>{V.current=!0,z(le instanceof Error?le.message:String(le))})},gCt);return()=>clearInterval(ee)},[r,s,x,f,m,o,e,n,t,X,I]),R.useEffect(()=>{if(!r||!s||!x||!f||!m||!I)return;const ee=setInterval(X,bCt);return()=>clearInterval(ee)},[r,s,x,f,m,I,X]),{hasToken:f,hasSession:p,live:S,retryLive:()=>{fe.current=!0,y(ee=>ee+1)},link:m,loaded:x,syncing:w,last:N,error:j??((ce=_.error)==null?void 0:ce.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>O(!1),uploadUrl:dlt(e,n,{sessionId:t}),saveToken:async ee=>{const le=await _L(ee);ie.current=null,V.current=!1,z(null),Hn(u.queryKey)&&tt.setQueryData(u.queryKey,he=>he&&{...he,hasToken:le.hasToken})},saveSession:async ee=>{const le=await pL(ee,{host:m==null?void 0:m.host});B(le.hasSession),fe.current=!0,y(he=>he+1)},importSession:async()=>{const ee=await slt({host:m==null?void 0:m.host});return B(ee.hasSession),fe.current=!0,y(le=>le+1),ee.source},linkProject:async ee=>{E(null),b(null),L.current=!1,ie.current=null,F(await llt(e,n,{project:ee,sessionId:t})),i==null||i()},unlink:async()=>{F(await clt(e,n,{sessionId:t})),ie.current=null,V.current=!1,E(null),z(null)},sync:ee=>{V.current=!1,X(ee)&&(ie.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}function vF(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function wA(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),i=r===-1?"":n.slice(r),a=s.indexOf("?"),o=a===-1?s:s.slice(0,a),l=a===-1?"":s.slice(a+1);let u;try{u=decodeURI(o)}catch{return null}if(!u||u.includes("\0"))return null;const _=u.startsWith("/"),f=_?[]:e.split("/").filter(Boolean);for(const p of u.split("/"))if(!(!p||p===".")){if(p===".."){if(f.length===0)return null;f.pop();continue}f.push(p)}return f.length===0?null:{path:`${t&&(_||e.startsWith("/"))?"/":""}${f.join("/")}`,query:l,hash:i}}function xCt(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}const SA=[{selector:"img[src]",attribute:"src",typePrefixes:["image/"]},{selector:"source[src]",attribute:"src",typePrefixes:["image/","audio/","video/"]},{selector:"video[poster]",attribute:"poster",typePrefixes:["image/"]},{selector:"video[src]",attribute:"src",typePrefixes:["video/"]},{selector:"audio[src]",attribute:"src",typePrefixes:["audio/"]},{selector:'link[rel~="stylesheet"][href]',attribute:"href",typePrefixes:["text/css"]},{selector:"script[src]",attribute:"src",typePrefixes:["text/javascript"]}],wCt=4e6,SCt=200,kA=16e6,kCt=e=>new Promise(n=>{const t=new FileReader;t.onload=()=>n(typeof t.result=="string"?t.result:null),t.onerror=()=>n(null),t.readAsDataURL(e)}),CA=e=>e.startsWith("//")?`https:${e}`:e;async function CCt(e,n){var s;let t=wCt;const r=new Map;for(const{element:i,attribute:a,url:o,typePrefixes:l}of e){if(r.has(o)){const x=r.get(o);x&&i.setAttribute(a,x);continue}if(n.aborted)return;if(r.size>=SCt)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const _=u.headers.get("content-type")??"",f=Number(u.headers.get("content-length"));if(!l.some(x=>_.startsWith(x))||!(Number.isFinite(f)&&f>0&&f<=t)){await((s=u.body)==null?void 0:s.cancel().catch(()=>{}));continue}const p=await u.blob().catch(()=>null),m=p&&await kCt(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function ECt(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(SA.map(l=>l.selector).join(", ")))for(const{selector:l,attribute:u,typePrefixes:_}of SA){if(!o.matches(l))continue;const f=o.getAttribute(u);if(!f)continue;const p=n(f);p&&(p===f?o.setAttribute(u,CA(f)):s.push({element:o,attribute:u,url:p,typePrefixes:_}))}await CCt(s,t);for(const o of r.querySelectorAll("a[href]")){const l=o.getAttribute("href");!l||!vF(l)||(o.setAttribute("href",CA(l)),o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"))}const i=((a=r.querySelector("base[href]"))==null?void 0:a.getAttribute("href"))??"";if(!/^https?:\/\//i.test(i)){const o=r.createElement("base");o.setAttribute("href","about:srcdoc"),r.head.prepend(o)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function NCt(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${kA-1}`}}).catch(()=>null),i=s!=null&&s.ok?await s.text().catch(()=>null):null;if(i===null)return{text:e,partial:!0};const a=Number((o=s==null?void 0:s.headers.get("content-range"))==null?void 0:o.split("/").pop());return{text:i,partial:Number.isFinite(a)&&a>kA}}function zCt({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[i,a]=R.useState(null);return R.useEffect(()=>{let o=!1;const l=new AbortController;return a(null),NCt(e,n,t,l.signal).then(async({text:u,partial:_})=>({source:await ECt(u,s,l.signal),partial:_})).then(u=>{o||a(u)}),()=>{o=!0,l.abort()}},[e,n,t,s]),i===null?h.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[h.jsx(Dt,{})," ",vD()]}):h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[i.partial&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:oye()}),h.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:fye({name:Ee(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function TCt({overleaf:e}){var f;const n=R.useRef(null),{open:t,setOpen:r,ref:s}=Ja(n),i=R.useId(),[a,o]=R.useState({top:0,left:0,maxHeight:0}),l=((f=e.last)==null?void 0:f.conflicts.length)??0,u=e.hasToken&&!!e.error,_=u?x4():l?k9e():!e.hasToken||!e.link?GNe():e.syncing?AD():e.blocked?jD():ND();return R.useEffect(()=>{l&&r(!0)},[l,r]),R.useEffect(()=>{u&&fr(x4(),"error",{id:i,duration:5e3})},[u,e.error,i]),R.useLayoutEffect(()=>{if(!t||!n.current||!s.current)return;const p=n.current.getBoundingClientRect(),m=Math.min(384,window.innerWidth-16),x=Math.min(p.bottom+6,window.innerHeight-80);o({top:x,left:Math.max(8,Math.min(p.right-m,window.innerWidth-m-8)),maxHeight:window.innerHeight-x-8}),(s.current.querySelector("input")??s.current).focus();const S=()=>r(!1),b=v=>{var y;v.target instanceof Node&&!((y=s.current)!=null&&y.contains(v.target))&&S()};return window.addEventListener("resize",S),window.addEventListener("scroll",b,!0),()=>{window.removeEventListener("resize",S),window.removeEventListener("scroll",b,!0)}},[t,s,r]),h.jsxs(h.Fragment,{children:[h.jsx(on,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":_,"data-tip-align":"end","aria-label":pQ({status:_}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?h.jsx(Dt,{}):h.jsx(Sht,{size:13,className:u||l?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&Go.createPortal(h.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":QD(),tabIndex:-1,className:"fixed z-100 w-96 max-w-[calc(100vw-1rem)] overflow-auto rounded-lg border border-border bg-background p-4 text-text shadow-popover",style:a,onBlur:p=>{var m;p.relatedTarget instanceof Node&&!p.currentTarget.contains(p.relatedTarget)&&!((m=n.current)!=null&&m.contains(p.relatedTarget))&&r(!1)},children:[h.jsx("div",{className:"absolute end-3 top-3",children:h.jsx(on,{size:"small","aria-label":qbe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:h.jsx(ts,{size:13})})}),h.jsx(DCt,{overleaf:e})]}),document.body)]})}const Xg=e=>Oo(new Intl.ListFormat(T()).format(e.map(Ee)));function jCt(e){if(e.error)return W9e();if(e.syncing)return AD();if(e.blocked)return jD();const n=e.last;return n?n.pulled.length&&n.pushed.length?wNe({pulled:Xg(n.pulled),pushed:Xg(n.pushed)}):n.pulled.length?vNe({paths:Xg(n.pulled)}):n.pushed.length?ENe({paths:Xg(n.pushed)}):n.conflicts.length?SEe():ND():uNe()}function ACt({href:e}){return h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:TD()})}function RCt(e){return e.state==="live"?sEe():e.state==="connecting"?eEe():e.error??dEe()}function EA({overleaf:e,replacing:n}){const[t,r]=R.useState(""),[s,i]=R.useState(!1),[a,o]=R.useState(!1),[l,u]=R.useState(null),_=p=>{s||(i(!0),u(null),p().then(()=>o(!1)).catch(m=>{u(m instanceof Error?m.message:String(m)),o(!0)}).finally(()=>i(!1)))},f=a?ZNe():n?jNe():L9e();return h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsx("p",{className:"text-sm text-subtext",children:f}),a&&h.jsx(zs,{className:"basis-full min-w-0","aria-label":y4(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:y4(),autoComplete:"off"}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&h.jsx(Dt,{}),a?h.jsx(Oe,{type:"button",disabled:s||!t.trim(),onClick:()=>_(()=>e.saveSession(t.trim())),children:s?Zi():y9e()}):h.jsx(Oe,{type:"button",disabled:s,onClick:()=>_(e.importSession),children:$9e()}),h.jsx(Oe,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?zD():_Ne()})]}),l&&h.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:l})]})}function MCt({overleaf:e}){if(!e.hasSession)return h.jsx(EA,{overleaf:e});const n=e.live;if(!n)return h.jsx("p",{className:"text-sm text-subtext",children:mEe()});const t=n.state==="stopped"&&n.needsSession,r=n.state==="live"?"bg-accent-green":n.state==="connecting"?"bg-accent-amber":"bg-accent-red";return h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsxs("div",{role:n.error?"alert":"status",className:`flex items-center gap-2 text-sm ${n.error?"text-accent-red":"text-subtext"}`,children:[h.jsx("span",{className:`inline-block w-2 h-2 rounded-full shrink-0 ${r}`}),h.jsx("span",{className:"min-w-0 break-words",children:RCt(n)})]}),n.note&&h.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&h.jsx("div",{children:h.jsx(Oe,{onClick:e.retryLive,children:lEe()})}),t&&h.jsx(EA,{overleaf:e,replacing:!0})]})}function DCt({overleaf:e}){var p,m,x;const[n,t]=R.useState(""),[r,s]=R.useState(!1),[i,a]=R.useState(null),[o,l]=R.useState(!1),u=()=>{t(""),a(null),l(!0)},_=!e.hasToken||o;async function f(S){S.preventDefault();const b=n.trim();if(!(r||!b)){s(!0),a(null);try{_?(await e.saveToken(b),l(!1)):await e.linkProject(b),t("")}catch(v){a(v instanceof Error?v.message:String(v))}finally{s(!1)}}}if(e.link&&!_){const S=((p=e.last)==null?void 0:p.conflicts)??[];return h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsxs("div",{className:"space-y-1.5 pe-8",role:e.error?"alert":"status",children:[h.jsxs("div",{className:`flex items-center gap-2 text-sm font-medium ${e.error?"text-accent-red":"text-text"}`,children:[e.syncing&&h.jsx(Dt,{}),e.error?x4():jCt(e)]}),e.error&&h.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),h.jsx(MCt,{overleaf:e}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx(Oe,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?DNe():((m=e.live)==null?void 0:m.state)==="live"?ize():void 0,onClick:()=>e.sync(),children:e.error?qi():QEe()}),h.jsxs(K0,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[HEe()," ",h.jsx(Mf,{size:12})]})]}),S.map(b=>h.jsxs("div",{className:"space-y-2 text-sm",children:[h.jsxs("p",{className:"break-words text-accent-red",children:[h.jsx("code",{className:"font-mono",children:b})," ",DEe()]}),h.jsxs("div",{className:"flex flex-wrap gap-2",children:[h.jsx(Oe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[b]:"keep-local"}),children:BEe()}),h.jsx(Oe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[b]:"take-overleaf"}),children:aNe()})]})]},b)),((x=e.last)==null?void 0:x.note)&&h.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),i&&h.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i}),h.jsxs("details",{className:"border-t border-border pt-3",children:[h.jsx("summary",{className:"cursor-pointer text-sm font-semibold text-text focus-visible:outline-2 focus-visible:outline-text",children:h.jsx("span",{className:"ms-2",children:X5()})}),h.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[h.jsx(Oe,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:eN()}),h.jsx(K0,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:TD()}),h.jsx(Oe,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(b=>{a(b instanceof Error?b.message:String(b))}),children:JEe()})]})]})]})}return h.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[h.jsx("div",{className:"pe-8 text-sm text-subtext",children:_?dze():mze()}),h.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[h.jsx(zs,{className:"basis-full min-w-0","aria-label":_?ZE():JE(),"aria-invalid":!!i,type:_?"password":"text",value:n,onChange:S=>t(S.target.value),placeholder:_?ZE():"https://www.overleaf.com/project/…",autoComplete:"off"}),h.jsx(Oe,{type:"submit",disabled:r||!n.trim(),children:r?_?Zi():Ea():_?FNe():Y9e()}),h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:_?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:_?z9e():JE()})]}),(i||e.error)&&h.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:i||e.error}),h.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[h.jsx(ACt,{href:e.uploadUrl}),o?h.jsx(Oe,{variant:"ghost",type:"button",onClick:()=>l(!1),children:zD()}):e.hasToken&&h.jsx(Oe,{variant:"ghost",type:"button",onClick:u,children:eN()})]})]})}function LCt({command:e}){const[n,t]=R.useState("idle"),r=R.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const i=r.current;if(i){const a=document.createRange();a.selectNodeContents(i);const o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(a)}t("select"),setTimeout(()=>t("idle"),4e3)}};return h.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[h.jsx("code",{ref:r,className:"font-mono text-xs text-text bg-panel border border-border-variant rounded-xs py-1 px-2",children:e}),h.jsx(on,{"data-tip":n==="copied"?W1():n==="select"?xxe():gbe(),"aria-label":xbe(),onClick:()=>void s(),children:n==="copied"?h.jsx(ka,{size:13}):h.jsx(v6,{size:13})})]})}function OCt({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:l,onScrollPositionChange:u,lineScrollRequest:_,onLineScrollRequestHandled:f,onEdit:p,artifactVersion:m,artifactEntries:x=[],bufferSession:S,remote:b=!1,restored:v=!1,onRestoreActivated:y,showSource:w=!1,onShowSourceChange:C}){var pt,St;const N=UO(e,n,t??"repo",r,s),E=ct({...N,enabled:!S.saving}),j=E.data??null,z=((pt=E.error)==null?void 0:pt.message)??null,M=He=>{Ur(N.queryKey,ht=>(typeof He=="function"?He(ht??null):He)??void 0)},[O,B]=R.useState(0),F=t==="artifacts",U=t==="abs",H=lk(n),Y=YP(n),V=O7t(n),X=H||V,[ie,I]=R.useState(!1),L=!v||ie,$=()=>{I(!0),y==null||y()};R.useSyncExternalStore(S.subscribe,S.getRevision);const q=S.getSnapshot(),G=S.set,te=S.saving,fe=S.setSaving,oe=S.saveRevision,ne=S.saveError,Q=S.setSaveError,ce=R.useRef(null),ee=R.useRef(l),le=(j==null?void 0:j.file)??null,he=q&&Rl(q)?q.path:(j==null?void 0:j.source)==="checkout"?j.file.path:n,xe=he.split("/").slice(0,-1).join("/"),Te=(j==null?void 0:j.source)==="artifact",Ze=R.useCallback(He=>{var ht;return((ht=wA(xe,He,U))==null?void 0:ht.path)??null},[U,xe]),Ue=R.useCallback(He=>U?Qot(He):Te?Ih(e,He):xN(e,He,{sessionId:r,ref:s}),[Te,s,U,e,r]),Ie=R.useCallback(He=>{if(vF(He))return He;const ht=wA(xe,He,U);return ht?xCt(Ue(ht.path),ht):null},[U,xe,Ue]),vt=rF(le==null?void 0:le.presentation),bt=(j==null?void 0:j.source)==="artifact"&&!F,It=F&&(j==null?void 0:j.source)==="checkout",Bt=!s&&(j==null?void 0:j.source)==="checkout"&&le!=null&&!le.notFound,Et=r!=null&&(j==null?void 0:j.source)==="checkout"&&j.file.root==="clone",rt=Bt&&le!=null&&!le.binary&&!le.truncated&&!vt&&!Et,ft=rt&&le.version===void 0,Lt=q!==null&&Rl(q),we=!ft&&(rt&&typeof le.version=="string"||Lt),Ae=(q==null?void 0:q.draft)??J3((le==null?void 0:le.content)??""),Xe=(q==null?void 0:q.baseline)??J3((le==null?void 0:le.content)??""),dt=we&&q!==null&&Rl(q),xt=async He=>{const ht=S.getSnapshot();if(!we||!ht||!Rl(ht))return!0;if(S.saving)return!1;if(ht.conflict&&He===void 0)return Q(ht.conflict.exists?NE():TE()),!1;const Nr=ht.draft,nn=hCt(ht);fe(!0),Q(null);try{await tt.cancelQueries(N);const rn=await Yot(e,he,nn,{sessionId:r,expectedVersion:He??ht.version});return S.getSnapshot()?(S.saved(Nr,rn.version),M(ur=>ur&&ur.source==="checkout"?{source:"checkout",file:{...ur.file,content:nn,version:rn.version}}:ur),!0):!1}catch(rn){if(rn instanceof C4){const Dn=S.getSnapshot();return!Dn||!Rl(Dn)||G({...Dn,conflict:{currentVersion:rn.currentVersion,exists:rn.exists}}),!1}return Q(rn instanceof Error?rn.message:String(rn)),!1}finally{fe(!1)}},Ut=Y&&Bt&&!Et,We=mCt({projectId:e,filePath:he,sessionId:r,enabled:Ut,autoRun:L,onManualAction:$,ready:le!=null&&!le.notFound,source:we?Ae:(le==null?void 0:le.content)??""}),Ht=yCt({projectId:e,filePath:he,sessionId:r,enabled:Ut,autoRun:L,onManualAction:$,savedSource:Xe,dirty:dt,onPulled:R.useCallback(He=>{He.includes(he)&&B(ht=>ht+1)},[he])}),ln=Y&&We.showPdf&&We.compiled!=null,_n=ft&&Lt,Yt=(we||_n)&&!(X&&!w)&&!ln,Xn=We.compiled?`${xN(e,We.compiled.path,{sessionId:r})}&v=${We.compiled.version}`:null,Xt=Xn?`${Xn}&view=${We.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,jn=We.compiled?We.compiled.path.split("/").pop()??We.compiled.path:null,or=async()=>{dt&&!await xt()||Y&&We.engine&&We.compile()},lr=async()=>{dt&&(L?await or():await xt())},[vr,Mn]=R.useState(!1),[Gr,Er]=R.useState(null),gt=async()=>{Mn(!0),Er(null);try{await Zot(e,he,{sessionId:r})}catch(He){Er(He instanceof Error?He.message:String(He))}finally{Mn(!1)}},dn=R.useCallback(()=>{S.saving||B(He=>He+1)},[S]),Nn=()=>{G(null),Q(null),dn()},Zt=sF(Ue(he),!s&&!te);R.useEffect(()=>{if(!z||s)return;const He=window.setInterval(()=>{document.visibilityState!=="hidden"&&dn()},2e3);return()=>window.clearInterval(He)},[z,s,dn]);const cr=`${Ue(he)}&v=${encodeURIComponent(Zt??m??"")}&reload=${O}`;R.useEffect(()=>{var Nr,nn;if(!j||S.saving)return;const He=j,ht=S.getSnapshot();if(ht&&Rl(ht)){const rn=He.source==="checkout"?He.file:null,Dn=rn!==null&&rn.path===ht.path&&(!r||rn.root==="worktree"),ur=_Ct(ht,Dn&&typeof rn.version=="string"?rn.version:null,Dn&&!rn.notFound);ur&&(ur.currentVersion!==((Nr=ht.conflict)==null?void 0:Nr.currentVersion)||ur.exists!==((nn=ht.conflict)==null?void 0:nn.exists))?G({...ht,conflict:ur}):!ur&&ht.conflict&&G({...ht,conflict:null})}(!ht||!Rl(ht))&&He.source==="checkout"&&!He.file.notFound&&!He.file.binary&&!He.file.truncated&&typeof He.file.version=="string"&&(G(xA(He.file.path,He.file.content,He.file.version)),Q(null))},[j,S,r,te,oe]);const pn=JSON.stringify(N.queryKey),An=R.useRef({sourceKey:pn,nonce:O,artifactVersion:m,diskVersion:Zt});R.useEffect(()=>{const He=An.current;An.current={sourceKey:pn,nonce:O,artifactVersion:m,diskVersion:Zt},He.sourceKey===pn&&(He.nonce!==O||He.diskVersion!==null&&He.diskVersion!==Zt||He.artifactVersion!=null&&He.artifactVersion!==m)&&D0t(e,n,t??"repo",r,s)},[pn,O,m,Zt,e,n,t,r,s]),R.useLayoutEffect(()=>{const He=ce.current,ht=ee.current;!He||!le||!ht||(He.scrollTop=ht.top,He.scrollLeft=ht.left)},[le]);const fn=He=>{if(He.source==="absolute")return jye();if(F)return wye({root:r?xg():yg()});if(s)return Eye({branch:Ee(s)});if(r&&He.source==="checkout"&&He.file.root==="clone")return Yxe();const ht=He.source==="checkout"?He.file.root:He.checkoutRoot;return Dye({root:ht==="worktree"?xg():yg()})};return h.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",children:[h.jsxs("div",{className:"file-view-header flex w-full min-w-0 min-h-9 items-center gap-1 px-4 py-1 bg-background text-text shrink-0",children:[h.jsx(Vh,{name:he}),h.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ee(he),children:he.split("/").pop()||he}),a&&h.jsxs("span",{className:"file-view-branch inline-flex items-center gap-1 min-w-0 text-xs text-muted border border-border-variant rounded-sm py-px px-1.5 max-w-65 overflow-hidden text-ellipsis whitespace-nowrap shrink-0 [&_svg]:flex-none",title:UV({branch:Ee(a)}),children:[h.jsx(Vp,{size:11}),a]}),Yt&&(te||dt||ne)&&h.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${ne?"text-accent-red":"text-muted"}`,title:ne??(te?Zi():Hxe()),children:te?h.jsxs(h.Fragment,{children:[h.jsx(Dt,{})," ",gxe()]}):ne?hxe():bD()}),Y&&We.compiled&&h.jsx(on,{size:"small",active:!We.showPdf,"data-tip":We.stale&&We.showPdf?Jye():We.showPdf?Jd():DE(),"data-tip-align":"end","aria-label":We.showPdf?Jd():DE(),onClick:()=>We.setShowPdf(!We.showPdf),children:We.showPdf?h.jsx(U4,{size:13}):h.jsx(nb,{size:13,className:We.stale?"text-accent-amber":void 0})}),Y&&Xn&&jn&&h.jsx(Xv,{size:"small","data-tip":We.stale?Ybe({name:Ee(jn)}):H9({name:Ee(jn)}),"data-tip-align":"end","aria-label":H9({name:Ee(jn)}),href:Xn,download:jn,children:h.jsx(Tht,{size:13,className:We.stale?"text-accent-amber":void 0})}),Ut&&h.jsx(TCt,{overleaf:Ht}),Y&&Bt&&h.jsx(on,{size:"small","data-tip":We.compiled?ME():zE(),"data-tip-align":"end","aria-label":We.compiled?ME():zE(),disabled:We.compiling||!We.engine,onClick:()=>void or(),children:We.compiling?h.jsx(Dt,{}):h.jsx(Dht,{size:13})}),X&&h.jsx(on,{size:"small",active:w,"data-tip":w?V1():Jd(),"data-tip-align":"end","aria-label":w?V1():Jd(),onClick:()=>C==null?void 0:C(!w),children:h.jsx(U4,{size:13})}),Bt&&!b&&h.jsx(on,{size:"small","data-tip":Gr??RE(),"data-tip-align":"end","aria-label":RE(),disabled:vr,onClick:()=>void gt(),children:vr?h.jsx(Dt,{}):h.jsx(Mf,{size:13})})]}),!z&&It&&(j==null?void 0:j.source)==="checkout"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:Bye({root:j.file.root==="worktree"?xg():yg()})}),ft&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-amber",children:Wxe()}),z&&le!==null&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-accent-red",children:[AE()," ",Ee(z)]}),(q==null?void 0:q.conflict)&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[h.jsx("span",{className:"flex-1 min-w-0",role:"status",children:q.conflict.exists?NE():TE()}),((St=q==null?void 0:q.conflict)==null?void 0:St.exists)&&q.conflict.currentVersion&&h.jsx(Oe,{disabled:te,onPointerDown:He=>He.preventDefault(),onClick:()=>{var He;return void xt(((He=q.conflict)==null?void 0:He.currentVersion)??void 0)},children:Qye()}),h.jsx(Oe,{disabled:te,onPointerDown:He=>He.preventDefault(),onClick:Nn,children:cxe()})]}),(We.error||We.log)&&h.jsxs("div",{className:"file-view-note shrink-0 max-h-45 overflow-auto border-b border-b-border-variant py-2.5 px-4",children:[h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx("span",{className:`flex-1 min-w-0 text-sm ${We.builtWithErrors?"text-subtext":"text-accent-red"}`,children:We.error??(We.builtWithErrors?hbe():abe())}),h.jsx(on,{"data-tip":Lbe(),"data-tip-align":"end","aria-label":$be(),onClick:We.dismiss,children:h.jsx(ts,{size:13})})]}),We.log&&h.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:We.log})]}),Ut&&Ht.staleOnDisk&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 flex items-center flex-wrap gap-2 text-sm text-accent-amber",children:[h.jsx("span",{className:"flex-1 min-w-0",children:Gye()}),h.jsx(Oe,{onClick:()=>{Ht.reloaded(),B(He=>He+1)},children:zbe()})]}),Y&&Bt&&We.engine===null&&We.installHint&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[We.installHint,We.installCommand&&h.jsx(LCt,{command:We.installCommand})]}),We.note&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:We.note}),ln&&We.stale&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:Axe()}),h.jsxs("div",{ref:ce,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:He=>{const ht={top:Math.max(0,He.currentTarget.scrollTop),left:Math.max(0,He.currentTarget.scrollLeft)};ee.current=ht,u==null||u(ht)},children:[!Yt&&!z&&!F&&(j==null?void 0:j.source)==="checkout"&&!j.file.notFound&&!s&&r&&j.file.root==="clone"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Lxe()}),!Yt&&!z&&(j==null?void 0:j.source)==="artifact"&&!j.file.notFound&&bt&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Qve({root:j.checkoutRoot==="worktree"?xg():yg()})}),z&&le===null?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[AE()," ",Ee(z)]}):le===null?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:vD()}):Yt?h.jsx(yP,{value:Ae,onChange:He=>{const ht=S.getSnapshot()??(le&&typeof le.version=="string"?xA(le.path,le.content,le.version):null);ht&&G(dCt(ht,He)),p==null||p(),ne&&Q(null)},onSave:()=>void lr(),onBlur:()=>{Z3||lr()},readOnly:_n,path:n,highlightLine:i,scrollRequest:_,onScrollRequestHandled:f,scrollPosition:ee.current,onScrollPositionChange:He=>{ee.current=He,u==null||u(He)}}):le.notFound?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:j?fn(j):vye()}):vt?h.jsx(X3,{kind:vt,url:cr,name:n.split("/").pop()??n}):le.binary?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Jve()," ",h.jsx("a",{href:cr,download:n.split("/").pop()??n,children:gD()})]}):ln&&Xt&&jn?h.jsx(X3,{kind:"pdf",url:Xt,name:jn,downloadBar:!1},Xt):H&&!w?h.jsx("div",{className:"file-view-md max-w-readable pt-4.5 px-5 pb-8 [&_.md]:text-base [&_.md_h1]:text-2xl [&_.md_h1]:mt-4.5 [&_.md_h1]:mx-0 [&_.md_h1]:mb-2 [&_.md_h2]:text-xl [&_.md_h2]:mt-4 [&_.md_h2]:mx-0 [&_.md_h2]:mb-2 [&_.md_h3]:text-lg",children:Te?h.jsx(cF,{projectId:e,folder:xe,markdown:le.content,entries:x}):h.jsx(Fo,{text:le.content,resolveFilePath:Ze,resolveImageSrc:Ie,onOpenFile:o&&((He,ht,Nr,nn,rn)=>o(He,r,s,rn))})}):V&&!w?h.jsx(zCt,{html:le.content,truncated:le.truncated,url:cr,name:he,resolveSrc:Ie}):h.jsxs(h.Fragment,{children:[h.jsx(nF,{text:le.content,path:n,highlightLine:i,scrollRequest:_,onScrollRequestHandled:f}),le.truncated&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:rye()})]})]})]})}const Aw=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function ICt({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:a,ref:o}=Ja(),l=R.useRef(null);return R.useEffect(()=>{if(!i)return;const u=_=>{var f;_.key==="Escape"&&((f=l.current)==null||f.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),h.jsx("div",{className:"rail-brand px-3 py-1.5 border-b border-border shrink-0",children:h.jsxs("div",{className:"project-switcher relative min-w-0",ref:o,children:[h.jsxs("div",{className:"flex h-7 items-center justify-between gap-1 px-0.5",children:[h.jsx(on,{size:"small",className:"project-back text-text","aria-label":LE(),onClick:n,children:h.jsx(X0,{size:18})}),h.jsx("span",{className:"brand-project-label flex-1 text-xs font-medium tracking-wide uppercase text-subtext",children:vwe()}),s&&h.jsx(on,{size:"small","data-tip":OE(),"data-tip-align":"end","aria-label":OE(),onClick:s,children:h.jsx(NO,{size:18})})]}),h.jsxs("button",{ref:l,className:`brand group flex h-8 w-full min-w-0 items-center gap-2 rounded-md px-2 text-start text-text hover:bg-surface focus-visible:outline-2 focus-visible:outline-text ${i?"open bg-surface":""}`,onClick:()=>a(u=>!u),"aria-expanded":i,children:[h.jsx("span",{className:"brand-project min-w-0 flex-1 truncate text-xl font-semibold",children:e}),h.jsx(Wo,{className:`project-chevron shrink-0 text-muted transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100 ${i?"rotate-180 opacity-100":"opacity-0"}`,size:14})]}),i&&h.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down project-menu w-52.5 z-70",children:[h.jsx(dr,{onClick:()=>{a(!1),r()},children:h.jsxs("span",{className:Aw,children:[h.jsx(CO,{size:14}),owe()]})}),h.jsx(dr,{onClick:()=>{a(!1),n()},children:h.jsxs("span",{className:Aw,children:[h.jsx(Yht,{size:14}),LE()]})}),h.jsx(dr,{onClick:()=>{var u;(u=l.current)==null||u.focus(),a(!1),t()},children:h.jsxs("span",{className:Aw,children:[h.jsx(Pht,{size:14}),fwe()]})})]})]})})}function BCt({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:i,onCancel:a}){const[o,l]=R.useState(new Set),[u,_]=R.useState(null),f=new Map;for(const x of e){const S=f.get(x.experimentId);S?S.push(x):f.set(x.experimentId,[x])}for(const x of f.values())x.sort((S,b)=>b.createdAt-S.createdAt);const p=[...n].sort((x,S)=>{var y,w,C,N;const b=((w=(y=f.get(x.id))==null?void 0:y[0])==null?void 0:w.createdAt)??x.createdAt;return(((N=(C=f.get(S.id))==null?void 0:C[0])==null?void 0:N.createdAt)??S.createdAt)-b});if(p.length===0)return h.jsx(uk,{icon:rb,title:t??L1e(),description:t?void 0:N1e()});async function m(x){_(null),l(S=>new Set(S).add(x));try{await a(x)}catch(S){l(b=>{const v=new Set(b);return v.delete(x),v}),_(S instanceof Error?S.message:String(S))}}return h.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[u&&h.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[xve()," ",u]}),h.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":hve(),children:p.map(x=>{const S=f.get(x.id)??[],b=S[0]??null,v=S.find(N=>N.status==="running"||N.status==="starting"),y=v??b,w=!!(v&&(v.cancelRequested||o.has(v.id))),C=v?w?"cancelling":Ui(v):b?Ui(b):"idle";return h.jsxs("div",{className:"experiment-table-group grid grid-cols-[minmax(0,_1fr)_auto] [grid-template-areas:'name_meta'_'actions_actions'] gap-x-8 items-center py-4 px-5 gap-y-[7px] border-b border-b-divider-subtle bg-background cursor-pointer [&:hover]:bg-canvas [&:last-child]:border-b-0 [@container((max-width:_560px))]:grid-cols-[minmax(0,_1fr)_auto] [@container((max-width:_560px))]:gap-x-3.5 [@container((max-width:_560px))]:gap-y-[9px] [@container((max-width:_400px))]:grid-cols-[minmax(0,_1fr)] [@container((max-width:_400px))]:[grid-template-areas:'name'_'meta'_'actions']",role:"listitem",onClick:()=>r(x,"preview"),onDoubleClick:()=>r(x,"keepOpen"),onAuxClick:N=>{N.button===1&&(N.preventDefault(),r(x,"keepOpen"))},children:[h.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[h.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...qr(N=>r(x,N),{stopPropagation:!0}),children:x.title||x.slug}),h.jsxs("span",{className:"experiment-table-subtitle flex items-center min-w-0 gap-1.5 mt-1 overflow-hidden text-subtext text-sm [&_>_svg]:shrink-0 [&_code]:min-w-0 [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:x.branchName,children:[h.jsx(Vp,{size:14,"aria-hidden":"true"}),h.jsx("code",{children:x.branchName})]})]}),h.jsxs("div",{className:"experiment-table-meta [grid-area:meta] self-start flex items-center justify-end gap-4.5 whitespace-nowrap [@container((max-width:_560px))]:flex-col [@container((max-width:_560px))]:items-end [@container((max-width:_560px))]:gap-1.5 [@container((max-width:_400px))]:!flex-row [@container((max-width:_400px))]:!items-center [@container((max-width:_400px))]:flex-wrap [@container((max-width:_400px))]:justify-start [@container((max-width:_400px))]:gap-3",children:[h.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:h.jsx(Vl,{status:C})}),h.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:h.jsx("span",{children:S.length===1?q1e():X1e({count:tn(S.length)})})}),h.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:h.jsx("span",{children:b?$o(b.createdAt):$1e()})})]}),h.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":OV({name:x.title||x.slug}),onClick:N=>N.stopPropagation(),onDoubleClick:N=>N.stopPropagation(),onAuxClick:N=>N.stopPropagation(),children:[h.jsxs(Oe,{size:"small",disabled:!y,title:y?V1e():A1e(),...qr(N=>{y&&s(x.id,y.id,N)},{stopPropagation:!0}),children:[h.jsx($h,{size:15}),gve()]}),h.jsxs(Oe,{size:"small",title:ZM({branch:Ee(x.branchName)}),...qr(N=>i(x.id,N),{stopPropagation:!0}),children:[h.jsx(sb,{size:15}),cve()]}),v&&h.jsxs(Oe,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:w,title:w?tve():ive(),onClick:()=>void m(v.id),children:[h.jsx(yO,{size:15}),w?B0e():pD()]})]})]},x.id)})})]})}function $Ct({onClose:e,onCreateProject:n}){const[t,r]=R.useState(!1),[s,i]=R.useState(null),a=R.useRef(null),o=R.useCallback(l=>{t||(r(!0),i(null),l().catch(()=>i(ost())).finally(()=>r(!1)))},[t]);return R.useEffect(()=>{const l=u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),o(e))};return document.addEventListener("keydown",l,!0),()=>document.removeEventListener("keydown",l,!0)},[e,o]),R.useEffect(()=>{const l=a.current;if(!l)return;const u=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...l.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(_()[0]??l).focus();const f=p=>{if(p.key!=="Tab")return;const m=_();if(m.length===0){p.preventDefault(),l.focus();return}const x=m[0],S=m[m.length-1];p.shiftKey&&document.activeElement===x?(p.preventDefault(),S.focus()):!p.shiftKey&&document.activeElement===S&&(p.preventDefault(),x.focus())};return document.addEventListener("keydown",f,!0),()=>{document.removeEventListener("keydown",f,!0),u==null||u.focus()}},[]),Go.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:h.jsxs("div",{ref:a,className:"relative w-110 max-w-full rounded-xl border border-border bg-background p-6 shadow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"demo-welcome-title",tabIndex:-1,children:[h.jsx(on,{className:"absolute end-3.5 top-3.5","aria-label":Irt(),onClick:()=>o(e),disabled:t,children:h.jsx(ts,{size:16})}),h.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[h.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:h.jsx(E6,{})}),h.jsxs("div",{children:[h.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:Grt()}),h.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:pst()})]})]}),h.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[h.jsxs("p",{dir:"auto",children:[fst()," ",h.jsx("a",{dir:"ltr",href:"https://github.com/karpathy/nanochat",target:"_blank",rel:"noreferrer",className:"font-medium text-primary underline decoration-border-strong underline-offset-3 hover:decoration-primary",children:rst()}),Mrt()]}),h.jsx("p",{dir:"auto",children:Jrt()})]}),s&&h.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),h.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[h.jsx(Oe,{onClick:()=>o(n),disabled:t,children:Frt()}),h.jsx(Oe,{variant:"primary",onClick:()=>o(e),disabled:t,children:t?Zi():Qrt()})]})]})}),document.body)}function as(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Vb(){for(var e=0,n=arguments.length,t={},r;e=0&&(r=t.slice(s+1),t=t.slice(0,s)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}E1.prototype=Vb.prototype={constructor:E1,on:function(e,n){var t=this._,r=FCt(e+"",t),s,i=-1,a=r.length;if(arguments.length<2){for(;++i0)for(var t=new Array(s),r=0,s,i;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),zA.hasOwnProperty(n)?{space:zA[n],local:e}:e}function qCt(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===e5&&n.documentElement.namespaceURI===e5?n.createElement(e):n.createElementNS(t,e)}}function UCt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function bF(e){var n=Kb(e);return(n.local?UCt:qCt)(n)}function GCt(){}function fk(e){return e==null?GCt:function(){return this.querySelector(e)}}function WCt(e){typeof e!="function"&&(e=fk(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=w&&(w=y+1);!(N=b[w])&&++w=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function g8t(e){e||(e=v8t);function n(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var t=this._groups,r=t.length,s=new Array(r),i=0;in?1:e>=n?0:NaN}function b8t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function y8t(){return Array.from(this)}function x8t(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?R8t:typeof n=="function"?D8t:M8t)(e,n,t??"")):Kh(this.node(),e)}function Kh(e,n){return e.style.getPropertyValue(n)||kF(e).getComputedStyle(e,null).getPropertyValue(n)}function O8t(e){return function(){delete this[e]}}function I8t(e,n){return function(){this[e]=n}}function B8t(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function $8t(e,n){return arguments.length>1?this.each((n==null?O8t:typeof n=="function"?B8t:I8t)(e,n)):this.node()[e]}function CF(e){return e.trim().split(/^|\s+/)}function dk(e){return e.classList||new EF(e)}function EF(e){this._node=e,this._names=CF(e.getAttribute("class")||"")}EF.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function NF(e,n){for(var t=dk(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function h9t(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function t5(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:l,dy:u,dispatch:_}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:_}})}t5.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function S9t(e){return!e.ctrlKey&&!e.button}function k9t(){return this.parentNode}function C9t(e,n){return n??{x:e.x,y:e.y}}function E9t(){return navigator.maxTouchPoints||"ontouchstart"in this}function MF(){var e=S9t,n=k9t,t=C9t,r=E9t,s={},i=Vb("start","drag","end"),a=0,o,l,u,_,f=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",b).on("touchmove.drag",v,w9t).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(_||!e.call(this,C,N))){var E=w(this,n.call(this,C,N),C,N,"mouse");E&&(Pi(C.view).on("mousemove.drag",x,_p).on("mouseup.drag",S,_p),AF(C.view),Rw(C),u=!1,o=C.clientX,l=C.clientY,E("start",C))}}function x(C){if(hh(C),!u){var N=C.clientX-o,E=C.clientY-l;u=N*N+E*E>f}s.mouse("drag",C)}function S(C){Pi(C.view).on("mousemove.drag mouseup.drag",null),RF(C.view,u),hh(C),s.mouse("end",C)}function b(C,N){if(e.call(this,C,N)){var E=C.changedTouches,j=n.call(this,C,N),z=E.length,M,O;for(M=0;M>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?Jg(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?Jg(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=z9t.exec(e))?new wi(n[1],n[2],n[3],1):(n=T9t.exec(e))?new wi(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=j9t.exec(e))?Jg(n[1],n[2],n[3],n[4]):(n=A9t.exec(e))?Jg(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=R9t.exec(e))?LA(n[1],n[2]/100,n[3]/100,1):(n=M9t.exec(e))?LA(n[1],n[2]/100,n[3]/100,n[4]):TA.hasOwnProperty(e)?RA(TA[e]):e==="transparent"?new wi(NaN,NaN,NaN,0):null}function RA(e){return new wi(e>>16&255,e>>8&255,e&255,1)}function Jg(e,n,t,r){return r<=0&&(e=n=t=NaN),new wi(e,n,t,r)}function O9t(e){return e instanceof am||(e=$f(e)),e?(e=e.rgb(),new wi(e.r,e.g,e.b,e.opacity)):new wi}function n5(e,n,t,r){return arguments.length===1?O9t(e):new wi(e,n,t,r??1)}function wi(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}hk(wi,n5,DF(am,{brighter(e){return e=e==null?Nv:Math.pow(Nv,e),new wi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pp:Math.pow(pp,e),new wi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wi(Tf(this.r),Tf(this.g),Tf(this.b),zv(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:MA,formatHex:MA,formatHex8:I9t,formatRgb:DA,toString:DA}));function MA(){return`#${uf(this.r)}${uf(this.g)}${uf(this.b)}`}function I9t(){return`#${uf(this.r)}${uf(this.g)}${uf(this.b)}${uf((isNaN(this.opacity)?1:this.opacity)*255)}`}function DA(){const e=zv(this.opacity);return`${e===1?"rgb(":"rgba("}${Tf(this.r)}, ${Tf(this.g)}, ${Tf(this.b)}${e===1?")":`, ${e})`}`}function zv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Tf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function uf(e){return e=Tf(e),(e<16?"0":"")+e.toString(16)}function LA(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Wa(e,n,t,r)}function LF(e){if(e instanceof Wa)return new Wa(e.h,e.s,e.l,e.opacity);if(e instanceof am||(e=$f(e)),!e)return new Wa;if(e instanceof Wa)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),i=Math.max(n,t,r),a=NaN,o=i-s,l=(i+s)/2;return o?(n===i?a=(t-r)/o+(t0&&l<1?0:a,new Wa(a,o,l,e.opacity)}function B9t(e,n,t,r){return arguments.length===1?LF(e):new Wa(e,n,t,r??1)}function Wa(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}hk(Wa,B9t,DF(am,{brighter(e){return e=e==null?Nv:Math.pow(Nv,e),new Wa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pp:Math.pow(pp,e),new Wa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*n,s=2*t-r;return new wi(Mw(e>=240?e-240:e+120,s,r),Mw(e,s,r),Mw(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Wa(OA(this.h),e1(this.s),e1(this.l),zv(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=zv(this.opacity);return`${e===1?"hsl(":"hsla("}${OA(this.h)}, ${e1(this.s)*100}%, ${e1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function OA(e){return e=(e||0)%360,e<0?e+360:e}function e1(e){return Math.max(0,Math.min(1,e||0))}function Mw(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const _k=e=>()=>e;function $9t(e,n){return function(t){return e+t*n}}function P9t(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(r){return Math.pow(e+r*n,t)}}function F9t(e){return(e=+e)==1?OF:function(n,t){return t-n?P9t(n,t,e):_k(isNaN(n)?t:n)}}function OF(e,n){var t=n-e;return t?$9t(e,t):_k(isNaN(e)?n:e)}const Tv=(function e(n){var t=F9t(n);function r(s,i){var a=t((s=n5(s)).r,(i=n5(i)).r),o=t(s.g,i.g),l=t(s.b,i.b),u=OF(s.opacity,i.opacity);return function(_){return s.r=a(_),s.g=o(_),s.b=l(_),s.opacity=u(_),s+""}}return r.gamma=e,r})(1);function H9t(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(i){for(s=0;st&&(i=n.slice(t,i),o[a]?o[a]+=i:o[++a]=i),(r=r[0])===(s=s[0])?o[a]?o[a]+=s:o[++a]=s:(o[++a]=null,l.push({i:a,x:jo(r,s)})),t=Dw.lastIndex;return t180?_+=360:_-u>180&&(u+=360),p.push({i:f.push(s(f)+"rotate(",null,r)-2,x:jo(u,_)})):_&&f.push(s(f)+"rotate("+_+r)}function o(u,_,f,p){u!==_?p.push({i:f.push(s(f)+"skewX(",null,r)-2,x:jo(u,_)}):_&&f.push(s(f)+"skewX("+_+r)}function l(u,_,f,p,m,x){if(u!==f||_!==p){var S=m.push(s(m)+"scale(",null,",",null,")");x.push({i:S-4,x:jo(u,f)},{i:S-2,x:jo(_,p)})}else(f!==1||p!==1)&&m.push(s(m)+"scale("+f+","+p+")")}return function(u,_){var f=[],p=[];return u=e(u),_=e(_),i(u.translateX,u.translateY,_.translateX,_.translateY,f,p),a(u.rotate,_.rotate,f,p),o(u.skewX,_.skewX,f,p),l(u.scaleX,u.scaleY,_.scaleX,_.scaleY,f,p),u=_=null,function(m){for(var x=-1,S=p.length,b;++x=0&&e._call.call(void 0,n),e=e._next;--Qh}function $A(){Pf=(Av=gp.now())+Qb,Qh=w0=0;try{rEt()}finally{Qh=0,iEt(),Pf=0}}function sEt(){var e=gp.now(),n=e-Av;n>PF&&(Qb-=n,Av=e)}function iEt(){for(var e,n=jv,t,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:jv=t);S0=e,i5(r)}function i5(e){if(!Qh){w0&&(w0=clearTimeout(w0));var n=e-Pf;n>24?(e<1/0&&(w0=setTimeout($A,e-gp.now()-Qb)),_0&&(_0=clearInterval(_0))):(_0||(Av=gp.now(),_0=setInterval(sEt,PF)),Qh=1,FF($A))}}function PA(e,n,t){var r=new Rv;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var aEt=Vb("start","end","cancel","interrupt"),oEt=[],qF=0,FA=1,a5=2,z1=3,HA=4,o5=5,T1=6;function Yb(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;lEt(e,t,{name:n,index:r,group:s,on:aEt,tween:oEt,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:qF})}function mk(e,n){var t=eo(e,n);if(t.state>qF)throw new Error("too late; already scheduled");return t}function Jo(e,n){var t=eo(e,n);if(t.state>z1)throw new Error("too late; already running");return t}function eo(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function lEt(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=HF(i,0,t.time);function i(u){t.state=FA,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var _,f,p,m;if(t.state!==FA)return l();for(_ in r)if(m=r[_],m.name===t.name){if(m.state===z1)return PA(a);m.state===HA?(m.state=T1,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[_]):+_a5&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function BEt(e,n,t){var r,s,i=IEt(n)?mk:Jo;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function $Et(e,n){var t=this._id;return arguments.length<2?eo(this.node(),t).on.on(e):this.each(BEt(t,e,n))}function PEt(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function FEt(){return this.on("end.remove",PEt(this._id))}function HEt(e){var n=this._name,t=this._id;typeof e!="function"&&(e=fk(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function hNt(e,{sourceEvent:n,target:t,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:t,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function Ul(e,n,t){this.k=e,this.x=n,this.y=t}Ul.prototype={constructor:Ul,scale:function(e){return e===1?this:new Ul(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Ul(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Xb=new Ul(1,0,0);VF.prototype=Ul.prototype;function VF(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Xb;return e.__zoom}function Lw(e){e.stopImmediatePropagation()}function p0(e){e.preventDefault(),e.stopImmediatePropagation()}function _Nt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function pNt(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function qA(){return this.__zoom||Xb}function mNt(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function gNt(){return navigator.maxTouchPoints||"ontouchstart"in this}function vNt(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],i=e.invertY(n[0][1])-t[0][1],a=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function KF(){var e=_Nt,n=pNt,t=vNt,r=mNt,s=gNt,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,l=N1,u=Vb("start","zoom","end"),_,f,p,m=500,x=150,S=0,b=10;function v(H){H.property("__zoom",qA).on("wheel.zoom",z,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",O).filter(s).on("touchstart.zoom",B).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(H,Y,V,X){var ie=H.selection?H.selection():H;ie.property("__zoom",qA),H!==ie?N(H,Y,V,X):ie.interrupt().each(function(){E(this,arguments).event(X).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},v.scaleBy=function(H,Y,V,X){v.scaleTo(H,function(){var ie=this.__zoom.k,I=typeof Y=="function"?Y.apply(this,arguments):Y;return ie*I},V,X)},v.scaleTo=function(H,Y,V,X){v.transform(H,function(){var ie=n.apply(this,arguments),I=this.__zoom,L=V==null?C(ie):typeof V=="function"?V.apply(this,arguments):V,$=I.invert(L),q=typeof Y=="function"?Y.apply(this,arguments):Y;return t(w(y(I,q),L,$),ie,a)},V,X)},v.translateBy=function(H,Y,V,X){v.transform(H,function(){return t(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof V=="function"?V.apply(this,arguments):V),n.apply(this,arguments),a)},null,X)},v.translateTo=function(H,Y,V,X,ie){v.transform(H,function(){var I=n.apply(this,arguments),L=this.__zoom,$=X==null?C(I):typeof X=="function"?X.apply(this,arguments):X;return t(Xb.translate($[0],$[1]).scale(L.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof V=="function"?-V.apply(this,arguments):-V),I,a)},X,ie)};function y(H,Y){return Y=Math.max(i[0],Math.min(i[1],Y)),Y===H.k?H:new Ul(Y,H.x,H.y)}function w(H,Y,V){var X=Y[0]-V[0]*H.k,ie=Y[1]-V[1]*H.k;return X===H.x&&ie===H.y?H:new Ul(H.k,X,ie)}function C(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function N(H,Y,V,X){H.on("start.zoom",function(){E(this,arguments).event(X).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(X).end()}).tween("zoom",function(){var ie=this,I=arguments,L=E(ie,I).event(X),$=n.apply(ie,I),q=V==null?C($):typeof V=="function"?V.apply(ie,I):V,G=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),te=ie.__zoom,fe=typeof Y=="function"?Y.apply(ie,I):Y,oe=l(te.invert(q).concat(G/te.k),fe.invert(q).concat(G/fe.k));return function(ne){if(ne===1)ne=fe;else{var Q=oe(ne),ce=G/Q[2];ne=new Ul(ce,q[0]-Q[0]*ce,q[1]-Q[1]*ce)}L.zoom(null,ne)}})}function E(H,Y,V){return!V&&H.__zooming||new j(H,Y)}function j(H,Y){this.that=H,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=n.apply(H,Y),this.taps=0}j.prototype={event:function(H){return H&&(this.sourceEvent=H),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(H,Y){return this.mouse&&H!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var Y=Pi(this.that).datum();u.call(H,this.that,new hNt(H,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:u}),Y)}};function z(H,...Y){if(!e.apply(this,arguments))return;var V=E(this,Y).event(H),X=this.__zoom,ie=Math.max(i[0],Math.min(i[1],X.k*Math.pow(2,r.apply(this,arguments)))),I=Fa(H);if(V.wheel)(V.mouse[0][0]!==I[0]||V.mouse[0][1]!==I[1])&&(V.mouse[1]=X.invert(V.mouse[0]=I)),clearTimeout(V.wheel);else{if(X.k===ie)return;V.mouse=[I,X.invert(I)],j1(this),V.start()}p0(H),V.wheel=setTimeout(L,x),V.zoom("mouse",t(w(y(X,ie),V.mouse[0],V.mouse[1]),V.extent,a));function L(){V.wheel=null,V.end()}}function M(H,...Y){if(p||!e.apply(this,arguments))return;var V=H.currentTarget,X=E(this,Y,!0).event(H),ie=Pi(H.view).on("mousemove.zoom",q,!0).on("mouseup.zoom",G,!0),I=Fa(H,V),L=H.clientX,$=H.clientY;AF(H.view),Lw(H),X.mouse=[I,this.__zoom.invert(I)],j1(this),X.start();function q(te){if(p0(te),!X.moved){var fe=te.clientX-L,oe=te.clientY-$;X.moved=fe*fe+oe*oe>S}X.event(te).zoom("mouse",t(w(X.that.__zoom,X.mouse[0]=Fa(te,V),X.mouse[1]),X.extent,a))}function G(te){ie.on("mousemove.zoom mouseup.zoom",null),RF(te.view,X.moved),p0(te),X.event(te).end()}}function O(H,...Y){if(e.apply(this,arguments)){var V=this.__zoom,X=Fa(H.changedTouches?H.changedTouches[0]:H,this),ie=V.invert(X),I=V.k*(H.shiftKey?.5:2),L=t(w(y(V,I),X,ie),n.apply(this,Y),a);p0(H),o>0?Pi(this).transition().duration(o).call(N,L,X,H):Pi(this).call(v.transform,L,X,H)}}function B(H,...Y){if(e.apply(this,arguments)){var V=H.touches,X=V.length,ie=E(this,Y,H.changedTouches.length===X).event(H),I,L,$,q;for(Lw(H),L=0;L`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:n,sourceHandle:t,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?t:r}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},vp=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],QF=["Enter"," ","Escape"],YF={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:n,y:t})=>`Moved selected node ${e}. New position, x: ${n}, y: ${t}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Yh;(function(e){e.Strict="strict",e.Loose="loose"})(Yh||(Yh={}));var jf;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(jf||(jf={}));var bp;(function(e){e.Partial="partial",e.Full="full"})(bp||(bp={}));const XF={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Uc;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Uc||(Uc={}));var Mv;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Mv||(Mv={}));var Ct;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ct||(Ct={}));const UA={[Ct.Left]:Ct.Right,[Ct.Right]:Ct.Left,[Ct.Top]:Ct.Bottom,[Ct.Bottom]:Ct.Top};function ZF(e){return e===null?null:e?"valid":"invalid"}const JF=e=>"id"in e&&"source"in e&&"target"in e,bNt=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),vk=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),om=(e,n=[0,0])=>{const{width:t,height:r}=sc(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},yNt=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const t=e.reduce((r,s)=>{const i=typeof s=="string";let a=!n.nodeLookup&&!i?s:void 0;n.nodeLookup&&(a=i?n.nodeLookup.get(s):vk(s)?s:n.nodeLookup.get(s.id));const o=a?Dv(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Zb(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Jb(t)},lm=(e,n={})=>{let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(s=>{(n.filter===void 0||n.filter(s))&&(t=Zb(t,Dv(s)),r=!0)}),r?Jb(t):{x:0,y:0,width:0,height:0}},bk=(e,n,[t,r,s]=[0,0,1],i=!1,a=!1)=>{const o=(n.x-t)/s,l=(n.y-r)/s,u=n.width/s,_=n.height/s,f=[];for(const p of e.values()){const{measured:m,selectable:x=!0,hidden:S=!1}=p;if(a&&!x||S)continue;const b=m.width??p.width??p.initialWidth??0,v=m.height??p.height??p.initialHeight??0,{x:y,y:w}=p.internals.positionAbsolute,C=rH(o,l,u,_,y,w,b,v),N=b*v,E=i&&C>0;(!p.internals.handleBounds||E||C>=N||p.dragging)&&f.push(p)}return f},xNt=(e,n)=>{const t=new Set;return e.forEach(r=>{t.add(r.id)}),n.filter(r=>t.has(r.source)||t.has(r.target))};function wNt(e,n){const t=new Map,r=n!=null&&n.nodes?new Set(n.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&t.set(s.id,s)}),t}async function SNt({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=wNt(e,a),l=lm(o),u=xk(l,n,t,(a==null?void 0:a.minZoom)??s,(a==null?void 0:a.maxZoom)??i,(a==null?void 0:a.padding)??.1);return await r.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),!0}function eH({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:i}){const a=t.get(e),o=a.parentId?t.get(a.parentId):void 0,{x:l,y:u}=o?o.internals.positionAbsolute:{x:0,y:0},_=a.origin??r;let f=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",Xa.error005());else{const m=o.measured.width,x=o.measured.height;m&&x&&(f=[[l,u],[l+m,u+x]])}else o&&Hf(a.extent)&&(f=[[a.extent[0][0]+l,a.extent[0][1]+u],[a.extent[1][0]+l,a.extent[1][1]+u]]);const p=Hf(f)?Ff(n,f,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",Xa.error015())),{position:{x:p.x-l+(a.measured.width??0)*_[0],y:p.y-u+(a.measured.height??0)*_[1]},positionAbsolute:p}}async function kNt({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const i=new Set(e.map(p=>p.id)),a=[];for(const p of t){if(p.deletable===!1)continue;const m=i.has(p.id),x=!m&&p.parentId&&a.find(S=>S.id===p.parentId);(m||x)&&a.push(p)}const o=new Set(n.map(p=>p.id)),l=r.filter(p=>p.deletable!==!1),_=xNt(a,l);for(const p of l)o.has(p.id)&&!_.find(x=>x.id===p.id)&&_.push(p);if(!s)return{edges:_,nodes:a};const f=await s({nodes:a,edges:_});return typeof f=="boolean"?f?{edges:_,nodes:a}:{edges:[],nodes:[]}:f}const Xh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Ff=(e={x:0,y:0},n,t)=>({x:Xh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:Xh(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function tH(e,n,t){const{width:r,height:s}=sc(t),{x:i,y:a}=t.internals.positionAbsolute;return Ff(e,[[i,a],[i+r,a+s]],n)}const GA=(e,n,t)=>et?-Xh(Math.abs(e-t),1,n)/n:0,yk=(e,n,t=15,r=40)=>{const s=GA(e.x,r,n.width-r)*t,i=GA(e.y,r,n.height-r)*t;return[s,i]},Zb=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),l5=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Jb=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),yp=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=vk(e)?e.internals.positionAbsolute:om(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Dv=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=vk(e)?e.internals.positionAbsolute:om(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},nH=(e,n)=>Jb(Zb(l5(e),l5(n))),rH=(e,n,t,r,s,i,a,o)=>{const l=Math.max(0,Math.min(e+t,s+a)-Math.max(e,s)),u=Math.max(0,Math.min(n+r,i+o)-Math.max(n,i));return Math.ceil(l*u)},Lv=(e,n)=>rH(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),WA=e=>Va(e.width)&&Va(e.height)&&Va(e.x)&&Va(e.y),Va=e=>!isNaN(e)&&isFinite(e),sH=(e,n)=>(t,r)=>{},cm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),um=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?cm(o,a):o},Zh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function Gd(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e=="string"&&e.endsWith("%")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(n*t*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function CNt(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=Gd(e,t),s=Gd(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Gd(e.top??e.y??0,t),s=Gd(e.bottom??e.y??0,t),i=Gd(e.left??e.x??0,n),a=Gd(e.right??e.x??0,n);return{top:r,right:a,bottom:s,left:i,x:i+a,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function ENt(e,n,t,r,s,i){const{x:a,y:o}=Zh(e,[n,t,r]),{x:l,y:u}=Zh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),_=s-l,f=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(_),bottom:Math.floor(f)}}const xk=(e,n,t,r,s,i)=>{const a=CNt(i,n,t),o=(n-a.x)/e.width,l=(t-a.y)/e.height,u=Math.min(o,l),_=Xh(u,r,s),f=e.x+e.width/2,p=e.y+e.height/2,m=n/2-f*_,x=t/2-p*_,S=ENt(e,m,x,_,n,t),b={left:Math.min(S.left-a.left,0),top:Math.min(S.top-a.top,0),right:Math.min(S.right-a.right,0),bottom:Math.min(S.bottom-a.bottom,0)};return{x:m-b.left+b.right,y:x-b.top+b.bottom,zoom:_}},xp=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Hf(e){return e!=null&&e!=="parent"}function sc(e){var n,t;return{width:((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth??0,height:((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight??0}}function iH(e){var n,t;return(((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth)!==void 0&&(((t=e.measured)==null?void 0:t.height)??e.height??e.initialHeight)!==void 0}function aH(e,n={width:0,height:0},t,r,s){const i={...e},a=r.get(t);if(a){const o=a.origin||s;i.x+=a.internals.positionAbsolute.x-(n.width??0)*o[0],i.y+=a.internals.positionAbsolute.y-(n.height??0)*o[1]}return i}function VA(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function NNt(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function zNt(e){return{...YF,...e||{}}}function $0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=Ka(e),o=um({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:l,y:u}=t?cm(o,n):o;return{xSnapped:l,ySnapped:u,...o}}const wk=e=>({width:e.offsetWidth,height:e.offsetHeight}),oH=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},TNt=["INPUT","SELECT","TEXTAREA"];function lH(e){var r,s;const n=((s=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:s[0])||e.target;return(n==null?void 0:n.nodeType)!==1?!1:TNt.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const cH=e=>"clientX"in e,Ka=(e,n)=>{var i,a;const t=cH(e),r=t?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,s=t?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},KA=(e,n,t,r,s)=>{const i=n.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(a=>{const o=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:s,position:a.getAttribute("data-handlepos"),x:(o.left-t.left)/r,y:(o.top-t.top)/r,...wk(a)}})};function uH({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:i,targetControlX:a,targetControlY:o}){const l=e*.125+s*.375+a*.375+t*.125,u=n*.125+i*.375+o*.375+r*.125,_=Math.abs(l-e),f=Math.abs(u-n);return[l,u,_,f]}function r1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function QA({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case Ct.Left:return[n-r1(n-r,i),t];case Ct.Right:return[n+r1(r-n,i),t];case Ct.Top:return[n,t-r1(t-s,i)];case Ct.Bottom:return[n,t+r1(s-t,i)]}}function fH({sourceX:e,sourceY:n,sourcePosition:t=Ct.Bottom,targetX:r,targetY:s,targetPosition:i=Ct.Top,curvature:a=.25}){const[o,l]=QA({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,_]=QA({pos:i,x1:r,y1:s,x2:e,y2:n,c:a}),[f,p,m,x]=uH({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:l,targetControlX:u,targetControlY:_});return[`M${e},${n} C${o},${l} ${u},${_} ${r},${s}`,f,p,m,x]}function dH({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const RNt=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,MNt=(e,n)=>n.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),DNt=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",Xa.error006()),n;const r=t.getEdgeId||RNt;let s;return JF(e)?s={...e}:s={...e,id:r(e)},MNt(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function hH({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,a,o]=dH({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,a,o]}const YA={[Ct.Left]:{x:-1,y:0},[Ct.Right]:{x:1,y:0},[Ct.Top]:{x:0,y:-1},[Ct.Bottom]:{x:0,y:1}},LNt=({source:e,sourcePosition:n=Ct.Bottom,target:t})=>n===Ct.Left||n===Ct.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function ONt({source:e,sourcePosition:n=Ct.Bottom,target:t,targetPosition:r=Ct.Top,center:s,offset:i,stepPosition:a}){const o=YA[n],l=YA[r],u={x:e.x+o.x*i,y:e.y+o.y*i},_={x:t.x+l.x*i,y:t.y+l.y*i},f=LNt({source:u,sourcePosition:n,target:_}),p=f.x!==0?"x":"y",m=f[p];let x=[],S,b;const v={x:0,y:0},y={x:0,y:0},[,,w,C]=dH({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(o[p]*l[p]===-1){p==="x"?(S=s.x??u.x+(_.x-u.x)*a,b=s.y??(u.y+_.y)/2):(S=s.x??(u.x+_.x)/2,b=s.y??u.y+(_.y-u.y)*a);const z=[{x:S,y:u.y},{x:S,y:_.y}],M=[{x:u.x,y:b},{x:_.x,y:b}];o[p]===m?x=p==="x"?z:M:x=p==="x"?M:z}else{const z=[{x:u.x,y:_.y}],M=[{x:_.x,y:u.y}];if(p==="x"?x=o.x===m?M:z:x=o.y===m?z:M,n===r){const H=Math.abs(e[p]-t[p]);if(H<=i){const Y=Math.min(i-1,i-H);o[p]===m?v[p]=(u[p]>e[p]?-1:1)*Y:y[p]=(_[p]>t[p]?-1:1)*Y}}if(n!==r){const H=p==="x"?"y":"x",Y=o[p]===l[H],V=u[H]>_[H],X=u[H]<_[H];(o[p]===1&&(!Y&&V||Y&&X)||o[p]!==1&&(!Y&&X||Y&&V))&&(x=p==="x"?z:M)}const O={x:u.x+v.x,y:u.y+v.y},B={x:_.x+y.x,y:_.y+y.y},F=Math.max(Math.abs(O.x-x[0].x),Math.abs(B.x-x[0].x)),U=Math.max(Math.abs(O.y-x[0].y),Math.abs(B.y-x[0].y));F>=U?(S=(O.x+B.x)/2,b=x[0].y):(S=x[0].x,b=(O.y+B.y)/2)}const N={x:u.x+v.x,y:u.y+v.y},E={x:_.x+y.x,y:_.y+y.y};return[[e,...N.x!==x[0].x||N.y!==x[0].y?[N]:[],...x,...E.x!==x[x.length-1].x||E.y!==x[x.length-1].y?[E]:[],t],S,b,w,C]}function INt(e,n,t,r){const s=Math.min(XA(e,n)/2,XA(n,t)/2,r),{x:i,y:a}=n;if(e.x===i&&i===t.x||e.y===a&&a===t.y)return`L${i} ${a}`;if(e.y===a){const u=e.xt.id===n):e[0])||null}function u5(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function $Nt(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const i=new Set;return e.reduce((a,o)=>([o.markerStart||r,o.markerEnd||s].forEach(l=>{if(l&&typeof l=="object"){const u=u5(l,n);i.has(u)||(a.push({id:u,color:l.color||t,...l}),i.add(u))}}),a),[]).sort((a,o)=>a.id.localeCompare(o.id))}const _H=1e3,PNt=10,Sk={nodeOrigin:[0,0],nodeExtent:vp,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},FNt={...Sk,checkEquality:!0};function kk(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function HNt(e,n,t){const r=kk(Sk,t);for(const s of e.values())if(s.parentId)Ek(s,e,n,r);else{const i=om(s,r.nodeOrigin),a=Hf(s.extent)?s.extent:r.nodeExtent,o=Ff(i,a,sc(s));s.internals.positionAbsolute=o}}function qNt(e,n){if(!e.handles)return e.measured?n==null?void 0:n.internals.handleBounds:void 0;const t=[],r=[];for(const s of e.handles){const i={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?t.push(i):s.type==="target"&&r.push(i)}return{source:t,target:r}}function Ck(e){return e==="manual"}function f5(e,n,t,r={}){var _,f;const s=kk(FNt,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!Ck(s.zIndexMode)?_H:0;let l=e.length>0,u=!1;n.clear(),t.clear();for(const p of e){let m=a.get(p.id);if(s.checkEquality&&p===(m==null?void 0:m.internals.userNode))n.set(p.id,m);else{const x=om(p,s.nodeOrigin),S=Hf(p.extent)?p.extent:s.nodeExtent,b=Ff(x,S,sc(p));m={...s.defaults,...p,measured:{width:(_=p.measured)==null?void 0:_.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:b,handleBounds:qNt(p,m),z:pH(p,o,s.zIndexMode),userNode:p}},n.set(p.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(l=!1),p.parentId&&Ek(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:l,hasSelectedNodes:u}}function UNt(e,n){if(!e.parentId)return;const t=n.get(e.parentId);t?t.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function Ek(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:l}=kk(Sk,r),u=e.parentId,_=n.get(u);if(!_){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}UNt(e,t),s&&!_.parentId&&_.internals.rootParentIndex===void 0&&l==="auto"&&(_.internals.rootParentIndex=++s.i,_.internals.z=_.internals.z+s.i*PNt),s&&_.internals.rootParentIndex!==void 0&&(s.i=_.internals.rootParentIndex);const f=i&&!Ck(l)?_H:0,{x:p,y:m,z:x}=GNt(e,_,a,o,f,l),{positionAbsolute:S}=e.internals,b=p!==S.x||m!==S.y;(b||x!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:p,y:m}:S,z:x}})}function pH(e,n,t){const r=Va(e.zIndex)?e.zIndex:0;return Ck(t)?r:r+(e.selected?n:0)}function GNt(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,l=sc(e),u=om(e,t),_=Hf(e.extent)?Ff(u,e.extent,l):u;let f=Ff({x:a+_.x,y:o+_.y},r,l);e.extent==="parent"&&(f=tH(f,l,n));const p=pH(e,s,i),m=n.internals.z??0;return{x:f.x,y:f.y,z:m>=p?m+1:p}}function Nk(e,n,t,r=[0,0]){var a;const s=[],i=new Map;for(const o of e){const l=n.get(o.parentId);if(!l)continue;const u=((a=i.get(o.parentId))==null?void 0:a.expandedRect)??yp(l),_=nH(u,o.rect);i.set(o.parentId,{expandedRect:_,parent:l})}return i.size>0&&i.forEach(({expandedRect:o,parent:l},u)=>{var w;const _=l.internals.positionAbsolute,f=sc(l),p=l.origin??r,m=o.x<_.x?Math.round(Math.abs(_.x-o.x)):0,x=o.y<_.y?Math.round(Math.abs(_.y-o.y)):0,S=Math.max(f.width,Math.round(o.width)),b=Math.max(f.height,Math.round(o.height)),v=(S-f.width)*p[0],y=(b-f.height)*p[1];(m>0||x>0||v||y)&&(s.push({id:u,type:"position",position:{x:l.position.x-m+v,y:l.position.y-x+y}}),(w=t.get(u))==null||w.forEach(C=>{e.some(N=>N.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+m,y:C.position.y+x}})})),(f.width0){const m=Nk(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:l}}async function VNt({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:i}){if(!n||!e.x&&!e.y)return!1;const a=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,i]],r);return!!a&&(a.x!==t[0]||a.y!==t[1]||a.k!==t[2])}function tR(e,n,t,r,s,i){let a=s;const o=r.get(a)||new Map;r.set(a,o.set(t,n)),a=`${s}-${e}`;const l=r.get(a)||new Map;if(r.set(a,l.set(t,n)),i){a=`${s}-${e}-${i}`;const u=r.get(a)||new Map;r.set(a,u.set(t,n))}}function mH(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:i,sourceHandle:a=null,targetHandle:o=null}=r,l={edgeId:r.id,source:s,target:i,sourceHandle:a,targetHandle:o},u=`${s}-${a}--${i}-${o}`,_=`${i}-${o}--${s}-${a}`;tR("source",l,_,e,s,a),tR("target",l,u,e,i,o),n.set(r.id,r)}}function gH(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:gH(t,n):!1}function nR(e,n,t){var s;let r=e;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,n))return!0;if(r===t)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function KNt(e,n,t,r){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!gH(a,e))&&(a.draggable||n&&typeof a.draggable>"u")){const o=e.get(i);o&&s.set(i,{id:i,position:o.position||{x:0,y:0},distance:{x:t.x-o.internals.positionAbsolute.x,y:t.y-o.internals.positionAbsolute.y},extent:o.extent,parentId:o.parentId,origin:o.origin,expandParent:o.expandParent,internals:{positionAbsolute:o.internals.positionAbsolute||{x:0,y:0}},measured:{width:o.measured.width??0,height:o.measured.height??0}})}return s}function Ow({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,l;const s=[];for(const[u,_]of n){const f=(a=t.get(u))==null?void 0:a.internals.userNode;f&&s.push({...f,position:_.position,dragging:r})}if(!e)return[s[0],s];const i=(o=t.get(e))==null?void 0:o.internals.userNode;return[i?{...i,position:((l=n.get(e))==null?void 0:l.position)||i.position,dragging:r}:s[0],s]}function QNt({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const i={x:t-s.distance.x,y:r-s.distance.y},a=cm(i,n);return{x:a.x-i.x,y:a.y-i.y}}function YNt({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let i={x:null,y:null},a=0,o=new Map,l=!1,u={x:0,y:0},_=null,f=!1,p=null,m=!1,x=!1,S=null;function b({noDragClassName:y,handleSelector:w,domNode:C,isSelectable:N,nodeId:E,nodeClickDistance:j=0}){p=Pi(C);function z({x:F,y:U}){const{nodeLookup:H,nodeExtent:Y,snapGrid:V,snapToGrid:X,nodeOrigin:ie,onNodeDrag:I,onSelectionDrag:L,onError:$,updateNodePositions:q}=n();i={x:F,y:U};let G=!1;const te=o.size>1,fe=te&&Y?l5(lm(o)):null,oe=te&&X?QNt({dragItems:o,snapGrid:V,x:F,y:U}):null;for(const[ne,Q]of o){if(!H.has(ne))continue;let ce={x:F-Q.distance.x,y:U-Q.distance.y};X&&(ce=oe?{x:Math.round(ce.x+oe.x),y:Math.round(ce.y+oe.y)}:cm(ce,V));let ee=null;if(te&&Y&&!Q.extent&&fe){const{positionAbsolute:xe}=Q.internals,Te=xe.x-fe.x+Y[0][0],Ze=xe.x+Q.measured.width-fe.x2+Y[1][0],Ue=xe.y-fe.y+Y[0][1],Ie=xe.y+Q.measured.height-fe.y2+Y[1][1];ee=[[Te,Ue],[Ze,Ie]]}const{position:le,positionAbsolute:he}=eH({nodeId:ne,nextPosition:ce,nodeLookup:H,nodeExtent:ee||Y,nodeOrigin:ie,onError:$});G=G||Q.position.x!==le.x||Q.position.y!==le.y,Q.position=le,Q.internals.positionAbsolute=he}if(x=x||G,!!G&&(q(o,!0),S&&(r||I||!E&&L))){const[ne,Q]=Ow({nodeId:E,dragItems:o,nodeLookup:H});r==null||r(S,o,ne,Q),I==null||I(S,ne,Q),E||L==null||L(S,Q)}}async function M(){if(!_)return;const{transform:F,panBy:U,autoPanSpeed:H,autoPanOnNodeDrag:Y}=n();if(!Y){l=!1,cancelAnimationFrame(a);return}const[V,X]=yk(u,_,H);(V!==0||X!==0)&&(i.x=(i.x??0)-V/F[2],i.y=(i.y??0)-X/F[2],await U({x:V,y:X})&&z(i)),a=requestAnimationFrame(M)}function O(F){var te;const{nodeLookup:U,multiSelectionActive:H,nodesDraggable:Y,transform:V,snapGrid:X,snapToGrid:ie,selectNodesOnDrag:I,onNodeDragStart:L,onSelectionDragStart:$,unselectNodesAndEdges:q}=n();f=!0,(!I||!N)&&!H&&E&&((te=U.get(E))!=null&&te.selected||q()),N&&I&&E&&(e==null||e(E));const G=$0(F.sourceEvent,{transform:V,snapGrid:X,snapToGrid:ie,containerBounds:_});if(i=G,o=KNt(U,Y,G,E),o.size>0&&(t||L||!E&&$)){const[fe,oe]=Ow({nodeId:E,dragItems:o,nodeLookup:U});t==null||t(F.sourceEvent,o,fe,oe),L==null||L(F.sourceEvent,fe,oe),E||$==null||$(F.sourceEvent,oe)}}const B=MF().clickDistance(j).on("start",F=>{const{domNode:U,nodeDragThreshold:H,transform:Y,snapGrid:V,snapToGrid:X}=n();_=(U==null?void 0:U.getBoundingClientRect())||null,m=!1,x=!1,S=F.sourceEvent,H===0&&O(F),i=$0(F.sourceEvent,{transform:Y,snapGrid:V,snapToGrid:X,containerBounds:_}),u=Ka(F.sourceEvent,_)}).on("drag",F=>{const{autoPanOnNodeDrag:U,transform:H,snapGrid:Y,snapToGrid:V,nodeDragThreshold:X,nodeLookup:ie}=n(),I=$0(F.sourceEvent,{transform:H,snapGrid:Y,snapToGrid:V,containerBounds:_});if(S=F.sourceEvent,(F.sourceEvent.type==="touchmove"&&F.sourceEvent.touches.length>1||E&&!ie.has(E))&&(m=!0),!m){if(!l&&U&&f&&(l=!0,M()),!f){const L=Ka(F.sourceEvent,_),$=L.x-u.x,q=L.y-u.y;Math.sqrt($*$+q*q)>X&&O(F)}(i.x!==I.xSnapped||i.y!==I.ySnapped)&&o&&f&&(u=Ka(F.sourceEvent,_),z(I))}}).on("end",F=>{if(!f||m){m&&o.size>0&&n().updateNodePositions(o,!1);return}if(l=!1,f=!1,cancelAnimationFrame(a),o.size>0){const{nodeLookup:U,updateNodePositions:H,onNodeDragStop:Y,onSelectionDragStop:V}=n();if(x&&(H(o,!1),x=!1),s||Y||!E&&V){const[X,ie]=Ow({nodeId:E,dragItems:o,nodeLookup:U,dragging:!1});s==null||s(F.sourceEvent,o,X,ie),Y==null||Y(F.sourceEvent,X,ie),E||V==null||V(F.sourceEvent,ie)}}}).filter(F=>{const U=F.target;return!F.button&&(!y||!nR(U,`.${y}`,C))&&(!w||nR(U,w,C))});p.call(B)}function v(){p==null||p.on(".drag",null)}return{update:b,destroy:v}}function XNt(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const i of n.values())Lv(s,yp(i))>0&&r.push(i);return r}const ZNt=250;function JNt(e,n,t,r){var o,l;let s=[],i=1/0;const a=XNt(e,t,n+ZNt);for(const u of a){const _=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((l=u.internals.handleBounds)==null?void 0:l.target)??[]];for(const f of _){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:p,y:m}=qf(u,f,f.position,!0),x=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));x>n||(x1){const u=r.type==="source"?"target":"source";return s.find(_=>_.type===u)??s[0]}return s[0]}function vH(e,n,t,r,s,i=!1){var u,_,f;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((_=a.internals.handleBounds)==null?void 0:_.source)??[],...((f=a.internals.handleBounds)==null?void 0:f.target)??[]],l=(t?o==null?void 0:o.find(p=>p.id===t):o==null?void 0:o[0])??null;return l&&i?{...l,...qf(a,l,l.position,!0)}:l}function bH(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function ezt(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const yH=()=>!0;function tzt(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:l,lib:u,autoPanOnConnect:_,flowId:f,panBy:p,cancelConnection:m,onConnectStart:x,onConnect:S,onConnectEnd:b,isValidConnection:v=yH,onReconnectEnd:y,updateConnection:w,getTransform:C,getFromHandle:N,autoPanSpeed:E,dragThreshold:j=1,handleDomNode:z}){const M=oH(e.target);let O=0,B;const{x:F,y:U}=Ka(e),H=bH(i,z),Y=o==null?void 0:o.getBoundingClientRect();let V=!1;if(!Y||!H)return;const X=vH(s,H,r,l,n);if(!X)return;let ie=Ka(e,Y),I=!1,L=null,$=!1,q=null;function G(){if(!_||!Y)return;const[le,he]=yk(ie,Y,E);p({x:le,y:he}),O=requestAnimationFrame(G)}const te={...X,nodeId:s,type:H,position:X.position},fe=l.get(s);let ne={inProgress:!0,isValid:null,from:qf(fe,te,Ct.Left,!0),fromHandle:te,fromPosition:te.position,fromNode:fe,to:ie,toHandle:null,toPosition:UA[te.position],toNode:null,pointer:ie};function Q(){V=!0,w(ne),x==null||x(e,{nodeId:s,handleId:r,handleType:H})}j===0&&Q();function ce(le){if(!V){const{x:Ie,y:vt}=Ka(le),bt=Ie-F,It=vt-U;if(!(bt*bt+It*It>j*j))return;Q()}if(!N()||!te){ee(le);return}const he=C();ie=Ka(le,Y),B=JNt(um(ie,he,!1,[1,1]),t,l,te),I||(G(),I=!0);const xe=xH(le,{handle:B,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:v,doc:M,lib:u,flowId:f,nodeLookup:l});q=xe.handleDomNode,L=xe.connection,$=ezt(!!B,xe.isValid);const Te=l.get(s),Ze=Te?qf(Te,te,Ct.Left,!0):ne.from,Ue={...ne,from:Ze,isValid:$,to:xe.toHandle&&$?Zh({x:xe.toHandle.x,y:xe.toHandle.y},he):ie,toHandle:xe.toHandle,toPosition:$&&xe.toHandle?xe.toHandle.position:UA[te.position],toNode:xe.toHandle?l.get(xe.toHandle.nodeId):null,pointer:ie};w(Ue),ne=Ue}function ee(le){if(!("touches"in le&&le.touches.length>0)){if(V){(B||q)&&L&&$&&(S==null||S(L));const{inProgress:he,...xe}=ne,Te={...xe,toPosition:ne.toHandle?ne.toPosition:null};b==null||b(le,Te),i&&(y==null||y(le,Te))}m(),cancelAnimationFrame(O),I=!1,$=!1,L=null,q=null,M.removeEventListener("mousemove",ce),M.removeEventListener("mouseup",ee),M.removeEventListener("touchmove",ce),M.removeEventListener("touchend",ee)}}M.addEventListener("mousemove",ce),M.addEventListener("mouseup",ee),M.addEventListener("touchmove",ce),M.addEventListener("touchend",ee)}function xH(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:l,isValidConnection:u=yH,nodeLookup:_}){const f=i==="target",p=n?a.querySelector(`.${o}-flow__handle[data-id="${l}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:m,y:x}=Ka(e),S=a.elementFromPoint(m,x),b=S!=null&&S.classList.contains(`${o}-flow__handle`)?S:p,v={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const y=bH(void 0,b),w=b.getAttribute("data-nodeid"),C=b.getAttribute("data-handleid"),N=b.classList.contains("connectable"),E=b.classList.contains("connectableend");if(!w||!y)return v;const j={source:f?w:r,sourceHandle:f?C:s,target:f?r:w,targetHandle:f?s:C};v.connection=j;const M=N&&E&&(t===Yh.Strict?f&&y==="source"||!f&&y==="target":w!==r||C!==s);v.isValid=M&&u(j),v.toHandle=vH(w,y,C,_,t,!0)}return v}const d5={onPointerDown:tzt,isValid:xH};function nzt({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=Pi(e);function i({translateExtent:o,width:l,height:u,zoomStep:_=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const x=w=>{if(w.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=w.sourceEvent.ctrlKey&&xp()?10:1,E=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*_,j=C[2]*Math.pow(2,E*N);n.scaleTo(j)};let S=[0,0];const b=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(S=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},v=w=>{const C=t();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!n)return;const N=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],E=[N[0]-S[0],N[1]-S[1]];S=N;const j=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),z={x:C[0]-E[0]*j,y:C[1]-E[1]*j},M=[[0,0],[l,u]];n.setViewportConstrained({x:z.x,y:z.y,zoom:C[2]},M,o)},y=KF().on("start",b).on("zoom",f?v:null).on("zoom.wheel",p?x:null);s.call(y,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:Fa}}const ey=e=>({x:e.x,y:e.y,zoom:e.k}),Iw=({x:e,y:n,zoom:t})=>Xb.translate(e,n).scale(t),nh=(e,n)=>e.target.closest(`.${n}`),wH=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),rzt=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Bw=(e,n=0,t=rzt,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},SH=e=>{const n=e.ctrlKey&&xp()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function szt({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:l,onPanZoomEnd:u}){return _=>{if(nh(_,n))return _.ctrlKey&&_.preventDefault(),!1;_.preventDefault(),_.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(_.ctrlKey&&a){const b=Fa(_),v=SH(_),y=f*Math.pow(2,v);r.scaleTo(t,y,b,_);return}const p=_.deltaMode===1?20:1;let m=s===jf.Vertical?0:_.deltaX*p,x=s===jf.Horizontal?0:_.deltaY*p;!xp()&&_.shiftKey&&s!==jf.Vertical&&(m=_.deltaY*p,x=0),r.translateBy(t,-(m/f)*i,-(x/f)*i,{internal:!0});const S=ey(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l==null||l(_,S),e.panScrollTimeout=setTimeout(()=>{u==null||u(_,S),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(_,S))}}function izt({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=nh(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function azt({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=ey(r.transform);e.mouseButton=((a=r.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((o=r.sourceEvent)==null?void 0:o.type)==="mousedown"&&n(!0),t&&(t==null||t(r.sourceEvent,s))}}function ozt({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var a,o;e.usedRightMouseButton=!!(t&&wH(n,e.mouseButton??0)),(a=i.sourceEvent)!=null&&a.sync||r([i.transform.x,i.transform.y,i.transform.k]),s&&!((o=i.sourceEvent)!=null&&o.internal)&&(s==null||s(i.sourceEvent,ey(i.transform)))}}function lzt({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:i}){return a=>{var o;if(!((o=a.sourceEvent)!=null&&o.internal)&&(e.isZoomingOrPanning=!1,i&&wH(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const l=ey(a.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,l)},t?150:0)}}}function czt({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:l,lib:u,connectionInProgress:_}){return f=>{var b;const p=e||n,m=t&&f.ctrlKey,x=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(nh(f,`${u}-flow__node`)||nh(f,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||_&&!x||nh(f,o)&&x||nh(f,l)&&(!x||s&&x&&!e)||!t&&f.ctrlKey&&x)return!1;if(!t&&f.type==="touchstart"&&((b=f.touches)==null?void 0:b.length)>1)return f.preventDefault(),!1;if(!p&&!s&&!m&&x||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const S=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||x)&&S}}function uzt({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:o,onDraggingChange:l}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},_=e.getBoundingClientRect(),f=KF().scaleExtent([n,t]).translateExtent(r),p=Pi(e).call(f);y({x:s.x,y:s.y,zoom:Xh(s.zoom,n,t)},[[0,0],[_.width,_.height]],r);const m=p.on("wheel.zoom"),x=p.on("dblclick.zoom");f.wheelDelta(SH);async function S(B,F){return p?new Promise(U=>{f==null||f.interpolate((F==null?void 0:F.interpolate)==="linear"?B0:N1).transform(Bw(p,F==null?void 0:F.duration,F==null?void 0:F.ease,()=>U(!0)),B)}):!1}function b({noWheelClassName:B,noPanClassName:F,onPaneContextMenu:U,userSelectionActive:H,panOnScroll:Y,panOnDrag:V,panOnScrollMode:X,panOnScrollSpeed:ie,preventScrolling:I,zoomOnPinch:L,zoomOnScroll:$,zoomOnDoubleClick:q,zoomActivationKeyPressed:G,lib:te,onTransformChange:fe,connectionInProgress:oe,paneClickDistance:ne,selectionOnDrag:Q}){H&&!u.isZoomingOrPanning&&v();const ce=Y&&!G&&!H;f.clickDistance(Q?1/0:!Va(ne)||ne<0?0:ne);const ee=ce?szt({zoomPanValues:u,noWheelClassName:B,d3Selection:p,d3Zoom:f,panOnScrollMode:X,panOnScrollSpeed:ie,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):izt({noWheelClassName:B,preventScrolling:I,d3ZoomHandler:m});p.on("wheel.zoom",ee,{passive:!1});const le=azt({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:a});f.on("start",le);const he=ozt({zoomPanValues:u,panOnDrag:V,onPaneContextMenu:!!U,onPanZoom:i,onTransformChange:fe});f.on("zoom",he);const xe=lzt({zoomPanValues:u,panOnDrag:V,panOnScroll:Y,onPaneContextMenu:U,onPanZoomEnd:o,onDraggingChange:l});f.on("end",xe);const Te=czt({zoomActivationKeyPressed:G,panOnDrag:V,zoomOnScroll:$,panOnScroll:Y,zoomOnDoubleClick:q,zoomOnPinch:L,userSelectionActive:H,noPanClassName:F,noWheelClassName:B,lib:te,connectionInProgress:oe});f.filter(Te),q?p.on("dblclick.zoom",x):p.on("dblclick.zoom",null)}function v(){f.on("zoom",null)}async function y(B,F,U){const H=Iw(B),Y=f==null?void 0:f.constrain()(H,F,U);return Y&&await S(Y),Y}async function w(B,F){const U=Iw(B);return await S(U,F),U}function C(B){if(p){const F=Iw(B),U=p.property("__zoom");(U.k!==B.zoom||U.x!==B.x||U.y!==B.y)&&(f==null||f.transform(p,F,null,{sync:!0}))}}function N(){const B=p?VF(p.node()):{x:0,y:0,k:1};return{x:B.x,y:B.y,zoom:B.k}}async function E(B,F){return p?new Promise(U=>{f==null||f.interpolate((F==null?void 0:F.interpolate)==="linear"?B0:N1).scaleTo(Bw(p,F==null?void 0:F.duration,F==null?void 0:F.ease,()=>U(!0)),B)}):!1}async function j(B,F){return p?new Promise(U=>{f==null||f.interpolate((F==null?void 0:F.interpolate)==="linear"?B0:N1).scaleBy(Bw(p,F==null?void 0:F.duration,F==null?void 0:F.ease,()=>U(!0)),B)}):!1}function z(B){f==null||f.scaleExtent(B)}function M(B){f==null||f.translateExtent(B)}function O(B){const F=!Va(B)||B<0?0:B;f==null||f.clickDistance(F)}return{update:b,destroy:v,setViewport:w,setViewportConstrained:y,getViewport:N,scaleTo:E,scaleBy:j,setScaleExtent:z,setTranslateExtent:M,syncViewport:C,setClickDistance:O}}var Jh;(function(e){e.Line="line",e.Handle="handle"})(Jh||(Jh={}));function fzt({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:i}){const a=e-n,o=t-r,l=[a>0?1:a<0?-1:0,o>0?1:o<0?-1:0];return a&&s&&(l[0]=l[0]*-1),o&&i&&(l[1]=l[1]*-1),l}function rR(e){const n=e.includes("right")||e.includes("left"),t=e.includes("bottom")||e.includes("top"),r=e.includes("left"),s=e.includes("top");return{isHorizontal:n,isVertical:t,affectsX:r,affectsY:s}}function $c(e,n){return Math.max(0,n-e)}function Pc(e,n){return Math.max(0,e-n)}function s1(e,n,t){return Math.max(0,n-e,e-t)}function sR(e,n){return e?!n:n}function dzt(e,n,t,r,s,i,a,o){let{affectsX:l,affectsY:u}=n;const{isHorizontal:_,isVertical:f}=n,p=_&&f,{xSnapped:m,ySnapped:x}=t,{minWidth:S,maxWidth:b,minHeight:v,maxHeight:y}=r,{x:w,y:C,width:N,height:E,aspectRatio:j}=e;let z=Math.floor(_?m-e.pointerX:0),M=Math.floor(f?x-e.pointerY:0);const O=N+(l?-z:z),B=E+(u?-M:M),F=-i[0]*N,U=-i[1]*E;let H=s1(O,S,b),Y=s1(B,v,y);if(a){let ie=0,I=0;l&&z<0?ie=$c(w+z+F,a[0][0]):!l&&z>0&&(ie=Pc(w+O+F,a[1][0])),u&&M<0?I=$c(C+M+U,a[0][1]):!u&&M>0&&(I=Pc(C+B+U,a[1][1])),H=Math.max(H,ie),Y=Math.max(Y,I)}if(o){let ie=0,I=0;l&&z>0?ie=Pc(w+z,o[0][0]):!l&&z<0&&(ie=$c(w+O,o[1][0])),u&&M>0?I=Pc(C+M,o[0][1]):!u&&M<0&&(I=$c(C+B,o[1][1])),H=Math.max(H,ie),Y=Math.max(Y,I)}if(s){if(_){const ie=s1(O/j,v,y)*j;if(H=Math.max(H,ie),a){let I=0;!l&&!u||l&&!u&&p?I=Pc(C+U+O/j,a[1][1])*j:I=$c(C+U+(l?z:-z)/j,a[0][1])*j,H=Math.max(H,I)}if(o){let I=0;!l&&!u||l&&!u&&p?I=$c(C+O/j,o[1][1])*j:I=Pc(C+(l?z:-z)/j,o[0][1])*j,H=Math.max(H,I)}}if(f){const ie=s1(B*j,S,b)/j;if(Y=Math.max(Y,ie),a){let I=0;!l&&!u||u&&!l&&p?I=Pc(w+B*j+F,a[1][0])/j:I=$c(w+(u?M:-M)*j+F,a[0][0])/j,Y=Math.max(Y,I)}if(o){let I=0;!l&&!u||u&&!l&&p?I=$c(w+B*j,o[1][0])/j:I=Pc(w+(u?M:-M)*j,o[0][0])/j,Y=Math.max(Y,I)}}}M=M+(M<0?Y:-Y),z=z+(z<0?H:-H),s&&(p?O>B*j?M=(sR(l,u)?-z:z)/j:z=(sR(l,u)?-M:M)*j:_?(M=z/j,u=l):(z=M*j,l=u));const V=l?w+z:w,X=u?C+M:C;return{width:N+(l?-z:z),height:E+(u?-M:M),x:i[0]*z*(l?-1:1)+V,y:i[1]*M*(u?-1:1)+X}}const kH={width:0,height:0,x:0,y:0},hzt={...kH,pointerX:0,pointerY:0,aspectRatio:1};function _zt(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,i=e.measured.width??0,a=e.measured.height??0,o=t[0]*i,l=t[1]*a;return[[r-o,s-l],[r+i-o,s+a-l]]}function pzt({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=Pi(e);let a={controlDirection:rR("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function o({controlPosition:u,boundaries:_,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:x,onResizeEnd:S,shouldResize:b}){let v={...kH},y={...hzt};a={boundaries:_,resizeDirection:p,keepAspectRatio:f,controlDirection:rR(u)};let w,C=null,N=[],E,j,z,M=!1;const O=MF().on("start",B=>{const{nodeLookup:F,transform:U,snapGrid:H,snapToGrid:Y,nodeOrigin:V,paneDomNode:X}=t();if(w=F.get(n),!w)return;C=(X==null?void 0:X.getBoundingClientRect())??null;const{xSnapped:ie,ySnapped:I}=$0(B.sourceEvent,{transform:U,snapGrid:H,snapToGrid:Y,containerBounds:C});v={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},y={...v,pointerX:ie,pointerY:I,aspectRatio:v.width/v.height},E=void 0,j=Hf(w.extent)?w.extent:void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(E=F.get(w.parentId)),E&&w.extent==="parent"&&(j=[[0,0],[E.measured.width,E.measured.height]]),N=[],z=void 0;for(const[L,$]of F)if($.parentId===n&&(N.push({id:L,position:{...$.position},extent:$.extent}),$.extent==="parent"||$.expandParent)){const q=_zt($,w,$.origin??V);z?z=[[Math.min(q[0][0],z[0][0]),Math.min(q[0][1],z[0][1])],[Math.max(q[1][0],z[1][0]),Math.max(q[1][1],z[1][1])]]:z=q}m==null||m(B,{...v})}).on("drag",B=>{const{transform:F,snapGrid:U,snapToGrid:H,nodeOrigin:Y}=t(),V=$0(B.sourceEvent,{transform:F,snapGrid:U,snapToGrid:H,containerBounds:C}),X=[];if(!w)return;const{x:ie,y:I,width:L,height:$}=v,q={},G=w.origin??Y,{width:te,height:fe,x:oe,y:ne}=dzt(y,a.controlDirection,V,a.boundaries,a.keepAspectRatio,G,j,z),Q=te!==L,ce=fe!==$,ee=oe!==ie&&Q,le=ne!==I&&ce;if(!ee&&!le&&!Q&&!ce)return;if((ee||le||G[0]===1||G[1]===1)&&(q.x=ee?oe:v.x,q.y=le?ne:v.y,v.x=q.x,v.y=q.y,N.length>0)){const Ze=oe-ie,Ue=ne-I;for(const Ie of N)Ie.position={x:Ie.position.x-Ze+G[0]*(te-L),y:Ie.position.y-Ue+G[1]*(fe-$)},X.push(Ie)}if((Q||ce)&&(q.width=Q&&(!a.resizeDirection||a.resizeDirection==="horizontal")?te:v.width,q.height=ce&&(!a.resizeDirection||a.resizeDirection==="vertical")?fe:v.height,v.width=q.width,v.height=q.height),E&&w.expandParent){const Ze=G[0]*(q.width??0);q.x&&q.x{M&&(S==null||S(B,{...v}),s==null||s({...v}),M=!1)});i.call(O)}function l(){i.on(".drag",null)}return{update:o,destroy:l}}const mzt={},iR=e=>{let n;const t=new Set,r=(_,f)=>{const p=typeof _=="function"?_(n):_;if(!Object.is(p,n)){const m=n;n=f??(typeof p!="object"||p===null)?p:Object.assign({},n,p),t.forEach(x=>x(n,m))}},s=()=>n,l={setState:r,getState:s,getInitialState:()=>u,subscribe:_=>(t.add(_),()=>t.delete(_)),destroy:()=>{(mzt?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),t.clear()}},u=n=e(r,s,l);return l},gzt=e=>e?iR(e):iR,{useDebugValue:vzt}=Je,{useSyncExternalStoreWithSelector:bzt}=PW,yzt=e=>e;function CH(e,n=yzt,t){const r=bzt(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return vzt(r),r}const aR=(e,n)=>{const t=gzt(e),r=(s,i=n)=>CH(t,s,i);return Object.assign(r,t),r},xzt=(e,n)=>e?aR(e,n):aR;function Sr(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[r,s]of e)if(!Object.is(s,n.get(r)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}const t=Object.keys(e);if(t.length!==Object.keys(n).length)return!1;for(const r of t)if(!Object.prototype.hasOwnProperty.call(n,r)||!Object.is(e[r],n[r]))return!1;return!0}const ty=R.createContext(null),wzt=ty.Provider,EH=Xa.error001("react");function Tn(e,n){const t=R.useContext(ty);if(t===null)throw new Error(EH);return CH(t,e,n)}function Cr(){const e=R.useContext(ty);if(e===null)throw new Error(EH);return R.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const oR={display:"none"},Szt={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},NH="react-flow__node-desc",zH="react-flow__edge-desc",kzt="react-flow__aria-live",Czt=e=>e.ariaLiveMessage,Ezt=e=>e.ariaLabelConfig;function Nzt({rfId:e}){const n=Tn(Czt);return h.jsx("div",{id:`${kzt}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Szt,children:n})}function zzt({rfId:e,disableKeyboardA11y:n}){const t=Tn(Ezt);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:`${NH}-${e}`,style:oR,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),h.jsx("div",{id:`${zH}-${e}`,style:oR,children:t["edge.a11yDescription.default"]}),!n&&h.jsx(Nzt,{rfId:e})]})}const ny=R.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return h.jsx("div",{className:as(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});ny.displayName="Panel";const lR="https://reactflow.dev?utm_source=attribution";function Tzt({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:h.jsx(ny,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${lR}`,children:h.jsx("a",{href:lR,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const jzt=e=>{const n=[],t=[];for(const[,r]of e.nodeLookup)r.selected&&n.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&t.push(r);return{selectedNodes:n,selectedEdges:t}},i1=e=>e.id;function Azt(e,n){return Sr(e.selectedNodes.map(i1),n.selectedNodes.map(i1))&&Sr(e.selectedEdges.map(i1),n.selectedEdges.map(i1))}function Rzt({onSelectionChange:e}){const n=Cr(),{selectedNodes:t,selectedEdges:r}=Tn(jzt,Azt);return R.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(i=>i(s))},[t,r,e]),null}const Mzt=e=>!!e.onSelectionChangeHandlers;function Dzt({onSelectionChange:e}){const n=Tn(Mzt);return e||n?h.jsx(Rzt,{onSelectionChange:e}):null}const TH=[0,0],Lzt={x:0,y:0,zoom:1},Ozt=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],cR=[...Ozt,"rfId"],Izt=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),uR={translateExtent:vp,nodeOrigin:TH,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Bzt(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:l}=Tn(Izt,Sr),u=Cr();R.useEffect(()=>(l(e.defaultNodes,e.defaultEdges),()=>{_.current=uR,o()}),[]);const _=R.useRef(uR);return R.useEffect(()=>{for(const f of cR){const p=e[f],m=_.current[f];p!==m&&(typeof e[f]>"u"||(f==="nodes"?n(p):f==="edges"?t(p):f==="minZoom"?r(p):f==="maxZoom"?s(p):f==="translateExtent"?i(p):f==="nodeExtent"?a(p):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:zNt(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}_.current=e},cR.map(f=>e[f])),null}function fR(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function $zt(e){var r;const[n,t]=R.useState(e==="system"?null:e);return R.useEffect(()=>{if(e!=="system"){t(e);return}const s=fR(),i=()=>t(s!=null&&s.matches?"dark":"light");return i(),s==null||s.addEventListener("change",i),()=>{s==null||s.removeEventListener("change",i)}},[e]),n!==null?n:(r=fR())!=null&&r.matches?"dark":"light"}const dR=typeof document<"u"?document:null;function wp(e=null,n={target:dR,actInsideInputWithModifier:!0}){const[t,r]=R.useState(!1),s=R.useRef(!1),i=R.useRef(new Set([])),[a,o]=R.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` +`).replace(` + +`,` ++`).split(` +`)),_=u.reduce((f,p)=>f.concat(...p),[]);return[u,_]}return[[],[]]},[e]);return R.useEffect(()=>{const l=(n==null?void 0:n.target)??dR,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const _=m=>{var b,v;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&lH(m))return!1;const S=_R(m.code,o);if(i.current.add(m[S]),hR(a,i.current,!1)){const y=((v=(b=m.composedPath)==null?void 0:b.call(m))==null?void 0:v[0])||m.target,w=(y==null?void 0:y.nodeName)==="BUTTON"||(y==null?void 0:y.nodeName)==="A";n.preventDefault!==!1&&(s.current||!w)&&m.preventDefault(),r(!0)}},f=m=>{const x=_R(m.code,o);hR(a,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(m[x]),m.key==="Meta"&&i.current.clear(),s.current=!1},p=()=>{i.current.clear(),r(!1)};return l==null||l.addEventListener("keydown",_),l==null||l.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{l==null||l.removeEventListener("keydown",_),l==null||l.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function hR(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function _R(e,n){return n.includes(e)?"code":"key"}const Pzt=()=>{const e=Cr();return R.useMemo(()=>({zoomIn:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1.2,n):!1},zoomOut:async n=>{const{panZoom:t}=e.getState();return t?t.scaleBy(1/1.2,n):!1},zoomTo:async(n,t)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(n,t):!1},getZoom:()=>e.getState().transform[2],setViewport:async(n,t)=>{const{transform:[r,s,i],panZoom:a}=e.getState();return a?(await a.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??i},t),!0):!1},getViewport:()=>{const[n,t,r]=e.getState().transform;return{x:n,y:t,zoom:r}},setCenter:async(n,t,r)=>e.getState().setCenter(n,t,r),fitBounds:async(n,t)=>{const{width:r,height:s,minZoom:i,maxZoom:a,panZoom:o}=e.getState(),l=xk(n,r,s,i,a,(t==null?void 0:t.padding)??.1);return o?(await o.setViewport(l,{duration:t==null?void 0:t.duration,ease:t==null?void 0:t.ease,interpolate:t==null?void 0:t.interpolate}),!0):!1},screenToFlowPosition:(n,t={})=>{const{transform:r,snapGrid:s,snapToGrid:i,domNode:a}=e.getState();if(!a)return n;const{x:o,y:l}=a.getBoundingClientRect(),u={x:n.x-o,y:n.y-l},_=t.snapGrid??s,f=t.snapToGrid??i;return um(u,r,f,_)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=Zh(n,t);return{x:a.x+s,y:a.y+i}}}),[])};function jH(e,n){const t=[],r=new Map,s=[];for(const i of e)if(i.type==="add"){s.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const a=r.get(i.id);a?a.push(i):r.set(i.id,[i])}for(const i of n){const a=r.get(i.id);if(!a){t.push(i);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){t.push({...a[0].item});continue}const o={...i};for(const l of a)Fzt(l,o);t.push(o)}return s.length&&s.forEach(i=>{i.index!==void 0?t.splice(i.index,0,{...i.item}):t.push({...i.item})}),t}function Fzt(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function Hzt(e,n){return jH(e,n)}function qzt(e,n){return jH(e,n)}function rf(e,n){return{id:e,type:"select",selected:n}}function rh(e,n=new Set,t=!1){const r=[];for(const[s,i]of e){const a=n.has(s);!(i.selected===void 0&&!a)&&i.selected!==a&&(t&&(i.selected=a),r.push(rf(i.id,a)))}return r}function pR({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,a]of e.entries()){const o=n.get(a.id),l=((s=o==null?void 0:o.internals)==null?void 0:s.userNode)??o;l!==void 0&&l!==a&&t.push({id:a.id,item:a,type:"replace"}),l===void 0&&t.push({item:a,type:"add",index:i})}for(const[i]of n)r.get(i)===void 0&&t.push({id:i,type:"remove"});return t}function mR(e){return{id:e.id,type:"remove"}}const Uzt=sH();function Gzt(e,n,t={}){return DNt(e,n,{...t,onError:t.onError??Uzt})}const gR=e=>bNt(e),Wzt=e=>JF(e);function AH(e){return R.forwardRef(e)}const Vzt=typeof window<"u"?R.useLayoutEffect:R.useEffect;function vR(e){const[n,t]=R.useState(BigInt(0)),[r]=R.useState(()=>Kzt(()=>t(s=>s+BigInt(1))));return Vzt(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function Kzt(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const RH=R.createContext(null);function Qzt({children:e}){const n=Cr(),t=R.useCallback(o=>{const{nodes:l=[],setNodes:u,hasDefaultNodes:_,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:x}=n.getState();let S=l;for(const v of o)S=typeof v=="function"?v(S):v;let b=pR({items:S,lookup:p});for(const v of x.values())b=v(b);_&&u(S),b.length>0?f==null||f(b):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:y,setNodes:w}=n.getState();v&&w(y)})},[]),r=vR(t),s=R.useCallback(o=>{const{edges:l=[],setEdges:u,hasDefaultEdges:_,onEdgesChange:f,edgeLookup:p}=n.getState();let m=l;for(const x of o)m=typeof x=="function"?x(m):x;_?u(m):f&&f(pR({items:m,lookup:p}))},[]),i=vR(s),a=R.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return h.jsx(RH.Provider,{value:a,children:e})}function Yzt(){const e=R.useContext(RH);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Xzt=e=>!!e.panZoom;function zk(){const e=Pzt(),n=Cr(),t=Yzt(),r=Tn(Xzt),s=R.useMemo(()=>{const i=f=>n.getState().nodeLookup.get(f),a=f=>{t.nodeQueue.push(f)},o=f=>{t.edgeQueue.push(f)},l=f=>{var v,y;const{nodeLookup:p,nodeOrigin:m}=n.getState(),x=gR(f)?f:p.get(f.id),S=x.parentId?aH(x.position,x.measured,x.parentId,p,m):x.position,b={...x,position:S,width:((v=x.measured)==null?void 0:v.width)??x.width,height:((y=x.measured)==null?void 0:y.height)??x.height};return yp(b)},u=(f,p,m={replace:!1})=>{a(x=>x.map(S=>{if(S.id===f){const b=typeof p=="function"?p(S):p;return m.replace&&gR(b)?b:{...S,...b}}return S}))},_=(f,p,m={replace:!1})=>{o(x=>x.map(S=>{if(S.id===f){const b=typeof p=="function"?p(S):p;return m.replace&&Wzt(b)?b:{...S,...b}}return S}))};return{getNodes:()=>n.getState().nodes.map(f=>({...f})),getNode:f=>{var p;return(p=i(f))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:f=[]}=n.getState();return f.map(p=>({...p}))},getEdge:f=>n.getState().edgeLookup.get(f),setNodes:a,setEdges:o,addNodes:f=>{const p=Array.isArray(f)?f:[f];t.nodeQueue.push(m=>[...m,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];t.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:m}=n.getState(),[x,S,b]=m;return{nodes:f.map(v=>({...v})),edges:p.map(v=>({...v})),viewport:{x,y:S,zoom:b}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:x,onNodesDelete:S,onEdgesDelete:b,triggerNodeChanges:v,triggerEdgeChanges:y,onDelete:w,onBeforeDelete:C}=n.getState(),{nodes:N,edges:E}=await kNt({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:x,onBeforeDelete:C}),j=E.length>0,z=N.length>0;if(j){const M=E.map(mR);b==null||b(E),y(M)}if(z){const M=N.map(mR);S==null||S(N),v(M)}return(z||j)&&(w==null||w({nodes:N,edges:E})),{deletedNodes:N,deletedEdges:E}},getIntersectingNodes:(f,p=!0,m)=>{const x=WA(f),S=x?f:l(f),b=m!==void 0;return S?(m||n.getState().nodes).filter(v=>{const y=n.getState().nodeLookup.get(v.id);if(y&&!x&&(v.id===f.id||!y.internals.positionAbsolute))return!1;const w=yp(b?v:y),C=Lv(w,S);return p&&C>0||C>=w.width*w.height||C>=S.width*S.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const S=WA(f)?f:l(f);if(!S)return!1;const b=Lv(S,p);return m&&b>0||b>=p.width*p.height||b>=S.width*S.height},updateNode:u,updateNodeData:(f,p,m={replace:!1})=>{u(f,x=>{const S=typeof p=="function"?p(x):p;return m.replace?{...x,data:S}:{...x,data:{...x.data,...S}}},m)},updateEdge:_,updateEdgeData:(f,p,m={replace:!1})=>{_(f,x=>{const S=typeof p=="function"?p(x):p;return m.replace?{...x,data:S}:{...x,data:{...x.data,...S}}},m)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:m}=n.getState();return yNt(f,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:f,id:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}-${f}${p?`-${p}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:f,handleId:p,nodeId:m})=>{var x;return Array.from(((x=n.getState().connectionLookup.get(`${m}${f?p?`-${f}-${p}`:`-${f}`:""}`))==null?void 0:x.values())??[])},fitView:async f=>{const p=n.getState().fitViewResolver??NNt();return n.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),t.nodeQueue.push(m=>[...m]),p.promise}}},[]);return R.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const bR=e=>e.selected,Zzt=typeof window<"u"?window:void 0;function Jzt({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Cr(),{deleteElements:r}=zk(),s=wp(e,{actInsideInputWithModifier:!1}),i=wp(n,{target:Zzt});R.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(bR),edges:a.filter(bR)}),t.setState({nodesSelectionActive:!1})}},[s]),R.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function eTt(e){const n=Cr();R.useEffect(()=>{const t=()=>{var s,i,a,o;if(!e.current||!(((i=(s=e.current).checkVisibility)==null?void 0:i.call(s))??!0))return!1;const r=wk(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",Xa.error004())),n.setState({width:r.width||500,height:r.height||500})};if(e.current){t(),window.addEventListener("resize",t);const r=new ResizeObserver(()=>t());return r.observe(e.current),()=>{window.removeEventListener("resize",t),r&&e.current&&r.unobserve(e.current)}}},[])}const ry={position:"absolute",width:"100%",height:"100%",top:0,left:0},tTt=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function nTt({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=jf.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:l,translateExtent:u,minZoom:_,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:x,noWheelClassName:S,noPanClassName:b,onViewportChange:v,isControlledViewport:y,paneClickDistance:w,selectionOnDrag:C}){const N=Cr(),E=R.useRef(null),{userSelectionActive:j,lib:z,connectionInProgress:M}=Tn(tTt,Sr),O=wp(p),B=R.useRef();eTt(E);const F=R.useCallback(U=>{v==null||v({x:U[0],y:U[1],zoom:U[2]}),y||N.setState({transform:U})},[v,y]);return R.useEffect(()=>{if(E.current){B.current=uzt({domNode:E.current,minZoom:_,maxZoom:f,translateExtent:u,viewport:l,onDraggingChange:V=>N.setState(X=>X.paneDragging===V?X:{paneDragging:V}),onPanZoomStart:(V,X)=>{const{onViewportChangeStart:ie,onMoveStart:I}=N.getState();I==null||I(V,X),ie==null||ie(X)},onPanZoom:(V,X)=>{const{onViewportChange:ie,onMove:I}=N.getState();I==null||I(V,X),ie==null||ie(X)},onPanZoomEnd:(V,X)=>{const{onViewportChangeEnd:ie,onMoveEnd:I}=N.getState();I==null||I(V,X),ie==null||ie(X)}});const{x:U,y:H,zoom:Y}=B.current.getViewport();return N.setState({panZoom:B.current,transform:[U,H,Y],domNode:E.current.closest(".react-flow")}),()=>{var V;(V=B.current)==null||V.destroy()}}},[]),R.useEffect(()=>{var U;(U=B.current)==null||U.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:i,zoomOnDoubleClick:a,panOnDrag:o,zoomActivationKeyPressed:O,preventScrolling:m,noPanClassName:b,userSelectionActive:j,noWheelClassName:S,lib:z,onTransformChange:F,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:w})},[e,n,t,r,s,i,a,o,O,m,b,j,S,z,F,M,C,w]),h.jsx("div",{className:"react-flow__renderer",ref:E,style:ry,children:x})}const rTt=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function sTt(){const{userSelectionActive:e,userSelectionRect:n}=Tn(rTt,Sr);return e&&n?h.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const $w=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},iTt=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function aTt({isSelecting:e,selectionKeyPressed:n,selectionMode:t=bp.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:l,onPaneClick:u,onPaneContextMenu:_,onPaneScroll:f,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:x,children:S}){const b=R.useRef(0),v=Cr(),{userSelectionActive:y,elementsSelectable:w,dragging:C,panBy:N,autoPanSpeed:E}=Tn(iTt,Sr),j=w&&(e||y),z=R.useRef(null),M=R.useRef(),O=R.useRef(new Set),B=R.useRef(new Set),F=R.useRef(!1),U=R.useRef(!1),H=R.useRef({x:0,y:0}),Y=R.useRef(!1),V=Q=>{if(U.current||F.current||v.getState().connection.inProgress){U.current=!1,F.current=!1;return}u==null||u(Q),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},X=Q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){Q.preventDefault();return}_==null||_(Q)},ie=f?Q=>f(Q):void 0,I=Q=>{U.current&&(Q.stopPropagation(),U.current=!1)},L=Q=>{var Ie,vt;const{domNode:ce,transform:ee}=v.getState();if(M.current=ce==null?void 0:ce.getBoundingClientRect(),!M.current)return;const le=Q.target===z.current;if(!le&&!!Q.target.closest(".nokey")||!e||!(a&&le||n)||Q.button!==0||!Q.isPrimary)return;(vt=(Ie=Q.target)==null?void 0:Ie.setPointerCapture)==null||vt.call(Ie,Q.pointerId),U.current=!1;const{x:Te,y:Ze}=Ka(Q.nativeEvent,M.current),Ue=um({x:Te,y:Ze},ee);v.setState({userSelectionRect:{width:0,height:0,startX:Ue.x,startY:Ue.y,x:Te,y:Ze}}),le||(Q.stopPropagation(),Q.preventDefault())};function $(Q,ce){const{userSelectionRect:ee}=v.getState();if(!ee)return;const{transform:le,nodeLookup:he,edgeLookup:xe,connectionLookup:Te,triggerNodeChanges:Ze,triggerEdgeChanges:Ue,defaultEdgeOptions:Ie}=v.getState(),vt={x:ee.startX,y:ee.startY},{x:bt,y:It}=Zh(vt,le),Bt={startX:vt.x,startY:vt.y,x:QLt.id)),B.current=new Set;const ft=(Ie==null?void 0:Ie.selectable)??!0;for(const Lt of O.current){const we=Te.get(Lt);if(we)for(const{edgeId:Ae}of we.values()){const Xe=xe.get(Ae);Xe&&(Xe.selectable??ft)&&B.current.add(Ae)}}if(!VA(Et,O.current)){const Lt=rh(he,O.current,!0);Ze(Lt)}if(!VA(rt,B.current)){const Lt=rh(xe,B.current);Ue(Lt)}v.setState({userSelectionRect:Bt,userSelectionActive:!0,nodesSelectionActive:!1})}function q(){if(!s||!M.current)return;const[Q,ce]=yk(H.current,M.current,E);N({x:Q,y:ce}).then(ee=>{if(!U.current||!ee){b.current=requestAnimationFrame(q);return}const{x:le,y:he}=H.current;$(le,he),b.current=requestAnimationFrame(q)})}const G=()=>{cancelAnimationFrame(b.current),b.current=0,Y.current=!1};R.useEffect(()=>()=>G(),[]);const te=Q=>{const{userSelectionRect:ce,transform:ee,resetSelectedElements:le}=v.getState();if(!M.current||!ce)return;const{x:he,y:xe}=Ka(Q.nativeEvent,M.current);H.current={x:he,y:xe};const Te=Zh({x:ce.startX,y:ce.startY},ee);if(!U.current){const Ze=n?0:i;if(Math.hypot(he-Te.x,xe-Te.y)<=Ze)return;le(),o==null||o(Q)}U.current=!0,Y.current||(q(),Y.current=!0),$(he,xe)},fe=Q=>{var ce,ee;if(!j){Q.target===z.current&&v.getState().connection.inProgress&&(F.current=!0);return}Q.button===0&&((ee=(ce=Q.target)==null?void 0:ce.releasePointerCapture)==null||ee.call(ce,Q.pointerId),!y&&Q.target===z.current&&v.getState().userSelectionRect&&(V==null||V(Q)),v.setState({userSelectionActive:!1,userSelectionRect:null}),U.current&&(l==null||l(Q),v.setState({nodesSelectionActive:O.current.size>0})),G())},oe=Q=>{var ce,ee;(ee=(ce=Q.target)==null?void 0:ce.releasePointerCapture)==null||ee.call(ce,Q.pointerId),G()},ne=r===!0||Array.isArray(r)&&r.includes(0);return h.jsxs("div",{className:as(["react-flow__pane",{draggable:ne,dragging:C,selection:e}]),onClick:j?void 0:$w(V,z),onContextMenu:$w(X,z),onWheel:$w(ie,z),onPointerEnter:j?void 0:p,onPointerMove:j?te:m,onPointerUp:fe,onPointerCancel:j?oe:void 0,onPointerDownCapture:j?L:void 0,onClickCapture:j?I:void 0,onPointerLeave:x,ref:z,style:ry,children:[S,h.jsx(sTt,{})]})}function h5({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:i,multiSelectionActive:a,nodeLookup:o,onError:l}=n.getState(),u=o.get(e);if(!u){l==null||l("012",Xa.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var _;return(_=r==null?void 0:r.current)==null?void 0:_.blur()})):s([e])}function MH({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Cr(),[l,u]=R.useState(!1),_=R.useRef();return R.useEffect(()=>{_.current=YNt({getStoreItems:()=>o.getState(),onNodeMouseDown:f=>{h5({id:f,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),R.useEffect(()=>{if(!(n||!e.current||!_.current))return _.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var f;(f=_.current)==null||f.destroy()}},[t,r,n,i,e,s,a]),l}const oTt=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function DH(){const e=Cr();return R.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:l,nodeLookup:u,nodeOrigin:_}=e.getState(),f=new Map,p=oTt(a),m=s?i[0]:5,x=s?i[1]:5,S=t.direction.x*m*t.factor,b=t.direction.y*x*t.factor;for(const[,v]of u){if(!p(v))continue;let y={x:v.internals.positionAbsolute.x+S,y:v.internals.positionAbsolute.y+b};s&&(y=cm(y,i));const{position:w,positionAbsolute:C}=eH({nodeId:v.id,nextPosition:y,nodeLookup:u,nodeExtent:r,nodeOrigin:_,onError:o});v.position=w,v.internals.positionAbsolute=C,f.set(v.id,v)}l(f)},[])}const Tk=R.createContext(null),lTt=Tk.Provider;Tk.Consumer;const LH=()=>R.useContext(Tk),cTt=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),OH=R.createContext(null);function uTt({children:e}){const n=Tn(cTt,Sr);return h.jsx(OH.Provider,{value:n,children:e})}function fTt(){const e=R.useContext(OH);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const dTt={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},hTt=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:l,isValid:u}=a;if(!o&&!s)return dTt;const _=(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===t;return{connectingFrom:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===n&&(o==null?void 0:o.type)===t,connectingTo:_,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===Yh.Strict?(o==null?void 0:o.type)!==t:e!==(o==null?void 0:o.nodeId)||n!==(o==null?void 0:o.id),connectionInProcess:!!o,clickConnectionInProcess:!!s,valid:_&&u}};function _Tt({type:e="source",position:n=Ct.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:l,className:u,onMouseDown:_,onTouchStart:f,...p},m){var Y,V;const x=a||null,S=e==="target",b=Cr(),v=LH(),{connectOnClick:y,noPanClassName:w,rfId:C}=fTt(),{connectingFrom:N,connectingTo:E,clickConnecting:j,isPossibleEndHandle:z,connectionInProcess:M,clickConnectionInProcess:O,valid:B}=Tn(hTt(v,x,e),Sr);v||(V=(Y=b.getState()).onError)==null||V.call(Y,"010",Xa.error010());const F=X=>{const{defaultEdgeOptions:ie,onConnect:I,hasDefaultEdges:L}=b.getState(),$={...ie,...X};if(L){const{edges:q,setEdges:G,onError:te}=b.getState();G(Gzt($,q,{onError:te}))}I==null||I($),o==null||o($)},U=X=>{if(!v)return;const ie=cH(X.nativeEvent);if(s&&(ie&&X.button===0||!ie)){const I=b.getState();d5.onPointerDown(X.nativeEvent,{handleDomNode:X.currentTarget,autoPanOnConnect:I.autoPanOnConnect,connectionMode:I.connectionMode,connectionRadius:I.connectionRadius,domNode:I.domNode,nodeLookup:I.nodeLookup,lib:I.lib,isTarget:S,handleId:x,nodeId:v,flowId:I.rfId,panBy:I.panBy,cancelConnection:I.cancelConnection,onConnectStart:I.onConnectStart,onConnectEnd:(...L)=>{var $,q;return(q=($=b.getState()).onConnectEnd)==null?void 0:q.call($,...L)},updateConnection:I.updateConnection,onConnect:F,isValidConnection:t||((...L)=>{var $,q;return((q=($=b.getState()).isValidConnection)==null?void 0:q.call($,...L))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:I.autoPanSpeed,dragThreshold:I.connectionDragThreshold})}ie?_==null||_(X):f==null||f(X)},H=X=>{const{onClickConnectStart:ie,onClickConnectEnd:I,connectionClickStartHandle:L,connectionMode:$,isValidConnection:q,lib:G,rfId:te,nodeLookup:fe,connection:oe}=b.getState();if(!v||!L&&!s)return;if(!L){ie==null||ie(X.nativeEvent,{nodeId:v,handleId:x,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:v,type:e,id:x}});return}const ne=oH(X.target),Q=t||q,{connection:ce,isValid:ee}=d5.isValid(X.nativeEvent,{handle:{nodeId:v,id:x,type:e},connectionMode:$,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:Q,flowId:te,doc:ne,lib:G,nodeLookup:fe});ee&&ce&&F(ce);const le=structuredClone(oe);delete le.inProgress,le.toPosition=le.toHandle?le.toHandle.position:null,I==null||I(X,le),b.setState({connectionClickStartHandle:null})};return h.jsx("div",{"data-handleid":x,"data-nodeid":v,"data-handlepos":n,"data-id":`${C}-${v}-${x}-${e}`,className:as(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",w,u,{source:!S,target:S,connectable:r,connectablestart:s,connectableend:i,clickconnecting:j,connectingfrom:N,connectingto:E,valid:B,connectionindicator:r&&(!M||z)&&(M||O?i:s)}]),onMouseDown:U,onTouchStart:U,onClick:y?H:void 0,ref:m,...p,children:l})}const pu=R.memo(AH(_Tt));function pTt({data:e,isConnectable:n,sourcePosition:t=Ct.Bottom}){return h.jsxs(h.Fragment,{children:[e==null?void 0:e.label,h.jsx(pu,{type:"source",position:t,isConnectable:n})]})}function mTt({data:e,isConnectable:n,targetPosition:t=Ct.Top,sourcePosition:r=Ct.Bottom}){return h.jsxs(h.Fragment,{children:[h.jsx(pu,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,h.jsx(pu,{type:"source",position:r,isConnectable:n})]})}function gTt(){return null}function vTt({data:e,isConnectable:n,targetPosition:t=Ct.Top}){return h.jsxs(h.Fragment,{children:[h.jsx(pu,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Ov={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},yR={input:pTt,default:mTt,output:vTt,group:gTt};function bTt(e){var n,t,r,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((n=e.style)==null?void 0:n.width),height:e.height??e.initialHeight??((t=e.style)==null?void 0:t.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const yTt=e=>{const{width:n,height:t,x:r,y:s}=lm(e.nodeLookup,{filter:i=>!!i.selected});return{width:Va(n)?n:null,height:Va(t)?t:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${s}px)`}};function xTt({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Cr(),{width:s,height:i,transformString:a,userSelectionActive:o}=Tn(yTt,Sr),l=DH(),u=R.useRef(null);R.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const _=!o&&s!==null&&i!==null;if(MH({nodeRef:u,disabled:!_}),!_)return null;const f=e?m=>{const x=r.getState().nodes.filter(S=>S.selected);e(m,x)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Ov,m.key)&&(m.preventDefault(),l({direction:Ov[m.key],factor:m.shiftKey?4:1}))};return h.jsx("div",{className:as(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:h.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:t?void 0:-1,onKeyDown:t?void 0:p,style:{width:s,height:i}})})}const xR=typeof window<"u"?window:void 0,wTt=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function IH({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:o,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:_,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:x,panActivationKeyCode:S,zoomActivationKeyCode:b,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:w,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:z,autoPanOnSelection:M,defaultViewport:O,translateExtent:B,minZoom:F,maxZoom:U,preventScrolling:H,onSelectionContextMenu:Y,noWheelClassName:V,noPanClassName:X,disableKeyboardA11y:ie,onViewportChange:I,isControlledViewport:L}){const{nodesSelectionActive:$,userSelectionActive:q}=Tn(wTt,Sr),G=wp(u,{target:xR}),te=wp(S,{target:xR}),fe=te||z,oe=te||C,ne=_&&fe!==!0,Q=G||q||ne;return Jzt({deleteKeyCode:l,multiSelectionKeyCode:x}),h.jsx(nTt,{onPaneContextMenu:i,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:w,panOnScroll:oe,panOnScrollSpeed:N,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:!G&&fe,defaultViewport:O,translateExtent:B,minZoom:F,maxZoom:U,zoomActivationKeyCode:b,preventScrolling:H,noWheelClassName:V,noPanClassName:X,onViewportChange:I,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:ne,children:h.jsxs(aTt,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:fe,autoPanOnSelection:M,isSelecting:!!Q,selectionMode:f,selectionKeyPressed:G,paneClickDistance:o,selectionOnDrag:ne,children:[e,$&&h.jsx(xTt,{onSelectionContextMenu:Y,noPanClassName:X,disableKeyboardA11y:ie})]})})}IH.displayName="FlowRenderer";const STt=R.memo(IH),kTt=e=>n=>e?bk(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(t=>t.id):Array.from(n.nodeLookup.keys());function CTt(e){return Tn(R.useCallback(kTt(e),[e]),Sr)}const ETt=e=>e.updateNodeInternals;function NTt(){const e=Tn(ETt),[n]=R.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const i=s.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:s.target,force:!0})}),e(r)}));return R.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function zTt({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Cr(),i=R.useRef(null),a=R.useRef(null),o=R.useRef(e.sourcePosition),l=R.useRef(e.targetPosition),u=R.useRef(n),_=t&&!!e.internals.handleBounds;return R.useEffect(()=>{i.current&&!e.hidden&&(!_||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[_,e.hidden]),R.useEffect(()=>()=>{a.current&&(r==null||r.unobserve(a.current),a.current=null)},[]),R.useEffect(()=>{if(i.current){const f=u.current!==n,p=o.current!==e.sourcePosition,m=l.current!==e.targetPosition;(f||p||m)&&(u.current=n,o.current=e.sourcePosition,l.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),i}function TTt({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:l,nodesConnectable:u,nodesFocusable:_,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:x,rfId:S,nodeTypes:b,nodeClickDistance:v,onError:y}){const{node:w,internals:C,isParent:N}=Tn(Q=>{const ce=Q.nodeLookup.get(e),ee=Q.parentLookup.has(e);return{node:ce,internals:ce.internals,isParent:ee}},Sr);let E=w.type||"default",j=(b==null?void 0:b[E])||yR[E];j===void 0&&(y==null||y("003",Xa.error003(E)),E="default",j=(b==null?void 0:b.default)||yR.default);const z=!!(w.draggable||o&&typeof w.draggable>"u"),M=!!(w.selectable||l&&typeof w.selectable>"u"),O=!!(w.connectable||u&&typeof w.connectable>"u"),B=!!(w.focusable||_&&typeof w.focusable>"u"),F=Cr(),U=iH(w),H=zTt({node:w,nodeType:E,hasDimensions:U,resizeObserver:f}),Y=MH({nodeRef:H,disabled:w.hidden||!z,noDragClassName:p,handleSelector:w.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:v}),V=DH();if(w.hidden)return null;const X=sc(w),ie=bTt(w),I=M||z||n||t||r||s,L=t?Q=>t(Q,{...C.userNode}):void 0,$=r?Q=>r(Q,{...C.userNode}):void 0,q=s?Q=>s(Q,{...C.userNode}):void 0,G=i?Q=>i(Q,{...C.userNode}):void 0,te=a?Q=>a(Q,{...C.userNode}):void 0,fe=Q=>{const{selectNodesOnDrag:ce,nodeDragThreshold:ee}=F.getState();M&&(!ce||!z||ee>0)&&h5({id:e,store:F,nodeRef:H}),n&&n(Q,{...C.userNode})},oe=Q=>{if(!(lH(Q.nativeEvent)||x)){if(QF.includes(Q.key)&&M){const ce=Q.key==="Escape";h5({id:e,store:F,unselect:ce,nodeRef:H})}else if(z&&w.selected&&Object.prototype.hasOwnProperty.call(Ov,Q.key)){Q.preventDefault();const{ariaLabelConfig:ce}=F.getState();F.setState({ariaLiveMessage:ce["node.a11yDescription.ariaLiveMessage"]({direction:Q.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),V({direction:Ov[Q.key],factor:Q.shiftKey?4:1})}}},ne=()=>{var Te;if(x||!((Te=H.current)!=null&&Te.matches(":focus-visible")))return;const{transform:Q,width:ce,height:ee,autoPanOnNodeFocus:le,setCenter:he}=F.getState();if(!le)return;bk(new Map([[e,w]]),{x:0,y:0,width:ce,height:ee},Q,!0).length>0||he(w.position.x+X.width/2,w.position.y+X.height/2,{zoom:Q[2]})};return h.jsx("div",{className:as(["react-flow__node",`react-flow__node-${E}`,{[m]:z},w.className,{selected:w.selected,selectable:M,parent:N,draggable:z,dragging:Y}]),ref:H,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:I?"all":"none",visibility:U?"visible":"hidden",...w.style,...ie},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:$,onMouseLeave:q,onContextMenu:G,onClick:fe,onDoubleClick:te,onKeyDown:B?oe:void 0,tabIndex:B?0:void 0,onFocus:B?ne:void 0,role:w.ariaRole??(B?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${NH}-${S}`,"aria-label":w.ariaLabel,...w.domAttributes,children:h.jsx(lTt,{value:e,children:h.jsx(j,{id:e,data:w.data,type:E,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:w.selected??!1,selectable:M,draggable:z,deletable:w.deletable??!0,isConnectable:O,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:Y,dragHandle:w.dragHandle,zIndex:C.z,parentId:w.parentId,...X})})})}var jTt=R.memo(TTt);const ATt=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function BH(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=Tn(ATt,Sr),a=CTt(e.onlyRenderVisibleElements),o=NTt();return h.jsx("div",{className:"react-flow__nodes",style:ry,children:a.map(l=>h.jsx(jTt,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:i},l))})}BH.displayName="NodeRenderer";const RTt=R.memo(BH);function MTt(e){return Tn(R.useCallback(t=>{if(!e)return t.edges.map(s=>s.id);const r=[];if(t.width&&t.height)for(const s of t.edges){const i=t.nodeLookup.get(s.source),a=t.nodeLookup.get(s.target);i&&a&&ANt({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Sr)}const DTt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return h.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},LTt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return h.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},wR={[Mv.Arrow]:DTt,[Mv.ArrowClosed]:LTt};function OTt(e){const n=Cr();return R.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(wR,e)?wR[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",Xa.error009(e)),null)},[e])}const ITt=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:i="strokeWidth",strokeWidth:a,orient:o="auto-start-reverse"})=>{const l=OTt(n);return l?h.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:o,refX:"0",refY:"0",children:h.jsx(l,{color:t,strokeWidth:a})}):null},$H=({defaultColor:e,rfId:n})=>{const t=Tn(i=>i.edges),r=Tn(i=>i.defaultEdgeOptions),s=R.useMemo(()=>$Nt(t,{id:n,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[t,r,n,e]);return s.length?h.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:h.jsx("defs",{children:s.map(i=>h.jsx(ITt,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};$H.displayName="MarkerDefinitions";var BTt=R.memo($H);function PH({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:l,className:u,..._}){const[f,p]=R.useState({x:1,y:0,width:0,height:0}),m=as(["react-flow__edge-textwrapper",u]),x=R.useRef(null);return R.useEffect(()=>{if(x.current){const S=x.current.getBBox();p({x:S.x,y:S.y,width:S.width,height:S.height})}},[t]),t?h.jsxs("g",{transform:`translate(${e-f.width/2} ${n-f.height/2})`,className:m,visibility:f.width?"visible":"hidden",..._,children:[s&&h.jsx("rect",{width:f.width+2*a[0],x:-a[0],y:-a[1],height:f.height+2*a[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),h.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:x,style:r,children:t}),l]}):null}PH.displayName="EdgeText";const $Tt=R.memo(PH);function sy({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:l,interactionWidth:u=20,..._}){return h.jsxs(h.Fragment,{children:[h.jsx("path",{..._,d:e,fill:"none",className:as(["react-flow__edge-path",_.className])}),u?h.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&Va(n)&&Va(t)?h.jsx($Tt,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:l}):null]})}function SR({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===Ct.Left||e===Ct.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function FH({sourceX:e,sourceY:n,sourcePosition:t=Ct.Bottom,targetX:r,targetY:s,targetPosition:i=Ct.Top}){const[a,o]=SR({pos:t,x1:e,y1:n,x2:r,y2:s}),[l,u]=SR({pos:i,x1:r,y1:s,x2:e,y2:n}),[_,f,p,m]=uH({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:a,sourceControlY:o,targetControlX:l,targetControlY:u});return[`M${e},${n} C${a},${o} ${l},${u} ${r},${s}`,_,f,p,m]}function HH(e){return R.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:o,label:l,labelStyle:u,labelShowBg:_,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:S,markerStart:b,interactionWidth:v})=>{const[y,w,C]=FH({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return h.jsx(sy,{id:N,path:y,labelX:w,labelY:C,label:l,labelStyle:u,labelShowBg:_,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:S,markerStart:b,interactionWidth:v})})}const PTt=HH({isInternal:!1}),qH=HH({isInternal:!0});PTt.displayName="SimpleBezierEdge";qH.displayName="SimpleBezierEdgeInternal";function UH(e){return R.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:_,labelBgBorderRadius:f,style:p,sourcePosition:m=Ct.Bottom,targetPosition:x=Ct.Top,markerEnd:S,markerStart:b,pathOptions:v,interactionWidth:y})=>{const[w,C,N]=c5({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:x,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),E=e.isInternal?void 0:n;return h.jsx(sy,{id:E,path:w,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:_,labelBgBorderRadius:f,style:p,markerEnd:S,markerStart:b,interactionWidth:y})})}const GH=UH({isInternal:!1}),WH=UH({isInternal:!0});GH.displayName="SmoothStepEdge";WH.displayName="SmoothStepEdgeInternal";function VH(e){return R.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return h.jsx(GH,{...t,id:r,pathOptions:R.useMemo(()=>{var i;return{borderRadius:0,offset:(i=t.pathOptions)==null?void 0:i.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const FTt=VH({isInternal:!1}),KH=VH({isInternal:!0});FTt.displayName="StepEdge";KH.displayName="StepEdgeInternal";function QH(e){return R.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:_,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:x,interactionWidth:S})=>{const[b,v,y]=hH({sourceX:t,sourceY:r,targetX:s,targetY:i}),w=e.isInternal?void 0:n;return h.jsx(sy,{id:w,path:b,labelX:v,labelY:y,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:_,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:x,interactionWidth:S})})}const HTt=QH({isInternal:!1}),YH=QH({isInternal:!0});HTt.displayName="StraightEdge";YH.displayName="StraightEdgeInternal";function XH(e){return R.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=Ct.Bottom,targetPosition:o=Ct.Top,label:l,labelStyle:u,labelShowBg:_,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:S,markerStart:b,pathOptions:v,interactionWidth:y})=>{const[w,C,N]=fH({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:v==null?void 0:v.curvature}),E=e.isInternal?void 0:n;return h.jsx(sy,{id:E,path:w,labelX:C,labelY:N,label:l,labelStyle:u,labelShowBg:_,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:x,markerEnd:S,markerStart:b,interactionWidth:y})})}const qTt=XH({isInternal:!1}),ZH=XH({isInternal:!0});qTt.displayName="BezierEdge";ZH.displayName="BezierEdgeInternal";const kR={default:ZH,straight:YH,step:KH,smoothstep:WH,simplebezier:qH},CR={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},UTt=(e,n,t)=>t===Ct.Left?e-n:t===Ct.Right?e+n:e,GTt=(e,n,t)=>t===Ct.Top?e-n:t===Ct.Bottom?e+n:e,ER="react-flow__edgeupdater";function NR({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:i,onMouseOut:a,type:o}){return h.jsx("circle",{onMouseDown:s,onMouseEnter:i,onMouseOut:a,className:as([ER,`${ER}-${o}`]),cx:UTt(n,r,e),cy:GTt(t,r,e),r,stroke:"transparent",fill:"transparent"})}function WTt({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:l,onReconnect:u,onReconnectStart:_,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const x=Cr(),S=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:E,domNode:j,connectionMode:z,connectionRadius:M,lib:O,onConnectStart:B,cancelConnection:F,nodeLookup:U,rfId:H,panBy:Y,updateConnection:V}=x.getState(),X=N.type==="target",ie=($,q)=>{p(!1),f==null||f($,t,N.type,q)},I=$=>u==null?void 0:u(t,$),L=($,q)=>{p(!0),_==null||_(C,t,N.type),B==null||B($,q)};d5.onPointerDown(C.nativeEvent,{autoPanOnConnect:E,connectionMode:z,connectionRadius:M,domNode:j,handleId:N.id,nodeId:N.nodeId,nodeLookup:U,isTarget:X,edgeUpdaterType:N.type,lib:O,flowId:H,cancelConnection:F,panBy:Y,isValidConnection:(...$)=>{var q,G;return((G=(q=x.getState()).isValidConnection)==null?void 0:G.call(q,...$))??!0},onConnect:I,onConnectStart:L,onConnectEnd:(...$)=>{var q,G;return(G=(q=x.getState()).onConnectEnd)==null?void 0:G.call(q,...$)},onReconnectEnd:ie,updateConnection:V,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},b=C=>S(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),v=C=>S(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),y=()=>m(!0),w=()=>m(!1);return h.jsxs(h.Fragment,{children:[(e===!0||e==="source")&&h.jsx(NR,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:b,onMouseEnter:y,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&h.jsx(NR,{position:l,centerX:i,centerY:a,radius:n,onMouseDown:v,onMouseEnter:y,onMouseOut:w,type:"target"})]})}function VTt({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:l,onMouseLeave:u,reconnectRadius:_,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:x,edgeTypes:S,noPanClassName:b,onError:v,disableKeyboardA11y:y}){let w=Tn(he=>he.edgeLookup.get(e));const C=Tn(he=>he.defaultEdgeOptions);w=C?{...C,...w}:w;let N=w.type||"default",E=(S==null?void 0:S[N])||kR[N];E===void 0&&(v==null||v("011",Xa.error011(N)),N="default",E=(S==null?void 0:S.default)||kR.default);const j=!!(w.focusable||n&&typeof w.focusable>"u"),z=typeof f<"u"&&(w.reconnectable||t&&typeof w.reconnectable>"u"),M=!!(w.selectable||r&&typeof w.selectable>"u"),O=R.useRef(null),[B,F]=R.useState(!1),[U,H]=R.useState(!1),Y=Cr(),{zIndex:V=w.zIndex,sourceX:X,sourceY:ie,targetX:I,targetY:L,sourcePosition:$,targetPosition:q}=Tn(R.useCallback(he=>{const xe=he.nodeLookup.get(w.source),Te=he.nodeLookup.get(w.target);if(!xe||!Te)return CR;const Ze=BNt({id:e,sourceNode:xe,targetNode:Te,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:he.connectionMode,onError:v}),Ue=jNt({selected:w.selected,zIndex:w.zIndex,sourceNode:xe,targetNode:Te,elevateOnSelect:he.elevateEdgesOnSelect,zIndexMode:he.zIndexMode});return{...Ze||CR,zIndex:Ue}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),Sr),G=R.useMemo(()=>w.markerStart?`url('#${u5(w.markerStart,x)}')`:void 0,[w.markerStart,x]),te=R.useMemo(()=>w.markerEnd?`url('#${u5(w.markerEnd,x)}')`:void 0,[w.markerEnd,x]);if(w.hidden||X===null||ie===null||I===null||L===null)return null;const fe=he=>{var Ue;const{addSelectedEdges:xe,unselectNodesAndEdges:Te,multiSelectionActive:Ze}=Y.getState();M&&(Y.setState({nodesSelectionActive:!1}),w.selected&&Ze?(Te({nodes:[],edges:[w]}),(Ue=O.current)==null||Ue.blur()):xe([e])),s&&s(he,w)},oe=i?he=>{i(he,{...w})}:void 0,ne=a?he=>{a(he,{...w})}:void 0,Q=o?he=>{o(he,{...w})}:void 0,ce=l?he=>{l(he,{...w})}:void 0,ee=u?he=>{u(he,{...w})}:void 0,le=he=>{var xe;if(!y&&QF.includes(he.key)&&M){const{unselectNodesAndEdges:Te,addSelectedEdges:Ze}=Y.getState();he.key==="Escape"?((xe=O.current)==null||xe.blur(),Te({edges:[w]})):Ze([e])}};return h.jsx("svg",{style:{zIndex:V},children:h.jsxs("g",{className:as(["react-flow__edge",`react-flow__edge-${N}`,w.className,b,{selected:w.selected,animated:w.animated,inactive:!M&&!s,updating:B,selectable:M}]),onClick:fe,onDoubleClick:oe,onContextMenu:ne,onMouseEnter:Q,onMouseMove:ce,onMouseLeave:ee,onKeyDown:j?le:void 0,tabIndex:j?0:void 0,role:w.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":j?`${zH}-${x}`:void 0,ref:O,...w.domAttributes,children:[!U&&h.jsx(E,{id:e,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:M,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:X,sourceY:ie,targetX:I,targetY:L,sourcePosition:$,targetPosition:q,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:G,markerEnd:te,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),z&&h.jsx(WTt,{edge:w,isReconnectable:z,reconnectRadius:_,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:X,sourceY:ie,targetX:I,targetY:L,sourcePosition:$,targetPosition:q,setUpdateHover:F,setReconnecting:H})]})})}var KTt=R.memo(VTt);const QTt=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function JH({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:_,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,disableKeyboardA11y:S}){const{edgesFocusable:b,edgesReconnectable:v,elementsSelectable:y,onError:w}=Tn(QTt,Sr),C=MTt(n);return h.jsxs("div",{className:"react-flow__edges",children:[h.jsx(BTt,{defaultColor:e,rfId:t}),C.map(N=>h.jsx(KTt,{id:N,edgesFocusable:b,edgesReconnectable:v,elementsSelectable:y,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:l,onMouseLeave:u,onClick:_,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:x,rfId:t,onError:w,edgeTypes:r,disableKeyboardA11y:S},N))]})}JH.displayName="EdgeRenderer";const YTt=R.memo(JH),XTt=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function ZTt({children:e}){const n=Tn(XTt);return h.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function JTt(e){const n=zk(),t=R.useRef(!1);R.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const ejt=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function tjt(e){const n=Tn(ejt),t=Cr();return R.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function njt(e){return e.connection.inProgress?{...e.connection,to:um(e.connection.to,e.transform)}:{...e.connection}}function rjt(e){return njt}function sjt(e){const n=rjt();return Tn(n,Sr)}const ijt=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function ajt({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:l}=Tn(ijt,Sr);return!(i&&s&&l)?null:h.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:h.jsx("g",{className:as(["react-flow__connection",ZF(o)]),children:h.jsx(eq,{style:n,type:t,CustomComponent:r,isValid:o})})})}const eq=({style:e,type:n=Uc.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:l,to:u,toNode:_,toHandle:f,toPosition:p,pointer:m}=sjt();if(!s)return;if(t)return h.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:o,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:p,connectionStatus:ZF(r),toNode:_,toHandle:f,pointer:m});let x="";const S={sourceX:i.x,sourceY:i.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case Uc.Bezier:[x]=fH(S);break;case Uc.SimpleBezier:[x]=FH(S);break;case Uc.Step:[x]=c5({...S,borderRadius:0});break;case Uc.SmoothStep:[x]=c5(S);break;default:[x]=hH(S)}return h.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};eq.displayName="ConnectionLine";const ojt={};function zR(e=ojt){R.useRef(e),Cr(),R.useEffect(()=>{},[e])}function ljt(){Cr(),R.useRef(!1),R.useEffect(()=>{},[])}function tq({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:_,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:x,connectionLineStyle:S,connectionLineComponent:b,connectionLineContainerStyle:v,selectionKeyCode:y,selectionOnDrag:w,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:E,zoomActivationKeyCode:j,deleteKeyCode:z,onlyRenderVisibleElements:M,elementsSelectable:O,defaultViewport:B,translateExtent:F,minZoom:U,maxZoom:H,preventScrolling:Y,defaultMarkerColor:V,zoomOnScroll:X,zoomOnPinch:ie,panOnScroll:I,panOnScrollSpeed:L,panOnScrollMode:$,zoomOnDoubleClick:q,panOnDrag:G,autoPanOnSelection:te,onPaneClick:fe,onPaneMouseEnter:oe,onPaneMouseMove:ne,onPaneMouseLeave:Q,onPaneScroll:ce,onPaneContextMenu:ee,paneClickDistance:le,nodeClickDistance:he,onEdgeContextMenu:xe,onEdgeMouseEnter:Te,onEdgeMouseMove:Ze,onEdgeMouseLeave:Ue,reconnectRadius:Ie,onReconnect:vt,onReconnectStart:bt,onReconnectEnd:It,noDragClassName:Bt,noWheelClassName:Et,noPanClassName:rt,disableKeyboardA11y:ft,nodeExtent:Lt,rfId:we,viewport:Ae,onViewportChange:Xe}){return zR(e),zR(n),ljt(),JTt(t),tjt(Ae),h.jsx(STt,{onPaneClick:fe,onPaneMouseEnter:oe,onPaneMouseMove:ne,onPaneMouseLeave:Q,onPaneContextMenu:ee,onPaneScroll:ce,paneClickDistance:le,deleteKeyCode:z,selectionKeyCode:y,selectionOnDrag:w,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:E,zoomActivationKeyCode:j,elementsSelectable:O,zoomOnScroll:X,zoomOnPinch:ie,zoomOnDoubleClick:q,panOnScroll:I,panOnScrollSpeed:L,panOnScrollMode:$,panOnDrag:G,autoPanOnSelection:te,defaultViewport:B,translateExtent:F,minZoom:U,maxZoom:H,onSelectionContextMenu:f,preventScrolling:Y,noDragClassName:Bt,noWheelClassName:Et,noPanClassName:rt,disableKeyboardA11y:ft,onViewportChange:Xe,isControlledViewport:!!Ae,children:h.jsxs(ZTt,{children:[h.jsx(YTt,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:vt,onReconnectStart:bt,onReconnectEnd:It,onlyRenderVisibleElements:M,onEdgeContextMenu:xe,onEdgeMouseEnter:Te,onEdgeMouseMove:Ze,onEdgeMouseLeave:Ue,reconnectRadius:Ie,defaultMarkerColor:V,noPanClassName:rt,disableKeyboardA11y:ft,rfId:we}),h.jsx(ajt,{style:S,type:x,component:b,containerStyle:v}),h.jsx("div",{className:"react-flow__edgelabel-renderer"}),h.jsx(RTt,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:_,nodeClickDistance:he,onlyRenderVisibleElements:M,noPanClassName:rt,noDragClassName:Bt,disableKeyboardA11y:ft,nodeExtent:Lt,rfId:we}),h.jsx("div",{className:"react-flow__viewport-portal"})]})})}tq.displayName="GraphView";const cjt=R.memo(tq),ujt=sH(),TR=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:l=.5,maxZoom:u=2,nodeOrigin:_,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,x=new Map,S=new Map,b=new Map,v=r??n??[],y=t??e??[],w=_??[0,0],C=f??vp;mH(S,b,v);const{nodesInitialized:N}=f5(y,m,x,{nodeOrigin:w,nodeExtent:C,zIndexMode:p});let E=[0,0,1];if(a&&s&&i){const j=lm(m,{filter:B=>!!((B.width||B.initialWidth)&&(B.height||B.initialHeight))}),{x:z,y:M,zoom:O}=xk(j,s,i,l,u,(o==null?void 0:o.padding)??.1);E=[z,M,O]}return{rfId:"1",width:s??0,height:i??0,transform:E,nodes:y,nodesInitialized:N,nodeLookup:m,parentLookup:x,edges:v,edgeLookup:b,connectionLookup:S,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:l,maxZoom:u,translateExtent:vp,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Yh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:o,fitViewResolver:null,connection:{...XF},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:ujt,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:YF,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},fjt=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:l,maxZoom:u,nodeOrigin:_,nodeExtent:f,zIndexMode:p})=>xzt((m,x)=>{async function S(){const{nodeLookup:b,panZoom:v,fitViewOptions:y,fitViewResolver:w,width:C,height:N,minZoom:E,maxZoom:j}=x();v&&(await SNt({nodes:b,width:C,height:N,panZoom:v,minZoom:E,maxZoom:j},y),w==null||w.resolve(!0),m({fitViewResolver:null}))}return{...TR({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:l,maxZoom:u,nodeOrigin:_,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:b=>{const{nodeLookup:v,parentLookup:y,nodeOrigin:w,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:E,nodesSelectionActive:j}=x(),{nodesInitialized:z,hasSelectedNodes:M}=f5(b,v,y,{nodeOrigin:w,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:E}),O=j&&M;N&&z?(S(),m({nodes:b,nodesInitialized:z,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:O})):m({nodes:b,nodesInitialized:z,nodesSelectionActive:O})},setEdges:b=>{const{connectionLookup:v,edgeLookup:y}=x();mH(v,y,b),m({edges:b})},setDefaultNodesAndEdges:(b,v)=>{if(b){const{setNodes:y}=x();y(b),m({hasDefaultNodes:!0})}if(v){const{setEdges:y}=x();y(v),m({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:v,nodeLookup:y,parentLookup:w,domNode:C,nodeOrigin:N,nodeExtent:E,debug:j,fitViewQueued:z,zIndexMode:M}=x(),{changes:O,updatedInternals:B}=WNt(b,y,w,C,N,E,M);B&&(HNt(y,w,{nodeOrigin:N,nodeExtent:E,zIndexMode:M}),z?(S(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(O==null?void 0:O.length)>0&&(j&&console.log("React Flow: trigger node changes",O),v==null||v(O)))},updateNodePositions:(b,v=!1)=>{const y=[];let w=[];const{nodeLookup:C,triggerNodeChanges:N,connection:E,updateConnection:j,onNodesChangeMiddlewareMap:z}=x();for(const[M,O]of b){const B=C.get(M),F=!!(B!=null&&B.expandParent&&(B!=null&&B.parentId)&&(O!=null&&O.position)),U={id:M,type:"position",position:F?{x:Math.max(0,O.position.x),y:Math.max(0,O.position.y)}:O.position,dragging:v};if(B&&E.inProgress&&E.fromNode.id===B.id){const H=qf(B,E.fromHandle,Ct.Left,!0);j({...E,from:H})}F&&B.parentId&&y.push({id:M,parentId:B.parentId,rect:{...O.internals.positionAbsolute,width:O.measured.width??0,height:O.measured.height??0}}),w.push(U)}if(y.length>0){const{parentLookup:M,nodeOrigin:O}=x(),B=Nk(y,C,M,O);w.push(...B)}for(const M of z.values())w=M(w);N(w)},triggerNodeChanges:b=>{const{onNodesChange:v,setNodes:y,nodes:w,hasDefaultNodes:C,debug:N}=x();if(b!=null&&b.length){if(C){const E=Hzt(b,w);y(E)}N&&console.log("React Flow: trigger node changes",b),v==null||v(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:v,setEdges:y,edges:w,hasDefaultEdges:C,debug:N}=x();if(b!=null&&b.length){if(C){const E=qzt(b,w);y(E)}N&&console.log("React Flow: trigger edge changes",b),v==null||v(b)}},addSelectedNodes:b=>{const{multiSelectionActive:v,edgeLookup:y,nodeLookup:w,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(v){const E=b.map(j=>rf(j,!0));C(E);return}C(rh(w,new Set([...b]),!0)),N(rh(y))},addSelectedEdges:b=>{const{multiSelectionActive:v,edgeLookup:y,nodeLookup:w,triggerNodeChanges:C,triggerEdgeChanges:N}=x();if(v){const E=b.map(j=>rf(j,!0));N(E);return}N(rh(y,new Set([...b]))),C(rh(w,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:v}={})=>{const{edges:y,nodes:w,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:E}=x(),j=b||w,z=v||y,M=[];for(const B of j){if(!B.selected)continue;const F=C.get(B.id);F&&(F.selected=!1),M.push(rf(B.id,!1))}const O=[];for(const B of z)B.selected&&O.push(rf(B.id,!1));N(M),E(O)},setMinZoom:b=>{const{panZoom:v,maxZoom:y}=x();v==null||v.setScaleExtent([b,y]),m({minZoom:b})},setMaxZoom:b=>{const{panZoom:v,minZoom:y}=x();v==null||v.setScaleExtent([y,b]),m({maxZoom:b})},setTranslateExtent:b=>{var v;(v=x().panZoom)==null||v.setTranslateExtent(b),m({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:v,triggerNodeChanges:y,triggerEdgeChanges:w,elementsSelectable:C}=x();if(!C)return;const N=v.reduce((j,z)=>z.selected?[...j,rf(z.id,!1)]:j,[]),E=b.reduce((j,z)=>z.selected?[...j,rf(z.id,!1)]:j,[]);y(N),w(E)},setNodeExtent:b=>{const{nodes:v,nodeLookup:y,parentLookup:w,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:E,zIndexMode:j}=x();b[0][0]===E[0][0]&&b[0][1]===E[0][1]&&b[1][0]===E[1][0]&&b[1][1]===E[1][1]||(f5(v,y,w,{nodeOrigin:C,nodeExtent:b,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:j}),m({nodeExtent:b}))},panBy:b=>{const{transform:v,width:y,height:w,panZoom:C,translateExtent:N}=x();return VNt({delta:b,panZoom:C,transform:v,translateExtent:N,width:y,height:w})},setCenter:async(b,v,y)=>{const{width:w,height:C,maxZoom:N,panZoom:E}=x();if(!E)return!1;const j=typeof(y==null?void 0:y.zoom)<"u"?y.zoom:N;return await E.setViewport({x:w/2-b*j,y:C/2-v*j,zoom:j},{duration:y==null?void 0:y.duration,ease:y==null?void 0:y.ease,interpolate:y==null?void 0:y.interpolate}),!0},cancelConnection:()=>{m({connection:{...XF}})},updateConnection:b=>{m({connection:b})},reset:()=>m({...TR()})}},Object.is);function djt({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:l,fitView:u,nodeOrigin:_,nodeExtent:f,zIndexMode:p,children:m}){const[x]=R.useState(()=>fjt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:l,nodeOrigin:_,nodeExtent:f,zIndexMode:p}));return h.jsx(wzt,{value:x,children:h.jsx(Qzt,{children:h.jsx(uTt,{children:m})})})}function hjt({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:u,maxZoom:_,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return R.useContext(ty)?h.jsx(h.Fragment,{children:e}):h.jsx(djt,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:l,initialMinZoom:u,initialMaxZoom:_,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const _jt={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function pjt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:l,onInit:u,onMove:_,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:x,onConnectEnd:S,onClickConnectStart:b,onClickConnectEnd:v,onNodeMouseEnter:y,onNodeMouseMove:w,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:E,onNodeDragStart:j,onNodeDrag:z,onNodeDragStop:M,onNodesDelete:O,onEdgesDelete:B,onDelete:F,onSelectionChange:U,onSelectionDragStart:H,onSelectionDrag:Y,onSelectionDragStop:V,onSelectionContextMenu:X,onSelectionStart:ie,onSelectionEnd:I,onBeforeDelete:L,connectionMode:$,connectionLineType:q=Uc.Bezier,connectionLineStyle:G,connectionLineComponent:te,connectionLineContainerStyle:fe,deleteKeyCode:oe="Backspace",selectionKeyCode:ne="Shift",selectionOnDrag:Q=!1,selectionMode:ce=bp.Full,panActivationKeyCode:ee="Space",multiSelectionKeyCode:le=xp()?"Meta":"Control",zoomActivationKeyCode:he=xp()?"Meta":"Control",snapToGrid:xe,snapGrid:Te,onlyRenderVisibleElements:Ze=!1,selectNodesOnDrag:Ue,nodesDraggable:Ie,autoPanOnNodeFocus:vt,nodesConnectable:bt,nodesFocusable:It,nodeOrigin:Bt=TH,edgesFocusable:Et,edgesReconnectable:rt,elementsSelectable:ft=!0,defaultViewport:Lt=Lzt,minZoom:we=.5,maxZoom:Ae=2,translateExtent:Xe=vp,preventScrolling:dt=!0,nodeExtent:xt,defaultMarkerColor:Ut="#b1b1b7",zoomOnScroll:We=!0,zoomOnPinch:Ht=!0,panOnScroll:ln=!1,panOnScrollSpeed:_n=.5,panOnScrollMode:Yt=jf.Free,zoomOnDoubleClick:Xn=!0,panOnDrag:Xt=!0,onPaneClick:jn,onPaneMouseEnter:or,onPaneMouseMove:lr,onPaneMouseLeave:vr,onPaneScroll:Mn,onPaneContextMenu:Gr,paneClickDistance:Er=1,nodeClickDistance:gt=0,children:dn,onReconnect:Nn,onReconnectStart:Zt,onReconnectEnd:cr,onEdgeContextMenu:pn,onEdgeDoubleClick:An,onEdgeMouseEnter:fn,onEdgeMouseMove:pt,onEdgeMouseLeave:St,reconnectRadius:He=10,onNodesChange:ht,onEdgesChange:Nr,noDragClassName:nn="nodrag",noWheelClassName:rn="nowheel",noPanClassName:Dn="nopan",fitView:ur,fitViewOptions:os,connectOnClick:to,attributionPosition:Ta,proOptions:ja,defaultEdgeOptions:Ci,elevateNodesOnSelect:Hs=!0,elevateEdgesOnSelect:sn=!1,disableKeyboardA11y:ii=!1,autoPanOnConnect:Pn,autoPanOnNodeDrag:Ve,autoPanOnSelection:$t=!0,autoPanSpeed:qs,connectionRadius:Us,isValidConnection:ai,onError:js,style:oi,id:ta,nodeDragThreshold:td,connectionDragThreshold:vs,viewport:Ei,onViewportChange:ls,width:Vn,height:Gt,colorMode:li="light",debug:As,onScroll:Zn,ariaLabelConfig:Gs,zIndexMode:cs="basic",...Kn},Wr){const $r=ta||"1",na=$zt(li),ci=R.useCallback(Ws=>{Ws.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Zn==null||Zn(Ws)},[Zn]);return h.jsx("div",{"data-testid":"rf__wrapper",...Kn,onScroll:ci,style:{...oi,..._jt},ref:Wr,className:as(["react-flow",s,na]),id:ta,role:"application",children:h.jsxs(hjt,{nodes:e,edges:n,width:Vn,height:Gt,fitView:ur,fitViewOptions:os,minZoom:we,maxZoom:Ae,nodeOrigin:Bt,nodeExtent:xt,zIndexMode:cs,children:[h.jsx(Bzt,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:x,onConnectEnd:S,onClickConnectStart:b,onClickConnectEnd:v,nodesDraggable:Ie,autoPanOnNodeFocus:vt,nodesConnectable:bt,nodesFocusable:It,edgesFocusable:Et,edgesReconnectable:rt,elementsSelectable:ft,elevateNodesOnSelect:Hs,elevateEdgesOnSelect:sn,minZoom:we,maxZoom:Ae,nodeExtent:xt,onNodesChange:ht,onEdgesChange:Nr,snapToGrid:xe,snapGrid:Te,connectionMode:$,translateExtent:Xe,connectOnClick:to,defaultEdgeOptions:Ci,fitView:ur,fitViewOptions:os,onNodesDelete:O,onEdgesDelete:B,onDelete:F,onNodeDragStart:j,onNodeDrag:z,onNodeDragStop:M,onSelectionDrag:Y,onSelectionDragStart:H,onSelectionDragStop:V,onMove:_,onMoveStart:f,onMoveEnd:p,noPanClassName:Dn,nodeOrigin:Bt,rfId:$r,autoPanOnConnect:Pn,autoPanOnNodeDrag:Ve,autoPanSpeed:qs,onError:js,connectionRadius:Us,isValidConnection:ai,selectNodesOnDrag:Ue,nodeDragThreshold:td,connectionDragThreshold:vs,onBeforeDelete:L,debug:As,ariaLabelConfig:Gs,zIndexMode:cs}),h.jsx(cjt,{onInit:u,onNodeClick:o,onEdgeClick:l,onNodeMouseEnter:y,onNodeMouseMove:w,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:E,nodeTypes:i,edgeTypes:a,connectionLineType:q,connectionLineStyle:G,connectionLineComponent:te,connectionLineContainerStyle:fe,selectionKeyCode:ne,selectionOnDrag:Q,selectionMode:ce,deleteKeyCode:oe,multiSelectionKeyCode:le,panActivationKeyCode:ee,zoomActivationKeyCode:he,onlyRenderVisibleElements:Ze,defaultViewport:Lt,translateExtent:Xe,minZoom:we,maxZoom:Ae,preventScrolling:dt,zoomOnScroll:We,zoomOnPinch:Ht,zoomOnDoubleClick:Xn,panOnScroll:ln,panOnScrollSpeed:_n,panOnScrollMode:Yt,panOnDrag:Xt,autoPanOnSelection:$t,onPaneClick:jn,onPaneMouseEnter:or,onPaneMouseMove:lr,onPaneMouseLeave:vr,onPaneScroll:Mn,onPaneContextMenu:Gr,paneClickDistance:Er,nodeClickDistance:gt,onSelectionContextMenu:X,onSelectionStart:ie,onSelectionEnd:I,onReconnect:Nn,onReconnectStart:Zt,onReconnectEnd:cr,onEdgeContextMenu:pn,onEdgeDoubleClick:An,onEdgeMouseEnter:fn,onEdgeMouseMove:pt,onEdgeMouseLeave:St,reconnectRadius:He,defaultMarkerColor:Ut,noDragClassName:nn,noWheelClassName:rn,noPanClassName:Dn,rfId:$r,disableKeyboardA11y:ii,nodeExtent:xt,viewport:Ei,onViewportChange:ls}),h.jsx(Dzt,{onSelectionChange:U}),dn,h.jsx(Tzt,{proOptions:ja,position:Ta}),h.jsx(zzt,{rfId:$r,disableKeyboardA11y:ii})]})})}var mjt=AH(pjt);function gjt({dimensions:e,lineWidth:n,variant:t,className:r}){return h.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:as(["react-flow__background-pattern",t,r])})}function vjt({radius:e,className:n}){return h.jsx("circle",{cx:e,cy:e,r:e,className:as(["react-flow__background-pattern","dots",n])})}var Ql;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ql||(Ql={}));const bjt={[Ql.Dots]:1,[Ql.Lines]:1,[Ql.Cross]:6},yjt=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function nq({id:e,variant:n=Ql.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:l,className:u,patternClassName:_}){const f=R.useRef(null),{transform:p,patternId:m}=Tn(yjt,Sr),x=r||bjt[n],S=n===Ql.Dots,b=n===Ql.Cross,v=Array.isArray(t)?t:[t,t],y=[v[0]*p[2]||1,v[1]*p[2]||1],w=x*p[2],C=Array.isArray(i)?i:[i,i],N=b?[w,w]:y,E=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],j=`${m}${e||""}`;return h.jsxs("svg",{className:as(["react-flow__background",u]),style:{...l,...ry,"--xy-background-color-props":o,"--xy-background-pattern-color-props":a},ref:f,"data-testid":"rf__background",children:[h.jsx("pattern",{id:j,x:p[0]%y[0],y:p[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:S?h.jsx(vjt,{radius:w/2,className:_}):h.jsx(gjt,{dimensions:N,lineWidth:s,variant:n,className:_})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}nq.displayName="Background";const xjt=R.memo(nq);function wjt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:h.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Sjt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:h.jsx("path",{d:"M0 0h32v4.2H0z"})})}function kjt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:h.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Cjt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Ejt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function a1({children:e,className:n,...t}){return h.jsx("button",{type:"button",className:as(["react-flow__controls-button",n]),...t,children:e})}const Njt=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function rq({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:l,className:u,children:_,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const x=Cr(),{isInteractive:S,minZoomReached:b,maxZoomReached:v,ariaLabelConfig:y}=Tn(Njt,Sr),{zoomIn:w,zoomOut:C,fitView:N}=zk(),E=()=>{w(),i==null||i()},j=()=>{C(),a==null||a()},z=()=>{N(s),o==null||o()},M=()=>{x.setState({nodesDraggable:!S,nodesConnectable:!S,elementsSelectable:!S}),l==null||l(!S)},O=p==="horizontal"?"horizontal":"vertical";return h.jsxs(ny,{className:as(["react-flow__controls",O,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??y["controls.ariaLabel"],children:[n&&h.jsxs(h.Fragment,{children:[h.jsx(a1,{onClick:E,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:v,children:h.jsx(wjt,{})}),h.jsx(a1,{onClick:j,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:b,children:h.jsx(Sjt,{})})]}),t&&h.jsx(a1,{className:"react-flow__controls-fitview",onClick:z,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:h.jsx(kjt,{})}),r&&h.jsx(a1,{className:"react-flow__controls-interactive",onClick:M,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:S?h.jsx(Ejt,{}):h.jsx(Cjt,{})}),_]})}rq.displayName="Controls";R.memo(rq);function zjt({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:l,className:u,borderRadius:_,shapeRendering:f,selected:p,onClick:m}){const{background:x,backgroundColor:S}=i||{},b=a||x||S;return h.jsx("rect",{className:as(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:_,ry:_,width:r,height:s,style:{fill:b,stroke:o,strokeWidth:l},shapeRendering:f,onClick:m?v=>m(v,e):void 0})}const Tjt=R.memo(zjt),jjt=e=>e.nodes.map(n=>n.id),Pw=e=>e instanceof Function?e:()=>e;function Ajt({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=Tjt,onClick:a}){const o=Tn(jjt,Sr),l=Pw(n),u=Pw(e),_=Pw(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return h.jsx(h.Fragment,{children:o.map(p=>h.jsx(Mjt,{id:p,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:_,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:f},p))})}function Rjt({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:l}){const{node:u,x:_,y:f,width:p,height:m}=Tn(x=>{const S=x.nodeLookup.get(e);if(!S)return{node:void 0,x:0,y:0,width:0,height:0};const b=S.internals.userNode,{x:v,y}=S.internals.positionAbsolute,{width:w,height:C}=sc(b);return{node:b,x:v,y,width:w,height:C}},Sr);return!u||u.hidden||!iH(u)?null:h.jsx(o,{x:_,y:f,width:p,height:m,style:u.style,selected:!!u.selected,className:r(u),color:n(u),borderRadius:s,strokeColor:t(u),strokeWidth:i,shapeRendering:a,onClick:l,id:u.id})}const Mjt=R.memo(Rjt);var Djt=R.memo(Ajt);const Ljt=200,Ojt=150,Ijt=e=>!e.hidden,Bjt=e=>{const n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:e.nodeLookup.size>0?nH(lm(e.nodeLookup,{filter:Ijt}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},$jt="react-flow__minimap-desc";function sq({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:l,maskColor:u,maskStrokeColor:_,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:x,pannable:S=!1,zoomable:b=!1,ariaLabel:v,inversePan:y,zoomStep:w=1,offsetScale:C=5}){const N=Cr(),E=R.useRef(null),{boundingRect:j,viewBB:z,rfId:M,panZoom:O,translateExtent:B,flowWidth:F,flowHeight:U,ariaLabelConfig:H}=Tn(Bjt,Sr),Y=(e==null?void 0:e.width)??Ljt,V=(e==null?void 0:e.height)??Ojt,X=j.width/Y,ie=j.height/V,I=Math.max(X,ie),L=I*Y,$=I*V,q=C*I,G=j.x-(L-j.width)/2-q,te=j.y-($-j.height)/2-q,fe=L+q*2,oe=$+q*2,ne=`${$jt}-${M}`,Q=R.useRef(0),ce=R.useRef();Q.current=I,R.useEffect(()=>{if(E.current&&O)return ce.current=nzt({domNode:E.current,panZoom:O,getTransform:()=>N.getState().transform,getViewScale:()=>Q.current}),()=>{var xe;(xe=ce.current)==null||xe.destroy()}},[O]),R.useEffect(()=>{var xe;(xe=ce.current)==null||xe.update({translateExtent:B,width:F,height:U,inversePan:y,pannable:S,zoomStep:w,zoomable:b})},[S,b,y,w,B,F,U]);const ee=m?xe=>{var Ue;const[Te,Ze]=((Ue=ce.current)==null?void 0:Ue.pointer(xe))||[0,0];m(xe,{x:Te,y:Ze})}:void 0,le=x?R.useCallback((xe,Te)=>{const Ze=N.getState().nodeLookup.get(Te).internals.userNode;x(xe,Ze)},[]):void 0,he=v??H["minimap.ariaLabel"];return h.jsx(ny,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof _=="string"?_:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*I:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof t=="string"?t:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:as(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:h.jsxs("svg",{width:Y,height:V,viewBox:`${G} ${te} ${fe} ${oe}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ne,ref:E,onClick:ee,children:[he&&h.jsx("title",{id:ne,children:he}),h.jsx(Djt,{onClick:le,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),h.jsx("path",{className:"react-flow__minimap-mask",d:`M${G-q},${te-q}h${fe+q*2}v${oe+q*2}h${-fe-q*2}z + M${z.x},${z.y}h${z.width}v${z.height}h${-z.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}sq.displayName="MiniMap";R.memo(sq);const Pjt=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,Fjt={[Jh.Line]:"right",[Jh.Handle]:"bottom-right"};function Hjt({nodeId:e,position:n,variant:t=Jh.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:l=10,maxWidth:u=Number.MAX_VALUE,maxHeight:_=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:x,onResizeStart:S,onResize:b,onResizeEnd:v}){const y=LH(),w=typeof e=="string"?e:y,C=Cr(),N=R.useRef(null),E=t===Jh.Handle,j=Tn(R.useCallback(Pjt(E&&m),[E,m]),Sr),z=R.useRef(null),M=n??Fjt[t];R.useEffect(()=>{if(!(!N.current||!w))return z.current||(z.current=pzt({domNode:N.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:B,transform:F,snapGrid:U,snapToGrid:H,nodeOrigin:Y,domNode:V}=C.getState();return{nodeLookup:B,transform:F,snapGrid:U,snapToGrid:H,nodeOrigin:Y,paneDomNode:V}},onChange:(B,F)=>{const{triggerNodeChanges:U,nodeLookup:H,parentLookup:Y,nodeOrigin:V}=C.getState(),X=[],ie={x:B.x,y:B.y},I=H.get(w);if(I&&I.expandParent&&I.parentId){const L=I.origin??V,$=B.width??I.measured.width??0,q=B.height??I.measured.height??0,G={id:I.id,parentId:I.parentId,rect:{width:$,height:q,...aH({x:B.x??I.position.x,y:B.y??I.position.y},{width:$,height:q},I.parentId,H,L)}},te=Nk([G],H,Y,V);X.push(...te),ie.x=B.x?Math.max(L[0]*$,B.x):void 0,ie.y=B.y?Math.max(L[1]*q,B.y):void 0}if(ie.x!==void 0&&ie.y!==void 0){const L={id:w,type:"position",position:{...ie}};X.push(L)}if(B.width!==void 0&&B.height!==void 0){const $={id:w,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:B.width,height:B.height}};X.push($)}for(const L of F){const $={...L,type:"position"};X.push($)}U(X)},onEnd:({width:B,height:F})=>{const U={id:w,type:"dimensions",resizing:!1,dimensions:{width:B,height:F}};C.getState().triggerNodeChanges([U])}})),z.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:l,maxWidth:u,maxHeight:_},keepAspectRatio:f,resizeDirection:p,onResizeStart:S,onResize:b,onResizeEnd:v,shouldResize:x}),()=>{var B;(B=z.current)==null||B.destroy()}},[M,o,l,u,_,f,S,b,v,x]);const O=M.split("-");return h.jsx("div",{className:as(["react-flow__resize-control","nodrag",...O,t,r]),ref:N,style:{...s,scale:j,...a&&{[E?"backgroundColor":"borderColor"]:a}},children:i})}R.memo(Hjt);function qjt(){const[e,n]=R.useState(0),[t,r]=R.useState(0);return{ref:R.useCallback(i=>{if(!i)return;function a(){n(i.offsetWidth),r(i.offsetHeight)}const o=new ResizeObserver(a),l=new MutationObserver(a);return o.observe(i),l.observe(i,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),a(),()=>{o.disconnect(),l.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const o1=8;function Ujt(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=R.useState({viewWidth:0,viewHeight:0});R.useEffect(()=>{function _(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",_),_(),()=>window.removeEventListener("resize",_)},[]);let o=0,l=0,u=0;if(e){const{distance:_}=e;switch(e.anchor){case"left":o=e.x-t-_,l=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+_,l=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,l=e.y+e.height+_;break;case"above":o=e.x+e.width/2-t/2,l=e.y-r-_;break}const f=o,p=l;o=Math.min(Math.max(o,o1),i-t-o1),l=Math.min(Math.max(l,o1),s-r-o1),u=e.anchor==="left"||e.anchor==="right"?p-l:f-o}return{x:o,y:l,arrowAdjustment:u}}const Fw=380,Hw=12,Gjt=350,Wjt=150,_5=new EventTarget;function Vjt(){_5.dispatchEvent(new Event("move"))}function Kjt(e,n){const[t,r]=R.useState(null),s=R.useRef(void 0),i=R.useRef(void 0);R.useEffect(()=>{const u=()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),r(null)};return _5.addEventListener("move",u),()=>{_5.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),R.useEffect(()=>{r(u=>{var f;if(!u)return u;const _=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return _&&u.x===_.x&&u.y===_.y&&u.width===_.width&&u.height===_.height?u:_})},[e,n]);const a=R.useCallback(()=>{window.clearTimeout(i.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var u;r(((u=e.current)==null?void 0:u.getBoundingClientRect())??null)},Gjt)},[e]),o=R.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),Wjt)},[]),l=R.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:l}}function Qjt(e){const n=new Date(e),t=n.getFullYear()===new Date().getFullYear()?{month:"short",day:"numeric"}:{month:"short",day:"numeric",year:"numeric"};return n.toLocaleDateString(T(),t)}function Yjt({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:l}){const u=qjt(),_=s.right+Hw+Fw<=window.innerWidth,f=s.x-Hw-Fw>=0,p=_?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:x}=Ujt({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:Hw},u),S=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:b}=ct({...z0t(S??""),enabled:!!S,subscribed:!!S}),v=R.useMemo(()=>{if(!b)return null;const B=b;let F=B.diff;if(B.truncated){const V=F.lastIndexOf(` +diff --git `);F=V!==-1?F.slice(0,V+1):F.slice(0,F.lastIndexOf(` +`)+1)}let U=[];try{U=F.trim()?Q4(F):[]}catch{return null}if(B.truncated&&U.every(V=>V.hunks.length===0))return null;let H=0,Y=0;for(const V of U){const X=Cb(V);H+=X.additions,Y+=X.deletions}return{fileCount:U.length,additions:H,deletions:Y,truncated:B.truncated}},[b]),y={done:0,failed:0,cancelled:0,live:0};for(const B of n)B.status==="done"?y.done+=1:B.status==="failed"?y.failed+=1:B.status==="cancelled"?y.cancelled+=1:y.live+=1;const w=t?X1((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,N=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,E=R.useRef(null),[j,z]=R.useState(!1),[M,O]=R.useState(!1);return R.useEffect(()=>{z(!1)},[N]),R.useEffect(()=>{const B=E.current;B&&O(B.scrollHeight>B.clientHeight+1)},[N,j]),Go.createPortal(h.jsxs("div",{ref:u.ref,className:"exp-hover-card fixed z-60 bg-background border border-border rounded-lg shadow-menu py-3.5 px-4 text-sm text-text [&_.hc-head]:flex [&_.hc-head]:items-baseline [&_.hc-head]:justify-between [&_.hc-head]:gap-2.5 [&_.hc-slug]:text-sm [&_.hc-slug]:font-semibold [&_.hc-slug]:min-w-0 [&_.hc-slug]:overflow-hidden [&_.hc-slug]:text-ellipsis [&_.hc-slug]:whitespace-nowrap [&_.hc-title]:mt-[3px] [&_.hc-title]:text-text [&_.hc-actions]:flex [&_.hc-actions]:items-center [&_.hc-actions]:gap-1.5 [&_.hc-actions]:mt-2.5 [&_.hc-actions_button]:inline-flex [&_.hc-actions_button]:items-center [&_.hc-actions_button]:justify-center [&_.hc-actions_button]:gap-[5px] [&_.hc-actions_button]:min-w-21 [&_.hc-actions_button]:py-1.5 [&_.hc-actions_button]:px-2.5 [&_.hc-actions_button]:border [&_.hc-actions_button]:border-border [&_.hc-actions_button]:rounded-md [&_.hc-actions_button]:bg-background [&_.hc-actions_button]:text-text [&_.hc-actions_button]:text-sm [&_.hc-actions_button]:font-medium [&_.hc-actions_button:hover]:border-border-hover-strong [&_.hc-actions_button:hover]:bg-canvas [&_.hc-body]:mt-2.5 [&_.hc-body]:border-t [&_.hc-body]:border-t-border-variant [&_.hc-body]:pt-2.5 [&_.hc-body]:leading-[1.6] [&_.hc-body]:whitespace-pre-line [&_.hc-body]:line-clamp-10 [&_.hc-body.expanded]:block [&_.hc-body.expanded]:line-clamp-none [&_.hc-body.expanded]:max-h-[45vh] [&_.hc-body.expanded]:overflow-y-auto [&_.hc-body.expanded]:overflow-x-hidden [&_.hc-body.expanded]:pb-1 [&_.hc-toggle]:mt-1 [&_.hc-toggle]:text-sm [&_.hc-toggle]:font-medium [&_.hc-toggle]:text-muted [&_.hc-toggle:hover]:text-text [&_.hc-failure]:mt-2 [&_.hc-failure]:text-accent-red [&_.hc-failure]:line-clamp-3 [&_.hc-stats]:mt-2.5 [&_.hc-stats]:border-t [&_.hc-stats]:border-t-border-variant [&_.hc-stats]:pt-2.5 [&_.hc-stats]:flex [&_.hc-stats]:items-center [&_.hc-stats]:gap-3 [&_.hc-stats]:flex-wrap [&_.hc-stats]:text-xs [&_.hc-stats]:text-text [&_.hc-git]:mt-2.5 [&_.hc-git]:pt-2 [&_.hc-git]:border-t [&_.hc-git]:border-t-border-variant [&_.hc-git]:text-xs [&_.hc-git]:text-text [&_.hc-git]:flex [&_.hc-git]:flex-col [&_.hc-git]:gap-1 [&_.hc-git-row]:flex [&_.hc-git-row]:items-center [&_.hc-git-row]:gap-2.5 [&_.hc-git-row]:flex-wrap [&_.hc-git-row]:min-w-0 [&_.hc-branch]:inline-flex [&_.hc-branch]:items-center [&_.hc-branch]:gap-1 [&_.hc-branch]:min-w-0 [&_.hc-branch]:overflow-hidden [&_.hc-branch]:text-ellipsis [&_.hc-branch]:whitespace-nowrap [&_.hc-foot]:mt-2 [&_.hc-foot]:flex [&_.hc-foot]:items-center [&_.hc-foot]:justify-between [&_.hc-foot]:gap-2.5 [&_.hc-foot]:text-xs [&_.hc-foot]:text-muted [&_.hc-foot_.hc-command]:min-w-0 [&_.hc-foot_.hc-command]:overflow-hidden [&_.hc-foot_.hc-command]:text-ellipsis [&_.hc-foot_.hc-command]:whitespace-nowrap",style:{width:Fw,left:m,top:x,visibility:u.offsetHeight===0?"hidden":void 0},onMouseEnter:o,onMouseLeave:l,children:[h.jsxs("div",{className:"hc-head",children:[h.jsx("span",{className:"hc-slug",children:e.slug}),h.jsx(Vl,{status:t?Ui(t):"idle"})]}),e.title&&h.jsx("div",{className:"hc-title",children:e.title}),h.jsxs("div",{className:"hc-actions",children:[i&&h.jsxs("button",{type:"button",...qr(i),children:[h.jsx($h,{size:13}),Cge()]}),h.jsxs("button",{type:"button",...qr(a),children:[h.jsx(sb,{size:13}),hge()]})]}),N&&h.jsx("div",{className:`hc-body${j?" expanded":""}`,ref:E,children:N}),N&&(M||j)&&h.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>z(B=>!B),children:j?_D():A0e()}),C&&h.jsx("div",{className:"hc-failure",children:C}),h.jsxs("div",{className:"hc-stats",children:[h.jsx("span",{children:new Intl.ListFormat(T(),{style:"short"}).format([n.length===1?Ywe():e4e({count:tn(n.length)}),...y.done>0?[Ewe({count:tn(y.done)})]:[],...y.failed>0?[jwe({count:tn(y.failed)})]:[],...y.cancelled>0?[wwe({count:tn(y.cancelled)})]:[],...y.live>0?[Hwe({count:tn(y.live)})]:[]])}),t&&e6(t.backend)&&h.jsx(N6,{backend:t.backend}),w&&h.jsx("span",{children:w}),t&&h.jsx("span",{children:$o(t.createdAt)})]}),h.jsxs("div",{className:"hc-git",children:[h.jsxs("div",{className:"hc-git-row",children:[h.jsxs("span",{className:"hc-branch",title:e.branchName,children:[h.jsx(Vp,{size:12}),e.branchName]}),r&&h.jsxs("span",{children:[xge()," ",h.jsx("span",{children:r})]})]}),v&&v.fileCount>0&&h.jsx("div",{className:"hc-git-row",title:v.truncated?cK({parent:Ee(r??"parent")}):iK({parent:Ee(r??"parent")}),children:h.jsxs("span",{children:[v.truncated&&"≥ ",h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",v.additions]})," ",h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",v.deletions]})," · ",v.fileCount===1&&!v.truncated?Wwe():v.truncated?Bwe({count:tn(v.fileCount)}):Dwe({count:tn(v.fileCount)})]})})]}),h.jsxs("div",{className:"hc-foot",children:[h.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),h.jsxs("span",{children:[gge()," ",Qjt(e.createdAt)]})]})]}),document.body)}const jR=["empty-state absolute inset-0 flex flex-col items-center","justify-center p-6 text-center text-subtext [&_p]:max-w-[46ch]","[&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal [&_p]:text-balance","[&_p.empty-state-title]:text-2xl [&_p.empty-state-title]:font-normal","[&_p.empty-state-title]:text-text [&_p.empty-state-hint]:text-lg","[&_p.empty-state-hint]:text-subtext empty-state-cta gap-1.5"].join(" "),Xjt=264,AR=132,A1=44,Zjt=72,Jjt=148,eAt=44;function tAt(e){const n=new Map(e.map(i=>[i.id,{exp:i,children:[]}])),t=[];for(const i of e){const a=n.get(i.id),o=i.parentExperimentId?n.get(i.parentExperimentId):void 0;o?o.children.push(a):t.push(a)}const r=(i,a)=>i.exp.createdAt-a.exp.createdAt,s=i=>{i.children.sort(r),i.children.forEach(s)};return t.sort(r),t.forEach(s),t}function nAt(e,n){const t=new Map,r=o=>{const l=t.get(o)??1+o.children.reduce((u,_)=>u+r(_),0);return t.set(o,l),l},s=new Map,i=o=>{const l=s.get(o)??(n(o)||o.children.some(i));return s.set(o,l),l};function a(o){if(n(o)){const _=[];let f=0;for(const p of o.children)i(p)?_.push(...a(p)):f+=r(p);return f>0&&_.push({kind:"elided",id:`el-${o.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:o.exp,children:_}]}if(!i(o))return[];let l=0;const u=[];return(function _(f){l+=1;for(const p of f.children)n(p)?u.push(...a(p)):i(p)?_(p):l+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:l,children:u}]}return e.flatMap(a)}function p5(e){return e.kind==="exp"?Xjt:Jjt}function l1(e){return e.kind==="exp"?e.exp.id:e.id}function R1(e){if(e.children.length===0)return p5(e);const n=e.children.reduce((t,r)=>t+R1(r),0)+A1*(e.children.length-1);return Math.max(p5(e),n)}function rAt(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const sAt=R.memo(function({data:n}){Kf();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:l,onOpenView:u,onOpenCode:_}=n,f=r?Ui(r):void 0,p=f==="running"||f==="starting"||f==="cancelling",m=i?bst():p?Dst():Ml(),x=s.slice(-8),S=R.useRef(null),b=Kjt(S,n);return h.jsxs("div",{ref:S,className:`exp-node w-66 border border-border rounded-md bg-background py-2.5 px-3 shadow-tree text-sm transition-[box-shadow] duration-120 ease-standard [&:hover]:shadow-tree-hover [&.live]:border-accent-teal [&.live]:shadow-tree-live [&_.node-overview-link]:block [&_.node-overview-link]:w-full [&_.node-overview-link]:p-0 [&_.node-overview-link]:border-0 [&_.node-overview-link]:bg-transparent [&_.node-overview-link]:text-inherit [&_.node-overview-link]:[font:inherit] [&_.node-overview-link]:text-start [&_.node-overview-link]:cursor-pointer [&_.node-overview-link:hover_.node-slug]:underline [&_.node-overview-link:hover_.node-slug]:underline-offset-[3px] [&_.node-overview-link:focus-visible]:outline-2 [&_.node-overview-link:focus-visible]:outline-solid [&_.node-overview-link:focus-visible]:outline-accent [&_.node-overview-link:focus-visible]:outline-offset-4 [&_.node-overview-link:focus-visible]:rounded-xs [&_.node-eyebrow]:flex [&_.node-eyebrow]:items-center [&_.node-eyebrow]:justify-between [&_.node-eyebrow]:gap-2 [&_.node-eyebrow]:mb-1.5 [&_.node-eyebrow]:text-xs [&_.node-eyebrow]:font-medium [&_.node-eyebrow]:text-muted [&_.node-head]:flex [&_.node-head]:items-center [&_.node-head]:gap-[7px] [&_.node-head]:min-w-0 [&_.node-status]:w-2 [&_.node-status]:h-2 [&_.node-status]:rounded-full [&_.node-status]:shrink-0 [&_.node-slug]:text-sm [&_.node-slug]:font-semibold [&_.node-slug]:text-text [&_.node-slug]:flex-1 [&_.node-slug]:min-w-0 [&_.node-slug]:overflow-hidden [&_.node-slug]:text-ellipsis [&_.node-slug]:whitespace-nowrap [&_.node-title]:mt-1 [&_.node-title]:text-text [&_.node-title]:text-sm [&_.node-title]:line-clamp-2 [&_.node-meta]:mt-2 [&_.node-meta]:flex [&_.node-meta]:items-center [&_.node-meta]:gap-2 [&_.node-meta]:text-xs [&_.node-meta]:text-muted [&_.node-actions]:mt-2 [&_.node-actions]:pt-1.5 [&_.node-actions]:border-t [&_.node-actions]:border-t-border-variant [&_.node-actions]:flex [&_.node-actions]:items-center [&_.node-actions]:gap-[3px] [&_.node-action]:inline-flex [&_.node-action]:items-center [&_.node-action]:gap-[5px] [&_.node-action]:py-[3px] [&_.node-action]:px-1.5 [&_.node-action]:text-sm [&_.node-action]:font-medium [&_.node-action]:text-text [&_.node-action]:rounded-sm [&_.node-action]:no-underline [&_.node-action:hover]:text-text [&_.node-action:hover]:bg-surface [&_.node-action-ext]:ms-auto [&_.node-action-ext]:py-[3px] [&_.node-action-ext]:px-[5px] ${p?"live":""}`,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,children:[h.jsx(pu,{type:"target",position:Ct.Top}),h.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...qr(v=>u(t.id,"overview",v)),children:[h.jsxs("div",{className:"node-eyebrow",children:[h.jsx("span",{children:m}),h.jsx(Vl,{status:f??"idle"})]}),h.jsx("div",{className:"node-head",children:h.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&h.jsx("div",{className:"node-title",children:t.title||t.description}),h.jsxs("div",{className:"node-meta",children:[h.jsx("span",{children:bit()}),x.length>0?h.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:x.map(v=>h.jsx("span",{className:`run-sq w-[9px] h-[9px] shrink-0 [&.pass]:bg-accent-green [&.fail]:border-[1.5px] [&.fail]:border-danger-outline [&.live]:bg-accent-teal [&.live]:animate-[or-pulse_1.2s_ease-in-out_infinite] [&.other]:border-[1.5px] [&.other]:border-border ${rAt(Ui(v))}`,title:R6(Ui(v))},v.id))}):h.jsx("span",{children:oit()}),h.jsx("span",{className:"flex-1"}),r&&h.jsx("span",{children:$o(r.createdAt)})]})]}),h.jsxs("div",{className:"node-actions",onClick:v=>v.stopPropagation(),children:[s.length>0&&h.jsxs("button",{className:"node-action",title:fit(),...qr(v=>u(t.id,"terminal",v)),children:[h.jsx($h,{size:13}),oL()]}),h.jsxs("button",{className:"node-action",title:ZM({branch:Ee(t.branchName)}),...qr(v=>_(t.id,t.branchName,"files",v)),children:[h.jsx(sb,{size:13}),Wst()]}),o&&l&&h.jsx("a",{className:"node-action node-action-ext",title:U1({name:Ee(t.branchName)}),"aria-label":U1({name:Ee(t.branchName)}),href:Qv(o,l,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:h.jsx(ib,{size:13})})]}),h.jsx(pu,{type:"source",position:Ct.Bottom}),b.rect&&h.jsx(Yjt,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:b.rect,onOpenLogs:s.length>0?v=>u(t.id,"terminal",v):void 0,onOpenCode:v=>_(t.id,t.branchName,"files",v),onMouseEnter:b.keepOpen,onMouseLeave:b.onMouseLeave})]})}),iAt=R.memo(function({data:n}){Kf();const{count:t,onShowProjectScope:r}=n;return h.jsxs("div",{className:"elided-node w-37 h-11 flex items-center gap-2 py-1.5 px-2.5 border border-dashed border-border rounded-md bg-hover-faint text-muted text-sm font-medium text-start transition-[border-color,color] duration-120 ease-standard [&:hover]:border-text [&:hover]:text-text [&_.elided-node-label]:flex [&_.elided-node-label]:flex-col [&_.elided-node-label]:leading-[1.3] [&_.elided-node-sub]:text-muted",role:"button",tabIndex:0,title:Sit(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[h.jsx(pu,{type:"target",position:Ct.Top}),h.jsx(b6,{size:14}),h.jsxs("span",{className:"elided-node-label",children:[t===1?jst():Est({count:tn(t)}),h.jsx("span",{className:"elided-node-sub",children:pit()})]}),h.jsx(pu,{type:"source",position:Ct.Bottom})]})}),aAt={exp:sAt,elided:iAt},iq={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},oAt={...iq.style,strokeDasharray:"4 4"};function lAt({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:i,onShowProjectScope:a}){const{nodes:o,edges:l}=R.useMemo(()=>{const u=new Map;for(const v of n){const y=u.get(v.experimentId);y?y.push(v):u.set(v.experimentId,[v])}for(const v of u.values())v.sort((y,w)=>y.createdAt-w.createdAt);const _=[],f=[],p=v=>!i||v.exp.chatSessionId===i,m=nAt(tAt(e),p),x=new Map(e.map(v=>[v.id,v.slug]));function S(v,y,w){const C=y-p5(v)/2;if(v.kind==="exp"){const j=u.get(v.exp.id)??[];_.push({id:v.exp.id,type:"exp",position:{x:C,y:w},data:{exp:v.exp,latestRun:j[j.length-1]??null,runs:j,isBaseline:!v.exp.parentExperimentId,parentSlug:v.exp.parentExperimentId?x.get(v.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else _.push({id:v.id,type:"elided",position:{x:C,y:w+(AR-eAt)/2},data:{count:v.count,onShowProjectScope:a}});if(v.children.length===0)return;const N=v.children.reduce((j,z)=>j+R1(z),0)+A1*(v.children.length-1);let E=y-N/2;for(const j of v.children){const z=R1(j),M=v.kind==="elided"||j.kind==="elided";f.push({id:`e-${l1(v)}-${l1(j)}`,source:l1(v),target:l1(j),...M?{style:oAt}:{}}),S(j,E+z/2,w+AR+Zjt),E+=z+A1}}let b=0;for(const v of m){const y=R1(v);S(v,b+y/2,0),b+=y+A1}return{nodes:_,edges:f}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,i,a]);return e.length===0?h.jsxs("div",{className:jR,children:[h.jsx("p",{className:"empty-state-title",children:rit()}),h.jsx("p",{className:"empty-state-hint",children:Hst()})]}):o.length===0&&i?h.jsxs("div",{className:jR,children:[h.jsx("p",{className:"empty-state-title",children:Jst()}),h.jsx("p",{className:"empty-state-hint",children:Bst()})]}):h.jsx(mjt,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.react-flow\\_\\_node.react-flow\\_\\_node-elided.selectable]:cursor-pointer [&_.react-flow\\_\\_handle]:opacity-0 [&_.react-flow\\_\\_handle]:pointer-events-none [&_.react-flow\\_\\_attribution]:hidden!",nodes:o,edges:l,nodeTypes:aAt,defaultEdgeOptions:iq,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:Vjt,minZoom:.15,fitView:!0,fitViewOptions:{padding:.25,maxZoom:1},children:h.jsx(xjt,{variant:Ql.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},i??"project")}const m0=["empty-state absolute inset-0 flex flex-col items-center","justify-center gap-2.5 p-6 text-center text-subtext","[&_p]:max-w-[46ch] [&_p]:m-0 [&_p]:text-sm [&_p]:leading-normal","[&_p]:text-balance [&_p.empty-state-title]:text-2xl","[&_p.empty-state-title]:font-normal [&_p.empty-state-title]:text-text","[&_p.empty-state-hint]:text-lg [&_p.empty-state-hint]:text-subtext"].join(" ");function cAt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uAt(e,n,t,r,s){let i=e,a;const o=n==null?void 0:n.replace(/\/+$/,""),l=r==null?void 0:r.replace(/\/+$/,"");if(i.startsWith("artifacts/"))return i=i.slice(10),i?{path:i,source:"artifacts"}:null;if(i==="~"||i.startsWith("~/"))return{path:i,source:"abs"};const u=p=>{const m=b=>b.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[x,S]=[m(i),m(p)];return x===S?"":x.startsWith(`${S}/`)?x.slice(S.length).replace(/^\/+/,""):null},_=i.startsWith("/")&&l?u(l):null,f=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(_!==null)return _?{path:_,source:"artifacts"}:null;if(f!==null)i=f;else{const p=s?cAt(s):"[^/]+",m=i.match(new RegExp(`/files/${p}/(.+)$`)),x=m?null:i.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),S=m||x?null:i.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(m)return{path:m[1],source:"artifacts"};x?(a=x[1],i=x[2]):S&&(i=S[1])}}return i?i.startsWith("/")?{path:i,source:"abs"}:{path:i,sessionId:a}:null}function fAt(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const Iv=360,dAt=10,RR=1448,hAt=272,_At=380,pAt=hAt+56,mAt=80,gAt=48;function k0(){return Math.max(Iv,window.innerWidth-pAt-_At)}function vAt(){const e=k0();return Math.max(Iv,Math.min(760,e,Math.round(window.innerWidth*.4)))}function MR(e,n){const t=e.findIndex(s=>s.id===n.id);if(t<0)return[...e,n];const r=e.slice();return r[t]=n,r}function DR(e){const n=R.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function bAt({runtime:e,projectId:n,pane:t}){var fo,Ru,uc;const r=Rn({mutationFn:zot}),s=ri(),i=UM({select:J=>J.location}),a=Rf(i.pathname),o=(a==null?void 0:a.kind)==="skills"?"skills":(a==null?void 0:a.kind)==="settings"?a.section??"settings":"chat",l=R.useRef(null),u=(a==null?void 0:a.kind)==="task"?a.sessionId??null:l.current;(a==null?void 0:a.kind)==="task"&&(l.current=u);const _=t!==void 0,f=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=R.useState(null),[x,S]=R.useState(0),b=R.useRef({href:"",jump:0,value:0});(b.current.href!==i.href||b.current.jump!==x)&&(b.current={href:i.href,jump:x,value:b.current.value+1});const v=R.useMemo(()=>{const J=t?qa(t):"experiments";return typeof J=="object"&&"path"in J&&J.line&&p!==b.current.value?{...J,lineScrollRequest:b.current.value}:J},[t,p,i.href,x]),y=ct(Sa(n)),w=R.useMemo(()=>{var J;return((J=y.data)==null?void 0:J.map(me=>me.id))??null},[y.data]),C=R.useRef(new Set),N=R.useRef(new Set),E=R.useRef({}),[j,z]=R.useState(0),M=R.useRef({projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"});M.current={projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"};const O=R.useCallback((J,me=!1)=>{const ze=M.current;ze.projectId&&s.navigate({href:g1(ze.projectId,ze.activeSessionId,J),replace:me})},[s]),B=R.useCallback(J=>{const me=Hl(J);O(me.kind==="file"?{...me,line:void 0}:me)},[O]),F=R.useCallback(()=>O(void 0),[O]),U=R.useCallback(J=>{(t==null?void 0:t.kind)==="experiment"&&O({...t,runId:J??void 0})},[t,O]),H=R.useCallback(J=>{s.navigate({href:J?`/projects/${encodeURIComponent(J)}`:"/projects"})},[s]),Y=R.useCallback(J=>{var me;if(n)if(J==="chat"){const ze=l.current;s.navigate({href:g1(n,ze,(me=iu(sa.current,ze??"new"))==null?void 0:me.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${J==="skills"?"skills":`settings/${J}`}`})},[s,n]),V=Kf(),{status:X}=z6(e.kind==="local"),ie=R.useMemo(()=>V0(),[n]),I=ct(ie),L=I.data??null,$=R.useCallback(J=>{Ur(ie.queryKey,me=>(typeof J=="function"?J(me??null):J)??void 0)},[ie]),q=R.useMemo(()=>Gp(),[n]),G=ct(q),te=G.data??null,fe=R.useCallback(J=>{Ur(q.queryKey,me=>(typeof J=="function"?J(me??null):J)??void 0)},[q]),oe=R.useRef(void 0);oe.current=te==null?void 0:te.tourCompleted;const ne=[!y.data&&y.error?sD():null,!I.data&&I.error?z0():null,!G.data&&G.error?one():null].filter(J=>J!==null),Q=ne.length?fne({items:new Intl.ListFormat(V).format(ne)}):null,ce=R.useRef(null),ee=ct(O4(n)),le=ee.data??[],he=!ee.isPending,[xe,Te]=R.useState(!1),Ue=ct(tu(n)).data??[],Ie=R.useRef(Ue);Ie.current=Ue;const vt=R.useRef(new Map),bt=R.useRef(new Set),It=R.useRef(null),Bt=R.useRef(!1),Et=R.useRef(new Map),rt=R.useRef(new Map),ft=R.useRef(0),Lt=R.useRef(le);Lt.current=le;const Ae=ct(T0t(n)).data??null,[Xe,dt]=R.useState("table"),[xt,Ut]=R.useState("project"),We=R.useRef(null),{open:Ht,setOpen:ln,ref:_n}=Ja(We),[Yt,Xn]=R.useState(!1),Xt=le.every(J=>J.chatSessionId),jn=u&&Xt?xt:"project",or=R.useMemo(()=>jn!=="agent"?le:le.filter(J=>J.chatSessionId===u),[le,jn,u]),lr=R.useMemo(()=>{if(jn!=="agent")return Ue;const J=new Set(or.map(me=>me.id));return Ue.filter(me=>J.has(me.experimentId))},[Ue,or,jn]),[vr,Mn]=R.useState([]),[Gr,Er]=R.useState(!1),[gt,dn]=R.useState(!1),[Nn,Zt]=R.useState(!1),[cr,pn]=R.useState([]),[An,fn]=R.useState([]),pt=R.useRef(new Map),St=R.useRef(new Map),He=J=>{let me=St.current.get(J);return me||(me=new pCt,St.current.set(J,me)),me},[ht,Nr]=R.useState([]),[nn,rn]=R.useState([]),[Dn,ur]=R.useState([]),[os,to]=R.useState([]),[Ta,ja]=R.useState(null),[Ci,Hs]=R.useState("files"),[sn,ii]=R.useState(new Set),[Pn,Ve]=R.useState(!1),[$t,qs]=R.useState(vAt),[Us,ai]=R.useState(()=>window.innerWidth>=RR),js=o==="chat"&&!_&&Us,[oi,ta]=R.useState(!0),[td,vs]=R.useState(!1),Ei=R.useRef(p6()),ls=R.useRef(u);ls.current=u;const Vn=R.useRef(vr);Vn.current=vr;const Gt=R.useRef(os);Gt.current=os;const li=R.useRef(null),As=R.useCallback(J=>{const me=[...J];Gt.current=me,to(me)},[]),Zn=R.useCallback(J=>{li.current=J,ja(J)},[]),Gs=R.useCallback(J=>{const me=kt(J);pn(je=>s0(je,me)),fn(je=>s0(je,me)),Nr(je=>s0(je,me)),rn(je=>s0(je,me)),ur(je=>s0(je,me));const ze=gn.current;if(ze&&"path"in J){const je=Ns(ze,ls.current,J);pt.current.delete(je),St.current.delete(je),N.current.delete(je),C.current.delete(je)}const Me=Vn.current.filter(je=>kt(je)!==me);Vn.current=Me,Mn(Me)},[]),cs=R.useCallback(J=>{const me=kt(J),ze=[...Vn.current.filter(Me=>kt(Me)!==me),jg(J)];Vn.current=ze,Mn(ze),B(J)},[B]),Kn=R.useCallback((J,me,ze)=>{const Me=kt(J),je=li.current,at=q6t({order:Gt.current,previewKey:je?kt(je):null},Me,me);at.replacedKey&&je&&typeof je!="string"&&kt(je)===at.replacedKey&&Gs(je),As(at.order),at.previewKey===null?Zn(null):at.previewKey===Me&&Zn(jg(J));const ot=[...Vn.current.filter(Ft=>kt(Ft)!==Me),jg(J)];Vn.current=ot,Mn(ot),O(Hl(J,ze))},[Gs,As,Zn,O]),Wr=R.useCallback(J=>{const me=li.current;me&&kt(me)===kt(J)&&Zn(null)},[Zn]);R.useEffect(()=>{let J=!1;const me=Me=>{const je=li.current,at=Me.target;if(at instanceof Element&&at.closest("input, textarea, [contenteditable='true']")!==null){J=!1;return}if(je&&kt(je)===kt(Ei.current.rightTab)&&(Me.metaKey||Me.ctrlKey)&&!Me.altKey&&!Me.shiftKey&&Me.key.toLowerCase()==="k"){Me.preventDefault(),J=!0;return}if(J&&Me.key==="Enter"){Me.preventDefault(),J=!1;const Ft=li.current;Ft&&Wr(Ft);return}J=!1},ze=()=>{J=!1};return window.addEventListener("keydown",me),window.addEventListener("blur",ze),window.addEventListener("pointerdown",ze),()=>{window.removeEventListener("keydown",me),window.removeEventListener("blur",ze),window.removeEventListener("pointerdown",ze)}},[Wr]);const $r=R.useCallback((J,me)=>{const ze=kt(J),Me=li.current;Me&&kt(Me)===ze&&Zn(null);const je=U6t({order:Gt.current,previewKey:Me?kt(Me):null},ze,Vn.current.map(kt));As(je.order);const at=Vn.current.filter(Ft=>kt(Ft)!==ze);if(Vn.current=at,Mn(at),!me)return;const ot=je.fallbackKey?at.find(Ft=>kt(Ft)===je.fallbackKey):void 0;ot?B(ot):(F(),Ve(!1))},[As,Zn,B,F]),na=Y,ci=R.useMemo(()=>({rightTab:jg(v),tabHistory:vr,experimentsTabOpen:Gr,filesTabOpen:gt,artifactsTabOpen:Nn,expTabs:cr,fileTabs:An,planTabs:ht,subagentTabs:nn,codeTabs:Dn,contentTabOrder:Gt.current,previewTab:li.current,filesView:Ci,filesToggled:sn,selectedRunId:f,scope:xt,panelOpen:_,panelMax:Pn}),[v,vr,Gr,gt,Nn,cr,An,ht,nn,Dn,os,Ta,Ci,sn,f,xt,_,Pn]);Ei.current=ci;const Ws=R.useCallback(()=>Object.fromEntries(pt.current),[]),Ni=R.useRef(void 0),ra=R.useCallback(()=>{clearTimeout(Ni.current),Ni.current=setTimeout(()=>z(J=>J+1),200)},[]);R.useEffect(()=>()=>clearTimeout(Ni.current),[]);const wu=R.useCallback((J,me,ze)=>{if(Mn(J.tabHistory),Vn.current=J.tabHistory,Er(J.experimentsTabOpen),dn(J.filesTabOpen),Zt(J.artifactsTabOpen),pn(J.expTabs),fn(J.fileTabs),Nr(je=>je===J.planTabs?je:J.planTabs.map(at=>{var ot;return{...at,plan:((ot=je.find(Ft=>Ft.sessionId===at.sessionId&&Ft.promptId===at.promptId))==null?void 0:ot.plan)??""}})),rn(J.subagentTabs),ur(J.codeTabs),As(J.contentTabOrder),Zn(J.previewTab),Hs(J.filesView),ii(J.filesToggled),Ut(J.scope),Ve(J.panelMax),Xn(M.current.activeSessionId===T0&&J.fileTabs.some(je=>Qu(je,{path:p1,source:"artifacts"}))),ze){for(const[je,at]of Object.entries((me==null?void 0:me.scroll)??{}))pt.current.set(je,at);Object.assign(E.current,me==null?void 0:me.sourceModes)}const Me=M.current;if(Me.projectId)for(const je of J.fileTabs){const at=Ns(Me.projectId,Me.activeSessionId,je);N.current.has(at)||C.current.add(at)}},[As,Zn]),{ready:Mr,loaded:Su,error:nr,retry:nd,capture:rd,workspace:sa}=Mdt({projectId:te&&w!==null&&((a==null?void 0:a.kind)!=="task"||!u||w.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",demoOverview:(te==null?void 0:te.tourCompleted)===!1,state:ci,apply:wu,getScroll:Ws,sourceModes:E.current,revision:j}),Vr=R.useCallback((J,me)=>{var at;if(!n)return;J&&me!=null&&me.replace&&u===null&&(rd(),Adt(n,J));const ze=iu(fO(n),J??"new"),Me=ze?ze.active:qc(n)?(at=m6(J??void 0,oe.current===!1))==null?void 0:at.active:void 0,je=me!=null&&me.replace&&J&&u===null?M.current.pane:Me;s.navigate({href:g1(n,J,je),replace:me==null?void 0:me.replace})},[s,n,u,rd]);R.useEffect(()=>{Mr&&(a==null?void 0:a.kind)!=="task"&&!l.current&&sa.current.lastTaskId&&(w!=null&&w.includes(sa.current.lastTaskId))&&(l.current=sa.current.lastTaskId,z(J=>J+1))},[Mr,a==null?void 0:a.kind,sa,w]),pV({shouldBlockFn:({next:J})=>{var me;return((me=Rf(J.pathname))==null?void 0:me.projectId)!==n&&[...St.current.values()].some(ze=>ze.needsProtection)&&!yA(jE())},enableBeforeUnload:()=>[...St.current.values()].some(J=>J.needsProtection)});const el=R.useRef(null);R.useEffect(()=>{const J=Jv(i.href);!te||!Mr||!J||(eb.queue({lastLocation:J,railOpen:oi,panelWidth:$t,experimentsView:Xe},el.current===J?250:0),el.current=J)},[i.href,te,Mr,oi,$t,Xe]);const ic=(te==null?void 0:te.onboardingCompleted)??!1,[zi,Aa]=R.useState(!1),tl=R.useCallback(()=>Aa(!0),[]),no=R.useCallback(async()=>{const J=await r.mutateAsync({tourCompleted:!0});fe(me=>me&&{...me,tourCompleted:J.tourCompleted}),Aa(!1)},[]),ku=R.useCallback(async()=>{await no(),vs(!0)},[no]);R.useEffect(()=>{!n||!qc(n)||!ic||te!=null&&te.tourCompleted||tl()},[n,ic,tl,te==null?void 0:te.tourCompleted]);const Kt=(L==null?void 0:L.find(J=>J.id===n))??null;R.useEffect(()=>{const J=Q||te===null?null:Kt==null?void 0:Kt.name;document.title=J?`${Oo(J)} — OpenResearch`:"OpenResearch"},[Q,te,Kt]);const gn=R.useRef(n);gn.current=n;const ia=R.useCallback(J=>{n&&sf({name:"first_action",surface:qc(n)?"demo":"project",action:J})},[n]);R.useEffect(()=>{o!=="chat"&&o!=="skills"&&ia("open_settings")},[o,ia]);const br=R.useCallback((J=!1)=>{J&&(!M.current.isTask||M.current.pane)||(ia("open_experiment"),Er(!0),O({kind:"home",view:"experiments"},J))},[O,ia]),Kr=()=>{I.refetch(),G.refetch(),y.refetch()},Vs=R.useRef(!1);R.useEffect(()=>{if(!te||Vs.current)return;Vs.current=!0,ce.current=te.preferredAgent;const J=h6()??te.workspace;J&&(ta(J.railOpen),qs(Math.min(J.panelWidth,k0())),dt(J.experimentsView))},[te]),R.useEffect(()=>{w&&l.current&&!w.includes(l.current)&&(l.current=null)},[w]);const ro=R.useRef(Promise.resolve()),Ks=R.useRef(0),nl=R.useCallback(J=>{const me=++Ks.current;fe(Me=>Me&&{...Me,preferredAgent:J});const ze=ro.current.then(()=>r.mutateAsync({preferredAgent:J})).then(Me=>{ce.current=Me.preferredAgent,me===Ks.current&&fe(je=>je&&{...je,preferredAgent:Me.preferredAgent})}).catch(Me=>{throw me===Ks.current&&fe(je=>je&&{...je,preferredAgent:ce.current}),Me});return ro.current=ze.catch(()=>{}),ze},[]);R.useEffect(()=>{const J=()=>{qs(me=>Math.min(me,k0())),ai(window.innerWidth>=RR)};return window.addEventListener("resize",J),()=>window.removeEventListener("resize",J)},[]);const Ra=R.useCallback(J=>{Bt.current=!1,Et.current.clear(),rt.current.clear();const me=++ft.current;tt.fetchQuery(tu(J)).then(ze=>{if(gn.current!==J||It.current!==J||ft.current!==me)return;Et.current=new Map(ze.map(je=>[je.id,je]));const Me=[...rt.current.values()].some(je=>{const at=Et.current.get(je.id);return!at||at.status!=="running"&&at.updatedAt<=je.updatedAt});rt.current.clear();for(const je of ze){const at=vt.current.get(je.id);(!at||at.updatedAt{ft.current===me&&(rt.current.clear(),Te(!0))})},[br]);R.useEffect(()=>{if(n)return It.current=n,vt.current.clear(),bt.current.clear(),Pot(n).catch(()=>{}),Ra(n),()=>{ft.current++}},[Ra,n]);const sd=R.useCallback(()=>{Zt(!0),cs("artifacts")},[cs]);yut({onReconnect:()=>{const J=gn.current;J&&(It.current=J,vt.current.clear(),bt.current.clear(),Ra(J))},onRun:J=>{if(J.projectId!==gn.current||J.projectId!==It.current)return;const me=vt.current.get(J.id),ze=bt.current.has(J.id);if(me&&me.updatedAt>J.updatedAt||(vt.current.set(J.id,J),bt.current.add(J.id),J.status!=="running"||(me==null?void 0:me.status)==="running"))return;const Me=Et.current.get(J.id),je=Bt.current&&(!Me||Me.status!=="running"&&Me.updatedAt<=J.updatedAt);ze&&me||je?br(!0):Bt.current||rt.current.set(J.id,J)}});const us=R.useCallback(()=>Ut("project"),[]),Dr=R.useCallback((J,me="overview",ze="preview",Me)=>{ia("open_experiment");const je={id:J,view:me};pn(at=>at.some(ot=>C2(ot,je))?at:[...at,je]),Kn(je,ze,Me)},[Kn]),rl=R.useCallback((J,me="preview")=>{const ze=Ie.current.filter(je=>je.id===J||je.id.startsWith(J)),Me=ze.length===1?ze[0]:null;Me&&Dr(Me.experimentId,"terminal",me,Me.id)},[Dr]),sl=R.useMemo(()=>new Map(le.map(J=>{var me;return[J.id,((me=J.title)==null?void 0:me.trim())||J.slug||Ml()]})),[le,V]),aa=DR(sl),so=R.useMemo(()=>{const J=new Map;for(const me of Ue)J.set(me.id,aa.get(me.experimentId)??Ml());return J},[aa,Ue,V]),il=DR(so),oa=R.useCallback(J=>{const me=il.get(J);if(me)return me;const ze=[...il].filter(([Me])=>Me.startsWith(J));return ze.length===1?ze[0][1]:""},[il]),io=R.useCallback(J=>{const me=aa.get(J);if(me)return me;const ze=[...aa].filter(([Me])=>Me.startsWith(J));return ze.length===1?ze[0][1]:""},[aa]),ac=R.useCallback((J,me="preview")=>{const ze=Lt.current.filter(Me=>Me.id===J||Me.id.startsWith(J));ze.length===1&&Dr(ze[0].id,"overview",me)},[Dr]),Cu=R.useCallback(J=>{const me=cr.findIndex(ze=>C2(ze,J));me!==-1&&(pn(ze=>ze.filter((Me,je)=>je!==me)),$r(J,kt(v)===kt(J)))},[cr,$r,v]),ao=R.useCallback((J,me="preview")=>{J.line!=null&&S(je=>je+1);const ze=gn.current;if(ze){const je=Ns(ze,ls.current,J);Ei.current.fileTabs.some(at=>Qu(at,J))||C.current.delete(je),N.current.add(je)}const Me=cO(J);fn(je=>{const at=je.findIndex(Ft=>Qu(Ft,J));if(at===-1)return[...je,Me];const ot=je.slice();return ot[at]=Me,ot}),Kn(J,me)},[Kn]),al=R.useCallback((J,me,ze,Me,je,at)=>{const ot=L==null?void 0:L.find(Rs=>Rs.id===n),Ft=uAt(J,ot==null?void 0:ot.repoPath,me,(ot==null?void 0:ot.artifactsDir)??(ot==null?void 0:ot.filesDir),ot==null?void 0:ot.slug);if(!Ft)return null;const In=je?Lt.current.find(Rs=>Rs.id===je||je.length>=6&&Rs.id.startsWith(je)):void 0,xn=ze??(In==null?void 0:In.branchName),Qr=Ft.source==null||Ft.source==="repo";return xn&&Qr&&(Ft.ref=xn),at&&!Ft.ref&&Qr&&(Ft.branchLabel=at),Me!=null&&(Ft.line=Me),Ft},[L,n]),oo=R.useCallback((J,me,ze,Me,je,at,ot="preview")=>{const Ft=al(J,me,ze,Me,je,at);Ft&&ao(Ft,ot)},[ao,al]),Eu=R.useCallback(J=>ao({path:J,source:"artifacts"},"keepOpen"),[ao]),la=R.useCallback((J,me,ze,Me,je,at="preview")=>{const ot=al(J,me,je,ze,Me);ot&&ao(ot,at)},[ao,al]),Ti=R.useCallback((J,me)=>{Wr(J),me()},[Wr]),id=R.useCallback(J=>{var Me;const me=An.findIndex(je=>Qu(je,J));if(me===-1)return;const ze=n?Ns(n,u,J):null;ze&&((Me=St.current.get(ze))!=null&&Me.needsProtection)&&!yA(jE())||(fn(je=>je.filter((at,ot)=>ot!==me)),ze&&(pt.current.delete(ze),St.current.delete(ze),N.current.delete(ze),C.current.delete(ze),delete E.current[ze]),u===T0&&Qu(J,{path:p1,source:"artifacts"})&&Xn(!1),$r(J,kt(v)===kt(J)))},[u,An,$r,n,v]),ad=R.useCallback(J=>{J.lineScrollRequest!==void 0&&m(J.lineScrollRequest)},[]),od=R.useCallback((J,me,ze,Me="preview")=>{const je={kind:"plan",sessionId:me,promptId:ze,plan:J};Nr(at=>{const ot=at.findIndex(In=>In.promptId===ze);if(ot===-1)return[...at,je];const Ft=at.slice();return Ft[ot]=je,Ft}),Kn(je,Me)},[Kn]),ld=R.useCallback(J=>{const me=ht.findIndex(ze=>ze.promptId===J.promptId);me!==-1&&(Nr(ze=>ze.filter((Me,je)=>je!==me)),$r(J,kt(v)===kt(J)))},[$r,ht,v]),Nu=R.useCallback((J,me,ze,Me="preview")=>{const je={kind:"subagent",sessionId:J,spawnPartId:me,label:ze};rn(at=>at.some(ot=>ot.spawnPartId===me)?at:[...at,je]),Kn(je,Me)},[Kn]),p_=R.useCallback(J=>{const me=nn.findIndex(ze=>ze.spawnPartId===J.spawnPartId);me!==-1&&(rn(ze=>ze.filter((Me,je)=>je!==me)),$r(J,kt(v)===kt(J)))},[$r,v,nn]),[cd,oc]=R.useState({});R.useEffect(()=>{if(oc(ot=>{const Ft=new Set(nn.map(In=>In.spawnPartId));return Object.keys(ot).every(In=>Ft.has(In))?ot:Object.fromEntries(Object.entries(ot).filter(([In])=>Ft.has(In)))}),nn.length===0)return;let J=!0;const me=new Set,ze=(ot,Ft,In)=>{oc(xn=>{var Rs;let Qr=xn;for(const ji of Ft)if(!(In&&me.has(ji.spawnPartId)))for(const ul of ot){const Ma=Cv(ul.parts,ji.spawnPartId);if(!Ma)continue;In||me.add(ji.spawnPartId);const ho={label:o7t(Ma),running:((Rs=Ma.state)==null?void 0:Rs.status)==="running"},zn=Qr[ji.spawnPartId];(!zn||zn.label!==ho.label||zn.running!==ho.running)&&(Qr===xn&&(Qr={...xn}),Qr[ji.spawnPartId]=ho);break}return Qr})};let Me=0;const je=()=>{const ot=++Me;for(const Ft of new Set(nn.map(In=>In.sessionId)))tt.fetchQuery({...Wl(Ft),staleTime:0}).then(({messages:In})=>{J&&ot===Me&&ze(In,nn.filter(xn=>xn.sessionId===Ft),!0)}).catch(()=>{})};je();const at=J1(ot=>{if(ot.type==="reconnected"){me.clear(),je();return}if(ot.type!=="message")return;const Ft=nn.filter(In=>In.sessionId===ot.sessionId);Ft.length&&ze([ot.message],Ft,!1)});return()=>{J=!1,at()}},[nn]);const lc=R.useCallback((J,me,ze="files",Me="preview")=>{const je={code:!0,experimentId:J,branch:me,view:ze,toggled:new Set};ur(at=>at.some(ot=>$d(ot,je))?at.map(ot=>$d(ot,je)?{...ot,experimentId:J,view:ze}:ot):[...at,je]),Kn(je,Me)},[Kn]),ud=R.useCallback((J,me)=>{ur(ze=>ze.map(Me=>$d(Me,J)?{...Me,...me}:Me)),me.view&&O(Hl({...J,...me}))},[]),zu=R.useCallback(J=>{const me=Dn.findIndex(ze=>$d(ze,J));me!==-1&&(ur(ze=>ze.filter((Me,je)=>je!==me)),$r(J,kt(v)===kt(J)))},[Dn,$r,v]),Tu=R.useCallback(()=>{dn(!0),cs("files")},[cs]),ju=R.useCallback(J=>{J==="experiments"?Er(!1):J==="files"?dn(!1):Zt(!1),$r(J,v===J)},[$r,v]),m_=J=>{J.preventDefault(),J.currentTarget.setPointerCapture(J.pointerId);const ze=document.body.style.userSelect;document.body.style.userSelect="none";const Me=Pn,je=J.clientX,at=$t;let ot=!1;function Ft(){window.removeEventListener("pointermove",In),window.removeEventListener("pointerup",Ft),window.removeEventListener("pointercancel",Ft),document.body.style.userSelect=ze}function In(xn){if(Me){const ul=xn.clientX-je;if(ot||ulRs+mAt){Ve(!0);return}Ve(!1);const ji=Math.min(Math.max(Qr,Iv),Rs);qs(ji)}window.addEventListener("pointermove",In),window.addEventListener("pointerup",Ft),window.addEventListener("pointercancel",Ft)},ol=(J,me)=>{$(ze=>ze?MR(ze,J):[J]),s.navigate({href:`/projects/${encodeURIComponent(J.id)}${me?"/settings/git":""}`}),me&&fr(me,"error")},ws=typeof v=="object"&&"id"in v?v:null,Ln=typeof v=="object"&&"path"in v?v:null,Au=(Ln==null?void 0:Ln.source)==="artifacts"&&Ae?hp(Ae.entries,Ln.path):null,g_=Au?`${Au.modifiedAt}:${Au.size}`:null,lo=u===T0&&Yt?An.find(J=>Qu(J,{path:p1,source:"artifacts"})):void 0,v_=lo?[lo]:[],Pr=typeof v=="object"&&"kind"in v&&v.kind==="plan"?v:null,ui=Pr==null?void 0:Pr.sessionId,co=Pr==null?void 0:Pr.promptId,cc=!!(ui&&co&&(w!=null&&w.includes(ui))),ll=ct({...Wl(ui??""),enabled:cc,subscribed:cc}),uo=R.useMemo(()=>{var me;if(!ui||!co||!ll.data)return null;const J=ll.data.messages.flatMap(ze=>{const Me=Cv(ze.parts,co);return Me?[Me]:[]})[0];return{key:`${ui}:${co}`,text:((me=J==null?void 0:J.prompt)==null?void 0:me.plan)??null}},[ui,co,ll.data]),bs=typeof v=="object"&&"kind"in v&&v.kind==="subagent"?v:null,cl=typeof v=="object"&&"code"in v?v:null,re=cl?Dn.find(J=>$d(J,cl))??null:null,be=new Map;for(const J of[...cr,...An,...ht,...nn,...Dn])be.set(kt(J),J);const Re=lo?kt(lo):null,$e=os.filter(J=>J!==Re).map(J=>be.get(J)).filter(zdt),qe=J=>Ta!==null&&kt(Ta)===kt(J),Jt=J=>h.jsx(Bc,{active:Ln!==null&&Qu(Ln,J),label:J.path.split("/").pop()||J.path,icon:h.jsx(kO,{size:12,className:"shrink-0"}),preview:qe(J),onSelect:()=>cs(J),onPromote:()=>Wr(J),onClose:()=>id(J)},`file:${_6(J)}`),en=ws?le.find(J=>J.id===ws.id)??null:null,hr=re?le.find(J=>J.id===re.experimentId&&J.branchName===re.branch)??null:null,On=J=>{var ze,Me;if("path"in J)return Jt(J);if("id"in J){const je=le.find(at=>at.id===J.id);return h.jsx(Bc,{active:ws!==null&&C2(ws,J),label:je?je.title||je.slug:"…",icon:J.view==="overview"?h.jsx(lht,{size:12,className:"shrink-0"}):h.jsx($h,{size:12,className:"shrink-0"}),preview:qe(J),onSelect:()=>cs(J),onPromote:()=>Wr(J),onClose:()=>Cu(J)},kt(J))}if("kind"in J&&J.kind==="plan")return h.jsx(Bc,{active:Pr!==null&&Pr.promptId===J.promptId,label:cD(),icon:h.jsx(k6,{size:12,className:"shrink-0"}),preview:qe(J),onSelect:()=>cs(J),onPromote:()=>Wr(J),onClose:()=>ld(J)},kt(J));if("kind"in J)return h.jsx(Bc,{active:bs!==null&&bs.spawnPartId===J.spawnPartId,label:((ze=cd[J.spawnPartId])==null?void 0:ze.label)??J.label??pne(),shimmer:((Me=cd[J.spawnPartId])==null?void 0:Me.running)??!1,icon:h.jsx(C6,{size:12,className:"shrink-0"}),preview:qe(J),onSelect:()=>cs(J),onPromote:()=>Wr(J),onClose:()=>p_(J)},kt(J));const me=le.find(je=>je.id===J.experimentId);return h.jsx(Bc,{active:re!==null&&$d(re,J),label:(me==null?void 0:me.slug)??J.branch,icon:h.jsx(Df,{size:12,className:"shrink-0"}),preview:qe(J),onSelect:()=>cs(J),onPromote:()=>Wr(J),onClose:()=>zu(J)},kt(J))};if(!a||a.kind==="resume")return null;if(Q)return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsxs("div",{className:m0,children:[h.jsx("p",{children:Q}),h.jsx(Oe,{variant:"primary",onClick:Kr,children:qi()})]}),e.kind==="ssh"&&h.jsx(sv,{runtime:e,corner:!0})]});if(L&&!Kt)return h.jsxs("div",{className:m0,children:[Ao(),h.jsx(Oe,{onClick:()=>H(null),children:z0()})]});if(nr&&!Mr)return h.jsxs("div",{className:m0,children:[h.jsx("p",{role:"alert",children:nr}),h.jsx(Oe,{onClick:nd,children:qi()})]});if(L===null||te===null||!Su||w===null)return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsx("div",{className:m0,children:h.jsx(Dt,{})}),e.kind==="ssh"&&h.jsx(sv,{runtime:e,corner:!0})]});if(!Kt||(a==null?void 0:a.kind)==="task"&&u&&!(w!=null&&w.includes(u)))return h.jsxs("div",{className:m0,children:[Ao(),h.jsx(Oe,{onClick:()=>H(null),children:z0()})]});const fs=h.jsx(ICt,{projectName:((fo=L.find(J=>J.id===n))==null?void 0:fo.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>vs(!0),onRepository:()=>na("git"),onCollapse:()=>ta(!1)});return h.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&h.jsx(LO,{}),e.kind==="local"&&h.jsx(BO,{status:X}),nr&&h.jsxs("div",{role:"alert",className:"flex items-center gap-2 px-4 py-2 text-subtext",children:[h.jsx("span",{children:nr}),h.jsx(Oe,{onClick:nd,children:qi()})]}),h.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${js?"workspace-card-visible":""}`,children:[n&&h.jsx(x7t,{projectId:n,projectName:(Kt==null?void 0:Kt.name)??"",railHeader:fs,railOpen:oi,onShowRail:()=>ta(!0),mainView:o,onSelectMainView:na,onOpenFile:la,onOpenRun:rl,runExperimentName:oa,onOpenExperiment:ac,experimentName:io,onOpenPlan:od,onOpenSubagent:Nu,composerPrefill:Kt&&qc(Kt.id)&&(te==null?void 0:te.tourCompleted)===!1?xot:null,runtime:e,onOpenDemoWelcome:Kt&&qc(Kt.id)?tl:void 0,activeSessionId:u,onActiveSessionChange:Vr,preferredAgent:te.preferredAgent,onPreferredAgentChange:nl,children:o==="skills"?h.jsx(iCt,{}):o!=="chat"?h.jsx(WSt,{remote:e.kind==="ssh",tab:o,project:Kt,onProjectUpdate:J=>{$(me=>me?MR(me,J):[J])},onSelectTab:na}):null}),o==="chat"&&h.jsx(L1t,{expanded:js,experiments:le,runs:Ue,onOpenExperiment:(J,me)=>Dr(J,"overview","preview",me),rightOffset:_?$t+28:void 0,activeView:_&&(v==="files"||v==="artifacts"||v==="experiments")?v:null,projectId:Kt.id,onCompute:()=>na("compute"),sessionId:u,busy:((Ru=y.data)==null?void 0:Ru.some(J=>J.id===u&&J.busy))??!1,onChanges:()=>{Hs("changes"),Tu()},onFiles:()=>{Hs("files"),Tu()},onArtifacts:sd,onExperiments:()=>br()}),o==="chat"&&_&&h.jsxs("aside",{className:`right-pane relative shrink-0 min-w-0 flex flex-col mt-5 me-0 mb-5 ms-3.5 bg-canvas [&.max]:fixed [&.max]:inset-2.5 [&.max]:m-0 [&.max]:z-60 [&.max]:shadow-panel-max border border-border rounded-lg overflow-hidden shadow-elevated ${Pn?"max":""}`,style:Pn?void 0:{width:$t},"data-onboarding":"experiments",children:[h.jsx("div",{className:`panel-resizer absolute start-0 top-0 bottom-0 w-1.5 z-30 [&:hover]:bg-resizer-hover [&:active]:bg-resizer-hover ${Pn?"cursor-e-resize":"cursor-col-resize"}`,title:Pn?lte():ste(),onPointerDown:m_}),h.jsxs("div",{className:"tabs flex items-end gap-0 pt-1 pe-1.5 pb-0 ps-2 h-10 border-b border-b-border bg-background shrink-0",children:[h.jsxs("div",{className:"tab-strip flex items-end gap-0.5 flex-1 min-w-0 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[v_.map(Jt),gt&&h.jsx(Bc,{active:v==="files",label:g4(),icon:h.jsx(Df,{size:12,className:"shrink-0"}),onSelect:()=>cs("files"),onClose:()=>ju("files")}),Nn&&h.jsx(Bc,{active:v==="artifacts",label:tD(),icon:h.jsx(x6,{size:12,className:"shrink-0"}),onSelect:()=>cs("artifacts"),onClose:()=>ju("artifacts")}),Gr&&h.jsx(Bc,{active:v==="experiments",label:nD(),icon:h.jsx(rb,{size:12,className:"shrink-0"}),onSelect:()=>cs("experiments"),onClose:()=>ju("experiments")}),$e.map(On)]}),h.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[h.jsx(on,{title:Pn?Q9():K9(),"aria-label":Pn?Q9():K9(),onClick:()=>Ve(J=>!J),children:Pn?h.jsx(o_t,{size:14}):h.jsx(s_t,{size:14})}),h.jsx(on,{title:G1(),"aria-label":G1(),onClick:()=>{F(),Ve(!1)},children:h.jsx(ts,{size:14})})]})]}),!Mr||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!he||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!xe?h.jsx(Ba,{children:h.jsx(Dt,{})}):ws&&(!en||f&&!Ue.some(J=>J.id===f&&J.experimentId===ws.id))||cl&&!hr||t&&"sessionId"in t&&t.sessionId&&!(w!=null&&w.includes(t.sessionId))?h.jsx(Ba,{children:h.jsx("div",{className:"p-6 text-subtext",children:Ao()})}):v==="artifacts"?h.jsx(Ba,{children:Kt&&h.jsx(X7t,{project:Kt,artifacts:Ae,onOpenFile:Eu,canRenameFile:J=>{var me;return!((me=St.current.get(Ns(Kt.id,u,{path:J,source:"artifacts"})))!=null&&me.needsProtection)}},Kt.id)}):v==="experiments"?h.jsxs(Ba,{children:[h.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[h.jsx("span",{className:"flex-1"}),h.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[h.jsxs("div",{className:"option-picker relative inline-flex",ref:_n,children:[h.jsx(on,{size:"small",ref:We,className:"experiment-scope-trigger",active:jn==="agent",title:vte({scope:jn==="agent"?W9():V9()}),"aria-label":Rte(),"aria-expanded":Ht,onClick:()=>ln(J=>!J),children:h.jsx(qht,{size:16,strokeWidth:2.5})}),Ht&&h.jsxs("div",{className:"option-menu absolute bottom-[calc(100%_+_8px)] start-0 max-h-95 flex flex-col bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden min-w-47.5 p-1.5 [&.align-right]:start-auto [&.align-right]:end-0 [&.drop-down]:bottom-auto [&.drop-down]:top-[calc(100%_+_4px)] [&.session-menu]:start-auto [&.session-menu]:end-1.5 [&.session-menu]:top-[calc(100%_-_2px)] [&.session-menu]:min-w-35 drop-down align-right experiment-scope-menu [&_.model-item]:whitespace-nowrap [&_.model-item:disabled]:text-muted [&_.model-item:disabled]:cursor-default [&_.model-item:disabled:hover]:bg-transparent",children:[h.jsxs(dr,{"aria-pressed":jn==="agent",disabled:!u||!Xt,title:u?Xt?void 0:Ote():Ute(),onClick:()=>{Ut("agent"),ln(!1)},children:[h.jsx("span",{children:W9()}),jn==="agent"&&h.jsx(ka,{size:13})]}),h.jsxs(dr,{"aria-pressed":jn==="project",onClick:()=>{Ut("project"),ln(!1)},children:[h.jsx("span",{children:V9()}),jn==="project"&&h.jsx(ka,{size:13})]})]})]}),h.jsxs("div",{className:"seg inline-flex items-center gap-0.5 rounded-md bg-hover-subtle [&_button]:font-medium [&_button]:text-text [&_button]:rounded-sm [&_button:not(:disabled):hover]:text-text [&_button.active]:bg-background [&_button.active]:shadow-segment [&_button:disabled]:text-muted [&_button:disabled]:cursor-default experiments-view-toggle p-0.5 [&_button]:py-0.5 [&_button]:px-2 [&_button]:text-sm",role:"group","aria-label":wte(),children:[h.jsx("button",{className:Xe==="table"?"active":"","aria-pressed":Xe==="table",onClick:()=>dt("table"),children:bne()}),h.jsx("button",{className:Xe==="tree"?"active":"","aria-pressed":Xe==="tree",onClick:()=>dt("tree"),children:Sne()})]})]})]}),h.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:Xe==="tree"?Kt&&h.jsx(lAt,{experiments:le,runs:lr,project:Kt,onOpenView:Dr,onOpenCode:lc,agentSessionId:jn==="agent"?u:null,onShowProjectScope:us}):h.jsx(BCt,{runs:lr,emptyHint:jn==="agent"&&le.length>0?Pte():void 0,experiments:or,onOpen:(J,me)=>{Dr(J.id,"overview",me)},onOpenLogs:(J,me,ze)=>{Dr(J,"terminal",ze,me)},onOpenCode:(J,me)=>{const ze=le.find(Me=>Me.id===J);ze&&lc(ze.id,ze.branchName,"files",me)},onCancel:hL})})]}):v==="files"?h.jsx(Ba,{children:Kt?h.jsx($7t,{sessionId:u??void 0,project:Kt,view:Ci,toggled:sn,onViewChange:Hs,onToggledChange:ii,canRenameFile:J=>{var me;return!((me=St.current.get(Ns(Kt.id,u,{path:J,source:"repo",sessionId:u??void 0})))!=null&&me.needsProtection)},onOpenFile:(J,me,ze,Me)=>oo(J,me,ze,void 0,void 0,void 0,Me)},`files:${u??`project:${Kt.id}`}`):h.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:h.jsx(dh,{children:h.jsxs("div",{className:"wt-empty flex flex-col items-center gap-2.5 py-12 px-6 text-center text-muted [&_>_svg]:text-subtext [&_p]:m-0 [&_p]:max-w-80 [&_p]:text-sm",children:[h.jsx(CO,{size:22}),h.jsx("p",{children:rne()})]})})})}):Ln?h.jsx(Ba,{children:n&&h.jsx(OCt,{remote:e.kind==="ssh",restored:C.current.has(Ns(n,u,Ln)),onRestoreActivated:()=>{const J=Ns(n,u,Ln);C.current.delete(J),N.current.add(J)},showSource:E.current[Ns(n,u,Ln)]??!1,onShowSourceChange:J=>{E.current[Ns(n,u,Ln)]=J,z(me=>me+1)},projectId:n,path:Ln.path,source:Ln.source,sessionId:Ln.source==="artifacts"?u??void 0:Ln.sessionId,gitRef:Ln.ref,line:Ln.line,branchLabel:fAt(Ln,Kt==null?void 0:Kt.baselineBranch),artifactVersion:g_,artifactEntries:Ln.source==="artifacts"?Ae==null?void 0:Ae.entries:void 0,bufferSession:He(Ns(n,u,Ln)),onOpenFile:(J,me,ze,Me)=>Ti(Ln,()=>oo(J,me,ze,void 0,void 0,void 0,Me)),scrollPosition:pt.current.get(Ns(n,u,Ln)),onScrollPositionChange:J=>{pt.current.set(Ns(n,u,Ln),J),ra()},lineScrollRequest:Ln.lineScrollRequest,onLineScrollRequestHandled:()=>ad(Ln),onEdit:()=>Wr(Ln)},Ns(n,u,Ln))}):Pr?h.jsx(Ba,{children:h.jsx("div",{className:"pane-content flex-1 min-h-0 relative plan-tab-content overflow-y-auto bg-background py-4.5 px-6 [&_.md]:max-w-readable",children:h.jsx(Fo,{text:(uo==null?void 0:uo.key)===`${Pr.sessionId}:${Pr.promptId}`?uo.text??Ao():((uc=ht.find(J=>J.promptId===Pr.promptId))==null?void 0:uc.plan)||rD(),onOpenFile:(J,me,ze,Me,je)=>Ti(Pr,()=>oo(J,Pr.sessionId,Me,me,ze,void 0,je))})})}):bs?h.jsx(k7t,{sessionId:bs.sessionId,spawnPartId:bs.spawnPartId,onOpenFile:(J,me,ze,Me,je)=>Ti(bs,()=>la(J,bs.sessionId,me,ze,Me,je)),onOpenRun:(J,me)=>Ti(bs,()=>rl(J,me)),runExperimentName:oa,onOpenExperiment:(J,me)=>Ti(bs,()=>ac(J,me)),experimentName:io,onOpenSubagent:(J,me,ze)=>Ti(bs,()=>Nu(bs.sessionId,J,me,ze))},bs.spawnPartId):re?h.jsx(Ba,{children:n&&Kt&&re&&hr&&h.jsx(B7t,{projectId:n,project:Kt,experiment:hr,view:re.view,toggled:re.toggled,onViewChange:J=>ud(re,{view:J}),onToggledChange:J=>ud(re,{toggled:J}),onOpenFile:(J,me,ze,Me)=>Ti(re,()=>oo(J,me,ze,void 0,void 0,hr.branchName,Me))},`code:${re.branch}`)}):h.jsx(Ba,{children:ws&&en&&Kt&&h.jsx(uCt,{experiment:en,project:Kt,view:ws.view,runs:Ue,selectedRunId:f,onSelectRun:U,parentExperiment:le.find(J=>J.id===en.parentExperimentId)??null,onOpenView:(J,me,ze)=>{Ti(ws,()=>Dr(en.id,J,ze,me))},onOpenCode:(J,me)=>Ti(ws,()=>lc(en.id,en.branchName,J,me))},`${ws.id}:${ws.view}`)})]})]}),td&&h.jsx(DO,{remote:e.kind==="ssh",onClose:()=>vs(!1),onCreated:(J,me)=>{vs(!1),ol(J,me)}}),zi&&Kt&&qc(Kt.id)&&h.jsx($Ct,{onClose:no,onCreateProject:ku})]})}const m5=qo()({validateSearch:e=>({pane:d6(e.pane)}),beforeLoad:({location:e})=>{if(!Rf(e.pathname))throw HG()},component:yAt});function yAt(){const{projectId:e}=m5.useParams(),{pane:n}=m5.useSearch(),t=ri(),r=UM({select:s=>s.location});return R.useEffect(()=>{const s=xAt(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),h.jsxs(h.Fragment,{children:[h.jsx(U0,{}),h.jsx(bAt,{projectId:e,pane:n,runtime:dO()},e)]})}function xAt(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&d6(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const aq=qo()({component:wAt});function wAt(){const{projectId:e}=aq.useParams();return h.jsx(w0t,{projectId:e})}const SAt=qo()({}),kAt=qo()({}),CAt=qo()({}),EAt=qo()({}),NAt=k0t.update({id:"/",path:"/",getParentRoute:()=>tb}),jk=C0t.update({id:"/projects",path:"/projects",getParentRoute:()=>tb}),zAt=E0t.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>tb}),TAt=N0t.update({id:"/",path:"/",getParentRoute:()=>jk}),__=m5.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>jk}),jAt=aq.update({id:"/",path:"/",getParentRoute:()=>__}),AAt=SAt.update({id:"/skills",path:"/skills",getParentRoute:()=>__}),RAt=kAt.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>__}),MAt=CAt.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>__}),DAt=EAt.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>__}),LAt={ProjectsProjectIdSkillsRoute:AAt,ProjectsProjectIdIndexRoute:jAt,ProjectsProjectIdSettingsTabRoute:RAt,ProjectsProjectIdTasksSessionIdRoute:MAt,ProjectsProjectIdTasksNewRoute:DAt},OAt=__._addFileChildren(LAt),IAt={ProjectsProjectIdRoute:OAt,ProjectsIndexRoute:TAt},BAt=jk._addFileChildren(IAt),$At={IndexRoute:NAt,ProjectsRoute:BAt,RemoteLaunchRoute:zAt},PAt=tb._addFileChildren($At)._addFileTypes(),FAt=uV({routeTree:PAt,context:{queryClient:tt},trailingSlash:"never",defaultPendingComponent:T6,defaultErrorComponent:j6,defaultNotFoundComponent:y0t}),HAt=T();document.documentElement.lang=HAt;document.documentElement.dir="ltr";vG.createRoot(document.getElementById("root")).render(h.jsxs(R.StrictMode,{children:[h.jsx(RU,{client:tt,children:h.jsx(hV,{router:FAt})}),h.jsx(cdt,{})]})); diff --git a/ui/dist/index.html b/ui/dist/index.html index fa4509a0..fade8e8e 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -49,8 +49,8 @@ html { background: #ffffff; } html[data-theme="dark"] { background: #0e0c0c; } - - + +
window.innerWidth >= WORKSPACE_CARD_MIN_WIDTH); + const workspaceCardVisible = mainView === "chat" && !panelOpen && workspaceWide; // The agents rail is a floating panel too: fixed-width, collapsible. const [railOpen, setRailOpen] = useState(true); const [newProjectOpen, setNewProjectOpen] = useState(false); @@ -782,7 +786,10 @@ export default function App({ runtime, projectId, pane }: { runtime: RuntimeInfo // Shrinking the window can push a fixed-width panel past its usable max — // reclamp so it never overflows the viewport. useEffect(() => { - const onResize = () => setPanelWidth((w) => Math.min(w, panelMaxWidth())); + const onResize = () => { + setPanelWidth((w) => Math.min(w, panelMaxWidth())); + setWorkspaceWide(window.innerWidth >= WORKSPACE_CARD_MIN_WIDTH); + }; window.addEventListener("resize", onResize); return () => window.removeEventListener("resize", onResize); }, []); @@ -1546,7 +1553,7 @@ export default function App({ runtime, projectId, pane }: { runtime: RuntimeInfo {runtime.kind === "local" && } {runtime.kind === "local" && } {workspaceError &&
{workspaceError}
} -
+
{projectId && ( setRailOpen(true)} mainView={mainView} onSelectMainView={selectMainView} - experimentsActive={ - mainView === "chat" && panelOpen && rightTab === "experiments" - } - filesActive={mainView === "chat" && panelOpen && rightTab === "files"} - artifactsActive={mainView === "chat" && panelOpen && rightTab === "artifacts"} - onOpenExperiments={() => openExperimentsTab()} - onOpenArtifacts={openArtifactsTab} onOpenFile={openChatFile} onOpenRun={openRunLogs} runExperimentName={runExperimentName} @@ -1570,7 +1570,6 @@ export default function App({ runtime, projectId, pane }: { runtime: RuntimeInfo experimentName={experimentName} onOpenPlan={openPlanTab} onOpenSubagent={openSubagentTab} - onOpenWorktree={openWorktreeTab} composerPrefill={ activeProject && isDemoProjectId(activeProject.id) && @@ -1602,6 +1601,24 @@ export default function App({ runtime, projectId, pane }: { runtime: RuntimeInfo ) : null} )} + {mainView === "chat" && ( + openExperimentTab(id, "overview", "preview", runId)} + rightOffset={panelOpen ? panelWidth + 28 : undefined} + activeView={panelOpen && (rightTab === "files" || rightTab === "artifacts" || rightTab === "experiments") ? rightTab : null} + projectId={activeProject.id} + onCompute={() => selectMainView("compute")} + sessionId={activeSessionId} + busy={sessionsQuery.data?.some((session) => session.id === activeSessionId && session.busy) ?? false} + onChanges={() => { setFilesView("changes"); openWorktreeTab(); }} + onFiles={() => { setFilesView("files"); openWorktreeTab(); }} + onArtifacts={openArtifactsTab} + onExperiments={() => openExperimentsTab()} + /> + )} {mainView === "chat" && panelOpen && (